!function(){'use strict';const t='contact',e='account',n='new_comment',o=[[t,t],['blogs',n],['comments',n],[t,'customer']],c=[[e,'customer_login'],[e,'guest_login'],[e,'recover_customer_password'],[e,'create_customer']],r=t=>t.map((([t,e])=>`form[action*='/${t}']:not([data-nocaptcha='true']) input[name='form_type'][value='${e}']`)).join(','),a=t=>()=>t?[...document.querySelectorAll(t)].map((t=>t.form)):[];function s(){const t=[...o],e=r(t);return a(e)}function i(t,e,n=!1){try{const o=window.sessionStorage,c=JSON.parse(o.getItem(e)),{data:r}=c.action?c:{data:c};for(const[e,n]of Object.entries(r))t.elements[e]&&(t.elements[e].value=n);n&&o.removeItem(e)}catch{}}const u='password',m='form_key',f=['recaptcha-v3-token','g-recaptcha-response','h-captcha-response',u],d=()=>{try{return window.sessionStorage}catch{return}},p=t=>t.elements[m],l='form_type',h='cptcha';function _(t){t.dataset[h]=!0}const y=window,E=y.document,v='Shopify',g='ce_forms',T='captcha';let S=!1;((t,e)=>{const n=(w='f06e6c50-85a8-45c8-87d0-21a2b65856fe','https://cdn.shopify.com/shopifycloud/storefront-forms-hcaptcha/ce_storefront_forms_captcha_hcaptcha.v1.5.0.iife.js',A={infoText:'Protected by hCaptcha',privacyText:'Privacy',termsText:'Terms'},(t,e,n)=>{const o=y[v][g],c=o.bindForm;if(c)return c(t,w,e,A).then(n);o.q.push([[t,w,e,A],n]),S||(E.body.append(Object.assign(E.createElement('script'),{id:'captcha-provider',async:!0,src:'https://cdn.shopify.com/shopifycloud/storefront-forms-hcaptcha/ce_storefront_forms_captcha_hcaptcha.v1.5.0.iife.js'})),S=!0)});var w,A;y[v]=y[v]||{},y[v][g]=y[v][g]||{},y[v][g].q=[],y[v][T]=y[v][T]||{},y[v][T].protect=function(t,e){n(t,void 0,e),_(t)},Object.freeze(y[v][T]),function(t,e,n,y,E,v){const[g,T,S,w]=function(t,e,n){const i=e?o:[],u=t?c:[],m=[...i,...u],f=r(m),d=r(i),p=n&&r(m.filter((([t,e])=>n.includes(e))));return[a(f),a(d),a(p),s()]}(y,E,v),A=t=>{const e=t.target;return e instanceof HTMLFormElement?e:e&&e.form},b=t=>g().includes(t);t.addEventListener('submit',(t=>{const e=A(t);if(!e)return;const n=b(e)&&!e.dataset.hcaptchaBound&&!e.dataset.recaptchaBound,o=p(e),c=w().includes(e)&&(!o||!o.value);(n||c)&&t.preventDefault(),c&&!n&&(function(t){try{if(!d())return;!function(t){const e=d();if(!e)return;const n=p(t);if(!n)return;const o=n.value;o&&e.removeItem(o)}(t);const e=Array.from(Array(32),(()=>Math.random().toString(36)[2])).join('');!function(t,e){p(t)||t.append(Object.assign(document.createElement('input'),{type:'hidden',name:m})),t.elements[m].value=e}(t,e),function(t,e){const n=d();if(!n)return;const o=[...t.querySelectorAll(`input[type='${u}']`)].map((({name:t})=>t)),c=[...f,...o],r={};for(const[a,s]of new FormData(t).entries())c.includes(a)||(r[a]=s);n.setItem(e,JSON.stringify({action:t.action,data:r}))}(t,e)}catch(e){console.error('failed to persist form',e)}}(e),e.submit())}));const I=(t,e)=>{t&&!t.dataset[h]&&(n(t,e.some((e=>e===t))),_(t))};for(const o of['focusin','change'])t.addEventListener(o,(t=>{const e=A(t);b(e)&&I(e,T())}));const O=e.get('form_key'),R=e.get(l),L=O&&R;t.addEventListener('DOMContentLoaded',(()=>{const t=T();if(L)for(const e of t)e.elements[l].value===R&&i(e,O);[...new Set([...S(),...g().filter((t=>'true'===t.dataset.shopifyCaptcha))])].forEach((e=>I(e,t)))}))}(E,new URLSearchParams(y.location.search),n,!0,!1,['guest_login'])})()}();