db-studio 2.1.0 → 2.2.1
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/index.js +69 -69
- package/dist/index.js.map +1 -1
- package/dist/web-dist/assets/_pathlessLayout-1KXlcJn5.js +1 -0
- package/dist/web-dist/assets/_pathlessLayout-D4dS7_ZZ.js +2 -0
- package/dist/web-dist/assets/_queryId-DfjPCkx7.js +1 -0
- package/dist/web-dist/assets/_table-ChX0JQnV.js +1 -0
- package/dist/web-dist/assets/{_table-BUNHOVIK.js → _table-DQvTfc38.js} +1 -1
- package/dist/web-dist/assets/_table-M7xRcFSl.js +1 -0
- package/dist/web-dist/assets/{abap-B-HzHdT_.js → abap-DYZIj1QT.js} +1 -1
- package/dist/web-dist/assets/{apex-t5VcK3BF.js → apex-CaiB2cHW.js} +1 -1
- package/dist/web-dist/assets/{azcli-Ce3iuV2p.js → azcli-BSMSllBA.js} +1 -1
- package/dist/web-dist/assets/{badge-COF6gx-2.js → badge-DAJ-55CZ.js} +1 -1
- package/dist/web-dist/assets/{bat-bOBZcLbK.js → bat-DslF3aSP.js} +1 -1
- package/dist/web-dist/assets/{bicep-TSicgsnM.js → bicep-BaONjKcy.js} +1 -1
- package/dist/web-dist/assets/{browser-B-fV6CZb.js → browser-BXjW1U6_.js} +1 -1
- package/dist/web-dist/assets/bundle-mjs-DGKUXiQC.js +1 -0
- package/dist/web-dist/assets/{cameligo-D-9xpPXV.js → cameligo-B-VCpHXR.js} +1 -1
- package/dist/web-dist/assets/chat-sidebar-DhhMmf_h.js +161 -0
- package/dist/web-dist/assets/{clojure-9X3x3csE.js → clojure-CQdNGvuT.js} +1 -1
- package/dist/web-dist/assets/{code-editor-tPwHd3zF.js → code-editor-B9_5weuZ.js} +2 -2
- package/dist/web-dist/assets/{codicon-Brq4_Ui5.ttf → codicon-DF1abBS2.ttf} +0 -0
- package/dist/web-dist/assets/{coffee-anOch8Z-.js → coffee-GJxdv8v9.js} +1 -1
- package/dist/web-dist/assets/connect-CCHOGwiQ.js +1 -0
- package/dist/web-dist/assets/constants-CJqw7w68.js +20 -0
- package/dist/web-dist/assets/{cpp-oW293AoF.js → cpp-bdOuYgjm.js} +1 -1
- package/dist/web-dist/assets/{csharp-BOXMgm5k.js → csharp-DtT4S3qG.js} +1 -1
- package/dist/web-dist/assets/{csp-D67JhNKT.js → csp-DcT8MidV.js} +1 -1
- package/dist/web-dist/assets/{css-Bk6H7_K_.js → css-aK0ks7hY.js} +1 -1
- package/dist/web-dist/assets/{css.worker-B-fFSVTK.js → css.worker-bHD0dlJO.js} +1507 -1453
- package/dist/web-dist/assets/cssMode-5aGt4Xk4.js +1 -0
- package/dist/web-dist/assets/{cypher-DB0LBjic.js → cypher-gkqrqdhb.js} +1 -1
- package/dist/web-dist/assets/{dart-CS3MbwLP.js → dart-D55faCn9.js} +1 -1
- package/dist/web-dist/assets/database.store-BOgNcBMG.js +57 -0
- package/dist/web-dist/assets/dist-BA0_BdMR.js +1 -0
- package/dist/web-dist/assets/dist-DAuUtATJ.js +2 -0
- package/dist/web-dist/assets/{dockerfile-BGz3qsmk.js → dockerfile-CsHs8WRI.js} +1 -1
- package/dist/web-dist/assets/{ecl-lt3qcklx.js → ecl-CQKiIf56.js} +1 -1
- package/dist/web-dist/assets/editor-g1MJRkXV.css +1 -0
- package/dist/web-dist/assets/editor.api-BZk1XbZs.js +926 -0
- package/dist/web-dist/assets/{editor.worker-BYfbSb3U.js → editor.worker-ByY_fgkM.js} +1328 -1274
- package/dist/web-dist/assets/{elixir-cMyUafed.js → elixir-CfFxQLCK.js} +1 -1
- package/dist/web-dist/assets/esm-BhcGPxbM.js +1 -0
- package/dist/web-dist/assets/{esm-B-4Q6MuQ.js → esm-C1Qg-CCP.js} +1 -1
- package/dist/web-dist/assets/{flow9-BI9V6TuS.js → flow9-CLkaJU-U.js} +1 -1
- package/dist/web-dist/assets/format-cell-value-BcH_SExw.js +1 -0
- package/dist/web-dist/assets/{freemarker2-mnCFA3xV.js → freemarker2-Dbf5KAvd.js} +2 -2
- package/dist/web-dist/assets/{fsharp-I1kqnt0E.js → fsharp-4RCsDl1X.js} +1 -1
- package/dist/web-dist/assets/{go-Cg4qMFVj.js → go-BCuLk40y.js} +1 -1
- package/dist/web-dist/assets/{graphql-CvtHcP49.js → graphql-Cuc1fjZl.js} +1 -1
- package/dist/web-dist/assets/{handlebars-BUcE6Uyy.js → handlebars-Bc8nHcpq.js} +1 -1
- package/dist/web-dist/assets/{hcl-BkvCdKNu.js → hcl-BqquCvZs.js} +1 -1
- package/dist/web-dist/assets/highlighted-body-JLMTFACH-Q1Yc-gaw.js +1 -0
- package/dist/web-dist/assets/{html-BBqcfykD.js → html-ZcQmh2HM.js} +1 -1
- package/dist/web-dist/assets/{html.worker-CdalOg9p.js → html.worker-CHVREBCJ.js} +1527 -1473
- package/dist/web-dist/assets/{htmlMode-D8je66Rk.js → htmlMode-BkwHscgL.js} +1 -1
- package/dist/web-dist/assets/icons-IBpZgbE4.js +1 -0
- package/dist/web-dist/assets/index-DTVRtzpz.css +2 -0
- package/dist/web-dist/assets/index-DfnmlclA.js +34 -0
- package/dist/web-dist/assets/indexes-DUzB2YOr.js +1 -0
- package/dist/web-dist/assets/{ini-CPc8BCWu.js → ini-DK3PnweE.js} +1 -1
- package/dist/web-dist/assets/{java-C9Yie4SH.js → java-CCKilWzS.js} +1 -1
- package/dist/web-dist/assets/{javascript-CuGq5ydO.js → javascript-Cy_Mv9Jz.js} +1 -1
- package/dist/web-dist/assets/{json-editor-Dc1E8Fc-.js → json-editor-CE8bI5n-.js} +1 -1
- package/dist/web-dist/assets/{json.worker-DI02pyM8.js → json.worker-BKCy_srb.js} +2747 -2693
- package/dist/web-dist/assets/{jsonMode-BgdTmYik.js → jsonMode-wvGZQK-h.js} +4 -4
- package/dist/web-dist/assets/{julia--qJGRfN8.js → julia-yMXHdeoG.js} +1 -1
- package/dist/web-dist/assets/{keys-Bs0DRbCB.js → keys-B1bnQf8h.js} +1 -1
- package/dist/web-dist/assets/{kotlin-C3MSe-0N.js → kotlin-BbY6gpqm.js} +1 -1
- package/dist/web-dist/assets/{label-DzHJlGAx.js → label-B5lrF5vb.js} +1 -1
- package/dist/web-dist/assets/{less-DOBYgWSY.js → less-rp9k6ONg.js} +1 -1
- package/dist/web-dist/assets/{lexon-Djd2rGvJ.js → lexon-rRyNfudJ.js} +1 -1
- package/dist/web-dist/assets/{liquid-DXfHmR66.js → liquid-TDvflZF7.js} +1 -1
- package/dist/web-dist/assets/{logs-BortjBc-.js → logs-C2iyjCnP.js} +1 -1
- package/dist/web-dist/assets/{lspLanguageFeatures-C7-iyD6G.js → lspLanguageFeatures-DkWvqpF_.js} +1 -1
- package/dist/web-dist/assets/{lua-Ck8vNcPw.js → lua-DInTck7-.js} +1 -1
- package/dist/web-dist/assets/{m3-a6Kl4TV0.js → m3-D1zMDYBU.js} +1 -1
- package/dist/web-dist/assets/{markdown-DkcRBwO0.js → markdown-DTHzen51.js} +1 -1
- package/dist/web-dist/assets/{mdx-QI5o45qz.js → mdx-D9pd4Hjw.js} +1 -1
- package/dist/web-dist/assets/mermaid-WFAXDIZX-B2YMTdfH.js +1 -0
- package/dist/web-dist/assets/middleware-gB5jp1rF.js +1 -0
- package/dist/web-dist/assets/{mips-Cc1YVI2p.js → mips-7Slzy87X.js} +1 -1
- package/dist/web-dist/assets/module-BHjgyYxe.js +3 -0
- package/dist/web-dist/assets/monaco-theme-CFrVB-OG.js +68 -0
- package/dist/web-dist/assets/monaco-theme-DtsiNm_H.css +1 -0
- package/dist/web-dist/assets/{msdax-Bh41xUoQ.js → msdax-CVw_oFJe.js} +1 -1
- package/dist/web-dist/assets/{mysql-BZTZMxPa.js → mysql-92xfRPFN.js} +1 -1
- package/dist/web-dist/assets/{objective-c-CxZIMOHQ.js → objective-c-BXnCggXS.js} +1 -1
- package/dist/web-dist/assets/{overlay.store-DsUdwZjE.js → overlay.store-wgNV6JkK.js} +1 -1
- package/dist/web-dist/assets/{pascal-I-WmLkmD.js → pascal-3fByeJdZ.js} +1 -1
- package/dist/web-dist/assets/{pascaligo-DEZ-6bwf.js → pascaligo-BdC4YsoB.js} +1 -1
- package/dist/web-dist/assets/{perl-DfeHQJxJ.js → perl-ClTLOqGp.js} +1 -1
- package/dist/web-dist/assets/{personal-preferences.store-DXSnKmVN.js → personal-preferences.store-dG5rDcRw.js} +1 -1
- package/dist/web-dist/assets/{pgsql-OdOoQYPW.js → pgsql-DEzB6Ucu.js} +1 -1
- package/dist/web-dist/assets/{php-CF1bUutw.js → php-DVFKZpKp.js} +1 -1
- package/dist/web-dist/assets/{pla-BHZr0GrY.js → pla-0ER0Ntvs.js} +1 -1
- package/dist/web-dist/assets/{postiats-BSB6a63H.js → postiats-CEuE_fTP.js} +1 -1
- package/dist/web-dist/assets/{powerquery-Bu0p84Ye.js → powerquery-IX0j-GcX.js} +1 -1
- package/dist/web-dist/assets/{powershell-Dcq3YM6T.js → powershell-PrZfSRSf.js} +1 -1
- package/dist/web-dist/assets/preload-helper-Bpqt02Xx.js +1 -0
- package/dist/web-dist/assets/{protobuf-CsWrQxqX.js → protobuf-CCWom7A4.js} +1 -1
- package/dist/web-dist/assets/{pug-DLQiv3Bp.js → pug-B-mwU8C7.js} +1 -1
- package/dist/web-dist/assets/{python-BvKEpyP9.js → python-B-RGw6sh.js} +1 -1
- package/dist/web-dist/assets/{qsharp-D8nrRUNu.js → qsharp-zXtiGbGZ.js} +1 -1
- package/dist/web-dist/assets/{queries.store-BaeyNA64.js → queries.store-CL_QZ9kV.js} +1 -1
- package/dist/web-dist/assets/query-runner-__vttAd8.js +17 -0
- package/dist/web-dist/assets/{r-xhyKpGTk.js → r-ff7AzNUE.js} +1 -1
- package/dist/web-dist/assets/radix-ui-BLYTVDm9.js +41 -0
- package/dist/web-dist/assets/{razor-Ceb9S1Rz.js → razor-f0SZhWBH.js} +1 -1
- package/dist/web-dist/assets/react-Cuc8VqJk.js +1 -0
- package/dist/web-dist/assets/react-dom-Cx6AFOpM.js +9 -0
- package/dist/web-dist/assets/{redis-BnpkEvbr.js → redis-3WrJd2UX.js} +1 -1
- package/dist/web-dist/assets/{redis-value-DMk0-Zuc.js → redis-value-DvCMBdEM.js} +1 -1
- package/dist/web-dist/assets/{redshift-BpxVXjAI.js → redshift-BFFZqrqe.js} +1 -1
- package/dist/web-dist/assets/{restructuredtext-5afXtW7D.js → restructuredtext-BRpKlTYP.js} +1 -1
- package/dist/web-dist/assets/rolldown-runtime-v8MIZ6et.js +1 -0
- package/dist/web-dist/assets/{ruby-CHaoWUHT.js → ruby-Dik41UlM.js} +1 -1
- package/dist/web-dist/assets/runner-DIQss6Kz.js +1 -0
- package/dist/web-dist/assets/{rust-Bw0WVsLy.js → rust-DADSh0Pc.js} +1 -1
- package/dist/web-dist/assets/{sb-CEjXmIyG.js → sb-DuvpHrMN.js} +1 -1
- package/dist/web-dist/assets/{scala-BuaCSaU6.js → scala-CtuFqcla.js} +1 -1
- package/dist/web-dist/assets/schema-BqwkN_6u.js +1 -0
- package/dist/web-dist/assets/schema-qGsKd6zv.js +1 -0
- package/dist/web-dist/assets/{scheme-DIKzlmFG.js → scheme-hPwS1w0C.js} +1 -1
- package/dist/web-dist/assets/{scss-C2_UsWzg.js → scss-477oFtwU.js} +1 -1
- package/dist/web-dist/assets/{select-C-nrz7Tx.js → select-DDjmR6pO.js} +1 -1
- package/dist/web-dist/assets/{separator-DnB61XAO.js → separator-CGjaYtx-.js} +1 -1
- package/dist/web-dist/assets/{sheet-sidebar-BGxJGRbd.js → sheet-sidebar-Cde4bLIJ.js} +1 -1
- package/dist/web-dist/assets/{shell-2aEL2EVH.js → shell-n9PWT21s.js} +1 -1
- package/dist/web-dist/assets/{solidity-D-5XfYE1.js → solidity-BUjaJYHp.js} +1 -1
- package/dist/web-dist/assets/{sophia-s4MFSvUF.js → sophia-BCcvs9t1.js} +1 -1
- package/dist/web-dist/assets/{sparql-Dkv46wS5.js → sparql-BflQKwzI.js} +1 -1
- package/dist/web-dist/assets/spinner-ioIImnLq.js +1 -0
- package/dist/web-dist/assets/{sql-Dz9Xhs8s.js → sql-B-t7xHK1.js} +1 -1
- package/dist/web-dist/assets/{st-Cbo0XVmr.js → st-CSYG-jYM.js} +1 -1
- package/dist/web-dist/assets/{swift-B66X97nW.js → swift-CKmn3JdQ.js} +1 -1
- package/dist/web-dist/assets/{systemverilog-gGKga8Gf.js → systemverilog-rn_hwEIB.js} +1 -1
- package/dist/web-dist/assets/table-BWy367NZ.js +1 -0
- package/dist/web-dist/assets/tables-geLC-tRf.js +16 -0
- package/dist/web-dist/assets/tanstack-2cKzRGRb.js +5 -0
- package/dist/web-dist/assets/{tcl-BtbeJsUN.js → tcl-Fn2CV_28.js} +1 -1
- package/dist/web-dist/assets/{ts.worker-r_qbh1JO.js → ts.worker-BLC4EdqU.js} +18311 -18257
- package/dist/web-dist/assets/{tsMode-BgtcNcpl.js → tsMode-C-8HcC0f.js} +4 -4
- package/dist/web-dist/assets/{twig-0_nXiuYs.js → twig-CLjUHOwE.js} +1 -1
- package/dist/web-dist/assets/{typescript-Cy_CzC_-.js → typescript-BubYBQa0.js} +1 -1
- package/dist/web-dist/assets/{typespec-DBO6_WMJ.js → typespec-IO61FhU-.js} +1 -1
- package/dist/web-dist/assets/use-database-engine-C1fvJDyS.js +1 -0
- package/dist/web-dist/assets/{use-theme-DBhPknw6.js → use-theme-uud1RcFP.js} +1 -1
- package/dist/web-dist/assets/utils-D49oYrWW.js +1 -0
- package/dist/web-dist/assets/{vb-DFJjBsW2.js → vb-Lm9DdJMK.js} +1 -1
- package/dist/web-dist/assets/visualizer-Bd-PB2Fm.js +1 -0
- package/dist/web-dist/assets/{wgsl-U3RBM2M0.js → wgsl-CG8088eu.js} +1 -1
- package/dist/web-dist/assets/{workers-ClRH6A2w.js → workers-H_G6sPzI.js} +1 -1
- package/dist/web-dist/assets/{xml-D11j3J2_.js → xml-Da0DCKCb.js} +1 -1
- package/dist/web-dist/assets/{yaml-D7Z_4mnx.js → yaml-C-84Dbfu.js} +1 -1
- package/dist/web-dist/index.html +31 -31
- package/package.json +22 -22
- package/dist/web-dist/assets/_pathlessLayout-CUDS1e28.js +0 -1
- package/dist/web-dist/assets/_pathlessLayout-WZkezfN7.js +0 -2
- package/dist/web-dist/assets/_queryId-CEJb62Vl.js +0 -1
- package/dist/web-dist/assets/_table-6SZEx92j.js +0 -1
- package/dist/web-dist/assets/_table-CwyP_2EP.js +0 -1
- package/dist/web-dist/assets/bundle-mjs-CZwf2xtr.js +0 -1
- package/dist/web-dist/assets/chat-sidebar-DwzCElBd.js +0 -132
- package/dist/web-dist/assets/connect-l3LjAClZ.js +0 -1
- package/dist/web-dist/assets/constants-CKAehpPm.js +0 -12
- package/dist/web-dist/assets/cssMode-G6latsS7.js +0 -1
- package/dist/web-dist/assets/database.store-BuqVJMY6.js +0 -57
- package/dist/web-dist/assets/dist-Bz0qAN0x.js +0 -2
- package/dist/web-dist/assets/dist-Cf0L32Jd.js +0 -1
- package/dist/web-dist/assets/editor-1FQrmyyI.css +0 -1
- package/dist/web-dist/assets/editor.api-BTIrAcm5.js +0 -865
- package/dist/web-dist/assets/format-cell-value-CgUtYv8B.js +0 -1
- package/dist/web-dist/assets/highlighted-body-OFNGDK62-t8UIAZOZ.js +0 -1
- package/dist/web-dist/assets/icons-DxFtdMXW.js +0 -1
- package/dist/web-dist/assets/index-QVi4Lb9U.css +0 -2
- package/dist/web-dist/assets/index-WFVurGCI.js +0 -34
- package/dist/web-dist/assets/indexes-C3Qddb5L.js +0 -1
- package/dist/web-dist/assets/mermaid-GHXKKRXX-D35eppUc.js +0 -1
- package/dist/web-dist/assets/middleware-CXk7SlTF.js +0 -1
- package/dist/web-dist/assets/module-D_kjbMCc.js +0 -2
- package/dist/web-dist/assets/monaco-theme-BnSsSzUH.css +0 -1
- package/dist/web-dist/assets/monaco-theme-C2k_taVU.js +0 -64
- package/dist/web-dist/assets/preload-helper-DF7hIgef.js +0 -1
- package/dist/web-dist/assets/query-runner-f473QQSD.js +0 -17
- package/dist/web-dist/assets/radix-ui-CxCv--D1.js +0 -51
- package/dist/web-dist/assets/react-DEQ0BgTL.js +0 -1
- package/dist/web-dist/assets/react-dom-ITw3Lqwx.js +0 -9
- package/dist/web-dist/assets/rolldown-runtime-fzu9RN21.js +0 -1
- package/dist/web-dist/assets/runner-NsYjzIZs.js +0 -1
- package/dist/web-dist/assets/schema-CE1yGygf.js +0 -1
- package/dist/web-dist/assets/schema-rxLBue8Q.js +0 -1
- package/dist/web-dist/assets/spinner-CNnB5r0X.js +0 -1
- package/dist/web-dist/assets/table-C8WK3uAc.js +0 -1
- package/dist/web-dist/assets/tables-D98Kbmcb.js +0 -16
- package/dist/web-dist/assets/tanstack-RwHFfmqj.js +0 -8
- package/dist/web-dist/assets/use-database-engine-DZZj7-4J.js +0 -1
- package/dist/web-dist/assets/utils-EJLOIroS.js +0 -1
- package/dist/web-dist/assets/visualizer-CgYlDJ_-.js +0 -1
- package/dist/web-dist/assets/vscode-wuSgCuZI.js +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{r as tn,t as vt}from"./rolldown-runtime-v8MIZ6et.js";import{zt as nn}from"./icons-IBpZgbE4.js";import{At as Ei,jt as Mi}from"./radix-ui-BLYTVDm9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.2.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="294f9622-d532-43bd-aefa-1239db563603",e._sentryDebugIdIdentifier="sentry-dbid-294f9622-d532-43bd-aefa-1239db563603")}catch{}})();var b=tn(nn(),1),L=Mi(),ms=b.createContext(void 0),vs=e=>{const t=b.useContext(ms);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Rl=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,L.jsx)(ms.Provider,{value:e,children:t})),Fi={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ii=class{#t=Fi;#e=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,t){return this.#t.setTimeout(e,t)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,t){return this.#t.setInterval(e,t)}clearInterval(e){this.#t.clearInterval(e)}},he=new Ii;function Oi(e){setTimeout(e,0)}var Li=typeof window>"u"||"Deno"in globalThis;function H(){}function Ti(e,t){return typeof e=="function"?e(t):e}function Ss(e){return typeof e=="number"&&e>=0&&e!==1/0}function ys(e,t){return Math.max(e+(t||0)-Date.now(),0)}function D(e,t){return typeof e=="function"?e(t):e}function In(e,t){const{type:n="all",exact:s,fetchStatus:i,predicate:r,queryKey:o,stale:a}=e;if(o){if(s){if(t.queryHash!==sn(o,t.options))return!1}else if(!Pe(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||r&&!r(t))}function On(e,t){const{exact:n,status:s,predicate:i,mutationKey:r}=e;if(r){if(!t.options.mutationKey)return!1;if(n){if(pe(t.options.mutationKey)!==pe(r))return!1}else if(!Pe(t.options.mutationKey,r))return!1}return!(s&&t.state.status!==s||i&&!i(t))}function sn(e,t){return(t?.queryKeyHashFn||pe)(e)}function pe(e){return JSON.stringify(e,(t,n)=>Dt(n)?Object.keys(n).sort().reduce((s,i)=>(s[i]=n[i],s),{}):n)}function Pe(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let s=0;s<t.length;s++)if(!Pe(e[s],t[s]))return!1;return!0}const n=Object.keys(t);for(const s of n)if(!Pe(e[s],t[s]))return!1;return!0}return!1}var ki=Object.prototype.hasOwnProperty;function _s(e,t,n=0){if(e===t)return e;if(n>500)return t;const s=Ln(e)&&Ln(t);if(!s&&!(Dt(e)&&Dt(t)))return t;const i=(s?e:Object.keys(e)).length,r=s?t:Object.keys(t),o=r.length,a=s?new Array(o):{};let l=0;for(let u=0;u<o;u++){const c=s?u:r[u],f=e[c],h=t[c];if(f===h){a[c]=f,(s?u<i:ki.call(e,c))&&l++;continue}if(f===null||h===null||typeof f!="object"||typeof h!="object"){a[c]=h;continue}const d=_s(f,h,n+1);a[c]=d,d===f&&l++}return i===o&&l===i?e:a}function it(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Ln(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Dt(e){if(!Tn(e))return!1;const t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!="function")return!1;const s=n.prototype;return!(!Tn(s)||!s.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function Tn(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ai(e){return new Promise(t=>{he.setTimeout(t,e)})}function $t(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?_s(e,t):t}function Di(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function $i(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var rn=Symbol();function ws(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===rn?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function on(e,t){return typeof e=="function"?e(...t):!!e}function Vi(e,t,n){let s=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),s||(s=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var zi=()=>Li,an=()=>zi(),Me=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ji=class extends Me{#t;#e;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},ln=new ji;function xl(e){return e.state.status==="success"}var Hi=Oi;function Bi(){let e=[],t=0,n=a=>{a()},s=a=>{a()},i=Hi;const r=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{s(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{r(()=>{a(...l)})},schedule:r,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{s=a},setScheduler:a=>{i=a}}}var z=Bi(),Gi=class extends Me{#t=!0;#e;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#t}},ct=new Gi;function Ni(e){return Math.min(1e3*2**e,3e4)}function Cs(e){return(e??"online")==="online"?ct.isOnline():!0}var Vt=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Rs(e){let t=!1,n=0,s,i="pending",r,o;const a=new Promise((S,_)=>{r=S,o=_});a.catch(H);const l=()=>i!=="pending",u=S=>{if(!l()){const _=new Vt(S);p(_),e.onCancel?.(_)}},c=()=>{t=!0},f=()=>{t=!1},h=()=>ln.isFocused()&&(e.networkMode==="always"||ct.isOnline())&&e.canRun(),d=()=>Cs(e.networkMode)&&e.canRun(),g=S=>{l()||(s?.(),i="resolved",r(S))},p=S=>{l()||(s?.(),i="rejected",o(S))},v=S=>new Promise(_=>{s=w=>{(l()||S())&&_(w)},e.onPause?.()}).then(()=>{s=void 0,l()||e.onContinue?.()}),m=()=>{if(l())return;let S;const _=n===0?e.initialPromise:void 0;try{S=_??e.fn()}catch(w){S=Promise.reject(w)}Promise.resolve(S).then(g).catch(w=>{if(l())return;const x=e.retry??(an()?0:3),C=e.retryDelay??Ni,y=typeof C=="function"?C(n,w):C,R=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,w);if(t||!R){p(w);return}n++,e.onFail?.(n,w),Ai(y).then(()=>h()?void 0:v(h)).then(()=>{t?p(w):m()})})};return{promise:a,status:()=>i,cancel:u,continue:()=>(s?.(),a),cancelRetry:c,continueRetry:f,canStart:d,start:()=>(d()?m():v(d).then(m),a)}}var xs=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ss(this.gcTime)&&(this.#t=he.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(an()?1/0:3e5))}clearGcTimeout(){this.#t!==void 0&&(he.clearTimeout(this.#t),this.#t=void 0)}};function Ui(e){return{onFetch:(t,n)=>{const s=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,r=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let c=!1;const f=g=>{Vi(g,()=>t.signal,()=>c=!0)},h=ws(t.options,t.fetchOptions),d=async(g,p,v)=>{if(c)return Promise.reject(t.signal.reason);if(p==null&&g.pages.length)return Promise.resolve(g);const S=(()=>{const C={client:t.client,queryKey:t.queryKey,pageParam:p,direction:v?"backward":"forward",meta:t.options.meta};return f(C),C})(),_=await h(S),{maxPages:w}=t.options,x=v?$i:Di;return{pages:x(g.pages,_,w),pageParams:x(g.pageParams,p,w)}};if(i&&r.length){const g=i==="backward",p=g?bs:zt,v={pages:r,pageParams:o};a=await d(v,p(s,v),g)}else{const g=e??r.length;do{const p=l===0?o[0]===void 0?s.initialPageParam:o[0]:zt(s,a);if(l>0&&p==null)break;a=await d(a,p),l++}while(l<g)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function zt(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function bs(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function qi(e,t){return t?zt(e,t)!=null:!1}function Wi(e,t){return!t||!e.getPreviousPageParam?!1:bs(e,t)!=null}var Ki=class extends xs{#t;#e;#n;#s;#r;#i;#o;#a;constructor(e){super(),this.#a=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#s=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=An(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#t}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#t=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=An(this.options);t.data!==void 0&&(this.setState(kn(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(e,t){const n=$t(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(H).catch(H):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>D(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===rn||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>D(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!ys(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){const t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#i&&(this.#a||this.state.fetchStatus==="paused"&&this.state.status==="pending"?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){const l=this.observers.find(u=>u.options.queryFn);l&&this.setOptions(l.options)}const n=new AbortController,s=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i=()=>{const l=ws(this.options,t),c=(()=>{const f={client:this.#r,queryKey:this.queryKey,meta:this.meta};return s(f),f})();return this.#a=!1,this.options.persister?this.options.persister(l,c,this):l(c)},o=(()=>{const l={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return s(l),l})();(this.#t==="infinite"?Ui(this.options.pages):this.options.behavior)?.onFetch(o,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#l({type:"fetch",meta:o.fetchOptions?.meta});const a=this.#i=Rs({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:l=>{l instanceof Vt&&l.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(l,u)=>{this.#l({type:"failed",failureCount:l,error:u})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const l=await a.start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),this.#s.config.onSuccess?.(l,this),this.#s.config.onSettled?.(l,this.state.error,this),l}catch(l){if(l instanceof Vt){if(l.silent)return this.#i.promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw this.#l({type:"error",error:l}),this.#s.config.onError?.(l,this),this.#s.config.onSettled?.(this.state.data,l,this),l}finally{this.#i===a&&(this.#i=void 0),this.scheduleGc()}}#l(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Ps(n.data,this.options),fetchMeta:e.meta??null};case"success":const s={...n,...kn(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?s:void 0,s;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),z.batch(()=>{this.observers.slice().forEach(n=>{n.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:e})})}};function Ps(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Cs(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function kn(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function An(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Es=class extends Me{#t;#e=void 0;#n=void 0;#s=void 0;#r;#i;#o;#a;#l;#g;#c;#f;#u;#d=new Set;constructor(e,t){super(),this.options=t,this.#t=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),Dn(this.#e,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jt(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jt(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#_(),this.#w(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,n=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof D(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#C(),this.#e.setOptions(this.options),t._defaulted&&!it(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const s=this.hasListeners();s&&$n(this.#e,n,this.options,t)&&this.#h(),this.updateResult(),s&&(this.#e!==n||D(this.options.enabled,this.#e)!==D(t.enabled,this.#e)||D(this.options.staleTime,this.#e)!==D(t.staleTime,this.#e))&&this.#m();const i=this.#v();s&&(this.#e!==n||D(this.options.enabled,this.#e)!==D(t.enabled,this.#e)||i!==this.#u)&&this.#S(i)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),n=this.createResult(t,e);return it(this.getCurrentResult(),n)||(this.#s=n,this.#i=this.options,this.#r=this.#e.state),n}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(n,s)=>(this.trackProp(s),t?.(s),Reflect.get(n,s))})}trackProp(e){this.#d.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#t.defaultQueryOptions(e),n=this.#t.getQueryCache().build(this.#t,t);let s=()=>{},i;const r=new Promise(o=>{i=o,s=this.#t.getQueryCache().subscribe(a=>{a.type==="updated"&&a.query.queryHash===n.queryHash&&n.state.data!==void 0&&(s(),o(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{const o=this.createResult(n,t);return i?.(o),o}).finally(()=>{s()}),r])}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#h(e){this.#C();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(H)),t}#p(e){return!an()&&D(this.options.enabled,this.#e)!==!1&&Ss(e)}#m(){this.#_();const e=D(this.options.staleTime,this.#e);if(this.#s.isStale||!this.#p(e))return;const t=ys(this.#s.dataUpdatedAt,e)+1;this.#c=he.setTimeout(()=>{this.#s.isStale||this.updateResult()},t)}#v(){return D(this.options.refetchInterval,this.#e)??!1}#S(e){this.#w(),this.#u=e,!(this.#u===0||!this.#p(this.#u))&&(this.#f=he.setInterval(()=>{(this.options.refetchIntervalInBackground||ln.isFocused())&&this.#h()},this.#u))}#y(){this.#m(),this.#S(this.#v())}#_(){this.#c!==void 0&&(he.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#f!==void 0&&(he.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){const n=this.#e,s=this.options,i=this.#s,r=this.#r,o=this.#i,a=e!==n?e.state:this.#n,{state:l}=e;let u={...l},c=!1,f;if(t._optimisticResults){const x=this.hasListeners(),C=!x&&Dn(e,t),y=x&&$n(e,n,t,s);(C||y)&&(u={...u,...Ps(l.data,e.options)}),t._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:h,errorUpdatedAt:d,status:g}=u;f=u.data;let p=!1;if(t.placeholderData!==void 0&&f===void 0&&g==="pending"){let x;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(x=i.data,p=!0):x=typeof t.placeholderData=="function"?t.placeholderData(this.#g?.state.data,this.#g):t.placeholderData,x!==void 0&&(g="success",f=$t(i?.data,x,t),c=!0)}if(t.select&&f!==void 0&&!p)if(i&&f===r?.data&&t.select===this.#a)f=this.#l;else try{this.#a=t.select,f=t.select(f),f=$t(i?.data,f,t),this.#l=f,this.#o=null}catch(x){this.#o=x}else f===void 0&&(this.#o=null);this.#o&&(h=this.#o,f=this.#l,d=Date.now(),g="error",c=!1);const v=u.fetchStatus==="fetching",m=g==="pending",S=g==="error",_=m&&v,w=f!==void 0;return{status:g,fetchStatus:u.fetchStatus,isPending:m,isSuccess:g==="success",isError:S,isInitialLoading:_,isLoading:_,data:f,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:d,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:u.dataUpdateCount>a.dataUpdateCount||u.errorUpdateCount>a.errorUpdateCount,isFetching:v,isRefetching:v&&!m,isLoadingError:S&&!w,isPaused:u.fetchStatus==="paused",isPlaceholderData:c,isRefetchError:S&&w,isStale:un(e,t),refetch:this.refetch,isEnabled:D(t.enabled,e)!==!1}}updateResult(){const e=this.#s,t=this.createResult(this.#e,this.options);if(this.#r=this.#e.state,this.#i=this.options,this.#r.data!==void 0&&(this.#g=this.#e),it(t,e))return;this.#s=t;const s=(()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,r=typeof i=="function"?i():i;if(r==="all"||!r&&!this.#d.size||this.options.throwOnError&&this.#s.error!==e.error)return!0;for(const o of r??this.#d)if(this.#s[o]!==e[o])return!0;return!1})();z.batch(()=>{s&&this.listeners.forEach(i=>{i(this.#s)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}#C(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Qi(e,t){return D(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&D(t.retryOnMount,e)===!1)}function Dn(e,t){return Qi(e,t)||e.state.data!==void 0&&jt(e,t,t.refetchOnMount)}function jt(e,t,n){if(D(t.enabled,e)!==!1&&D(t.staleTime,e)!=="static"){const s=D(n,e);return s==="always"||s!==!1&&un(e,t)}return!1}function $n(e,t,n,s){return(e!==t||D(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&un(e,n)}function un(e,t){return D(t.enabled,e)!==!1&&e.isStaleByTime(D(t.staleTime,e))}var Ji=class extends Es{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:n}=e,s=super.createResult(e,t),{isFetching:i,isRefetching:r,isError:o,isRefetchError:a}=s,l=n.fetchMeta?.fetchMore?.direction,u=o&&l==="forward",c=i&&l==="forward",f=o&&l==="backward",h=i&&l==="backward";return{...s,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:qi(t,n.data),hasPreviousPage:Wi(t,n.data),isFetchNextPageError:u,isFetchingNextPage:c,isFetchPreviousPageError:f,isFetchingPreviousPage:h,isRefetchError:a&&!u&&!f,isRefetching:r&&!c&&!h}}},Xi=class extends xs{#t;#e;#n;#s;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#e=[],this.state=e.state||Ms(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey},s=this.#s=Rs({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,a)=>{this.#r({type:"failed",failureCount:o,error:a})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status==="pending",r=!s.canStart();try{if(i)t();else{this.#r({type:"pending",variables:e,isPaused:r}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const a=await this.options.onMutate?.(e,n);a!==this.state.context&&this.#r({type:"pending",context:a,variables:e,isPaused:r})}const o=await s.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#r({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,e,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(o,e,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#r({type:"error",error:o}),o}finally{this.#s===s&&(this.#s=void 0),this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),z.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Ms(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Yi=class extends Me{#t;#e;#n;constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#n=0}build(e,t,n){const s=new Xi({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(s),s}add(e){this.#t.add(e);const t=We(e);if(typeof t=="string"){const n=this.#e.get(t);n?n.push(e):this.#e.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const t=We(e);if(typeof t=="string"){const n=this.#e.get(t);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&this.#e.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=We(e);if(typeof t=="string"){const n=this.#e.get(t)?.find(s=>s.state.status==="pending");return!n||n===e}else return!0}runNext(e){const t=We(e);return typeof t=="string"?this.#e.get(t)?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){z.batch(()=>{const e=this.getAll();this.#t.clear(),this.#e.clear(),e.forEach(t=>{this.notify({type:"removed",mutation:t})})})}getAll(){return Array.from(this.#t)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>On(t,n))}findAll(e={}){return this.getAll().filter(t=>On(e,t))}notify(e){z.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return z.batch(()=>Promise.all(e.map(t=>t.continue().catch(H))))}};function We(e){return e.options.scope?.id}var Zi=class extends Me{#t;#e=void 0;#n;#s;constructor(e,t){super(),this.#t=e,this.setOptions(t),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#t.defaultMutationOptions(e),it(this.options,t)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&pe(t.mutationKey)!==pe(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#r())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#r(),this.#i(e)}getCurrentResult(){return this.#e}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#i()}mutate(e,t){return this.#s=t,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(e)}#r(){const e=this.#n?.state??Ms();this.#e={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#i(e){z.batch(()=>{const t=this.#s;if(t&&this.hasListeners()){const n=this.#e.variables,s=this.#e.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{t.onSuccess?.(e.data,n,s,i)}catch(r){Promise.reject(r)}try{t.onSettled?.(e.data,null,n,s,i)}catch(r){Promise.reject(r)}}else if(e?.type==="error"){try{t.onError?.(e.error,n,s,i)}catch(r){Promise.reject(r)}try{t.onSettled?.(void 0,e.error,n,s,i)}catch(r){Promise.reject(r)}}}this.listeners.forEach(n=>{n(this.#e)})})}},er=class extends Me{#t;constructor(e={}){super(),this.config=e,this.#t=new Map}build(e,t,n){const s=t.queryKey,i=t.queryHash??sn(s,t);let r=this.get(i);return r||(r=new Ki({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(r)),r}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){this.#t.get(e.queryHash)===e&&(e.destroy(),this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){z.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>In(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>In(e,n)):t}notify(e){z.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){z.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){z.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},bl=class{#t;#e;#n;#s;#r;#i;#o;#a;constructor(e={}){this.#t=e.queryCache||new er,this.#e=e.mutationCache||new Yi,this.#n=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#o=ln.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#a=ct.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#o?.(),this.#o=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#t.build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(D(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:t,state:n})=>[t,n.data])}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),i=this.#t.get(s.queryHash)?.state.data,r=Ti(t,i);if(r!==void 0)return this.#t.build(this,s).setData(r,{...n,manual:!0})}setQueriesData(e,t,n){return z.batch(()=>this.#t.findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state}removeQueries(e){const t=this.#t;z.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#t;return z.batch(()=>{const s=n.findAll(e),i=new Set(s);return s.forEach(r=>{r.reset()}),this.refetchQueries({type:"active",predicate:r=>i.has(r)},t)})}cancelQueries(e,t={}){const n={revert:!0,...t},s=z.batch(()=>this.#t.findAll(e).map(i=>i.cancel(n)));return Promise.all(s).then(H).catch(H)}invalidateQueries(e,t={}){return z.batch(()=>(this.#t.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=z.batch(()=>this.#t.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let r=i.fetch(void 0,n);return n.throwOnError||(r=r.catch(H)),i.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(s).then(H)}async query(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#t.build(this,t),s=n.isStaleByTime(D(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(s):s}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#t.build(this,t);return n.isStaleByTime(D(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(H).catch(H)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(H).catch(H)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return ct.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#s.set(pe(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(s=>{Pe(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(pe(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(s=>{Pe(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=sn(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===rn&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},Fs=b.createContext(!1),tr=()=>b.useContext(Fs),Pl=Fs.Provider;function nr(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var sr=b.createContext(nr()),ir=()=>b.useContext(sr),rr=(e,t,n)=>{const s=n?.state.status==="error"&&typeof e.throwOnError=="function"?on(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||s)&&(t.isReset()||(e.retryOnMount=!1))},or=e=>{b.useEffect(()=>{e.clearReset()},[e])},ar=({result:e,errorResetBoundary:t,throwOnError:n,query:s,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(i&&e.data===void 0||on(n,[e.error,s])),lr=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...i)=>n(s(...i)):n(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},ur=(e,t)=>e?.suspense&&t.isPending,cr=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Is(e,t,n){const s=tr(),i=ir(),r=vs(n),o=r.defaultQueryOptions(e),a=r.getQueryCache().get(o.queryHash),l=e.subscribed!==!1;o._optimisticResults=s?"isRestoring":l?"optimistic":void 0,lr(o),rr(o,i,a),or(i);const[u]=b.useState(()=>new t(r,o)),c=u.getOptimisticResult(o),f=!s&&l;if(b.useSyncExternalStore(b.useCallback(h=>{const d=f?u.subscribe(z.batchCalls(h)):H;return u.updateResult(),d},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),b.useEffect(()=>{u.setOptions(o)},[o,u]),ur(o,c))throw cr(o,u,i);if(ar({result:c,errorResetBoundary:i,throwOnError:o.throwOnError,query:a,suspense:o.suspense}))throw c.error;return o.notifyOnChangeProps?c:u.trackResult(c)}function El(e,t){return Is(e,Es,t)}function Ml(e,t){const n=vs(t),[s]=b.useState(()=>new Zi(n,e));b.useEffect(()=>{s.setOptions(e)},[s,e]);const i=b.useSyncExternalStore(b.useCallback(o=>s.subscribe(z.batchCalls(o)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),r=b.useCallback((...o)=>{s.mutate(o[0],o[1]).catch(H)},[s]);if(i.error&&on(s.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:r,mutateAsync:i.mutate}}function Fl(e,t){return Is(e,Ji,t)}var Vn=b.use,cn=b.useLayoutEffect;function le(e){return e[e.length-1]}function Os(e,t){return typeof e=="function"?e(t):e}var fn=Object.prototype.hasOwnProperty;function Ls(e){for(const t in e)if(fn.call(e,t))return!0;return!1}var rt=()=>Object.create(null),ye=(e,t)=>oe(e,t,!0);function oe(e,t,n,s=0){if(e===t)return e;if(s++>500)return t;const i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(ft(e)&&ft(t)))return t;const r=Object.keys(e),o=r.length,a=Object.keys(t),l=a.length;if(i?o!==e.length||l!==t.length||o&&le(r)!==`${o-1}`||l&&le(a)!==`${l-1}`:o!==Object.getOwnPropertyNames(e).length||l!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let u=0,c,f,h;if(i){for(;u<l&&(h=u,f=e[h],c=t[h],c=f===c?f:typeof f=="object"?oe(f,c,n,s):c,c===f);u++);if(u===l&&o===l)return e}else{let g=o===l,p=!0;for(;u<l;u++){h=a[u],f=e[h];const v=t[h];c=f===v?f:typeof f=="object"?oe(f,v,n,s):v,g&&=c===f&&(r[u]===h||fn.call(e,h)),p&&=Object.is(c,v),r[u]=c}if(g)return Object.getOwnPropertySymbols(e).length?t:e;if(p)return t}const d=i?a.fill(0):n?rt():{};for(let g=0;g<l;g++)h=i?g:a[g],i?(f=e[h],g>u&&(c=t[h],c=f===c?f:typeof f=="object"?oe(f,c,n,s):c),d[h]=g<u?f:c):d[h]=r[g];return d}function ft(e){return!e||typeof e!="object"?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function te(e,t,n,s){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,r=e.length;i<r;i++){const o=e[i],a=t[i];if(o!==a&&!te(o,a,n,s))return!1}return!0}if(ft(e)&&ft(t)){if(n){for(const r in t)if((s||t[r]!==void 0)&&!te(e[r],t[r],n,s))return!1;return!0}let i=0;if(s)i=Object.keys(e).length;else for(const r in e)e[r]!==void 0&&i++;for(const r in t)if((s||t[r]!==void 0)&&(i--===0||!te(e[r],t[r],n,s)))return!1;return i===0}return!1}function fr(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}var hr=/[\x00-\x1f\x7f"<>`{}]/g;function dr(e){return e.replace(hr,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function zn(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return dr(t)}var gr=["http:","https:","mailto:","tel:"];function Ve(e){if(e[0]!=="/"&&e.includes(":"))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,"").toLowerCase()}var Ts=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function ks(e,t){if(!e)return!1;if(Ts.test(e))return!0;const n=Ve(e);return n?!t.has(n):!1}function Ie(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){const n=/%25|%5C/gi;let s=0,i;for(t="";(i=n.exec(e))!==null;)t+=zn(e.slice(s,i.index))+i[0],s=n.lastIndex;t+=zn(s?e.slice(s):e)}return t}function pr(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function mr(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function hn(){throw new Error("Invariant failed")}function xe(e){return e.replace(/\/{2,}/g,"/")}function As(e){return e==="/"?e:e.replace(/^\/+/,"")}function X(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/+$/,""):e}function Ds(e){return X(As(e))}function jn(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Hn(e,t,n="never",s){if(t.includes("//")&&(t=xe(t)),t.startsWith("/"))return t.length===1||n==="preserve"?t:n==="always"?t.endsWith("/")?t:`${t}/`:t.endsWith("/")?t.slice(0,-1):t;const i=t===".";let r;if(s){r=i?e:e+"\0"+t;const u=s.get(r);if(u)return u}let o;if(i)o=e.split("/");else{for(e.includes("//")&&(e=xe(e)),o=e.split("/");o.length>1&&le(o)==="";)o.pop();const u=t.split("/");for(let c=0,f=u.length;c<f;c++){const h=u[c];h===""?c?c===f-1&&o.push(h):o=[h]:h===".."?o.length>1?o.pop():o=[""]:h==="."||o.push(h)}}o.length>1&&(le(o)===""?n==="never"&&o.pop():n==="always"&&o.push(""));const a=o.join("/"),l=(i?xe(a):a)||"/";return r&&s&&s.set(r,l),l}function vr(e){const t=new Map(e.map(s=>[encodeURIComponent(s),s])),n=new RegExp([...t.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return s=>s.replace(n,i=>t.get(i)??i)}function Sr(e){return e==null||e===""}function yr(e,t,n){if(typeof t!="string")return""+(t??void 0);const s=e==="_splat";if(s&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return s&&(i=i.replaceAll("%2F","/")),n?n(i):i}function Bn(e,t,n,s,i){const r=e.endsWith("/")?"/":"";let o="";for(const a of t){if(typeof a=="string"){o+=a;continue}const[l,u,c,f]=a,h=l===2,d=h&&f!==void 0?f+r:f;let g=n[u];if(!(l===3&&g==null)){if(i&&(i[u]=g,h&&(i["*"]=g)),h&&Sr(g)){if(c==="/"&&!d)continue;g=""}o+=c+yr(u,g,s)+(d||"")}}return o+r||"/"}function Ee(e){return e?.isNotFound===!0}function _r(){try{return sessionStorage}catch{return}}var wr="tsr-scroll-restoration-v1_3",$s=_r();function Cr(){try{return JSON.parse($s?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}var _e=Cr(),Gn="data-scroll-restoration-id",Rr=e=>e.state.__TSR_key||e.href;function xr(e){const t=e.getAttribute(Gn);if(t)return`[${Gn}="${t}"]`;let n="",s=e,i;for(;i=s.parentNode;){let r=1,o=s;for(;o=o.previousElementSibling;)r++;const a=`${s.localName}:nth-child(${r})`;n=n?`${a} > ${n}`:a,s=i}return n}var Ke=!1,ot="window";function Ht(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function Nn(e){const t=new Set;for(const n of e){if(n===ot)continue;const s=Ht(n);s&&t.add(s)}return t}function br(e,t){const n=t??e.options.scrollRestoration,s=e._scroll;n&&(s.e=!0);const i=e.options.getScrollRestorationKey||Rr,r=new Set,o=a=>{const l=_e[a]||={};for(const u of r)u===document?l[ot]={scrollX,scrollY}:u.isConnected&&(l[xr(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};n&&!s.s&&(s.s=!0,Ke=!1,history.scrollRestoration="manual",document.addEventListener("scroll",a=>{Ke||r.add(a.target)},!0),e.subscribe("onBeforeLoad",a=>{a.fromLocation&&o(i(a.fromLocation)),r.clear()}),addEventListener("pagehide",()=>{history.scrollRestoration="auto",o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{$s?.setItem(wr,JSON.stringify(_e))}catch{}}),addEventListener("pageshow",a=>{a.persisted&&(history.scrollRestoration="manual")})),!s.r&&(s.r=!0,e.subscribe("onRendered",a=>{const l=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,c=s.n,f=s.h;let h;if(r.clear(),s.n=!0,s.h=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const d=i(a.toLocation),g=a.fromLocation&&i(a.fromLocation);if(s.e&&g&&g!==d){const p=_e[g];if(p){let v=_e[d];for(const m in p){if(m===ot){if(c)continue}else{const S=Ht(m);if(!S||c&&u&&(h??=Nn(u),h.has(S)))continue}v||(v=_e[d]={}),v[m]??=p[m]}}}Ke=!0;try{const p=a.toLocation.hash,v=a.toLocation.state.__hashScrollIntoViewOptions??!0;let m=!1;if(c){!p&&u&&(h??=Nn(u));const S=p&&v&&f,_=s.e?_e[d]:void 0;if(_)for(const w in _){const{scrollX:x,scrollY:C}=_[w];if(w===ot){if(S)continue;scrollTo({top:C,left:x,behavior:l}),m=!0}else{const y=Ht(w);y&&(y.scrollLeft=x,y.scrollTop=C,h?.delete(y))}}if(!p){const w={top:0,left:0,behavior:l};if(m||scrollTo(w),h)for(const x of h)x.scrollTo(w)}}!m&&p&&v&&document.getElementById(p)?.scrollIntoView(v)}finally{Ke=!1}}))}function Pr(e,t=String){let n;for(const s in e){const i=e[s];i!==void 0&&(n||=new URLSearchParams).set(s,t(i))}return n?n.toString():""}function Ct(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Er(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[s,i]of t.entries()){const r=n[s];r==null?n[s]=Ct(i):Array.isArray(r)?r.push(Ct(i)):n[s]=[r,Ct(i)]}return n}var Vs=/^(?:\s|["[{\d-]|fa|nu|tr)/,Mr=Ir(JSON.parse),Fr=Or(JSON.stringify,JSON.parse);function Ir(e){const t=e===JSON.parse;return n=>{n[0]==="?"&&(n=n.slice(1));const s=Er(n);for(const i in s){const r=s[i];if(typeof r=="string"){if(t&&!Vs.test(r))continue;try{s[i]=e(r)}catch{}}}return s}}function Or(e,t){const n=t===JSON.parse;function s(i){if(i&&typeof i=="object")try{return e(i)}catch{}else if(t&&typeof i=="string"){if(n&&!Vs.test(i))return i;try{return t(i),e(i)}catch{}}return i}return i=>{const r=Pr(i,s);return r?`?${r}`:""}}var Ae="__root__";function Lr(e){e.statusCode=e.statusCode||e.code||307;const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function zs(e){return e instanceof Response&&!!e.options}function ht(e){const t=new Map;let n,s;return{get(i){const r=t.get(i);if(r)return r.visited=!0,r.value},set(i,r){const o=t.get(i);if(o){o.value=r;return}if(t.size>=e){let l=n?.next().value;for(;!l||l.visited;)l?l.visited=!1:n=t.values(),l=n.next().value;l===s&&(n=void 0),t.delete(l.key)}const a={key:i,value:r,visited:!1};s=a,t.set(i,a)},clear(){t.clear(),n=void 0,s=void 0}}}var ie=4,js=5;function Tr(e){const t=e.names;if(t)return t;const n=[];for(const s of e)typeof s!="string"&&n.push(s[1]);return e.names=n}function kr(e,t,n){const s=e.slice(t,n);if(s.charCodeAt(0)===36)return s.length===1?[2,"_splat","",void 0]:[1,s.slice(1),"",""];const i=s.indexOf("{");if(i>=0){const r=s.indexOf("}",i),o=s.charCodeAt(i+1)===45,a=i+(o?3:2);if(r>=0&&s.charCodeAt(a-1)===36&&(!o||a<r)){const l=s.slice(a,r);return[o?3:l?1:2,l||"_splat",s.slice(0,i),e.slice(t+r+1,l?n:e.length)]}}return s}function ze(e,t,n,s,i,r){let o=n;const a=t.fullPath??t.from,l=t.options,u=a.length,c=a.endsWith("/")?u-1:u,f=l?.caseSensitive??e,h=l?.params?.parse??l?.parseParams;let d,g=r?n-1:0;if(!s||a.includes("$")){d=r?.slice()??[];const m=le(d);m&&typeof m!="string"&&m[0]===2&&(d[d.length-1]=[m[0],m[1],m[2],m[3]===void 0?void 0:m[3]+a.substring(n-(a[n-2]==="/"?2:1),c)],g=u)}for(;o<u;){const m=o,S=a.indexOf("/",m);let _=S===-1?u:S;const w=kr(a,m,_);o=_+1;let x;if(typeof w=="string"){if(!s)continue;let C=w,y;f?y=s.static??=new Map:(C=w.toLowerCase(),y=s.staticInsensitive??=new Map);const R=y.get(C);if(R)x=R;else{const P=de(s);x=P,y.set(C,P)}}else{const C=w[0];let y=w[2],R=w[3]??"";if(C===2&&(_=u,o=_+1),d&&g<_&&(g<m-1&&d.push(a.slice(g,m-1)),w[2]="/"+y,C===2&&w[3]!==void 0&&c<u&&(w[3]=R.slice(0,-1)),d.push(w),g=_),!s)continue;const P=f&&!!(y||R);f||(y=y.toLowerCase(),R=R.toLowerCase());const I=C===1?s.dynamic??=[]:C===3?s.optional??=[]:s.wildcard??=[],E=C!==2&&!h&&I.find(O=>!O.parse&&O.caseSensitive===P&&O.prefix===y&&O.suffix===R);if(E)x=E;else{const O=de(s,C,P,y,R);x=O,I.push(O),I.length===2&&i?.push(I)}}s=x}d&&g<c&&d.push(a.slice(g,c));const p=d?.slice();if(!s)return p;if(h&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const m=de(s,js);(s.pathless??=[]).push(m),s=m}const v=(t.path||!t.children)&&!t.isRoot;if(v&&c<u){const m=de(s,ie);s.index=m,s=m}return s.parse=h??null,s.priority=l?.params?.priority??0,s.route||(s.data=p,v&&(s.route=t)),[s,o,p]}function Hs(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function de(e,t=0,n,s,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:s,suffix:i}}function Ar(e,t){const n=de(),s=[];function i(r,o,a,l){const[u,c,f]=ze(!1,r,o,a,s,l);if(r.children)for(const h of r.children)i(h,c,u,f)}for(const r of e)i(r,1,n);for(const r of s)r.sort(Hs);t.masksTree=n,t.flatCache=ht(1e3)}function Dr(e,t){e||="/";const n=t.flatCache.get(e);if(n!==void 0)return n;const s=dn(e,t.masksTree);return t.flatCache.set(e,s),s}function $r(e,t,n,s,i){e||="/",s||="/";const r=t?`case\0${e}`:e;let o=i.singleCache.get(r);return o||(o=de(),ze(t,{from:e},1,o),i.singleCache.set(r,o)),dn(s,o,n)}function Vr(e,t,n=!1){const s=n?e:`nofuzz\0${e}`,i=t.matchCache.get(s);if(i!==void 0)return i;e||="/";let r;try{r=dn(e,t.segmentTree,n)}catch(o){if(o instanceof URIError)r=null;else throw o}return r&&(r.branch=Gs(r.route)),t.matchCache.set(s,r),r}function zr(e,t=!1){const n=de(),s=[],i={},r={};let o=0;function a(l,u,c,f){if(l.init(o),l.id in i&&hn(),i[l.id]=l,o!==0&&l.path){const p=X(l.fullPath);(!r[p]||l.fullPath.endsWith("/"))&&(r[p]=l)}o++;const[h,d,g]=ze(t,l,u,c,s,f);if(l._interpolation=g,l.children)for(const p of l.children)a(p,d,h,g)}a(e,1,n);for(const l of s)l.sort(Hs);return{processedTree:{segmentTree:n,singleCache:ht(1e3),matchCache:ht(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:r}}function dn(e,t,n=!1){const s=e.split("/"),i=Hr(e,s,t,n);if(!i)return null;const[r]=Bs(e,s,i);return{route:i.node.route,rawParams:r}}function Bs(e,t,n){const s=jr(n.node),i=n.node.data&&Tr(n.node.data),r=Object.create(null);let o=n.extract?.part??0,a=n.extract?.node??0,l=n.extract?.path??0,u=n.extract?.param??0;for(;a<s.length;o++,a++,l++){const c=s[a];if(c.kind===ie)break;if(c.kind===js){o--,l--;continue}const f=t[o],h=l;if(f&&(l+=f.length),c.kind===1||c.kind===3){const d=i[u++];if(c.kind===3&&n.skipped&1<<a){o--,l=h-1;continue}const g=c.suffix||c.prefix?f.substring(c.prefix.length,f.length-c.suffix.length):f;(g||c.kind===1)&&(r[d]=decodeURIComponent(g))}else if(c.kind===2){const d=c,g=e.substring(h+d.prefix.length,e.length-d.suffix.length),p=decodeURIComponent(g);r["*"]=p,r._splat=p;break}}return n.rawParams&&Object.assign(r,n.rawParams),[r,{part:o,node:a,path:l,param:u}]}function Gs(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function jr(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Hr(e,t,n,s){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!le(t),r=i&&e!=="/",o=t.length-(i?1:0),a=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let l=null,u=null;for(;a.length;){const c=a.pop(),{node:f,index:h,skipped:d,statics:g,dynamics:p,optionals:v}=c;let{extract:m,rawParams:S}=c;if(f.kind===2&&f.route&&!Je(u,c))continue;if(f.parse){if(!Un(e,t,c))continue;S=c.rawParams,m=c.extract}s&&f.route&&f.kind!==ie&&Je(l,c)&&(l=c);const _=h===o;if(_&&(f.route&&(!r||f.kind===ie||f.kind===2)&&Je(u,c)&&(u=c),!f.optional&&!f.wildcard&&!f.index&&!f.pathless))continue;const w=_?void 0:t[h];let x;if(_&&f.index){const C={node:f.index,index:h,skipped:d,statics:g,dynamics:p,optionals:v,extract:m,rawParams:S};let y=!0;if(f.index.parse&&(Un(e,t,C)||(y=!1)),y){if(!p&&!v&&!d&&Br(g,o))return C;Je(u,C)&&(u=C)}}if(f.wildcard)for(let C=f.wildcard.length-1;C>=0;C--){const y=f.wildcard[C],{prefix:R,suffix:P}=y;if(!(R&&(_||!(y.caseSensitive?w:x??=w.toLowerCase()).startsWith(R)))){if(P){if(_)continue;const I=t.slice(h).join("/"),E=I.slice(-P.length);if((y.caseSensitive?E:E.toLowerCase())!==P||I.length-P.length<R.length)continue}a.push({node:y,index:o,skipped:d,statics:g,dynamics:p,optionals:v,extract:m,rawParams:S})}}if(f.optional){const C=d|1<<f.depth+1;for(let y=f.optional.length-1;y>=0;y--){const R=f.optional[y];a.push({node:R,index:h,skipped:C,statics:g,dynamics:p,optionals:v,extract:m,rawParams:S})}if(!_)for(let y=f.optional.length-1;y>=0;y--){const R=f.optional[y],{prefix:P,suffix:I}=R;if(P||I){const E=R.caseSensitive?w:x??=w.toLowerCase();if(P&&!E.startsWith(P)||I&&E.indexOf(I,E.length-I.length)<P.length)continue}a.push({node:R,index:h+1,skipped:d,statics:g,dynamics:p,optionals:v+Qe(o,h),extract:m,rawParams:S})}}if(!_&&f.dynamic&&w)for(let C=f.dynamic.length-1;C>=0;C--){const y=f.dynamic[C],{prefix:R,suffix:P}=y;if(R||P){const I=y.caseSensitive?w:x??=w.toLowerCase();if(R&&!I.startsWith(R)||P&&I.indexOf(P,I.length-P.length)<R.length)continue}a.push({node:y,index:h+1,skipped:d,statics:g,dynamics:p+Qe(o,h),optionals:v,extract:m,rawParams:S})}if(!_&&f.staticInsensitive){const C=f.staticInsensitive.get(x??=w.toLowerCase());C&&a.push({node:C,index:h+1,skipped:d,statics:g+Qe(o,h),dynamics:p,optionals:v,extract:m,rawParams:S})}if(!_&&f.static){const C=f.static.get(w);C&&a.push({node:C,index:h+1,skipped:d,statics:g+Qe(o,h),dynamics:p,optionals:v,extract:m,rawParams:S})}if(f.pathless)for(let C=f.pathless.length-1;C>=0;C--){const y=f.pathless[C];a.push({node:y,index:h,skipped:d,statics:g,dynamics:p,optionals:v,extract:m,rawParams:S})}}if(u)return u;if(s&&l){let c=l.index;for(let h=0;h<l.index;h++)c+=t[h].length;const f=c===e.length?"/":e.slice(c);return l.rawParams??=Object.create(null),l.rawParams["**"]=decodeURIComponent(f),l}return null}function Qe(e,t){return 2**(e-t-1)}function Br(e,t){return e===2**(t-1)-1}function Un(e,t,n){let s,i;try{[s,i]=Bs(e,t,n)}catch{return null}if(n.rawParams=s,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(s)===!1)return null}catch{}return!0}function Je(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===ie)>(e.node.kind===ie)||t.node.kind===ie==(e.node.kind===ie)&&t.node.depth>e.node.depth))):!0}function Gr(e,t,n){const s=Ds(e),i=`/${s}`,r=t?i:i.toLowerCase(),o=`${r}/`,a={input:({url:l})=>{const u=t?l.pathname:l.pathname.toLowerCase();return u===r?l.pathname="/":u.startsWith(o)&&(l.pathname=l.pathname.slice(i.length)),l},output:({url:l})=>(l.pathname=xe(`/${s}${l.pathname}`),l)};return n?{input:({url:l})=>Bt(n,a.input({url:l})),output:({url:l})=>a.output({url:Ns(n,l)})}:a}function Bt(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Ns(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Nr(e,t){const{createMutableStore:n,createReadonlyStore:s,batch:i}=t,r=new Map,o=n("idle"),a=n(e),l=n(void 0),u=n([]),c=s(()=>u.get().map(p=>r.get(p).get())),f=s(()=>({status:o.get(),isLoading:o.get()==="pending",matches:c.get(),location:a.get(),resolvedLocation:l.get()}));function h(p){let v=r.get(p);return v||(v=n(void 0),r.set(p,v)),v}const d={status:o,location:a,resolvedLocation:l,ids:u,matches:c,byRoute:r,__store:f,getMatchStore:h,setMatches:g};function g(p){const v=u.get(),m=p.map(S=>S.routeId);i(()=>{mr(v,m)||u.set(m);for(const S of v)m.includes(S)||r.get(S).set(()=>{});for(const S of p){const _=h(S.routeId);_.get()!==S&&_.set(S)}})}return d}var ae="__TSR_index",qn="popstate",Wn="beforeunload",Ur=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function at(e){const t=Ur.exec(e);return t?"/"+e.slice(t[0].length):e}function Us(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,t=>`
|
|
2
|
+
\r`.includes(t)?"":encodeURIComponent(t))),at(e)}function qr(e){let t=e.getLocation();const n=new Set,s=o=>{t=e.getLocation(),n.forEach(a=>a({location:t,action:o}))},i=o=>{e.notifyOnIndexChange??!0?s(o):t=e.getLocation()},r=async o=>{const a=o.navigateOpts?.ignoreBlocker?void 0:e.getBlockers?.();if(typeof document<"u"&&a?.length&&(o.type==="PUSH"||o.type==="REPLACE"))for(const l of a){const u=dt(o.path,o.state);if(await l.blockerFn({currentLocation:t,nextLocation:u,action:o.type})){e.onBlocked?.();return}}o.task()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:o=>(n.add(o),()=>{n.delete(o)}),push:(o,a,l)=>{const u=t.state[ae];a=Kn(u+1,a),r({task:()=>{e.pushState(o,a),s({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:o,state:a})},replace:(o,a,l)=>{const u=t.state[ae];a=Kn(u,a),r({task:()=>{e.replaceState(o,a),s({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:o,state:a})},go:(o,a)=>{r({task:()=>{e.go(o,a?.ignoreBlocker??!1),i({type:"GO",index:o})},navigateOpts:a,type:"GO"})},back:o=>{r({task:()=>{e.back(o?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{r({task:()=>{e.forward(o?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[ae]!==0,createHref:o=>e.createHref(o),block:o=>{if(!e.setBlockers)return()=>{};const a=e.getBlockers?.()??[];return e.setBlockers([...a,o]),()=>{const l=e.getBlockers?.()??[];e.setBlockers?.(l.filter(u=>u!==o))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:s,_getBlockers:()=>e.getBlockers?.()??[]}}function Kn(e,t){const n=gn();return{...t,key:n,__TSR_key:n,[ae]:e}}function Wr(e){const t=e?.window??(typeof document<"u"?window:void 0),n=t.history.pushState,s=t.history.replaceState;let i=[];const r=()=>i,o=y=>i=y,a=y=>Us(e?.createHref?e.createHref(y):y),l=e?.parseLocation??(()=>dt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const y=gn();t.history.replaceState({[ae]:0,key:y,__TSR_key:y},"")}let u=l(),c,f=!1,h=!1,d=!1,g=!1;const p=()=>u;let v;const m=()=>{v&&(C._ignoreSubscribers=!0,(v[2]?t.history.pushState:t.history.replaceState)(v[1],"",v[0]),C._ignoreSubscribers=!1,v=void 0,c=void 0)},S=(y,R,P)=>{const I=e?.createHref?a(R):void 0,E=!!v;E||(c=u),u=dt(R,P),v=[I??u.href,P,v?.[2]||y],E||queueMicrotask(()=>m())},_=y=>{u=l(),C.notify({type:y})},w=async()=>{if(g=!1,h){h=!1;return}const y=l(),R=y.state[ae]-u.state[ae],P=R===1,I=R===-1,E=!P&&!I||f;f=!1;const O=E?"GO":I?"BACK":"FORWARD",T=E?{type:"GO",index:R}:{type:I?"BACK":"FORWARD"};if(d)d=!1;else{const k=r();if(typeof document<"u"&&k.length){for(const A of k)if(await A.blockerFn({currentLocation:u,nextLocation:y,action:O})){h=!0,t.history.go(-R),C.notify(T);return}}}u=l(),C.notify(T)},x=y=>{if(g){g=!1;return}let R=!1;const P=r();if(typeof document<"u"&&P.length)for(const I of P){const E=I.enableBeforeUnload??!0;if(E===!0){R=!0;break}if(typeof E=="function"&&E()===!0){R=!0;break}}if(R)return y.preventDefault(),y.returnValue=""},C=qr({getLocation:p,getLength:()=>t.history.length,pushState:(y,R)=>S(!0,y,R),replaceState:(y,R)=>S(!1,y,R),back:y=>(y&&(d=!0,g=!0),t.history.back()),forward:y=>{y&&(d=!0,g=!0),t.history.forward()},go:(y,R)=>{f=!0,R&&(d=!0,g=!0),t.history.go(y)},createHref:a,flush:m,destroy:()=>{t.history.pushState=n,t.history.replaceState=s,t.removeEventListener(Wn,x,{capture:!0}),t.removeEventListener(qn,w)},onBlocked:()=>{c&&u!==c&&(u=c)},getBlockers:r,setBlockers:o,notifyOnIndexChange:!1});return C._ignoreNextBeforeUnload=y=>{g=!1;try{y=new URL(y,t.document.baseURI).href,g=/^https?:/.test(y)&&(!y.includes("#")||y.split("#")[0]!==t.location.href.split("#")[0])}catch{}},t.addEventListener(Wn,x,{capture:!0}),t.addEventListener(qn,w),t.history.pushState=function(...y){const R=n.apply(t.history,y);return C._ignoreSubscribers||_("PUSH"),R},t.history.replaceState=function(...y){const R=s.apply(t.history,y);return C._ignoreSubscribers||_("REPLACE"),R},C}function dt(e,t){const n=Us(e),s=n.indexOf("#"),i=n.indexOf("?");if(!t){const r=gn();t={[ae]:0,key:r,__TSR_key:r}}return{href:n,pathname:n.slice(0,s>-1?i>-1?Math.min(s,i):s:i>-1?i:n.length),hash:s>-1?n.slice(s):"",search:i>-1?n.slice(i,s===-1?void 0:s):"",state:t}}function gn(){return(Math.random()+1).toString(36).slice(7)}function Rt(e,t){return e.protocol!=="http:"&&e.protocol!=="https:"||e.origin!==t||!!e.username||!!e.password}function xt(e){return e.pathname+e.search+e.hash}function Qn(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function St(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Jn({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:s,...i}){return i}function Kr(e){return e.findIndex(t=>t.status==="error"||t.status==="notFound"||t._notFound)+1}function Qr(e,t,n,s,i,r){s&&(t=t.slice(0,s)),i&&(n=n.slice(0,i));for(const o of t){if(r&&e._tx!==r)return;n.some(a=>a.routeId===o.routeId)||e.routesById[o.routeId].options.onLeave?.(o)}for(const o of n){if(r&&e._tx!==r)return;e.routesById[o.routeId].options[t.some(a=>a.routeId===o.routeId)?"onStay":"onEnter"]?.(o)}}var Jr=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async n=>(n(),!1),this.update=n=>{const s=this.options;this.options={...s,...n},this.isServer=this.options.isServer??!1??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Wr()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");const i=this.options.basepath??"/",r=this.options.rewrite,o=this.basepath!==i||s?.rewrite!==r||s?.caseSensitive!==this.options.caseSensitive;if(o&&(this.basepath=i,this.rewrite=i!=="/"&&Ds(i)?Gr(i,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let a;a=this.buildRouteTree(),this.setRoutes(a)}if(this.stores)o&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){const a=this.getStoreConfig(this);this.batch=a.batch,this.stores=Nr(this.latestLocation,a),br(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=zr(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Ar(this.options.routeMasks,n.processedTree),{...n,resolvePathCache:ht(1e3)}},this.subscribe=(n,s)=>{const i={eventType:n,fn:s};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{for(const s of this.subscribers)if(s.eventType===n.type)try{s.fn(n)}catch(i){console.error(i)}},this.parseLocation=(n,s)=>{const i=({pathname:l,search:u,hash:c,href:f},h)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const v=this.options.parseSearch(u),m=this.options.stringifySearch(v);return{href:l+m+c,publicHref:l+m+c,pathname:Ie(l),external:!1,searchStr:m,search:ye(s?.search,v),hash:Ie(c.slice(1)),state:oe(s?.state,h)}}const d=Bt(this.rewrite,new URL(f,this.origin)),g=this.options.parseSearch(d.search),p=this.options.stringifySearch(g);return d.search=p,{href:d.href.replace(d.origin,""),publicHref:f,pathname:Ie(at(d.pathname)),external:!!this.rewrite&&Rt(d,this.origin),searchStr:p,search:ye(s?.search,g),hash:Ie(d.hash.slice(1)),state:oe(s?.state,h)}},r=i(n,n.state),{__tempLocation:o,__tempKey:a}=r.state;if(o&&(!a||a===this.tempLocationKey)){const l=i(o,{...o.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return l.maskedLocation=r,l}return r},this.matchRoutes=(n,s,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:s},i):this.matchRoutesInternal(n,s),this.getMatchedRoutes=n=>{const s=Object.create(null),i=Vr(X(n),this.processedTree,!0);return i&&Object.assign(s,i.rawParams),[i?.branch||[this.routesById.__root__],s,i?.route]},this.buildLocation=n=>{{const o=this.staticLocations.get(n);if(o)return o}let s=!1;const i=(o={})=>{if(o.href){const k=dt(o.href,{});o={...o,to:Bt(this.rewrite,new URL(k.pathname,this.origin)).pathname,search:this.options.parseSearch(k.search),hash:k.hash.slice(1)}}const a=n._fromLocation||this._pendingLocation||this.latestLocation;let l;const u=()=>(s=!0,a),c=()=>l??=this.matchRoutesLightweight(u()),f=o.to?`${o.to}`:".",h=Hn(f[0]==="/"?"":o.unsafeRelative==="path"?u().pathname:o.from??c()[1],f,this.options.trailingSlash,this.resolvePathCache),d=this.routesByPath[X(h)],g=h.includes("$");let p;if(d)p=d._branch??=Gs(d);else if(g)p=[];else{const[k,A,$]=this.getMatchedRoutes(h);p=k,this.options.notFoundRoute&&(!$||$.path!=="/"&&A["**"])&&(p=[...p,this.options.notFoundRoute])}const v=g?d?._interpolation??ze(!1,{fullPath:h},0):void 0;let m;for(const k of p){const A=k.options.params?.stringify??k.options.stringifyParams;if(A){const $=c()[3];if(m??=bt(o.params,$),!Ls(m))break;m===$&&(m=Object.assign(rt(),m));try{Object.assign(m,A(m))}catch{}}}m??=bt(o.params,Yr(o.params,v)?c()[3]:Pt);const S=n.leaveParams?h:at(Ie(v?Bn(h,v,m,this.pathParamsDecoder):h)),_=Zr(p,n._includeValidateSearch),w=()=>{let k=c()[2];if(n._includeValidateSearch&&this.options.search?.strict){const A={};p.forEach($=>{if($.options.validateSearch)try{Object.assign(A,lt($.options.validateSearch,{...A,...k}))}catch{}}),k=A}return k},x=_.length?eo(_,w(),o):o.search===!0?w():typeof o.search=="function"?o.search(w()):o.search||Pt,C=this.options.stringifySearch(x),y=o.hash===!0?u().hash:typeof o.hash=="function"?o.hash(u().hash):o.hash||void 0,R=y?`#${y}`:"",P=o.state?o.state===!0?u().state:typeof o.state=="function"?o.state(u().state):o.state:Pt,I=`${S}${C}${R}`;let E,O,T=!1;if(this.rewrite){const k=new URL(I,this.origin),A=k.origin,$=Ns(this.rewrite,k);E=xt(k),Rt($,A)?(O=$.href,T=!0):O=at(xt($))}else E=pr(I),O=E;return{publicHref:O,href:E,pathname:S,search:x,searchStr:C,state:P,hash:y??"",external:T,unmaskOnReload:o.unmaskOnReload}},r=i(n);if(n.mask)r.maskedLocation=i({from:n.from,...n.mask});else if(this.options.routeMasks){const o=Dr(r.pathname,this.processedTree);if(o){const a=Object.assign(rt(),o.rawParams),{from:l,params:u,...c}=o.route,f=bt(u,a);r.maskedLocation=i({from:n.from,...c,params:f})}}return!s&&n._fromLocation&&this.staticLocations.set(n,r),r},this.commitLocation=async({viewTransition:n,ignoreBlocker:s,...i})=>{const r=i.maskedLocation??i;if(r.external)return Xn(this,r.publicHref,{replace:i.replace,ignoreBlocker:s});let o;const a=X(this.latestLocation.href)===X(i.href)&&te(Jn(i.state),Jn(this.latestLocation.state)),l=this._commitPromise;let u;const c=new Promise(f=>{u=f});if(c.resolve=()=>{u(),l?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:f,hashScrollIntoView:h,...d}=i;f&&(d={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...d,search:d.searchStr,state:{...d.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(d.unmaskOnReload??this.options.unmaskOnReload??!1)&&(d.state.__tempKey=this.tempLocationKey)),d.state={...d.state,__hashScrollIntoViewOptions:h??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=n,o=i.replace?"REPLACE":"PUSH",this.history[o==="REPLACE"?"replace":"push"](d.publicHref,d.state,{ignoreBlocker:s}),this.history.subscribers.size||this.load({action:{type:o}})}return this._scroll.n=i.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:n,resetScroll:s,hashScrollIntoView:i,viewTransition:r,ignoreBlocker:o,...a}={})=>{const l=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=l;const u=this.commitLocation({...l,viewTransition:r,replace:n,resetScroll:s,hashScrollIntoView:i,ignoreBlocker:o});return queueMicrotask(()=>{this._pendingLocation===l&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:n,reloadDocument:s,href:i,publicHref:r,...o})=>{const a=i?Ve(i):void 0;if(a||s){if(n!==void 0||!i){const u=this.buildLocation({to:n,...o}),c=u.maskedLocation??u;i??=c.publicHref,r??=c.publicHref}return Xn(this,!a&&r?r:i,o)}return this.buildAndCommitLocation({...o,href:i,to:n,_isNavigate:!0})},this.load=async n=>{this.updateLatestLocation(),n?.action&&(this._scroll.h=n.action.type==="PUSH"||n.action.type==="REPLACE"),await co(this,n)},this.startViewTransition=n=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,s&&typeof document.startViewTransition=="function"){let i;if(typeof s=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){const r=this.latestLocation,o=this.stores.resolvedLocation.get(),a=typeof s.types=="function"?s.types(St(r,o)):s.types;if(a===!1)return n();i={update:n,types:a}}else i=n;return document.startViewTransition(i).updateCallbackDone}return n()},this.invalidate=n=>{const s=this._committed,i=n?.filter,r=this._preloads,o=new Set,a=c=>{(!i||i(c))&&o.add(c.id)};s.forEach(a),this._cache.forEach(a),r?.forEach(c=>c.forEach(a)),this._tx?.[3].forEach(a);const l=[];for(const[c,f]of r??[])f.some(h=>o.has(h.id))&&(r.delete(c),l.push(c));const u=c=>{if(o.has(c.id)){const f=this.routesById[c.routeId],h={...c,invalid:!0,...(n?.forcePending||c.status==="error"||c.status==="notFound")&&Qn(f)?{status:"pending",error:void 0}:void 0};return c._flight=void 0,h}return c};this._committed=s.map(u);for(const[c,f]of this._cache)o.has(c)&&(f.invalid=!0,n?.forcePending&&(f.status="pending"));for(const c of o){const f=this._flights?.get(c);this._flights?.delete(c),f&&!f[2]&&l.push(f[1])}for(const c of l)c.abort();return this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{const s=n.options;let i=n.headers.get("Location")||s.href;if(!i){const o=this.buildLocation(s);i=(o.maskedLocation??o).publicHref||"/"}let r;if(Ts.test(i)||(r=Ve(i))&&!this.protocolAllowlist.has(r))throw new Error("Redirect blocked: unsafe protocol");if(r==="http:"||r==="https:"){const o=new URL(i);o.pathname.startsWith("//")?i=o.href:Rt(o,this.origin)||(i=xt(o),r=void 0)}return r&&(s.reloadDocument=!0),s.href=i,n.headers.set("Location",i),n},this.clearCache=n=>{const s=this._cache,i=this._preloads,r=n?.filter,o=[],a=[];for(const[u,c]of s)(!r||r(c))&&(a.push(u),o.push(c));const l=[];for(const[u,c]of i??[])(!r||c.some(r))&&(l.push(u),o.push(...c));for(const u of a)s.delete(u);for(const u of l)i.delete(u);for(const u of o){const c=u._flight;u._flight=void 0,c&&!--c[2]&&(this._flights?.get(u.id)===c&&this._flights.delete(u.id),l.push(c[1]))}for(const u of l)u.abort()},this.loadRouteChunk=be,this.preloadRoute=n=>fo(this,n),this.matchRoute=(n,s)=>{const i={...n,to:n.to?Hn(n.from||"",n.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:n.params||{},leaveParams:!0},r=this.buildLocation(i),o=this.stores.status.get()==="pending";if(s?.pending&&!o)return!1;const a=s?.pending??!o?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),l=$r(r.pathname,s?.caseSensitive??!1,s?.fuzzy??!1,a.pathname,this.processedTree);return!l||n.params&&!te(l.rawParams,n.params,!0)?!1:s?.includeSearch??!0?te(a.search,r.search,!0)?l.rawParams:!1:l.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=vr(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??Fr,parseSearch:e.parseSearch??Mr,protocolAllowlist:e.protocolAllowlist??gr}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;const t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=ze(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){const[n,s,i]=this.getMatchedRoutes(e.pathname);let r=n,o=!1;(i?i.path!=="/"&&s["**"]:X(e.pathname))&&(this.options.notFoundRoute?r=[...r,this.options.notFoundRoute]:o=!0);const a=o?to(this.options.notFoundMode,r):void 0,l=new Array(r.length),u=this._committed,c=(h,d)=>{const g=u[d];return g?.routeId===h.id?g:h===this.options.notFoundRoute?u.find(p=>p.routeId===h.id):void 0};let f;for(let h=0;h<r.length;h++){const d=r[h],g=l[h-1];let p,v,m;{const T=g?.search??e.search,k=g?._strictSearch??void 0;try{const A=lt(d.options.validateSearch,{...T})??void 0;p={...T,...A},v={...k,...A}}catch(A){let $=A;if(A instanceof gt||($=new gt(A.message,{cause:A})),t?.throwOnError)throw $;p=T,v={},m=$}}let S="",_="";try{S=d.options.loaderDeps?.({search:p})??"",_=S&&JSON.stringify(S)||""}catch(T){if(t?.throwOnError)throw T;m??=T}const w=rt(),x=d._interpolation?Bn(d.fullPath,d._interpolation,s,this.pathParamsDecoder,w):d.fullPath,C=d.id+x+_,y=c(d,h),R=this._cache.get(C)??(y?.id===C?y:void 0);f=R?._strictParams??Object.assign(w,f);let P;if(!R)try{Yn(d,f)}catch(T){if(Ee(T)||zs(T)?P=T:P=new Xr(T.message,{cause:T}),t?.throwOnError)throw P}const I=y?"stay":"enter";let E;if(R)E={...R,cause:I,search:ye(y?y.search:R.search,p),_strictSearch:v,searchError:m};else{const T=Qn(d)?"pending":"success";E={id:C,ssr:d.options.ssr,index:h,routeId:d.id,params:y?.params??f,_strictParams:f,pathname:x,updatedAt:Date.now(),search:y?ye(y.search,p):p,_strictSearch:v,searchError:m,status:T,isFetching:!1,error:void 0,paramsError:P,context:{},abortController:t?._controller??new AbortController,cause:I,loaderDeps:y?oe(y.loaderDeps,S):S,invalid:!1,preload:!1,staticData:d.options.staticData||{},fullPath:d.fullPath}}const O=a===d.id;E._notFound&&!O&&(E.error=void 0),E._notFound=O,l[h]=E}for(let h=0;h<l.length;h++){const d=l[h];d.params=d.cause==="stay"?ye(d.params,f):f,t?._controller&&(d.context={})}return l}matchRoutesLightweight(e){const t=le(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,s=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===s)return i[1];const[r,o]=this.getMatchedRoutes(e.pathname),a=le(r),l={...e.search};for(const h of r)try{Object.assign(l,lt(h.options.validateSearch,l))}catch{}const u=n&&n.routeId===a.id&&n.pathname===e.pathname;let c;if(u)c=n.params;else{const h=o;for(const d of r)try{Yn(d,h)}catch{}c=h}const f=[r,a.fullPath,l,c];return this.lightweightCache.set(e,[s,f]),f}};async function Xn(e,t,{replace:n,ignoreBlocker:s}){if(!ks(t,e.protocolAllowlist)){if(!s){const i=e.history._getBlockers();for(const r of i)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?"REPLACE":"PUSH"}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var gt=class extends Error{},Xr=class extends Error{};function lt(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new gt("Async validation not supported");if(n.issues)throw new gt(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function bt(e,t){if(e===void 0||e===!0)return t;const n=Object.create(null);return e===!1||e===null?n:typeof e=="function"?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function Yr(e,t){return typeof e=="function"?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(n=>typeof n!="string"&&!fn.call(e,n[1]))}var Pt=Object.freeze({});function Zr(e,t){const n=[];for(let s=0;s<e.length;s++){const i=e[s].options;if("search"in i)i.search?.middlewares&&n.push(...i.search.middlewares);else if(i.preSearchFilters||i.postSearchFilters){const o=({search:a,next:l})=>{const u=l(i.preSearchFilters?i.preSearchFilters.reduce((c,f)=>f(c),a):a);return i.postSearchFilters?i.postSearchFilters.reduce((c,f)=>f(c),u):u};n.push(o)}const r=i.validateSearch;if(t&&r){const o=({search:a,next:l,meta:u})=>{const c=l(a);try{const f=lt(r,c);if(u&&f)for(const h in f)h in c||(u.defaulted||=new Map).set(h,f[h]);return{...c,...f}}catch{}return c};n.push(o)}}return n}function eo(e,t,n){const s=(i,r,o)=>{if(i>=e.length){if(!n.search)return{};if(n.search===!0)return r;const l=Os(n.search,r);return o&&(o.explicit=l),l}const a=(l,u)=>{if(u){const c=o||{};return{search:s(i+1,l,c),meta:c}}return s(i+1,l,o)};return e[i]({search:r,next:a,meta:o})};return s(0,t)}function to(e,t){if(e!=="root"){let n;for(let s=t.length-1;s>=0;s--){const i=t[s];if(i.options.notFoundComponent)return i.id;n||=i.children&&i.id}if(n)return n}return Ae}function Yn(e,t){const n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function Gt(e,t){return e.options[t]?.preload?.()}function no(e,t){const n=Gt(e,"component");let s=Gt(e,"pendingComponent");return t&&(s?s=s.then(t):t()),n&&s?Promise.all([n,s]).then(()=>{}):n??s}function be(e,t,n){const s=()=>t===!1?void 0:t?Gt(e,t):no(e,n),i=e._lazy;if(i)return i===!0?s():i.then(s);if(!e.lazyFn)return s();const r=e.lazyFn().then(o=>{{const{id:a,...l}=o.options;Object.assign(e.options,l),e._lazy=!0}},o=>{throw e._lazy=void 0,o});return e._lazy=r,r.then(s)}function pn(e){const t=e.findIndex(n=>n.status!=="success"||n._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function so(e,t,n){const s=e._tx;return t&&s?.[2]===n&&!s[3].some(i=>i.routeId===t)}var Y=0,ne=1,yt=2,B=3,ue=[4];function je(e){return typeof e[0]=="number"}function me(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,s)=>{const i=()=>s(t);t.addEventListener("abort",i,{once:!0}),Promise.resolve(e).then(n,s).then(()=>t.removeEventListener("abort",i))})}function ve(e,t){return e.routesById[t.routeId]}function He(e,t,n){return zs(e)?[B,e]:Ee(e)?(e.routeId||=n,[yt,e]):t?(typeof e?.then=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[ne,e]):[Y,e]}function mn(e,t){let n=He(t,!0,e.id);if(n[0]!==ne)return n;try{e.options.onError?.(n[1])}catch(s){n=He(s,!0,e.id)}return n}function De(e,t,n,s,i){return i[0].signal.aborted?ue:yn(e,t,n,mn(n,s),i)}async function io(e,t,n,s,i,r){const[o,a]=t,l=n[0].signal,u=!!n[3];for(let c=n[6]??0;c<s;c++){const f=a[c],h=ve(e,f);f.abortController=n[0];const d=a[c-1]?.context??e.options.context??{},g={params:f.params,location:o,navigate:S=>e.navigate({...S,_fromLocation:o}),buildLocation:e.buildLocation,cause:u?"preload":f.cause,abortController:n[0],preload:u,matches:a,routeId:h.id};try{const S=f._ctx||=h.options.context?h.options.context({...g,deps:f.loaderDeps,context:d})||{}:void 0;f.context={...d,...S}}catch(S){return ee(e,f),[c,De(e,t,h,S,n)]}if(l.aborted)return[c,ue];const p=f.paramsError??f.searchError;if(p!==void 0)return ee(e,f),[c,De(e,t,h,p,n)];const v=h.options.beforeLoad;if(!v)continue;const m=f.status;c>=r&&(f.status="pending",n[7]?.());try{Be(e,f,"beforeLoad",n[0]);const S=v({...g,search:f.search,context:f.context,...e.options.additionalContext}),_=await(typeof S?.then=="function"?me(S,l):S);if(l.aborted)return[c,ue];const w=yn(e,t,h,He(_,!1,h.id),n);if(w[0]!==Y)return ee(e,f),[c,w];f.context={...f.context,..._}}catch(S){return ee(e,f),[c,De(e,t,h,S,n)]}finally{f.status=m,Be(e,f,!1,n[0])}}i()}function vn(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){const s=e._tx;if(s&&!s[0].signal.aborted&&!s[3].includes(t)&&s[3].some(i=>i.id===t.id)&&s[3].some(i=>i.isFetching==="beforeLoad"))return;e._flights.delete(t.id)}return n[1]}}function ee(e,t){const n=t._flight;t._flight=void 0,vn(e,t,n)?.abort()}function G(e,t,n,s){const i=[];for(const r of t)if(!n?.includes(r)){const o=r._flight;if(r._flight=void 0,s&&o?.[2]===1&&e._flights?.get(r.id)===o&&n?.some(a=>a.id===r.id))o[2]=0;else{const a=vn(e,r,o);a&&i.push(a)}}for(const r of i)r.abort()}function Sn(e){for(const t of e){const n=t._flight;n&&n[2]++}}function Be(e,t,n,s){if(t.isFetching=n,s&&e._tx?.[0]!==s)return;const i=e.stores.byRoute.get(t.routeId),r=i?.get();r?.id===t.id&&i.set({...r,isFetching:n})}function qs(e,t,n,s,i,r,o){const a=t[0];return{params:n.params,location:a,navigate:l=>e.navigate({...l,_fromLocation:a}),cause:o?"preload":n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:r,context:n.context,route:s,...e.options.additionalContext}}async function Zn(e,t,n,s,i,r,o){const a=o[0],l=a.signal;if(l.aborted)return ue;if(!i)return[Y,void 0];let u=n._flight;Be(e,n,"loader",a);try{if(!u){const c=new AbortController;u=[Promise.resolve().then(()=>i(qs(e,t,n,s,c,r,!!o[3]))).then(f=>He(f,!1,s.id),f=>He(f,!0,s.id)).then(f=>(f[0]!==Y&&e._flights?.get(n.id)===u&&(e._flights.delete(n.id),u[2]||c.abort()),f[0]===ne&&u[2]?mn(s,f[1]):f)),c,1],(e._flights??=new Map).set(n.id,u)}return n._flight=u,n.abortController=u[1],yn(e,t,s,await me(u[0],l),o)}catch(c){if(c!==l||!l.aborted)throw c;return ee(e,n),ue}finally{Be(e,n,!1,a)}}function es(e,t,n){t[0]!==B&&(e.status="success",e.error=void 0,t[0]===Y?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function ro(e,t,n){const s=e._cache.get(t.id);if(s!==n||e._committed.some(r=>r.id===t.id&&r._flight===t._flight))return;const i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),s&&ee(e,s)}function ts(e,t){return t[0]===ne||t[0]===yt?{...e,status:t[0]===ne?"error":"notFound",error:t[1],_flight:void 0}:e}function oo(e,t,n,s,i,r,o){const a=t[1][n],l=ve(e,a),u=!!r[3],c=e._cache.get(a.id);let f,h=!1,d;try{if(a.status==="success"&&(f=l.options.shouldReload,typeof f=="function"&&(f=f(qs(e,t,a,l,r[0],i,u))),r[0].signal.aborted&&(d=ue)),!d)if(a.status!=="success")h=!0;else{const O=u||a.preload?l.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.options.defaultStaleTime??0;h=!!(a.invalid||f||f===void 0&&Date.now()-a.updatedAt>=O&&(r[5]||a.cause==="enter"||r[2].some(T=>T.routeId===a.routeId&&T.id!==a.id)))}}catch(O){a.invalid=!0,ee(e,a),d=De(e,t,l,O,r)}const g=l.options.loader,p=typeof g=="function",v=p?g:g?.handler,m=!u||l.options.preload!==!1;let S=m&&g?e._flights?.get(a.id):void 0;S===a._flight||d?S=void 0:S&&!h&&!u&&f===void 0?h=!0:h||(S=void 0);const _=!!(g&&h&&a.status==="success"&&!u&&!r[4]&&((p?void 0:g.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),w=h&&m,x=w&&!_&&(a.status!=="success"||!!g),C=n>=o?r[7]:void 0,y=l.lazyFn&&l._lazy!==!0?C:void 0;if(w&&!g&&(a.invalid=!1,a.updatedAt=Date.now()),S&&S[2]++,x){const O=a._flight;a._flight=S,vn(e,a,O)?.abort(),n>=o&&(a.status="pending"),C?.()}w||(a.isFetching=!1);const R=!d&&x?Zn(e,t,a,l,v,i,r).then(O=>(es(a,O,u),O[0]===Y&&(g&&!r[0].signal.aborted&&ro(e,a,c),n>=o&&(a.status="pending")),O)):Promise.resolve(d??[Y,a.loaderData]),P=(async()=>{try{const T=be(l,void 0,y);T&&await me(T,r[0].signal)}catch(T){if(!t[1].some((k,A)=>A<=n&&(k.status==="error"||k.status==="notFound"||k._notFound)))return[n,De(e,t,l,T,r)]}const O=await R;x&&O[0]===Y&&a.status==="pending"&&!r[0].signal.aborted&&(a.status="success",C?.())})();if(s.push([n,R,P]),!_)return R.then(O=>ts(a,O));const I={...a,status:"pending",preload:!1,_flight:S};a.invalid=!1,a.isFetching="loader";const E=Zn(e,t,I,l,v,i,r).then(O=>(a.isFetching=!1,es(I,O,!1),O));return(t[2]??=[]).push([n,E,P,I]),E.then(O=>ts(I,O))}async function Nt(e,t,n,s,i=0){const r=n?.[1][1];let o=r?.routeId?t.findIndex(a=>a.routeId===r.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let a=o;a>=0;a--){const l=ve(e,t[a]);try{const u=be(l,!1);u&&await me(u,s)}catch(u){if(u===s&&s.aborted)throw u}if(l.options.notFoundComponent)return a}return r?.routeId?o:i}function ge(e,t){t[2]&&(G(e,t[2].map(n=>n[3])),t[2]=void 0)}async function ns(e,t,n,s){let i;try{await Promise.all(e.map(r=>r[1].then(async o=>{const a=r[0];if(!(s&&a>=await s)){if(o[0]>=B)throw[a,o];!i&&o[0]!==Y&&(i=[a,o],await Promise.all((n??[]).map(l=>{if(!(l[0]<=a))return l[1].then(u=>{if(u[0]===B)throw[l[0],u]})})))}})))}catch(r){return r}return t??i}function yn(e,t,n,s,i,r){for(;s[0]===B;){const o=s[1],a=o.options;try{if((a.href||o.headers.has("Location"))&&(e.resolveRedirect(o),a.reloadDocument)||(a.reloadDocument?i[3]:i[1]>=20))return s;const l=e.buildLocation({...a,_fromLocation:t[0],_includeValidateSearch:!0}),u=l.maskedLocation??l;if(u.external){const c=o.clone();return c.options={...a},c.headers.set("Location",u.publicHref),e.resolveRedirect(c),i[3]?[B,c]:[B,c,u]}return[B,o,l]}catch(l){s=r?[ne,l]:mn(n,l),r=!0}}return s}async function Ws(e,t,n,s,i,r){const o=t[1];let a=await i,l=!1;const u=o.findIndex(d=>d._notFound),c=d=>d[1][0]===yt?Nt(e,o,d,s.signal):d[0];let f=u<0?o.length:u;if((a?.[1][0]??0)>=B)f=0;else if(a){f=a[2]??=await c(a);for(const d of n){if(d[0]>=f)break;const g=await d[1];if(g[0]!==Y&&g[0]<B&&!("loaderData"in o[d[0]])){a=[d[0],g],f=a[2]=await c(a);break}}}for(const d of n){if(d[0]>=f)break;const g=await d[2];if(g){a=g;break}}if((a?.[1][0]??0)>=B){const d=a[1];if(d[0]!==B||d[1].options.reloadDocument||d[2])return ge(e,t),d;l=!0,a=[0,[ne,new Error("Too many redirects")]]}const h=a?a[2]??await c(a):u;if(h>=0){const d=a?.[1],g=d?.[0],p=o[h],v=d?.[1],m=()=>{d&&(p._notFound=void 0,g===ne?p.status="error":(v.routeId=p.routeId,p.routeId===e.routeTree.id?(p.status="success",p._notFound=!0):p.status="notFound"),p.error=v,p.isFetching=!1)};m(),d||r?.();const S=ve(e,p);try{await me(d?Promise.resolve().then(()=>be(S,g===ne?"errorComponent":"notFoundComponent")):Promise.all([be(S),be(S,"notFoundComponent")]),s.signal)}catch(_){if(_===s.signal&&s.signal.aborted)return ge(e,t),ue}d?l&&(s.abort(),await Promise.all([...n.map(_=>_[1]),...n.map(_=>_[2]),...(t[2]??[]).map(_=>_[1])]),ge(e,t),G(e,o),m()):p.status="success"}return t}async function Ks(e,t,n,s=0,i=t[1].length){const r=t[1];for(let o=s;o<i;o++){const a=r[o],l=ve(e,a).options;if(l.head||l.scripts)try{const u={ssr:e.options.ssr,matches:r,match:a,params:a.params,loaderData:a.loaderData},[c,f]=await me(Promise.all([l.head?.(u),l.scripts?.(u)]),n);a.meta=c?.meta,a.links=c?.links,a.headScripts=c?.scripts,a.styles=c?.styles,a.scripts=f}catch(u){if(u===n&&n.aborted)break;console.error(u)}if(a.status!=="success"||a._notFound)break}return t}async function Qs(e,t,n,s){const i=[t,n],r=s[0].signal;let o;try{const a=e.stores.matches.get();let l=n.findIndex(m=>m._notFound);if(e.options.notFoundMode!=="root"&&l>=0){const m=await Nt(e,n,void 0,r,l);n[l]._notFound=void 0,n[m]._notFound=!0,l=m}let u=l<0?n.length:l+1,c=0;for(;c<u&&c!==l;){const m=n[c],S=s[2][c],_=a[c];if(S?.id!==m.id||S.status!=="success"||m.preload||_?.id!==m.id||_.status!=="success"||(c++,S._notFound||_._notFound))break}const f=[],h=s[6]??0;let d=h?Promise.resolve(n[h-1]):void 0;const g=()=>{for(let m=h;m<u&&!r.aborted;m++)d=oo(e,i,m,f,d,s,c)},p=await io(e,i,s,u,g,c);if(p){if(s[4]=!0,u=p[0],p[1][0]===yt){const m=await Nt(e,n,p,r);p[2]=m,u=Math.min(u,m+1)}else p[1][0]>=B&&(u=0);g()}if(!r.aborted&&!s[3]){const m=[];for(const[S,_]of e._flights??[])_[2]||(e._flights.delete(S),m.push(_[1]));for(const S of m)S.abort()}const v=Ws(e,i,f,s[0],ns(f,p,i[2]),s[7]);i[2]?.length&&(i[3]=ns(i[2],void 0,void 0,v.then(m=>je(m)?0:pn(n).length,()=>0))),o=await v}catch(a){if(ge(e,i),a===r&&r.aborted)return ue;throw a}return je(o)?o:Ks(e,o,r,s[6]===n.length?s[6]:0)}function Ut(e,t){if(e._tx!==t)return;const n=t[3],s=e.stores.matches.get();let i=e._pending;for(let r=0;r<n.length;r++){const o=n[r],a=o.status==="success"&&!o._notFound,l=s[r]?.id===o.id&&s[r]?.status==="pending";if(a&&!l)continue;const u=ve(e,o),c=a||o.invalid?0:u.options.pendingMs??e.options.defaultPendingMs,f=u.options.pendingComponent??e.options.defaultPendingComponent;if(!f||typeof c!="number"||c===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}const h=u.options.pendingMinMs??e.options.defaultPendingMinMs??0;let d=!1;if(i?.[1]===o.id?(d=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,l?Date.now()+h:t[4]+c,void 0,l||void 0,f]),i[4]&&!d&&i[5]===f)return;if(i[5]=f,!i[4]){clearTimeout(i[3]);const v=i[2]-Date.now();if(v>0){i[3]=setTimeout(()=>Ut(e,t),v);return}i[2]=0}const g=n.map(v=>({...v,_flight:void 0}));g[r].status="pending";const p=i[4]=e.startTransition(()=>e.stores.setMatches(g),g).then(v=>(v&&e._pending===i&&i[4]===p&&!i[2]&&(i[2]=Date.now()+h),v));return}}function Oe(e,t){const n=e._pending;(e._tx===t||!e._tx?.[3].some(s=>s.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function ss(e,t){const n=e._pending;if(!n)return;clearTimeout(n[3]);const s=n[2]-Date.now();if(!n[4]||s<=0||!pn(t[3]).some(r=>r.id===n[1]))return;let i;try{await me(new Promise(r=>{i=setTimeout(r,s)}),t[0].signal)}catch{}clearTimeout(i)}function Js(e,t){e._committed=t,e.stores.setMatches(t)}function ao(e,t,n,s){const i=e._committed,r=e._lifecycleEnd,o=e._cache;for(const c of n)c.preload=!1,s&&(c._assetEnd=void 0);const a=pn(n).length,l=new Map;{const c=Date.now(),f=new Set;for(let h=0;h<n.length;h++){const d=n[h];(h<a||d.status==="success")&&f.add(d.id)}for(const h of[...i,...o.values()]){if(h.status!=="success"||f.has(h.id))continue;const d=ve(e,h);!d.options.loader||c-h.updatedAt>=(h.preload?d.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:d.options.gcTime??e.options.defaultGcTime??3e5)||l.set(h.id,o.get(h.id)===h?h:{...h,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=l;const u=e._lifecycleEnd=Kr(n);Js(e,n),G(e,[...o.values(),...i].filter(c=>c._flight&&l.get(c.id)!==c),n),Qr(e,i,n,r,u,t)}async function Xe(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function Xs(e,t,n){const s=n[1].options,i=n[2];if(!i)return e.navigate({...s,replace:!0,ignoreBlocker:!0});if(s.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;const r=e.commitLocation({...i,viewTransition:s.viewTransition,replace:!0,resetScroll:s.resetScroll,hashScrollIntoView:s.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),r}async function lo(e,t,n,s,i){const r=n.map(l=>({...l}));Sn(r);for(const l of s)ee(e,r[l[0]]),r[l[0]]=l[3];const o=[t[2],r];let a;try{a=await Ws(e,o,s,t[0],i)}catch(l){throw G(e,r),l}if(je(a)){G(e,r),a[0]===B&&e._tx===t&&e._committed===n&&await Xs(e,t,a);return}if(await Ks(e,a,t[0].signal),e._tx!==t||e._committed!==n){G(e,r);return}for(const l of r){const u=e._cache.get(l.id);u?._flight&&u._flight===l._flight&&(e._cache.delete(l.id),ee(e,u))}Js(e,r),G(e,n,r)}async function uo(e,t,n,s,i,r){const o=await Qs(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,r,s]);if(je(o)){const f=o[0]===B&&e._tx===t;if((!f||o[1].options.reloadDocument)&&Oe(e,t),G(e,t[3]),t[3]=[],!f)return;if(e._tx!==t){Oe(e,t);return}await Xs(e,t,o);return}const a=o[1];if(e._tx===t&&await ss(e,t),e._tx!==t){Oe(e,t),G(e,a),ge(e,o);return}const l=t[2],u=St(l,e.stores.resolvedLocation.get()),c=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await ss(e,t),e._tx!==t){Oe(e,t),G(e,a),ge(e,o);return}const f=()=>{Oe(e,t),ao(e,t,a,r),e._tx===t&&(e.emit({type:"onLoad",...u}),e._tx===t&&e.emit({type:"onBeforeRouteMount",...u}))},h=await e.startTransition(f,a);if(e._tx!==t){ge(e,o);return}c?.length&&lo(e,t,a,c,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(l),e.stores.status.set("idle"),e._tx===t&&e.emit({type:"onResolved",...u}),h&&e._tx===t&&e.emit({type:"onRendered",...u})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function co(e,t){const n=e._tx,s=e.stores.resolvedLocation.get(),i=s??e.stores.location.get(),r=e.latestLocation,o=e._pendingLocation,a=o?.href===r.href?o._redirects??0:0,l=e._handoff,u=l?.[0](),c=new AbortController,f=e._preflight;if(e._preflight=c,u||l?.[1](),f?.abort(),!c.signal.aborted){const w=St(r,s);e.emit({type:"onBeforeNavigate",...w}),c.signal.aborted||e.emit({type:"onBeforeLoad",...w})}if(c.signal.aborted){await Xe(e,n);return}const h=i.href===r.href;let d=c;const g=e.matchRoutes(r,{_controller:c});Sn(g);const p=u?l[1](g):void 0;if(p?d=u:u?.abort(),c.signal.aborted){G(e,g),await Xe(e,n);return}e._preflight=void 0;let v;const m=()=>uo(e,_,h,()=>Ut(e,_),t?.sync,p),S=t?.sync?new Promise(w=>v=w):Promise.resolve().then(m),_=[d,a,r,g,Date.now(),S.then(()=>Xe(e,_))];if(e._tx=_,n){for(const w of e.stores.matches.get()){if(e._tx!==_)break;w.isFetching&&Be(e,w,!1)}n[0].abort(),G(e,n[3],_[3],!0)}if(e._tx!==_){G(e,_[3]),_[3]=[],v?.(),await Xe(e,_);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(r)}),(p||!e._committed.length&&g[0]?.status!=="success"&&!g.some(w=>w._notFound))&&Ut(e,_),v?.(m()),await _[5]}async function fo(e,t){let n=e.buildLocation(t);for(let s=0;;s++){const i=e._committed,r=new AbortController;let o,a,l;try{try{o=e.matchRoutes(n,{_controller:r}),Sn(o),a=(e._preloads??=new Map).set(r,o),l=await Qs(e,n,o,[r,s,i,!0])}finally{a&&(a=a.delete(r),G(e,o)),r.abort()}if(!je(l))return l[1];if(!a||l.length<3)return;n=l[2]}catch(u){Ee(u)||console.error(u);return}}}var ho="Error preloading route! ☝️",Ys=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t,this._branch=void 0;const n=this.options,s=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=Ae:this.parentRoute||hn();let i=s?Ae:n?.path;i&&i!=="/"&&(i=As(i));const r=n?.id||i,o=s?Ae:xe((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(r??""));i==="__root__"&&(i="/");const a=o==="__root__"?"/":i===void 0?this.parentRoute.fullPath:xe(this.parentRoute.fullPath+"/"+i);this._path=i,this._id=o,this._fullPath=a,this._to=X(a)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Lr({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},go=class extends Ys{constructor(e){super(e)}},_n=class extends b.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){const e=this.state.error;return e?b.createElement(this.props.errorComponent??po,{error:e[0],reset:this.reset}):this.props.children}};function po({error:e}){const[t,n]=b.useState(!1);return(0,L.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,L.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,L.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,L.jsx)("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(s=>!s),children:t?"Hide Error":"Show Error"})]}),(0,L.jsx)("div",{style:{height:".25rem"}}),t?(0,L.jsx)("div",{children:(0,L.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e?.message?(0,L.jsx)("code",{children:e.message}):null})}):null]})}var is=()=>!0,mo=()=>!1;function vo({children:e,fallback:t=null}){return(0,L.jsx)(b.Fragment,{children:So()?e:t})}function So(e=!0){return b.useSyncExternalStore(yo,is,e?mo:is)}function yo(){return()=>{}}var Zs=b.createContext(null);function N(e){const t=b.useContext(Zs);return t||void 0,t}function _o(e,t){const n=e.stores.location,s=new Set;let i,r;const o=a=>{so(e,t,a)||(i=a,s.forEach(l=>l()))};return[()=>i??n.get(),a=>(s.size||(i=n.get(),r=n.subscribe(o).unsubscribe),s.add(a),()=>{s.delete(a),s.size||(r(),i=void 0)})]}var Ge=b.createContext(void 0),wo=b.createContext(void 0);function Co({update:e,notify:t,unwatched:n}){return{link:s,unlink:i,propagate:r,checkDirty:o,shallowPropagate:a};function s(u,c,f){const h=c.depsTail;if(h!==void 0&&h.dep===u)return;const d=h!==void 0?h.nextDep:c.deps;if(d!==void 0&&d.dep===u){d.version=f,c.depsTail=d;return}const g=u.subsTail;if(g!==void 0&&g.version===f&&g.sub===c)return;const p=c.depsTail=u.subsTail={version:f,dep:u,sub:c,prevDep:h,nextDep:d,prevSub:g,nextSub:void 0};d!==void 0&&(d.prevDep=p),h!==void 0?h.nextDep=p:c.deps=p,g!==void 0?g.nextSub=p:u.subs=p}function i(u,c=u.sub){const f=u.dep,h=u.prevDep,d=u.nextDep,g=u.nextSub,p=u.prevSub;return d!==void 0?d.prevDep=h:c.depsTail=h,h!==void 0?h.nextDep=d:c.deps=d,g!==void 0?g.prevSub=p:f.subsTail=p,p!==void 0?p.nextSub=g:(f.subs=g)===void 0&&n(f),d}function r(u){let c=u.nextSub,f;e:do{const h=u.sub;let d=h.flags;if(d&60?d&12?d&4?!(d&48)&&l(u,h)?(h.flags=d|40,d&=1):d=0:h.flags=d&-9|32:d=0:h.flags=d|32,d&2&&t(h),d&1){const g=h.subs;if(g!==void 0){const p=(u=g).nextSub;p!==void 0&&(f={value:c,prev:f},c=p);continue}}if((u=c)!==void 0){c=u.nextSub;continue}for(;f!==void 0;)if(u=f.value,f=f.prev,u!==void 0){c=u.nextSub;continue e}break}while(!0)}function o(u,c){let f,h=0,d=!1;e:do{const g=u.dep,p=g.flags;if(c.flags&16)d=!0;else if((p&17)===17){if(e(g)){const v=g.subs;v.nextSub!==void 0&&a(v),d=!0}}else if((p&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(f={value:u,prev:f}),u=g.deps,c=g,++h;continue}if(!d){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;h--;){const v=c.subs,m=v.nextSub!==void 0;if(m?(u=f.value,f=f.prev):u=v,d){if(e(c)){m&&a(v),c=u.sub;continue}d=!1}else c.flags&=-33;c=u.sub;const S=u.nextDep;if(S!==void 0){u=S;continue e}}return d}while(!0)}function a(u){do{const c=u.sub,f=c.flags;(f&48)===32&&(c.flags=f|16,(f&6)===2&&t(c))}while((u=u.nextSub)!==void 0)}function l(u,c){let f=c.depsTail;for(;f!==void 0;){if(f===u)return!0;f=f.prevDep}return!1}}function Ro(e,t,n){const s=typeof e=="object",i=s?e:void 0;return{next:(s?e.next:e)?.bind(i),error:(s?e.error:t)?.bind(i),complete:(s?e.complete:n)?.bind(i)}}var qt=[],ut=0,{link:rs,unlink:xo,propagate:bo,checkDirty:ei,shallowPropagate:os}=Co({update(e){return e._update()},notify(e){qt[Wt++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,pt(e))}}),Ye=0,Wt=0,W,Kt=0;function Po(e){try{++Kt,e()}finally{--Kt||ti()}}function pt(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=xo(n,e)}function ti(){if(!(Kt>0)){for(;Ye<Wt;){const e=qt[Ye];qt[Ye++]=void 0,e.notify()}Ye=0,Wt=0}}function as(e,t){const n=typeof e=="function",s=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?0:1,get(){return W!==void 0&&rs(i,W,ut),i._snapshot},subscribe(r){const o=Ro(r),a={current:!1},l=Eo(()=>{i.get(),a.current?(W=void 0,o.next?.(i._snapshot)):a.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(r){const o=W,a=t?.compare??Object.is;if(n)W=i,++ut,i.depsTail=void 0;else if(r===void 0)return!1;n&&(i.flags=5);try{const l=i._snapshot,u=typeof r=="function"?r(l):r===void 0&&n?s(l):r;return l===void 0||!a(l,u)?(i._snapshot=u,!0):!1}finally{W=o,n&&(i.flags&=-5),pt(i)}}};return n?(i.flags=17,i.get=function(){const r=i.flags;if(r&16||r&32&&ei(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&os(o)}}else r&32&&(i.flags=r&-33);return W!==void 0&&rs(i,W,ut),i._snapshot}):i.set=function(r){if(i._update(r)){const o=i.subs;o!==void 0&&(bo(o),os(o),ti())}},i}function Eo(e){const t=()=>{const s=W;W=n,++ut,n.depsTail=void 0,n.flags=6;try{return e()}finally{W=s,n.flags&=-5,pt(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const s=this.flags;s&16||s&32&&ei(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,pt(this)}};return t(),n}var Mo=vt((e=>{var t=nn();function n(h,d){return h===d&&(h!==0||1/h===1/d)||h!==h&&d!==d}var s=typeof Object.is=="function"?Object.is:n,i=t.useState,r=t.useEffect,o=t.useLayoutEffect,a=t.useDebugValue;function l(h,d){var g=d(),p=i({inst:{value:g,getSnapshot:d}}),v=p[0].inst,m=p[1];return o(function(){v.value=g,v.getSnapshot=d,u(v)&&m({inst:v})},[h,g,d]),r(function(){return u(v)&&m({inst:v}),h(function(){u(v)&&m({inst:v})})},[h]),a(g),g}function u(h){var d=h.getSnapshot;h=h.value;try{var g=d();return!s(h,g)}catch{return!0}}function c(h,d){return d()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:l;e.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:f})),Fo=vt(((e,t)=>{t.exports=Mo()})),Io=vt((e=>{var t=nn(),n=Fo();function s(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var i=typeof Object.is=="function"?Object.is:s,r=n.useSyncExternalStore,o=t.useRef,a=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(c,f,h,d,g){var p=o(null);if(p.current===null){var v={hasValue:!1,value:null};p.current=v}else v=p.current;p=l(function(){function S(y){if(!_){if(_=!0,w=y,y=d(y),g!==void 0&&v.hasValue){var R=v.value;if(g(R,y))return x=R}return x=y}if(R=x,i(w,y))return R;var P=d(y);return g!==void 0&&g(R,P)?(w=y,R):(w=y,x=P)}var _=!1,w,x,C=h===void 0?null:h;return[function(){return S(f())},C===null?void 0:function(){return S(C())}]},[f,h,d,g]);var m=r(c,p[0],p[1]);return a(function(){v.hasValue=!0,v.value=m},[m]),u(m),m}})),Oo=vt(((e,t)=>{t.exports=Io()})),Lo=tn(Oo(),1);function To(e,t){return e===t}function se(e,t=s=>s,n){const s=n?.compare??To,i=(0,b.useCallback)(o=>{const{unsubscribe:a}=e.subscribe(o);return a},[e]),r=(0,b.useCallback)(()=>e.get(),[e]);return(0,Lo.useSyncExternalStoreWithSelector)(i,r,r,t,s)}var ls={};function wn(e,t){const n=b.useRef();return s=>{const i=e?.select?e.select(s):s;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=oe(n.current,i):i}}function Se(e){const t=N(),n=b.useContext(e.from?wo:Ge),s=e.from??n,i=t.stores.getMatchStore(s),r=wn(e,t),o=se(i,a=>a?r(a):ls);if(o!==ls)return o;(e.shouldThrow??!0)&&hn()}function ni(e){return Se({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function si(e){const{select:t,...n}=e;return Se({...n,select:s=>t?t(s.loaderDeps):s.loaderDeps})}function ii(e){return Se({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function ri(e){return Se({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Cn(e){const t=N();return b.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Il(e){const t=N(),n=Cn(),s=b.useRef(null);return cn(()=>{s.current!==e&&(n(e),s.current=e)},[t,e,n]),null}function oi(e){return Se({...e,select:t=>e.select?e.select(t.context):t.context})}function ko(...e){const t=b.useRef(e),n=t.current;return e.forEach((s,i)=>{te(n[i],s,!1,!0)||(n[i]=s)}),t.current}function Ze(e,t){e.preloadRoute(t).catch(n=>{console.warn(n),console.warn(ho)})}function Ao(e,t){const n=typeof e=="string"&&Ve(e);if(n)return t.has(n)?e:null}function Do(e,t,n,s){const i=jn(e.pathname,s),r=jn(t.pathname,s);return(n?.exact?i!==r:!(i.startsWith(r)&&(i.length===r.length||i[r.length]==="/")))||(n?.includeSearch??!0)&&!te(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function $o(e,t,n){const s=N(),i=b.useRef(null),r=b.useCallback(V=>{if(i.current=V,typeof t=="function")return t(V);t&&(t.current=V)},[t]),{activeOptions:o,to:a,preload:l,preloadDelay:u,disabled:c,target:f,onClick:h,onBlur:d,onFocus:g,onMouseEnter:p,onMouseLeave:v,onTouchStart:m}=e,[S,_,w]=ko(e.search,e.params,o),x=b.useContext(Ge),C=(s.stores._linkScopes??={})[x]??=_o(s,x),[y,R,P]=b.useMemo(()=>{const V=Ao(a,s.protocolAllowlist);if(V!==void 0){const J=[V??void 0];return[e,()=>J]}const U={...e};let Ue,Fe,Pi;const En=()=>{const J=C[0]();if(J!==Ue){U._fromLocation=J;const Mn=s.buildLocation(U),qe=Bo(Mn,s,c),Fn=c||qe&&!Ve(qe)?Do(J,Mn,w,s.basepath):void 0;(!Fe||Fe[0]!==qe||Fe[1]!==Fn)&&(Fe=[qe,Fn]),Ue=J}return Fe};return[U,En,w?.includeHash&&(()=>{const J=En();return J[1]?Pi??=[J[0],!1]:J})]},[s,C,e.from,e.hash,e.href,a,S,_,e.state,e.mask,e.unsafeRelative,w,c]),[I,E]=b.useSyncExternalStore(C[1],R,P||R),O=E===void 0&&I,T=c||I===void 0,k=b.useRef(!1),A=e.reloadDocument||O||T?!1:l??s.options.defaultPreload,$=u??s.options.defaultPreloadDelay??0,Ne=b.useCallback(V=>{const U=V?.isIntersecting;if(!(U??A==="intent")){U===!1&&et(i);return}if(!$){Ze(s,y);return}i.t??=setTimeout(()=>{i.t=void 0,Ze(s,y)},$)},[s,y,i,A,$]);b.useEffect(()=>{if(!A)return;A==="render"&&!k.current&&(k.current=!0,Ze(s,y));let V=!0,U;return A==="viewport"&&i.current&&typeof IntersectionObserver=="function"&&(U=new IntersectionObserver(Ue=>{V&&Ne(Ue.pop())},{rootMargin:"100px"}),U.observe(i.current)),()=>{V=!1,U?.disconnect(),et(i)}},[s,y,A,Ne,i]);const Q=jo(e,n);if(Q.ref=t?r:i,O)return Q.href=O,Q;const xi=V=>{const U=f??V.currentTarget.getAttribute("target");!T&&!(V.metaKey||V.altKey||V.ctrlKey||V.shiftKey)&&!V.defaultPrevented&&(!U||U==="_self")&&V.button===0&&(V.preventDefault(),et(i),s.navigate({...e,_fromLocation:y._fromLocation}))},bi=()=>{A==="intent"&&Ze(s,y)},Pn=()=>{A==="intent"&&et(i)};return Q.onClick=we(h,xi),Q.onBlur=we(d,Pn),Q.onFocus=we(g,Ne),Q.onMouseEnter=we(p,Ne),Q.onMouseLeave=we(v,Pn),Q.onTouchStart=we(m,bi),Ho(Q,e,E,I,T,n)}var Vo={},zo={className:"active"},ai=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function jo(e,t){const n={};for(const s in e)ai.has(s)||s==="type"&&t!==void 0||s==="disabled"&&t==="a"||(n[s]=e[s]);return n}function Ho(e,t,n,s,i,r){const{activeProps:o,inactiveProps:a,className:l,style:u,target:c}=t,f=Os(n?o:a,{})??(n?zo:Vo);Object.assign(e,f),e.href=s,r!=="a"&&(e.disabled=i),e.target=c;const h=f.style;(u||h)&&(e.style=u&&h?{...u,...h}:u||h);const d=f.className;return(l||d)&&(e.className=l?d?`${l} ${d}`:l:d),i&&(e.role="link",e["aria-disabled"]=!0),n&&(e["data-status"]="active",e["aria-current"]="page"),e}var et=e=>{clearTimeout(e.t),e.t=void 0},we=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function Bo(e,t,n){if(n)return;const s=e.maskedLocation??e,i=s.external?s.publicHref:t.history.createHref(s.publicHref)||"/";if(!((s.external||i!==s.publicHref)&&ks(i,t.protocolAllowlist)))return i}var li=b.memo(b.forwardRef((e,t)=>{const n=e._asChild||"a",s=$o(e,t,n),i=typeof e.children=="function"?e.children({isActive:s["data-status"]==="active"}):e.children;return b.createElement(n,s,i)}),Go);function Go(e,t){let n=0;for(const s in t)if(n++,e[s]!==t[s]&&(!ai.has(s)||!te(e[s],t[s],!1,!0)))return!1;for(const s in e)n--;return n===0}var No=class extends Ys{constructor(e){super(e),this.useMatch=t=>Se({...t,from:this.id}),this.useRouteContext=t=>oi({...t,from:this.id}),this.useSearch=t=>ri({...t,from:this.id}),this.useParams=t=>ii({...t,from:this.id}),this.useLoaderDeps=t=>si({...t,from:this.id}),this.useLoaderData=t=>ni({...t,from:this.id}),this.useNavigate=()=>Cn({from:this.fullPath}),this.Link=b.forwardRef((t,n)=>(0,L.jsx)(li,{ref:n,from:this.fullPath,...t}))}};function Uo(e){return new No(e)}var qo=class extends go{constructor(e){super(e),this.useMatch=t=>Se({...t,from:this.id}),this.useRouteContext=t=>oi({...t,from:this.id}),this.useSearch=t=>ri({...t,from:this.id}),this.useParams=t=>ii({...t,from:this.id}),this.useLoaderDeps=t=>si({...t,from:this.id}),this.useLoaderData=t=>ni({...t,from:this.id}),this.useNavigate=()=>Cn({from:this.fullPath}),this.Link=b.forwardRef((t,n)=>(0,L.jsx)(li,{ref:n,from:this.fullPath,...t}))}};function Ol(e){return new qo(e)}function Ll(e){return t=>{const n=Uo(t);return n.isRoot=!1,n}}function Tl(e,t){let n,s,i;const r=()=>(n||(i=void 0,n=e().then(a=>{n=void 0,o.preload=void 0,s=a[t??"default"]}).catch(a=>{n=void 0,i=a})),n),o=function(l){if(i){if(fr(i)&&typeof sessionStorage<"u"){const u=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(u))throw sessionStorage.setItem(u,"1"),window.location.reload(),new Promise(()=>{})}throw i}if(!s)if(Vn)Vn(r());else throw r();return b.createElement(s,l)};return o.preload=r,o}function Wo(e){const t=N(),n=`not-found-${se(t.stores.location,s=>s.pathname)}-${se(t.stores.status)}`;return(0,L.jsx)(_n,{getResetKey:()=>n,onCatch:(s,i)=>{if(Ee(s))e.onCatch?.(s,i);else throw s},errorComponent:({error:s})=>{if(Ee(s))return e.fallback?.(s);throw s},children:e.children})}function Ko(){return(0,L.jsx)("p",{children:"Not Found"})}function ui(e,t,n){return t.options.notFoundComponent?(0,L.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,L.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,L.jsx)(Ko,{})}function _t(e,t){const n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,L.jsx)(n,{}):null}var Qo=(e,t)=>e[0]===t[0]&&e[1]===t[1],ci=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n==="data-only"||!e.ssr,fi=b.memo(function({routeId:t}){const n=N(),s=n.stores.getMatchStore(t);return Jo(n,se(s))});function Jo(e,t){const n=e.routesById[t.routeId],s=_t(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,r=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,a=t.ssr===!1||t.ssr==="data-only",l=ci(e,n,t.ssr)&&(n.options.wrapInSuspense??s??(n.options.errorComponent?.preload||a));let u=(0,L.jsx)(Xo,{match:t});a&&(u=(0,L.jsx)(vo,{fallback:s,children:u})),o&&(u=(0,L.jsx)(Wo,{fallback:h=>{if(h.routeId??=t.routeId,h.routeId!==t.routeId)throw h;return b.createElement(o,h)},children:u})),i&&(u=(0,L.jsx)(_n,{getResetKey:()=>t,errorComponent:i,onCatch:(h,d)=>{if(Ee(h))throw h.routeId??=t.routeId,h;r?.(h,d)},children:u})),l&&(u=(0,L.jsx)(b.Suspense,{fallback:s,children:u}));const c=null,f=n.isRoot&&n.options.shellComponent;return f?(0,L.jsx)(Ge.Provider,{value:t.routeId,children:(0,L.jsxs)(f,{children:[u,c]})}):(0,L.jsxs)(Ge.Provider,{value:t.routeId,children:[u,c]})}var Xo=b.memo(function({match:t}){const n=N(),s=t.routeId,i=n.routesById[s],r=b.useMemo(()=>{const a=(i.options.remountDeps??n.options.defaultRemountDeps)?.({routeId:s,loaderDeps:t.loaderDeps,params:t._strictParams,search:t._strictSearch});return a?JSON.stringify(a):void 0},[s,t.loaderDeps,t._strictParams,t._strictSearch,i.options.remountDeps,n.options.defaultRemountDeps]),o=b.useMemo(()=>{const a=i.options.component??n.options.defaultComponent;return a?(0,L.jsx)(a,{},r):(0,L.jsx)(Yo,{})},[r,i.options.component,n.options.defaultComponent]);if(t.status==="pending"){if(n.ssr&&!ci(n,i,t.ssr))return o;if(n._tx)throw n._tx[5];return _t(n,i)}if(t.status==="notFound")return ui(n,i,t.error);if(t.status==="error")throw t.error;return o}),Yo=b.memo(function(){const t=N(),n=b.useContext(Ge);let s,i,r;{const a=t.stores.getMatchStore(n);[s,i]=se(a,l=>[!!l._notFound,l.error],{compare:Qo}),r=se(t.stores.ids,l=>l[l.indexOf(n)+1])}if(s)return ui(t,t.routesById[n],i);if(!r)return null;const o=(0,L.jsx)(fi,{routeId:r});return n==="__root__"?(0,L.jsx)(b.Suspense,{fallback:_t(t),children:o}):o});function hi(e,t){const n=e[1];e.length=0,n?.(t)}function Zo({t:e}){const t=N(),n=t._rendered??=[];return t.startTransition=(s,i)=>new Promise(r=>{hi(n,!1),n.push(i,r),e(t),b.startTransition(s)}),cn(()=>{const s=t.history.subscribe(t.load);t.updateLatestLocation();const i=t.latestLocation,r=t.buildLocation({to:i.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(X(i.publicHref)!==X(r.publicHref))return t.commitLocation({...r,replace:!0,ignoreBlocker:!0}),s;const o=t.stores.resolvedLocation.get();return o?.href===i.href&&o.state.__TSR_key===i.state.__TSR_key?n.push(t.stores.matches.get(),a=>{a&&t.emit({type:"onRendered",...St(o,o)})}):t._tx||t.load({sync:!0}).catch(console.error),s},[t,t.history]),null}function ea(){const e=N(),t=e.routesById[Ae],n=_t(e,t),s=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Zo,{t:b.useState()[1]}),e.ssr?(0,L.jsx)(us,{}):(0,L.jsx)(b.Suspense,{fallback:n,children:(0,L.jsx)(us,{})})]});return e.options.InnerWrap?(0,L.jsx)(e.options.InnerWrap,{children:s}):s}function us(){const e=N(),t=e._rendered,n=se(e.stores.matches,o=>t[0]??o),s=n[0],i=s?.routeId;cn(()=>{t[0]===n&&hi(t,!0)},[t,n]);const r=i?(0,L.jsx)(fi,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?r:(0,L.jsx)(_n,{getResetKey:()=>s,onCatch:void 0,children:r})}var ta=e=>({createMutableStore:as,createReadonlyStore:as,batch:Po}),kl=e=>new na(e),na=class extends Jr{constructor(e){super(e,ta)}};function sa({router:e,children:t,...n}){Ls(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const s=(0,L.jsx)(Zs.Provider,{value:e,children:t});return e.options.Wrap?(0,L.jsx)(e.options.Wrap,{children:s}):s}function Al({router:e,...t}){return(0,L.jsx)(sa,{router:e,...t,children:(0,L.jsx)(ea,{})})}function ia(e,t){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in e)return e;if(typeof e=="function"){const r=!!(t??!0);return{shouldBlockFn:async()=>r?await e():!1,enableBeforeUnload:r,withResolver:!1}}const n=!!(e.condition??!0),s=e.blockerFn;return{shouldBlockFn:async()=>n&&s!==void 0?await s():n,enableBeforeUnload:n,withResolver:s===void 0}}function Dl(e,t){const{shouldBlockFn:n,enableBeforeUnload:s=!0,disabled:i=!1,withResolver:r=!1}=ia(e,t),o=N(),{history:a}=o,[l,u]=b.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return b.useEffect(()=>{const c=async f=>{function h(m){const S=o.parseLocation(m),[,_,w]=o.getMatchedRoutes(S.pathname);return w===void 0?{routeId:"__notFound__",fullPath:S.pathname,pathname:S.pathname,params:_,search:o.options.parseSearch(m.search)}:{routeId:w.id,fullPath:w.fullPath,pathname:S.pathname,params:_,search:o.options.parseSearch(m.search)}}const d=h(f.currentLocation),g=h(f.nextLocation);if(d.routeId==="__notFound__"&&g.routeId!=="__notFound__")return!1;const p=await n({action:f.action,current:d,next:g});if(!r)return p;if(!p)return!1;const v=await new Promise(m=>{u({status:"blocked",current:d,next:g,action:f.action,proceed:()=>m(!1),reset:()=>m(!0)})});return u({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),v};return i?void 0:a.block({blockerFn:c,enableBeforeUnload:s})},[n,s,i,r,a,o]),l}function $l(e){const t=N({warn:e?.router===void 0}),n=e?.router||t;return se(n.stores.__store,wn(e,n))}function Vl(e){const t=N();return se(t.stores.location,wn(e,t))}function re(e,t){return typeof e=="function"?e(t):e}function q(e,t){return n=>{t.setState(s=>({...s,[e]:re(n,s[e])}))}}function wt(e){return e instanceof Function}function ra(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function oa(e,t){const n=[],s=i=>{i.forEach(r=>{n.push(r);const o=t(r);o!=null&&o.length&&s(o)})};return s(e),n}function M(e,t,n){let s=[],i;return r=>{let o;n.key&&n.debug&&(o=Date.now());const a=e(r);if(!(a.length!==s.length||a.some((u,c)=>s[c]!==u)))return i;s=a;let l;if(n.key&&n.debug&&(l=Date.now()),i=t(...a),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-o)*100)/100,c=Math.round((Date.now()-l)*100)/100,f=c/16,h=(d,g)=>{for(d=String(d);d.length<g;)d=" "+d;return d};console.info(`%c⏱ ${h(c,5)} /${h(u,5)} ms`,`
|
|
3
|
+
font-size: .6rem;
|
|
4
|
+
font-weight: bold;
|
|
5
|
+
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n?.key)}return i}}function F(e,t,n,s){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:s}}function aa(e,t,n,s){const i=()=>{var o;return(o=r.getValue())!=null?o:e.options.renderFallbackValue},r={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(s),renderValue:i,getContext:M(()=>[e,n,t,r],(o,a,l,u)=>({table:o,column:a,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),F(e.options,"debugCells","cell.getContext"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(r,n,t,e)},{}),r}function la(e,t,n,s){var i,r;const o={...e._getDefaultColumnDef(),...t},a=o.accessorKey;let l=(i=(r=o.id)!=null?r:a?typeof String.prototype.replaceAll=="function"?a.replaceAll(".","_"):a.replace(/\./g,"_"):void 0)!=null?i:typeof o.header=="string"?o.header:void 0,u;if(o.accessorFn?u=o.accessorFn:a&&(a.includes(".")?u=f=>{let h=f;for(const g of a.split(".")){var d;h=(d=h)==null?void 0:d[g]}return h}:u=f=>f[o.accessorKey]),!l)throw new Error;let c={id:`${String(l)}`,accessorFn:u,parent:s,depth:n,columnDef:o,columns:[],getFlatColumns:M(()=>[!0],()=>{var f;return[c,...(f=c.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},F(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:M(()=>[e._getOrderColumnsFn()],f=>{var h;return(h=c.columns)!=null&&h.length?f(c.columns.flatMap(d=>d.getLeafColumns())):[c]},F(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(c,e);return c}var j="debugHeaders";function cs(e,t,n){var s;let i={id:(s=n.id)!=null?s:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const r=[],o=a=>{a.subHeaders&&a.subHeaders.length&&a.subHeaders.map(o),r.push(a)};return o(i),r},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(r=>{r.createHeader==null||r.createHeader(i,e)}),i}var ua={createTable:e=>{e.getHeaderGroups=M(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,s,i)=>{var r,o;const a=(r=s?.map(c=>n.find(f=>f.id===c)).filter(Boolean))!=null?r:[],l=(o=i?.map(c=>n.find(f=>f.id===c)).filter(Boolean))!=null?o:[],u=n.filter(c=>!(s!=null&&s.includes(c.id))&&!(i!=null&&i.includes(c.id)));return tt(t,[...a,...u,...l],e)},F(e.options,j,"getHeaderGroups")),e.getCenterHeaderGroups=M(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,s,i)=>(n=n.filter(r=>!(s!=null&&s.includes(r.id))&&!(i!=null&&i.includes(r.id))),tt(t,n,e,"center")),F(e.options,j,"getCenterHeaderGroups")),e.getLeftHeaderGroups=M(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,s)=>{var i;return tt(t,(i=s?.map(r=>n.find(o=>o.id===r)).filter(Boolean))!=null?i:[],e,"left")},F(e.options,j,"getLeftHeaderGroups")),e.getRightHeaderGroups=M(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,s)=>{var i;return tt(t,(i=s?.map(r=>n.find(o=>o.id===r)).filter(Boolean))!=null?i:[],e,"right")},F(e.options,j,"getRightHeaderGroups")),e.getFooterGroups=M(()=>[e.getHeaderGroups()],t=>[...t].reverse(),F(e.options,j,"getFooterGroups")),e.getLeftFooterGroups=M(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),F(e.options,j,"getLeftFooterGroups")),e.getCenterFooterGroups=M(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),F(e.options,j,"getCenterFooterGroups")),e.getRightFooterGroups=M(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),F(e.options,j,"getRightFooterGroups")),e.getFlatHeaders=M(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,j,"getFlatHeaders")),e.getLeftFlatHeaders=M(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,j,"getLeftFlatHeaders")),e.getCenterFlatHeaders=M(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,j,"getCenterFlatHeaders")),e.getRightFlatHeaders=M(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,j,"getRightFlatHeaders")),e.getCenterLeafHeaders=M(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var s;return!((s=n.subHeaders)!=null&&s.length)}),F(e.options,j,"getCenterLeafHeaders")),e.getLeftLeafHeaders=M(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var s;return!((s=n.subHeaders)!=null&&s.length)}),F(e.options,j,"getLeftLeafHeaders")),e.getRightLeafHeaders=M(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var s;return!((s=n.subHeaders)!=null&&s.length)}),F(e.options,j,"getRightLeafHeaders")),e.getLeafHeaders=M(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,s)=>{var i,r,o,a,l,u;return[...(i=(r=t[0])==null?void 0:r.headers)!=null?i:[],...(o=(a=n[0])==null?void 0:a.headers)!=null?o:[],...(l=(u=s[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},F(e.options,j,"getLeafHeaders"))}};function tt(e,t,n,s){var i,r;let o=0;const a=function(f,h){h===void 0&&(h=1),o=Math.max(o,h),f.filter(d=>d.getIsVisible()).forEach(d=>{var g;(g=d.columns)!=null&&g.length&&a(d.columns,h+1)},0)};a(e);let l=[];const u=(f,h)=>{const d={depth:h,id:[s,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];f.forEach(p=>{const v=[...g].reverse()[0],m=p.column.depth===d.depth;let S,_=!1;if(m&&p.column.parent?S=p.column.parent:(S=p.column,_=!0),v&&v?.column===S)v.subHeaders.push(p);else{const w=cs(n,S,{id:[s,h,S.id,p?.id].filter(Boolean).join("_"),isPlaceholder:_,placeholderId:_?`${g.filter(x=>x.column===S).length}`:void 0,depth:h,index:g.length});w.subHeaders.push(p),g.push(w)}d.headers.push(p),p.headerGroup=d}),l.push(d),h>0&&u(g,h-1)};u(t.map((f,h)=>cs(n,f,{depth:o,index:h})),o-1),l.reverse();const c=f=>f.filter(h=>h.column.getIsVisible()).map(h=>{let d=0,g=0,p=[0];h.subHeaders&&h.subHeaders.length?(p=[],c(h.subHeaders).forEach(m=>{let{colSpan:S,rowSpan:_}=m;d+=S,p.push(_)})):d=1;const v=Math.min(...p);return g=g+v,h.colSpan=d,h.rowSpan=g,{colSpan:d,rowSpan:g}});return c((i=(r=l[0])==null?void 0:r.headers)!=null?i:[]),l}var ca=(e,t,n,s,i,r,o)=>{let a={id:t,index:s,original:n,depth:i,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return a._valuesCache[l]=u.accessorFn(a.original,s),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=u.columnDef.getUniqueValues(a.original,s),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=a.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:r??[],getLeafRows:()=>oa(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],u=a;for(;;){const c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:M(()=>[e.getAllLeafColumns()],l=>l.map(u=>aa(e,a,u,u.id)),F(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:M(()=>[a.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),F(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const u=e._features[l];u==null||u.createRow==null||u.createRow(a,e)}return a},fa={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},di=(e,t,n)=>{var s,i;const r=n==null||(s=n.toString())==null?void 0:s.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(r))};di.autoRemove=e=>K(e);var gi=(e,t,n)=>{var s;return!!(!((s=e.getValue(t))==null||(s=s.toString())==null)&&s.includes(n))};gi.autoRemove=e=>K(e);var pi=(e,t,n)=>{var s;return((s=e.getValue(t))==null||(s=s.toString())==null?void 0:s.toLowerCase())===n?.toLowerCase()};pi.autoRemove=e=>K(e);var mi=(e,t,n)=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(n)};mi.autoRemove=e=>K(e);var vi=(e,t,n)=>!n.some(s=>{var i;return!((i=e.getValue(t))!=null&&i.includes(s))});vi.autoRemove=e=>K(e)||!(e!=null&&e.length);var Si=(e,t,n)=>n.some(s=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(s)});Si.autoRemove=e=>K(e)||!(e!=null&&e.length);var yi=(e,t,n)=>e.getValue(t)===n;yi.autoRemove=e=>K(e);var _i=(e,t,n)=>e.getValue(t)==n;_i.autoRemove=e=>K(e);var Rn=(e,t,n)=>{let[s,i]=n;const r=e.getValue(t);return r>=s&&r<=i};Rn.resolveFilterValue=e=>{let[t,n]=e,s=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,r=t===null||Number.isNaN(s)?-1/0:s,o=n===null||Number.isNaN(i)?1/0:i;if(r>o){const a=r;r=o,o=a}return[r,o]};Rn.autoRemove=e=>K(e)||K(e[0])&&K(e[1]);var Z={includesString:di,includesStringSensitive:gi,equalsString:pi,arrIncludes:mi,arrIncludesAll:vi,arrIncludesSome:Si,equals:yi,weakEquals:_i,inNumberRange:Rn};function K(e){return e==null||e===""}var ha={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:q("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],s=n?.getValue(e.id);return typeof s=="string"?Z.includesString:typeof s=="number"?Z.inNumberRange:typeof s=="boolean"||s!==null&&typeof s=="object"?Z.equals:Array.isArray(s)?Z.arrIncludes:Z.weakEquals},e.getFilterFn=()=>{var n,s;return wt(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(s=t.options.filterFns)==null?void 0:s[e.columnDef.filterFn])!=null?n:Z[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,s,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((s=t.options.enableColumnFilters)!=null?s:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(s=>s.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,s;return(n=(s=t.getState().columnFilters)==null?void 0:s.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(s=>{const i=e.getFilterFn(),r=s?.find(c=>c.id===e.id),o=re(n,r?r.value:void 0);if(fs(i,o,e)){var a;return(a=s?.filter(c=>c.id!==e.id))!=null?a:[]}const l={id:e.id,value:o};if(r){var u;return(u=s?.map(c=>c.id===e.id?l:c))!=null?u:[]}return s!=null&&s.length?[...s,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),s=i=>{var r;return(r=re(t,i))==null?void 0:r.filter(o=>{const a=n.find(l=>l.id===o.id);return!(a&&fs(a.getFilterFn(),o.value,a))})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(s)},e.resetColumnFilters=t=>{var n,s;e.setColumnFilters(t?[]:(n=(s=e.initialState)==null?void 0:s.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function fs(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}var da=(e,t,n)=>n.reduce((s,i)=>{const r=i.getValue(e);return s+(typeof r=="number"?r:0)},0),ga=(e,t,n)=>{let s;return n.forEach(i=>{const r=i.getValue(e);r!=null&&(s>r||s===void 0&&r>=r)&&(s=r)}),s},pa=(e,t,n)=>{let s;return n.forEach(i=>{const r=i.getValue(e);r!=null&&(s<r||s===void 0&&r>=r)&&(s=r)}),s},ma=(e,t,n)=>{let s,i;return n.forEach(r=>{const o=r.getValue(e);o!=null&&(s===void 0?o>=o&&(s=i=o):(s>o&&(s=o),i<o&&(i=o)))}),[s,i]},va=(e,t)=>{let n=0,s=0;if(t.forEach(i=>{let r=i.getValue(e);r!=null&&(r=+r)>=r&&(++n,s+=r)}),n)return s/n},Sa=(e,t)=>{if(!t.length)return;const n=t.map(r=>r.getValue(e));if(!ra(n))return;if(n.length===1)return n[0];const s=Math.floor(n.length/2),i=n.sort((r,o)=>r-o);return n.length%2!==0?i[s]:(i[s-1]+i[s])/2},ya=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),_a=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,wa=(e,t)=>t.length,Et={sum:da,min:ga,max:pa,extent:ma,mean:va,median:Sa,unique:ya,uniqueCount:_a,count:wa},Ca={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:q("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(s=>s!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,s;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((s=t.options.enableGrouping)!=null?s:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],s=n?.getValue(e.id);if(typeof s=="number")return Et.sum;if(Object.prototype.toString.call(s)==="[object Date]")return Et.extent},e.getAggregationFn=()=>{var n,s;if(!e)throw new Error;return wt(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(s=t.options.aggregationFns)==null?void 0:s[e.columnDef.aggregationFn])!=null?n:Et[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,s;e.setGrouping(t?[]:(n=(s=e.initialState)==null?void 0:s.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const s=t.getColumn(n);return s!=null&&s.columnDef.getGroupingValue?(e._groupingValuesCache[n]=s.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,s)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function Ra(e,t,n){if(!(t!=null&&t.length)||!n)return e;const s=e.filter(i=>!t.includes(i.id));return n==="remove"?s:[...t.map(i=>e.find(r=>r.id===i)).filter(Boolean),...s]}var xa={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:q("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=M(n=>[$e(t,n)],n=>n.findIndex(s=>s.id===e.id),F(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var s;return((s=$e(t,n)[0])==null?void 0:s.id)===e.id},e.getIsLastColumn=n=>{var s;const i=$e(t,n);return((s=i[i.length-1])==null?void 0:s.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=M(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,s)=>i=>{let r=[];if(!(t!=null&&t.length))r=i;else{const o=[...t],a=[...i];for(;a.length&&o.length;){const l=o.shift(),u=a.findIndex(c=>c.id===l);u>-1&&r.push(a.splice(u,1)[0])}r=[...r,...a]}return Ra(r,n,s)},F(e.options,"debugTable","_getOrderColumnsFn"))}},Mt=()=>({left:[],right:[]}),ba={getInitialState:e=>({columnPinning:Mt(),...e}),getDefaultOptions:e=>({onColumnPinningChange:q("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const s=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var r,o;if(n==="right"){var a,l;return{left:((a=i?.left)!=null?a:[]).filter(f=>!(s!=null&&s.includes(f))),right:[...((l=i?.right)!=null?l:[]).filter(f=>!(s!=null&&s.includes(f))),...s]}}if(n==="left"){var u,c;return{left:[...((u=i?.left)!=null?u:[]).filter(f=>!(s!=null&&s.includes(f))),...s],right:((c=i?.right)!=null?c:[]).filter(f=>!(s!=null&&s.includes(f)))}}return{left:((r=i?.left)!=null?r:[]).filter(f=>!(s!=null&&s.includes(f))),right:((o=i?.right)!=null?o:[]).filter(f=>!(s!=null&&s.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(n=>{var s,i,r;return((s=n.columnDef.enablePinning)!=null?s:!0)&&((i=(r=t.options.enableColumnPinning)!=null?r:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:s,right:i}=t.getState().columnPinning,r=n.some(a=>s?.includes(a)),o=n.some(a=>i?.includes(a));return r?"left":o?"right":!1},e.getPinnedIndex=()=>{var n,s;const i=e.getIsPinned();return i?(n=(s=t.getState().columnPinning)==null||(s=s[i])==null?void 0:s.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=M(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,s,i)=>{const r=[...s??[],...i??[]];return n.filter(o=>!r.includes(o.column.id))},F(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=M(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,s)=>(s??[]).map(i=>n.find(r=>r.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),F(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=M(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,s)=>(s??[]).map(i=>n.find(r=>r.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),F(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,s;return e.setColumnPinning(t?Mt():(n=(s=e.initialState)==null?void 0:s.columnPinning)!=null?n:Mt())},e.getIsSomeColumnsPinned=t=>{var n;const s=e.getState().columnPinning;if(!t){var i,r;return!!((i=s.left)!=null&&i.length||(r=s.right)!=null&&r.length)}return!!((n=s[t])!=null&&n.length)},e.getLeftLeafColumns=M(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(s=>t.find(i=>i.id===s)).filter(Boolean),F(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=M(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(s=>t.find(i=>i.id===s)).filter(Boolean),F(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=M(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,s)=>{const i=[...n??[],...s??[]];return t.filter(r=>!i.includes(r.id))},F(e.options,"debugColumns","getCenterLeafColumns"))}};function Pa(e){return e||(typeof document<"u"?document:null)}var nt={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Ft=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Ea={getDefaultColumnDef:()=>nt,getInitialState:e=>({columnSizing:{},columnSizingInfo:Ft(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:q("columnSizing",e),onColumnSizingInfoChange:q("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,s,i;const r=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:nt.minSize,(s=r??e.columnDef.size)!=null?s:nt.size),(i=e.columnDef.maxSize)!=null?i:nt.maxSize)},e.getStart=M(n=>[n,$e(t,n),t.getState().columnSizing],(n,s)=>s.slice(0,e.getIndex(n)).reduce((i,r)=>i+r.getSize(),0),F(t.options,"debugColumns","getStart")),e.getAfter=M(n=>[n,$e(t,n),t.getState().columnSizing],(n,s)=>s.slice(e.getIndex(n)+1).reduce((i,r)=>i+r.getSize(),0),F(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:s,...i}=n;return i})},e.getCanResize=()=>{var n,s;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((s=t.options.enableColumnResizing)!=null?s:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const s=i=>{if(i.subHeaders.length)i.subHeaders.forEach(s);else{var r;n+=(r=i.column.getSize())!=null?r:0}};return s(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const s=t.getColumn(e.column.id),i=s?.getCanResize();return r=>{if(!s||!i||(r.persist==null||r.persist(),It(r)&&r.touches&&r.touches.length>1))return;const o=e.getSize(),a=e?e.getLeafHeaders().map(m=>[m.column.id,m.column.getSize()]):[[s.id,s.getSize()]],l=It(r)?Math.round(r.touches[0].clientX):r.clientX,u={},c=(m,S)=>{typeof S=="number"&&(t.setColumnSizingInfo(_=>{var w,x;const C=t.options.columnResizeDirection==="rtl"?-1:1,y=(S-((w=_?.startOffset)!=null?w:0))*C,R=Math.max(y/((x=_?.startSize)!=null?x:0),-.999999);return _.columnSizingStart.forEach(P=>{let[I,E]=P;u[I]=Math.round(Math.max(E+E*R,0)*100)/100}),{..._,deltaOffset:y,deltaPercentage:R}}),(t.options.columnResizeMode==="onChange"||m==="end")&&t.setColumnSizing(_=>({..._,...u})))},f=m=>c("move",m),h=m=>{c("end",m),t.setColumnSizingInfo(S=>({...S,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},d=Pa(n),g={moveHandler:m=>f(m.clientX),upHandler:m=>{d?.removeEventListener("mousemove",g.moveHandler),d?.removeEventListener("mouseup",g.upHandler),h(m.clientX)}},p={moveHandler:m=>(m.cancelable&&(m.preventDefault(),m.stopPropagation()),f(m.touches[0].clientX),!1),upHandler:m=>{var S;d?.removeEventListener("touchmove",p.moveHandler),d?.removeEventListener("touchend",p.upHandler),m.cancelable&&(m.preventDefault(),m.stopPropagation()),h((S=m.touches[0])==null?void 0:S.clientX)}},v=Ma()?{passive:!1}:!1;It(r)?(d?.addEventListener("touchmove",p.moveHandler,v),d?.addEventListener("touchend",p.upHandler,v)):(d?.addEventListener("mousemove",g.moveHandler,v),d?.addEventListener("mouseup",g.upHandler,v)),t.setColumnSizingInfo(m=>({...m,startOffset:l,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:s.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?Ft():(n=e.initialState.columnSizingInfo)!=null?n:Ft())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((s,i)=>s+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((s,i)=>s+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((s,i)=>s+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((s,i)=>s+i.getSize(),0))!=null?t:0}}},st=null;function Ma(){if(typeof st=="boolean")return st;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return st=e,st}function It(e){return e.type==="touchstart"}var Fa={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:q("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(s=>({...s,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,s;const i=e.columns;return(n=i.length?i.some(r=>r.getIsVisible()):(s=t.getState().columnVisibility)==null?void 0:s[e.id])!=null?n:!0},e.getCanHide=()=>{var n,s;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((s=t.options.enableHiding)!=null?s:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=M(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(s=>s.column.getIsVisible()),F(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=M(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,s,i)=>[...n,...s,...i],F(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,s)=>M(()=>[s(),s().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(r=>r.getIsVisible==null?void 0:r.getIsVisible()),F(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var s;e.setColumnVisibility(n?{}:(s=e.initialState.columnVisibility)!=null?s:{})},e.toggleAllColumnsVisible=n=>{var s;n=(s=n)!=null?s:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,r)=>({...i,[r.id]:n||!(r.getCanHide!=null&&r.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var s;e.toggleAllColumnsVisible((s=n.target)==null?void 0:s.checked)}}};function $e(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var Ia={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Oa={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:q("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const s=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof s=="string"||typeof s=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,s,i,r;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((s=t.options.enableGlobalFilter)!=null?s:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((r=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?r:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Z.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:s}=e.options;return wt(s)?s:s==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[s])!=null?t:Z[s]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},La={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:q("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var s,i;if(!t){e._queue(()=>{t=!0});return}if((s=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?s:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=s=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(s),e.toggleAllRowsExpanded=s=>{s??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=s=>{var i,r;e.setExpanded(s?{}:(i=(r=e.initialState)==null?void 0:r.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(s=>s.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>s=>{s.persist==null||s.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const s=e.getState().expanded;return s===!0||Object.values(s).some(Boolean)},e.getIsAllRowsExpanded=()=>{const s=e.getState().expanded;return typeof s=="boolean"?s===!0:!(!Object.keys(s).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let s=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const r=i.split(".");s=Math.max(s,r.length)}),s},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(s=>{var i;const r=s===!0?!0:!!(s!=null&&s[e.id]);let o={};if(s===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{o[a]=!0}):o=s,n=(i=n)!=null?i:!r,!r&&n)return{...o,[e.id]:!0};if(r&&!n){const{[e.id]:a,...l}=o;return l}return s})},e.getIsExpanded=()=>{var n;const s=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:s===!0||s?.[e.id])},e.getCanExpand=()=>{var n,s,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((s=t.options.enableExpanding)!=null?s:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,s=e;for(;n&&s.parentId;)s=t.getRow(s.parentId,!0),n=s.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Qt=0,Jt=10,Ot=()=>({pageIndex:Qt,pageSize:Jt}),Ta={getInitialState:e=>({...e,pagination:{...Ot(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:q("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var s,i;if(!t){e._queue(()=>{t=!0});return}if((s=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?s:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=s=>{const i=r=>re(s,r);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=s=>{var i;e.setPagination(s?Ot():(i=e.initialState.pagination)!=null?i:Ot())},e.setPageIndex=s=>{e.setPagination(i=>{let r=re(s,i.pageIndex);const o=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),{...i,pageIndex:r}})},e.resetPageIndex=s=>{var i,r;e.setPageIndex(s?Qt:(i=(r=e.initialState)==null||(r=r.pagination)==null?void 0:r.pageIndex)!=null?i:Qt)},e.resetPageSize=s=>{var i,r;e.setPageSize(s?Jt:(i=(r=e.initialState)==null||(r=r.pagination)==null?void 0:r.pageSize)!=null?i:Jt)},e.setPageSize=s=>{e.setPagination(i=>{const r=Math.max(1,re(s,i.pageSize)),o=i.pageSize*i.pageIndex,a=Math.floor(o/r);return{...i,pageIndex:a,pageSize:r}})},e.setPageCount=s=>e.setPagination(i=>{var r;let o=re(s,(r=e.options.pageCount)!=null?r:-1);return typeof o=="number"&&(o=Math.max(-1,o)),{...i,pageCount:o}}),e.getPageOptions=M(()=>[e.getPageCount()],s=>{let i=[];return s&&s>0&&(i=[...new Array(s)].fill(null).map((r,o)=>o)),i},F(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:s}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:s<i-1},e.previousPage=()=>e.setPageIndex(s=>s-1),e.nextPage=()=>e.setPageIndex(s=>s+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var s;return(s=e.options.pageCount)!=null?s:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var s;return(s=e.options.rowCount)!=null?s:e.getPrePaginationRowModel().rows.length}}},Lt=()=>({top:[],bottom:[]}),ka={getInitialState:e=>({rowPinning:Lt(),...e}),getDefaultOptions:e=>({onRowPinningChange:q("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,s,i)=>{const r=s?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],o=i?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],a=new Set([...o,e.id,...r]);t.setRowPinning(l=>{var u,c;if(n==="bottom"){var f,h;return{top:((f=l?.top)!=null?f:[]).filter(p=>!(a!=null&&a.has(p))),bottom:[...((h=l?.bottom)!=null?h:[]).filter(p=>!(a!=null&&a.has(p))),...Array.from(a)]}}if(n==="top"){var d,g;return{top:[...((d=l?.top)!=null?d:[]).filter(p=>!(a!=null&&a.has(p))),...Array.from(a)],bottom:((g=l?.bottom)!=null?g:[]).filter(p=>!(a!=null&&a.has(p)))}}return{top:((u=l?.top)!=null?u:[]).filter(p=>!(a!=null&&a.has(p))),bottom:((c=l?.bottom)!=null?c:[]).filter(p=>!(a!=null&&a.has(p)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:s,enablePinning:i}=t.options;return typeof s=="function"?s(e):(n=s??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:s,bottom:i}=t.getState().rowPinning,r=n.some(a=>s?.includes(a)),o=n.some(a=>i?.includes(a));return r?"top":o?"bottom":!1},e.getPinnedIndex=()=>{var n,s;const i=e.getIsPinned();if(!i)return-1;const r=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(o=>{let{id:a}=o;return a});return(s=r?.indexOf(e.id))!=null?s:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,s;return e.setRowPinning(t?Lt():(n=(s=e.initialState)==null?void 0:s.rowPinning)!=null?n:Lt())},e.getIsSomeRowsPinned=t=>{var n;const s=e.getState().rowPinning;if(!t){var i,r;return!!((i=s.top)!=null&&i.length||(r=s.bottom)!=null&&r.length)}return!!((n=s[t])!=null&&n.length)},e._getPinnedRows=(t,n,s)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(r=>{const o=e.getRow(r,!0);return o.getIsAllParentsExpanded()?o:null}):(n??[]).map(r=>t.find(o=>o.id===r))).filter(Boolean).map(r=>({...r,position:s}))},e.getTopRows=M(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),F(e.options,"debugRows","getTopRows")),e.getBottomRows=M(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),F(e.options,"debugRows","getBottomRows")),e.getCenterRows=M(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,s)=>{const i=new Set([...n??[],...s??[]]);return t.filter(r=>!i.has(r.id))},F(e.options,"debugRows","getCenterRows"))}},Aa={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:q("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const s={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(r=>{r.getCanSelect()&&(s[r.id]=!0)}):i.forEach(r=>{delete s[r.id]}),s})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const s=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(r=>{Xt(i,r.id,s,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=M(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Tt(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=M(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Tt(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=M(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Tt(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let s=!!(t.length&&Object.keys(n).length);return s&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(s=!1),s},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let s=!!t.length;return s&&t.some(i=>!n[i.id])&&(s=!1),s},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,s)=>{const i=e.getIsSelected();t.setRowSelection(r=>{var o;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return r;const a={...r};return Xt(a,e.id,n,(o=s?.selectChildren)!=null?o:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return xn(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Yt(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Yt(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return s=>{var i;n&&e.toggleSelected((i=s.target)==null?void 0:i.checked)}}}},Xt=(e,t,n,s,i)=>{var r;const o=i.getRow(t,!0);n?(o.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),o.getCanSelect()&&(e[t]=!0)):delete e[t],s&&(r=o.subRows)!=null&&r.length&&o.getCanSelectSubRows()&&o.subRows.forEach(a=>Xt(e,a.id,n,s,i))};function Tt(e,t){const n=e.getState().rowSelection,s=[],i={},r=function(o,a){return o.map(l=>{var u;const c=xn(l,n);if(c&&(s.push(l),i[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:r(l.subRows)}),c)return l}).filter(Boolean)};return{rows:r(t.rows),flatRows:s,rowsById:i}}function xn(e,t){var n;return(n=t[e.id])!=null?n:!1}function Yt(e,t,n){var s;if(!((s=e.subRows)!=null&&s.length))return!1;let i=!0,r=!1;return e.subRows.forEach(o=>{if(!(r&&!i)&&(o.getCanSelect()&&(xn(o,t)?r=!0:i=!1),o.subRows&&o.subRows.length)){const a=Yt(o,t);a==="all"?r=!0:(a==="some"&&(r=!0),i=!1)}}),i?"all":r?"some":!1}var Zt=/([0-9]+)/gm,Da=(e,t,n)=>wi(ce(e.getValue(n)).toLowerCase(),ce(t.getValue(n)).toLowerCase()),$a=(e,t,n)=>wi(ce(e.getValue(n)),ce(t.getValue(n))),Va=(e,t,n)=>bn(ce(e.getValue(n)).toLowerCase(),ce(t.getValue(n)).toLowerCase()),za=(e,t,n)=>bn(ce(e.getValue(n)),ce(t.getValue(n))),ja=(e,t,n)=>{const s=e.getValue(n),i=t.getValue(n);return s>i?1:s<i?-1:0},Ha=(e,t,n)=>bn(e.getValue(n),t.getValue(n));function bn(e,t){return e===t?0:e>t?1:-1}function ce(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function wi(e,t){const n=e.split(Zt).filter(Boolean),s=t.split(Zt).filter(Boolean);for(;n.length&&s.length;){const i=n.shift(),r=s.shift(),o=parseInt(i,10),a=parseInt(r,10),l=[o,a].sort();if(isNaN(l[0])){if(i>r)return 1;if(r>i)return-1;continue}if(isNaN(l[1]))return isNaN(o)?-1:1;if(o>a)return 1;if(a>o)return-1}return n.length-s.length}var Le={alphanumeric:Da,alphanumericCaseSensitive:$a,text:Va,textCaseSensitive:za,datetime:ja,basic:Ha},Ba={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:q("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let s=!1;for(const i of n){const r=i?.getValue(e.id);if(Object.prototype.toString.call(r)==="[object Date]")return Le.datetime;if(typeof r=="string"&&(s=!0,r.split(Zt).length>1))return Le.alphanumeric}return s?Le.text:Le.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,s;if(!e)throw new Error;return wt(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(s=t.options.sortingFns)==null?void 0:s[e.columnDef.sortingFn])!=null?n:Le[e.columnDef.sortingFn]},e.toggleSorting=(n,s)=>{const i=e.getNextSortingOrder(),r=typeof n<"u"&&n!==null;t.setSorting(o=>{const a=o?.find(d=>d.id===e.id),l=o?.findIndex(d=>d.id===e.id);let u=[],c,f=r?n:i==="desc";if(o!=null&&o.length&&e.getCanMultiSort()&&s?a?c="toggle":c="add":o!=null&&o.length&&l!==o.length-1?c="replace":a?c="toggle":c="replace",c==="toggle"&&(r||i||(c="remove")),c==="add"){var h;u=[...o,{id:e.id,desc:f}],u.splice(0,u.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=o.map(d=>d.id===e.id?{...d,desc:f}:d):c==="remove"?u=o.filter(d=>d.id!==e.id):u=[{id:e.id,desc:f}];return u})},e.getFirstSortDir=()=>{var n,s;return((n=(s=e.columnDef.sortDescFirst)!=null?s:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var s,i;const r=e.getFirstSortDir(),o=e.getIsSorted();return o?o!==r&&((s=t.options.enableSortingRemoval)==null||s)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:o==="desc"?"asc":"desc":r},e.getCanSort=()=>{var n,s;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((s=t.options.enableSorting)!=null?s:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,s;return(n=(s=e.columnDef.enableMultiSort)!=null?s:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const s=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return s?s.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,s;return(n=(s=t.getState().sorting)==null?void 0:s.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(s=>s.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return s=>{n&&(s.persist==null||s.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(s):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,s;e.setSorting(t?[]:(n=(s=e.initialState)==null?void 0:s.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Ga=[ua,Fa,xa,ba,fa,ha,Ia,Oa,Ba,Ca,La,Ta,ka,Aa,Ea];function Na(e){var t,n;const s=[...Ga,...(t=e._features)!=null?t:[]];let i={_features:s};const r=i._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(i)),{}),o=f=>i.options.mergeOptions?i.options.mergeOptions(r,f):{...r,...f};let a={...(n=e.initialState)!=null?n:{}};i._features.forEach(f=>{var h;a=(h=f.getInitialState==null?void 0:f.getInitialState(a))!=null?h:a});const l=[];let u=!1;const c={_features:s,options:{...r,...e},initialState:a,_queue:f=>{l.push(f),u||(u=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();u=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{i.setState(i.initialState)},setOptions:f=>{const h=re(f,i.options);i.options=o(h)},getState:()=>i.options.state,setState:f=>{i.options.onStateChange==null||i.options.onStateChange(f)},_getRowId:(f,h,d)=>{var g;return(g=i.options.getRowId==null?void 0:i.options.getRowId(f,h,d))!=null?g:`${d?[d.id,h].join("."):h}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(f,h)=>{let d=(h?i.getPrePaginationRowModel():i.getRowModel()).rowsById[f];if(!d&&(d=i.getCoreRowModel().rowsById[f],!d))throw new Error;return d},_getDefaultColumnDef:M(()=>[i.options.defaultColumn],f=>{var h;return f=(h=f)!=null?h:{},{header:d=>{const g=d.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:d=>{var g,p;return(g=(p=d.renderValue())==null||p.toString==null?void 0:p.toString())!=null?g:null},...i._features.reduce((d,g)=>Object.assign(d,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...f}},F(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>i.options.columns,getAllColumns:M(()=>[i._getColumnDefs()],f=>{const h=function(d,g,p){return p===void 0&&(p=0),d.map(v=>{const m=la(i,v,p,g),S=v;return m.columns=S.columns?h(S.columns,m,p+1):[],m})};return h(f)},F(e,"debugColumns","getAllColumns")),getAllFlatColumns:M(()=>[i.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),F(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:M(()=>[i.getAllFlatColumns()],f=>f.reduce((h,d)=>(h[d.id]=d,h),{}),F(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:M(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(f,h)=>h(f.flatMap(d=>d.getLeafColumns())),F(e,"debugColumns","getAllLeafColumns")),getColumn:f=>i._getAllFlatColumnsById()[f]};Object.assign(i,c);for(let f=0;f<i._features.length;f++){const h=i._features[f];h==null||h.createTable==null||h.createTable(i)}return i}function zl(){return e=>M(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},s=function(i,r,o){r===void 0&&(r=0);const a=[];for(let u=0;u<i.length;u++){const c=ca(e,e._getRowId(i[u],u,o),i[u],u,r,void 0,o?.id);if(n.flatRows.push(c),n.rowsById[c.id]=c,a.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(i[u],u),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=s(c.originalSubRows,r+1,c))}}return a};return n.rows=s(t),n},F(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function jl(){return e=>M(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const s=e.getState().sorting,i=[],r=s.filter(l=>{var u;return(u=e.getColumn(l.id))==null?void 0:u.getCanSort()}),o={};r.forEach(l=>{const u=e.getColumn(l.id);u&&(o[l.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const a=l=>{const u=l.map(c=>({...c}));return u.sort((c,f)=>{for(let d=0;d<r.length;d+=1){var h;const g=r[d],p=o[g.id],v=p.sortUndefined,m=(h=g?.desc)!=null?h:!1;let S=0;if(v){const _=c.getValue(g.id),w=f.getValue(g.id),x=_===void 0,C=w===void 0;if(x||C){if(v==="first")return x?-1:1;if(v==="last")return x?1:-1;S=x&&C?0:x?v:-v}}if(S===0&&(S=p.sortingFn(c,f,g.id)),S!==0)return m&&(S*=-1),p.invertSorting&&(S*=-1),S}return c.index-f.index}),u.forEach(c=>{var f;i.push(c),(f=c.subRows)!=null&&f.length&&(c.subRows=a(c.subRows))}),u};return{rows:a(n.rows),flatRows:i,rowsById:n.rowsById}},F(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function Hl(e,t){return e?Ua(e)?b.createElement(e,t):e:null}function Ua(e){return qa(e)||typeof e=="function"||Wa(e)}function qa(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Wa(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Bl(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=b.useState(()=>({current:Na(t)})),[s,i]=b.useState(()=>n.current.initialState);return n.current.setOptions(r=>({...r,...e,state:{...s,...e.state},onStateChange:o=>{i(o),e.onStateChange==null||e.onStateChange(o)}})),n.current}var Ka=tn(Ei(),1);function Qa(e){return typeof e=="object"?e.key:e}function Ja(e,t){const n=e.length;return new Proxy(e,{get(s,i,r){if(typeof i=="string"){const o=i.charCodeAt(0);if(o>=48&&o<=57){const a=+i;if(Number.isInteger(a)&&a>=0&&a<n){let l=s[a];if(typeof l!="object"){const u=t[a*2];l=s[a]={index:a,key:l,start:u,size:t[a*2+1],end:u+t[a*2+1],lane:0}}return l}}if(i==="length")return n}return Reflect.get(s,i,r)}})}function Ce(e,t,n){let s=n.initialDeps??[],i,r=!0;function o(){const a=e();return(a.length!==s.length||a.some((l,u)=>s[u]!==l))&&(s=a,i=t(...a),n?.onChange&&!(r&&n.skipInitialOnChange)&&n.onChange(i),r=!1),i}return o.updateDeps=a=>{s=a},o}function hs(e,t){if(e===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return e}var fe=(e,t)=>Math.abs(e-t)<1.01,Xa=(e,t,n)=>{let s;return Object.assign(function(...i){e.clearTimeout(s),s=e.setTimeout(()=>t.apply(this,i),n)},{cancel:()=>{e.clearTimeout(s)}})};function Ya({offset:e,isScrolling:t,elementMax:n,holdOffset:s,scrollOffset:i,pendingWrite:r,clampedMaxAtWrite:o}){var a;return t&&r===null&&e===i?"spurious":r!==null&&Math.abs(e-r.target)<1.5?"readBack":r!==null&&!r.smooth&&n!==null&&r.target>n+s+.5&&Math.abs(e-(n+s))<1.5||r!==null&&!r.smooth&&((a=r.lowMaxes)!=null&&a.some(l=>Math.abs(e-l)<1.5))?"clampedReadBack":o!==null&&Math.abs(e-o)<1.5?"clampedEcho":"external"}var Za=e=>e==="smooth"||e==="smoothFinishing";function el({kind:e,offset:t,command:n,target:s}){return e!=="spurious"&&e!=="readBack"&&e!=="clampedReadBack"&&n?.index!=null&&n.phase!=="queued"&&!Za(n.phase)&&!fe(t,n.lastTargetOffset)&&!fe(t,s())&&e!=="clampedEcho"}var en=40;function tl(e){const t=e[e.length-1];if(t===void 0)return!1;let n=e.length-2;for(;n>=0&&t.t-e[n].t<en;)n--;if(n<0)return!1;const s=e[n];let i=n-1;for(;i>=0&&s.t-e[i].t<en;)i--;if(i<0)return!1;const r=e[i],o=(t.offset-s.offset)/(t.t-s.t),a=(s.offset-r.offset)/(s.t-r.t);return o*a>=0&&Math.abs(o)>=2*Math.abs(a)&&Math.abs(o)-Math.abs(a)>=.8}function nl(e){const t=e[e.length-1];if(t===void 0)return!1;let n=e.length-2;for(;n>=0&&t.t-e[n].t<en;)n--;if(n<0)return!1;const s=e[n];return Math.abs(t.offset-s.offset)/(t.t-s.t)>=.05}var Te,mt=()=>{if(Te!==void 0)return Te;if(typeof navigator>"u")return Te=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Te=!0;const e=navigator.maxTouchPoints;return Te=navigator.platform==="MacIntel"&&e!==void 0&&e>0},kt,sl=()=>kt!==void 0?kt:kt=mt()&&typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("overflow-anchor: auto"),il=()=>!mt()||sl(),Re={capture:!0,passive:!0},rl=class{constructor(e){this.host=e,this._touch=null,this.inMotion=()=>this._touch!==null&&this._touch.phase!=="lateFling",this.dragging=()=>{var t;return((t=this._touch)==null?void 0:t.phase)==="down"&&this._touch.moved},this.tail=()=>{var t;return((t=this._touch)==null?void 0:t.phase)==="tail"?this._touch.moved?"fling":"tap":null},this.onScroll=({isScrolling:t,ownReadBack:n,moved:s,external:i})=>{var r,o,a;return t&&((r=this._touch)==null?void 0:r.phase)==="tail"?this._openTail(this._touch.moved||!n,!1):((o=this._touch)==null?void 0:o.phase)==="lateFling"&&(this.host.now()>this._touch.until?this._touch=null:i&&t&&s&&this._openTail(!0,!1)),!n&&t&&s&&((a=this._touch)==null?void 0:a.phase)==="down"?(this._touch.moved=!0,!0):!1},this.touchStart=()=>{this.end(),this._touch={phase:"down",moved:!1}},this.touchEnd=()=>{var t;const n=((t=this._touch)==null?void 0:t.phase)==="down"&&this._touch.moved;this.end(),this._openTail(n,n)},this.end=()=>{var t;const n=this.host.getWindow();((t=this._touch)==null?void 0:t.phase)==="tail"&&n!=null&&n.clearTimeout(this._touch.timerId),this._touch=null},this.listen=t=>{const n=()=>this.touchStart(),s=()=>this.touchEnd();return t.addEventListener("touchstart",n,Re),t.addEventListener("touchend",s,Re),t.addEventListener("touchcancel",s,Re),()=>{t.removeEventListener("touchstart",n,Re),t.removeEventListener("touchend",s,Re),t.removeEventListener("touchcancel",s,Re),this.end()}},this._openTail=(t,n)=>{const s=this.host.getWindow();if(s==null)return;this.end();const i={phase:"tail",moved:t,awaitingFling:n,timerId:s.setTimeout(()=>{if(this.host.tailStillMoving()){this._openTail(i.moved,i.awaitingFling);return}this._touch=i.awaitingFling?{phase:"lateFling",until:this.host.now()+1e3}:null,this.host.onTailClosed()},150)};this._touch=i}}get touch(){return this._touch}},ds=e=>{const{clientWidth:t,clientHeight:n}=e;return{width:t,height:n}},Ci=e=>{const t=new Set;return{schedule:n=>{const s=e.requestAnimationFrame(()=>{t.delete(s),n()});t.add(s)},cancel:()=>{t.forEach(n=>e.cancelAnimationFrame(n)),t.clear()}}},ol=e=>e,al=e=>{const t=e.overscan*Math.max(e.lanes??1,1),n=Math.max(e.startIndex-t,0),s=Math.min(e.endIndex+t,e.count-1)-n+1,i=new Array(s);for(let r=0;r<s;r++)i[r]=n+r;return i},ll=(e,t)=>{const n=e.scrollElement;if(!n)return;const s=e.targetWindow;if(!s)return;const i=a=>{const{width:l,height:u}=a;t({width:Math.round(l),height:Math.round(u)})};if(i(ds(n)),!s.ResizeObserver)return()=>{};const r=Ci(s),o=new s.ResizeObserver(()=>{const a=()=>{i(ds(n))};e.options.useAnimationFrameWithResizeObserver?r.schedule(a):a()});return o.observe(n,{box:"content-box"}),()=>{o.unobserve(n),r.cancel()}},gs={passive:!0},ul=typeof window>"u"?!0:"onscrollend"in window,cl=(e,t,n)=>{const s=e.scrollElement;if(!s)return;const i=e.targetWindow;if(!i)return;const r=e.options.useScrollendEvent&&ul;let o=0;const a=r?null:Xa(i,()=>t(n(s),!1),e.options.isScrollingResetDelay),l=f=>()=>{o=n(s),a?.(),t(o,f)},u=l(!0),c=l(!1);return s.addEventListener("scroll",u,gs),r&&s.addEventListener("scrollend",c,gs),()=>{s.removeEventListener("scroll",u),r&&s.removeEventListener("scrollend",c),a?.cancel()}},fl=(e,t)=>cl(e,t,n=>{const{horizontal:s,isRtl:i}=e.options;return s?n.scrollLeft*(i&&-1||1):n.scrollTop}),hl=(e,t,n)=>{if(n.options.useCachedMeasurements){const s=n.indexFromElement(e),i=n.options.getItemKey(s);return n.itemSizeCache.get(i)??n.options.estimateSize(s)}if(t?.borderBoxSize){const s=t.borderBoxSize[0];if(s)return Math.round(s[n.options.horizontal?"inlineSize":"blockSize"])}if(!t){const s=n.indexFromElement(e),i=n.options.getItemKey(s),r=n.itemSizeCache.get(i);if(r!==void 0)return r}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},dl=(e,{adjustments:t=0,behavior:n},s)=>{var i,r;(r=(i=s.scrollElement)==null?void 0:i.scrollTo)==null||r.call(i,{[s.options.horizontal?"left":"top"]:e+t,behavior:n})},gl=dl,ps=(e,t)=>e==="smooth"?t?"smoothLanded":"smooth":"instant",ke=e=>e?.phase==="smooth"||e?.phase==="smoothLanded";function pl(e,t,n,s){if(t===0)return!1;const i=s(0),r=new Set;let o=0;for(;o<e;){const l=n(o);if(l===i)break;r.add(l),o++}const a=e-o;if(a===0||a>=t)return!1;for(let l=0;l<a;l++)if(s(l)!==n(o+l))return!1;for(let l=a;l<t;l++)if(r.has(s(l)))return!1;return!0}var ml=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._iosGesture=new rl({getWindow:()=>this.targetWindow,now:()=>this.now(),tailStillMoving:()=>{const t=this.scrollState;if(t?.phase!=="queued"||this.pendingWrite!==null)return!1;const n=this._readElementOffset();return n===null||this._lastElementOffset===null||Math.abs(n-this._lastElementOffset)<1?!1:(this._lastElementOffset=n,t.samples=[...t.samples??[],{t:this.now(),offset:n}],!0)},onTailClosed:()=>{const t=this.scrollState;t?.phase==="queued"&&nl(t.samples??[])&&(this.scrollState=null),this._flushHoldIfReady(!0),this._writeAwaitingCommand(),this._retryClampedAdjustment()}}),this._lastElementOffset=null,this.pendingWrite=null,this._clampedAdjustment=null,this.elementsCache=new Map,this._resizeBatch=null,this.now=()=>{var t,n,s;return((s=(n=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:n.now)==null?void 0:s.call(n))??Date.now()},this.observer=(()=>{let t=null,n=null,s=!1,i=!1;const r=new Set,o=()=>{if(t)return t;const l=this.targetWindow;if(!l||!l.ResizeObserver)return null;const u=n=Ci(l);return t=new l.ResizeObserver(c=>{const f=()=>{const h={sync:!1};this._resizeBatch=h;try{c.forEach(a)}finally{this._resizeBatch=null,h.notify&&(this.notify(h.sync),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment(),this.measureElement(null))}};if(this.options.useAnimationFrameWithResizeObserver)u.schedule(f);else{s=!0;try{f()}finally{s=!1}}})},a=l=>{const u=l.target,c=this.indexFromElement(u);if(!u.isConnected){this.observer.unobserve(u);for(const[f,h]of this.elementsCache)if(h===u){this.elementsCache.delete(f);break}return}this.isIndexInRange(c)&&this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(u,l,this))};return{disconnect:()=>{var l;(l=o())==null||l.disconnect(),n?.cancel(),r.clear(),i=!1,t=null,n=null},observe:l=>{const u=o();if(u){if(!s){u.observe(l,{box:"border-box"});return}r.add(l),i||(i=!0,n?.schedule(()=>{i=!1,r.forEach(c=>{c.isConnected&&t?.observe(c,{box:"border-box"})}),r.clear()}))}},unobserve:l=>{var u;r.delete(l),(u=o())==null||u.unobserve(l)}}})(),this.range=null,this.setOptions=t=>{var n;const s={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:ol,rangeExtractor:al,onChange:()=>{},measureElement:hl,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const u in t){const c=t[u];c!==void 0&&(s[u]=c)}const i=this.options;let r=null,o=null,a=!1;if(i!==void 0&&i.enabled&&s.enabled&&s.anchorTo==="end"&&this.scrollElement!==null){const u=i.count,c=s.count,f=this.getMeasurements(),h=((n=this._singleLaneMeasurements)==null?void 0:n.items)??f,d=v=>Qa(h[v]),g=u>0?d(0):null,p=u>0?d(u-1):null;if(c!==u||u>0&&c>0&&(s.getItemKey(0)!==g||s.getItemKey(c-1)!==p)){a=!0;const v=u>0?this.getVirtualItemForOffset(this.getScrollOffset())??f[0]:null;v&&(r=[v.key,this.getScrollOffset()-v.start]);const m=s.followOnAppend===!0?"auto":s.followOnAppend||null;m&&c>0&&this.isAtEnd(i.scrollEndThreshold)&&(u===0||s.getItemKey(c-1)!==p)&&(c>u||pl(u,c,d,s.getItemKey))&&(o=m)}}this.options=s,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let l=null;if(r&&this.scrollOffset!==null&&!this._awaitingCommandReadBack()){const[u,c]=r,f=this.getMeasurements(),{count:h,getItemKey:d}=this.options;let g=0;for(;g<h&&d(g)!==u;)g++;if(g<h){const p=f[g];if(p){const v=Math.max(0,p.start+c);!o&&v!==this.scrollOffset&&(l=v-this.scrollOffset,this.scrollOffset=v)}}}o?this.pendingScrollAnchor={kind:"follow",behavior:o}:l!==null&&(this._canWriteScroll()?this.pendingScrollAnchor={kind:"anchor",delta:l}:(this._holdOffset+=l,this._followOffsetTarget(l)))},this.notify=t=>{var n,s;(s=(n=this.options).onChange)==null||s.call(n,this,t)},this.maybeNotify=Ce(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{var t;this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,(t=this._momentumStop)==null||t.restore(),this._momentumStop=null,this.isScrolling=!1,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._clampedAdjustment=null,this.pendingWrite=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,r)=>{var o,a,l,u;const c=r?this._elementMaxScrollOffset():null,f=this._reportedOverscroll;this._reportedOverscroll=i<0||c!==null&&i>c+1;const h=i;this._lastElementOffset=h,i=this._toLayoutOffset(i);const d=this._classifyScrollEvent(i,r,c);if(d==="spurious")return;d==="readBack"?i=this.pendingWrite.target:d==="clampedReadBack"&&((o=this.scrollState)==null?void 0:o.index)!=null&&i<this.getMaxScrollOffset()-1.5?this.scrollState.lastTargetOffset=i:el({kind:d,offset:i,command:this.scrollState,target:()=>this.getScrollStateTarget(this.scrollState)})&&(this.scrollState=null),this.pendingWrite=null,this._clampedAdjustment!==null&&Math.abs(i-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null);const g=this.getScrollOffset(),p=this.scrollDirection;this.scrollDirection=r?g===i?this.scrollDirection:g<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=r;const v=this.scrollState;if(v?.phase==="queued"&&d==="external"&&r)if(f||this._reportedOverscroll)v.samples=[];else{const m=this.now();v.samples=[...(v.samples??[]).filter(S=>m-S.t<=200),{t:m,offset:h}],(p!==null&&this.scrollDirection!==p||tl(v.samples))&&(this.scrollState=null)}this._iosGesture.onScroll({isScrolling:r,ownReadBack:d==="readBack",moved:i!==g,external:d==="external"&&((a=this.scrollState)==null?void 0:a.phase)!=="smooth"&&((l=this.scrollState)==null?void 0:l.phase)!=="smoothFinishing"})&&((u=this.scrollState)==null?void 0:u.phase)==="queued"&&(this.scrollState=null),this._flushHoldIfReady(!0),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement&&this.unsubs.push(this._iosGesture.listen(this.scrollElement)),this._scrollToOffset(this.getScrollOffset())}this._noteClampMax();const s=this.pendingScrollAnchor;this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled&&(s.kind==="anchor"?this._canWriteScroll()?ke(this.scrollState)&&!fe(this.getScrollOffset()-s.delta,this.scrollState.lastTargetOffset)||(this._followOffsetTarget(s.delta),this._scrollToOffset(this.getScrollOffset())):(this._holdOffset+=s.delta,this._followOffsetTarget(s.delta),this.notify(!1)):this.scrollToEnd({behavior:s.behavior})),this._flushHoldIfReady(!1),this._retryClampedAdjustment()},this._classifyScrollEvent=(t,n,s)=>{var i;return Ya({offset:t,isScrolling:n,elementMax:s,holdOffset:this._holdOffset,scrollOffset:this.scrollOffset,pendingWrite:this.pendingWrite,clampedMaxAtWrite:((i=this._clampedAdjustment)==null?void 0:i.maxAtWrite)??null})},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled||!this._canWriteScroll())return;const{target:t,maxAtWrite:n}=this._clampedAdjustment,s=this.getMaxScrollOffset();s>n+.5&&(this._clampedAdjustment=t>s+.5?{target:t,maxAtWrite:s}:null,this._scrollToOffset(t))},this._writeAwaitingCommand=()=>{const t=this.scrollState;if(t===null||t.phase!=="queued")return;const{behavior:n}=t;this.getMeasurements();const s=this.getScrollStateTarget(t);t.lastTargetOffset=s,this._clampedAdjustment=null,t.phase=ps(n,t.index!=null&&fe(s,this.getScrollOffset())),this._scrollToOffset(s,{behavior:n}),this.scheduleScrollReconcile()},this._readElementOffset=()=>{const t=this.scrollElement;if(t==null)return null;const{horizontal:n,isRtl:s}=this.options;return typeof t.scrollTop=="number"?n?t.scrollLeft*(s&&-1||1):t.scrollTop:typeof t.scrollY=="number"?n?t.scrollX:t.scrollY:null},this._canWriteScroll=()=>!(mt()&&this._iosGesture.inMotion())&&!this._reportedOverscroll,this._flushHoldIfReady=t=>{var n;if(this._holdOffset===0||!this.scrollElement||!this.options.enabled||!this._canWriteScroll()||((n=this.scrollState)==null?void 0:n.phase)==="smooth")return;this._holdOffset=0,this.scrollOffset!==null&&this.scrollOffset<0&&(this.scrollOffset=0),this.notify(t);const s=this.getCommandWrittenOffset()??this.getScrollOffset();this._clampedAdjustment=this._clampedBy(s),this._scrollToOffset(s)},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=Ce(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,n,s,i,r,o,a,l)=>(this.prevLanes!==void 0&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMin=null,{count:t,paddingStart:n,scrollMargin:s,getItemKey:i,enabled:r,lanes:o,laneAssignmentMode:a,gap:l}),{key:!1}),this.isIndexInRange=t=>t>=0&&t<this.options.count,this.getMeasurements=Ce(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:n,scrollMargin:s,getItemKey:i,enabled:r,lanes:o,laneAssignmentMode:a,gap:l},u)=>{var c;const f=this.itemSizeCache;if(!r)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const m of this.laneAssignments.keys())m>=t&&this.laneAssignments.delete(m);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(m=>{this.itemSizeCache.set(m.key,m.size)}));const h=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),o===1){const m=t*2;let S=(c=this._singleLaneMeasurements)==null?void 0:c.flat;if(!S||S.length<m){const C=new Float64Array(m);S&&h>0&&C.set(S.subarray(0,h*2)),S=C}const _=h===0?new Array(t):this._singleLaneMeasurements.items.slice();let w;if(h===0)w=n+s;else{const C=h-1;w=S[C*2]+S[C*2+1]+l}for(let C=h;C<t;C++){const y=i(C);_[C]=y;const R=f.get(y),P=typeof R=="number"?R:this.options.estimateSize(C);S[C*2]=w,S[C*2+1]=P,w+=P+l}this._singleLaneMeasurements={flat:S,items:_};const x=Ja(_,S);return this.measurementsCache=x,x}const d=this.measurementsCache.slice(0,h),g=new Array(o).fill(void 0),p=new Float64Array(o);let v=0;for(let m=0;m<h;m++){const S=d[m];S&&(g[S.lane]===void 0&&v++,g[S.lane]=m,p[S.lane]=S.end)}for(let m=h;m<t;m++){const S=i(m),_=this.laneAssignments.get(m);let w,x;const C=a==="estimate"||f.has(S);if(_!==void 0&&this.options.lanes>1){w=_;const I=g[w],E=I!==void 0?d[I]:void 0;x=E?E.end+l:n+s}else if(v===o){let I=0,E=p[0],O=g[0];for(let T=1;T<o;T++){const k=p[T];(k<E||k===E&&g[T]<O)&&(I=T,E=k,O=g[T])}w=I,x=E+l,C&&this.laneAssignments.set(m,w)}else w=m%this.options.lanes,x=n+s,C&&this.laneAssignments.set(m,w);const y=f.get(S),R=typeof y=="number"?y:this.options.estimateSize(m),P=x+R;d[m]={index:m,start:x,size:R,end:P,key:S,lane:w},g[w]===void 0&&v++,g[w]=m,p[w]=P}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Ce(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes,this._getLayoutTotalSize()+this.options.scrollMargin],(t,n,s,i,r)=>{if(t.length===0||n===0)return this.range=null,null;const o=Math.max(r-n,0);return this.range=Sl(t,n,Math.min(s,o),i,i===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range},{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Ce(()=>{let t=null,n=null;const s=this.calculateRange();return s&&(t=s.startIndex,n=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,n,this.options.lanes]},(t,n,s,i,r,o)=>i===null||r===null?[]:t({startIndex:i,endIndex:r,overscan:n,count:s,lanes:o}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const n=this.options.indexAttribute,s=t.getAttribute(n);return s?parseInt(s,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var n;if(!ke(this.scrollState))return!0;const s=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(s!==void 0&&this.range){const i=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,s-i),o=Math.min(this.options.count-1,s+i);return t>=r&&t<=o}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((r,o)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(o))});return}const n=this.indexFromElement(t);if(!this.isIndexInRange(n))return;const s=this.options.getItemKey(n),i=this.elementsCache.get(s);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(s,t)),t.isConnected&&(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,n)=>{var s,i,r;if(!this.isIndexInRange(t))return;(s=this._resizeBatch)!=null&&s.sync&&this.getMeasurements();let o,a,l;const u=(i=this._singleLaneMeasurements)==null?void 0:i.flat;if(this.options.lanes===1&&u!=null)l=this.options.getItemKey(t),a=u[t*2],o=u[t*2+1];else{const h=this.measurementsCache[t];if(!h)return;l=h.key,a=h.start,o=h.size}const c=this.itemSizeCache.get(l)??o,f=n-c;if(f!==0){const h=this.options.anchorTo==="end"&&!ke(this.scrollState)&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,d=h?this._getLayoutTotalSize():0,g=this.getScrollOffset(),p=this.itemSizeCache.has(l)?a+c<=g&&this.scrollDirection!=="backward":a<g,v=!ke(this.scrollState)&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[t]??{index:t,key:l,start:a,size:o,end:a+o,lane:0},f,this):p);(this.pendingMin===null||t<this.pendingMin)&&(this.pendingMin=t),this.itemSizeCache.set(l,n),this.itemSizeCacheVersion++;let m=!1;if(this._awaitingCommandReadBack()||(h?m=this.applyScrollAdjustment(this._getLayoutTotalSize()-d):v&&(m=this.applyScrollAdjustment(f))),this._resizeBatch){this._resizeBatch.notify=!0,(r=this._resizeBatch).sync||(r.sync=m);return}this.notify(m),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment()}},this.getVirtualItems=Ce(()=>[this.getVirtualIndexes(),this.getMeasurements(),this._holdOffset],(t,n,s)=>{const i=[];for(let r=0,o=t.length;r<o;r++){const a=n[t[r]];i.push(s===0?a:{...a,start:a.start-s,end:a.end-s})}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{var n;const s=this.getMeasurements();if(s.length===0)return;const i=(n=this._singleLaneMeasurements)==null?void 0:n.flat,r=this.options.lanes===1&&i!=null,o=Ri(0,s.length-1,r?a=>i[a*2]:a=>hs(s[a]).start,t);return hs(s[o])},this._noteClampMax=()=>{if(!this._awaitingCommandReadBack())return;const t=this._elementMaxScrollOffset();if(t===null)return;const n=this.pendingWrite,s=Math.max(t,0)+this._holdOffset;if(s>=n.target)return;const i=n.lowMaxes??(n.lowMaxes=[]);i[i.length-1]!==s&&i.push(s)},this.getMaxScrollOffset=()=>(this._elementMaxScrollOffset()??0)+this._holdOffset,this._toLayoutOffset=t=>{var n;let s=t+this._holdOffset;return((n=this.pendingScrollAnchor)==null?void 0:n.kind)==="anchor"&&(s+=this.pendingScrollAnchor.delta),s},this._elementMaxScrollOffset=()=>{const t=this.scrollElement;if(t===null)return null;if("scrollHeight"in t)return this.options.horizontal?t.scrollWidth-t.clientWidth:t.scrollHeight-t.clientHeight;if("document"in t){const n=t.document.documentElement;return this.options.horizontal?n.scrollWidth-t.innerWidth:n.scrollHeight-t.innerHeight}return null},this._momentumStop=null,this._stopMomentum=t=>{const n=this.scrollElement,s=this.targetWindow;if(n===null||s===null)return;const i="document"in n?n.document.scrollingElement:n;if(!i?.style)return;if(this._momentumStop){this._momentumStop.done=t;return}const{style:r}=i,o=this.options.horizontal?"overflow-x":"overflow-y",a=r.getPropertyValue(o),l=r.getPropertyPriority(o),u=()=>this.options.horizontal?i.clientHeight:i.clientWidth,c=u();if(r.setProperty(o,"hidden","important"),u()!==c){r.setProperty(o,a,l);return}const f={restore:()=>r.getPropertyValue(o)!=="hidden"||r.getPropertyPriority(o)!=="important"?!1:(r.setProperty(o,a,l),!0),done:t};this._momentumStop=f,s.requestAnimationFrame(()=>s.requestAnimationFrame(()=>{this._momentumStop===f&&(this._momentumStop=null,f.restore()&&f.done())}))},this._clampedBy=t=>{const n=this._elementMaxScrollOffset();if(n===null)return null;const s=n+this._holdOffset;return t>s+.5?{target:t,maxAtWrite:s}:null},this.getVirtualDistanceFromEnd=()=>Math.max(this._getLayoutTotalSize()+this.options.scrollMargin-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,n,s=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),r=this.getScrollOffset();n==="auto"&&(n=t>=r+i?"end":"start"),n==="center"?t+=(s-i)/2:n==="end"&&(t-=i);const o=this.getMaxScrollOffset();return Math.max(Math.min(o,t),0)},this.getOffsetForIndex=(t,n="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getSize(),i=this.getScrollOffset(),r=this.measurementsCache[t];if(!r)return;if(n==="auto")if(r.end>=i+s-this.options.scrollPaddingEnd)n="end";else if(r.start<=i+this.options.scrollPaddingStart)n="start";else return[i,n];if(n==="end"&&t===this.options.count-1){const a=this.getMaxScrollOffset(),l=a-this.options.paddingEnd+this.options.scrollPaddingEnd;return[Math.max(Math.min(l,a),0),n]}const o=n==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,n,r.size),n]},this.scrollToOffset=(t,{align:n="start",behavior:s="auto"}={})=>{this._startScroll({index:null,align:n},this.getOffsetForAlignment(t,n),s,"absolute")},this.scrollToIndex=(t,{align:n="auto",behavior:s="auto"}={})=>{t=Math.max(0,Math.min(t,this.options.count-1));const i=this.getOffsetForIndex(t,n);if(!i)return;const[r,o]=i;this._startScroll({index:t,align:o},r,s,"absolute")},this.scrollBy=(t,{behavior:n="auto"}={})=>{const s=this.getOffsetForAlignment((this.getCommandWrittenOffset()??this.getScrollOffset())+t,"start");this._startScroll({index:null,align:"start"},s,n,"relative")},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this._startScroll({index:this.options.count-1,align:"end",toEnd:!0},Math.max(this.getMaxScrollOffset(),0),t,"absolute");return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.cancelScroll=()=>{this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null},this.getTotalSize=()=>Math.max(this._getLayoutTotalSize()-this._holdOffset,0),this._getLayoutTotalSize=()=>{var t,n;const s=this.getMeasurements();let i;if(s.length===0)i=this.options.paddingStart;else if(this.options.lanes===1){const r=s.length-1,o=(t=this._singleLaneMeasurements)==null?void 0:t.flat;o!=null?i=o[r*2]+o[r*2+1]:i=((n=s[r])==null?void 0:n.end)??0}else{const r=Array(this.options.lanes).fill(null);let o=s.length-1;for(;o>=0&&r.some(a=>a===null);){const a=s[o];r[a.lane]===null&&(r[a.lane]=a.end),o--}i=Math.max(...r.filter(a=>a!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(this.itemSizeCache.size===0)return t;const n=this.getMeasurements();for(const s of n)s&&this.itemSizeCache.has(s.key)&&t.push({index:s.index,key:s.key,start:s.start,size:s.size,end:s.end,lane:s.lane});return t},this._scrollToOffset=(t,{adjustments:n,behavior:s}={})=>{const i={target:t+(n??0),smooth:s==="smooth"};return this.pendingWrite=i,this.options.scrollToFn(t-this._holdOffset,{behavior:s,adjustments:n},this),i},this.getCommandWrittenOffset=()=>this.scrollState!==null&&this.pendingWrite!==null&&!this.pendingWrite.smooth?this.pendingWrite.target:null,this._awaitingCommandReadBack=()=>{const t=this.getCommandWrittenOffset();return!(mt()&&this._iosGesture.dragging())&&t!==null&&!fe(t,this.getScrollOffset())},this._followOffsetTarget=t=>{this.scrollState!==null&&this.scrollState.index==null&&(this.scrollState.lastTargetOffset+=t)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}get scrollAdjustments(){return 0}applyScrollAdjustment(e,t){if(e===0)return!1;if(this._followOffsetTarget(e),this._canWriteScroll()){const n=this.getScrollOffset();this._clampedAdjustment=this._clampedBy(n+e);const s=this._scrollToOffset(n,{adjustments:e,behavior:t});return this.scrollOffset!==null&&(this.pendingWrite===s&&(this.scrollOffset+=e),this.scrollOffset<0&&(this.scrollOffset=0)),!0}else return this._holdOffset+=e,this.scrollOffset!==null&&(this.scrollOffset+=e),!0}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}getScrollStateTarget(e){const t=e.toEnd?[Math.max(this.getMaxScrollOffset(),0)]:e.index!=null?this.getOffsetForIndex(e.index,e.align):void 0;return t?t[0]:e.lastTargetOffset}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}if(this.scrollState.phase==="queued"){this.scheduleScrollReconcile();return}this.getMeasurements();const e=this.getScrollStateTarget(this.scrollState),t=this.scrollState.index==null?1:this.options.useAnimationFrameWithResizeObserver?3:2,n=e!==this.scrollState.lastTargetOffset;if(!n&&fe(e,this.getScrollOffset())){if(this.scrollState.phase==="smooth"?this.scrollState.phase="smoothLanded":this.scrollState.phase==="smoothFinishing"&&(this.scrollState.phase="instant"),this.scrollState.stableFrames++,this.scrollState.stableFrames>=t){this.getScrollOffset()!==e&&this._scrollToOffset(e,{behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){const s=this.getSize()||600,i=Math.abs(e-this.getScrollOffset()),r=ke(this.scrollState)&&i>s;this.scrollState.lastTargetOffset=e,r?this.scrollState.phase="smooth":this.scrollState.phase==="smooth"?this.scrollState.phase="smoothFinishing":this.scrollState.phase==="smoothLanded"&&(this.scrollState.phase="instant"),this._scrollToOffset(e,{behavior:r?"smooth":"auto"})}this.scheduleScrollReconcile()}_startScroll(e,t,n,s){this.pendingScrollAnchor=null,this._clampedAdjustment=null;const i=this._iosGesture.tail();if(s==="absolute"&&i!==null){if(i==="fling"&&il()){this._stopMomentum(()=>{const r=this.scrollState;r?.phase!=="queued"||this._iosGesture.tail()!=="fling"||this._reportedOverscroll||(this._iosGesture.end(),this._flushHoldIfReady(!0),this._writeAwaitingCommand())}),this.scrollState={...e,startedAt:this.now(),lastTargetOffset:t,stableFrames:0,phase:"queued",behavior:n,samples:[]},this.scheduleScrollReconcile();return}this._iosGesture.end()}this.scrollState={...e,startedAt:this.now(),lastTargetOffset:t,stableFrames:0,behavior:n,phase:ps(n,e.index!=null&&fe(t,this.getScrollOffset()))},this._scrollToOffset(t,{behavior:n}),this.scheduleScrollReconcile()}},Ri=(e,t,n,s)=>{for(;e<=t;){const i=(e+t)/2|0,r=n(i);if(r<s)e=i+1;else if(r>s)t=i-1;else return i}return e>0?e-1:0};function vl(e,t,n){let s=0;for(;s<=t;){const i=(s+t)/2|0,r=e[i*2];if(r<n)s=i+1;else if(r>n)t=i-1;else return i}return s>0?s-1:0}function Sl(e,t,n,s,i){const r=e.length-1;if(e.length<=s)return{startIndex:0,endIndex:r};if(s===1&&i!==null){const u=vl(i,r,n);let c=u;const f=n+t;for(;c<r&&i[c*2]+i[c*2+1]<f;)c++;return{startIndex:u,endIndex:c}}let a=Ri(0,r,u=>e[u].start,n),l=a;if(s===1)for(;l<r&&e[l].end<n+t;)l++;else if(s>1){const u=Array(s).fill(0);for(;l<r&&u.some(f=>f<n+t);){const f=e[l];u[f.lane]=f.end,l++}const c=Array(s).fill(n+t);for(;a>=0&&c.some(f=>f>=n);){const f=e[a];c[f.lane]=f.start,a--}a=Math.max(0,a-a%s),l=Math.min(r,l+(s-1-l%s))}return{startIndex:a,endIndex:l}}var At=typeof document<"u"?b.useLayoutEffect:b.useEffect;function yl({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n="transform",...s}){const i=b.useReducer(h=>h+1,0)[1],r=b.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});r.current.enabled=t,r.current.mode=n;const o=b.useRef(!1),a=h=>{const d=r.current;if(!d.enabled||!d.container)return;const g=h.getTotalSize();if(g!==d.lastSize){d.lastSize=g;const p=h.options.horizontal?"width":"height";d.container.style[p]=`${g}px`}},l=(h,d,g)=>{const p=r.current,v=!!h.options.horizontal,m=d.start-h.options.scrollMargin;p.lastPositions.get(g)!==m&&(p.lastPositions.set(g,m),p.mode==="transform"?g.style.transform=v?`translate3d(${m}px, 0, 0)`:`translate3d(0, ${m}px, 0)`:g.style[v?"left":"top"]=`${m}px`)},u=h=>{const d=r.current;if(!(!d.enabled||!d.container)){a(h);for(const g of h.getVirtualItems()){const p=h.elementsCache.get(g.key);p&&l(h,g,p)}}},c={...s,onChange:(h,d)=>{var g;const p=r.current;let v=!0;if(p.enabled){u(h);const m=h.range,S=p.prevRange;v=!S||S.isScrolling!==h.isScrolling||S.startIndex!==m?.startIndex||S.endIndex!==m?.endIndex,v&&(p.prevRange=m?{startIndex:m.startIndex,endIndex:m.endIndex,isScrolling:h.isScrolling}:null)}v&&(e&&d&&!o.current?(0,Ka.flushSync)(i):i()),(g=s.onChange)==null||g.call(s,h,d)}},[f]=b.useState(()=>{const h=new ml(c),d=h.measureElement;return h.measureElement=g=>{o.current=!0;try{d(g)}finally{o.current=!1}const p=r.current;if(g!==null&&p.enabled&&p.container){const v=h.measurementsCache[h.indexFromElement(g)];v&&l(h,v,g)}},Object.assign(h,{containerRef:g=>{const p=r.current;p.container=g,p.lastSize=null,g!==null&&u(h)}})});return f.setOptions(c),At(()=>f._didMount(),[]),At(()=>(a(f),f._willUpdate())),At(()=>{u(f)}),f}function Gl(e){return yl({observeElementRect:ll,observeElementOffset:fl,scrollToFn:gl,...e})}var Nl=class{#t=!0;#e;#n;#s;#r;#i;#o;#a;#l=0;#g=5;#c=!1;#f=!1;#u=null;#d=()=>{this.debugLog("Connected to event bus"),this.#i=!0,this.#c=!1,this.debugLog("Emitting queued events",this.#r),this.#r.forEach(e=>this.emitEventToBus(e)),this.#r=[],this.stopConnectLoop(),this.#n().removeEventListener("tanstack-connect-success",this.#d)};#h=()=>{if(this.#l<this.#g){this.#l++,this.dispatchCustomEvent("tanstack-connect",{});return}this.#n().removeEventListener("tanstack-connect",this.#h),this.#f=!0,this.debugLog("Max retries reached, giving up on connection"),this.stopConnectLoop()};#p=()=>{this.#c||(this.#c=!0,this.#n().addEventListener("tanstack-connect-success",this.#d),this.#h())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:s=300}){this.#e=e,this.#t=n,this.#n=this.getGlobalTarget,this.#s=t,this.debugLog(" Initializing event subscription for plugin",this.#e),this.#r=[],this.#i=!1,this.#f=!1,this.#o=null,this.#a=s}startConnectLoop(){this.#o!==null||this.#i||(this.debugLog(`Starting connect loop (every ${this.#a}ms)`),this.#o=setInterval(this.#h,this.#a))}stopConnectLoop(){this.#c=!1,this.#o!==null&&(clearInterval(this.#o),this.#o=null,this.#r=[],this.debugLog("Stopped connect loop"))}debugLog(...e){this.#s&&console.log(`🌴 [tanstack-devtools:${this.#e}-plugin]`,...e)}getGlobalTarget(){if(typeof globalThis<"u"&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog("Using global event target"),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<"u"&&typeof window.addEventListener<"u")return this.debugLog("Using window as event target"),window;const e=typeof EventTarget<"u"?new EventTarget:void 0;return typeof e>"u"||typeof e.addEventListener>"u"?(this.debugLog("No event mechanism available, running in non-web environment"),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog("Using new EventTarget as fallback"),e)}getPluginId(){return this.#e}dispatchCustomEventShim(e,t){try{const n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch{this.debugLog("Failed to dispatch shim event")}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch{this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog("Emitting event to client bus",e),this.dispatchCustomEvent("tanstack-dispatch-event",e)}createEventPayload(e,t){return{type:`${this.#e}:${e}`,payload:t,pluginId:this.#e}}emit(e,t){if(!this.#t){this.debugLog("Event bus client is disabled, not emitting event",e,t);return}if(this.#u&&(this.debugLog("Emitting event to internal event target",e,t),this.#u.dispatchEvent(new CustomEvent(`${this.#e}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#f){this.debugLog("Previously failed to connect, not emitting to bus");return}if(!this.#i){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#r.push(this.createEventPayload(e,t)),typeof CustomEvent<"u"&&!this.#c&&(this.#p(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){const s=n?.withEventTarget??!1,i=`${this.#e}:${e}`;if(s&&(this.#u||(this.#u=new EventTarget),this.#u.addEventListener(i,o=>{t(o.detail)})),!this.#t)return this.debugLog("Event bus client is disabled, not registering event",i),()=>{};const r=o=>{this.debugLog("Received event from bus",o.detail),t(o.detail)};return this.#n().addEventListener(i,r),this.debugLog("Registered event to bus",i),()=>{s&&this.#u?.removeEventListener(i,r),this.#n().removeEventListener(i,r)}}onAll(e){if(!this.#t)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};const t=n=>{const s=n.detail;e(s)};return this.#n().addEventListener("tanstack-devtools-global",t),()=>this.#n().removeEventListener("tanstack-devtools-global",t)}onAllPluginEvents(e){if(!this.#t)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};const t=n=>{const s=n.detail;this.#e&&s.pluginId!==this.#e||e(s)};return this.#n().addEventListener("tanstack-devtools-global",t),()=>this.#n().removeEventListener("tanstack-devtools-global",t)}};export{Ml as C,Rl as D,xl as E,vs as O,Fl as S,bl as T,Il as _,zl as a,ii as b,$l as c,kl as d,Yo as f,li as g,Ol as h,Bl as i,Dl as l,Ll as m,Gl as n,jl as o,Tl as p,Hl as r,Vl as s,Nl as t,Al as u,Cn as v,El as w,Oo as x,ri as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.1
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@2.2.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="71986083-e7d8-4392-abbc-7301a59698e7",e._sentryDebugIdIdentifier="sentry-dbid-71986083-e7d8-4392-abbc-7301a59698e7")}catch{}})();var o={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},s={tokenPostfix:".tcl",specialFunctions:["set","unset","rename","variable","proc","coroutine","foreach","incr","append","lappend","linsert","lreplace"],mainFunctions:["if","then","elseif","else","case","switch","while","for","break","continue","return","package","namespace","catch","exit","eval","expr","uplevel","upvar"],builtinFunctions:["file","info","concat","join","lindex","list","llength","lrange","lsearch","lsort","split","array","parray","binary","format","regexp","regsub","scan","string","subst","dict","cd","clock","exec","glob","pid","pwd","close","eof","fblocked","fconfigure","fcopy","fileevent","flush","gets","open","puts","read","seek","socket","tell","interp","after","auto_execok","auto_load","auto_mkindex","auto_reset","bgerror","error","global","history","load","source","time","trace","unknown","unset","update","vwait","winfo","wm","bind","event","pack","place","grid","font","bell","clipboard","destroy","focus","grab","lower","option","raise","selection","send","tk","tkwait","tk_bisque","tk_focusNext","tk_focusPrev","tk_focusFollowsMouse","tk_popup","tk_setPalette"],symbols:/[=><!~?:&|+\-*\/\^%]+/,brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],escapes:/\\(?:[abfnrtv\\"'\[\]\{\};\$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,variables:/(?:\$+(?:(?:\:\:?)?[a-zA-Z_]\w*)+)/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@specialFunctions":{token:"keyword.flow",next:"@specialFunc"},"@mainFunctions":"keyword","@builtinFunctions":"variable","@default":"operator.scss"}}],[/\s+\-+(?!\d|\.)\w*|{\*}/,"metatag"],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,"operator"],[/\$+(?:\:\:)?\{/,{token:"identifier",next:"@nestedVariable"}],[/@variables/,"type.identifier"],[/\.(?!\d|\.)[\w\-]*/,"operator.sql"],[/\d+(\.\d+)?/,"number"],[/\d+/,"number"],[/;/,"delimiter"],[/"/,{token:"string.quote",bracket:"@open",next:"@dstring"}],[/'/,{token:"string.quote",bracket:"@open",next:"@sstring"}]],dstring:[[/\[/,{token:"@brackets",next:"@nestedCall"}],[/\$+(?:\:\:)?\{/,{token:"identifier",next:"@nestedVariable"}],[/@variables/,"type.identifier"],[/[^\\$\[\]"]+/,"string"],[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],sstring:[[/\[/,{token:"@brackets",next:"@nestedCall"}],[/\$+(?:\:\:)?\{/,{token:"identifier",next:"@nestedVariable"}],[/@variables/,"type.identifier"],[/[^\\$\[\]']+/,"string"],[/@escapes/,"string.escape"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/#.*\\$/,{token:"comment",next:"@newlineComment"}],[/#.*(?!\\)$/,"comment"]],newlineComment:[[/.*\\$/,"comment"],[/.*(?!\\)$/,{token:"comment",next:"@pop"}]],nestedVariable:[[/[^\{\}\$]+/,"type.identifier"],[/\}/,{token:"identifier",next:"@pop"}]],nestedCall:[[/\[/,{token:"@brackets",next:"@nestedCall"}],[/\]/,{token:"@brackets",next:"@pop"}],{include:"root"}],specialFunc:[[/"/,{token:"string",next:"@dstring"}],[/'/,{token:"string",next:"@sstring"}],[/\S+/,{token:"type",next:"@pop"}]]}};export{o as conf,s as language};
|