/*

Shopping Guarantee Loader
Copyright 2025, BuySafe, Inc.
20250821
*/
var bs_R=window.bs_R||{},buySAFE=window.buySAFE||{},_GUARANTEE=window._GUARANTEE||buySAFE;
(function(a,c){a.T0=a.T0||new Date;if(!a.sRoot){a.sRootHost="https://seal.buysafe.com";a.sRoot=a.sRootHost+"/private/rollover/";for(var l=document.getElementsByTagName("script"),k=0;k<l.length;k++){var d=l[k].src;if(d&&(d=d.substr(0,100),d=d.match(/((.*)\/private\/.*\/)rollover(?:\.unpacked)?\.js/i)||d.match(/()(.*)\/(Web\/Seal|SealCore\/api)\/gjs/i))){a.sRootHost=d[2];a.sRoot=d[1]||a.sRootHost+"/private/rollover/";break}}}a.aExecQ=a.aExecQ||[];a.onEvent=function(b,f,g){if(b){var e=b.addEventListener;
b=b.attachEvent;e?e(f,g,!1):b&&b("on"+f,g)}};a.onLoad=function(b,f){if(b)if(a.fOnLoad||f||"complete"===document.readyState)b();else a.onEvent(window,"load",b)};a.AddJS=function(b,f,g){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=b;a.onLoad(function(){window.setTimeout(function(){var h=document.getElementsByTagName("script")[0];h&&h.parentNode&&h.parentNode.insertBefore(e,h)},f||10)},!g)};c.Loaded||(c.Hash||(c.Hash=""),c.Guarantee||(c.Guarantee={order:"",total:"",
email:""}),c.Seal||(c.Seal={bgcolor:"#FFFFFF"}),c.Button||(c.Button={bgcolor:"#FFFFFF"}),c.Loaded=1)})(bs_R,buySAFE);var buySAFESealConfig=buySAFE.Seal,buySAFEButtonConfig=buySAFE.Button;
(function(a){function c(e,h){h[e]||(h[e]=function(){a.aExecQ.push([e,h,arguments])})}a.onLoad(function(){a.fOnLoad=1});for(var l=[["+AffiliateSeal"],["+Button"],["+ButtonAjax"],["+ButtonAjaxInvisible"],["+ButtonInvisible"],["+Guarantee"],["+Kickers"],["+Seal"],["+TrustRatingSeal"],["+TrustSeal"],["buysafeGetAffiliateURL"],["Display",1]],k=[{},{pre:"WriteBuySafe"},{pre:"Write",obj:"buySAFE"}],d=0;d<l.length;d++)for(var b=1;b<k.length;b++){var f=k[b],g=l[d];g[b]||(g=g[0].replace(/^\+/,f.pre),c(g,f.obj&&
window[f.obj]||window))}a.AddJS(a.sRoot+"rollover.core.js",100)})(bs_R);
//  Client specific code
var buySAFE = window.buySAFE || {};
var _GUARANTEE = window._GUARANTEE || buySAFE;
if(!_GUARANTEE.Guarantee)  _GUARANTEE.Guarantee = { order:'', total:'', email:'' };
_GUARANTEE.Hash = '2BfHQuwq%2bVUTCw%2fj0JUCWWHtpiGO5GIBd%2bfyn0QV2diN%2fTQ2q4Ar%2frs7YD6ai1N5r3IreUx95YDcERQDdMh7FA%3d%3d';
_GUARANTEE.EnableClientDisplay = 1;
_GUARANTEE.NoEmailAddr = 1;
_GUARANTEE.Version = 'V4';
_GUARANTEE.Guarantee.hidden = 1;
//CJSS
_GUARANTEE.SealCore   = 1;
_GUARANTEE.SealExt    = 'svg';
_GUARANTEE.KickerExt  = 'svg';

_GUARANTEE.Responsive = {
  Breakpoints : [ 480, 767, 991 ],
  Seal : { Breakpoint : 1, SealV2 : { Mobile: { type: 'Tab',   bottom:'30px', NoAnimate: 0 }, Desktop: { type: 'Float', bottom:'30px',  NoAnimate: 0 } } }};


if ( document.location.href.match( new RegExp("/cart", "i") ) ) {
  _GUARANTEE.InsertKickers = [{"loc":"Last","anchorTagName":"DIV","anchorID":"","anchorClass":"cart__additional","path":["c1","c1"],"kickerType":"Kicker Custom Minimal1","kickerStyle":"margin:20px 0 0;","containerTagName":"DIV","containerStyle":"text-align:center;","responsive":['Mobile','Minimal2','Minimal1','Minimal1']}];
}
else if ( document.location.href.match( new RegExp("/products/", "i") ) ) {
  _GUARANTEE.InsertKickers = [{"loc":"After","anchorTagName":"DIV","anchorID":"","anchorClass":"klarna-container","path":[],"kickerType":"Kicker Custom Minimal1","kickerStyle":"margin:20px 0 0 15px;","containerTagName":"DIV","containerStyle":"text-align:center;","responsive":['','','','Minimal1']},
                              {"loc":"Last","anchorTagName":"DIV","anchorID":"product--page","anchorClass":"product__page--info","path":[],"kickerType":"Kicker Custom 3","kickerStyle":"","containerTagName":"DIV","containerStyle":"text-align:center;","responsive":['Mobile','Mobile','Mobile','']}];
}



_GUARANTEE.WriteSeal();


if (window.Shopify && window.Shopify.checkout && !(window.location.href.match(/\/orders\//i))) {
  var orderNumberString = Checkout.jQuery('.os-order-number')[0].innerHTML;
  var orderNumber = orderNumberString.match(/\d+/)[0];

  _GUARANTEE.Guarantee.order = orderNumber;
  _GUARANTEE.Guarantee.subtotal = Shopify.checkout.subtotal_price;
  _GUARANTEE.Guarantee.currency = Shopify.checkout.currency;
  _GUARANTEE.Guarantee.email = Shopify.checkout.email;
  _GUARANTEE.WriteGuarantee();
}
//CJSE
