adminizer 4.3.0-build.101 → 4.3.0-build.103

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/assets/app.js CHANGED
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./add-group-7yAK6uFY.js","./app-layout-i2zN9Rn-.js","./app-shell-CHEYhVco.js","./monaco-ICtx6xoc.js","./vendor-wzZzN_Jv.js","./jsoneditor-D95dIAP2.js","./handsontable-PVakPtJV.js","./app-sidebar-DeF8WNmW.js","./nav-main-9Eb_A0rf.js","./material-icon-BedgD2NE.js","./app-sidebar-header-DdM1EOrb.js","./breadcrumbs-C439DWrC.js","./nav-user-CRAfyE-x.js","./user-info-CcYdmjMZ.js","./user-menu-content-DbUk8ZeY.js","./theme-switcher-CKiJbMkh.js","./icon-DM49pZW3.js","./add-group-form-BNmpvW8K.js","./add-user-NoYkTfZi.js","./add-user-form-DrclnTOd.js","./input-error--IOnWghB.js","./add-1E1UsMVZ.js","./add-form-CGa9QbwE.js","./field-renderer-4obZ_jUo.js","./dynamic-controls-BOYmRX_z.js","./field-renderer-CRNLShJD.css","./catalog-B9hdop59.js","./del-modal-_b3CSNHb.js","./catalog-C71LuRag.css","./dashboard-Bi5KeZu2.js","./dashboard-BOltB2Hq.css","./form-Bte5kzjB.js","./form-oUlsuu7h.js","./home-CsUXA-O6.js","./init-user-DNrB8Xt5.js","./list-CdfSnSN1.js","./list-table-Byzv346I.js","./pagination-render-xsEktzA8.js","./login-6Xb8bcPq.js","./module-B4-7WkY5.js","./notification-ma2x7vka.js","./tabs-BK_5wdPA.js","./register-BIyjCy8M.js","./welcome-cWh1qnl_.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./add-group-7yAK6uFY.js","./app-layout-i2zN9Rn-.js","./app-shell-CHEYhVco.js","./monaco-ICtx6xoc.js","./vendor-wzZzN_Jv.js","./jsoneditor-D95dIAP2.js","./handsontable-PVakPtJV.js","./app-sidebar-DeF8WNmW.js","./nav-main-9Eb_A0rf.js","./material-icon-BedgD2NE.js","./app-sidebar-header-DdM1EOrb.js","./breadcrumbs-C439DWrC.js","./nav-user-CRAfyE-x.js","./user-info-CcYdmjMZ.js","./user-menu-content-DbUk8ZeY.js","./theme-switcher-CKiJbMkh.js","./icon-DM49pZW3.js","./add-group-form-BNmpvW8K.js","./add-user-NoYkTfZi.js","./add-user-form-DrclnTOd.js","./input-error--IOnWghB.js","./add-1E1UsMVZ.js","./add-form-CGa9QbwE.js","./field-renderer-4obZ_jUo.js","./dynamic-controls-BOYmRX_z.js","./field-renderer-CRNLShJD.css","./catalog-B9hdop59.js","./del-modal-_b3CSNHb.js","./catalog-C71LuRag.css","./dashboard-Bi5KeZu2.js","./dashboard-BOltB2Hq.css","./form-qyuRZEIC.js","./form-DmBOE8Za.js","./home-DxhSEMhE.js","./init-user-DNrB8Xt5.js","./list-CdfSnSN1.js","./list-table-Byzv346I.js","./pagination-render-xsEktzA8.js","./login-6Xb8bcPq.js","./module-B4-7WkY5.js","./notification-ma2x7vka.js","./tabs-BK_5wdPA.js","./register-BIyjCy8M.js","./welcome-cWh1qnl_.js"])))=>i.map(i=>d[i]);
2
2
  import{g as Ju,s as ai,c as xd,i as kV,h as wQ,e as _Q,f as SQ,t as CQ,_ as fn}from"./jsoneditor-D95dIAP2.js";import{b as LQ,c as VP,r as vV,a as NQ}from"./vendor-wzZzN_Jv.js";import{r as g,e as ve,R as gV,F as IQ}from"./monaco-ICtx6xoc.js";import{r as IA,R as qD,F as sa,a as la,b as da,c as ua,d as ha,e as pa,f as fa,g as ya,h as ma,i as ka,j as va,k as ga,l as Ma,m as xa,n as ba,o as wa,p as _a,q as Sa,s as Ca,t as La,u as Na,v as Ia,w as Aa,x as Ea,y as Ta,z as Ra,A as ja,B as Da,C as qa,D as za,E as $a,G as Oa,H as Pa,I as Ha,J as Ba,K as Va,L as Fa,M as Ua,N as Ga,O as Za,P as Wa,Q as Xa,S as Ka,T as Ya,U as Qa,V as Ja,W as eo,X as to,Y as no,Z as ao,_ as oo,$ as ro,a0 as io,a1 as co,a2 as so,a3 as lo,a4 as uo,a5 as ho,a6 as po,a7 as fo,a8 as yo,a9 as mo,aa as ko,ab as vo,ac as go,ad as Mo,ae as xo,af as bo,ag as wo,ah as _o,ai as So,aj as Co,ak as Ed,al as Td,am as Rd,an as AQ,ao as EQ,ap as TQ,aq as RQ,ar as jQ,as as DQ,at as qQ,au as zQ}from"./handsontable-PVakPtJV.js";var MR={exports:{}},$u={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -8062,4 +8062,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${n.do
8062
8062
  * Last updated: Mar 09, 2023
8063
8063
  *
8064
8064
  * Description: Definition file for Chinese - China language-country.
8065
- */const yqe={languageCode:"zh-CN",[Co]:"上方插入行",[So]:"下方插入行",[_o]:"左方插入列",[wo]:"右方插入列",[bo]:["移除该行","移除多行"],[xo]:["移除该列","移除多列"],[Mo]:"撤销",[go]:"恢复",[vo]:"只读",[ko]:"清空该列",[mo]:"对齐",[yo]:"左对齐",[fo]:"水平居中",[po]:"右对齐",[ho]:"两端对齐",[uo]:"顶端对齐",[lo]:"垂直居中",[so]:"底端对齐",[co]:"冻结该列",[io]:"取消冻结",[ro]:"边框",[oo]:"上",[ao]:"右",[no]:"下",[to]:"左",[eo]:"移除边框",[Ja]:"插入批注",[Qa]:"编辑批注",[Ya]:"删除批注",[Ka]:"只读批注",[Xa]:"合并",[Wa]:"取消合并",[Za]:"复制",[Rd]:"带标题的复制",[Td]:"带标题组的复制",[Ed]:"仅复制标题",[Ga]:"剪切",[Ua]:"插入子行",[Fa]:"与母行分离",[Va]:["隐藏该列","隐藏多列"],[Ba]:["显示该列","显示多列"],[Ha]:["隐藏该行","隐藏多行"],[Pa]:["显示该行","显示多行"],[Oa]:"无",[$a]:"为空",[za]:"不为空",[qa]:"等于",[Da]:"不等于",[ja]:"开头是",[Ra]:"结尾是",[Ta]:"包含",[Ea]:"不包含",[Aa]:"大于",[Ia]:"大于或等于",[Na]:"小于",[La]:"小于或等于",[Ca]:"在此范围",[Sa]:"不在此范围",[_a]:"之后",[wa]:"之前",[ba]:"今天",[xa]:"明天",[Ma]:"昨天",[ga]:"空白单元格",[va]:"按条件过滤",[ka]:"按值过滤",[ma]:"且",[ya]:"或",[fa]:"全选",[pa]:"清除",[ha]:"确认",[ua]:"取消",[da]:"搜索",[la]:"值",[sa]:"第二值"};RQ();const yV={de:rqe,en:qQ,es:iqe,fr:cqe,it:sqe,ja:lqe,ko:dqe,nl:uqe,pl:hqe,pt:pqe,ru:fqe,zh:yqe},mqe=document.documentElement.lang,hK=yV[mqe]??yV.en;jQ(hK);const pK=({config:e,data:n=[],onChange:o,disabled:r})=>{const{appearance:c}=iz(),[d,u]=g.useState("ht-theme-main"),h=g.useCallback((k,m)=>{var x,b;if(m==="loadData")return;const y=(b=(x=f.current)==null?void 0:x.hotInstance)==null?void 0:b.getSourceData();o(y)},[]),f=g.useRef(null);return g.useEffect(()=>{f.current&&f.current.hotInstance.loadData(n)},[n]),g.useEffect(()=>{u(c==="dark"?"ht-theme-main-dark":"ht-theme-main")},[c]),M.jsx(DQ,{className:r?"pointer-events-none opacity-50":"",themeName:d,language:hK.languageCode,ref:f,...e,afterChange:h,children:e.columns.map(k=>M.jsx(zQ,{data:k.data,...k},k.data))})},Jqe=Object.freeze(Object.defineProperty({__proto__:null,default:pK},Symbol.toStringTag,{value:"Module"})),kqe=()=>{const[e,n]=g.useState({width:typeof window<"u"?window.innerWidth:1024,height:typeof window<"u"?window.innerHeight:768});return g.useEffect(()=>{if(typeof window>"u")return;const o=()=>{n({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e},fK=({onChange:e,value:n,options:o,disabled:r})=>{const{appearance:c}=iz(),[d,u]=g.useState("light"),h=g.useRef(null),f=g.useRef(null),{width:k}=kqe(),m=k<768,y=k>=768&&k<1024,x=_=>{e(_)},b=_=>{h.current=_,w()},w=()=>{var C;if(!h.current)return;const _={minimap:{enabled:!m},fontSize:m?12:y?13:14,lineNumbers:m?"off":"on",lineDecorationsWidth:m?5:10,scrollBeyondLastLine:!m,wordWrap:m?"on":"bounded",renderWhitespace:m?"none":"selection",padding:{top:m?8:16,bottom:m?8:16}};h.current.updateOptions(_),(C=f.current)==null||C.classList.add("overflow-hidden"),setTimeout(()=>{var N,A;(N=h.current)==null||N.layout(),(A=f.current)==null||A.classList.remove("overflow-hidden")},100)};g.useEffect(()=>{u(c==="dark"?"vs-dark":"light")},[c]),g.useEffect(()=>{w()},[k]);const S=m?"300px":y?"400px":"500px";return M.jsx("div",{className:`border rounded-lg ${m?"p-1":"p-2"}`,ref:f,children:M.jsx(IQ,{height:S,language:o.language,value:n,theme:d,options:{automaticLayout:!0,...m&&{wordWrap:"on"},minimap:{enabled:!m}},onChange:x,onMount:b,className:`transition-all duration-200 ease-in-out ${r?"pointer-events-none opacity-50 cursor-not-allowed":""}`})})},eze=Object.freeze(Object.defineProperty({__proto__:null,default:fK},Symbol.toStringTag,{value:"Module"})),mV=$A("m-1 flex items-center border rounded-sm px-1",{variants:{variant:{default:"border-foreground/10 text-foreground bg-card hover:bg-card/80",secondary:"border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",inverted:"inverted"}},defaultVariants:{variant:"default"}}),cz=g.forwardRef(({options:e,onValueChange:n,variant:o,processing:r,disabled:c,defaultValue:d=[],placeholder:u="",notFound:h="",search:f="",animation:k=0,maxCount:m=3,modalPopover:y=!1,asChild:x=!1,className:b,mode:w="multiple",...S},_)=>{const[C,N]=g.useState(d),[A,T]=g.useState(!1),[q,$]=g.useState(!1),z=V=>{if(V.key==="Enter")T(!0);else if(V.key==="Backspace"&&!V.currentTarget.value){const se=[...C];se.pop(),N(se),n(se)}},P=V=>{let se;w==="single"?se=C.includes(V)?[]:[V]:se=C.includes(V)?C.filter(le=>le!==V):[...C,V],N(se),n(se),w==="single"&&T(!1)},ae=()=>{N([]),n([])},re=()=>{T(V=>!V)},he=()=>{const V=C.slice(0,m);N(V),n(V)};return M.jsxs(FW,{open:A,onOpenChange:T,modal:y,children:[M.jsx(UW,{asChild:!0,children:M.jsx(OA,{ref:_,...S,onClick:re,disabled:c,className:K("flex w-full p-1 rounded-md border-input border-1 min-h-10 h-auto items-center justify-between bg-inherit hover:bg-inherit [&_svg]:pointer-events-auto",b),children:C.length>0?M.jsxs("div",{className:"flex justify-between items-center w-full",children:[M.jsxs("div",{className:"flex flex-wrap items-center",children:[C.slice(0,m).map(V=>{const se=e.find(ye=>ye.value===V),le=se==null?void 0:se.icon;return M.jsxs("div",{className:K(q?"animate-bounce":"",mV({variant:o})),style:{animationDuration:`${k}s`},children:[le&&M.jsx(le,{className:"h-4 w-4 mr-2"}),se==null?void 0:se.label,M.jsx(Mr,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:ye=>{ye.stopPropagation(),r||P(V)}})]},V)}),w==="multiple"&&C.length>m&&M.jsxs("div",{className:K("bg-transparent text-foreground border-foreground/1 hover:bg-transparent",q?"animate-bounce":"",mV({variant:o})),style:{animationDuration:`${k}s`},children:[`+ ${C.length-m} more`,M.jsx(Mr,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:V=>{V.stopPropagation(),he()}})]})]}),M.jsxs("div",{className:"flex items-center justify-between",children:[C.length>0&&M.jsxs(M.Fragment,{children:[M.jsx(ri,{className:"h-4 mx-2 cursor-pointer text-muted-foreground",onClick:V=>{V.stopPropagation(),ae()}}),M.jsx(tz,{orientation:"vertical",className:"flex min-h-6 h-full"})]}),M.jsx(oi,{className:"h-4 mx-2 cursor-pointer text-muted-foreground"})]})]}):M.jsxs("div",{className:"flex items-center justify-between w-full mx-auto",children:[M.jsx("span",{className:"text-sm text-muted-foreground mx-3",children:u}),M.jsx(oi,{className:"h-4 cursor-pointer text-muted-foreground mx-2"})]})})}),M.jsx(GW,{className:"w-auto p-0 z-[410]",align:"start",onEscapeKeyDown:()=>T(!1),children:M.jsxs(mq,{children:[M.jsx(vG,{placeholder:f,onKeyDown:z}),M.jsxs(gG,{children:[M.jsx(MG,{children:h}),M.jsx(xG,{children:e.map(V=>{const se=C.includes(V.value);return M.jsxs(wG,{onSelect:()=>P(V.value),className:"cursor-pointer",children:[M.jsx("div",{className:K("mr-2 flex h-5 w-5 items-center justify-center rounded border border-primary",se?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:M.jsx(Uo,{className:"h-4 w-4 text-primary-foreground"})}),V.icon&&M.jsx(V.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),M.jsx("span",{children:V.label})]},V.value)})}),M.jsx(bG,{})]})]})}),k>0&&C.length>0&&w==="multiple"&&M.jsx(ti,{className:K("cursor-pointer my-2 text-foreground bg-background w-3 h-3",q?"":"text-muted-foreground"),onClick:()=>$(!q)})]})});cz.displayName="MultiSelect";const tze=Object.freeze(Object.defineProperty({__proto__:null,default:cz},Symbol.toStringTag,{value:"Module"}));function vqe(){window.UIComponents??(window.UIComponents={}),window.JSComponents??(window.JSComponents={}),Object.assign(window.UIComponents,{Avatar:xae,AvatarImage:bae,AvatarFallback:wae,Badge:Sae,Breadcrumb:L9e,BreadcrumbList:N9e,BreadcrumbItem:I9e,BreadcrumbLink:A9e,BreadcrumbPage:E9e,BreadcrumbSeparator:T9e,BreadcrumbEllipsis:R9e,Button:OA,Calendar:MSe,Card:xSe,CardHeader:bSe,CardFooter:LSe,CardTitle:wSe,CardAction:SSe,CardDescription:_Se,CardContent:CSe,Checkbox:$Se,Collapsible:USe,CollapsibleTrigger:GSe,CollapsibleContent:ZSe,Command:mq,CommandDialog:TLe,CommandInput:vG,CommandList:gG,CommandEmpty:MG,CommandGroup:xG,CommandItem:wG,CommandShortcut:RLe,CommandSeparator:bG,ContextMenu:dAe,ContextMenuTrigger:uAe,ContextMenuContent:vAe,ContextMenuItem:gAe,ContextMenuCheckboxItem:MAe,ContextMenuRadioItem:xAe,ContextMenuLabel:bAe,ContextMenuSeparator:wAe,ContextMenuShortcut:_Ae,ContextMenuGroup:hAe,ContextMenuPortal:pAe,ContextMenuSub:fAe,ContextMenuSubContent:kAe,ContextMenuSubTrigger:mAe,ContextMenuRadioGroup:yAe,Dialog:uG,DialogClose:ALe,DialogContent:fG,DialogDescription:kG,DialogFooter:ELe,DialogHeader:yG,DialogOverlay:pG,DialogPortal:hG,DialogTitle:mG,DialogTrigger:ILe,DialogStack:VZ,DialogStackTrigger:SAe,DialogStackOverlay:CAe,DialogStackBody:LAe,DialogStackContent:NAe,DialogStackTitle:IAe,DialogStackDescription:AAe,DialogStackHeader:EAe,DialogStackFooter:TAe,DialogStackNext:RAe,DialogStackPrevious:jAe,DropdownMenu:dEe,DropdownMenuPortal:uEe,DropdownMenuTrigger:hEe,DropdownMenuContent:pEe,DropdownMenuGroup:fEe,DropdownMenuLabel:gEe,DropdownMenuItem:yEe,DropdownMenuCheckboxItem:mEe,DropdownMenuRadioGroup:kEe,DropdownMenuRadioItem:vEe,DropdownMenuSeparator:MEe,DropdownMenuShortcut:xEe,DropdownMenuSub:bEe,DropdownMenuSubTrigger:wEe,DropdownMenuSubContent:_Ee,Input:lW,Label:LEe,Menubar:cTe,MenubarPortal:TW,MenubarMenu:sTe,MenubarTrigger:uTe,MenubarContent:hTe,MenubarGroup:lTe,MenubarSeparator:kTe,MenubarLabel:mTe,MenubarItem:pTe,MenubarShortcut:vTe,MenubarCheckboxItem:fTe,MenubarRadioGroup:dTe,MenubarRadioItem:yTe,MenubarSub:gTe,MenubarSubTrigger:MTe,MenubarSubContent:xTe,Pagination:bTe,PaginationContent:wTe,PaginationLink:Qq,PaginationItem:_Te,PaginationPrevious:STe,PaginationNext:CTe,PaginationEllipsis:LTe,Popover:FW,PopoverTrigger:UW,PopoverContent:GW,PopoverAnchor:BTe,Select:CRe,SelectContent:ARe,SelectGroup:LRe,SelectItem:TRe,SelectLabel:ERe,SelectScrollDownButton:SX,SelectScrollUpButton:_X,SelectSeparator:RRe,SelectTrigger:IRe,SelectValue:NRe,Separator:tz,Sheet:LX,SheetTrigger:$Re,SheetClose:ORe,SheetContent:NX,SheetHeader:IX,SheetFooter:BRe,SheetTitle:AX,SheetDescription:EX,Sidebar:vje,SidebarContent:Cje,SidebarFooter:_je,SidebarGroup:Lje,SidebarGroupAction:Ije,SidebarGroupContent:Aje,SidebarGroupLabel:Nje,SidebarHeader:wje,SidebarInput:bje,SidebarInset:xje,SidebarMenu:Eje,SidebarMenuAction:Dje,SidebarMenuBadge:qje,SidebarMenuButton:jje,SidebarMenuItem:Tje,SidebarMenuSkeleton:zje,SidebarMenuSub:$je,SidebarMenuSubButton:Pje,SidebarMenuSubItem:Oje,SidebarProvider:kje,SidebarRail:Mje,SidebarSeparator:Sje,SidebarTrigger:gje,useSidebar:A2,Skeleton:ND,Slider:iDe,Toaster:$De,Switch:UDe,Table:GDe,TableHeader:ZDe,TableBody:WDe,TableFooter:XDe,TableHead:YDe,TableRow:KDe,TableCell:QDe,TableCaption:JDe,Textarea:eqe,Tooltip:HX,TooltipTrigger:BX,TooltipContent:VX,TooltipProvider:oz,VanillaJSONEditor:DD}),Object.assign(window.JSComponents,{VanillaJSONEditor:DD,HandsonTable:pK,MonacoEditor:fK,MultiSelect:cz})}const{createInertiaApp:gqe}=LF;window.React=ve;window.ReactDOM=qD;window.InertiajsReact=LF;window.LucideReact=C9e;vqe();async function Mqe(e,n){for(const o of Array.isArray(e)?e:[e]){const r=n[o];if(!(typeof r>"u"))return typeof r=="function"?r():r}throw new Error(`Page not found: ${e}`)}gqe({title:e=>`${e}`,resolve:e=>Mqe(`./pages/${e}.tsx`,Object.assign({"./pages/add-group.tsx":()=>fn(()=>import("./add-group-7yAK6uFY.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url),"./pages/add-user.tsx":()=>fn(()=>import("./add-user-NoYkTfZi.js"),__vite__mapDeps([18,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,19,20]),import.meta.url),"./pages/add.tsx":()=>fn(()=>import("./add-1E1UsMVZ.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,22,23,24,25,20]),import.meta.url),"./pages/catalog.tsx":()=>fn(()=>import("./catalog-B9hdop59.js"),__vite__mapDeps([26,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,27,22,23,24,25,20,28]),import.meta.url),"./pages/dashboard.tsx":()=>fn(()=>import("./dashboard-Bi5KeZu2.js"),__vite__mapDeps([29,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,30]),import.meta.url),"./pages/form.tsx":()=>fn(()=>import("./form-Bte5kzjB.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,32,22,23,24,25,20]),import.meta.url),"./pages/home.tsx":()=>fn(()=>import("./home-CsUXA-O6.js"),__vite__mapDeps([33,5,4,3,6]),import.meta.url),"./pages/init-user.tsx":()=>fn(()=>import("./init-user-DNrB8Xt5.js"),__vite__mapDeps([34,3,4,20,5,6]),import.meta.url),"./pages/list.tsx":()=>fn(()=>import("./list-CdfSnSN1.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,36,27,37]),import.meta.url),"./pages/login.tsx":()=>fn(()=>import("./login-6Xb8bcPq.js"),__vite__mapDeps([38,16,5,4,3,6,20]),import.meta.url),"./pages/module.tsx":()=>fn(()=>import("./module-B4-7WkY5.js"),__vite__mapDeps([39,3,4,1,2,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url),"./pages/notification.tsx":()=>fn(()=>import("./notification-ma2x7vka.js"),__vite__mapDeps([40,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,41]),import.meta.url),"./pages/register.tsx":()=>fn(()=>import("./register-BIyjCy8M.js"),__vite__mapDeps([42,3,4,20,5,6]),import.meta.url),"./pages/welcome.tsx":()=>fn(()=>import("./welcome-cWh1qnl_.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url)})),setup({el:e,App:n,props:o}){xne.createRoot(e).render(M.jsx(n,{...o}))},progress:{color:"#0f4898"}});export{Tx as $,xSe as A,OA as B,Go as C,VZ as D,bSe as E,wSe as F,LSe as G,oz as H,lW as I,HX as J,BX as K,Cs as L,VX as M,UDe as N,SAe as O,tw as P,IAe as Q,dne as R,CRe as S,$De as T,hne as U,xF as V,Wqe as W,iI as X,K as Y,R5 as Z,En as _,LEe as a,GSe as a$,Ip as a0,GDe as a1,ZDe as a2,KDe as a3,YDe as a4,WDe as a5,QDe as a6,Ji as a7,uG as a8,fG as a9,YG as aA,ge as aB,xn as aC,sb as aD,O8 as aE,kje as aF,dEe as aG,Ff as aH,yEe as aI,MEe as aJ,gje as aK,vje as aL,wje as aM,Eje as aN,Tje as aO,cTe as aP,sTe as aQ,uTe as aR,jje as aS,w4 as aT,hTe as aU,gTe as aV,MTe as aW,xTe as aX,pTe as aY,Lje as aZ,wU as a_,yG as aa,mG as ab,xje as ac,kqe as ad,iz as ae,T7 as af,f8 as ag,Bw as ah,Uo as ai,mN as aj,nl as ak,ri as al,ELe as am,ALe as an,Op as ao,xp as ap,Sp as aq,ILe as ar,ys as as,v2 as at,ln as au,Jt as av,bt as aw,be as ax,aE as ay,KG as az,IRe as b,CU as b0,$je as b1,Oje as b2,Pje as b3,Cje as b4,_je as b5,L9e as b6,N9e as b7,I9e as b8,E9e as b9,iDe as bA,eqe as bB,Rp as bC,Yu as bD,H1 as bE,Xw as bF,bTe as bG,wTe as bH,_Te as bI,Qq as bJ,STe as bK,CTe as bL,Qqe as bM,Jqe as bN,eze as bO,tze as bP,A9e as ba,T9e as bb,FW as bc,UW as bd,Il as be,jm as bf,GW as bg,MSe as bh,Nje as bi,Aje as bj,USe as bk,ZSe as bl,A2 as bm,VRe as bn,WC as bo,Zx as bp,KC as bq,xae as br,bae as bs,wae as bt,gEe as bu,i7 as bv,Yqe as bw,Kqe as bx,Xqe as by,cz as bz,NRe as c,ARe as d,TRe as e,$Se as f,Nt as g,CAe as h,LAe as i,M as j,NAe as k,ND as l,b9 as m,ff as n,UZ as o,hEe as p,Ki as q,CF as r,pEe as s,Zqe as t,gF as u,fEe as v,dAe as w,uAe as x,vAe as y,gAe as z};
8065
+ */const yqe={languageCode:"zh-CN",[Co]:"上方插入行",[So]:"下方插入行",[_o]:"左方插入列",[wo]:"右方插入列",[bo]:["移除该行","移除多行"],[xo]:["移除该列","移除多列"],[Mo]:"撤销",[go]:"恢复",[vo]:"只读",[ko]:"清空该列",[mo]:"对齐",[yo]:"左对齐",[fo]:"水平居中",[po]:"右对齐",[ho]:"两端对齐",[uo]:"顶端对齐",[lo]:"垂直居中",[so]:"底端对齐",[co]:"冻结该列",[io]:"取消冻结",[ro]:"边框",[oo]:"上",[ao]:"右",[no]:"下",[to]:"左",[eo]:"移除边框",[Ja]:"插入批注",[Qa]:"编辑批注",[Ya]:"删除批注",[Ka]:"只读批注",[Xa]:"合并",[Wa]:"取消合并",[Za]:"复制",[Rd]:"带标题的复制",[Td]:"带标题组的复制",[Ed]:"仅复制标题",[Ga]:"剪切",[Ua]:"插入子行",[Fa]:"与母行分离",[Va]:["隐藏该列","隐藏多列"],[Ba]:["显示该列","显示多列"],[Ha]:["隐藏该行","隐藏多行"],[Pa]:["显示该行","显示多行"],[Oa]:"无",[$a]:"为空",[za]:"不为空",[qa]:"等于",[Da]:"不等于",[ja]:"开头是",[Ra]:"结尾是",[Ta]:"包含",[Ea]:"不包含",[Aa]:"大于",[Ia]:"大于或等于",[Na]:"小于",[La]:"小于或等于",[Ca]:"在此范围",[Sa]:"不在此范围",[_a]:"之后",[wa]:"之前",[ba]:"今天",[xa]:"明天",[Ma]:"昨天",[ga]:"空白单元格",[va]:"按条件过滤",[ka]:"按值过滤",[ma]:"且",[ya]:"或",[fa]:"全选",[pa]:"清除",[ha]:"确认",[ua]:"取消",[da]:"搜索",[la]:"值",[sa]:"第二值"};RQ();const yV={de:rqe,en:qQ,es:iqe,fr:cqe,it:sqe,ja:lqe,ko:dqe,nl:uqe,pl:hqe,pt:pqe,ru:fqe,zh:yqe},mqe=document.documentElement.lang,hK=yV[mqe]??yV.en;jQ(hK);const pK=({config:e,data:n=[],onChange:o,disabled:r})=>{const{appearance:c}=iz(),[d,u]=g.useState("ht-theme-main"),h=g.useCallback((k,m)=>{var x,b;if(m==="loadData")return;const y=(b=(x=f.current)==null?void 0:x.hotInstance)==null?void 0:b.getSourceData();o(y)},[]),f=g.useRef(null);return g.useEffect(()=>{f.current&&f.current.hotInstance.loadData(n)},[n]),g.useEffect(()=>{u(c==="dark"?"ht-theme-main-dark":"ht-theme-main")},[c]),M.jsx(DQ,{className:r?"pointer-events-none opacity-50":"",themeName:d,language:hK.languageCode,ref:f,...e,afterChange:h,children:e.columns.map(k=>M.jsx(zQ,{data:k.data,...k},k.data))})},Jqe=Object.freeze(Object.defineProperty({__proto__:null,default:pK},Symbol.toStringTag,{value:"Module"})),kqe=()=>{const[e,n]=g.useState({width:typeof window<"u"?window.innerWidth:1024,height:typeof window<"u"?window.innerHeight:768});return g.useEffect(()=>{if(typeof window>"u")return;const o=()=>{n({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e},fK=({onChange:e,value:n,options:o,disabled:r})=>{const{appearance:c}=iz(),[d,u]=g.useState("light"),h=g.useRef(null),f=g.useRef(null),{width:k}=kqe(),m=k<768,y=k>=768&&k<1024,x=_=>{e(_)},b=_=>{h.current=_,w()},w=()=>{var C;if(!h.current)return;const _={minimap:{enabled:!m},fontSize:m?12:y?13:14,lineNumbers:m?"off":"on",lineDecorationsWidth:m?5:10,scrollBeyondLastLine:!m,wordWrap:m?"on":"bounded",renderWhitespace:m?"none":"selection",padding:{top:m?8:16,bottom:m?8:16}};h.current.updateOptions(_),(C=f.current)==null||C.classList.add("overflow-hidden"),setTimeout(()=>{var N,A;(N=h.current)==null||N.layout(),(A=f.current)==null||A.classList.remove("overflow-hidden")},100)};g.useEffect(()=>{u(c==="dark"?"vs-dark":"light")},[c]),g.useEffect(()=>{w()},[k]);const S=m?"300px":y?"400px":"500px";return M.jsx("div",{className:`border rounded-lg ${m?"p-1":"p-2"}`,ref:f,children:M.jsx(IQ,{height:S,language:o.language,value:n,theme:d,options:{automaticLayout:!0,...m&&{wordWrap:"on"},minimap:{enabled:!m}},onChange:x,onMount:b,className:`transition-all duration-200 ease-in-out ${r?"pointer-events-none opacity-50 cursor-not-allowed":""}`})})},eze=Object.freeze(Object.defineProperty({__proto__:null,default:fK},Symbol.toStringTag,{value:"Module"})),mV=$A("m-1 flex items-center border rounded-sm px-1",{variants:{variant:{default:"border-foreground/10 text-foreground bg-card hover:bg-card/80",secondary:"border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",inverted:"inverted"}},defaultVariants:{variant:"default"}}),cz=g.forwardRef(({options:e,onValueChange:n,variant:o,processing:r,disabled:c,defaultValue:d=[],placeholder:u="",notFound:h="",search:f="",animation:k=0,maxCount:m=3,modalPopover:y=!1,asChild:x=!1,className:b,mode:w="multiple",...S},_)=>{const[C,N]=g.useState(d),[A,T]=g.useState(!1),[q,$]=g.useState(!1),z=V=>{if(V.key==="Enter")T(!0);else if(V.key==="Backspace"&&!V.currentTarget.value){const se=[...C];se.pop(),N(se),n(se)}},P=V=>{let se;w==="single"?se=C.includes(V)?[]:[V]:se=C.includes(V)?C.filter(le=>le!==V):[...C,V],N(se),n(se),w==="single"&&T(!1)},ae=()=>{N([]),n([])},re=()=>{T(V=>!V)},he=()=>{const V=C.slice(0,m);N(V),n(V)};return M.jsxs(FW,{open:A,onOpenChange:T,modal:y,children:[M.jsx(UW,{asChild:!0,children:M.jsx(OA,{ref:_,...S,onClick:re,disabled:c,className:K("flex w-full p-1 rounded-md border-input border-1 min-h-10 h-auto items-center justify-between bg-inherit hover:bg-inherit [&_svg]:pointer-events-auto",b),children:C.length>0?M.jsxs("div",{className:"flex justify-between items-center w-full",children:[M.jsxs("div",{className:"flex flex-wrap items-center",children:[C.slice(0,m).map(V=>{const se=e.find(ye=>ye.value===V),le=se==null?void 0:se.icon;return M.jsxs("div",{className:K(q?"animate-bounce":"",mV({variant:o})),style:{animationDuration:`${k}s`},children:[le&&M.jsx(le,{className:"h-4 w-4 mr-2"}),se==null?void 0:se.label,M.jsx(Mr,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:ye=>{ye.stopPropagation(),r||P(V)}})]},V)}),w==="multiple"&&C.length>m&&M.jsxs("div",{className:K("bg-transparent text-foreground border-foreground/1 hover:bg-transparent",q?"animate-bounce":"",mV({variant:o})),style:{animationDuration:`${k}s`},children:[`+ ${C.length-m} more`,M.jsx(Mr,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:V=>{V.stopPropagation(),he()}})]})]}),M.jsxs("div",{className:"flex items-center justify-between",children:[C.length>0&&M.jsxs(M.Fragment,{children:[M.jsx(ri,{className:"h-4 mx-2 cursor-pointer text-muted-foreground",onClick:V=>{V.stopPropagation(),ae()}}),M.jsx(tz,{orientation:"vertical",className:"flex min-h-6 h-full"})]}),M.jsx(oi,{className:"h-4 mx-2 cursor-pointer text-muted-foreground"})]})]}):M.jsxs("div",{className:"flex items-center justify-between w-full mx-auto",children:[M.jsx("span",{className:"text-sm text-muted-foreground mx-3",children:u}),M.jsx(oi,{className:"h-4 cursor-pointer text-muted-foreground mx-2"})]})})}),M.jsx(GW,{className:"w-auto p-0 z-[410]",align:"start",onEscapeKeyDown:()=>T(!1),children:M.jsxs(mq,{children:[M.jsx(vG,{placeholder:f,onKeyDown:z}),M.jsxs(gG,{children:[M.jsx(MG,{children:h}),M.jsx(xG,{children:e.map(V=>{const se=C.includes(V.value);return M.jsxs(wG,{onSelect:()=>P(V.value),className:"cursor-pointer",children:[M.jsx("div",{className:K("mr-2 flex h-5 w-5 items-center justify-center rounded border border-primary",se?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:M.jsx(Uo,{className:"h-4 w-4 text-primary-foreground"})}),V.icon&&M.jsx(V.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),M.jsx("span",{children:V.label})]},V.value)})}),M.jsx(bG,{})]})]})}),k>0&&C.length>0&&w==="multiple"&&M.jsx(ti,{className:K("cursor-pointer my-2 text-foreground bg-background w-3 h-3",q?"":"text-muted-foreground"),onClick:()=>$(!q)})]})});cz.displayName="MultiSelect";const tze=Object.freeze(Object.defineProperty({__proto__:null,default:cz},Symbol.toStringTag,{value:"Module"}));function vqe(){window.UIComponents??(window.UIComponents={}),window.JSComponents??(window.JSComponents={}),Object.assign(window.UIComponents,{Avatar:xae,AvatarImage:bae,AvatarFallback:wae,Badge:Sae,Breadcrumb:L9e,BreadcrumbList:N9e,BreadcrumbItem:I9e,BreadcrumbLink:A9e,BreadcrumbPage:E9e,BreadcrumbSeparator:T9e,BreadcrumbEllipsis:R9e,Button:OA,Calendar:MSe,Card:xSe,CardHeader:bSe,CardFooter:LSe,CardTitle:wSe,CardAction:SSe,CardDescription:_Se,CardContent:CSe,Checkbox:$Se,Collapsible:USe,CollapsibleTrigger:GSe,CollapsibleContent:ZSe,Command:mq,CommandDialog:TLe,CommandInput:vG,CommandList:gG,CommandEmpty:MG,CommandGroup:xG,CommandItem:wG,CommandShortcut:RLe,CommandSeparator:bG,ContextMenu:dAe,ContextMenuTrigger:uAe,ContextMenuContent:vAe,ContextMenuItem:gAe,ContextMenuCheckboxItem:MAe,ContextMenuRadioItem:xAe,ContextMenuLabel:bAe,ContextMenuSeparator:wAe,ContextMenuShortcut:_Ae,ContextMenuGroup:hAe,ContextMenuPortal:pAe,ContextMenuSub:fAe,ContextMenuSubContent:kAe,ContextMenuSubTrigger:mAe,ContextMenuRadioGroup:yAe,Dialog:uG,DialogClose:ALe,DialogContent:fG,DialogDescription:kG,DialogFooter:ELe,DialogHeader:yG,DialogOverlay:pG,DialogPortal:hG,DialogTitle:mG,DialogTrigger:ILe,DialogStack:VZ,DialogStackTrigger:SAe,DialogStackOverlay:CAe,DialogStackBody:LAe,DialogStackContent:NAe,DialogStackTitle:IAe,DialogStackDescription:AAe,DialogStackHeader:EAe,DialogStackFooter:TAe,DialogStackNext:RAe,DialogStackPrevious:jAe,DropdownMenu:dEe,DropdownMenuPortal:uEe,DropdownMenuTrigger:hEe,DropdownMenuContent:pEe,DropdownMenuGroup:fEe,DropdownMenuLabel:gEe,DropdownMenuItem:yEe,DropdownMenuCheckboxItem:mEe,DropdownMenuRadioGroup:kEe,DropdownMenuRadioItem:vEe,DropdownMenuSeparator:MEe,DropdownMenuShortcut:xEe,DropdownMenuSub:bEe,DropdownMenuSubTrigger:wEe,DropdownMenuSubContent:_Ee,Input:lW,Label:LEe,Menubar:cTe,MenubarPortal:TW,MenubarMenu:sTe,MenubarTrigger:uTe,MenubarContent:hTe,MenubarGroup:lTe,MenubarSeparator:kTe,MenubarLabel:mTe,MenubarItem:pTe,MenubarShortcut:vTe,MenubarCheckboxItem:fTe,MenubarRadioGroup:dTe,MenubarRadioItem:yTe,MenubarSub:gTe,MenubarSubTrigger:MTe,MenubarSubContent:xTe,Pagination:bTe,PaginationContent:wTe,PaginationLink:Qq,PaginationItem:_Te,PaginationPrevious:STe,PaginationNext:CTe,PaginationEllipsis:LTe,Popover:FW,PopoverTrigger:UW,PopoverContent:GW,PopoverAnchor:BTe,Select:CRe,SelectContent:ARe,SelectGroup:LRe,SelectItem:TRe,SelectLabel:ERe,SelectScrollDownButton:SX,SelectScrollUpButton:_X,SelectSeparator:RRe,SelectTrigger:IRe,SelectValue:NRe,Separator:tz,Sheet:LX,SheetTrigger:$Re,SheetClose:ORe,SheetContent:NX,SheetHeader:IX,SheetFooter:BRe,SheetTitle:AX,SheetDescription:EX,Sidebar:vje,SidebarContent:Cje,SidebarFooter:_je,SidebarGroup:Lje,SidebarGroupAction:Ije,SidebarGroupContent:Aje,SidebarGroupLabel:Nje,SidebarHeader:wje,SidebarInput:bje,SidebarInset:xje,SidebarMenu:Eje,SidebarMenuAction:Dje,SidebarMenuBadge:qje,SidebarMenuButton:jje,SidebarMenuItem:Tje,SidebarMenuSkeleton:zje,SidebarMenuSub:$je,SidebarMenuSubButton:Pje,SidebarMenuSubItem:Oje,SidebarProvider:kje,SidebarRail:Mje,SidebarSeparator:Sje,SidebarTrigger:gje,useSidebar:A2,Skeleton:ND,Slider:iDe,Toaster:$De,Switch:UDe,Table:GDe,TableHeader:ZDe,TableBody:WDe,TableFooter:XDe,TableHead:YDe,TableRow:KDe,TableCell:QDe,TableCaption:JDe,Textarea:eqe,Tooltip:HX,TooltipTrigger:BX,TooltipContent:VX,TooltipProvider:oz,VanillaJSONEditor:DD}),Object.assign(window.JSComponents,{VanillaJSONEditor:DD,HandsonTable:pK,MonacoEditor:fK,MultiSelect:cz})}const{createInertiaApp:gqe}=LF;window.React=ve;window.ReactDOM=qD;window.InertiajsReact=LF;window.LucideReact=C9e;vqe();async function Mqe(e,n){for(const o of Array.isArray(e)?e:[e]){const r=n[o];if(!(typeof r>"u"))return typeof r=="function"?r():r}throw new Error(`Page not found: ${e}`)}gqe({title:e=>`${e}`,resolve:e=>Mqe(`./pages/${e}.tsx`,Object.assign({"./pages/add-group.tsx":()=>fn(()=>import("./add-group-7yAK6uFY.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url),"./pages/add-user.tsx":()=>fn(()=>import("./add-user-NoYkTfZi.js"),__vite__mapDeps([18,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,19,20]),import.meta.url),"./pages/add.tsx":()=>fn(()=>import("./add-1E1UsMVZ.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,22,23,24,25,20]),import.meta.url),"./pages/catalog.tsx":()=>fn(()=>import("./catalog-B9hdop59.js"),__vite__mapDeps([26,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,27,22,23,24,25,20,28]),import.meta.url),"./pages/dashboard.tsx":()=>fn(()=>import("./dashboard-Bi5KeZu2.js"),__vite__mapDeps([29,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,30]),import.meta.url),"./pages/form.tsx":()=>fn(()=>import("./form-qyuRZEIC.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,32,22,23,24,25,20]),import.meta.url),"./pages/home.tsx":()=>fn(()=>import("./home-DxhSEMhE.js"),__vite__mapDeps([33,5,4,3,6]),import.meta.url),"./pages/init-user.tsx":()=>fn(()=>import("./init-user-DNrB8Xt5.js"),__vite__mapDeps([34,3,4,20,5,6]),import.meta.url),"./pages/list.tsx":()=>fn(()=>import("./list-CdfSnSN1.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,36,27,37]),import.meta.url),"./pages/login.tsx":()=>fn(()=>import("./login-6Xb8bcPq.js"),__vite__mapDeps([38,16,5,4,3,6,20]),import.meta.url),"./pages/module.tsx":()=>fn(()=>import("./module-B4-7WkY5.js"),__vite__mapDeps([39,3,4,1,2,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url),"./pages/notification.tsx":()=>fn(()=>import("./notification-ma2x7vka.js"),__vite__mapDeps([40,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,41]),import.meta.url),"./pages/register.tsx":()=>fn(()=>import("./register-BIyjCy8M.js"),__vite__mapDeps([42,3,4,20,5,6]),import.meta.url),"./pages/welcome.tsx":()=>fn(()=>import("./welcome-cWh1qnl_.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url)})),setup({el:e,App:n,props:o}){xne.createRoot(e).render(M.jsx(n,{...o}))},progress:{color:"#0f4898"}});export{Tx as $,xSe as A,OA as B,Go as C,VZ as D,bSe as E,wSe as F,LSe as G,oz as H,lW as I,HX as J,BX as K,Cs as L,VX as M,UDe as N,SAe as O,tw as P,IAe as Q,dne as R,CRe as S,$De as T,hne as U,xF as V,Wqe as W,iI as X,K as Y,R5 as Z,En as _,LEe as a,GSe as a$,Ip as a0,GDe as a1,ZDe as a2,KDe as a3,YDe as a4,WDe as a5,QDe as a6,Ji as a7,uG as a8,fG as a9,YG as aA,ge as aB,xn as aC,sb as aD,O8 as aE,kje as aF,dEe as aG,Ff as aH,yEe as aI,MEe as aJ,gje as aK,vje as aL,wje as aM,Eje as aN,Tje as aO,cTe as aP,sTe as aQ,uTe as aR,jje as aS,w4 as aT,hTe as aU,gTe as aV,MTe as aW,xTe as aX,pTe as aY,Lje as aZ,wU as a_,yG as aa,mG as ab,xje as ac,kqe as ad,iz as ae,T7 as af,f8 as ag,Bw as ah,Uo as ai,mN as aj,nl as ak,ri as al,ELe as am,ALe as an,Op as ao,xp as ap,Sp as aq,ILe as ar,ys as as,v2 as at,ln as au,Jt as av,bt as aw,be as ax,aE as ay,KG as az,IRe as b,CU as b0,$je as b1,Oje as b2,Pje as b3,Cje as b4,_je as b5,L9e as b6,N9e as b7,I9e as b8,E9e as b9,iDe as bA,eqe as bB,Rp as bC,Yu as bD,H1 as bE,Xw as bF,bTe as bG,wTe as bH,_Te as bI,Qq as bJ,STe as bK,CTe as bL,Qqe as bM,Jqe as bN,eze as bO,tze as bP,A9e as ba,T9e as bb,FW as bc,UW as bd,Il as be,jm as bf,GW as bg,MSe as bh,Nje as bi,Aje as bj,USe as bk,ZSe as bl,A2 as bm,VRe as bn,WC as bo,Zx as bp,KC as bq,xae as br,bae as bs,wae as bt,gEe as bu,i7 as bv,Yqe as bw,Kqe as bx,Xqe as by,cz as bz,NRe as c,ARe as d,TRe as e,$Se as f,Nt as g,CAe as h,LAe as i,M as j,NAe as k,ND as l,b9 as m,ff as n,UZ as o,hEe as p,Ki as q,CF as r,pEe as s,Zqe as t,gF as u,fEe as v,dAe as w,uAe as x,vAe as y,gAe as z};
@@ -0,0 +1 @@
1
+ import{u as v,V as y,bw as m,j as e,B as p,bx as i,L as l,by as c}from"./app.js";import{r as d}from"./monaco-ICtx6xoc.js";import{LabelRenderer as x,LazyField as F}from"./add-form-CGa9QbwE.js";import g from"./input-error--IOnWghB.js";import{F as w}from"./field-renderer-4obZ_jUo.js";import"./jsoneditor-D95dIAP2.js";import"./vendor-wzZzN_Jv.js";import"./handsontable-PVakPtJV.js";import"./icon-DM49pZW3.js";import"./dynamic-controls-BOYmRX_z.js";const B=()=>{const r=v(),{fields:t}=r.props,{data:o,setData:u,post:h,processing:a}=y(Object.fromEntries(t.map(s=>[s.name,s.value??void 0])));d.useEffect(()=>(m(),()=>{m()}),[]);const n=d.useCallback((s,b)=>{u(s,b)},[]),j=s=>{s.preventDefault(),h(r.props.postLink,{preserveState:!1})};return e.jsxs("div",{className:"p-4 w-full",children:[e.jsx("div",{className:"w-full sticky z-[1001] py-4 pb-8 top-0 h-fit bg-background flex gap-4 lg:hidden",children:e.jsxs(p,{variant:"green",type:"submit",className:"w-fit",form:"addUserForm",disabled:a||i(),children:[a&&e.jsx(l,{className:"h-4 w-4 animate-spin"}),r.props.btnSave.title]})}),e.jsx("form",{className:`mt-8 ${a?"invisible":""}`,id:"addUserForm",onSubmit:j,children:e.jsxs("div",{className:"grid lg:grid-cols-[1fr_150px] gap-4 max-w-[1144px] pb-8",children:[e.jsx("div",{className:"flex flex-col gap-10",children:t.map(s=>e.jsx("div",{className:"grid gap-4 w-full",children:s.type==="markdown"||s.type==="table"||s.type==="jsonEditor"||s.type==="codeEditor"||s.type==="geoJson"?e.jsxs(e.Fragment,{children:[e.jsx(x,{field:s}),e.jsx(g,{message:c(`${s.type}-${s.name}`)}),e.jsx(F,{field:s,value:o[s.name],onChange:n,processing:a})]}):e.jsxs(e.Fragment,{children:[e.jsx(x,{field:s}),e.jsx(g,{message:c(`${s.type}-${s.name}`)}),e.jsx(w,{field:s,value:o[s.name],onChange:n,processing:a})]})},s.name))}),e.jsx("div",{className:"p-4 rounded-md h-fit sticky top-[84px] shadow hidden lg:block",children:e.jsxs(p,{variant:"green",type:"submit",className:"w-fit",disabled:a||i(),children:[a&&e.jsx(l,{className:"h-4 w-4 animate-spin"}),r.props.btnSave.title]})})]})})]})};export{B as default};
@@ -1 +1 @@
1
- import{j as r}from"./app.js";import{A as o}from"./app-layout-i2zN9Rn-.js";import t from"./form-oUlsuu7h.js";import"./jsoneditor-D95dIAP2.js";import"./vendor-wzZzN_Jv.js";import"./monaco-ICtx6xoc.js";import"./handsontable-PVakPtJV.js";import"./app-shell-CHEYhVco.js";import"./app-sidebar-DeF8WNmW.js";import"./nav-main-9Eb_A0rf.js";import"./material-icon-BedgD2NE.js";import"./app-sidebar-header-DdM1EOrb.js";import"./breadcrumbs-C439DWrC.js";import"./nav-user-CRAfyE-x.js";import"./user-info-CcYdmjMZ.js";import"./user-menu-content-DbUk8ZeY.js";import"./theme-switcher-CKiJbMkh.js";import"./icon-DM49pZW3.js";import"./add-form-CGa9QbwE.js";import"./field-renderer-4obZ_jUo.js";import"./dynamic-controls-BOYmRX_z.js";import"./input-error--IOnWghB.js";const m=[];function g(){return r.jsx(o,{breadcrumbs:m,children:r.jsx(t,{})})}export{g as default};
1
+ import{j as r}from"./app.js";import{A as o}from"./app-layout-i2zN9Rn-.js";import t from"./form-DmBOE8Za.js";import"./jsoneditor-D95dIAP2.js";import"./vendor-wzZzN_Jv.js";import"./monaco-ICtx6xoc.js";import"./handsontable-PVakPtJV.js";import"./app-shell-CHEYhVco.js";import"./app-sidebar-DeF8WNmW.js";import"./nav-main-9Eb_A0rf.js";import"./material-icon-BedgD2NE.js";import"./app-sidebar-header-DdM1EOrb.js";import"./breadcrumbs-C439DWrC.js";import"./nav-user-CRAfyE-x.js";import"./user-info-CcYdmjMZ.js";import"./user-menu-content-DbUk8ZeY.js";import"./theme-switcher-CKiJbMkh.js";import"./icon-DM49pZW3.js";import"./add-form-CGa9QbwE.js";import"./field-renderer-4obZ_jUo.js";import"./dynamic-controls-BOYmRX_z.js";import"./input-error--IOnWghB.js";const m=[];function g(){return r.jsx(o,{breadcrumbs:m,children:r.jsx(t,{})})}export{g as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app.js","./jsoneditor-D95dIAP2.js","./vendor-wzZzN_Jv.js","./monaco-ICtx6xoc.js","./handsontable-PVakPtJV.js","./app-D8oqdt8J.css","./add-form-CGa9QbwE.js","./icon-DM49pZW3.js","./field-renderer-4obZ_jUo.js","./dynamic-controls-BOYmRX_z.js","./field-renderer-CRNLShJD.css","./input-error--IOnWghB.js","./add-group-form-BNmpvW8K.js","./add-user-form-DrclnTOd.js","./material-icon-BedgD2NE.js","./app-shell-CHEYhVco.js","./app-sidebar-header-DdM1EOrb.js","./breadcrumbs-C439DWrC.js","./nav-user-CRAfyE-x.js","./user-info-CcYdmjMZ.js","./user-menu-content-DbUk8ZeY.js","./theme-switcher-CKiJbMkh.js","./app-sidebar-DeF8WNmW.js","./nav-main-9Eb_A0rf.js","./date-picker-DbJ8nHp5.js","./form-oUlsuu7h.js","./geo-json-CadjdhwW.js","./list-table-Byzv346I.js","./del-modal-_b3CSNHb.js","./pagination-render-xsEktzA8.js","./nav-footer-BwkQkwow.js","./toast-editor-BZM5RHph.js"])))=>i.map(i=>d[i]);
2
- import{_ as t}from"./jsoneditor-D95dIAP2.js";import{u as x,j as o,R as v,U as P}from"./app.js";import{r as l}from"./monaco-ICtx6xoc.js";import"./vendor-wzZzN_Jv.js";import"./handsontable-PVakPtJV.js";const L=(i,n,_)=>{const r=i[n];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((p,m)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(m.bind(null,new Error("Unknown variable dynamic import: "+n+(n.split("/").length!==_?". Note that variables only represent file names one level deep.":""))))})};function V(){const i=x(),[n,_]=l.useState(null),[r,p]=l.useState(null),m=i.props.controls,c=async()=>{const{component:s,props:a}=m[0],E=(await L(Object.assign({"../components/VanillaJSONEditor.tsx":()=>t(()=>import("./app.js").then(e=>e.bM),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/add-form.tsx":()=>t(()=>import("./add-form-CGa9QbwE.js"),__vite__mapDeps([6,0,1,2,3,4,5,7,8,9,10,11]),import.meta.url),"../components/add-group-form.tsx":()=>t(()=>import("./add-group-form-BNmpvW8K.js"),__vite__mapDeps([12,0,1,2,3,4,5,7]),import.meta.url),"../components/add-user-form.tsx":()=>t(()=>import("./add-user-form-DrclnTOd.js"),__vite__mapDeps([13,0,1,2,3,4,5,7,11,14]),import.meta.url),"../components/app-shell.tsx":()=>t(()=>import("./app-shell-CHEYhVco.js"),__vite__mapDeps([15,0,1,2,3,4,5]),import.meta.url),"../components/app-sidebar-header.tsx":()=>t(()=>import("./app-sidebar-header-DdM1EOrb.js").then(e=>e.a),__vite__mapDeps([16,0,1,2,3,4,5,17,18,19,20,21,7,14]),import.meta.url),"../components/app-sidebar.tsx":()=>t(()=>import("./app-sidebar-DeF8WNmW.js"),__vite__mapDeps([22,0,1,2,3,4,5,23,14]),import.meta.url),"../components/breadcrumbs.tsx":()=>t(()=>import("./breadcrumbs-C439DWrC.js"),__vite__mapDeps([17,0,1,2,3,4,5]),import.meta.url),"../components/date-picker.tsx":()=>t(()=>import("./date-picker-DbJ8nHp5.js"),__vite__mapDeps([24,0,1,2,3,4,5]),import.meta.url),"../components/dynamic-controls.tsx":()=>t(()=>import("./dynamic-controls-BOYmRX_z.js"),__vite__mapDeps([9,0,1,2,3,4,5]),import.meta.url),"../components/field-renderer.tsx":()=>t(()=>import("./field-renderer-4obZ_jUo.js").then(e=>e.f),__vite__mapDeps([8,1,2,0,3,4,5,9,10]),import.meta.url),"../components/form.tsx":()=>t(()=>import("./form-oUlsuu7h.js"),__vite__mapDeps([25,0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url),"../components/geo-json.tsx":()=>t(()=>import("./geo-json-CadjdhwW.js"),__vite__mapDeps([26,0,1,2,3,4,5]),import.meta.url),"../components/handsontable.tsx":()=>t(()=>import("./app.js").then(e=>e.bN),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/icon.tsx":()=>t(()=>import("./icon-DM49pZW3.js"),__vite__mapDeps([7,0,1,2,3,4,5]),import.meta.url),"../components/input-error.tsx":()=>t(()=>import("./input-error--IOnWghB.js"),__vite__mapDeps([11,0,1,2,3,4,5]),import.meta.url),"../components/list-table.tsx":()=>t(()=>import("./list-table-Byzv346I.js"),__vite__mapDeps([27,0,1,2,3,4,5,7,14,28,29]),import.meta.url),"../components/material-icon.tsx":()=>t(()=>import("./material-icon-BedgD2NE.js"),__vite__mapDeps([14,0,1,2,3,4,5]),import.meta.url),"../components/monaco-editor.tsx":()=>t(()=>import("./app.js").then(e=>e.bO),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/multi-select.tsx":()=>t(()=>import("./app.js").then(e=>e.bP),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/nav-footer.tsx":()=>t(()=>import("./nav-footer-BwkQkwow.js"),__vite__mapDeps([30,0,1,2,3,4,5,7]),import.meta.url),"../components/nav-main.tsx":()=>t(()=>import("./nav-main-9Eb_A0rf.js"),__vite__mapDeps([23,0,1,2,3,4,5,14]),import.meta.url),"../components/nav-user.tsx":()=>t(()=>import("./nav-user-CRAfyE-x.js"),__vite__mapDeps([18,0,1,2,3,4,5,19,20]),import.meta.url),"../components/pagination-render.tsx":()=>t(()=>import("./pagination-render-xsEktzA8.js"),__vite__mapDeps([29,0,1,2,3,4,5]),import.meta.url),"../components/theme-switcher.tsx":()=>t(()=>import("./theme-switcher-CKiJbMkh.js"),__vite__mapDeps([21,0,1,2,3,4,5,7]),import.meta.url),"../components/toast-editor.tsx":()=>t(()=>import("./toast-editor-BZM5RHph.js"),__vite__mapDeps([31,0,1,2,3,4,5]),import.meta.url),"../components/user-info.tsx":()=>t(()=>import("./user-info-CcYdmjMZ.js"),__vite__mapDeps([19,0,1,2,3,4,5]),import.meta.url),"../components/user-menu-content.tsx":()=>t(()=>import("./user-menu-content-DbUk8ZeY.js"),__vite__mapDeps([20,0,1,2,3,4,5,19]),import.meta.url)}),`../components/${s}.tsx`,3)).default;_(o.jsx(E,{...a}))},d=async()=>{const{component:s}=m[1],u=(await import(s)).default;p(o.jsx(u,{message:"Hello from Component B"}))};return o.jsxs(o.Fragment,{children:[o.jsx(v,{title:"Home"}),o.jsx("div",{children:o.jsx(P,{href:"/page",children:"Page"})}),o.jsx("div",{children:o.jsx("h1",{children:"Is Home"})}),o.jsxs("div",{children:[o.jsx("button",{onClick:c,children:"Загрузить компонент"}),o.jsx("p",{}),n||o.jsx("p",{children:"Нажмите кнопку, чтобы загрузить компонент"})]}),o.jsx("p",{}),o.jsxs("div",{children:[o.jsx("button",{onClick:d,children:"Загрузить компонент"}),o.jsx("p",{}),r||o.jsx("p",{children:"Нажмите кнопку, чтобы загрузить компонент"})]})]})}export{V as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app.js","./jsoneditor-D95dIAP2.js","./vendor-wzZzN_Jv.js","./monaco-ICtx6xoc.js","./handsontable-PVakPtJV.js","./app-D8oqdt8J.css","./add-form-CGa9QbwE.js","./icon-DM49pZW3.js","./field-renderer-4obZ_jUo.js","./dynamic-controls-BOYmRX_z.js","./field-renderer-CRNLShJD.css","./input-error--IOnWghB.js","./add-group-form-BNmpvW8K.js","./add-user-form-DrclnTOd.js","./material-icon-BedgD2NE.js","./app-shell-CHEYhVco.js","./app-sidebar-header-DdM1EOrb.js","./breadcrumbs-C439DWrC.js","./nav-user-CRAfyE-x.js","./user-info-CcYdmjMZ.js","./user-menu-content-DbUk8ZeY.js","./theme-switcher-CKiJbMkh.js","./app-sidebar-DeF8WNmW.js","./nav-main-9Eb_A0rf.js","./date-picker-DbJ8nHp5.js","./form-DmBOE8Za.js","./geo-json-CadjdhwW.js","./list-table-Byzv346I.js","./del-modal-_b3CSNHb.js","./pagination-render-xsEktzA8.js","./nav-footer-BwkQkwow.js","./toast-editor-BZM5RHph.js"])))=>i.map(i=>d[i]);
2
+ import{_ as t}from"./jsoneditor-D95dIAP2.js";import{u as x,j as o,R as v,U as P}from"./app.js";import{r as l}from"./monaco-ICtx6xoc.js";import"./vendor-wzZzN_Jv.js";import"./handsontable-PVakPtJV.js";const L=(i,n,_)=>{const r=i[n];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((p,m)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(m.bind(null,new Error("Unknown variable dynamic import: "+n+(n.split("/").length!==_?". Note that variables only represent file names one level deep.":""))))})};function V(){const i=x(),[n,_]=l.useState(null),[r,p]=l.useState(null),m=i.props.controls,c=async()=>{const{component:s,props:a}=m[0],E=(await L(Object.assign({"../components/VanillaJSONEditor.tsx":()=>t(()=>import("./app.js").then(e=>e.bM),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/add-form.tsx":()=>t(()=>import("./add-form-CGa9QbwE.js"),__vite__mapDeps([6,0,1,2,3,4,5,7,8,9,10,11]),import.meta.url),"../components/add-group-form.tsx":()=>t(()=>import("./add-group-form-BNmpvW8K.js"),__vite__mapDeps([12,0,1,2,3,4,5,7]),import.meta.url),"../components/add-user-form.tsx":()=>t(()=>import("./add-user-form-DrclnTOd.js"),__vite__mapDeps([13,0,1,2,3,4,5,7,11,14]),import.meta.url),"../components/app-shell.tsx":()=>t(()=>import("./app-shell-CHEYhVco.js"),__vite__mapDeps([15,0,1,2,3,4,5]),import.meta.url),"../components/app-sidebar-header.tsx":()=>t(()=>import("./app-sidebar-header-DdM1EOrb.js").then(e=>e.a),__vite__mapDeps([16,0,1,2,3,4,5,17,18,19,20,21,7,14]),import.meta.url),"../components/app-sidebar.tsx":()=>t(()=>import("./app-sidebar-DeF8WNmW.js"),__vite__mapDeps([22,0,1,2,3,4,5,23,14]),import.meta.url),"../components/breadcrumbs.tsx":()=>t(()=>import("./breadcrumbs-C439DWrC.js"),__vite__mapDeps([17,0,1,2,3,4,5]),import.meta.url),"../components/date-picker.tsx":()=>t(()=>import("./date-picker-DbJ8nHp5.js"),__vite__mapDeps([24,0,1,2,3,4,5]),import.meta.url),"../components/dynamic-controls.tsx":()=>t(()=>import("./dynamic-controls-BOYmRX_z.js"),__vite__mapDeps([9,0,1,2,3,4,5]),import.meta.url),"../components/field-renderer.tsx":()=>t(()=>import("./field-renderer-4obZ_jUo.js").then(e=>e.f),__vite__mapDeps([8,1,2,0,3,4,5,9,10]),import.meta.url),"../components/form.tsx":()=>t(()=>import("./form-DmBOE8Za.js"),__vite__mapDeps([25,0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url),"../components/geo-json.tsx":()=>t(()=>import("./geo-json-CadjdhwW.js"),__vite__mapDeps([26,0,1,2,3,4,5]),import.meta.url),"../components/handsontable.tsx":()=>t(()=>import("./app.js").then(e=>e.bN),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/icon.tsx":()=>t(()=>import("./icon-DM49pZW3.js"),__vite__mapDeps([7,0,1,2,3,4,5]),import.meta.url),"../components/input-error.tsx":()=>t(()=>import("./input-error--IOnWghB.js"),__vite__mapDeps([11,0,1,2,3,4,5]),import.meta.url),"../components/list-table.tsx":()=>t(()=>import("./list-table-Byzv346I.js"),__vite__mapDeps([27,0,1,2,3,4,5,7,14,28,29]),import.meta.url),"../components/material-icon.tsx":()=>t(()=>import("./material-icon-BedgD2NE.js"),__vite__mapDeps([14,0,1,2,3,4,5]),import.meta.url),"../components/monaco-editor.tsx":()=>t(()=>import("./app.js").then(e=>e.bO),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/multi-select.tsx":()=>t(()=>import("./app.js").then(e=>e.bP),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/nav-footer.tsx":()=>t(()=>import("./nav-footer-BwkQkwow.js"),__vite__mapDeps([30,0,1,2,3,4,5,7]),import.meta.url),"../components/nav-main.tsx":()=>t(()=>import("./nav-main-9Eb_A0rf.js"),__vite__mapDeps([23,0,1,2,3,4,5,14]),import.meta.url),"../components/nav-user.tsx":()=>t(()=>import("./nav-user-CRAfyE-x.js"),__vite__mapDeps([18,0,1,2,3,4,5,19,20]),import.meta.url),"../components/pagination-render.tsx":()=>t(()=>import("./pagination-render-xsEktzA8.js"),__vite__mapDeps([29,0,1,2,3,4,5]),import.meta.url),"../components/theme-switcher.tsx":()=>t(()=>import("./theme-switcher-CKiJbMkh.js"),__vite__mapDeps([21,0,1,2,3,4,5,7]),import.meta.url),"../components/toast-editor.tsx":()=>t(()=>import("./toast-editor-BZM5RHph.js"),__vite__mapDeps([31,0,1,2,3,4,5]),import.meta.url),"../components/user-info.tsx":()=>t(()=>import("./user-info-CcYdmjMZ.js"),__vite__mapDeps([19,0,1,2,3,4,5]),import.meta.url),"../components/user-menu-content.tsx":()=>t(()=>import("./user-menu-content-DbUk8ZeY.js"),__vite__mapDeps([20,0,1,2,3,4,5,19]),import.meta.url)}),`../components/${s}.tsx`,3)).default;_(o.jsx(E,{...a}))},d=async()=>{const{component:s}=m[1],u=(await import(s)).default;p(o.jsx(u,{message:"Hello from Component B"}))};return o.jsxs(o.Fragment,{children:[o.jsx(v,{title:"Home"}),o.jsx("div",{children:o.jsx(P,{href:"/page",children:"Page"})}),o.jsx("div",{children:o.jsx("h1",{children:"Is Home"})}),o.jsxs("div",{children:[o.jsx("button",{onClick:c,children:"Загрузить компонент"}),o.jsx("p",{}),n||o.jsx("p",{children:"Нажмите кнопку, чтобы загрузить компонент"})]}),o.jsx("p",{}),o.jsxs("div",{children:[o.jsx("button",{onClick:d,children:"Загрузить компонент"}),o.jsx("p",{}),r||o.jsx("p",{children:"Нажмите кнопку, чтобы загрузить компонент"})]})]})}export{V as default};
@@ -301,7 +301,7 @@
301
301
  ]
302
302
  },
303
303
  "src/assets/js/components/form.tsx": {
304
- "file": "form-oUlsuu7h.js",
304
+ "file": "form-DmBOE8Za.js",
305
305
  "name": "form",
306
306
  "src": "src/assets/js/components/form.tsx",
307
307
  "isDynamicEntry": true,
@@ -660,7 +660,7 @@
660
660
  ]
661
661
  },
662
662
  "src/assets/js/pages/form.tsx": {
663
- "file": "form-Bte5kzjB.js",
663
+ "file": "form-qyuRZEIC.js",
664
664
  "name": "form",
665
665
  "src": "src/assets/js/pages/form.tsx",
666
666
  "isDynamicEntry": true,
@@ -690,7 +690,7 @@
690
690
  ]
691
691
  },
692
692
  "src/assets/js/pages/home.tsx": {
693
- "file": "home-CsUXA-O6.js",
693
+ "file": "home-DxhSEMhE.js",
694
694
  "name": "home",
695
695
  "src": "src/assets/js/pages/home.tsx",
696
696
  "isDynamicEntry": true,
package/index.d.ts CHANGED
@@ -17,6 +17,7 @@ export * from "./interfaces/MaaterialIcons";
17
17
  export * from "./lib/model/AbstractModel";
18
18
  export * from "./lib/model/adapter/waterline";
19
19
  export * from "./lib/model/adapter/sequelize";
20
+ export * from "./lib/media-manager/AbstractMediaManager";
20
21
  export * from "./lib/Adminizer";
21
22
  export * from "./models/GroupAP";
22
23
  export * from "./models/UserAP";
package/index.js CHANGED
@@ -17,6 +17,7 @@ export * from "./interfaces/MaaterialIcons";
17
17
  export * from "./lib/model/AbstractModel";
18
18
  export * from "./lib/model/adapter/waterline";
19
19
  export * from "./lib/model/adapter/sequelize";
20
+ export * from "./lib/media-manager/AbstractMediaManager";
20
21
  export * from "./lib/Adminizer";
21
22
  export * from "./models/GroupAP";
22
23
  export * from "./models/UserAP";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adminizer",
3
3
  "type": "module",
4
- "version": "4.3.0-build.101",
4
+ "version": "4.3.0-build.103",
5
5
  "main": "index.js",
6
6
  "exports": {
7
7
  ".": "./index.js",
@@ -72,6 +72,7 @@
72
72
  "typeorm": "^0.3.20",
73
73
  "uuid": "^11.0.5",
74
74
  "waterline": "^0.15.2",
75
+ "sequelize": "^6.37.7",
75
76
  "winston": "^3.17.0"
76
77
  },
77
78
  "devDependencies": {
@@ -1 +0,0 @@
1
- import{u as v,V as y,bw as m,j as e,B as p,bx as i,L as c,by as l}from"./app.js";import{r as d}from"./monaco-ICtx6xoc.js";import{LabelRenderer as x,LazyField as F}from"./add-form-CGa9QbwE.js";import g from"./input-error--IOnWghB.js";import{F as w}from"./field-renderer-4obZ_jUo.js";import"./jsoneditor-D95dIAP2.js";import"./vendor-wzZzN_Jv.js";import"./handsontable-PVakPtJV.js";import"./icon-DM49pZW3.js";import"./dynamic-controls-BOYmRX_z.js";const B=()=>{const r=v(),{fields:t}=r.props,{data:o,setData:u,post:h,processing:a}=y(Object.fromEntries(t.map(s=>[s.name,s.value??void 0])));d.useEffect(()=>(m(),()=>{m()}),[]);const n=d.useCallback((s,b)=>{u(s,b)},[]),j=s=>{s.preventDefault(),h(r.props.postLink)};return e.jsxs("div",{className:"p-4 w-full",children:[e.jsx("div",{className:"w-full sticky z-[1001] py-4 pb-8 top-0 h-fit bg-background flex gap-4 lg:hidden",children:e.jsxs(p,{variant:"green",type:"submit",className:"w-fit",form:"addUserForm",disabled:a||i(),children:[a&&e.jsx(c,{className:"h-4 w-4 animate-spin"}),r.props.btnSave.title]})}),e.jsx("form",{className:"mt-8",id:"addUserForm",onSubmit:j,children:e.jsxs("div",{className:"grid lg:grid-cols-[1fr_150px] gap-4 max-w-[1144px] pb-8",children:[e.jsx("div",{className:"flex flex-col gap-10",children:t.map(s=>e.jsx("div",{className:"grid gap-4 w-full",children:s.type==="markdown"||s.type==="table"||s.type==="jsonEditor"||s.type==="codeEditor"||s.type==="geoJson"?e.jsxs(e.Fragment,{children:[e.jsx(x,{field:s}),e.jsx(g,{message:l(`${s.type}-${s.name}`)}),e.jsx(F,{field:s,value:o[s.name],onChange:n,processing:a})]}):e.jsxs(e.Fragment,{children:[e.jsx(x,{field:s}),e.jsx(g,{message:l(`${s.type}-${s.name}`)}),e.jsx(w,{field:s,value:o[s.name],onChange:n,processing:a})]})},s.name))}),e.jsx("div",{className:"p-4 rounded-md h-fit sticky top-[84px] shadow hidden lg:block",children:e.jsxs(p,{variant:"green",type:"submit",className:"w-fit",disabled:a||i(),children:[a&&e.jsx(c,{className:"h-4 w-4 animate-spin"}),r.props.btnSave.title]})})]})})]})};export{B as default};