(self.webpackChunkui=self.webpackChunkui||[]).push([[100,38],{22:(e,t,n)=>{"use strict";n.d(t,{a:()=>o});const o={container:"kCnYDLzR",small:"m_LXTn8P",addButton:"YUeVwYml __bite_extend __bite_theme_addButton",unavailable:"BiamyoHG",outlined:"te3LRnKd",estimatedShipDate:"xxYynv3w",linethrough:"TekpRu6F",backinstockContainer:"FbAiPRNO",bsTitle:"a3V4YjS8",bsProductTitle:"bmYUJgr_",bsText:"DaMJ43Zi",divider:"dLTgkIzV",emailInput:"GSApYLCK",submitted:"ufaFAZ4c",error:"_vV9DpKA",notifyAvailableCheckbox:"KvvNSbB6",modalOverlay:"m2eqLb6A",modal:"HW1ddjw1",modalBackground:"JlvpZ9MA",closeBtn:"wlV5b2eI",message:"yiuO5iOX",quantityContainer:"rHzIKHF_",quantitySelector:"Y4BqWlxV",quantityButton:"XowLjPcM",quantityInput:"ArIe3lMr",addToCartForm:"C4NB_ZTo",messageMobile:"V5Z0NMQM"}},89:(e,t,n)=>{"use strict";n.d(t,{a:()=>o});const o={coupon:"SBfNagXK",couponLabel:"og_2HfF9",details:"aqhYfwsm",applyCoupon:"EbcJojU3",checkbox:"_1tPJt2J",text:"LEJ7TNEK __bite_extend __bite_theme_couponCheckbox_text",expireTime:"CpXLMJp3 __bite_extend __bite_theme_couponCheckbox_expireTime"}},303:(e,t,n)=>{"use strict";var o=n(0),i=n(4),a=n(57),r=n(17),c=n(157),s=n(102);function l({showPriceOnButton:e,showBackInStock:t,notifyFormEndpoint:n,shopifyDomain:l,couponCheckboxProps:u,withQuantitySelector:d,apps:{product:p,cart:v}}){var f,h,m;const b=p.product.value,y=p.selectedVariant.value,g=(0,i.d)((e=>{var t;return{getHexForOptionColor:e.getHexForOptionColor,pathname:e.pathname,buttonSubText:null===(t=e.config.addToCartButtonsConfig)||void 0===t?void 0:t.add_to_cart_shipping_message,addToCartButtonsConfig:e.config.addToCartButtonsConfig}})),_=Object.assign(Object.assign({},g),{selectedVariant:y,product:b,showPriceOnButton:e}),k=(0,r.g)(y)?Object.assign(Object.assign({},_),{selectedVariant:(0,r.i)(y),buttonSubText:`${null!==(h=null===(f=g.addToCartButtonsConfig)||void 0===f?void 0:f.pre_order_button_shipping_prefix)&&void 0!==h?h:""}${(0,r.d)(y.preorderVariant.days).displayValue}`,outlined:!0,buttonMessage:null===(m=g.addToCartButtonsConfig)||void 0===m?void 0:m.pre_order_shipping_message}):void 0,x=[null!=k?k:_];return k&&y&&(null==y?void 0:y.variantId)!==k.selectedVariant.variantId&&x.unshift(_),(0,o.jsxs)("div",{"data-sticky-trigger":"product-add-to-cart",children:[u&&(0,o.jsx)(s.a,Object.assign({},u)),x.map((e=>(0,o.jsx)(a.a,Object.assign({},e,{cartApp:v,productApp:p,withQuantitySelector:d})))),(0,o.jsx)(c.b,{product:b,selectedVariant:y,showBackInStock:t,notifyFormEndpoint:n,shopifyDomain:l})]})}var u=n(2),d=n(161),p=n(90),v=n(9),f=n(14),h=n(23);const m=[f.a,v.b];u.BentoUI.feature({featureId:"product_hero_add_to_cart_button",variations:[u.BentoUI.variation({component:l,hydrate:!0,variationId:"default",apps:m,render(e){return t=this,n=arguments,i=function*({context:e,globalState:t}){var n,o,i,a;const{props:c}=yield t,s=yield(0,h.a)(c.byteState),l=null==s?void 0:s.product,u=!!("desktop"===e.device?null===(n=c.desktopHeroBlocks.right_column)||void 0===n?void 0:n.some((e=>"gift_card_options"===e.type)):null===(o=c.heroBlocks)||void 0===o?void 0:o.some((e=>"gift_card_options"===e.type)));if(!l||(null==l?void 0:l.packCollections)||l.isPack||u)return{html:""};const v=(0,p.a)(e,l,"AddToCart"),f="enabled"===e.getAssignment("memberPricingEnabled"),m="enabled"===e.getAssignment("showPriceOnButton"),{preorderTreatment:b}=(0,r.f)(e,[l]),y="desktop"===e.device?null===(i=c.desktopHeroBlocks.right_column)||void 0===i?void 0:i.find((e=>"product_hero_add_to_cart_button"===e.type)):null===(a=c.heroBlocks)||void 0===a?void 0:a.find((e=>"product_hero_add_to_cart_button"===e.type));return{props:{memberPricingEnabled:f,showPriceOnButton:m,preorderTreatment:b,showBackInStock:(0,d.a)({backInStockOverride:null==l?void 0:l.backInStockOverride,addToCartButton:y}),notifyFormEndpoint:null==y?void 0:y.back_in_stock_endpoint,shopifyDomain:null==y?void 0:y.back_in_store_shopify_domain,couponCheckboxProps:yield v,withQuantitySelector:"enabled"===e.getAssignment("withQuantitySelector")}}},new((o=void 0)||(o=Promise))((function(e,a){function r(e){try{s(i.next(e))}catch(e){a(e)}}function c(e){try{s(i.throw(e))}catch(e){a(e)}}function s(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(r,c)}s((i=i.apply(t,n||[])).next())}));var t,n,o,i}})]}),(0,u.createEntrypoint)("product_hero_add_to_cart_button",l,m)},157:(e,t,n)=>{"use strict";n.d(t,{a:()=>c,b:()=>s});var o=n(0),i=n(22),a=n(1),r=function(e,t,n,o){return new(n||(n=Promise))((function(i,a){function r(e){try{s(o.next(e))}catch(e){a(e)}}function c(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,c)}s((o=o.apply(e,t||[])).next())}))};function c(){return(0,o.jsx)("label",{class:i.a.addButton,onClick:function(){document.body.style.overflow="hidden"},style:{"background-color":"black",color:"white",display:"inline-flex","align-items":"center","justify-content":"center",width:"100%"},htmlFor:"notifyAvailableCheckbox",children:"NOTIFY WHEN AVAILABLE"})}function s({selectedVariant:e,product:t,showBackInStock:n,notifyFormEndpoint:a,shopifyDomain:r}){if(!n||!(null==e?void 0:e.oos)||e.parentId||!a||!r)return(0,o.jsx)(o.Fragment,{});function s(){document.body.style.overflow="auto"}return(0,o.jsx)("form",{class:i.a.container,children:e.oos&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c,{}),(0,o.jsx)("input",{type:"checkbox",id:"notifyAvailableCheckbox",className:i.a.notifyAvailableCheckbox}),(0,o.jsxs)("div",{className:i.a.modalOverlay,children:[(0,o.jsx)("label",{htmlFor:"notifyAvailableCheckbox",className:i.a.modalBackground,onClick:s}),(0,o.jsxs)("div",{className:i.a.modal,children:[(0,o.jsx)("label",{for:"notifyAvailableCheckbox",className:i.a.closeBtn,onClick:s,children:"X"}),(0,o.jsx)(l,{selectedVariant:e,title:null==t?void 0:t.title,notifyFormEndpoint:a})]})]})]})})}function l({selectedVariant:e,title:t,notifyFormEndpoint:n}){var c;if(!(null==e?void 0:e.variantId)||!n)return(0,o.jsx)(o.Fragment,{});const[s,l]=(0,a.useState)();return(0,o.jsxs)("div",{class:i.a.backinstockContainer,children:[(0,o.jsx)("h2",{class:i.a.bsTitle,children:"NOTIFY WHEN AVAILABLE "}),(0,o.jsx)("p",{class:i.a.bsText,children:"We will send you a notification as soon as this product is available again."}),(0,o.jsx)("div",{class:i.a.divider}),(0,o.jsx)("p",{class:i.a.bsProductTitle,children:t}),null===(c=Object.entries(e.selectedOptions))||void 0===c?void 0:c.map((([e,t])=>(0,o.jsxs)("div",{class:i.a.bsText,children:[(0,o.jsx)("b",{children:e}),": ",t]}))),(0,o.jsxs)("form",{id:"notifyForm",method:"get",onSubmit:t=>r(this,void 0,void 0,(function*(){t.preventDefault();const o=t.target,i=new FormData(o).get("email");try{const t=yield fetch(n,{method:"POST",headers:{accept:"application/vnd.api+json",revision:"2025-01-15","content-type":"application/vnd.api+json"},body:JSON.stringify({data:{type:"back-in-stock-subscription",attributes:{profile:{data:{type:"profile",attributes:{email:i}}},channels:["EMAIL"]},relationships:{variant:{data:{type:"catalog-variant",id:`$shopify:::$default:::${e.variantId}`}}}}})});if(!t.ok){const e=yield t.json();return console.error(e),void l({successful:!1,message:"There was an error registering your notification."})}l({successful:!0,message:"Your notification has been registered."})}catch(e){console.error(e),l({successful:!1,message:"There was an error registering your notification."})}})),children:[(0,o.jsx)(u,{}),(0,o.jsx)("button",{class:i.a.addButton,style:"color: white; background-color: black;",type:"submit",children:"Notify Me"}),(0,o.jsx)("p",{class:i.a.bsText,children:"We respect your privacy and will not share your personal information."})]}),s&&(0,o.jsx)("div",{id:"notification",class:s.successful?i.a.submitted:i.a.error,children:s.message})]})}function u(){return(0,o.jsxs)("div",{className:i.a.bsText,children:[(0,o.jsx)("label",{htmlFor:"email",children:"Email Address"}),(0,o.jsx)("input",{type:"email",id:"email",name:"email",required:!0,className:i.a.emailInput,placeholder:"you@example.com"})]})}},102:(e,t,n)=>{"use strict";n.d(t,{a:()=>d});var o=n(0),i=n(3),a=n(89),r=n(1),c=n(4),s=n(33),l=n(32),u=n(59);function d({couponExpiration:e,couponCheckbox:t,couponApplied:n}){var d,p;const v=(0,c.d)((e=>e.loopSession)),{disableCheckbox:f,applyCoupon:h,timeLeft:m,status:b}=function({couponExpiration:e,couponCheckbox:t,couponApplied:n}){var o;const[i,a]=(0,r.useState)(n?"applied":"available"),c=Math.min(...0!==(null==t?void 0:t.countdown_minutes)?[Date.now()+1e3*(null!==(o=null==t?void 0:t.countdown_minutes)&&void 0!==o?o:0)*60]:[],...(null==t?void 0:t.countdown_timestamp)?[new Date(t.countdown_timestamp).getTime()]:[]),s=Math.round(((null!=e?e:c)-Date.now())/1e3),[d,{startCountdown:p}]=(0,u.a)({countStart:s});if(!t||(null==t?void 0:t.disable_checkbox)||d<=0)return{disableCheckbox:!0,timeLeft:0,status:"disabled",applyCoupon(){}};(0,r.useEffect)((()=>{if((null==t?void 0:t.countdown_minutes)||t.countdown_timestamp){if(!e){const e=new Date(c);(0,l.b)("__orly_checkbox_exp",e.toISOString())}p()}}),[]);return{disableCheckbox:!1,applyCoupon:()=>{function e(){a("available"),alert("There was an error applying coupon, please try again.")}"available"===i&&(a("pending"),fetch(`/discount/${null==t?void 0:t.coupon_code_to_apply}`).then((t=>{[200,301,302].includes(t.status)?((0,l.b)("__orly_checkbox_applied","applied"),a("applied")):e()})).catch((t=>{e()})))},timeLeft:d,status:i}}({couponExpiration:e,couponCheckbox:t,couponApplied:n}),y=(0,s.a)();return v?null:f?(0,o.jsx)(i.Fragment,{}):(0,o.jsxs)("div",{id:null==t?void 0:t.handle,class:a.a.coupon,onClick:e=>{h()},children:[(0,o.jsx)("div",{class:a.a.couponLabel,children:"COUPON"}),(0,o.jsxs)("div",{class:a.a.details,children:[(0,o.jsx)("input",{type:"checkbox",disabled:"applied"!==b&&(!y||"pending"===b),class:a.a.checkbox,checked:"applied"===b,onClick:e=>{e.preventDefault(),h()}}),(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{class:a.a.text,dangerouslySetInnerHTML:{__html:"applied"===b?null!==(d=null==t?void 0:t.checked_message)&&void 0!==d?d:"":"pending"===b?"Coupon is being applied...":null!==(p=null==t?void 0:t.initial_message)&&void 0!==p?p:""}}),(0,o.jsx)("div",{class:a.a.expireTime,dangerouslySetInnerHTML:{__html:`${null==t?void 0:t.expires_message.replace("{countdown}",(e=>{const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60),i=e%60;return`${t.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`})(m))}`}})]})]})]})}},90:(e,t,n)=>{"use strict";n.d(t,{a:()=>a});var o=n(96),i=function(e,t,n,o){return new(n||(n=Promise))((function(i,a){function r(e){try{s(o.next(e))}catch(e){a(e)}}function c(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,c)}s((o=o.apply(e,t||[])).next())}))};function a(e,t,n){return i(this,void 0,void 0,(function*(){var i;if(null==t?void 0:t.noCoupon)return;const a=e.cookies.get("__orly_checkbox_exp");let r=a?new Date(a).getTime():void 0;if(r&&rDate.now())?{couponExpiration:r,couponCheckbox:c,couponApplied:"applied"===e.cookies.get("__orly_checkbox_applied")}:void 0}))}},53:(e,t,n)=>{"use strict";function o(e,t){return Boolean(e||t)}function i(e){if(null==e)return;const t="number"==typeof e?e:parseFloat(e);return Number.isFinite(t)?t:void 0}function a(e,t){return{amount:i(e),currency:t}}function r(e,t){return{id:e.variantId||e.id||"",price:a(e.price,t),compareAtPrice:e.compareAtPrice?a(e.compareAtPrice,t):void 0}}function c(e,t){var n,o;if(!e||!t)return;const i=e.priceCurrency||"USD",a=null===(n=e.variants)||void 0===n?void 0:n.find((e=>e.variantId===t));if(a)return r(a,i);for(const n of null!==(o=e.variants)&&void 0!==o?o:[]){const e=n.preorderVariant;if(e&&e.id===t)return r({id:e.id,price:e.price,compareAtPrice:n.compareAtPrice||n.price},i)}}function s(e){if(!e)return{handles:[]};if(!e.combinedKey){const t=[e.handle];return e.preorderSiblingHandle&&t.push(e.preorderSiblingHandle),{handle:e.handle,handles:t}}const t=[e.handle,...e.variants.map((e=>{var t;return null===(t=e.selectedOptions)||void 0===t?void 0:t.childProductHandle})),e.preorderSiblingHandle].filter((e=>!!e));return{handles:[...new Set(t)]}}function l(e,t,n,o){var i,a,r,c,s,l;if(!t)return{matchedHandle:void 0,priceData:void 0,variantPrice:void 0};if(o){const c=e[o],s=null===(i=null==c?void 0:c.variants)||void 0===i?void 0:i.find((e=>e.id===t));if(s)return{matchedHandle:o,priceData:c,variantPrice:s};const l=null===(a=null==n?void 0:n.variants)||void 0===a?void 0:a.find((e=>e.variantId===t)),u=null==l?void 0:l.parentId;if(u){const e=null===(r=null==c?void 0:c.variants)||void 0===r?void 0:r.find((e=>e.id===u));if(e)return{matchedHandle:o,priceData:c,variantPrice:e}}}for(const n of Object.keys(e)){const o=e[n],i=null===(c=null==o?void 0:o.variants)||void 0===c?void 0:c.find((e=>e.id===t));if(i)return{matchedHandle:n,priceData:o,variantPrice:i}}if(n){const o=null===(s=n.variants)||void 0===s?void 0:s.find((e=>e.variantId===t)),i=null==o?void 0:o.parentId;if(i)for(const t of Object.keys(e)){const n=e[t],o=null===(l=null==n?void 0:n.variants)||void 0===l?void 0:l.find((e=>e.id===i));if(o)return{matchedHandle:t,priceData:n,variantPrice:o}}}return{matchedHandle:void 0,priceData:void 0,variantPrice:void 0}}n.d(t,{a:()=>s,b:()=>c,c:()=>l,d:()=>o})},51:(e,t,n)=>{"use strict";n.d(t,{a:()=>i});var o=n(1);function i(e,t,n){const i=(0,o.useMemo)((()=>Array.from(new Set((null!=e?e:[]).map((e=>null==e?void 0:e.trim())).filter(Boolean)))),[e]),[a,r]=(0,o.useState)(!1),[c,s]=(0,o.useState)(t),[l,u]=(0,o.useState)({});(0,o.useEffect)((()=>{r(!0)}),[]),(0,o.useEffect)((()=>{let e=!1;if(u({}),s(t),!t||0===i.length)return void s(!1);const n=window.__ORLY_PRICING__;if(!n)return void s(!1);let o=0;const a={};for(const t of i){const i=n.getPrice(t);i?a[t]=i:(o++,n.queueHandle(t,(n=>{e||(u((e=>Object.assign(Object.assign({},e),{[t]:n}))),o--,0===o&&s(!1))})))}return Object.keys(a).length>0&&u((e=>Object.assign(Object.assign({},e),a))),0===o&&s(!1),()=>{e=!0}}),[i,t,n]);let d,p="";return t&&(!a||c?(p="price-skeleton",d="visibility: hidden;"):Object.keys(l).length>0&&(p="price-fade-in")),{data:l,isLoading:c,isHydrated:a,className:p,ssrStyle:d}}},35:(e,t,n)=>{"use strict";n.d(t,{a:()=>c});var o=n(1),i=n(4),a=n(53),r=n(51);function c(e,t){const{country:n,internationalPricing:c,dynamicCurrencyChange:s}=(0,i.d)((e=>({country:e.country,internationalPricing:e.internationalPricing,dynamicCurrencyChange:e.dynamicCurrencyChange}))),l=Boolean((0,a.d)(s,c)&&n&&"US"!==n),{handle:u,handles:d}=(0,o.useMemo)((()=>(0,a.a)(e)),[null==e?void 0:e.handle,null==e?void 0:e.variants,null==e?void 0:e.combinedKey]),p=(0,o.useMemo)((()=>{var n,o;if(!(null==e?void 0:e.combinedKey)||!t)return;const i=null===(n=e.variants)||void 0===n?void 0:n.find((e=>e.variantId===t));return null===(o=null==i?void 0:i.selectedOptions)||void 0===o?void 0:o.childProductHandle}),[null==e?void 0:e.combinedKey,null==e?void 0:e.variants,t]),{data:v,className:f,ssrStyle:h,isHydrated:m,isLoading:b}=(0,r.a)(d,l,n),y=l&&(!m||b),g="price-skeleton"===f?"price-fade-in":f,_="price-skeleton"===f?void 0:h;if(u){const{variantPrice:n}=(0,a.c)(v,t,e,u);if(n)return{variantPrice:n,className:g,ssrStyle:_};if(t&&!y){const n=(0,a.b)(e,t);if(n)return{variantPrice:n,className:f,ssrStyle:h}}return{variantPrice:void 0,className:f,ssrStyle:h}}{const{variantPrice:n}=(0,a.c)(v,t,e,p);if(n)return{variantPrice:n,className:g,ssrStyle:_};if(t&&!y){const n=(0,a.b)(e,t);if(n)return{variantPrice:n,className:f,ssrStyle:h}}return{variantPrice:void 0,className:f,ssrStyle:h}}}},27:(e,t,n)=>{"use strict";n.d(t,{a:()=>i});var o=n(36);function i(e,t,n){if(!e)return!1;if(n&&!n.includes("Size"))return!1;const i=e.defaultUnselected.value,a=e.selectedOptions.value;return!(!i||!t)&&(0,o.d)(t,a,n)}},161:(e,t,n)=>{"use strict";function o({backInStockOverride:e,addToCartButton:t}){var n;return void 0!==e?e:null!==(n=null==t?void 0:t.back_in_stock_enabled)&&void 0!==n&&n}n.d(t,{a:()=>o})},37:(e,t,n)=>{var o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,r=/^0o[0-7]+$/i,c=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,u=s||l||Function("return this")(),d=Object.prototype.toString,p=Math.max,v=Math.min,f=function(){return u.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||r.test(e)?c(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var o,i,a,r,c,s,l=0,u=!1,d=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=o,a=i;return o=i=void 0,l=t,r=e.apply(a,n)}function g(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-l>=a}function _(){var e=f();if(g(e))return k(e);c=setTimeout(_,function(e){var n=t-(e-s);return d?v(n,a-(e-l)):n}(e))}function k(e){return c=void 0,b&&o?y(e):(o=i=void 0,r)}function x(){var e=f(),n=g(e);if(o=arguments,i=this,s=e,n){if(void 0===c)return function(e){return l=e,c=setTimeout(_,t),u?y(e):r}(s);if(d)return c=setTimeout(_,t),y(s)}return void 0===c&&(c=setTimeout(_,t)),r}return t=m(t)||0,h(n)&&(u=!!n.leading,a=(d="maxWait"in n)?p(m(n.maxWait)||0,t):a,b="trailing"in n?!!n.trailing:b),x.cancel=function(){void 0!==c&&clearTimeout(c),l=0,o=s=i=c=void 0},x.flush=function(){return void 0===c?r:k(f())},x}},13:()=>{},59:(e,t,n)=>{"use strict";n.d(t,{a:()=>r,b:()=>l});var o=n(26);n(37);var i="undefined"!=typeof window?o.useLayoutEffect:o.useEffect;function a(e,t,n,a){const r=(0,o.useRef)(t);i((()=>{r.current=t}),[t]),(0,o.useEffect)((()=>{const t=(null==n?void 0:n.current)??window;if(!t||!t.addEventListener)return;const o=e=>{r.current(e)};return t.addEventListener(e,o,a),()=>{t.removeEventListener(e,o,a)}}),[e,n,a])}function r({countStart:e,countStop:t=0,intervalMs:n=1e3,isIncrement:a=!1}){const{count:r,increment:c,decrement:s,reset:l}=function(e){const[t,n]=(0,o.useState)(e??0);return{count:t,increment:(0,o.useCallback)((()=>{n((e=>e+1))}),[]),decrement:(0,o.useCallback)((()=>{n((e=>e-1))}),[]),reset:(0,o.useCallback)((()=>{n(e??0)}),[e]),setCount:n}}(e),{value:u,setTrue:d,setFalse:p}=function(e=!1){if("boolean"!=typeof e)throw new Error("defaultValue must be `true` or `false`");const[t,n]=(0,o.useState)(e),i=(0,o.useCallback)((()=>{n(!0)}),[]),a=(0,o.useCallback)((()=>{n(!1)}),[]),r=(0,o.useCallback)((()=>{n((e=>!e))}),[]);return{value:t,setValue:n,setTrue:i,setFalse:a,toggle:r}}(!1),v=(0,o.useCallback)((()=>{p(),l()}),[p,l]);return function(e,t){const n=(0,o.useRef)(e);i((()=>{n.current=e}),[e]),(0,o.useEffect)((()=>{if(null===t)return;const e=setInterval((()=>{n.current()}),t);return()=>{clearInterval(e)}}),[t])}((0,o.useCallback)((()=>{r!==t?a?c():s():p()}),[r,t,s,c,a,p]),u?n:null),[r,{startCountdown:d,stopCountdown:p,resetCountdown:v}]}function c(e){const t=(0,o.useRef)((()=>{throw new Error("Cannot call an event handler while rendering.")}));return i((()=>{t.current=e}),[e]),(0,o.useCallback)(((...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[t])}var s="undefined"==typeof window;function l(e,t,n={}){const{initializeWithValue:i=!0}=n,r=(0,o.useCallback)((e=>n.serializer?n.serializer(e):JSON.stringify(e)),[n]),l=(0,o.useCallback)((e=>{if(n.deserializer)return n.deserializer(e);if("undefined"===e)return;const o=t instanceof Function?t():t;let i;try{i=JSON.parse(e)}catch(e){return console.error("Error parsing JSON:",e),o}return i}),[n,t]),u=(0,o.useCallback)((()=>{const n=t instanceof Function?t():t;if(s)return n;try{const t=window.localStorage.getItem(e);return t?l(t):n}catch(t){return console.warn(`Error reading localStorage key “${e}”:`,t),n}}),[t,e,l]),[d,p]=(0,o.useState)((()=>i?u():t instanceof Function?t():t)),v=c((t=>{s&&console.warn(`Tried setting localStorage key “${e}” even though environment is not a client`);try{const n=t instanceof Function?t(u()):t;window.localStorage.setItem(e,r(n)),p(n),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(t){console.warn(`Error setting localStorage key “${e}”:`,t)}})),f=c((()=>{s&&console.warn(`Tried removing localStorage key “${e}” even though environment is not a client`);const n=t instanceof Function?t():t;window.localStorage.removeItem(e),p(n),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}));(0,o.useEffect)((()=>{p(u())}),[e]);const h=(0,o.useCallback)((t=>{t.key&&t.key!==e||p(u())}),[e,u]);return a("storage",h),a("local-storage",h),[d,v,f]}}},e=>{e.O(0,[1,2,3,4,5,6,7,8,9,10,11,12,14,13,17,15,16,18,20,19,22,21,24,23,27,25,26,32],(()=>e(e.s=303))),e.O()}]);