@emintech/core 0.8.6 → 0.8.7
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/{chunk-37TRFDA4.js → chunk-2ZZVRAC2.js} +1 -1
- package/dist/{chunk-HZVHIJJY.js → chunk-3ZSQL2FG.js} +1 -1
- package/dist/chunk-6JANELO6.js +1 -0
- package/dist/{chunk-R7O5BURF.js → chunk-6PI2N5AX.js} +1 -1
- package/dist/chunk-6S6OHJ3G.js +3 -0
- package/dist/{chunk-WD7FUMEI.js → chunk-7TZMAWS6.js} +1 -1
- package/dist/chunk-AG4EHKB7.js +1 -0
- package/dist/chunk-BRXJM2GG.js +0 -0
- package/dist/chunk-D5ORVBB6.js +1 -0
- package/dist/{chunk-7UAWAQIK.js → chunk-E4XU52EE.js} +1 -1
- package/dist/{chunk-H46XE7EE.js → chunk-FH3ERVYP.js} +1 -1
- package/dist/chunk-FIZXF3HF.js +1 -0
- package/dist/{chunk-JN47FIUF.js → chunk-GJE7VQA3.js} +1 -1
- package/dist/chunk-GYMXN7BF.js +1 -0
- package/dist/chunk-L2UKX2NN.js +1 -0
- package/dist/chunk-L7QST6XM.js +1 -0
- package/dist/chunk-MQQ7W7QI.js +1 -0
- package/dist/{chunk-FATDDXFE.js → chunk-MXCVQQZ5.js} +1 -1
- package/dist/chunk-PJMGHYAG.js +1 -0
- package/dist/{chunk-3MGLNOJ3.js → chunk-PWQOU5TI.js} +1 -1
- package/dist/chunk-SC5FEULM.js +1 -0
- package/dist/{chunk-EM2YQHLL.js → chunk-TEUFO6KQ.js} +1 -1
- package/dist/{chunk-YU4IH7J6.js → chunk-VQRZZNRC.js} +1 -1
- package/dist/chunk-Y7U6EVDQ.js +1 -0
- package/dist/{chunk-L4TSYLY2.js → chunk-YIM5JIER.js} +1 -1
- package/dist/{chunk-B22UA2KA.js → chunk-YRATU7YA.js} +1 -1
- package/dist/chunk-ZDXMRR4H.js +2 -0
- package/dist/emincore.register.js +1 -1
- package/dist/features/account/change-password/components/PasswordForm.js +1 -1
- package/dist/features/account/change-password/index.js +1 -1
- package/dist/features/account/change-password/pages/index.js +1 -1
- package/dist/features/account/delete-account/components/DeleteAccountForm.js +1 -1
- package/dist/features/account/delete-account/index.js +1 -1
- package/dist/features/account/delete-account/pages/index.js +1 -1
- package/dist/features/account/index.js +1 -1
- package/dist/features/account/preferences/pages/index.js +1 -1
- package/dist/features/account/profile/components/Profile.js +1 -1
- package/dist/features/account/profile/components/ProfileForm.js +1 -1
- package/dist/features/account/profile/index.js +1 -1
- package/dist/features/account/profile/pages/EditProfilePage.js +1 -1
- package/dist/features/account/profile/pages/IndexProfilePage.js +1 -1
- package/dist/features/account/shared/components/MyAccountHeader.js +1 -1
- package/dist/features/account/shared/components/UserLabel.js +1 -1
- package/dist/features/account/shared/components/UserMenu.js +1 -1
- package/dist/features/account/shared/components/index.js +1 -1
- package/dist/features/account/shared/index.js +1 -1
- package/dist/features/account/shared/layouts/MyAccountLayout.js +1 -1
- package/dist/features/app/components/AppHeader.js +1 -1
- package/dist/features/app/components/AppLogo.js +1 -1
- package/dist/features/app/index.js +1 -1
- package/dist/features/app/layout/AppLayout.js +1 -1
- package/dist/features/appearance/components/AppearanceButton.js +1 -1
- package/dist/features/appearance/components/AppearanceDropdown.js +1 -1
- package/dist/features/appearance/components/AppearanceToggle.js +1 -1
- package/dist/features/appearance/hooks/use-appearance.js +1 -1
- package/dist/features/appearance/index.js +1 -1
- package/dist/features/appearance/lib/appearance-service.js +1 -1
- package/dist/features/auth/index.js +1 -1
- package/dist/features/auth/login/components/Login.js +1 -1
- package/dist/features/auth/login/hooks/use-login-form.js +1 -1
- package/dist/features/auth/login/index.js +1 -1
- package/dist/features/auth/password/confirmation/components/PasswordConfirmation.js +1 -1
- package/dist/features/auth/password/confirmation/index.js +1 -1
- package/dist/features/auth/password/forgot/components/PasswordForgot.js +1 -1
- package/dist/features/auth/password/forgot/index.js +1 -1
- package/dist/features/auth/password/index.js +1 -1
- package/dist/features/auth/password/reset/components/PasswordReset.js +1 -1
- package/dist/features/auth/password/reset/index.js +1 -1
- package/dist/features/auth/register/components/Register.js +1 -1
- package/dist/features/auth/register/index.js +1 -1
- package/dist/features/auth/shared/components/PasswordInput.js +1 -1
- package/dist/features/auth/shared/index.js +1 -1
- package/dist/features/auth/shared/layouts/AuthLayout.js +1 -1
- package/dist/features/auth/verify/email/components/EmailVerify.js +1 -1
- package/dist/features/auth/verify/email/index.js +1 -1
- package/dist/features/auth/verify/index.js +1 -1
- package/dist/features/dashboard/components/DashboardSidebar.js +1 -1
- package/dist/features/dashboard/components/DashboardTopbar.js +1 -1
- package/dist/features/dashboard/index.js +1 -1
- package/dist/features/dashboard/layouts/DashboardLayout.js +1 -1
- package/dist/features/emin-jobs/components/EminJobsComponents.js +1 -1
- package/dist/features/emin-jobs/hooks/use-emin-jobs.js +1 -1
- package/dist/features/emin-jobs/index.js +1 -1
- package/dist/features/marketplace/components/MarketplaceComponents.js +1 -1
- package/dist/features/marketplace/context/MarketplaceContext.js +1 -1
- package/dist/features/marketplace/index.js +1 -1
- package/dist/features/marketplace/pages/IndexMarketplacePage.js +1 -1
- package/dist/features/notifications/components/EminNotification.d.ts +2 -1
- package/dist/features/notifications/components/EminNotification.js +1 -1
- package/dist/features/notifications/context/NotificationsContext.d.ts +4 -1
- package/dist/features/notifications/context/NotificationsContext.js +1 -1
- package/dist/features/notifications/index.js +1 -1
- package/dist/features/notifications/pages/UserNotificationsPage.js +1 -1
- package/dist/features/package-manager/index.js +1 -1
- package/dist/features/package-manager/installer/index.js +1 -1
- package/dist/features/package-manager/installer/lib/installer-formatter.js +1 -1
- package/dist/features/package-manager/shared/components/PackageManagerModal.js +1 -1
- package/dist/features/package-manager/shared/context/PackageManagerContext.js +1 -1
- package/dist/features/package-manager/shared/hooks/use-package-version-selector.d.ts +8 -0
- package/dist/features/package-manager/shared/hooks/use-package-version-selector.js +1 -0
- package/dist/features/package-manager/shared/index.d.ts +1 -1
- package/dist/features/package-manager/shared/index.js +1 -1
- package/dist/features/package-manager/shared/lib/package-manager-formatter.js +1 -1
- package/dist/features/package-manager/shared/lib/package-manager-services.js +1 -1
- package/dist/features/package-manager/shared/types/package-manager.types.d.ts +9 -0
- package/dist/features/package-manager/shared/types/package-manager.types.js +1 -0
- package/dist/features/package-manager/updater/api/updater.api.d.ts +7 -7
- package/dist/features/package-manager/updater/api/updater.api.js +1 -1
- package/dist/features/package-manager/updater/index.js +1 -1
- package/dist/features/package-manager/updater/lib/updater-formatter.js +1 -1
- package/dist/features/package-manager/updater/lib/updater-service.js +1 -1
- package/dist/features/packages/components/Packages.js +1 -1
- package/dist/features/packages/components/PackagesTable.js +1 -1
- package/dist/features/packages/context/PackagesContext.js +1 -1
- package/dist/features/packages/index.js +1 -1
- package/dist/features/packages/lib/packages-formatter.js +1 -1
- package/dist/features/packages/pages/IndexPackagesPage.js +1 -1
- package/dist/features/platform/components/PlatformComponents.js +1 -1
- package/dist/features/platform/components/PlatformPageComponents.js +1 -1
- package/dist/features/platform/index.js +1 -1
- package/dist/features/platform/lib/platform-formatter.js +1 -1
- package/dist/features/platform/pages/IndexPlatformPage.js +1 -1
- package/dist/features/settings/api/settings.api.js +1 -1
- package/dist/features/settings/context/SettingsContext.js +1 -1
- package/dist/features/settings/index.js +1 -1
- package/dist/features/settings/layouts/SettingsLayout.js +1 -1
- package/dist/features/settings/lib/settings-formatter.d.ts +1 -1
- package/dist/features/settings/lib/settings-formatter.js +1 -1
- package/dist/features/settings/pages/DesignSettingsPage.js +1 -1
- package/dist/features/settings/pages/GeneralSettingsPage.js +1 -1
- package/dist/features/settings/pages/MailSettingsPage.js +1 -1
- package/dist/features/settings/pages/NavPage.js +1 -1
- package/dist/features/slugs/components/slugs.js +1 -1
- package/dist/features/slugs/context/SlugsContext.js +1 -1
- package/dist/features/slugs/index.js +1 -1
- package/dist/features/users/components/UserModal.js +1 -1
- package/dist/features/users/components/UsersPage.js +1 -1
- package/dist/features/users/components/UsersStatistics.js +1 -1
- package/dist/features/users/components/UsersTable.js +1 -1
- package/dist/features/users/index.js +1 -1
- package/dist/features/users/lib/users-formatter.js +1 -1
- package/dist/features/users/widgets/UserStatisticsWidget.js +1 -1
- package/dist/features/widgets/components/WidgetMenu.js +1 -1
- package/dist/features/widgets/components/WidgetProfileMenu.js +1 -1
- package/dist/features/widgets/components/WidgetsComponents.js +1 -1
- package/dist/features/widgets/components/WidgetsScreen.js +1 -1
- package/dist/features/widgets/index.js +1 -1
- package/dist/integrations/emincore/page.registry.js +1 -1
- package/dist/integrations/emincore/provider.registry.js +1 -1
- package/dist/integrations/emincore/widget.registry.js +1 -1
- package/dist/pages/auth/login.js +1 -1
- package/dist/pages/auth/password-confirm.js +1 -1
- package/dist/pages/auth/password-forgot.js +1 -1
- package/dist/pages/auth/password-reset.js +1 -1
- package/dist/pages/auth/register.js +1 -1
- package/dist/pages/auth/verify-email.js +1 -1
- package/dist/pages/dashboard/index.js +1 -1
- package/dist/pages/dashboard/marketplace/index.js +1 -1
- package/dist/pages/dashboard/packages/index.js +1 -1
- package/dist/pages/dashboard/platform/index.js +1 -1
- package/dist/pages/dashboard/settings/index.js +1 -1
- package/dist/pages/dashboard/settings/slugs/index.js +1 -1
- package/dist/pages/dashboard/users/index.js +1 -1
- package/dist/pages/my-account/notifications/index.js +1 -1
- package/dist/pages/my-account/profile/edit-password.js +1 -1
- package/dist/pages/my-account/profile/edit.js +1 -1
- package/dist/pages/my-account/profile/index.js +1 -1
- package/dist/provider.js +1 -1
- package/dist/shared/components/composite/AlertModal.js +1 -1
- package/dist/shared/components/composite/EminEditable.js +1 -1
- package/dist/shared/components/composite/EminFormButton.js +1 -1
- package/dist/shared/components/composite/EminInput.js +1 -1
- package/dist/shared/components/composite/EminPreference.js +1 -1
- package/dist/shared/components/composite/EminPreloader.js +1 -1
- package/dist/shared/components/composite/Menu/EminMenu.js +1 -1
- package/dist/shared/components/composite/Menu/EminSidebarMenu.js +1 -1
- package/dist/shared/components/composite/Menu/index.js +1 -1
- package/dist/shared/components/composite/QuickMenu/QuickMenu.js +1 -1
- package/dist/shared/components/composite/QuickMenu/index.js +1 -1
- package/dist/shared/components/composite/RoleBadge.js +1 -1
- package/dist/shared/components/composite/SectionCard.js +1 -1
- package/dist/shared/components/composite/StatisticCards.js +1 -1
- package/dist/shared/components/composite/index.js +1 -1
- package/dist/shared/components/index.js +1 -1
- package/dist/shared/components/ui/avatar.js +1 -1
- package/dist/shared/components/ui/breadcrumbs.js +1 -1
- package/dist/shared/components/ui/chart.js +1 -1
- package/dist/shared/components/ui/sidebar.js +1 -1
- package/dist/shared/components/ui/slider.js +1 -1
- package/dist/shared/components/ui/team-switcher.js +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/modules/emin-table/components/EminTable.js +1 -1
- package/dist/shared/modules/emin-table/components/EminTableContent.js +1 -1
- package/dist/shared/modules/emin-table/components/EminTablePagination.js +1 -1
- package/dist/shared/modules/emin-table/components/EminTableToolbar.js +1 -1
- package/dist/shared/modules/emin-table/context/EminTableContext.js +1 -1
- package/dist/shared/modules/emin-table/index.js +1 -1
- package/dist/shared/modules/index.js +1 -1
- package/dist/shared/modules/world-map/components/WorldMap2D.js +1 -1
- package/dist/shared/modules/world-map/context/WorldMapContext.js +1 -1
- package/dist/shared/modules/world-map/index.js +1 -1
- package/dist/shared/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/chunk-2GVRXCFU.js +0 -1
- package/dist/chunk-7VMEGPPO.js +0 -1
- package/dist/chunk-AGX2N7HI.js +0 -1
- package/dist/chunk-E5TMX3GR.js +0 -1
- package/dist/chunk-EABDMJDG.js +0 -1
- package/dist/chunk-FAHSY2DO.js +0 -1
- package/dist/chunk-JW53YYMS.js +0 -1
- package/dist/chunk-MFPLHKIJ.js +0 -1
- package/dist/chunk-QEQYOW5R.js +0 -1
- package/dist/chunk-RY6OUBHE.js +0 -1
- package/dist/chunk-UUF3H3EU.js +0 -1
- package/dist/chunk-YHEAFMGX.js +0 -1
- package/dist/features/package-manager/shared/api/package-manager.api.d.ts +0 -1
- package/dist/features/package-manager/shared/api/package-manager.api.js +0 -1
- /package/dist/{chunk-G4NK34VB.js → chunk-MVO5CO4K.js} +0 -0
- /package/dist/{chunk-KTO3FKGZ.js → chunk-Q4GG4CRQ.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as O,b as u,c as C,d as R,e as U,f as V}from"./chunk-RCUM5ZGQ.js";import{a as A,b as p}from"./chunk-
|
|
1
|
+
import{a as O,b as u,c as C,d as R,e as U,f as V}from"./chunk-RCUM5ZGQ.js";import{a as A,b as p}from"./chunk-6JANELO6.js";import{c as h,h as y}from"./chunk-6S6OHJ3G.js";import{a as F}from"./chunk-6PI2N5AX.js";import{g as N}from"./chunk-L2UKX2NN.js";import{a as E}from"./chunk-QKGQOXDM.js";import{a as B,f as L,j as _}from"./chunk-QFUZ6MVT.js";import{b as m}from"./chunk-TVCWAJFT.js";import{a as z}from"./chunk-3DBYUBWW.js";import{a as I}from"./chunk-65LRDGYI.js";import{a as l}from"./chunk-G4EEZUTC.js";import{a as o}from"./chunk-GND5KQRZ.js";import{IconCircleCheckFilled as H,IconCircleX as W,IconDownload as re,IconRefresh as oe,IconStar as q,IconStarFilled as D,IconUsersGroup as ne,IconX as ie}from"@tabler/icons-react";import{Fragment as ce,jsx as n,jsxs as v}from"react/jsx-runtime";var fe=({packages:a,marketPackages:t,meta:c,account:r,error:i})=>n(F,{breadcrumbs:[{icon:"IconBuildingStore",title:"Marketplace"}],children:n(A,{packages:a,marketPackages:t,account:r??null,meta:c,error:i,children:v("div",{className:"grid gap-10",children:[n(T,{className:"mt-15 mb-25"}),n(te,{}),n($,{})]})})}),te=()=>{let{marketPackages:a}=p(),t=a?.filter(r=>r.code.startsWith("emintech")),c=a?.filter(r=>!r.code.startsWith("emintech"));return v(ce,{children:[t&&t?.length>0&&v("div",{className:"grid gap-7",children:[n(I,{title:"Official Packages",description:"Explore the Emin Tech's official packages.",icon:"IconStar",buttons:n(m,{variant:"link",children:"View All"})}),n("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-5",children:t.map(r=>n(M,{pkg:r}))})]}),c&&c.length>0&&v("div",{className:"grid gap-7",children:[n(I,{title:"Community Packages",description:"These community packages have been quality-checked and are fully compatible.",icon:"IconUsers",buttons:n(m,{variant:"link",children:"View All"})}),n("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-5",children:c.map(r=>n(M,{pkg:r}))})]})]})};import{useForm as le}from"@inertiajs/react";import{Fragment as G,jsx as e,jsxs as s}from"react/jsx-runtime";var T=({className:a})=>{let{meta:t}=p();return s("div",{className:o("grid gap-4",a),children:[e(l,{iconName:"IconPackages",className:"mx-auto h-15 w-15"}),s("div",{className:"grid text-center",children:[e("h2",{className:"text-2xl font-bold",children:"Search what do you need?"}),e("span",{className:"text-sm text-muted-foreground",children:"Search for packages by name or category."})]}),e(E,{placeholder:"Search package name, author, or category...",value:t?.search,className:"bg-accent/10"})]})},M=({pkg:a,className:t})=>{let{setSelectedPackage:c,setIsDetailModalOpen:r}=p(),{packages:i}=h(),d=i.find(k=>k.code===a.code)??null;return s(z,{className:o("p-2 bg-accent/10 w-full shadow-md hover:scale-105 duration-300",t),children:[s("div",{className:"grid gap-4 cursor-pointer",onClick:()=>{c(a),r(!0)},children:[e("div",{className:"w-full h-auto rounded-lg aspect-[4/3] shadow-sm",style:{backgroundImage:`url(${a.image})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}),s("div",{className:"grid px-2 gap-2",children:[s("div",{className:"flex items-center gap-1",children:[e(X,{pkg:a}),e(y,{pkg:{...a,is_custom:!1},className:"ml-auto text-sm",size:18})]}),e("hr",{}),s("span",{className:"text-sm text-muted-foreground truncate",children:[a.description," "]}),s("div",{className:"flex items-center",children:[d?s("div",{className:"flex items-center gap-2",children:[e(H,{className:"w-5 h-5 text-green-500 shrink-0"}),e("span",{className:"text-xs text-green-500",children:"Installed"})]}):e(K,{pkg:a,className:"text-xs"}),e(Y,{pkg:a,className:"text-xs ml-auto text-muted-foreground"})]})]})]}),e("div",{className:"px-2 mb-1",children:e(Q,{pkg:a})})]})},$=()=>{let{isDetailModalOpen:a,setIsDetailModalOpen:t,selectedPackage:c}=p(),{packages:r}=h();if(!a||!c)return;let i=r.find(d=>d.code===c.code)??null;return e(B,{open:a,onOpenChange:t,children:s(L,{className:"min-h-[25vh] max-h-[80vh] min-w-[90vw] sm:min-w-[70vw] xl:min-w-[60vw] 2xl:min-w-[50vw] grid gap-5 overflow-y-auto",children:[e("div",{className:"",children:e("div",{className:"w-full h-auto rounded-lg aspect-[4/3] shadow-sm lg:aspect-[16/5]",style:{backgroundImage:`url(${c.cover??c.image})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}})}),s("div",{className:"grid grid-cols-1 lg:grid-cols-[4fr_2fr] gap-5",children:[s("div",{className:"grid grid-cols-1 gap-2",children:[e(X,{pkg:c}),e(_,{children:c.description}),e(K,{pkg:c,className:"text-xs"})]}),s("div",{className:"grid gap-3",children:[e(J,{pkg:c,className:"text-sm text-muted-foreground hover:text-primary cursor-pointer"}),e(y,{pkg:{...c,is_custom:!1},className:"text-sm flex items-center gap-2",size:20}),e(pe,{pkg:c,className:"text-sm text-muted-foreground"}),e(me,{pkg:c,className:"text-sm text-muted-foreground"}),s("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e(ne,{className:"w-5 h-5 shrink-0"}),e(Y,{pkg:c,className:"text-sm"})]})]}),s("div",{className:"col-span-full grid gap-2",children:[e(Q,{pkg:c}),C(u(c),i)==="uninstall"&&e("div",{className:"col-span-full w-full grid gap-2",children:s("span",{className:"text-xs text-center text-muted-foreground",children:["You installed that at ",i?.created_at?new Date(i.created_at).toLocaleString():"N/A"]})})]})]})]})})},X=({pkg:a,className:t})=>s("div",{className:o("grid grid-cols-[25px_auto] gap-2",t),children:[e(l,{iconName:"IconPackage",className:"shrink-0 w-full"}),e("span",{className:"font-bold truncate",children:a.name})]}),Ve=({pkg:a,className:t})=>e("div",{className:o("grid gap-2",t),children:e(J,{pkg:a})}),K=({pkg:a,className:t})=>e("div",{className:o("flex items-center gap-2",t),children:V(u(a))?s(G,{children:[e(H,{className:"w-5 h-5 shrink-0 text-green-400"}),e("div",{className:"grid",children:e("span",{className:"text-green-400 truncate",children:"Compatible with your app"})})]}):s(G,{children:[e(W,{className:"w-5 h-5 shrink-0 text-red-400"}),e("div",{className:"grid",children:e("span",{className:"text-red-400 truncate",children:"Not compatible with your app"})})]})}),Y=({pkg:a,className:t})=>s("div",{className:o("flex items-center gap-2 shrink-0",t),children:[s("span",{className:"shrink-0",children:[Math.floor(Math.random()*1e3).toFixed(0)," Reviews"]}),s("div",{className:"flex items-center gap-0 shrink-0",children:[e(D,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(D,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(D,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(q,{className:"h-[18px] w-[18px] shrink-0"}),e(q,{className:"h-[18px] w-[18px] shrink-0"})]})]}),J=({pkg:a,className:t})=>s("div",{className:o("flex items-center gap-2",t),children:[e(l,{iconName:"IconUserCircle",className:"shrink-0 w-5 h-5"}),e("a",{href:O(a.author),className:"capitalize",children:a.author??"yok"})]}),me=({pkg:a,text:t="Last Update:",className:c})=>s("div",{className:o("flex items-center gap-2",c),children:[e(l,{iconName:"IconCalendar",className:"shrink-0 w-5 h-5"}),s("span",{children:[t,"\xA0",new Date(a.updated_at??"").toLocaleDateString()??"-"]})]}),pe=({pkg:a,text:t="Core Requirement:",className:c})=>s("div",{className:o("flex items-center gap-2",c),children:[e(l,{iconName:"IconInfoCircle",className:"shrink-0 w-5 h-5"}),s("span",{children:[t,"\xA0",u(a)?.core_constraint??"-"]})]}),Q=({pkg:a,className:t})=>{let{packages:c,setProcess:r,setPackageManifest:i,setIsLoading:d,setIsModalOpen:k}=h(),Z=c.find(g=>g.code===a.code)??null,x=u(a),f=C(x,Z),{post:j,setData:ee,recentlySuccessful:P,processing:w}=le(),ae=()=>(d(!0),k(!0),new Promise(S=>j(route("dashboard.packages.manager"),{onSuccess:()=>S(!0),onError:se=>S(se)}))),b=g=>{r(g),i(R(a,x.version)),ee({process:g,manifest:{code:a.code,version:x.version,core_constraint:x.core_constraint}}),ae().then(()=>k(!1))};return f==="buy"?e("a",{href:U(a),target:"_blank",rel:"noopener noreferrer",children:s(m,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),children:[e(l,{iconName:a.price?"IconCreditCardPay":"IconMoodHappy",className:"shrink-0 w-5 h-5"}),e("span",{children:a.price?a.price+"$":"Get It Free"})]})}):f==="install"?s(N,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>b("install"),recentlySuccessful:P,processing:w,children:[e(re,{className:"shrink-0 w-5 h-5"}),e("span",{children:"Install"})]}):f=="uninstall"?s(N,{size:"sm",variant:"destructive",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>b("uninstall"),recentlySuccessful:P,processing:w,children:[e(ie,{className:"w-5 h-5 shrink-0"}),e("span",{children:"Uninstall"})]}):f=="update"?s(N,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>b("update"),recentlySuccessful:P,processing:w,children:[e(oe,{className:"w-5 h-5 shrink-0"}),e("span",{children:"Update"})]}):s(m,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),disabled:!0,children:[e(W,{className:"w-5 h-5 shrink-0 text-red-400"}),e("span",{children:"Not Compatible with your core version"})]})};export{T as a,M as b,$ as c,X as d,Ve as e,K as f,Y as g,J as h,me as i,pe as j,Q as k,fe as l,te as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./chunk-G4EEZUTC.js";import{jsx as a}from"react/jsx-runtime";var r=(e,i)=>[{icon:"IconTrafficCone",title:"Maintenance Mode",description:"If you enable the maintenance mode, the system will be in maintenance mode.",key:"maintenance",value:e?.maintenance,options:[{value:"0",icon:a(t,{iconName:"IconX"}),title:"Inactive",color:"red"},{value:"1",icon:a(t,{iconName:"IconCheck"}),title:"Active",color:"green"}],onSave:o=>i(o.key,o.value)}],c=(e,i)=>[{icon:"IconPalette",title:"Default Theme",description:"Change the default theme of the system.",key:"default_theme",value:e?.default_theme,options:[{value:"dark",icon:"IconMoonFilled",title:"Dark Theme",color:"gray"},{value:"light",icon:"IconSunFilled",title:"Light Theme",color:"cyan"},{value:"system",icon:"IconDeviceDesktop",title:"System Theme",color:"gray"}],onSave:o=>i(o.key,o.value)}],
|
|
1
|
+
import{a as t}from"./chunk-G4EEZUTC.js";import{jsx as a}from"react/jsx-runtime";var r=(e,i)=>[{icon:"IconTrafficCone",title:"Maintenance Mode",description:"If you enable the maintenance mode, the system will be in maintenance mode.",key:"maintenance",value:e?.maintenance,options:[{value:"0",icon:a(t,{iconName:"IconX"}),title:"Inactive",color:"red"},{value:"1",icon:a(t,{iconName:"IconCheck"}),title:"Active",color:"green"}],onSave:o=>i(o.key,o.value)}],c=(e,i)=>[{icon:"IconPalette",title:"Default Theme",description:"Change the default theme of the system.",key:"default_theme",value:e?.default_theme,options:[{value:"dark",icon:"IconMoonFilled",title:"Dark Theme",color:"gray"},{value:"light",icon:"IconSunFilled",title:"Light Theme",color:"cyan"},{value:"system",icon:"IconDeviceDesktop",title:"System Theme",color:"gray"}],onSave:o=>i(o.key,o.value)}],m=e=>[{key:"favicon",title:"Favicon",description:"Favicon for the system",value:e?.favicon},{key:"dark_logo",title:"Dark Logo",description:"Vertical logo for dark theme",value:e?.dark_logo},{key:"light_logo",title:"Light Logo",description:"Vertical logo for light theme",value:e?.light_logo??"https://tailwindcss.com/_next/static/media/tailwindcss-logotype-white.541819ec.svg"}],s=e=>[...e?.mail_mailer==="smtp"?[{key:"mail_host",title:"Mail Host",description:"Mail host of the system",icon:"IconMail",value:e?.mail_host,placeholder:"mail.emincore.io",type:"string"},{key:"mail_port",title:"Mail Port",description:"Mail port of the system",icon:"IconNumber",value:e?.mail_port,placeholder:"465",type:"string"},{key:"mail_username",title:"Mail Username",description:"Mail username of the system",icon:"IconUser",value:e?.mail_username,placeholder:"info@emincore.io",type:"string"},{key:"mail_password",title:"Mail Password",description:"Mail password of the system",icon:"IconKey",value:e?.mail_password,placeholder:"pass123",type:"password"}]:[],...e?.mail_mailer!=="log"?[{key:"mail_from_address",title:"Mail From Address",description:"Default mail from address of the system",icon:"IconMail",value:e?.mail_from_address,placeholder:"info@emincore.io",type:"string"},{key:"mail_from_name",title:"Mail From Name",description:"Default mail from name of the system",icon:"IconUser",value:e?.mail_from_name,placeholder:"Emin Core",type:"string"}]:[],{key:"mail_mailer",title:"Mail Mailer",description:"Default mailer of the system",icon:"IconMail",value:e?.mail_mailer,placeholder:"smtp",type:"string"}];export{r as a,c as b,m as c,s as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n,f as s}from"./chunk-YRATU7YA.js";import{b as c}from"./chunk-6S6OHJ3G.js";import{createContext as E,useContext as O,useState as o}from"react";import{IconAlertCircle as h}from"@tabler/icons-react";import{jsx as r}from"react/jsx-runtime";var l=E({}),N=({packages:e,marketPackages:i,meta:k,account:P,error:t=null,children:g})=>{let[m,u]=o(!1),[p,d]=o({}),[M,C]=o(i??[]),[f,x]=o(k||{}),v={isDetailModalOpen:m,setIsDetailModalOpen:u,selectedPackage:p,setSelectedPackage:d,marketPackages:M,setMarketPackages:C,meta:f,setMeta:x,account:P,error:t};if(t){let a=s(t)??{icon:r(h,{className:"text-red-500 mx-auto h-15 w-15"}),title:"An Error Occured",message:t||"An internal server error occurred while processing your request.",content:null};return r(n,{icon:a.icon,title:a.title,message:a.message,content:a.content})}return r(c,{packages:e,children:r(l.Provider,{value:v,children:g})})},S=()=>{let e=O(l);if(!e)throw new Error("MarketplaceContext must be used within a MarketplaceProvider");return e};export{N as a,S as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-MXCVQQZ5.js";import{a as e}from"./chunk-L7QST6XM.js";import{va as i,wa as t}from"./chunk-L2UKX2NN.js";import{b as o,f as d}from"./chunk-PWQOU5TI.js";import{jsx as r,jsxs as s}from"react/jsx-runtime";var c=({children:b,type:p="sidebar",breadcrumbs:m})=>{if(typeof window>"u")return r(t,{});if(p==="sidebar")return r(i,{children:s(o,{style:{"--sidebar-width":"calc(var(--spacing) * 72)","--header-height":"calc(var(--spacing) * 12)"},children:[r(a,{variant:"inset"}),s(d,{children:[r(e,{breadcrumbs:m}),r("div",{className:"@container/main p-7",children:b})]})]})})};export{c as a};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as Ne}from"./chunk-SC5FEULM.js";import{a as be}from"./chunk-AG4EHKB7.js";import{a as xe}from"./chunk-PJMGHYAG.js";import{a as K}from"./chunk-Z6APYDZ7.js";import{a as he}from"./chunk-KND3PUAR.js";import{a as ke}from"./chunk-6PI2N5AX.js";import{a as Pe}from"./chunk-D5ORVBB6.js";import{a as ve}from"./chunk-L37X7O6L.js";import{Ca as ue,Ea as fe,b as q,g as pe}from"./chunk-L2UKX2NN.js";import{a as me}from"./chunk-7NKFSFMC.js";import{a as te}from"./chunk-M5QT5SFN.js";import{a as W,f as j,g as J,h as ge,i as T,j as F}from"./chunk-QFUZ6MVT.js";import{b as y}from"./chunk-TVCWAJFT.js";import{a as L,c as R,d as z}from"./chunk-PRCYNFKC.js";import{a as r}from"./chunk-G4EEZUTC.js";import{a as $}from"./chunk-G22OJQWL.js";import{a as ae}from"./chunk-GND5KQRZ.js";import{createContext as Je,useContext as Ke,useEffect as oe,useState as D}from"react";import{jsx as Ye,jsxs as Ge}from"react/jsx-runtime";var Ce=Je({}),we=({children:e,packages:a,process:t="install",step:o=1,isValid:c=!1,is_custom:l=!1})=>{let u={title:"Loading",description:"Please wait while we process your request."},[v,i]=D(a),[k,m]=D(t),[g,P]=D(!1),[f,S]=D(o),[s,x]=D(null),[b,C]=D(null),[I,B]=D(c),[Z,ce]=D(""),[qe,le]=D(!1),[We,X]=D(u),ee=Pe();oe(()=>{g||setTimeout(()=>{S(1),m(t),x(null),C(null),B(!1),le(!1),ce(""),X(u)},250)},[g]),oe(()=>{!b||!ee||Object.values(ee).forEach(U=>{U?.jobCode===`${b.code}_${k}`&&X({title:U.title,description:U.description,progress:U.progress,error:U.status==="failed"})})},[ee]),oe(()=>{i(a)},[a]);let de=()=>b?.is_custom===!1,je={packages:v,setPackages:i,process:k,setProcess:m,isModalOpen:g,setIsModalOpen:P,step:f,setStep:S,selectedFile:s,setSelectedFile:x,packageManifest:b,setPackageManifest:C,isValid:I,setIsValid:B,validationError:Z,setValidationError:ce,isLoading:qe,setIsLoading:le,loadingContent:We,setLoadingContent:X,isOfficial:de,isCustom:()=>!de()};return Ge(Ce.Provider,{value:je,children:[e,Ye(ye,{})]})},h=()=>{let e=Ke(Ce);if(!e)throw new Error("PackageManagerContext must be used within a PackageManagerProvider");return e};import{Fragment as Me,jsx as w,jsxs as Y}from"react/jsx-runtime";var Ie=e=>{let{loadingContent:a,validationError:t}=h(),o={title:a.title,description:a.description,content:Y(Me,{children:[w("div",{className:"animate-spin rounded-full h-15 w-15 border-b-2 border-primary mx-auto"}),Y("div",{className:"text-center",children:[w(T,{className:"text-base text-lg",children:a.title}),w(F,{className:"text-sm",children:a.description}),a.progress&&Y(Me,{children:[w(ve,{value:a.progress,className:"my-2"}),"%",a.progress]}),a.error&&w(F,{className:"text-red-500 text-sm",children:a.error})]})]})},c={title:null,description:null,content:Y("div",{className:"grid gap-2 justify-center text-center animate-in fade-in duration-500",children:[w(r,{iconName:"IconExclamationCircleFilled",className:"text-red-500 h-15 w-15 mx-auto"}),w("span",{className:"text-2xl font-bold",children:"Error"}),w("span",{className:"text-sm text-muted-foreground",children:t})]})};if(t)return c;if(e=="loading")return o;let l=Ee(),u=Se(),[v,i,k]=e.split("-"),m=v,g=i,P=Number(k);return{custom:{install:{1:l.selectInstallationMethod,2:l.uploadPackageZipFile,3:l.customInstallSummary()},update:{1:l.uploadPackageZipFile,2:u.updateSummary()}},market:{update:{1:u.updateSummary()}}}[m]?.[g]?.[P]??l.selectInstallationMethod},De=e=>[{key:"code",value:w("span",{className:"",children:e.code??"\u2014"})},{key:"version",value:w("span",{children:e?.version??"\u2014"})},{key:"author",value:w("span",{children:e?.author??"\u2014"})},{key:"source",value:w("span",{className:"text-orange-400",children:"Custom"})}];import{unzip as Qe}from"fflate";import{toast as Xe}from"sonner";var ea=e=>new Promise((a,t)=>{Qe(e,(o,c)=>{if(o)return t(new Error("ZIP file is corrupted"));a(c)})}),Ve=async e=>{let{process:a,selectedFile:t,setIsLoading:o,step:c,setStep:l,setPackageManifest:u,setValidationError:v,setIsValid:i,packages:k,setLoadingContent:m}=e;try{if(!t)throw new Error("Please select a file.");if(o(!0),m({title:"Package Verifying",description:"Please wait while we verify the package."}),t.size>100*1024*1024)throw new Error("File should be less than 100MB");let g=new Uint8Array(await t.arrayBuffer()),P=await ea(g);if(!P["emincore.json"])throw new Error("Manifest (emincore.json) has not been found in the ZIP file.");let f=JSON.parse(new TextDecoder().decode(P["emincore.json"]));u(f);let s=["code","name","version","description","author","core_constraint"].filter(C=>f[C]==null||f[C]==="");if(s.length)throw new Error("Manifest is missing required fields: "+s.join(", "));let x=f.composer_package&&f.composer_package_version,b=f.npm_package&&f.npm_package_version;if(!x&&!b)throw new Error("Package must has at least one of composer package or npm package.");if(a=="update"){let C=be(k.find(I=>I.code==f?.code),f);if(typeof C=="string")throw new Error(C)}i(!0)}catch(g){throw Xe.error(String(g)),v(String(g)),i(!1),g}finally{l(c+1),o(!1)}};import{router as ga,useForm as ua}from"@inertiajs/react";import{useState as aa,useEffect as ta}from"react";import{Fragment as se,jsx as d,jsxs as V}from"react/jsx-runtime";var ne=({pkg:e,showBadge:a=!0,showBadgeTitle:t=!0,className:o})=>V("div",{className:ae("flex items-center gap-1",o),children:[d("span",{className:"font-medium",children:e?.name||e?.code}),a&&d(oa,{pkg:e,showBadgeTitle:t})]}),oa=({pkg:e,showBadgeTitle:a=!0,className:t,size:o=18})=>d("div",{className:ae("flex items-center gap-1",t),children:e?.is_custom===!1?e.code.slice(0,8)==="emintech"?V(se,{children:[d(r,{iconName:"IconCertificate",className:"text-cyan-600 dark:text-cyan-400",size:o}),a&&d("span",{className:"font-medium text-cyan-600 dark:text-cyan-400",children:"Official"})]}):V(se,{children:[d(r,{iconName:"IconRosetteDiscountCheckFilled",className:"text-emerald-600 dark:text-emerald-400",size:o}),a&&d("span",{className:"font-medium text-emerald-600 dark:text-emerald-400",children:"Verified"})]}):V(se,{children:[d(r,{iconName:"IconInfoCircleFilled",className:"text-slate-500 dark:text-slate-400",size:o}),a&&d("span",{className:"font-medium text-slate-500 dark:text-slate-400",children:"Unverified"})]})}),at=({statistics:e})=>{let[a,t]=aa(e);ta(()=>{t(e)},[e]);let o=[{title:"Total Packages",subtext:"Total packages counts",value:String(a.total_packages),icon:d(r,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})},{title:"Enabled Packages",subtext:"Enabled packages counts",value:String(a.enabled_packages),icon:d(r,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})},{title:"Disabled Packages",subtext:"Disabled packages counts",value:String(a.disabled_packages),icon:d(r,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})},{title:"Need Update",subtext:"Packages need update counts",value:String(a?.need_update_packages),icon:d(r,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})}];return d("div",{className:"grid grid-cols-1 md:grid-cols-4 lg:grid-cols-4 gap-6 mb-8",children:o.map(c=>d(ue,{...c},c.title?.toString()))})},A=({pkg:e,details:a})=>{let t=a??Fe(e);return V("div",{className:"space-y-4",children:[V("div",{className:e?.image?"grid gap-3":"flex items-center gap-3",children:[e?.image?d("div",{className:"w-full h-auto rounded-lg aspect-[16/9] shadow-sm",style:{backgroundImage:`url(${e.image})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}):d(r,{iconName:"IconPackage",className:"h-7 w-7 text-muted-foreground shrink-0"}),V(J,{children:[d(T,{className:"text-base",children:e?.name?d(ne,{pkg:e}):e.code}),d(F,{className:"text-xs",children:e?.description??"No description"})]})]}),d("hr",{}),d("div",{className:"space-y-3 text-sm",children:t.map(o=>V("div",{className:"flex justify-between",children:[d("span",{className:"text-muted-foreground capitalize",children:o.key}),o.value]},o.key))})]})},_e=({isModalOpen:e,setIsModalOpen:a,package:t,details:o})=>d(W,{open:e,onOpenChange:a,children:d(j,{className:"sm:max-w-md",children:d(A,{pkg:t,details:o})})});import{Fragment as sa,jsx as G,jsxs as Te}from"react/jsx-runtime";var Ae=()=>{let{packages:e,selectedPackage:a,isDetailsModalOpen:t,setIsDetailsModalOpen:o}=Q(),{setIsModalOpen:c,setProcess:l,setStep:u}=h(),v=Be(),i=Oe();return Te(sa,{children:[Te(y,{size:"sm",variant:"outline",className:"mb-4 flex items-center gap-2",onClick:()=>{c(!0),l("install"),u(1)},children:[G(r,{iconName:"IconUpload"}),G("span",{children:"Install Package"})]}),G(fe,{columns:i,data:e,bulkActions:v}),a&&G(_e,{isModalOpen:t,setIsModalOpen:o,package:a})]})};import{router as na,useHttp as ra}from"@inertiajs/react";import{useEffect as ia,useState as ca}from"react";import{toast as Ue}from"sonner";import{Fragment as Le,jsx as n,jsxs as E}from"react/jsx-runtime";var Oe=()=>{let[e,a]=ca(!0);ia(()=>{a(!1);let s=setTimeout(()=>a(!0),50);return()=>clearTimeout(s)},[]);let{setSelectedPackage:t,setIsDetailsModalOpen:o}=Q(),{setPackageManifest:c,setProcess:l,setIsModalOpen:u,setStep:v,setIsLoading:i,setLoadingContent:k,setValidationError:m}=h(),{selectVersion:g,SelectionModal:P}=xe(),f=ra(),S=s=>{if(c(s),l("update"),u(!0),!s.is_custom){i(!0),k({title:"Checking Package Updates",description:"Please wait while we check the latest updates for this package."});let x=async b=>{let{latest:C,latest_compatible:I}=b;C.version!==I.version?await g(b).then(Z=>Z!==null?c({...Z,is_custom:!1}):u(!1)):c({...I,is_custom:!1}),v(1)};Ne(f,s.id).then(b=>x(b)).catch(()=>m("Failed to check updates for this package.")).finally(()=>i(!1))}};return[{id:"select",header:({table:s})=>n(te,{checked:s.getIsAllPageRowsSelected()||s.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:x=>s.toggleAllPageRowsSelected(!!x),"aria-label":"T\xFCm\xFCn\xFC se\xE7"}),cell:({row:s})=>n(te,{id:`select-row-${s.id}`,checked:s.getIsSelected(),onCheckedChange:x=>{s.toggleSelected(!!x)},"aria-label":"Sat\u0131r se\xE7"}),enableSorting:!1,enableHiding:!1},{accessorKey:"package",header:"Package",cell:({row:s})=>E("div",{className:"flex items-center gap-5 cursor-pointer",onClick:()=>{t(s.original),o(!0)},children:[n($,{className:"my-2 h-5 w-10",style:{display:e?"none":"block"}}),E("span",{style:{display:e?"flex":"none"},className:"items-center gap-3",children:[n(r,{iconName:"IconPackage",className:"h-7 my-2 cursor-pointer"}),E("div",{className:"flex flex-col",children:[n("div",{className:"flex items-center gap-1",children:n(ne,{pkg:s.original})}),n("span",{className:"text-muted-foreground text-xs",children:s.original.description?s.original.description.length>61?s.original?.description?.slice(0,60)+"...":s.original?.description:"No description"}),n("span",{className:"text-muted-foreground text-xs",children:s.original?.version})]})]})]})},{accessorKey:"is_active",header:()=>E(L,{trigger:"hover",children:[n(R,{children:"Status"}),n(z,{className:"w-auto",children:"Is the package enabled?"})]}),cell:({row:s})=>E(Le,{children:[n($,{className:"my-2 h-5 w-10",style:{display:e?"none":"block"}}),n("div",{style:{display:e?"block":"none"},children:n(me,{checked:s.original.is_active,onCheckedChange:x=>{K([s.original.id],{is_active:x})}})})]})},{accessorKey:"actions",header:()=>E(L,{trigger:"hover",children:[n(R,{children:"Actions"}),n(z,{className:"w-auto",children:"Actions of the package"})]}),cell:({row:s})=>E(Le,{children:[n($,{className:"my-2 h-5 w-10",style:{display:e?"none":"block"}}),E("div",{style:{display:e?"flex":"none"},className:"gap-2",children:[E(L,{trigger:"hover",children:[n(R,{children:n(q,{title:"Uninstall Package",content:"Are you sure to uninstall this package?",onConfirm:()=>{na.post(route("dashboard.packages.manager"),{process:"uninstall",manifest:{code:s.original.code}})},children:n(y,{variant:"outline",size:"sm",className:"flex items-center",disabled:s.original.is_active,children:n(r,{iconName:"IconTrash",className:"h-4 w-4"})})})}),n(z,{children:s.original.is_active?"Disable Package First":"Uninstall Package"})]}),E(L,{trigger:"hover",children:[n(R,{children:n(y,{variant:"outline",size:"sm",className:"flex items-center",onClick:()=>S(s.original),children:n(r,{iconName:"IconRefresh",className:"h-4 w-4"})})}),n(z,{children:s.original.is_custom?"Update Package":"Check Updates"})]}),n(P,{})]})]})}]},Be=()=>[{label:"Enable",icon:n(r,{iconName:"IconCheck",className:"h-4 w-4 mr-1"}),variant:"outline",confirm:!0,confirmTitle:"Enable Packages",confirmContent:"Are you sure to enable these packages?",confirmIcon:n(r,{iconName:"IconCheck",size:30}),cancel:()=>{Ue.info("Process cancelled")},action:(e,a)=>{let t=e.map(o=>o.original.id);K(t,{is_active:!0},o=>o&&a&&a())}},{label:"Disable",icon:n(r,{iconName:"IconCreativeCommonsNd",className:"h-4 w-4 mr-1"}),variant:"destructive",confirm:!0,confirmTitle:"Disable Packages",confirmContent:"Are you sure to disable these packages?",confirmIcon:n(r,{iconName:"IconCreativeCommonsNd",size:30}),cancel:()=>{Ue.info("Process cancelled")},action:(e,a)=>{let t=e.map(o=>o.original.id);K(t,{is_active:!1},o=>{o&&a&&a()})}}],Fe=e=>[{key:"code",value:n("span",{className:"",children:e.code??"\u2014"})},{key:"version",value:n("span",{children:e?.version??"\u2014"})},{key:"author",value:n("span",{children:e?.author??"\u2014"})},{key:"source",value:n("span",{className:e?.is_custom!==!1?"text-orange-400":"text-green-600",children:e?.is_custom!==!1?"Custom":"Marketplace"})},{key:"status",value:n("span",{className:e?.is_active?"text-green-600":"text-destructive",children:e?.is_active?"Enabled":"Disabled"})},{key:"installed at",value:n("span",{children:e?.created_at?new Date(e.created_at).toLocaleDateString():"\u2014"})},{key:"last updated at",value:n("span",{children:e?.updated_at?new Date(e.updated_at).toLocaleDateString():"\u2014"})}];import{createContext as la,useContext as da,useEffect as ma,useState as re}from"react";import{jsx as Re}from"react/jsx-runtime";var ze=la({}),He=({packages:e,children:a})=>{let[t,o]=re(e),[c,l]=re(null),[u,v]=re(!1);ma(()=>{o(e)},[e]);let i={packages:t,setPackages:o,selectedPackage:c,setSelectedPackage:l,isDetailsModalOpen:u,setIsDetailsModalOpen:v};return Re(we,{packages:t,children:Re(ze.Provider,{value:i,children:a})})},Q=()=>{let e=da(ze);if(!e)throw new Error("usePackagesContext must be used within a PackagesProvider");return e};import{Head as pa}from"@inertiajs/react";import{jsx as H,jsxs as Ze}from"react/jsx-runtime";var Bt=({packages:e})=>{let a=[{title:"WM Dashboard",href:route("dashboard")},{title:"Packages",href:"#"}];return Ze(ke,{breadcrumbs:a,children:[H(pa,{title:"Packages"}),Ze("div",{className:"container mx-auto",children:[H(he,{title:"Packages",description:"Here you can see and manage all the system packages.",icon:H(r,{iconName:"IconLink",className:"h-10 w-10 my-2 opacity-75"})}),H(He,{packages:e,children:H(Ae,{})})]})]})};import{Fragment as $e,jsx as p,jsxs as N}from"react/jsx-runtime";var Ee=()=>{let{process:e,setStep:a,selectedFile:t,setSelectedFile:o,isValid:c,packageManifest:l,validationError:u}=h(),v=h();return{selectInstallationMethod:{title:"Select Installation Method",description:"Choose whether to install the package from a file or a URL.",content:N("div",{className:"grid grid-cols-2 gap-2",children:[N("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400 transition-colors",onClick:()=>a(2),children:[p(r,{iconName:"IconUpload",className:"h-12 w-12 mx-auto mb-3"}),p("h3",{className:"font-semibold mb-1",children:"Manual Upload"}),p("p",{className:"text-sm",children:"Upload your custom package file"})]}),N("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400 transition-colors",onClick:()=>ga.get(route("dashboard.packages.marketplace")),children:[p(r,{iconName:"IconShoppingBag",className:"h-12 w-12 mx-auto mb-3"}),p("h3",{className:"font-semibold mb-1",children:"Marketplace"}),p("p",{className:"text-sm",children:"Browse and install from marketplace"})]})]})},uploadPackageZipFile:{title:t?"Verify Package File":"Upload Package File",description:t?"Verify the package file to ensure it is valid.":"Upload your custom package file (.zip)",content:N("div",{className:"grid grid-cols-1 gap-2",children:[N("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer border-dashed "+(t?"border-gray-400 text-primary":"text-muted-foreground hover:border-gray-400 hover:text-primary transition-colors"),onDrop:i=>{i.preventDefault();let k=i.dataTransfer.files;if(k.length>0){o(k[0]);return}},onClick:()=>document.querySelector('input[type="file"]')?.click(),onDragOver:i=>i.preventDefault(),children:[t?N("div",{children:[p(r,{iconName:"IconFileTypeZip",className:"h-12 w-12 mx-auto mb-3"}),p("div",{className:"flex items-center justify-center gap-2",children:p("span",{className:"text-sm",children:t.name})})]}):N($e,{children:[p(r,{iconName:"IconUpload",className:"h-12 w-12 mx-auto mb-3"}),p("h3",{className:"font-semibold mb-1",children:"Upload Package"}),N("p",{className:"text-sm",children:["Drag and drop or ",p("span",{className:"text-primary cursor-pointer",children:"choose file"})," to upload"]})]}),p("input",{type:"file",className:"hidden",onChange:i=>{i?.target?.files&&i.target.files.length>0&&(o(i.target.files[0]),i.target.files=null)}})]}),t&&N($e,{children:[N(y,{variant:"link",size:"sm",className:"w-full flex items-center",onClick:()=>o(null),children:[p(r,{iconName:"IconTrash",className:"h-4 w-4 text-muted-foreground cursor-pointer"}),"Delete"]}),p(y,{className:"w-full",variant:"outline",onClick:()=>Ve(v),children:"Verify Package"})]})]})},customInstallSummary:()=>{let{packages:i,setIsLoading:k,setValidationError:m}=h(),g=i.find(I=>I.code==l?.code)??!1,P=g!==!1,f=c?"Package Verified":"Package Not Verified",S=c?"Your package documents are valid. You can install it now.":"Your package is not verified. Please contact the package author for more information.",{post:s,recentlySuccessful:x,processing:b}=ua({process:e,manifest:{code:l?.code,version:l?.version,core_constraint:l?.core_constraint},packageZip:t??null}),C=()=>(k(!0),new Promise(I=>s(route("dashboard.packages.manager"),{onSuccess:()=>I(!0),onError:B=>m(Object.values(B).join(`
|
|
2
|
+
`))})));return{title:f,description:S,content:c&&l?N("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer text-muted-foreground text-primary transition-colors",children:[p(A,{pkg:l,details:De(l)}),N("div",{className:"mt-4",children:[p(q,{title:e=="install"?"Confirm Installation":"Confirm Update",content:p("div",{className:"!text-center",children:"This package has passed basic manifest validation only. This does not guarantee safety or full compatibility. Only proceed if you are absolutely certain of its origin and trust the source."}),confirmText:e=="install"?"Confirm and Install":"Confirm and Update",onConfirm:()=>C(),children:P?p(y,{className:"w-full",variant:"outline",disabled:!0,children:"Installed"}):N(pe,{recentlySuccessful:x,processing:b,children:[p(r,{iconName:e=="install"?"IconDownload":"IconRefresh"}),p("span",{children:e=="install"?"Install Package":"Update Package"})]})}),P&&N("div",{className:"text-red-500 my-3",children:[g.code," - ",g.version," already exists."]})]})]}):p("div",{children:u??"An error occurred while verifying the package. Please contact the package author for more information."})}}}};import{useForm as fa}from"@inertiajs/react";import{Fragment as ka,jsx as M,jsxs as O}from"react/jsx-runtime";var Se=()=>{let{packages:e,packageManifest:a,validationError:t,setValidationError:o,isCustom:c,process:l,selectedFile:u,setIsLoading:v}=h();return{updateSummary:()=>{let i="Package Updates",k="Here are the latest updates for this package.",m=e.find(s=>s.code===a?.code),g=a,P=g?.version!=m?.version,f=fa();!P&&m?.is_custom===!1&&(i=k=null);let S=()=>{a&&(v(!0),f.setData({process:l,manifest:{code:a.code,version:a.version,core_constraint:a.core_constraint},...a.is_custom&&{packageZip:u}}),f.post(route("dashboard.packages.manager"),{onError:s=>o(Object.values(s).join(`
|
|
3
|
+
`))}))};return{title:i,description:k,content:M(ka,{children:!P&&m?.is_custom===!1?O("div",{className:"grid gap-2 justify-center text-center animate-in fade-in duration-500 !border-none",children:[M(r,{iconName:"IconCircleCheckFilled",className:"text-green-500 h-15 w-15 mx-auto"}),O("span",{className:"text-2xl font-bold",children:[m.name," is up to date!"]}),M("span",{className:"text-sm text-muted-foreground",children:"There are no updates available for this package."})]}):O("div",{className:"grid grid-cols-1 gap-3",children:[O("div",{className:"grid grid-cols-[4fr_40px_4fr] gap-2",children:[O("div",{className:"!opacity-70",children:[M("span",{className:"font-bold mb-2 block text-center",children:"Old Version"}),M("div",{className:"border-2 rounded-lg p-6 text-center text-muted-foreground text-primary transition-colors",children:m&&M(A,{pkg:m})})]}),M("div",{className:"flex items-center justify-center",children:M(r,{iconName:"IconArrowBarRight",className:"h-10 w-10"})}),O("div",{children:[M("span",{className:"font-bold mb-2 block text-center",children:"New Version"}),M("div",{className:"border-2 rounded-lg p-6 text-center text-muted-foreground text-primary transition-colors",children:g&&M(A,{pkg:{...g,is_active:!1,is_custom:c(),id:0}})})]})]}),M(y,{className:"w-full mt-2",variant:"outline",disabled:!!t,onClick:()=>S(),children:"Update Package"})]})})}}}};import{Fragment as va,jsx as _,jsxs as ie}from"react/jsx-runtime";var ye=()=>{let{isModalOpen:e,setIsModalOpen:a,isLoading:t,process:o,step:c,isCustom:l,setStep:u,setValidationError:v}=h(),i=l()?"custom":"market",k=t?"loading":`${i}-${o}-${c}`,m=Ie(k);return _(W,{open:e,onOpenChange:a,children:ie(j,{className:"max-h-[90vh] overflow-auto break-all min-w-[50vh] max-w-[75vh] w-auto",children:[_(J,{children:!t&&(m.title||m.description)&&ie(va,{children:[_(T,{className:"text-base text-lg",children:m.title}),_(F,{className:"text-sm",children:m.description}),_("hr",{})]})}),m.content,_(ge,{children:c>1&&!t&&_("div",{className:"grid mx-auto",children:ie(y,{variant:"link",size:"sm",className:"flex items-center gap-1",onClick:()=>{u(c-1),v("")},children:[_(r,{iconName:"IconArrowLeft",className:"h-4 w-4"}),"Back"]})})})]})})};export{ye as a,we as b,h as c,Ie as d,De as e,Ve as f,ne as g,oa as h,at as i,A as j,_e as k,Ae as l,Oe as m,Be as n,Fe as o,He as p,Q as q,Bt as r,Ee as s,Se as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c}from"./chunk-KND3PUAR.js";import{a as s}from"./chunk-
|
|
1
|
+
import{a as c}from"./chunk-KND3PUAR.js";import{a as s}from"./chunk-6PI2N5AX.js";import{a as i,b as n,c as r}from"./chunk-3DBYUBWW.js";import{a as t}from"./chunk-G4EEZUTC.js";import{Head as m,Link as g}from"@inertiajs/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";var N=()=>{let d=[{title:"General Settings",description:"Manage general system settings",href:route("dashboard.settings",{tab:"general"}),icon:e(t,{iconName:"IconSettings"}),colSpan:1},{title:"Manage Slugs",description:"Configure URL slugs and permalinks",href:route("dashboard.settings.slugs"),icon:e(t,{iconName:"IconLink"}),colSpan:1},{title:"Design Settings",description:"Manage appereance, branding and design settings for the system",href:route("dashboard.settings",{tab:"design"}),icon:e(t,{iconName:"IconPalette"}),colSpan:1},{title:"Mail Settings",description:"Manage email settings for the system",href:route("dashboard.settings",{tab:"mail"}),icon:e(t,{iconName:"IconMail"}),colSpan:1},{title:"Platform Status",description:"View system health and service status",href:route("dashboard.settings.platform"),icon:e(t,{iconName:"IconCloudCog"}),colSpan:2}],l=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings"}];return o(s,{breadcrumbs:l,children:[e(m,{title:"All Settings"}),o("div",{className:"container mx-auto grid grid-cols-2 gap-4",children:[e(c,{title:"All Settings",description:"Which settings do you want to manage?",icon:e(t,{iconName:"IconSettings2"})}),d.map((a,p)=>e(g,{href:a.href,className:`col-span-${a.colSpan}`,children:e(i,{className:"cursor-pointer hover:shadow-lg transition-shadow",children:o(n,{children:[o(r,{className:"flex items-center gap-2 mx-auto",children:[a.icon,a.title]}),e("p",{className:"text-sm text-muted-foreground text-center",children:a.description})]})})}))]})]})};export{N as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=(e,r)=>e?.version===r?.version?"The package you uploaded is the same version as the current package. There don't appear to be any updates or changes in this new upload.":e?.version>r?.version?"New version must be greater than the current version.":e?.code!==r?.code?"Package code cannot be changed.":!0;export{a};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as c}from"./chunk-GYMXN7BF.js";import{a as m}from"./chunk-G4EEZUTC.js";import{useEffect as f,useState as b}from"react";import{toast as u}from"sonner";import{usePage as d}from"@inertiajs/react";import{jsx as n}from"react/jsx-runtime";var l=()=>{let[e,o]=b({}),s=d().props,i=s.emin_jobs,a=s.auth?.user?.id;return f(()=>{if(i&&Array.isArray(i)){let r={};i.forEach(t=>{r[t.id]=t}),o(r)}},[i]),f(()=>{if(!a)return;let r=window?.Echo?.private("emin-jobs."+a).listen(".job.progress",t=>{o(p=>({...p,[t.job.id]:t.job}))});return()=>{r?.stopListening(".job.progress")}},[a]),e},L=()=>{let e=l();f(()=>{Object.values(e).forEach(o=>{let s=`job-${o.id}`;o.status==="completed"?u.success(n(c,{job:o}),{duration:5e3,icon:n(m,{iconName:"IconCheck"}),id:s,classNames:{content:"w-full"}}):o.status==="failed"?u.error(n(c,{job:o}),{duration:5e3,icon:n(m,{iconName:"IconX"}),id:s,classNames:{content:"w-full"}}):(o.status==="running"||o.status==="pending")&&u.loading(n(c,{job:o}),{id:s,classNames:{content:"w-full"}})})},[e])};export{l as a,L as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as B,b as m}from"./chunk-WQ53I46F.js";import{a as L}from"./chunk-
|
|
1
|
+
import{a as B,b as m}from"./chunk-WQ53I46F.js";import{a as L}from"./chunk-FH3ERVYP.js";import{a as A}from"./chunk-KND3PUAR.js";import{a as R}from"./chunk-6PI2N5AX.js";import{Ea as _,c as k,t as S,u as T,v as D}from"./chunk-L2UKX2NN.js";import{a as y}from"./chunk-M5QT5SFN.js";import{a as C,f as I,g as w,i as M}from"./chunk-QFUZ6MVT.js";import{b as E}from"./chunk-TVCWAJFT.js";import{a as p,b as u,c as g,d as v}from"./chunk-PRCYNFKC.js";import{a as n}from"./chunk-G4EEZUTC.js";import{a as c}from"./chunk-G22OJQWL.js";import{a as P,d as N}from"./chunk-GND5KQRZ.js";import{router as F}from"@inertiajs/react";import{jsx as $}from"react/jsx-runtime";var f=()=>{let t=m(),{users:l,meta:s}=t,i=H();return $(_,{data:l,columns:i,meta:s,handleRequest:e=>V(e,t)})},V=(t,l)=>{F.get(route("dashboard.users"),{...t},{preserveState:!0,preserveScroll:!0,preserveUrl:!0,only:["users","meta"],onSuccess:s=>{l.setUsers(s.props.users),l.setMeta(s.props.meta)}})};import{Head as O}from"@inertiajs/react";import{jsx as d,jsxs as U}from"react/jsx-runtime";var W=({users:t,meta:l,statistics:s})=>{let i=[{title:"WM Dashboard",href:route("dashboard")},{title:"Users"}];return U(R,{breadcrumbs:i,children:[d(O,{title:"Users"}),d(A,{title:"Users",description:"Here you can see and manage all the system users.",icon:d(n,{iconName:"IconUsers",className:"h-10 w-10 my-2"})}),U(B,{users:t,meta:l,children:[U("div",{className:"grid gap-4",children:[d(L,{statistics:s}),d("div",{children:d(f,{})})]}),d(h,{})]})]})};import{useEffect as Z,useState as G}from"react";import{Fragment as J,jsx as a,jsxs as r}from"react/jsx-runtime";var q=t=>[{key:"name",label:"Name",value:t.name,type:"text"},{key:"surname",label:"surname",value:t.surname,type:"text"},{key:"email",label:"Email",value:t.email,editable:!1},{key:"role",label:"Role",value:t.role_code,type:"select",options:[{label:"Root",value:"root"},{label:"User",value:"user"}]},{key:"status",label:"Status",value:Number(t.status),type:"select",options:[{label:"Inactive",value:0},{label:"Active",value:1},{label:"Pending",value:2},{label:"Suspended",value:3}]},{key:"last_seen_at",label:"Last Seen At",value:t.last_seen_at?new Date(t.last_seen_at).toLocaleString():"Never",editable:!1},{key:"registered_at",label:"Registered At",value:new Date(t.created_at).toLocaleString(),editable:!1},{key:"updated_at",label:"Updated At",value:new Date(t.updated_at).toLocaleString(),editable:!1}],H=()=>{let{setSelectedUser:t,setShowUserModal:l}=m(),[s,i]=G(!0);return Z(()=>{i(!1);let e=setTimeout(()=>i(!0),50);return()=>clearTimeout(e)},[]),[{id:"select",header:({table:e})=>a(y,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:x=>e.toggleAllPageRowsSelected(!!x),"aria-label":"T\xFCm\xFCn\xFC se\xE7"}),cell:({row:e,table:x})=>a(y,{id:`select-row-${e.id}`,checked:e.getIsSelected(),onCheckedChange:z=>{e.toggleSelected(!!z)},"aria-label":"Sat\u0131r se\xE7"}),enableSorting:!1,enableHiding:!1},{accessorKey:"id",header:"ID",cell:({row:e})=>r("div",{className:"flex",children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),r("span",{style:{display:s?"block":"none"},children:["#",e.original.id]})]})},{accessorKey:"user",header:"User",cell:({row:e})=>r("div",{className:"flex",children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),r("div",{style:{display:s?"flex":"none"},className:"cursor-pointer",onClick:()=>{t(e.original),l(!0)},children:[a("div",{className:"flex sm:hidden",children:a(D,{user:e.original??null,settings:{showEmail:!0}})}),r("div",{className:"hidden sm:flex items-center gap-2",children:[a(S,{user:e.original,type:"square"}),a(T,{user:e.original,settings:{showId:!1}})]})]})]})},{accessorKey:"status",header:()=>r(p,{trigger:"hover",children:[a(g,{children:"Status"}),r(v,{children:[a(u,{children:"Status"}),a("span",{children:"The status of user"})]})]}),cell:({row:e})=>r(p,{trigger:"hover",children:[r(g,{children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),a("div",{style:{display:s?"block":"none"},children:e.original.status==0?a(n,{iconName:"IconPlayerPauseFilled",className:"h-4 w-4 text-primary"}):e.original.status==1?a(n,{iconName:"IconCircleCheckFilled",className:"h-4 w-4 text-green-400"}):e.original.status==2?a(n,{iconName:"IconZoom",className:"h-4 w-4 text-yellow-400"}):e.original.status==3&&a(n,{iconName:"IconBan",className:"h-4 w-4 text-red-400"})})]}),r(v,{children:[a(u,{children:"User Status"}),a("span",{children:e.original?.status==0?"Inactive":e.original?.status==1?"Active":e.original?.status==2?"Pending":"Suspended"})]})]})},{id:"role",accessorKey:"role",header:()=>r(p,{trigger:"hover",children:[a(g,{children:"Role"}),r(v,{children:[a(u,{children:"Role"}),a("span",{children:"The role of user"})]})]}),cell:({row:e})=>r(p,{trigger:"hover",isActive:e.original.role!==void 0,children:[r(g,{children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),a("div",{style:{display:s?"block":"none"}})]}),r(v,{children:[a(u,{children:"Role"}),a("span",{children:e?.original?.role?.title??e.original.role_code})]})]})},{id:"actions",header:()=>"Actions",cell:({row:e})=>r(J,{children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),a("div",{style:{display:s?"flex":"none"},className:"gap-1",children:a(E,{variant:"ghost",size:"sm",onClick:()=>{console.log("test"),t(e.original),l(!0)},children:a(n,{iconName:"IconEye"})})})]})}]};import{jsx as o,jsxs as b}from"react/jsx-runtime";var h=()=>{let{selectedUser:t,setSelectedUser:l,showUserModal:s,setShowUserModal:i}=m();return o(C,{open:s,onOpenChange:i,children:b(I,{className:"max-h-[90vh] sm:max-w-[50vw] grid !gap-4 overflow-auto",children:[o(w,{className:"pb-4 border-b shrink-0",children:b(M,{children:["Details of ",t?.name]})}),o(K,{})]})})},K=()=>{let{selectedUser:t}=m();if(!t)return;let l=q(t);return b("div",{className:"grid md:grid-cols-[200px_auto] gap-5",children:[o("div",{className:"flex items-center gap-4",children:o("div",{style:{backgroundImage:`url(${N(t?.avatar??"")})`,backgroundSize:"cover"},className:"aspect-square h-auto w-full border rounded-sm object-cover"})}),o("div",{className:"grid grid-cols-2 gap-y-3",children:l.map(s=>b("div",{className:P("flex flex-col items-start justify-start",s.value?.toString()?.length>30?"col-span-2":""),children:[o("p",{className:"text-sm text-muted-foreground capitalize",children:s?.label}),o(k,{item:s,children:s.key==="status"?s.value==0?o("span",{className:"text-sm text-primary",children:"Inactive"}):s.value==1?o("span",{className:"text-sm text-green-400",children:"Active"}):s.value==2?o("span",{className:"text-sm text-yellow-400",children:"Pending"}):s.value==3&&o("span",{className:"text-sm text-red-400",children:"Suspended"}):o("span",{className:"text-sm",children:s?.value??"-"})},s.key)]},s.key))})]})};export{h as a,K as b,f as c,W as d,q as e,H as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ca as r}from"./chunk-
|
|
1
|
+
import{Ca as r}from"./chunk-L2UKX2NN.js";import{useEffect as n,useState as a}from"react";import{jsx as i}from"react/jsx-runtime";var g=({statistics:t})=>{let[s,c]=a(t);n(()=>{c(t)},[t]);let o=[{title:"Total Users",value:String(s.total_users),icon:"IconUsers"},{title:"Active Users",value:String(s.active_users),icon:"IconUserCheck"},{title:"Pending Users",value:String(s.pending_users),icon:"IconUserSearch"},{title:"Inactive Users",value:String(s.inactive_users),icon:"IconUserX"},{title:"Blocked Users",value:String(s.blocked_users),icon:"IconUserCancel"}];return i("div",{className:"grid grid-cols-1 md:grid-cols-5 lg:grid-cols-5 gap-5",children:o.map(e=>i(r,{...e},e.title?.toString()))})};export{g as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as U,b as g}from"./chunk-KYNCXEGC.js";import{b as R}from"./chunk-B4FQFQOO.js";import{a as W,b as q,c as k,d as h}from"./chunk-3ZSQL2FG.js";import{a as d}from"./chunk-KND3PUAR.js";import{a as G}from"./chunk-4DHRTWA7.js";import{a as F}from"./chunk-6PI2N5AX.js";import{f as m,g as w}from"./chunk-L2UKX2NN.js";import{a as M}from"./chunk-DSY4KVMF.js";import{b}from"./chunk-TVCWAJFT.js";import{a as I,b as B,c as E,d as H,f as N}from"./chunk-3DBYUBWW.js";import{a as x}from"./chunk-65LRDGYI.js";import{a as o}from"./chunk-G4EEZUTC.js";import{a as f,d as P}from"./chunk-GND5KQRZ.js";import{Head as ae}from"@inertiajs/react";import{jsx as S,jsxs as Z}from"react/jsx-runtime";var ge=({settings:e})=>{let i=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"General Settings"}];return Z(p,{settings:e,title:"General",breadcrumbs:i,children:[S(d,{title:"General Settings",description:"Manage general system settings",icon:S(o,{iconName:"IconSettings2"})}),S("div",{className:"container mx-auto",children:S(Y,{})})]})},Y=()=>{let{settings:e,handleChange:i}=g();return W(e,i).map(s=>S(m,{section:s}))};import{useEffect as j,useState as z}from"react";import{jsx as t,jsxs as c}from"react/jsx-runtime";var Ne=({settings:e})=>{let i=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"Design Settings"}];return c(p,{settings:e,title:"Design",breadcrumbs:i,children:[t(d,{title:"Design Settings",description:"Manage design system settings",icon:t(o,{iconName:"IconSettings2"})}),c("div",{className:"container mx-auto grid grid-cols-1 gap-5",children:[t(ee,{}),t(te,{}),t(re,{})]})]})},ee=()=>{let{settings:e,handleChange:i}=g(),[s,l]=z(k(e));return j(()=>{l(k(e))},[e]),c("div",{className:"grid grid-cols-1 gap-5",children:[t(x,{icon:t(o,{iconName:"IconPalette"}),title:"System Logos",description:"Manage system logo appereances",className:"col-span-2"}),t("div",{className:"grid grid-cols-1 w-[75%] sm:w-full sm:grid-cols-[1fr_2fr_2fr] gap-3",children:s.map(r=>c(I,{className:f("!w-full",r.key.slice(0,4)=="dark"?"bg-black/90 text-white dark:bg-background":r.key.slice(0,5)=="light"&&"dark:bg-white/90 bg-background text-black"),children:[c(N,{children:[t("div",{className:f("aspect-[16/9] h-25 w-full flex items-center object-fit cursor-pointer",r.value?"":"border-[1.5px] border-dashed rounded-lg"),onClick:()=>document.querySelector(`#${r.key}`)?.click(),children:r.value?t("img",{src:P(r.value),alt:r.title,className:"h-full w-auto"}):t(o,{iconName:"IconUpload"})}),t("input",{id:r.key,hidden:!0,type:"file",accept:"image/*",onChange:u=>{i(r.key,u.target.files?.[0])}})]}),c(B,{children:[t(E,{children:r.title}),t(H,{children:r.description})]})]}))})]})},te=()=>{let{settings:e,handleChange:i}=g();return q(e,i).map(s=>t(m,{section:s}))},re=()=>{let{settings:e,handleChange:i}=g(),[s,l]=z(e?.main_color);return t(I,{children:c(N,{className:"flex items-center gap-5",children:[t(x,{title:"Color",description:"Define the primary color of the system",icon:t(o,{iconName:"IconPalette"})}),t("input",{type:"color",className:"ml-auto aspect-square w-12 h-12 cursor-pointer",value:s,onChange:r=>l(r.target.value)}),t(b,{size:"sm",variant:"ghost",onClick:()=>i("main_color",s),children:t(o,{iconName:"IconDeviceFloppy"})})]})})};import{useEffect as $,useState as v}from"react";import{useForm as se}from"@inertiajs/react";import{Fragment as ie,jsx as n,jsxs as y}from"react/jsx-runtime";var Fe=({settings:e})=>{let i=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"Mail Settings"}],[s,l]=v(e?.mail_mailer),[r,u]=v(h(e)),[T,_]=v(!1),[A,J]=v(!1),{recentlySuccessful:L,processing:K,errors:O,hasErrors:Q,post:V}=se();return $(()=>{l(e?.mail_mailer)},[e?.mail_mailer]),$(()=>{u(h({...e,mail_mailer:s}))},[e,s]),n(p,{settings:e,title:"Mail",breadcrumbs:i,children:y("div",{className:"grid gap-5 mx-auto px-5",children:[n(d,{title:"Mail Settings",description:"Manage mail system settings",icon:n(o,{iconName:"IconMail"})}),n(m,{section:{icon:"IconMail",title:"Mailer Driver",description:"The mailer driver to use for sending emails.",key:"mail_mailer",value:s,options:[{icon:"IconMail",title:"SMTP",description:"Use SMTP to send emails with your own email server.",value:"smtp"},{icon:"IconLogs",title:"Log",description:"It will log the emails to the system log. Dont send mails.",value:"log"}],onSave:a=>(l(a.value),u(h(e))),type:"radio"}}),y("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-5",children:[r.map(a=>a.key!=="mail_mailer"&&n(G,{label:a.title,value:a.value,onChange:X=>u(r.map(C=>C.key===a?.key?{...C,value:X.target.value}:C)),placeholder:a.placeholder,icon:a.icon,type:a.type})),y("div",{className:"col-span-full",children:[y(b,{className:f("w-full items-center gap-2",T&&"animate-pulse"),variant:"outline",disabled:T,onClick:()=>{_(!0),R(r.map(a=>({key:a.key,value:a.value}))).catch(a=>J(a)).finally(()=>_(!1))},children:[n(o,{iconName:"IconDeviceFloppy"}),n("span",{children:"Save"})]}),s!=="log"&&s!=="array"&&y(ie,{children:[n(w,{className:"w-full",variant:"link",onClick:()=>V(route("dashboard.settings.mail.test")),processing:K,recentlySuccessful:L,processingText:"Testing...",successText:"Test mail sent!",children:"Send Test Mail"}),L&&!O&&n("span",{className:"text-success",children:"Test mail sent to your email address"})]}),n(M,{className:"text-center",message:A?"Failed to save mail settings":""}),n(M,{className:"text-center",message:Q?"Failed to send test mail":""})]})]})]})})};import{Fragment as oe,jsx as D,jsxs as ne}from"react/jsx-runtime";var p=({settings:e,title:i,breadcrumbs:s,children:l})=>ne(oe,{children:[D(ae,{title:i}),D(F,{breadcrumbs:s??[],children:D(U,{settings:e,children:l})})]});export{p as a,ge as b,Ne as c,Fe as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as T}from"./chunk-HDYNFDEV.js";import{a as b,b as R,c as z,d as B,e as V,g as H}from"./chunk-NFOQ4KW2.js";import{a as P}from"./chunk-KND3PUAR.js";import{a as L}from"./chunk-
|
|
1
|
+
import{a as T}from"./chunk-HDYNFDEV.js";import{a as b,b as R,c as z,d as B,e as V,g as H}from"./chunk-NFOQ4KW2.js";import{a as P}from"./chunk-KND3PUAR.js";import{a as L}from"./chunk-6PI2N5AX.js";import{a as C}from"./chunk-QKGQOXDM.js";import{b as G}from"./chunk-TVCWAJFT.js";import{a as o}from"./chunk-G4EEZUTC.js";import{a as D}from"./chunk-G22OJQWL.js";import{useEffect as F}from"react";import{Head as U,usePage as W}from"@inertiajs/react";import{createContext as J,useContext as K,useState as p}from"react";import{jsx as O}from"react/jsx-runtime";var _=J({}),E=({children:t,slugGroups:a,onChange:u})=>{let[l,i]=p(a),[d,c]=p(""),[n,m]=p(new Set),[N,r]=p(new Set),[f,v]=p(new Set),[x,y]=p({}),[k,A]=p({}),j={onChange:u,slugGroups:l,setSlugGroups:i,searchTerm:d,setSearchTerm:c,expandedGroups:n,setExpandedGroups:m,expandedSlugs:N,setExpandedSlugs:r,invalidSlugs:f,setInvalidSlugs:v,slugInputTemps:x,setSlugInputTemps:y,slugInput:k,setSlugInput:A,toggleSlug:g=>{r(S=>{let w=new Set(S);return w.has(g)?w.delete(g):w.add(g),w})},setAllExpanded:g=>{g?(m(new Set(B(l))),r(new Set(V(l)))):(m(new Set),r(new Set))},toggleGroup:g=>{let S=new Set(n);S.has(g)?S.delete(g):S.add(g),m(S)}};return O(_.Provider,{value:j,children:t})},h=()=>{let t=K(_);if(!t)throw new Error("useSlugs sadece SlugsProvider i\xE7inde kullan\u0131labilir!");return t};import{jsx as e,jsxs as s}from"react/jsx-runtime";var $=()=>{let{slugGroups:t,searchTerm:a,setSearchTerm:u,setExpandedGroups:l,setSlugInputTemps:i,setSlugInput:d,setAllExpanded:c}=h();return F(()=>{let n=R(t);i(n),d(n)},[t]),F(()=>{if(a){let n=new Set;H(t,n,a),l(n)}},[a]),s("div",{className:"p-4",children:[e("div",{className:"mb-4",children:s("div",{className:"relative",children:[e("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:e(o,{iconName:"IconSearch",className:"h-5 w-5 text-gray-400"})}),e(C,{type:"text",className:"pr-10 focus-visible:ring-0"+(a?"border-gray-400":""),placeholder:"Searchs...",value:a,onChange:n=>u(n.target.value)})]})}),s("div",{className:"mb-4 grid grid-cols-1 lg:flex gap-2",children:[s(G,{size:"sm",variant:"outline",onClick:()=>c(!1),className:"flex items-center gap-2",children:[e(o,{iconName:"IconMinimize"}),"Collapse All"]}),s(G,{size:"sm",variant:"outline",onClick:()=>c(!0),className:"flex items-center gap-2",children:[e(o,{iconName:"IconArrowsMaximize"}),"Expand All"]})]}),e("div",{className:"space-y-2",children:t.length>0?z(t,a).map(n=>e(q,{group:n,depth:0},n.id)):s("div",{className:"text-center py-8 text-muted-foreground",children:[e(o,{iconName:"IconSearch",className:"mx-auto mb-2",size:24}),e("p",{children:"Arama kriterlerinize uygun sonu\xE7 bulunamad\u0131."})]})})]})},X=({slug:t})=>{let{expandedSlugs:a,searchTerm:u,setSlugInputTemps:l,slugInputTemps:i,setSlugInput:d,slugInput:c,setInvalidSlugs:n,invalidSlugs:m,onChange:N,toggleSlug:r}=h(),{title:f,description:v}=t?.slug_data??{title:"N/A",description:"N/A"},x=a.has(t.id),y=b(f,u),k=b(v,u);return e("div",{className:"ml-6 p-2 pr-0 border-l-2 border-accent",children:s("div",{className:`dark:bg-[#101010] bg-accent rounded-lg p-3 grid grid-cols-1 items-center shadow-sm ${y||k?"bg-accent/50":""}`,children:[s("button",{onClick:()=>r(t.id),className:"flex items-center gap-2 w-full text-left",children:[x?e(o,{iconName:"IconChevronDown",className:"h-5 w-5"}):e(o,{iconName:"IconChevronRight",className:"h-5 w-5"}),s("div",{className:"flex items-center gap-1 w-full",children:[e(o,{iconName:t.icon??"IconLink"}),s("div",{className:"ml-2 text-left",children:[e("h4",{className:"font-semibold",children:y?e("span",{className:"dark:bg-gray-800 dark:text-white bg-gray-300",children:t.slug_data.title}):f}),e("p",{className:"text-sm",children:k?e("span",{className:"dark:bg-gray-800 bg-gray-300 font-medium",children:v}):v})]})]})]}),s("div",{className:`${x?"grid":"hidden"}`,children:[e("hr",{className:"mb-5 mt-2"}),e("div",{children:e("div",{className:"flex gap-2",children:e("div",{className:"w-full",children:e("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-2",children:s("div",{className:"group relative",children:[e(C,{id:t.id.toString(),type:"text",required:!0,defaultValue:i[t.id],onBlur:I=>{l({...i,[t.id]:I.target.value})},placeholder:"slug",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off","aria-invalid":m.has(t.id)}),e("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:e(o,{iconName:t.icon??"IconLink",size:16})}),e("div",{className:"absolute inset-y-0 end-0 flex items-center justify-center gap-1",children:s(G,{variant:"ghost",disabled:i[t.id]===c[t.id],onClick:()=>{let I={...t,slug:i[t.id]};N(I,M=>{M?d({...c,[t.id]:i[t.id]}):n(new Set(m).add(t.id))})},children:[e(o,{iconName:t.icon??"IconDeviceFloppy",size:16}),e("span",{className:"text-xs",children:"Save"})]})})]})},t.code)})})})]})]})},t.code)},q=({group:t,depth:a=0})=>{let{expandedGroups:u,toggleGroup:l}=h(),{title:i,description:d}=t?.group_data??{title:"N/A",description:"N/A"},c=u.has(t.id),n=b(i),m=b(d);return s("div",{children:[s("button",{onClick:()=>l(t.id),className:`w-full flex items-center p-3 rounded-lg dark:bg-[#101010] bg-accent hover:bg-accent/20 transition-colors ${n||m?"bg-accent/50":"bg-accent"}`,children:[c?e(o,{iconName:"IconChevronDown",className:"h-5 w-5"}):e(o,{iconName:"IconChevronRight",className:"h-5 w-5"}),e(o,{iconName:t.icon??"IconLink",className:"ml-2",fallback:e(D,{className:"w-5 h-5"})}),s("div",{className:"ml-2 text-left",children:[e("h4",{className:"font-semibold",children:n?e("span",{className:"dark:bg-gray-800 dark:text-white bg-gray-300",children:i}):i}),e("p",{className:"text-sm",children:m?e("span",{className:"dark:bg-gray-800 bg-gray-300 font-medium",children:d}):d})]})]}),c&&s("div",{className:"mt-2",children:[e("div",{className:"mb-2",style:{marginLeft:a*16},children:t.slugs?.map(r=>e(X,{slug:r},r.id))}),Array.isArray(t.childrens)&&t.childrens.length>0&&e("div",{className:"mt-2",style:{marginLeft:(a<1?1:a)*16},children:t.childrens.map(r=>e("div",{className:"mb-2",style:{marginLeft:a*16},children:e(q,{group:r,depth:a+1},r.id)}))}),Number(t.slugs?.length)<1&&Number(t.childrens?.length)<1&&e("div",{className:"text-sm text-muted-foreground mt-2 ml-4",children:"There is no slugs or child groups found."})]})]},t.code)},Q=({slugGroups:t})=>{let a=[{title:"Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"Slugs",href:route("dashboard.settings.slugs")}],{eminLang:u}=W().props;return s(L,{breadcrumbs:a,children:[e(U,{title:"Slugs"}),s("div",{className:"container mx-auto",children:[e(P,{title:"Slugs",description:"Here you can see and manage all the system slugs.",icon:e(o,{iconName:"IconLink",className:"h-10 w-10 my-2 opacity-75"})}),u?.multiLanguage&&s("div",{className:"flex items-center gap-4",children:[e(o,{iconName:"IconAlertTriangle",className:"h-10 w-10 my-2 text-red-500"}),s("div",{children:[e("h3",{className:"font-bold text-lg",children:"Dikkat!"}),e("span",{className:"text-muted-foreground",children:"Sisteminizde \xE7oklu dil eklentisi aktiftir. Bu sebeple buradaki link yap\u0131lar\u0131 \xE7oklu dil eklentisi aktif oldu\u011Fu s\xFCre boyunca \xE7al\u0131\u015Fmayacakt\u0131r."})]})]}),e(E,{slugGroups:t,onChange:(l,i)=>{T(l,d=>{d?(l.slug=l.slug,i?.(!0)):i?.(!1)})},children:e($,{})})]})]})};export{$ as a,X as b,q as c,Q as d,E as e,h as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s}from"./chunk-L37X7O6L.js";import{a as i}from"./chunk-GND5KQRZ.js";import{Fragment as d,jsx as r,jsxs as t}from"react/jsx-runtime";var l=({job:o})=>t("div",{children:[r("div",{className:"font-bold",children:o.title}),r("div",{children:o.description}),r(s,{value:o.progress,className:i("my-2 w-full",o.status==="failed"&&"bg-red-500")}),t("div",{children:[o.progress,"%"]})]}),n=({job:o})=>r(d,{});export{l as a,n as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as vo}from"./chunk-LMJAV6MI.js";import{a as bo}from"./chunk-ZYAM2VUN.js";import{a as ho}from"./chunk-V2NMVGDZ.js";import{a as No}from"./chunk-FLR2KO5I.js";import{a as Co,b as vr,c as br}from"./chunk-UB5QQGPD.js";import{a as mt}from"./chunk-E2ZUBHVJ.js";import{a as ar,c as rr}from"./chunk-6POIVEDA.js";import{a as Gt,b as yo}from"./chunk-PZEX7JNQ.js";import{a as xo}from"./chunk-GVFPSY2S.js";import{a as Za,b as Wa}from"./chunk-U7CCM2TG.js";import{b as er,c as tr}from"./chunk-X2FAUFZV.js";import{a as Ta}from"./chunk-TGINGSSX.js";import{a as Aa}from"./chunk-7NKFSFMC.js";import{a as pr,b as ur,c as gr,e as Zt,f as fr,g as wo}from"./chunk-A6BBNBOV.js";import{a as Le}from"./chunk-OFK4F5KR.js";import{a as Ht,b as Ot}from"./chunk-OTBFBEQW.js";import{a as Ma,c as Pa,d as Ia,e as Ea,g as Da}from"./chunk-WNFQKV4B.js";import{a as da,b as pa,i as ua,k as ga,l as fa,m as Bt,p as _t,q as Ct,r as We,v as mo,w as va,x as po}from"./chunk-PWQOU5TI.js";import{a as ia,b as la,c as ca,d as ma}from"./chunk-2UOSQSPQ.js";import{a as ta}from"./chunk-CZM7FKLS.js";import{a as oa,b as aa,d as ra,e as na,g as sa}from"./chunk-AW6EOFKV.js";import{a as or}from"./chunk-EEYT23VU.js";import{a as k}from"./chunk-DSY4KVMF.js";import{a as E}from"./chunk-QKGQOXDM.js";import{a as h}from"./chunk-XEBYLJU7.js";import{a as Ra,b as Fa,c as uo,e as Ba,f as _a}from"./chunk-OTSYJWIO.js";import{a as zt}from"./chunk-M5QT5SFN.js";import{a as io,b as lo,c as co}from"./chunk-EV4GZ2HL.js";import{b as nr,c as sr,d as ir,e as lr,f as cr,h as mr,i as dr}from"./chunk-GBXDCZP6.js";import{a as ye,b as dt,d as qa,f as we,g as Ka,h as Vt,i as Qa,j as Xa}from"./chunk-QFUZ6MVT.js";import{a as De,c as Te,d as Ae,e as za,f as qe,g as Ut,j as Ha,k as go}from"./chunk-AYYFGDAO.js";import{a as Ja}from"./chunk-566X7DTI.js";import{a as ba,b as ha,e as xa,f as Na,g as ya,h as wa,i as Ca,j as ka,k as Sa}from"./chunk-S46ZLDUA.js";import{b as Ve}from"./chunk-YLI3WTOQ.js";import{a as Oa,b as Ua,c as Va,e as $a,f as Ga}from"./chunk-3H6NZAII.js";import{b as m}from"./chunk-TVCWAJFT.js";import{a as Z,b as X,c as Ke,d as $t,e as Ya,f as Y,g as ja}from"./chunk-3DBYUBWW.js";import{a as le,b as Ue,c as ce,d as me}from"./chunk-PRCYNFKC.js";import{a as fe}from"./chunk-65LRDGYI.js";import{a as i}from"./chunk-G4EEZUTC.js";import{a as La}from"./chunk-SO7A4MJT.js";import{b as kt,c as fo}from"./chunk-ZYEQMWUG.js";import{a as g,b as Ne,c as ea,d as Ee,e as L}from"./chunk-GND5KQRZ.js";import{a as hr}from"./chunk-P5HBVZKY.js";import{a as Jo}from"./chunk-5RKCSYZG.js";import{useEffect as pl,useRef as ul}from"react";import{Link as yn,usePage as gl}from"@inertiajs/react";import{jsx as Re,jsxs as Fe}from"react/jsx-runtime";var xr=({icon:e=Re(i,{iconName:"IconAlertCircleFilled",className:"opacity-80"}),title:t="Confirm",content:a="Are you sure?",onConfirm:o=()=>{},confirmText:r=Fe("div",{className:"flex items-center gap-1",children:[Re(i,{iconName:"IconCircleCheck"}),"Confirm"]}),onCancel:s=()=>{},cancelText:l=Fe("div",{className:"flex items-center gap-1",children:[Re(i,{iconName:"IconCircleX"}),"Cancel"]}),children:n})=>Fe(ba,{children:[Re(ha,{asChild:!0,children:n}),Fe(xa,{children:[Fe("div",{className:"flex flex-col items-center gap-2",children:[Re("div",{className:"flex size-auto p-2.5 shrink-0 items-center justify-center rounded-full border","aria-hidden":"true",children:e}),Fe(Na,{children:[Re(wa,{className:"text-center",children:t}),Re(Ca,{children:a})]})]}),Fe(ya,{children:[Fe(Sa,{className:"flex-1",onClick:s,children:[typeof l=="string"&&Re(i,{iconName:"IconX"}),l]}),Fe(ka,{className:"flex-1",onClick:o,children:[typeof r=="string"&&Re(i,{iconName:"IconCheck"}),r]})]})]})]});import{useEffect as zn,useState as So}from"react";import{jsx as V,jsxs as Qe}from"react/jsx-runtime";var Hn=({item:e,onChange:t,children:a})=>e.editable!==!1?Qe(le,{trigger:"click",isActive:e.editable,children:[V(ce,{children:a}),Qe(me,{children:[V(Ue,{children:e.label}),V(On,{item:e,onChange:t})]})]}):a,On=({item:e,onChange:t,...a})=>{let o=e?.type,[r,s]=So(e.value),[l,n]=So(e.value);zn(()=>{s(e.value),n(e.value)},[e.value]);let[c,d]=So(""),b=async N=>{if(!(e.editable===!1||!t)){console.log(e.options);try{if(!u(N))return;await t(e.key,N??r)&&s(N)}catch(R){s(e.value),d(R.message)}}},u=N=>!0,z=()=>l!==r&&b(r),H;switch(o){case"number":case"text":case"email":case"password":case"tel":case"url":H=V(E,{type:o,value:r,onBlur:z,onChange:N=>s(N.target.value),"aria-invalid":c?"true":"false"},e.key);break;case"textarea":H=V(Ta,{value:r,onBlur:z,onChange:N=>s(N.target.value),"aria-invalid":c?"true":"false"},e.key);break;case"select":H=Qe(Ma,{value:r,onValueChange:N=>b(N),children:[V(Ea,{children:e?.options&&e.options.length>0&&e.options.map(N=>V(Da,{value:N.value,className:"capitalize",children:N.label},N.value))}),V(Ia,{size:"sm",className:"capitalize w-full",children:V(Pa,{placeholder:"Select an option",children:e?.options?.find(N=>N.value===l)?.label??typeof r},r)})]},e.key);break;case"checkbox":H=V("div",{className:"flex items-center gap-2",children:Qe(h,{children:[V(zt,{checked:r,onCheckedChange:N=>b(N)},e.key),e.label]})});break;case"switch":H=V("div",{className:"flex items-center gap-2",children:Qe(h,{children:[V(Aa,{checked:r,onCheckedChange:N=>b(N)},e.key),e.label]})});break;case"radio":case"file":return null}return Qe("div",{className:"grid gap-1 w-full",children:[H,c&&V("p",{className:"text-red-500 text-sm",children:c})]})},zl=({items:e,onChange:t})=>e.map(a=>Qe("div",{className:g("flex flex-col items-start justify-start",a.value?.toString()?.length>30?"col-span-2":""),children:[V("p",{className:"text-sm text-muted-foreground capitalize",children:a?.label}),V(Hn,{item:a,onChange:a?.onChange??t,children:V("span",{className:"text-sm",children:a?.value??"-"})},a.key)]},a.key));import{jsx as $,jsxs as Xe}from"react/jsx-runtime";var Nr=[{color:"default",labelSelected:"border-primary/75 bg-primary/5",label:"hover:border-primary/50",iconSelected:"bg-primary/20",textSelected:"text-primary"},{color:"cyan",labelSelected:"border-cyan-500 bg-cyan-50 dark:bg-cyan-900/10",label:"hover:border-cyan-300",iconSelected:"bg-cyan-100 dark:bg-cyan-900/30",textSelected:"text-cyan-600 dark:text-cyan-400"},{color:"blue",labelSelected:"border-blue-500 bg-blue-50 dark:bg-blue-900/10",label:"hover:border-blue-300",iconSelected:"bg-blue-100 dark:bg-blue-900/30",textSelected:"text-blue-600 dark:text-blue-400"},{color:"green",labelSelected:"border-green-500 bg-green-50 dark:bg-green-900/10",label:"hover:border-green-300",iconSelected:"bg-green-100 dark:bg-green-900/30",textSelected:"text-green-600 dark:text-green-400"},{color:"red",labelSelected:"border-red-500 bg-red-50 dark:bg-red-900/10",label:"hover:border-red-300",iconSelected:"bg-red-100 dark:bg-red-900/30",textSelected:"text-red-600 dark:text-red-400"},{color:"orange",labelSelected:"border-orange-500 bg-orange-50 dark:bg-orange-900/10",label:"hover:border-orange-300",iconSelected:"bg-orange-100 dark:bg-orange-900/30",textSelected:"text-orange-600 dark:text-orange-400"},{color:"yellow",labelSelected:"border-yellow-500 bg-yellow-50 dark:bg-yellow-900/10",label:"hover:border-yellow-300",iconSelected:"bg-yellow-100 dark:bg-yellow-900/30",textSelected:"text-yellow-600 dark:text-yellow-400"}],Gl=({section:e})=>{let t=e.type==="checkbox",a=t?Array.isArray(e.value)?e.value:[]:[e.value],o=l=>{if(!t){e.onSave({key:e.key,value:l});return}let n=a.includes(l)?a.filter(c=>c!==l):[...a,l];e.onSave({key:e.key,value:n})},r=t?"div":Ht,s=t?{className:`grid grid-cols-1 md:grid-cols-${e.options.length} gap-4`}:{className:`grid grid-cols-1 md:grid-cols-${e.options.length} gap-4`,value:e.value??null,onValueChange:l=>e.onSave({key:e.key,value:l})};return Xe("div",{className:"space-y-6",children:[$(fe,{icon:typeof e.icon=="string"?$(i,{iconName:e.icon,size:24}):e.icon,title:e.title,description:e.description}),$(r,{...s,value:t?void 0:String(e.value??""),children:e.options.map((l,n)=>{let c=l.color??"default",d=Nr.find(u=>u.color===c)||Nr[0],b=t?l.key&&a.includes(l.key):e.value===l.value;return Xe("div",{children:[!t&&$(Ot,{id:`${e.key}:${l.value}`,value:String(l.value),className:"sr-only"}),$(h,{htmlFor:t?void 0:`${e.key}:${l.value}`,onClick:()=>t&&l.key&&o(l.key),className:`cursor-pointer border-2 rounded-lg p-4 flex items-center justify-center transition-all shadow-sm hover:shadow-md border-border ${b?d.labelSelected:d.label}`,children:Xe("div",{className:"flex flex-col items-center text-center space-y-3",children:[l.icon&&$("div",{className:`p-3 rounded-full ${b?g(d.iconSelected,d.textSelected):"bg-muted text-muted-foreground"}`,children:typeof l.icon=="string"?$(i,{iconName:l.icon,size:24}):l.icon}),Xe("div",{children:[Xe("div",{className:"flex items-center justify-center gap-1 font-medium",children:[l.title&&$("span",{children:l.title}),l.help_text&&Xe(le,{trigger:"hover",children:[$(ce,{children:$(i,{iconName:"IconHelpCircle",size:16,className:"mt-[1px] text-muted-foreground"})}),Xe(me,{className:"w-auto",children:[$(Ue,{children:"What is this?"}),$("div",{className:"p-2 my-2 mx-3 text-sm break-all",children:l.help_text})]})]})]}),l.description&&$("p",{className:"text-xs text-muted-foreground mt-1",children:l.description})]}),$("div",{className:"w-5 h-5",onClick:u=>{u.stopPropagation(),t&&l.key&&o(l.key)},children:b?$("div",{className:`border border-primary/20 ${t?"rounded-sm":"rounded-full"} bg-muted flex h-5 w-5 my-auto flex-shrink-0 items-center justify-center`,children:$(i,{iconName:"IconCheck",className:"w-3 h-3"})}):$("span",{className:`border border-primary/20 ${t?"rounded-sm":"rounded-full"} flex h-5 w-5 my-auto flex-shrink-0`})})]})})]},n)})}),e.extra?typeof e.extra=="function"?e.extra():e.extra:null]},e.key)};import{Transition as Un}from"@headlessui/react";import{IconCircleCheck as Vn,IconLoader2 as $n}from"@tabler/icons-react";import{Fragment as Gn,jsx as pt,jsxs as yr}from"react/jsx-runtime";var Wt=({processing:e,recentlySuccessful:t,processingText:a="Saving...",successText:o="Saved!",children:r,className:s,...l})=>pt(m,{disabled:e||t,className:g("flex items-center gap-2",s),variant:"outline",...l,children:t?pt(Un,{show:t,enter:"transition ease-in-out",enterFrom:"opacity-0",leave:"transition ease-in-out",leaveTo:"opacity-0",children:yr("div",{className:"flex items-center text-sm text-center text-muted-foreground mx-auto",children:[pt(Vn,{}),pt("span",{className:"ml-2",children:o})]})}):e?yr(Gn,{children:[pt($n,{className:"animate-spin"}),pt("span",{children:a})]}):r});import{usePage as Li}from"@inertiajs/react";import{Link as Dt,usePage as on}from"@inertiajs/react";import{Link as Zn}from"@inertiajs/react";import{IconChevronRight as Wn}from"@tabler/icons-react";import{jsx as A,jsxs as ut}from"react/jsx-runtime";var wr=({item:e})=>A(uo,{className:"list-none",children:A(Zn,{href:route(e.route_name,e.payload??{}),legacyBehavior:!0,passHref:!0,children:ut(m,{variant:"ghost",className:g("w-full justify-start font-normal",e.isActive&&"bg-accent text-accent-foreground"),children:[e.icon&&A(i,{iconName:e.icon,className:"h-4 w-4"}),A("span",{children:e.title})]})})}),qn=({item:e})=>ut("li",{className:"relative list-none [&:hover>div.flyout-menu]:block",children:[ut(m,{variant:"ghost",className:g("flex w-full cursor-pointer items-center justify-between font-normal transition-colors hover:bg-accent hover:text-accent-foreground",e.isActive&&"bg-accent text-accent-foreground"),children:[ut("div",{className:"flex items-center gap-2",children:[e.icon&&A(i,{iconName:e.icon,className:"h-4 w-4"}),A("span",{children:e.title})]}),A(Wn,{className:"h-4 w-4 text-muted-foreground"})]}),A("div",{className:"flyout-menu absolute left-full top-0 z-50 hidden pl-1",children:A("ul",{className:"flex w-auto flex-col gap-1 rounded-md border bg-popover p-2 text-popover-foreground shadow-md animate-in fade-in zoom-in-95",children:e.items?.map(t=>A("li",{children:A(Cr,{item:t})},t.title))})})]}),Cr=({item:e})=>e?.items&&e?.items?.length>0?A(qn,{item:e}):A(wr,{item:e}),kr=({menuItems:e})=>e?A(Ra,{viewport:!1,delayDuration:0,children:A(Fa,{className:"flex items-center",children:e.map(t=>t.items&&t.items.length>0?ut(uo,{children:[ut(Ba,{className:g("flex items-center gap-2",t.isActive&&"bg-accent text-accent-foreground"),children:[t.icon&&A(i,{iconName:t.icon,className:"h-4 w-4"}),A("span",{children:t.title})]}),A(_a,{className:"!overflow-visible min-w-[200px]",children:A("ul",{className:"flex w-auto flex-col gap-1 p-2",children:t.items.map(a=>A("li",{children:A(Cr,{item:a})},a.title))})})]},t.title):A(wr,{item:t}))})}):null;import{jsx as Mo,jsxs as Kn}from"react/jsx-runtime";var Sr=({className:e,...t})=>{let{appearance:a,updateAppearance:o}=Ye(),r=Ne();return Kn(m,{variant:"ghost",size:"icon",onClick:()=>{L("click",r),o(a==="dark"?"light":"dark")},className:g("group cursor-pointer",e),...t,children:[Mo(i,{iconName:"IconSun",className:"opacity-80 group-hover:opacity-100 !size-5 h-9 w-9 rotate-0 scale-100 transition-all dark:rotate-90 dark:scale-0"}),Mo(i,{iconName:"IconMoon",className:"opacity-80 group-hover:opacity-100 !size-5 absolute h-9 w-9 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),Mo("span",{className:"sr-only",children:"Temay\u0131 de\u011Fi\u015Ftir"})]})};import{jsx as de,jsxs as gt}from"react/jsx-runtime";function Qn({className:e="",...t}){let{appearance:a,updateAppearance:o}=Ye();return de("div",{className:e,...t,children:gt(De,{children:[de(Te,{asChild:!0,children:gt(m,{variant:"ghost",size:"icon",className:"h-9 w-9 rounded-md",children:[(()=>{switch(a){case"dark":return de(i,{iconName:"IconMoon",className:"h-5 w-5"});case"light":return de(i,{iconName:"IconSun",className:"h-5 w-5"});default:return de(i,{iconName:"IconDeviceDesktop",className:"h-5 w-5"})}})(),de("span",{className:"sr-only",children:"Toggle theme"})]})}),gt(Ae,{align:"end",children:[de(qe,{onClick:()=>o("light"),children:gt("span",{className:"flex items-center gap-2",children:[de(i,{iconName:"IconSun",className:"h-5 w-5"}),"Light"]})}),de(qe,{onClick:()=>o("dark"),children:gt("span",{className:"flex items-center gap-2",children:[de(i,{iconName:"IconMoon",className:"h-5 w-5"}),"Dark"]})}),de(qe,{onClick:()=>o("system"),children:gt("span",{className:"flex items-center gap-2",children:[de(i,{iconName:"IconDeviceDesktop",className:"h-5 w-5"}),"System"]})})]})]})})}import{jsx as Po,jsxs as Xn}from"react/jsx-runtime";var Cc=({className:e="",...t})=>{let{appearance:a,updateAppearance:o}=Ye(),r=[{value:"light",icon:"IconSun",label:"Light"},{value:"dark",icon:"IconMoon",label:"Dark"},{value:"system",icon:"IconDeviceDesktop",label:"System"}];return Po("div",{className:g("inline-flex gap-1 rounded-lg bg-neutral-100 p-1 dark:bg-neutral-800",e),...t,children:r.map(({value:s,icon:l,label:n})=>Xn("button",{onClick:()=>o(s),className:g("flex items-center rounded-md px-3.5 py-1.5 transition-colors",a===s?"bg-white shadow-xs dark:bg-neutral-700 dark:text-neutral-100":"text-neutral-500 hover:bg-neutral-200/60 hover:text-black dark:text-neutral-400 dark:hover:bg-neutral-700/60"),children:[Po(i,{iconName:l,className:"-ml-1 h-4 w-4"}),Po("span",{className:"ml-1.5 text-sm",children:n})]},s))})};import{useCallback as Yn,useEffect as jn,useState as Jn}from"react";function Ye(){let[e,t]=Jn("system"),a=Yn(o=>{t(o),localStorage.setItem("appearance",o),ea("appearance",o),qt(o),kt()},[]);return jn(()=>{let o=localStorage.getItem("appearance");return a(o||"system"),()=>Io()?.removeEventListener("change",Eo)},[a]),{appearance:e,updateAppearance:a}}var es=()=>typeof window>"u"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,qt=e=>{let t=e==="dark"||e==="system"&&es();document.documentElement.classList.toggle("dark",t)},Io=()=>typeof window>"u"?null:window.matchMedia("(prefers-color-scheme: dark)"),Eo=()=>{let e=localStorage.getItem("appearance");qt(e||"system"),kt()};function Lc(){let e=localStorage.getItem("appearance")||"system";qt(e),Io()?.addEventListener("change",Eo)}import{Root as ts,Image as os,Fallback as as}from"@radix-ui/react-avatar";import{jsx as To}from"react/jsx-runtime";function Mr({className:e,...t}){return To(ts,{"data-slot":"avatar",className:g("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function Pr({className:e,...t}){return To(os,{"data-slot":"avatar-image",className:g("aspect-square size-full",e),...t})}function Do({className:e,...t}){return To(as,{"data-slot":"avatar-fallback",className:g("bg-muted flex size-full items-center justify-center rounded-[inherit] text-xs",e),...t})}import{Fragment as rs,jsx as B,jsxs as Be}from"react/jsx-runtime";var ft=({user:e,type:t="circle",className:a,...o})=>{let r=Za(e);return Be("div",{className:g("relative",a),children:[B(Mr,{className:g(t==="circle"?"rounded-full":"rounded-sm",a),...o,children:e?e.avatar?B(Pr,{src:Ee(e.avatar),alt:e?.name,title:"Last seen at "+new Date(e?.last_seen_at??"").toLocaleString()}):B(Do,{className:"capitalize bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white",children:e?.name?.slice(0,1)}):B(Do,{className:"capitalize bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white",children:Be(le,{trigger:"hover",children:[B(ce,{children:B(i,{iconName:"IconSpy",className:"w-4 h-4",stroke:"1.5"})}),Be(me,{className:"w-auto",children:[B(Ue,{children:"What does it mean?"}),B("div",{className:"p-2 my-2 mx-3 text-sm break-all",children:"User is not available (Guest)"})]})]})})}),B("span",{className:`border-background absolute rounded-full -end-0.5 -bottom-0.5 size-3 border-2 ${Wa(r)}`,children:B("span",{className:"sr-only",children:r})})]})},Kt=({user:e,settings:t,className:a,...o})=>Be("div",{className:g("grid gap-1",a),...o,children:[Be("span",{className:"block text-sm font-medium text-foreground capitalize flex items-center gap-1",children:[Be("div",{className:"flex items-center gap-1",children:[t?.showName!==!1&&B("span",{style:{textTransform:"lowercase"},children:e?.name}),t?.showId!==!1&&Be("span",{className:"text-muted-foreground text-xs",children:["#",e?.id]})]}),t?.showRole!==!1&&B("div",{className:"flex h-4"})]}),t?.showEmail!==!1&&B("span",{className:"block text-xs text-foreground/50",children:e?.email})]}),Yc=({user:e,settings:t,...a})=>B(rs,{children:Be(le,{trigger:"hover",isActive:t?.showPopover!==!1,children:[B(ce,{children:t?.showAvatar!==!1&&B(ft,{user:e,type:"circle"})}),B(me,{className:"w-auto max-w-[250px] break-all",children:B("div",{className:"text-sm break-all",children:Be("div",{className:"flex items-center gap-2",children:[t?.showAvatar!==!1&&B(ft,{user:e,type:"square"}),B(Kt,{user:e,settings:t})]})})})]})});import{Link as Ir,usePage as Ao}from"@inertiajs/react";import{Fragment as ns,jsx as D,jsxs as _e}from"react/jsx-runtime";var Er=({settings:e})=>{let{user:t}=Ao().props.auth,a=hr();return _e(ns,{children:[D(Ha,{className:"p-0 font-normal",children:_e("div",{className:"flex items-center gap-2 px-1 text-left text-sm",children:[D(ft,{user:t,type:"square"}),D(Kt,{settings:e,className:"py-2",user:t})]})}),D(go,{}),D(za,{children:D(qe,{asChild:!0,children:_e(Ir,{className:"block w-full",href:route("user"),as:"button",prefetch:!0,onClick:a,children:[D(i,{iconName:"IconUserSquare",className:"mr-2"}),"My Account"]})})}),D(go,{}),D(qe,{asChild:!0,children:_e(Ir,{className:"block w-full",method:"post",href:route("logout"),as:"button",onClick:a,children:[D(i,{iconName:"IconLogout",className:"mr-2"}),"Log out"]})})]})},Dr=({showName:e=!0})=>{let{user:t}=Ao().props.auth;return _e(De,{children:[D(Te,{asChild:!0,children:_e("div",{className:"flex items-center gap-3 cursor-pointer",children:[_e("span",{className:"text-sm",children:["Hello ",D("span",{className:"font-bold",children:t.name})]}),D(m,{variant:"ghost",className:"size-8 rounded-full",children:D(ft,{user:t,type:"circle"})})]})}),D(Ae,{className:"w-56",children:D(Er,{})})]})},lm=()=>{let{user:e}=Ao().props.auth,{isMobile:t}=da();return D(_t,{children:D(Ct,{children:_e(De,{children:[D(Te,{asChild:!0,children:_e(We,{size:"lg",className:"data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",children:[D(ft,{user:e,type:"square"}),D(Kt,{settings:{showRole:!1,showId:!1},user:e,className:"py-2"}),D(i,{iconName:"IconDotsVertical",className:"ml-auto size-4"})]})}),D(Ae,{className:"w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg",side:t?"bottom":"right",sideOffset:4,children:D(Er,{settings:{showRole:!1,showId:!1}})})]})})})};import{usePage as ss}from"@inertiajs/react";import{jsx as is}from"react/jsx-runtime";var Tr=()=>{let{url:e}=ss(),t=[],a=[];t.push({title:"My Account",icon:"IconUserSquare",route_name:"user"}),a.push({title:"Dashboard",route_name:"dashboard",icon:"IconBrandTabler"});let r=mt([{title:"Main Menu",items:t}],e)[0];return is(St,{rightNavItems:a,mainMenu:r})};import{Link as ls}from"@inertiajs/react";import{Fragment as cs}from"react";import{Fragment as ms,jsx as je,jsxs as Ar}from"react/jsx-runtime";function Lr({breadcrumbs:e}){return je(ms,{children:e.length>0&&je(Oa,{children:je(Ua,{children:e.map((t,a)=>{let o=a===e.length-1;return Ar(cs,{children:[Ar(Va,{className:"flex items-center gap-2",children:[t.icon&&je(i,{iconName:t.icon,size:16,className:o?"text-primary":"text-muted-foreground"}),o?je($a,{children:t.title}):je(ls,{href:t.href??"#",children:t.title})]}),!o&&je(Ga,{})]},a)})})})})}import{jsx as Je,jsxs as Rr}from"react/jsx-runtime";var vt=({children:e,breadcrumbs:t,...a})=>{if(typeof window>"u")return Je(Fr,{});let o=[{title:"My Account",href:route("user"),icon:"IconUserSquare"},...t||[]];return Rr(Mt,{className:"mt-17",children:[Je(Tr,{}),Rr("main",{className:"mx-auto flex h-full w-full max-w-7xl space-y-8 flex-1 flex-col gap-1 rounded-xl",...a,children:[o.length>0?Je("div",{className:"border-sidebar-border/70 flex w-full border-b",children:Je("div",{className:"mx-auto flex h-12 w-full items-center justify-center px-4 text-neutral-500 md:max-w-7xl",children:Je(Lr,{breadcrumbs:o})})}):Je("div",{className:"h-12"}),Je("div",{className:"@container/main px-7",children:e})]})]})};import{useForm as qs}from"@inertiajs/react";import{useRef as $r}from"react";import{toast as Ks}from"sonner";import{useForm as ds,usePage as ps}from"@inertiajs/react";import{toast as us}from"sonner";var Br=()=>{let t=ps().props.app.media_base_path,{data:a,setData:o,post:r,processing:s,errors:l,reset:n}=ds({email:"",password:"",remember:!1});return{data:a,setData:o,post:r,processing:s,errors:l,reset:n,submit:d=>{d.preventDefault(),us.promise(new Promise((b,u)=>{r(route("login"),{onSuccess:()=>L("intro",t),onFinish:()=>{n("password"),b(!0)},onError:()=>{L("soft-alert",t),u(!1)}})}),{loading:"Logging in...",success:"Login successful!",error:"Login failed!"})}}};import{useState as gs}from"react";import{Head as fs}from"@inertiajs/react";import{Fragment as bs,jsx as _,jsxs as pe}from"react/jsx-runtime";var _r=({status:e,canResetPassword:t})=>{let{data:a,setData:o,post:r,processing:s,errors:l,reset:n,submit:c}=Br();return pe(bs,{children:[pe("form",{className:"flex flex-col gap-6",onSubmit:c,children:[pe("div",{className:"grid gap-6",children:[pe("div",{className:"grid gap-2",children:[_(h,{htmlFor:"email",children:"Email address"}),pe("div",{className:"group relative",children:[_(E,{id:"email",type:"email",required:!0,autoFocus:!0,tabIndex:1,autoComplete:"email",value:a.email,onChange:d=>o("email",d.target.value),placeholder:"email@example.com",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1","aria-invalid":!!l.email}),_("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:_(i,{iconName:"IconMail",size:16})})]}),_(k,{message:l.email})]}),pe("div",{className:"grid gap-2",children:[pe("div",{className:"flex items-center",children:[_(h,{htmlFor:"password",children:"Password"}),t&&_(Le,{href:route("password.request"),className:"ml-auto text-sm",tabIndex:5,children:"Forgot password?"})]}),_(j,{id:"password",type:"password",required:!0,tabIndex:2,autoComplete:"current-password",value:a.password,onChange:d=>o("password",d.target.value),placeholder:"Password",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),_(k,{message:l.password})]}),pe("div",{className:"flex items-center space-x-3",children:[_(zt,{id:"remember",name:"remember",checked:a.remember,onClick:()=>o("remember",!a.remember),tabIndex:3}),_(h,{htmlFor:"remember",children:"Remember me"})]}),pe(m,{type:"submit",className:"mt-4 w-full",tabIndex:4,disabled:s,children:[s&&_(i,{iconName:"IconLoader2",className:"h-4 w-4 animate-spin"}),"Log in"]})]}),pe("div",{className:"text-muted-foreground text-center text-sm",children:["Don't have an account?"," ",_(Le,{href:route("register"),tabIndex:5,children:"Sign up"})]})]}),e&&_("div",{className:"mb-4 text-center text-sm font-medium text-green-600",children:e})]})},ad=({trigger:e,status:t,canResetPassword:a})=>{let[o,r]=gs(!1);return pe(ye,{open:o,onOpenChange:r,children:[_(we,{children:_(_r,{status:t,canResetPassword:a})}),_(dt,{children:e})]})},vs=({status:e,canResetPassword:t})=>_(_r,{status:e,canResetPassword:t}),rd=({status:e,canResetPassword:t})=>pe(oe,{title:"Log in to your account",description:"Enter your email and password below to log in",children:[_(fs,{title:"Log in"}),_(vs,{status:e,canResetPassword:t})]});import{Head as hs}from"@inertiajs/react";import{useState as xs}from"react";import{jsx as ue,jsxs as Pt}from"react/jsx-runtime";var Lo=({callback:e})=>{let{data:t,setData:a,submit:o,processing:r,errors:s}=vo(e);return ue("form",{onSubmit:o,children:Pt("div",{className:"space-y-6",children:[Pt("div",{className:"grid gap-2",children:[ue(h,{htmlFor:"password",children:"Password"}),ue(j,{id:"password",type:"password",name:"password",placeholder:"Password",autoComplete:"current-password",value:t.password,autoFocus:!0,onChange:l=>a("password",l.target.value),className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),ue(k,{message:s.password})]}),ue("div",{className:"flex items-center",children:Pt(m,{className:"w-full",disabled:r,children:[r&&ue(i,{iconName:"IconLoader2",className:"h-4 w-4 animate-spin"}),"Confirm password"]})})]})})},Ns=({trigger:e,callback:t})=>{let[a,o]=xs(!1);return Pt(ye,{open:a,onOpenChange:o,children:[ue(we,{children:ue(Lo,{callback:s=>{t&&(t(s),o(!1))}})}),ue(dt,{children:e})]})},zr=()=>ue(Lo,{}),ys=()=>Pt(oe,{title:"Confirm your password",description:"This is a secure area of the application. Please confirm your password before continuing.",children:[ue(hs,{title:"Confirm password"}),ue(zr,{})]});import{Head as ws}from"@inertiajs/react";import{Fragment as Ss,jsx as ae,jsxs as $e}from"react/jsx-runtime";var Ro=({status:e})=>{let{data:t,setData:a,submit:o,post:r,processing:s,errors:l}=bo();return $e(Ss,{children:[e&&ae("div",{className:"mb-4 text-center text-sm font-medium text-green-600",children:e}),$e("div",{className:"space-y-6",children:[$e("form",{onSubmit:o,children:[$e("div",{className:"grid gap-2",children:[ae(h,{htmlFor:"email",children:"Email address"}),$e("div",{className:"group relative",children:[ae(E,{id:"email",type:"email",name:"email",autoComplete:"off",value:t.email,autoFocus:!0,onChange:n=>a("email",n.target.value),placeholder:"email@example.com","aria-invalid":!!l.email,className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),ae("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:ae(i,{iconName:"IconMail",size:16})})]}),ae(k,{message:l.email})]}),ae("div",{className:"my-6 flex items-center justify-start",children:$e(m,{className:"w-full",disabled:s,children:[s&&ae(i,{iconName:"IconLoader2",className:"h-4 w-4 animate-spin"}),"Email password reset link"]})})]}),$e("div",{className:"text-muted-foreground space-x-1 text-center text-sm",children:[ae("span",{children:"Or, return to"}),ae(Le,{href:route("login"),children:"log in"})]})]})]})},Cs=({status:e})=>ae(Ro,{status:e}),ks=({status:e})=>$e(oe,{title:"Forgot password",description:"Enter your email to receive a password reset link",children:[ae(ws,{title:"Forgot password"}),ae(Ro,{status:e})]});import{Head as Ms}from"@inertiajs/react";import{jsx as J,jsxs as bt}from"react/jsx-runtime";var Hr=({token:e,email:t})=>{let{data:a,setData:o,submit:r,post:s,processing:l,errors:n}=ho({token:e,email:t});return J("form",{onSubmit:r,children:bt("div",{className:"grid gap-6",children:[bt("div",{className:"grid gap-2",children:[J(h,{htmlFor:"email",children:"Email"}),J(E,{id:"email",type:"email",name:"email",autoComplete:"email",value:a.email,className:"mt-1 block w-full",readOnly:!0,onChange:c=>o("email",c.target.value)}),J(k,{message:n.email,className:"mt-2"})]}),bt("div",{className:"grid gap-2",children:[J(h,{htmlFor:"password",children:"Password"}),J(j,{id:"password",type:"password",name:"password",autoComplete:"new-password",value:a.password,className:"mt-1 block w-full",autoFocus:!0,onChange:c=>o("password",c.target.value),placeholder:"Password"}),J(k,{message:n.password})]}),bt("div",{className:"grid gap-2",children:[J(h,{htmlFor:"password_confirmation",children:"Confirm password"}),J(j,{id:"password_confirmation",type:"password",name:"password_confirmation",autoComplete:"new-password",value:a.password_confirmation,className:"mt-1 block w-full",onChange:c=>o("password_confirmation",c.target.value),placeholder:"Confirm password"}),J(k,{message:n.password_confirmation,className:"mt-2"})]}),bt(m,{type:"submit",className:"mt-4 w-full",disabled:l,children:[l&&J(i,{iconName:"IconLoader2",className:"h-4 w-4 animate-spin"}),"Reset password"]})]})})},Or=({token:e,email:t})=>J(Hr,{token:e,email:t}),Ps=({token:e,email:t})=>bt(oe,{title:"Reset password",description:"Please enter your new password below",children:[J(Ms,{title:"Reset password"}),J(Or,{token:e,email:t})]});import{useState as Is}from"react";import{Head as Es}from"@inertiajs/react";import{IconLoader2 as Ds,IconMail as Ts,IconUserCircle as As}from"@tabler/icons-react";import{jsx as T,jsxs as ve}from"react/jsx-runtime";var Qt=()=>{let{data:e,setData:t,submit:a,processing:o,errors:r}=xo();return ve("form",{className:"flex flex-col gap-6",onSubmit:a,children:[ve("div",{className:"grid gap-6",children:[ve("div",{className:"grid gap-2",children:[T(h,{htmlFor:"name",children:"Name"}),ve("div",{className:"group relative",children:[T(E,{id:"name",type:"text",required:!0,autoFocus:!0,tabIndex:1,autoComplete:"name",value:e.name,onChange:s=>t("name",s.target.value),disabled:o,placeholder:"Full name","aria-invalid":!!r.name,className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),T("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:T(As,{size:16})})]}),T(k,{message:r.name,className:"mt-2"})]}),ve("div",{className:"grid gap-2",children:[T(h,{htmlFor:"email",children:"Email address"}),ve("div",{className:"group relative",children:[T(E,{id:"email",type:"email",required:!0,tabIndex:2,autoComplete:"email",value:e.email,onChange:s=>t("email",s.target.value),disabled:o,placeholder:"email@example.com","aria-invalid":!!r.email,className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),T("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:T(Ts,{size:16})})]}),T(k,{message:r.email})]}),ve("div",{className:"grid gap-2",children:[T(h,{htmlFor:"password",children:"Password"}),T(j,{id:"password",type:"password",required:!0,tabIndex:3,autoComplete:"new-password",value:e.password,onChange:s=>t("password",s.target.value),disabled:o,placeholder:"Password","aria-invalid":!!r.password,className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),T(k,{message:r.password})]}),ve("div",{className:"grid gap-2",children:[T(h,{htmlFor:"password_confirmation",children:"Confirm password"}),T(j,{id:"password_confirmation",type:"password",required:!0,tabIndex:4,autoComplete:"new-password",value:e.password_confirmation,onChange:s=>t("password_confirmation",s.target.value),disabled:o,placeholder:"Confirm password","aria-invalid":!!r.password_confirmation,className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1"}),T(k,{message:r.password_confirmation})]}),ve(m,{type:"submit",className:"mt-2 w-full",tabIndex:5,disabled:o,children:[o&&T(Ds,{className:"h-4 w-4 animate-spin"}),"Create account"]})]}),ve("div",{className:"text-muted-foreground text-center text-sm",children:["Already have an account?"," ",T(Le,{href:route("login"),tabIndex:6,children:"Log in"})]})]})},Ls=()=>{let[e,t]=Is(!1);return T(ye,{open:e,onOpenChange:t,children:T(we,{children:T(Qt,{})})})},Rs=()=>T(Qt,{}),Fs=()=>ve(oe,{title:"Create an account",description:"Enter your details below to create your account",children:[T(Es,{title:"Register"}),T(Qt,{})]});import{IconEye as Bs,IconEyeOff as _s}from"@tabler/icons-react";import{useState as zs}from"react";import{jsx as ht,jsxs as Hs}from"react/jsx-runtime";var j=({className:e,type:t,...a})=>{let[o,r]=zs(!0);return Hs("div",{className:"group relative",children:[ht(E,{id:"password",type:o?"password":"text",name:"password",placeholder:"Password",autoComplete:"current-password",autoFocus:!0,className:e,...a}),ht("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3 shrink-0",children:ht(i,{iconName:"IconLockCode",size:16})}),ht("div",{className:"text-muted-foreground hover:text-primary absolute inset-y-0 end-0 flex items-center justify-center pr-3 shrink-0 cursor-pointer",onClick:()=>r(s=>!s),children:o?ht(Bs,{size:18}):ht(_s,{size:18})})]})};import{Link as Xt,usePage as Os}from"@inertiajs/react";import{jsx as M,jsxs as re}from"react/jsx-runtime";var oe=({children:e,title:t,description:a,variant:o="simple",...r})=>re(Mt,{children:[M(St,{}),o==="simple"?M(Vs,{children:e,title:t,description:a,...r}):o==="card"?M(Us,{children:e,title:t,description:a,...r}):o==="split"?M($s,{children:e,title:t,description:a,...r}):null]}),Us=({children:e,title:t,description:a})=>M("div",{className:"bg-muted flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10",children:re("div",{className:"flex w-full max-w-md flex-col gap-6",children:[M(Xt,{href:route("home"),className:"flex items-center gap-2 self-center font-medium",children:M("div",{className:"mb-1 flex lg:w-[200px] w-[150px] items-center justify-center rounded-md",children:M(be,{})})}),M("div",{className:"flex flex-col gap-6",children:re(Z,{className:"rounded-xl",children:[re(X,{className:"px-10 pt-8 pb-0 text-center",children:[M(Ke,{className:"text-xl",children:t}),M($t,{children:a})]}),M(Y,{className:"px-10 py-8",children:e})]})})]})}),Vs=({children:e,title:t,description:a})=>M("div",{className:"bg-background flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10",children:M("div",{className:"w-full max-w-sm",children:re("div",{className:"flex flex-col gap-8",children:[re("div",{className:"flex flex-col items-center gap-4",children:[re(Xt,{href:route("home"),className:"flex flex-col items-center gap-2 font-medium",children:[M("div",{className:"mb-1 flex lg:w-[200px] w-[150px] items-center justify-center rounded-md",children:M(be,{})}),M("span",{className:"sr-only",children:t})]}),re("div",{className:"space-y-2 text-center",children:[M("h1",{className:"text-xl font-medium",children:t}),M("p",{className:"text-muted-foreground text-center text-sm",children:a})]})]}),e]})})}),$s=({children:e,title:t,description:a})=>{let{name:o}=Os().props;return re("div",{className:"relative grid h-dvh flex-col items-center justify-center px-8 sm:px-0 lg:max-w-none lg:grid-cols-2 lg:px-0",children:[re("div",{className:"bg-muted relative hidden h-full flex-col p-10 text-white lg:flex dark:border-r",children:[M("div",{className:"absolute inset-0 bg-zinc-900"}),re(Xt,{href:route("home"),className:"relative z-20 flex items-center text-lg font-medium",children:[M(be,{className:"mr-2 size-8 fill-current text-white"}),o]})]}),M("div",{className:"w-full lg:p-8",children:re("div",{className:"mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]",children:[M(Xt,{href:route("home"),className:"relative z-20 flex items-center justify-center lg:hidden",children:M(be,{className:"h-10 fill-current text-black sm:h-12"})}),re("div",{className:"flex flex-col items-start gap-2 text-left sm:items-center sm:text-center",children:[M("h1",{className:"text-xl font-medium",children:t}),M("p",{className:"text-muted-foreground text-sm text-balance",children:a})]}),e]})})]})};import{Head as Gs}from"@inertiajs/react";import{Fragment as Ws,jsx as xt,jsxs as Yt}from"react/jsx-runtime";var Ur=({status:e})=>{let{submit:t,processing:a}=No();return Yt(Ws,{children:[e==="verification-link-sent"&&xt("div",{className:"mb-4 text-center text-sm font-medium text-green-600",children:"A new verification link has been sent to the email address you provided during registration."}),Yt("form",{onSubmit:t,className:"space-y-6 text-center",children:[Yt(m,{disabled:a,variant:"secondary",children:[a&&xt(i,{iconName:"IconLoader2",className:"h-4 w-4 animate-spin"}),"Resend verification email"]}),xt(Le,{href:route("logout"),method:"post",className:"mx-auto block text-sm",children:"Log out"})]})]})},Vr=({status:e})=>xt(Ur,{status:e}),Zs=({status:e})=>Yt(oe,{title:"Verify email",description:"Please verify your email address by clicking on the link we just emailed to you.",children:[xt(Gs,{title:"Email verification"}),xt(Vr,{status:e})]});import{jsx as ge,jsxs as It}from"react/jsx-runtime";var Gr=()=>{let e=Ne(),t=$r(null),a=$r(null),{data:o,setData:r,errors:s,put:l,reset:n,processing:c,recentlySuccessful:d}=qs({current_password:"",password:"",password_confirmation:""});return It("form",{onSubmit:u=>{u.preventDefault(),l(route("user.password.update"),{preserveScroll:!0,onSuccess:()=>{L("success",e),n()},onError:z=>{L("error",e),z.password&&(Ks.error(z.password),n("password","password_confirmation"),t.current?.focus()),z.current_password&&(n("current_password"),a.current?.focus())}})},className:"space-y-6",children:[It("div",{className:"grid gap-2",children:[ge(h,{htmlFor:"current_password",children:"Current Password"}),ge(j,{id:"current_password",type:"password",required:!0,value:o.current_password,onChange:u=>r("current_password",u.target.value),placeholder:"Current password",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),ge(k,{className:"mt-2",message:s.current_password})]}),It("div",{className:"grid gap-2",children:[ge(h,{htmlFor:"password",children:"New Password"}),ge(j,{id:"password",type:"password",required:!0,value:o.password,onChange:u=>r("password",u.target.value),placeholder:"New password",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),ge(k,{className:"mt-2",message:s.password})]}),It("div",{className:"grid gap-2",children:[ge(h,{htmlFor:"password_confirmation",children:"Confirm Password"}),ge(j,{id:"password_confirmation",type:"password",required:!0,value:o.password_confirmation,onChange:u=>r("password_confirmation",u.target.value),placeholder:"Confirm password",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),ge(k,{className:"mt-2",message:s.password_confirmation})]}),ge("div",{className:"grid gap-4",children:It(Wt,{processing:c,recentlySuccessful:d,successText:"Password saved!",children:[ge(i,{iconName:"IconDeviceFloppy"}),ge("span",{children:"Save Password"})]})})]})};import{Head as Qs}from"@inertiajs/react";import{jsx as et,jsxs as Fo}from"react/jsx-runtime";var pu=()=>Fo(vt,{breadcrumbs:[{title:"Edit Password",href:route("user.password.edit"),icon:"IconKey"}],children:[et(Qs,{title:"Edit Password"}),Fo("div",{className:"grid grid-cols-[2fr_4fr] gap-12",children:[et(Bo,{}),Fo(Z,{children:[et(X,{children:et(fe,{icon:et(i,{iconName:"IconLock"}),title:"Edit Password",description:"Update your password to keep your account secure"})}),et(Y,{children:et(Gr,{})})]})]})]});import{useForm as Xs}from"@inertiajs/react";import{useRef as Ys}from"react";import{toast as js}from"sonner";import{jsx as ee,jsxs as Ge}from"react/jsx-runtime";var Zr=()=>{let e=Ne(),t=Ys(null),{data:a,setData:o,delete:r,processing:s,reset:l,errors:n,clearErrors:c}=Xs({password:""}),d=u=>{u.preventDefault(),js.promise(new Promise((z,H)=>{r(route("profile.destroy"),{preserveScroll:!0,onSuccess:()=>(z(!0),b(),L("success",e)),onError:()=>(H(!1),t.current?.focus(),L("error",e)),onFinish:()=>l()})}))},b=()=>{c(),l()};return Ge("div",{className:"space-y-6",children:[ee(Ja,{title:"Delete account",description:"Delete your account and all of its resources"}),Ge("div",{className:"space-y-4 rounded-lg border border-red-100 bg-red-50 p-4 dark:border-red-200/10 dark:bg-red-700/10",children:[Ge("div",{className:"relative space-y-0.5 text-red-600 dark:text-red-100",children:[ee("p",{className:"font-medium",children:"Warning"}),ee("p",{className:"text-sm",children:"Please proceed with caution, this cannot be undone."})]}),Ge(ye,{children:[ee(dt,{asChild:!0,children:ee(m,{variant:"destructive",children:"Delete account"})}),Ge(we,{children:[ee(Qa,{children:"Are you sure you want to delete your account?"}),ee(Xa,{children:"Once your account is deleted, all of its resources and data will also be permanently deleted. Please enter your password to confirm you would like to permanently delete your account."}),Ge("form",{className:"space-y-6",onSubmit:d,children:[Ge("div",{className:"grid gap-2",children:[ee(h,{htmlFor:"password",className:"sr-only",children:"Password"}),ee(E,{id:"password",type:"password",name:"password",ref:t,value:a.password,onChange:u=>o("password",u.target.value),placeholder:"Password",autoComplete:"current-password"}),ee(k,{message:n.password})]}),Ge(Vt,{className:"gap-2",children:[ee(qa,{asChild:!0,children:ee(m,{variant:"secondary",onClick:b,children:"Cancel"})}),ee(m,{variant:"destructive",disabled:s,asChild:!0,children:ee("button",{type:"submit",children:"Delete account"})})]})]})]})]})]})]})};import{Head as Js}from"@inertiajs/react";import{jsx as tt,jsxs as Wr}from"react/jsx-runtime";var Fu=()=>Wr(vt,{children:[tt(Js,{title:"Delete Account"}),tt("div",{className:"max-w-7xl mx-auto space-y-8 my-8",children:Wr(Z,{children:[tt(X,{children:tt(fe,{icon:tt(i,{iconName:"IconDelete"}),title:"Delete Account",description:"Permanently delete your account and all associated data"})}),tt(Y,{children:tt(Zr,{})})]})})]});import{Link as qr,router as ei,usePage as Kr}from"@inertiajs/react";import{useEffect as ti,useState as Nt}from"react";import oi from"react-easy-crop";import{toast as ai}from"sonner";import{Fragment as Et,jsx as f,jsxs as G}from"react/jsx-runtime";var ri=({image:e,isOpen:t,setIsOpen:a,onSave:o})=>{let[r,s]=Nt({x:0,y:0}),[l,n]=Nt(1),[c,d]=Nt(e),[b,u]=Nt(null);return ti(()=>{d(e),s({x:0,y:0}),n(1),u(null)},[e,t]),f(ye,{open:t,onOpenChange:a,children:G(we,{className:"max-h-[75vh] sm:max-w-[50vw] xl:max-w-[50vw] min-h-[50vh] grid !gap-4 overflow-auto",children:[G(Ka,{className:"flex items-center gap-2",children:[f(i,{iconName:"IconCrop"}),f("span",{className:"text-lg",children:"Crop Avatar"})]}),f("div",{className:"grid",children:f("div",{className:"relative flex-1 bg-neutral-900 aspect-square w-full h-auto border max-h-[60vh] min-h-[200px] sm:min-h-[400px] ",children:f(oi,{image:c,crop:r,zoom:l,aspect:1,zoomSpeed:.1,onCropChange:s,onZoomChange:n,onCropComplete:(H,N)=>u(N)})})}),G(Vt,{children:[f(m,{variant:"outline",onClick:()=>a(!1),children:"Cancel"}),f(m,{onClick:async()=>{if(!c||!b)return;let H=await er(c,b);o(H),a(!1)},disabled:!b,children:"Save"})]})]})})},Bo=({className:e})=>{let{auth:t}=Kr().props,[a,o]=Nt(t?.user?.avatar||""),[r,s]=Nt(!1),l=Ne(),n=new Date().getHours();return f(Et,{children:f(Z,{className:g("",e),children:G(Y,{className:"grid grid-cols-1 gap-7",children:[f("div",{className:"text-xl text-center",children:n>=5&&n<11?G(Et,{children:["\u{1F304} Good morning ",f("span",{className:"font-bold",children:t.user.name}),"!"]}):n>=11&&n<17?G(Et,{children:["\u2600\uFE0F Good afternoon ",f("span",{className:"font-bold",children:t.user.name}),"!"]}):n>=17&&n<21?G(Et,{children:["\u{1F307} Good evening ",f("span",{className:"font-bold",children:t.user.name}),"!"]}):G(Et,{children:["\u{1F319} Good night ",f("span",{className:"font-bold",children:t.user.name}),"!"]})}),f("div",{className:g("mx-auto max-w-[250px] w-full h-auto aspect-[1/1] flex items-center cursor-pointer object-fit transition-all hover:scale-105 duration-300 bg-accent/25 rounded-md border",t.user.avatar?"":"border-[1.5px] border-dashed rounded-md"),onClick:()=>{document.querySelector("#user-avatar")?.click()},style:t.user.avatar?{backgroundImage:`url(${Ee(t.user.avatar)})`,backgroundSize:"cover"}:{},children:!t.user.avatar&&f(i,{className:"mx-auto h-8 w-8",iconName:"IconUpload"})}),G("div",{className:"grid text-center",children:[f("div",{className:"mx-auto flex items-center gap-2",children:f("span",{className:"text-xl font-bold truncate",children:t.user.name+(t.user?.surname?" "+t.user.surname:"")})}),f("span",{className:"text-sm text-muted-foreground",children:t.user.email})]}),f("input",{id:"user-avatar",hidden:!0,type:"file",accept:"image/*",onChange:c=>{let d=c.target.files?.[0];if(!d){c.currentTarget.value="";return}o(URL.createObjectURL(d)),s(!0),c.currentTarget.value=""}}),f(ri,{image:a,isOpen:r,setIsOpen:s,onSave:c=>{ai.promise(new Promise((d,b)=>{ei.patch(route("user.profile.update"),{avatar:tr(c,"avatar.jpg")},{onSuccess:u=>{L("success",l),d(u)},onError:u=>{L("error",l),b(u)}})}),{loading:"Avatar Updating...",success:"Avatar Updated",error:"Avatar Update Failed"})}})]})})})},ni=({className:e})=>{let{auth:t}=Kr().props,a=[{icon:"IconUser",title:"Name-Surname",value:t.user.name+" "+(t.user?.surname??"")},{icon:"IconMail",title:"Email",value:t.user.email},{icon:"IconPhone",title:"Phone",value:t.user.phone},{icon:"IconUserKey",title:"User Role",value:t.user.role_code},{icon:"IconCalendar",title:"Registered At",value:new Date(t.user.created_at).toLocaleString()},{icon:"IconCalendar",title:"Last Seen At",value:t.user?.last_seen_at?new Date(t.user?.last_seen_at??"").toLocaleString():"Never"}];return G(Z,{className:g("",e),children:[G(X,{children:[f(fe,{icon:f(i,{iconName:"IconUser"}),title:"Account Overview",description:"Manage your personal information and account settings"}),f("hr",{className:"mt-2"})]}),G(Y,{className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:[a.map(o=>f(Z,{className:"bg-accent/15 transition-all hover:translate-y-[-5px] hover:scale-105 duration-300 cursor-pointer",children:G(Y,{className:"flex items-center gap-2",children:[f(i,{iconName:o.icon,className:"w-6 h-6 shrink-0"}),G("div",{className:"grid",children:[f("span",{className:"text-sm font-bold truncate",children:o.title}),f("span",{className:"text-xs truncate",children:o.value})]})]})})),f(qr,{className:"col-span-full w-full",href:route("user.profile.edit"),children:G(m,{variant:"outline",className:"w-full flex items-center gap-2",size:"sm",children:[f(i,{iconName:"IconEdit"}),"Edit Details"]})})]})]})},si=({className:e})=>f(Z,{className:g("",e),children:f(X,{children:f(fe,{icon:f(i,{iconName:"IconLock"}),title:"Account Security",description:"Manage your account security settings",buttons:f(qr,{href:route("user.password.edit"),className:"w-full md:w-auto",children:G(m,{variant:"outline",className:"flex items-center gap-2 w-full md:w-auto",children:[f(i,{iconName:"IconKey"}),"Change Password"]})})})})}),Yu=()=>G("div",{className:"grid lg:grid-cols-[2fr_4fr] gap-12",children:[f(Bo,{}),f(ni,{}),f(si,{className:"col-span-full"})]});import{Link as ii,useForm as li,usePage as ci}from"@inertiajs/react";import{jsx as P,jsxs as ne}from"react/jsx-runtime";var ng=({mustVerifyEmail:e,status:t})=>{let a=Ne(),{auth:o}=ci().props,{data:r,setData:s,patch:l,errors:n,processing:c,recentlySuccessful:d}=li({name:o.user.name,surname:o.user.surname,email:o.user.email,phone:o.user.phone});return ne("form",{onSubmit:u=>{u.preventDefault(),l(route("user.profile.update"),{preserveScroll:!0,onSuccess:()=>L("success",a),onError:()=>L("error",a)})},className:"space-y-6",children:[ne("div",{className:"grid md:grid-cols-2 gap-2",children:[ne("div",{className:"grid gap-2",children:[P(h,{htmlFor:"name",children:"Name"}),ne("div",{className:"group relative",children:[P(E,{id:"name",type:"text",required:!0,value:r.name,onChange:u=>s("name",u.target.value),placeholder:"Full name",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),P("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:P(i,{iconName:"IconUser",size:16})})]}),P(k,{className:"mt-2",message:n.name})]}),ne("div",{className:"grid gap-2",children:[P(h,{htmlFor:"surname",children:"Surname"}),ne("div",{className:"group relative",children:[P(E,{id:"surname",type:"text",value:r.surname,onChange:u=>s("surname",u.target.value),placeholder:"Surname",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),P("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:P(i,{iconName:"IconUser",size:16})})]}),P(k,{className:"mt-2",message:n.surname})]})]}),ne("div",{className:"grid gap-2",children:[P(h,{htmlFor:"email",children:"Email address"}),ne("div",{className:"group relative",children:[P(E,{id:"email",type:"email",required:!0,value:r.email,onChange:u=>s("email",u.target.value),placeholder:"Email address",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"username"}),P("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:P(i,{iconName:"IconMail",size:16})})]}),P(k,{className:"mt-2",message:n.email})]}),ne("div",{className:"grid gap-2",children:[P(h,{htmlFor:"phone",children:"Phone"}),ne("div",{className:"group relative",children:[P(E,{id:"phone",type:"tel",value:r.phone,onChange:u=>s("phone",u.target.value),placeholder:"Phone number",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off"}),P("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:P(i,{iconName:"IconPhone",size:16})})]}),P(k,{className:"mt-2",message:n.phone})]}),e&&o.user.email_verified_at===null&&ne("div",{children:[ne("p",{className:"text-muted-foreground -mt-4 text-sm",children:["Your email address is unverified."," ",P(ii,{href:route("verification.send"),method:"post",as:"button",className:"text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500",children:"Click here to resend the verification email."})]}),t==="verification-link-sent"&&P("div",{className:"mt-2 text-sm font-medium text-green-600",children:"A new verification link has been sent to your email address."})]}),P("div",{className:"grid gap-4",children:ne(Wt,{processing:c,recentlySuccessful:d,children:[P(i,{iconName:"IconDeviceFloppy"}),P("span",{children:"Save Profile"})]})})]})};import{Link as Xr}from"@inertiajs/react";import{IconEye as mi,IconEyeClosed as di}from"@tabler/icons-react";import{Fragment as Qr,jsx as x,jsxs as Ce}from"react/jsx-runtime";var Yr=({notifications:e,unreadNotifications:t})=>x(jt,{notifications:e??[],unreadNotifications:t??0,meta:{per_page:5},children:Ce(le,{trigger:"click",children:[x(ce,{children:x(ui,{})}),x(me,{className:"w-[400px] min-h-[150px] flex-row gap-5",children:x(pi,{})})]})}),pi=()=>{let{notifications:e}=yt();return Ce(Qr,{children:[Ce(Ue,{className:"flex mx-auto items-center gap-2",children:[x(i,{iconName:"IconBell",size:16}),x("span",{children:"Notifications"})]}),e?.length>0?x(Qr,{children:Ce("div",{className:"grid gap-3 ",children:[e.slice(0,5).map(t=>{let a=new Date(t?.read_at??"").getTime()>0;return x(_o,{notification:t,children:x("div",{className:g("p-3 py-2 rounded-md hover:scale-103 shadow-sm dark:shadow-accent cursor-pointer animate-in fade-in duration-400",a?"text-muted-foreground":"dark:bg-accent/20 bg-accent"),children:Ce("div",{className:"flex items-center gap-3 ",children:[x("div",{className:g("flex h-[5px] w-[5px] rounded-full shrink-0",a?"bg-muted-foreground":"bg-green-500")}),x(zo,{notification:t}),Ce("div",{className:"grid gap-1",children:[x("span",{className:"capitalize font-bold truncate",children:t.data.title}),x("p",{className:"text-sm capitalize truncate",children:t.data.message}),x("p",{className:"text-xs text-muted-foreground",children:new Date(t.created_at).toLocaleString()})]}),x(Oo,{notification:t,className:"ml-auto w-5 h-5"})]})})},t.id)}),x(Xr,{href:route("user.notifications.index"),children:Ce(m,{variant:"ghost",className:"w-full flex items-center justify-center",size:"sm",children:[x(i,{iconName:"IconEye",size:20}),x("span",{className:"text-sm",children:"View all"})]})})]})}):x(Ho,{})]})},_o=({notification:e,children:t})=>{let a=e.data.route_name?route(e.data.route_name,e.data?.payload??[]):"#";return x(Xr,{href:a,target:"_blank",children:t},e.id)},zo=({notification:e})=>x(i,{iconName:e.data.icon??"IconBell",className:"shrink-0",size:25}),Ho=({className:e})=>x("div",{className:g("min-h-[150px] content-center",e),children:Ce("div",{className:"text-center text-muted-foreground content-center gap-2",children:[x(i,{iconName:"IconBell",className:"mx-auto mb-2 w-8 h-8"}),x("span",{children:"No new notifications"})]})}),Oo=({notification:e,className:t})=>{let a=new Date(e?.read_at??"").getTime()>0,{markAsRead:o}=yt();return x("div",{className:g("shrink-0",t),onClick:r=>{r.preventDefault(),o(!a,[e.id])},children:Ce(le,{children:[x(ce,{children:a?x(di,{className:"text-muted-foreground hover:text-primary w-full h-full"}):x(mi,{className:"text-primary w-full h-full"})}),x(me,{children:a?"Mark as unread":"Mark as read"})]})})},ui=()=>{let{unreadNotifications:e}=yt(),t=e||0;return Ce(m,{variant:t>0?"outline":"ghost",size:"sm",className:"group hidden sm:flex cursor-pointer flex items-center",children:[x(i,{iconName:"IconBell",className:"!w-[20px] !h-[20px] opacity-80 group-hover:opacity-100"}),x("span",{children:t})]})};import{createContext as gi,useContext as fi,useEffect as jr,useState as Uo}from"react";import{router as Vo,usePage as vi}from"@inertiajs/react";import{toast as Jr}from"sonner";import{jsx as ot,jsxs as en}from"react/jsx-runtime";var tn=gi({}),jt=({notifications:e,unreadNotifications:t,meta:a,children:o})=>{let[r,s]=Uo(e??[]),[l,n]=Uo(t??0),[c,d]=Uo(a??{}),{auth:b,app:u}=vi().props;jr(()=>{d(a??{})},[a]),jr(()=>!window?.Echo||!b.user?void 0:((window?.Echo?.private(`App.Models.User.${b.user.id}`)).notification(y=>{Jr.custom(()=>(L(y.data?.kind??"ntf-general",u.media_base_path),en("div",{className:"flex items-center gap-3 w-[350px] rounded-lg border bg-background/50 p-3 px-5 shadow-lg",children:[ot(i,{iconName:y.data?.icon??"IconBell",className:"shrink-0"}),en("div",{className:"grid w-full",children:[ot("p",{className:"font-semibold",children:y.data.title}),ot("p",{className:"text-sm text-muted-foreground",children:y.data.message}),ot("p",{className:"text-xs text-muted-foreground",children:new Date(y.created_at??null).toLocaleString()})]}),y.data?.route_name&&ot(m,{variant:"outline",className:"ml-auto",size:"sm",onClick:()=>{Vo.visit(route(y.data.route_name,y.data.payload??void 0))},children:ot(i,{iconName:"IconArrowRight"})})]})),{id:y.id,duration:5e3,closeButton:!0,richColors:!0}),s(U=>{if(!U)return[y];let F=[y,...U];return c.per_page?F.slice(0,c.per_page):F})}),()=>window?.Echo?.leave(`App.Models.User.${b.user.id}`)),[b?.user?.id,c?.per_page]);let N={notifications:r,setNotifications:s,unreadNotifications:l,setUnreadNotifications:n,meta:c,setMeta:d,markAsRead:(R,y)=>{L("click",u.media_base_path);let U=new Promise((F,Ie)=>{Vo.post(route("user.notifications.update"),{notification_ids:y==="all"?"all":y,all:y==="all",has_read:R},{replace:!0,preserveScroll:!0,preserveState:!0,onSuccess:()=>{s(q=>{let w=new Date().toISOString();return y==="all"?q.map(se=>({...se,read_at:R?w:""})):q.map(se=>y.includes(se.id)?{...se,read_at:R?w:""}:se)}),F(!0)},onError:q=>{L("alert",u.media_base_path),Ie(q)}})});Jr.promise(U,{loading:R?"Marking as read...":"Marking as unread...",success:R?"Marked as read":"Marked as unread",error:R?"Failed to mark as read":"Failed to mark as unread"})},loadMore:async R=>new Promise((y,U)=>{Vo.get(route("user.notifications.index"),{next_cursor:R??c.next_cursor,feed:1,filter:c.filter},{onSuccess:F=>{s(Ie=>[...Ie,...F.props.notifications]),d(F.props.meta),y(!0)},only:["notifications","meta"],onError:F=>U(F),preserveScroll:!0,preserveState:!0,preserveUrl:!0,replace:!1})})};return ot(tn.Provider,{value:N,children:o})},yt=()=>{let e=fi(tn);if(!e)throw new Error("useNotifications must be used within a NotificationsProvider");return e};import{toast as bi}from"sonner";import{Head as hi,router as xi}from"@inertiajs/react";import{IconEye as Ni,IconFilter as yi}from"@tabler/icons-react";import{Fragment as ki,jsx as I,jsxs as ze}from"react/jsx-runtime";var qg=({notifications:e,meta:t})=>ze(vt,{breadcrumbs:[{icon:"IconBell",title:"Notifications",href:"#"}],children:[I(hi,{title:"Notifications",children:I("meta",{name:"emincore_key",content:"test"})}),I(jt,{notifications:e??[],meta:t,children:I(wi,{})})]}),wi=()=>{let{notifications:e,setNotifications:t,meta:a,setMeta:o,markAsRead:r,loadMore:s}=yt(),l=e.filter(n=>!n.read_at).length??0;return ze(La,{className:"container mx-auto grid gap-4 mb-10",meta:a,onLoad:n=>s(n),noMoreContent:ze("div",{className:"h-8 w-full grid justify-center gap-2 my-5 text-muted-foreground",children:[I(i,{iconName:"IconBell",className:"mx-auto"}),I("span",{children:"No more notifications"})]}),children:[I(fe,{className:"mb-3",icon:I(i,{iconName:"IconBell"}),title:"Your Notifications",description:`You have ${a.total} notifications totally. ${l>0?`${l} unread notifications`:""}`,buttons:ze(ki,{children:[ze(m,{variant:"ghost",size:"sm",className:"flex justify-start text-sm items-center gap-2",onClick:()=>r(!0,"all"),children:[I(Ni,{}),"Mark all as read"]}),ze(le,{trigger:"click",children:[I(ce,{children:I(m,{variant:a.filter?"default":"outline",children:I(yi,{})})}),I(me,{children:I(Ht,{value:a?.filter??"all",onChange:()=>bi.info("test"),children:["all","read","unread"].map(n=>ze(h,{className:"capitalize",onClick:()=>xi.get(route("user.notifications.index"),{filter:n},{replace:!0,preserveScroll:!0,preserveState:!0,onSuccess:c=>{t(c.props.notifications),o(c.props.meta)},only:["notifications","meta"]}),children:[I(Ot,{value:n}),n]}))})})]})]})}),e.length>0?e?.map(n=>I(Ci,{notification:n},n.id)):I(Ho,{})]})},Ci=({notification:e,className:t,...a})=>{let o=new Date(e?.read_at??"").getTime()>0;return I(_o,{notification:e,...a,children:I("div",{className:g("p-5 rounded-md hover:scale-103 shadow-sm dark:shadow-accent cursor-pointer animate-in fade-in duration-400",o?"text-muted-foreground":"dark:bg-accent/20 bg-accent",t),children:ze("div",{className:"flex items-center gap-3 ",children:[I("div",{className:g("flex h-[5px] w-[5px] rounded-full shrink-0",o?"bg-muted-foreground":"bg-green-500")}),I(zo,{notification:e}),ze("div",{className:"grid gap-1 px-5",children:[I("span",{className:"capitalize font-bold truncate",children:e.data.title}),I("p",{className:"text-sm capitalize truncate",children:e.data.message}),I("p",{className:"text-xs text-muted-foreground",children:new Date(e.created_at).toLocaleString()})]}),I(Oo,{notification:e,className:"ml-auto"})]})})})};import{Fragment as Si,jsx as v,jsxs as he}from"react/jsx-runtime";var St=({mainMenu:e,rightNavItems:t})=>{let a=on().props,{url:o}=on(),r=a.auth?.user,s=a.auth?.notifications??[],l=a.auth?.unread_notifications??0;return v(Si,{children:v("div",{className:"fixed top-0 left-0 right-0 z-10 backdrop-blur-sm border-sidebar-border/100 border-b",children:he("div",{className:"mx-auto flex h-16 items-center px-4 md:max-w-7xl",children:[v("div",{className:"lg:hidden",children:he(oa,{children:[v(aa,{asChild:!0,children:v(m,{variant:"ghost",size:"icon",className:"mr-2 h-[34px] w-[34px]",children:v(i,{iconName:"IconMenu2",className:"h-5 w-5"})})}),he(ra,{side:"left",className:"bg-sidebar flex h-full w-64 flex-col items-stretch justify-between",children:[v(sa,{className:"sr-only",children:"Navigation Menu"}),v(na,{className:"flex justify-start text-left",children:v(be,{className:"w-[90%]"})}),v(pa,{children:he(ga,{children:[e&&v(ko,{sidebarMenu:mt(e,o)}),he(ua,{className:"max-w-full gap-0",children:[v(Bt,{children:"Quick"}),t?.map(n=>v(We,{children:he(Dt,{href:n.route_name?route(n.route_name,n.payload??{}):"#",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[n.icon&&v(i,{iconName:n.icon,size:16}),v("span",{children:n.title})]},n.title)}))]})]})})]})]})}),v(Dt,{href:"/",prefetch:!0,className:"flex items-center",children:v(be,{className:"lg:w-[150px] w-[100px]"})}),e&&he("div",{className:"ml-6 hidden h-full items-center space-x-6 lg:flex",children:[v(ta,{orientation:"vertical",className:"mx-2 data-[orientation=vertical]:h-4"}),v(kr,{menuItems:e.items||[]})]}),he("div",{className:"ml-auto flex items-center space-x-2",children:[v("div",{className:"relative flex items-center space-x-1",children:v("div",{className:"hidden lg:flex",children:t?.map(n=>v(ia,{delayDuration:0,children:he(la,{children:[v(ca,{children:he(Dt,{href:n.route_name?route(n.route_name):"#",target:"_blank",rel:"noopener noreferrer",className:"group text-accent-foreground ring-offset-background hover:bg-accent hover:text-accent-foreground focus-visible:ring-ring ml-1 inline-flex h-9 w-9 items-center justify-center rounded-md bg-transparent p-0 text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",children:[n.title&&v("span",{className:"sr-only",children:n.title}),n.icon&&v(i,{iconName:n.icon,className:"size-5 opacity-80 group-hover:opacity-100"})]})}),v(ma,{children:v("p",{children:n.title})})]})},n.title))})}),r&&v(Yr,{notifications:s??[],unreadNotifications:l??0}),e&&v(Gt,{placeholder:"Type a command or search...",menu:mt(e,o),children:v($o,{})}),r?v(Dr,{}):he("div",{className:"flex items-center gap-2",children:[v(m,{asChild:!0,variant:"ghost",size:"sm",className:"text-sm",children:v(Dt,{href:"/login",children:"Sign In"})}),v(m,{asChild:!0,size:"sm",className:"text-sm",children:v(Dt,{href:"/register",children:"Get Started"})})]}),v(Sr,{className:"w-9 h-9"})]})]})})})};import{Link as Mi,usePage as Pi}from"@inertiajs/react";import{jsx as Jt,jsxs as Ii}from"react/jsx-runtime";var be=({className:e,link:t,...a})=>{let r=Pi().props?.app?.logos??[];return Ii(({children:l,className:n,...c})=>t?Jt(Mi,{href:t,className:n,...c,children:l}):Jt("div",{className:n,...c,children:l}),{className:g("p-2 grid flex-1 text-left text-sm lg:w-[150px] w-[100px]",e),...a,children:[Jt("img",{src:Ee(r?.dark_logo),alt:"Logo",className:"w-full h-full hidden dark:block"}),Jt("img",{src:Ee(r?.light_logo),alt:"Logo",className:"w-full h-full dark:hidden"})]})};import{Head as Ei,usePage as Di}from"@inertiajs/react";import{toast as Go}from"sonner";import{useEffect as eo}from"react";import{jsx as ke,jsxs as Ai}from"react/jsx-runtime";var Mt=({children:e,className:t,...a})=>{let o=Di().props;return eo(()=>{o?.flash?.success&&Go.success(o?.flash?.success),o?.flash?.error&&Go.error(o?.flash?.error)},[o.flash]),eo(()=>{o.errors&&Object.values(o.errors).map(r=>{console.log(o.errors),Go.error(r)})},[o.errors]),eo(()=>{o.ziggy&&Object.assign(Ziggy,o.ziggy)},[o.ziggy]),eo(()=>{if(o.app?.logos?.favicon){let r=document.querySelector("link[rel*='icon']")||document.createElement("link");r.type="image/x-icon",r.rel="shortcut icon",r.href=Ee(o.app.logos.favicon,o.app.media_base_path),document.getElementsByTagName("head")[0].appendChild(r)}},[o.app.logos?.favicon]),Ai("div",{className:t,...a,children:[ke(Ei,{children:ke("meta",{name:"EMIN_CORE_PLATFORM_VERIFICATION_CODE",content:import.meta.env.VITE_EMIN_CORE_PLATFORM_VERIFICATION_CODE})}),ke(Ti,{}),e,ke(or,{style:{pointerEvents:"auto"},richColors:!0,icons:{success:ke(i,{iconName:"IconCircleCheckFilled",className:"h-5 w-5"}),error:ke(i,{iconName:"IconCircleXFilled",className:"animate-shake h-5 w-5"}),warning:ke(i,{iconName:"IconAlertCircleFilled",className:"animate-bounce h-5 w-5"}),info:ke(i,{iconName:"IconInfoCircleFilled",className:"animate-pulse h-5 w-5"}),loading:ke(i,{iconName:"IconLoader2",className:"animate-spin h-5 w-5"})}})]})},Ti=()=>Jo.all().map((t,a)=>ke(t,{},a));import{IconLoader2 as Ri}from"@tabler/icons-react";import{jsx as Zo,jsxs as Fi}from"react/jsx-runtime";var Fr=()=>{let e=Li().props;return Zo("div",{className:"w-full h-[100vh] justify-center items-center grid",children:Fi("div",{children:[Zo(be,{className:"lg:w-[250px] mx-auto mb-5"}),Zo(Ri,{className:"animate-spin mx-auto w-8 h-8"})]})})};import{useEffect as an}from"react";import{jsx as Se,jsxs as wt}from"react/jsx-runtime";var $f=({placeholder:e,menu:t,openShortcutKey:a="q"})=>wt(Gt,{placeholder:e,menu:t,openShortcutKey:a,children:[Se(Bi,{}),Se($o,{})]}),$o=()=>{let{isCommandModalOpen:e,setIsCommandModalOpen:t,placeholder:a,menu:o,openShortcutKey:r}=yo(),s=n=>{t(!1),n&&setTimeout(()=>{n()},100)};if(an(()=>{let n=c=>{(c.metaKey||c.ctrlKey)&&c.key.toLowerCase()===r.toLowerCase()&&(c.preventDefault(),t(d=>!d))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[r,t]),an(()=>{if(!o||!Array.isArray(o)||o.length===0)return;let n=c=>rr(c,o);return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[o]),!o||!Array.isArray(o)||o.length===0)return null;let l=ar(o);return wt(nr,{open:e,onOpenChange:t,children:[Se(sr,{placeholder:a}),wt(ir,{children:[Se(lr,{children:"No results found."}),Object.entries(l).map(([n,c])=>Se(cr,{heading:n,children:c.map((d,b)=>d.action&&wt(mr,{onSelect:()=>typeof d?.action=="function"&&s(d.action),children:[d.icon&&Se(i,{iconName:d.icon}),Se("span",{children:d?.title||"Item"}),d?.shortcutLabel&&Se(dr,{children:String(d.shortcutLabel)})]},`${n}-${d?.title||b}`))},n))]})]})},Bi=()=>{let{setIsCommandModalOpen:e,openShortcutKey:t}=yo();return Se(m,{variant:"outline",asChild:!0,size:"sm",className:"hidden sm:flex cursor-pointer",onClick:()=>e(!0),children:wt("p",{className:"text-sm text-muted-foreground",children:["Quick Action",Se("kbd",{className:"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",children:wt("span",{className:"text-xs",children:["\u2318 + ",t.toUpperCase()]})})]})})};import{jsx as Me,jsxs as rn}from"react/jsx-runtime";var jf=({data:{title:e="Role Title",icon:t=null,color:a="#6a1717ff",badge_type:o="default",size:r=12}})=>o=="default"?rn(Ve,{variant:"default",color:a??"default",className:"gap-1",style:{backgroundColor:a??"default"},children:[t&&Me(i,{iconName:t,className:"text-white"}),Me("span",{className:"text-white",children:e})]}):o=="outline"?rn(Ve,{variant:"outline",color:a??"default",className:"gap-1",children:[t&&Me(i,{iconName:t,color:a??"default"}),Me("span",{children:e})]}):o=="icon"?Me(Ve,{variant:"outline",color:a??"default",className:"aspect-1/1 rounded-full p-1",style:{backgroundColor:a??"default"},children:t&&Me(i,{iconName:t,className:"text-white"})}):o=="icon2"?Me(Ve,{variant:"outline",color:a??"default",className:"aspect-1/1 rounded-full p-1",children:t&&Me(i,{iconName:t,color:a??"default"})}):o=="icon3"?Me(Ve,{variant:"outline",color:a??"default",className:"aspect-1/1 rounded-full p-1",children:t&&Me(i,{iconName:t,color:a??"default"})}):null;import{jsx as to,jsxs as nn}from"react/jsx-runtime";var av=({title:e,icon:t,children:a})=>nn(Z,{children:[to(X,{children:nn(Ke,{className:"flex items-center",children:[t&&(typeof t=="string"?to(i,{iconName:t,className:"h-4 w-4 mr-2 text-muted-foreground"}):t),e&&typeof e=="string"?to("span",{className:"text-xl",children:e}):e]})}),to(Y,{children:a})]});import{jsx as Pe,jsxs as at}from"react/jsx-runtime";var cv=(e,...t)=>at(Z,{className:"gap-2",...t,children:[at(X,{className:"flex items-center gap-2 pb-2",children:[typeof e.icon=="string"?Pe(i,{iconName:e.icon,className:"shrink-0 w-5 h-5 text-muted-foreground"}):e.icon,Pe(Ke,{className:"text-sm font-medium truncate",children:e.title})]}),at(Y,{children:[Pe("div",{className:"text-2xl font-bold",children:e.value}),e.subtext&&Pe("p",{className:"text-xs text-muted-foreground",children:e.subtext})]})]}),mv=(e,...t)=>at(Z,{className:"gap-2",...t,children:[at(X,{children:[Pe($t,{children:e.title}),Pe(Ke,{className:"text-2xl font-semibold tabular-nums @[250px]/card:text-3xl",children:e.value}),Pe(Ya,{children:at(Ve,{variant:"outline",children:[Pe(i,{iconName:Number(e.percentage)>0?"IconTrendingDown":"IconTrendingUp",className:"shrink-0"}),Number(e.percentage)>0?`-${e.percentage}%`:`${e.percentage}%`]})})]}),at(ja,{className:"flex-col items-start gap-1.5 text-sm",children:[Pe("div",{className:"line-clamp-1 flex gap-2 font-medium",children:e.description}),Pe("div",{className:"text-muted-foreground",children:e.subdescription})]})]});import{jsx as Wo,jsxs as _i}from"react/jsx-runtime";var Lv=({data:e,columns:t,meta:a,bulkActions:o=[],handleRequest:r,deletedIds:s=[],newIds:l=[],updatedIds:n=[],rowIdField:c="id"})=>_i(mn,{data:e,columns:t,meta:a,bulkActions:o,handleRequest:r,deletedIds:s,newIds:l,updatedIds:n,rowIdField:c,children:[Wo(cn,{}),Wo(sn,{}),Wo(ln,{})]});import{flexRender as dn}from"@tanstack/react-table";import{jsx as He,jsxs as pn}from"react/jsx-runtime";var sn=()=>{let{columns:e,table:t,handleCheckboxClick:a,isRowHidden:o,animatingRows:r}=xe();return pn(pr,{className:"rounded-md border",children:[He(ur,{children:t.getHeaderGroups().map(s=>He(Zt,{children:s.headers.map(l=>He(fr,{className:`py-3 px-4 ${l.column.getCanSort()?"cursor-pointer select-none":""}`,style:{textAlign:"left"},onClick:l.column.getCanSort()?l.column.getToggleSortingHandler():void 0,children:pn("div",{className:"flex items-center",children:[l.isPlaceholder?null:dn(l.column.columnDef.header,l.getContext()),l.column.getCanSort()&&He("span",{className:"ml-1",children:{asc:"\u2191",desc:"\u2193"}[l.column.getIsSorted()]??""})]})},l.id))},s.id))}),He(gr,{children:t.getRowModel().rows?.length?t.getRowModel().rows.filter(s=>!o(s.original)).map(s=>{let l=s.original.id&&vr(r[s.original.id]);return He(Zt,{id:s.id,"data-state":s.getIsSelected()&&"selected",className:`${s.getIsSelected()?"bg-muted/50":""} ${l} transition-all duration-500 ease-in-out`,children:s.getVisibleCells().map(n=>He(wo,{className:"py-3 px-4",style:{textAlign:"left"},onClick:n.column.id==="select"?c=>a(c,s.id):void 0,children:dn(n.column.columnDef.cell,n.getContext())},n.id))},s.id)}):He(Zt,{children:He(wo,{colSpan:e.length,className:"h-24 text-center",children:"There is no result."})})})]})};import{jsx as te,jsxs as rt}from"react/jsx-runtime";var ln=()=>{let{table:e,meta:t}=xe();return rt("div",{className:"flex items-center justify-end space-x-2 py-4",children:[rt("div",{className:"flex-1 text-sm text-muted-foreground",children:[e.getFilteredSelectedRowModel().rows.length," / "," ",e.getFilteredRowModel().rows.length," row(s) selected."]}),te(Hi,{}),rt("div",{className:"flex items-center space-x-2",children:[te(m,{variant:"outline",size:"sm",onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),children:"Previous"}),te("div",{className:"flex items-center gap-1",children:te(zi,{})}),te(m,{variant:"outline",size:"sm",onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),children:"Next"})]})]})},zi=()=>{let{table:e,meta:t}=xe(),a=e.getState().pagination.pageIndex+1,o=t?.last_page??e.getPageCount(),r=Math.min(5,o),s=1;return o>5&&(a<=3?s=1:a>=o-2?s=o-4:s=a-2),Array.from({length:r},(l,n)=>{let c=s+n;return te(m,{variant:c===a?"default":"outline",size:"sm",onClick:()=>c!==a?e.setPageIndex(c-1):null,className:"h-8 w-8 p-0",children:c},c)})},Hi=()=>{let{table:e,customPageSize:t,setCustomPageSize:a}=xe();return rt("div",{className:"flex items-center space-x-2",children:[te("span",{className:"text-sm text-muted-foreground",children:"Per Page"}),rt(De,{children:[te(Te,{asChild:!0,children:rt(m,{variant:"outline",className:"h-8 w-[70px]",children:[e.getState().pagination.pageSize.toString(),te(i,{iconName:"IconChevronDown",className:"ml-2 h-4 w-4"})]})}),rt(Ae,{align:"start",children:[[10,20,30,50,100].map(o=>te(Ut,{className:"py-2 pl-8",checked:Number(e.getState().pagination.pageSize)===o,onCheckedChange:()=>e.setPageSize(o),children:te("span",{className:"pl-0",children:o})},o)),te("hr",{}),te("p",{className:"text-muted-foreground text-xs mt-1 px-2",children:"Custom Page Size:"}),te(E,{type:"number",placeholder:"Custom Page Size",value:t,onChange:o=>a(Number(o.target.value)),onKeyDown:o=>o.stopPropagation(),onBlur:o=>{Number(o.target.value)!==e.getState().pagination.pageSize&&e.setPageSize(Number(o.target.value))},className:"px-2 text-sm w-full focus-visible:ring-0 border-none",max:100,min:1})]})]})]})};import{IconLoader2 as Oi,IconSearch as Ui,IconX as Vi}from"@tabler/icons-react";import{jsx as O,jsxs as nt}from"react/jsx-runtime";var cn=()=>{let{meta:e,handleResetTable:t,rowIdField:a,table:o}=xe();return nt("div",{className:"flex justify-between items-center pb-4 gap-2",children:[O(Gi,{}),nt("div",{className:"flex-1 flex justify-end space-x-2",children:[O(Zi,{}),O($i,{}),br({meta:e,rowIdField:a})&&O(m,{variant:"outline",onClick:t,title:"Click to reset search",children:O(i,{iconName:"IconX"})})]})]})},$i=()=>{let{table:e}=xe();return nt(De,{children:[O(Te,{asChild:!0,children:nt(m,{variant:"outline",children:[O(i,{iconName:"IconList",className:"h-4 w-4"})," Rows"]})}),O(Ae,{align:"end",children:e.getAllColumns().filter(t=>t.getCanHide()).map(t=>O(Ut,{className:"capitalize",checked:t.getIsVisible(),onCheckedChange:a=>t.toggleVisibility(!!a),children:t.id},t.id))})]})},Gi=()=>{let{searchValue:e,handleInputOnChange:t,handleKeyDown:a,globalFilter:o,isSearching:r,advancedTable:s,setSearchValue:l,handleGlobalFilterChange:n,handleSearch:c}=xe();return nt("div",{className:"relative w-full flex",children:[O(E,{placeholder:"Write and press enter to search \u21B5",value:e,onChange:t,onKeyDown:d=>a(d),className:g("pr-10 focus-visible:ring-0",o?"border-gray-400":"")}),o?r&&s?O(m,{variant:"link",size:"sm",className:"absolute right-0 top-0 h-full px-3",disabled:!0,title:"Loading",children:O(Oi,{className:"animate-spin"})}):O(m,{variant:"link",size:"sm",className:"absolute right-0 top-0 h-full px-3",onClick:()=>(l(""),n("")),title:"Click to reset search",children:O(Vi,{})}):O(m,{variant:"link",size:"sm",className:"absolute right-0 top-0 h-full px-3",onClick:c,title:"Aramak i\xE7in Enter tu\u015Funa basabilirsiniz",children:O(Ui,{})})]})},Zi=()=>{let{bulkActions:e,table:t,resetSelection:a}=xe();return e&&e?.length>0&&(t?.getFilteredSelectedRowModel()?.rows?.length||0)>0&&O("div",{className:"flex items-center gap-2",children:e.map((o,r)=>o.confirm?O(xr,{...o.confirmIcon!==void 0&&{icon:o.confirmIcon},...o.confirmTitle!==void 0&&{title:o.confirmTitle},...o.confirmContent!==void 0&&{content:o.confirmContent},...o.confirmText!==void 0&&{confirmText:o.confirmText},...o.cancelText!==void 0&&{cancelText:o.cancelText},onConfirm:()=>o.action(t.getFilteredSelectedRowModel().rows,a),...o.cancel!==void 0&&{onCancel:o.cancel},children:nt(m,{variant:o.variant||"outline",children:[o.icon&&o.icon,o.label," (",t.getFilteredSelectedRowModel().rows.length,")"]},r)}):nt(m,{variant:o.variant||"outline",onClick:()=>o.action(t.getFilteredSelectedRowModel().rows,a),className:"flex items-center",children:[o.icon&&o.icon,o.label," (",t.getFilteredSelectedRowModel().rows.length,")"]},r))})};import{getCoreRowModel as Wi,getFilteredRowModel as qi,getPaginationRowModel as Ki,getSortedRowModel as Qi,useReactTable as Xi}from"@tanstack/react-table";import{createContext as Yi,useContext as ji,useEffect as st,useRef as un,useState as W}from"react";import{jsx as Ji}from"react/jsx-runtime";var gn=Yi({}),mn=({children:e,data:t,columns:a,meta:o,bulkActions:r,handleRequest:s,rowIdField:l})=>{let n=typeof s<"u",c=un(!1),[d,b]=W(o?.per_page?Number(o?.per_page):10),[u,z]=W(o?.sort?[{id:o.sort,desc:o.order==="desc"}]:[]),[H,N]=W([]),[R,y]=W({}),[U,F]=W({}),[Ie,q]=W({pageIndex:o?.current_page?Number(o?.current_page)-1:0,pageSize:o?.per_page?Number(o?.per_page):10}),[w,se]=W(o?.search?o?.search:null),[Tt,lt]=W(o?.search?o?.search:""),[Sn,At]=W(!1),[Qo,Mn]=W(null);st(()=>{o&&(z(o.sort?[{id:o.sort,desc:o.order==="desc"}]:[]),q({pageIndex:o.current_page?Number(o.current_page)-1:0,pageSize:o.per_page?Number(o.per_page):10}),b(o.per_page?Number(o.per_page):10),se(o.search||null),lt(o.search||""))},[o?.current_page,o?.per_page,o?.sort,o?.order,o?.search]),st(()=>{setTimeout(()=>c.current=!0,500)},[]),st(()=>At(!1),[t]);let[Lt,ct]=W({}),[oo,fl]=W([]),[ao,vl]=W([]),[ro,bl]=W([]),[Pn,In]=W(new Set),Rt=un({});st(()=>{if(ro.length<1)return;let p={...Lt};ro.forEach(S=>{p[String(S)]="deleted",Rt.current[String(S)]=setTimeout(()=>{In(ie=>new Set([...ie,S])),ct(ie=>{let K={...ie};return delete K[String(S)],K})},500)}),ct(p)},[ro]),st(()=>{if(oo.length<1)return;let p={...Lt};oo.forEach(S=>{p[String(S)]="new",Rt.current[String(S)]=setTimeout(()=>{ct(ie=>{let K={...ie};return delete K[String(S)],K})},500)}),ct(p)},[oo]),st(()=>{if(ao.length<1)return;let p={...Lt};ao.forEach(S=>{p[String(S)]="updated",Rt.current[String(S)]=setTimeout(()=>{ct(ie=>{let K={...ie};return delete K[String(S)],K})},1e3)}),ct(p)},[ao]),st(()=>()=>Object.values(Rt.current).forEach(p=>clearTimeout(p)),[]);let En=p=>{if(!(!c.current||!n))return s({...o,current_page:p.pageIndex+1,per_page:p.pageSize})},Dn=p=>{if(!c.current||!n||p.length===0)return;let S={id:p[0].id,desc:p[0].desc};return s({...o,sort:S.id,order:S.desc?"desc":"asc"})},Tn=p=>!c.current||!n||(p=p.trim(),p===o?.search||p===""&&o?.search==null)?!1:(console.log(o),s({...o,search:p})),An=(p,S)=>{let ie=no.getRowModel().rows.filter(Q=>!Xo(Q.original)),K=ie.findIndex(Q=>Q.id===p),Ze=ie.findIndex(Q=>Q.id===S);if(K===-1||Ze===-1)return[];let jo=Math.min(K,Ze),so=Math.max(K,Ze);return ie.slice(jo,so+1).map(Q=>Q.id)},Ln=a.some(p=>p.id==="select"),Rn=(p,S)=>{if(p.shiftKey&&Qo&&Ln){p.preventDefault();let{rows:ie,rowsById:K}=no.getRowModel(),Ze=An(Qo,S).map(Q=>K[Q]).filter(Boolean),so=Ze.filter(Q=>Q?.getIsSelected()).length<Ze.length/2;Ze.forEach(Q=>Q&&Q.toggleSelected(so))}Mn(S)},Xo=p=>Pn.has(p[l??p.id]),Fn=p=>{let S=typeof p=="function"?p(u):p;z(S),n&&Dn(S)},Bn=p=>{let S=typeof p=="function"?p(Ie):p;q(S),n&&En(S)},Ft=p=>{se(p),n&&Tn(p)===!1&&At(!1)},no=Xi({data:t,columns:a,filterFns:{fuzzy:Co},onGlobalFilterChange:Ft,globalFilterFn:Co,onSortingChange:Fn,onColumnFiltersChange:N,getCoreRowModel:Wi(),getPaginationRowModel:n?void 0:Ki(),getSortedRowModel:n?void 0:Qi(),getFilteredRowModel:n?void 0:qi(),onColumnVisibilityChange:y,onRowSelectionChange:F,onPaginationChange:Bn,manualPagination:n,manualSorting:n,manualFiltering:n,pageCount:o?.last_page??void 0,state:{sorting:u,columnFilters:H,columnVisibility:R,rowSelection:U,pagination:Ie,globalFilter:w}}),Yo=()=>(At(!0),Ft(Tt)),_n={data:t,meta:o,columns:a,bulkActions:r,table:no,resetSelection:()=>F({}),rowIdField:l,advancedTable:n,searchValue:Tt,setSearchValue:lt,handleSearch:Yo,isSearching:Sn,setIsSearching:At,globalFilter:w,handleGlobalFilterChange:Ft,handleInputOnChange:p=>{lt(p.target.value),!n&&Ft(p.target.value)},handleResetTable:()=>{lt(""),se(null),z([{id:l??"id",desc:!0}]),q({pageIndex:0,pageSize:o?.per_page?Number(o?.per_page):10}),N([]),F({}),typeof s<"u"&&s({current_page:1,per_page:10,sort:l||"id",order:"desc",search:""})},handleKeyDown:p=>p.key==="Enter"&&Yo(),handleCheckboxClick:Rn,isRowHidden:Xo,animatingRows:Lt,customPageSize:d,setCustomPageSize:b};return Ji(gn.Provider,{value:_n,children:e})},xe=()=>{let e=ji(gn);if(!e)throw new Error("useEminTable must be used within a EminTableProvider");return e};import{useEffect as fn,useMemo as vn,useRef as el,useState as bn}from"react";import tl from"supercluster";import{Map as ol,Marker as hn,NavigationControl as al}from"react-map-gl/maplibre";import"maplibre-gl/dist/maplibre-gl.css";import{jsx as Oe,jsxs as il}from"react/jsx-runtime";var Fb=({markers:e,cluster:t,mapStyleUrl:a,initialView:o,...r})=>Oe(xn,{markers:e,cluster:t,mapStyleUrl:a,initialView:o,...r,children:Oe(rl,{})}),rl=()=>{let e=qo(),{markers:t,cluster:a,initialView:o,DEFAULT_MIN_ZOOM:r,MAP_MIN_BOUND:s,MAP_MAX_BOUND:l}=e,n=w=>Math.max(s,Math.min(l,w)),c=w=>w?.properties?.cluster===!0,d=()=>{if(!y.current)return;if(!a){R([]);return}let w=y.current.getBounds();if(!w)return;let se=[w.getWest(),w.getSouth(),w.getEast(),w.getNorth()],Tt=Math.round(n(y.current.getZoom()??r)),lt=q.getClusters(se,Tt);R(lt)},b=({viewState:w})=>{if(H(w),typeof e?.onMove=="function")try{e?.onMove({viewState:w})}catch{}d()},u={...o,zoom:n(typeof o?.zoom=="number"?o?.zoom:r)},[z,H]=bn(u),[N,R]=bn([]),y=el(null),U=typeof e?.minZoom=="number"?n(e?.minZoom):r,F=typeof e?.maxZoom=="number"?n(e?.maxZoom):l;if(U>F){let w=U;U=F,F=w}let Ie=vn(()=>t&&t.map(w=>({type:"Feature",properties:{id:w.id},geometry:{type:"Point",coordinates:[w.lng,w.lat]}})),[t]),q=vn(()=>new tl({radius:e?.radius??40,maxZoom:F,minZoom:U}),[]);return fn(()=>{a&&q.load(Ie)},[q,Ie,a]),fn(()=>{d()},[q,z,e.cluster]),il(ol,{ref:y,mapStyle:e?.mapStyleUrl,initialViewState:u,...e,minZoom:U,maxZoom:F,style:{width:"100%",height:"100%"},onMove:b,onLoad:d,children:[Oe(al,{position:"top-left"}),(a?N:t||[]).map(w=>a&&c(w)?Oe(sl,{item:w,index:q,mapRef:y,effectiveMaxZoom:F}):Oe(nl,{item:w}))]})},nl=({item:e})=>{let{cluster:t,markers:a}=qo(),o=t?e.properties?.id:e.id,r=t?e.geometry.coordinates[0]:e.lng,s=t?e.geometry.coordinates[1]:e.lat,l=t?a?.find(n=>n.id===o)??{id:o,lat:s,lng:r}:e;return Oe(hn,{longitude:r,latitude:s,anchor:"center",children:l?.component??Oe("div",{className:"w-3 h-3 rounded-full border-2 border-white shadow-md bg-blue-600 dark:bg-blue-500",title:"Marker"})},`p-${o}`)},sl=({item:e,index:t,mapRef:a,effectiveMaxZoom:o})=>{let[r,s]=e.geometry.coordinates,l=e.properties.point_count;return Oe(hn,{longitude:r,latitude:s,anchor:"center",children:Oe("div",{onClick:()=>{let c=Math.min(t.getClusterExpansionZoom(e.properties.cluster_id),o);a.current&&a.current.flyTo({center:[r,s],zoom:c,duration:500})},title:`${l}`,className:"cursor-pointer select-none flex items-center justify-center w-9 h-9 rounded-full border-2 shadow-md border-gray-500 bg-gray-900 text-white dark:bg-gray-800 dark:text-gray-200 font-bold text-xs",children:l})},`c-${e.properties.cluster_id}`)};import{createContext as ll,useContext as cl,useEffect as ml,useState as Ko}from"react";import{jsx as dl}from"react/jsx-runtime";var Nn=ll({}),xn=({children:e,markers:t,mapStyleUrl:a,initialView:o,...r})=>{let s="https://demotiles.maplibre.org/style.json",[b,u]=Ko(t),[z,H]=Ko(!0),[N,R]=Ko(a||s),y={DEFAULT_STYLE:s,DEFAULT_MIN_ZOOM:1,DEFAULT_MAX_ZOOM:16,MAP_MIN_BOUND:0,MAP_MAX_BOUND:22,markers:b,setMarkers:u,cluster:z,setCluster:H,mapStyleUrl:N,setMapStyleUrl:R,initialView:o||{longitude:0,latitude:0,zoom:1},...r},U=fo();return ml(()=>{R(U==="dark"?"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json":"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json")},[U]),dl(Nn.Provider,{value:y,children:e})},qo=()=>{let e=cl(Nn);if(!e)throw new Error("useWorldMap must be used within a WorldMapProvider");return e};import{IconChevronRight as wn}from"@tabler/icons-react";import{Fragment as Cn,jsx as C,jsxs as it}from"react/jsx-runtime";var kn=({items:e})=>C(Cn,{children:e.map(t=>t.items&&t.items.length>0?C(io,{asChild:!0,defaultOpen:!!(t.isActive||t.hasActiveChild),className:"group/collapsible",children:it(Ct,{children:[C(lo,{asChild:!0,className:"cursor-pointer",children:it(We,{tooltip:t.title,children:[t.icon&&C(i,{iconName:t.icon}),C("span",{children:t.title}),C(wn,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),C(co,{children:C(mo,{children:t.items.map(a=>C(va,{children:a.items&&a.items.length>0?C(io,{asChild:!0,defaultOpen:!!(a.isActive||a.hasActiveChild),className:"group/collapsible",children:it(Cn,{children:[C(lo,{asChild:!0,className:"cursor-pointer",children:it(po,{className:g(a.isActive&&"bg-muted font-medium text-foreground dark:bg-muted/50"),children:[a.icon&&C(i,{iconName:a.icon}),C("span",{children:a.title}),C(wn,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),C(co,{children:C(mo,{children:C(kn,{items:a.items})})})]})}):C(po,{asChild:!0,className:g(a.isActive&&"bg-muted font-medium text-foreground dark:bg-muted/50"),children:it(yn,{href:a.route_name?route(a.route_name,a.payload??{}):"#",children:[a.icon&&C(i,{iconName:a.icon}),C("span",{children:a.title})]})})},a.title))})})]})},t.title):C(Ct,{children:C(We,{asChild:!0,tooltip:t.title,className:g(t.isActive&&"bg-muted font-medium text-foreground dark:bg-muted/50"),children:it(yn,{href:t.route_name?route(t.route_name,t.payload??{}):"#",children:[t.icon&&C(i,{iconName:t.icon}),C("span",{children:t.title})]})})},t.title))}),ko=({sidebarMenu:e})=>{let t=ul(null),a=gl(),o=()=>{if(t.current&&a?.props){let s=`nav-scroll-${window.location.pathname}`;localStorage.setItem(s,t.current.scrollTop.toString())}},r=()=>{if(t.current&&a?.props){let s=`nav-scroll-${window.location.pathname}`,l=localStorage.getItem(s);l&&(t.current.scrollTop=parseInt(l,10))}};return pl(()=>{let s=setTimeout(()=>{r()},100);return()=>clearTimeout(s)},[]),C("div",{ref:t,onScroll:o,children:e.map((s,l)=>it(fa,{children:[s.title&&C(Bt,{children:s.title}),C(_t,{className:"!flex ",children:C(kn,{items:s.items})})]},s.title||`section-${l}`))})};export{ko as a,xr as b,Hn as c,On as d,zl as e,Gl as f,Wt as g,kr as h,Sr as i,Qn as j,Cc as k,Ye as l,qt as m,Io as n,Eo as o,Lc as p,Mr as q,Pr as r,Do as s,ft as t,Kt as u,Yc as v,Er as w,Dr as x,lm as y,Tr as z,Lr as A,vt as B,Br as C,_r as D,ad as E,vs as F,rd as G,Lo as H,Ns as I,zr as J,ys as K,Ro as L,Cs as M,ks as N,Hr as O,Or as P,Ps as Q,Qt as R,Ls as S,Rs as T,Fs as U,j as V,oe as W,Ur as X,Vr as Y,Zs as Z,Gr as _,pu as $,Zr as aa,Fu as ba,ri as ca,Bo as da,ni as ea,si as fa,Yu as ga,ng as ha,Yr as ia,pi as ja,_o as ka,zo as la,Ho as ma,Oo as na,ui as oa,jt as pa,yt as qa,qg as ra,wi as sa,St as ta,be as ua,Mt as va,Fr as wa,$f as xa,$o as ya,Bi as za,jf as Aa,av as Ba,cv as Ca,mv as Da,Lv as Ea,sn as Fa,ln as Ga,cn as Ha,mn as Ia,xe as Ja,Fb as Ka,xn as La,qo as Ma};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as t,ia as n,xa as m}from"./chunk-L2UKX2NN.js";import{a as i}from"./chunk-E2ZUBHVJ.js";import{d as o}from"./chunk-PWQOU5TI.js";import{a as r}from"./chunk-CZM7FKLS.js";import{a as s}from"./chunk-3H6NZAII.js";import{usePage as a}from"@inertiajs/react";import{jsx as e,jsxs as c}from"react/jsx-runtime";var y=({breadcrumbs:p=[]})=>{let d=a().props,{dashboard:l}=a().props?.emin_core_menus,{url:h}=a(),{user:u,notifications:f,unread_notifications:b}=d.auth;return e("header",{className:"flex h-(--header-height) shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-(--header-height)",children:c("div",{className:"flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6",children:[e(o,{className:"-ml-1"}),e(r,{orientation:"vertical",className:"mx-2 data-[orientation=vertical]:h-4"}),e(s,{breadcrumbs:p,className:"hidden md:flex"}),c("div",{className:"ml-auto flex items-center gap-2",children:[u&&e(n,{notifications:f??[],unreadNotifications:b??0}),e(m,{placeholder:"Type a command or search...",menu:i(l,h)}),e(t,{className:"w-8 h-8"})]})]})})};export{y as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-Y7U6EVDQ.js";import{a as r}from"./chunk-5RKCSYZG.js";var e=[o];e.forEach(i=>r.register(i));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l,ua as v,y as h}from"./chunk-
|
|
1
|
+
import{a as l,ua as v,y as h}from"./chunk-L2UKX2NN.js";import{a as u}from"./chunk-E2ZUBHVJ.js";import{a as n,c as s,e as d,h as p,i as c,k as m}from"./chunk-PWQOU5TI.js";import{b as t}from"./chunk-TVCWAJFT.js";import{a as b}from"./chunk-G4EEZUTC.js";import{d as i}from"./chunk-GND5KQRZ.js";import{usePage as S}from"@inertiajs/react";import{Transition as f}from"@headlessui/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";var E=({...y})=>{let{url:T}=S(),a=S().props,{dashboard:g}=a?.emin_core_menus,x=a?.app?.logos??[],{state:r}=n(),F=u(g,T);return o(s,{collapsible:"icon",...y,children:[o(p,{children:[o("div",{className:"relative items-center !h-[50px]",children:[e(f,{show:r=="collapsed",enter:"duration-500",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-500",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e("img",{className:"absolute !max-w-[35px] !max-h-[35px]",src:i(x?.favicon)})}),e(f,{show:r=="expanded",enter:"duration-500",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-500",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e("div",{children:e(v,{link:route("dashboard")})})})]}),e("hr",{className:"w-full"}),e(h,{})]}),e("hr",{}),e(m,{children:e(l,{sidebarMenu:F})}),e(c,{children:o(t,{variant:"outline",className:"flex items-center",children:[e(b,{iconName:"IconHelp"}),e("span",{className:"group-data-[collapsible=icon]:hidden",children:"Get Help"})]})}),e(d,{})]})};export{E as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as i}from"./chunk-L2UKX2NN.js";import{a as u,f as g,g as p,i as f,j as v}from"./chunk-QFUZ6MVT.js";import{a as c}from"./chunk-G4EEZUTC.js";import{useEffect as y,useRef as N,useState as h}from"react";import{jsx as e,jsxs as a}from"react/jsx-runtime";var R=()=>{let[s,m]=h(),[t,l]=h(!1),r=N(null);y(()=>{t||(r.current?.(null),r.current=null,m(void 0))},[t]);let k=()=>{if(!s||!t)return null;let{latest:o,latest_compatible:n}=s;return e(u,{open:t,onOpenChange:l,children:a(g,{children:[a(p,{children:[e(f,{children:"Select a version to install"}),e(v,{children:"This version is a major update, it may break your application."})]}),a("div",{className:"grid grid-cols-2 gap-2",children:[e(i,{title:"Install latest compatible version",content:"Are you sure you want to install the latest compatible version?",onConfirm:()=>d(n),children:a("div",{className:"grid gap-2 border-2 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400 transition-colors",children:[e(c,{iconName:"IconRefresh",className:"h-12 w-12 mx-auto mb-3"}),e("p",{className:"text-sm",children:"Latest compatible version"}),e("h3",{className:"font-bold",children:n.version}),e("p",{className:"text-sm text-muted-foreground",children:"No breaking changes"})]})}),e(i,{title:"Upgrade to latest version",content:"Are you sure you want to upgrade to the latest version? It may contain breaking changes!",onConfirm:()=>d(o),children:a("div",{className:"grid gap-2 border-2 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400 transition-colors",children:[e(c,{iconName:"IconRefreshAlert",className:"h-12 w-12 mx-auto mb-3"}),e("p",{className:"text-sm",children:"Latest version"}),e("h3",{className:"font-bold",children:o.version}),e("p",{className:"text-sm text-muted-foreground text-orange-500",children:"May contain breaking changes"})]})})]})]})})},b=o=>t?Promise.resolve(null):(m(o),l(!0),new Promise(n=>r.current=n)),d=o=>{r.current?.(o),l(!1)};return{SelectionModal:()=>s&&t?e(k,{}):null,selectVersion:b}};export{R as a};
|