@shapio/cms 0.5.6 → 0.5.7
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.
- package/dist/admin/assets/{AssetTile-_qRYsivK.js → AssetTile-H0hABhB2.js} +2 -2
- package/dist/admin/assets/{AssetTile-_qRYsivK.js.map → AssetTile-H0hABhB2.js.map} +1 -1
- package/dist/admin/assets/AssistError-1s3PuY0X.js +2 -0
- package/dist/admin/assets/{AssistError-CMXQWiQo.js.map → AssistError-1s3PuY0X.js.map} +1 -1
- package/dist/admin/assets/{BlockMenuItems-WIrbyv1a.js → BlockMenuItems-a8zXdfcF.js} +2 -2
- package/dist/admin/assets/{BlockMenuItems-WIrbyv1a.js.map → BlockMenuItems-a8zXdfcF.js.map} +1 -1
- package/dist/admin/assets/Body-BzZD-TZT.js +2 -0
- package/dist/admin/assets/{Body-BYc1IVsQ.js.map → Body-BzZD-TZT.js.map} +1 -1
- package/dist/admin/assets/Builder-60jO_nbS.js +2 -0
- package/dist/admin/assets/Builder-60jO_nbS.js.map +1 -0
- package/dist/admin/assets/{CodeEditor-NMvrWgxT.js → CodeEditor-BLbJZE9v.js} +2 -2
- package/dist/admin/assets/{CodeEditor-NMvrWgxT.js.map → CodeEditor-BLbJZE9v.js.map} +1 -1
- package/dist/admin/assets/{CopyButton-B0RuxynJ.js → CopyButton-BOtR_h1H.js} +2 -2
- package/dist/admin/assets/{CopyButton-B0RuxynJ.js.map → CopyButton-BOtR_h1H.js.map} +1 -1
- package/dist/admin/assets/{CursorPager-CQZsKNxR.js → CursorPager-DwLW13ov.js} +2 -2
- package/dist/admin/assets/{CursorPager-CQZsKNxR.js.map → CursorPager-DwLW13ov.js.map} +1 -1
- package/dist/admin/assets/{ExternalLink-BNq7nAYL.js → ExternalLink-BITMgS1K.js} +2 -2
- package/dist/admin/assets/{ExternalLink-BNq7nAYL.js.map → ExternalLink-BITMgS1K.js.map} +1 -1
- package/dist/admin/assets/{FocalPoint-BYu2fOTb.js → FocalPoint-n-a_AXKN.js} +2 -2
- package/dist/admin/assets/{FocalPoint-BYu2fOTb.js.map → FocalPoint-n-a_AXKN.js.map} +1 -1
- package/dist/admin/assets/Form-D_4fhOy0.js +2 -0
- package/dist/admin/assets/Form-D_4fhOy0.js.map +1 -0
- package/dist/admin/assets/{FormCheckboxGroup-Bz8KERs1.js → FormCheckboxGroup-1fYisXrr.js} +2 -2
- package/dist/admin/assets/FormCheckboxGroup-1fYisXrr.js.map +1 -0
- package/dist/admin/assets/{FormRadioGroup-c-wyx7dq.js → FormRadioGroup-B0VZyb1t.js} +2 -2
- package/dist/admin/assets/{FormRadioGroup-c-wyx7dq.js.map → FormRadioGroup-B0VZyb1t.js.map} +1 -1
- package/dist/admin/assets/{FormSelectField-ijG9qPpb.js → FormSelectField-Br8bkwRF.js} +2 -2
- package/dist/admin/assets/{FormSelectField-ijG9qPpb.js.map → FormSelectField-Br8bkwRF.js.map} +1 -1
- package/dist/admin/assets/{FormSwitchField-Bp3hNpeP.js → FormSwitchField-d8G-YCSX.js} +2 -2
- package/dist/admin/assets/{FormSwitchField-Bp3hNpeP.js.map → FormSwitchField-d8G-YCSX.js.map} +1 -1
- package/dist/admin/assets/{FormTextareaField-BSKMqHcW.js → FormTextareaField-BSKNeTPW.js} +2 -2
- package/dist/admin/assets/{FormTextareaField-BSKMqHcW.js.map → FormTextareaField-BSKNeTPW.js.map} +1 -1
- package/dist/admin/assets/{HintedLabel-BrLH4NQW.js → HintedLabel-CiTDE112.js} +2 -2
- package/dist/admin/assets/{HintedLabel-BrLH4NQW.js.map → HintedLabel-CiTDE112.js.map} +1 -1
- package/dist/admin/assets/{InfoHint-Dyzyf59c.js → InfoHint-B3XcXtiN.js} +2 -2
- package/dist/admin/assets/{InfoHint-Dyzyf59c.js.map → InfoHint-B3XcXtiN.js.map} +1 -1
- package/dist/admin/assets/InlineConfirm-BfsNH5S_.js +2 -0
- package/dist/admin/assets/InlineConfirm-BfsNH5S_.js.map +1 -0
- package/dist/admin/assets/InsertMenuItem-BGwDW_Lu.js +2 -0
- package/dist/admin/assets/InsertMenuItem-BGwDW_Lu.js.map +1 -0
- package/dist/admin/assets/{LinkTabs-ByB2eCIr.js → LinkTabs-8SmS1vCd.js} +2 -2
- package/dist/admin/assets/{LinkTabs-ByB2eCIr.js.map → LinkTabs-8SmS1vCd.js.map} +1 -1
- package/dist/admin/assets/{Match-Bixf1ygj.js → Match-Dc8bXsKo.js} +2 -2
- package/dist/admin/assets/{Match-Bixf1ygj.js.map → Match-Dc8bXsKo.js.map} +1 -1
- package/dist/admin/assets/NoAccess-CKEKPmqD.js +2 -0
- package/dist/admin/assets/NoAccess-CKEKPmqD.js.map +1 -0
- package/dist/admin/assets/Panel-Bcl09TtM.js +2 -0
- package/dist/admin/assets/Panel-Bcl09TtM.js.map +1 -0
- package/dist/admin/assets/{QueryView--_vvV7dC.js → QueryView-KFtwko9F.js} +2 -2
- package/dist/admin/assets/{QueryView--_vvV7dC.js.map → QueryView-KFtwko9F.js.map} +1 -1
- package/dist/admin/assets/{RadioTile-BCp6auUz.js → RadioTile-CzfxWgHx.js} +2 -2
- package/dist/admin/assets/{RadioTile-BCp6auUz.js.map → RadioTile-CzfxWgHx.js.map} +1 -1
- package/dist/admin/assets/{RichTextField-fWNjndUc.js → RichTextField-BsBoOAP-.js} +5 -5
- package/dist/admin/assets/{RichTextField-fWNjndUc.js.map → RichTextField-BsBoOAP-.js.map} +1 -1
- package/dist/admin/assets/{RowTitle-B4CE8tt7.js → RowTitle-Cn5mAU58.js} +2 -2
- package/dist/admin/assets/{RowTitle-B4CE8tt7.js.map → RowTitle-Cn5mAU58.js.map} +1 -1
- package/dist/admin/assets/SecretReveal-BCOJAisI.js +2 -0
- package/dist/admin/assets/SecretReveal-BCOJAisI.js.map +1 -0
- package/dist/admin/assets/{SharedGlyph-71FTypoi.js → SharedGlyph-CA8tb7UH.js} +2 -2
- package/dist/admin/assets/{SharedGlyph-71FTypoi.js.map → SharedGlyph-CA8tb7UH.js.map} +1 -1
- package/dist/admin/assets/StepList-sriwGP1e.js +2 -0
- package/dist/admin/assets/StepList-sriwGP1e.js.map +1 -0
- package/dist/admin/assets/Structure-B2HZ9UZu.js +2 -0
- package/dist/admin/assets/{Structure-Dk87778W.js.map → Structure-B2HZ9UZu.js.map} +1 -1
- package/dist/admin/assets/{SubNavLink-CPJFIt1j.js → SubNavLink-CiCaVV8U.js} +2 -2
- package/dist/admin/assets/{SubNavLink-CPJFIt1j.js.map → SubNavLink-CiCaVV8U.js.map} +1 -1
- package/dist/admin/assets/{SuggestAltButton-CxS8IR6m.js → SuggestAltButton-CqDLAuoa.js} +2 -2
- package/dist/admin/assets/{SuggestAltButton-CxS8IR6m.js.map → SuggestAltButton-CqDLAuoa.js.map} +1 -1
- package/dist/admin/assets/{TextLink-DnrMaF2F.js → TextLink-HRn66VL1.js} +2 -2
- package/dist/admin/assets/{TextLink-DnrMaF2F.js.map → TextLink-HRn66VL1.js.map} +1 -1
- package/dist/admin/assets/Thumbnail-mFfESZiW.js +2 -0
- package/dist/admin/assets/Thumbnail-mFfESZiW.js.map +1 -0
- package/dist/admin/assets/UnsavedChangesGuard-C8cDQGEA.js +2 -0
- package/dist/admin/assets/UnsavedChangesGuard-C8cDQGEA.js.map +1 -0
- package/dist/admin/assets/{UserAvatar-D7IbSpsP.js → UserAvatar-BItYDTyH.js} +2 -2
- package/dist/admin/assets/{UserAvatar-D7IbSpsP.js.map → UserAvatar-BItYDTyH.js.map} +1 -1
- package/dist/admin/assets/auth-CQO4MBUj.js +2 -0
- package/dist/admin/assets/auth-CQO4MBUj.js.map +1 -0
- package/dist/admin/assets/badge-DNQwGXBl.js +2 -0
- package/dist/admin/assets/{badge-vLiQczOd.js.map → badge-DNQwGXBl.js.map} +1 -1
- package/dist/admin/assets/{boxes-D6Y4Cenx.js → boxes-CAygw8zF.js} +2 -2
- package/dist/admin/assets/{boxes-D6Y4Cenx.js.map → boxes-CAygw8zF.js.map} +1 -1
- package/dist/admin/assets/{calendar-clock-DFUgXWXg.js → calendar-clock-BZGtAvWR.js} +2 -2
- package/dist/admin/assets/{calendar-clock-DFUgXWXg.js.map → calendar-clock-BZGtAvWR.js.map} +1 -1
- package/dist/admin/assets/changeSets-EMTUJT0M.js +2 -0
- package/dist/admin/assets/changeSets-EMTUJT0M.js.map +1 -0
- package/dist/admin/assets/chevron-left-DGU3HGYG.js +2 -0
- package/dist/admin/assets/{chevron-left-CZXrLV99.js.map → chevron-left-DGU3HGYG.js.map} +1 -1
- package/dist/admin/assets/{circle-check-De27poaB.js → circle-check-C37MSJqX.js} +2 -2
- package/dist/admin/assets/{circle-check-De27poaB.js.map → circle-check-C37MSJqX.js.map} +1 -1
- package/dist/admin/assets/{clock-BGAXsuo4.js → clock-2arjsgZ4.js} +2 -2
- package/dist/admin/assets/{clock-BGAXsuo4.js.map → clock-2arjsgZ4.js.map} +1 -1
- package/dist/admin/assets/{constants-CKGh8uwT.js → constants-miV4q1ur.js} +2 -2
- package/dist/admin/assets/{constants-CKGh8uwT.js.map → constants-miV4q1ur.js.map} +1 -1
- package/dist/admin/assets/content-CgZS_S7P.js +3 -0
- package/dist/admin/assets/content-CgZS_S7P.js.map +1 -0
- package/dist/admin/assets/contentCounts-DP7YYeZZ.js +2 -0
- package/dist/admin/assets/{contentCounts-DknqJ4kh.js.map → contentCounts-DP7YYeZZ.js.map} +1 -1
- package/dist/admin/assets/{contentTypes-DzQ_0v36.js → contentTypes-CQsHL657.js} +2 -2
- package/dist/admin/assets/{contentTypes-DzQ_0v36.js.map → contentTypes-CQsHL657.js.map} +1 -1
- package/dist/admin/assets/context-IKYdzQJ-.js +2 -0
- package/dist/admin/assets/{context-fImO9k99.js.map → context-IKYdzQJ-.js.map} +1 -1
- package/dist/admin/assets/{copy-B5owk67M.js → copy-CsSRHgKZ.js} +2 -2
- package/dist/admin/assets/{copy-B5owk67M.js.map → copy-CsSRHgKZ.js.map} +1 -1
- package/dist/admin/assets/createLucideIcon-CLmh7Go-.js +2 -0
- package/dist/admin/assets/createLucideIcon-CLmh7Go-.js.map +1 -0
- package/dist/admin/assets/develop-9ZeAjSIw.js +11 -0
- package/dist/admin/assets/develop-9ZeAjSIw.js.map +1 -0
- package/dist/admin/assets/{dropdown-menu-CVAnm22s.js → dropdown-menu-0dyAtBEd.js} +2 -2
- package/dist/admin/assets/{dropdown-menu-CVAnm22s.js.map → dropdown-menu-0dyAtBEd.js.map} +1 -1
- package/dist/admin/assets/{ellipsis-BHtU4ov6.js → ellipsis-F91991on.js} +2 -2
- package/dist/admin/assets/{ellipsis-BHtU4ov6.js.map → ellipsis-F91991on.js.map} +1 -1
- package/dist/admin/assets/entryLink-CVB-TdIn.js +2 -0
- package/dist/admin/assets/entryLink-CVB-TdIn.js.map +1 -0
- package/dist/admin/assets/es2015-BJge4oQL.js +42 -0
- package/dist/admin/assets/es2015-BJge4oQL.js.map +1 -0
- package/dist/admin/assets/{external-link-nZp2VpKw.js → external-link-CdG6kHfA.js} +2 -2
- package/dist/admin/assets/{external-link-nZp2VpKw.js.map → external-link-CdG6kHfA.js.map} +1 -1
- package/dist/admin/assets/{field-Bg-JRgsB.js → field-C6NmRYUN.js} +2 -2
- package/dist/admin/assets/{field-Bg-JRgsB.js.map → field-C6NmRYUN.js.map} +1 -1
- package/dist/admin/assets/{file-stack-8rRouTJj.js → file-stack-28ZtO1xW.js} +2 -2
- package/dist/admin/assets/{file-stack-8rRouTJj.js.map → file-stack-28ZtO1xW.js.map} +1 -1
- package/dist/admin/assets/{fileRoute-DQCI1nMN.js → fileRoute-Bm90K4UY.js} +2 -2
- package/dist/admin/assets/{fileRoute-DQCI1nMN.js.map → fileRoute-Bm90K4UY.js.map} +1 -1
- package/dist/admin/assets/{folder-plus-B3L3b389.js → folder-plus-DIk0pWkP.js} +2 -2
- package/dist/admin/assets/{folder-plus-B3L3b389.js.map → folder-plus-DIk0pWkP.js.map} +1 -1
- package/dist/admin/assets/followPlural-DEr2kxEc.js +2 -0
- package/dist/admin/assets/followPlural-DEr2kxEc.js.map +1 -0
- package/dist/admin/assets/{globe-DKkjr9MZ.js → globe-DFr3Gd2w.js} +2 -2
- package/dist/admin/assets/{globe-DKkjr9MZ.js.map → globe-DFr3Gd2w.js.map} +1 -1
- package/dist/admin/assets/{image-B6aL7hP8.js → image-DT79QFa_.js} +2 -2
- package/dist/admin/assets/{image-B6aL7hP8.js.map → image-DT79QFa_.js.map} +1 -1
- package/dist/admin/assets/{image-off-TVxEyb74.js → image-off-DFs5upyX.js} +2 -2
- package/dist/admin/assets/{image-off-TVxEyb74.js.map → image-off-DFs5upyX.js.map} +1 -1
- package/dist/admin/assets/inbox-B8XZ8L6s.js +2 -0
- package/dist/admin/assets/inbox-B8XZ8L6s.js.map +1 -0
- package/dist/admin/assets/{inbox-BKqu1EfP.js → inbox-CySnQydm.js} +2 -2
- package/dist/admin/assets/{inbox-BKqu1EfP.js.map → inbox-CySnQydm.js.map} +1 -1
- package/dist/admin/assets/index-DoJsnLI1.js +4 -0
- package/dist/admin/assets/index-DoJsnLI1.js.map +1 -0
- package/dist/admin/assets/index-lxe7WimO.css +2 -0
- package/dist/admin/assets/{key-round-Dmdr1vP5.js → key-round-D36CePnN.js} +2 -2
- package/dist/admin/assets/{key-round-Dmdr1vP5.js.map → key-round-D36CePnN.js.map} +1 -1
- package/dist/admin/assets/{labels-BrwwGWnv.js → labels-B2HIVxXg.js} +2 -2
- package/dist/admin/assets/{labels-BrwwGWnv.js.map → labels-B2HIVxXg.js.map} +1 -1
- package/dist/admin/assets/{languages-BbfFIygP.js → languages-CzbTaQv9.js} +2 -2
- package/dist/admin/assets/{languages-BbfFIygP.js.map → languages-CzbTaQv9.js.map} +1 -1
- package/dist/admin/assets/{layers-B0jT4rc4.js → layers-BmcodiaH.js} +2 -2
- package/dist/admin/assets/{layers-B0jT4rc4.js.map → layers-BmcodiaH.js.map} +1 -1
- package/dist/admin/assets/{link-2-off-DC06jLDj.js → link-2-off-CoJNwrxm.js} +2 -2
- package/dist/admin/assets/{link-2-off-DC06jLDj.js.map → link-2-off-CoJNwrxm.js.map} +1 -1
- package/dist/admin/assets/{link-B3O0VUVT.js → link-Pyr2Y35S.js} +2 -2
- package/dist/admin/assets/{link-B3O0VUVT.js.map → link-Pyr2Y35S.js.map} +1 -1
- package/dist/admin/assets/locales-Bg3htKo8.js +2 -0
- package/dist/admin/assets/{locales-e7B5t6id.js.map → locales-Bg3htKo8.js.map} +1 -1
- package/dist/admin/assets/media-BCnVhaDH.js +2 -0
- package/dist/admin/assets/{media-VCJUbYzJ.js.map → media-BCnVhaDH.js.map} +1 -1
- package/dist/admin/assets/media-CtbfNgc-.js +2 -0
- package/dist/admin/assets/media-CtbfNgc-.js.map +1 -0
- package/dist/admin/assets/network--5X46kWN.js +2 -0
- package/dist/admin/assets/network--5X46kWN.js.map +1 -0
- package/dist/admin/assets/{plus-WfYKHW7G.js → plus-BoDtdLCo.js} +2 -2
- package/dist/admin/assets/{plus-WfYKHW7G.js.map → plus-BoDtdLCo.js.map} +1 -1
- package/dist/admin/assets/publishing-DdmWXRaM.js +2 -0
- package/dist/admin/assets/{publishing-CpSDO3M7.js.map → publishing-DdmWXRaM.js.map} +1 -1
- package/dist/admin/assets/{radio-group-DQ3sC1ol.js → radio-group-BoN9R_3K.js} +2 -2
- package/dist/admin/assets/{radio-group-DQ3sC1ol.js.map → radio-group-BoN9R_3K.js.map} +1 -1
- package/dist/admin/assets/{rotate-ccw-Cvc_uA58.js → rotate-ccw-DL6TzcZh.js} +2 -2
- package/dist/admin/assets/{rotate-ccw-Cvc_uA58.js.map → rotate-ccw-DL6TzcZh.js.map} +1 -1
- package/dist/admin/assets/schedules-BmB9Y73z.js +2 -0
- package/dist/admin/assets/{schedules-CBGpjEg7.js.map → schedules-BmB9Y73z.js.map} +1 -1
- package/dist/admin/assets/schema-D-qo7XSF.js +2 -0
- package/dist/admin/assets/schema-D-qo7XSF.js.map +1 -0
- package/dist/admin/assets/{scroll-text-gKYBbibb.js → scroll-text-PqeZm472.js} +2 -2
- package/dist/admin/assets/{scroll-text-gKYBbibb.js.map → scroll-text-PqeZm472.js.map} +1 -1
- package/dist/admin/assets/{search-CW3iBC4k.js → search-BdwIwOzC.js} +2 -2
- package/dist/admin/assets/{search-CW3iBC4k.js.map → search-BdwIwOzC.js.map} +1 -1
- package/dist/admin/assets/searchSchemas-DNjfDxmj.js +2 -0
- package/dist/admin/assets/{searchSchemas-D4S2ceA0.js.map → searchSchemas-DNjfDxmj.js.map} +1 -1
- package/dist/admin/assets/{sections-CN5fIoAr.js → sections-BTS683ur.js} +2 -2
- package/dist/admin/assets/{sections-CN5fIoAr.js.map → sections-BTS683ur.js.map} +1 -1
- package/dist/admin/assets/sections-BfxPwK0u.js +2 -0
- package/dist/admin/assets/{sections-Cl1LrzqH.js.map → sections-BfxPwK0u.js.map} +1 -1
- package/dist/admin/assets/{select-DjCAH45V.js → select-Bp8kO5Ko.js} +2 -2
- package/dist/admin/assets/{select-DjCAH45V.js.map → select-Bp8kO5Ko.js.map} +1 -1
- package/dist/admin/assets/{send-DRA-Pe46.js → send-XPWo3m4u.js} +2 -2
- package/dist/admin/assets/{send-DRA-Pe46.js.map → send-XPWo3m4u.js.map} +1 -1
- package/dist/admin/assets/seo-CceGYTIX.js +2 -0
- package/dist/admin/assets/{seo-DJ4k3LtY.js.map → seo-CceGYTIX.js.map} +1 -1
- package/dist/admin/assets/settings-TEbLvC-v.js +2 -0
- package/dist/admin/assets/settings-TEbLvC-v.js.map +1 -0
- package/dist/admin/assets/settle-CFU6YpQ0.js +2 -0
- package/dist/admin/assets/settle-CFU6YpQ0.js.map +1 -0
- package/dist/admin/assets/shapes-WrYO9Spf.js +6 -0
- package/dist/admin/assets/shapes-WrYO9Spf.js.map +1 -0
- package/dist/admin/assets/{skeleton-D4eOLKLY.js → skeleton-vXOCdnJv.js} +2 -2
- package/dist/admin/assets/{skeleton-D4eOLKLY.js.map → skeleton-vXOCdnJv.js.map} +1 -1
- package/dist/admin/assets/slugify-rYFum3Sc.js +2 -0
- package/dist/admin/assets/slugify-rYFum3Sc.js.map +1 -0
- package/dist/admin/assets/snapshots-DUI2t-qF.js +2 -0
- package/dist/admin/assets/snapshots-DUI2t-qF.js.map +1 -0
- package/dist/admin/assets/{sparkles-DCRAqbqD.js → sparkles-CvT-jxrW.js} +2 -2
- package/dist/admin/assets/{sparkles-DCRAqbqD.js.map → sparkles-CvT-jxrW.js.map} +1 -1
- package/dist/admin/assets/src-ndgTSYLX.js +7 -0
- package/dist/admin/assets/src-ndgTSYLX.js.map +1 -0
- package/dist/admin/assets/{stableId-iRkUbVIP.js → stableId-BrtQedPy.js} +2 -2
- package/dist/admin/assets/{stableId-iRkUbVIP.js.map → stableId-BrtQedPy.js.map} +1 -1
- package/dist/admin/assets/store-CdIFG90N.js +2 -0
- package/dist/admin/assets/{store-DknnssoQ.js.map → store-CdIFG90N.js.map} +1 -1
- package/dist/admin/assets/{switch-B2R13aVU.js → switch-B1xClhNG.js} +2 -2
- package/dist/admin/assets/{switch-B2R13aVU.js.map → switch-B1xClhNG.js.map} +1 -1
- package/dist/admin/assets/theme-65PB8uAu.js +2 -0
- package/dist/admin/assets/{theme-X-qeg74W.js.map → theme-65PB8uAu.js.map} +1 -1
- package/dist/admin/assets/titles-CQiqqDw-.js +2 -0
- package/dist/admin/assets/titles-CQiqqDw-.js.map +1 -0
- package/dist/admin/assets/tokens-ixHjAkDK.js +2 -0
- package/dist/admin/assets/{tokens-BlIDIMY9.js.map → tokens-ixHjAkDK.js.map} +1 -1
- package/dist/admin/assets/{tooltip-u2epXfJF.js → tooltip-CS_8cJu2.js} +2 -2
- package/dist/admin/assets/{tooltip-u2epXfJF.js.map → tooltip-CS_8cJu2.js.map} +1 -1
- package/dist/admin/assets/{undo-2-Zd1OT6qk.js → undo-2-BiTANHFz.js} +2 -2
- package/dist/admin/assets/{undo-2-Zd1OT6qk.js.map → undo-2-BiTANHFz.js.map} +1 -1
- package/dist/admin/assets/useContentSchema-DtYfhsd2.js +2 -0
- package/dist/admin/assets/{useContentSchema-DaQHlL19.js.map → useContentSchema-DtYfhsd2.js.map} +1 -1
- package/dist/admin/assets/useCursorPager-0zHjlm-7.js +2 -0
- package/dist/admin/assets/{useCursorPager-Dc-9B67j.js.map → useCursorPager-0zHjlm-7.js.map} +1 -1
- package/dist/admin/assets/useDiscardGuard-CMMJgkI2.js +2 -0
- package/dist/admin/assets/useDiscardGuard-CMMJgkI2.js.map +1 -0
- package/dist/admin/assets/useMediaPickerDialog-xvQ8cofO.js +2 -0
- package/dist/admin/assets/{useMediaPickerDialog-C23eOHQR.js.map → useMediaPickerDialog-xvQ8cofO.js.map} +1 -1
- package/dist/admin/assets/useMediaUploader-BVNTeSAU.js +2 -0
- package/dist/admin/assets/{useMediaUploader-CTViR0LX.js.map → useMediaUploader-BVNTeSAU.js.map} +1 -1
- package/dist/admin/assets/useNetworkPermission-Cts98h9d.js +2 -0
- package/dist/admin/assets/{useNetworkPermission-CegwqQXR.js.map → useNetworkPermission-Cts98h9d.js.map} +1 -1
- package/dist/admin/assets/usePaletteItems-DtReWmkd.js +2 -0
- package/dist/admin/assets/{usePaletteItems-B3y2t7Ly.js.map → usePaletteItems-DtReWmkd.js.map} +1 -1
- package/dist/admin/assets/usePlaces-DC47wVeU.js +2 -0
- package/dist/admin/assets/{usePlaces-CAXr-IO9.js.map → usePlaces-DC47wVeU.js.map} +1 -1
- package/dist/admin/assets/useQueries-CirW3Mvp.js +2 -0
- package/dist/admin/assets/{useQueries-CX6eFr24.js.map → useQueries-CirW3Mvp.js.map} +1 -1
- package/dist/admin/assets/{useResolvedScheme-Cg8TdO85.js → useResolvedScheme-CScQpr-P.js} +2 -2
- package/dist/admin/assets/{useResolvedScheme-Cg8TdO85.js.map → useResolvedScheme-CScQpr-P.js.map} +1 -1
- package/dist/admin/assets/{useSchemaScopeAccess-DyfiZnzs.js → useSchemaScopeAccess-ByrxIdKM.js} +2 -2
- package/dist/admin/assets/{useSchemaScopeAccess-DyfiZnzs.js.map → useSchemaScopeAccess-ByrxIdKM.js.map} +1 -1
- package/dist/admin/assets/users-2iJYwlJb.js +2 -0
- package/dist/admin/assets/users-2iJYwlJb.js.map +1 -0
- package/dist/admin/assets/{users-ohHZnBJW.js → users-DM7CXUBJ.js} +2 -2
- package/dist/admin/assets/{users-ohHZnBJW.js.map → users-DM7CXUBJ.js.map} +1 -1
- package/dist/admin/assets/{zod-D5i60ErJ.js → zod-hUh5nXnX.js} +2 -2
- package/dist/admin/assets/{zod-D5i60ErJ.js.map → zod-hUh5nXnX.js.map} +1 -1
- package/dist/admin/index.html +59 -60
- package/dist/cli.js +10 -5696
- package/dist/cli.js.map +1 -1
- package/dist/cliMain-D08HeAd_.js +5771 -0
- package/dist/cliMain-D08HeAd_.js.map +1 -0
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -38
- package/dist/contentDisposition-DOL2Xt0l.js +90 -0
- package/dist/contentDisposition-DOL2Xt0l.js.map +1 -0
- package/dist/index.d.ts +23 -6
- package/dist/index.js +2 -2
- package/dist/public-B57h4F7Y.js +39 -0
- package/dist/public-B57h4F7Y.js.map +1 -0
- package/dist/{public-BO_wneBL.d.ts → public-COKbHR-N.d.ts} +47 -3
- package/dist/{s3Adapter-CtPzkzf0.js → s3Adapter-U01iEAcK.js} +2 -2
- package/dist/{s3Adapter-CtPzkzf0.js.map → s3Adapter-U01iEAcK.js.map} +1 -1
- package/dist/{worker-DRCCGGjl.js → worker-jspgh10V.js} +5735 -3982
- package/dist/worker-jspgh10V.js.map +1 -0
- package/package.json +5 -5
- package/dist/admin/assets/AssistError-CMXQWiQo.js +0 -2
- package/dist/admin/assets/Body-BYc1IVsQ.js +0 -2
- package/dist/admin/assets/Builder-CwHpRhZN.js +0 -2
- package/dist/admin/assets/Builder-CwHpRhZN.js.map +0 -1
- package/dist/admin/assets/ConfirmDialog-Rd6WDt6q.js +0 -2
- package/dist/admin/assets/ConfirmDialog-Rd6WDt6q.js.map +0 -1
- package/dist/admin/assets/Form-CiZUsLPp.js +0 -2
- package/dist/admin/assets/Form-CiZUsLPp.js.map +0 -1
- package/dist/admin/assets/FormCheckboxGroup-Bz8KERs1.js.map +0 -1
- package/dist/admin/assets/InsertMenuItem-BvRDuXtd.js +0 -2
- package/dist/admin/assets/InsertMenuItem-BvRDuXtd.js.map +0 -1
- package/dist/admin/assets/Panel-B1TkcP8V.js +0 -2
- package/dist/admin/assets/Panel-B1TkcP8V.js.map +0 -1
- package/dist/admin/assets/SecretReveal-BhSqdWqh.js +0 -2
- package/dist/admin/assets/SecretReveal-BhSqdWqh.js.map +0 -1
- package/dist/admin/assets/StepList-CZJmwy9e.js +0 -2
- package/dist/admin/assets/StepList-CZJmwy9e.js.map +0 -1
- package/dist/admin/assets/Structure-Dk87778W.js +0 -2
- package/dist/admin/assets/Thumbnail-BwbCNpgQ.js +0 -2
- package/dist/admin/assets/Thumbnail-BwbCNpgQ.js.map +0 -1
- package/dist/admin/assets/UnsavedChangesGuard-C6nD55Fn.js +0 -2
- package/dist/admin/assets/UnsavedChangesGuard-C6nD55Fn.js.map +0 -1
- package/dist/admin/assets/auth-C4fHG9Iu.js +0 -2
- package/dist/admin/assets/auth-C4fHG9Iu.js.map +0 -1
- package/dist/admin/assets/badge-vLiQczOd.js +0 -2
- package/dist/admin/assets/changeSets-D5VevASj.js +0 -2
- package/dist/admin/assets/changeSets-D5VevASj.js.map +0 -1
- package/dist/admin/assets/chevron-left-CZXrLV99.js +0 -2
- package/dist/admin/assets/content-Cbavyq0x.js +0 -3
- package/dist/admin/assets/content-Cbavyq0x.js.map +0 -1
- package/dist/admin/assets/contentCounts-DknqJ4kh.js +0 -2
- package/dist/admin/assets/context-fImO9k99.js +0 -2
- package/dist/admin/assets/createLucideIcon-CqygG5K6.js +0 -2
- package/dist/admin/assets/createLucideIcon-CqygG5K6.js.map +0 -1
- package/dist/admin/assets/develop-BDqMOEql.js +0 -11
- package/dist/admin/assets/develop-BDqMOEql.js.map +0 -1
- package/dist/admin/assets/es2015-BKfbx3rz.js +0 -42
- package/dist/admin/assets/es2015-BKfbx3rz.js.map +0 -1
- package/dist/admin/assets/followPlural-D0bENI5E.js +0 -2
- package/dist/admin/assets/followPlural-D0bENI5E.js.map +0 -1
- package/dist/admin/assets/inbox-Dfy4YBZ2.js +0 -2
- package/dist/admin/assets/inbox-Dfy4YBZ2.js.map +0 -1
- package/dist/admin/assets/index-BEM45u2w.css +0 -2
- package/dist/admin/assets/index-M4TUI1dl.js +0 -4
- package/dist/admin/assets/index-M4TUI1dl.js.map +0 -1
- package/dist/admin/assets/loader-circle-C-9trZPI.js +0 -2
- package/dist/admin/assets/loader-circle-C-9trZPI.js.map +0 -1
- package/dist/admin/assets/locales-e7B5t6id.js +0 -2
- package/dist/admin/assets/media-DBdx-UmR.js +0 -2
- package/dist/admin/assets/media-DBdx-UmR.js.map +0 -1
- package/dist/admin/assets/media-VCJUbYzJ.js +0 -2
- package/dist/admin/assets/network-BpbMYp6D.js +0 -2
- package/dist/admin/assets/network-BpbMYp6D.js.map +0 -1
- package/dist/admin/assets/pencil-BVSFlU14.js +0 -2
- package/dist/admin/assets/pencil-BVSFlU14.js.map +0 -1
- package/dist/admin/assets/publishing-CpSDO3M7.js +0 -2
- package/dist/admin/assets/schedules-CBGpjEg7.js +0 -2
- package/dist/admin/assets/schema-D9BgCVzZ.js +0 -2
- package/dist/admin/assets/schema-D9BgCVzZ.js.map +0 -1
- package/dist/admin/assets/searchSchemas-D4S2ceA0.js +0 -2
- package/dist/admin/assets/sections-Cl1LrzqH.js +0 -2
- package/dist/admin/assets/seo-DJ4k3LtY.js +0 -2
- package/dist/admin/assets/settings-DRZ33PTg.js +0 -2
- package/dist/admin/assets/settings-DRZ33PTg.js.map +0 -1
- package/dist/admin/assets/settle-LRKtTN_e.js +0 -2
- package/dist/admin/assets/settle-LRKtTN_e.js.map +0 -1
- package/dist/admin/assets/shapes-BJe3IMuj.js +0 -6
- package/dist/admin/assets/shapes-BJe3IMuj.js.map +0 -1
- package/dist/admin/assets/snapshots-CT-zs6Up.js +0 -2
- package/dist/admin/assets/snapshots-CT-zs6Up.js.map +0 -1
- package/dist/admin/assets/src-DUpL-qwG.js +0 -7
- package/dist/admin/assets/src-DUpL-qwG.js.map +0 -1
- package/dist/admin/assets/store-DknnssoQ.js +0 -2
- package/dist/admin/assets/theme-X-qeg74W.js +0 -2
- package/dist/admin/assets/titles-CLh5ftA2.js +0 -2
- package/dist/admin/assets/titles-CLh5ftA2.js.map +0 -1
- package/dist/admin/assets/tokens-BlIDIMY9.js +0 -2
- package/dist/admin/assets/useAuditLabels-DWBpLOTB.js +0 -2
- package/dist/admin/assets/useAuditLabels-DWBpLOTB.js.map +0 -1
- package/dist/admin/assets/useContentSchema-DaQHlL19.js +0 -2
- package/dist/admin/assets/useCursorPager-Dc-9B67j.js +0 -2
- package/dist/admin/assets/useDiscardGuard-BVJGUCiH.js +0 -2
- package/dist/admin/assets/useDiscardGuard-BVJGUCiH.js.map +0 -1
- package/dist/admin/assets/useMediaPickerDialog-C23eOHQR.js +0 -2
- package/dist/admin/assets/useMediaUploader-CTViR0LX.js +0 -2
- package/dist/admin/assets/useNetworkPermission-CegwqQXR.js +0 -2
- package/dist/admin/assets/usePaletteItems-B3y2t7Ly.js +0 -2
- package/dist/admin/assets/usePlaces-CAXr-IO9.js +0 -2
- package/dist/admin/assets/useQueries-CX6eFr24.js +0 -2
- package/dist/admin/assets/users-CDoJRL24.js +0 -2
- package/dist/admin/assets/users-CDoJRL24.js.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/worker-DRCCGGjl.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loader-circle-C-9trZPI.js","names":["isServer","getDefaultState","__toESM","require_react","require_jsx_runtime","ShapioApiError","createClient","createLucideIcon","require_shim","import_react","import_jsx_runtime","QueryClientContext","useQueryClient","client","queryClient","QueryClientProvider","defaultTimeoutProvider","callback","delay","timeoutId","intervalId","timeoutManager","#provider","provider","systemSetTimeoutZero","isServer$1","noop","functionalUpdate","updater","input","isValidTimeout","value","timeUntilStale","updatedAt","staleTime","resolveQueryValue","query","matchQuery","filters","queryKey","exact","hashQueryKeyByOptions","partialMatchKey","type","isActive","stale","fetchStatus","predicate","matchMutation","mutationKey","mutation","hashKey","status","options","isPlainObject","val","key","result","a","b","i","bKeys","hasOwn","replaceEqualDeep","depth","array","isPlainArray","aSize","bItems","bSize","copy","equalItems","aItem","bItem","v","shallowEqualObjects","hasObjectPrototype","o","objectPrototype","ctor","prot","sleep","resolve","timeout","replaceData","prevData","data","keepPreviousData","previousData","addToEnd","newItems","items","item","max","addToStart","skipToken","ensureQueryFn","fetchOptions","shouldThrowError","throwOnError","params","addConsumeAwareSignal","consumed","signal","object","getSignal","onCancelled","isServerFn","isServer","Subscribable","listener","focusManager","#setup","onFocus","#cleanup","setup","focused","#focused","isFocused","defaultScheduler","createNotifyManager","queue","transactions","notifyFn","batchNotifyFn","scheduleFn","schedule","flush","originalQueue","args","fn","notifyManager","onlineManager","onlineListener","onOnline","offlineListener","#online","online","defaultRetryDelay","failureCount","canFetch","networkMode","CancelledError","createRetryer","isRetryCancelled","continueFn","promiseResolve","promiseReject","promise","reject","isResolved","cancel","error","cancelOptions","config","cancelRetry","continueRetry","canContinue","canStart","pause","continueResolve","run","promiseOrValue","initialPromise","retry","retryDelay","shouldRetry","Removable","#gcTimeout","newGcTime","infiniteQueryBehavior","context","direction","oldPages","oldPageParams","currentPage","fetchFn","cancelled","addSignalProperty","queryFn","fetchPage","param","queryFnContext","previous","page","addTo","maxPages","pageParamFn","getPreviousPageParam","getNextPageParam","oldData","remainingPages","pages","lastIndex","pageParams","hasNextPage","hasPreviousPage","Query","#abortSignalConsumed","#defaultOptions","#client","#cache","#initialState","getDefaultState$1","#queryType","#retryer","defaultState","successState","newData","#dispatch","observer","x","index","abortController","#revertState","retryer","reducer","action","state","fetchState","newState","dataUpdatedAt","hasData","initialDataUpdatedAt","QueryObserver","#selectError","#currentQuery","shouldFetchOnMount","#executeFetch","#updateTimers","shouldFetchOn","#clearStaleTimeout","#clearRefetchInterval","prevOptions","prevQuery","#updateQuery","mounted","shouldFetchOptionally","#updateStaleTimeout","nextRefetchInterval","#computeRefetchInterval","#currentRefetchInterval","#updateRefetchInterval","#currentResult","#currentResultOptions","#currentResultState","onPropTracked","target","#trackedProps","defaultedOptions","unsubscribe","resolveEarly","cachePromise","event","#shouldScheduleTimer","#staleTimeoutId","nextInterval","#refetchIntervalId","prevResult","prevResultState","prevResultOptions","queryInitialState","#currentQueryInitialState","isPlaceholderData","fetchOnMount","fetchOptionally","skipSelect","placeholderData","#lastQueryWithDefinedData","#selectFn","#selectResult","selectError","isFetching","isPending","isError","isLoading","isStale","nextResult","notifyListeners","notifyOnChangePropsValue","notifyOnChangeProps","includedProps","typedKey","shouldLoadOnMount","field","Mutation","#mutationCache","#observers","getDefaultState","onContinue","mutationFnContext","variables","restored","isPaused","MutationObserver","#updateResult","#currentMutation","#notify","#mutateOptions","onMutateResult","IsRestoringContext","useIsRestoring","createValue","isReset","QueryErrorResetBoundaryContext","useQueryErrorResetBoundary","ensurePreventErrorBoundaryRetry","errorResetBoundary","useClearResetErrorBoundary","getHasError","suspense","ensureSuspenseTimers","MIN_SUSPENSE_TIME_MS","clamp","originalStaleTime","shouldSuspend","fetchOptimistic","useBaseQuery","isRestoring","subscribed","Observer","shouldSubscribe","onStoreChange","useQuery","useMutation","mutate","require_with_selector_production","__commonJSMin","React","shim","is","y","objectIs","useSyncExternalStore","useRef","useEffect","useMemo","useDebugValue","instRef","inst","memoizedSelector","hasMemo","nextSnapshot","selector","isEqual","currentSelection","memoizedSelection","memoizedSnapshot","nextSelection","maybeGetServerSnapshot","getServerSnapshot","getSnapshot","subscribe","require_with_selector","queryKeys","token","id","category","changeId","modelKey","locale","revisionId","definitionId","cursor","seq","from","to","routeKey","modelId","days","runId","entryId","createJSONStorage","storage","getStorage","parse","str2","str","name","newValue","toThenable","onFulfilled","onRejected","persist","currentState","persistedState","baseOptions","hasHydrated","hydrationVersion","hydrationListeners","finishHydrationListeners","set","get","api","setItem","savedSetState","replace","configResult","stateFromStorage","hydrate","currentVersion","cb","postRehydrationCallback","deserializedStorageValue","migration","migrated","migratedState","migrationResult","e","newOptions","safeLocalStorage","persistentStorage","routerBasePath","SITE_PREFIX","NETWORK_PATH","UNSITED_PATHS","isUnder","pathname","base","splitSitePath","match","isSitelessPath","path","isNetworkPath","withSitePrefix","needsSitePrefix","LAST_SITE_KEY","currentRouterPath","rest","readLastSite","stored","resolveBootSite","currentSite","settleSiteKey","rememberSite","forgetSite","siteHomeUrl","networkUrl","goToSite","leaveDeletedSite","leaveUnknownSite","showSiteInAddressBar","search","hash","createStoreImpl","listeners","setState","nextState","partial","previousState","getState","initialState","createState","createStore","identity","arg","useStore","slice","createImpl","useBoundStore","create","useSessionStore","apiBaseUrl","CSRF_HEADER","apiClient","adminApi","isCsrfRejection","setCsrfToken","refreshCsrfToken","csrfToken","withCsrf","call","resetCsrfToken","__iconData","LoaderCircle"],"sources":["../../../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.3.0/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.0/node_modules/@tanstack/query-core/build/modern/timeoutManager.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.0/node_modules/@tanstack/query-core/build/modern/utils.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.0/node_modules/@tanstack/query-core/build/modern/environmentManager.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.0/node_modules/@tanstack/query-core/build/modern/subscribable.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.0/node_modules/@tanstack/query-core/build/modern/focusManager.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.0/node_modules/@tanstack/query-core/build/modern/notifyManager.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.0/node_modules/@tanstack/query-core/build/modern/onlineManager.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.0/node_modules/@tanstack/query-core/build/modern/retryer.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.0/node_modules/@tanstack/query-core/build/modern/removable.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.0/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.0/node_modules/@tanstack/query-core/build/modern/query.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.0/node_modules/@tanstack/query-core/build/modern/queryObserver.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.0/node_modules/@tanstack/query-core/build/modern/mutation.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.104.0/node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.3.0/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.3.0/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.3.0/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.3.0/node_modules/@tanstack/react-query/build/modern/suspense.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useQuery.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useMutation.js","../../../../node_modules/.pnpm/use-sync-external-store@1.7.0_react@19.3.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js","../../../../node_modules/.pnpm/use-sync-external-store@1.7.0_react@19.3.0/node_modules/use-sync-external-store/shim/with-selector.js","../../src/api/queryKeys.ts","../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_react@19.3.0_use-sync-external-store@1.7.0_react@19.3.0_/node_modules/zustand/esm/middleware.mjs","../../src/helpers/safeStorage.ts","../../src/app/basePath.ts","../../src/app/sitePaths.ts","../../src/app/currentSite.ts","../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_react@19.3.0_use-sync-external-store@1.7.0_react@19.3.0_/node_modules/zustand/esm/vanilla.mjs","../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_react@19.3.0_use-sync-external-store@1.7.0_react@19.3.0_/node_modules/zustand/esm/react.mjs","../../src/stores/session.ts","../../src/api/client.ts","../../src/api/csrf.ts","../../../../node_modules/.pnpm/lucide-react@1.49.0_@types+react@19.3.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/loader-circle.mjs"],"sourcesContent":["\"use client\";\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/QueryClientProvider.tsx\n/**\n* The context that `useQueryClient` reads from. `QueryClientProvider` is the normal way to set it.\n*/\nconst QueryClientContext = React.createContext(void 0);\n/**\n* The `useQueryClient` hook returns the current `QueryClient` instance.\n*\n* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will\n* be used.\n* @returns The current `QueryClient` instance.\n* @throws If no `queryClient` argument is passed and no `QueryClientProvider` is found in the component tree.\n*/\nconst useQueryClient = (queryClient) => {\n\tconst client = React.useContext(QueryClientContext);\n\tif (queryClient) return queryClient;\n\tif (!client) throw new Error(\"No QueryClient set, use QueryClientProvider to set one\");\n\treturn client;\n};\n/**\n* Use the `QueryClientProvider` component to connect and provide a `QueryClient` to your application. Also\n* calls `client.mount()`/`client.unmount()` as this component mounts/unmounts, which subscribes the client to\n* focus/online events (resuming any paused mutations and refetching as needed when the app regains focus or\n* comes back online).\n*\n* @returns The provided `children`, wrapped so they can read the `QueryClient` via `useQueryClient`.\n*\n* @example\n* ```tsx\n* import { QueryClient, QueryClientProvider } from '@tanstack/react-query'\n*\n* const queryClient = new QueryClient()\n*\n* function App() {\n* return <QueryClientProvider client={queryClient}>...</QueryClientProvider>\n* }\n* ```\n*/\nconst QueryClientProvider = ({ client, children }) => {\n\tReact.useEffect(() => {\n\t\tclient.mount();\n\t\treturn () => {\n\t\t\tclient.unmount();\n\t\t};\n\t}, [client]);\n\treturn /* @__PURE__ */ jsx(QueryClientContext.Provider, {\n\t\tvalue: client,\n\t\tchildren\n\t});\n};\n//#endregion\nexport { QueryClientContext, QueryClientProvider, useQueryClient };\n\n//# sourceMappingURL=QueryClientProvider.js.map","//#region src/timeoutManager.ts\nconst defaultTimeoutProvider = {\n\tsetTimeout: (callback, delay) => setTimeout(callback, delay),\n\tclearTimeout: (timeoutId) => clearTimeout(timeoutId),\n\tsetInterval: (callback, delay) => setInterval(callback, delay),\n\tclearInterval: (intervalId) => clearInterval(intervalId)\n};\n/**\n* Allows customization of how timeouts are created.\n*\n* @tanstack/query-core makes liberal use of timeouts to implement `staleTime`\n* and `gcTime`. The default TimeoutManager provider uses the platform's global\n* `setTimeout` implementation, which is known to have scalability issues with\n* thousands of timeouts on the event loop.\n*\n* If you hit this limitation, consider providing a custom TimeoutProvider that\n* coalesces timeouts.\n*/\nvar TimeoutManager = class {\n\t#provider = defaultTimeoutProvider;\n\t#providerCalled = false;\n\t/**\n\t* `setTimeoutProvider` can be used to set a custom implementation of the\n\t* `setTimeout`, `clearTimeout`, `setInterval`, `clearInterval` functions,\n\t* called a `TimeoutProvider`.\n\t*\n\t* This may be useful if you notice event loop performance issues with\n\t* thousands of queries. A custom TimeoutProvider could also support timer\n\t* delays longer than the global `setTimeout` maximum delay value of about\n\t* 24 days.\n\t*\n\t* It is important to call `setTimeoutProvider` before creating a\n\t* QueryClient or queries, so that the same provider is used consistently\n\t* for all timers in the application, since different TimeoutProviders\n\t* cannot cancel each others' timers.\n\t*\n\t* @example\n\t* ```ts\n\t* import { timeoutManager, QueryClient } from '@tanstack/query-core'\n\t* import { CustomTimeoutProvider } from './CustomTimeoutProvider'\n\t*\n\t* timeoutManager.setTimeoutProvider(new CustomTimeoutProvider())\n\t*\n\t* export const queryClient = new QueryClient()\n\t* ```\n\t*/\n\tsetTimeoutProvider(provider) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (this.#providerCalled && provider !== this.#provider) console.error(`[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`, {\n\t\t\t\tprevious: this.#provider,\n\t\t\t\tprovider\n\t\t\t});\n\t\t}\n\t\tthis.#provider = provider;\n\t\tif (process.env.NODE_ENV !== \"production\") this.#providerCalled = false;\n\t}\n\t/**\n\t* `setTimeout` schedules a callback to run after approximately `delay`\n\t* milliseconds, like the global `setTimeout` function. The callback can be\n\t* canceled with `clearTimeout`.\n\t*\n\t* It returns a timer ID, which may be a number or an object that can be\n\t* coerced to a number via `Symbol.toPrimitive`.\n\t*\n\t* @example\n\t* ```ts\n\t* import { timeoutManager } from '@tanstack/query-core'\n\t*\n\t* const timeoutId = timeoutManager.setTimeout(\n\t* () => console.log('ran at:', new Date()),\n\t* 1000,\n\t* )\n\t*\n\t* const timeoutIdNumber: number = Number(timeoutId)\n\t* ```\n\t*/\n\tsetTimeout(callback, delay) {\n\t\tif (process.env.NODE_ENV !== \"production\") this.#providerCalled = true;\n\t\treturn this.#provider.setTimeout(callback, delay);\n\t}\n\t/**\n\t* `clearTimeout` cancels a timeout callback scheduled with `setTimeout`,\n\t* like the global `clearTimeout` function. It should be called with a\n\t* timer ID returned by `setTimeout`.\n\t*\n\t* @example\n\t* ```ts\n\t* import { timeoutManager } from '@tanstack/query-core'\n\t*\n\t* const timeoutId = timeoutManager.setTimeout(\n\t* () => console.log('ran at:', new Date()),\n\t* 1000,\n\t* )\n\t*\n\t* timeoutManager.clearTimeout(timeoutId)\n\t* ```\n\t*/\n\tclearTimeout(timeoutId) {\n\t\tthis.#provider.clearTimeout(timeoutId);\n\t}\n\t/**\n\t* `setInterval` schedules a callback to be called approximately every\n\t* `delay` milliseconds, like the global `setInterval` function.\n\t*\n\t* Like `setTimeout`, it returns a timer ID, which may be a number or an\n\t* object that can be coerced to a number via `Symbol.toPrimitive`.\n\t*\n\t* @example\n\t* ```ts\n\t* import { timeoutManager } from '@tanstack/query-core'\n\t*\n\t* const intervalId = timeoutManager.setInterval(\n\t* () => console.log('ran at:', new Date()),\n\t* 1000,\n\t* )\n\t* ```\n\t*/\n\tsetInterval(callback, delay) {\n\t\tif (process.env.NODE_ENV !== \"production\") this.#providerCalled = true;\n\t\treturn this.#provider.setInterval(callback, delay);\n\t}\n\t/**\n\t* `clearInterval` can be used to cancel an interval, like the global\n\t* `clearInterval` function. It should be called with an interval ID\n\t* returned by `setInterval`.\n\t*\n\t* @example\n\t* ```ts\n\t* import { timeoutManager } from '@tanstack/query-core'\n\t*\n\t* const intervalId = timeoutManager.setInterval(\n\t* () => console.log('ran at:', new Date()),\n\t* 1000,\n\t* )\n\t*\n\t* timeoutManager.clearInterval(intervalId)\n\t* ```\n\t*/\n\tclearInterval(intervalId) {\n\t\tthis.#provider.clearInterval(intervalId);\n\t}\n};\n/**\n* Singleton instance of {@link TimeoutManager}, used throughout TanStack Query to schedule and cancel timers.\n*/\nconst timeoutManager = new TimeoutManager();\n/**\n* In many cases code wants to delay to the next event loop tick; this is not\n* mediated by {@link timeoutManager}.\n*\n* This function is provided to make auditing the `tanstack/query-core` for\n* incorrect use of system `setTimeout` easier.\n*/\nfunction systemSetTimeoutZero(callback) {\n\tsetTimeout(callback, 0);\n}\n//#endregion\nexport { TimeoutManager, defaultTimeoutProvider, systemSetTimeoutZero, timeoutManager };\n\n//# sourceMappingURL=timeoutManager.js.map","import { timeoutManager } from \"./timeoutManager.js\";\n//#region src/utils.ts\n/** @deprecated\n* use `environmentManager.isServer()` instead.\n*/\nconst isServer = typeof window === \"undefined\" || \"Deno\" in globalThis;\nfunction noop() {}\nfunction functionalUpdate(updater, input) {\n\treturn typeof updater === \"function\" ? updater(input) : updater;\n}\nfunction isValidTimeout(value) {\n\treturn typeof value === \"number\" && value >= 0 && value !== Infinity;\n}\nfunction timeUntilStale(updatedAt, staleTime) {\n\treturn Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nfunction resolveQueryValue(value, query) {\n\treturn typeof value === \"function\" ? value(query) : value;\n}\n/**\n* Checks whether a query matches the given {@link QueryFilters}.\n* Every filter that is specified must match; filters that are left unspecified are ignored.\n*\n* @example\n* ```ts\n* const queryCache = queryClient.getQueryCache()\n*\n* const matchingQueries = queryCache\n* .getAll()\n* .filter((query) => matchQuery({ queryKey: ['posts'] }, query))\n* ```\n*/\nfunction matchQuery(filters, query) {\n\tconst { type = \"all\", exact, fetchStatus, predicate, queryKey, stale } = filters;\n\tif (queryKey) {\n\t\tif (exact) {\n\t\t\tif (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) return false;\n\t\t} else if (!partialMatchKey(query.queryKey, queryKey)) return false;\n\t}\n\tif (type !== \"all\") {\n\t\tconst isActive = query.isActive();\n\t\tif (type === \"active\" && !isActive) return false;\n\t\tif (type === \"inactive\" && isActive) return false;\n\t}\n\tif (typeof stale === \"boolean\" && query.isStale() !== stale) return false;\n\tif (fetchStatus && fetchStatus !== query.state.fetchStatus) return false;\n\tif (predicate && !predicate(query)) return false;\n\treturn true;\n}\n/**\n* Checks whether a mutation matches the given {@link MutationFilters}.\n* Every filter that is specified must match; filters that are left unspecified are ignored.\n* If a `mutationKey` filter is provided but the mutation has no `mutationKey` of its own, it does not match.\n*\n* @example\n* ```ts\n* const mutationCache = queryClient.getMutationCache()\n*\n* const matchingMutations = mutationCache\n* .getAll()\n* .filter((mutation) => matchMutation({ mutationKey: ['addPost'] }, mutation))\n* ```\n*/\nfunction matchMutation(filters, mutation) {\n\tconst { exact, status, predicate, mutationKey } = filters;\n\tif (mutationKey) {\n\t\tif (!mutation.options.mutationKey) return false;\n\t\tif (exact) {\n\t\t\tif (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) return false;\n\t\t} else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) return false;\n\t}\n\tif (status && mutation.state.status !== status) return false;\n\tif (predicate && !predicate(mutation)) return false;\n\treturn true;\n}\nfunction hashQueryKeyByOptions(queryKey, options) {\n\treturn (options?.queryKeyHashFn || hashKey)(queryKey);\n}\n/**\n* Default query & mutation keys hash function.\n* Hashes the value into a stable hash.\n*\n* @example\n* ```ts\n* // Object keys are sorted, so key order doesn't affect the hash:\n* hashKey(['todos', { page: 1, filter: 'done' }]) // === '[\"todos\",{\"filter\":\"done\",\"page\":1}]'\n* ```\n*/\nfunction hashKey(queryKey) {\n\treturn JSON.stringify(queryKey, (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {\n\t\tresult[key] = val[key];\n\t\treturn result;\n\t}, {}) : val);\n}\nfunction partialMatchKey(a, b) {\n\tif (a === b) return true;\n\tif (typeof a !== typeof b) return false;\n\tif (a && b && typeof a === \"object\" && typeof b === \"object\") {\n\t\tif (Array.isArray(a) && Array.isArray(b)) {\n\t\t\tif (b.length > a.length) return false;\n\t\t\tfor (let i = 0; i < b.length; i++) if (!partialMatchKey(a[i], b[i])) return false;\n\t\t\treturn true;\n\t\t}\n\t\tconst bKeys = Object.keys(b);\n\t\tfor (const key of bKeys) if (!partialMatchKey(a[key], b[key])) return false;\n\t\treturn true;\n\t}\n\treturn false;\n}\nconst hasOwn = Object.prototype.hasOwnProperty;\nfunction replaceEqualDeep(a, b, depth = 0) {\n\tif (a === b) return a;\n\tif (depth > 500) return b;\n\tconst array = isPlainArray(a) && isPlainArray(b);\n\tif (!array && !(isPlainObject(a) && isPlainObject(b))) return b;\n\tconst aSize = (array ? a : Object.keys(a)).length;\n\tconst bItems = array ? b : Object.keys(b);\n\tconst bSize = bItems.length;\n\tconst copy = array ? new Array(bSize) : {};\n\tlet equalItems = 0;\n\tfor (let i = 0; i < bSize; i++) {\n\t\tconst key = array ? i : bItems[i];\n\t\tconst aItem = a[key];\n\t\tconst bItem = b[key];\n\t\tif (aItem === bItem) {\n\t\t\tcopy[key] = aItem;\n\t\t\tif (array ? i < aSize : hasOwn.call(a, key)) equalItems++;\n\t\t\tcontinue;\n\t\t}\n\t\tif (aItem === null || bItem === null || typeof aItem !== \"object\" || typeof bItem !== \"object\") {\n\t\t\tcopy[key] = bItem;\n\t\t\tcontinue;\n\t\t}\n\t\tconst v = replaceEqualDeep(aItem, bItem, depth + 1);\n\t\tcopy[key] = v;\n\t\tif (v === aItem) equalItems++;\n\t}\n\treturn aSize === bSize && equalItems === aSize ? a : copy;\n}\n/**\n* Shallow compare objects.\n*/\nfunction shallowEqualObjects(a, b) {\n\tif (!b || Object.keys(a).length !== Object.keys(b).length) return false;\n\tfor (const key in a) if (a[key] !== b[key]) return false;\n\treturn true;\n}\nfunction isPlainArray(value) {\n\treturn Array.isArray(value) && value.length === Object.keys(value).length;\n}\nfunction isPlainObject(o) {\n\tif (!hasObjectPrototype(o)) return false;\n\tconst objectPrototype = Object.getPrototypeOf(o);\n\tconst ctor = objectPrototype?.constructor;\n\tif (ctor === void 0) return true;\n\tif (typeof ctor !== \"function\") return false;\n\tconst prot = ctor.prototype;\n\tif (!hasObjectPrototype(prot)) return false;\n\tif (!prot.hasOwnProperty(\"isPrototypeOf\")) return false;\n\tif (objectPrototype !== Object.prototype) return false;\n\treturn true;\n}\nfunction hasObjectPrototype(o) {\n\treturn Object.prototype.toString.call(o) === \"[object Object]\";\n}\nfunction sleep(timeout) {\n\treturn new Promise((resolve) => {\n\t\ttimeoutManager.setTimeout(resolve, timeout);\n\t});\n}\nfunction replaceData(prevData, data, options) {\n\tif (typeof options.structuralSharing === \"function\") return options.structuralSharing(prevData, data);\n\telse if (options.structuralSharing !== false) {\n\t\tif (process.env.NODE_ENV !== \"production\") try {\n\t\t\treturn replaceEqualDeep(prevData, data);\n\t\t} catch (error) {\n\t\t\tconsole.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${options.queryHash}]: ${error}`);\n\t\t\tthrow error;\n\t\t}\n\t\treturn replaceEqualDeep(prevData, data);\n\t}\n\treturn data;\n}\n/**\n* Intended to be passed as a query's `placeholderData` option, for example\n* `placeholderData: keepPreviousData`. Instead of resetting the query's data to `undefined` while a new\n* query key is fetching, it keeps displaying the previously fetched data until the new data arrives.\n*\n* @example\n* ```ts\n* new QueryObserver(queryClient, {\n* queryKey: ['posts', page],\n* queryFn: () => fetchPosts(page),\n* placeholderData: keepPreviousData,\n* })\n* ```\n*/\nfunction keepPreviousData(previousData) {\n\treturn previousData;\n}\nfunction addToEnd(items, item, max = 0) {\n\tconst newItems = [...items, item];\n\treturn max && newItems.length > max ? newItems.slice(1) : newItems;\n}\nfunction addToStart(items, item, max = 0) {\n\tconst newItems = [item, ...items];\n\treturn max && newItems.length > max ? newItems.slice(0, -1) : newItems;\n}\n/**\n* Sentinel value that can be passed as a query's `queryFn` to conditionally disable the query (equivalent\n* to `enabled: false`) while preserving full type inference for the query's data. Unlike `enabled: false`,\n* a query disabled via `skipToken` cannot be triggered with `refetch`.\n*\n* @example\n* ```ts\n* new QueryObserver(queryClient, {\n* queryKey: ['post', postId],\n* queryFn: postId != null ? () => fetchPost(postId) : skipToken,\n* })\n* ```\n*/\nconst skipToken = Symbol();\nfunction ensureQueryFn(options, fetchOptions) {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif (options.queryFn === skipToken) console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`);\n\t}\n\tif (!options.queryFn && fetchOptions?.initialPromise) return () => fetchOptions.initialPromise;\n\tif (!options.queryFn || options.queryFn === skipToken) return () => Promise.reject(/* @__PURE__ */ new Error(`Missing queryFn: '${options.queryHash}'`));\n\treturn options.queryFn;\n}\n/**\n* Resolves a `throwOnError` option to a boolean.\n* If `throwOnError` is a function, it is called with `params` (e.g. the error and, depending on the caller,\n* additional context such as the query or mutation) and its result is returned, allowing the throwing\n* behavior to be decided per error. Otherwise, `throwOnError` itself is coerced to a boolean (`undefined`\n* resolves to `false`).\n*\n* @example\n* ```ts\n* const throwOnError =\n* query.state.error && typeof options.throwOnError === 'function'\n* ? shouldThrowError(options.throwOnError, [query.state.error, query])\n* : options.throwOnError\n* ```\n*/\nfunction shouldThrowError(throwOnError, params) {\n\tif (typeof throwOnError === \"function\") return throwOnError(...params);\n\treturn !!throwOnError;\n}\nfunction addConsumeAwareSignal(object, getSignal, onCancelled) {\n\tlet consumed = false;\n\tlet signal;\n\tObject.defineProperty(object, \"signal\", {\n\t\tenumerable: true,\n\t\tget: () => {\n\t\t\tsignal ??= getSignal();\n\t\t\tif (consumed) return signal;\n\t\t\tconsumed = true;\n\t\t\tif (signal.aborted) onCancelled();\n\t\t\telse signal.addEventListener(\"abort\", onCancelled, { once: true });\n\t\t\treturn signal;\n\t\t}\n\t});\n\treturn object;\n}\n//#endregion\nexport { addConsumeAwareSignal, addToEnd, addToStart, ensureQueryFn, functionalUpdate, hashKey, hashQueryKeyByOptions, isPlainArray, isPlainObject, isServer, isValidTimeout, keepPreviousData, matchMutation, matchQuery, noop, partialMatchKey, replaceData, replaceEqualDeep, resolveQueryValue, shallowEqualObjects, shouldThrowError, skipToken, sleep, timeUntilStale };\n\n//# sourceMappingURL=utils.js.map","import { isServer as isServer$1 } from \"./utils.js\";\n//#region src/environmentManager.ts\nlet isServerFn = () => isServer$1;\n/**\n* Returns whether the current runtime should be treated as a server environment.\n*/\nconst isServer = () => isServerFn();\n/**\n* Manages how TanStack Query detects whether the current runtime should be treated as\n* server-side, which disables scheduling refetch timers and changes the default `retry` count\n* and `gcTime`. By default, the detection treats a missing `window` (or the presence of a\n* `Deno` global) as server.\n*\n* Override this for runtimes where that default detection would give the wrong answer — for\n* example, a Service Worker, where `window` is undefined even though the environment should\n* behave like a client.\n*\n* @example\n* ```ts\n* import { environmentManager } from '@tanstack/query-core'\n*\n* environmentManager.setIsServer(() => false)\n* ```\n*/\nconst environmentManager = {\n\tisServer,\n\t/**\n\t* Overrides the server check globally.\n\t*/\n\tsetIsServer(isServerValue) {\n\t\tisServerFn = isServerValue;\n\t}\n};\n//#endregion\nexport { environmentManager, isServer };\n\n//# sourceMappingURL=environmentManager.js.map","//#region src/subscribable.ts\n/**\n* The base class behind everything in Query that you can subscribe to: `QueryCache`, `MutationCache`,\n* the observers, and the `FocusManager`/`OnlineManager` behind `focusManager` and `onlineManager`.\n* Subclasses decide what a listener receives and when it is called.\n*/\nvar Subscribable = class {\n\tconstructor() {\n\t\tthis.listeners = /* @__PURE__ */ new Set();\n\t\tthis.subscribe = this.subscribe.bind(this);\n\t}\n\t/**\n\t* Registers a listener to be called on every update this object notifies about. Returns a function\n\t* that removes the listener again — call it to stop listening. The base class never drops a listener\n\t* on its own, though some subclasses clear all of theirs in `destroy()`.\n\t* @param listener - Called on each update, with whatever the subclass passes to its subscribers.\n\t* @example\n\t* ```ts\n\t* const unsubscribe = subscribable.subscribe(() => {\n\t* // react to the update\n\t* })\n\t*\n\t* unsubscribe()\n\t* ```\n\t*/\n\tsubscribe(listener) {\n\t\tthis.listeners.add(listener);\n\t\tthis.onSubscribe();\n\t\treturn () => {\n\t\t\tthis.listeners.delete(listener);\n\t\t\tthis.onUnsubscribe();\n\t\t};\n\t}\n\t/**\n\t* Returns `true` while at least one listener is registered, `false` once they have all unsubscribed.\n\t*/\n\thasListeners() {\n\t\treturn this.listeners.size > 0;\n\t}\n\tonSubscribe() {}\n\tonUnsubscribe() {}\n};\n//#endregion\nexport { Subscribable };\n\n//# sourceMappingURL=subscribable.js.map","import { Subscribable } from \"./subscribable.js\";\n//#region src/focusManager.ts\n/**\n* The `FocusManager` manages the focus state within TanStack Query.\n*\n* It can be used to change the default event listeners or to manually change the focus state.\n*/\nvar FocusManager = class extends Subscribable {\n\t#focused;\n\t#cleanup;\n\t#setup;\n\tconstructor() {\n\t\tsuper();\n\t\tthis.#setup = (onFocus) => {\n\t\t\tif (typeof window !== \"undefined\" && window.addEventListener) {\n\t\t\t\tconst listener = () => onFocus();\n\t\t\t\twindow.addEventListener(\"visibilitychange\", listener, false);\n\t\t\t\treturn () => {\n\t\t\t\t\twindow.removeEventListener(\"visibilitychange\", listener);\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n\tonSubscribe() {\n\t\tif (!this.#cleanup) this.setEventListener(this.#setup);\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) {\n\t\t\tthis.#cleanup?.();\n\t\t\tthis.#cleanup = void 0;\n\t\t}\n\t}\n\t/**\n\t* `setEventListener` can be used to set a custom event listener that will\n\t* be used to determine the focus state. The provided `setup` function\n\t* receives a `setFocused` callback: call it with a `boolean` to manually\n\t* set the focus state, or with no arguments to re-evaluate the current\n\t* focus state and notify subscribers.\n\t*\n\t* @example\n\t* ```ts\n\t* import { focusManager } from '@tanstack/query-core'\n\t*\n\t* focusManager.setEventListener((handleFocus) => {\n\t* const listener = () => handleFocus()\n\t* // Listen to visibilitychange\n\t* if (typeof window !== 'undefined' && window.addEventListener) {\n\t* window.addEventListener('visibilitychange', listener, false)\n\t* }\n\t*\n\t* return () => {\n\t* // Be sure to unsubscribe if a new handler is set\n\t* window.removeEventListener('visibilitychange', listener)\n\t* }\n\t* })\n\t* ```\n\t*/\n\tsetEventListener(setup) {\n\t\tthis.#setup = setup;\n\t\tthis.#cleanup?.();\n\t\tthis.#cleanup = setup((focused) => {\n\t\t\tif (typeof focused === \"boolean\") this.setFocused(focused);\n\t\t\telse this.onFocus();\n\t\t});\n\t}\n\t/**\n\t* `setFocused` can be used to manually set the focus state. Set `undefined`\n\t* to fall back to the default focus check.\n\t*\n\t* @example\n\t* ```ts\n\t* import { focusManager } from '@tanstack/query-core'\n\t*\n\t* // Set focused\n\t* focusManager.setFocused(true)\n\t*\n\t* // Set unfocused\n\t* focusManager.setFocused(false)\n\t*\n\t* // Fallback to the default focus check\n\t* focusManager.setFocused(undefined)\n\t* ```\n\t*/\n\tsetFocused(focused) {\n\t\tif (this.#focused !== focused) {\n\t\t\tthis.#focused = focused;\n\t\t\tthis.onFocus();\n\t\t}\n\t}\n\t/**\n\t* `onFocus` notifies all subscribed listeners with the current focus state.\n\t*/\n\tonFocus() {\n\t\tconst isFocused = this.isFocused();\n\t\tthis.listeners.forEach((listener) => {\n\t\t\tlistener(isFocused);\n\t\t});\n\t}\n\t/**\n\t* `isFocused` can be used to get the current focus state.\n\t*/\n\tisFocused() {\n\t\tif (typeof this.#focused === \"boolean\") return this.#focused;\n\t\treturn globalThis.document?.visibilityState !== \"hidden\";\n\t}\n};\n/**\n* Singleton instance of {@link FocusManager}, used to manage and observe the focus state within TanStack Query.\n*/\nconst focusManager = new FocusManager();\n//#endregion\nexport { FocusManager, focusManager };\n\n//# sourceMappingURL=focusManager.js.map","import { systemSetTimeoutZero } from \"./timeoutManager.js\";\n//#region src/notifyManager.ts\n/**\n* Default scheduling function used by the notify manager.\n* Schedules the callback with the system's `setTimeout(callback, 0)`.\n*/\nconst defaultScheduler = systemSetTimeoutZero;\nfunction createNotifyManager() {\n\tlet queue = [];\n\tlet transactions = 0;\n\tlet notifyFn = (callback) => {\n\t\tcallback();\n\t};\n\tlet batchNotifyFn = (callback) => {\n\t\tcallback();\n\t};\n\tlet scheduleFn = defaultScheduler;\n\tconst schedule = (callback) => {\n\t\tif (transactions) queue.push(callback);\n\t\telse scheduleFn(() => {\n\t\t\tnotifyFn(callback);\n\t\t});\n\t};\n\tconst flush = () => {\n\t\tconst originalQueue = queue;\n\t\tqueue = [];\n\t\tif (originalQueue.length) scheduleFn(() => {\n\t\t\tbatchNotifyFn(() => {\n\t\t\t\toriginalQueue.forEach((callback) => {\n\t\t\t\t\tnotifyFn(callback);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n\treturn {\n\t\t/**\n\t\t* Batches all updates scheduled inside the passed callback.\n\t\t* This is mainly used internally to optimize query client updating.\n\t\t* Batches can be nested; the queue is only flushed once the outermost `batch` call finishes.\n\t\t* The return value of `callback` is passed through.\n\t\t*/\n\t\tbatch: (callback) => {\n\t\t\tlet result;\n\t\t\ttransactions++;\n\t\t\ttry {\n\t\t\t\tresult = callback();\n\t\t\t} finally {\n\t\t\t\ttransactions--;\n\t\t\t\tif (!transactions) flush();\n\t\t\t}\n\t\t\treturn result;\n\t\t},\n\t\t/**\n\t\t* All calls to the wrapped function will be batched.\n\t\t*/\n\t\tbatchCalls: (callback) => {\n\t\t\treturn (...args) => {\n\t\t\t\tschedule(() => {\n\t\t\t\t\tcallback(...args);\n\t\t\t\t});\n\t\t\t};\n\t\t},\n\t\t/**\n\t\t* Schedules a function to be run on the next batch.\n\t\t* By default, the batch is run with a `setTimeout`, but this can be configured via `setScheduler`.\n\t\t*/\n\t\tschedule,\n\t\t/**\n\t\t* Use this method to set a custom notify function.\n\t\t* This can be used to for example wrap notifications with `React.act` while running tests.\n\t\t*/\n\t\tsetNotifyFunction: (fn) => {\n\t\t\tnotifyFn = fn;\n\t\t},\n\t\t/**\n\t\t* Use this method to set a custom function to batch notifications together into a single tick.\n\t\t* Framework adapters use this to plug in their own batching primitive, so that a single query\n\t\t* update only triggers one re-render instead of one per subscriber.\n\t\t*\n\t\t* @example\n\t\t* ```ts\n\t\t* import { notifyManager } from '@tanstack/query-core'\n\t\t* import { batch } from 'solid-js'\n\t\t*\n\t\t* notifyManager.setBatchNotifyFunction(batch)\n\t\t* ```\n\t\t*/\n\t\tsetBatchNotifyFunction: (fn) => {\n\t\t\tbatchNotifyFn = fn;\n\t\t},\n\t\t/**\n\t\t* Configures a custom callback that schedules when the next batch runs.\n\t\t* The default behavior is `setTimeout(callback, 0)`.\n\t\t*\n\t\t* @example\n\t\t* ```ts\n\t\t* import { notifyManager } from '@tanstack/query-core'\n\t\t*\n\t\t* // Schedule batches in the next microtask\n\t\t* notifyManager.setScheduler(queueMicrotask)\n\t\t*\n\t\t* // Schedule batches before the next frame is rendered\n\t\t* notifyManager.setScheduler(requestAnimationFrame)\n\t\t*\n\t\t* // Schedule batches some time in the future\n\t\t* notifyManager.setScheduler((cb) => setTimeout(cb, 10))\n\t\t* ```\n\t\t*/\n\t\tsetScheduler: (fn) => {\n\t\t\tscheduleFn = fn;\n\t\t}\n\t};\n}\n/**\n* Handles scheduling and batching callbacks in TanStack Query.\n*/\nconst notifyManager = createNotifyManager();\n//#endregion\nexport { createNotifyManager, defaultScheduler, notifyManager };\n\n//# sourceMappingURL=notifyManager.js.map","import { Subscribable } from \"./subscribable.js\";\n//#region src/onlineManager.ts\n/**\n* The `OnlineManager` manages the online state within TanStack Query. It can\n* be used to change the default event listeners or to manually change the\n* online state.\n*\n* By default, the `onlineManager` assumes an active network connection, and\n* listens to the `online` and `offline` events on the `window` object to\n* detect changes.\n*/\nvar OnlineManager = class extends Subscribable {\n\t#online = true;\n\t#cleanup;\n\t#setup;\n\tconstructor() {\n\t\tsuper();\n\t\tthis.#setup = (onOnline) => {\n\t\t\tif (typeof window !== \"undefined\" && window.addEventListener) {\n\t\t\t\tconst onlineListener = () => onOnline(true);\n\t\t\t\tconst offlineListener = () => onOnline(false);\n\t\t\t\twindow.addEventListener(\"online\", onlineListener, false);\n\t\t\t\twindow.addEventListener(\"offline\", offlineListener, false);\n\t\t\t\treturn () => {\n\t\t\t\t\twindow.removeEventListener(\"online\", onlineListener);\n\t\t\t\t\twindow.removeEventListener(\"offline\", offlineListener);\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n\tonSubscribe() {\n\t\tif (!this.#cleanup) this.setEventListener(this.#setup);\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) {\n\t\t\tthis.#cleanup?.();\n\t\t\tthis.#cleanup = void 0;\n\t\t}\n\t}\n\t/**\n\t* `setEventListener` can be used to set a custom event listener that will\n\t* be used to determine the online state. The provided `setup` function\n\t* receives a `setOnline` callback that should be called with a `boolean`\n\t* whenever the online state changes.\n\t*\n\t* @example\n\t* ```ts\n\t* import NetInfo from '@react-native-community/netinfo'\n\t* import { onlineManager } from '@tanstack/query-core'\n\t*\n\t* onlineManager.setEventListener((setOnline) => {\n\t* return NetInfo.addEventListener((state) => {\n\t* setOnline(!!state.isConnected)\n\t* })\n\t* })\n\t* ```\n\t*/\n\tsetEventListener(setup) {\n\t\tthis.#setup = setup;\n\t\tthis.#cleanup?.();\n\t\tthis.#cleanup = setup(this.setOnline.bind(this));\n\t}\n\t/**\n\t* `setOnline` can be used to manually set the online state.\n\t*\n\t* @example\n\t* ```ts\n\t* import { onlineManager } from '@tanstack/query-core'\n\t*\n\t* // Set to online\n\t* onlineManager.setOnline(true)\n\t*\n\t* // Set to offline\n\t* onlineManager.setOnline(false)\n\t* ```\n\t*/\n\tsetOnline(online) {\n\t\tif (this.#online !== online) {\n\t\t\tthis.#online = online;\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(online);\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* `isOnline` can be used to get the current online state.\n\t*/\n\tisOnline() {\n\t\treturn this.#online;\n\t}\n};\n/**\n* Singleton instance of {@link OnlineManager}, used to manage and observe the online state within TanStack Query.\n*/\nconst onlineManager = new OnlineManager();\n//#endregion\nexport { OnlineManager, onlineManager };\n\n//# sourceMappingURL=onlineManager.js.map","import { noop, sleep } from \"./utils.js\";\nimport { isServer } from \"./environmentManager.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\n//#region src/retryer.ts\nfunction defaultRetryDelay(failureCount) {\n\treturn Math.min(1e3 * 2 ** failureCount, 3e4);\n}\nfunction canFetch(networkMode) {\n\treturn (networkMode ?? \"online\") === \"online\" ? onlineManager.isOnline() : true;\n}\n/**\n* The error thrown by a `Retryer` (and surfaced to `query.promise`/`mutation`) when a fetch is cancelled, e.g. via\n* `query.cancel()`. `revert`, if `true`, tells the caller to restore the state the query was in before the fetch\n* started instead of surfacing the error. `silent`, if `true`, tells the caller to suppress this error and instead\n* resolve with the promise of the fetch that triggered the cancellation.\n* @example\n* ```ts\n* query.cancel()\n*\n* try {\n* await query.promise\n* } catch (error) {\n* if (error instanceof CancelledError) {\n* // the fetch was cancelled, e.g. via `query.cancel()`\n* }\n* }\n* ```\n*/\nvar CancelledError = class extends Error {\n\tconstructor(options) {\n\t\tsuper(\"CancelledError\");\n\t\tthis.revert = options?.revert;\n\t\tthis.silent = options?.silent;\n\t}\n};\n/**\n* @deprecated Use instanceof `CancelledError` instead.\n*/\nfunction isCancelledError(value) {\n\treturn value instanceof CancelledError;\n}\nfunction createRetryer(config) {\n\tlet isRetryCancelled = false;\n\tlet failureCount = 0;\n\tlet continueFn;\n\tlet status = \"pending\";\n\tlet promiseResolve;\n\tlet promiseReject;\n\tconst promise = new Promise((resolve, reject) => {\n\t\tpromiseResolve = resolve;\n\t\tpromiseReject = reject;\n\t});\n\tpromise.catch(noop);\n\tconst isResolved = () => status !== \"pending\";\n\tconst cancel = (cancelOptions) => {\n\t\tif (!isResolved()) {\n\t\t\tconst error = new CancelledError(cancelOptions);\n\t\t\treject(error);\n\t\t\tconfig.onCancel?.(error);\n\t\t}\n\t};\n\tconst cancelRetry = () => {\n\t\tisRetryCancelled = true;\n\t};\n\tconst continueRetry = () => {\n\t\tisRetryCancelled = false;\n\t};\n\tconst canContinue = () => focusManager.isFocused() && (config.networkMode === \"always\" || onlineManager.isOnline()) && config.canRun();\n\tconst canStart = () => canFetch(config.networkMode) && config.canRun();\n\tconst resolve = (value) => {\n\t\tif (!isResolved()) {\n\t\t\tcontinueFn?.();\n\t\t\tstatus = \"resolved\";\n\t\t\tpromiseResolve(value);\n\t\t}\n\t};\n\tconst reject = (value) => {\n\t\tif (!isResolved()) {\n\t\t\tcontinueFn?.();\n\t\t\tstatus = \"rejected\";\n\t\t\tpromiseReject(value);\n\t\t}\n\t};\n\tconst pause = () => {\n\t\treturn new Promise((continueResolve) => {\n\t\t\tcontinueFn = (value) => {\n\t\t\t\tif (isResolved() || canContinue()) continueResolve(value);\n\t\t\t};\n\t\t\tconfig.onPause?.();\n\t\t}).then(() => {\n\t\t\tcontinueFn = void 0;\n\t\t\tif (!isResolved()) config.onContinue?.();\n\t\t});\n\t};\n\tconst run = () => {\n\t\tif (isResolved()) return;\n\t\tlet promiseOrValue;\n\t\tconst initialPromise = failureCount === 0 ? config.initialPromise : void 0;\n\t\ttry {\n\t\t\tpromiseOrValue = initialPromise ?? config.fn();\n\t\t} catch (error) {\n\t\t\tpromiseOrValue = Promise.reject(error);\n\t\t}\n\t\tPromise.resolve(promiseOrValue).then(resolve).catch((error) => {\n\t\t\tif (isResolved()) return;\n\t\t\tconst retry = config.retry ?? (isServer() ? 0 : 3);\n\t\t\tconst retryDelay = config.retryDelay ?? defaultRetryDelay;\n\t\t\tconst delay = typeof retryDelay === \"function\" ? retryDelay(failureCount, error) : retryDelay;\n\t\t\tconst shouldRetry = retry === true || typeof retry === \"number\" && failureCount < retry || typeof retry === \"function\" && retry(failureCount, error);\n\t\t\tif (isRetryCancelled || !shouldRetry) {\n\t\t\t\treject(error);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfailureCount++;\n\t\t\tconfig.onFail?.(failureCount, error);\n\t\t\tsleep(delay).then(() => {\n\t\t\t\treturn canContinue() ? void 0 : pause();\n\t\t\t}).then(() => {\n\t\t\t\tif (isRetryCancelled) reject(error);\n\t\t\t\telse run();\n\t\t\t});\n\t\t});\n\t};\n\treturn {\n\t\tpromise,\n\t\tstatus: () => status,\n\t\tcancel,\n\t\tcontinue: () => {\n\t\t\tcontinueFn?.();\n\t\t\treturn promise;\n\t\t},\n\t\tcancelRetry,\n\t\tcontinueRetry,\n\t\tcanStart,\n\t\tstart: () => {\n\t\t\tif (canStart()) run();\n\t\t\telse pause().then(run);\n\t\t\treturn promise;\n\t\t}\n\t};\n}\n//#endregion\nexport { CancelledError, canFetch, createRetryer, isCancelledError };\n\n//# sourceMappingURL=retryer.js.map","import { timeoutManager } from \"./timeoutManager.js\";\nimport { isValidTimeout } from \"./utils.js\";\nimport { isServer } from \"./environmentManager.js\";\n//#region src/removable.ts\n/**\n* The base class for cache entries that are garbage collected once nothing is using them —\n* `Query` and `Mutation` both extend it. `gcTime` controls how long an unused entry is kept.\n*/\nvar Removable = class {\n\t#gcTimeout;\n\t/**\n\t* Clears the pending garbage collection timeout, so the entry is no longer scheduled for removal.\n\t* A subclass may override this to release what it holds on to as well — `Query` also cancels any\n\t* in-flight fetch.\n\t*/\n\tdestroy() {\n\t\tthis.clearGcTimeout();\n\t}\n\tscheduleGc() {\n\t\tthis.clearGcTimeout();\n\t\tif (isValidTimeout(this.gcTime)) this.#gcTimeout = timeoutManager.setTimeout(() => {\n\t\t\tthis.optionalRemove();\n\t\t}, this.gcTime);\n\t}\n\tupdateGcTime(newGcTime) {\n\t\tthis.gcTime = Math.max(this.gcTime || 0, newGcTime ?? (isServer() ? Infinity : 3e5));\n\t}\n\tclearGcTimeout() {\n\t\tif (this.#gcTimeout !== void 0) {\n\t\t\ttimeoutManager.clearTimeout(this.#gcTimeout);\n\t\t\tthis.#gcTimeout = void 0;\n\t\t}\n\t}\n};\n//#endregion\nexport { Removable };\n\n//# sourceMappingURL=removable.js.map","import { addConsumeAwareSignal, addToEnd, addToStart, ensureQueryFn } from \"./utils.js\";\n//#region src/infiniteQueryBehavior.ts\nfunction infiniteQueryBehavior(pages) {\n\treturn { onFetch: (context, query) => {\n\t\tconst options = context.options;\n\t\tconst direction = context.fetchOptions?.meta?.fetchMore?.direction;\n\t\tconst oldPages = context.state.data?.pages || [];\n\t\tconst oldPageParams = context.state.data?.pageParams || [];\n\t\tlet result = {\n\t\t\tpages: [],\n\t\t\tpageParams: []\n\t\t};\n\t\tlet currentPage = 0;\n\t\tconst fetchFn = async () => {\n\t\t\tlet cancelled = false;\n\t\t\tconst addSignalProperty = (object) => {\n\t\t\t\taddConsumeAwareSignal(object, () => context.signal, () => cancelled = true);\n\t\t\t};\n\t\t\tconst queryFn = ensureQueryFn(context.options, context.fetchOptions);\n\t\t\tconst fetchPage = async (data, param, previous) => {\n\t\t\t\tif (cancelled) return Promise.reject(context.signal.reason);\n\t\t\t\tif (param == null && data.pages.length) return Promise.resolve(data);\n\t\t\t\tconst createQueryFnContext = () => {\n\t\t\t\t\tconst queryFnContext = {\n\t\t\t\t\t\tclient: context.client,\n\t\t\t\t\t\tqueryKey: context.queryKey,\n\t\t\t\t\t\tpageParam: param,\n\t\t\t\t\t\tdirection: previous ? \"backward\" : \"forward\",\n\t\t\t\t\t\tmeta: context.options.meta\n\t\t\t\t\t};\n\t\t\t\t\taddSignalProperty(queryFnContext);\n\t\t\t\t\treturn queryFnContext;\n\t\t\t\t};\n\t\t\t\tconst queryFnContext = createQueryFnContext();\n\t\t\t\tconst page = await queryFn(queryFnContext);\n\t\t\t\tconst { maxPages } = context.options;\n\t\t\t\tconst addTo = previous ? addToStart : addToEnd;\n\t\t\t\treturn {\n\t\t\t\t\tpages: addTo(data.pages, page, maxPages),\n\t\t\t\t\tpageParams: addTo(data.pageParams, param, maxPages)\n\t\t\t\t};\n\t\t\t};\n\t\t\tif (direction && oldPages.length) {\n\t\t\t\tconst previous = direction === \"backward\";\n\t\t\t\tconst pageParamFn = previous ? getPreviousPageParam : getNextPageParam;\n\t\t\t\tconst oldData = {\n\t\t\t\t\tpages: oldPages,\n\t\t\t\t\tpageParams: oldPageParams\n\t\t\t\t};\n\t\t\t\tresult = await fetchPage(oldData, pageParamFn(options, oldData), previous);\n\t\t\t} else {\n\t\t\t\tconst remainingPages = pages ?? oldPages.length;\n\t\t\t\tdo {\n\t\t\t\t\tconst param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);\n\t\t\t\t\tif (currentPage > 0 && param == null) break;\n\t\t\t\t\tresult = await fetchPage(result, param);\n\t\t\t\t\tcurrentPage++;\n\t\t\t\t} while (currentPage < remainingPages);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\tif (context.options.persister) context.fetchFn = () => {\n\t\t\treturn context.options.persister?.(fetchFn, {\n\t\t\t\tclient: context.client,\n\t\t\t\tqueryKey: context.queryKey,\n\t\t\t\tmeta: context.options.meta,\n\t\t\t\tsignal: context.signal\n\t\t\t}, query);\n\t\t};\n\t\telse context.fetchFn = fetchFn;\n\t} };\n}\nfunction getNextPageParam(options, { pages, pageParams }) {\n\tconst lastIndex = pages.length - 1;\n\treturn pages.length > 0 ? options.getNextPageParam(pages[lastIndex], pages, pageParams[lastIndex], pageParams) : void 0;\n}\nfunction getPreviousPageParam(options, { pages, pageParams }) {\n\treturn pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;\n}\n/**\n* Checks if there is a next page.\n*/\nfunction hasNextPage(options, data) {\n\tif (!data) return false;\n\treturn getNextPageParam(options, data) != null;\n}\n/**\n* Checks if there is a previous page.\n*/\nfunction hasPreviousPage(options, data) {\n\tif (!data || !options.getPreviousPageParam) return false;\n\treturn getPreviousPageParam(options, data) != null;\n}\n//#endregion\nexport { hasNextPage, hasPreviousPage, infiniteQueryBehavior };\n\n//# sourceMappingURL=infiniteQueryBehavior.js.map","import { ensureQueryFn, noop, replaceData, resolveQueryValue, skipToken, timeUntilStale } from \"./utils.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { CancelledError, canFetch, createRetryer } from \"./retryer.js\";\nimport { Removable } from \"./removable.js\";\nimport { infiniteQueryBehavior } from \"./infiniteQueryBehavior.js\";\n//#region src/query.ts\n/**\n* Represents a single cached query. A `Query` holds the query's key, options,\n* state (data/error/status), and the observers currently subscribed to it.\n*\n* Instances are created and managed internally by `QueryCache`; application\n* code typically interacts with queries indirectly through `QueryClient` or\n* a framework hook like `useQuery`. Direct access to a `Query` instance is\n* possible via `queryCache.find()`/`findAll()` for inspecting cache state.\n*\n* @example\n* ```ts\n* const queryCache = queryClient.getQueryCache()\n* const query = queryCache.find({ queryKey: ['posts'] })\n*\n* if (query) {\n* console.log(query.state.dataUpdatedAt)\n* }\n* ```\n*/\nvar Query = class extends Removable {\n\t#queryType;\n\t#initialState;\n\t#revertState;\n\t#cache;\n\t#client;\n\t#retryer;\n\t#defaultOptions;\n\t#abortSignalConsumed;\n\tconstructor(config) {\n\t\tsuper();\n\t\tthis.#abortSignalConsumed = false;\n\t\tthis.#defaultOptions = config.defaultOptions;\n\t\tthis.setOptions(config.options);\n\t\tthis.observers = [];\n\t\tthis.#client = config.client;\n\t\tthis.#cache = this.#client.getQueryCache();\n\t\tthis.queryKey = config.queryKey;\n\t\tthis.queryHash = config.queryHash;\n\t\tthis.#initialState = getDefaultState(this.options);\n\t\tthis.state = config.state ?? this.#initialState;\n\t\tthis.scheduleGc();\n\t}\n\t/**\n\t* The `meta` object passed in the query's options, if any.\n\t*/\n\tget meta() {\n\t\treturn this.options.meta;\n\t}\n\t/** @internal */\n\tget queryType() {\n\t\treturn this.#queryType;\n\t}\n\t/**\n\t* The promise for the currently in-flight fetch, if the query is fetching.\n\t* `undefined` when the query is not fetching.\n\t*/\n\tget promise() {\n\t\treturn this.#retryer?.promise;\n\t}\n\t/** @internal */\n\tsetOptions(options) {\n\t\tthis.options = {\n\t\t\t...this.#defaultOptions,\n\t\t\t...options\n\t\t};\n\t\tif (options?._type) this.#queryType = options._type;\n\t\tthis.updateGcTime(this.options.gcTime);\n\t\tif (this.state && this.state.data === void 0) {\n\t\t\tconst defaultState = getDefaultState(this.options);\n\t\t\tif (defaultState.data !== void 0) {\n\t\t\t\tthis.setState(successState(defaultState.data, defaultState.dataUpdatedAt));\n\t\t\t\tthis.#initialState = defaultState;\n\t\t\t}\n\t\t}\n\t}\n\toptionalRemove() {\n\t\tif (!this.observers.length && this.state.fetchStatus === \"idle\") this.#cache.remove(this);\n\t}\n\t/** @internal */\n\tsetData(newData, options) {\n\t\tconst data = replaceData(this.state.data, newData, this.options);\n\t\tthis.#dispatch({\n\t\t\tdata,\n\t\t\ttype: \"success\",\n\t\t\tdataUpdatedAt: options?.updatedAt,\n\t\t\tmanual: options?.manual\n\t\t});\n\t\treturn data;\n\t}\n\t/**\n\t* Merges the given partial state directly into this query's state, notifying observers. Used\n\t* by persistence and broadcast plugins to restore a state snapshot, and by devtools to let a\n\t* user manually trigger a loading/error state or edit the cached data.\n\t*/\n\tsetState(state) {\n\t\tthis.#dispatch({\n\t\t\ttype: \"setState\",\n\t\t\tstate\n\t\t});\n\t}\n\t/**\n\t* Cancels the query's currently in-flight fetch, if any.\n\t* - Returns a promise that resolves once the cancellation has settled.\n\t* - If no fetch is in progress, resolves immediately.\n\t*\n\t* @example\n\t* ```ts\n\t* await query.cancel()\n\t* ```\n\t*/\n\tcancel(options) {\n\t\tconst promise = this.#retryer?.promise;\n\t\tthis.#retryer?.cancel(options);\n\t\treturn promise ? promise.then(noop).catch(noop) : Promise.resolve();\n\t}\n\t/**\n\t* Clears the query's garbage collection timeout and silently cancels any\n\t* in-flight fetch. Called by `QueryCache` when the query is removed from\n\t* the cache.\n\t*\n\t* @see {@link Query#cancel}\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.cancel({ silent: true });\n\t}\n\t/** @internal */\n\tget resetState() {\n\t\treturn this.#initialState;\n\t}\n\t/**\n\t* Resets the query back to its initial state (the state it had when it was\n\t* first created, e.g. any `initialData`), destroying it first to cancel any\n\t* in-flight fetch.\n\t*/\n\treset() {\n\t\tthis.destroy();\n\t\tthis.setState(this.resetState);\n\t}\n\t/**\n\t* Returns `true` if the query has at least one observer for which `enabled`\n\t* does not resolve to `false`.\n\t*/\n\tisActive() {\n\t\treturn this.observers.some((observer) => resolveQueryValue(observer.options.enabled, this) !== false);\n\t}\n\t/**\n\t* Returns `true` if the query is disabled, meaning it will not fetch\n\t* automatically.\n\t* - If the query has observers, it is disabled when none of them are active\n\t* (see `isActive`).\n\t* - If the query has no observers, it is disabled when its `queryFn` is\n\t* `skipToken` or it has never been fetched.\n\t*/\n\tisDisabled() {\n\t\tif (this.getObserversCount() > 0) return !this.isActive();\n\t\treturn this.options.queryFn === skipToken || !this.isFetched();\n\t}\n\t/**\n\t* Returns `true` if the query has been fetched, i.e. it has resolved with\n\t* either data or an error at least once.\n\t*/\n\tisFetched() {\n\t\treturn this.state.dataUpdateCount + this.state.errorUpdateCount > 0;\n\t}\n\t/**\n\t* Returns `true` if the query has at least one observer configured with\n\t* `staleTime: 'static'`, meaning it is treated as never stale.\n\t*/\n\tisStatic() {\n\t\tif (this.getObserversCount() > 0) return this.observers.some((observer) => resolveQueryValue(observer.options.staleTime, this) === \"static\");\n\t\treturn false;\n\t}\n\t/**\n\t* Returns `true` if the query is stale.\n\t* - If the query has observers, defers to whether any observer's current\n\t* result reports `isStale` (which accounts for each observer's own\n\t* `staleTime` and `enabled` state).\n\t* - If the query has no observers, it is considered stale when it has no\n\t* data or has been invalidated.\n\t*\n\t* @see {@link Query#isStaleByTime}\n\t* @example\n\t* ```ts\n\t* if (query.isStale()) {\n\t* // refetch or otherwise treat the cached data as outdated\n\t* }\n\t* ```\n\t*/\n\tisStale() {\n\t\tif (this.getObserversCount() > 0) return this.observers.some((observer) => observer.getCurrentResult().isStale);\n\t\treturn this.state.data === void 0 || this.state.isInvalidated;\n\t}\n\t/**\n\t* Returns `true` if the query's data is stale relative to the given\n\t* `staleTime` (defaults to `0`).\n\t* - A query with no data is always stale.\n\t* - `staleTime: 'static'` is never stale.\n\t* - An invalidated query is always stale.\n\t* - Otherwise, staleness is based on elapsed time since `dataUpdatedAt`.\n\t*\n\t* @see {@link Query#isStale}\n\t* @example\n\t* ```ts\n\t* const isStale = query.isStaleByTime(1000 * 60)\n\t* ```\n\t*/\n\tisStaleByTime(staleTime = 0) {\n\t\tif (this.state.data === void 0) return true;\n\t\tif (staleTime === \"static\") return false;\n\t\tif (this.state.isInvalidated) return true;\n\t\treturn !timeUntilStale(this.state.dataUpdatedAt, staleTime);\n\t}\n\t/** @internal */\n\tonFocus() {\n\t\tthis.observers.find((x) => x.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: false });\n\t\tthis.#retryer?.continue();\n\t}\n\t/** @internal */\n\tonOnline() {\n\t\tthis.observers.find((x) => x.shouldFetchOnReconnect())?.refetch({ cancelRefetch: false });\n\t\tthis.#retryer?.continue();\n\t}\n\t/** @internal */\n\taddObserver(observer) {\n\t\tif (!this.observers.includes(observer)) {\n\t\t\tthis.observers.push(observer);\n\t\t\tthis.clearGcTimeout();\n\t\t\tthis.#cache.notify({\n\t\t\t\ttype: \"observerAdded\",\n\t\t\t\tquery: this,\n\t\t\t\tobserver\n\t\t\t});\n\t\t}\n\t}\n\t/** @internal */\n\tremoveObserver(observer) {\n\t\tconst index = this.observers.indexOf(observer);\n\t\tif (index !== -1) {\n\t\t\tthis.observers.splice(index, 1);\n\t\t\tif (!this.observers.length) {\n\t\t\t\tif (this.#retryer) {\n\t\t\t\t\tif (this.#abortSignalConsumed || this.state.fetchStatus === \"paused\" && this.state.status === \"pending\") this.#retryer.cancel({ revert: true });\n\t\t\t\t\telse this.#retryer.cancelRetry();\n\t\t\t\t}\n\t\t\t\tthis.scheduleGc();\n\t\t\t}\n\t\t\tthis.#cache.notify({\n\t\t\t\ttype: \"observerRemoved\",\n\t\t\t\tquery: this,\n\t\t\t\tobserver\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Returns the number of observers currently subscribed to this query.\n\t*\n\t* @example\n\t* ```ts\n\t* if (query.getObserversCount() === 0) {\n\t* // no component is currently watching this query\n\t* }\n\t* ```\n\t*/\n\tgetObserversCount() {\n\t\treturn this.observers.length;\n\t}\n\t/**\n\t* Marks the query as invalidated, unless it is already invalidated. This\n\t* updates `state.isInvalidated` and notifies observers, but does not by\n\t* itself trigger a refetch.\n\t*\n\t* @example\n\t* ```ts\n\t* query.invalidate()\n\t* ```\n\t*/\n\tinvalidate() {\n\t\tif (!this.state.isInvalidated) this.#dispatch({ type: \"invalidate\" });\n\t}\n\t/**\n\t* Fetches the query, i.e. runs its `queryFn` (through any configured\n\t* retryer/behavior) and updates the query's state with the result.\n\t* - If a fetch is already in flight, returns its promise instead of\n\t* starting a new one, unless `fetchOptions.cancelRefetch` is set and the\n\t* query already has data, in which case the current fetch is silently\n\t* cancelled first.\n\t* - If `options` is passed, it replaces the query's current options\n\t* before fetching.\n\t*/\n\tasync fetch(options, fetchOptions) {\n\t\tif (this.state.fetchStatus !== \"idle\" && this.#retryer?.status() !== \"rejected\") {\n\t\t\tif (this.state.data !== void 0 && fetchOptions?.cancelRefetch) this.cancel({ silent: true });\n\t\t\telse if (this.#retryer) {\n\t\t\t\tthis.#retryer.continueRetry();\n\t\t\t\treturn this.#retryer.promise;\n\t\t\t}\n\t\t}\n\t\tif (options) this.setOptions(options);\n\t\tif (!this.options.queryFn) {\n\t\t\tconst observer = this.observers.find((x) => x.options.queryFn);\n\t\t\tif (observer) this.setOptions(observer.options);\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (!Array.isArray(this.options.queryKey)) console.error(`As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`);\n\t\t}\n\t\tconst abortController = new AbortController();\n\t\tconst addSignalProperty = (object) => {\n\t\t\tObject.defineProperty(object, \"signal\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => {\n\t\t\t\t\tthis.#abortSignalConsumed = true;\n\t\t\t\t\treturn abortController.signal;\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\t\tconst fetchFn = () => {\n\t\t\tconst queryFn = ensureQueryFn(this.options, fetchOptions);\n\t\t\tconst createQueryFnContext = () => {\n\t\t\t\tconst queryFnContext = {\n\t\t\t\t\tclient: this.#client,\n\t\t\t\t\tqueryKey: this.queryKey,\n\t\t\t\t\tmeta: this.meta\n\t\t\t\t};\n\t\t\t\taddSignalProperty(queryFnContext);\n\t\t\t\treturn queryFnContext;\n\t\t\t};\n\t\t\tconst queryFnContext = createQueryFnContext();\n\t\t\tthis.#abortSignalConsumed = false;\n\t\t\tif (this.options.persister) return this.options.persister(queryFn, queryFnContext, this);\n\t\t\treturn queryFn(queryFnContext);\n\t\t};\n\t\tconst createFetchContext = () => {\n\t\t\tconst context = {\n\t\t\t\tfetchOptions,\n\t\t\t\toptions: this.options,\n\t\t\t\tqueryKey: this.queryKey,\n\t\t\t\tclient: this.#client,\n\t\t\t\tstate: this.state,\n\t\t\t\tfetchFn\n\t\t\t};\n\t\t\taddSignalProperty(context);\n\t\t\treturn context;\n\t\t};\n\t\tconst context = createFetchContext();\n\t\t(this.#queryType === \"infinite\" ? infiniteQueryBehavior(this.options.pages) : this.options.behavior)?.onFetch(context, this);\n\t\tthis.#revertState = this.state;\n\t\tif (this.state.fetchStatus === \"idle\" || this.state.fetchMeta !== context.fetchOptions?.meta) this.#dispatch({\n\t\t\ttype: \"fetch\",\n\t\t\tmeta: context.fetchOptions?.meta\n\t\t});\n\t\tconst retryer = this.#retryer = createRetryer({\n\t\t\tinitialPromise: fetchOptions?.initialPromise,\n\t\t\tfn: context.fetchFn,\n\t\t\tonCancel: (error) => {\n\t\t\t\tif (error instanceof CancelledError && error.revert) this.setState({\n\t\t\t\t\t...this.#revertState,\n\t\t\t\t\tfetchStatus: \"idle\"\n\t\t\t\t});\n\t\t\t\tabortController.abort();\n\t\t\t},\n\t\t\tonFail: (failureCount, error) => {\n\t\t\t\tthis.#dispatch({\n\t\t\t\t\ttype: \"failed\",\n\t\t\t\t\tfailureCount,\n\t\t\t\t\terror\n\t\t\t\t});\n\t\t\t},\n\t\t\tonPause: () => {\n\t\t\t\tthis.#dispatch({ type: \"pause\" });\n\t\t\t},\n\t\t\tonContinue: () => {\n\t\t\t\tthis.#dispatch({ type: \"continue\" });\n\t\t\t},\n\t\t\tretry: context.options.retry,\n\t\t\tretryDelay: context.options.retryDelay,\n\t\t\tnetworkMode: context.options.networkMode,\n\t\t\tcanRun: () => true\n\t\t});\n\t\ttry {\n\t\t\tconst data = await retryer.start();\n\t\t\tif (data === void 0) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`);\n\t\t\t\tthrow new Error(`${this.queryHash} data is undefined`);\n\t\t\t}\n\t\t\tthis.setData(data);\n\t\t\tthis.#cache.config.onSuccess?.(data, this);\n\t\t\tthis.#cache.config.onSettled?.(data, this.state.error, this);\n\t\t\treturn data;\n\t\t} catch (error) {\n\t\t\tif (error instanceof CancelledError) {\n\t\t\t\tif (error.silent) return this.#retryer.promise;\n\t\t\t\telse if (error.revert) {\n\t\t\t\t\tif (this.state.data === void 0) throw error;\n\t\t\t\t\treturn this.state.data;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.#dispatch({\n\t\t\t\ttype: \"error\",\n\t\t\t\terror\n\t\t\t});\n\t\t\tthis.#cache.config.onError?.(error, this);\n\t\t\tthis.#cache.config.onSettled?.(this.state.data, error, this);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tif (this.#retryer === retryer) this.#retryer = void 0;\n\t\t\tthis.scheduleGc();\n\t\t}\n\t}\n\t#dispatch(action) {\n\t\tconst reducer = (state) => {\n\t\t\tswitch (action.type) {\n\t\t\t\tcase \"failed\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tfetchFailureCount: action.failureCount,\n\t\t\t\t\tfetchFailureReason: action.error\n\t\t\t\t};\n\t\t\t\tcase \"pause\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tfetchStatus: \"paused\"\n\t\t\t\t};\n\t\t\t\tcase \"continue\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tfetchStatus: \"fetching\"\n\t\t\t\t};\n\t\t\t\tcase \"fetch\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\t...fetchState(state.data, this.options),\n\t\t\t\t\tfetchMeta: action.meta ?? null\n\t\t\t\t};\n\t\t\t\tcase \"success\":\n\t\t\t\t\tconst newState = {\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\t...successState(action.data, action.dataUpdatedAt),\n\t\t\t\t\t\tdataUpdateCount: state.dataUpdateCount + 1,\n\t\t\t\t\t\t...!action.manual && {\n\t\t\t\t\t\t\tfetchStatus: \"idle\",\n\t\t\t\t\t\t\tfetchFailureCount: 0,\n\t\t\t\t\t\t\tfetchFailureReason: null\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tthis.#revertState = action.manual ? newState : void 0;\n\t\t\t\t\treturn newState;\n\t\t\t\tcase \"error\":\n\t\t\t\t\tconst error = action.error;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\terror,\n\t\t\t\t\t\terrorUpdateCount: state.errorUpdateCount + 1,\n\t\t\t\t\t\terrorUpdatedAt: Date.now(),\n\t\t\t\t\t\tfetchFailureCount: state.fetchFailureCount + 1,\n\t\t\t\t\t\tfetchFailureReason: error,\n\t\t\t\t\t\tfetchStatus: \"idle\",\n\t\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\t\tisInvalidated: true\n\t\t\t\t\t};\n\t\t\t\tcase \"invalidate\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tisInvalidated: true\n\t\t\t\t};\n\t\t\t\tcase \"setState\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\t...action.state\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\tthis.state = reducer(this.state);\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.observers.slice().forEach((observer) => {\n\t\t\t\tobserver.onQueryUpdate();\n\t\t\t});\n\t\t\tthis.#cache.notify({\n\t\t\t\tquery: this,\n\t\t\t\ttype: \"updated\",\n\t\t\t\taction\n\t\t\t});\n\t\t});\n\t}\n};\nfunction fetchState(data, options) {\n\treturn {\n\t\tfetchFailureCount: 0,\n\t\tfetchFailureReason: null,\n\t\tfetchStatus: canFetch(options.networkMode) ? \"fetching\" : \"paused\",\n\t\t...data === void 0 && {\n\t\t\terror: null,\n\t\t\tstatus: \"pending\"\n\t\t}\n\t};\n}\nfunction successState(data, dataUpdatedAt) {\n\treturn {\n\t\tdata,\n\t\tdataUpdatedAt: dataUpdatedAt ?? Date.now(),\n\t\terror: null,\n\t\tisInvalidated: false,\n\t\tstatus: \"success\"\n\t};\n}\nfunction getDefaultState(options) {\n\tconst data = typeof options.initialData === \"function\" ? options.initialData() : options.initialData;\n\tconst hasData = data !== void 0;\n\tconst initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === \"function\" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;\n\treturn {\n\t\tdata,\n\t\tdataUpdateCount: 0,\n\t\tdataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0,\n\t\terror: null,\n\t\terrorUpdateCount: 0,\n\t\terrorUpdatedAt: 0,\n\t\tfetchFailureCount: 0,\n\t\tfetchFailureReason: null,\n\t\tfetchMeta: null,\n\t\tisInvalidated: false,\n\t\tstatus: hasData ? \"success\" : \"pending\",\n\t\tfetchStatus: \"idle\"\n\t};\n}\n//#endregion\nexport { Query, fetchState };\n\n//# sourceMappingURL=query.js.map","import { timeoutManager } from \"./timeoutManager.js\";\nimport { isValidTimeout, noop, replaceData, resolveQueryValue, shallowEqualObjects, timeUntilStale } from \"./utils.js\";\nimport { isServer } from \"./environmentManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { fetchState } from \"./query.js\";\n//#region src/queryObserver.ts\n/**\n* A `QueryObserver` watches a single query in the `QueryCache` and computes a\n* `QueryObserverResult` from its state, recomputing and notifying subscribers\n* whenever the underlying query (or the observer's options) changes. It is\n* the primitive that framework adapters (e.g. `useQuery`) build their hooks\n* on top of, but it can also be used directly to observe and switch between\n* queries outside of any framework.\n*\n* @example\n* ```ts\n* const observer = new QueryObserver(queryClient, {\n* queryKey: ['posts'],\n* queryFn: fetchPosts,\n* })\n*\n* const unsubscribe = observer.subscribe((result) => {\n* console.log(result.data)\n* })\n* ```\n*/\nvar QueryObserver = class extends Subscribable {\n\t#client;\n\t#currentQuery = void 0;\n\t#currentQueryInitialState = void 0;\n\t#currentResult = void 0;\n\t#currentResultState;\n\t#currentResultOptions;\n\t#selectError;\n\t#selectFn;\n\t#selectResult;\n\t#lastQueryWithDefinedData;\n\t#staleTimeoutId;\n\t#refetchIntervalId;\n\t#currentRefetchInterval;\n\t#trackedProps = /* @__PURE__ */ new Set();\n\tconstructor(client, options) {\n\t\tsuper();\n\t\tthis.options = options;\n\t\tthis.#client = client;\n\t\tthis.#selectError = null;\n\t\tthis.bindMethods();\n\t\tthis.setOptions(options);\n\t}\n\tbindMethods() {\n\t\tthis.refetch = this.refetch.bind(this);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1) {\n\t\t\tthis.#currentQuery.addObserver(this);\n\t\t\tif (shouldFetchOnMount(this.#currentQuery, this.options)) this.#executeFetch();\n\t\t\telse this.updateResult();\n\t\t\tthis.#updateTimers();\n\t\t}\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) this.destroy();\n\t}\n\t/**\n\t* Returns whether the observed query is currently stale and configured\n\t* (via the `refetchOnReconnect` option) to refetch when the network\n\t* reconnects.\n\t*/\n\tshouldFetchOnReconnect() {\n\t\treturn shouldFetchOn(this.#currentQuery, this.options, this.options.refetchOnReconnect);\n\t}\n\t/**\n\t* Returns whether the observed query is currently stale and configured\n\t* (via the `refetchOnWindowFocus` option) to refetch when the window\n\t* regains focus.\n\t*/\n\tshouldFetchOnWindowFocus() {\n\t\treturn shouldFetchOn(this.#currentQuery, this.options, this.options.refetchOnWindowFocus);\n\t}\n\t/**\n\t* Stops observing the current query: clears all listeners, cancels the\n\t* stale and refetch-interval timers, and removes this observer from the\n\t* query it was observing.\n\t*/\n\tdestroy() {\n\t\tthis.listeners = /* @__PURE__ */ new Set();\n\t\tthis.#clearStaleTimeout();\n\t\tthis.#clearRefetchInterval();\n\t\tthis.#currentQuery.removeObserver(this);\n\t}\n\t/**\n\t* Updates the observer's options. This will re-resolve the query being\n\t* observed (switching to a different query if the `queryKey` changed),\n\t* trigger a fetch if the new options require one and the observer has\n\t* subscribers, recompute the current result, and reschedule the stale and\n\t* refetch-interval timers as needed.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.setOptions({ queryKey: ['posts', 1], queryFn: () => fetchPost(1) })\n\t* // later: switch to a different query, reusing the same observer\n\t* observer.setOptions({ queryKey: ['posts', 2], queryFn: () => fetchPost(2) })\n\t* ```\n\t*/\n\tsetOptions(options) {\n\t\tconst prevOptions = this.options;\n\t\tconst prevQuery = this.#currentQuery;\n\t\tthis.options = this.#client.defaultQueryOptions(options);\n\t\tif (this.options.enabled !== void 0 && typeof this.options.enabled !== \"boolean\" && typeof this.options.enabled !== \"function\" && typeof resolveQueryValue(this.options.enabled, this.#currentQuery) !== \"boolean\") throw new Error(\"Expected enabled to be a boolean or a callback that returns a boolean\");\n\t\tthis.#updateQuery();\n\t\tthis.#currentQuery.setOptions(this.options);\n\t\tif (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) this.#client.getQueryCache().notify({\n\t\t\ttype: \"observerOptionsUpdated\",\n\t\t\tquery: this.#currentQuery,\n\t\t\tobserver: this\n\t\t});\n\t\tconst mounted = this.hasListeners();\n\t\tif (mounted && shouldFetchOptionally(this.#currentQuery, prevQuery, this.options, prevOptions)) this.#executeFetch();\n\t\tthis.updateResult();\n\t\tif (mounted && (this.#currentQuery !== prevQuery || resolveQueryValue(this.options.enabled, this.#currentQuery) !== resolveQueryValue(prevOptions.enabled, this.#currentQuery) || resolveQueryValue(this.options.staleTime, this.#currentQuery) !== resolveQueryValue(prevOptions.staleTime, this.#currentQuery))) this.#updateStaleTimeout();\n\t\tconst nextRefetchInterval = this.#computeRefetchInterval();\n\t\tif (mounted && (this.#currentQuery !== prevQuery || resolveQueryValue(this.options.enabled, this.#currentQuery) !== resolveQueryValue(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) this.#updateRefetchInterval(nextRefetchInterval);\n\t}\n\t/**\n\t* Computes the result the observer would produce for the given (already-defaulted) options\n\t* right now, building the underlying `Query` if it doesn't exist yet, without waiting for a\n\t* subscription callback. Called by framework adapters on every render (e.g. `useQuery`) so the\n\t* returned value is available synchronously, ahead of `setOptions` triggering an actual fetch.\n\t*/\n\tgetOptimisticResult(options) {\n\t\tconst query = this.#client.getQueryCache().build(this.#client, options);\n\t\tconst result = this.createResult(query, options);\n\t\tif (!shallowEqualObjects(this.getCurrentResult(), result)) {\n\t\t\tthis.#currentResult = result;\n\t\t\tthis.#currentResultOptions = this.options;\n\t\t\tthis.#currentResultState = this.#currentQuery.state;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t* Returns the most recently computed `QueryObserverResult` for the\n\t* observed query. This is a point-in-time read; to be notified of updates\n\t* as they happen, subscribe to the observer instead (its inherited\n\t* `subscribe` method).\n\t*\n\t* @example\n\t* ```ts\n\t* const result = observer.getCurrentResult()\n\t* console.log(result.status, result.data)\n\t* ```\n\t*/\n\tgetCurrentResult() {\n\t\treturn this.#currentResult;\n\t}\n\t/**\n\t* Wraps a `QueryObserverResult` in a `Proxy` that records which properties are read, via\n\t* {@link QueryObserver#trackProp} (and an optional `onPropTracked` callback). Used by framework\n\t* adapters when `notifyOnChangeProps` is not set, to implement its default \"only re-render on\n\t* properties you actually read\" behavior.\n\t*/\n\ttrackResult(result, onPropTracked) {\n\t\treturn new Proxy(result, { get: (target, key) => {\n\t\t\tthis.trackProp(key);\n\t\t\tonPropTracked?.(key);\n\t\t\treturn Reflect.get(target, key);\n\t\t} });\n\t}\n\t/**\n\t* Records that the given `QueryObserverResult` property was read, so a subsequent update only\n\t* notifies this observer if a tracked property actually changed. Normally called indirectly via\n\t* {@link QueryObserver#trackResult}'s proxy; exposed directly for adapters that track property\n\t* access themselves (e.g. through their own reactivity system) instead of via the proxy.\n\t*/\n\ttrackProp(key) {\n\t\tthis.#trackedProps.add(key);\n\t}\n\t/**\n\t* Returns the `Query` instance this observer is currently observing.\n\t*/\n\tgetCurrentQuery() {\n\t\treturn this.#currentQuery;\n\t}\n\t/**\n\t* Refetches the observed query and returns a promise that resolves with\n\t* the resulting `QueryObserverResult`.\n\t*\n\t* @example\n\t* ```ts\n\t* const result = await observer.refetch({ cancelRefetch: false })\n\t* console.log(result.data)\n\t* ```\n\t*/\n\trefetch({ ...options } = {}) {\n\t\treturn this.fetch({ ...options });\n\t}\n\t/**\n\t* Fetches a query defined by the given options without affecting this\n\t* observer's own tracked query or result, and returns a promise that\n\t* resolves with the `QueryObserverResult` for that fetch. This is useful\n\t* for prefetching data that another observer (e.g. a query about to be\n\t* navigated to) will need, ahead of time.\n\t*\n\t* @example\n\t* ```ts\n\t* const result = await observer.fetchOptimistic({\n\t* queryKey: ['posts', 2],\n\t* queryFn: () => fetchPost(2),\n\t* })\n\t* console.log(result.data)\n\t* ```\n\t*/\n\tfetchOptimistic(options) {\n\t\tconst defaultedOptions = this.#client.defaultQueryOptions(options);\n\t\tconst query = this.#client.getQueryCache().build(this.#client, defaultedOptions);\n\t\tlet unsubscribe = () => {};\n\t\tlet resolveEarly;\n\t\tconst cachePromise = new Promise((resolve) => {\n\t\t\tresolveEarly = resolve;\n\t\t\tunsubscribe = this.#client.getQueryCache().subscribe((event) => {\n\t\t\t\tif (event.type === \"updated\" && event.query.queryHash === query.queryHash && query.state.data !== void 0) {\n\t\t\t\t\tunsubscribe();\n\t\t\t\t\tresolve(this.createResult(query, defaultedOptions));\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn Promise.race([query.fetch().then(() => {\n\t\t\tconst result = this.createResult(query, defaultedOptions);\n\t\t\tresolveEarly?.(result);\n\t\t\treturn result;\n\t\t}).finally(() => {\n\t\t\tunsubscribe();\n\t\t}), cachePromise]);\n\t}\n\tfetch(fetchOptions) {\n\t\treturn this.#executeFetch({\n\t\t\t...fetchOptions,\n\t\t\tcancelRefetch: fetchOptions.cancelRefetch ?? true\n\t\t}).then(() => {\n\t\t\tthis.updateResult();\n\t\t\treturn this.#currentResult;\n\t\t});\n\t}\n\t#executeFetch(fetchOptions) {\n\t\tthis.#updateQuery();\n\t\tlet promise = this.#currentQuery.fetch(this.options, fetchOptions);\n\t\tif (!fetchOptions?.throwOnError) promise = promise.catch(noop);\n\t\treturn promise;\n\t}\n\t#shouldScheduleTimer(timeout) {\n\t\treturn !isServer() && resolveQueryValue(this.options.enabled, this.#currentQuery) !== false && isValidTimeout(timeout);\n\t}\n\t#updateStaleTimeout() {\n\t\tthis.#clearStaleTimeout();\n\t\tconst staleTime = resolveQueryValue(this.options.staleTime, this.#currentQuery);\n\t\tif (this.#currentResult.isStale || !this.#shouldScheduleTimer(staleTime)) return;\n\t\tconst timeout = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime) + 1;\n\t\tthis.#staleTimeoutId = timeoutManager.setTimeout(() => {\n\t\t\tif (!this.#currentResult.isStale) this.updateResult();\n\t\t}, timeout);\n\t}\n\t#computeRefetchInterval() {\n\t\treturn resolveQueryValue(this.options.refetchInterval, this.#currentQuery) ?? false;\n\t}\n\t#updateRefetchInterval(nextInterval) {\n\t\tthis.#clearRefetchInterval();\n\t\tthis.#currentRefetchInterval = nextInterval;\n\t\tif (this.#currentRefetchInterval === 0 || !this.#shouldScheduleTimer(this.#currentRefetchInterval)) return;\n\t\tthis.#refetchIntervalId = timeoutManager.setInterval(() => {\n\t\t\tif (this.options.refetchIntervalInBackground || focusManager.isFocused()) this.#executeFetch();\n\t\t}, this.#currentRefetchInterval);\n\t}\n\t#updateTimers() {\n\t\tthis.#updateStaleTimeout();\n\t\tthis.#updateRefetchInterval(this.#computeRefetchInterval());\n\t}\n\t#clearStaleTimeout() {\n\t\tif (this.#staleTimeoutId !== void 0) {\n\t\t\ttimeoutManager.clearTimeout(this.#staleTimeoutId);\n\t\t\tthis.#staleTimeoutId = void 0;\n\t\t}\n\t}\n\t#clearRefetchInterval() {\n\t\tif (this.#refetchIntervalId !== void 0) {\n\t\t\ttimeoutManager.clearInterval(this.#refetchIntervalId);\n\t\t\tthis.#refetchIntervalId = void 0;\n\t\t}\n\t}\n\tcreateResult(query, options) {\n\t\tconst prevQuery = this.#currentQuery;\n\t\tconst prevOptions = this.options;\n\t\tconst prevResult = this.#currentResult;\n\t\tconst prevResultState = this.#currentResultState;\n\t\tconst prevResultOptions = this.#currentResultOptions;\n\t\tconst queryInitialState = query !== prevQuery ? query.state : this.#currentQueryInitialState;\n\t\tconst { state } = query;\n\t\tlet newState = { ...state };\n\t\tlet isPlaceholderData = false;\n\t\tlet data;\n\t\tif (options._optimisticResults) {\n\t\t\tconst mounted = this.hasListeners();\n\t\t\tconst fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n\t\t\tconst fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n\t\t\tif (fetchOnMount || fetchOptionally) newState = {\n\t\t\t\t...newState,\n\t\t\t\t...fetchState(state.data, query.options)\n\t\t\t};\n\t\t\tif (options._optimisticResults === \"isRestoring\") newState.fetchStatus = \"idle\";\n\t\t}\n\t\tlet { error, errorUpdatedAt, status } = newState;\n\t\tdata = newState.data;\n\t\tlet skipSelect = false;\n\t\tif (options.placeholderData !== void 0 && data === void 0 && status === \"pending\") {\n\t\t\tlet placeholderData;\n\t\t\tif (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {\n\t\t\t\tplaceholderData = prevResult.data;\n\t\t\t\tskipSelect = true;\n\t\t\t} else placeholderData = typeof options.placeholderData === \"function\" ? options.placeholderData(this.#lastQueryWithDefinedData?.state.data, this.#lastQueryWithDefinedData) : options.placeholderData;\n\t\t\tif (placeholderData !== void 0) {\n\t\t\t\tstatus = \"success\";\n\t\t\t\tdata = replaceData(prevResult?.data, placeholderData, options);\n\t\t\t\tisPlaceholderData = true;\n\t\t\t}\n\t\t}\n\t\tif (options.select && data !== void 0 && !skipSelect) {\n\t\t\tif (prevResult && data === prevResultState?.data && options.select === this.#selectFn) data = this.#selectResult;\n\t\t\telse try {\n\t\t\t\tthis.#selectFn = options.select;\n\t\t\t\tdata = options.select(data);\n\t\t\t\tdata = replaceData(prevResult?.data, data, options);\n\t\t\t\tthis.#selectResult = data;\n\t\t\t\tthis.#selectError = null;\n\t\t\t} catch (selectError) {\n\t\t\t\tthis.#selectError = selectError;\n\t\t\t}\n\t\t} else if (data === void 0) this.#selectError = null;\n\t\tif (this.#selectError) {\n\t\t\terror = this.#selectError;\n\t\t\tdata = this.#selectResult;\n\t\t\terrorUpdatedAt = Date.now();\n\t\t\tstatus = \"error\";\n\t\t\tisPlaceholderData = false;\n\t\t}\n\t\tconst isFetching = newState.fetchStatus === \"fetching\";\n\t\tconst isPending = status === \"pending\";\n\t\tconst isError = status === \"error\";\n\t\tconst isLoading = isPending && isFetching;\n\t\tconst hasData = data !== void 0;\n\t\treturn {\n\t\t\tstatus,\n\t\t\tfetchStatus: newState.fetchStatus,\n\t\t\tisPending,\n\t\t\tisSuccess: status === \"success\",\n\t\t\tisError,\n\t\t\tisInitialLoading: isLoading,\n\t\t\tisLoading,\n\t\t\tdata,\n\t\t\tdataUpdatedAt: newState.dataUpdatedAt,\n\t\t\terror,\n\t\t\terrorUpdatedAt,\n\t\t\tfailureCount: newState.fetchFailureCount,\n\t\t\tfailureReason: newState.fetchFailureReason,\n\t\t\terrorUpdateCount: newState.errorUpdateCount,\n\t\t\tisFetched: query.isFetched(),\n\t\t\tisFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,\n\t\t\tisFetching,\n\t\t\tisRefetching: isFetching && !isPending,\n\t\t\tisLoadingError: isError && !hasData,\n\t\t\tisPaused: newState.fetchStatus === \"paused\",\n\t\t\tisPlaceholderData,\n\t\t\tisRefetchError: isError && hasData,\n\t\t\tisStale: isStale(query, options),\n\t\t\trefetch: this.refetch,\n\t\t\tisEnabled: resolveQueryValue(options.enabled, query) !== false\n\t\t};\n\t}\n\t/**\n\t* Recomputes and stores the current result from the current query/options, notifying listeners\n\t* if it changed. Framework adapters call this right after subscribing to make sure no query\n\t* update was missed in the gap between creating the observer and subscribing to it.\n\t*/\n\tupdateResult() {\n\t\tconst prevResult = this.#currentResult;\n\t\tconst nextResult = this.createResult(this.#currentQuery, this.options);\n\t\tthis.#currentResultState = this.#currentQuery.state;\n\t\tthis.#currentResultOptions = this.options;\n\t\tif (this.#currentResultState.data !== void 0) this.#lastQueryWithDefinedData = this.#currentQuery;\n\t\tif (shallowEqualObjects(nextResult, prevResult)) return;\n\t\tthis.#currentResult = nextResult;\n\t\tconst shouldNotifyListeners = () => {\n\t\t\tif (!prevResult) return true;\n\t\t\tconst { notifyOnChangeProps } = this.options;\n\t\t\tconst notifyOnChangePropsValue = typeof notifyOnChangeProps === \"function\" ? notifyOnChangeProps() : notifyOnChangeProps;\n\t\t\tif (notifyOnChangePropsValue === \"all\" || !notifyOnChangePropsValue && !this.#trackedProps.size) return true;\n\t\t\tconst includedProps = new Set(notifyOnChangePropsValue ?? this.#trackedProps);\n\t\t\tif (this.options.throwOnError) includedProps.add(\"error\");\n\t\t\treturn Object.keys(this.#currentResult).some((key) => {\n\t\t\t\tconst typedKey = key;\n\t\t\t\treturn this.#currentResult[typedKey] !== prevResult[typedKey] && includedProps.has(typedKey);\n\t\t\t});\n\t\t};\n\t\tconst notifyListeners = shouldNotifyListeners();\n\t\tnotifyManager.batch(() => {\n\t\t\tif (notifyListeners) this.listeners.forEach((listener) => {\n\t\t\t\tlistener(this.#currentResult);\n\t\t\t});\n\t\t\tthis.#client.getQueryCache().notify({\n\t\t\t\tquery: this.#currentQuery,\n\t\t\t\ttype: \"observerResultsUpdated\"\n\t\t\t});\n\t\t});\n\t}\n\t#updateQuery() {\n\t\tconst query = this.#client.getQueryCache().build(this.#client, this.options);\n\t\tif (query === this.#currentQuery) return;\n\t\tconst prevQuery = this.#currentQuery;\n\t\tthis.#currentQuery = query;\n\t\tthis.#currentQueryInitialState = query.state;\n\t\tif (this.hasListeners()) {\n\t\t\tprevQuery?.removeObserver(this);\n\t\t\tquery.addObserver(this);\n\t\t}\n\t}\n\t/** @internal */\n\tonQueryUpdate() {\n\t\tthis.updateResult();\n\t\tif (this.hasListeners()) this.#updateTimers();\n\t}\n};\nfunction shouldLoadOnMount(query, options) {\n\treturn resolveQueryValue(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === \"error\" && resolveQueryValue(options.retryOnMount, query) === false);\n}\nfunction shouldFetchOnMount(query, options) {\n\treturn shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\nfunction shouldFetchOn(query, options, field) {\n\tif (resolveQueryValue(options.enabled, query) !== false && resolveQueryValue(options.staleTime, query) !== \"static\") {\n\t\tconst value = resolveQueryValue(field, query);\n\t\treturn value === \"always\" || value !== false && isStale(query, options);\n\t}\n\treturn false;\n}\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n\treturn (query !== prevQuery || resolveQueryValue(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== \"error\") && isStale(query, options);\n}\nfunction isStale(query, options) {\n\treturn resolveQueryValue(options.enabled, query) !== false && query.isStaleByTime(resolveQueryValue(options.staleTime, query));\n}\n//#endregion\nexport { QueryObserver };\n\n//# sourceMappingURL=queryObserver.js.map","import { notifyManager } from \"./notifyManager.js\";\nimport { createRetryer } from \"./retryer.js\";\nimport { Removable } from \"./removable.js\";\n//#region src/mutation.ts\n/**\n* Represents a single mutation attempt. A `Mutation` holds the mutation's\n* options, state (data/error/status), and the `MutationObserver`s currently\n* subscribed to it.\n*\n* Instances are created and managed internally by `MutationCache`; application\n* code typically interacts with mutations indirectly through `QueryClient` or\n* a framework hook like `useMutation`. Direct access to a `Mutation` instance\n* is possible via `mutationCache.find()`/`getAll()` for inspecting cache state.\n*\n* @example\n* ```ts\n* const mutationCache = queryClient.getMutationCache()\n*\n* const mutation = mutationCache.find({ mutationKey: ['addPost'] })\n* ```\n*/\nvar Mutation = class extends Removable {\n\t#client;\n\t#observers;\n\t#mutationCache;\n\t#retryer;\n\tconstructor(config) {\n\t\tsuper();\n\t\tthis.#client = config.client;\n\t\tthis.mutationId = config.mutationId;\n\t\tthis.#mutationCache = config.mutationCache;\n\t\tthis.#observers = [];\n\t\tthis.state = config.state || getDefaultState();\n\t\tthis.setOptions(config.options);\n\t\tthis.scheduleGc();\n\t}\n\t/** @internal */\n\tsetOptions(options) {\n\t\tthis.options = options;\n\t\tthis.updateGcTime(this.options.gcTime);\n\t}\n\t/**\n\t* The `meta` object passed in the mutation's options, if any.\n\t*/\n\tget meta() {\n\t\treturn this.options.meta;\n\t}\n\t/** @internal */\n\taddObserver(observer) {\n\t\tif (!this.#observers.includes(observer)) {\n\t\t\tthis.#observers.push(observer);\n\t\t\tthis.clearGcTimeout();\n\t\t\tthis.#mutationCache.notify({\n\t\t\t\ttype: \"observerAdded\",\n\t\t\t\tmutation: this,\n\t\t\t\tobserver\n\t\t\t});\n\t\t}\n\t}\n\t/** @internal */\n\tremoveObserver(observer) {\n\t\tthis.#observers = this.#observers.filter((x) => x !== observer);\n\t\tthis.scheduleGc();\n\t\tthis.#mutationCache.notify({\n\t\t\ttype: \"observerRemoved\",\n\t\t\tmutation: this,\n\t\t\tobserver\n\t\t});\n\t}\n\toptionalRemove() {\n\t\tif (!this.#observers.length) {\n\t\t\tif (this.state.status === \"pending\") this.scheduleGc();\n\t\t\telse this.#mutationCache.remove(this);\n\t\t}\n\t}\n\t/**\n\t* Resumes a mutation that is currently paused or was restored from a\n\t* dehydrated, still-`pending` state.\n\t*\n\t* - If this mutation has an active retryer (it paused mid-attempt, e.g. due\n\t* to the network mode or scope-based queuing), its retryer is resumed.\n\t* - Otherwise, if the mutation's status is still `pending` (e.g. it was\n\t* dehydrated while an attempt was in flight and never got a retryer in\n\t* this instance), `execute` is called again with the last known variables.\n\t* - Otherwise the mutation has already settled and this resolves immediately\n\t* without running anything again.\n\t*\n\t* @example\n\t* ```ts\n\t* // typically driven by reconnect handling, e.g. queryClient.resumePausedMutations()\n\t* const mutation = mutationCache.find({ mutationKey: ['addPost'] })\n\t* await mutation?.continue()\n\t* ```\n\t*\n\t* @see {@link Mutation#execute}\n\t*/\n\tcontinue() {\n\t\treturn this.#retryer?.continue() ?? (this.state.status === \"pending\" ? this.execute(this.state.variables) : Promise.resolve());\n\t}\n\t/**\n\t* Runs the mutation function for the given variables through a retryer, and\n\t* drives the mutation's state and lifecycle callbacks through to settlement.\n\t*\n\t* If this mutation's state is already `pending` when `execute` is called\n\t* (i.e. it was restored, still in-flight, from a dehydrated state), the\n\t* `onMutate` step is skipped and a `continue` action is dispatched to\n\t* unpause it; otherwise a `pending` action is dispatched first, then the\n\t* mutation cache's `onMutate` and the mutation's own `onMutate` option are\n\t* awaited in that order, and the resulting context is stored.\n\t*\n\t* The mutation function is then run (subject to `retry`/`retryDelay`/\n\t* `networkMode`, and to the mutation cache's scope-based serialization).\n\t* On success, the cache's `onSuccess`/`onSettled` callbacks run before the\n\t* mutation's own `onSuccess`/`onSettled` options, a `success` action is\n\t* dispatched, and the resolved data is returned. On failure, the same\n\t* cache-then-option ordering is used for `onError`/`onSettled`, but each of\n\t* those four callbacks is individually caught so that a throwing callback\n\t* cannot mask the original error; an `error` action is then dispatched and\n\t* the original error is re-thrown.\n\t*\n\t* @example\n\t* ```ts\n\t* // Called internally by `MutationObserver.mutate` and `Mutation.continue` —\n\t* // applications normally trigger mutations through those, not this method.\n\t* const data = await mutation.execute(variables)\n\t* ```\n\t*\n\t* @see {@link Mutation#continue}\n\t*/\n\tasync execute(variables) {\n\t\tconst onContinue = () => {\n\t\t\tthis.#dispatch({ type: \"continue\" });\n\t\t};\n\t\tconst mutationFnContext = {\n\t\t\tclient: this.#client,\n\t\t\tmeta: this.options.meta,\n\t\t\tmutationKey: this.options.mutationKey\n\t\t};\n\t\tconst retryer = this.#retryer = createRetryer({\n\t\t\tfn: () => {\n\t\t\t\tif (!this.options.mutationFn) return Promise.reject(/* @__PURE__ */ new Error(\"No mutationFn found\"));\n\t\t\t\treturn this.options.mutationFn(variables, mutationFnContext);\n\t\t\t},\n\t\t\tonFail: (failureCount, error) => {\n\t\t\t\tthis.#dispatch({\n\t\t\t\t\ttype: \"failed\",\n\t\t\t\t\tfailureCount,\n\t\t\t\t\terror\n\t\t\t\t});\n\t\t\t},\n\t\t\tonPause: () => {\n\t\t\t\tthis.#dispatch({ type: \"pause\" });\n\t\t\t},\n\t\t\tonContinue,\n\t\t\tretry: this.options.retry ?? 0,\n\t\t\tretryDelay: this.options.retryDelay,\n\t\t\tnetworkMode: this.options.networkMode,\n\t\t\tcanRun: () => this.#mutationCache.canRun(this)\n\t\t});\n\t\tconst restored = this.state.status === \"pending\";\n\t\tconst isPaused = !retryer.canStart();\n\t\ttry {\n\t\t\tif (restored) onContinue();\n\t\t\telse {\n\t\t\t\tthis.#dispatch({\n\t\t\t\t\ttype: \"pending\",\n\t\t\t\t\tvariables,\n\t\t\t\t\tisPaused\n\t\t\t\t});\n\t\t\t\tif (this.#mutationCache.config.onMutate) await this.#mutationCache.config.onMutate(variables, this, mutationFnContext);\n\t\t\t\tconst context = await this.options.onMutate?.(variables, mutationFnContext);\n\t\t\t\tif (context !== this.state.context) this.#dispatch({\n\t\t\t\t\ttype: \"pending\",\n\t\t\t\t\tcontext,\n\t\t\t\t\tvariables,\n\t\t\t\t\tisPaused\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst data = await retryer.start();\n\t\t\tawait this.#mutationCache.config.onSuccess?.(data, variables, this.state.context, this, mutationFnContext);\n\t\t\tawait this.options.onSuccess?.(data, variables, this.state.context, mutationFnContext);\n\t\t\tawait this.#mutationCache.config.onSettled?.(data, null, this.state.variables, this.state.context, this, mutationFnContext);\n\t\t\tawait this.options.onSettled?.(data, null, variables, this.state.context, mutationFnContext);\n\t\t\tthis.#dispatch({\n\t\t\t\ttype: \"success\",\n\t\t\t\tdata\n\t\t\t});\n\t\t\treturn data;\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\tawait this.#mutationCache.config.onError?.(error, variables, this.state.context, this, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.options.onError?.(error, variables, this.state.context, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.#mutationCache.config.onSettled?.(void 0, error, this.state.variables, this.state.context, this, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.options.onSettled?.(void 0, error, variables, this.state.context, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\tthis.#dispatch({\n\t\t\t\ttype: \"error\",\n\t\t\t\terror\n\t\t\t});\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tif (this.#retryer === retryer) this.#retryer = void 0;\n\t\t\tthis.#mutationCache.runNext(this);\n\t\t}\n\t}\n\t#dispatch(action) {\n\t\tconst reducer = (state) => {\n\t\t\tswitch (action.type) {\n\t\t\t\tcase \"failed\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tfailureCount: action.failureCount,\n\t\t\t\t\tfailureReason: action.error\n\t\t\t\t};\n\t\t\t\tcase \"pause\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tisPaused: true\n\t\t\t\t};\n\t\t\t\tcase \"continue\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tisPaused: false\n\t\t\t\t};\n\t\t\t\tcase \"pending\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tcontext: action.context,\n\t\t\t\t\tdata: void 0,\n\t\t\t\t\tfailureCount: 0,\n\t\t\t\t\tfailureReason: null,\n\t\t\t\t\terror: null,\n\t\t\t\t\tisPaused: action.isPaused,\n\t\t\t\t\tstatus: \"pending\",\n\t\t\t\t\tvariables: action.variables,\n\t\t\t\t\tsubmittedAt: Date.now()\n\t\t\t\t};\n\t\t\t\tcase \"success\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tdata: action.data,\n\t\t\t\t\tfailureCount: 0,\n\t\t\t\t\tfailureReason: null,\n\t\t\t\t\terror: null,\n\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\tisPaused: false\n\t\t\t\t};\n\t\t\t\tcase \"error\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tdata: void 0,\n\t\t\t\t\terror: action.error,\n\t\t\t\t\tfailureCount: state.failureCount + 1,\n\t\t\t\t\tfailureReason: action.error,\n\t\t\t\t\tisPaused: false,\n\t\t\t\t\tstatus: \"error\"\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\tthis.state = reducer(this.state);\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.#observers.forEach((observer) => {\n\t\t\t\tobserver.onMutationUpdate(action);\n\t\t\t});\n\t\t\tthis.#mutationCache.notify({\n\t\t\t\tmutation: this,\n\t\t\t\ttype: \"updated\",\n\t\t\t\taction\n\t\t\t});\n\t\t});\n\t}\n};\nfunction getDefaultState() {\n\treturn {\n\t\tcontext: void 0,\n\t\tdata: void 0,\n\t\terror: null,\n\t\tfailureCount: 0,\n\t\tfailureReason: null,\n\t\tisPaused: false,\n\t\tstatus: \"idle\",\n\t\tvariables: void 0,\n\t\tsubmittedAt: 0\n\t};\n}\n//#endregion\nexport { Mutation, getDefaultState };\n\n//# sourceMappingURL=mutation.js.map","import { hashKey, shallowEqualObjects } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { getDefaultState } from \"./mutation.js\";\n//#region src/mutationObserver.ts\n/**\n* Observes a single mutation and derives a `MutationObserverResult` from it.\n* A framework hook like `useMutation` creates one `MutationObserver` per hook\n* call, keeps it stable across re-renders, calls `setOptions` when the options\n* passed to the hook change, subscribes to it to re-render on updates, and\n* reads `getCurrentResult()` for the value to return. Calling `mutate()`\n* builds a new underlying `Mutation` in the `MutationCache` and executes it.\n*\n* @example\n* ```ts\n* const observer = new MutationObserver(queryClient, {\n* mutationFn: (variables: { title: string }) => addPost(variables),\n* })\n* ```\n*/\nvar MutationObserver = class extends Subscribable {\n\t#client;\n\t#currentResult = void 0;\n\t#currentMutation;\n\t#mutateOptions;\n\tconstructor(client, options) {\n\t\tsuper();\n\t\tthis.#client = client;\n\t\tthis.setOptions(options);\n\t\tthis.bindMethods();\n\t\tthis.#updateResult();\n\t}\n\tbindMethods() {\n\t\tthis.mutate = this.mutate.bind(this);\n\t\tthis.reset = this.reset.bind(this);\n\t}\n\t/**\n\t* Updates the observer's options.\n\t*\n\t* If the new `mutationKey` differs from the previous one (and both were\n\t* defined), the observer is reset, detaching it from the mutation it was\n\t* observing. Otherwise, if the currently observed mutation is still\n\t* `pending`, its options are updated in place as well.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.setOptions({\n\t* mutationFn: (variables: { title: string }) => addPost(variables),\n\t* onSuccess: (data) => console.log(data),\n\t* })\n\t* ```\n\t*/\n\tsetOptions(options) {\n\t\tconst prevOptions = this.options;\n\t\tthis.options = this.#client.defaultMutationOptions(options);\n\t\tif (!shallowEqualObjects(this.options, prevOptions)) this.#client.getMutationCache().notify({\n\t\t\ttype: \"observerOptionsUpdated\",\n\t\t\tmutation: this.#currentMutation,\n\t\t\tobserver: this\n\t\t});\n\t\tif (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) this.reset();\n\t\telse if (this.#currentMutation?.state.status === \"pending\") this.#currentMutation.setOptions(this.options);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1 && this.#currentMutation) {\n\t\t\tthis.#currentMutation.addObserver(this);\n\t\t\tthis.#updateResult();\n\t\t}\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) this.#currentMutation?.removeObserver(this);\n\t}\n\t/** @internal */\n\tonMutationUpdate(action) {\n\t\tthis.#updateResult();\n\t\tthis.#notify(action);\n\t}\n\t/**\n\t* Returns the observer's current result, derived from the observed\n\t* mutation's state (or the default, `idle` state if no mutation has been\n\t* built yet, e.g. before the first `mutate()` call or after `reset()`).\n\t*/\n\tgetCurrentResult() {\n\t\treturn this.#currentResult;\n\t}\n\t/**\n\t* Detaches the observer from the mutation it is currently observing (if\n\t* any) and resets the observed result back to its default, `idle` state.\n\t*\n\t* This does not cancel an in-flight mutation; the mutation itself keeps\n\t* running to completion and its own callbacks still fire, but this\n\t* observer stops reflecting its state and a subsequent `mutate()` call\n\t* will build a brand new mutation.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.reset()\n\t* ```\n\t*\n\t* @see {@link MutationObserver#mutate}\n\t*/\n\treset() {\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = void 0;\n\t\tthis.#updateResult();\n\t\tthis.#notify();\n\t}\n\t/**\n\t* Builds a new `Mutation` in the `MutationCache` using the observer's\n\t* current options, detaches this observer from any previously observed\n\t* mutation, attaches it to the new one, and executes it with the given\n\t* variables.\n\t*\n\t* The optional per-call `options` (`onSuccess`/`onError`/`onSettled`) are\n\t* invoked once the mutation settles, in addition to any callbacks defined\n\t* on the observer's own options.\n\t*\n\t* @example\n\t* ```ts\n\t* await observer.mutate(\n\t* { title: 'New post' },\n\t* { onSuccess: (data) => console.log(data) },\n\t* )\n\t* ```\n\t*/\n\tmutate(variables, options) {\n\t\tthis.#mutateOptions = options;\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);\n\t\tthis.#currentMutation.addObserver(this);\n\t\treturn this.#currentMutation.execute(variables);\n\t}\n\t#updateResult() {\n\t\tconst state = this.#currentMutation?.state ?? getDefaultState();\n\t\tthis.#currentResult = {\n\t\t\t...state,\n\t\t\tisPending: state.status === \"pending\",\n\t\t\tisSuccess: state.status === \"success\",\n\t\t\tisError: state.status === \"error\",\n\t\t\tisIdle: state.status === \"idle\",\n\t\t\tmutate: this.mutate,\n\t\t\treset: this.reset\n\t\t};\n\t}\n\t#notify(action) {\n\t\tnotifyManager.batch(() => {\n\t\t\tif (this.#mutateOptions && this.hasListeners()) {\n\t\t\t\tconst variables = this.#currentResult.variables;\n\t\t\t\tconst onMutateResult = this.#currentResult.context;\n\t\t\t\tconst context = {\n\t\t\t\t\tclient: this.#client,\n\t\t\t\t\tmeta: this.options.meta,\n\t\t\t\t\tmutationKey: this.options.mutationKey\n\t\t\t\t};\n\t\t\t\tif (action?.type === \"success\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSuccess?.(action.data, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSettled?.(action.data, null, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t} else if (action?.type === \"error\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onError?.(action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSettled?.(void 0, action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(this.#currentResult);\n\t\t\t});\n\t\t});\n\t}\n};\n//#endregion\nexport { MutationObserver };\n\n//# sourceMappingURL=mutationObserver.js.map","\"use client\";\nimport * as React from \"react\";\n//#region src/IsRestoringProvider.ts\nconst IsRestoringContext = React.createContext(false);\n/**\n* If you are using `PersistQueryClientProvider`, you can also use the `useIsRestoring` hook alongside it to\n* check if a restore is currently in progress. `useQuery` and friends also check this internally to avoid\n* race conditions between the restore and mounting queries.\n*\n* @returns `true` while a persisted client is being restored, `false` otherwise.\n*/\nconst useIsRestoring = () => React.useContext(IsRestoringContext);\n/**\n* The Provider that `PersistQueryClientProvider` uses to signal whether a persisted client is currently\n* being restored, read by `useIsRestoring`.\n*/\nconst IsRestoringProvider = IsRestoringContext.Provider;\n//#endregion\nexport { IsRestoringProvider, useIsRestoring };\n\n//# sourceMappingURL=IsRestoringProvider.js.map","\"use client\";\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/QueryErrorResetBoundary.tsx\n/**\n* Resets any query errors within the boundary, so queries know they can try again.\n*/\nfunction createValue() {\n\tlet isReset = false;\n\treturn {\n\t\t/**\n\t\t* Clears the reset state, so queries know not to try again until the boundary is reset again.\n\t\t*/\n\t\tclearReset: () => {\n\t\t\tisReset = false;\n\t\t},\n\t\t/**\n\t\t* Resets any query errors within the boundary, so queries know they can try again.\n\t\t*/\n\t\treset: () => {\n\t\t\tisReset = true;\n\t\t},\n\t\t/**\n\t\t* Returns whether the boundary has been reset and not yet cleared.\n\t\t*/\n\t\tisReset: () => {\n\t\t\treturn isReset;\n\t\t}\n\t};\n}\nconst QueryErrorResetBoundaryContext = React.createContext(createValue());\n/**\n* This hook will reset any query errors within the closest `QueryErrorResetBoundary`. If there is no boundary\n* defined it will reset them globally.\n*\n* @returns The boundary's {@link QueryErrorResetBoundaryValue}.\n*\n* @example\n* ```tsx\n* import { ErrorBoundary } from 'react-error-boundary'\n* import { useQueryErrorResetBoundary } from '@tanstack/react-query'\n*\n* function App({ children }: { children: React.ReactNode }) {\n* const { reset } = useQueryErrorResetBoundary()\n*\n* return (\n* <ErrorBoundary\n* onReset={reset}\n* fallbackRender={({ resetErrorBoundary }) => (\n* <div>\n* There was an error!\n* <button onClick={() => resetErrorBoundary()}>Try again</button>\n* </div>\n* )}\n* >\n* {children}\n* </ErrorBoundary>\n* )\n* }\n* ```\n*/\nconst useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);\n/**\n* When using `suspense` or `throwOnError` in your queries, you need a way to let queries know that you want to\n* try again when re-rendering after some error occurred. With the `QueryErrorResetBoundary` component you can\n* reset any query errors within the boundaries of the component.\n*\n* @returns The `children`, rendered as-is, or called with the boundary's {@link QueryErrorResetBoundaryValue}\n* if `children` is a function.\n*\n* @example\n* ```tsx\n* import { ErrorBoundary } from 'react-error-boundary'\n* import { QueryErrorResetBoundary } from '@tanstack/react-query'\n*\n* function App() {\n* return (\n* <QueryErrorResetBoundary>\n* {({ reset }) => (\n* <ErrorBoundary\n* onReset={reset}\n* fallbackRender={({ resetErrorBoundary }) => (\n* <div>\n* There was an error!\n* <button onClick={() => resetErrorBoundary()}>Try again</button>\n* </div>\n* )}\n* >\n* <Page />\n* </ErrorBoundary>\n* )}\n* </QueryErrorResetBoundary>\n* )\n* }\n* ```\n*/\nconst QueryErrorResetBoundary = ({ children }) => {\n\tconst [value] = React.useState(() => createValue());\n\treturn /* @__PURE__ */ jsx(QueryErrorResetBoundaryContext.Provider, {\n\t\tvalue,\n\t\tchildren: typeof children === \"function\" ? children(value) : children\n\t});\n};\n//#endregion\nexport { QueryErrorResetBoundary, useQueryErrorResetBoundary };\n\n//# sourceMappingURL=QueryErrorResetBoundary.js.map","\"use client\";\nimport * as React from \"react\";\nimport { shouldThrowError } from \"@tanstack/query-core\";\n//#region src/errorBoundaryUtils.ts\nconst ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {\n\tconst throwOnError = query?.state.error && typeof options.throwOnError === \"function\" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;\n\tif (options.suspense || throwOnError) {\n\t\tif (!errorResetBoundary.isReset()) options.retryOnMount = false;\n\t}\n};\nconst useClearResetErrorBoundary = (errorResetBoundary) => {\n\tReact.useEffect(() => {\n\t\terrorResetBoundary.clearReset();\n\t}, [errorResetBoundary]);\n};\nconst getHasError = ({ result, errorResetBoundary, throwOnError, query, suspense }) => {\n\treturn result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));\n};\n//#endregion\nexport { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary };\n\n//# sourceMappingURL=errorBoundaryUtils.js.map","//#region src/suspense.ts\nconst defaultThrowOnError = (_error, query) => query.state.data === void 0;\nconst ensureSuspenseTimers = (defaultedOptions) => {\n\tif (defaultedOptions.suspense) {\n\t\tconst MIN_SUSPENSE_TIME_MS = 1e3;\n\t\tconst clamp = (value) => value === \"static\" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);\n\t\tconst originalStaleTime = defaultedOptions.staleTime;\n\t\tdefaultedOptions.staleTime = typeof originalStaleTime === \"function\" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);\n\t\tif (typeof defaultedOptions.gcTime === \"number\") defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, MIN_SUSPENSE_TIME_MS);\n\t}\n};\nconst shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;\nconst fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {\n\terrorResetBoundary.clearReset();\n});\n//#endregion\nexport { defaultThrowOnError, ensureSuspenseTimers, fetchOptimistic, shouldSuspend };\n\n//# sourceMappingURL=suspense.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { useIsRestoring } from \"./IsRestoringProvider.js\";\nimport { useQueryErrorResetBoundary } from \"./QueryErrorResetBoundary.js\";\nimport { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary } from \"./errorBoundaryUtils.js\";\nimport { ensureSuspenseTimers, fetchOptimistic, shouldSuspend } from \"./suspense.js\";\nimport * as React from \"react\";\nimport { noop, notifyManager } from \"@tanstack/query-core\";\n//#region src/useBaseQuery.ts\nfunction useBaseQuery(options, Observer, queryClient) {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif (typeof options !== \"object\" || Array.isArray(options)) throw new Error(\"Bad argument type. Starting with v5, only the \\\"Object\\\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object\");\n\t}\n\tconst isRestoring = useIsRestoring();\n\tconst errorResetBoundary = useQueryErrorResetBoundary();\n\tconst client = useQueryClient(queryClient);\n\tconst defaultedOptions = client.defaultQueryOptions(options);\n\tconst query = client.getQueryCache().get(defaultedOptions.queryHash);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif (!defaultedOptions.queryFn) console.error(`[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`);\n\t}\n\tconst subscribed = options.subscribed !== false;\n\tdefaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : subscribed ? \"optimistic\" : void 0;\n\tensureSuspenseTimers(defaultedOptions);\n\tensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary, query);\n\tuseClearResetErrorBoundary(errorResetBoundary);\n\tconst [observer] = React.useState(() => new Observer(client, defaultedOptions));\n\tconst result = observer.getOptimisticResult(defaultedOptions);\n\tconst shouldSubscribe = !isRestoring && subscribed;\n\tReact.useSyncExternalStore(React.useCallback((onStoreChange) => {\n\t\tconst unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;\n\t\tobserver.updateResult();\n\t\treturn unsubscribe;\n\t}, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tReact.useEffect(() => {\n\t\tobserver.setOptions(defaultedOptions);\n\t}, [defaultedOptions, observer]);\n\tif (shouldSuspend(defaultedOptions, result)) throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);\n\tif (getHasError({\n\t\tresult,\n\t\terrorResetBoundary,\n\t\tthrowOnError: defaultedOptions.throwOnError,\n\t\tquery,\n\t\tsuspense: defaultedOptions.suspense\n\t})) throw result.error;\n\treturn !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;\n}\n//#endregion\nexport { useBaseQuery };\n\n//# sourceMappingURL=useBaseQuery.js.map","\"use client\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nimport { QueryObserver } from \"@tanstack/query-core\";\n//#region src/useQuery.ts\nfunction useQuery(options, queryClient) {\n\treturn useBaseQuery(options, QueryObserver, queryClient);\n}\n//#endregion\nexport { useQuery };\n\n//# sourceMappingURL=useQuery.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport * as React from \"react\";\nimport { MutationObserver, noop, notifyManager, shouldThrowError } from \"@tanstack/query-core\";\n//#region src/useMutation.ts\n/**\n* Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects.\n* `useMutation` is the hook for that.\n*\n* @see {@link mutationOptions} to share these options across multiple `useMutation` call sites, or to look\n* the mutation up elsewhere via its `mutationKey` (e.g. with `useMutationState`).\n* @param options - The {@link UseMutationOptions} to use — everything you can pass to `useMutation`.\n* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will\n* be used.\n* @returns `mutate`/`mutateAsync` also accept per-call `onSuccess`/`onError`/`onSettled` callbacks as a second\n* argument, useful for triggering call-site side effects (e.g. navigation) without coupling them to the shared\n* mutation definition. Hook-level callbacks (passed to `options`) fire for every mutation; per-call callbacks\n* fire only for the latest call you've made, and only while the component is still mounted — unmounting before\n* the mutation settles removes the subscription and prevents them from firing.\n*\n* @example\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* return (\n* <button\n* onClick={() =>\n* addMutation.mutate('Item', {\n* onError: (error) => console.error('Failed to add item:', error),\n* })\n* }\n* >\n* Add\n* </button>\n* )\n* }\n* ```\n*\n* @example\n* Rendering the mutation's own state, rather than just firing it off:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* return (\n* <div>\n* {addMutation.isPending ? (\n* 'Adding todo...'\n* ) : (\n* <>\n* {addMutation.isError ? (\n* <div>An error occurred: {addMutation.error.message}</div>\n* ) : null}\n* <button onClick={() => addMutation.mutate('Item')}>Add</button>\n* </>\n* )}\n* </div>\n* )\n* }\n* ```\n*\n* @example\n* Optimistic update via `onMutate`, rolling back on `onError`:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onMutate: async (newTodo) => {\n* await queryClient.cancelQueries({ queryKey: ['todos'] })\n* const previousTodos = queryClient.getQueryData<Array<string>>(['todos'])\n*\n* queryClient.setQueryData<Array<string>>(['todos'], (old) => [\n* ...(old ?? []),\n* newTodo,\n* ])\n*\n* // Passed to `onError` as `onMutateResult` if the mutation fails.\n* return { previousTodos }\n* },\n* onError: (_err, _newTodo, onMutateResult) => {\n* queryClient.setQueryData(['todos'], onMutateResult?.previousTodos)\n* },\n* onSettled: () => {\n* queryClient.invalidateQueries({ queryKey: ['todos'] })\n* },\n* })\n*\n* return (\n* <button onClick={() => addMutation.mutate('Item')}>Add</button>\n* )\n* }\n* ```\n*\n* @example\n* Callbacks passed per call to `mutate` only fire for the last call — `mutateAsync` gives you a\n* promise per call instead, so you can wait for all of them when they succeed:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodos() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* async function handleAddAll(todos: Array<string>) {\n* try {\n* await Promise.all(todos.map((todo) => addMutation.mutateAsync(todo)))\n* } catch (error) {\n* console.error('Failed to add todos:', error)\n* }\n* }\n*\n* return (\n* <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>\n* Add all\n* </button>\n* )\n* }\n* ```\n*\n* @example\n* If some of the mutations above can fail independently of the others, and you want to know which ones\n* did — rather than losing that information the moment the first one rejects — swap `Promise.all` for\n* `Promise.allSettled`:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodos() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* async function handleAddAll(todos: Array<string>) {\n* const addResults = await Promise.allSettled(\n* todos.map((todo) => addMutation.mutateAsync(todo)),\n* )\n*\n* addResults.forEach((addResult, index) => {\n* if (addResult.status === 'rejected') {\n* console.error(`Failed to add \"${todos[index]}\":`, addResult.reason)\n* }\n* })\n* }\n*\n* return (\n* <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>\n* Add all\n* </button>\n* )\n* }\n* ```\n*/\nfunction useMutation(options, queryClient) {\n\tconst client = useQueryClient(queryClient);\n\tconst [observer] = React.useState(() => new MutationObserver(client, options));\n\tReact.useEffect(() => {\n\t\tobserver.setOptions(options);\n\t}, [observer, options]);\n\tconst result = React.useSyncExternalStore(React.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tconst mutate = React.useCallback((...args) => {\n\t\tobserver.mutate(args[0], args[1]).catch(noop);\n\t}, [observer]);\n\tif (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;\n\treturn {\n\t\t...result,\n\t\tmutate,\n\t\tmutateAsync: result.mutate\n\t};\n}\n//#endregion\nexport { useMutation };\n\n//# sourceMappingURL=useMutation.js.map","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n","import type {\n AppUserQuery,\n AuditQuery,\n ContentHealthQuery,\n ContentListQuery,\n DefinitionCategory,\n DeploymentRunQuery,\n JobQuery,\n MediaAssetQuery,\n ScheduleQuery,\n} from '@shapio/client';\n\n/** Every TanStack Query key in the admin, so invalidation targets are explicit. */\nexport const queryKeys = {\n setupStatus: ['setup', 'status'] as const,\n me: ['auth', 'me'] as const,\n sessions: ['auth', 'sessions'] as const,\n users: ['users'] as const,\n invitationInspect: (token: string) => ['invitations', 'inspect', token] as const,\n invitations: ['invitations'] as const,\n roles: ['roles'] as const,\n /** App users (end users of the user's sites) and their roles (package I). */\n appUsers: {\n all: ['appUsers'] as const,\n list: (query: AppUserQuery) => ['appUsers', 'list', query] as const,\n },\n appRoles: {\n all: ['appRoles'] as const,\n role: (id: string) => ['appRoles', id] as const,\n },\n tokens: ['tokens'] as const,\n /** The current site's SEO defaults (Settings → SEO, the SEO field's preview). */\n siteSeo: ['site', 'seo'] as const,\n /** Sites (network view) and each site's app role bindings. */\n sites: {\n all: ['sites'] as const,\n site: (id: string) => ['sites', id] as const,\n appRoles: (id: string) => ['sites', id, 'appRoles'] as const,\n },\n audit: {\n all: ['audit'] as const,\n list: (query: AuditQuery) => ['audit', 'list', query] as const,\n },\n /** The media library; invalidate `media.all` after uploads and edits. */\n media: {\n all: ['media'] as const,\n folders: ['media', 'folders'] as const,\n assets: (query: Omit<MediaAssetQuery, 'cursor'>) => ['media', 'assets', query] as const,\n asset: (id: string) => ['media', 'asset', id] as const,\n usage: (id: string) => ['media', 'usage', id] as const,\n },\n /** Everything derived from the schema snapshot; invalidate `schema.all` when the schema version moves. */\n schema: {\n all: ['schema'] as const,\n summary: ['schema', 'summary'] as const,\n settings: ['schema', 'settings'] as const,\n locales: ['schema', 'locales'] as const,\n definitions: (category: DefinitionCategory) => ['schema', 'definitions', category] as const,\n definition: (category: DefinitionCategory, id: string) =>\n ['schema', 'definitions', category, id] as const,\n /** The models and components shared with all sites (the Network → Content types page). */\n sharedDefinitions: ['schema', 'shared'] as const,\n change: (changeId: string) => ['schema', 'changes', changeId] as const,\n },\n /** Entries per model; invalidate `content.model(key)` after any write to that model. */\n content: {\n all: ['content'] as const,\n model: (modelKey: string) => ['content', modelKey] as const,\n list: (modelKey: string, query: ContentListQuery) => ['content', modelKey, 'list', query] as const,\n entry: (modelKey: string, id: string, locale: string | undefined) =>\n ['content', modelKey, 'entry', id, locale ?? null] as const,\n revisions: (modelKey: string, id: string, locale: string | undefined) =>\n ['content', modelKey, 'revisions', id, locale ?? null] as const,\n revision: (modelKey: string, id: string, revisionId: string) =>\n ['content', modelKey, 'revision', id, revisionId] as const,\n },\n /** Change sets, the snapshot ledger and delivery usage (developer pages, plan developer-face). */\n develop: {\n changeSets: {\n all: ['develop', 'changeSets'] as const,\n list: (status: string) => ['develop', 'changeSets', 'list', status] as const,\n set: (id: string) => ['develop', 'changeSets', 'set', id] as const,\n review: (id: string) => ['develop', 'changeSets', 'review', id] as const,\n timeline: (id: string) => ['develop', 'changeSets', 'timeline', id] as const,\n draft: (id: string, definitionId: string) =>\n ['develop', 'changeSets', 'draft', id, definitionId] as const,\n unassigned: ['develop', 'changeSets', 'unassigned'] as const,\n },\n snapshots: {\n all: ['develop', 'snapshots'] as const,\n list: (cursor: string | undefined) => ['develop', 'snapshots', 'list', cursor ?? null] as const,\n snapshot: (seq: number) => ['develop', 'snapshots', 'snapshot', seq] as const,\n changes: (from: number, to: number) => ['develop', 'snapshots', 'changes', from, to] as const,\n ledger: ['develop', 'snapshots', 'ledger'] as const,\n /** One place read through delivery as it was at `seq`, in one locale. */\n place: (seq: number, routeKey: string, locale: string) =>\n ['develop', 'snapshots', 'place', seq, routeKey, locale] as const,\n },\n /**\n * One page of health findings per model for a change set's Checks (a plain query, so it can't share\n * `contentHealth.list`, which is an infinite query); under `contentHealth` so its invalidation hits it.\n */\n setHealthFindings: (query: ContentHealthQuery) => ['contentHealth', 'changeSet', query] as const,\n usage: {\n all: ['develop', 'usage'] as const,\n model: (modelId: string, days: number) => ['develop', 'usage', 'model', modelId, days] as const,\n },\n },\n /** Editor assists: on/off and usage (rarely changes), and content-ops runs by ID. */\n assist: {\n status: ['assist', 'status'] as const,\n run: (runId: string) => ['assist', 'runs', runId] as const,\n },\n /** Open content health findings (the Inbox) and entries per model (the sidebar's places). */\n contentHealth: {\n all: ['contentHealth'] as const,\n list: (query: ContentHealthQuery) => ['contentHealth', 'list', query] as const,\n summary: ['contentHealth', 'summary'] as const,\n },\n contentCounts: ['contentCounts'] as const,\n /** The live snapshot number (delivery route; the Inbox's \"Recently published\" diffs back from it). */\n currentSnapshot: ['snapshots', 'current'] as const,\n /**\n * Who has entries open: a model's list rows (`presence(modelKey)`) or one entry (`presence(modelKey, id)`).\n * The entry key extends the model key, so invalidating a model's presence refreshes both.\n */\n presence: (modelKey: string, entryId?: string) =>\n entryId === undefined ? (['presence', modelKey] as const) : (['presence', modelKey, entryId] as const),\n /** The entry document's pre-flight (E1); never cached across opens. */\n entryDocument: {\n preflight: (modelKey: string, id: string, locale: string | undefined) =>\n ['entryDocument', 'preflight', modelKey, id, locale ?? null] as const,\n },\n /** Custom field editors installed in the project (read once per session). */\n editorManifest: ['extensions', 'editors'] as const,\n extensionThemes: ['extensions', 'themes'] as const,\n /** Jobs, schedules, webhooks and deployments (package H). */\n publishing: {\n jobs: {\n all: ['publishing', 'jobs'] as const,\n list: (query: JobQuery) => ['publishing', 'jobs', 'list', query] as const,\n summary: ['publishing', 'jobs', 'summary'] as const,\n },\n schedules: {\n all: ['publishing', 'schedules'] as const,\n list: (query: ScheduleQuery) => ['publishing', 'schedules', 'list', query] as const,\n },\n webhooks: {\n all: ['publishing', 'webhooks'] as const,\n list: ['publishing', 'webhooks', 'list'] as const,\n events: ['publishing', 'webhooks', 'events'] as const,\n webhook: (id: string) => ['publishing', 'webhooks', 'webhook', id] as const,\n deliveries: (id: string, cursor: string | undefined) =>\n ['publishing', 'webhooks', 'deliveries', id, cursor ?? null] as const,\n },\n deployments: {\n all: ['publishing', 'deployments'] as const,\n connections: ['publishing', 'deployments', 'connections'] as const,\n connection: (id: string) => ['publishing', 'deployments', 'connections', id] as const,\n runs: (query: DeploymentRunQuery) => ['publishing', 'deployments', 'runs', 'list', query] as const,\n run: (id: string) => ['publishing', 'deployments', 'runs', 'run', id] as const,\n /** The connections previews open on: under `deployments`, so connection changes refresh it. */\n previewTargets: ['publishing', 'deployments', 'previewTargets'] as const,\n },\n },\n};\n","const reduxImpl = (reducer, initial) => (set, _get, api) => {\n api.dispatch = (action) => {\n set((state) => reducer(state, action), false, action);\n return action;\n };\n api.dispatchFromDevtools = true;\n return { dispatch: (...args) => api.dispatch(...args), ...initial };\n};\nconst redux = reduxImpl;\n\nconst shouldDispatchFromDevtools = (api) => !!api.dispatchFromDevtools && typeof api.dispatch === \"function\";\nconst trackedConnections = /* @__PURE__ */ new Map();\nconst getTrackedConnectionState = (name) => {\n const api = trackedConnections.get(name);\n if (!api) return {};\n return Object.fromEntries(\n Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])\n );\n};\nconst extractConnectionInformation = (store, extensionConnector, options) => {\n if (store === void 0) {\n return {\n type: \"untracked\",\n connection: extensionConnector.connect(options)\n };\n }\n const existingConnection = trackedConnections.get(options.name);\n if (existingConnection) {\n return { type: \"tracked\", store, ...existingConnection };\n }\n const newConnection = {\n connection: extensionConnector.connect(options),\n stores: {}\n };\n trackedConnections.set(options.name, newConnection);\n return { type: \"tracked\", store, ...newConnection };\n};\nconst removeStoreFromTrackedConnections = (name, store) => {\n if (store === void 0) return;\n const connectionInfo = trackedConnections.get(name);\n if (!connectionInfo) return;\n delete connectionInfo.stores[store];\n if (Object.keys(connectionInfo.stores).length === 0) {\n trackedConnections.delete(name);\n }\n};\nconst v8StackLineRe = /^at (?:new |async )?(.+?) \\(/;\nconst geckoStackLineRe = /^([^@]+)@/;\nfunction findCallerName(stack) {\n var _a, _b, _c;\n if (!stack) return void 0;\n const traceLines = stack.split(\"\\n\");\n const apiSetStateLineIndex = traceLines.findIndex(\n (traceLine) => traceLine.includes(\"api.setState\")\n );\n if (apiSetStateLineIndex < 0) return void 0;\n const callerLine = ((_a = traceLines[apiSetStateLineIndex + 1]) == null ? void 0 : _a.trim()) || \"\";\n return ((_b = v8StackLineRe.exec(callerLine)) == null ? void 0 : _b[1]) || ((_c = geckoStackLineRe.exec(callerLine)) == null ? void 0 : _c[1]);\n}\nconst devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {\n const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;\n let extensionConnector;\n try {\n extensionConnector = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n } catch (e) {\n }\n if (!extensionConnector) {\n return fn(set, get, api);\n }\n const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);\n let isRecording = true;\n api.setState = ((state, replace, nameOrAction) => {\n const r = set(state, replace);\n if (!isRecording) return r;\n const action = nameOrAction === void 0 ? {\n type: anonymousActionType || findCallerName(new Error().stack) || \"anonymous\"\n } : typeof nameOrAction === \"string\" ? { type: nameOrAction } : nameOrAction;\n if (store === void 0) {\n connection == null ? void 0 : connection.send(action, get());\n return r;\n }\n connection == null ? void 0 : connection.send(\n {\n ...action,\n type: `${store}/${action.type}`\n },\n {\n ...getTrackedConnectionState(options.name),\n [store]: api.getState()\n }\n );\n return r;\n });\n api.devtools = {\n cleanup: () => {\n if (connection && typeof connection.unsubscribe === \"function\") {\n connection.unsubscribe();\n }\n removeStoreFromTrackedConnections(options.name, store);\n }\n };\n const setStateFromDevtools = (...a) => {\n const originalIsRecording = isRecording;\n isRecording = false;\n set(...a);\n isRecording = originalIsRecording;\n };\n const initialState = fn(api.setState, get, api);\n if (connectionInformation.type === \"untracked\") {\n connection == null ? void 0 : connection.init(initialState);\n } else {\n connectionInformation.stores[connectionInformation.store] = api;\n connection == null ? void 0 : connection.init(\n Object.fromEntries(\n Object.entries(connectionInformation.stores).map(([key, store2]) => [\n key,\n key === connectionInformation.store ? initialState : store2.getState()\n ])\n )\n );\n }\n if (shouldDispatchFromDevtools(api)) {\n let didWarnAboutReservedActionType = false;\n const originalDispatch = api.dispatch;\n api.dispatch = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && args[0].type === \"__setState\" && !didWarnAboutReservedActionType) {\n console.warn(\n '[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it.'\n );\n didWarnAboutReservedActionType = true;\n }\n originalDispatch(...args);\n };\n }\n connection.subscribe((message) => {\n var _a;\n switch (message.type) {\n case \"ACTION\":\n if (typeof message.payload !== \"string\") {\n console.error(\n \"[zustand devtools middleware] Unsupported action format\"\n );\n return;\n }\n return parseJsonThen(\n message.payload,\n (action) => {\n if (action.type === \"__setState\") {\n if (store === void 0) {\n setStateFromDevtools(action.state);\n return;\n }\n if (Object.keys(action.state).length !== 1) {\n console.error(\n `\n [zustand devtools middleware] Unsupported __setState action format.\n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n `\n );\n }\n const stateFromDevtools = action.state[store];\n if (stateFromDevtools === void 0 || stateFromDevtools === null) {\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {\n setStateFromDevtools(stateFromDevtools);\n }\n return;\n }\n if (shouldDispatchFromDevtools(api)) {\n api.dispatch(action);\n }\n }\n );\n case \"DISPATCH\":\n switch (message.payload.type) {\n case \"RESET\":\n setStateFromDevtools(initialState);\n if (store === void 0) {\n return connection == null ? void 0 : connection.init(api.getState());\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"COMMIT\":\n if (store === void 0) {\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"ROLLBACK\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n setStateFromDevtools(state[store]);\n connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n });\n case \"JUMP_TO_STATE\":\n case \"JUMP_TO_ACTION\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {\n setStateFromDevtools(state[store]);\n }\n });\n case \"IMPORT_STATE\": {\n const { nextLiftedState } = message.payload;\n const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;\n if (!lastComputedState) return;\n if (store === void 0) {\n setStateFromDevtools(lastComputedState);\n } else {\n setStateFromDevtools(lastComputedState[store]);\n }\n connection == null ? void 0 : connection.send(\n null,\n // FIXME no-any\n nextLiftedState\n );\n return;\n }\n case \"PAUSE_RECORDING\":\n return isRecording = !isRecording;\n }\n return;\n }\n });\n return initialState;\n};\nconst devtools = devtoolsImpl;\nconst parseJsonThen = (stringified, fn) => {\n let parsed;\n try {\n parsed = JSON.parse(stringified);\n } catch (e) {\n console.error(\n \"[zustand devtools middleware] Could not parse the received json\",\n e\n );\n }\n if (parsed !== void 0) fn(parsed);\n};\n\nconst subscribeWithSelectorImpl = (fn) => (set, get, api) => {\n const origSubscribe = api.subscribe;\n api.subscribe = ((selector, optListener, options) => {\n let listener = selector;\n if (optListener) {\n const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;\n let currentSlice = selector(api.getState());\n listener = (state) => {\n const nextSlice = selector(state);\n if (!equalityFn(currentSlice, nextSlice)) {\n const previousSlice = currentSlice;\n optListener(currentSlice = nextSlice, previousSlice);\n }\n };\n if (options == null ? void 0 : options.fireImmediately) {\n optListener(currentSlice, currentSlice);\n }\n }\n return origSubscribe(listener);\n });\n const initialState = fn(set, get, api);\n return initialState;\n};\nconst subscribeWithSelector = subscribeWithSelectorImpl;\n\nfunction combine(initialState, create) {\n return (...args) => Object.assign({}, initialState, create(...args));\n}\n\nfunction createJSONStorage(getStorage, options) {\n let storage;\n try {\n storage = getStorage();\n } catch (e) {\n return;\n }\n const persistStorage = {\n getItem: (name) => {\n var _a;\n const parse = (str2) => {\n if (str2 === null) {\n return null;\n }\n return JSON.parse(str2, options == null ? void 0 : options.reviver);\n };\n const str = (_a = storage.getItem(name)) != null ? _a : null;\n if (str instanceof Promise) {\n return str.then(parse);\n }\n return parse(str);\n },\n setItem: (name, newValue) => storage.setItem(name, JSON.stringify(newValue, options == null ? void 0 : options.replacer)),\n removeItem: (name) => storage.removeItem(name)\n };\n return persistStorage;\n}\nconst toThenable = (fn) => (input) => {\n try {\n const result = fn(input);\n if (result instanceof Promise) {\n return result;\n }\n return {\n then(onFulfilled) {\n return toThenable(onFulfilled)(result);\n },\n catch(_onRejected) {\n return this;\n }\n };\n } catch (e) {\n return {\n then(_onFulfilled) {\n return this;\n },\n catch(onRejected) {\n return toThenable(onRejected)(e);\n }\n };\n }\n};\nconst persistImpl = (config, baseOptions) => (set, get, api) => {\n let options = {\n storage: createJSONStorage(() => window.localStorage),\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => ({\n ...currentState,\n ...persistedState\n }),\n ...baseOptions\n };\n let hasHydrated = false;\n let hydrationVersion = 0;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage = options.storage;\n if (!storage) {\n return config(\n (...args) => {\n console.warn(\n `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n );\n set(...args);\n },\n get,\n api\n );\n }\n const setItem = () => {\n const state = options.partialize({ ...get() });\n return storage.setItem(options.name, {\n state,\n version: options.version\n });\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n return setItem();\n };\n const configResult = config(\n (...args) => {\n set(...args);\n return setItem();\n },\n get,\n api\n );\n api.getInitialState = () => configResult;\n let stateFromStorage;\n const hydrate = () => {\n var _a, _b;\n if (!storage) return;\n const currentVersion = ++hydrationVersion;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => {\n var _a2;\n return cb((_a2 = get()) != null ? _a2 : configResult);\n });\n const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a = get()) != null ? _a : configResult)) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n const migration = options.migrate(\n deserializedStorageValue.state,\n deserializedStorageValue.version\n );\n if (migration instanceof Promise) {\n return migration.then((result) => [true, result]);\n }\n return [true, migration];\n }\n console.error(\n `State loaded from storage couldn't be migrated since no migrate function was provided`\n );\n } else {\n return [false, deserializedStorageValue.state];\n }\n }\n return [false, void 0];\n }).then((migrationResult) => {\n var _a2;\n if (currentVersion !== hydrationVersion) {\n return;\n }\n const [migrated, migratedState] = migrationResult;\n stateFromStorage = options.merge(\n migratedState,\n (_a2 = get()) != null ? _a2 : configResult\n );\n set(stateFromStorage, true);\n if (migrated) {\n return setItem();\n }\n }).then(() => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(get(), void 0);\n stateFromStorage = get();\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = {\n ...options,\n ...newOptions\n };\n if (newOptions.storage) {\n storage = newOptions.storage;\n }\n },\n clearStorage: () => {\n ++hydrationVersion;\n storage == null ? void 0 : storage.removeItem(options.name);\n },\n getOptions: () => options,\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n if (!options.skipHydration) {\n hydrate();\n }\n return stateFromStorage || configResult;\n};\nconst persist = persistImpl;\n\nfunction ssrSafe(config, isSSR = typeof window === \"undefined\") {\n return (set, get, api) => {\n if (!isSSR) {\n return config(set, get, api);\n }\n const ssrSet = () => {\n throw new Error(\"Cannot set state of Zustand store in SSR\");\n };\n api.setState = ssrSet;\n return config(ssrSet, get, api);\n };\n}\n\nexport { combine, createJSONStorage, devtools, persist, redux, subscribeWithSelector, ssrSafe as unstable_ssrSafe };\n","import { createJSONStorage, type StateStorage } from 'zustand/middleware';\n\n/**\n * localStorage that never throws: it is unavailable in private windows, with blocked site data, or when\n * full. Persisted state is a convenience (theme, sidebar), so failures fall back to in-memory defaults.\n */\nexport const safeLocalStorage: StateStorage = {\n getItem: (name) => {\n try {\n return window.localStorage.getItem(name);\n } catch {\n return null;\n }\n },\n setItem: (name, value) => {\n try {\n window.localStorage.setItem(name, value);\n } catch {\n // Not persisted this time; the in-memory store still holds the value.\n }\n },\n removeItem: (name) => {\n try {\n window.localStorage.removeItem(name);\n } catch {\n // Nothing to remove when storage is unavailable.\n }\n },\n};\n\nexport const persistentStorage = createJSONStorage(() => safeLocalStorage);\n","/**\n * The router's basename is the path of `<base href>`: `{BASE_PATH}/admin` in production (injected by the\n * API), `/admin` in development (injected by Vite). Trailing slash removed, as the router expects.\n */\nexport const routerBasePath = () => new URL(document.baseURI).pathname.replace(/\\/+$/, '') || '/';\n","/**\n * Where the site sits in an admin URL (sites plan §H, ADR 0011). Paths here are the router's: relative to\n * the router basepath (`{BASE_PATH}/admin`). Site pages carry the site as a prefix (`/s/blog/content/posts`);\n * network pages (`/network/*`) and the signed-out screens (sign-in, setup, password reset, invitations: the\n * links in emails) carry none.\n */\n\nconst SITE_PREFIX = /^\\/s\\/([a-z][a-z0-9-]{0,62})(?=\\/|$)/;\n\nexport const NETWORK_PATH = '/network';\n\n/** Screens outside any site: signed out, or reached from an email link. */\nconst UNSITED_PATHS: readonly string[] = [\n '/setup',\n '/login',\n '/forgot-password',\n '/reset-password',\n '/accept-invitation',\n];\n\nconst isUnder = (pathname: string, base: string) => pathname === base || pathname.startsWith(`${base}/`);\n\n/** The site key a path names, and the path without it (`/s/blog/content` → `blog`, `/content`). */\nexport const splitSitePath = (pathname: string): { key: string | undefined; rest: string } => {\n const match = SITE_PREFIX.exec(pathname);\n if (!match) {\n return { key: undefined, rest: pathname };\n }\n return { key: match[1], rest: pathname.slice(match[0].length) || '/' };\n};\n\n/** Network pages and signed-out screens: their URLs never carry a site. */\nexport const isSitelessPath = (pathname: string) =>\n isUnder(pathname, NETWORK_PATH) || UNSITED_PATHS.some((path) => isUnder(pathname, path));\n\nexport const isNetworkPath = (pathname: string) => isUnder(pathname, NETWORK_PATH);\n\n/** The public path of a router path on a site: `/content` → `/s/blog/content`; siteless paths unchanged. */\nexport const withSitePrefix = (pathname: string, key: string | undefined) =>\n key === undefined || isSitelessPath(pathname) ? pathname : `/s/${key}${pathname === '/' ? '/' : pathname}`;\n\n/**\n * A site page whose URL doesn't carry the site yet (`/admin/content/posts`, or `/admin/` itself): the\n * router rewrites it to the site's URL once the site is known.\n */\nexport const needsSitePrefix = (pathname: string) =>\n splitSitePath(pathname).key === undefined && !isSitelessPath(pathname);\n","import { safeLocalStorage } from '@/helpers/safeStorage';\nimport { routerBasePath } from './basePath';\nimport { splitSitePath, withSitePrefix } from './sitePaths';\n\n/**\n * The site this page load works on (sites plan §H). It is fixed for the life of the document: switching\n * sites is a full navigation, so no query cache, store or in-flight request ever crosses sites.\n *\n * - `explicit`: the URL named the site (`/admin/s/blog/...`).\n * - Otherwise the last site this browser worked on; or none yet, in which case the API answers for the\n * primary site and the site is taken from `me` (the primary site's key is never hardcoded).\n */\nexport type CurrentSite = { key: string | undefined; explicit: boolean };\n\nconst LAST_SITE_KEY = 'shapio.site';\n\n/** The router path of the current URL (the part after `{BASE_PATH}/admin`). */\nexport const currentRouterPath = () => {\n const base = routerBasePath();\n const { pathname } = window.location;\n const rest = base !== '/' && pathname.startsWith(base) ? pathname.slice(base.length) : pathname;\n return rest.startsWith('/') ? rest : `/${rest}`;\n};\n\nconst readLastSite = (): string | undefined => {\n const stored = safeLocalStorage.getItem(LAST_SITE_KEY);\n return typeof stored === 'string' && splitSitePath(`/s/${stored}`).key === stored ? stored : undefined;\n};\n\nconst resolveBootSite = (): CurrentSite => {\n const { key } = splitSitePath(currentRouterPath());\n return key === undefined ? { key: readLastSite(), explicit: false } : { key, explicit: true };\n};\n\nlet state: CurrentSite | undefined;\n\nexport const currentSite = (): CurrentSite => {\n state ??= resolveBootSite();\n return state;\n};\n\n/** Once `me` has said which site the API answered for (the primary site, when the URL named none). */\nexport const settleSiteKey = (key: string) => {\n state = { ...currentSite(), key };\n};\n\n/** Remembered for the next visit to a URL without a site. */\nexport const rememberSite = (key: string) => {\n void safeLocalStorage.setItem(LAST_SITE_KEY, key);\n};\n\nconst forgetSite = () => {\n void safeLocalStorage.removeItem(LAST_SITE_KEY);\n};\n\n/** The public URL of a site's home (its Inbox). */\nexport const siteHomeUrl = (key: string) => `${routerBasePath().replace(/\\/$/, '')}/s/${key}/`;\n\n/** The public URL of a network page (`/network/sites`). */\nexport const networkUrl = (path = '/network') => `${routerBasePath().replace(/\\/$/, '')}${path}`;\n\n/**\n * Opens another site: a full navigation, so the new document starts with an empty query cache and sends\n * the new site's header from its first request.\n */\nexport const goToSite = (key: string) => {\n rememberSite(key);\n window.location.assign(siteHomeUrl(key));\n};\n\n/**\n * This page load's site was just deleted (from the network view): its requests would now fail, so forget it\n * and load the sites list again, which answers for the primary site.\n */\nexport const leaveDeletedSite = () => {\n forgetSite();\n window.location.assign(networkUrl('/network/sites'));\n};\n\n/**\n * The remembered site no longer exists (deleted, or another instance on the same origin): forget it and load\n * the page again without it, so the API answers for the primary site.\n */\nexport const leaveUnknownSite = () => {\n forgetSite();\n window.location.reload();\n};\n\n/** Replaces the current history entry's URL with the same page on the current site (`/content` → `/s/blog/content`). */\nexport const showSiteInAddressBar = () => {\n const base = routerBasePath().replace(/\\/$/, '');\n const path = withSitePrefix(currentRouterPath(), currentSite().key);\n const { search, hash } = window.location;\n window.history.replaceState(window.history.state, '', `${base}${path}${search}${hash}`);\n};\n","const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const api = { setState, getState, getInitialState, subscribe };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);\n\nexport { createStore };\n","import React from 'react';\nimport { createStore } from 'zustand/vanilla';\n\nconst identity = (arg) => arg;\nfunction useStore(api, selector = identity) {\n const slice = React.useSyncExternalStore(\n api.subscribe,\n React.useCallback(() => selector(api.getState()), [api, selector]),\n React.useCallback(() => selector(api.getInitialState()), [api, selector])\n );\n React.useDebugValue(slice);\n return slice;\n}\nconst createImpl = (createState) => {\n const api = createStore(createState);\n const useBoundStore = (selector) => useStore(api, selector);\n Object.assign(useBoundStore, api);\n return useBoundStore;\n};\nconst create = ((createState) => createState ? createImpl(createState) : createImpl);\n\nexport { create, useStore };\n","import { create } from 'zustand';\n\ntype SessionState = {\n /** CSRF token bound to the current admin session; fetched lazily, cleared whenever the session changes. */\n csrfToken: string | undefined;\n setCsrfToken: (token: string | undefined) => void;\n};\n\nexport const useSessionStore = create<SessionState>()((set) => ({\n csrfToken: undefined,\n setCsrfToken: (csrfToken) => set({ csrfToken }),\n}));\n","import { createClient } from '@shapio/client';\nimport { currentSite } from '@/app/currentSite';\nimport { useSessionStore } from '@/stores/session';\n\n/**\n * The API lives beside the admin: `<base href>` is `{BASE_PATH}/admin/`, so `..` is `{BASE_PATH}/`.\n * Same origin, so the session cookie travels with `same-origin` credentials and no CORS is involved.\n */\nexport const apiBaseUrl = () => new URL('..', document.baseURI).href;\n\nexport const CSRF_HEADER = 'x-csrf-token';\n\n/**\n * Every request names this page load's site (the `Shapio-Site` header; `?site=` on delivery reads). With no\n * site in the URL and none remembered, nothing is named and the API answers for the primary site, which is\n * then the page's site (see app/currentSite). The site never changes during a page load.\n */\nexport const apiClient = createClient({\n baseUrl: apiBaseUrl(),\n credentials: 'same-origin',\n site: currentSite().key,\n headers: (): Record<string, string> => {\n const token = useSessionStore.getState().csrfToken;\n return token ? { [CSRF_HEADER]: token } : {};\n },\n});\n\nexport const adminApi = apiClient.admin;\n","import { ShapioApiError } from '@shapio/client';\nimport { useSessionStore } from '@/stores/session';\nimport { adminApi } from './client';\n\n/**\n * The API reports CSRF failures as 403 FORBIDDEN with a CSRF message (@fastify/csrf-protection errors pass\n * through the generic error mapping); a dedicated code is matched too, should the API add one.\n */\nconst isCsrfRejection = (error: unknown) =>\n error instanceof ShapioApiError &&\n error.status === 403 &&\n (/csrf/i.test(error.code) || /csrf/i.test(error.message));\n\nexport const setCsrfToken = (token: string) => useSessionStore.getState().setCsrfToken(token);\n\nconst refreshCsrfToken = async () => {\n const { csrfToken } = await adminApi.auth.csrf();\n setCsrfToken(csrfToken);\n};\n\n/**\n * Runs a cookie-authenticated mutation with the session's CSRF token (delivered by login, setup and `me`).\n * If the server still rejects it as missing or stale, a fresh token is fetched and the call retried once.\n */\nexport const withCsrf = async <T>(call: () => Promise<T>): Promise<T> => {\n try {\n return await call();\n } catch (error) {\n if (!isCsrfRejection(error)) {\n throw error;\n }\n await refreshCsrfToken();\n return call();\n }\n};\n\n/** The CSRF secret belongs to the session: forget the token whenever the session changes. */\nexport const resetCsrfToken = () => useSessionStore.getState().setCsrfToken(undefined);\n","/**\n * @license lucide-react v1.49.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"loader-circle\",\n size: 24,\n node: [[\"path\", { d: \"M21 12a9 9 0 1 1-6.219-8.56\", key: \"13zald\" }]],\n aliases: [\"loader-2\"]\n};\n__iconData.node;\nconst LoaderCircle = createLucideIcon(__iconData);\n\nexport { __iconData, LoaderCircle as default };\n//# sourceMappingURL=loader-circle.mjs.map\n"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,25,30,31,35],"mappings":"6OAOMW,EAAAF,EAA2B,cAAc,IAAK,EAAC,EAS/CG,EAAkB,GAAgB,CACvC,IAAMC,EAAAJ,EAAe,WAAWE,CAAkB,EAClD,GAAIG,EAAa,OAAOA,EACxB,GAAI,CAACD,EAAQ,MAAU,MAAM,wDAAwD,EACrF,OAAOA,CACR,EAoBME,GAAuB,CAAE,SAAQ,eACtCN,EAAM,eACLI,EAAO,MAAM,MACA,CACZA,EAAO,QAAQ,CAChB,GACE,CAACA,CAAM,CAAC,GACY,EAAAH,EAAA,IAAA,CAAIC,EAAmB,SAAU,CACvD,MAAOE,EACP,UACD,CAAC,GClDIG,EAAyB,CAC9B,YAAa,EAAU,IAAU,WAAWC,EAAUC,CAAK,EAC3D,aAAe,GAAc,aAAaC,CAAS,EACnD,aAAc,EAAU,IAAU,YAAYF,EAAUC,CAAK,EAC7D,cAAgB,GAAe,cAAcE,CAAU,CACxD,EA2IMC,EAAiB,IAAI,KA/HA,CAC1B,GAAYL,EA2BZ,mBAAmB,EAAU,CAO5B,KAA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ACvB1T,aAAiBnJ,GACjBmJ,EAAM,SAAW,MAChB,QAAQ,KAAKA,EAAM,IAAI,GAAK,QAAQ,KAAKA,EAAM,OAAO,GAE5C2T,GAAgB,GAAkBN,EAAgB,SAAS,CAAC,CAAC,aAAa1G,CAAK,EAEtFiH,GAAmB,SAAY,CACnC,GAAM,CAAE,aAAc,MAAMH,GAAS,KAAK,KAAK,EAC/CE,GAAaE,CAAS,CACxB,EAMaC,GAAW,KAAU,IAAuC,CACvE,GAAI,CACF,OAAO,MAAMC,EAAK,CACpB,OAAS/T,EAAO,CACd,GAAI,CAAC0T,GAAgB1T,CAAK,EACxB,MAAMA,EAGR,OADA,MAAM4T,GAAiB,EAChBG,EAAK,CACd,CACF,EAGaC,OAAuBX,EAAgB,SAAS,CAAC,CAAC,aAAa,IAAA,EAAS,EC5B/EY,GAAa,CACjB,KAAM,gBACN,KAAM,GACN,KAAM,CAAC,CAAC,OAAQ,CAAE,EAAG,8BAA+B,IAAK,QAAS,CAAC,CAAC,EACpE,QAAS,CAAC,UAAU,CACtB,EACAA,GAAW,KACX,IAAMC,GAAend,EAAiBkd,EAAU"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{A as e,O as t,i as n,j as r,lt as i,o as a}from"./loader-circle-C-9trZPI.js";var o={silent:!0},s=()=>r({queryKey:t.schema.locales,queryFn:()=>a.locales.list(),meta:o}),c=()=>{let e=i();return()=>e.invalidateQueries({queryKey:t.schema.all})},l=()=>{let t=c();return e({mutationKey:[`locales`,`create`],meta:o,mutationFn:e=>n(()=>a.locales.create(e)),onSuccess:t})},u=()=>{let t=c();return e({mutationKey:[`locales`,`update`],meta:o,mutationFn:({code:e,input:t})=>n(()=>a.locales.update(e,t)),onSuccess:t})},d=()=>{let t=c();return e({mutationKey:[`locales`,`setDefault`],meta:o,mutationFn:e=>n(()=>a.locales.setDefault(e,!0)),onSuccess:t})},f=()=>{let t=c();return e({mutationKey:[`locales`,`delete`],meta:o,mutationFn:({code:e,acknowledged:t})=>n(()=>a.locales.remove(e,t)),onSuccess:t})};export{u as a,d as i,f as n,s as r,l as t};
|
|
2
|
-
//# sourceMappingURL=locales-e7B5t6id.js.map
|