@qratilabs/qrati-connect 2.5.4-beta.1 → 2.6.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +9 -3
  3. package/element/{CImifxmT.js → BSwdc54O.js} +1 -1
  4. package/element/{gLxsyBUR.js → B_-odLwh.js} +1 -1
  5. package/element/{Dd8sghd-.js → CCKM4kEF.js} +1 -1
  6. package/element/{drbka-O1.js → Cpc6Qhgr.js} +1 -1
  7. package/element/{DCJdY3Ql.js → DAc8-Vq0.js} +1 -1
  8. package/element/{BADek3Hp.js → DjPncRH9.js} +1 -1
  9. package/element/{BMF_4nVr.js → Du8-hT2f.js} +1 -1
  10. package/element/{DxGircco.js → Khpj7noG.js} +1 -1
  11. package/element/{B0akCgyk.js → SltfVL7Y.js} +1 -1
  12. package/element/{DwowD6rK.js → biCG_tBt.js} +6 -6
  13. package/element/{CqZla5dP.js → h1CU3XIw.js} +1 -1
  14. package/element/{BJqH28Js.js → qdDA9G7i.js} +2 -2
  15. package/element/web.es.js +182 -183
  16. package/package.json +1 -1
  17. package/react/{D_j9W181.js → BHy0iRI9.js} +6 -6
  18. package/react/{BpXdP7F7.js → BQACmXVL.js} +1 -1
  19. package/react/{BPJw9iIa.js → BTy_w8kX.js} +1 -1
  20. package/react/{Bapcqp4F.js → Bulxmri6.js} +1 -1
  21. package/react/{BwEsOb-a.js → C3Sk865v.js} +1 -1
  22. package/react/{CYbJ6bRp.js → C7YJuZC4.js} +1 -1
  23. package/react/{BEIMVXce.js → CQ7i2nQ5.js} +1 -1
  24. package/react/{C_9PY7vE.js → CVnesZFm.js} +1 -1
  25. package/react/{CyJWq9By.js → CeYyoPwz.js} +1 -1
  26. package/react/{Duf5RJxW.js → Cobm3-vX.js} +1 -1
  27. package/react/{BThgwgb_.js → CtqknzON.js} +1 -1
  28. package/react/{Bnkr0Z4y.js → CzWQYPHX.js} +1 -1
  29. package/react/{Bk3JskRK.js → D1f3o_1K.js} +1 -1
  30. package/react/{D7JKGoQw.js → D6uUtYXQ.js} +1 -1
  31. package/react/{CcPyMwrs.js → DKg-Zm_D.js} +1 -1
  32. package/react/{WunIuttE.js → DLlny8rV.js} +2 -2
  33. package/react/{CjHoekc1.js → DN5LeJCD.js} +1 -1
  34. package/react/{MNB4ozTH.js → DcO7mt_p.js} +1 -1
  35. package/react/{ChFuxCAE.js → Dhqp1yUa.js} +1 -1
  36. package/react/{BJ9620xV.js → DinOaFKZ.js} +1 -1
  37. package/react/{CUne3-BJ.js → EgFe-Bkh.js} +1 -1
  38. package/react/{43kpLsy9.js → _MLx_tvJ.js} +1 -1
  39. package/react/index.cjs +1 -1
  40. package/react/index.d.ts +0 -3
  41. package/react/index.mjs +182 -183
  42. package/react/{Ca-5MYll.js → ngxwwooK.js} +1 -1
  43. package/react/{Dm11BEyQ.js → vKxr3qjL.js} +1 -1
  44. package/umd/web.umd.js +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ # [2.6.0-beta.1](https://github.com/qrati-labs/qrati-connect-ts/compare/v2.5.4-beta.1...v2.6.0-beta.1) (2026-03-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add comment for clarity in ReactRouterRoutes component ([2be72ef](https://github.com/qrati-labs/qrati-connect-ts/commit/2be72efc762e208f434ce83efb58c0b9fbedf75e))
