@theobourgeois/ytdb 0.2.11 → 0.2.13

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 (195) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +2 -0
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +2 -2
  5. package/.next/routes-manifest.json +12 -0
  6. package/.next/server/app/[connectionId]/[schema]/[table]/page.js +1 -1
  7. package/.next/server/app/[connectionId]/[schema]/[table]/page.js.nft.json +1 -1
  8. package/.next/server/app/[connectionId]/[schema]/[table]/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/[connectionId]/diff/page.js +5 -5
  10. package/.next/server/app/[connectionId]/diff/page.js.nft.json +1 -1
  11. package/.next/server/app/[connectionId]/diff/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/[connectionId]/migrations/[setId]/page.js +1 -1
  13. package/.next/server/app/[connectionId]/migrations/[setId]/page.js.nft.json +1 -1
  14. package/.next/server/app/[connectionId]/migrations/[setId]/page_client-reference-manifest.js +1 -1
  15. package/.next/server/app/[connectionId]/migrations/page.js +1 -1
  16. package/.next/server/app/[connectionId]/migrations/page.js.nft.json +1 -1
  17. package/.next/server/app/[connectionId]/migrations/page_client-reference-manifest.js +1 -1
  18. package/.next/server/app/[connectionId]/page.js +1 -1
  19. package/.next/server/app/[connectionId]/page.js.nft.json +1 -1
  20. package/.next/server/app/[connectionId]/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/[connectionId]/query/page.js +1 -1
  22. package/.next/server/app/[connectionId]/query/page.js.nft.json +1 -1
  23. package/.next/server/app/[connectionId]/query/page_client-reference-manifest.js +1 -1
  24. package/.next/server/app/_global-error/page.js +2 -2
  25. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  26. package/.next/server/app/_global-error.html +1 -1
  27. package/.next/server/app/_global-error.rsc +1 -1
  28. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  29. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  30. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  31. package/.next/server/app/_not-found/page.js +1 -1
  32. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  33. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  34. package/.next/server/app/_not-found.html +1 -1
  35. package/.next/server/app/_not-found.rsc +19 -18
  36. package/.next/server/app/_not-found.segments/_full.segment.rsc +19 -18
  37. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +9 -8
  38. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  39. package/.next/server/app/api/activity/route.js +2 -2
  40. package/.next/server/app/api/activity/route.js.nft.json +1 -1
  41. package/.next/server/app/api/adopt/route.js +40 -0
  42. package/.next/server/app/api/adopt/route.js.nft.json +1 -0
  43. package/.next/server/app/api/adopt/route_client-reference-manifest.js +1 -0
  44. package/.next/server/app/api/cell/route.js +2 -2
  45. package/.next/server/app/api/cell/route.js.nft.json +1 -1
  46. package/.next/server/app/api/definition/route.js +3 -3
  47. package/.next/server/app/api/definition/route.js.nft.json +1 -1
  48. package/.next/server/app/api/delete-rows/route.js +2 -2
  49. package/.next/server/app/api/delete-rows/route.js.nft.json +1 -1
  50. package/.next/server/app/api/health/route.js +1 -1
  51. package/.next/server/app/api/insert-row/route.js +2 -2
  52. package/.next/server/app/api/insert-row/route.js.nft.json +1 -1
  53. package/.next/server/app/api/ledger/route.js +40 -1
  54. package/.next/server/app/api/ledger/route.js.nft.json +1 -1
  55. package/.next/server/app/api/lookup/route.js +2 -2
  56. package/.next/server/app/api/lookup/route.js.nft.json +1 -1
  57. package/.next/server/app/api/migrate/route.js +40 -1
  58. package/.next/server/app/api/migrate/route.js.nft.json +1 -1
  59. package/.next/server/app/api/query/route.js +2 -2
  60. package/.next/server/app/api/query/route.js.nft.json +1 -1
  61. package/.next/server/app/api/related/route.js +2 -2
  62. package/.next/server/app/api/related/route.js.nft.json +1 -1
  63. package/.next/server/app/api/repo/route.js +1 -0
  64. package/.next/server/app/api/repo/route.js.nft.json +1 -0
  65. package/.next/server/app/api/repo/route_client-reference-manifest.js +1 -0
  66. package/.next/server/app/api/rows/route.js +1 -1
  67. package/.next/server/app/api/rows/route.js.nft.json +1 -1
  68. package/.next/server/app/api/schema/route.js +2 -2
  69. package/.next/server/app/api/schema/route.js.nft.json +1 -1
  70. package/.next/server/app/api/tables/route.js +2 -2
  71. package/.next/server/app/api/tables/route.js.nft.json +1 -1
  72. package/.next/server/app/api/update-row/route.js +1 -1
  73. package/.next/server/app/api/update-row/route.js.nft.json +1 -1
  74. package/.next/server/app/favicon.ico/route.js +1 -1
  75. package/.next/server/app/icon.svg/route.js +1 -1
  76. package/.next/server/app/index.html +1 -1
  77. package/.next/server/app/index.rsc +21 -20
  78. package/.next/server/app/index.segments/__PAGE__.segment.rsc +12 -11
  79. package/.next/server/app/index.segments/_full.segment.rsc +21 -20
  80. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  81. package/.next/server/app/page.js +2 -2
  82. package/.next/server/app/page.js.nft.json +1 -1
  83. package/.next/server/app/page_client-reference-manifest.js +1 -1
  84. package/.next/server/app-paths-manifest.json +2 -0
  85. package/.next/server/chunks/172.js +1 -0
  86. package/.next/server/chunks/202.js +1 -0
  87. package/.next/server/chunks/421.js +1 -0
  88. package/.next/server/chunks/566.js +1 -0
  89. package/.next/server/chunks/593.js +1 -1
  90. package/.next/server/chunks/729.js +1 -1
  91. package/.next/server/chunks/738.js +2 -0
  92. package/.next/server/chunks/802.js +1 -0
  93. package/.next/server/chunks/{458.js → 928.js} +1 -1
  94. package/.next/server/chunks/97.js +1 -1
  95. package/.next/server/middleware-build-manifest.js +1 -1
  96. package/.next/server/pages/404.html +1 -1
  97. package/.next/server/pages/500.html +1 -1
  98. package/.next/static/KSnyCCtuopUbqXHmuoiqW/_buildManifest.js +1 -0
  99. package/.next/static/chunks/1656-2ef431c507f0f186.js +1 -0
  100. package/.next/static/chunks/1715-206f291fde410bf6.js +1 -0
  101. package/.next/static/chunks/1731-6dec4b981289174f.js +1 -0
  102. package/.next/static/chunks/{6039-02dbcff4d4ccf559.js → 223-a4fca67d979d899d.js} +2 -2
  103. package/.next/static/chunks/3678-daffdce12ffe73e6.js +1 -0
  104. package/.next/static/chunks/4029-abdeb362648dd921.js +1 -0
  105. package/.next/static/chunks/4097-e483bf4279ad2c38.js +1 -0
  106. package/.next/static/chunks/649-a1f6ba42883ab7ce.js +1 -0
  107. package/.next/static/chunks/6996-45e967f18861b87e.js +1 -0
  108. package/.next/static/chunks/7893-4515c42324443f01.js +1 -0
  109. package/.next/static/chunks/8322-ed3deecf058cc11c.js +1 -0
  110. package/.next/static/chunks/8361-d0f8ce41b74637bf.js +1 -0
  111. package/.next/static/chunks/900-3bd4de40e69579da.js +1 -0
  112. package/.next/static/chunks/app/[connectionId]/[schema]/[table]/page-b08fade19a53bd13.js +1 -0
  113. package/.next/static/chunks/app/[connectionId]/diff/page-794180465d38394e.js +10 -0
  114. package/.next/static/chunks/app/[connectionId]/layout-d990f4312947106b.js +1 -0
  115. package/.next/static/chunks/app/[connectionId]/migrations/[setId]/page-31589bfe4aa9fc68.js +1 -0
  116. package/.next/static/chunks/app/[connectionId]/migrations/page-e99de6630bfec654.js +1 -0
  117. package/.next/static/chunks/app/[connectionId]/page-a245bfbd8b3eb8a7.js +1 -0
  118. package/.next/static/chunks/app/[connectionId]/query/page-3955d207f27aefa9.js +1 -0
  119. package/.next/static/chunks/app/_global-error/page-474f91618aaa4c39.js +1 -0
  120. package/.next/static/chunks/app/api/activity/route-474f91618aaa4c39.js +1 -0
  121. package/.next/static/chunks/app/api/adopt/route-474f91618aaa4c39.js +1 -0
  122. package/.next/static/chunks/app/api/cell/route-474f91618aaa4c39.js +1 -0
  123. package/.next/static/chunks/app/api/definition/route-474f91618aaa4c39.js +1 -0
  124. package/.next/static/chunks/app/api/delete-rows/route-474f91618aaa4c39.js +1 -0
  125. package/.next/static/chunks/app/api/health/route-474f91618aaa4c39.js +1 -0
  126. package/.next/static/chunks/app/api/insert-row/route-474f91618aaa4c39.js +1 -0
  127. package/.next/static/chunks/app/api/ledger/route-474f91618aaa4c39.js +1 -0
  128. package/.next/static/chunks/app/api/lookup/route-474f91618aaa4c39.js +1 -0
  129. package/.next/static/chunks/app/api/migrate/route-474f91618aaa4c39.js +1 -0
  130. package/.next/static/chunks/app/api/query/route-474f91618aaa4c39.js +1 -0
  131. package/.next/static/chunks/app/api/related/route-474f91618aaa4c39.js +1 -0
  132. package/.next/static/chunks/app/api/repo/route-474f91618aaa4c39.js +1 -0
  133. package/.next/static/chunks/app/api/rows/route-474f91618aaa4c39.js +1 -0
  134. package/.next/static/chunks/app/api/schema/route-474f91618aaa4c39.js +1 -0
  135. package/.next/static/chunks/app/api/tables/route-474f91618aaa4c39.js +1 -0
  136. package/.next/static/chunks/app/api/update-row/route-474f91618aaa4c39.js +1 -0
  137. package/.next/static/chunks/app/layout-e3fdecae5544dc60.js +1 -0
  138. package/.next/static/chunks/app/page-c487da327ada2a6d.js +2 -0
  139. package/.next/static/chunks/f97e080b-53d22dc5d0e78dfd.js +1 -0
  140. package/.next/static/chunks/next/dist/client/components/builtin/app-error-474f91618aaa4c39.js +1 -0
  141. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-474f91618aaa4c39.js +1 -0
  142. package/.next/static/chunks/next/dist/client/components/builtin/not-found-474f91618aaa4c39.js +1 -0
  143. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-474f91618aaa4c39.js +1 -0
  144. package/.next/static/css/962dd5ab002fed8a.css +1 -0
  145. package/README.md +35 -6
  146. package/package.json +2 -2
  147. package/.next/server/chunks/25.js +0 -1
  148. package/.next/server/chunks/391.js +0 -1
  149. package/.next/server/chunks/400.js +0 -1
  150. package/.next/server/chunks/702.js +0 -1
  151. package/.next/server/chunks/792.js +0 -1
  152. package/.next/server/chunks/907.js +0 -29
  153. package/.next/static/_G44c2d2nyq6S1KEvNgOB/_buildManifest.js +0 -1
  154. package/.next/static/chunks/1528-3257b0cb7a73dd8b.js +0 -1
  155. package/.next/static/chunks/3123-5b058e55010e138a.js +0 -1
  156. package/.next/static/chunks/4100-7151c91ac47f0e66.js +0 -1
  157. package/.next/static/chunks/5541-28b0ead901dee457.js +0 -1
  158. package/.next/static/chunks/6091-de8d2e51b0196435.js +0 -1
  159. package/.next/static/chunks/6842-c2831fd548ae657c.js +0 -1
  160. package/.next/static/chunks/7449-d0483bbc0f0fec63.js +0 -1
  161. package/.next/static/chunks/8322-b1154a96547c860d.js +0 -1
  162. package/.next/static/chunks/8360-5a3ba00eb4ee0720.js +0 -1
  163. package/.next/static/chunks/8651-f7ba864bc5a5b128.js +0 -1
  164. package/.next/static/chunks/9680-3eeb0b7b44c6cab3.js +0 -1
  165. package/.next/static/chunks/app/[connectionId]/[schema]/[table]/page-f2f42daf21a075f2.js +0 -1
  166. package/.next/static/chunks/app/[connectionId]/diff/page-f3262f6929e005e0.js +0 -10
  167. package/.next/static/chunks/app/[connectionId]/layout-237a770e53d2a6ef.js +0 -1
  168. package/.next/static/chunks/app/[connectionId]/migrations/[setId]/page-483afd7dc1a64119.js +0 -1
  169. package/.next/static/chunks/app/[connectionId]/migrations/page-95a09bbb4f26ebb2.js +0 -1
  170. package/.next/static/chunks/app/[connectionId]/page-6dcee1a99ffdd27c.js +0 -1
  171. package/.next/static/chunks/app/[connectionId]/query/page-a0a9cc495d3aa710.js +0 -1
  172. package/.next/static/chunks/app/_global-error/page-6dcee1a99ffdd27c.js +0 -1
  173. package/.next/static/chunks/app/api/activity/route-6dcee1a99ffdd27c.js +0 -1
  174. package/.next/static/chunks/app/api/cell/route-6dcee1a99ffdd27c.js +0 -1
  175. package/.next/static/chunks/app/api/definition/route-6dcee1a99ffdd27c.js +0 -1
  176. package/.next/static/chunks/app/api/delete-rows/route-6dcee1a99ffdd27c.js +0 -1
  177. package/.next/static/chunks/app/api/health/route-6dcee1a99ffdd27c.js +0 -1
  178. package/.next/static/chunks/app/api/insert-row/route-6dcee1a99ffdd27c.js +0 -1
  179. package/.next/static/chunks/app/api/ledger/route-6dcee1a99ffdd27c.js +0 -1
  180. package/.next/static/chunks/app/api/lookup/route-6dcee1a99ffdd27c.js +0 -1
  181. package/.next/static/chunks/app/api/migrate/route-6dcee1a99ffdd27c.js +0 -1
  182. package/.next/static/chunks/app/api/query/route-6dcee1a99ffdd27c.js +0 -1
  183. package/.next/static/chunks/app/api/related/route-6dcee1a99ffdd27c.js +0 -1
  184. package/.next/static/chunks/app/api/rows/route-6dcee1a99ffdd27c.js +0 -1
  185. package/.next/static/chunks/app/api/schema/route-6dcee1a99ffdd27c.js +0 -1
  186. package/.next/static/chunks/app/api/tables/route-6dcee1a99ffdd27c.js +0 -1
  187. package/.next/static/chunks/app/api/update-row/route-6dcee1a99ffdd27c.js +0 -1
  188. package/.next/static/chunks/app/layout-dd332a9583f47cd6.js +0 -1
  189. package/.next/static/chunks/app/page-b582d36c1b014a02.js +0 -2
  190. package/.next/static/chunks/next/dist/client/components/builtin/app-error-6dcee1a99ffdd27c.js +0 -1
  191. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-6dcee1a99ffdd27c.js +0 -1
  192. package/.next/static/chunks/next/dist/client/components/builtin/not-found-6dcee1a99ffdd27c.js +0 -1
  193. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6dcee1a99ffdd27c.js +0 -1
  194. package/.next/static/css/7bb8868c12384025.css +0 -1
  195. /package/.next/static/{_G44c2d2nyq6S1KEvNgOB → KSnyCCtuopUbqXHmuoiqW}/_ssgManifest.js +0 -0
