(function(t){"use strict";var e=function(){var e={},a=null,r={currencySymbol:"$",classCartIcon:"my-cart-icon",classCartBadge:"my-cart-badge",classProductQuantity:"my-product-quantity",classProductRemove:"my-product-remove",classCheckoutCart:"my-cart-checkout",affixCartIcon:!0,showCheckoutModal:!0,numberOfDecimals:2,cartItems:null,clickOnAddToCart:function(t){},afterAddOnCart:function(t,e,a){},clickOnCartIcon:function(t,e,a,r){},checkoutCart:function(t,e,a){return!1},getDiscountPrice:function(t,e,a){return null}},n=function(e){a=t.extend({},r),"object"==typeof e&&t.extend(a,e)},o=function(){return a};return e.loadOptions=n,e.getOptions=o,e}(),a=function(){var t={},a=function(t){if(isNaN(t))throw new Error("Parameter is not a Number");t*=1;var a=e.getOptions();return t.toFixed(a.numberOfDecimals)};return t.getRoundedNumber=a,t}(),r=function(){var e={};localStorage.products=localStorage.products?localStorage.products:"";var r=function(e){var a=-1,r=i();return t.each(r,function(t,r){if(r.id==e)return void(a=t)}),a},n=function(t){localStorage.products=JSON.stringify(t)},o=function(t,e,a,r,o,c){var d=i();d.push({id:t,name:e,summary:a,price:r,quantity:o,image:c}),n(d)},i=function(){try{var t=JSON.parse(localStorage.products);return t}catch(t){return[]}},c=function(t,e){var a=r(t);if(a<0)return!1;var o=i();return o[a].quantity="undefined"==typeof e?1*o[a].quantity+1:e,n(o),!0},d=function(e,a,r,n,i,d){return"undefined"==typeof e?(console.error("id required"),!1):"undefined"==typeof a?(console.error("name required"),!1):"undefined"==typeof d?(console.error("image required"),!1):t.isNumeric(n)?t.isNumeric(i)?(r="undefined"==typeof r?"":r,void(c(e)||o(e,a,r,n,i,d))):(console.error("quantity is not a number"),!1):(console.error("price is not a number"),!1)},u=function(){n([])},s=function(e){var a=i();a=t.grep(a,function(t,a){return t.id!=e}),n(a)},l=function(){var e=0,a=i();return t.each(a,function(t,a){e+=1*a.quantity}),e},m=function(){var e=i(),r=0;return t.each(e,function(t,e){r+=e.quantity*e.price,r=1*a.getRoundedNumber(r)}),r};return e.getAllProducts=i,e.updatePoduct=c,e.setProduct=d,e.clearProduct=u,e.removeProduct=s,e.getTotalQuantity=l,e.getTotalPrice=m,e}(),n=function(n){var o=e.getOptions(),i=t("."+o.classCartIcon),c=t("."+o.classCartBadge),d=o.classProductQuantity,u=o.classProductRemove,s=o.classCheckoutCart,l="my-cart-modal",m="my-cart-table",y="my-cart-grand-total",f="my-cart-empty-message",g="my-cart-discount-price",p="my-product-total",h="my-cart-icon-affix";o.cartItems&&o.cartItems.constructor===Array&&(r.clearProduct(),t.each(o.cartItems,function(){r.setProduct(this.id,this.name,this.summary,this.price,this.quantity,this.image)})),c.text(r.getTotalQuantity()),t("#"+l).length||t("body").append('