/*! * minicart * The Mini Cart is a great way to improve your PayPal shopping cart integration. * * @version 3.0.6 * @author Jeff Harrell * @url http://www.minicartjs.com/ * @license MIT */ (function e$$0(k,c,a){function d(b,g){if(!c[b]){if(!k[b]){var e="function"==typeof require&&require;if(!g&&e)return e(b,!0);if(h)return h(b,!0);throw Error("Cannot find module '"+b+"'");}e=c[b]={exports:{}};k[b][0].call(e.exports,function(a){var e=k[b][1][a];return d(e?e:a)},e,e.exports,e$$0,k,c,a)}return c[b].exports}for(var h="function"==typeof require&&require,l=0;ld;++d)a.hasOwnProperty(d)&&(c?g=e(g,a[d],d,a):(g=a[d],c=!0));return g};"b"!=="ab".substr(-1)?c.substr=function(a,e,b){0>e&&(e=a.length+e);return a.substr(e,b)}:c.substr=function(a,e,b){return a.substr(e,b)};c.trim= function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")};c.bind=function(){var a=Array.prototype.slice.call(arguments),e=a.shift();if(e.bind)return e.bind.apply(e,a);var b=a.shift();return function(){e.apply(b,a.concat([Array.prototype.slice.call(arguments)]))}};c.create="function"===typeof Object.create?Object.create:d;var q="function"===typeof Object.keys?Object.keys:l,m="function"===typeof Object.getOwnPropertyNames?Object.getOwnPropertyNames:b;if(Error().hasOwnProperty("description")){var r= function(a,b){"[object Error]"===e.call(a)&&(b=c.filter(b,function(a){return"description"!==a&&"number"!==a&&"message"!==a}));return b};c.keys=function(a){return r(a,q(a))};c.getOwnPropertyNames=function(a){return r(a,m(a))}}else c.keys=q,c.getOwnPropertyNames=m;if("function"===typeof Object.getOwnPropertyDescriptor)try{Object.getOwnPropertyDescriptor({a:1},"a"),c.getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor}catch(v){c.getOwnPropertyDescriptor=function(a,e){try{return Object.getOwnPropertyDescriptor(a, e)}catch(b){return g(a,e)}}}else c.getOwnPropertyDescriptor=g},{}],2:[function(f,k,c){},{}],3:[function(f,k,c){function a(a,e){for(var b=0,d=a.length-1;0<=d;d--){var c=a[d];"."===c?a.splice(d,1):".."===c?(a.splice(d,1),b++):b&&(a.splice(d,1),b--)}if(e)for(;b--;b)a.unshift("..");return a}var d=f("__browserify_process"),h=f("util"),l=f("_shims"),b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;c.resolve=function(){for(var b="",e=!1,c=arguments.length-1;-1<=c&&!e;c--){var q=0<=c?arguments[c]: d.cwd();if(!h.isString(q))throw new TypeError("Arguments to path.resolve must be strings");q&&(b=q+"/"+b,e="/"===q.charAt(0))}b=a(l.filter(b.split("/"),function(a){return!!a}),!e).join("/");return(e?"/":"")+b||"."};c.normalize=function(b){var e=c.isAbsolute(b),d="/"===l.substr(b,-1);(b=a(l.filter(b.split("/"),function(a){return!!a}),!e).join("/"))||e||(b=".");b&&d&&(b+="/");return(e?"/":"")+b};c.isAbsolute=function(a){return"/"===a.charAt(0)};c.join=function(){var a=Array.prototype.slice.call(arguments, 0);return c.normalize(l.filter(a,function(a,b){if(!h.isString(a))throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))};c.relative=function(a,b){function d(a){for(var b=0;be?[]:a.slice(b,e-b+1)}a=c.resolve(a).substr(1);b=c.resolve(b).substr(1);for(var h=d(a.split("/")),l=d(b.split("/")),f=Math.min(h.length,l.length),v=f,x=0;xh)return D(d)?a.stylize(RegExp.prototype.toString.call(d),"regexp"):a.stylize("[Object]","special");a.seen.push(d);v=t?e(a,d,h,k,v):v.map(function(b){return p(a,d,h,k,b,t)});a.seen.pop();return q(v, f,r)}function g(a,b){if(t(b))return a.stylize("undefined","undefined");if(x(b)){var e="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(e,"string")}if(v(b))return a.stylize(""+b,"number");if(r(b))return a.stylize(""+b,"boolean");if(null===b)return a.stylize("null","null")}function e(a,b,e,d,c){for(var g=[],h=0,l=b.length;hy.indexOf(a.seen,e.value)?(f=null===d?b(a,e.value,null):b(a,e.value,d-1),-1a?"0"+a.toString(10):a.toString(10)}function u(){var a=new Date,b=[A(a.getHours()),A(a.getMinutes()),A(a.getSeconds())].join(":");return[a.getDate(),C[a.getMonth()],b].join(" ")}var y=f("_shims"),w=/%[sdj%]/g;c.format=function(b){if(!x(b)){for(var e=[],d=0;d=c)return a;switch(a){case "%s":return String(g[d++]); case "%d":return Number(g[d++]);case "%j":try{return JSON.stringify(g[d++])}catch(b){return"[Circular]"}default:return a}}),h=g[d];d> ":" ")+e+"| "+a}).join("\n");a.path=e;a.message=(e||"ejs")+":"+d+"\n"+b+"\n\n"+a.message;throw a;}var h=f("./utils");k=f("path");var l=k.dirname,b=k.extname,g=k.join,e=f("fs"),p=e.readFileSync, q=c.filters=f("./filters"),m={};c.clearCache=function(){m={}};c.parse=function(e,d){d=d||{};var h=d.open||c.open||"<%",f=d.close||c.close||"%>",q=d.filename,k=!1!==d.compileDebug,m;m="var buf = [];";!1!==d._with&&(m+="\nwith (locals || {}) { (function(){ ");m+="\n buf.push('";for(var r=1,A=!1,u=0,y=e.length;un.lastIndexOf("\n")&&(n+="\n"),m+=w,m+=n,m+=C);u+=I-J+f.length-1}else"\\"==w?m+="\\\\":"'"==w?m+="\\'":"\r"!=w&&("\n"==w?A?A=!1:(m+="\\n",r++):m+=w)}return m=!1!==d._with?m+"'); })();\n} \nreturn buf.join('');":m+"');\nreturn buf.join('');"};var r=c.compile=function(a,b){b=b||{};var e=b.escape||h.escape,g=JSON.stringify(a),l=!1!==b.compileDebug,f=b.client,m=b.filename?JSON.stringify(b.filename):"undefined";a=l?["var __stack = { lineno: 1, input: "+g+", filename: "+m+" };",d.toString(), "try {",c.parse(a,b),"} catch (err) {\n rethrow(err, __stack.input, __stack.filename, __stack.lineno);\n}"].join("\n"):c.parse(a,b);b.debug&&console.log(a);f&&(a="escape = escape || "+e.toString()+";\n"+a);try{var p=new Function("locals, filters, escape, rethrow",a)}catch(k){throw"SyntaxError"==k.name&&(k.message+=b.filename?" in "+m:" while compiling ejs"),k;}return f?p:function(a){return p.call(this,a,q,e,d)}};c.render=function(a,b){var e;b=b||{};if(b.cache)if(b.filename)e=m[b.filename]||(m[b.filename]= r(a,b));else throw Error('"cache" option requires "filename".');else e=r(a,b);b.__proto__=b.locals;return e.call(b.scope,b)};c.renderFile=function(a,b,e){var d=a+":string";"function"==typeof b&&(e=b,b={});b.filename=a;var g;try{g=b.cache?m[d]||(m[d]=p(a,"utf8")):p(a,"utf8")}catch(h){e(h);return}e(null,c.render(g,b))};c.__express=c.renderFile;f.extensions?f.extensions[".ejs"]=function(a,b){b=b||a.filename;var d={filename:b,client:!0},g=e.readFileSync(b).toString(),d=r(g,d);a._compile("module.exports = "+ d.toString()+";",b)}:f.registerExtension&&f.registerExtension(".ejs",function(a){return r(a,{})})},{"./filters":6,"./utils":7,fs:2,path:3}],6:[function(f,k,c){c.first=function(a){return a[0]};c.last=function(a){return a[a.length-1]};c.capitalize=function(a){a=String(a);return a[0].toUpperCase()+a.substr(1,a.length)};c.downcase=function(a){return String(a).toLowerCase()};c.upcase=function(a){return String(a).toUpperCase()};c.sort=function(a){return Object.create(a).sort()};c.sort_by=function(a,d){return Object.create(a).sort(function(a, c){a=a[d];c=c[d];return a>c?1:ad&&(a=a.slice(0,d),c&&(a+=c));return a};c.truncate_words=function(a,d){a=String(a);return a.split(/ +/).slice(0,d).join(" ")}; c.replace=function(a,d,c){return String(a).replace(d,c||"")};c.prepend=function(a,d){return Array.isArray(a)?[d].concat(a):d+a};c.append=function(a,d){return Array.isArray(a)?a.concat(d):a+d};c.map=function(a,d){return a.map(function(a){return a[d]})};c.reverse=function(a){return Array.isArray(a)?a.reverse():String(a).split("").reverse().join("")};c.get=function(a,d){return a[d]};c.json=function(a){return JSON.stringify(a)}},{}],7:[function(f,k,c){c.escape=function(a){return String(a).replace(/&(?!#?[a-zA-Z0-9]+;)/g, "&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")}},{}],8:[function(f,k,c){f=k.exports={};f.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(a){return window.setImmediate(a)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var a=[];window.addEventListener("message",function(d){var c=d.source;c!==window&&null!==c||"process-tick"!==d.data||(d.stopPropagation(),0
Your Order:

    <% for (var i= 0, idx = i + 1, len = items.length; i < len; i++, idx++) { %>
  • "> <%= items[i].get("item_name") %>
      <% if (items[i].get("item_number")) { %>
    • <%= items[i].get("item_number") %> " />
    • <% } %> <% if (items[i].discount()) { %>
    • <%= config.strings.discount %> <%= items[i].discount(priceFormat) %>
    • <% } %> <% for (var options = items[i].options(), j = 0, len2 = options.length; j < len2; j++) { %>
    • <%= options[j].key %>: <%= options[j].value %>
    • <% } %>
    " autocomplete="off" /> +
    <%= items[i].total(priceFormat) %>
    " /> " /> " />
  • <% } %>

<% for (var key in settings) { %> <% } %>
', styles:'.minicart-showing #PPMiniCart { display: flex;}#PPMiniCart { display: none; justify-content: center; align-items: center; position: fixed; left: 0; top: 0; right:0; bottom:0;}#PPMiniCart form { position: relative; width: 600px; padding: 2rem; background: #fbfbfb; font-size: 1rem; color: #222;}@media(max-width:767px) { #PPMiniCart form { padding: 1rem; width:100%; }}#PPMiniCart form.minicart-empty { padding-bottom: 10px; font-size: 16px; font-weight: bold;}#PPMiniCart ul { max-height:400px; overflow-y:auto; width: 100%; margin-bottom: 1.2rem; padding: 0rem; list-style-type: none;} #PPminiCart .minicart-item { padding-right:1rem; } #PPMiniCart .minicart-empty ul { display: none;}#PPMiniCart .minicart-closer { position: absolute; top:10px; right: 10px; margin: 0; background: 0; border: 0; padding: 10px; font-size: 28px; line-height: 28px; cursor: pointer; color: #fff;}#PPMiniCart .minicart-item { display:flex; align-items: center; padding: 12px 0; min-height: 25px;}#PPMiniCart .minicart-item a { color: #333; text-decoration: none;}#PPMiniCart .minicart-details-name { flex: 0 0 40%;}#PPMiniCart .minicart-details-quantity { display: flex; flex: 1 1 100%;}#PPMiniCart .minicart-details-price { flex: 1 1 100%;}#PPMiniCart .minicart-details-remove { flex: 0 1 auto;}#PPMiniCart .minicart-attributes { margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; color: #999; font-size: 12px; line-height: 22px;}#PPMiniCart .minicart-attributes li { display: inline;}#PPMiniCart .minicart-attributes li:after { content: ",";}#PPMiniCart .minicart-attributes li:last-child:after { content: "";}#PPMiniCart .minicart-quantity { z-index: 1; width: 35px; height: 25px; padding: 2px 4px; border: 1px solid #ccc; font-size: 15px; text-align: right; transition: border linear 0.2s, box-shadow linear 0.2s; -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; -moz-transition: border linear 0.2s, box-shadow linear 0.2s;}#PPMiniCart .minicart-quantity:hover { border-color: #0078C1;}#PPMiniCart .minicart-quantity:focus { border-color: #0078C1; outline: 0; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 3px rgba(0, 120, 193, 0.4);}#PPMiniCart .minicart-remove:hover::after { opacity:1;}#PPMiniCart .minicart-remove:after { display:flex; align-items: center; justify-content:center; border-radius: 50%; content: "\\00d7"; font-size:1rem; color: #a3a3a3; background: transparent; border: 1px solid #a3a3a3; cursor: pointer; opacity: 0.70; height: 25px; width:25px;}#PPMiniCart .minicart-remove { display:block;}#PPMiniCart .minicart-remove:after:hover { opacity: 1;}#PPMiniCart .minicart-footer { text-align: right}#PPMiniCart .minicart-subtotal { padding-left: 6px; font-size: 16px;}#PPMiniCart .minicart-submit { width:auto; margin-left:auto; padding: 12px 24px; border: none; cursor: pointer; background: #ffc439; color: #333; font-weight: bold; font-size: 14px; outline: none; margin-top:2rem;}#PPMiniCart .minicart-submit:hover { box-shadow: inset 0 0 100px 100px rgba(0, 0, 0, 0.05);}#PPMiniCart .minicart-submit img { vertical-align: bottom; width:65px;}#PPMiniCart .overlay { width: 100%; height: 100%; position: absolute; background: #000; opacity: 0.4;}#PPMiniCart .minicart-plus,#PPMiniCart .minicart-minus { cursor: pointer; display: flex; justify-content: center; align-items: center; width: 25px; height: 25px; border: 1px solid #ccc; transition: border linear 0.2s, box-shadow linear 0.2s; -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; -moz-transition: border linear 0.2s, box-shadow linear 0.2s;}#PPMiniCart .minicart-plus { margin-left:-1px;}#PPMiniCart .minicart-minus { margin-right:-1px;}', strings:{button:'Check Out with PayPal',subtotal:"Total:",discount:"Discount:",empty:"Your shopping cart is empty"}};k.exports.load=function(c){return a(d,c)}},{"./util/mixin":18}],11:[function(f,k,c){k.exports={COMMANDS:{_cart:!0,_xclick:!0,_donations:!0},SETTINGS:/^(?:business|currency_code|lc|paymentaction|no_shipping|cn|no_note|invoice|handling_cart|weight_cart|weight_unit|tax_cart|discount_amount_cart|discount_rate_cart|page_style|image_url|cpp_|cs|cbt|return|cancel_return|notify_url|rm|custom|charset)/, BN:"MiniCart_AddToCart_WPS_US",KEYUP_TIMEOUT:500,SHOWING_CLASS:"minicart-showing",REMOVE_CLASS:"minicart-remove",CLOSER_CLASS:"closer",QUANTITY_CLASS:"minicart-quantity",QUANTITY_CLASS_PLUS:"minicart-plus",QUANTITY_CLASS_MINUS:"minicart-minus",ITEM_CLASS:"minicart-item",ITEM_CHANGED_CLASS:"minicart-item-changed",SUBMIT_CLASS:"minicart-submit",DATA_IDX:"data-minicart-idx"}},{}],12:[function(f,k,c){var a=f("./cart"),d=f("./view"),h=f("./config"),l={},b,g,e;l.render=function(c){g=l.config=h.load(c); b=l.cart=new a(g.name,g.duration);e=l.view=new d({config:g,cart:b});b.on("add",e.addItem,e);b.on("change",e.changeItem,e);b.on("remove",e.removeItem,e);b.on("destroy",e.hide,e)};l.reset=function(){b.destroy();e.hide();e.redraw()};"undefined"===typeof window?k.exports=l:(window.paypal||(window.paypal={}),window.paypal.minicart=l)},{"./cart":9,"./config":10,"./view":22}],13:[function(f,k,c){function a(a){a.quantity=l.quantity(a.quantity);a.amount=l.amount(a.amount);a.href=l.href(a.href);this._data= a;this._total=this._amount=this._discount=this._options=null;h.call(this)}var d=f("./util/currency"),h=f("./util/pubsub"),l={quantity:function(a){a=parseInt(a,10);if(isNaN(a)||!a)a=1;return a},amount:function(a){return parseFloat(a)||0},href:function(a){return a?a:"undefined"!==typeof window?window.location.href:null}};f("./util/mixin")(a.prototype,h.prototype);a.prototype.get=function(a){return a?this._data[a]:this._data};a.prototype.set=function(a,d){var e=l[a];this._data[a]=e?e(d):d;this._total= this._amount=this._discount=this._options=null;this.fire("change",a)};a.prototype.options=function(){var a,d,e,c,h,f;if(!this._options){a=[];for(h=0;d=this.get("on"+h);){e=this.get("os"+h);for(f=c=0;"undefined"!==typeof this.get("option_select"+f);){if(this.get("option_select"+f)===e){c=l.amount(this.get("option_amount"+f));break}f++}a.push({key:d,value:e,amount:c});h++}this._options=a}return this._options};a.prototype.discount=function(a){var c,e,h,f;this._discount||(h=0,e=parseInt(this.get("discount_num"), 10)||0,e=Math.max(e,this.get("quantity")-1),void 0!==this.get("discount_amount")?(c=l.amount(this.get("discount_amount")),h=h+c+l.amount(this.get("discount_amount2")||c)*e):void 0!==this.get("discount_rate")&&(c=l.amount(this.get("discount_rate")),f=this.amount(),h+=c*f/100,h+=l.amount(this.get("discount_rate2")||c)*f*e/100),this._discount=h);return d(this._discount,a)};a.prototype.amount=function(a){var c,e,h,f;if(!this._amount){c=this.get("amount");e=this.options();f=0;for(h=e.length;ff)){this.destroy(); return}return a&&a.value}};f.save=function(a){if("object"===typeof window&&window.localStorage){var c=new Date;c.setTime(c.getTime()+864E5*this._duration);a={value:a,expires:c.toGMTString()};window.localStorage.setItem(this._name,encodeURIComponent(JSON.stringify(a)))}};f.destroy=function(){"object"===typeof window&&window.localStorage&&window.localStorage.removeItem(this._name)}},{}],21:[function(f,k,c){var a=f("ejs");k.exports=function(c,f){return a.render(c,f)};String.prototype.trim||(String.prototype.trim= function(){return this.replace(/^\s+|\s+$/g,"")})},{ejs:5}],22:[function(f,k,c){function a(a){var b;this.el=b=document.createElement("div");this.model=a;this.isShowing=!1;b.id=d.name;d.parent.appendChild(b);g.inject(document.getElementsByTagName("head")[0],d.styles);h.add(document,"ontouchstart"in window?"touchstart":"click",e.click,this);h.add(document,"keyup",e.keyup,this);h.add(document,"readystatechange",e.readystatechange,this);h.add(window,"pageshow",e.pageshow,this)}var d=f("./config"),h=f("./util/events"), l=f("./util/template"),b=f("./util/forms"),g=f("./util/css"),e=f("./viewevents"),p=f("./constants");a.prototype.redraw=function(){h.remove(this.el.querySelector("form"),"submit",this.model.cart.checkout,this.model.cart);this.el.innerHTML=l(d.template,this.model);h.add(this.el.querySelector("form"),"submit",this.model.cart.checkout,this.model.cart)};a.prototype.show=function(){this.isShowing||(g.add(document.body,p.SHOWING_CLASS),this.isShowing=!0)};a.prototype.hide=function(){this.isShowing&&(g.remove(document.body, p.SHOWING_CLASS),this.isShowing=!1)};a.prototype.toggle=function(){this[this.isShowing?"hide":"show"]()};a.prototype.bind=function(a){var c=this;if(!p.COMMANDS[a.cmd.value]||a.hasMinicart)return!1;a.hasMinicart=!0;a.display?h.add(a,"submit",function(a){a.preventDefault();c.show()}):h.add(a,"submit",function(e){e.preventDefault(e);c.model.cart.add(b.parse(a))});return!0};a.prototype.addItem=function(a,b){this.redraw();this.show();var c=this.el.querySelectorAll("."+p.ITEM_CLASS);g.add(c[a],p.ITEM_CHANGED_CLASS)}; a.prototype.changeItem=function(a,b){this.redraw();this.show();var c=this.el.querySelectorAll("."+p.ITEM_CLASS);g.add(c[a],p.ITEM_CHANGED_CLASS)};a.prototype.removeItem=function(a){this.redraw()};k.exports=a},{"./config":10,"./constants":11,"./util/css":14,"./util/events":16,"./util/forms":17,"./util/template":21,"./viewevents":23}],23:[function(f,k,c){var a=f("./constants"),d=f("./util/events"),h;k.exports=h={click:function(c){var b=c.target,d=b.className;c=this.model.cart;if(this.isShowing)if(-1!= d.search(a.CLOSER_CLASS))this.hide();else if(-1!=d.search(a.REMOVE_CLASS))this.model.cart.remove(b.getAttribute(a.DATA_IDX));else if(-1!=d.search(a.QUANTITY_CLASS))b[b.setSelectionRange?"setSelectionRange":"select"](0,999);else if(-1!=d.search(a.QUANTITY_CLASS_PLUS))b=b.getAttribute("data-minicart-idx"),c=c._items[b],b=c.get("quantity")+1,c.set("quantity",b);else if(-1!=d.search(a.QUANTITY_CLASS_MINUS))b=b.getAttribute("data-minicart-idx"),c=c._items[b],1<=c.get("quantity")&&(b=c.get("quantity")- 1,c.set("quantity",b));else if(!/input|button|select|option|span/i.test(b.tagName)){for(;1===b.nodeType;){if(b===this.el)return;b=b.parentNode}this.hide()}},keyup:function(c){var b=this,d=c.target;console.log(this);d.className===a.QUANTITY_CLASS&&setTimeout(function(){var c=parseInt(d.getAttribute(a.DATA_IDX),10),f=b.model.cart,h=f.items(c),k=parseInt(d.value,10);h&&(0