(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".sb__typography{margin:0;font-family:Roboto,Helvetica,Arial,sans-serif;font-size:20px;line-height:1.5;letter-spacing:.00938em;text-align:center;font-family:League Spartan;font-weight:200;color:#2e5eab}.sb__dialog hr{margin:0;flex-shrink:0;border-width:0;border-style:solid;border-color:#0000001f;border-bottom-width:thin}.sb__dialog{position:fixed;z-index:1300;right:0;bottom:0;top:0;left:0;z-index:2147483647;transition:opacity 2.25s cubic-bezier(0,0,.2,1) 0ms}.sb__dialog-backdrop{opacity:1;transition:opacity 225ms cubic-bezier(.4,0,.2,1) 0ms;position:fixed;display:flex;align-items:center;justify-content:center;right:0;bottom:0;top:0;left:0;background-color:#00000080;z-index:-1}.sb__dialog-container{transform:none;transition:opacity 2.25s cubic-bezier(0,0,.2,1) 0ms;height:100%;outline:0;display:flex;justify-content:center;align-items:center}.sb__dialog-wrapper{background-color:#fff;color:#000000de;transition:box-shadow .3s cubic-bezier(.4,0,.2,1) 10s;border-radius:4px;box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f;margin:32px;position:relative;overflow-y:auto;display:flex;flex-direction:column;max-height:calc(100% - 64px);max-width:600px}.sb__dialog-close{display:inline-flex;align-items:center;justify-content:center;position:relative;box-sizing:border-box;background-color:transparent;outline:0;border:0;margin:0;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle;text-decoration:none;color:inherit;text-align:center;flex:0 0 auto;font-size:1.5rem;padding:8px;border-radius:50%;overflow:visible;color:#0000008a;transition:background-color .15s cubic-bezier(.4,0,.2,1) 0ms;position:absolute;z-index:2147483647;top:4px;right:4px}.sb__dialog-content{flex:1 1 auto;overflow-y:auto;padding:32px;background-size:contain}.sb__dialog-footer{display:flex;flex-direction:row;padding:8px 16px}.sb__dialog-link{margin:0 24px 0 0;font:inherit;text-decoration:none;color:gray;font-family:Roboto,Helvetica,Arial,sans-serif;font-weight:400;font-size:.75rem;line-height:1.66;letter-spacing:.03333em;font-size:12px}.sb__dialog-carbon-card{background-color:#fff;color:#000000de;transition:box-shadow .3s cubic-bezier(.4,0,.2,1) 0ms;box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f;overflow:hidden;background-color:#76cb75;color:#fff;border-radius:32px;padding:24px}.sb__dialog-container .sb__stack{width:auto}.sb__typography.sb__primary{font-size:32px;color:#fff;white-space:break-spaces;letter-spacing:.1rem;line-height:1}.sb__point .sb__typography.sb__secondary{margin-left:8px;letter-spacing:.1rem;font-size:24px;line-height:1;color:#fff;white-space:break-spaces;text-align:left}@media screen and (max-width:500px){.sb__dialog-content .sb__typography.sb__primary{font-size:26px}.sb__dialog-content .sb__point-image{height:20px;width:20px}.sb__dialog-link{margin-right:0;text-align:center}.sb__dialog-footer{justify-content:space-evenly}.sb__dialog-container .sb__typography.sb__secondary{padding:0!important;font-size:16px!important}.sb__dialog-content .sb__stack.column .sb__stack.row .sb__stack.column{margin-left:16px}}@media screen and (max-width:410px){.sb__dialog-link{font-size:11px}}@media screen and (max-width:347px){.sb__dialog-content .sb__stack.column .sb__stack.row .sb__stack.column{margin-left:0}}.sb__stack{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.sb__stack.row{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;align-items:center}.sb__stack>:not(style):not(style){margin:0}.sb__stack.column>:not(style)~:not(style){margin-top:32px}.sb__stack.row>:not(style)~:not(style){margin-left:32px}.sb__stack>.spacing-0{margin-left:0;margin-top:0}savedby-widget *{margin:initial;font-family:League Spartan,Roboto,Helvetica,Arial,sans-serif}savedby-widget svg,.sb__icon{fill:currentColor;width:100%;height:100%;display:inline-block;font-size:1.5rem;transition:fill .2s cubic-bezier(.4,0,.2,1) 0ms;flex-shrink:0;-webkit-user-select:none;user-select:none}savedby-widget[lowpro] .sb__wrapper{display:flex;justify-content:flex-end;width:100%}savedby-widget[lowpro] .sb__container{display:flex;flex-direction:row;align-items:center;padding-top:8px;padding-bottom:8px}savedby-widget[lowpro] .sb__checkbox-wrapper{display:flex;justify-content:center;position:relative;align-items:center;height:30px;width:30px}savedby-widget[lowpro] .sb__checkbox-container{width:30px;display:flex}savedby-widget[lowpro] .sb__checkbox{margin:auto;color:#000;-webkit-user-select:none;user-select:none;width:1em;height:1em;display:inline-block;fill:currentColor;flex-shrink:0;transition:fill .2s cubic-bezier(.4,0,.2,1) 0ms;font-size:1.5rem;cursor:pointer}savedby-widget[lowpro] .sb__checkbox>img{width:100%;height:100%}savedby-widget[lowpro] .sb__primary-text{padding-top:4px;line-height:0px}savedby-widget[lowpro] .sb__help-button{padding-left:4px}savedby-widget[basic] .sb__wrapper{padding-bottom:20px}savedby-widget[basic] .sb__top-container{display:flex;justify-content:space-between;align-items:center}savedby-widget[basic] .sb__title{display:inline;font-size:15px;font-weight:500;line-height:0px;padding-top:4px}savedby-widget[basic] .sb__price{color:#0000008f;font-size:.8rem;padding-left:12px}savedby-widget[basic] .sb__checkbox-label{width:24px;height:24px;cursor:pointer}savedby-widget[basic] .sb__checkbox{width:18px;height:18px;cursor:pointer}savedby-widget[basic] .sb__description{font-size:12px;color:#0000008f;font-weight:40;padding-left:8px;line-height:1;width:80%}savedby-widget[basic] .sb__learn-more{text-decoration:underline;white-space:nowrap;cursor:pointer}savedby-widget[basic] .sb__logo-container{width:25%;display:flex;justify-content:flex-end;flex-direction:column}savedby-widget[basic] .sb__bottom-container{display:flex;justify-content:space-between;padding-top:2px}savedby-widget .sb__checkbox{accent-color:black}savedby-widget .sb__checkbox:checked{accent-color:black;border:.15em solid currentColor;border-radius:.15em}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
(function(O){typeof define=="function"&&define.amd?define(O):O()})(function(){"use strict";var Zt=Object.defineProperty;var en=(O,p,A)=>p in O?Zt(O,p,{enumerable:!0,configurable:!0,writable:!0,value:A}):O[p]=A;var K=(O,p,A)=>(en(O,typeof p!="symbol"?p+"":p,A),A);var O,p,A,D,ke,Ce,_e,J={},ae=[],at=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Z=Array.isArray;function L(e,t){for(var n in t)e[n]=t[n];return e}function Ne(e){var t=e.parentNode;t&&t.removeChild(e)}function G(e,t,n){var o,r,i,_={};for(i in t)i=="key"?o=t[i]:i=="ref"?r=t[i]:_[i]=t[i];if(arguments.length>2&&(_.children=arguments.length>3?O.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)_[i]===void 0&&(_[i]=e.defaultProps[i]);return ee(e,_,o,r,null)}function ee(e,t,n,o,r){var i={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++A,__i:-1,__u:0};return r==null&&p.vnode!=null&&p.vnode(i),i}function $(e){return e.children}function B(e,t){this.props=e,this.context=t}function M(e,t){if(t==null)return e.__?M(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?M(e):null}function lt(e,t,n){var o,r=e.__v,i=r.__e,_=e.__P;if(_)return(o=L({},r)).__v=r.__v+1,p.vnode&&p.vnode(o),le(_,o,r,e.__n,_.ownerSVGElement!==void 0,32&r.__u?[i]:null,t,i??M(r),!!(32&r.__u),n),o.__v=r.__v,o.__.__k[o.__i]=o,o.__d=void 0,o.__e!=i&&Se(o),o}function Se(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Se(e)}}function Ee(e){(!e.__d&&(e.__d=!0)&&D.push(e)&&!te.__r++||ke!==p.debounceRendering)&&((ke=p.debounceRendering)||Ce)(te)}function te(){var e,t,n,o=[],r=[];for(D.sort(_e);e=D.shift();)e.__d&&(n=D.length,t=lt(e,o,r)||t,n===0||D.length>n?(ue(o,t,r),r.length=o.length=0,t=void 0,D.sort(_e)):t&&p.__c&&p.__c(t,ae));t&&ue(o,t,r),te.__r=0}function xe(e,t,n,o,r,i,_,c,l,a,f){var s,h,d,m,R,x=o&&o.__k||ae,k=t.length;for(n.__d=l,ut(n,t,x),l=n.__d,s=0;s<k;s++)(d=n.__k[s])!=null&&typeof d!="boolean"&&typeof d!="function"&&(h=d.__i===-1?J:x[d.__i]||J,d.__i=s,le(e,d,h,r,i,_,c,l,a,f),m=d.__e,d.ref&&h.ref!=d.ref&&(h.ref&&de(h.ref,null,d),f.push(d.ref,d.__c||m,d)),R==null&&m!=null&&(R=m),65536&d.__u||h.__k===d.__k?l=Pe(d,l,e):typeof d.type=="function"&&d.__d!==void 0?l=d.__d:m&&(l=m.nextSibling),d.__d=void 0,d.__u&=-196609);n.__d=l,n.__e=R}function ut(e,t,n){var o,r,i,_,c,l=t.length,a=n.length,f=a,s=0;for(e.__k=[],o=0;o<l;o++)_=o+s,(r=e.__k[o]=(r=t[o])==null||typeof r=="boolean"||typeof r=="function"?null:typeof r=="string"||typeof r=="number"||typeof r=="bigint"||r.constructor==String?ee(null,r,null,null,null):Z(r)?ee($,{children:r},null,null,null):r.constructor===void 0&&r.__b>0?ee(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)!=null?(r.__=e,r.__b=e.__b+1,c=dt(r,n,_,f),r.__i=c,i=null,c!==-1&&(f--,(i=n[c])&&(i.__u|=131072)),i==null||i.__v===null?(c==-1&&s--,typeof r.type!="function"&&(r.__u|=65536)):c!==_&&(c===_+1?s++:c>_?f>l-_?s+=c-_:s--:c<_?c==_-1&&(s=c-_):s=0,c!==o+s&&(r.__u|=65536))):(i=n[_])&&i.key==null&&i.__e&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=M(i)),fe(i,i,!1),n[_]=null,f--);if(f)for(o=0;o<a;o++)(i=n[o])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=M(i)),fe(i,i))}function Pe(e,t,n){var o,r;if(typeof e.type=="function"){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,t=Pe(o[r],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function ne(e,t){return t=t||[],e==null||typeof e=="boolean"||(Z(e)?e.some(function(n){ne(n,t)}):t.push(e)),t}function dt(e,t,n,o){var r=e.key,i=e.type,_=n-1,c=n+1,l=t[n];if(l===null||l&&r==l.key&&i===l.type&&!(131072&l.__u))return n;if(o>(l!=null&&!(131072&l.__u)?1:0))for(;_>=0||c<t.length;){if(_>=0){if((l=t[_])&&!(131072&l.__u)&&r==l.key&&i===l.type)return _;_--}if(c<t.length){if((l=t[c])&&!(131072&l.__u)&&r==l.key&&i===l.type)return c;c++}}return-1}function Re(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||at.test(t)?n:n+"px"}function oe(e,t,n,o,r){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||Re(e.style,t,"");if(n)for(t in n)o&&n[t]===o[t]||Re(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?o?n.u=o.u:(n.u=Date.now(),e.addEventListener(t,i?Oe:Te,i)):e.removeEventListener(t,i?Oe:Te,i);else{if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Te(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(p.event?p.event(e):e)}}function Oe(e){if(this.l)return this.l[e.type+!0](p.event?p.event(e):e)}function le(e,t,n,o,r,i,_,c,l,a){var f,s,h,d,m,R,x,k,P,v,y,b,C,N,w,g=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),i=[c=t.__e=n.__e]),(f=p.__b)&&f(t);e:if(typeof g=="function")try{if(k=t.props,P=(f=g.contextType)&&o[f.__c],v=f?P?P.props.value:f.__:o,n.__c?x=(s=t.__c=n.__c).__=s.__E:("prototype"in g&&g.prototype.render?t.__c=s=new g(k,v):(t.__c=s=new B(k,v),s.constructor=g,s.render=pt),P&&P.sub(s),s.props=k,s.state||(s.state={}),s.context=v,s.__n=o,h=s.__d=!0,s.__h=[],s._sb=[]),s.__s==null&&(s.__s=s.state),g.getDerivedStateFromProps!=null&&(s.__s==s.state&&(s.__s=L({},s.__s)),L(s.__s,g.getDerivedStateFromProps(k,s.__s))),d=s.props,m=s.state,s.__v=t,h)g.getDerivedStateFromProps==null&&s.componentWillMount!=null&&s.componentWillMount(),s.componentDidMount!=null&&s.__h.push(s.componentDidMount);else{if(g.getDerivedStateFromProps==null&&k!==d&&s.componentWillReceiveProps!=null&&s.componentWillReceiveProps(k,v),!s.__e&&(s.shouldComponentUpdate!=null&&s.shouldComponentUpdate(k,s.__s,v)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(s.props=k,s.state=s.__s,s.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(q){q&&(q.__=t)}),y=0;y<s._sb.length;y++)s.__h.push(s._sb[y]);s._sb=[],s.__h.length&&_.push(s);break e}s.componentWillUpdate!=null&&s.componentWillUpdate(k,s.__s,v),s.componentDidUpdate!=null&&s.__h.push(function(){s.componentDidUpdate(d,m,R)})}if(s.context=v,s.props=k,s.__P=e,s.__e=!1,b=p.__r,C=0,"prototype"in g&&g.prototype.render){for(s.state=s.__s,s.__d=!1,b&&b(t),f=s.render(s.props,s.state,s.context),N=0;N<s._sb.length;N++)s.__h.push(s._sb[N]);s._sb=[]}else do s.__d=!1,b&&b(t),f=s.render(s.props,s.state,s.context),s.state=s.__s;while(s.__d&&++C<25);s.state=s.__s,s.getChildContext!=null&&(o=L(L({},o),s.getChildContext())),h||s.getSnapshotBeforeUpdate==null||(R=s.getSnapshotBeforeUpdate(d,m)),xe(e,Z(w=f!=null&&f.type===$&&f.key==null?f.props.children:f)?w:[w],t,n,o,r,i,_,c,l,a),s.base=t.__e,t.__u&=-161,s.__h.length&&_.push(s),x&&(s.__E=s.__=null)}catch(q){t.__v=null,l||i!=null?(t.__e=c,t.__u|=l?160:32,i[i.indexOf(c)]=null):(t.__e=n.__e,t.__k=n.__k),p.__e(q,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=ft(n.__e,t,n,o,r,i,_,l,a);(f=p.diffed)&&f(t)}function ue(e,t,n){for(var o=0;o<n.length;o++)de(n[o],n[++o],n[++o]);p.__c&&p.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(i){i.call(r)})}catch(i){p.__e(i,r.__v)}})}function ft(e,t,n,o,r,i,_,c,l){var a,f,s,h,d,m,R,x=n.props,k=t.props,P=t.type;if(P==="svg"&&(r=!0),i!=null){for(a=0;a<i.length;a++)if((d=i[a])&&"setAttribute"in d==!!P&&(P?d.localName===P:d.nodeType===3)){e=d,i[a]=null;break}}if(e==null){if(P===null)return document.createTextNode(k);e=r?document.createElementNS("http://www.w3.org/2000/svg",P):document.createElement(P,k.is&&k),i=null,c=!1}if(P===null)x===k||c&&e.data===k||(e.data=k);else{if(i=i&&O.call(e.childNodes),x=n.props||J,!c&&i!=null)for(x={},a=0;a<e.attributes.length;a++)x[(d=e.attributes[a]).name]=d.value;for(a in x)d=x[a],a=="children"||(a=="dangerouslySetInnerHTML"?s=d:a==="key"||a in k||oe(e,a,null,d,r));for(a in k)d=k[a],a=="children"?h=d:a=="dangerouslySetInnerHTML"?f=d:a=="value"?m=d:a=="checked"?R=d:a==="key"||c&&typeof d!="function"||x[a]===d||oe(e,a,d,x[a],r);if(f)c||s&&(f.__html===s.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(s&&(e.innerHTML=""),xe(e,Z(h)?h:[h],t,n,o,r&&P!=="foreignObject",i,_,i?i[0]:n.__k&&M(n,0),c,l),i!=null)for(a=i.length;a--;)i[a]!=null&&Ne(i[a]);c||(a="value",m!==void 0&&(m!==e[a]||P==="progress"&&!m||P==="option"&&m!==x[a])&&oe(e,a,m,x[a],!1),a="checked",R!==void 0&&R!==e[a]&&oe(e,a,R,x[a],!1))}return e}function de(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(o){p.__e(o,n)}}function fe(e,t,n){var o,r;if(p.unmount&&p.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||de(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(i){p.__e(i,t)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&fe(o[r],t,n||typeof e.type!="function");n||e.__e==null||Ne(e.__e),e.__=e.__e=e.__d=void 0}function pt(e,t,n){return this.constructor(e,n)}function pe(e,t,n){var o,r,i,_;p.__&&p.__(e,t),r=(o=typeof n=="function")?null:n&&n.__k||t.__k,i=[],_=[],le(t,e=(!o&&n||t).__k=G($,null,[e]),r||J,J,t.ownerSVGElement!==void 0,!o&&n?[n]:r?null:t.firstChild?O.call(t.childNodes):null,i,!o&&n?n:r?r.__e:t.firstChild,o,_),e.__d=void 0,ue(i,e,_)}O=ae.slice,p={__e:function(e,t,n,o){for(var r,i,_;t=t.__;)if((r=t.__c)&&!r.__)try{if((i=r.constructor)&&i.getDerivedStateFromError!=null&&(r.setState(i.getDerivedStateFromError(e)),_=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,o||{}),_=r.__d),_)return r.__E=r}catch(c){e=c}throw e}},A=0,B.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=L({},this.state),typeof e=="function"&&(e=e(L({},n),this.props)),e&&L(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ee(this))},B.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ee(this))},B.prototype.render=$,D=[],Ce=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_e=function(e,t){return e.__v.__b-t.__v.__b},te.__r=0;var Y,S,he,$e,Q=0,Be=[],re=[],E=p,Ae=E.__b,Le=E.__r,He=E.diffed,Ie=E.__c,De=E.unmount,je=E.__;function ve(e,t){E.__h&&E.__h(S,e,Q||t),Q=0;var n=S.__H||(S.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:re}),n.__[e]}function j(e){return Q=1,ye(Fe,e)}function ye(e,t,n){var o=ve(Y++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):Fe(void 0,t),function(c){var l=o.__N?o.__N[0]:o.__[0],a=o.t(l,c);l!==a&&(o.__N=[a,o.__[1]],o.__c.setState({}))}],o.__c=S,!S.u)){var r=function(c,l,a){if(!o.__c.__H)return!0;var f=o.__c.__H.__.filter(function(h){return!!h.__c});if(f.every(function(h){return!h.__N}))return!i||i.call(this,c,l,a);var s=!1;return f.forEach(function(h){if(h.__N){var d=h.__[0];h.__=h.__N,h.__N=void 0,d!==h.__[0]&&(s=!0)}}),!(!s&&o.__c.props===c)&&(!i||i.call(this,c,l,a))};S.u=!0;var i=S.shouldComponentUpdate,_=S.componentWillUpdate;S.componentWillUpdate=function(c,l,a){if(this.__e){var f=i;i=void 0,r(c,l,a),i=f}_&&_.call(this,c,l,a)},S.shouldComponentUpdate=r}return o.__N||o.__}function T(e,t){var n=ve(Y++,3);!E.__s&&Me(n.__H,t)&&(n.__=e,n.i=t,S.__H.__h.push(n))}function F(e){return Q=5,Ue(function(){return{current:e}},[])}function Ue(e,t){var n=ve(Y++,7);return Me(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ie(e,t){return Q=8,Ue(function(){return e},t)}function ht(){for(var e;e=Be.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(se),e.__H.__h.forEach(me),e.__H.__h=[]}catch(t){e.__H.__h=[],E.__e(t,e.__v)}}E.__b=function(e){S=null,Ae&&Ae(e)},E.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),je&&je(e,t)},E.__r=function(e){Le&&Le(e),Y=0;var t=(S=e.__c).__H;t&&(he===S?(t.__h=[],S.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=re,n.__N=n.i=void 0})):(t.__h.forEach(se),t.__h.forEach(me),t.__h=[],Y=0)),he=S},E.diffed=function(e){He&&He(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Be.push(t)!==1&&$e===E.requestAnimationFrame||(($e=E.requestAnimationFrame)||vt)(ht)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==re&&(n.__=n.__V),n.i=void 0,n.__V=re})),he=S=null},E.__c=function(e,t){t.some(function(n){try{n.__h.forEach(se),n.__h=n.__h.filter(function(o){return!o.__||me(o)})}catch(o){t.some(function(r){r.__h&&(r.__h=[])}),t=[],E.__e(o,n.__v)}}),Ie&&Ie(e,t)},E.unmount=function(e){De&&De(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{se(o)}catch(r){t=r}}),n.__H=void 0,t&&E.__e(t,n.__v))};var qe=typeof requestAnimationFrame=="function";function vt(e){var t,n=function(){clearTimeout(o),qe&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,100);qe&&(t=requestAnimationFrame(n))}function se(e){var t=S,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),S=t}function me(e){var t=S;e.__c=e.__(),S=t}function Me(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function Fe(e,t){return typeof t=="function"?t(e):t}function yt(e,t){for(var n in t)e[n]=t[n];return e}function We(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return!0;return!1}function Ve(e,t){this.props=e,this.context=t}(Ve.prototype=new B).isPureReactComponent=!0,Ve.prototype.shouldComponentUpdate=function(e,t){return We(this.props,e)||We(this.state,t)};var ze=p.__b;p.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ze&&ze(e)};var mt=p.__e;p.__e=function(e,t,n,o){if(e.then){for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}mt(e,t,n,o)};var Je=p.unmount;function Ge(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),e.__c.__H=null),(e=yt({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return Ge(o,t,n)})),e}function Ye(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(o){return Ye(o,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function ge(){this.__u=0,this.t=null,this.__b=null}function Qe(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ce(){this.u=null,this.o=null}p.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Je&&Je(e)},(ge.prototype=new B).__c=function(e,t){var n=t.__c,o=this;o.t==null&&(o.t=[]),o.t.push(n);var r=Qe(o.__v),i=!1,_=function(){i||(i=!0,n.__R=null,r?r(c):c())};n.__R=_;var c=function(){if(!--o.__u){if(o.state.__a){var l=o.state.__a;o.__v.__k[0]=Ye(l,l.__c.__P,l.__c.__O)}var a;for(o.setState({__a:o.__b=null});a=o.t.pop();)a.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(_,_)},ge.prototype.componentWillUnmount=function(){this.t=[]},ge.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Ge(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&G($,null,e.fallback);return r&&(r.__u&=-33),[G($,null,t.__a?null:e.children),r]};var Xe=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function gt(e){return this.getChildContext=function(){return e.context},e.children}function bt(e){var t=this,n=e.i;t.componentWillUnmount=function(){pe(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(o){this.childNodes.push(o),t.i.appendChild(o)},insertBefore:function(o,r){this.childNodes.push(o),t.i.appendChild(o)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),t.i.removeChild(o)}}),pe(G(gt,{context:t.context},e.__v),t.l)}function Ke(e,t){var n=G(bt,{__v:e,i:t});return n.containerInfo=t,n}(ce.prototype=new B).__a=function(e){var t=this,n=Qe(t.__v),o=t.o.get(e);return o[0]++,function(r){var i=function(){t.props.revealOrder?(o.push(r),Xe(t,e,o)):r()};n?n(i):i()}},ce.prototype.render=function(e){this.u=null,this.o=new Map;var t=ne(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},ce.prototype.componentDidUpdate=ce.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Xe(e,n,t)})};var wt=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,kt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ct=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Nt=/[A-Z0-9]/g,St=typeof document<"u",Et=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};B.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(B.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ze=p.event;function xt(){}function Pt(){return this.cancelBubble}function Rt(){return this.defaultPrevented}p.event=function(e){return Ze&&(e=Ze(e)),e.persist=xt,e.isPropagationStopped=Pt,e.isDefaultPrevented=Rt,e.nativeEvent=e};var Tt={enumerable:!1,configurable:!0,get:function(){return this.class}},et=p.vnode;p.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,o=t.type,r={};for(var i in n){var _=n[i];if(!(i==="value"&&"defaultValue"in n&&_==null||St&&i==="children"&&o==="noscript"||i==="class"||i==="className")){var c=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&_===!0?_="":c==="translate"&&_==="no"?_=!1:c==="ondoubleclick"?i="ondblclick":c!=="onchange"||o!=="input"&&o!=="textarea"||Et(n.type)?c==="onfocus"?i="onfocusin":c==="onblur"?i="onfocusout":Ct.test(i)?i=c:o.indexOf("-")===-1&&kt.test(i)?i=i.replace(Nt,"-$&").toLowerCase():_===null&&(_=void 0):c=i="oninput",c==="oninput"&&r[i=c]&&(i="oninputCapture"),r[i]=_}}o=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=ne(n.children).forEach(function(l){l.props.selected=r.value.indexOf(l.props.value)!=-1})),o=="select"&&r.defaultValue!=null&&(r.value=ne(n.children).forEach(function(l){l.props.selected=r.multiple?r.defaultValue.indexOf(l.props.value)!=-1:r.defaultValue==l.props.value})),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",Tt)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),t.props=r}(e),e.$$typeof=wt,et&&et(e)};var tt=p.__r;p.__r=function(e){tt&&tt(e),e.__c};var nt=p.diffed;p.diffed=function(e){nt&&nt(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value)};let be=class{static getCart(){return fetch("/cart.json?sb").then(t=>t.json())}static async updateCart(t){return await fetch("/cart/update.js?sb",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(n=>n.json())}static async addToCart(t){return await fetch("/cart/add.js?sb",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:t})}).then(n=>n.json())}};const ot=["/cart/add","/cart/update","/cart/change","/cart/clear","/cart"];function Ot({onLoad:e,onOpen:t,onSend:n,onSetRequestHeaders:o},r){const i=F({onOpen:t,onSend:n,onSetRequestHeaders:o});return T(()=>{i.current={onOpen:t,onSend:n,onSetRequestHeaders:o,onLoad:e}},[t,n,o,e]),T(()=>{r&&($t(i),Bt(i))},[r]),null}function $t(e){const t=window.XMLHttpRequest.prototype.open;window.XMLHttpRequest.prototype.open=function(n,o){const r=rt(o),{pathname:i,searchParams:_}=r,c=ot.find(l=>new RegExp(l+"$").test(i.replace(/\..*/,"")));if(c&&!(_!=null&&_.has("sb"))&&!window.SavedBy.isEditingCart){this.addEventListener("load",async function({target:a}){await e.current.onLoad(c,{url:this._url,responseBody:this.response,requestHeaders:this.__requestHeaders,responseType:this.getResponseHeader("Content-Type"),status:this.status})});const l=this.setRequestHeader;this.setRequestHeader=function(a,f){return this.__requestHeaders||(this.__requestHeaders={}),this.__requestHeaders[a]=f,l.apply(this,arguments)}}return t.apply(this,arguments)}}function Bt(e){const t=window.fetch;window.fetch=function(n,o){return new Promise((r,i)=>{t.apply(this,arguments).then(async _=>{const c=rt(n),{pathname:l,searchParams:a}=c,f=ot.find(s=>new RegExp(s+"$").test(l.replace(/\..*/,"")));if(f&&!(a!=null&&a.has("sb"))&&!window.SavedBy.isEditingCart){const s=await _.clone();if(e.current.onLoad){const h=s.headers.get("content-type");let d;(h.includes("application/json")||h.includes("text/javascript"))&&(d=await s.json(),await e.current.onLoad(f,{responseBody:d,responseType:h,requestHeaders:(o==null?void 0:o.requestHeaders)||{},status:s.status}))}}r(_)}).catch(_=>i(_))})}}function rt(e){try{return/https?:\/\//.test(e)?new URL(e):new URL(window.location.origin+e)}catch{return{}}}let At=0;function we(e=()=>null,t=[],{fireOnLoad:n}={},o){const r=F(e),i=F(t),_=F(o);T(()=>{o!==_.current&&(_.current=o)},[o]),T(()=>{if(i.current&&r.current){n&&r.current([]);const c=new MutationObserver(l=>{const a=l.filter(({target:f})=>i.current.some(s=>f.matches(s)));a.length&&r.current(a,++At,()=>c.disconnect(),_.current)});return c.observe(document.body,{childList:!0,subtree:!0}),()=>c.disconnect()}},[n])}var Lt=0;function u(e,t,n,o,r,i){var _,c,l={};for(c in t)c=="ref"?_=t[c]:l[c]=t[c];var a={type:e,props:l,key:n,ref:_,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Lt,__i:-1,__u:0,__source:r,__self:i};if(typeof e=="function"&&(_=e.defaultProps))for(c in _)l[c]===void 0&&(l[c]=_[c]);return p.vnode&&p.vnode(a),a}function Ht(e){return function(n){const[o,r]=j(!1);return T(()=>{var c;const i=(c=window.Shopify.currency)==null?void 0:c.active,{SavedBy:_}=n;_.init().then(()=>{Promise.all([_.getProduct(),_.getConfig(i)]).then(([l,a])=>{if(!l)throw new Error("[SavedBy] Unable to fetch product");if(!a)throw new Error("[SavedBy] Unable to fetch config");r(!0)})})},[n]),T(()=>{if(!o)return;const i=document.createEvent("Event");i.initEvent("SavedBy:ready",!0,!0),document.dispatchEvent(i)},[o]),o?u(e,{...n}):null}}function It({onClose:e,isCarbon:t=!0}){const n=t?`PROTECT YOUR PACKAGE
 & GO CARBON NEUTRAL`:`PROTECT YOUR
PACKAGE FROM`,o=t?'url("https://cdn.savedby.io/city-map.png"),linear-gradient(180deg, #049ED8, #b0f18854)':'url("https://cdn.savedby.io/city-map.png"),linear-gradient(180deg, #049ED8, #ffffff7a)',r=t?u($,{children:[u("div",{className:"sb__stack row",style:{height:"100%"},children:[u("div",{children:u("img",{src:"https://cdn.savedby.io/icons/protection-icon.svg"})}),u("p",{style:{color:"white",fontSize:40,fontWeight:600,margin:"0 48px"},children:"+"}),u("div",{style:{marginLeft:0},children:u("img",{src:"https://cdn.savedby.io/icons/carbon-icon.svg"})})]}),u("div",{className:"sb__stack row",style:{height:"100%",flexWrap:"nowrap"},children:[u("div",{children:[u(H,{text:"loss"}),u(H,{text:"theft"}),u(H,{text:"damage"})]}),u("div",{className:"sb__stack column spacing-0",style:{justifyContent:"space-evenly"},children:[u(H,{text:`carbon
neutral`}),u(H,{text:`every order
plants a tree`})]})]})]}):u("div",{className:"sb__stack row",style:{height:"100%"},children:[u("div",{children:u("img",{className:"sb__icon",src:"https://cdn.savedby.io/icons/protection-icon.svg"})}),u("div",{className:"sb__stack column spacing-0",style:{justifyContent:"space-evenly"},children:[u(H,{text:"loss"}),u(H,{text:"theft"}),u(H,{text:"damage"})]})]}),i=t?u("div",{className:"sb__dialog-carbon-card",children:u("div",{className:"sb__stack column",style:{alignItems:"center"},children:[u("img",{src:"https://cdn.savedby.io/icons/tree-icon.svg"}),u("p",{className:"sb__typography",style:{color:"white",marginTop:16},children:"YOUR ORDER IS CARBON NEUTRAL"}),u("p",{className:"sb__typography",style:{color:"white",lineHeight:1,fontSize:18,marginTop:16},children:"Help the environment by offsetting 100% of this order’s shipping impact on the world. SavedBy is proud to sponsor the Eden Reforestation Project and the positive work they’re doing for the environment!"})]})}):u($,{children:[u("p",{className:"sb__typography sb__secondary",style:{fontWeight:600,padding:"0 32px"},children:"SavedBy weathers the storm of lost, stolen, and damaged packages."}),u("p",{className:"sb__typography sb__secondary",style:{fontWeight:200,padding:"0 32px"},children:"If your package has any issues, SavedBy will re-ship your order in less than 24 hours."})]});return u("div",{className:"sb__dialog-wrapper",style:{padding:0},children:[u("button",{className:"sb__dialog-close",onClick:e,children:u("img",{src:"https://cdn.savedby.io/icons/close-icon.svg"})}),u("div",{className:"sb__dialog-content",style:{backgroundImage:o},children:u("div",{className:"sb__stack column",children:[u("img",{src:"https://cdn.savedby.io/logos/savedby/savedby-stacked.png",style:{objectFit:"contain",width:"50%",margin:"auto"}}),u("p",{className:"sb__typography sb__primary",children:n}),r,i]})}),u("hr",{}),u("div",{className:"sb__dialog-footer",children:[u("a",{className:"sb__dialog-link",href:"https://savedby.io/policies",target:"_blank",children:"Policies"}),u("a",{className:"sb__dialog-link",href:"https://savedby.io/tos",target:"_blank",children:"Terms of Service"}),u("a",{className:"sb__dialog-link",href:"https://savedby.io/file-a-claim",target:"_blank",children:"File a Claim"})]})]})}function H({text:e=""}){return u("div",{className:"sb__stack row sb__point",style:{justifyContent:"flex-start",margin:2,alignItems:"center"},children:[u("img",{src:"https://cdn.savedby.io/icons/check-icon.svg",className:"sb__point-image"}),u("p",{className:"sb__typography sb__secondary",style:{},children:e.toUpperCase()})]})}function Dt({onClose:e,open:t}){const{variant:n,checkoutVariant:o}=window.SavedBy.config||{};return u(jt,{open:t,onClose:e,children:u(It,{onClose:e,isCarbon:(o||n||"BASIC").includes("CARBON")})})}function jt({children:e,open:t,onClose:n}){const[o,r]=j(),i=F();T(()=>{let c=document.getElementsByClassName("sb__dialog")[0];c||(c=document.createElement("div"),c.role="presentation",c.className="sb__dialog",c.style.display="none",document.body.append(c)),r(c)},[]),T(()=>{o&&(t?o.style.display="block":o.style.display="none")},[t,o]);const _=c=>{c.stopPropagation(),c.target.className==="sb__dialog-container"&&n(c)};return o?Ke(u($,{children:[u("div",{"aria-hidden":"true",className:"sb__dialog-backdrop"}),u("div",{ref:i,className:"sb__dialog-container",onClick:_,children:e})]}),o):null}const it=[];function X(...e){it.push(e),window.location.hash==="#DEV"&&console.debug("[SAVEDBY]",...e)}X.show=()=>{for(const e of it)(void 0)(...e)},window.SavedBy?window.SavedBy.debug=X:window.SavedBy={debug:X};function W(){var n;const{config:e}=window.SavedBy||{};if(!(e!=null&&e.status))return!1;if(e.status==="ACTIVE"||window.Shopify.designMode)return!0;const t=((n=window.Shopify.theme)==null?void 0:n.role)==="unpublished";return["TESTING","ONBOARDING","DEVELOPMENT"].includes(e.status)&&t}function Ut({children:e,variant:t}){const[n,o]=j([...document.getElementsByTagName("savedby-widget")]);return we(()=>{var _,c,l;const r=(c=(_=window.SavedBy)==null?void 0:_.config)==null?void 0:c.containerSelector;if(r){for(const a of[...document.querySelectorAll(r)])if(((l=a.nextElementSibling)==null?void 0:l.tagName)!=="SAVEDBY-WIDGET"){const f=document.createElement("savedby-widget");a.after(f)}}const i=[...document.getElementsByTagName("savedby-widget")];o(a=>a.length!==i.length||!a.every((f,s)=>f===i[s])?i:a)},["*"],{fireOnLoad:!0}),T(()=>{n.forEach(r=>{r.toggleAttribute(t)})},[n,t]),n.map(r=>Ke(e,r))}function qt({checked:e,onClick:t,disabled:n}){return u("label",{className:"sb__checkbox-label",onClick:i=>{!n&&t(i)},children:u("img",{src:`https://cdn.savedby.io/icons/checkbox-${e?"":"un"}checked.svg`})})}const{Shopify:V}=window;function st(e){var o;const t=(V==null?void 0:V.locale)||"en",n=((o=V==null?void 0:V.currency)==null?void 0:o.active)||"USD";return Number(e).toLocaleString(t,{style:"currency",currency:n}).replaceAll(/[a-z]/gi,"")}function Mt({fee:e,optedIn:t,onToggle:n,openInfoPopup:o,isLoading:r,variantOptions:i}){const _=i.includes("CARBON"),c=_?"Opt-in to fully carbon offset your order and have your order protected if an issue arises during shipping. ":"We partner with SavedBy to protect from lost, damaged and stolen packages. Opt-in to have a new order sent if an issue arises. ",l="Package Protection"+(_?" + Carbon Neutral":"");return u("div",{className:"sb__wrapper",children:[u("div",{className:"sb__top-container",children:[u("div",{className:"sb__title",children:[l,u("i",{className:"sb__price",children:st(e)})]}),u(qt,{checked:t,onClick:n,disabled:r})]}),u("div",{className:"sb__bottom-container",children:[u("div",{className:"sb__description",children:[c,u("a",{onClick:o,className:"sb__learn-more",children:"Learn more"})]}),u("div",{className:"sb__logo-container",children:u("img",{src:"https://cdn.savedby.io/logos/savedby/SavedByLogo3.png",alt:"SavedBy Logo"})})]})]})}function Ft({fee:e,optedIn:t,onToggle:n,openInfoPopup:o,isLoading:r,showPrice:i=!0}){let _="SavedBy Package Protection";return i&&(_+=" - "+st(e)),u("div",{className:"sb__wrapper",children:u("div",{className:"sb__container",children:[u("div",{className:"sb__checkbox-wrapper",children:u("div",{className:"sb__checkbox-container",children:u("input",{type:"checkbox",checked:t,onClick:n,className:"sb__checkbox",style:{width:18,height:18},disabled:r})})}),u("p",{className:"sb__primary-text",children:_}),u("img",{className:"sb__help-button",src:"https://cdn.savedby.io/icons/help-icon.svg",onClick:o,style:{display:window.SavedBy.inlineConfig["no-popup"]&&"none"}})]})})}function Wt({fee:e,optedIn:t=!1,toggle:n,setInfoOpen:o,isLoading:r}){var d;const{storefrontVariant:i,variant:_,renderAbove:c,renderBelow:l,showPrice:a}=((d=window.SavedBy)==null?void 0:d.config)||{},f=i||_||"LOWPRO",s=m=>{m==null||m.stopPropagation(),o(!0)},h=m=>{m==null||m.stopPropagation(),!r&&n()};return f.includes("HEADLESS")?null:u(Ut,{variant:f.split("-")[0],children:[c&&u("div",{className:"sb__render-above",dangerouslySetInnerHTML:{__html:c}}),f.includes("LOWPRO")&&u(Ft,{fee:e,optedIn:t,onToggle:h,openInfoPopup:s,isLoading:r,showPrice:a}),(f.includes("BASIC")||f.includes("CARBON"))&&u(Mt,{fee:e,optedIn:t,onToggle:h,openInfoPopup:s,isLoading:r,variantOptions:f.split("-")}),l&&u("div",{className:"sb__render-below",dangerouslySetInnerHTML:{__html:l}})]})}const Vt=Ht(({SavedBy:e})=>{const[{enabled:t},n]=ye(Gt,{}),[o,r]=j(),[i,_]=ye(Yt),[c,l]=j(0),[a,f]=j(!1),[s,h]=j(!1),d=F(),m=ie(()=>{var y;const{subtotalSelector:v}=e.config;if(i&&v){const b=window.jQuery?window.jQuery(v).toArray():[...document.querySelectorAll(v)],C=i.subtotal/100;for(const N of b){let w=N.innerText,g="innerText";w||(w=N.innerHTML,g="innerHTML");const q=(y=w.match(/[\d.,]+/))==null?void 0:y[0].replace(",","");q&&parseFloat(q).toFixed(2)!==C.toFixed(2)&&(g==="innerText"&&N.childNodes.length===1?N.childNodes[0].nodeValue=w.replace(/[\d.,]+/,C.toFixed(2)):N[g]=w.replace(/[\d.,]+/,C.toFixed(2)))}}},[e.config,i]);T(()=>{e.updateSubtotals=m},[e,m]);const R=ie(()=>{const{countSelector:v}=e.config;if(i&&v){const y=window.jQuery?window.jQuery(v).get():[...document.querySelectorAll(v)],b=i.items.filter(C=>C.vendor!=="SavedBy").reduce((C,N)=>C+N.quantity,0);for(const C of y){const N=C.innerText.replace(/(\d+)/,b);C.innerText!==N&&(C.innerText=N)}}},[e.config,i]);T(()=>{e.updateCartCounts=R},[e,R]),T(()=>{m(),R()},[R,m]),we((v,y,b,C)=>{if(y>200||!W())return b();C()},[e.config.subtotalSelector],{},m),we((v,y,b,C)=>{if(!W())return b();C()},[e.config.countSelector],{},R),T(()=>{e.toggle=v=>r(y=>v??!y),e.openInfoPopup=()=>f(!0),e.enable=()=>n({manual:!0}),e.disable=()=>n({manual:!1}),W()&&be.getCart().then(async v=>{var w;const y=e.config.storefrontAutoOptIn??e.config.optInCond,b=v.items.find(g=>g.vendor==="SavedBy"),C=(w=v==null?void 0:v.attributes)==null?void 0:w["_SavedBy-internal"];C!==void 0?(d.current=!0,r(!!+C)):r(y==="DISABLED"?!!b:y||!!b),_(U(v));const N=document.createEvent("Event");N.initEvent("SavedBy:ready",!0,!0),window.dispatchEvent(N)})},[e]),T(()=>{i&&n(e.checkEnabled(i))},[i,e]);const x=ie(async(v,{responseBody:y,responseType:b,status:C,requestHeaders:N})=>{if(y.errors||C!==200||!W()||!(b.includes("application/json")||b.includes("text/javascript")))return;let w;if(v==="/cart")typeof y=="string"?w=U(JSON.parse(y)):w=U(y);else if(v==="/cart/add")w=await be.getCart(),w=U(w);else{if(w=y,typeof w=="string")w=JSON.parse(y);else if(typeof w!="object")throw new Error("/cart/change response is not json or object",y);["/cart/change","/cart/update"].includes(v)&&(w=U(w))}_(w)},[]);Ot({onLoad:x},!e.isRebuy&&W()),T(()=>{!e.isRebuy||!W()||document.addEventListener("rebuy:cart.change",({detail:v})=>{_(U(v.cart.cart))})},[e]),T(()=>{if(!i||t===void 0||o===void 0)return;const v=i.items.filter(g=>g.requires_shipping&&g.vendor!=="SavedBy"),y=e.isMerchantResponsible({cartItems:i.items}),b=e.getVariant(i,y);X({cart:i,variant:b}),l(+(b==null?void 0:b.price)||!1),n({variant:!!b});const C=i.items.filter(g=>g.vendor==="SavedBy"),N=zt(C,t&&(o||y)&&v.length&&b);if(!N)return;h(!0);let w={};d.current&&(w["_SavedBy-internal"]=String(+o)),be.updateCart({updates:N,attributes:w}).then(g=>{g&&(_(U(g)),X(g)),Jt({cart:g,oldCart:i})}).finally(()=>{h(!1);const g=document.createEvent("Event");g.initEvent("SavedBy:update",!0,!0),document.dispatchEvent(g)})},[i,o,e,t]);const k=ie(v=>{d.current=!0,r(y=>{y=v??!y;const b=document.createEvent("Event");return b.initEvent("SavedBy:opt-"+y?"in":"out",!0,!0),document.dispatchEvent(b),y})},[]);if(!t)return null;const P=e.isMerchantResponsible({cartItems:i.items});return u($,{children:[u(Wt,{fee:c,optedIn:o,toggle:k,setInfoOpen:f,isLoading:s,isMerchantResponsible:P}),u(Dt,{open:a,onClose:()=>f(!1)})]})});function zt(e,t){const n={},o=e.filter(r=>r.id!==t.id);for(const r of o)n[r.id]=0;return t&&!e.some(r=>r.id===t.id)&&(n[t.id]=1),Object.keys(n)[0]&&n}function U(e){const t=e.items.filter(n=>window.SavedBy.config.includeSavedBy||n.vendor!=="SavedBy");return t.forEach(n=>{n.line_price=n.price*n.quantity,n.final_line_price=n.line_price,n.original_line_price=n.original_price*n.quantity}),{...e,item_count:t.reduce((n,o)=>n+o.quantity,0),items_subtotal_price:t.reduce((n,o)=>n+o.line_price,0),original_total_price:t.reduce((n,o)=>n+o.original_line_price,0),requires_shipping:t.some(n=>n.requires_shipping),subtotal:t.reduce((n,o)=>n+ +o.line_price-+o.total_discount,0),total_discount:t.reduce((n,o)=>n+o.total_discount,0),total_price:t.reduce((n,o)=>n+o.final_line_price,0),total_weight:t.reduce((n,o)=>n+o.grams*o.quantity,0),hasSavedBy:e.items.some(n=>n.vendor==="SavedBy")}}function Jt({cart:e,oldCart:t}){try{const{cartCallback:n}=window.SavedBy.config;typeof n=="string"&&new Function(`let [cart,oldCart] = arguments; ${n}`)(e,t)}catch(n){console.error("[SAVEDBY] cartCallback error:",n)}}function Gt(e,t){const n={...e};return delete n.enabled,Object.assign(n,t),n.enabled=Object.values(n).every(o=>o),n}function Yt(e,t){if(!e)return t;const n=e.items.find(r=>r.vendor==="SavedBy"),o=t.items.find(r=>r.vendor==="SavedBy");return(n==null?void 0:n.id)!==(o==null?void 0:o.id)||e.item_count!==t.item_count||e.total_price!==t.total_price||e.currency!==t.currency?t:e}const{location:Qt,sessionStorage:I}=window,Xt="https://api.savedby.io/";class Kt{constructor(t){K(this,"product");K(this,"config",{});K(this,"inlineConfig",{});K(this,"rendered",!1);this.root=t;const n=document.getElementsByTagName("SAVEDBY-WIDGET")[0];this.inlineConfig["no-popup"]=n==null?void 0:n.hasAttribute("no-popup"),this.inlineConfig.merchantResponsible=n==null?void 0:n.hasAttribute("merchant-responsible"),window.SavedBy=Object.assign(this,window.SavedBy||{})}async init(){this.isRebuy=await this._checkForRebuy()}_checkForRebuy(){return new Promise(t=>{var o,r;if(![...document.scripts].some(i=>i.src.includes("rebuyengine"))||((o=window.Rebuy)==null?void 0:o.smart_cart)==="false")return t(!1);if((r=window.Rebuy)!=null&&r.SmartCart)return t(!0);document.addEventListener("rebuy:cart.init",()=>t(!0),{once:!0})})}hideProduct(){let t=document.getElementById("savedby-style");t||(t=window.document.createElement("style"),t.id="savedby-style",t.type="text/css",t.textContent=`${this.config.hideSelector} {display:none !important;}`,document.head.append(t))}checkEnabled(t){var o,r,i,_;const n={};if((o=this.config)!=null&&o.whitelistDomain&&(n.whitelistDomain=new RegExp(this.config.whitelistDomain.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).test(Qt.host)),(r=this.config)!=null&&r.minCoverage&&(n.minCoverage=!(this.config.minCoverage*100>t.total_price)),(i=this.config)!=null&&i.nonCoveredProducts){const c=(_=t.items)==null?void 0:_.map(l=>l.product_id);n.nonCoveredProducts=!c.some(l=>{var a;return(a=this.config.nonCoveredProducts)==null?void 0:a.includes(l)})}return n}transformCart(t){const n=t.items.filter(o=>o.vendor!=="SavedBy"&&o.requires_shipping);return{...t,item_count:n.reduce((o,r)=>o+r.quantity,0),items_subtotal_price:n.reduce((o,r)=>o+r.line_price,0),original_total_price:n.reduce((o,r)=>o+r.original_line_price,0),total_price:n.reduce((o,r)=>o+r.line_price,0),total_discount:n.reduce((o,r)=>o+r.total_discount,0),items:n}}async getConfig(t){let n=I.getItem("savedby-config");const o=n==null?void 0:n.useAnalytics;let r=I.getItem("savedby-session");if(n=JSON.parse(n),(!n||n.currency!==t||+((n==null?void 0:n.exp)??0)<Date.now())&&(I.removeItem("savedby-config"),n=null),this.config=n,n)return this.hideProduct(),n;const i=window.Shopify.shop,_=new URLSearchParams({shop:i});return t&&_.append("currency",t),n=await fetch(`${Xt}widget/config?${_.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:r,locale:window.Shopify.locale})}).then(c=>c.json()),o&&this.setSessionId(n.sessionId),I.setItem("savedby-config",JSON.stringify({...n,exp:Date.now()+5*60*1e3})),this.config=n,this.hideProduct(),n}async getProduct(){var o,r,i;const t=(o=window.Shopify.currency)==null?void 0:o.active;let n=I.getItem("savedby-product");return n=JSON.parse(n),(!n||n.currency!==t||+((n==null?void 0:n.exp)??0)<Date.now())&&(I.removeItem("savedby-config"),n=null),this.product=n,n||(n=await fetch(`${((i=(r=window.Shopify)==null?void 0:r.routes)==null?void 0:i.root)||"/"}products/savedby-package-protection.json`).then(_=>_.json()).then(_=>_.product),I.setItem("savedby-product",JSON.stringify({...n,currency:t,exp:Date.now()+5*60*1e3})),this.product=n,n)}async setSessionId(t){return I.setItem("savedby-session",t),fetch("/cart/update.js?sb=1",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:{__savedBySessionId:t}})})}getVariant(t,n){const o=t.items.filter(c=>c.requires_shipping&&c.vendor!=="SavedBy");if(!o)return;const r=o.filter(c=>c.requires_shipping&&c.vendor!=="SavedBy").reduce((c,l)=>c+l.line_price,0);let i=this.config.feeTiers.find(c=>r<c.max*100);return i?(n&&(i=this.config.feeTiers.find(c=>c.max===0)||i),this.product.variants.find(c=>c.id===i.variantId||c.price===i.price)):!1}isMerchantResponsible({cartItems:t}){var n;if(this.inlineConfig.merchantResponsible)return!0;if((n=this.config)!=null&&n.merchantResponsibleCondition){const{product_id:o}=this.config.merchantResponsibleCondition;if(o&&(t!=null&&t.some(r=>r.product_id===o)))return!0}return!1}}console.group("%cSavedBy Package Protection","font-size:21px;background: linear-gradient(45deg, #4db6ff, #68e928); color: white; padding: 2px; border-radius: 4px;");let z="v4.8.0";z+=`

`,z+=`✅ Lost
`,z+=`✅ Stolen
`,z+=`✅ Damaged

`,z+=`Learn more: https://savedby.io
`,console.log(`%c${z}`,"font-size: 14px;"),console.groupEnd();const ct=document.createElement("link");Object.assign(ct,{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=League+Spartan:600",media:"all"}),document.head.append(ct),document.readyState==="complete"?_t():window.onload=()=>_t();function _t(){const e=new Kt(document.createElement("div"));window.Shopify.designMode,pe(u(Vt,{SavedBy:e}),e.root)}});