@@ -1,2 +1,2 @@
1
- exports.id=458,exports.ids=[458],exports.modules={300:(a,b,c)=>{"use strict";c.d(b,{Zr:()=>e});let d=a=>b=>{try{let c=a(b);if(c instanceof Promise)return c;return{then:a=>d(a)(c),catch(a){return this}}}catch(a){return{then(a){return this},catch:b=>d(b)(a)}}},e=(a,b)=>(c,e,f)=>{let g,h={storage:function(a){let b;try{b=a()}catch(a){return}return{getItem:a=>{var c;let d=a=>null===a?null:JSON.parse(a,void 0),e=null!=(c=b.getItem(a))?c:null;return e instanceof Promise?e.then(d):d(e)},setItem:(a,c)=>b.setItem(a,JSON.stringify(c,void 0)),removeItem:a=>b.removeItem(a)}}(()=>window.localStorage),partialize:a=>a,version:0,merge:(a,b)=>({...b,...a}),...b},i=!1,j=0,k=new Set,l=new Set,m=h.storage;if(!m)return a((...a)=>{console.warn(`[zustand persist middleware] Unable to update item '${h.name}', the given storage is currently unavailable.`),c(...a)},e,f);let n=()=>{let a=h.partialize({...e()});return m.setItem(h.name,{state:a,version:h.version})},o=f.setState;f.setState=(a,b)=>(o(a,b),n());let p=a((...a)=>(c(...a),n()),e,f);f.getInitialState=()=>p;let q=()=>{var a,b;if(!m)return;let f=++j;i=!1,k.forEach(a=>{var b;return a(null!=(b=e())?b:p)});let o=(null==(b=h.onRehydrateStorage)?void 0:b.call(h,null!=(a=e())?a:p))||void 0;return d(m.getItem.bind(m))(h.name).then(a=>{if(a)if("number"!=typeof a.version||a.version===h.version)return[!1,a.state];else{if(h.migrate){let b=h.migrate(a.state,a.version);return b instanceof Promise?b.then(a=>[!0,a]):[!0,b]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(a=>{var b;if(f!==j)return;let[d,i]=a;if(c(g=h.merge(i,null!=(b=e())?b:p),!0),d)return n()}).then(()=>{f===j&&(null==o||o(e(),void 0),g=e(),i=!0,l.forEach(a=>a(g)))}).catch(a=>{f===j&&(null==o||o(void 0,a))})};return f.persist={setOptions:a=>{h={...h,...a},a.storage&&(m=a.storage)},clearStorage:()=>{++j,null==m||m.removeItem(h.name)},getOptions:()=>h,rehydrate:()=>q(),hasHydrated:()=>i,onHydrate:a=>(k.add(a),()=>{k.delete(a)}),onFinishHydration:a=>(l.add(a),()=>{l.delete(a)})},h.skipHydration||q(),g||p}},17708:a=>{a.exports={style:{fontFamily:"'Geist Mono', 'Geist Mono Fallback'",fontStyle:"normal"},className:"__className_c29908",variable:"__variable_c29908"}},31417:(a,b,c)=>{"use strict";c.d(b,{v:()=>g});var d=c(67484);let e=a=>{let b,c=new Set,d=(a,d)=>{let e="function"==typeof a?a(b):a;if(!Object.is(e,b)){let a=b;b=(null!=d?d:"object"!=typeof e||null===e)?e:Object.assign({},b,e),c.forEach(c=>c(b,a))}},e=()=>b,f={setState:d,getState:e,getInitialState:()=>g,subscribe:a=>(c.add(a),()=>c.delete(a))},g=b=a(d,e,f);return f},f=a=>{let b=a?e(a):e,c=a=>(function(a,b=a=>a){let c=d.useSyncExternalStore(a.subscribe,d.useCallback(()=>b(a.getState()),[a,b]),d.useCallback(()=>b(a.getInitialState()),[a,b]));return d.useDebugValue(c),c})(b,a);return Object.assign(c,b),c},g=a=>a?f(a):f},35159:a=>{a.exports={style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"},className:"__className_246ccd",variable:"__variable_246ccd"}},55091:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return f}});let d=c(5735),e=c(22675);function f(){return(0,d.jsx)(e.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},55414:(a,b,c)=>{"use strict";let d;c.d(b,{hD:()=>aT,eH:()=>aR});for(var e,f,g=c(67484),h=[],i=[],j=Uint8Array,k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,m=k.length;l<m;++l)h[l]=k[l],i[k.charCodeAt(l)]=l;function n(a){var b,c,d=function(a){var b=a.length;if(b%4>0)throw Error("Invalid string. Length must be a multiple of 4");var c=a.indexOf("=");-1===c&&(c=b);var d=c===b?0:4-c%4;return[c,d]}(a),e=d[0],f=d[1],g=new j((e+f)*3/4-f),h=0,k=f>0?e-4:e;for(c=0;c<k;c+=4)b=i[a.charCodeAt(c)]<<18|i[a.charCodeAt(c+1)]<<12|i[a.charCodeAt(c+2)]<<6|i[a.charCodeAt(c+3)],g[h++]=b>>16&255,g[h++]=b>>8&255,g[h++]=255&b;return 2===f&&(b=i[a.charCodeAt(c)]<<2|i[a.charCodeAt(c+1)]>>4,g[h++]=255&b),1===f&&(b=i[a.charCodeAt(c)]<<10|i[a.charCodeAt(c+1)]<<4|i[a.charCodeAt(c+2)]>>2,g[h++]=b>>8&255,g[h++]=255&b),g}function o(a){for(var b,c=a.length,d=c%3,e=[],f=0,g=c-d;f<g;f+=16383)e.push(function(a,b,c){for(var d,e=[],f=b;f<c;f+=3)d=(a[f]<<16&0xff0000)+(a[f+1]<<8&65280)+(255&a[f+2]),e.push(h[d>>18&63]+h[d>>12&63]+h[d>>6&63]+h[63&d]);return e.join("")}(a,f,f+16383>g?g:f+16383));return 1===d?e.push(h[(b=a[c-1])>>2]+h[b<<4&63]+"=="):2===d&&e.push(h[(b=(a[c-2]<<8)+a[c-1])>>10]+h[b>>4&63]+h[b<<2&63]+"="),e.join("")}function p(a){if(void 0===a)return{};if(!q(a))throw Error(`The arguments to a Convex function must be an object. Received: ${a}`);return a}function q(a){let b="object"==typeof a,c=Object.getPrototypeOf(a),d=null===c||c===Object.prototype||c?.constructor?.name==="Object";return b&&d}i[45]=62,i[95]=63;let r=BigInt("-9223372036854775808"),s=BigInt("9223372036854775807"),t=BigInt("0"),u=BigInt("8"),v=BigInt("256"),w="This commit timestamp is unresolved: its value is assigned when the mutation commits. Read the document after the mutation completes to get its value.";class x{[Symbol.toPrimitive](a){if("string"===a)return this.toString();throw Error(w)}valueOf(){throw Error(w)}toJSON(){throw Error(w)}toString(){return"[unresolved commit timestamp]"}}let y=new x;function z(a){return Number.isNaN(a)||!Number.isFinite(a)||Object.is(a,-0)}let A=DataView.prototype.setBigInt64?function(a){if(a<r||s<a)throw Error(`BigInt ${a} does not fit into a 64-bit signed integer.`);let b=new ArrayBuffer(8);return new DataView(b).setBigInt64(0,a,!0),o(new Uint8Array(b))}:function(a){a<t&&(a-=r+r);let b=a.toString(16);b.length%2==1&&(b="0"+b);let c=new Uint8Array(new ArrayBuffer(8)),d=0;for(let e of b.match(/.{2}/g).reverse())c.set([parseInt(e,16)],d++),a>>=u;return o(c)},B=DataView.prototype.getBigInt64?function(a){let b=n(a);if(8!==b.byteLength)throw Error(`Received ${b.byteLength} bytes, expected 8 for $integer`);return new DataView(b.buffer).getBigInt64(0,!0)}:function(a){let b=n(a);if(8!==b.byteLength)throw Error(`Received ${b.byteLength} bytes, expected 8 for $integer`);let c=t,d=t;for(let a of b)c+=BigInt(a)*v**d,d++;return c>s&&(c+=r+r),c};function C(a){if(a.length>1024)throw Error(`Field name ${a} exceeds maximum field name length 1024.`);if(a.startsWith("$"))throw Error(`Field name ${a} starts with a '$', which is reserved.`);for(let b=0;b<a.length;b+=1){let c=a.charCodeAt(b);if(c<32||c>=127)throw Error(`Field name ${a} has invalid character '${a[b]}': Field names can only contain non-control ASCII characters`)}}function D(a){if(null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a)return a;if(Array.isArray(a))return a.map(a=>D(a));if("object"!=typeof a)throw Error(`Unexpected type of ${a}`);let b=Object.entries(a);if(1===b.length){let c=b[0][0];if("$bytes"===c){if("string"!=typeof a.$bytes)throw Error(`Malformed $bytes field on ${a}`);return n(a.$bytes).buffer}if("$integer"===c){if("string"!=typeof a.$integer)throw Error(`Malformed $integer field on ${a}`);return B(a.$integer)}if("$float"===c){if("string"!=typeof a.$float)throw Error(`Malformed $float field on ${a}`);let b=n(a.$float);if(8!==b.byteLength)throw Error(`Received ${b.byteLength} bytes, expected 8 for $float`);let c=new DataView(b.buffer).getFloat64(0,!0);if(!z(c))throw Error(`Float ${c} should be encoded as a number`);return c}if("$commitTs"===c){if(null!==a.$commitTs)throw Error(`Malformed $commitTs field on ${a}`);return y}if("$set"===c)throw Error("Received a Set which is no longer supported as a Convex type.");if("$map"===c)throw Error("Received a Map which is no longer supported as a Convex type.")}let c={};for(let[b,d]of Object.entries(a))C(b),c[b]=D(d);return c}function E(a){let b=JSON.stringify(a,(a,b)=>void 0===b?"undefined":"bigint"==typeof b?`${b.toString()}n`:b);if(b.length>16384){let a="[...truncated]",c=16384-a.length,d=b.codePointAt(c-1);return void 0!==d&&d>65535&&(c-=1),b.substring(0,c)+a}return b}function F(a,b,c,d){return a?`${b}${E(c)} is not a supported Convex type (present at path ${a} in original object ${E(d)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.`:`${b}${E(c)} is not a supported Convex type.`}function G(a){return function a(b,c,d,e){if(void 0===b){let a=d&&` (present at path ${d} in original object ${E(c)})`;throw Error(`undefined is not a valid Convex value${a}. To learn about Convex's supported types, see https://docs.convex.dev/using/types.`)}if(null===b)return b;if("bigint"==typeof b){if(b<r||s<b)throw Error(`BigInt ${b} does not fit into a 64-bit signed integer.`);return{$integer:A(b)}}if("number"==typeof b)if(!z(b))return b;else{let a=new ArrayBuffer(8);return new DataView(a).setFloat64(0,b,!0),{$float:o(new Uint8Array(a))}}if("boolean"==typeof b||"string"==typeof b)return b;if(b instanceof ArrayBuffer)return{$bytes:o(new Uint8Array(b))};if(b instanceof x)return{$commitTs:null};if(Array.isArray(b))return b.map((b,e)=>a(b,c,d+`[${e}]`,!1));if(b instanceof Set)throw Error(F(d,"Set",[...b],c));if(b instanceof Map)throw Error(F(d,"Map",[...b],c));if(!q(b)){let a=b?.constructor?.name;throw Error(F(d,a?`${a} `:"",b,c))}let f={},g=Object.entries(b);for(let[b,h]of(g.sort(([a,b],[c,d])=>a===c?0:a<c?-1:1),g))void 0!==h?(C(b),f[b]=a(h,c,d+`.${b}`,!1)):e&&(C(b),f[b]=function(b,c,d){if(void 0===b)return{$undefined:null};if(void 0===c)throw Error(`Programming error. Current value is ${E(b)} but original value is undefined`);return a(b,c,d,!1)}(h,c,d+`.${b}`));return f}(a,a,"",!1)}var H=Object.defineProperty,I=(a,b,c)=>{let d;return(d="symbol"!=typeof b?b+"":b)in a?H(a,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[d]=c};let J=Symbol.for("ConvexError");class K extends(f=Error,e=J,f){constructor(a){super("string"==typeof a?a:E(a)),I(this,"name","ConvexError"),I(this,"data"),I(this,e,!0),this.data=a}}let L=()=>Array.from({length:4},()=>0);L(),L();let M="1.45.0";var N=Object.defineProperty,O=(a,b,c)=>{let d;return(d="symbol"!=typeof b?b+"":b)in a?N(a,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[d]=c};function P(a){switch(a){case"query":return"Q";case"mutation":return"M";case"action":return"A";case"any":return"?"}}class Q{constructor(a){O(this,"_onLogLineFuncs"),O(this,"_verbose"),this._onLogLineFuncs={},this._verbose=a.verbose}addLogLineListener(a){let b=Math.random().toString(36).substring(2,15);for(let a=0;a<10&&void 0!==this._onLogLineFuncs[b];a++)b=Math.random().toString(36).substring(2,15);return this._onLogLineFuncs[b]=a,()=>{delete this._onLogLineFuncs[b]}}logVerbose(...a){if(this._verbose)for(let b of Object.values(this._onLogLineFuncs))b("debug",`${new Date().toISOString()}`,...a)}log(...a){for(let b of Object.values(this._onLogLineFuncs))b("info",...a)}warn(...a){for(let b of Object.values(this._onLogLineFuncs))b("warn",...a)}error(...a){for(let b of Object.values(this._onLogLineFuncs))b("error",...a)}}function R(a){let b=new Q(a);return b.addLogLineListener((a,...b)=>{switch(a){case"debug":console.debug(...b);break;case"info":default:console.log(...b);break;case"warn":console.warn(...b);break;case"error":console.error(...b)}}),b}function S(a,b,c,d,e){let f=P(c);if("object"==typeof e&&(e=`ConvexError ${JSON.stringify(e.errorData,null,2)}`),"info"===b){let b=e.match(/^\[.*?\] /);if(null===b)return void a.error(`[CONVEX ${f}(${d})] Could not parse console.log`);let c=e.slice(1,b[0].length-2),g=e.slice(b[0].length);a.log(`%c[CONVEX ${f}(${d})] [${c}]`,"color:rgb(0, 145, 255)",g)}else a.error(`[CONVEX ${f}(${d})] ${e}`)}function T(a,b,c){let d=P(a);return`[CONVEX ${d}(${b})] ${c.errorMessage}
1
+ exports.id=928,exports.ids=[928],exports.modules={300:(a,b,c)=>{"use strict";function d(a,b){let c;try{c=a()}catch(a){return}return{getItem:a=>{var d;let e=a=>null===a?null:JSON.parse(a,null==b?void 0:b.reviver),f=null!=(d=c.getItem(a))?d:null;return f instanceof Promise?f.then(e):e(f)},setItem:(a,d)=>c.setItem(a,JSON.stringify(d,null==b?void 0:b.replacer)),removeItem:a=>c.removeItem(a)}}c.d(b,{KU:()=>d,Zr:()=>f});let e=a=>b=>{try{let c=a(b);if(c instanceof Promise)return c;return{then:a=>e(a)(c),catch(a){return this}}}catch(a){return{then(a){return this},catch:b=>e(b)(a)}}},f=(a,b)=>(c,f,g)=>{let h,i={storage:d(()=>window.localStorage),partialize:a=>a,version:0,merge:(a,b)=>({...b,...a}),...b},j=!1,k=0,l=new Set,m=new Set,n=i.storage;if(!n)return a((...a)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),c(...a)},f,g);let o=()=>{let a=i.partialize({...f()});return n.setItem(i.name,{state:a,version:i.version})},p=g.setState;g.setState=(a,b)=>(p(a,b),o());let q=a((...a)=>(c(...a),o()),f,g);g.getInitialState=()=>q;let r=()=>{var a,b;if(!n)return;let d=++k;j=!1,l.forEach(a=>{var b;return a(null!=(b=f())?b:q)});let g=(null==(b=i.onRehydrateStorage)?void 0:b.call(i,null!=(a=f())?a:q))||void 0;return e(n.getItem.bind(n))(i.name).then(a=>{if(a)if("number"!=typeof a.version||a.version===i.version)return[!1,a.state];else{if(i.migrate){let b=i.migrate(a.state,a.version);return b instanceof Promise?b.then(a=>[!0,a]):[!0,b]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(a=>{var b;if(d!==k)return;let[e,g]=a;if(c(h=i.merge(g,null!=(b=f())?b:q),!0),e)return o()}).then(()=>{d===k&&(null==g||g(f(),void 0),h=f(),j=!0,m.forEach(a=>a(h)))}).catch(a=>{d===k&&(null==g||g(void 0,a))})};return g.persist={setOptions:a=>{i={...i,...a},a.storage&&(n=a.storage)},clearStorage:()=>{++k,null==n||n.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>r(),hasHydrated:()=>j,onHydrate:a=>(l.add(a),()=>{l.delete(a)}),onFinishHydration:a=>(m.add(a),()=>{m.delete(a)})},i.skipHydration||r(),h||q}},17708:a=>{a.exports={style:{fontFamily:"'Geist Mono', 'Geist Mono Fallback'",fontStyle:"normal"},className:"__className_c29908",variable:"__variable_c29908"}},19099:(a,b,c)=>{"use strict";var d=c(54839);c.o(d,"useParams")&&c.d(b,{useParams:function(){return d.useParams}}),c.o(d,"usePathname")&&c.d(b,{usePathname:function(){return d.usePathname}}),c.o(d,"useRouter")&&c.d(b,{useRouter:function(){return d.useRouter}})},31417:(a,b,c)=>{"use strict";c.d(b,{v:()=>g});var d=c(67484);let e=a=>{let b,c=new Set,d=(a,d)=>{let e="function"==typeof a?a(b):a;if(!Object.is(e,b)){let a=b;b=(null!=d?d:"object"!=typeof e||null===e)?e:Object.assign({},b,e),c.forEach(c=>c(b,a))}},e=()=>b,f={setState:d,getState:e,getInitialState:()=>g,subscribe:a=>(c.add(a),()=>c.delete(a))},g=b=a(d,e,f);return f},f=a=>{let b=a?e(a):e,c=a=>(function(a,b=a=>a){let c=d.useSyncExternalStore(a.subscribe,d.useCallback(()=>b(a.getState()),[a,b]),d.useCallback(()=>b(a.getInitialState()),[a,b]));return d.useDebugValue(c),c})(b,a);return Object.assign(c,b),c},g=a=>a?f(a):f},35159:a=>{a.exports={style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"},className:"__className_246ccd",variable:"__variable_246ccd"}},55091:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return f}});let d=c(5735),e=c(22675);function f(){return(0,d.jsx)(e.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},55414:(a,b,c)=>{"use strict";let d;c.d(b,{hD:()=>aT,eH:()=>aR});for(var e,f,g=c(67484),h=[],i=[],j=Uint8Array,k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,m=k.length;l<m;++l)h[l]=k[l],i[k.charCodeAt(l)]=l;function n(a){var b,c,d=function(a){var b=a.length;if(b%4>0)throw Error("Invalid string. Length must be a multiple of 4");var c=a.indexOf("=");-1===c&&(c=b);var d=c===b?0:4-c%4;return[c,d]}(a),e=d[0],f=d[1],g=new j((e+f)*3/4-f),h=0,k=f>0?e-4:e;for(c=0;c<k;c+=4)b=i[a.charCodeAt(c)]<<18|i[a.charCodeAt(c+1)]<<12|i[a.charCodeAt(c+2)]<<6|i[a.charCodeAt(c+3)],g[h++]=b>>16&255,g[h++]=b>>8&255,g[h++]=255&b;return 2===f&&(b=i[a.charCodeAt(c)]<<2|i[a.charCodeAt(c+1)]>>4,g[h++]=255&b),1===f&&(b=i[a.charCodeAt(c)]<<10|i[a.charCodeAt(c+1)]<<4|i[a.charCodeAt(c+2)]>>2,g[h++]=b>>8&255,g[h++]=255&b),g}function o(a){for(var b,c=a.length,d=c%3,e=[],f=0,g=c-d;f<g;f+=16383)e.push(function(a,b,c){for(var d,e=[],f=b;f<c;f+=3)d=(a[f]<<16&0xff0000)+(a[f+1]<<8&65280)+(255&a[f+2]),e.push(h[d>>18&63]+h[d>>12&63]+h[d>>6&63]+h[63&d]);return e.join("")}(a,f,f+16383>g?g:f+16383));return 1===d?e.push(h[(b=a[c-1])>>2]+h[b<<4&63]+"=="):2===d&&e.push(h[(b=(a[c-2]<<8)+a[c-1])>>10]+h[b>>4&63]+h[b<<2&63]+"="),e.join("")}function p(a){if(void 0===a)return{};if(!q(a))throw Error(`The arguments to a Convex function must be an object. Received: ${a}`);return a}function q(a){let b="object"==typeof a,c=Object.getPrototypeOf(a),d=null===c||c===Object.prototype||c?.constructor?.name==="Object";return b&&d}i[45]=62,i[95]=63;let r=BigInt("-9223372036854775808"),s=BigInt("9223372036854775807"),t=BigInt("0"),u=BigInt("8"),v=BigInt("256"),w="This commit timestamp is unresolved: its value is assigned when the mutation commits. Read the document after the mutation completes to get its value.";class x{[Symbol.toPrimitive](a){if("string"===a)return this.toString();throw Error(w)}valueOf(){throw Error(w)}toJSON(){throw Error(w)}toString(){return"[unresolved commit timestamp]"}}let y=new x;function z(a){return Number.isNaN(a)||!Number.isFinite(a)||Object.is(a,-0)}let A=DataView.prototype.setBigInt64?function(a){if(a<r||s<a)throw Error(`BigInt ${a} does not fit into a 64-bit signed integer.`);let b=new ArrayBuffer(8);return new DataView(b).setBigInt64(0,a,!0),o(new Uint8Array(b))}:function(a){a<t&&(a-=r+r);let b=a.toString(16);b.length%2==1&&(b="0"+b);let c=new Uint8Array(new ArrayBuffer(8)),d=0;for(let e of b.match(/.{2}/g).reverse())c.set([parseInt(e,16)],d++),a>>=u;return o(c)},B=DataView.prototype.getBigInt64?function(a){let b=n(a);if(8!==b.byteLength)throw Error(`Received ${b.byteLength} bytes, expected 8 for $integer`);return new DataView(b.buffer).getBigInt64(0,!0)}:function(a){let b=n(a);if(8!==b.byteLength)throw Error(`Received ${b.byteLength} bytes, expected 8 for $integer`);let c=t,d=t;for(let a of b)c+=BigInt(a)*v**d,d++;return c>s&&(c+=r+r),c};function C(a){if(a.length>1024)throw Error(`Field name ${a} exceeds maximum field name length 1024.`);if(a.startsWith("$"))throw Error(`Field name ${a} starts with a '$', which is reserved.`);for(let b=0;b<a.length;b+=1){let c=a.charCodeAt(b);if(c<32||c>=127)throw Error(`Field name ${a} has invalid character '${a[b]}': Field names can only contain non-control ASCII characters`)}}function D(a){if(null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a)return a;if(Array.isArray(a))return a.map(a=>D(a));if("object"!=typeof a)throw Error(`Unexpected type of ${a}`);let b=Object.entries(a);if(1===b.length){let c=b[0][0];if("$bytes"===c){if("string"!=typeof a.$bytes)throw Error(`Malformed $bytes field on ${a}`);return n(a.$bytes).buffer}if("$integer"===c){if("string"!=typeof a.$integer)throw Error(`Malformed $integer field on ${a}`);return B(a.$integer)}if("$float"===c){if("string"!=typeof a.$float)throw Error(`Malformed $float field on ${a}`);let b=n(a.$float);if(8!==b.byteLength)throw Error(`Received ${b.byteLength} bytes, expected 8 for $float`);let c=new DataView(b.buffer).getFloat64(0,!0);if(!z(c))throw Error(`Float ${c} should be encoded as a number`);return c}if("$commitTs"===c){if(null!==a.$commitTs)throw Error(`Malformed $commitTs field on ${a}`);return y}if("$set"===c)throw Error("Received a Set which is no longer supported as a Convex type.");if("$map"===c)throw Error("Received a Map which is no longer supported as a Convex type.")}let c={};for(let[b,d]of Object.entries(a))C(b),c[b]=D(d);return c}function E(a){let b=JSON.stringify(a,(a,b)=>void 0===b?"undefined":"bigint"==typeof b?`${b.toString()}n`:b);if(b.length>16384){let a="[...truncated]",c=16384-a.length,d=b.codePointAt(c-1);return void 0!==d&&d>65535&&(c-=1),b.substring(0,c)+a}return b}function F(a,b,c,d){return a?`${b}${E(c)} is not a supported Convex type (present at path ${a} in original object ${E(d)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.`:`${b}${E(c)} is not a supported Convex type.`}function G(a){return function a(b,c,d,e){if(void 0===b){let a=d&&` (present at path ${d} in original object ${E(c)})`;throw Error(`undefined is not a valid Convex value${a}. To learn about Convex's supported types, see https://docs.convex.dev/using/types.`)}if(null===b)return b;if("bigint"==typeof b){if(b<r||s<b)throw Error(`BigInt ${b} does not fit into a 64-bit signed integer.`);return{$integer:A(b)}}if("number"==typeof b)if(!z(b))return b;else{let a=new ArrayBuffer(8);return new DataView(a).setFloat64(0,b,!0),{$float:o(new Uint8Array(a))}}if("boolean"==typeof b||"string"==typeof b)return b;if(b instanceof ArrayBuffer)return{$bytes:o(new Uint8Array(b))};if(b instanceof x)return{$commitTs:null};if(Array.isArray(b))return b.map((b,e)=>a(b,c,d+`[${e}]`,!1));if(b instanceof Set)throw Error(F(d,"Set",[...b],c));if(b instanceof Map)throw Error(F(d,"Map",[...b],c));if(!q(b)){let a=b?.constructor?.name;throw Error(F(d,a?`${a} `:"",b,c))}let f={},g=Object.entries(b);for(let[b,h]of(g.sort(([a,b],[c,d])=>a===c?0:a<c?-1:1),g))void 0!==h?(C(b),f[b]=a(h,c,d+`.${b}`,!1)):e&&(C(b),f[b]=function(b,c,d){if(void 0===b)return{$undefined:null};if(void 0===c)throw Error(`Programming error. Current value is ${E(b)} but original value is undefined`);return a(b,c,d,!1)}(h,c,d+`.${b}`));return f}(a,a,"",!1)}var H=Object.defineProperty,I=(a,b,c)=>{let d;return(d="symbol"!=typeof b?b+"":b)in a?H(a,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[d]=c};let J=Symbol.for("ConvexError");class K extends(f=Error,e=J,f){constructor(a){super("string"==typeof a?a:E(a)),I(this,"name","ConvexError"),I(this,"data"),I(this,e,!0),this.data=a}}let L=()=>Array.from({length:4},()=>0);L(),L();let M="1.45.0";var N=Object.defineProperty,O=(a,b,c)=>{let d;return(d="symbol"!=typeof b?b+"":b)in a?N(a,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[d]=c};function P(a){switch(a){case"query":return"Q";case"mutation":return"M";case"action":return"A";case"any":return"?"}}class Q{constructor(a){O(this,"_onLogLineFuncs"),O(this,"_verbose"),this._onLogLineFuncs={},this._verbose=a.verbose}addLogLineListener(a){let b=Math.random().toString(36).substring(2,15);for(let a=0;a<10&&void 0!==this._onLogLineFuncs[b];a++)b=Math.random().toString(36).substring(2,15);return this._onLogLineFuncs[b]=a,()=>{delete this._onLogLineFuncs[b]}}logVerbose(...a){if(this._verbose)for(let b of Object.values(this._onLogLineFuncs))b("debug",`${new Date().toISOString()}`,...a)}log(...a){for(let b of Object.values(this._onLogLineFuncs))b("info",...a)}warn(...a){for(let b of Object.values(this._onLogLineFuncs))b("warn",...a)}error(...a){for(let b of Object.values(this._onLogLineFuncs))b("error",...a)}}function R(a){let b=new Q(a);return b.addLogLineListener((a,...b)=>{switch(a){case"debug":console.debug(...b);break;case"info":default:console.log(...b);break;case"warn":console.warn(...b);break;case"error":console.error(...b)}}),b}function S(a,b,c,d,e){let f=P(c);if("object"==typeof e&&(e=`ConvexError ${JSON.stringify(e.errorData,null,2)}`),"info"===b){let b=e.match(/^\[.*?\] /);if(null===b)return void a.error(`[CONVEX ${f}(${d})] Could not parse console.log`);let c=e.slice(1,b[0].length-2),g=e.slice(b[0].length);a.log(`%c[CONVEX ${f}(${d})] [${c}]`,"color:rgb(0, 145, 255)",g)}else a.error(`[CONVEX ${f}(${d})] ${e}`)}function T(a,b,c){let d=P(a);return`[CONVEX ${d}(${b})] ${c.errorMessage}
2
2
  Called by client`}function U(a,b){return b.data=a.errorData,b}function V(a){let b,c,d=a.split(":");return 1===d.length?(b=d[0],c="default"):(b=d.slice(0,d.length-1).join(":"),c=d[d.length-1]),b.endsWith(".js")&&(b=b.slice(0,-3)),`${b}:${c}`}function W(a,b){return JSON.stringify({udfPath:V(a),args:G(b)})}function X(a,b,c){let{initialNumItems:d,id:e}=c;return JSON.stringify({type:"paginated",udfPath:V(a),args:G(b),options:G({initialNumItems:d,id:e})})}var Y=Object.defineProperty,Z=(a,b,c)=>{let d;return(d="symbol"!=typeof b?b+"":b)in a?Y(a,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[d]=c};class ${constructor(){Z(this,"nextQueryId"),Z(this,"querySetVersion"),Z(this,"querySet"),Z(this,"queryIdToToken"),Z(this,"identityVersion"),Z(this,"auth"),Z(this,"outstandingQueriesOlderThanRestart"),Z(this,"outstandingAuthOlderThanRestart"),Z(this,"paused"),Z(this,"pendingQuerySetModifications"),this.nextQueryId=0,this.querySetVersion=0,this.identityVersion=0,this.querySet=new Map,this.queryIdToToken=new Map,this.outstandingQueriesOlderThanRestart=new Set,this.outstandingAuthOlderThanRestart=!1,this.paused=!1,this.pendingQuerySetModifications=new Map}hasSyncedPastLastReconnect(){return 0===this.outstandingQueriesOlderThanRestart.size&&!this.outstandingAuthOlderThanRestart}markAuthCompletion(){this.outstandingAuthOlderThanRestart=!1}subscribe(a,b,c,d){let e=V(a),f=W(e,b),g=this.querySet.get(f);if(void 0!==g)return g.numSubscribers+=1,{queryToken:f,modification:null,unsubscribe:()=>this.removeSubscriber(f)};{let a=this.nextQueryId++;this.querySet.set(f,{id:a,canonicalizedUdfPath:e,args:b,numSubscribers:1,journal:c,componentPath:d}),this.queryIdToToken.set(a,f);let g=this.querySetVersion,h=this.querySetVersion+1,i={type:"Add",queryId:a,udfPath:e,args:[G(b)],journal:c,componentPath:d};return this.paused?this.pendingQuerySetModifications.set(a,i):this.querySetVersion=h,{queryToken:f,modification:{type:"ModifyQuerySet",baseVersion:g,newVersion:h,modifications:[i]},unsubscribe:()=>this.removeSubscriber(f)}}}transition(a){for(let b of a.modifications)switch(b.type){case"QueryUpdated":case"QueryFailed":{this.outstandingQueriesOlderThanRestart.delete(b.queryId);let a=b.journal;if(void 0!==a){let c=this.queryIdToToken.get(b.queryId);void 0!==c&&(this.querySet.get(c).journal=a)}break}case"QueryRemoved":this.outstandingQueriesOlderThanRestart.delete(b.queryId);break;default:throw Error(`Invalid modification ${b.type}`)}}queryId(a,b){let c=W(V(a),b),d=this.querySet.get(c);return void 0!==d?d.id:null}isCurrentOrNewerAuthVersion(a){return a>=this.identityVersion}getAuth(){return this.auth}setAuth(a){this.auth={tokenType:"User",value:a};let b=this.identityVersion;return this.paused||(this.identityVersion=b+1),{type:"Authenticate",baseVersion:b,...this.auth}}setAdminAuth(a,b){let c={tokenType:"Admin",value:a,impersonating:b};this.auth=c;let d=this.identityVersion;return this.paused||(this.identityVersion=d+1),{type:"Authenticate",baseVersion:d,...c}}clearAuth(){this.auth=void 0,this.markAuthCompletion();let a=this.identityVersion;return this.paused||(this.identityVersion=a+1),{type:"Authenticate",tokenType:"None",baseVersion:a}}hasAuth(){return!!this.auth}isNewAuth(a){return this.auth?.value!==a}queryPath(a){let b=this.queryIdToToken.get(a);return b?this.querySet.get(b).canonicalizedUdfPath:null}queryArgs(a){let b=this.queryIdToToken.get(a);return b?this.querySet.get(b).args:null}queryToken(a){return this.queryIdToToken.get(a)??null}queryJournal(a){return this.querySet.get(a)?.journal}restart(){this.unpause(),this.outstandingQueriesOlderThanRestart.clear();let a=[];for(let b of this.querySet.values()){let c={type:"Add",queryId:b.id,udfPath:b.canonicalizedUdfPath,args:[G(b.args)],journal:b.journal,componentPath:b.componentPath};a.push(c),this.outstandingQueriesOlderThanRestart.add(b.id)}this.querySetVersion=1;let b={type:"ModifyQuerySet",baseVersion:0,newVersion:1,modifications:a};if(!this.auth)return this.identityVersion=0,[b,void 0];this.outstandingAuthOlderThanRestart=!0;let c={type:"Authenticate",baseVersion:0,...this.auth};return this.identityVersion=1,[b,c]}pause(){this.paused=!0}resume(){let a=this.pendingQuerySetModifications.size>0?{type:"ModifyQuerySet",baseVersion:this.querySetVersion,newVersion:++this.querySetVersion,modifications:Array.from(this.pendingQuerySetModifications.values())}:void 0,b=void 0!==this.auth?{type:"Authenticate",baseVersion:this.identityVersion++,...this.auth}:void 0;return this.unpause(),[a,b]}unpause(){this.paused=!1,this.pendingQuerySetModifications.clear()}removeSubscriber(a){let b=this.querySet.get(a);if(b.numSubscribers>1)return b.numSubscribers-=1,null;{this.querySet.delete(a),this.queryIdToToken.delete(b.id),this.outstandingQueriesOlderThanRestart.delete(b.id);let c=this.querySetVersion,d=this.querySetVersion+1,e={type:"Remove",queryId:b.id};return this.paused?this.pendingQuerySetModifications.has(b.id)?this.pendingQuerySetModifications.delete(b.id):this.pendingQuerySetModifications.set(b.id,e):this.querySetVersion=d,{type:"ModifyQuerySet",baseVersion:c,newVersion:d,modifications:[e]}}}}var _=Object.defineProperty,aa=(a,b,c)=>{let d;return(d="symbol"!=typeof b?b+"":b)in a?_(a,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[d]=c};class ab{constructor(a,b){this.logger=a,this.markConnectionStateDirty=b,aa(this,"inflightRequests"),aa(this,"requestsOlderThanRestart"),aa(this,"inflightMutationsCount",0),aa(this,"inflightActionsCount",0),this.inflightRequests=new Map,this.requestsOlderThanRestart=new Set}request(a,b){let c=new Promise(c=>{this.inflightRequests.set(a.requestId,{message:a,status:{status:b?"Requested":"NotSent",requestedAt:new Date,onResult:c}}),"Mutation"===a.type?this.inflightMutationsCount++:"Action"===a.type&&this.inflightActionsCount++});return this.markConnectionStateDirty(),c}onResponse(a){let b,c,d=this.inflightRequests.get(a.requestId);if(void 0===d||"Completed"===d.status.status)return null;let e="Mutation"===d.message.type?"mutation":"action",f=d.message.udfPath;for(let b of a.logLines)S(this.logger,"info",e,f,b);let g=d.status;if(a.success)b={success:!0,logLines:a.logLines,value:D(a.result)},c=()=>g.onResult(b);else{let d=a.result,{errorData:h}=a;S(this.logger,"error",e,f,d),b={success:!1,errorMessage:d,errorData:void 0!==h?D(h):void 0,logLines:a.logLines},c=()=>g.onResult(b)}return"ActionResponse"!==a.type&&a.success?(d.status={status:"Completed",result:b,ts:a.ts,onResolve:c},null):(c(),this.inflightRequests.delete(a.requestId),this.requestsOlderThanRestart.delete(a.requestId),"Action"===d.message.type?this.inflightActionsCount--:"Mutation"===d.message.type&&this.inflightMutationsCount--,this.markConnectionStateDirty(),{requestId:a.requestId,result:b})}removeCompleted(a){let b=new Map;for(let[c,d]of this.inflightRequests.entries()){let e=d.status;"Completed"===e.status&&e.ts.lessThanOrEqual(a)&&(e.onResolve(),b.set(c,e.result),"Mutation"===d.message.type?this.inflightMutationsCount--:"Action"===d.message.type&&this.inflightActionsCount--,this.inflightRequests.delete(c),this.requestsOlderThanRestart.delete(c))}return b.size>0&&this.markConnectionStateDirty(),b}restart(){this.requestsOlderThanRestart=new Set(this.inflightRequests.keys());let a=[];for(let[b,c]of this.inflightRequests){if("NotSent"===c.status.status){c.status.status="Requested",a.push(c.message);continue}if("Mutation"===c.message.type)a.push(c.message);else if("Action"===c.message.type){if(this.inflightRequests.delete(b),this.requestsOlderThanRestart.delete(b),this.inflightActionsCount--,"Completed"===c.status.status)throw Error("Action should never be in 'Completed' state");c.status.onResult({success:!1,errorMessage:"Connection lost while action was in flight",logLines:[]})}}return this.markConnectionStateDirty(),a}resume(){let a=[];for(let[,b]of this.inflightRequests)if("NotSent"===b.status.status){b.status.status="Requested",a.push(b.message);continue}return a}hasIncompleteRequests(){for(let a of this.inflightRequests.values())if("Requested"===a.status.status)return!0;return!1}hasInflightRequests(){return this.inflightRequests.size>0}hasSyncedPastLastReconnect(){return 0===this.requestsOlderThanRestart.size}timeOfOldestInflightRequest(){if(0===this.inflightRequests.size)return null;let a=Date.now();for(let b of this.inflightRequests.values())"Completed"!==b.status.status&&b.status.requestedAt.getTime()<a&&(a=b.status.requestedAt.getTime());return new Date(a)}inflightMutations(){return this.inflightMutationsCount}inflightActions(){return this.inflightActionsCount}}let ac=Symbol.for("functionName"),ad=Symbol.for("toReferencePath");function ae(a){let b=function(a){let b;if("string"==typeof a)b=a.startsWith("function://")?{functionHandle:a}:{name:a};else if(a[ac])b={name:a[ac]};else{let c=a[ad]??null;if(!c)throw Error(`${a} is not a functionReference`);b={reference:c}}return b}(a);if(void 0===b.name){if(void 0!==b.functionHandle)throw Error(`Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${b.functionHandle}`);if(void 0!==b.reference)throw Error(`Expected function reference in the current component like "api.file.func" or "internal.file.func", but received reference ${b.reference}`);throw Error(`Expected function reference like "api.file.func" or "internal.file.func", but received ${JSON.stringify(b)}`)}if("string"==typeof a)return a;let c=a[ac];if(!c)throw Error(`${a} is not a functionReference`);return c}!function a(b=[]){return new Proxy({},{get(c,d){if("string"==typeof d)return a([...b,d]);if(d===ac){if(b.length<2){let a=["api",...b].join(".");throw Error(`API path is expected to be of the form \`api.moduleName.functionName\`. Found: \`${a}\``)}let a=b.slice(0,-1).join("/"),c=b[b.length-1];return"default"===c?a:a+":"+c}return d===Symbol.toStringTag?"FunctionReference":void 0}})}();var af=Object.defineProperty,ag=(a,b,c)=>{let d;return(d="symbol"!=typeof b?b+"":b)in a?af(a,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[d]=c};class ah{constructor(a){ag(this,"queryResults"),ag(this,"modifiedQueries"),this.queryResults=a,this.modifiedQueries=[]}getQuery(a,...b){let c=p(b[0]),d=ae(a),e=this.queryResults.get(W(d,c));if(void 0!==e)return ah.queryValue(e.result)}getAllQueries(a){let b=[],c=ae(a);for(let a of this.queryResults.values())a.udfPath===V(c)&&b.push({args:a.args,value:ah.queryValue(a.result)});return b}setQuery(a,b,c){let d=p(b),e=ae(a),f=W(e,d);this.queryResults.set(f,{udfPath:e,args:d,result:void 0===c?void 0:{success:!0,value:c,logLines:[]}}),this.modifiedQueries.push(f)}static queryValue(a){return void 0===a?void 0:a.success?a.value:void 0}}class ai{constructor(){ag(this,"queryResults"),ag(this,"optimisticUpdates"),this.queryResults=new Map,this.optimisticUpdates=[]}ingestQueryResultsFromServer(a,b){this.optimisticUpdates=this.optimisticUpdates.filter(a=>!b.has(a.mutationId));let c=this.queryResults;this.queryResults=new Map(a);let d=new ah(this.queryResults);for(let a of this.optimisticUpdates)a.update(d);let e=[];for(let[a,b]of this.queryResults){let d=c.get(a);(void 0===d||d.result!==b.result)&&e.push(a)}return e}applyOptimisticUpdate(a,b){this.optimisticUpdates.push({update:a,mutationId:b});let c=new ah(this.queryResults);return a(c),c.modifiedQueries}rawQueryResult(a){let b=this.queryResults.get(a);if(void 0!==b)return b.result}queryResult(a){let b=this.queryResults.get(a);if(void 0===b)return;let c=b.result;if(void 0!==c){if(c.success)return c.value;if(void 0!==c.errorData)throw U(c,new K(T("query",b.udfPath,c)));throw Error(T("query",b.udfPath,c))}}hasQueryResult(a){return void 0!==this.queryResults.get(a)}queryLogs(a){let b=this.queryResults.get(a);return b?.result?.logLines}}var aj=Object.defineProperty,ak=(a,b,c)=>{let d;return(d="symbol"!=typeof b?b+"":b)in a?aj(a,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[d]=c};class al{constructor(a,b){ak(this,"low"),ak(this,"high"),ak(this,"__isUnsignedLong__"),this.low=0|a,this.high=0|b,this.__isUnsignedLong__=!0}static isLong(a){return!0===(a&&a.__isUnsignedLong__)}static fromBytesLE(a){return new al(a[0]|a[1]<<8|a[2]<<16|a[3]<<24,a[4]|a[5]<<8|a[6]<<16|a[7]<<24)}toBytesLE(){let a=this.high,b=this.low;return[255&b,b>>>8&255,b>>>16&255,b>>>24,255&a,a>>>8&255,a>>>16&255,a>>>24]}static fromNumber(a){return isNaN(a)||a<0?am:a>=ao?ap:new al(a%an|0,a/an|0)}toString(){return(BigInt(this.high)*BigInt(an)+BigInt(this.low)).toString()}equals(a){return al.isLong(a)||(a=al.fromValue(a)),(this.high>>>31!=1||a.high>>>31!=1)&&this.high===a.high&&this.low===a.low}notEquals(a){return!this.equals(a)}comp(a){return(al.isLong(a)||(a=al.fromValue(a)),this.equals(a))?0:a.high>>>0>this.high>>>0||a.high===this.high&&a.low>>>0>this.low>>>0?-1:1}lessThanOrEqual(a){return 0>=this.comp(a)}static fromValue(a){return"number"==typeof a?al.fromNumber(a):new al(a.low,a.high)}}let am=new al(0,0),an=0x100000000,ao=0xffffffffffffffff,ap=new al(-1,-1);var aq=Object.defineProperty,ar=(a,b,c)=>{let d;return(d="symbol"!=typeof b?b+"":b)in a?aq(a,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[d]=c};class as{constructor(a,b){ar(this,"version"),ar(this,"remoteQuerySet"),ar(this,"queryPath"),ar(this,"logger"),this.version={querySet:0,ts:al.fromNumber(0),identity:0},this.remoteQuerySet=new Map,this.queryPath=a,this.logger=b}transition(a){let b=a.startVersion;if(this.version.querySet!==b.querySet||this.version.ts.notEquals(b.ts)||this.version.identity!==b.identity)throw Error(`Invalid start version: ${b.ts.toString()}:${b.querySet}:${b.identity}, transitioning from ${this.version.ts.toString()}:${this.version.querySet}:${this.version.identity}`);for(let b of a.modifications)switch(b.type){case"QueryUpdated":{let a=this.queryPath(b.queryId);if(a)for(let c of b.logLines)S(this.logger,"info","query",a,c);let c=D(b.value??null);this.remoteQuerySet.set(b.queryId,{success:!0,value:c,logLines:b.logLines});break}case"QueryFailed":{let a=this.queryPath(b.queryId);if(a)for(let c of b.logLines)S(this.logger,"info","query",a,c);let{errorData:c}=b;this.remoteQuerySet.set(b.queryId,{success:!1,errorMessage:b.errorMessage,errorData:void 0!==c?D(c):void 0,logLines:b.logLines});break}case"QueryRemoved":this.remoteQuerySet.delete(b.queryId);break;default:throw Error(`Invalid modification ${b.type}`)}this.version=a.endVersion}remoteQueryResults(){return this.remoteQuerySet}timestamp(){return this.version.ts}}function at(a){let b=n(a);return al.fromBytesLE(Array.from(b))}function au(a){switch(a.type){case"FatalError":case"AuthError":case"ActionResponse":case"TransitionChunk":case"Ping":return{...a};case"MutationResponse":if(a.success)return{...a,ts:at(a.ts)};return{...a};case"Transition":return{...a,startVersion:{...a.startVersion,ts:at(a.startVersion.ts)},endVersion:{...a.endVersion,ts:at(a.endVersion.ts)}}}}var av=Object.defineProperty,aw=(a,b,c)=>{let d;return(d="symbol"!=typeof b?b+"":b)in a?av(a,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[d]=c};function ax(){return(void 0===d&&(d=Date.now()),"u"<typeof performance||!performance.now)?Date.now():Math.round(d+performance.now())}function ay(){return`t=${Math.round((ax()-d)/100)/10}s`}let az={InternalServerError:{timeout:1e3},SubscriptionsWorkerFullError:{timeout:3e3},TooManyConcurrentRequests:{timeout:3e3},CommitterFullError:{timeout:3e3},AwsTooManyRequestsException:{timeout:3e3},ExecuteFullError:{timeout:3e3},SystemTimeoutError:{timeout:3e3},ExpiredInQueue:{timeout:3e3},VectorIndexesUnavailable:{timeout:1e3},SearchIndexesUnavailable:{timeout:1e3},TableSummariesUnavailable:{timeout:1e3},VectorIndexTooLarge:{timeout:3e3},SearchIndexTooLarge:{timeout:3e3},TooManyWritesInTimePeriod:{timeout:3e3}};class aA{constructor(a,b,c,d,e,f){this.markConnectionStateDirty=e,this.debug=f,aw(this,"socket"),aw(this,"connectionCount"),aw(this,"_hasEverConnected",!1),aw(this,"lastCloseReason"),aw(this,"transitionChunkBuffer",null),aw(this,"defaultInitialBackoff"),aw(this,"maxBackoff"),aw(this,"retries"),aw(this,"serverInactivityThreshold"),aw(this,"reconnectDueToServerInactivityTimeout"),aw(this,"scheduledReconnect",null),aw(this,"networkOnlineHandler",null),aw(this,"pendingNetworkRecoveryInfo",null),aw(this,"uri"),aw(this,"onOpen"),aw(this,"onResume"),aw(this,"onMessage"),aw(this,"webSocketConstructor"),aw(this,"logger"),aw(this,"onServerDisconnectError"),this.webSocketConstructor=c,this.socket={state:"disconnected"},this.connectionCount=0,this.lastCloseReason="InitialConnect",this.defaultInitialBackoff=1e3,this.maxBackoff=16e3,this.retries=0,this.serverInactivityThreshold=6e4,this.reconnectDueToServerInactivityTimeout=null,this.uri=a,this.onOpen=b.onOpen,this.onResume=b.onResume,this.onMessage=b.onMessage,this.onServerDisconnectError=b.onServerDisconnectError,this.logger=d,this.setupNetworkListener(),this.connect()}setSocketState(a){this.socket=a,this._logVerbose(`socket state changed: ${this.socket.state}, paused: ${"paused"in this.socket?this.socket.paused:void 0}`),this.markConnectionStateDirty()}setupNetworkListener(){"u"<typeof window||"function"!=typeof window.addEventListener||null===this.networkOnlineHandler&&(this.networkOnlineHandler=()=>{this._logVerbose("network online event detected"),this.tryReconnectImmediately()},window.addEventListener("online",this.networkOnlineHandler),this._logVerbose("network online event listener registered"))}cleanupNetworkListener(){this.networkOnlineHandler&&"u">typeof window&&"function"==typeof window.removeEventListener&&(window.removeEventListener("online",this.networkOnlineHandler),this.networkOnlineHandler=null,this._logVerbose("network online event listener removed"))}assembleTransition(a){if(a.partNumber<0||a.partNumber>=a.totalParts||0===a.totalParts||this.transitionChunkBuffer&&(this.transitionChunkBuffer.totalParts!==a.totalParts||this.transitionChunkBuffer.transitionId!==a.transitionId))throw this.transitionChunkBuffer=null,Error("Invalid TransitionChunk");if(null===this.transitionChunkBuffer&&(this.transitionChunkBuffer={chunks:[],totalParts:a.totalParts,transitionId:a.transitionId}),a.partNumber!==this.transitionChunkBuffer.chunks.length){let b=this.transitionChunkBuffer.chunks.length;throw this.transitionChunkBuffer=null,Error(`TransitionChunk received out of order: expected part ${b}, got ${a.partNumber}`)}if(this.transitionChunkBuffer.chunks.push(a.chunk),this.transitionChunkBuffer.chunks.length===a.totalParts){let a=this.transitionChunkBuffer.chunks.join("");this.transitionChunkBuffer=null;let b=au(JSON.parse(a));if("Transition"!==b.type)throw Error(`Expected Transition, got ${b.type} after assembling chunks`);return b}return null}connect(){if("terminated"===this.socket.state)return;if("disconnected"!==this.socket.state&&"stopped"!==this.socket.state)throw Error("Didn't start connection from disconnected state: "+this.socket.state);let a=new this.webSocketConstructor(this.uri);this._logVerbose("constructed WebSocket"),this.setSocketState({state:"connecting",ws:a,paused:"no"}),this.resetServerInactivityTimeout(),a.onopen=()=>{if(this.logger.logVerbose("begin ws.onopen"),"connecting"!==this.socket.state)throw Error("onopen called with socket not in connecting state");if(this.setSocketState({state:"ready",ws:a,paused:"yes"===this.socket.paused?"uninitialized":"no"}),this.resetServerInactivityTimeout(),"no"===this.socket.paused&&(this._hasEverConnected=!0,this.onOpen({connectionCount:this.connectionCount,lastCloseReason:this.lastCloseReason,clientTs:ax()})),"InitialConnect"!==this.lastCloseReason&&(this.lastCloseReason?this.logger.log("WebSocket reconnected at",ay(),"after disconnect due to",this.lastCloseReason):this.logger.log("WebSocket reconnected at",ay())),this.connectionCount+=1,this.lastCloseReason=null,null!==this.pendingNetworkRecoveryInfo){let{timeSavedMs:a}=this.pendingNetworkRecoveryInfo;this.pendingNetworkRecoveryInfo=null,this.sendMessage({type:"Event",eventType:"NetworkRecoveryReconnect",event:{timeSavedMs:a}}),this.logger.log(`Network recovery reconnect saved ~${Math.round(a/1e3)}s of waiting`)}},a.onerror=a=>{this.transitionChunkBuffer=null;let b=a.message;b&&this.logger.log(`WebSocket error message: ${b}`)},a.onmessage=a=>{this.resetServerInactivityTimeout();let b=a.data.length,c=au(JSON.parse(a.data));if(this._logVerbose(`received ws message with type ${c.type}`),"Ping"!==c.type){if("TransitionChunk"===c.type){let a=this.assembleTransition(c);if(!a)return;c=a,this._logVerbose(`assembled full ws message of type ${c.type}`)}null!==this.transitionChunkBuffer&&(this.transitionChunkBuffer=null,this.logger.log(`Received unexpected ${c.type} while buffering TransitionChunks`)),"Transition"===c.type&&this.reportLargeTransition({messageLength:b,transition:c}),this.onMessage(c).hasSyncedPastLastReconnect&&(this.retries=0,this.markConnectionStateDirty())}},a.onclose=a=>{if(this._logVerbose("begin ws.onclose"),this.transitionChunkBuffer=null,null===this.lastCloseReason&&(this.lastCloseReason=a.reason||`closed with code ${a.code}`),1e3!==a.code&&1001!==a.code&&1005!==a.code&&4040!==a.code){let b=`WebSocket closed with code ${a.code}`;a.reason&&(b+=`: ${a.reason}`),this.logger.log(b),this.onServerDisconnectError&&a.reason&&this.onServerDisconnectError(b)}let b=function(a){if(void 0===a)return"Unknown";for(let b of Object.keys(az))if(a.startsWith(b))return b;return"Unknown"}(a.reason);this.scheduleReconnect(b)}}socketState(){return this.socket.state}sendMessage(a){let b={type:a.type,..."Authenticate"===a.type&&"User"===a.tokenType?{value:`...${a.value.slice(-7)}`}:{}};if("ready"===this.socket.state&&"no"===this.socket.paused){let c=JSON.stringify(function(a){switch(a.type){case"Authenticate":case"ModifyQuerySet":case"Mutation":case"Action":case"Event":return{...a};case"Connect":if(void 0===a.maxObservedTimestamp)return{...a,maxObservedTimestamp:void 0};return{...a,maxObservedTimestamp:o(new Uint8Array(a.maxObservedTimestamp.toBytesLE()))}}}(a)),d=!1;try{this.socket.ws.send(c),d=!0}catch(a){this.logger.log(`Failed to send message on WebSocket, reconnecting: ${a}`),this.closeAndReconnect("FailedToSendMessage")}return this._logVerbose(`${d?"sent":"failed to send"} message with type ${a.type}: ${JSON.stringify(b)}`),!0}return this._logVerbose(`message not sent (socket state: ${this.socket.state}, paused: ${"paused"in this.socket?this.socket.paused:void 0}): ${JSON.stringify(b)}`),!1}resetServerInactivityTimeout(){"terminated"!==this.socket.state&&(null!==this.reconnectDueToServerInactivityTimeout&&(clearTimeout(this.reconnectDueToServerInactivityTimeout),this.reconnectDueToServerInactivityTimeout=null),this.reconnectDueToServerInactivityTimeout=setTimeout(()=>{this.closeAndReconnect("InactiveServer")},this.serverInactivityThreshold))}scheduleReconnect(a){this.scheduledReconnect&&(clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null),this.socket={state:"disconnected"};let b=this.nextBackoff(a);this.markConnectionStateDirty(),this.logger.log(`Attempting reconnect in ${Math.round(b)}ms`);let c=ax(),d=setTimeout(()=>{this.scheduledReconnect?.timeout===d&&(this.scheduledReconnect=null,this.connect())},b);this.scheduledReconnect={timeout:d,scheduledAt:c,backoffMs:b}}closeAndReconnect(a){switch(this._logVerbose(`begin closeAndReconnect with reason ${a}`),this.socket.state){case"disconnected":case"terminated":case"stopped":return;case"connecting":case"ready":this.lastCloseReason=a,this.close(),this.scheduleReconnect("client");return;default:this.socket}}close(){switch(this.transitionChunkBuffer=null,this.socket.state){case"disconnected":case"terminated":case"stopped":return Promise.resolve();case"connecting":{let a=this.socket.ws;return a.onmessage=a=>{this._logVerbose("Ignoring message received after close")},new Promise(b=>{a.onclose=()=>{this._logVerbose("Closed after connecting"),b()},a.onopen=()=>{this._logVerbose("Opened after connecting"),a.close()}})}case"ready":{this._logVerbose("ws.close called");let a=this.socket.ws;a.onmessage=a=>{this._logVerbose("Ignoring message received after close")};let b=new Promise(b=>{a.onclose=()=>{b()}});return a.close(),b}default:return this.socket,Promise.resolve()}}terminate(){switch(this.reconnectDueToServerInactivityTimeout&&clearTimeout(this.reconnectDueToServerInactivityTimeout),this.scheduledReconnect&&(clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null),this.cleanupNetworkListener(),this.socket.state){case"terminated":case"stopped":case"disconnected":case"connecting":case"ready":{let a=this.close();return this.setSocketState({state:"terminated"}),a}default:throw this.socket,Error(`Invalid websocket state: ${this.socket.state}`)}}stop(){switch(this.socket.state){case"terminated":return Promise.resolve();case"connecting":case"stopped":case"disconnected":case"ready":{this.cleanupNetworkListener();let a=this.close();return this.socket={state:"stopped"},a}default:return this.socket,Promise.resolve()}}tryRestart(){switch(this.socket.state){case"stopped":break;case"terminated":case"connecting":case"ready":case"disconnected":this.logger.logVerbose("Restart called without stopping first");return;default:this.socket}this.setupNetworkListener(),this.connect()}pause(){switch(this.socket.state){case"disconnected":case"stopped":case"terminated":return;case"connecting":case"ready":this.socket={...this.socket,paused:"yes"};return;default:return void this.socket}}tryReconnectImmediately(){if(this._logVerbose("tryReconnectImmediately called"),"disconnected"!==this.socket.state)return void this._logVerbose(`tryReconnectImmediately called but socket state is ${this.socket.state}, no action taken`);let a=null;if(this.scheduledReconnect){let b=ax()-this.scheduledReconnect.scheduledAt;a=Math.max(0,this.scheduledReconnect.backoffMs-b),this._logVerbose(`would have waited ${Math.round(a)}ms more (backoff was ${Math.round(this.scheduledReconnect.backoffMs)}ms, elapsed ${Math.round(b)}ms)`),clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null,this._logVerbose("canceled scheduled reconnect")}this.logger.log("Network recovery detected, reconnecting immediately"),this.pendingNetworkRecoveryInfo=null!==a?{timeSavedMs:a}:null,this.connect()}resume(){switch(this.socket.state){case"connecting":this.socket={...this.socket,paused:"no"};return;case"ready":"uninitialized"===this.socket.paused?(this.socket={...this.socket,paused:"no"},this._hasEverConnected=!0,this.onOpen({connectionCount:this.connectionCount,lastCloseReason:this.lastCloseReason,clientTs:ax()})):"yes"===this.socket.paused&&(this.socket={...this.socket,paused:"no"},this.onResume());return;case"terminated":case"stopped":case"disconnected":return;default:this.socket}this.connect()}connectionState(){return{isConnected:"ready"===this.socket.state,hasEverConnected:this._hasEverConnected,connectionCount:this.connectionCount,connectionRetries:this.retries}}_logVerbose(a){this.logger.logVerbose(a)}nextBackoff(a){let b=("client"===a?100:"Unknown"===a?this.defaultInitialBackoff:az[a].timeout)*Math.pow(2,this.retries);this.retries+=1;let c=Math.min(b,this.maxBackoff),d=c*(Math.random()-.5);return c+d}reportLargeTransition({transition:a,messageLength:b}){if(void 0===a.clientClockSkew||void 0===a.serverTs)return;let c=ax()-a.clientClockSkew-a.serverTs/1e6,d=`${Math.round(c)}ms`,e=`${Math.round(b/1e4)/100}MB`,f=b/(c/1e3),g=`${Math.round(f/1e4)/100}MB per second`;this._logVerbose(`received ${e} transition in ${d} at ${g}`),b>2e7?this.logger.log(`received query results totaling more that 20MB (${e}) which will take a long time to download on slower connections`):c>2e4&&this.logger.log(`received query results totaling ${e} which took more than 20s to arrive (${d})`),this.debug&&this.sendMessage({type:"Event",eventType:"ClientReceivedTransition",event:{transitionTransitTime:c,messageLength:b}})}}class aB extends Error{}function aC(a,b){let c;if("string"!=typeof a)throw new aB("Invalid token specified: must be a string");b||(b={});let d=+(!0!==b.header),e=a.split(".")[d];if("string"!=typeof e)throw new aB(`Invalid token specified: missing part #${d+1}`);try{c=function(a){let b=a.replace(/-/g,"+").replace(/_/g,"/");switch(b.length%4){case 0:break;case 2:b+="==";break;case 3:b+="=";break;default:throw Error("base64 string is not of the correct length")}try{var c;return c=b,decodeURIComponent(atob(c).replace(/(.)/g,(a,b)=>{let c=b.charCodeAt(0).toString(16).toUpperCase();return c.length<2&&(c="0"+c),"%"+c}))}catch{return atob(b)}}(e)}catch(a){throw new aB(`Invalid token specified: invalid base64 for part #${d+1} (${a.message})`)}try{return JSON.parse(c)}catch(a){throw new aB(`Invalid token specified: invalid json for part #${d+1} (${a.message})`)}}aB.prototype.name="InvalidTokenError";var aD=Object.defineProperty,aE=(a,b,c)=>{let d;return(d="symbol"!=typeof b?b+"":b)in a?aD(a,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[d]=c};class aF{constructor(a,b,c){aE(this,"authState",{state:"noAuth"}),aE(this,"configVersion",0),aE(this,"syncState"),aE(this,"authenticate"),aE(this,"stopSocket"),aE(this,"tryRestartSocket"),aE(this,"pauseSocket"),aE(this,"resumeSocket"),aE(this,"clearAuth"),aE(this,"logger"),aE(this,"refreshTokenLeewaySeconds"),aE(this,"initialAuthTokenReuse"),aE(this,"lastRefreshChange"),aE(this,"tokenConfirmationAttempts",0),this.syncState=a,this.authenticate=b.authenticate,this.stopSocket=b.stopSocket,this.tryRestartSocket=b.tryRestartSocket,this.pauseSocket=b.pauseSocket,this.resumeSocket=b.resumeSocket,this.clearAuth=b.clearAuth,this.logger=c.logger,this.refreshTokenLeewaySeconds=c.refreshTokenLeewaySeconds,this.initialAuthTokenReuse=c.initialAuthTokenReuse,this.lastRefreshChange=!1}notifyRefreshChange(a){"noAuth"!==this.authState.state&&"initialRefetch"!==this.authState.state&&this.authState.config.onRefreshChange&&this.lastRefreshChange!==a&&(this.lastRefreshChange=a,this.authState.config.onRefreshChange(a))}async setConfig(a,b,c){this.resetAuthState(),this._logVerbose("pausing WS for auth token fetch"),this.pauseSocket();let d=await this.fetchTokenAndGuardAgainstRace(a,{forceRefreshToken:!1});if(d.isFromOutdatedConfig)return;let e={fetchToken:a,onAuthChange:b,onRefreshChange:c};d.value?(this.setAuthState({state:"waitingForServerConfirmationOfCachedToken",config:e,hasRetried:!1}),this.authenticate(d.value)):(this.setAuthState({state:"initialRefetch",config:e}),await this.refetchToken()),this._logVerbose("resuming WS after auth token fetch"),this.resumeSocket()}onTransition(a){if(this.syncState.isCurrentOrNewerAuthVersion(a.endVersion.identity)&&!(a.endVersion.identity<=a.startVersion.identity)){if(this._logVerbose(`auth state is ${this.authState.state} when handling transition`),this.syncState.markAuthCompletion(),"waitingForServerConfirmationOfCachedToken"===this.authState.state){this._logVerbose("server confirmed auth token is valid");let b=this.syncState.getAuth()?.value;this.initialAuthTokenReuse&&b?this.scheduleTokenRefetch(b,a.clientClockSkew):this.refetchToken(),this.authState.config.onAuthChange(!0);return}"waitingForServerConfirmationOfFreshToken"===this.authState.state&&(this._logVerbose("server confirmed new auth token is valid"),this.notifyRefreshChange(!1),this.scheduleTokenRefetch(this.authState.token),this.tokenConfirmationAttempts=0,this.authState.hadAuth||this.authState.config.onAuthChange(!0))}}onAuthError(a){if(!1===a.authUpdateAttempted&&("waitingForServerConfirmationOfFreshToken"===this.authState.state||"waitingForServerConfirmationOfCachedToken"===this.authState.state))return void this._logVerbose("ignoring non-auth token expired error");let{baseVersion:b}=a;this.syncState.isCurrentOrNewerAuthVersion(b+1)?this.tryToReauthenticate(a):this._logVerbose("ignoring auth error for previous auth attempt")}async tryToReauthenticate(a){if(this._logVerbose(`attempting to reauthenticate: ${a.error}`),"noAuth"===this.authState.state||"waitingForServerConfirmationOfFreshToken"===this.authState.state&&this.tokenConfirmationAttempts>=2){this.logger.error(`Failed to authenticate: "${a.error}", check your server auth config`),this.syncState.hasAuth()&&this.syncState.clearAuth(),"noAuth"!==this.authState.state&&this.setAndReportAuthFailed(this.authState.config.onAuthChange);return}if("waitingForServerConfirmationOfFreshToken"===this.authState.state&&(this.tokenConfirmationAttempts++,this._logVerbose(`retrying reauthentication, ${2-this.tokenConfirmationAttempts} attempts remaining`)),this.notifyRefreshChange(!0),await this.stopSocket(),"noAuth"===this.authState.state)return;let b=await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken,{forceRefreshToken:!0});b.isFromOutdatedConfig||(b.value&&this.syncState.isNewAuth(b.value)?(this.authenticate(b.value),this.setAuthState({state:"waitingForServerConfirmationOfFreshToken",config:this.authState.config,token:b.value,hadAuth:"notRefetching"===this.authState.state||"waitingForScheduledRefetch"===this.authState.state})):(this._logVerbose("reauthentication failed, could not fetch a new token"),this.syncState.hasAuth()&&this.syncState.clearAuth(),this.setAndReportAuthFailed(this.authState.config.onAuthChange)),this.tryRestartSocket())}async refetchToken(){if("noAuth"===this.authState.state)return;this._logVerbose("refetching auth token");let a=await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken,{forceRefreshToken:!0});a.isFromOutdatedConfig||(a.value?this.syncState.isNewAuth(a.value)?(this.setAuthState({state:"waitingForServerConfirmationOfFreshToken",hadAuth:this.syncState.hasAuth(),token:a.value,config:this.authState.config}),this.authenticate(a.value)):this.setAuthState({state:"notRefetching",config:this.authState.config}):(this._logVerbose("refetching token failed"),this.syncState.hasAuth()&&this.clearAuth(),this.setAndReportAuthFailed(this.authState.config.onAuthChange)),this._logVerbose("restarting WS after auth token fetch (if currently stopped)"),this.tryRestartSocket())}scheduleTokenRefetch(a,b){let c;if("noAuth"===this.authState.state)return;let d=this.decodeToken(a);if(!d)return void this.logger.error("Auth token is not a valid JWT, cannot refetch the token");let{iat:e,exp:f}=d;if(!e||!f)return void this.logger.error("Auth token does not have required fields, cannot refetch the token");let g=f-e;if(g<=2)return void this.logger.error("Auth token does not live long enough, cannot refetch the token");void 0!==b?(c=f-(Date.now()-b)/1e3)<=0&&(c=0):c=g;let h=Math.min(1728e6,(c-this.refreshTokenLeewaySeconds)*1e3);h<=0&&(this.logger.warn(`Refetching auth token immediately, configured leeway ${this.refreshTokenLeewaySeconds}s is larger than the token's lifetime ${c}s`),h=0);let i=setTimeout(()=>{this._logVerbose("running scheduled token refetch"),this.refetchToken()},h);this.setAuthState({state:"waitingForScheduledRefetch",refetchTokenTimeoutId:i,config:this.authState.config}),this._logVerbose(`scheduled preemptive auth token refetching in ${h}ms`)}async fetchTokenAndGuardAgainstRace(a,b){let c=++this.configVersion;this._logVerbose(`fetching token with config version ${c}`);let d=await a(b);return this.configVersion!==c?(this._logVerbose(`stale config version, expected ${c}, got ${this.configVersion}`),{isFromOutdatedConfig:!0}):{isFromOutdatedConfig:!1,value:d}}stop(){this.resetAuthState(),this.configVersion++,this._logVerbose(`config version bumped to ${this.configVersion}`)}setAndReportAuthFailed(a){a(!1),this.resetAuthState()}resetAuthState(){this.notifyRefreshChange(!1),this.setAuthState({state:"noAuth"})}setAuthState(a){let b="waitingForServerConfirmationOfFreshToken"===a.state?{hadAuth:a.hadAuth,state:a.state,token:`...${a.token.slice(-7)}`}:{state:a.state};switch(this._logVerbose(`setting auth state to ${JSON.stringify(b)}`),a.state){case"waitingForScheduledRefetch":case"notRefetching":case"noAuth":this.tokenConfirmationAttempts=0}"waitingForScheduledRefetch"===this.authState.state&&clearTimeout(this.authState.refetchTokenTimeoutId),this.authState=a}decodeToken(a){try{return aC(a)}catch(a){return this._logVerbose(`Error decoding token: ${a instanceof Error?a.message:"Unknown error"}`),null}}_logVerbose(a){this.logger.logVerbose(`${a} [v${this.configVersion}]`)}}let aG=["convexClientConstructed","convexWebSocketOpen","convexFirstMessageReceived"];function aH(a){let b=a.name.slice(6);return{name:b=b.charAt(0).toLowerCase()+b.slice(1),startTime:a.startTime}}var aI=Object.defineProperty,aJ=(a,b,c)=>{let d;return(d="symbol"!=typeof b?b+"":b)in a?aI(a,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[d]=c};class aK{constructor(a,b,c){let d;if(aJ(this,"address"),aJ(this,"state"),aJ(this,"requestManager"),aJ(this,"webSocketManager"),aJ(this,"authenticationManager"),aJ(this,"remoteQuerySet"),aJ(this,"optimisticQueryResults"),aJ(this,"_transitionHandlerCounter",0),aJ(this,"_nextRequestId"),aJ(this,"_onTransitionFns",new Map),aJ(this,"_sessionId"),aJ(this,"firstMessageReceived",!1),aJ(this,"debug"),aJ(this,"logger"),aJ(this,"maxObservedTimestamp"),aJ(this,"connectionStateSubscribers",new Map),aJ(this,"nextConnectionStateSubscriberId",0),aJ(this,"_lastPublishedConnectionState"),aJ(this,"markConnectionStateDirty",()=>{Promise.resolve().then(()=>{let a=this.connectionState();if(JSON.stringify(a)!==JSON.stringify(this._lastPublishedConnectionState))for(let b of(this._lastPublishedConnectionState=a,this.connectionStateSubscribers.values()))b(a)})}),aJ(this,"mark",a=>{var b;this.debug&&(b=this.sessionId,"u">typeof performance&&performance.mark&&performance.mark(a,{detail:{sessionId:b}}))}),"object"==typeof a)throw Error("Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly.");c?.skipConvexDeploymentUrlCheck!==!0&&function(a){if(void 0===a)throw Error("Client created with undefined deployment address. If you used an environment variable, check that it's set.");if("string"!=typeof a)throw Error(`Invalid deployment address: found ${a}".`);if(!(a.startsWith("http:")||a.startsWith("https:")))throw Error(`Invalid deployment address: Must start with "https://" or "http://". Found "${a}".`);try{new URL(a)}catch{throw Error(`Invalid deployment address: "${a}" is not a valid URL. If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`)}if(a.endsWith(".convex.site"))throw Error(`Invalid deployment address: "${a}" ends with .convex.site, which is used for HTTP Actions. Convex deployment URLs typically end with .convex.cloud? If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`)}(a);const e=(c={...c}).authRefreshTokenLeewaySeconds??10;let f=c.webSocketConstructor;if(!f&&"u"<typeof WebSocket)throw Error("No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient");f=f||WebSocket,this.debug=c.reportDebugInfoToConvex??!1,this.address=a,this.logger=!1===c.logger?function(a){return new Q(a)}({verbose:c.verbose??!1}):!0!==c.logger&&c.logger?c.logger:R({verbose:c.verbose??!1});const g=a.search("://");if(-1===g)throw Error("Provided address was not an absolute URL.");const h=a.substring(g+3),i=a.substring(0,g);if("http"===i)d="ws";else if("https"===i)d="wss";else throw Error(`Unknown parent protocol ${i}`);const j=`${d}://${h}/api/${M}/sync`;this.state=new $,this.remoteQuerySet=new as(a=>this.state.queryPath(a),this.logger),this.requestManager=new ab(this.logger,this.markConnectionStateDirty);const k=()=>{this.webSocketManager.pause(),this.state.pause()};this.authenticationManager=new aF(this.state,{authenticate:a=>{let b=this.state.setAuth(a);return this.webSocketManager.sendMessage(b),b.baseVersion},stopSocket:()=>this.webSocketManager.stop(),tryRestartSocket:()=>this.webSocketManager.tryRestart(),pauseSocket:k,resumeSocket:()=>this.webSocketManager.resume(),clearAuth:()=>{this.clearAuth()}},{logger:this.logger,refreshTokenLeewaySeconds:e,initialAuthTokenReuse:c.initialAuthTokenReuse??!1}),this.optimisticQueryResults=new ai,this.addOnTransitionHandler(a=>{b(a.queries.map(a=>a.token))}),this._nextRequestId=0,this._sessionId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{let b=16*Math.random()|0;return("x"===a?b:3&b|8).toString(16)});const{unsavedChangesWarning:l}=c;if("u"<typeof window||void 0===window.addEventListener){if(!0===l)throw Error("unsavedChangesWarning requested, but window.addEventListener not found! Remove {unsavedChangesWarning: true} from Convex client options.")}else!1!==l&&window.addEventListener("beforeunload",a=>{if(this.requestManager.hasIncompleteRequests()){a.preventDefault();let b="Are you sure you want to leave? Your changes may not be saved.";return(a||window.event).returnValue=b,b}});this.webSocketManager=new aA(j,{onOpen:a=>{this.mark("convexWebSocketOpen"),this.webSocketManager.sendMessage({...a,type:"Connect",sessionId:this._sessionId,maxObservedTimestamp:this.maxObservedTimestamp}),this.remoteQuerySet=new as(a=>this.state.queryPath(a),this.logger);let[b,c]=this.state.restart();for(let a of(c&&this.webSocketManager.sendMessage(c),this.webSocketManager.sendMessage(b),this.requestManager.restart()))this.webSocketManager.sendMessage(a)},onResume:()=>{let[a,b]=this.state.resume();for(let c of(b&&this.webSocketManager.sendMessage(b),a&&this.webSocketManager.sendMessage(a),this.requestManager.resume()))this.webSocketManager.sendMessage(c)},onMessage:a=>{switch(!this.firstMessageReceived&&(this.firstMessageReceived=!0,this.mark("convexFirstMessageReceived"),this.reportMarks()),a.type){case"Transition":{this.observedTimestamp(a.endVersion.ts),this.authenticationManager.onTransition(a),this.remoteQuerySet.transition(a),this.state.transition(a);let b=this.requestManager.removeCompleted(this.remoteQuerySet.timestamp());this.notifyOnQueryResultChanges(b);break}case"MutationResponse":{a.success&&this.observedTimestamp(a.ts);let b=this.requestManager.onResponse(a);null!==b&&this.notifyOnQueryResultChanges(new Map([[b.requestId,b.result]]));break}case"ActionResponse":this.requestManager.onResponse(a);break;case"AuthError":this.authenticationManager.onAuthError(a);break;case"FatalError":{var b,c;let d,e=(b=this.logger,c=a.error,d=`[CONVEX FATAL ERROR] ${c}`,b.error(d),Error(d));throw this.webSocketManager.terminate(),e}}return{hasSyncedPastLastReconnect:this.hasSyncedPastLastReconnect()}},onServerDisconnectError:c.onServerDisconnectError},f,this.logger,this.markConnectionStateDirty,this.debug),this.mark("convexClientConstructed"),c.expectAuth&&k()}hasSyncedPastLastReconnect(){return this.requestManager.hasSyncedPastLastReconnect()&&this.state.hasSyncedPastLastReconnect()}observedTimestamp(a){(void 0===this.maxObservedTimestamp||this.maxObservedTimestamp.lessThanOrEqual(a))&&(this.maxObservedTimestamp=a)}getMaxObservedTimestamp(){return this.maxObservedTimestamp}notifyOnQueryResultChanges(a){let b=this.remoteQuerySet.remoteQueryResults(),c=new Map;for(let[a,d]of b){let b=this.state.queryToken(a);if(null!==b){let e={result:d,udfPath:this.state.queryPath(a),args:this.state.queryArgs(a)};c.set(b,e)}}let d=this.optimisticQueryResults.ingestQueryResultsFromServer(c,new Set(a.keys()));this.handleTransition({queries:d.map(a=>{let b=this.optimisticQueryResults.rawQueryResult(a);return{token:a,modification:{kind:"Updated",result:b}}}),reflectedMutations:Array.from(a).map(([a,b])=>({requestId:a,result:b})),timestamp:this.remoteQuerySet.timestamp()})}handleTransition(a){for(let b of this._onTransitionFns.values())b(a)}addOnTransitionHandler(a){let b=this._transitionHandlerCounter++;return this._onTransitionFns.set(b,a),()=>this._onTransitionFns.delete(b)}getCurrentAuthClaims(){let a=this.state.getAuth(),b={};if(a&&"User"===a.tokenType){try{b=a?aC(a.value):{}}catch{b={}}return{token:a.value,decoded:b}}}setAuth(a,b,c){this.authenticationManager.setConfig(a,b,c)}hasAuth(){return this.state.hasAuth()}setAdminAuth(a,b){let c=this.state.setAdminAuth(a,b);this.webSocketManager.sendMessage(c)}clearAuth(){let a=this.state.clearAuth();this.webSocketManager.sendMessage(a)}subscribe(a,b,c){let d=p(b),{modification:e,queryToken:f,unsubscribe:g}=this.state.subscribe(a,d,c?.journal,c?.componentPath);return null!==e&&this.webSocketManager.sendMessage(e),{queryToken:f,unsubscribe:()=>{let a=g();a&&this.webSocketManager.sendMessage(a)}}}localQueryResult(a,b){let c=W(a,p(b));return this.optimisticQueryResults.queryResult(c)}localQueryResultByToken(a){return this.optimisticQueryResults.queryResult(a)}hasLocalQueryResultByToken(a){return this.optimisticQueryResults.hasQueryResult(a)}localQueryLogs(a,b){let c=W(a,p(b));return this.optimisticQueryResults.queryLogs(c)}queryJournal(a,b){let c=W(a,p(b));return this.state.queryJournal(c)}connectionState(){let a=this.webSocketManager.connectionState();return{hasInflightRequests:this.requestManager.hasInflightRequests(),isWebSocketConnected:a.isConnected,hasEverConnected:a.hasEverConnected,connectionCount:a.connectionCount,connectionRetries:a.connectionRetries,timeOfOldestInflightRequest:this.requestManager.timeOfOldestInflightRequest(),inflightMutations:this.requestManager.inflightMutations(),inflightActions:this.requestManager.inflightActions()}}subscribeToConnectionState(a){let b=this.nextConnectionStateSubscriberId++;return this.connectionStateSubscribers.set(b,a),()=>{this.connectionStateSubscribers.delete(b)}}async mutation(a,b,c){let d=await this.mutationInternal(a,b,c);if(!d.success){if(void 0!==d.errorData)throw U(d,new K(T("mutation",a,d)));throw Error(T("mutation",a,d))}return d.value}async mutationInternal(a,b,c,d){let{mutationPromise:e}=this.enqueueMutation(a,b,c,d);return e}enqueueMutation(a,b,c,d){let e=p(b);this.tryReportLongDisconnect();let f=this.nextRequestId;if(this._nextRequestId++,void 0!==c){let a=c.optimisticUpdate;if(void 0!==a){let b=b=>{a(b,e)instanceof Promise&&this.logger.warn("Optimistic update handler returned a Promise. Optimistic updates should be synchronous.")},c=this.optimisticQueryResults.applyOptimisticUpdate(b,f).map(a=>{let b=this.localQueryResultByToken(a);return{token:a,modification:{kind:"Updated",result:void 0===b?void 0:{success:!0,value:b,logLines:[]}}}});this.handleTransition({queries:c,reflectedMutations:[],timestamp:this.remoteQuerySet.timestamp()})}}let g={type:"Mutation",requestId:f,udfPath:a,componentPath:d,args:[G(e)]},h=this.webSocketManager.sendMessage(g);return{requestId:f,mutationPromise:this.requestManager.request(g,h)}}async action(a,b){let c=await this.actionInternal(a,b);if(!c.success){if(void 0!==c.errorData)throw U(c,new K(T("action",a,c)));throw Error(T("action",a,c))}return c.value}async actionInternal(a,b,c){let d=p(b),e=this.nextRequestId;this._nextRequestId++,this.tryReportLongDisconnect();let f={type:"Action",requestId:e,udfPath:a,componentPath:c,args:[G(d)]},g=this.webSocketManager.sendMessage(f);return this.requestManager.request(f,g)}async close(){return this.authenticationManager.stop(),this.webSocketManager.terminate()}get url(){return this.address}get nextRequestId(){return this._nextRequestId}get sessionId(){return this._sessionId}reportMarks(){if(this.debug){let a=function(a){if("u"<typeof performance||!performance.getEntriesByName)return[];let b=[];for(let c of aG){let d=performance.getEntriesByName(c).filter(a=>"mark"===a.entryType).filter(b=>b.detail.sessionId===a);b.push(...d)}return b.map(aH)}(this.sessionId);this.webSocketManager.sendMessage({type:"Event",eventType:"ClientConnect",event:a})}}tryReportLongDisconnect(){if(!this.debug)return;let a=this.connectionState().timeOfOldestInflightRequest;null===a||Date.now()-a.getTime()<=6e4||fetch(`${this.address}/api/debug_event`,{method:"POST",headers:{"Content-Type":"application/json","Convex-Client":`npm-${M}`},body:JSON.stringify({event:"LongWebsocketDisconnect"})}).then(a=>{a.ok||this.logger.warn("Analytics request failed with response:",a.body)}).catch(a=>{this.logger.warn("Analytics response failed with error:",a)})}}function aL(a){if("object"!=typeof a||null===a||!Array.isArray(a.page)||"boolean"!=typeof a.isDone||"string"!=typeof a.continueCursor)throw Error(`Not a valid paginated query result: ${a?.toString()}`);return a}var aM=Object.defineProperty,aN=(a,b,c)=>{let d;return(d="symbol"!=typeof b?b+"":b)in a?aM(a,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[d]=c};class aO{constructor(a,b){this.client=a,this.onTransition=b,aN(this,"paginatedQuerySet",new Map),aN(this,"lastTransitionTs"),this.lastTransitionTs=al.fromNumber(0),this.client.addOnTransitionHandler(a=>this.onBaseTransition(a))}subscribe(a,b,c){let d=V(a),e=X(d,b,c),f=()=>this.removePaginatedQuerySubscriber(e),g=this.paginatedQuerySet.get(e);return g?g.numSubscribers+=1:(this.paginatedQuerySet.set(e,{token:e,canonicalizedUdfPath:d,args:b,numSubscribers:1,options:{initialNumItems:c.initialNumItems},nextPageKey:0,pageKeys:[],pageKeyToQuery:new Map,ongoingSplits:new Map,skip:!1,id:c.id}),this.addPageToPaginatedQuery(e,null,c.initialNumItems)),{paginatedQueryToken:e,unsubscribe:f}}localQueryResult(a,b,c){let d=X(V(a),b,c);return this.localQueryResultByToken(d)}localQueryResultByToken(a){let b,c=this.paginatedQuerySet.get(a);if(!c)return;let d=this.activePageQueryTokens(c);if(0===d.length)return{results:[],status:"LoadingFirstPage",loadMore:b=>this.loadMoreOfPaginatedQuery(a,b)};let e=[],f=!1,g=!1;for(let a of d){let b=this.client.localQueryResultByToken(a);if(void 0===b){f=!0,g=!1;continue}let c=aL(b);e=e.concat(c.page),g=!!c.isDone}return b=f?0===e.length?"LoadingFirstPage":"LoadingMore":g?"Exhausted":"CanLoadMore",{results:e,status:b,loadMore:b=>this.loadMoreOfPaginatedQuery(a,b)}}onBaseTransition(a){let b=a.queries.map(a=>a.token),c=this.queriesContainingTokens(b),d=[];c.length>0&&(this.processPaginatedQuerySplits(c,a=>this.client.localQueryResultByToken(a)),d=c.map(a=>({token:a,modification:{kind:"Updated",result:this.localQueryResultByToken(a)}})));let e={...a,paginatedQueries:d};this.onTransition(e)}loadMoreOfPaginatedQuery(a,b){this.mustGetPaginatedQuery(a);let c=this.queryTokenForLastPageOfPaginatedQuery(a),d=this.client.localQueryResultByToken(c);if(!d)return!1;let e=aL(d);if(e.isDone)return!1;this.addPageToPaginatedQuery(a,e.continueCursor,b);let f={timestamp:this.lastTransitionTs,reflectedMutations:[],queries:[],paginatedQueries:[{token:a,modification:{kind:"Updated",result:this.localQueryResultByToken(a)}}]};return this.onTransition(f),!0}queriesContainingTokens(a){if(0===a.length)return[];let b=[],c=new Set(a);for(let[a,d]of this.paginatedQuerySet)for(let e of this.allQueryTokens(d))if(c.has(e)){b.push(a);break}return b}processPaginatedQuerySplits(a,b){for(let c of a){let a=this.mustGetPaginatedQuery(c),{ongoingSplits:d,pageKeyToQuery:e,pageKeys:f}=a;for(let[c,[f,g]]of d)void 0!==b(e.get(f).queryToken)&&void 0!==b(e.get(g).queryToken)&&this.completePaginatedQuerySplit(a,c,f,g);for(let c of f){if(d.has(c))continue;let f=e.get(c);if(!f)throw Error(`No page query for active pageKey ${c}`);let g=b(f.queryToken);if(!g)continue;let h=aL(g);h.splitCursor&&("SplitRecommended"===h.pageStatus||"SplitRequired"===h.pageStatus||h.page.length>2*a.options.initialNumItems)&&this.splitPaginatedQueryPage(a,c,f.cursor,h.splitCursor,h.continueCursor)}}}splitPaginatedQueryPage(a,b,c,d,e){let f=a.nextPageKey++,g=a.nextPageKey++,h={numItems:a.options.initialNumItems,id:a.id},i=this.client.subscribe(a.canonicalizedUdfPath,{...a.args,paginationOpts:{...h,cursor:c,endCursor:d}});a.pageKeyToQuery.set(f,{...i,cursor:c});let j=this.client.subscribe(a.canonicalizedUdfPath,{...a.args,paginationOpts:{...h,cursor:d,endCursor:e}});a.pageKeyToQuery.set(g,{...j,cursor:d}),a.ongoingSplits.set(b,[f,g])}addPageToPaginatedQuery(a,b,c){let d=this.mustGetPaginatedQuery(a),e=d.nextPageKey++,f={cursor:b,numItems:c,id:d.id},g={...d.args,paginationOpts:f},h=this.client.subscribe(d.canonicalizedUdfPath,g);return d.pageKeys.push(e),d.pageKeyToQuery.set(e,{...h,cursor:b}),h}removePaginatedQuerySubscriber(a){let b=this.paginatedQuerySet.get(a);if(b&&(b.numSubscribers-=1,!(b.numSubscribers>0))){for(let a of b.pageKeyToQuery.values())a.unsubscribe();this.paginatedQuerySet.delete(a)}}completePaginatedQuerySplit(a,b,c,d){let e=a.pageKeyToQuery.get(b);a.pageKeyToQuery.delete(b);let f=a.pageKeys.indexOf(b);a.pageKeys.splice(f,1,c,d),a.ongoingSplits.delete(b),e.unsubscribe()}activePageQueryTokens(a){return a.pageKeys.map(b=>a.pageKeyToQuery.get(b).queryToken)}allQueryTokens(a){return Array.from(a.pageKeyToQuery.values()).map(a=>a.queryToken)}queryTokenForLastPageOfPaginatedQuery(a){let b=this.mustGetPaginatedQuery(a),c=b.pageKeys[b.pageKeys.length-1];if(void 0===c)throw Error(`No pages for paginated query ${a}`);return b.pageKeyToQuery.get(c).queryToken}mustGetPaginatedQuery(a){let b=this.paginatedQuerySet.get(a);if(!b)throw Error("paginated query no longer exists for token "+a);return b}}var aP=Object.defineProperty,aQ=(a,b,c)=>{let d;return(d="symbol"!=typeof b?b+"":b)in a?aP(a,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[d]=c};if(void 0===g)throw Error("Required dependency 'react' not found");class aR{constructor(a,b){if(aQ(this,"address"),aQ(this,"cachedSync"),aQ(this,"cachedPaginatedQueryClient"),aQ(this,"listeners"),aQ(this,"options"),aQ(this,"closed",!1),aQ(this,"_logger"),aQ(this,"adminAuth"),aQ(this,"fakeUserIdentity"),void 0===a)throw Error("No address provided to ConvexReactClient.\nIf trying to deploy to production, make sure to follow all the instructions found at https://docs.convex.dev/production/hosting/\nIf running locally, make sure to run `convex dev` and ensure the .env.local file is populated.");if("string"!=typeof a)throw Error(`ConvexReactClient requires a URL like 'https://happy-otter-123.convex.cloud', received something of type ${typeof a} instead.`);if(!a.includes("://"))throw Error("Provided address was not an absolute URL.");this.address=a,this.listeners=new Map,this._logger=b?.logger===!1?function(a){return new Q(a)}({verbose:b?.verbose??!1}):b?.logger!==!0&&b?.logger?b.logger:R({verbose:b?.verbose??!1}),this.options={...b,logger:this._logger}}get url(){return this.address}get sync(){if(this.closed)throw Error("ConvexReactClient has already been closed.");return this.cachedSync||(this.cachedSync=this.options.baseClient??new aK(this.address,()=>{},this.options),this.adminAuth&&this.cachedSync.setAdminAuth(this.adminAuth,this.fakeUserIdentity),this.cachedPaginatedQueryClient=new aO(this.cachedSync,a=>this.handleTransition(a))),this.cachedSync}get paginatedQueryClient(){if(this.sync,this.cachedPaginatedQueryClient)return this.cachedPaginatedQueryClient;throw Error("Should already be instantiated")}setAuth(a,b,c){if("string"==typeof a)throw Error("Passing a string to ConvexReactClient.setAuth is no longer supported, please upgrade to passing in an async function to handle reauthentication.");this.sync.setAuth(a,b??(()=>{}),c)}clearAuth(){this.sync.clearAuth()}setAdminAuth(a,b){if(this.adminAuth=a,this.fakeUserIdentity=b,this.closed)throw Error("ConvexReactClient has already been closed.");this.cachedSync&&this.sync.setAdminAuth(a,b)}watchQuery(a,...b){let[c,d]=b,e=ae(a);return{onUpdate:a=>{let{queryToken:b,unsubscribe:f}=this.sync.subscribe(e,c,d),g=this.listeners.get(b);return void 0!==g?g.add(a):this.listeners.set(b,new Set([a])),()=>{if(this.closed)return;let c=this.listeners.get(b);c.delete(a),0===c.size&&this.listeners.delete(b),f()}},localQueryResult:()=>{if(this.cachedSync)return this.cachedSync.localQueryResult(e,c)},localQueryLogs:()=>{if(this.cachedSync)return this.cachedSync.localQueryLogs(e,c)},journal:()=>{if(this.cachedSync)return this.cachedSync.queryJournal(e,c)}}}prewarmQuery(a){let b=a.extendSubscriptionFor??5e3;setTimeout(this.watchQuery(a.query,a.args||{}).onUpdate(()=>{}),b)}watchPaginatedQuery(a,b,c){let d=ae(a);return{onUpdate:a=>{let{paginatedQueryToken:e,unsubscribe:f}=this.paginatedQueryClient.subscribe(d,b||{},c),g=this.listeners.get(e);return void 0!==g?g.add(a):this.listeners.set(e,new Set([a])),()=>{if(this.closed)return;let b=this.listeners.get(e);b.delete(a),0===b.size&&this.listeners.delete(e),f()}},localQueryResult:()=>this.paginatedQueryClient.localQueryResult(d,b,c)}}mutation(a,...b){let[c,d]=b,e=ae(a);return this.sync.mutation(e,c,d)}action(a,...b){let c=ae(a);return this.sync.action(c,...b)}query(a,...b){let c=this.watchQuery(a,...b),d=c.localQueryResult();return void 0!==d?Promise.resolve(d):new Promise((a,b)=>{let d=c.onUpdate(()=>{d();try{a(c.localQueryResult())}catch(a){b(a)}})})}connectionState(){return this.sync.connectionState()}subscribeToConnectionState(a){return this.sync.subscribeToConnectionState(a)}get logger(){return this._logger}async close(){if(this.closed=!0,this.listeners=new Map,this.cachedPaginatedQueryClient&&(this.cachedPaginatedQueryClient=void 0),this.cachedSync){let a=this.cachedSync;this.cachedSync=void 0,await a.close()}}handleTransition(a){let b=a.queries.map(a=>a.token),c=a.paginatedQueries.map(a=>a.token);this.transition([...b,...c])}transition(a){for(let b of a){let a=this.listeners.get(b);if(a)for(let b of a)b()}}}let aS=g.createContext(void 0),aT=({client:a,children:b})=>g.createElement(aS.Provider,{value:a},b);Symbol("includePageKeys"),Symbol("page"),(0,g.createContext)(void 0)}};
@@ -33,4 +33,4 @@ exports.id=97,exports.ids=[97],exports.modules={19225:(a,b,c)=>{"use strict";a.e
33
33
  ), 0)::bigint AS bytes
34
34
  FROM tree
35
35
  `,r=new Set(["date","interval","json","jsonb","time","timestamp","timestamptz","timetz"]);function j(a){return null==a?null:"string"==typeof a||"number"==typeof a||"boolean"==typeof a?a:a instanceof Date?a.toISOString():Buffer.isBuffer(a)?`\\x${a.toString("hex")}`:JSON.stringify(a)}function k(a,b){let c=(0,f.v4)(a);return r.has(b)?`${c}::text`:c}async function l(a,b){let c=(0,e.d)(a),d=await c.query(p,[b.table.schema,b.table.name]),i=d.rows.map(a=>a.name);if(0===i.length)throw Error(`Table ${b.table.schema}.${b.table.name} not found`);let l=new Set(i),n=b.filters.filter(a=>(0,g.eK)(a)&&l.has(a.column)),o=(0,f.MC)(n),q=b.search?.trim()??"",r=!1;if(q){let a=d.rows.filter(a=>(0,f.p_)(a.data_type,a.type_category));if(a.length>0){o.params.push(`%${(0,f.q3)(q)}%`);let b=a.map(a=>`${(0,f.v4)(a.name)}::text ILIKE $${o.params.length} ESCAPE '\\'`).join(" OR ");o.sql=o.sql?`${o.sql} AND (${b})`:`WHERE ${b}`,r=!0}}let s=d.rows.filter(a=>a.is_pk).map(a=>a.name),t=b.sort&&l.has(b.sort.column)?b.sort:null,u=t?[`${(0,f.v4)(t.column)} ${"desc"===t.direction?"DESC":"ASC"}`,...s.filter(a=>a!==t.column).map(a=>`${(0,f.v4)(a)} ASC`)]:s.map(a=>`${(0,f.v4)(a)} ASC`),v=u.length?`ORDER BY ${u.join(", ")}`:"",w=(0,f.Z8)(b.table),x=d.rows.map(a=>k(a.name,a.data_type)),y=Math.max(1,Math.min(b.pageSize,500)),z=Math.floor(h.d6/y),A=Math.min(Math.max(0,b.page),z),B=A*y,C=A>=z,[D,E]=await Promise.all([c.query({text:`SELECT ${x.join(", ")} FROM ${w} ${o.sql} ${v} LIMIT ${y+1} OFFSET ${B}`,values:o.params,rowMode:"array"}),m(c,b.table,w,o,r)]),F=D.rows,G=F.length>y,H=G?F.slice(0,y):F;return{columns:i,rows:H.map(a=>a.map(j)),total:E.total,estimated:E.estimated,hasMore:G&&!C,capped:G&&C}}async function m(a,b,c,d,e){var f;if((f=await n(a,b))&&("r"===f.relkind||"p"===f.relkind||"m"===f.relkind)&&f.bytes<=h.Be){let b=await a.query(`SELECT count(*)::bigint AS count FROM ${c} ${d.sql}`,d.params);return{total:Number(b.rows[0]?.count??0),estimated:!1}}if(e)return{total:null,estimated:!0};try{return{total:await o(a,c,d),estimated:!0}}catch{return{total:null,estimated:!0}}}async function n(a,b){let c=(await a.query(q,[b.schema,b.name])).rows[0];return c?.relkind?{relkind:c.relkind,bytes:Number(c.bytes)}:null}async function o(a,b,c){let d=await a.query(`EXPLAIN (FORMAT JSON) SELECT 1 FROM ${b} ${c.sql}`,c.params);return function(a){let b="string"==typeof a?JSON.parse(a):a,c=Array.isArray(b)?b[0]:b;if(!c||"object"!=typeof c)return 0;let d="Plan"in c?c.Plan:null;if(!d||"object"!=typeof d||!("Plan Rows"in d))return 0;let e=Number(d["Plan Rows"]);return Number.isFinite(e)?Math.max(0,Math.round(e)):0}(d.rows[0]?.["QUERY PLAN"])}d()}catch(a){d(a)}})},21446:(a,b,c)=>{"use strict";c.d(b,{eK:()=>e});let d={eq:{label:"Equals",symbol:"=",hasValue:!0,group:"comparison"},neq:{label:"Not equal",symbol:"<>",hasValue:!0,group:"comparison"},gt:{label:"Greater than",symbol:">",hasValue:!0,group:"comparison"},gte:{label:"Greater or equal",symbol:">=",hasValue:!0,group:"comparison"},lt:{label:"Less than",symbol:"<",hasValue:!0,group:"comparison"},lte:{label:"Less or equal",symbol:"<=",hasValue:!0,group:"comparison"},like:{label:"Like",symbol:"~~",hasValue:!0,group:"pattern"},ilike:{label:"iLike",symbol:"~~*",hasValue:!0,group:"pattern"},is_null:{label:"Is null",symbol:"IS NULL",hasValue:!1,group:"null"},is_not_null:{label:"Is not null",symbol:"IS NOT NULL",hasValue:!1,group:"null"}};function e(a){return!!a.column&&(!d[a.operator].hasValue||a.value.length>0)}Object.keys(d).map(a=>({value:a,label:d[a].label,symbol:d[a].symbol,group:d[a].group}))},41834:(a,b,c)=>{"use strict";c.d(b,{$F:()=>g,Be:()=>e,H4:()=>j,d6:()=>f,mb:()=>h,mf:()=>i,nc:()=>d,qX:()=>k});let d=8e3,e=8388608,f=1e4,g=500,h=6e4,i=6e5,j=5e5;function k(a){return!function(a){if("object"!=typeof a||null===a)return!1;if("57014"===("code"in a?a.code:void 0))return!0;let b="message"in a&&"string"==typeof a.message?a.message:"";return/timeout|cancell?ed|cancell?ing/i.test(b)}(a)?a instanceof Error?a.message:"Unknown error":"Query took too long and was cancelled. Add a filter or limit the result set."}},51473:(a,b,c)=>{"use strict";function d(a){return`"${a.replace(/"/g,'""')}"`}function e(a){return`${d(a.schema)}.${d(a.name)}`}c.d(b,{Z:()=>e,v:()=>d})},70613:(a,b,c)=>{"use strict";c.d(b,{Ai:()=>o,EB:()=>n,L1:()=>m,v_:()=>q});var d=c(77598),e=c(51455),f=c(76760),g=c.n(f),h=c(89194);let i=process.env.YTDB_LOG_DIR??g().join(process.cwd(),".ytdb","activity"),j=null,k=Promise.resolve(),l=!1;function m(a){if(["0","off","false"].includes((process.env.YTDB_LOG??"").toLowerCase()))return;let b=`${JSON.stringify({v:h.aH,id:(0,d.randomUUID)(),ts:new Date().toISOString(),...a})}
36
- `;k=k.then(async()=>{var a;j??=(0,e.mkdir)(i,{recursive:!0}).then(()=>void 0),await j,await (0,e.appendFile)((a=new Date,g().join(i,`${a.toISOString().slice(0,10)}.jsonl`)),b,"utf8")}).catch(a=>{j=null,l||(l=!0,console.warn("[activity-log] disabled for this run:",a))})}function n(a){if("string"!=typeof a||0===a.length)return null;try{let b=new URL(a),c=b.username?`${decodeURIComponent(b.username)}@`:"",d=b.port?`:${b.port}`:"";return`${b.protocol}//${c}${b.hostname}${d}${b.pathname}`}catch{return"invalid-url"}}function o(a){return!a||"object"!=typeof a||Array.isArray(a)?p(a):p(Object.fromEntries(Object.entries(a).filter(([a])=>"connectionUrl"!==a)))}function p(a){let b;try{b=JSON.stringify(a)??"null"}catch{return{unserializable:!0}}return b.length<=2e4?a:{truncated:!0,bytes:b.length,preview:b.slice(0,1e3)}}function q(a,b){switch(a){case"tables":return{tables:Array.isArray(b)?b.length:0};case"rows":case"lookup":return{rows:r(b?.rows),columns:r(b?.columns),total:b?.total??null,estimated:b?.estimated??!1,capped:b?.capped??!1};case"query":{let a=Array.isArray(b?.statements)?b.statements:[];return{statements:a.length,commands:a.map(a=>a.command),rows:a.reduce((a,b)=>a+r(b.rows),0),durationMs:b?.durationMs??null}}case"cell.update":return{updated:+!!b?.row};case"rows.insert":return{inserted:+!!b?.row};case"rows.update":return{updated:b?.updated??0};case"rows.delete":return{deleted:b?.deleted??0};case"related":{let a=Array.isArray(b)?b:[];return{lookups:a.length,matched:a.reduce((a,b)=>a+r(b.rows),0)}}case"definition":return{sqlLength:"string"==typeof b?.sql?b.sql.length:0};case"ledger":return{initialized:b?.initialized??!1,entries:r(b?.entries)};case"migrate":return{version:b?.version??null,direction:b?.direction??null,statements:b?.statements??0,durationMs:b?.durationMs??null};case"schema":return{relations:r(b?.relations),enums:r(b?.enums),functions:r(b?.functions),extensions:r(b?.extensions)};default:return}}function r(a){return Array.isArray(a)?a.length:0}},74568:(a,b,c)=>{"use strict";c.d(b,{MC:()=>i,Z8:()=>d.Z,p_:()=>g,q3:()=>e,v4:()=>d.v});var d=c(51473);function e(a){return a.replace(/[\\%_]/g,"\\$&")}let f=new Set(["text","varchar","bpchar","citext","name","uuid"]);function g(a,b){return"S"===b||f.has(a)}let h={eq:"=",neq:"<>",gt:">",gte:">=",lt:"<",lte:"<="};function i(a){let b=[],c=a.map(a=>{let c=(0,d.v)(a.column);switch(a.operator){case"is_null":return`${c} IS NULL`;case"is_not_null":return`${c} IS NOT NULL`;case"like":case"ilike":return b.push(a.value),`${c}::text ${a.operator.toUpperCase()} $${b.length}`;case"eq":case"neq":case"gt":case"gte":case"lt":case"lte":return b.push(a.value),`${c} ${h[a.operator]} $${b.length}`;default:return a.operator}});return{sql:c.length?`WHERE ${c.join(" AND ")}`:"",params:b}}},78335:()=>{},82428:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{d:()=>h});var e=c(64939),f=c(41834),g=a([e]);e=(g.then?(await g)():g)[0];let i=new Map,j={explorer:f.nc,migration:f.mf};function h(a,b="explorer"){let c=`${b}:${a}`,d=i.get(c);if(!d){let f=j[b];(d=new e.Pool({connectionString:a,max:"migration"===b?2:4,idleTimeoutMillis:3e4,application_name:"ytdb",statement_timeout:f,query_timeout:f,ssl:!function(a){try{let{hostname:b,searchParams:c}=new URL(a);if(c.has("sslmode"))return"disable"!==c.get("sslmode");return!["localhost","127.0.0.1","::1"].includes(b)}catch{return!1}}(a)?void 0:{rejectUnauthorized:!1}})).on("error",()=>i.delete(c)),i.set(c,d)}return d}d()}catch(a){d(a)}})},84152:(a,b,c)=>{"use strict";c.d(b,{VW:()=>g,fx:()=>f,ms:()=>h});var d=c(41834),e=c(70613);function f(a,b){return async c=>{let f;if("1"===process.env.VERCEL)return Response.json({error:"Database API is local-only"},{status:404});let g=performance.now();try{f=await c.json()}catch{return(0,e.L1)({source:"api",action:a,connection:null,status:"error",durationMs:Math.round(performance.now()-g),error:"Invalid JSON body"}),Response.json({error:"Invalid JSON body"},{status:400})}let h=(0,e.EB)(f?.connectionUrl),i=(0,e.Ai)(f);try{let c=await b(f);return(0,e.L1)({source:"api",action:a,connection:h,status:"ok",durationMs:Math.round(performance.now()-g),params:i,result:(0,e.v_)(a,c)}),Response.json(c)}catch(c){let b=(0,d.qX)(c);return(0,e.L1)({source:"api",action:a,connection:h,status:"error",durationMs:Math.round(performance.now()-g),params:i,error:b}),Response.json({error:b},{status:500})}}}function g(a,b){if("string"!=typeof a||0===a.length)throw Error(`Missing ${b}`);return a}function h(a,b="table"){if(!a||"object"!=typeof a)throw Error(`Missing ${b}`);return{schema:g(a.schema,`${b}.schema`),name:g(a.name,`${b}.name`)}}},89194:(a,b,c)=>{"use strict";c.d(b,{P7:()=>f,aH:()=>d});let d=1,e=["connection.add","connection.update","connection.remove","config.export","config.import","migrations.import","migrations.remove"];function f(a){return"string"==typeof a&&e.includes(a)}},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},96487:()=>{}};
36
+ `;k=k.then(async()=>{var a;j??=(0,e.mkdir)(i,{recursive:!0}).then(()=>void 0),await j,await (0,e.appendFile)((a=new Date,g().join(i,`${a.toISOString().slice(0,10)}.jsonl`)),b,"utf8")}).catch(a=>{j=null,l||(l=!0,console.warn("[activity-log] disabled for this run:",a))})}function n(a){if("string"!=typeof a||0===a.length)return null;try{let b=new URL(a),c=b.username?`${decodeURIComponent(b.username)}@`:"",d=b.port?`:${b.port}`:"";return`${b.protocol}//${c}${b.hostname}${d}${b.pathname}`}catch{return"invalid-url"}}function o(a){return!a||"object"!=typeof a||Array.isArray(a)?p(a):p(Object.fromEntries(Object.entries(a).filter(([a])=>"connectionUrl"!==a)))}function p(a){let b;try{b=JSON.stringify(a)??"null"}catch{return{unserializable:!0}}return b.length<=2e4?a:{truncated:!0,bytes:b.length,preview:b.slice(0,1e3)}}function q(a,b){switch(a){case"tables":return{tables:Array.isArray(b)?b.length:0};case"rows":case"lookup":return{rows:r(b?.rows),columns:r(b?.columns),total:b?.total??null,estimated:b?.estimated??!1,capped:b?.capped??!1};case"query":{let a=Array.isArray(b?.statements)?b.statements:[];return{statements:a.length,commands:a.map(a=>a.command),rows:a.reduce((a,b)=>a+r(b.rows),0),durationMs:b?.durationMs??null}}case"cell.update":return{updated:+!!b?.row};case"rows.insert":return{inserted:+!!b?.row};case"rows.update":return{updated:b?.updated??0};case"rows.delete":return{deleted:b?.deleted??0};case"related":{let a=Array.isArray(b)?b:[];return{lookups:a.length,matched:a.reduce((a,b)=>a+r(b.rows),0)}}case"definition":return{sqlLength:"string"==typeof b?.sql?b.sql.length:0};case"ledger":return{initialized:b?.initialized??!1,entries:r(b?.entries)};case"migrate":return{version:b?.version??null,direction:b?.direction??null,statements:b?.statements??0,durationMs:b?.durationMs??null};case"adopt":return{recorded:b?.recorded??0,existing:b?.existing??0};case"repo":return{sets:r(b?.sets),migrations:Array.isArray(b?.sets)?b.sets.reduce((a,b)=>a+r(b.steps),0):0,branch:b?.git?.branch??null};case"schema":return{relations:r(b?.relations),enums:r(b?.enums),functions:r(b?.functions),extensions:r(b?.extensions)};default:return}}function r(a){return Array.isArray(a)?a.length:0}},74568:(a,b,c)=>{"use strict";c.d(b,{MC:()=>i,Z8:()=>d.Z,p_:()=>g,q3:()=>e,v4:()=>d.v});var d=c(51473);function e(a){return a.replace(/[\\%_]/g,"\\$&")}let f=new Set(["text","varchar","bpchar","citext","name","uuid"]);function g(a,b){return"S"===b||f.has(a)}let h={eq:"=",neq:"<>",gt:">",gte:">=",lt:"<",lte:"<="};function i(a){let b=[],c=a.map(a=>{let c=(0,d.v)(a.column);switch(a.operator){case"is_null":return`${c} IS NULL`;case"is_not_null":return`${c} IS NOT NULL`;case"like":case"ilike":return b.push(a.value),`${c}::text ${a.operator.toUpperCase()} $${b.length}`;case"eq":case"neq":case"gt":case"gte":case"lt":case"lte":return b.push(a.value),`${c} ${h[a.operator]} $${b.length}`;default:return a.operator}});return{sql:c.length?`WHERE ${c.join(" AND ")}`:"",params:b}}},78335:()=>{},82428:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{d:()=>h});var e=c(64939),f=c(41834),g=a([e]);e=(g.then?(await g)():g)[0];let i=new Map,j={explorer:f.nc,migration:f.mf};function h(a,b="explorer"){let c=`${b}:${a}`,d=i.get(c);if(!d){let f=j[b];(d=new e.Pool({connectionString:a,max:"migration"===b?2:4,idleTimeoutMillis:3e4,application_name:"ytdb",statement_timeout:f,query_timeout:f,ssl:!function(a){try{let{hostname:b,searchParams:c}=new URL(a);if(c.has("sslmode"))return"disable"!==c.get("sslmode");return!["localhost","127.0.0.1","::1"].includes(b)}catch{return!1}}(a)?void 0:{rejectUnauthorized:!1}})).on("error",()=>i.delete(c)),i.set(c,d)}return d}d()}catch(a){d(a)}})},84152:(a,b,c)=>{"use strict";c.d(b,{VW:()=>g,fx:()=>f,ms:()=>h});var d=c(41834),e=c(70613);function f(a,b){return async c=>{let f;if("1"===process.env.VERCEL)return Response.json({error:"Database API is local-only"},{status:404});let g=performance.now();try{f=await c.json()}catch{return(0,e.L1)({source:"api",action:a,connection:null,status:"error",durationMs:Math.round(performance.now()-g),error:"Invalid JSON body"}),Response.json({error:"Invalid JSON body"},{status:400})}let h=(0,e.EB)(f?.connectionUrl),i=(0,e.Ai)(f);try{let c=await b(f);return(0,e.L1)({source:"api",action:a,connection:h,status:"ok",durationMs:Math.round(performance.now()-g),params:i,result:(0,e.v_)(a,c)}),Response.json(c)}catch(c){let b=(0,d.qX)(c);return(0,e.L1)({source:"api",action:a,connection:h,status:"error",durationMs:Math.round(performance.now()-g),params:i,error:b}),Response.json({error:b},{status:500})}}}function g(a,b){if("string"!=typeof a||0===a.length)throw Error(`Missing ${b}`);return a}function h(a,b="table"){if(!a||"object"!=typeof a)throw Error(`Missing ${b}`);return{schema:g(a.schema,`${b}.schema`),name:g(a.name,`${b}.name`)}}},89194:(a,b,c)=>{"use strict";c.d(b,{P7:()=>f,aH:()=>d});let d=1,e=["connection.add","connection.update","connection.remove","config.export","config.import","migrations.import","migrations.remove","migrations.folder"];function f(a){return"string"==typeof a&&e.includes(a)}},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},96487:()=>{}};
@@ -1 +1 @@
1
- globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/_G44c2d2nyq6S1KEvNgOB/_buildManifest.js","static/_G44c2d2nyq6S1KEvNgOB/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-34eb118f56295776.js","static/chunks/4bd1b696-8a4ab4fdf0ae305a.js","static/chunks/3794-d7cddff008311ab3.js","static/chunks/main-app-f73ec34e89cb8fdd.js"],rootMainFilesTree:{},pages:{"/_app":[]}};
1
+ globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/KSnyCCtuopUbqXHmuoiqW/_buildManifest.js","static/KSnyCCtuopUbqXHmuoiqW/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-34eb118f56295776.js","static/chunks/4bd1b696-8a4ab4fdf0ae305a.js","static/chunks/3794-d7cddff008311ab3.js","static/chunks/main-app-f73ec34e89cb8fdd.js"],rootMainFilesTree:{},pages:{"/_app":[]}};
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en" class="__variable_246ccd __variable_c29908 dark h-full" data-theme="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/22a5144ee8d83bca-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/7d4881bb7e1bf84d-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/e02ab5db9ff2dca2.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/7bb8868c12384025.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-34eb118f56295776.js"/><script src="/_next/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js" async=""></script><script src="/_next/static/chunks/3794-d7cddff008311ab3.js" async=""></script><script src="/_next/static/chunks/main-app-f73ec34e89cb8fdd.js" async=""></script><script src="/_next/static/chunks/6039-02dbcff4d4ccf559.js" async=""></script><script src="/_next/static/chunks/app/layout-dd332a9583f47cd6.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>YTDB</title><meta name="description" content="A database management UI"/><link rel="icon" href="/favicon.ico?603d046c9a6fdfbb" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/icon.svg?38bdd49dcdf01715" type="image/svg+xml" sizes="any"/><script>(function(){try{var allowed=["dark","light","one-dark-pro","nord","dracula","tokyo-night"];var light=["light"];var id="dark";var raw=localStorage.getItem("ytdb:theme")||localStorage.getItem("db-studio:theme");if(raw){var parsed=JSON.parse(raw);var value=parsed&&parsed.state&&parsed.state.theme;if(typeof value==="string"&&allowed.indexOf(value)!==-1)id=value;}var root=document.documentElement;root.setAttribute("data-theme",id);root.classList.toggle("dark",light.indexOf(id)===-1);}catch(e){}})();</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="flex min-h-full flex-col"><div hidden=""><!--$--><!--/$--></div><main class="grid min-h-dvh place-items-center bg-background px-6 text-foreground"><div class="max-w-lg space-y-4"><p class="font-mono text-xs tracking-[0.22em] text-muted-foreground">YTDB</p><h1 class="text-2xl font-semibold tracking-tight">Connecting to YTDB…</h1></div></main><script src="/_next/static/chunks/webpack-34eb118f56295776.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[72737,[\"6039\",\"static/chunks/6039-02dbcff4d4ccf559.js\",\"7177\",\"static/chunks/app/layout-dd332a9583f47cd6.js\"],\"ThemeProvider\"]\n3:I[94821,[\"6039\",\"static/chunks/6039-02dbcff4d4ccf559.js\",\"7177\",\"static/chunks/app/layout-dd332a9583f47cd6.js\"],\"ConvexClientProvider\"]\n4:I[87758,[\"6039\",\"static/chunks/6039-02dbcff4d4ccf559.js\",\"7177\",\"static/chunks/app/layout-dd332a9583f47cd6.js\"],\"LocalBridgeGate\"]\n5:I[57121,[],\"\"]\n6:I[74581,[],\"\"]\n7:I[90484,[],\"OutletBoundary\"]\n8:\"$Sreact.suspense\"\nb:I[90484,[],\"ViewportBoundary\"]\nd:I[90484,[],\"MetadataBoundary\"]\nf:I[27123,[],\"default\",1]\n:HL[\"/_next/static/media/22a5144ee8d83bca-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/7d4881bb7e1bf84d-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/e02ab5db9ff2dca2.css\",\"style\"]\n:HL[\"/_next/static/css/7bb8868c12384025.css\",\"style\"]\na:X\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/e02ab5db9ff2dca2.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/7bb8868c12384025.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_246ccd __variable_c29908 dark h-full\",\"data-theme\":\"dark\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var allowed=[\\\"dark\\\",\\\"light\\\",\\\"one-dark-pro\\\",\\\"nord\\\",\\\"dracula\\\",\\\"tokyo-night\\\"];var light=[\\\"light\\\"];var id=\\\"dark\\\";var raw=localStorage.getItem(\\\"ytdb:theme\\\")||localStorage.getItem(\\\"db-studio:theme\\\");if(raw){var parsed=JSON.parse(raw);var value=parsed\u0026\u0026parsed.state\u0026\u0026parsed.state.theme;if(typeof value===\\\"string\\\"\u0026\u0026allowed.indexOf(value)!==-1)id=value;}var root=document.documentElement;root.setAttribute(\\\"data-theme\\\",id);root.classList.toggle(\\\"dark\\\",light.indexOf(id)===-1);}catch(e){}})();\"}}]}],[\"$\",\"body\",null,{\"className\":\"flex min-h-full flex-col\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L7\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],{},null,false,null]},null,false,\"$a\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Le\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$f\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"_G44c2d2nyq6S1KEvNgOB\"}\n"])</script><script>self.__next_f.push([1,"a:C\nc:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"10:I[86869,[],\"IconMark\"]\n9:null\ne:[[\"$\",\"title\",\"0\",{\"children\":\"YTDB\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"A database management UI\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?603d046c9a6fdfbb\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/icon.svg?38bdd49dcdf01715\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"$L10\",\"4\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en" class="__variable_246ccd __variable_c29908 dark h-full" data-theme="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/22a5144ee8d83bca-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/7d4881bb7e1bf84d-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/e02ab5db9ff2dca2.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/962dd5ab002fed8a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-34eb118f56295776.js"/><script src="/_next/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js" async=""></script><script src="/_next/static/chunks/3794-d7cddff008311ab3.js" async=""></script><script src="/_next/static/chunks/main-app-f73ec34e89cb8fdd.js" async=""></script><script src="/_next/static/chunks/223-a4fca67d979d899d.js" async=""></script><script src="/_next/static/chunks/app/layout-e3fdecae5544dc60.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>YTDB</title><meta name="description" content="A database management UI"/><link rel="icon" href="/favicon.ico?603d046c9a6fdfbb" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/icon.svg?38bdd49dcdf01715" type="image/svg+xml" sizes="any"/><script>(function(){try{var allowed=["dark","light","one-dark-pro","nord","dracula","tokyo-night"];var light=["light"];var id="dark";var raw=localStorage.getItem("ytdb:theme")||localStorage.getItem("db-studio:theme");if(raw){var parsed=JSON.parse(raw);var value=parsed&&parsed.state&&parsed.state.theme;if(typeof value==="string"&&allowed.indexOf(value)!==-1)id=value;}var root=document.documentElement;root.setAttribute("data-theme",id);root.classList.toggle("dark",light.indexOf(id)===-1);}catch(e){}})();</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="flex min-h-full flex-col"><div hidden=""><!--$--><!--/$--></div><main class="grid min-h-dvh place-items-center bg-background px-6 text-foreground"><div class="max-w-lg space-y-4"><p class="font-mono text-xs tracking-[0.22em] text-muted-foreground">YTDB</p><h1 class="text-2xl font-semibold tracking-tight">Connecting to YTDB…</h1></div></main><script src="/_next/static/chunks/webpack-34eb118f56295776.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[72737,[\"223\",\"static/chunks/223-a4fca67d979d899d.js\",\"7177\",\"static/chunks/app/layout-e3fdecae5544dc60.js\"],\"ThemeProvider\"]\n3:I[94821,[\"223\",\"static/chunks/223-a4fca67d979d899d.js\",\"7177\",\"static/chunks/app/layout-e3fdecae5544dc60.js\"],\"ConvexClientProvider\"]\n4:I[48491,[\"223\",\"static/chunks/223-a4fca67d979d899d.js\",\"7177\",\"static/chunks/app/layout-e3fdecae5544dc60.js\"],\"NavigationTracker\"]\n5:I[65377,[\"223\",\"static/chunks/223-a4fca67d979d899d.js\",\"7177\",\"static/chunks/app/layout-e3fdecae5544dc60.js\"],\"LocalBridgeGate\"]\n6:I[57121,[],\"\"]\n7:I[74581,[],\"\"]\n8:I[90484,[],\"OutletBoundary\"]\n9:\"$Sreact.suspense\"\nc:I[90484,[],\"ViewportBoundary\"]\ne:I[90484,[],\"MetadataBoundary\"]\n10:I[27123,[],\"default\",1]\n:HL[\"/_next/static/media/22a5144ee8d83bca-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/7d4881bb7e1bf84d-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/e02ab5db9ff2dca2.css\",\"style\"]\n:HL[\"/_next/static/css/962dd5ab002fed8a.css\",\"style\"]\nb:X\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/e02ab5db9ff2dca2.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/962dd5ab002fed8a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_246ccd __variable_c29908 dark h-full\",\"data-theme\":\"dark\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var allowed=[\\\"dark\\\",\\\"light\\\",\\\"one-dark-pro\\\",\\\"nord\\\",\\\"dracula\\\",\\\"tokyo-night\\\"];var light=[\\\"light\\\"];var id=\\\"dark\\\";var raw=localStorage.getItem(\\\"ytdb:theme\\\")||localStorage.getItem(\\\"db-studio:theme\\\");if(raw){var parsed=JSON.parse(raw);var value=parsed\u0026\u0026parsed.state\u0026\u0026parsed.state.theme;if(typeof value===\\\"string\\\"\u0026\u0026allowed.indexOf(value)!==-1)id=value;}var root=document.documentElement;root.setAttribute(\\\"data-theme\\\",id);root.classList.toggle(\\\"dark\\\",light.indexOf(id)===-1);}catch(e){}})();\"}}]}],[\"$\",\"body\",null,{\"className\":\"flex min-h-full flex-col\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"children\":[[\"$\",\"$L4\",null,{}],[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@a\"}]}]]}],{},null,false,null]},null,false,\"$b\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$Lc\",null,{\"children\":\"$Ld\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Le\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lf\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"KSnyCCtuopUbqXHmuoiqW\"}\n"])</script><script>self.__next_f.push([1,"b:C\nd:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"11:I[86869,[],\"IconMark\"]\na:null\nf:[[\"$\",\"title\",\"0\",{\"children\":\"YTDB\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"A database management UI\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?603d046c9a6fdfbb\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/icon.svg?38bdd49dcdf01715\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"$L11\",\"4\",{}]]\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-34eb118f56295776.js"/><script src="/_next/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js" async=""></script><script src="/_next/static/chunks/3794-d7cddff008311ab3.js" async=""></script><script src="/_next/static/chunks/main-app-f73ec34e89cb8fdd.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-34eb118f56295776.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[90484,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[90484,[],\"ViewportBoundary\"]\na:I[90484,[],\"MetadataBoundary\"]\nc:I[27123,[],\"default\",1]\n7:X\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4624]},\"$undefined\",\"$undefined\",4624]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$7\"]},null,false,\"$7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"_G44c2d2nyq6S1KEvNgOB\"}\n"])</script><script>self.__next_f.push([1,"7:C\n9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
1
+ <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-34eb118f56295776.js"/><script src="/_next/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js" async=""></script><script src="/_next/static/chunks/3794-d7cddff008311ab3.js" async=""></script><script src="/_next/static/chunks/main-app-f73ec34e89cb8fdd.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-34eb118f56295776.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[90484,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[90484,[],\"ViewportBoundary\"]\na:I[90484,[],\"MetadataBoundary\"]\nc:I[27123,[],\"default\",1]\n7:X\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4624]},\"$undefined\",\"$undefined\",4624]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$7\"]},null,false,\"$7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"KSnyCCtuopUbqXHmuoiqW\"}\n"])</script><script>self.__next_f.push([1,"7:C\n9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
@@ -0,0 +1 @@
1
+ self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:22,errorRate:1e-4,numBits:422,numHashes:14,bitArray:[0,0,1,1,1,0,0,1,0,1,1,0,1,0,1,0,1,1,1,1,0,0,1,1,0,0,0,1,1,0,0,1,0,0,1,0,1,1,1,0,0,0,0,0,0,1,0,0,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,0,1,0,0,0,1,1,1,0,0,0,1,1,1,1,0,0,1,0,0,0,1,0,1,0,0,0,0,1,0,0,1,0,1,1,0,0,0,1,1,1,1,0,1,0,1,1,0,0,0,1,1,1,1,0,1,0,1,0,1,0,1,1,0,0,0,0,0,1,1,1,0,0,1,0,0,0,0,1,0,1,1,0,1,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,0,1,0,1,0,1,1,1,1,0,1,1,1,0,1,1,1,0,0,0,1,1,0,0,0,0,1,1,1,1,0,1,0,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,1,0,1,1,1,1,0,0,0,1,1,0,1,1,1,0,1,1,0,1,0,0,0,0,1,1,1,1,0,1,1,0,0,1,0,1,0,1,1,1,0,1,1,0,1,1,1,1,1,1,0,0,0,1,1,0,1,0,0,1,0,0,0,1,1,1,0,0,1,0,1,1,1,0,1,0,0,0,0,1,1,0,1,1,0,1,0,1,1,1,0,1,0,0,1,0,1,0,1,1,1,0,0,0,1,0,0,1,1,1,0,1,0,1,1,0,0,1,0,0,0,0,1,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,1,0,0,0,1,0,1,0,0,1,0,0,1,1,1,0,1,1,0,0,0,1,1,0,0,1,1,1,1,0,0,0,1,1,1,0,0,0,0,1,1,0,1,0,0,0,0,1,0,0,0,1,1,0,1,1,0,0,0,1,0,1]},__routerFilterDynamic:{numItems:6,errorRate:1e-4,numBits:116,numHashes:14,bitArray:[0,1,1,1,1,1,0,1,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,1,0,1,0,1,0,0,1,1,1,0,1,1,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,1,1,1,0,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,0,1,0,1,1,0,0,1,1,1,0,0,0,0,1,0,1,0,1,0,1,1,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,1,1,1,1,1,1,0]},sortedPages:["/_app"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1656],{2385:(e,t,n)=>{n.d(t,{K:()=>d});var r=n(12115),l=n(30271),o=n(34934),i=n(65440),a=n(39096),u=n(27540),s=n(95155);let d=r.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,d=(0,i.Ee)(),c=(0,l.P)(d,u.T.mounted),p=(0,l.P)(d,u.T.forceMounted);return c||n||p?(0,s.jsx)(a.P.Provider,{value:n,children:(0,s.jsx)(o.XF,{ref:t,...r})}):null})},6276:(e,t,n)=>{function r(e){return null==e?void 0:`${e}-popup`}function l(e,t){return(n,r)=>null!=n&&e.contains(n,r,t)}n.d(t,{I2:()=>l,xj:()=>r})},13003:(e,t,n)=>{n.d(t,{p:()=>c});var r=n(12115),l=n(55218),o=n(46468),i=n(27091),a=n(7049),u=n(76175),s=n(65440),d=n(95155);let c=r.forwardRef(function(e,t){let n=(0,s.Ee)(),{buttonRef:r,getButtonProps:c}=(0,i.s)({native:!1}),p=(0,l.a)(t,r),f=c({onClick:function(e){n.state.setOpen(!1,(0,a.d)(u.SR,e.nativeEvent,e.currentTarget))}});return(0,d.jsx)("span",{ref:p,...f,"aria-label":"Dismiss",tabIndex:void 0,style:o.a})})},19001:(e,t,n)=>{n.d(t,{o:()=>x});var r=n(12115),l=n(30271),o=n(66652),i=n(23068),a=n(96354),u=n(65440),s=n(44512),d=n(90491),c=n(53536),p=n(39096),f=n(69679),v=n(27540),g=n(53976),m=n(62424),h=n(15702),P=n(95155);let x=r.forwardRef(function(e,t){let{render:n,className:r,anchor:x,positionMethod:O,side:R,align:T,sideOffset:y,alignOffset:I,collisionBoundary:b="clipping-ancestors",collisionPadding:E,arrowPadding:C,sticky:S,disableAnchorTracking:w=!1,collisionAvoidance:M=f.uD,style:A,...j}=e,k=(0,u.Ee)(),V=(0,u.ui)(),Q=(0,p.s)(),D=(0,l.P)(k,v.T.modal),q=(0,l.P)(k,v.T.open),F=(0,l.P)(k,v.T.mounted),W=(0,l.P)(k,v.T.openMethod),$=(0,l.P)(k,v.T.positionerElement),H=(0,l.P)(k,v.T.triggerElement),K=(0,l.P)(k,v.T.inputElement),L=(0,l.P)(k,v.T.inputGroupElement),X=(0,l.P)(k,v.T.inputInsidePopup),N=(0,l.P)(k,v.T.transitionStatus),B=(0,d.$B)(),G=(0,c.s)({anchor:x??(X?H:L??K),floatingRootContext:V,positionMethod:O,mounted:F,side:R,sideOffset:y,align:T,alignOffset:I,arrowPadding:C,collisionBoundary:b,collisionPadding:E,sticky:S,disableAnchorTracking:w,keepMounted:Q,collisionAvoidance:M,lazyFlip:!0});(0,h.G)(q&&D,"touch"===W,$,H);let Z={open:q,side:G.side,align:G.align,anchorHidden:G.anchorHidden,empty:B};(0,o.g)(()=>{k.set("popupSide",G.side)},[k,G.side]);let _=(0,i.K)(e=>{k.set("positionerElement",e)}),Y=(0,m.i)(e,Z,{styles:G.positionerStyles,transitionStatus:N,props:j,refs:[t,_],hidden:!F,inert:!q});return(0,P.jsxs)(s.Z.Provider,{value:G,children:[F&&D&&(0,P.jsx)(g.W,{inert:(0,a.Y)(!q),cutout:L??K??H}),Y]})})},25460:(e,t,n)=>{n.d(t,{Pq:()=>s});var r=n(2320),l=n(32638);let o=(0,l.pn)({String:l._A.string,Number:l._A.number,"True False":l._A.bool,PropertyName:l._A.propertyName,Null:l._A.null,", :":l._A.separator,"[ ]":l._A.squareBracket,"{ }":l._A.brace}),i=r.U1.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[o],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});var a=n(46732);let u=a.bj.define({name:"json",parser:i.configure({props:[a.Oh.add({Object:(0,a.mz)({except:/^\s*\}/}),Array:(0,a.mz)({except:/^\s*\]/})}),a.b_.add({"Object Array":a.yd})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function s(){return new a.Yy(u)}},27540:(e,t,n)=>{n.d(t,{T:()=>o});var r=n(70035),l=n(15483);let o={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:n}=e;return null!=t&&(!("multiple"===n&&Array.isArray(t))||t.length>0)},hasNullItemLabel:(e,t)=>!!t&&(0,l.Dp)(e.items),open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,l=e.selectedValue;return Array.isArray(l)?l.some(e=>(0,r.tl)(t,e,n)):(0,r.tl)(t,l,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemProps:e=>e.itemProps,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight}},29432:(e,t,n)=>{n.d(t,{e:()=>m});var r=n(12115),l=n(30271),o=n(23068),i=n(69938),a=n(65440),u=n(44512),s=n(27540),d=n(95155);let c=r.createContext(null);function p(e){let{children:t}=e,{filteredItems:n}=(0,a.Dc)(),l=r.useContext(c),o=l?l.items:n;return(0,d.jsx)(r.Fragment,{children:o.map(t)})}var f=n(67894),v=n(17947),g=n(90491);let m=r.forwardRef(function(e,t){var n;let{render:c,className:m,style:h,children:P,...x}=e,O=(0,a.Ee)(),R=(0,a.ui)(),T=!!(0,u.O)(!0),{filteredItems:y,hasItems:I}=(0,a.Dc)(),b=(0,l.P)(O,s.T.selectionMode),E=(0,l.P)(O,s.T.grid),C=(0,l.P)(O,s.T.listProps),S=(0,l.P)(O,s.T.virtualized),w=(0,l.P)(O,s.T.forceMounted),M=0===y.length,A=(0,o.K)(e=>{O.set("positionerElement",e)}),j=(0,o.K)(e=>{O.set("listElement",e)}),k=r.useMemo(()=>"function"==typeof P?n||(n=(0,d.jsx)(p,{children:P})):P,[P]),V=R.useState("floatingId"),Q=(0,i.o)("div",e,{state:{empty:M},ref:[t,j,T?null:A],props:[C,{children:k,tabIndex:-1,id:V,role:E?"grid":"listbox","aria-multiselectable":"multiple"===b?"true":void 0,onKeyDown(e){if(!O.state.disabled&&!O.state.readOnly&&"Enter"===e.key){let t=O.state.activeIndex;null!=t&&((0,v.jo)(e),(0,g.L6)(O,t,e.nativeEvent))}},onKeyDownCapture(){O.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){O.state.keyboardActiveRef.current=!1}},x]});if(S)return Q;let D=I&&!w?void 0:O.state.labelsRef;return(0,d.jsx)(f.u,{elementsRef:O.state.listRef,labelsRef:D,children:Q})})},34304:(e,t,n)=>{n.d(t,{W:()=>R});var r=n(25803),l=n(12115),o=n(45594),i=n(27091),a=n(84052),u=n(69938),s=n(69679),d=n(66610),c=n(7118),p=n(9569),f=n(62955),v=n(6522),g=n(76175),m=n(95327),h=n(26713),P=n(11974),x=n(22713),O=n(95155);let R=l.forwardRef(function(e,t){let{render:n,className:R,style:T,disabled:y=!1,nativeButton:I=!0,handle:b,payload:E,openOnHover:C=!1,delay:S=300,closeDelay:w=0,id:M,...A}=e,j=(0,o.s)(!0),k=(0,m.f)(b)??j;if(!k)throw Error((0,r.A)(74));let V=(0,f.e)(M),Q=k.useState("isTriggerActive",V),D=k.useState("floatingRootContext"),q=k.useState("isOpenedByTrigger",V),F=k.useState("triggerPopupId",V),W=l.useRef(null),{registerTrigger:$,isMountedByThisTrigger:H}=(0,h.L_)(V,W,k,{payload:E,disabled:y,openOnHover:C,closeDelay:w}),K=k.useState("openChangeReason"),L=k.useState("stickIfOpen"),X=k.useState("openMethod"),N=k.useState("focusManagerModal"),B=(0,d.j)(D,{enabled:!y&&C&&("touch"!==X||K!==g.Ui),mouseOnly:!0,move:!1,handleClose:(0,c.i)(),restMs:S,delay:{close:w},triggerElementRef:W,isActiveTrigger:Q,isClosing:()=>"ending"===k.select("transitionStatus")}),G=(0,p.k)(D,{stickIfOpen:L}),Z=(0,x.L)(()=>k.select("open"),e=>{k.set("openMethod",e)}),_=k.useState("triggerProps",H),{getButtonProps:Y,buttonRef:z}=(0,i.s)({disabled:y,native:I}),{preFocusGuardRef:U,handlePreFocusGuardFocus:J,handleFocusTargetFocus:ee}=(0,P.a)(k,W),et=(0,u.o)("button",e,{state:{disabled:y,open:q},ref:[z,t,$,W],props:[G.reference,B,_,Z,{[s.Kd]:"",id:V,"aria-haspopup":"dialog","aria-expanded":q,"aria-controls":F},A,Y],stateAttributesMapping:{open:e=>e&&K===g.Ui?a.jL.open(e):a.qV.open(e)}}),en=(0,O.jsx)(l.Fragment,{children:et},V);return H&&!N?(0,O.jsxs)(l.Fragment,{children:[(0,O.jsx)(v.U,{ref:U,onFocus:J}),en,(0,O.jsx)(v.U,{ref:k.context.triggerFocusTargetRef,onFocus:ee})]}):en})},34574:(e,t,n)=>{n.d(t,{A:()=>i,n:()=>o});var r=n(25803),l=n(12115);let o=l.createContext(void 0);function i(){let e=l.useContext(o);if(void 0===e)throw Error((0,r.A)(45));return e}},34738:(e,t,n)=>{n.d(t,{b:()=>i,s:()=>o});var r=n(25803),l=n(12115);let o=l.createContext(void 0);function i(){let e=l.useContext(o);if(!e)throw Error((0,r.A)(19));return e}},39096:(e,t,n)=>{n.d(t,{P:()=>o,s:()=>i});var r=n(25803),l=n(12115);let o=l.createContext(void 0);function i(){let e=l.useContext(o);if(void 0===e)throw Error((0,r.A)(20));return e}},44118:(e,t,n)=>{n.d(t,{i:()=>O});var r=n(12115),l=n(6791),o=n(62081),i=n(2052),a=n(45594),u=n(65610),s=n(84052),d=n(72924),c=n(69938),p=n(76175),f=n(5313),v=n(95846),g=n(36050),m=n(23068);let h=r.createContext(void 0);var P=n(26713),x=n(95155);let O=r.forwardRef(function(e,t){let{render:n,className:O,style:R,initialFocus:T,finalFocus:y,...I}=e,b=(0,a.s)(),E=(0,u.k)(),C=null!=(0,v.S)(!0),{context:S,hasClosePart:w}=function(){let[e,t]=r.useState(0),n=(0,m.K)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:r.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}(),M=b.useState("open"),A=b.useState("openMethod"),j=b.useState("instantType"),k=b.useState("transitionStatus"),V=b.useState("popupProps"),Q=b.useState("titleElementId"),D=b.useState("descriptionElementId"),q=b.useState("modal"),F=b.useState("mounted"),W=b.useState("openChangeReason"),$=b.useState("activeTriggerElement"),H=b.useState("floatingRootContext"),K=H.useState("floatingId"),L=b.useState("disabled"),X=b.useState("openOnHover"),N=b.useState("closeDelay");(0,d.v)({open:M,ref:b.context.popupRef,onComplete(){M&&b.context.onOpenChangeComplete?.(!0)}}),(0,o.a)(H,{enabled:X&&!L,closeDelay:N});let B=void 0===T?(0,P.UM)(b.context.popupRef):T,G=!1!==q&&w;b.useSyncedValue("focusManagerModal",G);let Z=b.useStateSetter("popupElement"),_={open:M,side:E.side,align:E.align,instant:j,transitionStatus:k},Y=(0,c.o)("div",e,{state:_,ref:[t,b.context.popupRef,Z],props:[V,{id:K,role:"dialog",...P.Ls,"aria-labelledby":Q,"aria-describedby":D,onKeyDown(e){C&&f.jF.has(e.key)&&e.stopPropagation()}},(0,g.d)(k),I],stateAttributesMapping:s.LM});return(0,x.jsx)(i.s,{context:H,openInteractionType:A,modal:G,disabled:!F||W===p.N7,initialFocus:B,returnFocus:y,restoreFocus:"popup",previousFocusableElement:(0,l.sb)($)?$:void 0,nextFocusableElement:b.context.triggerFocusTargetRef,beforeContentFocusGuardRef:b.context.beforeContentFocusGuardRef,children:(0,x.jsx)(h.Provider,{value:S,children:Y})})})},44512:(e,t,n)=>{n.d(t,{O:()=>i,Z:()=>o});var r=n(25803),l=n(12115);let o=l.createContext(void 0);function i(e){let t=l.useContext(o);if(void 0===t&&!e)throw Error((0,r.A)(21));return t}},45594:(e,t,n)=>{n.d(t,{r:()=>o,s:()=>i});var r=n(25803),l=n(12115);let o=l.createContext(void 0);function i(e){let t=l.useContext(o);if(void 0===t&&!e)throw Error((0,r.A)(47));return t}},47028:(e,t,n)=>{n.d(t,{Q:()=>d});var r=n(12115),l=n(34738),o=n(97378),i=n(72924),a=n(69938),u=n(41900),s=n(95155);let d=r.forwardRef(function(e,t){let{selected:n}=(0,l.b)();return e.keepMounted||n?(0,s.jsx)(c,{...e,ref:t}):null}),c=r.memo(r.forwardRef((e,t)=>{let{render:n,className:s,style:d,keepMounted:c,...p}=e,{selected:f}=(0,l.b)(),v=r.useRef(null),{transitionStatus:g,setMounted:m}=(0,o.$)(f),h=(0,a.o)("span",e,{ref:[t,v],state:{selected:f,transitionStatus:g},props:[{"aria-hidden":!0,children:"✔️"},p],stateAttributesMapping:u.G});return(0,i.v)({open:f,ref:v,onComplete(){f||m(!1)}}),h}))},56758:(e,t,n)=>{n.d(t,{x:()=>P});var r=n(12115),l=n(47650),o=n(30271),i=n(66652),a=n(65440),u=n(54068),s=n(69938),d=n(34738),c=n(27540),p=n(27091);let f=r.createContext(!1);var v=n(70035),g=n(95155);function m(e){let{componentProps:t,forwardedRef:n,virtualized:m,indexFromFilter:h}=e,{render:P,className:x,style:O,value:R=null,index:T,disabled:y=!1,nativeButton:I=!1,...b}=t,E=r.useRef(null),C=(0,u.q)({guess:!0,index:T,textRef:E}),S=(0,a.Ee)(),w=r.useContext(f),M=(0,a.Eg)(),A=(0,o.P)(S,c.T.selectionMode),j=(0,o.P)(S,c.T.disabled),k=(0,o.P)(S,c.T.readOnly),V=(0,o.P)(S,c.T.isItemEqualToValue),Q=j||y,D="none"!==A,q=T??h??C.index,F=-1!==q,W=(0,o.P)(S,c.T.id),$=(0,o.P)(S,c.T.isActive,q),H=(0,o.P)(S,c.T.isSelected,R),K=(0,o.P)(S,c.T.itemProps),L=r.useRef(null),X=null!=W&&F?`${W}-${q}`:void 0,N=H&&D;(0,i.g)(()=>{if(!(F&&(m||null!=T)))return;let e=S.state.listRef.current;return e[q]=L.current,()=>{delete e[q]}},[F,m,q,T,S]),(0,i.g)(()=>{if(!F||M)return;let e=S.state.valuesRef.current;return e[q]=R,()=>{delete e[q]}},[F,M,q,R,S]),(0,i.g)(()=>{if(!F||M)return;let e=S.state.selectedValue,t=Array.isArray(e)?e[e.length-1]:e;(0,v.tl)(R,t,V)&&S.set("selectedIndex",q)},[F,M,S,q,R,V]);let{getButtonProps:B,buttonRef:G}=(0,p.s)({disabled:Q,focusableWhenDisabled:!0,native:I,composite:!0});function Z(e){function t(){S.state.handleSelection(e,R)}S.state.submitOnItemClick?(l.flushSync(t),S.state.requestSubmit()):t()}let _=(0,s.o)("div",t,{ref:[G,n,C.ref,L],state:{disabled:Q,selected:N,highlighted:$},props:[K,{id:X,role:w?"gridcell":"option","aria-selected":D?N:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(S.state.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){Q||k||Z(e.nativeEvent)},onMouseUp(e){let t=S.state.pointerDownItemRef.current===e.currentTarget;S.state.pointerDownItemRef.current=null,Q||k||0!==e.button||t||!$||Z(e.nativeEvent)}},b,B]}),Y=r.useMemo(()=>({selected:N,textRef:E}),[N,E]);return(0,g.jsx)(d.s.Provider,{value:Y,children:_})}function h(e){let{componentProps:t,forwardedRef:n}=e,r=(0,a.Ee)(),l=(0,o.P)(r,c.T.isItemEqualToValue),{flatFilteredItems:i}=(0,a.Dc)(),u=(0,v.Vz)(i,t.value??null,l);return(0,g.jsx)(m,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:u})}let P=r.memo(r.forwardRef(function(e,t){let n=(0,a.Ee)(),r=(0,o.P)(n,c.T.virtualized);return r&&null==e.index?(0,g.jsx)(h,{componentProps:e,forwardedRef:t}):(0,g.jsx)(m,{componentProps:e,forwardedRef:t,virtualized:r,indexFromFilter:void 0})}))},58565:(e,t,n)=>{n.d(t,{V:()=>h});var r=n(12115),l=n(30271),o=n(65440),i=n(69938),a=n(27540),u=n(27091),s=n(12991),d=n(97378),c=n(41900),p=n(72924),f=n(7049),v=n(76175),g=n(84052);let m={...c.G,...g.qV},h=r.forwardRef(function(e,t){let{render:n,className:r,disabled:c=!1,nativeButton:g=!0,keepMounted:h=!1,style:P,...x}=e,{disabled:O}=(0,s.V$)(),R=(0,o.Ee)(),T=(0,l.P)(R,a.T.selectionMode),y=(0,l.P)(R,a.T.disabled),I=(0,l.P)(R,a.T.readOnly),b=(0,l.P)(R,a.T.open),E=(0,l.P)(R,a.T.selectedValue),C=(0,l.P)(R,a.T.hasSelectionChips),S=(0,o.dc)(),w=!1;w="none"===T?""!==S:"single"===T?null!=E:C;let M=O||y||c,{buttonRef:A,getButtonProps:j}=(0,u.s)({native:g,disabled:M}),{mounted:k,transitionStatus:V,setMounted:Q}=(0,d.$)(w),D={disabled:M,visible:w,open:b,transitionStatus:V};(0,p.v)({open:w,ref:R.state.clearRef,onComplete(){w||Q(!1)}});let q=(0,i.o)("button",e,{state:D,ref:[t,A,R.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(e){e.preventDefault()},onClick(e){if(M||I)return;let t=R.state.keyboardActiveRef.current?v.QJ:v.Wn;R.state.setInputValue("",(0,f.d)(v.R0,e.nativeEvent)),"none"!==T?(R.state.setSelectedValue(Array.isArray(E)?[]:null,(0,f.d)(v.R0,e.nativeEvent)),R.state.setIndices({activeIndex:null,selectedIndex:null,type:t})):R.state.setIndices({activeIndex:null,type:t}),R.state.inputRef.current?.focus()}},x,j],stateAttributesMapping:m});return h||k?q:null})},63205:(e,t,n)=>{n.d(t,{$:()=>u});var r=n(12115),l=n(69938),o=n(65440),i=n(97827),a=n(64951);let u=r.forwardRef(function(e,t){let n,u,{render:s,className:d,style:c,children:p,...f}=e,{filteredItems:v}=(0,o.Dc)(),g=(0,o.Ee)(),m=(n=(0,a.Z)(),u=r.useRef(null),r.useEffect(()=>{if(i.s4)return;let e=u.current;if(null==e)return;let t=function(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;""!==e.nodeValue&&(n=e)}return n}(e);if(null==t)return;let r=t.data,l=`${r}\u2060`;return t.nodeValue=l,n.start(200,()=>{t.nodeValue===l&&(t.nodeValue=r)}),()=>{n.clear(),t.nodeValue===l&&(t.nodeValue=r)}},[u,n]),u),h=0===v.length?p:null;return(0,l.o)("div",e,{ref:[t,g.state.emptyRef,m],props:[{children:h,role:"status","aria-live":"polite","aria-atomic":!0},f]})})},65440:(e,t,n)=>{n.d(t,{Dc:()=>p,Ee:()=>d,Eg:()=>v,Hw:()=>i,KR:()=>s,XD:()=>u,dc:()=>f,kN:()=>a,ui:()=>c,vx:()=>o});var r=n(25803),l=n(12115);let o=l.createContext(void 0),i=l.createContext(void 0),a=l.createContext(void 0),u=l.createContext(!1),s=l.createContext("");function d(){let e=l.useContext(o);if(!e)throw Error((0,r.A)(22));return e}function c(){let e=l.useContext(i);if(!e)throw Error((0,r.A)(23));return e}function p(){let e=l.useContext(a);if(!e)throw Error((0,r.A)(24));return e}function f(){return l.useContext(s)}function v(){return l.useContext(u)}},65610:(e,t,n)=>{n.d(t,{f:()=>o,k:()=>i});var r=n(25803),l=n(12115);let o=l.createContext(void 0);function i(){let e=l.useContext(o);if(!e)throw Error((0,r.A)(46));return e}},66289:(e,t,n)=>{n.d(t,{M:()=>E});var r=n(12115),l=n(30271),o=n(23068),i=n(64951),a=n(81456),u=n(69938),s=n(27091),d=n(65440),c=n(75391),p=n(27540),f=n(12991),v=n(57960),g=n(51464),m=n(17947),h=n(8272),P=n(7049),x=n(76175),O=n(73562),R=n(9569),T=n(3017),y=n(68516),I=n(6276),b=n(90491);let E=r.forwardRef(function(e,t){let n,{render:E,className:C,nativeButton:S=!0,disabled:w=!1,id:M,style:A,...j}=e,{state:k,disabled:V,setTouched:Q,setFocused:D,validationMode:q,validation:F}=(0,f.V$)(),{labelId:W}=(0,v.H)(),$=(0,d.Ee)(),H=(0,l.P)($,p.T.selectionMode),K=(0,l.P)($,p.T.disabled),L=(0,l.P)($,p.T.readOnly),X=(0,l.P)($,p.T.required),N=(0,l.P)($,p.T.positionerElement),B=(0,l.P)($,p.T.listElement),G=(0,l.P)($,p.T.popupId),Z=(0,l.P)($,p.T.triggerProps),_=(0,l.P)($,p.T.inputInsidePopup),Y=(0,l.P)($,p.T.id),z=(0,l.P)($,p.T.labelId),U=(0,l.P)($,p.T.open),J=(0,l.P)($,p.T.selectedValue),ee=(0,l.P)($,p.T.activeIndex),et=(0,l.P)($,p.T.selectedIndex),en=(0,l.P)($,p.T.hasSelectedValue),er=(0,d.ui)(),el=(0,d.dc)(),eo=(0,i.Z)(),ei=V||K||w,ea=(0,b.$B)(),eu=(0,b.Xb)($);(0,T.l)({id:_?M:void 0});let es=_?M??Y:M,ed=(0,y._)(W,z);U&&_?n=G??(0,I.xj)(Y):U&&(n=B?.id);let ec=r.useRef("");function ep(e){ec.current=e.pointerType}let{reference:ef}=(0,O.l)(er,{enabled:!U&&!L&&!K&&"single"===H,listRef:$.state.labelsRef,activeIndex:ee,selectedIndex:et,onMatch(e){let t=$.state.valuesRef.current[e];void 0!==t&&$.state.setSelectedValue(t,(0,P.d)(x.dv))}}),{reference:ev}=(0,R.k)(er,{enabled:!L&&!K,event:"mousedown"}),{buttonRef:eg,getButtonProps:em}=(0,s.s)({native:S,disabled:ei}),eh={...k,open:U,disabled:ei,popupSide:eu,listEmpty:ea,placeholder:"none"!==H&&!en},eP=(0,o.K)(e=>{$.set("triggerElement",e)});return(0,u.o)("button",e,{ref:[t,eg,eP],state:eh,props:[Z,ev,ef,{id:es,tabIndex:_?0:-1,role:_?"combobox":void 0,"aria-expanded":U,"aria-haspopup":_?"dialog":"listbox","aria-controls":n,"aria-required":_&&X||void 0,"aria-labelledby":ed,onPointerDown:ep,onPointerEnter:ep,onFocus(){D(!0),ei||L||eo.start(0,$.state.forceMount)},onBlur(e){(0,g.gR)(N,e.relatedTarget)||(Q(!0),D(!1),"onBlur"===q&&F.commit("none"===H?el:J))},onMouseDown(e){if(ei||L||(_||er.set("domReferenceElement",e.currentTarget),$.state.forceMount(),"touch"!==ec.current&&($.state.inputRef.current?.focus(),_||e.preventDefault()),U))return;let t=(0,a.R)(e.currentTarget);_&&t.addEventListener("mouseup",function(e){let t=$.state.triggerElement;if(!t)return;let n=(0,g.EW)(e),r=$.state.positionerElement,l=$.state.listElement;(0,g.gR)(t,n)||(0,g.gR)(r,n)||(0,g.gR)(l,n)||(0,h.U)(e,t)||$.state.setOpen(!1,(0,P.d)(x.LO,e))},{once:!0})},onKeyDown(e){L||("ArrowDown"===e.key||"ArrowUp"===e.key)&&((0,m.jo)(e),$.state.setOpen(!0,(0,P.d)(x.Dq,e.nativeEvent)),$.state.inputRef.current?.focus())}},F.getValidationProps(ei,j),em],stateAttributesMapping:c.d})})},75391:(e,t,n)=>{n.d(t,{d:()=>o});var r=n(84052),l=n(95478);let o={...r.jL,...l.dc,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null}},81312:(e,t,n)=>{n.d(t,{D:()=>s});var r=n(12115),l=n(47247),o=n(98339),i=n(31139),a=n(39048),u=n(95155);function s(e){let[t,n]=r.useState({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,x:0,y:0})}),s=r.useRef(null),d=r.useRef(null),c=r.useRef(null),p=r.useRef(null),f=r.useRef(!0),v=r.useRef(null),g=(0,l.B)(),m=r.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:c,backdropRef:s,internalBackdropRef:d,positionerRef:p,allowMouseUpTriggerRef:f,initialCursorPointRef:v,rootId:g}),[t,g]);return(0,u.jsx)(o.Y.Provider,{value:m,children:(0,u.jsx)(a.J.Provider,{value:void 0,children:(0,u.jsx)(i.i,{...e})})})}},82208:(e,t,n)=>{n.d(t,{y:()=>O});var r=n(12115),l=n(80120),o=n(87541),i=n(45594),a=n(47650),u=n(98419),s=n(64951),d=n(76175),c=n(34785),p=n(52313),f=n(26713),v=n(69679);let g={...c.ol,disabled:e=>e.disabled,instantType:e=>e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,modal:e=>e.modal,focusManagerModal:e=>e.focusManagerModal,stickIfOpen:e=>e.stickIfOpen,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class m extends u.H{constructor(e,t,n){const l=new p.Z;super(function(e,t,n,r=!1){let l={...(0,c.rJ)(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return l.open&&e?.mounted===void 0&&(l.mounted=!0),l.floatingRootContext=(0,c.OB)(t,n,r),l}(e,l,t,n),function(e){return{popupRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:r.createRef(),beforeContentFocusGuardRef:r.createRef(),stickIfOpenTimeout:new s.E,triggerElements:e}}(l),g),this.setOpen=(e,t)=>{let n,r=t.reason===d.N7,l=t.reason===d.Ui&&0===t.event.detail,o=!e&&(t.reason===d.jv||null==t.reason),i=(0,f.T1)(t),u=this.select("activeTriggerId");if(e||t.reason!==d.SR||null!=t.trigger||null==u||(t.trigger=this.context.triggerElements.getById(u)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n={open:e,openChangeReason:t.reason};(0,f.i)(n,e,t.trigger,i()),this.update(n)};r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(v.X3,()=>{this.set("stickIfOpen",!1)}),a.flushSync(s)):s(),l?n="click":o?n="dismiss":t.reason===d.Xn&&(n="focus"),this.set("instantType",n)}}}var h=n(7049),P=n(95155);function x({props:e}){var t;let n,{children:l,open:o,defaultOpen:a=!1,onOpenChange:u,onOpenChangeComplete:s,modal:c=!1,handle:p,triggerId:v,defaultTriggerId:g=null}=e,O=(t={modal:c,open:a,openProp:o,activeTriggerId:g,triggerIdProp:v},n=(0,f.xp)((e,n)=>new m(t,e,n)),r.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n);O.useControlledProp("openProp",o),O.useControlledProp("triggerIdProp",v);let T=O.useState("open"),y=O.useState("mounted"),I=O.useState("payload");O.useContextCallback("onOpenChange",u),O.useContextCallback("onOpenChangeComplete",s),(0,f.xs)(O,T),(0,f.tr)(O);let{forceUnmount:b}=(0,f.l$)(T,O,()=>{O.update({stickIfOpen:!0,openChangeReason:null})});O.useSyncedValues({modal:c}),r.useEffect(()=>{T||O.context.stickIfOpenTimeout.clear()},[O,T]),r.useImperativeHandle(e.actionsRef,()=>({unmount:b,close:()=>O.setOpen(!1,(0,h.d)(d.zJ))}),[b,O]);let E=T||y;return(0,P.jsxs)(i.r.Provider,{value:O,children:[p&&(0,P.jsx)(f.Ae,{handle:p,store:O}),E&&(0,P.jsx)(R,{store:O,modal:c}),"function"==typeof l?l({payload:I}):l]})}function O(e){return(0,i.s)(!0)?(0,P.jsx)(x,{props:e}):(0,P.jsx)(l.P6,{children:(0,P.jsx)(x,{props:e})})}function R({store:e,modal:t}){let n=e.useState("floatingRootContext"),r=(0,o.s)(n,{outsidePressEvent:{mouse:"trap-focus"===t?"sloppy":"intentional",touch:"sloppy"}}),l=r.reference,i=r.floating;return(0,f.i6)(e,{activeTriggerProps:l,inactiveTriggerProps:l,popupProps:i}),null}},90491:(e,t,n)=>{n.d(t,{$B:()=>a,L6:()=>d,Xb:()=>i,jr:()=>s,ln:()=>u});var r=n(30271),l=n(65440),o=n(27540);function i(e){let t=(0,r.P)(e,o.T.mounted),n=(0,r.P)(e,o.T.popupSide),l=(0,r.P)(e,o.T.positionerElement);return t&&l?n:null}function a(){return 0===(0,l.Dc)().filteredItems.length}function u(e){return"rtl"===e?["ArrowRight","ArrowLeft"]:["ArrowLeft","ArrowRight"]}function s(e,t){let n=e>=t-1?t-2:e;return n>=0?n:void 0}function d(e,t,n){let r=e.state.listRef.current[t];r&&(e.state.selectionEventRef.current=n,r.click(),e.state.selectionEventRef.current=null)}},91075:(e,t,n)=>{n.d(t,{o:()=>b});var r=n(12115),l=n(30271),o=n(23068),i=n(97827),a=n(15495),u=n(62955),s=n(69938),d=n(65440),c=n(75391),p=n(27540),f=n(12991),v=n(95478),g=n(57960);let m=r.createContext(void 0);var h=n(17947),P=n(44512),x=n(7049),O=n(76175),R=n(30458),T=n(13003),y=n(90491),I=n(95155);let b=r.forwardRef(function(e,t){let{render:n,className:b,disabled:E=!1,id:C,style:S,...w}=e,{state:M,disabled:A,setTouched:j,setFocused:k,validationMode:V,validation:Q}=(0,f.V$)(),{labelId:D}=(0,g.H)(),q=r.useContext(m),F=!!(0,P.O)(!0),W=(0,d.Ee)(),$=(0,d.dc)(),H=(0,R.j)(),K=(0,l.P)(W,p.T.required),L=(0,l.P)(W,p.T.disabled),X=(0,l.P)(W,p.T.readOnly),N=(0,l.P)(W,p.T.name),B=(0,l.P)(W,p.T.form),G=(0,l.P)(W,p.T.selectionMode),Z=(0,l.P)(W,p.T.autoHighlight),_=(0,l.P)(W,p.T.inputProps),Y=(0,l.P)(W,p.T.triggerProps),z=(0,l.P)(W,p.T.open),U=(0,l.P)(W,p.T.mounted),J=(0,l.P)(W,p.T.selectedValue),ee=(0,l.P)(W,p.T.id),et=(0,l.P)(W,p.T.inline),en=(0,l.P)(W,p.T.modal),er=!!Z,el=(0,y.Xb)(W),eo=A||L||E,ei=(0,y.$B)(),ea=F||et,eu=(0,u.e)(C??(ea?void 0:ee)),es=F?v.HH:M,[ed,ec]=r.useState(null),ep=r.useRef(!1),ef=r.useRef(null),ev=r.useRef(!1),eg="none"===G&&!F,em=(0,o.K)(e=>{let t=F||W.state.inline;t&&!W.state.hasInputValue&&W.state.setInputValue("",(0,x.d)(O.dv)),W.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:eg})}),eh=F?w:Q.getValidationProps(eo,w);function eP(){W.state.setIndices({activeIndex:null,selectedIndex:null,type:W.state.keyboardActiveRef.current?O.QJ:O.Wn})}function ex(){W.state.keyboardActiveRef.current=!1}let eO={...es,open:z,disabled:eo,readOnly:X,popupSide:el,listEmpty:ei},eR=(0,s.o)("input",e,{state:eO,ref:[t,W.state.inputRef,em],props:[_,Y,{value:ed??$,"aria-readonly":X||void 0,"aria-required":K||void 0,"aria-labelledby":D,disabled:eo,readOnly:X,required:"none"===G?K:void 0,form:B,...eg&&N&&{name:N},id:eu,onFocus(){if(k(!0),!et||!ev.current)return;ev.current=!1;let e=ef.current;null!=e&&Object.hasOwn(W.state.valuesRef.current,e)&&W.state.setIndices({activeIndex:e})},onBlur(){j(!0),k(!1);let e=W.state.activeIndex;if(et&&null!==e&&"always"!==Z&&(ef.current=e,ev.current=!0,W.state.setIndices({activeIndex:null})),"onBlur"===V){let e="none"===G?$:J;Q.commit(e)}},onCompositionStart(e){i.yA||(ep.current=!0,ec(e.currentTarget.value))},onCompositionEnd(e){ep.current=!1;let t=e.currentTarget.value;ec(null),W.state.setInputValue(t,(0,x.d)(O.pf,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=ep.current||!(!n||"insertReplacementText"===n);function l(e){!X&&!eo&&e&&r&&(W.state.setOpen(!0,(0,x.d)(O.pf,t)),er||eP())}if(ep.current){let n=e.currentTarget.value;ec(n),""!==n||W.state.openOnInputClick||W.state.inputInsidePopup||W.state.setOpen(!1,(0,x.d)(O.qs,t));let r=n.trim(),o=er&&""!==r;l(r),z&&null!==W.state.activeIndex&&!o&&eP();return}let o=(0,x.d)(O.pf,t);if(W.state.setInputValue(e.currentTarget.value,o),o.isCanceled)return;let i=""===e.currentTarget.value,a=(0,x.d)(O.qs,t);i&&!W.state.inputInsidePopup&&("single"===G&&W.state.setSelectedValue(null,a),W.state.openOnInputClick||W.state.setOpen(!1,a)),l(e.currentTarget.value.trim()),z&&null!==W.state.activeIndex&&!er&&eP()},onKeyDown(e){if(eo||X||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;W.state.keyboardActiveRef.current=!0;let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r="rtl"===H;if("Home"===e.key){(0,h.jo)(e);let n=a.cn&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if("End"===e.key){(0,h.jo)(e);let l=a.cn&&r?0:t.value.length;t.setSelectionRange(l,l),t.scrollLeft=r?-n:n;return}if(!U&&"Escape"===e.key){let t="multiple"===G&&Array.isArray(J)?0===J.length:null===J,n=(0,x.d)(O.jv,e.nativeEvent);W.state.setInputValue("",n),W.state.setSelectedValue("multiple"===G?[]:null,n),t||W.state.inline||n.isPropagationAllowed||e.stopPropagation();return}if(q&&"Backspace"===e.key&&""===t.value&&void 0===q.highlightedChipIndex&&Array.isArray(J)&&J.length>0){let t=q.chipsRef.current.length,n=t>0?t-1:J.length-1,r=J.filter((e,t)=>t!==n);eP(),W.state.setSelectedValue(r,(0,x.d)(O.dv,e.nativeEvent));return}let l=q?.highlightedChipIndex!==void 0,o=function(e){let t;if(!q)return;let{highlightedChipIndex:n}=q,r=q.chipsRef.current.length,[l,o]=(0,y.ln)(H);return void 0!==n?e.key===l?(e.preventDefault(),t=n>0?n-1:void 0):e.key===o?(e.preventDefault(),t=n<r-1?n+1:void 0):("Backspace"===e.key||"Delete"===e.key)&&(e.preventDefault(),t=(0,y.jr)(n,J.length),eP()):e.key===l&&(e.currentTarget.selectionStart??0)===0&&J.length>0&&(e.preventDefault(),t=r>0?r-1:void 0),t}(e);if(q?.setHighlightedChipIndex(o),void 0!==o?q?.chipsRef.current[o]?.focus():l&&W.state.inputRef.current?.focus(),229!==e.which&&"Enter"===e.key&&z){let t=W.state.activeIndex,n=e.nativeEvent;if(null===t){if(et)return;W.state.setOpen(!1,(0,x.d)(O.dv,n));return}(0,h.jo)(e),(0,y.L6)(W,t,n)}},onPointerMove:ex,onPointerDown:ex},eh],stateAttributesMapping:c.d}),eT=F?(0,I.jsx)(f.eZ.Provider,{value:f.er,children:eR}):eR;return(0,I.jsxs)(r.Fragment,{children:[z&&(!ea||en)&&(0,I.jsx)(T.p,{ref:W.state.startDismissRef}),eT]})})},91763:(e,t,n)=>{n.d(t,{U:()=>P});var r=n(12115),l=n(96354),o=n(66652),i=n(80120),a=n(45594),u=n(65610),s=n(53536),d=n(34574),c=n(53976),p=n(76175),f=n(69679),v=n(73070),g=n(62424),m=n(15702),h=n(95155);let P=r.forwardRef(function(e,t){let{render:n,className:P,style:x,anchor:O,positionMethod:R,side:T,align:y,sideOffset:I,alignOffset:b,collisionBoundary:E="clipping-ancestors",collisionPadding:C,arrowPadding:S,sticky:w,disableAnchorTracking:M=!1,collisionAvoidance:A=f.Pe,...j}=e,k=(0,a.s)(),V=(0,d.A)(),Q=(0,i.fI)(),D=k.useState("floatingRootContext"),q=k.useState("mounted"),F=k.useState("open"),W=k.useState("openChangeReason"),$=k.useState("activeTriggerElement"),H=k.useState("modal"),K=k.useState("openMethod"),L=k.useState("positionerElement"),X=k.useState("instantType"),N=k.useState("transitionStatus"),B=k.useState("adaptiveOrigin"),G=r.useRef(null),Z=(0,v.V)(L),_=(0,s.s)({anchor:O,floatingRootContext:D,positionMethod:R,mounted:q,side:T,sideOffset:I,align:y,alignOffset:b,arrowPadding:S,collisionBoundary:E,collisionPadding:C,sticky:w,disableAnchorTracking:M,keepMounted:V,nodeId:Q,collisionAvoidance:A,adaptiveOrigin:B}),Y=D.useState("domReferenceElement");(0,o.g)(()=>{let e=G.current;if(Y&&(G.current=Y),e&&Y&&Y!==e){k.set("instantType",void 0);let e=new AbortController;return Z(()=>{k.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[Y,Z,k]);let z=!0===H&&W!==p.N7;(0,m.G)(F&&z,"touch"===K,L,$);let U=k.useStateSetter("positionerElement"),J={open:F,side:_.side,align:_.align,anchorHidden:_.anchorHidden,instant:X},ee=(0,g.i)(e,J,{styles:_.positionerStyles,transitionStatus:N,props:j,refs:[t,U],hidden:!q,inert:!F});return(0,h.jsxs)(u.f.Provider,{value:_,children:[q&&z&&(0,h.jsx)(c.W,{inert:(0,l.Y)(!F),cutout:$}),(0,h.jsx)(i.$c,{id:Q,children:ee})]})})},92953:(e,t,n)=>{n.d(t,{i:()=>Z});var r=n(12115),l=n(50602),o=n(66652),i=n(95313),a=n(23068),u=n(55218),s=n(2474),d=n(46468),c=n(14187),p=n(2368),f=n(30271),v=n(8994),g=n(6791),m=n(57134),h=n(9569),P=n(87541),x=n(61243),O=n(86058);function R(e,t,n,r,l,o,i,a,u,s=2){let d=(0,O.Kg)(n.current,{event:e,orientation:r,loopFocus:l,rtl:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:u,prevIndex:t>u?a:t,stopEvent:!0});return(0,O.du)(n.current,d)?void 0:d}var T=n(51464),y=n(7049),I=n(76175),b=n(65440),E=n(27540),C=n(72924),S=n(12991),w=n(1272),M=n(10232),A=n(3017),j=n(6276),k=n(15483);let V=new Map,Q=function(e={}){let t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${function e(t){return Array.isArray(t)?t.map(t=>e(t)).join(","):null==t?"":String(t)}(e.locale)}|${JSON.stringify(t)}`,r=V.get(n);if(r)return r;let l=new Intl.Collator(e.locale,t),o={contains(e,t,n){if(!t)return!0;let r=(0,k.yg)(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(0===l.compare(r.slice(e,e+t.length),t))return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=(0,k.yg)(e,n);return 0===l.compare(r.slice(0,t.length),t)},endsWith(e,t,n){if(!t)return!0;let r=(0,k.yg)(e,n),o=t.length;return r.length>=o&&0===l.compare(r.slice(r.length-o),t)}};return V.set(n,o),o};var D=n(97378),q=n(22713),F=n(42240),W=n(26713),$=n(40253),H=n(70035),K=n(62386);let L=Symbol("none"),X={value:L,index:-1};var N=n(30458),B=n(95155);function G(e){let t,{id:n,onOpenChangeComplete:O,defaultSelectedValue:V=null,selectedValue:G,onSelectedValueChange:Z,defaultInputValue:_,inputValue:Y,open:z,defaultOpen:U=!1,selectionMode:J,onItemHighlighted:ee,name:et,form:en,disabled:er=!1,readOnly:el=!1,required:eo=!1,inputRef:ei,grid:ea=!1,items:eu,filteredItems:es,filter:ed,openOnInputClick:ec=!0,autoHighlight:ep=!1,keepHighlight:ef=!1,highlightItemOnHover:ev=!0,loopFocus:eg=!0,itemToStringLabel:em,itemToStringValue:eh,isItemEqualToValue:eP=H.jd,virtualized:ex=!1,inline:eO=!1,fillInputOnItemPress:eR=!0,modal:eT=!1,limit:ey=-1,autoComplete:eI="list",formAutoComplete:eb,locale:eE,submitOnItemClick:eC=!1}=e,{clearErrors:eS}=(0,M.x)(),{setDirty:ew,validityData:eM,setFilled:eA,name:ej,disabled:ek,setTouched:eV,setFocused:eQ,validationMode:eD,validation:eq}=(0,S.V$)(),eF=(0,N.j)(),eW=(0,A.l)({id:n}),e$=Q({locale:eE}),[eH,eK]=r.useState(!1),[eL,eX]=r.useState(null),eN=r.useRef([]),eB=r.useRef([]),eG=r.useRef(null),eZ=r.useRef(null),e_=r.useRef(null),eY=r.useRef(null),ez=r.useRef(null),eU=r.useRef(!0),eJ=r.useRef(!1),e0=r.useRef(null),e1=r.useRef(null),e5=r.useRef(null),e2=r.useRef(X),e9=r.useRef(null),e4=r.useRef([]),e6=r.useRef(null),e7=ek||er,e3=ej??et,e8="multiple"===J,te="single"===J,tt=void 0!==Y||void 0!==_,tn=void 0!==eu,tr=void 0!==es;t="always"===ep?"always":!!ep&&"input-change";let[tl,to]=(0,l.q)({controlled:G,default:e8?V??v.Ml:V,name:"Combobox",state:"selectedValue"}),ti=r.useMemo(()=>null===ed?()=>!0:void 0!==ed?ed:(0,j.I2)(e$,em),[ed,e$,em]),ta=(0,c.j)(()=>tt?_??"":te?(0,k.yg)(tl,em):"").current,[tu,ts]=(0,l.q)({controlled:Y,default:ta,name:"Combobox",state:"inputValue"}),[td,tc]=(0,l.q)({controlled:z,default:U,name:"Combobox",state:"open"}),tp=(0,k.Li)(eu),tf=eL??String(tu).trim(),tv=te?(0,k.yg)(tl,em):"",tg=te&&!eH&&""!==tf&&tv.length===tf.length&&e$.contains(tv,tf),tm=tg?"":tf,th=tn&&tr&&tg,tP=r.useMemo(()=>eu?tp?eu.flatMap(e=>e.items):eu:v.Ml,[eu,tp]),tx=r.useMemo(()=>{if(es&&!th)return es;if(!eu)return v.Ml;if(tp){let e=[],t=0;for(let n of eu){if(ey>-1&&t>=ey)break;let r=ey>-1?ey-t:1/0,l=""===tm?n.items.slice(0,r):[];if(""!==tm)for(let e of n.items){if(l.length>=r)break;ti(e,tm,em)&&l.push(e)}if(l.length>0){let r={...n,items:l};e.push(r),t+=l.length}}return e}if(""===tm)return ey>-1?tP.slice(0,ey):tP;let e=[];for(let t of tP){if(ey>-1&&e.length>=ey)break;ti(t,tm,em)&&e.push(t)}return e},[es,th,eu,tp,tm,ey,ti,em,tP]),tO=r.useMemo(()=>tp?tx.flatMap(e=>e.items):tx,[tx,tp]),tR=(0,c.j)(()=>{let e=null;return eO&&td&&tn&&"none"!==J&&(e=(0,H.Gu)(tO,tl,eP,e8)),new p.i({id:eW,labelId:void 0,selectedValue:tl,open:td,items:eu,selectionMode:J,listRef:eN,labelsRef:eB,popupRef:eG,emptyRef:ez,inputRef:eZ,startDismissRef:e_,endDismissRef:eY,keyboardActiveRef:eU,chipsContainerRef:e0,clearRef:e1,valuesRef:e4,pointerDownItemRef:e6,selectionEventRef:e5,name:e3,form:en,disabled:e7,readOnly:el,required:eo,grid:ea,virtualized:ex,openOnInputClick:ec,itemToStringLabel:em,isItemEqualToValue:eP,modal:eT,autoHighlight:t,submitOnItemClick:eC,hasInputValue:tt,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:eO,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemProps:v.t0,positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:"none"===J,onOpenChangeComplete:v.tE,setOpen:v.tE,setInputValue:v.tE,setSelectedValue:v.tE,setIndices:v.tE,handleSelection:v.tE,forceMount:v.tE,requestSubmit:v.tE})}).current,tT="none"===J?tu:tl,ty=r.useMemo(()=>"none"===J?tT:Array.isArray(tl)?tl.map(e=>(0,k.T)(e,eh)):(0,k.T)(tl,eh),[tT,eh,J,tl]),tI=(0,a.K)(ee),tb=(0,a.K)(O),tE=(0,f.P)(tR,E.T.activeIndex),tC=(0,f.P)(tR,E.T.selectedIndex),tS=(0,f.P)(tR,E.T.positionerElement),tw=(0,f.P)(tR,E.T.listElement),tM=(0,f.P)(tR,E.T.triggerElement),tA=(0,f.P)(tR,E.T.inputElement),tj=(0,f.P)(tR,E.T.inputGroupElement),tk=(0,f.P)(tR,E.T.inline),tV=(0,f.P)(tR,E.T.inputInsidePopup),tQ=(0,f.P)(tR,E.T.inputOwnsFormValue),tD=(0,s.u)(tM),{mounted:tq,setMounted:tF,transitionStatus:tW}=(0,D.$)(td),{openMethod:t$,triggerProps:tH}=(0,q.G)(td),tK=(0,a.K)(()=>ty);(0,w.I)(tV?tD:eZ,eW,tT,tK,!e7,et);let tL=(0,a.K)(()=>{eu?eB.current=tO.map(e=>(0,k.yg)(e,em)):tR.set("forceMounted",!0)}),tX=(0,a.K)((e,t,n)=>{if(-1===t){if(e2.current===X)return;e2.current=X}else e2.current={value:e,index:t};tI(e,(0,y.M)(n,void 0,{index:t}))}),tN=(0,a.K)(e=>{tR.update(e);let t=e.activeIndex;if(void 0===t)return;let n=e.type||I.dv;null===t?tX(void 0,-1,n):tX(e4.current[t],t,n)}),tB=(0,a.K)((n,r)=>{if(eJ.current=r.reason===I.qs,e.onInputValueChange?.(n,r),!r.isCanceled){if(r.reason===I.pf){td&&null!==eL&&eX(null);let e=r.event,l=e.inputType;if("compositionend"===e.type||null!=l&&""!==l&&"insertReplacementText"!==l){let e=""!==n.trim();e&&eK(!0),e9.current={hasQuery:e};let r=tR.state.listElement;if(!tR.state.virtualized&&r){let e=eG.current;for(let t of(0,g.v9)(r.firstElementChild??r)){if(!(0,g.sb)(t)||(e?!(0,T.gR)(e,t):"dialog"===t.getAttribute("role")))break;if(function(e,t=!1){let{overflowY:n}=(0,g.L9)(e);return("auto"===n||"scroll"===n)&&(t?e.clientHeight>0:e.scrollHeight>e.clientHeight)}(t)){t.scrollTop=0;break}}}e&&t&&null==tR.state.activeIndex&&(td||tk)&&tR.set("activeIndex",0)}}else r.reason===I.qs&&""===n&&tR.state.inputInsidePopup&&(e9.current={hasQuery:!1,selection:!0});ts(n)}}),tG=(0,a.K)((t,n)=>{if(td!==t&&(n.reason===I.jv&&tn&&0===tO.length&&!ez.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(t&&tV&&!tk&&null!==eL&&(eK(!1),eX(null),""!==tu&&n.reason!==I.pf&&tB("",(0,y.d)(I.qs,n.event))),!t&&eH&&(te?(tk||eX(tf),""===tf&&eK(!1)):e8&&(tk||eX(tf),tV&&tN({activeIndex:null}),(!tV||tk)&&tB("",(0,y.d)(I.qs,n.event)))),tc(t),!t&&tV&&(n.reason===I.Xn||n.reason===I.Np))&&(eV(!0),eQ(!1),"onBlur"===eD))){let e="none"===J?tu:tl;eq.commit(e)}}),tZ=(0,a.K)((e,t)=>{Z?.(e,t),t.isCanceled||(to(e),("none"===J&&eG.current&&eR||te&&!tR.state.inputInsidePopup)&&tB((0,k.yg)(e,em),(0,y.d)(t.reason,t.event)))}),t_=(0,a.K)((e,t)=>{let n=(0,T.EW)(e),r=e5.current??e;e5.current=null;let l=(0,y.d)(I.Bo,r),o=n?.closest("a")?.getAttribute("href");if(o){o.startsWith("#")&&tG(!1,l);return}if(e8){let e=Array.isArray(tl)?tl:[];if(tZ((0,H.kJ)(e,t,eP)?(0,H.Ai)(e,t,eP):[...e,t],l),l.isCanceled||!(eZ.current&&""!==eZ.current.value.trim()))return;tR.state.inputInsidePopup?tB("",(0,y.d)(I.qs,l.event)):tG(!1,l)}else{if(tZ(t,l),l.isCanceled)return;tG(!1,l)}}),tY=(0,a.K)(()=>{let e=eq.inputRef.current?.form??tR.state.inputElement?.form;e&&"function"==typeof e.requestSubmit&&e.requestSubmit()}),tz=(0,a.K)(()=>{if(tF(!1),tb?.(!1),eK(!1),eX(null),"none"===J?tN({activeIndex:null,selectedIndex:null}):tN({activeIndex:null}),e8&&eZ.current&&""!==eZ.current.value&&!eJ.current&&tB("",(0,y.d)(I.qs)),te)if(tR.state.inputInsidePopup)eZ.current&&""!==eZ.current.value&&tB("",(0,y.d)(I.qs));else{let e=(0,k.yg)(tl,em);if(eZ.current&&eZ.current.value!==e){let t=""===e?I.qs:I.dv;tB(e,(0,y.d)(t))}}}),tU=r.useMemo(()=>tk&&tS?{current:tS.closest('[role="dialog"]')}:eG,[tk,tS]);function tJ(){let e=(0,k.yg)(tl,em);tu!==e&&tB(e,(0,y.d)(I.dv))}(0,C.v)({enabled:!e.actionsRef,open:td,ref:tU,onComplete(){td||tz()}}),r.useImperativeHandle(e.actionsRef,()=>({unmount:tz}),[tz]),(0,o.g)(function(){if(td||(e6.current=null,"none"===J))return;let e=tn?tP:e4.current;tN({selectedIndex:(0,H.Gu)(e,tl,eP,e8)})},[td,tl,J,e8,tn,tP,eP,tN]),(0,o.g)(()=>{eu&&(e4.current=tO,eN.current.length=tO.length)},[eu,tO]),(0,o.g)(()=>{let e=e9.current;if(e){let n=td||tk||tR.state.positionerElement?.hidden===!1;if(e.hasQuery)t&&n&&tR.set("activeIndex",0),e9.current=null;else if(""===String(tu).trim()&&(e9.current=null,n)){let n=e.selection;"always"!==t||n||"none"!==tR.state.selectionMode||tR.set("activeIndex",0),queueMicrotask(()=>{if(!tR.state.open&&!tR.state.inline||eZ.current&&""!==eZ.current.value.trim())return;let e=tR.state.selectedValue,r="multiple"===tR.state.selectionMode,l=r&&Array.isArray(e)?e[e.length-1]:e,o="none"!==tR.state.selectionMode&&null!=l;if(o||n){let t=tn||tr?tO:e4.current;tR.set("activeIndex",o?(0,H.Gu)(t,e,tR.state.isItemEqualToValue,r):null)}else"always"===t&&tR.set("activeIndex",0)})}}if(!td&&!tk)return;let n=tn||tr?tO:e4.current,r=tR.state.activeIndex;if(null==r)return"always"===t&&n.length>0?void tR.set("activeIndex",0):void tX(void 0,-1,I.dv);if(r>=n.length){tX(void 0,-1,I.dv),tR.set("activeIndex",null);return}let l=n[r],o=e2.current.value,i=o!==L&&(0,H.tl)(l,o,tR.state.isItemEqualToValue);e2.current.index===r&&i||tX(l,r,I.dv)},[tE,t,tX,tr,tn,tO,tk,td,tR,tu]),(0,o.g)(()=>{"none"===J?eA(""!==String(tu)):eA(e8?Array.isArray(tl)&&tl.length>0:null!=tl)},[eA,J,tu,tl,e8]),r.useEffect(()=>{tn&&t&&0===tO.length&&tN({activeIndex:null})},[tn,t,tO.length,tN]),(0,F.x)(tf,()=>{td&&""!==tf&&tf!==String(ta)&&eK(!0)}),(0,F.x)(tl,()=>{if("none"!==J){let e;eS(e3),ew((e=eM.initialValue,Array.isArray(tl)&&Array.isArray(e)?!(0,K.B)(tl,e,(e,t)=>(0,H.tl)(e,t,eP)):tl!==e)),eq.change(tl),!te||tt||tV||tJ()}}),(0,F.x)(tu,()=>{"none"===J&&(eS(e3),ew(tu!==eM.initialValue),eq.change(tu))}),(0,F.x)(eu,()=>{!te||tt||tV||eH||tJ()});let t0=(0,m.P)({open:!!tk||td,onOpenChange:tG,elements:{reference:tV?tM:tA,floating:tS}}),t1=ea?"grid":"listbox",t5=td||tk,t2=t5?"true":"false",t9=r.useMemo(()=>{let e=tA?.tagName==="INPUT",t=null==tA||e,n=t||t5,r=t?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return n&&(r.role="combobox",r["aria-expanded"]=t2,r["aria-haspopup"]=t1,r["aria-controls"]=t5?tw?.id:void 0,r["aria-autocomplete"]=eI),{reference:r,floating:{role:"presentation"}}},[tA,t5,t2,t1,tw?.id,eI]),t4=(0,h.k)(t0,{enabled:!el&&!e7&&ec,event:"mousedown-only",toggle:!1,touchOpenDelay:100*!tV,reason:I._J}),t6=(0,P.s)(t0,{enabled:!el&&!e7&&!tk,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:!!tk||void 0,outsidePress(e){let t=(0,T.EW)(e);return!(0,T.gR)(tM,t)&&!(0,T.gR)(e1.current,t)&&!(0,T.gR)(e0.current,t)&&!(0,T.gR)(tj,t)}}),t7=(0,x.C)(t0,{enabled:!el&&!e7,id:eW,listRef:eN,activeIndex:tE,selectedIndex:tC,virtual:!0,loopFocus:eg,allowEscape:eg&&!t,focusItemOnOpen:!eH&&("none"!==J||!!t)&&"auto",focusItemOnHover:ev,resetOnPointerLeave:!ef,orientation:ea?"horizontal":void 0,rtl:"rtl"===eF,disabledIndices:v.Ml,grid:ea?R:void 0,onNavigate(e,t){(t||td)&&"ending"!==tW&&(t?tN({activeIndex:e,type:eU.current?I.QJ:I.Wn}):tN({activeIndex:e}))}}),t3=r.useMemo(()=>(0,$.v6)(t7.reference,{onKeyDown(e){ea&&null==tR.state.activeIndex&&("ArrowLeft"===e.key||"ArrowRight"===e.key)&&e.preventBaseUIHandler()}},t6.reference,t4.reference,t9.reference),[t7.reference,t6.reference,t4.reference,t9.reference,ea,tR]),t8=r.useMemo(()=>(0,$.v6)(W.Ls,t6.floating),[t6.floating]),ne=r.useMemo(()=>(0,$.v6)(t7.floating,t9.floating),[t7.floating,t9.floating]),nt=r.useMemo(()=>{let e=t7.item;return e?{...e,onFocus:void 0}:v.t0},[t7.item]);(0,i.j)(()=>{tR.update({inline:eO,popupProps:t8,listProps:ne,inputProps:t3,triggerProps:tH,itemProps:nt,setOpen:tG,setInputValue:tB,setSelectedValue:tZ,setIndices:tN,handleSelection:t_,forceMount:tL,requestSubmit:tY,onOpenChangeComplete:tb})}),(0,o.g)(()=>{tR.update({id:eW,selectedValue:tl,open:td,mounted:tq,transitionStatus:tW,items:eu,inline:eO,popupProps:t8,listProps:ne,inputProps:t3,triggerProps:tH,openMethod:t$,itemProps:nt,selectionMode:J,name:e3,form:en,disabled:e7,readOnly:el,required:eo,grid:ea,virtualized:ex,openOnInputClick:ec,itemToStringLabel:em,modal:eT,autoHighlight:t,isItemEqualToValue:eP,submitOnItemClick:eC,hasInputValue:tt,inputOwnsFormValue:"none"===J&&(eO||!tR.state.inputInsidePopup)})},[tR,eW,tl,td,tq,tW,eu,t8,ne,t3,nt,t$,tH,J,e3,e7,el,eo,ea,ex,ec,em,eT,eP,eC,tt,eO,t,en]);let nn=(0,u.a)(ei,eq.inputRef),nr=r.useMemo(()=>({query:tf,hasItems:tn,filteredItems:tx,flatFilteredItems:tO}),[tf,tn,tx,tO]),nl=r.useMemo(()=>Array.isArray(tT)?"":(0,k.T)(tT,eh),[tT,eh]),no=e8&&Array.isArray(tl)&&tl.length>0,ni=e8||"none"===J&&tQ?void 0:e3,na=r.useMemo(()=>e8&&Array.isArray(tl)&&e3?tl.map(e=>{let t=(0,k.T)(e,eh);return(0,B.jsx)("input",{type:"hidden",form:en,name:e3,value:t,disabled:e7},t)}):null,[e8,tl,en,e3,eh,e7]),nu=(0,B.jsxs)(r.Fragment,{children:[e.children,(0,B.jsx)("input",{...eq.getValidationProps(e7,{onFocus(){tV?tM?.focus():(eZ.current||tM)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||e7||el)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=(0,y.d)(I.dv,e.nativeEvent),l=()=>e4.current.findIndex(e=>(0,k.T)(e,eh).toLowerCase()===n||(0,k.yg)(e,em).toLowerCase()===n);te&&(tL(),eu&&-1===l()&&tR.set("forceMounted",!0)),queueMicrotask(function(){if(e8)return;if("none"===J)return void tB(t,r);let e=l();-1===e&&(e=e4.current.findIndex((e,t)=>{let r=eB.current[t];return null!=r&&r.toLowerCase()===n}));let o=-1===e?void 0:e4.current[e];null!=o&&tZ?.(o,r)})}}),id:eW&&null==ni?`${eW}-hidden-input`:void 0,form:en,name:ni,autoComplete:eb,disabled:e7,required:eo&&!no,readOnly:el,value:nl,ref:nn,style:ni?d.a:d.Q,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),na]});return(0,B.jsx)(b.vx.Provider,{value:tR,children:(0,B.jsx)(b.Hw.Provider,{value:t0,children:(0,B.jsx)(b.XD.Provider,{value:tn,children:(0,B.jsx)(b.kN.Provider,{value:nr,children:(0,B.jsx)(b.KR.Provider,{value:tu,children:nu})})})})})}function Z(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:l,autoComplete:o,...i}=e;return(0,B.jsx)(G,{...i,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:l,formAutoComplete:o})}},93313:(e,t,n)=>{n.d(t,{I:()=>R});var r=n(12115),l=n(30271),o=n(66652),i=n(2052),a=n(69938),u=n(65440),s=n(27540),d=n(84052),c=n(44512),p=n(72924),f=n(41900),v=n(51464),g=n(36050),m=n(13003),h=n(6276),P=n(90491),x=n(95155);let O={...d.GW,...f.G},R=r.forwardRef(function(e,t){let{render:n,className:d,style:f,initialFocus:R,finalFocus:T,...y}=e,I=(0,u.Ee)(),b=(0,c.O)(),E=(0,u.ui)(),C=(0,l.P)(I,s.T.mounted),S=(0,l.P)(I,s.T.open),w=(0,l.P)(I,s.T.openMethod),M=(0,l.P)(I,s.T.popupProps),A=(0,l.P)(I,s.T.transitionStatus),j=(0,l.P)(I,s.T.inputInsidePopup),k=(0,l.P)(I,s.T.inputElement),V=(0,l.P)(I,s.T.modal),Q=(0,l.P)(I,s.T.id),D=(0,P.$B)(),q=y.id??(j?(0,h.xj)(Q):void 0);(0,o.g)(()=>(I.set("popupId",I.state.popupRef.current?.id||q),()=>{I.set("popupId",void 0)}),[I,q]),(0,p.v)({open:S,ref:I.state.popupRef,onComplete(){S&&I.state.onOpenChangeComplete(!0)}});let F={open:S,side:b.side,align:b.align,anchorHidden:b.anchorHidden,transitionStatus:A,empty:D},W=(0,a.o)("div",e,{state:F,ref:[t,I.state.popupRef],props:[M,{id:q,role:j?"dialog":"presentation",onFocus(e){let t=(0,v.EW)(e.nativeEvent);"touch"!==w&&((0,v.gR)(I.state.listElement,t)||t===e.currentTarget)&&I.state.inputRef.current?.focus()}},(0,g.d)(A),y],stateAttributesMapping:O}),$=!!j&&(e=>"touch"===e?I.state.popupRef.current:k),H=!j||V;return(0,x.jsx)(i.s,{context:E,disabled:!C,modal:H,openInteractionType:w,initialFocus:void 0===R?$:R,returnFocus:null!=T?T:!!j&&void 0,getInsideElements:()=>[I.state.startDismissRef.current,I.state.endDismissRef.current],children:(0,x.jsxs)(r.Fragment,{children:[W,H&&(0,x.jsx)(m.p,{ref:I.state.endDismissRef})]})})})},98770:(e,t,n)=>{n.d(t,{R:()=>m});var r=n(12115),l=n(14718),o=n(81456),i=n(64951),a=n(17947),u=n(51464),s=n(98339),d=n(39048),c=n(69938),p=n(7049),f=n(84052),v=n(76175),g=n(59236);let m=r.forwardRef(function(e,t){let{render:n,className:m,style:h,...P}=e,{setAnchor:x,actionsRef:O,internalBackdropRef:R,backdropRef:T,positionerRef:y,allowMouseUpTriggerRef:I,initialCursorPointRef:b,rootId:E}=(0,s.v)(!1),{store:C}=(0,d.Y)(!1),S=C.useState("open"),w=C.useState("disabled"),M=r.useRef(null),A=r.useRef(null),j=(0,i.Z)(),k=(0,i.Z)(),V=r.useRef(!1),Q=r.useRef(null);function D(e,t,n){let r=n.type.startsWith("touch");b.current={x:e,y:t},x({getBoundingClientRect:()=>DOMRect.fromRect({width:10*!!r,height:10*!!r,x:e,y:t})}),V.current=!1,O.current?.setOpen(!0,(0,p.d)(v.Ui,n)),k.start(500,()=>{V.current=!0})}function q(){j.clear(),A.current=null}return r.useEffect(()=>()=>{Q.current?.abort()},[]),r.useEffect(()=>{let e=(0,o.R)(M.current);return(0,l.q)(e,"contextmenu",function(e){if(w)return;let t=(0,u.EW)(e);((0,u.gR)(M.current,t)||(0,u.gR)(R.current,t)||(0,u.gR)(T.current,t))&&e.preventDefault()})},[T,w,R]),(0,c.o)("div",e,{state:{open:S},ref:[M,t],props:[{onContextMenu:function(e){if(w)return;I.current=!0,(0,a.jo)(e),D(e.clientX,e.clientY,e.nativeEvent);let t=(0,o.R)(M.current);Q.current?.abort();let n=new AbortController;Q.current=n,t.addEventListener("mouseup",e=>{if(I.current=!1,!V.current)return;k.clear(),V.current=!1;let t=(0,u.EW)(e);(0,u.gR)(y.current,t)||E&&t&&(0,g.Q)(t)===E||O.current?.setOpen(!1,(0,p.d)(v.LO,e))},{once:!0,signal:n.signal})},onTouchStart:function(e){if(w||(I.current=!1,1!==e.touches.length))return void q();e.stopPropagation();let t=e.touches[0],n={x:t.clientX,y:t.clientY};A.current=n,j.start(500,()=>{D(n.x,n.y,e.nativeEvent)})},onTouchMove:function(e){if(1!==e.touches.length)return void q();if(j.isStarted()&&A.current){let t=e.touches[0],n=Math.abs(t.clientX-A.current.x),r=Math.abs(t.clientY-A.current.y);(n>10||r>10)&&q()}},onTouchEnd:q,onTouchCancel:q,style:{WebkitTouchCallout:"none"}},P],stateAttributesMapping:f.jL})})},99447:(e,t,n)=>{n.d(t,{i:()=>u});var r=n(12115),l=n(34934),o=n(45594),i=n(34574),a=n(95155);let u=r.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return(0,o.s)().useState("mounted")||n?(0,a.jsx)(i.n.Provider,{value:n,children:(0,a.jsx)(l.XF,{ref:t,...r})}):null})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1715],{17491:(e,t,n)=>{n.d(t,{X:()=>d});var l=n(95155),r=n(40980),i=n(13267),o=n(89239),a=n(43262),s=n(36331),c=n(48861);function u({className:e}){let{connection:t}=(0,s.k)(),{back:n,forward:d,goBack:f,goForward:h}=(0,c.Q)(t.id);return(0,l.jsxs)("div",{className:(0,r.cn)("flex items-center",e),children:[(0,l.jsx)(o.$,{variant:"ghost",size:"icon-sm",disabled:!n,"aria-label":n?`Back to ${n.label}`:"Back",title:n?`Back to ${n.label} (${a.Ar.back})`:void 0,className:"disabled:opacity-30",onClick:f,children:(0,l.jsx)(i.SI1,{})}),(0,l.jsx)(o.$,{variant:"ghost",size:"icon-sm",disabled:!d,"aria-label":d?`Forward to ${d.label}`:"Forward",title:d?`Forward to ${d.label} (${a.Ar.forward})`:void 0,className:"disabled:opacity-30",onClick:h,children:(0,l.jsx)(i.nNJ,{})})]})}function d({children:e,className:t}){return(0,l.jsxs)("header",{className:(0,r.cn)("flex h-11 shrink-0 items-center gap-2 border-b pr-3 pl-1.5",t),children:[(0,l.jsx)(u,{className:"mr-0.5"}),e]})}},30374:(e,t,n)=>{n.d(t,{x:()=>i});var l=n(95155),r=n(40980);function i({value:e,options:t,onChange:n,label:o}){return(0,l.jsx)("div",{role:"group","aria-label":o,className:"flex h-7 items-center rounded-md border bg-muted/50 p-0.5",children:t.map(t=>(0,l.jsx)("button",{type:"button","aria-pressed":t.value===e,onClick:()=>n(t.value),className:(0,r.cn)("h-full rounded-sm px-2 text-xs transition-colors",t.value===e?"bg-background text-foreground shadow-xs":"text-muted-foreground hover:text-foreground"),children:t.label},t.value))})}},40891:(e,t,n)=>{n.d(t,{os:()=>y,iX:()=>v,mw:()=>b});var l=n(95155),r=n(12115),i=n(13267),o=n(89239),a=n(86846);let s=new Set(["add","all","alter","always","and","as","asc","authorization","between","by","cascade","case","cast","check","collate","column","concurrently","constraint","create","cross","current","default","deferrable","deferred","delete","desc","distinct","drop","else","end","except","exclude","exists","false","foreign","from","full","generated","grant","group","having","identity","if","ilike","immediate","in","include","index","inherits","inner","instead","intersect","into","is","join","key","lateral","left","like","limit","match","materialized","natural","no","not","null","nulls","of","offset","on","only","or","order","outer","over","partition","primary","references","replace","restrict","returning","right","select","server","set","stored","table","temp","temporary","then","time","to","trigger","true","union","unique","unlogged","update","using","values","view","when","where","window","with","without","zone"]);function c(e){let t=[],n=0;for(;n<e.length;){let l=e[n];if(!l)break;if(f(l)){let l=n;for(n+=1;n<e.length&&f(e[n]);)n+=1;t.push({kind:"text",value:e.slice(l,n)});continue}if("-"===l&&"-"===e[n+1]){let l=n;for(n+=2;n<e.length&&"\n"!==e[n];)n+=1;t.push({kind:"comment",value:e.slice(l,n)});continue}if("/"===l&&"*"===e[n+1]){let l=e.indexOf("*/",n+2),r=-1===l?e.length:l+2;t.push({kind:"comment",value:e.slice(n,r)}),n=r;continue}if("$"===l){let l=function(e,t){if("$"!==e[t])return null;let n=t+1;for(;n<e.length&&m(e[n]);)n+=1;return"$"!==e[n]?null:e.slice(t,n+1)}(e,n);if(l){let r=n+l.length,i=e.indexOf(l,r),o=-1===i?e.length:i+l.length;t.push({kind:"string",value:e.slice(n,o)}),n=o;continue}}if('"'===l){n=d(e,n,'"',"ident",t);continue}if("'"===l){n=d(e,n,"'","string",t);continue}if(h(l)||"."===l&&h(e[n+1])){let l=n;n=function(e,t){let n=t;for("."===e[n]&&(n+=1);n<e.length&&h(e[n]);)n+=1;if("."===e[n]&&h(e[n+1]))for(n+=1;n<e.length&&h(e[n]);)n+=1;if("e"===e[n]||"E"===e[n]){let t=n+1;if(("+"===e[t]||"-"===e[t])&&(t+=1),h(e[t]))for(n=t;n<e.length&&h(e[n]);)n+=1}return n}(e,n),t.push({kind:"number",value:e.slice(l,n)});continue}if(p(l)){let l=n;for(n+=1;n<e.length&&m(e[n]);)n+=1;let r=e.slice(l,n);t.push({kind:function(e,t,n){let l=t.toLowerCase();if(s.has(l))return"keyword";let r=n;for(;r<e.length&&(" "===e[r]||" "===e[r]);)r+=1;return"("===e[r]?"function":"ident"}(e,r,n),value:r});continue}t.push({kind:"text",value:l}),n+=1}return t}function u(e){let t=[[]];for(let n of e){let e=n.value.split("\n");for(let l=0;l<e.length;l+=1){l>0&&t.push([]);let r=e[l],i=t[t.length-1];r&&i&&i.push({kind:n.kind,value:r})}}return t}function d(e,t,n,l,r){let i=t+1;for(;i<e.length;){if(e[i]===n){if(e[i+1]===n){i+=2;continue}i+=1;break}i+=1}return r.push({kind:l,value:e.slice(t,i)}),i}function f(e){return" "===e||" "===e||"\n"===e||"\r"===e}function h(e){return void 0!==e&&e>="0"&&e<="9"}function p(e){return void 0!==e&&(e>="A"&&e<="Z"||e>="a"&&e<="z"||"_"===e)}function m(e){return p(e)||h(e)||"$"===e}var g=n(40980);function x({tokens:e}){return e.map((e,t)=>(0,l.jsx)("span",{className:function(e){switch(e){case"keyword":return"text-sky-700 dark:text-sky-400";case"function":return"text-violet-700 dark:text-fuchsia-400";case"ident":return"text-foreground";case"string":case"number":return"text-amber-700 dark:text-amber-300";case"comment":return"text-muted-foreground";case"text":return"text-foreground/80";default:return e}}(e.kind),children:e.value},t))}async function b(e){try{await navigator.clipboard.writeText(e);return}catch{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove()}}function y({sql:e,className:t}){let n=(0,r.useMemo)(()=>u(c(e.trimEnd())),[e]);return(0,l.jsx)("pre",{className:(0,g.cn)("overflow-x-auto font-mono text-[12px] leading-5 whitespace-pre",t),children:(0,l.jsx)("code",{children:n.map((e,t)=>(0,l.jsx)("div",{className:"min-h-5",children:(0,l.jsx)(x,{tokens:e})},t))})})}function v({sql:e,error:t,loading:n,actions:s}){let[d,f]=(0,r.useState)(!1),h=(0,r.useMemo)(()=>e?u(c(e.trimEnd())):[],[e]);if(t)return(0,l.jsx)("p",{className:"flex-1 px-4 py-6 font-mono text-xs text-destructive",children:t});if(!e||n&&0===h.length)return(0,l.jsx)("div",{className:"flex flex-col gap-2 p-4",children:Array.from({length:16},(e,t)=>(0,l.jsx)(a.E,{className:"h-4 w-full"},t))});async function p(){e&&(await b(e),f(!0),window.setTimeout(()=>f(!1),1500))}let m=`${Math.max(String(h.length).length,2)+1}ch`;return(0,l.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col","data-sql-source":"",children:[(0,l.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2 px-3 py-1",children:[s,(0,l.jsxs)(o.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>void p(),children:[d?(0,l.jsx)(i.wiW,{"data-icon":"inline-start"}):(0,l.jsx)(i.hX7,{"data-icon":"inline-start"}),d?"Copied":"Copy SQL"]})]}),(0,l.jsx)("div",{className:(0,g.cn)("min-h-0 flex-1 overflow-auto",n&&"opacity-60"),children:(0,l.jsx)("pre",{className:"min-w-max px-4 pb-4 font-mono text-[13px] leading-6",children:h.map((e,t)=>(0,l.jsxs)("div",{className:"flex min-h-6",children:[(0,l.jsx)("span",{className:"sticky left-0 shrink-0 bg-background pr-4 text-right text-muted-foreground/45 select-none",style:{width:m},children:t+1}),(0,l.jsx)("code",{className:"pr-8 whitespace-pre",children:(0,l.jsx)(x,{tokens:e})})]},t))})})]})}},74590:(e,t,n)=>{n.d(t,{DE:()=>v,gz:()=>C,jn:()=>k,lz:()=>y,mQ:()=>w,y3:()=>N});var l=n(1934),r=n(31692),i=n(95848),o=n(40980),a=n(69586),s=n(63307);let c="ytdb:explorer";(0,s.q)("db-studio:explorer",c);let u={search:"",selectedSchemas:null,collapsedSchemas:[],pinnedTables:[],recentTables:[],sidebarWidth:256,sidebarCollapsed:!1},d={filters:[],search:"",sort:null,columnWidths:{},hiddenColumns:[],page:0,pageSize:50},f=["selectedSchemas","collapsedSchemas","pinnedTables"],h=["search","recentTables","sidebarWidth","sidebarCollapsed"],p=["columnWidths","hiddenColumns","pinnedColumns","pageSize"],m=["filters","search","sort","page"];function g(e,t){return`${e}:${(0,i.i)(t)}`}function x(e){let t=a.Z.getState().connections.find(t=>t.id===e);return t?.layoutGroup??e}function b(e,t){let n={};for(let l of t)Object.prototype.hasOwnProperty.call(e,l)&&(n[l]=e[l]);return n}let y=(0,l.v)()((0,r.Zr)(e=>({browse:{},tables:{},compareTargets:{},setBrowse:(t,n)=>e(e=>{let l=x(t),r=b(n,f),i=b(n,h),o={...e.browse};return l===t?o[t]={...o[t]??u,...r,...i}:(Object.keys(r).length>0&&(o[l]={...o[l]??u,...r}),Object.keys(i).length>0&&(o[t]={...o[t]??u,...i})),{browse:o}}),setTable:(t,n,l)=>e(e=>{let r=g(x(t),n),i=g(t,n),o=b(l,p),a=b(l,m),s={...e.tables};return r===i?s[i]={...s[i]??d,...o,...a}:(Object.keys(o).length>0&&(s[r]={...s[r]??d,...o}),Object.keys(a).length>0&&(s[i]={...s[i]??d,...a})),{tables:s}}),setCompareTarget:(t,n)=>e(e=>({compareTargets:{...e.compareTargets,[t]:n}})),copyLayout:(t,n)=>e(e=>{if(t===n)return e;let l={...e.browse},r=l[t];r&&(l[n]={...l[n]??u,...b(r,f)});let i={...e.tables},o=`${t}:`;for(let[t,l]of Object.entries(e.tables)){if(!t.startsWith(o))continue;let e=`${n}:${t.slice(o.length)}`;i[e]={...i[e]??d,...b(l,p)}}return{browse:l,tables:i}})}),{name:c}));function v(e){let t,n=(0,a.Z)(t=>t.connections.find(t=>t.id===e)?.layoutGroup??e),l=y(t=>n===e?void 0:t.browse[n]),r=y(t=>t.browse[e]),i=y(e=>e.setBrowse);return[(t=r&&"selectedSchemas"in r?r.selectedSchemas??null:r?.schema?[r.schema]:null,{...u,...r,selectedSchemas:t,...l?{selectedSchemas:l.selectedSchemas,collapsedSchemas:l.collapsedSchemas,pinnedTables:l.pinnedTables}:{}}),t=>i(e,t)]}function k(e,t){let n=(0,a.Z)(t=>t.connections.find(t=>t.id===e)?.layoutGroup??e),l=y(l=>n===e?void 0:l.tables[g(n,t)]),r=y(n=>n.tables[g(e,t)]),i=y(e=>e.setTable);return[{...d,...r,search:r?.search??d.search,hiddenColumns:r?.hiddenColumns??d.hiddenColumns,...l?{columnWidths:l.columnWidths,hiddenColumns:l.hiddenColumns,pinnedColumns:l.pinnedColumns,pageSize:l.pageSize}:{}},n=>i(e,t,n)]}function w(e,t){let n=[...new Set([e,...t])],{connections:l,update:r}=a.Z.getState(),i=y.getState(),s=l.find(t=>t.id===e);if(!s)return;let c=new Map;for(let e of l){if(!e.layoutGroup)continue;let t=c.get(e.layoutGroup)??[];t.push(e.id),c.set(e.layoutGroup,t)}let u=s.layoutGroup,d=u?c.get(u)??[e]:[e],f=d.filter(e=>!n.includes(e));for(let t of f)i.copyLayout(u??e,t),r(t,{layoutGroup:void 0});if(u){let t=d.filter(t=>!f.includes(t)&&t!==e);if(1===t.length){let e=t[0];e&&(i.copyLayout(u,e),r(e,{layoutGroup:void 0}))}}if(n.length<=1){u&&(i.copyLayout(u,e),r(e,{layoutGroup:void 0}));return}let h=u??(0,o.z)();for(let t of(u||i.copyLayout(e,h),n)){let e=l.find(e=>e.id===t);if(e){if(e.layoutGroup&&e.layoutGroup!==h){let l=e.layoutGroup,o=(c.get(l)??[]).filter(e=>e!==t&&!n.includes(e));if(1===o.length){let e=o[0];e&&(i.copyLayout(l,e),r(e,{layoutGroup:void 0}))}else o.length}r(t,{layoutGroup:h})}}}let j=[];function C(e){let t=(0,a.Z)(e=>e.connections),n=(0,a.Z)(t=>t.connections.find(t=>t.id===e)?.layoutGroup);return n?t.filter(t=>t.layoutGroup===n&&t.id!==e):j}function N(e){let t=(0,a.Z)(e=>e.connections),n=y(t=>t.compareTargets[e]),l=y(e=>e.setCompareTarget),r=(0,a.Z)(t=>t.connections.find(t=>t.id===e)?.layoutGroup),i=t.filter(t=>t.id!==e),o=r?i.filter(e=>e.layoutGroup===r):[];return{target:i.find(e=>e.id===n)??o[0]??i[0]??null,candidates:i,partnerIds:o.map(e=>e.id),setTarget:t=>l(e,t)}}},86846:(e,t,n)=>{n.d(t,{E:()=>i});var l=n(95155),r=n(40980);function i({className:e,...t}){return(0,l.jsx)("div",{"data-slot":"skeleton",className:(0,r.cn)("animate-pulse rounded-md bg-muted",e),...t})}},95848:(e,t,n)=>{n.d(t,{i:()=>l});function l(e){return`${e.schema}.${e.name}`}}}]);