@exulu/frontend 1.9.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.next/BUILD_ID +1 -1
- package/dist/.next/app-build-manifest.json +191 -188
- package/dist/.next/app-path-routes-manifest.json +1 -1
- package/dist/.next/build-manifest.json +2 -2
- package/dist/.next/prerender-manifest.json +1 -1
- package/dist/.next/server/app/(application)/agents/edit/[id]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/agents/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/chat/[agent]/[session]/page.js +7 -7
- package/dist/.next/server/app/(application)/chat/[agent]/[session]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/chat/[agent]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/chat/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/configuration/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/dashboard/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/data/[[...query]]/page.js +3 -3
- package/dist/.next/server/app/(application)/data/[[...query]]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/evals/[id]/page.js +1 -1
- package/dist/.next/server/app/(application)/evals/[id]/page.js.nft.json +1 -1
- package/dist/.next/server/app/(application)/evals/[id]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/evals/cases/page.js +1 -1
- package/dist/.next/server/app/(application)/evals/cases/page.js.nft.json +1 -1
- package/dist/.next/server/app/(application)/evals/cases/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/evals/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/explorer/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/keys/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/projects/[project]/page.js +1 -1
- package/dist/.next/server/app/(application)/projects/[project]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/projects/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/prompts/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/roles/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/token/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/users/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/variables/create/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/variables/edit/[variable_id]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/variables/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/variables/usage/[variable_id]/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(application)/workflows/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/(authentication)/login/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found.html +1 -1
- package/dist/.next/server/app/_not-found.rsc +1 -1
- package/dist/.next/server/app-paths-manifest.json +7 -7
- package/dist/.next/server/chunks/2270.js +154 -130
- package/dist/.next/server/chunks/{5084.js → 2587.js} +1 -1
- package/dist/.next/server/chunks/3503.js +1 -1
- package/dist/.next/server/chunks/5485.js +1 -1
- package/dist/.next/server/chunks/5974.js +1 -1
- package/dist/.next/server/chunks/7944.js +1 -1
- package/dist/.next/server/chunks/8286.js +1 -1
- package/dist/.next/server/middleware-manifest.json +5 -5
- package/dist/.next/server/pages/404.html +1 -1
- package/dist/.next/server/pages/500.html +1 -1
- package/dist/.next/server/server-reference-manifest.json +1 -1
- package/dist/.next/static/chunks/1707-06e693c4a709c147.js +2 -0
- package/dist/.next/static/chunks/1707-06e693c4a709c147.js.map +1 -0
- package/dist/.next/static/chunks/{1957-cf44b1d31a9c7d5c.js → 1957-34f17de1e14e45de.js} +1 -1
- package/dist/.next/static/chunks/{1957-cf44b1d31a9c7d5c.js.map → 1957-34f17de1e14e45de.js.map} +1 -1
- package/dist/.next/static/chunks/{2293-48a95904b834eccc.js → 2293-592e22dde70d632b.js} +1 -1
- package/dist/.next/static/chunks/{2293-48a95904b834eccc.js.map → 2293-592e22dde70d632b.js.map} +1 -1
- package/dist/.next/static/chunks/2534-3dd7a9fabfbdb9d8.js +2 -0
- package/dist/.next/static/chunks/2534-3dd7a9fabfbdb9d8.js.map +1 -0
- package/dist/.next/static/chunks/2823-324b1cd8f15ff9c5.js +2 -0
- package/dist/.next/static/chunks/2823-324b1cd8f15ff9c5.js.map +1 -0
- package/dist/.next/static/chunks/3246-1812de142455a0ac.js +2 -0
- package/dist/.next/static/chunks/3246-1812de142455a0ac.js.map +1 -0
- package/dist/.next/static/chunks/3750-d0ae5d73288be8de.js +2 -0
- package/dist/.next/static/chunks/3750-d0ae5d73288be8de.js.map +1 -0
- package/dist/.next/static/chunks/{3832-417a5eeee712a793.js → 3832-0b8edbcc671f4cc0.js} +2 -2
- package/dist/.next/static/chunks/3832-0b8edbcc671f4cc0.js.map +1 -0
- package/dist/.next/static/chunks/{4386-45b79e656a244d8a.js → 4386-21ac377a719ebdfa.js} +1 -1
- package/dist/.next/static/chunks/{4386-45b79e656a244d8a.js.map → 4386-21ac377a719ebdfa.js.map} +1 -1
- package/dist/.next/static/chunks/4612-da512770f949561a.js +2 -0
- package/dist/.next/static/chunks/4612-da512770f949561a.js.map +1 -0
- package/dist/.next/static/chunks/{5825-efd4db1da512bd7f.js → 4760-d5ceb992b68e35ca.js} +2 -2
- package/dist/.next/static/chunks/4760-d5ceb992b68e35ca.js.map +1 -0
- package/dist/.next/static/chunks/{6367-59655a85d75e19be.js → 6367-aa5020cbea5354e2.js} +1 -1
- package/dist/.next/static/chunks/{6367-59655a85d75e19be.js.map → 6367-aa5020cbea5354e2.js.map} +1 -1
- package/dist/.next/static/chunks/6373-3eee0b6c8b8fd459.js +2 -0
- package/dist/.next/static/chunks/6373-3eee0b6c8b8fd459.js.map +1 -0
- package/dist/.next/static/chunks/{8030-9c926ea4dfd3a54e.js → 8030-5d38a3f1a4ad44cb.js} +1 -1
- package/dist/.next/static/chunks/{8030-9c926ea4dfd3a54e.js.map → 8030-5d38a3f1a4ad44cb.js.map} +1 -1
- package/dist/.next/static/chunks/{8293-0e69d89d2dac7111.js → 8293-ba5cd36594e6fde1.js} +3 -3
- package/dist/.next/static/chunks/8293-ba5cd36594e6fde1.js.map +1 -0
- package/dist/.next/static/chunks/9105-143f12397a76a332.js +2 -0
- package/dist/.next/static/chunks/9105-143f12397a76a332.js.map +1 -0
- package/dist/.next/static/chunks/9877-378934ae38c6760c.js +2 -0
- package/dist/.next/static/chunks/9877-378934ae38c6760c.js.map +1 -0
- package/dist/.next/static/chunks/{9953-95900a236271a222.js → 9953-02d5b52553a5c573.js} +2 -2
- package/dist/.next/static/chunks/{9953-95900a236271a222.js.map → 9953-02d5b52553a5c573.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/agents/edit/[id]/{page-e4a4693953329671.js → page-37918149a8e909b0.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/agents/edit/[id]/{page-e4a4693953329671.js.map → page-37918149a8e909b0.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/agents/{page-b77c21a993c55901.js → page-9cff3b35b042d46a.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/agents/{page-b77c21a993c55901.js.map → page-9cff3b35b042d46a.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-53a99d8df53380c7.js +2 -0
- package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-53a99d8df53380c7.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/chat/{layout-093baa26f89338bc.js → layout-ba702af6bb56baa2.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/chat/{layout-093baa26f89338bc.js.map → layout-ba702af6bb56baa2.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/chat/{page-8a1fcfb68cf9c8c0.js → page-8b00a98d285829b1.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/chat/{page-8a1fcfb68cf9c8c0.js.map → page-8b00a98d285829b1.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/configuration/{page-f315ede6d66922e6.js → page-1e978e117d5086a1.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/configuration/{page-f315ede6d66922e6.js.map → page-1e978e117d5086a1.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/dashboard/{page-4a1956febf5235b6.js → page-c54b4bc8d0ac4ac8.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/dashboard/{page-4a1956febf5235b6.js.map → page-c54b4bc8d0ac4ac8.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-dfdb5c1cdc7ddefc.js +2 -0
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-dfdb5c1cdc7ddefc.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-faaee5fe82b45966.js +2 -0
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-faaee5fe82b45966.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/evals/[id]/{page-a7728cf9b0524489.js → page-c956d9892676aa4f.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/evals/[id]/page-c956d9892676aa4f.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/evals/cases/page-6b4dde82376e9aac.js +2 -0
- package/dist/.next/static/chunks/app/(application)/evals/cases/page-6b4dde82376e9aac.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/evals/{page-8b38d8d29f275704.js → page-944bfc4f0a001e4c.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/evals/page-944bfc4f0a001e4c.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/explorer/page-07d67145bb176711.js +2 -0
- package/dist/.next/static/chunks/app/(application)/explorer/page-07d67145bb176711.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/keys/{page-afe59c91cc347208.js → page-6c0cd9ef20cd1461.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/keys/{page-afe59c91cc347208.js.map → page-6c0cd9ef20cd1461.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/projects/[project]/{page-f04fd5291a1ef7b1.js → page-5e2be54e76b8509c.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/projects/[project]/{page-f04fd5291a1ef7b1.js.map → page-5e2be54e76b8509c.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/projects/{layout-a8e1830ef3faafb9.js → layout-f2e0f42a08c96bb8.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/projects/{layout-a8e1830ef3faafb9.js.map → layout-f2e0f42a08c96bb8.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/prompts/{page-2c500e9898447506.js → page-2c03bbe32800acc3.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/prompts/{page-2c500e9898447506.js.map → page-2c03bbe32800acc3.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/roles/{page-873911198c17d9a7.js → page-b977b5c658004717.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/roles/{page-873911198c17d9a7.js.map → page-b977b5c658004717.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/token/{page-3f74f711f3d04fce.js → page-08596ece49a811b9.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/token/page-08596ece49a811b9.js.map +1 -0
- package/dist/.next/static/chunks/app/(application)/users/{page-0d7f0d7e80cd1436.js → page-49212081be40aeca.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/users/{page-0d7f0d7e80cd1436.js.map → page-49212081be40aeca.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/variables/create/{page-8ebf4e3d4d17443b.js → page-9ce762918374f616.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/variables/create/{page-8ebf4e3d4d17443b.js.map → page-9ce762918374f616.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/variables/edit/[variable_id]/{page-006145e82e054e72.js → page-0e2b7038546d9f7a.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/variables/edit/[variable_id]/{page-006145e82e054e72.js.map → page-0e2b7038546d9f7a.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/variables/{page-51a8aeece444d388.js → page-141d5d3f735454fe.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/variables/{page-51a8aeece444d388.js.map → page-141d5d3f735454fe.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/variables/usage/[variable_id]/{page-8f5cfc9565fd919a.js → page-fb1bb3ea6f7cae47.js} +1 -1
- package/dist/.next/static/chunks/app/(application)/variables/usage/[variable_id]/{page-8f5cfc9565fd919a.js.map → page-fb1bb3ea6f7cae47.js.map} +1 -1
- package/dist/.next/static/chunks/app/(application)/workflows/{page-e38f9456120dab69.js → page-2b839fdbc55c297b.js} +2 -2
- package/dist/.next/static/chunks/app/(application)/workflows/page-2b839fdbc55c297b.js.map +1 -0
- package/dist/.next/static/chunks/ba12c10f-85ed008ce7746dbe.js +2 -0
- package/dist/.next/static/chunks/ba12c10f-85ed008ce7746dbe.js.map +1 -0
- package/dist/.next/static/css/0f539b50cca35462.css +4 -0
- package/dist/.next/static/css/0f539b50cca35462.css.map +1 -0
- package/dist/.next/static/css/e3f2a16ab7676b05.css.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/dist/.next/static/chunks/1685-939396dad2f8f1e0.js +0 -2
- package/dist/.next/static/chunks/1685-939396dad2f8f1e0.js.map +0 -1
- package/dist/.next/static/chunks/3171-6996819b8863d41f.js +0 -2
- package/dist/.next/static/chunks/3171-6996819b8863d41f.js.map +0 -1
- package/dist/.next/static/chunks/3750-f45c59ef1cc79417.js +0 -2
- package/dist/.next/static/chunks/3750-f45c59ef1cc79417.js.map +0 -1
- package/dist/.next/static/chunks/3832-417a5eeee712a793.js.map +0 -1
- package/dist/.next/static/chunks/4419-b9be79d8cd46a97d.js +0 -2
- package/dist/.next/static/chunks/4419-b9be79d8cd46a97d.js.map +0 -1
- package/dist/.next/static/chunks/5110-098aa924c3108fa4.js +0 -2
- package/dist/.next/static/chunks/5110-098aa924c3108fa4.js.map +0 -1
- package/dist/.next/static/chunks/572-2940a399da1e3a3b.js +0 -2
- package/dist/.next/static/chunks/572-2940a399da1e3a3b.js.map +0 -1
- package/dist/.next/static/chunks/5825-efd4db1da512bd7f.js.map +0 -1
- package/dist/.next/static/chunks/6373-601400fab8a3bb55.js +0 -2
- package/dist/.next/static/chunks/6373-601400fab8a3bb55.js.map +0 -1
- package/dist/.next/static/chunks/8293-0e69d89d2dac7111.js.map +0 -1
- package/dist/.next/static/chunks/9105-dfbce1bad8e3e8dd.js +0 -2
- package/dist/.next/static/chunks/9105-dfbce1bad8e3e8dd.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-7edb1c7c850f982c.js +0 -2
- package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-7edb1c7c850f982c.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-2d47be0ee80dd89d.js +0 -2
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-2d47be0ee80dd89d.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-8d2b3995cacfd832.js +0 -2
- package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-8d2b3995cacfd832.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/evals/[id]/page-a7728cf9b0524489.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/evals/cases/page-827f50c6d1f150d0.js +0 -2
- package/dist/.next/static/chunks/app/(application)/evals/cases/page-827f50c6d1f150d0.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/evals/page-8b38d8d29f275704.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/explorer/page-1d676c9dfe3ed58b.js +0 -2
- package/dist/.next/static/chunks/app/(application)/explorer/page-1d676c9dfe3ed58b.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/token/page-3f74f711f3d04fce.js.map +0 -1
- package/dist/.next/static/chunks/app/(application)/workflows/page-e38f9456120dab69.js.map +0 -1
- package/dist/.next/static/chunks/ba12c10f-aaafcb074f608624.js +0 -2
- package/dist/.next/static/chunks/ba12c10f-aaafcb074f608624.js.map +0 -1
- package/dist/.next/static/css/6f8c5212af8ef284.css +0 -4
- package/dist/.next/static/css/6f8c5212af8ef284.css.map +0 -1
- /package/dist/.next/static/{ls-syPkq9-MWp-VWWDEZJ → exslB-IPXi_veOKFA4L1Z}/_buildManifest.js +0 -0
- /package/dist/.next/static/{ls-syPkq9-MWp-VWWDEZJ → exslB-IPXi_veOKFA4L1Z}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/chunks/app/(application)/token/page-08596ece49a811b9.js","mappings":"sFAAAA,QAAAC,OAAA,GAAAC,IAAA,CAAAC,EAAAC,IAAA,CAAAD,EAAA,6NCYe,SAASE,IACtB,GAAM,CAAEC,KAAMC,CAAO,CAAEC,OAAAA,CAAM,CAAE,CAAGC,CAAAA,EAAAA,EAAAA,UAAAA,IAC5B,CAACC,EAAOC,EAAS,CAAGC,CAAAA,EAAAA,EAAAA,QAAAA,EAAwB,MAC5C,CAACC,EAASC,EAAW,CAAGF,CAAAA,EAAAA,EAAAA,QAAAA,EAAS,IACjC,CAACG,EAAQC,EAAU,CAAGJ,CAAAA,EAAAA,EAAAA,QAAAA,EAAS,IAC/B,CAAEK,MAAAA,CAAK,CAAE,CAAGC,CAAAA,EAAAA,EAAAA,EAAAA,IAElBC,CAAAA,EAAAA,EAAAA,SAAAA,EAAU,KAcRC,CAbmB,UACjB,GAAIZ,kBAAAA,EACF,GAAI,CACF,IAAMa,EAAe,MAAMC,CAAAA,EAAAA,EAAAA,EAAAA,IAC3BX,EAASU,EACX,CAAE,MAAOE,EAAO,CACdC,QAAQD,KAAK,CAAC,uBAAwBA,GACtCZ,E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,EAAA,QAkBAyC,EAAAC,OAAA,mBAEA,SAAAC,EAAA1C,CAAA,EACA,IAAA2C,EAAA,EAAwB3G,SAAAA,CAAA,CAAU,GACP,GAAAuG,EAAAtO,GAAA,EAAIsO,EAAAxN,QAAS,EAAIiH,SAAAA,CAAA,GAI5C,OAFA2G,EAAAxL,WAAA,IAA8B6I,EAAU,YACxC2C,EAAAC,SAAA,CAAAJ,EACAG,CACA,CAEA,SAAAR,EAAAG,CAAA,EACA,OAASzC,EAAAQ,cAAoB,CAAAiC,IAAA,mBAAAA,EAAAlN,IAAA,gBAAAkN,EAAAlN,IAAA,EAAAkN,EAAAlN,IAAA,CAAAwN,SAAA,GAAAJ,CAC7B","sources":["webpack://_N_E/?06da","webpack://_N_E/./app/(application)/token/page.tsx","webpack://_N_E/./components/ui/badge.tsx","webpack://_N_E/./components/ui/button.tsx","webpack://_N_E/./components/ui/card.tsx","webpack://_N_E/./components/ui/input.tsx","webpack://_N_E/./components/ui/use-toast.ts","webpack://_N_E/./lib/utils.ts","webpack://_N_E/../../src/defaultAttributes.ts","webpack://_N_E/../../src/createLucideIcon.ts","webpack://_N_E/../../../src/icons/alert-circle.ts","webpack://_N_E/../../../src/icons/check-circle.ts","webpack://_N_E/../../../src/icons/copy.ts","webpack://_N_E/./util/api.ts","webpack://_N_E/./node_modules/@radix-ui/react-compose-refs/dist/index.mjs","webpack://_N_E/./node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["import(/* webpackMode: \"eager\" */ \"/home/runner/work/exulu-frontend/exulu-frontend/app/(application)/token/page.tsx\");\n","'use client'\n\nimport { useSession } from \"next-auth/react\"\nimport { useEffect, useState } from \"react\"\nimport { getToken } from \"@/util/api\"\nimport { Button } from \"@/components/ui/button\"\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\"\nimport { Input } from \"@/components/ui/input\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Copy, CheckCircle, AlertCircle } from \"lucide-react\"\nimport { useToast } from \"@/components/ui/use-toast\"\n\nexport default function TokenPage() {\n const { data: session, status } = useSession()\n const [token, setToken] = useState<string | null>(null)\n const [loading, setLoading] = useState(true)\n const [copied, setCopied] = useState(false)\n const { toast } = useToast()\n\n useEffect(() => {\n const fetchToken = async () => {\n if (status === \"authenticated\") {\n try {\n const currentToken = await getToken()\n setToken(currentToken)\n } catch (error) {\n console.error(\"Failed to get token:\", error)\n setToken(null)\n }\n }\n setLoading(false)\n }\n\n fetchToken()\n }, [status])\n\n const copyToClipboard = async () => {\n if (!token) return\n\n try {\n await navigator.clipboard.writeText(token)\n setCopied(true)\n toast({\n title: \"Token copied!\",\n description: \"The token has been copied to your clipboard.\",\n })\n setTimeout(() => setCopied(false), 2000)\n } catch (error) {\n toast({\n title: \"Failed to copy\",\n description: \"Could not copy token to clipboard.\",\n variant: \"destructive\",\n })\n }\n }\n\n if (status === \"loading\" || loading) {\n return (\n <div className=\"container mx-auto p-6\">\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <div className=\"animate-spin rounded-full h-32 w-32 border-b-2 border-gray-900\"></div>\n </div>\n </div>\n )\n }\n\n if (status === \"unauthenticated\") {\n return (\n <div className=\"container mx-auto my-auto p-6\">\n <Card className=\"max-w-md mx-auto\">\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <AlertCircle className=\"h-5 w-5 text-red-500\" />\n Authentication Required\n </CardTitle>\n <CardDescription>\n You must be logged in to access your token.\n </CardDescription>\n </CardHeader>\n <CardContent>\n <p className=\"text-sm text-muted-foreground\">\n Please log in to view and copy your authentication token.\n </p>\n </CardContent>\n </Card>\n </div>\n )\n }\n\n return (\n <div className=\"container mx-auto my-auto p-6\">\n <div className=\"max-w-2xl mx-auto\">\n <div className=\"mb-6\">\n <h1 className=\"text-3xl font-bold\">Authentication Token</h1>\n <p className=\"text-muted-foreground mt-2\">\n Your current authentication token for API access.\n </p>\n </div>\n\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center justify-between\">\n <span>Current Token</span>\n <Badge variant={token ? \"default\" : \"destructive\"}>\n {token ? \"Active\" : \"Unavailable\"}\n </Badge>\n </CardTitle>\n <CardDescription>\n Use this token to authenticate API requests. Keep it secure and do not share it.\n </CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n {token ? (\n <>\n <div className=\"space-y-2\">\n <label htmlFor=\"token\" className=\"text-sm font-medium\">\n Token Value\n </label>\n <div className=\"flex gap-2\">\n <Input\n id=\"token\"\n type=\"text\"\n value={token}\n readOnly\n className=\"font-mono text-sm\"\n />\n <Button\n onClick={copyToClipboard}\n variant=\"outline\"\n size=\"sm\"\n className=\"shrink-0\"\n >\n {copied ? (\n <CheckCircle className=\"h-4 w-4\" />\n ) : (\n <Copy className=\"h-4 w-4\" />\n )}\n </Button>\n </div>\n </div>\n \n <div className=\"text-sm text-muted-foreground space-y-2\">\n <p>\n <strong>Security:</strong> This token provides access to your account. Keep it private and secure.\n </p>\n </div>\n </>\n ) : (\n <div className=\"text-center py-8\">\n <AlertCircle className=\"h-12 w-12 text-muted-foreground mx-auto mb-4\" />\n <p className=\"text-muted-foreground\">\n No token available. Please try refreshing the page or logging in again.\n </p>\n </div>\n )}\n </CardContent>\n </Card>\n </div>\n </div>\n )\n}","import { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst badgeVariants = cva(\n \"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground hover:bg-primary/80\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n destructive:\n \"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80\",\n outline: \"text-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return (\n <div className={cn(badgeVariants({ variant }), className)} {...props} />\n );\n}\n\nexport { Badge, badgeVariants };\n","import { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"size-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"rounded-lg border bg-card text-card-foreground shadow-sm\",\n className,\n )}\n {...props}\n />\n));\nCard.displayName = \"Card\";\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n {...props}\n />\n));\nCardHeader.displayName = \"CardHeader\";\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\n \"text-2xl font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nCardTitle.displayName = \"CardTitle\";\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nCardDescription.displayName = \"CardDescription\";\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n));\nCardContent.displayName = \"CardContent\";\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex items-center p-6 pt-0\", className)}\n {...props}\n />\n));\nCardFooter.displayName = \"CardFooter\";\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardDescription,\n CardContent,\n};\n","import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface InputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n","\"use client\";\n\n// Inspired by react-hot-toast library\nimport * as React from \"react\";\n\nimport type { ToastActionElement, ToastProps } from \"@/components/ui/toast\";\n\nconst TOAST_LIMIT = 1;\nconst TOAST_REMOVE_DELAY = 1000000;\n\ntype ToasterToast = ToastProps & {\n id: string;\n title?: React.ReactNode;\n description?: React.ReactNode;\n action?: ToastActionElement;\n};\n\nconst actionTypes = {\n ADD_TOAST: \"ADD_TOAST\",\n UPDATE_TOAST: \"UPDATE_TOAST\",\n DISMISS_TOAST: \"DISMISS_TOAST\",\n REMOVE_TOAST: \"REMOVE_TOAST\",\n} as const;\n\nlet count = 0;\n\nfunction genId() {\n count = (count + 1) % Number.MAX_SAFE_INTEGER;\n return count.toString();\n}\n\ntype ActionType = typeof actionTypes;\n\ntype Action =\n | {\n type: ActionType[\"ADD_TOAST\"];\n toast: ToasterToast;\n }\n | {\n type: ActionType[\"UPDATE_TOAST\"];\n toast: Partial<ToasterToast>;\n }\n | {\n type: ActionType[\"DISMISS_TOAST\"];\n toastId?: ToasterToast[\"id\"];\n }\n | {\n type: ActionType[\"REMOVE_TOAST\"];\n toastId?: ToasterToast[\"id\"];\n };\n\ninterface State {\n toasts: ToasterToast[];\n}\n\nconst toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>();\n\nconst addToRemoveQueue = (toastId: string) => {\n if (toastTimeouts.has(toastId)) {\n return;\n }\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId);\n dispatch({\n type: \"REMOVE_TOAST\",\n toastId: toastId,\n });\n }, TOAST_REMOVE_DELAY);\n\n toastTimeouts.set(toastId, timeout);\n};\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case \"ADD_TOAST\":\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\n };\n\n case \"UPDATE_TOAST\":\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === action.toast.id ? { ...t, ...action.toast } : t,\n ),\n };\n\n case \"DISMISS_TOAST\": {\n const { toastId } = action;\n\n // ! Side effects ! - This could be extracted into a dismissToast() action,\n // but I'll keep it here for simplicity\n if (toastId) {\n addToRemoveQueue(toastId);\n } else {\n state.toasts.forEach((toast) => {\n addToRemoveQueue(toast.id);\n });\n }\n\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === toastId || toastId === undefined\n ? {\n ...t,\n open: false,\n }\n : t,\n ),\n };\n }\n case \"REMOVE_TOAST\":\n if (action.toastId === undefined) {\n return {\n ...state,\n toasts: [],\n };\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\n };\n }\n};\n\nconst listeners: Array<(state: State) => void> = [];\n\nlet memoryState: State = { toasts: [] };\n\nfunction dispatch(action: Action) {\n memoryState = reducer(memoryState, action);\n listeners.forEach((listener) => {\n listener(memoryState);\n });\n}\n\ntype Toast = Omit<ToasterToast, \"id\">;\n\nfunction toast({ ...props }: Toast) {\n const id = genId();\n\n const update = (props: ToasterToast) =>\n dispatch({\n type: \"UPDATE_TOAST\",\n toast: { ...props, id },\n });\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id });\n\n dispatch({\n type: \"ADD_TOAST\",\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open) => {\n if (!open) dismiss();\n },\n },\n });\n\n return {\n id: id,\n dismiss,\n update,\n };\n}\n\nfunction useToast() {\n const [state, setState] = React.useState<State>(memoryState);\n\n React.useEffect(() => {\n listeners.push(setState);\n return () => {\n const index = listeners.indexOf(setState);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n };\n }, [state]);\n\n return {\n ...state,\n toast,\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\n };\n}\n\nexport { useToast, toast };\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport function formatDuration(seconds: number): string {\n if (!seconds) return '0s';\n \n const hours = Math.floor(seconds / 3600);\n const minutes = Math.floor((seconds % 3600) / 60);\n const remainingSeconds = Math.round(seconds % 60);\n\n if (hours > 0) {\n return `${hours}h ${minutes}m`;\n } else if (minutes > 0) {\n return `${minutes}m ${remainingSeconds}s`;\n } else {\n return `${remainingSeconds}s`;\n }\n}","export default {\n xmlns: 'http://www.w3.org/2000/svg',\n width: 24,\n height: 24,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 2,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n};\n","import {\n forwardRef,\n createElement,\n ReactSVG,\n SVGProps,\n ForwardRefExoticComponent,\n RefAttributes,\n} from 'react';\nimport defaultAttributes from './defaultAttributes';\n\nexport type IconNode = [elementName: keyof ReactSVG, attrs: Record<string, string>][];\n\nexport type SVGAttributes = Partial<SVGProps<SVGSVGElement>>;\ntype ComponentAttributes = RefAttributes<SVGSVGElement> & SVGAttributes;\n\nexport interface LucideProps extends ComponentAttributes {\n size?: string | number;\n absoluteStrokeWidth?: boolean;\n}\n\nexport type LucideIcon = ForwardRefExoticComponent<LucideProps>;\n/**\n * Converts string to KebabCase\n * Copied from scripts/helper. If anyone knows how to properly import it here\n * then please fix it.\n *\n * @param {string} string\n * @returns {string} A kebabized string\n */\nexport const toKebabCase = (string: string) =>\n string\n .replace(/([a-z0-9])([A-Z])/g, '$1-$2')\n .toLowerCase()\n .trim();\n\nconst createLucideIcon = (iconName: string, iconNode: IconNode): LucideIcon => {\n const Component = forwardRef<SVGSVGElement, LucideProps>(\n ({ color = 'currentColor', size = 24, strokeWidth = 2, absoluteStrokeWidth, className = '', children, ...rest }, ref) =>{\n\n return createElement(\n 'svg',\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n className: ['lucide', `lucide-${toKebabCase(iconName)}`, className].join(' '),\n ...rest,\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...(Array.isArray(children) ? children : [children]),\n ]\n )\n }\n );\n\n Component.displayName = `${iconName}`;\n\n return Component;\n};\n\nexport default createLucideIcon;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AlertCircle\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/alert-circle\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst AlertCircle = createLucideIcon('AlertCircle', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['line', { x1: '12', x2: '12', y1: '8', y2: '12', key: '1pkeuh' }],\n ['line', { x1: '12', x2: '12.01', y1: '16', y2: '16', key: '4dfq90' }],\n]);\n\nexport default AlertCircle;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CheckCircle\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/check-circle\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CheckCircle = createLucideIcon('CheckCircle', [\n ['path', { d: 'M22 11.08V12a10 10 0 1 1-5.93-9.14', key: 'g774vq' }],\n ['path', { d: 'm9 11 3 3L22 4', key: '1pflzl' }],\n]);\n\nexport default CheckCircle;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Copy\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/copy\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Copy = createLucideIcon('Copy', [\n ['rect', { width: '14', height: '14', x: '8', y: '8', rx: '2', ry: '2', key: '17jyea' }],\n ['path', { d: 'M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2', key: 'zix9uf' }],\n]);\n\nexport default Copy;\n","import { getSession } from \"next-auth/react\";\n\nexport type ImageStyle = \"origami\" | \"anime\" | \"japanese_anime\" | \"vaporwave\" | \"lego\" | \"paper_cut\" | \"felt_puppet\" | \"3d\" | \"app_icon\" | \"pixel_art\" | \"isometric\";\n\nconst getUris = async () => {\n // Server-side: use environment variable directly\n if (typeof window === 'undefined') {\n const backend = process.env.BACKEND;\n if (!backend) {\n throw new Error(\"No backend set.\")\n }\n return {\n files: backend,\n base: backend\n }\n }\n\n // Client-side: fetch from API\n const context = await fetch(\"/api/config\").then(res => res.json());\n if (!context.backend) {\n throw new Error(\"No backend set.\")\n }\n return {\n files: context.backend,\n base: context.backend\n }\n}\n\nexport const getToken = async () => {\n const session = await getSession()\n // @ts-ignore\n return session?.user?.jwt;\n}\n\nexport type BackendConfigType = {\n fileUploads?: {\n s3endpoint: string;\n }\n workers?: {\n redisHost: string;\n enabled: boolean;\n }\n}\n\nexport type ThemeConfig = {\n light?: Record<string, string>;\n dark?: Record<string, string>;\n}\n\nexport const config = {\n backend: async (): Promise<Response> => {\n const uris = await getUris();\n const url = `${uris.base}/config`\n return fetch(url, {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n })\n },\n theme: async (): Promise<ThemeConfig> => {\n try {\n const token = await getToken();\n const uris = await getUris();\n const res = await fetch(`${uris.base}/theme`, {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Authorization\": `Bearer ${token}`,\n },\n })\n const json = await res.json();\n return json.theme;\n } catch (error) {\n console.error(\"Error fetching theme config:\", error);\n return { light: {}, dark: {} };\n }\n }\n}\n\nexport const agents = {\n image: {\n generate: async (parameters: {\n name: string,\n description: string,\n style?: ImageStyle\n }): Promise<any> => {\n\n const uris = await getUris();\n const url = `${uris.base}/generate/agent/image`;\n const token = await getToken()\n\n if (!token) {\n throw new Error(\"No valid session token available.\")\n }\n\n return fetch(url, {\n method: \"POST\",\n body: JSON.stringify(parameters),\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${token}`,\n },\n });\n }\n }\n}\n\nexport type S3FileListOutput = {\n \"$metadata\": {\n \"httpStatusCode\": number,\n \"attempts\": number,\n \"totalRetryDelay\": number\n },\n \"Contents\": {\n \"Key\": string,\n \"LastModified\": string,\n \"ETag\": string,\n \"Size\": number\n }[]\n \"IsTruncated\": boolean,\n \"NextContinuationToken\": string,\n \"KeyCount\": number,\n \"MaxKeys\": number,\n \"Name\": string,\n \"Prefix\": string\n}\n\nexport type S3ObjectOutput = {\n \"$metadata\": {\n \"httpStatusCode\": number,\n \"attempts\": number,\n \"totalRetryDelay\": number\n },\n \"AcceptRanges\": \"bytes\",\n \"LastModified\": string,\n \"ContentLength\": number,\n \"ChecksumCRC32C\": string,\n \"ETag\": string,\n \"CacheControl\": string,\n \"ContentType\": string,\n \"Expires\": string,\n \"ExpiresString\": string\n}\n\nexport const files = {\n object: async (key: string): Promise<S3ObjectOutput> => {\n const uris = await getUris();\n let url = `${uris.files}/s3/object`;\n const token = await getToken()\n const response = await fetch(url, {\n method: \"POST\",\n body: JSON.stringify({ key }),\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${token}`,\n },\n });\n return response.json();\n },\n list: async ({ search, continuationToken }: { search?: string, continuationToken?: string }): Promise<S3FileListOutput> => {\n const uris = await getUris();\n let url = `${uris.files}/s3/list`;\n const token = await getToken()\n\n if (!token) {\n throw new Error(\"No valid session token available.\")\n }\n\n if (search) {\n url += `?search=${search}`;\n }\n\n if (continuationToken) {\n url += `?continuationToken=${continuationToken}`;\n }\n\n const response = await fetch(url, {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${token}`,\n },\n });\n return response.json();\n },\n // Key is the base s3 key of the file\n // if only the key is provided only the\n // user that uploaded the file, a super\n // admin or api user can access and \n // download the file. If an item ID is\n // provided, the RBAC rights associated\n // with the item are checked and used.\n // The item must be provided as a GID\n // with the context id as the prefix before\n // the first slash.\n download: async (key: string) => {\n\n const uris = await getUris();\n let url = `${uris.files}/s3/download?key=${encodeURIComponent(key)}`;\n\n const token = await getToken()\n\n if (!token) {\n throw new Error(\"No valid session token available.\")\n }\n\n return fetch(url, {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${token}`,\n },\n });\n },\n delete: async (key: string) => {\n\n const uris = await getUris();\n let url = `${uris.files}/s3/delete?key=${key}`;\n const token = await getToken()\n\n if (!token) {\n throw new Error(\"No valid session token available.\")\n }\n\n return fetch(url, {\n method: \"DELETE\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${token}`,\n },\n });\n }\n}\n","// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Promise","resolve","then","__webpack_require__","bind","TokenPage","data","session","status","useSession","token","setToken","useState","loading","setLoading","copied","setCopied","toast","useToast","useEffect","fetchToken","currentToken","getToken","error","console","copyToClipboard","navigator","clipboard","writeText","title","description","setTimeout","variant","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","div","className","jsxs","Card","CardHeader","CardTitle","AlertCircle","CardDescription","CardContent","p","h1","span","Badge","Fragment","label","htmlFor","Input","id","type","value","readOnly","Button","onClick","size","CheckCircle","Copy","strong","badgeVariants","cva","variants","default","secondary","destructive","outline","defaultVariants","param","props","cn","buttonVariants","ghost","link","sm","lg","icon","React","ref","asChild","Comp","Slot","displayName","h3","CardFooter","input","count","toastTimeouts","Map","addToRemoveQueue","has","toastId","timeout","delete","dispatch","set","reducer","state","action","toasts","slice","map","t","forEach","undefined","open","filter","listeners","memoryState","listener","Number","MAX_SAFE_INTEGER","toString","dismiss","onOpenChange","update","setState","push","index","indexOf","splice","_len","arguments","length","inputs","_key","twMerge","clsx","formatDuration","seconds","hours","Math","floor","minutes","remainingSeconds","round","concat","defaultAttributes","xmlns","width","height","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","toKebabCase","string","replace","toLowerCase","trim","createLucideIcon","iconName","iconNode","Component","forwardRef","color","absoluteStrokeWidth","children","rest","createElement","join","tag","attrs","Array","isArray","cx","cy","r","key","x1","x2","y1","y2","d","x","y","rx","ry","getUris","context","fetch","res","json","backend","files","base","getSession","user","jwt","agents","image","generate","parameters","uris","url","method","body","JSON","stringify","headers","Authorization","object","response","list","search","continuationToken","download","encodeURIComponent","setRef","current","composeRefs","refs","hasCleanup","cleanups","cleanup","node","i","useComposedRefs","react__WEBPACK_IMPORTED_MODULE_0__","useCallback","createSlot","ownerName","SlotClone","createSlotClone","forwardedRef","slotProps","isValidElement","getter","mayWarn","childrenRef","Object","getOwnPropertyDescriptor","element","get","isReactWarning","props2","mergeProps","childProps","overrideProps","propName","slotPropValue","childPropValue","test","args","result","Boolean","_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__","F","cloneElement","Children","only","Slot2","childrenArray","toArray","slottable","find","isSlottable","newElement","newChildren","child","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__","SLOTTABLE_IDENTIFIER","Symbol","createSlottable","Slottable2","__radixId"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8441],{3863:function(e,s,a){Promise.resolve().then(a.bind(a,38165))},38165:function(e,s,a){"use strict";a.r(s),a.d(s,{default:function(){return X},dynamic:function(){return T}});var i=a(57437),t=a(2265),l=a(19060),n=a(20653),r=a(62869),o=a(84190),d=a(94508);function c(e){let{column:s,title:a,className:t}=e;return s.getCanSort()?(0,i.jsx)("div",{className:(0,d.cn)("flex items-center space-x-2",t),children:(0,i.jsxs)(o.h_,{modal:!1,children:[(0,i.jsx)(o.$F,{asChild:!0,children:(0,i.jsxs)(r.z,{variant:"ghost",size:"sm",className:"-ml-3 h-8 data-[state=open]:bg-accent",children:[(0,i.jsx)("span",{children:a}),"desc"===s.getIsSorted()?(0,i.jsx)(n.veu,{className:"ml-2 size-4"}):"asc"===s.getIsSorted()?(0,i.jsx)(n.Hf3,{className:"ml-2 size-4"}):(0,i.jsx)(n.jnn,{className:"ml-2 size-4"})]})}),(0,i.jsxs)(o.AW,{align:"start",children:[(0,i.jsxs)(o.Xi,{onClick:()=>s.toggleSorting(!1),children:[(0,i.jsx)(n.Hf3,{className:"mr-2 size-3.5 text-muted-foreground/70"}),"Asc"]}),(0,i.jsxs)(o.Xi,{onClick:()=>s.toggleSorting(!0),children:[(0,i.jsx)(n.veu,{className:"mr-2 size-3.5 text-muted-foreground/70"}),"Desc"]}),(0,i.jsx)(o.VD,{}),(0,i.jsxs)(o.Xi,{onClick:()=>s.toggleVisibility(!1),children:[(0,i.jsx)(n.L52,{className:"mr-2 size-3.5 text-muted-foreground/70"}),"Hide"]})]})]})}):(0,i.jsx)("div",{className:(0,d.cn)(t),children:a})}var u=a(12199),m=a(27689),h=a(26110),x=a(95186),p=a(26815),g=a(77992),v=a(67119);let f=v.Ry({id:v.Rx(),email:v.Z_(),emailVerified:v.Z_().nullable().optional(),roles:v.IX(v.Ry({id:v.Z_(),role:v.Z_()})).nullable().optional()});var j=a(13832),w=a(87769),N=a(42208),y=a(78867);function C(e){let{row:s}=e,{user:a}=(0,t.useContext)(j.S),l=f.parse(s.original),{toast:d}=(0,g.pm)(),[c,v]=(0,t.useState)(!1),[C,b]=(0,t.useState)(""),[S,k]=(0,t.useState)(!1),[P,z]=(0,t.useState)(!1),[R,A]=(0,u.D)(m.eY,{refetchQueries:[m.fo,"GetUsers"]}),[F]=(0,u.D)(m.ui,{refetchQueries:[m.fo,"GetUsers"]}),I=()=>{let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*",s="";for(let a=0;a<12;a++)s+=e.charAt(Math.floor(Math.random()*e.length));return s},_=async()=>{z(!0);try{await F({variables:{id:l.id,password:C}}),d({title:"Password reset",description:"Password has been reset for ".concat(l.email,".")}),v(!1),b(""),k(!1)}catch(e){console.error("Error resetting password:",e),d({title:"Error",description:"Failed to reset password. Please try again.",variant:"destructive"})}finally{z(!1)}},M=async e=>{try{await navigator.clipboard.writeText(e),d({title:"Copied",description:"Password copied to clipboard"})}catch(e){d({title:"Error",description:"Failed to copy to clipboard",variant:"destructive"})}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.h_,{modal:!1,children:[(0,i.jsx)(o.$F,{asChild:!0,children:(0,i.jsxs)(r.z,{variant:"ghost",className:"flex size-8 p-0 data-[state=open]:bg-muted",children:[(0,i.jsx)(n.nWS,{className:"size-4"}),(0,i.jsx)("span",{className:"sr-only",children:"Open menu"})]})}),(0,i.jsxs)(o.AW,{align:"end",className:"w-[160px]",children:[(0,i.jsx)(o.Xi,{onClick:()=>{b(I()),v(!0)},children:"Reset password"}),(0,i.jsx)(o.Xi,{onClick:()=>{if(a.id===l.id){d({title:"Cannot delete your own user",description:"You cannot delete your own user, that would be a bad idea."});return}window.confirm("Are you sure you want to delete this user?")&&(R({variables:{id:l.id}}),d({title:"Deleting user",description:"We deleted the user."}))},children:"Delete user"})]})]}),(0,i.jsx)(h.Vq,{open:c,onOpenChange:v,children:(0,i.jsxs)(h.cZ,{className:"max-w-md",children:[(0,i.jsxs)(h.fK,{children:[(0,i.jsx)(h.$N,{children:"Reset Password"}),(0,i.jsxs)(h.Be,{children:["A temporary password has been generated for ",l.email,". Copy and send it to the user manually."]})]}),(0,i.jsx)("div",{className:"space-y-4",children:(0,i.jsxs)("div",{children:[(0,i.jsx)(p._,{htmlFor:"password",children:"Temporary Password"}),(0,i.jsxs)("div",{className:"relative mt-1",children:[(0,i.jsx)(x.I,{id:"password",type:S?"text":"password",value:C,readOnly:!0,className:"pr-20"}),(0,i.jsxs)("div",{className:"absolute right-1 top-1/2 -translate-y-1/2 flex gap-1",children:[(0,i.jsx)(r.z,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>k(!S),children:S?(0,i.jsx)(w.Z,{className:"h-4 w-4"}):(0,i.jsx)(N.Z,{className:"h-4 w-4"})}),(0,i.jsx)(r.z,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>M(C),children:(0,i.jsx)(y.Z,{className:"h-4 w-4"})})]})]}),(0,i.jsxs)("p",{className:"text-sm text-muted-foreground mt-2",children:["Please copy this password and send it to ",l.email," manually. The user should change it on their first login."]})]})}),(0,i.jsxs)(h.cN,{children:[(0,i.jsx)(r.z,{variant:"outline",onClick:()=>{v(!1),b(""),k(!1)},children:"Cancel"}),(0,i.jsx)(r.z,{onClick:_,disabled:P,children:P?"Resetting...":"Reset Password"})]})]})})]})}var b=a(1828),S=a(63639);function k(e){let{user:s}=e,[a,l]=(0,t.useState)(!1),[n,o]=(0,t.useState)(!1),[d,c]=(0,t.useState)(null),{toast:x}=(0,g.pm)(),{user:p}=(0,t.useContext)(j.S),[v]=(0,u.D)(m.Pe,{refetchQueries:[m.fo,"GetUsers"]}),f=!!s.super_admin,w=(null==p?void 0:p.id)===s.id,N=async()=>{if(null!==d){o(!0);try{await v({variables:{id:s.id,super_admin:d}}),l(!1),c(null),x({title:d?"Super Admin Enabled":"Super Admin Disabled",description:"Super admin access has been ".concat(d?"granted to":"removed from"," ").concat(s.email,".")})}catch(e){x({title:"Error",description:e.message||"Failed to update super admin status.",variant:"destructive"})}finally{o(!1)}}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,i.jsx)(b.r,{checked:f,onCheckedChange:e=>{if(w&&f&&!e){x({title:"Cannot Disable Own Super Admin Rights",description:"You cannot disable your own super admin privileges for security reasons.",variant:"destructive"});return}c(e),l(!0)},disabled:n,className:"data-[state=checked]:bg-red-500 data-[state=checked]:border-red-500"}),(0,i.jsx)("span",{className:"text-sm text-muted-foreground",children:f?"Yes":"No"})]}),(0,i.jsx)(h.Vq,{open:a,onOpenChange:l,children:(0,i.jsxs)(h.cZ,{className:"sm:max-w-[475px]",children:[(0,i.jsxs)(h.fK,{children:[(0,i.jsxs)(h.$N,{children:[d?"Grant":"Remove"," Super Admin Access"]}),(0,i.jsxs)(h.Be,{children:[d?"Are you sure you want to grant super admin access to ".concat(s.email,"? This will give them full administrative privileges."):"Are you sure you want to remove super admin access from ".concat(s.email,"? They will lose all administrative privileges."),!d&&(0,i.jsxs)("div",{className:"mt-3 p-3 bg-amber-50 border border-amber-200 rounded-md flex items-start gap-2",children:[(0,i.jsx)(S.Z,{className:"h-4 w-4 text-amber-600 mt-0.5 flex-shrink-0"}),(0,i.jsxs)("p",{className:"text-sm text-amber-800",children:[(0,i.jsx)("strong",{children:"Warning:"})," Ensure you are not removing super admin access from the last super administrator. This could prevent anyone from managing users and system settings and requiring a technical support intervention to set the super admin status again via the database."]})]})]})]}),(0,i.jsxs)(h.cN,{children:[(0,i.jsx)(r.z,{variant:"outline",onClick:()=>{l(!1),c(null)},children:"Cancel"}),(0,i.jsx)(r.z,{onClick:N,disabled:n,variant:d?"destructive":"default",className:d?"bg-red-500 hover:bg-red-600":"",children:n?"Updating...":"Confirm"})]})]})})]})}var P=a(84426);let z=(e,s)=>[{id:"select",header:e=>{let{table:s}=e;return(0,i.jsx)(l.X,{checked:s.getIsAllPageRowsSelected()||s.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:e=>s.toggleAllPageRowsSelected(!!e),"aria-label":"Select all",className:"translate-y-[2px]"})},cell:e=>{let{row:s}=e;return(0,i.jsx)(l.X,{checked:s.getIsSelected(),onCheckedChange:e=>s.toggleSelected(!!e),"aria-label":"Select row",className:"translate-y-[2px]"})},enableSorting:!1,enableHiding:!1},{accessorKey:"email",header:e=>{let{column:s}=e;return(0,i.jsx)(c,{column:s,title:"Email"})},cell:e=>{let{row:s}=e;return(0,i.jsx)("div",{className:"flex space-x-2",children:(0,i.jsx)("span",{className:"max-w-[300px] truncate font-medium",children:s.original.email})})}},{accessorKey:"role",header:e=>{let{column:s}=e;return(0,i.jsx)(c,{column:s,title:"Role"})},cell:e=>{let{row:a}=e;return(0,i.jsx)("div",{className:"gap-x-2 flex",children:(0,i.jsx)(P.u,{value:a.original.role,onChange:e=>{window.confirm("Are you sure you want to update the role for this user?")&&s(a.original,e)}})})},filterFn:(e,s,a)=>a.includes(e.getValue(s))},{accessorKey:"status",header:e=>{let{column:s}=e;return(0,i.jsx)(c,{column:s,title:"Status"})},cell:e=>{let{row:s}=e;return(0,i.jsx)("div",{className:"flex w-[100px] items-center",children:s.original.emailVerified?(0,i.jsx)("p",{className:"text-primary",children:"verified"}):(0,i.jsx)("p",{className:"text-orange-400",children:"pending"})})},filterFn:(e,s,a)=>a.includes(e.getValue(s))},...(null==e?void 0:e.super_admin)?[{accessorKey:"super_admin",header:e=>{let{column:s}=e;return(0,i.jsx)(c,{column:s,title:"Super Admin"})},cell:e=>{let{row:s}=e;return(0,i.jsx)(k,{user:s.original})},enableSorting:!1}]:[],{id:"actions",cell:e=>{let{row:s}=e;return(0,i.jsx)(C,{row:s})}}];var R=a(7211),A=a(71594),F=a(24525),I=a(18930),_=a(99376),M=a(70085);function Z(e){let{table:s}=e;return(0,i.jsxs)(o.h_,{modal:!1,children:[(0,i.jsx)(M.$F,{asChild:!0,children:(0,i.jsxs)(r.z,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[(0,i.jsx)(n.hsZ,{className:"mr-2 size-4"}),"View"]})}),(0,i.jsxs)(o.AW,{align:"end",className:"w-[150px]",children:[(0,i.jsx)(o.Ju,{children:"Toggle columns"}),(0,i.jsx)(o.VD,{}),s.getAllColumns().filter(e=>void 0!==e.accessorFn&&e.getCanHide()).map(e=>(0,i.jsx)(o.bO,{className:"capitalize",checked:e.getIsVisible(),onCheckedChange:s=>e.toggleVisibility(!!s),children:e.id},e.id))]})]})}var E=a(10492),D=a(73578),U=a(44045);function V(e){let{isOpen:s,onClose:a}=e,{user:l}=(0,t.useContext)(j.S),n=(0,t.useContext)(U.E),{toast:o}=(0,g.pm)(),[d,c]=(0,t.useState)("email"),[v,f]=(0,t.useState)(""),[C,b]=(0,t.useState)(""),[S,k]=(0,t.useState)(!1),[P,z]=(0,t.useState)(!1),[R]=(0,u.D)(m.qK,{refetchQueries:[m.fo,"GetUsers"]}),A=()=>{let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*",s="";for(let a=0;a<12;a++)s+=e.charAt(Math.floor(Math.random()*e.length));return s},F=async()=>{if(!v.trim()){o({title:"Error",description:"Please enter an email address",variant:"destructive"});return}if(!v.includes("@")){o({title:"Error",description:"Please enter a valid email address",variant:"destructive"});return}(null==n?void 0:n.auth_mode)==="password"?(b(A()),c("password")):(await R({variables:{email:v.trim(),password:C,type:"user",emailVerified:new Date}}),o({title:"User created",description:"User ".concat(v," has been created successfully.")}),_())},I=async()=>{z(!0);try{await R({variables:{email:v.trim(),password:C}}),o({title:"User created",description:"User ".concat(v," has been created with a temporary password.")}),_()}catch(e){console.error("Error creating user:",e),o({title:"Error",description:"Failed to create user. Please try again.",variant:"destructive"})}finally{z(!1)}},_=()=>{c("email"),f(""),b(""),k(!1),z(!1),a()},M=async e=>{try{await navigator.clipboard.writeText(e),o({title:"Copied",description:"Password copied to clipboard"})}catch(e){o({title:"Error",description:"Failed to copy to clipboard",variant:"destructive"})}};return(null==l?void 0:l.super_admin)?(0,i.jsx)(h.Vq,{open:s,onOpenChange:_,children:(0,i.jsxs)(h.cZ,{className:"max-w-md",children:[(0,i.jsxs)(h.fK,{children:[(0,i.jsx)(h.$N,{children:"email"===d?"Add New User":"Generated Password"}),(0,i.jsx)(h.Be,{children:"email"===d?"Enter the email address for the new user.":"A temporary password has been generated. Copy and send it to the user manually."})]}),"email"===d&&(0,i.jsx)("div",{className:"space-y-4",children:(0,i.jsxs)("div",{children:[(0,i.jsx)(p._,{htmlFor:"email",children:"Email Address"}),(0,i.jsx)(x.I,{id:"email",type:"email",value:v,onChange:e=>f(e.target.value),placeholder:"user@example.com",className:"mt-1",autoFocus:!0})]})}),"password"===d&&(0,i.jsx)("div",{className:"space-y-4",children:(0,i.jsxs)("div",{children:[(0,i.jsx)(p._,{htmlFor:"password",children:"Temporary Password"}),(0,i.jsxs)("div",{className:"relative mt-1",children:[(0,i.jsx)(x.I,{id:"password",type:S?"text":"password",value:C,readOnly:!0,className:"pr-20"}),(0,i.jsxs)("div",{className:"absolute right-1 top-1/2 -translate-y-1/2 flex gap-1",children:[(0,i.jsx)(r.z,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>k(!S),children:S?(0,i.jsx)(w.Z,{className:"h-4 w-4"}):(0,i.jsx)(N.Z,{className:"h-4 w-4"})}),(0,i.jsx)(r.z,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>M(C),children:(0,i.jsx)(y.Z,{className:"h-4 w-4"})})]})]}),(0,i.jsxs)("p",{className:"text-sm text-muted-foreground mt-2",children:["Please copy this password and send it to ",v," manually. The user should change it on their first login."]})]})}),(0,i.jsxs)(h.cN,{children:[(0,i.jsx)(r.z,{variant:"outline",onClick:_,children:"Cancel"}),"email"===d&&(0,i.jsx)(r.z,{onClick:F,disabled:P,children:(null==n?void 0:n.auth_mode)==="password"?"Continue":"Add User"}),"password"===d&&(0,i.jsx)(r.z,{onClick:I,disabled:P,children:P?"Creating...":"Create User"})]})]})}):null}var G=a(99397);function O(e){var s,a,l,o,d,c,h,p,v,f,w,N,y,C,b,S,k,P,z,M;let U,O,{columns:T}=e,{toast:X}=(0,g.pm)(),K=(0,_.useRouter)(),{user:H}=t.useContext(j.S),[W,$]=t.useState({}),[q,Q]=t.useState({}),[Y,B]=t.useState([]),[J,L]=t.useState(!1),[ee,es]=(0,t.useState)([]),[ea,ei]=(0,t.useState)(1),[et,el]=t.useState([]),{loading:en,error:er,data:eo,refetch:ed,previousData:ec}=(0,R.aM)(m.fo,{fetchPolicy:"no-cache",nextFetchPolicy:"network-only",variables:{page:ea,limit:10,sort:{field:"createdAt",direction:"DESC"},filters:[...ee,{type:{ne:"api"}}]},pollInterval:3e4}),eu=t.useMemo(()=>[],[]),{limit:em,onPaginationChange:eh,skip:ex,pagination:ep}=function(){let[e,s]=(0,t.useState)({pageSize:5,pageIndex:0}),{pageSize:a,pageIndex:i}=e;return{limit:a,onPaginationChange:s,pagination:e,skip:a*i}}(),[eg,ev]=(0,u.D)(m.eY,{refetchQueries:[m.fo,"GetUsers"]});en&&(null==ec?void 0:null===(s=ec.usersPagination)||void 0===s?void 0:s.items)?(U=null==ec?void 0:null===(w=ec.usersPagination)||void 0===w?void 0:w.items,O=null==ec?void 0:null===(y=ec.usersPagination)||void 0===y?void 0:null===(N=y.pageInfo)||void 0===N?void 0:N.pageCount):(null==eo?void 0:null===(a=eo.usersPagination)||void 0===a?void 0:a.items)?(U=null==eo?void 0:null===(C=eo.usersPagination)||void 0===C?void 0:C.items,O=null==eo?void 0:null===(S=eo.usersPagination)||void 0===S?void 0:null===(b=S.pageInfo)||void 0===b?void 0:b.pageCount):(null==ec?void 0:null===(l=ec.usersPagination)||void 0===l?void 0:l.items)&&(U=null==ec?void 0:null===(k=ec.usersPagination)||void 0===k?void 0:k.items,O=null==ec?void 0:null===(z=ec.usersPagination)||void 0===z?void 0:null===(P=z.pageInfo)||void 0===P?void 0:P.pageCount);let ef=(0,A.b7)({data:null!=U?U:eu,pageCount:null!=O?O:-1,columns:T,state:{sorting:et,columnVisibility:q,rowSelection:W,columnFilters:Y},enableRowSelection:!0,onRowSelectionChange:$,onSortingChange:el,onColumnFiltersChange:B,onColumnVisibilityChange:Q,getCoreRowModel:(0,F.sC)(),getFilteredRowModel:(0,F.vL)(),getPaginationRowModel:(0,F.G_)(),getSortedRowModel:(0,F.tj)(),getFacetedRowModel:(0,F.o6)(),getFacetedUniqueValues:(0,F.JG)(),manualPagination:!0,onPaginationChange:eh}),ej=e=>{let s=[...ee],a=s.find(e=>e.email);(null==a?void 0:a.email)?a.email.contains=e:s.push({email:{contains:e}}),es(s),ed()},ew=ee.length>0;return(0,i.jsxs)("div",{className:"space-y-4",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"flex flex-1 items-center space-x-2",children:[(0,i.jsx)(x.I,{placeholder:"Filter users...",value:null!==(M=null==ee?void 0:null===(d=ee.find(e=>e.email))||void 0===d?void 0:null===(o=d.email)||void 0===o?void 0:o.contains)&&void 0!==M?M:"",onChange:e=>{ej(e.target.value)},className:"w-[150px] lg:w-[250px]"}),(0,i.jsx)(r.z,{variant:"outline",onClick:()=>{K.push("/roles")},children:"Manage roles"}),(null==H?void 0:H.super_admin)&&(0,i.jsxs)(r.z,{onClick:()=>L(!0),className:"flex items-center gap-2",children:[(0,i.jsx)(G.Z,{className:"size-4"}),"Add User"]}),ef.getIsSomeRowsSelected()||ef.getIsAllRowsSelected()?(0,i.jsx)("div",{className:"flex gap-x-2",children:(0,i.jsxs)(r.z,{onClick:()=>{if(!window.confirm("Are you sure you want to remove the selected users?"))return;let e=[];ef.getSelectedRowModel().rows.forEach(s=>{e.push(eg({variables:{id:s.original.id}}))}),Promise.all(e).then(()=>{ef.resetRowSelection(),X({title:"Removed users",description:"We removed "+e.length+" users."})})},variant:"secondary",disabled:ev.loading,children:[ev.loading?(0,i.jsx)(E.g,{}):(0,i.jsx)(I.Z,{className:"size-4"}),(0,i.jsx)("span",{className:"ml-2",children:"Remove selected"})]})}):null,ew&&(0,i.jsxs)(r.z,{variant:"ghost",onClick:()=>{let e=[...ee],s=e.find(e=>e.email);s&&e.splice(e.indexOf(s),1),es(e),ed()},children:["Reset",(0,i.jsx)(n.Pxu,{className:"ml-2 size-4"})]})]}),(0,i.jsx)(Z,{table:ef})]}),(0,i.jsx)("div",{className:"rounded-md border",children:(0,i.jsxs)(D.iA,{children:[(0,i.jsx)(D.xD,{children:ef.getHeaderGroups().map(e=>(0,i.jsx)(D.SC,{children:e.headers.map(e=>(0,i.jsx)(D.ss,{colSpan:e.colSpan,children:e.isPlaceholder?null:(0,A.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,i.jsx)(D.RM,{children:(null===(c=ef.getRowModel().rows)||void 0===c?void 0:c.length)?ef.getRowModel().rows.map(e=>(0,i.jsx)(D.SC,{"data-state":e.getIsSelected()&&"selected",children:e.getVisibleCells().map(e=>(0,i.jsx)(D.pj,{children:(0,A.ie)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,i.jsx)(D.SC,{children:(0,i.jsx)(D.pj,{colSpan:T.length,className:"h-24 text-center",children:"No results."})})})]})}),(0,i.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,i.jsxs)("div",{className:"text-muted-foreground flex-1 text-sm",children:[ef.getFilteredSelectedRowModel().rows.length," of"," ",ef.getFilteredRowModel().rows.length," row(s) selected."]}),(0,i.jsxs)("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[(0,i.jsxs)("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:["Page ",ea," of ",ef.getPageCount()]}),(0,i.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,i.jsxs)(r.z,{variant:"outline",className:"hidden size-8 p-0 lg:flex",onClick:()=>{ef.setPageIndex(0),ei(1),ed()},disabled:!(null==eo?void 0:null===(h=eo.usersPagination)||void 0===h?void 0:h.pageInfo.hasPreviousPage),children:[(0,i.jsx)("span",{className:"sr-only",children:"Go to first page"}),(0,i.jsx)(n.kRt,{className:"size-4"})]}),(0,i.jsxs)(r.z,{variant:"outline",className:"size-8 p-0",onClick:()=>{ef.previousPage(),ei(ea-1),ed()},disabled:!(null==eo?void 0:null===(p=eo.usersPagination)||void 0===p?void 0:p.pageInfo.hasPreviousPage),children:[(0,i.jsx)("span",{className:"sr-only",children:"Go to previous page"}),(0,i.jsx)(n.wyc,{className:"size-4"})]}),(0,i.jsxs)(r.z,{variant:"outline",className:"size-8 p-0",onClick:()=>{ef.nextPage(),ei(ea+1),ed()},disabled:!(null==eo?void 0:null===(v=eo.usersPagination)||void 0===v?void 0:v.pageInfo.hasNextPage),children:[(0,i.jsx)("span",{className:"sr-only",children:"Go to next page"}),(0,i.jsx)(n.XCv,{className:"size-4"})]}),(0,i.jsxs)(r.z,{variant:"outline",className:"hidden size-8 p-0 lg:flex",onClick:()=>{ei(ef.getPageCount()),ed()},disabled:!(null==eo?void 0:null===(f=eo.usersPagination)||void 0===f?void 0:f.pageInfo.hasNextPage),children:[(0,i.jsx)("span",{className:"sr-only",children:"Go to last page"}),(0,i.jsx)(n.yr4,{className:"size-4"})]})]})]})]}),(0,i.jsx)(V,{isOpen:J,onClose:()=>L(!1)})]})}let T="force-dynamic";function X(){let{user:e}=(0,t.useContext)(j.S),s=z(e,(e,s)=>{console.log("user",e),console.log("role",s),a({variables:{id:e.id,role:s}})}),[a,l]=(0,u.D)(m.Pe,{refetchQueries:[m.fo,"GetUsers"]});return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"hidden h-full flex-1 flex-col space-y-8 p-8 md:flex",children:[(0,i.jsx)("div",{className:"flex items-center justify-between space-y-2",children:(0,i.jsxs)("div",{children:[(0,i.jsx)("h2",{className:"text-2xl font-bold tracking-tight",children:"Users"}),(0,i.jsx)("p",{className:"text-muted-foreground",children:"Here's a list of all the users."})]})}),(0,i.jsx)(O,{columns:s})]})})}},19060:function(e,s,a){"use strict";a.d(s,{X:function(){return o}});var i=a(57437),t=a(9270),l=a(30401),n=a(2265),r=a(94508);let o=n.forwardRef((e,s)=>{let{className:a,...n}=e;return(0,i.jsx)(t.fC,{ref:s,className:(0,r.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",a),...n,children:(0,i.jsx)(t.z$,{className:(0,r.cn)("flex items-center justify-center text-current"),children:(0,i.jsx)(l.Z,{className:"size-4"})})})});o.displayName=t.fC.displayName},26815:function(e,s,a){"use strict";a.d(s,{_:function(){return d}});var i=a(57437),t=a(6394),l=a(90535),n=a(2265),r=a(94508);let o=(0,l.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=n.forwardRef((e,s)=>{let{className:a,...l}=e;return(0,i.jsx)(t.f,{ref:s,className:(0,r.cn)(o(),a),...l})});d.displayName=t.f.displayName},10492:function(e,s,a){"use strict";a.d(s,{g:function(){return l}});var i=a(57437),t=a(94508);let l=e=>{let{className:s}=e;return(0,i.jsxs)("svg",{"aria-hidden":"true",role:"status",className:(0,t.cn)("inline w-4 h-4 text-white animate-spin fill-inherit",s),viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",className:"fill-inherit opacity-20"}),(0,i.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",className:"fill-inherit"})]})}},1828:function(e,s,a){"use strict";a.d(s,{r:function(){return r}});var i=a(57437),t=a(50721),l=a(2265),n=a(94508);let r=l.forwardRef((e,s)=>{let{className:a,...l}=e;return(0,i.jsx)(t.fC,{className:(0,n.cn)("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",a),...l,ref:s,children:(0,i.jsx)(t.bU,{className:(0,n.cn)("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})})});r.displayName=t.fC.displayName}},function(e){e.O(0,[8310,9851,7629,7093,6148,847,1942,7648,7823,8068,5799,605,4567,1206,5338,3171,1594,7086,4419,6373,3832,4386,2971,2117,1744],function(){return e(e.s=3863)}),_N_E=e.O()}]);
|
|
2
|
-
//# sourceMappingURL=page-
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8441],{3863:function(e,s,a){Promise.resolve().then(a.bind(a,38165))},38165:function(e,s,a){"use strict";a.r(s),a.d(s,{default:function(){return X},dynamic:function(){return T}});var i=a(57437),t=a(2265),l=a(19060),n=a(20653),r=a(62869),o=a(84190),d=a(94508);function c(e){let{column:s,title:a,className:t}=e;return s.getCanSort()?(0,i.jsx)("div",{className:(0,d.cn)("flex items-center space-x-2",t),children:(0,i.jsxs)(o.h_,{modal:!1,children:[(0,i.jsx)(o.$F,{asChild:!0,children:(0,i.jsxs)(r.z,{variant:"ghost",size:"sm",className:"-ml-3 h-8 data-[state=open]:bg-accent",children:[(0,i.jsx)("span",{children:a}),"desc"===s.getIsSorted()?(0,i.jsx)(n.veu,{className:"ml-2 size-4"}):"asc"===s.getIsSorted()?(0,i.jsx)(n.Hf3,{className:"ml-2 size-4"}):(0,i.jsx)(n.jnn,{className:"ml-2 size-4"})]})}),(0,i.jsxs)(o.AW,{align:"start",children:[(0,i.jsxs)(o.Xi,{onClick:()=>s.toggleSorting(!1),children:[(0,i.jsx)(n.Hf3,{className:"mr-2 size-3.5 text-muted-foreground/70"}),"Asc"]}),(0,i.jsxs)(o.Xi,{onClick:()=>s.toggleSorting(!0),children:[(0,i.jsx)(n.veu,{className:"mr-2 size-3.5 text-muted-foreground/70"}),"Desc"]}),(0,i.jsx)(o.VD,{}),(0,i.jsxs)(o.Xi,{onClick:()=>s.toggleVisibility(!1),children:[(0,i.jsx)(n.L52,{className:"mr-2 size-3.5 text-muted-foreground/70"}),"Hide"]})]})]})}):(0,i.jsx)("div",{className:(0,d.cn)(t),children:a})}var u=a(12199),m=a(27689),h=a(26110),x=a(95186),p=a(26815),g=a(77992),v=a(67119);let f=v.Ry({id:v.Rx(),email:v.Z_(),emailVerified:v.Z_().nullable().optional(),roles:v.IX(v.Ry({id:v.Z_(),role:v.Z_()})).nullable().optional()});var j=a(13832),w=a(87769),N=a(42208),y=a(78867);function C(e){let{row:s}=e,{user:a}=(0,t.useContext)(j.S),l=f.parse(s.original),{toast:d}=(0,g.pm)(),[c,v]=(0,t.useState)(!1),[C,b]=(0,t.useState)(""),[S,k]=(0,t.useState)(!1),[P,z]=(0,t.useState)(!1),[R,A]=(0,u.D)(m.eY,{refetchQueries:[m.fo,"GetUsers"]}),[F]=(0,u.D)(m.ui,{refetchQueries:[m.fo,"GetUsers"]}),I=()=>{let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*",s="";for(let a=0;a<12;a++)s+=e.charAt(Math.floor(Math.random()*e.length));return s},_=async()=>{z(!0);try{await F({variables:{id:l.id,password:C}}),d({title:"Password reset",description:"Password has been reset for ".concat(l.email,".")}),v(!1),b(""),k(!1)}catch(e){console.error("Error resetting password:",e),d({title:"Error",description:"Failed to reset password. Please try again.",variant:"destructive"})}finally{z(!1)}},M=async e=>{try{await navigator.clipboard.writeText(e),d({title:"Copied",description:"Password copied to clipboard"})}catch(e){d({title:"Error",description:"Failed to copy to clipboard",variant:"destructive"})}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.h_,{modal:!1,children:[(0,i.jsx)(o.$F,{asChild:!0,children:(0,i.jsxs)(r.z,{variant:"ghost",className:"flex size-8 p-0 data-[state=open]:bg-muted",children:[(0,i.jsx)(n.nWS,{className:"size-4"}),(0,i.jsx)("span",{className:"sr-only",children:"Open menu"})]})}),(0,i.jsxs)(o.AW,{align:"end",className:"w-[160px]",children:[(0,i.jsx)(o.Xi,{onClick:()=>{b(I()),v(!0)},children:"Reset password"}),(0,i.jsx)(o.Xi,{onClick:()=>{if(a.id===l.id){d({title:"Cannot delete your own user",description:"You cannot delete your own user, that would be a bad idea."});return}window.confirm("Are you sure you want to delete this user?")&&(R({variables:{id:l.id}}),d({title:"Deleting user",description:"We deleted the user."}))},children:"Delete user"})]})]}),(0,i.jsx)(h.Vq,{open:c,onOpenChange:v,children:(0,i.jsxs)(h.cZ,{className:"max-w-md",children:[(0,i.jsxs)(h.fK,{children:[(0,i.jsx)(h.$N,{children:"Reset Password"}),(0,i.jsxs)(h.Be,{children:["A temporary password has been generated for ",l.email,". Copy and send it to the user manually."]})]}),(0,i.jsx)("div",{className:"space-y-4",children:(0,i.jsxs)("div",{children:[(0,i.jsx)(p._,{htmlFor:"password",children:"Temporary Password"}),(0,i.jsxs)("div",{className:"relative mt-1",children:[(0,i.jsx)(x.I,{id:"password",type:S?"text":"password",value:C,readOnly:!0,className:"pr-20"}),(0,i.jsxs)("div",{className:"absolute right-1 top-1/2 -translate-y-1/2 flex gap-1",children:[(0,i.jsx)(r.z,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>k(!S),children:S?(0,i.jsx)(w.Z,{className:"h-4 w-4"}):(0,i.jsx)(N.Z,{className:"h-4 w-4"})}),(0,i.jsx)(r.z,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>M(C),children:(0,i.jsx)(y.Z,{className:"h-4 w-4"})})]})]}),(0,i.jsxs)("p",{className:"text-sm text-muted-foreground mt-2",children:["Please copy this password and send it to ",l.email," manually. The user should change it on their first login."]})]})}),(0,i.jsxs)(h.cN,{children:[(0,i.jsx)(r.z,{variant:"outline",onClick:()=>{v(!1),b(""),k(!1)},children:"Cancel"}),(0,i.jsx)(r.z,{onClick:_,disabled:P,children:P?"Resetting...":"Reset Password"})]})]})})]})}var b=a(1828),S=a(63639);function k(e){let{user:s}=e,[a,l]=(0,t.useState)(!1),[n,o]=(0,t.useState)(!1),[d,c]=(0,t.useState)(null),{toast:x}=(0,g.pm)(),{user:p}=(0,t.useContext)(j.S),[v]=(0,u.D)(m.Pe,{refetchQueries:[m.fo,"GetUsers"]}),f=!!s.super_admin,w=(null==p?void 0:p.id)===s.id,N=async()=>{if(null!==d){o(!0);try{await v({variables:{id:s.id,super_admin:d}}),l(!1),c(null),x({title:d?"Super Admin Enabled":"Super Admin Disabled",description:"Super admin access has been ".concat(d?"granted to":"removed from"," ").concat(s.email,".")})}catch(e){x({title:"Error",description:e.message||"Failed to update super admin status.",variant:"destructive"})}finally{o(!1)}}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,i.jsx)(b.r,{checked:f,onCheckedChange:e=>{if(w&&f&&!e){x({title:"Cannot Disable Own Super Admin Rights",description:"You cannot disable your own super admin privileges for security reasons.",variant:"destructive"});return}c(e),l(!0)},disabled:n,className:"data-[state=checked]:bg-red-500 data-[state=checked]:border-red-500"}),(0,i.jsx)("span",{className:"text-sm text-muted-foreground",children:f?"Yes":"No"})]}),(0,i.jsx)(h.Vq,{open:a,onOpenChange:l,children:(0,i.jsxs)(h.cZ,{className:"sm:max-w-[475px]",children:[(0,i.jsxs)(h.fK,{children:[(0,i.jsxs)(h.$N,{children:[d?"Grant":"Remove"," Super Admin Access"]}),(0,i.jsxs)(h.Be,{children:[d?"Are you sure you want to grant super admin access to ".concat(s.email,"? This will give them full administrative privileges."):"Are you sure you want to remove super admin access from ".concat(s.email,"? They will lose all administrative privileges."),!d&&(0,i.jsxs)("div",{className:"mt-3 p-3 bg-amber-50 border border-amber-200 rounded-md flex items-start gap-2",children:[(0,i.jsx)(S.Z,{className:"h-4 w-4 text-amber-600 mt-0.5 flex-shrink-0"}),(0,i.jsxs)("p",{className:"text-sm text-amber-800",children:[(0,i.jsx)("strong",{children:"Warning:"})," Ensure you are not removing super admin access from the last super administrator. This could prevent anyone from managing users and system settings and requiring a technical support intervention to set the super admin status again via the database."]})]})]})]}),(0,i.jsxs)(h.cN,{children:[(0,i.jsx)(r.z,{variant:"outline",onClick:()=>{l(!1),c(null)},children:"Cancel"}),(0,i.jsx)(r.z,{onClick:N,disabled:n,variant:d?"destructive":"default",className:d?"bg-red-500 hover:bg-red-600":"",children:n?"Updating...":"Confirm"})]})]})})]})}var P=a(84426);let z=(e,s)=>[{id:"select",header:e=>{let{table:s}=e;return(0,i.jsx)(l.X,{checked:s.getIsAllPageRowsSelected()||s.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:e=>s.toggleAllPageRowsSelected(!!e),"aria-label":"Select all",className:"translate-y-[2px]"})},cell:e=>{let{row:s}=e;return(0,i.jsx)(l.X,{checked:s.getIsSelected(),onCheckedChange:e=>s.toggleSelected(!!e),"aria-label":"Select row",className:"translate-y-[2px]"})},enableSorting:!1,enableHiding:!1},{accessorKey:"email",header:e=>{let{column:s}=e;return(0,i.jsx)(c,{column:s,title:"Email"})},cell:e=>{let{row:s}=e;return(0,i.jsx)("div",{className:"flex space-x-2",children:(0,i.jsx)("span",{className:"max-w-[300px] truncate font-medium",children:s.original.email})})}},{accessorKey:"role",header:e=>{let{column:s}=e;return(0,i.jsx)(c,{column:s,title:"Role"})},cell:e=>{let{row:a}=e;return(0,i.jsx)("div",{className:"gap-x-2 flex",children:(0,i.jsx)(P.u,{value:a.original.role,onChange:e=>{window.confirm("Are you sure you want to update the role for this user?")&&s(a.original,e)}})})},filterFn:(e,s,a)=>a.includes(e.getValue(s))},{accessorKey:"status",header:e=>{let{column:s}=e;return(0,i.jsx)(c,{column:s,title:"Status"})},cell:e=>{let{row:s}=e;return(0,i.jsx)("div",{className:"flex w-[100px] items-center",children:s.original.emailVerified?(0,i.jsx)("p",{className:"text-primary",children:"verified"}):(0,i.jsx)("p",{className:"text-orange-400",children:"pending"})})},filterFn:(e,s,a)=>a.includes(e.getValue(s))},...(null==e?void 0:e.super_admin)?[{accessorKey:"super_admin",header:e=>{let{column:s}=e;return(0,i.jsx)(c,{column:s,title:"Super Admin"})},cell:e=>{let{row:s}=e;return(0,i.jsx)(k,{user:s.original})},enableSorting:!1}]:[],{id:"actions",cell:e=>{let{row:s}=e;return(0,i.jsx)(C,{row:s})}}];var R=a(7211),A=a(71594),F=a(24525),I=a(18930),_=a(99376),M=a(70085);function Z(e){let{table:s}=e;return(0,i.jsxs)(o.h_,{modal:!1,children:[(0,i.jsx)(M.$F,{asChild:!0,children:(0,i.jsxs)(r.z,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[(0,i.jsx)(n.hsZ,{className:"mr-2 size-4"}),"View"]})}),(0,i.jsxs)(o.AW,{align:"end",className:"w-[150px]",children:[(0,i.jsx)(o.Ju,{children:"Toggle columns"}),(0,i.jsx)(o.VD,{}),s.getAllColumns().filter(e=>void 0!==e.accessorFn&&e.getCanHide()).map(e=>(0,i.jsx)(o.bO,{className:"capitalize",checked:e.getIsVisible(),onCheckedChange:s=>e.toggleVisibility(!!s),children:e.id},e.id))]})]})}var E=a(10492),D=a(73578),U=a(44045);function V(e){let{isOpen:s,onClose:a}=e,{user:l}=(0,t.useContext)(j.S),n=(0,t.useContext)(U.E),{toast:o}=(0,g.pm)(),[d,c]=(0,t.useState)("email"),[v,f]=(0,t.useState)(""),[C,b]=(0,t.useState)(""),[S,k]=(0,t.useState)(!1),[P,z]=(0,t.useState)(!1),[R]=(0,u.D)(m.qK,{refetchQueries:[m.fo,"GetUsers"]}),A=()=>{let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*",s="";for(let a=0;a<12;a++)s+=e.charAt(Math.floor(Math.random()*e.length));return s},F=async()=>{if(!v.trim()){o({title:"Error",description:"Please enter an email address",variant:"destructive"});return}if(!v.includes("@")){o({title:"Error",description:"Please enter a valid email address",variant:"destructive"});return}(null==n?void 0:n.auth_mode)==="password"?(b(A()),c("password")):(await R({variables:{email:v.trim(),password:C,type:"user",emailVerified:new Date}}),o({title:"User created",description:"User ".concat(v," has been created successfully.")}),_())},I=async()=>{z(!0);try{await R({variables:{email:v.trim(),password:C}}),o({title:"User created",description:"User ".concat(v," has been created with a temporary password.")}),_()}catch(e){console.error("Error creating user:",e),o({title:"Error",description:"Failed to create user. Please try again.",variant:"destructive"})}finally{z(!1)}},_=()=>{c("email"),f(""),b(""),k(!1),z(!1),a()},M=async e=>{try{await navigator.clipboard.writeText(e),o({title:"Copied",description:"Password copied to clipboard"})}catch(e){o({title:"Error",description:"Failed to copy to clipboard",variant:"destructive"})}};return(null==l?void 0:l.super_admin)?(0,i.jsx)(h.Vq,{open:s,onOpenChange:_,children:(0,i.jsxs)(h.cZ,{className:"max-w-md",children:[(0,i.jsxs)(h.fK,{children:[(0,i.jsx)(h.$N,{children:"email"===d?"Add New User":"Generated Password"}),(0,i.jsx)(h.Be,{children:"email"===d?"Enter the email address for the new user.":"A temporary password has been generated. Copy and send it to the user manually."})]}),"email"===d&&(0,i.jsx)("div",{className:"space-y-4",children:(0,i.jsxs)("div",{children:[(0,i.jsx)(p._,{htmlFor:"email",children:"Email Address"}),(0,i.jsx)(x.I,{id:"email",type:"email",value:v,onChange:e=>f(e.target.value),placeholder:"user@example.com",className:"mt-1",autoFocus:!0})]})}),"password"===d&&(0,i.jsx)("div",{className:"space-y-4",children:(0,i.jsxs)("div",{children:[(0,i.jsx)(p._,{htmlFor:"password",children:"Temporary Password"}),(0,i.jsxs)("div",{className:"relative mt-1",children:[(0,i.jsx)(x.I,{id:"password",type:S?"text":"password",value:C,readOnly:!0,className:"pr-20"}),(0,i.jsxs)("div",{className:"absolute right-1 top-1/2 -translate-y-1/2 flex gap-1",children:[(0,i.jsx)(r.z,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>k(!S),children:S?(0,i.jsx)(w.Z,{className:"h-4 w-4"}):(0,i.jsx)(N.Z,{className:"h-4 w-4"})}),(0,i.jsx)(r.z,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>M(C),children:(0,i.jsx)(y.Z,{className:"h-4 w-4"})})]})]}),(0,i.jsxs)("p",{className:"text-sm text-muted-foreground mt-2",children:["Please copy this password and send it to ",v," manually. The user should change it on their first login."]})]})}),(0,i.jsxs)(h.cN,{children:[(0,i.jsx)(r.z,{variant:"outline",onClick:_,children:"Cancel"}),"email"===d&&(0,i.jsx)(r.z,{onClick:F,disabled:P,children:(null==n?void 0:n.auth_mode)==="password"?"Continue":"Add User"}),"password"===d&&(0,i.jsx)(r.z,{onClick:I,disabled:P,children:P?"Creating...":"Create User"})]})]})}):null}var G=a(99397);function O(e){var s,a,l,o,d,c,h,p,v,f,w,N,y,C,b,S,k,P,z,M;let U,O,{columns:T}=e,{toast:X}=(0,g.pm)(),K=(0,_.useRouter)(),{user:H}=t.useContext(j.S),[W,$]=t.useState({}),[q,Q]=t.useState({}),[Y,B]=t.useState([]),[J,L]=t.useState(!1),[ee,es]=(0,t.useState)([]),[ea,ei]=(0,t.useState)(1),[et,el]=t.useState([]),{loading:en,error:er,data:eo,refetch:ed,previousData:ec}=(0,R.aM)(m.fo,{fetchPolicy:"no-cache",nextFetchPolicy:"network-only",variables:{page:ea,limit:10,sort:{field:"createdAt",direction:"DESC"},filters:[...ee,{type:{ne:"api"}}]},pollInterval:3e4}),eu=t.useMemo(()=>[],[]),{limit:em,onPaginationChange:eh,skip:ex,pagination:ep}=function(){let[e,s]=(0,t.useState)({pageSize:5,pageIndex:0}),{pageSize:a,pageIndex:i}=e;return{limit:a,onPaginationChange:s,pagination:e,skip:a*i}}(),[eg,ev]=(0,u.D)(m.eY,{refetchQueries:[m.fo,"GetUsers"]});en&&(null==ec?void 0:null===(s=ec.usersPagination)||void 0===s?void 0:s.items)?(U=null==ec?void 0:null===(w=ec.usersPagination)||void 0===w?void 0:w.items,O=null==ec?void 0:null===(y=ec.usersPagination)||void 0===y?void 0:null===(N=y.pageInfo)||void 0===N?void 0:N.pageCount):(null==eo?void 0:null===(a=eo.usersPagination)||void 0===a?void 0:a.items)?(U=null==eo?void 0:null===(C=eo.usersPagination)||void 0===C?void 0:C.items,O=null==eo?void 0:null===(S=eo.usersPagination)||void 0===S?void 0:null===(b=S.pageInfo)||void 0===b?void 0:b.pageCount):(null==ec?void 0:null===(l=ec.usersPagination)||void 0===l?void 0:l.items)&&(U=null==ec?void 0:null===(k=ec.usersPagination)||void 0===k?void 0:k.items,O=null==ec?void 0:null===(z=ec.usersPagination)||void 0===z?void 0:null===(P=z.pageInfo)||void 0===P?void 0:P.pageCount);let ef=(0,A.b7)({data:null!=U?U:eu,pageCount:null!=O?O:-1,columns:T,state:{sorting:et,columnVisibility:q,rowSelection:W,columnFilters:Y},enableRowSelection:!0,onRowSelectionChange:$,onSortingChange:el,onColumnFiltersChange:B,onColumnVisibilityChange:Q,getCoreRowModel:(0,F.sC)(),getFilteredRowModel:(0,F.vL)(),getPaginationRowModel:(0,F.G_)(),getSortedRowModel:(0,F.tj)(),getFacetedRowModel:(0,F.o6)(),getFacetedUniqueValues:(0,F.JG)(),manualPagination:!0,onPaginationChange:eh}),ej=e=>{let s=[...ee],a=s.find(e=>e.email);(null==a?void 0:a.email)?a.email.contains=e:s.push({email:{contains:e}}),es(s),ed()},ew=ee.length>0;return(0,i.jsxs)("div",{className:"space-y-4",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"flex flex-1 items-center space-x-2",children:[(0,i.jsx)(x.I,{placeholder:"Filter users...",value:null!==(M=null==ee?void 0:null===(d=ee.find(e=>e.email))||void 0===d?void 0:null===(o=d.email)||void 0===o?void 0:o.contains)&&void 0!==M?M:"",onChange:e=>{ej(e.target.value)},className:"w-[150px] lg:w-[250px]"}),(0,i.jsx)(r.z,{variant:"outline",onClick:()=>{K.push("/roles")},children:"Manage roles"}),(null==H?void 0:H.super_admin)&&(0,i.jsxs)(r.z,{onClick:()=>L(!0),className:"flex items-center gap-2",children:[(0,i.jsx)(G.Z,{className:"size-4"}),"Add User"]}),ef.getIsSomeRowsSelected()||ef.getIsAllRowsSelected()?(0,i.jsx)("div",{className:"flex gap-x-2",children:(0,i.jsxs)(r.z,{onClick:()=>{if(!window.confirm("Are you sure you want to remove the selected users?"))return;let e=[];ef.getSelectedRowModel().rows.forEach(s=>{e.push(eg({variables:{id:s.original.id}}))}),Promise.all(e).then(()=>{ef.resetRowSelection(),X({title:"Removed users",description:"We removed "+e.length+" users."})})},variant:"secondary",disabled:ev.loading,children:[ev.loading?(0,i.jsx)(E.g,{}):(0,i.jsx)(I.Z,{className:"size-4"}),(0,i.jsx)("span",{className:"ml-2",children:"Remove selected"})]})}):null,ew&&(0,i.jsxs)(r.z,{variant:"ghost",onClick:()=>{let e=[...ee],s=e.find(e=>e.email);s&&e.splice(e.indexOf(s),1),es(e),ed()},children:["Reset",(0,i.jsx)(n.Pxu,{className:"ml-2 size-4"})]})]}),(0,i.jsx)(Z,{table:ef})]}),(0,i.jsx)("div",{className:"rounded-md border",children:(0,i.jsxs)(D.iA,{children:[(0,i.jsx)(D.xD,{children:ef.getHeaderGroups().map(e=>(0,i.jsx)(D.SC,{children:e.headers.map(e=>(0,i.jsx)(D.ss,{colSpan:e.colSpan,children:e.isPlaceholder?null:(0,A.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,i.jsx)(D.RM,{children:(null===(c=ef.getRowModel().rows)||void 0===c?void 0:c.length)?ef.getRowModel().rows.map(e=>(0,i.jsx)(D.SC,{"data-state":e.getIsSelected()&&"selected",children:e.getVisibleCells().map(e=>(0,i.jsx)(D.pj,{children:(0,A.ie)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,i.jsx)(D.SC,{children:(0,i.jsx)(D.pj,{colSpan:T.length,className:"h-24 text-center",children:"No results."})})})]})}),(0,i.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,i.jsxs)("div",{className:"text-muted-foreground flex-1 text-sm",children:[ef.getFilteredSelectedRowModel().rows.length," of"," ",ef.getFilteredRowModel().rows.length," row(s) selected."]}),(0,i.jsxs)("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[(0,i.jsxs)("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:["Page ",ea," of ",ef.getPageCount()]}),(0,i.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,i.jsxs)(r.z,{variant:"outline",className:"hidden size-8 p-0 lg:flex",onClick:()=>{ef.setPageIndex(0),ei(1),ed()},disabled:!(null==eo?void 0:null===(h=eo.usersPagination)||void 0===h?void 0:h.pageInfo.hasPreviousPage),children:[(0,i.jsx)("span",{className:"sr-only",children:"Go to first page"}),(0,i.jsx)(n.kRt,{className:"size-4"})]}),(0,i.jsxs)(r.z,{variant:"outline",className:"size-8 p-0",onClick:()=>{ef.previousPage(),ei(ea-1),ed()},disabled:!(null==eo?void 0:null===(p=eo.usersPagination)||void 0===p?void 0:p.pageInfo.hasPreviousPage),children:[(0,i.jsx)("span",{className:"sr-only",children:"Go to previous page"}),(0,i.jsx)(n.wyc,{className:"size-4"})]}),(0,i.jsxs)(r.z,{variant:"outline",className:"size-8 p-0",onClick:()=>{ef.nextPage(),ei(ea+1),ed()},disabled:!(null==eo?void 0:null===(v=eo.usersPagination)||void 0===v?void 0:v.pageInfo.hasNextPage),children:[(0,i.jsx)("span",{className:"sr-only",children:"Go to next page"}),(0,i.jsx)(n.XCv,{className:"size-4"})]}),(0,i.jsxs)(r.z,{variant:"outline",className:"hidden size-8 p-0 lg:flex",onClick:()=>{ei(ef.getPageCount()),ed()},disabled:!(null==eo?void 0:null===(f=eo.usersPagination)||void 0===f?void 0:f.pageInfo.hasNextPage),children:[(0,i.jsx)("span",{className:"sr-only",children:"Go to last page"}),(0,i.jsx)(n.yr4,{className:"size-4"})]})]})]})]}),(0,i.jsx)(V,{isOpen:J,onClose:()=>L(!1)})]})}let T="force-dynamic";function X(){let{user:e}=(0,t.useContext)(j.S),s=z(e,(e,s)=>{console.log("user",e),console.log("role",s),a({variables:{id:e.id,role:s}})}),[a,l]=(0,u.D)(m.Pe,{refetchQueries:[m.fo,"GetUsers"]});return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"hidden h-full flex-1 flex-col space-y-8 p-8 md:flex",children:[(0,i.jsx)("div",{className:"flex items-center justify-between space-y-2",children:(0,i.jsxs)("div",{children:[(0,i.jsx)("h2",{className:"text-2xl font-bold tracking-tight",children:"Users"}),(0,i.jsx)("p",{className:"text-muted-foreground",children:"Here's a list of all the users."})]})}),(0,i.jsx)(O,{columns:s})]})})}},19060:function(e,s,a){"use strict";a.d(s,{X:function(){return o}});var i=a(57437),t=a(9270),l=a(30401),n=a(2265),r=a(94508);let o=n.forwardRef((e,s)=>{let{className:a,...n}=e;return(0,i.jsx)(t.fC,{ref:s,className:(0,r.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",a),...n,children:(0,i.jsx)(t.z$,{className:(0,r.cn)("flex items-center justify-center text-current"),children:(0,i.jsx)(l.Z,{className:"size-4"})})})});o.displayName=t.fC.displayName},26815:function(e,s,a){"use strict";a.d(s,{_:function(){return d}});var i=a(57437),t=a(6394),l=a(90535),n=a(2265),r=a(94508);let o=(0,l.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=n.forwardRef((e,s)=>{let{className:a,...l}=e;return(0,i.jsx)(t.f,{ref:s,className:(0,r.cn)(o(),a),...l})});d.displayName=t.f.displayName},10492:function(e,s,a){"use strict";a.d(s,{g:function(){return l}});var i=a(57437),t=a(94508);let l=e=>{let{className:s}=e;return(0,i.jsxs)("svg",{"aria-hidden":"true",role:"status",className:(0,t.cn)("inline w-4 h-4 text-white animate-spin fill-inherit",s),viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",className:"fill-inherit opacity-20"}),(0,i.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",className:"fill-inherit"})]})}},1828:function(e,s,a){"use strict";a.d(s,{r:function(){return r}});var i=a(57437),t=a(50721),l=a(2265),n=a(94508);let r=l.forwardRef((e,s)=>{let{className:a,...l}=e;return(0,i.jsx)(t.fC,{className:(0,n.cn)("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",a),...l,ref:s,children:(0,i.jsx)(t.bU,{className:(0,n.cn)("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})})});r.displayName=t.fC.displayName}},function(e){e.O(0,[8310,9851,7629,7093,6148,847,1942,7648,7823,8068,5799,605,4567,1206,5338,9877,1594,7086,1707,6373,3832,4386,2971,2117,1744],function(){return e(e.s=3863)}),_N_E=e.O()}]);
|
|
2
|
+
//# sourceMappingURL=page-49212081be40aeca.js.map
|