7
+
8
+
9
+ ### Features
10
+
11
+ * add DescriptionWithSeeMore component and integrate into EventHeader; update example subproject commits and enhance styles ([1507e80](https://github.com/qrati-labs/qrati-connect-ts/commit/1507e80d1de9ee0709f9c69cb196f8e7325ccf9e))
12
+
13
+ ## [2.5.4-beta.1](https://github.com/qrati-labs/qrati-connect-ts/compare/v2.5.3...v2.5.4-beta.1) (2026-03-24)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * add checkout step for release branch and cleanup bootstrap tag script ([14a25eb](https://github.com/qrati-labs/qrati-connect-ts/commit/14a25eb94b83d1c7f5ac5560c497e9664f61da45))
19
+ * add step to sync local branch with remote in release workflow ([3153c70](https://github.com/qrati-labs/qrati-connect-ts/commit/3153c704c5fe372afa49c6f4869e9653476d4e60))
20
+
1
21
  ## [2.5.4-beta.1](https://github.com/qrati-labs/qrati-connect-ts/compare/v2.5.3...v2.5.4-beta.1) (2026-03-24)
2
22
 
3
23
 
package/README.md CHANGED
@@ -76,9 +76,15 @@ Add the following script and stylesheet tags to your HTML:
76
76
 
77
77
  Once imported, you can use the custom element tag `<qrati-connect>` in your HTML:
78
78
 
79
- ```html
80
- <qrati-connect router="hash" organization-id="your-organization-id" />
81
- ```
79
+ | Prop / Attribute | Type | Default | Description |
80
+ | ------------------- | ------------------------ | ---------- | -------------------------------------- |
81
+ | `organizationId` \* | `string` | — | Your Qrati organization ID (required) |
82
+ | `router` | `'memory' \| 'hash'` | `'memory'` | Routing strategy for navigation |
83
+ | `uid` | `string` | — | Pre-authenticated user ID |
84
+ | `fname` | `string` | — | Pre-authenticated user first name |
85
+ | `lname` | `string` | — | Pre-authenticated user last name |
86
+ | `theme` | `'light' \| 'dark'` | `'light'` | Color scheme |
87
+ | `onError` | `(error: Error) => void` | — | Error callback for handling SDK errors |
82
88
 
83
89
  Note: When using the Web Component version, props are passed as HTML attributes with kebab-case naming (e.g., `organization-id` instead of `organizationId`).
84
90
 
@@ -1 +1 @@
1
- import{r as t}from"./2R3GoXB1.js";import{Mt as o,N as r,Nt as n,j as e,wt as a}from"./DCJdY3Ql.js";import{t as i}from"./drbka-O1.js";import{o as s}from"./DxGircco.js";import{t as c}from"./Dd8sghd-.js";var l=new i,p=(t,o)=>{n(/* @__PURE__ */r(e,{client:l,children:/* @__PURE__ */r(s,{children:/* @__PURE__ */r(c,{event:t})})}),o)},m=({events:n})=>{const e=a(null),i=a(null);return o(()=>{if(!e.current||i.current)return;let o;return(async()=>{const r=await import("./ZShDCNL_.js").then(o=>/* @__PURE__ */t(o.default,1));if(await Promise.resolve({ }),!e.current)return;const a=r.map(e.current,{center:[20,0],zoom:2,zoomControl:!0,worldCopyJump:!0});r.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"&copy; OpenStreetMap contributors",maxZoom:19}).addTo(a),i.current=a;const s=n.filter(t=>"number"==typeof t.location?.x&&"number"==typeof t.location?.y);if(s.length>0){const t=r.latLngBounds([]);for(const o of s){const n=o.location.x,e=o.location.y;t.extend([e,n]);const i=r.divIcon({className:"qrati-leaflet-marker-wrapper",html:'\n <div style="\n width: 28px;\n height: 28px;\n cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n "></div>\n ',iconSize:[28,28],iconAnchor:[14,28],popupAnchor:[0,-28]}),s=r.marker([e,n],{icon:i}).addTo(a),c=document.createElement("div");p(o,c),s.bindPopup(c,{closeButton:!0,maxWidth:220})}t.isValid()&&a.fitBounds(t,{padding:[60,60],maxZoom:14})}o=()=>{a.remove(),i.current=null}})(),()=>{o?.()}},[n]),/* @__PURE__ */r("div",{ref:e,class:"size-full"})};export{m as default};
1
+ import{r as t}from"./2R3GoXB1.js";import{Mt as o,N as r,Nt as n,j as e,wt as a}from"./DAc8-Vq0.js";import{t as i}from"./Cpc6Qhgr.js";import{o as s}from"./Khpj7noG.js";import{t as c}from"./CCKM4kEF.js";var l=new i,p=(t,o)=>{n(/* @__PURE__ */r(e,{client:l,children:/* @__PURE__ */r(s,{children:/* @__PURE__ */r(c,{event:t})})}),o)},m=({events:n})=>{const e=a(null),i=a(null);return o(()=>{if(!e.current||i.current)return;let o;return(async()=>{const r=await import("./ZShDCNL_.js").then(o=>/* @__PURE__ */t(o.default,1));if(await Promise.resolve({ }),!e.current)return;const a=r.map(e.current,{center:[20,0],zoom:2,zoomControl:!0,worldCopyJump:!0});r.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"&copy; OpenStreetMap contributors",maxZoom:19}).addTo(a),i.current=a;const s=n.filter(t=>"number"==typeof t.location?.x&&"number"==typeof t.location?.y);if(s.length>0){const t=r.latLngBounds([]);for(const o of s){const n=o.location.x,e=o.location.y;t.extend([e,n]);const i=r.divIcon({className:"qrati-leaflet-marker-wrapper",html:'\n <div style="\n width: 28px;\n height: 28px;\n cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n "></div>\n ',iconSize:[28,28],iconAnchor:[14,28],popupAnchor:[0,-28]}),s=r.marker([e,n],{icon:i}).addTo(a),c=document.createElement("div");p(o,c),s.bindPopup(c,{closeButton:!0,maxWidth:220})}t.isValid()&&a.fitBounds(t,{padding:[60,60],maxZoom:14})}o=()=>{a.remove(),i.current=null}})(),()=>{o?.()}},[n]),/* @__PURE__ */r("div",{ref:e,class:"size-full"})};export{m as default};
@@ -1 +1 @@
1
- import{r as e}from"./2R3GoXB1.js";import{Mt as t,N as n,Nt as r,j as o,wt as i}from"./DCJdY3Ql.js";import{t as a}from"./drbka-O1.js";import{o as s}from"./DxGircco.js";import{t as l}from"./Dd8sghd-.js";var c=new a,u=(e,t)=>{r(/* @__PURE__ */n(o,{client:c,children:/* @__PURE__ */n(s,{children:/* @__PURE__ */n(l,{event:e})})}),t)},d=({events:r,apiKey:o,is3D:a})=>{const s=i(null),l=i(null),c=i(a);return t(()=>{if(!s.current||l.current)return;let t;return(async()=>{const n=(await import("./Ccwm5LwS.js").then(t=>/* @__PURE__ */e(t.default,1))).default;if(await Promise.resolve({ }),!s.current)return;n.accessToken=o;const i=new n.Map({container:s.current,style:"mapbox://styles/mapbox/streets-v12",center:[0,20],zoom:2,pitch:c.current?60:0,bearing:c.current?-20:0,antialias:!0});l.current=i,i.on("style.load",()=>{i.getLayer("3d-buildings")||i.addLayer({id:"3d-buildings",source:"composite","source-layer":"building",filter:["==","extrude","true"],type:"fill-extrusion",minzoom:14,paint:{"fill-extrusion-color":"#aaa","fill-extrusion-height":["interpolate",["linear"],["zoom"],14,0,14.05,["get","height"]],"fill-extrusion-base":["interpolate",["linear"],["zoom"],14,0,14.05,["get","min_height"]],"fill-extrusion-opacity":.6}})}),i.on("load",()=>{const e=r.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(0===e.length)return;const t=new n.LngLatBounds;for(const r of e){const e=r.location.x,o=r.location.y;t.extend([e,o]);const a=document.createElement("div");a.style.cssText="\n width: 28px; height: 28px; cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n ";const s=document.createElement("div");u(r,s);const l=new n.Popup({closeButton:!0,closeOnClick:!1,maxWidth:"none",offset:[0,-20]}).setDOMContent(s);new n.Marker({element:a}).setLngLat([e,o]).setPopup(l).addTo(i)}t.isEmpty()||i.fitBounds(t,{padding:60,maxZoom:14,duration:1200})}),t=()=>{i.remove(),l.current=null}})(),()=>{t?.()}},[o]),t(()=>{l.current&&(c.current=a,l.current.easeTo({pitch:a?60:0,bearing:a?-20:0,duration:800}))},[a]),/* @__PURE__ */n("div",{ref:s,class:"size-full"})};export{d as default};
1
+ import{r as e}from"./2R3GoXB1.js";import{Mt as t,N as n,Nt as r,j as o,wt as i}from"./DAc8-Vq0.js";import{t as a}from"./Cpc6Qhgr.js";import{o as s}from"./Khpj7noG.js";import{t as l}from"./CCKM4kEF.js";var c=new a,u=(e,t)=>{r(/* @__PURE__ */n(o,{client:c,children:/* @__PURE__ */n(s,{children:/* @__PURE__ */n(l,{event:e})})}),t)},d=({events:r,apiKey:o,is3D:a})=>{const s=i(null),l=i(null),c=i(a);return t(()=>{if(!s.current||l.current)return;let t;return(async()=>{const n=(await import("./Ccwm5LwS.js").then(t=>/* @__PURE__ */e(t.default,1))).default;if(await Promise.resolve({ }),!s.current)return;n.accessToken=o;const i=new n.Map({container:s.current,style:"mapbox://styles/mapbox/streets-v12",center:[0,20],zoom:2,pitch:c.current?60:0,bearing:c.current?-20:0,antialias:!0});l.current=i,i.on("style.load",()=>{i.getLayer("3d-buildings")||i.addLayer({id:"3d-buildings",source:"composite","source-layer":"building",filter:["==","extrude","true"],type:"fill-extrusion",minzoom:14,paint:{"fill-extrusion-color":"#aaa","fill-extrusion-height":["interpolate",["linear"],["zoom"],14,0,14.05,["get","height"]],"fill-extrusion-base":["interpolate",["linear"],["zoom"],14,0,14.05,["get","min_height"]],"fill-extrusion-opacity":.6}})}),i.on("load",()=>{const e=r.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(0===e.length)return;const t=new n.LngLatBounds;for(const r of e){const e=r.location.x,o=r.location.y;t.extend([e,o]);const a=document.createElement("div");a.style.cssText="\n width: 28px; height: 28px; cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n ";const s=document.createElement("div");u(r,s);const l=new n.Popup({closeButton:!0,closeOnClick:!1,maxWidth:"none",offset:[0,-20]}).setDOMContent(s);new n.Marker({element:a}).setLngLat([e,o]).setPopup(l).addTo(i)}t.isEmpty()||i.fitBounds(t,{padding:60,maxZoom:14,duration:1200})}),t=()=>{i.remove(),l.current=null}})(),()=>{t?.()}},[o]),t(()=>{l.current&&(c.current=a,l.current.easeTo({pitch:a?60:0,bearing:a?-20:0,duration:800}))},[a]),/* @__PURE__ */n("div",{ref:s,class:"size-full"})};export{d as default};
@@ -1,3 +1,3 @@
1
- import{Dt as e,Mt as l,N as t,T as r,wt as n}from"./DCJdY3Ql.js";import{p as s,t as a}from"./DxGircco.js";var i=({event:i})=>{const o=s(),[c,d]=e(0),u=n(null),h=(i.contents??[]).filter(e=>e.thumbnailUrl||e.url);return l(()=>{if(!(h.length<=1))return u.current=setInterval(()=>{d(e=>(e+1)%h.length)},3e3),()=>{u.current&&clearInterval(u.current)}},[h.length]),/* @__PURE__ */t("div",{class:"w-44 overflow-hidden",children:[h.length>0?/* @__PURE__ */t("div",{class:"relative h-28 w-full overflow-hidden",children:[/* @__PURE__ */t(a,{src:h[c]?.thumbnailUrl||h[c]?.url,blurhash:h[c]?.blurHash,containerClassName:"size-full",imgClassName:"rounded-none"}),h.length>1&&/* @__PURE__ */t("div",{class:"absolute right-0 bottom-1.5 left-0 flex justify-center gap-1",children:h.map((e,l)=>/* @__PURE__ */t("button",{onClick:()=>d(l),class:"size-1.5 rounded-full transition-all "+(l===c?"bg-white":"bg-white/50"),"aria-label":`Go to image ${l+1}`},l))})]}):/* @__PURE__ */t("div",{class:"bg-muted flex h-28 w-full items-center justify-center",children:/* @__PURE__ */t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:/* @__PURE__ */t("path",{d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M9 12.75a2.25 2.25 0 100-4.5 2.25 2.25 0 000 4.5z"})})}),/* @__PURE__ */t("div",{class:"",children:[
1
+ import{Dt as e,Mt as l,N as t,T as r,wt as n}from"./DAc8-Vq0.js";import{p as s,t as a}from"./Khpj7noG.js";var i=({event:i})=>{const o=s(),[c,d]=e(0),u=n(null),h=(i.contents??[]).filter(e=>e.thumbnailUrl||e.url);return l(()=>{if(!(h.length<=1))return u.current=setInterval(()=>{d(e=>(e+1)%h.length)},3e3),()=>{u.current&&clearInterval(u.current)}},[h.length]),/* @__PURE__ */t("div",{class:"w-44 overflow-hidden",children:[h.length>0?/* @__PURE__ */t("div",{class:"relative h-28 w-full overflow-hidden",children:[/* @__PURE__ */t(a,{src:h[c]?.thumbnailUrl||h[c]?.url,blurhash:h[c]?.blurHash,containerClassName:"size-full",imgClassName:"rounded-none"}),h.length>1&&/* @__PURE__ */t("div",{class:"absolute right-0 bottom-1.5 left-0 flex justify-center gap-1",children:h.map((e,l)=>/* @__PURE__ */t("button",{onClick:()=>d(l),class:"size-1.5 rounded-full transition-all "+(l===c?"bg-white":"bg-white/50"),"aria-label":`Go to image ${l+1}`},l))})]}):/* @__PURE__ */t("div",{class:"bg-muted flex h-28 w-full items-center justify-center",children:/* @__PURE__ */t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:/* @__PURE__ */t("path",{d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M9 12.75a2.25 2.25 0 100-4.5 2.25 2.25 0 000 4.5z"})})}),/* @__PURE__ */t("div",{class:"",children:[
2
2
  /* @__PURE__ */t("p",{class:"line-clamp-2 text-sm leading-tight font-medium",children:i.name}),i.location?.label&&/* @__PURE__ */t("p",{class:"text-foreground line-clamp-1 text-xs",children:i.location.label}),
3
3
  /* @__PURE__ */t("button",{onClick:()=>{o(r.GALLERY(i.slug))},class:"bg-background text-foreground mt-2 w-full rounded py-1 text-xs font-medium transition-opacity hover:opacity-90",children:"Explore"})]})]})};export{i as t};
@@ -1 +1 @@
1
- import{$ as t,Ct as e,J as s,Q as i,St as a,X as r,Z as n,at as o,ct as u,dt as h,ft as c,gt as l,it as d,nt as f,ot as y,pt as p,rt as m,st as g,ut as v,yt as b}from"./DCJdY3Ql.js";function q(t){return{onFetch:(e,s)=>{const i=e.options,a=e.fetchOptions?.meta?.fetchMore?.direction,r=e.state.data?.pages||[],n=e.state.data?.pageParams||[];let u={pages:[],pageParams:[]},h=0;const c=async()=>{let s=!1;const c=o(e.options,e.fetchOptions),l=async(t,i,a)=>{if(s)return Promise.reject();if(null==i&&t.pages.length)return Promise.resolve(t);const r=await c((()=>{const t={client:e.client,queryKey:e.queryKey,pageParam:i,direction:a?"backward":"forward",meta:e.options.meta};return f(t,()=>e.signal,()=>s=!0),t})()),{maxPages:n}=e.options,o=a?d:m;return{pages:o(t.pages,r,n),pageParams:o(t.pageParams,i,n)}};if(a&&r.length){const t="backward"===a,e=t?P:C,s={pages:r,pageParams:n};u=await l(s,e(i,s),t)}else{const e=t??r.length;do{const t=0===h?n[0]??i.initialPageParam:C(i,u);if(h>0&&null==t)break;u=await l(u,t),h++}while(h<e)}return u};e.options.persister?e.fetchFn=()=>e.options.persister?.(c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=c}}}function C(t,{pages:e,pageParams:s}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}function P(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}function O(t,e){return!!e&&null!=C(t,e)}function w(t,e){return!(!e||!t.getPreviousPageParam)&&null!=P(t,e)}var Q=class extends r{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#a({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=n({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(/* @__PURE__ */new Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const i="pending"===this.state.status,a=!this.#i.canStart();try{if(i)e();else{this.#a({type:"pending",variables:t,isPaused:a}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);const e=await(this.options.onMutate?.(t,s));e!==this.state.context&&this.#a({type:"pending",context:e,variables:t,isPaused:a})}const r=await this.#i.start();return await(this.#s.config.onSuccess?.(r,t,this.state.context,this,s)),await(this.options.onSuccess?.(r,t,this.state.context,s)),await(this.#s.config.onSettled?.(r,null,this.state.variables,this.state.context,this,s)),await(this.options.onSettled?.(r,null,t,this.state.context,s)),this.#a({type:"success",data:r}),r}catch(r){try{await(this.#s.config.onError?.(r,t,this.state.context,this,s))}catch(o){Promise.reject(o)}try{await(this.options.onError?.(r,t,this.state.context,s))}catch(o){Promise.reject(o)}try{await(this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,s))}catch(o){Promise.reject(o)}try{await(this.options.onSettled?.(void 0,r,t,this.state.context,s))}catch(o){Promise.reject(o)}throw this.#a({type:"error",error:r}),r}finally{this.#s.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}},D=class extends e{constructor(t={}){super(),this.config=t,this.#r=/* @__PURE__ */new Set,this.#n=/* @__PURE__ */new Map,this.#o=0}#r;#n;#o;build(t,e,s){const i=new Q({client:t,mutationCache:this,mutationId:++this.#o,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#r.add(t);const e=x(t);if("string"==typeof e){const s=this.#n.get(e);s?s.push(t):this.#n.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#r.delete(t)){const e=x(t);if("string"==typeof e){const s=this.#n.get(e);if(s)if(s.length>1){const e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#n.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=x(t);if("string"==typeof e){const s=this.#n.get(e)?.find(t=>"pending"===t.state.status);return!s||s===t}return!0}runNext(t){const e=x(t);return"string"==typeof e?(this.#n.get(e)?.find(e=>e!==t&&e.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){t.batch(()=>{this.#r.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#r.clear(),this.#n.clear()})}getAll(){return Array.from(this.#r)}find(t){const e={exact:!0,...t};return this.getAll().find(t=>v(e,t))}findAll(t={}){return this.getAll().filter(e=>v(t,e))}notify(e){t.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return t.batch(()=>Promise.all(e.map(t=>t.continue().catch(c))))}};function x(t){return t.options.scope?.id}var M=class extends e{constructor(t={}){super(),this.config=t,this.#u=/* @__PURE__ */new Map}#u;build(t,e,i){const a=e.queryKey,r=e.queryHash??u(a,e);let n=this.get(r);return n||(n=new s({client:t,queryKey:a,queryHash:r,options:t.defaultQueryOptions(e),state:i,defaultOptions:t.getQueryDefaults(a)}),this.add(n)),n}add(t){this.#u.has(t.queryHash)||(this.#u.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#u.get(t.queryHash);e&&(t.destroy(),e===t&&this.#u.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){t.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#u.get(t)}getAll(){return[...this.#u.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(t=>h(e,t))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(e=>h(t,e)):e}notify(e){t.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){t.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){t.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},A=class{#h;#s;#c;#l;#d;#f;#y;#p;constructor(t={}){this.#h=t.queryCache||new M,this.#s=t.mutationCache||new D,this.#c=t.defaultOptions||{},this.#l=/* @__PURE__ */new Map,this.#d=/* @__PURE__ */new Map,this.#f=0}mount(){this.#f++,1===this.#f&&(this.#y=a.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onFocus())}),this.#p=i.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onOnline())}))}unmount(){this.#f--,0===this.#f&&(this.#y?.(),this.#y=void 0,this.#p?.(),this.#p=void 0)}isFetching(t){return this.#h.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#s.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#h.build(this,e),i=s.state.data;return void 0===i?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(l(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#h.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,s){const i=this.defaultQueryOptions({queryKey:t}),a=this.#h.get(i.queryHash)?.state.data,r=y(e,a);if(void 0!==r)return this.#h.build(this,i).setData(r,{...s,manual:!0})}setQueriesData(e,s,i){return t.batch(()=>this.#h.findAll(e).map(({queryKey:t})=>[t,this.setQueryData(t,s,i)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state}removeQueries(e){const s=this.#h;t.batch(()=>{s.findAll(e).forEach(t=>{s.remove(t)})})}resetQueries(e,s){const i=this.#h;return t.batch(()=>(i.findAll(e).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...e},s)))}cancelQueries(e,s={}){const i={revert:!0,...s},a=t.batch(()=>this.#h.findAll(e).map(t=>t.cancel(i)));return Promise.all(a).then(c).catch(c)}invalidateQueries(e,s={}){return t.batch(()=>(this.#h.findAll(e).forEach(t=>{t.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},s)))}refetchQueries(e,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},a=t.batch(()=>this.#h.findAll(e).filter(t=>!t.isDisabled()&&!t.isStatic()).map(t=>{let e=t.fetch(void 0,i);return i.throwOnError||(e=e.catch(c)),"paused"===t.state.fetchStatus?Promise.resolve():e}));return Promise.all(a).then(c)}fetchQuery(t){const e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);const s=this.#h.build(this,e);return s.isStaleByTime(l(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(c).catch(c)}fetchInfiniteQuery(t){return t.behavior=q(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(c).catch(c)}ensureInfiniteQueryData(t){return t.behavior=q(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return i.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#h}getMutationCache(){return this.#s}getDefaultOptions(){return this.#c}setDefaultOptions(t){this.#c=t}setQueryDefaults(t,e){this.#l.set(g(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#l.values()],s={};return e.forEach(e=>{p(t,e.queryKey)&&Object.assign(s,e.defaultOptions)}),s}setMutationDefaults(t,e){this.#d.set(g(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#d.values()],s={};return e.forEach(e=>{p(t,e.mutationKey)&&Object.assign(s,e.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#c.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=u(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===b&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#c.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#h.clear(),this.#s.clear()}};export{q as i,O as n,w as r,A as t};
1
+ import{$ as t,Ct as e,J as s,Q as i,St as a,X as r,Z as n,at as o,ct as u,dt as h,ft as c,gt as l,it as d,nt as f,ot as y,pt as p,rt as m,st as g,ut as v,yt as b}from"./DAc8-Vq0.js";function q(t){return{onFetch:(e,s)=>{const i=e.options,a=e.fetchOptions?.meta?.fetchMore?.direction,r=e.state.data?.pages||[],n=e.state.data?.pageParams||[];let u={pages:[],pageParams:[]},h=0;const c=async()=>{let s=!1;const c=o(e.options,e.fetchOptions),l=async(t,i,a)=>{if(s)return Promise.reject();if(null==i&&t.pages.length)return Promise.resolve(t);const r=await c((()=>{const t={client:e.client,queryKey:e.queryKey,pageParam:i,direction:a?"backward":"forward",meta:e.options.meta};return f(t,()=>e.signal,()=>s=!0),t})()),{maxPages:n}=e.options,o=a?d:m;return{pages:o(t.pages,r,n),pageParams:o(t.pageParams,i,n)}};if(a&&r.length){const t="backward"===a,e=t?P:C,s={pages:r,pageParams:n};u=await l(s,e(i,s),t)}else{const e=t??r.length;do{const t=0===h?n[0]??i.initialPageParam:C(i,u);if(h>0&&null==t)break;u=await l(u,t),h++}while(h<e)}return u};e.options.persister?e.fetchFn=()=>e.options.persister?.(c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=c}}}function C(t,{pages:e,pageParams:s}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}function P(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}function O(t,e){return!!e&&null!=C(t,e)}function w(t,e){return!(!e||!t.getPreviousPageParam)&&null!=P(t,e)}var Q=class extends r{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#a({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=n({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(/* @__PURE__ */new Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const i="pending"===this.state.status,a=!this.#i.canStart();try{if(i)e();else{this.#a({type:"pending",variables:t,isPaused:a}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);const e=await(this.options.onMutate?.(t,s));e!==this.state.context&&this.#a({type:"pending",context:e,variables:t,isPaused:a})}const r=await this.#i.start();return await(this.#s.config.onSuccess?.(r,t,this.state.context,this,s)),await(this.options.onSuccess?.(r,t,this.state.context,s)),await(this.#s.config.onSettled?.(r,null,this.state.variables,this.state.context,this,s)),await(this.options.onSettled?.(r,null,t,this.state.context,s)),this.#a({type:"success",data:r}),r}catch(r){try{await(this.#s.config.onError?.(r,t,this.state.context,this,s))}catch(o){Promise.reject(o)}try{await(this.options.onError?.(r,t,this.state.context,s))}catch(o){Promise.reject(o)}try{await(this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,s))}catch(o){Promise.reject(o)}try{await(this.options.onSettled?.(void 0,r,t,this.state.context,s))}catch(o){Promise.reject(o)}throw this.#a({type:"error",error:r}),r}finally{this.#s.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}},D=class extends e{constructor(t={}){super(),this.config=t,this.#r=/* @__PURE__ */new Set,this.#n=/* @__PURE__ */new Map,this.#o=0}#r;#n;#o;build(t,e,s){const i=new Q({client:t,mutationCache:this,mutationId:++this.#o,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#r.add(t);const e=x(t);if("string"==typeof e){const s=this.#n.get(e);s?s.push(t):this.#n.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#r.delete(t)){const e=x(t);if("string"==typeof e){const s=this.#n.get(e);if(s)if(s.length>1){const e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#n.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=x(t);if("string"==typeof e){const s=this.#n.get(e)?.find(t=>"pending"===t.state.status);return!s||s===t}return!0}runNext(t){const e=x(t);return"string"==typeof e?(this.#n.get(e)?.find(e=>e!==t&&e.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){t.batch(()=>{this.#r.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#r.clear(),this.#n.clear()})}getAll(){return Array.from(this.#r)}find(t){const e={exact:!0,...t};return this.getAll().find(t=>v(e,t))}findAll(t={}){return this.getAll().filter(e=>v(t,e))}notify(e){t.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return t.batch(()=>Promise.all(e.map(t=>t.continue().catch(c))))}};function x(t){return t.options.scope?.id}var M=class extends e{constructor(t={}){super(),this.config=t,this.#u=/* @__PURE__ */new Map}#u;build(t,e,i){const a=e.queryKey,r=e.queryHash??u(a,e);let n=this.get(r);return n||(n=new s({client:t,queryKey:a,queryHash:r,options:t.defaultQueryOptions(e),state:i,defaultOptions:t.getQueryDefaults(a)}),this.add(n)),n}add(t){this.#u.has(t.queryHash)||(this.#u.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#u.get(t.queryHash);e&&(t.destroy(),e===t&&this.#u.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){t.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#u.get(t)}getAll(){return[...this.#u.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(t=>h(e,t))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(e=>h(t,e)):e}notify(e){t.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){t.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){t.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},A=class{#h;#s;#c;#l;#d;#f;#y;#p;constructor(t={}){this.#h=t.queryCache||new M,this.#s=t.mutationCache||new D,this.#c=t.defaultOptions||{},this.#l=/* @__PURE__ */new Map,this.#d=/* @__PURE__ */new Map,this.#f=0}mount(){this.#f++,1===this.#f&&(this.#y=a.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onFocus())}),this.#p=i.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onOnline())}))}unmount(){this.#f--,0===this.#f&&(this.#y?.(),this.#y=void 0,this.#p?.(),this.#p=void 0)}isFetching(t){return this.#h.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#s.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#h.build(this,e),i=s.state.data;return void 0===i?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(l(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#h.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,s){const i=this.defaultQueryOptions({queryKey:t}),a=this.#h.get(i.queryHash)?.state.data,r=y(e,a);if(void 0!==r)return this.#h.build(this,i).setData(r,{...s,manual:!0})}setQueriesData(e,s,i){return t.batch(()=>this.#h.findAll(e).map(({queryKey:t})=>[t,this.setQueryData(t,s,i)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state}removeQueries(e){const s=this.#h;t.batch(()=>{s.findAll(e).forEach(t=>{s.remove(t)})})}resetQueries(e,s){const i=this.#h;return t.batch(()=>(i.findAll(e).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...e},s)))}cancelQueries(e,s={}){const i={revert:!0,...s},a=t.batch(()=>this.#h.findAll(e).map(t=>t.cancel(i)));return Promise.all(a).then(c).catch(c)}invalidateQueries(e,s={}){return t.batch(()=>(this.#h.findAll(e).forEach(t=>{t.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},s)))}refetchQueries(e,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},a=t.batch(()=>this.#h.findAll(e).filter(t=>!t.isDisabled()&&!t.isStatic()).map(t=>{let e=t.fetch(void 0,i);return i.throwOnError||(e=e.catch(c)),"paused"===t.state.fetchStatus?Promise.resolve():e}));return Promise.all(a).then(c)}fetchQuery(t){const e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);const s=this.#h.build(this,e);return s.isStaleByTime(l(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(c).catch(c)}fetchInfiniteQuery(t){return t.behavior=q(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(c).catch(c)}ensureInfiniteQueryData(t){return t.behavior=q(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return i.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#h}getMutationCache(){return this.#s}getDefaultOptions(){return this.#c}setDefaultOptions(t){this.#c=t}setQueryDefaults(t,e){this.#l.set(g(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#l.values()],s={};return e.forEach(e=>{p(t,e.queryKey)&&Object.assign(s,e.defaultOptions)}),s}setMutationDefaults(t,e){this.#d.set(g(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#d.values()],s={};return e.forEach(e=>{p(t,e.mutationKey)&&Object.assign(s,e.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#c.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=u(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===b&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#c.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#h.clear(),this.#s.clear()}};export{q as i,O as n,w as r,A as t};