"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6774],{10569:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{html:t,height:r=null,width:s=null,children:o,dataNtpc:a=""}=e;return(0,i.useEffect)(()=>{a&&performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-".concat(a)}})},[a]),(0,n.jsxs)(n.Fragment,{children:[o,t?(0,n.jsx)("div",{style:{height:null!=r?"".concat(r,"px"):"auto",width:null!=s?"".concat(s,"px"):"auto"},"data-ntpc":a,dangerouslySetInnerHTML:{__html:t}}):null]})};let n=r(91215),i=r(36800)},91885:(e,t,r)=>{let n;Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=function(e){let{gaId:t,debugMode:r,dataLayerName:a="dataLayer",nonce:c}=e;return void 0===n&&(n=a),(0,s.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-ga"}})},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.default,{id:"_next-ga-init",dangerouslySetInnerHTML:{__html:"\n          window['".concat(a,"'] = window['").concat(a,"'] || [];\n          function gtag(){window['").concat(a,"'].push(arguments);}\n          gtag('js', new Date());\n\n          gtag('config', '").concat(t,"' ").concat(r?",{ 'debug_mode': true }":"",");")},nonce:c}),(0,i.jsx)(o.default,{id:"_next-ga",src:"https://www.googletagmanager.com/gtag/js?id=".concat(t),nonce:c})]})},t.sendGAEvent=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(void 0===n){console.warn("@next/third-parties: GA has not been initialized");return}window[n]?window[n].push(arguments):console.warn("@next/third-parties: GA dataLayer ".concat(n," does not exist"))};let i=r(91215),s=r(36800),o=function(e){return e&&e.__esModule?e:{default:e}}(r(17704))},1135:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sendGTMEvent=void 0,t.GoogleTagManager=function(e){let{gtmId:t,gtmScriptUrl:r="https://www.googletagmanager.com/gtm.js",dataLayerName:a="dataLayer",auth:c,preview:u,dataLayer:l,nonce:h}=e;o=a;let d="dataLayer"!==a?"&l=".concat(a):"";return(0,i.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-gtm"}})},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.default,{id:"_next-gtm-init",dangerouslySetInnerHTML:{__html:"\n      (function(w,l){\n        w[l]=w[l]||[];\n        w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});\n        ".concat(l?"w[l].push(".concat(JSON.stringify(l),")"):"","\n      })(window,'").concat(a,"');")},nonce:h}),(0,n.jsx)(s.default,{id:"_next-gtm","data-ntpc":"GTM",src:"".concat(r,"?id=").concat(t).concat(d).concat(c?"&gtm_auth=".concat(c):"").concat(u?"&gtm_preview=".concat(u,"&gtm_cookies_win=x"):"")})]})};let n=r(91215),i=r(36800),s=function(e){return e&&e.__esModule?e:{default:e}}(r(17704)),o="dataLayer";t.sendGTMEvent=(e,t)=>{let r=t||o;window[r]=window[r]||[],window[r].push(e)}},17704:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i.a});var n=r(36248),i=r.n(n),s={};for(let e in n)"default"!==e&&(s[e]=()=>n[e]);r.d(t,s)},88965:(e,t,r)=>{r.d(t,{VY:()=>eo,h4:()=>ei,ck:()=>en,fC:()=>er,xz:()=>es});var n=r(36800),i=r(92018),s=r(71297),o=r(8973),a=r(81275),c=r(2889),u=r(21342),l=r(38723),h=r(5455),d=r(27114),f=r(91215),p="Collapsible",[m,y]=(0,i.b)(p),[v,g]=m(p),b=n.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:i,defaultOpen:s,disabled:o,onOpenChange:a,...l}=e,[h=!1,p]=(0,c.T)({prop:i,defaultProp:s,onChange:a});return(0,f.jsx)(v,{scope:r,disabled:o,contentId:(0,d.M)(),open:h,onOpenToggle:n.useCallback(()=>p(e=>!e),[p]),children:(0,f.jsx)(u.WV.div,{"data-state":S(h),"data-disabled":o?"":void 0,...l,ref:t})})});b.displayName=p;var w="CollapsibleTrigger",R=n.forwardRef((e,t)=>{let{__scopeCollapsible:r,...n}=e,i=g(w,r);return(0,f.jsx)(u.WV.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":S(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...n,ref:t,onClick:(0,a.M)(e.onClick,i.onOpenToggle)})});R.displayName=w;var x="CollapsibleContent",_=n.forwardRef((e,t)=>{let{forceMount:r,...n}=e,i=g(x,e.__scopeCollapsible);return(0,f.jsx)(h.z,{present:r||i.open,children:e=>{let{present:r}=e;return(0,f.jsx)(C,{...n,ref:t,present:r})}})});_.displayName=x;var C=n.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:i,children:s,...a}=e,c=g(x,r),[h,d]=n.useState(i),p=n.useRef(null),m=(0,o.e)(t,p),y=n.useRef(0),v=y.current,b=n.useRef(0),w=b.current,R=c.open||h,_=n.useRef(R),C=n.useRef();return n.useEffect(()=>{let e=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,l.b)(()=>{let e=p.current;if(e){C.current=C.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();y.current=t.height,b.current=t.width,_.current||(e.style.transitionDuration=C.current.transitionDuration,e.style.animationName=C.current.animationName),d(i)}},[c.open,i]),(0,f.jsx)(u.WV.div,{"data-state":S(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!R,...a,ref:m,style:{"--radix-collapsible-content-height":v?"".concat(v,"px"):void 0,"--radix-collapsible-content-width":w?"".concat(w,"px"):void 0,...e.style},children:R&&s})});function S(e){return e?"open":"closed"}var O=r(1055),E="Accordion",I=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[T,k,A]=(0,s.B)(E),[j,P]=(0,i.b)(E,[A,y]),F=y(),D=n.forwardRef((e,t)=>{let{type:r,...n}=e;return(0,f.jsx)(T.Provider,{scope:e.__scopeAccordion,children:"multiple"===r?(0,f.jsx)(L,{...n,ref:t}):(0,f.jsx)(U,{...n,ref:t})})});D.displayName=E;var[N,Q]=j(E),[M,q]=j(E,{collapsible:!1}),U=n.forwardRef((e,t)=>{let{value:r,defaultValue:i,onValueChange:s=()=>{},collapsible:o=!1,...a}=e,[u,l]=(0,c.T)({prop:r,defaultProp:i,onChange:s});return(0,f.jsx)(N,{scope:e.__scopeAccordion,value:u?[u]:[],onItemOpen:l,onItemClose:n.useCallback(()=>o&&l(""),[o,l]),children:(0,f.jsx)(M,{scope:e.__scopeAccordion,collapsible:o,children:(0,f.jsx)(K,{...a,ref:t})})})}),L=n.forwardRef((e,t)=>{let{value:r,defaultValue:i,onValueChange:s=()=>{},...o}=e,[a=[],u]=(0,c.T)({prop:r,defaultProp:i,onChange:s}),l=n.useCallback(e=>u(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[...t,e]}),[u]),h=n.useCallback(e=>u(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.filter(t=>t!==e)}),[u]);return(0,f.jsx)(N,{scope:e.__scopeAccordion,value:a,onItemOpen:l,onItemClose:h,children:(0,f.jsx)(M,{scope:e.__scopeAccordion,collapsible:!0,children:(0,f.jsx)(K,{...o,ref:t})})})}),[G,V]=j(E),K=n.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:i,dir:s,orientation:c="vertical",...l}=e,h=n.useRef(null),d=(0,o.e)(h,t),p=k(r),m="ltr"===(0,O.gm)(s),y=(0,a.M)(e.onKeyDown,e=>{var t;if(!I.includes(e.key))return;let r=e.target,n=p().filter(e=>{var t;return!(null===(t=e.ref.current)||void 0===t?void 0:t.disabled)}),i=n.findIndex(e=>e.ref.current===r),s=n.length;if(-1===i)return;e.preventDefault();let o=i,a=s-1,u=()=>{(o=i+1)>a&&(o=0)},l=()=>{(o=i-1)<0&&(o=a)};switch(e.key){case"Home":o=0;break;case"End":o=a;break;case"ArrowRight":"horizontal"===c&&(m?u():l());break;case"ArrowDown":"vertical"===c&&u();break;case"ArrowLeft":"horizontal"===c&&(m?l():u());break;case"ArrowUp":"vertical"===c&&l()}null===(t=n[o%s].ref.current)||void 0===t||t.focus()});return(0,f.jsx)(G,{scope:r,disabled:i,direction:s,orientation:c,children:(0,f.jsx)(T.Slot,{scope:r,children:(0,f.jsx)(u.WV.div,{...l,"data-orientation":c,ref:d,onKeyDown:i?void 0:y})})})}),$="AccordionItem",[H,z]=j($),W=n.forwardRef((e,t)=>{let{__scopeAccordion:r,value:n,...i}=e,s=V($,r),o=Q($,r),a=F(r),c=(0,d.M)(),u=n&&o.value.includes(n)||!1,l=s.disabled||e.disabled;return(0,f.jsx)(H,{scope:r,open:u,disabled:l,triggerId:c,children:(0,f.jsx)(b,{"data-orientation":s.orientation,"data-state":et(u),...a,...i,ref:t,disabled:l,open:u,onOpenChange:e=>{e?o.onItemOpen(n):o.onItemClose(n)}})})});W.displayName=$;var B="AccordionHeader",Y=n.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,i=V(E,r),s=z(B,r);return(0,f.jsx)(u.WV.h3,{"data-orientation":i.orientation,"data-state":et(s.open),"data-disabled":s.disabled?"":void 0,...n,ref:t})});Y.displayName=B;var Z="AccordionTrigger",J=n.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,i=V(E,r),s=z(Z,r),o=q(Z,r),a=F(r);return(0,f.jsx)(T.ItemSlot,{scope:r,children:(0,f.jsx)(R,{"aria-disabled":s.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:s.triggerId,...a,...n,ref:t})})});J.displayName=Z;var X="AccordionContent",ee=n.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,i=V(E,r),s=z(X,r),o=F(r);return(0,f.jsx)(_,{role:"region","aria-labelledby":s.triggerId,"data-orientation":i.orientation,...o,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});function et(e){return e?"open":"closed"}ee.displayName=X;var er=D,en=W,ei=Y,es=J,eo=ee},71297:(e,t,r)=>{r.d(t,{B:()=>c});var n=r(36800),i=r(87077),s=r(8973),o=r(37566),a=r(91215);function c(e){let t=e+"CollectionProvider",[r,c]=(0,i.b)(t),[u,l]=r(t,{collectionRef:{current:null},itemMap:new Map}),h=e=>{let{scope:t,children:r}=e,i=n.useRef(null),s=n.useRef(new Map).current;return(0,a.jsx)(u,{scope:t,itemMap:s,collectionRef:i,children:r})};h.displayName=t;let d=e+"CollectionSlot",f=n.forwardRef((e,t)=>{let{scope:r,children:n}=e,i=l(d,r),c=(0,s.e)(t,i.collectionRef);return(0,a.jsx)(o.g7,{ref:c,children:n})});f.displayName=d;let p=e+"CollectionItemSlot",m="data-radix-collection-item",y=n.forwardRef((e,t)=>{let{scope:r,children:i,...c}=e,u=n.useRef(null),h=(0,s.e)(t,u),d=l(p,r);return n.useEffect(()=>(d.itemMap.set(u,{ref:u,...c}),()=>void d.itemMap.delete(u))),(0,a.jsx)(o.g7,{[m]:"",ref:h,children:i})});return y.displayName=p,[{Provider:h,Slot:f,ItemSlot:y},function(t){let r=l(e+"CollectionConsumer",t);return n.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(m,"]")));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},c]}},87077:(e,t,r)=>{r.d(t,{b:()=>s});var n=r(36800),i=r(91215);function s(e,t=[]){let r=[],o=()=>{let t=r.map(e=>n.createContext(e));return function(r){let i=r?.[e]||t;return n.useMemo(()=>({[`__scope${e}`]:{...r,[e]:i}}),[r,i])}};return o.scopeName=e,[function(t,s){let o=n.createContext(s),a=r.length;function c(t){let{scope:r,children:s,...c}=t,u=r?.[e][a]||o,l=n.useMemo(()=>c,Object.values(c));return(0,i.jsx)(u.Provider,{value:l,children:s})}return r=[...r,s],c.displayName=t+"Provider",[c,function(r,i){let c=i?.[e][a]||o,u=n.useContext(c);if(u)return u;if(void 0!==s)return s;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=r.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}(o,...t)]}},1055:(e,t,r)=>{r.d(t,{gm:()=>s});var n=r(36800);r(91215);var i=n.createContext(void 0);function s(e){let t=n.useContext(i);return e||t||"ltr"}},75519:(e,t,r)=>{r.d(t,{ZY:()=>n,am:()=>i,kj:()=>s,tR:()=>o});let n={PAGE_VIEW:"PAGE_VIEW",ADD_TO_CART:"ADD_TO_CART"},i={article:"article",blog:"blog",captcha:"captcha",cart:"cart",collection:"collection",customersAccount:"customers/account",customersActivateAccount:"customers/activate_account",customersAddresses:"customers/addresses",customersLogin:"customers/login",customersOrder:"customers/order",customersRegister:"customers/register",customersResetPassword:"customers/reset_password",giftCard:"gift_card",home:"index",listCollections:"list-collections",forbidden:"403",notFound:"404",page:"page",password:"password",product:"product",policy:"policy",search:"search"},s={hydrogen:"hydrogen",headless:"headless"},o={hydrogen:"6167201",headless:"12875497473"}},55633:(e,t,r)=>{r.d(t,{w:()=>p,A:()=>d});var n=r(10786),i=r(75519);function s(e,t){return{schema_id:e,payload:t,metadata:{event_created_at_ms:Date.now()}}}function o(e){let t={id:"",resource:null};if("string"!=typeof e)return t;let r=e.match(/^gid:\/\/shopify\/(\w+)\/([^/]+)/);return r&&1!==r.length?{id:r[2]??null,resource:r[1]??null}:t}function a(e,t){return"object"!=typeof e?{}:(Object.entries(e).forEach(([e,r])=>{r&&(t[e]=r)}),t)}var c=r(90903);let u="custom_storefront_customer_tracking/1.0";function l(e){return{source:e.shopifySalesChannel||i.kj.headless,hydrogenSubchannelId:e.storefrontId||"0",is_persistent_cookie:e.hasUserConsent,ccpa_enforced:!1,gdpr_enforced:!1,unique_token:e.uniqueToken,event_time:Date.now(),event_id:(0,c.eS)(),event_source_url:e.url,referrer:e.referrer,user_agent:e.userAgent,navigation_type:e.navigationType,navigation_api:e.navigationApi,shop_id:parseInt(o(e.shopId).id),currency:e.currency}}function h(e){return e?e.map(e=>JSON.stringify(a({variant_gid:e.variantGid,category:e.category,sku:e.sku,product_id:parseInt(o(e.productGid).id),variant_id:parseInt(o(e.variantGid).id)},{product_gid:e.productGid,name:e.name,variant:e.variantName||"",brand:e.brand,price:e.price,quantity:Number(e.quantity||0)}))):[]}function d(e,t){let{eventName:r,payload:n}=e;if(!n.hasUserConsent)return Promise.resolve();let d=[];return(r===i.ZY.PAGE_VIEW?d=d.concat(function(e){let{id:t,resource:r}=o(e.resourceId),n=r?r.toLowerCase():void 0;return[s("trekkie_storefront_page_view/1.4",a({pageType:e.pageType,customerId:e.customerId,resourceType:n,resourceId:parseInt(t)},{appClientId:e.shopifySalesChannel?i.tR[e.shopifySalesChannel]:i.tR.headless,isMerchantRequest:function(e){if("string"!=typeof e)return!1;let t=new URL(e).hostname;return -1!==t.indexOf("myshopify.dev")||"localhost"===t}(e.url),hydrogenSubchannelId:e.storefrontId||"0",isPersistentCookie:e.hasUserConsent,uniqToken:e.uniqueToken,visitToken:e.visitToken,microSessionId:(0,c.eS)(),microSessionCount:1,url:e.url,path:e.path,search:e.search,referrer:e.referrer,title:e.title,shopId:parseInt(o(e.shopId).id),currency:e.currency,contentLanguage:e.acceptedLanguage||"en"}))]}(n),function(e){let t={canonical_url:e.canonicalUrl||e.url,customer_id:e.customerId},r=e.pageType,n=[];switch(n.push(s(u,a({event_name:"page_rendered",...t},l(e)))),r){case i.am.collection:n.push(s(u,a({event_name:"collection_page_rendered",...t,collection_name:e.collectionHandle},l(e))));break;case i.am.product:n.push(s(u,a({event_name:"product_page_rendered",...t,products:h(e.products),total_value:e.totalValue},l(e))));break;case i.am.search:n.push(s(u,a({event_name:"search_submitted",...t,search_string:e.searchString},l(e))))}return n}(n)):r===i.ZY.ADD_TO_CART&&(d=d.concat(function(e){let t=o(e.cartId),r=(null==t?void 0:t.id)?`${t.id}`:null;return[s(u,a({event_name:"product_added_to_cart",customerId:e.customerId,cart_token:r,total_value:e.totalValue,products:h(e.products)},l(e)))]}(n))),d.length)?function(e,t){let r={events:e,metadata:{event_sent_at_ms:Date.now()}};try{return fetch(t?`https://${t}/.well-known/shopify/monorail/unstable/produce_batch`:"https://monorail-edge.shopifysvc.com/unstable/produce_batch",{method:"post",headers:{"content-type":"text/plain"},body:JSON.stringify(r)}).then(e=>{if(!e.ok)throw Error("Response failed");return e.text()}).then(e=>{e&&JSON.parse(e).result.forEach(e=>{200!==e.status&&console.error(f,"\n\n",e.message)})}).catch(e=>{console.error(f,e)})}catch(e){return Promise.resolve()}}(d,t):Promise.resolve()}let f="sendShopifyAnalytics request is unsuccessful";function p(){if("undefined"==typeof document&&(console.error("getClientBrowserParameters should only be used within the useEffect callback or event handlers"),1))return{uniqueToken:"",visitToken:"",url:"",path:"",search:"",referrer:"",title:"",userAgent:"",navigationType:"",navigationApi:""};let[e,t]=function(){try{let e="PerformanceNavigationTiming",t=function(){try{let e=(null==performance?void 0:performance.getEntriesByType)&&(null==performance?void 0:performance.getEntriesByType("navigation"));if(e&&e[0]){let e=window.performance.getEntriesByType("navigation")[0].type;return e&&e.toString()}}catch(e){}}();if(t||(t=function(){var e,t;try{if(PerformanceNavigation&&(null==(e=null==performance?void 0:performance.navigation)?void 0:e.type)!==null&&(null==(t=null==performance?void 0:performance.navigation)?void 0:t.type)!==void 0){let e=performance.navigation.type;switch(e){case PerformanceNavigation.TYPE_NAVIGATE:return"navigate";case PerformanceNavigation.TYPE_RELOAD:return"reload";case PerformanceNavigation.TYPE_BACK_FORWARD:return"back_forward";default:return`unknown: ${e}`}}}catch(e){}}(),e="performance.navigation"),t)return[t,e];return["unknown","unknown"]}catch(e){}return["error","error"]}(),r=(0,c.Ie)(document.cookie);return{uniqueToken:r[n.$q],visitToken:r[n.a5],url:location.href,path:location.pathname,search:location.search,referrer:document.referrer,title:document.title,userAgent:navigator.userAgent,navigationType:e,navigationApi:t}}},10786:(e,t,r)=>{r.d(t,{$q:()=>n,a5:()=>i});let n="_shopify_y",i="_shopify_s"},90903:(e,t,r)=>{r.d(t,{Ie:()=>a,eS:()=>o});var n=r(53935),i=r(10786);let s="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function o(){let e="";try{let t=window.crypto,r=new Uint16Array(31);t.getRandomValues(r);let n=0;e=s.replace(/[x]/g,e=>{let t=r[n]%16;return n++,("x"===e?t:3&t|8).toString(16)}).toUpperCase()}catch(t){e=s.replace(/[x]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}).toUpperCase()}return`${function(){let e=0,t=0;e=new Date().getTime()>>>0;try{t=performance.now()>>>0}catch(e){t=0}let r=Math.abs(e+t).toString(16).toLowerCase();return r.padStart(8-r.length,"0")}()}-${e}`}function a(e){let t=(0,n.Q)(e);return{[i.$q]:t[i.$q]||"",[i.a5]:t[i.a5]||""}}},8376:(e,t,r)=>{r.d(t,{R:()=>a});var n=r(36800),i=r(53935),s=r(10786),o=r(90903);function a(e){let{hasUserConsent:t=!1,domain:r=""}=e||{};(0,n.useEffect)(()=>{let e=(0,o.Ie)(document.cookie);t?(c(s.$q,e[s.$q]||(0,o.eS)(),31104e3,r),c(s.a5,e[s.a5]||(0,o.eS)(),1800,r)):(c(s.$q,"",0,r),c(s.a5,"",0,r))})}function c(e,t,r,n){document.cookie=(0,i.P)(e,t,{maxage:r,domain:n,samesite:"Lax",path:"/"})}},93899:(e,t,r)=>{r.d(t,{j:()=>s});var n=r(33143),i=r(20459),s=new class extends n.l{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!i.sk&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}}},581:(e,t,r)=>{r.d(t,{V:()=>n});var n=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},i=e=>setTimeout(e,0),s=n=>{t?e.push(n):i(()=>{r(n)})},o=()=>{let t=e;e=[],t.length&&i(()=>{n(()=>{t.forEach(e=>{r(e)})})})};return{batch:e=>{let r;t++;try{r=e()}finally{--t||o()}return r},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{i=e}}}()},81951:(e,t,r)=>{r.d(t,{N:()=>s});var n=r(33143),i=r(20459),s=new class extends n.l{#n=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!i.sk&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#n!==e&&(this.#n=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#n}}},74644:(e,t,r)=>{r.d(t,{A:()=>a,z:()=>c});var n=r(20459),i=r(581),s=r(44080),o=r(51242),a=class extends o.F{#i;#s;#o;#a;#c;#u;constructor(e){super(),this.#u=!1,this.#c=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#i=function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#i,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(e){this.options={...this.#c,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#o.remove(this)}setData(e,t){let r=(0,n.oE)(this.state.data,e,this.options);return this.#l({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#l({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(n.ZT).catch(n.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#i)}isActive(){return this.observers.some(e=>!1!==(0,n.Nc)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===n.CN||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!(0,n.Kp)(this.state.dataUpdatedAt,e)}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#o.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#u?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#o.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let r=new AbortController,i=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#u=!0,r.signal)})},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{let e=(0,n.cG)(this.options,t),r={queryKey:this.queryKey,meta:this.meta};return(i(r),this.#u=!1,this.options.persister)?this.options.persister(e,r,this):e(r)}};i(o),this.options.behavior?.onFetch(o,this),this.#s=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#l({type:"fetch",meta:o.fetchOptions?.meta});let a=e=>{(0,s.DV)(e)&&e.silent||this.#l({type:"error",error:e}),(0,s.DV)(e)||(this.#o.config.onError?.(e,this),this.#o.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#a=(0,s.Mz)({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:e=>{if(void 0===e){a(Error(`${this.queryHash} data is undefined`));return}try{this.setData(e)}catch(e){a(e);return}this.#o.config.onSuccess?.(e,this),this.#o.config.onSettled?.(e,this.state.error,this),this.scheduleGc()},onError:a,onFail:(e,t)=>{this.#l({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#a.start()}#l(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...c(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let r=e.error;if((0,s.DV)(r)&&r.revert&&this.#s)return{...this.#s,fetchStatus:"idle"};return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),i.V.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#o.notify({query:this,type:"updated",action:e})})}};function c(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,s.Kw)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}},51242:(e,t,r)=>{r.d(t,{F:()=>i});var n=r(20459),i=class{#h;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,n.PN)(this.gcTime)&&(this.#h=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(n.sk?1/0:3e5))}clearGcTimeout(){this.#h&&(clearTimeout(this.#h),this.#h=void 0)}}},44080:(e,t,r)=>{r.d(t,{DV:()=>l,Kw:()=>c,Mz:()=>h});var n=r(93899),i=r(81951),s=r(43068),o=r(20459);function a(e){return Math.min(1e3*2**e,3e4)}function c(e){return(e??"online")!=="online"||i.N.isOnline()}var u=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function l(e){return e instanceof u}function h(e){let t,r=!1,l=0,h=!1,d=(0,s.O)(),f=()=>n.j.isFocused()&&("always"===e.networkMode||i.N.isOnline())&&e.canRun(),p=()=>c(e.networkMode)&&e.canRun(),m=r=>{h||(h=!0,e.onSuccess?.(r),t?.(),d.resolve(r))},y=r=>{h||(h=!0,e.onError?.(r),t?.(),d.reject(r))},v=()=>new Promise(r=>{t=e=>{(h||f())&&r(e)},e.onPause?.()}).then(()=>{t=void 0,h||e.onContinue?.()}),g=()=>{let t;if(h)return;let n=0===l?e.initialPromise:void 0;try{t=n??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(m).catch(t=>{if(h)return;let n=e.retry??(o.sk?0:3),i=e.retryDelay??a,s="function"==typeof i?i(l,t):i,c=!0===n||"number"==typeof n&&l<n||"function"==typeof n&&n(l,t);if(r||!c){y(t);return}l++,e.onFail?.(l,t),(0,o._v)(s).then(()=>f()?void 0:v()).then(()=>{r?y(t):g()})})};return{promise:d,cancel:t=>{h||(y(new u(t)),e.abort?.())},continue:()=>(t?.(),d),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:p,start:()=>(p()?g():v().then(g),d)}}},33143:(e,t,r)=>{r.d(t,{l:()=>n});var n=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},43068:(e,t,r)=>{r.d(t,{O:()=>n});function n(){let e,t;let r=new Promise((r,n)=>{e=r,t=n});function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}},20459:(e,t,r)=>{r.d(t,{CN:()=>_,Ht:()=>x,KC:()=>c,Kp:()=>a,Nc:()=>u,PN:()=>o,Rm:()=>d,SE:()=>s,VS:()=>m,VX:()=>R,X7:()=>h,Ym:()=>f,ZT:()=>i,_v:()=>b,_x:()=>l,cG:()=>C,oE:()=>w,sk:()=>n,to:()=>p});var n="undefined"==typeof window||"Deno"in globalThis;function i(){}function s(e,t){return"function"==typeof e?e(t):e}function o(e){return"number"==typeof e&&e>=0&&e!==1/0}function a(e,t){return Math.max(e+(t||0)-Date.now(),0)}function c(e,t){return"function"==typeof e?e(t):e}function u(e,t){return"function"==typeof e?e(t):e}function l(e,t){let{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==d(o,t.options))return!1}else if(!p(t.queryKey,o))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&(!i||i===t.state.fetchStatus)&&(!s||!!s(t))}function h(e,t){let{exact:r,status:n,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(r){if(f(t.options.mutationKey)!==f(s))return!1}else if(!p(t.options.mutationKey,s))return!1}return(!n||t.state.status===n)&&(!i||!!i(t))}function d(e,t){return(t?.queryKeyHashFn||f)(e)}function f(e){return JSON.stringify(e,(e,t)=>v(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function p(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(r=>!p(e[r],t[r]))}function m(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function y(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function v(e){if(!g(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!(g(r)&&r.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(e)===Object.prototype}function g(e){return"[object Object]"===Object.prototype.toString.call(e)}function b(e){return new Promise(t=>{setTimeout(t,e)})}function w(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r){if(t===r)return t;let n=y(t)&&y(r);if(n||v(t)&&v(r)){let i=n?t:Object.keys(t),s=i.length,o=n?r:Object.keys(r),a=o.length,c=n?[]:{},u=0;for(let s=0;s<a;s++){let a=n?s:o[s];(!n&&i.includes(a)||n)&&void 0===t[a]&&void 0===r[a]?(c[a]=void 0,u++):(c[a]=e(t[a],r[a]),c[a]===t[a]&&void 0!==t[a]&&u++)}return s===a&&u===s?t:c}return r}(e,t):t}function R(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n}function x(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var _=Symbol();function C(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==_?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}},29335:(e,t,r)=>{r.d(t,{NL:()=>o,aH:()=>a});var n=r(36800),i=r(91215),s=n.createContext(void 0),o=e=>{let t=n.useContext(s);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},a=e=>{let{client:t,children:r}=e;return n.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,i.jsx)(s.Provider,{value:t,children:r})}},40957:(e,t,r)=>{r.d(t,{a:()=>I});var n=r(93899),i=r(581),s=r(74644),o=r(33143),a=r(43068),c=r(20459),u=class extends o.l{constructor(e,t){super(),this.options=t,this.#d=e,this.#f=null,this.#p=(0,a.O)(),this.options.experimental_prefetchInRender||this.#p.reject(Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#d;#m=void 0;#y=void 0;#v=void 0;#g;#b;#p;#f;#w;#R;#x;#_;#C;#S;#O=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#m.addObserver(this),l(this.#m,this.options)?this.#E():this.updateResult(),this.#I())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return h(this.#m,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return h(this.#m,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#T(),this.#k(),this.#m.removeObserver(this)}setOptions(e,t){let r=this.options,n=this.#m;if(this.options=this.#d.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,c.Nc)(this.options.enabled,this.#m))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#A(),this.#m.setOptions(this.options),r._defaulted&&!(0,c.VS)(this.options,r)&&this.#d.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#m,observer:this});let i=this.hasListeners();i&&d(this.#m,n,this.options,r)&&this.#E(),this.updateResult(t),i&&(this.#m!==n||(0,c.Nc)(this.options.enabled,this.#m)!==(0,c.Nc)(r.enabled,this.#m)||(0,c.KC)(this.options.staleTime,this.#m)!==(0,c.KC)(r.staleTime,this.#m))&&this.#j();let s=this.#P();i&&(this.#m!==n||(0,c.Nc)(this.options.enabled,this.#m)!==(0,c.Nc)(r.enabled,this.#m)||s!==this.#S)&&this.#F(s)}getOptimisticResult(e){let t=this.#d.getQueryCache().build(this.#d,e),r=this.createResult(t,e);return(0,c.VS)(this.getCurrentResult(),r)||(this.#v=r,this.#b=this.options,this.#g=this.#m.state),r}getCurrentResult(){return this.#v}trackResult(e,t){let r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(n),t?.(n),e[n])})}),r}trackProp(e){this.#O.add(e)}getCurrentQuery(){return this.#m}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#d.defaultQueryOptions(e),r=this.#d.getQueryCache().build(this.#d,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#E({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#v))}#E(e){this.#A();let t=this.#m.fetch(this.options,e);return e?.throwOnError||(t=t.catch(c.ZT)),t}#j(){this.#T();let e=(0,c.KC)(this.options.staleTime,this.#m);if(c.sk||this.#v.isStale||!(0,c.PN)(e))return;let t=(0,c.Kp)(this.#v.dataUpdatedAt,e);this.#_=setTimeout(()=>{this.#v.isStale||this.updateResult()},t+1)}#P(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#m):this.options.refetchInterval)??!1}#F(e){this.#k(),this.#S=e,!c.sk&&!1!==(0,c.Nc)(this.options.enabled,this.#m)&&(0,c.PN)(this.#S)&&0!==this.#S&&(this.#C=setInterval(()=>{(this.options.refetchIntervalInBackground||n.j.isFocused())&&this.#E()},this.#S))}#I(){this.#j(),this.#F(this.#P())}#T(){this.#_&&(clearTimeout(this.#_),this.#_=void 0)}#k(){this.#C&&(clearInterval(this.#C),this.#C=void 0)}createResult(e,t){let r;let n=this.#m,i=this.options,o=this.#v,u=this.#g,h=this.#b,p=e!==n?e.state:this.#y,{state:m}=e,y={...m},v=!1;if(t._optimisticResults){let r=this.hasListeners(),o=!r&&l(e,t),a=r&&d(e,n,t,i);(o||a)&&(y={...y,...(0,s.z)(m.data,e.options)}),"isRestoring"===t._optimisticResults&&(y.fetchStatus="idle")}let{error:g,errorUpdatedAt:b,status:w}=y;if(t.select&&void 0!==y.data){if(o&&y.data===u?.data&&t.select===this.#w)r=this.#R;else try{this.#w=t.select,r=t.select(y.data),r=(0,c.oE)(o?.data,r,t),this.#R=r,this.#f=null}catch(e){this.#f=e}}else r=y.data;if(void 0!==t.placeholderData&&void 0===r&&"pending"===w){let e;if(o?.isPlaceholderData&&t.placeholderData===h?.placeholderData)e=o.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(this.#x?.state.data,this.#x):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.#f=null}catch(e){this.#f=e}void 0!==e&&(w="success",r=(0,c.oE)(o?.data,e,t),v=!0)}this.#f&&(g=this.#f,r=this.#R,b=Date.now(),w="error");let R="fetching"===y.fetchStatus,x="pending"===w,_="error"===w,C=x&&R,S=void 0!==r,O={status:w,fetchStatus:y.fetchStatus,isPending:x,isSuccess:"success"===w,isError:_,isInitialLoading:C,isLoading:C,data:r,dataUpdatedAt:y.dataUpdatedAt,error:g,errorUpdatedAt:b,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>p.dataUpdateCount||y.errorUpdateCount>p.errorUpdateCount,isFetching:R,isRefetching:R&&!x,isLoadingError:_&&!S,isPaused:"paused"===y.fetchStatus,isPlaceholderData:v,isRefetchError:_&&S,isStale:f(e,t),refetch:this.refetch,promise:this.#p};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===O.status?e.reject(O.error):void 0!==O.data&&e.resolve(O.data)},r=()=>{t(this.#p=O.promise=(0,a.O)())},i=this.#p;switch(i.status){case"pending":e.queryHash===n.queryHash&&t(i);break;case"fulfilled":("error"===O.status||O.data!==i.value)&&r();break;case"rejected":("error"!==O.status||O.error!==i.reason)&&r()}}return O}updateResult(e){let t=this.#v,r=this.createResult(this.#m,this.options);if(this.#g=this.#m.state,this.#b=this.options,void 0!==this.#g.data&&(this.#x=this.#m),(0,c.VS)(r,t))return;this.#v=r;let n={};e?.listeners!==!1&&(()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options,r="function"==typeof e?e():e;if("all"===r||!r&&!this.#O.size)return!0;let n=new Set(r??this.#O);return this.options.throwOnError&&n.add("error"),Object.keys(this.#v).some(e=>this.#v[e]!==t[e]&&n.has(e))})()&&(n.listeners=!0),this.#D({...n,...e})}#A(){let e=this.#d.getQueryCache().build(this.#d,this.options);if(e===this.#m)return;let t=this.#m;this.#m=e,this.#y=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#I()}#D(e){i.V.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#v)}),this.#d.getQueryCache().notify({query:this.#m,type:"observerResultsUpdated"})})}};function l(e,t){return!1!==(0,c.Nc)(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)||void 0!==e.state.data&&h(e,t,t.refetchOnMount)}function h(e,t,r){if(!1!==(0,c.Nc)(t.enabled,e)){let n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&f(e,t)}return!1}function d(e,t,r,n){return(e!==t||!1===(0,c.Nc)(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&f(e,r)}function f(e,t){return!1!==(0,c.Nc)(t.enabled,e)&&e.isStaleByTime((0,c.KC)(t.staleTime,e))}var p=r(36800),m=r(29335);r(91215);var y=p.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),v=()=>p.useContext(y);function g(){}var b=(e,t)=>{(e.suspense||e.throwOnError)&&!t.isReset()&&(e.retryOnMount=!1)},w=e=>{p.useEffect(()=>{e.clearReset()},[e])},R=e=>{let{result:t,errorResetBoundary:r,throwOnError:n,query:i}=e;return t.isError&&!r.isReset()&&!t.isFetching&&i&&function(e,t){return"function"==typeof e?e(...t):!!e}(n,[t.error,i])},x=p.createContext(!1),_=()=>p.useContext(x);x.Provider;var C=e=>{e.suspense&&(void 0===e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))},S=(e,t)=>e.isLoading&&e.isFetching&&!t,O=(e,t)=>e?.suspense&&t.isPending,E=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function I(e,t){return function(e,t,r){var n,s,o,a,u;let l=(0,m.NL)(r),h=_(),d=v(),f=l.defaultQueryOptions(e);null===(s=l.getDefaultOptions().queries)||void 0===s||null===(n=s._experimental_beforeQuery)||void 0===n||n.call(s,f),f._optimisticResults=h?"isRestoring":"optimistic",C(f),b(f,d),w(d);let y=!l.getQueryCache().get(f.queryHash),[x]=p.useState(()=>new t(l,f)),I=x.getOptimisticResult(f);if(p.useSyncExternalStore(p.useCallback(e=>{let t=h?()=>void 0:x.subscribe(i.V.batchCalls(e));return x.updateResult(),t},[x,h]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),p.useEffect(()=>{x.setOptions(f,{listeners:!1})},[f,x]),O(f,I))throw E(f,x,d);if(R({result:I,errorResetBoundary:d,throwOnError:f.throwOnError,query:l.getQueryCache().get(f.queryHash)}))throw I.error;if(null===(a=l.getDefaultOptions().queries)||void 0===a||null===(o=a._experimental_afterQuery)||void 0===o||o.call(a,f,I),f.experimental_prefetchInRender&&!c.sk&&S(I,h)){let e=y?E(f,x,d):null===(u=l.getQueryCache().get(f.queryHash))||void 0===u?void 0:u.promise;null==e||e.catch(g).finally(()=>{x.updateResult()})}return f.notifyOnChangeProps?I:x.trackResult(I)}(e,u,t)}},93141:(e,t,r)=>{r.d(t,{M:()=>y});var n=r(36800),i=r(51424);function s(){let e=(0,n.useRef)(!1);return(0,i.L)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var o=r(68705),a=r(58910),c=r(48531);class u extends n.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function l({children:e,isPresent:t}){let r=(0,n.useId)(),i=(0,n.useRef)(null),s=(0,n.useRef)({width:0,height:0,top:0,left:0});return(0,n.useInsertionEffect)(()=>{let{width:e,height:n,top:o,left:a}=s.current;if(t||!i.current||!e||!n)return;i.current.dataset.motionPopId=r;let c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
          [data-motion-pop-id="${r}"] {
            position: absolute !important;
            width: ${e}px !important;
            height: ${n}px !important;
            top: ${o}px !important;
            left: ${a}px !important;
          }
        `),()=>{document.head.removeChild(c)}},[t]),n.createElement(u,{isPresent:t,childRef:i,sizeRef:s},n.cloneElement(e,{ref:i}))}let h=({children:e,initial:t,isPresent:r,onExitComplete:i,custom:s,presenceAffectsLayout:o,mode:u})=>{let h=(0,c.h)(d),f=(0,n.useId)(),p=(0,n.useMemo)(()=>({id:f,initial:t,isPresent:r,custom:s,onExitComplete:e=>{for(let t of(h.set(e,!0),h.values()))if(!t)return;i&&i()},register:e=>(h.set(e,!1),()=>h.delete(e))}),o?void 0:[r]);return(0,n.useMemo)(()=>{h.forEach((e,t)=>h.set(t,!1))},[r]),n.useEffect(()=>{r||h.size||!i||i()},[r]),"popLayout"===u&&(e=n.createElement(l,{isPresent:r},e)),n.createElement(a.O.Provider,{value:p},e)};function d(){return new Map}var f=r(6619),p=r(23100);let m=e=>e.key||"",y=({children:e,custom:t,initial:r=!0,onExitComplete:a,exitBeforeEnter:c,presenceAffectsLayout:u=!0,mode:l="sync"})=>{var d;(0,p.k)(!c,"Replace exitBeforeEnter with mode='wait'");let y=(0,n.useContext)(f.p).forceRender||function(){let e=s(),[t,r]=(0,n.useState)(0),i=(0,n.useCallback)(()=>{e.current&&r(t+1)},[t]);return[(0,n.useCallback)(()=>o.Wi.postRender(i),[i]),t]}()[0],v=s(),g=function(e){let t=[];return n.Children.forEach(e,e=>{(0,n.isValidElement)(e)&&t.push(e)}),t}(e),b=g,w=(0,n.useRef)(new Map).current,R=(0,n.useRef)(b),x=(0,n.useRef)(new Map).current,_=(0,n.useRef)(!0);if((0,i.L)(()=>{_.current=!1,function(e,t){e.forEach(e=>{let r=m(e);t.set(r,e)})}(g,x),R.current=b}),d=()=>{_.current=!0,x.clear(),w.clear()},(0,n.useEffect)(()=>()=>d(),[]),_.current)return n.createElement(n.Fragment,null,b.map(e=>n.createElement(h,{key:m(e),isPresent:!0,initial:!!r&&void 0,presenceAffectsLayout:u,mode:l},e)));b=[...b];let C=R.current.map(m),S=g.map(m),O=C.length;for(let e=0;e<O;e++){let t=C[e];-1!==S.indexOf(t)||w.has(t)||w.set(t,void 0)}return"wait"===l&&w.size&&(b=[]),w.forEach((e,r)=>{if(-1!==S.indexOf(r))return;let i=x.get(r);if(!i)return;let s=C.indexOf(r),o=e;o||(o=n.createElement(h,{key:m(i),isPresent:!1,onExitComplete:()=>{w.delete(r);let e=Array.from(x.keys()).filter(e=>!S.includes(e));if(e.forEach(e=>x.delete(e)),R.current=g.filter(t=>{let n=m(t);return n===r||e.includes(n)}),!w.size){if(!1===v.current)return;y(),a&&a()}},custom:t,presenceAffectsLayout:u,mode:l},i),w.set(r,o)),b.splice(s,0,o)}),b=b.map(e=>{let t=e.key;return w.has(t)?e:n.createElement(h,{key:m(e),isPresent:!0,presenceAffectsLayout:u,mode:l},e)}),n.createElement(n.Fragment,null,w.size?b:b.map(e=>(0,n.cloneElement)(e)))}},53935:(e,t,r)=>{r.d(t,{P:()=>s,Q:()=>i});var n=new Set(["domain","path","max-age","expires","samesite","secure","httponly"]);function i(e){let t={},r,i,s=0,o=e.split(/;\s*/g),a,c;for(;s<o.length;s++)if(~(r=(i=o[s]).indexOf("="))){if(a=i.substring(0,r++).trim(),'"'===(c=i.substring(r).trim())[0]&&(c=c.substring(1,c.length-1)),~c.indexOf("%"))try{c=decodeURIComponent(c)}catch(e){}n.has(i=a.toLowerCase())?"expires"===i?t.expires=new Date(c):"max-age"===i?t.maxage=+c:t[i]=c:t[a]=c}else(a=i.trim().toLowerCase())&&("httponly"===a||"secure"===a)&&(t[a]=!0);return t}function s(e,t,r={}){let n=e+"="+encodeURIComponent(t);return r.expires&&(n+="; Expires="+new Date(r.expires).toUTCString()),null!=r.maxage&&r.maxage>=0&&(n+="; Max-Age="+(0|r.maxage)),r.domain&&(n+="; Domain="+r.domain),r.path&&(n+="; Path="+r.path),r.samesite&&(n+="; SameSite="+r.samesite),(r.secure||"None"===r.samesite)&&(n+="; Secure"),r.httponly&&(n+="; HttpOnly"),n}}}]);