!function(t){function webpackJsonpCallback(r){for(var i,a,u=r[0],d=r[1],l=0,p=[];li?u=setTimeout(later,r-i):(u=null,o||(l=t.apply(p,d)),u||(d=p=null))},m=Object(i.default)((function(i){return p=this,d=i,c=Object(a.default)(),u||(u=setTimeout(later,r),o&&(l=t.apply(p,d))),l}));return m.cancel=function(){clearTimeout(u),u=d=p=null},m}},101:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return wrap}));var i=o(90);function wrap(t,r){return Object(i.default)(r,t)}},102:function(t,r,o){"use strict";function negate(t){return function(){return!t.apply(this,arguments)}}o.r(r),o.d(r,"default",(function(){return negate}))},103:function(t,r,o){"use strict";function compose(){var t=arguments,r=t.length-1;return function(){for(var o=r,i=t[r].apply(this,arguments);o--;)i=t[o].call(this,i);return i}}o.r(r),o.d(r,"default",(function(){return compose}))},104:function(t,r,o){"use strict";function after(t,r){return function(){if(--t<1)return r.apply(this,arguments)}}o.r(r),o.d(r,"default",(function(){return after}))},105:function(t,r,o){"use strict";function before(t,r){var o;return function(){return--t>0&&(o=r.apply(this,arguments)),t<=1&&(r=null),o}}o.r(r),o.d(r,"default",(function(){return before}))},106:function(t,r,o){"use strict";o.r(r);var i=o(90),a=o(105);r.default=Object(i.default)(a.default,2)},107:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return findKey}));var i=o(68),a=o(38);function findKey(t,r,o){r=Object(i.default)(r,o);for(var u,c=Object(a.default)(t),d=0,l=c.length;d0?0:c-1;d>=0&&d0?p=l>=0?l:Math.max(l+m,p):m=l>=0?Math.min(l+1,m):l+m+1;else if(o&&l&&m)return c[l=o(c,d)]===d?l:-1;if(d!=d)return(l=r(a.slice.call(c,p,m),u.default))>=0?l+p:-1;for(l=t>0?p:m-1;l>=0&&l0?0:l-1;for(c||(u=r[d?d[p]:p],p+=t);p>=0&&p=3;return reducer(t,Object(u.default)(r,i,4),o,a)}}},121:function(t,r,o){"use strict";o.r(r);var i=o(120);r.default=Object(i.default)(-1)},122:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return filter}));var i=o(68),a=o(117);function filter(t,r,o){var u=[];return r=Object(i.default)(r,o),Object(a.default)(t,(function(t,o,i){r(t,o,i)&&u.push(t)})),u}},123:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return reject}));var i=o(122),a=o(102),u=o(68);function reject(t,r,o){return Object(i.default)(t,Object(a.default)(Object(u.default)(r)),o)}},124:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return every}));var i=o(68),a=o(95),u=o(38);function every(t,r,o){r=Object(i.default)(r,o);for(var c=!Object(a.default)(t)&&Object(u.default)(t),d=(c||t).length,l=0;l=0}},127:function(t,r,o){"use strict";o.r(r);var i=o(7),a=o(22),u=o(118),c=o(65),d=o(63);r.default=Object(i.default)((function(t,r,o){var i,l;return Object(a.default)(r)?l=r:(r=Object(d.default)(r),i=r.slice(0,-1),r=r[r.length-1]),Object(u.default)(t,(function(t){var a=l;if(!a){if(i&&i.length&&(t=Object(c.default)(t,i)),null==t)return;a=t[r]}return null==a?a:a.apply(t,o)}))}))},128:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return pluck}));var i=o(118),a=o(72);function pluck(t,r){return Object(i.default)(t,Object(a.default)(r))}},129:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return where}));var i=o(122),a=o(71);function where(t,r){return Object(i.default)(t,Object(a.default)(r))}},13:function(t,r,o){"use strict";o.r(r);var i=o(14);r.default=Object(i.default)("String")},130:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return max}));var i=o(95),a=o(50),u=o(68),c=o(117);function max(t,r,o){var d,l,p=-1/0,m=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof t[0]&&null!=t)for(var h=0,w=(t=Object(i.default)(t)?t:Object(a.default)(t)).length;hp&&(p=d);else r=Object(u.default)(r,o),Object(c.default)(t,(function(t,o,i){((l=r(t,o,i))>m||l===-1/0&&p===-1/0)&&(p=t,m=l)}));return p}},131:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return min}));var i=o(95),a=o(50),u=o(68),c=o(117);function min(t,r,o){var d,l,p=1/0,m=1/0;if(null==r||"number"==typeof r&&"object"!=typeof t[0]&&null!=t)for(var h=0,w=(t=Object(i.default)(t)?t:Object(a.default)(t)).length;hi||void 0===o)return 1;if(o1&&(i=Object(u.default)(i,r[1])),r=Object(c.default)(t)):(i=d.default,r=Object(l.default)(r,!1,!1),t=Object(t));for(var p=0,m=r.length;p1&&(o=r[1])):(r=Object(c.default)(Object(d.default)(r,!1,!1),String),i=function(t,o){return!Object(l.default)(r,o)}),Object(p.default)(t,i,o)}))},145:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return first}));var i=o(146);function first(t,r,o){return null==t||t.length<1?null==r||o?void 0:[]:null==r||o?t[0]:Object(i.default)(t,t.length-r)}},146:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return initial}));var i=o(5);function initial(t,r,o){return i.slice.call(t,0,Math.max(0,t.length-(null==r||o?1:r)))}},147:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return last}));var i=o(148);function last(t,r,o){return null==t||t.length<1?null==r||o?void 0:[]:null==r||o?t[t.length-1]:Object(i.default)(t,Math.max(0,t.length-r))}},148:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return rest}));var i=o(5);function rest(t,r,o){return i.slice.call(t,null==r||o?1:r)}},149:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return compact}));var i=o(122);function compact(t){return Object(i.default)(t,Boolean)}},15:function(t,r,o){"use strict";o.r(r);var i=o(14);r.default=Object(i.default)("Number")},150:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return flatten}));var i=o(94);function flatten(t,r){return Object(i.default)(t,r,!1)}},151:function(t,r,o){"use strict";o.r(r);var i=o(7),a=o(152);r.default=Object(i.default)((function(t,r){return Object(a.default)(t,r)}))},152:function(t,r,o){"use strict";o.r(r);var i=o(7),a=o(94),u=o(122),c=o(126);r.default=Object(i.default)((function(t,r){return r=Object(a.default)(r,!0,!0),Object(u.default)(t,(function(t){return!Object(c.default)(r,t)}))}))},153:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return uniq}));var i=o(11),a=o(68),u=o(37),c=o(126);function uniq(t,r,o,d){Object(i.default)(r)||(d=o,o=r,r=!1),null!=o&&(o=Object(a.default)(o,d));for(var l=[],p=[],m=0,h=Object(u.default)(t);m=0&&o<=i.MAX_ARRAY_INDEX}}},34:function(t,r,o){"use strict";o.r(r);var i=o(35);r.default=Object(i.default)("byteLength")},35:function(t,r,o){"use strict";function shallowProperty(t){return function(r){return null==r?void 0:r[t]}}o.r(r),o.d(r,"default",(function(){return shallowProperty}))},36:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return isEmpty}));var i=o(37),a=o(25),u=o(13),c=o(26),d=o(38);function isEmpty(t){if(null==t)return!0;var r=Object(i.default)(t);return"number"==typeof r&&(Object(a.default)(t)||Object(u.default)(t)||Object(c.default)(t))?0===r:0===Object(i.default)(Object(d.default)(t))}},37:function(t,r,o){"use strict";o.r(r);var i=o(35);r.default=Object(i.default)("length")},38:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return keys}));var i=o(8),a=o(5),u=o(27),c=o(39);function keys(t){if(!Object(i.default)(t))return[];if(a.nativeKeys)return Object(a.nativeKeys)(t);var r=[];for(var o in t)Object(u.default)(t,o)&&r.push(o);return a.hasEnumBug&&Object(c.default)(t,r),r}},39:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return collectNonEnumProps}));var i=o(5),a=o(22),u=o(27);function collectNonEnumProps(t,r){r=function emulatedSet(t){for(var r={},o=t.length,i=0;i=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,c=!0,d=!1;return{s:function s(){o=t[Symbol.iterator]()},n:function n(){var t=o.next();return c=t.done,t},e:function e(t){d=!0,u=t},f:function f(){try{c||null==o.return||o.return()}finally{if(d)throw u}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var o=0,i=new Array(r);o2&&void 0!==arguments[2]&&arguments[2],a=r.split("."),u=_createForOfIteratorHelper(a);try{for(u.s();!(o=u.n()).done;){var c=o.value;if(!t)return i;t=t[c]}}catch(t){u.e(t)}finally{u.f()}return t||i},m=function openPowrzillaEditorWindow(t){window.name="".concat(t.app_id,"_parent");var r=t.templates_present&&!t.email_id?"/powrzilla/templates":"/powrzilla",o="app_id=".concat(t.app_id,"&email_type=").concat(t.email_type,"&host=").concat(t.host);t.email_id&&(o="".concat(o,"&id=").concat(t.email_id)),window.open("".concat(r,"?").concat(o))},h=function isInABTest(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"test_group_1",o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i="ACTIVE_AB_TESTS";if("ab_starter_removes_watermark"===t&&"formBuilder"!==META.app_namespace)return!1;var a=p(window,"GLOBALS.".concat(i,".").concat(t,".group"),null);return a&&o&&b(t),a===r},w=function isRolloutFeatureActive(t){return window.ROLLOUT_FEATURES?p(window,"ROLLOUT_FEATURES.".concat(t,".active"),!1):p(window,"GLOBALS.ROLLOUT_FEATURES.".concat(t,".active"),!1)},g=function getNumExposedLocalStorageKey(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=r.testName,i=r.userUniqueId,a=r.userId;return i?t="numExposed__ab_".concat(o,"__userUniqueId_").concat(i):a&&(t="numExposed__ab_".concat(o,"__userId_").concat(a)),t},v=function setNumExposedLocalStorage(t,r){t&&r&&window.setLocalStorage(t,r)},b=function markUserExposedToAb(t){window.XHR_REQUESTED=window.XHR_REQUESTED||[];var r="markUserExposedToAb_".concat(t);window.XHR_REQUESTED.includes(r)||(window.XHR_REQUESTED.push(r),function getNumExposed(t){var r,o=g({testName:t,userUniqueId:window.getCookie("unique_id"),userId:null===(r=window.CURRENT_USER)||void 0===r?void 0:r.id}),i=window.getLocalStorage(o);if(i)return i;var a=p(window,"GLOBALS.ACTIVE_AB_TESTS.".concat(t,".num_exposed"),null);if(a){var u=g({testName:t,userUniqueId:p(window,"GLOBALS.ACTIVE_AB_TESTS.".concat(t,".user_unique_id"),null),userId:p(window,"GLOBALS.ACTIVE_AB_TESTS.".concat(t,".user_id"),null)});return v(u,a),a}}(t)||window.ajaxController({url:"/users/exposed_to_ab",data:{ab_name:t},type:"PUT"},(function(r){if(r.success){var o=g({testName:t,userUniqueId:r.user_unique_id,userId:r.user_id});v(o,r.num_exposed)}})))},y=function isInFeatureGroup(t){return window.GLOBALS&&window.GLOBALS.FEATURE_GROUP&&window.GLOBALS.FEATURE_GROUP===t},O=function changePremiumStatus(t,r){return t.map((function(t){return(r[t.name]||r[t.value])&&(t.premium_status=r[t.name]),t}))};function hideZendesk(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;$(".zEWidget-launcher--active").length>0?$(".zEWidget-launcher--active").hide():setTimeout((function(){hideZendesk(t)}),t)}var T=function isPaymentApp(t){return["paypalButton","ecommerce"].includes(t)},S=function isFormOrPopup(t){return["formBuilder","popup"].includes(t)},E=function isProductReviews(t){return["productReviews"].includes(t)},A=function isComments(t){return["comments"].includes(t)},M=function isAppointment(t){return["appointments"].includes(t)},C=function isPlatformShopify(t){return"shopify"===(null==t?void 0:t.platform)},j=function isPlatformWix(t){return"wix"===(null==t?void 0:t.platform)},P=function isWix(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.CURRENT_USER;return j(t)||["wix","wix-oauth"].includes(window.HOST)||Object(u.isStandaloneWixEditor)()},D=function isWixOrShopify(t){return P(t)||C(t)},k=function isWixOauthAppType(t){return["popup","chat","nudge"].includes(t)},x=function showWixOveride(t){var r,o,i;return"wix"===(null===(r=window.CURRENT_USER)||void 0===r?void 0:r.provider)&&(null==(null===(o=window.CURRENT_USER)||void 0===o?void 0:o.platform)||"wix"===(null===(i=window.CURRENT_USER)||void 0===i?void 0:i.platform))&&!k(t)},I=function appTypeWithResponses(t){return["productReviews","formBuilder","popup","paypalButton","ecommerce","comments","appointments","hipaaForm"].includes(t)},U=function validateUrl(t){try{return new URL(t),!0}catch(t){return!1}},L=function a_or_an(t){return t?["a","e","i","o","u"].includes(t.charAt(0).toLowerCase())?"an ".concat(t):"a ".concat(t):""},N="/admin/review_urls/",R=function getP1AppTypes(){return["formBuilder","socialFeed","mediaGallery","popup","multiSlider","comments","countdownTimer","faq","paypalButton"]},B=function isP1App(t){return R().includes(t)},V=function getUserJourneyStepName(t){return["create_account","create_plugin","leave_review"][t]},W=function detectPromoBanner(){var t=document.getElementsByTagName("body")[0];return!!t&&_toConsumableArray(t.classList).includes("has-promo-banner")},H=function netElementLength(t){return t.filter((function(t){return"step"!==t.type})).length},z=function netAndFormElementsLength(t){return t.reduce((function(t,r){return["step","form"].includes(r.type)?"form"===r.type?t+r.data.filter((function(t){return"formButton"!==t.type})).length:t:t+1}),0)},q=function getWixOauthParam(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return K?"".concat(t?"?":"&","target=wix-dashboard"):""},G="J4NURA49NDK6Q",Y=function makeFreeForWixOauth(t){var r;return K&&"popup"!==(null===(r=META)||void 0===r?void 0:r.app_namespace)?"free":t},J=function makeFreeForShopify(t,r){return t&&Q(t)?"free":r},Q=function isShopifyFree(t){return"shopify"===t.external_id_type&&["promotionPopup","mailchimpEmailSignup"].includes(t.app_type)&&Date.parse(t.created_at)>Date.parse("2020-11-23T17:00:00")},K="wix-oauth"===window.HOST,X="platform"===window.PLATFORM_EMBED,Z=function isShareThis(t){return"sharethis"===(null==t?void 0:t.external_id_type)},ee=function isShareThisOnboarding(){var t,r;return(null===(t=window.getURLParameter("platform"))||void 0===t?void 0:t.includes("sharethis"))&&(null===(r=window.getURLParameter("redirect"))||void 0===r?void 0:r.includes("true"))},te=function makeLimitsForWixOauth(t){return K?{free:t.enterprise,premium:t.enterprise,pro:t.enterprise,enterprise:t.enterprise}:t},ne=function trackEvent(){},re=function round(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return Math.round((t+Number.EPSILON)*r)/r},oe=function range(t,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Array.from({length:Math.floor((r-t)/o)+1},(function(r,i){return i*o+t}))},ie=function getProfileProgress(){var t=0,r=0,o=[];return["email","business_type","first_name","last_name","phone","partner_name","company_size","purpose","platform","address_1","country","city","state","locale"].forEach((function(i){window.CURRENT_USER[i]?t++:o.push(i),r++})),{completeness:Math.round(t/r*100),missingInfo:o}},ae=function popupHasEmailInput(t){var r=(t||{}).content,o=(r||{}).data;if(!r||!o)return!1;var i="2"===r.version?"form":"email_input";return o&&!!o.find((function(t){return t.type===i}))},ue=function pageEmbedUrl(t,r){return"".concat(window.baseUri(),"/").concat(t,"/i/").concat(r,"#page")},ce=function isInUsageBasedV2Group(){return window.CURRENT_USER?!!window.CURRENT_USER["is_usage_based?"]:h("usage_based_pricing_v2","usage_based")},se=function isInUsageBasedV2App(){return window.META?window.META.premium_status?i.usagePlans.includes(window.META.premium_status):i.usagePlans.includes(window.PREMIUM_STATUS):ce()},de=function isFreePaypalButton(){if(window.META){var t=new Date(window.META.created_at)>new Date("2023-11-20T00:00:00");return!("paypalButton"!=window.META.app_namespace||!t||!["free","v_250","v_500"].includes(window.META.premium_status))}},le=function renderLogo(t){var r,i="/"===((null===(r=window.location)||void 0===r?void 0:r.pathname)||"")?{nodeID:"#js-powr-logo-home-page",props:{white:!0}}:{},a=i.nodeID,u=void 0===a?"#js-powr-logo":a,c=i.props,d=void 0===c?{}:c,l=document.querySelector(u);"#js-powr-logo"===u&&window.innerWidth<=768&&(d.small=!0),l&&Promise.all([o.e(51),o.e(47)]).then(function(r){var i=o(497),a=o(965).default,c=o(655).renderReactComponent;if(c(i.createElement(a,_objectSpread(_objectSpread({},d),t)),u),document.querySelector(".humanistic-logo")){var l=window.IS_LEAD_COLLECTION_FLOW?"/lead-collection/dashboard":"/";c(i.createElement(a,{url:l,white:!window.isMobile()&&"square"!=window.getURLQueryParam("provider")}),".humanistic-logo")}}.bind(null,o)).catch(o.oe)},fe=function renderChooseSiteOverlay(t,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=document.querySelector(i?".js-choose-site-container-publish":".js-choose-site-container");a&&(i&&(a.style.display="block"),Promise.all([o.e(44),o.e(49),o.e(55),o.e(53),o.e(54),o.e(51),o.e(57),o.e(61)]).then(function(a){var u=o(497),c=o(655).renderReactComponent,d=o(966).default;c(u.createElement(d,{sites:t.sites,defaultSiteId:0,onSuccess:function onSuccess(){return r()}}),i?".js-choose-site-container-publish":".js-choose-site-container")}.bind(null,o)).catch(o.oe))},pe=function slideMenuAnimate(){$(".js-slide-menu").on("click",(function(){$(".slide-menu-container").css({display:"block"}),$("body").css({overflow:"hidden",height:"100%"}),$(".slide-menu-container nav").animate({left:0},"fast"),$(".js-slide-menu-close").show(),$(".js-slide-menu").hide()})),$(".js-slide-menu-close").on("click",(function(){$(".slide-menu-container nav").animate({left:"-100%"},"fast",(function(){$(".slide-menu-container").css({display:"none"}),$("body").css({overflow:"auto",height:"initial"})})),$(".js-slide-menu").show(),$(".js-slide-menu-close").hide()}))},me="review_delay",he=15,we=function canShowReview(t,r){return t&&window.getCookie("".concat(me,"_").concat(r))!=he},ge=function calculateFixedButtonCss(t){var r,o,i=t.width,a=t.postCss,u=t.modelOffset,c=t.buttonLocation,d=t.displayMode,l=t.isStandalone,p="".concat(parseInt(u)*i/100,"px");if(l){var m=$(window).width()-400,h=$(window).height()-64,w=parseInt(u);r=400+w*m/100+"px",o=64+w*h/100+"px"}if("tab"==d)switch(a.display="table",c){case"right":a.top=l?o:u,a.right=0,a.transform="rotate(-90deg) translateY(-100%) translateX("+u+")",a.webkitTransform="rotate(-90deg) translateY(-100%) translateX("+u+")",a.transformOrigin="right top",a.webkitTransformOrigin="right top";break;case"left":l?(a.top=o,a.left="400px"):(a.top=u,a.left=0),a.transform="rotate(90deg) translateY(-100%) translateX(-"+u+")",a.webkitTransform="rotate(90deg) translateY(-100%) translateX(-"+u+")",a.transformOrigin="left top",a.webkitTransformOrigin="left top";break;case"bottom":a.left=l?r:u,a.bottom="0px",a.transform="translateX(-"+p+")",a.webkitTransform="translateX(-"+p+")"}else"floatingButton"==d&&(l?(a.left=r,a.height="60px"):a.left=u,a.bottom="20px",a.transform="translateX(-"+p+")",a.webkitTransform="translateX(-"+p+")")},ve=function scrollToAppTop(){if(window.Wix){var t=Wix.Utils.getCompId();window.Wix.navigateToComponent(t)}else{var r={messageType:"scrollTo",scrollTo:"app",url:window.location.href,scrollSpeed:12,ios:window.isIOS(),distance:window.APP_MODEL.attributes.locals.newHeight-window.APP_MODEL.attributes.locals.originalHeight};window.APP_MODEL.setLocals({postMessage:r})}},be=function isTruncated(t){return t.offsetWidth0&&void 0!==arguments[0]&&arguments[0];if(window.location.href.includes("wix_cached_view"))return window.META.wixSiteUrl;var o=Oe();return o.url?(t=decodeURIComponent(o.url),r&&(t=new URL(t).origin)):t=o.request_url?decodeURIComponent(o.request_url):Ie(window.origin)?window.PARENT_WINDOW_LOCATION:window.location.href,t},Se=function getGradientTypeAndDirection(t){switch(t){case"horizontal":return{type:"linear",direction:"to right"};case"diagonal_right":return{type:"linear",direction:"to bottom left"};case"diagonal_left":return{type:"linear",direction:"to bottom right"};case"radial":return{type:"radial",direction:"ellipse at center"};default:return{type:"linear",direction:"to bottom"}}},Ee=function isShopifyOverhaul2021(){return"shopify"===window.META.external_id_type&&new Date(window.META.created_at)>new Date(2021,6,3)||"true"==window.getURLParameter("show_countdown_cart")},Ae=function openHelpCenterLinkWithParams(){var t,r;return window.CURRENT_USER?window.open("http://help.powr.io/hc/en-us?platform=".concat(window.CURRENT_USER.platform,"&user_score=").concat(window.CURRENT_USER.user_display_score,"&user_id=").concat(window.CURRENT_USER.id,"&email=").concat(window.CURRENT_USER.email,"&premium_status=").concat(window.CURRENT_USER.user_has_active_pro_subscription,"&app=").concat(null===(t=window.META)||void 0===t?void 0:t.app_type,"&app_parent=").concat(null===(r=window.META)||void 0===r?void 0:r.app_namespace),"_blank"):window.open("http://help.powr.io/hc/en-us","_blank")},Me=function checkPowrOneAdCookie(){var t,r=window.getCookie("powr_one_ad");((null===(t=window.CURRENT_USER)||void 0===t?void 0:t.is_powr_one)||r&&Number(r)>=3)&&$(".powrone-ad-banner").addClass("hid")},Ce=function setPowrOneAdCookie(){var t=window.getCookie("powr_one_ad");if(t&&Number(t)<3){var r=Number(t)+1;window.setCookie("powr_one_ad",r.toString(),365)}else window.setCookie("powr_one_ad","1",365)},je=function isLocaleSupported(t){return["en","es","de","fr","pt","it","tr","nl","ru","ja","zh","hi"].includes(t)},Pe=function getPluginUrl(t,r){var o="".concat(t,"-website-app");switch(r){case"es":o="".concat(t,"-sitio-web-app");break;case"de":o="".concat(t,"-webseite-app");break;case"fr":o="".concat(t,"-application-du-site-web");break;case"pt":o="".concat(t,"-aplicativo-para-site");break;case"it":o="".concat(t,"-sito-web-app");break;case"tr":o="".concat(t,"-websitesi-uygulaması");break;case"nl":o="".concat(t,"-internetsite-app");break;case"ru":o="".concat(t,"-виджет-для-вашего-сайта");break;case"ja":o="".concat(t,"-ウェブサイトアプリ");break;case"zh":o="".concat(t,"-网站应用");break;case"hi":o="".concat(t,"-वेबसाइट-ऐप")}return o},De=function newDowngradeFlowAB(){if(window.CURRENT_USER)return h("new_downgrade_flow_ab","new_downgrade_flow",!0)},ke=function kebabize(t){return t.split("").map((function(t,r){return t.toUpperCase()===t?"".concat(0!==r?"-":"").concat(t.toLowerCase()):t})).join("")},xe=function hostUrl(t){var r,o,i=null;switch((null===(r=t.META)||void 0===r?void 0:r.env)?i=t.META.env:(null===(o=t.GLOBALS)||void 0===o?void 0:o.ENVIRONMENT)&&(i=t.GLOBALS.ENVIRONMENT),i){case"development":return"https://localhost:3000";case"staging":return"https://www.powr-staging.io";case"alpha":return"https://alpha.powr-staging.io";case"production":default:return"https://www.powr.io"}},Ie=function isScraperView(t){return t.includes("vcdn.")},$e=function getHostPrefix(t){return Ie(t.origin)?xe(t):""},Ue=function canUseLocalStorage(){try{return localStorage.setItem("__test__","test"),localStorage.removeItem("__test__"),!0}catch(t){return!1}},Le=function undoRedoAllowedApp(t){var r="production"==window.ENVIRONMENT?"general.undoRedoAllowedApp":"general.undoRedoAllowedAppStaging";return Object(a.simpleCopies)(r).split(",").map((function(t){return t.trim()})).includes(t)},Ne=function isEmailApp(){var t;return"email"===(null===(t=window.META)||void 0===t?void 0:t.app_namespace)}},472:function(t,r,o){"use strict";o.r(r);var i=o(473);window._||(window._=o(2)),window.POWr||(window.POWr={simpleCopies:i.simpleCopies,premiumStatusLabel:i.premiumStatusLabel,removeHTML:i.removeHTML,truncate:i.truncate,ABTestInitialization:i.ABTestInitialization,renderUserJourney:i.renderUserJourney,paypalRedirectUrl:i.paypalRedirectUrl})},473:function(t,r,o){"use strict";o.r(r),o.d(r,"simpleCopies",(function(){return i})),o.d(r,"premiumStatusLabel",(function(){return a})),o.d(r,"removeHTML",(function(){return u})),o.d(r,"truncate",(function(){return c})),o.d(r,"ABTestInitialization",(function(){return d})),o.d(r,"renderUserJourney",(function(){return l})),o.d(r,"paypalRedirectUrl",(function(){return p})),o.d(r,"imageMeta",(function(){return m})),o.d(r,"getSimpleCopy",(function(){return h}));var i=function simpleCopies(t,r){if(window.getURLParameter&&"true"==window.getURLParameter("copy_helper"))return t;var o;if(!window.SIMPLE_COPIES_DICTIONARY&&$("#simple_copies_dictionary").length){var i=$("#simple_copies_dictionary").html();o=JSON.parse(i)[t]}else o=window.SIMPLE_COPIES_DICTIONARY[t];return o?(_.each(r,(function(t,r){o=o.replace(new RegExp("{"+r+"}","g"),t)})),o):t},a={enterprise:"Business",pro:"Pro",premium:"Starter",free:"Free",custom:"Custom",v_2500:"2500 Views",v_5000:"5000 Views",hipaa_form_starter:"HIPAA Form Starter",hipaa_form_pro:"HIPAA Form Pro",hipaa_form_business:"HIPAA Form Business",hipaa_form_custom:"HIPAA Form Custom"},u=function removeHTML(t){var r=document.createElement("div");return r.innerHTML=t,r.textContent},c=function truncate(t,r){return t.length>r?t.substring(0,r-3)+"...":t},d=function ABTestInitialization(t){t||(t={ACTIVE_AB_TESTS:{}});var r=window.opener&&window.opener.GLOBALS?window.opener.GLOBALS:null;return r&&Object.keys(r.ACTIVE_AB_TESTS).forEach((function(o){t.ACTIVE_AB_TESTS[o]=r.ACTIVE_AB_TESTS[o]})),window.GLOBALS=t,t},l=function renderUserJourney(){Promise.all([o.e(44),o.e(43),o.e(53),o.e(62),o.e(45)]).then(function(t){o(967)}.bind(null,o)).catch(o.oe)},p=function paypalRedirectUrl(t){return"wix"===window.HOST?window.baseUri()+"/paramless-mirror/"+encodeURIComponent(window.urlFormat(t)):window.urlFormat(t)},m=function imageMeta(t){return new Promise((function(r,o){var i=new Image;i.onload=function(){return r(i)},i.onerror=function(t){return o(t)},i.src=t}))},h=function getSimpleCopy(t){var r=t.key,o=t.secondaryKey,a=t.fallbackKey,u=t.copyVariable,c=void 0===u?{}:u,d=i(r,c);return d!==r?d:o&&(d=i(o,c))!==o?d:a?d=i(a,c):d}},474:function(t,r,o){"use strict";o.r(r),o.d(r,"plans",(function(){return a})),o.d(r,"usagePlans",(function(){return u})),o.d(r,"getNextUpgradeStatus",(function(){return d}));var i=o(471),a=["free","premium","pro","enterprise","hipaa_form_starter","hipaa_form_pro","hipaa_form_business","hipaa_form_custom"],u=["v_250","v_500","v_2500","v_5000","v_10000","v_25000","v_50000","custom"],c={isUpgradeRequired:function isUpgradeRequired(t,r){return Object(i.isInUsageBasedV2App)()?!!u.includes(r)&&u.indexOf(t)0&&void 0!==arguments[0]&&arguments[0];t&&window.setCookie("openWixStandalone",new Date,1);var r=window.META.app_slug,o="".concat(Object(i.hostUrl)(window),"/plugins/").concat(r,"/standalone?id=").concat(window.META.id,"&wix_standalone=true");Wix.Settings.openModal(o,"90%","90%","POWr ".concat(Object(a.getAppNameFromSlug)(r)),(function(){window.document.location.reload()}))},l=function getPlatformFromEmbedLink(){var t,r,o=window.location.hash;if(o||(o=window.location.search),o||(o=window.location.href),!o)return"";var i=decodeURIComponent(o);return(null===(t=i.match(/platform=([^&]+)/))||void 0===t?void 0:t[1])||(null===(r=i.match(/external_type=([^&]+)/))||void 0===r?void 0:r[1])||""}},476:function(t,r,o){"use strict";o.r(r),o.d(r,"getAppNameFromSlug",(function(){return i})),o.d(r,"firstLetterCapitalized",(function(){return u})),o.d(r,"kebabCase",(function(){return c})),o.d(r,"snakeCase",(function(){return d})),o.d(r,"camelCase",(function(){return l})),o.d(r,"smashedString",(function(){return p})),o.d(r,"humanizedCase",(function(){return m})),o.d(r,"startCase",(function(){return h})),o.d(r,"ensureValidUrl",(function(){return ensureValidUrl}));var i=function getAppNameFromSlug(t){return t&&t.includes("-")?t.split("-").map((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join(" "):t},a=function getParsedString(t){var r=t.string,o=t.separator;return"string"==typeof r&&r.length>0&&"string"==typeof o?r.replace(/([a-z])([A-Z])/g,"$1".concat(o,"$2")).replace(/[\s_-]+/g,o).toLowerCase():null},u=function firstLetterCapitalized(t){return t.charAt(0).toUpperCase()+t.slice(1)},c=function kebabCase(t){return a({string:t,separator:"-"})},d=function snakeCase(t){var snakeCase=a({string:t,separator:"_"});return snakeCase},l=function camelCase(t){var r=a({string:t,separator:" "});return null==r?void 0:r.split(" ").map((function(t,r){return 0===r?t:u(t)})).join("")},p=function smashedString(t){return a({string:t,separator:""})},m=function humanizedCase(t){var r=(t=l(t)).replace(/([A-Z])/g," $1");return r.charAt(0).toUpperCase()+r.slice(1)},h=function startCase(t){return t?t.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[_\-\s]+/g," ").trim().toLowerCase().replace(/\b\w/g,(function(t){return t.toUpperCase()})):t};function ensureValidUrl(t){/^https?:\/\//i.test(t)||(t="https://"+t);try{var r=new URL(t);return"".concat(r.protocol,"//").concat(r.host)}catch(t){return null}}},48:function(t,r,o){"use strict";o.r(r);var i=o(14),a=o(23),u=o(45);r.default=a.isIE11?Object(u.ie11fingerprint)(u.setMethods):Object(i.default)("Set")},49:function(t,r,o){"use strict";o.r(r);var i=o(14);r.default=Object(i.default)("WeakSet")},5:function(t,r,o){"use strict";o.r(r),function(t){o.d(r,"VERSION",(function(){return i})),o.d(r,"root",(function(){return a})),o.d(r,"ArrayProto",(function(){return u})),o.d(r,"ObjProto",(function(){return c})),o.d(r,"SymbolProto",(function(){return d})),o.d(r,"push",(function(){return l})),o.d(r,"slice",(function(){return p})),o.d(r,"toString",(function(){return m})),o.d(r,"hasOwnProperty",(function(){return h})),o.d(r,"supportsArrayBuffer",(function(){return w})),o.d(r,"supportsDataView",(function(){return g})),o.d(r,"nativeIsArray",(function(){return v})),o.d(r,"nativeKeys",(function(){return b})),o.d(r,"nativeCreate",(function(){return y})),o.d(r,"nativeIsView",(function(){return O})),o.d(r,"_isNaN",(function(){return T})),o.d(r,"_isFinite",(function(){return S})),o.d(r,"hasEnumBug",(function(){return E})),o.d(r,"nonEnumerableProps",(function(){return A})),o.d(r,"MAX_ARRAY_INDEX",(function(){return M}));var i="1.13.6",a="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||Function("return this")()||{},u=Array.prototype,c=Object.prototype,d="undefined"!=typeof Symbol?Symbol.prototype:null,l=u.push,p=u.slice,m=c.toString,h=c.hasOwnProperty,w="undefined"!=typeof ArrayBuffer,g="undefined"!=typeof DataView,v=Array.isArray,b=Object.keys,y=Object.create,O=w&&ArrayBuffer.isView,T=isNaN,S=isFinite,E=!{toString:null}.propertyIsEnumerable("toString"),A=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],M=Math.pow(2,53)-1}.call(this,o(6))},50:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return values}));var i=o(38);function values(t){for(var r=Object(i.default)(t),o=r.length,a=Array(o),u=0;u3?0:(h%100-h%10!=10)*h%10]),_defineProperty(d,"W",S),_defineProperty(d,"N",E),d);return o.replace(t,(function(t){return t in A?A[t]:t.slice(1,t.length-1)}))}}dateFormat.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},dateFormat.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"]},r.exports=dateFormat()},{"./offsetFix.js":7,"./ordinalSuffix.js":8}],5:[function(t,r,o){var i=function(){Date.parse;var t=[1,4,5,6,7,10,11];return function(r){var o,i,a=0;if(!(i=/^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec(r)))return console.warn("Bad date object passed",r),new Date;for(var u,c=0;u=t[c];++c)i[u]=+i[u]||0;return i[2]=(+i[2]||1)-1,i[3]=+i[3]||1,"Z"!==i[8]&&void 0!==i[9]&&(a=60*i[10]+i[11],"+"===i[9]&&(a=0-a)),o=Date.UTC(i[1],i[2],i[3],i[4],i[5]+a,i[6],i[7]),new Date(o)}}();r.exports=i},{}],6:[function(t,r,o){var i=t("./format.js"),a=t("./fromISOString.js"),u=t("./arbitrator.js"),c=t("./changeDate.js"),d=t("./offsetFix.js");function typeDetect(t){var r="string"==typeof t?TYPE.STRING:null,o="[object Date]"===Object.prototype.toString.call(t)?TYPE.DATE:null;"function"==typeof(t="object"===_typeof(t)?TYPE.OBJECT:null)&&t._isAMomentObject&&TYPE.MOMENT;return[r,o,t,"function"==typeof t?TYPE.FUNCTION:null].reduce((function(t,r){return t||r}))}function isPresent(t){return null!=t||!!t}TYPE={STRING:"STRING",DATE:"DATE",OBJECT:"OBJECT",MOMENT:"MOMENT",FUNCTION:"FUNCTION"};r.exports=function momentlte(t){var r;switch(typeDetect(t)){case TYPE.STRING:r=a(t);break;case TYPE.DATE:r=new Date(t);break;case TYPE.OBJECT:r=new Date(t.year,t.month,t.date,t.hours,t.minutes,t.seconds,t.milliseconds);break;case TYPE.MOMENT:r=new Date(t._d);break;case TYPE.NUMBER:throw"We dont support numbers.";default:r=new Date}var o=function _response(t){var o=typeDetect(t);if(o===TYPE.DATE)r=t;else{if(o===TYPE.OBJECT)return Object.keys(t).forEach((function(r,o,i){_response[r](t[r])})),_response;r=new Date}return _response};return o._d=r,o._isAMomentObject=!0,o.every=function(t,r,o){return u(o,1e3*t)},o.add=function(t,i){return r=c(r,t,i),o._d=r,o},o.minus=function(t,r){return o.add(-1*t,r)},o.toLocaleISOString=function(){var t=i(r,"YYYY-MM-DDTHH:mm:ss",!0),o=r.getTimezoneOffset();return t+d(o)},o.toISOString=function(){return o.format("yyyy-MM-DDTHH:mm:ssZ")},o.format=function(t,o){return i(r,t,o)},o.valueOf=function(){return+r},o.get=o.set=function(t,r){return typeDetect(t)===TYPE.OBJECT?(Object.keys(t).forEach((function(r){o.set(r,t[r])})),o):isPresent(r)?o[t](r):o[t]()},o.year=o.years=function(t,i){var a=isPresent(t),u=(a?"set":"get")+(i?"":"UTC")+"FullYear";return a?(r[u](t),o):r[u]()},o.month=o.months=function(t,i){var a=isPresent(t),u=(a?"set":"get")+(i?"":"UTC")+"Month";return a?(r[u](t),o):r[u]()},o.date=o.dates=function(t,i){var a=isPresent(t),u=(a?"set":"get")+(i?"":"UTC")+"Date";return a?(r[u](t),o):r[u]()},o.hour=o.hours=function(t,i){var a=isPresent(t),u=(a?"set":"get")+(i?"":"UTC")+"Hours";return a?(r[u](t),o):r[u]()},o.minute=o.minutes=function(t,i){var a=isPresent(t),u=(a?"set":"get")+(i?"":"UTC")+"Minutes";return a?(r[u](t),o):r[u]()},o.second=o.seconds=function(t,i){var a=isPresent(t),u=(a?"set":"get")+(i?"":"UTC")+"Seconds";return a?(r[u](t),o):r[u]()},o.millisecond=o.milliseconds=function(t,i){var a=isPresent(t),u=(a?"set":"get")+(i?"":"UTC")+"Milliseconds";return a?(r[u](t),o):r[u]()},o.localYear=o.localYears=function(){return r.getFullYear()},o.localMonth=o.localMonths=function(){return r.getMonth()},o.localDate=o.localDates=function(){return r.getDate()},o.localHour=o.localHours=function(){return r.getHours()},o.localMinute=o.localMinutes=function(){return r.getMinutes()},o.localSecond=o.localSeconds=function(){return r.getSeconds()},o.localMillisecond=o.localMilliseconds=function(){return r.getMilliseconds()},o}},{"./arbitrator.js":1,"./changeDate.js":2,"./format.js":4,"./fromISOString.js":5,"./offsetFix.js":7}],7:[function(t,r,o){r.exports=function offsetFix(t){if(!(t=parseInt(t)))return"+00:00";function pad(t){return(t=t<0?-1*t:t)<10?"0"+t:t}var r=t<0,o=(t=r?-1*t:t)%60;return(r?"+":"-")+(pad(Math.floor(t/60))+":"+pad(o))}},{}],8:[function(t,r,o){r.exports=function getOrdinal(t){var r=["th","st","nd","rd"],o=t%100;return t+(r[(o-20)%10]||r[o]||r[0])}},{}]},{},[3])},53:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return functions}));var i=o(22);function functions(t){var r=[];for(var o in t)Object(i.default)(t[o])&&r.push(o);return r.sort()}},54:function(t,r,o){"use strict";o.r(r);var i=o(55),a=o(46);r.default=Object(i.default)(a.default)},55:function(t,r,o){"use strict";function createAssigner(t,r){return function(o){var i=arguments.length;if(r&&(o=Object(o)),i<2||null==o)return o;for(var a=1;a":">",'"':""","'":"'","`":"`"}},83:function(t,r,o){"use strict";o.r(r);var i=o(81),a=o(84);r.default=Object(i.default)(a.default)},84:function(t,r,o){"use strict";o.r(r);var i=o(52),a=o(82);r.default=Object(i.default)(a.default)},85:function(t,r,o){"use strict";o.r(r);var i=o(42);r.default=i.default.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g}},86:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return template}));var i=o(57),a=o(42),u=(o(85),/(.)^/),c={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},d=/\\|'|\r|\n|\u2028|\u2029/g;function escapeChar(t){return"\\"+c[t]}var l=/^\s*(\w|\$)+\s*$/;function template(t,r,o){!r&&o&&(r=o),r=Object(i.default)({},r,a.default.templateSettings);var c=RegExp([(r.escape||u).source,(r.interpolate||u).source,(r.evaluate||u).source].join("|")+"|$","g"),p=0,m="__p+='";t.replace(c,(function(r,o,i,a,u){return m+=t.slice(p,u).replace(d,escapeChar),p=u+r.length,o?m+="'+\n((__t=("+o+"))==null?'':_.escape(__t))+\n'":i?m+="'+\n((__t=("+i+"))==null?'':__t)+\n'":a&&(m+="';\n"+a+"\n__p+='"),r})),m+="';\n";var h,w=r.variable;if(w){if(!l.test(w))throw new Error("variable is not a bare identifier: "+w)}else m="with(obj||{}){\n"+m+"}\n",w="obj";m="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+m+"return __p;\n";try{h=new Function(w,"_",m)}catch(t){throw t.source=m,t}var template=function(t){return h.call(this,t,a.default)};return template.source="function("+w+"){\n"+m+"}",template}},866:function(t,r,o){"use strict";o.r(r),o.d(r,"renderGoogleTagManager",(function(){return u})),o.d(r,"sendSubmissionEventToGoogleTagManager",(function(){return c}));var i=o(476);function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);"Object"===o&&t.constructor&&(o=t.constructor.name);if("Map"===o||"Set"===o)return Array.from(t);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return _arrayLikeToArray(t,r)}(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var o=0,i=new Array(r);oi.push(a)||(o.code.length9&&u>0,!0}if(isHostMethod(r,"addEventListener"))m=function(t,r,o){t.addEventListener(r,o,!1)},h=function(t,r,o){t.removeEventListener(r,o,!1)};else{if(!isHostMethod(r,"attachEvent"))throw new Error("Browser not supported");m=function(t,r,o){t.attachEvent("on"+r,o)},h=function(t,r,o){t.detachEvent("on"+r,o)}}var C,j=!1,P=[];function dom_onReady(){if(!j){j=!0;for(var t=0;t'):(r=o.createElement("IFRAME")).name=t.props.name,r.id=r.name=t.props.name,delete t.props.name,"string"==typeof t.container&&(t.container=o.getElementById(t.container)),t.container||(apply(r.style,{position:"absolute",top:"-2000px",left:"0px"}),t.container=o.body);var i=t.props.src;if(t.props.src="javascript:false",apply(r,t.props),r.border=r.frameBorder=0,r.allowTransparency=!0,t.container.appendChild(r),t.onLoad&&m(r,"load",t.onLoad),t.usePost){var a,u=t.container.appendChild(o.createElement("form"));if(u.target=r.name,u.action=i,u.method="POST","object"==typeof t.usePost)for(var c in t.usePost)t.usePost.hasOwnProperty(c)&&(d?a=o.createElement(''):(a=o.createElement("INPUT")).name=c,a.value=t.usePost[c],u.appendChild(a));u.submit(),u.parentNode.removeChild(u)}else r.src=i;return t.props.src=i,r}function prepareTransportStack(t){var a,u=t.protocol;if(t.isHost=t.isHost||undef(D.xdm_p),M=t.hash||!1,t.props||(t.props={}),t.isHost)t.remote=resolveUrl(t.remote),t.channel=t.channel||"default"+g++,t.secret=Math.random().toString(16).substring(2),undef(u)&&(u=getLocation(i.href)==getLocation(t.remote)?"4":isHostMethod(r,"postMessage")||isHostMethod(o,"postMessage")?"1":t.swf&&isHostMethod(r,"ActiveXObject")&&hasFlash()?"6":"Gecko"===navigator.product&&"frameElement"in r&&-1==navigator.userAgent.indexOf("WebKit")?"5":t.remoteHelper?"2":"0");else if(t.channel=D.xdm_c.replace(/["'<>\\]/g,""),t.secret=D.xdm_s,t.remote=D.xdm_e.replace(/["'<>\\]/g,""),u=D.xdm_p,t.acl&&!function checkAcl(t,r){"string"==typeof t&&(t=[t]);for(var o,i=t.length;i--;)if(o=t[i],(o=new RegExp("^"==o.substr(0,1)?o:"^"+o.replace(/(\*)/g,".$1").replace(/\?/g,".")+"$")).test(r))return!0;return!1}(t.acl,t.remote))throw new Error("Access denied for "+t.remote);switch(t.protocol=u,u){case"0":if(apply(t,{interval:100,delay:2e3,useResize:!0,useParent:!1,usePolling:!1},!0),t.isHost){if(!t.local){for(var c,d=i.protocol+"//"+i.host,p=o.body.getElementsByTagName("img"),m=p.length;m--;)if((c=p[m]).src.substring(0,d.length)===d){t.local=c.src;break}t.local||(t.local=r)}var h={xdm_c:t.channel,xdm_p:0};t.local===r?(t.usePolling=!0,t.useParent=!0,t.local=i.protocol+"//"+i.host+i.pathname+i.search,h.xdm_e=t.local,h.xdm_pa=1):h.xdm_e=resolveUrl(t.local),t.container&&(t.useResize=!1,h.xdm_po=1),t.remote=appendQueryParameters(t.remote,h)}else apply(t,{channel:D.xdm_c,remote:D.xdm_e,useParent:!undef(D.xdm_pa),usePolling:!undef(D.xdm_po),useResize:!t.useParent&&t.useResize});a=[new S.stack.HashTransport(t),new S.stack.ReliableBehavior({}),new S.stack.QueueBehavior({encode:!0,maxLength:4e3-t.remote.length}),new S.stack.VerifyBehavior({initiate:t.isHost})];break;case"1":a=[new S.stack.PostMessageTransport(t)];break;case"2":t.isHost&&(t.remoteHelper=resolveUrl(t.remoteHelper)),a=[new S.stack.NameTransport(t),new S.stack.QueueBehavior,new S.stack.VerifyBehavior({initiate:t.isHost})];break;case"3":a=[new S.stack.NixTransport(t)];break;case"4":a=[new S.stack.SameOriginTransport(t)];break;case"5":a=[new S.stack.FrameElementTransport(t)];break;case"6":l||hasFlash(),a=[new S.stack.FlashTransport(t)]}return a.push(new S.stack.QueueBehavior({lazy:t.lazy,remove:!0})),a}function chainStack(t){for(var r,o={incoming:function(t,r){this.up.incoming(t,r)},outgoing:function(t,r){this.down.outgoing(t,r)},callback:function(t){this.up.callback(t)},init:function(){this.down.init()},destroy:function(){this.down.destroy()}},i=0,a=t.length;i<\/script>')}},k={},S.Fn={set:function(t,r){k[t]=r},get:function(t,r){if(k.hasOwnProperty(t)){var o=k[t];return r&&delete k[t],o}}},S.Socket=function(t){var r=chainStack(prepareTransportStack(t).concat([{incoming:function(r,o){t.onMessage(r,o)},callback:function(r){t.onReady&&t.onReady(r)}}])),o=getLocation(t.remote);this.origin=getLocation(t.remote),this.destroy=function(){r.destroy()},this.postMessage=function(t){r.outgoing(t,o)},r.init()},S.Rpc=function(t,r){if(r.local)for(var o in r.local)if(r.local.hasOwnProperty(o)){var i=r.local[o];"function"==typeof i&&(r.local[o]={method:i})}var a=chainStack(prepareTransportStack(t).concat([new S.stack.RpcBehavior(this,r),{callback:function(r){t.onReady&&t.onReady(r)}}]));this.origin=getLocation(t.remote),this.destroy=function(){a.destroy()},a.init()},S.stack.SameOriginTransport=function(t){var r,o,u,c;return r={outgoing:function(t,r,o){u(t),o&&o()},destroy:function(){o&&(o.parentNode.removeChild(o),o=null)},onDOMReady:function(){c=getLocation(t.remote),t.isHost?(apply(t.props,{src:appendQueryParameters(t.remote,{xdm_e:i.protocol+"//"+i.host+i.pathname,xdm_c:t.channel,xdm_p:4}),name:A+t.channel+"_provider"}),o=createFrame(t),S.Fn.set(t.channel,(function(t){return u=t,a((function(){r.up.callback(!0)}),0),function(t){r.up.incoming(t,c)}}))):(u=function getParentObject(){var t=parent;if(""!==T)for(var r=0,o=T.split(".");r"}return r={outgoing:function(r,o,i){l.postMessage(t.channel,r.toString()),i&&i()},destroy:function(){try{l.destroyChannel(t.channel)}catch(t){}l=null,u&&(u.parentNode.removeChild(u),u=null)},onDOMReady:function(){d=t.remote,S.Fn.set("flash_"+t.channel+"_init",(function(){a((function(){r.up.callback(!0)}))})),S.Fn.set("flash_"+t.channel+"_onMessage",onMessage),t.swf=resolveUrl(t.swf);var o=getDomainName(t.swf),fn=function(){S.stack.FlashTransport[o].init=!0,(l=S.stack.FlashTransport[o].swf).createChannel(t.channel,t.secret,getLocation(t.remote),t.isHost),t.isHost&&(p&&t.swfNoThrottle&&apply(t.props,{position:"fixed",right:0,top:0,height:"20px",width:"20px"}),apply(t.props,{src:appendQueryParameters(t.remote,{xdm_e:getLocation(i.href),xdm_c:t.channel,xdm_p:6,xdm_s:t.secret}),name:A+t.channel+"_provider"}),u=createFrame(t))};S.stack.FlashTransport[o]&&S.stack.FlashTransport[o].init?fn():S.stack.FlashTransport[o]?S.stack.FlashTransport[o].queue.push(fn):(S.stack.FlashTransport[o]={queue:[fn]},addSwf(o))},init:function(){whenReady(r.onDOMReady,r)}}},S.stack.PostMessageTransport=function(t){var o,u,c,d;function _window_onMessage(r){var a=function _getOrigin(t){if(t.origin)return getLocation(t.origin);if(t.uri)return getLocation(t.uri);if(t.domain)return i.protocol+"//"+t.domain;throw"Unable to retrieve the origin of the event"}(r);a==d&&r.data.substring(0,t.channel.length+1)==t.channel+" "&&o.up.incoming(r.data.substring(t.channel.length+1),a)}return o={outgoing:function(r,o,i){c.postMessage(t.channel+" "+r,o||d),i&&i()},destroy:function(){h(r,"message",_window_onMessage),u&&(c=null,u.parentNode.removeChild(u),u=null)},onDOMReady:function(){if(d=getLocation(t.remote),t.isHost){var waitForReady=function(i){i.data==t.channel+"-ready"&&(c="postMessage"in u.contentWindow?u.contentWindow:u.contentWindow.document,h(r,"message",waitForReady),m(r,"message",_window_onMessage),a((function(){o.up.callback(!0)}),0))};m(r,"message",waitForReady),apply(t.props,{src:appendQueryParameters(t.remote,{xdm_e:getLocation(i.href),xdm_c:t.channel,xdm_p:1}),name:A+t.channel+"_provider"}),u=createFrame(t)}else m(r,"message",_window_onMessage),(c="postMessage"in r.parent?r.parent:r.parent.document).postMessage(t.channel+"-ready",d),a((function(){o.up.callback(!0)}),0)},init:function(){whenReady(o.onDOMReady,o)}}},S.stack.FrameElementTransport=function(t){var u,c,d,l;return u={outgoing:function(t,r,o){d.call(this,t),o&&o()},destroy:function(){c&&(c.parentNode.removeChild(c),c=null)},onDOMReady:function(){l=getLocation(t.remote),t.isHost?(apply(t.props,{src:appendQueryParameters(t.remote,{xdm_e:getLocation(i.href),xdm_c:t.channel,xdm_p:5}),name:A+t.channel+"_provider"}),(c=createFrame(t)).fn=function(t){return delete c.fn,d=t,a((function(){u.up.callback(!0)}),0),function(t){u.up.incoming(t,l)}}):(o.referrer&&getLocation(o.referrer)!=D.xdm_e&&(r.top.location=D.xdm_e),d=r.frameElement.fn((function(t){u.up.incoming(t,l)})),u.up.callback(!0))},init:function(){whenReady(u.onDOMReady,u)}}},S.stack.NameTransport=function(t){var r,o,i,u,c,d,l,p;function _sendMessage(r){var a=t.remoteHelper+(o?"#_3":"#_2")+t.channel;i.contentWindow.sendMessage(r,a)}function _onReady(){o?2!=++c&&o||r.up.callback(!0):(_sendMessage("ready"),r.up.callback(!0))}function _onMessage(t){r.up.incoming(t,l)}function _onLoad(){d&&a((function(){d(!0)}),0)}return r={outgoing:function(t,r,o){d=o,_sendMessage(t)},destroy:function(){i.parentNode.removeChild(i),i=null,o&&(u.parentNode.removeChild(u),u=null)},onDOMReady:function(){o=t.isHost,c=0,l=getLocation(t.remote),t.local=resolveUrl(t.local),o?(S.Fn.set(t.channel,(function(r){o&&"ready"===r&&(S.Fn.set(t.channel,_onMessage),_onReady())})),p=appendQueryParameters(t.remote,{xdm_e:t.local,xdm_c:t.channel,xdm_p:2}),apply(t.props,{src:p+"#"+t.channel,name:A+t.channel+"_provider"}),u=createFrame(t)):(t.remoteHelper=t.remote,S.Fn.set(t.channel,_onMessage));var onLoad=function(){var r=i||this;h(r,"load",onLoad),S.Fn.set(t.channel+"_load",_onLoad),function test(){"function"==typeof r.contentWindow.sendMessage?_onReady():a(test,50)}()};i=createFrame({props:{src:t.local+"#_4"+t.channel},onLoad:onLoad})},init:function(){whenReady(r.onDOMReady,r)}}},S.stack.HashTransport=function(t){var o,i,u,c,d,l,p,m,h,w;function _pollHash(){if(p){var t=p.location.href,r="",i=t.indexOf("#");-1!=i&&(r=t.substring(i)),r&&r!=d&&function _handleHash(t){d=t,o.up.incoming(d.substring(d.indexOf("_")+1),w)}(r)}}function _attachListeners(){u=setInterval(_pollHash,c)}return o={outgoing:function(r,o){!function _sendMessage(r){if(m){var o=t.remote+"#"+l+++"_"+r;(i||!h?m.contentWindow:m).location=o}}(r)},destroy:function(){r.clearInterval(u),!i&&h||m.parentNode.removeChild(m),m=null},onDOMReady:function(){if(i=t.isHost,c=t.interval,d="#"+t.channel,l=0,h=t.useParent,w=getLocation(t.remote),i){if(apply(t.props,{src:t.remote,name:A+t.channel+"_provider"}),h)t.onLoad=function(){p=r,_attachListeners(),o.up.callback(!0)};else{var u=0,g=t.delay/50;!function getRef(){if(++u>g)throw new Error("Unable to reference listenerwindow");try{p=m.contentWindow.frames[A+t.channel+"_consumer"]}catch(t){}p?(_attachListeners(),o.up.callback(!0)):a(getRef,50)}()}m=createFrame(t)}else p=r,_attachListeners(),h?(m=parent,o.up.callback(!0)):(apply(t,{props:{src:t.remote+"#"+t.channel+new Date,name:A+t.channel+"_consumer"},onLoad:function(){o.up.callback(!0)}}),m=createFrame(t))},init:function(){whenReady(o.onDOMReady,o)}}},S.stack.ReliableBehavior=function(t){var r,o,i=0,a=0,u="";return r={incoming:function(t,c){var d=t.indexOf("_"),l=t.substring(0,d).split(",");t=t.substring(d+1),l[0]==i&&(u="",o&&o(!0)),t.length>0&&(r.down.outgoing(l[1]+","+i+"_"+u,c),a!=l[1]&&(a=l[1],r.up.incoming(t,c)))},outgoing:function(t,c,d){u=t,o=d,r.down.outgoing(a+","+ ++i+"_"+t,c)}}},S.stack.QueueBehavior=function(t){var r,o,i=[],d=!0,l="",p=0,m=!1,h=!1;function dispatch(){if(t.remove&&0===i.length)(function removeFromStack(t){t.up.down=t.down,t.down.up=t.up,t.up=t.down=null})(r);else if(!d&&0!==i.length&&!o){d=!0;var u=i.shift();r.down.outgoing(u.data,u.origin,(function(t){d=!1,u.callback&&a((function(){u.callback(t)}),0),dispatch()}))}}return r={init:function(){undef(t)&&(t={}),t.maxLength&&(p=t.maxLength,h=!0),t.lazy?m=!0:r.down.init()},callback:function(t){d=!1;var o=r.up;dispatch(),o.callback(t)},incoming:function(o,i){if(h){var a=o.indexOf("_"),c=parseInt(o.substring(0,a),10);l+=o.substring(a+1),0===c&&(t.encode&&(l=u(l)),r.up.incoming(l,i),l="")}else r.up.incoming(o,i)},outgoing:function(o,a,u){t.encode&&(o=c(o));var d,l=[];if(h){for(;0!==o.length;)d=o.substring(0,p),o=o.substring(d.length),l.push(d);for(;d=l.shift();)i.push({data:l.length+"_"+d,origin:a,callback:0===l.length?u:null})}else i.push({data:o,origin:a,callback:u});m?r.down.init():dispatch()},destroy:function(){o=!0,r.down.destroy()}}},S.stack.VerifyBehavior=function(t){var r,o,i;function startVerification(){o=Math.random().toString(16).substring(2),r.down.outgoing(o)}return r={incoming:function(a,u){var c=a.indexOf("_");-1===c?a===o?r.up.callback(!0):i||(i=a,t.initiate||startVerification(),r.down.outgoing(a)):a.substring(0,c)===i&&r.up.incoming(a.substring(c+1),u)},outgoing:function(t,i,a){r.down.outgoing(o+"_"+t,i,a)},callback:function(r){t.initiate&&startVerification()}}},S.stack.RpcBehavior=function(t,r){var o,i=r.serializer||getJSON(),a=0,u={};function _send(t){t.jsonrpc="2.0",o.down.outgoing(i.stringify(t))}function _createMethod(t,r){var o=Array.prototype.slice;return function(){var i,c=arguments.length,d={method:r};c>0&&"function"==typeof arguments[c-1]?(c>1&&"function"==typeof arguments[c-2]?(i={success:arguments[c-2],error:arguments[c-1]},d.params=o.call(arguments,0,c-2)):(i={success:arguments[c-1]},d.params=o.call(arguments,0,c-1)),u[""+ ++a]=i,d.id=a):d.params=o.call(arguments,0),t.namedParams&&1===d.params.length&&(d.params=d.params[0]),_send(d)}}function _executeMethod(t,r,o,i){if(o){var a,u;r?(a=function(t){a=v,_send({id:r,result:t})},u=function(t,o){u=v;var i={id:r,error:{code:-32099,message:t}};o&&(i.error.data=o),_send(i)}):a=u=v,function isArray(t){return"[object Array]"===Object.prototype.toString.call(t)}(i)||(i=[i]);try{var c=o.method.apply(o.scope,i.concat([a,u]));undef(c)||a(c)}catch(t){u(t.message)}}else r&&_send({id:r,error:{code:-32601,message:"Procedure not found."}})}return o={incoming:function(t,o){var a=i.parse(t);if(a.method)r.handle?r.handle(a,_send):_executeMethod(a.method,a.id,r.local[a.method],a.params);else{var c=u[a.id];a.error?c.error&&c.error(a.error):c.success&&c.success(a.result),delete u[a.id]}},init:function(){if(r.remote)for(var i in r.remote)r.remote.hasOwnProperty(i)&&(t[i]=_createMethod(r.remote[i],i));o.down.init()},destroy:function(){for(var i in r.remote)r.remote.hasOwnProperty(i)&&t.hasOwnProperty(i)&&delete t[i];o.down.destroy()}}},t.exports=S}(window,document,location,window.setTimeout,decodeURIComponent,encodeURIComponent)},879:function(t,r,o){"use strict";o.r(r);var i=o(471),a=o(880),u=o(881),c=o(666),d=o(475),l=o(882),p=o(878),m=Object(i.getHostPrefix)(window);function canEditOnVcdn(){var t=window.getCookie("editables");if(!t||t.length<=1)return!1;var r=window.META.id.toString();return t.split(",").includes(r)}function loadViewListeners(){try{window.APP_SOCKET=new p.Socket({onMessage:function onMessage(t){var r=JSON.parse(t);debug()("Message in app:",r),r.action&&"activate"==r.action?$("#editMe").fadeIn():r.action&&"deactivate"==r.action&&$("#editMe").fadeOut()}})}catch(t){debug()("Could not establish socket connection: "+t)}function windowMessageReceived(t){var r;debug()("View received settings, evt is",t);try{var o=JSON.parse(t.data)}catch(t){return debug()("Couldn't json parse data: ",t),!1}if("loaded"==(o=JSON.parse(t.data)).message){window.POWR_METAFIELDS=o.data.powrMetafields,window.POWR_SHOP_METAFIELDS=o.data.powrShopMetafields,window.PARENT_WINDOW_LOCATION=o.data.parentWindowLocation,debug()("View received settings loaded. Evt origin is ",t.origin),function setParentOrigin(){window.PARENT_ORIGIN=t.origin,window.IFRAME_INDEX=o.data.iframe_index,void 0===window.APP_MODEL?setTimeout(setParentOrigin,50):window.APP_MODEL.setLocals({parent_origin:t.origin,iframe_index:o.data.iframe_index,parent_window_height:o.data.parent_window_height,parent_window_width:o.data.parent_window_width})}(),function notifyParentViewLoaded(){if(void 0===window.APP_MODEL)setTimeout(notifyParentViewLoaded,50);else{var r={message:"viewLoaded",data:{iframe_index:o.data.iframe_index}};r.data.cookiesToGet=Object(a.getImportantCookies)(window.APP_MODEL),parent.postMessage(JSON.stringify(r),t.origin)}}(),void 0!==window.APP_VIEW&&window.APP_VIEW.postSizeToSocket(),function handleLastViewLogicForVcdn(){if(!window.location.origin.includes("vcdn.powr"))return;if(Object(u.isEditable)())return;var t=window.META.id,r=Object(l.getBaseUrl)(window.ENVIRONMENT);if(!r)return;var o="".concat(r,"/api/v1/last-viewed-url/").concat(window.META.app_slug,"/").concat(t,"?url=").concat(window.PARENT_WINDOW_LOCATION);debug()("Calling to api handle last view logic. App id is "+t),fetch(o)}()}if("loadView"==o.message)window.META=o.data.meta,window.GLOBALS=o.data.globals,window.CONTENT=o.data.content,loadView(),window.APP_MODEL.setLocals({parent_origin:t.origin,iframe_index:o.data.iframe_index});else if("showEdit"==o.message)$("#editMe, .adminAppInfo").fadeIn();else if("hideEdit"==o.message)$("#editMe, .adminAppInfo").hide();else if("update"==o.message&&window.APP_MODEL){window.APP_MODEL.get("locals");for(var i in o.data.content)if("locals"==i)for(var c in o.data.content.locals)window.APP_MODEL.attributes.locals[c]=o.data.content.locals[c];else window.APP_MODEL.attributes[i]=o.data.content[i];window.APP_VIEW.render()}else"triggerPowrPopupClick"==o.message||"exitDocument"==o.message?window.APP_VIEW.openModal&&window.APP_VIEW.openModal(o.message):"triggerPowrPopupAfterInactivity"==o.message&&(null===(r=window.APP_VIEW)||void 0===r?void 0:r.triggerPowrPopupAfterInactivity)?window.APP_VIEW.triggerPowrPopupAfterInactivity():"platformData"==o.message?(loadPlatformData(o.data),window.PLATFORM_DATA=o.data):"scrollPosition"==o.message&&window.APP_VIEW.receiveScrollPosition?window.APP_VIEW.receiveScrollPosition(o.scrollPercentage):"cookiesSent"===o.message&&(window.COOKIES=window.COOKIES.concat(o.cookies),window.APP_VIEW&&window.APP_VIEW.render())}function hideTellMore(){$(".angryRate").hasClass("tellMoreOpened")&&($(".rateUsTellMore").hide(),$(".submitRateUs").hide(),$(".angryRate").toggleClass("tellMoreOpened")),$(".mehRate").hasClass("tellMoreOpened")&&($(".rateUsTellMore").hide(),$(".submitRateUs").hide(),$(".mehRate").toggleClass("tellMoreOpened"))}function convertEmojiReviewToInteger(t){switch(t){case"angry":return 1;case"meh":return 3;case"grin":return 5}}function createReview(t){var r="grin"==t?"":$(".rateUsTextArea").val();window.ajaxController({url:"/reviews",data:{app_id:window.META.id,review:convertEmojiReviewToInteger(t),feedback:r,review_location:"live site"}})}function editMePopover(){$("#editMe").popover({html:!0,trigger:"hover",delay:{hide:850},viewport:{selector:"#apps-view",padding:0},template:''})}window.addEventListener?window.addEventListener("message",windowMessageReceived):window.attachEvent("onmessage",windowMessageReceived),$(document).on("click",".js-launchPopoutSettings, .js-unclaimed-cta",(function(){if(void 0!==window.SETTINGS_WINDOW&&window.SETTINGS_WINDOW.close&&window.SETTINGS_WINDOW.close(),"popup"!==window.META.app_namespace){var t=Math.round(.9*screen.height),r=Math.round(screen.width-400-.1*screen.width),o="".concat(m,"/apps/").concat(window.META.app_type,"/settings?id=").concat(window.META.true_id,"&demo_mode=").concat(window.META.demo_mode,"§ion=popup");null!=window.META.template&&(o+="&template="+window.META.template),$(this).hasClass("js-unclaimed-cta")&&(o+="&triggerSignup=true"),window.SETTINGS_WINDOW=window.open(o,"POWr Editor","width=400,height="+t+",top=-1000,left="+r+",location=no,status=no","false")}else window.open("".concat(m,"/plugins/").concat(window.META.app_slug,"/standalone?id=").concat(window.META.id))})),$(".js-update-payment-info-cta").click((function(){return window.open("".concat(m,"/users/me/account?tab=payment_info"))})),$(".js-upgrade-powr-one-cta").click((function(){return window.open(window.platformUri())})),$("#editMeEditApp").on("click",(function(){var t=window.META.app_namespace;if(!("formBuilder"===t||"popup"===t)){var r=Object(d.getPlatformFromEmbedLink)();if(r.includes("weebly")||r.includes("jimdo"))return window.open("".concat(m,"/plugins/").concat(window.META.app_slug,"/standalone?id=").concat(window.META.id))}$(this).toggleClass("listOpened"),$(".editMeMenu").is(":hidden")?$(".js-editMeMenu").stop().fadeIn(100,(function(){window.APP_VIEW.postSizeToSocket()})):$(".js-editMeMenu").stop().fadeOut(100,(function(){window.APP_VIEW.postSizeToSocket()})),$(".rateUsMenu").is(":visible")&&($(".js-rateUsMenu").stop().fadeOut(100,(function(){window.APP_VIEW.postSizeToSocket()})),$("#editMeRateUs").toggleClass("listOpened")),hideTellMore()})),$("#editMeRateUs").on("click",(function(){$(this).toggleClass("listOpened"),$(".rateUsMenu").is(":hidden")?$(".js-rateUsMenu").stop().fadeIn(100,(function(){window.APP_VIEW.postSizeToSocket()})):($(".js-rateUsMenu").stop().fadeOut(100,(function(){window.APP_VIEW.postSizeToSocket()})),hideTellMore()),$(".editMeMenu").is(":visible")&&($(".js-editMeMenu").stop().fadeOut(100,(function(){window.APP_VIEW.postSizeToSocket()})),$("#editMeEditApp").toggleClass("listOpened"))})),$(document).mouseup((function(t){var r=$("#editMe");r.is(t.target)||0!==r.has(t.target).length||($(".editMeMenu").is(":visible")&&($(".js-editMeMenu").stop().fadeOut(100,(function(){window.APP_VIEW.postSizeToSocket()})),$("#editMeEditApp").toggleClass("listOpened")),$(".rateUsMenu").is(":visible")&&($(".js-rateUsMenu").stop().fadeOut(100,(function(){window.APP_VIEW.postSizeToSocket()})),$("#editMeRateUs").toggleClass("listOpened"),hideTellMore()))})),$(".angryRate").on("click",(function(){$(".angryRate").hasClass("tellMoreOpened")?hideTellMore():($(".rateUsTellMore").show(),$(".submitRateUs").show(),$(".angryRate").toggleClass("tellMoreOpened"),$(".mehRate").hasClass("tellMoreOpened")&&$(".mehRate").toggleClass("tellMoreOpened"))})),$(".js-rateUsMeh").on("click",(function(){$(".mehRate").hasClass("tellMoreOpened")?hideTellMore():($(".rateUsTellMore").show(),$(".submitRateUs").show(),$(".mehRate").toggleClass("tellMoreOpened"),$(".angryRate").hasClass("tellMoreOpened")&&$(".angryRate").toggleClass("tellMoreOpened"))})),$(".submitRateUs").on("click",(function(){if($(".rateUsTextArea").val().length<=10)$(".warning-msg-rate-Us").show();else{var t,r=$(".mehRate").hasClass("tellMoreOpened")?"Meh":"Angry",o={url:"/apps/".concat(null===(t=window.META)||void 0===t?void 0:t.id,"/submit_zendesk"),data:{review_text:r+"rate: "+$(".rateUsTextArea").val(),url:window.location.href},type:"POST"};window.ajaxController(o,(function(){})),createReview(r.toLowerCase()),$(".mehRate").hasClass("tellMoreOpened")?$(".mehRate").toggleClass("submitedMeh"):$(".angryRate").toggleClass("submitedAngry"),$(".thankYou").show(),$(".closeRateUs").show(),$(".rateUsTellMore").hide(),$(".rateUsBtnGroup").hide(),$(".warning-msg-rate-Us").hide(),$(".rateUsMenu__item").prop("disabled",!0)}})),$(".js-rateUsSmile").on("click",(function(){var t=document.location.toString().split("#platform=")[1]||document.location.toString().split(/\&external_type=(.*?)\&/)[1]||"html";$(".js-rateUsSmile").toggleClass("submitedSmile"),"squarespace"===t.toLowerCase()?window.open("".concat(i.SQUARE_SPACE_REVIEW_LINK).concat(window.META.app_slug)):window.open("".concat(m,"/review?src=user_site&app_id=").concat(window.META.id,"&platform=").concat(t,"&app=").concat(window.META.app_slug)),createReview("grin"),hideTellMore(),$(".rateUsBtnGroup").hide(),$(".thankYou").show(),$(".closeRateUs").show(),$(".rateUsMenu__item").prop("disabled",!0)})),$(".cancelRateUs, .closeRateUs").on("click",(function(){$(".js-rateUsMenu").stop().fadeOut(100,(function(){window.APP_VIEW.postSizeToSocket()})),hideTellMore(),$("#editMeRateUs").toggleClass("listOpened")})),null!=$(window).popover?(editMePopover(),$(document).on("click",".js-launchStandalone",(function(){var t="".concat(m,"/plugins/").concat(window.META.app_slug,"/standalone?id=").concat(window.META.id);1==window.META.powr_one?t="".concat(window.platformUri(),"/apps/").concat(window.META.unique_label):"shopify"===window.META.external_id_type&&window.META.shopify_admin_standalone_url&&(window.META.edit_me||canEditOnVcdn())&&(t=window.META.shopify_admin_standalone_url),window.open(t)})),$(document).on("click",".js-launchResponseDashboard",(function(){var t="".concat(m,"/apps/").concat(window.META.id,"/responses");1==window.META.powr_one&&(t="".concat(window.platformUri(),"/apps/").concat(window.META.unique_label)),window.open(t)})),$(window).on("beforeunload",(function(){if(window.APP_MODEL.get("locals").isDirty&&$("#appSettings").length>0)return"You have unsaved work with a POWr Plugin! If you leave this page you will lose any unsaved changes."}))):setTimeout((function(){editMePopover()}),2e3)}function loadPlatformData(t,r){if(debug()("Trying to load platform data"),void 0!==window.APP_MODEL){void 0===r&&(r={render:!0}),debug()("Loading platform data",t);var o=!1,i={};for(var a in t.content)void 0!==window.APP_MODEL.defaults()[a]&&window.APP_MODEL.attributes[a]!=t.content[a]&&(debug()("Default key: "+window.APP_MODEL.defaults()[a]),debug()("Response key: "+t.content[a]),"px"==(window.APP_MODEL.defaults()[a]+"").slice(-2)&&"px"!=(t.content[a]+"").slice(-2)?(window.APP_MODEL.attributes[a]=t.content[a]+"px",i[a]=t.content[a]+"px"):(window.APP_MODEL.attributes[a]=t.content[a],i[a]=t.content[a]),o=!0);o&&r.render&&window.APP_VIEW.render()}else setTimeout((function(){loadPlatformData(t)}),100)}function initializeWix(){"undefined"!=typeof WIX_QA_APP_TYPE&&(window.wixStagingAppModel=window[WIX_QA_APP_TYPE+"AppModel"],window.wixLocalAppModel=wixStagingAppModel,window.localDevAppModel=wixStagingAppModel,window.wixIeLocalAppModel=wixStagingAppModel),window.VIEW_MODE=Wix.Utils.getViewMode(),"site"!=VIEW_MODE?loadView({use_backup_content:!0}):loadView({use_backup_content:!1}),Wix.addEventListener(Wix.Events.SETTINGS_UPDATED,(function(t){debug()("Wix settings updated:",t),window.APP_MODEL.attributes=t,window.APP_MODEL.meta.saved=!0,Object(c.isSsrInWixEditor)()?window.APP_VIEW.renderSsr():window.APP_VIEW.render()})),Wix.addEventListener(Wix.Events.SITE_PUBLISHED,(function(t){debug()("site published"),window.APP_MODEL.doSave({post_params:{wix_published:!0}});var r=window.META||{};Object(i.trackEvent)("app_published",{app_type:r.app_type,app_namespace:r.app_namespace,platform:window.HOST,user_premium_status:r.premium_status})})),Wix.addEventListener(Wix.Events.COMPONENT_DELETED,(function(t){debug()("app deleted"),window.APP_MODEL.doSave({post_params:{wix_deleted:!0}})}))}function loadAppViewFromJson(t){var r,o;null!=t&&t.success?(debug()("Success getting view data"),window.META=t.meta,window.GLOBALS=t.globals,window.CONTENT=t.content,window.loadView(),Object(c.isSsrApp)()&&!(null===(r=window.META)||void 0===r?void 0:r.saved)&&0===Object.keys(null!==(o=t.content)&&void 0!==o?o:{}).length&&Object(c.isWebComponentRenderedInRailsView)()&&window.APP_MODEL.doSave()):debug()("Error getting view data")}function loadAppJson(t){debug()("Calling to get app json. Url is "+t),window.ajaxController({url:t,type:"GET"},loadAppViewFromJson)}window.COOKIES=[],window.loadView=function(t){if(void 0!==window.META){window.name=window.META.id;var r=void 0!==t&&null!=t.use_backup_content&&t.use_backup_content,o=void 0!==t&&null!=t.app_el?t.app_el:$("#appView");for(var i in GLOBALS)window[i]=GLOBALS[i];var a=window.META.app_type+"AppModel";if(["wixReview","wixStaging","wixLocal"].includes(window.META.app_type)&&(a="".concat(window.META.app_namespace,"AppModel")),window.META.soft_alias&&(window[a]=window[window.META.app_namespace+"AppModel"]),"development"!=window.ENVIRONMENT&&"staging"!=window.ENVIRONMENT||initializePlatformsForQA(),window.APP_MODEL=new window[a],r)for(var i in BACKUP_CONTENT)"undefined"!=BACKUP_CONTENT[i]&&window.APP_MODEL.set(i,BACKUP_CONTENT[i]);else for(var i in CONTENT)"undefined"!=CONTENT[i]&&window.APP_MODEL.set(i,CONTENT[i]);for(var i in window.APP_MODEL.meta={},window.META)"undefined"!=window.META[i]&&(window.APP_MODEL.meta[i]=window.META[i]);window.APP_MODEL.afterMount(),window.META.password_protected_template&&$("body").append(window.META.password_protected_template),window.APP_VIEW=new window[window.META.app_namespace+"AppView"]({el:"#"+o.attr("id"),model:window.APP_MODEL}),$.inArray(window.META.external_id_type,["weebly-integrated","design-editor","webydo","bookmark","cloudflare","wordpress","sharethis"])>-1&&(debug()("Updating through local storage"),setInterval((function(){if(void 0!==window.META){var t=window.getLocalStorage("powr_data_"+window.META.id);if(null!=t&&null!=t&&"null"!=t){t=JSON.parse(t);window.APP_MODEL.get("locals");for(var r in t.content)if("locals"==r)for(var o in t.content.locals)window.APP_MODEL.attributes.locals[o]=t.content.locals[o];else window.APP_MODEL.attributes[r]=t.content[r];"undefined"!=typeof PLATFORM_DATA&&loadPlatformData(PLATFORM_DATA,{render:!1}),window.APP_VIEW.render(),window.removeLocalStorage("powr_data_"+window.META.id)}}}),100)),function loadViewInitializers(){"free"==window.META.premium_status&&$(".loadingWrapper").show();if(window.META.edit_me||canEditOnVcdn()){"jimdo"==window.META.external_id_type&&$("#editMe").css({marginTop:"20px"}),$("#editMe").fadeIn("fast"),new MutationObserver((function(){if(["formBuilder","popup"].includes(window.META.app_namespace)){var t=window.APP_VIEW.model.get("locals"),r=t.displayMode,o=t.hideEditMe;["tab","floatingButton"].indexOf(r)>-1||o?$("#editMe").hide():$("#editMe").show()}else"chat"==window.META.app_namespace&&($(".chattyAppy").is(":visible")?($("#editMe").show(),$("#editMe").css({position:"absolute"})):($("#editMe").hide(),$("#editMe").css({position:"static"})))})).observe($("#appView")[0],{subtree:!0,attributes:!0})}console.log("referrer:",document.referrer,document.referrer.indexOf("plugins/form-builder/templates")),-1!=document.referrer.indexOf("plugins/form-builder/templates")&&$("#editMe, .bottom-nav.js-hide-if-pos, .js-failed-payments-overlay, .js-wix-blocked-content,\n .js-watermark, .js-unclaimed-watermark, #unblockedFeaturesPopup, .powrMark, .markOfPowr").hide();$('link[rel="canonical"]').attr("href",baseUri()+"/plugins/"+window.META.app_slug+"/view?id="+window.META.id),window.META.admin_debug_panel&&$("body").append(window.META.admin_debug_panel);var t=getURLParameter("mode");if("page"==t||"#page"===window.location.hash||window.location.href.includes("%23page")){var r=window.isMobile()?"5% 10px":"5% 15%";$("html").css({overflow:"auto"}),$("#appView").css({margin:r})}else"scroll"==t||"#scroll"===window.location.hash||window.location.href.includes("%23scroll")?$("html").css({overflow:"auto"}):$("html").css({overflow:"hidden"})}()}},$((function(){if($("#apps-view, #apps-facebook_view").length>0&&(window.loadView(),loadViewListeners()),$("#apps-cached_view, #apps\\/views-show").length>0)if(debug()("In apps cached view"),loadViewListeners(),"async"==getURLParameter("load"))debug()("Async loading"),window.LOAD_ME_INTERVAL=setInterval((function(){if(void 0===window.META||null==window.META){if("undefined"!=typeof PARENT_ORIGIN&&"undefined"!=typeof IFRAME_INDEX){var t={message:"loadMe",data:{iframe_index:IFRAME_INDEX}};parent.postMessage(JSON.stringify(t),PARENT_ORIGIN)}}else clearInterval(LOAD_ME_INTERVAL)}),5e3);else{var t="/plugins/".concat(window.APP_DETAILS.slug,"/view.json?"),r=window.getURLParameter("id"),o=window.getURLParameter("unique_label"),i=window.getURLParameter("powr_token"),a=window.getURLParameter("user_label");t+=r?"id="+r:o?"unique_label=".concat(o,"&powr_token=").concat(i,"&user_label=").concat(a):"powr_token=".concat(i,"&user_label=").concat(a);var d=window.getURLParameter("external_type");if(d&&(t+="&external_type=".concat(d)),null==window.META)return void loadAppJson(t);if(!Object(u.isEditable)()){var l;if(!0===(null===(l=window.META.cached_view_blocked)||void 0===l?void 0:l.value)){var p,m="POWr ".concat(window.META.app_type,"(id=").concat(window.META.id,") cannot be rendered: ");return m+="".concat(null===(p=window.META.cached_view_blocked)||void 0===p?void 0:p.message),void console.error(m)}return void window.loadView()}try{var h={},w=document.location.toString().split("#platform="),g=document.location.ancestorOrigins,v=window.cookielessRequest();if(g){var b=g[g.length-1];h.url=b}else h.url=document.referrer;w.length>=1&&(h.platform=w[1]),h=$.param(h);var y="/raw/".concat(window.META.id,".json?").concat(h);v&&(y="/raw/".concat(window.META.id,"/cookieless.json?").concat(h)),loadAppJson(y)}catch(t){debug()("Error with short json URL endpoint",t)}}$("#apps-wix_view").length>0&&initializeWix(),$("#apps-wix_cached_view, #wix\\/views-show").length>0&&Wix.getSiteInfo((function(t){var r=t.url,o=null;if("site"===Wix.Utils.getViewMode()&&function isAppCached(){return $("#wix\\/views-show").length>0}()){var i=Object(u.isEditable)()?"owner":"public";o="/wix/".concat(window.APP_DETAILS.slug,"/").concat(i,".json?").concat(window.originalQuery(),"&url=").concat(t.url)}else o="/plugins/".concat(window.APP_DETAILS.slug,"/wix_view.json?").concat(window.originalQuery(),"&url=").concat(t.url);window.ajaxController({url:o,type:"GET"},(function(t){t.success?(window.META=t.meta,window.META.wixSiteUrl=r,window.GLOBALS=t.globals,window.VIEW_MODE=Wix.Utils.getViewMode(),"site"!==VIEW_MODE?window.BACKUP_CONTENT=t.content:window.CONTENT=t.content,Object(c.isSsrInWixEditor)()&&window.connectWebComponentWixEditor&&window.connectWebComponentWixEditor(),initializeWix()):debug()("Error getting wix view data")}))}))}))},88:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return uniqueId}));var i=0;function uniqueId(t){var r=++i+"";return t?t+r:r}},880:function(t,r,o){"use strict";o.r(r),o.d(r,"getImportantCookies",(function(){return i}));var i=function getImportantCookies(t){if(!window.cookieEnabled()){var r=t.meta,o=r.id,i=r.app_namespace;return"popup"===i?["powr_modal_".concat(o),"powr_modal_".concat(o,"_submitted_at")]:"formBuilder"===i?["powr_form_".concat(o)]:[]}}},881:function(t,r,o){"use strict";function isEditable(){var t,r,o,i,a=window.getCookie("editables")||"",u=a.split(",").indexOf(null===(t=window.META)||void 0===t?void 0:t.id.toString())>=0,c=a.split(",").indexOf(null===(r=window.META)||void 0===r?void 0:r.hashid)>=0,d=(null===(o=window.META)||void 0===o?void 0:o.unique_label)||window.uniqueLabel(),l=a.split(",").indexOf(d)>=0;return u||l||c||!(null===(i=window.META)||void 0===i?void 0:i.saved)}o.r(r),o.d(r,"isEditable",(function(){return isEditable}))},882:function(t,r,o){"use strict";o.r(r),o.d(r,"getBaseUrl",(function(){return i}));var i=function getBaseUrl(t){if(t){var r;switch(t.toLowerCase()){case"production":r="https://www.powr.io";break;case"staging":r="https://www.powr-staging.io";break;case"development":r="https://localhost:3000";break;default:console.error("not a valid powr environment")}return r}}},886:function(t,r,o){function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var o=[],i=!0,a=!1,u=void 0;try{for(var c,d=t[Symbol.iterator]();!(i=(c=d.next()).done)&&(o.push(c.value),!r||o.length!==r);i=!0);}catch(t){a=!0,u=t}finally{try{i||null==d.return||d.return()}finally{if(a)throw u}}return o}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);"Object"===o&&t.constructor&&(o=t.constructor.name);if("Map"===o||"Set"===o)return Array.from(t);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return _arrayLikeToArray(t,r)}(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var o=0,i=new Array(r);o1&&void 0!==arguments[1]&&arguments[1],o=this.isCartType()?"Cart":"";return r?[this.get(t+o),o]:this.get(t+o)},chameleonMapper:{titleFontFamily:"header.fontFamily",titleFontSize:"header.fontSize",titleFontColor:"header.color",labelFontFamily:"text.fontFamily",textFontSize:"text.fontSize"},presets:function presets(){return{elementFontColor:"color",backgroundColor:"backgroundColor",backgroundStartColor:"backgroundColor",backgroundEndColor:"backgroundColor",backgroundBorderColor:"color",titleFontColor:"color",labelFontColor:"color",elementFontFamily:"fontFamily",titleFontFamily:"fontFamily",labelFontFamily:"fontFamily"}},intervalInMs:function intervalInMs(){if($.inArray(this.get("targetType"),["timePerPageLoad","timePerVisitor","date"])>-1)return 1e3;var t=parseFloat(this.get("interval"));return t*={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5}[this.get("intervalUnit")]},secondsRemaining:function secondsRemaining(){var t=this.intervalInMs(),r="",o=this.get("countDirection")||"down",i=this.get("targetType"),a=this.get("timerGoal");if($.inArray(this.get("timerGoal"),["countdownNumberVisitor","countupNumberVisitor"])>-1){var u=this.get("targetNumber"),c=getCookie("powr_countdown_number_"+this.meta.id,!0);if(c){debug()("........ COOKIE ALREADY EXISTS .............");var d=parseInt(getCookie("powr_countdown_number_"+this.meta.id,!0));debug()("........... COOKIE VALUE = "+d),debug()("num_cookie_val = "+c)}else{if(debug()("$$$$$$$$$$$$$ COOKIE NOT THERE $$$$$$$$$$$"),"countupNumberVisitor"==a)d=(u*t+(new Date).getTime())/t-2*u;else d=(u*t+(new Date).getTime())/t;setCookie("powr_countdown_number_"+this.meta.id,d,10,!0),debug()("--------------------------------------------------\x3e Cookie set for number!")}}if("timePerVisitor"==i||"timePerPageLoad"==i){var l=parseFloat(this.getAttributeDependingOnCountdownType("perVisitorQuantity"));switch(this.getAttributeDependingOnCountdownType("perVisitorUnit")){case"s":r=l;break;case"m":r=60*l;break;case"h":r=3600*l;break;case"d":r=86400*l}if("timePerVisitor"==i)if(getCookie("powr_countdown_"+this.meta.id,!0)){debug()("........ COOKIE ALREADY EXISTS .............");d=parseInt(getCookie("powr_countdown_"+this.meta.id,!0));debug()("........... COOKIE VALUE = "+d)}else{debug()("$$$$$$$$$$$$$ COOKIE NOT THERE $$$$$$$$$$$");d=(new Date).getTime()/t+r;setCookie("powr_countdown_"+this.meta.id,d,10,!0)}else d=(new Date).getTime()/t+r}else if(-1==$.inArray(this.get("timerGoal"),["countdownNumberVisitor","countupNumberVisitor"]))d=new Date(this.get("locals").endDate||this.get("targetDate")).getTime()/t;var p=(new Date).getTime()/t,m=Math.round(d-p);"down"==o&&m<0&&(m=0),m="up"==o&&m>0?0:Math.abs(m);for(var h=this.get("locals").currentNumber||[],w=h.length-1;w>=0;w--)h[w].interval==t&&h.splice(w,1);return h.push({number:m,interval:t}),this.setLocals({currentNumber:h},{silent:!0}),m},calculateStartDate:function calculateStartDate(t,r){var o=(new Date).valueOf(),i=(parseInt(this.get("targetNumber"))||0)*this.intervalInMs(),a=this.get("locals").currentNumber||[];if(!r)for(var u=this.intervalInMs(),c=a.length-1;c>=0;c--)if(a[c].interval!=u){r=a[c].number;break}!t&&r&&(i=r*this.intervalInMs()),"up"==this.get("countDirection")?o-=i:o+=i;try{var d=new Date(o).toISOString().replace(/\.\d{3}Z^/,"");this.get("targetDate")!=d&&this.set("targetDate",d,{silent:!1})}catch(t){debug()("Trouble computing date")}},isCartType:function isCartType(){return"cart"===this.get("countdownType")},isSubtitleUsed:function isSubtitleUsed(){return 0!==this.get("beforeSubtitle").length},canFreezeTimerForCart:function canFreezeTimerForCart(){return!this.meta.is_standalone&&this.isCartType()&&!getCookie("powr_countdown_cart_cleared_"+this.meta.id)&&!this.get("locals").unfreezeTimerForCart},TOGGLE_NAMES:["showDays","showHours","showMinutes","showSeconds","showYears"]}),countdownTimerAppModel=countdownTimerBaseModel,countUpTimerAppModel=countdownTimerBaseModel,holidayCountdownAppModel=countdownTimerBaseModel,countdownTimerAppSettings=appSettings.extend({afterInitialize:function afterInitialize(){var t=this;t.$el.on("mouseenter",".js-transition-img-container",(function(t){var r=$(this).find(".radioImageContainer").attr("value");$(this).find(".transition_img_"+r).attr("src","https://www.powrcdn.com/countdown_timer/"+r+".gif")})),t.$el.on("mouseleave",".js-transition-img-container",(function(){var t=$(this).find(".radioImageContainer").attr("value");$(this).find(".transition_img_"+t).attr("src","https://www.powrcdn.com/countdown_timer/number.png")})),setCookie("powr_countdown_"+t.model.meta.id,0,-999,!0),setCookie("powr_countdown_number_"+t.model.meta.id,0,-999,!0),t.initializePaypalSettings("paypal"),t.initializePaypalSettings("paypalBefore"),t.updateConditionals();var r=function whenAfterCompletionChanged(){t.model.setLocals({afterCompletionChanged:!0}),t.previewFinished(),t.updateConditionals()};t.$el.find(".afterCompletion").on("keyup reactUpdateRequest","input",r).on("change reactUpdateRequest","input,select",r),t.$el.on("click",".showPreview",(function(){r()})),t.$el.on("click",".hidePreview",(function(){t.hidePreview()})),t.$el.on("change reactUpdateRequest",'[name="targetType"]',(function(){$.inArray($(this).val(),["timePerVisitor","timePerPageLoad"])>-1&&t.$el.find('[name="countDirection"]').val("down").change()})),t.$el.on("change reactUpdateRequest",'[name="countdownType"]',(function(){"cart"==$(this).val()&&t.cartTypeSetDefault()})),t.$el.on("change reactUpdateRequest",'[name="timerGoal"]',(function(){switch($(this).val()){case"countdownDate":t.countdownDateSetDefault();break;case"countdownTime":t.countdownTimeSetDefault();break;case"countdownTimeVisitor":t.countdownTimeVisitorSetDefault();break;case"countdownNumberVisitor":t.countdownNumberVisitorSetDefault();break;case"countupNumber":t.countupNumberSetDefault();break;case"countupNumberVisitor":t.countupNumberVisitorSetDefault();break;case"countupDate":t.countupDateSetDefault()}t.model.setLocals({currentNumber:[]}),t.update(),t.hardReset()})),t.$el.on("click",".recalculate",(function(){t.hardReset()}));for(var o=["interval","intervalUnit","countDirection"],a=0;a-1)&&(setCookie("powr_countdown_"+this.model.meta.id,0,-999,!0),setCookie("powr_countdown_number_"+this.model.meta.id,0,-999,!0)),this.model.get("locals").afterCompletionChanged?this.model.setLocals({afterCompletionChanged:!1}):this.model.setLocals({previewing:!1}),this.updateConditionals(),this.model.triggerChange(),$(".showSecondsCheckbox .switch").hasClass("off")?$(".showingSeconds").removeClass("hid"):$(".showingSeconds").addClass("hid")},syncFontSelectWithSlider:function syncFontSelectWithSlider(t){this.$el.find('[name="'.concat(t,'FontSize"]')).val(parseFloat(this.model.get("".concat(t,"FontSize")))).trigger("forceUpdateComponent")},updateConditionals:function updateConditionals(){if("timePerVisitor"==this.model.get("targetType")){var t=_slicedToArray(this.model.getAttributeDependingOnCountdownType("perVisitorQuantity",!0),2);perVisitorQuantityVal=t[0],postfix=t[1],perVisitorQuantityVal||this.$el.find('[name="perVisitorQuantity'.concat(postfix,'"]')).val(1).trigger("forceUpdateComponent").trigger("reactUpdateRequest")}"date"==this.model.get("targetType")&&"repeat"==this.model.get("afterCompletion")?this.$el.find(".whenRepeatingAndDate").slideDown():this.$el.find(".whenRepeatingAndDate").slideUp(),i()&&(this.$el.addClass("shopify-overhaul-settings"),"choosePeriod"===this.model.get("activeDates")?this.$el.find(".date-range-picker").show():this.$el.find(".date-range-picker").hide(),this.model.get("containerSize")&&(this.syncFontSelectWithSlider("title"),this.syncFontSelectWithSlider("subtitle"),this.syncFontSelectWithSlider("counter"),this.syncFontSelectWithSlider("label"),this.syncFontSelectWithSlider("button")),this.model.isCartType()||"countdownDate"!==this.model.get("timerGoal")?(this.$el.find(".multitoggle-component-activeDates-js .multitoggle-component__label").text(POWr.simpleCopies("countdowntimer.behavior.active_dates")),this.$el.find(".multitoggle-component-activeDates-js .multitoggle-component__description").text(POWr.simpleCopies("countdowntimer.behavior.active_dates_descr")),this.$el.find(".multitoggle-component-activeDates-js .multiToggleContainer").show(),this.$el.find(".date-range-picker .endShowDate").show(),this.$el.find(".date-range-picker .targetDate").hide()):(this.$el.find(".multitoggle-component-activeDates-js .multitoggle-component__label").text(POWr.simpleCopies("countdowntimer.behavior.countdown_to_date")),this.$el.find(".multitoggle-component-activeDates-js .multitoggle-component__description").text(POWr.simpleCopies("countdowntimer.behavior.countdown_to_date_descr")),this.$el.find(".multitoggle-component-activeDates-js .multiToggleContainer").hide(),this.$el.find(".date-range-picker .endShowDate").hide(),this.$el.find(".date-range-picker .targetDate").show(),this.$el.find(".date-range-picker").show())),i()&&this.model.isCartType()?(this.$el.find(".whenCartType").show(),this.$el.find(".whenHeaderBannerType").hide()):(this.$el.find(".whenCartType").hide(),this.$el.find(".whenHeaderBannerType").show()),this.model.isSubtitleUsed()?this.$el.find(".whenSubtitleUsed").show():(this.$el.find(".whenSubtitleUsed").hide(),this.model.set({subtitleSpacing:"0px"})),"down"==this.model.get("countDirection")&&("banner"==this.model.getAttributeDependingOnCountdownType("afterCompletion")?this.$el.find(".afterCompletion").slideDown():this.$el.find(".afterCompletion").slideUp()),"banner"==this.model.get("beforeCompletion")||"banner"==this.model.get("afterCompletion")?this.$el.find(".beforeOrAfterCompletion").slideDown():this.$el.find(".beforeOrAfterCompletion").slideUp(),this.showSelectedButtonType("finished","after"),this.showSelectedButtonType("before","before");var r=this.$el;if("timePerPageLoad"==this.model.get("targetType")&&(r.find(".whenDateCont").slideUp(),r.find(".whenDateFeatures").slideDown(),r.find(".whenNumber").slideUp(),r.find(".countDirection").slideUp(),r.find(".whenPerVisitor").slideDown()),this.model.isCartType())this.$el.find(".timerGoalSelect").hide(),this.$el.find(".headerBannerFeatures").hide(),this.$el.find(".removePowrLogoCheckbox").hide(),r.find(".whenDate, .whenDateCont, .whenNumber, .whenDateFeatures, .countDirection, .buttonType, .headerBannerFeatures").slideUp(),r.find(".whenPerVisitor, .whenDown, .cartFeatures").slideDown();else switch(this.$el.find(".timerGoalSelect").show(),this.$el.find(".headerBannerFeatures").show(),this.$el.find(".removePowrLogoCheckbox").show(),r.find(".buttonType, .headerBannerFeatures").slideDown(),r.find(".cartFeatures").slideUp(),this.model.get("timerGoal")){case"countdownDate":case"countdownTime":r.find(".whenDate").slideDown(),r.find(".whenDateCont").slideDown(),r.find(".whenDateFeatures").slideDown(),r.find(".countDirection").slideDown(),r.find(".whenNumber").slideUp(),r.find(".whenPerVisitor").slideUp(),r.find(".whenDown").slideDown();break;case"countdownTimeVisitor":r.find(".whenDateCont").slideUp(),r.find(".whenDate").slideDown(),r.find(".whenDateFeatures").slideDown(),r.find(".whenNumber").slideUp(),r.find(".countDirection").slideUp(),r.find(".whenPerVisitor").slideDown(),r.find(".whenDown").slideDown();break;case"countdownNumberVisitor":r.find(".whenDate").slideUp(),r.find(".whenDateCont").slideUp(),r.find(".whenDateFeatures").slideUp(),r.find(".countDirection").slideDown(),r.find(".whenNumber").slideDown(),r.find(".whenPerVisitor").slideUp(),r.find(".whenDown").slideDown();break;case"countupNumber":case"countupNumberVisitor":r.find(".whenDate").slideUp(),r.find(".whenDateCont").slideUp(),r.find(".whenDateFeatures").slideUp(),r.find(".countDirection").slideDown(),r.find(".whenNumber").slideDown(),r.find(".whenPerVisitor").slideUp(),r.find(".whenDown").slideUp();break;case"countupDate":r.find(".whenDate").slideDown(),r.find(".whenDateCont").slideDown(),r.find(".whenDateFeatures").slideDown(),r.find(".countDirection").slideDown(),r.find(".whenNumber").slideUp(),r.find(".whenPerVisitor").slideUp(),r.find(".whenDown").slideUp()}this.model.get("locals").previewing?(this.$el.find(".hidePreview").slideDown(),this.$el.find(".showPreview").slideUp()):(this.$el.find(".hidePreview").slideUp(),this.$el.find(".showPreview").slideDown()),this.model.intervalInMs()<15?this.$el.find(".tooSmall").slideDown():this.$el.find(".tooSmall").slideUp(),"fixed"==this.model.get("pluginPosition")?(this.$el.find(".positioningDetails").slideDown(),this.$el.find(".beforeOrAfterCompletion").hide(),this.$el.find(".js-label-font-color-container").hide(),this.$el.find(".js-title-font-color").hide()):(this.$el.find(".positioningDetails").hide(),this.$el.find(".beforeOrAfterCompletion").show(),this.$el.find(".js-label-font-color-container").show(),this.$el.find(".js-title-font-color").show())},showSelectedButtonType:function showSelectedButtonType(t,r){var o=this.model.get("".concat(t,"ButtonType")),i=this.$el.find(".".concat(r,"Completion")).find(".buttonOptions");switch(o){case"none":i.slideUp();break;case"link":case"":i.slideDown()}},previewFinished:function previewFinished(){"banner"==this.model.getAttributeDependingOnCountdownType("afterCompletion")&&(this.model.setLocals({previewing:!0}),this.model.triggerChange(!1))},hidePreview:function hidePreview(){this.model.get("locals").previewing&&(this.model.setLocals({previewing:!1}),this.updateConditionals(),this.model.triggerChange(!1))}}),countdownTimerAppView=appView.extend({afterInitialize:function afterInitialize(){this.model.canFreezeTimerForCart()&&(this.hideCounterWithIframe(),parent.postMessage(JSON.stringify({message:"checkCartIsEmpty"}),"*"),window.addEventListener?window.addEventListener("message",this.showCartTimer.bind(this)):window.attachEvent("onmessage",this.showCartTimer.bind(this))),this.$el.on("click",".paypalSubmitButton",(function(){return $(this).parents(".paypalForm").find('input[name="business"]').val().length>0&&$(this).parents(".paypalForm").submit(),!1}))},showCartTimer:function showCartTimer(t){try{"showCartTimer"===JSON.parse(t.data).message&&(this.model.setLocals({unfreezeTimerForCart:!0}),this.render())}catch(t){debug()("Error with showCartTimer ",t)}},hideCounterWithIframe:function hideCounterWithIframe(){this.model.setLocals({postCss:{display:"none"}}),this.postSizeToSocket()},setMetaContent:function setMetaContent(){var t=this.model.get("title");this.writeMetaContent(t)},beforeRender:function beforeRender(){var t=this.model;if("number"==t.get("targetType")){var r=t.secondsRemaining();t.setLocals({digits:Math.max(5,r.toString().length+1)})}$(".previewSelectWrapper").show(),"fixed"==this.model.get("pluginPosition")&&(this.changePreview("desktop",!1),$(".previewSelectWrapper").hide());var o={title:t.get("finishedTitle"),subtitle:t.get("finishedSubtitle"),buttonType:t.get("finishedButtonType"),buttonText:t.get("finishedButtonText"),buttonUrl:t.get("finishedButtonUrl"),bannerImage:t.get("finishedBannerImage"),titleFontSize:1.5*parseInt(t.get("titleFontSize")),subtitleFontSize:parseInt(t.get("titleFontSize")),paypalQuantity:t.get("paypalQuantity"),paypalButtonText:t.get("paypalButtonText"),paypalPaypalAccount:t.get("paypalPaypalAccount"),paypalCurrencyCode:t.get("paypalCurrencyCode"),paypalPurchaseType:t.get("paypalPurchaseType"),paypalSuccessUrl:t.get("paypalSuccessUrl"),paypalItemName:t.get("paypalItemName"),paypalItemCost:t.get("paypalItemCost"),paypalAllowUserToSpecifyPrice:t.get("paypalAllowUserToSpecifyPrice"),paypalAllowUserToSpecifyQuantity:t.get("paypalAllowUserToSpecifyQuantity"),paypalTrialOn:t.get("paypalTrialOn"),paypalTrialPrice:t.get("paypalTrialPrice"),paypalTrialDuration:t.get("paypalTrialDuration"),paypalTrialDurationUnits:t.get("paypalTrialDurationUnits"),paypalSubscriptionPrice:t.get("paypalSubscriptionPrice"),paypalSubscriptionDuration:t.get("paypalSubscriptionDuration"),paypalSubscriptionDurationUnits:t.get("paypalSubscriptionDurationUnits"),paypalShippingCost:t.get("paypalShippingCost"),paypalNoShipping:t.get("paypalNoShipping"),textFontColor:t.get("titleFontColor"),textFontFamily:t.get("titleFontFamily"),backgroundColor:t.get("finishedBackgroundColor")},i={title:t.get("beforeTitle"),subtitle:t.get("beforeSubtitle"),buttonType:t.get("beforeButtonType"),buttonText:t.get("beforeButtonText"),buttonUrl:t.get("beforeButtonUrl"),bannerImage:t.get("beforeBannerImage"),paypalQuantity:t.get("paypalBeforeQuantity"),paypalButtonText:t.get("paypalBeforeButtonText"),paypalPaypalAccount:t.get("paypalBeforePaypalAccount"),paypalCurrencyCode:t.get("paypalBeforeCurrencyCode"),paypalPurchaseType:t.get("paypalBeforePurchaseType"),paypalSuccessUrl:t.get("paypalBeforeSuccessUrl"),paypalItemName:t.get("paypalBeforeItemName"),paypalItemCost:t.get("paypalBeforeItemCost"),paypalAllowUserToSpecifyPrice:t.get("paypalBeforeAllowUserToSpecifyPrice"),paypalAllowUserToSpecifyQuantity:t.get("paypalBeforeAllowUserToSpecifyQuantity"),paypalTrialOn:t.get("paypalBeforeTrialOn"),paypalTrialPrice:t.get("paypalBeforeTrialPrice"),paypalTrialDuration:t.get("paypalBeforeTrialDuration"),paypalTrialDurationUnits:t.get("paypalBeforeTrialDurationUnits"),paypalSubscriptionPrice:t.get("paypalBeforeSubscriptionPrice"),paypalSubscriptionDuration:t.get("paypalBeforeSubscriptionDuration"),paypalSubscriptionDurationUnits:t.get("paypalBeforeSubscriptionDurationUnits"),paypalShippingCost:t.get("paypalBeforeShippingCost"),paypalNoShipping:t.get("paypalBeforeNoShipping"),textFontColor:t.get("titleFontColor"),textFontFamily:t.get("titleFontFamily"),backgroundColor:t.get("beforeBackgroundColor")};t.setLocals({dataBefore:i}),t.setLocals({dataAfter:o}),a(this.model.attributes.tagManagerContainerId)},afterRender:function afterRender(){this.model.canFreezeTimerForCart()||(this.setPosition(),"repeat"==this.model.get("afterCompletion")&&this.calculateNextEndDate(),this.model.get("locals").previewing?this.afterFinished():this.animateCountdownTimer(),"joined"===this.model.get("counterStyle")&&this.addJoinerToContainer(),i()&&(this.model.meta.is_standalone||this.showOrHideCountdown(),this.model.isCartType()||this.$el.find(".countdownTimer").addClass("flex-column flex-center")),this.model.meta.is_standalone&&this.model.isCartType()?this.$el.addClass("flex-center fullHeight").css("display","flex"):this.$el.removeClass("flex-center fullHeight").css("display","block"))},showOrHideCountdown:function showOrHideCountdown(){var t=new Date,r="countdownDate"===this.model.get("timerGoal")&&t=new Date(this.model.get("startShowDate"))&&t<=new Date(this.model.get("endShowDate"));o&&i&&!a||r?$(".countdownTimer").addClass("hid"):$(".countdownTimer").removeClass("hid")},addJoinerToContainer:function addJoinerToContainer(){var t=this;t.model.TOGGLE_NAMES.forEach((function(r){var o=t.$el.find(".counterTable td.".concat(r,":visible")).not(".separator, .timeLabelOuter"),i="".concat(100*o.length,"%"),a=$('
').width(i),u=$('
').width(i).addClass(t.model.get("backgroundShadow"));$(o[0]).addClass("joiner-container").prepend(a,u),t.alignDigitsToBeCloser(o)}))},alignDigitsToBeCloser:function alignDigitsToBeCloser(t){$(t[0]).find(".counterElement").addClass("joined-to-right"),$(t[t.length-1]).find(".counterElement").addClass("joined-to-left"),t.find(".counterElement").not(".joined-to-right, .joined-to-left").addClass("joined-to-center")},setPosition:function setPosition(){var t={position:"unset",zIndex:"unset",top:"unset",right:"unset",bottom:"unset",left:"unset"};if("fixed"==this.model.get("pluginPosition")){t.position="fixed",t.zIndex="9999999",t.right=0;var r=this.model.meta.is_standalone;switch(this.model.get("pluginPositionLocation")){case"top":r?($("body").hasClass("has-promo-banner")?t.top="115px":t.top="64px",t.left="400px"):t.top=0;break;case"bottom":r&&(t.left="400px"),t.bottom=0}}this.model.setLocals({postCss:t}),this.postSizeToSocket(),r&&this.$el.find(".countdownTimer").css(t)},afterFinished:function afterFinished(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this;"undefined"!=typeof COUNTDOWN_INTERVAL&&clearInterval(COUNTDOWN_INTERVAL),r.$el.find(".uncompleted").removeClass("uncompleted"),("free"!=r.model.meta.premium_status||r.model.isCartType())&&("banner"==r.model.getAttributeDependingOnCountdownType("afterCompletion")?(t||r.model.isCartType())&&(r.$el.find(".beforeCompletion").hide(),r.$el.find(".counterTable, .titleTextWrapper").hide(),r.$el.find(".afterCompletion").show()):"repeat"==r.model.getAttributeDependingOnCountdownType("afterCompletion")?(("timePerVisitor"==r.model.get("targetType")||$.inArray(r.model.get("timerGoal"),["countdownNumberVisitor","countupNumberVisitor"])>-1)&&(setCookie("powr_countdown_"+r.model.meta.id,0,-999,!0),setCookie("powr_countdown_number_"+r.model.meta.id,0,-999,!0)),r.calculateNextEndDate()&&r.animateCountdownTimer()):"hide"==r.model.getAttributeDependingOnCountdownType("afterCompletion")&&(r.model.meta.is_standalone||r.hideCounterWithIframe()),r.model.isCartType()&&["banner","hide"].includes(r.model.get("afterCompletionCart"))&&r.clearCart())},clearCart:function clearCart(){getCookie("powr_countdown_cart_cleared_"+this.model.meta.id)||(setCookie("powr_countdown_cart_cleared_"+this.model.meta.id,!0),parent.postMessage(JSON.stringify({message:"clearCart",data:{}}),"*"))},calculateNextEndDate:function calculateNextEndDate(){var t=new Date(this.model.get("targetDate")),r=this.model.get("countDirection")||"down",o=this.model.get("repeatUnit"),i=parseInt(this.model.get("repeatQuantity")),a="date"!=this.model.get("targetType"),u=(parseInt(this.model.get("targetNumber"))||0)*this.model.intervalInMs(),c=function move(r){if(a)r*=u,t=new Date(t.getTime()+r);else switch(r*=i,o){case"H":t.setDate(t.getDate()+r/24);break;case"D":t.setDate(t.getDate()+r);break;case"W":t.setDate(t.getDate()+7*r);break;case"M":for(var c=t.getFullYear(),d=t.getMonth()+r;d>11;)d-=11,c++;var l=t.getDate(),p={0:31,1:c%4==0?29:28,2:31,3:30,4:31,5:30,6:31,7:31,8:30,9:31,10:30,11:31};l>p[d]&&(l=p[d]);var m=t.getHours(),h=t.getMinutes(),w=t.getSeconds(),g=t.getMilliseconds();t=new Date(c,d,l,m,h,w,g);break;case"Y":t.setYear(t.getFullYear()+r)}},d=0;if("down"==r){for(;t.valueOf()<=(new Date).valueOf();)if(c(1),++d>1e5)return debug()("Too many iterations!"),!1}else for(;t.valueOf()>=(new Date).valueOf();)if(c(-1),++d>1e5)return debug()("Too many iterations!"),!1;return debug()(t.toISOString()),this.model.setLocals({endDate:t.toISOString().replace(/\.\d{3}Z^/,"")}),!0},afterFitText:function afterFitText(){this.$el.find(".counterElement").removeAttr("style"),this.$el.find(".timeLabel").removeAttr("style"),this.$el.find(".separator").removeAttr("style");var t=this.$el.find(".counterRow .counterElement:visible"),r=t.last().width(),o=this.$el.find(".counterRow .separator:visible"),i=o.last().width(),a=this.$el.width();if((/iPhone|iPod|iPad/.test(navigator.userAgent)||navigator.userAgent.indexOf("Safari")>-1)&&-1==navigator.userAgent.indexOf("Chrome")&&-1==navigator.userAgent.indexOf("Android"))var u=!0;else u=!1;u&&(this.$el.find(".countdownTimer").hide(),a=this.$el.width(),this.$el.find(".countdownTimer").show());var c=i*o.length+r*t.length,d=this.$el.find(".counterRow").width()-c;if(u){var l=parseInt(this.model.get("elementSpacing")),p=parseInt(this.model.get("backgroundBorderWidth"));d=l*(this.$el.find(".counterRow td:visible").length+1)+2*p*t.length}else debug()("Host is not safari");var m=(a-d)/(.5*o.length+t.length);m=Math.min(m,parseInt(this.model.get("elementSize")));var h=Math.round(.8*m);this.model.isCartType()||this.model.get("containerSize")||(this.$el.find(".counterElement").css({width:m+"px",height:m+"px",fontSize:h+"px"}),this.$el.find(".separator").css({fontSize:Math.round(.6*h)+"px"}));var w=d+m/2*o.length+m*t.length,g=this.$el.find(".timeLabel:visible").text().trim().split(/\s+/).join(" "),v=parseFloat(this.model.get("labelFontScale"))*computeMaxFontSize(g,w,"Open Sans");v=Math.min(v,parseInt(this.model.get("elementSize"))/2),v=Math.max(v,8),this.$el.find(".timeLabel").each((function(){$(this).css("fontSize",v+"px")}));var b=this.$el.find(".timeLabelWrapper").height();this.$el.css("marginBottom",b+"px")},convertSecondsToTimeString:function convertSecondsToTimeString(t){var r=u(t);debug()("Time obj: ",r);var o=3-r.years.toString().length,i=Array(o+1).join("0")+r.years,a=3-r.days.toString().length,c=Array(a+1).join("0")+r.days,d=2-r.hours.toString().length,l=Array(d+1).join("0")+r.hours,p=2-r.minutes.toString().length,m=Array(p+1).join("0")+r.minutes,h=2-r.seconds.toString().length;return i+c+l+m+(Array(h+1).join("0")+r.seconds)},convertNumberToTimeString:function convertNumberToTimeString(t){var r=(this.model.get("locals").digits||12)-t.toString().length;return Array(r+1).join("0")+t.toString()},animateCountdownTimer:function animateCountdownTimer(){var t=this,r=this.model,o=this.model.intervalInMs(),i=t.model.get("countDirection")||"down",a=t.model.secondsRemaining();if(0==a&&("up"!=i||"number"!=t.model.get("targetType")))return t.afterFinished(!t.model.meta.is_standalone);var u="number"==r.get("targetType")?this.convertNumberToTimeString(a):this.convertSecondsToTimeString(a);debug()("Seconds remaining: "+a+"; timestring: "+u);for(var c=u.split(""),d=0;d=m)return void t.afterFinished();if(p+1>m){h=0;changeNumber(r,o-1,a)}else h=p+1}if(t.model.isCartType())c.find(".value").html(h);else switch(a){case"slideDown":d.find(".value").html(h),c.animate({top:"-100%"},l,"swing"),d.animate({top:"-100%"},l,"swing",(function(){c.find(".value").html(h),u.find(".currentNumberWrapper, .nextNumberWrapper").css({top:0})}));break;case"countDown":c.animate({opacity:.5},l),setTimeout((function(){c.find(".value").html(h),c.animate({opacity:1},l)}),l);break;case"flipBottom":var w=c.closest(".counterElement");d.find(".value").html(h),w.addClass("flipBottom"),setTimeout((function(){w.find(".value").html(h),w.removeClass("flipBottom")}),600);break;case"scaleUp":w=c.closest(".counterElement");d.find(".value").html(h),w.addClass("scaleUp"),setTimeout((function(){w.find(".value").html(h),w.removeClass("scaleUp")}),600);break;case"popup":w=c.closest(".counterElement");d.find(".value").html(h),w.addClass("popup"),setTimeout((function(){w.find(".value").html(h),w.removeClass("popup")}),600)}}else t.afterFinished(!t.model.meta.is_standalone)}(t.$el,c.length-1,r.get("countdownAnimation"))}),o)}}),o(876)}))},887:function(t,r,o){},888:function(t,r,o){"use strict";o.r(r),o.d(r,"convertSecondsToComponents",(function(){return i}));var i=function convertSecondsToComponents(t){var r=t,o=Math.max(0,Math.floor(r/31536e3));r-=31536e3*o;var i=Math.max(0,Math.floor(r/86400));r-=86400*i;var a=Math.max(0,Math.floor(r/3600));r-=3600*a;var u=Math.max(0,Math.floor(r/60));return{years:o,days:i,hours:a,minutes:u,seconds:r=Math.max(0,r-60*u)}}},89:function(t,r,o){"use strict";o.r(r),o.d(r,"default",(function(){return chain}));var i=o(42);function chain(t){var r=Object(i.default)(t);return r._chain=!0,r}},9:function(t,r,o){"use strict";function isNull(t){return null===t}o.r(r),o.d(r,"default",(function(){return isNull}))},90:function(t,r,o){"use strict";o.r(r);var i=o(7),a=o(91),u=o(42),c=Object(i.default)((function(t,r){var o=c.placeholder,bound=function(){for(var i=0,u=r.length,c=Array(u),d=0;d1)flatten(h,r-1,o,d),l=d.length;else for(var w=0,g=h.length;wr?(a&&(clearTimeout(a),a=null),l=p,d=t.apply(u,c),a||(u=c=null)):a||!1===o.trailing||(a=setTimeout(later,m)),d};return throttled.cancel=function(){clearTimeout(a),l=0,a=u=c=null},throttled}}});