khoj 2.0.0b7.dev6__py3-none-any.whl → 2.0.0b8.dev1__py3-none-any.whl

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 (47) hide show
  1. khoj/interface/compiled/404/index.html +2 -2
  2. khoj/interface/compiled/_next/static/chunks/{2327-ea623ca2d22f78e9.js → 2327-d863b0b21ecb23de.js} +1 -1
  3. khoj/interface/compiled/_next/static/chunks/{5639-09e2009a2adedf8b.js → 5639-0c4604668cb2d4c0.js} +1 -1
  4. khoj/interface/compiled/_next/static/chunks/app/agents/layout-e00fb81dca656a10.js +1 -0
  5. khoj/interface/compiled/_next/static/chunks/app/agents/{page-9a4610474cd59a71.js → page-5db6ad18da10d353.js} +1 -1
  6. khoj/interface/compiled/_next/static/chunks/app/automations/{page-f7bb9d777b7745d4.js → page-6271e2e31c7571d1.js} +1 -1
  7. khoj/interface/compiled/_next/static/chunks/app/chat/layout-33934fc2d6ae6838.js +1 -0
  8. khoj/interface/compiled/_next/static/chunks/app/chat/page-b186e95387e23ed5.js +1 -0
  9. khoj/interface/compiled/_next/static/chunks/app/{page-2025944ec1f80144.js → page-a19a597629e87fb8.js} +1 -1
  10. khoj/interface/compiled/_next/static/chunks/app/search/layout-f5881c7ae3ba0795.js +1 -0
  11. khoj/interface/compiled/_next/static/chunks/app/search/{page-4885df3cd175c957.js → page-fa366ac14b228688.js} +1 -1
  12. khoj/interface/compiled/_next/static/chunks/app/settings/{page-8be3b35178abf2ec.js → page-8f9a85f96088c18b.js} +1 -1
  13. khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-abb6c5f4239ad7be.js +1 -0
  14. khoj/interface/compiled/_next/static/chunks/app/share/chat/{page-ee8ef5270163e7f2.js → page-ed7787cf4938b8e3.js} +1 -1
  15. khoj/interface/compiled/_next/static/chunks/{webpack-dfdf45b316b8f302.js → webpack-c6e14fd89812b96f.js} +1 -1
  16. khoj/interface/compiled/_next/static/css/76c658ee459140a9.css +1 -0
  17. khoj/interface/compiled/_next/static/css/{821d0d60b0b6871d.css → 93eeacc43e261162.css} +1 -1
  18. khoj/interface/compiled/_next/static/css/a0c2fd63bb396f04.css +1 -0
  19. khoj/interface/compiled/agents/index.html +2 -2
  20. khoj/interface/compiled/agents/index.txt +2 -2
  21. khoj/interface/compiled/automations/index.html +2 -2
  22. khoj/interface/compiled/automations/index.txt +2 -2
  23. khoj/interface/compiled/chat/index.html +2 -2
  24. khoj/interface/compiled/chat/index.txt +2 -2
  25. khoj/interface/compiled/index.html +2 -2
  26. khoj/interface/compiled/index.txt +2 -2
  27. khoj/interface/compiled/search/index.html +2 -2
  28. khoj/interface/compiled/search/index.txt +2 -2
  29. khoj/interface/compiled/settings/index.html +2 -2
  30. khoj/interface/compiled/settings/index.txt +2 -2
  31. khoj/interface/compiled/share/chat/index.html +2 -2
  32. khoj/interface/compiled/share/chat/index.txt +2 -2
  33. khoj/utils/initialization.py +2 -0
  34. {khoj-2.0.0b7.dev6.dist-info → khoj-2.0.0b8.dev1.dist-info}/METADATA +1 -1
  35. {khoj-2.0.0b7.dev6.dist-info → khoj-2.0.0b8.dev1.dist-info}/RECORD +40 -40
  36. khoj/interface/compiled/_next/static/chunks/app/agents/layout-1b6273baddb72146.js +0 -1
  37. khoj/interface/compiled/_next/static/chunks/app/chat/layout-ad4d1792ab1a4108.js +0 -1
  38. khoj/interface/compiled/_next/static/chunks/app/chat/page-2f7981f8fe4417ae.js +0 -1
  39. khoj/interface/compiled/_next/static/chunks/app/search/layout-4505b79deb734a30.js +0 -1
  40. khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-e8e5db7830bf3f47.js +0 -1
  41. khoj/interface/compiled/_next/static/css/102b97d6472fdd3a.css +0 -1
  42. khoj/interface/compiled/_next/static/css/fc82e43baa9ae218.css +0 -1
  43. /khoj/interface/compiled/_next/static/{oanfXAlH68Srs4AAXYaTS → ZHB1va0KhWIu8Zs8-kbgt}/_buildManifest.js +0 -0
  44. /khoj/interface/compiled/_next/static/{oanfXAlH68Srs4AAXYaTS → ZHB1va0KhWIu8Zs8-kbgt}/_ssgManifest.js +0 -0
  45. {khoj-2.0.0b7.dev6.dist-info → khoj-2.0.0b8.dev1.dist-info}/WHEEL +0 -0
  46. {khoj-2.0.0b7.dev6.dist-info → khoj-2.0.0b8.dev1.dist-info}/entry_points.txt +0 -0
  47. {khoj-2.0.0b7.dev6.dist-info → khoj-2.0.0b8.dev1.dist-info}/licenses/LICENSE +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2797],{94114:function(e,a,l){Promise.resolve().then(l.bind(l,76321))},76321:function(e,a,l){"use strict";l.r(a),l.d(a,{default:function(){return ed}});var t=l(57437),s=l(95186),n=l(2265),r=l(41816),i=l.n(r),c=l(19378),d=l(66070),o=l(3467),m=l(73278),h=l(4992);let u=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H156.69a19.86,19.86,0,0,0,14.14-5.86l51.31-51.31A19.86,19.86,0,0,0,228,156.69V48A20,20,0,0,0,208,28ZM52,52H204v92H156a12,12,0,0,0-12,12v48H52ZM168,191V168h23Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,160l-56,56V160Z",opacity:"0.2"}),n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H156.69A15.86,15.86,0,0,0,168,219.31L219.31,168A15.86,15.86,0,0,0,224,156.69V48A16,16,0,0,0,208,32ZM48,48H208V152H160a8,8,0,0,0-8,8v48H48ZM196.69,168,168,196.69V168Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H156.69A15.86,15.86,0,0,0,168,219.31L219.31,168A15.86,15.86,0,0,0,224,156.69V48A16,16,0,0,0,208,32ZM160,204.69V160h44.69Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H156.69a13.94,13.94,0,0,0,9.9-4.1l51.31-51.31a13.94,13.94,0,0,0,4.1-9.9V48A14,14,0,0,0,208,34ZM46,208V48a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2V154H160a6,6,0,0,0-6,6v50H48A2,2,0,0,1,46,208Zm120-6.49V166h35.52Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H156.69A15.86,15.86,0,0,0,168,219.31L219.31,168A15.86,15.86,0,0,0,224,156.69V48A16,16,0,0,0,208,32ZM48,48H208V152H160a8,8,0,0,0-8,8v48H48ZM196.69,168,168,196.69V168Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H156.69a11.93,11.93,0,0,0,8.48-3.51l51.32-51.32a11.93,11.93,0,0,0,3.51-8.48V48A12,12,0,0,0,208,36ZM44,208V48a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4V156H160a4,4,0,0,0-4,4v52H48A4,4,0,0,1,44,208Zm120-1.66V164h42.35Z"}))]]),x=n.forwardRef((e,a)=>n.createElement(h.Z,{ref:a,...e,weights:u}));x.displayName="NoteBlankIcon";var f=l(25778),p=l(86723),j=l(96620),g=l(4235);let v=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M87.5,151.52l64-64a12,12,0,0,1,17,17l-64,64a12,12,0,0,1-17-17Zm131-114a60.08,60.08,0,0,0-84.87,0L103.51,67.61a12,12,0,0,0,17,17l30.07-30.06a36,36,0,0,1,50.93,50.92L171.4,135.52a12,12,0,1,0,17,17l30.08-30.06A60.09,60.09,0,0,0,218.45,37.55ZM135.52,171.4l-30.07,30.08a36,36,0,0,1-50.92-50.93l30.06-30.07a12,12,0,0,0-17-17L37.55,133.58a60,60,0,0,0,84.88,84.87l30.06-30.07a12,12,0,0,0-17-17Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M209.94,113.94l-96,96a48,48,0,0,1-67.88-67.88l96-96a48,48,0,0,1,67.88,67.88Z",opacity:"0.2"}),n.createElement("path",{d:"M165.66,90.34a8,8,0,0,1,0,11.32l-64,64a8,8,0,0,1-11.32-11.32l64-64A8,8,0,0,1,165.66,90.34ZM215.6,40.4a56,56,0,0,0-79.2,0L106.34,70.45a8,8,0,0,0,11.32,11.32l30.06-30a40,40,0,0,1,56.57,56.56l-30.07,30.06a8,8,0,0,0,11.31,11.32L215.6,119.6a56,56,0,0,0,0-79.2ZM138.34,174.22l-30.06,30.06a40,40,0,1,1-56.56-56.57l30.05-30.05a8,8,0,0,0-11.32-11.32L40.4,136.4a56,56,0,0,0,79.2,79.2l30.06-30.07a8,8,0,0,0-11.32-11.31Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM144.56,173.66l-21.45,21.45a44,44,0,0,1-62.22-62.22l21.45-21.46a8,8,0,0,1,11.32,11.31L72.2,144.2a28,28,0,0,0,39.6,39.6l21.45-21.46a8,8,0,0,1,11.31,11.32Zm-34.9-16a8,8,0,0,1-11.32-11.32l48-48a8,8,0,0,1,11.32,11.32Zm85.45-34.55-21.45,21.45a8,8,0,0,1-11.32-11.31L183.8,111.8a28,28,0,0,0-39.6-39.6L122.74,93.66a8,8,0,0,1-11.31-11.32l21.46-21.45a44,44,0,0,1,62.22,62.22Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M164.25,91.75a6,6,0,0,1,0,8.49l-64,64a6,6,0,0,1-8.49-8.48l64-64A6,6,0,0,1,164.25,91.75ZM214.2,41.8a54.07,54.07,0,0,0-76.38,0L107.75,71.85a6,6,0,0,0,8.49,8.49l30.07-30.06a42,42,0,0,1,59.41,59.41l-30.08,30.07a6,6,0,1,0,8.49,8.49l30.07-30.07A54,54,0,0,0,214.2,41.8ZM139.76,175.64l-30.07,30.08a42,42,0,0,1-59.41-59.41l30.06-30.07a6,6,0,0,0-8.49-8.49l-30,30.07a54,54,0,0,0,76.38,76.39l30.07-30.08a6,6,0,0,0-8.49-8.49Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M165.66,90.34a8,8,0,0,1,0,11.32l-64,64a8,8,0,0,1-11.32-11.32l64-64A8,8,0,0,1,165.66,90.34ZM215.6,40.4a56,56,0,0,0-79.2,0L106.34,70.45a8,8,0,0,0,11.32,11.32l30.06-30a40,40,0,0,1,56.57,56.56l-30.07,30.06a8,8,0,0,0,11.31,11.32L215.6,119.6a56,56,0,0,0,0-79.2ZM138.34,174.22l-30.06,30.06a40,40,0,1,1-56.56-56.57l30.05-30.05a8,8,0,0,0-11.32-11.32L40.4,136.4a56,56,0,0,0,79.2,79.2l30.06-30.07a8,8,0,0,0-11.32-11.31Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M162.84,93.16a4,4,0,0,1,0,5.66l-64,64a4,4,0,0,1-5.66-5.66l64-64A4,4,0,0,1,162.84,93.16Zm49.95-49.95a52.07,52.07,0,0,0-73.56,0L109.17,73.27a4,4,0,0,0,5.65,5.66l30.07-30.06a44,44,0,0,1,62.24,62.24l-30.07,30.06a4,4,0,0,0,5.66,5.66l30.07-30.06A52.07,52.07,0,0,0,212.79,43.21ZM141.17,177.06l-30.06,30.07a44,44,0,0,1-62.24-62.24l30.06-30.06a4,4,0,0,0-5.66-5.66L43.21,139.23a52,52,0,0,0,73.56,73.56l30.06-30.07a4,4,0,1,0-5.66-5.66Z"}))]]),N=n.forwardRef((e,a)=>n.createElement(h.Z,{ref:a,...e,weights:v}));N.displayName="LinkSimpleIcon";var A=l(49807),Z=l(795),w=l(82033),E=l(2335);let y=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M234.29,47.91A20,20,0,0,0,216,36H40A20,20,0,0,0,25.2,69.45l.12.14L92,140.75V216a20,20,0,0,0,31.1,16.64l32-21.33A20,20,0,0,0,164,194.66V140.75l66.67-71.16.12-.14A20,20,0,0,0,234.29,47.91Zm-91,79.89A12,12,0,0,0,140,136v56.52l-24,16V136a12,12,0,0,0-3.25-8.2L49.23,60H206.77Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M221.9,61.38,152,136v58.65a8,8,0,0,1-3.56,6.66l-32,21.33A8,8,0,0,1,104,216V136L34.1,61.38A8,8,0,0,1,40,48H216A8,8,0,0,1,221.9,61.38Z",opacity:"0.2"}),n.createElement("path",{d:"M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M227.81,66.76l-.08.09L160,139.17v55.49A16,16,0,0,1,152.87,208l-32,21.34A16,16,0,0,1,96,216V139.17L28.27,66.85l-.08-.09A16,16,0,0,1,40,40H216a16,16,0,0,1,11.84,26.76Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228.77,50.34A13.8,13.8,0,0,0,216,42H40A14,14,0,0,0,29.67,65.42l.06.07L98,138.38V216a14,14,0,0,0,21.77,11.64l32-21.33A14,14,0,0,0,158,194.66V138.38l68.33-73A13.82,13.82,0,0,0,228.77,50.34Zm-11.26,6.94L147.62,131.9A6,6,0,0,0,146,136v58.66a2,2,0,0,1-.89,1.67l-32,21.33A2,2,0,0,1,110,216V136a6,6,0,0,0-1.62-4.1L38.53,57.32A2,2,0,0,1,40,54H216a1.9,1.9,0,0,1,1.83,1.19A1.86,1.86,0,0,1,217.51,57.28Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M227,51.15A11.85,11.85,0,0,0,216,44H40a12,12,0,0,0-8.88,20.07l.05.05L100,137.59V216a12,12,0,0,0,18.66,10l32-21.33a12,12,0,0,0,5.35-10V137.59l68.86-73.52A11.85,11.85,0,0,0,227,51.15Zm-8,7.5-69.9,74.62A4,4,0,0,0,148,136v58.65a4,4,0,0,1-1.78,3.33l-32,21.33A4,4,0,0,1,108,216V136a4,4,0,0,0-1.08-2.74L37.05,58.67A4,4,0,0,1,40,52H216a4,4,0,0,1,3,6.65Z"}))]]),V=n.forwardRef((e,a)=>n.createElement(h.Z,{ref:a,...e,weights:y}));V.displayName="FunnelIcon";var M=l(24148),b=l(80382),H=l(97159);let S=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M84,224a12,12,0,0,1-12,12H56a20,20,0,0,1-20-20V184a12,12,0,0,1,24,0v28H72A12,12,0,0,1,84,224ZM220,88v48a12,12,0,0,1-24,0V104H148a12,12,0,0,1-12-12V44H120a12,12,0,0,1,0-24h32a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88Zm-60-8h23L160,57ZM80,20H56A20,20,0,0,0,36,40V64a12,12,0,0,0,24,0V44H80a12,12,0,0,0,0-24ZM208,164a12,12,0,0,0-12,12v36h-4a12,12,0,0,0,0,24h8a20,20,0,0,0,20-20V176A12,12,0,0,0,208,164ZM48,156a12,12,0,0,0,12-12V104a12,12,0,0,0-24,0v40A12,12,0,0,0,48,156Zm104,56H112a12,12,0,0,0,0,24h40a12,12,0,0,0,0-24Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),n.createElement("path",{d:"M80,224a8,8,0,0,1-8,8H56a16,16,0,0,1-16-16V184a8,8,0,0,1,16,0v32H72A8,8,0,0,1,80,224ZM216,88v48a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H120a8,8,0,0,1,0-16h32a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31ZM80,24H56A16,16,0,0,0,40,40V64a8,8,0,0,0,16,0V40H80a8,8,0,0,0,0-16ZM208,168a8,8,0,0,0-8,8v40h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V176A8,8,0,0,0,208,168ZM48,152a8,8,0,0,0,8-8V104a8,8,0,0,0-16,0v40A8,8,0,0,0,48,152Zm104,64H112a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M80,224a8,8,0,0,1-8,8H56a16,16,0,0,1-16-16V184a8,8,0,0,1,16,0v32H72A8,8,0,0,1,80,224ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H120a8,8,0,0,0,0,16h24V88a8,8,0,0,0,8,8h48v40a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM80,24H56A16,16,0,0,0,40,40V64a8,8,0,0,0,16,0V40H80a8,8,0,0,0,0-16ZM208,168a8,8,0,0,0-8,8v40h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V176A8,8,0,0,0,208,168ZM48,152a8,8,0,0,0,8-8V104a8,8,0,0,0-16,0v40A8,8,0,0,0,48,152Zm104,64H112a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M78,224a6,6,0,0,1-6,6H56a14,14,0,0,1-14-14V184a6,6,0,0,1,12,0v32a2,2,0,0,0,2,2H72A6,6,0,0,1,78,224ZM214,88v48a6,6,0,0,1-12,0V94H152a6,6,0,0,1-6-6V38H120a6,6,0,0,1,0-12h32a6,6,0,0,1,4.24,1.76l56,56A6,6,0,0,1,214,88Zm-56-6h35.51L158,46.49ZM80,26H56A14,14,0,0,0,42,40V64a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2H80a6,6,0,0,0,0-12ZM208,170a6,6,0,0,0-6,6v40a2,2,0,0,1-2,2h-8a6,6,0,0,0,0,12h8a14,14,0,0,0,14-14V176A6,6,0,0,0,208,170ZM48,150a6,6,0,0,0,6-6V104a6,6,0,0,0-12,0v40A6,6,0,0,0,48,150Zm104,68H112a6,6,0,0,0,0,12h40a6,6,0,0,0,0-12Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M80,224a8,8,0,0,1-8,8H56a16,16,0,0,1-16-16V184a8,8,0,0,1,16,0v32H72A8,8,0,0,1,80,224ZM216,88v48a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H120a8,8,0,0,1,0-16h32a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31ZM80,24H56A16,16,0,0,0,40,40V64a8,8,0,0,0,16,0V40H80a8,8,0,0,0,0-16ZM208,168a8,8,0,0,0-8,8v40h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V176A8,8,0,0,0,208,168ZM48,152a8,8,0,0,0,8-8V104a8,8,0,0,0-16,0v40A8,8,0,0,0,48,152Zm104,64H112a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M76,224a4,4,0,0,1-4,4H56a12,12,0,0,1-12-12V184a4,4,0,0,1,8,0v32a4,4,0,0,0,4,4H72A4,4,0,0,1,76,224ZM212,88v48a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H120a4,4,0,0,1,0-8h32a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-56-4h42.34L156,41.66ZM80,28H56A12,12,0,0,0,44,40V64a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4H80a4,4,0,0,0,0-8ZM208,172a4,4,0,0,0-4,4v40a4,4,0,0,1-4,4h-8a4,4,0,0,0,0,8h8a12,12,0,0,0,12-12V176A4,4,0,0,0,208,172ZM48,148a4,4,0,0,0,4-4V104a4,4,0,0,0-8,0v40A4,4,0,0,0,48,148Zm104,72H112a4,4,0,0,0,0,8h40a4,4,0,0,0,0-8Z"}))]]),L=n.forwardRef((e,a)=>n.createElement(h.Z,{ref:a,...e,weights:S}));L.displayName="FileDashedIcon";var F=l(62869),k=l(27648),T=l(7436),C=l(60729),_=l(34124),D=l(6512),I=l(37104),O=l(14308),R=l(26110),z=l(77992),P=l(84190),W=l(79205);let U=(0,W.Z)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var Y=l(10407);let B=(0,W.Z)("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);var K=l(94508);let G=e=>{let{className:a,...l}=e;return(0,t.jsx)("nav",{role:"navigation","aria-label":"pagination",className:(0,K.cn)("mx-auto flex w-full justify-center",a),...l})};G.displayName="Pagination";let X=n.forwardRef((e,a)=>{let{className:l,...s}=e;return(0,t.jsx)("ul",{ref:a,className:(0,K.cn)("flex flex-row items-center gap-1",l),...s})});X.displayName="PaginationContent";let $=n.forwardRef((e,a)=>{let{className:l,...s}=e;return(0,t.jsx)("li",{ref:a,className:(0,K.cn)("",l),...s})});$.displayName="PaginationItem";let q=e=>{let{className:a,isActive:l,size:s="icon",...n}=e;return(0,t.jsx)("a",{"aria-current":l?"page":void 0,className:(0,K.cn)((0,F.d)({variant:l?"outline":"ghost",size:s}),"no-underline",a),...n})};q.displayName="PaginationLink";let J=e=>{let{className:a,...l}=e;return(0,t.jsxs)(q,{"aria-label":"Go to previous page",size:"default",className:(0,K.cn)("gap-1 pl-2.5",a),...l,children:[(0,t.jsx)(U,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"Previous"})]})};J.displayName="PaginationPrevious";let Q=e=>{let{className:a,...l}=e;return(0,t.jsxs)(q,{"aria-label":"Go to next page",size:"default",className:(0,K.cn)("gap-1 pr-2.5",a),...l,children:[(0,t.jsx)("span",{children:"Next"}),(0,t.jsx)(Y.Z,{className:"h-4 w-4"})]})};Q.displayName="PaginationNext";let ee=e=>{let{className:a,...l}=e;return(0,t.jsxs)("span",{"aria-hidden":!0,className:(0,K.cn)("flex h-9 w-9 items-center justify-center",a),...l,children:[(0,t.jsx)(B,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"More pages"})]})};ee.displayName="PaginationEllipsis";var ea=l(23518),el=l(57054),et=l(59199),es=l(32759);function en(e){let{file:a,setSelectedFile:l,setSelectedFileFullText:s,handleDownload:n,handleDelete:r,isDeleting:i,selectedFileFullText:o}=e;return(0,t.jsxs)(d.Zb,{className:"animate-fade-in-up bg-secondary h-52",children:[(0,t.jsx)(d.Ol,{className:"p-2",children:(0,t.jsxs)(d.ll,{className:"flex items-center gap-2 justify-between",title:a.file_name,children:[(0,t.jsxs)(R.Vq,{children:[(0,t.jsx)(R.hg,{asChild:!0,children:(0,t.jsx)("div",{className:"text-sm font-medium truncate hover:text-clip hover:whitespace-normal cursor-pointer",onClick:()=>{s(""),l(a.file_name)},children:a.file_name.split("/").pop()})}),(0,t.jsxs)(R.cZ,{className:"max-w-fit",children:[(0,t.jsx)(R.fK,{children:(0,t.jsx)(R.$N,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[a.file_name.split("/").pop(),(0,t.jsx)(F.z,{variant:"ghost",title:"Download as plaintext",onClick:()=>n(a.file_name,a.raw_text),children:(0,t.jsx)(f.U,{className:"h-4 w-4"})})]})})}),(0,t.jsx)(c.x,{className:"h-[50vh] w-[80vw]",children:(0,t.jsxs)("p",{className:"whitespace-pre-wrap break-words text-sm font-normal word-wrap",children:[!o&&(0,t.jsx)(O.l,{className:"mt-4",message:"Loading",iconClassName:"h-5 w-5"}),o]})})]})]}),(0,t.jsxs)(P.h_,{children:[(0,t.jsx)(P.$F,{children:(0,t.jsx)(F.z,{variant:"ghost",children:(0,t.jsx)(p.F,{className:"h-4 w-4"})})}),(0,t.jsx)(P.AW,{className:"flex flex-col gap-0 w-fit",children:(0,t.jsx)(P.Xi,{className:"p-0",children:(0,t.jsxs)(F.z,{variant:"ghost",className:"flex items-center gap-2 p-1 text-sm",onClick:()=>{r(a.file_name)},children:[(0,t.jsx)(j.r,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"text-xs",children:i?"Deleting...":"Delete"})]})})})]})]})}),(0,t.jsx)(d.aY,{className:"p-2",children:(0,t.jsx)(c.x,{className:"h-24 bg-background rounded-lg",children:(0,t.jsxs)("p",{className:"whitespace-pre-wrap break-words text-sm font-normal text-muted-foreground p-2 h-full",children:[a.raw_text.slice(0,100),"..."]})})}),(0,t.jsx)(d.eW,{className:"flex justify-end gap-2 p-2",children:(0,t.jsx)("div",{className:"text-muted-foreground text-xs",children:(0,T.o0)(a.updated_at)})})]})}function er(e){var a;let l=e.note,s=(l.additional.file||"").startsWith("http"),n=s?l.additional.heading:l.additional.file.split("/").pop();return(0,t.jsxs)(d.Zb,{className:"bg-secondary h-full shadow-sm rounded-lg border border-muted mb-4 animate-fade-in-up",children:[(0,t.jsx)(d.Ol,{children:(0,t.jsxs)(d.ll,{className:"inline-flex gap-2",children:["notion"===(a=l.additional.source)?(0,t.jsx)(o.F,{className:"text-muted-foreground"}):"github"===a?(0,t.jsx)(m.b,{className:"text-muted-foreground"}):(0,t.jsx)(x,{className:"text-muted-foreground"}),n]})}),(0,t.jsxs)(d.aY,{children:[(0,t.jsx)("div",{className:"line-clamp-4 text-muted-foreground",children:l.entry}),(0,t.jsxs)(F.z,{onClick:()=>e.setFocusSearchResult(l),variant:"ghost",className:"p-0 mt-2 text-orange-400 hover:bg-inherit",children:["See content",(0,t.jsx)(g.o,{className:"inline ml-2"})]})]}),s&&(0,t.jsx)(d.eW,{children:(0,t.jsxs)("a",{href:l.additional.file,target:"_blank",className:"underline text-sm bg-muted p-1 rounded-lg text-muted-foreground",children:[(0,t.jsx)(N,{className:"inline m-2"}),l.additional.file]})})]})}let ei=e=>{let{setUploadedFiles:a}=e,[l,s]=(0,n.useState)(!1),[r,i]=(0,n.useState)(null),[c,d]=(0,n.useState)(null),[o,m]=(0,n.useState)(!1),[h,u]=(0,n.useState)(0),x=(0,n.useRef)(null);function f(e){(0,et.ko)(e,i,m,d,a)}return(0,n.useEffect)(()=>{if(!o&&(u(0),!r&&!c)){let e=new KeyboardEvent("keydown",{key:"Escape"});document.dispatchEvent(e)}if(o){let e=setInterval(()=>{u(e=>{let a=e+(Math.floor(5*Math.random())+1);return a<100?a:100})},800);return()=>clearInterval(e)}},[o]),(0,t.jsxs)(R.Vq,{children:[(0,t.jsx)(R.hg,{asChild:!0,children:(0,t.jsxs)(F.z,{variant:"secondary",className:"mt-4",children:[(0,t.jsx)(A.a,{className:"h-4 w-4 mr-2"}),"Add Documents"]})}),(0,t.jsxs)(R.cZ,{children:[(0,t.jsxs)(R.fK,{children:[(0,t.jsx)(R.$N,{children:"Build Your Knowledge Base"}),(0,t.jsx)(R.Be,{children:"Add context for your Khoj knowledge base. Quickly search and get personalized answers from your documents."})]}),(0,t.jsxs)("div",{className:"flex flex-col h-full",onDragOver:function(e){e.preventDefault(),s(!0)},onDragLeave:function(e){e.preventDefault(),s(!1)},onDrop:function(e){e.preventDefault(),s(!1),e.dataTransfer.files&&f(e.dataTransfer.files)},onClick:function(){x&&x.current&&x.current.click()},children:[(0,t.jsx)("input",{type:"file",multiple:!0,ref:x,style:{display:"none"},onChange:function(e){e.target.files&&f(e.target.files)}}),(0,t.jsx)("div",{className:"flex-none p-4",children:o&&(0,t.jsx)(es.E,{indicatorColor:"bg-slate-500",className:"w-full h-2 rounded-full",value:h})}),r&&(0,t.jsxs)("div",{className:"flex-none p-4 border-b rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(Z.v,{className:"h-6 w-6"}),(0,t.jsx)("span",{children:r})]}),(0,t.jsx)(F.z,{onClick:()=>i(null),className:"mt-2",variant:"ghost",children:"Dismiss"})]}),c&&(0,t.jsxs)("div",{className:"flex-none p-4 border-b rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(Z.v,{className:"h-6 w-6"}),(0,t.jsx)("span",{children:c})]}),(0,t.jsx)(F.z,{onClick:()=>d(null),className:"mt-2",variant:"ghost",children:"Dismiss"})]}),(0,t.jsx)("div",{className:"flex-none p-4 border-b ".concat(l?"animate-pulse border-blue-500 bg-blue-500 bg-opacity-25":"bg-secondary"," rounded-lg"),children:(0,t.jsx)("div",{className:"flex items-center justify-center w-full h-32 border-2 border-dashed border-gray-300 rounded-lg",children:l?(0,t.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,t.jsx)(w.u,{className:"h-6 w-6 mr-2"}),(0,t.jsx)("span",{children:"Drop files to upload"})]}):(0,t.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,t.jsx)(E.v,{className:"h-6 w-6 mr-2"}),(0,t.jsx)("span",{children:"Drag and drop files here"})]})})})]})]})]})};function ec(e){let[a,l]=(0,n.useState)(!1),[s,r]=(0,n.useState)(e.inputText||""),[i,c]=(0,n.useState)(!1),[d,o]=(0,n.useState)("");return(0,n.useEffect)(()=>{e.inputText?"INITIALIZE"===e.inputText?(l(!0),o("")):(o(e.inputText),e.allFiles.includes(e.inputText)&&r(e.inputText)):o("")},[e.inputText]),(0,n.useEffect)(()=>{d&&!e.allFiles.includes(d)?(c(!0),r("")):d?(c(!1),r(d)):(c(!1),r(""))},[d,e.allFiles]),(0,n.useEffect)(()=>{a||e.onClose()},[a]),(0,t.jsxs)(el.J2,{open:a||i&&!!d,onOpenChange:l,children:[(0,t.jsx)(el.xo,{asChild:!0,children:(0,t.jsxs)(F.z,{variant:"outline",role:"combobox","aria-expanded":a,className:'justify-between" '.concat(e.isMobileWidth?"w-full":"w-[200px]"),children:[s?e.isMobileWidth?"✔️":"Selected":e.isMobileWidth?" ":"Select file",(0,t.jsx)(V,{className:"opacity-50"})]})}),(0,t.jsx)(el.yk,{className:"w-[200px] p-0",children:(0,t.jsxs)(ea.mY,{children:[(0,t.jsx)(ea.sZ,{placeholder:"Search files...",value:d,onInput:e=>o(e.currentTarget.value)}),(0,t.jsxs)(ea.e8,{children:[(0,t.jsx)(ea.rb,{children:"No files found."}),(0,t.jsx)(ea.fu,{children:e.allFiles.map(a=>(0,t.jsxs)(ea.di,{value:a,onSelect:a=>{r(a===s?"":a),l(!1),e.onChooseFile(a)},children:[a,(0,t.jsx)(M.J,{className:(0,K.cn)("ml-auto",s===a?"opacity-100":"opacity-0")})]},a))})]})]})})]})}function ed(){let[e,a]=(0,n.useState)(""),[l,r]=(0,n.useState)(null),[o,m]=(0,n.useState)(!1),h=(0,n.useRef)(null),[u,x]=(0,n.useState)(null),[f,p]=(0,n.useState)([]),[j,g]=(0,n.useState)(null),[v,A]=(0,n.useState)(!0),[Z,w]=(0,n.useState)([]),E=(0,n.useRef)(null),[y,V]=(0,n.useState)(null),[M,S]=(0,n.useState)(void 0),[R,P]=(0,n.useState)(null),[W,U]=(0,n.useState)(!1),[Y,B]=(0,n.useState)([]),[K,ea]=(0,n.useState)(0),[el,et]=(0,n.useState)(1),{toast:es}=(0,z.pm)(),ed=(0,T.IC)();function eo(e){if(a(e),!e.trim()){r(null);return}E.current&&clearTimeout(E.current),e.trim()&&(E.current=setTimeout(()=>{em()},750))}function em(){!o&&e.trim()&&(m(!0),fetch("/api/search?q=".concat(encodeURIComponent(e),"&client=web"),{method:"GET",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{r(e),m(!1)}).catch(e=>{console.error("Error:",e)}))}(0,n.useEffect)(()=>{fetch("/api/content/computer",{method:"GET",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{w(e)}).catch(e=>{console.error("Error loading files:",e)})},[]),(0,n.useEffect)(()=>{let a=e.match(/file:([^"\s]*|"[^"]*")?/);if(a){let e=a[1],l=null==e?void 0:e.replace(/"/g,"");l?S(l):S("INITIALIZE")}},[e]);let eh=async e=>{try{let a=await fetch("api/content/files?page=".concat(e));if(!a.ok)throw Error("Failed to fetch files");let l=await a.json(),t=l.files,s=l.num_pages;et(s),Array.isArray(t)&&p(t.toSorted())}catch(e){g("Failed to load files"),console.error("Error fetching files:",e)}finally{A(!1)}};(0,n.useEffect)(()=>{eh(K)},[K]);let eu=async e=>{try{let a=await fetch("/api/content/file?file_name=".concat(e));if(!a.ok)throw Error("Failed to fetch file");let l=await a.json();P(l.raw_text)}catch(e){g("Failed to load file"),console.error("Error fetching file:",e)}},ex=(e,a)=>{let l=new Blob([a],{type:"text/plain"}),t=window.URL.createObjectURL(l),s=document.createElement("a");s.href=t,s.download="".concat(e.split("/").pop(),".txt"),document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(t)};(0,n.useEffect)(()=>{y&&eu(y)},[y]),(0,n.useEffect)(()=>{eh(K)},[]),(0,n.useEffect)(()=>{Y.length>0&&(ea(0),eh(0))},[Y]);let ef=async e=>{U(!0);try{if(!(await fetch("/api/content/file?filename=".concat(e),{method:"DELETE"})).ok)throw Error("Failed to delete file");es({title:"File deleted",description:"File ".concat(e," has been deleted"),variant:"default"}),eh(K)}catch(a){es({title:"Error deleting file",description:"Failed to delete file ".concat(e),variant:"destructive"})}finally{U(!1)}};return(0,t.jsxs)(C.Hn,{children:[(0,t.jsx)(_.S,{conversationId:""}),(0,t.jsxs)(C.kV,{children:[(0,t.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,t.jsx)(C.vP,{className:"-ml-1"}),(0,t.jsx)(D.Z,{orientation:"vertical",className:"mr-2 h-4"}),ed?(0,t.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,t.jsx)(I.VO,{className:"h-auto w-16"})}):(0,t.jsx)("h2",{className:"text-lg",children:"Search Your Knowledge Base"})]}),(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"".concat(i().searchLayout),children:(0,t.jsx)("div",{className:"w-full md:w-5/6 mx-auto pt-6 md:pt-8",children:(0,t.jsxs)("div",{className:"p-4 w-full mx-auto",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center border-2 border-muted p-1 gap-1 rounded-lg flex-col md:flex-row",children:[(0,t.jsx)("div",{className:"relative flex-1 w-full",children:(0,t.jsx)(s.I,{autoFocus:!0,className:"border-none pl-4 focus-visible:ring-transparent focus-visible:ring-offset-transparent",onChange:e=>eo(e.currentTarget.value),onKeyDown:e=>{"Enter"===e.key&&em()},ref:h,type:"search",placeholder:"Search Documents",value:e})}),(0,t.jsxs)("div",{id:"actions",className:"flex gap-2",children:[(0,t.jsx)(ec,{allFiles:Z,onChooseFile:l=>(function(l){var t;let s=e.replace(/file:([^"\s]*|"[^"]*")?/i,"").trim();a('file:"'.concat(l,'" ').concat(s)),null===(t=h.current)||void 0===t||t.focus(),em()})(l),isMobileWidth:ed,inputText:M,onClose:()=>{var e;return null===(e=h.current)||void 0===e?void 0:e.focus()}}),(0,t.jsxs)(F.z,{className:"px-2 gap-2 inline-flex rounded-none items-center border-l border-gray-300 hover:text-gray-500",variant:"ghost",onClick:()=>em(),children:[(0,t.jsx)(b.Y,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"Find"})]})]})]}),null===l&&(0,t.jsx)(ei,{setUploadedFiles:B}),o&&(0,t.jsx)("div",{className:"mt-4 flex items-center justify-center",children:(0,t.jsx)(O.l,{className:"mt-4",message:"Searching",iconClassName:"h-5 w-5"})}),u&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)(F.z,{onClick:()=>x(null),className:"mb-4",variant:"outline",children:[(0,t.jsx)(H.X,{className:"inline mr-2"}),"Back"]}),function(e){let a=(e.additional.file||"").startsWith("http"),l=a?e.additional.heading:e.additional.file.split("/").pop();return(0,t.jsxs)(d.Zb,{className:"bg-secondary h-full shadow-sm rounded-lg border border-muted mb-4 animate-fade-in-up",children:[(0,t.jsx)(d.Ol,{children:(0,t.jsx)(d.ll,{children:l})}),a&&(0,t.jsx)(d.eW,{children:(0,t.jsxs)("a",{href:e.additional.file,target:"_blank",className:"underline text-sm bg-muted p-3 rounded-lg text-muted-foreground flex items-center gap-2",children:[(0,t.jsx)(N,{className:"inline"}),e.additional.file]})}),(0,t.jsx)(d.aY,{children:(0,t.jsx)("div",{className:"text-m",children:e.entry})})]})}(u)]}),!u&&!o&&l&&l.length>0&&(0,t.jsxs)("div",{className:"mt-4 max-w-[92vw] break-all",children:[(0,t.jsxs)(F.z,{onClick:()=>eo(""),className:"mb-4",variant:"outline",children:[(0,t.jsx)(H.X,{className:"inline mr-2"}),"See All"]}),(0,t.jsx)(c.x,{className:"h-[80vh]",children:l.map((e,a)=>(0,t.jsx)(er,{note:e,setFocusSearchResult:x},e["corpus-id"]))})]}),!o&&null===l&&!e.trim()&&(0,t.jsxs)("div",{className:"w-full mt-4",children:[v&&(0,t.jsx)("div",{className:"mt-4 flex items-center justify-center",children:(0,t.jsx)(O.l,{className:"mt-4",message:"Loading",iconClassName:"h-5 w-5"})}),j&&(0,t.jsx)("div",{className:"text-red-500",children:j}),!l&&!v&&0===f.length&&(0,t.jsxs)(d.Zb,{className:"flex flex-col items-center justify-center border-none shadow-none",children:[(0,t.jsxs)(d.Ol,{className:"flex flex-col items-center justify-center",children:[(0,t.jsx)(d.SZ,{className:"border-muted-foreground border w-fit rounded-lg mb-2 text-center text-lg p-4",children:(0,t.jsx)(L,{weight:"fill",className:"text-muted-foreground h-10 w-10"})}),(0,t.jsx)(d.ll,{className:"text-center",children:"Let's get started!"})]}),(0,t.jsxs)(d.aY,{children:[(0,t.jsx)("div",{className:"text-muted-foreground items-center justify-center text-center flex",children:'To use search, upload docs via the "Add Documents" button.'}),(0,t.jsx)(k.default,{href:"https://docs.khoj.dev/data-sources/share_your_data",className:"no-underline",children:(0,t.jsx)("div",{className:"mt-4 text-center text-secondary-foreground bg-secondary w-fit m-auto p-2 rounded-lg",children:"Learn More"})})]})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:f.map((e,a)=>(0,t.jsx)(en,{file:e,index:a,setSelectedFile:V,setSelectedFileFullText:P,handleDownload:ex,handleDelete:ef,isDeleting:W,selectedFileFullText:R},a))}),(0,t.jsx)(G,{children:(0,t.jsxs)(X,{className:"p-0",children:[K>0&&(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(J,{onClick:()=>ea(K-1)})}),K>1&&(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(q,{onClick:()=>ea(0),children:"1"})}),K>2&&(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(ee,{})}),K>0&&(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(q,{onClick:()=>ea(K-1),children:K})}),(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(q,{isActive:!0,children:K+1})}),K<el-1&&(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(q,{onClick:()=>ea(K+1),children:K+2})}),K<el-3&&(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(ee,{})}),K<el-2&&(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(q,{onClick:()=>ea(el-1),children:el})}),K<el-1&&(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(Q,{onClick:()=>ea(K+1)})})]})})]})]})})})})]})]})}},32759:function(e,a,l){"use strict";l.d(a,{E:function(){return i}});var t=l(57437),s=l(2265),n=l(60610),r=l(94508);let i=s.forwardRef((e,a)=>{let{className:l,value:s,indicatorColor:i,...c}=e;return(0,t.jsx)(n.fC,{ref:a,className:(0,r.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",l),...c,children:(0,t.jsx)(n.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(i),style:{transform:"translateX(-".concat(100-(s||0),"%)")}})})});i.displayName=n.fC.displayName},77992:function(e,a,l){"use strict";l.d(a,{pm:function(){return h}});var t=l(2265);let s=0,n=new Map,r=e=>{if(n.has(e))return;let a=setTimeout(()=>{n.delete(e),o({type:"REMOVE_TOAST",toastId:e})},1e6);n.set(e,a)},i=(e,a)=>{switch(a.type){case"ADD_TOAST":return{...e,toasts:[a.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===a.toast.id?{...e,...a.toast}:e)};case"DISMISS_TOAST":{let{toastId:l}=a;return l?r(l):e.toasts.forEach(e=>{r(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===l||void 0===l?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===a.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==a.toastId)}}},c=[],d={toasts:[]};function o(e){d=i(d,e),c.forEach(e=>{e(d)})}function m(e){let{...a}=e,l=(s=(s+1)%Number.MAX_SAFE_INTEGER).toString(),t=()=>o({type:"DISMISS_TOAST",toastId:l});return o({type:"ADD_TOAST",toast:{...a,id:l,open:!0,onOpenChange:e=>{e||t()}}}),{id:l,dismiss:t,update:e=>o({type:"UPDATE_TOAST",toast:{...e,id:l}})}}function h(){let[e,a]=t.useState(d);return t.useEffect(()=>(c.push(a),()=>{let e=c.indexOf(a);e>-1&&c.splice(e,1)}),[e]),{...e,toast:m,dismiss:e=>o({type:"DISMISS_TOAST",toastId:e})}}},41816:function(e){e.exports={searchLayout:"search_searchLayout__fP3m0"}}},function(e){e.O(0,[2026,5638,2939,7200,8667,1327,945,2327,2971,2117,1744],function(){return e(e.s=94114)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2797],{94114:function(e,a,l){Promise.resolve().then(l.bind(l,76321))},76321:function(e,a,l){"use strict";l.r(a),l.d(a,{default:function(){return ed}});var t=l(57437),s=l(95186),n=l(2265),r=l(41816),i=l.n(r),c=l(19378),d=l(66070),o=l(3467),m=l(73278),h=l(4992);let u=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H156.69a19.86,19.86,0,0,0,14.14-5.86l51.31-51.31A19.86,19.86,0,0,0,228,156.69V48A20,20,0,0,0,208,28ZM52,52H204v92H156a12,12,0,0,0-12,12v48H52ZM168,191V168h23Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,160l-56,56V160Z",opacity:"0.2"}),n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H156.69A15.86,15.86,0,0,0,168,219.31L219.31,168A15.86,15.86,0,0,0,224,156.69V48A16,16,0,0,0,208,32ZM48,48H208V152H160a8,8,0,0,0-8,8v48H48ZM196.69,168,168,196.69V168Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H156.69A15.86,15.86,0,0,0,168,219.31L219.31,168A15.86,15.86,0,0,0,224,156.69V48A16,16,0,0,0,208,32ZM160,204.69V160h44.69Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H156.69a13.94,13.94,0,0,0,9.9-4.1l51.31-51.31a13.94,13.94,0,0,0,4.1-9.9V48A14,14,0,0,0,208,34ZM46,208V48a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2V154H160a6,6,0,0,0-6,6v50H48A2,2,0,0,1,46,208Zm120-6.49V166h35.52Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H156.69A15.86,15.86,0,0,0,168,219.31L219.31,168A15.86,15.86,0,0,0,224,156.69V48A16,16,0,0,0,208,32ZM48,48H208V152H160a8,8,0,0,0-8,8v48H48ZM196.69,168,168,196.69V168Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H156.69a11.93,11.93,0,0,0,8.48-3.51l51.32-51.32a11.93,11.93,0,0,0,3.51-8.48V48A12,12,0,0,0,208,36ZM44,208V48a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4V156H160a4,4,0,0,0-4,4v52H48A4,4,0,0,1,44,208Zm120-1.66V164h42.35Z"}))]]),x=n.forwardRef((e,a)=>n.createElement(h.Z,{ref:a,...e,weights:u}));x.displayName="NoteBlankIcon";var f=l(25778),p=l(86723),j=l(96620),g=l(4235);let v=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M87.5,151.52l64-64a12,12,0,0,1,17,17l-64,64a12,12,0,0,1-17-17Zm131-114a60.08,60.08,0,0,0-84.87,0L103.51,67.61a12,12,0,0,0,17,17l30.07-30.06a36,36,0,0,1,50.93,50.92L171.4,135.52a12,12,0,1,0,17,17l30.08-30.06A60.09,60.09,0,0,0,218.45,37.55ZM135.52,171.4l-30.07,30.08a36,36,0,0,1-50.92-50.93l30.06-30.07a12,12,0,0,0-17-17L37.55,133.58a60,60,0,0,0,84.88,84.87l30.06-30.07a12,12,0,0,0-17-17Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M209.94,113.94l-96,96a48,48,0,0,1-67.88-67.88l96-96a48,48,0,0,1,67.88,67.88Z",opacity:"0.2"}),n.createElement("path",{d:"M165.66,90.34a8,8,0,0,1,0,11.32l-64,64a8,8,0,0,1-11.32-11.32l64-64A8,8,0,0,1,165.66,90.34ZM215.6,40.4a56,56,0,0,0-79.2,0L106.34,70.45a8,8,0,0,0,11.32,11.32l30.06-30a40,40,0,0,1,56.57,56.56l-30.07,30.06a8,8,0,0,0,11.31,11.32L215.6,119.6a56,56,0,0,0,0-79.2ZM138.34,174.22l-30.06,30.06a40,40,0,1,1-56.56-56.57l30.05-30.05a8,8,0,0,0-11.32-11.32L40.4,136.4a56,56,0,0,0,79.2,79.2l30.06-30.07a8,8,0,0,0-11.32-11.31Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM144.56,173.66l-21.45,21.45a44,44,0,0,1-62.22-62.22l21.45-21.46a8,8,0,0,1,11.32,11.31L72.2,144.2a28,28,0,0,0,39.6,39.6l21.45-21.46a8,8,0,0,1,11.31,11.32Zm-34.9-16a8,8,0,0,1-11.32-11.32l48-48a8,8,0,0,1,11.32,11.32Zm85.45-34.55-21.45,21.45a8,8,0,0,1-11.32-11.31L183.8,111.8a28,28,0,0,0-39.6-39.6L122.74,93.66a8,8,0,0,1-11.31-11.32l21.46-21.45a44,44,0,0,1,62.22,62.22Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M164.25,91.75a6,6,0,0,1,0,8.49l-64,64a6,6,0,0,1-8.49-8.48l64-64A6,6,0,0,1,164.25,91.75ZM214.2,41.8a54.07,54.07,0,0,0-76.38,0L107.75,71.85a6,6,0,0,0,8.49,8.49l30.07-30.06a42,42,0,0,1,59.41,59.41l-30.08,30.07a6,6,0,1,0,8.49,8.49l30.07-30.07A54,54,0,0,0,214.2,41.8ZM139.76,175.64l-30.07,30.08a42,42,0,0,1-59.41-59.41l30.06-30.07a6,6,0,0,0-8.49-8.49l-30,30.07a54,54,0,0,0,76.38,76.39l30.07-30.08a6,6,0,0,0-8.49-8.49Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M165.66,90.34a8,8,0,0,1,0,11.32l-64,64a8,8,0,0,1-11.32-11.32l64-64A8,8,0,0,1,165.66,90.34ZM215.6,40.4a56,56,0,0,0-79.2,0L106.34,70.45a8,8,0,0,0,11.32,11.32l30.06-30a40,40,0,0,1,56.57,56.56l-30.07,30.06a8,8,0,0,0,11.31,11.32L215.6,119.6a56,56,0,0,0,0-79.2ZM138.34,174.22l-30.06,30.06a40,40,0,1,1-56.56-56.57l30.05-30.05a8,8,0,0,0-11.32-11.32L40.4,136.4a56,56,0,0,0,79.2,79.2l30.06-30.07a8,8,0,0,0-11.32-11.31Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M162.84,93.16a4,4,0,0,1,0,5.66l-64,64a4,4,0,0,1-5.66-5.66l64-64A4,4,0,0,1,162.84,93.16Zm49.95-49.95a52.07,52.07,0,0,0-73.56,0L109.17,73.27a4,4,0,0,0,5.65,5.66l30.07-30.06a44,44,0,0,1,62.24,62.24l-30.07,30.06a4,4,0,0,0,5.66,5.66l30.07-30.06A52.07,52.07,0,0,0,212.79,43.21ZM141.17,177.06l-30.06,30.07a44,44,0,0,1-62.24-62.24l30.06-30.06a4,4,0,0,0-5.66-5.66L43.21,139.23a52,52,0,0,0,73.56,73.56l30.06-30.07a4,4,0,1,0-5.66-5.66Z"}))]]),N=n.forwardRef((e,a)=>n.createElement(h.Z,{ref:a,...e,weights:v}));N.displayName="LinkSimpleIcon";var A=l(49807),Z=l(795),w=l(82033),E=l(2335);let y=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M234.29,47.91A20,20,0,0,0,216,36H40A20,20,0,0,0,25.2,69.45l.12.14L92,140.75V216a20,20,0,0,0,31.1,16.64l32-21.33A20,20,0,0,0,164,194.66V140.75l66.67-71.16.12-.14A20,20,0,0,0,234.29,47.91Zm-91,79.89A12,12,0,0,0,140,136v56.52l-24,16V136a12,12,0,0,0-3.25-8.2L49.23,60H206.77Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M221.9,61.38,152,136v58.65a8,8,0,0,1-3.56,6.66l-32,21.33A8,8,0,0,1,104,216V136L34.1,61.38A8,8,0,0,1,40,48H216A8,8,0,0,1,221.9,61.38Z",opacity:"0.2"}),n.createElement("path",{d:"M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M227.81,66.76l-.08.09L160,139.17v55.49A16,16,0,0,1,152.87,208l-32,21.34A16,16,0,0,1,96,216V139.17L28.27,66.85l-.08-.09A16,16,0,0,1,40,40H216a16,16,0,0,1,11.84,26.76Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228.77,50.34A13.8,13.8,0,0,0,216,42H40A14,14,0,0,0,29.67,65.42l.06.07L98,138.38V216a14,14,0,0,0,21.77,11.64l32-21.33A14,14,0,0,0,158,194.66V138.38l68.33-73A13.82,13.82,0,0,0,228.77,50.34Zm-11.26,6.94L147.62,131.9A6,6,0,0,0,146,136v58.66a2,2,0,0,1-.89,1.67l-32,21.33A2,2,0,0,1,110,216V136a6,6,0,0,0-1.62-4.1L38.53,57.32A2,2,0,0,1,40,54H216a1.9,1.9,0,0,1,1.83,1.19A1.86,1.86,0,0,1,217.51,57.28Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M227,51.15A11.85,11.85,0,0,0,216,44H40a12,12,0,0,0-8.88,20.07l.05.05L100,137.59V216a12,12,0,0,0,18.66,10l32-21.33a12,12,0,0,0,5.35-10V137.59l68.86-73.52A11.85,11.85,0,0,0,227,51.15Zm-8,7.5-69.9,74.62A4,4,0,0,0,148,136v58.65a4,4,0,0,1-1.78,3.33l-32,21.33A4,4,0,0,1,108,216V136a4,4,0,0,0-1.08-2.74L37.05,58.67A4,4,0,0,1,40,52H216a4,4,0,0,1,3,6.65Z"}))]]),V=n.forwardRef((e,a)=>n.createElement(h.Z,{ref:a,...e,weights:y}));V.displayName="FunnelIcon";var M=l(24148),b=l(80382),H=l(97159);let S=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M84,224a12,12,0,0,1-12,12H56a20,20,0,0,1-20-20V184a12,12,0,0,1,24,0v28H72A12,12,0,0,1,84,224ZM220,88v48a12,12,0,0,1-24,0V104H148a12,12,0,0,1-12-12V44H120a12,12,0,0,1,0-24h32a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88Zm-60-8h23L160,57ZM80,20H56A20,20,0,0,0,36,40V64a12,12,0,0,0,24,0V44H80a12,12,0,0,0,0-24ZM208,164a12,12,0,0,0-12,12v36h-4a12,12,0,0,0,0,24h8a20,20,0,0,0,20-20V176A12,12,0,0,0,208,164ZM48,156a12,12,0,0,0,12-12V104a12,12,0,0,0-24,0v40A12,12,0,0,0,48,156Zm104,56H112a12,12,0,0,0,0,24h40a12,12,0,0,0,0-24Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),n.createElement("path",{d:"M80,224a8,8,0,0,1-8,8H56a16,16,0,0,1-16-16V184a8,8,0,0,1,16,0v32H72A8,8,0,0,1,80,224ZM216,88v48a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H120a8,8,0,0,1,0-16h32a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31ZM80,24H56A16,16,0,0,0,40,40V64a8,8,0,0,0,16,0V40H80a8,8,0,0,0,0-16ZM208,168a8,8,0,0,0-8,8v40h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V176A8,8,0,0,0,208,168ZM48,152a8,8,0,0,0,8-8V104a8,8,0,0,0-16,0v40A8,8,0,0,0,48,152Zm104,64H112a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M80,224a8,8,0,0,1-8,8H56a16,16,0,0,1-16-16V184a8,8,0,0,1,16,0v32H72A8,8,0,0,1,80,224ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H120a8,8,0,0,0,0,16h24V88a8,8,0,0,0,8,8h48v40a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM80,24H56A16,16,0,0,0,40,40V64a8,8,0,0,0,16,0V40H80a8,8,0,0,0,0-16ZM208,168a8,8,0,0,0-8,8v40h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V176A8,8,0,0,0,208,168ZM48,152a8,8,0,0,0,8-8V104a8,8,0,0,0-16,0v40A8,8,0,0,0,48,152Zm104,64H112a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M78,224a6,6,0,0,1-6,6H56a14,14,0,0,1-14-14V184a6,6,0,0,1,12,0v32a2,2,0,0,0,2,2H72A6,6,0,0,1,78,224ZM214,88v48a6,6,0,0,1-12,0V94H152a6,6,0,0,1-6-6V38H120a6,6,0,0,1,0-12h32a6,6,0,0,1,4.24,1.76l56,56A6,6,0,0,1,214,88Zm-56-6h35.51L158,46.49ZM80,26H56A14,14,0,0,0,42,40V64a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2H80a6,6,0,0,0,0-12ZM208,170a6,6,0,0,0-6,6v40a2,2,0,0,1-2,2h-8a6,6,0,0,0,0,12h8a14,14,0,0,0,14-14V176A6,6,0,0,0,208,170ZM48,150a6,6,0,0,0,6-6V104a6,6,0,0,0-12,0v40A6,6,0,0,0,48,150Zm104,68H112a6,6,0,0,0,0,12h40a6,6,0,0,0,0-12Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M80,224a8,8,0,0,1-8,8H56a16,16,0,0,1-16-16V184a8,8,0,0,1,16,0v32H72A8,8,0,0,1,80,224ZM216,88v48a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H120a8,8,0,0,1,0-16h32a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31ZM80,24H56A16,16,0,0,0,40,40V64a8,8,0,0,0,16,0V40H80a8,8,0,0,0,0-16ZM208,168a8,8,0,0,0-8,8v40h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V176A8,8,0,0,0,208,168ZM48,152a8,8,0,0,0,8-8V104a8,8,0,0,0-16,0v40A8,8,0,0,0,48,152Zm104,64H112a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M76,224a4,4,0,0,1-4,4H56a12,12,0,0,1-12-12V184a4,4,0,0,1,8,0v32a4,4,0,0,0,4,4H72A4,4,0,0,1,76,224ZM212,88v48a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H120a4,4,0,0,1,0-8h32a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-56-4h42.34L156,41.66ZM80,28H56A12,12,0,0,0,44,40V64a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4H80a4,4,0,0,0,0-8ZM208,172a4,4,0,0,0-4,4v40a4,4,0,0,1-4,4h-8a4,4,0,0,0,0,8h8a12,12,0,0,0,12-12V176A4,4,0,0,0,208,172ZM48,148a4,4,0,0,0,4-4V104a4,4,0,0,0-8,0v40A4,4,0,0,0,48,148Zm104,72H112a4,4,0,0,0,0,8h40a4,4,0,0,0,0-8Z"}))]]),L=n.forwardRef((e,a)=>n.createElement(h.Z,{ref:a,...e,weights:S}));L.displayName="FileDashedIcon";var F=l(62869),k=l(27648),T=l(7436),C=l(60729),_=l(34124),D=l(6512),I=l(37104),O=l(14308),R=l(26110),z=l(77992),P=l(84190),W=l(79205);let U=(0,W.Z)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var Y=l(10407);let B=(0,W.Z)("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);var K=l(94508);let G=e=>{let{className:a,...l}=e;return(0,t.jsx)("nav",{role:"navigation","aria-label":"pagination",className:(0,K.cn)("mx-auto flex w-full justify-center",a),...l})};G.displayName="Pagination";let X=n.forwardRef((e,a)=>{let{className:l,...s}=e;return(0,t.jsx)("ul",{ref:a,className:(0,K.cn)("flex flex-row items-center gap-1",l),...s})});X.displayName="PaginationContent";let $=n.forwardRef((e,a)=>{let{className:l,...s}=e;return(0,t.jsx)("li",{ref:a,className:(0,K.cn)("",l),...s})});$.displayName="PaginationItem";let q=e=>{let{className:a,isActive:l,size:s="icon",...n}=e;return(0,t.jsx)("a",{"aria-current":l?"page":void 0,className:(0,K.cn)((0,F.d)({variant:l?"outline":"ghost",size:s}),"no-underline",a),...n})};q.displayName="PaginationLink";let J=e=>{let{className:a,...l}=e;return(0,t.jsxs)(q,{"aria-label":"Go to previous page",size:"default",className:(0,K.cn)("gap-1 pl-2.5",a),...l,children:[(0,t.jsx)(U,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"Previous"})]})};J.displayName="PaginationPrevious";let Q=e=>{let{className:a,...l}=e;return(0,t.jsxs)(q,{"aria-label":"Go to next page",size:"default",className:(0,K.cn)("gap-1 pr-2.5",a),...l,children:[(0,t.jsx)("span",{children:"Next"}),(0,t.jsx)(Y.Z,{className:"h-4 w-4"})]})};Q.displayName="PaginationNext";let ee=e=>{let{className:a,...l}=e;return(0,t.jsxs)("span",{"aria-hidden":!0,className:(0,K.cn)("flex h-9 w-9 items-center justify-center",a),...l,children:[(0,t.jsx)(B,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"More pages"})]})};ee.displayName="PaginationEllipsis";var ea=l(23518),el=l(57054),et=l(59199),es=l(32759);function en(e){let{file:a,setSelectedFile:l,setSelectedFileFullText:s,handleDownload:n,handleDelete:r,isDeleting:i,selectedFileFullText:o}=e;return(0,t.jsxs)(d.Zb,{className:"animate-fade-in-up bg-secondary h-52",children:[(0,t.jsx)(d.Ol,{className:"p-2",children:(0,t.jsxs)(d.ll,{className:"flex items-center gap-2 justify-between",title:a.file_name,children:[(0,t.jsxs)(R.Vq,{children:[(0,t.jsx)(R.hg,{asChild:!0,children:(0,t.jsx)("div",{className:"text-sm font-medium truncate hover:text-clip hover:whitespace-normal cursor-pointer",onClick:()=>{s(""),l(a.file_name)},children:a.file_name.split("/").pop()})}),(0,t.jsxs)(R.cZ,{className:"max-w-fit",children:[(0,t.jsx)(R.fK,{children:(0,t.jsx)(R.$N,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[a.file_name.split("/").pop(),(0,t.jsx)(F.z,{variant:"ghost",title:"Download as plaintext",onClick:()=>n(a.file_name,a.raw_text),children:(0,t.jsx)(f.U,{className:"h-4 w-4"})})]})})}),(0,t.jsx)(c.x,{className:"h-[50vh] w-[80vw]",children:(0,t.jsxs)("p",{className:"whitespace-pre-wrap break-words text-sm font-normal word-wrap",children:[!o&&(0,t.jsx)(O.l,{className:"mt-4",message:"Loading",iconClassName:"h-5 w-5"}),o]})})]})]}),(0,t.jsxs)(P.h_,{children:[(0,t.jsx)(P.$F,{children:(0,t.jsx)(F.z,{variant:"ghost",children:(0,t.jsx)(p.F,{className:"h-4 w-4"})})}),(0,t.jsx)(P.AW,{className:"flex flex-col gap-0 w-fit",children:(0,t.jsx)(P.Xi,{className:"p-0",children:(0,t.jsxs)(F.z,{variant:"ghost",className:"flex items-center gap-2 p-1 text-sm",onClick:()=>{r(a.file_name)},children:[(0,t.jsx)(j.r,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"text-xs",children:i?"Deleting...":"Delete"})]})})})]})]})}),(0,t.jsx)(d.aY,{className:"p-2",children:(0,t.jsx)(c.x,{className:"h-24 bg-background rounded-lg",children:(0,t.jsxs)("p",{className:"whitespace-pre-wrap break-words text-sm font-normal text-muted-foreground p-2 h-full",children:[a.raw_text.slice(0,100),"..."]})})}),(0,t.jsx)(d.eW,{className:"flex justify-end gap-2 p-2",children:(0,t.jsx)("div",{className:"text-muted-foreground text-xs",children:(0,T.o0)(a.updated_at)})})]})}function er(e){var a;let l=e.note,s=(l.additional.file||"").startsWith("http"),n=s?l.additional.heading:l.additional.file.split("/").pop();return(0,t.jsxs)(d.Zb,{className:"bg-secondary h-full shadow-sm rounded-lg border border-muted mb-4 animate-fade-in-up",children:[(0,t.jsx)(d.Ol,{children:(0,t.jsxs)(d.ll,{className:"inline-flex gap-2",children:["notion"===(a=l.additional.source)?(0,t.jsx)(o.F,{className:"text-muted-foreground"}):"github"===a?(0,t.jsx)(m.b,{className:"text-muted-foreground"}):(0,t.jsx)(x,{className:"text-muted-foreground"}),n]})}),(0,t.jsxs)(d.aY,{children:[(0,t.jsx)("div",{className:"line-clamp-4 text-muted-foreground",children:l.entry}),(0,t.jsxs)(F.z,{onClick:()=>e.setFocusSearchResult(l),variant:"ghost",className:"p-0 mt-2 text-orange-400 hover:bg-inherit",children:["See content",(0,t.jsx)(g.o,{className:"inline ml-2"})]})]}),s&&(0,t.jsx)(d.eW,{children:(0,t.jsxs)("a",{href:l.additional.file,target:"_blank",className:"underline text-sm bg-muted p-1 rounded-lg text-muted-foreground",children:[(0,t.jsx)(N,{className:"inline m-2"}),l.additional.file]})})]})}let ei=e=>{let{setUploadedFiles:a}=e,[l,s]=(0,n.useState)(!1),[r,i]=(0,n.useState)(null),[c,d]=(0,n.useState)(null),[o,m]=(0,n.useState)(!1),[h,u]=(0,n.useState)(0),x=(0,n.useRef)(null);function f(e){(0,et.ko)(e,i,m,d,a)}return(0,n.useEffect)(()=>{if(!o&&(u(0),!r&&!c)){let e=new KeyboardEvent("keydown",{key:"Escape"});document.dispatchEvent(e)}if(o){let e=setInterval(()=>{u(e=>{let a=e+(Math.floor(5*Math.random())+1);return a<100?a:100})},800);return()=>clearInterval(e)}},[o]),(0,t.jsxs)(R.Vq,{children:[(0,t.jsx)(R.hg,{asChild:!0,children:(0,t.jsxs)(F.z,{variant:"secondary",className:"mt-4",children:[(0,t.jsx)(A.a,{className:"h-4 w-4 mr-2"}),"Add Documents"]})}),(0,t.jsxs)(R.cZ,{children:[(0,t.jsxs)(R.fK,{children:[(0,t.jsx)(R.$N,{children:"Build Your Knowledge Base"}),(0,t.jsx)(R.Be,{children:"Add context for your Khoj knowledge base. Quickly search and get personalized answers from your documents."})]}),(0,t.jsxs)("div",{className:"flex flex-col h-full",onDragOver:function(e){e.preventDefault(),s(!0)},onDragLeave:function(e){e.preventDefault(),s(!1)},onDrop:function(e){e.preventDefault(),s(!1),e.dataTransfer.files&&f(e.dataTransfer.files)},onClick:function(){x&&x.current&&x.current.click()},children:[(0,t.jsx)("input",{type:"file",multiple:!0,ref:x,style:{display:"none"},onChange:function(e){e.target.files&&f(e.target.files)}}),(0,t.jsx)("div",{className:"flex-none p-4",children:o&&(0,t.jsx)(es.E,{indicatorColor:"bg-slate-500",className:"w-full h-2 rounded-full",value:h})}),r&&(0,t.jsxs)("div",{className:"flex-none p-4 border-b rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(Z.v,{className:"h-6 w-6"}),(0,t.jsx)("span",{children:r})]}),(0,t.jsx)(F.z,{onClick:()=>i(null),className:"mt-2",variant:"ghost",children:"Dismiss"})]}),c&&(0,t.jsxs)("div",{className:"flex-none p-4 border-b rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(Z.v,{className:"h-6 w-6"}),(0,t.jsx)("span",{children:c})]}),(0,t.jsx)(F.z,{onClick:()=>d(null),className:"mt-2",variant:"ghost",children:"Dismiss"})]}),(0,t.jsx)("div",{className:"flex-none p-4 border-b ".concat(l?"animate-pulse border-blue-500 bg-blue-500 bg-opacity-25":"bg-secondary"," rounded-lg"),children:(0,t.jsx)("div",{className:"flex items-center justify-center w-full h-32 border-2 border-dashed border-gray-300 rounded-lg",children:l?(0,t.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,t.jsx)(w.u,{className:"h-6 w-6 mr-2"}),(0,t.jsx)("span",{children:"Drop files to upload"})]}):(0,t.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,t.jsx)(E.v,{className:"h-6 w-6 mr-2"}),(0,t.jsx)("span",{children:"Drag and drop files here"})]})})})]})]})]})};function ec(e){let[a,l]=(0,n.useState)(!1),[s,r]=(0,n.useState)(e.inputText||""),[i,c]=(0,n.useState)(!1),[d,o]=(0,n.useState)("");return(0,n.useEffect)(()=>{e.inputText?"INITIALIZE"===e.inputText?(l(!0),o("")):(o(e.inputText),e.allFiles.includes(e.inputText)&&r(e.inputText)):o("")},[e.inputText]),(0,n.useEffect)(()=>{d&&!e.allFiles.includes(d)?(c(!0),r("")):d?(c(!1),r(d)):(c(!1),r(""))},[d,e.allFiles]),(0,n.useEffect)(()=>{a||e.onClose()},[a]),(0,t.jsxs)(el.J2,{open:a||i&&!!d,onOpenChange:l,children:[(0,t.jsx)(el.xo,{asChild:!0,children:(0,t.jsxs)(F.z,{variant:"outline",role:"combobox","aria-expanded":a,className:'justify-between" '.concat(e.isMobileWidth?"w-full":"w-[200px]"),children:[s?e.isMobileWidth?"✔️":"Selected":e.isMobileWidth?" ":"Select file",(0,t.jsx)(V,{className:"opacity-50"})]})}),(0,t.jsx)(el.yk,{className:"w-[200px] p-0",children:(0,t.jsxs)(ea.mY,{children:[(0,t.jsx)(ea.sZ,{placeholder:"Search files...",value:d,onInput:e=>o(e.currentTarget.value)}),(0,t.jsxs)(ea.e8,{children:[(0,t.jsx)(ea.rb,{children:"No files found."}),(0,t.jsx)(ea.fu,{children:e.allFiles.map(a=>(0,t.jsxs)(ea.di,{value:a,onSelect:a=>{r(a===s?"":a),l(!1),e.onChooseFile(a)},children:[a,(0,t.jsx)(M.J,{className:(0,K.cn)("ml-auto",s===a?"opacity-100":"opacity-0")})]},a))})]})]})})]})}function ed(){let[e,a]=(0,n.useState)(""),[l,r]=(0,n.useState)(null),[o,m]=(0,n.useState)(!1),h=(0,n.useRef)(null),[u,x]=(0,n.useState)(null),[f,p]=(0,n.useState)([]),[j,g]=(0,n.useState)(null),[v,A]=(0,n.useState)(!0),[Z,w]=(0,n.useState)([]),E=(0,n.useRef)(null),[y,V]=(0,n.useState)(null),[M,S]=(0,n.useState)(void 0),[R,P]=(0,n.useState)(null),[W,U]=(0,n.useState)(!1),[Y,B]=(0,n.useState)([]),[K,ea]=(0,n.useState)(0),[el,et]=(0,n.useState)(1),{toast:es}=(0,z.pm)(),ed=(0,T.IC)();function eo(e){if(a(e),!e.trim()){r(null);return}E.current&&clearTimeout(E.current),e.trim()&&(E.current=setTimeout(()=>{em()},750))}function em(){!o&&e.trim()&&(m(!0),fetch("/api/search?q=".concat(encodeURIComponent(e),"&client=web"),{method:"GET",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{r(e),m(!1)}).catch(e=>{console.error("Error:",e)}))}(0,n.useEffect)(()=>{fetch("/api/content/computer",{method:"GET",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{w(e)}).catch(e=>{console.error("Error loading files:",e)})},[]),(0,n.useEffect)(()=>{let a=e.match(/file:([^"\s]*|"[^"]*")?/);if(a){let e=a[1],l=null==e?void 0:e.replace(/"/g,"");l?S(l):S("INITIALIZE")}},[e]);let eh=async e=>{try{let a=await fetch("api/content/files?page=".concat(e));if(!a.ok)throw Error("Failed to fetch files");let l=await a.json(),t=l.files,s=l.num_pages;et(s),Array.isArray(t)&&p(t.toSorted())}catch(e){g("Failed to load files"),console.error("Error fetching files:",e)}finally{A(!1)}};(0,n.useEffect)(()=>{eh(K)},[K]);let eu=async e=>{try{let a=await fetch("/api/content/file?file_name=".concat(e));if(!a.ok)throw Error("Failed to fetch file");let l=await a.json();P(l.raw_text)}catch(e){g("Failed to load file"),console.error("Error fetching file:",e)}},ex=(e,a)=>{let l=new Blob([a],{type:"text/plain"}),t=window.URL.createObjectURL(l),s=document.createElement("a");s.href=t,s.download="".concat(e.split("/").pop(),".txt"),document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(t)};(0,n.useEffect)(()=>{y&&eu(y)},[y]),(0,n.useEffect)(()=>{eh(K)},[]),(0,n.useEffect)(()=>{Y.length>0&&(ea(0),eh(0))},[Y]);let ef=async e=>{U(!0);try{if(!(await fetch("/api/content/file?filename=".concat(e),{method:"DELETE"})).ok)throw Error("Failed to delete file");es({title:"File deleted",description:"File ".concat(e," has been deleted"),variant:"default"}),eh(K)}catch(a){es({title:"Error deleting file",description:"Failed to delete file ".concat(e),variant:"destructive"})}finally{U(!1)}};return(0,t.jsxs)(C.Hn,{children:[(0,t.jsx)(_.S,{conversationId:""}),(0,t.jsxs)(C.kV,{children:[(0,t.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,t.jsx)(C.vP,{className:"-ml-1"}),(0,t.jsx)(D.Z,{orientation:"vertical",className:"mr-2 h-4"}),ed?(0,t.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,t.jsx)(I.VO,{className:"h-auto w-16"})}):(0,t.jsx)("h2",{className:"text-lg",children:"Search Your Knowledge Base"})]}),(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"".concat(i().searchLayout),children:(0,t.jsx)("div",{className:"w-full md:w-5/6 mx-auto pt-6 md:pt-8",children:(0,t.jsxs)("div",{className:"p-4 w-full mx-auto",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center border-2 border-muted p-1 gap-1 rounded-lg flex-col md:flex-row",children:[(0,t.jsx)("div",{className:"relative flex-1 w-full",children:(0,t.jsx)(s.I,{autoFocus:!0,className:"border-none pl-4 focus-visible:ring-transparent focus-visible:ring-offset-transparent",onChange:e=>eo(e.currentTarget.value),onKeyDown:e=>{"Enter"===e.key&&em()},ref:h,type:"search",placeholder:"Search Documents",value:e})}),(0,t.jsxs)("div",{id:"actions",className:"flex gap-2",children:[(0,t.jsx)(ec,{allFiles:Z,onChooseFile:l=>(function(l){var t;let s=e.replace(/file:([^"\s]*|"[^"]*")?/i,"").trim();a('file:"'.concat(l,'" ').concat(s)),null===(t=h.current)||void 0===t||t.focus(),em()})(l),isMobileWidth:ed,inputText:M,onClose:()=>{var e;return null===(e=h.current)||void 0===e?void 0:e.focus()}}),(0,t.jsxs)(F.z,{className:"px-2 gap-2 inline-flex rounded-none items-center border-l border-gray-300 hover:text-gray-500",variant:"ghost",onClick:()=>em(),children:[(0,t.jsx)(b.Y,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"Find"})]})]})]}),null===l&&(0,t.jsx)(ei,{setUploadedFiles:B}),o&&(0,t.jsx)("div",{className:"mt-4 flex items-center justify-center",children:(0,t.jsx)(O.l,{className:"mt-4",message:"Searching",iconClassName:"h-5 w-5"})}),u&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)(F.z,{onClick:()=>x(null),className:"mb-4",variant:"outline",children:[(0,t.jsx)(H.X,{className:"inline mr-2"}),"Back"]}),function(e){let a=(e.additional.file||"").startsWith("http"),l=a?e.additional.heading:e.additional.file.split("/").pop();return(0,t.jsxs)(d.Zb,{className:"bg-secondary h-full shadow-sm rounded-lg border border-muted mb-4 animate-fade-in-up",children:[(0,t.jsx)(d.Ol,{children:(0,t.jsx)(d.ll,{children:l})}),a&&(0,t.jsx)(d.eW,{children:(0,t.jsxs)("a",{href:e.additional.file,target:"_blank",className:"underline text-sm bg-muted p-3 rounded-lg text-muted-foreground flex items-center gap-2",children:[(0,t.jsx)(N,{className:"inline"}),e.additional.file]})}),(0,t.jsx)(d.aY,{children:(0,t.jsx)("div",{className:"text-m",children:e.entry})})]})}(u)]}),!u&&!o&&l&&l.length>0&&(0,t.jsxs)("div",{className:"mt-4 max-w-[92vw] break-all",children:[(0,t.jsxs)(F.z,{onClick:()=>eo(""),className:"mb-4",variant:"outline",children:[(0,t.jsx)(H.X,{className:"inline mr-2"}),"See All"]}),(0,t.jsx)(c.x,{className:"h-[80vh]",children:l.map((e,a)=>(0,t.jsx)(er,{note:e,setFocusSearchResult:x},e["corpus-id"]))})]}),!o&&null===l&&!e.trim()&&(0,t.jsxs)("div",{className:"w-full mt-4",children:[v&&(0,t.jsx)("div",{className:"mt-4 flex items-center justify-center",children:(0,t.jsx)(O.l,{className:"mt-4",message:"Loading",iconClassName:"h-5 w-5"})}),j&&(0,t.jsx)("div",{className:"text-red-500",children:j}),!l&&!v&&0===f.length&&(0,t.jsxs)(d.Zb,{className:"flex flex-col items-center justify-center border-none shadow-none",children:[(0,t.jsxs)(d.Ol,{className:"flex flex-col items-center justify-center",children:[(0,t.jsx)(d.SZ,{className:"border-muted-foreground border w-fit rounded-lg mb-2 text-center text-lg p-4",children:(0,t.jsx)(L,{weight:"fill",className:"text-muted-foreground h-10 w-10"})}),(0,t.jsx)(d.ll,{className:"text-center",children:"Let's get started!"})]}),(0,t.jsxs)(d.aY,{children:[(0,t.jsx)("div",{className:"text-muted-foreground items-center justify-center text-center flex",children:'To use search, upload docs via the "Add Documents" button.'}),(0,t.jsx)(k.default,{href:"https://docs.khoj.dev/data-sources/share_your_data",className:"no-underline",children:(0,t.jsx)("div",{className:"mt-4 text-center text-secondary-foreground bg-secondary w-fit m-auto p-2 rounded-lg",children:"Learn More"})})]})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:f.map((e,a)=>(0,t.jsx)(en,{file:e,index:a,setSelectedFile:V,setSelectedFileFullText:P,handleDownload:ex,handleDelete:ef,isDeleting:W,selectedFileFullText:R},a))}),(0,t.jsx)(G,{children:(0,t.jsxs)(X,{className:"p-0",children:[K>0&&(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(J,{onClick:()=>ea(K-1)})}),K>1&&(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(q,{onClick:()=>ea(0),children:"1"})}),K>2&&(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(ee,{})}),K>0&&(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(q,{onClick:()=>ea(K-1),children:K})}),(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(q,{isActive:!0,children:K+1})}),K<el-1&&(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(q,{onClick:()=>ea(K+1),children:K+2})}),K<el-3&&(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(ee,{})}),K<el-2&&(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(q,{onClick:()=>ea(el-1),children:el})}),K<el-1&&(0,t.jsx)($,{className:"list-none",children:(0,t.jsx)(Q,{onClick:()=>ea(K+1)})})]})})]})]})})})})]})]})}},32759:function(e,a,l){"use strict";l.d(a,{E:function(){return i}});var t=l(57437),s=l(2265),n=l(60610),r=l(94508);let i=s.forwardRef((e,a)=>{let{className:l,value:s,indicatorColor:i,...c}=e;return(0,t.jsx)(n.fC,{ref:a,className:(0,r.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",l),...c,children:(0,t.jsx)(n.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(i),style:{transform:"translateX(-".concat(100-(s||0),"%)")}})})});i.displayName=n.fC.displayName},77992:function(e,a,l){"use strict";l.d(a,{pm:function(){return h}});var t=l(2265);let s=0,n=new Map,r=e=>{if(n.has(e))return;let a=setTimeout(()=>{n.delete(e),o({type:"REMOVE_TOAST",toastId:e})},1e6);n.set(e,a)},i=(e,a)=>{switch(a.type){case"ADD_TOAST":return{...e,toasts:[a.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===a.toast.id?{...e,...a.toast}:e)};case"DISMISS_TOAST":{let{toastId:l}=a;return l?r(l):e.toasts.forEach(e=>{r(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===l||void 0===l?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===a.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==a.toastId)}}},c=[],d={toasts:[]};function o(e){d=i(d,e),c.forEach(e=>{e(d)})}function m(e){let{...a}=e,l=(s=(s+1)%Number.MAX_SAFE_INTEGER).toString(),t=()=>o({type:"DISMISS_TOAST",toastId:l});return o({type:"ADD_TOAST",toast:{...a,id:l,open:!0,onOpenChange:e=>{e||t()}}}),{id:l,dismiss:t,update:e=>o({type:"UPDATE_TOAST",toast:{...e,id:l}})}}function h(){let[e,a]=t.useState(d);return t.useEffect(()=>(c.push(a),()=>{let e=c.indexOf(a);e>-1&&c.splice(e,1)}),[e]),{...e,toast:m,dismiss:e=>o({type:"DISMISS_TOAST",toastId:e})}}},41816:function(e){e.exports={searchLayout:"search_searchLayout__fP3m0"}}},function(e){e.O(0,[2026,4173,2939,7200,8667,1327,945,2327,2971,2117,1744],function(){return e(e.s=94114)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6938],{62960:function(e,t,s){Promise.resolve().then(s.bind(s,31537))},31537:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return ei}});var a,n,r=s(57437),i=s(917),o=s.n(i);s(97510);var l=s(2265),c=s(77992),d=s(56937),h=s(7436),m=s(62869),x=s(95186),u=s(66070),p=s(84190),f=s(37099),j=s(94508);let g=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("div",{className:"relative w-full overflow-auto",children:(0,r.jsx)("table",{ref:t,className:(0,j.cn)("w-full caption-bottom text-sm",s),...a})})});g.displayName="Table",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("thead",{ref:t,className:(0,j.cn)("[&_tr]:border-b",s),...a})}).displayName="TableHeader";let b=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tbody",{ref:t,className:(0,j.cn)("[&_tr:last-child]:border-0",s),...a})});b.displayName="TableBody",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tfoot",{ref:t,className:(0,j.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...a})}).displayName="TableFooter";let w=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tr",{ref:t,className:(0,j.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...a})});w.displayName="TableRow",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("th",{ref:t,className:(0,j.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...a})}).displayName="TableHead";let N=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("td",{ref:t,className:(0,j.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...a})});N.displayName="TableCell",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("caption",{ref:t,className:(0,j.cn)("mt-4 text-sm text-muted-foreground",s),...a})}).displayName="TableCaption";var v=s(72102),y=s(24633),_=s(2335),k=s(7861),S=s(75921),T=s(39957),E=s(96620),C=s(6009),D=s(65241),F=s(36921),A=s(37052),P=s(53880),I=s(49807),O=s(68772),z=s(80382),Y=s(57248),R=s(73278),K=s(66932),B=s(71946),W=s(3467),Z=s(54928),U=s(29822),M=s(58905),H=s(82033),V=s(25778),G=s(47673),L=s(14308),J=s(60729),$=s(34124),q=s(6512),X=s(37104),Q=s(32759),ee=s(57635),et=s.n(ee),es=s(12);let ea=e=>{var t,s;let{items:a,selected:n,isActive:i,callbackFunc:o}=e,[c,d]=(0,l.useState)(null!==(s=null==n?void 0:n.toString())&&void 0!==s?s:"0");return!!n&&(0,r.jsx)("div",{className:"overflow-hidden shadow-md rounded-lg",children:(0,r.jsxs)(p.h_,{children:[(0,r.jsx)(p.$F,{asChild:!0,className:"w-full rounded-lg",children:(0,r.jsxs)(m.z,{variant:"outline",className:"justify-start py-6 rounded-lg",children:[null===(t=a.find(e=>e.id.toString()===c))||void 0===t?void 0:t.name," ",(0,r.jsx)(v.p,{className:"h-4 w-4 ml-auto text-muted-foreground"})]})}),(0,r.jsx)(p.AW,{style:{maxHeight:"200px",overflowY:"auto",minWidth:"var(--radix-dropdown-menu-trigger-width)"},children:(0,r.jsx)(p._x,{value:c,onValueChange:async e=>{d(e),await o(e)},children:a.map(e=>(0,r.jsxs)(p.qB,{value:e.id.toString(),disabled:!i&&"free"!==e.tier,children:[e.name," ","standard"===e.tier&&(0,r.jsx)("span",{className:"text-green-500 ml-2",children:"(Futurist)"})]},e.id.toString()))})})]})})},en=()=>{let[e,t]=(0,l.useState)([]),{toast:s}=(0,c.pm)(),a=async()=>{try{let e=await fetch("/auth/token",{method:"POST",headers:{"Content-Type":"application/json"}}),s=await e.json();t(e=>[...e,s])}catch(e){console.error("Error generating API key:",e)}},n=async e=>{try{await navigator.clipboard.writeText(e),s({title:"\uD83D\uDD11 API Key",description:"Copied to clipboard"})}catch(e){console.error("Error copying API key:",e)}},r=async e=>{try{(await fetch("/auth/token?token=".concat(e),{method:"DELETE"})).ok&&t(t=>t.filter(t=>t.token!==e))}catch(e){console.error("Error deleting API key:",e)}},i=async()=>{try{let e=await fetch("/auth/token"),s=await e.json();(null==s?void 0:s.length)>0&&t(s)}catch(e){console.error("Error listing API keys:",e)}};return(0,l.useEffect)(()=>{i()},[]),{apiKeys:e,generateAPIKey:a,copyAPIKey:n,deleteAPIKey:r}};function er(){let{apiKeys:e,generateAPIKey:t,copyAPIKey:s,deleteAPIKey:a}=en(),[n,i]=(0,l.useState)(new Set),{toast:o}=(0,c.pm)();return(0,r.jsxs)(u.Zb,{className:"grid grid-flow-column border border-gray-300 shadow-md rounded-lg dark:bg-muted dark:border-none border-opacity-50 lg:w-2/3",children:[(0,r.jsxs)(u.Ol,{className:"text-xl grid grid-flow-col grid-cols-[1fr_auto] pb-0",children:[(0,r.jsxs)("span",{className:"flex flex-wrap",children:[(0,r.jsx)(y.s,{className:"h-7 w-7 mr-2"}),"API Keys"]}),(0,r.jsxs)(m.z,{variant:"secondary",className:"!mt-0",onClick:t,children:[(0,r.jsx)(_.v,{weight:"bold",className:"h-5 w-5 mr-2"}),"Generate Key"]})]}),(0,r.jsxs)(u.aY,{className:"overflow-hidden grid gap-6",children:[(0,r.jsxs)("p",{className:"text-md text-gray-400",children:["Access Khoj from the"," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/desktop",target:"_blank",children:"Desktop"}),", ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/obsidian",children:"Obsidian"}),","," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/emacs",children:"Emacs"})," apps and more."]}),(0,r.jsx)(g,{children:(0,r.jsx)(b,{children:e.map(e=>(0,r.jsxs)(w,{children:[(0,r.jsx)(N,{className:"pl-0 py-3",children:e.name}),(0,r.jsxs)(N,{className:"grid grid-flow-col grid-cols-[1fr_auto] bg-secondary dark:bg-background rounded-xl p-3 m-1",children:[(0,r.jsx)("span",{className:"font-mono text-left w-[50px] md:w-[400px]",children:n.has(e.token)?e.token:"".concat(e.token.slice(0,6),"...").concat(e.token.slice(-4))}),(0,r.jsxs)("div",{className:"grid grid-flow-col",children:[n.has(e.token)?(0,r.jsx)(k.N,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>i(t=>{let s=new Set(t);return s.delete(e.token),s})}):(0,r.jsx)(S.b,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>i(new Set([...n,e.token]))}),(0,r.jsx)(T.C,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>{o({title:"\uD83D\uDD11 Copied API Key: ".concat(e.name),description:"Set this API key in the Khoj apps you want to connect to this Khoj account"}),s(e.token)}}),(0,r.jsx)(E.r,{weight:"bold",className:"h-4 w-4 mr-2 md:ml-4 text-red-400 hover:bg-primary/40",onClick:()=>{o({title:"\uD83D\uDD11 Deleted API Key: ".concat(e.name),description:"Apps using this API key will no longer connect to this Khoj account"}),a(e.token)}})]})]})]},e.token))})})]}),(0,r.jsx)(u.eW,{className:"flex flex-wrap gap-4"})]})}function ei(){let{data:e}=(0,d.h2)(!0),[t,s]=(0,l.useState)(null),[a,n]=(0,l.useState)(void 0),[i,p]=(0,l.useState)(null),[j,g]=(0,l.useState)(void 0),[b,w]=(0,l.useState)(""),[N,v]=(0,l.useState)("verified"),[y,_]=(0,l.useState)(!1),[k,S]=(0,l.useState)(0),[T,E]=(0,l.useState)(0),[ee,en]=(0,l.useState)(0),{toast:ei}=(0,c.pm)(),eo=(0,h.IC)(),el="w-full lg:w-5/12 grid grid-flow-column border border-gray-300 shadow-md rounded-lg border dark:border-none border-opacity-50 dark:bg-muted";(0,l.useEffect)(()=>{var t;s(e),g(null==e?void 0:e.phone_number),v((null==e?void 0:e.is_phone_number_verified)?"verified":(null==e?void 0:e.phone_number)?"otp":"setup"),n(null==e?void 0:e.given_name),p(null!==(t=null==e?void 0:e.notion_token)&&void 0!==t?t:null)},[e]);let ec=async e=>{try{if(!(await fetch("/api/subscription?operation=".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to change subscription");t&&(t.subscription_state="cancel"===e?d.o9.UNSUBSCRIBED:d.o9.SUBSCRIBED,s(t)),ei({title:"\uD83D\uDCB3 Subscription",description:(null==t?void 0:t.subscription_state)==="unsubscribed"?"Your subscription was cancelled":"Your Futurist subscription has been renewed"})}catch(t){console.error("Error changing subscription:",t),ei({title:"\uD83D\uDCB3 Subscription",description:"cancel"===e?"Failed to cancel subscription. Try again or contact us at team@khoj.dev":"Failed to renew subscription. Try again or contact us at team@khoj.dev"})}},ed=async()=>{try{let e=await fetch("/api/subscription/trial",{method:"POST"});if(!e.ok)throw Error("Failed to enable free trial");if((await e.json()).trial_enabled&&t){t.subscription_state=d.o9.TRIAL;let e=new Date(Date.now()+864e5*t.length_of_free_trial);t.subscription_renewal_date=(e=>{let t=new Date(e);return new Intl.DateTimeFormat("en-US",{day:"2-digit",month:"short",year:"numeric"}).format(t)})(e),t.subscription_enabled_trial_at=new Date().toISOString(),s(t),ei({title:"\uD83C\uDF89 Trial Enabled",description:"Your free trial will end on ".concat(t.subscription_renewal_date)})}}catch(e){console.error("Error enabling free trial:",e),ei({title:"⚠️ Failed to Enable Free Trial",description:"Failed to enable free trial. Try again or contact us at team@khoj.dev"})}},eh=async()=>{if(a)try{if(!(await fetch("/api/user/name?name=".concat(a),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update name");t&&(t.given_name=a,s(t)),ei({title:"✅ Updated Profile",description:"You name has been updated to ".concat(a)})}catch(e){console.error("Error updating name:",e),ei({title:"⚠️ Failed to Update Profile",description:"Failed to update name. Try again or contact team@khoj.dev"})}},em=e=>async s=>{let a="chat"===e?null==t?void 0:t.chat_model_options:"paint"===e?null==t?void 0:t.paint_model_options:null==t?void 0:t.voice_model_options,n=null==a?void 0:a.find(e=>e.id.toString()===s),r=null==n?void 0:n.name;if(!(null==t?void 0:t.is_active)&&(null==n?void 0:n.tier)!=="free"){ei({title:"Model Update",description:"Subscribe to switch ".concat(e," model to ").concat(r,"."),variant:"destructive"});return}try{if(!(await fetch("/api/model/".concat(e,"?id=")+s,{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to switch ".concat(e," model to ").concat(r));ei({title:"✅ Switched ".concat(e," model to ").concat(r)})}catch(t){console.error("Failed to update ".concat(e," model to ").concat(r,":"),t),ei({description:"❌ Failed to switch ".concat(e," model to ").concat(r,". Try again."),variant:"destructive"})}},ex=async()=>{try{_(!0);let e=await fetch("/api/chat/stats"),t=(await e.json()).num_conversations;en(t);let s=new(et()),a=[];for(let e=0;10*e<t;e++){let s=await fetch("/api/chat/export?page=".concat(e)),n=await s.json();a.push(...n),E((e+1)*10),S((e+1)*10/t*100)}s.file("conversations.json",JSON.stringify(a,null,2));let n=await s.generateAsync({type:"blob"});(0,es.saveAs)(n,"khoj-conversations.zip"),ei({title:"Export Complete",description:"Successfully exported ".concat(a.length," conversations")})}catch(e){console.error("Error exporting chats:",e),ei({title:"Export Failed",description:"Failed to export chats. Please try again.",variant:"destructive"})}finally{_(!1),S(0),E(0),en(0)}},eu=async()=>{if(i)try{if(!(await fetch("/api/content/notion",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:i})})).ok)throw Error("Failed to save Notion API key");t&&(t.notion_token=i,s(t)),ei({title:"✅ Saved Notion Settings",description:"You Notion API key has been saved."})}catch(e){console.error("Error updating name:",e),ei({title:"⚠️ Failed to Save Notion Settings",description:"Failed to save Notion API key. Try again or contact team@khoj.dev"})}},ep=async e=>{try{if(!(await fetch("/api/content?t=".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to sync content from ".concat(e));ei({title:"\uD83D\uDD04 Syncing ".concat(e),description:"Your ".concat(e," content is being synced.")})}catch(t){console.error("Error syncing content:",t),ei({title:"⚠️ Failed to Sync ".concat(e),description:"Failed to sync ".concat(e," content. Try again or contact team@khoj.dev")})}},ef=async e=>{try{if(!(await fetch("/api/content/source/".concat(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect ".concat(e));t&&("computer"===e?t.enabled_content_source.computer=!1:"notion"===e?(t.enabled_content_source.notion=!1,t.notion_token=null,p(t.notion_token)):"github"===e&&(t.enabled_content_source.github=!1),s(t)),"computer"===e?ei({title:"✅ Deleted Synced Files",description:"Your synced documents have been deleted."}):ei({title:"✅ Disconnected ".concat(e),description:"Your ".concat(e," integration to Khoj has been disconnected.")})}catch(t){console.error("Error disconnecting ".concat(e,":"),t),ei({title:"⚠️ Failed to Disconnect ".concat(e),description:"Failed to disconnect from ".concat(e,". Try again or contact team@khoj.dev")})}};return t?(0,r.jsxs)(J.Hn,{children:[(0,r.jsx)($.S,{conversationId:""}),(0,r.jsxs)(J.kV,{children:[(0,r.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,r.jsx)(J.vP,{className:"-ml-1"}),(0,r.jsx)(q.Z,{orientation:"vertical",className:"mr-2 h-4"}),eo?(0,r.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,r.jsx)(X.VO,{className:"h-auto w-16"})}):(0,r.jsx)("h2",{className:"text-lg",children:"Settings"})]}),(0,r.jsxs)("div",{className:o().page,children:[(0,r.jsx)("title",{children:"Settings"}),(0,r.jsx)("div",{className:o().content,children:(0,r.jsx)("div",{className:"".concat(o().contentBody," mx-10 my-2"),children:(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(L.Z,{}),children:(0,r.jsxs)("div",{id:"content",className:"grid grid-flow-column sm:grid-flow-row gap-16 m-8",children:[(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Profile"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(u.Zb,{className:el,children:[(0,r.jsxs)(u.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(C.Y,{className:"h-7 w-7 mr-2"}),"Name"]}),(0,r.jsxs)(u.aY,{className:"overflow-hidden",children:[(0,r.jsx)("p",{className:"pb-4 text-gray-400",children:"What should Khoj refer to you as?"}),(0,r.jsx)(x.I,{type:"text",onChange:e=>n(e.target.value),value:a||"",className:"w-full border border-gray-300 rounded-lg p-4 py-6"})]}),(0,r.jsx)(u.eW,{className:"flex flex-wrap gap-4",children:(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:eh,disabled:a===t.given_name,children:[(0,r.jsx)(D.B,{className:"h-5 w-5 inline mr-2"}),"Save"]})})]}),(0,r.jsxs)(u.Zb,{id:"subscription",className:el,children:[(0,r.jsxs)(u.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(F.a,{className:"h-7 w-7 mr-2"}),"Subscription"]}),(0,r.jsxs)(u.aY,{className:"grid gap-2 overflow-hidden",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Current Plan"}),"trial"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl text-primary/80",children:"Futurist (Trial)"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["You are on a"," ",t.length_of_free_trial," ","day trial of the Khoj Futurist plan. Your trial ends on"," ",t.subscription_renewal_date,". Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/#pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})||"subscribed"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl text-primary/80",children:"Futurist"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"renews"})," on"," ",(0,r.jsx)("b",{children:t.subscription_renewal_date})]})]})||"unsubscribed"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Futurist"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"ends"})," on"," ",(0,r.jsx)("b",{children:t.subscription_renewal_date})]})]})||"expired"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Humanist"}),t.subscription_renewal_date&&(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"expired"})," ","on"," ",(0,r.jsx)("b",{children:t.subscription_renewal_date})]})||(0,r.jsxs)("p",{className:"text-gray-400",children:["Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/#pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})]}),(0,r.jsx)(u.eW,{className:"flex flex-wrap gap-4",children:"subscribed"==t.subscription_state&&(0,r.jsxs)(m.z,{variant:"outline",className:"hover:text-red-400",onClick:()=>ec("cancel"),children:[(0,r.jsx)(A.b,{className:"h-5 w-5 mr-2"}),"Unsubscribe"]})||"unsubscribed"==t.subscription_state&&(0,r.jsxs)(m.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>ec("resubscribe"),children:[(0,r.jsx)(P.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Resubscribe"]})||t.subscription_enabled_trial_at&&(0,r.jsxs)(m.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>window.open("".concat(t.khoj_cloud_subscription_url,"?prefilled_email=").concat(t.username),"_blank","noopener,noreferrer"),children:[(0,r.jsx)(P.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Subscribe"]})||(0,r.jsxs)(m.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:ed,children:[(0,r.jsx)(P.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Enable Trial"]})})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Content"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(u.Zb,{id:"computer",className:el,children:[(0,r.jsxs)(u.Ol,{className:"flex flex-row text-xl",children:[(0,r.jsx)(I.a,{className:"h-8 w-8 mr-2"}),"Knowledge Base",t.enabled_content_source.computer&&(0,r.jsx)(O.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsx)(u.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Manage and search through your digital brain."}),(0,r.jsxs)(u.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsxs)(m.z,{variant:"outline",size:"sm",title:"Search thorugh files",onClick:()=>window.location.href="/search",children:[(0,r.jsx)(z.Y,{className:"h-5 w-5 inline mr-1"}),"Search"]}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(t.enabled_content_source.computer||"hidden"),onClick:()=>ef("computer"),children:[(0,r.jsx)(Y.u,{className:"h-5 w-5 inline mr-1"}),"Clear All"]})]})]}),(0,r.jsxs)(u.Zb,{id:"github",className:"".concat(el," hidden"),children:[(0,r.jsxs)(u.Ol,{className:"flex flex-row text-2xl",children:[(0,r.jsx)(R.b,{className:"h-8 w-8 mr-2"}),"Github"]}),(0,r.jsx)(u.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Set Github repositories to index"}),(0,r.jsxs)(u.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsx)(m.z,{variant:"outline",size:"sm",children:t.enabled_content_source.github&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(K.h,{className:"h-5 w-5 inline mr-1"}),"Manage"]})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(B.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]})}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(t.enabled_content_source.github||"hidden"),children:[(0,r.jsx)(Y.u,{className:"h-5 w-5 inline mr-1"}),"Disable"]})]})]}),(0,r.jsxs)(u.Zb,{id:"notion",className:el,children:[(0,r.jsxs)(u.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(W.F,{className:"h-7 w-7 mr-2"}),"Notion",t.enabled_content_source.notion&&(0,r.jsx)(O.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsxs)(u.aY,{className:"grid gap-4",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Sync your Notion workspace."}),!t.notion_oauth_url&&(0,r.jsx)(x.I,{onChange:e=>p(e.target.value),value:i||"",placeholder:"Enter API Key of your Khoj integration on Notion",className:"w-full border border-gray-300 rounded-lg px-4 py-6"})]}),(0,r.jsxs)(u.eW,{className:"flex flex-wrap gap-4",children:[t.notion_oauth_url&&!t.enabled_content_source.notion?(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:()=>{window.open(t.notion_oauth_url)},children:[(0,r.jsx)(B.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]}):t.enabled_content_source.notion&&i===t.notion_token?(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:()=>ep("notion"),children:[(0,r.jsx)(Z.t,{className:"h-5 w-5 inline mr-1"}),"Sync"]}):t.notion_oauth_url?(0,r.jsx)(r.Fragment,{}):(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:eu,disabled:i===t.notion_token,children:[(0,r.jsx)(D.B,{className:"h-5 w-5 inline mr-1"}),t.enabled_content_source.notion&&"Update API Key"||"Set API Key"]}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(t.notion_token||"hidden"),onClick:()=>ef("notion"),children:[(0,r.jsx)(Y.u,{className:"h-5 w-5 inline mr-1"}),"Disconnect"]})]})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Models"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[t.chat_model_options.length>0&&(0,r.jsxs)(u.Zb,{className:el,children:[(0,r.jsxs)(u.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(U.G,{className:"h-7 w-7 mr-2"}),"Chat"]}),(0,r.jsxs)(u.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the chat model to generate text responses"}),(0,r.jsx)(ea,{items:t.chat_model_options,selected:t.selected_chat_model_config,isActive:t.is_active,callbackFunc:em("chat")})]}),(0,r.jsx)(u.eW,{className:"flex flex-wrap gap-4",children:!t.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:t.chat_model_options.some(e=>"free"===e.tier)?"Free models available":"Subscribe to switch model"})})]}),t.paint_model_options.length>0&&(0,r.jsxs)(u.Zb,{className:el,children:[(0,r.jsxs)(u.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(M.Y,{className:"h-7 w-7 mr-2"}),"Paint"]}),(0,r.jsxs)(u.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the paint model to generate image responses"}),(0,r.jsx)(ea,{items:t.paint_model_options,selected:t.selected_paint_model_config,isActive:t.is_active,callbackFunc:em("paint")})]}),(0,r.jsx)(u.eW,{className:"flex flex-wrap gap-4",children:!t.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:t.paint_model_options.some(e=>"free"===e.tier)?"Free models available":"Subscribe to switch model"})})]}),t.voice_model_options.length>0&&(0,r.jsxs)(u.Zb,{className:el,children:[(0,r.jsxs)(u.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(H.u,{className:"h-7 w-7 mr-2"}),"Voice"]}),(0,r.jsxs)(u.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the voice model to generate speech responses"}),(0,r.jsx)(ea,{items:t.voice_model_options,selected:t.selected_voice_model_config,isActive:t.is_active,callbackFunc:em("voice")})]}),(0,r.jsx)(u.eW,{className:"flex flex-wrap gap-4",children:!t.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:t.voice_model_options.some(e=>"free"===e.tier)?"Free models available":"Subscribe to switch model"})})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{id:"clients",className:"text-2xl",children:"Clients"}),(0,r.jsx)("div",{className:"cards flex flex-col flex-wrap gap-8",children:!t.anonymous_mode&&(0,r.jsx)(er,{})})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{id:"clients",className:"text-2xl",children:"Account"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(u.Zb,{className:el,children:[(0,r.jsxs)(u.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(V.U,{className:"h-7 w-7 mr-2"}),"Export Data"]}),(0,r.jsxs)(u.aY,{className:"overflow-hidden",children:[(0,r.jsx)("p",{className:"pb-4 text-gray-400",children:"Download all your chat conversations"}),k>0&&(0,r.jsxs)("div",{className:"w-full mt-4",children:[(0,r.jsx)(Q.E,{value:k,className:"w-full"}),(0,r.jsxs)("p",{className:"text-sm text-gray-500 mt-2",children:["Exported ",T," of ",ee," conversations"]})]})]}),(0,r.jsx)(u.eW,{className:"flex flex-wrap gap-4",children:(0,r.jsxs)(m.z,{variant:"outline",onClick:ex,disabled:y,children:[(0,r.jsx)(V.U,{className:"h-5 w-5 mr-2"}),y?"Exporting...":"Export Chats"]})})]}),(0,r.jsxs)(u.Zb,{className:el,children:[(0,r.jsxs)(u.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(G.S,{className:"h-7 w-7 mr-2 text-red-500"}),"Delete Account"]}),(0,r.jsx)(u.aY,{className:"overflow-hidden",children:(0,r.jsxs)("p",{className:"pb-4 text-gray-400",children:["This will delete all your account data, including conversations, agents, and any assets you","'","ve generated. Be sure to export before you do this if you want to keep your information."]})}),(0,r.jsx)(u.eW,{className:"flex flex-wrap gap-4",children:(0,r.jsxs)(f.aR,{children:[(0,r.jsx)(f.vW,{asChild:!0,children:(0,r.jsxs)(m.z,{variant:"outline",className:"text-red-500 hover:text-red-600 hover:bg-red-50",children:[(0,r.jsx)(G.S,{className:"h-5 w-5 mr-2"}),"Delete Account"]})}),(0,r.jsxs)(f._T,{children:[(0,r.jsxs)(f.fY,{children:[(0,r.jsx)(f.f$,{children:"Are you absolutely sure?"}),(0,r.jsx)(f.yT,{children:"This action is irreversible. This will permanently delete your account and remove all your data from our servers."})]}),(0,r.jsxs)(f.xo,{children:[(0,r.jsx)(f.le,{children:"Cancel"}),(0,r.jsxs)(f.OL,{className:"bg-red-500 hover:bg-red-600",onClick:async()=>{try{if(!(await fetch("/api/self",{method:"DELETE"})).ok)throw Error("Failed to delete account");ei({title:"Account Deleted",description:"Your account has been successfully deleted."}),window.location.href="/"}catch(e){console.error("Error deleting account:",e),ei({title:"Error",description:"Failed to delete account. Please try again or contact support.",variant:"destructive"})}},children:[(0,r.jsx)(G.S,{className:"h-5 w-5 mr-2"}),"Delete Account"]})]})]})]})})]})]})]})]})})})})]})]})]}):(0,r.jsx)(L.Z,{})}(a=n||(n={})).Setup="setup",a.SendOTP="otp",a.VerifyOTP="verify",a.Verified="verified"},32759:function(e,t,s){"use strict";s.d(t,{E:function(){return o}});var a=s(57437),n=s(2265),r=s(60610),i=s(94508);let o=n.forwardRef((e,t)=>{let{className:s,value:n,indicatorColor:o,...l}=e;return(0,a.jsx)(r.fC,{ref:t,className:(0,i.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",s),...l,children:(0,a.jsx)(r.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(o),style:{transform:"translateX(-".concat(100-(n||0),"%)")}})})});o.displayName=r.fC.displayName},77992:function(e,t,s){"use strict";s.d(t,{pm:function(){return m}});var a=s(2265);let n=0,r=new Map,i=e=>{if(r.has(e))return;let t=setTimeout(()=>{r.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);r.set(e,t)},o=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:s}=t;return s?i(s):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===s||void 0===s?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},l=[],c={toasts:[]};function d(e){c=o(c,e),l.forEach(e=>{e(c)})}function h(e){let{...t}=e,s=(n=(n+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>d({type:"DISMISS_TOAST",toastId:s});return d({type:"ADD_TOAST",toast:{...t,id:s,open:!0,onOpenChange:e=>{e||a()}}}),{id:s,dismiss:a,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:s}})}}function m(){let[e,t]=a.useState(c);return a.useEffect(()=>(l.push(t),()=>{let e=l.indexOf(t);e>-1&&l.splice(e,1)}),[e]),{...e,toast:h,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},917:function(e){e.exports={page:"settings_page__mP7qk",contentBody:"settings_contentBody__uZjue",phoneInput:"settings_phoneInput__j6xJN"}}},function(e){e.O(0,[6008,5638,2939,7200,8667,1327,4609,945,5303,2327,2971,2117,1744],function(){return e(e.s=62960)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6938],{62960:function(e,t,s){Promise.resolve().then(s.bind(s,31537))},31537:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return ei}});var a,n,r=s(57437),i=s(917),o=s.n(i);s(97510);var l=s(2265),c=s(77992),d=s(56937),h=s(7436),m=s(62869),x=s(95186),u=s(66070),p=s(84190),f=s(37099),j=s(94508);let g=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("div",{className:"relative w-full overflow-auto",children:(0,r.jsx)("table",{ref:t,className:(0,j.cn)("w-full caption-bottom text-sm",s),...a})})});g.displayName="Table",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("thead",{ref:t,className:(0,j.cn)("[&_tr]:border-b",s),...a})}).displayName="TableHeader";let b=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tbody",{ref:t,className:(0,j.cn)("[&_tr:last-child]:border-0",s),...a})});b.displayName="TableBody",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tfoot",{ref:t,className:(0,j.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...a})}).displayName="TableFooter";let w=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tr",{ref:t,className:(0,j.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...a})});w.displayName="TableRow",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("th",{ref:t,className:(0,j.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...a})}).displayName="TableHead";let N=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("td",{ref:t,className:(0,j.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...a})});N.displayName="TableCell",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("caption",{ref:t,className:(0,j.cn)("mt-4 text-sm text-muted-foreground",s),...a})}).displayName="TableCaption";var v=s(72102),y=s(24633),_=s(2335),k=s(7861),S=s(75921),T=s(39957),E=s(96620),C=s(6009),D=s(65241),F=s(36921),A=s(37052),P=s(53880),I=s(49807),O=s(68772),z=s(80382),Y=s(57248),R=s(73278),K=s(66932),B=s(71946),W=s(3467),Z=s(54928),U=s(29822),M=s(58905),H=s(82033),V=s(25778),G=s(47673),L=s(14308),J=s(60729),$=s(34124),q=s(6512),X=s(37104),Q=s(32759),ee=s(57635),et=s.n(ee),es=s(12);let ea=e=>{var t,s;let{items:a,selected:n,isActive:i,callbackFunc:o}=e,[c,d]=(0,l.useState)(null!==(s=null==n?void 0:n.toString())&&void 0!==s?s:"0");return!!n&&(0,r.jsx)("div",{className:"overflow-hidden shadow-md rounded-lg",children:(0,r.jsxs)(p.h_,{children:[(0,r.jsx)(p.$F,{asChild:!0,className:"w-full rounded-lg",children:(0,r.jsxs)(m.z,{variant:"outline",className:"justify-start py-6 rounded-lg",children:[null===(t=a.find(e=>e.id.toString()===c))||void 0===t?void 0:t.name," ",(0,r.jsx)(v.p,{className:"h-4 w-4 ml-auto text-muted-foreground"})]})}),(0,r.jsx)(p.AW,{style:{maxHeight:"200px",overflowY:"auto",minWidth:"var(--radix-dropdown-menu-trigger-width)"},children:(0,r.jsx)(p._x,{value:c,onValueChange:async e=>{d(e),await o(e)},children:a.map(e=>(0,r.jsxs)(p.qB,{value:e.id.toString(),disabled:!i&&"free"!==e.tier,children:[e.name," ","standard"===e.tier&&(0,r.jsx)("span",{className:"text-green-500 ml-2",children:"(Futurist)"})]},e.id.toString()))})})]})})},en=()=>{let[e,t]=(0,l.useState)([]),{toast:s}=(0,c.pm)(),a=async()=>{try{let e=await fetch("/auth/token",{method:"POST",headers:{"Content-Type":"application/json"}}),s=await e.json();t(e=>[...e,s])}catch(e){console.error("Error generating API key:",e)}},n=async e=>{try{await navigator.clipboard.writeText(e),s({title:"\uD83D\uDD11 API Key",description:"Copied to clipboard"})}catch(e){console.error("Error copying API key:",e)}},r=async e=>{try{(await fetch("/auth/token?token=".concat(e),{method:"DELETE"})).ok&&t(t=>t.filter(t=>t.token!==e))}catch(e){console.error("Error deleting API key:",e)}},i=async()=>{try{let e=await fetch("/auth/token"),s=await e.json();(null==s?void 0:s.length)>0&&t(s)}catch(e){console.error("Error listing API keys:",e)}};return(0,l.useEffect)(()=>{i()},[]),{apiKeys:e,generateAPIKey:a,copyAPIKey:n,deleteAPIKey:r}};function er(){let{apiKeys:e,generateAPIKey:t,copyAPIKey:s,deleteAPIKey:a}=en(),[n,i]=(0,l.useState)(new Set),{toast:o}=(0,c.pm)();return(0,r.jsxs)(u.Zb,{className:"grid grid-flow-column border border-gray-300 shadow-md rounded-lg dark:bg-muted dark:border-none border-opacity-50 lg:w-2/3",children:[(0,r.jsxs)(u.Ol,{className:"text-xl grid grid-flow-col grid-cols-[1fr_auto] pb-0",children:[(0,r.jsxs)("span",{className:"flex flex-wrap",children:[(0,r.jsx)(y.s,{className:"h-7 w-7 mr-2"}),"API Keys"]}),(0,r.jsxs)(m.z,{variant:"secondary",className:"!mt-0",onClick:t,children:[(0,r.jsx)(_.v,{weight:"bold",className:"h-5 w-5 mr-2"}),"Generate Key"]})]}),(0,r.jsxs)(u.aY,{className:"overflow-hidden grid gap-6",children:[(0,r.jsxs)("p",{className:"text-md text-gray-400",children:["Access Khoj from the"," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/desktop",target:"_blank",children:"Desktop"}),", ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/obsidian",children:"Obsidian"}),","," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/emacs",children:"Emacs"})," apps and more."]}),(0,r.jsx)(g,{children:(0,r.jsx)(b,{children:e.map(e=>(0,r.jsxs)(w,{children:[(0,r.jsx)(N,{className:"pl-0 py-3",children:e.name}),(0,r.jsxs)(N,{className:"grid grid-flow-col grid-cols-[1fr_auto] bg-secondary dark:bg-background rounded-xl p-3 m-1",children:[(0,r.jsx)("span",{className:"font-mono text-left w-[50px] md:w-[400px]",children:n.has(e.token)?e.token:"".concat(e.token.slice(0,6),"...").concat(e.token.slice(-4))}),(0,r.jsxs)("div",{className:"grid grid-flow-col",children:[n.has(e.token)?(0,r.jsx)(k.N,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>i(t=>{let s=new Set(t);return s.delete(e.token),s})}):(0,r.jsx)(S.b,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>i(new Set([...n,e.token]))}),(0,r.jsx)(T.C,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>{o({title:"\uD83D\uDD11 Copied API Key: ".concat(e.name),description:"Set this API key in the Khoj apps you want to connect to this Khoj account"}),s(e.token)}}),(0,r.jsx)(E.r,{weight:"bold",className:"h-4 w-4 mr-2 md:ml-4 text-red-400 hover:bg-primary/40",onClick:()=>{o({title:"\uD83D\uDD11 Deleted API Key: ".concat(e.name),description:"Apps using this API key will no longer connect to this Khoj account"}),a(e.token)}})]})]})]},e.token))})})]}),(0,r.jsx)(u.eW,{className:"flex flex-wrap gap-4"})]})}function ei(){let{data:e}=(0,d.h2)(!0),[t,s]=(0,l.useState)(null),[a,n]=(0,l.useState)(void 0),[i,p]=(0,l.useState)(null),[j,g]=(0,l.useState)(void 0),[b,w]=(0,l.useState)(""),[N,v]=(0,l.useState)("verified"),[y,_]=(0,l.useState)(!1),[k,S]=(0,l.useState)(0),[T,E]=(0,l.useState)(0),[ee,en]=(0,l.useState)(0),{toast:ei}=(0,c.pm)(),eo=(0,h.IC)(),el="w-full lg:w-5/12 grid grid-flow-column border border-gray-300 shadow-md rounded-lg border dark:border-none border-opacity-50 dark:bg-muted";(0,l.useEffect)(()=>{var t;s(e),g(null==e?void 0:e.phone_number),v((null==e?void 0:e.is_phone_number_verified)?"verified":(null==e?void 0:e.phone_number)?"otp":"setup"),n(null==e?void 0:e.given_name),p(null!==(t=null==e?void 0:e.notion_token)&&void 0!==t?t:null)},[e]);let ec=async e=>{try{if(!(await fetch("/api/subscription?operation=".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to change subscription");t&&(t.subscription_state="cancel"===e?d.o9.UNSUBSCRIBED:d.o9.SUBSCRIBED,s(t)),ei({title:"\uD83D\uDCB3 Subscription",description:(null==t?void 0:t.subscription_state)==="unsubscribed"?"Your subscription was cancelled":"Your Futurist subscription has been renewed"})}catch(t){console.error("Error changing subscription:",t),ei({title:"\uD83D\uDCB3 Subscription",description:"cancel"===e?"Failed to cancel subscription. Try again or contact us at team@khoj.dev":"Failed to renew subscription. Try again or contact us at team@khoj.dev"})}},ed=async()=>{try{let e=await fetch("/api/subscription/trial",{method:"POST"});if(!e.ok)throw Error("Failed to enable free trial");if((await e.json()).trial_enabled&&t){t.subscription_state=d.o9.TRIAL;let e=new Date(Date.now()+864e5*t.length_of_free_trial);t.subscription_renewal_date=(e=>{let t=new Date(e);return new Intl.DateTimeFormat("en-US",{day:"2-digit",month:"short",year:"numeric"}).format(t)})(e),t.subscription_enabled_trial_at=new Date().toISOString(),s(t),ei({title:"\uD83C\uDF89 Trial Enabled",description:"Your free trial will end on ".concat(t.subscription_renewal_date)})}}catch(e){console.error("Error enabling free trial:",e),ei({title:"⚠️ Failed to Enable Free Trial",description:"Failed to enable free trial. Try again or contact us at team@khoj.dev"})}},eh=async()=>{if(a)try{if(!(await fetch("/api/user/name?name=".concat(a),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update name");t&&(t.given_name=a,s(t)),ei({title:"✅ Updated Profile",description:"You name has been updated to ".concat(a)})}catch(e){console.error("Error updating name:",e),ei({title:"⚠️ Failed to Update Profile",description:"Failed to update name. Try again or contact team@khoj.dev"})}},em=e=>async s=>{let a="chat"===e?null==t?void 0:t.chat_model_options:"paint"===e?null==t?void 0:t.paint_model_options:null==t?void 0:t.voice_model_options,n=null==a?void 0:a.find(e=>e.id.toString()===s),r=null==n?void 0:n.name;if(!(null==t?void 0:t.is_active)&&(null==n?void 0:n.tier)!=="free"){ei({title:"Model Update",description:"Subscribe to switch ".concat(e," model to ").concat(r,"."),variant:"destructive"});return}try{if(!(await fetch("/api/model/".concat(e,"?id=")+s,{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to switch ".concat(e," model to ").concat(r));ei({title:"✅ Switched ".concat(e," model to ").concat(r)})}catch(t){console.error("Failed to update ".concat(e," model to ").concat(r,":"),t),ei({description:"❌ Failed to switch ".concat(e," model to ").concat(r,". Try again."),variant:"destructive"})}},ex=async()=>{try{_(!0);let e=await fetch("/api/chat/stats"),t=(await e.json()).num_conversations;en(t);let s=new(et()),a=[];for(let e=0;10*e<t;e++){let s=await fetch("/api/chat/export?page=".concat(e)),n=await s.json();a.push(...n),E((e+1)*10),S((e+1)*10/t*100)}s.file("conversations.json",JSON.stringify(a,null,2));let n=await s.generateAsync({type:"blob"});(0,es.saveAs)(n,"khoj-conversations.zip"),ei({title:"Export Complete",description:"Successfully exported ".concat(a.length," conversations")})}catch(e){console.error("Error exporting chats:",e),ei({title:"Export Failed",description:"Failed to export chats. Please try again.",variant:"destructive"})}finally{_(!1),S(0),E(0),en(0)}},eu=async()=>{if(i)try{if(!(await fetch("/api/content/notion",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:i})})).ok)throw Error("Failed to save Notion API key");t&&(t.notion_token=i,s(t)),ei({title:"✅ Saved Notion Settings",description:"You Notion API key has been saved."})}catch(e){console.error("Error updating name:",e),ei({title:"⚠️ Failed to Save Notion Settings",description:"Failed to save Notion API key. Try again or contact team@khoj.dev"})}},ep=async e=>{try{if(!(await fetch("/api/content?t=".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to sync content from ".concat(e));ei({title:"\uD83D\uDD04 Syncing ".concat(e),description:"Your ".concat(e," content is being synced.")})}catch(t){console.error("Error syncing content:",t),ei({title:"⚠️ Failed to Sync ".concat(e),description:"Failed to sync ".concat(e," content. Try again or contact team@khoj.dev")})}},ef=async e=>{try{if(!(await fetch("/api/content/source/".concat(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect ".concat(e));t&&("computer"===e?t.enabled_content_source.computer=!1:"notion"===e?(t.enabled_content_source.notion=!1,t.notion_token=null,p(t.notion_token)):"github"===e&&(t.enabled_content_source.github=!1),s(t)),"computer"===e?ei({title:"✅ Deleted Synced Files",description:"Your synced documents have been deleted."}):ei({title:"✅ Disconnected ".concat(e),description:"Your ".concat(e," integration to Khoj has been disconnected.")})}catch(t){console.error("Error disconnecting ".concat(e,":"),t),ei({title:"⚠️ Failed to Disconnect ".concat(e),description:"Failed to disconnect from ".concat(e,". Try again or contact team@khoj.dev")})}};return t?(0,r.jsxs)(J.Hn,{children:[(0,r.jsx)($.S,{conversationId:""}),(0,r.jsxs)(J.kV,{children:[(0,r.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,r.jsx)(J.vP,{className:"-ml-1"}),(0,r.jsx)(q.Z,{orientation:"vertical",className:"mr-2 h-4"}),eo?(0,r.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,r.jsx)(X.VO,{className:"h-auto w-16"})}):(0,r.jsx)("h2",{className:"text-lg",children:"Settings"})]}),(0,r.jsxs)("div",{className:o().page,children:[(0,r.jsx)("title",{children:"Settings"}),(0,r.jsx)("div",{className:o().content,children:(0,r.jsx)("div",{className:"".concat(o().contentBody," mx-10 my-2"),children:(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(L.Z,{}),children:(0,r.jsxs)("div",{id:"content",className:"grid grid-flow-column sm:grid-flow-row gap-16 m-8",children:[(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Profile"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(u.Zb,{className:el,children:[(0,r.jsxs)(u.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(C.Y,{className:"h-7 w-7 mr-2"}),"Name"]}),(0,r.jsxs)(u.aY,{className:"overflow-hidden",children:[(0,r.jsx)("p",{className:"pb-4 text-gray-400",children:"What should Khoj refer to you as?"}),(0,r.jsx)(x.I,{type:"text",onChange:e=>n(e.target.value),value:a||"",className:"w-full border border-gray-300 rounded-lg p-4 py-6"})]}),(0,r.jsx)(u.eW,{className:"flex flex-wrap gap-4",children:(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:eh,disabled:a===t.given_name,children:[(0,r.jsx)(D.B,{className:"h-5 w-5 inline mr-2"}),"Save"]})})]}),(0,r.jsxs)(u.Zb,{id:"subscription",className:el,children:[(0,r.jsxs)(u.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(F.a,{className:"h-7 w-7 mr-2"}),"Subscription"]}),(0,r.jsxs)(u.aY,{className:"grid gap-2 overflow-hidden",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Current Plan"}),"trial"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl text-primary/80",children:"Futurist (Trial)"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["You are on a"," ",t.length_of_free_trial," ","day trial of the Khoj Futurist plan. Your trial ends on"," ",t.subscription_renewal_date,". Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/#pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})||"subscribed"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl text-primary/80",children:"Futurist"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"renews"})," on"," ",(0,r.jsx)("b",{children:t.subscription_renewal_date})]})]})||"unsubscribed"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Futurist"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"ends"})," on"," ",(0,r.jsx)("b",{children:t.subscription_renewal_date})]})]})||"expired"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Humanist"}),t.subscription_renewal_date&&(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"expired"})," ","on"," ",(0,r.jsx)("b",{children:t.subscription_renewal_date})]})||(0,r.jsxs)("p",{className:"text-gray-400",children:["Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/#pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})]}),(0,r.jsx)(u.eW,{className:"flex flex-wrap gap-4",children:"subscribed"==t.subscription_state&&(0,r.jsxs)(m.z,{variant:"outline",className:"hover:text-red-400",onClick:()=>ec("cancel"),children:[(0,r.jsx)(A.b,{className:"h-5 w-5 mr-2"}),"Unsubscribe"]})||"unsubscribed"==t.subscription_state&&(0,r.jsxs)(m.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>ec("resubscribe"),children:[(0,r.jsx)(P.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Resubscribe"]})||t.subscription_enabled_trial_at&&(0,r.jsxs)(m.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>window.open("".concat(t.khoj_cloud_subscription_url,"?prefilled_email=").concat(t.username),"_blank","noopener,noreferrer"),children:[(0,r.jsx)(P.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Subscribe"]})||(0,r.jsxs)(m.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:ed,children:[(0,r.jsx)(P.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Enable Trial"]})})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Content"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(u.Zb,{id:"computer",className:el,children:[(0,r.jsxs)(u.Ol,{className:"flex flex-row text-xl",children:[(0,r.jsx)(I.a,{className:"h-8 w-8 mr-2"}),"Knowledge Base",t.enabled_content_source.computer&&(0,r.jsx)(O.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsx)(u.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Manage and search through your digital brain."}),(0,r.jsxs)(u.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsxs)(m.z,{variant:"outline",size:"sm",title:"Search thorugh files",onClick:()=>window.location.href="/search",children:[(0,r.jsx)(z.Y,{className:"h-5 w-5 inline mr-1"}),"Search"]}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(t.enabled_content_source.computer||"hidden"),onClick:()=>ef("computer"),children:[(0,r.jsx)(Y.u,{className:"h-5 w-5 inline mr-1"}),"Clear All"]})]})]}),(0,r.jsxs)(u.Zb,{id:"github",className:"".concat(el," hidden"),children:[(0,r.jsxs)(u.Ol,{className:"flex flex-row text-2xl",children:[(0,r.jsx)(R.b,{className:"h-8 w-8 mr-2"}),"Github"]}),(0,r.jsx)(u.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Set Github repositories to index"}),(0,r.jsxs)(u.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsx)(m.z,{variant:"outline",size:"sm",children:t.enabled_content_source.github&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(K.h,{className:"h-5 w-5 inline mr-1"}),"Manage"]})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(B.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]})}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(t.enabled_content_source.github||"hidden"),children:[(0,r.jsx)(Y.u,{className:"h-5 w-5 inline mr-1"}),"Disable"]})]})]}),(0,r.jsxs)(u.Zb,{id:"notion",className:el,children:[(0,r.jsxs)(u.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(W.F,{className:"h-7 w-7 mr-2"}),"Notion",t.enabled_content_source.notion&&(0,r.jsx)(O.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsxs)(u.aY,{className:"grid gap-4",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Sync your Notion workspace."}),!t.notion_oauth_url&&(0,r.jsx)(x.I,{onChange:e=>p(e.target.value),value:i||"",placeholder:"Enter API Key of your Khoj integration on Notion",className:"w-full border border-gray-300 rounded-lg px-4 py-6"})]}),(0,r.jsxs)(u.eW,{className:"flex flex-wrap gap-4",children:[t.notion_oauth_url&&!t.enabled_content_source.notion?(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:()=>{window.open(t.notion_oauth_url)},children:[(0,r.jsx)(B.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]}):t.enabled_content_source.notion&&i===t.notion_token?(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:()=>ep("notion"),children:[(0,r.jsx)(Z.t,{className:"h-5 w-5 inline mr-1"}),"Sync"]}):t.notion_oauth_url?(0,r.jsx)(r.Fragment,{}):(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:eu,disabled:i===t.notion_token,children:[(0,r.jsx)(D.B,{className:"h-5 w-5 inline mr-1"}),t.enabled_content_source.notion&&"Update API Key"||"Set API Key"]}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(t.notion_token||"hidden"),onClick:()=>ef("notion"),children:[(0,r.jsx)(Y.u,{className:"h-5 w-5 inline mr-1"}),"Disconnect"]})]})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Models"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[t.chat_model_options.length>0&&(0,r.jsxs)(u.Zb,{className:el,children:[(0,r.jsxs)(u.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(U.G,{className:"h-7 w-7 mr-2"}),"Chat"]}),(0,r.jsxs)(u.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the chat model to generate text responses"}),(0,r.jsx)(ea,{items:t.chat_model_options,selected:t.selected_chat_model_config,isActive:t.is_active,callbackFunc:em("chat")})]}),(0,r.jsx)(u.eW,{className:"flex flex-wrap gap-4",children:!t.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:t.chat_model_options.some(e=>"free"===e.tier)?"Free models available":"Subscribe to switch model"})})]}),t.paint_model_options.length>0&&(0,r.jsxs)(u.Zb,{className:el,children:[(0,r.jsxs)(u.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(M.Y,{className:"h-7 w-7 mr-2"}),"Paint"]}),(0,r.jsxs)(u.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the paint model to generate image responses"}),(0,r.jsx)(ea,{items:t.paint_model_options,selected:t.selected_paint_model_config,isActive:t.is_active,callbackFunc:em("paint")})]}),(0,r.jsx)(u.eW,{className:"flex flex-wrap gap-4",children:!t.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:t.paint_model_options.some(e=>"free"===e.tier)?"Free models available":"Subscribe to switch model"})})]}),t.voice_model_options.length>0&&(0,r.jsxs)(u.Zb,{className:el,children:[(0,r.jsxs)(u.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(H.u,{className:"h-7 w-7 mr-2"}),"Voice"]}),(0,r.jsxs)(u.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the voice model to generate speech responses"}),(0,r.jsx)(ea,{items:t.voice_model_options,selected:t.selected_voice_model_config,isActive:t.is_active,callbackFunc:em("voice")})]}),(0,r.jsx)(u.eW,{className:"flex flex-wrap gap-4",children:!t.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:t.voice_model_options.some(e=>"free"===e.tier)?"Free models available":"Subscribe to switch model"})})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{id:"clients",className:"text-2xl",children:"Clients"}),(0,r.jsx)("div",{className:"cards flex flex-col flex-wrap gap-8",children:!t.anonymous_mode&&(0,r.jsx)(er,{})})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{id:"clients",className:"text-2xl",children:"Account"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(u.Zb,{className:el,children:[(0,r.jsxs)(u.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(V.U,{className:"h-7 w-7 mr-2"}),"Export Data"]}),(0,r.jsxs)(u.aY,{className:"overflow-hidden",children:[(0,r.jsx)("p",{className:"pb-4 text-gray-400",children:"Download all your chat conversations"}),k>0&&(0,r.jsxs)("div",{className:"w-full mt-4",children:[(0,r.jsx)(Q.E,{value:k,className:"w-full"}),(0,r.jsxs)("p",{className:"text-sm text-gray-500 mt-2",children:["Exported ",T," of ",ee," conversations"]})]})]}),(0,r.jsx)(u.eW,{className:"flex flex-wrap gap-4",children:(0,r.jsxs)(m.z,{variant:"outline",onClick:ex,disabled:y,children:[(0,r.jsx)(V.U,{className:"h-5 w-5 mr-2"}),y?"Exporting...":"Export Chats"]})})]}),(0,r.jsxs)(u.Zb,{className:el,children:[(0,r.jsxs)(u.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(G.S,{className:"h-7 w-7 mr-2 text-red-500"}),"Delete Account"]}),(0,r.jsx)(u.aY,{className:"overflow-hidden",children:(0,r.jsxs)("p",{className:"pb-4 text-gray-400",children:["This will delete all your account data, including conversations, agents, and any assets you","'","ve generated. Be sure to export before you do this if you want to keep your information."]})}),(0,r.jsx)(u.eW,{className:"flex flex-wrap gap-4",children:(0,r.jsxs)(f.aR,{children:[(0,r.jsx)(f.vW,{asChild:!0,children:(0,r.jsxs)(m.z,{variant:"outline",className:"text-red-500 hover:text-red-600 hover:bg-red-50",children:[(0,r.jsx)(G.S,{className:"h-5 w-5 mr-2"}),"Delete Account"]})}),(0,r.jsxs)(f._T,{children:[(0,r.jsxs)(f.fY,{children:[(0,r.jsx)(f.f$,{children:"Are you absolutely sure?"}),(0,r.jsx)(f.yT,{children:"This action is irreversible. This will permanently delete your account and remove all your data from our servers."})]}),(0,r.jsxs)(f.xo,{children:[(0,r.jsx)(f.le,{children:"Cancel"}),(0,r.jsxs)(f.OL,{className:"bg-red-500 hover:bg-red-600",onClick:async()=>{try{if(!(await fetch("/api/self",{method:"DELETE"})).ok)throw Error("Failed to delete account");ei({title:"Account Deleted",description:"Your account has been successfully deleted."}),window.location.href="/"}catch(e){console.error("Error deleting account:",e),ei({title:"Error",description:"Failed to delete account. Please try again or contact support.",variant:"destructive"})}},children:[(0,r.jsx)(G.S,{className:"h-5 w-5 mr-2"}),"Delete Account"]})]})]})]})})]})]})]})]})})})})]})]})]}):(0,r.jsx)(L.Z,{})}(a=n||(n={})).Setup="setup",a.SendOTP="otp",a.VerifyOTP="verify",a.Verified="verified"},32759:function(e,t,s){"use strict";s.d(t,{E:function(){return o}});var a=s(57437),n=s(2265),r=s(60610),i=s(94508);let o=n.forwardRef((e,t)=>{let{className:s,value:n,indicatorColor:o,...l}=e;return(0,a.jsx)(r.fC,{ref:t,className:(0,i.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",s),...l,children:(0,a.jsx)(r.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(o),style:{transform:"translateX(-".concat(100-(n||0),"%)")}})})});o.displayName=r.fC.displayName},77992:function(e,t,s){"use strict";s.d(t,{pm:function(){return m}});var a=s(2265);let n=0,r=new Map,i=e=>{if(r.has(e))return;let t=setTimeout(()=>{r.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);r.set(e,t)},o=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:s}=t;return s?i(s):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===s||void 0===s?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},l=[],c={toasts:[]};function d(e){c=o(c,e),l.forEach(e=>{e(c)})}function h(e){let{...t}=e,s=(n=(n+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>d({type:"DISMISS_TOAST",toastId:s});return d({type:"ADD_TOAST",toast:{...t,id:s,open:!0,onOpenChange:e=>{e||a()}}}),{id:s,dismiss:a,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:s}})}}function m(){let[e,t]=a.useState(c);return a.useEffect(()=>(l.push(t),()=>{let e=l.indexOf(t);e>-1&&l.splice(e,1)}),[e]),{...e,toast:h,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},917:function(e){e.exports={page:"settings_page__mP7qk",contentBody:"settings_contentBody__uZjue",phoneInput:"settings_phoneInput__j6xJN"}}},function(e){e.O(0,[6008,4173,2939,7200,8667,1327,4609,945,5303,2327,2971,2117,1744],function(){return e(e.s=62960)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7138,3317,8459,244],{63521:function(){}},function(n){n.O(0,[2971,2117,1744],function(){return n(n.s=63521)}),_N_E=n.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3111],{91955:function(e,t,s){Promise.resolve().then(s.bind(s,41694))},41694:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return j}});var a=s(57437),o=s(22515),n=s.n(o),i=s(2265),r=s(27127),l=s(14308);s(2446);var c=s(7436),d=s(56937),h=s(5477),u=s(60729),m=s(34124),g=s(6512),x=s(37104),p=s(62869),f=s(96620);function _(e){let{slug:t,className:s}=e,o=async()=>{try{(await fetch("/api/chat/share?public_conversation_slug=".concat(t),{method:"DELETE"})).redirected?window.location.reload():console.error("Failed to unshare conversation")}catch(e){console.error("Error unsharing conversation:",e)}};return(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)(p.z,{className:"p-0 text-sm h-auto text-rose-500 hover:text-rose-600",variant:"ghost",title:"Unshare conversation",onClick:o,children:(0,a.jsx)(f.r,{className:"".concat(s)})})})}function v(e){let[t,s]=(0,i.useState)(""),[o,l]=(0,i.useState)([]),[c,d]=(0,i.useState)(!1),[u,m]=(0,i.useState)(null),g=(0,i.useRef)(null),x=e.setQueryToProcess,p=e.streamedMessages,f=e.isMobileWidth?"w-full":"w-4/6";return((0,i.useEffect)(()=>{if(o.length>0){let t=o.map(e=>encodeURIComponent(e));e.setImages(t)}},[o,e.setImages]),(0,i.useEffect)(()=>{t&&(d(!0),x(t))},[t,x]),(0,i.useEffect)(()=>{p&&p.length>0&&p[p.length-1].completed?d(!1):s("")},[p]),e.publicConversationSlug||e.conversationId)?(0,a.jsx)("div",{className:"flex flex-row h-full w-full",children:(0,a.jsxs)("div",{className:"flex flex-col h-full w-full",children:[(0,a.jsx)("div",{className:n().chatBodyFull,children:(0,a.jsx)(r.Z,{publicConversationSlug:e.publicConversationSlug,conversationId:e.conversationId||"",setAgent:m,setTitle:e.setTitle,setIsOwner:e.setIsOwner,pendingMessage:c?t:"",incomingMessages:e.streamedMessages,customClassName:f})}),(0,a.jsx)("div",{className:"".concat(n().inputBox," p-1 md:px-2 shadow-md bg-background align-middle items-center justify-center dark:bg-neutral-700 dark:border-0 dark:shadow-sm rounded-2xl md:rounded-xl h-fit ").concat(f," mr-auto ml-auto mt-auto"),children:(0,a.jsx)(h.a,{isLoggedIn:e.isLoggedIn,sendMessage:e=>s(e),sendImage:e=>l(t=>[...t,e]),sendDisabled:c,chatOptionsData:e.chatOptionsData,conversationId:e.conversationId,agentColor:null==u?void 0:u.color,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles,setTriggeredAbort:()=>{},ref:g})})]})}):(0,a.jsx)("div",{className:n().suggestions,children:"Whoops, nothing to see here!"})}function j(){let[e,t]=(0,i.useState)(null),[s,o]=(0,i.useState)(!0),[r,h]=(0,i.useState)("Khoj AI - Chat"),[p,f]=(0,i.useState)(void 0),[j,w]=(0,i.useState)([]),[N,I]=(0,i.useState)(""),[S,C]=(0,i.useState)(null),[b,y]=(0,i.useState)(void 0),[B,O]=(0,i.useState)([]),[k,E]=(0,i.useState)(!1),{data:T,error:M,isLoading:W}=(0,d.GW)(),F=(0,c.IC)();return((0,i.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{o(!1),e&&t(e)}).catch(e=>{console.error(e)}),(0,c.EK)(),y(window.location.pathname.split("/").pop()||"")},[]),(0,i.useEffect)(()=>{S&&localStorage.setItem("uploadedFiles",JSON.stringify(S))},[S]),(0,i.useEffect)(()=>{if(N&&!p){fetch("/api/chat/share/fork?public_conversation_slug=".concat(b),{method:"POST",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{f(e.conversation_id),localStorage.setItem("message",N),B.length>0&&localStorage.setItem("images",JSON.stringify(B)),window.location.href="/chat?conversationId=".concat(e.conversation_id)}).catch(e=>{console.error(e)});return}},[N,p,b]),s)?(0,a.jsx)(l.Z,{}):b?(0,a.jsxs)(u.Hn,{children:[(0,a.jsx)(m.S,{conversationId:p||""}),(0,a.jsxs)(u.kV,{children:[(0,a.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,a.jsx)(u.vP,{className:"-ml-1"}),(0,a.jsx)(g.Z,{orientation:"vertical",className:"mr-2 h-4"}),b&&(0,a.jsx)("div",{className:"".concat(n().chatTitleWrapper," text-nowrap text-ellipsis overflow-hidden max-w-screen-md grid items-top font-bold mx-2 md:mr-8 col-auto h-fit"),children:F?(0,a.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,a.jsx)(x.VO,{className:"h-auto w-16"})}):r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"text-lg text-ellipsis whitespace-nowrap overflow-x-hidden mr-4",children:r}),k&&T&&(0,a.jsx)(_,{slug:b,className:"h-4 w-4 mt-1"})]})})]}),(0,a.jsxs)("div",{className:"".concat(n().main," ").concat(n().chatLayout),children:[(0,a.jsx)("title",{children:r}),(0,a.jsx)("div",{className:n().chatBox,children:(0,a.jsx)("div",{className:n().chatBoxBody,children:(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(l.Z,{}),children:(0,a.jsx)(v,{conversationId:p,streamedMessages:j,setQueryToProcess:I,isLoggedIn:!!T,publicConversationSlug:b,chatOptionsData:e,setTitle:h,setUploadedFiles:C,isMobileWidth:F,setImages:O,setIsOwner:E})})})})]})]})]}):(0,a.jsx)("div",{className:n().suggestions,children:"Whoops, nothing to see here!"})}},22515:function(e){e.exports={main:"sharedChat_main__7Nayy",suggestions:"sharedChat_suggestions__V8kr_",inputBox:"sharedChat_inputBox__wRW5A",chatBodyFull:"sharedChat_chatBodyFull__O1MOv",chatBody:"sharedChat_chatBody__OnHDL",chatLayout:"sharedChat_chatLayout__gutlc",chatBox:"sharedChat_chatBox__PmAPg",titleBar:"sharedChat_titleBar__vOHp_",chatBoxBody:"sharedChat_chatBoxBody__ef2Nl",agentIndicator:"sharedChat_agentIndicator__ORCl4",chatTitleWrapper:"sharedChat_chatTitleWrapper__rVdYj"}}},function(e){e.O(0,[216,5638,3954,1860,2939,7200,8667,1327,3592,5639,2327,5477,7127,2971,2117,1744],function(){return e(e.s=91955)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3111],{91955:function(e,t,s){Promise.resolve().then(s.bind(s,41694))},41694:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return j}});var a=s(57437),o=s(22515),n=s.n(o),i=s(2265),r=s(27127),l=s(14308);s(2446);var c=s(7436),d=s(56937),h=s(5477),u=s(60729),m=s(34124),g=s(6512),x=s(37104),p=s(62869),f=s(96620);function _(e){let{slug:t,className:s}=e,o=async()=>{try{(await fetch("/api/chat/share?public_conversation_slug=".concat(t),{method:"DELETE"})).redirected?window.location.reload():console.error("Failed to unshare conversation")}catch(e){console.error("Error unsharing conversation:",e)}};return(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)(p.z,{className:"p-0 text-sm h-auto text-rose-500 hover:text-rose-600",variant:"ghost",title:"Unshare conversation",onClick:o,children:(0,a.jsx)(f.r,{className:"".concat(s)})})})}function v(e){let[t,s]=(0,i.useState)(""),[o,l]=(0,i.useState)([]),[c,d]=(0,i.useState)(!1),[u,m]=(0,i.useState)(null),g=(0,i.useRef)(null),x=e.setQueryToProcess,p=e.streamedMessages,f=e.isMobileWidth?"w-full":"w-4/6";return((0,i.useEffect)(()=>{if(o.length>0){let t=o.map(e=>encodeURIComponent(e));e.setImages(t)}},[o,e.setImages]),(0,i.useEffect)(()=>{t&&(d(!0),x(t))},[t,x]),(0,i.useEffect)(()=>{p&&p.length>0&&p[p.length-1].completed?d(!1):s("")},[p]),e.publicConversationSlug||e.conversationId)?(0,a.jsx)("div",{className:"flex flex-row h-full w-full",children:(0,a.jsxs)("div",{className:"flex flex-col h-full w-full",children:[(0,a.jsx)("div",{className:n().chatBodyFull,children:(0,a.jsx)(r.Z,{publicConversationSlug:e.publicConversationSlug,conversationId:e.conversationId||"",setAgent:m,setTitle:e.setTitle,setIsOwner:e.setIsOwner,pendingMessage:c?t:"",incomingMessages:e.streamedMessages,customClassName:f})}),(0,a.jsx)("div",{className:"".concat(n().inputBox," p-1 md:px-2 shadow-md bg-background align-middle items-center justify-center dark:bg-neutral-700 dark:border-0 dark:shadow-sm rounded-2xl md:rounded-xl h-fit ").concat(f," mr-auto ml-auto mt-auto"),children:(0,a.jsx)(h.a,{isLoggedIn:e.isLoggedIn,sendMessage:e=>s(e),sendImage:e=>l(t=>[...t,e]),sendDisabled:c,chatOptionsData:e.chatOptionsData,conversationId:e.conversationId,agentColor:null==u?void 0:u.color,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles,setTriggeredAbort:()=>{},ref:g})})]})}):(0,a.jsx)("div",{className:n().suggestions,children:"Whoops, nothing to see here!"})}function j(){let[e,t]=(0,i.useState)(null),[s,o]=(0,i.useState)(!0),[r,h]=(0,i.useState)("Khoj AI - Chat"),[p,f]=(0,i.useState)(void 0),[j,w]=(0,i.useState)([]),[N,I]=(0,i.useState)(""),[S,C]=(0,i.useState)(null),[b,y]=(0,i.useState)(void 0),[B,O]=(0,i.useState)([]),[k,E]=(0,i.useState)(!1),{data:T,error:M,isLoading:W}=(0,d.GW)(),F=(0,c.IC)();return((0,i.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{o(!1),e&&t(e)}).catch(e=>{console.error(e)}),(0,c.EK)(),y(window.location.pathname.split("/").pop()||"")},[]),(0,i.useEffect)(()=>{S&&localStorage.setItem("uploadedFiles",JSON.stringify(S))},[S]),(0,i.useEffect)(()=>{if(N&&!p){fetch("/api/chat/share/fork?public_conversation_slug=".concat(b),{method:"POST",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{f(e.conversation_id),localStorage.setItem("message",N),B.length>0&&localStorage.setItem("images",JSON.stringify(B)),window.location.href="/chat?conversationId=".concat(e.conversation_id)}).catch(e=>{console.error(e)});return}},[N,p,b]),s)?(0,a.jsx)(l.Z,{}):b?(0,a.jsxs)(u.Hn,{children:[(0,a.jsx)(m.S,{conversationId:p||""}),(0,a.jsxs)(u.kV,{children:[(0,a.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,a.jsx)(u.vP,{className:"-ml-1"}),(0,a.jsx)(g.Z,{orientation:"vertical",className:"mr-2 h-4"}),b&&(0,a.jsx)("div",{className:"".concat(n().chatTitleWrapper," text-nowrap text-ellipsis overflow-hidden max-w-screen-md grid items-top font-bold mx-2 md:mr-8 col-auto h-fit"),children:F?(0,a.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,a.jsx)(x.VO,{className:"h-auto w-16"})}):r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"text-lg text-ellipsis whitespace-nowrap overflow-x-hidden mr-4",children:r}),k&&T&&(0,a.jsx)(_,{slug:b,className:"h-4 w-4 mt-1"})]})})]}),(0,a.jsxs)("div",{className:"".concat(n().main," ").concat(n().chatLayout),children:[(0,a.jsx)("title",{children:r}),(0,a.jsx)("div",{className:n().chatBox,children:(0,a.jsx)("div",{className:n().chatBoxBody,children:(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(l.Z,{}),children:(0,a.jsx)(v,{conversationId:p,streamedMessages:j,setQueryToProcess:I,isLoggedIn:!!T,publicConversationSlug:b,chatOptionsData:e,setTitle:h,setUploadedFiles:C,isMobileWidth:F,setImages:O,setIsOwner:E})})})})]})]})]}):(0,a.jsx)("div",{className:n().suggestions,children:"Whoops, nothing to see here!"})}},22515:function(e){e.exports={main:"sharedChat_main__7Nayy",suggestions:"sharedChat_suggestions__V8kr_",inputBox:"sharedChat_inputBox__wRW5A",chatBodyFull:"sharedChat_chatBodyFull__O1MOv",chatBody:"sharedChat_chatBody__OnHDL",chatLayout:"sharedChat_chatLayout__gutlc",chatBox:"sharedChat_chatBox__PmAPg",titleBar:"sharedChat_titleBar__vOHp_",chatBoxBody:"sharedChat_chatBoxBody__ef2Nl",agentIndicator:"sharedChat_agentIndicator__ORCl4",chatTitleWrapper:"sharedChat_chatTitleWrapper__rVdYj"}}},function(e){e.O(0,[9346,8255,4173,3954,1860,2939,7200,8667,1327,3592,5639,2327,5477,7127,2971,2117,1744],function(){return e(e.s=91955)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- !function(){"use strict";var e,t,n,r,c,o,f,a,u,i={},d={};function b(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}},r=!0;try{i[e].call(n.exports,n,n.exports,b),r=!1}finally{r&&delete d[e]}return n.exports}b.m=i,e=[],b.O=function(t,n,r,c){if(n){c=c||0;for(var o=e.length;o>0&&e[o-1][2]>c;o--)e[o]=e[o-1];e[o]=[n,r,c];return}for(var f=1/0,o=0;o<e.length;o++){for(var n=e[o][0],r=e[o][1],c=e[o][2],a=!0,u=0;u<n.length;u++)f>=c&&Object.keys(b.O).every(function(e){return b.O[e](n[u])})?n.splice(u--,1):(a=!1,c<f&&(f=c));if(a){e.splice(o--,1);var i=r();void 0!==i&&(t=i)}}return t},b.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},b.t=function(e,r){if(1&r&&(e=this(e)),8&r||"object"==typeof e&&e&&(4&r&&e.__esModule||16&r&&"function"==typeof e.then))return e;var c=Object.create(null);b.r(c);var o={};t=t||[null,n({}),n([]),n(n)];for(var f=2&r&&e;"object"==typeof f&&!~t.indexOf(f);f=n(f))Object.getOwnPropertyNames(f).forEach(function(t){o[t]=function(){return e[t]}});return o.default=function(){return e},b.d(c,o),c},b.d=function(e,t){for(var n in t)b.o(t,n)&&!b.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},b.f={},b.e=function(e){return Promise.all(Object.keys(b.f).reduce(function(t,n){return b.f[n](e,t),t},[]))},b.u=function(e){return 4609===e?"static/chunks/4609-33aa487dff03a9fd.js":"static/chunks/"+(({1264:"90542734",6555:"964ecbae",7293:"94ca1967"})[e]||e)+"."+({83:"48e2db193a940052",303:"fe76de943e930fbd",872:"caf84cc1a39ae59f",1191:"b547ec13349b4aed",1264:"2c21f16f18b22411",1588:"f0558a0bdffc4761",1918:"925cb4a35518d258",2242:"9a07e19f1a3a8b16",2612:"bcf5a623b3da209e",2849:"dc00ae5ba7219cfc",3265:"924139c4146ee344",3489:"c523fe96a2eee74f",4327:"8d2a1b8f1ea78208",4533:"586e74b45a2bde25",4551:"82ce1476b5516bc2",4610:"196691887afb7fea",4748:"0edd37cba3ea2809",4980:"63500d68b3bb1222",5210:"cd35a1c1ec594a20",5329:"f8b3c5b3d16159cd",5830:"8876eccb82da9b7d",6230:"88a71d8145347b3f",6434:"e6cd986d690f2cef",6555:"d5be7c49c320d695",7161:"77e0530a40ad5ca8",7293:"1b3402358e0e1255",7303:"d0612f812a967a08",7505:"c31027a3695bdebb",7760:"35649cc21d9585bd",8427:"844694e06133fb51",8665:"4db7e6b2e8933497",8694:"2bd9c2f65d8c5847",8888:"ebe0e552b59e7fed",8890:"6e8a59e4de6978bc",8950:"5f2272e0ac923f9e",9202:"c703864fcedc8d1f",9245:"a04e92d034540234",9320:"6aca4885d541aa44",9535:"f78cd92d03331e55",9968:"b111fc002796da81"})[e]+".js"},b.miniCssF=function(e){},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},c="_N_E:",b.l=function(e,t,n,o){if(r[e]){r[e].push(t);return}if(void 0!==n)for(var f,a,u=document.getElementsByTagName("script"),i=0;i<u.length;i++){var d=u[i];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==c+n){f=d;break}}f||(a=!0,(f=document.createElement("script")).charset="utf-8",f.timeout=120,b.nc&&f.setAttribute("nonce",b.nc),f.setAttribute("data-webpack",c+n),f.src=b.tu(e)),r[e]=[t];var l=function(t,n){f.onerror=f.onload=null,clearTimeout(s);var c=r[e];if(delete r[e],f.parentNode&&f.parentNode.removeChild(f),c&&c.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=l.bind(null,f.onerror),f.onload=l.bind(null,f.onload),a&&document.head.appendChild(f)},b.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.tt=function(){return void 0===o&&(o={createScriptURL:function(e){return e}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(o=trustedTypes.createPolicy("nextjs#bundler",o))),o},b.tu=function(e){return b.tt().createScriptURL(e)},b.p="/_next/",f={2272:0,3254:0,3587:0,7400:0,6250:0,216:0,5638:0,3849:0,2026:0,6008:0},b.f.j=function(e,t){var n=b.o(f,e)?f[e]:void 0;if(0!==n){if(n)t.push(n[2]);else if(/^(2(026|16|272)|3(254|587|849)|5638|6008|6250|7400)$/.test(e))f[e]=0;else{var r=new Promise(function(t,r){n=f[e]=[t,r]});t.push(n[2]=r);var c=b.p+b.u(e),o=Error();b.l(c,function(t){if(b.o(f,e)&&(0!==(n=f[e])&&(f[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;o.message="Loading chunk "+e+" failed.\n("+r+": "+c+")",o.name="ChunkLoadError",o.type=r,o.request=c,n[1](o)}},"chunk-"+e,e)}}},b.O.j=function(e){return 0===f[e]},a=function(e,t){var n,r,c=t[0],o=t[1],a=t[2],u=0;if(c.some(function(e){return 0!==f[e]})){for(n in o)b.o(o,n)&&(b.m[n]=o[n]);if(a)var i=a(b)}for(e&&e(t);u<c.length;u++)r=c[u],b.o(f,r)&&f[r]&&f[r][0](),f[r]=0;return b.O(i)},(u=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(a.bind(null,0)),u.push=a.bind(null,u.push.bind(u)),b.nc=void 0}();
1
+ !function(){"use strict";var e,t,n,r,c,o,f,a,u,i={},d={};function b(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}},r=!0;try{i[e].call(n.exports,n,n.exports,b),r=!1}finally{r&&delete d[e]}return n.exports}b.m=i,e=[],b.O=function(t,n,r,c){if(n){c=c||0;for(var o=e.length;o>0&&e[o-1][2]>c;o--)e[o]=e[o-1];e[o]=[n,r,c];return}for(var f=1/0,o=0;o<e.length;o++){for(var n=e[o][0],r=e[o][1],c=e[o][2],a=!0,u=0;u<n.length;u++)f>=c&&Object.keys(b.O).every(function(e){return b.O[e](n[u])})?n.splice(u--,1):(a=!1,c<f&&(f=c));if(a){e.splice(o--,1);var i=r();void 0!==i&&(t=i)}}return t},b.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},b.t=function(e,r){if(1&r&&(e=this(e)),8&r||"object"==typeof e&&e&&(4&r&&e.__esModule||16&r&&"function"==typeof e.then))return e;var c=Object.create(null);b.r(c);var o={};t=t||[null,n({}),n([]),n(n)];for(var f=2&r&&e;"object"==typeof f&&!~t.indexOf(f);f=n(f))Object.getOwnPropertyNames(f).forEach(function(t){o[t]=function(){return e[t]}});return o.default=function(){return e},b.d(c,o),c},b.d=function(e,t){for(var n in t)b.o(t,n)&&!b.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},b.f={},b.e=function(e){return Promise.all(Object.keys(b.f).reduce(function(t,n){return b.f[n](e,t),t},[]))},b.u=function(e){return 4609===e?"static/chunks/4609-33aa487dff03a9fd.js":"static/chunks/"+(({1264:"90542734",6555:"964ecbae",7293:"94ca1967"})[e]||e)+"."+({83:"48e2db193a940052",303:"fe76de943e930fbd",872:"caf84cc1a39ae59f",1191:"b547ec13349b4aed",1264:"2c21f16f18b22411",1588:"f0558a0bdffc4761",1918:"925cb4a35518d258",2242:"9a07e19f1a3a8b16",2612:"bcf5a623b3da209e",2849:"dc00ae5ba7219cfc",3265:"924139c4146ee344",3489:"c523fe96a2eee74f",4327:"8d2a1b8f1ea78208",4533:"586e74b45a2bde25",4551:"82ce1476b5516bc2",4610:"196691887afb7fea",4748:"0edd37cba3ea2809",4980:"63500d68b3bb1222",5210:"cd35a1c1ec594a20",5329:"f8b3c5b3d16159cd",5830:"8876eccb82da9b7d",6230:"88a71d8145347b3f",6434:"e6cd986d690f2cef",6555:"d5be7c49c320d695",7161:"77e0530a40ad5ca8",7293:"1b3402358e0e1255",7303:"d0612f812a967a08",7505:"c31027a3695bdebb",7760:"35649cc21d9585bd",8427:"844694e06133fb51",8665:"4db7e6b2e8933497",8694:"2bd9c2f65d8c5847",8888:"ebe0e552b59e7fed",8890:"6e8a59e4de6978bc",8950:"5f2272e0ac923f9e",9202:"c703864fcedc8d1f",9245:"a04e92d034540234",9320:"6aca4885d541aa44",9535:"f78cd92d03331e55",9968:"b111fc002796da81"})[e]+".js"},b.miniCssF=function(e){},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},c="_N_E:",b.l=function(e,t,n,o){if(r[e]){r[e].push(t);return}if(void 0!==n)for(var f,a,u=document.getElementsByTagName("script"),i=0;i<u.length;i++){var d=u[i];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==c+n){f=d;break}}f||(a=!0,(f=document.createElement("script")).charset="utf-8",f.timeout=120,b.nc&&f.setAttribute("nonce",b.nc),f.setAttribute("data-webpack",c+n),f.src=b.tu(e)),r[e]=[t];var l=function(t,n){f.onerror=f.onload=null,clearTimeout(s);var c=r[e];if(delete r[e],f.parentNode&&f.parentNode.removeChild(f),c&&c.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=l.bind(null,f.onerror),f.onload=l.bind(null,f.onload),a&&document.head.appendChild(f)},b.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.tt=function(){return void 0===o&&(o={createScriptURL:function(e){return e}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(o=trustedTypes.createPolicy("nextjs#bundler",o))),o},b.tu=function(e){return b.tt().createScriptURL(e)},b.p="/_next/",f={2272:0,3254:0,3587:0,7400:0,6250:0,8255:0,4173:0,2026:0,6008:0,9346:0},b.f.j=function(e,t){var n=b.o(f,e)?f[e]:void 0;if(0!==n){if(n)t.push(n[2]);else if(/^(2026|2272|3254|3587|4173|6008|6250|7400|8255|9346)$/.test(e))f[e]=0;else{var r=new Promise(function(t,r){n=f[e]=[t,r]});t.push(n[2]=r);var c=b.p+b.u(e),o=Error();b.l(c,function(t){if(b.o(f,e)&&(0!==(n=f[e])&&(f[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;o.message="Loading chunk "+e+" failed.\n("+r+": "+c+")",o.name="ChunkLoadError",o.type=r,o.request=c,n[1](o)}},"chunk-"+e,e)}}},b.O.j=function(e){return 0===f[e]},a=function(e,t){var n,r,c=t[0],o=t[1],a=t[2],u=0;if(c.some(function(e){return 0!==f[e]})){for(n in o)b.o(o,n)&&(b.m[n]=o[n]);if(a)var i=a(b)}for(e&&e(t);u<c.length;u++)r=c[u],b.o(f,r)&&f[r]&&f[r][0](),f[r]=0;return b.O(i)},(u=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(a.bind(null,0)),u.push=a.bind(null,u.push.bind(u)),b.nc=void 0}();
@@ -0,0 +1 @@
1
+ div.sharedChat_main__7Nayy{height:100%;color:hsla(var(--foreground));margin-left:auto;margin-right:auto}.sharedChat_suggestions__V8kr_{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1rem;justify-content:center}div.sharedChat_inputBox__wRW5A{border:1px solid var(--border-color);margin-bottom:20px;gap:12px;align-content:center}input.sharedChat_inputBox__wRW5A{border:none}input.sharedChat_inputBox__wRW5A:focus{outline:none;background-color:transparent}div.sharedChat_inputBox__wRW5A:focus{box-shadow:0 8px 16px 0 rgba(0,0,0,.2)}div.sharedChat_chatBodyFull__O1MOv{display:grid;grid-template-columns:1fr;height:auto}button.sharedChat_inputBox__wRW5A{border:none;outline:none;background-color:transparent;cursor:pointer;border-radius:.5rem;padding:.5rem;background:linear-gradient(var(--calm-green),var(--calm-blue))}div.sharedChat_chatBody__OnHDL{display:grid;grid-template-columns:1fr 1fr;height:100%}.sharedChat_inputBox__wRW5A{color:hsla(var(--foreground))}div.sharedChat_chatLayout__gutlc{display:grid;grid-template-columns:auto 1fr;gap:1rem;width:100%}div.sharedChat_chatBox__PmAPg{display:grid;height:100%}div.sharedChat_titleBar__vOHp_{display:grid;grid-template-columns:1fr auto}div.sharedChat_chatBoxBody__ef2Nl{display:grid;height:100%;width:100%;margin:auto}div.sharedChat_agentIndicator__ORCl4 a{display:flex;text-align:center;align-content:center;align-items:center}div.sharedChat_agentIndicator__ORCl4{padding:10px}div.sharedChat_chatTitleWrapper__rVdYj{grid-template-columns:1fr auto}@media screen and (max-width:768px){div.sharedChat_inputBox__wRW5A{margin-bottom:0}div.sharedChat_chatBoxBody__ef2Nl{width:100%}div.sharedChat_chatBody__OnHDL{grid-template-columns:0fr 1fr}div.sharedChat_chatBox__PmAPg{padding:0;height:100%}div.sharedChat_chatLayout__gutlc{gap:0;grid-template-columns:1fr}}
@@ -1 +1 @@
1
- div.agents_titleBar__FzYbY{padding:16px 0;text-align:left}.agents_agentPersonality__o0Ysz p{white-space:inherit;overflow:hidden;height:77px;line-height:1.5}div.agents_agentPersonality__o0Ysz{text-align:left;grid-column:span 3;overflow:hidden}div.agents_pageLayout__gR3S3{max-width:60vw;margin:auto auto 2rem}button.agents_infoButton__NqI7E{border:none;background-color:transparent!important;text-align:left;font-family:inherit;font-size:medium}div.agents_agentList__XVx4A{display:grid;gap:20px;padding-top:30px;margin-right:auto;grid-auto-flow:row;grid-template-columns:1fr 1fr;margin-left:auto}@media only screen and (max-width:768px){div.agents_agentList__XVx4A{width:100%;padding:0;margin-right:auto;margin-left:auto;grid-template-columns:1fr}div.agents_pageLayout__gR3S3{max-width:90vw}}.loginPrompt_gsiMaterialButton__8QVFH{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-webkit-appearance:none;background-image:none;border-radius:20px;box-sizing:border-box;color:#1f1f1f;cursor:pointer;font-family:Roboto,arial,sans-serif;font-size:14px;height:40px;letter-spacing:.25px;outline:none;overflow:hidden;padding:0;position:relative;text-align:center;transition:background-color .218s,border-color .218s,box-shadow .218s;vertical-align:middle;white-space:nowrap;width:40px;max-width:400px;min-width:-moz-min-content;min-width:min-content}.loginPrompt_gsiMaterialButton__8QVFH .loginPrompt_gsiMaterialButtonIcon__6TSC5{height:100%;min-width:20px;width:100%;margin:0;padding:9px}.loginPrompt_gsiMaterialButton__8QVFH .loginPrompt_gsiMaterialButtonContentWrapper__9tahB{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;height:100%;justify-content:space-between;position:relative;width:100%}.loginPrompt_gsiMaterialButton__8QVFH .loginPrompt_gsiMaterialButtonContents__3_YcB{flex-grow:1;font-family:Roboto,arial,sans-serif;font-weight:500;overflow:hidden;text-overflow:ellipsis;vertical-align:top}.loginPrompt_gsiMaterialButton__8QVFH .loginPrompt_gsiMaterialButtonState__CDGQm{transition:opacity .218s;bottom:0;left:0;opacity:0;position:absolute;right:0;top:0}.loginPrompt_gsiMaterialButton__8QVFH:disabled{cursor:default;background-color:#ffffff61;border-color:#1f1f1f1f}.loginPrompt_gsiMaterialButton__8QVFH:disabled .loginPrompt_gsiMaterialButtonContents__3_YcB,.loginPrompt_gsiMaterialButton__8QVFH:disabled .loginPrompt_gsiMaterialButtonIcon__6TSC5{opacity:38%}.loginPrompt_gsiMaterialButton__8QVFH:not(:disabled):active .loginPrompt_gsiMaterialButton-State__mAfCZ,.loginPrompt_gsiMaterialButton__8QVFH:not(:disabled):focus .loginPrompt_gsiMaterialButtonState__CDGQm{background-color:#303030;opacity:12%}.loginPrompt_gsiMaterialButton__8QVFH:not(:disabled):hover{box-shadow:0 1px 2px 0 rgba(60,64,67,.3),0 1px 3px 1px rgba(60,64,67,.15)}.loginPrompt_gsiMaterialButton__8QVFH:not(:disabled):hover .loginPrompt_gsiMaterialButtonState__CDGQm{background-color:#303030;opacity:8%}div.sidePanel_session__EeNjH{padding:.5rem;margin-bottom:.25rem;border-radius:.5rem;cursor:pointer;max-width:14rem;font-size:medium;display:grid;grid-template-columns:minmax(auto,400px) 1fr;gap:0}div.sidePanel_compressed__CUgIn{grid-template-columns:minmax(12rem,100%) 1fr 1fr}div.sidePanel_sessionHover__cf_VO,div.sidePanel_session__EeNjH:hover{background-color:hsla(var(--popover))}div.sidePanel_session__EeNjH:hover{color:hsla(var(--popover-foreground))}div.sidePanel_session__EeNjH a{text-decoration:none}button.sidePanel_button__NzdN_{border:none;outline:none;background-color:transparent;cursor:pointer;color:var(--main-text-color);width:24px}button.sidePanel_showMoreButton__nDt4Z{border-radius:.5rem;padding:8px}div.sidePanel_panel__9offQ{display:flex;flex-direction:column;padding:1rem;overflow-y:auto;max-width:auto;transition:background-color .5s}div.sidePanel_expanded__aHnYV{gap:1rem;background-color:hsla(var(--muted));height:100%}div.sidePanel_collapsed__ewO3e{display:grid;grid-template-columns:1fr;height:-moz-fit-content;height:fit-content;padding:1rem 0 0 1rem}p.sidePanel_session__EeNjH{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-align:left;font-size:small}p.sidePanel_compressed__CUgIn{width:11rem}p.sidePanel_expanded__aHnYV{max-width:20rem}div.sidePanel_header__NCT_v{display:grid;grid-template-columns:1fr auto}div.sidePanel_profile__pfAJU{display:grid;grid-template-columns:auto 1fr;gap:1rem;align-items:center;margin-top:auto}div.sidePanel_panelWrapper__cDMvb{display:grid;grid-template-rows:1fr auto auto;height:100%}div.sidePanel_modalSessionsList___u3aa{position:fixed;top:0;left:0;width:100%;height:100%;background-color:hsla(var(--frosted-background-color));z-index:1;display:flex;justify-content:center;align-items:center;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}div.sidePanel_modalSessionsList___u3aa div.sidePanel_content__z60YO{max-width:80%;max-height:80%;background-color:hsla(var(--frosted-background-color));overflow:auto;padding:20px;border-radius:10px}div.sidePanel_modalSessionsList___u3aa div.sidePanel_session__EeNjH{max-width:100%;text-overflow:ellipsis}@media screen and (max-width:768px){div.sidePanel_panel__9offQ{padding:.25rem;width:100%}div.sidePanel_expanded__aHnYV{z-index:1}div.sidePanel_singleReference__vmXZr{padding:4px}div.sidePanel_panelWrapper__cDMvb{width:100%;padding:0 1rem}div.sidePanel_session__EeNjH.sidePanel_compressed__CUgIn{max-width:100%;display:grid;grid-template-columns:70vw auto;justify-content:space-between}div.sidePanel_session__EeNjH{max-width:100%;grid-template-columns:minmax(auto,70vw) 1fr}}.trainOfThoughtVideoPlayer_videoPlayer__Dz3mA{border:1px solid hsl(var(--border));border-radius:8px;background-color:hsl(var(--background));margin:16px 0;overflow:hidden}.trainOfThoughtVideoPlayer_screen__dvEVh{position:relative;background-color:hsl(var(--muted));min-height:300px;display:flex;align-items:center;justify-content:center}.trainOfThoughtVideoPlayer_screenImage__3SgOQ{max-width:100%;max-height:400px;-o-object-fit:contain;object-fit:contain;border-radius:4px}.trainOfThoughtVideoPlayer_textOverlay__BGbhO{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,rgba(0,0,0,.8));padding:20px 16px 12px;color:#fff}.trainOfThoughtVideoPlayer_thoughtText__zn_vT{font-size:14px;line-height:1.4;max-height:100px;overflow-y:auto}.trainOfThoughtVideoPlayer_controls__HDkO_{padding:12px 16px;background-color:hsl(var(--card));border-top:1px solid hsl(var(--border))}.trainOfThoughtVideoPlayer_timeline__hSpWu{position:relative;margin-bottom:12px}.trainOfThoughtVideoPlayer_timelineSlider__GQ8dx{width:100%;height:4px;background-color:hsl(var(--muted));border-radius:2px;outline:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.trainOfThoughtVideoPlayer_timelineSlider__GQ8dx::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;background-color:hsl(var(--primary));cursor:pointer;border:2px solid #fff;box-shadow:0 2px 4px rgba(0,0,0,.2)}.trainOfThoughtVideoPlayer_timelineSlider__GQ8dx::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background-color:hsl(var(--primary));cursor:pointer;border:2px solid #fff;box-shadow:0 2px 4px rgba(0,0,0,.2)}.trainOfThoughtVideoPlayer_frameMarkers__5y3He{position:absolute;top:-2px;left:0;right:0;height:8px;display:flex;justify-content:space-between;pointer-events:none}.trainOfThoughtVideoPlayer_frameMarker__DBO9Y{width:6px;height:8px;border-radius:1px;cursor:pointer;pointer-events:auto;transition:all .2s ease}.trainOfThoughtVideoPlayer_frameMarker__DBO9Y.trainOfThoughtVideoPlayer_hasImage__GFGAk{background-color:hsl(var(--primary))}.trainOfThoughtVideoPlayer_frameMarker__DBO9Y.trainOfThoughtVideoPlayer_textOnly__okufk{background-color:hsl(var(--muted-foreground))}.trainOfThoughtVideoPlayer_frameMarker__DBO9Y.trainOfThoughtVideoPlayer_active__zp6u9{background-color:hsl(var(--accent))!important;transform:scaleY(1.5)}.trainOfThoughtVideoPlayer_frameMarker__DBO9Y:hover{transform:scaleY(1.2)}.trainOfThoughtVideoPlayer_controlButtons__rqfIH{display:flex;align-items:center;gap:8px;margin-bottom:8px}.trainOfThoughtVideoPlayer_controlButton___RdE_{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid hsl(var(--border));border-radius:4px;background-color:hsl(var(--background));color:hsl(var(--foreground));cursor:pointer;transition:all .2s ease}.trainOfThoughtVideoPlayer_controlButton___RdE_:hover:not(:disabled){background-color:hsl(var(--muted))}.trainOfThoughtVideoPlayer_controlButton___RdE_:disabled{opacity:.5;cursor:not-allowed}.trainOfThoughtVideoPlayer_controlButton___RdE_.trainOfThoughtVideoPlayer_active__zp6u9{background-color:hsl(var(--primary));color:hsl(var(--primary-foreground))}.trainOfThoughtVideoPlayer_frameInfo__u5nwA{display:flex;justify-content:center;font-size:12px;color:hsl(var(--muted-foreground))}@media (prefers-color-scheme:dark){.trainOfThoughtVideoPlayer_textOverlay__BGbhO{background:linear-gradient(transparent,rgba(0,0,0,.9))}}div.chatInputArea_actualInputArea__Ha6cN{display:grid;grid-template-columns:auto 1fr auto auto}.agentCard_agentPersonality__MmRlN p{white-space:inherit;overflow:hidden;height:77px;line-height:1.5}div.agentCard_agentPersonality__MmRlN{text-align:left;grid-column:span 3;overflow:hidden}button.agentCard_infoButton__heh_w{border:none;background-color:transparent!important;text-align:left;font-family:inherit;font-size:medium}div.automations_automationsLayout__Atoh_{display:grid;grid-template-columns:1fr 1fr;gap:1rem}div.automations_automationCard__BKidA{display:grid;grid-template-rows:auto 1fr auto}div.automations_pageLayout__OaoYA{max-width:60vw;margin:auto auto 2rem}@media screen and (max-width:768px){div.automations_automationsLayout__Atoh_{grid-template-columns:1fr}div.automations_pageLayout__OaoYA{max-width:90vw}}
1
+ div.agents_titleBar__FzYbY{padding:16px 0;text-align:left}.agents_agentPersonality__o0Ysz p{white-space:inherit;overflow:hidden;height:77px;line-height:1.5}div.agents_agentPersonality__o0Ysz{text-align:left;grid-column:span 3;overflow:hidden}div.agents_pageLayout__gR3S3{max-width:60vw;margin:auto auto 2rem}button.agents_infoButton__NqI7E{border:none;background-color:transparent!important;text-align:left;font-family:inherit;font-size:medium}div.agents_agentList__XVx4A{display:grid;gap:20px;padding-top:30px;margin-right:auto;grid-auto-flow:row;grid-template-columns:1fr 1fr;margin-left:auto}@media only screen and (max-width:768px){div.agents_agentList__XVx4A{width:100%;padding:0;margin-right:auto;margin-left:auto;grid-template-columns:1fr}div.agents_pageLayout__gR3S3{max-width:90vw}}.loginPrompt_gsiMaterialButton__8QVFH{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-webkit-appearance:none;background-image:none;border-radius:20px;box-sizing:border-box;color:#1f1f1f;cursor:pointer;font-family:Roboto,arial,sans-serif;font-size:14px;height:40px;letter-spacing:.25px;outline:none;overflow:hidden;padding:0;position:relative;text-align:center;transition:background-color .218s,border-color .218s,box-shadow .218s;vertical-align:middle;white-space:nowrap;width:40px;max-width:400px;min-width:-moz-min-content;min-width:min-content}.loginPrompt_gsiMaterialButton__8QVFH .loginPrompt_gsiMaterialButtonIcon__6TSC5{height:100%;min-width:20px;width:100%;margin:0;padding:9px}.loginPrompt_gsiMaterialButton__8QVFH .loginPrompt_gsiMaterialButtonContentWrapper__9tahB{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;height:100%;justify-content:space-between;position:relative;width:100%}.loginPrompt_gsiMaterialButton__8QVFH .loginPrompt_gsiMaterialButtonContents__3_YcB{flex-grow:1;font-family:Roboto,arial,sans-serif;font-weight:500;overflow:hidden;text-overflow:ellipsis;vertical-align:top}.loginPrompt_gsiMaterialButton__8QVFH .loginPrompt_gsiMaterialButtonState__CDGQm{transition:opacity .218s;bottom:0;left:0;opacity:0;position:absolute;right:0;top:0}.loginPrompt_gsiMaterialButton__8QVFH:disabled{cursor:default;background-color:#ffffff61;border-color:#1f1f1f1f}.loginPrompt_gsiMaterialButton__8QVFH:disabled .loginPrompt_gsiMaterialButtonContents__3_YcB,.loginPrompt_gsiMaterialButton__8QVFH:disabled .loginPrompt_gsiMaterialButtonIcon__6TSC5{opacity:38%}.loginPrompt_gsiMaterialButton__8QVFH:not(:disabled):active .loginPrompt_gsiMaterialButton-State__mAfCZ,.loginPrompt_gsiMaterialButton__8QVFH:not(:disabled):focus .loginPrompt_gsiMaterialButtonState__CDGQm{background-color:#303030;opacity:12%}.loginPrompt_gsiMaterialButton__8QVFH:not(:disabled):hover{box-shadow:0 1px 2px 0 rgba(60,64,67,.3),0 1px 3px 1px rgba(60,64,67,.15)}.loginPrompt_gsiMaterialButton__8QVFH:not(:disabled):hover .loginPrompt_gsiMaterialButtonState__CDGQm{background-color:#303030;opacity:8%}div.sidePanel_session__EeNjH{padding:.5rem;margin-bottom:.25rem;border-radius:.5rem;cursor:pointer;max-width:14rem;font-size:medium;display:grid;grid-template-columns:minmax(auto,400px) 1fr;gap:0}div.sidePanel_compressed__CUgIn{grid-template-columns:minmax(12rem,100%) 1fr 1fr}div.sidePanel_sessionHover__cf_VO,div.sidePanel_session__EeNjH:hover{background-color:hsla(var(--popover))}div.sidePanel_session__EeNjH:hover{color:hsla(var(--popover-foreground))}div.sidePanel_session__EeNjH a{text-decoration:none}button.sidePanel_button__NzdN_{border:none;outline:none;background-color:transparent;cursor:pointer;color:var(--main-text-color);width:24px}button.sidePanel_showMoreButton__nDt4Z{border-radius:.5rem;padding:8px}div.sidePanel_panel__9offQ{display:flex;flex-direction:column;padding:1rem;overflow-y:auto;max-width:auto;transition:background-color .5s}div.sidePanel_expanded__aHnYV{gap:1rem;background-color:hsla(var(--muted));height:100%}div.sidePanel_collapsed__ewO3e{display:grid;grid-template-columns:1fr;height:-moz-fit-content;height:fit-content;padding:1rem 0 0 1rem}p.sidePanel_session__EeNjH{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-align:left;font-size:small}p.sidePanel_compressed__CUgIn{width:11rem}p.sidePanel_expanded__aHnYV{max-width:20rem}div.sidePanel_header__NCT_v{display:grid;grid-template-columns:1fr auto}div.sidePanel_profile__pfAJU{display:grid;grid-template-columns:auto 1fr;gap:1rem;align-items:center;margin-top:auto}div.sidePanel_panelWrapper__cDMvb{display:grid;grid-template-rows:1fr auto auto;height:100%}div.sidePanel_modalSessionsList___u3aa{position:fixed;top:0;left:0;width:100%;height:100%;background-color:hsla(var(--frosted-background-color));z-index:1;display:flex;justify-content:center;align-items:center;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}div.sidePanel_modalSessionsList___u3aa div.sidePanel_content__z60YO{max-width:80%;max-height:80%;background-color:hsla(var(--frosted-background-color));overflow:auto;padding:20px;border-radius:10px}div.sidePanel_modalSessionsList___u3aa div.sidePanel_session__EeNjH{max-width:100%;text-overflow:ellipsis}@media screen and (max-width:768px){div.sidePanel_panel__9offQ{padding:.25rem;width:100%}div.sidePanel_expanded__aHnYV{z-index:1}div.sidePanel_singleReference__vmXZr{padding:4px}div.sidePanel_panelWrapper__cDMvb{width:100%;padding:0 1rem}div.sidePanel_session__EeNjH.sidePanel_compressed__CUgIn{max-width:100%;display:grid;grid-template-columns:70vw auto;justify-content:space-between}div.sidePanel_session__EeNjH{max-width:100%;grid-template-columns:minmax(auto,70vw) 1fr}}.agentCard_agentPersonality__MmRlN p{white-space:inherit;overflow:hidden;height:77px;line-height:1.5}div.agentCard_agentPersonality__MmRlN{text-align:left;grid-column:span 3;overflow:hidden}button.agentCard_infoButton__heh_w{border:none;background-color:transparent!important;text-align:left;font-family:inherit;font-size:medium}.trainOfThoughtVideoPlayer_videoPlayer__Dz3mA{border:1px solid hsl(var(--border));border-radius:8px;background-color:hsl(var(--background));margin:16px 0;overflow:hidden}.trainOfThoughtVideoPlayer_screen__dvEVh{position:relative;background-color:hsl(var(--muted));min-height:300px;display:flex;align-items:center;justify-content:center}.trainOfThoughtVideoPlayer_screenImage__3SgOQ{max-width:100%;max-height:400px;-o-object-fit:contain;object-fit:contain;border-radius:4px}.trainOfThoughtVideoPlayer_textOverlay__BGbhO{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,rgba(0,0,0,.8));padding:20px 16px 12px;color:#fff}.trainOfThoughtVideoPlayer_thoughtText__zn_vT{font-size:14px;line-height:1.4;max-height:100px;overflow-y:auto}.trainOfThoughtVideoPlayer_controls__HDkO_{padding:12px 16px;background-color:hsl(var(--card));border-top:1px solid hsl(var(--border))}.trainOfThoughtVideoPlayer_timeline__hSpWu{position:relative;margin-bottom:12px}.trainOfThoughtVideoPlayer_timelineSlider__GQ8dx{width:100%;height:4px;background-color:hsl(var(--muted));border-radius:2px;outline:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.trainOfThoughtVideoPlayer_timelineSlider__GQ8dx::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;background-color:hsl(var(--primary));cursor:pointer;border:2px solid #fff;box-shadow:0 2px 4px rgba(0,0,0,.2)}.trainOfThoughtVideoPlayer_timelineSlider__GQ8dx::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background-color:hsl(var(--primary));cursor:pointer;border:2px solid #fff;box-shadow:0 2px 4px rgba(0,0,0,.2)}.trainOfThoughtVideoPlayer_frameMarkers__5y3He{position:absolute;top:-2px;left:0;right:0;height:8px;display:flex;justify-content:space-between;pointer-events:none}.trainOfThoughtVideoPlayer_frameMarker__DBO9Y{width:6px;height:8px;border-radius:1px;cursor:pointer;pointer-events:auto;transition:all .2s ease}.trainOfThoughtVideoPlayer_frameMarker__DBO9Y.trainOfThoughtVideoPlayer_hasImage__GFGAk{background-color:hsl(var(--primary))}.trainOfThoughtVideoPlayer_frameMarker__DBO9Y.trainOfThoughtVideoPlayer_textOnly__okufk{background-color:hsl(var(--muted-foreground))}.trainOfThoughtVideoPlayer_frameMarker__DBO9Y.trainOfThoughtVideoPlayer_active__zp6u9{background-color:hsl(var(--accent))!important;transform:scaleY(1.5)}.trainOfThoughtVideoPlayer_frameMarker__DBO9Y:hover{transform:scaleY(1.2)}.trainOfThoughtVideoPlayer_controlButtons__rqfIH{display:flex;align-items:center;gap:8px;margin-bottom:8px}.trainOfThoughtVideoPlayer_controlButton___RdE_{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid hsl(var(--border));border-radius:4px;background-color:hsl(var(--background));color:hsl(var(--foreground));cursor:pointer;transition:all .2s ease}.trainOfThoughtVideoPlayer_controlButton___RdE_:hover:not(:disabled){background-color:hsl(var(--muted))}.trainOfThoughtVideoPlayer_controlButton___RdE_:disabled{opacity:.5;cursor:not-allowed}.trainOfThoughtVideoPlayer_controlButton___RdE_.trainOfThoughtVideoPlayer_active__zp6u9{background-color:hsl(var(--primary));color:hsl(var(--primary-foreground))}.trainOfThoughtVideoPlayer_frameInfo__u5nwA{display:flex;justify-content:center;font-size:12px;color:hsl(var(--muted-foreground))}@media (prefers-color-scheme:dark){.trainOfThoughtVideoPlayer_textOverlay__BGbhO{background:linear-gradient(transparent,rgba(0,0,0,.9))}}div.automations_automationsLayout__Atoh_{display:grid;grid-template-columns:1fr 1fr;gap:1rem}div.automations_automationCard__BKidA{display:grid;grid-template-rows:auto 1fr auto}div.automations_pageLayout__OaoYA{max-width:60vw;margin:auto auto 2rem}@media screen and (max-width:768px){div.automations_automationsLayout__Atoh_{grid-template-columns:1fr}div.automations_pageLayout__OaoYA{max-width:90vw}}
@@ -0,0 +1 @@
1
+ div.chat_main__8xQu5{height:100%;color:hsla(var(--foreground));margin-left:auto;margin-right:auto}.chat_suggestions__m8n2t{display:flex;overflow-x:none;height:50%;padding:10px;white-space:nowrap;gap:1rem}div.chat_inputBox__LOFws{border:1px solid var(--border-color);margin-bottom:20px;gap:12px;align-content:center}input.chat_inputBox__LOFws{border:none}input.chat_inputBox__LOFws:focus{outline:none;background-color:transparent}div.chat_inputBox__LOFws:focus{box-shadow:0 8px 16px 0 rgba(0,0,0,.2)}div.chat_chatBodyFull__FfKEK{display:grid;grid-template-columns:1fr;height:auto}button.chat_inputBox__LOFws{border:none;outline:none;background-color:transparent;cursor:pointer;border-radius:.5rem;padding:.5rem;background:linear-gradient(var(--calm-green),var(--calm-blue))}div.chat_chatBody__sS1LX{display:grid;grid-template-columns:1fr 1fr;height:100%}.chat_inputBox__LOFws{color:hsla(var(--foreground))}div.chat_chatLayout__pR203{display:grid;grid-template-columns:1fr;gap:1rem;width:100%}div.chat_chatBox__FBct_{display:grid;height:100%}div.chat_titleBar__R5QlK{display:grid;grid-template-columns:1fr auto}div.chat_chatBoxBody__qT_SC{display:grid;height:100%;width:100%;margin:auto}div.chat_agentIndicator__8V55w a{display:flex;text-align:center;align-content:center;align-items:center}div.chat_agentIndicator__8V55w{padding:10px}div.chat_chatTitleWrapper__6ChWq{grid-template-columns:1fr auto}@media screen and (max-width:768px){div.chat_inputBox__LOFws{margin-bottom:0}div.chat_chatBoxBody__qT_SC{width:100%}div.chat_chatBody__sS1LX{grid-template-columns:0fr 1fr}div.chat_chatBox__FBct_{padding:0;height:100%}div.chat_chatLayout__pR203{gap:0;grid-template-columns:1fr}}@media print{div.chat_chatBoxBody__qT_SC,div.chat_chatBox__FBct_,div.chat_chatLayout__pR203,div.chat_main__8xQu5{height:auto!important;max-height:none!important;width:100%!important;margin:0!important;padding:0!important;overflow:visible!important}div.chat_chatBoxBody__qT_SC,div.chat_chatBox__FBct_,div.chat_chatLayout__pR203{display:block!important;position:static!important}div.chat_chatBodyFull__FfKEK,div.chat_chatBody__sS1LX{display:block!important;width:100%!important;height:auto!important;max-height:none!important;grid-template-columns:none!important;overflow:visible!important;position:static!important}div.chat_inputBox__LOFws{display:none!important}.chat_chatHistory__EzBJM{width:100%!important;max-width:none!important}}div.chatHistory_chatHistory__CoaVT{display:flex;flex-direction:column;height:100%;margin:auto}div.chatHistory_agentIndicator__wOU1f a{display:flex;text-align:center;align-content:center;align-items:center}div.chatHistory_trainOfThought__mMWSR{padding:8px 16px;margin:12px}@media print{div.chatHistory_chatHistory__CoaVT{display:block!important;flex-direction:column!important}div.chatHistory_chatHistory__CoaVT,div.chatHistory_chatHistory__CoaVT>*{height:auto!important;max-height:none!important;overflow:visible!important;position:static!important}div.chatHistory_chatHistory__CoaVT>*{width:100%!important;max-width:none!important}div.chatHistory_agentIndicator__wOU1f{margin-bottom:.5rem!important}div.chatHistory_trainOfThought__mMWSR{border-left:2px solid #ccc!important;margin:.5rem 0!important;padding:.5rem 1rem!important;font-size:.9em!important}}div.chatMessage_chatMessageContainer__sAivf{display:flex;flex-direction:column;margin:12px;border-radius:16px;padding:8px 16px 0;word-break:break-word}div.chatMessage_chatMessageWrapper__u5m8A{padding-left:1rem;padding-bottom:1rem}div.chatMessage_chatMessageWrapper__u5m8A ol,div.chatMessage_chatMessageWrapper__u5m8A p:not(:last-child),div.chatMessage_chatMessageWrapper__u5m8A ul{margin-bottom:16px}div.chatMessage_chatMessageWrapper__u5m8A a span{display:revert!important}div.chatMessage_khojfullHistory__NPu2l{padding-left:4px}div.chatMessage_youfullHistory__ioyfH{max-width:100%}div.chatMessage_chatMessageContainer__sAivf.chatMessage_youfullHistory__ioyfH{padding-left:0}div.chatMessage_you__6GUC4{background-color:hsla(var(--secondary));align-self:flex-end;border-radius:16px}div.chatMessage_khoj__cjWON{background-color:transparent;color:hsl(var(--accent-foreground));align-self:flex-start}div.chatMessage_khojChatMessage__BabQz{padding-top:8px;padding-left:16px}div.chatMessage_emptyChatMessage__J9JRn{display:none}div.chatMessage_imagesContainer__HTRjT{display:flex;overflow-x:auto;padding-bottom:8px;margin-bottom:8px}div.chatMessage_imageWrapper__DF92M{flex:0 0 auto;margin-right:8px}div.chatMessage_imageWrapper__DF92M img{width:auto;height:128px;-o-object-fit:cover;object-fit:cover;border-radius:8px}div.chatMessage_khoj__cjWON div.chatMessage_imageWrapper__DF92M img{height:512px}div.chatMessage_khoj__cjWON div.chatMessage_imageWrapper__DF92M{flex:1 1 auto}div.chatMessage_khoj__cjWON div.chatMessage_imagesContainer__HTRjT{display:flex;flex-wrap:wrap;flex-direction:row;overflow-x:hidden}div.chatMessage_chatMessageContainer__sAivf>img{width:auto;height:auto;max-width:100%;max-height:80vh;-o-object-fit:contain;object-fit:contain;display:block;margin-top:.25rem;margin-right:auto}div.chatMessage_chatMessageContainer__sAivf h3 img{width:24px}div.chatMessage_you__6GUC4{color:hsla(var(--secondary-foreground))}div.chatMessage_author__muRtC{font-size:.75rem;color:grey;text-align:right}div.chatMessage_chatFooter__0vR8s{display:flex;justify-content:space-between;min-height:28px}div.chatMessage_chatButtons__Lbk8T{display:flex;justify-content:flex-end;width:-moz-min-content;width:min-content;border:1px solid var(--border-color);border-radius:16px;position:relative;bottom:-12px;background-color:hsla(var(--secondary))}div.chatMessage_chatFooter__0vR8s button{cursor:pointer;color:hsl(var(--muted-foreground));border:none;border-radius:16px;padding:4px;margin-left:4px;margin-right:4px}div.chatMessage_chatFooter__0vR8s button:hover{background-color:hsla(var(--frosted-background-color))}button.chatMessage_codeCopyButton__Y_Ujv{cursor:pointer;float:right;border-radius:8px}button.chatMessage_codeCopyButton__Y_Ujv:hover{color:hsla(var(--frosted-background-color))}button.chatMessage_codeCopyButton__Y_Ujv img,button.chatMessage_copyButton__jd7q7 img,button.chatMessage_retryButton__Z7Pzk img,div.chatMessage_feedbackButtons___Brdy img{width:24px}div.chatMessage_trainOfThought__mR2Gg strong{font-weight:500}div.chatMessage_trainOfThought__mR2Gg.chatMessage_primary__WYPEb strong{font-weight:500;color:hsla(var(--secondary-foreground))}div.chatMessage_trainOfThought__mR2Gg.chatMessage_primary__WYPEb p{color:inherit}div.chatMessage_trainOfThoughtElement__le_bC{display:grid;grid-template-columns:auto 1fr;align-items:start}div.chatMessage_trainOfThoughtElement__le_bC ol,div.chatMessage_trainOfThoughtElement__le_bC ul{margin:auto;word-break:break-word}@media screen and (max-width:768px){div.chatMessage_youfullHistory__ioyfH{max-width:90%}div.chatMessage_khoj__cjWON div.chatMessage_imageWrapper__DF92M img{width:100%;height:auto}}@media print{div.chatMessage_chatMessageContainer__sAivf{background:transparent!important;border:1px solid #ccc!important;border-radius:8px!important;margin:.5rem 0!important;padding:.5rem!important;width:100%!important;max-width:none!important}div.chatMessage_chatMessageContainer__sAivf.chatMessage_you__6GUC4{margin:1rem 0 0!important;background:transparent!important;border:none!important}div.chatMessage_chatMessageContainer__sAivf.chatMessage_khoj__cjWON{margin:0!important}div.chatMessage_chatMessageWrapper__u5m8A{padding-left:.5rem!important;padding-bottom:.5rem!important;width:100%!important;max-width:none!important}div.chatMessage_you__6GUC4 div.chatMessage_chatMessageWrapper__u5m8A{padding:0!important}div.chatMessage_you__6GUC4{font-size:16pt!important;font-weight:500!important;padding:.8rem 0 .1rem!important;align-self:flex-start!important;text-align:left!important}div.chatMessage_khoj__cjWON,div.chatMessage_you__6GUC4{background-color:transparent!important;color:#000!important}div.chatMessage_khoj__cjWON{align-self:stretch!important}div.chatMessage_khoj__cjWON,div.chatMessage_khojfullHistory__NPu2l,div.chatMessage_youfullHistory__ioyfH{width:100%!important;max-width:none!important}div.chatMessage_author__muRtC{color:#666!important;font-size:.7rem!important}div.chatMessage_you__6GUC4.chatMessage_chatMessageContainer__sAivf:after{content:"🕐 " attr(data-created)!important;display:block!important;color:#888!important;font-size:9pt!important;font-weight:400!important;margin:.2rem 0 .6rem!important;padding-bottom:.4rem!important}button.chatMessage_codeCopyButton__Y_Ujv,button.chatMessage_copyButton__jd7q7,button.chatMessage_retryButton__Z7Pzk,div.chatMessage_chatButtons__Lbk8T,div.chatMessage_chatFooter__0vR8s,div.chatMessage_feedbackButtons___Brdy{display:none!important}div.chatMessage_imagesContainer__HTRjT{display:block!important;overflow:visible!important;margin-bottom:.5rem!important}div.chatMessage_imageWrapper__DF92M{margin-right:0!important;margin-bottom:.5rem!important}div.chatMessage_imageWrapper__DF92M img,div.chatMessage_khoj__cjWON div.chatMessage_imageWrapper__DF92M img{width:auto!important;height:auto!important;max-width:100%!important;max-height:4in!important;-o-object-fit:contain!important;object-fit:contain!important;page-break-inside:avoid}div.chatMessage_trainOfThought__mR2Gg{border-left:2px solid #ccc!important;margin:.5rem 0!important;padding:.5rem!important;font-size:.9em!important;color:#666!important}div.chatMessage_trainOfThought__mR2Gg strong{color:#000!important}div.chatMessage_trainOfThought__mR2Gg.chatMessage_primary__WYPEb{border-left-color:#000!important}div.chatMessage_trainOfThought__mR2Gg.chatMessage_primary__WYPEb strong{color:#000!important}div.chatMessage_trainOfThoughtElement__le_bC{display:block!important;margin-bottom:.5rem!important}}@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_AMS-Regular.a79f1c31.woff2) format("woff2"),url(/_next/static/media/KaTeX_AMS-Regular.1608a09b.woff) format("woff"),url(/_next/static/media/KaTeX_AMS-Regular.4aafdb68.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/_next/static/media/KaTeX_Caligraphic-Bold.ec17d132.woff2) format("woff2"),url(/_next/static/media/KaTeX_Caligraphic-Bold.b6770918.woff) format("woff"),url(/_next/static/media/KaTeX_Caligraphic-Bold.cce5b8ec.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Caligraphic-Regular.55fac258.woff2) format("woff2"),url(/_next/static/media/KaTeX_Caligraphic-Regular.dad44a7f.woff) format("woff"),url(/_next/static/media/KaTeX_Caligraphic-Regular.07ef19e7.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/_next/static/media/KaTeX_Fraktur-Bold.d42a5579.woff2) format("woff2"),url(/_next/static/media/KaTeX_Fraktur-Bold.9f256b85.woff) format("woff"),url(/_next/static/media/KaTeX_Fraktur-Bold.b18f59e1.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Fraktur-Regular.d3c882a6.woff2) format("woff2"),url(/_next/static/media/KaTeX_Fraktur-Regular.7c187121.woff) format("woff"),url(/_next/static/media/KaTeX_Fraktur-Regular.ed38e79f.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/_next/static/media/KaTeX_Main-Bold.c3fb5ac2.woff2) format("woff2"),url(/_next/static/media/KaTeX_Main-Bold.d181c465.woff) format("woff"),url(/_next/static/media/KaTeX_Main-Bold.b74a1a8b.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/_next/static/media/KaTeX_Main-BoldItalic.6f2bb1df.woff2) format("woff2"),url(/_next/static/media/KaTeX_Main-BoldItalic.e3f82f9d.woff) format("woff"),url(/_next/static/media/KaTeX_Main-BoldItalic.70d8b0a5.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/_next/static/media/KaTeX_Main-Italic.8916142b.woff2) format("woff2"),url(/_next/static/media/KaTeX_Main-Italic.9024d815.woff) format("woff"),url(/_next/static/media/KaTeX_Main-Italic.47373d1e.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Main-Regular.0462f03b.woff2) format("woff2"),url(/_next/static/media/KaTeX_Main-Regular.7f51fe03.woff) format("woff"),url(/_next/static/media/KaTeX_Main-Regular.b7f8fe9b.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/_next/static/media/KaTeX_Math-BoldItalic.572d331f.woff2) format("woff2"),url(/_next/static/media/KaTeX_Math-BoldItalic.f1035d8d.woff) format("woff"),url(/_next/static/media/KaTeX_Math-BoldItalic.a879cf83.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/_next/static/media/KaTeX_Math-Italic.f28c23ac.woff2) format("woff2"),url(/_next/static/media/KaTeX_Math-Italic.5295ba48.woff) format("woff"),url(/_next/static/media/KaTeX_Math-Italic.939bc644.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(/_next/static/media/KaTeX_SansSerif-Bold.8c5b5494.woff2) format("woff2"),url(/_next/static/media/KaTeX_SansSerif-Bold.bf59d231.woff) format("woff"),url(/_next/static/media/KaTeX_SansSerif-Bold.94e1e8dc.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(/_next/static/media/KaTeX_SansSerif-Italic.3b1e59b3.woff2) format("woff2"),url(/_next/static/media/KaTeX_SansSerif-Italic.7c9bc82b.woff) format("woff"),url(/_next/static/media/KaTeX_SansSerif-Italic.b4c20c84.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_SansSerif-Regular.ba21ed5f.woff2) format("woff2"),url(/_next/static/media/KaTeX_SansSerif-Regular.74048478.woff) format("woff"),url(/_next/static/media/KaTeX_SansSerif-Regular.d4d7ba48.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Script-Regular.03e9641d.woff2) format("woff2"),url(/_next/static/media/KaTeX_Script-Regular.07505710.woff) format("woff"),url(/_next/static/media/KaTeX_Script-Regular.fe9cbbe1.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Size1-Regular.eae34984.woff2) format("woff2"),url(/_next/static/media/KaTeX_Size1-Regular.e1e279cb.woff) format("woff"),url(/_next/static/media/KaTeX_Size1-Regular.fabc004a.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Size2-Regular.5916a24f.woff2) format("woff2"),url(/_next/static/media/KaTeX_Size2-Regular.57727022.woff) format("woff"),url(/_next/static/media/KaTeX_Size2-Regular.d6b476ec.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Size3-Regular.b4230e7e.woff2) format("woff2"),url(/_next/static/media/KaTeX_Size3-Regular.9acaf01c.woff) format("woff"),url(/_next/static/media/KaTeX_Size3-Regular.a144ef58.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Size4-Regular.10d95fd3.woff2) format("woff2"),url(/_next/static/media/KaTeX_Size4-Regular.7a996c9d.woff) format("woff"),url(/_next/static/media/KaTeX_Size4-Regular.fbccdabe.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Typewriter-Regular.a8709e36.woff2) format("woff2"),url(/_next/static/media/KaTeX_Typewriter-Regular.6258592b.woff) format("woff"),url(/_next/static/media/KaTeX_Typewriter-Regular.d97aaf4a.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.22"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}.suggestions_card__fbiZo{border-radius:.5rem}.suggestions_title__vNozc{font-size:1rem}.suggestions_text__J_IfY{padding-top:.2rem;font-size:.9rem;white-space:wrap;padding-right:4px;color:#000}div.chatInputArea_actualInputArea__Ha6cN{display:grid;grid-template-columns:auto 1fr auto auto}