larkup 0.1.39 → 0.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/diagnostics/route-bundle-stats.json +22 -21
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +18 -18
- package/.next/server/app/_not-found.segments/_full.segment.rsc +18 -18
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +12 -12
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/analytics/page.js.nft.json +1 -1
- package/.next/server/app/analytics/page_client-reference-manifest.js +1 -1
- package/.next/server/app/analytics.html +1 -1
- package/.next/server/app/analytics.rsc +19 -19
- package/.next/server/app/analytics.segments/_full.segment.rsc +19 -19
- package/.next/server/app/analytics.segments/_head.segment.rsc +4 -4
- package/.next/server/app/analytics.segments/_index.segment.rsc +12 -12
- package/.next/server/app/analytics.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/analytics.segments/analytics/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/analytics.segments/analytics.segment.rsc +3 -3
- package/.next/server/app/chat/page.js.nft.json +1 -1
- package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
- package/.next/server/app/chat.html +1 -1
- package/.next/server/app/chat.rsc +19 -19
- package/.next/server/app/chat.segments/_full.segment.rsc +19 -19
- package/.next/server/app/chat.segments/_head.segment.rsc +4 -4
- package/.next/server/app/chat.segments/_index.segment.rsc +12 -12
- package/.next/server/app/chat.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/chat.segments/chat/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/chat.segments/chat.segment.rsc +3 -3
- package/.next/server/app/data/page.js.nft.json +1 -1
- package/.next/server/app/data/page_client-reference-manifest.js +1 -1
- package/.next/server/app/data.html +1 -1
- package/.next/server/app/data.rsc +25 -26
- package/.next/server/app/data.segments/_full.segment.rsc +25 -26
- package/.next/server/app/data.segments/_head.segment.rsc +4 -4
- package/.next/server/app/data.segments/_index.segment.rsc +12 -12
- package/.next/server/app/data.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/data.segments/data/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/data.segments/data.segment.rsc +3 -3
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +17 -17
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +17 -17
- package/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/server/app/index.segments/_index.segment.rsc +12 -12
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +19 -19
- package/.next/server/app/settings.segments/_full.segment.rsc +19 -19
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +12 -12
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/server/chunks/0598_next_dist_esm_build_templates_app-route_0kbcuk-.js +8 -7
- package/.next/server/chunks/0598_next_dist_esm_build_templates_app-route_0sbf4ny.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0j2l54r._.js +1 -1
- package/.next/server/chunks/packages_scraper_src_0kkcv_v._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0m21fli._.js → [root-of-the-server]__0pgotbk._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__1k1mxo2._.js +3 -0
- package/.next/server/chunks/ssr/_169pdlf._.js +5 -5
- package/.next/server/chunks/ssr/_18jagqc._.js +2 -2
- package/.next/server/chunks/ssr/_1hetwwu._.js +2 -2
- package/.next/{standalone/apps/web/.next/server/chunks/ssr/_0s8403d._.js → server/chunks/ssr/_1p6lb7s._.js} +2 -2
- package/.next/server/chunks/ssr/_1yqlx1m._.js +1 -1
- package/.next/server/chunks/ssr/apps_web_components_analytics_analytics-dashboard_tsx_1056-z3._.js +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/standalone/apps/web/.next/BUILD_ID +1 -1
- package/.next/standalone/apps/web/.next/build-manifest.json +3 -3
- package/.next/standalone/apps/web/.next/required-server-files.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/_not-found.rsc +18 -18
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_full.segment.rsc +18 -18
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_index.segment.rsc +12 -12
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/analytics/page.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/analytics/page_client-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/analytics.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/analytics.rsc +19 -19
- package/.next/standalone/apps/web/.next/server/app/analytics.segments/_full.segment.rsc +19 -19
- package/.next/standalone/apps/web/.next/server/app/analytics.segments/_head.segment.rsc +4 -4
- package/.next/standalone/apps/web/.next/server/app/analytics.segments/_index.segment.rsc +12 -12
- package/.next/standalone/apps/web/.next/server/app/analytics.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/analytics.segments/analytics/__PAGE__.segment.rsc +3 -3
- package/.next/standalone/apps/web/.next/server/app/analytics.segments/analytics.segment.rsc +3 -3
- package/.next/standalone/apps/web/.next/server/app/chat/page.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/chat/page_client-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/chat.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/chat.rsc +19 -19
- package/.next/standalone/apps/web/.next/server/app/chat.segments/_full.segment.rsc +19 -19
- package/.next/standalone/apps/web/.next/server/app/chat.segments/_head.segment.rsc +4 -4
- package/.next/standalone/apps/web/.next/server/app/chat.segments/_index.segment.rsc +12 -12
- package/.next/standalone/apps/web/.next/server/app/chat.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/chat.segments/chat/__PAGE__.segment.rsc +3 -3
- package/.next/standalone/apps/web/.next/server/app/chat.segments/chat.segment.rsc +3 -3
- package/.next/standalone/apps/web/.next/server/app/data/page.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/data/page_client-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/data.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/data.rsc +25 -26
- package/.next/standalone/apps/web/.next/server/app/data.segments/_full.segment.rsc +25 -26
- package/.next/standalone/apps/web/.next/server/app/data.segments/_head.segment.rsc +4 -4
- package/.next/standalone/apps/web/.next/server/app/data.segments/_index.segment.rsc +12 -12
- package/.next/standalone/apps/web/.next/server/app/data.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/data.segments/data/__PAGE__.segment.rsc +3 -3
- package/.next/standalone/apps/web/.next/server/app/data.segments/data.segment.rsc +3 -3
- package/.next/standalone/apps/web/.next/server/app/index.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/index.rsc +17 -17
- package/.next/standalone/apps/web/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/index.segments/_full.segment.rsc +17 -17
- package/.next/standalone/apps/web/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/apps/web/.next/server/app/index.segments/_index.segment.rsc +12 -12
- package/.next/standalone/apps/web/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/settings.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/settings.rsc +19 -19
- package/.next/standalone/apps/web/.next/server/app/settings.segments/_full.segment.rsc +19 -19
- package/.next/standalone/apps/web/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/standalone/apps/web/.next/server/app/settings.segments/_index.segment.rsc +12 -12
- package/.next/standalone/apps/web/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/standalone/apps/web/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/standalone/apps/web/.next/server/chunks/0598_next_dist_esm_build_templates_app-route_0kbcuk-.js +8 -7
- package/.next/standalone/apps/web/.next/server/chunks/0598_next_dist_esm_build_templates_app-route_0sbf4ny.js +2 -2
- package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0j2l54r._.js +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/packages_scraper_src_0kkcv_v._.js +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__0m21fli._.js → [root-of-the-server]__0pgotbk._.js} +2 -2
- package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__1k1mxo2._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/ssr/_169pdlf._.js +5 -5
- package/.next/standalone/apps/web/.next/server/chunks/ssr/_18jagqc._.js +2 -2
- package/.next/standalone/apps/web/.next/server/chunks/ssr/_1hetwwu._.js +2 -2
- package/.next/{server/chunks/ssr/_0s8403d._.js → standalone/apps/web/.next/server/chunks/ssr/_1p6lb7s._.js} +2 -2
- package/.next/standalone/apps/web/.next/server/chunks/ssr/_1yqlx1m._.js +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/ssr/apps_web_components_analytics_analytics-dashboard_tsx_1056-z3._.js +1 -1
- package/.next/standalone/apps/web/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/apps/web/.next/server/pages/404.html +1 -1
- package/.next/standalone/apps/web/.next/server/pages/500.html +1 -1
- package/.next/standalone/apps/web/.next/static/chunks/0f_k7h1yraes3.js +1 -0
- package/.next/standalone/apps/web/.next/static/chunks/1j_-mc43_9-b3.js +121 -0
- package/.next/standalone/apps/web/.next/static/chunks/23efo4rpc31kr.js +1 -0
- package/.next/standalone/apps/web/.next/static/chunks/2dvtyg2k2op4x.js +11 -0
- package/.next/standalone/apps/web/.next/static/chunks/{2ljwki2xxnblc.js → 2h-80z3n8mi3d.js} +7 -7
- package/.next/{static/chunks/1ov69q-i9ybqi.js → standalone/apps/web/.next/static/chunks/2x1t8sqst0ipu.js} +1 -1
- package/.next/standalone/apps/web/.next/static/chunks/37j20in7beze4.js +1 -0
- package/.next/standalone/apps/web/.next/static/chunks/{1cxabi5yzqz57.js → 38f3p67a1uufx.js} +1 -1
- package/.next/standalone/apps/web/.next/static/chunks/3fe06cefiv690.css +1 -0
- package/.next/standalone/apps/web/CHANGELOG.md +21 -0
- package/.next/standalone/apps/web/app/api/chat/route.ts +34 -13
- package/.next/standalone/apps/web/app/api/chat/tools.ts +10 -1
- package/.next/standalone/apps/web/app/api/media/process/route.ts +34 -1
- package/.next/standalone/apps/web/app/settings/page.tsx +16 -5
- package/.next/standalone/apps/web/bin/larkup.js +12 -1
- package/.next/standalone/apps/web/components/chat/message-item.tsx +68 -3
- package/.next/standalone/apps/web/components/data/data-workspace.tsx +53 -120
- package/.next/standalone/apps/web/components/data/firecrawl-notice.tsx +3 -13
- package/.next/standalone/apps/web/components/data/media-panel.tsx +182 -25
- package/.next/standalone/apps/web/components/data/scrape-panel.tsx +4 -12
- package/.next/standalone/apps/web/components/data/upload-panel.tsx +0 -1
- package/.next/standalone/apps/web/components/index/index-workspace.tsx +48 -25
- package/.next/standalone/apps/web/components/settings/marketplace-section.tsx +1 -1
- package/.next/standalone/apps/web/components/settings/settings-layout.tsx +1 -2
- package/.next/standalone/apps/web/package.json +1 -1
- package/.next/standalone/apps/web/server.js +1 -1
- package/.next/standalone/packages/tools/doc-editor/CHANGELOG.md +7 -0
- package/.next/standalone/packages/tools/doc-editor/dist/editor.js +1 -15
- package/.next/standalone/packages/tools/doc-editor/package.json +1 -1
- package/.next/standalone/packages/tools/doc-editor/src/editor.ts +1 -15
- package/.next/standalone/packages/tools/video-audio/CHANGELOG.md +6 -0
- package/.next/standalone/packages/tools/video-audio/dist/url-importer.js +37 -5
- package/.next/standalone/packages/tools/video-audio/package.json +1 -1
- package/.next/standalone/packages/tools/video-audio/src/url-importer.ts +61 -25
- package/.next/static/chunks/0f_k7h1yraes3.js +1 -0
- package/.next/static/chunks/1j_-mc43_9-b3.js +121 -0
- package/.next/static/chunks/23efo4rpc31kr.js +1 -0
- package/.next/static/chunks/2dvtyg2k2op4x.js +11 -0
- package/.next/static/chunks/{2ljwki2xxnblc.js → 2h-80z3n8mi3d.js} +7 -7
- package/.next/{standalone/apps/web/.next/static/chunks/1ov69q-i9ybqi.js → static/chunks/2x1t8sqst0ipu.js} +1 -1
- package/.next/static/chunks/37j20in7beze4.js +1 -0
- package/.next/static/chunks/{1cxabi5yzqz57.js → 38f3p67a1uufx.js} +1 -1
- package/.next/static/chunks/3fe06cefiv690.css +1 -0
- package/CHANGELOG.md +21 -0
- package/app/api/chat/route.ts +34 -13
- package/app/api/chat/tools.ts +10 -1
- package/app/api/media/process/route.ts +34 -1
- package/app/settings/page.tsx +16 -5
- package/bin/larkup.js +12 -1
- package/components/chat/message-item.tsx +68 -3
- package/components/data/data-workspace.tsx +53 -120
- package/components/data/firecrawl-notice.tsx +3 -13
- package/components/data/media-panel.tsx +182 -25
- package/components/data/scrape-panel.tsx +4 -12
- package/components/data/upload-panel.tsx +0 -1
- package/components/index/index-workspace.tsx +48 -25
- package/components/settings/marketplace-section.tsx +1 -1
- package/components/settings/settings-layout.tsx +1 -2
- package/package.json +6 -6
- package/.next/server/chunks/ssr/[root-of-the-server]__0t8ud_u._.js +0 -3
- package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0t8ud_u._.js +0 -3
- package/.next/standalone/apps/web/.next/static/chunks/03ju_837pa9ul.js +0 -11
- package/.next/standalone/apps/web/.next/static/chunks/0ge3nirnmx_np.js +0 -1
- package/.next/standalone/apps/web/.next/static/chunks/19krxv-ou9c8c.js +0 -121
- package/.next/standalone/apps/web/.next/static/chunks/1_nk3imchwn8a.css +0 -1
- package/.next/standalone/apps/web/.next/static/chunks/25rt2v27sz0io.js +0 -1
- package/.next/static/chunks/03ju_837pa9ul.js +0 -11
- package/.next/static/chunks/0ge3nirnmx_np.js +0 -1
- package/.next/static/chunks/19krxv-ou9c8c.js +0 -121
- package/.next/static/chunks/1_nk3imchwn8a.css +0 -1
- package/.next/static/chunks/25rt2v27sz0io.js +0 -1
- /package/.next/standalone/apps/web/.next/static/{iCALZzxFfElF4z3wYZwsC → whR5PvI0kapiCtaze5Lb0}/_buildManifest.js +0 -0
- /package/.next/standalone/apps/web/.next/static/{iCALZzxFfElF4z3wYZwsC → whR5PvI0kapiCtaze5Lb0}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/apps/web/.next/static/{iCALZzxFfElF4z3wYZwsC → whR5PvI0kapiCtaze5Lb0}/_ssgManifest.js +0 -0
- /package/.next/static/{iCALZzxFfElF4z3wYZwsC → whR5PvI0kapiCtaze5Lb0}/_buildManifest.js +0 -0
- /package/.next/static/{iCALZzxFfElF4z3wYZwsC → whR5PvI0kapiCtaze5Lb0}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{iCALZzxFfElF4z3wYZwsC → whR5PvI0kapiCtaze5Lb0}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,721606,e=>{"use strict";var t=e.i(199910),s=e.i(178328),a=e.i(732684);function n(){return"u">typeof window}function r(){return"production"}function i(){return"development"===((n()?window.vam:r())||"production")}function l(e){return RegExp(`/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[/?#]|$)`)}function o(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function d(e){return(0,s.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,s.useEffect)(()=>{!function(e={debug:!0},t){var s;if(!n())return;let{beforeSend:a,src:l,dataset:d}=function(e,t){var s,a;let n=e;if(t)try{n={...null==(s=JSON.parse(t))?void 0:s.analytics,...e}}catch{}!function(e="auto"){if("auto"===e){window.vam=r();return}window.vam=e}(n.mode);let l={sdkn:"@vercel/analytics"+(n.framework?`/${n.framework}`:""),sdkv:"2.0.1"};return n.disableAutoTrack&&(l.disableAutoTrack="1"),n.viewEndpoint&&(l.viewEndpoint=o(n.viewEndpoint)),n.eventEndpoint&&(l.eventEndpoint=o(n.eventEndpoint)),n.sessionEndpoint&&(l.sessionEndpoint=o(n.sessionEndpoint)),i()&&!1===n.debug&&(l.debug="false"),n.dsn&&(l.dsn=n.dsn),n.endpoint?l.endpoint=n.endpoint:n.basePath&&(l.endpoint=o(`${n.basePath}/insights`)),{beforeSend:n.beforeSend,src:(a=n).scriptSrc?o(a.scriptSrc):i()?"https://va.vercel-scripts.com/v1/script.debug.js":a.basePath?o(`${a.basePath}/insights/script.js`):"/_vercel/insights/script.js",dataset:l}}(e,t);if(window.va||(window.va=function(...e){window.vaq||(window.vaq=[]),window.vaq.push(e)}),a&&(null==(s=window.va)||s.call(window,"beforeSend",a)),document.head.querySelector(`script[src*="${l}"]`))return;let c=document.createElement("script");for(let[e,t]of(c.src=l,Object.entries(d)))c.dataset[e]=t;c.defer=!0,c.onerror=()=>{let e=i()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${l}. ${e}`)},document.head.appendChild(c)}({framework:e.framework||"react",basePath:e.basePath??function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...void 0!==e.route&&{disableAutoTrack:!0},...e},e.configString??function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}())},[]),(0,s.useEffect)(()=>{e.route&&e.path&&function({route:e,path:t}){var s;null==(s=window.va)||s.call(window,"pageview",{route:e,path:t})}({route:e.route,path:e.path})},[e.route,e.path]),null}function c(e){let n,r,i,{route:o,path:c}=(n=(0,a.useParams)(),r=(0,a.useSearchParams)(),i=(0,a.usePathname)(),n?{route:function(e,t){if(!e||!t)return e;let s=e;try{let e=Object.entries(t);for(let[t,a]of e)if(!Array.isArray(a)){let e=l(a);e.test(s)&&(s=s.replace(e,`/[${t}]`))}for(let[t,a]of e)if(Array.isArray(a)){let e=l(a.join("/"));e.test(s)&&(s=s.replace(e,`/[...${t}]`))}return s}catch{return e}}(i,Object.keys(n).length?n:Object.fromEntries(r.entries())),path:i}:{route:null,path:i});return s.default.createElement(d,{path:c,route:o,...e,basePath:function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH}(),configString:function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_CLIENT_CONFIG}(),framework:"next"})}e.s(["Analytics",0,function(e){return s.default.createElement(s.Suspense,{fallback:null},s.default.createElement(c,{...e}))}])},7012,e=>{"use strict";var t=e.i(523829),s=e.i(178328),a=(e,t,s,a,n,r,i,l)=>{let o=document.documentElement,d=["light","dark"];function c(t){var s;(Array.isArray(e)?e:[e]).forEach(e=>{let s="class"===e,a=s&&r?n.map(e=>r[e]||e):n;s?(o.classList.remove(...a),o.classList.add(r&&r[t]?r[t]:t)):o.setAttribute(e,t)}),s=t,l&&d.includes(s)&&(o.style.colorScheme=s)}if(a)c(a);else try{let e=localStorage.getItem(t)||s,a=i&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;c(a)}catch(e){}},n=s.createContext(void 0),r={setTheme:e=>{},themes:[]};s.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:l,value:o,themes:d,nonce:c,scriptProps:u})=>{let m=JSON.stringify([n,t,l,e,d,o,r,i]).slice(1,-1);return s.createElement("script",{...u,suppressHydrationWarning:!0,nonce:"u"<typeof window?c:"",dangerouslySetInnerHTML:{__html:`(${a.toString()})(${m})`}})});var i=e.i(746632),l=e.i(795360),l=l,o=e.i(951482),o=o,d=e.i(195300),d=d,c=e.i(909042),c=c,u=e.i(964548),u=u;e.s(["Toaster",0,({...e})=>{var a;let{theme:m="system"}=null!=(a=s.useContext(n))?a:r;return(0,t.jsx)(i.Toaster,{closeButton:!0,theme:m,className:"toaster group z-9999999! ",icons:{success:(0,t.jsx)(l.default,{className:"size-5 text-white",fill:"#10b981"}),info:(0,t.jsx)(o.default,{className:"size-5 text-white",fill:"#3b82f6"}),warning:(0,t.jsx)(d.default,{className:"size-5 text-white",fill:"#f59e0b"}),error:(0,t.jsx)(c.default,{className:"size-5 text-white",fill:"#ef4444"}),loading:(0,t.jsx)(u.default,{className:"size-5 animate-spin text-muted-foreground"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)",zIndex:999999},toastOptions:{classNames:{toast:"group toast items-start group-[.toaster]:!bg-[#F9F9F7] dark:group-[.toaster]:!bg-zinc-900 group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:",icon:"mt-0.5",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",success:"group-[.toaster]:!bg-[#F9F9F7] dark:group-[.toaster]:!bg-zinc-900",error:"group-[.toaster]:!bg-[#F9F9F7] dark:group-[.toaster]:!bg-zinc-900",warning:"group-[.toaster]:!bg-[#F9F9F7] dark:group-[.toaster]:!bg-zinc-900",info:"group-[.toaster]:!bg-[#F9F9F7] dark:group-[.toaster]:!bg-zinc-900"}},...e})}],7012)},266186,e=>{"use strict";var t=e.i(523829),s=e.i(82100),a=e.i(178328),n=e.i(334347),r=e.i(732684),i=e.i(301470),l=e.i(518864),o=e.i(487779),d=e.i(874822);let c=(0,d.default)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);var u=e.i(708909),m=e.i(37126),x=e.i(152236),h=e.i(839717),p=e.i(133058);let f=(0,d.default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);var g=e.i(980369),b=e.i(379702),j=e.i(885131),v=e.i(440087),y=e.i(624529),N=e.i(874560),w=e.i(746632),k=e.i(501706),C=e.i(466691),A=e.i(282879);function F({target:e,open:s,onOpenChange:n}){let{deleteServer:r}=(0,y.useWorkspace)(),[i,l]=(0,a.useState)(!1);async function o(){if(e){l(!0);try{await r(e.id),w.toast.success(`Deleted "${e.name}".`),n(!1)}catch{w.toast.error("Could not delete the server.")}finally{l(!1)}}}return(0,t.jsx)(A.Dialog,{open:s,onOpenChange:n,children:(0,t.jsxs)(A.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsxs)(A.DialogHeader,{children:[(0,t.jsxs)(A.DialogTitle,{children:["Delete “",e?.name,"”?"]}),(0,t.jsx)(A.DialogDescription,{children:"This permanently removes the server's documents, index, vector data, and generated files. This cannot be undone."})]}),(0,t.jsxs)(A.DialogFooter,{children:[(0,t.jsx)(C.Button,{variant:"outline",onClick:()=>n(!1),disabled:i,children:"Cancel"}),(0,t.jsxs)(C.Button,{variant:"destructive",onClick:()=>void o(),disabled:i,children:[i&&(0,t.jsx)(k.Loader2,{className:"size-4 animate-spin"}),"Delete server"]})]})]})})}function S(){let{servers:e,activeServer:s,activateServer:n}=(0,y.useWorkspace)(),[r,i]=(0,a.useState)(!1),[l,o]=(0,a.useState)(null),[d,c]=(0,a.useState)(null);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(v.DropdownMenu,{children:[(0,t.jsxs)(v.DropdownMenuTrigger,{render:(0,t.jsx)("button",{type:"button",className:"flex w-full items-center gap-2 rounded-lg border border-border bg-card px-2 py-1.5 text-left transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"}),children:[(0,t.jsx)("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-md bg-primary/12 text-primary",children:(0,t.jsx)(m.Server,{className:"size-3.5"})}),(0,t.jsx)("span",{className:"flex min-w-0 flex-1 flex-col",children:(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:s?.name??"No server"}),s?.running&&(0,t.jsx)(z,{})]})}),(0,t.jsx)(f,{className:"size-4 shrink-0 text-muted-foreground"})]}),(0,t.jsxs)(v.DropdownMenuContent,{align:"start",sideOffset:6,className:"w-(--anchor-width) min-w-[260px]",children:[(0,t.jsxs)(v.DropdownMenuGroup,{children:[(0,t.jsx)(v.DropdownMenuLabel,{children:"Your servers"}),e.map(e=>{let a=e.id===s?.id;return(0,t.jsxs)(v.DropdownMenuItem,{onClick:()=>{a||n(e.id)},className:"gap-2",children:[(0,t.jsx)("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground",children:(0,t.jsx)(m.Server,{className:"size-3.5"})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"truncate font-medium",children:e.name}),(0,t.jsxs)("span",{className:"flex items-center gap-2 text-[11px] text-muted-foreground tabular-nums",children:[(0,t.jsxs)("span",{children:[e.docCount," docs"]}),e.indexed&&(0,t.jsx)("span",{children:"· indexed"}),e.running&&(0,t.jsxs)("span",{className:"flex items-center gap-1 text-green-500",children:[(0,t.jsx)(z,{}),"live"]})]})]}),a&&(0,t.jsx)(p.Check,{className:"size-4 shrink-0 text-primary"})]},e.id)})]}),(0,t.jsx)(v.DropdownMenuSeparator,{}),(0,t.jsxs)(v.DropdownMenuItem,{onClick:()=>i(!0),className:"gap-2 h-9",children:[(0,t.jsx)(b.Plus,{className:"size-4"}),"New server"]}),s&&(0,t.jsxs)(v.DropdownMenuItem,{onClick:()=>o(s),className:"gap-2 h-9",children:[(0,t.jsx)(g.Pencil,{className:"size-4"}),"Rename current"]}),s&&e.length>1&&(0,t.jsxs)(v.DropdownMenuItem,{variant:"destructive",onClick:()=>c(s),className:"gap-2",children:[(0,t.jsx)(j.Trash2,{className:"size-4"}),"Delete current"]})]})]}),(0,t.jsx)(N.ServerFormDialog,{mode:"create",open:r,onOpenChange:i}),(0,t.jsx)(N.ServerFormDialog,{mode:"rename",target:l,open:null!==l,onOpenChange:e=>!e&&o(null)}),(0,t.jsx)(F,{target:d,open:null!==d,onOpenChange:e=>!e&&c(null)})]})}function z(){return(0,t.jsxs)("span",{className:"relative flex size-2",children:[(0,t.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-green-500 opacity-75"}),(0,t.jsx)("span",{className:"relative inline-flex size-2 rounded-full bg-green-500"})]})}let E={"panel-default":void 0,"panel-white":"#FFFFFF","panel-fafafa":"#FAFAFA","panel-warm":"#F7F1EA","panel-soft":"#FBFAF8","panel-silver":"#F8F8F8","panel-stone":"#F5F5F2"},D=[{id:"chat",label:"Chat",href:"/chat",icon:i.MessageCircle},{id:"data",label:"Data",href:"/data",icon:l.Database},{id:"analytics",label:"Analytics",href:"/analytics",icon:c},{id:"settings",label:"Settings",href:"/settings",icon:o.Settings}];function T(){let e=(0,r.usePathname)(),{pageStyle:i,navBg:l}=(0,s.useThemeCustomizer)(),{activeServer:o}=(0,y.useWorkspace)(),[d,c]=(0,a.useState)(!0);(0,a.useEffect)(()=>{"false"===localStorage.getItem("sidebar-collapsed")&&c(!1)},[]);let p=()=>{let e=!d;c(e),localStorage.setItem("sidebar-collapsed",String(e))},f=l?E[l]:void 0;return(0,t.jsx)(h.TooltipProvider,{delay:150,children:(0,t.jsxs)("aside",{className:(0,x.cn)("sticky top-0 hidden h-screen shrink-0 flex-col self-start py-4 md:flex transition-all duration-300 ease-in-out",d?"w-18":"w-60",f?"":"bg-background","fused"===i?"border-r border-border":""),style:f?{backgroundColor:f}:void 0,children:[(0,t.jsx)("div",{className:(0,x.cn)("flex w-full items-center mb-6",d?"justify-center px-3":"justify-between px-4"),children:d?(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{render:(0,t.jsx)("button",{onClick:p,"aria-label":"Expand sidebar",className:"flex size-10 items-center justify-center rounded-xl bg-primary text-primary-foreground transition-transform hover:scale-105"}),children:(0,t.jsx)("img",{src:"/logo9.png",className:"size-5",alt:"logo"})}),(0,t.jsx)(h.TooltipContent,{side:"right",sideOffset:10,children:"Expand sidebar"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.default,{href:"/chat",className:"flex items-center gap-2.5",children:[(0,t.jsx)("span",{className:"flex size-9 items-center justify-center rounded-xl bg-primary text-primary-foreground transition-transform hover:scale-105",children:(0,t.jsx)("img",{src:"/logo9.png",className:"size-5",alt:"logo"})}),(0,t.jsx)("span",{className:"text-sm font-semibold tracking-tight text-foreground",children:"Larkup"})]}),(0,t.jsx)("button",{onClick:p,className:"flex size-7 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors","aria-label":"Collapse sidebar",children:(0,t.jsx)(u.ChevronLeft,{className:"size-3.5"})})]})}),(0,t.jsx)("nav",{className:(0,x.cn)("flex flex-1 flex-col w-full",d?"items-center px-3 gap-3":"px-3 gap-1.5"),children:D.map(s=>{let a=s.icon,r=e===s.href||"/"!==s.href&&e?.startsWith(s.href);return d?(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{render:(0,t.jsx)(n.default,{href:s.href,"aria-current":r?"page":void 0,onClick:t=>{"chat"===s.id&&"/chat"===e&&(t.preventDefault(),window.dispatchEvent(new CustomEvent("new-chat")))},className:(0,x.cn)("group relative flex size-10 items-center justify-center rounded-xl transition-all duration-200 outline-none focus-visible:ring-2 focus-visible:ring-ring",r?"bg-[#F0F0F0] text-foreground":"text-muted-foreground hover:bg-[#EBEBEB] hover:text-foreground")}),children:(0,t.jsx)(a,{className:"size-4.5",strokeWidth:r?2.25:1.75})}),(0,t.jsx)(h.TooltipContent,{side:"right",sideOffset:10,children:s.label})]},s.id):(0,t.jsxs)(n.default,{href:s.href,"aria-current":r?"page":void 0,onClick:t=>{"chat"===s.id&&"/chat"===e&&(t.preventDefault(),window.dispatchEvent(new CustomEvent("new-chat")))},className:(0,x.cn)("group relative flex items-center gap-3 rounded-xl px-3 py-2.5 text-[13px] font-medium transition-all duration-200 outline-none focus-visible:ring-2 focus-visible:ring-ring",r?"bg-[#F0F0F0] text-foreground":"text-muted-foreground hover:bg-[#EBEBEB] hover:text-foreground"),children:[(0,t.jsx)(a,{className:"size-4.5 shrink-0",strokeWidth:r?2.25:1.75}),(0,t.jsx)("span",{className:"truncate",children:s.label})]},s.id)})}),(0,t.jsx)("div",{className:(0,x.cn)("w-full pt-3",d?"px-2":"px-3"),children:d?(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{render:(0,t.jsx)("button",{onClick:p,className:"flex w-full items-center justify-center py-1.5 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors"}),children:(0,t.jsxs)("div",{className:"relative size-8 rounded-lg border border-border bg-card flex items-center justify-center text-muted-foreground transition-colors group-hover:text-foreground",children:[(0,t.jsx)(m.Server,{className:"size-4"}),(0,t.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 flex size-2.5",children:o?.running?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-green-500 opacity-75"}),(0,t.jsx)("span",{className:"relative inline-flex size-full rounded-full bg-green-500 border border-card"})]}):(0,t.jsx)("span",{className:"relative inline-flex size-full rounded-full bg-gray-500 border border-card"})})]})}),(0,t.jsxs)(h.TooltipContent,{side:"right",sideOffset:10,children:[o?.name??"No server"," (",o?.running?"Live":"Offline",")"]})]}):(0,t.jsx)(S,{})})]})})}let I={"panel-default":void 0,"panel-white":"#FFFFFF","panel-fafafa":"#FAFAFA","panel-warm":"#F7F1EA","panel-soft":"#FBFAF8","panel-silver":"#F8F8F8","panel-stone":"#F5F5F2"},M=[{id:"chat",label:"Chat",href:"/chat",icon:i.MessageCircle},{id:"data",label:"Data",href:"/data",icon:l.Database},{id:"analytics",label:"Analytics",href:"/analytics",icon:c},{id:"settings",label:"Settings",href:"/settings",icon:o.Settings}];function P(){let e=(0,r.usePathname)(),{username:a}=(0,y.useWorkspace)(),{navBg:i}=(0,s.useThemeCustomizer)(),l=i?I[i]:void 0;return(0,t.jsx)(h.TooltipProvider,{delay:150,children:(0,t.jsxs)("header",{className:(0,x.cn)("sticky top-0 z-50 flex h-14 shrink-0 items-center gap-6 border-b border-border px-4 md:px-6",l?"":"bg-[#F5F5F4]"),style:l?{backgroundColor:l}:void 0,children:[(0,t.jsxs)(n.default,{href:"/chat","aria-label":"larkup home",className:"flex items-center gap-2.5 shrink-0",children:[(0,t.jsx)("span",{className:"flex size-9 items-center justify-center rounded-xl bg-primary text-primary-foreground transition-transform hover:scale-105",children:(0,t.jsx)("img",{src:"/logo9.png",className:"size-5",alt:"logo"})}),(0,t.jsx)("span",{className:"font-semibold tracking-tight text-foreground hidden sm:inline-block",children:"Larkup"})]}),(0,t.jsx)("nav",{className:"flex h-full items-center gap-1",children:M.map(s=>{let a=s.icon,r=e===s.href||"/"!==s.href&&e?.startsWith(s.href);return(0,t.jsxs)(n.default,{href:s.href,"aria-current":r?"page":void 0,className:(0,x.cn)("group relative flex items-center gap-2 h-full px-3 text-[13px] font-medium transition-colors outline-none",r?"text-primary":"text-muted-foreground hover:text-foreground"),children:[(0,t.jsx)(a,{className:"size-[16px]",strokeWidth:r?2.25:1.75}),(0,t.jsx)("span",{className:"hidden md:inline",children:s.label}),(0,t.jsx)("span",{className:(0,x.cn)("absolute bottom-0 left-2 right-2 h-[2px] rounded-full bg-primary transition-opacity",r?"opacity-100":"opacity-0")})]},s.id)})}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(S,{}),a&&(0,t.jsxs)("span",{className:"hidden text-sm text-muted-foreground md:block",children:["Hi, ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:a})]})]})]})})}let _=(0,d.default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);var B=e.i(570764),O=e.i(18928),O=O,L=e.i(562949),R=e.i(741445),V=e.i(924911),$=e.i(300033),W=e.i(856474),K=e.i(266741);let U=["vercel_ai_gateway","openai","google","mistral","custom"];function H(){let{setUsername:e,createServer:s,refresh:n}=(0,y.useWorkspace)(),i=(0,r.useRouter)(),[l,o]=(0,a.useState)(""),[d,c]=(0,a.useState)("vercel_ai_gateway"),[u,m]=(0,a.useState)(""),[x,h]=(0,a.useState)(null),[p,f]=(0,a.useState)("vercel_ai_gateway"),[b,j]=(0,a.useState)(""),[v,N]=(0,a.useState)(null),[F,S]=(0,a.useState)(!1),[z,E]=(0,a.useState)(!1),[D,T]=(0,a.useState)(!1),[I,M]=(0,a.useState)(!1),[P,H]=(0,a.useState)(null),q="custom"===d,Y="custom"===p,J=z||q||d!==p?b:u,G=async()=>{S(!0);try{let t=await fetch("/api/config"),{config:a}=await t.json(),r={...a};q&&x?(r.embeddingProvider="custom",r.embeddingModelId=`custom:${x.modelName}`,r.embeddingApiKey=x.apiKey||void 0,r.customEmbeddings=[x]):(r.embeddingProvider=d,r.embeddingApiKey=u),z?Y&&v?(r.chatProvider="custom",r.chatModelId=`custom:${v.modelName}`,r.chatApiKey=v.apiKey||void 0,r.customChatModels=[v]):(r.chatProvider=p,r.chatApiKey=J):q&&x||(r.chatProvider=d,r.chatApiKey=u);let o=await fetch("/api/config/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({embeddingProvider:r.embeddingProvider,embeddingApiKey:r.embeddingApiKey,embeddingModelId:r.embeddingModelId,customEmbeddings:r.customEmbeddings,chatProvider:r.chatProvider,chatApiKey:r.chatApiKey,chatModelId:r.chatModelId,customChatModels:r.customChatModels})});if(!o.ok){let e=await o.json();w.toast.error(e.error||"Verification failed — please check your API key.",{duration:8e3}),S(!1);return}l.trim()&&await e(l.trim()),await s("my-larkup"),await fetch("/api/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),n(),i.push("/chat")}catch(e){w.toast.error("Failed to complete setup")}finally{S(!1)}},X=async()=>{S(!0);try{l.trim()&&await e(l.trim()),await s("my-larkup"),n(),i.push("/chat")}catch(e){w.toast.error("Failed to complete setup")}finally{S(!1)}},Z=(e,s)=>(0,t.jsxs)($.Select,{value:e,onValueChange:e=>{var t;"custom"===(t=e??"")?("embedding"===s?c("custom"):f("custom"),H(s)):"embedding"===s?(c(t),h(null),!z&&f(t)):(f(t),N(null))},children:[(0,t.jsx)($.SelectTrigger,{className:"w-full bg-white/90 hover:bg-white",children:(0,t.jsx)("span",{className:"flex items-center gap-2",children:W.PROVIDER_META[e]?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(W.ProviderIcon,{src:W.PROVIDER_META[e].iconSrc,alt:W.PROVIDER_META[e].label,pillBg:W.PROVIDER_META[e].pillBg,size:16}),W.PROVIDER_META[e].label]}):"Select provider"})}),(0,t.jsx)($.SelectContent,{children:U.map(e=>{let s=W.PROVIDER_META[e];return s?(0,t.jsx)($.SelectItem,{value:e,children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(W.ProviderIcon,{src:s.iconSrc,alt:s.label,pillBg:s.pillBg,size:16}),(0,t.jsxs)("span",{children:[s.label,"vercel_ai_gateway"===e&&" (Recommended)","custom"===e&&" (OpenAI-compatible)"]})]})},e):null})})]}),Q=(e,s)=>(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 rounded-lg border border-green-200 bg-green-50/50 px-3 py-2",children:[(0,t.jsx)("span",{className:"text-green-600 text-xs",children:"✓"}),(0,t.jsx)("span",{className:"flex-1 truncate text-xs font-medium text-foreground",children:e.modelName}),(0,t.jsx)("button",{type:"button",onClick:()=>H(s),className:"text-muted-foreground hover:text-foreground transition-colors",children:(0,t.jsx)(g.Pencil,{className:"size-3"})})]});return(0,t.jsxs)("div",{className:"fixed inset-0 z-50 overflow-y-auto bg-background",children:[(0,t.jsxs)("div",{className:"pointer-events-none fixed inset-0 overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute -left-20 -top-20 h-125 w-125 rounded-full bg-stone-200/40 blur-3xl animate-pulse"}),(0,t.jsx)("div",{className:"absolute -bottom-32 -right-32 h-150 w-150 rounded-full bg-amber-100/30 blur-3xl animate-pulse [animation-delay:1s]"})]}),(0,t.jsx)("div",{className:"relative z-10 flex min-h-full w-full flex-col items-center justify-center px-6 py-12",children:(0,t.jsxs)("div",{className:"flex w-full max-w-lg flex-col items-center gap-8 animate-fade-up",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 text-center",children:[(0,t.jsx)("div",{className:"flex size-14 items-center justify-center rounded-xl bg-primary text-primary-foreground ",children:(0,t.jsx)("img",{src:"/logo9.png",className:"size-8",alt:"Larkup"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight text-foreground",children:"Welcome to Larkup"}),(0,t.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"Let's set up your AI models. You can change these later in Settings."})]})]}),(0,t.jsxs)("div",{className:"w-full space-y-5 rounded-2xl p-6 backdrop-blur-xl",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-foreground",children:"Your Name (Optional)"}),(0,t.jsx)(V.Input,{value:l,onChange:e=>o(e.target.value),placeholder:"How should we call you?",className:"bg-background/50"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-foreground",children:"Embedding Provider"}),Z(d,"embedding"),q&&x&&Q(x,"embedding"),q&&!x&&(0,t.jsx)("p",{className:"text-[11px] text-amber-600 mt-1",children:"Please configure and test your custom model to continue."})]}),!q&&(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("label",{className:"text-xs font-medium text-foreground",children:["API Key",!z&&(0,t.jsxs)("span",{className:"text-muted-foreground font-normal",children:[" ","(used for both embedding & chat)"]})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(V.Input,{type:D?"text":"password",value:u,onChange:e=>m(e.target.value),placeholder:"sk-...",className:"bg-background/50 pr-10"}),(0,t.jsx)("button",{type:"button","aria-label":D?"Hide API key":"Show API key",onClick:()=>T(e=>!e),className:"absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground hover:text-foreground",children:D?(0,t.jsx)(R.EyeOff,{className:"size-4"}):(0,t.jsx)(L.Eye,{className:"size-4"})})]})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>E(!z),className:"flex w-full items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[z?(0,t.jsx)(O.default,{className:"size-3.5"}):(0,t.jsx)(B.ChevronDown,{className:"size-3.5"}),"Use a different chat model"]}),z&&(0,t.jsxs)("div",{className:"space-y-3 rounded-xl border border-border/40 bg-muted/20 p-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-foreground",children:"Chat Provider"}),Z(p,"chat"),Y&&v&&Q(v,"chat"),Y&&!v&&(0,t.jsx)("p",{className:"text-[11px] text-amber-600 mt-1",children:"Please configure and test your custom model to continue."})]}),!Y&&(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-foreground",children:"Chat API Key"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(V.Input,{type:I?"text":"password",value:b,onChange:e=>j(e.target.value),placeholder:"sk-...",className:"bg-background/50 pr-10"}),(0,t.jsx)("button",{type:"button","aria-label":I?"Hide chat API key":"Show chat API key",onClick:()=>M(e=>!e),className:"absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground hover:text-foreground",children:I?(0,t.jsx)(R.EyeOff,{className:"size-4"}):(0,t.jsx)(L.Eye,{className:"size-4"})})]})]})]}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"More providers and fine-grained model selection available in Settings → AI Models."}),(0,t.jsxs)("div",{className:"pt-2 flex gap-3",children:[(0,t.jsx)(C.Button,{variant:"outline",className:"flex-1",onClick:X,disabled:F,children:"Skip for now"}),(0,t.jsx)(C.Button,{className:"flex-1",onClick:G,disabled:F||!(()=>{if(q){if(!x)return!1}else if(!u)return!1;if(z){if(Y){if(!v)return!1}else if(!J)return!1}return!0})(),children:F?(0,t.jsx)(k.Loader2,{className:"size-4 animate-spin"}):(0,t.jsxs)(t.Fragment,{children:["Continue ",(0,t.jsx)(_,{className:"ml-1.5 size-4"})]})})]})]})]})}),(0,t.jsx)(A.Dialog,{open:null!==P,onOpenChange:e=>{e||("embedding"!==P||x||c("vercel_ai_gateway"),"chat"!==P||v||f("vercel_ai_gateway"),H(null))},children:(0,t.jsxs)(A.DialogContent,{className:"max-w-xl",children:[(0,t.jsxs)(A.DialogHeader,{children:[(0,t.jsxs)(A.DialogTitle,{children:["Custom ","embedding"===P?"Embedding":"Chat"," Model"]}),(0,t.jsxs)(A.DialogDescription,{children:["Connect an OpenAI-compatible ","embedding"===P?"embedding":"chat"," ","model. Test the connection before adding."]})]}),P&&(0,t.jsx)(K.CustomModelForm,{type:P,onSave:e=>{"embedding"===P?(h(e),c("custom")):"chat"===P&&(N(e),f("custom")),H(null)},onCancel:()=>{"embedding"!==P||x||c("vercel_ai_gateway"),"chat"!==P||v||f("vercel_ai_gateway"),H(null)}})]})})]})}let q={"panel-default":"#FAFAFA","panel-white":"#FFFFFF","panel-fafafa":"#FAFAFA","panel-warm":"#F7F1EA","panel-soft":"#FBFAF8","panel-silver":"#F8F8F8","panel-stone":"#F5F5F2"};e.s(["ClientLayoutWrapper",0,function({children:e}){let{pageStyle:a,panelBg:n,layout:i}=(0,s.useThemeCustomizer)(),l=(0,r.usePathname)(),o=l?.includes("/chat"),{isFirstRun:d,isLoading:c}=(0,y.useWorkspace)(),u=q[n],m=u?{backgroundColor:u}:void 0;return!c&&d?(0,t.jsx)(H,{}):c?(0,t.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,t.jsx)("div",{className:"size-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):"topnav"===i?(0,t.jsxs)("div",{className:"flex flex-col h-screen overflow-hidden",children:[(0,t.jsx)(P,{}),(0,t.jsx)("main",{className:"min-w-0 flex-1 overflow-hidden",children:(0,t.jsx)("div",{className:"h-full flex flex-col bg-background text-foreground",style:m,children:(0,t.jsx)("div",{className:(0,x.cn)("flex-1 min-h-0",o||l?.includes("/settings")||l?.includes("/analytics")?"overflow-hidden flex flex-col":"overflow-auto"),children:(0,t.jsx)("div",{className:(0,x.cn)("h-full w-full",o||l?.includes("/settings")||l?.includes("/analytics")?"flex-1 min-h-0 flex flex-col":"container mx-auto pb-8"),children:e})})})})]}):(0,t.jsxs)("div",{className:"flex h-screen overflow-hidden",children:[(0,t.jsx)(T,{}),(0,t.jsx)("main",{className:"min-w-0 flex-1 overflow-hidden",children:(0,t.jsx)("div",{className:"fused"===a?"h-screen flex flex-col bg-background text-foreground overflow-hidden":"h-screen flex flex-col md:rounded-l-2xl border-l border-border bg-panel text-panel-foreground overflow-hidden",style:m,children:(0,t.jsx)("div",{className:(0,x.cn)("flex-1 min-h-0",o||l?.includes("/settings")||l?.includes("/analytics")?"overflow-hidden flex flex-col":"overflow-auto"),children:(0,t.jsx)("div",{className:(0,x.cn)("h-full w-full",o||l?.includes("/settings")||l?.includes("/analytics")?"flex-1 min-h-0 flex flex-col":"container mx-auto pb-8"),children:e})})})})]})}],266186)},953159,e=>{"use strict";var t=e.i(523829),s=e.i(842646),a=e.i(501706),n=e.i(178328),r=e.i(866657),i=e.i(874822);let l=(0,i.default)("boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);var o=e.i(871942);let d=(0,i.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);var c=e.i(518864),u=e.i(702938);let m=(0,i.default)("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);var x=e.i(743118),h=e.i(714809),p=e.i(241491),f=e.i(539352);let g=(0,i.default)("scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]);var b=e.i(682458),j=e.i(161351),v=e.i(466691),y=e.i(861947),N=e.i(323621),w=e.i(524365),k=e.i(534792),C=e.i(746632),A=e.i(878835),F=e.i(282879);let S=e=>fetch(e).then(e=>e.json()),z=["chunking","embedding","upserting"];function E({open:e,onOpenChange:i,trigger:l}){let[o,d]=(0,n.useState)(!1),[c,u]=(0,n.useState)(!1),m=void 0!==e,g=m?e:c,b=m&&i?i:u,{data:j,isLoading:y,mutate:N}=(0,s.default)("/api/index",S,{refreshInterval:e=>e?.run&&z.includes(e.run.status)?1e3:0}),T=(0,n.useRef)(void 0);(0,n.useEffect)(()=>{let e=j?.run?.warning;e&&e!==T.current?C.toast.warning(e,{id:"rate-limit-warning",duration:7e4}):!e&&T.current&&(C.toast.dismiss("rate-limit-warning"),C.toast.success("Rate limit resolved — resuming indexing.",{duration:3e3})),T.current=e},[j?.run?.warning]);let[M,P]=(0,n.useState)(!1);async function _(e=!1){d(!0);try{let t=await fetch("/api/index",{method:"POST",body:JSON.stringify({incremental:e}),headers:{"Content-Type":"application/json"}}),s=await t.json();if(!t.ok)return void C.toast.error(s.error??"Could not start indexing.");C.toast.success("Indexing started."),N()}catch{C.toast.error("Could not start indexing.")}finally{d(!1)}}async function B(){d(!0);try{if(!(await fetch("/api/index",{method:"DELETE"})).ok)return void C.toast.error("Could not cancel indexing.");C.toast.success("Indexing cancelled."),N()}catch{C.toast.error("Could not cancel indexing.")}finally{d(!1)}}return(0,n.useEffect)(()=>{let e=j?.run?.status;e&&z.includes(e)?P(!0):M&&"completed"===e&&(P(!1),b(!1),C.toast.success("Indexing completed successfully!"))},[j?.run?.status,M,b]),(0,t.jsxs)(F.Dialog,{open:g,onOpenChange:b,children:[l?(0,t.jsx)(F.DialogTrigger,{render:(0,n.isValidElement)(l)?l:(0,t.jsx)("button",{children:l})}):(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[j?.run?.status==="completed"&&(0,t.jsxs)(A.AlertDialog,{children:[(0,t.jsx)(A.AlertDialogTrigger,{render:(0,t.jsxs)(v.Button,{disabled:!j.ready||!!(j.run&&z.includes(j.run.status))||o,variant:"outline",children:[(0,t.jsx)(f.RotateCcw,{className:"size-4 mr-2"}),"Re-Index Data"]})}),(0,t.jsxs)(A.AlertDialogContent,{children:[(0,t.jsxs)(A.AlertDialogHeader,{children:[(0,t.jsx)(A.AlertDialogTitle,{children:"Are you sure you want to re-index data?"}),(0,t.jsx)(A.AlertDialogDescription,{children:"This will rebuild the entire index from scratch. All documents will be re-processed."})]}),(0,t.jsxs)(A.AlertDialogFooter,{children:[(0,t.jsx)(A.AlertDialogCancel,{children:"Cancel"}),(0,t.jsx)(A.AlertDialogAction,{onClick:()=>{b(!0),_(!1)},children:"Continue"})]})]})]}),(0,t.jsx)(F.DialogTrigger,{render:(0,t.jsxs)(v.Button,{disabled:!j?.ready||j?.unindexedCount===0,children:[(0,t.jsx)(h.Layers,{className:"size-4 mr-2"}),"Index Data"]})})]}),(0,t.jsxs)(F.DialogContent,{className:"max-w-2xl max-h-[90vh] overflow-y-auto ",children:[(0,t.jsxs)(F.DialogHeader,{children:[(0,t.jsx)(F.DialogTitle,{children:"Index Data"}),(0,t.jsx)(F.DialogDescription,{children:"Chunk, embed, and index into your selected vector database."})]}),y||!j?(0,t.jsx)("div",{className:"py-6",children:(0,t.jsx)(k.Skeleton,{className:"h-40 w-full"})}):(0,t.jsxs)("div",{className:"space-y-6 py-4",children:[(0,t.jsx)(D,{config:j.config,docCount:j.docCount,charCount:j.charCount}),!j.ready&&(0,t.jsxs)(w.Alert,{variant:"default",children:[(0,t.jsx)(r.AlertTriangle,{className:"size-4 text-orange-500!"}),(0,t.jsx)(w.AlertTitle,{className:"text-orange-500!",children:"Not ready to index"}),(0,t.jsx)(w.AlertDescription,{children:(0,t.jsx)("ul",{className:"list-disc pl-4",children:j.blockers.map(e=>(0,t.jsx)("li",{children:e},e))})})]}),(0,t.jsx)(I,{run:j.run,running:!!(j.run&&z.includes(j.run.status))}),j.ready&&!j.run&&(0,t.jsxs)(w.Alert,{children:[(0,t.jsx)(x.Info,{className:"size-4 text-blue-500!"}),(0,t.jsx)(w.AlertTitle,{className:"text-blue-600 dark:text-blue-400",children:"Before you start indexing"}),(0,t.jsxs)(w.AlertDescription,{className:"text-muted-foreground space-y-1",children:[(0,t.jsxs)("p",{children:["Once indexing begins, two settings become"," ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:"locked"})," to the existing index:"]}),(0,t.jsxs)("ul",{className:"list-disc pl-4 space-y-0.5",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:"Embedding model"})," — you can swap to any model with the"," ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:"same vector dimensions"}),", but switching to a model with different dimensions will require a full re-index."]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:"Vector store"})," — changing the store after indexing requires starting fresh."]})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)(v.Button,{onClick:()=>_(j.run?.status==="completed"),disabled:!j.ready||!!(j.run&&z.includes(j.run.status))||o||j.run?.status==="completed"&&0===j.unindexedCount,size:"lg",children:[j.run&&z.includes(j.run.status)||o?(0,t.jsx)(a.Loader2,{className:"size-4 animate-spin mr-2"}):(0,t.jsx)(p.Play,{className:"size-4 mr-2"}),j.run&&z.includes(j.run.status)?"Indexing…":o?"Starting…":j.run?.status==="completed"?`Index new documents (${j.unindexedCount})`:`Start indexing (${j.unindexedCount})`]}),j.run?.status==="completed"&&!(j.run&&z.includes(j.run.status))&&(0,t.jsxs)(A.AlertDialog,{children:[(0,t.jsx)(A.AlertDialogTrigger,{render:(0,t.jsxs)(v.Button,{variant:"outline",size:"lg",disabled:o,children:[(0,t.jsx)(f.RotateCcw,{className:"size-4 mr-2"}),"Re-Index All"]})}),(0,t.jsxs)(A.AlertDialogContent,{children:[(0,t.jsxs)(A.AlertDialogHeader,{children:[(0,t.jsx)(A.AlertDialogTitle,{children:"Are you sure you want to re-index data?"}),(0,t.jsx)(A.AlertDialogDescription,{children:"This will rebuild the entire index from scratch. All documents will be re-processed."})]}),(0,t.jsxs)(A.AlertDialogFooter,{children:[(0,t.jsx)(A.AlertDialogCancel,{children:"Cancel"}),(0,t.jsx)(A.AlertDialogAction,{onClick:()=>{b(!0),_(!1)},children:"Continue"})]})]})]}),!!(j.run&&z.includes(j.run.status))&&(0,t.jsx)(v.Button,{onClick:B,disabled:o,size:"lg",variant:"destructive",children:"Cancel"})]}),(0,t.jsx)(v.Button,{variant:"ghost",size:"lg",onClick:()=>b(!1),children:"Close"})]})]})]})]})}function D({config:e,docCount:s,charCount:a}){let n=(0,b.getEmbeddingModel)(e.embeddingModelId),r=(0,j.getVectorStore)(e.vectorStore),i=[{icon:d,label:"Embedding model",value:n?.label??e.embeddingModelId,hint:n?`${n.dimensions} dims`:void 0},{icon:c.Database,label:"Vector store",value:r?.label??e.vectorStore},{icon:l,label:"Index type",value:e.indexType.toUpperCase()},{icon:g,label:"Chunking",value:`${e.chunking.chunkSize} / ${e.chunking.chunkOverlap}`,hint:"size / overlap"},{icon:u.FileText,label:"Corpus",value:`${s.toLocaleString()} docs`,hint:`${a.toLocaleString()} chars`}];return(0,t.jsxs)("div",{className:"rounded-xl border bg-card text-card-foreground p-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-base font-semibold mb-4",children:[(0,t.jsx)(h.Layers,{className:"size-4 text-primary"}),"Index configuration"]}),(0,t.jsx)("dl",{className:"grid grid-cols-2 gap-x-6 gap-y-5 sm:grid-cols-3",children:i.map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("dt",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,t.jsx)(e.icon,{className:"size-3.5"}),e.label]}),(0,t.jsxs)("dd",{className:"text-sm font-medium leading-tight",children:[e.value,e.hint&&(0,t.jsx)("span",{className:"ml-1.5 font-mono text-[11px] font-normal text-muted-foreground",children:e.hint})]})]},e.label))})]})}let T={idle:{label:"Idle"},chunking:{label:"Chunking",phase:"Splitting documents into chunks"},embedding:{label:"Embedding",phase:"Generating vector embeddings"},upserting:{label:"Storing",phase:"Writing vectors to the store"},completed:{label:"Completed"},failed:{label:"Failed"}};function I({run:e,running:s}){if(!e)return(0,t.jsxs)("div",{className:"rounded-xl border bg-card text-card-foreground flex flex-col items-center justify-center gap-1 py-8 text-center",children:[(0,t.jsx)(m,{className:"mb-1 size-6 text-muted-foreground/60"}),(0,t.jsx)("p",{className:"text-sm font-medium",children:"No index built yet"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Build a Larkup index to embed your corpus and make it searchable."})]});let n=T[e.status],i=e.totalChunks>0?Math.round(e.processedChunks/e.totalChunks*100):5*!!s;return(0,t.jsxs)("div",{className:"rounded-xl border bg-card text-card-foreground p-4 space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-row items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-base font-semibold",children:["completed"===e.status?(0,t.jsx)(o.CheckCircle2,{className:"size-4 text-primary"}):"failed"===e.status?(0,t.jsx)(r.AlertTriangle,{className:"size-4 text-destructive"}):(0,t.jsx)(a.Loader2,{className:"size-4 animate-spin text-primary"}),n.label]}),(0,t.jsx)(P,{status:e.status})]}),"failed"===e.status?(0,t.jsx)(t.Fragment,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:n.phase??"Done"}),(0,t.jsxs)("span",{className:"font-mono tabular-nums",children:[e.processedChunks.toLocaleString(),e.totalChunks>0&&` / ${e.totalChunks.toLocaleString()}`," chunks"]})]}),(0,t.jsx)(y.Progress,{value:i,className:"**:data-[slot=progress-indicator]:bg-green-600"})]}),(0,t.jsxs)("dl",{className:"grid grid-cols-2 gap-4 pt-1 sm:grid-cols-4",children:[(0,t.jsx)(M,{label:"Documents",value:e.docCount.toLocaleString()}),(0,t.jsx)(M,{label:"Chunks",value:e.totalChunks.toLocaleString()}),(0,t.jsx)(M,{label:"Dimensions",value:e.dimensions?e.dimensions.toLocaleString():"—"}),(0,t.jsx)(M,{label:"Duration",value:e.durationMs?`${(e.durationMs/1e3).toFixed(1)}s`:s?"running…":"—"})]})]})]})}function M({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("dt",{className:"text-xs text-muted-foreground",children:e}),(0,t.jsx)("dd",{className:"font-mono text-sm tabular-nums",children:s})]})}function P({status:e}){return"completed"===e?(0,t.jsx)(N.Badge,{className:"bg-primary/12 text-primary hover:bg-primary/12",children:"Ready"}):"failed"===e?(0,t.jsx)(N.Badge,{variant:"destructive",children:"Failed"}):z.includes(e)?(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-xs font-medium text-green-600",children:[(0,t.jsxs)("span",{className:"relative flex size-2",children:[(0,t.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-green-600 opacity-75"}),(0,t.jsx)("span",{className:"relative inline-flex size-2 rounded-full bg-green-600"})]}),"Live"]}):null}let _=e=>fetch(e).then(e=>e.json()),B=["chunking","embedding","upserting"];e.s(["GlobalIndexProgress",0,function(){let{data:e}=(0,s.default)("/api/index",_,{refreshInterval:e=>e?.run&&B.includes(e.run.status)?1e3:0});if(!(e?.run&&B.includes(e.run.status))||!e?.run)return null;let{run:n}=e,r=n.totalChunks>0?Math.round(n.processedChunks/n.totalChunks*100):5;return(0,t.jsx)("div",{className:"fixed bottom-6 right-6 z-50",children:(0,t.jsx)(E,{trigger:(0,t.jsxs)("button",{className:"flex items-center gap-3 rounded-full border bg-background px-4 py-2 text-sm font-medium transition-all hover:bg-muted/50 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[(0,t.jsx)(a.Loader2,{className:"size-4 animate-spin text-primary"}),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,t.jsx)("span",{className:"text-xs leading-none text-muted-foreground",children:"Storing..."}),(0,t.jsxs)("span",{className:"leading-none",children:[r,"%"]})]})]})})})}],953159)},232295,e=>{"use strict";var t=e.i(199910),s=e.i(523829),a=e.i(178328),n=e.i(960198),r=e.i(133058),i=e.i(736484),l=e.i(417368),o=e.i(466691);let d="larkup-update-dismissed",c={docker:"docker compose pull && docker compose up -d",npm:"larkup update"};e.s(["UpdateBanner",0,function(){let[u,m]=(0,a.useState)(null),[x,h]=(0,a.useState)(!1),[p,f]=(0,a.useState)(!1),[g,b]=(0,a.useState)(!1),j="0.1.39",v="__TAURI__"in window?"desktop":"true"===t.default.env.NEXT_PUBLIC_DOCKER_ENV||"true"===t.default.env.NEXT_PUBLIC_RUNNING_IN_DOCKER?"docker":"npm";(0,a.useEffect)(()=>{if(function(){try{let e=localStorage.getItem(d);if(!e)return!1;let{timestamp:t}=JSON.parse(e);return Date.now()-t<864e5}catch{return!1}}())return;let e=new AbortController;return fetch("https://larkup.de/api/version",{signal:e.signal,cache:"no-store"}).then(e=>e.json()).then(e=>{e.version&&function(e,t){let s=e.replace(/^v/,"").split(".").map(Number),a=t.replace(/^v/,"").split(".").map(Number);for(let e=0;e<3;e++){let t=s[e]||0,n=a[e]||0;if(t>n)return 1;if(t<n)return -1}return 0}(e.version,j)>0&&(m(e.version),h(!0))}).catch(()=>{}),()=>e.abort()},[j]);let y=async()=>{if("desktop"===v){f(!0);try{let{check:t}=await e.A(963347),{relaunch:s}=await e.A(995308),a=await t();a?(await a.downloadAndInstall(),await s()):f(!1)}catch(e){console.error("Auto-update failed:",e),f(!1),window.open("https://larkup.de/download","_blank")}}else try{await navigator.clipboard.writeText(c[v]),b(!0),window.setTimeout(()=>b(!1),2e3)}catch(e){console.error("Could not copy update command:",e)}};return x&&u?(0,s.jsx)("div",{role:"status","aria-live":"polite",className:"relative z-50 border-b border-border bg-background px-3 py-2 text-foreground sm:px-4",children:(0,s.jsxs)("div",{className:"mx-auto flex min-h-7 max-w-screen-2xl items-center gap-2.5",children:[(0,s.jsx)("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background",children:(0,s.jsx)(n.ArrowUp,{className:"size-3.5","aria-hidden":"true"})}),(0,s.jsxs)("p",{className:"min-w-0 text-xs sm:text-sm",children:[(0,s.jsxs)("span",{className:"font-medium",children:["Larkup v",u," is available."]})," ",(0,s.jsxs)("span",{className:"hidden text-muted-foreground sm:inline",children:["You're using v",j,"."]})]}),"desktop"!==v&&(0,s.jsx)("code",{className:"ml-auto hidden max-w-[38rem] truncate rounded-[5px] border border-border bg-muted/40 px-2 py-1 font-mono text-[11px] text-muted-foreground lg:block",children:c[v]}),(0,s.jsx)(o.Button,{type:"button",variant:"desktop"===v?"default":"outline",size:"xs",onClick:y,disabled:p,"aria-label":"desktop"===v?"Update Larkup now":"Copy update command",className:"desktop"===v?"ml-auto":"ml-auto lg:ml-0",children:"desktop"===v?p?"Updating...":"Update now":g?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Check,{"aria-hidden":"true"}),"Copied"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.Copy,{"aria-hidden":"true"}),"Copy command"]})}),(0,s.jsx)(o.Button,{type:"button",variant:"ghost",size:"icon-xs",onClick:()=>{try{localStorage.setItem(d,JSON.stringify({timestamp:Date.now()}))}catch{}h(!1)},"aria-label":"Dismiss update notification",title:"Remind me tomorrow",children:(0,s.jsx)(l.X,{"aria-hidden":"true"})})]})}):null}])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,721606,e=>{"use strict";var t=e.i(199910),s=e.i(178328),a=e.i(732684);function n(){return"u">typeof window}function r(){return"production"}function i(){return"development"===((n()?window.vam:r())||"production")}function l(e){return RegExp(`/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[/?#]|$)`)}function o(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function d(e){return(0,s.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,s.useEffect)(()=>{!function(e={debug:!0},t){var s;if(!n())return;let{beforeSend:a,src:l,dataset:d}=function(e,t){var s,a;let n=e;if(t)try{n={...null==(s=JSON.parse(t))?void 0:s.analytics,...e}}catch{}!function(e="auto"){if("auto"===e){window.vam=r();return}window.vam=e}(n.mode);let l={sdkn:"@vercel/analytics"+(n.framework?`/${n.framework}`:""),sdkv:"2.0.1"};return n.disableAutoTrack&&(l.disableAutoTrack="1"),n.viewEndpoint&&(l.viewEndpoint=o(n.viewEndpoint)),n.eventEndpoint&&(l.eventEndpoint=o(n.eventEndpoint)),n.sessionEndpoint&&(l.sessionEndpoint=o(n.sessionEndpoint)),i()&&!1===n.debug&&(l.debug="false"),n.dsn&&(l.dsn=n.dsn),n.endpoint?l.endpoint=n.endpoint:n.basePath&&(l.endpoint=o(`${n.basePath}/insights`)),{beforeSend:n.beforeSend,src:(a=n).scriptSrc?o(a.scriptSrc):i()?"https://va.vercel-scripts.com/v1/script.debug.js":a.basePath?o(`${a.basePath}/insights/script.js`):"/_vercel/insights/script.js",dataset:l}}(e,t);if(window.va||(window.va=function(...e){window.vaq||(window.vaq=[]),window.vaq.push(e)}),a&&(null==(s=window.va)||s.call(window,"beforeSend",a)),document.head.querySelector(`script[src*="${l}"]`))return;let c=document.createElement("script");for(let[e,t]of(c.src=l,Object.entries(d)))c.dataset[e]=t;c.defer=!0,c.onerror=()=>{let e=i()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${l}. ${e}`)},document.head.appendChild(c)}({framework:e.framework||"react",basePath:e.basePath??function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...void 0!==e.route&&{disableAutoTrack:!0},...e},e.configString??function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}())},[]),(0,s.useEffect)(()=>{e.route&&e.path&&function({route:e,path:t}){var s;null==(s=window.va)||s.call(window,"pageview",{route:e,path:t})}({route:e.route,path:e.path})},[e.route,e.path]),null}function c(e){let n,r,i,{route:o,path:c}=(n=(0,a.useParams)(),r=(0,a.useSearchParams)(),i=(0,a.usePathname)(),n?{route:function(e,t){if(!e||!t)return e;let s=e;try{let e=Object.entries(t);for(let[t,a]of e)if(!Array.isArray(a)){let e=l(a);e.test(s)&&(s=s.replace(e,`/[${t}]`))}for(let[t,a]of e)if(Array.isArray(a)){let e=l(a.join("/"));e.test(s)&&(s=s.replace(e,`/[...${t}]`))}return s}catch{return e}}(i,Object.keys(n).length?n:Object.fromEntries(r.entries())),path:i}:{route:null,path:i});return s.default.createElement(d,{path:c,route:o,...e,basePath:function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH}(),configString:function(){if(void 0!==t.default&&void 0!==t.default.env)return t.default.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_CLIENT_CONFIG}(),framework:"next"})}e.s(["Analytics",0,function(e){return s.default.createElement(s.Suspense,{fallback:null},s.default.createElement(c,{...e}))}])},7012,e=>{"use strict";var t=e.i(523829),s=e.i(178328),a=(e,t,s,a,n,r,i,l)=>{let o=document.documentElement,d=["light","dark"];function c(t){var s;(Array.isArray(e)?e:[e]).forEach(e=>{let s="class"===e,a=s&&r?n.map(e=>r[e]||e):n;s?(o.classList.remove(...a),o.classList.add(r&&r[t]?r[t]:t)):o.setAttribute(e,t)}),s=t,l&&d.includes(s)&&(o.style.colorScheme=s)}if(a)c(a);else try{let e=localStorage.getItem(t)||s,a=i&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;c(a)}catch(e){}},n=s.createContext(void 0),r={setTheme:e=>{},themes:[]};s.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:l,value:o,themes:d,nonce:c,scriptProps:u})=>{let m=JSON.stringify([n,t,l,e,d,o,r,i]).slice(1,-1);return s.createElement("script",{...u,suppressHydrationWarning:!0,nonce:"u"<typeof window?c:"",dangerouslySetInnerHTML:{__html:`(${a.toString()})(${m})`}})});var i=e.i(746632),l=e.i(795360),l=l,o=e.i(951482),o=o,d=e.i(195300),d=d,c=e.i(909042),c=c,u=e.i(964548),u=u;e.s(["Toaster",0,({...e})=>{var a;let{theme:m="system"}=null!=(a=s.useContext(n))?a:r;return(0,t.jsx)(i.Toaster,{closeButton:!0,theme:m,className:"toaster group z-9999999! ",icons:{success:(0,t.jsx)(l.default,{className:"size-5 text-white",fill:"#10b981"}),info:(0,t.jsx)(o.default,{className:"size-5 text-white",fill:"#3b82f6"}),warning:(0,t.jsx)(d.default,{className:"size-5 text-white",fill:"#f59e0b"}),error:(0,t.jsx)(c.default,{className:"size-5 text-white",fill:"#ef4444"}),loading:(0,t.jsx)(u.default,{className:"size-5 animate-spin text-muted-foreground"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)",zIndex:999999},toastOptions:{classNames:{toast:"group toast items-start group-[.toaster]:!bg-[#F9F9F7] dark:group-[.toaster]:!bg-zinc-900 group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:",icon:"mt-0.5",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",success:"group-[.toaster]:!bg-[#F9F9F7] dark:group-[.toaster]:!bg-zinc-900",error:"group-[.toaster]:!bg-[#F9F9F7] dark:group-[.toaster]:!bg-zinc-900",warning:"group-[.toaster]:!bg-[#F9F9F7] dark:group-[.toaster]:!bg-zinc-900",info:"group-[.toaster]:!bg-[#F9F9F7] dark:group-[.toaster]:!bg-zinc-900"}},...e})}],7012)},266186,e=>{"use strict";var t=e.i(523829),s=e.i(82100),a=e.i(178328),n=e.i(334347),r=e.i(732684),i=e.i(301470),l=e.i(518864),o=e.i(487779),d=e.i(874822);let c=(0,d.default)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);var u=e.i(708909),m=e.i(37126),x=e.i(152236),h=e.i(839717),p=e.i(133058);let f=(0,d.default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);var g=e.i(980369),b=e.i(379702),j=e.i(885131),v=e.i(440087),y=e.i(624529),N=e.i(874560),w=e.i(746632),k=e.i(501706),C=e.i(466691),A=e.i(282879);function F({target:e,open:s,onOpenChange:n}){let{deleteServer:r}=(0,y.useWorkspace)(),[i,l]=(0,a.useState)(!1);async function o(){if(e){l(!0);try{await r(e.id),w.toast.success(`Deleted "${e.name}".`),n(!1)}catch{w.toast.error("Could not delete the server.")}finally{l(!1)}}}return(0,t.jsx)(A.Dialog,{open:s,onOpenChange:n,children:(0,t.jsxs)(A.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsxs)(A.DialogHeader,{children:[(0,t.jsxs)(A.DialogTitle,{children:["Delete “",e?.name,"”?"]}),(0,t.jsx)(A.DialogDescription,{children:"This permanently removes the server's documents, index, vector data, and generated files. This cannot be undone."})]}),(0,t.jsxs)(A.DialogFooter,{children:[(0,t.jsx)(C.Button,{variant:"outline",onClick:()=>n(!1),disabled:i,children:"Cancel"}),(0,t.jsxs)(C.Button,{variant:"destructive",onClick:()=>void o(),disabled:i,children:[i&&(0,t.jsx)(k.Loader2,{className:"size-4 animate-spin"}),"Delete server"]})]})]})})}function S(){let{servers:e,activeServer:s,activateServer:n}=(0,y.useWorkspace)(),[r,i]=(0,a.useState)(!1),[l,o]=(0,a.useState)(null),[d,c]=(0,a.useState)(null);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(v.DropdownMenu,{children:[(0,t.jsxs)(v.DropdownMenuTrigger,{render:(0,t.jsx)("button",{type:"button",className:"flex w-full items-center gap-2 rounded-lg border border-border bg-card px-2 py-1.5 text-left transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"}),children:[(0,t.jsx)("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-md bg-primary/12 text-primary",children:(0,t.jsx)(m.Server,{className:"size-3.5"})}),(0,t.jsx)("span",{className:"flex min-w-0 flex-1 flex-col",children:(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:s?.name??"No server"}),s?.running&&(0,t.jsx)(z,{})]})}),(0,t.jsx)(f,{className:"size-4 shrink-0 text-muted-foreground"})]}),(0,t.jsxs)(v.DropdownMenuContent,{align:"start",sideOffset:6,className:"w-(--anchor-width) min-w-[260px]",children:[(0,t.jsxs)(v.DropdownMenuGroup,{children:[(0,t.jsx)(v.DropdownMenuLabel,{children:"Your servers"}),e.map(e=>{let a=e.id===s?.id;return(0,t.jsxs)(v.DropdownMenuItem,{onClick:()=>{a||n(e.id)},className:"gap-2",children:[(0,t.jsx)("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground",children:(0,t.jsx)(m.Server,{className:"size-3.5"})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"truncate font-medium",children:e.name}),(0,t.jsxs)("span",{className:"flex items-center gap-2 text-[11px] text-muted-foreground tabular-nums",children:[(0,t.jsxs)("span",{children:[e.docCount," docs"]}),e.indexed&&(0,t.jsx)("span",{children:"· indexed"}),e.running&&(0,t.jsxs)("span",{className:"flex items-center gap-1 text-green-500",children:[(0,t.jsx)(z,{}),"live"]})]})]}),a&&(0,t.jsx)(p.Check,{className:"size-4 shrink-0 text-primary"})]},e.id)})]}),(0,t.jsx)(v.DropdownMenuSeparator,{}),(0,t.jsxs)(v.DropdownMenuItem,{onClick:()=>i(!0),className:"gap-2 h-9",children:[(0,t.jsx)(b.Plus,{className:"size-4"}),"New server"]}),s&&(0,t.jsxs)(v.DropdownMenuItem,{onClick:()=>o(s),className:"gap-2 h-9",children:[(0,t.jsx)(g.Pencil,{className:"size-4"}),"Rename current"]}),s&&e.length>1&&(0,t.jsxs)(v.DropdownMenuItem,{variant:"destructive",onClick:()=>c(s),className:"gap-2",children:[(0,t.jsx)(j.Trash2,{className:"size-4"}),"Delete current"]})]})]}),(0,t.jsx)(N.ServerFormDialog,{mode:"create",open:r,onOpenChange:i}),(0,t.jsx)(N.ServerFormDialog,{mode:"rename",target:l,open:null!==l,onOpenChange:e=>!e&&o(null)}),(0,t.jsx)(F,{target:d,open:null!==d,onOpenChange:e=>!e&&c(null)})]})}function z(){return(0,t.jsxs)("span",{className:"relative flex size-2",children:[(0,t.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-green-500 opacity-75"}),(0,t.jsx)("span",{className:"relative inline-flex size-2 rounded-full bg-green-500"})]})}let E={"panel-default":void 0,"panel-white":"#FFFFFF","panel-fafafa":"#FAFAFA","panel-warm":"#F7F1EA","panel-soft":"#FBFAF8","panel-silver":"#F8F8F8","panel-stone":"#F5F5F2"},D=[{id:"chat",label:"Chat",href:"/chat",icon:i.MessageCircle},{id:"data",label:"Data",href:"/data",icon:l.Database},{id:"analytics",label:"Analytics",href:"/analytics",icon:c},{id:"settings",label:"Settings",href:"/settings",icon:o.Settings}];function T(){let e=(0,r.usePathname)(),{pageStyle:i,navBg:l}=(0,s.useThemeCustomizer)(),{activeServer:o}=(0,y.useWorkspace)(),[d,c]=(0,a.useState)(!0);(0,a.useEffect)(()=>{"false"===localStorage.getItem("sidebar-collapsed")&&c(!1)},[]);let p=()=>{let e=!d;c(e),localStorage.setItem("sidebar-collapsed",String(e))},f=l?E[l]:void 0;return(0,t.jsx)(h.TooltipProvider,{delay:150,children:(0,t.jsxs)("aside",{className:(0,x.cn)("sticky top-0 hidden h-screen shrink-0 flex-col self-start py-4 md:flex transition-all duration-300 ease-in-out",d?"w-18":"w-60",f?"":"bg-background","fused"===i?"border-r border-border":""),style:f?{backgroundColor:f}:void 0,children:[(0,t.jsx)("div",{className:(0,x.cn)("flex w-full items-center mb-6",d?"justify-center px-3":"justify-between px-4"),children:d?(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{render:(0,t.jsx)("button",{onClick:p,"aria-label":"Expand sidebar",className:"flex size-10 items-center justify-center rounded-xl bg-primary text-primary-foreground transition-transform hover:scale-105"}),children:(0,t.jsx)("img",{src:"/logo9.png",className:"size-5",alt:"logo"})}),(0,t.jsx)(h.TooltipContent,{side:"right",sideOffset:10,children:"Expand sidebar"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.default,{href:"/chat",className:"flex items-center gap-2.5",children:[(0,t.jsx)("span",{className:"flex size-9 items-center justify-center rounded-xl bg-primary text-primary-foreground transition-transform hover:scale-105",children:(0,t.jsx)("img",{src:"/logo9.png",className:"size-5",alt:"logo"})}),(0,t.jsx)("span",{className:"text-sm font-semibold tracking-tight text-foreground",children:"Larkup"})]}),(0,t.jsx)("button",{onClick:p,className:"flex size-7 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors","aria-label":"Collapse sidebar",children:(0,t.jsx)(u.ChevronLeft,{className:"size-3.5"})})]})}),(0,t.jsx)("nav",{className:(0,x.cn)("flex flex-1 flex-col w-full",d?"items-center px-3 gap-3":"px-3 gap-1.5"),children:D.map(s=>{let a=s.icon,r=e===s.href||"/"!==s.href&&e?.startsWith(s.href);return d?(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{render:(0,t.jsx)(n.default,{href:s.href,"aria-current":r?"page":void 0,onClick:t=>{"chat"===s.id&&"/chat"===e&&(t.preventDefault(),window.dispatchEvent(new CustomEvent("new-chat")))},className:(0,x.cn)("group relative flex size-10 items-center justify-center rounded-xl transition-all duration-200 outline-none focus-visible:ring-2 focus-visible:ring-ring",r?"bg-[#F0F0F0] text-foreground":"text-muted-foreground hover:bg-[#EBEBEB] hover:text-foreground")}),children:(0,t.jsx)(a,{className:"size-4.5",strokeWidth:r?2.25:1.75})}),(0,t.jsx)(h.TooltipContent,{side:"right",sideOffset:10,children:s.label})]},s.id):(0,t.jsxs)(n.default,{href:s.href,"aria-current":r?"page":void 0,onClick:t=>{"chat"===s.id&&"/chat"===e&&(t.preventDefault(),window.dispatchEvent(new CustomEvent("new-chat")))},className:(0,x.cn)("group relative flex items-center gap-3 rounded-xl px-3 py-2.5 text-[13px] font-medium transition-all duration-200 outline-none focus-visible:ring-2 focus-visible:ring-ring",r?"bg-[#F0F0F0] text-foreground":"text-muted-foreground hover:bg-[#EBEBEB] hover:text-foreground"),children:[(0,t.jsx)(a,{className:"size-4.5 shrink-0",strokeWidth:r?2.25:1.75}),(0,t.jsx)("span",{className:"truncate",children:s.label})]},s.id)})}),(0,t.jsx)("div",{className:(0,x.cn)("w-full pt-3",d?"px-2":"px-3"),children:d?(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{render:(0,t.jsx)("button",{onClick:p,className:"flex w-full items-center justify-center py-1.5 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors"}),children:(0,t.jsxs)("div",{className:"relative size-8 rounded-lg border border-border bg-card flex items-center justify-center text-muted-foreground transition-colors group-hover:text-foreground",children:[(0,t.jsx)(m.Server,{className:"size-4"}),(0,t.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 flex size-2.5",children:o?.running?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-green-500 opacity-75"}),(0,t.jsx)("span",{className:"relative inline-flex size-full rounded-full bg-green-500 border border-card"})]}):(0,t.jsx)("span",{className:"relative inline-flex size-full rounded-full bg-gray-500 border border-card"})})]})}),(0,t.jsxs)(h.TooltipContent,{side:"right",sideOffset:10,children:[o?.name??"No server"," (",o?.running?"Live":"Offline",")"]})]}):(0,t.jsx)(S,{})})]})})}let I={"panel-default":void 0,"panel-white":"#FFFFFF","panel-fafafa":"#FAFAFA","panel-warm":"#F7F1EA","panel-soft":"#FBFAF8","panel-silver":"#F8F8F8","panel-stone":"#F5F5F2"},M=[{id:"chat",label:"Chat",href:"/chat",icon:i.MessageCircle},{id:"data",label:"Data",href:"/data",icon:l.Database},{id:"analytics",label:"Analytics",href:"/analytics",icon:c},{id:"settings",label:"Settings",href:"/settings",icon:o.Settings}];function P(){let e=(0,r.usePathname)(),{username:a}=(0,y.useWorkspace)(),{navBg:i}=(0,s.useThemeCustomizer)(),l=i?I[i]:void 0;return(0,t.jsx)(h.TooltipProvider,{delay:150,children:(0,t.jsxs)("header",{className:(0,x.cn)("sticky top-0 z-50 flex h-14 shrink-0 items-center gap-6 border-b border-border px-4 md:px-6",l?"":"bg-[#F5F5F4]"),style:l?{backgroundColor:l}:void 0,children:[(0,t.jsxs)(n.default,{href:"/chat","aria-label":"larkup home",className:"flex items-center gap-2.5 shrink-0",children:[(0,t.jsx)("span",{className:"flex size-9 items-center justify-center rounded-xl bg-primary text-primary-foreground transition-transform hover:scale-105",children:(0,t.jsx)("img",{src:"/logo9.png",className:"size-5",alt:"logo"})}),(0,t.jsx)("span",{className:"font-semibold tracking-tight text-foreground hidden sm:inline-block",children:"Larkup"})]}),(0,t.jsx)("nav",{className:"flex h-full items-center gap-1",children:M.map(s=>{let a=s.icon,r=e===s.href||"/"!==s.href&&e?.startsWith(s.href);return(0,t.jsxs)(n.default,{href:s.href,"aria-current":r?"page":void 0,className:(0,x.cn)("group relative flex items-center gap-2 h-full px-3 text-[13px] font-medium transition-colors outline-none",r?"text-primary":"text-muted-foreground hover:text-foreground"),children:[(0,t.jsx)(a,{className:"size-[16px]",strokeWidth:r?2.25:1.75}),(0,t.jsx)("span",{className:"hidden md:inline",children:s.label}),(0,t.jsx)("span",{className:(0,x.cn)("absolute bottom-0 left-2 right-2 h-[2px] rounded-full bg-primary transition-opacity",r?"opacity-100":"opacity-0")})]},s.id)})}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(S,{}),a&&(0,t.jsxs)("span",{className:"hidden text-sm text-muted-foreground md:block",children:["Hi, ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:a})]})]})]})})}let _=(0,d.default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);var B=e.i(570764),O=e.i(18928),O=O,L=e.i(562949),R=e.i(741445),V=e.i(924911),$=e.i(300033),W=e.i(856474),K=e.i(266741);let U=["vercel_ai_gateway","openai","google","mistral","custom"];function H(){let{setUsername:e,createServer:s,refresh:n}=(0,y.useWorkspace)(),i=(0,r.useRouter)(),[l,o]=(0,a.useState)(""),[d,c]=(0,a.useState)("vercel_ai_gateway"),[u,m]=(0,a.useState)(""),[x,h]=(0,a.useState)(null),[p,f]=(0,a.useState)("vercel_ai_gateway"),[b,j]=(0,a.useState)(""),[v,N]=(0,a.useState)(null),[F,S]=(0,a.useState)(!1),[z,E]=(0,a.useState)(!1),[D,T]=(0,a.useState)(!1),[I,M]=(0,a.useState)(!1),[P,H]=(0,a.useState)(null),q="custom"===d,Y="custom"===p,J=z||q||d!==p?b:u,G=async()=>{S(!0);try{let t=await fetch("/api/config"),{config:a}=await t.json(),r={...a};q&&x?(r.embeddingProvider="custom",r.embeddingModelId=`custom:${x.modelName}`,r.embeddingApiKey=x.apiKey||void 0,r.customEmbeddings=[x]):(r.embeddingProvider=d,r.embeddingApiKey=u),z?Y&&v?(r.chatProvider="custom",r.chatModelId=`custom:${v.modelName}`,r.chatApiKey=v.apiKey||void 0,r.customChatModels=[v]):(r.chatProvider=p,r.chatApiKey=J):q&&x||(r.chatProvider=d,r.chatApiKey=u);let o=await fetch("/api/config/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({embeddingProvider:r.embeddingProvider,embeddingApiKey:r.embeddingApiKey,embeddingModelId:r.embeddingModelId,customEmbeddings:r.customEmbeddings,chatProvider:r.chatProvider,chatApiKey:r.chatApiKey,chatModelId:r.chatModelId,customChatModels:r.customChatModels})});if(!o.ok){let e=await o.json();w.toast.error(e.error||"Verification failed — please check your API key.",{duration:8e3}),S(!1);return}l.trim()&&await e(l.trim()),await s("my-larkup"),await fetch("/api/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),n(),i.push("/chat")}catch(e){w.toast.error("Failed to complete setup")}finally{S(!1)}},X=async()=>{S(!0);try{l.trim()&&await e(l.trim()),await s("my-larkup"),n(),i.push("/chat")}catch(e){w.toast.error("Failed to complete setup")}finally{S(!1)}},Z=(e,s)=>(0,t.jsxs)($.Select,{value:e,onValueChange:e=>{var t;"custom"===(t=e??"")?("embedding"===s?c("custom"):f("custom"),H(s)):"embedding"===s?(c(t),h(null),!z&&f(t)):(f(t),N(null))},children:[(0,t.jsx)($.SelectTrigger,{className:"w-full bg-white/90 hover:bg-white",children:(0,t.jsx)("span",{className:"flex items-center gap-2",children:W.PROVIDER_META[e]?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(W.ProviderIcon,{src:W.PROVIDER_META[e].iconSrc,alt:W.PROVIDER_META[e].label,pillBg:W.PROVIDER_META[e].pillBg,size:16}),W.PROVIDER_META[e].label]}):"Select provider"})}),(0,t.jsx)($.SelectContent,{children:U.map(e=>{let s=W.PROVIDER_META[e];return s?(0,t.jsx)($.SelectItem,{value:e,children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(W.ProviderIcon,{src:s.iconSrc,alt:s.label,pillBg:s.pillBg,size:16}),(0,t.jsxs)("span",{children:[s.label,"vercel_ai_gateway"===e&&" (Recommended)","custom"===e&&" (OpenAI-compatible)"]})]})},e):null})})]}),Q=(e,s)=>(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 rounded-lg border border-green-200 bg-green-50/50 px-3 py-2",children:[(0,t.jsx)("span",{className:"text-green-600 text-xs",children:"✓"}),(0,t.jsx)("span",{className:"flex-1 truncate text-xs font-medium text-foreground",children:e.modelName}),(0,t.jsx)("button",{type:"button",onClick:()=>H(s),className:"text-muted-foreground hover:text-foreground transition-colors",children:(0,t.jsx)(g.Pencil,{className:"size-3"})})]});return(0,t.jsxs)("div",{className:"fixed inset-0 z-50 overflow-y-auto bg-background",children:[(0,t.jsxs)("div",{className:"pointer-events-none fixed inset-0 overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute -left-20 -top-20 h-125 w-125 rounded-full bg-stone-200/40 blur-3xl animate-pulse"}),(0,t.jsx)("div",{className:"absolute -bottom-32 -right-32 h-150 w-150 rounded-full bg-amber-100/30 blur-3xl animate-pulse [animation-delay:1s]"})]}),(0,t.jsx)("div",{className:"relative z-10 flex min-h-full w-full flex-col items-center justify-center px-6 py-12",children:(0,t.jsxs)("div",{className:"flex w-full max-w-lg flex-col items-center gap-8 animate-fade-up",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 text-center",children:[(0,t.jsx)("div",{className:"flex size-14 items-center justify-center rounded-xl bg-primary text-primary-foreground ",children:(0,t.jsx)("img",{src:"/logo9.png",className:"size-8",alt:"Larkup"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight text-foreground",children:"Welcome to Larkup"}),(0,t.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"Let's set up your AI models. You can change these later in Settings."})]})]}),(0,t.jsxs)("div",{className:"w-full space-y-5 rounded-2xl p-6 backdrop-blur-xl",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-foreground",children:"Your Name (Optional)"}),(0,t.jsx)(V.Input,{value:l,onChange:e=>o(e.target.value),placeholder:"How should we call you?",className:"bg-background/50"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-foreground",children:"Embedding Provider"}),Z(d,"embedding"),q&&x&&Q(x,"embedding"),q&&!x&&(0,t.jsx)("p",{className:"text-[11px] text-amber-600 mt-1",children:"Please configure and test your custom model to continue."})]}),!q&&(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("label",{className:"text-xs font-medium text-foreground",children:["API Key",!z&&(0,t.jsxs)("span",{className:"text-muted-foreground font-normal",children:[" ","(used for both embedding & chat)"]})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(V.Input,{type:D?"text":"password",value:u,onChange:e=>m(e.target.value),placeholder:"sk-...",className:"bg-background/50 pr-10"}),(0,t.jsx)("button",{type:"button","aria-label":D?"Hide API key":"Show API key",onClick:()=>T(e=>!e),className:"absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground hover:text-foreground",children:D?(0,t.jsx)(R.EyeOff,{className:"size-4"}):(0,t.jsx)(L.Eye,{className:"size-4"})})]})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>E(!z),className:"flex w-full items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[z?(0,t.jsx)(O.default,{className:"size-3.5"}):(0,t.jsx)(B.ChevronDown,{className:"size-3.5"}),"Use a different chat model"]}),z&&(0,t.jsxs)("div",{className:"space-y-3 rounded-xl border border-border/40 bg-muted/20 p-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-foreground",children:"Chat Provider"}),Z(p,"chat"),Y&&v&&Q(v,"chat"),Y&&!v&&(0,t.jsx)("p",{className:"text-[11px] text-amber-600 mt-1",children:"Please configure and test your custom model to continue."})]}),!Y&&(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-foreground",children:"Chat API Key"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(V.Input,{type:I?"text":"password",value:b,onChange:e=>j(e.target.value),placeholder:"sk-...",className:"bg-background/50 pr-10"}),(0,t.jsx)("button",{type:"button","aria-label":I?"Hide chat API key":"Show chat API key",onClick:()=>M(e=>!e),className:"absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground hover:text-foreground",children:I?(0,t.jsx)(R.EyeOff,{className:"size-4"}):(0,t.jsx)(L.Eye,{className:"size-4"})})]})]})]}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"More providers and fine-grained model selection available in Settings → AI Models."}),(0,t.jsxs)("div",{className:"pt-2 flex gap-3",children:[(0,t.jsx)(C.Button,{variant:"outline",className:"flex-1",onClick:X,disabled:F,children:"Skip for now"}),(0,t.jsx)(C.Button,{className:"flex-1",onClick:G,disabled:F||!(()=>{if(q){if(!x)return!1}else if(!u)return!1;if(z){if(Y){if(!v)return!1}else if(!J)return!1}return!0})(),children:F?(0,t.jsx)(k.Loader2,{className:"size-4 animate-spin"}):(0,t.jsxs)(t.Fragment,{children:["Continue ",(0,t.jsx)(_,{className:"ml-1.5 size-4"})]})})]})]})]})}),(0,t.jsx)(A.Dialog,{open:null!==P,onOpenChange:e=>{e||("embedding"!==P||x||c("vercel_ai_gateway"),"chat"!==P||v||f("vercel_ai_gateway"),H(null))},children:(0,t.jsxs)(A.DialogContent,{className:"max-w-xl",children:[(0,t.jsxs)(A.DialogHeader,{children:[(0,t.jsxs)(A.DialogTitle,{children:["Custom ","embedding"===P?"Embedding":"Chat"," Model"]}),(0,t.jsxs)(A.DialogDescription,{children:["Connect an OpenAI-compatible ","embedding"===P?"embedding":"chat"," ","model. Test the connection before adding."]})]}),P&&(0,t.jsx)(K.CustomModelForm,{type:P,onSave:e=>{"embedding"===P?(h(e),c("custom")):"chat"===P&&(N(e),f("custom")),H(null)},onCancel:()=>{"embedding"!==P||x||c("vercel_ai_gateway"),"chat"!==P||v||f("vercel_ai_gateway"),H(null)}})]})})]})}let q={"panel-default":"#FAFAFA","panel-white":"#FFFFFF","panel-fafafa":"#FAFAFA","panel-warm":"#F7F1EA","panel-soft":"#FBFAF8","panel-silver":"#F8F8F8","panel-stone":"#F5F5F2"};e.s(["ClientLayoutWrapper",0,function({children:e}){let{pageStyle:a,panelBg:n,layout:i}=(0,s.useThemeCustomizer)(),l=(0,r.usePathname)(),o=l?.includes("/chat"),{isFirstRun:d,isLoading:c}=(0,y.useWorkspace)(),u=q[n],m=u?{backgroundColor:u}:void 0;return!c&&d?(0,t.jsx)(H,{}):c?(0,t.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,t.jsx)("div",{className:"size-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):"topnav"===i?(0,t.jsxs)("div",{className:"flex flex-col h-screen overflow-hidden",children:[(0,t.jsx)(P,{}),(0,t.jsx)("main",{className:"min-w-0 flex-1 overflow-hidden",children:(0,t.jsx)("div",{className:"h-full flex flex-col bg-background text-foreground",style:m,children:(0,t.jsx)("div",{className:(0,x.cn)("flex-1 min-h-0",o||l?.includes("/settings")||l?.includes("/analytics")?"overflow-hidden flex flex-col":"overflow-auto"),children:(0,t.jsx)("div",{className:(0,x.cn)("h-full w-full",o||l?.includes("/settings")||l?.includes("/analytics")?"flex-1 min-h-0 flex flex-col":"container mx-auto pb-8"),children:e})})})})]}):(0,t.jsxs)("div",{className:"flex h-screen overflow-hidden",children:[(0,t.jsx)(T,{}),(0,t.jsx)("main",{className:"min-w-0 flex-1 overflow-hidden",children:(0,t.jsx)("div",{className:"fused"===a?"h-screen flex flex-col bg-background text-foreground overflow-hidden":"h-screen flex flex-col md:rounded-l-2xl border-l border-border bg-panel text-panel-foreground overflow-hidden",style:m,children:(0,t.jsx)("div",{className:(0,x.cn)("flex-1 min-h-0",o||l?.includes("/settings")||l?.includes("/analytics")?"overflow-hidden flex flex-col":"overflow-auto"),children:(0,t.jsx)("div",{className:(0,x.cn)("h-full w-full",o||l?.includes("/settings")||l?.includes("/analytics")?"flex-1 min-h-0 flex flex-col":"container mx-auto pb-8"),children:e})})})})]})}],266186)},953159,e=>{"use strict";var t=e.i(523829),s=e.i(842646),a=e.i(501706),n=e.i(178328),r=e.i(866657),i=e.i(874822);let l=(0,i.default)("boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);var o=e.i(871942);let d=(0,i.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);var c=e.i(518864),u=e.i(702938);let m=(0,i.default)("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);var x=e.i(743118),h=e.i(714809),p=e.i(241491),f=e.i(539352);let g=(0,i.default)("scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]);var b=e.i(682458),j=e.i(161351),v=e.i(466691),y=e.i(861947),N=e.i(323621),w=e.i(524365),k=e.i(534792),C=e.i(746632),A=e.i(878835),F=e.i(282879);let S=e=>fetch(e).then(e=>e.json()),z=["chunking","embedding","upserting"];function E({open:e,onOpenChange:i,trigger:l}){let[o,d]=(0,n.useState)(!1),[c,u]=(0,n.useState)(!1),m=void 0!==e,g=m?e:c,b=m&&i?i:u,{data:j,isLoading:y,mutate:N}=(0,s.default)("/api/index",S,{refreshInterval:e=>e?.run&&z.includes(e.run.status)?1e3:0}),T=(0,n.useRef)(void 0);(0,n.useEffect)(()=>{let e=j?.run?.warning;e&&e!==T.current?C.toast.warning(e,{id:"rate-limit-warning",duration:7e4}):!e&&T.current&&(C.toast.dismiss("rate-limit-warning"),C.toast.success("Rate limit resolved — resuming indexing.",{duration:3e3})),T.current=e},[j?.run?.warning]);let[M,P]=(0,n.useState)(!1);async function _(e=!1){d(!0);try{let t=await fetch("/api/index",{method:"POST",body:JSON.stringify({incremental:e}),headers:{"Content-Type":"application/json"}}),s=await t.json();if(!t.ok)return void C.toast.error(s.error??"Could not start indexing.");C.toast.success("Indexing started."),N()}catch{C.toast.error("Could not start indexing.")}finally{d(!1)}}async function B(){d(!0);try{if(!(await fetch("/api/index",{method:"DELETE"})).ok)return void C.toast.error("Could not cancel indexing.");C.toast.success("Indexing cancelled."),N()}catch{C.toast.error("Could not cancel indexing.")}finally{d(!1)}}return(0,n.useEffect)(()=>{let e=j?.run?.status;e&&z.includes(e)?P(!0):M&&"completed"===e&&(P(!1),b(!1),C.toast.success("Indexing completed successfully!"))},[j?.run?.status,M,b]),(0,t.jsxs)(F.Dialog,{open:g,onOpenChange:b,children:[l?(0,t.jsx)(F.DialogTrigger,{render:(0,n.isValidElement)(l)?l:(0,t.jsx)("button",{children:l})}):(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[j?.run?.status==="completed"&&(0,t.jsxs)(A.AlertDialog,{children:[(0,t.jsx)(A.AlertDialogTrigger,{render:(0,t.jsxs)(v.Button,{disabled:!j.ready||!!(j.run&&z.includes(j.run.status))||o,variant:"outline",children:[(0,t.jsx)(f.RotateCcw,{className:"size-4 mr-2"}),"Re-Index Data"]})}),(0,t.jsxs)(A.AlertDialogContent,{children:[(0,t.jsxs)(A.AlertDialogHeader,{children:[(0,t.jsx)(A.AlertDialogTitle,{children:"Are you sure you want to re-index data?"}),(0,t.jsx)(A.AlertDialogDescription,{children:"This will rebuild the entire index from scratch. All documents will be re-processed."})]}),(0,t.jsxs)(A.AlertDialogFooter,{children:[(0,t.jsx)(A.AlertDialogCancel,{children:"Cancel"}),(0,t.jsx)(A.AlertDialogAction,{onClick:()=>{b(!0),_(!1)},children:"Continue"})]})]})]}),(0,t.jsx)(F.DialogTrigger,{render:(0,t.jsxs)(v.Button,{disabled:!j?.ready||j?.unindexedCount===0,children:[(0,t.jsx)(h.Layers,{className:"size-4 mr-2"}),"Index Data"]})})]}),(0,t.jsxs)(F.DialogContent,{className:"max-w-2xl max-h-[90vh] overflow-y-auto ",children:[(0,t.jsxs)(F.DialogHeader,{children:[(0,t.jsx)(F.DialogTitle,{children:"Index Data"}),(0,t.jsx)(F.DialogDescription,{children:"Chunk, embed, and index into your selected vector database."})]}),y||!j?(0,t.jsx)("div",{className:"py-6",children:(0,t.jsx)(k.Skeleton,{className:"h-40 w-full"})}):(0,t.jsxs)("div",{className:"space-y-6 py-4",children:[(0,t.jsx)(D,{config:j.config,docCount:j.docCount,charCount:j.charCount}),!j.ready&&(0,t.jsxs)(w.Alert,{variant:"default",children:[(0,t.jsx)(r.AlertTriangle,{className:"size-4 text-orange-500!"}),(0,t.jsx)(w.AlertTitle,{className:"text-orange-500!",children:"Not ready to index"}),(0,t.jsx)(w.AlertDescription,{children:(0,t.jsx)("ul",{className:"list-disc pl-4",children:j.blockers.map(e=>(0,t.jsx)("li",{children:e},e))})})]}),(0,t.jsx)(I,{run:j.run,running:!!(j.run&&z.includes(j.run.status))}),j.ready&&!j.run&&(0,t.jsxs)(w.Alert,{children:[(0,t.jsx)(x.Info,{className:"size-4 text-blue-500!"}),(0,t.jsx)(w.AlertTitle,{className:"text-blue-600 dark:text-blue-400",children:"Before you start indexing"}),(0,t.jsxs)(w.AlertDescription,{className:"text-muted-foreground space-y-1",children:[(0,t.jsxs)("p",{children:["Once indexing begins, two settings become"," ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:"locked"})," to the existing index:"]}),(0,t.jsxs)("ul",{className:"list-disc pl-4 space-y-0.5",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:"Embedding model"})," — you can swap to any model with the"," ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:"same vector dimensions"}),", but switching to a model with different dimensions will require a full re-index."]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:"Vector store"})," — changing the store after indexing requires starting fresh."]})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)(v.Button,{onClick:()=>_(j.run?.status==="completed"),disabled:!j.ready||!!(j.run&&z.includes(j.run.status))||o||j.run?.status==="completed"&&0===j.unindexedCount,size:"lg",children:[j.run&&z.includes(j.run.status)||o?(0,t.jsx)(a.Loader2,{className:"size-4 animate-spin mr-2"}):(0,t.jsx)(p.Play,{className:"size-4 mr-2"}),j.run&&z.includes(j.run.status)?"Indexing…":o?"Starting…":j.run?.status==="completed"?`Index new documents (${j.unindexedCount})`:`Start indexing (${j.unindexedCount})`]}),j.run?.status==="completed"&&!(j.run&&z.includes(j.run.status))&&(0,t.jsxs)(A.AlertDialog,{children:[(0,t.jsx)(A.AlertDialogTrigger,{render:(0,t.jsxs)(v.Button,{variant:"outline",size:"lg",disabled:o,children:[(0,t.jsx)(f.RotateCcw,{className:"size-4 mr-2"}),"Re-Index All"]})}),(0,t.jsxs)(A.AlertDialogContent,{children:[(0,t.jsxs)(A.AlertDialogHeader,{children:[(0,t.jsx)(A.AlertDialogTitle,{children:"Are you sure you want to re-index data?"}),(0,t.jsx)(A.AlertDialogDescription,{children:"This will rebuild the entire index from scratch. All documents will be re-processed."})]}),(0,t.jsxs)(A.AlertDialogFooter,{children:[(0,t.jsx)(A.AlertDialogCancel,{children:"Cancel"}),(0,t.jsx)(A.AlertDialogAction,{onClick:()=>{b(!0),_(!1)},children:"Continue"})]})]})]}),!!(j.run&&z.includes(j.run.status))&&(0,t.jsx)(v.Button,{onClick:B,disabled:o,size:"lg",variant:"destructive",children:"Cancel"})]}),(0,t.jsx)(v.Button,{variant:"ghost",size:"lg",onClick:()=>b(!1),children:"Close"})]})]})]})]})}function D({config:e,docCount:s,charCount:a}){let n=(0,b.getEmbeddingModel)(e.embeddingModelId),r=(0,j.getVectorStore)(e.vectorStore),i=[{icon:d,label:"Embedding model",value:n?.label??e.embeddingModelId,hint:n?`${n.dimensions} dims`:void 0},{icon:c.Database,label:"Vector store",value:r?.label??e.vectorStore},{icon:l,label:"Index type",value:e.indexType.toUpperCase()},{icon:g,label:"Chunking",value:`${e.chunking.chunkSize} / ${e.chunking.chunkOverlap}`,hint:"size / overlap"},{icon:u.FileText,label:"Corpus",value:`${s.toLocaleString()} docs`,hint:`${a.toLocaleString()} chars`}];return(0,t.jsxs)("div",{className:"rounded-xl border bg-card text-card-foreground p-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-base font-semibold mb-4",children:[(0,t.jsx)(h.Layers,{className:"size-4 text-primary"}),"Index configuration"]}),(0,t.jsx)("dl",{className:"grid grid-cols-2 gap-x-6 gap-y-5 sm:grid-cols-3",children:i.map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("dt",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,t.jsx)(e.icon,{className:"size-3.5"}),e.label]}),(0,t.jsxs)("dd",{className:"text-sm font-medium leading-tight",children:[e.value,e.hint&&(0,t.jsx)("span",{className:"ml-1.5 font-mono text-[11px] font-normal text-muted-foreground",children:e.hint})]})]},e.label))})]})}let T={idle:{label:"Idle"},chunking:{label:"Chunking",phase:"Splitting documents into chunks"},embedding:{label:"Embedding",phase:"Generating vector embeddings"},upserting:{label:"Storing",phase:"Writing vectors to the store"},completed:{label:"Completed"},failed:{label:"Failed"}};function I({run:e,running:s}){if(!e)return(0,t.jsxs)("div",{className:"rounded-xl border bg-card text-card-foreground flex flex-col items-center justify-center gap-1 py-8 text-center",children:[(0,t.jsx)(m,{className:"mb-1 size-6 text-muted-foreground/60"}),(0,t.jsx)("p",{className:"text-sm font-medium",children:"No index built yet"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Build a Larkup index to embed your corpus and make it searchable."})]});let n=T[e.status],i=e.totalChunks>0?Math.round(e.processedChunks/e.totalChunks*100):5*!!s;return(0,t.jsxs)("div",{className:"rounded-xl border bg-card text-card-foreground p-4 space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-row items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-base font-semibold",children:["completed"===e.status?(0,t.jsx)(o.CheckCircle2,{className:"size-4 text-primary"}):"failed"===e.status?(0,t.jsx)(r.AlertTriangle,{className:"size-4 text-destructive"}):(0,t.jsx)(a.Loader2,{className:"size-4 animate-spin text-primary"}),n.label]}),(0,t.jsx)(P,{status:e.status})]}),"failed"===e.status?(0,t.jsx)(t.Fragment,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:n.phase??"Done"}),(0,t.jsxs)("span",{className:"font-mono tabular-nums",children:[e.processedChunks.toLocaleString(),e.totalChunks>0&&` / ${e.totalChunks.toLocaleString()}`," chunks"]})]}),(0,t.jsx)(y.Progress,{value:i,className:"**:data-[slot=progress-indicator]:bg-green-600"})]}),(0,t.jsxs)("dl",{className:"grid grid-cols-2 gap-4 pt-1 sm:grid-cols-4",children:[(0,t.jsx)(M,{label:"Documents",value:e.docCount.toLocaleString()}),(0,t.jsx)(M,{label:"Chunks",value:e.totalChunks.toLocaleString()}),(0,t.jsx)(M,{label:"Dimensions",value:e.dimensions?e.dimensions.toLocaleString():"—"}),(0,t.jsx)(M,{label:"Duration",value:e.durationMs?`${(e.durationMs/1e3).toFixed(1)}s`:s?"running…":"—"})]})]})]})}function M({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("dt",{className:"text-xs text-muted-foreground",children:e}),(0,t.jsx)("dd",{className:"font-mono text-sm tabular-nums",children:s})]})}function P({status:e}){return"completed"===e?(0,t.jsx)(N.Badge,{className:"bg-primary/12 text-primary hover:bg-primary/12",children:"Ready"}):"failed"===e?(0,t.jsx)(N.Badge,{variant:"destructive",children:"Failed"}):z.includes(e)?(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-xs font-medium text-green-600",children:[(0,t.jsxs)("span",{className:"relative flex size-2",children:[(0,t.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-green-600 opacity-75"}),(0,t.jsx)("span",{className:"relative inline-flex size-2 rounded-full bg-green-600"})]}),"Live"]}):null}let _=e=>fetch(e).then(e=>e.json()),B=["chunking","embedding","upserting"];e.s(["GlobalIndexProgress",0,function(){let{data:e}=(0,s.default)("/api/index",_,{refreshInterval:e=>e?.run&&B.includes(e.run.status)?1e3:0});if(!(e?.run&&B.includes(e.run.status))||!e?.run)return null;let{run:n}=e,r=n.totalChunks>0?Math.round(n.processedChunks/n.totalChunks*100):5;return(0,t.jsx)("div",{className:"fixed bottom-6 right-6 z-50",children:(0,t.jsx)(E,{trigger:(0,t.jsxs)("button",{className:"flex items-center gap-3 rounded-full border bg-background px-4 py-2 text-sm font-medium transition-all hover:bg-muted/50 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[(0,t.jsx)(a.Loader2,{className:"size-4 animate-spin text-primary"}),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,t.jsx)("span",{className:"text-xs leading-none text-muted-foreground",children:"Storing..."}),(0,t.jsxs)("span",{className:"leading-none",children:[r,"%"]})]})]})})})}],953159)},232295,e=>{"use strict";var t=e.i(199910),s=e.i(523829),a=e.i(178328),n=e.i(960198),r=e.i(133058),i=e.i(736484),l=e.i(417368),o=e.i(466691);let d="larkup-update-dismissed",c={docker:"docker compose pull && docker compose up -d",npm:"larkup update"};e.s(["UpdateBanner",0,function(){let[u,m]=(0,a.useState)(null),[x,h]=(0,a.useState)(!1),[p,f]=(0,a.useState)(!1),[g,b]=(0,a.useState)(!1),j="0.1.41",v="__TAURI__"in window?"desktop":"true"===t.default.env.NEXT_PUBLIC_DOCKER_ENV||"true"===t.default.env.NEXT_PUBLIC_RUNNING_IN_DOCKER?"docker":"npm";(0,a.useEffect)(()=>{if(function(){try{let e=localStorage.getItem(d);if(!e)return!1;let{timestamp:t}=JSON.parse(e);return Date.now()-t<864e5}catch{return!1}}())return;let e=new AbortController;return fetch("https://larkup.de/api/version",{signal:e.signal,cache:"no-store"}).then(e=>e.json()).then(e=>{e.version&&function(e,t){let s=e.replace(/^v/,"").split(".").map(Number),a=t.replace(/^v/,"").split(".").map(Number);for(let e=0;e<3;e++){let t=s[e]||0,n=a[e]||0;if(t>n)return 1;if(t<n)return -1}return 0}(e.version,j)>0&&(m(e.version),h(!0))}).catch(()=>{}),()=>e.abort()},[j]);let y=async()=>{if("desktop"===v){f(!0);try{let{check:t}=await e.A(963347),{relaunch:s}=await e.A(995308),a=await t();a?(await a.downloadAndInstall(),await s()):f(!1)}catch(e){console.error("Auto-update failed:",e),f(!1),window.open("https://larkup.de/download","_blank")}}else try{await navigator.clipboard.writeText(c[v]),b(!0),window.setTimeout(()=>b(!1),2e3)}catch(e){console.error("Could not copy update command:",e)}};return x&&u?(0,s.jsx)("div",{role:"status","aria-live":"polite",className:"relative z-50 border-b border-border bg-background px-3 py-2 text-foreground sm:px-4",children:(0,s.jsxs)("div",{className:"mx-auto flex min-h-7 max-w-screen-2xl items-center gap-2.5",children:[(0,s.jsx)("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background",children:(0,s.jsx)(n.ArrowUp,{className:"size-3.5","aria-hidden":"true"})}),(0,s.jsxs)("p",{className:"min-w-0 text-xs sm:text-sm",children:[(0,s.jsxs)("span",{className:"font-medium",children:["Larkup v",u," is available."]})," ",(0,s.jsxs)("span",{className:"hidden text-muted-foreground sm:inline",children:["You're using v",j,"."]})]}),"desktop"!==v&&(0,s.jsx)("code",{className:"ml-auto hidden max-w-[38rem] truncate rounded-[5px] border border-border bg-muted/40 px-2 py-1 font-mono text-[11px] text-muted-foreground lg:block",children:c[v]}),(0,s.jsx)(o.Button,{type:"button",variant:"desktop"===v?"default":"outline",size:"xs",onClick:y,disabled:p,"aria-label":"desktop"===v?"Update Larkup now":"Copy update command",className:"desktop"===v?"ml-auto":"ml-auto lg:ml-0",children:"desktop"===v?p?"Updating...":"Update now":g?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Check,{"aria-hidden":"true"}),"Copied"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.Copy,{"aria-hidden":"true"}),"Copy command"]})}),(0,s.jsx)(o.Button,{type:"button",variant:"ghost",size:"icon-xs",onClick:()=>{try{localStorage.setItem(d,JSON.stringify({timestamp:Date.now()}))}catch{}h(!1)},"aria-label":"Dismiss update notification",title:"Remind me tomorrow",children:(0,s.jsx)(l.X,{"aria-hidden":"true"})})]})}):null}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,136808,(t,e,r)=>{var n={675:function(t,e){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return(r+n)*3/4-n},e.toByteArray=function(t){var e,r,o=u(t),a=o[0],f=o[1],s=new i((a+f)*3/4-f),l=0,h=f>0?a-4:a;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],s[l++]=e>>16&255,s[l++]=e>>8&255,s[l++]=255&e;return 2===f&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,s[l++]=255&e),1===f&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,s[l++]=e>>8&255,s[l++]=255&e),s},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=0,f=n-i;a<f;a+=16383)o.push(function(t,e,n){for(var i,o=[],a=e;a<n;a+=3)i=(t[a]<<16&0xff0000)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(r[i>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(t,a,a+16383>f?f:a+16383));return 1===i?o.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===i&&o.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),o.join("")};for(var r=[],n=[],i="u">typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,f=o.length;a<f;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function u(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},72:function(t,e,r){"use strict";var n=r(675),i=r(783),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(t){if(t>0x7fffffff)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,f.prototype),e}function f(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t){var n=t,i=e;if(("string"!=typeof i||""===i)&&(i="utf8"),!f.isEncoding(i))throw TypeError("Unknown encoding: "+i);var o=0|d(n,i),u=a(o),s=u.write(n,i);return s!==o&&(u=u.slice(0,s)),u}if(ArrayBuffer.isView(t))return h(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(R(t,ArrayBuffer)||t&&R(t.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(R(t,SharedArrayBuffer)||t&&R(t.buffer,SharedArrayBuffer)))return function(t,e,r){var n;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),f.prototype),n}(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var l=t.valueOf&&t.valueOf();if(null!=l&&l!==t)return f.from(l,e,r);var p=function(t){if(f.isBuffer(t)){var e=0|c(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||function(t){return t!=t}(t.length)?a(0):h(t):"Buffer"===t.type&&Array.isArray(t.data)?h(t.data):void 0}(t);if(p)return p;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return f.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function s(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return s(t),a(t<0?0:0|c(t))}function h(t){for(var e=t.length<0?0:0|c(t.length),r=a(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}e.Buffer=f,e.SlowBuffer=function(t){return+t!=t&&(t=0),f.alloc(+t)},e.INSPECT_MAX_BYTES=50,e.kMaxLength=0x7fffffff,f.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),!f.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),f.poolSize=8192,f.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array),f.alloc=function(t,e,r){return(s(t),t<=0)?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)},f.allocUnsafe=function(t){return l(t)},f.allocUnsafeSlow=function(t){return l(t)};function c(t){if(t>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function d(t,e){if(f.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||R(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return A(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return T(t).length;default:if(i)return n?-1:A(t).length;e=(""+e).toLowerCase(),i=!0}}function p(t,e,r){var i,o,a,f=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=U[t[o]];return i}(this,e,r);case"utf8":case"utf-8":return b(this,e,r);case"ascii":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}(this,e,r);case"base64":return i=this,o=e,a=r,0===o&&a===i.length?n.fromByteArray(i):n.fromByteArray(i.slice(o,a));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}(this,e,r);default:if(f)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),f=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){var o;if(0===t.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r*=1)!=o&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length)if(i)return -1;else r=t.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof e&&(e=f.from(e,n)),f.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e){if(e&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(t,e,r);else return Uint8Array.prototype.lastIndexOf.call(t,e,r);return v(t,[e],r,n,i)}throw TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){var o,a=1,f=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;a=2,f/=2,u/=2,r/=2}function s(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=r;o<f;o++)if(s(t,o)===s(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else -1!==l&&(o-=o-l),l=-1}else for(r+u>f&&(r=f-u),o=r;o>=0;o--){for(var h=!0,c=0;c<u;c++)if(s(t,o+c)!==s(e,c)){h=!1;break}if(h)return o}return -1}f.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==f.prototype},f.compare=function(t,e){if(R(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),R(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(t)||!f.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:+(n<r)},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,e){if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);if(void 0===e)for(r=0,e=0;r<t.length;++r)e+=t[r].length;var r,n=f.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(R(o,Uint8Array)&&(o=f.from(o)),!f.isBuffer(o))throw TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},f.byteLength=d,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},f.prototype.toString=function(){var t=this.length;return 0===t?"":0==arguments.length?b(this,0,t):p.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(t){if(!f.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(f.prototype[o]=f.prototype.inspect),f.prototype.compare=function(t,e,r,n,i){if(R(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,a=r-e,u=Math.min(o,a),s=this.slice(n,i),l=t.slice(e,r),h=0;h<u;++h)if(s[h]!==l[h]){o=s[h],a=l[h];break}return o<a?-1:+(a<o)},f.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},f.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},f.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)};function b(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,f,u,s=t[i],l=null,h=s>239?4:s>223?3:s>191?2:1;if(i+h<=r)switch(h){case 1:s<128&&(l=s);break;case 2:(192&(o=t[i+1]))==128&&(u=(31&s)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],a=t[i+2],(192&o)==128&&(192&a)==128&&(u=(15&s)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],a=t[i+2],f=t[i+3],(192&o)==128&&(192&a)==128&&(192&f)==128&&(u=(15&s)<<18|(63&o)<<12|(63&a)<<6|63&f)>65535&&u<1114112&&(l=u)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}var c=n,d=c.length;if(d<=4096)return String.fromCharCode.apply(String,c);for(var p="",y=0;y<d;)p+=String.fromCharCode.apply(String,c.slice(y,y+=4096));return p}function m(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function w(t,e,r,n,i,o){if(!f.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw RangeError('"value" argument is out of bounds');if(r+n>t.length)throw RangeError("Index out of range")}function E(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function x(t,e,r,n,o){return e*=1,r>>>=0,o||E(t,e,r,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,r,n,23,4),r+4}function k(t,e,r,n,o){return e*=1,r>>>=0,o||E(t,e,r,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,r,n,52,8),r+8}f.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,a,f,u,s,l,h,c=this.length-e;if((void 0===r||r>c)&&(r=c),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var d=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var f,u=parseInt(e.substr(2*a,2),16);if((f=u)!=f)break;t[r+a]=u}return a}(this,t,e,r);case"utf8":case"utf-8":return i=e,o=r,I(A(t,this.length-i),this,i,o);case"ascii":return a=e,f=r,I(C(t),this,a,f);case"latin1":case"binary":return function(t,e,r,n){return I(C(e),t,r,n)}(this,t,e,r);case"base64":return u=e,s=r,I(T(t),this,u,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=e,h=r,I(function(t,e){for(var r,n,i=[],o=0;o<t.length&&!((e-=2)<0);++o)n=(r=t.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(t,this.length-l),this,l,h);default:if(d)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},f.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,f.prototype),n},f.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||m(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},f.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||m(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},f.prototype.readUInt8=function(t,e){return t>>>=0,e||m(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,e){return t>>>=0,e||m(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,e){return t>>>=0,e||m(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,e){return t>>>=0,e||m(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+0x1000000*this[t+3]},f.prototype.readUInt32BE=function(t,e){return t>>>=0,e||m(t,4,this.length),0x1000000*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||m(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},f.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||m(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},f.prototype.readInt8=function(t,e){return(t>>>=0,e||m(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},f.prototype.readInt16LE=function(t,e){t>>>=0,e||m(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?0xffff0000|r:r},f.prototype.readInt16BE=function(t,e){t>>>=0,e||m(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?0xffff0000|r:r},f.prototype.readInt32LE=function(t,e){return t>>>=0,e||m(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t>>>=0,e||m(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,e){return t>>>=0,e||m(t,4,this.length),i.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t>>>=0,e||m(t,4,this.length),i.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t>>>=0,e||m(t,8,this.length),i.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t>>>=0,e||m(t,8,this.length),i.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,e,r,n){if(t*=1,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,t,e,r,i,0)}var o=1,a=0;for(this[e]=255&t;++a<r&&(o*=256);)this[e+a]=t/o&255;return e+r},f.prototype.writeUIntBE=function(t,e,r,n){if(t*=1,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,t,e,r,i,0)}var o=r-1,a=1;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=t/a&255;return e+r},f.prototype.writeUInt8=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,1,255,0),this[e]=255&t,e+1},f.prototype.writeUInt16LE=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeUInt16BE=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeUInt32LE=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,4,0xffffffff,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},f.prototype.writeUInt32BE=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,4,0xffffffff,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeIntLE=function(t,e,r,n){if(t*=1,e>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,t,e,r,i-1,-i)}var o=0,a=1,f=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===f&&0!==this[e+o-1]&&(f=1),this[e+o]=(t/a|0)-f&255;return e+r},f.prototype.writeIntBE=function(t,e,r,n){if(t*=1,e>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,t,e,r,i-1,-i)}var o=r-1,a=1,f=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===f&&0!==this[e+o+1]&&(f=1),this[e+o]=(t/a|0)-f&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},f.prototype.writeInt16LE=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeInt32LE=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,4,0x7fffffff,-0x80000000),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,4,0x7fffffff,-0x80000000),t<0&&(t=0xffffffff+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeFloatLE=function(t,e,r){return x(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return x(this,t,e,!1,r)},f.prototype.writeDoubleLE=function(t,e,r){return k(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return k(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,n){if(!f.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var o=i-1;o>=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},f.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){var i,o=t.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(t=o)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=f.isBuffer(t)?t:f.from(t,n),u=a.length;if(0===u)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=a[i%u]}return this};var B=/[^+/0-9A-Za-z-_]/g;function A(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319||a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function C(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function T(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function I(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function R(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var U=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()},783:function(t,e){e.read=function(t,e,r,n,i){var o,a,f=8*i-n-1,u=(1<<f)-1,s=u>>1,l=-7,h=r?i-1:0,c=r?-1:1,d=t[e+h];for(h+=c,o=d&(1<<-l)-1,d>>=-l,l+=f;l>0;o=256*o+t[e+h],h+=c,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+h],h+=c,l-=8);if(0===o)o=1-s;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=s}return(d?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,f,u,s=8*o-i-1,l=(1<<s)-1,h=l>>1,c=5960464477539062e-23*(23===i),d=n?0:o-1,p=n?1:-1,y=+(e<0||0===e&&1/e<0);for(isNaN(e=Math.abs(e))||e===1/0?(f=+!!isNaN(e),a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+h>=1?e+=c/u:e+=c*Math.pow(2,1-h),e*u>=2&&(a++,u/=2),a+h>=l?(f=0,a=l):a+h>=1?(f=(e*u-1)*Math.pow(2,i),a+=h):(f=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&f,d+=p,f/=256,i-=8);for(a=a<<i|f,s+=i;s>0;t[r+d]=255&a,d+=p,a/=256,s-=8);t[r+d-p]|=128*y}}},i={};function o(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={exports:{}},a=!0;try{n[t](r,r.exports,o),a=!1}finally{a&&delete i[t]}return r.exports}o.ab="/ROOT/node_modules/.pnpm/next@16.2.12_@opentelemetry+api@1.9.1_@playwright+test@1.62.0_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/next/dist/compiled/buffer/",e.exports=o(72)},614785,t=>{"use strict";let e=(0,t.i(874822).default)("type",[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]]);t.s(["Type",0,e],614785)},347796,t=>{"use strict";let e=(0,t.i(874822).default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);t.s(["Image",0,e],347796)},457806,t=>{"use strict";var e=t.i(178328);let r=t=>{let e,r=new Set,n=(t,n)=>{let i="function"==typeof t?t(e):t;if(!Object.is(i,e)){let t=e;e=(null!=n?n:"object"!=typeof i||null===i)?i:Object.assign({},e,i),r.forEach(r=>r(e,t))}},i=()=>e,o={setState:n,getState:i,getInitialState:()=>a,subscribe:t=>(r.add(t),()=>r.delete(t))},a=e=t(n,i,o);return o},n=t=>{let n=t?r(t):r,i=t=>(function(t,r=t=>t){let n=e.default.useSyncExternalStore(t.subscribe,e.default.useCallback(()=>r(t.getState()),[t,r]),e.default.useCallback(()=>r(t.getInitialState()),[t,r]));return e.default.useDebugValue(n),n})(n,t);return Object.assign(i,n),i};t.s(["create",0,t=>t?n(t):n],457806)},327427,984552,t=>{"use strict";var e,r=t.i(523829);t.s([],175234),t.i(175234),t.i(199910);var n=t.i(178328),i=t.i(832817),o=t.i(410596),a=t.i(809937),f=t.i(47334),u=t.i(853607),s=t.i(722348),l=t.i(285182);let h=((e={}).checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e);var c=t.i(491899);function d(t){return n.useMemo(()=>({checked:e=>t.indeterminate?{}:e?{[h.checked]:""}:{[h.unchecked]:""},...c.fieldValidityMapping}),[t.indeterminate])}var p=t.i(782486),y=t.i(168198),g=t.i(300441),v=t.i(11902),b=t.i(474823),m=t.i(919415),w=t.i(265700),E=t.i(448843),x=t.i(42361),k=t.i(110951),B=t.i(121718),A=t.i(200622);let C=n.createContext(void 0);var T=t.i(42237),I=t.i(399417),R=t.i(914067);let U=n.forwardRef(function(t,e){let{checked:h,className:c,defaultChecked:A=!1,"aria-labelledby":U,disabled:O=!1,form:S,id:M,indeterminate:L=!1,inputRef:j,name:P,onCheckedChange:N,parent:_=!1,readOnly:D=!1,render:z,required:V=!1,uncheckedValue:F,value:K,nativeButton:q=!1,style:H,...Y}=t,{clearErrors:W}=(0,E.useFormContext)(),{disabled:J,name:X,setDirty:$,setFilled:G,setFocused:Z,setTouched:Q,state:tt,validationMode:te,validityData:tr,validation:tn}=(0,b.useFieldRootContext)(),ti=(0,w.useFieldItemContext)(),{labelId:to,controlId:ta,registerControlId:tf,getDescriptionProps:tu}=(0,x.useLabelableContext)(),ts=(0,B.useCheckboxGroupContext)(),tl=ts?.parent,th=tl&&ts.allValues,tc=J||ti.disabled||ts?.disabled||O,td=X??P,tp=K??td,ty=(0,y.useBaseUiId)(),tg=(0,y.useBaseUiId)(),tv=ta;th?tv=_?tg:`${tl.id}-${tp}`:M&&(tv=M);let tb={};th&&(_?tb=ts.parent.getParentProps():tp&&(tb=ts.parent.getChildProps(tp)));let{checked:tm=h,indeterminate:tw=L,onCheckedChange:tE,...tx}=tb,tk=ts?.value,tB=ts?.setValue,tA=ts?.defaultValue,tC=n.useRef(null),tT=(0,u.useRefWithInit)(()=>Symbol("checkbox-control")),tI=n.useRef(!1),{getButtonProps:tR,buttonRef:tU}=(0,v.useButton)({disabled:tc,native:q}),tO=ts?.validation??tn,[tS,tM]=(0,o.useControlled)({controlled:tp&&tk&&!_?tk.includes(tp):tm,default:tp&&tA&&!_?tA.includes(tp):A,name:"Checkbox",state:"checked"}),tL=th?!!tm:tS,tj=th&&tw||L;(0,a.useIsoLayoutEffect)(()=>{tf!==i.NOOP&&(tI.current=!0,tf(tT.current,tv))},[tv,tf,tT]),n.useEffect(()=>{let t=tT.current;return()=>{tI.current&&tf!==i.NOOP&&(tI.current=!1,tf(t,void 0))}},[tf,tT]),(0,m.useRegisterFieldControl)(tC,ty,tS,void 0,!ts&&!tc,P);let tP=n.useRef(null),tN=(0,f.useMergedRefs)(j,tP,tO.inputRef,tO.registerInput),t_=(0,k.useAriaLabelledBy)(U,to,tP,!q,tv??void 0);(0,a.useIsoLayoutEffect)(()=>{tP.current&&(tP.current.indeterminate=tj,tS&&G(!0))},[tS,tj,G]),(0,R.useValueChanged)(tS,()=>{ts||(W(td),G(tS),$(tS!==tr.initialValue),tO.change(tS))});let tD=(0,g.mergeProps)({checked:tS,disabled:tc,form:S,name:_?void 0:td,id:q?void 0:tv??void 0,required:V,ref:tN,style:td?s.visuallyHiddenInput:s.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(t){if(t.nativeEvent.defaultPrevented)return;if(D)return void t.preventDefault();let e=t.currentTarget.checked,r=(0,T.createChangeEventDetails)(I.REASONS.none,t.nativeEvent);N?.(e,r),r.isCanceled||(tE?.(e,r),!r.isCanceled&&(tM(e),tp&&tk&&tB&&!_&&!th&&tB(e?[...tk,tp]:tk.filter(t=>t!==tp),r)))},onFocus(){tC.current?.focus()}},void 0!==K?{value:(ts?tS&&K:K)||""}:i.EMPTY_OBJECT,tu,t=>tO.getValidationProps(tc,t));n.useEffect(()=>{if(!tl||!tp)return;let t=tl.disabledStatesRef.current;return t.set(tp,tc),()=>{t.delete(tp)}},[tl,tc,tp]);let tz=n.useMemo(()=>({...tt,checked:tL,disabled:tc,readOnly:D,required:V,indeterminate:tj}),[tt,tL,tc,D,V,tj]),tV=d(tz),tF=(0,p.useRenderElement)("span",t,{state:tz,ref:[tU,tC,e,ts?.registerControlRef],props:[{id:q?tv??void 0:ty,role:"checkbox","aria-checked":tj?"mixed":tL,"aria-readonly":D||void 0,"aria-required":V||void 0,"aria-labelledby":t_,"data-parent":_?"":void 0,onFocus(){tc||Z(!0)},onBlur(){let t=tP.current;t&&(Q(!0),Z(!1),"onBlur"===te&&tO.commit(ts?tk:t.checked))},onKeyDown(t){if("Enter"!==t.key||(t.preventBaseUIHandler(),t.defaultPrevented))return;let e=tP.current?.form??null,r=t.currentTarget,n=t.nativeEvent,i=t.preventDefault,o=n.preventDefault,a=!1;t.preventDefault=()=>{a=!0,i.call(t)},n.preventDefault=()=>{a=!0,o.call(n)},o.call(n),(0,l.ownerWindow)(r).queueMicrotask(()=>{t.preventDefault=i,n.preventDefault=o,a||(function(t){if(!t)return null;for(let e of t.elements){let t=e.tagName;if(("BUTTON"===t||"INPUT"===t)&&"submit"===e.type)return e}return null})(e)?.click()})},onClick(t){if(D||tc)return;t.preventDefault();let e=tP.current;e&&e.dispatchEvent(new((0,l.ownerWindow)(e)).PointerEvent("click",{bubbles:!0,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}},Y,tx,tR,tu,t=>tO.getValidationProps(tc,t)],stateAttributesMapping:tV});return(0,r.jsxs)(C.Provider,{value:tz,children:[tF,!tS&&!ts&&td&&!_&&void 0!==F&&(0,r.jsx)("input",{type:"hidden",form:S,name:td,value:F,disabled:tc}),(0,r.jsx)("input",{...tD,suppressHydrationWarning:!0})]})});var O=t.i(274172),S=t.i(484028),M=t.i(196630);let L=n.forwardRef(function(t,e){let{render:r,className:i,style:o,keepMounted:a=!1,...f}=t,u=function(){let t=n.useContext(C);if(void 0===t)throw Error((0,A.default)(14));return t}(),s=u.checked||u.indeterminate,{mounted:l,transitionStatus:h,setMounted:y}=(0,S.useTransitionStatus)(s),g=n.useRef(null),v={...u,transitionStatus:h};(0,O.useOpenChangeComplete)({open:s,ref:g,onComplete(){s||y(!1)}});let b={...d(u),...M.transitionStatusMapping,...c.fieldValidityMapping},m=(0,p.useRenderElement)("span",t,{ref:[e,g],state:v,stateAttributesMapping:b,props:f});return a||l?m:null});t.s(["Indicator",0,L,"Root",0,U],568991);var j=t.i(568991),j=j,P=t.i(152236),N=t.i(347567);t.s(["Checkbox",0,function({className:t,...e}){return(0,r.jsx)(j.Root,{"data-slot":"checkbox",className:(0,P.cn)("peer relative flex size-4 shrink-0 items-center justify-center rounded-lg border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",t),...e,children:(0,r.jsx)(j.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:(0,r.jsx)(N.CheckIcon,{})})})}],327427);let _=(0,t.i(874822).default)("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);t.s(["AudioLines",0,_],984552)},569429,t=>{"use strict";let e=(0,t.i(874822).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);t.s(["Upload",0,e],569429)},689202,382978,807064,t=>{"use strict";var e=t.i(978038);t.s(["TriangleAlert",()=>e.default],689202);var r=t.i(837733);t.s(["ChevronRight",()=>r.default],382978);var n=t.i(523829),i=t.i(152236);t.s(["Table",0,function({className:t,...e}){return(0,n.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,n.jsx)("table",{"data-slot":"table",className:(0,i.cn)("w-full caption-bottom text-sm",t),...e})})},"TableBody",0,function({className:t,...e}){return(0,n.jsx)("tbody",{"data-slot":"table-body",className:(0,i.cn)("[&_tr:last-child]:border-0",t),...e})},"TableCell",0,function({className:t,...e}){return(0,n.jsx)("td",{"data-slot":"table-cell",className:(0,i.cn)("p-2 align-middle whitespace-nowrap has-[[role=checkbox]]:pr-0",t),...e})},"TableHead",0,function({className:t,...e}){return(0,n.jsx)("th",{"data-slot":"table-head",className:(0,i.cn)("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground has-[[role=checkbox]]:pr-0",t),...e})},"TableHeader",0,function({className:t,...e}){return(0,n.jsx)("thead",{"data-slot":"table-header",className:(0,i.cn)("[&_tr]:border-b",t),...e})},"TableRow",0,function({className:t,...e}){return(0,n.jsx)("tr",{"data-slot":"table-row",className:(0,i.cn)("border-b transition-colors hover:bg-muted/15 has-aria-expanded:bg-muted/15 data-[state=selected]:bg-muted/30",t),...e})}],807064)},764574,t=>{t.v(e=>Promise.all(["static/chunks/2ib3e0xrrdait.js","static/chunks/0ws0kjdko8xlk.js"].map(e=>t.l(e))).then(()=>e(385290)))}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,155369,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},505716,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={assign:function(){return s},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return l}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});function o(e){let t={};for(let[r,a]of e.entries()){let e=t[r];void 0===e?t[r]=a:Array.isArray(e)?e.push(a):t[r]=[e,a]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function l(e){let t=new URLSearchParams;for(let[r,a]of Object.entries(e))if(Array.isArray(a))for(let e of a)t.append(r,i(e));else t.set(r,i(a));return t}function s(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,a]of r.entries())e.append(t,a)}return e}},584345,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return b},SP:function(){return h},ST:function(){return g},WEB_VITALS:function(){return o},execOnce:function(){return i},getDisplayName:function(){return c},getLocationOrigin:function(){return d},getURL:function(){return u},isAbsoluteUrl:function(){return s},isResSent:function(){return p},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return w}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...a)=>(r||(r=!0,t=e(...a)),t)}let l=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,s=e=>l.test(e);function d(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=d();return e.substring(t.length)}function c(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function p(e){return e.finished||e.headersSent}function m(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function f(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let a=await e.getInitialProps(t);if(r&&p(r))return a;if(!a)throw Object.defineProperty(Error(`"${c(e)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return a}let h="u">typeof performance,g=h&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class v extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function w(e){return JSON.stringify({message:e.message,stack:e.stack})}},708909,e=>{"use strict";let t=(0,e.i(874822).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],708909)},539352,e=>{"use strict";let t=(0,e.i(874822).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",0,t],539352)},487779,e=>{"use strict";let t=(0,e.i(874822).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,t],487779)},960198,e=>{"use strict";let t=(0,e.i(874822).default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,t],960198)},909042,e=>{"use strict";let t=(0,e.i(874822).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["default",0,t])},82100,e=>{"use strict";var t=e.i(523829),r=e.i(178328);let a=(0,r.createContext)(null);e.s(["ThemeCustomizerProvider",0,function({children:e}){let[n,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)("default"),[s,d]=(0,r.useState)("sidebar"),[u,c]=(0,r.useState)("radius-default"),[p,m]=(0,r.useState)("bg-default"),[f,h]=(0,r.useState)("panel-default"),[g,y]=(0,r.useState)("panel-default"),[v,b]=(0,r.useState)("card");return(0,r.useEffect)(()=>{o(!0);let e=localStorage.getItem("app-theme"),t=localStorage.getItem("app-layout"),r=localStorage.getItem("app-radius"),a=localStorage.getItem("app-background"),n=localStorage.getItem("app-panel-bg"),i=localStorage.getItem("app-nav-bg"),s=localStorage.getItem("app-pagestyle");e&&l(e),t&&d(t),r&&c(r),a&&m(a),n&&h(n),i&&y(i),s&&b(s)},[]),(0,r.useEffect)(()=>{if(!n)return;localStorage.setItem("app-theme",i),localStorage.setItem("app-layout",s),localStorage.setItem("app-radius",u),localStorage.setItem("app-background",p),localStorage.setItem("app-panel-bg",f),localStorage.setItem("app-nav-bg",g),localStorage.setItem("app-pagestyle",v);let e=document.body;Array.from(e.classList).forEach(t=>{(t.startsWith("theme-")||t.startsWith("radius-")||t.startsWith("bg-"))&&e.classList.remove(t)}),"default"!==i&&e.classList.add(i),"radius-default"!==u&&e.classList.add(u),p&&e.classList.add(p)},[i,s,u,p,f,g,v,n]),(0,t.jsx)(a.Provider,{value:{theme:i,setTheme:l,layout:s,setLayout:d,radius:u,setRadius:c,background:p,setBackground:m,panelBg:f,setPanelBg:h,navBg:g,setNavBg:y,pageStyle:v,setPageStyle:b,isMounted:n},children:e})},"useThemeCustomizer",0,function(){let e=(0,r.useContext)(a);if(!e)throw Error("useThemeCustomizer must be used within a ThemeCustomizerProvider");return e}])},37126,463861,874560,e=>{"use strict";let t=(0,e.i(874822).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["default",0,t],463861),e.s(["Server",0,t],37126);var r=e.i(523829),a=e.i(178328),n=e.i(746632),o=e.i(501706),i=e.i(466691),l=e.i(282879),s=e.i(924911),d=e.i(925466),u=e.i(624529);e.s(["ServerFormDialog",0,function({mode:e,target:t,open:c,onOpenChange:p}){let{createServer:m,renameServer:f}=(0,u.useWorkspace)(),[h,g]=(0,a.useState)(""),[y,v]=(0,a.useState)(!1);async function b(){let r=h.trim();if(!r)return void n.toast.error("Enter a project name.");v(!0);try{if("create"===e){let e=await m(r);e&&n.toast.success(`Created "${e.name}" and switched to it.`)}else t&&(await f(t.id,r),n.toast.success("Project renamed."));p(!1)}catch{n.toast.error("Something went wrong. Try again.")}finally{v(!1)}}return(0,a.useEffect)(()=>{c&&g("rename"===e?t?.name??"":"")},[c,e,t]),(0,r.jsx)(l.Dialog,{open:c,onOpenChange:p,children:(0,r.jsxs)(l.DialogContent,{className:"sm:max-w-md",children:[(0,r.jsxs)(l.DialogHeader,{children:[(0,r.jsx)(l.DialogTitle,{children:"create"===e?"New project":"Rename project"}),(0,r.jsx)(l.DialogDescription,{children:"create"===e?"Each project is an isolated environment with its own documents, index, and settings.":"Give this project a clearer name."})]}),(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsx)(d.Label,{htmlFor:"server-name",children:"Project name"}),(0,r.jsx)(s.Input,{id:"server-name",value:h,autoFocus:!0,placeholder:"e.g. docs-assistant",onChange:e=>g(e.target.value),onKeyDown:e=>{"Enter"===e.key&&b()}})]}),(0,r.jsxs)(l.DialogFooter,{children:[(0,r.jsx)(i.Button,{variant:"outline",onClick:()=>p(!1),disabled:y,children:"Cancel"}),(0,r.jsxs)(i.Button,{onClick:()=>void b(),disabled:y,children:[y&&(0,r.jsx)(o.Loader2,{className:"size-4 animate-spin"}),"create"===e?"Create project":"Save"]})]})]})})}],874560)},714809,e=>{"use strict";let t=(0,e.i(874822).default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);e.s(["Layers",0,t],714809)},682458,161351,e=>{"use strict";let t=[{id:"openai/text-embedding-3-small",label:"text-embedding-3-small",provider:"openai",dimensions:1536,maxInputTokens:8191,description:"Fast, cheap, strong general-purpose default."},{id:"openai/text-embedding-3-large",label:"text-embedding-3-large",provider:"openai",dimensions:3072,maxInputTokens:8191,description:"Highest quality OpenAI embeddings, larger vectors."},{id:"openai/text-embedding-ada-002",label:"text-embedding-ada-002",provider:"openai",dimensions:1536,maxInputTokens:8191,description:"Legacy model — kept for backward compatibility."},{id:"google/gemini-embedding-001",label:"gemini-embedding-001",provider:"google",dimensions:768,maxInputTokens:2048,description:"Gemini embedding 001."},{id:"cohere/embed-english-v3.0",label:"embed-english-v3.0",provider:"cohere",dimensions:1024,maxInputTokens:512,description:"Tuned for retrieval; great for English-heavy corpora."},{id:"cohere/embed-multilingual-v3.0",label:"embed-multilingual-v3.0",provider:"cohere",dimensions:1024,maxInputTokens:512,description:"100+ language multilingual retrieval embeddings."},{id:"voyage/voyage-3",label:"voyage-3",provider:"voyage",dimensions:1024,maxInputTokens:32e3,description:"Voyage's best general-purpose retrieval model."},{id:"voyage/voyage-3-lite",label:"voyage-3-lite",provider:"voyage",dimensions:512,maxInputTokens:32e3,description:"Optimized for latency and cost with strong performance."},{id:"voyage/voyage-code-3",label:"voyage-code-3",provider:"voyage",dimensions:1024,maxInputTokens:32e3,description:"Specialized for code retrieval tasks."},{id:"mistral/mistral-embed",label:"mistral-embed",provider:"mistral",dimensions:1024,maxInputTokens:8192,description:"Mistral's efficient embedding model for retrieval."},{id:"jina/jina-embeddings-v3",label:"jina-embeddings-v3",provider:"jina",dimensions:1024,maxInputTokens:8192,description:"Multilingual, task-specific embeddings from Jina AI."},{id:"jina/jina-clip-v2",label:"jina-clip-v2",provider:"jina",dimensions:1024,maxInputTokens:8192,description:"Multimodal embeddings for text and images."},{id:"nomic/nomic-embed-text-v1.5",label:"nomic-embed-text-v1.5",provider:"nomic",dimensions:768,maxInputTokens:8192,description:"Open-source, highly capable text embeddings."}];e.s(["EMBEDDING_DIMENSIONS",0,{"openai/text-embedding-3-small":{dimensions:1536,maxInputTokens:8191},"openai/text-embedding-3-large":{dimensions:3072,maxInputTokens:8191},"openai/text-embedding-ada-002":{dimensions:1536,maxInputTokens:8191},"google/gemini-embedding-2":{dimensions:768,maxInputTokens:2048},"google/gemini-embedding-001":{dimensions:768,maxInputTokens:2048},"cohere/embed-english-v3.0":{dimensions:1024,maxInputTokens:512},"cohere/embed-multilingual-v3.0":{dimensions:1024,maxInputTokens:512},"voyage/voyage-3":{dimensions:1024,maxInputTokens:32e3},"voyage/voyage-3-lite":{dimensions:512,maxInputTokens:32e3},"voyage/voyage-code-3":{dimensions:1024,maxInputTokens:32e3},"mistral/mistral-embed":{dimensions:1024,maxInputTokens:8192},"jina/jina-embeddings-v3":{dimensions:1024,maxInputTokens:8192},"jina/jina-clip-v2":{dimensions:1024,maxInputTokens:8192},"nomic/nomic-embed-text-v1.5":{dimensions:768,maxInputTokens:8192}},"EMBEDDING_MODELS",0,t,"getEmbeddingModel",0,function(e){return t.find(t=>t.id===e)}],682458);let r={lancedb:{id:"lancedb",label:"LanceDB",description:"Embedded vector database for local development, LanceDB Cloud, or persistent S3-compatible storage such as Cloudflare R2.",runtime:"both",installStatus:"installed",docsUrl:"https://lancedb.github.io/lancedb/",serverDependencies:{"@lancedb/lancedb":"^0.30.0"},fields:[{key:"mode",label:"Mode",type:"select",required:!0,defaultValue:"local",help:"Use a local disk, LanceDB Cloud, or an S3-compatible bucket for persistent serverless deployments.",options:[{label:"Local (on-disk)",value:"local"},{label:"S3-compatible (Vercel / R2 / S3)",value:"s3"},{label:"Cloud",value:"cloud"}]},{key:"dbPath",label:"Database path",type:"path",required:!0,defaultValue:"./.larkup/lancedb",placeholder:"./.larkup/lancedb",help:"Directory where the LanceDB tables are stored.",showWhen:{key:"mode",equals:["local"]}},{key:"s3Uri",label:"Database URI",type:"text",required:!0,placeholder:"s3://my-bucket/larkup/my-server",help:"A dedicated, private bucket prefix for LanceDB table files. This is persistent across Vercel invocations.",showWhen:{key:"mode",equals:["s3"]}},{key:"s3Endpoint",label:"S3 endpoint",type:"text",required:!1,placeholder:"https://<account-id>.r2.cloudflarestorage.com",help:"Required for Cloudflare R2 and other S3-compatible providers. Leave blank for AWS S3.",showWhen:{key:"mode",equals:["s3"]}},{key:"s3Region",label:"Region",type:"text",required:!0,defaultValue:"auto",placeholder:"auto",help:"Use “auto” for Cloudflare R2, or your bucket region for AWS S3.",showWhen:{key:"mode",equals:["s3"]}},{key:"s3AccessKeyId",label:"Access key ID",type:"password",required:!0,secret:!0,help:"Use an object read/write credential restricted to this bucket.",showWhen:{key:"mode",equals:["s3"]}},{key:"s3SecretAccessKey",label:"Secret access key",type:"password",required:!0,secret:!0,help:"Stored as a deployment environment variable; never expose it in the browser.",showWhen:{key:"mode",equals:["s3"]}},{key:"uri",label:"Cloud URI",type:"text",required:!0,placeholder:"db://my-database",help:"Your LanceDB Cloud database URI.",showWhen:{key:"mode",equals:["cloud"]}},{key:"apiKey",label:"API key",type:"password",required:!0,secret:!0,placeholder:"sk_...",help:"LanceDB Cloud API key. Stored as an env var in the generated server.",showWhen:{key:"mode",equals:["cloud"]}},{key:"tableName",label:"Table name",type:"text",required:!0,defaultValue:"documents",help:"The table that holds your embedded chunks."}]},pinecone:{id:"pinecone",label:"Pinecone",description:"Fully-managed cloud vector database. Cloud-only — requires an API key and an existing index.",runtime:"cloud",installStatus:"installed",docsUrl:"https://docs.pinecone.io/",serverDependencies:{"@pinecone-database/pinecone":"^6.0.0"},fields:[{key:"apiKey",label:"API key",type:"password",required:!0,secret:!0,placeholder:"pcsk_...",help:"Pinecone API key. Stored as an env var in the generated server."},{key:"indexName",label:"Index name",type:"text",required:!0,placeholder:"rag-index",help:"Name of the Pinecone index to upsert into / query. For hybrid/lexical mode this index must use the 'dotproduct' metric."},{key:"namespace",label:"Namespace",type:"text",required:!1,placeholder:"default",help:"Optional namespace to isolate this dataset within the index."},{key:"sparseModel",label:"Sparse model",type:"text",required:!0,defaultValue:"pinecone-sparse-english-v0",help:"Pinecone-hosted sparse model used to generate keyword vectors via the Inference API. Both dense and sparse vectors are stored in the same index.",showWhenIndexType:["lexical","hybrid"]}]},weaviate:{id:"weaviate",label:"Weaviate",description:"Open-source AI-native vector database with built-in hybrid search, BM25, and multi-tenancy.",runtime:"both",installStatus:"coming-soon",docsUrl:"https://weaviate.io/developers/weaviate",serverDependencies:{weaviate:"^3.0.0"},fields:[{key:"host",label:"Host URL",type:"text",required:!0,placeholder:"https://my-cluster.weaviate.network",help:"Weaviate Cloud URL or self-hosted host address."},{key:"apiKey",label:"API key",type:"password",required:!1,secret:!0,placeholder:"weaviate-api-key",help:"Weaviate Cloud API key (optional for self-hosted)."},{key:"className",label:"Collection name",type:"text",required:!0,defaultValue:"Documents",help:"The Weaviate collection (class) that holds your embedded chunks."}]},qdrant:{id:"qdrant",label:"Qdrant",description:"High-performance vector search engine with rich filtering, built for production-scale RAG.",runtime:"both",installStatus:"coming-soon",docsUrl:"https://qdrant.tech/documentation/",serverDependencies:{"@qdrant/js-client-rest":"^1.9.0"},fields:[{key:"url",label:"Host URL",type:"text",required:!0,placeholder:"http://localhost:6333",help:"Qdrant server URL (local or Qdrant Cloud endpoint)."},{key:"apiKey",label:"API key",type:"password",required:!1,secret:!0,placeholder:"qdrant-api-key",help:"Qdrant Cloud API key (leave blank for local)."},{key:"collectionName",label:"Collection name",type:"text",required:!0,defaultValue:"documents",help:"Qdrant collection to upsert into and query."}]},chroma:{id:"chroma",label:"Chroma",description:"Open-source, developer-friendly embedding database. Great for rapid local prototyping.",runtime:"both",installStatus:"installable",docsUrl:"https://docs.trychroma.com/",serverDependencies:{chromadb:"^1.9.0"},fields:[{key:"mode",label:"Mode",type:"select",required:!0,defaultValue:"server",help:"Server connects to a self-hosted Chroma instance. Cloud connects to Chroma Cloud.",options:[{label:"Server (Self-hosted)",value:"server"},{label:"Cloud (Chroma Cloud)",value:"cloud"}]},{key:"host",label:"Server URL",type:"text",required:!0,placeholder:"http://localhost:8000",defaultValue:"http://localhost:8000",help:"Chroma server URL (local Docker or remote).",showWhen:{key:"mode",equals:["server"]}},{key:"authToken",label:"Auth Token",type:"password",required:!1,secret:!0,placeholder:"chroma-token",help:"Optional static auth token for Chroma server.",showWhen:{key:"mode",equals:["server"]}},{key:"apiKey",label:"API Key",type:"password",required:!0,secret:!0,placeholder:"sk_...",help:"Chroma Cloud API Key.",showWhen:{key:"mode",equals:["cloud"]}},{key:"tenant",label:"Tenant",type:"text",required:!0,defaultValue:"default_tenant",help:"Tenant name for Chroma Cloud.",showWhen:{key:"mode",equals:["cloud"]}},{key:"database",label:"Database",type:"text",required:!0,defaultValue:"default_database",help:"Database name for Chroma Cloud.",showWhen:{key:"mode",equals:["cloud"]}},{key:"collectionName",label:"Collection name",type:"text",required:!0,defaultValue:"documents",help:"Chroma collection to store and retrieve embeddings."}]},pgvector:{id:"pgvector",label:"pgvector",description:"PostgreSQL extension for vector similarity search. Self-host vectors alongside your relational data.",runtime:"both",installStatus:"coming-soon",docsUrl:"https://github.com/pgvector/pgvector",serverDependencies:{pg:"^8.11.0",pgvector:"^0.2.0"},fields:[{key:"connectionString",label:"Connection string",type:"password",required:!0,secret:!0,placeholder:"postgresql://user:pass@localhost:5432/db",help:"Full PostgreSQL connection string."},{key:"tableName",label:"Table name",type:"text",required:!0,defaultValue:"embeddings",help:"The table used to store vector embeddings. Created automatically if absent."}]},supabase:{id:"supabase",label:"Supabase",description:"Postgres-backed vector store via the pgvector extension with Supabase's managed infrastructure.",runtime:"cloud",installStatus:"coming-soon",docsUrl:"https://supabase.com/docs/guides/ai",serverDependencies:{"@supabase/supabase-js":"^2.43.0"},fields:[{key:"url",label:"Project URL",type:"text",required:!0,placeholder:"https://xyz.supabase.co",help:"Your Supabase project URL."},{key:"serviceKey",label:"Service role key",type:"password",required:!0,secret:!0,placeholder:"eyJhbGci...",help:"Supabase service_role key (not the anon key). Stored as an env var."},{key:"tableName",label:"Table name",type:"text",required:!0,defaultValue:"documents",help:"Supabase table with a vector column for embeddings."}]}},a=Object.values(r);function n(e,t,r){return e.fields.filter(e=>{if(e.showWhen){let r=t[e.showWhen.key]??"";if(!e.showWhen.equals.includes(r))return!1}return!e.showWhenIndexType||!r||!!e.showWhenIndexType.includes(r)})}e.s(["VECTOR_STORE_LIST",0,a,"getVectorStore",0,function(e){return r[e]},"validateStoreConfig",0,function(e,t,r){let a={};for(let o of n(e,t,r))o.required&&!t[o.key]?.trim()&&(a[o.key]=`${o.label} is required`);return a},"visibleFields",0,n],161351)},592601,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let a=e.r(178328);function n(e,t){let r=(0,a.useRef)(null),n=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=o(e,a)),t&&(n.current=o(t,a))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},866657,e=>{"use strict";var t=e.i(978038);e.s(["AlertTriangle",()=>t.default])},861947,e=>{"use strict";var t,r=e.i(523829);e.s([],79988),e.i(79988),e.i(199910);var a=e.i(178328),n=e.i(914554),o=e.i(722348),i=e.i(111608),l=e.i(782486),s=e.i(200622);let d=a.createContext(void 0);function u(){let e=a.useContext(d);if(void 0===e)throw Error((0,s.default)(51));return e}let c=((t={}).complete="data-complete",t.indeterminate="data-indeterminate",t.progressing="data-progressing",t),p={status:e=>"progressing"===e?{[c.progressing]:""}:"complete"===e?{[c.complete]:""}:"indeterminate"===e?{[c.indeterminate]:""}:null};function m(e,t){return null==t?"indeterminate progress":e||`${t}%`}let f=a.forwardRef(function(e,t){let{format:s,getAriaValueText:u=m,locale:c,max:f=100,min:h=0,value:g,render:y,className:v,children:b,style:x,...k}=e,[w,S]=a.useState(),I=(0,n.useValueAsRef)(s),j="indeterminate";Number.isFinite(g)&&(j=g===f?"complete":"progressing");let T=(0,i.formatNumberValue)(g,c,I.current),C=a.useMemo(()=>({status:j}),[j]),P={"aria-labelledby":w,"aria-valuemax":f,"aria-valuemin":h,"aria-valuenow":g??void 0,"aria-valuetext":u(T,g),role:"progressbar",children:(0,r.jsxs)(a.Fragment,{children:[b,(0,r.jsx)("span",{role:"presentation",style:o.visuallyHidden,children:"x"})]})},q=a.useMemo(()=>({formattedValue:T,max:f,min:h,setLabelId:S,state:C,status:j,value:g}),[T,f,h,S,C,j,g]),E=(0,l.useRenderElement)("div",e,{state:C,ref:t,props:[P,k],stateAttributesMapping:p});return(0,r.jsx)(d.Provider,{value:q,children:E})}),h=a.forwardRef(function(e,t){let{render:r,className:a,style:n,...o}=e,{state:i}=u();return(0,l.useRenderElement)("div",e,{state:i,ref:t,props:o,stateAttributesMapping:p})});var g=e.i(401082);let y=a.forwardRef(function(e,t){let{render:r,className:a,style:n,...o}=e,{max:i,min:s,value:d,state:c}=u(),m=Number.isFinite(d)&&null!==d?(0,g.valueToPercent)(d,s,i):null,f=null==m?{}:{insetInlineStart:0,height:"inherit",width:`${m}%`};return(0,l.useRenderElement)("div",e,{state:c,ref:t,props:[{style:f},o],stateAttributesMapping:p})}),v=a.forwardRef(function(e,t){let{className:r,render:a,children:n,style:o,...i}=e,{value:s,formattedValue:d,state:c}=u(),m=null==s?"indeterminate":d,f=null==s?null:d;return(0,l.useRenderElement)("span",e,{state:c,ref:t,props:[{"aria-hidden":!0,children:"function"==typeof n?n(m,s):f},i],stateAttributesMapping:p})});var b=e.i(322627);let x=a.forwardRef(function(e,t){let{render:r,className:a,style:n,id:o,...i}=e,{setLabelId:s,state:d}=u(),c=(0,b.useRegisteredLabelId)(o,s);return(0,l.useRenderElement)("span",e,{state:d,ref:t,props:[{id:c,role:"presentation"},i],stateAttributesMapping:p})});e.s(["Indicator",0,y,"Label",0,x,"Root",0,f,"Track",0,h,"Value",0,v],208452);var k=e.i(208452),k=k,w=e.i(152236);function S({className:e,...t}){return(0,r.jsx)(k.Track,{className:(0,w.cn)("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",e),"data-slot":"progress-track",...t})}function I({className:e,...t}){return(0,r.jsx)(k.Indicator,{"data-slot":"progress-indicator",className:(0,w.cn)("h-full bg-primary transition-all",e),...t})}e.s(["Progress",0,function({className:e,children:t,value:a,...n}){return(0,r.jsxs)(k.Root,{value:a,"data-slot":"progress",className:(0,w.cn)("flex flex-wrap gap-3",e),...n,children:[t,(0,r.jsx)(S,{children:(0,r.jsx)(I,{})})]})}],861947)},323621,e=>{"use strict";var t=e.i(300441),r=e.i(782486),a=e.i(294237),n=e.i(152236);let o=(0,a.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:ring-[3px] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:a="default",render:i,...l}){var s;return s={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,n.cn)(o({variant:a}),e)},l),render:i,state:{slot:"badge",variant:a}},(0,r.useRenderElement)(s.defaultTagName??"div",s,s)}],323621)},524365,e=>{"use strict";var t=e.i(523829),r=e.i(294237),a=e.i(152236);let n=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...o}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,a.cn)(n({variant:r}),e),...o})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,a.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})},"AlertTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-title",className:(0,a.cn)("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",e),...r})}])},534792,e=>{"use strict";var t=e.i(523829),r=e.i(152236);e.s(["Skeleton",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"skeleton",className:(0,r.cn)("animate-pulse rounded-md bg-muted",e),...a})}])},951482,e=>{"use strict";let t=(0,e.i(874822).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",0,t])},195300,e=>{"use strict";let t=(0,e.i(874822).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",0,t])},894180,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return l},formatWithValidation:function(){return d},urlObjectKeys:function(){return s}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let o=e.r(744066)._(e.r(505716)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,a=e.protocol||"",n=e.pathname||"",l=e.hash||"",s=e.query||"",d=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?d=t+e.host:r&&(d=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(d+=":"+e.port)),s&&"object"==typeof s&&(s=String(o.urlQueryToSearchParams(s)));let u=e.search||s&&`?${s}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||i.test(a))&&!1!==d?(d="//"+(d||""),n&&"/"!==n[0]&&(n="/"+n)):d||(d=""),l&&"#"!==l[0]&&(l="#"+l),u&&"?"!==u[0]&&(u="?"+u),n=n.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${a}${d}${n}${u}${l}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return l(e)}},1808,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let a=e.r(584345),n=e.r(653313);function o(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},330446,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},334347,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return y},useLinkStatus:function(){return b}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let o=e.r(744066),i=e.r(523829),l=o._(e.r(178328)),s=e.r(894180),d=e.r(46640),u=e.r(592601),c=e.r(584345),p=e.r(455649);e.r(155369);let m=e.r(644047),f=e.r(969009),h=e.r(1808),g=e.r(341286);function y(t){var r,a;let n,o,y,[b,x]=(0,l.useOptimistic)(f.IDLE_LINK_STATUS),k=(0,l.useRef)(null),{href:w,as:S,children:I,prefetch:j=null,passHref:T,replace:C,shallow:P,scroll:q,onClick:E,onMouseEnter:R,onTouchStart:_,legacyBehavior:A=!1,onNavigate:L,transitionTypes:N,ref:O,unstable_dynamicOnHover:D,...M}=t;n=I,A&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let U=l.default.useContext(d.AppRouterContext),W=!1!==j,V=!1!==j?null===(a=j)||"auto"===a?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,B="string"==typeof(r=S||w)?r:(0,s.formatUrl)(r);if(A){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=l.default.Children.only(n)}let z=A?o&&"object"==typeof o&&o.ref:O,F=l.default.useCallback(e=>(null!==U&&(k.current=(0,f.mountLinkInstance)(e,B,U,V,W,x)),()=>{k.current&&((0,f.unmountLinkForCurrentNavigation)(k.current),k.current=null),(0,f.unmountPrefetchableInstance)(e)}),[W,B,U,V,x]),$={ref:(0,u.useMergedRef)(F,z),onClick(t){A||"function"!=typeof E||E(t),A&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!U||t.defaultPrevented||function(t,r,a,n,o,i,s){if("u">typeof window){let d,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((d=t.currentTarget.getAttribute("target"))&&"_self"!==d||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:c}=e.r(365730);l.default.startTransition(()=>{c(r,n?"replace":"push",!1===o?m.ScrollBehavior.NoScroll:m.ScrollBehavior.Default,a.current,s)})}}(t,B,k,C,q,L,N)},onMouseEnter(e){A||"function"!=typeof R||R(e),A&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),U&&W&&(0,f.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){A||"function"!=typeof _||_(e),A&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),U&&W&&(0,f.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,c.isAbsoluteUrl)(B)?$.href=B:A&&!T&&("a"!==o.type||"href"in o.props)||($.href=(0,p.addBasePath)(B)),y=A?l.default.cloneElement(o,$):(0,i.jsx)("a",{...M,...$,children:n}),(0,i.jsx)(v.Provider,{value:b,children:y})}e.r(330446);let v=(0,l.createContext)(f.IDLE_LINK_STATUS),b=()=>(0,l.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},743118,e=>{"use strict";var t=e.i(951482);e.s(["Info",()=>t.default])},963347,e=>{e.v(t=>Promise.all(["static/chunks/0le9w0u20k38o.js"].map(t=>e.l(t))).then(()=>t(405299)))},995308,e=>{e.v(t=>Promise.all(["static/chunks/0tckbq8d00xpw.js"].map(t=>e.l(t))).then(()=>t(44438)))}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,155369,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},505716,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={assign:function(){return s},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return l}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});function o(e){let t={};for(let[r,a]of e.entries()){let e=t[r];void 0===e?t[r]=a:Array.isArray(e)?e.push(a):t[r]=[e,a]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function l(e){let t=new URLSearchParams;for(let[r,a]of Object.entries(e))if(Array.isArray(a))for(let e of a)t.append(r,i(e));else t.set(r,i(a));return t}function s(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,a]of r.entries())e.append(t,a)}return e}},584345,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return b},SP:function(){return h},ST:function(){return g},WEB_VITALS:function(){return o},execOnce:function(){return i},getDisplayName:function(){return c},getLocationOrigin:function(){return d},getURL:function(){return u},isAbsoluteUrl:function(){return s},isResSent:function(){return p},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return m},stringifyError:function(){return w}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...a)=>(r||(r=!0,t=e(...a)),t)}let l=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,s=e=>l.test(e);function d(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=d();return e.substring(t.length)}function c(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function p(e){return e.finished||e.headersSent}function m(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function f(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let a=await e.getInitialProps(t);if(r&&p(r))return a;if(!a)throw Object.defineProperty(Error(`"${c(e)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return a}let h="u">typeof performance,g=h&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class v extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function w(e){return JSON.stringify({message:e.message,stack:e.stack})}},708909,e=>{"use strict";let t=(0,e.i(874822).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],708909)},487779,e=>{"use strict";let t=(0,e.i(874822).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,t],487779)},539352,e=>{"use strict";let t=(0,e.i(874822).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",0,t],539352)},960198,e=>{"use strict";let t=(0,e.i(874822).default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,t],960198)},909042,e=>{"use strict";let t=(0,e.i(874822).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["default",0,t])},82100,e=>{"use strict";var t=e.i(523829),r=e.i(178328);let a=(0,r.createContext)(null);e.s(["ThemeCustomizerProvider",0,function({children:e}){let[n,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)("default"),[s,d]=(0,r.useState)("sidebar"),[u,c]=(0,r.useState)("radius-default"),[p,m]=(0,r.useState)("bg-default"),[f,h]=(0,r.useState)("panel-default"),[g,y]=(0,r.useState)("panel-default"),[v,b]=(0,r.useState)("card");return(0,r.useEffect)(()=>{o(!0);let e=localStorage.getItem("app-theme"),t=localStorage.getItem("app-layout"),r=localStorage.getItem("app-radius"),a=localStorage.getItem("app-background"),n=localStorage.getItem("app-panel-bg"),i=localStorage.getItem("app-nav-bg"),s=localStorage.getItem("app-pagestyle");e&&l(e),t&&d(t),r&&c(r),a&&m(a),n&&h(n),i&&y(i),s&&b(s)},[]),(0,r.useEffect)(()=>{if(!n)return;localStorage.setItem("app-theme",i),localStorage.setItem("app-layout",s),localStorage.setItem("app-radius",u),localStorage.setItem("app-background",p),localStorage.setItem("app-panel-bg",f),localStorage.setItem("app-nav-bg",g),localStorage.setItem("app-pagestyle",v);let e=document.body;Array.from(e.classList).forEach(t=>{(t.startsWith("theme-")||t.startsWith("radius-")||t.startsWith("bg-"))&&e.classList.remove(t)}),"default"!==i&&e.classList.add(i),"radius-default"!==u&&e.classList.add(u),p&&e.classList.add(p)},[i,s,u,p,f,g,v,n]),(0,t.jsx)(a.Provider,{value:{theme:i,setTheme:l,layout:s,setLayout:d,radius:u,setRadius:c,background:p,setBackground:m,panelBg:f,setPanelBg:h,navBg:g,setNavBg:y,pageStyle:v,setPageStyle:b,isMounted:n},children:e})},"useThemeCustomizer",0,function(){let e=(0,r.useContext)(a);if(!e)throw Error("useThemeCustomizer must be used within a ThemeCustomizerProvider");return e}])},37126,463861,874560,e=>{"use strict";let t=(0,e.i(874822).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["default",0,t],463861),e.s(["Server",0,t],37126);var r=e.i(523829),a=e.i(178328),n=e.i(746632),o=e.i(501706),i=e.i(466691),l=e.i(282879),s=e.i(924911),d=e.i(925466),u=e.i(624529);e.s(["ServerFormDialog",0,function({mode:e,target:t,open:c,onOpenChange:p}){let{createServer:m,renameServer:f}=(0,u.useWorkspace)(),[h,g]=(0,a.useState)(""),[y,v]=(0,a.useState)(!1);async function b(){let r=h.trim();if(!r)return void n.toast.error("Enter a project name.");v(!0);try{if("create"===e){let e=await m(r);e&&n.toast.success(`Created "${e.name}" and switched to it.`)}else t&&(await f(t.id,r),n.toast.success("Project renamed."));p(!1)}catch{n.toast.error("Something went wrong. Try again.")}finally{v(!1)}}return(0,a.useEffect)(()=>{c&&g("rename"===e?t?.name??"":"")},[c,e,t]),(0,r.jsx)(l.Dialog,{open:c,onOpenChange:p,children:(0,r.jsxs)(l.DialogContent,{className:"sm:max-w-md",children:[(0,r.jsxs)(l.DialogHeader,{children:[(0,r.jsx)(l.DialogTitle,{children:"create"===e?"New project":"Rename project"}),(0,r.jsx)(l.DialogDescription,{children:"create"===e?"Each project is an isolated environment with its own documents, index, and settings.":"Give this project a clearer name."})]}),(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsx)(d.Label,{htmlFor:"server-name",children:"Project name"}),(0,r.jsx)(s.Input,{id:"server-name",value:h,autoFocus:!0,placeholder:"e.g. docs-assistant",onChange:e=>g(e.target.value),onKeyDown:e=>{"Enter"===e.key&&b()}})]}),(0,r.jsxs)(l.DialogFooter,{children:[(0,r.jsx)(i.Button,{variant:"outline",onClick:()=>p(!1),disabled:y,children:"Cancel"}),(0,r.jsxs)(i.Button,{onClick:()=>void b(),disabled:y,children:[y&&(0,r.jsx)(o.Loader2,{className:"size-4 animate-spin"}),"create"===e?"Create project":"Save"]})]})]})})}],874560)},714809,e=>{"use strict";let t=(0,e.i(874822).default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);e.s(["Layers",0,t],714809)},682458,161351,e=>{"use strict";let t=[{id:"openai/text-embedding-3-small",label:"text-embedding-3-small",provider:"openai",dimensions:1536,maxInputTokens:8191,description:"Fast, cheap, strong general-purpose default."},{id:"openai/text-embedding-3-large",label:"text-embedding-3-large",provider:"openai",dimensions:3072,maxInputTokens:8191,description:"Highest quality OpenAI embeddings, larger vectors."},{id:"openai/text-embedding-ada-002",label:"text-embedding-ada-002",provider:"openai",dimensions:1536,maxInputTokens:8191,description:"Legacy model — kept for backward compatibility."},{id:"google/gemini-embedding-001",label:"gemini-embedding-001",provider:"google",dimensions:768,maxInputTokens:2048,description:"Gemini embedding 001."},{id:"cohere/embed-english-v3.0",label:"embed-english-v3.0",provider:"cohere",dimensions:1024,maxInputTokens:512,description:"Tuned for retrieval; great for English-heavy corpora."},{id:"cohere/embed-multilingual-v3.0",label:"embed-multilingual-v3.0",provider:"cohere",dimensions:1024,maxInputTokens:512,description:"100+ language multilingual retrieval embeddings."},{id:"voyage/voyage-3",label:"voyage-3",provider:"voyage",dimensions:1024,maxInputTokens:32e3,description:"Voyage's best general-purpose retrieval model."},{id:"voyage/voyage-3-lite",label:"voyage-3-lite",provider:"voyage",dimensions:512,maxInputTokens:32e3,description:"Optimized for latency and cost with strong performance."},{id:"voyage/voyage-code-3",label:"voyage-code-3",provider:"voyage",dimensions:1024,maxInputTokens:32e3,description:"Specialized for code retrieval tasks."},{id:"mistral/mistral-embed",label:"mistral-embed",provider:"mistral",dimensions:1024,maxInputTokens:8192,description:"Mistral's efficient embedding model for retrieval."},{id:"jina/jina-embeddings-v3",label:"jina-embeddings-v3",provider:"jina",dimensions:1024,maxInputTokens:8192,description:"Multilingual, task-specific embeddings from Jina AI."},{id:"jina/jina-clip-v2",label:"jina-clip-v2",provider:"jina",dimensions:1024,maxInputTokens:8192,description:"Multimodal embeddings for text and images."},{id:"nomic/nomic-embed-text-v1.5",label:"nomic-embed-text-v1.5",provider:"nomic",dimensions:768,maxInputTokens:8192,description:"Open-source, highly capable text embeddings."}];e.s(["EMBEDDING_DIMENSIONS",0,{"openai/text-embedding-3-small":{dimensions:1536,maxInputTokens:8191},"openai/text-embedding-3-large":{dimensions:3072,maxInputTokens:8191},"openai/text-embedding-ada-002":{dimensions:1536,maxInputTokens:8191},"google/gemini-embedding-2":{dimensions:768,maxInputTokens:2048},"google/gemini-embedding-001":{dimensions:768,maxInputTokens:2048},"cohere/embed-english-v3.0":{dimensions:1024,maxInputTokens:512},"cohere/embed-multilingual-v3.0":{dimensions:1024,maxInputTokens:512},"voyage/voyage-3":{dimensions:1024,maxInputTokens:32e3},"voyage/voyage-3-lite":{dimensions:512,maxInputTokens:32e3},"voyage/voyage-code-3":{dimensions:1024,maxInputTokens:32e3},"mistral/mistral-embed":{dimensions:1024,maxInputTokens:8192},"jina/jina-embeddings-v3":{dimensions:1024,maxInputTokens:8192},"jina/jina-clip-v2":{dimensions:1024,maxInputTokens:8192},"nomic/nomic-embed-text-v1.5":{dimensions:768,maxInputTokens:8192}},"EMBEDDING_MODELS",0,t,"getEmbeddingModel",0,function(e){return t.find(t=>t.id===e)}],682458);let r={lancedb:{id:"lancedb",label:"LanceDB",description:"Embedded vector database for local development, LanceDB Cloud, or persistent S3-compatible storage such as Cloudflare R2.",runtime:"both",installStatus:"installed",docsUrl:"https://lancedb.github.io/lancedb/",serverDependencies:{"@lancedb/lancedb":"^0.30.0"},fields:[{key:"mode",label:"Mode",type:"select",required:!0,defaultValue:"local",help:"Use a local disk, LanceDB Cloud, or an S3-compatible bucket for persistent serverless deployments.",options:[{label:"Local (on-disk)",value:"local"},{label:"S3-compatible (Vercel / R2 / S3)",value:"s3"},{label:"Cloud",value:"cloud"}]},{key:"dbPath",label:"Database path",type:"path",required:!0,defaultValue:"./.larkup/lancedb",placeholder:"./.larkup/lancedb",help:"Directory where the LanceDB tables are stored.",showWhen:{key:"mode",equals:["local"]}},{key:"s3Uri",label:"Database URI",type:"text",required:!0,placeholder:"s3://my-bucket/larkup/my-server",help:"A dedicated, private bucket prefix for LanceDB table files. This is persistent across Vercel invocations.",showWhen:{key:"mode",equals:["s3"]}},{key:"s3Endpoint",label:"S3 endpoint",type:"text",required:!1,placeholder:"https://<account-id>.r2.cloudflarestorage.com",help:"Required for Cloudflare R2 and other S3-compatible providers. Leave blank for AWS S3.",showWhen:{key:"mode",equals:["s3"]}},{key:"s3Region",label:"Region",type:"text",required:!0,defaultValue:"auto",placeholder:"auto",help:"Use “auto” for Cloudflare R2, or your bucket region for AWS S3.",showWhen:{key:"mode",equals:["s3"]}},{key:"s3AccessKeyId",label:"Access key ID",type:"password",required:!0,secret:!0,help:"Use an object read/write credential restricted to this bucket.",showWhen:{key:"mode",equals:["s3"]}},{key:"s3SecretAccessKey",label:"Secret access key",type:"password",required:!0,secret:!0,help:"Stored as a deployment environment variable; never expose it in the browser.",showWhen:{key:"mode",equals:["s3"]}},{key:"uri",label:"Cloud URI",type:"text",required:!0,placeholder:"db://my-database",help:"Your LanceDB Cloud database URI.",showWhen:{key:"mode",equals:["cloud"]}},{key:"apiKey",label:"API key",type:"password",required:!0,secret:!0,placeholder:"sk_...",help:"LanceDB Cloud API key. Stored as an env var in the generated server.",showWhen:{key:"mode",equals:["cloud"]}},{key:"tableName",label:"Table name",type:"text",required:!0,defaultValue:"documents",help:"The table that holds your embedded chunks."}]},pinecone:{id:"pinecone",label:"Pinecone",description:"Fully-managed cloud vector database. Cloud-only — requires an API key and an existing index.",runtime:"cloud",installStatus:"installed",docsUrl:"https://docs.pinecone.io/",serverDependencies:{"@pinecone-database/pinecone":"^6.0.0"},fields:[{key:"apiKey",label:"API key",type:"password",required:!0,secret:!0,placeholder:"pcsk_...",help:"Pinecone API key. Stored as an env var in the generated server."},{key:"indexName",label:"Index name",type:"text",required:!0,placeholder:"rag-index",help:"Name of the Pinecone index to upsert into / query. For hybrid/lexical mode this index must use the 'dotproduct' metric."},{key:"namespace",label:"Namespace",type:"text",required:!1,placeholder:"default",help:"Optional namespace to isolate this dataset within the index."},{key:"sparseModel",label:"Sparse model",type:"text",required:!0,defaultValue:"pinecone-sparse-english-v0",help:"Pinecone-hosted sparse model used to generate keyword vectors via the Inference API. Both dense and sparse vectors are stored in the same index.",showWhenIndexType:["lexical","hybrid"]}]},weaviate:{id:"weaviate",label:"Weaviate",description:"Open-source AI-native vector database with built-in hybrid search, BM25, and multi-tenancy.",runtime:"both",installStatus:"coming-soon",docsUrl:"https://weaviate.io/developers/weaviate",serverDependencies:{weaviate:"^3.0.0"},fields:[{key:"host",label:"Host URL",type:"text",required:!0,placeholder:"https://my-cluster.weaviate.network",help:"Weaviate Cloud URL or self-hosted host address."},{key:"apiKey",label:"API key",type:"password",required:!1,secret:!0,placeholder:"weaviate-api-key",help:"Weaviate Cloud API key (optional for self-hosted)."},{key:"className",label:"Collection name",type:"text",required:!0,defaultValue:"Documents",help:"The Weaviate collection (class) that holds your embedded chunks."}]},qdrant:{id:"qdrant",label:"Qdrant",description:"High-performance vector search engine with rich filtering, built for production-scale RAG.",runtime:"both",installStatus:"coming-soon",docsUrl:"https://qdrant.tech/documentation/",serverDependencies:{"@qdrant/js-client-rest":"^1.9.0"},fields:[{key:"url",label:"Host URL",type:"text",required:!0,placeholder:"http://localhost:6333",help:"Qdrant server URL (local or Qdrant Cloud endpoint)."},{key:"apiKey",label:"API key",type:"password",required:!1,secret:!0,placeholder:"qdrant-api-key",help:"Qdrant Cloud API key (leave blank for local)."},{key:"collectionName",label:"Collection name",type:"text",required:!0,defaultValue:"documents",help:"Qdrant collection to upsert into and query."}]},chroma:{id:"chroma",label:"Chroma",description:"Open-source, developer-friendly embedding database. Great for rapid local prototyping.",runtime:"both",installStatus:"installable",docsUrl:"https://docs.trychroma.com/",serverDependencies:{chromadb:"^1.9.0"},fields:[{key:"mode",label:"Mode",type:"select",required:!0,defaultValue:"server",help:"Server connects to a self-hosted Chroma instance. Cloud connects to Chroma Cloud.",options:[{label:"Server (Self-hosted)",value:"server"},{label:"Cloud (Chroma Cloud)",value:"cloud"}]},{key:"host",label:"Server URL",type:"text",required:!0,placeholder:"http://localhost:8000",defaultValue:"http://localhost:8000",help:"Chroma server URL (local Docker or remote).",showWhen:{key:"mode",equals:["server"]}},{key:"authToken",label:"Auth Token",type:"password",required:!1,secret:!0,placeholder:"chroma-token",help:"Optional static auth token for Chroma server.",showWhen:{key:"mode",equals:["server"]}},{key:"apiKey",label:"API Key",type:"password",required:!0,secret:!0,placeholder:"sk_...",help:"Chroma Cloud API Key.",showWhen:{key:"mode",equals:["cloud"]}},{key:"tenant",label:"Tenant",type:"text",required:!0,defaultValue:"default_tenant",help:"Tenant name for Chroma Cloud.",showWhen:{key:"mode",equals:["cloud"]}},{key:"database",label:"Database",type:"text",required:!0,defaultValue:"default_database",help:"Database name for Chroma Cloud.",showWhen:{key:"mode",equals:["cloud"]}},{key:"collectionName",label:"Collection name",type:"text",required:!0,defaultValue:"documents",help:"Chroma collection to store and retrieve embeddings."}]},pgvector:{id:"pgvector",label:"pgvector",description:"PostgreSQL extension for vector similarity search. Self-host vectors alongside your relational data.",runtime:"both",installStatus:"coming-soon",docsUrl:"https://github.com/pgvector/pgvector",serverDependencies:{pg:"^8.11.0",pgvector:"^0.2.0"},fields:[{key:"connectionString",label:"Connection string",type:"password",required:!0,secret:!0,placeholder:"postgresql://user:pass@localhost:5432/db",help:"Full PostgreSQL connection string."},{key:"tableName",label:"Table name",type:"text",required:!0,defaultValue:"embeddings",help:"The table used to store vector embeddings. Created automatically if absent."}]},supabase:{id:"supabase",label:"Supabase",description:"Postgres-backed vector store via the pgvector extension with Supabase's managed infrastructure.",runtime:"cloud",installStatus:"coming-soon",docsUrl:"https://supabase.com/docs/guides/ai",serverDependencies:{"@supabase/supabase-js":"^2.43.0"},fields:[{key:"url",label:"Project URL",type:"text",required:!0,placeholder:"https://xyz.supabase.co",help:"Your Supabase project URL."},{key:"serviceKey",label:"Service role key",type:"password",required:!0,secret:!0,placeholder:"eyJhbGci...",help:"Supabase service_role key (not the anon key). Stored as an env var."},{key:"tableName",label:"Table name",type:"text",required:!0,defaultValue:"documents",help:"Supabase table with a vector column for embeddings."}]}},a=Object.values(r);function n(e,t,r){return e.fields.filter(e=>{if(e.showWhen){let r=t[e.showWhen.key]??"";if(!e.showWhen.equals.includes(r))return!1}return!e.showWhenIndexType||!r||!!e.showWhenIndexType.includes(r)})}e.s(["VECTOR_STORE_LIST",0,a,"getVectorStore",0,function(e){return r[e]},"validateStoreConfig",0,function(e,t,r){let a={};for(let o of n(e,t,r))o.required&&!t[o.key]?.trim()&&(a[o.key]=`${o.label} is required`);return a},"visibleFields",0,n],161351)},592601,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let a=e.r(178328);function n(e,t){let r=(0,a.useRef)(null),n=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=o(e,a)),t&&(n.current=o(t,a))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},866657,e=>{"use strict";var t=e.i(978038);e.s(["AlertTriangle",()=>t.default])},861947,e=>{"use strict";var t,r=e.i(523829);e.s([],79988),e.i(79988),e.i(199910);var a=e.i(178328),n=e.i(914554),o=e.i(722348),i=e.i(111608),l=e.i(782486),s=e.i(200622);let d=a.createContext(void 0);function u(){let e=a.useContext(d);if(void 0===e)throw Error((0,s.default)(51));return e}let c=((t={}).complete="data-complete",t.indeterminate="data-indeterminate",t.progressing="data-progressing",t),p={status:e=>"progressing"===e?{[c.progressing]:""}:"complete"===e?{[c.complete]:""}:"indeterminate"===e?{[c.indeterminate]:""}:null};function m(e,t){return null==t?"indeterminate progress":e||`${t}%`}let f=a.forwardRef(function(e,t){let{format:s,getAriaValueText:u=m,locale:c,max:f=100,min:h=0,value:g,render:y,className:v,children:b,style:x,...k}=e,[w,S]=a.useState(),I=(0,n.useValueAsRef)(s),j="indeterminate";Number.isFinite(g)&&(j=g===f?"complete":"progressing");let T=(0,i.formatNumberValue)(g,c,I.current),C=a.useMemo(()=>({status:j}),[j]),P={"aria-labelledby":w,"aria-valuemax":f,"aria-valuemin":h,"aria-valuenow":g??void 0,"aria-valuetext":u(T,g),role:"progressbar",children:(0,r.jsxs)(a.Fragment,{children:[b,(0,r.jsx)("span",{role:"presentation",style:o.visuallyHidden,children:"x"})]})},q=a.useMemo(()=>({formattedValue:T,max:f,min:h,setLabelId:S,state:C,status:j,value:g}),[T,f,h,S,C,j,g]),E=(0,l.useRenderElement)("div",e,{state:C,ref:t,props:[P,k],stateAttributesMapping:p});return(0,r.jsx)(d.Provider,{value:q,children:E})}),h=a.forwardRef(function(e,t){let{render:r,className:a,style:n,...o}=e,{state:i}=u();return(0,l.useRenderElement)("div",e,{state:i,ref:t,props:o,stateAttributesMapping:p})});var g=e.i(401082);let y=a.forwardRef(function(e,t){let{render:r,className:a,style:n,...o}=e,{max:i,min:s,value:d,state:c}=u(),m=Number.isFinite(d)&&null!==d?(0,g.valueToPercent)(d,s,i):null,f=null==m?{}:{insetInlineStart:0,height:"inherit",width:`${m}%`};return(0,l.useRenderElement)("div",e,{state:c,ref:t,props:[{style:f},o],stateAttributesMapping:p})}),v=a.forwardRef(function(e,t){let{className:r,render:a,children:n,style:o,...i}=e,{value:s,formattedValue:d,state:c}=u(),m=null==s?"indeterminate":d,f=null==s?null:d;return(0,l.useRenderElement)("span",e,{state:c,ref:t,props:[{"aria-hidden":!0,children:"function"==typeof n?n(m,s):f},i],stateAttributesMapping:p})});var b=e.i(322627);let x=a.forwardRef(function(e,t){let{render:r,className:a,style:n,id:o,...i}=e,{setLabelId:s,state:d}=u(),c=(0,b.useRegisteredLabelId)(o,s);return(0,l.useRenderElement)("span",e,{state:d,ref:t,props:[{id:c,role:"presentation"},i],stateAttributesMapping:p})});e.s(["Indicator",0,y,"Label",0,x,"Root",0,f,"Track",0,h,"Value",0,v],208452);var k=e.i(208452),k=k,w=e.i(152236);function S({className:e,...t}){return(0,r.jsx)(k.Track,{className:(0,w.cn)("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",e),"data-slot":"progress-track",...t})}function I({className:e,...t}){return(0,r.jsx)(k.Indicator,{"data-slot":"progress-indicator",className:(0,w.cn)("h-full bg-primary transition-all",e),...t})}e.s(["Progress",0,function({className:e,children:t,value:a,...n}){return(0,r.jsxs)(k.Root,{value:a,"data-slot":"progress",className:(0,w.cn)("flex flex-wrap gap-3",e),...n,children:[t,(0,r.jsx)(S,{children:(0,r.jsx)(I,{})})]})}],861947)},323621,e=>{"use strict";var t=e.i(300441),r=e.i(782486),a=e.i(294237),n=e.i(152236);let o=(0,a.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:ring-[3px] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:a="default",render:i,...l}){var s;return s={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,n.cn)(o({variant:a}),e)},l),render:i,state:{slot:"badge",variant:a}},(0,r.useRenderElement)(s.defaultTagName??"div",s,s)}],323621)},524365,e=>{"use strict";var t=e.i(523829),r=e.i(294237),a=e.i(152236);let n=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...o}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,a.cn)(n({variant:r}),e),...o})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,a.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})},"AlertTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-title",className:(0,a.cn)("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",e),...r})}])},534792,e=>{"use strict";var t=e.i(523829),r=e.i(152236);e.s(["Skeleton",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"skeleton",className:(0,r.cn)("animate-pulse rounded-md bg-muted",e),...a})}])},951482,e=>{"use strict";let t=(0,e.i(874822).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",0,t])},195300,e=>{"use strict";let t=(0,e.i(874822).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",0,t])},894180,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return l},formatWithValidation:function(){return d},urlObjectKeys:function(){return s}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let o=e.r(744066)._(e.r(505716)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,a=e.protocol||"",n=e.pathname||"",l=e.hash||"",s=e.query||"",d=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?d=t+e.host:r&&(d=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(d+=":"+e.port)),s&&"object"==typeof s&&(s=String(o.urlQueryToSearchParams(s)));let u=e.search||s&&`?${s}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||i.test(a))&&!1!==d?(d="//"+(d||""),n&&"/"!==n[0]&&(n="/"+n)):d||(d=""),l&&"#"!==l[0]&&(l="#"+l),u&&"?"!==u[0]&&(u="?"+u),n=n.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${a}${d}${n}${u}${l}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return l(e)}},1808,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let a=e.r(584345),n=e.r(653313);function o(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},330446,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},334347,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return y},useLinkStatus:function(){return b}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let o=e.r(744066),i=e.r(523829),l=o._(e.r(178328)),s=e.r(894180),d=e.r(46640),u=e.r(592601),c=e.r(584345),p=e.r(455649);e.r(155369);let m=e.r(644047),f=e.r(969009),h=e.r(1808),g=e.r(341286);function y(t){var r,a;let n,o,y,[b,x]=(0,l.useOptimistic)(f.IDLE_LINK_STATUS),k=(0,l.useRef)(null),{href:w,as:S,children:I,prefetch:j=null,passHref:T,replace:C,shallow:P,scroll:q,onClick:E,onMouseEnter:R,onTouchStart:_,legacyBehavior:A=!1,onNavigate:L,transitionTypes:N,ref:O,unstable_dynamicOnHover:D,...M}=t;n=I,A&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let U=l.default.useContext(d.AppRouterContext),W=!1!==j,V=!1!==j?null===(a=j)||"auto"===a?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,B="string"==typeof(r=S||w)?r:(0,s.formatUrl)(r);if(A){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=l.default.Children.only(n)}let z=A?o&&"object"==typeof o&&o.ref:O,F=l.default.useCallback(e=>(null!==U&&(k.current=(0,f.mountLinkInstance)(e,B,U,V,W,x)),()=>{k.current&&((0,f.unmountLinkForCurrentNavigation)(k.current),k.current=null),(0,f.unmountPrefetchableInstance)(e)}),[W,B,U,V,x]),$={ref:(0,u.useMergedRef)(F,z),onClick(t){A||"function"!=typeof E||E(t),A&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!U||t.defaultPrevented||function(t,r,a,n,o,i,s){if("u">typeof window){let d,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((d=t.currentTarget.getAttribute("target"))&&"_self"!==d||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:c}=e.r(365730);l.default.startTransition(()=>{c(r,n?"replace":"push",!1===o?m.ScrollBehavior.NoScroll:m.ScrollBehavior.Default,a.current,s)})}}(t,B,k,C,q,L,N)},onMouseEnter(e){A||"function"!=typeof R||R(e),A&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),U&&W&&(0,f.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){A||"function"!=typeof _||_(e),A&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),U&&W&&(0,f.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,c.isAbsoluteUrl)(B)?$.href=B:A&&!T&&("a"!==o.type||"href"in o.props)||($.href=(0,p.addBasePath)(B)),y=A?l.default.cloneElement(o,$):(0,i.jsx)("a",{...M,...$,children:n}),(0,i.jsx)(v.Provider,{value:b,children:y})}e.r(330446);let v=(0,l.createContext)(f.IDLE_LINK_STATUS),b=()=>(0,l.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},743118,e=>{"use strict";var t=e.i(951482);e.s(["Info",()=>t.default])},963347,e=>{e.v(t=>Promise.all(["static/chunks/0le9w0u20k38o.js"].map(t=>e.l(t))).then(()=>t(405299)))},995308,e=>{e.v(t=>Promise.all(["static/chunks/0tckbq8d00xpw.js"].map(t=>e.l(t))).then(()=>t(44438)))}]);
|