(()=>{var r={97:(P,t,e)=>{var k=e(450).default;function r(){P.exports=function(){return a},P.exports.__esModule=!0,P.exports.default=P.exports;var c,a={},t=Object.prototype,s=t.hasOwnProperty,l=Object.defineProperty||function(t,e,r){t[e]=r.value},e="function"==typeof Symbol?Symbol:{},n=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",o=e.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(c){i=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o,i,a,u,e=e&&e.prototype instanceof m?e:m,e=Object.create(e.prototype),n=new L(n||[]);return l(e,"_invoke",{value:(o=t,i=r,a=n,u=p,function(t,e){if(u===y)throw Error("Generator is already running");if(u===d){if("throw"===t)throw e;return{value:c,done:!0}}for(a.method=t,a.arg=e;;){var r=a.delegate;if(r){r=function t(e,r){var n=r.method,o=e.iterator[n];if(o===c)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=c,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;n=f(o,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,v;o=n.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=c),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}(r,a);if(r){if(r===v)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(u===p)throw u=d,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);u=y;r=f(o,i,a);if("normal"===r.type){if(u=a.done?d:h,r.arg===v)continue;return{value:r.arg,done:a.done}}"throw"===r.type&&(u=d,a.method="throw",a.arg=r.arg)}})}),e}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var p="suspendedStart",h="suspendedYield",y="executing",d="completed",v={};function m(){}function g(){}function b(){}var e={},w=(i(e,n,function(){return this}),Object.getPrototypeOf),w=w&&w(w(E([]))),x=(w&&w!==t&&s.call(w,n)&&(e=w),b.prototype=m.prototype=Object.create(e));function O(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function S(a,u){var e;l(this,"_invoke",{value:function(r,n){function t(){return new u(function(t,e){!function e(t,r,n,o){var i,t=f(a[t],a,r);if("throw"!==t.type)return(r=(i=t.arg).value)&&"object"==k(r)&&s.call(r,"__await")?u.resolve(r.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):u.resolve(r).then(function(t){i.value=t,n(i)},function(t){return e("throw",t,n,o)});o(t.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}})}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function E(e){if(e||""===e){var r,t=e[n];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return r=-1,(t=function t(){for(;++r{function r(t){return e.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},956:(t,e,r)=>{function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}r=r(97)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"===("undefined"==typeof globalThis?"undefined":n(globalThis))?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},n={};function o(t){var e=n[t];return void 0!==e||(e=n[t]={exports:{}},r[t](e,e.exports,o)),e.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);{function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t){t=((t,e)=>{if("object"!=a(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=a(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string");return"symbol"==a(t)?t:t+""}function c(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function t(u){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=u.apply(t,a);function o(t){c(n,e,r,o,i,"next",t)}function i(t){c(n,e,r,o,i,"throw",t)}o(void 0)})}}var e=o(956),s=o.n(e);let i=function(n){var o=1{var e=t(s().mark(function t(e){var r,n,o;return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,r=JSON.parse(localStorage.getItem("avada-offer-discounts"))){t.next=4;break}return t.abrupt("return");case 4:return n=0,o=r.map(function(r){var t=window.Shopify.checkout.line_items.map(function(e){var t=r.productCart.find(function(t){return e.variant_id===t.variant_id&&e.quantity===t.quantity&&t.properties["_avada discount"]});return t?f(f({},e),{},{properties:t.properties}):e}).filter(function(t){return t.properties["_avada discount"]});if(0!==t.length)return n+=t.map(function(t){return parseFloat(t.line_price)-parseFloat((null==(t=t.discount_allocations[0])?void 0:t.amount)||0)}).reduce(function(t,e){return t+e},0),t=t.reduce(function(t,e){return t=e.properties._offerId===r.offerId?t+parseFloat(e.line_price)-parseFloat((null==(e=e.discount_allocations[0])?void 0:e.amount)||0):t},0),{discountId:r.discountId,offerId:r.offerId,total:t}}),localStorage.removeItem("avada-offer-discounts"),t.next=9,i("https://".concat("boostsales.apps.avada.io","/client/tracking/revenue"),"POST",{shop:e,total:n,data:o},{contentType:"text/plain"});case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0),console.log(t.t0);case 14:case"end":return t.stop()}},t,null,[[0,11]])}));return function(t){return e.apply(this,arguments)}})();t(s().mark(function t(){return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((()=>{try{return window.Shopify.Checkout.isOrderStatusPage||"/checkout/thank_you"===window.ShopifyAnalytics.meta.page.path}catch(t){}})())return console.log("%c Thank you guys","background: #054597; color: white"),t.next=4,p(window.Shopify.shop);t.next=4;break;case 4:case"end":return t.stop()}},t)}))()}})();