db-studio 1.22.1 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/index.js +73 -73
  2. package/dist/index.js.map +1 -1
  3. package/dist/web-dist/assets/{_pathlessLayout-Dq6e_NF8.js → _pathlessLayout-DSa9oCv7.js} +2 -2
  4. package/dist/web-dist/assets/{_pathlessLayout-BwDB7UH8.js → _pathlessLayout-cWL0DLLP.js} +1 -1
  5. package/dist/web-dist/assets/{_queryId-B0DdcAYp.js → _queryId-BpuDZLTe.js} +1 -1
  6. package/dist/web-dist/assets/{_table-CeyFxEOk.js → _table-2zBt4xqy.js} +1 -1
  7. package/dist/web-dist/assets/{_table-8PsqQd2I.js → _table-CeHfinOA.js} +1 -1
  8. package/dist/web-dist/assets/{_table-CEn3NlzI.js → _table-DBhcrzbS.js} +1 -1
  9. package/dist/web-dist/assets/{abap-D7a1LaMr.js → abap-DzlCVsad.js} +1 -1
  10. package/dist/web-dist/assets/{apex-DUCizuOA.js → apex-C_Pm42rA.js} +1 -1
  11. package/dist/web-dist/assets/{azcli-08P0e1MB.js → azcli-DwTZ9rLW.js} +1 -1
  12. package/dist/web-dist/assets/{badge-Vam-1V2U.js → badge-CICZ5YYl.js} +1 -1
  13. package/dist/web-dist/assets/{bat-D5u4dSiM.js → bat-CcSGFJ07.js} +1 -1
  14. package/dist/web-dist/assets/{bicep-BEKH2mi6.js → bicep-CV25SKpm.js} +1 -1
  15. package/dist/web-dist/assets/{browser-CFtnfZcn.js → browser-65-7v1wD.js} +1 -1
  16. package/dist/web-dist/assets/{bundle-mjs-Ba_GShnc.js → bundle-mjs-BILTDsu3.js} +1 -1
  17. package/dist/web-dist/assets/{cameligo-zyLkuFrC.js → cameligo-C3sXLv6w.js} +1 -1
  18. package/dist/web-dist/assets/{chat-sidebar-DgaJDLmC.js → chat-sidebar-D1MXISzU.js} +4 -4
  19. package/dist/web-dist/assets/{clojure-HAASvMw5.js → clojure-CY5eMzac.js} +1 -1
  20. package/dist/web-dist/assets/{code-editor-CnNQKM4a.js → code-editor-BlEG6Tv7.js} +1 -1
  21. package/dist/web-dist/assets/{coffee-H0zBiaDN.js → coffee-DjvFxh9v.js} +1 -1
  22. package/dist/web-dist/assets/{connect-DvvXMsnR.js → connect-DEJ-wzu_.js} +1 -1
  23. package/dist/web-dist/assets/{constants-CyYxDPW-.js → constants-CWI44Fpb.js} +3 -3
  24. package/dist/web-dist/assets/{cpp-BZfon7-f.js → cpp-D2TewJLS.js} +1 -1
  25. package/dist/web-dist/assets/{csharp-39w9Tlew.js → csharp-zmJyg7IQ.js} +1 -1
  26. package/dist/web-dist/assets/{csp-BvxksuL7.js → csp-DAnwxP42.js} +1 -1
  27. package/dist/web-dist/assets/{css-CJVemR09.js → css-CHWvPVnU.js} +1 -1
  28. package/dist/web-dist/assets/{cssMode-DO0wgAFc.js → cssMode-BfGbLIoh.js} +1 -1
  29. package/dist/web-dist/assets/{cypher-Bvz6qhjG.js → cypher-DFxF3P6w.js} +1 -1
  30. package/dist/web-dist/assets/{dart-Bik0gG49.js → dart-BzCCWEJY.js} +1 -1
  31. package/dist/web-dist/assets/{database.store-DwsAyPWD.js → database.store-C7UybiY8.js} +9 -9
  32. package/dist/web-dist/assets/{dist-DMyf6Dko.js → dist-BklmFc40.js} +1 -1
  33. package/dist/web-dist/assets/{dist-CsoBsImu.js → dist-hEU4yATV.js} +1 -1
  34. package/dist/web-dist/assets/{dockerfile-CmiPMp9-.js → dockerfile-DkONesga.js} +1 -1
  35. package/dist/web-dist/assets/{ecl-_UvSEdJJ.js → ecl-47mbb6Zb.js} +1 -1
  36. package/dist/web-dist/assets/{editor.api-ZRrI_I0I.js → editor.api-u7KJNncE.js} +1 -1
  37. package/dist/web-dist/assets/{elixir-B0Z5zPx8.js → elixir-Dz9Hcike.js} +1 -1
  38. package/dist/web-dist/assets/{esm-DvPyREUh.js → esm-t4cW-Cjg.js} +1 -1
  39. package/dist/web-dist/assets/{flow9-3F4_wOOf.js → flow9-gLS9fYAo.js} +1 -1
  40. package/dist/web-dist/assets/{format-cell-value-D-naTnK8.js → format-cell-value-CutsoTsV.js} +1 -1
  41. package/dist/web-dist/assets/{freemarker2-DW3uoX2z.js → freemarker2-ivsFK9ku.js} +1 -1
  42. package/dist/web-dist/assets/{fsharp-BwHGoEdM.js → fsharp-Cpm-ad4z.js} +1 -1
  43. package/dist/web-dist/assets/{go-BEkNilfT.js → go-1_yFg3Lt.js} +1 -1
  44. package/dist/web-dist/assets/{graphql-CLhWbOdF.js → graphql-mVcTUiKl.js} +1 -1
  45. package/dist/web-dist/assets/{handlebars-CSWXmB1f.js → handlebars-CWBM0u1D.js} +1 -1
  46. package/dist/web-dist/assets/{hcl-rlt52D7g.js → hcl-r_X8u7_T.js} +1 -1
  47. package/dist/web-dist/assets/{highlighted-body-OFNGDK62-Doh9xMZT.js → highlighted-body-OFNGDK62-hBrh0VBQ.js} +1 -1
  48. package/dist/web-dist/assets/{html-DDuMQc1q.js → html-D5Y3F0jr.js} +1 -1
  49. package/dist/web-dist/assets/{htmlMode-CZLd9AHF.js → htmlMode-CRbiOTqG.js} +1 -1
  50. package/dist/web-dist/assets/{icons-BnNQtg24.js → icons-DqpsVskx.js} +1 -1
  51. package/dist/web-dist/assets/{index-ck6tTAHc.js → index-AQMdz5bn.js} +4 -4
  52. package/dist/web-dist/assets/{indexes-Dd93lTvB.js → indexes-CLT0DKih.js} +1 -1
  53. package/dist/web-dist/assets/{ini-B_HJ11CK.js → ini-Wam-eFkS.js} +1 -1
  54. package/dist/web-dist/assets/{java-sJiisr_y.js → java-Dc0-4NBY.js} +1 -1
  55. package/dist/web-dist/assets/{javascript-DEDHUUwN.js → javascript-CDFuqIFx.js} +1 -1
  56. package/dist/web-dist/assets/{json-editor-yk4dK6or.js → json-editor-BB8Hth6U.js} +1 -1
  57. package/dist/web-dist/assets/{jsonMode-BWSSz50U.js → jsonMode-DvNGK1B1.js} +1 -1
  58. package/dist/web-dist/assets/{julia-CKhCzNm4.js → julia-D-jimn6E.js} +1 -1
  59. package/dist/web-dist/assets/{keys-D6vrgtRa.js → keys-CFLK1AV2.js} +1 -1
  60. package/dist/web-dist/assets/{kotlin-DoToTuww.js → kotlin-6vuHYksB.js} +1 -1
  61. package/dist/web-dist/assets/{label-DxIJiZ44.js → label-RC_Cv8kc.js} +1 -1
  62. package/dist/web-dist/assets/{less-BWpVNsBn.js → less-BfuEnTz4.js} +1 -1
  63. package/dist/web-dist/assets/{lexon-DCHU-p6q.js → lexon-BNO_-sEN.js} +1 -1
  64. package/dist/web-dist/assets/{liquid-f2Iv2fB9.js → liquid-C--NvHHn.js} +1 -1
  65. package/dist/web-dist/assets/{logs-DQk3nMcE.js → logs-BJlOZTBf.js} +1 -1
  66. package/dist/web-dist/assets/{lspLanguageFeatures-C-GLKDeb.js → lspLanguageFeatures-Dllbtf83.js} +1 -1
  67. package/dist/web-dist/assets/{lua-DNCGIfAF.js → lua-B4ZIp3-L.js} +1 -1
  68. package/dist/web-dist/assets/{m3-BnZMimxx.js → m3-B--HZxsC.js} +1 -1
  69. package/dist/web-dist/assets/{markdown-Clbw2Wwn.js → markdown-C6gUsLH4.js} +1 -1
  70. package/dist/web-dist/assets/{mdx-DgWB8wIX.js → mdx-_P5aZcFG.js} +1 -1
  71. package/dist/web-dist/assets/{mermaid-GHXKKRXX-DkUW61ZT.js → mermaid-GHXKKRXX-BJQtasqs.js} +1 -1
  72. package/dist/web-dist/assets/{middleware-BhQeo1dQ.js → middleware-UkjejqwX.js} +1 -1
  73. package/dist/web-dist/assets/{mips-D_cnnY5G.js → mips-CskcJPXz.js} +1 -1
  74. package/dist/web-dist/assets/{module-w1fnPEU7.js → module-BmmU89-p.js} +1 -1
  75. package/dist/web-dist/assets/{monaco-theme-BKlvSnyu.js → monaco-theme-COQ8oULH.js} +4 -4
  76. package/dist/web-dist/assets/{msdax-B2cS1W51.js → msdax-CJeMITWa.js} +1 -1
  77. package/dist/web-dist/assets/{mysql-DxrfSPeX.js → mysql-CAuSn9_z.js} +1 -1
  78. package/dist/web-dist/assets/{objective-c--BCIKkyu.js → objective-c-D-WdbcBP.js} +1 -1
  79. package/dist/web-dist/assets/{pascal-Dw621VHn.js → pascal-C7LyqozK.js} +1 -1
  80. package/dist/web-dist/assets/{pascaligo-DismPj_H.js → pascaligo-BOIH6wav.js} +1 -1
  81. package/dist/web-dist/assets/{perl-CP4p3tPz.js → perl-3EwTw4Jw.js} +1 -1
  82. package/dist/web-dist/assets/{personal-preferences.store-D1vwYECY.js → personal-preferences.store-BMBctLhq.js} +1 -1
  83. package/dist/web-dist/assets/{pgsql-Dug71UC1.js → pgsql-BJRqMZ1U.js} +1 -1
  84. package/dist/web-dist/assets/{php-C5xzvzTl.js → php-CfRASVKV.js} +1 -1
  85. package/dist/web-dist/assets/{pla-BRidbwAJ.js → pla-NA0wLuQy.js} +1 -1
  86. package/dist/web-dist/assets/{postiats-BtskjtmJ.js → postiats-BGjHHMRu.js} +1 -1
  87. package/dist/web-dist/assets/{powerquery-BRNFimOG.js → powerquery-D3AJHrLl.js} +1 -1
  88. package/dist/web-dist/assets/{powershell-DtC8hmfI.js → powershell-BlID8L0E.js} +1 -1
  89. package/dist/web-dist/assets/{preload-helper-D4DSFROY.js → preload-helper-BrUSzZH1.js} +1 -1
  90. package/dist/web-dist/assets/{protobuf-F_x1Cjx3.js → protobuf-DLttbrfJ.js} +1 -1
  91. package/dist/web-dist/assets/{pug-D4dgjeKq.js → pug-D4Qkf_wn.js} +1 -1
  92. package/dist/web-dist/assets/{python-DPX6MnDe.js → python-3U_5XAVl.js} +1 -1
  93. package/dist/web-dist/assets/{qsharp-CcXqZf4s.js → qsharp-BUWZ8vX2.js} +1 -1
  94. package/dist/web-dist/assets/{queries.store-DPfK-_0h.js → queries.store-C70M3Vmz.js} +1 -1
  95. package/dist/web-dist/assets/{query-runner-BKek4lAm.js → query-runner-C6cgirly.js} +3 -3
  96. package/dist/web-dist/assets/{r-BiIJXs3I.js → r-0aMiebCw.js} +1 -1
  97. package/dist/web-dist/assets/{radix-ui-qEOOL1_K.js → radix-ui-O7fUb8xo.js} +1 -1
  98. package/dist/web-dist/assets/{razor-oLIBzSas.js → razor-VHVyPSVZ.js} +1 -1
  99. package/dist/web-dist/assets/{react-DgIpWRm8.js → react-CvQHOIeW.js} +1 -1
  100. package/dist/web-dist/assets/{react-dom-BZ0gDQU5.js → react-dom-DfLaW97o.js} +1 -1
  101. package/dist/web-dist/assets/{redis-DJrZMmOR.js → redis-B_ZdA8_C.js} +1 -1
  102. package/dist/web-dist/assets/{redis-value-Dhm0spIW.js → redis-value-rEw2L5Jz.js} +1 -1
  103. package/dist/web-dist/assets/{redshift-yzDIBhLh.js → redshift-D032qGzI.js} +1 -1
  104. package/dist/web-dist/assets/{restructuredtext-CF7t2BQG.js → restructuredtext-CPXtBkad.js} +1 -1
  105. package/dist/web-dist/assets/{rolldown-runtime-BEBKJ2Xb.js → rolldown-runtime-gZ9xeEJX.js} +1 -1
  106. package/dist/web-dist/assets/{ruby-Buzq-_Hg.js → ruby-Cc58AEkc.js} +1 -1
  107. package/dist/web-dist/assets/{runner-Di4uLR8Z.js → runner-Cbm_B5Yc.js} +1 -1
  108. package/dist/web-dist/assets/{rust-Dhjx0oUU.js → rust-nhSrY6y0.js} +1 -1
  109. package/dist/web-dist/assets/{sb-CS7EOb-z.js → sb-B189dO30.js} +1 -1
  110. package/dist/web-dist/assets/{scala-BXrWIpsI.js → scala-ByY1N9jf.js} +1 -1
  111. package/dist/web-dist/assets/{schema-CC7fIVGB.js → schema-BeVOGgm9.js} +1 -1
  112. package/dist/web-dist/assets/{schema-Dg-DmfQp.js → schema-CA8HRQn4.js} +1 -1
  113. package/dist/web-dist/assets/{scheme-1v2Ab8rC.js → scheme-Cr6WKXQ2.js} +1 -1
  114. package/dist/web-dist/assets/{scss-BuvMyI80.js → scss-B6IvVxZs.js} +1 -1
  115. package/dist/web-dist/assets/{select-CRpiKcof.js → select-Dlg0EO2A.js} +1 -1
  116. package/dist/web-dist/assets/{separator-UVHn5WOz.js → separator-5JMh-AIn.js} +1 -1
  117. package/dist/web-dist/assets/{sheet-sidebar-C1Wgdn-M.js → sheet-sidebar-CQuumF-m.js} +1 -1
  118. package/dist/web-dist/assets/{shell-BlLMYxqc.js → shell-DvVcLEeW.js} +1 -1
  119. package/dist/web-dist/assets/{solidity-CApe2Ev-.js → solidity-Dtgy_5l0.js} +1 -1
  120. package/dist/web-dist/assets/{sophia-CyZa8od3.js → sophia-KMMSK0sk.js} +1 -1
  121. package/dist/web-dist/assets/{sparql-CwoK2n9Y.js → sparql-05Qryz5Y.js} +1 -1
  122. package/dist/web-dist/assets/{spinner-CwZXU6BY.js → spinner-es6eKuYv.js} +1 -1
  123. package/dist/web-dist/assets/{sql-P2kzvpIo.js → sql-BaBGIzuh.js} +1 -1
  124. package/dist/web-dist/assets/{st-cP-ZBIfp.js → st-BuU8wU7S.js} +1 -1
  125. package/dist/web-dist/assets/{swift-BAgj8_oO.js → swift-DGDt1Lla.js} +1 -1
  126. package/dist/web-dist/assets/{systemverilog-bKvq7GjD.js → systemverilog-BgYZ6FQj.js} +1 -1
  127. package/dist/web-dist/assets/{table-Dq85hQaM.js → table-qUuVeP3A.js} +1 -1
  128. package/dist/web-dist/assets/{tables-DGOK-1JF.js → tables-pmCHvPGP.js} +4 -4
  129. package/dist/web-dist/assets/{tanstack-Bkos0wYR.js → tanstack-D3kotKHJ.js} +1 -1
  130. package/dist/web-dist/assets/{tcl-CZYhj3uE.js → tcl-BJSoaCxE.js} +1 -1
  131. package/dist/web-dist/assets/{tooltip-BGS6CdKU.js → tooltip-iEHDw5ij.js} +1 -1
  132. package/dist/web-dist/assets/{tsMode-CWkS0PFZ.js → tsMode-DMhImvd8.js} +1 -1
  133. package/dist/web-dist/assets/{twig-BYkhheLh.js → twig-s2ga9poj.js} +1 -1
  134. package/dist/web-dist/assets/{typescript-BVovNcHi.js → typescript-CLLk4yHV.js} +1 -1
  135. package/dist/web-dist/assets/{typespec-wOndea04.js → typespec-BQelfI_J.js} +1 -1
  136. package/dist/web-dist/assets/{use-database-engine-BPO0PzHc.js → use-database-engine-DxYqFY4d.js} +1 -1
  137. package/dist/web-dist/assets/{use-theme-DQtr7wmG.js → use-theme-93QM-Vlr.js} +1 -1
  138. package/dist/web-dist/assets/{utils-CwFw8YqE.js → utils-BAOO2O6e.js} +1 -1
  139. package/dist/web-dist/assets/{vb-DI947VUc.js → vb-C4lfujQq.js} +1 -1
  140. package/dist/web-dist/assets/{visualizer-CWs82Oat.js → visualizer-BdAHr0UX.js} +1 -1
  141. package/dist/web-dist/assets/{vscode-DfeEYiA3.js → vscode-DcjbmH2j.js} +1 -1
  142. package/dist/web-dist/assets/{wgsl-CxEBKz2H.js → wgsl-B-ihAMM9.js} +1 -1
  143. package/dist/web-dist/assets/{workers-DtzEtdkU.js → workers-Boc2D1Ms.js} +1 -1
  144. package/dist/web-dist/assets/{xml-B8wczl4_.js → xml-gzkQkYEl.js} +1 -1
  145. package/dist/web-dist/assets/{yaml-DbwQqCV9.js → yaml-DtxYcXp8.js} +1 -1
  146. package/dist/web-dist/index.html +30 -30
  147. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import{r as en,t as dt}from"./rolldown-runtime-BEBKJ2Xb.js";import{It as tn}from"./icons-BnNQtg24.js";import{At as _i,jt as bi}from"./radix-ui-qEOOL1_K.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@1.22.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="50b65299-0214-4ebf-a56b-f985e59b32eb",e._sentryDebugIdIdentifier="sentry-dbid-50b65299-0214-4ebf-a56b-f985e59b32eb")}catch{}})();var Fe=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(){}},xi=class extends Fe{#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"}},nn=new xi,Pi={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Fi=class{#t=Pi;#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)}},fe=new Fi;function Ei(e){setTimeout(e,0)}var Ii=typeof window>"u"||"Deno"in globalThis;function z(){}function Mi(e,t){return typeof e=="function"?e(t):e}function kt(e){return typeof e=="number"&&e>=0&&e!==1/0}function gs(e,t){return Math.max(e+(t||0)-Date.now(),0)}function re(e,t){return typeof e=="function"?e(t):e}function N(e,t){return typeof e=="function"?e(t):e}function Fn(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(!De(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 En(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(!De(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 De(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>De(e[n],t[n])):!1}var Li=Object.prototype.hasOwnProperty;function ps(e,t,n=0){if(e===t)return e;if(n>500)return t;const s=In(e)&&In(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],d=e[c],f=t[c];if(d===f){a[c]=d,(s?u<i:Li.call(e,c))&&l++;continue}if(d===null||f===null||typeof d!="object"||typeof f!="object"){a[c]=f;continue}const h=ps(d,f,n+1);a[c]=h,h===d&&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 In(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Dt(e){if(!Mn(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Mn(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Mn(e){return Object.prototype.toString.call(e)==="[object Object]"}function Oi(e){return new Promise(t=>{fe.setTimeout(t,e)})}function At(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ps(e,t):t}function Ti(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function ki(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var rn=Symbol();function ms(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 Di(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 Ae=(()=>{let e=()=>Ii;return{isServer(){return e()},setIsServer(t){e=t}}})();function $t(){let e,t;const n=new Promise((i,r)=>{e=i,t=r});n.status="pending",n.catch(()=>{});function s(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{s({status:"fulfilled",value:i}),e(i)},n.reject=i=>{s({status:"rejected",reason:i}),t(i)},n}function rl(e){return e.state.status==="success"}var Ai=Ei;function $i(){let e=[],t=0,n=a=>{a()},s=a=>{a()},i=Ai;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 V=$i(),Vi=class extends Fe{#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}},rt=new Vi;function ji(e){return Math.min(1e3*2**e,3e4)}function vs(e){return(e??"online")==="online"?rt.isOnline():!0}var Vt=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Ss(e){let t=!1,n=0,s;const i=$t(),r=()=>i.status!=="pending",o=p=>{if(!r()){const v=new Vt(p);f(v),e.onCancel?.(v)}},a=()=>{t=!0},l=()=>{t=!1},u=()=>nn.isFocused()&&(e.networkMode==="always"||rt.isOnline())&&e.canRun(),c=()=>vs(e.networkMode)&&e.canRun(),d=p=>{r()||(s?.(),i.resolve(p))},f=p=>{r()||(s?.(),i.reject(p))},h=()=>new Promise(p=>{s=v=>{(r()||u())&&p(v)},e.onPause?.()}).then(()=>{s=void 0,r()||e.onContinue?.()}),g=()=>{if(r())return;let p;const v=n===0?e.initialPromise:void 0;try{p=v??e.fn()}catch(m){p=Promise.reject(m)}Promise.resolve(p).then(d).catch(m=>{if(r())return;const S=e.retry??(Ae.isServer()?0:3),w=e.retryDelay??ji,R=typeof w=="function"?w(n,m):w,x=S===!0||typeof S=="number"&&n<S||typeof S=="function"&&S(n,m);if(t||!x){f(m);return}n++,e.onFail?.(n,m),Oi(R).then(()=>u()?void 0:h()).then(()=>{t?f(m):g()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(s?.(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?g():h().then(g),i)}}var ys=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kt(this.gcTime)&&(this.#t=fe.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ae.isServer()?1/0:3e5))}clearGcTimeout(){this.#t!==void 0&&(fe.clearTimeout(this.#t),this.#t=void 0)}};function zi(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 d=g=>{Di(g,()=>t.signal,()=>c=!0)},f=ms(t.options,t.fetchOptions),h=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 d(C),C})(),w=await f(S),{maxPages:R}=t.options,x=v?ki:Ti;return{pages:x(g.pages,w,R),pageParams:x(g.pageParams,p,R)}};if(i&&r.length){const g=i==="backward",p=g?ws:jt,v={pages:r,pageParams:o};a=await h(v,p(s,v),g)}else{const g=e??r.length;do{const p=l===0?o[0]??s.initialPageParam:jt(s,a);if(l>0&&p==null)break;a=await h(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 jt(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 ws(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Hi(e,t){return t?jt(e,t)!=null:!1}function Bi(e,t){return!t||!e.getPreviousPageParam?!1:ws(e,t)!=null}var Gi=class extends ys{#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=On(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=On(this.options);t.data!==void 0&&(this.setState(Ln(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(e,t){const n=At(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(z).catch(z):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=>N(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=>re(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:!gs(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){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#a||this.#h()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#h(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}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 a=this.observers.find(l=>l.options.queryFn);a&&this.setOptions(a.options)}const n=new AbortController,s=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i=()=>{const a=ms(this.options,t),u=(()=>{const c={client:this.#r,queryKey:this.queryKey,meta:this.meta};return s(c),c})();return this.#a=!1,this.options.persister?this.options.persister(a,u,this):a(u)},o=(()=>{const a={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return s(a),a})();(this.#t==="infinite"?zi(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}),this.#i=Ss({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:a=>{a instanceof Vt&&a.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(a,l)=>{this.#l({type:"failed",failureCount:a,error:l})},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 a=await this.#i.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#s.config.onSuccess?.(a,this),this.#s.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof Vt){if(a.silent)return this.#i.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#l({type:"error",error:a}),this.#s.config.onError?.(a,this),this.#s.config.onSettled?.(this.state.data,a,this),a}finally{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,...Cs(n.data,this.options),fetchMeta:e.meta??null};case"success":const s={...n,...Ln(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),V.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:e})})}};function Cs(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:vs(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ln(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function On(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 Rs=class extends Fe{constructor(e,t){super(),this.options=t,this.#t=e,this.#a=null,this.#o=$t(),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#n=void 0;#s=void 0;#r;#i;#o;#a;#h;#l;#c;#d;#u;#f;#g=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),Tn(this.#e,this.options)?this.#p():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zt(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zt(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#C(),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 N(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#R(),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&&kn(this.#e,n,this.options,t)&&this.#p(),this.updateResult(),s&&(this.#e!==n||N(this.options.enabled,this.#e)!==N(t.enabled,this.#e)||re(this.options.staleTime,this.#e)!==re(t.staleTime,this.#e))&&this.#m();const i=this.#v();s&&(this.#e!==n||N(this.options.enabled,this.#e)!==N(t.enabled,this.#e)||i!==this.#f)&&this.#S(i)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),n=this.createResult(t,e);return Ui(this,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),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(e){this.#g.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);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#p({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#p(e){this.#R();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(z)),t}#m(){this.#w();const e=re(this.options.staleTime,this.#e);if(Ae.isServer()||this.#s.isStale||!kt(e))return;const t=gs(this.#s.dataUpdatedAt,e)+1;this.#d=fe.setTimeout(()=>{this.#s.isStale||this.updateResult()},t)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#S(e){this.#C(),this.#f=e,!(Ae.isServer()||N(this.options.enabled,this.#e)===!1||!kt(this.#f)||this.#f===0)&&(this.#u=fe.setInterval(()=>{(this.options.refetchIntervalInBackground||nn.isFocused())&&this.#p()},this.#f))}#y(){this.#m(),this.#S(this.#v())}#w(){this.#d!==void 0&&(fe.clearTimeout(this.#d),this.#d=void 0)}#C(){this.#u!==void 0&&(fe.clearInterval(this.#u),this.#u=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,d;if(t._optimisticResults){const C=this.hasListeners(),y=!C&&Tn(e,t),_=C&&kn(e,n,t,s);(y||_)&&(u={...u,...Cs(l.data,e.options)}),t._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:f,errorUpdatedAt:h,status:g}=u;d=u.data;let p=!1;if(t.placeholderData!==void 0&&d===void 0&&g==="pending"){let C;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(C=i.data,p=!0):C=typeof t.placeholderData=="function"?t.placeholderData(this.#c?.state.data,this.#c):t.placeholderData,C!==void 0&&(g="success",d=At(i?.data,C,t),c=!0)}if(t.select&&d!==void 0&&!p)if(i&&d===r?.data&&t.select===this.#h)d=this.#l;else try{this.#h=t.select,d=t.select(d),d=At(i?.data,d,t),this.#l=d,this.#a=null}catch(C){this.#a=C}this.#a&&(f=this.#a,d=this.#l,h=Date.now(),g="error");const v=u.fetchStatus==="fetching",m=g==="pending",S=g==="error",w=m&&v,R=d!==void 0,x={status:g,fetchStatus:u.fetchStatus,isPending:m,isSuccess:g==="success",isError:S,isInitialLoading:w,isLoading:w,data:d,dataUpdatedAt:u.dataUpdatedAt,error:f,errorUpdatedAt:h,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&&!R,isPaused:u.fetchStatus==="paused",isPlaceholderData:c,isRefetchError:S&&R,isStale:an(e,t),refetch:this.refetch,promise:this.#o,isEnabled:N(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const C=x.data!==void 0,y=x.status==="error"&&!C,_=L=>{y?L.reject(x.error):C&&L.resolve(x.data)},P=()=>{const L=this.#o=x.promise=$t();_(L)},O=this.#o;switch(O.status){case"pending":e.queryHash===n.queryHash&&_(O);break;case"fulfilled":(y||x.data!==O.value)&&P();break;case"rejected":(!y||x.error!==O.reason)&&P()}}return x}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.#c=this.#e),it(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!this.#g.size)return!0;const r=new Set(i??this.#g);return this.options.throwOnError&&r.add("error"),Object.keys(this.#s).some(o=>{const a=o;return this.#s[a]!==e[a]&&r.has(a)})};this.#_({listeners:n()})}#R(){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()}#_(e){V.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function Ni(e,t){return N(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&N(t.retryOnMount,e)===!1)}function Tn(e,t){return Ni(e,t)||e.state.data!==void 0&&zt(e,t,t.refetchOnMount)}function zt(e,t,n){if(N(t.enabled,e)!==!1&&re(t.staleTime,e)!=="static"){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&an(e,t)}return!1}function kn(e,t,n,s){return(e!==t||N(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&an(e,n)}function an(e,t){return N(t.enabled,e)!==!1&&e.isStaleByTime(re(t.staleTime,e))}function Ui(e,t){return!it(e.getCurrentResult(),t)}var qi=class extends Rs{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",d=o&&l==="backward",f=i&&l==="backward";return{...s,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Hi(t,n.data),hasPreviousPage:Bi(t,n.data),isFetchNextPageError:u,isFetchingNextPage:c,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:a&&!u&&!d,isRefetching:r&&!c&&!f}}},Ki=class extends ys{#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||_s(),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.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=Ss({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(r,o)=>{this.#r({type:"failed",failureCount:r,error:o})},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)});const s=this.state.status==="pending",i=!this.#s.canStart();try{if(s)t();else{this.#r({type:"pending",variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const o=await this.options.onMutate?.(e,n);o!==this.state.context&&this.#r({type:"pending",context:o,variables:e,isPaused:i})}const r=await this.#s.start();return await this.#n.config.onSuccess?.(r,e,this.state.context,this,n),await this.options.onSuccess?.(r,e,this.state.context,n),await this.#n.config.onSettled?.(r,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(r,null,e,this.state.context,n),this.#r({type:"success",data:r}),r}catch(r){try{await this.#n.config.onError?.(r,e,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onError?.(r,e,this.state.context,n)}catch(o){Promise.reject(o)}try{await this.#n.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,r,e,this.state.context,n)}catch(o){Promise.reject(o)}throw this.#r({type:"error",error:r}),r}finally{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),V.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function _s(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Qi=class extends Fe{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(e,t,n){const s=new Ki({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=Ge(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=Ge(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=Ge(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=Ge(e);return typeof t=="string"?this.#e.get(t)?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){V.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>En(t,n))}findAll(e={}){return this.getAll().filter(t=>En(e,t))}notify(e){V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return V.batch(()=>Promise.all(e.map(t=>t.continue().catch(z))))}};function Ge(e){return e.options.scope?.id}var Wi=class extends Fe{#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)}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??_s();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){V.batch(()=>{if(this.#s&&this.hasListeners()){const t=this.#e.variables,n=this.#e.context,s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,n,s)}catch(i){Promise.reject(i)}try{this.#s.onSettled?.(e.data,null,t,n,s)}catch(i){Promise.reject(i)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,n,s)}catch(i){Promise.reject(i)}try{this.#s.onSettled?.(void 0,e.error,t,n,s)}catch(i){Promise.reject(i)}}}this.listeners.forEach(t=>{t(this.#e)})})}},Ji=class extends Fe{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,n){const s=t.queryKey,i=t.queryHash??sn(s,t);let r=this.get(i);return r||(r=new Gi({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){const t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){V.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=>Fn(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Fn(e,n)):t}notify(e){V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){V.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){V.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ol=class{#t;#e;#n;#s;#r;#i;#o;#a;constructor(e={}){this.#t=e.queryCache||new Ji,this.#e=e.mutationCache||new Qi,this.#n=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#o=nn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#a=rt.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(re(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=Mi(t,i);if(r!==void 0)return this.#t.build(this,s).setData(r,{...n,manual:!0})}setQueriesData(e,t,n){return V.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;V.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#t;return V.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=V.batch(()=>this.#t.findAll(e).map(i=>i.cancel(n)));return Promise.all(s).then(z).catch(z)}invalidateQueries(e,t={}){return V.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=V.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(z)),i.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(s).then(z)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#t.build(this,t);return n.isStaleByTime(re(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(z).catch(z)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(z).catch(z)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return rt.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=>{De(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=>{De(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()}},b=en(tn(),1),M=bi(),bs=b.createContext(void 0),xs=e=>{const t=b.useContext(bs);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},al=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,M.jsx)(bs.Provider,{value:e,children:t})),Ps=b.createContext(!1),Xi=()=>b.useContext(Ps),ll=Ps.Provider;function Yi(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Zi=b.createContext(Yi()),er=()=>b.useContext(Zi),tr=(e,t,n)=>{const s=n?.state.error&&typeof e.throwOnError=="function"?on(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},nr=e=>{b.useEffect(()=>{e.clearReset()},[e])},sr=({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])),ir=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))}},rr=(e,t)=>e.isLoading&&e.isFetching&&!t,or=(e,t)=>e?.suspense&&t.isPending,Dn=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Fs(e,t,n){const s=Xi(),i=er(),r=xs(n),o=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(o);const a=r.getQueryCache().get(o.queryHash);o._optimisticResults=s?"isRestoring":"optimistic",ir(o),tr(o,i,a),nr(i);const l=!r.getQueryCache().get(o.queryHash),[u]=b.useState(()=>new t(r,o)),c=u.getOptimisticResult(o),d=!s&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(f=>{const h=d?u.subscribe(V.batchCalls(f)):z;return u.updateResult(),h},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),b.useEffect(()=>{u.setOptions(o)},[o,u]),or(o,c))throw Dn(o,u,i);if(sr({result:c,errorResetBoundary:i,throwOnError:o.throwOnError,query:a,suspense:o.suspense}))throw c.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(o,c),o.experimental_prefetchInRender&&!Ae.isServer()&&rr(c,s)&&(l?Dn(o,u,i):a?.promise)?.catch(z).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?c:u.trackResult(c)}function ul(e,t){return Fs(e,Rs,t)}function cl(e,t){const n=xs(t),[s]=b.useState(()=>new Wi(n,e));b.useEffect(()=>{s.setOptions(e)},[s,e]);const i=b.useSyncExternalStore(b.useCallback(o=>s.subscribe(V.batchCalls(o)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),r=b.useCallback((o,a)=>{s.mutate(o,a).catch(z)},[s]);if(i.error&&on(s.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:r,mutateAsync:i.mutate}}function dl(e,t){return Fs(e,qi,t)}var An=b.use,ln=b.useLayoutEffect;function le(e){return e[e.length-1]}function Es(e,t){return typeof e=="function"?e(t):e}var un=Object.prototype.hasOwnProperty;function Is(e){for(const t in e)if(un.call(e,t))return!0;return!1}var Ze=()=>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&&!(ot(e)&&ot(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,d,f;if(i){for(;u<l&&(f=u,d=e[f],c=t[f],c=d===c?d:typeof d=="object"?oe(d,c,n,s):c,c===d);u++);if(u===l&&o===l)return e}else{let g=o===l,p=!0;for(;u<l;u++){f=a[u],d=e[f];const v=t[f];c=d===v?d:typeof d=="object"?oe(d,v,n,s):v,g&&=c===d&&(r[u]===f||un.call(e,f)),p&&=Object.is(c,v),r[u]=c}if(g)return Object.getOwnPropertySymbols(e).length?t:e;if(p)return t}const h=i?a.fill(0):n?Ze():{};for(let g=0;g<l;g++)f=i?g:a[g],i?(d=e[f],g>u&&(c=t[f],c=d===c?d:typeof d=="object"?oe(d,c,n,s):c),h[f]=g<u?d:c):h[f]=r[g];return h}function ot(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(ot(e)&&ot(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 ar(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 lr=/[\x00-\x1f\x7f"<>`{}]/g;function ur(e){return e.replace(lr,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function $n(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 ur(t)}var cr=["http:","https:","mailto:","tel:"];function $e(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 Ms=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Ls(e,t){if(!e)return!1;if(Ms.test(e))return!0;const n=$e(e);return n?!t.has(n):!1}function Ee(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+=$n(e.slice(s,i.index))+i[0],s=n.lastIndex;t+=$n(s?e.slice(s):e)}return t}function dr(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function fr(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 cn(){throw new Error("Invariant failed")}function be(e){return e.replace(/\/{2,}/g,"/")}function Os(e){return e==="/"?e:e.replace(/^\/+/,"")}function J(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/+$/,""):e}function Ts(e){return J(Os(e))}function Vn(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function jn(e,t,n="never",s){if(t.includes("//")&&(t=be(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=be(e)),o=e.split("/");o.length>1&&le(o)==="";)o.pop();const u=t.split("/");for(let c=0,d=u.length;c<d;c++){const f=u[c];f===""?c?c===d-1&&o.push(f):o=[f]:f===".."?o.length>1?o.pop():o=[""]:f==="."||o.push(f)}}o.length>1&&(le(o)===""?n==="never"&&o.pop():n==="always"&&o.push(""));const a=o.join("/"),l=(i?be(a):a)||"/";return r&&s&&s.set(r,l),l}function hr(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 gr(e){return e==null||e===""}function pr(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 zn(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,d]=a,f=l===2,h=f&&d!==void 0?d+r:d;let g=n[u];if(!(l===3&&g==null)){if(i&&(i[u]=g,f&&(i["*"]=g)),f&&gr(g)){if(c==="/"&&!h)continue;g=""}o+=c+pr(u,g,s)+(h||"")}}return o+r||"/"}function Pe(e){return e?.isNotFound===!0}function mr(){try{return sessionStorage}catch{return}}var vr="tsr-scroll-restoration-v1_3",ks=mr();function Sr(){try{return JSON.parse(ks?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function yr(){try{ks?.setItem(vr,JSON.stringify(Re))}catch{}}var Re=Sr(),Hn="data-scroll-restoration-id",wr=e=>e.state.__TSR_key||e.href;function Cr(e){const t=e.getAttribute(Hn);if(t)return`[${Hn}="${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 Ne=!1,et="window";function Ht(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function Bn(e){const t=new Set;for(const n of e){if(n===et)continue;const s=Ht(n);s&&t.add(s)}return t}function Rr(e,t){const n=t??e.options.scrollRestoration,s=e._scroll;n&&(s.restoring=!0);const i=e.options.getScrollRestorationKey||wr,r=new Set,o=a=>{const l=Re[a]||={};for(const u of r)u===document?l[et]={scrollX,scrollY}:u.isConnected&&(l[Cr(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};n&&!s.restoration&&(s.restoration=!0,Ne=!1,history.scrollRestoration="manual",document.addEventListener("scroll",a=>{Ne||r.add(a.target)},!0),e.subscribe("onBeforeLoad",a=>{a.fromLocation&&o(i(a.fromLocation)),r.clear()}),addEventListener("pagehide",()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),yr()})),!s.reset&&(s.reset=!0,e.subscribe("onRendered",a=>{const l=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,c=s.next,d=s.hash;let f;if(r.clear(),s.next=!0,s.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const h=i(a.toLocation),g=a.fromLocation&&i(a.fromLocation);if(s.restoring&&g&&g!==h){const p=Re[g];if(p){let v=Re[h];for(const m in p){if(m===et){if(c)continue}else{const S=Ht(m);if(!S||c&&u&&(f??=Bn(u),f.has(S)))continue}v||(v=Re[h]={}),v[m]??=p[m]}}}Ne=!0;try{const p=a.toLocation.hash,v=a.toLocation.state.__hashScrollIntoViewOptions??!0;let m=!1;if(c){!p&&u&&(f??=Bn(u));const S=p&&v&&d,w=s.restoring?Re[h]:void 0;if(w)for(const R in w){const{scrollX:x,scrollY:C}=w[R];if(R===et){if(S)continue;scrollTo({top:C,left:x,behavior:l}),m=!0}else{const y=Ht(R);y&&(y.scrollLeft=x,y.scrollTop=C,f?.delete(y))}}if(!p){const R={top:0,left:0,behavior:l};if(m||scrollTo(R),f)for(const x of f)x.scrollTo(R)}}!m&&p&&v&&document.getElementById(p)?.scrollIntoView(v)}finally{Ne=!1}}))}function _r(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 br(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 Ds=/^(?:\s|["[{\d-]|fa|nu|tr)/,xr=Fr(JSON.parse),Pr=Er(JSON.stringify,JSON.parse);function Fr(e){const t=e===JSON.parse;return n=>{n[0]==="?"&&(n=n.substring(1));const s=br(n);for(const i in s){const r=s[i];if(typeof r=="string"){if(t&&!Ds.test(r))continue;try{s[i]=e(r)}catch{}}}return s}}function Er(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&&!Ds.test(i))return i;try{return t(i),e(i)}catch{}}return i}return i=>{const r=_r(i,s);return r?`?${r}`:""}}var Le="__root__";function Ir(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 As(e){return e instanceof Response&&!!e.options}function at(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 se=4,$s=5;function Mr(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 Lr(e,t,n){const s=e.substring(t,n);if(s.charCodeAt(0)===36)return s.length===1?[2,"_splat","",void 0]:[1,s.substring(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.substring(a,r);return[o?3:l?1:2,l||"_splat",s.substring(0,i),e.substring(t+r+1,l?n:e.length)]}}return s}function Ve(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,d=l?.caseSensitive??e,f=l?.params?.parse??l?.parseParams;let h,g=r?n-1:0;if(!s||a.includes("$")){h=r?.slice()??[];const m=le(h);m&&typeof m!="string"&&m[0]===2&&(h[h.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 w=S===-1?u:S;const R=Lr(a,m,w);o=w+1;let x;if(typeof R=="string"){if(!s)continue;let C=R,y;d?y=s.static??=new Map:(C=R.toLowerCase(),y=s.staticInsensitive??=new Map);const _=y.get(C);if(_)x=_;else{const P=he(s);x=P,y.set(C,P)}}else{const C=R[0];let y=R[2],_=R[3]??"";if(C===2&&(w=u,o=w+1),h&&g<w&&(g<m-1&&h.push(a.substring(g,m-1)),R[2]="/"+y,C===2&&R[3]!==void 0&&c<u&&(R[3]=_.slice(0,-1)),h.push(R),g=w),!s)continue;const P=d&&!!(y||_);d||(y=y.toLowerCase(),_=_.toLowerCase());const O=C===1?s.dynamic??=[]:C===3?s.optional??=[]:s.wildcard??=[],L=C!==2&&!f&&O.find(I=>!I.parse&&I.caseSensitive===P&&I.prefix===y&&I.suffix===_);if(L)x=L;else{const I=he(s,C,P,y,_);x=I,O.push(I),O.length===2&&i?.push(O)}}s=x}h&&g<c&&h.push(a.substring(g,c));const p=h?.slice();if(!s)return p;if(f&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const m=he(s,$s);(s.pathless??=[]).push(m),s=m}const v=(t.path||!t.children)&&!t.isRoot;if(v&&c<u){const m=he(s,se);s.index=m,s=m}return s.parse=f??null,s.priority=l?.params?.priority??0,s.route||(s.data=p,v&&(s.route=t)),[s,o,p]}function Vs(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 he(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 Or(e,t){const n=he(),s=[];function i(r,o,a,l){const[u,c,d]=Ve(!1,r,o,a,s,l);if(r.children)for(const f of r.children)i(f,c,u,d)}for(const r of e)i(r,1,n);for(const r of s)r.sort(Vs);t.masksTree=n,t.flatCache=at(1e3)}function Tr(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 kr(e,t,n,s,i){e||="/",s||="/";const r=t?`case\0${e}`:e;let o=i.singleCache.get(r);return o||(o=he(),Ve(t,{from:e},1,o),i.singleCache.set(r,o)),dn(s,o,n)}function Dr(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=zs(r.route)),t.matchCache.set(s,r),r}function Ar(e,t=!1){const n=he(),s=[],i={},r={};let o=0;function a(l,u,c,d){if(l.init(o),l.id in i&&cn(),i[l.id]=l,o!==0&&l.path){const p=J(l.fullPath);(!r[p]||l.fullPath.endsWith("/"))&&(r[p]=l)}o++;const[f,h,g]=Ve(t,l,u,c,s,d);if(l._interpolation=g,l.children)for(const p of l.children)a(p,h,f,g)}a(e,1,n);for(const l of s)l.sort(Vs);return{processedTree:{segmentTree:n,singleCache:at(1e3),matchCache:at(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:r}}function dn(e,t,n=!1){const s=e.split("/"),i=Vr(e,s,t,n);if(!i)return null;const[r]=js(e,s,i);return{route:i.node.route,rawParams:r}}function js(e,t,n){const s=$r(n.node),i=n.node.data&&Mr(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===se)break;if(c.kind===$s){o--,l--;continue}const d=t[o],f=l;if(d&&(l+=d.length),c.kind===1||c.kind===3){const h=i[u++];if(c.kind===3&&n.skipped&1<<a){o--,l=f-1;continue}const g=c.suffix||c.prefix?d.substring(c.prefix.length,d.length-c.suffix.length):d;(g||c.kind===1)&&(r[h]=decodeURIComponent(g))}else if(c.kind===2){const h=c,g=e.substring(f+h.prefix.length,e.length-h.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 zs(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function $r(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Vr(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:d,index:f,skipped:h,statics:g,dynamics:p,optionals:v}=c;let{extract:m,rawParams:S}=c;if(d.kind===2&&d.route&&!qe(u,c))continue;if(d.parse){if(!Gn(e,t,c))continue;S=c.rawParams,m=c.extract}s&&d.route&&d.kind!==se&&qe(l,c)&&(l=c);const w=f===o;if(w&&(d.route&&(!r||d.kind===se||d.kind===2)&&qe(u,c)&&(u=c),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;const R=w?void 0:t[f];let x;if(w&&d.index){const C={node:d.index,index:f,skipped:h,statics:g,dynamics:p,optionals:v,extract:m,rawParams:S};let y=!0;if(d.index.parse&&(Gn(e,t,C)||(y=!1)),y){if(!p&&!v&&!h&&jr(g,o))return C;qe(u,C)&&(u=C)}}if(d.wildcard)for(let C=d.wildcard.length-1;C>=0;C--){const y=d.wildcard[C],{prefix:_,suffix:P}=y;if(!(_&&(w||!(y.caseSensitive?R:x??=R.toLowerCase()).startsWith(_)))){if(P){if(w)continue;const O=t.slice(f).join("/"),L=O.slice(-P.length);if((y.caseSensitive?L:L.toLowerCase())!==P||O.length-P.length<_.length)continue}a.push({node:y,index:o,skipped:h,statics:g,dynamics:p,optionals:v,extract:m,rawParams:S})}}if(d.optional){const C=h|1<<d.depth+1;for(let y=d.optional.length-1;y>=0;y--){const _=d.optional[y];a.push({node:_,index:f,skipped:C,statics:g,dynamics:p,optionals:v,extract:m,rawParams:S})}if(!w)for(let y=d.optional.length-1;y>=0;y--){const _=d.optional[y],{prefix:P,suffix:O}=_;if(P||O){const L=_.caseSensitive?R:x??=R.toLowerCase();if(P&&!L.startsWith(P)||O&&L.indexOf(O,L.length-O.length)<P.length)continue}a.push({node:_,index:f+1,skipped:h,statics:g,dynamics:p,optionals:v+Ue(o,f),extract:m,rawParams:S})}}if(!w&&d.dynamic&&R)for(let C=d.dynamic.length-1;C>=0;C--){const y=d.dynamic[C],{prefix:_,suffix:P}=y;if(_||P){const O=y.caseSensitive?R:x??=R.toLowerCase();if(_&&!O.startsWith(_)||P&&O.indexOf(P,O.length-P.length)<_.length)continue}a.push({node:y,index:f+1,skipped:h,statics:g,dynamics:p+Ue(o,f),optionals:v,extract:m,rawParams:S})}if(!w&&d.staticInsensitive){const C=d.staticInsensitive.get(x??=R.toLowerCase());C&&a.push({node:C,index:f+1,skipped:h,statics:g+Ue(o,f),dynamics:p,optionals:v,extract:m,rawParams:S})}if(!w&&d.static){const C=d.static.get(R);C&&a.push({node:C,index:f+1,skipped:h,statics:g+Ue(o,f),dynamics:p,optionals:v,extract:m,rawParams:S})}if(d.pathless)for(let C=d.pathless.length-1;C>=0;C--){const y=d.pathless[C];a.push({node:y,index:f,skipped:h,statics:g,dynamics:p,optionals:v,extract:m,rawParams:S})}}if(u)return u;if(s&&l){let c=l.index;for(let f=0;f<l.index;f++)c+=t[f].length;const d=c===e.length?"/":e.slice(c);return l.rawParams??=Object.create(null),l.rawParams["**"]=decodeURIComponent(d),l}return null}function Ue(e,t){return 2**(e-t-1)}function jr(e,t){return e===2**(t-1)-1}function Gn(e,t,n){let s,i;try{[s,i]=js(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 qe(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===se)>(e.node.kind===se)||t.node.kind===se==(e.node.kind===se)&&t.node.depth>e.node.depth))):!0}function zr(e,t,n){const s=Ts(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=be(`/${s}${l.pathname}`),l)};return n?{input:({url:l})=>Bt(n,a.input({url:l})),output:({url:l})=>a.output({url:Hs(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 Hs(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 Hr(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())),d=s(()=>({status:o.get(),isLoading:o.get()==="pending",matches:c.get(),location:a.get(),resolvedLocation:l.get()}));function f(p){let v=r.get(p);return v||(v=n(void 0),r.set(p,v)),v}const h={status:o,location:a,resolvedLocation:l,ids:u,matches:c,byRoute:r,__store:d,getMatchStore:f,setMatches:g};function g(p){const v=u.get(),m=p.map(S=>S.routeId);i(()=>{fr(v,m)||u.set(m);for(const S of v)m.includes(S)||r.get(S).set(()=>{});for(const S of p){const w=f(S.routeId);w.get()!==S&&w.set(S)}})}return h}var ae="__TSR_index",Nn="popstate",Un="beforeunload",Br=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function tt(e){const t=Br.exec(e);return t?"/"+e.slice(t[0].length):e}function Bs(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,t=>`
1
+ import{r as en,t as dt}from"./rolldown-runtime-gZ9xeEJX.js";import{It as tn}from"./icons-DqpsVskx.js";import{At as _i,jt as bi}from"./radix-ui-O7fUb8xo.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@1.23.0"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="50b65299-0214-4ebf-a56b-f985e59b32eb",e._sentryDebugIdIdentifier="sentry-dbid-50b65299-0214-4ebf-a56b-f985e59b32eb")}catch{}})();var Fe=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(){}},xi=class extends Fe{#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"}},nn=new xi,Pi={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Fi=class{#t=Pi;#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)}},fe=new Fi;function Ei(e){setTimeout(e,0)}var Ii=typeof window>"u"||"Deno"in globalThis;function z(){}function Mi(e,t){return typeof e=="function"?e(t):e}function kt(e){return typeof e=="number"&&e>=0&&e!==1/0}function gs(e,t){return Math.max(e+(t||0)-Date.now(),0)}function re(e,t){return typeof e=="function"?e(t):e}function N(e,t){return typeof e=="function"?e(t):e}function Fn(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(!De(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 En(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(!De(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 De(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>De(e[n],t[n])):!1}var Li=Object.prototype.hasOwnProperty;function ps(e,t,n=0){if(e===t)return e;if(n>500)return t;const s=In(e)&&In(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],d=e[c],f=t[c];if(d===f){a[c]=d,(s?u<i:Li.call(e,c))&&l++;continue}if(d===null||f===null||typeof d!="object"||typeof f!="object"){a[c]=f;continue}const h=ps(d,f,n+1);a[c]=h,h===d&&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 In(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Dt(e){if(!Mn(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Mn(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Mn(e){return Object.prototype.toString.call(e)==="[object Object]"}function Oi(e){return new Promise(t=>{fe.setTimeout(t,e)})}function At(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ps(e,t):t}function Ti(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function ki(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var rn=Symbol();function ms(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 Di(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 Ae=(()=>{let e=()=>Ii;return{isServer(){return e()},setIsServer(t){e=t}}})();function $t(){let e,t;const n=new Promise((i,r)=>{e=i,t=r});n.status="pending",n.catch(()=>{});function s(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{s({status:"fulfilled",value:i}),e(i)},n.reject=i=>{s({status:"rejected",reason:i}),t(i)},n}function rl(e){return e.state.status==="success"}var Ai=Ei;function $i(){let e=[],t=0,n=a=>{a()},s=a=>{a()},i=Ai;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 V=$i(),Vi=class extends Fe{#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}},rt=new Vi;function ji(e){return Math.min(1e3*2**e,3e4)}function vs(e){return(e??"online")==="online"?rt.isOnline():!0}var Vt=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Ss(e){let t=!1,n=0,s;const i=$t(),r=()=>i.status!=="pending",o=p=>{if(!r()){const v=new Vt(p);f(v),e.onCancel?.(v)}},a=()=>{t=!0},l=()=>{t=!1},u=()=>nn.isFocused()&&(e.networkMode==="always"||rt.isOnline())&&e.canRun(),c=()=>vs(e.networkMode)&&e.canRun(),d=p=>{r()||(s?.(),i.resolve(p))},f=p=>{r()||(s?.(),i.reject(p))},h=()=>new Promise(p=>{s=v=>{(r()||u())&&p(v)},e.onPause?.()}).then(()=>{s=void 0,r()||e.onContinue?.()}),g=()=>{if(r())return;let p;const v=n===0?e.initialPromise:void 0;try{p=v??e.fn()}catch(m){p=Promise.reject(m)}Promise.resolve(p).then(d).catch(m=>{if(r())return;const S=e.retry??(Ae.isServer()?0:3),w=e.retryDelay??ji,R=typeof w=="function"?w(n,m):w,x=S===!0||typeof S=="number"&&n<S||typeof S=="function"&&S(n,m);if(t||!x){f(m);return}n++,e.onFail?.(n,m),Oi(R).then(()=>u()?void 0:h()).then(()=>{t?f(m):g()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(s?.(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?g():h().then(g),i)}}var ys=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kt(this.gcTime)&&(this.#t=fe.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ae.isServer()?1/0:3e5))}clearGcTimeout(){this.#t!==void 0&&(fe.clearTimeout(this.#t),this.#t=void 0)}};function zi(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 d=g=>{Di(g,()=>t.signal,()=>c=!0)},f=ms(t.options,t.fetchOptions),h=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 d(C),C})(),w=await f(S),{maxPages:R}=t.options,x=v?ki:Ti;return{pages:x(g.pages,w,R),pageParams:x(g.pageParams,p,R)}};if(i&&r.length){const g=i==="backward",p=g?ws:jt,v={pages:r,pageParams:o};a=await h(v,p(s,v),g)}else{const g=e??r.length;do{const p=l===0?o[0]??s.initialPageParam:jt(s,a);if(l>0&&p==null)break;a=await h(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 jt(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 ws(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Hi(e,t){return t?jt(e,t)!=null:!1}function Bi(e,t){return!t||!e.getPreviousPageParam?!1:ws(e,t)!=null}var Gi=class extends ys{#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=On(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=On(this.options);t.data!==void 0&&(this.setState(Ln(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(e,t){const n=At(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(z).catch(z):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=>N(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=>re(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:!gs(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){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#a||this.#h()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#h(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}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 a=this.observers.find(l=>l.options.queryFn);a&&this.setOptions(a.options)}const n=new AbortController,s=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i=()=>{const a=ms(this.options,t),u=(()=>{const c={client:this.#r,queryKey:this.queryKey,meta:this.meta};return s(c),c})();return this.#a=!1,this.options.persister?this.options.persister(a,u,this):a(u)},o=(()=>{const a={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return s(a),a})();(this.#t==="infinite"?zi(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}),this.#i=Ss({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:a=>{a instanceof Vt&&a.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(a,l)=>{this.#l({type:"failed",failureCount:a,error:l})},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 a=await this.#i.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#s.config.onSuccess?.(a,this),this.#s.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof Vt){if(a.silent)return this.#i.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#l({type:"error",error:a}),this.#s.config.onError?.(a,this),this.#s.config.onSettled?.(this.state.data,a,this),a}finally{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,...Cs(n.data,this.options),fetchMeta:e.meta??null};case"success":const s={...n,...Ln(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),V.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:e})})}};function Cs(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:vs(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ln(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function On(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 Rs=class extends Fe{constructor(e,t){super(),this.options=t,this.#t=e,this.#a=null,this.#o=$t(),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#n=void 0;#s=void 0;#r;#i;#o;#a;#h;#l;#c;#d;#u;#f;#g=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),Tn(this.#e,this.options)?this.#p():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zt(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zt(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#C(),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 N(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#R(),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&&kn(this.#e,n,this.options,t)&&this.#p(),this.updateResult(),s&&(this.#e!==n||N(this.options.enabled,this.#e)!==N(t.enabled,this.#e)||re(this.options.staleTime,this.#e)!==re(t.staleTime,this.#e))&&this.#m();const i=this.#v();s&&(this.#e!==n||N(this.options.enabled,this.#e)!==N(t.enabled,this.#e)||i!==this.#f)&&this.#S(i)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),n=this.createResult(t,e);return Ui(this,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),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(e){this.#g.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);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#p({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#p(e){this.#R();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(z)),t}#m(){this.#w();const e=re(this.options.staleTime,this.#e);if(Ae.isServer()||this.#s.isStale||!kt(e))return;const t=gs(this.#s.dataUpdatedAt,e)+1;this.#d=fe.setTimeout(()=>{this.#s.isStale||this.updateResult()},t)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#S(e){this.#C(),this.#f=e,!(Ae.isServer()||N(this.options.enabled,this.#e)===!1||!kt(this.#f)||this.#f===0)&&(this.#u=fe.setInterval(()=>{(this.options.refetchIntervalInBackground||nn.isFocused())&&this.#p()},this.#f))}#y(){this.#m(),this.#S(this.#v())}#w(){this.#d!==void 0&&(fe.clearTimeout(this.#d),this.#d=void 0)}#C(){this.#u!==void 0&&(fe.clearInterval(this.#u),this.#u=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,d;if(t._optimisticResults){const C=this.hasListeners(),y=!C&&Tn(e,t),_=C&&kn(e,n,t,s);(y||_)&&(u={...u,...Cs(l.data,e.options)}),t._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:f,errorUpdatedAt:h,status:g}=u;d=u.data;let p=!1;if(t.placeholderData!==void 0&&d===void 0&&g==="pending"){let C;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(C=i.data,p=!0):C=typeof t.placeholderData=="function"?t.placeholderData(this.#c?.state.data,this.#c):t.placeholderData,C!==void 0&&(g="success",d=At(i?.data,C,t),c=!0)}if(t.select&&d!==void 0&&!p)if(i&&d===r?.data&&t.select===this.#h)d=this.#l;else try{this.#h=t.select,d=t.select(d),d=At(i?.data,d,t),this.#l=d,this.#a=null}catch(C){this.#a=C}this.#a&&(f=this.#a,d=this.#l,h=Date.now(),g="error");const v=u.fetchStatus==="fetching",m=g==="pending",S=g==="error",w=m&&v,R=d!==void 0,x={status:g,fetchStatus:u.fetchStatus,isPending:m,isSuccess:g==="success",isError:S,isInitialLoading:w,isLoading:w,data:d,dataUpdatedAt:u.dataUpdatedAt,error:f,errorUpdatedAt:h,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&&!R,isPaused:u.fetchStatus==="paused",isPlaceholderData:c,isRefetchError:S&&R,isStale:an(e,t),refetch:this.refetch,promise:this.#o,isEnabled:N(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const C=x.data!==void 0,y=x.status==="error"&&!C,_=L=>{y?L.reject(x.error):C&&L.resolve(x.data)},P=()=>{const L=this.#o=x.promise=$t();_(L)},O=this.#o;switch(O.status){case"pending":e.queryHash===n.queryHash&&_(O);break;case"fulfilled":(y||x.data!==O.value)&&P();break;case"rejected":(!y||x.error!==O.reason)&&P()}}return x}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.#c=this.#e),it(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!this.#g.size)return!0;const r=new Set(i??this.#g);return this.options.throwOnError&&r.add("error"),Object.keys(this.#s).some(o=>{const a=o;return this.#s[a]!==e[a]&&r.has(a)})};this.#_({listeners:n()})}#R(){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()}#_(e){V.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function Ni(e,t){return N(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&N(t.retryOnMount,e)===!1)}function Tn(e,t){return Ni(e,t)||e.state.data!==void 0&&zt(e,t,t.refetchOnMount)}function zt(e,t,n){if(N(t.enabled,e)!==!1&&re(t.staleTime,e)!=="static"){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&an(e,t)}return!1}function kn(e,t,n,s){return(e!==t||N(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&an(e,n)}function an(e,t){return N(t.enabled,e)!==!1&&e.isStaleByTime(re(t.staleTime,e))}function Ui(e,t){return!it(e.getCurrentResult(),t)}var qi=class extends Rs{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",d=o&&l==="backward",f=i&&l==="backward";return{...s,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Hi(t,n.data),hasPreviousPage:Bi(t,n.data),isFetchNextPageError:u,isFetchingNextPage:c,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:a&&!u&&!d,isRefetching:r&&!c&&!f}}},Ki=class extends ys{#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||_s(),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.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=Ss({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(r,o)=>{this.#r({type:"failed",failureCount:r,error:o})},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)});const s=this.state.status==="pending",i=!this.#s.canStart();try{if(s)t();else{this.#r({type:"pending",variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const o=await this.options.onMutate?.(e,n);o!==this.state.context&&this.#r({type:"pending",context:o,variables:e,isPaused:i})}const r=await this.#s.start();return await this.#n.config.onSuccess?.(r,e,this.state.context,this,n),await this.options.onSuccess?.(r,e,this.state.context,n),await this.#n.config.onSettled?.(r,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(r,null,e,this.state.context,n),this.#r({type:"success",data:r}),r}catch(r){try{await this.#n.config.onError?.(r,e,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onError?.(r,e,this.state.context,n)}catch(o){Promise.reject(o)}try{await this.#n.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,r,e,this.state.context,n)}catch(o){Promise.reject(o)}throw this.#r({type:"error",error:r}),r}finally{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),V.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function _s(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Qi=class extends Fe{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(e,t,n){const s=new Ki({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=Ge(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=Ge(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=Ge(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=Ge(e);return typeof t=="string"?this.#e.get(t)?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){V.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>En(t,n))}findAll(e={}){return this.getAll().filter(t=>En(e,t))}notify(e){V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return V.batch(()=>Promise.all(e.map(t=>t.continue().catch(z))))}};function Ge(e){return e.options.scope?.id}var Wi=class extends Fe{#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)}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??_s();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){V.batch(()=>{if(this.#s&&this.hasListeners()){const t=this.#e.variables,n=this.#e.context,s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,n,s)}catch(i){Promise.reject(i)}try{this.#s.onSettled?.(e.data,null,t,n,s)}catch(i){Promise.reject(i)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,n,s)}catch(i){Promise.reject(i)}try{this.#s.onSettled?.(void 0,e.error,t,n,s)}catch(i){Promise.reject(i)}}}this.listeners.forEach(t=>{t(this.#e)})})}},Ji=class extends Fe{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,n){const s=t.queryKey,i=t.queryHash??sn(s,t);let r=this.get(i);return r||(r=new Gi({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){const t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){V.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=>Fn(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Fn(e,n)):t}notify(e){V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){V.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){V.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ol=class{#t;#e;#n;#s;#r;#i;#o;#a;constructor(e={}){this.#t=e.queryCache||new Ji,this.#e=e.mutationCache||new Qi,this.#n=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#o=nn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#a=rt.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(re(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=Mi(t,i);if(r!==void 0)return this.#t.build(this,s).setData(r,{...n,manual:!0})}setQueriesData(e,t,n){return V.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;V.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#t;return V.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=V.batch(()=>this.#t.findAll(e).map(i=>i.cancel(n)));return Promise.all(s).then(z).catch(z)}invalidateQueries(e,t={}){return V.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=V.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(z)),i.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(s).then(z)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#t.build(this,t);return n.isStaleByTime(re(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(z).catch(z)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(z).catch(z)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return rt.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=>{De(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=>{De(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()}},b=en(tn(),1),M=bi(),bs=b.createContext(void 0),xs=e=>{const t=b.useContext(bs);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},al=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,M.jsx)(bs.Provider,{value:e,children:t})),Ps=b.createContext(!1),Xi=()=>b.useContext(Ps),ll=Ps.Provider;function Yi(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Zi=b.createContext(Yi()),er=()=>b.useContext(Zi),tr=(e,t,n)=>{const s=n?.state.error&&typeof e.throwOnError=="function"?on(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},nr=e=>{b.useEffect(()=>{e.clearReset()},[e])},sr=({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])),ir=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))}},rr=(e,t)=>e.isLoading&&e.isFetching&&!t,or=(e,t)=>e?.suspense&&t.isPending,Dn=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Fs(e,t,n){const s=Xi(),i=er(),r=xs(n),o=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(o);const a=r.getQueryCache().get(o.queryHash);o._optimisticResults=s?"isRestoring":"optimistic",ir(o),tr(o,i,a),nr(i);const l=!r.getQueryCache().get(o.queryHash),[u]=b.useState(()=>new t(r,o)),c=u.getOptimisticResult(o),d=!s&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(f=>{const h=d?u.subscribe(V.batchCalls(f)):z;return u.updateResult(),h},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),b.useEffect(()=>{u.setOptions(o)},[o,u]),or(o,c))throw Dn(o,u,i);if(sr({result:c,errorResetBoundary:i,throwOnError:o.throwOnError,query:a,suspense:o.suspense}))throw c.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(o,c),o.experimental_prefetchInRender&&!Ae.isServer()&&rr(c,s)&&(l?Dn(o,u,i):a?.promise)?.catch(z).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?c:u.trackResult(c)}function ul(e,t){return Fs(e,Rs,t)}function cl(e,t){const n=xs(t),[s]=b.useState(()=>new Wi(n,e));b.useEffect(()=>{s.setOptions(e)},[s,e]);const i=b.useSyncExternalStore(b.useCallback(o=>s.subscribe(V.batchCalls(o)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),r=b.useCallback((o,a)=>{s.mutate(o,a).catch(z)},[s]);if(i.error&&on(s.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:r,mutateAsync:i.mutate}}function dl(e,t){return Fs(e,qi,t)}var An=b.use,ln=b.useLayoutEffect;function le(e){return e[e.length-1]}function Es(e,t){return typeof e=="function"?e(t):e}var un=Object.prototype.hasOwnProperty;function Is(e){for(const t in e)if(un.call(e,t))return!0;return!1}var Ze=()=>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&&!(ot(e)&&ot(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,d,f;if(i){for(;u<l&&(f=u,d=e[f],c=t[f],c=d===c?d:typeof d=="object"?oe(d,c,n,s):c,c===d);u++);if(u===l&&o===l)return e}else{let g=o===l,p=!0;for(;u<l;u++){f=a[u],d=e[f];const v=t[f];c=d===v?d:typeof d=="object"?oe(d,v,n,s):v,g&&=c===d&&(r[u]===f||un.call(e,f)),p&&=Object.is(c,v),r[u]=c}if(g)return Object.getOwnPropertySymbols(e).length?t:e;if(p)return t}const h=i?a.fill(0):n?Ze():{};for(let g=0;g<l;g++)f=i?g:a[g],i?(d=e[f],g>u&&(c=t[f],c=d===c?d:typeof d=="object"?oe(d,c,n,s):c),h[f]=g<u?d:c):h[f]=r[g];return h}function ot(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(ot(e)&&ot(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 ar(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 lr=/[\x00-\x1f\x7f"<>`{}]/g;function ur(e){return e.replace(lr,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function $n(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 ur(t)}var cr=["http:","https:","mailto:","tel:"];function $e(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 Ms=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Ls(e,t){if(!e)return!1;if(Ms.test(e))return!0;const n=$e(e);return n?!t.has(n):!1}function Ee(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+=$n(e.slice(s,i.index))+i[0],s=n.lastIndex;t+=$n(s?e.slice(s):e)}return t}function dr(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function fr(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 cn(){throw new Error("Invariant failed")}function be(e){return e.replace(/\/{2,}/g,"/")}function Os(e){return e==="/"?e:e.replace(/^\/+/,"")}function J(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/+$/,""):e}function Ts(e){return J(Os(e))}function Vn(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function jn(e,t,n="never",s){if(t.includes("//")&&(t=be(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=be(e)),o=e.split("/");o.length>1&&le(o)==="";)o.pop();const u=t.split("/");for(let c=0,d=u.length;c<d;c++){const f=u[c];f===""?c?c===d-1&&o.push(f):o=[f]:f===".."?o.length>1?o.pop():o=[""]:f==="."||o.push(f)}}o.length>1&&(le(o)===""?n==="never"&&o.pop():n==="always"&&o.push(""));const a=o.join("/"),l=(i?be(a):a)||"/";return r&&s&&s.set(r,l),l}function hr(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 gr(e){return e==null||e===""}function pr(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 zn(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,d]=a,f=l===2,h=f&&d!==void 0?d+r:d;let g=n[u];if(!(l===3&&g==null)){if(i&&(i[u]=g,f&&(i["*"]=g)),f&&gr(g)){if(c==="/"&&!h)continue;g=""}o+=c+pr(u,g,s)+(h||"")}}return o+r||"/"}function Pe(e){return e?.isNotFound===!0}function mr(){try{return sessionStorage}catch{return}}var vr="tsr-scroll-restoration-v1_3",ks=mr();function Sr(){try{return JSON.parse(ks?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function yr(){try{ks?.setItem(vr,JSON.stringify(Re))}catch{}}var Re=Sr(),Hn="data-scroll-restoration-id",wr=e=>e.state.__TSR_key||e.href;function Cr(e){const t=e.getAttribute(Hn);if(t)return`[${Hn}="${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 Ne=!1,et="window";function Ht(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function Bn(e){const t=new Set;for(const n of e){if(n===et)continue;const s=Ht(n);s&&t.add(s)}return t}function Rr(e,t){const n=t??e.options.scrollRestoration,s=e._scroll;n&&(s.restoring=!0);const i=e.options.getScrollRestorationKey||wr,r=new Set,o=a=>{const l=Re[a]||={};for(const u of r)u===document?l[et]={scrollX,scrollY}:u.isConnected&&(l[Cr(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};n&&!s.restoration&&(s.restoration=!0,Ne=!1,history.scrollRestoration="manual",document.addEventListener("scroll",a=>{Ne||r.add(a.target)},!0),e.subscribe("onBeforeLoad",a=>{a.fromLocation&&o(i(a.fromLocation)),r.clear()}),addEventListener("pagehide",()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),yr()})),!s.reset&&(s.reset=!0,e.subscribe("onRendered",a=>{const l=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,c=s.next,d=s.hash;let f;if(r.clear(),s.next=!0,s.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const h=i(a.toLocation),g=a.fromLocation&&i(a.fromLocation);if(s.restoring&&g&&g!==h){const p=Re[g];if(p){let v=Re[h];for(const m in p){if(m===et){if(c)continue}else{const S=Ht(m);if(!S||c&&u&&(f??=Bn(u),f.has(S)))continue}v||(v=Re[h]={}),v[m]??=p[m]}}}Ne=!0;try{const p=a.toLocation.hash,v=a.toLocation.state.__hashScrollIntoViewOptions??!0;let m=!1;if(c){!p&&u&&(f??=Bn(u));const S=p&&v&&d,w=s.restoring?Re[h]:void 0;if(w)for(const R in w){const{scrollX:x,scrollY:C}=w[R];if(R===et){if(S)continue;scrollTo({top:C,left:x,behavior:l}),m=!0}else{const y=Ht(R);y&&(y.scrollLeft=x,y.scrollTop=C,f?.delete(y))}}if(!p){const R={top:0,left:0,behavior:l};if(m||scrollTo(R),f)for(const x of f)x.scrollTo(R)}}!m&&p&&v&&document.getElementById(p)?.scrollIntoView(v)}finally{Ne=!1}}))}function _r(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 br(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 Ds=/^(?:\s|["[{\d-]|fa|nu|tr)/,xr=Fr(JSON.parse),Pr=Er(JSON.stringify,JSON.parse);function Fr(e){const t=e===JSON.parse;return n=>{n[0]==="?"&&(n=n.substring(1));const s=br(n);for(const i in s){const r=s[i];if(typeof r=="string"){if(t&&!Ds.test(r))continue;try{s[i]=e(r)}catch{}}}return s}}function Er(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&&!Ds.test(i))return i;try{return t(i),e(i)}catch{}}return i}return i=>{const r=_r(i,s);return r?`?${r}`:""}}var Le="__root__";function Ir(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 As(e){return e instanceof Response&&!!e.options}function at(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 se=4,$s=5;function Mr(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 Lr(e,t,n){const s=e.substring(t,n);if(s.charCodeAt(0)===36)return s.length===1?[2,"_splat","",void 0]:[1,s.substring(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.substring(a,r);return[o?3:l?1:2,l||"_splat",s.substring(0,i),e.substring(t+r+1,l?n:e.length)]}}return s}function Ve(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,d=l?.caseSensitive??e,f=l?.params?.parse??l?.parseParams;let h,g=r?n-1:0;if(!s||a.includes("$")){h=r?.slice()??[];const m=le(h);m&&typeof m!="string"&&m[0]===2&&(h[h.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 w=S===-1?u:S;const R=Lr(a,m,w);o=w+1;let x;if(typeof R=="string"){if(!s)continue;let C=R,y;d?y=s.static??=new Map:(C=R.toLowerCase(),y=s.staticInsensitive??=new Map);const _=y.get(C);if(_)x=_;else{const P=he(s);x=P,y.set(C,P)}}else{const C=R[0];let y=R[2],_=R[3]??"";if(C===2&&(w=u,o=w+1),h&&g<w&&(g<m-1&&h.push(a.substring(g,m-1)),R[2]="/"+y,C===2&&R[3]!==void 0&&c<u&&(R[3]=_.slice(0,-1)),h.push(R),g=w),!s)continue;const P=d&&!!(y||_);d||(y=y.toLowerCase(),_=_.toLowerCase());const O=C===1?s.dynamic??=[]:C===3?s.optional??=[]:s.wildcard??=[],L=C!==2&&!f&&O.find(I=>!I.parse&&I.caseSensitive===P&&I.prefix===y&&I.suffix===_);if(L)x=L;else{const I=he(s,C,P,y,_);x=I,O.push(I),O.length===2&&i?.push(O)}}s=x}h&&g<c&&h.push(a.substring(g,c));const p=h?.slice();if(!s)return p;if(f&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const m=he(s,$s);(s.pathless??=[]).push(m),s=m}const v=(t.path||!t.children)&&!t.isRoot;if(v&&c<u){const m=he(s,se);s.index=m,s=m}return s.parse=f??null,s.priority=l?.params?.priority??0,s.route||(s.data=p,v&&(s.route=t)),[s,o,p]}function Vs(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 he(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 Or(e,t){const n=he(),s=[];function i(r,o,a,l){const[u,c,d]=Ve(!1,r,o,a,s,l);if(r.children)for(const f of r.children)i(f,c,u,d)}for(const r of e)i(r,1,n);for(const r of s)r.sort(Vs);t.masksTree=n,t.flatCache=at(1e3)}function Tr(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 kr(e,t,n,s,i){e||="/",s||="/";const r=t?`case\0${e}`:e;let o=i.singleCache.get(r);return o||(o=he(),Ve(t,{from:e},1,o),i.singleCache.set(r,o)),dn(s,o,n)}function Dr(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=zs(r.route)),t.matchCache.set(s,r),r}function Ar(e,t=!1){const n=he(),s=[],i={},r={};let o=0;function a(l,u,c,d){if(l.init(o),l.id in i&&cn(),i[l.id]=l,o!==0&&l.path){const p=J(l.fullPath);(!r[p]||l.fullPath.endsWith("/"))&&(r[p]=l)}o++;const[f,h,g]=Ve(t,l,u,c,s,d);if(l._interpolation=g,l.children)for(const p of l.children)a(p,h,f,g)}a(e,1,n);for(const l of s)l.sort(Vs);return{processedTree:{segmentTree:n,singleCache:at(1e3),matchCache:at(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:r}}function dn(e,t,n=!1){const s=e.split("/"),i=Vr(e,s,t,n);if(!i)return null;const[r]=js(e,s,i);return{route:i.node.route,rawParams:r}}function js(e,t,n){const s=$r(n.node),i=n.node.data&&Mr(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===se)break;if(c.kind===$s){o--,l--;continue}const d=t[o],f=l;if(d&&(l+=d.length),c.kind===1||c.kind===3){const h=i[u++];if(c.kind===3&&n.skipped&1<<a){o--,l=f-1;continue}const g=c.suffix||c.prefix?d.substring(c.prefix.length,d.length-c.suffix.length):d;(g||c.kind===1)&&(r[h]=decodeURIComponent(g))}else if(c.kind===2){const h=c,g=e.substring(f+h.prefix.length,e.length-h.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 zs(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function $r(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Vr(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:d,index:f,skipped:h,statics:g,dynamics:p,optionals:v}=c;let{extract:m,rawParams:S}=c;if(d.kind===2&&d.route&&!qe(u,c))continue;if(d.parse){if(!Gn(e,t,c))continue;S=c.rawParams,m=c.extract}s&&d.route&&d.kind!==se&&qe(l,c)&&(l=c);const w=f===o;if(w&&(d.route&&(!r||d.kind===se||d.kind===2)&&qe(u,c)&&(u=c),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;const R=w?void 0:t[f];let x;if(w&&d.index){const C={node:d.index,index:f,skipped:h,statics:g,dynamics:p,optionals:v,extract:m,rawParams:S};let y=!0;if(d.index.parse&&(Gn(e,t,C)||(y=!1)),y){if(!p&&!v&&!h&&jr(g,o))return C;qe(u,C)&&(u=C)}}if(d.wildcard)for(let C=d.wildcard.length-1;C>=0;C--){const y=d.wildcard[C],{prefix:_,suffix:P}=y;if(!(_&&(w||!(y.caseSensitive?R:x??=R.toLowerCase()).startsWith(_)))){if(P){if(w)continue;const O=t.slice(f).join("/"),L=O.slice(-P.length);if((y.caseSensitive?L:L.toLowerCase())!==P||O.length-P.length<_.length)continue}a.push({node:y,index:o,skipped:h,statics:g,dynamics:p,optionals:v,extract:m,rawParams:S})}}if(d.optional){const C=h|1<<d.depth+1;for(let y=d.optional.length-1;y>=0;y--){const _=d.optional[y];a.push({node:_,index:f,skipped:C,statics:g,dynamics:p,optionals:v,extract:m,rawParams:S})}if(!w)for(let y=d.optional.length-1;y>=0;y--){const _=d.optional[y],{prefix:P,suffix:O}=_;if(P||O){const L=_.caseSensitive?R:x??=R.toLowerCase();if(P&&!L.startsWith(P)||O&&L.indexOf(O,L.length-O.length)<P.length)continue}a.push({node:_,index:f+1,skipped:h,statics:g,dynamics:p,optionals:v+Ue(o,f),extract:m,rawParams:S})}}if(!w&&d.dynamic&&R)for(let C=d.dynamic.length-1;C>=0;C--){const y=d.dynamic[C],{prefix:_,suffix:P}=y;if(_||P){const O=y.caseSensitive?R:x??=R.toLowerCase();if(_&&!O.startsWith(_)||P&&O.indexOf(P,O.length-P.length)<_.length)continue}a.push({node:y,index:f+1,skipped:h,statics:g,dynamics:p+Ue(o,f),optionals:v,extract:m,rawParams:S})}if(!w&&d.staticInsensitive){const C=d.staticInsensitive.get(x??=R.toLowerCase());C&&a.push({node:C,index:f+1,skipped:h,statics:g+Ue(o,f),dynamics:p,optionals:v,extract:m,rawParams:S})}if(!w&&d.static){const C=d.static.get(R);C&&a.push({node:C,index:f+1,skipped:h,statics:g+Ue(o,f),dynamics:p,optionals:v,extract:m,rawParams:S})}if(d.pathless)for(let C=d.pathless.length-1;C>=0;C--){const y=d.pathless[C];a.push({node:y,index:f,skipped:h,statics:g,dynamics:p,optionals:v,extract:m,rawParams:S})}}if(u)return u;if(s&&l){let c=l.index;for(let f=0;f<l.index;f++)c+=t[f].length;const d=c===e.length?"/":e.slice(c);return l.rawParams??=Object.create(null),l.rawParams["**"]=decodeURIComponent(d),l}return null}function Ue(e,t){return 2**(e-t-1)}function jr(e,t){return e===2**(t-1)-1}function Gn(e,t,n){let s,i;try{[s,i]=js(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 qe(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===se)>(e.node.kind===se)||t.node.kind===se==(e.node.kind===se)&&t.node.depth>e.node.depth))):!0}function zr(e,t,n){const s=Ts(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=be(`/${s}${l.pathname}`),l)};return n?{input:({url:l})=>Bt(n,a.input({url:l})),output:({url:l})=>a.output({url:Hs(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 Hs(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 Hr(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())),d=s(()=>({status:o.get(),isLoading:o.get()==="pending",matches:c.get(),location:a.get(),resolvedLocation:l.get()}));function f(p){let v=r.get(p);return v||(v=n(void 0),r.set(p,v)),v}const h={status:o,location:a,resolvedLocation:l,ids:u,matches:c,byRoute:r,__store:d,getMatchStore:f,setMatches:g};function g(p){const v=u.get(),m=p.map(S=>S.routeId);i(()=>{fr(v,m)||u.set(m);for(const S of v)m.includes(S)||r.get(S).set(()=>{});for(const S of p){const w=f(S.routeId);w.get()!==S&&w.set(S)}})}return h}var ae="__TSR_index",Nn="popstate",Un="beforeunload",Br=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function tt(e){const t=Br.exec(e);return t?"/"+e.slice(t[0].length):e}function Bs(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,t=>`
2
2
  \r`.includes(t)?"":encodeURIComponent(t))),tt(e)}function Gr(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({task:o,navigateOpts:a,...l})=>{if(a?.ignoreBlocker??!1){o();return}const u=e.getBlockers?.()??[],c=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&u.length&&c)for(const d of u){const f=lt(l.path,l.state);if(await d.blockerFn({currentLocation:t,nextLocation:f,action:l.type})){e.onBlocked?.();return}}o()};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=qn(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=qn(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 qn(e,t){const n=fn();return{...t,key:n,__TSR_key:n,[ae]:e}}function Nr(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=>Bs(e?.createHref?e.createHref(y):y),l=e?.parseLocation??(()=>lt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const y=fn();t.history.replaceState({[ae]:0,key:y,__TSR_key:y},"")}let u=l(),c,d=!1,f=!1,h=!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,_,P)=>{const O=e?.createHref?a(_):void 0,L=!!v;L||(c=u),u=lt(_,P),v=[O??u.href,P,v?.[2]||y],L||queueMicrotask(()=>m())},w=y=>{u=l(),C.notify({type:y})},R=async()=>{if(g=!1,f){f=!1;return}const y=l(),_=y.state[ae]-u.state[ae],P=_===1,O=_===-1,L=!P&&!O||d;d=!1;const I=L?"GO":O?"BACK":"FORWARD",T=L?{type:"GO",index:_}:{type:O?"BACK":"FORWARD"};if(h)h=!1;else{const k=r();if(typeof document<"u"&&k.length){for(const D of k)if(await D.blockerFn({currentLocation:u,nextLocation:y,action:I})){f=!0,t.history.go(-_),C.notify(T);return}}}u=l(),C.notify(T)},x=y=>{if(g){g=!1;return}let _=!1;const P=r();if(typeof document<"u"&&P.length)for(const O of P){const L=O.enableBeforeUnload??!0;if(L===!0){_=!0;break}if(typeof L=="function"&&L()===!0){_=!0;break}}if(_)return y.preventDefault(),y.returnValue=""},C=Gr({getLocation:p,getLength:()=>t.history.length,pushState:(y,_)=>S(!0,y,_),replaceState:(y,_)=>S(!1,y,_),back:y=>(y&&(h=!0,g=!0),t.history.back()),forward:y=>{y&&(h=!0,g=!0),t.history.forward()},go:(y,_)=>{d=!0,_&&(h=!0,g=!0),t.history.go(y)},createHref:y=>a(y),flush:m,destroy:()=>{t.history.pushState=n,t.history.replaceState=s,t.removeEventListener(Un,x,{capture:!0}),t.removeEventListener(Nn,R)},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(Un,x,{capture:!0}),t.addEventListener(Nn,R),t.history.pushState=function(...y){const _=n.apply(t.history,y);return C._ignoreSubscribers||w("PUSH"),_},t.history.replaceState=function(...y){const _=s.apply(t.history,y);return C._ignoreSubscribers||w("REPLACE"),_},C}function lt(e,t){const n=Bs(e),s=n.indexOf("#"),i=n.indexOf("?");if(!t){const r=fn();t={[ae]:0,key:r,__TSR_key:r}}return{href:n,pathname:n.substring(0,s>0?i>0?Math.min(s,i):s:i>0?i:n.length),hash:s>-1?n.substring(s):"",search:i>-1?n.slice(i,s===-1?void 0:s):"",state:t}}function fn(){return(Math.random()+1).toString(36).substring(7)}function Rt(e,t){return e.protocol!=="http:"&&e.protocol!=="https:"||e.origin!==t||!!e.username||!!e.password}function _t(e){return e.pathname+e.search+e.hash}function Kn(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function ft(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Qn({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:s,...i}){return i}function Ur(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 Kr=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!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=Nr()),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!=="/"&&Ts(i)?zr(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=Hr(this.latestLocation,a),Rr(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=Ar(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Or(this.options.routeMasks,n.processedTree),{...n,resolvePathCache:at(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:d},f)=>{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:Ee(l),external:!1,searchStr:m,search:ye(s?.search,v),hash:Ee(c.slice(1)),state:oe(s?.state,f)}}const h=Bt(this.rewrite,new URL(d,this.origin)),g=this.options.parseSearch(h.search),p=this.options.stringifySearch(g);return h.search=p,{href:h.href.replace(h.origin,""),publicHref:d,pathname:Ee(tt(h.pathname)),external:!!this.rewrite&&Rt(h,this.origin),searchStr:p,search:ye(s?.search,g),hash:Ee(h.hash.slice(1)),state:oe(s?.state,f)}},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=Dr(J(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=lt(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=o._fromLocation||this._pendingLocation||this.latestLocation;let l;const u=()=>(s=!0,a),c=()=>(s=!0,l??=this.matchRoutesLightweight(a)),d=o.to?`${o.to}`:".",f=jn(d[0]==="/"?"":o.unsafeRelative==="path"?u().pathname:o.from??c()[1],d,this.options.trailingSlash,this.resolvePathCache),h=this.routesByPath[J(f)],g=f.includes("$");let p;if(h)p=h._branch??=zs(h);else if(g)p=[];else{const[k,D,$]=this.getMatchedRoutes(f);p=k,this.options.notFoundRoute&&(!$||$.path!=="/"&&D["**"])&&(p=[...p,this.options.notFoundRoute])}const v=g?h?._interpolation??Ve(!1,{fullPath:f},0):void 0;let m;for(const k of p){const D=k.options.params?.stringify??k.options.stringifyParams;if(D){const $=c()[3];if(m??=bt(o.params,$),!Is(m))break;m===$&&(m=Object.assign(Ze(),m));try{Object.assign(m,D(m))}catch{}}}m??=bt(o.params,Wr(o.params,v)?c()[3]:xt);const S=n.leaveParams?f:tt(Ee(v?zn(f,v,m,this.pathParamsDecoder):f)),w=Jr(p,n._includeValidateSearch),R=()=>{let k=c()[2];if(n._includeValidateSearch&&this.options.search?.strict){const D={};p.forEach($=>{if($.options.validateSearch)try{Object.assign(D,nt($.options.validateSearch,{...D,...k}))}catch{}}),k=D}return k},x=w.length?Xr(w,R(),o):o.search===!0?R():typeof o.search=="function"?o.search(R()):o.search||xt,C=this.options.stringifySearch(x),y=o.hash===!0?u().hash:typeof o.hash=="function"?o.hash(u().hash):o.hash||void 0,_=y?`#${y}`:"",P=o.state?o.state===!0?u().state:typeof o.state=="function"?o.state(u().state):o.state:xt,O=`${S}${C}${_}`;let L,I,T=!1;if(this.rewrite){const k=new URL(O,this.origin),D=k.origin,$=Hs(this.rewrite,k);L=_t(k),Rt($,D)?(I=$.href,T=!0):I=tt(_t($))}else L=dr(O),I=L;return{publicHref:I,href:L,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=Tr(r.pathname,this.processedTree);if(o){const a=Object.assign(Ze(),o.rawParams),{from:l,params:u,...c}=o.route,d=bt(u,a);r.maskedLocation=i({from:n.from,...c,params:d})}}return!s&&n._fromLocation&&!r.maskedLocation&&this.staticLocations.set(n,r),r},this.commitLocation=async({viewTransition:n,ignoreBlocker:s,...i})=>{const r=i.maskedLocation??i;if(r.external)return Wn(this,r.publicHref,{replace:i.replace,ignoreBlocker:s});let o;const a=J(this.latestLocation.href)===J(i.href)&&te(Qn(i.state),Qn(this.latestLocation.state)),l=this._commitPromise;let u;const c=new Promise(d=>{u=d});if(c.resolve=()=>{u(),l?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...h}=i;d&&(h={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state={...h.state,__hashScrollIntoViewOptions:f??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=n,o=i.replace?"REPLACE":"PUSH",this.history[o==="REPLACE"?"replace":"push"](h.publicHref,h.state,{ignoreBlocker:s}),this.history.subscribers.size||this.load({action:{type:o}})}return this._scroll.next=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?$e(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 Wn(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.hash=n.action.type==="PUSH"||n.action.type==="REPLACE"),await oo(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(ft(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,d]of r??[])d.some(f=>o.has(f.id))&&(r.delete(c),l.push(c));const u=c=>{if(o.has(c.id)){const d=this.routesById[c.routeId],f={...c,invalid:!0,...(n?.forcePending||c.status==="error"||c.status==="notFound")&&Kn(d)?{status:"pending",error:void 0}:void 0};return c._flight=void 0,f}return c};this._committed=s.map(u);for(const[c,d]of this._cache)o.has(c)&&(d.invalid=!0,n?.forcePending&&(d.status="pending"));for(const c of o)this._flights?.delete(c);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(Ms.test(i)||(r=$e(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=_t(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=xe,this.preloadRoute=n=>ao(this,n),this.matchRoute=(n,s)=>{const i={...n,to:n.to?jn(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=kr(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=hr(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??Pr,parseSearch:e.parseSearch??xr,protocolAllowlist:e.protocolAllowlist??cr}),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=Ve(!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["**"]:J(e.pathname))&&(this.options.notFoundRoute?r=[...r,this.options.notFoundRoute]:o=!0);const a=o?Yr(this.options.notFoundMode,r):void 0,l=new Array(r.length),u=this._committed,c=(f,h)=>{const g=u[h];return g?.routeId===f.id?g:f===this.options.notFoundRoute?u.find(p=>p.routeId===f.id):void 0};let d;for(let f=0;f<r.length;f++){const h=r[f],g=l[f-1];let p,v,m;{const T=g?.search??e.search,k=g?._strictSearch??void 0;try{const D=nt(h.options.validateSearch,{...T})??void 0;p={...T,...D},v={...k,...D}}catch(D){let $=D;if(D instanceof ut||($=new ut(D.message,{cause:D})),t?.throwOnError)throw $;p=T,v={},m=$}}let S="",w="";try{S=h.options.loaderDeps?.({search:p})??"",w=S&&JSON.stringify(S)||""}catch(T){if(t?.throwOnError)throw T;m??=T}const R=Ze(),x=h._interpolation?zn(h.fullPath,h._interpolation,s,this.pathParamsDecoder,R):h.fullPath,C=h.id+x+w,y=c(h,f),_=this._cache.get(C)??(y?.id===C?y:void 0);d=_?._strictParams??Object.assign(R,d);let P;if(!_)try{Jn(h,d)}catch(T){if(Pe(T)||As(T)?P=T:P=new Qr(T.message,{cause:T}),t?.throwOnError)throw P}const O=y?"stay":"enter";let L;if(_)L={..._,cause:O,search:ye(y?y.search:_.search,p),_strictSearch:v,searchError:m};else{const T=Kn(h)?"pending":"success";L={id:C,ssr:h.options.ssr,index:f,routeId:h.id,params:y?.params??d,_strictParams:d,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:O,loaderDeps:y?oe(y.loaderDeps,S):S,invalid:!1,preload:!1,staticData:h.options.staticData||{},fullPath:h.fullPath}}const I=a===h.id;L._notFound&&!I&&(L.error=void 0),L._notFound=I,l[f]=L}for(let f=0;f<l.length;f++){const h=l[f];h.params=h.cause==="stay"?ye(h.params,d):d,t?._controller&&(h.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 f of r)try{Object.assign(l,nt(f.options.validateSearch,l))}catch{}const u=n&&n.routeId===a.id&&n.pathname===e.pathname;let c;if(u)c=n.params;else{const f=o;for(const h of r)try{Jn(h,f)}catch{}c=f}const d=[r,a.fullPath,l,c];return this.lightweightCache.set(e,[s,d]),d}};async function Wn(e,t,{replace:n,ignoreBlocker:s}){if(!Ls(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 ut=class extends Error{},Qr=class extends Error{};function nt(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new ut("Async validation not supported");if(n.issues)throw new ut(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 Wr(e,t){return typeof e=="function"?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(n=>typeof n!="string"&&!un.call(e,n[1]))}var xt=Object.freeze({});function Jr(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,d)=>d(c),a):a);return i.postSearchFilters?i.postSearchFilters.reduce((c,d)=>d(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 d=nt(r,c);if(u&&d)for(const f in d)f in c||(u.defaulted||=new Map).set(f,d[f]);return{...c,...d}}catch{}return c};n.push(o)}}return n}function Xr(e,t,n){const s=(i,r,o)=>{if(i>=e.length){if(!n.search)return{};if(n.search===!0)return r;const l=Es(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 Yr(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 Le}function Jn(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 Zr(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 xe(e,t,n){const s=()=>t===!1?void 0:t?Gt(e,t):Zr(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 hn(e){const t=e.findIndex(n=>n.status!=="success"||n._notFound)+1;return t&&t<e.length?e.slice(0,t):e}var X=0,ne=1,ht=2,H=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 ze(e,t,n){return As(e)?[H,e]:Pe(e)?(e.routeId||=n,[ht,e]):t?(typeof e?.then=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[ne,e]):[X,e]}function gn(e,t){let n=ze(t,!0,e.id);if(n[0]!==ne)return n;try{e.options.onError?.(n[1])}catch(s){n=ze(s,!0,e.id)}return n}function Oe(e,t,n,s,i){return i[0].signal.aborted?ue:vn(e,t,n,gn(n,s),i)}async function eo(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 d=a[c],f=ve(e,d);d.abortController=n[0];const h=a[c-1]?.context??e.options.context??{},g={params:d.params,location:o,navigate:S=>e.navigate({...S,_fromLocation:o}),buildLocation:e.buildLocation,cause:u?"preload":d.cause,abortController:n[0],preload:u,matches:a,routeId:f.id};try{const S=d._ctx||=f.options.context?f.options.context({...g,deps:d.loaderDeps,context:h})||{}:void 0;d.context={...h,...S}}catch(S){return ee(e,d),[c,Oe(e,t,f,S,n)]}if(l.aborted)return[c,ue];const p=d.paramsError??d.searchError;if(p!==void 0)return ee(e,d),[c,Oe(e,t,f,p,n)];const v=f.options.beforeLoad;if(!v)continue;const m=d.status;c>=r&&(d.status="pending",n[7]?.());try{He(e,d,"beforeLoad",n[0]);const S=v({...g,search:d.search,context:d.context,...e.options.additionalContext}),w=await(typeof S?.then=="function"?me(S,l):S);if(l.aborted)return[c,ue];const R=vn(e,t,f,ze(w,!1,f.id),n);if(R[0]!==X)return ee(e,d),[c,R];d.context={...d.context,...w}}catch(S){return ee(e,d),[c,Oe(e,t,f,S,n)]}finally{d.status=m,He(e,d,!1,n[0])}}i()}function pn(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,pn(e,t,n)?.abort()}function B(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=pn(e,r,o);a&&i.push(a)}}for(const r of i)r.abort()}function mn(e){for(const t of e){const n=t._flight;n&&n[2]++}}function He(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 Gs(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 Xn(e,t,n,s,i,r,o){const a=o[0],l=a.signal;if(l.aborted)return ue;if(!i)return[X,void 0];let u=n._flight;He(e,n,"loader",a);try{if(!u){const c=new AbortController;u=[Promise.resolve().then(()=>i(Gs(e,t,n,s,c,r,!!o[3]))).then(d=>ze(d,!1,s.id),d=>ze(d,!0,s.id)).then(d=>(d[0]!==X&&e._flights?.get(n.id)===u&&(e._flights.delete(n.id),u[2]||c.abort()),d[0]===ne&&u[2]?gn(s,d[1]):d)),c,1],(e._flights??=new Map).set(n.id,u)}return n._flight=u,n.abortController=u[1],vn(e,t,s,await me(u[0],l),o)}catch(c){if(c!==l||!l.aborted)throw c;return ee(e,n),ue}finally{He(e,n,!1,a)}}function Yn(e,t,n){t[0]!==H&&(e.status="success",e.error=void 0,t[0]===X?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function to(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 Zn(e,t){return t[0]===ne||t[0]===ht?{...e,status:t[0]===ne?"error":"notFound",error:t[1],_flight:void 0}:e}function no(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 d,f=!1,h;try{if(a.status==="success"&&(d=l.options.shouldReload,typeof d=="function"&&(d=d(Gs(e,t,a,l,r[0],i,u))),r[0].signal.aborted&&(h=ue)),!h)if(a.status!=="success")f=!0;else{const I=u||a.preload?l.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.options.defaultStaleTime??0;f=!!(a.invalid||d||d===void 0&&Date.now()-a.updatedAt>=I&&(r[5]||a.cause==="enter"||r[2].some(T=>T.routeId===a.routeId&&T.id!==a.id)))}}catch(I){a.invalid=!0,ee(e,a),h=Oe(e,t,l,I,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||h?S=void 0:S&&!f&&!u&&d===void 0?f=!0:f||(S=void 0);const w=!!(g&&f&&a.status==="success"&&!u&&!r[4]&&((p?void 0:g.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),R=f&&m,x=R&&!w&&(a.status!=="success"||!!g),C=n>=o?r[7]:void 0,y=l.lazyFn&&l._lazy!==!0?C:void 0;if(R&&!g&&(a.invalid=!1,a.updatedAt=Date.now()),S&&S[2]++,x){const I=a._flight;a._flight=S,pn(e,a,I)?.abort(),n>=o&&(a.status="pending"),C?.()}R||(a.isFetching=!1);const _=!h&&x?Xn(e,t,a,l,v,i,r).then(I=>(Yn(a,I,u),I[0]===X&&(g&&!r[0].signal.aborted&&to(e,a,c),n>=o&&(a.status="pending")),I)):Promise.resolve(h??[X,a.loaderData]),P=(async()=>{try{const T=xe(l,void 0,y);T&&await me(T,r[0].signal)}catch(T){if(!t[1].some((k,D)=>D<=n&&(k.status==="error"||k.status==="notFound"||k._notFound)))return[n,Oe(e,t,l,T,r)]}const I=await _;x&&I[0]===X&&a.status==="pending"&&!r[0].signal.aborted&&(a.status="success",C?.())})();if(s.push([n,_,P]),!w)return _.then(I=>Zn(a,I));const O={...a,status:"pending",preload:!1,_flight:S};a.invalid=!1,a.isFetching="loader";const L=Xn(e,t,O,l,v,i,r).then(I=>(a.isFetching=!1,Yn(O,I,!1),I));return(t[2]??=[]).push([n,L,P,O]),L.then(I=>Zn(O,I))}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=xe(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]&&(B(e,t[2].map(n=>n[3])),t[2]=void 0)}async function es(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]>=H)throw[a,o];!i&&o[0]!==X&&(i=[a,o],await Promise.all((n??[]).map(l=>{if(!(l[0]<=a))return l[1].then(u=>{if(u[0]===H)throw[l[0],u]})})))}})))}catch(r){return r}return t??i}function vn(e,t,n,s,i,r){for(;s[0]===H;){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]?[H,c]:[H,c,u]}return[H,o,l]}catch(l){s=r?[ne,l]:gn(n,l),r=!0}}return s}async function Ns(e,t,n,s,i,r){const o=t[1];let a=await i,l=!1;const u=o.findIndex(h=>h._notFound),c=h=>h[1][0]===ht?Nt(e,o,h,s.signal):h[0];let d=u<0?o.length:u;if((a?.[1][0]??0)>=H)d=0;else if(a){d=a[2]??=await c(a);for(const h of n){if(h[0]>=d)break;const g=await h[1];if(g[0]!==X&&g[0]<H&&!("loaderData"in o[h[0]])){a=[h[0],g],d=a[2]=await c(a);break}}}for(const h of n){if(h[0]>=d)break;const g=await h[2];if(g){a=g;break}}if((a?.[1][0]??0)>=H){const h=a[1];if(h[0]!==H||h[1].options.reloadDocument||h[2])return ge(e,t),h;l=!0,a=[0,[ne,new Error("Too many redirects")]]}const f=a?a[2]??await c(a):u;if(f>=0){const h=a?.[1],g=h?.[0],p=o[f],v=h?.[1],m=()=>{h&&(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(),h||r?.();const S=ve(e,p);try{await me(h?Promise.resolve().then(()=>xe(S,g===ne?"errorComponent":"notFoundComponent")):Promise.all([xe(S),xe(S,"notFoundComponent")]),s.signal)}catch(w){if(w===s.signal&&s.signal.aborted)return ge(e,t),ue}h?l&&(s.abort(),await Promise.all([...n.map(w=>w[1]),...n.map(w=>w[2]),...(t[2]??[]).map(w=>w[1])]),ge(e,t),B(e,o),m()):p.status="success"}return t}async function Us(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,d]=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=d}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],w=a[c];if(S?.id!==m.id||S.status!=="success"||m.preload||w?.id!==m.id||w.status!=="success"||(c++,S._notFound||w._notFound))break}const d=[],f=s[6]??0;let h=f?Promise.resolve(n[f-1]):void 0;const g=()=>{for(let m=f;m<u&&!r.aborted;m++)h=no(e,i,m,d,h,s,c)},p=await eo(e,i,s,u,g,c);if(p){if(s[4]=!0,u=p[0],p[1][0]===ht){const m=await Nt(e,n,p,r);p[2]=m,u=Math.min(u,m+1)}else p[1][0]>=H&&(u=0);g()}if(!r.aborted&&!s[3]){const m=[];for(const[S,w]of e._flights??[])w[2]||(e._flights.delete(S),m.push(w[1]));for(const S of m)S.abort()}const v=Ns(e,i,d,s[0],es(d,p,i[2]),s[7]);i[2]?.length&&(i[3]=es(i[2],void 0,void 0,v.then(m=>je(m)?0:hn(n).length,()=>0))),o=await v}catch(a){if(ge(e,i),a===r&&r.aborted)return ue;throw a}return je(o)?o:Us(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,d=u.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof c!="number"||c===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}const f=u.options.pendingMinMs??e.options.defaultPendingMinMs??0;let h=!1;if(i?.[1]===o.id?(h=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,l?Date.now()+f:t[4]+c,void 0,l||void 0,d]),i[4]&&!h&&i[5]===d)return;if(i[5]=d,!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()+f),v));return}}function Ie(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 ts(e,t){const n=e._pending;if(!n)return;clearTimeout(n[3]);const s=n[2]-Date.now();if(!n[4]||s<=0||!hn(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 Ks(e,t){e._committed=t,e.stores.setMatches(t)}function so(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=hn(n).length,l=new Map;{const c=Date.now(),d=new Set;for(let f=0;f<n.length;f++){const h=n[f];(f<a||h.status==="success")&&d.add(h.id)}for(const f of[...i,...o.values()]){if(f.status!=="success"||d.has(f.id))continue;const h=ve(e,f);!h.options.loader||c-f.updatedAt>=(f.preload?h.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:h.options.gcTime??e.options.defaultGcTime??3e5)||l.set(f.id,o.get(f.id)===f?f:{...f,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=l;const u=e._lifecycleEnd=Ur(n);Ks(e,n),B(e,[...o.values(),...i].filter(c=>c._flight&&l.get(c.id)!==c),n),qr(e,i,n,r,u,t)}async function Ke(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function Qs(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 io(e,t,n,s,i){const r=n.map(l=>({...l}));mn(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 Ns(e,o,s,t[0],i)}catch(l){throw B(e,r),l}if(je(a)){B(e,r),a[0]===H&&e._tx===t&&e._committed===n&&await Qs(e,t,a);return}if(await Us(e,a,t[0].signal),e._tx!==t||e._committed!==n){B(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))}Ks(e,r),B(e,n,r)}async function ro(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 d=o[0]===H&&e._tx===t;if((!d||o[1].options.reloadDocument)&&Ie(e,t),B(e,t[3]),t[3]=[],!d)return;if(e._tx!==t){Ie(e,t);return}await Qs(e,t,o);return}const a=o[1];if(e._tx===t&&await ts(e,t),e._tx!==t){Ie(e,t),B(e,a),ge(e,o);return}const l=t[2],u=ft(l,e.stores.resolvedLocation.get()),c=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await ts(e,t),e._tx!==t){Ie(e,t),B(e,a),ge(e,o);return}const d=()=>{Ie(e,t),so(e,t,a,r),e._tx===t&&(e.emit({type:"onLoad",...u}),e._tx===t&&e.emit({type:"onBeforeRouteMount",...u}))},f=await e.startTransition(d,a);if(e._tx!==t){ge(e,o);return}c?.length&&io(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}),f&&e._tx===t&&e.emit({type:"onRendered",...u})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function oo(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,d=e._preflight;if(e._preflight=c,u||l?.[1](),d?.abort(),!c.signal.aborted){const R=ft(r,s);e.emit({type:"onBeforeNavigate",...R}),c.signal.aborted||e.emit({type:"onBeforeLoad",...R})}if(c.signal.aborted){await Ke(e,n);return}const f=i.href===r.href;let h=c;const g=e.matchRoutes(r,{_controller:c});mn(g);const p=u?l[1](g):void 0;if(p?h=u:u?.abort(),c.signal.aborted){B(e,g),await Ke(e,n);return}e._preflight=void 0;let v;const m=()=>ro(e,w,f,()=>Ut(e,w),t?.sync,p),S=t?.sync?new Promise(R=>v=R):Promise.resolve().then(m),w=[h,a,r,g,Date.now(),S.then(()=>Ke(e,w))];if(e._tx=w,n){for(const R of e.stores.matches.get()){if(e._tx!==w)break;R.isFetching&&He(e,R,!1)}n[0].abort(),B(e,n[3],w[3],!0)}if(e._tx!==w){B(e,w[3]),w[3]=[],v?.(),await Ke(e,w);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(r)}),(p||!e._committed.length&&g[0]?.status!=="success"&&!g.some(R=>R._notFound))&&Ut(e,w),v?.(m()),await w[5]}async function ao(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}),mn(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),B(e,o)),r.abort()}if(!je(l))return l[1];if(!a||l.length<3)return;n=l[2]}catch(u){Pe(u)||console.error(u);return}}}var lo="Error preloading route! ☝️",Ws=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=Le:this.parentRoute||cn();let i=s?Le:n?.path;i&&i!=="/"&&(i=Os(i));const r=n?.id||i,o=s?Le:be((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(r??""));i==="__root__"&&(i="/");const a=o==="__root__"?"/":i===void 0?this.parentRoute.fullPath:be(this.parentRoute.fullPath+"/"+i);this._path=i,this._id=o,this._fullPath=a,this._to=J(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=>Ir({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.")}},uo=class extends Ws{constructor(e){super(e)}},Sn=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??co,{error:e[0],reset:this.reset}):this.props.children}};function co({error:e}){const[t,n]=b.useState(!1);return(0,M.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,M.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,M.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,M.jsx)("div",{style:{height:".25rem"}}),t?(0,M.jsx)("div",{children:(0,M.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e?.message?(0,M.jsx)("code",{children:e.message}):null})}):null]})}var fo=()=>!0,ho=()=>!1;function go({children:e,fallback:t=null}){return(0,M.jsx)(b.Fragment,{children:Js()?e:t})}function Js(){return b.useSyncExternalStore(po,fo,ho)}function po(){return()=>{}}var Xs=b.createContext(null);function G(e){const t=b.useContext(Xs);return t||void 0,t}var gt=b.createContext(void 0),mo=b.createContext(void 0);function vo({update:e,notify:t,unwatched:n}){return{link:s,unlink:i,propagate:r,checkDirty:o,shallowPropagate:a};function s(u,c,d){const f=c.depsTail;if(f!==void 0&&f.dep===u)return;const h=f!==void 0?f.nextDep:c.deps;if(h!==void 0&&h.dep===u){h.version=d,c.depsTail=h;return}const g=u.subsTail;if(g!==void 0&&g.version===d&&g.sub===c)return;const p=c.depsTail=u.subsTail={version:d,dep:u,sub:c,prevDep:f,nextDep:h,prevSub:g,nextSub:void 0};h!==void 0&&(h.prevDep=p),f!==void 0?f.nextDep=p:c.deps=p,g!==void 0?g.nextSub=p:u.subs=p}function i(u,c=u.sub){const d=u.dep,f=u.prevDep,h=u.nextDep,g=u.nextSub,p=u.prevSub;return h!==void 0?h.prevDep=f:c.depsTail=f,f!==void 0?f.nextDep=h:c.deps=h,g!==void 0?g.prevSub=p:d.subsTail=p,p!==void 0?p.nextSub=g:(d.subs=g)===void 0&&n(d),h}function r(u){let c=u.nextSub,d;e:do{const f=u.sub;let h=f.flags;if(h&60?h&12?h&4?!(h&48)&&l(u,f)?(f.flags=h|40,h&=1):h=0:f.flags=h&-9|32:h=0:f.flags=h|32,h&2&&t(f),h&1){const g=f.subs;if(g!==void 0){const p=(u=g).nextSub;p!==void 0&&(d={value:c,prev:d},c=p);continue}}if((u=c)!==void 0){c=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){c=u.nextSub;continue e}break}while(!0)}function o(u,c){let d,f=0,h=!1;e:do{const g=u.dep,p=g.flags;if(c.flags&16)h=!0;else if((p&17)===17){if(e(g)){const v=g.subs;v.nextSub!==void 0&&a(v),h=!0}}else if((p&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=g.deps,c=g,++f;continue}if(!h){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;f--;){const v=c.subs,m=v.nextSub!==void 0;if(m?(u=d.value,d=d.prev):u=v,h){if(e(c)){m&&a(v),c=u.sub;continue}h=!1}else c.flags&=-33;c=u.sub;const S=u.nextDep;if(S!==void 0){u=S;continue e}}return h}while(!0)}function a(u){do{const c=u.sub,d=c.flags;(d&48)===32&&(c.flags=d|16,(d&6)===2&&t(c))}while((u=u.nextSub)!==void 0)}function l(u,c){let d=c.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}function So(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=[],st=0,{link:ns,unlink:yo,propagate:wo,checkDirty:Ys,shallowPropagate:ss}=vo({update(e){return e._update()},notify(e){qt[Kt++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,ct(e))}}),Qe=0,Kt=0,W,Qt=0;function Co(e){try{++Qt,e()}finally{--Qt||Zs()}}function ct(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=yo(n,e)}function Zs(){if(!(Qt>0)){for(;Qe<Kt;){const e=qt[Qe];qt[Qe++]=void 0,e.notify()}Qe=0,Kt=0}}function is(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&&ns(i,W,st),i._snapshot},subscribe(r){const o=So(r),a={current:!1},l=Ro(()=>{i.get(),a.current?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,++st,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),ct(i)}}};return n?(i.flags=17,i.get=function(){const r=i.flags;if(r&16||r&32&&Ys(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&ss(o)}}else r&32&&(i.flags=r&-33);return W!==void 0&&ns(i,W,st),i._snapshot}):i.set=function(r){if(i._update(r)){const o=i.subs;o!==void 0&&(wo(o),ss(o),Zs())}},i}function Ro(e){const t=()=>{const s=W;W=n,++st,n.depsTail=void 0,n.flags=6;try{return e()}finally{W=s,n.flags&=-5,ct(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&&Ys(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,ct(this)}};return t(),n}var _o=dt((e=>{var t=tn();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var s=typeof Object.is=="function"?Object.is:n,i=t.useState,r=t.useEffect,o=t.useLayoutEffect,a=t.useDebugValue;function l(f,h){var g=h(),p=i({inst:{value:g,getSnapshot:h}}),v=p[0].inst,m=p[1];return o(function(){v.value=g,v.getSnapshot=h,u(v)&&m({inst:v})},[f,g,h]),r(function(){return u(v)&&m({inst:v}),f(function(){u(v)&&m({inst:v})})},[f]),a(g),g}function u(f){var h=f.getSnapshot;f=f.value;try{var g=h();return!s(f,g)}catch{return!0}}function c(f,h){return h()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:l;e.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d})),bo=dt(((e,t)=>{t.exports=_o()})),xo=dt((e=>{var t=tn(),n=bo();function s(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}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,d,f,h,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(!w){if(w=!0,R=y,y=h(y),g!==void 0&&v.hasValue){var _=v.value;if(g(_,y))return x=_}return x=y}if(_=x,i(R,y))return _;var P=h(y);return g!==void 0&&g(_,P)?(R=y,_):(R=y,x=P)}var w=!1,R,x,C=f===void 0?null:f;return[function(){return S(d())},C===null?void 0:function(){return S(C())}]},[d,f,h,g]);var m=r(c,p[0],p[1]);return a(function(){v.hasValue=!0,v.value=m},[m]),u(m),m}})),Po=dt(((e,t)=>{t.exports=xo()})),Fo=en(Po(),1);function Eo(e,t){return e===t}function Y(e,t=s=>s,n){const s=n?.compare??Eo,i=(0,b.useCallback)(o=>{const{unsubscribe:a}=e.subscribe(o);return a},[e]),r=(0,b.useCallback)(()=>e.get(),[e]);return(0,Fo.useSyncExternalStoreWithSelector)(i,r,r,t,s)}var rs={};function yn(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=G(),n=b.useContext(e.from?mo:gt),s=e.from??n,i=t.stores.getMatchStore(s),r=yn(e,t),o=Y(i,a=>a?r(a):rs);if(o!==rs)return o;(e.shouldThrow??!0)&&cn()}function ei(e){return Se({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ti(e){const{select:t,...n}=e;return Se({...n,select:s=>t?t(s.loaderDeps):s.loaderDeps})}function ni(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 si(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 wn(e){const t=G();return b.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function fl(e){const t=G(),n=wn(),s=b.useRef(null);return ln(()=>{s.current!==e&&(n(e),s.current=e)},[t,e,n]),null}function ii(e){return Se({...e,select:t=>e.select?e.select(t.context):t.context})}function Io(...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 We(e,t){e.preloadRoute(t).catch(n=>{console.warn(n),console.warn(lo)})}var Mo={compare:(e,t)=>e[0]===t[0]&&e[1]===t[1]};function Lo(e,t){const n=typeof e=="string"&&$e(e);if(n)return t.has(n)?e:null}function Oo(e,t,n,s,i){const r=Vn(e.pathname,s),o=Vn(t.pathname,s);return(n?.exact?r!==o:!(r.startsWith(o)&&(r.length===o.length||r[o.length]==="/")))||(n?.includeSearch??!0)&&!te(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:n?.includeHash?i&&e.hash===t.hash:!0}function To(e,t,n){const s=G(),i=b.useRef(null),r=b.useCallback(A=>{if(i.current=A,typeof t=="function")return t(A);t&&(t.current=A)},[t]),{activeOptions:o,to:a,preload:l,preloadDelay:u,hashScrollIntoView:c,replace:d,startTransition:f,resetScroll:h,viewTransition:g,ignoreBlocker:p,disabled:v,target:m,onClick:S,onBlur:w,onFocus:R,onMouseEnter:x,onMouseLeave:C,onTouchStart:y}=e,_=Js(),[P,O,L]=Io(e.search,e.params,o),[I,T]=b.useMemo(()=>[e,{...e}],[s,e.from,e._fromLocation,e.hash,e.to,P,O,e.state,e.mask,e.unsafeRelative]),k=b.useCallback(A=>{const Q=Lo(a,s.protocolAllowlist);if(Q!==void 0)return[Q??void 0];I._fromLocation||(T._fromLocation=A);const Pn=s.buildLocation(T),wt=Vo(Pn,s,v);return[wt,!v&&(!wt||$e(wt))?void 0:Oo(A,Pn,L,s.basepath,_)]},[L,v,_,I,T,s,a]),[D,$]=Y(s.stores.location,k,Mo),vt=$===void 0?D:void 0,St=v||D===void 0,bn=b.useRef(!1),de=e.reloadDocument||vt||St?!1:l??s.options.defaultPreload,yt=u??s.options.defaultPreloadDelay??0,Be=b.useCallback(A=>{const Q=A?.isIntersecting;if(!(Q??de==="intent")){Q===!1&&Pt(i);return}if(!yt){We(s,I);return}Te.has(i)||Te.set(i,setTimeout(()=>{Te.delete(i),We(s,I)},yt))},[s,I,i,de,yt]);b.useEffect(()=>{de==="render"&&!bn.current&&(bn.current=!0,We(s,I));let A;return de==="viewport"&&i.current&&typeof IntersectionObserver=="function"&&(A=new IntersectionObserver(Q=>Be(Q.pop()),{rootMargin:"100px"}),A.observe(i.current)),()=>{A?.disconnect(),Pt(i)}},[s,I,de,Be,i]);const K=Ao(e,n);if(K.ref=t?r:i,vt)return K.href=vt,K;const Ci=A=>{const Q=m??A.currentTarget.getAttribute("target");!St&&!(A.metaKey||A.altKey||A.ctrlKey||A.shiftKey)&&!A.defaultPrevented&&(!Q||Q==="_self")&&A.button===0&&(A.preventDefault(),s.navigate({...I,replace:d,resetScroll:h,hashScrollIntoView:c,startTransition:f,viewTransition:g,ignoreBlocker:p}))},Ri=()=>{de==="intent"&&We(s,I)},xn=()=>{de==="intent"&&Pt(i)};return K.onClick=we(S,Ci),K.onBlur=we(w,xn),K.onFocus=we(R,Be),K.onMouseEnter=we(x,Be),K.onMouseLeave=we(C,xn),K.onTouchStart=we(y,Ri),$o(K,e,$,D,St,n)}var ko={},Do={className:"active"},ri=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","_fromLocation","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function Ao(e,t){const n={};for(const s in e)ri.has(s)||s==="type"&&t!==void 0||s==="disabled"&&t==="a"||(n[s]=e[s]);return n}function $o(e,t,n,s,i,r){const{activeProps:o,inactiveProps:a,className:l,style:u,target:c}=t,d=Es(n?o:a,{})??(n?Do:ko);Object.assign(e,d),e.href=s,r!=="a"&&(e.disabled=i),e.target=c;const f=d.style;(u||f)&&(e.style=u&&f?{...u,...f}:u||f);const h=d.className;return(l||h)&&(e.className=l?h?`${l} ${h}`:l:h),i&&(e.role="link",e["aria-disabled"]=!0),n&&(e["data-status"]="active",e["aria-current"]="page"),e}var Te=new WeakMap,Pt=e=>{clearTimeout(Te.get(e)),Te.delete(e)},we=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function Vo(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)&&Ls(i,t.protocolAllowlist)))return i}var oi=b.memo(b.forwardRef((e,t)=>{const n=e._asChild||"a",s=To(e,t,n),i=typeof e.children=="function"?e.children({isActive:s["data-status"]==="active"}):e.children;return b.createElement(n,s,i)}),jo);function jo(e,t){let n=0;for(const s in t)if(n++,e[s]!==t[s]&&(!ri.has(s)||!te(e[s],t[s],!1,!0)))return!1;for(const s in e)n--;return n===0}var zo=class extends Ws{constructor(e){super(e),this.useMatch=t=>Se({...t,from:this.id}),this.useRouteContext=t=>ii({...t,from:this.id}),this.useSearch=t=>si({...t,from:this.id}),this.useParams=t=>ni({...t,from:this.id}),this.useLoaderDeps=t=>ti({...t,from:this.id}),this.useLoaderData=t=>ei({...t,from:this.id}),this.useNavigate=()=>wn({from:this.fullPath}),this.Link=b.forwardRef((t,n)=>(0,M.jsx)(oi,{ref:n,from:this.fullPath,...t}))}};function Ho(e){return new zo(e)}var Bo=class extends uo{constructor(e){super(e),this.useMatch=t=>Se({...t,from:this.id}),this.useRouteContext=t=>ii({...t,from:this.id}),this.useSearch=t=>si({...t,from:this.id}),this.useParams=t=>ni({...t,from:this.id}),this.useLoaderDeps=t=>ti({...t,from:this.id}),this.useLoaderData=t=>ei({...t,from:this.id}),this.useNavigate=()=>wn({from:this.fullPath}),this.Link=b.forwardRef((t,n)=>(0,M.jsx)(oi,{ref:n,from:this.fullPath,...t}))}};function hl(e){return new Bo(e)}function gl(e){return t=>{const n=Ho(t);return n.isRoot=!1,n}}function pl(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(ar(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(An)An(r());else throw r();return b.createElement(s,l)};return o.preload=r,o}function Go(e){const t=G(),n=`not-found-${Y(t.stores.location,s=>s.pathname)}-${Y(t.stores.status)}`;return(0,M.jsx)(Sn,{getResetKey:()=>n,onCatch:(s,i)=>{if(Pe(s))e.onCatch?.(s,i);else throw s},errorComponent:({error:s})=>{if(Pe(s))return e.fallback?.(s);throw s},children:e.children})}function No(){return(0,M.jsx)("p",{children:"Not Found"})}function _e(e){return(0,M.jsx)(M.Fragment,{children:e.children})}function ai(e,t,n){return t.options.notFoundComponent?(0,M.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,M.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,M.jsx)(No,{})}function pt(e,t){const n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,M.jsx)(n,{}):null}var Uo=(e,t)=>e[0]===t[0]&&e[1]===t[1],li=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n==="data-only"||!e.ssr,ui=b.memo(function({routeId:t}){const n=G();return(0,M.jsx)(qo,{router:n,match:Y(n.stores.getMatchStore(t))})});function qo({router:e,match:t}){const n=e.routesById[t.routeId],s=pt(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=li(e,n,t.ssr)&&(n.options.wrapInSuspense??s??(n.options.errorComponent?.preload||a))?b.Suspense:_e,u=i?Sn:_e,c=o?Go:_e;return(0,M.jsxs)(n.isRoot?n.options.shellComponent??_e:_e,{children:[(0,M.jsx)(gt.Provider,{value:t.routeId,children:(0,M.jsx)(l,{fallback:s,children:(0,M.jsx)(u,{getResetKey:()=>t,errorComponent:i,onCatch:(d,f)=>{if(Pe(d))throw d.routeId??=t.routeId,d;r?.(d,f)},children:(0,M.jsx)(c,{fallback:d=>{if(d.routeId??=t.routeId,d.routeId!==t.routeId)throw d;return b.createElement(o,d)},children:a?(0,M.jsx)(go,{fallback:s,children:(0,M.jsx)(os,{match:t})}):(0,M.jsx)(os,{match:t})})})})}),null]})}var os=b.memo(function({match:t}){const n=G(),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,M.jsx)(a,{},r):(0,M.jsx)(Ko,{})},[r,i.options.component,n.options.defaultComponent]);if(t.status==="pending"){if(n.ssr&&!li(n,i,t.ssr))return o;if(n._tx)throw n._tx[5];return pt(n,i)}if(t.status==="notFound")return ai(n,i,t.error);if(t.status==="error")throw t.error;return o}),Ko=b.memo(function(){const t=G(),n=b.useContext(gt);let s,i,r;{const a=t.stores.getMatchStore(n);[s,i]=Y(a,l=>[!!l._notFound,l.error],{compare:Uo}),r=Y(t.stores.ids,l=>l[l.indexOf(n)+1])}if(s)return ai(t,t.routesById[n],i);if(!r)return null;const o=(0,M.jsx)(ui,{routeId:r});return n==="__root__"?(0,M.jsx)(b.Suspense,{fallback:pt(t),children:o}):o});function ci(e,t){const n=e[1];e.length=0,n?.(t)}function Qo({t:e}){const t=G(),n=t._rendered??=[];return t.startTransition=(s,i)=>new Promise(r=>{ci(n,!1),n.push(i,r),e(t),b.startTransition(s)}),ln(()=>{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(J(i.publicHref)!==J(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",...ft(o,o)})}):t._tx||t.load({sync:!0}).catch(console.error),s},[t,t.history]),null}function Wo(){const e=G(),t=e.routesById[Le],n=pt(e,t),s=e.ssr?_e:b.Suspense,i=(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Qo,{t:b.useState()[1]}),(0,M.jsx)(s,{fallback:n,children:(0,M.jsx)(Jo,{})})]});return e.options.InnerWrap?(0,M.jsx)(e.options.InnerWrap,{children:i}):i}function Jo(){const e=G(),t=e._rendered,n=Y(e.stores.matches,o=>t[0]??o),s=n[0],i=s?.routeId;ln(()=>{t[0]===n&&ci(t,!0)},[t,n]);const r=i?(0,M.jsx)(ui,{routeId:i}):null;return(0,M.jsx)(gt.Provider,{value:i,children:e.options.disableGlobalCatchBoundary?r:(0,M.jsx)(Sn,{getResetKey:()=>s,onCatch:void 0,children:r})})}var Xo=e=>({createMutableStore:is,createReadonlyStore:is,batch:Co}),ml=e=>new Yo(e),Yo=class extends Kr{constructor(e){super(e,Xo)}};function Zo({router:e,children:t,...n}){Is(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const s=(0,M.jsx)(Xs.Provider,{value:e,children:t});return e.options.Wrap?(0,M.jsx)(e.options.Wrap,{children:s}):s}function vl({router:e,...t}){return(0,M.jsx)(Zo,{router:e,...t,children:(0,M.jsx)(Wo,{})})}function ea(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 Sl(e,t){const{shouldBlockFn:n,enableBeforeUnload:s=!0,disabled:i=!1,withResolver:r=!1}=ea(e,t),o=G(),{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 d=>{function f(m){const S=o.parseLocation(m),[,w,R]=o.getMatchedRoutes(S.pathname);return R===void 0?{routeId:"__notFound__",fullPath:S.pathname,pathname:S.pathname,params:w,search:o.options.parseSearch(m.search)}:{routeId:R.id,fullPath:R.fullPath,pathname:S.pathname,params:w,search:o.options.parseSearch(m.search)}}const h=f(d.currentLocation),g=f(d.nextLocation);if(h.routeId==="__notFound__"&&g.routeId!=="__notFound__")return!1;const p=await n({action:d.action,current:h,next:g});if(!r)return p;if(!p)return!1;const v=await new Promise(m=>{u({status:"blocked",current:h,next:g,action:d.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 yl(e){const t=G({warn:e?.router===void 0}),n=e?.router||t;return Y(n.stores.__store,yn(e,n))}function wl(e){const t=G();return Y(t.stores.location,yn(e,t))}function ie(e,t){return typeof e=="function"?e(t):e}function U(e,t){return n=>{t.setState(s=>({...s,[e]:ie(n,s[e])}))}}function mt(e){return e instanceof Function}function ta(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function na(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 F(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,d=c/16,f=(h,g)=>{for(h=String(h);h.length<g;)h=" "+h;return h};console.info(`%c⏱ ${f(c,5)} /${f(u,5)} ms`,`
3
3
  font-size: .6rem;
4
4
  font-weight: bold;
@@ -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@1.22.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="88db2f18-9bce-41db-8bdf-c76ae22d1a71",e._sentryDebugIdIdentifier="sentry-dbid-88db2f18-9bce-41db-8bdf-c76ae22d1a71")}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};
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@1.23.0"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="88db2f18-9bce-41db-8bdf-c76ae22d1a71",e._sentryDebugIdIdentifier="sentry-dbid-88db2f18-9bce-41db-8bdf-c76ae22d1a71")}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};
@@ -1 +1 @@
1
- import{B as z,H as O,U as _,V as k,W as j,jt as w,vt as N,z as T}from"./radix-ui-qEOOL1_K.js";import{n as V}from"./bundle-mjs-Ba_GShnc.js";import{t as x}from"./utils-CwFw8YqE.js";import{t as C}from"./react-DgIpWRm8.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};a.SENTRY_RELEASE={id:"db-studio@1.22.1"};var t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="e903a0d5-86e9-407a-b0f8-7115e2fada39",a._sentryDebugIdIdentifier="sentry-dbid-e903a0d5-86e9-407a-b0f8-7115e2fada39")}catch{}})();var f=a=>typeof a=="boolean"?`${a}`:a===0?"0":a,p=V,I=(a,t)=>e=>{var r;if(t?.variants==null)return p(a,e?.class,e?.className);const{variants:n,defaultVariants:l}=t,y=Object.keys(n).map(i=>{const o=e?.[i],u=l?.[i];if(o===null)return null;const d=f(o)||f(u);return n[i][d]}),c=e&&Object.entries(e).reduce((i,o)=>{let[u,d]=o;return d===void 0||(i[u]=d),i},{}),m=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((i,o)=>{let{class:u,className:d,...b}=o;return Object.entries(b).every(h=>{let[g,v]=h;return Array.isArray(v)?v.includes({...l,...c}[g]):{...l,...c}[g]===v})?[...i,u,d]:i},[]);return p(a,y,m,e?.class,e?.className)},s=w(),A=I("focus-visible:border-ring cursor-pointer focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-sm border border-transparent bg-clip-padding text-xs/relaxed font-medium focus-visible:ring-[2px] aria-invalid:ring-[2px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border dark:bg-input/20 dark:bg-input/30 hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"text-muted-foreground hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function B({className:a,variant:t="default",size:e="default",asChild:r=!1,...n}){return(0,s.jsx)(r?N:"button",{"data-slot":"button","data-variant":t,"data-size":e,className:x(A({variant:t,size:e,className:a})),...n})}var U=C()((a,t)=>({openOverlays:[],openOverlay:e=>a(r=>r.openOverlays.includes(e)?{openOverlays:[...r.openOverlays.filter(n=>n!==e),e]}:{openOverlays:[...r.openOverlays,e]}),closeOverlay:e=>a(r=>e?{openOverlays:r.openOverlays.filter(n=>n!==e)}:{openOverlays:r.openOverlays.slice(0,-1)}),closeAllOverlays:()=>a({openOverlays:[]}),toggleOverlay:e=>a(r=>r.openOverlays.includes(e)?{openOverlays:r.openOverlays.filter(n=>n!==e)}:{openOverlays:[...r.openOverlays,e]}),isOverlayOpen:e=>t().openOverlays.includes(e),getOverlayIndex:e=>t().openOverlays.indexOf(e)}));function E({delayDuration:a=0,...t}){return(0,s.jsx)(O,{"data-slot":"tooltip-provider",delayDuration:a,...t})}function W({...a}){return(0,s.jsx)(E,{children:(0,s.jsx)(_,{"data-slot":"tooltip",...a})})}function q({...a}){return(0,s.jsx)(j,{"data-slot":"tooltip-trigger",...a})}function H({className:a,sideOffset:t=0,children:e,...r}){return(0,s.jsx)(k,{children:(0,s.jsxs)(z,{"data-slot":"tooltip-content",sideOffset:t,className:x("data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 rounded-md px-3 py-1.5 text-xs **:data-[slot=kbd]:rounded-md bg-foreground text-background z-50 w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin)",a),...r,children:[e,(0,s.jsx)(T,{className:"size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground z-50 translate-y-[calc(-50%_-_2px)]"})]})})}export{U as a,I as c,q as i,H as n,B as o,E as r,A as s,W as t};
1
+ import{B as z,H as O,U as _,V as k,W as j,jt as w,vt as N,z as T}from"./radix-ui-O7fUb8xo.js";import{n as V}from"./bundle-mjs-BILTDsu3.js";import{t as x}from"./utils-BAOO2O6e.js";import{t as C}from"./react-CvQHOIeW.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};a.SENTRY_RELEASE={id:"db-studio@1.23.0"};var t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="e903a0d5-86e9-407a-b0f8-7115e2fada39",a._sentryDebugIdIdentifier="sentry-dbid-e903a0d5-86e9-407a-b0f8-7115e2fada39")}catch{}})();var f=a=>typeof a=="boolean"?`${a}`:a===0?"0":a,p=V,I=(a,t)=>e=>{var r;if(t?.variants==null)return p(a,e?.class,e?.className);const{variants:n,defaultVariants:l}=t,y=Object.keys(n).map(i=>{const o=e?.[i],u=l?.[i];if(o===null)return null;const d=f(o)||f(u);return n[i][d]}),c=e&&Object.entries(e).reduce((i,o)=>{let[u,d]=o;return d===void 0||(i[u]=d),i},{}),m=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((i,o)=>{let{class:u,className:d,...b}=o;return Object.entries(b).every(h=>{let[g,v]=h;return Array.isArray(v)?v.includes({...l,...c}[g]):{...l,...c}[g]===v})?[...i,u,d]:i},[]);return p(a,y,m,e?.class,e?.className)},s=w(),A=I("focus-visible:border-ring cursor-pointer focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-sm border border-transparent bg-clip-padding text-xs/relaxed font-medium focus-visible:ring-[2px] aria-invalid:ring-[2px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border dark:bg-input/20 dark:bg-input/30 hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"text-muted-foreground hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function B({className:a,variant:t="default",size:e="default",asChild:r=!1,...n}){return(0,s.jsx)(r?N:"button",{"data-slot":"button","data-variant":t,"data-size":e,className:x(A({variant:t,size:e,className:a})),...n})}var U=C()((a,t)=>({openOverlays:[],openOverlay:e=>a(r=>r.openOverlays.includes(e)?{openOverlays:[...r.openOverlays.filter(n=>n!==e),e]}:{openOverlays:[...r.openOverlays,e]}),closeOverlay:e=>a(r=>e?{openOverlays:r.openOverlays.filter(n=>n!==e)}:{openOverlays:r.openOverlays.slice(0,-1)}),closeAllOverlays:()=>a({openOverlays:[]}),toggleOverlay:e=>a(r=>r.openOverlays.includes(e)?{openOverlays:r.openOverlays.filter(n=>n!==e)}:{openOverlays:[...r.openOverlays,e]}),isOverlayOpen:e=>t().openOverlays.includes(e),getOverlayIndex:e=>t().openOverlays.indexOf(e)}));function E({delayDuration:a=0,...t}){return(0,s.jsx)(O,{"data-slot":"tooltip-provider",delayDuration:a,...t})}function W({...a}){return(0,s.jsx)(E,{children:(0,s.jsx)(_,{"data-slot":"tooltip",...a})})}function q({...a}){return(0,s.jsx)(j,{"data-slot":"tooltip-trigger",...a})}function H({className:a,sideOffset:t=0,children:e,...r}){return(0,s.jsx)(k,{children:(0,s.jsxs)(z,{"data-slot":"tooltip-content",sideOffset:t,className:x("data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 rounded-md px-3 py-1.5 text-xs **:data-[slot=kbd]:rounded-md bg-foreground text-background z-50 w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin)",a),...r,children:[e,(0,s.jsx)(T,{className:"size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground z-50 translate-y-[calc(-50%_-_2px)]"})]})})}export{U as a,I as c,q as i,H as n,B as o,E as r,A as s,W as t};
@@ -1,4 +1,4 @@
1
- import{a as L,c as m,i as k,l as d,o as I,s as D}from"./editor.api-ZRrI_I0I.js";import{i as K}from"./monaco-theme-BKlvSnyu.js";import{t as M}from"./workers-DtzEtdkU.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@1.22.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e5eea479-9856-4af9-b7c9-83a4603bfacd",e._sentryDebugIdIdentifier="sentry-dbid-e5eea479-9856-4af9-b7c9-83a4603bfacd")}catch{}})();var E=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=M({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(new URL("/assets/ts.worker-r_qbh1JO.js",""+import.meta.url),{type:"module"}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(m.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},s={};s["lib.d.ts"]=!0;s["lib.decorators.d.ts"]=!0;s["lib.decorators.legacy.d.ts"]=!0;s["lib.dom.asynciterable.d.ts"]=!0;s["lib.dom.d.ts"]=!0;s["lib.dom.iterable.d.ts"]=!0;s["lib.es2015.collection.d.ts"]=!0;s["lib.es2015.core.d.ts"]=!0;s["lib.es2015.d.ts"]=!0;s["lib.es2015.generator.d.ts"]=!0;s["lib.es2015.iterable.d.ts"]=!0;s["lib.es2015.promise.d.ts"]=!0;s["lib.es2015.proxy.d.ts"]=!0;s["lib.es2015.reflect.d.ts"]=!0;s["lib.es2015.symbol.d.ts"]=!0;s["lib.es2015.symbol.wellknown.d.ts"]=!0;s["lib.es2016.array.include.d.ts"]=!0;s["lib.es2016.d.ts"]=!0;s["lib.es2016.full.d.ts"]=!0;s["lib.es2016.intl.d.ts"]=!0;s["lib.es2017.arraybuffer.d.ts"]=!0;s["lib.es2017.d.ts"]=!0;s["lib.es2017.date.d.ts"]=!0;s["lib.es2017.full.d.ts"]=!0;s["lib.es2017.intl.d.ts"]=!0;s["lib.es2017.object.d.ts"]=!0;s["lib.es2017.sharedmemory.d.ts"]=!0;s["lib.es2017.string.d.ts"]=!0;s["lib.es2017.typedarrays.d.ts"]=!0;s["lib.es2018.asyncgenerator.d.ts"]=!0;s["lib.es2018.asynciterable.d.ts"]=!0;s["lib.es2018.d.ts"]=!0;s["lib.es2018.full.d.ts"]=!0;s["lib.es2018.intl.d.ts"]=!0;s["lib.es2018.promise.d.ts"]=!0;s["lib.es2018.regexp.d.ts"]=!0;s["lib.es2019.array.d.ts"]=!0;s["lib.es2019.d.ts"]=!0;s["lib.es2019.full.d.ts"]=!0;s["lib.es2019.intl.d.ts"]=!0;s["lib.es2019.object.d.ts"]=!0;s["lib.es2019.string.d.ts"]=!0;s["lib.es2019.symbol.d.ts"]=!0;s["lib.es2020.bigint.d.ts"]=!0;s["lib.es2020.d.ts"]=!0;s["lib.es2020.date.d.ts"]=!0;s["lib.es2020.full.d.ts"]=!0;s["lib.es2020.intl.d.ts"]=!0;s["lib.es2020.number.d.ts"]=!0;s["lib.es2020.promise.d.ts"]=!0;s["lib.es2020.sharedmemory.d.ts"]=!0;s["lib.es2020.string.d.ts"]=!0;s["lib.es2020.symbol.wellknown.d.ts"]=!0;s["lib.es2021.d.ts"]=!0;s["lib.es2021.full.d.ts"]=!0;s["lib.es2021.intl.d.ts"]=!0;s["lib.es2021.promise.d.ts"]=!0;s["lib.es2021.string.d.ts"]=!0;s["lib.es2021.weakref.d.ts"]=!0;s["lib.es2022.array.d.ts"]=!0;s["lib.es2022.d.ts"]=!0;s["lib.es2022.error.d.ts"]=!0;s["lib.es2022.full.d.ts"]=!0;s["lib.es2022.intl.d.ts"]=!0;s["lib.es2022.object.d.ts"]=!0;s["lib.es2022.regexp.d.ts"]=!0;s["lib.es2022.string.d.ts"]=!0;s["lib.es2023.array.d.ts"]=!0;s["lib.es2023.collection.d.ts"]=!0;s["lib.es2023.d.ts"]=!0;s["lib.es2023.full.d.ts"]=!0;s["lib.es2023.intl.d.ts"]=!0;s["lib.es2024.arraybuffer.d.ts"]=!0;s["lib.es2024.collection.d.ts"]=!0;s["lib.es2024.d.ts"]=!0;s["lib.es2024.full.d.ts"]=!0;s["lib.es2024.object.d.ts"]=!0;s["lib.es2024.promise.d.ts"]=!0;s["lib.es2024.regexp.d.ts"]=!0;s["lib.es2024.sharedmemory.d.ts"]=!0;s["lib.es2024.string.d.ts"]=!0;s["lib.es5.d.ts"]=!0;s["lib.es6.d.ts"]=!0;s["lib.esnext.array.d.ts"]=!0;s["lib.esnext.collection.d.ts"]=!0;s["lib.esnext.d.ts"]=!0;s["lib.esnext.decorators.d.ts"]=!0;s["lib.esnext.disposable.d.ts"]=!0;s["lib.esnext.error.d.ts"]=!0;s["lib.esnext.float16.d.ts"]=!0;s["lib.esnext.full.d.ts"]=!0;s["lib.esnext.intl.d.ts"]=!0;s["lib.esnext.iterator.d.ts"]=!0;s["lib.esnext.promise.d.ts"]=!0;s["lib.esnext.sharedmemory.d.ts"]=!0;s["lib.scripthost.d.ts"]=!0;s["lib.webworker.asynciterable.d.ts"]=!0;s["lib.webworker.d.ts"]=!0;s["lib.webworker.importscripts.d.ts"]=!0;s["lib.webworker.iterable.d.ts"]=!0;function A(e,t,i=0){if(typeof e=="string")return e;if(e===void 0)return"";let o="";if(i){o+=t;for(let n=0;n<i;n++)o+=" "}if(o+=e.messageText,i++,e.next)for(const n of e.next)o+=A(n,t,i);return o}function y(e){return e?e.map(t=>t.text).join(""):""}var w=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let i=e.getPositionAt(t.start),o=e.getPositionAt(t.start+t.length),{lineNumber:n,column:u}=i,{lineNumber:c,column:r}=o;return{startLineNumber:n,startColumn:u,endLineNumber:c,endColumn:r}}},H=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){const t=D.parse(e),i=m.getModel(t);if(i)return i;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return m.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const o=K.getExtraLibs()[e];return o?m.createModel(o.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}},W=class extends w{constructor(e,t,i,o){super(o),this._libFiles=e,this._defaults=t,this._selector=i,this._disposables=[],this._listener=Object.create(null);const n=r=>{if(r.getLanguageId()!==i)return;const l=()=>{const{onlyVisible:b}=this._defaults.getDiagnosticsOptions();b?r.isAttachedToEditor()&&this._doValidate(r):this._doValidate(r)};let p;const g=r.onDidChangeContent(()=>{clearTimeout(p),p=window.setTimeout(l,500)}),f=r.onDidChangeAttached(()=>{const{onlyVisible:b}=this._defaults.getDiagnosticsOptions();b&&(r.isAttachedToEditor()?l():m.setModelMarkers(r,this._selector,[]))});this._listener[r.uri.toString()]={dispose(){g.dispose(),f.dispose(),clearTimeout(p)}},l()},u=r=>{m.setModelMarkers(r,this._selector,[]);const l=r.uri.toString();this._listener[l]&&(this._listener[l].dispose(),delete this._listener[l])};this._disposables.push(m.onDidCreateModel(r=>n(r))),this._disposables.push(m.onWillDisposeModel(u)),this._disposables.push(m.onDidChangeModelLanguage(r=>{u(r.model),n(r.model)})),this._disposables.push({dispose(){for(const r of m.getModels())u(r)}});const c=()=>{for(const r of m.getModels())u(r),n(r)};this._disposables.push(this._defaults.onDidChange(c)),this._disposables.push(this._defaults.onDidExtraLibsChange(c)),m.getModels().forEach(r=>n(r))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const i=[],{noSyntaxValidation:o,noSemanticValidation:n,noSuggestionDiagnostics:u}=this._defaults.getDiagnosticsOptions();o||i.push(t.getSyntacticDiagnostics(e.uri.toString())),n||i.push(t.getSemanticDiagnostics(e.uri.toString())),u||i.push(t.getSuggestionDiagnostics(e.uri.toString()));const c=await Promise.all(i);if(!c||e.isDisposed())return;const r=c.reduce((p,g)=>g.concat(p),[]).filter(p=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(p.code)===-1),l=r.map(p=>p.relatedInformation||[]).reduce((p,g)=>g.concat(p),[]).map(p=>p.file?D.parse(p.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(l),!e.isDisposed()&&m.setModelMarkers(e,this._selector,r.map(p=>this._convertDiagnostics(e,p)))}_convertDiagnostics(e,t){const i=t.start||0,o=t.length||1,{lineNumber:n,column:u}=e.getPositionAt(i),{lineNumber:c,column:r}=e.getPositionAt(i+o),l=[];return t.reportsUnnecessary&&l.push(L.Unnecessary),t.reportsDeprecated&&l.push(L.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:n,startColumn:u,endLineNumber:c,endColumn:r,message:A(t.messageText,`
1
+ import{a as L,c as m,i as k,l as d,o as I,s as D}from"./editor.api-u7KJNncE.js";import{i as K}from"./monaco-theme-COQ8oULH.js";import{t as M}from"./workers-Boc2D1Ms.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@1.23.0"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e5eea479-9856-4af9-b7c9-83a4603bfacd",e._sentryDebugIdIdentifier="sentry-dbid-e5eea479-9856-4af9-b7c9-83a4603bfacd")}catch{}})();var E=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=M({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(new URL("/assets/ts.worker-r_qbh1JO.js",""+import.meta.url),{type:"module"}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(m.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},s={};s["lib.d.ts"]=!0;s["lib.decorators.d.ts"]=!0;s["lib.decorators.legacy.d.ts"]=!0;s["lib.dom.asynciterable.d.ts"]=!0;s["lib.dom.d.ts"]=!0;s["lib.dom.iterable.d.ts"]=!0;s["lib.es2015.collection.d.ts"]=!0;s["lib.es2015.core.d.ts"]=!0;s["lib.es2015.d.ts"]=!0;s["lib.es2015.generator.d.ts"]=!0;s["lib.es2015.iterable.d.ts"]=!0;s["lib.es2015.promise.d.ts"]=!0;s["lib.es2015.proxy.d.ts"]=!0;s["lib.es2015.reflect.d.ts"]=!0;s["lib.es2015.symbol.d.ts"]=!0;s["lib.es2015.symbol.wellknown.d.ts"]=!0;s["lib.es2016.array.include.d.ts"]=!0;s["lib.es2016.d.ts"]=!0;s["lib.es2016.full.d.ts"]=!0;s["lib.es2016.intl.d.ts"]=!0;s["lib.es2017.arraybuffer.d.ts"]=!0;s["lib.es2017.d.ts"]=!0;s["lib.es2017.date.d.ts"]=!0;s["lib.es2017.full.d.ts"]=!0;s["lib.es2017.intl.d.ts"]=!0;s["lib.es2017.object.d.ts"]=!0;s["lib.es2017.sharedmemory.d.ts"]=!0;s["lib.es2017.string.d.ts"]=!0;s["lib.es2017.typedarrays.d.ts"]=!0;s["lib.es2018.asyncgenerator.d.ts"]=!0;s["lib.es2018.asynciterable.d.ts"]=!0;s["lib.es2018.d.ts"]=!0;s["lib.es2018.full.d.ts"]=!0;s["lib.es2018.intl.d.ts"]=!0;s["lib.es2018.promise.d.ts"]=!0;s["lib.es2018.regexp.d.ts"]=!0;s["lib.es2019.array.d.ts"]=!0;s["lib.es2019.d.ts"]=!0;s["lib.es2019.full.d.ts"]=!0;s["lib.es2019.intl.d.ts"]=!0;s["lib.es2019.object.d.ts"]=!0;s["lib.es2019.string.d.ts"]=!0;s["lib.es2019.symbol.d.ts"]=!0;s["lib.es2020.bigint.d.ts"]=!0;s["lib.es2020.d.ts"]=!0;s["lib.es2020.date.d.ts"]=!0;s["lib.es2020.full.d.ts"]=!0;s["lib.es2020.intl.d.ts"]=!0;s["lib.es2020.number.d.ts"]=!0;s["lib.es2020.promise.d.ts"]=!0;s["lib.es2020.sharedmemory.d.ts"]=!0;s["lib.es2020.string.d.ts"]=!0;s["lib.es2020.symbol.wellknown.d.ts"]=!0;s["lib.es2021.d.ts"]=!0;s["lib.es2021.full.d.ts"]=!0;s["lib.es2021.intl.d.ts"]=!0;s["lib.es2021.promise.d.ts"]=!0;s["lib.es2021.string.d.ts"]=!0;s["lib.es2021.weakref.d.ts"]=!0;s["lib.es2022.array.d.ts"]=!0;s["lib.es2022.d.ts"]=!0;s["lib.es2022.error.d.ts"]=!0;s["lib.es2022.full.d.ts"]=!0;s["lib.es2022.intl.d.ts"]=!0;s["lib.es2022.object.d.ts"]=!0;s["lib.es2022.regexp.d.ts"]=!0;s["lib.es2022.string.d.ts"]=!0;s["lib.es2023.array.d.ts"]=!0;s["lib.es2023.collection.d.ts"]=!0;s["lib.es2023.d.ts"]=!0;s["lib.es2023.full.d.ts"]=!0;s["lib.es2023.intl.d.ts"]=!0;s["lib.es2024.arraybuffer.d.ts"]=!0;s["lib.es2024.collection.d.ts"]=!0;s["lib.es2024.d.ts"]=!0;s["lib.es2024.full.d.ts"]=!0;s["lib.es2024.object.d.ts"]=!0;s["lib.es2024.promise.d.ts"]=!0;s["lib.es2024.regexp.d.ts"]=!0;s["lib.es2024.sharedmemory.d.ts"]=!0;s["lib.es2024.string.d.ts"]=!0;s["lib.es5.d.ts"]=!0;s["lib.es6.d.ts"]=!0;s["lib.esnext.array.d.ts"]=!0;s["lib.esnext.collection.d.ts"]=!0;s["lib.esnext.d.ts"]=!0;s["lib.esnext.decorators.d.ts"]=!0;s["lib.esnext.disposable.d.ts"]=!0;s["lib.esnext.error.d.ts"]=!0;s["lib.esnext.float16.d.ts"]=!0;s["lib.esnext.full.d.ts"]=!0;s["lib.esnext.intl.d.ts"]=!0;s["lib.esnext.iterator.d.ts"]=!0;s["lib.esnext.promise.d.ts"]=!0;s["lib.esnext.sharedmemory.d.ts"]=!0;s["lib.scripthost.d.ts"]=!0;s["lib.webworker.asynciterable.d.ts"]=!0;s["lib.webworker.d.ts"]=!0;s["lib.webworker.importscripts.d.ts"]=!0;s["lib.webworker.iterable.d.ts"]=!0;function A(e,t,i=0){if(typeof e=="string")return e;if(e===void 0)return"";let o="";if(i){o+=t;for(let n=0;n<i;n++)o+=" "}if(o+=e.messageText,i++,e.next)for(const n of e.next)o+=A(n,t,i);return o}function y(e){return e?e.map(t=>t.text).join(""):""}var w=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let i=e.getPositionAt(t.start),o=e.getPositionAt(t.start+t.length),{lineNumber:n,column:u}=i,{lineNumber:c,column:r}=o;return{startLineNumber:n,startColumn:u,endLineNumber:c,endColumn:r}}},H=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){const t=D.parse(e),i=m.getModel(t);if(i)return i;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return m.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const o=K.getExtraLibs()[e];return o?m.createModel(o.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}},W=class extends w{constructor(e,t,i,o){super(o),this._libFiles=e,this._defaults=t,this._selector=i,this._disposables=[],this._listener=Object.create(null);const n=r=>{if(r.getLanguageId()!==i)return;const l=()=>{const{onlyVisible:b}=this._defaults.getDiagnosticsOptions();b?r.isAttachedToEditor()&&this._doValidate(r):this._doValidate(r)};let p;const g=r.onDidChangeContent(()=>{clearTimeout(p),p=window.setTimeout(l,500)}),f=r.onDidChangeAttached(()=>{const{onlyVisible:b}=this._defaults.getDiagnosticsOptions();b&&(r.isAttachedToEditor()?l():m.setModelMarkers(r,this._selector,[]))});this._listener[r.uri.toString()]={dispose(){g.dispose(),f.dispose(),clearTimeout(p)}},l()},u=r=>{m.setModelMarkers(r,this._selector,[]);const l=r.uri.toString();this._listener[l]&&(this._listener[l].dispose(),delete this._listener[l])};this._disposables.push(m.onDidCreateModel(r=>n(r))),this._disposables.push(m.onWillDisposeModel(u)),this._disposables.push(m.onDidChangeModelLanguage(r=>{u(r.model),n(r.model)})),this._disposables.push({dispose(){for(const r of m.getModels())u(r)}});const c=()=>{for(const r of m.getModels())u(r),n(r)};this._disposables.push(this._defaults.onDidChange(c)),this._disposables.push(this._defaults.onDidExtraLibsChange(c)),m.getModels().forEach(r=>n(r))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const i=[],{noSyntaxValidation:o,noSemanticValidation:n,noSuggestionDiagnostics:u}=this._defaults.getDiagnosticsOptions();o||i.push(t.getSyntacticDiagnostics(e.uri.toString())),n||i.push(t.getSemanticDiagnostics(e.uri.toString())),u||i.push(t.getSuggestionDiagnostics(e.uri.toString()));const c=await Promise.all(i);if(!c||e.isDisposed())return;const r=c.reduce((p,g)=>g.concat(p),[]).filter(p=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(p.code)===-1),l=r.map(p=>p.relatedInformation||[]).reduce((p,g)=>g.concat(p),[]).map(p=>p.file?D.parse(p.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(l),!e.isDisposed()&&m.setModelMarkers(e,this._selector,r.map(p=>this._convertDiagnostics(e,p)))}_convertDiagnostics(e,t){const i=t.start||0,o=t.length||1,{lineNumber:n,column:u}=e.getPositionAt(i),{lineNumber:c,column:r}=e.getPositionAt(i+o),l=[];return t.reportsUnnecessary&&l.push(L.Unnecessary),t.reportsDeprecated&&l.push(L.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:n,startColumn:u,endLineNumber:c,endColumn:r,message:A(t.messageText,`
2
2
  `),code:t.code.toString(),tags:l,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];const i=[];return t.forEach(o=>{let n=e;if(o.file&&(n=this._libFiles.getOrCreateModel(o.file.fileName)),!n)return;const u=o.start||0,c=o.length||1,{lineNumber:r,column:l}=n.getPositionAt(u),{lineNumber:p,column:g}=n.getPositionAt(u+c);i.push({resource:n.uri,startLineNumber:r,startColumn:l,endLineNumber:p,endColumn:g,message:A(o.messageText,`
3
3
  `)})}),i}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return k.Error;case 3:return k.Info;case 0:return k.Warning;case 2:return k.Hint}return k.Info}},V=class C extends w{get triggerCharacters(){return["."]}async provideCompletionItems(t,i,o,n){const u=t.getWordUntilPosition(i),c=new I(i.lineNumber,u.startColumn,i.lineNumber,u.endColumn),r=t.uri,l=t.getOffsetAt(i),p=await this._worker(r);if(t.isDisposed())return;const g=await p.getCompletionsAtPosition(r.toString(),l);if(!(!g||t.isDisposed()))return{suggestions:g.entries.map(f=>{let b=c;if(f.replacementSpan){const x=t.getPositionAt(f.replacementSpan.start),S=t.getPositionAt(f.replacementSpan.start+f.replacementSpan.length);b=new I(x.lineNumber,x.column,S.lineNumber,S.column)}const v=[];return f.kindModifiers!==void 0&&f.kindModifiers.indexOf("deprecated")!==-1&&v.push(d.CompletionItemTag.Deprecated),{uri:r,position:i,offset:l,range:b,label:f.name,insertText:f.name,sortText:f.sortText,kind:C.convertKind(f.kind),tags:v}})}}async resolveCompletionItem(t,i){const o=t,n=o.uri,u=o.position,c=o.offset,r=await(await this._worker(n)).getCompletionEntryDetails(n.toString(),c,o.label);return r?{uri:n,position:u,label:r.name,kind:C.convertKind(r.kind),detail:y(r.displayParts),documentation:{value:C.createDocumentationString(r)}}:o}static convertKind(t){switch(t){case a.primitiveType:case a.keyword:return d.CompletionItemKind.Keyword;case a.variable:case a.localVariable:return d.CompletionItemKind.Variable;case a.memberVariable:case a.memberGetAccessor:case a.memberSetAccessor:return d.CompletionItemKind.Field;case a.function:case a.memberFunction:case a.constructSignature:case a.callSignature:case a.indexSignature:return d.CompletionItemKind.Function;case a.enum:return d.CompletionItemKind.Enum;case a.module:return d.CompletionItemKind.Module;case a.class:return d.CompletionItemKind.Class;case a.interface:return d.CompletionItemKind.Interface;case a.warning:return d.CompletionItemKind.File}return d.CompletionItemKind.Property}static createDocumentationString(t){let i=y(t.documentation);if(t.tags)for(const o of t.tags)i+=`
4
4