Version Description
- Add Oauth2 for Aweber
- Add compatibility with Mailchimp GDPR options
- Allow adding "mailto" and "tel" to the CTA links
- Update Social Sharing widget from Hustle's dashboard to display the existing modules
- Create module's IDs from their ID instead of their name
- Improve accessibility for input fields labels in admin side
- Improve updating the subscriber's tags when subscribing again in Mailchimp
- Improve textdomain handling
- Improve minor UI details
- Improve compatibility with WP SVG Icons plugin, Oxygen builder, and Twenty Twenty theme
- Fix GetResponse checking for a subscriber in all lists instead of the selected one
- Fix certain IP format not being deleted from the IPs in the database
- Fix time delay being ignored for "close" in "After external form submission behavior"
- Fix Slide-in with stacked layout not displaying properly
- Fix reCAPTCHA custom message not being shown
- Fix module being closed even when "Close module after CTA conversion" is disabled
- Fix navigation not showing in wizards nor settings page in mobiles
Download this release
Release Info
Developer | rickjc89 |
Plugin | Hustle – Pop-Ups, Slide-ins and Email Opt-ins |
Version | 7.1.1 |
Comparing to | |
See all releases |
Code changes from version 7.1.0 to 7.1.1
- assets/css/daterangepicker.min.css +8 -8
- assets/hustle-ui/css/hustle-inline.min.css +1 -1
- assets/hustle-ui/js/hustle-ui.min.js +6 -6
- assets/js/admin.debug.js +269 -517
- assets/js/admin.min.js +1 -1
- assets/js/front.debug.js +46 -36
- assets/js/front.min.js +1 -1
- assets/js/shared-ui.min.js +1 -2
assets/css/daterangepicker.min.css
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
/**
|
2 |
-
* Minified by jsDelivr using clean-css v4.1.11.
|
3 |
-
* Original file: /npm/daterangepicker@3.0.3/daterangepicker.css
|
4 |
-
*
|
5 |
-
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
6 |
-
*/
|
7 |
-
.daterangepicker{position:absolute;color:inherit;background-color:#fff;border-radius:4px;border:1px solid #ddd;width:278px;max-width:none;padding:0;margin-top:7px;top:100px;left:20px;z-index:3001;display:none;font-family:arial;font-size:15px;line-height:1em}.daterangepicker:after,.daterangepicker:before{position:absolute;display:inline-block;border-bottom-color:rgba(0,0,0,.2);content:''}.daterangepicker:before{top:-7px;border-right:7px solid transparent;border-left:7px solid transparent;border-bottom:7px solid #ccc}.daterangepicker:after{top:-6px;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent}.daterangepicker.opensleft:before{right:9px}.daterangepicker.opensleft:after{right:10px}.daterangepicker.openscenter:before{left:0;right:0;width:0;margin-left:auto;margin-right:auto}.daterangepicker.openscenter:after{left:0;right:0;width:0;margin-left:auto;margin-right:auto}.daterangepicker.opensright:before{left:9px}.daterangepicker.opensright:after{left:10px}.daterangepicker.drop-up{margin-top:-7px}.daterangepicker.drop-up:before{top:initial;bottom:-7px;border-bottom:initial;border-top:7px solid #ccc}.daterangepicker.drop-up:after{top:initial;bottom:-6px;border-bottom:initial;border-top:6px solid #fff}.daterangepicker.single .daterangepicker .ranges,.daterangepicker.single .drp-calendar{float:none}.daterangepicker.single .drp-selected{display:none}.daterangepicker.show-calendar .drp-calendar{display:block}.daterangepicker.show-calendar .drp-buttons{display:block}.daterangepicker.auto-apply .drp-buttons{display:none}.daterangepicker .drp-calendar{display:none;max-width:270px}.daterangepicker .drp-calendar.left{padding:8px 0 8px 8px}.daterangepicker .drp-calendar.right{padding:8px}.daterangepicker .drp-calendar.single .calendar-table{border:none}.daterangepicker .calendar-table .next span,.daterangepicker .calendar-table .prev span{color:#fff;border:solid #000;border-width:0 2px 2px 0;border-radius:0;display:inline-block;padding:3px}.daterangepicker .calendar-table .next span{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}.daterangepicker .calendar-table .prev span{transform:rotate(135deg);-webkit-transform:rotate(135deg)}.daterangepicker .calendar-table td,.daterangepicker .calendar-table th{white-space:nowrap;text-align:center;vertical-align:middle;min-width:32px;width:32px;height:24px;line-height:24px;font-size:12px;border-radius:4px;border:1px solid transparent;white-space:nowrap;cursor:pointer}.daterangepicker .calendar-table{border:1px solid #fff;border-radius:4px;background-color:#fff}.daterangepicker .calendar-table table{width:100%;margin:0;border-spacing:0;border-collapse:collapse}.daterangepicker td.available:hover,.daterangepicker th.available:hover{background-color:#eee;border-color:transparent;color:inherit}.daterangepicker td.week,.daterangepicker th.week{font-size:80%;color:#ccc}.daterangepicker td.off,.daterangepicker td.off.end-date,.daterangepicker td.off.in-range,.daterangepicker td.off.start-date{background-color:#fff;border-color:transparent;color:#999}.daterangepicker td.in-range{background-color:#ebf4f8;border-color:transparent;color:#000;border-radius:0}.daterangepicker td.start-date{border-radius:4px 0 0 4px}.daterangepicker td.end-date{border-radius:0 4px 4px 0}.daterangepicker td.start-date.end-date{border-radius:4px}.daterangepicker td.active,.daterangepicker td.active:hover{background-color:#357ebd;border-color:transparent;color:#fff}.daterangepicker th.month{width:auto}.daterangepicker option.disabled,.daterangepicker td.disabled{color:#999;cursor:not-allowed;text-decoration:line-through}.daterangepicker select.monthselect,.daterangepicker select.yearselect{font-size:12px;padding:1px;height:auto;margin:0;cursor:default}.daterangepicker select.monthselect{margin-right:2%;width:56%}.daterangepicker select.yearselect{width:40%}.daterangepicker select.ampmselect,.daterangepicker select.hourselect,.daterangepicker select.minuteselect,.daterangepicker select.secondselect{width:50px;margin:0 auto;background:#eee;border:1px solid #eee;padding:2px;outline:0;font-size:12px}.daterangepicker .calendar-time{text-align:center;margin:4px auto 0 auto;line-height:30px;position:relative}.daterangepicker .calendar-time select.disabled{color:#ccc;cursor:not-allowed}.daterangepicker .drp-buttons{clear:both;text-align:right;padding:8px;border-top:1px solid #ddd;display:none;line-height:12px;vertical-align:middle}.daterangepicker .drp-selected{display:inline-block;font-size:12px;padding-right:8px}.daterangepicker .drp-buttons .btn{margin-left:8px;font-size:12px;font-weight:700;padding:4px 8px}.daterangepicker.show-ranges .drp-calendar.left{border-left:1px solid #ddd}.daterangepicker .ranges{float:none;text-align:left;margin:0}.daterangepicker.show-calendar .ranges{margin-top:8px}.daterangepicker .ranges ul{list-style:none;margin:0 auto;padding:0;width:100%}.daterangepicker .ranges li{font-size:12px;padding:8px 12px;cursor:pointer}.daterangepicker .ranges li:hover{background-color:#eee}.daterangepicker .ranges li.active{background-color:#08c;color:#fff}@media (min-width:564px){.daterangepicker{width:auto}.daterangepicker .ranges ul{width:140px}.daterangepicker.single .ranges ul{width:100%}.daterangepicker.single .drp-calendar.left{clear:none}.daterangepicker.single.ltr .drp-calendar,.daterangepicker.single.ltr .ranges{float:left}.daterangepicker.single.rtl .drp-calendar,.daterangepicker.single.rtl .ranges{float:right}.daterangepicker.ltr{direction:ltr;text-align:left}.daterangepicker.ltr .drp-calendar.left{clear:left;margin-right:0}.daterangepicker.ltr .drp-calendar.left .calendar-table{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.daterangepicker.ltr .drp-calendar.right{margin-left:0}.daterangepicker.ltr .drp-calendar.right .calendar-table{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.daterangepicker.ltr .drp-calendar.left .calendar-table{padding-right:8px}.daterangepicker.ltr .drp-calendar,.daterangepicker.ltr .ranges{float:left}.daterangepicker.rtl{direction:rtl;text-align:right}.daterangepicker.rtl .drp-calendar.left{clear:right;margin-left:0}.daterangepicker.rtl .drp-calendar.left .calendar-table{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.daterangepicker.rtl .drp-calendar.right{margin-right:0}.daterangepicker.rtl .drp-calendar.right .calendar-table{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.daterangepicker.rtl .drp-calendar.left .calendar-table{padding-left:12px}.daterangepicker.rtl .drp-calendar,.daterangepicker.rtl .ranges{text-align:right;float:right}}@media (min-width:730px){.daterangepicker .ranges{width:auto}.daterangepicker.ltr .ranges{float:left}.daterangepicker.rtl .ranges{float:right}.daterangepicker .drp-calendar.left{clear:none!important}}
|
8 |
-
|
1 |
+
/**
|
2 |
+
* Minified by jsDelivr using clean-css v4.1.11.
|
3 |
+
* Original file: /npm/daterangepicker@3.0.3/daterangepicker.css
|
4 |
+
*
|
5 |
+
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
6 |
+
*/
|
7 |
+
.daterangepicker{position:absolute;color:inherit;background-color:#fff;border-radius:4px;border:1px solid #ddd;width:278px;max-width:none;padding:0;margin-top:7px;top:100px;left:20px;z-index:3001;display:none;font-family:arial;font-size:15px;line-height:1em}.daterangepicker:after,.daterangepicker:before{position:absolute;display:inline-block;border-bottom-color:rgba(0,0,0,.2);content:''}.daterangepicker:before{top:-7px;border-right:7px solid transparent;border-left:7px solid transparent;border-bottom:7px solid #ccc}.daterangepicker:after{top:-6px;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent}.daterangepicker.opensleft:before{right:9px}.daterangepicker.opensleft:after{right:10px}.daterangepicker.openscenter:before{left:0;right:0;width:0;margin-left:auto;margin-right:auto}.daterangepicker.openscenter:after{left:0;right:0;width:0;margin-left:auto;margin-right:auto}.daterangepicker.opensright:before{left:9px}.daterangepicker.opensright:after{left:10px}.daterangepicker.drop-up{margin-top:-7px}.daterangepicker.drop-up:before{top:initial;bottom:-7px;border-bottom:initial;border-top:7px solid #ccc}.daterangepicker.drop-up:after{top:initial;bottom:-6px;border-bottom:initial;border-top:6px solid #fff}.daterangepicker.single .daterangepicker .ranges,.daterangepicker.single .drp-calendar{float:none}.daterangepicker.single .drp-selected{display:none}.daterangepicker.show-calendar .drp-calendar{display:block}.daterangepicker.show-calendar .drp-buttons{display:block}.daterangepicker.auto-apply .drp-buttons{display:none}.daterangepicker .drp-calendar{display:none;max-width:270px}.daterangepicker .drp-calendar.left{padding:8px 0 8px 8px}.daterangepicker .drp-calendar.right{padding:8px}.daterangepicker .drp-calendar.single .calendar-table{border:none}.daterangepicker .calendar-table .next span,.daterangepicker .calendar-table .prev span{color:#fff;border:solid #000;border-width:0 2px 2px 0;border-radius:0;display:inline-block;padding:3px}.daterangepicker .calendar-table .next span{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}.daterangepicker .calendar-table .prev span{transform:rotate(135deg);-webkit-transform:rotate(135deg)}.daterangepicker .calendar-table td,.daterangepicker .calendar-table th{white-space:nowrap;text-align:center;vertical-align:middle;min-width:32px;width:32px;height:24px;line-height:24px;font-size:12px;border-radius:4px;border:1px solid transparent;white-space:nowrap;cursor:pointer}.daterangepicker .calendar-table{border:1px solid #fff;border-radius:4px;background-color:#fff}.daterangepicker .calendar-table table{width:100%;margin:0;border-spacing:0;border-collapse:collapse}.daterangepicker td.available:hover,.daterangepicker th.available:hover{background-color:#eee;border-color:transparent;color:inherit}.daterangepicker td.week,.daterangepicker th.week{font-size:80%;color:#ccc}.daterangepicker td.off,.daterangepicker td.off.end-date,.daterangepicker td.off.in-range,.daterangepicker td.off.start-date{background-color:#fff;border-color:transparent;color:#999}.daterangepicker td.in-range{background-color:#ebf4f8;border-color:transparent;color:#000;border-radius:0}.daterangepicker td.start-date{border-radius:4px 0 0 4px}.daterangepicker td.end-date{border-radius:0 4px 4px 0}.daterangepicker td.start-date.end-date{border-radius:4px}.daterangepicker td.active,.daterangepicker td.active:hover{background-color:#357ebd;border-color:transparent;color:#fff}.daterangepicker th.month{width:auto}.daterangepicker option.disabled,.daterangepicker td.disabled{color:#999;cursor:not-allowed;text-decoration:line-through}.daterangepicker select.monthselect,.daterangepicker select.yearselect{font-size:12px;padding:1px;height:auto;margin:0;cursor:default}.daterangepicker select.monthselect{margin-right:2%;width:56%}.daterangepicker select.yearselect{width:40%}.daterangepicker select.ampmselect,.daterangepicker select.hourselect,.daterangepicker select.minuteselect,.daterangepicker select.secondselect{width:50px;margin:0 auto;background:#eee;border:1px solid #eee;padding:2px;outline:0;font-size:12px}.daterangepicker .calendar-time{text-align:center;margin:4px auto 0 auto;line-height:30px;position:relative}.daterangepicker .calendar-time select.disabled{color:#ccc;cursor:not-allowed}.daterangepicker .drp-buttons{clear:both;text-align:right;padding:8px;border-top:1px solid #ddd;display:none;line-height:12px;vertical-align:middle}.daterangepicker .drp-selected{display:inline-block;font-size:12px;padding-right:8px}.daterangepicker .drp-buttons .btn{margin-left:8px;font-size:12px;font-weight:700;padding:4px 8px}.daterangepicker.show-ranges .drp-calendar.left{border-left:1px solid #ddd}.daterangepicker .ranges{float:none;text-align:left;margin:0}.daterangepicker.show-calendar .ranges{margin-top:8px}.daterangepicker .ranges ul{list-style:none;margin:0 auto;padding:0;width:100%}.daterangepicker .ranges li{font-size:12px;padding:8px 12px;cursor:pointer}.daterangepicker .ranges li:hover{background-color:#eee}.daterangepicker .ranges li.active{background-color:#08c;color:#fff}@media (min-width:564px){.daterangepicker{width:auto}.daterangepicker .ranges ul{width:140px}.daterangepicker.single .ranges ul{width:100%}.daterangepicker.single .drp-calendar.left{clear:none}.daterangepicker.single.ltr .drp-calendar,.daterangepicker.single.ltr .ranges{float:left}.daterangepicker.single.rtl .drp-calendar,.daterangepicker.single.rtl .ranges{float:right}.daterangepicker.ltr{direction:ltr;text-align:left}.daterangepicker.ltr .drp-calendar.left{clear:left;margin-right:0}.daterangepicker.ltr .drp-calendar.left .calendar-table{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.daterangepicker.ltr .drp-calendar.right{margin-left:0}.daterangepicker.ltr .drp-calendar.right .calendar-table{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.daterangepicker.ltr .drp-calendar.left .calendar-table{padding-right:8px}.daterangepicker.ltr .drp-calendar,.daterangepicker.ltr .ranges{float:left}.daterangepicker.rtl{direction:rtl;text-align:right}.daterangepicker.rtl .drp-calendar.left{clear:right;margin-left:0}.daterangepicker.rtl .drp-calendar.left .calendar-table{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.daterangepicker.rtl .drp-calendar.right{margin-right:0}.daterangepicker.rtl .drp-calendar.right .calendar-table{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.daterangepicker.rtl .drp-calendar.left .calendar-table{padding-left:12px}.daterangepicker.rtl .drp-calendar,.daterangepicker.rtl .ranges{text-align:right;float:right}}@media (min-width:730px){.daterangepicker .ranges{width:auto}.daterangepicker.ltr .ranges{float:left}.daterangepicker.rtl .ranges{float:right}.daterangepicker .drp-calendar.left{clear:none!important}}
|
8 |
+
|
assets/hustle-ui/css/hustle-inline.min.css
CHANGED
@@ -2,4 +2,4 @@
|
|
2 |
* WPMU DEV Hustle UI
|
3 |
* Copyright 2019 Incsub (https://incsub.com)
|
4 |
* Licensed under GPL v3 (http://www.gnu.org/licenses/gpl-3.0.html)
|
5 |
-
*/@-webkit-keyframes spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@-webkit-keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@-webkit-keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}@keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}@-webkit-keyframes newspaperIn{from{opacity:0;-webkit-transform:rotate(-900deg) scale(0,0);transform:rotate(-900deg) scale(0,0)}to{opacity:1;-webkit-transform:rotate(0) scale(1,1);transform:rotate(0) scale(1,1)}}@keyframes newspaperIn{from{opacity:0;-webkit-transform:rotate(-900deg) scale(0,0);transform:rotate(-900deg) scale(0,0)}to{opacity:1;-webkit-transform:rotate(0) scale(1,1);transform:rotate(0) scale(1,1)}}@-webkit-keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@-webkit-keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@-webkit-keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@-webkit-keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@-webkit-keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@-webkit-keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes zoomIn{from{opacity:0;-webkit-transform:translateY(-50%) scale3d(.3,.3,.3);transform:translateY(-50%) scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{from{opacity:0;-webkit-transform:translateY(-50%) scale3d(.3,.3,.3);transform:translateY(-50%) scale3d(.3,.3,.3)}50%{opacity:1}}@-webkit-keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@-webkit-keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@-webkit-keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@-webkit-keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@-webkit-keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@-webkit-keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@-webkit-keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@-webkit-keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@-webkit-keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@-webkit-keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@-webkit-keyframes newspaperOut{from{opacity:1;-webkit-transform:rotate(0) scale(1,1);transform:rotate(0) scale(1,1)}to{opacity:0;-webkit-transform:rotate(-900deg) scale(0,0);transform:rotate(-900deg) scale(0,0)}}@keyframes newspaperOut{from{opacity:1;-webkit-transform:rotate(0) scale(1,1);transform:rotate(0) scale(1,1)}to{opacity:0;-webkit-transform:rotate(-900deg) scale(0,0);transform:rotate(-900deg) scale(0,0)}}@-webkit-keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@-webkit-keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@-webkit-keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@-webkit-keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@-webkit-keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@-webkit-keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@-webkit-keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:translateY(-50%) scale3d(.3,.3,.3);transform:translateY(-50%) scale3d(.3,.3,.3)}}@keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:translateY(-50%) scale3d(.3,.3,.3);transform:translateY(-50%) scale3d(.3,.3,.3)}}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}.hustle-ui.hustle-inline{opacity:0;-khtml-opacity:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:10px 0}.hustle-ui.hustle-inline .hustle-inline-content{width:100%;max-width:100%;margin:0 auto}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate{opacity:0;-khtml-opacity:0;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-transform-origin:center;transform-origin:center;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--bounceIn{opacity:1;-khtml-opacity:1;-webkit-animation-name:bounceIn;animation-name:bounceIn;-webkit-animation-duration:.75s;animation-duration:.75s}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--bounceInUp{opacity:1;-khtml-opacity:1;-webkit-animation-name:bounceInUp;animation-name:bounceInUp}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--bounceInDown{opacity:1;-khtml-opacity:1;-webkit-animation-name:bounceInDown;animation-name:bounceInDown}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--bounceInLeft{opacity:1;-khtml-opacity:1;-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--bounceInRight{opacity:1;-khtml-opacity:1;-webkit-animation-name:bounceInRight;animation-name:bounceInRight}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeIn{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeIn;animation-name:fadeIn;-webkit-animation-duration:.3s;animation-duration:.3s}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeInUp{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeInUp;animation-name:fadeInUp}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeInDown{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeInDown;animation-name:fadeInDown}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeInLeft{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeInRight{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeInRight;animation-name:fadeInRight}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeInUpBig{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeInDownBig{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeInLeftBig{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeInRightBig{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--lightSpeedIn{opacity:1;-khtml-opacity:1;-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--newspaperIn{opacity:1;-khtml-opacity:1;-webkit-animation-name:newspaperIn;animation-name:newspaperIn;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-timing-function:ease;animation-timing-function:ease}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--rollIn{opacity:1;-khtml-opacity:1;-webkit-animation-name:rollIn;animation-name:rollIn}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--rotateIn{opacity:1;-khtml-opacity:1;-webkit-animation-name:rotateIn;animation-name:rotateIn}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--rotateInUpLeft{opacity:1;-khtml-opacity:1;-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--rotateInUpRight{opacity:1;-khtml-opacity:1;-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--rotateInDownLeft{opacity:1;-khtml-opacity:1;-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--rotateInDownRight{opacity:1;-khtml-opacity:1;-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--slideInUp{opacity:1;-khtml-opacity:1;-webkit-animation-name:slideInUp;animation-name:slideInUp}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--slideInDown{opacity:1;-khtml-opacity:1;-webkit-animation-name:slideInDown;animation-name:slideInDown}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--slideInLeft{opacity:1;-khtml-opacity:1;-webkit-animation-name:slideInLeft;animation-name:slideInLeft}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--slideInRight{opacity:1;-khtml-opacity:1;-webkit-animation-name:slideInRight;animation-name:slideInRight}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--zoomIn{opacity:1;-khtml-opacity:1;-webkit-animation-name:zoomIn;animation-name:zoomIn}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--zoomInUp{opacity:1;-khtml-opacity:1;-webkit-animation-name:zoomInUp;animation-name:zoomInUp}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--zoomInDown{opacity:1;-khtml-opacity:1;-webkit-animation-name:zoomInDown;animation-name:zoomInDown}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--zoomInLeft{opacity:1;-khtml-opacity:1;-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--zoomInRight{opacity:1;-khtml-opacity:1;-webkit-animation-name:zoomInRight;animation-name:zoomInRight}.hustle-ui.hustle-inline[data-alignment=left] .hustle-inline-content{text-align:left}.hustle-ui.hustle-inline[data-alignment=center] .hustle-inline-content{text-align:center}.hustle-ui.hustle-inline[data-alignment=right] .hustle-inline-content{text-align:right}.hustle-ui.hustle-inline:first-child{margin-top:0}.hustle-ui.hustle-inline:last-child{margin-bottom:0}.hustle-ui.hustle-inline.hustle-show{opacity:1;-khtml-opacity:1}@media (min-width:783px){.hustle-ui.hustle-inline:not(.hustle-size--small):first-child{margin-top:0}}@media (min-width:783px){.hustle-ui.hustle-inline:not(.hustle-size--small):last-child{margin-bottom:0}}@media (min-width:783px){.hustle-ui.hustle-inline:not(.hustle-size--small){margin:20px 0}}
|
2 |
* WPMU DEV Hustle UI
|
3 |
* Copyright 2019 Incsub (https://incsub.com)
|
4 |
* Licensed under GPL v3 (http://www.gnu.org/licenses/gpl-3.0.html)
|
5 |
+
*/@-webkit-keyframes spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@-webkit-keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@-webkit-keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@-webkit-keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}@keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}@-webkit-keyframes newspaperIn{from{opacity:0;-webkit-transform:rotate(-900deg) scale(0,0);transform:rotate(-900deg) scale(0,0)}to{opacity:1;-webkit-transform:rotate(0) scale(1,1);transform:rotate(0) scale(1,1)}}@keyframes newspaperIn{from{opacity:0;-webkit-transform:rotate(-900deg) scale(0,0);transform:rotate(-900deg) scale(0,0)}to{opacity:1;-webkit-transform:rotate(0) scale(1,1);transform:rotate(0) scale(1,1)}}@-webkit-keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@-webkit-keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@-webkit-keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@-webkit-keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@-webkit-keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@-webkit-keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes zoomIn{from{opacity:0;-webkit-transform:translateY(-50%) scale3d(.3,.3,.3);transform:translateY(-50%) scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{from{opacity:0;-webkit-transform:translateY(-50%) scale3d(.3,.3,.3);transform:translateY(-50%) scale3d(.3,.3,.3)}50%{opacity:1}}@-webkit-keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@-webkit-keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@-webkit-keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@-webkit-keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@-webkit-keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@-webkit-keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@-webkit-keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@-webkit-keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@-webkit-keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@-webkit-keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@-webkit-keyframes newspaperOut{from{opacity:1;-webkit-transform:rotate(0) scale(1,1);transform:rotate(0) scale(1,1)}to{opacity:0;-webkit-transform:rotate(-900deg) scale(0,0);transform:rotate(-900deg) scale(0,0)}}@keyframes newspaperOut{from{opacity:1;-webkit-transform:rotate(0) scale(1,1);transform:rotate(0) scale(1,1)}to{opacity:0;-webkit-transform:rotate(-900deg) scale(0,0);transform:rotate(-900deg) scale(0,0)}}@-webkit-keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@-webkit-keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@-webkit-keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@-webkit-keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@-webkit-keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@-webkit-keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@-webkit-keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:translateY(-50%) scale3d(.3,.3,.3);transform:translateY(-50%) scale3d(.3,.3,.3)}}@keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:translateY(-50%) scale3d(.3,.3,.3);transform:translateY(-50%) scale3d(.3,.3,.3)}}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}.hustle-ui.hustle-inline{opacity:0;-khtml-opacity:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:10px 0}.hustle-ui.hustle-inline .hustle-inline-content{width:100%;max-width:100%;margin:0 auto}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate{opacity:0;-khtml-opacity:0;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-transform-origin:center;transform-origin:center;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--bounceIn{opacity:1;-khtml-opacity:1;-webkit-animation-name:bounceIn;animation-name:bounceIn;-webkit-animation-duration:.75s;animation-duration:.75s}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--bounceInUp{opacity:1;-khtml-opacity:1;-webkit-animation-name:bounceInUp;animation-name:bounceInUp}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--bounceInDown{opacity:1;-khtml-opacity:1;-webkit-animation-name:bounceInDown;animation-name:bounceInDown}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--bounceInLeft{opacity:1;-khtml-opacity:1;-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--bounceInRight{opacity:1;-khtml-opacity:1;-webkit-animation-name:bounceInRight;animation-name:bounceInRight}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeIn{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeIn;animation-name:fadeIn;-webkit-animation-duration:.3s;animation-duration:.3s}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeInUp{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeInUp;animation-name:fadeInUp}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeInDown{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeInDown;animation-name:fadeInDown}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeInLeft{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeInRight{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeInRight;animation-name:fadeInRight}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeInUpBig{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeInDownBig{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeInLeftBig{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--fadeInRightBig{opacity:1;-khtml-opacity:1;-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--lightSpeedIn{opacity:1;-khtml-opacity:1;-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--newspaperIn{opacity:1;-khtml-opacity:1;-webkit-animation-name:newspaperIn;animation-name:newspaperIn;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-timing-function:ease;animation-timing-function:ease}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--rollIn{opacity:1;-khtml-opacity:1;-webkit-animation-name:rollIn;animation-name:rollIn}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--rotateIn{opacity:1;-khtml-opacity:1;-webkit-animation-name:rotateIn;animation-name:rotateIn}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--rotateInUpLeft{opacity:1;-khtml-opacity:1;-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--rotateInUpRight{opacity:1;-khtml-opacity:1;-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--rotateInDownLeft{opacity:1;-khtml-opacity:1;-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--rotateInDownRight{opacity:1;-khtml-opacity:1;-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--slideInUp{opacity:1;-khtml-opacity:1;-webkit-animation-name:slideInUp;animation-name:slideInUp}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--slideInDown{opacity:1;-khtml-opacity:1;-webkit-animation-name:slideInDown;animation-name:slideInDown}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--slideInLeft{opacity:1;-khtml-opacity:1;-webkit-animation-name:slideInLeft;animation-name:slideInLeft}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--slideInRight{opacity:1;-khtml-opacity:1;-webkit-animation-name:slideInRight;animation-name:slideInRight}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--zoomIn{opacity:1;-khtml-opacity:1;-webkit-animation-name:zoomIn;animation-name:zoomIn}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--zoomInUp{opacity:1;-khtml-opacity:1;-webkit-animation-name:zoomInUp;animation-name:zoomInUp}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--zoomInDown{opacity:1;-khtml-opacity:1;-webkit-animation-name:zoomInDown;animation-name:zoomInDown}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--zoomInLeft{opacity:1;-khtml-opacity:1;-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}.hustle-ui.hustle-inline .hustle-inline-content.hustle-animate-in--zoomInRight{opacity:1;-khtml-opacity:1;-webkit-animation-name:zoomInRight;animation-name:zoomInRight}.hustle-ui.hustle-inline[data-alignment=left] .hustle-inline-content{text-align:left}.hustle-ui.hustle-inline[data-alignment=center] .hustle-inline-content{text-align:center}.hustle-ui.hustle-inline[data-alignment=right] .hustle-inline-content{text-align:right}.hustle-ui.hustle-inline:first-child{margin-top:0}.hustle-ui.hustle-inline:last-child{margin-bottom:0}.hustle-ui.hustle-inline.hustle-show{opacity:1;-khtml-opacity:1}@media (min-width:783px){.hustle-ui.hustle-inline:not(.hustle-size--small):first-child{margin-top:0}}@media (min-width:783px){.hustle-ui.hustle-inline:not(.hustle-size--small):last-child{margin-bottom:0}}@media (min-width:783px){.hustle-ui.hustle-inline:not(.hustle-size--small){margin:20px 0}}.post-inner.thin .entry-content .hustle-ui.hustle-inline{margin-right:auto;margin-left:auto}
|
assets/hustle-ui/js/hustle-ui.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
/*!
|
2 |
-
* WPMU DEV Hustle UI
|
3 |
-
* Copyright 2019 Incsub (https://incsub.com)
|
4 |
-
* Licensed under GPL v3 (http://www.gnu.org/licenses/gpl-3.0.html)
|
5 |
-
*/
|
6 |
-
function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.checkboxGdpr=function(){e(".hustle-ui .hustle-gdpr input").on("change",function(t){var n=e(t.target),i=n.parent();n.is(":checked")?i.removeClass("hustle-field-error"):i.addClass("hustle-field-error")})}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.datepicker=function(t,n,i,o,s,r){var a=e(t);e(".hustle-ui").each(function(){var t=e(this),l=t.find(a);l.datepicker({monthNames:s,monthNamesShort:r,dayNames:n,dayNamesMin:o,dayNamesShort:i,minDate:""!==l.data("min-date")?l.data("min-date"):null,changeMonth:!1,changeYear:!1,dateFormat:""!==l.data("format")?l.data("format"):"yy-mm-dd",isRTL:!0===l.data("rtl-support"),showButtonPanel:!1,beforeShow:function(e,n){n.dpDiv.removeClass(function(e,t){return(t.match(/\bhustle-\S+/g)||[]).join(" ")}),n.dpDiv.removeClass(function(e,t){return(t.match(/\bforminator-\S+/g)||[]).join(" ")}),n.dpDiv.addClass("hustle-calendar"),n.dpDiv.addClass("hustle-module-"+t.data("id")),void 0!==t.data("calendar-palette")&&n.dpDiv.addClass("hustle-palette--"+t.data("calendar-palette"))}})})}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.floatLoad=function(t){var n=e(t),i=n.find(".hustle-float-content");if(n.is(".hustle-float"))return function(){var t,i="";if(600<e(window).width()){if(n.hasClass("hustle-displaying-in-large"))return;i=n.data("desktop-offset"),n.addClass("hustle-displaying-in-large"),n.removeClass("hustle-displaying-in-small")}else{if(n.hasClass("hustle-displaying-in-small"))return;i=n.data("mobiles-offset"),n.addClass("hustle-displaying-in-small"),n.removeClass("hustle-displaying-in-large")}n.removeClass("hustle-show"),"selector"===i?(t=600<e(window).width()?n.data("desktop-selector"):n.data("mobiles-selector")).length&&(t=e(t)).length?(t.css("position","relative"),n.appendTo(t),s()):o():s()}(),this;function o(){n.hide()}function s(){n.css("display",""),n.css("opacity",1),setTimeout(function(){return n.addClass("hustle-show")},0),setTimeout(function(){i.addClass("hustle-animate-in")},200)}}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.inlineClose=function(t,n){var i=e(t),o=(i.find(".hustle-inline-content"),!1);if(i.hasClass("hustle-inline"))return void 0!==n&&!1!==n&&setTimeout(function(){o||(i.find("iframe").each(function(t,n){return e(n).attr("src",e(n).attr("src"))}),i.trigger("hustle:module:hidden",this),i.slideUp(800),setTimeout(function(){i.remove()},800))},n),this}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.inlineLoad=function(t){var n,i,o=e(t),s=o.find(".hustle-inline-content"),r=e(window).height(),a=o.offset().top;if(o.is(".hustle-inline"))return o.css("opacity",1),o.removeClass("hustle-show"),n=o.data("intro"),i="no_animation",""!==n&&(i=n),"no_animation"!==i&&s.addClass("hustle-animate"),r>a?l(200):"no_animation"===o.data("intro")?l(100):e(window).scroll(function(){e(window).scrollTop()+r>=a&&l(100)}),this;function l(e){o.addClass("hustle-show"),setTimeout(function(){var e,t;e=o.data("intro"),t="no_animation",""!==e&&(t=e),"no_animation"!==t&&s.addClass("hustle-animate-in--"+t)},e)}}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.inlineResize=function(t){var n=e(t),i=n.width();if(n.is(".hustle-inline"))return 783<Math.max(document.documentElement.clientWidth,window.innerWidth||0)&&(n.hasClass("hustle-size--small")?500<i&&n.removeClass("hustle-size--small"):500>=i&&n.addClass("hustle-size--small")),this}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.inputFilled=function(){e(".hustle-ui .hustle-input").each(function(t,n){var i=e(n);""===i.val()&&n.validity.valid?i.parent().removeClass("hustle-field-filled"):i.parent().addClass("hustle-field-filled")}),e(".hustle-ui .hustle-input").on("keyup blur change",function(){var t=e(this);""===t.val()&&this.validity.valid?t.parent().removeClass("hustle-field-filled"):t.parent().addClass("hustle-field-filled")})}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.inputRequired=function(){e(".hustle-ui .hustle-input").blur(function(){var t=e(this),n=t.parent();n.hasClass("hustle-field-required")&&(""===t.val()?n.addClass("hustle-field-error"):n.removeClass("hustle-field-error"))})}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.nonSharingSimulation=function(t){var n=e(t);if(n.is(".hustle-ui")){var i=n.find(".hustle-optin"),o=n.find(".hustle-button-submit"),s=n.find(".hustle-button-cta"),r=i.find(".hustle-success"),a=i.find(".hustle-layout").find(".hustle-layout-form"),l=a.find(".hustle-error-message");return a.find(".hustle-error-message").not(":first").remove(),r.hide(),l.hide(),s.length&&s.on("click",function(e){e.preventDefault()}),o.on("click",function(e){var t;e.preventDefault(),e.stopPropagation(),(t=HUI.optinValidate(n)).length?HUI.optinError(l,t):(HUI.optinSubmit(this,1e3),setTimeout(function(){HUI.optinSuccess(r,r.data("close-delay"))},1e3))}),this}}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.optinError=function(t,n){var i=e(t),o=i.closest("form");if(i.is(".hustle-error-message"))return function(t){var n=!0;if(!e.isArray(t)){var s=[];e.each(t,function(e,t){s.push(t)}),t=s}void 0!==t&&t.length&&e.each(t,function(t,s){if(void 0===s||!s)return!0;n?(i.append("<p>"+s+"</p>"),n=!1):e('<div class="hustle-error-message"><p>'+s+"</p></div>").appendTo(o)}),(void 0===t||n)&&i.append("<p>"+i.data("default-error")+"</p>"),i.show()}(n),this}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.optinSubmit=function(t){var n,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=e(t),s=o.closest(".hustle-ui").find(".hustle-optin");if(o.is(".hustle-button-submit")&&s[0]&&s.length)return n=!0===e.isNumeric(i)?i:"1000",!0===e.isNumeric(i)&&(n=i),o.addClass("hustle-button-onload"),!1!==i&&setTimeout(function(){o.removeClass("hustle-button-onload")},n),this}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.optinSuccess=function(t){var n=e(t),i=n.closest(".hustle-ui"),o=i.find(".hustle-layout"),s=n.data("close-delay");if(n.is(".hustle-success"))return r(),this;function r(){if(o.slideUp(800),setTimeout(function(){n.slideDown()},800),s||0===s){var e=null;i.is(".hustle-slidein")?e=HUI.slideinClose:i.is(".hustle-popup")?e=HUI.popupClose:i.is(".hustle-inline")&&(e=HUI.inlineClose),setTimeout(function(){return e(i,0)},s)}}}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.optinValidate=function(t){var n,i,o,s=e(t),r=[],a=s.find(".hustle-layout-form");return n=a.find(".hustle-field"),i=a.find(".hustle-checkbox"),o=a.find(".hustle-error-message"),a.find(".hustle-error-message").not(":first").remove(),n.removeClass("hustle-field-error"),i.removeClass("hustle-field-error"),o.html("").hide(),a.find(".hustle-input").parent().each(function(){var t=e(this);t.hasClass("hustle-field-required")&&(""===t.find("input").val()?(t.addClass("hustle-field-error"),r.push(t.find(".hustle-input").data("required-error"))):t.removeClass("hustle-field-error"))}),function(){var e=a.find(".hustle-gdpr"),t=e.find("input");!e.length||t.is(":checked")?e.removeClass("hustle-field-error"):(e.addClass("hustle-field-error"),r.push(t.data("required-error")))}(),r}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.popupClose=function(t,n){var i=e(t),o=i.find(".hustle-button-close"),s=i.find(".hustle-popup-mask"),r=i.find(".hustle-popup-content"),a=i.find(".hustle-nsa-link"),l=!1;if(o.length&&i.hasClass("hustle-popup"))return e(document).off("keydown.hustle.escKey",c),e(document).on("keydown.hustle.escKey",c),i.on("click",function(){l=!0}),void 0!==n&&!1!==n&&setTimeout(function(){l||(i.trigger("hustle:module:hidden",this),u())},n),o.on("click",function(e){i.trigger("hustle:module:closed",this),u(),e.preventDefault(),e.stopPropagation()}),a.on("click",function(e){e.preventDefault(),i.trigger("hustle:module:clicked_never_see",this),u()}),1===i.data("overlay-close")&&s.on("click",function(e){i.trigger("hustle:module:click_outside",this),u(),e.preventDefault(),e.stopPropagation()}),this;function c(e){27===e.keyCode&&(l=!0,i.trigger("hustle:module:esc_key_pressed",this),u())}function u(){var t,n=i.data("outro"),o=1e3,s="no_animation";""!==n&&(s=n),"no_animation"===s&&(o=0),"fadeOut"===s&&(o=305),"newspaperOut"===s&&(o=505),"bounceOut"===s&&(o=755),i.removeClass("hustle-animation-stopped"),i.find("iframe").each(function(t,n){return e(n).attr("src",e(n).attr("src"))}),function(){var e=i.data("outro");r.addClass("hustle-animate-out--"+e)}(),t=i.data("intro"),r.removeClass("hustle-animate-in--"+t),setTimeout(function(){i.removeClass("hustle-show"),r.removeClass("hustle-animate-out--"+s),e("html").removeClass("hustle-no-scroll")},o)}}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.popupLoad=function(t,n){var i=e(t),o=i.find(".hustle-popup-content");if(i.is(".hustle-popup"))return i.css("opacity",1),i.removeClass("hustle-show"),o.addClass("hustle-animate"),i.addClass("hustle-show"),setTimeout(function(){var e,t;e=i.data("intro"),t=1e3,"no_animation"===e&&(t=0),"bounceIn"!==e&&"bounceInUp"!==e&&"bounceInDown"!==e&&"bounceInLeft"!==e&&"bounceInRight"!==e||(t=755),"fadeIn"===e&&(t=305),"newspaperIn"===e&&(t=505),o.addClass("hustle-animate-in--"+e),setTimeout(function(){i.addClass("hustle-animation-stopped")},t+50)},200),HUI.popupClose(t,n),this}}(jQuery),function(){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.maybeRenderRecaptcha=function(e,t){var n=e.data(),i=n.renderId,o=n.id,s=e.find("#hustle-modal-recaptcha-"+o+"-"+i);if(s.length){var r=s.data(),a=r.sitekey,l=r.version,c=r.theme,u=r.size,d=r.badge,h=s.find(".hustle-recaptcha-badge");if(h.length){var p=s.attr("recaptcha-id");h.remove(),grecaptcha.reset(p)}s.append('<div class="hustle-recaptcha-badge"></div>'),h=s.find(".hustle-recaptcha-badge");var f={sitekey:a,theme:c,size:u,badge:d,"expired-callback":function(){return grecaptcha.reset(s.attr("recaptcha-id"))}};"v2_checkbox"===l?(e.find(".hustle-modal-body button").prop("disabled",!0),f.callback=function(t){e.find('input[name="recaptcha-response"]').val(t),e.find(".hustle-layout-body button").removeProp("disabled")}):f.callback=function(n){e.find('input[name="recaptcha-response"]').val(n),t&&t.doSubmit(s.closest(".hustle-layout-form"))},"undefined"!=typeof grecaptcha&&grecaptcha.ready(function(){var e=grecaptcha.render(h[0],f);s.attr("recaptcha-id",e)})}}}(),function(e){e(jQuery)}(function(e){return function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var n,i,o,s;return t&&t.requirejs||(t?i=t:t={},function(e){var t,s,r,a,l={},c={},u={},d={},h=Object.prototype.hasOwnProperty,p=[].slice,f=/\.js$/;function m(e,t){return h.call(e,t)}function g(e,t){var n,i,o,s,r,a,l,c,d,h,p,m=t&&t.split("/"),g=u.map,v=g&&g["*"]||{};if(e){for(r=(e=e.split("/")).length-1,u.nodeIdCompat&&f.test(e[r])&&(e[r]=e[r].replace(f,"")),"."===e[0].charAt(0)&&m&&(e=m.slice(0,m.length-1).concat(e)),d=0;d<e.length;d++)if("."===(p=e[d]))e.splice(d,1),d-=1;else if(".."===p){if(0===d||1===d&&".."===e[2]||".."===e[d-1])continue;d>0&&(e.splice(d-1,2),d-=2)}e=e.join("/")}if((m||v)&&g){for(d=(n=e.split("/")).length;d>0;d-=1){if(i=n.slice(0,d).join("/"),m)for(h=m.length;h>0;h-=1)if((o=g[m.slice(0,h).join("/")])&&(o=o[i])){s=o,a=d;break}if(s)break;!l&&v&&v[i]&&(l=v[i],c=d)}!s&&l&&(s=l,a=c),s&&(n.splice(0,a,s),e=n.join("/"))}return e}function v(t,n){return function(){var i=p.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),s.apply(e,i.concat([t,n]))}}function y(e){return function(t){l[e]=t}}function w(n){if(m(c,n)){var i=c[n];delete c[n],d[n]=!0,t.apply(e,i)}if(!m(l,n)&&!m(d,n))throw new Error("No "+n);return l[n]}function _(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function b(e){return e?_(e):[]}function $(e){return function(){return u&&u.config&&u.config[e]||{}}}r=function(e,t){var n,i,o=_(e),s=o[0],r=t[1];return e=o[1],s&&(n=w(s=g(s,r))),s?e=n&&n.normalize?n.normalize(e,(i=r,function(e){return g(e,i)})):g(e,r):(s=(o=_(e=g(e,r)))[0],e=o[1],s&&(n=w(s))),{f:s?s+"!"+e:e,n:e,pr:s,p:n}},a={require:function(e){return v(e)},exports:function(e){var t=l[e];return void 0!==t?t:l[e]={}},module:function(e){return{id:e,uri:"",exports:l[e],config:$(e)}}},t=function(t,n,i,o){var s,u,h,p,f,g,_,$=[],C=_typeof(i);if(g=b(o=o||t),"undefined"===C||"function"===C){for(n=!n.length&&i.length?["require","exports","module"]:n,f=0;f<n.length;f+=1)if("require"===(u=(p=r(n[f],g)).f))$[f]=a.require(t);else if("exports"===u)$[f]=a.exports(t),_=!0;else if("module"===u)s=$[f]=a.module(t);else if(m(l,u)||m(c,u)||m(d,u))$[f]=w(u);else{if(!p.p)throw new Error(t+" missing "+u);p.p.load(p.n,v(o,!0),y(u),{}),$[f]=l[u]}h=i?i.apply(l[t],$):void 0,t&&(s&&s.exports!==e&&s.exports!==l[t]?l[t]=s.exports:h===e&&_||(l[t]=h))}else t&&(l[t]=i)},n=i=s=function(n,i,o,l,c){if("string"==typeof n)return a[n]?a[n](i):w(r(n,b(i)).f);if(!n.splice){if((u=n).deps&&s(u.deps,u.callback),!i)return;i.splice?(n=i,i=o,o=null):n=e}return i=i||function(){},"function"==typeof o&&(o=l,l=c),l?t(e,n,i,o):setTimeout(function(){t(e,n,i,o)},4),s},s.config=function(e){return s(e)},n._defined=l,(o=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),m(l,e)||m(c,e)||(c[e]=[e,t,n])}).amd={jQuery:!0}}(),t.requirejs=n,t.require=i,t.define=o),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(e){var t={};function n(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&("constructor"!==i&&n.push(i))}return n}t.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var o in t)n.call(t,o)&&(e[o]=t[o]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},t.Decorate=function(e,t){var i=n(t),o=n(e);function s(){var n=Array.prototype.unshift,i=t.prototype.constructor.length,o=e.prototype.constructor;i>0&&(n.call(arguments,e.prototype.constructor),o=t.prototype.constructor),o.apply(this,arguments)}t.displayName=e.displayName,s.prototype=new function(){this.constructor=s};for(var r=0;r<o.length;r++){var a=o[r];s.prototype[a]=e.prototype[a]}for(var l=function(e){var n=function(){};e in s.prototype&&(n=s.prototype[e]);var i=t.prototype[e];return function(){return Array.prototype.unshift.call(arguments,n),i.apply(this,arguments)}},c=0;c<i.length;c++){var u=i[c];s.prototype[u]=l(u)}return s};var i=function(){this.listeners={}};return i.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},i.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=e,e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},t.Observable=i,t.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},t.bind=function(e,t){return function(){e.apply(t,arguments)}},t._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var o=0;o<n.length;o++){var s=n[o];(s=s.substring(0,1).toLowerCase()+s.substring(1))in i||(i[s]={}),o==n.length-1&&(i[s]=e[t]),i=i[s]}delete e[t]}}return e},t.hasScroll=function(t,n){var i=e(n),o=n.style.overflowX,s=n.style.overflowY;return(o!==s||"hidden"!==s&&"visible"!==s)&&("scroll"===o||"scroll"===s||(i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth))},t.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},t.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var i=e();e.map(n,function(e){i=i.add(e)}),n=i}t.append(n)},t}),t.define("select2/results",["jquery","./utils"],function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),o=this.options.get("translations").get(t.message);i.append(n(o(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],o=this.option(i);t.push(o)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(e,t){t.find(".select2-results").append(e)},n.prototype.sort=function(e){return this.options.get("sorter")(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");t.length>0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var t=this;this.data.current(function(n){var i=e.map(n,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var t=e(this),n=e.data(this,"data"),o=""+n.id;null!=n.element&&n.element.selected||null==n.element&&e.inArray(o,i)>-1?t.attr("aria-selected","true"):t.attr("aria-selected","false")})})},n.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(t){var n=document.createElement("li");n.className="select2-results__option";var i={role:"treeitem","aria-selected":"false"};for(var o in t.disabled&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==t.id&&delete i["aria-selected"],null!=t._resultId&&(n.id=t._resultId),t.title&&(n.title=t.title),t.children&&(i.role="group",i["aria-label"]=t.text,delete i["aria-selected"]),i){var s=i[o];n.setAttribute(o,s)}if(t.children){var r=e(n),a=document.createElement("strong");a.className="select2-results__group";e(a);this.template(t,a);for(var l=[],c=0;c<t.children.length;c++){var u=t.children[c],d=this.option(u);l.push(d)}var h=e("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});h.append(l),r.append(a),r.append(h)}else this.template(t,n);return e.data(n,"data",t),n},n.prototype.bind=function(t,n){var i=this,o=t.id+"-results";this.$results.attr("id",o),t.on("results:all",function(e){i.clear(),i.append(e.data),t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("results:append",function(e){i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("query",function(e){i.hideMessages(),i.showLoading(e)}),t.on("select",function(){t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),t.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=i.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?i.trigger("close",{}):i.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var o=n-1;0===e.length&&(o=0);var s=t.eq(o);s.trigger("mouseenter");var r=i.$results.offset().top,a=s.offset().top,l=i.$results.scrollTop()+(a-r);0===o?i.$results.scrollTop(0):a-r<0&&i.$results.scrollTop(l)}}),t.on("results:next",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var o=t.eq(n);o.trigger("mouseenter");var s=i.$results.offset().top+i.$results.outerHeight(!1),r=o.offset().top+o.outerHeight(!1),a=i.$results.scrollTop()+r-s;0===n?i.$results.scrollTop(0):r>s&&i.$results.scrollTop(a)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){i.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,o=e.deltaY>0&&t-e.deltaY<=0,s=e.deltaY<0&&n<=i.$results.height();o?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):s&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(t){var n=e(this),o=n.data("data");"true"!==n.attr("aria-selected")?i.trigger("select",{originalEvent:t,data:o}):i.options.get("multiple")?i.trigger("unselect",{originalEvent:t,data:o}):i.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(t){var n=e(this).data("data");i.getHighlightedResults().removeClass("select2-results__option--highlighted"),i.trigger("results:focus",{data:n,element:e(this)})})},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,o=this.$results.scrollTop()+(i-n),s=i-n;o-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(o)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),s=i(t,n);null==s?n.style.display="none":"string"==typeof s?n.innerHTML=o(s):e(n).append(s)},n}),t.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),t.define("select2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var t=e('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t,t},i.prototype.bind=function(e,t){var i=this,o=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){i.trigger("focus",e)}),this.$selection.on("blur",function(e){i._handleBlur(e)}),this.$selection.on("keydown",function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){i.update(e.data)}),e.on("open",function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",o),i._attachCloseHandler(e)}),e.on("close",function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.focus(),i._detachCloseHandler(e)}),e.on("enable",function(){i.$selection.attr("tabindex",i._tabindex)}),e.on("disable",function(){i.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(t){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)},1)},i.prototype._attachCloseHandler=function(t){e(document.body).on("mousedown.select2."+t.id,function(t){var n=e(t.target).closest(".select2");e(".select2.select2-container--open").each(function(){var t=e(this);this!=n[0]&&t.data("element").HUIselect2("close")})})},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function o(){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,t),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},o.prototype.bind=function(e,t){var n=this;o.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),e.on("focus",function(t){e.isOpen()||n.$selection.focus()}),e.on("selection:update",function(e){n.update(e.data)})},o.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},o.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},o.prototype.selectionContainer=function(){return e("<span></span>")},o.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},o}),t.define("select2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},i.prototype.bind=function(t,n){var o=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){o.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(t){if(!o.options.get("disabled")){var n=e(this).parent().data("data");o.trigger("unselect",{originalEvent:t,data:n})}})},i.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=0;i<e.length;i++){var o=e[i],s=this.selectionContainer(),r=this.display(o,s);s.append(r),s.prop("title",o.title||o.text),s.data("data",o),t.push(s)}var a=this.$selection.find(".select2-selection__rendered");n.appendMany(a,t)}},i}),t.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(t.length>1||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},t}),t.define("select2/selection/allowClear",["jquery","../keys"],function(e,t){function n(){}return n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},n.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),o=0;o<i.length;o++){var s={data:i[o]};if(this.trigger("unselect",s),s.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},n.prototype._handleKeyboardClear=function(e,n,i){i.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},n.prototype.update=function(t,n){if(t.call(this,n),!(this.$selection.find(".select2-selection__placeholder").length>0||0===n.length)){var i=e('<span class="select2-selection__clear">×</span>');i.data("data",n),this.$selection.find(".select2-selection__rendered").prepend(i)}},n}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=e('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=n,this.$search=n.find("input");var i=t.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(e,t,i){var o=this;e.call(this,t,i),t.on("open",function(){o.$search.trigger("focus")}),t.on("close",function(){o.$search.val(""),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")}),t.on("enable",function(){o.$search.prop("disabled",!1),o._transferTabIndex()}),t.on("disable",function(){o.$search.prop("disabled",!0)}),t.on("focus",function(e){o.$search.trigger("focus")}),t.on("results:focus",function(e){o.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){o.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){o._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===o.$search.val()){var t=o.$searchContainer.prev(".select2-selection__choice");if(t.length>0){var i=t.data("data");o.searchRemoveChoice(i),e.preventDefault()}}});var s=document.documentMode,r=s&&s<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){r?o.$selection.off("input.search input.searchcheck"):o.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(r&&"input"===e.type)o.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&o.handleSearch(e)}})},i.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},i.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").innerWidth():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},i}),t.define("select2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,i){var o=this,s=["open","opening","close","closing","select","selecting","unselect","unselecting"],r=["opening","closing","selecting","unselecting"];t.call(this,n,i),n.on("*",function(t,n){if(-1!==e.inArray(t,s)){n=n||{};var i=e.Event("select2:"+t,{params:n});o.$element.trigger(i),-1!==e.inArray(t,r)&&(n.prevented=i.isDefaultPrevented())}})},t}),t.define("select2/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])},n}),t.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),t.define("select2/data/base",["../utils"],function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var i=t.id+"-result-";return i+=e.generateChars(4),null!=n.id?i+="-"+n.id.toString():i+="-"+e.generateChars(4),i},t}),t.define("select2/data/select",["./base","../utils","jquery"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,e),i.prototype.current=function(e){var t=[],i=this;this.$element.find(":selected").each(function(){var e=n(this),o=i.item(e);t.push(o)}),e(t)},i.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(i){var o=[];(e=[e]).push.apply(e,i);for(var s=0;s<e.length;s++){var r=e[s].id;-1===n.inArray(r,o)&&o.push(r)}t.$element.val(o),t.$element.trigger("change")});else{var i=e.id;this.$element.val(i),this.$element.trigger("change")}},i.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple")){if(e.selected=!1,n(e.element).is("option"))return e.element.selected=!1,void this.$element.trigger("change");this.current(function(i){for(var o=[],s=0;s<i.length;s++){var r=i[s].id;r!==e.id&&-1===n.inArray(r,o)&&o.push(r)}t.$element.val(o),t.$element.trigger("change")})}},i.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},i.prototype.destroy=function(){this.$element.find("*").each(function(){n.removeData(this,"data")})},i.prototype.query=function(e,t){var i=[],o=this;this.$element.children().each(function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var s=o.item(t),r=o.matches(e,s);null!==r&&i.push(r)}}),t({results:i})},i.prototype.addOptions=function(e){t.appendMany(this.$element,e)},i.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var i=n(t),o=this._normalizeItem(e);return o.element=t,n.data(t,"data",o),i},i.prototype.item=function(e){var t={};if(null!=(t=n.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var i=e.children("option"),o=[],s=0;s<i.length;s++){var r=n(i[s]),a=this.item(r);o.push(a)}t.children=o}return(t=this._normalizeItem(t)).element=e[0],n.data(e[0],"data",t),t},i.prototype._normalizeItem=function(e){n.isPlainObject(e)||(e={id:e,text:e});return null!=(e=n.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},{selected:!1,disabled:!1},e)},i.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},i}),t.define("select2/data/array",["./select","../utils","jquery"],function(e,t,n){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return t.Extend(i,e),i.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});0===t.length&&(t=this.option(e),this.addOptions(t)),i.__super__.select.call(this,e)},i.prototype.convertToOptions=function(e){var i=this,o=this.$element.find("option"),s=o.map(function(){return i.item(n(this)).id}).get(),r=[];function a(e){return function(){return n(this).val()==e.id}}for(var l=0;l<e.length;l++){var c=this._normalizeItem(e[l]);if(n.inArray(c.id,s)>=0){var u=o.filter(a(c)),d=this.item(u),h=n.extend(!0,{},c,d),p=this.option(h);u.replaceWith(p)}else{var f=this.option(c);if(c.children){var m=this.convertToOptions(c.children);t.appendMany(f,m)}r.push(f)}}return r},i}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var o=n.ajax(e);return o.then(t),o.fail(i),o}};return n.extend({},t,e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(e,t){var i=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var o=n.extend({type:"GET"},this.ajaxOptions);function s(){var s=o.transport(o,function(o){var s=i.processResults(o,e);i.options.get("debug")&&window.console&&console.error&&(s&&s.results&&n.isArray(s.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(s)},function(){s.status&&"0"===s.status||i.trigger("results:message",{message:"errorLoading"})});i._request=s}"function"==typeof o.url&&(o.url=o.url.call(this.$element,e)),"function"==typeof o.data&&(o.data=o.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(s,this.ajaxOptions.delay)):s()},i}),t.define("select2/data/tags",["jquery"],function(e){function t(t,n,i){var o=i.get("tags"),s=i.get("createTag");void 0!==s&&(this.createTag=s);var r=i.get("insertTag");if(void 0!==r&&(this.insertTag=r),t.call(this,n,i),e.isArray(o))for(var a=0;a<o.length;a++){var l=o[a],c=this._normalizeItem(l),u=this.option(c);this.$element.append(u)}}return t.prototype.query=function(e,t,n){var i=this;this._removeOldTags(),null!=t.term&&null==t.page?e.call(this,t,function e(o,s){for(var r=o.results,a=0;a<r.length;a++){var l=r[a],c=null!=l.children&&!e({results:l.children},!0);if((l.text||"").toUpperCase()===(t.term||"").toUpperCase()||c)return!s&&(o.data=r,void n(o))}if(s)return!0;var u=i.createTag(t);if(null!=u){var d=i.option(u);d.attr("data-select2-tag",!0),i.addOptions([d]),i.insertTag(r,u)}o.results=r,n(o)}):e.call(this,t,n)},t.prototype.createTag=function(t,n){var i=e.trim(n.term);return""===i?null:{id:i,text:i}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||e(this).remove()})},t}),t.define("select2/data/tokenizer",["jquery"],function(e){function t(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(t,n,i){var o=this;n.term=n.term||"";var s=this.tokenizer(n,this.options,function(t){var n=o._normalizeItem(t);if(!o.$element.find("option").filter(function(){return e(this).val()===n.id}).length){var i=o.option(n);i.attr("data-select2-tag",!0),o._removeOldTags(),o.addOptions([i])}!function(e){o.trigger("select",{data:e})}(n)});s.term!==n.term&&(this.$search.length&&(this.$search.val(s.term),this.$search.focus()),n.term=s.term),t.call(this,n,i)},t.prototype.tokenizer=function(t,n,i,o){for(var s=i.get("tokenSeparators")||[],r=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<r.length;){var c=r[a];if(-1!==e.inArray(c,s)){var u=r.substr(0,a),d=l(e.extend({},n,{term:u}));null!=d?(o(d),r=r.substr(a+1)||"",a=0):a++}else a++}return{term:r}},t}),t.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),t.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),t.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){var i=this;this.current(function(o){var s=null!=o?o.length:0;i.maximumSelectionLength>0&&s>=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):e.call(i,t,n)})},e}),t.define("select2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),t.define("select2/dropdown/search",["jquery","../utils"],function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),i=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(t,n,i){var o=this;t.call(this,n,i),this.$search.on("keydown",function(e){o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(t){e(this).off("keyup")}),this.$search.on("keyup input",function(e){o.handleSearch(e)}),n.on("open",function(){o.$search.attr("tabindex",0),o.$search.focus(),window.setTimeout(function(){o.$search.focus()},0)}),n.on("close",function(){o.$search.attr("tabindex",-1),o.$search.val("")}),n.on("focus",function(){n.isOpen()||o.$search.focus()}),n.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(o.showSearch(e)?o.$searchContainer.removeClass("select2-search--hide"):o.$searchContainer.addClass("select2-search--hide"))})},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n}),t.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;i>=0;i--){var o=t[i];this.placeholder.id===o.id&&n.splice(i,1)}return n},e}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,n,i){var o=this;t.call(this,n,i),n.on("query",function(e){o.lastParams=e,o.loading=!0}),n.on("query:append",function(e){o.lastParams=e,o.loading=!0}),this.$results.on("scroll",function(){var t=e.contains(document.documentElement,o.$loadingMore[0]);!o.loading&&t&&(o.$results.offset().top+o.$results.outerHeight(!1)+50>=o.$loadingMore.offset().top+o.$loadingMore.outerHeight(!1)&&o.loadMore())})},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t}),t.define("select2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(t,n,i){this.$dropdownParent=i.get("dropdownParent")||e(document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this,o=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),o||(o=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>"),i=t.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,i){var o=this,s="scroll.select2."+i.id,r="resize.select2."+i.id,a="orientationchange.select2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each(function(){e(this).data("select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),l.on(s,function(t){var n=e(this).data("select2-scroll-position");e(this).scrollTop(n.y)}),e(window).on(s+" "+r+" "+a,function(e){o._positionDropdown(),o._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,i){var o="scroll.select2."+i.id,s="resize.select2."+i.id,r="orientationchange.select2."+i.id;this.$container.parents().filter(t.hasScroll).off(o),e(window).off(o+" "+s+" "+r)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),o=null,s=this.$container.offset();s.bottom=s.top+this.$container.outerHeight(!1);var r={height:this.$container.outerHeight(!1)};r.top=s.top,r.bottom=s.top+r.height;var a=this.$dropdown.outerHeight(!1),l=t.scrollTop(),c=t.scrollTop()+t.height(),u=l<s.top-a,d=c>s.bottom+a,h={left:s.left,top:r.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var f=p.offset();h.top-=f.top,h.left-=f.left,n||i||(o="below"),d||!u||n?!u&&d&&n&&(o="below"):o="above",("above"==o||n&&"below"!==o)&&(h.top=r.top-f.top-a),null!=o&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+o),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+o)),this.$dropdownContainer.css(h)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),t.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var o=t[i];o.children?n+=e(o.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),t.define("select2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var o=i.data("data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},e}),t.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),t.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),t.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"Los resultados no se pudieron cargar."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, borrar "+t+" caracteres";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Por favor, ingresar "+(e.minimum-e.input.length)+" o más caracteres"},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Solo puedes seleccionar "+e.maximum+" items";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),t.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(e,t,n,i,o,s,r,a,l,c,u,d,h,p,f,m,g,v,y,w,_,b,$,C,x,T,k,A,S){function I(){this.reset()}return I.prototype.apply=function(d){if(null==(d=e.extend(!0,{},this.defaults,d)).dataAdapter){if(null!=d.ajax?d.dataAdapter=f:null!=d.data?d.dataAdapter=p:d.dataAdapter=h,d.minimumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,y)),d.maximumSelectionLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,w)),d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,m)),null==d.tokenSeparators&&null==d.tokenizer||(d.dataAdapter=c.Decorate(d.dataAdapter,g)),null!=d.query){var S=t(d.amdBase+"compat/query");d.dataAdapter=c.Decorate(d.dataAdapter,S)}if(null!=d.initSelection){var I=t(d.amdBase+"compat/initSelection");d.dataAdapter=c.Decorate(d.dataAdapter,I)}}if(null==d.resultsAdapter&&(d.resultsAdapter=n,null!=d.ajax&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,C)),null!=d.placeholder&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,$)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,k))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=_;else{var H=c.Decorate(_,b);d.dropdownAdapter=H}if(0!==d.minimumResultsForSearch&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,T)),d.closeOnSelect&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,A)),null!=d.dropdownCssClass||null!=d.dropdownCss||null!=d.adaptDropdownCssClass){var D=t(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=c.Decorate(d.dropdownAdapter,D)}d.dropdownAdapter=c.Decorate(d.dropdownAdapter,x)}if(null==d.selectionAdapter){if(d.multiple?d.selectionAdapter=o:d.selectionAdapter=i,null!=d.placeholder&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,s)),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,r)),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,a)),null!=d.containerCssClass||null!=d.containerCss||null!=d.adaptContainerCssClass){var E=t(d.amdBase+"compat/containerCss");d.selectionAdapter=c.Decorate(d.selectionAdapter,E)}d.selectionAdapter=c.Decorate(d.selectionAdapter,l)}if("string"==typeof d.language)if(d.language.indexOf("-")>0){var O=d.language.split("-")[0];d.language=[d.language,O]}else d.language=[d.language];if(e.isArray(d.language)){var U=new u;d.language.push("en");for(var j=d.language,P=0;P<j.length;P++){var q=j[P],L={};try{L=u.loadPath(q)}catch(e){try{q=this.defaults.amdLanguageBase+q,L=u.loadPath(q)}catch(e){d.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+q+'" could not be automatically loaded. A fallback will be used instead.');continue}}U.extend(L)}d.translations=U}else{var M=u.loadPath(this.defaults.amdLanguageBase+"en"),R=new u(d.language);R.extend(M),d.translations=R}return d},I.prototype.reset=function(){function t(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return d[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:S,matcher:function n(i,o){if(""===e.trim(i.term))return o;if(o.children&&o.children.length>0){for(var s=e.extend(!0,{},o),r=o.children.length-1;r>=0;r--)null==n(i,o.children[r])&&s.children.splice(r,1);return s.children.length>0?s:n(i,s)}var a=t(o.text).toUpperCase(),l=t(i.term).toUpperCase();return a.indexOf(l)>-1?o:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},I.prototype.set=function(t,n){var i={};i[e.camelCase(t)]=n;var o=c._convertData(i);e.extend(this.defaults,o)},new I}),t.define("select2/options",["require","jquery","./defaults","./utils"],function(e,t,n,i){function o(t,o){if(this.options=t,null!=o&&this.fromElement(o),this.options=n.apply(this.options),o&&o.is("input")){var s=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,s)}}return o.prototype.fromElement=function(e){var n=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),e.data("data",e.data("select2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var o={};o=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,e.data()):e.data();var s=t.extend(!0,{},o);for(var r in s=i._convertData(s))t.inArray(r,n)>-1||(t.isPlainObject(this.options[r])?t.extend(this.options[r],s[r]):this.options[r]=s[r]);return this},o.prototype.get=function(e){return this.options[e]},o.prototype.set=function(e,t){this.options[e]=t},o}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(e,t,n,i){var o=function e(n,i){null!=n.data("select2")&&n.data("select2").destroy(),this.$element=n,this.id=this._generateId(n),i=i||{},this.options=new t(i,n),e.__super__.constructor.call(this);var o=n.attr("tabindex")||0;n.data("old-tabindex",o),n.attr("tabindex","-1");var s=this.options.get("dataAdapter");this.dataAdapter=new s(n,this.options);var r=this.render();this._placeContainer(r);var a=this.options.get("selectionAdapter");this.selection=new a(n,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var l=this.options.get("dropdownAdapter");this.dropdown=new l(n,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);var c=this.options.get("resultsAdapter");this.results=new c(n,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var u=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){u.trigger("selection:update",{data:e})}),n.addClass("select2-hidden-accessible"),n.attr("aria-hidden","true"),this._syncAttributes(),n.data("select2",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var o=e.outerWidth(!1);return o<=0?"auto":o+"px"}if("style"==t){var s=e.attr("style");if("string"!=typeof s)return null;for(var r=s.split(";"),a=0,l=r.length;a<l;a+=1){var c=r[a].replace(/\s/g,"").match(n);if(null!==c&&c.length>=1)return c[1]}return null}return t},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=i?(this._observer=new i(function(n){e.each(n,t._syncA),e.each(n,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},o.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",function(){t.toggleDropdown()}),this.selection.on("focus",function(e){t.focus(e)}),this.selection.on("*",function(i,o){-1===e.inArray(i,n)&&t.trigger(i,o)})},o.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("select2-container--open")}),this.on("close",function(){e.$container.removeClass("select2-container--open")}),this.on("enable",function(){e.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("select2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("select2-container--focus")}),this.on("query",function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}),this.on("keypress",function(t){var n=t.which;e.isOpen()?n===i.ESC||n===i.TAB||n===i.UP&&t.altKey?(e.close(),t.preventDefault()):n===i.ENTER?(e.trigger("results:select",{}),t.preventDefault()):n===i.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===i.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===i.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&t.altKey)&&(e.open(),t.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._syncSubtree=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&t.addedNodes.length>0)for(var o=0;o<t.addedNodes.length;o++){t.addedNodes[o].selected&&(n=!0)}else t.removedNodes&&t.removedNodes.length>0&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})}},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var s=i[e],r={prevented:!1,name:e,args:t};if(n.call(this,s,r),r.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.trigger("query",{})},o.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},o.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},o.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(t){e=t}),e},o.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,function(e){return e.toString()})),this.$element.val(n).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),t.data("element",this.$element),t},o}),t.define("select2/compat/utils",["jquery"],function(e){return{syncCssClasses:function(t,n,i){var o,s,r=[];(o=e.trim(t.attr("class")))&&e((o=""+o).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&r.push(this)}),(o=e.trim(n.attr("class")))&&e((o=""+o).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(s=i(this))&&r.push(s)}),t.attr("class",r.join(" "))}}}),t.define("select2/compat/containerCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var o=i.call(this),s=this.options.get("containerCssClass")||"";e.isFunction(s)&&(s=s(this.$element));var r=this.options.get("adaptContainerCssClass");if(r=r||n,-1!==s.indexOf(":all:")){s=s.replace(":all:","");var a=r;r=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("containerCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(o,this.$element,r),o.css(l),o.addClass(s),o},i}),t.define("select2/compat/dropdownCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var o=i.call(this),s=this.options.get("dropdownCssClass")||"";e.isFunction(s)&&(s=s(this.$element));var r=this.options.get("adaptDropdownCssClass");if(r=r||n,-1!==s.indexOf(":all:")){s=s.replace(":all:","");var a=r;r=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("dropdownCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(o,this.$element,r),o.css(l),o.addClass(s),o},i}),t.define("select2/compat/initSelection",["jquery"],function(e){function t(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return t.prototype.current=function(t,n){var i=this;this._isInitialized?t.call(this,n):this.initSelection.call(null,this.$element,function(t){i._isInitialized=!0,e.isArray(t)||(t=[t]),n(t)})},t}),t.define("select2/compat/inputData",["jquery"],function(e){function t(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),e.call(this,t,n)}return t.prototype.current=function(t,n){function i(t,n){var o=[];return t.selected||-1!==e.inArray(t.id,n)?(t.selected=!0,o.push(t)):t.selected=!1,t.children&&o.push.apply(o,i(t.children,n)),o}for(var o=[],s=0;s<this._currentData.length;s++){var r=this._currentData[s];o.push.apply(o,i(r,this.$element.val().split(this._valueSeparator)))}n(o)},t.prototype.select=function(t,n){if(this.options.get("multiple")){var i=this.$element.val();i+=this._valueSeparator+n.id,this.$element.val(i),this.$element.trigger("change")}else this.current(function(t){e.map(t,function(e){e.selected=!1})}),this.$element.val(n.id),this.$element.trigger("change")},t.prototype.unselect=function(e,t){var n=this;t.selected=!1,this.current(function(e){for(var i=[],o=0;o<e.length;o++){var s=e[o];t.id!=s.id&&i.push(s.id)}n.$element.val(i.join(n._valueSeparator)),n.$element.trigger("change")})},t.prototype.query=function(e,t,n){for(var i=[],o=0;o<this._currentData.length;o++){var s=this._currentData[o],r=this.matches(t,s);null!==r&&i.push(r)}n({results:i})},t.prototype.addOptions=function(t,n){var i=e.map(n,function(t){return e.data(t[0],"data")});this._currentData.push.apply(this._currentData,i)},t}),t.define("select2/compat/matcher",["jquery"],function(e){return function(t){return function(n,i){var o=e.extend(!0,{},i);if(null==n.term||""===e.trim(n.term))return o;if(i.children){for(var s=i.children.length-1;s>=0;s--){var r=i.children[s];t(n.term,r.text,r)||o.children.splice(s,1)}if(o.children.length>0)return o}return t(n.term,i.text,i)?o:null}}}),t.define("select2/compat/query",[],function(){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.callback=n,this.options.get("query").call(null,t)},e}),t.define("select2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}return e.prototype.position=function(e,t,n){n.find(".dropdown-wrapper").append(t),t.addClass("select2-dropdown--below"),n.addClass("select2-container--below")},e}),t.define("select2/dropdown/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),t.define("select2/selection/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),s=function(e){var t,n,i=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],s=Array.prototype.slice;if(e.event.fixHooks)for(var r=i.length;r;)e.event.fixHooks[i[--r]]=e.event.mouseHooks;var a=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=o.length;t;)this.addEventListener(o[--t],l,!1);else this.onmousewheel=l;e.data(this,"mousewheel-line-height",a.getLineHeight(this)),e.data(this,"mousewheel-page-height",a.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=o.length;t;)this.removeEventListener(o[--t],l,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),i=n["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function l(i){var o,r=i||window.event,l=s.call(arguments,1),d=0,h=0,p=0,f=0,m=0;if((i=e.event.fix(r)).type="mousewheel","detail"in r&&(p=-1*r.detail),"wheelDelta"in r&&(p=r.wheelDelta),"wheelDeltaY"in r&&(p=r.wheelDeltaY),"wheelDeltaX"in r&&(h=-1*r.wheelDeltaX),"axis"in r&&r.axis===r.HORIZONTAL_AXIS&&(h=-1*p,p=0),d=0===p?h:p,"deltaY"in r&&(d=p=-1*r.deltaY),"deltaX"in r&&(h=r.deltaX,0===p&&(d=-1*h)),0!==p||0!==h){if(1===r.deltaMode){var g=e.data(this,"mousewheel-line-height");d*=g,p*=g,h*=g}else if(2===r.deltaMode){var v=e.data(this,"mousewheel-page-height");d*=v,p*=v,h*=v}if(o=Math.max(Math.abs(p),Math.abs(h)),(!n||o<n)&&(n=o,u(r,o)&&(n/=40)),u(r,o)&&(d/=40,h/=40,p/=40),d=Math[d>=1?"floor":"ceil"](d/n),h=Math[h>=1?"floor":"ceil"](h/n),p=Math[p>=1?"floor":"ceil"](p/n),a.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=i.clientX-y.left,m=i.clientY-y.top}return i.deltaX=h,i.deltaY=p,i.deltaFactor=n,i.offsetX=f,i.offsetY=m,i.deltaMode=0,l.unshift(i,d,h,p),t&&clearTimeout(t),t=setTimeout(c,200),(e.event.dispatch||e.event.handle).apply(this,l)}}function c(){n=null}function u(e,t){return a.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},"function"==typeof t.define&&t.define.amd?t.define("jquery-mousewheel",["jquery"],s):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=s:s(e),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(e,t,n,i){if(null==e.fn.select2){var o=["open","close","destroy"];e.fn.select2=function(t){if("object"===_typeof(t=t||{}))return this.each(function(){var i=e.extend(!0,{},t);new n(e(this),i)}),this;if("string"==typeof t){var i,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=e(this).data("select2");null==n&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),i=n[t].apply(n,s)}),e.inArray(t,o)>-1?this:i}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=i),n}),t.define("hui.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(e,t,n,i){if(null==e.fn.HUIselect2){var o=["open","close","destroy"];e.fn.HUIselect2=function(t){if("object"===_typeof(t=t||{}))return this.each(function(){var i=e.extend(!0,{},t);new n(e(this),i)}),this;if("string"==typeof t){var i,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=e(this).data("select2");null==n&&window.console&&console.error&&console.error("The HUISelect2('"+t+"') method was called on an element that is not using Select2."),i=n[t].apply(n,s)}),e.inArray(t,o)>-1?this:i}throw new Error("Invalid arguments for HUISelect2: "+t)}}return null==e.fn.HUIselect2.defaults&&(e.fn.HUIselect2.defaults=i),n}),{define:t.define,require:t.require}}().require("hui.select2")}),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.select2=function(){e(".hustle-ui").each(function(){var t=e(this),n=t.data("id"),i=t.find(".hustle-select2");i.HUIselect2({dir:!0===i.data("rtl-support")?"rtl":"ltr",language:""!==i.data("language")?i.data("language"):"en",placeholder:""!==i.data("placeholder")?i.data("placeholder"):null,dropdownCssClass:"hustle-module-"+n+" hustle-dropdown",minimumResultsForSearch:1/0})})}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.sharingSimulation=function(t){var n=e(t);if(n.is(".hustle-ui"))return n.hide(),this}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.slideinClose=function(t,n){var i=e(t),o=i.find(".hustle-button-close"),s=i.find(".hustle-slidein-content"),r=i.find(".hustle-nsa-link"),a=!1;if(o.length&&i.hasClass("hustle-slidein"))return e(document).off("keydown.hustle.escKey",l),e(document).on("keydown.hustle.escKey",l),i.on("click",function(){a=!0}),void 0!==n&&!1!==n&&setTimeout(function(){a||(i.trigger("hustle:module:hidden",this),c())},n),o.on("click",function(e){i.trigger("hustle:module:closed",this),c()}),r.on("click",function(e){e.preventDefault(),i.trigger("hustle:module:clicked_never_see",this),c()}),this;function l(e){27===e.keyCode&&(a=!0,i.trigger("hustle:module:esc_key_pressed",this),c())}function c(){s.addClass("hustle-animate-out"),s.removeClass("hustle-animate-in"),i.find("iframe").each(function(t,n){return e(n).attr("src",e(n).attr("src"))}),setTimeout(function(){i.removeClass("hustle-show"),s.removeClass("hustle-animate-out")},1e3)}}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.slideinLayouts=function(t){var n=e(t),i=n.find(".hustle-slidein-content > div"),o=n.find(".hustle-layout-header"),s=n.find(".hustle-layout-footer");if(n.length&&n.hasClass("hustle-slidein")&&(i.hasClass("hustle-info")&&(s=n.find(".hustle-nsa-link")),s.length))return i.hasClass("hustle-info--stacked")?(n.css({"padding-top":r()+"px"}),i.css({"max-height":"calc(100vh - "+(a()+r())+"px)"}),o.css({top:"-"+r()+"px"})):i.css({"max-height":"calc(100vh - "+(a()+30)+"px)"}),n.css({"padding-bottom":a()+"px"}),s.css({bottom:"-"+a()+"px"}),this;function r(){return o.outerHeight(!0)}function a(){return s.outerHeight(!0)}}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.slideinLoad=function(t,n){var i,o,s,r=e(t),a=r.find(".hustle-slidein-content");if(r.is(".hustle-slidein"))return r.css("opacity",1),r.removeClass("hustle-show"),i=r.data("position"),o="",s="",-1!==i.charAt(0).indexOf("n")&&(o="north"),-1!==i.charAt(0).indexOf("s")&&(o="south"),-1!==i.charAt(0).indexOf("e")&&(o="east"),-1!==i.charAt(0).indexOf("w")&&(o="west"),-1!==i.charAt(1).indexOf("n")&&(s="north"),-1!==i.charAt(1).indexOf("s")&&(s="south"),-1!==i.charAt(1).indexOf("e")&&(s="east"),-1!==i.charAt(1).indexOf("w")&&(s="west"),1===i.length?r.addClass("hustle-slidein-position--"+o):r.addClass("hustle-slidein-position--"+o+"-"+s),setTimeout(function(){jQuery(window).trigger("resize"),r.addClass("hustle-show")},800),setTimeout(function(){a.addClass("hustle-animate-in")},1e3),HUI.slideinClose(t,n),this}}(jQuery),function(e){"object"===("undefined"==typeof module?"undefined":_typeof(module))&&"object"===_typeof(module.exports)?e(require("jquery"),window,document):"undefined"!=typeof jQuery&&e(jQuery,window,document)}(function(e,t,n,i){!function(){function i(e,t,n){return new Array(n+1-e.length).join(t)+e}function o(){if(1===arguments.length){var t=arguments[0];return"string"==typeof t&&(t=e.fn.timepicker.parseTime(t)),new Date(0,0,0,t.getHours(),t.getMinutes(),t.getSeconds())}return 3===arguments.length?new Date(0,0,0,arguments[0],arguments[1],arguments[2]):2===arguments.length?new Date(0,0,0,arguments[0],arguments[1],0):new Date(0,0,0)}var s,r;e.TimePicker=function(){var t=this;t.container=e(".hustle-timepicker"),t.ui=t.container.find(".ui-timepicker"),t.viewport=t.ui.find(".ui-timepicker-viewport"),0===t.container.length&&(t.container=e("<div></div>").addClass("hustle-timepicker").appendTo("body").removeClass("hustle-show"),t.ui=e("<div></div>").addClass("ui-timepicker").addClass("ui-widget ui-widget-content ui-menu").appendTo(t.container),t.viewport=e("<ul></ul>").addClass("ui-timepicker-viewport").appendTo(t.ui),e.fn.jquery>="1.4.2"&&t.ui.delegate("a","mouseenter.timepicker",function(){t.activate(!1,e(this).parent())}).delegate("a","mouseleave.timepicker",function(){t.deactivate(!1)}).delegate("a","click.timepicker",function(n){n.preventDefault(),t.select(!1,e(this).parent())}))},e.TimePicker.count=0,e.TimePicker.instance=function(){return e.TimePicker._instance=new e.TimePicker,e.TimePicker._instance},e.TimePicker.prototype={keyCode:{ALT:18,BLOQ_MAYUS:20,CTRL:17,DOWN:40,END:35,ENTER:13,HOME:36,LEFT:37,NUMPAD_ENTER:108,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,SHIFT:16,TAB:9,UP:38},_items:function(t,n){var i,s,r=e("<ul></ul>"),a=null;for(-1===t.options.timeFormat.indexOf("m")&&t.options.interval%60!=0&&(t.options.interval=60*Math.max(Math.round(t.options.interval/60),1)),i=n?o(n):t.options.startTime?o(t.options.startTime):o(t.options.startHour,t.options.startMinutes),s=new Date(i.getTime()+864e5);i<s;)this._isValidTime(t,i)&&(a=e("<li>").addClass("ui-menu-item").appendTo(r),e("<a>").text(e.fn.timepicker.formatTime(t.options.timeFormat,i)).appendTo(a),a.data("time-value",i)),i=new Date(i.getTime()+60*t.options.interval*1e3);return r.children()},_isValidTime:function(e,t){var n=null,i=null;return t=o(t),null!==e.options.minTime?n=o(e.options.minTime):null===e.options.minHour&&null===e.options.minMinutes||(n=o(e.options.minHour,e.options.minMinutes)),null!==e.options.maxTime?i=o(e.options.maxTime):null===e.options.maxHour&&null===e.options.maxMinutes||(i=o(e.options.maxHour,e.options.maxMinutes)),null!==n&&null!==i?t>=n&&t<=i:null!==n?t>=n:null===i||t<=i},_hasScroll:function(){var e=void 0!==this.ui.prop?"prop":"attr";return this.ui.height()<this.ui[e]("scrollHeight")},_move:function(e,t,n){if(this.closed()&&this.open(e),this.active){var i=this.active[t+"All"](".ui-menu-item").eq(0);i.length?this.activate(e,i):this.activate(e,this.viewport.children(n))}else this.activate(e,this.viewport.children(n))},register:function(t,n){var i=this,o={};o.element=e(t),o.element.data("TimePicker")||(o.options=e.metadata?e.extend({},n,o.element.metadata()):e.extend({},n),o.widget=i,e.extend(o,{next:function(){return i.next(o)},previous:function(){return i.previous(o)},first:function(){return i.first(o)},last:function(){return i.last(o)},selected:function(){return i.selected(o)},open:function(){return i.open(o)},close:function(){return i.close(o)},closed:function(){return i.closed(o)},destroy:function(){return i.destroy(o)},parse:function(e){return i.parse(o,e)},format:function(e,t){return i.format(o,e,t)},getTime:function(){return i.getTime(o)},setTime:function(e,t){return i.setTime(o,e,t)},option:function(e,t){return i.option(o,e,t)}}),i._setDefaultTime(o),i._addInputEventsHandlers(o),o.element.data("TimePicker",o))},_setDefaultTime:function(t){"now"===t.options.defaultTime?t.setTime(o(new Date)):t.options.defaultTime&&t.options.defaultTime.getFullYear?t.setTime(o(t.options.defaultTime)):t.options.defaultTime&&t.setTime(e.fn.timepicker.parseTime(t.options.defaultTime))},_addInputEventsHandlers:function(t){var n=this;t.element.bind("keydown.timepicker",function(e){switch(e.which||e.keyCode){case n.keyCode.ENTER:case n.keyCode.NUMPAD_ENTER:e.preventDefault(),n.closed()?t.element.trigger("change.timepicker"):n.select(t,n.active);break;case n.keyCode.UP:t.previous();break;case n.keyCode.DOWN:t.next();break;default:n.closed()||t.close(!0)}}).bind("focus.timepicker",function(){t.open()}).bind("blur.timepicker",function(){setTimeout(function(){t.element.data("timepicker-user-clicked-outside")&&t.close()})}).bind("change.timepicker",function(){t.closed()&&t.setTime(e.fn.timepicker.parseTime(t.element.val()))})},select:function(t,n){var i=!1===t?this.instance:t;this.setTime(i,e.fn.timepicker.parseTime(n.children("a").text())),this.close(i,!0)},activate:function(e,t){if((!1===e?this.instance:e)===this.instance&&(this.deactivate(),this._hasScroll())){var n=t.offset().top-this.ui.offset().top,i=this.ui.scrollTop(),o=this.ui.height();n<0?this.ui.scrollTop(i+n):n>=o&&this.ui.scrollTop(i+n-o+t.height())}},deactivate:function(){this.active&&(this.active=null)},next:function(e){return(this.closed()||this.instance===e)&&this._move(e,"next",".ui-menu-item:first"),e.element},previous:function(e){return(this.closed()||this.instance===e)&&this._move(e,"prev",".ui-menu-item:last"),e.element},first:function(e){return this.instance===e&&(this.active&&0===this.active.prevAll(".ui-menu-item").length)},last:function(e){return this.instance===e&&(this.active&&0===this.active.nextAll(".ui-menu-item").length)},selected:function(e){return this.instance===e&&this.active?this.active:null},open:function(i){var o=this,s=i.getTime(),r=i.options.dynamic&&s;if(!i.options.dropdown||i.options.hideDropdown)return i.element;i.element.data("timepicker-event-namespace",Math.random()),i.element.closest(".sui-form-field").length?i.element.closest(".sui-form-field").append(o.container):o.container.insertAfter(i.element.closest(".hustle-layout")),e(n).bind("click.timepicker-"+i.element.data("timepicker-event-namespace"),function(e){i.element.get(0)===e.target?i.element.data("timepicker-user-clicked-outside",!1):i.element.data("timepicker-user-clicked-outside",!0).blur()}),(i.rebuild||!i.items||r)&&(i.items=o._items(i,r?s:null)),(i.rebuild||o.instance!==i||r)&&(e.fn.jquery<"1.4.2"?(o.viewport.children().remove(),o.viewport.append(i.items),o.viewport.find("a").bind("mouseover.timepicker",function(){o.activate(i,e(this).parent())}).bind("mouseout.timepicker",function(){o.deactivate(i)}).bind("click.timepicker",function(t){t.preventDefault(),o.select(i,e(this).parent())})):(o.viewport.children().detach(),o.viewport.append(i.items))),i.rebuild=!1,o.container.removeClass("ui-timepicker-standard ui-timepicker-corners"),o.container.addClass("hustle-show"),o.container.hasClass("ui-timepicker-no-scrollbar")||i.options.scrollbar||(o.container.addClass("ui-timepicker-no-scrollbar"),o.viewport.css({paddingRight:40}));o.container.outerHeight(),o.container.height(),i.options.zindex?i.options.zindex:i.element.offsetParent().css("z-index");var a=i.element.closest(".hustle-field"),l=a.position();viewHeight=Math.max(n.documentElement.clientHeight,t.innerHeight||0),o.container.css({top:l.top+i.element.outerHeight(),left:l.left}),o.container.addClass("hustle-show"),l=a.position(),o.container.css({width:i.element.outerWidth(),position:"absolute",zIndex:999999,left:l.left});var c=a.offset().top-e(n).scrollTop();return viewHeight-c<200&&o.container.css({top:l.top-o.container.outerHeight()}),o.instance=i,s?i.items.each(function(){var t=e(this);return(e.fn.jquery<"1.4.2"?e.fn.timepicker.parseTime(t.find("a").text()):t.data("time-value")).getTime()!==s.getTime()||(o.activate(i,t),!1)}):o.deactivate(i),i.element},close:function(t){return this.instance===t&&(this.container.removeClass("hustle-show"),this.ui.scrollTop(0)),e(n).unbind("click.timepicker-"+t.element.data("timepicker-event-namespace")),t.element},closed:function(){return this.ui.is(":hidden")},destroy:function(e){return this.close(e,!0),e.element.unbind(".timepicker").data("TimePicker",null)},parse:function(t,n){return e.fn.timepicker.parseTime(n)},format:function(t,n,i){return i=i||t.options.timeFormat,e.fn.timepicker.formatTime(i,n)},getTime:function(t){var n=e.fn.timepicker.parseTime(t.element.val());return n instanceof Date&&!this._isValidTime(t,n)?null:n instanceof Date&&t.selectedTime?t.format(n)===t.format(t.selectedTime)?t.selectedTime:n:n instanceof Date?n:null},setTime:function(t,n,i){var s=t.selectedTime;if("string"==typeof n&&(n=t.parse(n)),n&&n.getMinutes&&this._isValidTime(t,n)){if(n=o(n),t.selectedTime=n,t.element.val(t.format(n,t.options.timeFormat)),i)return t}else t.selectedTime=null;return null===s&&null===t.selectedTime||(t.element.trigger("time-change",[n]),e.isFunction(t.options.change)&&t.options.change.apply(t.element,[n])),t.element},option:function(t,n,i){if(void 0===i)return t.options[n];var o,s,r=t.getTime();"string"==typeof n?(o={})[n]=i:o=n,s=["minHour","minMinutes","minTime","maxHour","maxMinutes","maxTime","startHour","startMinutes","startTime","timeFormat","interval","dropdown"],e.each(o,function(n){t.options[n]=o[n],t.rebuild=t.rebuild||e.inArray(n,s)>-1}),t.rebuild&&t.setTime(r)}},e.TimePicker.defaults={timeFormat:"hh:mm p",minHour:null,minMinutes:null,minTime:null,maxHour:null,maxMinutes:null,maxTime:null,startHour:null,startMinutes:null,startTime:null,interval:30,dynamic:!0,theme:null,zindex:null,dropdown:!0,scrollbar:!1,change:function(){}},e.TimePicker.methods={chainable:["next","previous","open","close","destroy","setTime"]},e.fn.timepicker=function(t){if("string"==typeof t){var n,i,o=Array.prototype.slice.call(arguments,1);return i=this[n="option"===t&&arguments.length>2?"each":-1!==e.inArray(t,e.TimePicker.methods.chainable)?"each":"map"](function(){var n=e(this).data("TimePicker");if("object"===_typeof(n))return n[t].apply(n,o)}),"map"===n&&1===this.length?e.makeArray(i).shift():"map"===n?e.makeArray(i):i}if(1===this.length&&this.data("TimePicker"))return this.data("TimePicker");var s=e.extend({},e.TimePicker.defaults,t);return this.each(function(){e.TimePicker.instance().register(this,s)})},e.fn.timepicker.formatTime=function(e,t){var n=t.getHours(),o=n%12,s=t.getMinutes(),r=t.getSeconds(),a={hh:i((0===o?12:o).toString(),"0",2),HH:i(n.toString(),"0",2),mm:i(s.toString(),"0",2),ss:i(r.toString(),"0",2),h:0===o?12:o,H:n,m:s,s:r,p:n>11?"PM":"AM"},l=e,c="";for(c in a)a.hasOwnProperty(c)&&(l=l.replace(new RegExp(c,"g"),a[c]));return l=l.replace(new RegExp("a","g"),n>11?"pm":"am")},e.fn.timepicker.parseTime=(r=(s=[[/^(\d+)$/,"$1"],[/^:(\d)$/,"$10"],[/^:(\d+)/,"$1"],[/^(\d):([7-9])$/,"0$10$2"],[/^(\d):(\d\d)$/,"$1$2"],[/^(\d):(\d{1,})$/,"0$1$20"],[/^(\d\d):([7-9])$/,"$10$2"],[/^(\d\d):(\d)$/,"$1$20"],[/^(\d\d):(\d*)$/,"$1$2"],[/^(\d{3,}):(\d)$/,"$10$2"],[/^(\d{3,}):(\d{2,})/,"$1$2"],[/^(\d):(\d):(\d)$/,"0$10$20$3"],[/^(\d{1,2}):(\d):(\d\d)/,"$10$2$3"]]).length,function(t){var n,i,a=o(new Date),l=!1,c=!1,u=!1;if(void 0===t||!t.toLowerCase)return null;t=t.toLowerCase(),i=!(n=/a/.test(t))&&/p/.test(t),t=t.replace(/[^0-9:]/g,"").replace(/:+/g,":");for(var d=0;d<r;d+=1)if(s[d][0].test(t)){t=t.replace(s[d][0],s[d][1]);break}return 1===(t=t.replace(/:/g,"")).length?l=t:2===t.length?l=t:3===t.length||5===t.length?(l=t.substr(0,1),c=t.substr(1,2),u=t.substr(3,2)):(4===t.length||t.length>5)&&(l=t.substr(0,2),c=t.substr(2,2),u=t.substr(4,2)),t.length>0&&t.length<5&&(t.length<3&&(c=0),u=0),!1!==l&&!1!==c&&!1!==u&&(l=parseInt(l,10),c=parseInt(c,10),u=parseInt(u,10),n&&12===l?l=0:i&&l<12&&(l+=12),l>24?t.length>=6?e.fn.timepicker.parseTime(t.substr(0,5)):e.fn.timepicker.parseTime(t+"0"+(n?"a":"")+(i?"p":"")):(a.setHours(l,c,u),a))})}()}),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.timepicker=function(t){var n=e(t);e(".hustle-ui").each(function(){var t=e(this),i=(t.data("id"),t.find(n));i.timepicker({timeFormat:""!==i.data("time-format")?i.data("time-format"):"h:mm p",interval:""!==i.data("time-interval")?i.data("time-interval"):60,minTime:"0",maxTime:"11:59pm",defaultTime:""!==i.data("time-default")?i.data("time-default"):null,startTime:"00:00",dynamic:!1,dropdown:!0===i.data("time-dropdown"),hideDropdown:!0===i.data("hide-dropdown"),scrollbar:!0===i.data("time-dropdown")})})}}(jQuery);
|
1 |
+
/*!
|
2 |
+
* WPMU DEV Hustle UI
|
3 |
+
* Copyright 2019 Incsub (https://incsub.com)
|
4 |
+
* Licensed under GPL v3 (http://www.gnu.org/licenses/gpl-3.0.html)
|
5 |
+
*/
|
6 |
+
function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.checkboxGdpr=function(){e(".hustle-ui .hustle-gdpr input").on("change",function(t){var n=e(t.target),i=n.parent();n.is(":checked")?i.removeClass("hustle-field-error"):i.addClass("hustle-field-error")})}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.datepicker=function(t,n,i,o,s,r){var a=e(t);e(".hustle-ui").each(function(){var t=e(this),l=t.find(a);l.datepicker({monthNames:s,monthNamesShort:r,dayNames:n,dayNamesMin:o,dayNamesShort:i,minDate:""!==l.data("min-date")?l.data("min-date"):null,changeMonth:!1,changeYear:!1,dateFormat:""!==l.data("format")?l.data("format"):"yy-mm-dd",isRTL:!0===l.data("rtl-support"),showButtonPanel:!1,beforeShow:function(e,n){n.dpDiv.removeClass(function(e,t){return(t.match(/\bhustle-\S+/g)||[]).join(" ")}),n.dpDiv.removeClass(function(e,t){return(t.match(/\bforminator-\S+/g)||[]).join(" ")}),n.dpDiv.addClass("hustle-calendar"),n.dpDiv.addClass("hustle-module-"+t.data("id")),void 0!==t.data("calendar-palette")&&n.dpDiv.addClass("hustle-palette--"+t.data("calendar-palette"))}})})}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.floatLoad=function(t){var n=e(t),i=n.find(".hustle-float-content");if(n.is(".hustle-float"))return function(){var t,i="";if(600<e(window).width()){if(n.hasClass("hustle-displaying-in-large"))return;i=n.data("desktop-offset"),n.addClass("hustle-displaying-in-large"),n.removeClass("hustle-displaying-in-small")}else{if(n.hasClass("hustle-displaying-in-small"))return;i=n.data("mobiles-offset"),n.addClass("hustle-displaying-in-small"),n.removeClass("hustle-displaying-in-large")}n.removeClass("hustle-show"),"selector"===i?(t=600<e(window).width()?n.data("desktop-selector"):n.data("mobiles-selector")).length&&(t=e(t)).length?(t.css("position","relative"),n.appendTo(t),s()):o():s()}(),this;function o(){n.hide()}function s(){n.css("display",""),n.css("opacity",1),setTimeout(function(){return n.addClass("hustle-show")},0),setTimeout(function(){i.addClass("hustle-animate-in")},200)}}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.inlineClose=function(t,n){var i=e(t),o=(i.find(".hustle-inline-content"),!1);if(i.hasClass("hustle-inline"))return void 0!==n&&!1!==n&&setTimeout(function(){o||(i.find("iframe").each(function(t,n){return e(n).attr("src",e(n).attr("src"))}),i.trigger("hustle:module:hidden",this),i.slideUp(800),setTimeout(function(){i.remove()},800))},n),this}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.inlineLoad=function(t){var n,i,o=e(t),s=o.find(".hustle-inline-content"),r=e(window).height(),a=o.offset().top;if(o.is(".hustle-inline"))return o.css("opacity",1),o.removeClass("hustle-show"),n=o.data("intro"),i="no_animation",""!==n&&(i=n),"no_animation"!==i&&s.addClass("hustle-animate"),r>a?l(200):"no_animation"===o.data("intro")?l(100):e(window).scroll(function(){e(window).scrollTop()+r>=a&&l(100)}),this;function l(e){o.addClass("hustle-show"),setTimeout(function(){var e,t;e=o.data("intro"),t="no_animation",""!==e&&(t=e),"no_animation"!==t&&s.addClass("hustle-animate-in--"+t)},e)}}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.inlineResize=function(t){var n=e(t),i=n.width();if(n.is(".hustle-inline"))return 783<Math.max(document.documentElement.clientWidth,window.innerWidth||0)&&(n.hasClass("hustle-size--small")?500<i&&n.removeClass("hustle-size--small"):500>=i&&n.addClass("hustle-size--small")),this}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.inputFilled=function(){e(".hustle-ui .hustle-input").each(function(t,n){var i=e(n);""===i.val()&&n.validity.valid?i.parent().removeClass("hustle-field-filled"):i.parent().addClass("hustle-field-filled")}),e(".hustle-ui .hustle-input").on("keyup blur change",function(){var t=e(this);""===t.val()&&this.validity.valid?t.parent().removeClass("hustle-field-filled"):t.parent().addClass("hustle-field-filled")})}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.inputRequired=function(){e(".hustle-ui .hustle-input").blur(function(){var t=e(this),n=t.parent();n.hasClass("hustle-field-required")&&(""===t.val()?n.addClass("hustle-field-error"):n.removeClass("hustle-field-error"))})}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.nonSharingSimulation=function(t){var n=e(t);if(n.is(".hustle-ui")){var i=n.find(".hustle-optin"),o=n.find(".hustle-button-submit"),s=n.find(".hustle-button-cta"),r=i.find(".hustle-success"),a=i.find(".hustle-layout").find(".hustle-layout-form"),l=a.find(".hustle-error-message");return a.find(".hustle-error-message").not(":first").remove(),r.hide(),l.hide(),s.length&&s.on("click",function(e){e.preventDefault()}),o.on("click",function(e){var t;e.preventDefault(),e.stopPropagation(),(t=HUI.optinValidate(n)).length?HUI.optinError(l,t):(HUI.optinSubmit(this,1e3),setTimeout(function(){HUI.optinSuccess(r,r.data("close-delay"))},1e3))}),this}}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.optinError=function(t,n){var i=e(t),o=i.closest("form");if(i.is(".hustle-error-message"))return function(t){var n=!0;if(!e.isArray(t)){var s=[];e.each(t,function(e,t){s.push(t)}),t=s}void 0!==t&&t.length&&e.each(t,function(t,s){if(void 0===s||!s)return!0;n?(i.append("<p>"+s+"</p>"),n=!1):e('<div class="hustle-error-message"><p>'+s+"</p></div>").appendTo(o)}),(void 0===t||n)&&i.append("<p>"+i.data("default-error")+"</p>"),i.show()}(n),this}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.optinSubmit=function(t){var n,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=e(t),s=o.closest(".hustle-ui").find(".hustle-optin");if(o.is(".hustle-button-submit")&&s[0]&&s.length)return n=!0===e.isNumeric(i)?i:"1000",!0===e.isNumeric(i)&&(n=i),o.addClass("hustle-button-onload"),!1!==i&&setTimeout(function(){o.removeClass("hustle-button-onload")},n),this}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.optinSuccess=function(t){var n=e(t),i=n.closest(".hustle-ui"),o=i.find(".hustle-layout"),s=n.data("close-delay");if(n.is(".hustle-success"))return r(),this;function r(){if(o.slideUp(800),setTimeout(function(){n.slideDown()},800),s||0===s){var e=null;i.is(".hustle-slidein")?e=HUI.slideinClose:i.is(".hustle-popup")?e=HUI.popupClose:i.is(".hustle-inline")&&(e=HUI.inlineClose),setTimeout(function(){return e(i,0)},s)}}}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.optinValidate=function(t){var n,i,o,s=e(t),r=[],a=s.find(".hustle-layout-form");return n=a.find(".hustle-field"),i=a.find(".hustle-checkbox"),o=a.find(".hustle-error-message"),a.find(".hustle-error-message").not(":first").remove(),n.removeClass("hustle-field-error"),i.removeClass("hustle-field-error"),o.html("").hide(),a.find(".hustle-input").parent().each(function(){var t=e(this);t.hasClass("hustle-field-required")&&(""===t.find("input").val()?(t.addClass("hustle-field-error"),r.push(t.find(".hustle-input").data("required-error"))):t.removeClass("hustle-field-error"))}),function(){var e=a.find(".hustle-gdpr"),t=e.find("input");!e.length||t.is(":checked")?e.removeClass("hustle-field-error"):(e.addClass("hustle-field-error"),r.push(t.data("required-error")))}(),r}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.popupClose=function(t,n){var i=e(t),o=i.find(".hustle-button-close"),s=i.find(".hustle-popup-mask"),r=i.find(".hustle-popup-content"),a=i.find(".hustle-nsa-link"),l=!1;if(o.length&&i.hasClass("hustle-popup"))return e(document).off("keydown.hustle.escKey",c),e(document).on("keydown.hustle.escKey",c),i.on("click",function(){l=!0}),void 0!==n&&!1!==n&&setTimeout(function(){l||(i.trigger("hustle:module:hidden",this),u())},n),o.on("click",function(e){i.trigger("hustle:module:closed",this),u(),e.preventDefault(),e.stopPropagation()}),a.on("click",function(e){e.preventDefault(),i.trigger("hustle:module:clicked_never_see",this),u()}),1===i.data("overlay-close")&&s.on("click",function(e){i.trigger("hustle:module:click_outside",this),u(),e.preventDefault(),e.stopPropagation()}),this;function c(e){27===e.keyCode&&(l=!0,i.trigger("hustle:module:esc_key_pressed",this),u())}function u(){var t,n=i.data("outro"),o=1e3,s="no_animation";""!==n&&(s=n),"no_animation"===s&&(o=0),"fadeOut"===s&&(o=305),"newspaperOut"===s&&(o=505),"bounceOut"===s&&(o=755),i.removeClass("hustle-animation-stopped"),i.find("iframe").each(function(t,n){return e(n).attr("src",e(n).attr("src"))}),function(){var e=i.data("outro");r.addClass("hustle-animate-out--"+e)}(),t=i.data("intro"),r.removeClass("hustle-animate-in--"+t),setTimeout(function(){i.removeClass("hustle-show"),r.removeClass("hustle-animate-out--"+s),e("html").removeClass("hustle-no-scroll")},o)}}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.popupLoad=function(t,n){var i=e(t),o=i.find(".hustle-popup-content");if(i.is(".hustle-popup"))return i.css("opacity",1),i.removeClass("hustle-show"),o.addClass("hustle-animate"),i.addClass("hustle-show"),setTimeout(function(){var e,t;e=i.data("intro"),t=1e3,"no_animation"===e&&(t=0),"bounceIn"!==e&&"bounceInUp"!==e&&"bounceInDown"!==e&&"bounceInLeft"!==e&&"bounceInRight"!==e||(t=755),"fadeIn"===e&&(t=305),"newspaperIn"===e&&(t=505),o.addClass("hustle-animate-in--"+e),setTimeout(function(){i.addClass("hustle-animation-stopped")},t+50)},200),HUI.popupClose(t,n),this}}(jQuery),function(){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.maybeRenderRecaptcha=function(e,t){var n=e.data(),i=n.renderId,o=n.id,s=e.find("#hustle-modal-recaptcha-"+o+"-"+i);if(s.length){var r=s.data(),a=r.sitekey,l=r.version,c=r.theme,u=r.size,d=r.badge,h=s.find(".hustle-recaptcha-badge");if(h.length){var p=s.attr("recaptcha-id");h.remove(),grecaptcha.reset(p)}s.append('<div class="hustle-recaptcha-badge"></div>'),h=s.find(".hustle-recaptcha-badge");var f={sitekey:a,theme:c,size:u,badge:d,"expired-callback":function(){return grecaptcha.reset(s.attr("recaptcha-id"))}};"v2_checkbox"===l?(e.find(".hustle-modal-body button").prop("disabled",!0),f.callback=function(t){e.find('input[name="recaptcha-response"]').val(t),e.find(".hustle-layout-body button").removeProp("disabled")}):f.callback=function(n){e.find('input[name="recaptcha-response"]').val(n),t&&t.doSubmit(s.closest(".hustle-layout-form"))},"undefined"!=typeof grecaptcha&&grecaptcha.ready(function(){var e=grecaptcha.render(h[0],f);s.attr("recaptcha-id",e)})}}}(),function(e){e(jQuery)}(function(e){return function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var n,i,o,s;return t&&t.requirejs||(t?i=t:t={},function(e){var t,s,r,a,l={},c={},u={},d={},h=Object.prototype.hasOwnProperty,p=[].slice,f=/\.js$/;function m(e,t){return h.call(e,t)}function g(e,t){var n,i,o,s,r,a,l,c,d,h,p,m=t&&t.split("/"),g=u.map,v=g&&g["*"]||{};if(e){for(r=(e=e.split("/")).length-1,u.nodeIdCompat&&f.test(e[r])&&(e[r]=e[r].replace(f,"")),"."===e[0].charAt(0)&&m&&(e=m.slice(0,m.length-1).concat(e)),d=0;d<e.length;d++)if("."===(p=e[d]))e.splice(d,1),d-=1;else if(".."===p){if(0===d||1===d&&".."===e[2]||".."===e[d-1])continue;d>0&&(e.splice(d-1,2),d-=2)}e=e.join("/")}if((m||v)&&g){for(d=(n=e.split("/")).length;d>0;d-=1){if(i=n.slice(0,d).join("/"),m)for(h=m.length;h>0;h-=1)if((o=g[m.slice(0,h).join("/")])&&(o=o[i])){s=o,a=d;break}if(s)break;!l&&v&&v[i]&&(l=v[i],c=d)}!s&&l&&(s=l,a=c),s&&(n.splice(0,a,s),e=n.join("/"))}return e}function v(t,n){return function(){var i=p.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),s.apply(e,i.concat([t,n]))}}function y(e){return function(t){l[e]=t}}function w(n){if(m(c,n)){var i=c[n];delete c[n],d[n]=!0,t.apply(e,i)}if(!m(l,n)&&!m(d,n))throw new Error("No "+n);return l[n]}function _(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function b(e){return e?_(e):[]}function $(e){return function(){return u&&u.config&&u.config[e]||{}}}r=function(e,t){var n,i,o=_(e),s=o[0],r=t[1];return e=o[1],s&&(n=w(s=g(s,r))),s?e=n&&n.normalize?n.normalize(e,(i=r,function(e){return g(e,i)})):g(e,r):(s=(o=_(e=g(e,r)))[0],e=o[1],s&&(n=w(s))),{f:s?s+"!"+e:e,n:e,pr:s,p:n}},a={require:function(e){return v(e)},exports:function(e){var t=l[e];return void 0!==t?t:l[e]={}},module:function(e){return{id:e,uri:"",exports:l[e],config:$(e)}}},t=function(t,n,i,o){var s,u,h,p,f,g,_,$=[],C=_typeof(i);if(g=b(o=o||t),"undefined"===C||"function"===C){for(n=!n.length&&i.length?["require","exports","module"]:n,f=0;f<n.length;f+=1)if("require"===(u=(p=r(n[f],g)).f))$[f]=a.require(t);else if("exports"===u)$[f]=a.exports(t),_=!0;else if("module"===u)s=$[f]=a.module(t);else if(m(l,u)||m(c,u)||m(d,u))$[f]=w(u);else{if(!p.p)throw new Error(t+" missing "+u);p.p.load(p.n,v(o,!0),y(u),{}),$[f]=l[u]}h=i?i.apply(l[t],$):void 0,t&&(s&&s.exports!==e&&s.exports!==l[t]?l[t]=s.exports:h===e&&_||(l[t]=h))}else t&&(l[t]=i)},n=i=s=function(n,i,o,l,c){if("string"==typeof n)return a[n]?a[n](i):w(r(n,b(i)).f);if(!n.splice){if((u=n).deps&&s(u.deps,u.callback),!i)return;i.splice?(n=i,i=o,o=null):n=e}return i=i||function(){},"function"==typeof o&&(o=l,l=c),l?t(e,n,i,o):setTimeout(function(){t(e,n,i,o)},4),s},s.config=function(e){return s(e)},n._defined=l,(o=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),m(l,e)||m(c,e)||(c[e]=[e,t,n])}).amd={jQuery:!0}}(),t.requirejs=n,t.require=i,t.define=o),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(e){var t={};function n(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&("constructor"!==i&&n.push(i))}return n}t.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var o in t)n.call(t,o)&&(e[o]=t[o]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},t.Decorate=function(e,t){var i=n(t),o=n(e);function s(){var n=Array.prototype.unshift,i=t.prototype.constructor.length,o=e.prototype.constructor;i>0&&(n.call(arguments,e.prototype.constructor),o=t.prototype.constructor),o.apply(this,arguments)}t.displayName=e.displayName,s.prototype=new function(){this.constructor=s};for(var r=0;r<o.length;r++){var a=o[r];s.prototype[a]=e.prototype[a]}for(var l=function(e){var n=function(){};e in s.prototype&&(n=s.prototype[e]);var i=t.prototype[e];return function(){return Array.prototype.unshift.call(arguments,n),i.apply(this,arguments)}},c=0;c<i.length;c++){var u=i[c];s.prototype[u]=l(u)}return s};var i=function(){this.listeners={}};return i.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},i.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=e,e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},t.Observable=i,t.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},t.bind=function(e,t){return function(){e.apply(t,arguments)}},t._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var o=0;o<n.length;o++){var s=n[o];(s=s.substring(0,1).toLowerCase()+s.substring(1))in i||(i[s]={}),o==n.length-1&&(i[s]=e[t]),i=i[s]}delete e[t]}}return e},t.hasScroll=function(t,n){var i=e(n),o=n.style.overflowX,s=n.style.overflowY;return(o!==s||"hidden"!==s&&"visible"!==s)&&("scroll"===o||"scroll"===s||(i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth))},t.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},t.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var i=e();e.map(n,function(e){i=i.add(e)}),n=i}t.append(n)},t}),t.define("select2/results",["jquery","./utils"],function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),o=this.options.get("translations").get(t.message);i.append(n(o(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],o=this.option(i);t.push(o)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(e,t){t.find(".select2-results").append(e)},n.prototype.sort=function(e){return this.options.get("sorter")(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");t.length>0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var t=this;this.data.current(function(n){var i=e.map(n,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var t=e(this),n=e.data(this,"data"),o=""+n.id;null!=n.element&&n.element.selected||null==n.element&&e.inArray(o,i)>-1?t.attr("aria-selected","true"):t.attr("aria-selected","false")})})},n.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(t){var n=document.createElement("li");n.className="select2-results__option";var i={role:"treeitem","aria-selected":"false"};for(var o in t.disabled&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==t.id&&delete i["aria-selected"],null!=t._resultId&&(n.id=t._resultId),t.title&&(n.title=t.title),t.children&&(i.role="group",i["aria-label"]=t.text,delete i["aria-selected"]),i){var s=i[o];n.setAttribute(o,s)}if(t.children){var r=e(n),a=document.createElement("strong");a.className="select2-results__group";e(a);this.template(t,a);for(var l=[],c=0;c<t.children.length;c++){var u=t.children[c],d=this.option(u);l.push(d)}var h=e("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});h.append(l),r.append(a),r.append(h)}else this.template(t,n);return e.data(n,"data",t),n},n.prototype.bind=function(t,n){var i=this,o=t.id+"-results";this.$results.attr("id",o),t.on("results:all",function(e){i.clear(),i.append(e.data),t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("results:append",function(e){i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("query",function(e){i.hideMessages(),i.showLoading(e)}),t.on("select",function(){t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),t.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=i.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?i.trigger("close",{}):i.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var o=n-1;0===e.length&&(o=0);var s=t.eq(o);s.trigger("mouseenter");var r=i.$results.offset().top,a=s.offset().top,l=i.$results.scrollTop()+(a-r);0===o?i.$results.scrollTop(0):a-r<0&&i.$results.scrollTop(l)}}),t.on("results:next",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var o=t.eq(n);o.trigger("mouseenter");var s=i.$results.offset().top+i.$results.outerHeight(!1),r=o.offset().top+o.outerHeight(!1),a=i.$results.scrollTop()+r-s;0===n?i.$results.scrollTop(0):r>s&&i.$results.scrollTop(a)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){i.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,o=e.deltaY>0&&t-e.deltaY<=0,s=e.deltaY<0&&n<=i.$results.height();o?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):s&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(t){var n=e(this),o=n.data("data");"true"!==n.attr("aria-selected")?i.trigger("select",{originalEvent:t,data:o}):i.options.get("multiple")?i.trigger("unselect",{originalEvent:t,data:o}):i.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(t){var n=e(this).data("data");i.getHighlightedResults().removeClass("select2-results__option--highlighted"),i.trigger("results:focus",{data:n,element:e(this)})})},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,o=this.$results.scrollTop()+(i-n),s=i-n;o-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(o)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),s=i(t,n);null==s?n.style.display="none":"string"==typeof s?n.innerHTML=o(s):e(n).append(s)},n}),t.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),t.define("select2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var t=e('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t,t},i.prototype.bind=function(e,t){var i=this,o=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){i.trigger("focus",e)}),this.$selection.on("blur",function(e){i._handleBlur(e)}),this.$selection.on("keydown",function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){i.update(e.data)}),e.on("open",function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",o),i._attachCloseHandler(e)}),e.on("close",function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.focus(),i._detachCloseHandler(e)}),e.on("enable",function(){i.$selection.attr("tabindex",i._tabindex)}),e.on("disable",function(){i.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(t){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)},1)},i.prototype._attachCloseHandler=function(t){e(document.body).on("mousedown.select2."+t.id,function(t){var n=e(t.target).closest(".select2");e(".select2.select2-container--open").each(function(){var t=e(this);this!=n[0]&&t.data("element").HUIselect2("close")})})},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function o(){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,t),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},o.prototype.bind=function(e,t){var n=this;o.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),e.on("focus",function(t){e.isOpen()||n.$selection.focus()}),e.on("selection:update",function(e){n.update(e.data)})},o.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},o.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},o.prototype.selectionContainer=function(){return e("<span></span>")},o.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},o}),t.define("select2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},i.prototype.bind=function(t,n){var o=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){o.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(t){if(!o.options.get("disabled")){var n=e(this).parent().data("data");o.trigger("unselect",{originalEvent:t,data:n})}})},i.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=0;i<e.length;i++){var o=e[i],s=this.selectionContainer(),r=this.display(o,s);s.append(r),s.prop("title",o.title||o.text),s.data("data",o),t.push(s)}var a=this.$selection.find(".select2-selection__rendered");n.appendMany(a,t)}},i}),t.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(t.length>1||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},t}),t.define("select2/selection/allowClear",["jquery","../keys"],function(e,t){function n(){}return n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},n.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),o=0;o<i.length;o++){var s={data:i[o]};if(this.trigger("unselect",s),s.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},n.prototype._handleKeyboardClear=function(e,n,i){i.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},n.prototype.update=function(t,n){if(t.call(this,n),!(this.$selection.find(".select2-selection__placeholder").length>0||0===n.length)){var i=e('<span class="select2-selection__clear">×</span>');i.data("data",n),this.$selection.find(".select2-selection__rendered").prepend(i)}},n}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=e('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=n,this.$search=n.find("input");var i=t.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(e,t,i){var o=this;e.call(this,t,i),t.on("open",function(){o.$search.trigger("focus")}),t.on("close",function(){o.$search.val(""),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")}),t.on("enable",function(){o.$search.prop("disabled",!1),o._transferTabIndex()}),t.on("disable",function(){o.$search.prop("disabled",!0)}),t.on("focus",function(e){o.$search.trigger("focus")}),t.on("results:focus",function(e){o.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){o.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){o._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===o.$search.val()){var t=o.$searchContainer.prev(".select2-selection__choice");if(t.length>0){var i=t.data("data");o.searchRemoveChoice(i),e.preventDefault()}}});var s=document.documentMode,r=s&&s<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){r?o.$selection.off("input.search input.searchcheck"):o.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(r&&"input"===e.type)o.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&o.handleSearch(e)}})},i.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},i.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").innerWidth():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},i}),t.define("select2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,i){var o=this,s=["open","opening","close","closing","select","selecting","unselect","unselecting"],r=["opening","closing","selecting","unselecting"];t.call(this,n,i),n.on("*",function(t,n){if(-1!==e.inArray(t,s)){n=n||{};var i=e.Event("select2:"+t,{params:n});o.$element.trigger(i),-1!==e.inArray(t,r)&&(n.prevented=i.isDefaultPrevented())}})},t}),t.define("select2/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])},n}),t.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),t.define("select2/data/base",["../utils"],function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var i=t.id+"-result-";return i+=e.generateChars(4),null!=n.id?i+="-"+n.id.toString():i+="-"+e.generateChars(4),i},t}),t.define("select2/data/select",["./base","../utils","jquery"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,e),i.prototype.current=function(e){var t=[],i=this;this.$element.find(":selected").each(function(){var e=n(this),o=i.item(e);t.push(o)}),e(t)},i.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(i){var o=[];(e=[e]).push.apply(e,i);for(var s=0;s<e.length;s++){var r=e[s].id;-1===n.inArray(r,o)&&o.push(r)}t.$element.val(o),t.$element.trigger("change")});else{var i=e.id;this.$element.val(i),this.$element.trigger("change")}},i.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple")){if(e.selected=!1,n(e.element).is("option"))return e.element.selected=!1,void this.$element.trigger("change");this.current(function(i){for(var o=[],s=0;s<i.length;s++){var r=i[s].id;r!==e.id&&-1===n.inArray(r,o)&&o.push(r)}t.$element.val(o),t.$element.trigger("change")})}},i.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},i.prototype.destroy=function(){this.$element.find("*").each(function(){n.removeData(this,"data")})},i.prototype.query=function(e,t){var i=[],o=this;this.$element.children().each(function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var s=o.item(t),r=o.matches(e,s);null!==r&&i.push(r)}}),t({results:i})},i.prototype.addOptions=function(e){t.appendMany(this.$element,e)},i.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var i=n(t),o=this._normalizeItem(e);return o.element=t,n.data(t,"data",o),i},i.prototype.item=function(e){var t={};if(null!=(t=n.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var i=e.children("option"),o=[],s=0;s<i.length;s++){var r=n(i[s]),a=this.item(r);o.push(a)}t.children=o}return(t=this._normalizeItem(t)).element=e[0],n.data(e[0],"data",t),t},i.prototype._normalizeItem=function(e){n.isPlainObject(e)||(e={id:e,text:e});return null!=(e=n.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},{selected:!1,disabled:!1},e)},i.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},i}),t.define("select2/data/array",["./select","../utils","jquery"],function(e,t,n){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return t.Extend(i,e),i.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});0===t.length&&(t=this.option(e),this.addOptions(t)),i.__super__.select.call(this,e)},i.prototype.convertToOptions=function(e){var i=this,o=this.$element.find("option"),s=o.map(function(){return i.item(n(this)).id}).get(),r=[];function a(e){return function(){return n(this).val()==e.id}}for(var l=0;l<e.length;l++){var c=this._normalizeItem(e[l]);if(n.inArray(c.id,s)>=0){var u=o.filter(a(c)),d=this.item(u),h=n.extend(!0,{},c,d),p=this.option(h);u.replaceWith(p)}else{var f=this.option(c);if(c.children){var m=this.convertToOptions(c.children);t.appendMany(f,m)}r.push(f)}}return r},i}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var o=n.ajax(e);return o.then(t),o.fail(i),o}};return n.extend({},t,e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(e,t){var i=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var o=n.extend({type:"GET"},this.ajaxOptions);function s(){var s=o.transport(o,function(o){var s=i.processResults(o,e);i.options.get("debug")&&window.console&&console.error&&(s&&s.results&&n.isArray(s.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(s)},function(){s.status&&"0"===s.status||i.trigger("results:message",{message:"errorLoading"})});i._request=s}"function"==typeof o.url&&(o.url=o.url.call(this.$element,e)),"function"==typeof o.data&&(o.data=o.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(s,this.ajaxOptions.delay)):s()},i}),t.define("select2/data/tags",["jquery"],function(e){function t(t,n,i){var o=i.get("tags"),s=i.get("createTag");void 0!==s&&(this.createTag=s);var r=i.get("insertTag");if(void 0!==r&&(this.insertTag=r),t.call(this,n,i),e.isArray(o))for(var a=0;a<o.length;a++){var l=o[a],c=this._normalizeItem(l),u=this.option(c);this.$element.append(u)}}return t.prototype.query=function(e,t,n){var i=this;this._removeOldTags(),null!=t.term&&null==t.page?e.call(this,t,function e(o,s){for(var r=o.results,a=0;a<r.length;a++){var l=r[a],c=null!=l.children&&!e({results:l.children},!0);if((l.text||"").toUpperCase()===(t.term||"").toUpperCase()||c)return!s&&(o.data=r,void n(o))}if(s)return!0;var u=i.createTag(t);if(null!=u){var d=i.option(u);d.attr("data-select2-tag",!0),i.addOptions([d]),i.insertTag(r,u)}o.results=r,n(o)}):e.call(this,t,n)},t.prototype.createTag=function(t,n){var i=e.trim(n.term);return""===i?null:{id:i,text:i}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||e(this).remove()})},t}),t.define("select2/data/tokenizer",["jquery"],function(e){function t(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(t,n,i){var o=this;n.term=n.term||"";var s=this.tokenizer(n,this.options,function(t){var n=o._normalizeItem(t);if(!o.$element.find("option").filter(function(){return e(this).val()===n.id}).length){var i=o.option(n);i.attr("data-select2-tag",!0),o._removeOldTags(),o.addOptions([i])}!function(e){o.trigger("select",{data:e})}(n)});s.term!==n.term&&(this.$search.length&&(this.$search.val(s.term),this.$search.focus()),n.term=s.term),t.call(this,n,i)},t.prototype.tokenizer=function(t,n,i,o){for(var s=i.get("tokenSeparators")||[],r=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<r.length;){var c=r[a];if(-1!==e.inArray(c,s)){var u=r.substr(0,a),d=l(e.extend({},n,{term:u}));null!=d?(o(d),r=r.substr(a+1)||"",a=0):a++}else a++}return{term:r}},t}),t.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),t.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),t.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){var i=this;this.current(function(o){var s=null!=o?o.length:0;i.maximumSelectionLength>0&&s>=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):e.call(i,t,n)})},e}),t.define("select2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),t.define("select2/dropdown/search",["jquery","../utils"],function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),i=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(t,n,i){var o=this;t.call(this,n,i),this.$search.on("keydown",function(e){o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(t){e(this).off("keyup")}),this.$search.on("keyup input",function(e){o.handleSearch(e)}),n.on("open",function(){o.$search.attr("tabindex",0),o.$search.focus(),window.setTimeout(function(){o.$search.focus()},0)}),n.on("close",function(){o.$search.attr("tabindex",-1),o.$search.val("")}),n.on("focus",function(){n.isOpen()||o.$search.focus()}),n.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(o.showSearch(e)?o.$searchContainer.removeClass("select2-search--hide"):o.$searchContainer.addClass("select2-search--hide"))})},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n}),t.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;i>=0;i--){var o=t[i];this.placeholder.id===o.id&&n.splice(i,1)}return n},e}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,n,i){var o=this;t.call(this,n,i),n.on("query",function(e){o.lastParams=e,o.loading=!0}),n.on("query:append",function(e){o.lastParams=e,o.loading=!0}),this.$results.on("scroll",function(){var t=e.contains(document.documentElement,o.$loadingMore[0]);!o.loading&&t&&(o.$results.offset().top+o.$results.outerHeight(!1)+50>=o.$loadingMore.offset().top+o.$loadingMore.outerHeight(!1)&&o.loadMore())})},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t}),t.define("select2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(t,n,i){this.$dropdownParent=i.get("dropdownParent")||e(document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this,o=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),o||(o=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>"),i=t.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,i){var o=this,s="scroll.select2."+i.id,r="resize.select2."+i.id,a="orientationchange.select2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each(function(){e(this).data("select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),l.on(s,function(t){var n=e(this).data("select2-scroll-position");e(this).scrollTop(n.y)}),e(window).on(s+" "+r+" "+a,function(e){o._positionDropdown(),o._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,i){var o="scroll.select2."+i.id,s="resize.select2."+i.id,r="orientationchange.select2."+i.id;this.$container.parents().filter(t.hasScroll).off(o),e(window).off(o+" "+s+" "+r)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),o=null,s=this.$container.offset();s.bottom=s.top+this.$container.outerHeight(!1);var r={height:this.$container.outerHeight(!1)};r.top=s.top,r.bottom=s.top+r.height;var a=this.$dropdown.outerHeight(!1),l=t.scrollTop(),c=t.scrollTop()+t.height(),u=l<s.top-a,d=c>s.bottom+a,h={left:s.left,top:r.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var f=p.offset();h.top-=f.top,h.left-=f.left,n||i||(o="below"),d||!u||n?!u&&d&&n&&(o="below"):o="above",("above"==o||n&&"below"!==o)&&(h.top=r.top-f.top-a),null!=o&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+o),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+o)),this.$dropdownContainer.css(h)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),t.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var o=t[i];o.children?n+=e(o.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),t.define("select2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var o=i.data("data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},e}),t.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),t.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),t.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"Los resultados no se pudieron cargar."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, borrar "+t+" caracteres";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Por favor, ingresar "+(e.minimum-e.input.length)+" o más caracteres"},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Solo puedes seleccionar "+e.maximum+" items";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),t.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(e,t,n,i,o,s,r,a,l,c,u,d,h,p,f,m,g,v,y,w,_,b,$,C,x,T,k,A,S){function I(){this.reset()}return I.prototype.apply=function(d){if(null==(d=e.extend(!0,{},this.defaults,d)).dataAdapter){if(null!=d.ajax?d.dataAdapter=f:null!=d.data?d.dataAdapter=p:d.dataAdapter=h,d.minimumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,y)),d.maximumSelectionLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,w)),d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,m)),null==d.tokenSeparators&&null==d.tokenizer||(d.dataAdapter=c.Decorate(d.dataAdapter,g)),null!=d.query){var S=t(d.amdBase+"compat/query");d.dataAdapter=c.Decorate(d.dataAdapter,S)}if(null!=d.initSelection){var I=t(d.amdBase+"compat/initSelection");d.dataAdapter=c.Decorate(d.dataAdapter,I)}}if(null==d.resultsAdapter&&(d.resultsAdapter=n,null!=d.ajax&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,C)),null!=d.placeholder&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,$)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,k))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=_;else{var H=c.Decorate(_,b);d.dropdownAdapter=H}if(0!==d.minimumResultsForSearch&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,T)),d.closeOnSelect&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,A)),null!=d.dropdownCssClass||null!=d.dropdownCss||null!=d.adaptDropdownCssClass){var D=t(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=c.Decorate(d.dropdownAdapter,D)}d.dropdownAdapter=c.Decorate(d.dropdownAdapter,x)}if(null==d.selectionAdapter){if(d.multiple?d.selectionAdapter=o:d.selectionAdapter=i,null!=d.placeholder&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,s)),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,r)),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,a)),null!=d.containerCssClass||null!=d.containerCss||null!=d.adaptContainerCssClass){var E=t(d.amdBase+"compat/containerCss");d.selectionAdapter=c.Decorate(d.selectionAdapter,E)}d.selectionAdapter=c.Decorate(d.selectionAdapter,l)}if("string"==typeof d.language)if(d.language.indexOf("-")>0){var O=d.language.split("-")[0];d.language=[d.language,O]}else d.language=[d.language];if(e.isArray(d.language)){var U=new u;d.language.push("en");for(var j=d.language,P=0;P<j.length;P++){var q=j[P],L={};try{L=u.loadPath(q)}catch(e){try{q=this.defaults.amdLanguageBase+q,L=u.loadPath(q)}catch(e){d.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+q+'" could not be automatically loaded. A fallback will be used instead.');continue}}U.extend(L)}d.translations=U}else{var M=u.loadPath(this.defaults.amdLanguageBase+"en"),R=new u(d.language);R.extend(M),d.translations=R}return d},I.prototype.reset=function(){function t(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return d[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:S,matcher:function n(i,o){if(""===e.trim(i.term))return o;if(o.children&&o.children.length>0){for(var s=e.extend(!0,{},o),r=o.children.length-1;r>=0;r--)null==n(i,o.children[r])&&s.children.splice(r,1);return s.children.length>0?s:n(i,s)}var a=t(o.text).toUpperCase(),l=t(i.term).toUpperCase();return a.indexOf(l)>-1?o:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},I.prototype.set=function(t,n){var i={};i[e.camelCase(t)]=n;var o=c._convertData(i);e.extend(this.defaults,o)},new I}),t.define("select2/options",["require","jquery","./defaults","./utils"],function(e,t,n,i){function o(t,o){if(this.options=t,null!=o&&this.fromElement(o),this.options=n.apply(this.options),o&&o.is("input")){var s=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,s)}}return o.prototype.fromElement=function(e){var n=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),e.data("data",e.data("select2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var o={};o=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,e.data()):e.data();var s=t.extend(!0,{},o);for(var r in s=i._convertData(s))t.inArray(r,n)>-1||(t.isPlainObject(this.options[r])?t.extend(this.options[r],s[r]):this.options[r]=s[r]);return this},o.prototype.get=function(e){return this.options[e]},o.prototype.set=function(e,t){this.options[e]=t},o}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(e,t,n,i){var o=function e(n,i){null!=n.data("select2")&&n.data("select2").destroy(),this.$element=n,this.id=this._generateId(n),i=i||{},this.options=new t(i,n),e.__super__.constructor.call(this);var o=n.attr("tabindex")||0;n.data("old-tabindex",o),n.attr("tabindex","-1");var s=this.options.get("dataAdapter");this.dataAdapter=new s(n,this.options);var r=this.render();this._placeContainer(r);var a=this.options.get("selectionAdapter");this.selection=new a(n,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var l=this.options.get("dropdownAdapter");this.dropdown=new l(n,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);var c=this.options.get("resultsAdapter");this.results=new c(n,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var u=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){u.trigger("selection:update",{data:e})}),n.addClass("select2-hidden-accessible"),n.attr("aria-hidden","true"),this._syncAttributes(),n.data("select2",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var o=e.outerWidth(!1);return o<=0?"auto":o+"px"}if("style"==t){var s=e.attr("style");if("string"!=typeof s)return null;for(var r=s.split(";"),a=0,l=r.length;a<l;a+=1){var c=r[a].replace(/\s/g,"").match(n);if(null!==c&&c.length>=1)return c[1]}return null}return t},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=i?(this._observer=new i(function(n){e.each(n,t._syncA),e.each(n,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},o.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",function(){t.toggleDropdown()}),this.selection.on("focus",function(e){t.focus(e)}),this.selection.on("*",function(i,o){-1===e.inArray(i,n)&&t.trigger(i,o)})},o.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("select2-container--open")}),this.on("close",function(){e.$container.removeClass("select2-container--open")}),this.on("enable",function(){e.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("select2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("select2-container--focus")}),this.on("query",function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}),this.on("keypress",function(t){var n=t.which;e.isOpen()?n===i.ESC||n===i.TAB||n===i.UP&&t.altKey?(e.close(),t.preventDefault()):n===i.ENTER?(e.trigger("results:select",{}),t.preventDefault()):n===i.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===i.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===i.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&t.altKey)&&(e.open(),t.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._syncSubtree=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&t.addedNodes.length>0)for(var o=0;o<t.addedNodes.length;o++){t.addedNodes[o].selected&&(n=!0)}else t.removedNodes&&t.removedNodes.length>0&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})}},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var s=i[e],r={prevented:!1,name:e,args:t};if(n.call(this,s,r),r.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.trigger("query",{})},o.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},o.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},o.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(t){e=t}),e},o.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,function(e){return e.toString()})),this.$element.val(n).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),t.data("element",this.$element),t},o}),t.define("select2/compat/utils",["jquery"],function(e){return{syncCssClasses:function(t,n,i){var o,s,r=[];(o=e.trim(t.attr("class")))&&e((o=""+o).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&r.push(this)}),(o=e.trim(n.attr("class")))&&e((o=""+o).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(s=i(this))&&r.push(s)}),t.attr("class",r.join(" "))}}}),t.define("select2/compat/containerCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var o=i.call(this),s=this.options.get("containerCssClass")||"";e.isFunction(s)&&(s=s(this.$element));var r=this.options.get("adaptContainerCssClass");if(r=r||n,-1!==s.indexOf(":all:")){s=s.replace(":all:","");var a=r;r=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("containerCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(o,this.$element,r),o.css(l),o.addClass(s),o},i}),t.define("select2/compat/dropdownCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var o=i.call(this),s=this.options.get("dropdownCssClass")||"";e.isFunction(s)&&(s=s(this.$element));var r=this.options.get("adaptDropdownCssClass");if(r=r||n,-1!==s.indexOf(":all:")){s=s.replace(":all:","");var a=r;r=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("dropdownCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(o,this.$element,r),o.css(l),o.addClass(s),o},i}),t.define("select2/compat/initSelection",["jquery"],function(e){function t(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return t.prototype.current=function(t,n){var i=this;this._isInitialized?t.call(this,n):this.initSelection.call(null,this.$element,function(t){i._isInitialized=!0,e.isArray(t)||(t=[t]),n(t)})},t}),t.define("select2/compat/inputData",["jquery"],function(e){function t(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),e.call(this,t,n)}return t.prototype.current=function(t,n){function i(t,n){var o=[];return t.selected||-1!==e.inArray(t.id,n)?(t.selected=!0,o.push(t)):t.selected=!1,t.children&&o.push.apply(o,i(t.children,n)),o}for(var o=[],s=0;s<this._currentData.length;s++){var r=this._currentData[s];o.push.apply(o,i(r,this.$element.val().split(this._valueSeparator)))}n(o)},t.prototype.select=function(t,n){if(this.options.get("multiple")){var i=this.$element.val();i+=this._valueSeparator+n.id,this.$element.val(i),this.$element.trigger("change")}else this.current(function(t){e.map(t,function(e){e.selected=!1})}),this.$element.val(n.id),this.$element.trigger("change")},t.prototype.unselect=function(e,t){var n=this;t.selected=!1,this.current(function(e){for(var i=[],o=0;o<e.length;o++){var s=e[o];t.id!=s.id&&i.push(s.id)}n.$element.val(i.join(n._valueSeparator)),n.$element.trigger("change")})},t.prototype.query=function(e,t,n){for(var i=[],o=0;o<this._currentData.length;o++){var s=this._currentData[o],r=this.matches(t,s);null!==r&&i.push(r)}n({results:i})},t.prototype.addOptions=function(t,n){var i=e.map(n,function(t){return e.data(t[0],"data")});this._currentData.push.apply(this._currentData,i)},t}),t.define("select2/compat/matcher",["jquery"],function(e){return function(t){return function(n,i){var o=e.extend(!0,{},i);if(null==n.term||""===e.trim(n.term))return o;if(i.children){for(var s=i.children.length-1;s>=0;s--){var r=i.children[s];t(n.term,r.text,r)||o.children.splice(s,1)}if(o.children.length>0)return o}return t(n.term,i.text,i)?o:null}}}),t.define("select2/compat/query",[],function(){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.callback=n,this.options.get("query").call(null,t)},e}),t.define("select2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}return e.prototype.position=function(e,t,n){n.find(".dropdown-wrapper").append(t),t.addClass("select2-dropdown--below"),n.addClass("select2-container--below")},e}),t.define("select2/dropdown/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),t.define("select2/selection/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),s=function(e){var t,n,i=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],s=Array.prototype.slice;if(e.event.fixHooks)for(var r=i.length;r;)e.event.fixHooks[i[--r]]=e.event.mouseHooks;var a=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=o.length;t;)this.addEventListener(o[--t],l,!1);else this.onmousewheel=l;e.data(this,"mousewheel-line-height",a.getLineHeight(this)),e.data(this,"mousewheel-page-height",a.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=o.length;t;)this.removeEventListener(o[--t],l,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),i=n["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function l(i){var o,r=i||window.event,l=s.call(arguments,1),d=0,h=0,p=0,f=0,m=0;if((i=e.event.fix(r)).type="mousewheel","detail"in r&&(p=-1*r.detail),"wheelDelta"in r&&(p=r.wheelDelta),"wheelDeltaY"in r&&(p=r.wheelDeltaY),"wheelDeltaX"in r&&(h=-1*r.wheelDeltaX),"axis"in r&&r.axis===r.HORIZONTAL_AXIS&&(h=-1*p,p=0),d=0===p?h:p,"deltaY"in r&&(d=p=-1*r.deltaY),"deltaX"in r&&(h=r.deltaX,0===p&&(d=-1*h)),0!==p||0!==h){if(1===r.deltaMode){var g=e.data(this,"mousewheel-line-height");d*=g,p*=g,h*=g}else if(2===r.deltaMode){var v=e.data(this,"mousewheel-page-height");d*=v,p*=v,h*=v}if(o=Math.max(Math.abs(p),Math.abs(h)),(!n||o<n)&&(n=o,u(r,o)&&(n/=40)),u(r,o)&&(d/=40,h/=40,p/=40),d=Math[d>=1?"floor":"ceil"](d/n),h=Math[h>=1?"floor":"ceil"](h/n),p=Math[p>=1?"floor":"ceil"](p/n),a.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=i.clientX-y.left,m=i.clientY-y.top}return i.deltaX=h,i.deltaY=p,i.deltaFactor=n,i.offsetX=f,i.offsetY=m,i.deltaMode=0,l.unshift(i,d,h,p),t&&clearTimeout(t),t=setTimeout(c,200),(e.event.dispatch||e.event.handle).apply(this,l)}}function c(){n=null}function u(e,t){return a.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},"function"==typeof t.define&&t.define.amd?t.define("jquery-mousewheel",["jquery"],s):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=s:s(e),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(e,t,n,i){if(null==e.fn.select2){var o=["open","close","destroy"];e.fn.select2=function(t){if("object"===_typeof(t=t||{}))return this.each(function(){var i=e.extend(!0,{},t);new n(e(this),i)}),this;if("string"==typeof t){var i,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=e(this).data("select2");null==n&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),i=n[t].apply(n,s)}),e.inArray(t,o)>-1?this:i}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=i),n}),t.define("hui.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(e,t,n,i){if(null==e.fn.HUIselect2){var o=["open","close","destroy"];e.fn.HUIselect2=function(t){if("object"===_typeof(t=t||{}))return this.each(function(){var i=e.extend(!0,{},t);new n(e(this),i)}),this;if("string"==typeof t){var i,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=e(this).data("select2");null==n&&window.console&&console.error&&console.error("The HUISelect2('"+t+"') method was called on an element that is not using Select2."),i=n[t].apply(n,s)}),e.inArray(t,o)>-1?this:i}throw new Error("Invalid arguments for HUISelect2: "+t)}}return null==e.fn.HUIselect2.defaults&&(e.fn.HUIselect2.defaults=i),n}),{define:t.define,require:t.require}}().require("hui.select2")}),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.select2=function(){e(".hustle-ui").each(function(){var t=e(this),n=t.data("id"),i=t.find(".hustle-select2");i.HUIselect2({dir:!0===i.data("rtl-support")?"rtl":"ltr",language:""!==i.data("language")?i.data("language"):"en",placeholder:""!==i.data("placeholder")?i.data("placeholder"):null,dropdownCssClass:"hustle-module-"+n+" hustle-dropdown",minimumResultsForSearch:1/0})})}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.sharingSimulation=function(t){var n=e(t);if(n.is(".hustle-ui"))return n.hide(),this}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.slideinClose=function(t,n){var i=e(t),o=i.find(".hustle-button-close"),s=i.find(".hustle-slidein-content"),r=i.find(".hustle-nsa-link"),a=!1;if(o.length&&i.hasClass("hustle-slidein"))return e(document).off("keydown.hustle.escKey",l),e(document).on("keydown.hustle.escKey",l),i.on("click",function(){a=!0}),void 0!==n&&!1!==n&&setTimeout(function(){a||(i.trigger("hustle:module:hidden",this),c())},n),o.on("click",function(e){i.trigger("hustle:module:closed",this),c()}),r.on("click",function(e){e.preventDefault(),i.trigger("hustle:module:clicked_never_see",this),c()}),this;function l(e){27===e.keyCode&&(a=!0,i.trigger("hustle:module:esc_key_pressed",this),c())}function c(){s.addClass("hustle-animate-out"),s.removeClass("hustle-animate-in"),i.find("iframe").each(function(t,n){return e(n).attr("src",e(n).attr("src"))}),setTimeout(function(){i.removeClass("hustle-show"),s.removeClass("hustle-animate-out")},1e3)}}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.slideinLayouts=function(t){var n=e(t),i=n.find(".hustle-slidein-content > div"),o=n.find(".hustle-layout-header"),s=n.find(".hustle-layout-footer");if(n.length&&n.hasClass("hustle-slidein"))return i.hasClass("hustle-info")&&(s=n.find(".hustle-nsa-link")),i.hasClass("hustle-info--stacked")?(n.css({"padding-top":r()+"px"}),i.css({"max-height":"calc(100vh - "+(a()+r())+"px)"}),o.css({top:"-"+r()+"px"})):i.css({"max-height":"calc(100vh - "+(a()+30)+"px)"}),n.css({"padding-bottom":a()+"px"}),s.css({bottom:"-"+a()+"px"}),this;function r(){return o.outerHeight(!0)}function a(){return s.outerHeight(!0)}}}(jQuery),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.slideinLoad=function(t,n){var i,o,s,r=e(t),a=r.find(".hustle-slidein-content");if(r.is(".hustle-slidein"))return r.css("opacity",1),r.removeClass("hustle-show"),i=r.data("position"),o="",s="",-1!==i.charAt(0).indexOf("n")&&(o="north"),-1!==i.charAt(0).indexOf("s")&&(o="south"),-1!==i.charAt(0).indexOf("e")&&(o="east"),-1!==i.charAt(0).indexOf("w")&&(o="west"),-1!==i.charAt(1).indexOf("n")&&(s="north"),-1!==i.charAt(1).indexOf("s")&&(s="south"),-1!==i.charAt(1).indexOf("e")&&(s="east"),-1!==i.charAt(1).indexOf("w")&&(s="west"),1===i.length?r.addClass("hustle-slidein-position--"+o):r.addClass("hustle-slidein-position--"+o+"-"+s),setTimeout(function(){jQuery(window).trigger("resize"),r.addClass("hustle-show")},800),setTimeout(function(){a.addClass("hustle-animate-in")},1e3),HUI.slideinClose(t,n),this}}(jQuery),function(e){"object"===("undefined"==typeof module?"undefined":_typeof(module))&&"object"===_typeof(module.exports)?e(require("jquery"),window,document):"undefined"!=typeof jQuery&&e(jQuery,window,document)}(function(e,t,n,i){!function(){function i(e,t,n){return new Array(n+1-e.length).join(t)+e}function o(){if(1===arguments.length){var t=arguments[0];return"string"==typeof t&&(t=e.fn.timepicker.parseTime(t)),new Date(0,0,0,t.getHours(),t.getMinutes(),t.getSeconds())}return 3===arguments.length?new Date(0,0,0,arguments[0],arguments[1],arguments[2]):2===arguments.length?new Date(0,0,0,arguments[0],arguments[1],0):new Date(0,0,0)}var s,r;e.TimePicker=function(){var t=this;t.container=e(".hustle-timepicker"),t.ui=t.container.find(".ui-timepicker"),t.viewport=t.ui.find(".ui-timepicker-viewport"),0===t.container.length&&(t.container=e("<div></div>").addClass("hustle-timepicker").appendTo("body").removeClass("hustle-show"),t.ui=e("<div></div>").addClass("ui-timepicker").addClass("ui-widget ui-widget-content ui-menu").appendTo(t.container),t.viewport=e("<ul></ul>").addClass("ui-timepicker-viewport").appendTo(t.ui),e.fn.jquery>="1.4.2"&&t.ui.delegate("a","mouseenter.timepicker",function(){t.activate(!1,e(this).parent())}).delegate("a","mouseleave.timepicker",function(){t.deactivate(!1)}).delegate("a","click.timepicker",function(n){n.preventDefault(),t.select(!1,e(this).parent())}))},e.TimePicker.count=0,e.TimePicker.instance=function(){return e.TimePicker._instance=new e.TimePicker,e.TimePicker._instance},e.TimePicker.prototype={keyCode:{ALT:18,BLOQ_MAYUS:20,CTRL:17,DOWN:40,END:35,ENTER:13,HOME:36,LEFT:37,NUMPAD_ENTER:108,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,SHIFT:16,TAB:9,UP:38},_items:function(t,n){var i,s,r=e("<ul></ul>"),a=null;for(-1===t.options.timeFormat.indexOf("m")&&t.options.interval%60!=0&&(t.options.interval=60*Math.max(Math.round(t.options.interval/60),1)),i=n?o(n):t.options.startTime?o(t.options.startTime):o(t.options.startHour,t.options.startMinutes),s=new Date(i.getTime()+864e5);i<s;)this._isValidTime(t,i)&&(a=e("<li>").addClass("ui-menu-item").appendTo(r),e("<a>").text(e.fn.timepicker.formatTime(t.options.timeFormat,i)).appendTo(a),a.data("time-value",i)),i=new Date(i.getTime()+60*t.options.interval*1e3);return r.children()},_isValidTime:function(e,t){var n=null,i=null;return t=o(t),null!==e.options.minTime?n=o(e.options.minTime):null===e.options.minHour&&null===e.options.minMinutes||(n=o(e.options.minHour,e.options.minMinutes)),null!==e.options.maxTime?i=o(e.options.maxTime):null===e.options.maxHour&&null===e.options.maxMinutes||(i=o(e.options.maxHour,e.options.maxMinutes)),null!==n&&null!==i?t>=n&&t<=i:null!==n?t>=n:null===i||t<=i},_hasScroll:function(){var e=void 0!==this.ui.prop?"prop":"attr";return this.ui.height()<this.ui[e]("scrollHeight")},_move:function(e,t,n){if(this.closed()&&this.open(e),this.active){var i=this.active[t+"All"](".ui-menu-item").eq(0);i.length?this.activate(e,i):this.activate(e,this.viewport.children(n))}else this.activate(e,this.viewport.children(n))},register:function(t,n){var i=this,o={};o.element=e(t),o.element.data("TimePicker")||(o.options=e.metadata?e.extend({},n,o.element.metadata()):e.extend({},n),o.widget=i,e.extend(o,{next:function(){return i.next(o)},previous:function(){return i.previous(o)},first:function(){return i.first(o)},last:function(){return i.last(o)},selected:function(){return i.selected(o)},open:function(){return i.open(o)},close:function(){return i.close(o)},closed:function(){return i.closed(o)},destroy:function(){return i.destroy(o)},parse:function(e){return i.parse(o,e)},format:function(e,t){return i.format(o,e,t)},getTime:function(){return i.getTime(o)},setTime:function(e,t){return i.setTime(o,e,t)},option:function(e,t){return i.option(o,e,t)}}),i._setDefaultTime(o),i._addInputEventsHandlers(o),o.element.data("TimePicker",o))},_setDefaultTime:function(t){"now"===t.options.defaultTime?t.setTime(o(new Date)):t.options.defaultTime&&t.options.defaultTime.getFullYear?t.setTime(o(t.options.defaultTime)):t.options.defaultTime&&t.setTime(e.fn.timepicker.parseTime(t.options.defaultTime))},_addInputEventsHandlers:function(t){var n=this;t.element.bind("keydown.timepicker",function(e){switch(e.which||e.keyCode){case n.keyCode.ENTER:case n.keyCode.NUMPAD_ENTER:e.preventDefault(),n.closed()?t.element.trigger("change.timepicker"):n.select(t,n.active);break;case n.keyCode.UP:t.previous();break;case n.keyCode.DOWN:t.next();break;default:n.closed()||t.close(!0)}}).bind("focus.timepicker",function(){t.open()}).bind("blur.timepicker",function(){setTimeout(function(){t.element.data("timepicker-user-clicked-outside")&&t.close()})}).bind("change.timepicker",function(){t.closed()&&t.setTime(e.fn.timepicker.parseTime(t.element.val()))})},select:function(t,n){var i=!1===t?this.instance:t;this.setTime(i,e.fn.timepicker.parseTime(n.children("a").text())),this.close(i,!0)},activate:function(e,t){if((!1===e?this.instance:e)===this.instance&&(this.deactivate(),this._hasScroll())){var n=t.offset().top-this.ui.offset().top,i=this.ui.scrollTop(),o=this.ui.height();n<0?this.ui.scrollTop(i+n):n>=o&&this.ui.scrollTop(i+n-o+t.height())}},deactivate:function(){this.active&&(this.active=null)},next:function(e){return(this.closed()||this.instance===e)&&this._move(e,"next",".ui-menu-item:first"),e.element},previous:function(e){return(this.closed()||this.instance===e)&&this._move(e,"prev",".ui-menu-item:last"),e.element},first:function(e){return this.instance===e&&(this.active&&0===this.active.prevAll(".ui-menu-item").length)},last:function(e){return this.instance===e&&(this.active&&0===this.active.nextAll(".ui-menu-item").length)},selected:function(e){return this.instance===e&&this.active?this.active:null},open:function(i){var o=this,s=i.getTime(),r=i.options.dynamic&&s;if(!i.options.dropdown||i.options.hideDropdown)return i.element;i.element.data("timepicker-event-namespace",Math.random()),i.element.closest(".sui-form-field").length?i.element.closest(".sui-form-field").append(o.container):o.container.insertAfter(i.element.closest(".hustle-layout")),e(n).bind("click.timepicker-"+i.element.data("timepicker-event-namespace"),function(e){i.element.get(0)===e.target?i.element.data("timepicker-user-clicked-outside",!1):i.element.data("timepicker-user-clicked-outside",!0).blur()}),(i.rebuild||!i.items||r)&&(i.items=o._items(i,r?s:null)),(i.rebuild||o.instance!==i||r)&&(e.fn.jquery<"1.4.2"?(o.viewport.children().remove(),o.viewport.append(i.items),o.viewport.find("a").bind("mouseover.timepicker",function(){o.activate(i,e(this).parent())}).bind("mouseout.timepicker",function(){o.deactivate(i)}).bind("click.timepicker",function(t){t.preventDefault(),o.select(i,e(this).parent())})):(o.viewport.children().detach(),o.viewport.append(i.items))),i.rebuild=!1,o.container.removeClass("ui-timepicker-standard ui-timepicker-corners"),o.container.addClass("hustle-show"),o.container.hasClass("ui-timepicker-no-scrollbar")||i.options.scrollbar||(o.container.addClass("ui-timepicker-no-scrollbar"),o.viewport.css({paddingRight:40}));o.container.outerHeight(),o.container.height(),i.options.zindex?i.options.zindex:i.element.offsetParent().css("z-index");var a=i.element.closest(".hustle-field"),l=a.position();viewHeight=Math.max(n.documentElement.clientHeight,t.innerHeight||0),o.container.css({top:l.top+i.element.outerHeight(),left:l.left}),o.container.addClass("hustle-show"),l=a.position(),o.container.css({width:i.element.outerWidth(),position:"absolute",zIndex:999999,left:l.left});var c=a.offset().top-e(n).scrollTop();return viewHeight-c<200&&o.container.css({top:l.top-o.container.outerHeight()}),o.instance=i,s?i.items.each(function(){var t=e(this);return(e.fn.jquery<"1.4.2"?e.fn.timepicker.parseTime(t.find("a").text()):t.data("time-value")).getTime()!==s.getTime()||(o.activate(i,t),!1)}):o.deactivate(i),i.element},close:function(t){return this.instance===t&&(this.container.removeClass("hustle-show"),this.ui.scrollTop(0)),e(n).unbind("click.timepicker-"+t.element.data("timepicker-event-namespace")),t.element},closed:function(){return this.ui.is(":hidden")},destroy:function(e){return this.close(e,!0),e.element.unbind(".timepicker").data("TimePicker",null)},parse:function(t,n){return e.fn.timepicker.parseTime(n)},format:function(t,n,i){return i=i||t.options.timeFormat,e.fn.timepicker.formatTime(i,n)},getTime:function(t){var n=e.fn.timepicker.parseTime(t.element.val());return n instanceof Date&&!this._isValidTime(t,n)?null:n instanceof Date&&t.selectedTime?t.format(n)===t.format(t.selectedTime)?t.selectedTime:n:n instanceof Date?n:null},setTime:function(t,n,i){var s=t.selectedTime;if("string"==typeof n&&(n=t.parse(n)),n&&n.getMinutes&&this._isValidTime(t,n)){if(n=o(n),t.selectedTime=n,t.element.val(t.format(n,t.options.timeFormat)),i)return t}else t.selectedTime=null;return null===s&&null===t.selectedTime||(t.element.trigger("time-change",[n]),e.isFunction(t.options.change)&&t.options.change.apply(t.element,[n])),t.element},option:function(t,n,i){if(void 0===i)return t.options[n];var o,s,r=t.getTime();"string"==typeof n?(o={})[n]=i:o=n,s=["minHour","minMinutes","minTime","maxHour","maxMinutes","maxTime","startHour","startMinutes","startTime","timeFormat","interval","dropdown"],e.each(o,function(n){t.options[n]=o[n],t.rebuild=t.rebuild||e.inArray(n,s)>-1}),t.rebuild&&t.setTime(r)}},e.TimePicker.defaults={timeFormat:"hh:mm p",minHour:null,minMinutes:null,minTime:null,maxHour:null,maxMinutes:null,maxTime:null,startHour:null,startMinutes:null,startTime:null,interval:30,dynamic:!0,theme:null,zindex:null,dropdown:!0,scrollbar:!1,change:function(){}},e.TimePicker.methods={chainable:["next","previous","open","close","destroy","setTime"]},e.fn.timepicker=function(t){if("string"==typeof t){var n,i,o=Array.prototype.slice.call(arguments,1);return i=this[n="option"===t&&arguments.length>2?"each":-1!==e.inArray(t,e.TimePicker.methods.chainable)?"each":"map"](function(){var n=e(this).data("TimePicker");if("object"===_typeof(n))return n[t].apply(n,o)}),"map"===n&&1===this.length?e.makeArray(i).shift():"map"===n?e.makeArray(i):i}if(1===this.length&&this.data("TimePicker"))return this.data("TimePicker");var s=e.extend({},e.TimePicker.defaults,t);return this.each(function(){e.TimePicker.instance().register(this,s)})},e.fn.timepicker.formatTime=function(e,t){var n=t.getHours(),o=n%12,s=t.getMinutes(),r=t.getSeconds(),a={hh:i((0===o?12:o).toString(),"0",2),HH:i(n.toString(),"0",2),mm:i(s.toString(),"0",2),ss:i(r.toString(),"0",2),h:0===o?12:o,H:n,m:s,s:r,p:n>11?"PM":"AM"},l=e,c="";for(c in a)a.hasOwnProperty(c)&&(l=l.replace(new RegExp(c,"g"),a[c]));return l=l.replace(new RegExp("a","g"),n>11?"pm":"am")},e.fn.timepicker.parseTime=(r=(s=[[/^(\d+)$/,"$1"],[/^:(\d)$/,"$10"],[/^:(\d+)/,"$1"],[/^(\d):([7-9])$/,"0$10$2"],[/^(\d):(\d\d)$/,"$1$2"],[/^(\d):(\d{1,})$/,"0$1$20"],[/^(\d\d):([7-9])$/,"$10$2"],[/^(\d\d):(\d)$/,"$1$20"],[/^(\d\d):(\d*)$/,"$1$2"],[/^(\d{3,}):(\d)$/,"$10$2"],[/^(\d{3,}):(\d{2,})/,"$1$2"],[/^(\d):(\d):(\d)$/,"0$10$20$3"],[/^(\d{1,2}):(\d):(\d\d)/,"$10$2$3"]]).length,function(t){var n,i,a=o(new Date),l=!1,c=!1,u=!1;if(void 0===t||!t.toLowerCase)return null;t=t.toLowerCase(),i=!(n=/a/.test(t))&&/p/.test(t),t=t.replace(/[^0-9:]/g,"").replace(/:+/g,":");for(var d=0;d<r;d+=1)if(s[d][0].test(t)){t=t.replace(s[d][0],s[d][1]);break}return 1===(t=t.replace(/:/g,"")).length?l=t:2===t.length?l=t:3===t.length||5===t.length?(l=t.substr(0,1),c=t.substr(1,2),u=t.substr(3,2)):(4===t.length||t.length>5)&&(l=t.substr(0,2),c=t.substr(2,2),u=t.substr(4,2)),t.length>0&&t.length<5&&(t.length<3&&(c=0),u=0),!1!==l&&!1!==c&&!1!==u&&(l=parseInt(l,10),c=parseInt(c,10),u=parseInt(u,10),n&&12===l?l=0:i&&l<12&&(l+=12),l>24?t.length>=6?e.fn.timepicker.parseTime(t.substr(0,5)):e.fn.timepicker.parseTime(t+"0"+(n?"a":"")+(i?"p":"")):(a.setHours(l,c,u),a))})}()}),function(e){"use strict";"object"!==_typeof(window.HUI)&&(window.HUI={}),HUI.timepicker=function(t){var n=e(t);e(".hustle-ui").each(function(){var t=e(this),i=(t.data("id"),t.find(n));i.timepicker({timeFormat:""!==i.data("time-format")?i.data("time-format"):"h:mm p",interval:""!==i.data("time-interval")?i.data("time-interval"):60,minTime:"0",maxTime:"11:59pm",defaultTime:""!==i.data("time-default")?i.data("time-default"):null,startTime:"00:00",dynamic:!1,dropdown:!0===i.data("time-dropdown"),hideDropdown:!0===i.data("hide-dropdown"),scrollbar:!0===i.data("time-dropdown")})})}}(jQuery);
|
assets/js/admin.debug.js
CHANGED
@@ -727,7 +727,7 @@ if ( 'undefined' !== typeof Backbone ) {
|
|
727 |
if ( 'delete-all' === value ) {
|
728 |
let data = {
|
729 |
ids: ids.join( ',' ),
|
730 |
-
nonce: $this.siblings( '
|
731 |
title: $this.data( 'title' ),
|
732 |
description: $this.data( 'description' ),
|
733 |
action: value
|
@@ -1109,9 +1109,9 @@ Hustle.define( 'Featured_Image_Holder', function( $ ) {
|
|
1109 |
'use strict';
|
1110 |
|
1111 |
return Backbone.View.extend({
|
1112 |
-
|
1113 |
-
targetDiv: '',
|
1114 |
mediaFrame: false,
|
|
|
1115 |
options: {
|
1116 |
attribute: 'feature_image',
|
1117 |
multiple: false
|
@@ -1134,10 +1134,6 @@ Hustle.define( 'Featured_Image_Holder', function( $ ) {
|
|
1134 |
},
|
1135 |
|
1136 |
render: function() {
|
1137 |
-
var html = this.template({
|
1138 |
-
image: this.model.get( this.options.attribute )
|
1139 |
-
});
|
1140 |
-
this.setElement( html );
|
1141 |
this.defineMediaFrame();
|
1142 |
return this;
|
1143 |
},
|
@@ -1146,9 +1142,9 @@ Hustle.define( 'Featured_Image_Holder', function( $ ) {
|
|
1146 |
showImagePreviewOrButton: function() {
|
1147 |
var featureImage = this.model.get( 'feature_image' );
|
1148 |
if ( '' === featureImage || 'undefined' === typeof featureImage ) {
|
1149 |
-
this.
|
1150 |
} else {
|
1151 |
-
this.
|
1152 |
}
|
1153 |
},
|
1154 |
|
@@ -1170,10 +1166,9 @@ Hustle.define( 'Featured_Image_Holder', function( $ ) {
|
|
1170 |
if ( media.sizes && media.sizes.thumbnail && media.sizes.thumbnail.url ) {
|
1171 |
featureImageThumbnail = media.sizes.thumbnail.url;
|
1172 |
}
|
1173 |
-
self.
|
1174 |
-
self.
|
1175 |
|
1176 |
-
//self.model.set( 'feature_image', feature_image_src, {silent: true} );
|
1177 |
self.showImagePreviewOrButton();
|
1178 |
}
|
1179 |
});
|
@@ -1187,8 +1182,8 @@ Hustle.define( 'Featured_Image_Holder', function( $ ) {
|
|
1187 |
clear: function( e ) {
|
1188 |
e.preventDefault();
|
1189 |
this.model.set( 'feature_image', '' );
|
1190 |
-
this.
|
1191 |
-
this.
|
1192 |
|
1193 |
//this.model.set( 'feature_image', '', {silent: true} );
|
1194 |
this.showImagePreviewOrButton();
|
@@ -1236,6 +1231,12 @@ Hustle.define( 'Modals.Edit_Field', function( $ ) {
|
|
1236 |
|
1237 |
//select the first tab
|
1238 |
this.$( '.hustle-data-pane' ).first().trigger( 'click' );
|
|
|
|
|
|
|
|
|
|
|
|
|
1239 |
},
|
1240 |
|
1241 |
renderHeader() {
|
@@ -1273,7 +1274,10 @@ Hustle.define( 'Modals.Edit_Field', function( $ ) {
|
|
1273 |
this.$( '#hustle-data-tab--settings' ).removeClass( 'hustle-data-pane' ).addClass( 'sui-hidden' );
|
1274 |
this.$( '#hustle-data-pane--settings' ).addClass( 'sui-hidden' );
|
1275 |
|
|
|
1276 |
return;
|
|
|
|
|
1277 |
}
|
1278 |
|
1279 |
this.$( '#hustle-data-tab--settings' ).removeClass( 'sui-hidden' ).addClass( 'hustle-data-pane' );
|
@@ -2065,9 +2069,9 @@ Hustle.define( 'Modals.New_Module', function( $ ) {
|
|
2065 |
data: {},
|
2066 |
events: {
|
2067 |
'click #hustle-select-mode': 'modeSelected',
|
2068 |
-
'keypress #
|
2069 |
'click #hustle-create-module': 'createModule',
|
2070 |
-
'keypress #
|
2071 |
'click #hustle-new-module--create-back': 'goToModeStep',
|
2072 |
'change input[name="mode"]': 'modeChanged',
|
2073 |
'keydown input[name="name"]': 'nameChanged'
|
@@ -2394,42 +2398,40 @@ Hustle.define( 'Mixins.Module_Settings', function( $, doc, win ) {
|
|
2394 |
|
2395 |
return _.extend({}, Hustle.get( 'Mixins.Model_Updater' ), {
|
2396 |
|
2397 |
-
|
2398 |
-
|
2399 |
-
targetContainer: $( '#hustle-wizard-behaviour' ),
|
2400 |
|
2401 |
events: {},
|
2402 |
|
2403 |
-
init
|
2404 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2405 |
this.moduleType = optinVars.current.data.module_type;
|
2406 |
|
2407 |
-
this.stopListening( this.model, 'change', this.viewChanged );
|
2408 |
this.listenTo( this.model, 'change', this.viewChanged );
|
2409 |
-
|
2410 |
if ( 'embedded' !== this.moduleType ) {
|
2411 |
-
this.stopListening( this.model.get( 'triggers' ), 'change', this.viewChanged );
|
2412 |
this.listenTo( this.model.get( 'triggers' ), 'change', this.viewChanged );
|
2413 |
}
|
2414 |
|
2415 |
-
|
2416 |
-
|
2417 |
-
}
|
2418 |
-
},
|
2419 |
-
|
2420 |
-
render: function( args ) {
|
2421 |
-
|
2422 |
-
var data = this.model.toJSON();
|
2423 |
-
|
2424 |
-
this.setElement( this.template( _.extend({
|
2425 |
-
'shortcode_id': optinVars.current.shortcode_id
|
2426 |
-
}, data ) ) );
|
2427 |
|
2428 |
return this;
|
2429 |
-
|
2430 |
},
|
2431 |
|
2432 |
-
|
2433 |
|
2434 |
viewChanged: function( model ) {
|
2435 |
|
@@ -2473,57 +2475,40 @@ Hustle.define( 'Mixins.Module_Content', function( $, doc, win ) {
|
|
2473 |
|
2474 |
return _.extend({}, Hustle.get( 'Mixins.Model_Updater' ), {
|
2475 |
|
2476 |
-
|
2477 |
-
|
2478 |
-
moduleType: '',
|
2479 |
-
|
2480 |
-
targetContainer: $( '#hustle-wizard-content' ),
|
2481 |
|
2482 |
events: {},
|
2483 |
|
2484 |
init( opts ) {
|
2485 |
-
this.
|
|
|
|
|
2486 |
this.listenTo( this.model, 'change', this.modelUpdated );
|
2487 |
-
|
|
|
2488 |
},
|
2489 |
|
2490 |
render() {
|
2491 |
-
var data;
|
2492 |
-
if ( this.targetContainer.length ) {
|
2493 |
-
data = this.model.toJSON();
|
2494 |
-
this.setElement( this.template( _.extend({
|
2495 |
-
'module_type': this.moduleType
|
2496 |
-
}, data ) ) );
|
2497 |
-
return this;
|
2498 |
-
}
|
2499 |
-
return;
|
2500 |
-
},
|
2501 |
|
2502 |
-
|
2503 |
-
if ( this.targetContainer.length ) {
|
2504 |
-
this.renderFeaturedImage();
|
2505 |
-
}
|
2506 |
-
if ( optinVars.is_new ) {
|
2507 |
|
2508 |
-
|
2509 |
Module.Notification.open( 'success', optinVars.messages.commons.module_created.replace( /{type_name}/g, optinVars.module_name[ this.moduleType ]), 10000 );
|
2510 |
}
|
2511 |
},
|
2512 |
|
2513 |
renderFeaturedImage() {
|
2514 |
-
|
2515 |
-
|
2516 |
-
if ( ! $target.length ) {
|
2517 |
return;
|
2518 |
}
|
|
|
|
|
2519 |
this.mediaHolder = new MediaHolder({
|
2520 |
model: this.model,
|
2521 |
attribute: 'feature_image',
|
2522 |
-
moduleType: this.moduleType
|
2523 |
-
targetDiv: $target
|
2524 |
});
|
2525 |
-
$target.html( '' );
|
2526 |
-
$target.html( this.mediaHolder.$el );
|
2527 |
},
|
2528 |
|
2529 |
modelUpdated( model ) {
|
@@ -2548,82 +2533,34 @@ Hustle.define( 'Mixins.Module_Design', function( $, doc, win ) {
|
|
2548 |
|
2549 |
return _.extend({}, Hustle.get( 'Mixins.Model_Updater' ), {
|
2550 |
|
2551 |
-
|
2552 |
-
|
2553 |
-
targetContainer: $( '#hustle-wizard-appearance' ),
|
2554 |
|
2555 |
cssEditor: false,
|
2556 |
|
2557 |
-
modalSelectors: {
|
2558 |
-
'.hustle-layout .hustle-layout-content ': 'Layout',
|
2559 |
-
'.hustle-layout .hustle-title': 'Title',
|
2560 |
-
'.hustle-layout .hustle-subtitle ': 'Subtitle',
|
2561 |
-
'.hustle-layout .hustle-layout-content .hustle-image img ': 'Feat. Image',
|
2562 |
-
'.hustle-layout .hustle-layout-content .hustle-group-content p ': 'Main Content',
|
2563 |
-
'.hustle-layout .hustle-button-cta ': 'CTA Button'
|
2564 |
-
},
|
2565 |
-
|
2566 |
-
formSelectors: {
|
2567 |
-
'.hustle-layout .hustle-layout-body .hustle-layout-form ': 'Form Container',
|
2568 |
-
'.hustle-layout .hustle-layout-body .hustle-layout-form .hustle-input ': 'Input',
|
2569 |
-
'.hustle-layout .hustle-layout-body .hustle-layout-form .hustle-button-submit ': 'Submit',
|
2570 |
-
'.hustle-success ': 'Success Container',
|
2571 |
-
'.hustle-success .hustle-success-content p ': 'Success Message'
|
2572 |
-
},
|
2573 |
-
|
2574 |
-
formExtraSelectors: {
|
2575 |
-
'.hustle-layout .hustle-layout-body .hustle-form-options ': 'Container',
|
2576 |
-
'.hustle-layout .hustle-layout-body .hustle-form-options .hustle-group-title ': 'Title',
|
2577 |
-
'.hustle-layout .hustle-layout-body .hustle-radio span[aria-hidden]': 'Radio',
|
2578 |
-
'.hustle-layout .hustle-layout-body .hustle-radio span:not([aria-hidden])': 'Radio (Label)',
|
2579 |
-
'.hustle-layout .hustle-layout-body .hustle-checkbox span[aria-hidden]': 'Checkbox',
|
2580 |
-
'.hustle-layout .hustle-layout-body .hustle-checkbox span:not([aria-hidden])': 'Checkbox (Label)'
|
2581 |
-
},
|
2582 |
-
|
2583 |
events: {
|
2584 |
'click .hustle-css-stylable': 'insertSelector',
|
2585 |
'click .hustle-reset-color-palette': 'resetPickers'
|
2586 |
},
|
2587 |
|
2588 |
-
init() {
|
2589 |
|
2590 |
-
|
2591 |
-
if ( 'embedded' !== optinVars.current.data.module_type ) {
|
2592 |
-
$.extend( this.modalSelectors, { '.hustle-button-close': 'Close Button' });
|
2593 |
-
}
|
2594 |
|
2595 |
-
this.stopListening( this.model, 'change', this.viewChanged );
|
2596 |
this.listenTo( this.model, 'change', this.viewChanged );
|
2597 |
|
2598 |
// Update the Appearance tab view when "Feature image" is changed in the Content tab.
|
2599 |
Hustle.Events.off( 'modules.view.feature_image_updated' ).on( 'modules.view.feature_image_updated', $.proxy( this.ViewChangedContentTab, this ) );
|
2600 |
|
2601 |
-
|
2602 |
-
return this.render();
|
2603 |
-
}
|
2604 |
},
|
2605 |
|
2606 |
render() {
|
2607 |
|
2608 |
-
this.setElement( this.template(
|
2609 |
-
_.extend({
|
2610 |
-
modalSelectors: this.modalSelectors,
|
2611 |
-
formSelectors: this.formSelectors,
|
2612 |
-
formExtraSelectors: this.formExtraSelectors
|
2613 |
-
},
|
2614 |
-
this.model.toJSON() )
|
2615 |
-
) );
|
2616 |
-
|
2617 |
-
return this;
|
2618 |
-
|
2619 |
-
},
|
2620 |
-
|
2621 |
-
afterRender() {
|
2622 |
-
|
2623 |
this.createPickers();
|
|
|
|
|
2624 |
this.createEditor();
|
2625 |
this.cssChange();
|
2626 |
-
this.addCreatePalettesLink();
|
2627 |
},
|
2628 |
|
2629 |
// ============================================================
|
@@ -2754,6 +2691,8 @@ Hustle.define( 'Mixins.Module_Design', function( $, doc, win ) {
|
|
2754 |
self.$( 'input[data-attribute="' + key + '"]' ).val( color ).trigger( 'change' );
|
2755 |
});
|
2756 |
}
|
|
|
|
|
2757 |
},
|
2758 |
|
2759 |
resetPickers: function( e ) {
|
@@ -2939,47 +2878,24 @@ Hustle.define( 'Mixins.Module_Display', function( $, doc, win ) {
|
|
2939 |
|
2940 |
return _.extend({}, Hustle.get( 'Mixins.Model_Updater' ), {
|
2941 |
|
2942 |
-
|
2943 |
-
|
2944 |
-
moduleId: 0,
|
2945 |
-
|
2946 |
-
moduleType: '',
|
2947 |
-
|
2948 |
-
targetContainer: $( '#hustle-wizard-display' ),
|
2949 |
|
2950 |
events: {},
|
2951 |
|
2952 |
-
extViewChanged: _.noop,
|
2953 |
-
|
2954 |
init( opts ) {
|
2955 |
-
this.stopListening( this.model, 'change', this.viewChanged );
|
2956 |
-
this.listenTo( this.model, 'change', this.viewChanged );
|
2957 |
-
this.moduleType = opts.moduleType;
|
2958 |
-
},
|
2959 |
-
|
2960 |
-
render() {
|
2961 |
-
var data;
|
2962 |
-
if ( this.targetContainer.length ) {
|
2963 |
|
2964 |
-
|
|
|
2965 |
|
2966 |
-
|
2967 |
-
'module_type': this.moduleType
|
2968 |
-
}, data ) ) );
|
2969 |
-
|
2970 |
-
return this;
|
2971 |
-
}
|
2972 |
-
return;
|
2973 |
-
},
|
2974 |
|
2975 |
-
|
|
|
2976 |
},
|
2977 |
|
2978 |
-
|
2979 |
-
let changed = model.changed;
|
2980 |
|
2981 |
-
|
2982 |
-
}
|
2983 |
|
2984 |
});
|
2985 |
});
|
@@ -2990,9 +2906,7 @@ Hustle.define( 'Mixins.Module_Emails', function( $, doc, win ) {
|
|
2990 |
|
2991 |
return _.extend({}, Hustle.get( 'Mixins.Model_Updater' ), {
|
2992 |
|
2993 |
-
|
2994 |
-
|
2995 |
-
targetContainer: $( '#hustle-wizard-emails' ),
|
2996 |
|
2997 |
events: {
|
2998 |
'click .hustle-optin-field--add': 'addFields',
|
@@ -3004,22 +2918,16 @@ Hustle.define( 'Mixins.Module_Emails', function( $, doc, win ) {
|
|
3004 |
},
|
3005 |
|
3006 |
init( opts ) {
|
3007 |
-
|
3008 |
-
this.stopListening( this.model, 'change', this.viewChanged );
|
3009 |
this.listenTo( this.model, 'change', this.viewChanged );
|
3010 |
|
3011 |
-
|
3012 |
-
return this.render();
|
3013 |
-
}
|
3014 |
},
|
3015 |
|
3016 |
render() {
|
3017 |
let self = this,
|
3018 |
-
data = this.model.toJSON(),
|
3019 |
formElements = this.model.get( 'form_elements' );
|
3020 |
|
3021 |
-
this.setElement( this.template( data ) );
|
3022 |
-
|
3023 |
// Add the already stored form fields to the panel.
|
3024 |
for ( let fieldId in formElements ) {
|
3025 |
let field = formElements[ fieldId ];
|
@@ -3045,11 +2953,9 @@ Hustle.define( 'Mixins.Module_Emails', function( $, doc, win ) {
|
|
3045 |
|
3046 |
sortableContainer.on( 'sortupdate', $.proxy( self.fieldsOrderChanged, self, sortableContainer ) );
|
3047 |
|
3048 |
-
return this;
|
3049 |
-
},
|
3050 |
-
|
3051 |
-
afterRender() {
|
3052 |
this.updateDynamicValueFields();
|
|
|
|
|
3053 |
},
|
3054 |
|
3055 |
//reset all field selects
|
@@ -3544,7 +3450,8 @@ Hustle.define( 'Module.IntegrationsView', function( $, doc, win ) {
|
|
3544 |
},
|
3545 |
|
3546 |
init( opts ) {
|
3547 |
-
this.
|
|
|
3548 |
this.listenTo( Hustle.Events, 'hustle:providers:reload', this.renderProvidersTables );
|
3549 |
this.render();
|
3550 |
},
|
@@ -3636,8 +3543,6 @@ Hustle.define( 'Mixins.Module_Visibility', function( $, doc, win ) {
|
|
3636 |
|
3637 |
el: '#hustle-conditions-group',
|
3638 |
|
3639 |
-
targetContainer: $( '#hustle-conditions-group' ),
|
3640 |
-
|
3641 |
events: {
|
3642 |
|
3643 |
'click .hustle-add-new-visibility-group': 'addNewGroup',
|
@@ -3650,7 +3555,31 @@ Hustle.define( 'Mixins.Module_Visibility', function( $, doc, win ) {
|
|
3650 |
},
|
3651 |
|
3652 |
init( opts ) {
|
3653 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3654 |
this.activeConditions = {};
|
3655 |
this.render();
|
3656 |
$( '#hustle-general-conditions' ).on( 'click', $.proxy( this.switchConditions, this ) );
|
@@ -3834,6 +3763,7 @@ Hustle.define( 'Mixins.Module_Visibility', function( $, doc, win ) {
|
|
3834 |
addNewGroup() {
|
3835 |
|
3836 |
let group = this.getConditionsGroupModel(),
|
|
|
3837 |
groupId = group.get( 'group_id' );
|
3838 |
|
3839 |
this.model.set( 'conditions.' + groupId, group );
|
@@ -4030,6 +3960,7 @@ Hustle.define( 'Mixins.Wizard_View', function( $, doc, win ) {
|
|
4030 |
|
4031 |
events: {
|
4032 |
'click .sui-sidenav .sui-vertical-tab a': 'sidenav',
|
|
|
4033 |
'click a.hustle-go-to-tab': 'sidenav',
|
4034 |
'click a.notify-error-tab': 'sidenav',
|
4035 |
'click .hustle-action-save': 'saveChanges',
|
@@ -4059,7 +3990,7 @@ Hustle.define( 'Mixins.Wizard_View', function( $, doc, win ) {
|
|
4059 |
this.delegateEvents();
|
4060 |
}
|
4061 |
|
4062 |
-
this.
|
4063 |
|
4064 |
return this;
|
4065 |
|
@@ -4087,9 +4018,6 @@ Hustle.define( 'Mixins.Wizard_View', function( $, doc, win ) {
|
|
4087 |
|
4088 |
// ============================================================
|
4089 |
// Render content
|
4090 |
-
render() {
|
4091 |
-
this.renderTabs();
|
4092 |
-
},
|
4093 |
|
4094 |
/**
|
4095 |
* Render the tabs.
|
@@ -4098,47 +4026,28 @@ Hustle.define( 'Mixins.Wizard_View', function( $, doc, win ) {
|
|
4098 |
renderTabs() {
|
4099 |
|
4100 |
// Content view
|
4101 |
-
this.contentView.targetContainer.html( '' );
|
4102 |
-
this.contentView.render();
|
4103 |
this.contentView.delegateEvents();
|
4104 |
-
this.contentView.targetContainer.append( this.contentView.$el );
|
4105 |
-
this.contentView.afterRender();
|
4106 |
|
4107 |
// Emails view
|
4108 |
-
this.emailsView.targetContainer.html( '' );
|
4109 |
this.emailsView.delegateEvents();
|
4110 |
-
this.emailsView.targetContainer.append( this.emailsView.$el );
|
4111 |
-
this.emailsView.afterRender();
|
4112 |
|
4113 |
// Integrations view
|
4114 |
this.integrationsView.delegateEvents();
|
4115 |
|
4116 |
// Appearance view
|
4117 |
-
this.designView.targetContainer.html( '' );
|
4118 |
this.designView.delegateEvents();
|
4119 |
-
this.designView.targetContainer.append( this.designView.$el );
|
4120 |
-
this.designView.afterRender();
|
4121 |
|
4122 |
// Display Options View
|
4123 |
if ( 'embedded' === this.moduleType ) {
|
4124 |
-
this.displayView.targetContainer.html( '' );
|
4125 |
-
this.displayView.render();
|
4126 |
this.displayView.delegateEvents();
|
4127 |
-
this.displayView.targetContainer.append( this.displayView.$el );
|
4128 |
-
this.displayView.afterRender();
|
4129 |
}
|
4130 |
|
4131 |
// Visibility view
|
4132 |
-
//this.visibilityView.targetContainer.html( '' );
|
4133 |
this.visibilityView.delegateEvents();
|
4134 |
-
this.visibilityView.targetContainer.append( this.visibilityView.$el );
|
4135 |
this.visibilityView.afterRender();
|
4136 |
|
4137 |
// Behavior view
|
4138 |
-
this.settingsView.targetContainer.html( '' );
|
4139 |
this.settingsView.delegateEvents();
|
4140 |
-
this.settingsView.targetContainer.append( this.settingsView.$el );
|
4141 |
-
this.settingsView.afterRender();
|
4142 |
},
|
4143 |
|
4144 |
// ============================================================
|
@@ -4153,6 +4062,14 @@ Hustle.define( 'Mixins.Wizard_View', function( $, doc, win ) {
|
|
4153 |
}
|
4154 |
},
|
4155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4156 |
goToTab( tabName, updateHistory ) {
|
4157 |
|
4158 |
let $tab = this.$el.find( 'a[data-tab="' + tabName + '"]' ),
|
@@ -4273,18 +4190,18 @@ Hustle.define( 'Mixins.Wizard_View', function( $, doc, win ) {
|
|
4273 |
// Call to action
|
4274 |
var ctaUrl = this.contentView.model.get( 'cta_url' );
|
4275 |
|
4276 |
-
if (
|
4277 |
-
|
4278 |
-
|
|
|
|
|
4279 |
}
|
4280 |
-
|
4281 |
-
// Custom CSS
|
4282 |
-
this.designView.updateCustomCss();
|
4283 |
-
|
4284 |
},
|
4285 |
|
4286 |
validate() {
|
4287 |
|
|
|
|
|
4288 |
this.setContentFromTinymce( true );
|
4289 |
this.sanitizeData();
|
4290 |
|
@@ -7469,53 +7386,6 @@ Module.Model = Hustle.get( 'Models.M' ).extend({
|
|
7469 |
}
|
7470 |
});
|
7471 |
|
7472 |
-
Hustle.define( 'Models.Module_Defaults', function( $, doc, win ) {
|
7473 |
-
|
7474 |
-
'use strict';
|
7475 |
-
|
7476 |
-
const visibilityDefaults = {
|
7477 |
-
defaults: {
|
7478 |
-
conditions: ''
|
7479 |
-
},
|
7480 |
-
|
7481 |
-
initialize( data ) {
|
7482 |
-
|
7483 |
-
_.extend( this, data );
|
7484 |
-
|
7485 |
-
if ( ! ( this.get( 'conditions' ) instanceof Backbone.Model ) ) {
|
7486 |
-
|
7487 |
-
/**
|
7488 |
-
* Make sure conditions is not an array
|
7489 |
-
*/
|
7490 |
-
if ( _.isEmpty( this.get( 'conditions' ) ) && _.isArray( this.get( 'conditions' ) ) ) {
|
7491 |
-
this.conditions = {};
|
7492 |
-
}
|
7493 |
-
|
7494 |
-
let hModel = Hustle.get( 'Model' );
|
7495 |
-
this.set( 'conditions', new hModel( this.conditions ), { silent: true });
|
7496 |
-
}
|
7497 |
-
}
|
7498 |
-
},
|
7499 |
-
|
7500 |
-
settingsDefaults = {
|
7501 |
-
defaults: {},
|
7502 |
-
initialize( data ) {
|
7503 |
-
_.extend( this, data );
|
7504 |
-
|
7505 |
-
const Triggers = Hustle.get( 'Models.Trigger' );
|
7506 |
-
|
7507 |
-
if ( ! ( this.get( 'triggers' ) instanceof Backbone.Model ) ) {
|
7508 |
-
this.set( 'triggers', new Triggers( this.triggers ), { silent: true });
|
7509 |
-
}
|
7510 |
-
}
|
7511 |
-
};
|
7512 |
-
|
7513 |
-
return {
|
7514 |
-
visibilityDefaults,
|
7515 |
-
settingsDefaults
|
7516 |
-
};
|
7517 |
-
});
|
7518 |
-
|
7519 |
( function( $ ) {
|
7520 |
|
7521 |
'use strict';
|
@@ -7999,17 +7869,43 @@ Hustle.define( 'Models.Module_Defaults', function( $, doc, win ) {
|
|
7999 |
* @since 4.0.3
|
8000 |
* @param object slug of provider.
|
8001 |
*/
|
8002 |
-
open( slug ) {
|
8003 |
|
8004 |
let dialogId = $( '#hustle-dialog-migrate--' + slug ),
|
|
|
8005 |
closeClick = () => {
|
8006 |
self.close( dialogId, slug );
|
8007 |
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8008 |
};
|
8009 |
|
8010 |
dialogId.find( '.sui-dialog-close' ).on( 'click', closeClick );
|
8011 |
dialogId.find( '.sui-dialog-overlay' ).on( 'click', closeClick );
|
|
|
|
|
|
|
|
|
|
|
|
|
8012 |
setTimeout( () => SUI.dialogs[ 'hustle-dialog-migrate--' + slug ].show(), 300 );
|
|
|
8013 |
},
|
8014 |
close( dialogId, slug ) {
|
8015 |
|
@@ -8022,7 +7918,31 @@ Hustle.define( 'Models.Module_Defaults', function( $, doc, win ) {
|
|
8022 |
setTimeout( () => dialogId.attr( 'aria-hidden', 'true' ), 300 );
|
8023 |
|
8024 |
SUI.dialogs[ 'hustle-dialog-migrate--' + slug ].hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8025 |
}
|
|
|
8026 |
};
|
8027 |
|
8028 |
/**
|
@@ -8419,15 +8339,9 @@ Hustle.define( 'Models.Module_Defaults', function( $, doc, win ) {
|
|
8419 |
* Return URL param value
|
8420 |
*/
|
8421 |
getUrlParam: function( param ) {
|
8422 |
-
var
|
8423 |
-
|
8424 |
-
|
8425 |
-
|
8426 |
-
for ( i = 0; i < urlParams.length; i++ ) {
|
8427 |
-
paramName = urlParams[i].split( '=' );
|
8428 |
-
if ( paramName[0] === param ) {
|
8429 |
-
return paramName[1];
|
8430 |
-
}
|
8431 |
}
|
8432 |
|
8433 |
return false;
|
@@ -8603,6 +8517,8 @@ Hustle.define( 'SShare.Content_View', function( $, doc, win ) {
|
|
8603 |
|
8604 |
_.extend({}, Hustle.get( 'Mixins.Module_Content' ), {
|
8605 |
|
|
|
|
|
8606 |
activePlatforms: [],
|
8607 |
|
8608 |
events: {
|
@@ -8613,47 +8529,32 @@ Hustle.define( 'SShare.Content_View', function( $, doc, win ) {
|
|
8613 |
// Open Add Platforms popup
|
8614 |
'click .hustle-choose-platforms': 'openPlatformsModal'
|
8615 |
},
|
8616 |
-
render
|
|
|
|
|
8617 |
|
8618 |
-
if (
|
8619 |
-
|
8620 |
-
data
|
8621 |
-
|
8622 |
-
this.setElement( this.template( _.extend({
|
8623 |
-
'module_type': me.moduleType
|
8624 |
-
}, data ) ) );
|
8625 |
-
|
8626 |
-
if ( 'undefined' !== typeof data.social_icons && data.social_icons ) {
|
8627 |
-
for ( let platform in data.social_icons ) {
|
8628 |
-
me.addPlatformToPanel( platform, data.social_icons[ platform ]);
|
8629 |
-
}
|
8630 |
}
|
|
|
8631 |
|
8632 |
-
|
8633 |
-
|
8634 |
-
|
8635 |
-
|
8636 |
-
|
8637 |
-
|
8638 |
-
sortableContainer.on( 'sortupdate', $.proxy( me.platformsOrderChanged, me, sortableContainer ) );
|
8639 |
|
8640 |
-
|
8641 |
-
for ( let platform in optinVars.social_platforms ) {
|
8642 |
-
me.addPlatformToDialog( platform );
|
8643 |
-
}
|
8644 |
|
8645 |
-
|
|
|
|
|
8646 |
}
|
8647 |
-
return;
|
8648 |
-
},
|
8649 |
-
|
8650 |
-
afterRender() {
|
8651 |
|
8652 |
this.bindRemoveService();
|
8653 |
|
8654 |
-
if (
|
8655 |
-
|
8656 |
-
// TODO: get 'is_new' from js utils.
|
8657 |
Module.Notification.open( 'success', optinVars.messages.commons.module_created.replace( /{type_name}/g, optinVars.module_name[ this.moduleType ]), 10000 );
|
8658 |
}
|
8659 |
},
|
@@ -8724,7 +8625,6 @@ Hustle.define( 'SShare.Content_View', function( $, doc, win ) {
|
|
8724 |
let template = Optin.template( 'hustle-add-platform-li-tpl' ),
|
8725 |
$container = $( '#hustle_add_platforms_container' ),
|
8726 |
data = this.getPlatformViewDefaults( platform );
|
8727 |
-
|
8728 |
$container.append( template( data ) );
|
8729 |
},
|
8730 |
|
@@ -8996,16 +8896,20 @@ Hustle.define( 'SShare.Design_View', function( $, doc, win ) {
|
|
8996 |
|
8997 |
_.extend({}, Hustle.get( 'Mixins.Model_Updater' ), Hustle.get( 'Mixins.Module_Design' ), {
|
8998 |
|
8999 |
-
beforeRender() {
|
9000 |
|
9001 |
-
|
9002 |
-
|
9003 |
-
},
|
|
|
|
|
9004 |
|
9005 |
-
|
9006 |
-
if ( this.targetContainer.length ) {
|
9007 |
this.createPickers();
|
9008 |
-
|
|
|
|
|
|
|
9009 |
|
9010 |
// Trigger preview when this tab is shown.
|
9011 |
$( 'a[data-tab="appearance"]' ).on( 'click', $.proxy( this.updatePreview, this ) );
|
@@ -9104,9 +9008,8 @@ Hustle.define( 'SShare.Display_View', function( $ ) {
|
|
9104 |
|
9105 |
return Hustle.View.extend(
|
9106 |
_.extend({}, Hustle.get( 'Mixins.Module_Display' ), {
|
9107 |
-
moduleType: 'social_sharing',
|
9108 |
|
9109 |
-
|
9110 |
|
9111 |
if ( ( _.intersection([ 'float_desktop_enabled', 'float_mobile_enabled', 'inline_enabled', 'widget_enabled', 'shortcode_enabled' ], Object.keys( changed ) ) ).length ) {
|
9112 |
|
@@ -9248,11 +9151,11 @@ Hustle.define( 'Modals.Services_Platforms', function( $ ) {
|
|
9248 |
});
|
9249 |
});
|
9250 |
|
9251 |
-
Hustle.define( 'SShare.View', function(
|
|
|
9252 |
'use strict';
|
9253 |
return Hustle.View.extend(
|
9254 |
_.extend({}, Hustle.get( 'Mixins.Wizard_View' ), {
|
9255 |
-
moduleType: 'social_sharing',
|
9256 |
|
9257 |
_events: {
|
9258 |
'hustle_update_prewiev #hui-preview-social-shares-floating': 'updatePreview'
|
@@ -9303,29 +9206,17 @@ Hustle.define( 'SShare.View', function( $, doc, win ) {
|
|
9303 |
*/
|
9304 |
renderTabs() {
|
9305 |
|
9306 |
-
//
|
9307 |
-
this.contentView.targetContainer.html( '' );
|
9308 |
-
this.contentView.render();
|
9309 |
this.contentView.delegateEvents();
|
9310 |
-
this.contentView.targetContainer.append( this.contentView.$el );
|
9311 |
-
this.contentView.afterRender();
|
9312 |
|
9313 |
// Appearance view
|
9314 |
-
this.designView.targetContainer.html( '' );
|
9315 |
this.designView.delegateEvents();
|
9316 |
-
this.designView.targetContainer.append( this.designView.$el );
|
9317 |
-
this.designView.afterRender();
|
9318 |
|
9319 |
// Display Options View
|
9320 |
-
this.displayView.targetContainer.html( '' );
|
9321 |
-
this.displayView.render();
|
9322 |
this.displayView.delegateEvents();
|
9323 |
-
this.displayView.targetContainer.append( this.displayView.$el );
|
9324 |
-
this.displayView.afterRender();
|
9325 |
|
9326 |
// Visibility view.
|
9327 |
this.visibilityView.delegateEvents();
|
9328 |
-
this.visibilityView.targetContainer.append( this.visibilityView.$el );
|
9329 |
this.visibilityView.afterRender();
|
9330 |
},
|
9331 |
|
@@ -9349,7 +9240,7 @@ Hustle.define( 'SShare.View', function( $, doc, win ) {
|
|
9349 |
);
|
9350 |
});
|
9351 |
|
9352 |
-
|
9353 |
|
9354 |
'use strict';
|
9355 |
|
@@ -9377,9 +9268,6 @@ Hustle.define( 'Popup.Module', function() {
|
|
9377 |
return;
|
9378 |
}
|
9379 |
|
9380 |
-
const moduleSectionModels = Hustle.get( 'Models.Module_Defaults' ),
|
9381 |
-
{ visibilityDefaults, settingsDefaults } = moduleSectionModels;
|
9382 |
-
|
9383 |
let View = Hustle.View.extend( Hustle.get( 'Mixins.Wizard_View' ) ),
|
9384 |
ViewContent = Hustle.View.extend( Hustle.get( 'Mixins.Module_Content' ) ),
|
9385 |
ViewEmails = Hustle.View.extend( Hustle.get( 'Mixins.Module_Emails' ) ),
|
@@ -9389,57 +9277,23 @@ Hustle.define( 'Popup.Module', function() {
|
|
9389 |
ViewIntegrations = Hustle.get( 'Module.IntegrationsView' ),
|
9390 |
|
9391 |
ModelView = Module.Model,
|
9392 |
-
|
9393 |
-
ModelBaseEmails = Hustle.get( 'Models.M' ),
|
9394 |
-
ModelBaseDesign = Hustle.get( 'Models.M' ),
|
9395 |
-
ModelBaseIntegrations = Hustle.get( 'Models.M' ),
|
9396 |
-
ModelBaseVisibility = Hustle.get( 'Models.M' ).extend({
|
9397 |
-
defaults: visibilityDefaults.defaults,
|
9398 |
-
initialize: visibilityDefaults.initialize
|
9399 |
-
}),
|
9400 |
-
ModelBaseSettings = Hustle.get( 'Models.M' ).extend({
|
9401 |
-
defaults: settingsDefaults.defaults,
|
9402 |
-
initialize: settingsDefaults.initialize
|
9403 |
-
});
|
9404 |
-
|
9405 |
-
let ModelBase = new ModelView( optinVars.current.data || {}),
|
9406 |
-
ModelContent = new ModelBaseContent( optinVars.current.content || {}),
|
9407 |
-
ModelEmails = new ModelBaseEmails( optinVars.current.emails || {}),
|
9408 |
-
ModelDesign = new ModelBaseDesign( optinVars.current.design || {}),
|
9409 |
-
modelIntegrations = new ModelBaseIntegrations( optinVars.current.integrations_settings || {}),
|
9410 |
-
ModelVisibility = new ModelBaseVisibility( optinVars.current.visibility || {}),
|
9411 |
-
ModelSettings = new ModelBaseSettings( optinVars.current.settings || {})
|
9412 |
-
;
|
9413 |
|
9414 |
return new View({
|
9415 |
-
model:
|
9416 |
-
contentView: new ViewContent({
|
9417 |
-
|
9418 |
-
|
9419 |
-
}),
|
9420 |
-
|
9421 |
-
|
9422 |
-
}),
|
9423 |
-
designView: new ViewDesign({
|
9424 |
-
model: ModelDesign
|
9425 |
-
}),
|
9426 |
-
integrationsView: new ViewIntegrations({
|
9427 |
-
model: modelIntegrations,
|
9428 |
-
moduleId: optinVars.current.data.module_id
|
9429 |
-
}),
|
9430 |
-
visibilityView: new ViewVisibility({
|
9431 |
-
model: ModelVisibility,
|
9432 |
-
moduleType: optinVars.current.data.module_type
|
9433 |
-
}),
|
9434 |
-
settingsView: new ViewSettings({
|
9435 |
-
model: ModelSettings
|
9436 |
-
})
|
9437 |
});
|
9438 |
|
9439 |
}() );
|
9440 |
-
});
|
9441 |
|
9442 |
-
|
|
|
|
|
9443 |
|
9444 |
'use strict';
|
9445 |
|
@@ -9467,9 +9321,6 @@ Hustle.define( 'Slidein.Module', function() {
|
|
9467 |
return;
|
9468 |
}
|
9469 |
|
9470 |
-
const moduleSectionModels = Hustle.get( 'Models.Module_Defaults' ),
|
9471 |
-
{ visibilityDefaults, settingsDefaults } = moduleSectionModels;
|
9472 |
-
|
9473 |
let View = Hustle.View.extend( Hustle.get( 'Mixins.Wizard_View' ) ),
|
9474 |
ViewContent = Hustle.View.extend( Hustle.get( 'Mixins.Module_Content' ) ),
|
9475 |
ViewEmails = Hustle.View.extend( Hustle.get( 'Mixins.Module_Emails' ) ),
|
@@ -9479,57 +9330,22 @@ Hustle.define( 'Slidein.Module', function() {
|
|
9479 |
ViewIntegrations = Hustle.get( 'Module.IntegrationsView' ),
|
9480 |
|
9481 |
ModelView = Module.Model,
|
9482 |
-
|
9483 |
-
ModelBaseEmails = Hustle.get( 'Models.M' ),
|
9484 |
-
ModelBaseDesign = Hustle.get( 'Models.M' ),
|
9485 |
-
ModelBaseIntegrations = Hustle.get( 'Models.M' ),
|
9486 |
-
ModelBaseVisibility = Hustle.get( 'Models.M' ).extend({
|
9487 |
-
defaults: visibilityDefaults.defaults,
|
9488 |
-
initialize: visibilityDefaults.initialize
|
9489 |
-
}),
|
9490 |
-
ModelBaseSettings = Hustle.get( 'Models.M' ).extend({
|
9491 |
-
defaults: settingsDefaults.defaults,
|
9492 |
-
initialize: settingsDefaults.initialize
|
9493 |
-
});
|
9494 |
-
|
9495 |
-
let ModelBase = new ModelView( optinVars.current.data || {}),
|
9496 |
-
ModelContent = new ModelBaseContent( optinVars.current.content || {}),
|
9497 |
-
ModelEmails = new ModelBaseEmails( optinVars.current.emails || {}),
|
9498 |
-
ModelDesign = new ModelBaseDesign( optinVars.current.design || {}),
|
9499 |
-
modelIntegrations = new ModelBaseIntegrations( optinVars.current.integrations_settings || {}),
|
9500 |
-
ModelVisibility = new ModelBaseVisibility( optinVars.current.visibility || {}),
|
9501 |
-
ModelSettings = new ModelBaseSettings( optinVars.current.settings || {})
|
9502 |
-
;
|
9503 |
|
9504 |
return new View({
|
9505 |
-
model:
|
9506 |
-
contentView: new ViewContent({
|
9507 |
-
|
9508 |
-
|
9509 |
-
}),
|
9510 |
-
|
9511 |
-
|
9512 |
-
}),
|
9513 |
-
designView: new ViewDesign({
|
9514 |
-
model: ModelDesign
|
9515 |
-
}),
|
9516 |
-
integrationsView: new ViewIntegrations({
|
9517 |
-
model: modelIntegrations,
|
9518 |
-
moduleId: optinVars.current.data.module_id
|
9519 |
-
}),
|
9520 |
-
visibilityView: new ViewVisibility({
|
9521 |
-
model: ModelVisibility,
|
9522 |
-
moduleType: optinVars.current.data.module_type
|
9523 |
-
}),
|
9524 |
-
settingsView: new ViewSettings({
|
9525 |
-
model: ModelSettings
|
9526 |
-
})
|
9527 |
});
|
9528 |
|
9529 |
}() );
|
9530 |
-
});
|
9531 |
|
9532 |
-
|
9533 |
|
9534 |
'use strict';
|
9535 |
|
@@ -9552,73 +9368,34 @@ Hustle.define( 'Embedded.Module', function() {
|
|
9552 |
return;
|
9553 |
}
|
9554 |
|
9555 |
-
const moduleSectionModels = Hustle.get( 'Models.Module_Defaults' ),
|
9556 |
-
{ visibilityDefaults } = moduleSectionModels;
|
9557 |
-
|
9558 |
let view = Hustle.View.extend( Hustle.get( 'Mixins.Wizard_View' ) ),
|
9559 |
-
|
9560 |
-
|
9561 |
-
|
9562 |
-
|
9563 |
-
|
9564 |
ViewSettings = Hustle.View.extend( Hustle.get( 'Mixins.Module_Settings' ) ),
|
9565 |
ViewIntegrations = Hustle.get( 'Module.IntegrationsView' ),
|
9566 |
|
9567 |
viewModel = Module.Model,
|
9568 |
-
|
9569 |
-
emailsBaseModel = Hustle.get( 'Models.M' ),
|
9570 |
-
designBaseModel = Hustle.get( 'Models.M' ),
|
9571 |
-
ModelBaseIntegrations = Hustle.get( 'Models.M' ),
|
9572 |
-
displayBaseModel = Hustle.get( 'Models.M' ),
|
9573 |
-
visibilityBaseModel = Hustle.get( 'Models.M' ).extend({
|
9574 |
-
defaults: visibilityDefaults.defaults,
|
9575 |
-
initialize: visibilityDefaults.initialize
|
9576 |
-
}),
|
9577 |
-
ModelBaseSettings = Hustle.get( 'Models.M' );
|
9578 |
-
|
9579 |
-
let ModelBase = new viewModel( optinVars.current.data || {}),
|
9580 |
-
ModelContent = new contentBaseModel( optinVars.current.content || {}),
|
9581 |
-
ModelEmails = new emailsBaseModel( optinVars.current.emails || {}),
|
9582 |
-
ModelDesign = new designBaseModel( optinVars.current.design || {}),
|
9583 |
-
modelIntegrations = new ModelBaseIntegrations( optinVars.current.integrations_settings || {}),
|
9584 |
-
ModelDisplay = new displayBaseModel( optinVars.current.display || {}),
|
9585 |
-
ModelVisibility = new visibilityBaseModel( optinVars.current.visibility || {}),
|
9586 |
-
ModelSettings = new ModelBaseSettings( optinVars.current.settings || {});
|
9587 |
|
9588 |
return new view({
|
9589 |
-
model:
|
9590 |
-
contentView: new
|
9591 |
-
|
9592 |
-
|
9593 |
-
}),
|
9594 |
-
|
9595 |
-
|
9596 |
-
})
|
9597 |
-
designView: new designView({
|
9598 |
-
model: ModelDesign
|
9599 |
-
}),
|
9600 |
-
integrationsView: new ViewIntegrations({
|
9601 |
-
model: modelIntegrations,
|
9602 |
-
moduleId: optinVars.current.data.module_id
|
9603 |
-
}),
|
9604 |
-
displayView: new displayView({
|
9605 |
-
model: ModelDisplay,
|
9606 |
-
moduleType: optinVars.current.data.module_type
|
9607 |
-
}),
|
9608 |
-
visibilityView: new visibilityView({
|
9609 |
-
model: ModelVisibility,
|
9610 |
-
moduleType: optinVars.current.data.module_type
|
9611 |
-
}),
|
9612 |
-
settingsView: new ViewSettings({
|
9613 |
-
model: ModelSettings
|
9614 |
-
})
|
9615 |
});
|
9616 |
|
9617 |
}() );
|
9618 |
|
9619 |
-
});
|
9620 |
|
9621 |
-
|
9622 |
|
9623 |
'use strict';
|
9624 |
|
@@ -9647,62 +9424,24 @@ Hustle.define( 'SShare.Module', function( $ ) {
|
|
9647 |
return;
|
9648 |
}
|
9649 |
|
9650 |
-
const moduleSectionModels = Hustle.get( 'Models.Module_Defaults' ),
|
9651 |
-
{ visibilityDefaults } = moduleSectionModels;
|
9652 |
-
|
9653 |
-
// Views. //
|
9654 |
const view = Hustle.get( 'SShare.View' ),
|
9655 |
-
|
9656 |
-
|
9657 |
-
|
9658 |
-
|
9659 |
|
9660 |
-
// Models' base. //
|
9661 |
viewModel = Module.Model,
|
9662 |
-
|
9663 |
-
displayModelBase = Hustle.get( 'Models.M' ),
|
9664 |
-
designModelBase = Hustle.get( 'Models.M' ),
|
9665 |
-
visibilityModelBase = Hustle.get( 'Models.M' ).extend({
|
9666 |
-
defaults: visibilityDefaults.defaults,
|
9667 |
-
initialize: visibilityDefaults.initialize
|
9668 |
-
}),
|
9669 |
-
|
9670 |
-
// Models instances. //
|
9671 |
-
baseModel = new viewModel( optinVars.current.data || {}),
|
9672 |
-
contentModel = new contentModelBase( optinVars.current.content || {}),
|
9673 |
-
displayModel = new displayModelBase( optinVars.current.display || {}),
|
9674 |
-
designModel = new designModelBase( optinVars.current.design || {}),
|
9675 |
-
visibilityModel = new visibilityModelBase( optinVars.current.visibility || {});
|
9676 |
-
|
9677 |
-
|
9678 |
-
//if ( parseInt( optinVars.current.is_ss_limited ) ) {
|
9679 |
-
// return;
|
9680 |
-
//}
|
9681 |
|
9682 |
return new view({
|
9683 |
-
model:
|
9684 |
-
|
9685 |
-
|
9686 |
-
|
9687 |
-
|
9688 |
-
}),
|
9689 |
-
|
9690 |
-
displayView: new displayView({
|
9691 |
-
model: displayModel
|
9692 |
-
}),
|
9693 |
-
|
9694 |
-
designView: new designView({
|
9695 |
-
model: designModel
|
9696 |
-
}),
|
9697 |
-
|
9698 |
-
visibilityView: new visibilityView({
|
9699 |
-
model: visibilityModel,
|
9700 |
-
moduleType: optinVars.current.data.module_type
|
9701 |
-
})
|
9702 |
-
|
9703 |
});
|
9704 |
}() );
|
9705 |
-
});
|
9706 |
|
9707 |
|
9708 |
Hustle.define( 'Dashboard.View', function( $, doc, win ) {
|
@@ -9934,6 +9673,10 @@ Hustle.define( 'Integrations.View', function( $, doc, win ) {
|
|
9934 |
Module.ProviderMigration.open( migrate.provider_modal );
|
9935 |
}
|
9936 |
|
|
|
|
|
|
|
|
|
9937 |
if ( migrate.hasOwnProperty( 'migration_notificaiton' ) ) {
|
9938 |
const status = 'success' === migrate.migration_notificaiton.status ? 'success' : 'error',
|
9939 |
delay = migrate.migration_notificaiton.delay ? migrate.migration_notificaiton.delay : 10000;
|
@@ -10113,7 +9856,7 @@ Hustle.define( 'ProviderNotice.View', function( $, doc, win ) {
|
|
10113 |
let provider = $( '.hustle-provider-notice' ).data( 'name' ),
|
10114 |
notice = Optin.cookie.get( this.cookieKey + provider );
|
10115 |
if ( 1 !== notice ) {
|
10116 |
-
$( '
|
10117 |
}
|
10118 |
}
|
10119 |
|
@@ -10136,6 +9879,7 @@ Hustle.define( 'Settings.View', function( $, doc, win ) {
|
|
10136 |
|
10137 |
events: {
|
10138 |
'click .sui-sidenav .sui-vertical-tab a': 'sidenav',
|
|
|
10139 |
'click .sui-pagination-wrap > button': 'pagination',
|
10140 |
'click #hustle-dialog-open--reset-settings': 'resetDialog',
|
10141 |
'click .hustle-load-on-click': 'addLoadingState',
|
@@ -10204,6 +9948,14 @@ Hustle.define( 'Settings.View', function( $, doc, win ) {
|
|
10204 |
e.preventDefault();
|
10205 |
},
|
10206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10207 |
tabUpdate: function( e ) {
|
10208 |
|
10209 |
var state = e.originalEvent.state;
|
727 |
if ( 'delete-all' === value ) {
|
728 |
let data = {
|
729 |
ids: ids.join( ',' ),
|
730 |
+
nonce: $this.siblings( 'input[name="hustle_nonce"]' ).val(),
|
731 |
title: $this.data( 'title' ),
|
732 |
description: $this.data( 'description' ),
|
733 |
action: value
|
1109 |
'use strict';
|
1110 |
|
1111 |
return Backbone.View.extend({
|
1112 |
+
|
|
|
1113 |
mediaFrame: false,
|
1114 |
+
el: '#wph-wizard-choose_image',
|
1115 |
options: {
|
1116 |
attribute: 'feature_image',
|
1117 |
multiple: false
|
1134 |
},
|
1135 |
|
1136 |
render: function() {
|
|
|
|
|
|
|
|
|
1137 |
this.defineMediaFrame();
|
1138 |
return this;
|
1139 |
},
|
1142 |
showImagePreviewOrButton: function() {
|
1143 |
var featureImage = this.model.get( 'feature_image' );
|
1144 |
if ( '' === featureImage || 'undefined' === typeof featureImage ) {
|
1145 |
+
this.$el.removeClass( 'sui-has_file' );
|
1146 |
} else {
|
1147 |
+
this.$el.addClass( 'sui-has_file' );
|
1148 |
}
|
1149 |
},
|
1150 |
|
1166 |
if ( media.sizes && media.sizes.thumbnail && media.sizes.thumbnail.url ) {
|
1167 |
featureImageThumbnail = media.sizes.thumbnail.url;
|
1168 |
}
|
1169 |
+
self.$el.find( '.sui-upload-file span' ).text( featureImageSrc ).change();
|
1170 |
+
self.$el.find( '.sui-image-preview' ).css( 'background-image', 'url( ' + featureImageThumbnail + ' )' );
|
1171 |
|
|
|
1172 |
self.showImagePreviewOrButton();
|
1173 |
}
|
1174 |
});
|
1182 |
clear: function( e ) {
|
1183 |
e.preventDefault();
|
1184 |
this.model.set( 'feature_image', '' );
|
1185 |
+
this.$el.find( '.sui-upload-file span' ).text( '' ).change();
|
1186 |
+
this.$el.find( '.sui-image-preview' ).css( 'background-image', 'url()' );
|
1187 |
|
1188 |
//this.model.set( 'feature_image', '', {silent: true} );
|
1189 |
this.showImagePreviewOrButton();
|
1231 |
|
1232 |
//select the first tab
|
1233 |
this.$( '.hustle-data-pane' ).first().trigger( 'click' );
|
1234 |
+
|
1235 |
+
// Make the search box work within the modal.
|
1236 |
+
this.$( '.sui-select' ).SUIselect2({
|
1237 |
+
dropdownParent: $( '#hustle-dialog--edit-field .sui-box' ),
|
1238 |
+
dropdownCssClass: 'sui-select-dropdown'
|
1239 |
+
});
|
1240 |
},
|
1241 |
|
1242 |
renderHeader() {
|
1274 |
this.$( '#hustle-data-tab--settings' ).removeClass( 'hustle-data-pane' ).addClass( 'sui-hidden' );
|
1275 |
this.$( '#hustle-data-pane--settings' ).addClass( 'sui-hidden' );
|
1276 |
|
1277 |
+
Module.Utils.accessibleHide( this.$( '[data-tabs]' ) );
|
1278 |
return;
|
1279 |
+
} else {
|
1280 |
+
Module.Utils.accessibleShow( this.$( '[data-tabs]' ) );
|
1281 |
}
|
1282 |
|
1283 |
this.$( '#hustle-data-tab--settings' ).removeClass( 'sui-hidden' ).addClass( 'hustle-data-pane' );
|
2069 |
data: {},
|
2070 |
events: {
|
2071 |
'click #hustle-select-mode': 'modeSelected',
|
2072 |
+
'keypress #hustle-new-module--type': 'maybeModeSelected',
|
2073 |
'click #hustle-create-module': 'createModule',
|
2074 |
+
'keypress #hustle-new-module--create': 'maybeCreateModule',
|
2075 |
'click #hustle-new-module--create-back': 'goToModeStep',
|
2076 |
'change input[name="mode"]': 'modeChanged',
|
2077 |
'keydown input[name="name"]': 'nameChanged'
|
2398 |
|
2399 |
return _.extend({}, Hustle.get( 'Mixins.Model_Updater' ), {
|
2400 |
|
2401 |
+
el: '#hustle-wizard-behaviour',
|
|
|
|
|
2402 |
|
2403 |
events: {},
|
2404 |
|
2405 |
+
init( opts ) {
|
2406 |
|
2407 |
+
const Model = opts.BaseModel.extend({
|
2408 |
+
defaults: {},
|
2409 |
+
initialize: function( data ) {
|
2410 |
+
_.extend( this, data );
|
2411 |
+
|
2412 |
+
const Triggers = Hustle.get( 'Models.Trigger' );
|
2413 |
+
|
2414 |
+
if ( ! ( this.get( 'triggers' ) instanceof Backbone.Model ) ) {
|
2415 |
+
this.set( 'triggers', new Triggers( this.triggers ), { silent: true });
|
2416 |
+
}
|
2417 |
+
}
|
2418 |
+
});
|
2419 |
+
|
2420 |
+
this.model = new Model( optinVars.current.settings || {});
|
2421 |
this.moduleType = optinVars.current.data.module_type;
|
2422 |
|
|
|
2423 |
this.listenTo( this.model, 'change', this.viewChanged );
|
|
|
2424 |
if ( 'embedded' !== this.moduleType ) {
|
|
|
2425 |
this.listenTo( this.model.get( 'triggers' ), 'change', this.viewChanged );
|
2426 |
}
|
2427 |
|
2428 |
+
// Called just to trigger the "view.rendered" action.
|
2429 |
+
this.render();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2430 |
|
2431 |
return this;
|
|
|
2432 |
},
|
2433 |
|
2434 |
+
render() {},
|
2435 |
|
2436 |
viewChanged: function( model ) {
|
2437 |
|
2475 |
|
2476 |
return _.extend({}, Hustle.get( 'Mixins.Model_Updater' ), {
|
2477 |
|
2478 |
+
el: '#hustle-wizard-content',
|
|
|
|
|
|
|
|
|
2479 |
|
2480 |
events: {},
|
2481 |
|
2482 |
init( opts ) {
|
2483 |
+
this.model = new opts.BaseModel( optinVars.current.content || {});
|
2484 |
+
this.moduleType = optinVars.current.data.module_type;
|
2485 |
+
|
2486 |
this.listenTo( this.model, 'change', this.modelUpdated );
|
2487 |
+
|
2488 |
+
this.render();
|
2489 |
},
|
2490 |
|
2491 |
render() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2492 |
|
2493 |
+
this.renderFeaturedImage();
|
|
|
|
|
|
|
|
|
2494 |
|
2495 |
+
if ( 'true' === Module.Utils.getUrlParam( 'new' ) ) {
|
2496 |
Module.Notification.open( 'success', optinVars.messages.commons.module_created.replace( /{type_name}/g, optinVars.module_name[ this.moduleType ]), 10000 );
|
2497 |
}
|
2498 |
},
|
2499 |
|
2500 |
renderFeaturedImage() {
|
2501 |
+
|
2502 |
+
if ( ! this.$( '#wph-wizard-choose_image' ).length ) {
|
|
|
2503 |
return;
|
2504 |
}
|
2505 |
+
|
2506 |
+
const MediaHolder = Hustle.get( 'Featured_Image_Holder' );
|
2507 |
this.mediaHolder = new MediaHolder({
|
2508 |
model: this.model,
|
2509 |
attribute: 'feature_image',
|
2510 |
+
moduleType: this.moduleType
|
|
|
2511 |
});
|
|
|
|
|
2512 |
},
|
2513 |
|
2514 |
modelUpdated( model ) {
|
2533 |
|
2534 |
return _.extend({}, Hustle.get( 'Mixins.Model_Updater' ), {
|
2535 |
|
2536 |
+
el: '#hustle-wizard-appearance',
|
|
|
|
|
2537 |
|
2538 |
cssEditor: false,
|
2539 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2540 |
events: {
|
2541 |
'click .hustle-css-stylable': 'insertSelector',
|
2542 |
'click .hustle-reset-color-palette': 'resetPickers'
|
2543 |
},
|
2544 |
|
2545 |
+
init( opts ) {
|
2546 |
|
2547 |
+
this.model = new opts.BaseModel( optinVars.current.design || {});
|
|
|
|
|
|
|
2548 |
|
|
|
2549 |
this.listenTo( this.model, 'change', this.viewChanged );
|
2550 |
|
2551 |
// Update the Appearance tab view when "Feature image" is changed in the Content tab.
|
2552 |
Hustle.Events.off( 'modules.view.feature_image_updated' ).on( 'modules.view.feature_image_updated', $.proxy( this.ViewChangedContentTab, this ) );
|
2553 |
|
2554 |
+
this.render();
|
|
|
|
|
2555 |
},
|
2556 |
|
2557 |
render() {
|
2558 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2559 |
this.createPickers();
|
2560 |
+
this.addCreatePalettesLink();
|
2561 |
+
|
2562 |
this.createEditor();
|
2563 |
this.cssChange();
|
|
|
2564 |
},
|
2565 |
|
2566 |
// ============================================================
|
2691 |
self.$( 'input[data-attribute="' + key + '"]' ).val( color ).trigger( 'change' );
|
2692 |
});
|
2693 |
}
|
2694 |
+
|
2695 |
+
// TODO: else, display an error message.
|
2696 |
},
|
2697 |
|
2698 |
resetPickers: function( e ) {
|
2878 |
|
2879 |
return _.extend({}, Hustle.get( 'Mixins.Model_Updater' ), {
|
2880 |
|
2881 |
+
el: '#hustle-wizard-display',
|
|
|
|
|
|
|
|
|
|
|
|
|
2882 |
|
2883 |
events: {},
|
2884 |
|
|
|
|
|
2885 |
init( opts ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2886 |
|
2887 |
+
this.model = new opts.BaseModel( optinVars.current.display || {});
|
2888 |
+
this.moduleType = optinVars.current.data.module_type;
|
2889 |
|
2890 |
+
this.listenTo( this.model, 'change', this.viewChanged );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2891 |
|
2892 |
+
// Called just to trigger the "view.rendered" action.
|
2893 |
+
this.render();
|
2894 |
},
|
2895 |
|
2896 |
+
render() {},
|
|
|
2897 |
|
2898 |
+
viewChanged( model ) {}
|
|
|
2899 |
|
2900 |
});
|
2901 |
});
|
2906 |
|
2907 |
return _.extend({}, Hustle.get( 'Mixins.Model_Updater' ), {
|
2908 |
|
2909 |
+
el: '#hustle-wizard-emails',
|
|
|
|
|
2910 |
|
2911 |
events: {
|
2912 |
'click .hustle-optin-field--add': 'addFields',
|
2918 |
},
|
2919 |
|
2920 |
init( opts ) {
|
2921 |
+
this.model = new opts.BaseModel( optinVars.current.emails || {});
|
|
|
2922 |
this.listenTo( this.model, 'change', this.viewChanged );
|
2923 |
|
2924 |
+
this.render();
|
|
|
|
|
2925 |
},
|
2926 |
|
2927 |
render() {
|
2928 |
let self = this,
|
|
|
2929 |
formElements = this.model.get( 'form_elements' );
|
2930 |
|
|
|
|
|
2931 |
// Add the already stored form fields to the panel.
|
2932 |
for ( let fieldId in formElements ) {
|
2933 |
let field = formElements[ fieldId ];
|
2953 |
|
2954 |
sortableContainer.on( 'sortupdate', $.proxy( self.fieldsOrderChanged, self, sortableContainer ) );
|
2955 |
|
|
|
|
|
|
|
|
|
2956 |
this.updateDynamicValueFields();
|
2957 |
+
|
2958 |
+
return this;
|
2959 |
},
|
2960 |
|
2961 |
//reset all field selects
|
3450 |
},
|
3451 |
|
3452 |
init( opts ) {
|
3453 |
+
this.model = new opts.BaseModel( optinVars.current.integrations_settings || {});
|
3454 |
+
this.moduleId = optinVars.current.data.module_id;
|
3455 |
this.listenTo( Hustle.Events, 'hustle:providers:reload', this.renderProvidersTables );
|
3456 |
this.render();
|
3457 |
},
|
3543 |
|
3544 |
el: '#hustle-conditions-group',
|
3545 |
|
|
|
|
|
3546 |
events: {
|
3547 |
|
3548 |
'click .hustle-add-new-visibility-group': 'addNewGroup',
|
3555 |
},
|
3556 |
|
3557 |
init( opts ) {
|
3558 |
+
|
3559 |
+
const Model = opts.BaseModel.extend({
|
3560 |
+
defaults: { conditions: '' },
|
3561 |
+
initialize: function( data ) {
|
3562 |
+
|
3563 |
+
_.extend( this, data );
|
3564 |
+
|
3565 |
+
if ( ! ( this.get( 'conditions' ) instanceof Backbone.Model ) ) {
|
3566 |
+
|
3567 |
+
/**
|
3568 |
+
* Make sure conditions is not an array
|
3569 |
+
*/
|
3570 |
+
if ( _.isEmpty( this.get( 'conditions' ) ) && _.isArray( this.get( 'conditions' ) ) ) {
|
3571 |
+
this.conditions = {};
|
3572 |
+
}
|
3573 |
+
|
3574 |
+
let hModel = Hustle.get( 'Model' );
|
3575 |
+
this.set( 'conditions', new hModel( this.conditions ), { silent: true });
|
3576 |
+
}
|
3577 |
+
}
|
3578 |
+
});
|
3579 |
+
|
3580 |
+
this.model = new Model( optinVars.current.visibility || {});
|
3581 |
+
|
3582 |
+
this.moduleType = optinVars.current.data.module_type;
|
3583 |
this.activeConditions = {};
|
3584 |
this.render();
|
3585 |
$( '#hustle-general-conditions' ).on( 'click', $.proxy( this.switchConditions, this ) );
|
3763 |
addNewGroup() {
|
3764 |
|
3765 |
let group = this.getConditionsGroupModel(),
|
3766 |
+
targetContainer = $( '#hustle-conditions-group' ),
|
3767 |
groupId = group.get( 'group_id' );
|
3768 |
|
3769 |
this.model.set( 'conditions.' + groupId, group );
|
3960 |
|
3961 |
events: {
|
3962 |
'click .sui-sidenav .sui-vertical-tab a': 'sidenav',
|
3963 |
+
'change select.sui-mobile-nav': 'sidenavMobile',
|
3964 |
'click a.hustle-go-to-tab': 'sidenav',
|
3965 |
'click a.notify-error-tab': 'sidenav',
|
3966 |
'click .hustle-action-save': 'saveChanges',
|
3990 |
this.delegateEvents();
|
3991 |
}
|
3992 |
|
3993 |
+
this.renderTabs();
|
3994 |
|
3995 |
return this;
|
3996 |
|
4018 |
|
4019 |
// ============================================================
|
4020 |
// Render content
|
|
|
|
|
|
|
4021 |
|
4022 |
/**
|
4023 |
* Render the tabs.
|
4026 |
renderTabs() {
|
4027 |
|
4028 |
// Content view
|
|
|
|
|
4029 |
this.contentView.delegateEvents();
|
|
|
|
|
4030 |
|
4031 |
// Emails view
|
|
|
4032 |
this.emailsView.delegateEvents();
|
|
|
|
|
4033 |
|
4034 |
// Integrations view
|
4035 |
this.integrationsView.delegateEvents();
|
4036 |
|
4037 |
// Appearance view
|
|
|
4038 |
this.designView.delegateEvents();
|
|
|
|
|
4039 |
|
4040 |
// Display Options View
|
4041 |
if ( 'embedded' === this.moduleType ) {
|
|
|
|
|
4042 |
this.displayView.delegateEvents();
|
|
|
|
|
4043 |
}
|
4044 |
|
4045 |
// Visibility view
|
|
|
4046 |
this.visibilityView.delegateEvents();
|
|
|
4047 |
this.visibilityView.afterRender();
|
4048 |
|
4049 |
// Behavior view
|
|
|
4050 |
this.settingsView.delegateEvents();
|
|
|
|
|
4051 |
},
|
4052 |
|
4053 |
// ============================================================
|
4062 |
}
|
4063 |
},
|
4064 |
|
4065 |
+
sidenavMobile( e ) {
|
4066 |
+
const tabName = $( e.currentTarget ).val();
|
4067 |
+
|
4068 |
+
if ( tabName ) {
|
4069 |
+
this.goToTab( tabName, true );
|
4070 |
+
}
|
4071 |
+
},
|
4072 |
+
|
4073 |
goToTab( tabName, updateHistory ) {
|
4074 |
|
4075 |
let $tab = this.$el.find( 'a[data-tab="' + tabName + '"]' ),
|
4190 |
// Call to action
|
4191 |
var ctaUrl = this.contentView.model.get( 'cta_url' );
|
4192 |
|
4193 |
+
if ( 0 !== ctaUrl.indexOf( 'mailto:' ) && 0 !== ctaUrl.indexOf( 'tel:' ) ) {
|
4194 |
+
if ( ! /^(f|ht)tps?:\/\//i.test( ctaUrl ) ) {
|
4195 |
+
ctaUrl = 'https://' + ctaUrl;
|
4196 |
+
this.contentView.model.set( 'cta_url', ctaUrl, { silent: true });
|
4197 |
+
}
|
4198 |
}
|
|
|
|
|
|
|
|
|
4199 |
},
|
4200 |
|
4201 |
validate() {
|
4202 |
|
4203 |
+
// Custom CSS
|
4204 |
+
this.designView.updateCustomCss();
|
4205 |
this.setContentFromTinymce( true );
|
4206 |
this.sanitizeData();
|
4207 |
|
7386 |
}
|
7387 |
});
|
7388 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7389 |
( function( $ ) {
|
7390 |
|
7391 |
'use strict';
|
7869 |
* @since 4.0.3
|
7870 |
* @param object slug of provider.
|
7871 |
*/
|
7872 |
+
open( slug, id = null ) {
|
7873 |
|
7874 |
let dialogId = $( '#hustle-dialog-migrate--' + slug ),
|
7875 |
+
self = this,
|
7876 |
closeClick = () => {
|
7877 |
self.close( dialogId, slug );
|
7878 |
return false;
|
7879 |
+
},
|
7880 |
+
reauthMultiID = () => {
|
7881 |
+
var form = dialogId.find( 'form' ),
|
7882 |
+
data = {},
|
7883 |
+
params = {
|
7884 |
+
slug: slug,
|
7885 |
+
// eslint-disable-next-line camelcase
|
7886 |
+
global_multi_id: id
|
7887 |
+
},
|
7888 |
+
formData = form.serialize();
|
7889 |
+
$( '#integration-migrate' ).addClass( 'sui-button-onload' );
|
7890 |
+
|
7891 |
+
// eslint-disable-next-line camelcase
|
7892 |
+
data._ajax_nonce = $( '#integration-migrate' ).data( 'nonce' );
|
7893 |
+
data.action = 'hustle_provider_migrate_aweber';
|
7894 |
+
formData = formData + '&' + $.param( params );
|
7895 |
+
data.data = formData;
|
7896 |
+
self.reauth( dialogId, data, id, slug );
|
7897 |
};
|
7898 |
|
7899 |
dialogId.find( '.sui-dialog-close' ).on( 'click', closeClick );
|
7900 |
dialogId.find( '.sui-dialog-overlay' ).on( 'click', closeClick );
|
7901 |
+
dialogId.find( '#integration-migrate' ).on( 'click', reauthMultiID );
|
7902 |
+
|
7903 |
+
if ( id ) {
|
7904 |
+
$( '#integration-migrate' ).attr( 'data-id', id );
|
7905 |
+
}
|
7906 |
+
|
7907 |
setTimeout( () => SUI.dialogs[ 'hustle-dialog-migrate--' + slug ].show(), 300 );
|
7908 |
+
|
7909 |
},
|
7910 |
close( dialogId, slug ) {
|
7911 |
|
7918 |
setTimeout( () => dialogId.attr( 'aria-hidden', 'true' ), 300 );
|
7919 |
|
7920 |
SUI.dialogs[ 'hustle-dialog-migrate--' + slug ].hide();
|
7921 |
+
},
|
7922 |
+
reauth( dialogId, data, id, slug ) {
|
7923 |
+
var self = this,
|
7924 |
+
notice = $( '.hustle_migration_notice__' + slug + '[data-id="' + id + '"]' );
|
7925 |
+
|
7926 |
+
this.ajax = $
|
7927 |
+
.post({
|
7928 |
+
url: ajaxurl,
|
7929 |
+
type: 'post',
|
7930 |
+
data: data
|
7931 |
+
})
|
7932 |
+
.done( function( result ) {
|
7933 |
+
if ( result && result.success ) {
|
7934 |
+
self.close( dialogId, slug );
|
7935 |
+
notice.hide();
|
7936 |
+
|
7937 |
+
Module.Notification.open( 'success', optinVars.messages.aweber_migration_success, 100000 );
|
7938 |
+
} else {
|
7939 |
+
$( dialogId ).find( '#integration-migrate' ).removeClass( 'sui-button-onload' );
|
7940 |
+
$( dialogId ).find( '.sui-error-message' ).removeClass( 'sui-hidden' );
|
7941 |
+
$( dialogId ).find( '.sui-form-field' ).addClass( 'sui-form-field-error' );
|
7942 |
+
}
|
7943 |
+
});
|
7944 |
}
|
7945 |
+
|
7946 |
};
|
7947 |
|
7948 |
/**
|
8339 |
* Return URL param value
|
8340 |
*/
|
8341 |
getUrlParam: function( param ) {
|
8342 |
+
var urlParams = optinVars.urlParams;
|
8343 |
+
if ( 'undefined' !== typeof urlParams[ param ]) {
|
8344 |
+
return urlParams[ param ];
|
|
|
|
|
|
|
|
|
|
|
|
|
8345 |
}
|
8346 |
|
8347 |
return false;
|
8517 |
|
8518 |
_.extend({}, Hustle.get( 'Mixins.Module_Content' ), {
|
8519 |
|
8520 |
+
el: '#hustle-wizard-content',
|
8521 |
+
|
8522 |
activePlatforms: [],
|
8523 |
|
8524 |
events: {
|
8529 |
// Open Add Platforms popup
|
8530 |
'click .hustle-choose-platforms': 'openPlatformsModal'
|
8531 |
},
|
8532 |
+
render() {
|
8533 |
+
const me = this,
|
8534 |
+
data = this.model.toJSON();
|
8535 |
|
8536 |
+
if ( 'undefined' !== typeof data.social_icons && data.social_icons ) {
|
8537 |
+
for ( let platform in data.social_icons ) {
|
8538 |
+
me.addPlatformToPanel( platform, data.social_icons[ platform ]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8539 |
}
|
8540 |
+
}
|
8541 |
|
8542 |
+
// Initiate the sortable functionality to sort form platforms' order.
|
8543 |
+
let sortableContainer = this.$( '#hustle-social-services' ).sortable({
|
8544 |
+
axis: 'y',
|
8545 |
+
containment: '.sui-box-builder'
|
8546 |
+
});
|
|
|
|
|
8547 |
|
8548 |
+
sortableContainer.on( 'sortupdate', $.proxy( me.platformsOrderChanged, me, sortableContainer ) );
|
|
|
|
|
|
|
8549 |
|
8550 |
+
//add all platforms to Add Platforms popup
|
8551 |
+
for ( let platform in optinVars.social_platforms ) {
|
8552 |
+
me.addPlatformToDialog( platform );
|
8553 |
}
|
|
|
|
|
|
|
|
|
8554 |
|
8555 |
this.bindRemoveService();
|
8556 |
|
8557 |
+
if ( 'true' === Module.Utils.getUrlParam( 'new' ) ) {
|
|
|
|
|
8558 |
Module.Notification.open( 'success', optinVars.messages.commons.module_created.replace( /{type_name}/g, optinVars.module_name[ this.moduleType ]), 10000 );
|
8559 |
}
|
8560 |
},
|
8625 |
let template = Optin.template( 'hustle-add-platform-li-tpl' ),
|
8626 |
$container = $( '#hustle_add_platforms_container' ),
|
8627 |
data = this.getPlatformViewDefaults( platform );
|
|
|
8628 |
$container.append( template( data ) );
|
8629 |
},
|
8630 |
|
8896 |
|
8897 |
_.extend({}, Hustle.get( 'Mixins.Model_Updater' ), Hustle.get( 'Mixins.Module_Design' ), {
|
8898 |
|
8899 |
+
//beforeRender() {
|
8900 |
|
8901 |
+
// // Update the Appearance tab view when the display types are changed in the Display tab.
|
8902 |
+
// Hustle.Events.off( 'modules.view.displayTypeUpdated' ).on( 'modules.view.displayTypeUpdated', $.proxy( this.viewChangedDisplayTab, this ) );
|
8903 |
+
//},
|
8904 |
+
|
8905 |
+
render: function() {
|
8906 |
|
8907 |
+
//if ( this.targetContainer.length ) {
|
|
|
8908 |
this.createPickers();
|
8909 |
+
|
8910 |
+
//}
|
8911 |
+
|
8912 |
+
Hustle.Events.off( 'modules.view.displayTypeUpdated' ).on( 'modules.view.displayTypeUpdated', $.proxy( this.viewChangedDisplayTab, this ) );
|
8913 |
|
8914 |
// Trigger preview when this tab is shown.
|
8915 |
$( 'a[data-tab="appearance"]' ).on( 'click', $.proxy( this.updatePreview, this ) );
|
9008 |
|
9009 |
return Hustle.View.extend(
|
9010 |
_.extend({}, Hustle.get( 'Mixins.Module_Display' ), {
|
|
|
9011 |
|
9012 |
+
viewChanged( changed ) {
|
9013 |
|
9014 |
if ( ( _.intersection([ 'float_desktop_enabled', 'float_mobile_enabled', 'inline_enabled', 'widget_enabled', 'shortcode_enabled' ], Object.keys( changed ) ) ).length ) {
|
9015 |
|
9151 |
});
|
9152 |
});
|
9153 |
|
9154 |
+
Hustle.define( 'SShare.View', function( $ ) {
|
9155 |
+
|
9156 |
'use strict';
|
9157 |
return Hustle.View.extend(
|
9158 |
_.extend({}, Hustle.get( 'Mixins.Wizard_View' ), {
|
|
|
9159 |
|
9160 |
_events: {
|
9161 |
'hustle_update_prewiev #hui-preview-social-shares-floating': 'updatePreview'
|
9206 |
*/
|
9207 |
renderTabs() {
|
9208 |
|
9209 |
+
// Services
|
|
|
|
|
9210 |
this.contentView.delegateEvents();
|
|
|
|
|
9211 |
|
9212 |
// Appearance view
|
|
|
9213 |
this.designView.delegateEvents();
|
|
|
|
|
9214 |
|
9215 |
// Display Options View
|
|
|
|
|
9216 |
this.displayView.delegateEvents();
|
|
|
|
|
9217 |
|
9218 |
// Visibility view.
|
9219 |
this.visibilityView.delegateEvents();
|
|
|
9220 |
this.visibilityView.afterRender();
|
9221 |
},
|
9222 |
|
9240 |
);
|
9241 |
});
|
9242 |
|
9243 |
+
( function() {
|
9244 |
|
9245 |
'use strict';
|
9246 |
|
9268 |
return;
|
9269 |
}
|
9270 |
|
|
|
|
|
|
|
9271 |
let View = Hustle.View.extend( Hustle.get( 'Mixins.Wizard_View' ) ),
|
9272 |
ViewContent = Hustle.View.extend( Hustle.get( 'Mixins.Module_Content' ) ),
|
9273 |
ViewEmails = Hustle.View.extend( Hustle.get( 'Mixins.Module_Emails' ) ),
|
9277 |
ViewIntegrations = Hustle.get( 'Module.IntegrationsView' ),
|
9278 |
|
9279 |
ModelView = Module.Model,
|
9280 |
+
BaseModel = Hustle.get( 'Models.M' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9281 |
|
9282 |
return new View({
|
9283 |
+
model: new ModelView( optinVars.current.data || {}),
|
9284 |
+
contentView: new ViewContent({ BaseModel }),
|
9285 |
+
emailsView: new ViewEmails({ BaseModel }),
|
9286 |
+
designView: new ViewDesign({ BaseModel }),
|
9287 |
+
integrationsView: new ViewIntegrations({ BaseModel }),
|
9288 |
+
visibilityView: new ViewVisibility({ BaseModel }),
|
9289 |
+
settingsView: new ViewSettings({ BaseModel })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9290 |
});
|
9291 |
|
9292 |
}() );
|
|
|
9293 |
|
9294 |
+
}() );
|
9295 |
+
|
9296 |
+
( function() {
|
9297 |
|
9298 |
'use strict';
|
9299 |
|
9321 |
return;
|
9322 |
}
|
9323 |
|
|
|
|
|
|
|
9324 |
let View = Hustle.View.extend( Hustle.get( 'Mixins.Wizard_View' ) ),
|
9325 |
ViewContent = Hustle.View.extend( Hustle.get( 'Mixins.Module_Content' ) ),
|
9326 |
ViewEmails = Hustle.View.extend( Hustle.get( 'Mixins.Module_Emails' ) ),
|
9330 |
ViewIntegrations = Hustle.get( 'Module.IntegrationsView' ),
|
9331 |
|
9332 |
ModelView = Module.Model,
|
9333 |
+
BaseModel = Hustle.get( 'Models.M' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9334 |
|
9335 |
return new View({
|
9336 |
+
model: new ModelView( optinVars.current.data || {}),
|
9337 |
+
contentView: new ViewContent({ BaseModel }),
|
9338 |
+
emailsView: new ViewEmails({ BaseModel }),
|
9339 |
+
designView: new ViewDesign({ BaseModel }),
|
9340 |
+
integrationsView: new ViewIntegrations({ BaseModel }),
|
9341 |
+
visibilityView: new ViewVisibility({ BaseModel }),
|
9342 |
+
settingsView: new ViewSettings({ BaseModel })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9343 |
});
|
9344 |
|
9345 |
}() );
|
9346 |
+
}() );
|
9347 |
|
9348 |
+
( function() {
|
9349 |
|
9350 |
'use strict';
|
9351 |
|
9368 |
return;
|
9369 |
}
|
9370 |
|
|
|
|
|
|
|
9371 |
let view = Hustle.View.extend( Hustle.get( 'Mixins.Wizard_View' ) ),
|
9372 |
+
ViewContent = Hustle.View.extend( Hustle.get( 'Mixins.Module_Content' ) ),
|
9373 |
+
ViewEmails = Hustle.View.extend( Hustle.get( 'Mixins.Module_Emails' ) ),
|
9374 |
+
ViewDesign = Hustle.View.extend( Hustle.get( 'Mixins.Module_Design' ) ),
|
9375 |
+
ViewDisplay = Hustle.View.extend( Hustle.get( 'Mixins.Module_Display' ) ),
|
9376 |
+
ViewVisibility = Hustle.View.extend( Hustle.get( 'Mixins.Module_Visibility' ) ),
|
9377 |
ViewSettings = Hustle.View.extend( Hustle.get( 'Mixins.Module_Settings' ) ),
|
9378 |
ViewIntegrations = Hustle.get( 'Module.IntegrationsView' ),
|
9379 |
|
9380 |
viewModel = Module.Model,
|
9381 |
+
BaseModel = Hustle.get( 'Models.M' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9382 |
|
9383 |
return new view({
|
9384 |
+
model: new viewModel( optinVars.current.data || {}),
|
9385 |
+
contentView: new ViewContent({ BaseModel }),
|
9386 |
+
emailsView: new ViewEmails({ BaseModel }),
|
9387 |
+
designView: new ViewDesign({ BaseModel }),
|
9388 |
+
integrationsView: new ViewIntegrations({ BaseModel }),
|
9389 |
+
displayView: new ViewDisplay({ BaseModel }),
|
9390 |
+
visibilityView: new ViewVisibility({ BaseModel }),
|
9391 |
+
settingsView: new ViewSettings({ BaseModel })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9392 |
});
|
9393 |
|
9394 |
}() );
|
9395 |
|
9396 |
+
}() );
|
9397 |
|
9398 |
+
( function() {
|
9399 |
|
9400 |
'use strict';
|
9401 |
|
9424 |
return;
|
9425 |
}
|
9426 |
|
|
|
|
|
|
|
|
|
9427 |
const view = Hustle.get( 'SShare.View' ),
|
9428 |
+
ViewContent = Hustle.get( 'SShare.Content_View' ),
|
9429 |
+
ViewDisplay = Hustle.get( 'SShare.Display_View' ),
|
9430 |
+
ViewDesign = Hustle.get( 'SShare.Design_View' ),
|
9431 |
+
ViewVisibility = Hustle.View.extend( Hustle.get( 'Mixins.Module_Visibility' ) ),
|
9432 |
|
|
|
9433 |
viewModel = Module.Model,
|
9434 |
+
BaseModel = Hustle.get( 'Models.M' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9435 |
|
9436 |
return new view({
|
9437 |
+
model: new viewModel( optinVars.current.data || {}),
|
9438 |
+
contentView: new ViewContent({ BaseModel }),
|
9439 |
+
displayView: new ViewDisplay({ BaseModel }),
|
9440 |
+
designView: new ViewDesign({ BaseModel }),
|
9441 |
+
visibilityView: new ViewVisibility({ BaseModel })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9442 |
});
|
9443 |
}() );
|
9444 |
+
}() );
|
9445 |
|
9446 |
|
9447 |
Hustle.define( 'Dashboard.View', function( $, doc, win ) {
|
9673 |
Module.ProviderMigration.open( migrate.provider_modal );
|
9674 |
}
|
9675 |
|
9676 |
+
if ( migrate.hasOwnProperty( 'provider_modal' ) && 'aweber' === migrate.provider_modal ) {
|
9677 |
+
Module.ProviderMigration.open( migrate.provider_modal, migrate.integration_id );
|
9678 |
+
}
|
9679 |
+
|
9680 |
if ( migrate.hasOwnProperty( 'migration_notificaiton' ) ) {
|
9681 |
const status = 'success' === migrate.migration_notificaiton.status ? 'success' : 'error',
|
9682 |
delay = migrate.migration_notificaiton.delay ? migrate.migration_notificaiton.delay : 10000;
|
9856 |
let provider = $( '.hustle-provider-notice' ).data( 'name' ),
|
9857 |
notice = Optin.cookie.get( this.cookieKey + provider );
|
9858 |
if ( 1 !== notice ) {
|
9859 |
+
$( '.hustle_migration_notice__' + provider ).show();
|
9860 |
}
|
9861 |
}
|
9862 |
|
9879 |
|
9880 |
events: {
|
9881 |
'click .sui-sidenav .sui-vertical-tab a': 'sidenav',
|
9882 |
+
'change select.sui-mobile-nav': 'sidenavMobile',
|
9883 |
'click .sui-pagination-wrap > button': 'pagination',
|
9884 |
'click #hustle-dialog-open--reset-settings': 'resetDialog',
|
9885 |
'click .hustle-load-on-click': 'addLoadingState',
|
9948 |
e.preventDefault();
|
9949 |
},
|
9950 |
|
9951 |
+
sidenavMobile( e ) {
|
9952 |
+
const tabName = $( e.currentTarget ).val();
|
9953 |
+
|
9954 |
+
if ( tabName ) {
|
9955 |
+
this.tabJump( tabName, true );
|
9956 |
+
}
|
9957 |
+
},
|
9958 |
+
|
9959 |
tabUpdate: function( e ) {
|
9960 |
|
9961 |
var state = e.originalEvent.state;
|
assets/js/admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){"use strict";window.Hustle=function(e,t,i){var s={},n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g},o=_.extend({},Backbone.Events),a=Backbone.View.extend({initialize:function(){_.isFunction(this.initMix)&&this.initMix.apply(this,arguments),this.render&&(this.render=_.wrap(this.render,function(e){this.trigger("before_render"),e.call(this),o.trigger("view.rendered",this),this.trigger("rendered")})),_.isFunction(this.init)&&this.init.apply(this,arguments)}}),l=_.memoize(function(e){var t;return function(i){return(t=t||_.template(document.getElementById(e).innerHTML,null,n))(i).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),r=_.memoize(function(e){var t;return function(i){return(t=t||_.template(e,null,n))(i)}});return{define:function(n,o){if(n.split(".").length)!function s(n,a){var l,r=n.split("."),d=r.splice(0,1)[0];d&&(r.length?a[d]=a[d]||{}:(l=o.call(null,e,t,i),a[d]=_.isFunction(l)||void 0===l?l:_.extend(a[d]||{},l)),r.length&&d&&s(r.join("."),a[d]))}(n,s);else{var a=s[n]||{};s[n]=_.extend(a,o.call(null,e,t,i))}},getModules:function(){return s},get:function(e){var t,i;return e.split(".").length?(t=!1,(i=function(e,s){var n=e.split("."),o=n.splice(0,1)[0];t=s[o],n.length&&i(n.join("."),s[o])})(e,s),t):s[e]||!1},Events:o,View:a,template:l,createTemplate:r,getTemplateOptions:function(){return e.extend(!0,{},n)},cookie:{set:function(t,i,s){var n,o;i=e.isArray(i)||e.isPlainObject(i)?JSON.stringify(i):i,isNaN(s)?o="":((n=new Date).setTime(n.getTime()+24*s*60*60*1e3),o="; expires="+n.toGMTString()),document.cookie=t+"="+i+o+"; path=/"},get:function(e){var t,i,s,n=document.cookie.split(";"),o=n.length;for(s=e+"=",t=0;t<o;t+=1){for(i=n[t];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(s)){var a=i.substring(s.length,i.length);return a?JSON.parse(a):a}}return null}},consts:{ModuleShowCount:"hustle_module_show_count-"}}}(jQuery,document,window)}(jQuery);var Optin=Optin||{};function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Optin.View={},Optin.Models={},Optin.Events={},"undefined"!=typeof Backbone&&_.extend(Optin.Events,Backbone.Events),function(e){"use strict";Optin.NEVER_SEE_PREFIX="inc_optin_never_see_again-",Optin.COOKIE_PREFIX="inc_optin_long_hidden-",Optin.POPUP_COOKIE_PREFIX="inc_optin_popup_long_hidden-",Optin.SLIDE_IN_COOKIE_PREFIX="inc_optin_slide_in_long_hidden-",Optin.EMBEDDED_COOKIE_PREFIX="inc_optin_embedded_long_hidden-",Optin.globalMixin=function(){_.mixin({log:function(){},toBool:function(e){return _.isBoolean(e)?e:_.isString(e)&&-1!==["true","false","1"].indexOf(e.toLowerCase())?"true"===e.toLowerCase()||"1"===e.toLowerCase():_.isNumber(e)?!!e:!(_.isUndefined(e)||_.isNull(e)||_.isNaN(e))&&e},isTrue:function(e){return!(_.isUndefined(e)||_.isNull(e)||_.isNaN(e))&&(_.isNumber(e)?0!==e:(e=e.toString().toLowerCase(),-1!==["1","true","on"].indexOf(e)))},isFalse:function(e){return!_.isTrue(e)},controlBase:function(e,t,i){return i=_.isUndefined(i)?"checked":i,e=_.toBool(e),t=_.isBoolean(e)?_.isTrue(t):t,_.isEqual(e,t)?i+"="+i:""},checked:function(e,t){return _.controlBase(e,t,"checked")},selected:function(e,t){return _.controlBase(e,t,"selected")},disabled:function(e,t){return _.controlBase(e,t,"disabled")},class:function(e,t,i){return _.isTrue(e)?t:void 0!==i?i:""},add_class:function(e,t,i){return"class={class}".replace("{class}",_.class(e,t,i))},toUpperCase:function(e){return _.isString(e)?e.toUpperCase():""}}),_.findKey||_.mixin({findKey:function(e,t,i){t=cb(t,i);for(var s,n=_.keys(e),o=0,a=n.length;o<a;o++)if(t(e[s=n[o]],s,e))return s}})},Optin.globalMixin(),Backbone.Model.prototype.toJSON=function(){var e,t=_.clone(this.attributes);for(e in t)(t[e]instanceof Backbone.Model||Backbone.Collection&&t[e]instanceof Backbone.Collection)&&(t[e]=t[e].toJSON());return t},Optin.template=_.memoize(function(t){var i,s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g};return function(n){return(i=i||_.template(e("#"+t).html(),null,s))(n).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),Optin.templateCompat=_.memoize(function(t){var i;return function(s){return(i=i||_.template(e("#"+t).html()))(s).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),Optin.cookie=Hustle.cookie,Optin.Mixins={_mixins:{},_servicesMixins:{},_desingMixins:{},_displayMixins:{},add:function(e,t){this._mixins[e]=t},getMixins:function(){return this._mixins},addServicesMixin:function(e,t){this._servicesMixins[e]=t},getServicesMixins:function(){return this._servicesMixins}}}(jQuery),function(e){"use strict";Hustle.Events.on("view.rendered",function(t){if(t instanceof Backbone.View){t.$("select:not([multiple])").each(function(){SUI.suiSelect(this)}),t.$(".sui-select:not(.hustle-select-ajax)").SUIselect2({dropdownCssClass:"sui-select-dropdown"}),t.$(".sui-accordion").each(function(){SUI.suiAccordion(this)}),SUI.suiTabs(),SUI.tabs(),SUI.floatInput(),t.$(".sui-side-tabs").each(function(){var t=e(this).find(".sui-tabs-menu .sui-tab-item input"),i=function(){var i="";e.each(t,function(){var t,s=e(this),n=s.parent("label"),o=s.data("tab-menu"),a=e('.sui-tabs-content [data-tab-content="'.concat(o,'"]')),l=e('[data-tab-dependent="'.concat(o,'"]'));s[0].checked?(n.addClass("active"),o&&(i=o,a.addClass("active"),(t=l).show(),t.prop("tabindex","0"),t.removeProp("hidden"))):(n.removeClass("active"),o!==i&&(a.removeClass("active"),function(e){e.hide(),e.prop("tabindex","-1"),e.prop("hidden",!0)}(l)))})};i(),t.on("change",function(){return i()})}),t.$(".sui-toggle.hustle-toggle-with-container").each(function(){var t=e(this),i=t.find("input[type=checkbox]"),s=e('[data-toggle-content="'.concat(t.data("toggle-on"),'"]')),n=e('[data-toggle-content="'.concat(t.data("toggle-off"),'"]')),o=function(){i[0].checked?(Module.Utils.accessibleShow(s),Module.Utils.accessibleHide(n)):(Module.Utils.accessibleShow(n),Module.Utils.accessibleHide(s))};o(),i.on("change",function(){return o()})}),t.$("select.hustle-select-with-container").each(function(){var t=e(this),i=e('[data-field-content="'.concat(this.name,'"]')),s=t.data("content-on").split(","),n=function(){s.includes(t.val())?Module.Utils.accessibleShow(i):Module.Utils.accessibleHide(i)};n(),t.on("change",function(){return n()})})}}),e(document).ready(function(){e("#hustle-email-day").length&&e("#hustle-email-day").datepicker({beforeShow:function(t,i){e("#ui-datepicker-div").addClass("sui-calendar")},dateFormat:"MM dd, yy"}),e("#hustle-email-time").length&&e("#hustle-email-time").timepicker({timeFormat:"h:mm p",interval:"1",minTime:"0",maxTime:"11:59pm",defaultTime:null,startTime:"00:00",dynamic:!1,dropdown:!0,scrollbar:!0,change:function(){e("#hustle-email-time").trigger("change")}}),e("#hustle-notice-pro-is-available .notice-dismiss").on("click",function(t){e.post(ajaxurl,{action:"hustle_dismiss_admin_notice",dismissedNotice:"hustle_pro_is_available"},function(e){})}),e(".hustle-copy-shortcode-button").on("click",function(t){t.preventDefault();var i=e(t.target),s=i.data("shortcode"),n=i.closest(".sui-with-button-inside");if(void 0!==s){var o=e("<input />");e("body").append(o),o.val(s).select(),document.execCommand("copy"),o.remove(),Module.Notification.open("success",optinVars.messages.commons.shortcode_copied)}else if(n.length){n.find('input[type="text"]').select(),document.execCommand("copy")}}),e("#hustle-tracking-migration-notice .hustle-notice-dismiss").on("click",function(t){t.preventDefault(),e("#hustle-dismiss-modal-button").on("click",function(t){t.preventDefault(),e.post(ajaxurl,{action:"hustle_dismiss_notification",name:e(t.currentTarget).data("name"),_ajax_nonce:e(t.currentTarget).data("nonce")}).always(function(){return location.reload()})}),SUI.dialogs["hustle-dialog--migrate-dismiss-confirmation"].show()}),e("#hustle-dismiss-m2-notice").on("click",function(t){e.post(ajaxurl,{action:"hustle_dismiss_m2_notification",_ajax_nonce:e(this).data("nonce")}).always(function(){e("#hustle-m2-notice").fadeOut("slow")})}),e("#hustle-sendgrid-update-notice .notice-dismiss").on("click",function(t){t.preventDefault();var i=e(t.currentTarget).closest("#hustle-sendgrid-update-notice");e.post(ajaxurl,{action:"hustle_dismiss_notification",name:i.data("name"),_ajax_nonce:i.data("nonce")})}),e(".hustle-notice .notice-dismiss, .hustle-notice .dismiss-notice").on("click",function(t){t.preventDefault();var i=e(t.currentTarget).closest(".hustle-notice");e.post(ajaxurl,{action:"hustle_dismiss_notification",name:i.data("name"),_ajax_nonce:i.data("nonce")}).always(function(){return location.reload()})}),e(".sui-form-field input[type=number]").length&&e(".sui-form-field input[type=number]").on("keydown",function(t){e(this)[0].hasAttribute("min")&&0<=e(this).attr("min")&&(0!==t.originalEvent.key.replace(/[^0-9^.^,]/,"").length||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.preventDefault())}),setTimeout(function(){e(".hustle-scroll-to").length&&e("html, body").animate({scrollTop:e(".hustle-scroll-to").offset().top},"slow")},100),e(".hustle-check-all").on("click",function(t){var i=e(t.target),s=i.parents(".sui-wrap").find(".hustle-list"),n=i.is(":checked");s.find(".hustle-listing-checkbox").prop("checked",n),i.parents(".sui-wrap").find(".hustle-check-all").prop("checked",n),e(".hustle-bulk-apply-button").prop("disabled",!n)}),e(".hustle-list .hustle-listing-checkbox").on("click",function(t){var i=e(t.target),s=i.parents(".sui-wrap").find(".hustle-list"),n=i.is(":checked")&&!s.find(".hustle-listing-checkbox:not(:checked)").length,o=0===s.find(".hustle-listing-checkbox:checked").length;e(".hustle-check-all").prop("checked",n),e(".hustle-bulk-apply-button").prop("disabled",o)}),e(".hustle-bulk-apply-button").on("click",function(t){var i=e(t.target),s=e("select option:selected",i.closest(".hui-bulk-actions")).val(),n=e(".hustle-list .hustle-listing-checkbox:checked");if(0===n.length||"undefined"===s)return!1;var o=[];if(e.each(n,function(){o.push(e(this).val())}),"delete-all"===s){var a={ids:o.join(","),nonce:i.siblings("#hustle_nonce").val(),title:i.data("title"),description:i.data("description"),action:s};return Module.deleteModal.open(a),!1}})})}(jQuery),Hustle.define("Modals.Migration",function(e){"use strict";new(Backbone.View.extend({el:"#hustle-dialog--migrate",data:{},events:{"click #hustle-migrate-start":"migrateStart","click #hustle-create-new-module":"createModule","click .sui-box-selector":"enableContinue","click .hustle-dialog-migrate-skip":"dismissModal","click .sui-dialog-overlay":"dismissModal"},initialize:function(){if(this.$el.length){var t="",i="";0===this.$el.data("isFirst")?(t="#hustle-dialog--migrate-slide-2",i="hustle-migrate-start"):(t="#hustle-dialog--migrate-slide-1",i="hustle-migrate-get-started"),this.$(t).addClass("sui-active sui-loaded"),setTimeout(function(){return SUI.openModal("hustle-dialog--migrate",i,e(".sui-wrap")[0],!1)},100),this.$progressBar=this.$el.find(".sui-progress .sui-progress-bar span"),this.$progressText=this.$el.find(".sui-progress .sui-progress-text span"),this.$partialRows=this.$el.find("#hustle-partial-rows")}},migrateStart:function(t){var i=e(t.target),s=this.$el.find("#hustle-dialog--migrate-slide-2"),n=s.find("#migrateDialog2Description");i.addClass("sui-button-onload"),s.find(".hustle-dialog-migrate-skip").remove(),n.text(n.data("migrate-text")),Module.Utils.accessibleHide(s.find("div[data-migrate-start]")),Module.Utils.accessibleHide(s.find("div[data-migrate-failed]")),Module.Utils.accessibleShow(s.find("div[data-migrate-progress]")),this.migrateTracking(t),i.removeClass("sui-button-onload"),t.preventDefault()},migrateComplete:function(){var e=this.$("#hustle-dialog--migrate-slide-2"),t=this,i=e.find("#migrateDialog2Title"),s=e.find("#migrateDialog2Description");this.$el.find("sui-button-onload").removeClass("sui-button-onload"),i.text(i.data("done-text")),s.text(s.data("done-text")),Module.Utils.accessibleHide(e.find("div[data-migrate-progress]")),Module.Utils.accessibleShow(e.find("div[data-migrate-done]")),this.$el.closest(".sui-modal").on("click",function(e){return t.closeDialog(e)})},migrateFailed:function(){var e=this.$el.find("#hustle-dialog--migrate-slide-2");e.find("#dialogDescription").text(""),Module.Utils.accessibleHide(e.find("div[data-migrate-start]")),Module.Utils.accessibleShow(e.find("div[data-migrate-failed]")),Module.Utils.accessibleHide(e.find("div[data-migrate-progress]"))},updateProgress:function(e,t,i){void 0===this.totalRows&&(this.totalRows=i,this.$el.find("#hustle-total-rows").text(i)),this.$partialRows.text(e);var s=t+"%";this.$progressBar.css("width",s),100>=t&&this.$progressText.text(t+"%")},migrateTracking:function(t){t.preventDefault();var i=this,s={action:"hustle_migrate_tracking",_ajax_nonce:e(t.currentTarget).data("nonce")};return e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:s,success:function(e){if(e.success){var s=e.data.migrated_rows,n=e.data.migrated_percentage,o=e.data.total_entries||"0";"done"!==e.data.current_meta?(i.updateProgress(s,n,o),i.migrateTracking(t)):(i.updateProgress(s,n,o),setTimeout(function(){return i.migrateComplete()},500))}else i.migrateFailed()},error:function(e){i.migrateFailed()}}),!1},createModule:function(t){var i=e(t.target),s=this.$el.find(".sui-box-selector input:checked");if(s.length){this.dismissModal(),i.addClass("sui-button-onload");var n=s.val(),o=void 0!==optinVars.module_page[n]?optinVars.module_page[n]:optinVars.module_page.popup;window.location="?page=".concat(o,"&create-module=true")}t.preventDefault()},closeDialog:function(e){SUI.closeModal(),e.preventDefault(),e.stopPropagation()},enableContinue:function(){this.$el.find("#hustle-create-new-module").prop("disabled",!1)},dismissModal:function(t){t&&t.preventDefault(),e.post(ajaxurl,{action:"hustle_dismiss_notification",name:"migrate_modal",_ajax_nonce:this.$el.data("nonce")})}}))}),Hustle.define("Modals.ReviewConditions",function(e){"use strict";new(Backbone.View.extend({el:"#hustle-dialog--review_conditions",initialize:function(){this.$el.length&&setTimeout(this.show,100,this)},show:function(e){"undefined"!=typeof SUI&&void 0!==SUI.dialogs?void 0!==SUI.dialogs[e.$el.prop("id")]&&SUI.dialogs[e.$el.prop("id")].show():setTimeout(e.show,100,e)}}))}),Hustle.define("Upgrade_Modal",function(e){"use strict";return Backbone.View.extend({el:"#wph-upgrade-modal",opts:{},events:{"click .wpmudev-i_close":"close"},initialize:function(e){this.opts=_.extend({},this.opts,e)},close:function(e){e.preventDefault(),e.stopPropagation(),this.$el.removeClass("wpmudev-modal-active")}})}),Hustle.define("Modals.Welcome",function(e){"use strict";new(Backbone.View.extend({el:"#hustle-dialog--welcome",events:{"click #hustle-new-create-module":"createModule","click .sui-box-selector":"enableContinue","click #getStarted":"dismissModal","click .sui-onboard-skip":"dismissModal","click .sui-dialog-close":"dismissModal"},initialize:function(){this.$el.length&&setTimeout(this.show,100,this)},show:function(e){"undefined"!=typeof SUI&&void 0!==SUI.dialogs?void 0!==SUI.dialogs[e.$el.prop("id")]&&SUI.dialogs[e.$el.prop("id")].show():setTimeout(e.show,100,e)},createModule:function(t){var i=e(t.target),s=this.$el.find(".sui-box-selector input:checked");if(s.length){i.addClass("sui-button-onload");var n=s.val(),o=void 0!==optinVars.module_page[n]?optinVars.module_page[n]:optinVars.module_page.popup;window.location="?page=".concat(o,"&create-module=true")}t.preventDefault()},enableContinue:function(){this.$el.find("#hustle-new-create-module").prop("disabled",!1)},dismissModal:function(t){t&&t.preventDefault(),e.post(ajaxurl,{action:"hustle_dismiss_notification",name:"welcome_modal",_ajax_nonce:this.$el.data("nonce")})}}))}),Hustle.define("Featured_Image_Holder",function(e){"use strict";return Backbone.View.extend({template:Optin.template("wph-wizard-choose_image"),targetDiv:"",mediaFrame:!1,options:{attribute:"feature_image",multiple:!1},initialize:function(t){if(this.options.title=optinVars.messages.media_uploader.select_or_upload,this.options.button_text=optinVars.messages.media_uploader.use_this_image,this.options=_.extend({},this.options,t),!this.model||!this.options.attribute)throw new Error("Undefined model or attribute");this.targetDiv=t.targetDiv,e(document).on("click",".wpmudev-feature-image-browse",e.proxy(this.open,this)),e(document).on("click","#wpmudev-feature-image-clear",e.proxy(this.clear,this)),this.render()},render:function(){var e=this.template({image:this.model.get(this.options.attribute)});return this.setElement(e),this.defineMediaFrame(),this},showImagePreviewOrButton:function(){var e=this.model.get("feature_image");""===e||void 0===e?this.targetDiv.removeClass("sui-has_file"):this.targetDiv.addClass("sui-has_file")},defineMediaFrame:function(){var e=this;this.mediaFrame=wp.media({title:e.options.title,button:{text:e.options.button_text},multiple:e.options.multiple}).on("select",function(){var t,i,s=e.mediaFrame.state().get("selection").first().toJSON();s&&s.url&&(t=s.url,i="",e.model.set("feature_image",t),s.sizes&&s.sizes.thumbnail&&s.sizes.thumbnail.url&&(i=s.sizes.thumbnail.url),e.targetDiv.find(".sui-upload-file span").text(t).change(),e.targetDiv.find(".sui-image-preview").css("background-image","url( "+i+" )"),e.showImagePreviewOrButton())})},open:function(e){e.preventDefault(),this.mediaFrame.open()},clear:function(e){e.preventDefault(),this.model.set("feature_image",""),this.targetDiv.find(".sui-upload-file span").text("").change(),this.targetDiv.find(".sui-image-preview").css("background-image","url()"),this.showImagePreviewOrButton()}})}),Hustle.define("Modals.Edit_Field",function(e){"use strict";return Backbone.View.extend({el:"#hustle-dialog--edit-field",events:{"click .sui-dialog-overlay":"closeModal","click .hustle-discard-changes":"closeModal",'change input[name="time_format"]':"changeTimeFormat","click #hustle-apply-changes":"applyChanges",'blur input[name="name"]':"trimName","change input":"fieldUpdated",'click input[type="radio"]':"fieldUpdated","change select":"fieldUpdated",'change input[name="version"]':"handleCaptchaSave"},initialize:function(e){this.field=e.field,this.changed={},this.fieldData=e.fieldData,this.model=e.model,this.render()},render:function(){this.renderHeader(),this.renderLabels(),this.renderSettings(),this.renderStyling(),this.handleCaptchaSave(),this.$(".hustle-data-pane").first().trigger("click")},renderHeader:function(){this.$(".sui-box-header .sui-tag").text(this.field.type)},renderLabels:function(){if(-1!==e.inArray(this.field.type,["recaptcha","gdpr","submit"]))return this.$("#hustle-data-tab--labels").removeClass("hustle-data-pane").addClass("sui-hidden"),void this.$("#hustle-data-pane--labels").addClass("sui-hidden");this.$("#hustle-data-tab--labels").removeClass("sui-hidden").addClass("hustle-data-pane"),this.$("#hustle-data-pane--labels").removeClass("sui-hidden");var t="hustle-"+this.field.type+"-field-labels-tpl";e("#"+t).length||(t="hustle-common-field-labels-tpl");var i=Optin.template(t);this.$("#hustle-data-pane--labels").html(i(this.fieldData)),Hustle.Events.trigger("view.rendered",this)},renderSettings:function(){if("hidden"===this.field.type)return this.$("#hustle-data-tab--settings").removeClass("hustle-data-pane").addClass("sui-hidden"),void this.$("#hustle-data-pane--settings").addClass("sui-hidden");this.$("#hustle-data-tab--settings").removeClass("sui-hidden").addClass("hustle-data-pane"),this.$("#hustle-data-pane--settings").removeClass("sui-hidden");var t="hustle-"+this.field.type+"-field-settings-tpl";e("#"+t).length||(t="hustle-common-field-settings-tpl");var i=Optin.template(t);if(this.$("#hustle-data-pane--settings").html(i(this.fieldData)),Hustle.Events.trigger("view.rendered",this),"gdpr"===this.field.type){wp.editor.remove("gdpr_message"),wp.editor.initialize("gdpr_message",{tinymce:{wpautop:!1,toolbar1:"bold,italic,strikethrough,link",valid_elements:"a[href|target=_blank],strong/b,i,u,s,em,del",forced_root_block:""},quicktags:{buttons:"strong,em,del,link"}})}else if("recaptcha"===this.field.type){var s={tinymce:{toolbar:["bold italic link alignleft aligncenter alignright"]},quicktags:!0};wp.editor.remove("v3_recaptcha_badge_replacement"),wp.editor.initialize("v3_recaptcha_badge_replacement",s),wp.editor.remove("v2_invisible_badge_replacement"),wp.editor.initialize("v2_invisible_badge_replacement",s)}},renderStyling:function(){if("hidden"===this.field.type)return this.$("#hustle-data-tab--styling").removeClass("hustle-data-pane").addClass("sui-hidden"),void this.$("#hustle-data-pane--styling").addClass("sui-hidden");this.$("#hustle-data-tab--styling").removeClass("sui-hidden").addClass("hustle-data-pane"),this.$("#hustle-data-pane--styling").removeClass("sui-hidden");var t="hustle-"+this.field.type+"-field-styling-tpl";e("#"+t).length||(t="hustle-common-field-styling-tpl");var i=Optin.template(t);this.$("#hustle-data-pane--styling").html(i(this.fieldData))},fieldUpdated:function(t){var i=e(t.target),s=i.attr("name"),n=i.is(":checkbox")?i.is(":checked"):i.val();this.changed[s]=n},closeModal:function(){this.undelegateEvents(),this.stopListening(),SUI.dialogs["hustle-dialog--edit-field"].hide()},changeTimeFormat:function(t){"12"===e(t.target).val()?(e("#hustle-date-format").closest(".sui-form-field").show(),e('input[name="time_hours"]').prop("min",1).prop("max",12)):(e("#hustle-date-format").closest(".sui-form-field").hide(),e('input[name="time_hours"]').prop("min",0).prop("max",23))},handleCaptchaSave:function(t){if("recaptcha"===this.field.type){var i=e("#available_recaptchas").val();if(i){i=i.split(",");var s=e('input[name="version"]:checked').val();-1===_.indexOf(i,s)?e("#hustle-dialog--edit-field").find("#hustle-apply-changes").attr("disabled","disabled"):e("#hustle-dialog--edit-field").find("#hustle-apply-changes").attr("disabled",!1)}else e("#hustle-dialog--edit-field").find("#hustle-apply-changes").attr("disabled","disabled")}},trimName:function(t){var i,s=this.$(t.target);i=e.trim(s.val()).replace(/ /g,"_"),s.val(i)},applyChanges:function(e){var t=this,i=this.$(e.target),s=Object.assign({},this.model.get("form_elements"));if("gdpr"===this.field.type&&"undefined"!=typeof tinyMCE){var n=tinyMCE.get("gdpr_message"),o=this.$("textarea#gdpr_message"),a="true"===o.attr("aria-hidden")?n.getContent():o.val();s.gdpr.gdpr_message=a,this.model.set("form_elements",s),this.model.userHasChange()}else if("recaptcha"===this.field.type&&"undefined"!=typeof tinyMCE){var l=tinyMCE.get("v3_recaptcha_badge_replacement"),r=this.$("textarea#v3_recaptcha_badge_replacement"),d="true"===r.attr("aria-hidden")?l.getContent():r.val();s.recaptcha.v3_recaptcha_badge_replacement=d;var u=tinyMCE.get("v2_invisible_badge_replacement"),c=this.$("textarea#v2_invisible_badge_replacement"),h="true"===c.attr("aria-hidden")?u.getContent():c.val();s.recaptcha.v2_invisible_badge_replacement=h,this.model.set("form_elements",s),this.model.userHasChange()}if(Object.keys(this.changed).length){var p=_.extend({},this.field);_.extend(this.field,this.changed),("name"in this.changed&&"email"!==p.name&&"email"===this.field.name||"name"in this.changed&&!this.field.name.trim().length)&&(this.field.name=p.name,delete this.changed.name),"name"in this.changed||"email"===p.name?"email"===p.name&&(this.field.name="email",delete this.changed.name):(s[this.field.name]=this.field,this.model.set("form_elements",s),this.model.userHasChange()),this.trigger("field:updated",this.field,this.changed,p)}i.addClass("sui-button-onload"),setTimeout(function(){t.closeModal(),i.removeClass("sui-button-onload")},300)}})}),Hustle.define("Modals.Optin_Fields",function(e){"use strict";return Backbone.View.extend({el:"#hustle-dialog--optin-fields",events:{"click .sui-box-selector input":"selectFields","click .sui-dialog-overlay":"closeModal","click .hustle-cancel-insert-fields":"closeModal","click #hustle-insert-fields":"insertFields"},initialize:function(){this.selectedFields=[]},selectFields:function(e){var t=this.$(e.target),i=t.val();this.$el.find('label[for="'+t.attr("id")+'"]').toggleClass("selected"),t.prop("checked")?this.selectedFields.push(i):this.selectedFields=_.without(this.selectedFields,i)},insertFields:function(e){var t=this,i=this.$(e.target);i.addClass("sui-button-onload"),this.trigger("fields:added",this.selectedFields),setTimeout(function(){i.removeClass("sui-button-onload"),t.closeModal()},500)},closeModal:function(){this.undelegateEvents(),this.stopListening();var e=this.$el.find(".sui-box-selector:not(.hustle-skip)"),t=e.find("input");SUI.dialogs["hustle-dialog--optin-fields"].hide(),e.removeClass("selected"),t.prop("checked",!1),t[0].checked=!1}})}),Hustle.define("Modals.Visibility_Conditions",function(e){"use strict";return Backbone.View.extend({el:"#hustle-dialog--visibility-options",selectedConditions:[],opts:{groupId:0,conditions:[]},events:{"click .sui-box-selector input":"selectConditions","click .hustle-cancel-conditions":"cancelConditions","click .sui-dialog-overlay":"cancelConditions","click #hustle-add-conditions":"addConditions"},initialize:function(e){this.opts=_.extend({},this.opts,e),this.selectedConditions=this.opts.conditions,this.$(".hustle-visibility-condition-option").prop("checked",!1).prop("disabled",!1);var t=!0,i=!1,s=void 0;try{for(var n,o=this.selectedConditions[Symbol.iterator]();!(t=(n=o.next()).done);t=!0){var a=n.value;this.$("#hustle-condition--"+a).prop("checked",!0).prop("disabled",!0)}}catch(e){i=!0,s=e}finally{try{t||null==o.return||o.return()}finally{if(i)throw s}}},selectConditions:function(e){var t=this.$(e.target),i=this.$el.find('label[for="'+t.attr("id")+'"]'),s=t.val();i.toggleClass("selected"),t.prop("checked")?this.selectedConditions.push(s):this.selectedConditions=_.without(this.selectedConditions,s)},cancelConditions:function(){SUI.dialogs["hustle-dialog--visibility-options"].hide()},addConditions:function(e){var t=this,i=this.$(e.target);i.addClass("sui-button-onload"),this.trigger("conditions:added",{groupId:i.data("group_id"),conditions:this.selectedConditions}),setTimeout(function(){SUI.dialogs["hustle-dialog--visibility-options"].hide(),i.removeClass("sui-button-onload"),t.undelegateEvents()},500)}})}),function(e){"use strict";Optin.listingBase=Hustle.View.extend({el:".sui-wrap",logShown:!1,moduleType:"",singleModuleActionNonce:"",_events:{"click .hustle-create-module":"openCreateModal","click .hustle-delete-module-button":"openDeleteModal","click .hustle-module-tracking-reset-button":"openResetTrackingModal","click .hustle-manage-tracking-button":"openManageTrackingModal","click .hustle-import-module-button":"openImportModal","click .hustle-upgrade-modal-button":"openUpgradeModal","click .hustle-single-module-button-action":"handleSingleModuleAction","click .hustle-preview-module-button":"openPreview","click form.sui-bulk-actions .hustle-bulk-apply-button":"bulkActionCheck","click #hustle-dialog--delete .hustle-delete":"bulkActionSend","click #hustle-bulk-action-reset-tracking-confirmation .hustle-delete":"bulkActionSend","click .sui-accordion-item-action .hustle-onload-icon-action":"addLoadingIconToActionsButton"},initialize:function(t){this.events=e.extend(!0,{},this.events,this._events),this.delegateEvents(),this.moduleType=t.moduleType,this.singleModuleActionNonce=optinVars.single_module_action_nonce;var i=Hustle.get("Modals.New_Module"),s=Hustle.get("Modals.ImportModule");new i({moduleType:this.moduleType}),this.ImportModal=new s,e(".sui-accordion-item-header").on("click",e.proxy(this.openTrackingChart,this)),e(".hustle-display-chart").length&&this.openTrackingChart(e(".hustle-display-chart")),this.doActionsBasedOnUrl()},doActionsBasedOnUrl:function(){if("true"===Module.Utils.getUrlParam("create-module")&&setTimeout(function(){e(".hustle-create-module").trigger("click")},100),"true"===Module.Utils.getUrlParam("requires-pro")){var t=this;setTimeout(function(){return t.openUpgradeModal()},100)}if(Module.Utils.getUrlParam("show-notice")){var i="success"===Module.Utils.getUrlParam("show-notice")?"success":"error",s=Module.Utils.getUrlParam("notice"),n=s&&"undefined"!==optinVars.messages.commons[s]?optinVars.messages.commons[s]:Module.Utils.getUrlParam("notice-message");void 0!==n&&n.length&&Module.Notification.open(i,n)}},handleSingleModuleAction:function(e){this.addLoadingIcon(e),Module.handleActions.initAction(e,"listing",this)},actionToggleStatus:function(e,t){var i=t.was_module_enabled,s=e.closest(".sui-accordion-item"),n=s.find(".sui-accordion-item-title span.sui-tag");i?(n.text(n.data("draft")),n.removeClass("sui-tag-blue"),n.attr("data-status","draft")):(n.text(n.data("publish")),n.addClass("sui-tag-blue"),n.attr("data-status","published")),e.find("span").toggleClass("sui-hidden"),s.hasClass("sui-accordion-item--open")&&s.find(".sui-accordion-open-indicator").trigger("click").trigger("click")},actionDisplayError:function(e,t){var i=t.message,s=e.closest(".sui-modal").find(".sui-notice-error");s.find("p").html(i),Module.Utils.accessibleShow(s,!1)},openPreview:function(t){var i=e(t.currentTarget),s=i.data("id"),n=i.data("type");Module.preview.open(s,n)},openTrackingChart:function(t){var i="";if(t.target){if(e(t.target).closest(".sui-accordion-item-action").length)return!0;t.preventDefault(),t.stopPropagation(),i=e(t.currentTarget)}else i=t;var s=i.parent(),n=s.find(".sui-chartjs-animated");if(s.hasClass("sui-accordion-item--disabled")?s.removeClass("sui-accordion-item--open"):s.hasClass("sui-accordion-item--open")?s.removeClass("sui-accordion-item--open"):s.addClass("sui-accordion-item--open"),s.find(".sui-accordion-item-data").addClass("sui-onload"),n.removeClass("sui-chartjs-loaded"),s.hasClass("sui-accordion-item--open")){var o={id:i.data("id"),_ajax_nonce:i.data("nonce"),action:"hustle_tracking_data"};e.ajax({url:ajaxurl,type:"POST",data:o,success:function(e){e.success&&e.data&&(s.find(".sui-accordion-item-body").html(e.data.html),Module.trackingChart.init(s,e.data.charts_data),n=s.find(".sui-chartjs-animated"),SUI.suiTabs()),s.find(".sui-accordion-item-data").removeClass("sui-onload"),n.addClass("sui-chartjs-loaded")},error:function(e){s.find(".sui-accordion-item-data").removeClass("sui-onload"),n.addClass("sui-chartjs-loaded")}})}},getChecked:function(t){var i=".sui-wrap .sui-accordion-item-title input[type=checkbox]";return"checked"===t&&(i+=":checked"),e(i)},bulkActionCheck:function(t){var i=e(t.target),s=i.closest(".hustle-bulk-actions-container").find('select[name="hustle_action"] option:selected').val();if(0===this.getChecked("checked").length||"undefined"===s)return!1;if("delete"===s){var n={actionClass:"hustle-delete",action:"delete",title:i.data("delete-title"),description:i.data("delete-description")};return Module.deleteModal.open(n),!1}if("reset-tracking"===s){var o={actionClass:"hustle-delete",action:"reset-tracking",title:i.data("reset-title"),description:i.data("reset-description")};return Module.deleteModal.open(o),!1}this.bulkActionSend(t,s)},bulkActionSend:function(t,i){t.preventDefault(),this.addLoadingIcon(t);var s=e(".sui-bulk-actions .hustle-bulk-apply-button"),n=i||e(t.target).data("hustle-action"),o=this.getChecked("checked");if(0===o.length)return!1;var a=[];e.each(o,function(){a.push(e(this).val())});var l={ids:a,hustle:n,type:s.data("type"),_ajax_nonce:s.data("nonce"),action:"hustle_listing_bulk"};e.ajax({url:ajaxurl,type:"POST",data:l,success:function(e){e.success?location.reload():SUI.dialogs["hustle-dialog--delete"].hide()}})},addLoadingIcon:function(t){var i=e(t.currentTarget);i.hasClass("sui-button")&&i.addClass("sui-button-onload")},addLoadingIconToActionsButton:function(t){e(t.currentTarget).closest(".sui-accordion-item-action").find(".sui-dropdown-anchor").addClass("sui-button-onload")},openCreateModal:function(t){var i="_page_hustle_sshare_listing";!1===e(t.currentTarget).data("enabled")?this.openUpgradeModal():i!==pagenow.substr(pagenow.length-i.length)?SUI.openModal("hustle-new-module--type","hustle-create-new-module","hustle-new-module--type-close",!1):SUI.openModal("hustle-new-module--create","hustle-create-new-module","hustle-module-name",!1)},openUpgradeModal:function(t){t&&(t.preventDefault(),t.stopPropagation()),e(".sui-button-onload").removeClass("sui-button-onload"),e("#hustle-dialog--upgrade-to-pro").length&&SUI.dialogs["hustle-dialog--upgrade-to-pro"].show()},openDeleteModal:function(t){t.preventDefault();var i=e(t.currentTarget),s={id:i.data("id"),nonce:i.data("nonce"),action:"delete",title:i.data("title"),description:i.data("description"),actionClass:"hustle-single-module-button-action"};Module.deleteModal.open(s)},openImportModal:function(t){!1===e(t.currentTarget).data("enabled")?this.openUpgradeModal():this.ImportModal.open(t)},openResetTrackingModal:function(t){t.preventDefault();var i=e(t.target),s={id:i.data("module-id"),nonce:this.singleModuleActionNonce,action:"reset-tracking",title:i.data("title"),description:i.data("description"),actionClass:"hustle-single-module-button-action"};Module.deleteModal.open(s)},openManageTrackingModal:function(t){var i=Optin.template("hustle-manage-tracking-form-tpl"),s=e("#hustle-dialog--manage-tracking"),n=e(t.currentTarget),o=n.data("module-id"),a={enabledTrackings:n.data("tracking-types").split(",")};s.find("#hustle-manage-tracking-form-container").html(i(a)),s.find("#hustle-button-toggle-tracking-types").data("module-id",o),SUI.dialogs["hustle-dialog--manage-tracking"].show()}})}(jQuery),Hustle.define("Modals.New_Module",function(e){"use strict";return Backbone.View.extend({el:"#hustle-new-module--dialog",data:{},events:{"click #hustle-select-mode":"modeSelected","keypress #module-mode-step":"maybeModeSelected","click #hustle-create-module":"createModule","keypress #module-name-step":"maybeCreateModule","click #hustle-new-module--create-back":"goToModeStep",'change input[name="mode"]':"modeChanged",'keydown input[name="name"]':"nameChanged"},initialize:function(e){_.extend(this.data,e)},modeChanged:function(t){var i=e(t.target).val();this.data.mode=i,this.$el.find("#hustle-select-mode").prop("disabled",!1)},nameChanged:function(t){var i=this;setTimeout(function(){i.$(".sui-error-message").hide();var s=e(t.target).val();i.data.name=s,0===s.trim().length?(i.$("#hustle-create-module").prop("disabled",!0),i.$("#error-empty-name").closest(".sui-form-field").addClass("sui-form-field-error"),i.$("#error-empty-name").show()):(i.$("#hustle-create-module").prop("disabled",!1),i.$("#error-empty-name").closest(".sui-form-field").removeClass("sui-form-field-error"),i.$("#error-empty-name").hide())},300)},modeSelected:function(e){this.$el.find('input[name="mode"]:checked').trigger("change"),0!==Object.keys(this.data).length&&(SUI.replaceModal("hustle-new-module--create","hustle-create-new-module","hustle-module-name",!1),e.preventDefault())},maybeCreateModule:function(e){13===e.which&&(e.preventDefault(),this.$("#hustle-create-module").click())},maybeModeSelected:function(e){13===e.which&&(e.preventDefault(),this.$("#hustle-select-mode").click())},goToModeStep:function(e){SUI.replaceModal("hustle-new-module--type","hustle-create-new-module","hustle-new-module--type-close",!1),e.preventDefault()},createModule:function(t){var i=e(t.target).closest("#hustle-new-module--create"),s=i.find("#error-saving-settings"),n=i.find("#hustle-create-module"),o=i.data("nonce");if(void 0===this.data.mode&&"social_sharing"!==this.data.moduleType||void 0===this.data.name||0===this.data.name.length)return s.show(),void n.removeClass("sui-button-onload");s.hide(),n.addClass("sui-button-onload"),e.ajax({url:ajaxurl,type:"POST",data:{data:{module_name:this.data.name,module_mode:this.data.mode,module_type:this.data.moduleType},action:"hustle_create_new_module",_ajax_nonce:o}}).done(function(e){e&&e.data&&e.data.redirect_url?window.location.replace(e.data.redirect_url):(s.show(),n.removeClass("sui-button-onload"))}).fail(function(){s.show(),n.removeClass("sui-button-onload")})}})}),Hustle.define("Modals.ImportModule",function(e){"use strict";return Backbone.View.extend({el:"#hustle-dialog--import",events:{"change #hustle-import-file-input":"selectUploadFile","click .sui-upload-file":"changeFile","click .sui-upload-file button":"resetUploadFile","click .hustle-import-check-all-checkbox":"checkAll","change .hustle-module-meta-checkbox":"uncheckAllOption"},initialize:function(){},open:function(t){var i=e(t.currentTarget),s=i.data("module-id"),n=Optin.template("hustle-import-modal-options-tpl"),o=e("#hustle-dialog--import"),a=o.find("#hustle-import-module-submit-button"),l=void 0===s,r={isNew:l,isOptin:"optin"===i.data("module-mode")};o.find("#hustle-import-modal-options").html(n(r)),l?(a.removeAttr("data-module-id"),SUI.tabs(),o.find(".sui-tab-item").on("click",function(){var t=e(this);e("#"+t.data("label-for")).click()})):a.attr("data-module-id",s),SUI.openModal("hustle-dialog--import",t.currentTarget,"hustle-import-file-input",!0)},selectUploadFile:function(t){t.preventDefault();var i=e(t.target).val().replace(/C:\\fakepath\\/i,"");Module.Utils.accessibleHide(e("#hustle-dialog--import .sui-notice-error"),!1),i?(e(".sui-upload-file span:first").text(i),e(".sui-upload").addClass("sui-has_file"),e("#hustle-import-module-submit-button").prop("disabled",!1)):(e(".sui-upload").removeClass("sui-has_file"),e(".sui-upload-file span:first").text(""),e("#hustle-import-module-submit-button").prop("disabled",!0))},resetUploadFile:function(t){t.stopPropagation(),e("#hustle-import-file-input").val("").trigger("change")},changeFile:function(t){e("#hustle-import-file-input").trigger("click")},checkAll:function(t){var i=e(t.currentTarget),s=i.is(":checked");i.closest(".hui-inputs-list").find("input.hustle-module-meta-checkbox:not(.hustle-import-check-all-checkbox)").prop("checked",s)},uncheckAllOption:function(t){var i=e(t.currentTarget).closest(".hui-inputs-list").find(".hustle-import-check-all-checkbox");i.is(":checked")&&i.prop("checked",!1)}})}),Hustle.define("Mixins.Model_Updater",function(e,t,i){"use strict";return{initMix:function(){this.events=_.extend({},this.events,this._events),this.delegateEvents()},_events:{"change textarea":"_updateText",'change input[type="text"]':"_updateText",'change input[type="url"]':"_updateText",'change input[type="hidden"]':"_updateText",'change input[type="number"]':"_updateText",'change input[type="checkbox"]':"_updateCheckbox","change input[type=radio]":"_updateRadios","change select":"_updateSelect"},_updateText:function(t){var i=e(t.target),s=i.data("attribute"),n=this[i.data("model")||"model"],o=_.isTrue(i.data("silent"))?{silent:!0}:{};n&&s&&(t.stopPropagation(),n.set.call(n,s,t.target.value,o))},_updateCheckbox:function(t){var i=e(t.target),s=i.data("attribute"),n=i.val(),o=this[i.data("model")||"model"],a=_.isTrue(i.data("silent"))?{silent:!0}:{};if(o&&s)if(t.stopPropagation(),"on"!==n){var l=o.get.call(o,s);i.is(":checked")?l.push(n):l=_.without(l,n),o.set.call(o,s,l,a)}else o.set.call(o,s,i.is(":checked")?1:0,a)},_updateRadios:function(t){var i=e(t.target),s=i.data("attribute"),n=this[i.data("model")||"model"],o=_.isTrue(i.data("silent"))?{silent:!0}:{};n&&s&&(t.stopPropagation(),n.set.call(n,s,t.target.value,o))},_updateSelect:function(t){var i=e(t.target),s=i.data("attribute"),n=this[i.data("model")||"model"],o=_.isTrue(i.data("silent"))?{silent:!0}:{};n&&s&&(t.stopPropagation(),n.set.call(n,s,i.val(),o))}}}),Hustle.define("Mixins.Module_Settings",function(e,t,i){"use strict";return _.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("hustle-wizard-behaviour-tpl"),targetContainer:e("#hustle-wizard-behaviour"),events:{},init:function(e){if(this.moduleType=optinVars.current.data.module_type,this.stopListening(this.model,"change",this.viewChanged),this.listenTo(this.model,"change",this.viewChanged),"embedded"!==this.moduleType&&(this.stopListening(this.model.get("triggers"),"change",this.viewChanged),this.listenTo(this.model.get("triggers"),"change",this.viewChanged)),this.targetContainer.length)return this.render()},render:function(e){var t=this.model.toJSON();return this.setElement(this.template(_.extend({shortcode_id:optinVars.current.shortcode_id},t))),this},afterRender:function(){},viewChanged:function(e){var t=e.changed;if("on_scroll"in t){var i=this.$("#hustle-on-scroll--scrolled-toggle-wrapper"),s=this.$("#hustle-on-scroll--selector-toggle-wrapper");(i.length||s.length)&&("scrolled"===t.on_scroll?(i.removeClass("sui-hidden"),s.addClass("sui-hidden")):(s.removeClass("sui-hidden"),i.addClass("sui-hidden")))}if("on_submit"in t){var n=this.$("#hustle-on-submit-delay-wrapper");n.length&&("nothing"!==t.on_submit?n.removeClass("sui-hidden"):n.addClass("sui-hidden"))}}})}),Hustle.define("Mixins.Module_Content",function(e,t,i){"use strict";return _.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("hustle-wizard-content-tpl"),moduleType:"",targetContainer:e("#hustle-wizard-content"),events:{},init:function(e){this.stopListening(this.model,"change",this.modelUpdated),this.listenTo(this.model,"change",this.modelUpdated),this.moduleType=e.moduleType},render:function(){var e;if(this.targetContainer.length)return e=this.model.toJSON(),this.setElement(this.template(_.extend({module_type:this.moduleType},e))),this},afterRender:function(){this.targetContainer.length&&this.renderFeaturedImage(),optinVars.is_new&&Module.Notification.open("success",optinVars.messages.commons.module_created.replace(/{type_name}/g,optinVars.module_name[this.moduleType]),1e4)},renderFeaturedImage:function(){var e=Hustle.get("Featured_Image_Holder"),t=this.$("#wph-wizard-choose_image");t.length&&(this.mediaHolder=new e({model:this.model,attribute:"feature_image",moduleType:this.moduleType,targetDiv:t}),t.html(""),t.html(this.mediaHolder.$el))},modelUpdated:function(e){var t=e.changed;"module_name"in t&&this.model.set("module_name",t.module_name,{silent:!0}),"feature_image"in t&&Hustle.Events.trigger("modules.view.feature_image_updated",t)}})}),Hustle.define("Mixins.Module_Design",function(e,t,i){"use strict";return _.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("hustle-wizard-appearance-tpl"),targetContainer:e("#hustle-wizard-appearance"),cssEditor:!1,modalSelectors:{".hustle-layout .hustle-layout-content ":"Layout",".hustle-layout .hustle-title":"Title",".hustle-layout .hustle-subtitle ":"Subtitle",".hustle-layout .hustle-layout-content .hustle-image img ":"Feat. Image",".hustle-layout .hustle-layout-content .hustle-group-content p ":"Main Content",".hustle-layout .hustle-button-cta ":"CTA Button"},formSelectors:{".hustle-layout .hustle-layout-body .hustle-layout-form ":"Form Container",".hustle-layout .hustle-layout-body .hustle-layout-form .hustle-input ":"Input",".hustle-layout .hustle-layout-body .hustle-layout-form .hustle-button-submit ":"Submit",".hustle-success ":"Success Container",".hustle-success .hustle-success-content p ":"Success Message"},formExtraSelectors:{".hustle-layout .hustle-layout-body .hustle-form-options ":"Container",".hustle-layout .hustle-layout-body .hustle-form-options .hustle-group-title ":"Title",".hustle-layout .hustle-layout-body .hustle-radio span[aria-hidden]":"Radio",".hustle-layout .hustle-layout-body .hustle-radio span:not([aria-hidden])":"Radio (Label)",".hustle-layout .hustle-layout-body .hustle-checkbox span[aria-hidden]":"Checkbox",".hustle-layout .hustle-layout-body .hustle-checkbox span:not([aria-hidden])":"Checkbox (Label)"},events:{"click .hustle-css-stylable":"insertSelector","click .hustle-reset-color-palette":"resetPickers"},init:function(){if("embedded"!==optinVars.current.data.module_type&&e.extend(this.modalSelectors,{".hustle-button-close":"Close Button"}),this.stopListening(this.model,"change",this.viewChanged),this.listenTo(this.model,"change",this.viewChanged),Hustle.Events.off("modules.view.feature_image_updated").on("modules.view.feature_image_updated",e.proxy(this.ViewChangedContentTab,this)),this.targetContainer.length)return this.render()},render:function(){return this.setElement(this.template(_.extend({modalSelectors:this.modalSelectors,formSelectors:this.formSelectors,formExtraSelectors:this.formExtraSelectors},this.model.toJSON()))),this},afterRender:function(){this.createPickers(),this.createEditor(),this.cssChange(),this.addCreatePalettesLink()},createPickers:function(){var t=this,i=this.$(".sui-colorpicker-input");i.wpColorPicker({change:function(t,i){var s=e(this);s.val()!==i.color.toCSS()&&s.val(i.color.toCSS()).trigger("change")},palettes:["#333333","#FFFFFF","#17A8E3","#E1F6FF","#666666","#AAAAAA","#E6E6E6"]}),i.hasClass("wp-color-picker")&&i.each(function(){var i=e(this),s=i.closest(".sui-colorpicker-wrap"),n=s.find(".sui-colorpicker-value span[role=button]"),o=s.find(".sui-colorpicker-value"),a=o.find("button"),l="hex",r=i.closest(".wp-picker-container"),d=r.find(".wp-color-result"),u=d.find(".color-alpha"),c=r.find(".wp-picker-clear");!0===i.data("alpha")?(l="rgba",i.bind("change",function(){n.find("span").css({"background-color":u.css("background")}),o.find("input").val(i.val())})):i.bind("change",function(){n.find("span").css({"background-color":d.css("background-color")}),o.find("input").val(i.val())}),s.find(".sui-colorpicker").addClass("sui-colorpicker-"+l),s.find(".sui-button, span[role=button]").on("click",function(e){d.click(),e.preventDefault(),e.stopPropagation()}),a.on("click",function(e){var s=i.data("attribute"),a=t.model.get("color_palette"),l=optinVars.palettes[a][s];c.click(),o.find("input").val(l),i.val(l).trigger("change"),n.find("span").css({"background-color":l}),e.preventDefault(),e.stopPropagation()})})},updatePickers:function(e){var t=this;if(void 0!==optinVars.palettes[e]){var i=optinVars.palettes[e];_.each(i,function(e,i){t.$('input[data-attribute="'+i+'"]').val(e).trigger("change")})}},resetPickers:function(t){var i=e(t.target);i.addClass("sui-button-onload").prop("disabled",!0);var s=e('select[data-attribute="color_palette"]').val();this.updatePickers(s),setTimeout(function(){i.removeClass("sui-button-onload").prop("disabled",!1)},500)},addCreatePalettesLink:function(){var e=this.$("#hustle-create-palette-link"),t=this.$(".select-container.hui-select-palette .list-results");t.find(".hui-button").length||t.append(e)},createEditor:function(){this.cssEditor=ace.edit("hustle_custom_css"),this.cssEditor.getSession().setMode("ace/mode/css"),this.cssEditor.$blockScrolling=1/0,this.cssEditor.setTheme("ace/theme/sui"),this.cssEditor.getSession().setUseWrapMode(!0),this.cssEditor.getSession().setUseWorker(!1),this.cssEditor.setShowPrintMargin(!1),this.cssEditor.renderer.setShowGutter(!0),this.cssEditor.setHighlightActiveLine(!0)},updateCustomCss:function(){this.cssEditor&&this.model.set("custom_css",this.cssEditor.getValue())},cssChange:function(){var e=this;this.cssEditor.getSession().on("change",function(){e.model.userHasChange()})},insertSelector:function(t){var i=e(t.target).data("stylable")+"{}";this.cssEditor.navigateFileEnd(),this.cssEditor.insert(i),this.cssEditor.navigateLeft(1),this.cssEditor.focus(),t.preventDefault()},viewChanged:function(e){var t=e.changed;if("form_layout"in t){var i=this.$("#hustle-feature-image-position-option"),s=this.$("#hustle-feature-image-above-label"),n=this.$("#hustle-feature-image-below-label");if(s.length||n.length)if("one"===t.form_layout)s.removeClass("sui-hidden"),n.removeClass("sui-hidden");else{var o=e.get("feature_image_position");"left"!==o&&"right"!==o&&(i.find("input").prop("checked",!1),i.find("#hustle-feature-image-left").prop("checked",!0),this.model.set("feature_image_position","left"),i.find(".sui-tab-item").removeClass("active"),i.find("#hustle-feature-image-left-label").addClass("active")),s.addClass("sui-hidden"),n.addClass("sui-hidden")}}if("color_palette"in t&&this.updatePickers(t.color_palette),"feature_image_horizontal"in t){var a=this.$("#hustle-image-custom-position-horizontal");a.length&&("custom"!==t.feature_image_horizontal?a.prop("disabled",!0):a.prop("disabled",!1))}else if("feature_image_vertical"in t){var l=this.$("#hustle-image-custom-position-vertical");l.length&&("custom"!==t.feature_image_vertical?l.prop("disabled",!0):l.prop("disabled",!1))}},ViewChangedContentTab:function(e){if("feature_image"in e){var t=this.$("#hustle-appearance-feature-image-placeholder"),i=this.$("#hustle-appearance-feature-image-settings");t.length&&i.length&&(e.feature_image?(i.show(),t.hide()):(i.hide(),t.show()))}}})}),Hustle.define("Mixins.Module_Display",function(e,t,i){"use strict";return _.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("hustle-wizard-display-tpl"),moduleId:0,moduleType:"",targetContainer:e("#hustle-wizard-display"),events:{},extViewChanged:_.noop,init:function(e){this.stopListening(this.model,"change",this.viewChanged),this.listenTo(this.model,"change",this.viewChanged),this.moduleType=e.moduleType},render:function(){var e;if(this.targetContainer.length)return e=this.model.toJSON(),this.setElement(this.template(_.extend({module_type:this.moduleType},e))),this},afterRender:function(){},viewChanged:function(e){var t=e.changed;this.extViewChanged(t)}})}),Hustle.define("Mixins.Module_Emails",function(e,t,i){"use strict";return _.extend({},Hustle.get("Mixins.Model_Updater"),{template:Optin.template("hustle-wizard-emails-tpl"),targetContainer:e("#hustle-wizard-emails"),events:{"click .hustle-optin-field--add":"addFields","click .hustle-optin-field--edit":"editField","click .sui-builder-field":"maybeEditField","click .hustle-optin-field--delete":"deleteFieldOnClick","click ul.list-results li":"setFieldOption","click .hustle-optin-field--copy":"duplicateField"},init:function(e){if(this.stopListening(this.model,"change",this.viewChanged),this.listenTo(this.model,"change",this.viewChanged),this.targetContainer.length)return this.render()},render:function(){var t=this.model.toJSON(),i=this.model.get("form_elements");for(var s in this.setElement(this.template(t)),i){var n=i[s];i[s]=_.extend({},this.getFieldDefaults(n.type),n),"submit"!==s&&this.addFieldToPanel(i[s])}this.model.set("form_elements",i,{silent:!0});var o=this.$("#hustle-form-fields-container").sortable({axis:"y",containment:".sui-box-builder"});return o.on("sortupdate",e.proxy(this.fieldsOrderChanged,this,o)),this},afterRender:function(){this.updateDynamicValueFields()},resetDynamicValueFieldsPlaceholders:function(){this.$("select.hustle-field-options").html(""),this.$(".hustle-fields-placeholders-options").length&&this.$(".hustle-fields-placeholders-options").html("")},updateDynamicValueFields:function(){var t=this.model.get("form_elements");for(var i in this.resetDynamicValueFieldsPlaceholders(),t)"submit"!==i&&"recaptcha"!==i&&"gdpr"!==i&&(this.addFieldToDynamicValueFields(t[i]),this.$("select.hustle-field-options").trigger("sui:change"));this.$("div.select-list-container .list-results:empty").each(function(){var t=e(this).closest(".select-container").find("select.hustle-field-options").data("type");e(this).html('<li style="cursor: default; pointer-events: none;">'+optinVars.messages.form_fields.errors.no_fileds_info.replace("{field_type}",t)+"</li>")})},fieldsOrderChanged:function(e){var t=this.model.get("form_elements"),i=e.sortable("toArray",{attribute:"data-field-id"}),s={},n=!0,o=!1,a=void 0;try{for(var l,r=i[Symbol.iterator]();!(n=(l=r.next()).done);n=!0){var d=l.value;s[d]=t[d]}}catch(e){o=!0,a=e}finally{try{n||null==r.return||r.return()}finally{if(o)throw a}}s=_.extend({},s,t),this.model.set("form_elements",s)},viewChanged:function(e){var t=e.changed;if("auto_close_success_message"in t){var i=this.$("#section-auto-close-success-message .sui-row");i.length&&("1"===t.auto_close_success_message?i.removeClass("sui-hidden"):i.addClass("sui-hidden"))}"form_elements"in t&&this.updateDynamicValueFields()},addFields:function(){(new(Hustle.get("Modals.Optin_Fields"))).on("fields:added",e.proxy(this.addNewFields,this)),SUI.dialogs["hustle-dialog--optin-fields"].show()},maybeEditField:function(t){e(t.target).closest(".sui-dropdown").length||this.editField(t)},editField:function(t){var i=e(t.target).closest(".sui-builder-field").data("field-id"),s=this.model.get("form_elements")[i],n=Object.assign({},this.getFieldViewDefaults(s.type),s);new(Hustle.get("Modals.Edit_Field"))({field:s,fieldData:n,model:this.model}).on("field:updated",e.proxy(this.formFieldUpdated,this)),SUI.dialogs["hustle-dialog--edit-field"].show()},formFieldUpdated:function(e,t,i){if(Object.keys(t).length){if("name"in t)return this.addNewFields(e.type,e,i.name),void this.deleteField(i.name);var s=this.$("#hustle-optin-field--"+e.name);if("required"in t){var n=s.find(".sui-error"),o=e.required;_.isTrue(o)?n.show():_.isFalse(o)&&n.hide()}if("label"in t)this.updateDynamicValueFields(),s.find(".hustle-field-label-text").text(e.label)}},deleteFieldOnClick:function(t){var i=e(t.target).closest(".sui-builder-field").data("field-id");this.deleteField(i)},setFieldOption:function(t){var i=e(t.target),s=i.find("span:eq(1)").text();i.closest(".sui-insert-variables").find('input[type="text"]').val(s).trigger("change")},deleteField:function(t){var i=this.$("#hustle-optin-field--"+t),s=Object.assign({},this.model.get("form_elements"));delete s[t],this.model.set("form_elements",s),-1!==jQuery.inArray(t,["gdpr","recaptcha"])?(i.addClass("sui-hidden"),e("#hustle-optin-insert-field--"+t).prop("disabled",!1).prop("checked",!1)):i.remove()},duplicateField:function(t){var i=e(t.target).closest(".sui-builder-field").data("field-id"),s=Object.assign({},this.model.get("form_elements")),n=Object.assign({},s[i]);delete n.name,n.can_delete=!0,this.addNewFields(n.type,n)},addNewFields:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=Object.assign({},this.model.get("form_elements"));if(Array.isArray(e)){var n=!0,o=!1,a=void 0;try{for(var l,r=e[Symbol.iterator]();!(n=(l=r.next()).done);n=!0){var d=l.value,u=this.getFieldDefaults(d);t&&d in t&&_.extend(u,t[d]),this.addFieldToPanel(u),s[u.name]=u}}catch(e){o=!0,a=e}finally{try{n||null==r.return||r.return()}finally{if(o)throw a}}}else{var c=this.getFieldDefaults(e);if(t&&_.extend(c,t),this.addFieldToPanel(c,i),null===i)s[c.name]=c;else{var h=[];jQuery.each(s,function(e,t){h[e]=t,e===i&&(h[c.name]=c)}),s=h}}this.model.set("form_elements",s)},addFieldToDynamicValueFields:function(t){var i=e("<option/>",{value:t.name,"data-content":"{"+t.name+"}"}).text(t.label),s='<li><button value="{'.concat(t.name,'}">').concat(t.label,"</button></li>");this.$('select.hustle-field-options:not([data-type]), select.hustle-field-options[data-type="'+t.type+'"]').append(i),this.$(".hustle-fields-placeholders-options").length&&this.$(".hustle-fields-placeholders-options").append(s)},addFieldToPanel:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=Optin.template("hustle-form-field-row-tpl"),n=this.$("#hustle-form-fields-container");if(t=_.extend({},this.getFieldViewDefaults(t.type),t),-1!==jQuery.inArray(t.type,["gdpr","recaptcha"]))this.$("#hustle-optin-field--"+t.type).removeClass("sui-hidden"),e("#hustle-optin-insert-field--"+t.type).prop("checked",!0).prop("disabled",!0);else if(null===i)n.append(s(t));else{var o=this.$("#hustle-optin-field--"+i);0<o.length?o.after(s(t)):n.append(s(t))}},getNewFieldId:function(e){for(var t=Object.assign({},this.model.get("form_elements")),i=e;i in t&&-1===jQuery.inArray(i,["gdpr","recaptcha","submit"]);)i=e+"-"+Math.floor(99*Math.random());return i},getFieldDefaults:function(e){var t=this.getNewFieldId(e),i={label:optinVars.messages.form_fields.label[e+"_label"],required:"false",css_classes:"",type:e,name:t,required_error_message:optinVars.messages.required_error_message.replace("{field}",e),validation_message:optinVars.messages.validation_message.replace("{field}",e),placeholder:""};switch(e){case"timepicker":i.time_format="12",i.time_hours="9",i.time_minutes="30",i.time_period="am",i.validation_message=optinVars.messages.time_validation_message,i.required_error_message=optinVars.messages.is_required.replace("{field}",i.label),i.validate="false";break;case"datepicker":i.date_format="mm/dd/yy",i.validation_message=optinVars.messages.date_validation_message,i.required_error_message=optinVars.messages.is_required.replace("{field}",i.label),i.validate="false";break;case"recaptcha":i.threshold="0.5",i.version="v2_checkbox",i.recaptcha_type="compact",i.recaptcha_theme="light",i.v2_invisible_theme="light",i.recaptcha_language="automatic",i.v2_invisible_show_badge="1",i.v2_invisible_badge_replacement=optinVars.messages.form_fields.recaptcha_badge_replacement,i.v3_recaptcha_show_badge="1",i.v3_recaptcha_badge_replacement=optinVars.messages.form_fields.recaptcha_badge_replacement,i.validation_message=optinVars.messages.recaptcha_validation_message,i.error_message=optinVars.messages.form_fields.recaptcha_error_message;break;case"gdpr":i.gdpr_message=optinVars.messages.form_fields.gdpr_message,i.required="true",i.required_error_message=optinVars.messages.gdpr_required_error_message;break;case"email":i.validate="true";break;case"url":i.required_error_message=optinVars.messages.url_required_error_message,i.validate="true";break;case"phone":i.validate="false";break;case"hidden":i.default_value="",i.custom_value="";break;case"number":case"text":i.required_error_message=optinVars.messages.cant_empty}return i},getFieldViewDefaults:function(e){var t={required:"false",validated:"false",placeholder_placeholder:optinVars.messages.form_fields.label.placeholder,label_placeholder:"",name_placeholder:"",icon:"send",css_classes:"",type:e,name:e,placeholder:optinVars.messages.form_fields.label[e+"_placeholder"],can_delete:!0,fieldId:this.getNewFieldId(e)};switch(e){case"email":t.icon="mail";break;case"name":t.icon="profile-male";break;case"phone":t.icon="phone";break;case"address":t.icon="pin";break;case"url":t.icon="web-globe-world";break;case"text":t.icon="style-type";break;case"number":t.icon="element-number";break;case"timepicker":t.icon="clock";break;case"datepicker":t.icon="calendar";break;case"recaptcha":t.icon="recaptcha";break;case"gdpr":t.icon="gdpr";break;case"hidden":t.icon="eye-hide"}return t}})}),Hustle.define("Module.IntegrationsView",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{el:"#hustle-box-section-integrations",events:{"click .connect-integration":"connectIntegration","keypress .connect-integration":"preventEnterKeyFromDoingThings"},init:function(e){this.moduleId=e.moduleId,this.listenTo(Hustle.Events,"hustle:providers:reload",this.renderProvidersTables),this.render()},render:function(){var e=this.$el.find("#hustle-not-connected-providers-section"),t=this.$el.find("#hustle-connected-providers-section");0<e.length&&0<t.length&&this.renderProvidersTables()},renderProvidersTables:function(){var t=this,i={};this.$el.find(".hustle-integrations-display").html('<div class="sui-notice sui-notice-sm sui-notice-loading"><p>'+optinVars.fetching_list+"</p></div>"),i.action="hustle_provider_get_form_providers",i._ajax_nonce=optinVars.providers_action_nonce,i.data={moduleId:this.moduleId},e.post({url:ajaxurl,type:"post",data:i}).done(function(e){if(e&&e.success){var i=t.$el.find("#hustle-integrations-active-integrations"),s=t.$el.find("#hustle-integrations-active-count");t.$el.find("#hustle-not-connected-providers-section").html(e.data.not_connected),t.$el.find("#hustle-connected-providers-section").html(e.data.connected),i.val()!==e.data.list_connected&&i.val(e.data.list_connected).trigger("change"),s.val()!==String(e.data.list_connected_total)&&s.val(e.data.list_connected_total).trigger("change")}}).always(function(){t.$el.find(".sui-box-body").removeClass("sui-block-content-center"),t.$el.find(".sui-notice-loading").remove()})},preventEnterKeyFromDoingThings:function(e){13!==e.which||e.preventDefault()},connectIntegration:function(e){Module.integrationsModal.open(e)}}))}),Hustle.define("Mixins.Module_Visibility",function(e,t,i){"use strict";return _.extend({},Hustle.get("Mixins.Model_Updater"),{el:"#hustle-conditions-group",targetContainer:e("#hustle-conditions-group"),events:{"click .hustle-add-new-visibility-group":"addNewGroup","click .hustle-choose-conditions":"openConditionsModal","click .hustle-remove-visibility-group":"removeGroup","change .visibility-group-filter-type":"updateAttribute","change .visibility-group-show-hide":"updateAttribute","change .visibility-group-apply-on":"updateGroupApplyOn"},init:function(t){this.moduleType=t.moduleType,this.activeConditions={},this.render(),e("#hustle-general-conditions").on("click",e.proxy(this.switchConditions,this)),e("#hustle-wc-conditions").on("click",e.proxy(this.switchConditions,this)),this.groupId=""},render:function(){var t=this.model.get("conditions").toJSON();if(e.isEmptyObject(t))this.addNewGroup();else{for(var i in t){var s=this.model.get("conditions."+i);s instanceof Backbone.Model||(_.isEmpty(s)&&_.isArray(s)&&(s={}),s=this.getConditionsGroupModel(s),this.model.set("conditions."+i,s,{silent:!0})),this.addGroupToPanel(s,"render")}this.maybeToggleGroupsBin()}},afterRender:function(){this.bindRemoveConditions()},bindRemoveConditions:function(){e("#hustle-conditions-group .hustle-remove-visibility-condition").off("click").on("click",e.proxy(this.removeCondition,this))},openConditionsModal:function(t){var i=this,s=e(t.currentTarget).data("group-id"),n=this.model.get("conditions."+s),o=void 0!==n?Object.keys(n.toJSON()):[];new(Hustle.get("Modals.Visibility_Conditions"))({groupId:s,conditions:o}).on("conditions:added",e.proxy(i.addNewConditions,i)),this.groupId=s,"done"!==e("html").data("show-was-bind")&&(SUI.dialogs["hustle-dialog--visibility-options"].on("show",function(t){e("#hustle-add-conditions").data("group_id",i.groupId)}),e("html").data("show-was-bind","done")),SUI.dialogs["hustle-dialog--visibility-options"].show()},addNewConditions:function(t){var i=this,s=t.groupId,n=t.conditions,o=this.model.get("conditions."+s);e.each(n,function(e,t){if(o.get(t))return!0;i.addConditionToPanel(t,{},s,o,"new")}),this.bindRemoveConditions(),Hustle.Events.trigger("view.rendered",this)},addGroupToPanel:function(t,i){var s=t.get("group_id"),n=e("#hustle-visibility-conditions-box"),o=Optin.template("hustle-visibility-group-box-tpl")(_.extend({},{groupId:s,apply_on_floating:t.get("apply_on_floating"),apply_on_inline:t.get("apply_on_inline"),apply_on_widget:t.get("apply_on_widget"),apply_on_shortcode:t.get("apply_on_shortcode"),show_or_hide_conditions:t.get("show_or_hide_conditions"),filter_type:t.get("filter_type")}));e(o).insertBefore(n.find(".hustle-add-new-visibility-group")),this.activeConditions[s]={};var a=this,l=t.toJSON();e.each(l,function(e,n){if("object"!==_typeof(n))return!0;a.addConditionToPanel(e,n,s,t,i)})},addConditionToPanel:function(t,i,s,n,o){if(void 0!==Optin.View.Conditions[t]){var a=this.$("#hustle-visibility-group-"+s+" .sui-box-builder-body"),l=new Optin.View.Conditions[t]({type:this.moduleType,model:n,groupId:s,source:o});if(l)return a.find(".sui-builder-field").length||(a.find(".sui-box-builder-message-block").hide(),a.find(".sui-button-dashed").show()),e.isEmptyObject(i)?n.set(t,l.getConfigs()):n.set(t,i),this.activeConditions[s][t]=l,e(l.$el).appendTo(a.find(".sui-builder-fields")),l}},addNewGroup:function(){var e=this.getConditionsGroupModel(),t=e.get("group_id");this.model.set("conditions."+t,e),this.addGroupToPanel(e,"new"),this.maybeToggleGroupsBin(),Hustle.Events.trigger("view.rendered",this)},switchConditions:function(t){t.preventDefault(),"hustle-wc-conditions"===e(t.currentTarget).prop("id")?(e("#hustle-dialog--visibility-options .general_condition").hide(),e("#hustle-dialog--visibility-options .wc_condition").show()):(e("#hustle-dialog--visibility-options .wc_condition").hide(),e("#hustle-dialog--visibility-options .general_condition").show())},removeGroup:function(t){var i=e(t.currentTarget).data("group-id"),s=this.$("#hustle-visibility-group-"+i);delete this.activeConditions[i],this.model.get("conditions").unset(i),s.remove(),Object.keys(this.activeConditions).length||this.addNewGroup(),this.maybeToggleGroupsBin()},removeCondition:function(t){var i=e(t.currentTarget),s=i.data("condition-id"),n=i.data("group-id"),o=this.$("#hustle-visibility-group-"+n+" .sui-box-builder-body");this.activeConditions[n][s].remove(),delete this.activeConditions[n][s],this.model.get("conditions."+n).unset(s),o.find(".sui-builder-field").length||o.find(".sui-box-builder-message-block").show(),this.bindRemoveConditions()},updateAttribute:function(t){t.stopPropagation();var i=e(t.target),s=i.data("group-id"),n=i.data("group-attribute"),o=i.val();this.model.get("conditions."+s).set(n,o)},updateGroupApplyOn:function(t){t.stopPropagation();var i=e(t.target),s=i.data("group-id"),n=i.data("property"),o=i.is(":checked"),a=this.model.get("conditions."+s);("embedded"===this.moduleType&&-1!==e.inArray(n,["apply_on_inline","apply_on_widget","apply_on_shortcode"])||"social_sharing"===this.moduleType&&-1!==e.inArray(n,["apply_on_floating","apply_on_inline","apply_on_widget","apply_on_shortcode"]))&&a.set(n,o)},getConditionsGroupModel:function(e){if(e)"embedded"!==this.moduleType||e.apply_on_inline&&e.apply_on_widget&&e.apply_on_shortcode?"social_sharing"!==this.moduleType||e.apply_on_floating&&e.apply_on_inline&&e.apply_on_widget&&e.apply_on_shortcode||(e.apply_on_floating||(e.apply_on_floating=!0),e.apply_on_inline||(e.apply_on_inline=!0),e.apply_on_widget||(e.apply_on_widget=!0),e.apply_on_shortcode||(e.apply_on_shortcode=!1)):(e.apply_on_inline||(e.apply_on_inline=!0),e.apply_on_widget||(e.apply_on_widget=!0),e.apply_on_shortcode||(e.apply_on_shortcode=!1));else{var t=(new Date).getTime().toString(16);this.model.get("conditions."+t),e={group_id:t,show_or_hide_conditions:"show",filter_type:"all"},"embedded"===this.moduleType?(e.apply_on_inline=!0,e.apply_on_widget=!0,e.apply_on_shortcode=!1):"social_sharing"===this.moduleType&&(e.apply_on_floating=!0,e.apply_on_inline=!0,e.apply_on_widget=!0,e.apply_on_shortcode=!1)}return new(Hustle.get("Model"))(e)},maybeToggleGroupsBin:function(){var t=this.model.get("conditions"),i=e("#hustle-conditions-group .sui-box-builder-header .hustle-remove-visibility-group");1===Object.keys(t.toJSON()).length?Module.Utils.accessibleHide(i):Module.Utils.accessibleShow(i)}})}),Hustle.define("Mixins.Wizard_View",function(e,t,i){"use strict";return{moduleType:"",el:".sui-wrap",events:{"click .sui-sidenav .sui-vertical-tab a":"sidenav","click a.hustle-go-to-tab":"sidenav","click a.notify-error-tab":"sidenav","click .hustle-action-save":"saveChanges","click .wpmudev-button-navigation":"doButtonNavigation","change #hustle-module-name":"updateModuleName","click #hustle-preview-module":"previewModule","blur input.sui-form-control":"removeErrorMessage"},init:function(t){return this.setTabsViews(t),Hustle.Events.off("modules.view.switch_status",e.proxy(this.switchStatusTo,this)),Hustle.Events.on("modules.view.switch_status",e.proxy(this.switchStatusTo,this)),e(i).off("popstate",e.proxy(this.updateTabOnPopstate,this)),e(i).on("popstate",e.proxy(this.updateTabOnPopstate,this)),e(document).off("tinymce-editor-init",e.proxy(this.tinymceReady,this)),e(document).on("tinymce-editor-init",e.proxy(this.tinymceReady,this)),void 0!==this._events&&(this.events=e.extend(!0,{},this.events,this._events),this.delegateEvents()),this.render(),this},setTabsViews:function(e){this.contentView=e.contentView,this.emailsView=e.emailsView,this.designView=e.designView,this.integrationsView=e.integrationsView,this.visibilityView=e.visibilityView,this.settingsView=e.settingsView,this.moduleType=this.model.get("module_type"),"embedded"===this.moduleType&&(this.displayView=e.displayView)},render:function(){this.renderTabs()},renderTabs:function(){this.contentView.targetContainer.html(""),this.contentView.render(),this.contentView.delegateEvents(),this.contentView.targetContainer.append(this.contentView.$el),this.contentView.afterRender(),this.emailsView.targetContainer.html(""),this.emailsView.delegateEvents(),this.emailsView.targetContainer.append(this.emailsView.$el),this.emailsView.afterRender(),this.integrationsView.delegateEvents(),this.designView.targetContainer.html(""),this.designView.delegateEvents(),this.designView.targetContainer.append(this.designView.$el),this.designView.afterRender(),"embedded"===this.moduleType&&(this.displayView.targetContainer.html(""),this.displayView.render(),this.displayView.delegateEvents(),this.displayView.targetContainer.append(this.displayView.$el),this.displayView.afterRender()),this.visibilityView.delegateEvents(),this.visibilityView.targetContainer.append(this.visibilityView.$el),this.visibilityView.afterRender(),this.settingsView.targetContainer.html(""),this.settingsView.delegateEvents(),this.settingsView.targetContainer.append(this.settingsView.$el),this.settingsView.afterRender()},sidenav:function(t){t.preventDefault();var i=e(t.target).data("tab");i&&this.goToTab(i,!0)},goToTab:function(t,i){var s=this.$el.find('a[data-tab="'+t+'"]'),n=s.closest(".sui-vertical-tabs").find(".sui-vertical-tab a"),o=this.$el.find(".sui-box[data-tab]"),a=this.$el.find('.sui-box[data-tab="'+t+'"]');if(i){var l={tabName:t},r=this.model.get("module_id");history.pushState(l,"Hustle "+this.moduleType+" wizard","admin.php?page="+optinVars.current.wizard_page+"&id="+r+"§ion="+t)}n.removeClass("current"),o.hide(),s.addClass("current"),a.show(),e(".sui-wrap-hustle")[0].scrollIntoView()},updateTabOnPopstate:function(e){var t=e.originalEvent.state;t&&this.goToTab(t.tabName)},doButtonNavigation:function(t){t.preventDefault();var i="prev"===e(t.target).data("direction")?"prev":"next",s=this.getNextOrPrevTabName(i);this.goToTab(s,!0)},getNextOrPrevTabName:function(t){var i=e("#hustle-module-wizard-view .sui-sidenav ul li a.current");i.data("tab");return"prev"===t?i.parent().prev().find("a").data("tab"):i.parent().next().find("a").data("tab")},tinymceReady:function(t,i){var s=this;i.on("change",function(){Module.hasChanges||s.contentView.model.userHasChange()}),e("textarea#"+i.id).on("change",function(){Module.hasChanges||s.contentView.model.userHasChange()})},setContentFromTinymce:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if("undefined"!=typeof tinyMCE){var t=tinyMCE.get("main_content"),i=this.$("textarea#main_content"),s="true"===i.attr("aria-hidden")?t.getContent():i.val();this.contentView.model.set("main_content",s,{silent:e});var n=tinyMCE.get("success_message"),o=this.$("textarea#success_message"),a="true"===o.attr("aria-hidden")?n.getContent():o.val();this.emailsView.model.set("success_message",a,{silent:e});var l=tinyMCE.get("email_body"),r=this.$("textarea#email_body"),d="true"===o.attr("aria-hidden")?l.getContent():r.val();this.emailsView.model.set("email_body",d,{silent:e})}},sanitizeData:function(){var e=this.contentView.model.get("cta_url");/^(f|ht)tps?:\/\//i.test(e)||(e="https://"+e,this.contentView.model.set("cta_url",e,{silent:!0})),this.designView.updateCustomCss()},validate:function(){this.setContentFromTinymce(!0),this.sanitizeData();var t=this,i=this.$el.find("#hustle-module-wizard-view"),s=i.data("id")?i.data("id"):"-1",n={action:"hustle_validate_module",_ajax_nonce:i.data("nonce"),id:s,module:this.model.toJSON()};return _.extend(n,this.getDataToSave()),e.ajax({url:ajaxurl,type:"POST",data:n,dataType:"json",success:function(i){if(!0===i.success)Module.hasChanges=!1,t.switchStatusTo("saved");else{var s=i.data,n="";void 0!==s.data.icon_error&&(_.each(s.data.icon_error,function(t){e("#hustle-platform-"+t).find(".sui-error-message").show(),e("#hustle-platform-"+t+" .hustle-social-url-field").addClass("sui-form-field-error"),e("#hustle-platform-"+t).not(".sui-accordion-item--open").find(".sui-accordion-open-indicator").click()}),n='<a href="#" data-tab="services" class="notify-error-tab"> Services </a>'),void 0!==s.data.selector_error&&(_.each(s.data.selector_error,function(t){e('input[name="'+t+'_css_selector"]').siblings(".sui-error-message").show(),e('input[name="'+t+'_css_selector"]').parent(".sui-form-field").addClass("sui-form-field-error")}),_.isEmpty(n)||(n+=" and "),n+='<a href="#" data-tab="display" class="notify-error-tab"> Display Options </a>'),n=optinVars.messages.sshare_module_error.replace("{page}",n),Module.Notification.open("error",n,1e9)}}})},save:function(){this.setContentFromTinymce(!0),this.sanitizeData();var t=this,i=this.$el.find("#hustle-module-wizard-view"),s=i.data("id")?i.data("id"):"-1",n={action:"hustle_save_module",_ajax_nonce:i.data("nonce"),id:s,module:this.model.toJSON()};return _.extend(n,this.getDataToSave()),e.ajax({url:ajaxurl,type:"POST",data:n,dataType:"json",success:function(i){if(!0===i.success)Module.hasChanges=!1,t.switchStatusTo("saved");else{var s=i.data,n="";void 0!==s.data.icon_error&&(_.each(s.data.icon_error,function(t){e("#hustle-platform-"+t).find(".sui-error-message").show(),e("#hustle-platform-"+t+" .hustle-social-url-field").addClass("sui-form-field-error"),e("#hustle-platform-"+t).not(".sui-accordion-item--open").find(".sui-accordion-open-indicator").click()}),n='<a href="#" data-tab="services" class="notify-error-tab"> Services </a>'),void 0!==s.data.selector_error&&(_.each(s.data.selector_error,function(t){e('input[name="'+t+'_css_selector"]').siblings(".sui-error-message").show(),e('input[name="'+t+'_css_selector"]').parent(".sui-form-field").addClass("sui-form-field-error")}),_.isEmpty(n)||(n+=" and "),n+='<a href="#" data-tab="display" class="notify-error-tab"> Display Options </a>'),n=optinVars.messages.sshare_module_error.replace("{page}",n),Module.Notification.open("error",n,1e4)}}})},getDataToSave:function(){var e={content:this.contentView.model.toJSON(),emails:this.emailsView.model.toJSON(),design:this.designView.model.toJSON(),integrations_settings:this.integrationsView.model.toJSON(),visibility:this.visibilityView.model.toJSON(),settings:this.settingsView.model.toJSON()};return"embedded"===this.moduleType&&(e.display=this.displayView.model.toJSON()),e},saveChanges:function(t){var i=this,s=this.model.get("active"),n=void 0!==e(t.currentTarget).data("active")&&String(e(t.currentTarget).data("active")),o=!1,a=!1;!1!==n&&("0"===n?i.disableButtonsOnSave("draft"):i.disableButtonsOnSave("publish")),this.validate().done(function(e){if(e.success){!1!==n&&e.success&&(a=!0,"0"!==n&&n!==s&&i.publishingFlow("loading"),n!==s&&(o=!0,i.model.set("active",n,{silent:!0})));var t=i.save();t&&a?t.done(function(e){"string"==typeof e&&(e=JSON.parse(e)),e.success&&o&&i.updateViewOnActiveChange(),"0"!==n&&n!==s&&e.success&&o&&setTimeout(function(){i.publishingFlow("ready")},500)}).always(function(){i.enableSaveButtons()}):i.enableSaveButtons()}else i.switchStatusTo("unsaved"),i.enableSaveButtons()}),t.preventDefault()},updateModuleName:function(t){var i=e(t.target).val();i.length?(this.$("#hustle-module-name-wrapper").removeClass("sui-form-field-error"),this.$("#hustle-module-name-error").hide(),this.model.set("module_name",i)):(this.$("#hustle-module-name-wrapper").addClass("sui-form-field-error"),this.$("#hustle-module-name-error").show())},disableButtonsOnSave:function(e){"draft"===e?this.$("#hustle-draft-button").addClass("sui-button-onload"):"publish"===e&&this.$(".hustle-publish-button").addClass("sui-button-onload"),this.$(".hustle-action-save").prop("disabled",!0),this.$(".wpmudev-button-navigation").prop("disabled",!0)},enableSaveButtons:function(){this.$(".sui-button-onload").removeClass("sui-button-onload"),this.$(".hustle-action-save").prop("disabled",!1),this.$(".wpmudev-button-navigation").prop("disabled",!1)},switchStatusTo:function(e){"saved"===e?(this.$el.find("#hustle-unsaved-changes-status").addClass("sui-hidden"),this.$el.find("#hustle-saved-changes-status").removeClass("sui-hidden")):(this.$el.find("#hustle-unsaved-changes-status").removeClass("sui-hidden"),this.$el.find("#hustle-saved-changes-status").addClass("sui-hidden"))},updateViewOnActiveChange:function(){var e=this.model.get("active"),t="1"===e?optinVars.messages.commons.published:optinVars.messages.commons.draft,i="1"===e?optinVars.messages.commons.unpublish:optinVars.messages.commons.save_draft,s="1"===e?optinVars.messages.commons.save_changes:optinVars.messages.commons.publish;this.$el.find(".sui-status-module .sui-tag").text(t),this.$el.find("#hustle-draft-button .button-text").text(i),this.$el.find(".hustle-publish-button .button-text").text(s)},publishingFlow:function(t){var i=e("#hustle-dialog--publish-flow"),s=i.find(".sui-dialog-content > .sui-box"),n=i.find("#dialogIcon"),o=i.find("#dialogTitle"),a=i.find("#dialogDescription"),l=i.find(".sui-dialog-close"),r=i.find(".sui-dialog-overlay");function d(){n.removeClass("sui-icon-"+s.data("ready-icon")),n.addClass("sui-icon-"+s.data("loading-icon")),"loader"===s.attr("data-loading-icon")&&n.addClass("sui-loading"),o.text(s.data("loading-title")),a.text(s.data("loading-desc")),l.hide()}function u(){SUI.dialogs["hustle-dialog--publish-flow"].hide(),setTimeout(function(){d()},500)}"loading"===t&&(d(),SUI.dialogs["hustle-dialog--publish-flow"].show()),"ready"===t&&(n.removeClass("sui-icon-"+s.data("loading-icon")),n.addClass("sui-icon-"+s.data("ready-icon")),"loader"===s.attr("data-loading-icon")&&n.removeClass("sui-loading"),o.text(s.data("ready-title")),a.text(s.data("ready-desc")),l.show(),o.focus(),r.on("click",function(){u()}),l.on("click",function(){u()}))},removeErrorMessage:function(t){if(t.target.value){var i=e(t.target).parent(".sui-form-field");i.removeClass("sui-form-field-error"),i.find(".sui-error-message").hide()}},previewModule:function(t){t.preventDefault(),this.setContentFromTinymce(!0),this.sanitizeData();var i=e(t.currentTarget),s=this.model.get("module_id"),n=this.model.get("module_type"),o=_.extend({},this.model.toJSON(),this.getDataToSave());i.addClass("sui-button-onload"),Module.preview.open(s,n,o)}}}),function(e){"use strict";var t;Optin.View.Conditions=Optin.View.Conditions||{},t=Hustle.View.extend({conditionId:"",className:"sui-builder-field sui-accordion-item sui-accordion-item--open",_template:Optin.template("hustle-visibility-rule-tpl"),template:!1,_defaults:{typeName:"",conditionName:""},_events:{"change input":"changeInput","change textarea":"changeInput","change select":"changeInput"},init:function(t){return this.undelegateEvents(),this.$el.removeData().unbind(),this.type=t.type,this.groupId=t.groupId,this.filter_type=t.filter_type,this.id=this.conditionId,this.template=void 0!==this.cpt?Optin.template("hustle-visibility-rule-tpl--post_type"):Optin.template("hustle-visibility-rule-tpl--"+this.conditionId),this._defaults={typeName:optinVars.messages.settings[this.type]?optinVars.messages.settings[this.type]:this.type,conditionName:optinVars.messages.conditions[this.conditionId]?optinVars.messages.conditions[this.conditionId]:this.conditionId,groupId:this.groupId,id:this.conditionId,source:t.source},this.data=this.getData(),this.render(),this.events=e.extend(!0,{},this.events,this._events),this.delegateEvents(),this.onInit&&_.isFunction(this.onInit)&&this.onInit.apply(this,arguments),this},getData:function(){return _.extend({},this._defaults,this.defaults(),this.model.get(this.conditionId),{type:this.type})},getTitle:function(){return this.title.replace("{type_name}",this.data.typeName)},getBody:function(){return"function"==typeof this.body?this.body.apply(this,arguments):this.body.replace("{type_name}",this.data.typeName)},getHeader:function(){return this.header},countLines:function(e){return e.replace(/\s+$/g,"").split("\n").length},render:function(){this.setProperties();var t=this._template(_.extend({},{title:this.getTitle(),body:this.getBody(),header:this.getHeader()},this._defaults,{type:this.type}));return this.$el.html(""),this.$el.html(t),e(".wph-conditions--box .wph-conditions--item:not(:last-child)").removeClass("wph-conditions--open").addClass("wph-conditions--closed"),e(".wph-conditions--box .wph-conditions--item:not(:last-child) section").hide(),this.rendered&&"function"==typeof this.rendered&&this.rendered.apply(this,arguments),this},updateAttribute:function(e,t){this.data=this.model.get(this.conditionId),this.data[e]=t,this.model.set(this.conditionId,this.data),this.model.trigger("change")},getAttribute:function(e){var t=this.model.get(this.conditionId);return!(!t||!t[e])&&t[e]},refreshLabel:function(){var e=this.getHeader();this.$el.find(".wph-condition--preview").html(""),this.$el.find(".sui-accordion-item-header .sui-tag").html(e)},changeInput:function(t){var i,s=t.target,n=s.getAttribute("data-attribute"),o=e(s),a=o.is(".sui-select")?o.val():t.target.value;return t.stopImmediatePropagation(),o.is(":checkbox")&&(a=o.is(":checked")),!o.is(".select2-search__field")&&(i=this.updateAttribute(n,a),this.refreshLabel(),i)},getConfigs:function(){return this.defaults()||!0}});var i=function(t){e(".wph-conditions--items").data("select2ScrollPosition",{})},s={events:{'change input[type="radio"]':"setCurrentLi"},setCurrentLi:function(t){var i=e(t.target),s=i.closest("li");s.siblings().removeClass("current"),s.toggleClass("current",i.is(":checked"))}};Optin.View.Conditions.posts=t.extend(_.extend({},s,{conditionId:"posts",setProperties:function(){this.title=optinVars.messages.conditions.posts},defaults:function(){return{filter_type:"except",posts:[]}},onInit:function(){},getHeader:function(){return this.getAttribute("posts").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("posts").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".hustle-select-ajax").SUIselect2({tags:"true",width:"100%",dropdownCssClass:"sui-select-dropdown",ajax:{url:ajaxurl,delay:250,dataType:"json",type:"POST",data:function(e){return{action:"get_new_condition_ids",search:e.term,postType:"post"}},processResults:function(e){return{results:e.data}},cache:!0},createTag:function(){return!1}}).on("select2:selecting",i).on("select2:unselecting",i)}})),Optin.View.Conditions.pages=t.extend(_.extend({},s,{conditionId:"pages",setProperties:function(){this.title=optinVars.messages.conditions.pages},defaults:function(){return{filter_type:"except",pages:[]}},onInit:function(){},getHeader:function(){return this.getAttribute("pages").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("pages").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".hustle-select-ajax").SUIselect2({tags:"true",width:"100%",dropdownCssClass:"sui-select-dropdown",ajax:{url:ajaxurl,delay:250,dataType:"json",type:"POST",data:function(e){return{action:"get_new_condition_ids",search:e.term,postType:"page"}},processResults:function(e){return{results:e.data}},cache:!0},createTag:function(){return!1}}).on("select2:selecting",i).on("select2:unselecting",i)}})),optinVars.post_types&&_.each(optinVars.post_types,function(e,n){Optin.View.Conditions[e.name]=t.extend(_.extend({},s,{conditionId:e.name,cpt:!0,setProperties:function(){this.title=e.label},defaults:function(){return{filter_type:"except",selected_cpts:[],postType:n,postTypeLabel:e.label}},getHeader:function(){return this.getAttribute("selected_cpts").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("selected_cpts").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".hustle-select-ajax").SUIselect2({tags:"true",width:"100%",dropdownCssClass:"sui-select-dropdown",ajax:{url:ajaxurl,delay:250,dataType:"json",type:"POST",data:function(e){return{action:"get_new_condition_ids",search:e.term,postType:n}},processResults:function(e){return{results:e.data}},cache:!0},createTag:function(){return!1}}).on("select2:selecting",i).on("select2:unselecting",i)}}))}),Optin.View.Conditions.categories=t.extend(_.extend({},s,{conditionId:"categories",setProperties:function(){this.title=optinVars.messages.conditions.categories},defaults:function(){return{filter_type:"except",categories:[]}},onInit:function(){},getHeader:function(){return this.getAttribute("categories").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("categories").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".hustle-select-ajax").SUIselect2({tags:"true",width:"100%",dropdownCssClass:"sui-select-dropdown",ajax:{url:ajaxurl,delay:250,dataType:"json",type:"POST",data:function(e){return{action:"get_new_condition_ids",search:e.term,postType:"category"}},processResults:function(e){return{results:e.data}},cache:!0},createTag:function(){return!1}}).on("select2:selecting",i).on("select2:unselecting",i)}})),Optin.View.Conditions.tags=t.extend(_.extend({},s,{conditionId:"tags",setProperties:function(){this.title=optinVars.messages.conditions.tags},defaults:function(){return{filter_type:"except",tags:[]}},onInit:function(){},getHeader:function(){return this.getAttribute("tags").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("tags").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".hustle-select-ajax").SUIselect2({width:"100%",tags:"true",dropdownCssClass:"sui-select-dropdown",ajax:{url:ajaxurl,delay:250,dataType:"json",type:"POST",data:function(e){return{action:"get_new_condition_ids",search:e.term,postType:"tag"}},processResults:function(e){return{results:e.data}},cache:!0},createTag:function(){return!1}}).on("select2:selecting",i).on("select2:unselecting",i)}})),Optin.View.Conditions.visitor_logged_in_status=t.extend({conditionId:"visitor_logged_in_status",setProperties:function(){this.title=optinVars.messages.conditions.visitor_logged_in},defaults:function(){return{show_to:"logged_in"}},getHeader:function(){return this.getAttribute("show_to").length&&"logged_out"===this.getAttribute("show_to")?optinVars.messages.condition_labels.logged_out:optinVars.messages.condition_labels.logged_in},body:function(){return this.template(this.getData())}}),Optin.View.Conditions.shown_less_than=t.extend({conditionId:"shown_less_than",setProperties:function(){this.title=optinVars.messages.conditions.shown_less_than},defaults:function(){return{less_or_more:"less_than",less_than:""}},getHeader:function(){return 0<this.getAttribute("less_than")?"less_than"===this.getAttribute("less_or_more")?optinVars.messages.condition_labels.number_views.replace("{number}",this.getAttribute("less_than")):optinVars.messages.condition_labels.number_views_more.replace("{number}",this.getAttribute("less_than")):optinVars.messages.condition_labels.any},body:function(){return this.template(this.getData())}}),Optin.View.Conditions.visitor_device=t.extend({conditionId:"visitor_device",setProperties:function(){this.title=optinVars.messages.conditions.only_on_mobile},defaults:function(){return{filter_type:"mobile"}},getHeader:function(){return"not_mobile"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.desktop_only:optinVars.messages.condition_labels.mobile_only},body:function(){return this.template(this.getData())}}),Optin.View.Conditions.from_referrer=t.extend({conditionId:"from_referrer",disable:["from_referrer"],setProperties:function(){this.title=optinVars.messages.conditions.from_specific_ref},defaults:function(){return{filter_type:"true",refs:""}},getHeader:function(){var e=0;return this.getAttribute("refs").length&&(e=this.countLines(this.getAttribute("refs"))),e?("false"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.except_these:optinVars.messages.condition_labels.only_these).replace("{number}",e):"false"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.any:optinVars.messages.condition_labels.none},body:function(){return this.template(this.getData())}}),Optin.View.Conditions.source_of_arrival=t.extend({conditionId:"source_of_arrival",setProperties:function(){this.title=optinVars.messages.conditions.from_search_engine},defaults:function(){return{source_direct:"false",source_external:"false",source_internal:"false",source_not_search:"false",source_search:"false"}},getHeader:function(){var e=0,t=_.isTrue(this.getAttribute("source_direct"))&&++e,i=_.isTrue(this.getAttribute("source_external"))&&++e,s=_.isTrue(this.getAttribute("source_internal"))&&++e,n=_.isTrue(this.getAttribute("source_search"))&&++e,o=_.isTrue(this.getAttribute("source_not_search"))&&++e;return n&&o||t&&s&&i?optinVars.messages.condition_labels.any:e?optinVars.messages.condition_labels.any_conditions.replace("{number}",e):optinVars.messages.condition_labels.any},body:function(){return this.template(this.getData())}}),Optin.View.Conditions.on_url=t.extend({conditionId:"on_url",setProperties:function(){this.title=optinVars.messages.conditions.on_specific_url},defaults:function(){return{filter_type:"except",urls:""}},getHeader:function(){var e=0;return this.getAttribute("urls").length&&(e=this.countLines(this.getAttribute("urls"))),e?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",e):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())}}),Optin.View.Conditions.on_browser=t.extend({conditionId:"on_browser",setProperties:function(){this.title=optinVars.messages.conditions.on_specific_browser},defaults:function(){return{browsers:"",filter_type:"except"}},getHeader:function(){return this.getAttribute("browsers").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("browsers").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".sui-select").val(this.getAttribute("browsers")).SUIselect2().on("select2:selecting",i).on("select2:unselecting",i)}}),Optin.View.Conditions.visitor_commented=t.extend({conditionId:"visitor_commented",setProperties:function(){this.title=optinVars.messages.conditions.visitor_has_never_commented},defaults:function(){return{filter_type:"true"}},getHeader:function(){return"false"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.false:optinVars.messages.condition_labels.true},body:function(){return this.template(this.getData())}}),Optin.View.Conditions.user_roles=t.extend({conditionId:"user_roles",setProperties:function(){this.title=optinVars.messages.conditions.on_specific_roles},defaults:function(){return{roles:"",filter_type:"except"}},getHeader:function(){return this.getAttribute("roles").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("roles").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".sui-select").val(this.getAttribute("roles")).SUIselect2().on("select2:selecting",i).on("select2:unselecting",i)}}),Optin.View.Conditions.page_templates=t.extend({conditionId:"page_templates",setProperties:function(){this.title=optinVars.messages.conditions.on_specific_templates},defaults:function(){return{templates:"",filter_type:"except"}},getHeader:function(){return this.getAttribute("templates").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("templates").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".sui-select").val(this.getAttribute("templates")).SUIselect2().on("select2:selecting",i).on("select2:unselecting",i)}}),Optin.View.Conditions.user_registration=t.extend({conditionId:"user_registration",setProperties:function(){this.title=optinVars.messages.conditions.user_registration},defaults:function(){return{from_date:0,to_date:0}},getHeader:function(){return(0<this.getAttribute("from_date")?optinVars.messages.condition_labels.reg_date.replace("{number}",this.getAttribute("from_date")):optinVars.messages.condition_labels.immediately)+" - "+(0<this.getAttribute("to_date")?optinVars.messages.condition_labels.reg_date.replace("{number}",this.getAttribute("to_date")):optinVars.messages.condition_labels.forever)},body:function(){return this.template(this.getData())}}),Optin.View.Conditions.visitor_country=t.extend({conditionId:"visitor_country",setProperties:function(){this.title=optinVars.messages.conditions.not_in_a_country},defaults:function(){return{countries:"",filter_type:"except"}},getHeader:function(){return this.getAttribute("countries").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("countries").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".sui-select").val(this.getAttribute("countries")).SUIselect2().on("select2:selecting",i).on("select2:unselecting",i)}}),Optin.View.Conditions.wp_conditions=t.extend({conditionId:"wp_conditions",setProperties:function(){this.title=optinVars.messages.conditions.wp_conditions},defaults:function(){return{wp_conditions:"",filter_type:"except"}},getHeader:function(){return this.getAttribute("wp_conditions").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("wp_conditions").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".sui-select").val(this.getAttribute("wp_conditions")).SUIselect2().on("select2:selecting",i).on("select2:unselecting",i)}}),Optin.View.Conditions.archive_pages=t.extend({conditionId:"archive_pages",setProperties:function(){this.title=optinVars.messages.conditions.archive_pages},defaults:function(){return{archive_pages:"",filter_type:"except"}},getHeader:function(){return this.getAttribute("archive_pages").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("archive_pages").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".sui-select").val(this.getAttribute("archive_pages")).SUIselect2().on("select2:selecting",i).on("select2:unselecting",i)}}),Optin.View.Conditions.wc_pages=t.extend(_.extend({},s,{conditionId:"wc_pages",setProperties:function(){this.title=optinVars.messages.conditions.wc_pages},defaults:function(){return{filter_type:"all"}},getHeader:function(){return"none"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())}})),Optin.View.Conditions.wc_categories=t.extend(_.extend({},s,{conditionId:"wc_categories",setProperties:function(){this.title=optinVars.messages.conditions.wc_categories},defaults:function(){return{filter_type:"except",wc_categories:[]}},onInit:function(){},getHeader:function(){return this.getAttribute("wc_categories").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("wc_categories").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".hustle-select-ajax").SUIselect2({tags:"true",width:"100%",dropdownCssClass:"sui-select-dropdown",ajax:{url:ajaxurl,delay:250,dataType:"json",type:"POST",data:function(e){return{action:"get_new_condition_ids",search:e.term,postType:"wc_category"}},processResults:function(e){return{results:e.data}},cache:!0},createTag:function(){return!1}}).on("select2:selecting",i).on("select2:unselecting",i)}})),Optin.View.Conditions.wc_tags=t.extend(_.extend({},s,{conditionId:"wc_tags",setProperties:function(){this.title=optinVars.messages.conditions.wc_tags},defaults:function(){return{filter_type:"except",wc_tags:[]}},onInit:function(){},getHeader:function(){return this.getAttribute("wc_tags").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("wc_tags").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".hustle-select-ajax").SUIselect2({tags:"true",width:"100%",dropdownCssClass:"sui-select-dropdown",ajax:{url:ajaxurl,delay:250,dataType:"json",type:"POST",data:function(e){return{action:"get_new_condition_ids",search:e.term,postType:"wc_tag"}},processResults:function(e){return{results:e.data}},cache:!0},createTag:function(){return!1}}).on("select2:selecting",i).on("select2:unselecting",i)}})),Optin.View.Conditions.wc_archive_pages=t.extend({conditionId:"wc_archive_pages",setProperties:function(){this.title=optinVars.messages.conditions.wc_archive_pages},defaults:function(){return{wc_archive_pages:"",filter_type:"except"}},getHeader:function(){return this.getAttribute("wc_archive_pages").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("wc_archive_pages").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".sui-select").val(this.getAttribute("wc_archive_pages")).SUIselect2().on("select2:selecting",i).on("select2:unselecting",i)}}),Optin.View.Conditions.wc_static_pages=t.extend({conditionId:"wc_static_pages",setProperties:function(){this.title=optinVars.messages.conditions.wc_static_pages},defaults:function(){return{wc_static_pages:"",filter_type:"except"}},getHeader:function(){return this.getAttribute("wc_static_pages").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("wc_static_pages").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".sui-select").val(this.getAttribute("wc_static_pages")).SUIselect2().on("select2:selecting",i).on("select2:unselecting",i)}}),e(document).trigger("hustleAddViewConditions",[t])}(jQuery),Hustle.define("Settings.Palettes",function(e){"use strict";return Backbone.View.extend({el:"#palettes-box",events:{"click .hustle-create-palette":"openCreatePaletteModal","click .hustle-delete-button":"openDeletePaletteModal","click .hustle-button-delete":"delettePalette"},initialize:function(){var e=Hustle.get("Settings.Palettes_Modal");this.paletteModal=new e},openCreatePaletteModal:function(e){this.paletteModal.open(e)},openDeletePaletteModal:function(t){t.preventDefault();var i=e(t.currentTarget),s={id:i.data("id"),title:i.data("title"),description:i.data("description"),action:"delete",nonce:i.data("nonce"),actionClass:"hustle-button-delete"};Module.deleteModal.open(s),e(".hustle-button-delete").on("click",e.proxy(this.delettePalette,this))},delettePalette:function(t){t.preventDefault();var i=e(t.currentTarget),s=i.data("form-id"),n=i.data(),o=e("#"+s),a=new FormData(o[0]);e.each(n,function(e,t){return a.append(e,t)}),a.append("_ajax_nonce",optinVars.settings_palettes_action_nonce),a.append("action","hustle_handle_palette_actions"),e.ajax({url:ajaxurl,type:"POST",data:a,contentType:!1,processData:!1}).done(function(t){t.data.url?location.replace(t.data.url):t.data.notification&&Module.Notification.open(t.data.notification.status,t.data.notification.message,t.data.notification.delay),t.data.url||e(".sui-button-onload").removeClass("sui-button-onload")}).error(function(){Module.Notification.open("error",optinVars.messages.commons.generic_ajax_error),e(".sui-button-onload").removeClass("sui-button-onload")})}})}),Hustle.define("Settings.Data_Settings",function(e){"use strict";return Backbone.View.extend({el:"#data-box",events:{"click #hustle-dialog-open--reset-data-settings":"dataDialog"},dataDialog:function(t){var i=this.$(t.target),s=e("#hustle-dialog--reset-data-settings"),n=s.find("#dialogTitle"),o=s.find("#dialogDescription");n.text(i.data("dialog-title")),o.text(i.data("dialog-info")),SUI.dialogs["hustle-dialog--reset-data-settings"].show(),t.preventDefault(),e("#hustle-reset-settings").on("click",e.proxy(this.settingsReset))},settingsReset:function(t){var i=e(t.currentTarget),s=i.closest(".sui-dialog"),n=s.find("button, .sui-button");n.prop("disabled",!0),i.addClass("sui-button-onload"),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_reset_settings",_ajax_nonce:i.data("nonce")},success:function(){e("#"+i.data("notice")).show(),SUI.dialogs[s.attr("id")].hide(),i.removeClass("sui-button-onload"),n.prop("disabled",!1),Module.Notification.open("success",optinVars.messages.settings_was_reset),window.setTimeout(function(){return location.reload(!0)},2e3)},error:function(){SUI.dialogs[s.attr("id")].hide(),i.removeClass("sui-button-onload"),n.prop("disabled",!1),Module.Notification.open("error",optinVars.messages.something_went_wrong)}})}})}),Hustle.define("Settings.Palettes_Modal",function(e){"use strict";return Backbone.View.extend({el:"#hustle-dialog--edit-palette",events:{"click .hustle-button-action":"handleAction","click .hustle-cancel-palette":"closeCreatePaletteModal","change #hustle-palette-module-type":"updateModulesOptions"},initialize:function(){},open:function(t){void 0!==e(t.currentTarget).data("slug")?this.handleAction(t):(this.$("#hustle-palette-module-type").trigger("change"),SUI.openModal("hustle-dialog--edit-palette",t.currentTarget,"hustle-palette-name",!1))},handleAction:function(t){t.preventDefault();var i=this,s=e(t.currentTarget),n=s.data("form-id"),o=s.data();s.addClass("sui-button-onload"),Module.Utils.accessibleHide(this.$(".sui-error-message"));var a=new FormData,l=!1;if(void 0!==n){var r=e("#"+n);r.length&&(a=new FormData(r[0]),r.find(".hustle-required-field").each(function(t,i){var s=e(i);if(!s.val().trim().length){var n=s.data("error-message"),o=s.siblings(".sui-error-message");o.html(n),Module.Utils.accessibleShow(o),l=!0}}))}l?e(".sui-button-onload").removeClass("sui-button-onload"):(e.each(o,function(e,t){return a.append(e,t)}),a.append("_ajax_nonce",optinVars.settings_palettes_action_nonce),a.append("action","hustle_handle_palette_actions"),e.ajax({url:ajaxurl,type:"POST",data:a,contentType:!1,processData:!1}).done(function(s){s.data.callback&&"function"==typeof i[s.data.callback]?i[s.data.callback](s.data,s.success,t):s.data.url?location.replace(s.data.url):s.data.notification&&Module.Notification.open(s.data.notification.status,s.data.notification.message,s.data.notification.delay),s.data.url||e(".sui-button-onload").removeClass("sui-button-onload")}).error(function(t){e(".sui-button-onload").removeClass("sui-button-onload")}))},actionOpenEditPalette:function(t,i,s){this.actionGoToSecondStep(t),SUI.openModal("hustle-dialog--edit-palette",s.currentTarget,"hustle-palette-name",!1),t.palette_data.name&&e("#hustle-dialog--edit-palette").find("#hustle-palette-name").val(t.palette_data.name)},actionGoToSecondStep:function(e){var t=this.$("#hustle-edit-palette-first-step"),i=this.$("#hustle-edit-palette-second-step"),s=this.$(".hustle-button-action"),n=e.palette_data,o=Optin.template("hustle-dialog--edit-palette-tpl");Module.Utils.accessibleHide(t,!0),i.html(o(n)),this.initiateSecondStepElements(),Module.Utils.accessibleShow(i,!0),i.focus(),s.data("step",3),s.addClass("sui-button-blue"),Module.Utils.accessibleHide(s.find("#hustle-step-button-text")),Module.Utils.accessibleShow(s.find("#hustle-finish-button-text"))},initiateSecondStepElements:function(){this.$(".sui-accordion").each(function(){SUI.suiAccordion(this)}),SUI.suiTabs(),SUI.tabs(),this.createPickers()},closeCreatePaletteModal:function(){var e=this,t=this.$("#hustle-edit-palette-first-step"),i=this.$("#hustle-edit-palette-second-step"),s=this.$(".hustle-button-action");SUI.closeModal(),setTimeout(function(){Module.Utils.accessibleHide(e.$(".sui-error-message")),Module.Utils.accessibleHide(i,!0),i.html(""),Module.Utils.accessibleShow(t,!0),s.removeClass("sui-button-blue"),s.data("step",2),Module.Utils.accessibleShow(s.find("#hustle-step-button-text")),Module.Utils.accessibleHide(s.find("#hustle-finish-button-text"))},500)},createPickers:function(){var t=this.$(".sui-colorpicker-input");t.wpColorPicker({change:function(t,i){var s=e(this);s.val()!==i.color.toCSS()&&s.val(i.color.toCSS()).trigger("change")},palettes:["#333333","#FFFFFF","#17A8E3","#E1F6FF","#666666","#AAAAAA","#E6E6E6"]}),t.hasClass("wp-color-picker")&&t.each(function(){var t=e(this),i=t.closest(".sui-colorpicker-wrap"),s=i.find(".sui-colorpicker-value span[role=button]"),n=i.find(".sui-colorpicker-value"),o=n.find("button"),a="hex",l=t.closest(".wp-picker-container"),r=l.find(".wp-color-result"),d=r.find(".color-alpha"),u=l.find(".wp-picker-clear");!0===t.data("alpha")?(a="rgba",t.bind("change",function(){s.find("span").css({"background-color":d.css("background")}),n.find("input").val(t.val())})):t.bind("change",function(){s.find("span").css({"background-color":r.css("background-color")}),n.find("input").val(t.val())}),i.find(".sui-colorpicker").addClass("sui-colorpicker-"+a),i.find(".sui-button, span[role=button]").on("click",function(e){r.click(),e.preventDefault(),e.stopPropagation()}),o.on("click",function(i){var o=t.data("attribute"),a=e("#hustle-palette-module-fallback").val(),l=optinVars.palettes[a][o];u.click(),n.find("input").val(l),t.val(l).trigger("change"),s.find("span").css({"background-color":l}),i.preventDefault(),i.stopPropagation()})})},updateModulesOptions:function(t){var i=e(t.currentTarget).val(),s=this.$("#hustle-palette-module-name"),n="";e.each(optinVars.current[i],function(e,t){n+='<option value="'.concat(e,'">').concat(t,"</option>")}),s.html(n),this.$(".sui-select:not(.hustle-select-ajax)").SUIselect2({dropdownCssClass:"sui-select-dropdown"})}})}),Hustle.define("Settings.Permissions_View",function(e){"use strict";return Backbone.View.extend({el:"#permissions-box",initialize:function(){e(function(){function t(){e(".select2-selection__rendered li:first-child .select2-selection__choice__remove").off("click").text("").on("click",function(e){e.stopImmediatePropagation(),e.preventDefault()})}e("select").on("change.select2",function(e){t()}),t()})}})}),Hustle.define("Settings.Privacy_Settings",function(e){"use strict";return Backbone.View.extend({el:"#privacy-box",events:{"click #hustle-dialog-open--delete-ips":"openDeleteIpsDialog"},initialize:function(){e("#hustle-delete-ips-submit").on("click",this.handleIpDeletion)},openDeleteIpsDialog:function(e){SUI.dialogs["hustle-dialog--delete-ips"].show(),e.preventDefault()},handleIpDeletion:function(t){t.preventDefault();var i=e(t.currentTarget),s=i.closest(".sui-dialog"),n=e("#"+i.data("formId")),o=new FormData(n[0]);o.append("action","hustle_remove_ips"),o.append("_ajax_nonce",i.data("nonce")),i.addClass("sui-button-onload"),e.ajax({url:ajaxurl,type:"POST",data:o,contentType:!1,processData:!1,success:function(t){Module.Notification.open("success",t.data.message),SUI.dialogs[s.attr("id")].hide(),e(".sui-button-onload").removeClass("sui-button-onload")},error:function(){SUI.dialogs[s.attr("id")].hide(),e(".sui-button-onload").removeClass("sui-button-onload"),Module.Notification.open("error",optinVars.messages.something_went_wrong)}})}})}),Hustle.define("Settings.reCaptcha_Settings",function(e){"use strict";return Backbone.View.extend({el:"#recaptcha-box",data:{},initialize:function(){this.maybeRenderRecaptchas()},maybeRenderRecaptchas:function(){for(var t=this,i=this,s=!1,n=function(){var n=a[o],l=t.$("#hustle-modal-recaptcha-".concat(n,"-0")),r=t.$('input[name="'.concat(n,'_site_key"]')).val().trim(),d=t.$('input[name="'.concat(n,'_secret_key"]')).val().trim();r&&d?(l.data("sitekey",r),s?HUI.maybeRenderRecaptcha(l.closest(".sui-form-field")):e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_load_recaptcha_preview"}}).done(function(e){e.success&&(s=!0,i.$("#hustle-recaptcha-script-container").html(e.data),setTimeout(function(){return HUI.maybeRenderRecaptcha(l.closest(".sui-form-field"))},1e3))}),t.$(".hustle-recaptcha-".concat(n,"-preview-notice")).hide(),l.show()):(t.$(".hustle-recaptcha-".concat(n,"-preview-notice")).show(),l.hide())},o=0,a=["v2_checkbox","v2_invisible","v3_recaptcha"];o<a.length;o++)n()}})}),Hustle.define("Settings.Top_Metrics_View",function(e,t,i){"use strict";return Backbone.View.extend({el:"#top-metrics-box",events:{"click .sui-checkbox input":"maybeDisableInputs"},initialize:function(){this.maybeDisableInputs()},maybeDisableInputs:function(){var e=this.$el.find("input:checked"),t=this.$el.find("input:not(:checked)"),i=this.$el.find('button[type="submit"]'),s=i.parent(),n=t.next("span");3<=e.length?(t.prop("disabled",!0),n.addClass("sui-tooltip"),n.css("opacity","1"),i.prop("disabled",!1),s.removeClass("sui-tooltip")):(i.prop("disabled",!0),t.prop("disabled",!1),n.removeClass("sui-tooltip"),n.css("opacity",""),s.addClass("sui-tooltip"))}})}),function(e,t){"use strict";e(document).on("click",".wpoi-listing-wrap header.can-open .toggle, .wpoi-listing-wrap header.can-open .toggle-label",function(e){e.stopPropagation()}),e(".accordion header .optin-delete-optin, .accordion header .edit-optin, .wpoi-optin-details tr .button-edit").hide().css({transition:"none"}),e(document).on({mouseenter:function(){e(this).find(".optin-delete-optin, .edit-optin").stop().fadeIn("fast")},mouseleave:function(){var t=e(this);t.find(".toggle-checkbox").removeProp("disabled"),t.find(".edit-optin").removeProp("disabled"),t.removeClass("disabled"),t.find(".optin-delete-optin, .edit-optin, .delete-optin-confirmation").stop().fadeOut("fast")}},".accordion header"),e(document).on({mouseenter:function(){e(this).find(".button-edit").stop().fadeIn("fast")},mouseleave:function(){e(this).find(".button-edit").stop().fadeOut("fast")}},".wpoi-optin-details tr"),e(document).on("click",".wpoi-tabs-menu a",function(t){var i=e(this).attr("tab");t.preventDefault(),Optin.router.navigate(i,!0)}),e(document).on("click",".edit-optin",function(t){t.stopPropagation(),t.preventDefault(),window.location.href=e(this).attr("href")}),e(document).on("click",".wpoi-type-edit-button",function(t){var i=e(this).data("id"),s=e(this).data("type");t.preventDefault(),window.location.href="admin.php?page=inc_optin&optin="+i+"#display/"+s}),e(document).on("click","*[for]",function(t){var i=e(this),s=i.attr("for"),n=e("#"+s);!i.is("label")&&n.length&&(n.trigger("change"),n.trigger("click"))}),e("#wpoi-complete-message").fadeIn(),e(document).on("click","#wpoi-complete-message .next-button button",function(t){e("#wpoi-complete-message").fadeOut()}),e(document).on("click",".wpoi-listing-page .wpoi-listing-wrap header.can-open",function(t){e(this).find(".open").trigger("click")}),e(document).on("click",".wpoi-listing-page .wpoi-listing-wrap .can-open .open",function(t){var i=e(this).closest(".wpoi-listing-wrap"),s=i.find("section"),n=e(".wpoi-listing-wrap").not(i),o=e(".wpoi-listing-wrap section").not(s);t.stopPropagation(),o.slideUp(300,function(){o.removeClass("open")}),n.find(".dev-icon").removeClass("dev-icon-caret_up").addClass("dev-icon-caret_down"),s.slideToggle(300,function(){i.toggleClass("open"),i.find(".dev-icon").toggleClass("dev-icon-caret_up dev-icon-caret_down")})}),Optin.decorateNumberInputs=function(t){var i=t&&t.$el?t.$el.find(".wph-input--number input"):e(".wph-input--number input"),s=Hustle.createTemplate('<div class="wph-nbr--nav"><div class="wph-nbr--button wph-nbr--up {{disabled}}">+</div><div class="wph-nbr--button wph-nbr--down {{disabled}}">-</div></div>');i.each(function(){var t=e(this),i=t.is(":disabled")?"disabled":"";t.siblings(".wph-nbr--nav").length||t.after(s({disabled:i}))})},Hustle.Events.on("view.rendered",Optin.decorateNumberInputs),e(document).on("click",".wph-nbr--up:not(.disabled)",function(t){var i,s=e(this).closest(".wph-input--number").find("input"),n=parseFloat(s.val());s.attr("min"),(i=n>=s.attr("max")?n:n+1)!==n&&s.val(i).trigger("change")}),e(document).on("click",".wph-nbr--down:not(.disabled)",function(t){var i,s=e(this).closest(".wph-input--number").find("input"),n=parseFloat(s.val()),o=s.attr("min");s.attr("max"),(i=n<=o?n:n-1)!==n&&s.val(i).trigger("change")}),function(){function t(){var t=e(window).scrollTop(),i=e(".wph-sticky--anchor");i.length&&(t>(i=i.offset().top)?(e(".wph-preview--eye").addClass("wph-sticky--element"),e(".wph-sticky--anchor").height(e(".wph-preview--eye").outerHeight())):(e(".wph-preview--eye").removeClass("wph-sticky--element"),e(".wph-sticky--anchor").height(0)))}e(function(){e(window).scroll(t),t()})}()}(jQuery,document),Hustle.define("Integration_Modal_Handler",function(e){"use strict";return Backbone.View.extend({events:{"click .hustle-provider-connect":"connectAddOn","click .hustle-provider-disconnect":"disconnectAddOn","click .hustle-provider-next":"submitNextStep","click .hustle-provider-back":"goPrevStep","click .hustle-refresh-email-lists":"refreshLists","click .hustle-provider-form-disconnect":"disconnectAddOnForm","click .hustle-provider-clear-radio-options":"clearRadioOptions","keypress .sui-dialog-content":"preventEnterKeyFromDoingThings","change select#group":"showInterests"},preventEnterKeyFromDoingThings:function(e){13===e.which&&(e.preventDefault(),this.$(".hustle-provider-connect").length?this.$(".hustle-provider-connect").trigger("click"):this.$(".hustle-provider-next").length&&this.$(".hustle-provider-next").trigger("click"))},initialize:function(e){return this.slug=e.slug,this.nonce=e.nonce,this.action=e.action,this.moduleId=e.moduleId,this.multi_id=e.multiId,this.globalMultiId=e.globalMultiId,this.step=0,this.next_step=!1,this.prev_step=!1,this.render()},render:function(){var e={};e.action=this.action,e._ajax_nonce=this.nonce,e.data={},e.data.slug=this.slug,e.data.step=this.step,e.data.current_step=this.step,this.moduleId&&(e.data.module_id=this.moduleId),this.multi_id&&(e.data.multi_id=this.multi_id),this.globalMultiId&&(e.data.global_multi_id=this.globalMultiId),this.request(e,!1,!0)},applyLoader:function(e){e.find(".sui-button:not(.disable-loader)").addClass("sui-button-onload")},resetLoader:function(e){e.find(".sui-button").removeClass("sui-button-onload")},request:function(t,i,s){var n=this;s&&(this.$el.find(".sui-box-body").addClass("sui-block-content-center").html('<p class="sui-loading-dialog" aria-label="Loading content"><i class="sui-icon-loader sui-loading" aria-hidden="true"></i></p>'),this.$el.find(".sui-box-footer").html(""),this.$el.find(".integration-header").html("")),this.applyLoader(this.$el),this.ajax=e.post({url:ajaxurl,type:"post",data:t}).done(function(e){if(e&&e.success){n.renderBody(e),n.renderFooter(e);var t=e.data.data;if(n.onRender(t),n.resetLoader(n.$el),(i||!_.isUndefined(t.is_close)&&t.is_close)&&n.close(n),n.$el.find(".hustle-provider-close").on("click",function(){n.close(n)}),!_.isUndefined(t.notification)&&!_.isUndefined(t.notification.type)&&!_.isUndefined(t.notification.text))Module.Notification.open(t.notification.type,t.notification.text);if("mailchimp"===n.slug){var s=n.$el.find("#group");s.length&&s.trigger("change")}}}),this.ajax.always(function(){n.$el.find(".sui-box-body").removeClass("sui-block-content-center"),n.$el.find(".sui-loading-dialog").remove()})},renderBody:function(t){this.$el.find(".sui-box-body").html(t.data.data.html);var i=this.$el.find(".sui-box-body .integration-header").remove();if(0<i.length&&this.$el.find(".integration-header").html(i.html()),e.trim(this.$el.find(".sui-box-body").html()).length){var s=this.$el.find(".sui-box-body").children(),n=!0;e.each(s,function(t,i){e(i).is(":hidden")||(n=!1)}),n?(this.$el.find(".sui-box-body").addClass("sui-hidden"),this.$el.find(".sui-box-footer").css("padding-top","")):(this.$el.find(".sui-box-body select").each(function(){SUI.suiSelect(this)}),this.$el.find(".sui-box-body .sui-notice").next().is('input[type="hidden"]')&&this.$el.find(".sui-box-body .sui-notice").css({"margin-bottom":"0"}))}else this.$el.find(".sui-box-body").addClass("sui-hidden"),this.$el.find(".sui-box-footer").css("padding-top","")},renderFooter:function(e){var t=this,i=e.data.data.buttons,s=t.$el.find(".sui-box-body"),n=t.$el.find(".sui-box-footer");t.$el.find(".sui-box-footer").removeClass("sui-hidden").removeClass("sui-hidden-important").removeClass("sui-box-footer-center").removeClass("sui-box-footer-right").html(""),_.each(i,function(e){t.$el.find(".sui-box-footer").append(e.markup)}),0===n.find(".sui-button").length?n.addClass("sui-hidden-important"):(s.find(".hustle-installation-error").length&&n.addClass("sui-hidden-important"),n.find(".sui-button").hasClass("sui-button-center")?n.addClass("sui-box-footer-center"):n.find(".sui-button").hasClass("sui-button-right")&&(n.find(".sui-button").hasClass("sui-button-left")||n.addClass("sui-box-footer-right")))},onRender:function(e){this.delegateEvents(),_.isUndefined(e.opt_in_provider_current_step)||(this.step=+e.opt_in_provider_current_step),_.isUndefined(e.opt_in_provider_has_next_step)||(this.next_step=e.opt_in_provider_has_next_step),_.isUndefined(e.opt_in_provider_has_prev_step)||(this.prev_step=e.opt_in_provider_has_prev_step),this.$el.find("select").each(function(){SUI.suiSelect(this)}),this.$el.find(".sui-select").SUIselect2({dropdownCssClass:"sui-select-dropdown"})},refreshLists:function(t){t.preventDefault(),t.stopPropagation();var i=e(t.currentTarget),s=this.moduleId,n=this.slug,o=e("#form_id").length?"forms":"lists",a=this.nonce;i.addClass("sui-button-onload"),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_refresh_email_lists",id:s,slug:n,type:o,_ajax_nonce:a}}).done(function(e){if(e.success&&void 0!==e.data.select){var t=i.siblings("select");t.next().remove(),t.remove(),i.before(e.data.select),i.siblings(".sui-select").SUIselect2({dropdownCssClass:"sui-select-dropdown"})}}).error(function(e){}).always(function(){i.removeClass("sui-button-onload")})},submitNextStep:function(t){var i={},s=this.$el.find("form"),n={slug:this.slug,step:this.getStep(),current_step:this.step},o=s.serialize();this.moduleId&&(n.module_id=this.moduleId),o=o+"&"+e.param(n),i.action=this.action,i._ajax_nonce=this.nonce,i.data=o,this.request(i,!1,!1)},goPrevStep:function(e){var t={},i={slug:this.slug,step:this.getPrevStep(),current_step:this.step};this.moduleId&&(i.module_id=this.moduleId),this.multi_id&&(i.multi_id=this.multi_id),t.action=this.action,t._ajax_nonce=this.nonce,t.data=i,this.request(t,!1,!1)},getStep:function(){return this.next_step?this.step+1:this.step},getPrevStep:function(){return this.prev_step?this.step-1:this.step},connectAddOn:function(){var t={},i=this.$el.find("form"),s={slug:this.slug,step:this.getStep(),current_step:this.step},n=i.serialize();this.moduleId&&(s.module_id=this.moduleId),this.multi_id&&(s.multi_id=this.multi_id),n=n+"&"+e.param(s),t.action=this.action,t._ajax_nonce=this.nonce,t.data=n,this.request(t,!1,!1)},disconnectAddOn:function(t){var i=this,s=this.$el.find(".sui-dialog-image img").attr("src"),n=this.$el.find("#dialogTitle2").html(),o={},a={},l={};e("hustle-dialog--remove-active-warning").val();o.action="hustle_provider_deactivate",o._ajax_nonce=this.nonce,o.data={},o.data.slug=this.slug,o.data.img=s,o.data.title=n,this.globalMultiId&&(o.data.global_multi_id=this.globalMultiId),a.action="hustle_provider_is_on_module",a._ajax_nonce=this.nonce,a.data={},a.data.slug=this.slug,a.data.globalMultiId=this.globalMultiId,this.$el.find(".sui-button:not(.disable-loader)").addClass("sui-button-onload"),e.ajax({url:ajaxurl,type:"POST",data:a,success:function(e){!0===e.success&&(l=e)},complete:function(){!0===l.success?Module.integrationsActiveRemove.open(l.data,o,i):i.request(o,!0,!1)}})},disconnectAddOnForm:function(t){var i={},s=e("#hustle-integrations-active-count").val(),n=e("#hustle-integrations-active-integrations").val();i.action="hustle_provider_form_deactivate",i._ajax_nonce=this.nonce,i.data={},i.data.slug=this.slug,i.data.module_id=this.moduleId,this.multi_id&&(i.data.multi_id=this.multi_id),1==s&&n===this.slug&&"local_list"!==this.slug?Module.integrationsAllRemove.open(i,this):1==s&&"local_list"===this.slug?Module.Notification.open("error",optinVars.messages.integraiton_required):this.request(i,!0,!1)},close:function(t){t.ajax.abort(),t.remove(),e("body").css("overflow","auto"),Hustle.Events.trigger("hustle:providers:reload")},clearRadioOptions:function(){this.$("input[type=radio]",this.$el).removeAttr("checked")},showInterests:function(t){var i=this,s=e(t.currentTarget),n=s.data("nonce"),o=s.val(),a={},l=i.$el.find("form"),r={slug:i.slug,group:o,module_id:i.moduleId},d=l.serialize();d=d+"&"+e.param(r),a.action="hustle_mailchimp_get_group_interests",a._ajax_nonce=n,a.data=d,i.applyLoader(i.$el),e.ajax({url:ajaxurl,type:"POST",data:a}).done(function(e){e.success&&(l.find(".sui-form-field").slice(1).remove(),l.find(".sui-form-field:first-child").after(e.data),i.$el.find(".sui-select").SUIselect2({dropdownCssClass:"sui-select-dropdown"}))}).error(function(e){}).always(function(){i.resetLoader(i.$el)})}})});var Module=window.Module||{};function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t<e.length;t++)i[t]=e[t];return i}}Hustle.define("Model",function(e){"use strict";return Backbone.Model.extend({initialize:function(){this.on("change",this.userHasChange,this),Backbone.Model.prototype.initialize.apply(this,arguments)},userHasChange:function(){Module.hasChanges=!0,Hustle.Events.trigger("modules.view.switch_status","unsaved")}})}),Hustle.define("Models.M",function(){"use strict";return Hustle.get("Model").extend({toJSON:function(){var e,t=_.clone(this.attributes);for(e in t)(t[e]instanceof Backbone.Model||t[e]instanceof Backbone.Collection)&&(t[e]=t[e].toJSON());return t},set:function(e,t,i){var s,n,o;"string"==typeof e&&-1!==e.indexOf(".")?(s=e.split(".")[0],n=e.split(".")[1],(o=this.get(s))&&o instanceof Backbone.Model&&(o.set(n,t,i),this.trigger("change:"+e,e,t,i),this.trigger("change:"+s,e,t,i))):Backbone.Model.prototype.set.call(this,e,t,i)},get:function(e){var t,i;return"string"==typeof e&&-1!==e.indexOf(".")?(t=e.split(".")[0],i=e.split(".")[1],this.get(t).get(i)):Backbone.Model.prototype.get.call(this,e)}})}),Hustle.define("Models.Trigger",function(){"use strict";return Hustle.get("Model").extend({defaults:{trigger:"time",on_time_delay:0,on_time_unit:"seconds",on_scroll:"scrolled",on_scroll_page_percent:"20",on_scroll_css_selector:"",enable_on_click_element:"1",on_click_element:"",enable_on_click_shortcode:"1",on_exit_intent:"1",on_exit_intent_per_session:"1",on_exit_intent_delayed:"0",on_exit_intent_delayed_time:5,on_exit_intent_delayed_unit:"seconds",on_adblock:"0"}})}),Module.Model=Hustle.get("Models.M").extend({defaults:{module_name:"",moduleType:"popup",active:"0"}}),Hustle.define("Models.Module_Defaults",function(e,t,i){"use strict";return{visibilityDefaults:{defaults:{conditions:""},initialize:function(e){if(_.extend(this,e),!(this.get("conditions")instanceof Backbone.Model)){_.isEmpty(this.get("conditions"))&&_.isArray(this.get("conditions"))&&(this.conditions={});var t=Hustle.get("Model");this.set("conditions",new t(this.conditions),{silent:!0})}}},settingsDefaults:{defaults:{},initialize:function(e){_.extend(this,e);var t=Hustle.get("Models.Trigger");this.get("triggers")instanceof Backbone.Model||this.set("triggers",new t(this.triggers),{silent:!0})}}}}),function(e){"use strict";var t=window.Module||{};t.Notification={initialize:function(){e("#hustle-notification").length?(e("#hustle-notification").remove(),this.initialize()):e('<div role="alert" id="hustle-notification" class="sui-notice-top sui-notice-'+this.type+' sui-can-dismiss"><div class="sui-notice-content"><p>'+this.text+'</p></div><span class="sui-notice-dismiss" aria-hidden="true"><a role="button" href="#" aria-label="'+optinVars.messages.commons.dismiss+'" class="sui-icon-check"></a></span></div>').removeAttr("hidden").appendTo(e("main.sui-wrap")).slideDown()},open:function(t,i,s){var n=this;_.isUndefined(s)&&(s=4e3),void 0!==n.closeTimeout&&(window.clearTimeout(n.closeTimeout),delete n.closeTimeout,n.close()),this.type=t||"notice",this.text=i,this.initialize();var o=e("#hustle-notification");o.removeClass("sui-hidden"),o.removeProp("hidden"),e(".sui-notice-dismiss a").click(function(e){return e.preventDefault(),n.close(),!1}),s&&(this.closeTimeout=setTimeout(function(){n.close()},s))},close:function(){var t=e("#hustle-notification");t.addClass("sui-hidden"),t.prop("hidden",!0),t.stop().slideUp("slow")}},t.integrationsModal={$popup:{},_deferred:{},open:function(t){var i=this,s=e(t.target);e("#hustle-integration-popup").remove(),s.hasClass("connect-integration")||(s=s.closest(".connect-integration"));var n=function(){return i.close(),!1},o=s.data("nonce"),a=s.data("slug"),l=s.data("title"),r=s.data("image"),d=s.data("action"),u=s.data("module_id"),c=s.data("multi_id"),h=s.data("global_multi_id"),p=Optin.template("hustle-integration-dialog-tpl");return e("main.sui-wrap").append(p({image:r,title:l})),this.$popup=e("#hustle-integration-dialog"),new(Hustle.get("Integration_Modal_Handler"))({slug:a,nonce:o,action:d,moduleId:u,multiId:c,globalMultiId:h,el:this.$popup}).on("modal:closed",function(){return i.close()}),this.$popup.find(".hustle-popup-action").remove(),this.$popup.find(".sui-dialog-close").on("click",n),this.$popup.find(".sui-dialog-overlay").on("click",n),this.$popup.on("click",".hustle-popup-cancel",n),this.$popup.find(".sui-dialog-overlay").on("click",function(){e(this).parent("#hustle-integration-dialog").find(".sui-dialog-close").trigger("click")}),this.$popup.find(".sui-dialog-overlay").removeClass("sui-fade-out").addClass("sui-fade-in"),this.$popup.find(".sui-dialog-content").removeClass("sui-bounce-out").addClass("sui-bounce-in"),this.$popup.removeAttr("aria-hidden"),e("body").css("overflow","hidden"),this._deferred=new e.Deferred,this.$popup.on("click",".sui-tab-item",function(t){var i=e(t.currentTarget);i.closest(".sui-side-tabs").find(".sui-tab-item").removeClass("active"),i.addClass("active")}),this._deferred.promise()},close:function(t){var i=e("#hustle-integration-popup");i.find(".sui-dialog-overlay").removeClass("sui-fade-in").addClass("sui-fade-out"),i.find(".sui-dialog-content").removeClass("sui-bounce-in").addClass("sui-bounce-out"),e("body").css("overflow","auto"),setTimeout(function(){i.attr("aria-hidden","true")},300),this._deferred.resolve(this.$popup,t)}},t.integrationsAllRemove={$popup:{},_deferred:{},open:function(t,i){var s=this,n=e("#hustle-dialog--final-delete"),o=function(){return s.close(),!1};n.find(".sui-dialog-close").on("click",o),n.find(".sui-dialog-overlay").on("click",o),n.find("#hustle-delete-final-button-cancel").on("click",o),e("#hustle-delete-final-button").off("click").on("click",function(n){e("#hustle-delete-final-button").addClass("sui-button-onload"),function(e,t){s.deleteIntegration(e,t)}(t,i),function(e){s.insertLocalList(e)}(t),o()}),e("#hustle-integration-dialog").addClass("sui-fade-out").hide(),e("#hustle-delete-final-button").removeAttr("disabled"),SUI.dialogs["hustle-dialog--final-delete"].show()},close:function(){var t=e("#hustle-dialog--final-delete");t.find(".sui-dialog-overlay").removeClass("sui-fade-in").addClass("sui-fade-out"),t.find(".sui-dialog-content").removeClass("sui-bounce-in").addClass("sui-bounce-out"),e("#hustle-delete-final-button").removeClass("sui-button-onload"),e("#hustle-integration-dialog").remove(),e("body").css("overflow","auto"),e("#hustle-delete-final-button").attr("disabled"),setTimeout(function(){t.attr("aria-hidden","true")},300),SUI.dialogs["hustle-dialog--final-delete"].hide()},confirmDelete:function(e,t){this.deleteIntegration(e,t),this.insertLocal(e),this.close()},deleteIntegration:function(e,t){t.request(e,!0,!1)},insertLocalList:function(i){var s={id:i.data.module_id,_ajax_nonce:i._ajax_nonce,action:"hustle_provider_insert_local_list"};e.ajax({url:ajaxurl,type:"POST",data:s,success:function(e){if(e.success)Hustle.Events.trigger("hustle:providers:reload");else{if(void 0===SUI.dialogs["hustle-dialog--final-delete"])return void t.Notification.open("error",optinVars.messages.something_went_wrong);SUI.dialogs["hustle-dialog--final-delete"].hide()}},error:function(){t.Notification.open("error",optinVars.messages.something_went_wrong),SUI.dialogs["hustle-dialog--final-delete"].hide()}})}},t.integrationsActiveRemove={$popup:{},_deferred:{},open:function(t,i,s){var n=this,o=e("#hustle-dialog--remove-active"),a=function(){return n.close(),!1},l=Optin.template("hustle-modules-active-integration-tpl"),r=Optin.template("hustle-modules-active-integration-img-tpl"),d=Optin.template("hustle-modules-active-integration-header-tpl"),u=Optin.template("hustle-modules-active-integration-desc-tpl");e("#hustle-dialog--remove-active tbody").html(""),e("#hustle-dialog--remove-active .sui-dialog-image").html(""),e("#hustle-dialog--remove-active #sui-box-modal-header").html(""),e("#hustle-dialog--remove-active #sui-box-modal-content").html(""),e("#hustle-dialog--remove-active .sui-dialog-image").append(r({image:i.data.img,title:i.data.slug})),e("#hustle-dialog--remove-active #sui-box-modal-header").append(d({title:i.data.title.replace(/Connect|Configure/gi," ")})),e("#hustle-dialog--remove-active #sui-box-modal-content").append(u({title:i.data.title.replace(/Connect|Configure/gi," ")})),e.each(t,function(t,i){e("#hustle-dialog--remove-active tbody").append(l({name:i.name,type:i.type,editUrl:i.edit_url}))}),o.find(".sui-dialog-close").on("click",a),o.find(".sui-dialog-overlay").on("click",a),o.find("#hustle-remove-active-button-cancel").on("click",a),o.find(".hustle-remove-active-integration-back").on("click",function(){n.back(s)}),e("#hustle-remove-active-button").off("click").on("click",function(o){e(this).addClass("sui-button-onload"),function(e,t,i){n.removeIntegration(e,t,i),a()}(i,s,t)}),e("#hustle-integration-dialog").addClass("sui-fade-out").hide(),SUI.dialogs["hustle-dialog--remove-active"].show()},close:function(){var t=e("#hustle-dialog--remove-active");t.find(".sui-dialog-overlay").removeClass("sui-fade-in").addClass("sui-fade-out"),t.find(".sui-dialog-content").removeClass("sui-bounce-in").addClass("sui-bounce-out"),e("#hustle-delete-final-button").removeClass("sui-button-onload"),e("#hustle-integration-dialog").remove(),e("body").css("overflow","auto"),setTimeout(function(){t.attr("aria-hidden","true")},300),SUI.dialogs["hustle-dialog--remove-active"].hide()},back:function(t){this.close(),"hubspot"===t.slug||"constantcontact"===t.slug?e('button[data-slug="'+t.slug+'"]').trigger("click"):e('button[data-global_multi_id="'+t.globalMultiId+'"]').trigger("click")},removeIntegration:function(t,i,s){var n=this;e.each(s,function(e,i){t.data.slug===i.active.active_integrations&&n.insertLocalList(t,e)}),i.request(t,!0,!1),e("#hustle-remove-active-button").removeClass("sui-button-onload")},insertLocalList:function(i,s){var n={id:s,_ajax_nonce:i._ajax_nonce,action:"hustle_provider_insert_local_list"};e.ajax({url:ajaxurl,type:"POST",data:n,success:function(e){!1!==e.success||t.Notification.open("error",optinVars.messages.something_went_wrong)},error:function(){t.Notification.open("error",optinVars.messages.something_went_wrong)}})}},t.ProviderMigration={$popup:{},_deferred:{},open:function(t){var i=e("#hustle-dialog-migrate--"+t),s=function(){return self.close(i,t),!1};i.find(".sui-dialog-close").on("click",s),i.find(".sui-dialog-overlay").on("click",s),setTimeout(function(){return SUI.dialogs["hustle-dialog-migrate--"+t].show()},300)},close:function(t,i){t.find(".sui-dialog-overlay").removeClass("sui-fade-in").addClass("sui-fade-out"),t.find(".sui-dialog-content").removeClass("sui-bounce-in").addClass("sui-bounce-out"),e("body").css("overflow","auto"),setTimeout(function(){return t.attr("aria-hidden","true")},300),SUI.dialogs["hustle-dialog-migrate--"+i].hide()}},t.deleteModal={open:function(i){var s="hustle-dialog--delete",n=Optin.template("hustle-dialog--delete-tpl")(i);if(e("#"+s+" #hustle-delete-dialog-content").html(n),e("#"+s+" #hustle-dialog-title").html(i.title),void 0===SUI.dialogs[s])return t.Notification.open("error",optinVars.messages.something_went_wrong),!1;e("#"+s+" .hustle-delete-confirm").on("click",function(t){e(t.currentTarget).addClass("sui-button-onload")}),SUI.dialogs[s].create(),SUI.dialogs[s].show()}},t.preview={open:function(t,i){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this,o="embedded"===i||"social_sharing"===i;e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_preview_module",id:t,previewData:s}}).then(function(i){if(i.success){var s="";o?s=e("#hustle-dialog--preview .sui-box-body"):(s=e("#module-preview-container")).length||(e("main.sui-wrap").append('<div id="module-preview-container"></div>'),s=e("#module-preview-container")),s.html(i.data.html);var n=s.find(".hustle-ui");if(n.find(".hustle-select2").length&&HUI.select2(),n.find(".hustle-time").length&&HUI.timepicker(".hustle-time"),n.find(".hustle-date").length){var a=optinVars.messages.days_and_months;HUI.datepicker(".hustle-date",a.days_full,a.days_short,a.days_min,a.months_full,a.months_short)}HUI.nonSharingSimulation(n),HUI.inputFilled(),i.data.style&&s.append(i.data.style),i.data.script&&s.append(i.data.script),setTimeout(function(){return HUI.maybeRenderRecaptcha(n)},1e3)}return{id:t,data:i.data.module}},function(e){}).then(function(e){var t=e.id,i=e.data;t&&(o&&SUI.dialogs["hustle-dialog--preview"].show(),n.showModule(t,i))}).always(function(){e(".sui-button-onload").removeClass("sui-button-onload")})},showModule:function(t,i){var s=".hustle_module_id_"+t;if("popup"===i.module_type){var n="0"!==String(e(s).data("close-delay"))&&e(s).data("close-delay");HUI.popupLoad(s,n)}else if("slidein"===i.module_type){var o="0"!==String(e(s).data("close-delay"))&&e(s).data("close-delay");HUI.slideinLayouts(s),HUI.slideinLoad(s,o),e(window).on("resize",function(){HUI.slideinLayouts(s)})}else HUI.inlineResize(s),HUI.inlineLoad(s)}},t.trackingChart={chartsData:{},theCharts:{},init:function(t,i){var s=this;t.find("select.hustle-conversion-type").each(function(i,n){SUI.suiSelect(n),e(n).on("change.select2",function(e){return s.conversionTypeChanged(e,t)})}),this.chartsData=i,Object.values(i).forEach(function(e){return s.updateChart(e)})},conversionTypeChanged:function(t,i){var s=e(t.currentTarget),n=s.val(),o=s.data("moduleType"),a=this.chartsData[o],l=i.find(".hustle-tracking-".concat(o,"-conversions-count")),r=i.find(".hustle-tracking-".concat(o,"-conversions-rate"));l.text(a[n].conversions_count),r.text(a[n].conversion_rate+"%"),this.updateChart(a,n,!1)},updateChart:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all",i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=e.views,n=[{label:"Submissions",data:e[t].conversions,backgroundColor:["#E1F6FF"],borderColor:["#17A8E3"],borderWidth:2,pointRadius:0,pointHitRadius:20,pointHoverRadius:5,pointHoverBorderColor:"#17A8E3",pointHoverBackgroundColor:"#17A8E3"},{label:"Views",data:s,backgroundColor:["#F8F8F8"],borderColor:["#DDDDDD"],borderWidth:2,pointRadius:0,pointHitRadius:20,pointHoverRadius:5,pointHoverBorderColor:"#DDDDDD",pointHoverBackgroundColor:"#DDDDDD"}];void 0!==this.theCharts[e.id]?i?(this.theCharts[e.id].destroy(),this.createNewChart(e,n)):(this.theCharts[e.id].data.datasets=n,this.theCharts[e.id].update()):this.createNewChart(e,n)},createNewChart:function(e,t){var i=Math.max.apply(Math,_toConsumableArray(e.views))+2,s=document.getElementById(e.id);if(Math.max.apply(Math,_toConsumableArray(e.views))<Math.max.apply(Math,_toConsumableArray(e.conversions))&&(i=Math.max.apply(Math,_toConsumableArray(e.conversions))+2),s){var n={labels:e.days,datasets:t},o={maintainAspectRatio:!1,legend:{display:!1},scales:{xAxes:[{display:!1,gridLines:{color:"rgba(0, 0, 0, 0)"}}],yAxes:[{display:!1,gridLines:{color:"rgba(0, 0, 0, 0)"},ticks:{beginAtZero:!1,min:0,max:i,stepSize:1}}]},elements:{line:{tension:0},point:{radius:.5}},tooltips:{custom:function(e){e&&(e.displayColors=!1)},callbacks:{title:function(e,t){return 0===e[0].datasetIndex?optinVars.labels.submissions.replace("%d",e[0].yLabel):1===e[0].datasetIndex?optinVars.labels.views.replace("%d",e[0].yLabel):void 0},label:function(e,t){return e.xLabel},labelTextColor:function(e,t){return"#AAAAAA"}}}};this.theCharts[e.id]=new Chart(s,{type:"line",fill:"start",data:n,options:o})}}},t.hasChanges=!1,window.onbeforeunload=function(){if(t.hasChanges)return optinVars.messages.dont_navigate_away},e(".highlight_input_text").focus(function(){e(this).select()})}(jQuery),function(e){"use strict";var t=window.Module||{};t.Utils={getUrlParam:function(e){var t,i,s=window.location.search.substring(1).split("&");for(i=0;i<s.length;i++)if((t=s[i].split("="))[0]===e)return t[1];return!1},accessibleHide:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.hide(),e.attr("aria-hidden",!0),e.prop("hidden",!0),t&&e.prop("tabindex","-1"),i&&void 0!==i.name&&(void 0!==i.value?e.attr(i.name,i.value):e.removeAttr(i.name))},accessibleShow:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.show(),e.removeAttr("aria-hidden"),e.removeClass("sui-hidden"),e.removeProp("hidden"),t&&e.attr("tabindex","0"),i&&void 0!==i.name&&(void 0!==i.value?e.attr(i.name,i.value):e.removeAttr(i.name))}},t.handleActions={context:"",initAction:function(i,s,n){i.preventDefault(),this.context=s;var o=this,a=e(i.currentTarget),l=a.data("form-id"),r=a.data(),d=new FormData;if(void 0!==l){var u=e("#"+l);u.length&&(d=new FormData(u[0]))}e.each(r,function(e,t){return d.append(e,t)}),d.append("context",this.context),d.append("_ajax_nonce",optinVars.single_module_action_nonce),d.append("action","hustle_module_handle_single_action"),e.ajax({url:ajaxurl,type:"POST",data:d,contentType:!1,processData:!1}).done(function(i){i.data.callback&&"function"==typeof o[i.data.callback]?o[i.data.callback](a,i.data,i.success):i.data.callback&&"function"==typeof n[i.data.callback]?n[i.data.callback](a,i.data,i.success):i.data.url?location.replace(i.data.url):i.data.notification&&t.Notification.open(i.data.notification.status,i.data.notification.message,i.data.notification.delay),i.data.url||e(".sui-button-onload").removeClass("sui-button-onload")}).error(function(t){e(".sui-button-onload").removeClass("sui-button-onload")})},actionToggleTracking:function(i,s){if(s.is_embed_or_sshare){var n=e('.hustle-manage-tracking-button[data-module-id="'+i.data("module-id")+'"]'),o=n.parents(".sui-accordion-item");SUI.dialogs["hustle-dialog--manage-tracking"].hide(),n.data("tracking-types",s.enabled_types),o.hasClass("sui-accordion-item--open")&&o.find(".sui-accordion-open-indicator").trigger("click").trigger("click")}else{var a=s.was_enabled?1:0,l=i.parents(".sui-accordion-item");i.data("enabled",1-a),i.find("span").toggleClass("sui-hidden"),l.hasClass("sui-accordion-item--open")&&l.find(".sui-accordion-open-indicator").trigger("click").trigger("click")}t.Notification.open("success",s.message,1e4)}}}(jQuery),Hustle.define("SShare.Content_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Module_Content"),{activePlatforms:[],events:{"change select.hustle-select-field-variables":"addPlaceholderToField","click ul.wpmudev-tabs-menu li label":"toggleCheckbox","click .hustle-choose-platforms":"openPlatformsModal"},render:function(t){if(this.targetContainer.length){var i=this,s=this.model.toJSON();if(this.setElement(this.template(_.extend({module_type:i.moduleType},s))),void 0!==s.social_icons&&s.social_icons)for(var n in s.social_icons)i.addPlatformToPanel(n,s.social_icons[n]);var o=this.$("#hustle-social-services").sortable({axis:"y",containment:".sui-box-builder"});for(var a in o.on("sortupdate",e.proxy(i.platformsOrderChanged,i,o)),optinVars.social_platforms)i.addPlatformToDialog(a);return this}},afterRender:function(){this.bindRemoveService(),optinVars.is_new&&Module.Notification.open("success",optinVars.messages.commons.module_created.replace(/{type_name}/g,optinVars.module_name[this.moduleType]),1e4)},bindRemoveService:function(){e("#hustle-wizard-content .hustle-remove-social-service").off("click").on("click",e.proxy(this.removeService,this))},openPlatformsModal:function(t){var i=this.model.get("social_icons"),s=void 0!==i?Object.keys(i):[];new(Hustle.get("Modals.Services_Platforms"))(s).on("platforms:added",e.proxy(this.addNewPlatforms,this)),SUI.dialogs["hustle-dialog--add-platforms"].show()},addNewPlatforms:function(t){var i=this;this.model.get("social_icons")||this.model.set("social_icons",{});var s=this,n=_.extend({},this.model.get("social_icons"));e.each(t,function(e,t){if(n&&t in n)return!0;s.addPlatformToPanel(t,{});var o=i.getPlatformDefaults(t);n[t]=o}),this.bindRemoveService(),this.model.set("social_icons",n),Hustle.Events.trigger("view.rendered",this)},addPlatformToPanel:function(e,t){var i=Optin.template("hustle-platform-row-tpl"),s=this.$("#hustle-social-services");t=_.extend({},this.getPlatformViewDefaults(e),t),this.activePlatforms.push(e),s.append(i(t))},addPlatformToDialog:function(t){var i=Optin.template("hustle-add-platform-li-tpl"),s=e("#hustle_add_platforms_container"),n=this.getPlatformViewDefaults(t);s.append(i(n))},getPlatformDefaults:function(e){var t={platform:e,label:e in optinVars.social_platforms?optinVars.social_platforms[e]:e,type:"click",counter:"0",link:""};return"email"===e&&(t.title="{post_title}",t.message=optinVars.social_platforms_data.email_message_default),t},getPlatformViewDefaults:function(e){var t=this.model.toJSON(),i=void 0===t.counter_enabled?"true":t.counter_enabled,s={fivehundredpx:"500px"},n=-1!==optinVars.social_platforms_with_endpoints.indexOf(e),o=-1!==optinVars.social_platforms_with_api.indexOf(e),a=e in s?s[e]:e;return _.extend({},this.getPlatformDefaults(e),{platform_style:a,counter_enabled:i,hasEndpoint:n,hasCounter:o})},platformsOrderChanged:function(e){var t=this.model.get("social_icons"),i=e.sortable("toArray",{attribute:"data-platform"}),s={},n=!0,o=!1,a=void 0;try{for(var l,r=i[Symbol.iterator]();!(n=(l=r.next()).done);n=!0){var d=l.value;s[d]=t[d]}}catch(e){o=!0,a=e}finally{try{n||null==r.return||r.return()}finally{if(o)throw a}}this.model.set("social_icons",s),this.model.trigger("change",this.model)},removeService:function(t){var i=e(t.currentTarget).data("platform"),s=this.model.get("social_icons");this.$("#hustle-platform-"+i).remove(),this.activePlatforms=_.without(this.activePlatforms,i),delete s[i],this.model.trigger("change",this.model),t.stopPropagation()},modelUpdated:function(e){var t,i=e.changed,s=void 0!==Object.keys(i)[0]?Object.keys(i)[0]:"";if("service_type"in i&&this.serviceTypeUpdated(i.service_type),"click_counter"in i)this.clickCounterUpdated(i.click_counter);else if(-1!==s.indexOf("_counter")){var n=s.slice(0,-8);n in(t=this.model.get("social_icons"))&&(t[n].counter=parseInt(i[s])),this.model.unset(s,{silent:!0})}if(-1!==s.indexOf("_link")){var o=s.slice(0,-5);o in(t=this.model.get("social_icons"))&&(t[o].link=i[s]),this.model.unset(s,{silent:!0})}if(-1!==s.indexOf("_type")){var a=s.slice(0,-5);a in(t=this.model.get("social_icons"))&&(t[a].type="native"===i[s]?"native":"click"),this.model.unset(s,{silent:!0})}if("email_title"in i){"email"in(t=this.model.get("social_icons"))&&(t.email.title=i[s]),this.model.unset(s,{silent:!0})}if("email_message"in i){"email"in(t=this.model.get("social_icons"))&&(t.email.message=i[s]),this.model.unset(s,{silent:!0})}},serviceTypeUpdated:function(t){var i=this.$("#wpmudev-sshare-counter-options"),s=e(".wph-wizard-services-icons-native"),n=e(".wph-wizard-services-icons-custom");"native"===t?(i.removeClass("wpmudev-hidden"),n.addClass("wpmudev-hidden"),s.removeClass("wpmudev-hidden")):(i.addClass("wpmudev-hidden"),s.addClass("wpmudev-hidden"),n.removeClass("wpmudev-hidden"))},clickCounterUpdated:function(t){var i=e("#wpmudev-sshare-counter-options .hustle-twitter-notice");"native"===t?i.removeClass("wpmudev-hidden"):i.hasClass("wpmudev-hidden")||i.addClass("wpmudev-hidden"),e("#wph-wizard-services-icons-native .wpmudev-social-item").each(function(){var i=e(this).find(".toggle-checkbox").is(":checked"),s=e(this).find("input.wpmudev-input_number");"none"!==t&&i?s.removeClass("wpmudev-hidden"):s.hasClass("wpmudev-hidden")||s.addClass("wpmudev-hidden")}),e("#wph-wizard-services-icons-native #wpmudev-counter-title>strong").removeClass("wpmudev-hidden"),"none"===t?e("#wph-wizard-services-icons-native #wpmudev-counter-title>strong:first-child").addClass("wpmudev-hidden"):e("#wph-wizard-services-icons-native #wpmudev-counter-title>strong:nth-child(2)").addClass("wpmudev-hidden")},toggleCheckbox:function(e){var t=this.$(e.target).closest("li"),i=t.find("input"),s=i.data("attribute");e.preventDefault(),e.stopPropagation(),t.hasClass("current")||(t.addClass("current"),t.siblings().removeClass("current"),this.model.set(s,i.val()))},setSocialIcons:function(){var e=this.model.toJSON();e=this.getSocialIconsData(e),this.model.set("social_icons",e.social_icons,{silent:!0})},getSocialIconsData:function(t){var i=e("#wph-wizard-services-icons-"+t.service_type+" .wpmudev-social-item"),s={};return i.each(function(){var t=e(this),i=t.find("input.toggle-checkbox"),n=i.data("id"),o=t.find("input.wpmudev-input_number"),a=t.find("input.wpmudev-input_text");o.length&&(0>parseInt(o.val())&&o.val(0));i.is(":checked")&&(s[n]={enabled:!0,counter:o.length?o.val():"0",link:a.length?a.val():""})}),i.length&&(t.social_icons=s),t},addPlaceholderToField:function(t){var i=e(t.currentTarget),s=i.val(),n=i.data("field"),o=e('[name="'.concat(n,'"]')),a=o.val()+s;o.val(a).trigger("change")}}))}),Hustle.define("SShare.Design_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),Hustle.get("Mixins.Module_Design"),{beforeRender:function(){Hustle.Events.off("modules.view.displayTypeUpdated").on("modules.view.displayTypeUpdated",e.proxy(this.viewChangedDisplayTab,this))},afterRender:function(){this.targetContainer.length&&this.createPickers(),e('a[data-tab="appearance"]').on("click",e.proxy(this.updatePreview,this)),e('.sui-box[data-tab="display"] .sui-button[data-direction="next"').on("click",e.proxy(this.updatePreview,this)),e('.sui-box[data-tab="visibility"] .sui-button[data-direction="prev"').on("click",e.proxy(this.updatePreview,this)),this.updatePreview()},updatePreview:function(){e("#hui-preview-social-shares-floating").trigger("hustle_update_prewiev")},viewChanged:function(t){t.changed;"flat"===t.get("icon_style")?(e("#hustle-floating-icons-custom-background").addClass("sui-hidden"),e("#hustle-widget-icons-custom-background").addClass("sui-hidden")):(e("#hustle-floating-icons-custom-background").removeClass("sui-hidden"),e("#hustle-widget-icons-custom-background").removeClass("sui-hidden")),"outline"===t.get("icon_style")?(e("#hustle-floating-icons-custom-background .sui-label").text("Icon border"),e("#hustle-widget-icons-custom-background .sui-label").text("Icon border"),e("#hustle-floating-counter-border").addClass("sui-hidden"),e("#hustle-widget-counter-border").addClass("sui-hidden")):(e("#hustle-floating-icons-custom-background .sui-label").text("Icon background"),e("#hustle-widget-icons-custom-background .sui-label").text("Icon background"),e("#hustle-floating-counter-border").removeClass("sui-hidden"),e("#hustle-widget-counter-border").removeClass("sui-hidden")),this.updatePreview()},viewChangedDisplayTab:function(t){var i=t.get("inline_enabled"),s=t.get("widget_enabled"),n=t.get("shortcode_enabled"),o=t.get("float_desktop_enabled"),a=t.get("float_mobile_enabled"),l=_.intersection([1,"1","true"],[i,s,n]).length,r=_.intersection([1,"1","true"],[a,o]).length;r?(e("#hustle-appearance-floating-icons-row").show(),e("#hustle-appearance-floating-icons-placeholder").hide()):(e("#hustle-appearance-floating-icons-row").hide(),e("#hustle-appearance-floating-icons-placeholder").show()),l?(e("#hustle-appearance-widget-icons-row").show(),e("#hustle-appearance-widget-icons-placeholder").hide()):(e("#hustle-appearance-widget-icons-row").hide(),e("#hustle-appearance-widget-icons-placeholder").show()),l||r?(e("#hustle-appearance-icons-style").show(),e("#hustle-appearance-empty-message").hide()):(e("#hustle-appearance-icons-style").hide(),e("#hustle-appearance-empty-message").show(),e("#hustle-appearance-floating-icons-placeholder").hide(),e("#hustle-appearance-widget-icons-placeholder").hide())}}))}),Hustle.define("SShare.Display_View",function(e){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Module_Display"),{moduleType:"social_sharing",extViewChanged:function(e){_.intersection(["float_desktop_enabled","float_mobile_enabled","inline_enabled","widget_enabled","shortcode_enabled"],Object.keys(e)).length?Hustle.Events.trigger("modules.view.displayTypeUpdated",this.model):"float_desktop_position"in e?"right"===e.float_desktop_position?(this.$("#hustle-float_desktop-left-offset-label").addClass("sui-hidden"),this.$("#hustle-float_desktop-right-offset-label").removeClass("sui-hidden"),this.$("#hustle-float_desktop-offset-x-wrapper").removeClass("sui-hidden")):"left"===e.float_desktop_position?(this.$("#hustle-float_desktop-left-offset-label").removeClass("sui-hidden"),this.$("#hustle-float_desktop-right-offset-label").addClass("sui-hidden"),this.$("#hustle-float_desktop-offset-x-wrapper").removeClass("sui-hidden")):this.$("#hustle-float_desktop-offset-x-wrapper").addClass("sui-hidden"):"float_desktop_position_y"in e?"bottom"===e.float_desktop_position_y?(this.$("#hustle-float_desktop-top-offset-label").addClass("sui-hidden"),this.$("#hustle-float_desktop-bottom-offset-label").removeClass("sui-hidden")):(this.$("#hustle-float_desktop-top-offset-label").removeClass("sui-hidden"),this.$("#hustle-float_desktop-bottom-offset-label").addClass("sui-hidden")):"float_mobile_position"in e?"right"===e.float_mobile_position?(this.$("#hustle-float_mobile-left-offset-label").addClass("sui-hidden"),this.$("#hustle-float_mobile-right-offset-label").removeClass("sui-hidden"),this.$("#hustle-float_mobile-offset-x-wrapper").removeClass("sui-hidden")):"left"===e.float_mobile_position?(this.$("#hustle-float_mobile-left-offset-label").removeClass("sui-hidden"),this.$("#hustle-float_mobile-right-offset-label").addClass("sui-hidden"),this.$("#hustle-float_mobile-offset-x-wrapper").removeClass("sui-hidden")):this.$("#hustle-float_mobile-offset-x-wrapper").addClass("sui-hidden"):"float_mobile_position_y"in e&&("bottom"===e.float_mobile_position_y?(this.$("#hustle-float_mobile-top-offset-label").addClass("sui-hidden"),this.$("#hustle-float_mobile-bottom-offset-label").removeClass("sui-hidden")):(this.$("#hustle-float_mobile-top-offset-label").removeClass("sui-hidden"),this.$("#hustle-float_mobile-bottom-offset-label").addClass("sui-hidden")))}}))}),Hustle.define("Modals.Services_Platforms",function(e){"use strict";return Backbone.View.extend({el:"#hustle-dialog--add-platforms",selectedPlatforms:[],events:{"click .sui-box-selector input":"selectPlatforms","click .hustle-cancel-platforms":"cancelPlatforms","click .sui-dialog-overlay":"cancelPlatforms","click #hustle-add-platforms":"addPlatforms"},initialize:function(e){this.selectedPlatforms=e,this.$(".hustle-add-platforms-option").prop("checked",!1).prop("disabled",!1);var t=!0,i=!1,s=void 0;try{for(var n,o=this.selectedPlatforms[Symbol.iterator]();!(t=(n=o.next()).done);t=!0){var a=n.value;this.$("#hustle-social--"+a).prop("checked",!0).prop("disabled",!0)}}catch(e){i=!0,s=e}finally{try{t||null==o.return||o.return()}finally{if(i)throw s}}},selectPlatforms:function(e){var t=this.$(e.target),i=this.$el.find('label[for="'+t.attr("id")+'"]'),s=t.val();i.toggleClass("selected"),t.prop("checked")?this.selectedPlatforms.push(s):this.selectedPlatforms=_.without(this.selectedPlatforms,s)},checkPlatforms:function(){var e=!0,t=!1,i=void 0;try{for(var s,n=this.selectedPlatforms[Symbol.iterator]();!(e=(s=n.next()).done);e=!0){var o=s.value;this.$("#hustle-social--"+o).prop("checked")||(this.selectedPlatforms=_.without(this.selectedPlatforms,o))}}catch(e){t=!0,i=e}finally{try{e||null==n.return||n.return()}finally{if(t)throw i}}},cancelPlatforms:function(){SUI.dialogs["hustle-dialog--add-platforms"].hide()},addPlatforms:function(e){var t=this.$(e.target);t.addClass("sui-button-onload"),this.checkPlatforms(),this.trigger("platforms:added",this.selectedPlatforms),setTimeout(function(){SUI.dialogs["hustle-dialog--add-platforms"].hide(),t.removeClass("sui-button-onload")},500)}})}),Hustle.define("SShare.View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Wizard_View"),{moduleType:"social_sharing",_events:{"hustle_update_prewiev #hui-preview-social-shares-floating":"updatePreview"},updatePreview:function(t){var i=_.extend({},this.model.toJSON(),this.getDataToSave());e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"hustle_preview_module",id:this.model.get("module_id"),previewData:i},success:function(t){if(t.success){var i=e("#hui-preview-social-shares-floating"),s=e("#hui-preview-social-shares-widget");i.html(t.data.floatingHtml),s.html(t.data.widgetHtml),t.data.style&&i.append(t.data.style),e(".hustle-share-icon").on("click",function(e){return e.preventDefault()})}}})},setTabsViews:function(e){this.contentView=e.contentView,this.displayView=e.displayView,this.designView=e.designView,this.visibilityView=e.visibilityView},renderTabs:function(){this.contentView.targetContainer.html(""),this.contentView.render(),this.contentView.delegateEvents(),this.contentView.targetContainer.append(this.contentView.$el),this.contentView.afterRender(),this.designView.targetContainer.html(""),this.designView.delegateEvents(),this.designView.targetContainer.append(this.designView.$el),this.designView.afterRender(),this.displayView.targetContainer.html(""),this.displayView.render(),this.displayView.delegateEvents(),this.displayView.targetContainer.append(this.displayView.$el),this.displayView.afterRender(),this.visibilityView.delegateEvents(),this.visibilityView.targetContainer.append(this.visibilityView.$el),this.visibilityView.afterRender()},sanitizeData:function(){},getDataToSave:function(){return{content:this.contentView.model.toJSON(),display:this.displayView.model.toJSON(),design:this.designView.model.toJSON(),visibility:this.visibilityView.model.toJSON()}}}))}),Hustle.define("Popup.Module",function(){"use strict";var e;(e="_page_hustle_popup_listing")===pagenow.substr(pagenow.length-e.length)&&new Optin.listingBase({moduleType:optinVars.current.module_type}),function(){var e="_page_hustle_popup";if(e===pagenow.substr(pagenow.length-e.length)){var t=Hustle.get("Models.Module_Defaults"),i=t.visibilityDefaults,s=t.settingsDefaults,n=Hustle.View.extend(Hustle.get("Mixins.Wizard_View")),o=Hustle.View.extend(Hustle.get("Mixins.Module_Content")),a=Hustle.View.extend(Hustle.get("Mixins.Module_Emails")),l=Hustle.View.extend(Hustle.get("Mixins.Module_Design")),r=Hustle.View.extend(Hustle.get("Mixins.Module_Visibility")),d=Hustle.View.extend(Hustle.get("Mixins.Module_Settings")),u=Hustle.get("Module.IntegrationsView"),c=Module.Model,h=Hustle.get("Models.M"),p=Hustle.get("Models.M"),g=Hustle.get("Models.M"),f=Hustle.get("Models.M"),m=Hustle.get("Models.M").extend({defaults:i.defaults,initialize:i.initialize}),_=Hustle.get("Models.M").extend({defaults:s.defaults,initialize:s.initialize}),v=new c(optinVars.current.data||{}),b=new h(optinVars.current.content||{}),w=new p(optinVars.current.emails||{}),y=new g(optinVars.current.design||{}),x=new f(optinVars.current.integrations_settings||{}),C=new m(optinVars.current.visibility||{}),k=new _(optinVars.current.settings||{});new n({model:v,contentView:new o({model:b,moduleType:optinVars.current.data.module_type}),emailsView:new a({model:w}),designView:new l({model:y}),integrationsView:new u({model:x,moduleId:optinVars.current.data.module_id}),visibilityView:new r({model:C,moduleType:optinVars.current.data.module_type}),settingsView:new d({model:k})})}}()}),Hustle.define("Slidein.Module",function(){"use strict";var e;(e="_page_hustle_slidein_listing")===pagenow.substr(pagenow.length-e.length)&&new Optin.listingBase({moduleType:optinVars.current.module_type}),function(){var e="_page_hustle_slidein";if(e===pagenow.substr(pagenow.length-e.length)){var t=Hustle.get("Models.Module_Defaults"),i=t.visibilityDefaults,s=t.settingsDefaults,n=Hustle.View.extend(Hustle.get("Mixins.Wizard_View")),o=Hustle.View.extend(Hustle.get("Mixins.Module_Content")),a=Hustle.View.extend(Hustle.get("Mixins.Module_Emails")),l=Hustle.View.extend(Hustle.get("Mixins.Module_Design")),r=Hustle.View.extend(Hustle.get("Mixins.Module_Visibility")),d=Hustle.View.extend(Hustle.get("Mixins.Module_Settings")),u=Hustle.get("Module.IntegrationsView"),c=Module.Model,h=Hustle.get("Models.M"),p=Hustle.get("Models.M"),g=Hustle.get("Models.M"),f=Hustle.get("Models.M"),m=Hustle.get("Models.M").extend({defaults:i.defaults,initialize:i.initialize}),_=Hustle.get("Models.M").extend({defaults:s.defaults,initialize:s.initialize}),v=new c(optinVars.current.data||{}),b=new h(optinVars.current.content||{}),w=new p(optinVars.current.emails||{}),y=new g(optinVars.current.design||{}),x=new f(optinVars.current.integrations_settings||{}),C=new m(optinVars.current.visibility||{}),k=new _(optinVars.current.settings||{});new n({model:v,contentView:new o({model:b,moduleType:optinVars.current.data.module_type}),emailsView:new a({model:w}),designView:new l({model:y}),integrationsView:new u({model:x,moduleId:optinVars.current.data.module_id}),visibilityView:new r({model:C,moduleType:optinVars.current.data.module_type}),settingsView:new d({model:k})})}}()}),Hustle.define("Embedded.Module",function(){"use strict";var e;(e="_page_hustle_embedded_listing")===pagenow.substr(pagenow.length-e.length)&&new Optin.listingBase({moduleType:optinVars.current.module_type}),function(){var e="_page_hustle_embedded";if(e===pagenow.substr(pagenow.length-e.length)){var t=Hustle.get("Models.Module_Defaults").visibilityDefaults,i=Hustle.View.extend(Hustle.get("Mixins.Wizard_View")),s=Hustle.View.extend(Hustle.get("Mixins.Module_Content")),n=Hustle.View.extend(Hustle.get("Mixins.Module_Emails")),o=Hustle.View.extend(Hustle.get("Mixins.Module_Design")),a=Hustle.View.extend(Hustle.get("Mixins.Module_Display")),l=Hustle.View.extend(Hustle.get("Mixins.Module_Visibility")),r=Hustle.View.extend(Hustle.get("Mixins.Module_Settings")),d=Hustle.get("Module.IntegrationsView"),u=Module.Model,c=Hustle.get("Models.M"),h=Hustle.get("Models.M"),p=Hustle.get("Models.M"),g=Hustle.get("Models.M"),f=Hustle.get("Models.M"),m=Hustle.get("Models.M").extend({defaults:t.defaults,initialize:t.initialize}),_=Hustle.get("Models.M"),v=new u(optinVars.current.data||{}),b=new c(optinVars.current.content||{}),w=new h(optinVars.current.emails||{}),y=new p(optinVars.current.design||{}),x=new g(optinVars.current.integrations_settings||{}),C=new f(optinVars.current.display||{}),k=new m(optinVars.current.visibility||{}),V=new _(optinVars.current.settings||{});new i({model:v,contentView:new s({model:b,moduleType:optinVars.current.data.module_type}),emailsView:new n({model:w}),designView:new o({model:y}),integrationsView:new d({model:x,moduleId:optinVars.current.data.module_id}),displayView:new a({model:C,moduleType:optinVars.current.data.module_type}),visibilityView:new l({model:k,moduleType:optinVars.current.data.module_type}),settingsView:new r({model:V})})}}()}),Hustle.define("SShare.Module",function(e){"use strict";var t;(t="_page_hustle_sshare_listing")===pagenow.substr(pagenow.length-t.length)&&new Optin.listingBase({moduleType:optinVars.current.module_type}),function(){var e="_page_hustle_sshare";if(e===pagenow.substr(pagenow.length-e.length)){var t=Hustle.get("Models.Module_Defaults").visibilityDefaults,i=Hustle.get("SShare.View"),s=Hustle.get("SShare.Content_View"),n=Hustle.get("SShare.Display_View"),o=Hustle.get("SShare.Design_View"),a=Hustle.View.extend(Hustle.get("Mixins.Module_Visibility")),l=Module.Model,r=Hustle.get("Models.M"),d=Hustle.get("Models.M"),u=Hustle.get("Models.M"),c=Hustle.get("Models.M").extend({defaults:t.defaults,initialize:t.initialize}),h=new l(optinVars.current.data||{}),p=new r(optinVars.current.content||{}),g=new d(optinVars.current.display||{}),f=new u(optinVars.current.design||{}),m=new c(optinVars.current.visibility||{});new i({model:h,contentView:new s({model:p,moduleType:optinVars.current.data.module_type}),displayView:new n({model:g}),designView:new o({model:f}),visibilityView:new a({model:m,moduleType:optinVars.current.data.module_type})})}}()}),Hustle.define("Dashboard.View",function(e,t,i){"use strict";"toplevel_page_hustle"===pagenow&&new(Backbone.View.extend({el:".sui-wrap",events:{"click .hustle-preview-module-button":"openPreview","click .hustle-delete-module-button":"openDeleteModal","click .hustle-free-version-create":"showUpgradeModal","click .sui-dropdown .hustle-onload-icon-action":"addLoadingIconToActionsButton","click .hustle-single-module-button-action":"handleSingleModuleAction"},initialize:function(t){e("#hustle-dialog--welcome").length&&this.openWelcomeDialog(),e("#hustle-dialog--migrate").length&&this.openMigrateDialog(),this.doActionsBasedOnUrl()},doActionsBasedOnUrl:function(){if(Module.Utils.getUrlParam("show-notice")){var e="success"===Module.Utils.getUrlParam("show-notice")?"success":"error",t=Module.Utils.getUrlParam("notice"),i=t&&"undefined"!==optinVars.messages.commons[t]?optinVars.messages.commons[t]:Module.Utils.getUrlParam("notice-message");void 0!==i&&i.length&&Module.Notification.open(e,i)}},openPreview:function(t){var i=e(t.currentTarget),s=i.data("id"),n=i.data("type");Module.preview.open(s,n)},showUpgradeModal:function(t){void 0!==t&&t.preventDefault(),e("#wph-upgrade-modal").addClass("wpmudev-modal-active")},openDeleteModal:function(t){t.preventDefault();var i=e(t.currentTarget),s={id:i.data("id"),nonce:i.data("nonce"),action:"delete",title:i.data("title"),description:i.data("description")};Module.deleteModal.open(s)},addLoadingIconToActionsButton:function(t){e(t.currentTarget).closest(".sui-dropdown").find(".sui-dropdown-anchor").addClass("sui-button-onload")},openWelcomeDialog:function(){Hustle.get("Modals.Welcome")},openMigrateDialog:function(){Hustle.get("Modals.Migration")},handleSingleModuleAction:function(e){Module.handleActions.initAction(e,"dashboard",this)},actionToggleStatus:function(e,t){var i=t.was_module_enabled;e.find("span").toggleClass("sui-hidden");var s=e.parents("td.hui-status").find("span.sui-tooltip");s.removeClass("sui-draft sui-published"),i?s.addClass("sui-draft").attr("data-tooltip",optinVars.messages.commons.draft):s.addClass("sui-published").attr("data-tooltip",optinVars.messages.commons.published)}}))}),Hustle.define("Integrations.View",function(e,t,i){"use strict";var s="_page_hustle_integrations";s===pagenow.substr(pagenow.length-s.length)&&new(Backbone.View.extend({el:".sui-wrap",events:{"click .connect-integration":"connectIntegration","keypress .connect-integration":"preventEnterKeyFromDoingThings"},initialize:function(){this.stopListening(Hustle.Events,"hustle:providers:reload",this.renderProvidersTables),this.listenTo(Hustle.Events,"hustle:providers:reload",this.renderProvidersTables),this.render()},render:function(){var e=this.$el.find("#hustle-not-connected-providers-section"),t=this.$el.find("#hustle-connected-providers-section");0<e.length&&0<t.length&&this.renderProvidersTables(),optinVars.integration_redirect&&this.handleIntegrationRedirect()},renderProvidersTables:function(){var t=this,i={};this.$el.find(".hustle-integrations-display").html('<div class="sui-notice sui-notice-sm sui-notice-loading"><p>'+optinVars.fetching_list+"</p></div>"),i.action="hustle_provider_get_providers",i._ajax_nonce=optinVars.providers_action_nonce,i.data={},e.post({url:ajaxurl,type:"post",data:i}).done(function(e){e&&e.success&&(t.$el.find("#hustle-not-connected-providers-section").html(e.data.not_connected),t.$el.find("#hustle-connected-providers-section").html(e.data.connected))}).always(function(){t.$el.find(".sui-notice-loading").remove()})},preventEnterKeyFromDoingThings:function(e){13!==e.which||e.preventDefault()},connectIntegration:function(e){Module.integrationsModal.open(e)},handleIntegrationRedirect:function(){var e=optinVars.integration_redirect,t=optinVars.integrations_migrate;if(window.history.pushState({},document.title,optinVars.integrations_url),"notification"===e.action){var i="success"===e.status?"success":"error",s=e.delay?e.delay:1e4;Module.Notification.open(i,e.message,s)}if(t.hasOwnProperty("provider_modal")&&"constantcontact"===t.provider_modal&&Module.ProviderMigration.open(t.provider_modal),t.hasOwnProperty("migration_notificaiton")){var n="success"===t.migration_notificaiton.status?"success":"error",o=t.migration_notificaiton.delay?t.migration_notificaiton.delay:1e4;Module.Notification.open(n,t.migration_notificaiton.message,o)}}}))}),Hustle.define("Entries.View",function(e){"use strict";var t="_page_hustle_entries";t===pagenow.substr(pagenow.length-t.length)&&new(Backbone.View.extend({el:".sui-wrap",events:{"click .sui-pagination-wrap .hustle-open-inline-filter":"openFilterInline","click .sui-pagination-wrap .hustle-open-dialog-filter":"openFilterModal","click #hustle-dialog--filter-entries .hustle-dialog-close":"closeFilterModal","click .hustle-delete-entry-button":"openDeleteModal","click .sui-active-filter-remove":"removeFilter","click .hustle-entries-clear-filter":"clearFilter"},initialize:function(t){var i={},s=e(".hui-entries-alert");void 0!==window.hustle_entries_datepicker_ranges&&(i=window.hustle_entries_datepicker_ranges),e("input.hustle-entries-filter-date").daterangepicker({autoUpdateInput:!1,autoApply:!0,alwaysShowCalendars:!0,ranges:i,locale:optinVars.daterangepicker}),e("input.hustle-entries-filter-date").on("apply.daterangepicker",function(t,i){e(this).val(i.startDate.format("MM/DD/YYYY")+" - "+i.endDate.format("MM/DD/YYYY"))}),s.length&&(s.attr("colspan",s.closest(".sui-table").find("> thead tr th").length),s.find("i").hide(),s.find("span").removeClass("sui-screen-reader-text"))},openFilterInline:function(e){var t=this.$(e.target),i=t.closest(".sui-pagination-wrap").find(".sui-button-icon"),s=t.closest(".hui-actions-bar").next(".sui-pagination-filter");i.toggleClass("sui-active"),s.toggleClass("sui-open"),e.preventDefault(),e.stopPropagation()},openFilterModal:function(e){SUI.dialogs["hustle-dialog--filter-entries"].show().on("show",function(e,t){e.getElementsByClassName("sui-dialog-content")[0].className="sui-dialog-content sui-fade-in"}),e.preventDefault()},closeFilterModal:function(e){SUI.dialogs["hustle-dialog--filter-entries"].hide(),SUI.dialogs["hustle-dialog--filter-entries"].on("hide",function(e,t){e.getElementsByClassName("sui-dialog-content")[0].className="sui-dialog-content sui-fade-out"}),e.preventDefault()},removeFilter:function(e){var t=this.$(e.target).data("filter"),i=new RegExp("&"+t+"=[^&]*","i");-1!==["order_by","search_email","date_range"].indexOf(t)&&(location.href=location.href.replace(i,""))},openDeleteModal:function(t){t.preventDefault();var i=e(t.target),s={id:i.data("id"),nonce:i.data("nonce"),action:"delete",title:i.data("title"),description:i.data("description"),actionClass:""};Module.deleteModal.open(s)},clearFilter:function(e){e.preventDefault(),this.$("input[name=search_email]").val(""),this.$("input[name=date_range]").val("")}}))}),Hustle.define("ProviderNotice.View",function(e,t,i){"use strict";new(Backbone.View.extend({el:".hustle-provider-notice",cookieKey:"",events:{"click .dismiss-provider-migration-notice":"HideProviderNotice"},initialize:function(){this.cookieKey="provider_migration_notice_",e(".hustle-provider-notice").length&&this.showProviderNotice()},HideProviderNotice:function(t){Optin.cookie.set(this.cookieKey+e(t.currentTarget).data("name"),1,7),location.reload()},showProviderNotice:function(){var t=e(".hustle-provider-notice").data("name");1!==Optin.cookie.get(this.cookieKey+t)&&e("#hustle_migration_notice__"+t).show()}}))}),Hustle.define("Settings.View",function(e,t,i){"use strict";"hustle_page_hustle_settings"===pagenow&&new(Backbone.View.extend({el:".sui-wrap",events:{"click .sui-sidenav .sui-vertical-tab a":"sidenav","click .sui-pagination-wrap > button":"pagination","click #hustle-dialog-open--reset-settings":"resetDialog","click .hustle-load-on-click":"addLoadingState","click .hustle-settings-save":"handleSave"},initialize:function(t){var s=Hustle.get("Settings.reCaptcha_Settings"),n=Hustle.get("Settings.Top_Metrics_View"),o=Hustle.get("Settings.Privacy_Settings"),a=Hustle.get("Settings.Permissions_View"),l=Hustle.get("Settings.Data_Settings"),r=Hustle.get("Settings.Palettes");this.recaptchaView=new s,new n,new o,new a,new l,new r,e(i).off("popstate",e.proxy(this.tabUpdate,this)),e(i).on("popstate",e.proxy(this.tabUpdate,this)),Hustle.Events.trigger("view.rendered",this),this.doActionsBasedOnUrl()},doActionsBasedOnUrl:function(){if(Module.Utils.getUrlParam("show-notice")){var e="success"===Module.Utils.getUrlParam("show-notice")?"success":"error",t=Module.Utils.getUrlParam("notice"),i=t&&"undefined"!==optinVars.messages[t]?optinVars.messages[t]:Module.Utils.getUrlParam("notice-message");void 0!==i&&i.length&&Module.Notification.open(e,i)}else Module.Utils.getUrlParam("404-downgrade-modal")&&this.$("#hustle-dialog--404-downgrade").length&&SUI.openModal("hustle-dialog--404-downgrade","hustle-popup-number")},sidenav:function(t){var i=e(t.target).data("tab");i&&this.tabJump(i,!0),t.preventDefault()},tabUpdate:function(e){var t=e.originalEvent.state;t&&this.tabJump(t.tabSelected)},tabJump:function(e,t){var i=this.$el.find('a[data-tab="'+e+'"]'),s=i.closest(".sui-vertical-tabs").find(".sui-vertical-tab"),n=this.$el.find(".sui-box[data-tab]"),o=this.$el.find('.sui-box[data-tab="'+e+'"]');t&&history.pushState({tabSelected:e},"Hustle Settings","admin.php?page=hustle_settings§ion="+e),s.removeClass("current"),n.hide(),i.parent().addClass("current"),o.show()},pagination:function(e){var t=this.$(e.target).closest(".sui-pagination-wrap"),i=t.find(".sui-button-icon"),s=t.next(".sui-pagination-filter");i.toggleClass("sui-active"),s.toggleClass("sui-open"),e.preventDefault(),e.stopPropagation()},handleSave:function(t){t.preventDefault();var i=this,s=e(t.currentTarget),n=s.data("form-id"),o=s.data(),a=new FormData;if(tinyMCE.triggerSave(),void 0!==n){var l=e("#"+n);l.length&&(a=new FormData(l[0]),e.each(l.find("input[type=checkbox]"),function(){var t=e(this);t.is(":checked")||a.append(t.attr("name"),"0")}))}e.each(o,function(e,t){return a.append(e,t)}),a.append("_ajax_nonce",optinVars.current.save_settings_nonce),a.append("action","hustle_save_settings"),s.addClass("sui-button-onload"),s.prop("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:a,contentType:!1,processData:!1}).done(function(t){t.data?(t.data.callback&&"undefined"!==i[t.data.callback]&&i[t.data.callback](s,t.data,t.success),t.data.url?!0===t.data.url?location.reload():location.replace(t.data.url):t.data.notification&&Module.Notification.open(t.data.notification.status,t.data.notification.message,t.data.notification.delay),t.data.url||(e(".sui-button-onload").removeClass("sui-button-onload"),s.prop("disabled",!1))):(t.success?Module.Notification.open("success",optinVars.messages.settings_saved):Module.Notification.open("error",optinVars.messages.something_went_wrong),e(".sui-button-onload").removeClass("sui-button-onload"),s.prop("disabled",!1))}).error(function(t){e(".sui-button-onload").removeClass("sui-button-onload"),s.prop("disabled",!1),Module.Notification.open("error",optinVars.messages.something_went_wrong)})},actionSaveRecaptcha:function(){this.recaptchaView.maybeRenderRecaptchas()},resetDialog:function(t){var i=this.$(t.target),s=e("#hustle-dialog--reset-settings"),n=s.find("#dialogTitle"),o=s.find("#dialogDescription");n.text(i.data("dialog-title")),o.text(i.data("dialog-info")),SUI.dialogs["hustle-dialog--reset-settings"].show(),t.preventDefault()},addLoadingState:function(t){e(t.currentTarget).addClass("sui-button-onload")}}))});
|
1 |
+
!function(e){"use strict";window.Hustle=function(e,t,i){var s={},n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g},o=_.extend({},Backbone.Events),a=Backbone.View.extend({initialize:function(){_.isFunction(this.initMix)&&this.initMix.apply(this,arguments),this.render&&(this.render=_.wrap(this.render,function(e){this.trigger("before_render"),e.call(this),o.trigger("view.rendered",this),this.trigger("rendered")})),_.isFunction(this.init)&&this.init.apply(this,arguments)}}),l=_.memoize(function(e){var t;return function(i){return(t=t||_.template(document.getElementById(e).innerHTML,null,n))(i).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),r=_.memoize(function(e){var t;return function(i){return(t=t||_.template(e,null,n))(i)}});return{define:function(n,o){if(n.split(".").length)!function s(n,a){var l,r=n.split("."),d=r.splice(0,1)[0];d&&(r.length?a[d]=a[d]||{}:(l=o.call(null,e,t,i),a[d]=_.isFunction(l)||void 0===l?l:_.extend(a[d]||{},l)),r.length&&d&&s(r.join("."),a[d]))}(n,s);else{var a=s[n]||{};s[n]=_.extend(a,o.call(null,e,t,i))}},getModules:function(){return s},get:function(e){var t,i;return e.split(".").length?(t=!1,(i=function(e,s){var n=e.split("."),o=n.splice(0,1)[0];t=s[o],n.length&&i(n.join("."),s[o])})(e,s),t):s[e]||!1},Events:o,View:a,template:l,createTemplate:r,getTemplateOptions:function(){return e.extend(!0,{},n)},cookie:{set:function(t,i,s){var n,o;i=e.isArray(i)||e.isPlainObject(i)?JSON.stringify(i):i,isNaN(s)?o="":((n=new Date).setTime(n.getTime()+24*s*60*60*1e3),o="; expires="+n.toGMTString()),document.cookie=t+"="+i+o+"; path=/"},get:function(e){var t,i,s,n=document.cookie.split(";"),o=n.length;for(s=e+"=",t=0;t<o;t+=1){for(i=n[t];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(s)){var a=i.substring(s.length,i.length);return a?JSON.parse(a):a}}return null}},consts:{ModuleShowCount:"hustle_module_show_count-"}}}(jQuery,document,window)}(jQuery);var Optin=Optin||{};function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Optin.View={},Optin.Models={},Optin.Events={},"undefined"!=typeof Backbone&&_.extend(Optin.Events,Backbone.Events),function(e){"use strict";Optin.NEVER_SEE_PREFIX="inc_optin_never_see_again-",Optin.COOKIE_PREFIX="inc_optin_long_hidden-",Optin.POPUP_COOKIE_PREFIX="inc_optin_popup_long_hidden-",Optin.SLIDE_IN_COOKIE_PREFIX="inc_optin_slide_in_long_hidden-",Optin.EMBEDDED_COOKIE_PREFIX="inc_optin_embedded_long_hidden-",Optin.globalMixin=function(){_.mixin({log:function(){},toBool:function(e){return _.isBoolean(e)?e:_.isString(e)&&-1!==["true","false","1"].indexOf(e.toLowerCase())?"true"===e.toLowerCase()||"1"===e.toLowerCase():_.isNumber(e)?!!e:!(_.isUndefined(e)||_.isNull(e)||_.isNaN(e))&&e},isTrue:function(e){return!(_.isUndefined(e)||_.isNull(e)||_.isNaN(e))&&(_.isNumber(e)?0!==e:(e=e.toString().toLowerCase(),-1!==["1","true","on"].indexOf(e)))},isFalse:function(e){return!_.isTrue(e)},controlBase:function(e,t,i){return i=_.isUndefined(i)?"checked":i,e=_.toBool(e),t=_.isBoolean(e)?_.isTrue(t):t,_.isEqual(e,t)?i+"="+i:""},checked:function(e,t){return _.controlBase(e,t,"checked")},selected:function(e,t){return _.controlBase(e,t,"selected")},disabled:function(e,t){return _.controlBase(e,t,"disabled")},class:function(e,t,i){return _.isTrue(e)?t:void 0!==i?i:""},add_class:function(e,t,i){return"class={class}".replace("{class}",_.class(e,t,i))},toUpperCase:function(e){return _.isString(e)?e.toUpperCase():""}}),_.findKey||_.mixin({findKey:function(e,t,i){t=cb(t,i);for(var s,n=_.keys(e),o=0,a=n.length;o<a;o++)if(t(e[s=n[o]],s,e))return s}})},Optin.globalMixin(),Backbone.Model.prototype.toJSON=function(){var e,t=_.clone(this.attributes);for(e in t)(t[e]instanceof Backbone.Model||Backbone.Collection&&t[e]instanceof Backbone.Collection)&&(t[e]=t[e].toJSON());return t},Optin.template=_.memoize(function(t){var i,s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g};return function(n){return(i=i||_.template(e("#"+t).html(),null,s))(n).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),Optin.templateCompat=_.memoize(function(t){var i;return function(s){return(i=i||_.template(e("#"+t).html()))(s).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),Optin.cookie=Hustle.cookie,Optin.Mixins={_mixins:{},_servicesMixins:{},_desingMixins:{},_displayMixins:{},add:function(e,t){this._mixins[e]=t},getMixins:function(){return this._mixins},addServicesMixin:function(e,t){this._servicesMixins[e]=t},getServicesMixins:function(){return this._servicesMixins}}}(jQuery),function(e){"use strict";Hustle.Events.on("view.rendered",function(t){if(t instanceof Backbone.View){t.$("select:not([multiple])").each(function(){SUI.suiSelect(this)}),t.$(".sui-select:not(.hustle-select-ajax)").SUIselect2({dropdownCssClass:"sui-select-dropdown"}),t.$(".sui-accordion").each(function(){SUI.suiAccordion(this)}),SUI.suiTabs(),SUI.tabs(),SUI.floatInput(),t.$(".sui-side-tabs").each(function(){var t=e(this).find(".sui-tabs-menu .sui-tab-item input"),i=function(){var i="";e.each(t,function(){var t,s=e(this),n=s.parent("label"),o=s.data("tab-menu"),a=e('.sui-tabs-content [data-tab-content="'.concat(o,'"]')),l=e('[data-tab-dependent="'.concat(o,'"]'));s[0].checked?(n.addClass("active"),o&&(i=o,a.addClass("active"),(t=l).show(),t.prop("tabindex","0"),t.removeProp("hidden"))):(n.removeClass("active"),o!==i&&(a.removeClass("active"),function(e){e.hide(),e.prop("tabindex","-1"),e.prop("hidden",!0)}(l)))})};i(),t.on("change",function(){return i()})}),t.$(".sui-toggle.hustle-toggle-with-container").each(function(){var t=e(this),i=t.find("input[type=checkbox]"),s=e('[data-toggle-content="'.concat(t.data("toggle-on"),'"]')),n=e('[data-toggle-content="'.concat(t.data("toggle-off"),'"]')),o=function(){i[0].checked?(Module.Utils.accessibleShow(s),Module.Utils.accessibleHide(n)):(Module.Utils.accessibleShow(n),Module.Utils.accessibleHide(s))};o(),i.on("change",function(){return o()})}),t.$("select.hustle-select-with-container").each(function(){var t=e(this),i=e('[data-field-content="'.concat(this.name,'"]')),s=t.data("content-on").split(","),n=function(){s.includes(t.val())?Module.Utils.accessibleShow(i):Module.Utils.accessibleHide(i)};n(),t.on("change",function(){return n()})})}}),e(document).ready(function(){e("#hustle-email-day").length&&e("#hustle-email-day").datepicker({beforeShow:function(t,i){e("#ui-datepicker-div").addClass("sui-calendar")},dateFormat:"MM dd, yy"}),e("#hustle-email-time").length&&e("#hustle-email-time").timepicker({timeFormat:"h:mm p",interval:"1",minTime:"0",maxTime:"11:59pm",defaultTime:null,startTime:"00:00",dynamic:!1,dropdown:!0,scrollbar:!0,change:function(){e("#hustle-email-time").trigger("change")}}),e("#hustle-notice-pro-is-available .notice-dismiss").on("click",function(t){e.post(ajaxurl,{action:"hustle_dismiss_admin_notice",dismissedNotice:"hustle_pro_is_available"},function(e){})}),e(".hustle-copy-shortcode-button").on("click",function(t){t.preventDefault();var i=e(t.target),s=i.data("shortcode"),n=i.closest(".sui-with-button-inside");if(void 0!==s){var o=e("<input />");e("body").append(o),o.val(s).select(),document.execCommand("copy"),o.remove(),Module.Notification.open("success",optinVars.messages.commons.shortcode_copied)}else if(n.length){n.find('input[type="text"]').select(),document.execCommand("copy")}}),e("#hustle-tracking-migration-notice .hustle-notice-dismiss").on("click",function(t){t.preventDefault(),e("#hustle-dismiss-modal-button").on("click",function(t){t.preventDefault(),e.post(ajaxurl,{action:"hustle_dismiss_notification",name:e(t.currentTarget).data("name"),_ajax_nonce:e(t.currentTarget).data("nonce")}).always(function(){return location.reload()})}),SUI.dialogs["hustle-dialog--migrate-dismiss-confirmation"].show()}),e("#hustle-dismiss-m2-notice").on("click",function(t){e.post(ajaxurl,{action:"hustle_dismiss_m2_notification",_ajax_nonce:e(this).data("nonce")}).always(function(){e("#hustle-m2-notice").fadeOut("slow")})}),e("#hustle-sendgrid-update-notice .notice-dismiss").on("click",function(t){t.preventDefault();var i=e(t.currentTarget).closest("#hustle-sendgrid-update-notice");e.post(ajaxurl,{action:"hustle_dismiss_notification",name:i.data("name"),_ajax_nonce:i.data("nonce")})}),e(".hustle-notice .notice-dismiss, .hustle-notice .dismiss-notice").on("click",function(t){t.preventDefault();var i=e(t.currentTarget).closest(".hustle-notice");e.post(ajaxurl,{action:"hustle_dismiss_notification",name:i.data("name"),_ajax_nonce:i.data("nonce")}).always(function(){return location.reload()})}),e(".sui-form-field input[type=number]").length&&e(".sui-form-field input[type=number]").on("keydown",function(t){e(this)[0].hasAttribute("min")&&0<=e(this).attr("min")&&(0!==t.originalEvent.key.replace(/[^0-9^.^,]/,"").length||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.preventDefault())}),setTimeout(function(){e(".hustle-scroll-to").length&&e("html, body").animate({scrollTop:e(".hustle-scroll-to").offset().top},"slow")},100),e(".hustle-check-all").on("click",function(t){var i=e(t.target),s=i.parents(".sui-wrap").find(".hustle-list"),n=i.is(":checked");s.find(".hustle-listing-checkbox").prop("checked",n),i.parents(".sui-wrap").find(".hustle-check-all").prop("checked",n),e(".hustle-bulk-apply-button").prop("disabled",!n)}),e(".hustle-list .hustle-listing-checkbox").on("click",function(t){var i=e(t.target),s=i.parents(".sui-wrap").find(".hustle-list"),n=i.is(":checked")&&!s.find(".hustle-listing-checkbox:not(:checked)").length,o=0===s.find(".hustle-listing-checkbox:checked").length;e(".hustle-check-all").prop("checked",n),e(".hustle-bulk-apply-button").prop("disabled",o)}),e(".hustle-bulk-apply-button").on("click",function(t){var i=e(t.target),s=e("select option:selected",i.closest(".hui-bulk-actions")).val(),n=e(".hustle-list .hustle-listing-checkbox:checked");if(0===n.length||"undefined"===s)return!1;var o=[];if(e.each(n,function(){o.push(e(this).val())}),"delete-all"===s){var a={ids:o.join(","),nonce:i.siblings('input[name="hustle_nonce"]').val(),title:i.data("title"),description:i.data("description"),action:s};return Module.deleteModal.open(a),!1}})})}(jQuery),Hustle.define("Modals.Migration",function(e){"use strict";new(Backbone.View.extend({el:"#hustle-dialog--migrate",data:{},events:{"click #hustle-migrate-start":"migrateStart","click #hustle-create-new-module":"createModule","click .sui-box-selector":"enableContinue","click .hustle-dialog-migrate-skip":"dismissModal","click .sui-dialog-overlay":"dismissModal"},initialize:function(){if(this.$el.length){var t="",i="";0===this.$el.data("isFirst")?(t="#hustle-dialog--migrate-slide-2",i="hustle-migrate-start"):(t="#hustle-dialog--migrate-slide-1",i="hustle-migrate-get-started"),this.$(t).addClass("sui-active sui-loaded"),setTimeout(function(){return SUI.openModal("hustle-dialog--migrate",i,e(".sui-wrap")[0],!1)},100),this.$progressBar=this.$el.find(".sui-progress .sui-progress-bar span"),this.$progressText=this.$el.find(".sui-progress .sui-progress-text span"),this.$partialRows=this.$el.find("#hustle-partial-rows")}},migrateStart:function(t){var i=e(t.target),s=this.$el.find("#hustle-dialog--migrate-slide-2"),n=s.find("#migrateDialog2Description");i.addClass("sui-button-onload"),s.find(".hustle-dialog-migrate-skip").remove(),n.text(n.data("migrate-text")),Module.Utils.accessibleHide(s.find("div[data-migrate-start]")),Module.Utils.accessibleHide(s.find("div[data-migrate-failed]")),Module.Utils.accessibleShow(s.find("div[data-migrate-progress]")),this.migrateTracking(t),i.removeClass("sui-button-onload"),t.preventDefault()},migrateComplete:function(){var e=this.$("#hustle-dialog--migrate-slide-2"),t=this,i=e.find("#migrateDialog2Title"),s=e.find("#migrateDialog2Description");this.$el.find("sui-button-onload").removeClass("sui-button-onload"),i.text(i.data("done-text")),s.text(s.data("done-text")),Module.Utils.accessibleHide(e.find("div[data-migrate-progress]")),Module.Utils.accessibleShow(e.find("div[data-migrate-done]")),this.$el.closest(".sui-modal").on("click",function(e){return t.closeDialog(e)})},migrateFailed:function(){var e=this.$el.find("#hustle-dialog--migrate-slide-2");e.find("#dialogDescription").text(""),Module.Utils.accessibleHide(e.find("div[data-migrate-start]")),Module.Utils.accessibleShow(e.find("div[data-migrate-failed]")),Module.Utils.accessibleHide(e.find("div[data-migrate-progress]"))},updateProgress:function(e,t,i){void 0===this.totalRows&&(this.totalRows=i,this.$el.find("#hustle-total-rows").text(i)),this.$partialRows.text(e);var s=t+"%";this.$progressBar.css("width",s),100>=t&&this.$progressText.text(t+"%")},migrateTracking:function(t){t.preventDefault();var i=this,s={action:"hustle_migrate_tracking",_ajax_nonce:e(t.currentTarget).data("nonce")};return e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:s,success:function(e){if(e.success){var s=e.data.migrated_rows,n=e.data.migrated_percentage,o=e.data.total_entries||"0";"done"!==e.data.current_meta?(i.updateProgress(s,n,o),i.migrateTracking(t)):(i.updateProgress(s,n,o),setTimeout(function(){return i.migrateComplete()},500))}else i.migrateFailed()},error:function(e){i.migrateFailed()}}),!1},createModule:function(t){var i=e(t.target),s=this.$el.find(".sui-box-selector input:checked");if(s.length){this.dismissModal(),i.addClass("sui-button-onload");var n=s.val(),o=void 0!==optinVars.module_page[n]?optinVars.module_page[n]:optinVars.module_page.popup;window.location="?page=".concat(o,"&create-module=true")}t.preventDefault()},closeDialog:function(e){SUI.closeModal(),e.preventDefault(),e.stopPropagation()},enableContinue:function(){this.$el.find("#hustle-create-new-module").prop("disabled",!1)},dismissModal:function(t){t&&t.preventDefault(),e.post(ajaxurl,{action:"hustle_dismiss_notification",name:"migrate_modal",_ajax_nonce:this.$el.data("nonce")})}}))}),Hustle.define("Modals.ReviewConditions",function(e){"use strict";new(Backbone.View.extend({el:"#hustle-dialog--review_conditions",initialize:function(){this.$el.length&&setTimeout(this.show,100,this)},show:function(e){"undefined"!=typeof SUI&&void 0!==SUI.dialogs?void 0!==SUI.dialogs[e.$el.prop("id")]&&SUI.dialogs[e.$el.prop("id")].show():setTimeout(e.show,100,e)}}))}),Hustle.define("Upgrade_Modal",function(e){"use strict";return Backbone.View.extend({el:"#wph-upgrade-modal",opts:{},events:{"click .wpmudev-i_close":"close"},initialize:function(e){this.opts=_.extend({},this.opts,e)},close:function(e){e.preventDefault(),e.stopPropagation(),this.$el.removeClass("wpmudev-modal-active")}})}),Hustle.define("Modals.Welcome",function(e){"use strict";new(Backbone.View.extend({el:"#hustle-dialog--welcome",events:{"click #hustle-new-create-module":"createModule","click .sui-box-selector":"enableContinue","click #getStarted":"dismissModal","click .sui-onboard-skip":"dismissModal","click .sui-dialog-close":"dismissModal"},initialize:function(){this.$el.length&&setTimeout(this.show,100,this)},show:function(e){"undefined"!=typeof SUI&&void 0!==SUI.dialogs?void 0!==SUI.dialogs[e.$el.prop("id")]&&SUI.dialogs[e.$el.prop("id")].show():setTimeout(e.show,100,e)},createModule:function(t){var i=e(t.target),s=this.$el.find(".sui-box-selector input:checked");if(s.length){i.addClass("sui-button-onload");var n=s.val(),o=void 0!==optinVars.module_page[n]?optinVars.module_page[n]:optinVars.module_page.popup;window.location="?page=".concat(o,"&create-module=true")}t.preventDefault()},enableContinue:function(){this.$el.find("#hustle-new-create-module").prop("disabled",!1)},dismissModal:function(t){t&&t.preventDefault(),e.post(ajaxurl,{action:"hustle_dismiss_notification",name:"welcome_modal",_ajax_nonce:this.$el.data("nonce")})}}))}),Hustle.define("Featured_Image_Holder",function(e){"use strict";return Backbone.View.extend({mediaFrame:!1,el:"#wph-wizard-choose_image",options:{attribute:"feature_image",multiple:!1},initialize:function(t){if(this.options.title=optinVars.messages.media_uploader.select_or_upload,this.options.button_text=optinVars.messages.media_uploader.use_this_image,this.options=_.extend({},this.options,t),!this.model||!this.options.attribute)throw new Error("Undefined model or attribute");this.targetDiv=t.targetDiv,e(document).on("click",".wpmudev-feature-image-browse",e.proxy(this.open,this)),e(document).on("click","#wpmudev-feature-image-clear",e.proxy(this.clear,this)),this.render()},render:function(){return this.defineMediaFrame(),this},showImagePreviewOrButton:function(){var e=this.model.get("feature_image");""===e||void 0===e?this.$el.removeClass("sui-has_file"):this.$el.addClass("sui-has_file")},defineMediaFrame:function(){var e=this;this.mediaFrame=wp.media({title:e.options.title,button:{text:e.options.button_text},multiple:e.options.multiple}).on("select",function(){var t,i,s=e.mediaFrame.state().get("selection").first().toJSON();s&&s.url&&(t=s.url,i="",e.model.set("feature_image",t),s.sizes&&s.sizes.thumbnail&&s.sizes.thumbnail.url&&(i=s.sizes.thumbnail.url),e.$el.find(".sui-upload-file span").text(t).change(),e.$el.find(".sui-image-preview").css("background-image","url( "+i+" )"),e.showImagePreviewOrButton())})},open:function(e){e.preventDefault(),this.mediaFrame.open()},clear:function(e){e.preventDefault(),this.model.set("feature_image",""),this.$el.find(".sui-upload-file span").text("").change(),this.$el.find(".sui-image-preview").css("background-image","url()"),this.showImagePreviewOrButton()}})}),Hustle.define("Modals.Edit_Field",function(e){"use strict";return Backbone.View.extend({el:"#hustle-dialog--edit-field",events:{"click .sui-dialog-overlay":"closeModal","click .hustle-discard-changes":"closeModal",'change input[name="time_format"]':"changeTimeFormat","click #hustle-apply-changes":"applyChanges",'blur input[name="name"]':"trimName","change input":"fieldUpdated",'click input[type="radio"]':"fieldUpdated","change select":"fieldUpdated",'change input[name="version"]':"handleCaptchaSave"},initialize:function(e){this.field=e.field,this.changed={},this.fieldData=e.fieldData,this.model=e.model,this.render()},render:function(){this.renderHeader(),this.renderLabels(),this.renderSettings(),this.renderStyling(),this.handleCaptchaSave(),this.$(".hustle-data-pane").first().trigger("click"),this.$(".sui-select").SUIselect2({dropdownParent:e("#hustle-dialog--edit-field .sui-box"),dropdownCssClass:"sui-select-dropdown"})},renderHeader:function(){this.$(".sui-box-header .sui-tag").text(this.field.type)},renderLabels:function(){if(-1!==e.inArray(this.field.type,["recaptcha","gdpr","submit"]))return this.$("#hustle-data-tab--labels").removeClass("hustle-data-pane").addClass("sui-hidden"),void this.$("#hustle-data-pane--labels").addClass("sui-hidden");this.$("#hustle-data-tab--labels").removeClass("sui-hidden").addClass("hustle-data-pane"),this.$("#hustle-data-pane--labels").removeClass("sui-hidden");var t="hustle-"+this.field.type+"-field-labels-tpl";e("#"+t).length||(t="hustle-common-field-labels-tpl");var i=Optin.template(t);this.$("#hustle-data-pane--labels").html(i(this.fieldData)),Hustle.Events.trigger("view.rendered",this)},renderSettings:function(){if("hidden"===this.field.type)return this.$("#hustle-data-tab--settings").removeClass("hustle-data-pane").addClass("sui-hidden"),this.$("#hustle-data-pane--settings").addClass("sui-hidden"),void Module.Utils.accessibleHide(this.$("[data-tabs]"));Module.Utils.accessibleShow(this.$("[data-tabs]")),this.$("#hustle-data-tab--settings").removeClass("sui-hidden").addClass("hustle-data-pane"),this.$("#hustle-data-pane--settings").removeClass("sui-hidden");var t="hustle-"+this.field.type+"-field-settings-tpl";e("#"+t).length||(t="hustle-common-field-settings-tpl");var i=Optin.template(t);if(this.$("#hustle-data-pane--settings").html(i(this.fieldData)),Hustle.Events.trigger("view.rendered",this),"gdpr"===this.field.type){wp.editor.remove("gdpr_message"),wp.editor.initialize("gdpr_message",{tinymce:{wpautop:!1,toolbar1:"bold,italic,strikethrough,link",valid_elements:"a[href|target=_blank],strong/b,i,u,s,em,del",forced_root_block:""},quicktags:{buttons:"strong,em,del,link"}})}else if("recaptcha"===this.field.type){var s={tinymce:{toolbar:["bold italic link alignleft aligncenter alignright"]},quicktags:!0};wp.editor.remove("v3_recaptcha_badge_replacement"),wp.editor.initialize("v3_recaptcha_badge_replacement",s),wp.editor.remove("v2_invisible_badge_replacement"),wp.editor.initialize("v2_invisible_badge_replacement",s)}},renderStyling:function(){if("hidden"===this.field.type)return this.$("#hustle-data-tab--styling").removeClass("hustle-data-pane").addClass("sui-hidden"),void this.$("#hustle-data-pane--styling").addClass("sui-hidden");this.$("#hustle-data-tab--styling").removeClass("sui-hidden").addClass("hustle-data-pane"),this.$("#hustle-data-pane--styling").removeClass("sui-hidden");var t="hustle-"+this.field.type+"-field-styling-tpl";e("#"+t).length||(t="hustle-common-field-styling-tpl");var i=Optin.template(t);this.$("#hustle-data-pane--styling").html(i(this.fieldData))},fieldUpdated:function(t){var i=e(t.target),s=i.attr("name"),n=i.is(":checkbox")?i.is(":checked"):i.val();this.changed[s]=n},closeModal:function(){this.undelegateEvents(),this.stopListening(),SUI.dialogs["hustle-dialog--edit-field"].hide()},changeTimeFormat:function(t){"12"===e(t.target).val()?(e("#hustle-date-format").closest(".sui-form-field").show(),e('input[name="time_hours"]').prop("min",1).prop("max",12)):(e("#hustle-date-format").closest(".sui-form-field").hide(),e('input[name="time_hours"]').prop("min",0).prop("max",23))},handleCaptchaSave:function(t){if("recaptcha"===this.field.type){var i=e("#available_recaptchas").val();if(i){i=i.split(",");var s=e('input[name="version"]:checked').val();-1===_.indexOf(i,s)?e("#hustle-dialog--edit-field").find("#hustle-apply-changes").attr("disabled","disabled"):e("#hustle-dialog--edit-field").find("#hustle-apply-changes").attr("disabled",!1)}else e("#hustle-dialog--edit-field").find("#hustle-apply-changes").attr("disabled","disabled")}},trimName:function(t){var i,s=this.$(t.target);i=e.trim(s.val()).replace(/ /g,"_"),s.val(i)},applyChanges:function(e){var t=this,i=this.$(e.target),s=Object.assign({},this.model.get("form_elements"));if("gdpr"===this.field.type&&"undefined"!=typeof tinyMCE){var n=tinyMCE.get("gdpr_message"),o=this.$("textarea#gdpr_message"),a="true"===o.attr("aria-hidden")?n.getContent():o.val();s.gdpr.gdpr_message=a,this.model.set("form_elements",s),this.model.userHasChange()}else if("recaptcha"===this.field.type&&"undefined"!=typeof tinyMCE){var l=tinyMCE.get("v3_recaptcha_badge_replacement"),r=this.$("textarea#v3_recaptcha_badge_replacement"),d="true"===r.attr("aria-hidden")?l.getContent():r.val();s.recaptcha.v3_recaptcha_badge_replacement=d;var c=tinyMCE.get("v2_invisible_badge_replacement"),u=this.$("textarea#v2_invisible_badge_replacement"),h="true"===u.attr("aria-hidden")?c.getContent():u.val();s.recaptcha.v2_invisible_badge_replacement=h,this.model.set("form_elements",s),this.model.userHasChange()}if(Object.keys(this.changed).length){var p=_.extend({},this.field);_.extend(this.field,this.changed),("name"in this.changed&&"email"!==p.name&&"email"===this.field.name||"name"in this.changed&&!this.field.name.trim().length)&&(this.field.name=p.name,delete this.changed.name),"name"in this.changed||"email"===p.name?"email"===p.name&&(this.field.name="email",delete this.changed.name):(s[this.field.name]=this.field,this.model.set("form_elements",s),this.model.userHasChange()),this.trigger("field:updated",this.field,this.changed,p)}i.addClass("sui-button-onload"),setTimeout(function(){t.closeModal(),i.removeClass("sui-button-onload")},300)}})}),Hustle.define("Modals.Optin_Fields",function(e){"use strict";return Backbone.View.extend({el:"#hustle-dialog--optin-fields",events:{"click .sui-box-selector input":"selectFields","click .sui-dialog-overlay":"closeModal","click .hustle-cancel-insert-fields":"closeModal","click #hustle-insert-fields":"insertFields"},initialize:function(){this.selectedFields=[]},selectFields:function(e){var t=this.$(e.target),i=t.val();this.$el.find('label[for="'+t.attr("id")+'"]').toggleClass("selected"),t.prop("checked")?this.selectedFields.push(i):this.selectedFields=_.without(this.selectedFields,i)},insertFields:function(e){var t=this,i=this.$(e.target);i.addClass("sui-button-onload"),this.trigger("fields:added",this.selectedFields),setTimeout(function(){i.removeClass("sui-button-onload"),t.closeModal()},500)},closeModal:function(){this.undelegateEvents(),this.stopListening();var e=this.$el.find(".sui-box-selector:not(.hustle-skip)"),t=e.find("input");SUI.dialogs["hustle-dialog--optin-fields"].hide(),e.removeClass("selected"),t.prop("checked",!1),t[0].checked=!1}})}),Hustle.define("Modals.Visibility_Conditions",function(e){"use strict";return Backbone.View.extend({el:"#hustle-dialog--visibility-options",selectedConditions:[],opts:{groupId:0,conditions:[]},events:{"click .sui-box-selector input":"selectConditions","click .hustle-cancel-conditions":"cancelConditions","click .sui-dialog-overlay":"cancelConditions","click #hustle-add-conditions":"addConditions"},initialize:function(e){this.opts=_.extend({},this.opts,e),this.selectedConditions=this.opts.conditions,this.$(".hustle-visibility-condition-option").prop("checked",!1).prop("disabled",!1);var t=!0,i=!1,s=void 0;try{for(var n,o=this.selectedConditions[Symbol.iterator]();!(t=(n=o.next()).done);t=!0){var a=n.value;this.$("#hustle-condition--"+a).prop("checked",!0).prop("disabled",!0)}}catch(e){i=!0,s=e}finally{try{t||null==o.return||o.return()}finally{if(i)throw s}}},selectConditions:function(e){var t=this.$(e.target),i=this.$el.find('label[for="'+t.attr("id")+'"]'),s=t.val();i.toggleClass("selected"),t.prop("checked")?this.selectedConditions.push(s):this.selectedConditions=_.without(this.selectedConditions,s)},cancelConditions:function(){SUI.dialogs["hustle-dialog--visibility-options"].hide()},addConditions:function(e){var t=this,i=this.$(e.target);i.addClass("sui-button-onload"),this.trigger("conditions:added",{groupId:i.data("group_id"),conditions:this.selectedConditions}),setTimeout(function(){SUI.dialogs["hustle-dialog--visibility-options"].hide(),i.removeClass("sui-button-onload"),t.undelegateEvents()},500)}})}),function(e){"use strict";Optin.listingBase=Hustle.View.extend({el:".sui-wrap",logShown:!1,moduleType:"",singleModuleActionNonce:"",_events:{"click .hustle-create-module":"openCreateModal","click .hustle-delete-module-button":"openDeleteModal","click .hustle-module-tracking-reset-button":"openResetTrackingModal","click .hustle-manage-tracking-button":"openManageTrackingModal","click .hustle-import-module-button":"openImportModal","click .hustle-upgrade-modal-button":"openUpgradeModal","click .hustle-single-module-button-action":"handleSingleModuleAction","click .hustle-preview-module-button":"openPreview","click form.sui-bulk-actions .hustle-bulk-apply-button":"bulkActionCheck","click #hustle-dialog--delete .hustle-delete":"bulkActionSend","click #hustle-bulk-action-reset-tracking-confirmation .hustle-delete":"bulkActionSend","click .sui-accordion-item-action .hustle-onload-icon-action":"addLoadingIconToActionsButton"},initialize:function(t){this.events=e.extend(!0,{},this.events,this._events),this.delegateEvents(),this.moduleType=t.moduleType,this.singleModuleActionNonce=optinVars.single_module_action_nonce;var i=Hustle.get("Modals.New_Module"),s=Hustle.get("Modals.ImportModule");new i({moduleType:this.moduleType}),this.ImportModal=new s,e(".sui-accordion-item-header").on("click",e.proxy(this.openTrackingChart,this)),e(".hustle-display-chart").length&&this.openTrackingChart(e(".hustle-display-chart")),this.doActionsBasedOnUrl()},doActionsBasedOnUrl:function(){if("true"===Module.Utils.getUrlParam("create-module")&&setTimeout(function(){e(".hustle-create-module").trigger("click")},100),"true"===Module.Utils.getUrlParam("requires-pro")){var t=this;setTimeout(function(){return t.openUpgradeModal()},100)}if(Module.Utils.getUrlParam("show-notice")){var i="success"===Module.Utils.getUrlParam("show-notice")?"success":"error",s=Module.Utils.getUrlParam("notice"),n=s&&"undefined"!==optinVars.messages.commons[s]?optinVars.messages.commons[s]:Module.Utils.getUrlParam("notice-message");void 0!==n&&n.length&&Module.Notification.open(i,n)}},handleSingleModuleAction:function(e){this.addLoadingIcon(e),Module.handleActions.initAction(e,"listing",this)},actionToggleStatus:function(e,t){var i=t.was_module_enabled,s=e.closest(".sui-accordion-item"),n=s.find(".sui-accordion-item-title span.sui-tag");i?(n.text(n.data("draft")),n.removeClass("sui-tag-blue"),n.attr("data-status","draft")):(n.text(n.data("publish")),n.addClass("sui-tag-blue"),n.attr("data-status","published")),e.find("span").toggleClass("sui-hidden"),s.hasClass("sui-accordion-item--open")&&s.find(".sui-accordion-open-indicator").trigger("click").trigger("click")},actionDisplayError:function(e,t){var i=t.message,s=e.closest(".sui-modal").find(".sui-notice-error");s.find("p").html(i),Module.Utils.accessibleShow(s,!1)},openPreview:function(t){var i=e(t.currentTarget),s=i.data("id"),n=i.data("type");Module.preview.open(s,n)},openTrackingChart:function(t){var i="";if(t.target){if(e(t.target).closest(".sui-accordion-item-action").length)return!0;t.preventDefault(),t.stopPropagation(),i=e(t.currentTarget)}else i=t;var s=i.parent(),n=s.find(".sui-chartjs-animated");if(s.hasClass("sui-accordion-item--disabled")?s.removeClass("sui-accordion-item--open"):s.hasClass("sui-accordion-item--open")?s.removeClass("sui-accordion-item--open"):s.addClass("sui-accordion-item--open"),s.find(".sui-accordion-item-data").addClass("sui-onload"),n.removeClass("sui-chartjs-loaded"),s.hasClass("sui-accordion-item--open")){var o={id:i.data("id"),_ajax_nonce:i.data("nonce"),action:"hustle_tracking_data"};e.ajax({url:ajaxurl,type:"POST",data:o,success:function(e){e.success&&e.data&&(s.find(".sui-accordion-item-body").html(e.data.html),Module.trackingChart.init(s,e.data.charts_data),n=s.find(".sui-chartjs-animated"),SUI.suiTabs()),s.find(".sui-accordion-item-data").removeClass("sui-onload"),n.addClass("sui-chartjs-loaded")},error:function(e){s.find(".sui-accordion-item-data").removeClass("sui-onload"),n.addClass("sui-chartjs-loaded")}})}},getChecked:function(t){var i=".sui-wrap .sui-accordion-item-title input[type=checkbox]";return"checked"===t&&(i+=":checked"),e(i)},bulkActionCheck:function(t){var i=e(t.target),s=i.closest(".hustle-bulk-actions-container").find('select[name="hustle_action"] option:selected').val();if(0===this.getChecked("checked").length||"undefined"===s)return!1;if("delete"===s){var n={actionClass:"hustle-delete",action:"delete",title:i.data("delete-title"),description:i.data("delete-description")};return Module.deleteModal.open(n),!1}if("reset-tracking"===s){var o={actionClass:"hustle-delete",action:"reset-tracking",title:i.data("reset-title"),description:i.data("reset-description")};return Module.deleteModal.open(o),!1}this.bulkActionSend(t,s)},bulkActionSend:function(t,i){t.preventDefault(),this.addLoadingIcon(t);var s=e(".sui-bulk-actions .hustle-bulk-apply-button"),n=i||e(t.target).data("hustle-action"),o=this.getChecked("checked");if(0===o.length)return!1;var a=[];e.each(o,function(){a.push(e(this).val())});var l={ids:a,hustle:n,type:s.data("type"),_ajax_nonce:s.data("nonce"),action:"hustle_listing_bulk"};e.ajax({url:ajaxurl,type:"POST",data:l,success:function(e){e.success?location.reload():SUI.dialogs["hustle-dialog--delete"].hide()}})},addLoadingIcon:function(t){var i=e(t.currentTarget);i.hasClass("sui-button")&&i.addClass("sui-button-onload")},addLoadingIconToActionsButton:function(t){e(t.currentTarget).closest(".sui-accordion-item-action").find(".sui-dropdown-anchor").addClass("sui-button-onload")},openCreateModal:function(t){var i="_page_hustle_sshare_listing";!1===e(t.currentTarget).data("enabled")?this.openUpgradeModal():i!==pagenow.substr(pagenow.length-i.length)?SUI.openModal("hustle-new-module--type","hustle-create-new-module","hustle-new-module--type-close",!1):SUI.openModal("hustle-new-module--create","hustle-create-new-module","hustle-module-name",!1)},openUpgradeModal:function(t){t&&(t.preventDefault(),t.stopPropagation()),e(".sui-button-onload").removeClass("sui-button-onload"),e("#hustle-dialog--upgrade-to-pro").length&&SUI.dialogs["hustle-dialog--upgrade-to-pro"].show()},openDeleteModal:function(t){t.preventDefault();var i=e(t.currentTarget),s={id:i.data("id"),nonce:i.data("nonce"),action:"delete",title:i.data("title"),description:i.data("description"),actionClass:"hustle-single-module-button-action"};Module.deleteModal.open(s)},openImportModal:function(t){!1===e(t.currentTarget).data("enabled")?this.openUpgradeModal():this.ImportModal.open(t)},openResetTrackingModal:function(t){t.preventDefault();var i=e(t.target),s={id:i.data("module-id"),nonce:this.singleModuleActionNonce,action:"reset-tracking",title:i.data("title"),description:i.data("description"),actionClass:"hustle-single-module-button-action"};Module.deleteModal.open(s)},openManageTrackingModal:function(t){var i=Optin.template("hustle-manage-tracking-form-tpl"),s=e("#hustle-dialog--manage-tracking"),n=e(t.currentTarget),o=n.data("module-id"),a={enabledTrackings:n.data("tracking-types").split(",")};s.find("#hustle-manage-tracking-form-container").html(i(a)),s.find("#hustle-button-toggle-tracking-types").data("module-id",o),SUI.dialogs["hustle-dialog--manage-tracking"].show()}})}(jQuery),Hustle.define("Modals.New_Module",function(e){"use strict";return Backbone.View.extend({el:"#hustle-new-module--dialog",data:{},events:{"click #hustle-select-mode":"modeSelected","keypress #hustle-new-module--type":"maybeModeSelected","click #hustle-create-module":"createModule","keypress #hustle-new-module--create":"maybeCreateModule","click #hustle-new-module--create-back":"goToModeStep",'change input[name="mode"]':"modeChanged",'keydown input[name="name"]':"nameChanged"},initialize:function(e){_.extend(this.data,e)},modeChanged:function(t){var i=e(t.target).val();this.data.mode=i,this.$el.find("#hustle-select-mode").prop("disabled",!1)},nameChanged:function(t){var i=this;setTimeout(function(){i.$(".sui-error-message").hide();var s=e(t.target).val();i.data.name=s,0===s.trim().length?(i.$("#hustle-create-module").prop("disabled",!0),i.$("#error-empty-name").closest(".sui-form-field").addClass("sui-form-field-error"),i.$("#error-empty-name").show()):(i.$("#hustle-create-module").prop("disabled",!1),i.$("#error-empty-name").closest(".sui-form-field").removeClass("sui-form-field-error"),i.$("#error-empty-name").hide())},300)},modeSelected:function(e){this.$el.find('input[name="mode"]:checked').trigger("change"),0!==Object.keys(this.data).length&&(SUI.replaceModal("hustle-new-module--create","hustle-create-new-module","hustle-module-name",!1),e.preventDefault())},maybeCreateModule:function(e){13===e.which&&(e.preventDefault(),this.$("#hustle-create-module").click())},maybeModeSelected:function(e){13===e.which&&(e.preventDefault(),this.$("#hustle-select-mode").click())},goToModeStep:function(e){SUI.replaceModal("hustle-new-module--type","hustle-create-new-module","hustle-new-module--type-close",!1),e.preventDefault()},createModule:function(t){var i=e(t.target).closest("#hustle-new-module--create"),s=i.find("#error-saving-settings"),n=i.find("#hustle-create-module"),o=i.data("nonce");if(void 0===this.data.mode&&"social_sharing"!==this.data.moduleType||void 0===this.data.name||0===this.data.name.length)return s.show(),void n.removeClass("sui-button-onload");s.hide(),n.addClass("sui-button-onload"),e.ajax({url:ajaxurl,type:"POST",data:{data:{module_name:this.data.name,module_mode:this.data.mode,module_type:this.data.moduleType},action:"hustle_create_new_module",_ajax_nonce:o}}).done(function(e){e&&e.data&&e.data.redirect_url?window.location.replace(e.data.redirect_url):(s.show(),n.removeClass("sui-button-onload"))}).fail(function(){s.show(),n.removeClass("sui-button-onload")})}})}),Hustle.define("Modals.ImportModule",function(e){"use strict";return Backbone.View.extend({el:"#hustle-dialog--import",events:{"change #hustle-import-file-input":"selectUploadFile","click .sui-upload-file":"changeFile","click .sui-upload-file button":"resetUploadFile","click .hustle-import-check-all-checkbox":"checkAll","change .hustle-module-meta-checkbox":"uncheckAllOption"},initialize:function(){},open:function(t){var i=e(t.currentTarget),s=i.data("module-id"),n=Optin.template("hustle-import-modal-options-tpl"),o=e("#hustle-dialog--import"),a=o.find("#hustle-import-module-submit-button"),l=void 0===s,r={isNew:l,isOptin:"optin"===i.data("module-mode")};o.find("#hustle-import-modal-options").html(n(r)),l?(a.removeAttr("data-module-id"),SUI.tabs(),o.find(".sui-tab-item").on("click",function(){var t=e(this);e("#"+t.data("label-for")).click()})):a.attr("data-module-id",s),SUI.openModal("hustle-dialog--import",t.currentTarget,"hustle-import-file-input",!0)},selectUploadFile:function(t){t.preventDefault();var i=e(t.target).val().replace(/C:\\fakepath\\/i,"");Module.Utils.accessibleHide(e("#hustle-dialog--import .sui-notice-error"),!1),i?(e(".sui-upload-file span:first").text(i),e(".sui-upload").addClass("sui-has_file"),e("#hustle-import-module-submit-button").prop("disabled",!1)):(e(".sui-upload").removeClass("sui-has_file"),e(".sui-upload-file span:first").text(""),e("#hustle-import-module-submit-button").prop("disabled",!0))},resetUploadFile:function(t){t.stopPropagation(),e("#hustle-import-file-input").val("").trigger("change")},changeFile:function(t){e("#hustle-import-file-input").trigger("click")},checkAll:function(t){var i=e(t.currentTarget),s=i.is(":checked");i.closest(".hui-inputs-list").find("input.hustle-module-meta-checkbox:not(.hustle-import-check-all-checkbox)").prop("checked",s)},uncheckAllOption:function(t){var i=e(t.currentTarget).closest(".hui-inputs-list").find(".hustle-import-check-all-checkbox");i.is(":checked")&&i.prop("checked",!1)}})}),Hustle.define("Mixins.Model_Updater",function(e,t,i){"use strict";return{initMix:function(){this.events=_.extend({},this.events,this._events),this.delegateEvents()},_events:{"change textarea":"_updateText",'change input[type="text"]':"_updateText",'change input[type="url"]':"_updateText",'change input[type="hidden"]':"_updateText",'change input[type="number"]':"_updateText",'change input[type="checkbox"]':"_updateCheckbox","change input[type=radio]":"_updateRadios","change select":"_updateSelect"},_updateText:function(t){var i=e(t.target),s=i.data("attribute"),n=this[i.data("model")||"model"],o=_.isTrue(i.data("silent"))?{silent:!0}:{};n&&s&&(t.stopPropagation(),n.set.call(n,s,t.target.value,o))},_updateCheckbox:function(t){var i=e(t.target),s=i.data("attribute"),n=i.val(),o=this[i.data("model")||"model"],a=_.isTrue(i.data("silent"))?{silent:!0}:{};if(o&&s)if(t.stopPropagation(),"on"!==n){var l=o.get.call(o,s);i.is(":checked")?l.push(n):l=_.without(l,n),o.set.call(o,s,l,a)}else o.set.call(o,s,i.is(":checked")?1:0,a)},_updateRadios:function(t){var i=e(t.target),s=i.data("attribute"),n=this[i.data("model")||"model"],o=_.isTrue(i.data("silent"))?{silent:!0}:{};n&&s&&(t.stopPropagation(),n.set.call(n,s,t.target.value,o))},_updateSelect:function(t){var i=e(t.target),s=i.data("attribute"),n=this[i.data("model")||"model"],o=_.isTrue(i.data("silent"))?{silent:!0}:{};n&&s&&(t.stopPropagation(),n.set.call(n,s,i.val(),o))}}}),Hustle.define("Mixins.Module_Settings",function(e,t,i){"use strict";return _.extend({},Hustle.get("Mixins.Model_Updater"),{el:"#hustle-wizard-behaviour",events:{},init:function(e){var t=e.BaseModel.extend({defaults:{},initialize:function(e){_.extend(this,e);var t=Hustle.get("Models.Trigger");this.get("triggers")instanceof Backbone.Model||this.set("triggers",new t(this.triggers),{silent:!0})}});return this.model=new t(optinVars.current.settings||{}),this.moduleType=optinVars.current.data.module_type,this.listenTo(this.model,"change",this.viewChanged),"embedded"!==this.moduleType&&this.listenTo(this.model.get("triggers"),"change",this.viewChanged),this.render(),this},render:function(){},viewChanged:function(e){var t=e.changed;if("on_scroll"in t){var i=this.$("#hustle-on-scroll--scrolled-toggle-wrapper"),s=this.$("#hustle-on-scroll--selector-toggle-wrapper");(i.length||s.length)&&("scrolled"===t.on_scroll?(i.removeClass("sui-hidden"),s.addClass("sui-hidden")):(s.removeClass("sui-hidden"),i.addClass("sui-hidden")))}if("on_submit"in t){var n=this.$("#hustle-on-submit-delay-wrapper");n.length&&("nothing"!==t.on_submit?n.removeClass("sui-hidden"):n.addClass("sui-hidden"))}}})}),Hustle.define("Mixins.Module_Content",function(e,t,i){"use strict";return _.extend({},Hustle.get("Mixins.Model_Updater"),{el:"#hustle-wizard-content",events:{},init:function(e){this.model=new e.BaseModel(optinVars.current.content||{}),this.moduleType=optinVars.current.data.module_type,this.listenTo(this.model,"change",this.modelUpdated),this.render()},render:function(){this.renderFeaturedImage(),"true"===Module.Utils.getUrlParam("new")&&Module.Notification.open("success",optinVars.messages.commons.module_created.replace(/{type_name}/g,optinVars.module_name[this.moduleType]),1e4)},renderFeaturedImage:function(){if(this.$("#wph-wizard-choose_image").length){var e=Hustle.get("Featured_Image_Holder");this.mediaHolder=new e({model:this.model,attribute:"feature_image",moduleType:this.moduleType})}},modelUpdated:function(e){var t=e.changed;"module_name"in t&&this.model.set("module_name",t.module_name,{silent:!0}),"feature_image"in t&&Hustle.Events.trigger("modules.view.feature_image_updated",t)}})}),Hustle.define("Mixins.Module_Design",function(e,t,i){"use strict";return _.extend({},Hustle.get("Mixins.Model_Updater"),{el:"#hustle-wizard-appearance",cssEditor:!1,events:{"click .hustle-css-stylable":"insertSelector","click .hustle-reset-color-palette":"resetPickers"},init:function(t){this.model=new t.BaseModel(optinVars.current.design||{}),this.listenTo(this.model,"change",this.viewChanged),Hustle.Events.off("modules.view.feature_image_updated").on("modules.view.feature_image_updated",e.proxy(this.ViewChangedContentTab,this)),this.render()},render:function(){this.createPickers(),this.addCreatePalettesLink(),this.createEditor(),this.cssChange()},createPickers:function(){var t=this,i=this.$(".sui-colorpicker-input");i.wpColorPicker({change:function(t,i){var s=e(this);s.val()!==i.color.toCSS()&&s.val(i.color.toCSS()).trigger("change")},palettes:["#333333","#FFFFFF","#17A8E3","#E1F6FF","#666666","#AAAAAA","#E6E6E6"]}),i.hasClass("wp-color-picker")&&i.each(function(){var i=e(this),s=i.closest(".sui-colorpicker-wrap"),n=s.find(".sui-colorpicker-value span[role=button]"),o=s.find(".sui-colorpicker-value"),a=o.find("button"),l="hex",r=i.closest(".wp-picker-container"),d=r.find(".wp-color-result"),c=d.find(".color-alpha"),u=r.find(".wp-picker-clear");!0===i.data("alpha")?(l="rgba",i.bind("change",function(){n.find("span").css({"background-color":c.css("background")}),o.find("input").val(i.val())})):i.bind("change",function(){n.find("span").css({"background-color":d.css("background-color")}),o.find("input").val(i.val())}),s.find(".sui-colorpicker").addClass("sui-colorpicker-"+l),s.find(".sui-button, span[role=button]").on("click",function(e){d.click(),e.preventDefault(),e.stopPropagation()}),a.on("click",function(e){var s=i.data("attribute"),a=t.model.get("color_palette"),l=optinVars.palettes[a][s];u.click(),o.find("input").val(l),i.val(l).trigger("change"),n.find("span").css({"background-color":l}),e.preventDefault(),e.stopPropagation()})})},updatePickers:function(e){var t=this;if(void 0!==optinVars.palettes[e]){var i=optinVars.palettes[e];_.each(i,function(e,i){t.$('input[data-attribute="'+i+'"]').val(e).trigger("change")})}},resetPickers:function(t){var i=e(t.target);i.addClass("sui-button-onload").prop("disabled",!0);var s=e('select[data-attribute="color_palette"]').val();this.updatePickers(s),setTimeout(function(){i.removeClass("sui-button-onload").prop("disabled",!1)},500)},addCreatePalettesLink:function(){var e=this.$("#hustle-create-palette-link"),t=this.$(".select-container.hui-select-palette .list-results");t.find(".hui-button").length||t.append(e)},createEditor:function(){this.cssEditor=ace.edit("hustle_custom_css"),this.cssEditor.getSession().setMode("ace/mode/css"),this.cssEditor.$blockScrolling=1/0,this.cssEditor.setTheme("ace/theme/sui"),this.cssEditor.getSession().setUseWrapMode(!0),this.cssEditor.getSession().setUseWorker(!1),this.cssEditor.setShowPrintMargin(!1),this.cssEditor.renderer.setShowGutter(!0),this.cssEditor.setHighlightActiveLine(!0)},updateCustomCss:function(){this.cssEditor&&this.model.set("custom_css",this.cssEditor.getValue())},cssChange:function(){var e=this;this.cssEditor.getSession().on("change",function(){e.model.userHasChange()})},insertSelector:function(t){var i=e(t.target).data("stylable")+"{}";this.cssEditor.navigateFileEnd(),this.cssEditor.insert(i),this.cssEditor.navigateLeft(1),this.cssEditor.focus(),t.preventDefault()},viewChanged:function(e){var t=e.changed;if("form_layout"in t){var i=this.$("#hustle-feature-image-position-option"),s=this.$("#hustle-feature-image-above-label"),n=this.$("#hustle-feature-image-below-label");if(s.length||n.length)if("one"===t.form_layout)s.removeClass("sui-hidden"),n.removeClass("sui-hidden");else{var o=e.get("feature_image_position");"left"!==o&&"right"!==o&&(i.find("input").prop("checked",!1),i.find("#hustle-feature-image-left").prop("checked",!0),this.model.set("feature_image_position","left"),i.find(".sui-tab-item").removeClass("active"),i.find("#hustle-feature-image-left-label").addClass("active")),s.addClass("sui-hidden"),n.addClass("sui-hidden")}}if("color_palette"in t&&this.updatePickers(t.color_palette),"feature_image_horizontal"in t){var a=this.$("#hustle-image-custom-position-horizontal");a.length&&("custom"!==t.feature_image_horizontal?a.prop("disabled",!0):a.prop("disabled",!1))}else if("feature_image_vertical"in t){var l=this.$("#hustle-image-custom-position-vertical");l.length&&("custom"!==t.feature_image_vertical?l.prop("disabled",!0):l.prop("disabled",!1))}},ViewChangedContentTab:function(e){if("feature_image"in e){var t=this.$("#hustle-appearance-feature-image-placeholder"),i=this.$("#hustle-appearance-feature-image-settings");t.length&&i.length&&(e.feature_image?(i.show(),t.hide()):(i.hide(),t.show()))}}})}),Hustle.define("Mixins.Module_Display",function(e,t,i){"use strict";return _.extend({},Hustle.get("Mixins.Model_Updater"),{el:"#hustle-wizard-display",events:{},init:function(e){this.model=new e.BaseModel(optinVars.current.display||{}),this.moduleType=optinVars.current.data.module_type,this.listenTo(this.model,"change",this.viewChanged),this.render()},render:function(){},viewChanged:function(e){}})}),Hustle.define("Mixins.Module_Emails",function(e,t,i){"use strict";return _.extend({},Hustle.get("Mixins.Model_Updater"),{el:"#hustle-wizard-emails",events:{"click .hustle-optin-field--add":"addFields","click .hustle-optin-field--edit":"editField","click .sui-builder-field":"maybeEditField","click .hustle-optin-field--delete":"deleteFieldOnClick","click ul.list-results li":"setFieldOption","click .hustle-optin-field--copy":"duplicateField"},init:function(e){this.model=new e.BaseModel(optinVars.current.emails||{}),this.listenTo(this.model,"change",this.viewChanged),this.render()},render:function(){var t=this.model.get("form_elements");for(var i in t){var s=t[i];t[i]=_.extend({},this.getFieldDefaults(s.type),s),"submit"!==i&&this.addFieldToPanel(t[i])}this.model.set("form_elements",t,{silent:!0});var n=this.$("#hustle-form-fields-container").sortable({axis:"y",containment:".sui-box-builder"});return n.on("sortupdate",e.proxy(this.fieldsOrderChanged,this,n)),this.updateDynamicValueFields(),this},resetDynamicValueFieldsPlaceholders:function(){this.$("select.hustle-field-options").html(""),this.$(".hustle-fields-placeholders-options").length&&this.$(".hustle-fields-placeholders-options").html("")},updateDynamicValueFields:function(){var t=this.model.get("form_elements");for(var i in this.resetDynamicValueFieldsPlaceholders(),t)"submit"!==i&&"recaptcha"!==i&&"gdpr"!==i&&(this.addFieldToDynamicValueFields(t[i]),this.$("select.hustle-field-options").trigger("sui:change"));this.$("div.select-list-container .list-results:empty").each(function(){var t=e(this).closest(".select-container").find("select.hustle-field-options").data("type");e(this).html('<li style="cursor: default; pointer-events: none;">'+optinVars.messages.form_fields.errors.no_fileds_info.replace("{field_type}",t)+"</li>")})},fieldsOrderChanged:function(e){var t=this.model.get("form_elements"),i=e.sortable("toArray",{attribute:"data-field-id"}),s={},n=!0,o=!1,a=void 0;try{for(var l,r=i[Symbol.iterator]();!(n=(l=r.next()).done);n=!0){var d=l.value;s[d]=t[d]}}catch(e){o=!0,a=e}finally{try{n||null==r.return||r.return()}finally{if(o)throw a}}s=_.extend({},s,t),this.model.set("form_elements",s)},viewChanged:function(e){var t=e.changed;if("auto_close_success_message"in t){var i=this.$("#section-auto-close-success-message .sui-row");i.length&&("1"===t.auto_close_success_message?i.removeClass("sui-hidden"):i.addClass("sui-hidden"))}"form_elements"in t&&this.updateDynamicValueFields()},addFields:function(){(new(Hustle.get("Modals.Optin_Fields"))).on("fields:added",e.proxy(this.addNewFields,this)),SUI.dialogs["hustle-dialog--optin-fields"].show()},maybeEditField:function(t){e(t.target).closest(".sui-dropdown").length||this.editField(t)},editField:function(t){var i=e(t.target).closest(".sui-builder-field").data("field-id"),s=this.model.get("form_elements")[i],n=Object.assign({},this.getFieldViewDefaults(s.type),s);new(Hustle.get("Modals.Edit_Field"))({field:s,fieldData:n,model:this.model}).on("field:updated",e.proxy(this.formFieldUpdated,this)),SUI.dialogs["hustle-dialog--edit-field"].show()},formFieldUpdated:function(e,t,i){if(Object.keys(t).length){if("name"in t)return this.addNewFields(e.type,e,i.name),void this.deleteField(i.name);var s=this.$("#hustle-optin-field--"+e.name);if("required"in t){var n=s.find(".sui-error"),o=e.required;_.isTrue(o)?n.show():_.isFalse(o)&&n.hide()}if("label"in t)this.updateDynamicValueFields(),s.find(".hustle-field-label-text").text(e.label)}},deleteFieldOnClick:function(t){var i=e(t.target).closest(".sui-builder-field").data("field-id");this.deleteField(i)},setFieldOption:function(t){var i=e(t.target),s=i.find("span:eq(1)").text();i.closest(".sui-insert-variables").find('input[type="text"]').val(s).trigger("change")},deleteField:function(t){var i=this.$("#hustle-optin-field--"+t),s=Object.assign({},this.model.get("form_elements"));delete s[t],this.model.set("form_elements",s),-1!==jQuery.inArray(t,["gdpr","recaptcha"])?(i.addClass("sui-hidden"),e("#hustle-optin-insert-field--"+t).prop("disabled",!1).prop("checked",!1)):i.remove()},duplicateField:function(t){var i=e(t.target).closest(".sui-builder-field").data("field-id"),s=Object.assign({},this.model.get("form_elements")),n=Object.assign({},s[i]);delete n.name,n.can_delete=!0,this.addNewFields(n.type,n)},addNewFields:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=Object.assign({},this.model.get("form_elements"));if(Array.isArray(e)){var n=!0,o=!1,a=void 0;try{for(var l,r=e[Symbol.iterator]();!(n=(l=r.next()).done);n=!0){var d=l.value,c=this.getFieldDefaults(d);t&&d in t&&_.extend(c,t[d]),this.addFieldToPanel(c),s[c.name]=c}}catch(e){o=!0,a=e}finally{try{n||null==r.return||r.return()}finally{if(o)throw a}}}else{var u=this.getFieldDefaults(e);if(t&&_.extend(u,t),this.addFieldToPanel(u,i),null===i)s[u.name]=u;else{var h=[];jQuery.each(s,function(e,t){h[e]=t,e===i&&(h[u.name]=u)}),s=h}}this.model.set("form_elements",s)},addFieldToDynamicValueFields:function(t){var i=e("<option/>",{value:t.name,"data-content":"{"+t.name+"}"}).text(t.label),s='<li><button value="{'.concat(t.name,'}">').concat(t.label,"</button></li>");this.$('select.hustle-field-options:not([data-type]), select.hustle-field-options[data-type="'+t.type+'"]').append(i),this.$(".hustle-fields-placeholders-options").length&&this.$(".hustle-fields-placeholders-options").append(s)},addFieldToPanel:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=Optin.template("hustle-form-field-row-tpl"),n=this.$("#hustle-form-fields-container");if(t=_.extend({},this.getFieldViewDefaults(t.type),t),-1!==jQuery.inArray(t.type,["gdpr","recaptcha"]))this.$("#hustle-optin-field--"+t.type).removeClass("sui-hidden"),e("#hustle-optin-insert-field--"+t.type).prop("checked",!0).prop("disabled",!0);else if(null===i)n.append(s(t));else{var o=this.$("#hustle-optin-field--"+i);0<o.length?o.after(s(t)):n.append(s(t))}},getNewFieldId:function(e){for(var t=Object.assign({},this.model.get("form_elements")),i=e;i in t&&-1===jQuery.inArray(i,["gdpr","recaptcha","submit"]);)i=e+"-"+Math.floor(99*Math.random());return i},getFieldDefaults:function(e){var t=this.getNewFieldId(e),i={label:optinVars.messages.form_fields.label[e+"_label"],required:"false",css_classes:"",type:e,name:t,required_error_message:optinVars.messages.required_error_message.replace("{field}",e),validation_message:optinVars.messages.validation_message.replace("{field}",e),placeholder:""};switch(e){case"timepicker":i.time_format="12",i.time_hours="9",i.time_minutes="30",i.time_period="am",i.validation_message=optinVars.messages.time_validation_message,i.required_error_message=optinVars.messages.is_required.replace("{field}",i.label),i.validate="false";break;case"datepicker":i.date_format="mm/dd/yy",i.validation_message=optinVars.messages.date_validation_message,i.required_error_message=optinVars.messages.is_required.replace("{field}",i.label),i.validate="false";break;case"recaptcha":i.threshold="0.5",i.version="v2_checkbox",i.recaptcha_type="compact",i.recaptcha_theme="light",i.v2_invisible_theme="light",i.recaptcha_language="automatic",i.v2_invisible_show_badge="1",i.v2_invisible_badge_replacement=optinVars.messages.form_fields.recaptcha_badge_replacement,i.v3_recaptcha_show_badge="1",i.v3_recaptcha_badge_replacement=optinVars.messages.form_fields.recaptcha_badge_replacement,i.validation_message=optinVars.messages.recaptcha_validation_message,i.error_message=optinVars.messages.form_fields.recaptcha_error_message;break;case"gdpr":i.gdpr_message=optinVars.messages.form_fields.gdpr_message,i.required="true",i.required_error_message=optinVars.messages.gdpr_required_error_message;break;case"email":i.validate="true";break;case"url":i.required_error_message=optinVars.messages.url_required_error_message,i.validate="true";break;case"phone":i.validate="false";break;case"hidden":i.default_value="",i.custom_value="";break;case"number":case"text":i.required_error_message=optinVars.messages.cant_empty}return i},getFieldViewDefaults:function(e){var t={required:"false",validated:"false",placeholder_placeholder:optinVars.messages.form_fields.label.placeholder,label_placeholder:"",name_placeholder:"",icon:"send",css_classes:"",type:e,name:e,placeholder:optinVars.messages.form_fields.label[e+"_placeholder"],can_delete:!0,fieldId:this.getNewFieldId(e)};switch(e){case"email":t.icon="mail";break;case"name":t.icon="profile-male";break;case"phone":t.icon="phone";break;case"address":t.icon="pin";break;case"url":t.icon="web-globe-world";break;case"text":t.icon="style-type";break;case"number":t.icon="element-number";break;case"timepicker":t.icon="clock";break;case"datepicker":t.icon="calendar";break;case"recaptcha":t.icon="recaptcha";break;case"gdpr":t.icon="gdpr";break;case"hidden":t.icon="eye-hide"}return t}})}),Hustle.define("Module.IntegrationsView",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),{el:"#hustle-box-section-integrations",events:{"click .connect-integration":"connectIntegration","keypress .connect-integration":"preventEnterKeyFromDoingThings"},init:function(e){this.model=new e.BaseModel(optinVars.current.integrations_settings||{}),this.moduleId=optinVars.current.data.module_id,this.listenTo(Hustle.Events,"hustle:providers:reload",this.renderProvidersTables),this.render()},render:function(){var e=this.$el.find("#hustle-not-connected-providers-section"),t=this.$el.find("#hustle-connected-providers-section");0<e.length&&0<t.length&&this.renderProvidersTables()},renderProvidersTables:function(){var t=this,i={};this.$el.find(".hustle-integrations-display").html('<div class="sui-notice sui-notice-sm sui-notice-loading"><p>'+optinVars.fetching_list+"</p></div>"),i.action="hustle_provider_get_form_providers",i._ajax_nonce=optinVars.providers_action_nonce,i.data={moduleId:this.moduleId},e.post({url:ajaxurl,type:"post",data:i}).done(function(e){if(e&&e.success){var i=t.$el.find("#hustle-integrations-active-integrations"),s=t.$el.find("#hustle-integrations-active-count");t.$el.find("#hustle-not-connected-providers-section").html(e.data.not_connected),t.$el.find("#hustle-connected-providers-section").html(e.data.connected),i.val()!==e.data.list_connected&&i.val(e.data.list_connected).trigger("change"),s.val()!==String(e.data.list_connected_total)&&s.val(e.data.list_connected_total).trigger("change")}}).always(function(){t.$el.find(".sui-box-body").removeClass("sui-block-content-center"),t.$el.find(".sui-notice-loading").remove()})},preventEnterKeyFromDoingThings:function(e){13!==e.which||e.preventDefault()},connectIntegration:function(e){Module.integrationsModal.open(e)}}))}),Hustle.define("Mixins.Module_Visibility",function(e,t,i){"use strict";return _.extend({},Hustle.get("Mixins.Model_Updater"),{el:"#hustle-conditions-group",events:{"click .hustle-add-new-visibility-group":"addNewGroup","click .hustle-choose-conditions":"openConditionsModal","click .hustle-remove-visibility-group":"removeGroup","change .visibility-group-filter-type":"updateAttribute","change .visibility-group-show-hide":"updateAttribute","change .visibility-group-apply-on":"updateGroupApplyOn"},init:function(t){var i=t.BaseModel.extend({defaults:{conditions:""},initialize:function(e){if(_.extend(this,e),!(this.get("conditions")instanceof Backbone.Model)){_.isEmpty(this.get("conditions"))&&_.isArray(this.get("conditions"))&&(this.conditions={});var t=Hustle.get("Model");this.set("conditions",new t(this.conditions),{silent:!0})}}});this.model=new i(optinVars.current.visibility||{}),this.moduleType=optinVars.current.data.module_type,this.activeConditions={},this.render(),e("#hustle-general-conditions").on("click",e.proxy(this.switchConditions,this)),e("#hustle-wc-conditions").on("click",e.proxy(this.switchConditions,this)),this.groupId=""},render:function(){var t=this.model.get("conditions").toJSON();if(e.isEmptyObject(t))this.addNewGroup();else{for(var i in t){var s=this.model.get("conditions."+i);s instanceof Backbone.Model||(_.isEmpty(s)&&_.isArray(s)&&(s={}),s=this.getConditionsGroupModel(s),this.model.set("conditions."+i,s,{silent:!0})),this.addGroupToPanel(s,"render")}this.maybeToggleGroupsBin()}},afterRender:function(){this.bindRemoveConditions()},bindRemoveConditions:function(){e("#hustle-conditions-group .hustle-remove-visibility-condition").off("click").on("click",e.proxy(this.removeCondition,this))},openConditionsModal:function(t){var i=this,s=e(t.currentTarget).data("group-id"),n=this.model.get("conditions."+s),o=void 0!==n?Object.keys(n.toJSON()):[];new(Hustle.get("Modals.Visibility_Conditions"))({groupId:s,conditions:o}).on("conditions:added",e.proxy(i.addNewConditions,i)),this.groupId=s,"done"!==e("html").data("show-was-bind")&&(SUI.dialogs["hustle-dialog--visibility-options"].on("show",function(t){e("#hustle-add-conditions").data("group_id",i.groupId)}),e("html").data("show-was-bind","done")),SUI.dialogs["hustle-dialog--visibility-options"].show()},addNewConditions:function(t){var i=this,s=t.groupId,n=t.conditions,o=this.model.get("conditions."+s);e.each(n,function(e,t){if(o.get(t))return!0;i.addConditionToPanel(t,{},s,o,"new")}),this.bindRemoveConditions(),Hustle.Events.trigger("view.rendered",this)},addGroupToPanel:function(t,i){var s=t.get("group_id"),n=e("#hustle-visibility-conditions-box"),o=Optin.template("hustle-visibility-group-box-tpl")(_.extend({},{groupId:s,apply_on_floating:t.get("apply_on_floating"),apply_on_inline:t.get("apply_on_inline"),apply_on_widget:t.get("apply_on_widget"),apply_on_shortcode:t.get("apply_on_shortcode"),show_or_hide_conditions:t.get("show_or_hide_conditions"),filter_type:t.get("filter_type")}));e(o).insertBefore(n.find(".hustle-add-new-visibility-group")),this.activeConditions[s]={};var a=this,l=t.toJSON();e.each(l,function(e,n){if("object"!==_typeof(n))return!0;a.addConditionToPanel(e,n,s,t,i)})},addConditionToPanel:function(t,i,s,n,o){if(void 0!==Optin.View.Conditions[t]){var a=this.$("#hustle-visibility-group-"+s+" .sui-box-builder-body"),l=new Optin.View.Conditions[t]({type:this.moduleType,model:n,groupId:s,source:o});if(l)return a.find(".sui-builder-field").length||(a.find(".sui-box-builder-message-block").hide(),a.find(".sui-button-dashed").show()),e.isEmptyObject(i)?n.set(t,l.getConfigs()):n.set(t,i),this.activeConditions[s][t]=l,e(l.$el).appendTo(a.find(".sui-builder-fields")),l}},addNewGroup:function(){var t=this.getConditionsGroupModel(),i=(e("#hustle-conditions-group"),t.get("group_id"));this.model.set("conditions."+i,t),this.addGroupToPanel(t,"new"),this.maybeToggleGroupsBin(),Hustle.Events.trigger("view.rendered",this)},switchConditions:function(t){t.preventDefault(),"hustle-wc-conditions"===e(t.currentTarget).prop("id")?(e("#hustle-dialog--visibility-options .general_condition").hide(),e("#hustle-dialog--visibility-options .wc_condition").show()):(e("#hustle-dialog--visibility-options .wc_condition").hide(),e("#hustle-dialog--visibility-options .general_condition").show())},removeGroup:function(t){var i=e(t.currentTarget).data("group-id"),s=this.$("#hustle-visibility-group-"+i);delete this.activeConditions[i],this.model.get("conditions").unset(i),s.remove(),Object.keys(this.activeConditions).length||this.addNewGroup(),this.maybeToggleGroupsBin()},removeCondition:function(t){var i=e(t.currentTarget),s=i.data("condition-id"),n=i.data("group-id"),o=this.$("#hustle-visibility-group-"+n+" .sui-box-builder-body");this.activeConditions[n][s].remove(),delete this.activeConditions[n][s],this.model.get("conditions."+n).unset(s),o.find(".sui-builder-field").length||o.find(".sui-box-builder-message-block").show(),this.bindRemoveConditions()},updateAttribute:function(t){t.stopPropagation();var i=e(t.target),s=i.data("group-id"),n=i.data("group-attribute"),o=i.val();this.model.get("conditions."+s).set(n,o)},updateGroupApplyOn:function(t){t.stopPropagation();var i=e(t.target),s=i.data("group-id"),n=i.data("property"),o=i.is(":checked"),a=this.model.get("conditions."+s);("embedded"===this.moduleType&&-1!==e.inArray(n,["apply_on_inline","apply_on_widget","apply_on_shortcode"])||"social_sharing"===this.moduleType&&-1!==e.inArray(n,["apply_on_floating","apply_on_inline","apply_on_widget","apply_on_shortcode"]))&&a.set(n,o)},getConditionsGroupModel:function(e){if(e)"embedded"!==this.moduleType||e.apply_on_inline&&e.apply_on_widget&&e.apply_on_shortcode?"social_sharing"!==this.moduleType||e.apply_on_floating&&e.apply_on_inline&&e.apply_on_widget&&e.apply_on_shortcode||(e.apply_on_floating||(e.apply_on_floating=!0),e.apply_on_inline||(e.apply_on_inline=!0),e.apply_on_widget||(e.apply_on_widget=!0),e.apply_on_shortcode||(e.apply_on_shortcode=!1)):(e.apply_on_inline||(e.apply_on_inline=!0),e.apply_on_widget||(e.apply_on_widget=!0),e.apply_on_shortcode||(e.apply_on_shortcode=!1));else{var t=(new Date).getTime().toString(16);this.model.get("conditions."+t),e={group_id:t,show_or_hide_conditions:"show",filter_type:"all"},"embedded"===this.moduleType?(e.apply_on_inline=!0,e.apply_on_widget=!0,e.apply_on_shortcode=!1):"social_sharing"===this.moduleType&&(e.apply_on_floating=!0,e.apply_on_inline=!0,e.apply_on_widget=!0,e.apply_on_shortcode=!1)}return new(Hustle.get("Model"))(e)},maybeToggleGroupsBin:function(){var t=this.model.get("conditions"),i=e("#hustle-conditions-group .sui-box-builder-header .hustle-remove-visibility-group");1===Object.keys(t.toJSON()).length?Module.Utils.accessibleHide(i):Module.Utils.accessibleShow(i)}})}),Hustle.define("Mixins.Wizard_View",function(e,t,i){"use strict";return{moduleType:"",el:".sui-wrap",events:{"click .sui-sidenav .sui-vertical-tab a":"sidenav","change select.sui-mobile-nav":"sidenavMobile","click a.hustle-go-to-tab":"sidenav","click a.notify-error-tab":"sidenav","click .hustle-action-save":"saveChanges","click .wpmudev-button-navigation":"doButtonNavigation","change #hustle-module-name":"updateModuleName","click #hustle-preview-module":"previewModule","blur input.sui-form-control":"removeErrorMessage"},init:function(t){return this.setTabsViews(t),Hustle.Events.off("modules.view.switch_status",e.proxy(this.switchStatusTo,this)),Hustle.Events.on("modules.view.switch_status",e.proxy(this.switchStatusTo,this)),e(i).off("popstate",e.proxy(this.updateTabOnPopstate,this)),e(i).on("popstate",e.proxy(this.updateTabOnPopstate,this)),e(document).off("tinymce-editor-init",e.proxy(this.tinymceReady,this)),e(document).on("tinymce-editor-init",e.proxy(this.tinymceReady,this)),void 0!==this._events&&(this.events=e.extend(!0,{},this.events,this._events),this.delegateEvents()),this.renderTabs(),this},setTabsViews:function(e){this.contentView=e.contentView,this.emailsView=e.emailsView,this.designView=e.designView,this.integrationsView=e.integrationsView,this.visibilityView=e.visibilityView,this.settingsView=e.settingsView,this.moduleType=this.model.get("module_type"),"embedded"===this.moduleType&&(this.displayView=e.displayView)},renderTabs:function(){this.contentView.delegateEvents(),this.emailsView.delegateEvents(),this.integrationsView.delegateEvents(),this.designView.delegateEvents(),"embedded"===this.moduleType&&this.displayView.delegateEvents(),this.visibilityView.delegateEvents(),this.visibilityView.afterRender(),this.settingsView.delegateEvents()},sidenav:function(t){t.preventDefault();var i=e(t.target).data("tab");i&&this.goToTab(i,!0)},sidenavMobile:function(t){var i=e(t.currentTarget).val();i&&this.goToTab(i,!0)},goToTab:function(t,i){var s=this.$el.find('a[data-tab="'+t+'"]'),n=s.closest(".sui-vertical-tabs").find(".sui-vertical-tab a"),o=this.$el.find(".sui-box[data-tab]"),a=this.$el.find('.sui-box[data-tab="'+t+'"]');if(i){var l={tabName:t},r=this.model.get("module_id");history.pushState(l,"Hustle "+this.moduleType+" wizard","admin.php?page="+optinVars.current.wizard_page+"&id="+r+"§ion="+t)}n.removeClass("current"),o.hide(),s.addClass("current"),a.show(),e(".sui-wrap-hustle")[0].scrollIntoView()},updateTabOnPopstate:function(e){var t=e.originalEvent.state;t&&this.goToTab(t.tabName)},doButtonNavigation:function(t){t.preventDefault();var i="prev"===e(t.target).data("direction")?"prev":"next",s=this.getNextOrPrevTabName(i);this.goToTab(s,!0)},getNextOrPrevTabName:function(t){var i=e("#hustle-module-wizard-view .sui-sidenav ul li a.current");i.data("tab");return"prev"===t?i.parent().prev().find("a").data("tab"):i.parent().next().find("a").data("tab")},tinymceReady:function(t,i){var s=this;i.on("change",function(){Module.hasChanges||s.contentView.model.userHasChange()}),e("textarea#"+i.id).on("change",function(){Module.hasChanges||s.contentView.model.userHasChange()})},setContentFromTinymce:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if("undefined"!=typeof tinyMCE){var t=tinyMCE.get("main_content"),i=this.$("textarea#main_content"),s="true"===i.attr("aria-hidden")?t.getContent():i.val();this.contentView.model.set("main_content",s,{silent:e});var n=tinyMCE.get("success_message"),o=this.$("textarea#success_message"),a="true"===o.attr("aria-hidden")?n.getContent():o.val();this.emailsView.model.set("success_message",a,{silent:e});var l=tinyMCE.get("email_body"),r=this.$("textarea#email_body"),d="true"===o.attr("aria-hidden")?l.getContent():r.val();this.emailsView.model.set("email_body",d,{silent:e})}},sanitizeData:function(){var e=this.contentView.model.get("cta_url");0!==e.indexOf("mailto:")&&0!==e.indexOf("tel:")&&(/^(f|ht)tps?:\/\//i.test(e)||(e="https://"+e,this.contentView.model.set("cta_url",e,{silent:!0})))},validate:function(){this.designView.updateCustomCss(),this.setContentFromTinymce(!0),this.sanitizeData();var t=this,i=this.$el.find("#hustle-module-wizard-view"),s=i.data("id")?i.data("id"):"-1",n={action:"hustle_validate_module",_ajax_nonce:i.data("nonce"),id:s,module:this.model.toJSON()};return _.extend(n,this.getDataToSave()),e.ajax({url:ajaxurl,type:"POST",data:n,dataType:"json",success:function(i){if(!0===i.success)Module.hasChanges=!1,t.switchStatusTo("saved");else{var s=i.data,n="";void 0!==s.data.icon_error&&(_.each(s.data.icon_error,function(t){e("#hustle-platform-"+t).find(".sui-error-message").show(),e("#hustle-platform-"+t+" .hustle-social-url-field").addClass("sui-form-field-error"),e("#hustle-platform-"+t).not(".sui-accordion-item--open").find(".sui-accordion-open-indicator").click()}),n='<a href="#" data-tab="services" class="notify-error-tab"> Services </a>'),void 0!==s.data.selector_error&&(_.each(s.data.selector_error,function(t){e('input[name="'+t+'_css_selector"]').siblings(".sui-error-message").show(),e('input[name="'+t+'_css_selector"]').parent(".sui-form-field").addClass("sui-form-field-error")}),_.isEmpty(n)||(n+=" and "),n+='<a href="#" data-tab="display" class="notify-error-tab"> Display Options </a>'),n=optinVars.messages.sshare_module_error.replace("{page}",n),Module.Notification.open("error",n,1e9)}}})},save:function(){this.setContentFromTinymce(!0),this.sanitizeData();var t=this,i=this.$el.find("#hustle-module-wizard-view"),s=i.data("id")?i.data("id"):"-1",n={action:"hustle_save_module",_ajax_nonce:i.data("nonce"),id:s,module:this.model.toJSON()};return _.extend(n,this.getDataToSave()),e.ajax({url:ajaxurl,type:"POST",data:n,dataType:"json",success:function(i){if(!0===i.success)Module.hasChanges=!1,t.switchStatusTo("saved");else{var s=i.data,n="";void 0!==s.data.icon_error&&(_.each(s.data.icon_error,function(t){e("#hustle-platform-"+t).find(".sui-error-message").show(),e("#hustle-platform-"+t+" .hustle-social-url-field").addClass("sui-form-field-error"),e("#hustle-platform-"+t).not(".sui-accordion-item--open").find(".sui-accordion-open-indicator").click()}),n='<a href="#" data-tab="services" class="notify-error-tab"> Services </a>'),void 0!==s.data.selector_error&&(_.each(s.data.selector_error,function(t){e('input[name="'+t+'_css_selector"]').siblings(".sui-error-message").show(),e('input[name="'+t+'_css_selector"]').parent(".sui-form-field").addClass("sui-form-field-error")}),_.isEmpty(n)||(n+=" and "),n+='<a href="#" data-tab="display" class="notify-error-tab"> Display Options </a>'),n=optinVars.messages.sshare_module_error.replace("{page}",n),Module.Notification.open("error",n,1e4)}}})},getDataToSave:function(){var e={content:this.contentView.model.toJSON(),emails:this.emailsView.model.toJSON(),design:this.designView.model.toJSON(),integrations_settings:this.integrationsView.model.toJSON(),visibility:this.visibilityView.model.toJSON(),settings:this.settingsView.model.toJSON()};return"embedded"===this.moduleType&&(e.display=this.displayView.model.toJSON()),e},saveChanges:function(t){var i=this,s=this.model.get("active"),n=void 0!==e(t.currentTarget).data("active")&&String(e(t.currentTarget).data("active")),o=!1,a=!1;!1!==n&&("0"===n?i.disableButtonsOnSave("draft"):i.disableButtonsOnSave("publish")),this.validate().done(function(e){if(e.success){!1!==n&&e.success&&(a=!0,"0"!==n&&n!==s&&i.publishingFlow("loading"),n!==s&&(o=!0,i.model.set("active",n,{silent:!0})));var t=i.save();t&&a?t.done(function(e){"string"==typeof e&&(e=JSON.parse(e)),e.success&&o&&i.updateViewOnActiveChange(),"0"!==n&&n!==s&&e.success&&o&&setTimeout(function(){i.publishingFlow("ready")},500)}).always(function(){i.enableSaveButtons()}):i.enableSaveButtons()}else i.switchStatusTo("unsaved"),i.enableSaveButtons()}),t.preventDefault()},updateModuleName:function(t){var i=e(t.target).val();i.length?(this.$("#hustle-module-name-wrapper").removeClass("sui-form-field-error"),this.$("#hustle-module-name-error").hide(),this.model.set("module_name",i)):(this.$("#hustle-module-name-wrapper").addClass("sui-form-field-error"),this.$("#hustle-module-name-error").show())},disableButtonsOnSave:function(e){"draft"===e?this.$("#hustle-draft-button").addClass("sui-button-onload"):"publish"===e&&this.$(".hustle-publish-button").addClass("sui-button-onload"),this.$(".hustle-action-save").prop("disabled",!0),this.$(".wpmudev-button-navigation").prop("disabled",!0)},enableSaveButtons:function(){this.$(".sui-button-onload").removeClass("sui-button-onload"),this.$(".hustle-action-save").prop("disabled",!1),this.$(".wpmudev-button-navigation").prop("disabled",!1)},switchStatusTo:function(e){"saved"===e?(this.$el.find("#hustle-unsaved-changes-status").addClass("sui-hidden"),this.$el.find("#hustle-saved-changes-status").removeClass("sui-hidden")):(this.$el.find("#hustle-unsaved-changes-status").removeClass("sui-hidden"),this.$el.find("#hustle-saved-changes-status").addClass("sui-hidden"))},updateViewOnActiveChange:function(){var e=this.model.get("active"),t="1"===e?optinVars.messages.commons.published:optinVars.messages.commons.draft,i="1"===e?optinVars.messages.commons.unpublish:optinVars.messages.commons.save_draft,s="1"===e?optinVars.messages.commons.save_changes:optinVars.messages.commons.publish;this.$el.find(".sui-status-module .sui-tag").text(t),this.$el.find("#hustle-draft-button .button-text").text(i),this.$el.find(".hustle-publish-button .button-text").text(s)},publishingFlow:function(t){var i=e("#hustle-dialog--publish-flow"),s=i.find(".sui-dialog-content > .sui-box"),n=i.find("#dialogIcon"),o=i.find("#dialogTitle"),a=i.find("#dialogDescription"),l=i.find(".sui-dialog-close"),r=i.find(".sui-dialog-overlay");function d(){n.removeClass("sui-icon-"+s.data("ready-icon")),n.addClass("sui-icon-"+s.data("loading-icon")),"loader"===s.attr("data-loading-icon")&&n.addClass("sui-loading"),o.text(s.data("loading-title")),a.text(s.data("loading-desc")),l.hide()}function c(){SUI.dialogs["hustle-dialog--publish-flow"].hide(),setTimeout(function(){d()},500)}"loading"===t&&(d(),SUI.dialogs["hustle-dialog--publish-flow"].show()),"ready"===t&&(n.removeClass("sui-icon-"+s.data("loading-icon")),n.addClass("sui-icon-"+s.data("ready-icon")),"loader"===s.attr("data-loading-icon")&&n.removeClass("sui-loading"),o.text(s.data("ready-title")),a.text(s.data("ready-desc")),l.show(),o.focus(),r.on("click",function(){c()}),l.on("click",function(){c()}))},removeErrorMessage:function(t){if(t.target.value){var i=e(t.target).parent(".sui-form-field");i.removeClass("sui-form-field-error"),i.find(".sui-error-message").hide()}},previewModule:function(t){t.preventDefault(),this.setContentFromTinymce(!0),this.sanitizeData();var i=e(t.currentTarget),s=this.model.get("module_id"),n=this.model.get("module_type"),o=_.extend({},this.model.toJSON(),this.getDataToSave());i.addClass("sui-button-onload"),Module.preview.open(s,n,o)}}}),function(e){"use strict";var t;Optin.View.Conditions=Optin.View.Conditions||{},t=Hustle.View.extend({conditionId:"",className:"sui-builder-field sui-accordion-item sui-accordion-item--open",_template:Optin.template("hustle-visibility-rule-tpl"),template:!1,_defaults:{typeName:"",conditionName:""},_events:{"change input":"changeInput","change textarea":"changeInput","change select":"changeInput"},init:function(t){return this.undelegateEvents(),this.$el.removeData().unbind(),this.type=t.type,this.groupId=t.groupId,this.filter_type=t.filter_type,this.id=this.conditionId,this.template=void 0!==this.cpt?Optin.template("hustle-visibility-rule-tpl--post_type"):Optin.template("hustle-visibility-rule-tpl--"+this.conditionId),this._defaults={typeName:optinVars.messages.settings[this.type]?optinVars.messages.settings[this.type]:this.type,conditionName:optinVars.messages.conditions[this.conditionId]?optinVars.messages.conditions[this.conditionId]:this.conditionId,groupId:this.groupId,id:this.conditionId,source:t.source},this.data=this.getData(),this.render(),this.events=e.extend(!0,{},this.events,this._events),this.delegateEvents(),this.onInit&&_.isFunction(this.onInit)&&this.onInit.apply(this,arguments),this},getData:function(){return _.extend({},this._defaults,this.defaults(),this.model.get(this.conditionId),{type:this.type})},getTitle:function(){return this.title.replace("{type_name}",this.data.typeName)},getBody:function(){return"function"==typeof this.body?this.body.apply(this,arguments):this.body.replace("{type_name}",this.data.typeName)},getHeader:function(){return this.header},countLines:function(e){return e.replace(/\s+$/g,"").split("\n").length},render:function(){this.setProperties();var t=this._template(_.extend({},{title:this.getTitle(),body:this.getBody(),header:this.getHeader()},this._defaults,{type:this.type}));return this.$el.html(""),this.$el.html(t),e(".wph-conditions--box .wph-conditions--item:not(:last-child)").removeClass("wph-conditions--open").addClass("wph-conditions--closed"),e(".wph-conditions--box .wph-conditions--item:not(:last-child) section").hide(),this.rendered&&"function"==typeof this.rendered&&this.rendered.apply(this,arguments),this},updateAttribute:function(e,t){this.data=this.model.get(this.conditionId),this.data[e]=t,this.model.set(this.conditionId,this.data),this.model.trigger("change")},getAttribute:function(e){var t=this.model.get(this.conditionId);return!(!t||!t[e])&&t[e]},refreshLabel:function(){var e=this.getHeader();this.$el.find(".wph-condition--preview").html(""),this.$el.find(".sui-accordion-item-header .sui-tag").html(e)},changeInput:function(t){var i,s=t.target,n=s.getAttribute("data-attribute"),o=e(s),a=o.is(".sui-select")?o.val():t.target.value;return t.stopImmediatePropagation(),o.is(":checkbox")&&(a=o.is(":checked")),!o.is(".select2-search__field")&&(i=this.updateAttribute(n,a),this.refreshLabel(),i)},getConfigs:function(){return this.defaults()||!0}});var i=function(t){e(".wph-conditions--items").data("select2ScrollPosition",{})},s={events:{'change input[type="radio"]':"setCurrentLi"},setCurrentLi:function(t){var i=e(t.target),s=i.closest("li");s.siblings().removeClass("current"),s.toggleClass("current",i.is(":checked"))}};Optin.View.Conditions.posts=t.extend(_.extend({},s,{conditionId:"posts",setProperties:function(){this.title=optinVars.messages.conditions.posts},defaults:function(){return{filter_type:"except",posts:[]}},onInit:function(){},getHeader:function(){return this.getAttribute("posts").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("posts").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".hustle-select-ajax").SUIselect2({tags:"true",width:"100%",dropdownCssClass:"sui-select-dropdown",ajax:{url:ajaxurl,delay:250,dataType:"json",type:"POST",data:function(e){return{action:"get_new_condition_ids",search:e.term,postType:"post"}},processResults:function(e){return{results:e.data}},cache:!0},createTag:function(){return!1}}).on("select2:selecting",i).on("select2:unselecting",i)}})),Optin.View.Conditions.pages=t.extend(_.extend({},s,{conditionId:"pages",setProperties:function(){this.title=optinVars.messages.conditions.pages},defaults:function(){return{filter_type:"except",pages:[]}},onInit:function(){},getHeader:function(){return this.getAttribute("pages").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("pages").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".hustle-select-ajax").SUIselect2({tags:"true",width:"100%",dropdownCssClass:"sui-select-dropdown",ajax:{url:ajaxurl,delay:250,dataType:"json",type:"POST",data:function(e){return{action:"get_new_condition_ids",search:e.term,postType:"page"}},processResults:function(e){return{results:e.data}},cache:!0},createTag:function(){return!1}}).on("select2:selecting",i).on("select2:unselecting",i)}})),optinVars.post_types&&_.each(optinVars.post_types,function(e,n){Optin.View.Conditions[e.name]=t.extend(_.extend({},s,{conditionId:e.name,cpt:!0,setProperties:function(){this.title=e.label},defaults:function(){return{filter_type:"except",selected_cpts:[],postType:n,postTypeLabel:e.label}},getHeader:function(){return this.getAttribute("selected_cpts").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("selected_cpts").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".hustle-select-ajax").SUIselect2({tags:"true",width:"100%",dropdownCssClass:"sui-select-dropdown",ajax:{url:ajaxurl,delay:250,dataType:"json",type:"POST",data:function(e){return{action:"get_new_condition_ids",search:e.term,postType:n}},processResults:function(e){return{results:e.data}},cache:!0},createTag:function(){return!1}}).on("select2:selecting",i).on("select2:unselecting",i)}}))}),Optin.View.Conditions.categories=t.extend(_.extend({},s,{conditionId:"categories",setProperties:function(){this.title=optinVars.messages.conditions.categories},defaults:function(){return{filter_type:"except",categories:[]}},onInit:function(){},getHeader:function(){return this.getAttribute("categories").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("categories").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".hustle-select-ajax").SUIselect2({tags:"true",width:"100%",dropdownCssClass:"sui-select-dropdown",ajax:{url:ajaxurl,delay:250,dataType:"json",type:"POST",data:function(e){return{action:"get_new_condition_ids",search:e.term,postType:"category"}},processResults:function(e){return{results:e.data}},cache:!0},createTag:function(){return!1}}).on("select2:selecting",i).on("select2:unselecting",i)}})),Optin.View.Conditions.tags=t.extend(_.extend({},s,{conditionId:"tags",setProperties:function(){this.title=optinVars.messages.conditions.tags},defaults:function(){return{filter_type:"except",tags:[]}},onInit:function(){},getHeader:function(){return this.getAttribute("tags").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("tags").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".hustle-select-ajax").SUIselect2({width:"100%",tags:"true",dropdownCssClass:"sui-select-dropdown",ajax:{url:ajaxurl,delay:250,dataType:"json",type:"POST",data:function(e){return{action:"get_new_condition_ids",search:e.term,postType:"tag"}},processResults:function(e){return{results:e.data}},cache:!0},createTag:function(){return!1}}).on("select2:selecting",i).on("select2:unselecting",i)}})),Optin.View.Conditions.visitor_logged_in_status=t.extend({conditionId:"visitor_logged_in_status",setProperties:function(){this.title=optinVars.messages.conditions.visitor_logged_in},defaults:function(){return{show_to:"logged_in"}},getHeader:function(){return this.getAttribute("show_to").length&&"logged_out"===this.getAttribute("show_to")?optinVars.messages.condition_labels.logged_out:optinVars.messages.condition_labels.logged_in},body:function(){return this.template(this.getData())}}),Optin.View.Conditions.shown_less_than=t.extend({conditionId:"shown_less_than",setProperties:function(){this.title=optinVars.messages.conditions.shown_less_than},defaults:function(){return{less_or_more:"less_than",less_than:""}},getHeader:function(){return 0<this.getAttribute("less_than")?"less_than"===this.getAttribute("less_or_more")?optinVars.messages.condition_labels.number_views.replace("{number}",this.getAttribute("less_than")):optinVars.messages.condition_labels.number_views_more.replace("{number}",this.getAttribute("less_than")):optinVars.messages.condition_labels.any},body:function(){return this.template(this.getData())}}),Optin.View.Conditions.visitor_device=t.extend({conditionId:"visitor_device",setProperties:function(){this.title=optinVars.messages.conditions.only_on_mobile},defaults:function(){return{filter_type:"mobile"}},getHeader:function(){return"not_mobile"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.desktop_only:optinVars.messages.condition_labels.mobile_only},body:function(){return this.template(this.getData())}}),Optin.View.Conditions.from_referrer=t.extend({conditionId:"from_referrer",disable:["from_referrer"],setProperties:function(){this.title=optinVars.messages.conditions.from_specific_ref},defaults:function(){return{filter_type:"true",refs:""}},getHeader:function(){var e=0;return this.getAttribute("refs").length&&(e=this.countLines(this.getAttribute("refs"))),e?("false"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.except_these:optinVars.messages.condition_labels.only_these).replace("{number}",e):"false"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.any:optinVars.messages.condition_labels.none},body:function(){return this.template(this.getData())}}),Optin.View.Conditions.source_of_arrival=t.extend({conditionId:"source_of_arrival",setProperties:function(){this.title=optinVars.messages.conditions.from_search_engine},defaults:function(){return{source_direct:"false",source_external:"false",source_internal:"false",source_not_search:"false",source_search:"false"}},getHeader:function(){var e=0,t=_.isTrue(this.getAttribute("source_direct"))&&++e,i=_.isTrue(this.getAttribute("source_external"))&&++e,s=_.isTrue(this.getAttribute("source_internal"))&&++e,n=_.isTrue(this.getAttribute("source_search"))&&++e,o=_.isTrue(this.getAttribute("source_not_search"))&&++e;return n&&o||t&&s&&i?optinVars.messages.condition_labels.any:e?optinVars.messages.condition_labels.any_conditions.replace("{number}",e):optinVars.messages.condition_labels.any},body:function(){return this.template(this.getData())}}),Optin.View.Conditions.on_url=t.extend({conditionId:"on_url",setProperties:function(){this.title=optinVars.messages.conditions.on_specific_url},defaults:function(){return{filter_type:"except",urls:""}},getHeader:function(){var e=0;return this.getAttribute("urls").length&&(e=this.countLines(this.getAttribute("urls"))),e?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",e):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())}}),Optin.View.Conditions.on_browser=t.extend({conditionId:"on_browser",setProperties:function(){this.title=optinVars.messages.conditions.on_specific_browser},defaults:function(){return{browsers:"",filter_type:"except"}},getHeader:function(){return this.getAttribute("browsers").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("browsers").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".sui-select").val(this.getAttribute("browsers")).SUIselect2().on("select2:selecting",i).on("select2:unselecting",i)}}),Optin.View.Conditions.visitor_commented=t.extend({conditionId:"visitor_commented",setProperties:function(){this.title=optinVars.messages.conditions.visitor_has_never_commented},defaults:function(){return{filter_type:"true"}},getHeader:function(){return"false"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.false:optinVars.messages.condition_labels.true},body:function(){return this.template(this.getData())}}),Optin.View.Conditions.user_roles=t.extend({conditionId:"user_roles",setProperties:function(){this.title=optinVars.messages.conditions.on_specific_roles},defaults:function(){return{roles:"",filter_type:"except"}},getHeader:function(){return this.getAttribute("roles").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("roles").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".sui-select").val(this.getAttribute("roles")).SUIselect2().on("select2:selecting",i).on("select2:unselecting",i)}}),Optin.View.Conditions.page_templates=t.extend({conditionId:"page_templates",setProperties:function(){this.title=optinVars.messages.conditions.on_specific_templates},defaults:function(){return{templates:"",filter_type:"except"}},getHeader:function(){return this.getAttribute("templates").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("templates").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".sui-select").val(this.getAttribute("templates")).SUIselect2().on("select2:selecting",i).on("select2:unselecting",i)}}),Optin.View.Conditions.user_registration=t.extend({conditionId:"user_registration",setProperties:function(){this.title=optinVars.messages.conditions.user_registration},defaults:function(){return{from_date:0,to_date:0}},getHeader:function(){return(0<this.getAttribute("from_date")?optinVars.messages.condition_labels.reg_date.replace("{number}",this.getAttribute("from_date")):optinVars.messages.condition_labels.immediately)+" - "+(0<this.getAttribute("to_date")?optinVars.messages.condition_labels.reg_date.replace("{number}",this.getAttribute("to_date")):optinVars.messages.condition_labels.forever)},body:function(){return this.template(this.getData())}}),Optin.View.Conditions.visitor_country=t.extend({conditionId:"visitor_country",setProperties:function(){this.title=optinVars.messages.conditions.not_in_a_country},defaults:function(){return{countries:"",filter_type:"except"}},getHeader:function(){return this.getAttribute("countries").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("countries").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".sui-select").val(this.getAttribute("countries")).SUIselect2().on("select2:selecting",i).on("select2:unselecting",i)}}),Optin.View.Conditions.wp_conditions=t.extend({conditionId:"wp_conditions",setProperties:function(){this.title=optinVars.messages.conditions.wp_conditions},defaults:function(){return{wp_conditions:"",filter_type:"except"}},getHeader:function(){return this.getAttribute("wp_conditions").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("wp_conditions").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".sui-select").val(this.getAttribute("wp_conditions")).SUIselect2().on("select2:selecting",i).on("select2:unselecting",i)}}),Optin.View.Conditions.archive_pages=t.extend({conditionId:"archive_pages",setProperties:function(){this.title=optinVars.messages.conditions.archive_pages},defaults:function(){return{archive_pages:"",filter_type:"except"}},getHeader:function(){return this.getAttribute("archive_pages").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("archive_pages").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".sui-select").val(this.getAttribute("archive_pages")).SUIselect2().on("select2:selecting",i).on("select2:unselecting",i)}}),Optin.View.Conditions.wc_pages=t.extend(_.extend({},s,{conditionId:"wc_pages",setProperties:function(){this.title=optinVars.messages.conditions.wc_pages},defaults:function(){return{filter_type:"all"}},getHeader:function(){return"none"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())}})),Optin.View.Conditions.wc_categories=t.extend(_.extend({},s,{conditionId:"wc_categories",setProperties:function(){this.title=optinVars.messages.conditions.wc_categories},defaults:function(){return{filter_type:"except",wc_categories:[]}},onInit:function(){},getHeader:function(){return this.getAttribute("wc_categories").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("wc_categories").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".hustle-select-ajax").SUIselect2({tags:"true",width:"100%",dropdownCssClass:"sui-select-dropdown",ajax:{url:ajaxurl,delay:250,dataType:"json",type:"POST",data:function(e){return{action:"get_new_condition_ids",search:e.term,postType:"wc_category"}},processResults:function(e){return{results:e.data}},cache:!0},createTag:function(){return!1}}).on("select2:selecting",i).on("select2:unselecting",i)}})),Optin.View.Conditions.wc_tags=t.extend(_.extend({},s,{conditionId:"wc_tags",setProperties:function(){this.title=optinVars.messages.conditions.wc_tags},defaults:function(){return{filter_type:"except",wc_tags:[]}},onInit:function(){},getHeader:function(){return this.getAttribute("wc_tags").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("wc_tags").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".hustle-select-ajax").SUIselect2({tags:"true",width:"100%",dropdownCssClass:"sui-select-dropdown",ajax:{url:ajaxurl,delay:250,dataType:"json",type:"POST",data:function(e){return{action:"get_new_condition_ids",search:e.term,postType:"wc_tag"}},processResults:function(e){return{results:e.data}},cache:!0},createTag:function(){return!1}}).on("select2:selecting",i).on("select2:unselecting",i)}})),Optin.View.Conditions.wc_archive_pages=t.extend({conditionId:"wc_archive_pages",setProperties:function(){this.title=optinVars.messages.conditions.wc_archive_pages},defaults:function(){return{wc_archive_pages:"",filter_type:"except"}},getHeader:function(){return this.getAttribute("wc_archive_pages").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("wc_archive_pages").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".sui-select").val(this.getAttribute("wc_archive_pages")).SUIselect2().on("select2:selecting",i).on("select2:unselecting",i)}}),Optin.View.Conditions.wc_static_pages=t.extend({conditionId:"wc_static_pages",setProperties:function(){this.title=optinVars.messages.conditions.wc_static_pages},defaults:function(){return{wc_static_pages:"",filter_type:"except"}},getHeader:function(){return this.getAttribute("wc_static_pages").length?("only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.only_these:optinVars.messages.condition_labels.except_these).replace("{number}",this.getAttribute("wc_static_pages").length):"only"===this.getAttribute("filter_type")?optinVars.messages.condition_labels.none:optinVars.messages.condition_labels.all},body:function(){return this.template(this.getData())},rendered:function(){this.$(".sui-select").val(this.getAttribute("wc_static_pages")).SUIselect2().on("select2:selecting",i).on("select2:unselecting",i)}}),e(document).trigger("hustleAddViewConditions",[t])}(jQuery),Hustle.define("Settings.Palettes",function(e){"use strict";return Backbone.View.extend({el:"#palettes-box",events:{"click .hustle-create-palette":"openCreatePaletteModal","click .hustle-delete-button":"openDeletePaletteModal","click .hustle-button-delete":"delettePalette"},initialize:function(){var e=Hustle.get("Settings.Palettes_Modal");this.paletteModal=new e},openCreatePaletteModal:function(e){this.paletteModal.open(e)},openDeletePaletteModal:function(t){t.preventDefault();var i=e(t.currentTarget),s={id:i.data("id"),title:i.data("title"),description:i.data("description"),action:"delete",nonce:i.data("nonce"),actionClass:"hustle-button-delete"};Module.deleteModal.open(s),e(".hustle-button-delete").on("click",e.proxy(this.delettePalette,this))},delettePalette:function(t){t.preventDefault();var i=e(t.currentTarget),s=i.data("form-id"),n=i.data(),o=e("#"+s),a=new FormData(o[0]);e.each(n,function(e,t){return a.append(e,t)}),a.append("_ajax_nonce",optinVars.settings_palettes_action_nonce),a.append("action","hustle_handle_palette_actions"),e.ajax({url:ajaxurl,type:"POST",data:a,contentType:!1,processData:!1}).done(function(t){t.data.url?location.replace(t.data.url):t.data.notification&&Module.Notification.open(t.data.notification.status,t.data.notification.message,t.data.notification.delay),t.data.url||e(".sui-button-onload").removeClass("sui-button-onload")}).error(function(){Module.Notification.open("error",optinVars.messages.commons.generic_ajax_error),e(".sui-button-onload").removeClass("sui-button-onload")})}})}),Hustle.define("Settings.Data_Settings",function(e){"use strict";return Backbone.View.extend({el:"#data-box",events:{"click #hustle-dialog-open--reset-data-settings":"dataDialog"},dataDialog:function(t){var i=this.$(t.target),s=e("#hustle-dialog--reset-data-settings"),n=s.find("#dialogTitle"),o=s.find("#dialogDescription");n.text(i.data("dialog-title")),o.text(i.data("dialog-info")),SUI.dialogs["hustle-dialog--reset-data-settings"].show(),t.preventDefault(),e("#hustle-reset-settings").on("click",e.proxy(this.settingsReset))},settingsReset:function(t){var i=e(t.currentTarget),s=i.closest(".sui-dialog"),n=s.find("button, .sui-button");n.prop("disabled",!0),i.addClass("sui-button-onload"),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_reset_settings",_ajax_nonce:i.data("nonce")},success:function(){e("#"+i.data("notice")).show(),SUI.dialogs[s.attr("id")].hide(),i.removeClass("sui-button-onload"),n.prop("disabled",!1),Module.Notification.open("success",optinVars.messages.settings_was_reset),window.setTimeout(function(){return location.reload(!0)},2e3)},error:function(){SUI.dialogs[s.attr("id")].hide(),i.removeClass("sui-button-onload"),n.prop("disabled",!1),Module.Notification.open("error",optinVars.messages.something_went_wrong)}})}})}),Hustle.define("Settings.Palettes_Modal",function(e){"use strict";return Backbone.View.extend({el:"#hustle-dialog--edit-palette",events:{"click .hustle-button-action":"handleAction","click .hustle-cancel-palette":"closeCreatePaletteModal","change #hustle-palette-module-type":"updateModulesOptions"},initialize:function(){},open:function(t){void 0!==e(t.currentTarget).data("slug")?this.handleAction(t):(this.$("#hustle-palette-module-type").trigger("change"),SUI.openModal("hustle-dialog--edit-palette",t.currentTarget,"hustle-palette-name",!1))},handleAction:function(t){t.preventDefault();var i=this,s=e(t.currentTarget),n=s.data("form-id"),o=s.data();s.addClass("sui-button-onload"),Module.Utils.accessibleHide(this.$(".sui-error-message"));var a=new FormData,l=!1;if(void 0!==n){var r=e("#"+n);r.length&&(a=new FormData(r[0]),r.find(".hustle-required-field").each(function(t,i){var s=e(i);if(!s.val().trim().length){var n=s.data("error-message"),o=s.siblings(".sui-error-message");o.html(n),Module.Utils.accessibleShow(o),l=!0}}))}l?e(".sui-button-onload").removeClass("sui-button-onload"):(e.each(o,function(e,t){return a.append(e,t)}),a.append("_ajax_nonce",optinVars.settings_palettes_action_nonce),a.append("action","hustle_handle_palette_actions"),e.ajax({url:ajaxurl,type:"POST",data:a,contentType:!1,processData:!1}).done(function(s){s.data.callback&&"function"==typeof i[s.data.callback]?i[s.data.callback](s.data,s.success,t):s.data.url?location.replace(s.data.url):s.data.notification&&Module.Notification.open(s.data.notification.status,s.data.notification.message,s.data.notification.delay),s.data.url||e(".sui-button-onload").removeClass("sui-button-onload")}).error(function(t){e(".sui-button-onload").removeClass("sui-button-onload")}))},actionOpenEditPalette:function(t,i,s){this.actionGoToSecondStep(t),SUI.openModal("hustle-dialog--edit-palette",s.currentTarget,"hustle-palette-name",!1),t.palette_data.name&&e("#hustle-dialog--edit-palette").find("#hustle-palette-name").val(t.palette_data.name)},actionGoToSecondStep:function(e){var t=this.$("#hustle-edit-palette-first-step"),i=this.$("#hustle-edit-palette-second-step"),s=this.$(".hustle-button-action"),n=e.palette_data,o=Optin.template("hustle-dialog--edit-palette-tpl");Module.Utils.accessibleHide(t,!0),i.html(o(n)),this.initiateSecondStepElements(),Module.Utils.accessibleShow(i,!0),i.focus(),s.data("step",3),s.addClass("sui-button-blue"),Module.Utils.accessibleHide(s.find("#hustle-step-button-text")),Module.Utils.accessibleShow(s.find("#hustle-finish-button-text"))},initiateSecondStepElements:function(){this.$(".sui-accordion").each(function(){SUI.suiAccordion(this)}),SUI.suiTabs(),SUI.tabs(),this.createPickers()},closeCreatePaletteModal:function(){var e=this,t=this.$("#hustle-edit-palette-first-step"),i=this.$("#hustle-edit-palette-second-step"),s=this.$(".hustle-button-action");SUI.closeModal(),setTimeout(function(){Module.Utils.accessibleHide(e.$(".sui-error-message")),Module.Utils.accessibleHide(i,!0),i.html(""),Module.Utils.accessibleShow(t,!0),s.removeClass("sui-button-blue"),s.data("step",2),Module.Utils.accessibleShow(s.find("#hustle-step-button-text")),Module.Utils.accessibleHide(s.find("#hustle-finish-button-text"))},500)},createPickers:function(){var t=this.$(".sui-colorpicker-input");t.wpColorPicker({change:function(t,i){var s=e(this);s.val()!==i.color.toCSS()&&s.val(i.color.toCSS()).trigger("change")},palettes:["#333333","#FFFFFF","#17A8E3","#E1F6FF","#666666","#AAAAAA","#E6E6E6"]}),t.hasClass("wp-color-picker")&&t.each(function(){var t=e(this),i=t.closest(".sui-colorpicker-wrap"),s=i.find(".sui-colorpicker-value span[role=button]"),n=i.find(".sui-colorpicker-value"),o=n.find("button"),a="hex",l=t.closest(".wp-picker-container"),r=l.find(".wp-color-result"),d=r.find(".color-alpha"),c=l.find(".wp-picker-clear");!0===t.data("alpha")?(a="rgba",t.bind("change",function(){s.find("span").css({"background-color":d.css("background")}),n.find("input").val(t.val())})):t.bind("change",function(){s.find("span").css({"background-color":r.css("background-color")}),n.find("input").val(t.val())}),i.find(".sui-colorpicker").addClass("sui-colorpicker-"+a),i.find(".sui-button, span[role=button]").on("click",function(e){r.click(),e.preventDefault(),e.stopPropagation()}),o.on("click",function(i){var o=t.data("attribute"),a=e("#hustle-palette-module-fallback").val(),l=optinVars.palettes[a][o];c.click(),n.find("input").val(l),t.val(l).trigger("change"),s.find("span").css({"background-color":l}),i.preventDefault(),i.stopPropagation()})})},updateModulesOptions:function(t){var i=e(t.currentTarget).val(),s=this.$("#hustle-palette-module-name"),n="";e.each(optinVars.current[i],function(e,t){n+='<option value="'.concat(e,'">').concat(t,"</option>")}),s.html(n),this.$(".sui-select:not(.hustle-select-ajax)").SUIselect2({dropdownCssClass:"sui-select-dropdown"})}})}),Hustle.define("Settings.Permissions_View",function(e){"use strict";return Backbone.View.extend({el:"#permissions-box",initialize:function(){e(function(){function t(){e(".select2-selection__rendered li:first-child .select2-selection__choice__remove").off("click").text("").on("click",function(e){e.stopImmediatePropagation(),e.preventDefault()})}e("select").on("change.select2",function(e){t()}),t()})}})}),Hustle.define("Settings.Privacy_Settings",function(e){"use strict";return Backbone.View.extend({el:"#privacy-box",events:{"click #hustle-dialog-open--delete-ips":"openDeleteIpsDialog"},initialize:function(){e("#hustle-delete-ips-submit").on("click",this.handleIpDeletion)},openDeleteIpsDialog:function(e){SUI.dialogs["hustle-dialog--delete-ips"].show(),e.preventDefault()},handleIpDeletion:function(t){t.preventDefault();var i=e(t.currentTarget),s=i.closest(".sui-dialog"),n=e("#"+i.data("formId")),o=new FormData(n[0]);o.append("action","hustle_remove_ips"),o.append("_ajax_nonce",i.data("nonce")),i.addClass("sui-button-onload"),e.ajax({url:ajaxurl,type:"POST",data:o,contentType:!1,processData:!1,success:function(t){Module.Notification.open("success",t.data.message),SUI.dialogs[s.attr("id")].hide(),e(".sui-button-onload").removeClass("sui-button-onload")},error:function(){SUI.dialogs[s.attr("id")].hide(),e(".sui-button-onload").removeClass("sui-button-onload"),Module.Notification.open("error",optinVars.messages.something_went_wrong)}})}})}),Hustle.define("Settings.reCaptcha_Settings",function(e){"use strict";return Backbone.View.extend({el:"#recaptcha-box",data:{},initialize:function(){this.maybeRenderRecaptchas()},maybeRenderRecaptchas:function(){for(var t=this,i=this,s=!1,n=function(){var n=a[o],l=t.$("#hustle-modal-recaptcha-".concat(n,"-0")),r=t.$('input[name="'.concat(n,'_site_key"]')).val().trim(),d=t.$('input[name="'.concat(n,'_secret_key"]')).val().trim();r&&d?(l.data("sitekey",r),s?HUI.maybeRenderRecaptcha(l.closest(".sui-form-field")):e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_load_recaptcha_preview"}}).done(function(e){e.success&&(s=!0,i.$("#hustle-recaptcha-script-container").html(e.data),setTimeout(function(){return HUI.maybeRenderRecaptcha(l.closest(".sui-form-field"))},1e3))}),t.$(".hustle-recaptcha-".concat(n,"-preview-notice")).hide(),l.show()):(t.$(".hustle-recaptcha-".concat(n,"-preview-notice")).show(),l.hide())},o=0,a=["v2_checkbox","v2_invisible","v3_recaptcha"];o<a.length;o++)n()}})}),Hustle.define("Settings.Top_Metrics_View",function(e,t,i){"use strict";return Backbone.View.extend({el:"#top-metrics-box",events:{"click .sui-checkbox input":"maybeDisableInputs"},initialize:function(){this.maybeDisableInputs()},maybeDisableInputs:function(){var e=this.$el.find("input:checked"),t=this.$el.find("input:not(:checked)"),i=this.$el.find('button[type="submit"]'),s=i.parent(),n=t.next("span");3<=e.length?(t.prop("disabled",!0),n.addClass("sui-tooltip"),n.css("opacity","1"),i.prop("disabled",!1),s.removeClass("sui-tooltip")):(i.prop("disabled",!0),t.prop("disabled",!1),n.removeClass("sui-tooltip"),n.css("opacity",""),s.addClass("sui-tooltip"))}})}),function(e,t){"use strict";e(document).on("click",".wpoi-listing-wrap header.can-open .toggle, .wpoi-listing-wrap header.can-open .toggle-label",function(e){e.stopPropagation()}),e(".accordion header .optin-delete-optin, .accordion header .edit-optin, .wpoi-optin-details tr .button-edit").hide().css({transition:"none"}),e(document).on({mouseenter:function(){e(this).find(".optin-delete-optin, .edit-optin").stop().fadeIn("fast")},mouseleave:function(){var t=e(this);t.find(".toggle-checkbox").removeProp("disabled"),t.find(".edit-optin").removeProp("disabled"),t.removeClass("disabled"),t.find(".optin-delete-optin, .edit-optin, .delete-optin-confirmation").stop().fadeOut("fast")}},".accordion header"),e(document).on({mouseenter:function(){e(this).find(".button-edit").stop().fadeIn("fast")},mouseleave:function(){e(this).find(".button-edit").stop().fadeOut("fast")}},".wpoi-optin-details tr"),e(document).on("click",".wpoi-tabs-menu a",function(t){var i=e(this).attr("tab");t.preventDefault(),Optin.router.navigate(i,!0)}),e(document).on("click",".edit-optin",function(t){t.stopPropagation(),t.preventDefault(),window.location.href=e(this).attr("href")}),e(document).on("click",".wpoi-type-edit-button",function(t){var i=e(this).data("id"),s=e(this).data("type");t.preventDefault(),window.location.href="admin.php?page=inc_optin&optin="+i+"#display/"+s}),e(document).on("click","*[for]",function(t){var i=e(this),s=i.attr("for"),n=e("#"+s);!i.is("label")&&n.length&&(n.trigger("change"),n.trigger("click"))}),e("#wpoi-complete-message").fadeIn(),e(document).on("click","#wpoi-complete-message .next-button button",function(t){e("#wpoi-complete-message").fadeOut()}),e(document).on("click",".wpoi-listing-page .wpoi-listing-wrap header.can-open",function(t){e(this).find(".open").trigger("click")}),e(document).on("click",".wpoi-listing-page .wpoi-listing-wrap .can-open .open",function(t){var i=e(this).closest(".wpoi-listing-wrap"),s=i.find("section"),n=e(".wpoi-listing-wrap").not(i),o=e(".wpoi-listing-wrap section").not(s);t.stopPropagation(),o.slideUp(300,function(){o.removeClass("open")}),n.find(".dev-icon").removeClass("dev-icon-caret_up").addClass("dev-icon-caret_down"),s.slideToggle(300,function(){i.toggleClass("open"),i.find(".dev-icon").toggleClass("dev-icon-caret_up dev-icon-caret_down")})}),Optin.decorateNumberInputs=function(t){var i=t&&t.$el?t.$el.find(".wph-input--number input"):e(".wph-input--number input"),s=Hustle.createTemplate('<div class="wph-nbr--nav"><div class="wph-nbr--button wph-nbr--up {{disabled}}">+</div><div class="wph-nbr--button wph-nbr--down {{disabled}}">-</div></div>');i.each(function(){var t=e(this),i=t.is(":disabled")?"disabled":"";t.siblings(".wph-nbr--nav").length||t.after(s({disabled:i}))})},Hustle.Events.on("view.rendered",Optin.decorateNumberInputs),e(document).on("click",".wph-nbr--up:not(.disabled)",function(t){var i,s=e(this).closest(".wph-input--number").find("input"),n=parseFloat(s.val());s.attr("min"),(i=n>=s.attr("max")?n:n+1)!==n&&s.val(i).trigger("change")}),e(document).on("click",".wph-nbr--down:not(.disabled)",function(t){var i,s=e(this).closest(".wph-input--number").find("input"),n=parseFloat(s.val()),o=s.attr("min");s.attr("max"),(i=n<=o?n:n-1)!==n&&s.val(i).trigger("change")}),function(){function t(){var t=e(window).scrollTop(),i=e(".wph-sticky--anchor");i.length&&(t>(i=i.offset().top)?(e(".wph-preview--eye").addClass("wph-sticky--element"),e(".wph-sticky--anchor").height(e(".wph-preview--eye").outerHeight())):(e(".wph-preview--eye").removeClass("wph-sticky--element"),e(".wph-sticky--anchor").height(0)))}e(function(){e(window).scroll(t),t()})}()}(jQuery,document),Hustle.define("Integration_Modal_Handler",function(e){"use strict";return Backbone.View.extend({events:{"click .hustle-provider-connect":"connectAddOn","click .hustle-provider-disconnect":"disconnectAddOn","click .hustle-provider-next":"submitNextStep","click .hustle-provider-back":"goPrevStep","click .hustle-refresh-email-lists":"refreshLists","click .hustle-provider-form-disconnect":"disconnectAddOnForm","click .hustle-provider-clear-radio-options":"clearRadioOptions","keypress .sui-dialog-content":"preventEnterKeyFromDoingThings","change select#group":"showInterests"},preventEnterKeyFromDoingThings:function(e){13===e.which&&(e.preventDefault(),this.$(".hustle-provider-connect").length?this.$(".hustle-provider-connect").trigger("click"):this.$(".hustle-provider-next").length&&this.$(".hustle-provider-next").trigger("click"))},initialize:function(e){return this.slug=e.slug,this.nonce=e.nonce,this.action=e.action,this.moduleId=e.moduleId,this.multi_id=e.multiId,this.globalMultiId=e.globalMultiId,this.step=0,this.next_step=!1,this.prev_step=!1,this.render()},render:function(){var e={};e.action=this.action,e._ajax_nonce=this.nonce,e.data={},e.data.slug=this.slug,e.data.step=this.step,e.data.current_step=this.step,this.moduleId&&(e.data.module_id=this.moduleId),this.multi_id&&(e.data.multi_id=this.multi_id),this.globalMultiId&&(e.data.global_multi_id=this.globalMultiId),this.request(e,!1,!0)},applyLoader:function(e){e.find(".sui-button:not(.disable-loader)").addClass("sui-button-onload")},resetLoader:function(e){e.find(".sui-button").removeClass("sui-button-onload")},request:function(t,i,s){var n=this;s&&(this.$el.find(".sui-box-body").addClass("sui-block-content-center").html('<p class="sui-loading-dialog" aria-label="Loading content"><i class="sui-icon-loader sui-loading" aria-hidden="true"></i></p>'),this.$el.find(".sui-box-footer").html(""),this.$el.find(".integration-header").html("")),this.applyLoader(this.$el),this.ajax=e.post({url:ajaxurl,type:"post",data:t}).done(function(e){if(e&&e.success){n.renderBody(e),n.renderFooter(e);var t=e.data.data;if(n.onRender(t),n.resetLoader(n.$el),(i||!_.isUndefined(t.is_close)&&t.is_close)&&n.close(n),n.$el.find(".hustle-provider-close").on("click",function(){n.close(n)}),!_.isUndefined(t.notification)&&!_.isUndefined(t.notification.type)&&!_.isUndefined(t.notification.text))Module.Notification.open(t.notification.type,t.notification.text);if("mailchimp"===n.slug){var s=n.$el.find("#group");s.length&&s.trigger("change")}}}),this.ajax.always(function(){n.$el.find(".sui-box-body").removeClass("sui-block-content-center"),n.$el.find(".sui-loading-dialog").remove()})},renderBody:function(t){this.$el.find(".sui-box-body").html(t.data.data.html);var i=this.$el.find(".sui-box-body .integration-header").remove();if(0<i.length&&this.$el.find(".integration-header").html(i.html()),e.trim(this.$el.find(".sui-box-body").html()).length){var s=this.$el.find(".sui-box-body").children(),n=!0;e.each(s,function(t,i){e(i).is(":hidden")||(n=!1)}),n?(this.$el.find(".sui-box-body").addClass("sui-hidden"),this.$el.find(".sui-box-footer").css("padding-top","")):(this.$el.find(".sui-box-body select").each(function(){SUI.suiSelect(this)}),this.$el.find(".sui-box-body .sui-notice").next().is('input[type="hidden"]')&&this.$el.find(".sui-box-body .sui-notice").css({"margin-bottom":"0"}))}else this.$el.find(".sui-box-body").addClass("sui-hidden"),this.$el.find(".sui-box-footer").css("padding-top","")},renderFooter:function(e){var t=this,i=e.data.data.buttons,s=t.$el.find(".sui-box-body"),n=t.$el.find(".sui-box-footer");t.$el.find(".sui-box-footer").removeClass("sui-hidden").removeClass("sui-hidden-important").removeClass("sui-box-footer-center").removeClass("sui-box-footer-right").html(""),_.each(i,function(e){t.$el.find(".sui-box-footer").append(e.markup)}),0===n.find(".sui-button").length?n.addClass("sui-hidden-important"):(s.find(".hustle-installation-error").length&&n.addClass("sui-hidden-important"),n.find(".sui-button").hasClass("sui-button-center")?n.addClass("sui-box-footer-center"):n.find(".sui-button").hasClass("sui-button-right")&&(n.find(".sui-button").hasClass("sui-button-left")||n.addClass("sui-box-footer-right")))},onRender:function(e){this.delegateEvents(),_.isUndefined(e.opt_in_provider_current_step)||(this.step=+e.opt_in_provider_current_step),_.isUndefined(e.opt_in_provider_has_next_step)||(this.next_step=e.opt_in_provider_has_next_step),_.isUndefined(e.opt_in_provider_has_prev_step)||(this.prev_step=e.opt_in_provider_has_prev_step),this.$el.find("select").each(function(){SUI.suiSelect(this)}),this.$el.find(".sui-select").SUIselect2({dropdownCssClass:"sui-select-dropdown"})},refreshLists:function(t){t.preventDefault(),t.stopPropagation();var i=e(t.currentTarget),s=this.moduleId,n=this.slug,o=e("#form_id").length?"forms":"lists",a=this.nonce;i.addClass("sui-button-onload"),e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_refresh_email_lists",id:s,slug:n,type:o,_ajax_nonce:a}}).done(function(e){if(e.success&&void 0!==e.data.select){var t=i.siblings("select");t.next().remove(),t.remove(),i.before(e.data.select),i.siblings(".sui-select").SUIselect2({dropdownCssClass:"sui-select-dropdown"})}}).error(function(e){}).always(function(){i.removeClass("sui-button-onload")})},submitNextStep:function(t){var i={},s=this.$el.find("form"),n={slug:this.slug,step:this.getStep(),current_step:this.step},o=s.serialize();this.moduleId&&(n.module_id=this.moduleId),o=o+"&"+e.param(n),i.action=this.action,i._ajax_nonce=this.nonce,i.data=o,this.request(i,!1,!1)},goPrevStep:function(e){var t={},i={slug:this.slug,step:this.getPrevStep(),current_step:this.step};this.moduleId&&(i.module_id=this.moduleId),this.multi_id&&(i.multi_id=this.multi_id),t.action=this.action,t._ajax_nonce=this.nonce,t.data=i,this.request(t,!1,!1)},getStep:function(){return this.next_step?this.step+1:this.step},getPrevStep:function(){return this.prev_step?this.step-1:this.step},connectAddOn:function(){var t={},i=this.$el.find("form"),s={slug:this.slug,step:this.getStep(),current_step:this.step},n=i.serialize();this.moduleId&&(s.module_id=this.moduleId),this.multi_id&&(s.multi_id=this.multi_id),n=n+"&"+e.param(s),t.action=this.action,t._ajax_nonce=this.nonce,t.data=n,this.request(t,!1,!1)},disconnectAddOn:function(t){var i=this,s=this.$el.find(".sui-dialog-image img").attr("src"),n=this.$el.find("#dialogTitle2").html(),o={},a={},l={};e("hustle-dialog--remove-active-warning").val();o.action="hustle_provider_deactivate",o._ajax_nonce=this.nonce,o.data={},o.data.slug=this.slug,o.data.img=s,o.data.title=n,this.globalMultiId&&(o.data.global_multi_id=this.globalMultiId),a.action="hustle_provider_is_on_module",a._ajax_nonce=this.nonce,a.data={},a.data.slug=this.slug,a.data.globalMultiId=this.globalMultiId,this.$el.find(".sui-button:not(.disable-loader)").addClass("sui-button-onload"),e.ajax({url:ajaxurl,type:"POST",data:a,success:function(e){!0===e.success&&(l=e)},complete:function(){!0===l.success?Module.integrationsActiveRemove.open(l.data,o,i):i.request(o,!0,!1)}})},disconnectAddOnForm:function(t){var i={},s=e("#hustle-integrations-active-count").val(),n=e("#hustle-integrations-active-integrations").val();i.action="hustle_provider_form_deactivate",i._ajax_nonce=this.nonce,i.data={},i.data.slug=this.slug,i.data.module_id=this.moduleId,this.multi_id&&(i.data.multi_id=this.multi_id),1==s&&n===this.slug&&"local_list"!==this.slug?Module.integrationsAllRemove.open(i,this):1==s&&"local_list"===this.slug?Module.Notification.open("error",optinVars.messages.integraiton_required):this.request(i,!0,!1)},close:function(t){t.ajax.abort(),t.remove(),e("body").css("overflow","auto"),Hustle.Events.trigger("hustle:providers:reload")},clearRadioOptions:function(){this.$("input[type=radio]",this.$el).removeAttr("checked")},showInterests:function(t){var i=this,s=e(t.currentTarget),n=s.data("nonce"),o=s.val(),a={},l=i.$el.find("form"),r={slug:i.slug,group:o,module_id:i.moduleId},d=l.serialize();d=d+"&"+e.param(r),a.action="hustle_mailchimp_get_group_interests",a._ajax_nonce=n,a.data=d,i.applyLoader(i.$el),e.ajax({url:ajaxurl,type:"POST",data:a}).done(function(e){e.success&&(l.find(".sui-form-field").slice(1).remove(),l.find(".sui-form-field:first-child").after(e.data),i.$el.find(".sui-select").SUIselect2({dropdownCssClass:"sui-select-dropdown"}))}).error(function(e){}).always(function(){i.resetLoader(i.$el)})}})});var Module=window.Module||{};function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t<e.length;t++)i[t]=e[t];return i}}Hustle.define("Model",function(e){"use strict";return Backbone.Model.extend({initialize:function(){this.on("change",this.userHasChange,this),Backbone.Model.prototype.initialize.apply(this,arguments)},userHasChange:function(){Module.hasChanges=!0,Hustle.Events.trigger("modules.view.switch_status","unsaved")}})}),Hustle.define("Models.M",function(){"use strict";return Hustle.get("Model").extend({toJSON:function(){var e,t=_.clone(this.attributes);for(e in t)(t[e]instanceof Backbone.Model||t[e]instanceof Backbone.Collection)&&(t[e]=t[e].toJSON());return t},set:function(e,t,i){var s,n,o;"string"==typeof e&&-1!==e.indexOf(".")?(s=e.split(".")[0],n=e.split(".")[1],(o=this.get(s))&&o instanceof Backbone.Model&&(o.set(n,t,i),this.trigger("change:"+e,e,t,i),this.trigger("change:"+s,e,t,i))):Backbone.Model.prototype.set.call(this,e,t,i)},get:function(e){var t,i;return"string"==typeof e&&-1!==e.indexOf(".")?(t=e.split(".")[0],i=e.split(".")[1],this.get(t).get(i)):Backbone.Model.prototype.get.call(this,e)}})}),Hustle.define("Models.Trigger",function(){"use strict";return Hustle.get("Model").extend({defaults:{trigger:"time",on_time_delay:0,on_time_unit:"seconds",on_scroll:"scrolled",on_scroll_page_percent:"20",on_scroll_css_selector:"",enable_on_click_element:"1",on_click_element:"",enable_on_click_shortcode:"1",on_exit_intent:"1",on_exit_intent_per_session:"1",on_exit_intent_delayed:"0",on_exit_intent_delayed_time:5,on_exit_intent_delayed_unit:"seconds",on_adblock:"0"}})}),Module.Model=Hustle.get("Models.M").extend({defaults:{module_name:"",moduleType:"popup",active:"0"}}),function(e){"use strict";var t=window.Module||{};t.Notification={initialize:function(){e("#hustle-notification").length?(e("#hustle-notification").remove(),this.initialize()):e('<div role="alert" id="hustle-notification" class="sui-notice-top sui-notice-'+this.type+' sui-can-dismiss"><div class="sui-notice-content"><p>'+this.text+'</p></div><span class="sui-notice-dismiss" aria-hidden="true"><a role="button" href="#" aria-label="'+optinVars.messages.commons.dismiss+'" class="sui-icon-check"></a></span></div>').removeAttr("hidden").appendTo(e("main.sui-wrap")).slideDown()},open:function(t,i,s){var n=this;_.isUndefined(s)&&(s=4e3),void 0!==n.closeTimeout&&(window.clearTimeout(n.closeTimeout),delete n.closeTimeout,n.close()),this.type=t||"notice",this.text=i,this.initialize();var o=e("#hustle-notification");o.removeClass("sui-hidden"),o.removeProp("hidden"),e(".sui-notice-dismiss a").click(function(e){return e.preventDefault(),n.close(),!1}),s&&(this.closeTimeout=setTimeout(function(){n.close()},s))},close:function(){var t=e("#hustle-notification");t.addClass("sui-hidden"),t.prop("hidden",!0),t.stop().slideUp("slow")}},t.integrationsModal={$popup:{},_deferred:{},open:function(t){var i=this,s=e(t.target);e("#hustle-integration-popup").remove(),s.hasClass("connect-integration")||(s=s.closest(".connect-integration"));var n=function(){return i.close(),!1},o=s.data("nonce"),a=s.data("slug"),l=s.data("title"),r=s.data("image"),d=s.data("action"),c=s.data("module_id"),u=s.data("multi_id"),h=s.data("global_multi_id"),p=Optin.template("hustle-integration-dialog-tpl");return e("main.sui-wrap").append(p({image:r,title:l})),this.$popup=e("#hustle-integration-dialog"),new(Hustle.get("Integration_Modal_Handler"))({slug:a,nonce:o,action:d,moduleId:c,multiId:u,globalMultiId:h,el:this.$popup}).on("modal:closed",function(){return i.close()}),this.$popup.find(".hustle-popup-action").remove(),this.$popup.find(".sui-dialog-close").on("click",n),this.$popup.find(".sui-dialog-overlay").on("click",n),this.$popup.on("click",".hustle-popup-cancel",n),this.$popup.find(".sui-dialog-overlay").on("click",function(){e(this).parent("#hustle-integration-dialog").find(".sui-dialog-close").trigger("click")}),this.$popup.find(".sui-dialog-overlay").removeClass("sui-fade-out").addClass("sui-fade-in"),this.$popup.find(".sui-dialog-content").removeClass("sui-bounce-out").addClass("sui-bounce-in"),this.$popup.removeAttr("aria-hidden"),e("body").css("overflow","hidden"),this._deferred=new e.Deferred,this.$popup.on("click",".sui-tab-item",function(t){var i=e(t.currentTarget);i.closest(".sui-side-tabs").find(".sui-tab-item").removeClass("active"),i.addClass("active")}),this._deferred.promise()},close:function(t){var i=e("#hustle-integration-popup");i.find(".sui-dialog-overlay").removeClass("sui-fade-in").addClass("sui-fade-out"),i.find(".sui-dialog-content").removeClass("sui-bounce-in").addClass("sui-bounce-out"),e("body").css("overflow","auto"),setTimeout(function(){i.attr("aria-hidden","true")},300),this._deferred.resolve(this.$popup,t)}},t.integrationsAllRemove={$popup:{},_deferred:{},open:function(t,i){var s=this,n=e("#hustle-dialog--final-delete"),o=function(){return s.close(),!1};n.find(".sui-dialog-close").on("click",o),n.find(".sui-dialog-overlay").on("click",o),n.find("#hustle-delete-final-button-cancel").on("click",o),e("#hustle-delete-final-button").off("click").on("click",function(n){e("#hustle-delete-final-button").addClass("sui-button-onload"),function(e,t){s.deleteIntegration(e,t)}(t,i),function(e){s.insertLocalList(e)}(t),o()}),e("#hustle-integration-dialog").addClass("sui-fade-out").hide(),e("#hustle-delete-final-button").removeAttr("disabled"),SUI.dialogs["hustle-dialog--final-delete"].show()},close:function(){var t=e("#hustle-dialog--final-delete");t.find(".sui-dialog-overlay").removeClass("sui-fade-in").addClass("sui-fade-out"),t.find(".sui-dialog-content").removeClass("sui-bounce-in").addClass("sui-bounce-out"),e("#hustle-delete-final-button").removeClass("sui-button-onload"),e("#hustle-integration-dialog").remove(),e("body").css("overflow","auto"),e("#hustle-delete-final-button").attr("disabled"),setTimeout(function(){t.attr("aria-hidden","true")},300),SUI.dialogs["hustle-dialog--final-delete"].hide()},confirmDelete:function(e,t){this.deleteIntegration(e,t),this.insertLocal(e),this.close()},deleteIntegration:function(e,t){t.request(e,!0,!1)},insertLocalList:function(i){var s={id:i.data.module_id,_ajax_nonce:i._ajax_nonce,action:"hustle_provider_insert_local_list"};e.ajax({url:ajaxurl,type:"POST",data:s,success:function(e){if(e.success)Hustle.Events.trigger("hustle:providers:reload");else{if(void 0===SUI.dialogs["hustle-dialog--final-delete"])return void t.Notification.open("error",optinVars.messages.something_went_wrong);SUI.dialogs["hustle-dialog--final-delete"].hide()}},error:function(){t.Notification.open("error",optinVars.messages.something_went_wrong),SUI.dialogs["hustle-dialog--final-delete"].hide()}})}},t.integrationsActiveRemove={$popup:{},_deferred:{},open:function(t,i,s){var n=this,o=e("#hustle-dialog--remove-active"),a=function(){return n.close(),!1},l=Optin.template("hustle-modules-active-integration-tpl"),r=Optin.template("hustle-modules-active-integration-img-tpl"),d=Optin.template("hustle-modules-active-integration-header-tpl"),c=Optin.template("hustle-modules-active-integration-desc-tpl");e("#hustle-dialog--remove-active tbody").html(""),e("#hustle-dialog--remove-active .sui-dialog-image").html(""),e("#hustle-dialog--remove-active #sui-box-modal-header").html(""),e("#hustle-dialog--remove-active #sui-box-modal-content").html(""),e("#hustle-dialog--remove-active .sui-dialog-image").append(r({image:i.data.img,title:i.data.slug})),e("#hustle-dialog--remove-active #sui-box-modal-header").append(d({title:i.data.title.replace(/Connect|Configure/gi," ")})),e("#hustle-dialog--remove-active #sui-box-modal-content").append(c({title:i.data.title.replace(/Connect|Configure/gi," ")})),e.each(t,function(t,i){e("#hustle-dialog--remove-active tbody").append(l({name:i.name,type:i.type,editUrl:i.edit_url}))}),o.find(".sui-dialog-close").on("click",a),o.find(".sui-dialog-overlay").on("click",a),o.find("#hustle-remove-active-button-cancel").on("click",a),o.find(".hustle-remove-active-integration-back").on("click",function(){n.back(s)}),e("#hustle-remove-active-button").off("click").on("click",function(o){e(this).addClass("sui-button-onload"),function(e,t,i){n.removeIntegration(e,t,i),a()}(i,s,t)}),e("#hustle-integration-dialog").addClass("sui-fade-out").hide(),SUI.dialogs["hustle-dialog--remove-active"].show()},close:function(){var t=e("#hustle-dialog--remove-active");t.find(".sui-dialog-overlay").removeClass("sui-fade-in").addClass("sui-fade-out"),t.find(".sui-dialog-content").removeClass("sui-bounce-in").addClass("sui-bounce-out"),e("#hustle-delete-final-button").removeClass("sui-button-onload"),e("#hustle-integration-dialog").remove(),e("body").css("overflow","auto"),setTimeout(function(){t.attr("aria-hidden","true")},300),SUI.dialogs["hustle-dialog--remove-active"].hide()},back:function(t){this.close(),"hubspot"===t.slug||"constantcontact"===t.slug?e('button[data-slug="'+t.slug+'"]').trigger("click"):e('button[data-global_multi_id="'+t.globalMultiId+'"]').trigger("click")},removeIntegration:function(t,i,s){var n=this;e.each(s,function(e,i){t.data.slug===i.active.active_integrations&&n.insertLocalList(t,e)}),i.request(t,!0,!1),e("#hustle-remove-active-button").removeClass("sui-button-onload")},insertLocalList:function(i,s){var n={id:s,_ajax_nonce:i._ajax_nonce,action:"hustle_provider_insert_local_list"};e.ajax({url:ajaxurl,type:"POST",data:n,success:function(e){!1!==e.success||t.Notification.open("error",optinVars.messages.something_went_wrong)},error:function(){t.Notification.open("error",optinVars.messages.something_went_wrong)}})}},t.ProviderMigration={$popup:{},_deferred:{},open:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=e("#hustle-dialog-migrate--"+t),n=this,o=function(){return n.close(s,t),!1};s.find(".sui-dialog-close").on("click",o),s.find(".sui-dialog-overlay").on("click",o),s.find("#integration-migrate").on("click",function(){var o=s.find("form"),a={},l={slug:t,global_multi_id:i},r=o.serialize();e("#integration-migrate").addClass("sui-button-onload"),a._ajax_nonce=e("#integration-migrate").data("nonce"),a.action="hustle_provider_migrate_aweber",r=r+"&"+e.param(l),a.data=r,n.reauth(s,a,i,t)}),i&&e("#integration-migrate").attr("data-id",i),setTimeout(function(){return SUI.dialogs["hustle-dialog-migrate--"+t].show()},300)},close:function(t,i){t.find(".sui-dialog-overlay").removeClass("sui-fade-in").addClass("sui-fade-out"),t.find(".sui-dialog-content").removeClass("sui-bounce-in").addClass("sui-bounce-out"),e("body").css("overflow","auto"),setTimeout(function(){return t.attr("aria-hidden","true")},300),SUI.dialogs["hustle-dialog-migrate--"+i].hide()},reauth:function(i,s,n,o){var a=this,l=e(".hustle_migration_notice__"+o+'[data-id="'+n+'"]');this.ajax=e.post({url:ajaxurl,type:"post",data:s}).done(function(s){s&&s.success?(a.close(i,o),l.hide(),t.Notification.open("success",optinVars.messages.aweber_migration_success,1e5)):(e(i).find("#integration-migrate").removeClass("sui-button-onload"),e(i).find(".sui-error-message").removeClass("sui-hidden"),e(i).find(".sui-form-field").addClass("sui-form-field-error"))})}},t.deleteModal={open:function(i){var s="hustle-dialog--delete",n=Optin.template("hustle-dialog--delete-tpl")(i);if(e("#"+s+" #hustle-delete-dialog-content").html(n),e("#"+s+" #hustle-dialog-title").html(i.title),void 0===SUI.dialogs[s])return t.Notification.open("error",optinVars.messages.something_went_wrong),!1;e("#"+s+" .hustle-delete-confirm").on("click",function(t){e(t.currentTarget).addClass("sui-button-onload")}),SUI.dialogs[s].create(),SUI.dialogs[s].show()}},t.preview={open:function(t,i){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this,o="embedded"===i||"social_sharing"===i;e.ajax({url:ajaxurl,type:"POST",data:{action:"hustle_preview_module",id:t,previewData:s}}).then(function(i){if(i.success){var s="";o?s=e("#hustle-dialog--preview .sui-box-body"):(s=e("#module-preview-container")).length||(e("main.sui-wrap").append('<div id="module-preview-container"></div>'),s=e("#module-preview-container")),s.html(i.data.html);var n=s.find(".hustle-ui");if(n.find(".hustle-select2").length&&HUI.select2(),n.find(".hustle-time").length&&HUI.timepicker(".hustle-time"),n.find(".hustle-date").length){var a=optinVars.messages.days_and_months;HUI.datepicker(".hustle-date",a.days_full,a.days_short,a.days_min,a.months_full,a.months_short)}HUI.nonSharingSimulation(n),HUI.inputFilled(),i.data.style&&s.append(i.data.style),i.data.script&&s.append(i.data.script),setTimeout(function(){return HUI.maybeRenderRecaptcha(n)},1e3)}return{id:t,data:i.data.module}},function(e){}).then(function(e){var t=e.id,i=e.data;t&&(o&&SUI.dialogs["hustle-dialog--preview"].show(),n.showModule(t,i))}).always(function(){e(".sui-button-onload").removeClass("sui-button-onload")})},showModule:function(t,i){var s=".hustle_module_id_"+t;if("popup"===i.module_type){var n="0"!==String(e(s).data("close-delay"))&&e(s).data("close-delay");HUI.popupLoad(s,n)}else if("slidein"===i.module_type){var o="0"!==String(e(s).data("close-delay"))&&e(s).data("close-delay");HUI.slideinLayouts(s),HUI.slideinLoad(s,o),e(window).on("resize",function(){HUI.slideinLayouts(s)})}else HUI.inlineResize(s),HUI.inlineLoad(s)}},t.trackingChart={chartsData:{},theCharts:{},init:function(t,i){var s=this;t.find("select.hustle-conversion-type").each(function(i,n){SUI.suiSelect(n),e(n).on("change.select2",function(e){return s.conversionTypeChanged(e,t)})}),this.chartsData=i,Object.values(i).forEach(function(e){return s.updateChart(e)})},conversionTypeChanged:function(t,i){var s=e(t.currentTarget),n=s.val(),o=s.data("moduleType"),a=this.chartsData[o],l=i.find(".hustle-tracking-".concat(o,"-conversions-count")),r=i.find(".hustle-tracking-".concat(o,"-conversions-rate"));l.text(a[n].conversions_count),r.text(a[n].conversion_rate+"%"),this.updateChart(a,n,!1)},updateChart:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all",i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=e.views,n=[{label:"Submissions",data:e[t].conversions,backgroundColor:["#E1F6FF"],borderColor:["#17A8E3"],borderWidth:2,pointRadius:0,pointHitRadius:20,pointHoverRadius:5,pointHoverBorderColor:"#17A8E3",pointHoverBackgroundColor:"#17A8E3"},{label:"Views",data:s,backgroundColor:["#F8F8F8"],borderColor:["#DDDDDD"],borderWidth:2,pointRadius:0,pointHitRadius:20,pointHoverRadius:5,pointHoverBorderColor:"#DDDDDD",pointHoverBackgroundColor:"#DDDDDD"}];void 0!==this.theCharts[e.id]?i?(this.theCharts[e.id].destroy(),this.createNewChart(e,n)):(this.theCharts[e.id].data.datasets=n,this.theCharts[e.id].update()):this.createNewChart(e,n)},createNewChart:function(e,t){var i=Math.max.apply(Math,_toConsumableArray(e.views))+2,s=document.getElementById(e.id);if(Math.max.apply(Math,_toConsumableArray(e.views))<Math.max.apply(Math,_toConsumableArray(e.conversions))&&(i=Math.max.apply(Math,_toConsumableArray(e.conversions))+2),s){var n={labels:e.days,datasets:t},o={maintainAspectRatio:!1,legend:{display:!1},scales:{xAxes:[{display:!1,gridLines:{color:"rgba(0, 0, 0, 0)"}}],yAxes:[{display:!1,gridLines:{color:"rgba(0, 0, 0, 0)"},ticks:{beginAtZero:!1,min:0,max:i,stepSize:1}}]},elements:{line:{tension:0},point:{radius:.5}},tooltips:{custom:function(e){e&&(e.displayColors=!1)},callbacks:{title:function(e,t){return 0===e[0].datasetIndex?optinVars.labels.submissions.replace("%d",e[0].yLabel):1===e[0].datasetIndex?optinVars.labels.views.replace("%d",e[0].yLabel):void 0},label:function(e,t){return e.xLabel},labelTextColor:function(e,t){return"#AAAAAA"}}}};this.theCharts[e.id]=new Chart(s,{type:"line",fill:"start",data:n,options:o})}}},t.hasChanges=!1,window.onbeforeunload=function(){if(t.hasChanges)return optinVars.messages.dont_navigate_away},e(".highlight_input_text").focus(function(){e(this).select()})}(jQuery),function(e){"use strict";var t=window.Module||{};t.Utils={getUrlParam:function(e){var t=optinVars.urlParams;return void 0!==t[e]&&t[e]},accessibleHide:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.hide(),e.attr("aria-hidden",!0),e.prop("hidden",!0),t&&e.prop("tabindex","-1"),i&&void 0!==i.name&&(void 0!==i.value?e.attr(i.name,i.value):e.removeAttr(i.name))},accessibleShow:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.show(),e.removeAttr("aria-hidden"),e.removeClass("sui-hidden"),e.removeProp("hidden"),t&&e.attr("tabindex","0"),i&&void 0!==i.name&&(void 0!==i.value?e.attr(i.name,i.value):e.removeAttr(i.name))}},t.handleActions={context:"",initAction:function(i,s,n){i.preventDefault(),this.context=s;var o=this,a=e(i.currentTarget),l=a.data("form-id"),r=a.data(),d=new FormData;if(void 0!==l){var c=e("#"+l);c.length&&(d=new FormData(c[0]))}e.each(r,function(e,t){return d.append(e,t)}),d.append("context",this.context),d.append("_ajax_nonce",optinVars.single_module_action_nonce),d.append("action","hustle_module_handle_single_action"),e.ajax({url:ajaxurl,type:"POST",data:d,contentType:!1,processData:!1}).done(function(i){i.data.callback&&"function"==typeof o[i.data.callback]?o[i.data.callback](a,i.data,i.success):i.data.callback&&"function"==typeof n[i.data.callback]?n[i.data.callback](a,i.data,i.success):i.data.url?location.replace(i.data.url):i.data.notification&&t.Notification.open(i.data.notification.status,i.data.notification.message,i.data.notification.delay),i.data.url||e(".sui-button-onload").removeClass("sui-button-onload")}).error(function(t){e(".sui-button-onload").removeClass("sui-button-onload")})},actionToggleTracking:function(i,s){if(s.is_embed_or_sshare){var n=e('.hustle-manage-tracking-button[data-module-id="'+i.data("module-id")+'"]'),o=n.parents(".sui-accordion-item");SUI.dialogs["hustle-dialog--manage-tracking"].hide(),n.data("tracking-types",s.enabled_types),o.hasClass("sui-accordion-item--open")&&o.find(".sui-accordion-open-indicator").trigger("click").trigger("click")}else{var a=s.was_enabled?1:0,l=i.parents(".sui-accordion-item");i.data("enabled",1-a),i.find("span").toggleClass("sui-hidden"),l.hasClass("sui-accordion-item--open")&&l.find(".sui-accordion-open-indicator").trigger("click").trigger("click")}t.Notification.open("success",s.message,1e4)}}}(jQuery),Hustle.define("SShare.Content_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Module_Content"),{el:"#hustle-wizard-content",activePlatforms:[],events:{"change select.hustle-select-field-variables":"addPlaceholderToField","click ul.wpmudev-tabs-menu li label":"toggleCheckbox","click .hustle-choose-platforms":"openPlatformsModal"},render:function(){var t=this.model.toJSON();if(void 0!==t.social_icons&&t.social_icons)for(var i in t.social_icons)this.addPlatformToPanel(i,t.social_icons[i]);var s=this.$("#hustle-social-services").sortable({axis:"y",containment:".sui-box-builder"});for(var n in s.on("sortupdate",e.proxy(this.platformsOrderChanged,this,s)),optinVars.social_platforms)this.addPlatformToDialog(n);this.bindRemoveService(),"true"===Module.Utils.getUrlParam("new")&&Module.Notification.open("success",optinVars.messages.commons.module_created.replace(/{type_name}/g,optinVars.module_name[this.moduleType]),1e4)},bindRemoveService:function(){e("#hustle-wizard-content .hustle-remove-social-service").off("click").on("click",e.proxy(this.removeService,this))},openPlatformsModal:function(t){var i=this.model.get("social_icons"),s=void 0!==i?Object.keys(i):[];new(Hustle.get("Modals.Services_Platforms"))(s).on("platforms:added",e.proxy(this.addNewPlatforms,this)),SUI.dialogs["hustle-dialog--add-platforms"].show()},addNewPlatforms:function(t){var i=this;this.model.get("social_icons")||this.model.set("social_icons",{});var s=this,n=_.extend({},this.model.get("social_icons"));e.each(t,function(e,t){if(n&&t in n)return!0;s.addPlatformToPanel(t,{});var o=i.getPlatformDefaults(t);n[t]=o}),this.bindRemoveService(),this.model.set("social_icons",n),Hustle.Events.trigger("view.rendered",this)},addPlatformToPanel:function(e,t){var i=Optin.template("hustle-platform-row-tpl"),s=this.$("#hustle-social-services");t=_.extend({},this.getPlatformViewDefaults(e),t),this.activePlatforms.push(e),s.append(i(t))},addPlatformToDialog:function(t){var i=Optin.template("hustle-add-platform-li-tpl"),s=e("#hustle_add_platforms_container"),n=this.getPlatformViewDefaults(t);s.append(i(n))},getPlatformDefaults:function(e){var t={platform:e,label:e in optinVars.social_platforms?optinVars.social_platforms[e]:e,type:"click",counter:"0",link:""};return"email"===e&&(t.title="{post_title}",t.message=optinVars.social_platforms_data.email_message_default),t},getPlatformViewDefaults:function(e){var t=this.model.toJSON(),i=void 0===t.counter_enabled?"true":t.counter_enabled,s={fivehundredpx:"500px"},n=-1!==optinVars.social_platforms_with_endpoints.indexOf(e),o=-1!==optinVars.social_platforms_with_api.indexOf(e),a=e in s?s[e]:e;return _.extend({},this.getPlatformDefaults(e),{platform_style:a,counter_enabled:i,hasEndpoint:n,hasCounter:o})},platformsOrderChanged:function(e){var t=this.model.get("social_icons"),i=e.sortable("toArray",{attribute:"data-platform"}),s={},n=!0,o=!1,a=void 0;try{for(var l,r=i[Symbol.iterator]();!(n=(l=r.next()).done);n=!0){var d=l.value;s[d]=t[d]}}catch(e){o=!0,a=e}finally{try{n||null==r.return||r.return()}finally{if(o)throw a}}this.model.set("social_icons",s),this.model.trigger("change",this.model)},removeService:function(t){var i=e(t.currentTarget).data("platform"),s=this.model.get("social_icons");this.$("#hustle-platform-"+i).remove(),this.activePlatforms=_.without(this.activePlatforms,i),delete s[i],this.model.trigger("change",this.model),t.stopPropagation()},modelUpdated:function(e){var t,i=e.changed,s=void 0!==Object.keys(i)[0]?Object.keys(i)[0]:"";if("service_type"in i&&this.serviceTypeUpdated(i.service_type),"click_counter"in i)this.clickCounterUpdated(i.click_counter);else if(-1!==s.indexOf("_counter")){var n=s.slice(0,-8);n in(t=this.model.get("social_icons"))&&(t[n].counter=parseInt(i[s])),this.model.unset(s,{silent:!0})}if(-1!==s.indexOf("_link")){var o=s.slice(0,-5);o in(t=this.model.get("social_icons"))&&(t[o].link=i[s]),this.model.unset(s,{silent:!0})}if(-1!==s.indexOf("_type")){var a=s.slice(0,-5);a in(t=this.model.get("social_icons"))&&(t[a].type="native"===i[s]?"native":"click"),this.model.unset(s,{silent:!0})}if("email_title"in i){"email"in(t=this.model.get("social_icons"))&&(t.email.title=i[s]),this.model.unset(s,{silent:!0})}if("email_message"in i){"email"in(t=this.model.get("social_icons"))&&(t.email.message=i[s]),this.model.unset(s,{silent:!0})}},serviceTypeUpdated:function(t){var i=this.$("#wpmudev-sshare-counter-options"),s=e(".wph-wizard-services-icons-native"),n=e(".wph-wizard-services-icons-custom");"native"===t?(i.removeClass("wpmudev-hidden"),n.addClass("wpmudev-hidden"),s.removeClass("wpmudev-hidden")):(i.addClass("wpmudev-hidden"),s.addClass("wpmudev-hidden"),n.removeClass("wpmudev-hidden"))},clickCounterUpdated:function(t){var i=e("#wpmudev-sshare-counter-options .hustle-twitter-notice");"native"===t?i.removeClass("wpmudev-hidden"):i.hasClass("wpmudev-hidden")||i.addClass("wpmudev-hidden"),e("#wph-wizard-services-icons-native .wpmudev-social-item").each(function(){var i=e(this).find(".toggle-checkbox").is(":checked"),s=e(this).find("input.wpmudev-input_number");"none"!==t&&i?s.removeClass("wpmudev-hidden"):s.hasClass("wpmudev-hidden")||s.addClass("wpmudev-hidden")}),e("#wph-wizard-services-icons-native #wpmudev-counter-title>strong").removeClass("wpmudev-hidden"),"none"===t?e("#wph-wizard-services-icons-native #wpmudev-counter-title>strong:first-child").addClass("wpmudev-hidden"):e("#wph-wizard-services-icons-native #wpmudev-counter-title>strong:nth-child(2)").addClass("wpmudev-hidden")},toggleCheckbox:function(e){var t=this.$(e.target).closest("li"),i=t.find("input"),s=i.data("attribute");e.preventDefault(),e.stopPropagation(),t.hasClass("current")||(t.addClass("current"),t.siblings().removeClass("current"),this.model.set(s,i.val()))},setSocialIcons:function(){var e=this.model.toJSON();e=this.getSocialIconsData(e),this.model.set("social_icons",e.social_icons,{silent:!0})},getSocialIconsData:function(t){var i=e("#wph-wizard-services-icons-"+t.service_type+" .wpmudev-social-item"),s={};return i.each(function(){var t=e(this),i=t.find("input.toggle-checkbox"),n=i.data("id"),o=t.find("input.wpmudev-input_number"),a=t.find("input.wpmudev-input_text");o.length&&(0>parseInt(o.val())&&o.val(0));i.is(":checked")&&(s[n]={enabled:!0,counter:o.length?o.val():"0",link:a.length?a.val():""})}),i.length&&(t.social_icons=s),t},addPlaceholderToField:function(t){var i=e(t.currentTarget),s=i.val(),n=i.data("field"),o=e('[name="'.concat(n,'"]')),a=o.val()+s;o.val(a).trigger("change")}}))}),Hustle.define("SShare.Design_View",function(e,t,i){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Model_Updater"),Hustle.get("Mixins.Module_Design"),{render:function(){this.createPickers(),Hustle.Events.off("modules.view.displayTypeUpdated").on("modules.view.displayTypeUpdated",e.proxy(this.viewChangedDisplayTab,this)),e('a[data-tab="appearance"]').on("click",e.proxy(this.updatePreview,this)),e('.sui-box[data-tab="display"] .sui-button[data-direction="next"').on("click",e.proxy(this.updatePreview,this)),e('.sui-box[data-tab="visibility"] .sui-button[data-direction="prev"').on("click",e.proxy(this.updatePreview,this)),this.updatePreview()},updatePreview:function(){e("#hui-preview-social-shares-floating").trigger("hustle_update_prewiev")},viewChanged:function(t){t.changed;"flat"===t.get("icon_style")?(e("#hustle-floating-icons-custom-background").addClass("sui-hidden"),e("#hustle-widget-icons-custom-background").addClass("sui-hidden")):(e("#hustle-floating-icons-custom-background").removeClass("sui-hidden"),e("#hustle-widget-icons-custom-background").removeClass("sui-hidden")),"outline"===t.get("icon_style")?(e("#hustle-floating-icons-custom-background .sui-label").text("Icon border"),e("#hustle-widget-icons-custom-background .sui-label").text("Icon border"),e("#hustle-floating-counter-border").addClass("sui-hidden"),e("#hustle-widget-counter-border").addClass("sui-hidden")):(e("#hustle-floating-icons-custom-background .sui-label").text("Icon background"),e("#hustle-widget-icons-custom-background .sui-label").text("Icon background"),e("#hustle-floating-counter-border").removeClass("sui-hidden"),e("#hustle-widget-counter-border").removeClass("sui-hidden")),this.updatePreview()},viewChangedDisplayTab:function(t){var i=t.get("inline_enabled"),s=t.get("widget_enabled"),n=t.get("shortcode_enabled"),o=t.get("float_desktop_enabled"),a=t.get("float_mobile_enabled"),l=_.intersection([1,"1","true"],[i,s,n]).length,r=_.intersection([1,"1","true"],[a,o]).length;r?(e("#hustle-appearance-floating-icons-row").show(),e("#hustle-appearance-floating-icons-placeholder").hide()):(e("#hustle-appearance-floating-icons-row").hide(),e("#hustle-appearance-floating-icons-placeholder").show()),l?(e("#hustle-appearance-widget-icons-row").show(),e("#hustle-appearance-widget-icons-placeholder").hide()):(e("#hustle-appearance-widget-icons-row").hide(),e("#hustle-appearance-widget-icons-placeholder").show()),l||r?(e("#hustle-appearance-icons-style").show(),e("#hustle-appearance-empty-message").hide()):(e("#hustle-appearance-icons-style").hide(),e("#hustle-appearance-empty-message").show(),e("#hustle-appearance-floating-icons-placeholder").hide(),e("#hustle-appearance-widget-icons-placeholder").hide())}}))}),Hustle.define("SShare.Display_View",function(e){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Module_Display"),{viewChanged:function(e){_.intersection(["float_desktop_enabled","float_mobile_enabled","inline_enabled","widget_enabled","shortcode_enabled"],Object.keys(e)).length?Hustle.Events.trigger("modules.view.displayTypeUpdated",this.model):"float_desktop_position"in e?"right"===e.float_desktop_position?(this.$("#hustle-float_desktop-left-offset-label").addClass("sui-hidden"),this.$("#hustle-float_desktop-right-offset-label").removeClass("sui-hidden"),this.$("#hustle-float_desktop-offset-x-wrapper").removeClass("sui-hidden")):"left"===e.float_desktop_position?(this.$("#hustle-float_desktop-left-offset-label").removeClass("sui-hidden"),this.$("#hustle-float_desktop-right-offset-label").addClass("sui-hidden"),this.$("#hustle-float_desktop-offset-x-wrapper").removeClass("sui-hidden")):this.$("#hustle-float_desktop-offset-x-wrapper").addClass("sui-hidden"):"float_desktop_position_y"in e?"bottom"===e.float_desktop_position_y?(this.$("#hustle-float_desktop-top-offset-label").addClass("sui-hidden"),this.$("#hustle-float_desktop-bottom-offset-label").removeClass("sui-hidden")):(this.$("#hustle-float_desktop-top-offset-label").removeClass("sui-hidden"),this.$("#hustle-float_desktop-bottom-offset-label").addClass("sui-hidden")):"float_mobile_position"in e?"right"===e.float_mobile_position?(this.$("#hustle-float_mobile-left-offset-label").addClass("sui-hidden"),this.$("#hustle-float_mobile-right-offset-label").removeClass("sui-hidden"),this.$("#hustle-float_mobile-offset-x-wrapper").removeClass("sui-hidden")):"left"===e.float_mobile_position?(this.$("#hustle-float_mobile-left-offset-label").removeClass("sui-hidden"),this.$("#hustle-float_mobile-right-offset-label").addClass("sui-hidden"),this.$("#hustle-float_mobile-offset-x-wrapper").removeClass("sui-hidden")):this.$("#hustle-float_mobile-offset-x-wrapper").addClass("sui-hidden"):"float_mobile_position_y"in e&&("bottom"===e.float_mobile_position_y?(this.$("#hustle-float_mobile-top-offset-label").addClass("sui-hidden"),this.$("#hustle-float_mobile-bottom-offset-label").removeClass("sui-hidden")):(this.$("#hustle-float_mobile-top-offset-label").removeClass("sui-hidden"),this.$("#hustle-float_mobile-bottom-offset-label").addClass("sui-hidden")))}}))}),Hustle.define("Modals.Services_Platforms",function(e){"use strict";return Backbone.View.extend({el:"#hustle-dialog--add-platforms",selectedPlatforms:[],events:{"click .sui-box-selector input":"selectPlatforms","click .hustle-cancel-platforms":"cancelPlatforms","click .sui-dialog-overlay":"cancelPlatforms","click #hustle-add-platforms":"addPlatforms"},initialize:function(e){this.selectedPlatforms=e,this.$(".hustle-add-platforms-option").prop("checked",!1).prop("disabled",!1);var t=!0,i=!1,s=void 0;try{for(var n,o=this.selectedPlatforms[Symbol.iterator]();!(t=(n=o.next()).done);t=!0){var a=n.value;this.$("#hustle-social--"+a).prop("checked",!0).prop("disabled",!0)}}catch(e){i=!0,s=e}finally{try{t||null==o.return||o.return()}finally{if(i)throw s}}},selectPlatforms:function(e){var t=this.$(e.target),i=this.$el.find('label[for="'+t.attr("id")+'"]'),s=t.val();i.toggleClass("selected"),t.prop("checked")?this.selectedPlatforms.push(s):this.selectedPlatforms=_.without(this.selectedPlatforms,s)},checkPlatforms:function(){var e=!0,t=!1,i=void 0;try{for(var s,n=this.selectedPlatforms[Symbol.iterator]();!(e=(s=n.next()).done);e=!0){var o=s.value;this.$("#hustle-social--"+o).prop("checked")||(this.selectedPlatforms=_.without(this.selectedPlatforms,o))}}catch(e){t=!0,i=e}finally{try{e||null==n.return||n.return()}finally{if(t)throw i}}},cancelPlatforms:function(){SUI.dialogs["hustle-dialog--add-platforms"].hide()},addPlatforms:function(e){var t=this.$(e.target);t.addClass("sui-button-onload"),this.checkPlatforms(),this.trigger("platforms:added",this.selectedPlatforms),setTimeout(function(){SUI.dialogs["hustle-dialog--add-platforms"].hide(),t.removeClass("sui-button-onload")},500)}})}),Hustle.define("SShare.View",function(e){"use strict";return Hustle.View.extend(_.extend({},Hustle.get("Mixins.Wizard_View"),{_events:{"hustle_update_prewiev #hui-preview-social-shares-floating":"updatePreview"},updatePreview:function(t){var i=_.extend({},this.model.toJSON(),this.getDataToSave());e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"hustle_preview_module",id:this.model.get("module_id"),previewData:i},success:function(t){if(t.success){var i=e("#hui-preview-social-shares-floating"),s=e("#hui-preview-social-shares-widget");i.html(t.data.floatingHtml),s.html(t.data.widgetHtml),t.data.style&&i.append(t.data.style),e(".hustle-share-icon").on("click",function(e){return e.preventDefault()})}}})},setTabsViews:function(e){this.contentView=e.contentView,this.displayView=e.displayView,this.designView=e.designView,this.visibilityView=e.visibilityView},renderTabs:function(){this.contentView.delegateEvents(),this.designView.delegateEvents(),this.displayView.delegateEvents(),this.visibilityView.delegateEvents(),this.visibilityView.afterRender()},sanitizeData:function(){},getDataToSave:function(){return{content:this.contentView.model.toJSON(),display:this.displayView.model.toJSON(),design:this.designView.model.toJSON(),visibility:this.visibilityView.model.toJSON()}}}))}),function(){"use strict";var e;(e="_page_hustle_popup_listing")===pagenow.substr(pagenow.length-e.length)&&new Optin.listingBase({moduleType:optinVars.current.module_type}),function(){var e="_page_hustle_popup";if(e===pagenow.substr(pagenow.length-e.length)){var t=Hustle.View.extend(Hustle.get("Mixins.Wizard_View")),i=Hustle.View.extend(Hustle.get("Mixins.Module_Content")),s=Hustle.View.extend(Hustle.get("Mixins.Module_Emails")),n=Hustle.View.extend(Hustle.get("Mixins.Module_Design")),o=Hustle.View.extend(Hustle.get("Mixins.Module_Visibility")),a=Hustle.View.extend(Hustle.get("Mixins.Module_Settings")),l=Hustle.get("Module.IntegrationsView"),r=Module.Model,d=Hustle.get("Models.M");new t({model:new r(optinVars.current.data||{}),contentView:new i({BaseModel:d}),emailsView:new s({BaseModel:d}),designView:new n({BaseModel:d}),integrationsView:new l({BaseModel:d}),visibilityView:new o({BaseModel:d}),settingsView:new a({BaseModel:d})})}}()}(),function(){"use strict";var e;(e="_page_hustle_slidein_listing")===pagenow.substr(pagenow.length-e.length)&&new Optin.listingBase({moduleType:optinVars.current.module_type}),function(){var e="_page_hustle_slidein";if(e===pagenow.substr(pagenow.length-e.length)){var t=Hustle.View.extend(Hustle.get("Mixins.Wizard_View")),i=Hustle.View.extend(Hustle.get("Mixins.Module_Content")),s=Hustle.View.extend(Hustle.get("Mixins.Module_Emails")),n=Hustle.View.extend(Hustle.get("Mixins.Module_Design")),o=Hustle.View.extend(Hustle.get("Mixins.Module_Visibility")),a=Hustle.View.extend(Hustle.get("Mixins.Module_Settings")),l=Hustle.get("Module.IntegrationsView"),r=Module.Model,d=Hustle.get("Models.M");new t({model:new r(optinVars.current.data||{}),contentView:new i({BaseModel:d}),emailsView:new s({BaseModel:d}),designView:new n({BaseModel:d}),integrationsView:new l({BaseModel:d}),visibilityView:new o({BaseModel:d}),settingsView:new a({BaseModel:d})})}}()}(),function(){"use strict";var e;(e="_page_hustle_embedded_listing")===pagenow.substr(pagenow.length-e.length)&&new Optin.listingBase({moduleType:optinVars.current.module_type}),function(){var e="_page_hustle_embedded";if(e===pagenow.substr(pagenow.length-e.length)){var t=Hustle.View.extend(Hustle.get("Mixins.Wizard_View")),i=Hustle.View.extend(Hustle.get("Mixins.Module_Content")),s=Hustle.View.extend(Hustle.get("Mixins.Module_Emails")),n=Hustle.View.extend(Hustle.get("Mixins.Module_Design")),o=Hustle.View.extend(Hustle.get("Mixins.Module_Display")),a=Hustle.View.extend(Hustle.get("Mixins.Module_Visibility")),l=Hustle.View.extend(Hustle.get("Mixins.Module_Settings")),r=Hustle.get("Module.IntegrationsView"),d=Module.Model,c=Hustle.get("Models.M");new t({model:new d(optinVars.current.data||{}),contentView:new i({BaseModel:c}),emailsView:new s({BaseModel:c}),designView:new n({BaseModel:c}),integrationsView:new r({BaseModel:c}),displayView:new o({BaseModel:c}),visibilityView:new a({BaseModel:c}),settingsView:new l({BaseModel:c})})}}()}(),function(){"use strict";var e;(e="_page_hustle_sshare_listing")===pagenow.substr(pagenow.length-e.length)&&new Optin.listingBase({moduleType:optinVars.current.module_type}),function(){var e="_page_hustle_sshare";if(e===pagenow.substr(pagenow.length-e.length)){var t=Hustle.get("SShare.View"),i=Hustle.get("SShare.Content_View"),s=Hustle.get("SShare.Display_View"),n=Hustle.get("SShare.Design_View"),o=Hustle.View.extend(Hustle.get("Mixins.Module_Visibility")),a=Module.Model,l=Hustle.get("Models.M");new t({model:new a(optinVars.current.data||{}),contentView:new i({BaseModel:l}),displayView:new s({BaseModel:l}),designView:new n({BaseModel:l}),visibilityView:new o({BaseModel:l})})}}()}(),Hustle.define("Dashboard.View",function(e,t,i){"use strict";"toplevel_page_hustle"===pagenow&&new(Backbone.View.extend({el:".sui-wrap",events:{"click .hustle-preview-module-button":"openPreview","click .hustle-delete-module-button":"openDeleteModal","click .hustle-free-version-create":"showUpgradeModal","click .sui-dropdown .hustle-onload-icon-action":"addLoadingIconToActionsButton","click .hustle-single-module-button-action":"handleSingleModuleAction"},initialize:function(t){e("#hustle-dialog--welcome").length&&this.openWelcomeDialog(),e("#hustle-dialog--migrate").length&&this.openMigrateDialog(),this.doActionsBasedOnUrl()},doActionsBasedOnUrl:function(){if(Module.Utils.getUrlParam("show-notice")){var e="success"===Module.Utils.getUrlParam("show-notice")?"success":"error",t=Module.Utils.getUrlParam("notice"),i=t&&"undefined"!==optinVars.messages.commons[t]?optinVars.messages.commons[t]:Module.Utils.getUrlParam("notice-message");void 0!==i&&i.length&&Module.Notification.open(e,i)}},openPreview:function(t){var i=e(t.currentTarget),s=i.data("id"),n=i.data("type");Module.preview.open(s,n)},showUpgradeModal:function(t){void 0!==t&&t.preventDefault(),e("#wph-upgrade-modal").addClass("wpmudev-modal-active")},openDeleteModal:function(t){t.preventDefault();var i=e(t.currentTarget),s={id:i.data("id"),nonce:i.data("nonce"),action:"delete",title:i.data("title"),description:i.data("description")};Module.deleteModal.open(s)},addLoadingIconToActionsButton:function(t){e(t.currentTarget).closest(".sui-dropdown").find(".sui-dropdown-anchor").addClass("sui-button-onload")},openWelcomeDialog:function(){Hustle.get("Modals.Welcome")},openMigrateDialog:function(){Hustle.get("Modals.Migration")},handleSingleModuleAction:function(e){Module.handleActions.initAction(e,"dashboard",this)},actionToggleStatus:function(e,t){var i=t.was_module_enabled;e.find("span").toggleClass("sui-hidden");var s=e.parents("td.hui-status").find("span.sui-tooltip");s.removeClass("sui-draft sui-published"),i?s.addClass("sui-draft").attr("data-tooltip",optinVars.messages.commons.draft):s.addClass("sui-published").attr("data-tooltip",optinVars.messages.commons.published)}}))}),Hustle.define("Integrations.View",function(e,t,i){"use strict";var s="_page_hustle_integrations";s===pagenow.substr(pagenow.length-s.length)&&new(Backbone.View.extend({el:".sui-wrap",events:{"click .connect-integration":"connectIntegration","keypress .connect-integration":"preventEnterKeyFromDoingThings"},initialize:function(){this.stopListening(Hustle.Events,"hustle:providers:reload",this.renderProvidersTables),this.listenTo(Hustle.Events,"hustle:providers:reload",this.renderProvidersTables),this.render()},render:function(){var e=this.$el.find("#hustle-not-connected-providers-section"),t=this.$el.find("#hustle-connected-providers-section");0<e.length&&0<t.length&&this.renderProvidersTables(),optinVars.integration_redirect&&this.handleIntegrationRedirect()},renderProvidersTables:function(){var t=this,i={};this.$el.find(".hustle-integrations-display").html('<div class="sui-notice sui-notice-sm sui-notice-loading"><p>'+optinVars.fetching_list+"</p></div>"),i.action="hustle_provider_get_providers",i._ajax_nonce=optinVars.providers_action_nonce,i.data={},e.post({url:ajaxurl,type:"post",data:i}).done(function(e){e&&e.success&&(t.$el.find("#hustle-not-connected-providers-section").html(e.data.not_connected),t.$el.find("#hustle-connected-providers-section").html(e.data.connected))}).always(function(){t.$el.find(".sui-notice-loading").remove()})},preventEnterKeyFromDoingThings:function(e){13!==e.which||e.preventDefault()},connectIntegration:function(e){Module.integrationsModal.open(e)},handleIntegrationRedirect:function(){var e=optinVars.integration_redirect,t=optinVars.integrations_migrate;if(window.history.pushState({},document.title,optinVars.integrations_url),"notification"===e.action){var i="success"===e.status?"success":"error",s=e.delay?e.delay:1e4;Module.Notification.open(i,e.message,s)}if(t.hasOwnProperty("provider_modal")&&"constantcontact"===t.provider_modal&&Module.ProviderMigration.open(t.provider_modal),t.hasOwnProperty("provider_modal")&&"aweber"===t.provider_modal&&Module.ProviderMigration.open(t.provider_modal,t.integration_id),t.hasOwnProperty("migration_notificaiton")){var n="success"===t.migration_notificaiton.status?"success":"error",o=t.migration_notificaiton.delay?t.migration_notificaiton.delay:1e4;Module.Notification.open(n,t.migration_notificaiton.message,o)}}}))}),Hustle.define("Entries.View",function(e){"use strict";var t="_page_hustle_entries";t===pagenow.substr(pagenow.length-t.length)&&new(Backbone.View.extend({el:".sui-wrap",events:{"click .sui-pagination-wrap .hustle-open-inline-filter":"openFilterInline","click .sui-pagination-wrap .hustle-open-dialog-filter":"openFilterModal","click #hustle-dialog--filter-entries .hustle-dialog-close":"closeFilterModal","click .hustle-delete-entry-button":"openDeleteModal","click .sui-active-filter-remove":"removeFilter","click .hustle-entries-clear-filter":"clearFilter"},initialize:function(t){var i={},s=e(".hui-entries-alert");void 0!==window.hustle_entries_datepicker_ranges&&(i=window.hustle_entries_datepicker_ranges),e("input.hustle-entries-filter-date").daterangepicker({autoUpdateInput:!1,autoApply:!0,alwaysShowCalendars:!0,ranges:i,locale:optinVars.daterangepicker}),e("input.hustle-entries-filter-date").on("apply.daterangepicker",function(t,i){e(this).val(i.startDate.format("MM/DD/YYYY")+" - "+i.endDate.format("MM/DD/YYYY"))}),s.length&&(s.attr("colspan",s.closest(".sui-table").find("> thead tr th").length),s.find("i").hide(),s.find("span").removeClass("sui-screen-reader-text"))},openFilterInline:function(e){var t=this.$(e.target),i=t.closest(".sui-pagination-wrap").find(".sui-button-icon"),s=t.closest(".hui-actions-bar").next(".sui-pagination-filter");i.toggleClass("sui-active"),s.toggleClass("sui-open"),e.preventDefault(),e.stopPropagation()},openFilterModal:function(e){SUI.dialogs["hustle-dialog--filter-entries"].show().on("show",function(e,t){e.getElementsByClassName("sui-dialog-content")[0].className="sui-dialog-content sui-fade-in"}),e.preventDefault()},closeFilterModal:function(e){SUI.dialogs["hustle-dialog--filter-entries"].hide(),SUI.dialogs["hustle-dialog--filter-entries"].on("hide",function(e,t){e.getElementsByClassName("sui-dialog-content")[0].className="sui-dialog-content sui-fade-out"}),e.preventDefault()},removeFilter:function(e){var t=this.$(e.target).data("filter"),i=new RegExp("&"+t+"=[^&]*","i");-1!==["order_by","search_email","date_range"].indexOf(t)&&(location.href=location.href.replace(i,""))},openDeleteModal:function(t){t.preventDefault();var i=e(t.target),s={id:i.data("id"),nonce:i.data("nonce"),action:"delete",title:i.data("title"),description:i.data("description"),actionClass:""};Module.deleteModal.open(s)},clearFilter:function(e){e.preventDefault(),this.$("input[name=search_email]").val(""),this.$("input[name=date_range]").val("")}}))}),Hustle.define("ProviderNotice.View",function(e,t,i){"use strict";new(Backbone.View.extend({el:".hustle-provider-notice",cookieKey:"",events:{"click .dismiss-provider-migration-notice":"HideProviderNotice"},initialize:function(){this.cookieKey="provider_migration_notice_",e(".hustle-provider-notice").length&&this.showProviderNotice()},HideProviderNotice:function(t){Optin.cookie.set(this.cookieKey+e(t.currentTarget).data("name"),1,7),location.reload()},showProviderNotice:function(){var t=e(".hustle-provider-notice").data("name");1!==Optin.cookie.get(this.cookieKey+t)&&e(".hustle_migration_notice__"+t).show()}}))}),Hustle.define("Settings.View",function(e,t,i){"use strict";"hustle_page_hustle_settings"===pagenow&&new(Backbone.View.extend({el:".sui-wrap",events:{"click .sui-sidenav .sui-vertical-tab a":"sidenav","change select.sui-mobile-nav":"sidenavMobile","click .sui-pagination-wrap > button":"pagination","click #hustle-dialog-open--reset-settings":"resetDialog","click .hustle-load-on-click":"addLoadingState","click .hustle-settings-save":"handleSave"},initialize:function(t){var s=Hustle.get("Settings.reCaptcha_Settings"),n=Hustle.get("Settings.Top_Metrics_View"),o=Hustle.get("Settings.Privacy_Settings"),a=Hustle.get("Settings.Permissions_View"),l=Hustle.get("Settings.Data_Settings"),r=Hustle.get("Settings.Palettes");this.recaptchaView=new s,new n,new o,new a,new l,new r,e(i).off("popstate",e.proxy(this.tabUpdate,this)),e(i).on("popstate",e.proxy(this.tabUpdate,this)),Hustle.Events.trigger("view.rendered",this),this.doActionsBasedOnUrl()},doActionsBasedOnUrl:function(){if(Module.Utils.getUrlParam("show-notice")){var e="success"===Module.Utils.getUrlParam("show-notice")?"success":"error",t=Module.Utils.getUrlParam("notice"),i=t&&"undefined"!==optinVars.messages[t]?optinVars.messages[t]:Module.Utils.getUrlParam("notice-message");void 0!==i&&i.length&&Module.Notification.open(e,i)}else Module.Utils.getUrlParam("404-downgrade-modal")&&this.$("#hustle-dialog--404-downgrade").length&&SUI.openModal("hustle-dialog--404-downgrade","hustle-popup-number")},sidenav:function(t){var i=e(t.target).data("tab");i&&this.tabJump(i,!0),t.preventDefault()},sidenavMobile:function(t){var i=e(t.currentTarget).val();i&&this.tabJump(i,!0)},tabUpdate:function(e){var t=e.originalEvent.state;t&&this.tabJump(t.tabSelected)},tabJump:function(e,t){var i=this.$el.find('a[data-tab="'+e+'"]'),s=i.closest(".sui-vertical-tabs").find(".sui-vertical-tab"),n=this.$el.find(".sui-box[data-tab]"),o=this.$el.find('.sui-box[data-tab="'+e+'"]');t&&history.pushState({tabSelected:e},"Hustle Settings","admin.php?page=hustle_settings§ion="+e),s.removeClass("current"),n.hide(),i.parent().addClass("current"),o.show()},pagination:function(e){var t=this.$(e.target).closest(".sui-pagination-wrap"),i=t.find(".sui-button-icon"),s=t.next(".sui-pagination-filter");i.toggleClass("sui-active"),s.toggleClass("sui-open"),e.preventDefault(),e.stopPropagation()},handleSave:function(t){t.preventDefault();var i=this,s=e(t.currentTarget),n=s.data("form-id"),o=s.data(),a=new FormData;if(tinyMCE.triggerSave(),void 0!==n){var l=e("#"+n);l.length&&(a=new FormData(l[0]),e.each(l.find("input[type=checkbox]"),function(){var t=e(this);t.is(":checked")||a.append(t.attr("name"),"0")}))}e.each(o,function(e,t){return a.append(e,t)}),a.append("_ajax_nonce",optinVars.current.save_settings_nonce),a.append("action","hustle_save_settings"),s.addClass("sui-button-onload"),s.prop("disabled",!0),e.ajax({url:ajaxurl,type:"POST",data:a,contentType:!1,processData:!1}).done(function(t){t.data?(t.data.callback&&"undefined"!==i[t.data.callback]&&i[t.data.callback](s,t.data,t.success),t.data.url?!0===t.data.url?location.reload():location.replace(t.data.url):t.data.notification&&Module.Notification.open(t.data.notification.status,t.data.notification.message,t.data.notification.delay),t.data.url||(e(".sui-button-onload").removeClass("sui-button-onload"),s.prop("disabled",!1))):(t.success?Module.Notification.open("success",optinVars.messages.settings_saved):Module.Notification.open("error",optinVars.messages.something_went_wrong),e(".sui-button-onload").removeClass("sui-button-onload"),s.prop("disabled",!1))}).error(function(t){e(".sui-button-onload").removeClass("sui-button-onload"),s.prop("disabled",!1),Module.Notification.open("error",optinVars.messages.something_went_wrong)})},actionSaveRecaptcha:function(){this.recaptchaView.maybeRenderRecaptchas()},resetDialog:function(t){var i=this.$(t.target),s=e("#hustle-dialog--reset-settings"),n=s.find("#dialogTitle"),o=s.find("#dialogDescription");n.text(i.data("dialog-title")),o.text(i.data("dialog-info")),SUI.dialogs["hustle-dialog--reset-settings"].show(),t.preventDefault()},addLoadingState:function(t){e(t.currentTarget).addClass("sui-button-onload")}}))});
|
assets/js/front.debug.js
CHANGED
@@ -1018,6 +1018,8 @@ if ( 'undefined' !== typeof Backbone ) {
|
|
1018 |
}
|
1019 |
|
1020 |
this.isShown = false;
|
|
|
|
|
1021 |
},
|
1022 |
|
1023 |
redirectOnExternalFormSubmit: function( e, submitDelay ) {
|
@@ -1106,13 +1108,15 @@ if ( 'undefined' !== typeof Backbone ) {
|
|
1106 |
|
1107 |
closeAfterSubmission: function( el, submitDelay ) {
|
1108 |
this.setCookiesAfterSubscription();
|
1109 |
-
this.close( el, submitDelay );
|
1110 |
},
|
1111 |
|
1112 |
-
|
1113 |
-
|
1114 |
-
this.
|
1115 |
-
|
|
|
|
|
1116 |
},
|
1117 |
|
1118 |
setCookiesAfterSubscription: function() {
|
@@ -1137,7 +1141,7 @@ if ( 'undefined' !== typeof Backbone ) {
|
|
1137 |
}
|
1138 |
},
|
1139 |
|
1140 |
-
|
1141 |
|
1142 |
// Save cookies for 'hide_after_cta' property
|
1143 |
if ( 'undefined' !== typeof this.data.settings.hide_after_cta && 'keep_show' !== this.data.settings.hide_after_cta ) {
|
@@ -1387,6 +1391,9 @@ if ( 'undefined' !== typeof Backbone ) {
|
|
1387 |
const $this = $( e.target );
|
1388 |
$this.closest( '.hustle-field' ).removeClass( 'hustle-field-error' );
|
1389 |
},
|
|
|
|
|
|
|
1390 |
clearRunningCompatInterval: function() {
|
1391 |
if ( 'undefined' !== typeof this.waitEnewsletterResult ) { // e-newsletter
|
1392 |
clearInterval( this.waitEnewsletterResult );
|
@@ -1408,7 +1415,8 @@ if ( 'undefined' !== typeof Backbone ) {
|
|
1408 |
logCtaConversion.save();
|
1409 |
}
|
1410 |
|
1411 |
-
this.
|
|
|
1412 |
}
|
1413 |
|
1414 |
});
|
@@ -1726,47 +1734,49 @@ if ( 'undefined' !== typeof Backbone ) {
|
|
1726 |
Hustle.Events.trigger( 'hustle_resize' );
|
1727 |
}, 300 ) );
|
1728 |
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
if ( 'popup' === module.module_type ) {
|
1733 |
-
new Optin.PopUp( module );
|
1734 |
|
1735 |
-
|
1736 |
-
|
1737 |
|
1738 |
-
|
|
|
1739 |
|
1740 |
-
|
1741 |
-
if ( embededs.length ) {
|
1742 |
-
embededs.each( function() {
|
1743 |
-
module.el = this;
|
1744 |
-
new Optin.Embedded( module );
|
1745 |
-
});
|
1746 |
-
} else {
|
1747 |
|
1748 |
-
|
1749 |
-
|
1750 |
-
setTimeout( function() {
|
1751 |
-
embededs = $( module.el );
|
1752 |
embededs.each( function() {
|
1753 |
module.el = this;
|
1754 |
new Optin.Embedded( module );
|
1755 |
});
|
1756 |
-
}
|
1757 |
-
}
|
1758 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1759 |
|
1760 |
-
|
1761 |
-
|
1762 |
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
|
|
|
|
|
|
1768 |
});
|
1769 |
|
1770 |
-
Optin.updateSshareNetworks();
|
1771 |
|
1772 |
}( jQuery, document, window ) );
|
1018 |
}
|
1019 |
|
1020 |
this.isShown = false;
|
1021 |
+
|
1022 |
+
this.stopPlayingAudioVideo();
|
1023 |
},
|
1024 |
|
1025 |
redirectOnExternalFormSubmit: function( e, submitDelay ) {
|
1108 |
|
1109 |
closeAfterSubmission: function( el, submitDelay ) {
|
1110 |
this.setCookiesAfterSubscription();
|
1111 |
+
setTimeout( () => this.close( el ), submitDelay );
|
1112 |
},
|
1113 |
|
1114 |
+
maybeCloseAfterCtaClick: function( el, delay ) {
|
1115 |
+
|
1116 |
+
if ( 'undefined' !== typeof this.data.settings.close_cta && '0' !== this.data.settings.close_cta ) {
|
1117 |
+
let me = this;
|
1118 |
+
setTimeout( () => me.close( el ), delay );
|
1119 |
+
}
|
1120 |
},
|
1121 |
|
1122 |
setCookiesAfterSubscription: function() {
|
1141 |
}
|
1142 |
},
|
1143 |
|
1144 |
+
maybeSetCookiesAfterCtaClick: function() {
|
1145 |
|
1146 |
// Save cookies for 'hide_after_cta' property
|
1147 |
if ( 'undefined' !== typeof this.data.settings.hide_after_cta && 'keep_show' !== this.data.settings.hide_after_cta ) {
|
1391 |
const $this = $( e.target );
|
1392 |
$this.closest( '.hustle-field' ).removeClass( 'hustle-field-error' );
|
1393 |
},
|
1394 |
+
stopPlayingAudioVideo( e ) {
|
1395 |
+
this.$el.find( 'audio, video' ).trigger( 'pause' );
|
1396 |
+
},
|
1397 |
clearRunningCompatInterval: function() {
|
1398 |
if ( 'undefined' !== typeof this.waitEnewsletterResult ) { // e-newsletter
|
1399 |
clearInterval( this.waitEnewsletterResult );
|
1415 |
logCtaConversion.save();
|
1416 |
}
|
1417 |
|
1418 |
+
this.maybeSetCookiesAfterCtaClick();
|
1419 |
+
this.maybeCloseAfterCtaClick( $this, submitDelay );
|
1420 |
}
|
1421 |
|
1422 |
});
|
1734 |
Hustle.Events.trigger( 'hustle_resize' );
|
1735 |
}, 300 ) );
|
1736 |
|
1737 |
+
$( document ).ready( () => {
|
1738 |
+
_.each( Modules, function( module, key ) {
|
1739 |
+
module.el = '.hustle_module_id_' + module.module_id;
|
|
|
|
|
1740 |
|
1741 |
+
if ( 'popup' === module.module_type ) {
|
1742 |
+
new Optin.PopUp( module );
|
1743 |
|
1744 |
+
} else if ( 'slidein' === module.module_type ) {
|
1745 |
+
new Optin.SlideIn( module );
|
1746 |
|
1747 |
+
} else if ( 'embedded' === module.module_type ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
1748 |
|
1749 |
+
let embededs = $( module.el );
|
1750 |
+
if ( embededs.length ) {
|
|
|
|
|
1751 |
embededs.each( function() {
|
1752 |
module.el = this;
|
1753 |
new Optin.Embedded( module );
|
1754 |
});
|
1755 |
+
} else {
|
|
|
1756 |
|
1757 |
+
//lazy load this so that modules loaded by ajax
|
1758 |
+
//can run properly
|
1759 |
+
setTimeout( function() {
|
1760 |
+
embededs = $( module.el );
|
1761 |
+
embededs.each( function() {
|
1762 |
+
module.el = this;
|
1763 |
+
new Optin.Embedded( module );
|
1764 |
+
});
|
1765 |
+
}, incOpt.script_delay );
|
1766 |
+
}
|
1767 |
|
1768 |
+
} else if ( 'social_sharing' === module.module_type ) {
|
1769 |
+
const sshares = $( module.el );
|
1770 |
|
1771 |
+
sshares.each( function() {
|
1772 |
+
module.el = this;
|
1773 |
+
new Optin.SShare( module );
|
1774 |
+
});
|
1775 |
+
}
|
1776 |
+
});
|
1777 |
+
|
1778 |
+
Optin.updateSshareNetworks();
|
1779 |
});
|
1780 |
|
|
|
1781 |
|
1782 |
}( jQuery, document, window ) );
|
assets/js/front.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t){var e="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self.self===self&&self||"object"==("undefined"==typeof global?"undefined":_typeof(global))&&global.global===global&&global;if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(i,n,s){e.Backbone=t(e,s,i,n)});else if("undefined"!=typeof exports){var i,n=require("underscore");try{i=require("jquery")}catch(t){}t(e,exports,n,i)}else e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}(function(t,e,i,n){var s=t.Backbone,r=Array.prototype.slice;e.VERSION="1.3.3",e.$=n,e.noConflict=function(){return t.Backbone=s,this},e.emulateHTTP=!1,e.emulateJSON=!1;var o=function(t,e,n){i.each(e,function(e,s){i[s]&&(t.prototype[s]=function(t,e,n){switch(t){case 1:return function(){return i[e](this[n])};case 2:return function(t){return i[e](this[n],t)};case 3:return function(t,s){return i[e](this[n],a(t,this),s)};case 4:return function(t,s,r){return i[e](this[n],a(t,this),s,r)};default:return function(){var t=r.call(arguments);return t.unshift(this[n]),i[e].apply(i,t)}}}(e,s,n))})},a=function(t,e){return i.isFunction(t)?t:i.isObject(t)&&!e._isModel(t)?l(t):i.isString(t)?function(e){return e.get(t)}:t},l=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}},u=e.Events={},c=/\s+/,h=function t(e,n,s,r,o){var a,l=0;if(s&&"object"===_typeof(s)){void 0!==r&&"context"in o&&void 0===o.context&&(o.context=r);for(a=i.keys(s);l<a.length;l++)n=t(e,n,a[l],s[a[l]],o)}else if(s&&c.test(s))for(a=s.split(c);l<a.length;l++)n=e(n,a[l],r,o);else n=e(n,s,r,o);return n};u.on=function(t,e,i){return d(this,t,e,i)};var d=function(t,e,i,n,s){(t._events=h(f,t._events||{},e,i,{context:n,ctx:t,listening:s}),s)&&((t._listeners||(t._listeners={}))[s.id]=s);return t};u.listenTo=function(t,e,n){if(!t)return this;var s=t._listenId||(t._listenId=i.uniqueId("l")),r=this._listeningTo||(this._listeningTo={}),o=r[s];if(!o){var a=this._listenId||(this._listenId=i.uniqueId("l"));o=r[s]={obj:t,objId:s,id:a,listeningTo:r,count:0}}return d(t,e,n,this,o),this};var f=function(t,e,i,n){if(i){var s=t[e]||(t[e]=[]),r=n.context,o=n.ctx,a=n.listening;a&&a.count++,s.push({callback:i,context:r,ctx:r||o,listening:a})}return t};u.off=function(t,e,i){return this._events?(this._events=h(p,this._events,t,e,{context:i,listeners:this._listeners}),this):this},u.stopListening=function(t,e,n){var s=this._listeningTo;if(!s)return this;for(var r=t?[t._listenId]:i.keys(s),o=0;o<r.length;o++){var a=s[r[o]];if(!a)break;a.obj.off(e,n,this)}return this};var p=function(t,e,n,s){if(t){var r,o=0,a=s.context,l=s.listeners;if(e||n||a){for(var u=e?[e]:i.keys(t);o<u.length;o++){var c=t[e=u[o]];if(!c)break;for(var h=[],d=0;d<c.length;d++){var f=c[d];n&&n!==f.callback&&n!==f.callback._callback||a&&a!==f.context?h.push(f):(r=f.listening)&&0==--r.count&&(delete l[r.id],delete r.listeningTo[r.objId])}h.length?t[e]=h:delete t[e]}return t}for(var p=i.keys(l);o<p.length;o++)delete l[(r=l[p[o]]).id],delete r.listeningTo[r.objId]}};u.once=function(t,e,n){var s=h(g,{},t,e,i.bind(this.off,this));return"string"==typeof t&&null==n&&(e=void 0),this.on(s,e,n)},u.listenToOnce=function(t,e,n){var s=h(g,{},e,n,i.bind(this.stopListening,this,t));return this.listenTo(t,s)};var g=function(t,e,n,s){if(n){var r=t[e]=i.once(function(){s(e,r),n.apply(this,arguments)});r._callback=n}return t};u.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),i=Array(e),n=0;n<e;n++)i[n]=arguments[n+1];return h(_,this._events,t,void 0,i),this};var _=function(t,e,i,n){if(t){var s=t[e],r=t.all;s&&r&&(r=r.slice()),s&&m(s,n),r&&m(r,[e].concat(n))}return t},m=function(t,e){var i,n=-1,s=t.length,r=e[0],o=e[1],a=e[2];switch(e.length){case 0:for(;++n<s;)(i=t[n]).callback.call(i.ctx);return;case 1:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r);return;case 2:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r,o);return;case 3:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r,o,a);return;default:for(;++n<s;)(i=t[n]).callback.apply(i.ctx,e);return}};u.bind=u.on,u.unbind=u.off,i.extend(e,u);var v=e.Model=function(t,e){var n=t||{};e||(e={}),this.cid=i.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(n=this.parse(n,e)||{});var s=i.result(this,"defaults");n=i.defaults(i.extend({},s,n),s),this.set(n,e),this.changed={},this.initialize.apply(this,arguments)};i.extend(v.prototype,u,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!i.iteratee(t,this)(this.attributes)},set:function(t,e,n){if(null==t)return this;var s;if("object"===_typeof(t)?(s=t,n=e):(s={})[t]=e,n||(n={}),!this._validate(s,n))return!1;var r=n.unset,o=n.silent,a=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=i.clone(this.attributes),this.changed={});var u=this.attributes,c=this.changed,h=this._previousAttributes;for(var d in s)e=s[d],i.isEqual(u[d],e)||a.push(d),i.isEqual(h[d],e)?delete c[d]:c[d]=e,r?delete u[d]:u[d]=e;if(this.idAttribute in s&&(this.id=this.get(this.idAttribute)),!o){a.length&&(this._pending=n);for(var f=0;f<a.length;f++)this.trigger("change:"+a[f],this,u[a[f]],n)}if(l)return this;if(!o)for(;this._pending;)n=this._pending,this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var n in this.attributes)e[n]=void 0;return this.set(e,i.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!i.isEmpty(this.changed):i.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&i.clone(this.changed);var e=this._changing?this._previousAttributes:this.attributes,n={};for(var s in t){var r=t[s];i.isEqual(e[s],r)||(n[s]=r)}return!!i.size(n)&&n},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=i.extend({parse:!0},t);var e=this,n=t.success;return t.success=function(i){var s=t.parse?e.parse(i,t):i;if(!e.set(s,t))return!1;n&&n.call(t.context,e,i,t),e.trigger("sync",e,i,t)},j(this,t),this.sync("read",this,t)},save:function(t,e,n){var s;null==t||"object"===_typeof(t)?(s=t,n=e):(s={})[t]=e;var r=(n=i.extend({validate:!0,parse:!0},n)).wait;if(s&&!r){if(!this.set(s,n))return!1}else if(!this._validate(s,n))return!1;var o=this,a=n.success,l=this.attributes;n.success=function(t){o.attributes=l;var e=n.parse?o.parse(t,n):t;if(r&&(e=i.extend({},s,e)),e&&!o.set(e,n))return!1;a&&a.call(n.context,o,t,n),o.trigger("sync",o,t,n)},j(this,n),s&&r&&(this.attributes=i.extend({},l,s));var u=this.isNew()?"create":n.patch?"patch":"update";"patch"!==u||n.attrs||(n.attrs=s);var c=this.sync(u,this,n);return this.attributes=l,c},destroy:function(t){t=t?i.clone(t):{};var e=this,n=t.success,s=t.wait,r=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(i){s&&r(),n&&n.call(t.context,e,i,t),e.isNew()||e.trigger("sync",e,i,t)};var o=!1;return this.isNew()?i.defer(t.success):(j(this,t),o=this.sync("delete",this,t)),s||r(),o},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||R();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=i.extend({},this.attributes,t);var n=this.validationError=this.validate(t,e)||null;return!n||(this.trigger("invalid",this,n,i.extend(e,{validationError:n})),!1)}});o(v,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes");var y=e.Collection=function(t,e){e||(e={}),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,i.extend({silent:!0},e))},b={add:!0,remove:!0,merge:!0},O={add:!0,remove:!1},x=function(t,e,i){i=Math.min(Math.max(i,0),t.length);var n,s=Array(t.length-i),r=e.length;for(n=0;n<s.length;n++)s[n]=t[n+i];for(n=0;n<r;n++)t[n+i]=e[n];for(n=0;n<s.length;n++)t[n+r+i]=s[n]};i.extend(y.prototype,u,{model:v,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:!1},e,O))},remove:function(t,e){e=i.extend({},e);var n=!i.isArray(t);t=n?[t]:t.slice();var s=this._removeModels(t,e);return!e.silent&&s.length&&(e.changes={added:[],merged:[],removed:s},this.trigger("update",this,e)),n?s[0]:s},set:function(t,e){if(null!=t){(e=i.extend({},b,e)).parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);var n=!i.isArray(t);t=n?[t]:t.slice();var s=e.at;null!=s&&(s=+s),s>this.length&&(s=this.length),s<0&&(s+=this.length+1);var r,o,a=[],l=[],u=[],c=[],h={},d=e.add,f=e.merge,p=e.remove,g=!1,_=this.comparator&&null==s&&!1!==e.sort,m=i.isString(this.comparator)?this.comparator:null;for(o=0;o<t.length;o++){r=t[o];var v=this.get(r);if(v){if(f&&r!==v){var y=this._isModel(r)?r.attributes:r;e.parse&&(y=v.parse(y,e)),v.set(y,e),u.push(v),_&&!g&&(g=v.hasChanged(m))}h[v.cid]||(h[v.cid]=!0,a.push(v)),t[o]=v}else d&&(r=t[o]=this._prepareModel(r,e))&&(l.push(r),this._addReference(r,e),h[r.cid]=!0,a.push(r))}if(p){for(o=0;o<this.length;o++)h[(r=this.models[o]).cid]||c.push(r);c.length&&this._removeModels(c,e)}var O=!1,w=!_&&d&&p;if(a.length&&w?(O=this.length!==a.length||i.some(this.models,function(t,e){return t!==a[e]}),this.models.length=0,x(this.models,a,0),this.length=this.models.length):l.length&&(_&&(g=!0),x(this.models,l,null==s?this.length:s),this.length=this.models.length),g&&this.sort({silent:!0}),!e.silent){for(o=0;o<l.length;o++)null!=s&&(e.index=s+o),(r=l[o]).trigger("add",r,this,e);(g||O)&&this.trigger("sort",this,e),(l.length||c.length||u.length)&&(e.changes={added:l,removed:c,merged:u},this.trigger("update",this,e))}return n?t[0]:t}},reset:function(t,e){e=e?i.clone(e):{};for(var n=0;n<this.models.length;n++)this._removeReference(this.models[n],e);return e.previousModels=this.models,this._reset(),t=this.add(t,i.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return r.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(t.attributes||t)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var n=e.length;return i.isFunction(e)&&(e=i.bind(e,this)),1===n||i.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(t){var e=(t=i.extend({parse:!0},t)).success,n=this;return t.success=function(i){var s=t.reset?"reset":"set";n[s](i,t),e&&e.call(t.context,n,i,t),n.trigger("sync",n,i,t)},j(this,t),this.sync("read",this,t)},create:function(t,e){var n=(e=e?i.clone(e):{}).wait;if(!(t=this._prepareModel(t,e)))return!1;n||this.add(t,e);var s=this,r=e.success;return e.success=function(t,e,i){n&&s.add(t,i),r&&r.call(i.context,t,e,i)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;(e=e?i.clone(e):{}).collection=this;var n=new this.model(t,e);return n.validationError?(this.trigger("invalid",this,n.validationError,e),!1):n},_removeModels:function(t,e){for(var i=[],n=0;n<t.length;n++){var s=this.get(t[n]);if(s){var r=this.indexOf(s);this.models.splice(r,1),this.length--,delete this._byId[s.cid];var o=this.modelId(s.attributes);null!=o&&delete this._byId[o],e.silent||(e.index=r,s.trigger("remove",s,this,e)),i.push(s),this._removeReference(s,e)}}return i},_isModel:function(t){return t instanceof v},_addReference:function(t,e){this._byId[t.cid]=t;var i=this.modelId(t.attributes);null!=i&&(this._byId[i]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var i=this.modelId(t.attributes);null!=i&&delete this._byId[i],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,n){if(e){if(("add"===t||"remove"===t)&&i!==this)return;if("destroy"===t&&this.remove(e,n),"change"===t){var s=this.modelId(e.previousAttributes()),r=this.modelId(e.attributes);s!==r&&(null!=s&&delete this._byId[s],null!=r&&(this._byId[r]=e))}}this.trigger.apply(this,arguments)}});o(y,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models");var w=e.View=function(t){this.cid=i.uniqueId("view"),i.extend(this,i.pick(t,I)),this._ensureElement(),this.initialize.apply(this,arguments)},k=/^(\S+)\s*(.*)$/,I=["model","collection","el","id","attributes","className","tagName","events"];i.extend(w.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=i.result(this,"events")),!t)return this;for(var e in this.undelegateEvents(),t){var n=t[e];if(i.isFunction(n)||(n=this[n]),n){var s=e.match(k);this.delegate(s[1],s[2],i.bind(n,this))}}return this},delegate:function(t,e,i){return this.$el.on(t+".delegateEvents"+this.cid,e,i),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,i){return this.$el.off(t+".delegateEvents"+this.cid,e,i),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(i.result(this,"el"));else{var t=i.extend({},i.result(this,"attributes"));this.id&&(t.id=i.result(this,"id")),this.className&&(t.class=i.result(this,"className")),this.setElement(this._createElement(i.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}}),e.sync=function(t,n,s){var r=E[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var o={type:r,dataType:"json"};if(s.url||(o.url=i.result(n,"url")||R()),null!=s.data||!n||"create"!==t&&"update"!==t&&"patch"!==t||(o.contentType="application/json",o.data=JSON.stringify(s.attrs||n.toJSON(s))),s.emulateJSON&&(o.contentType="application/x-www-form-urlencoded",o.data=o.data?{model:o.data}:{}),s.emulateHTTP&&("PUT"===r||"DELETE"===r||"PATCH"===r)){o.type="POST",s.emulateJSON&&(o.data._method=r);var a=s.beforeSend;s.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",r),a)return a.apply(this,arguments)}}"GET"===o.type||s.emulateJSON||(o.processData=!1);var l=s.error;s.error=function(t,e,i){s.textStatus=e,s.errorThrown=i,l&&l.call(s.context,t,e,i)};var u=s.xhr=e.ajax(i.extend(o,s));return n.trigger("request",n,u,s),u};var E={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var S=e.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},C=/\((.*?)\)/g,T=/(\(\?)?:\w+/g,$=/\*\w+/g,M=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend(S.prototype,u,{initialize:function(){},route:function(t,n,s){i.isRegExp(t)||(t=this._routeToRegExp(t)),i.isFunction(n)&&(s=n,n=""),s||(s=this[n]);var r=this;return e.history.route(t,function(i){var o=r._extractParameters(t,i);!1!==r.execute(s,o,n)&&(r.trigger.apply(r,["route:"+n].concat(o)),r.trigger("route",n,o),e.history.trigger("route",r,n,o))}),this},execute:function(t,e,i){t&&t.apply(this,e)},navigate:function(t,i){return e.history.navigate(t,i),this},_bindRoutes:function(){if(this.routes){this.routes=i.result(this,"routes");for(var t,e=i.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(M,"\\$&").replace(C,"(?:$1)?").replace(T,function(t,e){return e?t:"([^/?]+)"}).replace($,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var n=t.exec(e).slice(1);return i.map(n,function(t,e){return e===n.length-1?t||null:t?decodeURIComponent(t):null})}});var P=e.History=function(){this.handlers=[],this.checkUrl=i.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},U=/^[#\/]|\s+$/g,H=/^\/+|\/+$/g,A=/#.*$/;P.started=!1,i.extend(P.prototype,u,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(U,"")},start:function(t){if(P.started)throw new Error("Backbone.history has already been started");if(P.started=!0,this.options=i.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(H,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var n=document.body,s=n.insertBefore(this.iframe,n.firstChild).contentWindow;s.document.open(),s.document.close(),s.location.hash="#"+this.fragment}var r=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?r("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?r("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),P.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),i.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!P.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var i=this.root;""!==t&&"?"!==t.charAt(0)||(i=i.slice(0,-1)||"/");var n=i+t;if(t=this.decodeFragment(t.replace(A,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var s=this.iframe.contentWindow;e.replace||(s.document.open(),s.document.close()),this._updateHash(s.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){if(i){var n=t.href.replace(/(javascript:|#).*$/,"");t.replace(n+"#"+e)}else t.hash="#"+e}}),e.history=new P;v.extend=y.extend=S.extend=w.extend=P.extend=function(t,e){var n,s=this;return n=t&&i.has(t,"constructor")?t.constructor:function(){return s.apply(this,arguments)},i.extend(n,s,e),n.prototype=i.create(s.prototype,t),n.prototype.constructor=n,n.__super__=s.prototype,n};var R=function(){throw new Error('A "url" property or function must be specified')},j=function(t,e){var i=e.error;e.error=function(n){i&&i.call(e.context,t,n,e),t.trigger("error",t,n,e)}};return e}),function(t){"use strict";window.Hustle=function(t,e,i){var n={},s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g},r=_.extend({},Backbone.Events),o=Backbone.View.extend({initialize:function(){_.isFunction(this.initMix)&&this.initMix.apply(this,arguments),this.render&&(this.render=_.wrap(this.render,function(t){this.trigger("before_render"),t.call(this),r.trigger("view.rendered",this),this.trigger("rendered")})),_.isFunction(this.init)&&this.init.apply(this,arguments)}}),a=_.memoize(function(t){var e;return function(i){return(e=e||_.template(document.getElementById(t).innerHTML,null,s))(i).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),l=_.memoize(function(t){var e;return function(i){return(e=e||_.template(t,null,s))(i)}});return{define:function(s,r){if(s.split(".").length)!function n(s,o){var a,l=s.split("."),u=l.splice(0,1)[0];u&&(l.length?o[u]=o[u]||{}:(a=r.call(null,t,e,i),o[u]=_.isFunction(a)||void 0===a?a:_.extend(o[u]||{},a)),l.length&&u&&n(l.join("."),o[u]))}(s,n);else{var o=n[s]||{};n[s]=_.extend(o,r.call(null,t,e,i))}},getModules:function(){return n},get:function(t){var e,i;return t.split(".").length?(e=!1,(i=function(t,n){var s=t.split("."),r=s.splice(0,1)[0];e=n[r],s.length&&i(s.join("."),n[r])})(t,n),e):n[t]||!1},Events:r,View:o,template:a,createTemplate:l,getTemplateOptions:function(){return t.extend(!0,{},s)},cookie:{set:function(e,i,n){var s,r;i=t.isArray(i)||t.isPlainObject(i)?JSON.stringify(i):i,isNaN(n)?r="":((s=new Date).setTime(s.getTime()+24*n*60*60*1e3),r="; expires="+s.toGMTString()),document.cookie=e+"="+i+r+"; path=/"},get:function(t){var e,i,n,s=document.cookie.split(";"),r=s.length;for(n=t+"=",e=0;e<r;e+=1){for(i=s[e];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(n)){var o=i.substring(n.length,i.length);return o?JSON.parse(o):o}}return null}},consts:{ModuleShowCount:"hustle_module_show_count-"}}}(jQuery,document,window)}(jQuery);var Optin=Optin||{};function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _readOnlyError(t){throw new Error('"'+t+'" is read-only')}Optin.View={},Optin.Models={},Optin.Events={},"undefined"!=typeof Backbone&&_.extend(Optin.Events,Backbone.Events),function(t){"use strict";Optin.NEVER_SEE_PREFIX="inc_optin_never_see_again-",Optin.COOKIE_PREFIX="inc_optin_long_hidden-",Optin.POPUP_COOKIE_PREFIX="inc_optin_popup_long_hidden-",Optin.SLIDE_IN_COOKIE_PREFIX="inc_optin_slide_in_long_hidden-",Optin.EMBEDDED_COOKIE_PREFIX="inc_optin_embedded_long_hidden-",Optin.globalMixin=function(){_.mixin({log:function(){},toBool:function(t){return _.isBoolean(t)?t:_.isString(t)&&-1!==["true","false","1"].indexOf(t.toLowerCase())?"true"===t.toLowerCase()||"1"===t.toLowerCase():_.isNumber(t)?!!t:!(_.isUndefined(t)||_.isNull(t)||_.isNaN(t))&&t},isTrue:function(t){return!(_.isUndefined(t)||_.isNull(t)||_.isNaN(t))&&(_.isNumber(t)?0!==t:(t=t.toString().toLowerCase(),-1!==["1","true","on"].indexOf(t)))},isFalse:function(t){return!_.isTrue(t)},controlBase:function(t,e,i){return i=_.isUndefined(i)?"checked":i,t=_.toBool(t),e=_.isBoolean(t)?_.isTrue(e):e,_.isEqual(t,e)?i+"="+i:""},checked:function(t,e){return _.controlBase(t,e,"checked")},selected:function(t,e){return _.controlBase(t,e,"selected")},disabled:function(t,e){return _.controlBase(t,e,"disabled")},class:function(t,e,i){return _.isTrue(t)?e:void 0!==i?i:""},add_class:function(t,e,i){return"class={class}".replace("{class}",_.class(t,e,i))},toUpperCase:function(t){return _.isString(t)?t.toUpperCase():""}}),_.findKey||_.mixin({findKey:function(t,e,i){e=cb(e,i);for(var n,s=_.keys(t),r=0,o=s.length;r<o;r++)if(e(t[n=s[r]],n,t))return n}})},Optin.globalMixin(),Backbone.Model.prototype.toJSON=function(){var t,e=_.clone(this.attributes);for(t in e)(e[t]instanceof Backbone.Model||Backbone.Collection&&e[t]instanceof Backbone.Collection)&&(e[t]=e[t].toJSON());return e},Optin.template=_.memoize(function(e){var i,n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g};return function(s){return(i=i||_.template(t("#"+e).html(),null,n))(s).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),Optin.templateCompat=_.memoize(function(e){var i;return function(n){return(i=i||_.template(t("#"+e).html()))(n).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),Optin.cookie=Hustle.cookie,Optin.Mixins={_mixins:{},_servicesMixins:{},_desingMixins:{},_displayMixins:{},add:function(t,e){this._mixins[t]=e},getMixins:function(){return this._mixins},addServicesMixin:function(t,e){this._servicesMixins[t]=e},getServicesMixins:function(){return this._servicesMixins}}}(jQuery),function(t){"use strict";var e=window.Optin||{};incOpt.is_admin||(e.moduleLogView=Backbone.Model.extend({url:incOpt.ajaxurl+"?action=hustle_module_viewed",defaults:{page_id:incOpt.page_id},parse:function(t){t.success}}),t(document).on("hustle:module:displayed",function(t,i){if("object"===_typeof(i)){var n=i.moduleType,s=Hustle.consts.ModuleShowCount+n+"-"+i.moduleId,r=Hustle.cookie.get(s);Hustle.cookie.set(s,r+1,30);var o="undefined"!==i.$el.data("sub-type")?i.$el.data("sub-type"):null;if(void 0!==e.moduleLogView&&i.isTrackingEnabled){var a=new e.moduleLogView;a.set("module_sub_type",o),a.set("module_type",n),a.set("module_id",i.moduleId),a.save()}}}),e.updateSshareNetworks=function(i){var n=void 0===i?e.networksToRetrieve:i;void 0!==n&&n.length&&t.ajax({type:"POST",url:incOpt.ajaxurl,dataType:"json",data:{action:"hustle_update_network_shares",postId:incOpt.page_id,networks:n}}).done(function(e){if(e.success){var i=e.data;t.each(i.networks,function(e,n){var s=t('.hustle-share-icon[data-counter="native"][data-network="'.concat(e,'"]'));s.length&&s.each(function(){var e=t(this).find(".hustle-counter"),s=parseInt(t(this).data("count"),10);s>parseInt(n,10)&&(n=parseInt(s,10));var r="";r=1e3>n?n:1e6>n?(n/1e3).toFixed(1)+i.shorten.thousand:(n/1e6).toFixed(1)+i.shorten.million,e.text(r)})})}})})}(jQuery),function(t){t(document).on("submit","form.hustle-unsubscribe-form",function(e){e.preventDefault();var i=t(e.target),n=i.find(".hustle-email-section"),s=i.serialize(),r=i.find("button"),o=i.find(".wpoi-submit-failure");return r.attr("disabled",!0),r.addClass("sui-button-onload"),i.on("keypress",function(){return o.hide()}),t.ajax({type:"POST",url:incOpt.ajaxurl,dataType:"json",data:{action:"hustle_unsubscribe_form_submission",data:s},success:function(t){t.success&&!0===t.success?(n.hide(),o.hide(),t.data.wrapper&&t.data.html&&i.find(t.data.wrapper).html(t.data.html)):t.data.html&&(o.text(t.data.html),o.show())},error:function(){o.text(o.data("default-error")),o.show()},complete:function(){r.attr("disabled",!1),r.removeClass("sui-button-onload")}}),!1})}(jQuery),function(t,e,i){"use strict";incOpt.is_upfront||(incOpt.is_admin||(Optin.ModuleLogConversion=Backbone.Model.extend({url:incOpt.ajaxurl+"?action=hustle_module_converted",defaults:{page_id:incOpt.page_id},parse:function(t){t.success}})),Optin.Module=Backbone.View.extend({moduleId:"",moduleType:"",settings:{},data:{},appearAfter:"time",parent:"body",cookieKey:"",neverSeeCookieKey:"",isShown:!1,events:{"click .hustle-button-cta":"ctaClicked"},close:_.noop,initialize:function(t){this.data=t,this.moduleId=t.module_id,this.settings=t.settings,this.moduleType=t.module_type,this.isTrackingEnabled="enabled"===this.$el.data("tracking"),this.setOnInit(t),this.shouldDisplay()?this.render():this.$el.css("display","none")},setOnInit:function(){"optin"===this.data.module_mode&&(this.$el.off("submit").on("submit",t.proxy(this,"handleSubmission")),this.$el.find(".hustle-layout-form").off("change").on("change",t.proxy(this,"onInputChange"))),this.expiration=parseInt(this.settings.expiration,10),this.expirationDays=this.getExpirationDays(),this.appearAfter=this.settings.triggers.trigger,this.triggers={onTimeDelay:this.settings.triggers.on_time_delay,onTimeUnit:this.settings.triggers.on_time_unit,onScroll:this.settings.triggers.on_scroll,onScrollPagePercent:parseInt(this.settings.triggers.on_scroll_page_percent),onScrollCssSelector:this.settings.triggers.on_scroll_css_selector,enableOnClickElement:this.settings.triggers.enable_on_click_element,onClickElement:this.settings.triggers.on_click_element,enableOnClickShortcode:this.settings.triggers.enable_on_click_shortcode,onExitIntentperSession:this.settings.triggers.on_exit_intent_per_session,onExitIntentDelayed:this.settings.triggers.on_exit_intent_delayed,onExitIntentDelayedTime:this.settings.triggers.on_exit_intent_delayed_time,onExitIntentDelayedUnit:this.settings.triggers.on_exit_intent_delayed_unit,onAdblock:this.settings.triggers.on_adblock},"popup"===this.moduleType?this.cookieKey=Optin.POPUP_COOKIE_PREFIX+this.moduleId:"slidein"===this.moduleType?this.cookieKey=Optin.SLIDE_IN_COOKIE_PREFIX+this.moduleId:"embedded"===this.moduleType&&(this.cookieKey=Optin.EMBEDDED_COOKIE_PREFIX+this.moduleId),this.neverSeeCookieKey=Optin.NEVER_SEE_PREFIX+this.moduleType+"-"+this.moduleId},shouldDisplay:function(){if(!this.$el.length)return!1;var t,e=Optin.cookie.get(this.neverSeeCookieKey);return(e=parseInt(e)===parseInt(this.moduleId))?t=!1:(t="no_show_on_post"===this.settings.after_close?0<parseInt(incOpt.page_id,10)?!_.isTrue(Optin.cookie.get(this.cookieKey+"_"+incOpt.page_id)):0!==parseInt(incOpt.page_id,10)||!incOpt.page_slug||!_.isTrue(Optin.cookie.get(this.cookieKey+"_"+incOpt.page_slug)):"no_show_all"!==this.settings.after_close||!_.isTrue(Optin.cookie.get(this.cookieKey)))?("no_show_on_post"===this.data.settings.hide_after_subscription?t=0<parseInt(incOpt.page_id,10)?!_.isTrue(Optin.cookie.get(this.cookieKey+"_success_"+incOpt.page_id)):0!==parseInt(incOpt.page_id,10)||!incOpt.page_slug||!_.isTrue(Optin.cookie.get(this.cookieKey+"_"+incOpt.page_slug)):"no_show_all"===this.data.settings.hide_after_subscription&&(t=!_.isTrue(Optin.cookie.get(this.cookieKey+"_success"))),t?("no_show_on_post"===this.data.settings.hide_after_cta?t=0<parseInt(incOpt.page_id,10)?!_.isTrue(Optin.cookie.get(this.cookieKey+"_cta_success_"+incOpt.page_id)):0!==parseInt(incOpt.page_id,10)||!incOpt.page_slug||!_.isTrue(Optin.cookie.get(this.cookieKey+"_cta_"+incOpt.page_slug)):"no_show_all"===this.data.settings.hide_after_cta&&(t=!_.isTrue(Optin.cookie.get(this.cookieKey+"_cta_success"))),t):t):t},getExpirationDays:function(){switch(this.settings.expiration_unit){case"months":return 30*this.expiration;case"weeks":return 7*this.expiration;case"hours":return this.expiration/24;case"minutes":return this.expiration/1440;case"seconds":return this.expiration/86400;default:return this.expiration}},render:function(){"function"==typeof this[this.appearAfter+"Trigger"]&&(this[this.appearAfter+"Trigger"](),this.$el.off("hustle:module:closed").on("hustle:module:closed",t.proxy(this,"onModuleClosed","click_close_icon")),this.$el.off("hustle:module:hidden").on("hustle:module:hidden",t.proxy(this,"onModuleClosed","auto_hide")),this.$el.off("hustle:module:click_outside").on("hustle:module:click_outside",t.proxy(this,"onModuleClosed","click_outside")),this.$el.off("hustle:module:esc_key_pressed").on("hustle:module:esc_key_pressed",t.proxy(this,"onModuleClosed","esc_key")),this.$el.off("hustle:module:clicked_never_see").on("hustle:module:clicked_never_see",t.proxy(this,"onModuleClosed","click_never_see"))),HUI.inputFilled()},executeRecaptcha:function(t,e){var i=e.data().version;if("v2_checkbox"===i)this.doSubmit(t);else{var n={};"v3_recaptcha"===i&&(n.action="contact"),grecaptcha.execute(e.attr("recaptcha-id"),n)}},display:function(){this.isShown||(this.beforeShowModule(),this.showModule(),t(document).trigger("hustle:module:displayed",this),this.isShown=!0)},beforeShowModule:function(){if(this.handleCompatibility(),HUI.maybeRenderRecaptcha(this.$el,this),this.$el.find(".hustle-select2").length&&HUI.select2(),this.$el.find(".hustle-time").length&&HUI.timepicker(".hustle-time"),this.$el.find(".hustle-date").length){var e=t(".hustle-date"),i=incOpt.days_and_months;_.each(e,function(t){HUI.datepicker(t,i.days_full,i.days_short,i.days_min,i.months_full,i.months_short)})}HUI.inputFilled()},timeTrigger:function(){var e=1e3*parseInt(this.triggers.onTimeDelay,10);"minutes"===this.triggers.onTimeUnit?e*=60:"hours"===this.triggers.onTimeUnit&&(e*=3600),_.delay(t.proxy(this,"display"),e)},clickTrigger:function(){var e=this,i="";_.isTrue(this.triggers.enableOnClickElement)&&""!==(i=t.trim(this.triggers.onClickElement))&&(t(i).length&&t(document).on("click",i,function(t){t.preventDefault(),e.display()}));_.isTrue(this.triggers.enableOnClickShortcode)&&t(document).on("click",".hustle_module_shortcode_trigger",function(i){i.preventDefault(),t(this).data("id")==e.moduleId&&t(this).data("type")==e.type&&e.display()})},scrollTrigger:function(){var n=this,s=!1;if("scrolled"===this.triggers.onScroll&&t(i).scroll(_.debounce(function(){s||100*i.pageYOffset/t(e).height()>=parseFloat(n.triggers.onScrollPagePercent)&&(n.display(),s=!0)},50)),"selector"===this.triggers.onScroll){var r=t(this.triggers.onScrollCssSelector);r.length&&t(i).scroll(_.debounce(function(){s||i.pageYOffset>=r.offset().top&&(n.display(),s=!0)},50))}},exit_intentTrigger:function(){var i=this,n=0;_.isTrue(this.triggers.onExitIntentDelayed)&&(n=1e3*parseInt(this.triggers.onExitIntentDelayedTime,10),"minutes"===this.triggers.onExitIntentDelayedTime?n*=60:"hours"===this.triggers.onExitIntentDelayedTime&&(n*=3600)),_.isTrue(this.triggers.onExitIntentperSession)?t(e).on("mouseleave",_.debounce(function(e){t("input").is(":focus")||(i.setExitTimer(),t(this).off(e))},300)):t(e).on("mouseleave",_.debounce(function(e){t("input").is(":focus")||i.setExitTimer()},300)),t("html").on("mousemove",_.debounce(function(t){i.resetExitTimer()},300)),this.exitTimer=null,this.resetExitTimer=function(){i.exitTimer&&clearTimeout(i.exitTimer)},this.setExitTimer=function(){i.exitTimer=setTimeout(function(){i.exitTimer=null,i.display()},n)}},adblockTrigger:function(){!t("#hustle_optin_adBlock_detector").length&&_.isTrue(this.triggers.onAdblock)&&this.display()},convertToMicroseconds:function(t,e){return"seconds"===e?1e3*parseInt(t,10):"minutes"===e?60*parseInt(t,10)*1e3:60*parseInt(t,10)*60*1e3},onModuleClosed:function(e){this.clearRunningCompatInterval(),this.$el.find("iframe").each(function(){t(this).attr("src",t(this).attr("src"))}),Array.isArray(this.settings.after_close_trigger)&&-1!==this.settings.after_close_trigger.indexOf(e)?"no_show_on_post"===this.settings.after_close?0<parseInt(incOpt.page_id,10)?Optin.cookie.set(this.cookieKey+"_"+incOpt.page_id,this.moduleId,this.expirationDays):0===parseInt(incOpt.page_id,10)&&incOpt.page_slug&&Optin.cookie.set(this.cookieKey+"_"+incOpt.page_slug,this.moduleId,this.expirationDays):"no_show_all"===this.settings.after_close&&Optin.cookie.set(this.cookieKey,this.moduleId,this.expirationDays):"click_never_see"===e&&Hustle.cookie.set(this.neverSeeCookieKey,this.moduleId,this.expirationDays),this.isShown=!1},redirectOnExternalFormSubmit:function(e,i){this.setCookiesAfterSubscription();var n=t(e.target);n.attr("action")&&setTimeout(function(){return window.location.replace(n.attr("action"))},i)},handleCompatibility:function(){var e=this,i=this.data.settings.on_submit,n=this.convertToMicroseconds(this.data.settings.on_submit_delay,this.data.settings.on_submit_delay_unit);-1!==t.inArray(i,["close","default"])&&"embedded"!==this.moduleType?(this.$el.find("form.wpcf7-form").length&&this.$el.on("wpcf7mailsent",function(){return e.closeAfterSubmission(e.el,n)}),this.$(".forminator-custom-form").length&&this.$el.on("forminator:form:submit:success",function(){return e.closeAfterSubmission(e.el,n)}),this.$(".gform_wrapper").length&&t(document).on("gform_confirmation_loaded",function(){return e.closeAfterSubmission(e.el,n)}),this.$(".nf-form-cont").length&&t(document).on("nfFormSubmitResponse",function(){return e.closeAfterSubmission(e.el,n)})):"redirect"===i&&(this.$el.find("form.wpcf7-form").length&&this.$el.on("wpcf7mailsent",function(t){return e.redirectOnExternalFormSubmit(t,n)}),this.$(".forminator-custom-form").length&&this.$el.on("forminator:form:submit:success",function(t){return e.redirectOnExternalFormSubmit(t,n)}),this.$(".gform_wrapper").length&&t(document).on("gform_confirmation_loaded",function(t){return e.redirectOnExternalFormSubmit(t,n)}),this.$(".nf-form-cont").length&&t(document).on("nfFormSubmitResponse",function(t){return e.redirectOnExternalFormSubmit(t,n)}));var s=this.$el.find("form#subscribes_form"),r=1e3;s.length&&(e.waitEnewsletterResult=setInterval(function(){r+=(_readOnlyError("enewsletterWaited"),1e3);var t=e.$el.find("#message");_.isEmpty(t.text().trim())&&216e6!==r||e.close()},1e3))},closeAfterSubmission:function(t,e){this.setCookiesAfterSubscription(),this.close(t,e)},closeAfterCtaClick:function(t,e){var i=this;this.setCookiesAfterCtaClick(),setTimeout(function(){return i.close(t)},e)},setCookiesAfterSubscription:function(){if(void 0!==this.data.settings.hide_after_subscription&&"keep_show"!==this.data.settings.hide_after_subscription){var t,e=this.data.module_id;"popup"===this.data.module_type?t=Optin.POPUP_COOKIE_PREFIX+e:"slidein"===this.data.module_type?t=Optin.SLIDE_IN_COOKIE_PREFIX+e:"embedded"===this.data.module_type&&(t=Optin.EMBEDDED_COOKIE_PREFIX+e),"no_show_on_post"===this.data.settings.hide_after_subscription?Optin.cookie.set(t+"_success_"+incOpt.page_id,e):"no_show_all"===this.data.settings.hide_after_subscription&&Optin.cookie.set(t+"_success",e)}},setCookiesAfterCtaClick:function(){if(void 0!==this.data.settings.hide_after_cta&&"keep_show"!==this.data.settings.hide_after_cta){var t,e=this.data.module_id;"popup"===this.data.module_type?t=Optin.POPUP_COOKIE_PREFIX+e:"slidein"===this.data.module_type?t=Optin.SLIDE_IN_COOKIE_PREFIX+e:"embedded"===this.data.module_type&&(t=Optin.EMBEDDED_COOKIE_PREFIX+e),"no_show_on_post"===this.data.settings.hide_after_cta?Optin.cookie.set(t+"_cta_success_"+incOpt.page_id,e):"no_show_all"===this.data.settings.hide_after_cta&&Optin.cookie.set(t+"_cta_success",e)}},handleSubmission:function(e){e.preventDefault();var i=t(e.target);if(!i.data("sending")){var n=HUI.optinValidate(this.$el);if((n=this.validateSubmission(n)).length)HUI.optinError(i.find(".hustle-error-message"),n);else{HUI.optinSubmit(i.find(".hustle-button-submit"));var s=i.find(".hustle-recaptcha");s.length?this.executeRecaptcha(i,s):this.doSubmit(i)}}},doSubmit:function(e){var i=this,n=e.serialize(),s=e.find('input[name="hustle_module_id"]').val(),r=e.find("#hustle-modal-gdpr-"+s+":checked").val(),o=e.find(".hustle-error-message"),a=(o.find("p"),o.data("default-error"),_.find(Modules,function(t,e){return parseInt(s,10)===parseInt(t.module_id,10)}));e.trigger("hustle:module:submit",n),e.data("sending",!0),t.ajax({type:"POST",url:incOpt.ajaxurl,dataType:"json",data:{action:"hustle_module_form_submit",data:{form:n,module_id:s,gdpr:r,uri:encodeURI(window.location.href)}},success:function(t){if(t&&t.success){var r;if(e.trigger("hustle:module:submit:success",n),i.setCookiesAfterSubscription(),void 0!==a.settings.hide_after_subscription)"popup"===a.module_type?r=Optin.POPUP_COOKIE_PREFIX+s:"slidein"===a.module_type?r=Optin.SLIDE_IN_COOKIE_PREFIX+s:"embedded"===a.module_type&&(r=Optin.EMBEDDED_COOKIE_PREFIX+s),"no_show_on_post"===a.settings.hide_after_subscription?(0<parseInt(incOpt.page_id,10)?Optin.cookie.set(r+"_success_"+incOpt.page_id,s):0===parseInt(incOpt.page_id,10)&&incOpt.page_slug&&Optin.cookie.set(r+"_success_"+incOpt.page_slug,s),Optin.cookie.set(r+"_success_"+incOpt.page_id,s)):"no_show_all"===a.settings.hide_after_subscription&&Optin.cookie.set(r+"_success",s);if("redirect"===t.data.behavior.after_submit&&0<t.data.behavior.url.length)window.location.assign(t.data.behavior.url);else{var l=i.$(".hustle-success"),u=i.$(".hustle-success-content");t.data.message&&u.length&&u.html(t.data.message),HUI.optinSuccess(l,l.data("close-delay"))}}else{e.trigger("hustle:module:submit:failed",n);var c=e.find(".hustle-recaptcha").attr("recaptcha-id");c&&grecaptcha.reset(c),HUI.optinError(o,t.data.errors)}},error:function(){e.trigger("hustle:module:submit:failed",n),HUI.optinError(o)},complete:function(){e.data("sending",!1),e.find(".hustle-button-onload").removeClass("hustle-button-onload")}})},validateSubmission:function(e){var i=this,n=this.$el.find('[data-validate="1"]'),s=/^(([^<>()\[\]\\.,;:\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,}))$/i,r=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)?/i;return t.each(n,function(n,o){var a=t(o),l=String(a.val()).trim().toLowerCase();if(l.length){var u=!0;if("email"===a.attr("type"))u=s.test(l);else if("url"===a.attr("type"))u=r.test(l);else if("datepicker"===a.attr("type")){var c=a.data("format").toString(),h="";"mm/dd/yy"===c||"mm/dd/yy"===c||"mm.dd.yy"===c||"mm.dd.yy"===c||"mm-dd-yy"===c||"mm-dd-yy"===c?h=/^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.](19|20)\d\d/:"dd/mm/yy"===c||"dd/mm/yy"===c||"dd.mm.yy"===c||"dd.mm.yy"===c||"dd-mm-yy"===c||"dd-mm-yy"===c?h=/^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.](19|20)\d\d/:"yy/mm/dd"!==c&&"Y/m/d"!==c&&"yy.mm.dd"!==c&&"Y.m.d"!==c&&"yy-mm-dd"!==c&&"Y-m-d"!==c||(h=/^(19|20)\d\d[- \/.](0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])/),""!==h&&(u=h.test(l))}else"timepicker"===a.attr("type")&&(u=i.validateTime(l,a.data("time-format")));u||(a.closest(".hustle-field").addClass("hustle-field-error"),e.push(a.data("validation-error")))}}),e},validateTime:function(e,i){var n=e.match(/^(\d{1,2}):(\d{2})(:00)?( [apAP][mM])?$/);return!!n&&("HH:mm"==i?!(23<n[1])&&!(59<n[2]):!(1>n[1]||12<n[1])&&(!(59<n[2])&&("am"===t.trim(n[4].toLowerCase())||"pm"===t.trim(n[4].toLowerCase()))))},onInputChange:function(e){t(e.target).closest(".hustle-field").removeClass("hustle-field-error")},clearRunningCompatInterval:function(){void 0!==this.waitEnewsletterResult&&clearInterval(this.waitEnewsletterResult)},ctaClicked:function(e){var i=t(e.target),n=this.convertToMicroseconds(this.data.settings.close_cta_time,this.data.settings.close_cta_unit);if(void 0!==Optin.ModuleLogConversion&&this.isTrackingEnabled){var s=new Optin.ModuleLogConversion,r="undefined"!==this.$el.data("sub-type")?this.$el.data("sub-type"):"";s.set("module_sub_type",r),s.set("module_id",this.moduleId),s.set("cta",!0),s.save()}this.closeAfterCtaClick(i,n)}}))}(jQuery,document,window),function(t){"use strict";(Optin=Optin||{}).Embedded=Optin.Module.extend({type:"embedded",render:function(){var e=this.el;t(window).on("resize",function(){HUI.inlineResize(e)}),this.display()},showModule:function(){HUI.inlineResize(this.el),HUI.inlineLoad(this.el)}})}(jQuery),function(t){"use strict";incOpt.is_upfront||((Optin=window.Optin||{}).PopUp=Optin.Module.extend({type:"popup",showModule:function(){"0"===this.settings.allow_scroll_page&&t("html").addClass("hustle-no-scroll");var e="false"!==String(this.$el.data("close-delay"))&&this.$el.data("close-delay");HUI.popupLoad(this.el,e)},close:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;HUI.popupClose(this.$el,t)}}))}(jQuery),function(t){"use strict";incOpt.is_upfront||((Optin=window.Optin||{}).SlideIn=Optin.Module.extend({type:"slidein",showModule:function(){var e=this,i="false"!==String(this.$el.data("close-delay"))&&this.$el.data("close-delay");HUI.slideinLayouts(this.$el),t(window).on("resize",function(){HUI.slideinLayouts(e.$el)}),HUI.slideinLoad(this.$el,i)},close:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;HUI.slideinClose(this.$el,t)}}))}(jQuery),function(t){"use strict";var e=window.Optin||{};e.SShare=e.Module.extend({type:"social_sharing",beforeShowModule:_.noop,events:{"click .hustle-share-icon":"iconClicked"},render:function(){this.collectNativeCounters(),this.display()},showModule:function(){var e=this.$el.data(),i=this;"floating"===e.subType?(HUI.floatLoad(this.el),t(window).on("resize",function(){return HUI.floatLoad(i.el)})):HUI.inlineLoad(this.el)},setOnInit:function(t){void 0!==t.parent&&(this.parent=t.parent)},shouldDisplay:function(){return!0},iconClicked:function(e){var i=t(e.currentTarget),n=i.data("counter"),s=i.data("link");this.isTrackingEnabled&&this.logConversion(),"native"===s&&(e.preventDefault(),this.openNativeSharingUrl(i)),"native"===n?this.updateSocialCounter(i,"native"):"click"===n&&this.updateSocialCounter(i,"click")},logConversion:function(){if(void 0!==e.ModuleLogConversion&&this.isTrackingEnabled){var t=new e.ModuleLogConversion,i="undefined"!==this.$el.data("sub-type")?this.$el.data("sub-type"):"";t.set("module_sub_type",i),t.set("module_id",this.moduleId),t.save()}},openNativeSharingUrl:function(t){var e=t.data("network");e&&void 0!==incOpt.native_share_enpoints[e]&&window.open(incOpt.native_share_enpoints[e],"MsgWindow","menubar=no,toolbar=no,resizable=yes,scrollbars=yes")},updateSocialCounter:function(e,i){var n=e.data("network"),s=".hustle_module_id_"+this.$el.data("id");"click"===i?(this.storeUpdatedClickCounter(n),_.delay(function(){t(s+' a[data-network="'+n+'"]').not('a[data-counter="native"]').each(function(){var e=t(this).find(".hustle-counter");if(e.length){var i=parseInt(e.text())+1;e.text(i)}})},5e3)):_.delay(function(){t(s+' a[data-network="'+n+'"]').not('a[data-counter="click"]').each(function(){var e=t(this).find(".hustle-counter");if(e.length){e.html('<i class="hustle-icon-check" aria-hidden="true"></i>')}})},5e3)},storeUpdatedClickCounter:function(e){t.post({url:incOpt.ajaxurl,dataType:"json",data:{action:"hustle_sshare_click_counted",moduleId:this.moduleId,network:e}})},collectNativeCounters:function(){var i=this.$el.find('.hustle-share-icon[data-counter="native"]');i.length&&(e.networksToRetrieve=e.networksToRetrieve||[],i.each(function(){var i=t(this).data("network");-1===e.networksToRetrieve.indexOf(i)&&e.networksToRetrieve.push(i)}))}})}(jQuery),function(t,e,i){"use strict";incOpt.is_upfront||(t(window).on("resize",_.debounce(function(t){Hustle.Events.trigger("hustle_resize")},300)),_.each(Modules,function(e,i){if(e.el=".hustle_module_id_"+e.module_id,"popup"===e.module_type)new Optin.PopUp(e);else if("slidein"===e.module_type)new Optin.SlideIn(e);else if("embedded"===e.module_type){var n=t(e.el);n.length?n.each(function(){e.el=this,new Optin.Embedded(e)}):setTimeout(function(){(n=t(e.el)).each(function(){e.el=this,new Optin.Embedded(e)})},incOpt.script_delay)}else if("social_sharing"===e.module_type){t(e.el).each(function(){e.el=this,new Optin.SShare(e)})}}),Optin.updateSshareNetworks())}(jQuery,document,window);
|
1 |
+
function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t){var e="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self.self===self&&self||"object"==("undefined"==typeof global?"undefined":_typeof(global))&&global.global===global&&global;if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(i,n,s){e.Backbone=t(e,s,i,n)});else if("undefined"!=typeof exports){var i,n=require("underscore");try{i=require("jquery")}catch(t){}t(e,exports,n,i)}else e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}(function(t,e,i,n){var s=t.Backbone,o=Array.prototype.slice;e.VERSION="1.3.3",e.$=n,e.noConflict=function(){return t.Backbone=s,this},e.emulateHTTP=!1,e.emulateJSON=!1;var r=function(t,e,n){i.each(e,function(e,s){i[s]&&(t.prototype[s]=function(t,e,n){switch(t){case 1:return function(){return i[e](this[n])};case 2:return function(t){return i[e](this[n],t)};case 3:return function(t,s){return i[e](this[n],a(t,this),s)};case 4:return function(t,s,o){return i[e](this[n],a(t,this),s,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[n]),i[e].apply(i,t)}}}(e,s,n))})},a=function(t,e){return i.isFunction(t)?t:i.isObject(t)&&!e._isModel(t)?l(t):i.isString(t)?function(e){return e.get(t)}:t},l=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}},u=e.Events={},c=/\s+/,h=function t(e,n,s,o,r){var a,l=0;if(s&&"object"===_typeof(s)){void 0!==o&&"context"in r&&void 0===r.context&&(r.context=o);for(a=i.keys(s);l<a.length;l++)n=t(e,n,a[l],s[a[l]],r)}else if(s&&c.test(s))for(a=s.split(c);l<a.length;l++)n=e(n,a[l],o,r);else n=e(n,s,o,r);return n};u.on=function(t,e,i){return d(this,t,e,i)};var d=function(t,e,i,n,s){(t._events=h(f,t._events||{},e,i,{context:n,ctx:t,listening:s}),s)&&((t._listeners||(t._listeners={}))[s.id]=s);return t};u.listenTo=function(t,e,n){if(!t)return this;var s=t._listenId||(t._listenId=i.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),r=o[s];if(!r){var a=this._listenId||(this._listenId=i.uniqueId("l"));r=o[s]={obj:t,objId:s,id:a,listeningTo:o,count:0}}return d(t,e,n,this,r),this};var f=function(t,e,i,n){if(i){var s=t[e]||(t[e]=[]),o=n.context,r=n.ctx,a=n.listening;a&&a.count++,s.push({callback:i,context:o,ctx:o||r,listening:a})}return t};u.off=function(t,e,i){return this._events?(this._events=h(p,this._events,t,e,{context:i,listeners:this._listeners}),this):this},u.stopListening=function(t,e,n){var s=this._listeningTo;if(!s)return this;for(var o=t?[t._listenId]:i.keys(s),r=0;r<o.length;r++){var a=s[o[r]];if(!a)break;a.obj.off(e,n,this)}return this};var p=function(t,e,n,s){if(t){var o,r=0,a=s.context,l=s.listeners;if(e||n||a){for(var u=e?[e]:i.keys(t);r<u.length;r++){var c=t[e=u[r]];if(!c)break;for(var h=[],d=0;d<c.length;d++){var f=c[d];n&&n!==f.callback&&n!==f.callback._callback||a&&a!==f.context?h.push(f):(o=f.listening)&&0==--o.count&&(delete l[o.id],delete o.listeningTo[o.objId])}h.length?t[e]=h:delete t[e]}return t}for(var p=i.keys(l);r<p.length;r++)delete l[(o=l[p[r]]).id],delete o.listeningTo[o.objId]}};u.once=function(t,e,n){var s=h(g,{},t,e,i.bind(this.off,this));return"string"==typeof t&&null==n&&(e=void 0),this.on(s,e,n)},u.listenToOnce=function(t,e,n){var s=h(g,{},e,n,i.bind(this.stopListening,this,t));return this.listenTo(t,s)};var g=function(t,e,n,s){if(n){var o=t[e]=i.once(function(){s(e,o),n.apply(this,arguments)});o._callback=n}return t};u.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),i=Array(e),n=0;n<e;n++)i[n]=arguments[n+1];return h(_,this._events,t,void 0,i),this};var _=function(t,e,i,n){if(t){var s=t[e],o=t.all;s&&o&&(o=o.slice()),s&&m(s,n),o&&m(o,[e].concat(n))}return t},m=function(t,e){var i,n=-1,s=t.length,o=e[0],r=e[1],a=e[2];switch(e.length){case 0:for(;++n<s;)(i=t[n]).callback.call(i.ctx);return;case 1:for(;++n<s;)(i=t[n]).callback.call(i.ctx,o);return;case 2:for(;++n<s;)(i=t[n]).callback.call(i.ctx,o,r);return;case 3:for(;++n<s;)(i=t[n]).callback.call(i.ctx,o,r,a);return;default:for(;++n<s;)(i=t[n]).callback.apply(i.ctx,e);return}};u.bind=u.on,u.unbind=u.off,i.extend(e,u);var v=e.Model=function(t,e){var n=t||{};e||(e={}),this.cid=i.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(n=this.parse(n,e)||{});var s=i.result(this,"defaults");n=i.defaults(i.extend({},s,n),s),this.set(n,e),this.changed={},this.initialize.apply(this,arguments)};i.extend(v.prototype,u,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!i.iteratee(t,this)(this.attributes)},set:function(t,e,n){if(null==t)return this;var s;if("object"===_typeof(t)?(s=t,n=e):(s={})[t]=e,n||(n={}),!this._validate(s,n))return!1;var o=n.unset,r=n.silent,a=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=i.clone(this.attributes),this.changed={});var u=this.attributes,c=this.changed,h=this._previousAttributes;for(var d in s)e=s[d],i.isEqual(u[d],e)||a.push(d),i.isEqual(h[d],e)?delete c[d]:c[d]=e,o?delete u[d]:u[d]=e;if(this.idAttribute in s&&(this.id=this.get(this.idAttribute)),!r){a.length&&(this._pending=n);for(var f=0;f<a.length;f++)this.trigger("change:"+a[f],this,u[a[f]],n)}if(l)return this;if(!r)for(;this._pending;)n=this._pending,this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var n in this.attributes)e[n]=void 0;return this.set(e,i.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!i.isEmpty(this.changed):i.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&i.clone(this.changed);var e=this._changing?this._previousAttributes:this.attributes,n={};for(var s in t){var o=t[s];i.isEqual(e[s],o)||(n[s]=o)}return!!i.size(n)&&n},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=i.extend({parse:!0},t);var e=this,n=t.success;return t.success=function(i){var s=t.parse?e.parse(i,t):i;if(!e.set(s,t))return!1;n&&n.call(t.context,e,i,t),e.trigger("sync",e,i,t)},j(this,t),this.sync("read",this,t)},save:function(t,e,n){var s;null==t||"object"===_typeof(t)?(s=t,n=e):(s={})[t]=e;var o=(n=i.extend({validate:!0,parse:!0},n)).wait;if(s&&!o){if(!this.set(s,n))return!1}else if(!this._validate(s,n))return!1;var r=this,a=n.success,l=this.attributes;n.success=function(t){r.attributes=l;var e=n.parse?r.parse(t,n):t;if(o&&(e=i.extend({},s,e)),e&&!r.set(e,n))return!1;a&&a.call(n.context,r,t,n),r.trigger("sync",r,t,n)},j(this,n),s&&o&&(this.attributes=i.extend({},l,s));var u=this.isNew()?"create":n.patch?"patch":"update";"patch"!==u||n.attrs||(n.attrs=s);var c=this.sync(u,this,n);return this.attributes=l,c},destroy:function(t){t=t?i.clone(t):{};var e=this,n=t.success,s=t.wait,o=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(i){s&&o(),n&&n.call(t.context,e,i,t),e.isNew()||e.trigger("sync",e,i,t)};var r=!1;return this.isNew()?i.defer(t.success):(j(this,t),r=this.sync("delete",this,t)),s||o(),r},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||R();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=i.extend({},this.attributes,t);var n=this.validationError=this.validate(t,e)||null;return!n||(this.trigger("invalid",this,n,i.extend(e,{validationError:n})),!1)}});r(v,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes");var y=e.Collection=function(t,e){e||(e={}),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,i.extend({silent:!0},e))},b={add:!0,remove:!0,merge:!0},O={add:!0,remove:!1},x=function(t,e,i){i=Math.min(Math.max(i,0),t.length);var n,s=Array(t.length-i),o=e.length;for(n=0;n<s.length;n++)s[n]=t[n+i];for(n=0;n<o;n++)t[n+i]=e[n];for(n=0;n<s.length;n++)t[n+o+i]=s[n]};i.extend(y.prototype,u,{model:v,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:!1},e,O))},remove:function(t,e){e=i.extend({},e);var n=!i.isArray(t);t=n?[t]:t.slice();var s=this._removeModels(t,e);return!e.silent&&s.length&&(e.changes={added:[],merged:[],removed:s},this.trigger("update",this,e)),n?s[0]:s},set:function(t,e){if(null!=t){(e=i.extend({},b,e)).parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);var n=!i.isArray(t);t=n?[t]:t.slice();var s=e.at;null!=s&&(s=+s),s>this.length&&(s=this.length),s<0&&(s+=this.length+1);var o,r,a=[],l=[],u=[],c=[],h={},d=e.add,f=e.merge,p=e.remove,g=!1,_=this.comparator&&null==s&&!1!==e.sort,m=i.isString(this.comparator)?this.comparator:null;for(r=0;r<t.length;r++){o=t[r];var v=this.get(o);if(v){if(f&&o!==v){var y=this._isModel(o)?o.attributes:o;e.parse&&(y=v.parse(y,e)),v.set(y,e),u.push(v),_&&!g&&(g=v.hasChanged(m))}h[v.cid]||(h[v.cid]=!0,a.push(v)),t[r]=v}else d&&(o=t[r]=this._prepareModel(o,e))&&(l.push(o),this._addReference(o,e),h[o.cid]=!0,a.push(o))}if(p){for(r=0;r<this.length;r++)h[(o=this.models[r]).cid]||c.push(o);c.length&&this._removeModels(c,e)}var O=!1,w=!_&&d&&p;if(a.length&&w?(O=this.length!==a.length||i.some(this.models,function(t,e){return t!==a[e]}),this.models.length=0,x(this.models,a,0),this.length=this.models.length):l.length&&(_&&(g=!0),x(this.models,l,null==s?this.length:s),this.length=this.models.length),g&&this.sort({silent:!0}),!e.silent){for(r=0;r<l.length;r++)null!=s&&(e.index=s+r),(o=l[r]).trigger("add",o,this,e);(g||O)&&this.trigger("sort",this,e),(l.length||c.length||u.length)&&(e.changes={added:l,removed:c,merged:u},this.trigger("update",this,e))}return n?t[0]:t}},reset:function(t,e){e=e?i.clone(e):{};for(var n=0;n<this.models.length;n++)this._removeReference(this.models[n],e);return e.previousModels=this.models,this._reset(),t=this.add(t,i.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return o.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(t.attributes||t)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var n=e.length;return i.isFunction(e)&&(e=i.bind(e,this)),1===n||i.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(t){var e=(t=i.extend({parse:!0},t)).success,n=this;return t.success=function(i){var s=t.reset?"reset":"set";n[s](i,t),e&&e.call(t.context,n,i,t),n.trigger("sync",n,i,t)},j(this,t),this.sync("read",this,t)},create:function(t,e){var n=(e=e?i.clone(e):{}).wait;if(!(t=this._prepareModel(t,e)))return!1;n||this.add(t,e);var s=this,o=e.success;return e.success=function(t,e,i){n&&s.add(t,i),o&&o.call(i.context,t,e,i)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;(e=e?i.clone(e):{}).collection=this;var n=new this.model(t,e);return n.validationError?(this.trigger("invalid",this,n.validationError,e),!1):n},_removeModels:function(t,e){for(var i=[],n=0;n<t.length;n++){var s=this.get(t[n]);if(s){var o=this.indexOf(s);this.models.splice(o,1),this.length--,delete this._byId[s.cid];var r=this.modelId(s.attributes);null!=r&&delete this._byId[r],e.silent||(e.index=o,s.trigger("remove",s,this,e)),i.push(s),this._removeReference(s,e)}}return i},_isModel:function(t){return t instanceof v},_addReference:function(t,e){this._byId[t.cid]=t;var i=this.modelId(t.attributes);null!=i&&(this._byId[i]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var i=this.modelId(t.attributes);null!=i&&delete this._byId[i],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,n){if(e){if(("add"===t||"remove"===t)&&i!==this)return;if("destroy"===t&&this.remove(e,n),"change"===t){var s=this.modelId(e.previousAttributes()),o=this.modelId(e.attributes);s!==o&&(null!=s&&delete this._byId[s],null!=o&&(this._byId[o]=e))}}this.trigger.apply(this,arguments)}});r(y,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models");var w=e.View=function(t){this.cid=i.uniqueId("view"),i.extend(this,i.pick(t,I)),this._ensureElement(),this.initialize.apply(this,arguments)},k=/^(\S+)\s*(.*)$/,I=["model","collection","el","id","attributes","className","tagName","events"];i.extend(w.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=i.result(this,"events")),!t)return this;for(var e in this.undelegateEvents(),t){var n=t[e];if(i.isFunction(n)||(n=this[n]),n){var s=e.match(k);this.delegate(s[1],s[2],i.bind(n,this))}}return this},delegate:function(t,e,i){return this.$el.on(t+".delegateEvents"+this.cid,e,i),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,i){return this.$el.off(t+".delegateEvents"+this.cid,e,i),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(i.result(this,"el"));else{var t=i.extend({},i.result(this,"attributes"));this.id&&(t.id=i.result(this,"id")),this.className&&(t.class=i.result(this,"className")),this.setElement(this._createElement(i.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}}),e.sync=function(t,n,s){var o=E[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var r={type:o,dataType:"json"};if(s.url||(r.url=i.result(n,"url")||R()),null!=s.data||!n||"create"!==t&&"update"!==t&&"patch"!==t||(r.contentType="application/json",r.data=JSON.stringify(s.attrs||n.toJSON(s))),s.emulateJSON&&(r.contentType="application/x-www-form-urlencoded",r.data=r.data?{model:r.data}:{}),s.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){r.type="POST",s.emulateJSON&&(r.data._method=o);var a=s.beforeSend;s.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",o),a)return a.apply(this,arguments)}}"GET"===r.type||s.emulateJSON||(r.processData=!1);var l=s.error;s.error=function(t,e,i){s.textStatus=e,s.errorThrown=i,l&&l.call(s.context,t,e,i)};var u=s.xhr=e.ajax(i.extend(r,s));return n.trigger("request",n,u,s),u};var E={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var S=e.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},C=/\((.*?)\)/g,T=/(\(\?)?:\w+/g,$=/\*\w+/g,M=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend(S.prototype,u,{initialize:function(){},route:function(t,n,s){i.isRegExp(t)||(t=this._routeToRegExp(t)),i.isFunction(n)&&(s=n,n=""),s||(s=this[n]);var o=this;return e.history.route(t,function(i){var r=o._extractParameters(t,i);!1!==o.execute(s,r,n)&&(o.trigger.apply(o,["route:"+n].concat(r)),o.trigger("route",n,r),e.history.trigger("route",o,n,r))}),this},execute:function(t,e,i){t&&t.apply(this,e)},navigate:function(t,i){return e.history.navigate(t,i),this},_bindRoutes:function(){if(this.routes){this.routes=i.result(this,"routes");for(var t,e=i.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(M,"\\$&").replace(C,"(?:$1)?").replace(T,function(t,e){return e?t:"([^/?]+)"}).replace($,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var n=t.exec(e).slice(1);return i.map(n,function(t,e){return e===n.length-1?t||null:t?decodeURIComponent(t):null})}});var P=e.History=function(){this.handlers=[],this.checkUrl=i.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},A=/^[#\/]|\s+$/g,U=/^\/+|\/+$/g,H=/#.*$/;P.started=!1,i.extend(P.prototype,u,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(A,"")},start:function(t){if(P.started)throw new Error("Backbone.history has already been started");if(P.started=!0,this.options=i.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(U,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var n=document.body,s=n.insertBefore(this.iframe,n.firstChild).contentWindow;s.document.open(),s.document.close(),s.location.hash="#"+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),P.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),i.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!P.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var i=this.root;""!==t&&"?"!==t.charAt(0)||(i=i.slice(0,-1)||"/");var n=i+t;if(t=this.decodeFragment(t.replace(H,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var s=this.iframe.contentWindow;e.replace||(s.document.open(),s.document.close()),this._updateHash(s.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){if(i){var n=t.href.replace(/(javascript:|#).*$/,"");t.replace(n+"#"+e)}else t.hash="#"+e}}),e.history=new P;v.extend=y.extend=S.extend=w.extend=P.extend=function(t,e){var n,s=this;return n=t&&i.has(t,"constructor")?t.constructor:function(){return s.apply(this,arguments)},i.extend(n,s,e),n.prototype=i.create(s.prototype,t),n.prototype.constructor=n,n.__super__=s.prototype,n};var R=function(){throw new Error('A "url" property or function must be specified')},j=function(t,e){var i=e.error;e.error=function(n){i&&i.call(e.context,t,n,e),t.trigger("error",t,n,e)}};return e}),function(t){"use strict";window.Hustle=function(t,e,i){var n={},s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g},o=_.extend({},Backbone.Events),r=Backbone.View.extend({initialize:function(){_.isFunction(this.initMix)&&this.initMix.apply(this,arguments),this.render&&(this.render=_.wrap(this.render,function(t){this.trigger("before_render"),t.call(this),o.trigger("view.rendered",this),this.trigger("rendered")})),_.isFunction(this.init)&&this.init.apply(this,arguments)}}),a=_.memoize(function(t){var e;return function(i){return(e=e||_.template(document.getElementById(t).innerHTML,null,s))(i).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),l=_.memoize(function(t){var e;return function(i){return(e=e||_.template(t,null,s))(i)}});return{define:function(s,o){if(s.split(".").length)!function n(s,r){var a,l=s.split("."),u=l.splice(0,1)[0];u&&(l.length?r[u]=r[u]||{}:(a=o.call(null,t,e,i),r[u]=_.isFunction(a)||void 0===a?a:_.extend(r[u]||{},a)),l.length&&u&&n(l.join("."),r[u]))}(s,n);else{var r=n[s]||{};n[s]=_.extend(r,o.call(null,t,e,i))}},getModules:function(){return n},get:function(t){var e,i;return t.split(".").length?(e=!1,(i=function(t,n){var s=t.split("."),o=s.splice(0,1)[0];e=n[o],s.length&&i(s.join("."),n[o])})(t,n),e):n[t]||!1},Events:o,View:r,template:a,createTemplate:l,getTemplateOptions:function(){return t.extend(!0,{},s)},cookie:{set:function(e,i,n){var s,o;i=t.isArray(i)||t.isPlainObject(i)?JSON.stringify(i):i,isNaN(n)?o="":((s=new Date).setTime(s.getTime()+24*n*60*60*1e3),o="; expires="+s.toGMTString()),document.cookie=e+"="+i+o+"; path=/"},get:function(t){var e,i,n,s=document.cookie.split(";"),o=s.length;for(n=t+"=",e=0;e<o;e+=1){for(i=s[e];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(n)){var r=i.substring(n.length,i.length);return r?JSON.parse(r):r}}return null}},consts:{ModuleShowCount:"hustle_module_show_count-"}}}(jQuery,document,window)}(jQuery);var Optin=Optin||{};function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _readOnlyError(t){throw new Error('"'+t+'" is read-only')}Optin.View={},Optin.Models={},Optin.Events={},"undefined"!=typeof Backbone&&_.extend(Optin.Events,Backbone.Events),function(t){"use strict";Optin.NEVER_SEE_PREFIX="inc_optin_never_see_again-",Optin.COOKIE_PREFIX="inc_optin_long_hidden-",Optin.POPUP_COOKIE_PREFIX="inc_optin_popup_long_hidden-",Optin.SLIDE_IN_COOKIE_PREFIX="inc_optin_slide_in_long_hidden-",Optin.EMBEDDED_COOKIE_PREFIX="inc_optin_embedded_long_hidden-",Optin.globalMixin=function(){_.mixin({log:function(){},toBool:function(t){return _.isBoolean(t)?t:_.isString(t)&&-1!==["true","false","1"].indexOf(t.toLowerCase())?"true"===t.toLowerCase()||"1"===t.toLowerCase():_.isNumber(t)?!!t:!(_.isUndefined(t)||_.isNull(t)||_.isNaN(t))&&t},isTrue:function(t){return!(_.isUndefined(t)||_.isNull(t)||_.isNaN(t))&&(_.isNumber(t)?0!==t:(t=t.toString().toLowerCase(),-1!==["1","true","on"].indexOf(t)))},isFalse:function(t){return!_.isTrue(t)},controlBase:function(t,e,i){return i=_.isUndefined(i)?"checked":i,t=_.toBool(t),e=_.isBoolean(t)?_.isTrue(e):e,_.isEqual(t,e)?i+"="+i:""},checked:function(t,e){return _.controlBase(t,e,"checked")},selected:function(t,e){return _.controlBase(t,e,"selected")},disabled:function(t,e){return _.controlBase(t,e,"disabled")},class:function(t,e,i){return _.isTrue(t)?e:void 0!==i?i:""},add_class:function(t,e,i){return"class={class}".replace("{class}",_.class(t,e,i))},toUpperCase:function(t){return _.isString(t)?t.toUpperCase():""}}),_.findKey||_.mixin({findKey:function(t,e,i){e=cb(e,i);for(var n,s=_.keys(t),o=0,r=s.length;o<r;o++)if(e(t[n=s[o]],n,t))return n}})},Optin.globalMixin(),Backbone.Model.prototype.toJSON=function(){var t,e=_.clone(this.attributes);for(t in e)(e[t]instanceof Backbone.Model||Backbone.Collection&&e[t]instanceof Backbone.Collection)&&(e[t]=e[t].toJSON());return e},Optin.template=_.memoize(function(e){var i,n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g};return function(s){return(i=i||_.template(t("#"+e).html(),null,n))(s).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),Optin.templateCompat=_.memoize(function(e){var i;return function(n){return(i=i||_.template(t("#"+e).html()))(n).replace("/*<![CDATA[*/","").replace("/*]]>*/","")}}),Optin.cookie=Hustle.cookie,Optin.Mixins={_mixins:{},_servicesMixins:{},_desingMixins:{},_displayMixins:{},add:function(t,e){this._mixins[t]=e},getMixins:function(){return this._mixins},addServicesMixin:function(t,e){this._servicesMixins[t]=e},getServicesMixins:function(){return this._servicesMixins}}}(jQuery),function(t){"use strict";var e=window.Optin||{};incOpt.is_admin||(e.moduleLogView=Backbone.Model.extend({url:incOpt.ajaxurl+"?action=hustle_module_viewed",defaults:{page_id:incOpt.page_id},parse:function(t){t.success}}),t(document).on("hustle:module:displayed",function(t,i){if("object"===_typeof(i)){var n=i.moduleType,s=Hustle.consts.ModuleShowCount+n+"-"+i.moduleId,o=Hustle.cookie.get(s);Hustle.cookie.set(s,o+1,30);var r="undefined"!==i.$el.data("sub-type")?i.$el.data("sub-type"):null;if(void 0!==e.moduleLogView&&i.isTrackingEnabled){var a=new e.moduleLogView;a.set("module_sub_type",r),a.set("module_type",n),a.set("module_id",i.moduleId),a.save()}}}),e.updateSshareNetworks=function(i){var n=void 0===i?e.networksToRetrieve:i;void 0!==n&&n.length&&t.ajax({type:"POST",url:incOpt.ajaxurl,dataType:"json",data:{action:"hustle_update_network_shares",postId:incOpt.page_id,networks:n}}).done(function(e){if(e.success){var i=e.data;t.each(i.networks,function(e,n){var s=t('.hustle-share-icon[data-counter="native"][data-network="'.concat(e,'"]'));s.length&&s.each(function(){var e=t(this).find(".hustle-counter"),s=parseInt(t(this).data("count"),10);s>parseInt(n,10)&&(n=parseInt(s,10));var o="";o=1e3>n?n:1e6>n?(n/1e3).toFixed(1)+i.shorten.thousand:(n/1e6).toFixed(1)+i.shorten.million,e.text(o)})})}})})}(jQuery),function(t){t(document).on("submit","form.hustle-unsubscribe-form",function(e){e.preventDefault();var i=t(e.target),n=i.find(".hustle-email-section"),s=i.serialize(),o=i.find("button"),r=i.find(".wpoi-submit-failure");return o.attr("disabled",!0),o.addClass("sui-button-onload"),i.on("keypress",function(){return r.hide()}),t.ajax({type:"POST",url:incOpt.ajaxurl,dataType:"json",data:{action:"hustle_unsubscribe_form_submission",data:s},success:function(t){t.success&&!0===t.success?(n.hide(),r.hide(),t.data.wrapper&&t.data.html&&i.find(t.data.wrapper).html(t.data.html)):t.data.html&&(r.text(t.data.html),r.show())},error:function(){r.text(r.data("default-error")),r.show()},complete:function(){o.attr("disabled",!1),o.removeClass("sui-button-onload")}}),!1})}(jQuery),function(t,e,i){"use strict";incOpt.is_upfront||(incOpt.is_admin||(Optin.ModuleLogConversion=Backbone.Model.extend({url:incOpt.ajaxurl+"?action=hustle_module_converted",defaults:{page_id:incOpt.page_id},parse:function(t){t.success}})),Optin.Module=Backbone.View.extend({moduleId:"",moduleType:"",settings:{},data:{},appearAfter:"time",parent:"body",cookieKey:"",neverSeeCookieKey:"",isShown:!1,events:{"click .hustle-button-cta":"ctaClicked"},close:_.noop,initialize:function(t){this.data=t,this.moduleId=t.module_id,this.settings=t.settings,this.moduleType=t.module_type,this.isTrackingEnabled="enabled"===this.$el.data("tracking"),this.setOnInit(t),this.shouldDisplay()?this.render():this.$el.css("display","none")},setOnInit:function(){"optin"===this.data.module_mode&&(this.$el.off("submit").on("submit",t.proxy(this,"handleSubmission")),this.$el.find(".hustle-layout-form").off("change").on("change",t.proxy(this,"onInputChange"))),this.expiration=parseInt(this.settings.expiration,10),this.expirationDays=this.getExpirationDays(),this.appearAfter=this.settings.triggers.trigger,this.triggers={onTimeDelay:this.settings.triggers.on_time_delay,onTimeUnit:this.settings.triggers.on_time_unit,onScroll:this.settings.triggers.on_scroll,onScrollPagePercent:parseInt(this.settings.triggers.on_scroll_page_percent),onScrollCssSelector:this.settings.triggers.on_scroll_css_selector,enableOnClickElement:this.settings.triggers.enable_on_click_element,onClickElement:this.settings.triggers.on_click_element,enableOnClickShortcode:this.settings.triggers.enable_on_click_shortcode,onExitIntentperSession:this.settings.triggers.on_exit_intent_per_session,onExitIntentDelayed:this.settings.triggers.on_exit_intent_delayed,onExitIntentDelayedTime:this.settings.triggers.on_exit_intent_delayed_time,onExitIntentDelayedUnit:this.settings.triggers.on_exit_intent_delayed_unit,onAdblock:this.settings.triggers.on_adblock},"popup"===this.moduleType?this.cookieKey=Optin.POPUP_COOKIE_PREFIX+this.moduleId:"slidein"===this.moduleType?this.cookieKey=Optin.SLIDE_IN_COOKIE_PREFIX+this.moduleId:"embedded"===this.moduleType&&(this.cookieKey=Optin.EMBEDDED_COOKIE_PREFIX+this.moduleId),this.neverSeeCookieKey=Optin.NEVER_SEE_PREFIX+this.moduleType+"-"+this.moduleId},shouldDisplay:function(){if(!this.$el.length)return!1;var t,e=Optin.cookie.get(this.neverSeeCookieKey);return(e=parseInt(e)===parseInt(this.moduleId))?t=!1:(t="no_show_on_post"===this.settings.after_close?0<parseInt(incOpt.page_id,10)?!_.isTrue(Optin.cookie.get(this.cookieKey+"_"+incOpt.page_id)):0!==parseInt(incOpt.page_id,10)||!incOpt.page_slug||!_.isTrue(Optin.cookie.get(this.cookieKey+"_"+incOpt.page_slug)):"no_show_all"!==this.settings.after_close||!_.isTrue(Optin.cookie.get(this.cookieKey)))?("no_show_on_post"===this.data.settings.hide_after_subscription?t=0<parseInt(incOpt.page_id,10)?!_.isTrue(Optin.cookie.get(this.cookieKey+"_success_"+incOpt.page_id)):0!==parseInt(incOpt.page_id,10)||!incOpt.page_slug||!_.isTrue(Optin.cookie.get(this.cookieKey+"_"+incOpt.page_slug)):"no_show_all"===this.data.settings.hide_after_subscription&&(t=!_.isTrue(Optin.cookie.get(this.cookieKey+"_success"))),t?("no_show_on_post"===this.data.settings.hide_after_cta?t=0<parseInt(incOpt.page_id,10)?!_.isTrue(Optin.cookie.get(this.cookieKey+"_cta_success_"+incOpt.page_id)):0!==parseInt(incOpt.page_id,10)||!incOpt.page_slug||!_.isTrue(Optin.cookie.get(this.cookieKey+"_cta_"+incOpt.page_slug)):"no_show_all"===this.data.settings.hide_after_cta&&(t=!_.isTrue(Optin.cookie.get(this.cookieKey+"_cta_success"))),t):t):t},getExpirationDays:function(){switch(this.settings.expiration_unit){case"months":return 30*this.expiration;case"weeks":return 7*this.expiration;case"hours":return this.expiration/24;case"minutes":return this.expiration/1440;case"seconds":return this.expiration/86400;default:return this.expiration}},render:function(){"function"==typeof this[this.appearAfter+"Trigger"]&&(this[this.appearAfter+"Trigger"](),this.$el.off("hustle:module:closed").on("hustle:module:closed",t.proxy(this,"onModuleClosed","click_close_icon")),this.$el.off("hustle:module:hidden").on("hustle:module:hidden",t.proxy(this,"onModuleClosed","auto_hide")),this.$el.off("hustle:module:click_outside").on("hustle:module:click_outside",t.proxy(this,"onModuleClosed","click_outside")),this.$el.off("hustle:module:esc_key_pressed").on("hustle:module:esc_key_pressed",t.proxy(this,"onModuleClosed","esc_key")),this.$el.off("hustle:module:clicked_never_see").on("hustle:module:clicked_never_see",t.proxy(this,"onModuleClosed","click_never_see"))),HUI.inputFilled()},executeRecaptcha:function(t,e){var i=e.data().version;if("v2_checkbox"===i)this.doSubmit(t);else{var n={};"v3_recaptcha"===i&&(n.action="contact"),grecaptcha.execute(e.attr("recaptcha-id"),n)}},display:function(){this.isShown||(this.beforeShowModule(),this.showModule(),t(document).trigger("hustle:module:displayed",this),this.isShown=!0)},beforeShowModule:function(){if(this.handleCompatibility(),HUI.maybeRenderRecaptcha(this.$el,this),this.$el.find(".hustle-select2").length&&HUI.select2(),this.$el.find(".hustle-time").length&&HUI.timepicker(".hustle-time"),this.$el.find(".hustle-date").length){var e=t(".hustle-date"),i=incOpt.days_and_months;_.each(e,function(t){HUI.datepicker(t,i.days_full,i.days_short,i.days_min,i.months_full,i.months_short)})}HUI.inputFilled()},timeTrigger:function(){var e=1e3*parseInt(this.triggers.onTimeDelay,10);"minutes"===this.triggers.onTimeUnit?e*=60:"hours"===this.triggers.onTimeUnit&&(e*=3600),_.delay(t.proxy(this,"display"),e)},clickTrigger:function(){var e=this,i="";_.isTrue(this.triggers.enableOnClickElement)&&""!==(i=t.trim(this.triggers.onClickElement))&&(t(i).length&&t(document).on("click",i,function(t){t.preventDefault(),e.display()}));_.isTrue(this.triggers.enableOnClickShortcode)&&t(document).on("click",".hustle_module_shortcode_trigger",function(i){i.preventDefault(),t(this).data("id")==e.moduleId&&t(this).data("type")==e.type&&e.display()})},scrollTrigger:function(){var n=this,s=!1;if("scrolled"===this.triggers.onScroll&&t(i).scroll(_.debounce(function(){s||100*i.pageYOffset/t(e).height()>=parseFloat(n.triggers.onScrollPagePercent)&&(n.display(),s=!0)},50)),"selector"===this.triggers.onScroll){var o=t(this.triggers.onScrollCssSelector);o.length&&t(i).scroll(_.debounce(function(){s||i.pageYOffset>=o.offset().top&&(n.display(),s=!0)},50))}},exit_intentTrigger:function(){var i=this,n=0;_.isTrue(this.triggers.onExitIntentDelayed)&&(n=1e3*parseInt(this.triggers.onExitIntentDelayedTime,10),"minutes"===this.triggers.onExitIntentDelayedTime?n*=60:"hours"===this.triggers.onExitIntentDelayedTime&&(n*=3600)),_.isTrue(this.triggers.onExitIntentperSession)?t(e).on("mouseleave",_.debounce(function(e){t("input").is(":focus")||(i.setExitTimer(),t(this).off(e))},300)):t(e).on("mouseleave",_.debounce(function(e){t("input").is(":focus")||i.setExitTimer()},300)),t("html").on("mousemove",_.debounce(function(t){i.resetExitTimer()},300)),this.exitTimer=null,this.resetExitTimer=function(){i.exitTimer&&clearTimeout(i.exitTimer)},this.setExitTimer=function(){i.exitTimer=setTimeout(function(){i.exitTimer=null,i.display()},n)}},adblockTrigger:function(){!t("#hustle_optin_adBlock_detector").length&&_.isTrue(this.triggers.onAdblock)&&this.display()},convertToMicroseconds:function(t,e){return"seconds"===e?1e3*parseInt(t,10):"minutes"===e?60*parseInt(t,10)*1e3:60*parseInt(t,10)*60*1e3},onModuleClosed:function(e){this.clearRunningCompatInterval(),this.$el.find("iframe").each(function(){t(this).attr("src",t(this).attr("src"))}),Array.isArray(this.settings.after_close_trigger)&&-1!==this.settings.after_close_trigger.indexOf(e)?"no_show_on_post"===this.settings.after_close?0<parseInt(incOpt.page_id,10)?Optin.cookie.set(this.cookieKey+"_"+incOpt.page_id,this.moduleId,this.expirationDays):0===parseInt(incOpt.page_id,10)&&incOpt.page_slug&&Optin.cookie.set(this.cookieKey+"_"+incOpt.page_slug,this.moduleId,this.expirationDays):"no_show_all"===this.settings.after_close&&Optin.cookie.set(this.cookieKey,this.moduleId,this.expirationDays):"click_never_see"===e&&Hustle.cookie.set(this.neverSeeCookieKey,this.moduleId,this.expirationDays),this.isShown=!1,this.stopPlayingAudioVideo()},redirectOnExternalFormSubmit:function(e,i){this.setCookiesAfterSubscription();var n=t(e.target);n.attr("action")&&setTimeout(function(){return window.location.replace(n.attr("action"))},i)},handleCompatibility:function(){var e=this,i=this.data.settings.on_submit,n=this.convertToMicroseconds(this.data.settings.on_submit_delay,this.data.settings.on_submit_delay_unit);-1!==t.inArray(i,["close","default"])&&"embedded"!==this.moduleType?(this.$el.find("form.wpcf7-form").length&&this.$el.on("wpcf7mailsent",function(){return e.closeAfterSubmission(e.el,n)}),this.$(".forminator-custom-form").length&&this.$el.on("forminator:form:submit:success",function(){return e.closeAfterSubmission(e.el,n)}),this.$(".gform_wrapper").length&&t(document).on("gform_confirmation_loaded",function(){return e.closeAfterSubmission(e.el,n)}),this.$(".nf-form-cont").length&&t(document).on("nfFormSubmitResponse",function(){return e.closeAfterSubmission(e.el,n)})):"redirect"===i&&(this.$el.find("form.wpcf7-form").length&&this.$el.on("wpcf7mailsent",function(t){return e.redirectOnExternalFormSubmit(t,n)}),this.$(".forminator-custom-form").length&&this.$el.on("forminator:form:submit:success",function(t){return e.redirectOnExternalFormSubmit(t,n)}),this.$(".gform_wrapper").length&&t(document).on("gform_confirmation_loaded",function(t){return e.redirectOnExternalFormSubmit(t,n)}),this.$(".nf-form-cont").length&&t(document).on("nfFormSubmitResponse",function(t){return e.redirectOnExternalFormSubmit(t,n)}));var s=this.$el.find("form#subscribes_form"),o=1e3;s.length&&(e.waitEnewsletterResult=setInterval(function(){o+=(_readOnlyError("enewsletterWaited"),1e3);var t=e.$el.find("#message");_.isEmpty(t.text().trim())&&216e6!==o||e.close()},1e3))},closeAfterSubmission:function(t,e){var i=this;this.setCookiesAfterSubscription(),setTimeout(function(){return i.close(t)},e)},maybeCloseAfterCtaClick:function(t,e){if(void 0!==this.data.settings.close_cta&&"0"!==this.data.settings.close_cta){var i=this;setTimeout(function(){return i.close(t)},e)}},setCookiesAfterSubscription:function(){if(void 0!==this.data.settings.hide_after_subscription&&"keep_show"!==this.data.settings.hide_after_subscription){var t,e=this.data.module_id;"popup"===this.data.module_type?t=Optin.POPUP_COOKIE_PREFIX+e:"slidein"===this.data.module_type?t=Optin.SLIDE_IN_COOKIE_PREFIX+e:"embedded"===this.data.module_type&&(t=Optin.EMBEDDED_COOKIE_PREFIX+e),"no_show_on_post"===this.data.settings.hide_after_subscription?Optin.cookie.set(t+"_success_"+incOpt.page_id,e):"no_show_all"===this.data.settings.hide_after_subscription&&Optin.cookie.set(t+"_success",e)}},maybeSetCookiesAfterCtaClick:function(){if(void 0!==this.data.settings.hide_after_cta&&"keep_show"!==this.data.settings.hide_after_cta){var t,e=this.data.module_id;"popup"===this.data.module_type?t=Optin.POPUP_COOKIE_PREFIX+e:"slidein"===this.data.module_type?t=Optin.SLIDE_IN_COOKIE_PREFIX+e:"embedded"===this.data.module_type&&(t=Optin.EMBEDDED_COOKIE_PREFIX+e),"no_show_on_post"===this.data.settings.hide_after_cta?Optin.cookie.set(t+"_cta_success_"+incOpt.page_id,e):"no_show_all"===this.data.settings.hide_after_cta&&Optin.cookie.set(t+"_cta_success",e)}},handleSubmission:function(e){e.preventDefault();var i=t(e.target);if(!i.data("sending")){var n=HUI.optinValidate(this.$el);if((n=this.validateSubmission(n)).length)HUI.optinError(i.find(".hustle-error-message"),n);else{HUI.optinSubmit(i.find(".hustle-button-submit"));var s=i.find(".hustle-recaptcha");s.length?this.executeRecaptcha(i,s):this.doSubmit(i)}}},doSubmit:function(e){var i=this,n=e.serialize(),s=e.find('input[name="hustle_module_id"]').val(),o=e.find("#hustle-modal-gdpr-"+s+":checked").val(),r=e.find(".hustle-error-message"),a=(r.find("p"),r.data("default-error"),_.find(Modules,function(t,e){return parseInt(s,10)===parseInt(t.module_id,10)}));e.trigger("hustle:module:submit",n),e.data("sending",!0),t.ajax({type:"POST",url:incOpt.ajaxurl,dataType:"json",data:{action:"hustle_module_form_submit",data:{form:n,module_id:s,gdpr:o,uri:encodeURI(window.location.href)}},success:function(t){if(t&&t.success){var o;if(e.trigger("hustle:module:submit:success",n),i.setCookiesAfterSubscription(),void 0!==a.settings.hide_after_subscription)"popup"===a.module_type?o=Optin.POPUP_COOKIE_PREFIX+s:"slidein"===a.module_type?o=Optin.SLIDE_IN_COOKIE_PREFIX+s:"embedded"===a.module_type&&(o=Optin.EMBEDDED_COOKIE_PREFIX+s),"no_show_on_post"===a.settings.hide_after_subscription?(0<parseInt(incOpt.page_id,10)?Optin.cookie.set(o+"_success_"+incOpt.page_id,s):0===parseInt(incOpt.page_id,10)&&incOpt.page_slug&&Optin.cookie.set(o+"_success_"+incOpt.page_slug,s),Optin.cookie.set(o+"_success_"+incOpt.page_id,s)):"no_show_all"===a.settings.hide_after_subscription&&Optin.cookie.set(o+"_success",s);if("redirect"===t.data.behavior.after_submit&&0<t.data.behavior.url.length)window.location.assign(t.data.behavior.url);else{var l=i.$(".hustle-success"),u=i.$(".hustle-success-content");t.data.message&&u.length&&u.html(t.data.message),HUI.optinSuccess(l,l.data("close-delay"))}}else{e.trigger("hustle:module:submit:failed",n);var c=e.find(".hustle-recaptcha").attr("recaptcha-id");c&&grecaptcha.reset(c),HUI.optinError(r,t.data.errors)}},error:function(){e.trigger("hustle:module:submit:failed",n),HUI.optinError(r)},complete:function(){e.data("sending",!1),e.find(".hustle-button-onload").removeClass("hustle-button-onload")}})},validateSubmission:function(e){var i=this,n=this.$el.find('[data-validate="1"]'),s=/^(([^<>()\[\]\\.,;:\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,}))$/i,o=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)?/i;return t.each(n,function(n,r){var a=t(r),l=String(a.val()).trim().toLowerCase();if(l.length){var u=!0;if("email"===a.attr("type"))u=s.test(l);else if("url"===a.attr("type"))u=o.test(l);else if("datepicker"===a.attr("type")){var c=a.data("format").toString(),h="";"mm/dd/yy"===c||"mm/dd/yy"===c||"mm.dd.yy"===c||"mm.dd.yy"===c||"mm-dd-yy"===c||"mm-dd-yy"===c?h=/^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.](19|20)\d\d/:"dd/mm/yy"===c||"dd/mm/yy"===c||"dd.mm.yy"===c||"dd.mm.yy"===c||"dd-mm-yy"===c||"dd-mm-yy"===c?h=/^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.](19|20)\d\d/:"yy/mm/dd"!==c&&"Y/m/d"!==c&&"yy.mm.dd"!==c&&"Y.m.d"!==c&&"yy-mm-dd"!==c&&"Y-m-d"!==c||(h=/^(19|20)\d\d[- \/.](0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])/),""!==h&&(u=h.test(l))}else"timepicker"===a.attr("type")&&(u=i.validateTime(l,a.data("time-format")));u||(a.closest(".hustle-field").addClass("hustle-field-error"),e.push(a.data("validation-error")))}}),e},validateTime:function(e,i){var n=e.match(/^(\d{1,2}):(\d{2})(:00)?( [apAP][mM])?$/);return!!n&&("HH:mm"==i?!(23<n[1])&&!(59<n[2]):!(1>n[1]||12<n[1])&&(!(59<n[2])&&("am"===t.trim(n[4].toLowerCase())||"pm"===t.trim(n[4].toLowerCase()))))},onInputChange:function(e){t(e.target).closest(".hustle-field").removeClass("hustle-field-error")},stopPlayingAudioVideo:function(t){this.$el.find("audio, video").trigger("pause")},clearRunningCompatInterval:function(){void 0!==this.waitEnewsletterResult&&clearInterval(this.waitEnewsletterResult)},ctaClicked:function(e){var i=t(e.target),n=this.convertToMicroseconds(this.data.settings.close_cta_time,this.data.settings.close_cta_unit);if(void 0!==Optin.ModuleLogConversion&&this.isTrackingEnabled){var s=new Optin.ModuleLogConversion,o="undefined"!==this.$el.data("sub-type")?this.$el.data("sub-type"):"";s.set("module_sub_type",o),s.set("module_id",this.moduleId),s.set("cta",!0),s.save()}this.maybeSetCookiesAfterCtaClick(),this.maybeCloseAfterCtaClick(i,n)}}))}(jQuery,document,window),function(t){"use strict";(Optin=Optin||{}).Embedded=Optin.Module.extend({type:"embedded",render:function(){var e=this.el;t(window).on("resize",function(){HUI.inlineResize(e)}),this.display()},showModule:function(){HUI.inlineResize(this.el),HUI.inlineLoad(this.el)}})}(jQuery),function(t){"use strict";incOpt.is_upfront||((Optin=window.Optin||{}).PopUp=Optin.Module.extend({type:"popup",showModule:function(){"0"===this.settings.allow_scroll_page&&t("html").addClass("hustle-no-scroll");var e="false"!==String(this.$el.data("close-delay"))&&this.$el.data("close-delay");HUI.popupLoad(this.el,e)},close:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;HUI.popupClose(this.$el,t)}}))}(jQuery),function(t){"use strict";incOpt.is_upfront||((Optin=window.Optin||{}).SlideIn=Optin.Module.extend({type:"slidein",showModule:function(){var e=this,i="false"!==String(this.$el.data("close-delay"))&&this.$el.data("close-delay");HUI.slideinLayouts(this.$el),t(window).on("resize",function(){HUI.slideinLayouts(e.$el)}),HUI.slideinLoad(this.$el,i)},close:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;HUI.slideinClose(this.$el,t)}}))}(jQuery),function(t){"use strict";var e=window.Optin||{};e.SShare=e.Module.extend({type:"social_sharing",beforeShowModule:_.noop,events:{"click .hustle-share-icon":"iconClicked"},render:function(){this.collectNativeCounters(),this.display()},showModule:function(){var e=this.$el.data(),i=this;"floating"===e.subType?(HUI.floatLoad(this.el),t(window).on("resize",function(){return HUI.floatLoad(i.el)})):HUI.inlineLoad(this.el)},setOnInit:function(t){void 0!==t.parent&&(this.parent=t.parent)},shouldDisplay:function(){return!0},iconClicked:function(e){var i=t(e.currentTarget),n=i.data("counter"),s=i.data("link");this.isTrackingEnabled&&this.logConversion(),"native"===s&&(e.preventDefault(),this.openNativeSharingUrl(i)),"native"===n?this.updateSocialCounter(i,"native"):"click"===n&&this.updateSocialCounter(i,"click")},logConversion:function(){if(void 0!==e.ModuleLogConversion&&this.isTrackingEnabled){var t=new e.ModuleLogConversion,i="undefined"!==this.$el.data("sub-type")?this.$el.data("sub-type"):"";t.set("module_sub_type",i),t.set("module_id",this.moduleId),t.save()}},openNativeSharingUrl:function(t){var e=t.data("network");e&&void 0!==incOpt.native_share_enpoints[e]&&window.open(incOpt.native_share_enpoints[e],"MsgWindow","menubar=no,toolbar=no,resizable=yes,scrollbars=yes")},updateSocialCounter:function(e,i){var n=e.data("network"),s=".hustle_module_id_"+this.$el.data("id");"click"===i?(this.storeUpdatedClickCounter(n),_.delay(function(){t(s+' a[data-network="'+n+'"]').not('a[data-counter="native"]').each(function(){var e=t(this).find(".hustle-counter");if(e.length){var i=parseInt(e.text())+1;e.text(i)}})},5e3)):_.delay(function(){t(s+' a[data-network="'+n+'"]').not('a[data-counter="click"]').each(function(){var e=t(this).find(".hustle-counter");if(e.length){e.html('<i class="hustle-icon-check" aria-hidden="true"></i>')}})},5e3)},storeUpdatedClickCounter:function(e){t.post({url:incOpt.ajaxurl,dataType:"json",data:{action:"hustle_sshare_click_counted",moduleId:this.moduleId,network:e}})},collectNativeCounters:function(){var i=this.$el.find('.hustle-share-icon[data-counter="native"]');i.length&&(e.networksToRetrieve=e.networksToRetrieve||[],i.each(function(){var i=t(this).data("network");-1===e.networksToRetrieve.indexOf(i)&&e.networksToRetrieve.push(i)}))}})}(jQuery),function(t,e,i){"use strict";incOpt.is_upfront||(t(window).on("resize",_.debounce(function(t){Hustle.Events.trigger("hustle_resize")},300)),t(document).ready(function(){_.each(Modules,function(e,i){if(e.el=".hustle_module_id_"+e.module_id,"popup"===e.module_type)new Optin.PopUp(e);else if("slidein"===e.module_type)new Optin.SlideIn(e);else if("embedded"===e.module_type){var n=t(e.el);n.length?n.each(function(){e.el=this,new Optin.Embedded(e)}):setTimeout(function(){(n=t(e.el)).each(function(){e.el=this,new Optin.Embedded(e)})},incOpt.script_delay)}else if("social_sharing"===e.module_type){t(e.el).each(function(){e.el=this,new Optin.SShare(e)})}}),Optin.updateSshareNetworks()}))}(jQuery,document,window);
|
assets/js/shared-ui.min.js
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Copyright 2018 Incsub (https://incsub.com)
|
5 |
* Licensed under GPL v2 (http://www.gnu.org/licenses/gpl-2.0.html)
|
6 |
*/
|
7 |
-
!function(e){"use strict";var i,n=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'];function o(e,t){this._show=this.show.bind(this),this._hide=this.hide.bind(this),this._maintainFocus=this._maintainFocus.bind(this),this._bindKeypress=this._bindKeypress.bind(this),this.node=e,this._listeners={},this.create(t)}function a(e){return Array.prototype.slice.call(e)}function l(e,t){return a((t||document).querySelectorAll(e))}function c(e){var t=u(e);t.length&&t[0].focus()}function u(e){return l(n.join(","),e).filter((function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}))}o.prototype.create=function(e){var t,i;return this._targets=this._targets||function(e){if(NodeList.prototype.isPrototypeOf(e))return a(e);if(Element.prototype.isPrototypeOf(e))return[e];if("string"==typeof e)return l(e)}(e)||(t=this.node,(i=a(t.parentNode.childNodes).filter((function(e){return 1===e.nodeType}))).splice(i.indexOf(t),1),i),this.node.setAttribute("aria-hidden",!0),this.shown=!1,this._openers=l('[data-a11y-dialog-show="'+this.node.id+'"]'),this._openers.forEach(function(e){e.addEventListener("click",this._show)}.bind(this)),this._closers=l("[data-a11y-dialog-hide]",this.node).concat(l('[data-a11y-dialog-hide="'+this.node.id+'"]')),this._closers.forEach(function(e){e.addEventListener("click",this._hide)}.bind(this)),this._fire("create"),this},o.prototype.show=function(e){var t=this.node.getElementsByClassName("sui-modal-content"),n=this.node.getElementsByClassName("sui-dialog-content");return this.shown
|
8 |
/*!
|
9 |
* clipboard.js v2.0.0
|
10 |
* https://zenorocha.github.io/clipboard.js
|
@@ -24,11 +24,11 @@ var e,i,n;t&&t.requirejs||(t?i=t:t={},function(t){var o,r,s,a,l={},c={},u={},h={
|
|
24 |
* Released under the MIT license
|
25 |
* http://jquery.org/license
|
26 |
*/
|
27 |
-
function(e){"function"==typeof t.define&&t.define.amd?t.define("jquery-mousewheel",["jquery"],e):r.exports=e}((function(e){var t,i,n=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],r=Array.prototype.slice;if(e.event.fixHooks)for(var s=n.length;s;)e.event.fixHooks[n[--s]]=e.event.mouseHooks;var a=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=o.length;t;)this.addEventListener(o[--t],l,!1);else this.onmousewheel=l;e.data(this,"mousewheel-line-height",a.getLineHeight(this)),e.data(this,"mousewheel-page-height",a.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=o.length;t;)this.removeEventListener(o[--t],l,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var i=e(t),n=i["offsetParent"in e.fn?"offsetParent":"parent"]();return n.length||(n=e("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function l(n){var o=n||window.event,s=r.call(arguments,1),l=0,h=0,d=0,g=0,f=0,p=0;if((n=e.event.fix(o)).type="mousewheel","detail"in o&&(d=-1*o.detail),"wheelDelta"in o&&(d=o.wheelDelta),"wheelDeltaY"in o&&(d=o.wheelDeltaY),"wheelDeltaX"in o&&(h=-1*o.wheelDeltaX),"axis"in o&&o.axis===o.HORIZONTAL_AXIS&&(h=-1*d,d=0),l=0===d?h:d,"deltaY"in o&&(l=d=-1*o.deltaY),"deltaX"in o&&(h=o.deltaX,0===d&&(l=-1*h)),0!==d||0!==h){if(1===o.deltaMode){var m=e.data(this,"mousewheel-line-height");l*=m,d*=m,h*=m}else if(2===o.deltaMode){var v=e.data(this,"mousewheel-page-height");l*=v,d*=v,h*=v}if(g=Math.max(Math.abs(d),Math.abs(h)),(!i||g<i)&&(i=g,u(o,g)&&(i/=40)),u(o,g)&&(l/=40,h/=40,d/=40),l=Math[l>=1?"floor":"ceil"](l/i),h=Math[h>=1?"floor":"ceil"](h/i),d=Math[d>=1?"floor":"ceil"](d/i),a.settings.normalizeOffset&&this.getBoundingClientRect){var b=this.getBoundingClientRect();f=n.clientX-b.left,p=n.clientY-b.top}return n.deltaX=h,n.deltaY=d,n.deltaFactor=i,n.offsetX=f,n.offsetY=p,n.deltaMode=0,s.unshift(n,l,h,d),t&&clearTimeout(t),t=setTimeout(c,200),(e.event.dispatch||e.event.handle).apply(this,s)}}function c(){i=null}function u(e,t){return a.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})})),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],(function(e,t,i,n){if(null==e.fn.select2){var o=["open","close","destroy"];e.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each((function(){var n=e.extend(!0,{},t);new i(e(this),n)})),this;if("string"==typeof t){var n,r=Array.prototype.slice.call(arguments,1);return this.each((function(){var i=e(this).data("select2");null==i&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=i[t].apply(i,r)})),e.inArray(t,o)>-1?this:n}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=n),i})),t.define("sui.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],(function(e,t,i,n){if(null==e.fn.SUIselect2){var o=["open","close","destroy"];e.fn.SUIselect2=function(t){if("object"==typeof(t=t||{}))return this.each((function(){var n=e.extend(!0,{},t);new i(e(this),n)})),this;if("string"==typeof t){var n,r=Array.prototype.slice.call(arguments,1);return this.each((function(){var i=e(this).data("select2");null==i&&window.console&&console.error&&console.error("The SUISelect2('"+t+"') method was called on an element that is not using Select2."),n=i[t].apply(i,r)})),e.inArray(t,o)>-1?this:n}throw new Error("Invalid arguments for SUISelect2: "+t)}}return null==e.fn.SUIselect2.defaults&&(e.fn.SUIselect2.defaults=n),i})),{define:t.define,require:t.require}})().require("sui.select2")}(jQuery),function(e){e(".sui-color-accessible")[0]?(e(".sui-select").SUIselect2({dropdownCssClass:"sui-select-dropdown sui-color-accessible"}),e(".sui-search").SUIselect2({placeholder:function(){e(this).data("placeholder")},minimumInputLength:2,maximumSelectionLength:1,dropdownCssClass:"sui-search-dropdown sui-color-accessible"}),e(".sui-variables").SUIselect2({dropdownCssClass:"sui-variables-dropdown sui-color-accessible"})):(e(".sui-select").SUIselect2({dropdownCssClass:"sui-select-dropdown"}),e(".sui-search").SUIselect2({placeholder:function(){e(this).data("placeholder")},minimumInputLength:2,maximumSelectionLength:1,dropdownCssClass:"sui-search-dropdown"}),e(".sui-variables").SUIselect2({dropdownCssClass:"sui-variables-dropdown"}))}(jQuery),function(e){"use strict";"object"!=typeof window.SUI&&(window.SUI={}),SUI.sideTabs=function(t){var i,n=e(t),o=n.parent("label"),r=n.data("tab-menu"),s=n.closest(".sui-side-tabs"),a=s.find(">.sui-tabs-menu .sui-tab-item"),l=a.find("input");n.on("click",(function(e){a.removeClass("active"),l.removeAttr("checked"),s.find(".sui-tabs-content>div[data-tab-content]").removeClass("active"),o.addClass("active"),n.attr("checked","checked"),(i=s.find('.sui-tabs-content div[data-tab-content="'+r+'"]')).length&&i.addClass("active")}))},e(".sui-2-5-0 .sui-side-tabs label.sui-tab-item input").each((function(){SUI.sideTabs(this)}))}(jQuery),function(e){"use strict";"object"!=typeof window.SUI&&(window.SUI={}),SUI.floatInput=function(){e("body").ready((function(){var t=e(".sui-sidenav .sui-with-floating-input"),i=e(".sui-header-inline"),n=i.find(".sui-header-title").width(),o=i.next().find(".sui-sidenav").width();n>o&&t.each((function(){e(this).css({left:n+20+"px"})}))}))},SUI.floatInput()}(jQuery),function(e){"use strict";function t(e){e.getBoundingClientRect().top<=parseInt(getComputedStyle(e).top.replace("px",""))?e.classList.add("sui-is-sticky"):e.classList.remove("sui-is-sticky")}[].slice.call(document.querySelectorAll(".sui-box-sticky")).forEach((function(e){CSS.supports&&CSS.supports("position","sticky")&&(null!==e.offsetParent&&t(e),window.addEventListener("scroll",(function(){null!==e.offsetParent&&t(e)})))}))}(jQuery),function(e){"use strict";"object"!=typeof window.SUI&&(window.SUI={}),SUI.suiTabs=function(e){var t,i,n,o,r=["tab","pane"],s=[],a=[],l=[],c=[],u=[];function h(e,i){d(e,i),"function"==typeof t.callback&&t.callback(c.tab,c.pane)}function d(e,t){var h;for(n=e,o=t,h=0;h<r.length;h++)a[i=r[h]]=s[i][n],l[i]=a[i].children,c[i]=l[i][o],g();u[e]=[],u[e][t]=!0}function g(){var e;for(e=0;e<l[i].length;e++)l[i][e].classList.remove(t[i+"Active"]);c[i].classList.add(t[i+"Active"])}function f(e,i){(t=t||[])[e]=t[e]||i}return function(e){var a,l,c;for(t=e,function(){var e;for(e=0;e<r.length;e++)f((i=r[e])+"Group","[data-"+i+"s]"),f(i+"Active","active")}(),s.tab=document.querySelectorAll(t.tabGroup),s.pane=document.querySelectorAll(t.paneGroup),a=0;a<s.tab.length;a++)for(l=s.tab[a].children,c=0;c<l.length;c++)l[c].addEventListener("click",h.bind(this,a,c),!1),n=a,o=c,window.location.hash&&window.location.hash.replace(/[^\w-_]/g,"")===l[c].id&&d(a,c)}(e)},SUI.tabsOverflow=function(t){var i=t.closest(".sui-tabs").find('[data-tabs], [role="tablist"]'),n=t.find(".sui-tabs-navigation--left"),o=t.find(".sui-tabs-navigation--right");function r(){return i[0].scrollWidth>i.width()?(0===i.scrollLeft()?n.addClass("sui-tabs-navigation--hidden"):n.removeClass("sui-tabs-navigation--hidden"),s(0),!0):(n.addClass("sui-tabs-navigation--hidden"),o.addClass("sui-tabs-navigation--hidden"),!1)}function s(e){var t,n;t=i.scrollLeft()+e,n=i.outerWidth(),i.get(0).scrollWidth-t<=n?o.addClass("sui-tabs-navigation--hidden"):o.removeClass("sui-tabs-navigation--hidden")}r(),n.click((function(){return o.removeClass("sui-tabs-navigation--hidden"),0>=i.scrollLeft()-150&&n.addClass("sui-tabs-navigation--hidden"),i.animate({scrollLeft:"-=150"},400,(function(){})),!1})),o.click((function(){return n.removeClass("sui-tabs-navigation--hidden"),s(150),i.animate({scrollLeft:"+=150"},400,(function(){})),!1})),e(window).resize((function(){r()})),i.scroll((function(){r()}))},SUI.tabs=function(t){var i,n=e('.sui-tabs > div[role="tablist"]'),o=t,r=35,s=36,a=37,l=38,c=39,u=40,h=13,d=32,g={37:-1,38:-1,39:1,40:1};if(n.length)return(i=n.closest(".sui-tabs")).each((function(){i=e(this),(n=i.find('> [role="tablist"]')).find('> [role="tab"]').on("click",(function(e){m(e)})).keydown((function(t){!function(e,t,i){switch(e.keyCode||e.which){case r:case s:e.preventDefault();break;case l:case u:p(e,t,i)}}(t,e(this).index(),n)})).keyup((function(t){!function(e,t,i){switch(e.keyCode||e.which){case a:case c:p(e,t,i);break;case h:case d:f(e)}}(t,e(this).index(),n)}))})),this;function f(t){var i=e(t).closest('[role="tablist"]').find('[role="tab"]'),n=e(t).closest(".sui-tabs").find('> .sui-tabs-content > [role="tabpanel"]'),o=e(t).attr("aria-controls"),r=e("#"+o);!function(e,t){e.removeClass("active"),e.attr("tabindex","-1"),e.attr("aria-selected",!1),t.removeClass("active"),t.attr("hidden",!0)}(i,n),e(t).addClass("active"),e(t).removeAttr("tabindex"),e(t).attr("aria-selected",!0),r.addClass("active"),r.attr("hidden",!1),r.removeAttr("hidden")}function p(t,i,n){var o=t.keyCode||t.which,r=!1;"vertical"===e(n).attr("aria-orientation")?l!==o&&u!==o||(t.preventDefault(),r=!0):a!==o&&c!==o||(r=!0),!0===r&&function(t,i){var n,o,r;n=t.keyCode||t.which,g[n]&&(o=t.target,r=e(o).closest('[role="tablist"]').find('> [role="tab"]'),void 0!==i&&(r[i+g[n]]?r[i+g[n]].focus():a===n||l===n?r[r.length-1].focus():c!==n&&u!==n||r[0].focus()))}(t,i)}function m(t){var i=t.target;f(i),void 0!==o&&"undefined"!==o&&function(t){var i=e(t),n=i.attr("aria-controls"),r=e("#"+n);"function"==typeof o.callback&&o.callback(i,r)}(i),t.preventDefault(),t.stopPropagation()}},0!==e(".sui-2-5-0 .sui-tabs").length&&(SUI.tabs(),SUI.suiTabs(),e(".sui-2-5-0 .sui-tabs-navigation").each((function(){SUI.tabsOverflow(e(this))})))}(jQuery),function(e){"use strict";"object"!=typeof window.SUI&&(window.SUI={}),SUI.treeOnLoad=function(t){var i=e(t),n=i.find('li[role="treeitem"]');n.find('> ul[role="group"]').slideUp(),n.each((function(){var t=e(this),n=t.attr("aria-expanded"),o=t.attr("aria-selected"),r=t.find("> .sui-tree-node"),s=r.find("> .sui-node-checkbox"),a=r.find('> span[role="button"], > button'),l=r.find("> span[aria-hidden]"),c=t.find('> ul[role="group"]'),u=c.find('> li[role="treeitem"]'),h=u.find("> .sui-tree-node > .sui-node-checkbox");"selector"!==i.data("tree")&&"selector"!==i.attr("data-tree")||0===l.length||a.remove(),void 0!==n&&!1!==n?"true"===n&&c.slideDown():0!==c.length?t.attr("aria-expanded","false"):0!==a.length&&a.remove(),void 0!==o&&!1!==o?"true"===o&&0<c.length&&(u.attr("aria-selected","true"),0!==s.length&&s.is("label")&&s.find("input").prop("checked",!0),0!==h.length&&h.is("label")&&h.find("input").prop("checked",!0)):(t.attr("aria-selected","false"),0!==s.length&&s.is("label")&&s.find("input").prop("checked",!1))}))},SUI.treeButton=function(t){e(t).on("click",(function(t){var i=e(this).closest('li[role="treeitem"]'),n=i.find('> ul[role="group"]');0!==n.length&&(n.slideToggle(250),"true"===i.attr("aria-expanded")?i.attr("aria-expanded","false"):i.attr("aria-expanded","true")),t.preventDefault()}))},SUI.treeCheckbox=function(t){e(t).on("click",(function(){var t=e(this),i=t.closest('li[role="treeitem"]'),n=i.find('ul[role="group"]'),o=n.find('> li[role="treeitem"]'),r=o.find("> .sui-tree-node > .sui-node-checkbox input"),s=i.parent("ul").parent("li"),a=0,l=s.parents("ul").length-1;if("true"===i.attr("aria-selected"))i.attr("aria-selected","false"),t.is("input")&&t.prop("checked",!1),0!==n.length&&o.attr("aria-selected","false"),0!==r.length&&r.prop("checked",!1),i.parent().is("ul")&&"group"===i.parent().attr("role")&&i.parents("ul").each((function(){var t=e(this).parent("li"),i=t.find("> .sui-tree-node > .sui-node-checkbox input");"treeitem"===t.attr("role")&&(t.attr("aria-selected","false"),0!==i.length&&i.prop("checked",!1))}));else if(i.attr("aria-selected","true"),t.is("input")&&t.prop("checked",!0),0!==n.length&&o.attr("aria-selected","true"),0!==r.length&&r.prop("checked",!0),0===s.find('li[aria-selected="false"]').length)for(s.attr("aria-selected","true"),a=0;l>=a;a++)s.parent("ul").eq(a).each((function(){var t=e(this);0===t.find('> li[aria-selected="false"]').length&&(t.parent("li").attr("aria-selected","true"),t.parent("li").find("> .sui-tree-node > .sui-node-checkbox input").prop("checked",!0))}))}))},SUI.treeForm=function(t){var i=e(t);"add"===i.attr("data-button")&&i.on("click",(function(){var t=e(this),i=t.closest('li[role="treeitem"]'),n=i.find("> .sui-tree-node").find('span[data-button="expander"]'),o=i.find('> ul[role="group"]').find('> span[role="contentinfo"]');0!==o.length&&(t.hide(),t.removeAttr("tabindex"),t.attr("aria-hidden","true"),o.addClass("sui-show"),o.removeAttr("aria-hidden"),"true"!==i.attr("aria-expanded")&&n.click(),o.focus(),o.attr("tabindex","-1"))})),"remove"===i.attr("data-button")&&i.on("click",(function(){var t=e(this).closest('span[role="contentinfo"]'),i=t.closest('li[role="treeitem"]').find("> .sui-tree-node").find('> span[data-button="add"]');t.removeClass("sui-show"),t.removeAttr("tabindex"),t.attr("aria-hidden","true"),i.show(),i.removeAttr("aria-hidden"),i.focus(),i.attr("tabindex","-1")}))},SUI.suiTree=function(t,i){var n=e(t);if(n.hasClass("sui-tree")&&"undefined"!==n.attr("data-tree"))return"selector"!==n.data("tree")&&"directory"!==n.data("tree")&&"selector"!==n.attr("data-tree")&&"directory"!==n.atrr("data-tree")||(SUI.treeOnLoad(n),function(){var t=n.find('li[role="treeitem"]').find("> .sui-tree-node"),i=t.find('> [data-button="expander"]'),o=t.find("> span.sui-node-text");i.each((function(){var t=e(this);SUI.treeButton(t)})),o.each((function(){var t=e(this);SUI.treeButton(t)}))}(),n.find('li[role="treeitem"]').find("> .sui-tree-node").find("> .sui-node-checkbox").each((function(){var t=e(this).is("label")?e(this).find("input"):e(this);SUI.treeCheckbox(t)})),!0!==i&&"true"!==i||(n.find('li[role="treeitem"]').find("> .sui-tree-node").find('> [data-button="add"]').each((function(){var t=e(this);SUI.treeForm(t)})),n.find('[data-button="remove"]').each((function(){var t=e(this);SUI.treeForm(t)})))),this},0!==e(".sui-2-5-0 .sui-tree").length&&e(".sui-2-5-0 .sui-tree").each((function(){SUI.suiTree(e(this),!0)}))}(jQuery),function(e){"use strict";"object"!=typeof window.SUI&&(window.SUI={}),SUI.upload=function(){e('.sui-2-5-0 .sui-upload-group input[type="file"]').on("change",(function(t){var i=e(this)[0].files[0],n=e(this).find("~ .sui-upload-message");i&&n.text(i.name)}))},SUI.upload()}(jQuery),function(){var e=function(){return this}();!e&&"undefined"!=typeof window&&(e=window);var t=function(e,i,n){"string"==typeof e?(2==arguments.length&&(n=i),t.modules[e]||(t.payloads[e]=n,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var i=function(e,t,i){if("string"==typeof t){var o=r(e,t);if(null!=o)return i&&i(),o}else if("[object Array]"===Object.prototype.toString.call(t)){for(var s=[],a=0,l=t.length;a<l;++a){var c=r(e,t[a]);if(null==c&&n.original)return;s.push(c)}return i&&i.apply(null,s)||!0}},n=function(e,t){var o=i("",e,t);return null==o&&n.original?n.original.apply(this,arguments):o},o=function(e,t){if(-1!==t.indexOf("!")){var i=t.split("!");return o(e,i[0])+"!"+o(e,i[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&n!=t;){var n=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},r=function(e,n){n=o(e,n);var r=t.modules[n];if(!r){if("function"==typeof(r=t.payloads[n])){var s={},a={id:n,uri:"",exports:s,packaged:!0};s=r((function(e,t){return i(n,e,t)}),s,a)||a.exports,t.modules[n]=s,delete t.payloads[n]}r=t.modules[n]=s||r}return r};!function(i){var o=e;i&&(e[i]||(e[i]={}),o=e[i]),o.define&&o.define.packaged||(t.original=o.define,o.define=t,o.define.packaged=!0),o.require&&o.require.packaged||(n.original=o.require,o.require=n,o.require.packaged=!0)}("ace")}(),ace.define("ace/lib/regexp",["require","exports","module"],(function(e,t,i){"use strict";function n(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function o(e,t,i){if(Array.prototype.indexOf)return e.indexOf(t,i);for(var n=i||0;n<e.length;n++)if(e[n]===t)return n;return-1}var r={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},s=void 0===r.exec.call(/()??/,"")[1],a=function(){var e=/^/g;return r.test.call(e,""),!e.lastIndex}();a&&s||(RegExp.prototype.exec=function(e){var t,i,l=r.exec.apply(this,arguments);if("string"==typeof e&&l){if(!s&&l.length>1&&o(l,"")>-1&&(i=RegExp(this.source,r.replace.call(n(this),"g","")),r.replace.call(e.slice(l.index),i,(function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(l[e]=void 0)}))),this._xregexp&&this._xregexp.captureNames)for(var c=1;c<l.length;c++)(t=this._xregexp.captureNames[c-1])&&(l[t]=l[c]);!a&&this.global&&!l[0].length&&this.lastIndex>l.index&&this.lastIndex--}return l},a||(RegExp.prototype.test=function(e){var t=r.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))})),ace.define("ace/lib/es5-shim",["require","exports","module"],(function(e,t,i){function n(){}function o(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}function r(e){return(e=+e)!=e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var i=f.call(arguments,1),o=function(){if(this instanceof o){var n=t.apply(this,i.concat(f.call(arguments)));return Object(n)===n?n:this}return t.apply(e,i.concat(f.call(arguments)))};return t.prototype&&(n.prototype=t.prototype,o.prototype=new n,n.prototype=null),o});var s,a,l,c,u,h=Function.prototype.call,d=Array.prototype,g=Object.prototype,f=d.slice,p=h.bind(g.toString),m=h.bind(g.hasOwnProperty);if((u=m(g,"__defineGetter__"))&&(s=h.bind(g.__defineGetter__),a=h.bind(g.__defineSetter__),l=h.bind(g.__lookupGetter__),c=h.bind(g.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,i=[];if(i.splice.apply(i,e(20)),i.splice.apply(i,e(26)),t=i.length,i.splice(5,0,"XXX"),i.length,t+1==i.length)return!0}()){var v=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?v.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(f.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var i=this.length;e>0?e>i&&(e=i):null==e?e=0:e<0&&(e=Math.max(i+e,0)),e+t<i||(t=i-e);var n=this.slice(e,e+t),o=f.call(arguments,2),r=o.length;if(e===i)r&&this.push.apply(this,o);else{var s=Math.min(t,i-e),a=e+s,l=a+r-s,c=i-a,u=i-s;if(l<a)for(var h=0;h<c;++h)this[l+h]=this[a+h];else if(l>a)for(h=c;h--;)this[l+h]=this[a+h];if(r&&e===u)this.length=u,this.push.apply(this,o);else for(this.length=u+r,h=0;h<r;++h)this[e+h]=o[h]}return n};Array.isArray||(Array.isArray=function(e){return"[object Array]"==p(e)});var b,w=Object("a"),A="a"!=w[0]||!(0 in w);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=_(this),i=A&&"[object String]"==p(this)?this.split(""):t,n=arguments[1],o=-1,r=i.length>>>0;if("[object Function]"!=p(e))throw new TypeError;for(;++o<r;)o in i&&e.call(n,i[o],o,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=_(this),i=A&&"[object String]"==p(this)?this.split(""):t,n=i.length>>>0,o=Array(n),r=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var s=0;s<n;s++)s in i&&(o[s]=e.call(r,i[s],s,t));return o}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,i=_(this),n=A&&"[object String]"==p(this)?this.split(""):i,o=n.length>>>0,r=[],s=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var a=0;a<o;a++)a in n&&(t=n[a],e.call(s,t,a,i)&&r.push(t));return r}),Array.prototype.every||(Array.prototype.every=function(e){var t=_(this),i=A&&"[object String]"==p(this)?this.split(""):t,n=i.length>>>0,o=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var r=0;r<n;r++)if(r in i&&!e.call(o,i[r],r,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=_(this),i=A&&"[object String]"==p(this)?this.split(""):t,n=i.length>>>0,o=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var r=0;r<n;r++)if(r in i&&e.call(o,i[r],r,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=_(this),i=A&&"[object String]"==p(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var o,r=0;if(arguments.length>=2)o=arguments[1];else for(;;){if(r in i){o=i[r++];break}if(++r>=n)throw new TypeError("reduce of empty array with no initial value")}for(;r<n;r++)r in i&&(o=e.call(void 0,o,i[r],r,t));return o}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=_(this),i=A&&"[object String]"==p(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var o,r=n-1;if(arguments.length>=2)o=arguments[1];else for(;;){if(r in i){o=i[r--];break}if(--r<0)throw new TypeError("reduceRight of empty array with no initial value")}do{r in this&&(o=e.call(void 0,o,i[r],r,t))}while(r--);return o}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=A&&"[object String]"==p(this)?this.split(""):_(this),i=t.length>>>0;if(!i)return-1;var n=0;for(arguments.length>1&&(n=r(arguments[1])),n=n>=0?n:Math.max(0,i+n);n<i;n++)if(n in t&&t[n]===e)return n;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=A&&"[object String]"==p(this)?this.split(""):_(this),i=t.length>>>0;if(!i)return-1;var n=i-1;for(arguments.length>1&&(n=Math.min(n,r(arguments[1]))),n=n>=0?n:i-Math.abs(n);n>=0;n--)if(n in t&&e===t[n])return n;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:g)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(m(e,t)){var i;if(i={enumerable:!0,configurable:!0},u){var n=e.__proto__;e.__proto__=g;var o=l(e,t),r=c(e,t);if(e.__proto__=n,o||r)return o&&(i.get=o),r&&(i.set=r),i}return i.value=e[t],i}}}(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),Object.create)||(b=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var i;if(null===e)i=b();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var n=function(){};n.prototype=e,(i=new n).__proto__=e}return void 0!==t&&Object.defineProperties(i,t),i});if(Object.defineProperty){var C=o({}),y="undefined"==typeof document||o(document.createElement("div"));if(!C||!y)var F=Object.defineProperty}if(!Object.defineProperty||F){Object.defineProperty=function(e,t,i){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof i&&"function"!=typeof i||null===i)throw new TypeError("Property description must be an object: "+i);if(F)try{return F.call(Object,e,t,i)}catch(e){}if(m(i,"value"))if(u&&(l(e,t)||c(e,t))){var n=e.__proto__;e.__proto__=g,delete e[t],e[t]=i.value,e.__proto__=n}else e[t]=i.value;else{if(!u)throw new TypeError("getters & setters can not be defined on this javascript engine");m(i,"get")&&s(e,t,i.get),m(i,"set")&&a(e,t,i.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var i in t)m(t,i)&&Object.defineProperty(e,i,t[i]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze((function(){}))}catch(e){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";m(e,t);)t+="?";e[t]=!0;var i=m(e,t);return delete e[t],i}),!Object.keys){var E=!0,x=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],k=x.length;for(var $ in{toString:null})E=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var i in e)m(e,i)&&t.push(i);if(E)for(var n=0,o=k;n<o;n++){var r=x[n];m(e,r)&&t.push(r)}return t}}Date.now||(Date.now=function(){return(new Date).getTime()});var S="\t\n\v\f\r \u2028\u2029\ufeff";if(!String.prototype.trim||S.trim()){S="["+S+"]";var D=new RegExp("^"+S+S+"*"),B=new RegExp(S+S+"*$");String.prototype.trim=function(){return String(this).replace(D,"").replace(B,"")}}var _=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],(function(e,t,i){"use strict";e("./regexp"),e("./es5-shim")})),ace.define("ace/lib/dom",["require","exports","module"],(function(e,t,i){"use strict";t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,i){t.hasCssClass(e,i)||(e.className+=" "+i)},t.removeCssClass=function(e,t){for(var i=e.className.split(/\s+/g);;){var n=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},t.toggleCssClass=function(e,t){for(var i=e.className.split(/\s+/g),n=!0;;){var o=i.indexOf(t);if(-1==o)break;n=!1,i.splice(o,1)}return n&&i.push(t),e.className=i.join(" "),n},t.setCssClass=function(e,i,n){n?t.addCssClass(e,i):t.removeCssClass(e,i)},t.hasCssString=function(e,t){var i,n=0;if((t=t||document).createStyleSheet&&(i=t.styleSheets)){for(;n<i.length;)if(i[n++].owningElement.id===e)return!0}else if(i=t.getElementsByTagName("style"))for(;n<i.length;)if(i[n++].id===e)return!0;return!1},t.importCssString=function(e,i,n){if(n=n||document,i&&t.hasCssString(i,n))return null;var o;i&&(e+="\n/*# sourceURL=ace/css/"+i+" */"),n.createStyleSheet?((o=n.createStyleSheet()).cssText=e,i&&(o.owningElement.id=i)):((o=t.createElement("style")).appendChild(n.createTextNode(e)),i&&(o.id=i),t.getDocumentHead(n).appendChild(o))},t.importCssStylsheet=function(e,i){if(i.createStyleSheet)i.createStyleSheet(e);else{var n=t.createElement("link");n.rel="stylesheet",n.href=e,t.getDocumentHead(i).appendChild(n)}},t.getInnerWidth=function(e){return parseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){return parseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight},t.scrollbarWidth=function(e){var i=t.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var n=t.createElement("ace_outer"),o=n.style;o.position="absolute",o.left="-10000px",o.overflow="hidden",o.width="200px",o.minWidth="0px",o.height="150px",o.display="block",n.appendChild(i);var r=e.documentElement;r.appendChild(n);var s=i.offsetWidth;o.overflow="scroll";var a=i.offsetWidth;return s==a&&(a=n.clientWidth),r.removeChild(n),s-a},"undefined"!=typeof document?(void 0!==window.pageYOffset?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){return t?(window.getComputedStyle(e,"")||{})[t]||"":window.getComputedStyle(e,"")||{}}:t.computedStyle=function(e,t){return t?e.currentStyle[t]:e.currentStyle},t.setInnerHtml=function(e,t){var i=e.cloneNode(!1);return i.innerHTML=t,e.parentNode.replaceChild(i,e),i},"textContent"in document.documentElement?(t.setInnerText=function(e,t){e.textContent=t},t.getInnerText=function(e){return e.textContent}):(t.setInnerText=function(e,t){e.innerText=t},t.getInnerText=function(e){return e.innerText}),t.getParentWindow=function(e){return e.defaultView||e.parentWindow}):t.importCssString=function(){}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,i){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var i in t)e[i]=t[i];return e},t.implement=function(e,i){t.mixin(e,i)}})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],(function(e,t,i){"use strict";e("./fixoldbrowsers");var n=e("./oop"),o=function(){var e,t,i={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in i.FUNCTION_KEYS)e=i.FUNCTION_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);for(t in i.PRINTABLE_KEYS)e=i.PRINTABLE_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);return n.mixin(i,i.MODIFIER_KEYS),n.mixin(i,i.PRINTABLE_KEYS),n.mixin(i,i.FUNCTION_KEYS),i.enter=i.return,i.escape=i.esc,i.del=i.delete,i[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)i.KEY_MODS[t]=e.filter((function(e){return t&i.KEY_MODS[e]})).join("-")+"-"}(),i.KEY_MODS[0]="",i.KEY_MODS[-1]="input-",i}();n.mixin(t,o),t.keyCodeToString=function(e){var t=o[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,i){"use strict";if(t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS},"object"==typeof navigator){var n=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),o=navigator.userAgent;t.isWin="win"==n,t.isMac="mac"==n,t.isLinux="linux"==n,t.isIE="Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((o.match(/rv:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isIPad=o.indexOf("iPad")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0)}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,i){"use strict";function n(e,t,i){var n=c(t);if(!s.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(n|=8),a.altGr){if(3==(3&n))return;a.altGr=0}if(18===i||17===i){var o="location"in t?t.location:t.keyLocation;if(17===i&&1===o)1==a[i]&&(l=t.timeStamp);else if(18===i&&3===n&&2===o){t.timeStamp-l<50&&(a.altGr=!0)}}}if((i in r.MODIFIER_KEYS&&(i=-1),8&n&&i>=91&&i<=93&&(i=-1),!n&&13===i)&&(3===(o="location"in t?t.location:t.keyLocation)&&(e(t,n,-i),t.defaultPrevented)))return;if(s.isChromeOS&&8&n){if(e(t,n,i),t.defaultPrevented)return;n&=-9}return!!(n||i in r.FUNCTION_KEYS||i in r.PRINTABLE_KEYS)&&e(t,n,i)}function o(){a=Object.create(null)}var r=e("./keys"),s=e("./useragent"),a=null,l=0;t.addListener=function(e,t,i){if(e.addEventListener)return e.addEventListener(t,i,!1);if(e.attachEvent){var n=function(){i.call(e,window.event)};i._wrapper=n,e.attachEvent("on"+t,n)}},t.removeListener=function(e,t,i){if(e.removeEventListener)return e.removeEventListener(t,i,!1);e.detachEvent&&e.detachEvent("on"+t,i._wrapper||i)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||s.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,i,n){function o(e){i&&i(e),n&&n(e),t.removeListener(document,"mousemove",i,!0),t.removeListener(document,"mouseup",o,!0),t.removeListener(document,"dragstart",o,!0)}return t.addListener(document,"mousemove",i,!0),t.addListener(document,"mouseup",o,!0),t.addListener(document,"dragstart",o,!0),o},t.addTouchMoveListener=function(e,i){var n,o;"ontouchmove"in e&&(t.addListener(e,"touchstart",(function(e){var t=e.changedTouches[0];n=t.clientX,o=t.clientY})),t.addListener(e,"touchmove",(function(e){var t=e.changedTouches[0];e.wheelX=-(t.clientX-n)/1,e.wheelY=-(t.clientY-o)/1,n=t.clientX,o=t.clientY,i(e)})))},t.addMouseWheelListener=function(e,i){"onmousewheel"in e?t.addListener(e,"mousewheel",(function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),i(e)})):"onwheel"in e?t.addListener(e,"wheel",(function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}i(e)})):t.addListener(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),i(e)}))},t.addMultiMouseDownListener=function(e,i,n,o){function r(e){if(0!==t.getButton(e)?h=0:e.detail>1?++h>4&&(h=1):h=1,s.isIE){var r=Math.abs(e.clientX-l)>5||Math.abs(e.clientY-c)>5;u&&!r||(h=1),u&&clearTimeout(u),u=setTimeout((function(){u=null}),i[h-1]||600),1==h&&(l=e.clientX,c=e.clientY)}if(e._clicks=h,n[o]("mousedown",e),h>4)h=0;else if(h>1)return n[o](d[h],e)}function a(e){h=2,u&&clearTimeout(u),u=setTimeout((function(){u=null}),i[h-1]||600),n[o]("mousedown",e),n[o](d[h],e)}var l,c,u,h=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};Array.isArray(e)||(e=[e]),e.forEach((function(e){t.addListener(e,"mousedown",r),s.isOldIE&&t.addListener(e,"dblclick",a)}))};var c=!s.isMac||!s.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};if(t.getModifierString=function(e){return r.KEY_MODS[c(e)]},t.addCommandKeyListener=function(e,i){var r=t.addListener;if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var l=null;r(e,"keydown",(function(e){l=e.keyCode})),r(e,"keypress",(function(e){return n(i,e,l)}))}else{var c=null;r(e,"keydown",(function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=n(i,e,e.keyCode);return c=e.defaultPrevented,t})),r(e,"keypress",(function(e){c&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),c=null)})),r(e,"keyup",(function(e){a[e.keyCode]=null})),a||(o(),r(window,"focus",o))}},"object"==typeof window&&window.postMessage&&!s.isOldIE){t.nextTick=function(e,i){i=i||window;var n="zero-timeout-message-1";t.addListener(i,"message",(function o(r){r.data==n&&(t.stopPropagation(r),t.removeListener(i,"message",o),e())})),i.postMessage(n,"*")}}t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/lib/lang",["require","exports","module"],(function(e,t,i){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var i="";t>0;)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var n=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(o,"")},t.copyObject=function(e){var t={};for(var i in e)t[i]=e[i];return t},t.copyArray=function(e){for(var t=[],i=0,n=e.length;i<n;i++)e[i]&&"object"==typeof e[i]?t[i]=this.copyObject(e[i]):t[i]=e[i];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var i;if(Array.isArray(t)){i=[];for(var n=0;n<t.length;n++)i[n]=e(t[n]);return i}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var n in i={},t)i[n]=e(t[n]);return i},t.arrayToMap=function(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var i in e)t[i]=e[i];return t},t.arrayRemove=function(e,t){for(var i=0;i<=e.length;i++)t===e[i]&&e.splice(i,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var i=[];return e.replace(t,(function(e){i.push({offset:arguments[arguments.length-2],length:e.length})})),i},t.deferredCall=function(e){var t=null,i=function(){t=null,e()},n=function(e){return n.cancel(),t=setTimeout(i,e||0),n};return n.schedule=n,n.call=function(){return this.cancel(),e(),n},n.cancel=function(){return clearTimeout(t),t=null,n},n.isPending=function(){return t},n},t.delayedCall=function(e,t){var i=null,n=function(){i=null,e()},o=function(e){null==i&&(i=setTimeout(n,e||t))};return o.delay=function(e){i&&clearTimeout(i),i=setTimeout(n,e||t)},o.schedule=o,o.call=function(){this.cancel(),e()},o.cancel=function(){i&&clearTimeout(i),i=null},o.isPending=function(){return i},o}})),ace.define("ace/keyboard/textinput_ios",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/lib/keys"],(function(e,t,i){"use strict";var n=e("../lib/event"),o=e("../lib/useragent"),r=e("../lib/dom"),s=e("../lib/lang"),a=e("../lib/keys"),l=a.KEY_MODS,c=o.isChrome<18,u=o.isIE;t.TextInput=function(e,t){function i(e){if(!b){if(b=!0,E)t=0,i=e?0:g.value.length-1;else var t=4,i=5;try{g.setSelectionRange(t,i)}catch(e){}b=!1}}function h(){b||(g.value=f,o.isWebKit&&F.schedule())}function d(){clearTimeout(T),T=setTimeout((function(){w&&(g.style.cssText=w,w=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())}),0)}var g=r.createElement("textarea");g.className=o.isIOS?"ace_text-input ace_text-input-ios":"ace_text-input",o.isTouchPad&&g.setAttribute("x-palm-disable-auto-cap",!0),g.setAttribute("wrap","off"),g.setAttribute("autocorrect","off"),g.setAttribute("autocapitalize","off"),g.setAttribute("spellcheck",!1),g.style.opacity="0",e.insertBefore(g,e.firstChild);var f="\n aaaa a\n",p=!1,m=!1,v=!1,b=!1,w="",A=!0;try{var C=document.activeElement===g}catch(e){}n.addListener(g,"blur",(function(e){t.onBlur(e),C=!1})),n.addListener(g,"focus",(function(e){C=!0,t.onFocus(e),i()})),this.focus=function(){if(w)return g.focus();g.style.position="fixed",g.focus()},this.blur=function(){g.blur()},this.isFocused=function(){return C};var y=s.delayedCall((function(){C&&i(A)})),F=s.delayedCall((function(){b||(g.value=f,C&&i())}));o.isWebKit||t.addEventListener("changeSelection",(function(){t.selection.isEmpty()!=A&&(A=!A,y.schedule())})),h(),C&&t.onFocus();var E=null;this.setInputHandler=function(e){E=e},this.getInputHandler=function(){return E};var x=!1,k=function(e){4===g.selectionStart&&5===g.selectionEnd||(E&&(e=E(e),E=null),v?(i(),e&&t.onPaste(e),v=!1):e==f.substr(0)&&4===g.selectionStart?x?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):p||(e.substring(0,9)==f&&e.length>f.length?e=e.substr(9):e.substr(0,4)==f.substr(0,4)?e=e.substr(4,e.length-f.length+1):e.charAt(e.length-1)==f.charAt(0)&&(e=e.slice(0,-1)),e!=f.charAt(0)&&e.charAt(e.length-1)==f.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),p&&(p=!1),x&&(x=!1))},$=function(e){if(!b){var t=g.value;k(t),h()}},S=function(e,t,i){var n=e.clipboardData||window.clipboardData;if(n&&!c){var o=u||i?"Text":"text/plain";try{return t?!1!==n.setData(o,t):n.getData(o)}catch(e){if(!i)return S(e,t,!0)}}},D=function(e,r){var s=t.getCopyText();if(!s)return n.preventDefault(e);S(e,s)?(o.isIOS&&(m=r,g.value="\n aa"+s+"a a\n",g.setSelectionRange(4,4+s.length),p={value:s}),r?t.onCut():t.onCopy(),o.isIOS||n.preventDefault(e)):(p=!0,g.value=s,g.select(),setTimeout((function(){p=!1,h(),i(),r?t.onCut():t.onCopy()})))};n.addCommandKeyListener(g,t.onCommandKey.bind(t)),n.addListener(g,"select",(function(e){!function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length}(g)?E&&i(t.selection.isEmpty()):(t.selectAll(),i())})),n.addListener(g,"input",$),n.addListener(g,"cut",(function(e){D(e,!0)})),n.addListener(g,"copy",(function(e){D(e,!1)})),n.addListener(g,"paste",(function(e){var r=S(e);"string"==typeof r?(r&&t.onPaste(r,e),o.isIE&&setTimeout(i),n.preventDefault(e)):(g.value="",v=!0)}));var B=function(){if(b&&t.onCompositionUpdate&&!t.$readOnly){var e=g.value.replace(/\x01/g,"");if(b.lastValue!==e&&(t.onCompositionUpdate(e),b.lastValue&&t.undo(),b.canUndo&&(b.lastValue=e),b.lastValue)){var i=t.selection.getRange();t.insert(b.lastValue),t.session.markUndoGroup(),b.range=t.selection.getRange(),t.selection.setRange(i),t.selection.clearSelection()}}},_=function(e){if(t.onCompositionEnd&&!t.$readOnly){var i=b;b=!1;var n=setTimeout((function(){n=null;var e=g.value.replace(/\x01/g,"");b||(e==i.lastValue?h():!i.lastValue&&e&&(h(),k(e)))}));E=function(e){return n&&clearTimeout(n),(e=e.replace(/\x01/g,""))==i.lastValue?"":(i.lastValue&&n&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",_),"compositionend"==e.type&&i.range&&t.selection.setRange(i.range),(!!o.isChrome&&o.isChrome>=53||!!o.isWebKit&&o.isWebKit>=603)&&$()}},L=s.delayedCall(B,50);n.addListener(g,"compositionstart",(function(e){b||!t.onCompositionStart||t.$readOnly||((b={}).canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(B,0),t.on("mousedown",_),b.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())})),o.isGecko?n.addListener(g,"text",(function(){L.schedule()})):(n.addListener(g,"keyup",(function(){L.schedule()})),n.addListener(g,"keydown",(function(){L.schedule()}))),n.addListener(g,"compositionend",_),this.getElement=function(){return g},this.setReadOnly=function(e){g.readOnly=e},this.onContextMenu=function(e){x=!0,i(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,i){w||(w=g.style.cssText),g.style.cssText=(i?"z-index:100000;":"")+"height:"+g.style.height+";"+(o.isIE?"opacity:0.1;":"");var s=t.container.getBoundingClientRect(),a=r.computedStyle(t.container),l=s.top+(parseInt(a.borderTopWidth)||0),c=s.left+(parseInt(s.borderLeftWidth)||0),u=s.bottom-l-g.clientHeight-2,h=function(e){g.style.left=e.clientX-c-2+"px",g.style.top=Math.min(e.clientY-l-2,u)+"px"};h(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(T),o.isWin&&n.capture(t.container,h,d))},this.onContextMenuClose=d;var T,R=function(e){t.textInput.onContextMenu(e),d()};if(n.addListener(g,"mouseup",R),n.addListener(g,"mousedown",(function(e){e.preventDefault(),d()})),n.addListener(t.renderer.scroller,"contextmenu",R),n.addListener(g,"contextmenu",R),o.isIOS){var M=null,I=!1;e.addEventListener("keydown",(function(e){M&&clearTimeout(M),I=!0})),e.addEventListener("keyup",(function(e){M=setTimeout((function(){I=!1}),100)}));var O=function(e){if(document.activeElement===g&&!I){if(m)return setTimeout((function(){m=!1}),100);var i=g.selectionStart,n=g.selectionEnd;if(g.setSelectionRange(4,5),i==n)switch(i){case 0:t.onCommandKey(null,0,a.up);break;case 1:t.onCommandKey(null,0,a.home);break;case 2:t.onCommandKey(null,l.option,a.left);break;case 4:t.onCommandKey(null,0,a.left);break;case 5:t.onCommandKey(null,0,a.right);break;case 7:t.onCommandKey(null,l.option,a.right);break;case 8:t.onCommandKey(null,0,a.end);break;case 9:t.onCommandKey(null,0,a.down)}else{switch(n){case 6:t.onCommandKey(null,l.shift,a.right);break;case 7:t.onCommandKey(null,l.shift|l.option,a.right);break;case 8:t.onCommandKey(null,l.shift,a.end);break;case 9:t.onCommandKey(null,l.shift,a.down)}switch(i){case 0:t.onCommandKey(null,l.shift,a.up);break;case 1:t.onCommandKey(null,l.shift,a.home);break;case 2:t.onCommandKey(null,l.shift|l.option,a.left);break;case 3:t.onCommandKey(null,l.shift,a.left)}}}};document.addEventListener("selectionchange",O),t.on("destroy",(function(){document.removeEventListener("selectionchange",O)}))}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/keyboard/textinput_ios"],(function(e,t,i){"use strict";var n=e("../lib/event"),o=e("../lib/useragent"),r=e("../lib/dom"),s=e("../lib/lang"),a=o.isChrome<18,l=o.isIE,c=e("./textinput_ios").TextInput;t.TextInput=function(e,t){function i(e){if(!m){if(m=!0,y)t=0,i=e?0:d.value.length-1;else var t=e?2:1,i=2;try{d.setSelectionRange(t,i)}catch(e){}m=!1}}function u(){m||(d.value=g,o.isWebKit&&C.schedule())}function h(){clearTimeout(R),R=setTimeout((function(){v&&(d.style.cssText=v,v=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())}),0)}if(o.isIOS)return c.call(this,e,t);var d=r.createElement("textarea");d.className="ace_text-input",d.setAttribute("wrap","off"),d.setAttribute("autocorrect","off"),d.setAttribute("autocapitalize","off"),d.setAttribute("spellcheck",!1),d.style.opacity="0",e.insertBefore(d,e.firstChild);var g="\u2028\u2028",f=!1,p=!1,m=!1,v="",b=!0;try{var w=document.activeElement===d}catch(e){}n.addListener(d,"blur",(function(e){t.onBlur(e),w=!1})),n.addListener(d,"focus",(function(e){w=!0,t.onFocus(e),i()})),this.focus=function(){if(v)return d.focus();var e=d.style.top;d.style.position="fixed",d.style.top="0px",d.focus(),setTimeout((function(){d.style.position="","0px"==d.style.top&&(d.style.top=e)}),0)},this.blur=function(){d.blur()},this.isFocused=function(){return w};var A=s.delayedCall((function(){w&&i(b)})),C=s.delayedCall((function(){m||(d.value=g,w&&i())}));o.isWebKit||t.addEventListener("changeSelection",(function(){t.selection.isEmpty()!=b&&(b=!b,A.schedule())})),u(),w&&t.onFocus();var y=null;this.setInputHandler=function(e){y=e},this.getInputHandler=function(){return y};var F=!1,E=function(e){y&&(e=y(e),y=null),p?(i(),e&&t.onPaste(e),p=!1):e==g.charAt(0)?F?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==g?e=e.substr(2):e.charAt(0)==g.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==g.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==g.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),F&&(F=!1)},x=function(e){if(!m){var t=d.value;E(t),u()}},k=function(e,t,i){var n=e.clipboardData||window.clipboardData;if(n&&!a){var o=l||i?"Text":"text/plain";try{return t?!1!==n.setData(o,t):n.getData(o)}catch(e){if(!i)return k(e,t,!0)}}},$=function(e,o){var r=t.getCopyText();if(!r)return n.preventDefault(e);k(e,r)?(o?t.onCut():t.onCopy(),n.preventDefault(e)):(f=!0,d.value=r,d.select(),setTimeout((function(){f=!1,u(),i(),o?t.onCut():t.onCopy()})))},S=function(e){$(e,!0)},D=function(e){$(e,!1)},B=function(e){var r=k(e);"string"==typeof r?(r&&t.onPaste(r,e),o.isIE&&setTimeout(i),n.preventDefault(e)):(d.value="",p=!0)};n.addCommandKeyListener(d,t.onCommandKey.bind(t)),n.addListener(d,"select",(function(e){f?f=!1:function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length}(d)?(t.selectAll(),i()):y&&i(t.selection.isEmpty())})),n.addListener(d,"input",x),n.addListener(d,"cut",S),n.addListener(d,"copy",D),n.addListener(d,"paste",B),(!("oncut"in d)||!("oncopy"in d)||!("onpaste"in d))&&n.addListener(e,"keydown",(function(e){if((!o.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:D(e);break;case 86:B(e);break;case 88:S(e)}}));var _=function(){if(m&&t.onCompositionUpdate&&!t.$readOnly){var e=d.value.replace(/\u2028/g,"");if(m.lastValue!==e&&(t.onCompositionUpdate(e),m.lastValue&&t.undo(),m.canUndo&&(m.lastValue=e),m.lastValue)){var i=t.selection.getRange();t.insert(m.lastValue),t.session.markUndoGroup(),m.range=t.selection.getRange(),t.selection.setRange(i),t.selection.clearSelection()}}},L=function(e){if(t.onCompositionEnd&&!t.$readOnly){var i=m;m=!1;var n=setTimeout((function(){n=null;var e=d.value.replace(/\u2028/g,"");m||(e==i.lastValue?u():!i.lastValue&&e&&(u(),E(e)))}));y=function(e){return n&&clearTimeout(n),(e=e.replace(/\u2028/g,""))==i.lastValue?"":(i.lastValue&&n&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",L),"compositionend"==e.type&&i.range&&t.selection.setRange(i.range),(!!o.isChrome&&o.isChrome>=53||!!o.isWebKit&&o.isWebKit>=603)&&x()}},T=s.delayedCall(_,50);n.addListener(d,"compositionstart",(function(e){m||!t.onCompositionStart||t.$readOnly||((m={}).canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(_,0),t.on("mousedown",L),m.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())})),o.isGecko?n.addListener(d,"text",(function(){T.schedule()})):(n.addListener(d,"keyup",(function(){T.schedule()})),n.addListener(d,"keydown",(function(){T.schedule()}))),n.addListener(d,"compositionend",L),this.getElement=function(){return d},this.setReadOnly=function(e){d.readOnly=e},this.onContextMenu=function(e){F=!0,i(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,i){v||(v=d.style.cssText),d.style.cssText=(i?"z-index:100000;":"")+"height:"+d.style.height+";"+(o.isIE?"opacity:0.1;":"");var s=t.container.getBoundingClientRect(),a=r.computedStyle(t.container),l=s.top+(parseInt(a.borderTopWidth)||0),c=s.left+(parseInt(s.borderLeftWidth)||0),u=s.bottom-l-d.clientHeight-2,g=function(e){d.style.left=e.clientX-c-2+"px",d.style.top=Math.min(e.clientY-l-2,u)+"px"};g(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(R),o.isWin&&n.capture(t.container,g,h))},this.onContextMenuClose=h;var R,M=function(e){t.textInput.onContextMenu(e),h()};n.addListener(d,"mouseup",M),n.addListener(d,"mousedown",(function(e){e.preventDefault(),h()})),n.addListener(t.renderer.scroller,"contextmenu",M),n.addListener(d,"contextmenu",M)}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,i){"use strict";function n(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),t.setDefaultHandler("touchmove",this.onTouchMove.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function o(e,t){if(e.start.row==e.end.row)var i=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)i=2*t.row-e.start.row-e.end.row;else var i=t.column-4;return i<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}e("../lib/dom"),e("../lib/event");var r=e("../lib/useragent");(function(){this.onMouseDown=function(e){var t=e.inSelection(),i=e.getDocumentPosition();this.mousedownEvent=e;var n=this.editor,o=e.getButton();if(0!==o){var s=n.getSelectionRange().isEmpty();return n.$blockScrolling++,(s||1==o)&&n.selection.moveToPosition(i),n.$blockScrolling--,void(2==o&&(n.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault()))}return this.mousedownEvent.time=Date.now(),!t||n.isFocused()||(n.focus(),!this.$focusTimout||this.$clickSelection||n.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(i,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;i.$blockScrolling++,this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(e):t||i.selection.moveToPosition(e),t||this.select(),i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture(),i.setStyle("ace_selecting"),this.setState("select"),i.$blockScrolling--},this.select=function(){var e,t=this.editor,i=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var n=this.$clickSelection.comparePoint(i);if(-1==n)e=this.$clickSelection.end;else if(1==n)e=this.$clickSelection.start;else{var r=o(this.$clickSelection,i);i=r.cursor,e=r.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(i),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y),r=i.selection[e](n.row,n.column);if(i.$blockScrolling++,this.$clickSelection){var s=this.$clickSelection.comparePoint(r.start),a=this.$clickSelection.comparePoint(r.end);if(-1==s&&a<=0)t=this.$clickSelection.end,r.end.row==n.row&&r.end.column==n.column||(n=r.start);else if(1==a&&s>=0)t=this.$clickSelection.start,r.start.row==n.row&&r.start.column==n.column||(n=r.end);else if(-1==s&&1==a)n=r.end,t=r.start;else{var l=o(this.$clickSelection,n);n=l.cursor,t=l.anchor}i.selection.setSelectionAnchor(t.row,t.column)}i.selection.selectToPosition(n),i.$blockScrolling--,i.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=function(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>0||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),i=this.editor,n=i.session.getBracketRange(t);n?(n.isEmpty()&&(n.start.column--,n.end.column++),this.setState("select")):(n=i.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=n,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var n=i.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=i.selection.getLineRange(n.start.row),this.$clickSelection.end=i.selection.getLineRange(n.end.row).end):this.$clickSelection=i.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=e.domEvent.timeStamp,i=t-(this.$lastScrollTime||0),n=this.editor;return n.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||i<200?(this.$lastScrollTime=t,n.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},this.onTouchMove=function(e){var t=e.domEvent.timeStamp,i=t-(this.$lastScrollTime||0),n=this.editor;if(n.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||i<200)return this.$lastScrollTime=t,n.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}}).call(n.prototype),t.DefaultHandlers=n})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,i){"use strict";function n(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}e("./lib/oop");var o=e("./lib/dom");(function(){this.$init=function(){return this.$element=o.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){o.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){o.addCssClass(this.getElement(),e)},this.show=function(e,t,i){null!=e&&this.setText(e),null!=t&&null!=i&&this.setPosition(t,i),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(n.prototype),t.Tooltip=n})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,i){"use strict";function n(e){a.call(this,e)}var o=e("../lib/dom"),r=e("../lib/oop"),s=e("../lib/event"),a=e("../tooltip").Tooltip;r.inherits(n,a),function(){this.setPosition=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),r=this.getHeight();(e+=15)+o>i&&(e-=e+o-i),(t+=15)+r>n&&(t-=20+r),a.prototype.setPosition.call(this,e,t)}}.call(n.prototype),t.GutterHandler=function(e){function t(){var t=l.getDocumentPosition().row,n=h.$annotations[t];if(!n)return i();if(t==u.session.getLength()){var o=u.renderer.pixelToScreenCoordinates(0,l.y).row,s=l.$pos;if(o>u.session.documentToScreenRow(s.row,s.column))return i()}if(c!=n)if(c=n.text.join("<br/>"),d.setHtml(c),d.show(),u._signal("showGutterTooltip",d),u.on("mousewheel",i),e.$tooltipFollowsMouse)r(l);else{var a=l.domEvent.target.getBoundingClientRect(),g=d.getElement().style;g.left=a.right+"px",g.top=a.bottom+"px"}}function i(){a&&(a=clearTimeout(a)),c&&(d.hide(),c=null,u._signal("hideGutterTooltip",d),u.removeEventListener("mousewheel",i))}function r(e){d.setPosition(e.x,e.y)}var a,l,c,u=e.editor,h=u.renderer.$gutterLayer,d=new n(u.container);e.editor.setDefaultHandler("guttermousedown",(function(t){if(u.isFocused()&&0==t.getButton()&&"foldWidgets"!=h.getRegion(t)){var i=t.getDocumentPosition().row,n=u.session.selection;if(t.getShiftKey())n.selectTo(i,0);else{if(2==t.domEvent.detail)return u.selectAll(),t.preventDefault();e.$clickSelection=u.selection.getLineRange(i)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(n){var s=n.domEvent.target||n.domEvent.srcElement;if(o.hasCssClass(s,"ace_fold-widget"))return i();c&&e.$tooltipFollowsMouse&&r(n),l=n,a||(a=setTimeout((function(){a=null,l&&!e.isMousePressed?t():i()}),50))})),s.addListener(u.renderer.$gutter,"mouseout",(function(e){l=null,c&&!a&&(a=setTimeout((function(){a=null,i()}),50))})),u.on("changeSession",i)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,i){"use strict";var n=e("../lib/event"),o=e("../lib/useragent"),r=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=o.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(r.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,i){"use strict";function n(e){function t(){var e=C;(function(e,t){var i=Date.now(),n=!t||e.row!=t.row,r=!t||e.column!=t.column;!x||n||r?(f.$blockScrolling+=1,f.moveCursorToPosition(e),f.$blockScrolling-=1,x=i,k={x:v,y:b}):o(k.x,k.y,v,b)>u?x=null:i-x>=c&&(f.renderer.scrollCursorIntoView(),x=null)})(C=f.renderer.screenToTextCoordinates(v,b),e),function(e,t){var i=Date.now(),n=f.renderer.layerConfig.lineHeight,o=f.renderer.layerConfig.characterWidth,r=f.renderer.scroller.getBoundingClientRect(),s={x:{left:v-r.left,right:r.right-v},y:{top:b-r.top,bottom:r.bottom-b}},a=Math.min(s.x.left,s.x.right),c=Math.min(s.y.top,s.y.bottom),u={row:e.row,column:e.column};a/o<=2&&(u.column+=s.x.left<s.x.right?-3:2),c/n<=1&&(u.row+=s.y.top<s.y.bottom?-1:1);var h=e.row!=u.row,d=e.column!=u.column,g=!t||e.row!=t.row;h||d&&!g?E?i-E>=l&&f.renderer.scrollCursorIntoView(u):E=i:E=null}(C,e)}function i(){A=f.selection.toOrientedRange(),m=f.session.addMarker(A,"ace_selection",f.getSelectionStyle()),f.clearSelection(),f.isFocused()&&f.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),t(),w=setInterval(t,20),S=0,s.addListener(document,"mousemove",h)}function n(){clearInterval(w),f.session.removeMarker(m),m=null,f.$blockScrolling+=1,f.selection.fromOrientedRange(A),f.$blockScrolling-=1,f.isFocused()&&!F&&f.renderer.$cursorLayer.setBlinking(!f.getReadOnly()),A=null,C=null,S=0,E=null,x=null,s.removeListener(document,"mousemove",h)}function h(){null==D&&(D=setTimeout((function(){null!=D&&m&&n()}),20))}function d(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function g(e){var t=["copy","copymove","all","uninitialized"],i=a.isMac?e.altKey:e.ctrlKey,n="uninitialized";try{n=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return i&&t.indexOf(n)>=0?o="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(n)>=0?o="move":t.indexOf(n)>=0&&(o="copy"),o}var f=e.editor,p=r.createElement("img");p.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",a.isOpera&&(p.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),f.addEventListener("mousedown",this.onMouseDown.bind(e));var m,v,b,w,A,C,y,F,E,x,k,$=f.container,S=0;this.onDragStart=function(e){if(this.cancelDrag||!$.draggable){var t=this;return setTimeout((function(){t.startSelect(),t.captureMouse(e)}),0),e.preventDefault()}A=f.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=f.getReadOnly()?"copy":"copyMove",a.isOpera&&(f.container.appendChild(p),p.scrollTop=0),i.setDragImage&&i.setDragImage(p,0,0),a.isOpera&&f.container.removeChild(p),i.clearData(),i.setData("Text",f.session.getTextRange()),F=!0,this.setState("drag")},this.onDragEnd=function(e){if($.draggable=!1,F=!1,this.setState(null),!f.getReadOnly()){var t=e.dataTransfer.dropEffect;!y&&"move"==t&&f.session.remove(f.getSelectionRange()),f.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!f.getReadOnly()&&d(e.dataTransfer))return v=e.clientX,b=e.clientY,m||i(),S++,e.dataTransfer.dropEffect=y=g(e),s.preventDefault(e)},this.onDragOver=function(e){if(!f.getReadOnly()&&d(e.dataTransfer))return v=e.clientX,b=e.clientY,m||(i(),S++),null!==D&&(D=null),e.dataTransfer.dropEffect=y=g(e),s.preventDefault(e)},this.onDragLeave=function(e){if(--S<=0&&m)return n(),y=null,s.preventDefault(e)},this.onDrop=function(e){if(C){var t=e.dataTransfer;if(F)switch(y){case"move":A=A.contains(C.row,C.column)?{start:C,end:C}:f.moveText(A,C);break;case"copy":A=f.moveText(A,C,!0)}else{var i=t.getData("Text");A={start:C,end:f.session.insert(C,i)},f.focus(),y=null}return n(),s.preventDefault(e)}},s.addListener($,"dragstart",this.onDragStart.bind(e)),s.addListener($,"dragend",this.onDragEnd.bind(e)),s.addListener($,"dragenter",this.onDragEnter.bind(e)),s.addListener($,"dragover",this.onDragOver.bind(e)),s.addListener($,"dragleave",this.onDragLeave.bind(e)),s.addListener($,"drop",this.onDrop.bind(e));var D=null}function o(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}var r=e("../lib/dom"),s=e("../lib/event"),a=e("../lib/useragent"),l=200,c=200,u=5;(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=a.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;a.isIE&&"dragReady"==this.state&&(o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,i=e.inSelection(),n=e.getButton();if(1===(e.domEvent.detail||1)&&0===n&&i){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in o&&(o.unselectable="on"),t.getDragDelay()){if(a.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(n.prototype),t.DragdropHandler=n})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,i){"use strict";var n=e("./dom");t.get=function(e,t){var i=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4===i.readyState&&t(i.responseText)},i.send(null)},t.loadScript=function(e,t){var i=n.getDocumentHead(),o=document.createElement("script");o.src=e,i.appendChild(o),o.onload=o.onreadystatechange=function(e,i){!i&&o.readyState&&"loaded"!=o.readyState&&"complete"!=o.readyState||(o=o.onload=o.onreadystatechange=null,i||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,i){"use strict";var n={},o=function(){this.propagationStopped=!0},r=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[e]||[],n=this._defaultHandlers[e];if(i.length||n){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=o),t.preventDefault||(t.preventDefault=r),i=i.slice();for(var s=0;s<i.length&&(i[s](t,this),!t.propagationStopped);s++);return n&&!t.defaultPrevented?n(t,this):void 0}},n._signal=function(e,t){var i=(this._eventRegistry||{})[e];if(i){i=i.slice();for(var n=0;n<i.length;n++)i[n](t,this)}},n.once=function(e,t){var i=this;t&&this.addEventListener(e,(function n(){i.removeEventListener(e,n),t.apply(null,arguments)}))},n.setDefaultHandler=function(e,t){var i=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[e]){var n=i[e],o=i._disabled_[e];o||(i._disabled_[e]=o=[]),o.push(n);var r=o.indexOf(t);-1!=r&&o.splice(r,1)}i[e]=t},n.removeDefaultHandler=function(e,t){var i=this._defaultHandlers;if(i){var n=i._disabled_[e];if(i[e]==t){i[e];n&&this.setDefaultHandler(e,n.pop())}else if(n){var o=n.indexOf(t);-1!=o&&n.splice(o,1)}}},n.on=n.addEventListener=function(e,t,i){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];return n||(n=this._eventRegistry[e]=[]),-1==n.indexOf(t)&&n[i?"unshift":"push"](t),t},n.off=n.removeListener=n.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];if(i){var n=i.indexOf(t);-1!==n&&i.splice(n,1)}},n.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=n})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,i){function n(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function o(e,t){var i=new Error(e);i.data=t,"object"==typeof console&&console.error&&console.error(i),setTimeout((function(){throw i}))}var r=e("./oop"),s=e("./event_emitter").EventEmitter,a={setOptions:function(e){Object.keys(e).forEach((function(t){this.setOption(t,e[t])}),this)},getOptions:function(e){var t={};return e?Array.isArray(e)||(t=e,e=Object.keys(t)):e=Object.keys(this.$options),e.forEach((function(e){t[e]=this.getOption(e)}),this),t},setOption:function(e,t){if(this["$"+e]!==t){var i=this.$options[e];return i?i.forwardTo?this[i.forwardTo]&&this[i.forwardTo].setOption(e,t):(i.handlesSet||(this["$"+e]=t),void(i&&i.set&&i.set.call(this,t))):n('misspelled option "'+e+'"')}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:n('misspelled option "'+e+'"')}},l=function(){this.$defaultOptions={}};(function(){r.implement(this,s),this.defineOptions=function(e,t,i){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(i).forEach((function(t){var n=i[t];"string"==typeof n&&(n={forwardTo:n}),n.name||(n.name=t),e.$options[n.name]=n,"initialValue"in n&&(e["$"+n.name]=n.initialValue)})),r.implement(e,a),this},this.resetOptions=function(e){Object.keys(e.$options).forEach((function(t){var i=e.$options[t];"value"in i&&e.setOption(t,i.value)}))},this.setDefaultValue=function(e,t,i){var n=this.$defaultOptions[e]||(this.$defaultOptions[e]={});n[t]&&(n.forwardTo?this.setDefaultValue(n.forwardTo,t,i):n[t].value=i)},this.setDefaultValues=function(e,t){Object.keys(t).forEach((function(i){this.setDefaultValue(e,i,t[i])}),this)},this.warn=n,this.reportError=o}).call(l.prototype),t.AppConfig=l})),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],(function(e,t,n){function o(e){return e.replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))}var r=e("./lib/lang"),s=(e("./lib/oop"),e("./lib/net")),a=e("./lib/app_config").AppConfig;n.exports=t=new a;var l=function(){return this||"undefined"!=typeof window&&window}(),c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};t.get=function(e){if(!c.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return c[e]},t.set=function(e,t){if(!c.hasOwnProperty(e))throw new Error("Unknown config key: "+e);c[e]=t},t.all=function(){return r.copyObject(c)},t.moduleUrl=function(e,t){if(c.$moduleUrls[e])return c.$moduleUrls[e];var i=e.split("/"),n="snippets"==(t=t||i[i.length-2]||"")?"/":"-",o=i[i.length-1];if("worker"==t&&"-"==n){var r=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");o=o.replace(r,"")}(!o||o==t)&&i.length>1&&(o=i[i.length-2]);var s=c[t+"Path"];return null==s?s=c.basePath:"/"==n&&(t=n=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+n+o+this.get("suffix")},t.setModuleUrl=function(e,t){return c.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(i,n){var o,r;Array.isArray(i)&&(r=i[0],i=i[1]);try{o=e(i)}catch(e){}if(o&&!t.$loading[i])return n&&n(o);if(t.$loading[i]||(t.$loading[i]=[]),t.$loading[i].push(n),!(t.$loading[i].length>1)){var a=function(){e([i],(function(e){t._emit("load.module",{name:i,module:e});var n=t.$loading[i];t.$loading[i]=null,n.forEach((function(t){t&&t(e)}))}))};if(!t.get("packaged"))return a();s.loadScript(t.moduleUrl(i,r),a)}},t.init=function(r){if(l&&l.document){c.packaged=r||e.packaged||n.packaged||l.define&&i(1).packaged;for(var s={},a="",u=document.currentScript||document._currentScript,h=(u&&u.ownerDocument||document).getElementsByTagName("script"),d=0;d<h.length;d++){var g=h[d],f=g.src||g.getAttribute("src");if(f){for(var p=g.attributes,m=0,v=p.length;m<v;m++){var b=p[m];0===b.name.indexOf("data-ace-")&&(s[o(b.name.replace(/^data-ace-/,""))]=b.value)}var w=f.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);w&&(a=w[1])}}for(var A in a&&(s.base=s.base||a,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base,s)void 0!==s[A]&&t.set(A,s[A])}}})),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],(function(e,t,i){"use strict";var n=e("../lib/event"),o=e("../lib/useragent"),r=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("../config"),u=function(e){var t=this;this.editor=e,new r(this),new s(this),new l(this);var i=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus()},a=e.renderer.getMouseEventTarget();n.addListener(a,"click",this.onMouseEvent.bind(this,"click")),n.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove")),n.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),n.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),n.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var c=e.renderer.$gutter;n.addListener(c,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),n.addListener(c,"click",this.onMouseEvent.bind(this,"gutterclick")),n.addListener(c,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),n.addListener(c,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),n.addListener(a,"mousedown",i),n.addListener(c,"mousedown",i),o.isIE&&e.renderer.scrollBarV&&(n.addListener(e.renderer.scrollBarV.element,"mousedown",i),n.addListener(e.renderer.scrollBarH.element,"mousedown",i)),e.on("mousemove",(function(i){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var n=e.renderer.screenToTextCoordinates(i.x,i.y),o=e.session.selection.getRange(),r=e.renderer;!o.isEmpty()&&o.insideStart(n.row,n.column)?r.setCursorStyle("default"):r.setCursorStyle("")}}))};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var i=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;i&&i.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var i=new a(t,this.editor);i.speed=2*this.$scrollSpeed,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.onTouchMove=function(e,t){var i=new a(t,this.editor);i.speed=1,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var i=this.editor.renderer;i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=null);var r=this,s=function(e){if(e)return o.isWebKit&&!e.which&&r.releaseMouse?r.releaseMouse():(r.x=e.clientX,r.y=e.clientY,t&&t(e),r.mouseEvent=new a(e,r.editor),void(r.$mouseMoved=!0))},l=function(e){clearInterval(u),c(),r[r.state+"End"]&&r[r.state+"End"](e),r.state="",null==i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=!0,i.$moveTextAreaToCursor()),r.isMousePressed=!1,r.$onCaptureMouseMove=r.releaseMouse=null,e&&r.onMouseEvent("mouseup",e)},c=function(){r[r.state]&&r[r.state](),r.$mouseMoved=!1};if(o.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout((function(){l(e)}));r.$onCaptureMouseMove=s,r.releaseMouse=n.capture(this.editor.container,s,l);var u=setInterval(c,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&n.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(u.prototype),c.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:o.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=u})),ace.define("ace/mouse/fold_handler",["require","exports","module"],(function(e,t,i){"use strict";t.FoldHandler=function(e){e.on("click",(function(t){var i=t.getDocumentPosition(),n=e.session,o=n.getFoldAt(i.row,i.column,1);o&&(t.getAccelKey()?n.removeFold(o):n.expandFold(o),t.stop())})),e.on("gutterclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var i=t.getDocumentPosition().row,n=e.session;n.foldWidgets&&n.foldWidgets[i]&&e.session.onFoldWidgetClick(i,t),e.isFocused()||e.focus(),t.stop()}})),e.on("gutterdblclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var i=t.getDocumentPosition().row,n=e.session,o=n.getParentFoldRangeData(i,!0),r=o.range||o.firstRange;if(r){i=r.start.row;var s=n.getFoldAt(i,n.getLine(i).length,1);s?n.removeFold(s):(n.addFold("...",r),e.renderer.scrollCursorIntoView({row:r.start.row,column:0}))}t.stop()}}))}})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(e,t,i){"use strict";var n=e("../lib/keys"),o=e("../lib/event"),r=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"==typeof e&&!e.handleKeyboard&&(e.handleKeyboard=e);var i=this.$handlers.indexOf(e);-1!=i&&this.$handlers.splice(i,1),null==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==i&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map((function(i){return i.getStatusText&&i.getStatusText(t,e)||""})).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,i,n){for(var r,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((r=this.$handlers[l].handleKeyboard(this.$data,e,t,i,n))&&r.command&&((s="null"==r.command||a.exec(r.command,this.$editor,r.args,n))&&n&&-1!=e&&1!=r.passEvent&&1!=r.command.passEvent&&o.stopEvent(n),s)););return!s&&-1==e&&(r={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",r),s},this.onCommandKey=function(e,t,i){var o=n.keyCodeToString(i);this.$callKeyboardHandlers(t,o,i,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(r.prototype),t.KeyBinding=r})),ace.define("ace/range",["require","exports","module"],(function(e,t,i){"use strict";var n=function(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,i=e.end,n=e.start;return 1==(t=this.compare(i.row,i.column))?1==(t=this.compare(n.row,n.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(n.row,n.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var i={row:t+1,column:0};else if(this.end.row<e)i={row:e,column:0};if(this.start.row>t)var o={row:t+1,column:0};else if(this.start.row<e)o={row:e,column:0};return n.fromPoints(o||this.start,i||this.end)},this.extend=function(e,t){var i=this.compare(e,t);if(0==i)return this;if(-1==i)var o={row:e,column:t};else var r={row:e,column:t};return n.fromPoints(o||this.start,r||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return n.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new n(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new n(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),i=e.documentToScreenPosition(this.end);return new n(t.row,t.column,i.row,i.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(n.prototype),n.fromPoints=function(e,t){return new n(e.row,e.column,t.row,t.column)},n.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},n.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=n})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/lang"),r=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var t=this;this.lead.on("change",(function(e){t._emit("changeCursor"),t.$isEmpty||t._emit("changeSelection"),!t.$keepDesiredColumnOnChange&&e.old.column!=e.value.column&&(t.$desiredColumn=null)})),this.selectionAnchor.on("change",(function(){t.$isEmpty||t._emit("changeSelection")}))};(function(){n.implement(this,r),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.isEmpty()&&this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.anchor.setPosition(e,t),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(e){if(this.$isEmpty)this.moveCursorTo(this.lead.row,this.lead.column+e);else{var t=this.getSelectionAnchor(),i=this.getSelectionLead(),n=this.isBackwards();(!n||0!==t.column)&&this.setSelectionAnchor(t.row,t.column+e),(n||0!==i.column)&&this.$moveSelection((function(){this.moveCursorTo(i.row,i.column+e)}))}},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(void 0===t){var i=e||this.lead;e=i.row,t=i.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var i,n="number"==typeof e?e:this.lead.row,o=this.session.getFoldLine(n);return o?(n=o.start.row,i=o.end.row):i=n,!0===t?new s(n,0,i,this.session.getLine(i).length):new s(n,0,i+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,i){var n=e.column,o=e.column+t;return i<0&&(n=e.column-t,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(n,o).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var i=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var i=this.session.getTabSize();t=this.lead;this.wouldMoveIntoSoftTab(t,i,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,i):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,i=this.session.documentToScreenRow(e,t),n=this.session.screenToDocumentPosition(i,0),o=this.session.getDisplayLine(e,null,n.row,n.column).match(/^\s*/);o[0].length!=t&&!this.session.$useEmacsStyleLineStart&&(n.column+=o[0].length),this.moveCursorToPosition(n)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var i=this.session.getLine(t.row);if(t.column==i.length){var n=i.search(/\s+$/);n>0&&(t.column=n)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,t,1);if(o)this.moveCursorTo(o.end.row,o.end.column);else{if(this.session.nonTokenRe.exec(n)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=i.substring(t)),t>=i.length)return this.moveCursorTo(e,i.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(n)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,i=this.lead.column;if(e=this.session.getFoldAt(t,i,-1))this.moveCursorTo(e.start.row,e.start.column);else{var n=this.session.getFoldStringAt(t,i,-1);null==n&&(n=this.doc.getLine(t).substring(0,i));var r=o.stringReverse(n);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(r)&&(i-=this.session.nonTokenRe.lastIndex,r=r.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),i<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(r)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,i)}},this.$shortWordEndIndex=function(e){var t,i=0,n=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(e))i=this.session.tokenRe.lastIndex;else{for(;(t=e[i])&&n.test(t);)i++;if(i<1)for(o.lastIndex=0;(t=e[i])&&!o.test(t);)if(o.lastIndex=0,i++,n.test(t)){if(i>2){i--;break}for(;(t=e[i])&&n.test(t);)i++;if(i>2)break}}return o.lastIndex=0,i},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t),o=this.session.getFoldAt(e,t,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(t==i.length){var r=this.doc.getLength();do{e++,n=this.doc.getLine(e)}while(e<r&&/^\s*$/.test(n));/^\s+/.test(n)||(n=""),t=0}var s=this.$shortWordEndIndex(n);this.moveCursorTo(e,t+s)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,i=this.lead.column;if(e=this.session.getFoldAt(t,i,-1))return this.moveCursorTo(e.start.row,e.start.column);var n=this.session.getLine(t).substring(0,i);if(0===i){do{t--,n=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(n));i=n.length,/\s+$/.test(n)||(n="")}var r=o.stringReverse(n),s=this.$shortWordEndIndex(r);return this.moveCursorTo(t,i-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column);var n=this.session.screenToDocumentPosition(i.row+e,i.column);0!==e&&0===t&&n.row===this.lead.row&&n.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[n.row]&&(n.row>0||e>0)&&n.row++,this.moveCursorTo(n.row,n.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,i){var n=this.session.getFoldAt(e,t,1);n&&(e=n.start.row,t=n.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,i){var n=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(n.row,n.column,i)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var i=this.getCursor();return s.fromPoints(t,i)}catch(e){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(null==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var i=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,i){"use strict";var n=e("./config"),o=2e3,r=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var i=this.states[t],n=[],o=0,r=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l<i.length;l++){var c=i[l];if(c.defaultToken&&(r.defaultToken=c.defaultToken),c.caseInsensitive&&(s="gi"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var u=c.regex,h=new RegExp("(?:("+u+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==h?c.token=c.token[0]:h-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:h-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"==typeof c.token&&!c.onMatch&&(c.onMatch=h>1?this.$applyToken:c.token),h>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+o+1)})):(h=1,u=this.removeCapturingGroups(c.regex)),!c.splitRegex&&"string"!=typeof c.token&&a.push(c)),r[o]=l,o+=h,n.push(u),c.onMatch||(c.onMatch=null)}}n.length||(r[0]=0,n.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)}),this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){o=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),i=this.token.apply(this,t);if("string"==typeof i)return[{type:i,value:e}];for(var n=[],o=0,r=i.length;o<r;o++)t[o]&&(n[n.length]={type:i[o],value:t[o]});return n},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var i=[],n=this.tokenArray,o=0,r=n.length;o<r;o++)t[o+1]&&(i[i.length]={type:n[o],value:t[o+1]});return i},this.removeCapturingGroups=function(e){return e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,(function(e,t){return t?"(?:":e}))},this.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var i=0,n=!1,o={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(e,t,r,s,a,l){return n?n="]"!=a:a?n=!0:s?(i==o.stack&&(o.end=l+1,o.stack=-1),i--):r&&(i++,1!=r.length&&(o.stack=i,o.start=l)),e})),null!=o.end&&/^\)*$/.test(e.substr(o.end))&&(e=e.substring(0,o.start)+e.substr(o.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var i=t.slice(0);"#tmp"===(t=i[0])&&(i.shift(),t=i.shift())}else i=[];var n=t||"start",r=this.states[n];r||(n="start",r=this.states[n]);var s=this.matchMappings[n],a=this.regExps[n];a.lastIndex=0;for(var l,c=[],u=0,h=0,d={type:null,value:""};l=a.exec(e);){var g=s.defaultToken,f=null,p=l[0],m=a.lastIndex;if(m-p.length>u){var v=e.substring(u,m-p.length);d.type==g?d.value+=v:(d.type&&c.push(d),d={type:g,value:v})}for(var b=0;b<l.length-2;b++)if(void 0!==l[b+1]){g=(f=r[s[b]]).onMatch?f.onMatch(p,n,i,e):f.token,f.next&&(n="string"==typeof f.next?f.next:f.next(n,i),(r=this.states[n])||(this.reportError("state doesn't exist",n),n="start",r=this.states[n]),s=this.matchMappings[n],u=m,(a=this.regExps[n]).lastIndex=m),f.consumeLineEnd&&(u=m);break}if(p)if("string"==typeof g)f&&!1===f.merge||d.type!==g?(d.type&&c.push(d),d={type:g,value:p}):d.value+=p;else if(g){d.type&&c.push(d),d={type:null,value:""};for(b=0;b<g.length;b++)c.push(g[b])}if(u==e.length)break;if(u=m,h++>o){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u<e.length;)d.type&&c.push(d),d={value:e.substring(u,u+=2e3),type:"overflow"};n="start",i=[];break}}return d.type&&c.push(d),i.length>1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:c,state:i.length?i:n}},this.reportError=n.reportError}).call(r.prototype),t.Tokenizer=r})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,i){"use strict";var n=e("../lib/lang"),o=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var i in e){for(var n=e[i],o=0;o<n.length;o++){var r=n[o];(r.next||r.onMatch)&&("string"==typeof r.next&&0!==r.next.indexOf(t)&&(r.next=t+r.next),r.nextState&&0!==r.nextState.indexOf(t)&&(r.nextState=t+r.nextState))}this.$rules[t+i]=n}else for(var i in e)this.$rules[i]=e[i]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,i,o,r){var s="function"==typeof e?(new e).getRules():e;if(o)for(var a=0;a<o.length;a++)o[a]=t+o[a];else for(var l in o=[],s)o.push(t+l);if(this.addRules(s,t),i){var c=Array.prototype[r?"push":"unshift"];for(a=0;a<o.length;a++)c.apply(this.$rules[o[a]],n.deepCopy(i))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var i=0,n=this.$rules;Object.keys(n).forEach((function o(r){var s=n[r];s.processed=!0;for(var a=0;a<s.length;a++){var l=s[a],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var u=l.next||l.push;if(u&&Array.isArray(u)){var h=l.stateName;h||("string"!=typeof(h=l.token)&&(h=h[0]||""),n[h]&&(h+=i++)),n[h]=u,l.next=h,o(h)}else"pop"==u&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var d in l.rules)n[d]?n[d].push&&n[d].push.apply(n[d],l.rules[d]):n[d]=l.rules[d];var g="string"==typeof l?l:l.include;if(g&&(c=Array.isArray(g)?g.map((function(e){return n[e]})):n[g]),c){var f=[a,1].concat(c);l.noEscape&&(f=f.filter((function(e){return!e.next}))),s.splice.apply(s,f),a--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}),this)},this.createKeywordMapper=function(e,t,i,n){var o=Object.create(null);return Object.keys(e).forEach((function(t){var r=e[t];i&&(r=r.toLowerCase());for(var s=r.split(n||"|"),a=s.length;a--;)o[s[a]]=t})),Object.getPrototypeOf(o)&&(o.__proto__=null),this.$keywordList=Object.keys(o),e=null,i?function(e){return o[e.toLowerCase()]||t}:function(e){return o[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(o.prototype),t.TextHighlightRules=o})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(e,t,i){"use strict";var n=function(){this.$behaviours={}};(function(){this.add=function(e,t,i){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=i},this.addBehaviours=function(e){for(var t in e)for(var i in e[t])this.add(t,i,e[t][i])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var i=(new e).getBehaviours(t);else i=e.getBehaviours(t);this.addBehaviours(i)},this.getBehaviours=function(e){if(!e)return this.$behaviours;for(var t={},i=0;i<e.length;i++)this.$behaviours[e[i]]&&(t[e[i]]=this.$behaviours[e[i]]);return t}}).call(n.prototype),t.Behaviour=n})),ace.define("ace/token_iterator",["require","exports","module"],(function(e,t,i){"use strict";var n=function(e,t,i){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var n=e.getTokenAt(t,i);this.$tokenIndex=n?n.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,i=e[t].start;if(void 0!==i)return i;for(i=0;t>0;)i+=e[t-=1].value.length;return i},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}}}).call(n.prototype),t.TokenIterator=n})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,i){"use strict";var n,o=e("../../lib/oop"),r=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],u={},h={'"':'"',"'":"'"},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return n=u[t];n=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(e,t,i,n){var o=e.end.row-e.start.row;return{text:i+t+n,selection:[0,e.start.column+1,o,e.end.column+(o?0:1)]}},f=function(e){this.add("braces","insertion",(function(t,i,o,r,s){var l=o.getCursorPosition(),c=r.doc.getLine(l.row);if("{"==s){d(o);var u=o.getSelectionRange(),h=r.doc.getTextRange(u);if(""!==h&&"{"!==h&&o.getWrapBehavioursEnabled())return g(u,h,"{","}");if(f.isSaneInsertion(o,r))return/[\]\}\)]/.test(c[l.column])||o.inMultiSelectMode||e&&e.braces?(f.recordAutoInsert(o,r,"}"),{text:"{}",selection:[1,1]}):(f.recordMaybeInsert(o,r,"{"),{text:"{",selection:[1,1]})}else if("}"==s){if(d(o),"}"==c.substring(l.column,l.column+1))if(null!==r.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&f.isAutoInsertedClosing(l,c,s))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==s||"\r\n"==s){d(o);var p="";if(f.isMaybeInsertedClosing(l,c)&&(p=a.stringRepeat("}",n.maybeInsertedBrackets),f.clearMaybeInsertedClosing()),"}"===c.substring(l.column,l.column+1)){var m=r.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!m)return null;var v=this.$getIndent(r.getLine(m.row))}else{if(!p)return void f.clearMaybeInsertedClosing();v=this.$getIndent(c)}var b=v+r.getTabString();return{text:"\n"+b+"\n"+v+p,selection:[1,b.length,1,b.length]}}f.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,i,o,r){var s=o.doc.getTextRange(r);if(!r.isMultiLine()&&"{"==s){if(d(i),"}"==o.doc.getLine(r.start.row).substring(r.end.column,r.end.column+1))return r.end.column++,r;n.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,i,n,o){if("("==o){d(i);var r=i.getSelectionRange(),s=n.doc.getTextRange(r);if(""!==s&&i.getWrapBehavioursEnabled())return g(r,s,"(",")");if(f.isSaneInsertion(i,n))return f.recordAutoInsert(i,n,")"),{text:"()",selection:[1,1]}}else if(")"==o){d(i);var a=i.getCursorPosition(),l=n.doc.getLine(a.row);if(")"==l.substring(a.column,a.column+1))if(null!==n.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&f.isAutoInsertedClosing(a,l,o))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,i,n,o){var r=n.doc.getTextRange(o);if(!o.isMultiLine()&&"("==r&&(d(i),")"==n.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("brackets","insertion",(function(e,t,i,n,o){if("["==o){d(i);var r=i.getSelectionRange(),s=n.doc.getTextRange(r);if(""!==s&&i.getWrapBehavioursEnabled())return g(r,s,"[","]");if(f.isSaneInsertion(i,n))return f.recordAutoInsert(i,n,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){d(i);var a=i.getCursorPosition(),l=n.doc.getLine(a.row);if("]"==l.substring(a.column,a.column+1))if(null!==n.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&f.isAutoInsertedClosing(a,l,o))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,i,n,o){var r=n.doc.getTextRange(o);if(!o.isMultiLine()&&"["==r&&(d(i),"]"==n.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("string_dquotes","insertion",(function(e,t,i,n,o){var r=n.$mode.$quotes||h;if(1==o.length&&r[o]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(o))return;d(i);var s=o,a=i.getSelectionRange(),l=n.doc.getTextRange(a);if(""!==l&&(1!=l.length||!r[l])&&i.getWrapBehavioursEnabled())return g(a,l,s,s);if(!l){var c=i.getCursorPosition(),u=n.doc.getLine(c.row),f=u.substring(c.column-1,c.column),p=u.substring(c.column,c.column+1),m=n.getTokenAt(c.row,c.column),v=n.getTokenAt(c.row,c.column+1);if("\\"==f&&m&&/escape/.test(m.type))return null;var b,w=m&&/string|escape/.test(m.type),A=!v||/string|escape/.test(v.type);if(p==s)(b=w!==A)&&/string\.end/.test(v.type)&&(b=!1);else{if(w&&!A)return null;if(w&&A)return null;var C=n.$mode.tokenRe;C.lastIndex=0;var y=C.test(f);C.lastIndex=0;var F=C.test(f);if(y||F)return null;if(p&&!/[\s;,.})\]\\]/.test(p))return null;b=!0}return{text:b?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,i,n,o){var r=n.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==r||"'"==r)&&(d(i),n.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==r))return o.end.column++,o}))};f.isSaneInsertion=function(e,t){var i=e.getCursorPosition(),n=new s(t,i.row,i.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",l)){var o=new s(t,i.row,i.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return n.stepForward(),n.getCurrentTokenRow()!==i.row||this.$matchTokenType(n.getCurrentToken()||"text",c)},f.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},f.recordAutoInsert=function(e,t,i){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,r,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=o.row,n.autoInsertedLineEnd=i+r.substr(o.column),n.autoInsertedBrackets++},f.recordMaybeInsert=function(e,t,i){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,r)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=o.row,n.maybeInsertedLineStart=r.substr(0,o.column)+i,n.maybeInsertedLineEnd=r.substr(o.column),n.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(e,t,i){return n.autoInsertedBrackets>0&&e.row===n.autoInsertedRow&&i===n.autoInsertedLineEnd[0]&&t.substr(e.column)===n.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(e,t){return n.maybeInsertedBrackets>0&&e.row===n.maybeInsertedRow&&t.substr(e.column)===n.maybeInsertedLineEnd&&t.substr(0,e.column)==n.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},o.inherits(f,r),t.CstyleBehaviour=f})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,i){"use strict";t.packages={},function(e){var i=/\w{4}/g;for(var n in e)t.packages[n]=e[n].replace(i,"\\u$&")}({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})})),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(e,t,i){"use strict";var n=e("../tokenizer").Tokenizer,o=e("./text_highlight_rules").TextHighlightRules,r=e("./behaviour/cstyle").CstyleBehaviour,s=e("../unicode"),a=e("../lib/lang"),l=e("../token_iterator").TokenIterator,c=e("../range").Range,u=function(){this.HighlightRules=o};(function(){this.$defaultBehaviour=new r,this.tokenRe=new RegExp("^["+s.packages.L+s.packages.Mn+s.packages.Mc+s.packages.Nd+s.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+s.packages.L+s.packages.Mn+s.packages.Mc+s.packages.Nd+s.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new n(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,i,n){function o(e){for(var t=i;t<=n;t++)e(r.getLine(t),t)}var r=t.doc,s=!0,l=!0,c=1/0,u=t.getTabSize(),h=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))m=this.lineCommentStart.map(a.escapeRegExp).join("|"),f=this.lineCommentStart[0];else m=a.escapeRegExp(this.lineCommentStart),f=this.lineCommentStart;m=new RegExp("^(\\s*)(?:"+m+") ?"),h=t.getUseSoftTabs();w=function(e,t){var i=e.match(m);if(i){var n=i[1].length,o=i[0].length;!g(e,n,o)&&" "==i[0][o-1]&&o--,r.removeInLine(t,n,o)}};var d=f+" ",g=(b=function(e,t){s&&!/\S/.test(e)||(g(e,c,c)?r.insertInLine({row:t,column:c},d):r.insertInLine({row:t,column:c},f))},A=function(e,t){return m.test(e)},function(e,t,i){for(var n=0;t--&&" "==e.charAt(t);)n++;if(n%u!=0)return!1;for(n=0;" "==e.charAt(i++);)n++;return u>2?n%u!=u-1:n%u==0})}else{if(!this.blockComment)return!1;var f=this.blockComment.start,p=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+a.escapeRegExp(f)+")"),v=new RegExp("(?:"+a.escapeRegExp(p)+")\\s*$"),b=function(e,t){A(e,t)||s&&!/\S/.test(e)||(r.insertInLine({row:t,column:e.length},p),r.insertInLine({row:t,column:c},f))},w=function(e,t){var i;(i=e.match(v))&&r.removeInLine(t,e.length-i[0].length,e.length),(i=e.match(m))&&r.removeInLine(t,i[1].length,i[0].length)},A=function(e,i){if(m.test(e))return!0;for(var n=t.getTokens(i),o=0;o<n.length;o++)if("comment"===n[o].type)return!0}}var C=1/0;o((function(e,t){var i=e.search(/\S/);-1!==i?(i<c&&(c=i),l&&!A(e,t)&&(l=!1)):C>e.length&&(C=e.length)})),c==1/0&&(c=C,s=!1,l=!1),h&&c%u!=0&&(c=Math.floor(c/u)*u),o(l?w:b)},this.toggleBlockComment=function(e,t,i,n){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var r,s,a=(p=new l(t,n.row,n.column)).getCurrentToken(),u=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var h,d;a&&/comment/.test(a.type);){if(-1!=(m=a.value.indexOf(o.start))){var g=p.getCurrentTokenRow(),f=p.getCurrentTokenColumn()+m;h=new c(g,f,g,f+o.start.length);break}a=p.stepBackward()}var p;for(a=(p=new l(t,n.row,n.column)).getCurrentToken();a&&/comment/.test(a.type);){var m;if(-1!=(m=a.value.indexOf(o.end))){g=p.getCurrentTokenRow(),f=p.getCurrentTokenColumn()+m;d=new c(g,f,g,f+o.end.length);break}a=p.stepForward()}d&&t.remove(d),h&&(t.remove(h),r=h.start.row,s=-o.start.length)}else s=o.start.length,r=i.start.row,t.insert(i.end,o.end),t.insert(i.start,o.start);u.start.row==r&&(u.start.column+=s),u.end.row==r&&(u.end.column+=s),t.selection.fromOrientedRange(u)}},this.getNextLineIndent=function(e,t,i){return this.$getIndent(t)},this.checkOutdent=function(e,t,i){return!1},this.autoOutdent=function(e,t,i){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);var i=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;t<i.length;t++)!function(e){var n=i[t],o=e[n];e[i[t]]=function(){return this.$delegator(n,arguments,o)}}(this)},this.$delegator=function(e,t,i){var n=t[0];"string"!=typeof n&&(n=n[0]);for(var o=0;o<this.$embeds.length;o++)if(this.$modes[this.$embeds[o]]){var r=n.split(this.$embeds[o]);if(!r[0]&&r[1]){t[0]=r[1];var s=this.$modes[this.$embeds[o]];return s[e].apply(s,t)}}var a=i.apply(this,t);return i?a:void 0},this.transformAction=function(e,t,i,n,o){if(this.$behaviour){var r=this.$behaviour.getBehaviours();for(var s in r)if(r[s][t]){var a=r[s][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,i=[];for(var n in t)for(var o=t[n],r=0,s=o.length;r<s;r++)if("string"==typeof o[r].token)/keyword|support|storage/.test(o[r].token)&&i.push(o[r].regex);else if("object"==typeof o[r].token)for(var a=0,l=o[r].token.length;a<l;a++)if(/keyword|support|storage/.test(o[r].token[a])){n=o[r].regex.match(/\(.+?\)/g)[a];i.push(n.substr(1,n.length-2))}this.completionKeywords=i}return e?i.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,i,n){return(this.$keywordList||this.$createKeywordList()).map((function(e){return{name:e,value:e,score:0,meta:"keyword"}}))},this.$id="ace/mode/text"}).call(u.prototype),t.Mode=u})),ace.define("ace/apply_delta",["require","exports","module"],(function(e,t,i){"use strict";t.applyDelta=function(e,t,i){var n=t.start.row,o=t.start.column,r=e[n]||"";switch(t.action){case"insert":if(1===t.lines.length)e[n]=r.substring(0,o)+t.lines[0]+r.substring(o);else{var s=[n,1].concat(t.lines);e.splice.apply(e,s),e[n]=r.substring(0,o)+e[n],e[n+t.lines.length-1]+=r.substring(o)}break;case"remove":var a=t.end.column,l=t.end.row;n===l?e[n]=r.substring(0,o)+r.substring(a):e.splice(n,l-n+1,r.substring(0,o)+e[l].substring(a))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,r=t.Anchor=function(e,t,i){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===i?this.setPosition(t.row,t.column):this.setPosition(t,i)};(function(){function e(e,t,i){var n=i?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&n}function t(t,i,n){var o="insert"==t.action,r=(o?1:-1)*(t.end.row-t.start.row),s=(o?1:-1)*(t.end.column-t.start.column),a=t.start,l=o?a:t.end;return e(i,a,n)?{row:i.row,column:i.column}:e(l,i,!n)?{row:i.row+r,column:i.column+(i.row==l.row?s:0)}:{row:a.row,column:a.column}}n.implement(this,o),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){var i=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}},this.setPosition=function(e,t,i){var n;if(n=i?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=n.row||this.column!=n.column){var o={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:o,value:n})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var i={};return e>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):e<0?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),t<0&&(i.column=0),i}}).call(r.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./apply_delta").applyDelta,r=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){n.implement(this,r),this.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var i=t.length-1;e.end.row-e.start.row==i&&(t[i]=t[i].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var i=this.clippedPos(e.row,e.column),n=this.pos(e.row,e.column+t.length);return this.applyDelta({start:i,end:n,action:"insert",lines:[t]},!0),this.clonePos(n)},this.clippedPos=function(e,t){var i=this.getLength();void 0===e?e=i:e<0?e=0:e>=i&&(e=i-1,t=void 0);var n=this.getLine(e);return null==t&&(t=n.length),{row:e,column:t=Math.min(Math.max(t,0),n.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var i=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),i=0):(t=[""].concat(t),e--,i=this.$lines[e].length),this.insertMergedLines({row:e,column:i},t)},this.insertMergedLines=function(e,t){var i=this.clippedPos(e.row,e.column),n={row:i.row+t.length-1,column:(1==t.length?i.column:0)+t[t.length-1].length};return this.applyDelta({start:i,end:n,action:"insert",lines:t}),this.clonePos(n)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),i=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:i,action:"remove",lines:this.getLinesForRange({start:t,end:i})}),this.clonePos(t)},this.removeInLine=function(e,t,i){var n=this.clippedPos(e,t),o=this.clippedPos(e,i);return this.applyDelta({start:n,end:o,action:"remove",lines:this.getLinesForRange({start:n,end:o})},!0),this.clonePos(n)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var i=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,n=t<this.getLength()-1,o=i?e-1:e,r=i?this.getLine(o).length:0,a=n?t+1:t,l=n?0:this.getLine(a).length,c=new s(o,r,a,l),u=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),u},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var i="insert"==e.action;(i?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(i&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),o(this.$lines,e,t),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,t){for(var i=e.lines,n=i.length,o=e.start.row,r=e.start.column,s=0,a=0;;){s=a,a+=t-1;var l=i.slice(s,a);if(a>n){e.lines=l,e.start.row=o+s,e.start.column=r;break}l.push(""),this.applyDelta({start:this.pos(o+s,r),end:this.pos(o+a,r=0),action:e.action,lines:l},!0)}},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,o=t||0,r=i.length;o<r;o++)if((e-=i[o].length+n)<0)return{row:o,column:e+i[o].length+n};return{row:r-1,column:i[r-1].length}},this.positionToIndex=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,o=0,r=Math.min(e.row,i.length),s=t||0;s<r;++s)o+=i[s].length+n;return o+e.column}}).call(l.prototype),t.Document=l})),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,r=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var i=this;this.$worker=function(){if(i.running){for(var e=new Date,t=i.currentLine,n=-1,o=i.doc,r=t;i.lines[t];)t++;var s=o.getLength(),a=0;for(i.running=!1;t<s;){i.$tokenizeRow(t),n=t;do{t++}while(i.lines[t]);if(++a%5==0&&new Date-e>20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,-1==n&&(n=t),r<=n&&i.fireUpdateEvent(r,n)}}};(function(){n.implement(this,o),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var i={first:e,last:t};this._signal("update",{data:i})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,i=e.end.row-t;if(0===i)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,i+1,null),this.states.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),i=this.states[e-1],n=this.tokenizer.getLineTokens(t,i,e);return this.states[e]+""!=n.state+""?(this.states[e]=n.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=n.tokens}}).call(r.prototype),t.BackgroundTokenizer=r})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,i){"use strict";var n=e("./lib/lang"),o=(e("./lib/oop"),e("./range").Range),r=function(e,t,i){this.setRegexp(e),this.clazz=t,this.type=i||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,i,r){if(this.regExp)for(var s=r.firstRow,a=r.lastRow,l=s;l<=a;l++){var c=this.cache[l];null==c&&((c=n.getMatchOffsets(i.getLine(l),this.regExp)).length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map((function(e){return new o(l,e.offset,l,e.offset+e.length)})),this.cache[l]=c.length?c:"");for(var u=c.length;u--;)t.drawSingleLineMarker(e,c[u].toScreenRange(i),this.clazz,r)}}}).call(r.prototype),t.SearchHighlight=r})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,i){"use strict";function n(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var i=t[t.length-1];this.range=new o(t[0].start.row,t[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}var o=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,i){var n,o,r=0,s=this.folds,a=!0;null==t&&(t=this.end.row,i=this.end.column);for(var l=0;l<s.length;l++){if(-1==(o=(n=s[l]).range.compareStart(t,i)))return void e(null,t,i,r,a);if(!e(null,n.start.row,n.start.column,r,a)&&e(n.placeholder,n.start.row,n.start.column,r)||0===o)return;a=!n.sameRow,r=n.end.column}e(null,t,i,r,a)},this.getNextFoldTo=function(e,t){for(var i,n,o=0;o<this.folds.length;o++){if(-1==(n=(i=this.folds[o]).range.compareEnd(e,t)))return{fold:i,kind:"after"};if(0===n)return{fold:i,kind:"inside"}}return null},this.addRemoveChars=function(e,t,i){var n,o,r=this.getNextFoldTo(e,t);if(r)if(n=r.fold,"inside"==r.kind&&n.start.column!=t&&n.start.row!=e)window.console&&window.console.log(e,t,n);else if(n.start.row==e){var s=(o=this.folds).indexOf(n);for(0===s&&(this.start.column+=i);s<o.length;s++){if((n=o[s]).start.column+=i,!n.sameRow)return;n.end.column+=i}this.end.column+=i}},this.split=function(e,t){var i=this.getNextFoldTo(e,t);if(!i||"inside"==i.kind)return null;var o=i.fold,r=this.folds,s=this.foldData,a=r.indexOf(o),l=r[a-1];this.end.row=l.end.row,this.end.column=l.end.column;var c=new n(s,r=r.splice(a,r.length-a));return s.splice(s.indexOf(this)+1,0,c),c},this.merge=function(e){for(var t=e.folds,i=0;i<t.length;i++)this.addFold(t[i]);var n=this.foldData;n.splice(n.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach((function(t){e.push(" "+t.toString())})),e.push("]"),e.join("\n")},this.idxToPosition=function(e){for(var t=0,i=0;i<this.folds.length;i++){var n=this.folds[i];if((e-=n.start.column-t)<0)return{row:n.start.row,column:n.start.column+e};if((e-=n.placeholder.length)<0)return n.start;t=n.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(n.prototype),t.FoldLine=n})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(e,t,i){"use strict";var n=e("./range").Range.comparePoints,o=function(){this.ranges=[]};(function(){this.comparePoints=n,this.pointIndex=function(e,t,i){for(var o=this.ranges,r=i||0;r<o.length;r++){var s=o[r],a=n(e,s.end);if(!(a>0)){var l=n(e,s.start);return 0===a?t&&0!==l?-r-2:r:l>0||0===l&&!t?r:-r-1}}return-r-1},this.add=function(e){var t=!e.isEmpty(),i=this.pointIndex(e.start,t);i<0&&(i=-i-1);var n=this.pointIndex(e.end,t,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,e)},this.addList=function(e){for(var t=[],i=e.length;i--;)t.push.apply(t,this.add(e[i]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],i=this.ranges,o=(i=i.sort((function(e,t){return n(e.start,t.start)})))[0],r=1;r<i.length;r++){e=o,o=i[r];var s=n(e.end,o.start);s<0||(0!=s||e.isEmpty()||o.isEmpty())&&(n(e.end,o.end)<0&&(e.end.row=o.end.row,e.end.column=o.end.column),i.splice(r,1),t.push(o),o=e,r--)}return this.ranges=i,t},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var i=this.ranges;if(i[0].start.row>t||i[i.length-1].start.row<e)return[];var n=this.pointIndex({row:e,column:0});n<0&&(n=-n-1);var o=this.pointIndex({row:t,column:0},n);o<0&&(o=-o-1);for(var r=[],s=n;s<o;s++)r.push(i[s]);return r},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){if("insert"==e.action)var t=e.start,i=e.end;else i=e.start,t=e.end;for(var n=t.row,o=i.row-n,r=-t.column+i.column,s=this.ranges,a=0,l=s.length;a<l;a++){if(!((c=s[a]).end.row<n)){if(c.start.row>n)break;if(c.start.row==n&&c.start.column>=t.column&&(c.start.column!=t.column||!this.$insertRight)&&(c.start.column+=r,c.start.row+=o),c.end.row==n&&c.end.column>=t.column){if(c.end.column==t.column&&this.$insertRight)continue;c.end.column==t.column&&r>0&&a<l-1&&c.end.column>c.start.column&&c.end.column==s[a+1].start.column&&(c.end.column-=r),c.end.column+=r,c.end.row+=o}}}if(0!=o&&a<l)for(;a<l;a++){var c;(c=s[a]).start.row+=o,c.end.row+=o}}}).call(o.prototype),t.RangeList=o})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],(function(e,t,i){"use strict";function n(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function o(e,t){n(e.start,t),n(e.end,t)}function r(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}e("../range").Range;var s=e("../range_list").RangeList,a=e("../lib/oop"),l=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};a.inherits(l,s),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach((function(t){t.setFoldLine(e)}))},this.clone=function(){var e=this.range.clone(),t=new l(e,this.placeholder);return this.subFolds.forEach((function(e){t.subFolds.push(e.clone())})),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){if(!this.range.containsRange(e))throw new Error("A fold can't intersect already existing fold"+e.range+this.range);o(e,this.start);for(var t=e.start.row,i=e.start.column,n=0,r=-1;n<this.subFolds.length&&1==(r=this.subFolds[n].range.compare(t,i));n++);var s=this.subFolds[n];if(0==r)return s.addSubFold(e);t=e.range.end.row,i=e.range.end.column;var a=n;for(r=-1;a<this.subFolds.length&&1==(r=this.subFolds[a].range.compare(t,i));a++);this.subFolds[a];if(0==r)throw new Error("A fold can't intersect already existing fold"+e.range+this.range);this.subFolds.splice(n,a-n,e);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return function(e,t){r(e.start,t),r(e.end,t)}(e,this.start)}}.call(l.prototype)})),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],(function(e,t,i){"use strict";var n=e("../range").Range,o=e("./fold_line").FoldLine,r=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=function(){this.getFoldAt=function(e,t,i){var n=this.getFoldLine(e);if(!n)return null;for(var o=n.folds,r=0;r<o.length;r++){var s=o[r];if(s.range.contains(e,t)){if(1==i&&s.range.isEnd(e,t))continue;if(-1==i&&s.range.isStart(e,t))continue;return s}}},this.getFoldsInRange=function(e){var t=e.start,i=e.end,n=this.$foldData,o=[];t.column+=1,i.column-=1;for(var r=0;r<n.length;r++){var s=n[r].range.compareRange(e);if(2!=s){if(-2==s)break;for(var a=n[r].folds,l=0;l<a.length;l++){var c=a[l];if(-2==(s=c.range.compareRange(e)))break;if(2!=s){if(42==s)break;o.push(c)}}}}return t.column-=1,i.column+=1,o},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach((function(e){t=t.concat(this.getFoldsInRange(e))}),this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,i=0;i<t.length;i++)for(var n=0;n<t[i].folds.length;n++)e.push(t[i].folds[n]);return e},this.getFoldStringAt=function(e,t,i,n){if(!(n=n||this.getFoldLine(e)))return null;for(var o,r,s={end:{column:0}},a=0;a<n.folds.length;a++){var l=(r=n.folds[a]).range.compareEnd(e,t);if(-1==l){o=this.getLine(r.start.row).substring(s.end.column,r.start.column);break}if(0===l)return null;s=r}return o||(o=this.getLine(r.start.row).substring(s.end.column)),-1==i?o.substring(0,t-s.end.column):1==i?o.substring(t-s.end.column):o},this.getFoldLine=function(e,t){var i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),-1==n&&(n=0);n<i.length;n++){var o=i[n];if(o.start.row<=e&&o.end.row>=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),-1==n&&(n=0);n<i.length;n++){var o=i[n];if(o.end.row>=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var i=this.$foldData,n=t-e+1,o=0;o<i.length;o++){var r=i[o],s=r.end.row,a=r.start.row;if(s>=t){a<t&&(a>=e?n-=t-a:n=0);break}s>=e&&(n-=a>=e?s-a:s-e+1)}return n},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var i,n=this.$foldData,s=!1;e instanceof r?i=e:(i=new r(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(i.range);var a=i.start.row,l=i.start.column,c=i.end.row,u=i.end.column;if(a<c||a==c&&l<=u-2){var h=this.getFoldAt(a,l,1),d=this.getFoldAt(c,u,-1);if(h&&d==h)return h.addSubFold(i);h&&!h.range.isStart(a,l)&&this.removeFold(h),d&&!d.range.isEnd(c,u)&&this.removeFold(d);var g=this.getFoldsInRange(i.range);g.length>0&&(this.removeFolds(g),g.forEach((function(e){i.addSubFold(e)})));for(var f=0;f<n.length;f++){var p=n[f];if(c==p.start.row){p.addFold(i),s=!0;break}if(a==p.end.row){if(p.addFold(i),s=!0,!i.sameRow){var m=n[f+1];if(m&&m.start.row==c){p.merge(m);break}}break}if(c<=p.start.row)break}return s||(p=this.$addFoldLine(new o(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(p.start.row,p.start.row):this.$updateRowLengthCache(p.start.row,p.start.row),this.$modified=!0,this._signal("changeFold",{data:i,action:"add"}),i}throw new Error("The range has to be at least 2 characters width")},this.addFolds=function(e){e.forEach((function(e){this.addFold(e)}),this)},this.removeFold=function(e){var t=e.foldLine,i=t.start.row,n=t.end.row,o=this.$foldData,r=t.folds;if(1==r.length)o.splice(o.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))r.pop(),t.end.row=r[r.length-1].end.row,t.end.column=r[r.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))r.shift(),t.start.row=r[0].start.row,t.start.column=r[0].start.column;else if(e.sameRow)r.splice(r.indexOf(e),1);else{var s=t.split(e.start.row,e.start.column);(r=s.folds).shift(),s.start.row=r[0].start.row,s.start.column=r[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(i,n):this.$updateRowLengthCache(i,n)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i]);t.forEach((function(e){this.removeFold(e)}),this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach((function(t){e.restoreRange(t),this.addFold(t)}),this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var i,o;if(null==e?(i=new n(0,0,this.getLength(),0),t=!0):i="number"==typeof e?new n(e,0,e,this.getLine(e).length):"row"in e?n.fromPoints(e,e):e,o=this.getFoldsInRangeList(i),t)this.removeFolds(o);else for(var r=o;r.length;)this.expandFolds(r),r=this.getFoldsInRangeList(i);if(o.length)return o},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var i=this.getFoldLine(e,t);return i?i.end.row:e},this.getRowFoldStart=function(e,t){var i=this.getFoldLine(e,t);return i?i.start.row:e},this.getFoldDisplayLine=function(e,t,i,n,o){null==n&&(n=e.start.row),null==o&&(o=0),null==t&&(t=e.end.row),null==i&&(i=this.getLine(t).length);var r=this.doc,s="";return e.walk((function(e,t,i,a){if(!(t<n)){if(t==n){if(i<o)return;a=Math.max(o,a)}s+=null!=e?e:r.getLine(t).substring(a,i)}}),t,i),s},this.getDisplayLine=function(e,t,i,n){var o,r=this.getFoldLine(e);return r?this.getFoldDisplayLine(r,e,t,i,n):(o=this.doc.getLine(e)).substring(n||0,t||o.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map((function(t){var i=t.folds.map((function(e){return e.clone()}));return new o(e,i)}))},this.toggleFold=function(e){var t,i,n=this.selection.getRange();if(n.isEmpty()){var o=n.start;if(t=this.getFoldAt(o.row,o.column))return void this.expandFold(t);(i=this.findMatchingBracket(o))?1==n.comparePoint(i)?n.end=i:(n.start=i,n.start.column++,n.end.column--):(i=this.findMatchingBracket({row:o.row,column:o.column+1}))?(1==n.comparePoint(i)?n.end=i:n.start=i,n.start.column++):n=this.getCommentFoldRange(o.row,o.column)||n}else{var r=this.getFoldsInRange(n);if(e&&r.length)return void this.expandFolds(r);1==r.length&&(t=r[0])}if(t||(t=this.getFoldAt(n.start.row,n.start.column)),t&&t.range.toString()==n.toString())this.expandFold(t);else{var s="...";if(!n.isMultiLine()){if((s=this.getTextRange(n)).length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,n)}},this.getCommentFoldRange=function(e,t,i){var o=new s(this,e,t),r=o.getCurrentToken(),a=r.type;if(r&&/^comment|string/.test(a)){"comment"==(a=a.match(/comment|string/)[0])&&(a+="|doc-start");var l=new RegExp(a),c=new n;if(1!=i){do{r=o.stepBackward()}while(r&&l.test(r.type));o.stepForward()}if(c.start.row=o.getCurrentTokenRow(),c.start.column=o.getCurrentTokenColumn()+2,o=new s(this,e,t),-1!=i){var u=-1;do{if(r=o.stepForward(),-1==u){var h=this.getState(o.$row);l.test(h)||(u=o.$row)}else if(o.$row>u)break}while(r&&l.test(r.type));r=o.stepBackward()}else r=o.getCurrentToken();return c.end.row=o.getCurrentTokenRow(),c.end.column=o.getCurrentTokenColumn()+r.value.length-2,c}},this.foldAll=function(e,t,i){null==i&&(i=1e5);var n=this.foldWidgets;if(n){t=t||this.getLength();for(var o=e=e||0;o<t;o++)if(null==n[o]&&(n[o]=this.getFoldWidget(o)),"start"==n[o]){var r=this.getFoldWidgetRange(o);if(r&&r.isMultiLine()&&r.end.row<=t&&r.start.row>=e){o=r.end.row;try{var s=this.addFold("...",r);s&&(s.collapseChildren=i)}catch(e){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var i=this.foldWidgets;if(!i||t&&i[e])return{};for(var n,o=e-1;o>=0;){var r=i[o];if(null==r&&(r=i[o]=this.getFoldWidget(o)),"start"==r){var s=this.getFoldWidgetRange(o);if(n||(n=s),s&&s.end.row>=e)break}o--}return{range:-1!==o&&s,firstRange:n}},this.onFoldWidgetClick=function(e,t){var i={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,i)){var n=t.target||t.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var i=this.getFoldWidget(e),n=this.getLine(e),o="end"===i?-1:1,r=this.getFoldAt(e,-1===o?0:n.length,o);if(r)return t.children||t.all?this.removeFold(r):this.expandFold(r),r;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(r=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(r.range))return this.removeFold(r),r;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var i=this.$toggleFoldWidget(t,{});if(!i){var n=this.getParentFoldRangeData(t,!0);if(i=n.range||n.firstRange){t=i.start.row;var o=this.getFoldAt(t,this.getLine(t).length,1);o?this.removeFold(o):this.addFold("...",i)}}},this.updateFoldWidgets=function(e){var t=e.start.row,i=e.end.row-t;if(0===i)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,n)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,i){"use strict";var n=e("../token_iterator").TokenIterator,o=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var i=t||this.getLine(e.row).charAt(e.column-1);if(""==i)return null;var n=i.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e):null},this.getBracketRange=function(e){var t,i=this.getLine(e.row),n=!0,r=i.charAt(e.column-1),s=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(s||(r=i.charAt(e.column),e={row:e.row,column:e.column+1},s=r&&r.match(/([\(\[\{])|([\)\]\}])/),n=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=o.fromPoints(e,a),n||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=o.fromPoints(a,e),n||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,i){var o=this.$brackets[e],r=1,s=new n(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var u=c.charAt(l);if(u==o){if(0==(r-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(r+=1);l-=1}do{a=s.stepBackward()}while(a&&!i.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,i){var o=this.$brackets[e],r=1,s=new n(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,u=c.length;l<u;){var h=c.charAt(l);if(h==o){if(0==(r-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(r+=1);l+=1}do{a=s.stepForward()}while(a&&!i.test(a.type));if(null==a)break;l=0}return null}}}})),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],(function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/lang"),r=e("./config"),s=e("./lib/event_emitter").EventEmitter,a=e("./selection").Selection,l=e("./mode/text").Mode,c=e("./range").Range,u=e("./document").Document,h=e("./background_tokenizer").BackgroundTokenizer,d=e("./search_highlight").SearchHighlight,g=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++g.$uid,this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new u(e)),this.setDocument(e),this.selection=new a(this),r.resetOptions(this),this.setMode(t),r._signal("session",this)};g.$uid=0,function(){function e(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}n.implement(this,s),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,i=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>i&&(this.$docRowCache.splice(i,t),this.$screenRowCache.splice(i,t))},this.$getRowCacheIndex=function(e,t){for(var i=0,n=e.length-1;i<=n;){var o=i+n>>1,r=e[o];if(t>r)i=o+1;else{if(!(t<r))return o;n=o-1}}return i-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){this.$modified=!0,this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&!e.ignore&&(this.$deltasDoc.push(e),t&&0!=t.length&&this.$deltasFold.push({action:"removeFolds",folds:t}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var i,n=this.bgTokenizer.getTokens(e),o=0;if(null==t)r=n.length-1,o=this.getLine(e).length;else for(var r=0;r<n.length&&!((o+=n[r].value.length)>=t);r++);return(i=n[r])?(i.index=r,i.start=o-i.value.length,i):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,i,n){var o=this.$markerId++,r={range:e,type:i||"line",renderer:"function"==typeof i?i:null,clazz:t,inFront:!!n,id:o};return n?(this.$frontMarkers[o]=r,this._signal("changeFrontMarker")):(this.$backMarkers[o]=r,this._signal("changeBackMarker")),o},this.addDynamicMarker=function(e,t){if(e.update){var i=this.$markerId++;return e.id=i,e.inFront=!!t,t?(this.$frontMarkers[i]=e,this._signal("changeFrontMarker")):(this.$backMarkers[i]=e,this._signal("changeBackMarker")),e}},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(t){var i=t.inFront?this.$frontMarkers:this.$backMarkers;t&&(delete i[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))}},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new d(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,i,n){"number"!=typeof t&&(i=t,t=e),i||(i="ace_step");var o=new c(e,0,t,1/0);return o.id=this.addMarker(o,i,"fullLine",n),o},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getWordRange=function(e,t){var i=this.getLine(e),n=!1;if(t>0&&(n=!!i.charAt(t-1).match(this.tokenRe)),n||(n=!!i.charAt(t).match(this.tokenRe)),n)var o=this.tokenRe;else if(/^\s+$/.test(i.slice(t-1,t+1)))o=/\s/;else o=this.nonTokenRe;var r=t;if(r>0){do{r--}while(r>=0&&i.charAt(r).match(o));r++}for(var s=t;s<i.length&&i.charAt(s).match(o);)s++;return new c(e,r,e,s)},this.getAWordRange=function(e,t){for(var i=this.getWordRange(e,t),n=this.getLine(i.end.row);n.charAt(i.end.column).match(/[ \t]/);)i.end.column+=1;return i},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var i=e,n=i.path}else n=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[n]&&!i)return this.$onChangeMode(this.$modes[n]),void(t&&t());this.$modeId=n,r.loadModule(["mode",n],function(e){if(this.$modeId!==n)return t&&t();this.$modes[n]&&!i?this.$onChangeMode(this.$modes[n]):e&&e.Mode&&(e=new e.Mode(i),i||(this.$modes[n]=e,e.$id=n),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var i=e.getTokenizer();if(void 0!==i.addEventListener){var n=this.onReloadTokenizer.bind(this);i.addEventListener("update",n)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(i);else{this.bgTokenizer=new h(i);var o=this;this.bgTokenizer.addEventListener("update",(function(e){o._signal("tokenizerUpdate",e)}))}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){r.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach((function(t){t&&t.screenWidth>e&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),i=this.$rowLengthCache,n=0,o=0,r=this.$foldData[o],s=r?r.start.row:1/0,a=t.length,l=0;l<a;l++){if(l>s){if((l=r.end.row+1)>=a)break;s=(r=this.$foldData[o++])?r.start.row:1/0}null==i[l]&&(i[l]=this.$getStringScreenWidth(t[l])[0]),i[l]>n&&(n=i[l])}this.screenWidth=n}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=e.length-1;-1!=n;n--){var o=e[n];"doc"==o.group?(this.doc.revertDeltas(o.deltas),i=this.$getUndoSelection(o.deltas,!0,i)):o.deltas.forEach((function(e){this.addFolds(e.folds)}),this)}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=0;n<e.length;n++){var o=e[n];"doc"==o.group&&(this.doc.applyDeltas(o.deltas),i=this.$getUndoSelection(o.deltas,!1,i))}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,i){function n(e){return t?"insert"!==e.action:"insert"===e.action}var o,r,s=e[0];n(s)?o=c.fromPoints(s.start,s.end):o=c.fromPoints(s.start,s.start);for(var a=1;a<e.length;a++)n(s=e[a])?(r=s.start,-1==o.compare(r.row,r.column)&&o.setStart(r),r=s.end,1==o.compare(r.row,r.column)&&o.setEnd(r),!0):(r=s.start,-1==o.compare(r.row,r.column)&&(o=c.fromPoints(s.start,s.start)),!1);if(null!=i){0===c.comparePoints(i.start,o.start)&&(i.start.column+=o.end.column-o.start.column,i.end.column+=o.end.column-o.start.column);var l=i.compareRange(o);1==l?o.setStart(i.start):-1==l&&o.setEnd(i.end)}return o},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,i){var n=this.getTextRange(e),o=this.getFoldsInRange(e),r=c.fromPoints(t,t);if(!i){this.remove(e);var s=e.start.row-e.end.row;(u=s?-e.end.column:e.start.column-e.end.column)&&(r.start.row==e.end.row&&r.start.column>e.end.column&&(r.start.column+=u),r.end.row==e.end.row&&r.end.column>e.end.column&&(r.end.column+=u)),s&&r.start.row>=e.end.row&&(r.start.row+=s,r.end.row+=s)}if(r.end=this.insert(r.start,n),o.length){var a=e.start,l=r.start,u=(s=l.row-a.row,l.column-a.column);this.addFolds(o.map((function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=u),e.end.row==a.row&&(e.end.column+=u),e.start.row+=s,e.end.row+=s,e})))}return r},this.indentRows=function(e,t,i){i=i.replace(/\t/g,this.getTabString());for(var n=e;n<=t;n++)this.doc.insertInLine({row:n,column:0},i)},this.outdentRows=function(e){for(var t=e.collapseRows(),i=new c(0,0,0,0),n=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var r=this.getLine(o);i.start.row=o,i.end.row=o;for(var s=0;s<n&&" "==r.charAt(s);++s);s<n&&"\t"==r.charAt(s)?(i.start.column=s,i.end.column=s+1):(i.start.column=0,i.end.column=s),this.remove(i)}},this.$moveLines=function(e,t,i){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),i<0){if((o=this.getRowFoldStart(e+i))<0)return 0;var n=o-e}else if(i>0){var o;if((o=this.getRowFoldEnd(t+i))>this.doc.getLength()-1)return 0;n=o-t}else{e=this.$clipRowToDocument(e);n=(t=this.$clipRowToDocument(t))-e+1}var r=new c(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(r).map((function(e){return(e=e.clone()).start.row+=n,e.end.row+=n,e})),a=0==i?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+n,a),s.length&&this.addFolds(s),n},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var i=this.doc.getLength();e>=i?(e=i-1,t=this.doc.getLine(i-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var i=this.$wrapLimitRange;i.max<0&&(i={min:t,max:t});var n=this.$constrainWrapLimit(e,i.min,i.max);return n!=this.$wrapLimit&&n>1&&(this.$wrapLimit=n,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,i){return t&&(e=Math.max(t,e)),i&&(e=Math.min(i,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,i=e.action,n=e.start,o=e.end,r=n.row,s=o.row,a=s-r,l=null;if(this.$updating=!0,0!=a)if("remove"===i){this[t?"$wrapData":"$rowLengthCache"].splice(r,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var u=0;if(p=this.getFoldLine(o.row)){p.addRemoveChars(o.row,o.column,n.column-o.column),p.shiftRow(-a);var h=this.getFoldLine(r);h&&h!==p&&(h.merge(p),p=h),u=c.indexOf(p)+1}for(;u<c.length;u++){(p=c[u]).start.row>=o.row&&p.shiftRow(-a)}s=r}else{var d=Array(a);d.unshift(r,0);var g=t?this.$wrapData:this.$rowLengthCache;g.splice.apply(g,d);c=this.$foldData,u=0;if(p=this.getFoldLine(r)){var f=p.range.compareInside(n.row,n.column);0==f?(p=p.split(n.row,n.column))&&(p.shiftRow(a),p.addRemoveChars(s,0,o.column-n.column)):-1==f&&(p.addRemoveChars(r,0,o.column-n.column),p.shiftRow(a)),u=c.indexOf(p)+1}for(;u<c.length;u++){var p;(p=c[u]).start.row>=r&&p.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===i&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(p=this.getFoldLine(r))&&p.addRemoveChars(r,n.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(r,s):this.$updateRowLengthCache(r,s),l},this.$updateRowLengthCache=function(e,t,i){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,n){var o,r,s=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,u=e;for(n=Math.min(n,s.length-1);u<=n;)(r=this.getFoldLine(u,r))?(o=[],r.walk(function(e,n,r,a){var l;if(null!=e){(l=this.$getDisplayTokens(e,o.length))[0]=t;for(var c=1;c<l.length;c++)l[c]=i}else l=this.$getDisplayTokens(s[n].substring(a,r),o.length);o=o.concat(l)}.bind(this),r.end.row,s[r.end.row].length+1),l[r.start.row]=this.$computeWrapSplits(o,c,a),u=r.end.row+1):(o=this.$getDisplayTokens(s[u]),l[u]=this.$computeWrapSplits(o,c,a),u++)};var t=3,i=4;this.$computeWrapSplits=function(e,n,o){function r(t){var i=e.slice(l,t),n=i.length;i.join("").replace(/12/g,(function(){n-=1})).replace(/2/g,(function(){n-=1})),s.length||(g=function(){var t=0;if(0===d)return t;if(h)for(var i=0;i<e.length;i++){var n=e[i];if(10==n)t+=1;else{if(11!=n){if(12==n)continue;break}t+=o}}return u&&!1!==h&&(t+=o),Math.min(t,d)}(),s.indent=g),c+=n,s.push(c),l=t}if(0==e.length)return[];for(var s=[],a=e.length,l=0,c=0,u=this.$wrapAsCode,h=this.$indentedSoftWrap,d=n<=Math.max(2*o,8)||!1===h?0:Math.floor(n/2),g=0;a-l>n-g;){var f=l+n-g;if(e[f-1]>=10&&e[f]>=10)r(f);else if(e[f]!=t&&e[f]!=i){for(var p=Math.max(f-(n-(n>>2)),l-1);f>p&&e[f]<t;)f--;if(u){for(;f>p&&e[f]<t;)f--;for(;f>p&&9==e[f];)f--}else for(;f>p&&e[f]<10;)f--;f>p?r(++f):(2==e[f=l+n]&&f--,r(f-g))}else{for(;f!=l-1&&e[f]!=t;f--);if(f>l){r(f);continue}for(f=l+n;f<e.length&&e[f]==i;f++);if(f==e.length)break;r(f)}}return s},this.$getDisplayTokens=function(t,i){var n,o=[];i=i||0;for(var r=0;r<t.length;r++){var s=t.charCodeAt(r);if(9==s){n=this.getScreenTabSize(o.length+i),o.push(11);for(var a=1;a<n;a++)o.push(12)}else 32==s?o.push(10):s>39&&s<48||s>57&&s<64?o.push(9):s>=4352&&e(s)?o.push(1,2):o.push(1)}return o},this.$getStringScreenWidth=function(t,i,n){if(0==i)return[0,0];var o,r;for(null==i&&(i=1/0),n=n||0,r=0;r<t.length&&(9==(o=t.charCodeAt(r))?n+=this.getScreenTabSize(n):o>=4352&&e(o)?n+=2:n+=1,!(n>i));r++);return[n,r]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),i=this.$wrapData[t.row];return i.length&&i[0]<t.column?i.indent:0}return 0},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var i=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(i)},this.getDocumentLastRowColumnPosition=function(e,t){var i=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(i,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t){if(e<0)return{row:0,column:0};var i,n,o=0,r=0,s=0,a=0,l=this.$screenRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){s=l[c],o=this.$docRowCache[c];var h=e>l[u-1]}else h=!u;for(var d=this.getLength()-1,g=this.getNextFoldLine(o),f=g?g.start.row:1/0;s<=e&&!(s+(a=this.getRowLength(o))>e||o>=d);)s+=a,++o>f&&(o=g.end.row+1,f=(g=this.getNextFoldLine(o,g))?g.start.row:1/0),h&&(this.$docRowCache.push(o),this.$screenRowCache.push(s));if(g&&g.start.row<=o)i=this.getFoldDisplayLine(g),o=g.start.row;else{if(s+a<=e||o>d)return{row:d,column:this.getLine(d).length};i=this.getLine(o),g=null}var p=0;if(this.$useWrapMode){var m=this.$wrapData[o];if(m){var v=Math.floor(e-s);n=m[v],v>0&&m.length&&(p=m.indent,r=m[v-1]||m[m.length-1],i=i.substring(r))}}return r+=this.$getStringScreenWidth(i,t-p)[1],this.$useWrapMode&&r>=n&&(r=n-1),g?g.idxToPosition(r):{row:o,column:r}},this.documentToScreenPosition=function(e,t){if(void 0===t)var i=this.$clipPositionToDocument(e.row,e.column);else i=this.$clipPositionToDocument(e,t);e=i.row,t=i.column;var n,o=0,r=null;(n=this.getFoldAt(e,t,1))&&(e=n.start.row,t=n.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){a=l[c],o=this.$screenRowCache[c];var h=e>l[u-1]}else h=!u;for(var d=this.getNextFoldLine(a),g=d?d.start.row:1/0;a<e;){if(a>=g){if((s=d.end.row+1)>e)break;g=(d=this.getNextFoldLine(s,d))?d.start.row:1/0}else s=a+1;o+=this.getRowLength(a),a=s,h&&(this.$docRowCache.push(a),this.$screenRowCache.push(o))}var f="";d&&a>=g?(f=this.getFoldDisplayLine(d,e,t),r=d.start.row):(f=this.getLine(e).substring(0,t),r=e);var p=0;if(this.$useWrapMode){var m=this.$wrapData[r];if(m){for(var v=0;f.length>=m[v];)o++,v++;f=f.substring(m[v-1]||0,f.length),p=v>0?m.indent:0}}return{row:o,column:p+this.$getStringScreenWidth(f)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var i=this.$wrapData.length,n=0,o=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);n<i;){var r=this.$wrapData[n];e+=r?r.length+1:1,++n>o&&(n=t.end.row+1,o=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,a=0;a<s.length;a++)e-=(t=s[a]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,i,n){if(0===i)return[0,0];var o,r;for(i||(i=1/0),n=n||0,r=0;r<t.length&&!((n+="\t"===(o=t.charAt(r))?this.getScreenTabSize(n):e.getCharacterWidth(o))>i);r++);return[n,r]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()}}.call(g.prototype),e("./edit_session/folding").Folding.call(g.prototype),e("./edit_session/bracket_match").BracketMatch.call(g.prototype),r.defineOptions(g.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){isNaN(e)||this.$tabSize===e||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId}}}),t.EditSession=g})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,i){"use strict";var n=e("./lib/lang"),o=e("./lib/oop"),r=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return o.mixin(this.$options,e),this},this.getOptions=function(){return n.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,i=this.$matchIterator(e,t);if(!i)return!1;var n=null;return i.forEach((function(e,i,o,s){return n=new r(e,i,o,s),!(i==s&&t.start&&t.start.start&&0!=t.skipCurrent&&n.isEqual(t.start))||(n=null,!1)})),n},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var i=t.range,o=i?e.getLines(i.start.row,i.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,u=o.length-c;e:for(var h=a.offset||0;h<=u;h++){for(var d=0;d<c;d++)if(-1==o[h+d].search(a[d]))continue e;var g=o[h],f=o[h+c-1],p=g.length-g.match(a[0])[0].length,m=f.match(a[c-1])[0].length;l&&l.end.row===h&&l.end.column>p||(s.push(l=new r(h,p,h+c-1,m)),c>2&&(h=h+c-2))}}else for(var v=0;v<o.length;v++){var b=n.getMatchOffsets(o[v],a);for(d=0;d<b.length;d++){var w=b[d];s.push(new r(v,w.offset,v,w.offset+w.length))}}if(i){var A=i.start.column,C=i.start.column;for(v=0,d=s.length-1;v<d&&s[v].start.column<A&&s[v].start.row==i.start.row;)v++;for(;v<d&&s[d].end.column>C&&s[d].end.row==i.end.row;)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v<d;v++)s[v].start.row+=i.start.row,s[v].end.row+=i.start.row}return s},this.replace=function(e,t){var i=this.$options,n=this.$assembleRegExp(i);if(i.$isMultiLine)return t;if(n){var o=n.exec(e);if(!o||o[0].length!=e.length)return null;if(t=e.replace(n,t),i.preserveCase){t=t.split("");for(var r=Math.min(e.length,e.length);r--;){var s=e[r];s&&s.toLowerCase()!=s?t[r]=t[r].toUpperCase():t[r]=t[r].toLowerCase()}t=t.join("")}return t}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var i=e.needle;if(!e.needle)return e.re=!1;e.regExp||(i=n.escapeRegExp(i)),e.wholeWord&&(i=function(e,t){function i(e){return/\w/.test(e)||t.regExp?"\\b":""}return i(e[0])+e+i(e[e.length-1])}(i,e));var o=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(i),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(i,o);try{var r=new RegExp(i,o)}catch(e){r=!1}return e.re=r},this.$assembleMultilineRegExp=function(e,t){for(var i=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),n=[],o=0;o<i.length;o++)try{n.push(new RegExp(i[o],t))}catch(e){return!1}return n},this.$matchIterator=function(e,t){var i=this.$assembleRegExp(t);if(!i)return!1;var n=1==t.backwards,o=0!=t.skipCurrent,r=t.range,s=t.start;s||(s=r?r[n?"end":"start"]:e.selection.getRange()),s.start&&(s=s[o!=n?"end":"start"]);var a=r?r.start.row:0,l=r?r.end.row:e.getLength()-1;if(n)var c=function(e){var i=s.row;if(!h(i,s.column,e)){for(i--;i>=a;i--)if(h(i,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(i=l,a=s.row;i>=a;i--)if(h(i,Number.MAX_VALUE,e))return}};else c=function(e){var i=s.row;if(!h(i,s.column,e)){for(i+=1;i<=l;i++)if(h(i,0,e))return;if(0!=t.wrap)for(i=a,l=s.row;i<=l;i++)if(h(i,0,e))return}};if(t.$isMultiLine)var u=i.length,h=function(t,o,r){var s=n?t-u+1:t;if(!(s<0)){var a=e.getLine(s),l=a.search(i[0]);if(!(!n&&l<o||-1===l)){for(var c=1;c<u;c++)if(-1==(a=e.getLine(s+c)).search(i[c]))return;var h=a.match(i[u-1])[0].length;if(!(n&&h>o))return!!r(s,l,s+u-1,h)||void 0}}};else if(n)h=function(t,n,o){var r,s=e.getLine(t),a=[],l=0;for(i.lastIndex=0;r=i.exec(s);){var c=r[0].length;if(l=r.index,!c){if(l>=s.length)break;i.lastIndex=l+=1}if(r.index+c>n)break;a.push(r.index,c)}for(var u=a.length-1;u>=0;u-=2){var h=a[u-1];if(o(t,h,t,h+(c=a[u])))return!0}};else h=function(t,n,o){var r,s=e.getLine(t),a=n;for(i.lastIndex=n;r=i.exec(s);){var l=r[0].length;if(o(t,a=r.index,t,a+l))return!0;if(!l&&(i.lastIndex=a+=1,a>=s.length))return!1}};return{forEach:c}}}).call(s.prototype),t.Search=s})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,i){"use strict";function n(e,t){this.platform=t||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function o(e,t){n.call(this,e,t),this.$singleCommand=!1}var r=e("../lib/keys"),s=e("../lib/useragent"),a=r.KEY_MODS;o.prototype=n.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var i=e&&("string"==typeof e?e:e.name);e=this.commands[i],t||delete this.commands[i];var n=this.commandKeyBinding;for(var o in n){var r=n[o];if(r==e)delete n[o];else if(Array.isArray(r)){var s=r.indexOf(e);-1!=s&&(r.splice(s,1),1==r.length&&(n[o]=r[0]))}}},this.bindKey=function(e,t,i){if("object"==typeof e&&e&&(null==i&&(i=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var n="";if(-1!=e.indexOf(" ")){var o=e.split(/\s+/);e=o.pop(),o.forEach((function(e){var t=this.parseKeys(e),i=a[t.hashId]+t.key;n+=(n?" ":"")+i,this._addCommandToBinding(n,"chainKeys")}),this),n+=" "}var r=this.parseKeys(e),s=a[r.hashId]+r.key;this._addCommandToBinding(n+s,t,i)}),this)},this._addCommandToBinding=function(t,i,n){var o,r=this.commandKeyBinding;if(i)if(!r[t]||this.$singleCommand)r[t]=i;else{Array.isArray(r[t])?-1!=(o=r[t].indexOf(i))&&r[t].splice(o,1):r[t]=[r[t]],"number"!=typeof n&&(n=e(i));var s=r[t];for(o=0;o<s.length;o++){if(e(s[o])>n)break}s.splice(o,0,i)}else delete r[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var i=e[t];if(i){if("string"==typeof i)return this.bindKey(i,t);"function"==typeof i&&(i={exec:i}),"object"==typeof i&&(i.name||(i.name=t),this.addCommand(i))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),i=t.pop(),n=r[i];if(r.FUNCTION_KEYS[n])i=r.FUNCTION_KEYS[n].toLowerCase();else{if(!t.length)return{key:i,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:i.toUpperCase(),hashId:-1}}for(var o=0,s=t.length;s--;){var a=r.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;o|=a}return{key:i,hashId:o}},this.findKeyCommand=function(e,t){var i=a[e]+t;return this.commandKeyBinding[i]},this.handleKeyboard=function(e,t,i,n){if(!(n<0)){var o=a[t]+i,r=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,r=this.commandKeyBinding[e.$keyChain]||r),!r||"chainKeys"!=r&&"chainKeys"!=r[r.length-1]?(e.$keyChain&&(t&&4!=t||1!=i.length?(-1==t||n>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-o.length-1)),{command:r}):(e.$keyChain=e.$keyChain||o,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(n.prototype),t.HashHandler=n,t.MultiHashHandler=o})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,i){"use strict";var n=e("../lib/oop"),o=e("../keyboard/hash_handler").MultiHashHandler,r=e("../lib/event_emitter").EventEmitter,s=function(e,t){o.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.command.exec(e.editor,e.args||{})}))};n.inherits(s,o),function(){n.implement(this,r),this.exec=function(e,t,i){if(Array.isArray(e)){for(var n=e.length;n--;)if(this.exec(e[n],t,i))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(e.isAvailable&&!e.isAvailable(t))return!1;var o={editor:t,command:e,args:i};return o.returnValue=this._emit("exec",o),this._signal("afterExec",o),!1!==o.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(s.prototype),t.CommandManager=s})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,i){"use strict";function n(e,t){return{win:e,mac:t}}var o=e("../lib/lang"),r=e("../config"),s=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:n("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",bindKey:n("Alt-E","F4"),exec:function(e){r.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:n("Alt-Shift-E","Shift-F4"),exec:function(e){r.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:n("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:n(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:n("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:n("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:n("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:n("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:n("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:n(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:n("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:n("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:n("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:n("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:n("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:n("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:n("Ctrl-F","Command-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:n("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:n("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:n("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:n("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:n("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:n("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:n("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:n("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:n("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:n("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:n("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:n("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:n("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:n("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:n("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:n("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:n("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:n("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:n("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:n("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:n(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:n("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:n(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:n("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:n("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:n("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:n("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:n("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:n("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:n("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:n(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(e){},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:n("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:n("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:n("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:n("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:n("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:n("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:n("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:n("Ctrl-H","Command-Option-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",bindKey:n("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:n("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:n("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:n("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:n("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:n("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:n("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:n("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:n("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:n("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:n("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:n("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:n("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:n("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:n("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:n("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:n("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(o.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:n(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:n("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:n("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:n("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:n("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:n(null,null),exec:function(e){for(var t=e.selection.isBackwards(),i=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),n=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),r=e.session.doc.getLine(i.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(i.row),c=i.row+1;c<=n.row+1;c++){var u=o.stringTrimLeft(o.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}n.row+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new s(i.row,0,n.row+2,0),l),a>0?(e.selection.moveCursorTo(i.row,i.column),e.selection.selectTo(i.row,i.column+a)):(r=e.session.doc.getLine(i.row).length>r?r+1:r,e.selection.moveCursorTo(i.row,r))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:n(null,null),exec:function(e){var t=e.session.doc.getLength()-1,i=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,o=[];n.length<1&&(n=[e.selection.getRange()]);for(var r=0;r<n.length;r++)r==n.length-1&&(n[r].end.row!==t||n[r].end.column!==i)&&o.push(new s(n[r].end.row,n[r].end.column,t,i)),0===r?(0!==n[r].start.row||0!==n[r].start.column)&&o.push(new s(0,0,n[r].start.row,n[r].start.column)):o.push(new s(n[r-1].end.row,n[r-1].end.column,n[r].start.row,n[r].start.column));e.exitMultiSelectMode(),e.clearSelection();for(r=0;r<o.length;r++)e.selection.addRange(o[r],!1)},readOnly:!0,scrollIntoView:"none"}]})),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"],(function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var n=e("./lib/oop"),o=e("./lib/dom"),r=e("./lib/lang"),s=e("./lib/useragent"),a=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,c=e("./mouse/fold_handler").FoldHandler,u=e("./keyboard/keybinding").KeyBinding,h=e("./edit_session").EditSession,d=e("./search").Search,g=e("./range").Range,f=e("./lib/event_emitter").EventEmitter,p=e("./commands/command_manager").CommandManager,m=e("./commands/default_commands").commands,v=e("./config"),b=e("./token_iterator").TokenIterator,w=function(e,t){var i=e.getContainerElement();this.container=i,this.renderer=e,this.id="editor"+ ++w.$uid,this.commands=new p(s.isMac?"mac":"win",m),"object"==typeof document&&(this.textInput=new a(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new c(this)),this.keyBinding=new u(this),this.$blockScrolling=0,this.$search=(new d).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=r.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(t||new h("")),v.resetOptions(this),v._signal("editor",this)};w.$uid=0,function(){n.implement(this,f),this.$initOperationListeners=function(){this.selections=[],this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=r.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.command.name&&void 0!==this.curOp.command.scrollIntoView&&this.$blockScrolling++},this.endOperation=function(e){if(this.curOp){if(e&&!1===e.returnValue)return this.curOp=null;this._signal("beforeEndOperation");var t=this.curOp.command;t.name&&this.$blockScrolling>0&&this.$blockScrolling--;var i=t&&t.scrollIntoView;if(i){switch(i){case"center-animate":i="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var n=this.selection.getRange(),o=this.renderer.layerConfig;(n.start.row>=o.lastRow||n.end.row<=o.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==i&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,i=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var o=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0}else n=n&&-1!==i.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(n=!1),n?this.session.mergeUndoDeltas=!0:-1!==i.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e){this.$keybindingId=e;var i=this;v.loadModule(["keybinding",e],(function(n){i.$keybindingId==e&&i.keyBinding.setKeyboardHandler(n&&n.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var i=this.session.getSelection();i.off("changeCursor",this.$onCursorChange),i.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=t.findMatchingBracket(e.getCursorPosition());if(i)var n=new g(i.row,i.column,i.row,i.column+1);else if(t.$mode.getMatching)n=t.$mode.getMatching(e.session);n&&(t.$bracketHighlight=t.addMarker(n,"ace_bracket","text"))}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout((function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=e.getCursorPosition(),n=new b(e.session,i.row,i.column),o=n.getCurrentToken();if(!o||!/\b(?:tag-open|tag-name)/.test(o.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==o.type.indexOf("tag-open")||(o=n.stepForward())){var r=o.value,s=0,a=n.stepBackward();if("<"==a.value)do{a=o,(o=n.stepForward())&&o.value===r&&-1!==o.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--)}while(o&&s>=0);else{do{o=a,a=n.stepBackward(),o&&o.value===r&&-1!==o.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--)}while(a&&s<=0);n.stepForward()}if(!o)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var l=n.getCurrentTokenRow(),c=n.getCurrentTokenColumn(),u=new g(l,c,l,c+o.value.length),h=t.$backMarkers[t.$tagHighlight];t.$tagHighlight&&null!=h&&0!==u.compareRange(h.range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),u&&!t.$tagHighlight&&(t.$tagHighlight=t.addMarker(u,"ace_bracket","text"))}}}),50)}},this.focus=function(){var e=this;setTimeout((function(){e.textInput.focus()})),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,i=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,i,t),this._signal("change",e),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||(v.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView()),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.$maxLines&&1===this.session.getLength()&&!(this.renderer.$minLines>1)&&(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var i=new g(e.row,e.column,e.row,1/0);i.id=t.addMarker(i,"ace_active-line","screenLine"),t.$highlightLineMarker=i}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var i=this.selection.getRange(),n=this.getSelectionStyle();t.$selectionMarker=t.addMarker(i,"ace_selection",n)}var o=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(o),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var i=t.start.column-1,n=t.end.column+1,o=e.getLine(t.start.row),r=o.length,s=o.substring(Math.max(i,0),Math.min(n,r));if(!(i>=0&&/^[\w\d]/.test(s)||n<=r&&/[\w\d]$/.test(s)))if(s=o.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(s))return this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s})}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var i={text:e,event:t};this.commands.exec("paste",this,i)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(t);else{var i=t.split(/\r\n|\r|\n/),n=this.selection.rangeList.ranges;if(i.length>n.length||i.length<2||!i[1])return this.commands.exec("insertstring",this,t);for(var o=n.length;o--;){var r=n[o];r.isEmpty()||this.session.remove(r),this.session.insert(r.start,i[o])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var i=this.session,n=i.getMode(),o=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var r=n.transformAction(i.getState(o.row),"insertion",this,i,e);r&&(e!==r.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=r.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==e.indexOf("\n")){(s=new g.fromPoints(o,o)).end.column+=e.length,this.session.remove(s)}}else{var s=this.getSelectionRange();o=this.session.remove(s),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=i.getLine(o.row);if(o.column>a.search(/\S|$/)){var l=a.substr(o.column).search(/\S|$/);i.doc.removeInLine(o.row,o.column,o.column+l)}}this.clearSelection();var c=o.column,u=i.getState(o.row),h=(a=i.getLine(o.row),n.checkOutdent(u,a,e));i.insert(o,e);if(r&&r.selection&&(2==r.selection.length?this.selection.setSelectionRange(new g(o.row,c+r.selection[0],o.row,c+r.selection[1])):this.selection.setSelectionRange(new g(o.row+r.selection[0],r.selection[1],o.row+r.selection[2],r.selection[3]))),i.getDocument().isNewLine(e)){var d=n.getNextLineIndent(u,a.slice(0,o.column),i.getTabString());i.insert({row:o.row+1,column:0},d)}h&&n.autoOutdent(u,i,o.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,i){this.keyBinding.onCommandKey(e,t,i)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var i=this.session,n=i.getState(t.start.row),o=i.getMode().transformAction(n,"deletion",this,i,t);if(0===t.end.column){var r=i.getTextRange(t);if("\n"==r[r.length-1]){var s=i.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}o&&(t=o)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var i,n,o=this.session.getLine(e.row);t<o.length?(i=o.charAt(t)+o.charAt(t-1),n=new g(e.row,t-1,e.row,t+1)):(i=o.charAt(t-1)+o.charAt(t-2),n=new g(e.row,t-2,e.row,t)),this.session.replace(n,i),this.session.selection.moveToPosition(n.end)}}},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),i=this.session.getTextRange(t);this.session.replace(t,i.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),i=this.session.getTextRange(t);this.session.replace(t,i.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var i=e.getTextRange(t);if(!/^\s+$/.test(i)){u=this.$getSelectedRows();return void e.indentRows(u.first,u.last,"\t")}}var n=e.getLine(t.start.row),o=t.start,s=e.getTabSize(),a=e.documentToScreenColumn(o.row,o.column);if(this.session.getUseSoftTabs())var l=s-a%s,c=r.stringRepeat(" ",l);else{for(l=a%s;" "==n[t.start.column-1]&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),c="\t"}return this.insert(c)}var u=this.$getSelectedRows();e.indentRows(u.first,u.last,"\t")},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){var e=this.$getSelectedRows(),t=this.session,i=[];for(o=e.first;o<=e.last;o++)i.push(t.getLine(o));i.sort((function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0}));for(var n=new g(0,0,0,0),o=e.first;o<=e.last;o++){var r=t.getLine(o);n.start.row=o,n.end.row=o,n.end.column=r.length,t.replace(n,i[o-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,i,e)},this.getNumberAt=function(e,t){var i=/[\-]?[0-9]+(?:\.[0-9]+)?/g;i.lastIndex=0;for(var n=this.session.getLine(e);i.lastIndex<t;){var o=i.exec(n);if(o.index<=t&&o.index+o[0].length>=t)return{value:o[0],start:o.index,end:o.index+o[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,i=this.selection.getCursor().column,n=new g(t,i-1,t,i),o=this.session.getTextRange(n);if(!isNaN(parseFloat(o))&&isFinite(o)){var r=this.getNumberAt(t,i);if(r){var s=r.value.indexOf(".")>=0?r.start+r.value.indexOf(".")+1:r.end,a=r.start+r.value.length-s,l=parseFloat(r.value);l*=Math.pow(10,a),s!==r.end&&i<s?e*=Math.pow(10,r.end-i-1):e*=Math.pow(10,r.end-i),l+=e;var c=(l/=Math.pow(10,a)).toFixed(a),u=new g(t,r.start,t,r.end);this.session.replace(u,c),this.moveCursorTo(t,Math.max(r.start+1,i+c.length-r.value.length))}}},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,i=e.getRange(),n=e.isBackwards();if(i.isEmpty()){var o=i.start.row;t.duplicateLines(o,o)}else{var r=n?i.start:i.end,s=t.insert(r,t.getTextRange(i),!1);i.start=r,i.end=s,e.setSelectionRange(i,n)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,i){return this.session.moveText(e,t,i)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var i,n,o=this.selection;if(!o.inMultiSelectMode||this.inVirtualSelectionMode){var r=o.toOrientedRange();i=this.$getSelectedRows(r),n=this.session.$moveLines(i.first,i.last,t?0:e),t&&-1==e&&(n=0),r.moveBy(n,0),o.fromOrientedRange(r)}else{var s=o.rangeList.ranges;o.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,u=0;u<c;u++){var h=u;s[u].moveBy(a,0);for(var d=(i=this.$getSelectedRows(s[u])).first,g=i.last;++u<c;){l&&s[u].moveBy(l,0);var f=this.$getSelectedRows(s[u]);if(t&&f.first!=g)break;if(!t&&f.first>g+1)break;g=f.last}for(u--,a=this.session.$moveLines(d,g,t?0:e),t&&-1==e&&(h=u+1);h<=u;)s[h].moveBy(a,0),h++;t||(a=0),l+=a}o.fromOrientedRange(o.ranges[0]),o.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var i=this.renderer,n=this.renderer.layerConfig,o=e*Math.floor(n.height/n.lineHeight);this.$blockScrolling++,!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(o,0)})):!1===t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection()),this.$blockScrolling--;var r=i.scrollTop;i.scrollBy(0,o*n.lineHeight),null!=t&&i.scrollCursorIntoView(null,.5),i.animateScrolling(r)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,i,n){this.renderer.scrollToLine(e,t,i,n)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var i=this.getCursorPosition(),n=new b(this.session,i.row,i.column),o=n.getCurrentToken(),r=o||n.stepForward();if(r){var s,a,l=!1,c={},u=i.column-r.start,h={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(r.value.match(/[{}()\[\]]/g)){for(;u<r.value.length&&!l;u++)if(h[r.value[u]])switch(a=h[r.value[u]]+"."+r.type.replace("rparen","lparen"),isNaN(c[a])&&(c[a]=0),r.value[u]){case"(":case"[":case"{":c[a]++;break;case")":case"]":case"}":c[a]--,-1===c[a]&&(s="bracket",l=!0)}}else r&&-1!==r.type.indexOf("tag-name")&&(isNaN(c[r.value])&&(c[r.value]=0),"<"===o.value?c[r.value]++:"</"===o.value&&c[r.value]--,-1===c[r.value]&&(s="tag",l=!0));l||(o=r,r=n.stepForward(),u=0)}while(r&&!l);if(s){var d,f;if("bracket"===s)(d=this.session.getBracketRange(i))||(f=(d=new g(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+u-1,n.getCurrentTokenRow(),n.getCurrentTokenColumn()+u-1)).start,(t||f.row===i.row&&Math.abs(f.column-i.column)<2)&&(d=this.session.getBracketRange(f)));else if("tag"===s){if(!r||-1===r.type.indexOf("tag-name"))return;var p=r.value;if(0===(d=new g(n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2,n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2)).compare(i.row,i.column)){l=!1;do{r=o,(o=n.stepBackward())&&(-1!==o.type.indexOf("tag-close")&&d.setEnd(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1),r.value===p&&-1!==r.type.indexOf("tag-name")&&("<"===o.value?c[p]++:"</"===o.value&&c[p]--,0===c[p]&&(l=!0)))}while(o&&!l)}r&&r.type.indexOf("tag-name")&&((f=d.start).row==i.row&&Math.abs(f.column-i.column)<2&&(f=d.end))}(f=d&&d.cursor||f)&&(e?d&&t?this.selection.setRange(d):d&&d.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(f.row,f.column):this.selection.moveTo(f.row,f.column))}}},this.gotoLine=function(e,t,i){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,i)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var i=this.$search.find(this.session),n=0;return i?(this.$tryReplace(i,e)&&(n=1),null!==i&&(this.selection.setSelectionRange(i),this.renderer.scrollSelectionIntoView(i.start,i.end)),n):n},this.replaceAll=function(e,t){t&&this.$search.set(t);var i=this.$search.findAll(this.session),n=0;if(!i.length)return n;this.$blockScrolling+=1;var o=this.getSelectionRange();this.selection.moveTo(0,0);for(var r=i.length-1;r>=0;--r)this.$tryReplace(i[r],e)&&n++;return this.selection.setSelectionRange(o),this.$blockScrolling-=1,n},this.$tryReplace=function(e,t){var i=this.session.getTextRange(e);return null!==(t=this.$search.replace(i,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,i){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&n.mixin(t,e);var o=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(o)||this.$search.$options.needle)||(o=this.session.getWordRange(o.start.row,o.start.column),e=this.session.getTextRa
|
4 |
* Copyright 2018 Incsub (https://incsub.com)
|
5 |
* Licensed under GPL v2 (http://www.gnu.org/licenses/gpl-2.0.html)
|
6 |
*/
|
7 |
+
!function(e){"use strict";var i,n=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'];function o(e,t){this._show=this.show.bind(this),this._hide=this.hide.bind(this),this._maintainFocus=this._maintainFocus.bind(this),this._bindKeypress=this._bindKeypress.bind(this),this.node=e,this._listeners={},this.create(t)}function a(e){return Array.prototype.slice.call(e)}function l(e,t){return a((t||document).querySelectorAll(e))}function c(e){var t=u(e);t.length&&t[0].focus()}function u(e){return l(n.join(","),e).filter((function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}))}o.prototype.create=function(e){var t,i;return this._targets=this._targets||function(e){if(NodeList.prototype.isPrototypeOf(e))return a(e);if(Element.prototype.isPrototypeOf(e))return[e];if("string"==typeof e)return l(e)}(e)||(t=this.node,(i=a(t.parentNode.childNodes).filter((function(e){return 1===e.nodeType}))).splice(i.indexOf(t),1),i),this.node.setAttribute("aria-hidden",!0),this.shown=!1,this._openers=l('[data-a11y-dialog-show="'+this.node.id+'"]'),this._openers.forEach(function(e){e.addEventListener("click",this._show)}.bind(this)),this._closers=l("[data-a11y-dialog-hide]",this.node).concat(l('[data-a11y-dialog-hide="'+this.node.id+'"]')),this._closers.forEach(function(e){e.addEventListener("click",this._hide)}.bind(this)),this._fire("create"),this},o.prototype.show=function(e){var t=this.node.getElementsByClassName("sui-modal-content"),n=this.node.getElementsByClassName("sui-dialog-content");return this.shown||(this.node.classList.add("sui-fade-in"),this.node.classList.remove("sui-fade-out"),t.length&&(this.node.insertAdjacentHTML("afterbegin",'<div tabindex="0" class="sui-modal-empty sui-modal-overlay"></div>'),this.node.insertAdjacentHTML("beforeend",'<div tabindex="0" class="sui-modal-empty"></div>'),t[0].className="sui-modal-content sui-content-fade-in"),n.length&&(n[0].className="sui-dialog-content sui-content-fade-in"),this._fire("show",e),this.shown=!0,this.node.removeAttribute("aria-hidden"),this._targets.forEach((function(e){var t=e.getAttribute("aria-hidden");t&&e.setAttribute("data-a11y-dialog-original",t),e.setAttribute("aria-hidden","true")})),i=document.activeElement,c(this.node),document.body.addEventListener("focus",this._maintainFocus,!0),document.addEventListener("keydown",this._bindKeypress),document.getElementsByTagName("html")[0].classList.add("sui-has-overlay")),this},o.prototype.hide=function(e){var t=this.node.getElementsByClassName("sui-modal-content"),n=this.node.getElementsByClassName("sui-dialog-content"),o=this.node.getElementsByClassName("sui-modal-empty");if(!this.shown)return this;t.length&&(t[0].className="sui-modal-content sui-content-fade-out"),n.length&&(n[0].className="sui-dialog-content sui-content-fade-out"),this.node.classList.add("sui-fade-out"),this.node.classList.remove("sui-fade-in"),this._fire("hide",e),this.shown=!1;var r=this.node;return setTimeout((function(){if(r.setAttribute("aria-hidden","true"),t.length)for(;0!==o.length;)o[0].parentNode.removeChild(o[0])}),300),this._targets.forEach((function(e){var t=e.getAttribute("data-a11y-dialog-original");t?(e.setAttribute("aria-hidden",t),e.removeAttribute("data-a11y-dialog-original")):e.removeAttribute("aria-hidden")})),i&&i.focus(),document.body.removeEventListener("focus",this._maintainFocus,!0),document.removeEventListener("keydown",this._bindKeypress),document.getElementsByTagName("html")[0].classList.remove("sui-has-overlay"),this},o.prototype.destroy=function(){return this.hide(),this._openers.forEach(function(e){e.removeEventListener("click",this._show)}.bind(this)),this._closers.forEach(function(e){e.removeEventListener("click",this._hide)}.bind(this)),this._fire("destroy"),this._listeners={},this},o.prototype.on=function(e,t){return void 0===this._listeners[e]&&(this._listeners[e]=[]),this._listeners[e].push(t),this},o.prototype.off=function(e,t){var i=this._listeners[e].indexOf(t);return i>-1&&this._listeners[e].splice(i,1),this},o.prototype._fire=function(e,t){(this._listeners[e]||[]).forEach(function(e){e(this.node,t)}.bind(this))},o.prototype._bindKeypress=function(e){this.shown&&27===e.which&&(e.preventDefault(),this.hide()),this.shown&&9===e.which&&function(e,t){var i=u(e),n=i.indexOf(document.activeElement);t.shiftKey&&0===n?(i[i.length-1].focus(),t.preventDefault()):t.shiftKey||n!==i.length-1||(i[0].focus(),t.preventDefault())}(this.node,e)},o.prototype._maintainFocus=function(e){this.shown&&!this.node.contains(e.target)&&c(this.node)},void 0!==r.exports?r.exports=o:void 0===(s=function(){return o}.apply(t,[]))||(r.exports=s)}(void 0!==e||window),function(e){"use strict";var t={};function i(i,n){this.element=i,this.$element=e(this.element),this.settings=e.extend({},t,n),this._defaults=t,this._name="SUIAccordion",this.init()}e.extend(i.prototype,{init:function(){this.$element.on("click","div.sui-accordion-item-header, tr.sui-accordion-item",(function(t){var i=e(this).closest(".sui-accordion-item"),n=(i.nextUntil(".sui-accordion-item").filter(".sui-accordion-item-content"),i.closest(".sui-accordion"),i.find(".sui-chartjs-animated"),e(t.target)),o=e(this),r=o.parent(),s=r.find(".sui-chartjs-animated"),a=r.parent(),l=e(this),c=l.nextUntil(".sui-accordion-item").filter(".sui-accordion-item-content");if(n.closest(".sui-accordion-item-action").length)return!0;o.hasClass("sui-accordion-item-header")&&(r.hasClass("sui-accordion-item--disabled")||r.hasClass("sui-accordion-item--open")?r.removeClass("sui-accordion-item--open"):r.addClass("sui-accordion-item--open"),a.hasClass("sui-accordion-block")&&0!==s.length&&(r.find(".sui-accordion-item-data").addClass("sui-onload"),s.removeClass("sui-chartjs-loaded"),r.hasClass("sui-accordion-item--open")&&setTimeout((function(){r.find(".sui-accordion-item-data").removeClass("sui-onload"),s.addClass("sui-chartjs-loaded")}),1200))),l.hasClass("sui-accordion-item")&&(l.hasClass("sui-accordion-item--disabled")?c.removeClass("sui-accordion-item--open"):l.hasClass("sui-accordion-item--open")?(l.removeClass("sui-accordion-item--open"),c.removeClass("sui-accordion-item--open")):(l.addClass("sui-accordion-item--open"),c.addClass("sui-accordion-item--open"))),t.stopPropagation()}))}}),e.fn.SUIAccordion=function(t){return this.each((function(){e.data(this,"SUIAccordion")||e.data(this,"SUIAccordion",new i(this,t))}))}}(jQuery,window,document),function(e){"use strict";"object"!=typeof window.SUI&&(window.SUI={}),SUI.suiAccordion=function(t){return e(t).SUIAccordion({}),this},0!==e(".sui-2-5-0 .sui-accordion").length&&e(".sui-2-5-0 .sui-accordion").each((function(){SUI.suiAccordion(this)}))}(jQuery),
|
8 |
/*!
|
9 |
* clipboard.js v2.0.0
|
10 |
* https://zenorocha.github.io/clipboard.js
|
24 |
* Released under the MIT license
|
25 |
* http://jquery.org/license
|
26 |
*/
|
|