/*! For license information please see novel-storefront.js.LICENSE.txt */ !function(){function t(e){var n=a[e];if(void 0!==n)return n.exports;var r=a[e]={id:e,loaded:!1,exports:{}};return i[e].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var e,n,r,o,i={535:function(t,e,n){async function r(t){const e=(null==t?void 0:t.sessionToken)||(null===i.b||void 0===i.b?void 0:i.b.sessionToken);if(!e||"null"===e||"undefined"===e)return null;d&&d!==e&&(0,a.d)();try{return await(0,c.a)(s.B,(()=>u.c.getReq("/api/public/session",{headers:{[s.v]:e},query:{signatureTargetIdentifier:null==t?void 0:t.cartIdentifier,fallbackEmail:null==t?void 0:t.email}}).then((t=>{if("success"===t.type){d=e;const n=t.body||null;return{value:n,timeoutInMs:n?3e4:0}}throw new l.a(`${t.status}: ${t.error}`)}))),{bustCache:!!(null==t?void 0:t.noCache)||(0,f.d)()})}catch(t){console.error(t)}return null}n.d(e,{a:function(){return p}});var o=n(85614),i=n(45765),a=n(13750),s=n(78504),c=n(22493),u=n(74097),l=n(55391),f=n(79639);window.fetchNovelSession=r;let d="";const p=({noCache:t,sessionToken:e}={})=>async(n,s)=>{const c=s();e=e||c.storefrontAuth.sessionToken||void 0;const{storefrontData:{isHeadless:u,shopifyDomain:l,storefrontAccessToken:f}}=c;if(!e)return n({type:"LOADED_NOVEL_SESSION",payload:{novelSession:null}});await n({type:"LOADING_NOVEL_SESSION",payload:void 0});try{i.a&&await n({type:"LOADED_NOVEL_SESSION",payload:{novelSession:i.a}});const s=await r({sessionToken:e,email:c.storefrontAuth.email,noCache:t});return s?(await(0,o.a)({sessionSignature:s.sessionSignature,isHeadless:u,shopifyDomain:l,storefrontAccessToken:f}),n({type:"LOADED_NOVEL_SESSION",payload:{novelSession:s}})):((0,a.e)(),n({type:"ERROR_LOADING_NOVEL_SESSION",payload:{errorMessage:"Error loading authentication please refresh and try again"}}))}catch(t){return n({type:"ERROR_LOADING_NOVEL_SESSION",payload:{errorMessage:t.message}})}}},809:function(t){t.exports=function(t,e){return null!=t&&e in Object(t)}},1416:function(t,e,n){var r=n(99138)(n(41433),"DataView");t.exports=r},1419:function(t,e,n){var r=n(2931);t.exports=function(t){return r(t,5)}},1711:function(t){t.exports=TypeError},2149:function(t,e,n){var r=n(4558),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},2547:function(t,e,n){function r(){const t=(0,a.b)(u.z);return t&&Object.assign(Object.assign({},t),{value:i(t.value)})}async function o(){try{return i(await(0,a.a)(u.z,(()=>s.c.getReq("/api/public/novel-data").then((t=>{if("success"===t.type)return{value:t.body,timeoutInMs:l};throw new c.a(`${t.status}: ${t.error}`)})))))}catch(t){console.error(t)}return null}function i(t){const e=!(null==t?void 0:t.shopifyDomain)||"undefined"==typeof window||window.location.host!==t.shopifyDomain;return Object.assign(Object.assign({},t),{isHeadless:e})}n.r(e),n.d(e,{fetchNovelStorefrontData:function(){return o},getNovelDataLocalStorageData:function(){return r}});var a=n(22493),s=n(74097),c=n(55391),u=n(78504);const l=6e4;window.fetchNovelStorefrontData=o},2931:function(t,e,n){var r=n(86469),o=n(10149),i=n(82863),a=n(61145),s=n(14306),c=n(87030),u=n(68835),l=n(90859),f=n(96728),d=n(90966),p=n(29697),y=n(31201),v=n(96785),g=n(43283),h=n(19181),m=n(6397),b=n(30492),w=n(50422),_=n(58953),E=n(53764),O=n(31178),A=n(15405),S="[object Arguments]",I="[object Function]",x="[object Object]",T={};T[S]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[x]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[I]=T["[object WeakMap]"]=!1,t.exports=function t(e,n,j,C,N,k){var D,L=1&n,P=2&n,R=4&n;if(j&&(D=N?j(e,C,N,k):j(e)),void 0!==D)return D;if(!_(e))return e;var M=m(e);if(M){if(D=v(e),!L)return u(e,D)}else{var $=y(e),U=$==I||"[object GeneratorFunction]"==$;if(b(e))return c(e,L);if($==x||$==S||U&&!N){if(D=P||U?{}:h(e),!L)return P?f(e,s(D,e)):l(e,a(D,e))}else{if(!T[$])return N?e:{};D=g(e,$,L)}}k||(k=new r);var F=k.get(e);if(F)return F;k.set(e,D),E(e)?e.forEach((function(r){D.add(t(r,n,j,r,e,k))})):w(e)&&e.forEach((function(r,o){D.set(o,t(r,n,j,o,e,k))}));var B=M?void 0:(R?P?p:d:P?A:O)(e);return o(B||e,(function(r,o){B&&(r=e[o=r]),i(D,o,t(r,n,j,o,e,k))})),D}},3330:function(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3583:function(t){t.exports=function(t){return null==t}},4558:function(t,e,n){var r=n(99138)(Object,"create");t.exports=r},4575:function(t,e,n){var r=n(15663),o=n(12827),i=n(16547);t.exports=function(t,e,n){return e==e?i(t,e,n):r(t,o,n)}},4800:function(t,e,n){var r=n(31201),o=n(22934);t.exports=function(t){return o(t)&&"[object Map]"==r(t)}},5576:function(t,e,n){var r=n(17722),o=n(68230),i=n(87181);t.exports=function(t,e,n){for(var a=-1,s=e.length,c={};++a-1}},8985:function(t,e,n){var r=n(41088),o=n(52286),i=n(60769);t.exports={formats:i,parse:o,stringify:r}},9073:function(t,e,n){function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++efetch(`${i.A}/storefront-auth${(0,o.stringify)(Object.assign({fromSignupForm:t.fromSignupForm,customerId:t.customerId,customerEmail:t.customerEmail,signatureTargetIdentifier:t.cartIdentifier},a.b!==a.a.development?{}:{shop:l.b,path_prefix:"/a/novel",timestamp:Date.now(),signature:"development"}),{addQueryPrefix:!0})}`,{headers:Object.assign({"x-shopify-shop-domain":l.b},t.sessionToken?{[i.v]:t.sessionToken}:{})}).then((t=>t.text())).then((t=>{const e=function(t){try{const e=t.indexOf(c),n=t.indexOf(u),r=-1!==e&&-1!==n&&t.slice(e+c.length,n).trim();if(r)return JSON.parse(r)}catch(t){console.log(t)}return null}(t);return e?{value:e,timeoutInMs:p}:{value:e,timeoutInMs:0}}))),{bustCache:!!t.noCache||(0,d.d)()})}catch(t){console.error(t)}return null}n.d(e,{a:function(){return r}});var o=n(8985),i=n(78504),a=n(53729),s=n(22493);const c="// NOVEL_JSON_DATA_START",u="// NOVEL_JSON_DATA_END";var l=n(74097),f=n(13750),d=n(79639);const p=3e4},10588:function(t,e,n){var r=n(1711),o=n(28527),i=n(83575),a=n(69167),s=n(69075)||a||i;t.exports=function(){var t,e={assert:function(t){if(!e.has(t))throw new r("Side channel does not contain "+o(t))},delete:function(e){return!!t&&t["delete"](e)},get:function(e){return t&&t.get(e)},has:function(e){return!!t&&t.has(e)},set:function(e,n){t||(t=s()),t.set(e,n)}};return e}},11040:function(t,e,n){var r;n.d(e,{a:function(){return o}});const o="undefined"!=typeof document&&(null===(r=document.currentScript)||void 0===r?void 0:r.getAttribute("src"))||void 0},11129:function(t,e,n){function r(t){return t&&((0,y.a)(t)||(0,d.a)(t))||null}async function o(t,e){const n=await f.c.postReq("/api/public/session/shopify-headless",{reqBody:{customerToken:t}});return"success"===n.type?e((0,i.a)({sessionToken:n.body.sessionToken})):e({type:"ERROR_LOADING_NOVEL_SESSION",payload:{errorMessage:n.error.message}})}n.d(e,{a:function(){return v},b:function(){return m}});var i=n(535),a=n(85614),s=n(45765),c=n(10587),u=n(13750),l=n(28543),f=n(74097),d=n(19759),p=n(78504),y=n(35469);const v=()=>async(t,e)=>{const n=e();if((0,l.d)(n))return t((async(t,e)=>{const n=e(),r=n.storefrontAuth.externalId||u.f,{storefrontAuth:{sessionToken:o},storefrontData:{isHeadless:i,shopifyDomain:l,storefrontAccessToken:f}}=n;if(!r)return t({type:"LOADED_NOVEL_SESSION",payload:{novelSession:null}});await t({type:"LOADING_NOVEL_SESSION",payload:void 0});try{s.a&&await t({type:"LOADED_NOVEL_SESSION",payload:{novelSession:s.a}});const e=await(0,c.a)(Object.assign({customerId:r},o?{sessionToken:o}:{}));return e&&await(0,a.a)({sessionSignature:e.sessionSignature,isHeadless:i,shopifyDomain:l,storefrontAccessToken:f}),await t({type:"LOADED_NOVEL_SESSION",payload:{novelSession:e}})}catch(e){return t({type:"ERROR_LOADING_NOVEL_SESSION",payload:{errorMessage:e.message}})}}));if((0,l.c)(n)&&n.storefrontData.storefrontCustomerTokenProperty){const e=r(n.storefrontData.storefrontCustomerTokenProperty);if(e)return await o(e,t);!function(t,e){if(h)return;h=!0;const n=setInterval((()=>{const i=r(t);i&&(clearInterval(n),o(i,e))}),100)}(n.storefrontData.storefrontCustomerTokenProperty,t)}if((0,l.b)()){const e=await function(){const t=(0,d.a)("customer-portal-token");return t?Promise.resolve(t):(g||(g=new Promise((e=>{if(t)return t;const n=setInterval((()=>{const t=(0,d.a)("customer-portal-token");t&&(clearInterval(n),e(t))}),100)}))),g)}();if(e){const n=await f.c.postReq("/api/public/session/integration",{reqBody:{integrationId:"stayai",bearerToken:e}});if("success"===n.type)return t((0,i.a)({sessionToken:n.body.sessionToken}));console.error(`Error fetching session token with Stay.ai bearer token: ${e}, error: ${n.error}`)}}return t((0,i.a)())};let g,h=!1;const m=()=>async(t,e)=>{t({type:"LOADING_NOVEL_SESSION_IS_PASS_INSTALLED",payload:void 0});const{storefrontAuth:{sessionToken:n}}=e();if(!n)return t({type:"ERROR_LOADING_NOVEL_SESSION_IS_PASS_INSTALLED",payload:{errorMessage:"No session token found"}});const r=await f.c.getReq("/api/public/session/is-pass-installed",{headers:{[p.v]:n}});return"success"===r.type?t({type:"LOADED_NOVEL_SESSION_IS_PASS_INSTALLED",payload:{isPassInstalled:r.body.isPassInstalled}}):t({type:"ERROR_LOADING_NOVEL_SESSION_IS_PASS_INSTALLED",payload:{errorMessage:r.error.message}})}},11694:function(t,e,n){n.d(e,{a:function(){return o},b:function(){return a},d:function(){return i},e:function(){return r}});const r="__NOVEL_STOREFRONT_STYLE_HAS_LOADED__",o="__novel_discount__",i="__novel_price_rule_id__",a="__novel_discount_id__"},12418:function(t,e,n){var r=n(31454),o=n(18881);t.exports=function(t,e){return t&&t.length?o(t,r(e,2)):[]}},12769:function(t,e,n){var r=n(4575);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},12827:function(t){t.exports=function(t){return t!=t}},13018:function(t,e,n){function r(t){return t?Object.keys(t).reduce(((e,n)=>{const r=t[n];if((null==r?void 0:r.trim)&&a.test(r.trim()))try{e[n]=JSON.parse(t[n].replaceAll("=>nil",":null").replaceAll("=>",":"))}catch(t){}else e[n]=r;return e}),{}):{}}function o(t){return t?r(t.reduce(((t,{key:e,name:n,value:r})=>(t[e||n]=r,t)),{})):{}}function i(t){return t?Object.keys(t).reduce(((e,n)=>{const r=t[n];return null!=r&&e.push({key:n,value:"object"==typeof r?JSON.stringify(r):r}),e}),[]):[]}n.d(e,{a:function(){return i},b:function(){return o},c:function(){return r}});const a=/^{\W*"/},13221:function(t){t.exports=URIError},13347:function(t,e,n){var r=n(51019)(Object.getPrototypeOf,Object);t.exports=r},13459:function(t,e,n){var r=n(18881);t.exports=function(t){return t&&t.length?r(t):[]}},13726:function(t,e,n){var r=n(6397),o=n(75414),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||a.test(t)||!i.test(t)||null!=e&&t in Object(e)}},13750:function(t,e,n){function r(){return!!(0,l.a)(d)}function o(){(0,l.d)(u.B)}function i(){(0,l.d)(u.C)}function a(){o(),i()}function s(){var t;if(y)return!0;const e=(0,l.a)(d);if(!e)return!1;try{const n=null===(t=JSON.parse(e))||void 0===t?void 0:t.timeStamp;return!!n&&Date.now()-parseInt(n,10){var t;try{return null===(t=JSON.parse(e))||void 0===t?void 0:t.customerId}catch(t){return}})(),r=(0,l.a)(u.B);return r&&!(()=>{var t;try{const e=JSON.parse(r),n=null==e?void 0:e.value;return!!n&&!!(null===(t=null==n?void 0:n.customer)||void 0===t?void 0:t.isLoggedIn)}catch(t){return}})()&&o(),(!e&&r||n!==t)&&(a(),(0,l.c)(d,JSON.stringify({customerId:t,timeStamp:Date.now()}))),`${t}`}return t})),y=!!p,v=6e4},13985:function(t,e,n){function r(){return Array.from(d).filter((t=>!!t.isConnected||(d.delete(t),!1)))}function o(t){return function(){if(y)return;const t=(()=>{const t=[],e=(0,s.a)((function(){t.length&&p.forEach((e=>e(t))),t.length=0}),f);return function(n){const r=n.filter((t=>!("childList"!==t.type||!t.addedNodes.length||i(t.target,!0)||Array.from(t.addedNodes).find((t=>{var e;return i(t,!1)||i(t.parentNode,!1)||t.parentNode&&i(null===(e=null==t?void 0:t.parentNode)||void 0===e?void 0:e.parentNode,!1)}))))).flatMap((({addedNodes:t})=>Array.from(t).filter((t=>t.nodeType===Node.ELEMENT_NODE))));r.length&&(t.push(...r.filter((e=>!1===t.includes(e)))),e())}})();try{a(document.body,{subtree:!0,childList:!0},t),d.add(document.body)}catch(e){(0,c.a)((()=>{a(document.body,{subtree:!0,childList:!0},t),d.add(document.body)}))}y=!0}(),p.push(t),()=>{p=p.filter((e=>e!==t))}}function i(t,e){if(!t)return!1;const{parentNode:n}=t;return function(t){return function(t){var e;let n=(null==t?void 0:t.attributes)&&t.attributes[l]&&t.attributes[l].value||t.getAttribute&&t.getAttribute(l)||(null===(e=null==t?void 0:t.dataset)||void 0===e?void 0:e[u])||"";return n&&n.baseVal&&(n=n.baseVal),"string"!=typeof n&&(n=""),!!n.trim()}(t)}(t)||!!e&&!!n&&i(n,e)}function a(t,e,n){const r=new MutationObserver((t=>{t.forEach((t=>{t.addedNodes.forEach((t=>{if(t.nodeType===Node.ELEMENT_NODE){const{shadowRoot:n}=t;n&&r.observe(n,e)}}))})),n(t,r)}));return r.observe(t,e),function(t=document.body){const e=[],n=document.createNodeIterator(t,NodeFilter.SHOW_ELEMENT,(t=>(null==t?void 0:t.shadowRoot)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT));let r;for(;r=n.nextNode();)r.shadowRoot&&e.push(r.shadowRoot);return e.forEach((t=>d.add(t))),e}(t).forEach((t=>{r.observe(t,e)})),r}n.d(e,{a:function(){return r},b:function(){return o}});var s=n(76071),c=n(63810);const u="__novel_modified__",l=`data-${u}`,f=300,d=new Set;let p=[],y=!1},14306:function(t,e,n){var r=n(42083),o=n(15405);t.exports=function(t,e){return t&&r(e,o(e),t)}},14361:function(t){t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var r in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},14556:function(t,e,n){function r(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(r.Cache||o),n}var o=n(90369);r.Cache=o,t.exports=r},14727:function(t,e,n){var r=n(58301);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},14772:function(t,e,n){var r=n(18559);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},14923:function(t,e,n){var r="undefined"!=typeof Symbol&&Symbol,o=n(14361);t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},15405:function(t,e,n){var r=n(31163),o=n(41491),i=n(18330);t.exports=function(t){return i(t)?r(t,!0):o(t)}},15409:function(t){t.exports=function(t){return function(e,n,r){for(var o=-1,i=Object(e),a=r(e),s=a.length;s--;){var c=a[t?s:++o];if(!1===n(i[c],c,i))break}return e}}},15535:function(t,e,n){var r=n(95662);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},15663:function(t){t.exports=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i=200){var v=e?null:s(t);if(v)return c(v);d=!1,l=a,y=new r}else y=e?[]:p;t:for(;++u{if(!a&&"error"===(null==t?void 0:t.type))throw t;return t}))}catch(t){if(e&&e(t,c)){const e=(null===(s=null==t?void 0:t.response)||void 0===s?void 0:s.body)||(null==t?void 0:t.body);throw e&&(t.message=`${t.message?"e.message | ":""}${e}`),t}await new Promise((t=>setTimeout(t,u))),u*=2}}while(c++{switch(e.type){case"SHOW_AUTH_MODAL":return Object.assign(Object.assign({},t),{authModalOpen:!0});case"HIDE_AUTH_MODAL":return Object.assign(Object.assign({},t),{authModalOpen:!1});case"SHOW_GATE":return Object.assign(Object.assign({},t),{prevMountedGate:t.mountedGate,mountedGate:e.payload});case"HIDE_GATE":return Object.assign(Object.assign({},t),{prevMountedGate:t.mountedGate,mountedGate:null});case"UNLOCK_GATE":return Object.assign(Object.assign({},t),{prevMountedGate:t.mountedGate,mountedGate:null,unlockedGateIds:w()(t.unlockedGateIds.concat(e.payload.unversionedGateId))});default:return t}},storefrontAuth:(t=h,e)=>((t=h,e)=>{var n,r,o,i,a,s,c,l,d,y,m,b,w,_,E,O,A;const S=(null===(n=t.storefrontCustomerAuth)||void 0===n?void 0:n.isLoggedIn)&&(null===(r=t.storefrontCustomerAuth)||void 0===r?void 0:r.emailVerified)?null:t.verificationEmailSentTo;switch(e.type){case"LOADING_NOVEL_SESSION":case"STOREFRONT_AUTH_PAGE_RELOADING":case"LOADING_SHOPIFY_LOG_OUT":return Object.assign(Object.assign({},t),{isLoading:!0,storefrontCustomerAuth:null,loadingAuthErrorMessage:null,loadingConnectWalletErrorMessage:null,loggingInErrorMessage:null,creatingAccountErrorMessage:null,sessionSignature:null,verificationEmailSentTo:S});case"LOADED_NOVEL_SESSION_IS_PASS_INSTALLED":return Object.assign(Object.assign({},t),(null===(o=t.storefrontCustomerAuth)||void 0===o?void 0:o.isLoggedIn)?{storefrontCustomerAuth:Object.assign(Object.assign({},t.storefrontCustomerAuth),{isPassInstalled:!!e.payload.isPassInstalled})}:{});case"CREATING_NOVEL_SESSION_SIGNATURE":return Object.assign(Object.assign({},t),{isLoading:!0,sessionSignature:null});case"LOADING_AUTH_VERIFICATION_EMAIL":case"LOADING_AUTH_VERIFICATION_CODE":return Object.assign(Object.assign({},t),{verificationFlowLoading:!0});case"ERROR_LOADING_AUTH_VERIFICATION_EMAIL":case"ERROR_LOADING_AUTH_VERIFICATION_CODE":return Object.assign(Object.assign({},t),{verificationFlowLoading:!1,verifyingCodeErrorMessage:null===(i=e.payload)||void 0===i?void 0:i.errorMessage});case"ERROR_LOADING_NOVEL_SESSION":return Object.assign(Object.assign({},t),{isLoading:!1,initialLoadHasCompleted:!0,loadingAuthErrorMessage:e.payload.errorMessage,loadingConnectWalletErrorMessage:null,loggingInErrorMessage:null,creatingAccountErrorMessage:null,verificationFlowLoading:!1,verifyingCodeErrorMessage:null,verificationEmailSentTo:S});case"ERROR_LOGGING_IN_STOREFRONT_AUTH":return Object.assign(Object.assign({},t),{isLoading:!1,loadingAuthErrorMessage:null,loadingConnectWalletErrorMessage:null,loggingInErrorMessage:e.payload.errorMessage,creatingAccountErrorMessage:null,verificationFlowLoading:!1,verifyingCodeErrorMessage:null,verificationEmailSentTo:S});case"ERROR_CREATING_ACCOUNT_STOREFRONT_AUTH":return Object.assign(Object.assign({},t),{isLoading:!1,loadingAuthErrorMessage:null,loadingConnectWalletErrorMessage:null,loggingInErrorMessage:null,creatingAccountErrorMessage:e.payload.errorMessage,verificationEmailSentTo:S});case"LOADED_NOVEL_SESSION":{const n=null===(a=e.payload.novelSession)||void 0===a?void 0:a.sessionToken,r=null===(s=e.payload.novelSession)||void 0===s?void 0:s.linkClickTimestamp,o=null===(c=e.payload.novelSession)||void 0===c?void 0:c.sessionExpiresAt,i=n?{sessionToken:n,linkClickTimestamp:r,sessionExpiresAt:o}:null;return i&&(0,g.c)(i),Object.assign(Object.assign(Object.assign({},t),i),{isLoading:!1,initialLoadHasCompleted:!i||!!(null===(l=e.payload.novelSession)||void 0===l?void 0:l.customer),walletPassInstallFlow:(null===(d=e.payload.novelSession)||void 0===d?void 0:d.walletPassInstallFlow)||null,loadingAuthErrorMessage:null,loggingInErrorMessage:null,loadingConnectWalletErrorMessage:null,creatingAccountErrorMessage:null,verificationFlowLoading:!1,verifyingCodeErrorMessage:null,verificationEmailSentTo:(null===(y=e.payload.novelSession)||void 0===y?void 0:y.customer.isLoggedIn)&&(null===(m=e.payload.novelSession)||void 0===m?void 0:m.customer.emailVerified)?null:t.verificationEmailSentTo,externalId:(null===(b=e.payload.novelSession)||void 0===b?void 0:b.customer.isLoggedIn)?`${e.payload.novelSession.customer.externalId}`:null,cryptoAddresses:(null===(w=e.payload.novelSession)||void 0===w?void 0:w.cryptoAddresses)||[],email:null===(_=e.payload.novelSession)||void 0===_?void 0:_.customer.email,gateStates:(null===(E=e.payload.novelSession)||void 0===E?void 0:E.gateStates)||null,storefrontCustomerAuth:(null===(O=e.payload.novelSession)||void 0===O?void 0:O.customer)||null,sessionSignature:(null===(A=e.payload.novelSession)||void 0===A?void 0:A.sessionSignature)||null})}case"LOADED_SHOPIFY_LOG_OUT":return(0,u.e)(),window.location.reload(),t;case"STOREFRONT_AUTH_VERIFICATION_EMAIL_SENT":return Object.assign(Object.assign({},t),{isLoading:!1,loadingAuthErrorMessage:null,loadingConnectWalletErrorMessage:null,loggingInErrorMessage:null,creatingAccountErrorMessage:null,externalId:null,storefrontCustomerAuth:null,verificationFlowLoading:!1,verifyingCodeErrorMessage:null,verificationEmailSentTo:e.payload.email});case"CONNECTING_WALLET":return Object.assign(Object.assign({},t),{isLoading:!0,loadingAuthErrorMessage:null,loadingConnectWalletErrorMessage:null,loggingInErrorMessage:null,creatingAccountErrorMessage:null,verificationFlowLoading:!1,verifyingCodeErrorMessage:null});case"ERROR_CONNECTING_WALLET":return Object.assign(Object.assign({},t),{isLoading:!1,loadingAuthErrorMessage:null,loadingConnectWalletErrorMessage:e.payload.errorMessage,loggingInErrorMessage:null,creatingAccountErrorMessage:null,verificationFlowLoading:!1,verifyingCodeErrorMessage:null});case"CONNECTED_WALLET":{const{wallet:n,gateIdsAndRemainingQuantities:r}=e.payload,o=(I=(x=t.cryptoAddresses,f()(p()(x.flatMap((t=>t.cryptoWallets.map((e=>({address:t,cryptoWallet:e}))))),(({cryptoWallet:t})=>t.id)),(t=>{const e=t.map((({address:t})=>Object.assign({},t)));return{cryptoWallet:Object.assign(Object.assign({},t[0].cryptoWallet),{cryptoAddresses:e}),addresses:e}}))).filter((({cryptoWallet:t})=>t.id!==n.id)).concat({cryptoWallet:n,addresses:n.cryptoAddresses}),f()(p()(I.flatMap((t=>t.addresses.map((e=>({cryptoWallet:t.cryptoWallet,address:e}))))),(({address:t})=>t.address)),(t=>Object.assign(Object.assign({},t[0].address),{cryptoWallets:t.map((({cryptoWallet:t})=>v()(t,["cryptoAddresses"])))}))));return(0,u.d)(),Object.assign(Object.assign({},t),{isLoading:!1,loadingAuthErrorMessage:null,loadingConnectWalletErrorMessage:null,loggingInErrorMessage:null,creatingAccountErrorMessage:null,verificationFlowLoading:!1,verifyingCodeErrorMessage:null,cryptoAddresses:o,storefrontCustomerAuth:t.storefrontCustomerAuth&&Object.assign(Object.assign({},t.storefrontCustomerAuth),{gateIdsAndRemainingQuantities:r})})}case"ERROR_CREATING_NOVEL_SESSION_SIGNATURE":return Object.assign(Object.assign({},t),{isLoading:!1,loadingAuthErrorMessage:e.payload.errorMessage});case"CREATED_NOVEL_SESSION_SIGNATURE":return Object.assign(Object.assign({},t),{isLoading:!1,sessionSignature:e.payload.sessionSignature});default:return t}var I,x})(t,e),storefrontData:(t=c,e)=>{const n=((t=c,e)=>{switch(e.type){case"LOADING_STOREFRONT_NOVEL_DATA":return Object.assign(Object.assign({},t),{isStorefrontDataLoading:!0,loadingNovelDataErrorMessage:void 0});case"ERROR_LOADING_STOREFRONT_NOVEL_DATA":return Object.assign(Object.assign({},t),{isStorefrontDataLoading:!1,loadingNovelDataErrorMessage:e.payload.errorMessage});case"LOADED_STOREFRONT_NOVEL_DATA":return Object.assign(Object.assign(Object.assign({},t),{isStorefrontDataLoading:!1,loadingNovelDataErrorMessage:void 0}),e.payload.storefrontDataRes);case"UPDATE_PRICE_RULE_AUTO_APPLIED_STATE":return Object.assign(Object.assign({},t),{autoApplied:e.payload.autoApplied});case"LOADING_AUTH_VERIFICATION_EMAIL":return Object.assign(Object.assign({},t),{isStorefrontDataLoading:!1});case"LOADING_DISCOUNT_APPLICATIONS":return Object.assign(Object.assign({},t),{isStorefrontDataLoading:!0});case"ERROR_LOADING_DISCOUNT_APPLICATIONS":return Object.assign(Object.assign({},t),{isStorefrontDataLoading:!1,discountApplications:t.discountApplications});case"LOADED_DISCOUNT_APPLICATIONS":return Object.assign(Object.assign({},t),{isStorefrontDataLoading:!1,discountApplications:[r()||""].filter(Boolean).concat(e.payload.discountApplications)});case"DISCOUNT_CODE_APPLIED_TO_CART":return(0,a.c)(s.a,e.payload.discountCode),(0,a.c)(s.d,e.payload.priceRuleId),e.payload.discountId&&(0,a.c)(s.b,e.payload.discountId),Object.assign(Object.assign({},t),{isStorefrontDataLoading:!0,novelDiscountApplicationDiscountCode:e.payload.discountCode,novelDiscountApplicationPriceRuleId:e.payload.priceRuleId,novelDiscountApplicationDiscountId:e.payload.discountId,discountApplications:[e.payload.discountCode]});case"DISCOUNT_CODE_REMOVED_FROM_CART":return(0,a.d)(s.a),(0,a.d)(s.d),(0,a.d)(s.b),Object.assign(Object.assign({},t),{isStorefrontDataLoading:!0,novelDiscountApplicationDiscountCode:void 0,novelDiscountApplicationPriceRuleId:void 0,novelDiscountApplicationDiscountId:void 0,discountApplications:[]});default:return t}})(t,e);return n},shopRoute:(t=m,e)=>"SHOP_ROUTE_CHANGE"===e.type?Object.assign(Object.assign({},t),{currentRoutePath:"undefined"!=typeof window?window.location.pathname:"",currentRouteHash:"undefined"!=typeof window?window.location.hash:"",routeId:t.routeId+1}):t},O={},A=Object.keys(E).reduce(((t,e)=>(t[e]=E[e](void 0,{type:O}),t)),{}),S=(0,o.b)(E)},22122:function(t,e,n){var r=n(42032),o=n(22934);t.exports=function t(e,n,i,a,s){return e===n||(null==e||null==n||!o(e)&&!o(n)?e!=e&&n!=n:r(e,n,i,a,t,s))}},22493:function(t,e,n){function r(t,e,n){return(null==n?void 0:n.bustCache)&&(delete c[t],(0,s.d)(t)),async function(t,e){c[t]||(c[t]=e().then((({value:t,timeoutInMs:e})=>({value:t,validUntil:Date.now()+e}))));const n=await c[t];try{(0,s.c)(t,`${JSON.stringify(n)}`)}catch(t){}return n.value}(t,(()=>async function(t){try{if(c[t]){const e=await c[t];if(e&&"number"==typeof e.validUntil&&i(e.validUntil)>0)return setTimeout((()=>{delete c[t]}),i(e.validUntil||0)),{value:e.value,timeoutInMs:Math.max((e.validUntil||0)-Date.now(),0)}}const e=o(t);if(e&&!e.isExpired)return c[t]=Promise.resolve({value:e.value,validUntil:e.validUntil}),setTimeout((()=>{delete c[t]}),i(e.validUntil||0)),{value:e.value,timeoutInMs:Math.max((e.validUntil||0)-Date.now(),0)}}catch(t){}}(t).then((t=>void 0!==t?t:e()))))}function o(t){const e=(0,s.a)(t);let n;if(e){const t=JSON.parse(e),o=i((null==t?void 0:t.validUntil)||0);t&&(n="object"==typeof(r=t.value)&&(null==r?void 0:r.version)&&(null==r?void 0:r.version)!==a.y?void 0:o>0?{value:t.value,validUntil:t.validUntil,isExpired:!1}:{value:t.value,isExpired:!0})}var r;return n}function i(t){return Math.max(t-Date.now(),0)}n.d(e,{a:function(){return r},b:function(){return o}});var a=n(78504),s=n(19759);const c={};"undefined"!=typeof window&&(window.__novel_cache__=c)},22934:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},23048:function(t,e,n){var r=n(58953);t.exports=function(t){return t==t&&!r(t)}},23508:function(t,e,n){var r=n(58953),o=Object.create,i=function(){function t(){}return function(e){if(!r(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=i},23685:function(t,e,n){t=n.nmd(t);var r=n(75380),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.process,s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s},23767:function(t){t.exports=function(t){return this.__data__.has(t)}},23836:function(t,e,n){var r=n(84499),o=n(36678),i=n(90376),a=n(39707);t.exports=a||r.call(i,o)},23892:function(t,e,n){var r=n(72305),o=n(18330);t.exports=function(t,e){var n=-1,i=o(t)?Array(t.length):[];return r(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}},23983:function(t){var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var o=e(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},24313:function(t,e,n){var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(84499);t.exports=i.call(r,o)},24319:function(t,e,n){var r=n(44272),o=n(2931),i=n(35263),a=n(87181),s=n(42083),c=n(77222),u=n(59820),l=n(29697),f=u((function(t,e){var n={};if(null==t)return n;var u=!1;e=r(e,(function(e){return e=a(e,t),u||(u=e.length>1),e})),s(t,l(t),n),u&&(n=o(n,7,c));for(var f=e.length;f--;)i(n,e[f]);return n}));t.exports=f},24670:function(t){t.exports=Math.min},24893:function(t,e,n){var r=n(57177);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},25265:function(t,e,n){var r=n(96701),o=Math.max;t.exports=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,s=o(i.length-e,0),c=Array(s);++a-1e3&&t<1e3||U.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var r=t<0?-G(-t):G(t);if(r!==t){var o=String(r),i=P.call(e,o.length+1);return R.call(o,n,"$&_")+"."+R.call(R.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return R.call(e,n,"$&_")}function o(t,e,n){var r=n.quoteStyle||e,o=tt[r];return o+t+o}function i(t){return R.call(String(t),/"/g,""")}function a(t){return!J||!("object"==typeof t&&(J in t||void 0!==t[J]))}function s(t){return"[object Array]"===f(t)&&a(t)}function c(t){return"[object RegExp]"===f(t)&&a(t)}function u(t){if(z)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!W)return!1;try{return W.call(t),!0}catch(t){}return!1}function l(t,e){return nt.call(t,e)}function f(t){return k.call(t)}function d(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;ne.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return p(P.call(t,0,e.maxStringLength),e)+r}var i=et[e.quoteStyle||"single"];return i.lastIndex=0,o(R.call(R.call(t,i,"\\$1"),/[\x00-\x1f]/g,y),"single",e)}function y(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+M.call(e.toString(16))}function v(t){return"Object("+t+")"}function g(t){return t+" { ? }"}function h(t,e,n,r){return t+" ("+e+") {"+(r?m(n,r):B.call(n,", "))+"}"}function m(t,e){if(0===t.length)return"";var n="\n"+e.prev+e.base;return n+B.call(t,","+n)+"\n"+e.prev}function b(t,e){var n=s(t),r=[];if(n){r.length=t.length;for(var o=0;o0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(l(S,"numericSeparator")&&"boolean"!=typeof S.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var M=S.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return p(e,S);if("number"==typeof e){if(0===e)return Infinity/e>0?"0":"-0";var U=String(e);return M?r(e,U):U}if("bigint"==typeof e){var G=String(e)+"n";return M?r(e,G):G}var V=void 0===S.depth?5:S.depth;if(void 0===w&&(w=0),w>=V&&V>0&&"object"==typeof e)return s(e)?"[Array]":"[Object]";var Y,et=function(t,e){var n;if("\t"===t.indent)n="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;n=B.call(Array(t.indent+1)," ")}return{base:n,prev:B.call(Array(e+1),n)}}(S,w);if(void 0===_)_=[];else if(d(_,e)>=0)return"[Circular]";if("function"==typeof e&&!c(e)){var nt=function(t){if(t.name)return t.name;var e=L.call(D.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),rt=b(e,A);return"[Function"+(nt?": "+nt:" (anonymous)")+"]"+(rt.length>0?" { "+B.call(rt,", ")+" }":"")}if(u(e)){var ot=z?R.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):W.call(e);return"object"!=typeof e||z?ot:v(ot)}if((Y=e)&&"object"==typeof Y&&("undefined"!=typeof HTMLElement&&Y instanceof HTMLElement||"string"==typeof Y.nodeName&&"function"==typeof Y.getAttribute)){for(var it="<"+$.call(String(e.nodeName)),at=e.attributes||[],st=0;st"}if(s(e)){if(0===e.length)return"[]";var ct=b(e,A);return et&&!function(t){for(var e=0;e=0)return!1;return!0}(ct)?"["+m(ct,et)+"]":"[ "+B.call(ct,", ")+" ]"}if(function(t){return"[object Error]"===f(t)&&a(t)}(e)){var ut=b(e,A);return"cause"in Error.prototype||!("cause"in e)||Q.call(e,"cause")?0===ut.length?"["+String(e)+"]":"{ ["+String(e)+"] "+B.call(ut,", ")+" }":"{ ["+String(e)+"] "+B.call(F.call("[cause]: "+A(e.cause),ut),", ")+" }"}if("object"==typeof e&&k){if(Z&&"function"==typeof e[Z]&&X)return X(e,{depth:V-w});if("symbol"!==k&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!E||!t||"object"!=typeof t)return!1;try{E.call(t);try{I.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var lt=[];return O&&O.call(e,(function(t,n){lt.push(A(n,e,!0)+" => "+A(t,e))})),h("Map",E.call(e),lt,et)}if(function(t){if(!I||!t||"object"!=typeof t)return!1;try{I.call(t);try{E.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ft=[];return x&&x.call(e,(function(t){ft.push(A(t,e))})),h("Set",I.call(e),ft,et)}if(function(t){if(!T||!t||"object"!=typeof t)return!1;try{T.call(t,T);try{j.call(t,j)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return g("WeakMap");if(function(t){if(!j||!t||"object"!=typeof t)return!1;try{j.call(t,j);try{T.call(t,T)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return g("WeakSet");if(function(t){if(!C||!t||"object"!=typeof t)return!1;try{return C.call(t),!0}catch(t){}return!1}(e))return g("WeakRef");if(function(t){return"[object Number]"===f(t)&&a(t)}(e))return v(A(Number(e)));if(function(t){if(!t||"object"!=typeof t||!q)return!1;try{return q.call(t),!0}catch(t){}return!1}(e))return v(A(q.call(e)));if(function(t){return"[object Boolean]"===f(t)&&a(t)}(e))return v(N.call(e));if(function(t){return"[object String]"===f(t)&&a(t)}(e))return v(A(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==n.g&&e===n.g)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===f(t)&&a(t)}(e)&&!c(e)){var dt=b(e,A),pt=K?K(e)===Object.prototype:e instanceof Object||e.constructor===Object,yt=e instanceof Object?"":"null prototype",vt=!pt&&J&&Object(e)===e&&J in e?P.call(f(e),8,-1):yt?"Object":"",gt=(pt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(vt||yt?"["+B.call(F.call([],vt||[],yt||[]),": ")+"] ":"");return 0===dt.length?gt+"{}":et?gt+"{"+m(dt,et)+"}":gt+"{ "+B.call(dt,", ")+" }"}return String(e)};var nt=Object.prototype.hasOwnProperty||function(t){return t in this}},28543:function(t,e,n){function r(t){const e=t.storefrontData.customerAccountsEnabled&&!!t.storefrontData.authenticateWithShopifyCustomerAccount;return!(!t.storefrontAuth.isShopifyLoggedIn&&!c.f)||e}function o(t){return!!t.storefrontData.isHeadless&&!!t.storefrontData.storefrontAccessToken&&!!t.storefrontData.storefrontCustomerTokenProperty}function i(t=window.location.pathname){return(0,s.b)(t)===s.a.StayAi}function a(t){if(!(0,s.c)())return;const e="#/shop/subscriptions/",n=t||("undefined"!=typeof window?window.location.hash:void 0),r=(null==n?void 0:n.startsWith(e))?n.replace(e,""):void 0,o=r?parseInt(r,10):void 0;return void 0===o||isNaN(o)?void 0:o}n.d(e,{a:function(){return a},b:function(){return i},c:function(){return o},d:function(){return r}});var s=n(79639),c=n(13750)},28944:function(t,e,n){var r=n(41433).Uint8Array;t.exports=r},29525:function(t){t.exports=function(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o`${t}:${e}`)).join(",")}${(0,i.stringify)(Object.assign(Object.assign({},Object.entries(n).reduce(((t,[e,n])=>(t[`attributes[${e}]`]=n,t)),{})),r?{discount:r}:{}),{addQueryPrefix:!0})}`}async function o({shopifyHostedDomain:t,cartAttributes:e={},discount:n}){await fetch(`https://${t}/checkout${(0,i.stringify)(Object.assign(Object.assign({},Object.entries(e).reduce(((t,[e,n])=>(t[`attributes[${e}]`]=n,t)),{})),n?{discount:n}:{}),{addQueryPrefix:!0})}`,{mode:"no-cors",redirect:"manual"})}n.d(e,{a:function(){return o},b:function(){return r}});var i=n(8985)},33812:function(t,e,n){var r=n(58301),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():o.call(e,n,1),--this.size,0))}},34200:function(t,e,n){n.d(e,{a:function(){return c},b:function(){return s}});var r=n(53729);const o="https://novel.com".replace("https://",""),i=(r.b===r.a.development?o.replace("novel-dev.",""):(r.b,r.a.staging),`${r.d===r.c.production?"app.":""}${r.b!==r.a.staging||o.includes("staging.")?"":"staging."}${o}`),a=`${r.d===r.c.production?"api.":""}${r.b!==r.a.staging||o.includes("staging.")?"":"staging."}${o}`,s=`https://${i}`,c=`https://${a}`},34953:function(t,e,n){var r=n(60157),o=n(75114),i=n(15851),a=r&&1/i(new r([,-0]))[1]==1/0?function(t){return new r(t)}:o;t.exports=a},35263:function(t,e,n){var r=n(87181),o=n(75342),i=n(48549),a=n(86729);t.exports=function(t,e){return e=r(e,t),null==(t=i(t,e))||delete t[a(o(e))]}},35469:function(t,e,n){function r(t){return t?t.split(";").reduce(((t,e)=>{const n=e.indexOf("=");return t[e.slice(0,n).trim()]=e.slice(n+1),t}),{}):{}}function o(t,e){return r(e||("undefined"!=typeof document?document.cookie:""))[t]}function i({name:t,value:e,domain:n,expires:r}){"undefined"!=typeof document&&(void 0===e||""===e?a(t):document.cookie=`${t}=${e}${void 0===r?"":`; expires=${("number"==typeof r?new Date(r):r).toUTCString()}`}${n?`; domain=${n}`:""}`)}function a(t){"undefined"!=typeof document&&(document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`)}n.d(e,{a:function(){return o},b:function(){return r},c:function(){return a},d:function(){return i}})},35845:function(t){var e=Object.prototype.toString,n=Math.max,r=function(t,e){for(var n=[],r=0;r{let r=0;const i=o();if(i)return e(i);const a=setInterval((()=>{2==++r&&t&&t();try{const t=o();if(t)return clearInterval(a),e(t)}catch(t){clearInterval(a),n(t)}}),u)})),l)}function o(){const t=(0,c.b)(document.cookie),e=Object.keys(t),n={};for(let r=0;r0?I.join(",")||null:void 0}];else if(c(g))N=g;else{var D=Object.keys(I);N=h?D.sort(h):D}var L=d?String(n).replace(/\./g,"%2E"):String(n),P=a&&c(I)&&1===I.length?L+"[]":L;if(s&&c(I)&&0===I.length)return P+"[]";for(var R=0;R0?_+w:""}},41433:function(t,e,n){var r=n(75380),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},41491:function(t,e,n){var r=n(58953),o=n(67499),i=n(68201),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=o(t),n=[];for(var s in t)("constructor"!=s||!e&&a.call(t,s))&&n.push(s);return n}},41705:function(t,e,n){function r(t,e,n){return(e=(0,o.a)(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{a:function(){return r}});var o=n(92162)},42032:function(t,e,n){var r=n(86469),o=n(44075),i=n(64622),a=n(62677),s=n(31201),c=n(6397),u=n(30492),l=n(47995),f="[object Arguments]",d="[object Array]",p="[object Object]",y=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,v,g,h){var m=c(t),b=c(e),w=m?d:s(t),_=b?d:s(e),E=(w=w==f?p:w)==p,O=(_=_==f?p:_)==p,A=w==_;if(A&&u(t)){if(!u(e))return!1;m=!0,E=!1}if(A&&!E)return h||(h=new r),m||l(t)?o(t,e,n,v,g,h):i(t,e,w,n,v,g,h);if(!(1&n)){var S=E&&y.call(t,"__wrapped__"),I=O&&y.call(e,"__wrapped__");if(S||I){var x=S?t.value():t,T=I?e.value():e;return h||(h=new r),g(x,T,n,v,h)}}return!!A&&(h||(h=new r),a(t,e,n,v,g,h))}},42083:function(t,e,n){var r=n(82863),o=n(14772);t.exports=function(t,e,n,i){var a=!n;n||(n={});for(var s=-1,c=e.length;++sArray.from(t.querySelectorAll(a)))).forEach((o=>{i(o,n),r&&e?s(o,"Discount Applied"):r&&!e?s(o,"Apply Discount"):t.triggerConfig.shouldReplaceCssSelectorText&&t.triggerConfig.replacementCssSelectorText&&s(o,t.triggerConfig.replacementCssSelectorText)}))}(null===(l=t.triggerConfig)||void 0===l?void 0:l.hideCssSelectorText)&&document.querySelectorAll(t.triggerConfig.hideCssSelectorText).forEach((t=>function(t){if(u.a.hasElementHadOperationApplied(t,"hideElement"))return;if(!("style"in t))return;const{style:e}=t,n=e.display;e.display="none",t.className+=` ${c.h}`,u.a.addOperation(t,"hideElement",(()=>{e.display=n,t.className=t.className.replace(` ${c.h}`,"")}))}(t)))}function o(t,e){(e||document.querySelectorAll(`[${l.a}]`)).forEach((e=>{e.hasAttribute(l.a)&&(i(e,t),e.className.includes(c.e)||(e.className+=` ${c.e}`))}))}function i(t,e){u.a.revertOperation(t,"clickTrigger");const n=t=>{t.stopImmediatePropagation(),t.preventDefault()},r=t=>{n(t),e()};t.addEventListener("click",r,!0),t.addEventListener("mouseup",n,!0),t.addEventListener("mousedown",n,!0),u.a.addOperation(t,"clickTrigger",(()=>{t.removeEventListener("click",r,!0),t.removeEventListener("mouseup",n,!0),t.removeEventListener("mousedown",n,!0)}))}function a(t){let e=null;for(let n=0;n{i.textContent=s;for(let t=0;t-1&&t%1==0&&tl))return!1;var d=c.get(t),p=c.get(e);if(d&&p)return d==e&&p==t;var y=-1,v=!0,g=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++y{var e;const{webUrl:n,customAttributes:r=[],discountApplications:o={}}=(null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.node)||{};return{isHeadless:!0,checkoutId:c(n),customAttributes:(0,l.b)(r),discountApplications:((null==o?void 0:o.edges)||[]).map((t=>(null==t?void 0:t.node.title)||(null==t?void 0:t.node.code)))}}))}(t,e,n.checkoutId):(null==n?void 0:n.cartId)?await async function(t,e,n){return await s(t,e,JSON.stringify({query:m,variables:{id:n}})).then((t=>{var e;const{_id:n,checkoutUrl:r,attributes:o=[],discountCodes:i=[]}=(null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.cart)||{};return{isHeadless:!0,checkoutId:r,customAttributes:(0,l.b)(o),discountApplications:i.map((t=>t.code))}}))}(t,e,n.cartId):{isHeadless:!0,cartId:"",checkoutId:"",customAttributes:(0,l.b)([]),discountApplications:[]}}async function o({shopifyDomain:t,storefrontAccessToken:e,discountCode:r,onLoading:o}){let i=(0,f.a)();return i||(console.error("Need checkout ID to apply balance to cart"),i=await(0,f.b)((async()=>{const t=Promise.resolve().then(n.bind(n,95920)).then((({loadStorefrontStyleSheet:t})=>t())),e=await Promise.resolve().then(n.bind(n,49104)).then((({infoToast:t})=>t));await t,e({content:"Discount will be applied as soon as you have added an item to the cart."})}))),(null==i?void 0:i.checkoutId)?(null==o||o(),async function(t,e,n,r){return await s(t,e,JSON.stringify({query:E,variables:{checkoutId:r,discountCode:n}})).then((t=>{var e,n,r,o,i,a,s;const u=null===(n=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.checkoutDiscountCodeApplyV2)||void 0===n?void 0:n.userErrors;if(u&&Array.isArray(u)?null==u?void 0:u.length:u){if(Array.isArray(u))throw new Error(u.map((t=>(null==t?void 0:t.message)&&t.message.trim&&t.message.trim())).filter(Boolean).join(", ")||"Unknown GraphQl error");throw new Error(u)}const f=null===(o=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.checkoutDiscountCodeApplyV2)||void 0===o?void 0:o.checkoutUserErrors;if(f&&Array.isArray(f)?null==f?void 0:f.length:f){if(Array.isArray(f))throw new Error(f.map((t=>(null==t?void 0:t.message)&&t.message.trim&&t.message.trim())).filter(Boolean).join(", ")||"Unknown GraphQl error");throw new Error(f)}const{webUrl:d,customAttributes:p=[],discountApplications:y={}}=(null===(a=null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.checkoutDiscountCodeApplyV2)||void 0===a?void 0:a.checkout)||{};if(!(null===(s=null==y?void 0:y.edges)||void 0===s?void 0:s.length))throw new Error("Please add applicable item(s) to your cart before applying discount");return{isHeadless:!0,checkoutId:c(d),customAttributes:(0,l.b)(p),discountApplications:((null==y?void 0:y.edges)||[]).map((t=>(null==t?void 0:t.node.title)||(null==t?void 0:t.node.code))).filter(Boolean)}}))}(t,e,r,i.checkoutId)):(null==i?void 0:i.cartId)?(null==o||o(),async function(t,e,n,r){return await s(t,e,JSON.stringify({query:w,variables:{cartId:r,discountCodes:[n]}})).then((t=>{var e,n,r;const o=null===(n=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.cartDiscountCodeUpdate)||void 0===n?void 0:n.userErrors;if(o&&Array.isArray(o)?null==o?void 0:o.length:o){if(Array.isArray(o))throw new Error(o.map((t=>(null==t?void 0:t.message)&&t.message.trim&&t.message.trim())).filter(Boolean).join(", ")||"Unknown GraphQl error");throw new Error(o)}const{id:i,_checkoutUrl:a,attributes:s=[],discounts:c=[]}=(null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.cartDiscountCodeUpdate)||{};return{isHeadless:!0,cartId:i,customAttributes:(0,l.b)(s),discountApplications:c.map((t=>t.code))}}))}(t,e,r,i.cartId)):void 0}async function i(t,e,n){const o=await(0,f.b)(),{customAttributes:i}=await r(t,e);let a;return(null==o?void 0:o.cartId)&&(a=await async function(t,e,n,r){return await s(t,e,JSON.stringify({query:b,variables:{cartId:r,attributes:(0,l.a)(n)}})).then((t=>{var e,n,r;const o=null===(n=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.cartAttributesUpdate)||void 0===n?void 0:n.userErrors;if(o&&Array.isArray(o)?null==o?void 0:o.length:o){if(Array.isArray(o))throw new Error(o.map((t=>(null==t?void 0:t.message)&&t.message.trim&&t.message.trim())).filter(Boolean).join(", ")||"Unknown GraphQl error");throw new Error(o)}const{id:i,_checkoutUrl:a,attributes:s=[],discountCodes:c=[]}=(null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.cartAttributesUpdate)||{};return{isHeadless:!0,cartId:i,customAttributes:(0,l.b)(s),discountApplications:c.map((t=>null==t?void 0:t.code))}}))}(t,e,p()(i,n),o.cartId)),(null==o?void 0:o.checkoutId)&&(a=await async function(t,e,n,r){return await s(t,e,JSON.stringify({query:_,variables:{checkoutId:r,input:{customAttributes:(0,l.a)(n)}}})).then((t=>{var e,n,r,o,i,a;const s=null===(n=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.checkoutAttributesUpdateV2)||void 0===n?void 0:n.userErrors;if(s&&Array.isArray(s)?null==s?void 0:s.length:s){if(Array.isArray(s))throw new Error(s.map((t=>(null==t?void 0:t.message)&&t.message.trim&&t.message.trim())).filter(Boolean).join(", ")||"Unknown GraphQl error");throw new Error(s)}const u=null===(o=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.checkoutAttributesUpdateV2)||void 0===o?void 0:o.checkoutUserErrors;if(u&&Array.isArray(u)?null==u?void 0:u.length:u){if(Array.isArray(u))throw new Error(u.map((t=>(null==t?void 0:t.message)&&t.message.trim&&t.message.trim())).filter(Boolean).join(", ")||"Unknown GraphQl error");throw new Error(u)}const{webUrl:f,customAttributes:d=[],discountApplications:p={}}=(null===(a=null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.checkoutAttributesUpdateV2)||void 0===a?void 0:a.checkout)||{};return{isHeadless:!0,checkoutId:c(f),customAttributes:(0,l.b)(d),discountApplications:((null==p?void 0:p.edges)||[]).map((t=>(null==t?void 0:t.node.title)||(null==t?void 0:t.node.code))).filter(Boolean)}}))}(t,e,p()(i,n),o.checkoutId)),a}async function a(t,e){const n=(0,f.a)();(null==n?void 0:n.checkoutId)&&await s(t,e,JSON.stringify({query:E,variables:{checkoutId:n.checkoutId,discountCode:""}})).then((t=>{var e,n,r,o;const i=null===(n=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.checkoutDiscountCodeApplyV2)||void 0===n?void 0:n.userErrors;if(i&&Array.isArray(i)?null==i?void 0:i.length:i){if(Array.isArray(i))throw new Error(i.map((t=>(null==t?void 0:t.message)&&t.message.trim&&t.message.trim())).filter(Boolean).join(", ")||"Unknown GraphQl error");throw new Error(i)}const a=null===(o=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.checkoutDiscountCodeApplyV2)||void 0===o?void 0:o.checkoutUserErrors;if(a&&Array.isArray(a)?null==a?void 0:a.length:a){if(Array.isArray(a))throw new Error(a.map((t=>(null==t?void 0:t.message)&&t.message.trim&&t.message.trim())).filter(Boolean).join(", ")||"Unknown GraphQl error");throw new Error(a)}})),(null==n?void 0:n.cartId)&&await s(t,e,JSON.stringify({query:w,variables:{cartId:n.cartId,discountCodes:[""]}})).then((t=>{var e,n;const r=null===(n=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.cartDiscountCodeUpdate)||void 0===n?void 0:n.userErrors;if(r&&Array.isArray(r)?null==r?void 0:r.length:r){if(Array.isArray(r))throw new Error(r.map((t=>(null==t?void 0:t.message)&&t.message.trim&&t.message.trim())).filter(Boolean).join(", ")||"Unknown GraphQl error");throw new Error(r)}}))}async function s(t,e,n,r){return await fetch(`https://${t}/api/${r||"2024-01"}/graphql`,{headers:{accept:"application/json","accept-language":"*","content-type":"application/json","x-shopify-storefront-access-token":e},referrerPolicy:"strict-origin-when-cross-origin",method:"POST",mode:"cors",credentials:"omit",body:n}).then((t=>t.json())).then((t=>{if(t.errors){if(Array.isArray(t.errors))throw new Error(t.errors.map((t=>(null==t?void 0:t.message)&&t.message.trim&&t.message.trim())).filter(Boolean).join(", ")||"Unknown GraphQl error");throw new Error(t.errors)}return t}))}function c(t){const e=new URL(t).pathname.split("/checkouts/").pop();if(!e)throw new Error("'/checkouts/' segment should exist");const n=e.split("/")[0];if(!n)throw new Error("checkout token should exist");return n}async function u({shopifyDomain:t,storefrontAccessToken:e,storeCreditCode:r,onLoading:o}){let i=(0,f.a)();if(i&&(null==i?void 0:i.checkoutId)||(console.error("Need checkout ID to apply balance to cart"),i=await(0,f.b)((async()=>{const t=Promise.resolve().then(n.bind(n,95920)).then((({loadStorefrontStyleSheet:t})=>t())),e=await Promise.resolve().then(n.bind(n,49104)).then((({infoToast:t})=>t));await t,e({content:"Discount will be applied as soon as you have added an item to the cart."})}))),null==i?void 0:i.checkoutId)return o&&o(),await s(t,e,JSON.stringify({query:O,variables:{checkoutId:i.checkoutId,giftCardCodes:[r]}})).then((t=>{var e,n;const r=null===(n=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.cartDiscountCodeUpdate)||void 0===n?void 0:n.userErrors;if(r&&Array.isArray(r)?null==r?void 0:r.length:r){if(Array.isArray(r))throw new Error(r.map((t=>(null==t?void 0:t.message)&&t.message.trim&&t.message.trim())).filter(Boolean).join(", ")||"Unknown GraphQl error");throw new Error(r)}}))}n.d(e,{a:function(){return o},b:function(){return u},c:function(){return r},d:function(){return a},e:function(){return i}});var l=n(13018),f=n(39618),d=n(25632),p=n.n(d);const y="\n fragment DiscountApplicationFragment on DiscountApplication {\n __typename\n targetSelection\n allocationMethod\n targetType\n value {\n ... on MoneyV2 {\n amount\n currencyCode\n }\n ... on PricingPercentageValue {\n percentage\n }\n }\n ... on ManualDiscountApplication {\n title\n description\n }\n ... on DiscountCodeApplication {\n code\n applicable\n }\n ... on ScriptDiscountApplication {\n title\n }\n ... on AutomaticDiscountApplication {\n title\n }\n },\n fragment CheckoutFragment on Checkout {\n webUrl\n discountApplications(first: 10) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n }\n edges {\n node {\n __typename\n ...DiscountApplicationFragment\n }\n }\n }\n customAttributes {\n key\n value\n }\n },\n",v="\n fragment UserErrorFragment on UserError {\n field\n message\n },\n fragment CheckoutUserErrorFragment on CheckoutUserError {\n field\n message\n code\n },\n",g="\n id\n checkoutUrl\n attributes{\n key\n value\n }\n discountCodes{\n code\n applicable\n }\n",h=`\n ${y}\n query ($id: ID!) {\n node(id: $id) {\n __typename\n ...CheckoutFragment\n }\n }\n`,m=`query ($id: ID!) {\n cart(id: $id){\n ${g}\n }\n}`,b=`\n mutation cartAttributesUpdate($attributes: [AttributeInput!]!, $cartId: ID!) {\n cartAttributesUpdate(attributes: $attributes, cartId: $cartId) {\n cart {\n ${g}\n }\n userErrors {\n field\n message\n }\n }\n }\n `,w=`\n mutation cartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!] ) {\n cartDiscountCodesUpdate(cartId: $cartId, discountCodes: $discountCodes) {\n cart {\n ${g}\n }\n userErrors {\n field\n message\n }\n }\n }\n `,_=`\n ${y}\n ${v}\n mutation checkoutAttributesUpdateV2($checkoutId: ID!, $input: CheckoutAttributesUpdateV2Input!) {\n checkoutAttributesUpdateV2(checkoutId: $checkoutId, input: $input) {\n checkout {\n ...CheckoutFragment\n }\n userErrors {\n ...UserErrorFragment\n }\n checkoutUserErrors {\n ...CheckoutUserErrorFragment\n }\n }\n }\n`,E=`\n ${y}\n ${v}\n mutation checkoutDiscountCodeApplyV2($checkoutId: ID!, $discountCode: String!) {\n checkoutDiscountCodeApplyV2(checkoutId: $checkoutId, discountCode: $discountCode) {\n checkout {\n ...CheckoutFragment\n }\n userErrors {\n ...UserErrorFragment\n }\n checkoutUserErrors {\n ...CheckoutUserErrorFragment\n }\n }\n }\n`,O=`\n${y}\n${v}\nmutation checkoutGiftCardsAppend($checkoutId: ID!, $giftCardCodes: [String!]!) {\n checkoutGiftCardsAppend(checkoutId: $checkoutId, giftCardCodes: $giftCardCodes) {\n checkout {\n ...CheckoutFragment\n }\n userErrors {\n ...UserErrorFragment\n }\n checkoutUserErrors {\n ...CheckoutUserErrorFragment\n }\n }\n }`},44272:function(t){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n{n=t,r=e})),{pending:{render:({toastProps:e})=>(d=e.toastId,t),hideProgressBar:!1},success:{render:({data:{content:t="",toastDuration:e=p}={},toastProps:n,closeToast:r})=>(clearTimeout(h),r&&(h=setTimeout((()=>{n.toastId===d&&(d=void 0,r())}),e)),t||"")},error:{render:({data:{content:t="",toastDuration:e=p}={},toastProps:n,closeToast:r})=>(clearTimeout(h),r&&(h=setTimeout((()=>{n.toastId===d&&(d=void 0,r())}),e)),t||"")}},Object.assign(Object.assign({},e?{updateId:d}:{}),{position:y,className:`${v} rotateX animated`,bodyClassName:g,hideProgressBar:!0})),{onSuccessToast:(t,e=p)=>n({content:t,toastDuration:e}),onErrorToast:(t,e=p)=>r({content:t,toastDuration:e})}}function i({content:t,toastDuration:e=p,toastId:n=d,placement:r}){return c({type:"success",toastId:n,content:t,isLoading:!1,duration:e||p,placement:r})}function a({content:t,toastDuration:e=p,toastId:n=d,placement:r}){return c({type:"error",toastId:n,content:t,isLoading:!1,duration:e||p,placement:r})}function s({content:t,toastDuration:e=p,toastId:n=d,placement:r}){return c({type:"info",toastId:n,content:t,isLoading:!1,duration:e||p,placement:r})}function c({type:t,toastId:e,content:n,isLoading:r,duration:o,placement:i}){let a=e,s=l();return a?(clearTimeout(h),f.toast.update(a,Object.assign(Object.assign({render:n,type:t,position:i||y,className:`${v} rotateX animated`,bodyClassName:g,isLoading:r},r?{autoClose:2*p}:{}),o?{autoClose:o}:{}))):(a=d=(0,f.toast)(n,Object.assign(Object.assign({type:t,position:i||y,className:v,bodyClassName:g,isLoading:r,hideProgressBar:!0},r?{autoClose:2*p}:{}),o?{autoClose:o}:{})),s=f.toast.onChange((t=>{"removed"===t.status&&d===a&&(d=void 0)}))),o&&(h=setTimeout((()=>{a===d&&(f.toast.dismiss(a),d=void 0),s()}),o)),a}n.r(e),n.d(e,{dismissToast:function(){return r},errorToast:function(){return a},infoToast:function(){return s},loadingToast:function(){return o},successToast:function(){return i}});var u=n(75114),l=n.n(u),f=n(55467);let d;const p=5e3,y="bottom-center",v="novel-toast",g="novel-toast-body";let h},49626:function(t,e,n){var r=n(15535);t.exports=function(t){var e=r(this,t)["delete"](t);return this.size-=e?1:0,e}},49772:function(t){t.exports=function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(o);++r-1)return t.split(",");if(e.throwOnLimitExceeded&&n>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(1===e.arrayLimit?"":"s")+" allowed in an array.");return t},u=function(t,e,n,i){if(t){var a=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(a),l=u?a.slice(0,u.index):a,f=[];if(l){if(!n.plainObjects&&o.call(Object.prototype,l)&&!n.allowPrototypes)return;f.push(l)}for(var d=0;n.depth>0&&null!==(u=s.exec(a))&&d0&&"[]"===t[t.length-1]){var a=t.slice(0,-1).join("");i=Array.isArray(e)&&e[a]?e[a].length:0}for(var s=o?e:c(e,n,i),u=t.length-1;u>=0;--u){var l,f=t[u];if("[]"===f&&n.parseArrays)l=n.allowEmptyArrays&&(""===s||n.strictNullHandling&&null===s)?[]:r.combine([],s);else{l=n.plainObjects?{__proto__:null}:{};var d="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,p=n.decodeDotInKeys?d.replace(/%2E/g,"."):d,y=parseInt(p,10);n.parseArrays||""!==p?!isNaN(y)&&f!==p&&String(y)===p&&y>=0&&n.parseArrays&&y<=n.arrayLimit?(l=[])[y]=s:"__proto__"!==p&&(l[p]=s):l={0:s}}s=l}return s}(f,e,n,i)}};t.exports=function(t,e){var n=function(t){if(!t)return a;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==t.throwOnLimitExceeded&&"boolean"!=typeof t.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var e=void 0===t.charset?a.charset:t.charset,n=void 0===t.duplicates?a.duplicates:t.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||a.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:a.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:a.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:a.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:a.decoder,delimiter:"string"==typeof t.delimiter||r.isRegExp(t.delimiter)?t.delimiter:a.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:a.depth,duplicates:n,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:a.strictDepth,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof t.throwOnLimitExceeded&&t.throwOnLimitExceeded}}(e);if(""===t||null==t)return n.plainObjects?{__proto__:null}:{};for(var l="string"==typeof t?function(t,e){var n={__proto__:null},u=e.ignoreQueryPrefix?t.replace(/^\?/,""):t;u=u.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var l=Infinity===e.parameterLimit?void 0:e.parameterLimit,f=u.split(e.delimiter,e.throwOnLimitExceeded?l+1:l);if(e.throwOnLimitExceeded&&f.length>l)throw new RangeError("Parameter limit exceeded. Only "+l+" parameter"+(1===l?"":"s")+" allowed.");var d,p=-1,y=e.charset;if(e.charsetSentinel)for(d=0;d-1&&(g=i(g)?[g]:g);var w=o.call(n,v);w&&"combine"===e.duplicates?n[v]=r.combine(n[v],g):w&&"last"!==e.duplicates||(n[v]=g)}return n}(t,n):t,f=n.plainObjects?{__proto__:null}:{},d=Object.keys(l),p=0;p{const t=n(22018);r.replaceReducer(t)}))),"undefined"!=typeof window&&(window.__n_stft_st__=r),r}()},52602:function(t,e,n){function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++r{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame((()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(e,n)}))}))}function i(t){let{enter:e,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:a=300}=t;return function(t){let{children:s,position:c,preventExitTransition:u,done:l,nodeRef:f,isIn:d,playToast:p}=t;const y=r?`${e}--${c}`:e,v=r?`${n}--${c}`:n,g=(0,b.useRef)(0);return(0,b.useLayoutEffect)((()=>{const t=f.current,e=y.split(" "),n=r=>{r.target===f.current&&(p(),t.removeEventListener("animationend",n),t.removeEventListener("animationcancel",n),0===g.current&&"animationcancel"!==r.type&&t.classList.remove(...e))};t.classList.add(...e),t.addEventListener("animationend",n),t.addEventListener("animationcancel",n)}),[]),(0,b.useEffect)((()=>{const t=f.current,e=()=>{t.removeEventListener("animationend",e),i?o(t,l,a):l()};d||(u?e():(g.current=1,t.className+=` ${v}`,t.addEventListener("animationend",e)))}),[d]),b.createElement(b.Fragment,null,s)}}function a(t,e){return null!=t?{content:t.content,containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,status:e}:{}}function s(t,e){var n;if(e)return!(null==(n=I.get(e))||!n.isToastActive(t));let r=!1;return I.forEach((e=>{e.isToastActive(t)&&(r=!0)})),r}function c(t,e){S(t)&&(C()||x.push({content:t,options:e}),I.forEach((n=>{n.buildToast(t,e)})))}function u(t,e){I.forEach((n=>{null!=e&&null!=e&&e.containerId?(null==e?void 0:e.containerId)===n.id&&n.toggle(t,null==e?void 0:e.id):n.toggle(t,null==e?void 0:e.id)}))}function l(t){const{subscribe:e,getSnapshot:n,setProps:r}=(0,b.useRef)(function(t){const e=t.containerId||1;return{subscribe(n){const r=function(t,e,n){let r=1,o=0,i=[],s=[],c=[],u=e;const l=new Map,f=new Set,d=()=>{c=Array.from(l.values()),f.forEach((t=>t()))},p=t=>{s=null==t?[]:s.filter((e=>e!==t)),d()},y=t=>{const{toastId:e,onOpen:r,updateId:o,children:i}=t.props,c=null==o;t.staleId&&l.delete(t.staleId),l.set(e,t),s=[...s,t.props.toastId].filter((e=>e!==t.staleId)),d(),n(a(t,c?"added":"updated")),c&&O(r)&&r((0,b.isValidElement)(i)&&i.props)};return{id:t,props:u,observe:t=>(f.add(t),()=>f.delete(t)),toggle:(t,e)=>{l.forEach((n=>{null!=e&&e!==n.props.toastId||O(n.toggle)&&n.toggle(t)}))},removeToast:p,toasts:l,clearQueue:()=>{o-=i.length,i=[]},buildToast:(e,s)=>{if((e=>{let{containerId:n,toastId:r,updateId:o}=e;const i=n?n!==t:1!==t,a=l.has(r)&&null==o;return i||a})(s))return;const{toastId:c,updateId:f,data:v,staleId:g,delay:h}=s,m=()=>{p(c)},w=null==f;w&&o++;const I={...u,style:u.toastStyle,key:r++,...Object.fromEntries(Object.entries(s).filter((t=>{let[e,n]=t;return null!=n}))),toastId:c,updateId:f,data:v,closeToast:m,isIn:!1,className:A(s.className||u.toastClassName),bodyClassName:A(s.bodyClassName||u.bodyClassName),progressClassName:A(s.progressClassName||u.progressClassName),autoClose:!s.isLoading&&(x=s.autoClose,T=u.autoClose,!1===x||_(x)&&x>0?x:T),deleteToast(){const t=l.get(c),{onClose:e,children:r}=t.props;O(e)&&e((0,b.isValidElement)(r)&&r.props),n(a(t,"removed")),l.delete(c),o--,o<0&&(o=0),i.length>0?y(i.shift()):d()}};var x,T;I.closeButton=u.closeButton,!1===s.closeButton||S(s.closeButton)?I.closeButton=s.closeButton:!0===s.closeButton&&(I.closeButton=!S(u.closeButton)||u.closeButton);let j=e;(0,b.isValidElement)(e)&&!E(e.type)?j=(0,b.cloneElement)(e,{closeToast:m,toastProps:I,data:v}):O(e)&&(j=e({closeToast:m,toastProps:I,data:v}));const C={content:j,props:I,staleId:g};u.limit&&u.limit>0&&o>u.limit&&w?i.push(C):_(h)?setTimeout((()=>{y(C)}),h):y(C)},setProps(t){u=t},setToggle:(t,e)=>{l.get(t).toggle=e},isToastActive:t=>s.some((e=>e===t)),getSnapshot:()=>c}}(e,t,j);I.set(e,r);const o=r.observe(n);return x.forEach((t=>c(t.content,t.options))),x=[],()=>{o(),I.delete(e)}},setProps(t){var n;null==(n=I.get(e))||n.setProps(t)},getSnapshot(){var t;return null==(t=I.get(e))?void 0:t.getSnapshot()}}}(t)).current;r(t);const o=(0,b.useSyncExternalStore)(e,n,n);return{getToastToRender:function(e){if(!o)return[];const n=new Map;return t.newestOnTop&&o.reverse(),o.forEach((t=>{const{position:e}=t.props;n.has(e)||n.set(e,[]),n.get(e).push(t)})),Array.from(n,(t=>e(t[0],t[1])))},isToastActive:s,count:null==o?void 0:o.length}}function f(t){function e(){a(!0)}function n(){a(!1)}function r(e){const r=u.current;l.canDrag&&r&&(l.didMove=!0,i&&n(),l.delta="x"===t.draggableDirection?e.clientX-l.start:e.clientY-l.start,l.start!==e.clientX&&(l.canCloseOnClick=!1),r.style.transform=`translate3d(${"x"===t.draggableDirection?`${l.delta}px, var(--y)`:`0, calc(${l.delta}px + var(--y))`},0)`,r.style.opacity=""+(1-Math.abs(l.delta/l.removalDistance)))}function o(){document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",o);const e=u.current;if(l.canDrag&&l.didMove&&e){if(l.canDrag=!1,Math.abs(l.delta)>l.removalDistance)return c(!0),t.closeToast(),void t.collapseAll();e.style.transition="transform 0.2s, opacity 0.2s",e.style.removeProperty("transform"),e.style.removeProperty("opacity")}}const[i,a]=(0,b.useState)(!1),[s,c]=(0,b.useState)(!1),u=(0,b.useRef)(null),l=(0,b.useRef)({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:f,pauseOnHover:d,closeToast:p,onClick:y,closeOnClick:v}=t;var g,h;null==(h=I.get((g={id:t.toastId,containerId:t.containerId,fn:a}).containerId||1))||h.setToggle(g.id,g.fn),(0,b.useEffect)((()=>{if(t.pauseOnFocusLoss)return document.hasFocus()||n(),window.addEventListener("focus",e),window.addEventListener("blur",n),()=>{window.removeEventListener("focus",e),window.removeEventListener("blur",n)}}),[t.pauseOnFocusLoss]);const m={onPointerDown:function(e){if(!0===t.draggable||t.draggable===e.pointerType){l.didMove=!1,document.addEventListener("pointermove",r),document.addEventListener("pointerup",o);const n=u.current;l.canCloseOnClick=!0,l.canDrag=!0,n.style.transition="none","x"===t.draggableDirection?(l.start=e.clientX,l.removalDistance=n.offsetWidth*(t.draggablePercent/100)):(l.start=e.clientY,l.removalDistance=n.offsetHeight*(80===t.draggablePercent?1.5*t.draggablePercent:t.draggablePercent)/100)}},onPointerUp:function(r){const{top:o,bottom:i,left:a,right:s}=u.current.getBoundingClientRect();"touchend"!==r.nativeEvent.type&&t.pauseOnHover&&r.clientX>=a&&r.clientX<=s&&r.clientY>=o&&r.clientY<=i?n():e()}};return f&&d&&(m.onMouseEnter=n,t.stacked||(m.onMouseLeave=e)),v&&(m.onClick=t=>{y&&y(t),l.canCloseOnClick&&p()}),{playToast:e,pauseToast:n,isRunning:i,preventExitTransition:s,toastRef:u,eventHandlers:m}}function d(t){let{delay:e,isRunning:n,closeToast:r,type:o="default",hide:i,className:a,style:s,controlledProgress:c,progress:u,rtl:l,isIn:f,theme:d}=t;const p=i||c&&0===u,y={...s,animationDuration:`${e}ms`,animationPlayState:n?"running":"paused"};c&&(y.transform=`scaleX(${u})`);const v=w("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${d}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":l}),g=O(a)?a({rtl:l,type:o,defaultClassName:v}):w(v,a),h={[c&&u>=1?"onTransitionEnd":"onAnimationEnd"]:c&&u<1?null:()=>{f&&r()}};return b.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":p},b.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${d} Toastify__progress-bar--${o}`}),b.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer",className:g,style:y,...h}))}function p(t){return t&&(E(t.toastId)||_(t.toastId))?t.toastId:k()}function y(t,e){return c(t,e),e.toastId}function v(t,e){return{...e,type:e&&e.type||t,toastId:p(e)}}function g(t){return(e,n)=>y(e,v(t,n))}function h(t,e){return y(t,v("default",e))}function m(t){function e(t){const e=w("Toastify__toast-container",`Toastify__toast-container--${t}`,{"Toastify__toast-container--rtl":y});return O(d)?d({position:t,rtl:y,defaultClassName:e}):w(e,A(d))}function n(){o&&(a(!0),h.play())}let r={...H,...t};const o=t.stacked,[i,a]=(0,b.useState)(!0),s=(0,b.useRef)(null),{getToastToRender:c,isToastActive:u,count:f}=l(r),{className:d,style:p,rtl:y,containerId:v}=r;return D((()=>{if(o){var t;const e=s.current.querySelectorAll('[data-in="true"]'),n=12,o=null==(t=r.position)?void 0:t.includes("top");let a=0,c=0;Array.from(e).reverse().forEach(((t,e)=>{const r=t;r.classList.add("Toastify__toast--stacked"),e>0&&(r.dataset.collapsed=`${i}`),r.dataset.pos||(r.dataset.pos=o?"top":"bot");const s=a*(i?.2:1)+(i?0:n*e);r.style.setProperty("--y",`${o?s:-1*s}px`),r.style.setProperty("--g",`${n}`),r.style.setProperty("--s",""+(1-(i?c:0))),a+=r.offsetHeight,c+=.025}))}}),[i,f,o]),b.createElement("div",{ref:s,className:"Toastify",id:v,onMouseEnter:()=>{o&&(a(!1),h.pause())},onMouseLeave:n},c(((t,r)=>{const i=r.length?{...p}:{...p,pointerEvents:"none"};return b.createElement("div",{className:e(t),style:i,key:`container-${t}`},r.map((t=>{let{content:e,props:r}=t;return b.createElement(R,{...r,stacked:o,collapseAll:n,isIn:u(r.toastId,r.containerId),style:r.style,key:`toast-${r.key}`},e)})))})))}n.r(e),n.d(e,{Bounce:function(){return $},Flip:function(){return B},Icons:function(){return P},Slide:function(){return U},ToastContainer:function(){return m},Zoom:function(){return F},collapseToast:function(){return o},cssTransition:function(){return i},toast:function(){return h},useToast:function(){return f},useToastContainer:function(){return l}});var b=n(63696),w=function(){for(var t,e,n=0,o="",i=arguments.length;n"number"==typeof t&&!isNaN(t),E=t=>"string"==typeof t,O=t=>"function"==typeof t,A=t=>E(t)||O(t)?t:null,S=t=>(0,b.isValidElement)(t)||E(t)||O(t)||_(t),I=new Map;let x=[];const T=new Set,j=t=>T.forEach((e=>e(t))),C=()=>I.size>0;let N=1;const k=()=>""+N++;h.loading=(t,e)=>y(t,v("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),h.promise=function(t,e,n){let r,{pending:o,error:i,success:a}=e;o&&(r=E(o)?h.loading(o,n):h.loading(o.render,{...n,...o}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(t,e,o)=>{if(null==e)return void h.dismiss(r);const i={type:t,...s,...n,data:o},a=E(e)?{render:e}:e;return r?h.update(r,{...i,...a}):h(a.render,{...i,...a}),o},u=O(t)?t():t;return u.then((t=>c("success",a,t))).catch((t=>c("error",i,t))),u},h.success=g("success"),h.info=g("info"),h.error=g("error"),h.warning=g("warning"),h.warn=h.warning,h.dark=(t,e)=>y(t,v("default",{theme:"dark",...e})),h.dismiss=function(t){!function(t){var e;if(C()){if(null==t||E(e=t)||_(e))I.forEach((e=>{e.removeToast(t)}));else if(t&&("containerId"in t||"id"in t)){const e=I.get(t.containerId);e?e.removeToast(t.id):I.forEach((e=>{e.removeToast(t.id)}))}}else x=x.filter((e=>null!=t&&e.options.toastId!==t))}(t)},h.clearWaitingQueue=function(t){void 0===t&&(t={}),I.forEach((e=>{!e.props.limit||t.containerId&&e.id!==t.containerId||e.clearQueue()}))},h.isActive=s,h.update=function(t,e){void 0===e&&(e={});const n=((t,e)=>{var n;let{containerId:r}=e;return null==(n=I.get(r||1))?void 0:n.toasts.get(t)})(t,e);if(n){const{props:r,content:o}=n,i={delay:100,...r,...e,toastId:e.toastId||t,updateId:k()};i.toastId!==t&&(i.staleId=t);const a=i.render||o;delete i.render,y(a,i)}},h.done=t=>{h.update(t,{progress:1})},h.onChange=function(t){return T.add(t),()=>{T.delete(t)}},h.play=t=>u(!0,t),h.pause=t=>u(!1,t);const D="undefined"!=typeof window?b.useLayoutEffect:b.useEffect,L=t=>{let{theme:e,type:n,isLoading:r,...o}=t;return b.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===e?"currentColor":`var(--toastify-icon-color-${n})`,...o})},P={info:function(t){return b.createElement(L,{...t},b.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(t){return b.createElement(L,{...t},b.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(t){return b.createElement(L,{...t},b.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(t){return b.createElement(L,{...t},b.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return b.createElement("div",{className:"Toastify__spinner"})}},R=t=>{const{isRunning:e,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:i}=f(t),{closeButton:a,children:s,autoClose:c,onClick:u,type:l,hideProgressBar:p,closeToast:y,transition:v,position:g,className:h,style:m,bodyClassName:_,bodyStyle:E,progressClassName:A,progressStyle:S,updateId:I,role:x,progress:T,rtl:j,toastId:C,deleteToast:N,isIn:k,isLoading:D,closeOnClick:L,theme:R}=t,M=w("Toastify__toast",`Toastify__toast-theme--${R}`,`Toastify__toast--${l}`,{"Toastify__toast--rtl":j},{"Toastify__toast--close-on-click":L}),$=O(h)?h({rtl:j,position:g,type:l,defaultClassName:M}):w(M,h),U=function(t){let{theme:e,type:n,isLoading:r,icon:o}=t,i=null;const a={theme:e,type:n};return!1===o||(O(o)?i=o({...a,isLoading:r}):(0,b.isValidElement)(o)?i=(0,b.cloneElement)(o,a):r?i=P.spinner():(t=>t in P)(n)&&(i=P[n](a))),i}(t),F=!!T||!c,B={closeToast:y,type:l,theme:R};let H=null;return!1===a||(H=O(a)?a(B):(0,b.isValidElement)(a)?(0,b.cloneElement)(a,B):function(t){let{closeToast:e,theme:n,ariaLabel:r="close"}=t;return b.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:t=>{t.stopPropagation(),e(t)},"aria-label":r},b.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},b.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(B)),b.createElement(v,{isIn:k,done:N,position:g,preventExitTransition:n,nodeRef:r,playToast:i},b.createElement("div",{id:C,onClick:u,"data-in":k,className:$,...o,style:m,ref:r},b.createElement("div",{...k&&{role:x},className:O(_)?_({type:l}):w("Toastify__toast-body",_),style:E},null!=U&&b.createElement("div",{className:w("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!D})},U),b.createElement("div",null,s)),H,b.createElement(d,{...I&&!F?{key:`pb-${I}`}:{},rtl:j,theme:R,delay:c,isRunning:e,isIn:k,closeToast:y,hide:p,type:l,style:S,className:A,controlledProgress:F,progress:T||0})))},M=function(t,e){return void 0===e&&(e=!1),{enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}},$=i(M("bounce",!0)),U=i(M("slide",!0)),F=i(M("zoom")),B=i(M("flip")),H={position:"top-right",transition:$,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"}},56152:function(t,e,n){var r=n(21588),o=n(79548),i=n(71724);t.exports=r?function(t){return r(t)}:o?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return o(t)}:i?function(t){return i(t)}:null},57177:function(t,e,n){var r=n(28944);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},57260:function(t){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++ni?t.replace(`:${e}`,encodeURIComponent(i[e])):t),t):t,g=a&&0!==Object.keys(a).length?`${v}${(0,o.stringify)(a,{addQueryPrefix:!0})}`:v,fetch(g,Object.assign({},l)).then((t=>{var e;if(t.status>=400)return t.text().then((async e=>{var r,o,i;let a;try{a=JSON.parse(e)}catch(t){"object"==typeof e&&(a=e)}const s=(null==a?void 0:a.status)||t.status,c=await n.e(383).then(n.bind(n,57383)).then((t=>t.getReasonPhrase)),u=(null==a?void 0:a.message)||(null===(r=null==a?void 0:a.error)||void 0===r?void 0:r.message)||(null==a?void 0:a.errors)||(null==a?void 0:a.messages)||s&&c(s)||e,l="string"!=typeof u?JSON.stringify(u):u;return Promise.reject({status:s,message:l,verbose:!!(null===(o=null==a?void 0:a.meta)||void 0===o?void 0:o.verbose),displayAsError:!!(null===(i=null==a?void 0:a.meta)||void 0===i?void 0:i.displayAsError)})})).catch((e=>{var n,r;return e.message&&e.status?Promise.reject({status:e.status,message:e.message,verbose:!!(null==e?void 0:e.verbose)||!!(null===(n=null==e?void 0:e.meta)||void 0===n?void 0:n.verbose),displayAsError:!!(null==e?void 0:e.displayAsError)||!!(null===(r=null==e?void 0:e.meta)||void 0===r?void 0:r.displayAsError)}):Promise.reject(t)}));const o=null===(e=t.headers)||void 0===e?void 0:e.get("content-type");if(o){if(o.includes("application/json"))return"0"===t.headers.get("content-length")?{type:"success",body:void 0}:t.json().then((t=>{if(!1===t.success){const e=t;return{type:"error",status:e.status,error:(0,f.b)(e)}}return{type:"success",body:t}}));if(o.includes("application/text")||o.includes("text/plain"))return t.text().then((t=>({type:"success",body:t})))}return o?o.includes("application/signed-exchange")&&0===s?r(g,Object.assign(Object.assign({},u),{retryCount:s+1,headers:Object.assign(Object.assign({},u.headers),{Accept:"application/json,text/html,text/plain"})})):(o.includes("text/html")?t.text():Promise.resolve("")).then((t=>{const e=`unhandled content-type header in response from ${g}, content-type: ${o}${t?`\n\n${t}`:""}`;return console.error(e),Promise.reject({status:417,message:e})})):{type:"success",body:void 0,headers:Array.from(t.headers.entries()).reduce(((t,[e,n])=>Object.assign(Object.assign({},t),{[e]:n})),{})}})).catch((t=>{d.b!==d.a.production&&console.error(function(t,e,n,r){return`request failed to ${t} | ${e}${n?`: ${n}`:""}${r?`: ${r}`:""}`}(g,null==t?void 0:t.status,null==t?void 0:t.statusText,"object"==typeof t?JSON.stringify(t):null==t?void 0:t.toString()));const e=(null==t?void 0:t.message)||(()=>{var e;try{return JSON.stringify(t)}catch(n){return null===(e=null==t?void 0:t.toString)||void 0===e?void 0:e.call(t)}})()||"",n=parseInt(null==t?void 0:t.status,10)||400,r=(null==t?void 0:t.verbose)?new f.a(e,!!(null==t?void 0:t.displayAsError)):new Error(e);return r.status=n,t.stack&&(r.stack=t.stack),{type:"error",status:n,error:r}}))}n.d(e,{a:function(){return v},b:function(){return g}});var o=n(8985),i=n(1419),a=n.n(i),s=n(54679),c=n.n(s),u=n(25632),l=n.n(u),f=n(55391),d=n(53729),p=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);othis.middlewares.reduce(((e,n)=>n(t,e)),l()(a()(this.requestConfig),e)),this.prefix=t,this.requestConfig=e,this.middlewares=n}getReq(t,e={}){return function(t,e={}){return r(t,Object.assign(Object.assign({},e),{method:"GET"}))}(`${this.prefix}${t}`,this.getFinalRequestConfig(t,e))}putReq(t,e={}){return function(t,e={}){return r(t,Object.assign(Object.assign({},e),{method:"PUT"}))}(`${this.prefix}${t}`,this.getFinalRequestConfig(t,e))}postReq(t,e={}){return function(t,e={}){return r(t,Object.assign(Object.assign({},e),{method:"POST"}))}(`${this.prefix}${t}`,this.getFinalRequestConfig(t,e))}patchReq(t,e={}){return function(t,e={}){return r(t,Object.assign(Object.assign({},e),{method:"PATCH"}))}(`${this.prefix}${t}`,this.getFinalRequestConfig(t,e))}deleteReq(t,e={}){return function(t,e={}){return r(t,Object.assign(Object.assign({},e),{method:"DELETE"}))}(`${this.prefix}${t}`,this.getFinalRequestConfig(t,e))}}const g=new v},58332:function(t,e,n){var r=n(29525),o=n(26793),i=n(31454),a=n(6397);t.exports=function(t,e){return function(n,s){var c=a(n)?r:o,u=e?e():{};return c(n,t,i(s,2),u)}}},58355:function(t,e,n){var r=n(78740),o=n(13347),i=n(88876),a=n(53629),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,i(t)),t=o(t);return e}:a;t.exports=s},58569:function(t){t.exports=function(t){return this.__data__.get(t)}},58953:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},59820:function(t,e,n){var r=n(73406),o=n(25265),i=n(26805);t.exports=function(t){return i(o(t,void 0,r),t+"")}},60021:function(t){t.exports=function(t,e,n){for(var r=-1,o=null==t?0:t.length;++r0&&i(l)?n>1?t(l,n-1,i,a,s):r(s,l):a||(s[s.length]=l)}return s}},61145:function(t,e,n){var r=n(42083),o=n(31178);t.exports=function(t,e){return t&&r(e,o(e),t)}},61414:function(t){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n{a.push(t)}))),s)}function o(){var t;if(!i){for(i=!0;a.length;)null===(t=a.shift())||void 0===t||t();l&&clearTimeout(l),"undefined"!=typeof window&&window.removeEventListener("DOMContentLoaded",o,c),u&&clearInterval(u)}}n.d(e,{a:function(){return r}});let i=!1;const a=[];let s=null;const c={once:!0};"undefined"!=typeof window&&window.addEventListener("DOMContentLoaded",o,c);let u=null,l=null;"undefined"!=typeof document&&"complete"===document.readyState?o():(u=setInterval((function(){"undefined"!=typeof document&&"complete"===document.readyState&&o()}),1e3),l=setTimeout(o,4e3))},64123:function(t,e,n){async function r(){return await fetch("/cart.js",{method:"GET",mode:"cors"}).then((t=>t.json())).then((t=>({isHeadless:!1,customAttributes:(0,d.c)(t.attributes),discountApplications:v()((t.cart_level_discount_applications||[]).concat((0,p.b)(document.cookie).discount_code).map((t=>((null==t?void 0:t.title)||(null==t?void 0:t.code)||"").trim())).filter(Boolean))})))}async function o(t){var e,n;const r=`${(0,b.c)()}`,o="undefined"!=typeof window&&(null===(n=null===(e=window.Shopify)||void 0===e?void 0:e.routes)||void 0===n?void 0:n.root)||"/",i=(0,_.a)(w.f);let a=null;if(i)try{const e=JSON.parse(i);if(r===e[w.f]){a=e;let n=!1;for(const e in t)a[e]!==t[e]&&(n=!0,a[e]=t[e]);if(!n)return a}}catch(t){}const s=Object.assign({[w.f]:r},t);return await fetch(`${o}cart/update.js${h().stringify({attributes:s},{addQueryPrefix:!0})}`,{method:"POST",mode:"cors",headers:{"content-type":"application/json"}}).then((t=>t.json())),(0,_.c)(w.f,JSON.stringify(a||s)),a||s}async function i(t){(0,p.a)("discount_code")||(0,p.d)({name:"discount_code",value:t}),await o({"sf-code":t}),await(0,m.a)({shopifyHostedDomain:window.location.host,discount:t}).catch((t=>{console.error("Failed to apply discount code:",t)}))}async function a(t){return t.isHeadless?await(0,f.c)(t.shopifyDomain,t.storefrontAccessToken):r()}async function s(t){return t.isHeadless?(await(0,f.e)(t.shopifyDomain,t.storefrontAccessToken,t.cartAttributesToUpdate)).customAttributes:await o(t.cartAttributesToUpdate)}async function c(t){t.isHeadless?await(0,f.a)({shopifyDomain:t.shopifyDomain,storefrontAccessToken:t.storefrontAccessToken,discountCode:t.discountCode}):await i(t.discountCode)}async function u(t){var e;t.isHeadless?await(0,f.b)({shopifyDomain:t.shopifyDomain,storefrontAccessToken:t.storefrontAccessToken,storeCreditCode:t.storeCreditCode,onLoading:t.onLoading}):(null===(e=t.onLoading)||void 0===e||e.call(t),await i(t.storeCreditCode))}async function l(t){t.isHeadless?await(0,f.d)(t.shopifyDomain,t.storefrontAccessToken):await async function(){await fetch(`https://${window.location.host}/discount/L-ewXtTIpjMs1l856xFut4epjShi9bWT1ZgO7eVRwEAbFy4nE-cD_uoOZ4vkf-herab11MsrQ62yJdmCpBbXxPssjFSH-awy0FxZk71zTDMR6KOU7dXNa3iGr1SXHPLtdpXSfcSWIhMhXTsDfBRk2QmApD8NNWC3C-WhRLKoWNwFw9Y7CctuQzQnSoxVHC-YJPhXxiC4nQrEYbSZ3WU6NDSttSCqr8tmpIY3lXq07jgsU0hyefMGQf-gv91qJAk`);const t=document.cookie.split(";");for(let e=0;e-1?n.substring(0,r):n;if("discount_code"===o.trim()){(0,p.c)(o);break}}return await r()}()}n.r(e),n.d(e,{applyCartDiscountCode:function(){return c},applyStoreCreditCode:function(){return u},getStorefrontCart:function(){return a},removeDiscountCode:function(){return l},upsertCartAttributes:function(){return s}});var f=n(44114),d=n(13018),p=n(35469),y=n(13459),v=n.n(y),g=n(8985),h=n.n(g),m=n(33679),b=n(13750),w=n(78504),_=n(19759)},64622:function(t,e,n){var r=n(32781),o=n(28944),i=n(39316),a=n(44075),s=n(90953),c=n(15851),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;t.exports=function(t,e,n,r,u,f,d){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!f(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=s;case"[object Set]":var y=1&r;if(p||(p=c),t.size!=e.size&&!y)return!1;var v=d.get(t);if(v)return v==e;r|=2,d.set(t,e);var g=a(p(t),p(e),r,u,f,d);return d["delete"](t),g;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},65364:function(t,e,n){var r=n(60769),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),s=function(t,e){for(var n=e&&e.plainObjects?{__proto__:null}:{},r=0;r1;){var e=t.pop(),n=e.obj[e.prop];if(i(n)){for(var r=[],o=0;o=c?s.slice(l,l+c):s,d=[],p=0;p=48&&y<=57||y>=65&&y<=90||y>=97&&y<=122||i===r.RFC1738&&(40===y||41===y)?d[d.length]=f.charAt(p):y<128?d[d.length]=a[y]:y<2048?d[d.length]=a[192|y>>6]+a[128|63&y]:y<55296||y>=57344?d[d.length]=a[224|y>>12]+a[128|y>>6&63]+a[128|63&y]:(p+=1,y=65536+((1023&y)<<10|1023&f.charCodeAt(p)),d[d.length]=a[240|y>>18]+a[128|y>>12&63]+a[128|y>>6&63]+a[128|63&y])}u+=d.join("")}return u},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(i(t)){for(var n=[],r=0;r1&&"boolean"!=typeof e)throw new l('"allowMissing" argument must be a boolean');if(null===G(/^%?[^%]*%?$/,t))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(t){var e=H(t,0,1),n=H(t,-1);if("%"===e&&"%"!==n)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new u("invalid intrinsic syntax, expected opening `%`");var r=[];return B(t,q,(function(t,e,n,o){r[r.length]=n?B(o,V,"$1"):e||t})),r}(t),r=n.length>0?n[0]:"",o=W("%"+r+"%",e),i=o.name,a=o.value,s=!1,c=o.alias;c&&(r=c[0],F(n,U([0,1],c)));for(var f=1,d=!0;f=n.length){var g=_(a,p);a=(d=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[p]}else d=$(a,p),a=a[p];d&&!s&&(D[i]=a)}}return a}},69075:function(t,e,n){var r=n(68897),o=n(93232),i=n(28527),a=n(69167),s=n(1711),c=r("%WeakMap%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),d=o("WeakMap.prototype.delete",!0);t.exports=c?function(){var t,e,n={assert:function(t){if(!n.has(t))throw new s("Side channel does not contain "+i(t))},delete:function(n){if(c&&n&&("object"==typeof n||"function"==typeof n)){if(t)return d(t,n)}else if(a&&e)return e["delete"](n);return!1},get:function(n){return c&&n&&("object"==typeof n||"function"==typeof n)&&t?u(t,n):e&&e.get(n)},has:function(n){return c&&n&&("object"==typeof n||"function"==typeof n)&&t?f(t,n):!!e&&e.has(n)},set:function(n,r){c&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new c),l(t,n,r)):a&&(e||(e=a()),e.set(n,r))}};return n}:a},69167:function(t,e,n){var r=n(68897),o=n(93232),i=n(28527),a=n(1711),s=r("%Map%",!0),c=o("Map.prototype.get",!0),u=o("Map.prototype.set",!0),l=o("Map.prototype.has",!0),f=o("Map.prototype.delete",!0),d=o("Map.prototype.size",!0);t.exports=!!s&&function(){var t,e={assert:function(t){if(!e.has(t))throw new a("Side channel does not contain "+i(t))},delete:function(e){if(t){var n=f(t,e);return 0===d(t)&&(t=void 0),n}return!1},get:function(e){if(t)return c(t,e)},has:function(e){return!!t&&l(t,e)},set:function(e,n){t||(t=new s),u(t,e,n)}};return e}},70516:function(t,e,n){function r(t){return"undefined"!=typeof navigator?navigator.clipboard.writeText(t):Promise.resolve()}n.d(e,{a:function(){return r}})},71506:function(t,e,n){var r=n(74796),o=n(25265),i=n(26805);t.exports=function(t,e){return i(o(t,e,r),t+"")}},71724:function(t,e,n){var r,o=n(50946),i=n(91399);try{r=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var a=!!r&&i&&i(Object.prototype,"__proto__"),s=Object,c=s.getPrototypeOf;t.exports=a&&"function"==typeof a.get?o([a.get]):"function"==typeof c&&function(t){return c(null==t?t:s(t))}},71738:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},71848:function(t,e,n){var r=n(72707);t.exports=function(){this.__data__=new r,this.size=0}},72092:function(t,e,n){var r=n(9073),o=n(72707),i=n(91955);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},72305:function(t,e,n){var r=n(61701),o=n(42965)(r);t.exports=o},72491:function(t,e,n){var r=n(86469),o=n(22122);t.exports=function(t,e,n,i){var a=n.length,s=a,c=!i;if(null==t)return!s;for(t=Object(t);a--;){var u=n[a];if(c&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++a{if(!g.a)return null;try{return new URL(r(g.a)).host}catch(t){return null}})(),b=(()=>{var t;if(!g.a)throw new Error("Unable to access Novel script src attribute");try{const e=null===(t=(0,h.parse)(new URL(r(g.a)).search,{ignoreQueryPrefix:!0}))||void 0===t?void 0:t.shop;if("string"!=typeof e)throw new Error('Loaded Novel script without "shop" query parameter provided, please provide .myshopify domain as "shop" query parameter');return e}catch(t){throw new Error(`Failed to parse scriptSrc: ${g.a}`)}})(),w=new v({shop:b})},74403:function(t,e,n){var r=n(78740),o=n(6397);t.exports=function(t,e,n){var i=e(t);return o(t)?i:r(i,n(t))}},74796:function(t){t.exports=function(t){return t}},74822:function(t){t.exports=Math.abs},75006:function(t,e,n){function r(t){if("undefined"==typeof window)return null;try{return(window.top||window).open(t,"_self")}catch(e){return window.open(t,"_self")}}function o(t){if("undefined"==typeof window)return null;try{return(window.top||window).open(t,"_blank")}catch(e){return window.open(t,"_blank")}}function i(t){"undefined"!=typeof window&&(window.location.href=t)}function a(){"undefined"!=typeof window&&(window.location.href="/")}n.d(e,{a:function(){return s},b:function(){return i},c:function(){return a},d:function(){return o},e:function(){return r}});const s=()=>/android/i.test(navigator.userAgent)?"Android":["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document?"iOS":"unknown"},75114:function(t){t.exports=function(){}},75267:function(t,e,n){var r=n(17722);t.exports=function(t){return function(e){return r(e,t)}}},75342:function(t){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},75380:function(t,e,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},75414:function(t,e,n){var r=n(87148),o=n(22934);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},75569:function(t,e,n){var r=n(18330),o=n(22934);t.exports=function(t){return o(t)&&r(t)}},75795:function(t,e,n){var r=n(93305),o=n(75267),i=n(13726),a=n(86729);t.exports=function(t){return i(t)?r(a(t)):o(t)}},76071:function(t,e,n){function r(t,e=60,n=!0){function r(){const e=i,n=a;return i=void 0,a=void 0,u=t.apply(e,n),u}function o(){const t=Date.now()-c;t=0?s=setTimeout(o,e-t):(s=void 0,n||(u=r()))}if("function"!=typeof t)throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");let i,a,s,c,u;const l={[`debounced_${t.name}`](...t){i=this,a=t,c=Date.now();const l=n&&!s;return s||(s=setTimeout(o,e)),l&&(u=r()),u}}[`debounced_${t.name}`];return l.clear=()=>{s&&(clearTimeout(s),s=void 0)},l.flush=()=>{s&&l.trigger()},l.trigger=()=>{u=r(),l.clear()},l}n.d(e,{a:function(){return r}})},76190:function(t){t.exports=RangeError},76296:function(t){t.exports=SyntaxError},76458:function(t){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},76733:function(t,e,n){var r=n(57177);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},77222:function(t,e,n){var r=n(54679);t.exports=function(t){return r(t)?void 0:t}},77924:function(t,e,n){var r=n(23048),o=n(31178);t.exports=function(t){for(var e=o(t),n=e.length;n--;){var i=e[n],a=t[i];e[n]=[i,a,r(a)]}return e}},78499:function(t,e,n){var r=n(99138)(n(41433),"WeakMap");t.exports=r},78504:function(t,e,n){n.d(e,{A:function(){return i},B:function(){return j},C:function(){return T},D:function(){return x},E:function(){return I},a:function(){return S},b:function(){return P},c:function(){return u},d:function(){return l},e:function(){return a},f:function(){return k},g:function(){return D},h:function(){return m},i:function(){return b},j:function(){return _},k:function(){return O},l:function(){return E},m:function(){return s},n:function(){return c},o:function(){return p},p:function(){return y},q:function(){return v},r:function(){return g},s:function(){return f},t:function(){return d},u:function(){return A},v:function(){return C},w:function(){return h},x:function(){return L},y:function(){return N},z:function(){return w}});var r=n(34200),o=n(53729);const i=o.d===o.c.production?"/a/novel":`${r.a}/api/public/shopify-proxy`,a="__novel-auth-button-trigger-loaded__",s="data-novel-pass-install",c="__novel-pass-install-button-trigger-loaded__",u="data-apply-rewards-balance",l="__novel-apply-rewards-balance-trigger-loaded__",f="data-render-rewards-balance",d="__novel-render-rewards-balance-loaded__",p="data-render-referral-count",y="__novel-render-referral-count-loaded__",v="data-render-referral-link",g="__novel-render-referral-link-loaded__",h="__novel-text-replaced-while-gated__",m="__novel-hidden-while-gated__",b="__novel-style-tag__",w="__novel-storefront-data__",_="r",E="novelPass",O="campaignId",A="novelSession",S=["/login","/oauth","/share"],I="__n_c__",x="__n_b__",T="__n_s__",j="__n_s_j__",C="x-novel-session-token",N=1,k="synthetic-cart-id",D="__n_e__",L="__n_s__",P="__n_h__"},78740:function(t){t.exports=function(t,e){for(var n=-1,r=e.length,o=t.length;++n{const n=e(t);if(!h()(n))return n===a})):void 0;return c||(s?t.find((t=>{const n=e(t);if(!h()(n))return n===s})):void 0)}function s(){var t,e,n,r,o,i,a,s,c,u,l,f,d,p,y,v,g;try{const r=null===(n=null===(e=null===(t=window.ShopifyAnalytics)||void 0===t?void 0:t.meta)||void 0===e?void 0:e.product)||void 0===n?void 0:n.id;if(null!=r&&""!==r)return+r}catch(t){}try{const t=null===(i=null===(o=null===(r=window.ShopifyAnalytics)||void 0===r?void 0:r.meta)||void 0===o?void 0:o.page)||void 0===i?void 0:i.resourceId;if(null!=t&&""!==t&&"product"===(null===(c=null===(s=null===(a=window.ShopifyAnalytics)||void 0===a?void 0:a.meta)||void 0===s?void 0:s.page)||void 0===c?void 0:c.resourceType))return+t}catch(t){}try{const t=null===(l=null===(u=window.meta)||void 0===u?void 0:u.product)||void 0===l?void 0:l.id;if(null!=t&&""!==t)return+t}catch(t){}try{const t=null===(d=null===(f=window.meta)||void 0===f?void 0:f.page)||void 0===d?void 0:d.resourceId;if("product"===(null===(y=null===(p=window.meta)||void 0===p?void 0:p.page)||void 0===y?void 0:y.pageType)&&t)return+t}catch(t){}try{const t=null===(v=window.__st)||void 0===v?void 0:v.rid;if("product"===(null===(g=window.__st)||void 0===g?void 0:g.rtyp)&&t)return+t}catch(t){}return null}function c(t){return t.filter((t=>{var e;return!!(null===(e=t.triggerConfig)||void 0===e?void 0:e.cssSelectorText)&&!!document.querySelectorAll(t.triggerConfig.cssSelectorText).length})).map((t=>Object.assign(Object.assign({},t),{triggerConfig:Object.assign(Object.assign({id:`${Math.random()}`.slice(2),createdDate:(new Date).toISOString(),updatedDate:(new Date).toISOString(),shouldReplaceCssSelectorText:!1},t.triggerConfig),{autoTrigger:!0,cssSelectorTriggerEnabled:!0,cssSelectorText:`[${E}="${t.unversionedId}"]`})}))).filter((t=>{var e;return!!(null===(e=t.triggerConfig)||void 0===e?void 0:e.cssSelectorText)&&!!document.querySelectorAll(t.triggerConfig.cssSelectorText).length})).map((t=>({trigger:"element",gate:t})))}function u(t){const e=t.find((t=>a(t.gatedUrls,(t=>t),!0))),n=r();if((h()(n)||w.includes(n))&&!e)return null;if(e)return{trigger:d(e)?"page":"element",gate:e,isGatedContentPage:!0};let o=null;for(const e of t){const t=l(e.products),n=l(v(e)),r=f(y(e));if(t)return{trigger:d(e)?"page":"element",gate:e,product:t};if(r||n)return{gate:e};p(e).filter((t=>{var e;return(null===(e=t.summary)||void 0===e?void 0:e.includes("entire order"))||!1})).length&&(s()||"products"===i(window.location.pathname,2))&&(o={gate:e})}return o}function l(t){const e=s(),n=t.find((t=>`${t.externalId}`==`${e}`));if(n)return n;return a(t,(t=>t.handle))||void 0}function f(t){const e=function(){var t,e,n,r,o,i,a,s,c,u,l,f,d,p,y,v,g;try{const r=null===(n=null===(e=null===(t=window.ShopifyAnalytics)||void 0===t?void 0:t.meta)||void 0===e?void 0:e.collection)||void 0===n?void 0:n.id;if(null!=r&&""!==r)return+r}catch(t){}try{const t=null===(i=null===(o=null===(r=window.ShopifyAnalytics)||void 0===r?void 0:r.meta)||void 0===o?void 0:o.page)||void 0===i?void 0:i.resourceId;if(null!=t&&""!==t&&"collection"===(null===(c=null===(s=null===(a=window.ShopifyAnalytics)||void 0===a?void 0:a.meta)||void 0===s?void 0:s.page)||void 0===c?void 0:c.resourceType))return+t}catch(t){}try{const t=null===(l=null===(u=window.meta)||void 0===u?void 0:u.collection)||void 0===l?void 0:l.id;if(null!=t&&""!==t)return+t}catch(t){}try{const t=null===(d=null===(f=window.meta)||void 0===f?void 0:f.page)||void 0===d?void 0:d.resourceId;if("collection"===(null===(y=null===(p=window.meta)||void 0===p?void 0:p.page)||void 0===y?void 0:y.pageType)&&t)return+t}catch(t){}try{const t=null===(v=window.__st)||void 0===v?void 0:v.rid;if("collection"===(null===(g=window.__st)||void 0===g?void 0:g.rtyp)&&t)return+t}catch(t){}return null}(),n=t.find((t=>`${t.externalId}`==`${e}`));if(n)return n;return a(t,(t=>t.handle))||void 0}function d(t){return"entireStorefront"===t.gateType||!function(t){var e,n;return!!(null===(e=t.triggerConfig)||void 0===e?void 0:e.cssSelectorTriggerEnabled)&&!!(null===(n=t.triggerConfig)||void 0===n?void 0:n.cssSelectorText)}(t)}function p(t){return b()(t.gateDependencies.flatMap((t=>t.priceRules)),(t=>t.id))}function y(t){const e=p(t).flatMap((t=>[...t.prerequisiteCollections,...t.entitlementCollections]));return b()(e,(t=>t.externalId))}function v(t){let e=[];["liquiddeath","barefootbreeze","barefoot-breeze"].every((t=>!window.location.hostname.includes(t)))&&(e=y(t).flatMap((t=>t.products)));const n=p(t).flatMap((t=>[...t.prerequisiteProducts,...t.entitlementProducts]));return b()([...n,...e],(t=>t.externalId))}n.d(e,{a:function(){return _},b:function(){return p},c:function(){return c},d:function(){return u}});var g=n(3583),h=n.n(g),m=n(12418),b=n.n(m);const w=["challenge","account","login","register"],_="data-novel-auth-button",E="data-novel-gate-id"},79151:function(t){t.exports=function(t,e){return t.has(e)}},79152:function(t,e,n){n.d(e,{a:function(){return r}});const r=new class{constructor(){this.triggerStatusByElement=new Map}hasElementHadOperationApplied(t,e){const n=this.triggerStatusByElement.get(t);return!!n&&!!n[e]}addOperation(t,e,n){const r=this.triggerStatusByElement.get(t);if(r)r[e]={revertCallback:n};else{const r={[e]:{revertCallback:n}};this.triggerStatusByElement.set(t,r)}}removeDisconnectedElements(){this.triggerStatusByElement.forEach(((t,e)=>{e.isConnected||this.triggerStatusByElement.delete(e)}))}revertOperation(t,e){const n=this.triggerStatusByElement.get(t),r=null==n?void 0:n[e];r&&(r.revertCallback(),delete n[e])}revertAllOperations(){this.removeDisconnectedElements(),this.triggerStatusByElement.forEach((t=>{t.clickTrigger&&t.clickTrigger.revertCallback(),t.hideElement&&t.hideElement.revertCallback(),t.replaceText&&t.replaceText.revertCallback()})),this.triggerStatusByElement.clear()}}},79250:function(t,e,n){var r=n(87148),o=n(22934);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},79268:function(t,e,n){var r=n(14556);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},79548:function(t,e,n){var r=n(7960);t.exports=r.getPrototypeOf||null},79639:function(t,e,n){function r(t=window.location.pathname){return s.find((e=>t.startsWith(e)))}function o(t=window.location.pathname){return s.some((e=>t.startsWith(e)))}function i(t=window.location.pathname){return o(t)||function(t=window.location.pathname){return c.some((e=>t.includes(e)))}(t)}var a;n.d(e,{a:function(){return a},b:function(){return r},c:function(){return o},d:function(){return i}}),function(t){t["StayAi"]="/apps/retextion"}(a||(a={}));const s=[a.StayAi],c=["/account"]},79912:function(t){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},79925:function(t,e,n){var r=n(15535);t.exports=function(t){return r(this,t).get(t)}},80659:function(t){t.exports=function(){return!1}},80708:function(t,e,n){var r=n(61617),o=n(87030),i=n(76733),a=n(68835),s=n(19181),c=n(21256),u=n(6397),l=n(75569),f=n(30492),d=n(18446),p=n(58953),y=n(54679),v=n(47995),g=n(29874),h=n(47264);t.exports=function(t,e,n,m,b,w,_){var E=g(t,n),O=g(e,n),A=_.get(O);if(A)r(t,n,A);else{var S=w?w(E,O,n+"",t,e,_):void 0,I=void 0===S;if(I){var x=u(O),T=!x&&f(O),j=!x&&!T&&v(O);S=O,x||T||j?u(E)?S=E:l(E)?S=a(E):T?(I=!1,S=o(O,!0)):j?(I=!1,S=i(O,!0)):S=[]:y(O)||c(O)?(S=E,c(E)?S=h(E):p(E)&&!d(E)||(S=s(O))):I=!1}I&&(_.set(O,S),b(S,O,m,w,_),_["delete"](O)),r(t,n,S)}}},81452:function(t,e,n){var r=n(67499),o=n(9566),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},81485:function(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},82316:function(t,e,n){var r=n(4558);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},82863:function(t,e,n){var r=n(14772),o=n(39316),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];i.call(t,e)&&o(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},83575:function(t,e,n){var r=n(28527),o=n(1711),i=function(t,e,n){for(var r,o=t;null!=(r=o.next);o=r)if(r.key===e)return o.next=r.next,n||(r.next=t.next,t.next=r),r};t.exports=function(){var t,e={assert:function(t){if(!e.has(t))throw new o("Side channel does not contain "+r(t))},delete:function(e){var n=t&&t.next,r=function(t,e){if(t)return i(t,e,!0)}(t,e);return r&&n&&n===r&&(t=void 0),!!r},get:function(e){return function(t,e){if(t){var n=i(t,e);return n&&n.value}}(t,e)},has:function(e){return function(t,e){return!!t&&!!i(t,e)}(t,e)},set:function(e,n){t||(t={next:void 0}),function(t,e,n){var r=i(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}}(t,e,n)}};return e}},83700:function(t){t.exports=Math.floor},83841:function(t){t.exports=EvalError},83950:function(t){t.exports=ReferenceError},84499:function(t,e,n){var r=n(35845);t.exports=Function.prototype.bind||r},85614:function(t,e,n){async function r(t){var{sessionSignature:e}=t,n=c(t,["sessionSignature"]);await(0,s.upsertCartAttributes)(Object.assign(Object.assign({},n),{cartAttributesToUpdate:{[a.x]:e,[a.b]:n.isHeadless.toString()}}))}async function o(t){if((null==l?void 0:l.sessionSignature)===t.sessionSignature)return;l=t;const{isHeadless:e,sessionSignature:n}=l;e?(0,u.b)().then((()=>(0,i.a)((async()=>{(null==l?void 0:l.isHeadless)&&l.storefrontAccessToken&&l.shopifyDomain&&(await r({isHeadless:l.isHeadless,shopifyDomain:l.shopifyDomain,storefrontAccessToken:l.storefrontAccessToken,sessionSignature:l.sessionSignature}),l=t)})))):(await r({isHeadless:e,sessionSignature:n}),l=t)}n.d(e,{a:function(){return o}});var i=n(21346),a=n(78504),s=n(64123),c=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o1)for(var n=1;n-1?o([n]):n}},93305:function(t){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},93832:function(t,e,n){function r({startingElement:t,test:e,includeStartingElement:n}){if("undefined"==typeof document||!t)return null;let r=t;do{if(r&&(t!==r||n)&&e(r))return r}while(r!==document&&(r=(null==r?void 0:r.parentElement)||null));return null}n.d(e,{a:function(){return r}})},93888:function(t){t.exports=Math.max},93897:function(t,e,n){var r=n(93943);t.exports=function(t){return r(t)||0===t?t:t<0?-1:1}},93943:function(t){t.exports=Number.isNaN||function(t){return t!=t}},94021:function(t){var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},94385:function(t,e,n){var r=n(15535);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},95662:function(t){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},95786:function(t){t.exports=Math.round},95845:function(t,e,n){function r(t){return new Promise((e=>setTimeout(e,t)))}n.d(e,{a:function(){return r}})},95920:function(t,e,n){function r(){return window[o.e]||(window[o.e]=!0,a=(0,i.a)((()=>n.e(552).then(n.bind(n,63552)))).catch((t=>console.error("Failed to load storefront styles",t)))),a}n.r(e),n.d(e,{loadStorefrontStyleSheet:function(){return r}});var o=n(11694),i=n(21346);let a},96701:function(t){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},96728:function(t,e,n){var r=n(42083),o=n(58355);t.exports=function(t,e){return r(t,o(t),e)}},96785:function(t){var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},97129:function(t,e,n){var r=n(87148),o=n(3330),i=n(22934),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[r(t)]}},98235:function(t,e,n){var r=n(809),o=n(16866);t.exports=function(t,e){return null!=t&&o(t,e,r)}},99138:function(t,e,n){var r=n(16567),o=n(6772);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},99702:function(t,e,n){var r=n(86469),o=n(61617),i=n(61469),a=n(80708),s=n(58953),c=n(15405),u=n(29874);t.exports=function t(e,n,l,f,d){e!==n&&i(n,(function(i,c){if(d||(d=new r),s(i))a(e,n,c,l,t,f,d);else{var p=f?f(u(e,c),i,c+"",e,n,d):void 0;void 0===p&&(p=i),o(e,c,p)}}),c)}}},a={};t.m=i,t.amdO={},t.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(n,{a:n}),n},n=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},t.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);t.r(i);var a={};e=e||[null,n({}),n([]),n(n)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=n(s))Object.getOwnPropertyNames(s).forEach((function(t){a[t]=function(){return r[t]}}));return a["default"]=function(){return r},t.d(i,a),i},t.d=function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.f={},t.e=function(e){return Promise.all(Object.keys(t.f).reduce((function(n,r){return t.f[r](e,n),n}),[]))},t.u=function(t){return{11:"d33ce02444612315c40e",51:"c7f4d92c6f3f18e23c3f",141:"6c6a2336b2040bf9efcc",153:"c899151056d3fa81fcdf",194:"98d44491f3e334abf660",208:"ea68f76d888fc76f4110",209:"88d75c859889a56fdca5",279:"7551144b109f0ff4f75f",282:"b230bb16c4a1ae07e5f5",340:"0825ddb92fba5691108c",377:"206fe856f3708ad76756",383:"5c01c6b7983b968cc20f",449:"c99f403e2a1bcb019b0b",452:"20d9c6035fa98832aa36",453:"a6f54b519c02c619aa0c",491:"db860bf2c84e644a34e1",504:"cc09cb2677c0dabf447b",509:"807068ce0d8e69618920",549:"1f045252eb9989b501fd",552:"ee1aed800ed06351fda6",560:"e0c2fbadb9dfccb70fe2",657:"29cb1c372f19a156a7e8",673:"a4c4721463df43a6abc5",708:"9503c9a16327662829fb",749:"6d6e6c2acd51e75a48ec",821:"7431e4a5e9eaf8cf67ba",828:"1d8d222c415bb09e31d2",840:"92cc2ec0c2c9d21c3817",853:"8609e4aec534fe543af7"}[t]+".js"},t.miniCssF=function(t){return"ee1aed800ed06351fda6.css?v=dc70c981e95ffb89c03d"},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.hmd=function(t){return(t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r={},o="@novel/vendor-storefront:",t.l=function(e,n,i,a){if(r[e])r[e].push(n);else{var s,c;if(void 0!==i)for(var u=document.getElementsByTagName("script"),l=0;l-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t.p=e}(),function(){if("undefined"!=typeof document){var e={468:0};t.f.miniCss=function(n,r){e[n]?r.push(e[n]):0!==e[n]&&{552:1}[n]&&r.push(e[n]=function(e){return new Promise((function(n,r){var o=t.miniCssF(e),i=t.p+o;if(function(t,e){for(var n=document.getElementsByTagName("link"),r=0;r1){const t=navigator.languages.find((t=>"en"===t));if(t)return t}return navigator.languages[0]}return navigator.language||navigator.browserLanguage||S}function n(t){return Infinity===t?Infinity:-Infinity===t?-Infinity:BigInt(t)}async function r(e,n){var r;const{novelStoreCreditCode:o,showToast:i}=e,a=async function(t){const e=w.c.getReq("/api/public/store-credit-balance/:storeCreditCode",{params:{storeCreditCode:t}}),n=await e;if("error"===n.type){if((0,v.d)(p.E),(0,v.d)(p.D),(0,y.c)(p.E),(0,O.d)(n.error))throw n.error;return void console.error(n.error.message)}const{storeCreditBalance:r,formattedStoreCreditBalance:o,isDiscountCode:i}=n.body;return"0"!=`${r}`||i?{storeCreditBalance:r,formattedStoreCreditBalance:o,isDiscountCode:i}:((0,v.d)(p.E),(0,v.d)(p.D),(0,y.c)(p.E),(0,g.b)(p.l),void console.info(`No balance for ${t}, not going to apply`))}(o);!function(t){function e(e){e.flatMap((t=>Array.from(t.querySelectorAll('form[action="/cart"]')))).forEach((e=>{if(!e.querySelector(`input[name="discount"][value="${t}"]`)){const r=n||(n=document.createElement("input"),n.type="hidden",n.name="discount",n.value=t,n);e.appendChild(r.cloneNode())}}))}let n=null;e((0,j.a)()),(0,j.b)(e)}(o);const s=await n,c=!!(null===(r=null==s?void 0:s.integrations)||void 0===r?void 0:r.some((t=>"talkable"===t))),u=function({showToast:e,isDiscountImplementation:n,storeCreditDisplayResPromise:r}){if(!e)return{onLoading:async()=>{},onSuccess:async()=>{},onError:async()=>{}};const o=(0,C.loadStorefrontStyleSheet)();let i=null;const a=(0,f.a)((()=>Promise.resolve().then(t.bind(t,49104)))).then((({loadingToast:t,infoToast:e,errorToast:n})=>({loadingToast:t,infoToast:e,errorToast:n})));let s=null,c=null;return{onLoading:async()=>{let t;try{t=await r}catch(t){const{errorToast:e}=await a;return void e(t)}if(!t)return;const{loadingToast:e}=await a;await o,await r&&(0,d.a)((()=>{const t=e(n?"Applying Discount Code..":"Applying Balance to cart..."),r=(0,x.a)(2e3);c=(...e)=>{r.then((()=>{t.onSuccessToast(...e)}))},s=(...e)=>{r.then((()=>{t.onErrorToast(...e)}))},"success"===(null==i?void 0:i.type)?c(i.message):"error"===(null==i?void 0:i.type)&&s(i.message)}))},onSuccess:async()=>{const t=await r;if(!t)return;const e=i;return i={type:"success",message:n?"Discount code applied to cart!":`Balance of ${t.formattedStoreCreditBalance} applied to cart!`},c&&!e?c(i.message):void 0},onError:()=>{const t=i;if(i={type:"error",message:"Failed to apply balance, please refresh and try again"},s&&!t)return s(i.message)}}}({showToast:i,isDiscountImplementation:c,storeCreditDisplayResPromise:a}),{isHeadless:l,shopifyDomain:h,storefrontAccessToken:m}=null!=s?s:{};try{const t=!!l&&!!h&&!!m;t?c?await(0,A.a)({shopifyDomain:h,storefrontAccessToken:m,discountCode:o,onLoading:u.onLoading}):await(0,T.applyStoreCreditCode)({isHeadless:t,storeCreditCode:o,shopifyDomain:h,storefrontAccessToken:m,onLoading:u.onLoading}):await(0,T.applyStoreCreditCode)({isHeadless:t,storeCreditCode:o,onLoading:u.onLoading})}catch(t){return console.error(`Error applying Rewards Balance: ${(null==t?void 0:t.message)||t}`),u.onError(),I.toBigIntStr(0)}const b=await a;if(!b)return I.toBigIntStr(0);const{storeCreditBalance:_}=b;return u.onSuccess(),_}function o({domListener:t,stateGetter:e}){let n=!1;return function(r){n||(n=!0);let o,i=0;const a=[];_.a.subscribe((()=>{const n=_.a.getState(),{routeId:s}=n.shopRoute,c=e(n);(function({routeId:t,stateValue:e}){let n=!1;return t!==i&&(i=t,n=!0),e!==o&&(o=e,n=!0),n&&a&&(a.forEach((t=>t())),a.length=0),n})({routeId:s,stateValue:c})&&null!=c&&(a.push(t(c,(0,j.a)())),a.push((0,j.b)((e=>{P.a.removeDisconnectedElements(),a.push(t(c,e))}))),r&&r(c))}))}}function i(){U&&(0,D.d)(U)}function a(t){F.has(t)||(F.add(t),setTimeout((()=>{const e=document.createElement("link");e.setAttribute("type","text/html"),e.setAttribute("rel","prefetch"),e.setAttribute("as","document"),e.setAttribute("href",t),document.body.appendChild(e)}),1e3))}function s(t,e){const n=c(t),r=c(e);if(!n||!r)return e;if(p.a.includes(n.pathname)||!n.pathname||"/"===n.pathname)return e;if(n.pathname===r.pathname)return t;r.search=r.search.replaceAll("&","&");const o=r.searchParams.get("redirectUrl");if(!o)return r.pathname=n.pathname,r.toString();const i=!!(a=o)&&((null==a?void 0:a.includes("%2F"))||(null==a?void 0:a.includes("%26"))||(null==a?void 0:a.includes("%3F"))||(null==a?void 0:a.includes("%3D"))||(null==a?void 0:a.includes("%25"))||(null==a?void 0:a.includes("%23"))||(null==a?void 0:a.includes("%40"))||(null==a?void 0:a.includes("%22"))||(null==a?void 0:a.includes("%5B"))||(null==a?void 0:a.includes("%5D"))||(null==a?void 0:a.includes("%7B"))||(null==a?void 0:a.includes("%7D"))||(null==a?void 0:a.includes("%3A"))||(null==a?void 0:a.includes("%3B"))||(null==a?void 0:a.includes("%2B"))||(null==a?void 0:a.includes("%24"))||(null==a?void 0:a.includes("%2C"))||(null==a?void 0:a.includes("%7C"))||(null==a?void 0:a.includes("%3C"))||(null==a?void 0:a.includes("%3E"))||(null==a?void 0:a.includes("%5C"))||(null==a?void 0:a.includes("%5E"))||(null==a?void 0:a.includes("%60"))||(null==a?void 0:a.includes("%7E"))||(null==a?void 0:a.includes("%20"))||(null==a?void 0:a.includes("%09"))||(null==a?void 0:a.includes("%0A"))||(null==a?void 0:a.includes("%0D"))||(null==a?void 0:a.includes("%0C"))||(null==a?void 0:a.includes("%0B")));var a;const u=(null==o?void 0:o.includes("://"))||(null==o?void 0:o.includes("%3A%2F%2F"));let l=i?decodeURIComponent(o):o;l=u?l:`https://${l}`;let f=s(t,l);return u||(f=f.replace(/^https?:\/\//,"")),i&&(f=encodeURIComponent(f)),r.searchParams.set("redirectUrl",f),r.toString()}function c(t){try{return new URL(t)}catch(t){return}}function u({elementCallback:t,elementsToCheck:e,queryAttribute:n,onLoadedClassName:r}){const o=e.flatMap((t=>Array.from(t.querySelectorAll(`[${n}]`)))).map((e=>{const o=!!(0,k.a)({startingElement:e,includeStartingElement:!0,test:t=>{var e;return!!(null===(e=t.className)||void 0===e?void 0:e.includes(n))}});let i=q();return o||(i=t(e)),e.className.includes(r)||(e.className=`${e.className||""} ${r}`.trim()),i}));return()=>{o.forEach((t=>null==t?void 0:t()))}}var l=t(11040),f=t(21346),d=t(63810),p=t(78504),y=t(35469),v=t(19759),g=t(58e3),h=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i,m=t(53729),b=t(2547),w=t(74097),_=t(52393),E=t(11129),O=t(55391),A=t(44114);const S="en-US",I=(Symbol("BigInt"),{get zero(){return I.toBigIntStr(0)},toBigIntStr:t=>t.toString(),toNumber:t=>Number(t),toBigInt:t=>n(t),max:t=>I.toBigIntStr(t.map((t=>n(t))).reduce(((t,e)=>t>e?t:e),n(0))),min:t=>I.toBigIntStr(t.map((t=>n(t))).reduce(((t,e)=>tI.toBigIntStr(t.map((t=>n(t))).reduce(((t,e)=>t+e),n(0))),subtract:(t,e)=>I.toBigIntStr(n(t)-n(e)),multiply:(t,e)=>I.toBigIntStr(n(t)*n(e)),equals:(t,e)=>n(t)===n(e),invert:t=>I.subtract(0,t),greaterThan:(t,e)=>n(t)>n(e),greaterThanOrEqual:(t,e)=>n(t)>=n(e),lessThan:(t,e)=>n(t)n(t)<=n(e),toLocaleString:(t,n)=>"bigint"==typeof t?BigInt(t).toLocaleString(n||e()):"number"==typeof t?new Number(t||0).toLocaleString(n||e()):I.toBigInt(t).toLocaleString(n||e())});var x=t(95845),T=t(64123),j=t(13985),C=t(95920),N=t(79639),k=t(93832),D=t(75006),L=t(42503),P=t(79152),R=t(13459),M=t.n(R);const $=o({domListener:function(t,e){const n=U,r=n!==t,o=e.length>0;if(r||o){r&&(U=t);const{novelPassUnauthedLink:o}=_.a.getState().storefrontData;if(n||o){const r=e.flatMap((t=>M()([...n?Array.from(t.querySelectorAll(`a[href^="${n}"]`)):[],...o?Array.from(t.querySelectorAll(`a[href^="${o}"]`)):[]])));r.forEach((e=>{const n=e.getAttribute("href")||"",r=s(n,t);n!==r&&e.setAttribute("href",r)})),r.length&&a(t)}}const c=document.querySelectorAll(`[${p.m}]`);return c.length&&a(t),c.forEach((e=>{!!(0,k.a)({startingElement:e,includeStartingElement:!0,test:e=>{var n,r;return!!(null===(n=e.getAttribute("href"))||void 0===n?void 0:n.includes(t))||!!(null===(r=e.getAttribute("href"))||void 0===r?void 0:r.includes(encodeURIComponent(t)))}})||(0,L.c)(e,i),e.className.includes(p.n)||(e.className=`${e.className||""} ${p.n}`.trim())})),()=>{c.forEach((t=>{P.a.revertOperation(t,"clickTrigger")}))}},stateGetter:t=>{var e;return(null===(e=t.storefrontAuth.storefrontCustomerAuth)||void 0===e?void 0:e.novelPassAuthLink)||t.storefrontData.novelPassUnauthedLink}});let U="";const F=new Set([U]);var B=t(70516),H=t(49104),G=t(75114),q=t.n(G);const V=o({domListener:function(t,e){return u({queryAttribute:p.o,onLoadedClassName:p.p,elementsToCheck:e,elementCallback:e=>{e.innerHTML=t.toString()}})},stateGetter:t=>{var e,n,r;return(null===(e=t.storefrontAuth.storefrontCustomerAuth)||void 0===e?void 0:e.isLoggedIn)&&"number"==typeof(null===(n=t.storefrontAuth.storefrontCustomerAuth)||void 0===n?void 0:n.numberOfReferrals)?null===(r=t.storefrontAuth.storefrontCustomerAuth)||void 0===r?void 0:r.numberOfReferrals:void 0}}),W=o({domListener:function(t,e){return u({queryAttribute:p.s,onLoadedClassName:p.t,elementsToCheck:e,elementCallback:e=>{t&&(e.innerHTML=t)}})},stateGetter:t=>{var e,n;return(null===(e=t.storefrontAuth.storefrontCustomerAuth)||void 0===e?void 0:e.isLoggedIn)&&(null===(n=t.storefrontAuth.storefrontCustomerAuth)||void 0===n?void 0:n.balanceFormat)||void 0}}),z=o({domListener:function(t,e){return u({queryAttribute:p.q,onLoadedClassName:p.r,elementsToCheck:e,elementCallback:e=>{if(t)return e.innerHTML=t,(0,L.c)(e,(()=>Promise.all([(0,B.a)(t),(0,C.loadStorefrontStyleSheet)()]).then((()=>{(0,H.successToast)({content:"Referral link copied to clipboard!"})})))),()=>{P.a.revertOperation(e,"clickTrigger")}}})},stateGetter:t=>{var e,n;return(null===(e=t.storefrontAuth.storefrontCustomerAuth)||void 0===e?void 0:e.isLoggedIn)&&(null===(n=t.storefrontAuth.storefrontCustomerAuth)||void 0===n?void 0:n.referralLink)||void 0}}),J=o({domListener:function(t,e){return u({queryAttribute:p.c,onLoadedClassName:p.d,elementsToCheck:e,elementCallback:e=>{if(t)return(0,L.c)(e,function(t){return()=>r({novelStoreCreditCode:t,showToast:!0},(0,b.fetchNovelStorefrontData)())}(t)),()=>{P.a.revertOperation(e,"clickTrigger")}}})},stateGetter:t=>{var e,n;return(null===(e=t.storefrontAuth.storefrontCustomerAuth)||void 0===e?void 0:e.isLoggedIn)&&t.storefrontAuth.storefrontCustomerAuth.balance&&(null===(n=t.storefrontAuth.storefrontCustomerAuth)||void 0===n?void 0:n.storeCreditGiftCardCode)||void 0}}),Q="historystatechange";let K=!1;var X=t(76071);l.a&&"undefined"!=typeof window&&!(null===window||void 0===window?void 0:window["__NOVEL_STOREFRONT_SCRIPT_HAS_RUN__"])&&(window["__NOVEL_STOREFRONT_SCRIPT_HAS_RUN__"]=!0,async function(){function e(){if(!a)return a=!0,(0,f.a)((()=>Promise.all([t.e(153),t.e(449)]).then(t.bind(t,83449)))).then((({renderGateApp:t})=>t)).then((t=>(0,d.a)((function(){t()}))))}"undefined"==typeof URL&&await(0,f.a)((()=>t.e(51).then(t.t.bind(t,33051,23))));const n=function(t=window.location.href){const e=new URL(t).searchParams.get(p.j);if(e&&("string"==typeof(n=e)&&h.test(n)))return e;var n}(),o=function(){var t,e,n;const r=null===(t=(0,g.a)(p.l,!1))||void 0===t?void 0:t.trim(),o=null===(e=(0,y.a)(p.E))||void 0===e?void 0:e.trim(),i=null===(n=(0,v.a)(p.E))||void 0===n?void 0:n.trim(),a=r||o||i,s=a&&"undefined"!==a&&"null"!==a&&a||void 0;if(s!==i&&s&&(0,v.d)(p.E),s)return{codeWasInHash:!!r,localStorageValueIsStale:s!==i,cookieValueIsStale:s!==o,novelStoreCreditCode:s}}();o||n||await(0,d.a)();const i=(0,b.fetchNovelStorefrontData)();o&&async function(e,n){const{novelStoreCreditCode:o,localStorageValueIsStale:i,cookieValueIsStale:a,codeWasInHash:s}=e;i&&(0,v.c)(p.E,`${o}`);const c=await r({novelStoreCreditCode:o,showToast:s},n);if((0,v.c)(p.E,o),(0,v.c)(p.D,`${c}`),(0,g.b)(p.l),a){const e=new Date;e.setTime(e.getTime()+864e5);let n=window.location.hostname;const r=(await(0,f.a)((()=>t.e(452).then(t.bind(t,12452)))).then((({ResolvedDomain:t})=>t))).deconstructUrl(window.location.hostname);r&&(n=r.flattenToStringWithoutSubdomains()),(0,y.d)({name:p.E,value:o,expires:e,domain:n})}}(o,i),n&&async function(e){const n=(0,b.fetchNovelStorefrontData)(),r=(0,f.a)((()=>Promise.resolve().then(t.bind(t,64123)))).then((({upsertCartAttributes:t})=>t)),o=await n,i=await r;o&&e&&(o.isHeadless?o.shopifyDomain&&o.storefrontAccessToken&&await i({isHeadless:o.isHeadless,shopifyDomain:o.shopifyDomain,storefrontAccessToken:o.storefrontAccessToken,cartAttributesToUpdate:{[p.g]:e,[p.b]:o.isHeadless.toString()}}):await i({isHeadless:o.isHeadless,cartAttributesToUpdate:{[p.g]:e,[p.b]:o.isHeadless.toString()}}))}(n),i.then((()=>{const e=_.a.dispatch((async e=>{const n=Promise.resolve().then(t.bind(t,2547));await e({type:"LOADING_STOREFRONT_NOVEL_DATA",payload:void 0});try{const{fetchNovelStorefrontData:t,getNovelDataLocalStorageData:r}=await n,o=r();if(o){const t=await e({type:"LOADED_STOREFRONT_NOVEL_DATA",payload:{storefrontDataRes:o.value||null}});if(!o.isExpired)return t}return e({type:"LOADED_STOREFRONT_NOVEL_DATA",payload:{storefrontDataRes:await t()||null}})}catch(t){return e({type:"ERROR_LOADING_STOREFRONT_NOVEL_DATA",payload:{errorMessage:t.message}})}}));if(null==e?void 0:e.then)return e.then((()=>_.a.dispatch((0,E.a)()))).catch((t=>{console.error("Error dispatching novel storefront data",t)}));setTimeout((()=>{const t=_.a.dispatch((0,E.a)());t.catch&&(null==t||t.catch((t=>{console.error("Error dispatching novel storefront data",t)})))}),0)})).then((()=>{(t=>{function e(){n||t({type:"SHOP_ROUTE_CHANGE",payload:void 0})}K||(K=!0,window.history.pushState=new Proxy(window.history.pushState,{apply:(t,e,n)=>{const r=t.apply(e,n);return window.dispatchEvent(new Event(Q)),r}}),window.history.replaceState=new Proxy(window.history.replaceState,{apply:(t,e,n)=>{const r=t.apply(e,n);return window.dispatchEvent(new Event(Q)),r}}));let n=!1;window.addEventListener("popstate",e),window.addEventListener("hashchange",e),window.addEventListener(Q,e)})(_.a.dispatch.bind(_.a)),_.a.subscribe((()=>{const t=_.a.getState();t.shopRoute.routeId!==Z&&Y(),Z=t.shopRoute.routeId}))})).catch((t=>{console.error("Error fetching novel storefront data",t)})),i.then((t=>{var n;((null==t?void 0:t.gatedExperiences.length)||"undefined"!=typeof window&&(null===(n=window.location)||void 0===n?void 0:n.hash.includes("="))||(0,N.c)())&&e()})),(0,d.a)((function(){i.then((()=>{var t;$(),t=e,V(),W(),z(t),J(t),function(){const t=document.getElementById(p.i),e=t&&t.parentNode;t&&e&&e.removeChild(t)}()})),m.d===m.c.production&&setTimeout((()=>{"serviceWorker"in navigator&&m.d===m.c.production&&(null===window||void 0===window?void 0:window.Shopify)&&w.a===window.location.host&&navigator.serviceWorker.register(`${p.A}/js/storefront-service-worker.js`)}),1e4)}));let a=!1}());const Y=(0,X.a)((()=>_.a.dispatch((0,E.a)())),3e3,!0);let Z=0}()}();