@opengis/widgets 0.0.12 → 0.0.13
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/components.d.ts +3 -0
- package/dist/components.d.ts.map +1 -0
- package/dist/index.d.ts +1 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +910 -821
- package/dist/index.umd.cjs +27 -27
- package/dist/types/index.d.ts +8 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/widgets/card/Card.vue.d.ts +5 -0
- package/dist/widgets/card/Card.vue.d.ts.map +1 -1
- package/dist/widgets/files/FilesWidget.vue.d.ts +5 -2
- package/dist/widgets/files/FilesWidget.vue.d.ts.map +1 -1
- package/dist/widgets/history/HistoryWidget.vue.d.ts +1 -1
- package/dist/widgets/history/HistoryWidget.vue.d.ts.map +1 -1
- package/dist/widgets/map/MapWidget.vue.d.ts +2 -4
- package/dist/widgets/map/MapWidget.vue.d.ts.map +1 -1
- package/package.json +3 -2
package/dist/index.umd.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(E,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(E=typeof globalThis<"u"?globalThis:E||self,e(E.WidgetLib={},E.Vue))})(this,function(E,e){"use strict";/**
|
|
2
2
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const
|
|
6
|
+
*/const W=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),v=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,s,t)=>t?t.toUpperCase():s.toLowerCase()),ee=a=>{const l=v(a);return l.charAt(0).toUpperCase()+l.slice(1)},te=(...a)=>a.filter((l,s,t)=>!!l&&l.trim()!==""&&t.indexOf(l)===s).join(" ").trim();/**
|
|
7
7
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
@@ -13,124 +13,124 @@
|
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const oe=({size:
|
|
16
|
+
*/const oe=({size:a,strokeWidth:l=2,absoluteStrokeWidth:s,color:t,iconNode:o,name:g,class:n,...m},{slots:h})=>e.h("svg",{...D,width:a||D.width,height:a||D.height,stroke:t||D.stroke,"stroke-width":s?Number(l)*24/Number(a):l,class:te("lucide",...g?[`lucide-${W(ee(g))}-icon`,`lucide-${W(g)}`]:["lucide-icon"]),...m},[...o.map(p=>e.h(...p)),...h.default?[h.default()]:[]]);/**
|
|
17
17
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const
|
|
21
|
+
*/const u=(a,l)=>(s,{slots:t})=>e.h(oe,{...s,iconNode:l,name:a},t);/**
|
|
22
22
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const ne=
|
|
26
|
+
*/const ne=u("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
|
|
27
27
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const
|
|
31
|
+
*/const se=u("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
32
32
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const
|
|
36
|
+
*/const le=u("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
37
37
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
40
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const
|
|
41
|
+
*/const A=u("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);/**
|
|
42
42
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const
|
|
46
|
+
*/const ae=u("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
47
47
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the ISC license.
|
|
50
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const
|
|
51
|
+
*/const $=u("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
52
52
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const
|
|
56
|
+
*/const re=u("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
|
|
57
57
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const ie=
|
|
61
|
+
*/const ie=u("grid-3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
62
62
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const ce=
|
|
66
|
+
*/const ce=u("heart",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]);/**
|
|
67
67
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
68
68
|
*
|
|
69
69
|
* This source code is licensed under the ISC license.
|
|
70
70
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const de=
|
|
71
|
+
*/const de=u("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
72
72
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
73
73
|
*
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const
|
|
76
|
+
*/const q=u("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
77
77
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const me=
|
|
81
|
+
*/const me=u("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
82
82
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const pe=
|
|
86
|
+
*/const pe=u("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
87
87
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const fe=
|
|
91
|
+
*/const fe=u("reply",[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]]);/**
|
|
92
92
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
96
|
+
*/const G=u("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
97
97
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const ge=
|
|
101
|
+
*/const ge=u("share",[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]]);/**
|
|
102
102
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const he=
|
|
106
|
+
*/const he=u("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);/**
|
|
107
107
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
108
108
|
*
|
|
109
109
|
* This source code is licensed under the ISC license.
|
|
110
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const ye=
|
|
111
|
+
*/const ye=u("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
|
|
112
112
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
116
|
+
*/const O=u("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);/**
|
|
117
117
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
120
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const ke=
|
|
121
|
+
*/const ke=u("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);/**
|
|
122
122
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const
|
|
126
|
+
*/const R=u("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
127
127
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const be=
|
|
131
|
+
*/const be=u("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
|
|
132
132
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
133
133
|
*
|
|
134
134
|
* This source code is licensed under the ISC license.
|
|
135
135
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const S=y("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),xe={class:"border-t pt-3 mt-4"},ue={class:"flex gap-2"},we={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},_e={class:"flex-1 space-y-2"},Ve={class:"flex justify-between items-center"},Ee={class:"flex gap-2"},Ne=["disabled"],q=e.defineComponent({__name:"CommentInputZone",props:{isReply:{type:Boolean,required:!1,default:!1},isReplyModifiers:{}},emits:e.mergeModels(["sendComment"],["update:isReply"]),setup(s,{emit:l}){const n=e.useModel(s,"isReply"),t=e.ref(""),o=l,g=()=>{t.value.trim()&&(o("sendComment",t.value),t.value="")},d=p=>{(p.ctrlKey||p.metaKey)&&p.key==="Enter"&&(p.preventDefault(),g())};return(p,c)=>(e.openBlock(),e.createElementBlock("div",xe,[e.createElementVNode("div",ue,[e.createElementVNode("span",we,[e.createVNode(e.unref(F),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",_e,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":c[0]||(c[0]=m=>t.value=m),onKeydown:d,placeholder:"Add a comment...",class:"w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"},null,544),[[e.vModelText,t.value]]),e.createElementVNode("div",Ve,[c[4]||(c[4]=e.createElementVNode("span",{class:"text-xs text-gray-500 hidden sm:inline"},"Cmd+Enter to send",-1)),e.createElementVNode("div",Ee,[n.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:c[1]||(c[1]=m=>n.value=!1)},[e.createVNode(e.unref(S),{class:"h-3 w-3"}),c[2]||(c[2]=e.createTextVNode(" Cancel ",-1))])):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",disabled:!t.value.trim(),onClick:g},[e.createVNode(e.unref(P),{class:"h-3 w-3 mr-1"}),c[3]||(c[3]=e.createTextVNode(" Send ",-1))],8,Ne)])])])])]))}}),Be={class:"z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md w-32 outline-none pointer-events-auto"},Ce=e.defineComponent({__name:"CommentDetails",props:{showMoreOptions:{type:Boolean,required:!0,default:!1},showMoreOptionsModifiers:{}},emits:e.mergeModels(["edit","delete"],["update:showMoreOptions"]),setup(s,{emit:l}){const n=l,t=e.useModel(s,"showMoreOptions"),o=e.ref(),g=e.ref(!0),d=async m=>{t.value&&o.value&&!o.value.contains(m.target)&&!g.value&&(t.value=!1),g.value=!1},p=()=>{t.value=!1,n("edit")},c=()=>{t.value=!1,n("delete")};return e.onMounted(()=>{document.addEventListener("click",d)}),e.onUnmounted(()=>{document.removeEventListener("click",d)}),(m,r)=>(e.openBlock(),e.createElementBlock("div",{class:"absolute bg-white left-0 top-full transform min-w-max z-50",ref_key:"moreOptionsRef",ref:o},[e.createElementVNode("div",Be,[e.createElementVNode("div",{class:"relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs hover:bg-gray-100 transition-colors duration-300",onClick:p},[e.createVNode(e.unref(ye),{class:"h-3 w-3 mr-2"}),r[0]||(r[0]=e.createTextVNode(" Edit ",-1))]),e.createElementVNode("div",{class:"relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs text-red-600 hover:bg-gray-100 transition-colors duration-300",onClick:c},[e.createVNode(e.unref(T),{class:"h-3 w-3 mr-2"}),r[1]||(r[1]=e.createTextVNode(" Delete ",-1))])])],512))}}),$e={class:"space-y-2"},Me={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},De={class:"flex-1 min-w-0 space-y-1 relative"},Le={class:"flex items-center gap-2"},Se={class:"font-medium text-xs"},ze={class:"text-xs text-gray-500"},Te={key:0,class:"text-xs text-gray-700 leading-relaxed"},Fe={class:"flex justify-between text-xs"},je={class:"flex items-center gap-2"},Ie={key:0,class:"flex gap-2"},Ae=["disabled"],He={key:0,class:"ml-8 space-y-1 border-l-2 border-gray-100 pl-3"},Oe=e.defineComponent({__name:"CommentItem",props:{comment:{},isInside:{type:Boolean}},emits:["like","reply","edit","delete"],setup(s,{emit:l}){const n=l,t=s,o=e.ref(t.comment.text),g=e.ref("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"),d=e.ref("w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"),p=e.ref(!1),c=e.ref(!1),m=e.ref(!1),r=e.ref(!1),f=a=>{const i=new Date,b=Math.floor((i.getTime()-a.getTime())/(1e3*60*60));return b<1?`${Math.floor((i.getTime()-a.getTime())/6e4)}m`:b<24?`${b}h`:`${Math.floor(b/24)}d`},w=()=>{r.value=!r.value,r.value?n("like",t.comment.id,"add"):n("like",t.comment.id,"delete")},_=()=>{n("edit",t.comment.id,o.value),m.value=!1},N=(a,i)=>{n("like",a,i)},k=(a,i)=>{n("edit",a,i)};return(a,i)=>{const b=e.resolveComponent("CommentItem",!0);return e.openBlock(),e.createElementBlock("div",$e,[e.createElementVNode("div",{class:e.normalizeClass(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative",m.value?"bg-gray-50":""])},[e.createElementVNode("span",Me,[e.createVNode(e.unref(F),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",De,[e.createElementVNode("div",Le,[e.createElementVNode("span",Se,e.toDisplayString(a.comment?.author),1),e.createElementVNode("span",ze,e.toDisplayString(f(a.comment?.createdAt)),1)]),m.value?e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,"onUpdate:modelValue":i[0]||(i[0]=h=>o.value=h),class:e.normalizeClass(m.value?d.value:g.value)},null,2)),[[e.vModelText,o.value]]):(e.openBlock(),e.createElementBlock("p",Te,e.toDisplayString(a.comment?.text),1)),e.createElementVNode("div",Fe,[e.createElementVNode("div",je,[e.createElementVNode("button",{class:e.normalizeClass(["flex items-center gap-1",r.value?"text-blue-600":"text-gray-500 hover:text-blue-600 transition-colors"]),onClick:i[1]||(i[1]=h=>w())},[e.createVNode(e.unref(ce),{class:e.normalizeClass(["h-3 w-3",r.value?"fill-blue-600":""])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(a.comment?.likes),1)],2),a.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"text-gray-500 hover:text-blue-600 transition-colors",onClick:i[2]||(i[2]=h=>c.value=!0)},[e.createVNode(e.unref(fe),{class:"h-3 w-3"})])),e.createElementVNode("button",{class:"text-gray-400 hover:text-gray-600 transition-colors opacity-0 group-hover:opacity-100",type:"button",onClick:i[3]||(i[3]=h=>p.value=!0)},[e.createVNode(e.unref(re),{class:"h-3 w-3"})])]),m.value?(e.openBlock(),e.createElementBlock("div",Ie,[e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:i[4]||(i[4]=h=>m.value=!1)},[e.createVNode(e.unref(S),{class:"h-3 w-3"}),i[11]||(i[11]=e.createTextVNode(" Cancel ",-1))]),e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",disabled:!o.value.trim(),onClick:i[5]||(i[5]=h=>_())},[e.createVNode(e.unref(P),{class:"h-3 w-3 mr-1"}),i[12]||(i[12]=e.createTextVNode(" Send ",-1))],8,Ae)])):e.createCommentVNode("",!0)])]),p.value?(e.openBlock(),e.createBlock(Ce,{key:0,showMoreOptions:p.value,"onUpdate:showMoreOptions":i[6]||(i[6]=h=>p.value=h),onEdit:i[7]||(i[7]=h=>m.value=!0),onDelete:i[8]||(i[8]=h=>a.$emit("delete",a.comment?.id)),comment:a.comment},null,8,["showMoreOptions","comment"])):e.createCommentVNode("",!0)],2),a.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.comment?.replies,h=>(e.openBlock(),e.createBlock(b,{key:h.id,comment:h,isInside:!0,onDelete:u=>a.$emit("delete",h.id),onLike:N,onEdit:k},null,8,["comment","onDelete"]))),128)),c.value&&!a.isInside?(e.openBlock(),e.createBlock(q,{key:0,onSendComment:i[9]||(i[9]=h=>a.$emit("reply",a.comment?.id,h)),isReply:c.value,"onUpdate:isReply":i[10]||(i[10]=h=>c.value=h)},null,8,["isReply"])):e.createCommentVNode("",!0)]))])}}}),Re=["id"],Ue={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},j=e.defineComponent({__name:"CommentsWidget",props:{title:{},comments:{},maxHeight:{},onAddComment:{type:Function},onReply:{type:Function},onLike:{type:Function},onDelete:{type:Function},onEdit:{type:Function},id:{},className:{},style:{}},emits:["add","reply","like","delete","edit"],setup(s,{emit:l}){const n=s,t=l,o=m=>{n?.onAddComment?.(m),t("add",m)},g=(m,r)=>{n?.onLike?.(m,r),t("like",m,r)},d=(m,r)=>{n.onReply?.(m,r),t("reply",m,r)},p=(m,r)=>{n.onEdit?.(m,r),t("edit",m,r)},c=m=>{n.onDelete?.(m),t("delete",m)};return(m,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mx-auto font-sans",m.className]),id:m.id,style:e.normalizeStyle(m.style)},[m.title?(e.openBlock(),e.createElementBlock("h3",Ue,e.toDisplayString(m.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([m.maxHeight?"overflow-y-auto":"","space-y-3"]),style:e.normalizeStyle({maxHeight:m.maxHeight+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.comments,f=>(e.openBlock(),e.createBlock(Oe,{key:f.id,comment:f,onReply:d,onLike:g,onDelete:r[0]||(r[0]=w=>c(w)),onEdit:p},null,8,["comment"]))),128))],6),e.createVNode(q,{onSendComment:r[1]||(r[1]=f=>o(f))})],14,Re))}}),G=new Map([["file",{name:"File",color:"bg-green-100 text-green-700 border-green-200",icon:E}],["post",{name:"Post",color:"bg-blue-100 text-blue-700 border-blue-200",icon:he}],["user",{name:"User",color:"bg-purple-100 text-purple-700 border-purple-200",icon:ke}],["custom",{name:"Custom",color:"bg-gray-100 text-gray-700 border-gray-200",icon:de}]]),We={class:"mx-auto font-sans"},Pe={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},qe={class:"relative"},Ge={class:"space-y-3"},Ke={class:"flex-1 min-w-0 pb-2"},Ze={class:"flex items-center gap-1.5 mb-1 mt-0.5"},Je={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Xe={class:"font-medium text-xs"},Qe={class:"text-xs text-gray-500"},Ye={class:"space-y-1"},ve={class:"text-xs text-gray-700"},et={class:"capitalize mr-1"},tt={key:0,class:"inline-flex items-center rounded-full border py-0.5 font-semibold transition-colors text-foreground text-xs h-4 px-1 capitalize"},ot={key:0,class:"flex items-center gap-1 text-xs"},nt={key:0,class:"bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"},lt={key:2,class:"bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"},I=e.defineComponent({__name:"HistoryWidget",props:{data:{},title:{},maxHeight:{},id:{},className:{},style:{}},setup(s){return(l,n)=>(e.openBlock(),e.createElementBlock("div",We,[l.title?(e.openBlock(),e.createElementBlock("h3",Pe,e.toDisplayString(l.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(l.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:l.maxHeight+"px"})},[e.createElementVNode("div",qe,[n[0]||(n[0]=e.createElementVNode("div",{class:"absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200"},null,-1)),e.createElementVNode("div",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.data,t=>(e.openBlock(),e.createElementBlock("div",{class:"relative flex items-start gap-2",key:t?.id},[e.createElementVNode("div",{class:e.normalizeClass(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${e.unref(G).get(t?.entityType)?.color}`)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(G).get(t?.entityType)?.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",Ke,[e.createElementVNode("div",Ze,[e.createElementVNode("span",Je,[e.createVNode(e.unref(F),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("span",Xe,e.toDisplayString(t?.userName),1),e.createElementVNode("span",Qe,e.toDisplayString(t?.timestamp.toLocaleTimeString("ua-UA",{hour:"2-digit",minute:"2-digit"})),1)]),e.createElementVNode("div",Ye,[e.createElementVNode("div",ve,[e.createElementVNode("span",et,e.toDisplayString(t?.action),1),t?.entityId?(e.openBlock(),e.createElementBlock("span",tt,e.toDisplayString(t?.entityId),1)):e.createCommentVNode("",!0)]),t?.changes?.[t?.entityId]?(e.openBlock(),e.createElementBlock("div",ot,[t?.changes?.[t?.entityId]?.old?(e.openBlock(),e.createElementBlock("span",nt,e.toDisplayString(t?.changes?.[t?.entityId]?.old),1)):e.createCommentVNode("",!0),t?.changes?.[t?.entityId]?.old&&t?.changes?.[t?.entityId]?.new?(e.openBlock(),e.createBlock(e.unref(le),{key:1,class:"h-2 w-2 text-gray-400"})):e.createCommentVNode("",!0),t?.changes?.[t?.entityId]?.new?(e.openBlock(),e.createElementBlock("span",lt,e.toDisplayString(t?.changes?.[t?.entityId]?.new),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])]))),128))])])],6)]))}}),st={key:0,class:"text-xl font-semibold"},rt={class:"flex gap-1"},at={class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer"},it=e.defineComponent({__name:"FileHeader",props:e.mergeModels({title:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["onAddFile"],["update:modelValue"]),setup(s){const l=e.useModel(s,"modelValue"),n={active:"bg-blue-100 text-black hover:bg-blue-100",inactive:"bg-white text-black hover:bg-blue-100"};return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",t.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[t.title?(e.openBlock(),e.createElementBlock("h3",st,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",rt,[e.createElementVNode("button",{class:e.normalizeClass(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",l.value==="list"?n.active:n.inactive]),onClick:o[0]||(o[0]=g=>l.value="list")},[e.createVNode(e.unref(me),{class:"h-4 w-4"})],2),e.createElementVNode("button",{class:e.normalizeClass(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",l.value==="grid"?n.active:n.inactive]),onClick:o[1]||(o[1]=g=>l.value="grid")},[e.createVNode(e.unref(ie),{class:"h-4 w-4"})],2),e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:o[2]||(o[2]=g=>t.$emit("onAddFile",g))},null,32),e.createElementVNode("div",at,[e.createVNode(e.unref(pe),{class:"h-4 w-4"}),o[3]||(o[3]=e.createTextVNode(" Додати файл ",-1))])])])],2))}}),K={pdf:{color:"bg-red-100 text-red-700 border-red-200",icon:E,label:"PDF"},sketch:{color:"bg-gray-100 text-gray-700 border-gray-200",icon:ae,label:"SKETCH"},mp4:{color:"bg-purple-100 text-purple-700 border-purple-200",icon:be,label:"VIDEO"},docx:{color:"bg-blue-100 text-blue-700 border-blue-200",icon:E,label:"DOC"},zip:{color:"bg-orange-100 text-orange-700 border-orange-200",icon:ne,label:"ARCHIVE"},png:{color:"bg-green-100 text-green-700 border-green-200",icon:W,label:"IMAGE"},jpg:{color:"bg-green-100 text-green-700 border-green-200",icon:W,label:"IMAGE"},xlsx:{color:"bg-emerald-100 text-emerald-700 border-emerald-200",icon:E,label:"EXCEL"},pptx:{color:"bg-amber-100 text-amber-700 border-amber-200",icon:E,label:"PPT"}};function Z(s,l="en"){const n={month:"short",day:"numeric"};return new Intl.DateTimeFormat(l,n).format(s)}function J(s){if(s===0)return"0 B";const l=1024,n=["B","KB","MB","GB","TB"],t=Math.floor(Math.log(s)/Math.log(l));return`${parseFloat((s/Math.pow(l,t)).toFixed(1))} ${n[t]}`}const ct={class:"space-y-0.5"},dt=["onClick"],mt=["onClick"],pt={class:"flex items-center gap-2"},ft={class:"font-medium text-xs truncate hover:text-blue-600 cursor-pointer"},gt={class:"hidden sm:block text-xs text-gray-500 w-16 text-right"},ht={class:"hidden md:block text-xs text-gray-500 w-12 text-right"},yt={class:"flex items-center gap-1"},kt=["onClick"],bt=["onClick"],xt=e.defineComponent({__name:"FileList",props:{files:{}},emits:["delete","download","openLightbox"],setup(s){return(l,n)=>(e.openBlock(),e.createElementBlock("div",ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.files,t=>(e.openBlock(),e.createElementBlock("div",{class:"flex items-center gap-2 p-1.5 rounded hover:bg-gray-50 group border-b border-gray-100 last:border-b-0",key:t.id,onClick:e.withModifiers(o=>l.$emit("openLightbox",t),["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(["p-1 rounded",e.unref(K)[t?.ext]?.color])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(K)[t?.ext]?.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",{class:"flex-1 min-w-0",onClick:o=>l.$emit("openLightbox",t)},[e.createElementVNode("div",pt,[e.createElementVNode("span",ft,e.toDisplayString(t?.uploaded_name||t?.name),1)])],8,mt),e.createElementVNode("div",gt,e.toDisplayString(e.unref(J)(t.size)),1),e.createElementVNode("div",ht,e.toDisplayString(e.unref(Z)(t.createdAt)),1),e.createElementVNode("div",yt,[e.createElementVNode("button",{onClick:e.withModifiers(o=>l.$emit("download",t),["stop"]),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity"},[e.createVNode(e.unref(z),{class:"h-3 w-3"})],8,kt),e.createElementVNode("button",{class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700",onClick:e.withModifiers(o=>l.$emit("delete",o,t?.file_id),["stop"])},[e.createVNode(e.unref(T),{class:"h-3 w-3"})],8,bt)])],8,dt))),128))]))}}),ut={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3"},wt=["onClick"],_t={class:"space-y-2"},Vt={class:"flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden"},Et=["src"],Nt={class:"space-y-1"},Bt=["title"],Ct={class:"text-xs text-gray-500 text-left"},$t={class:"absolute top-2 right-1 flex items-center gap-1"},Mt=["onClick"],Dt=["onClick"],Lt=e.defineComponent({__name:"FileGrid",props:{files:{}},emits:["delete","download","openLightbox"],setup(s){return(l,n)=>(e.openBlock(),e.createElementBlock("div",ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.files,t=>(e.openBlock(),e.createElementBlock("div",{key:t.id,onClick:e.withModifiers(o=>l.$emit("openLightbox",t),["stop"]),class:"group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"},[e.createElementVNode("div",_t,[e.createElementVNode("div",Vt,[t.ext==="png"||t.ext==="jpg"||t.ext==="jpeg"||t.ext==="gif"||t.ext==="svg"||t.ext==="webp"?(e.openBlock(),e.createElementBlock("img",{key:0,src:`/file/resize?filepath=${t?.file_path}&w=500`,alt:"file",class:"w-full h-full object-cover"},null,8,Et)):(e.openBlock(),e.createBlock(e.unref(E),{key:1,class:"h-10 w-10 text-gray-500"}))]),e.createElementVNode("div",Nt,[e.createElementVNode("h3",{class:"font-medium text-xs leading-tight text-left",title:t.uploaded_name||t.name},e.toDisplayString(t.uploaded_name||t.name),9,Bt),e.createElementVNode("p",Ct,e.toDisplayString(e.unref(Z)(t.createdAt))+", "+e.toDisplayString(e.unref(J)(t.size)),1)])]),e.createElementVNode("div",$t,[e.createElementVNode("button",{onClick:e.withModifiers(o=>l.$emit("download",t),["stop"]),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50"},[e.createVNode(e.unref(z),{class:"h-3 w-3"})],8,Mt),e.createElementVNode("a",{class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700 hover:bg-red-50",onClick:e.withModifiers(o=>l.$emit("delete",o,t?.file_id),["stop"])},[e.createVNode(e.unref(T),{class:"h-3 w-3"})],8,Dt)])],8,wt))),128))]))}}),St={class:"mx-auto font-sans"},zt={key:1},A=e.defineComponent({__name:"FilesWidget",props:{title:{},view:{},files:{},maxHeight:{},onAddFile:{type:Function}},emits:["delete","add","openLightbox"],setup(s,{emit:l}){const n=s,t=e.ref(!1),o=e.ref(null),g=e.ref(!1),d=e.ref(0),p=l,c=(a,i)=>{o.value=i,t.value=!0},m=()=>{o.value&&(_(o.value),o.value=null,t.value=!1)},r=e.computed(()=>Array.isArray(n.files)?n.files.map(a=>a?.file_path):[]),f=a=>{const i=r.value.findIndex(b=>b===a.file_path);i!==-1&&(g.value=!0,d.value=i)},w=a=>{n.onAddFile&&n.onAddFile(a),p("add",a)},_=a=>{p("delete",a)},N=a=>{const i=document.createElement("a");i.setAttribute("download",a?.uploaded_name||a?.name),i.href=a?.file_path||a?.path,i.click()},k=e.ref("list");return(a,i)=>{const b=e.resolveComponent("MessageBox"),h=e.resolveComponent("Lightbox");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",St,[e.createVNode(it,{modelValue:k.value,"onUpdate:modelValue":i[0]||(i[0]=u=>k.value=u),title:n.title,onOnAddFile:i[1]||(i[1]=u=>w(u))},null,8,["modelValue","title"]),n.files.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:a.maxHeight+"px"})},[k.value==="list"?(e.openBlock(),e.createBlock(xt,{key:0,onDelete:c,onDownload:N,onOpenLightbox:i[2]||(i[2]=u=>f(u)),files:n.files},null,8,["files"])):e.createCommentVNode("",!0),k.value==="grid"?(e.openBlock(),e.createBlock(Lt,{key:1,onDelete:c,onDownload:N,onOpenLightbox:i[3]||(i[3]=u=>f(u)),files:n.files},null,8,["files"])):e.createCommentVNode("",!0)],6)):(e.openBlock(),e.createElementBlock("div",zt,i[6]||(i[6]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Файлів не знайдено")],-1)])))]),e.createVNode(b,{modelValue:t.value,"onUpdate:modelValue":i[4]||(i[4]=u=>t.value=u),onConfirm:m,title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати"},null,8,["modelValue"]),e.createVNode(h,{modelValue:g.value,"onUpdate:modelValue":i[5]||(i[5]=u=>g.value=u),images:r.value,"start-index":d.value},null,8,["modelValue","images","start-index"])],64)}}}),Tt=["onClick"],Ft=e.defineComponent({__name:"CopyNotification",setup(s,{expose:l}){const n=e.ref([]);let t=1;const o=()=>{if(n.value.length>=10){const p=n.value[0];clearTimeout(p.timer),n.value.shift()}const d={id:t++,timer:setTimeout(()=>{g(d.id)},1500)};n.value.push(d)},g=d=>{const p=n.value.findIndex(c=>c.id===d);if(p!==-1){const c=n.value[p];clearTimeout(c.timer),n.value.splice(p,1)}};return l({addNotification:o}),e.onUnmounted(()=>{n.value.forEach(d=>{clearTimeout(d.timer)})}),(d,p)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.TransitionGroup,{name:"notification",tag:"div",class:"fixed top-4 right-4 z-50 space-y-2"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createElementBlock("div",{key:c.id,class:"bg-green-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center gap-3 min-w-64 max-w-sm"},[e.createVNode(e.unref(se),{class:"h-5 w-5 text-green-100 flex-shrink-0"}),p[0]||(p[0]=e.createElementVNode("div",{class:"flex-1"},[e.createElementVNode("p",{class:"font-medium text-sm"},"Ссылка скопирована!"),e.createElementVNode("p",{class:"text-xs text-green-100 opacity-90"},"Файл добавлен в буфер обмена")],-1)),e.createElementVNode("button",{onClick:m=>g(c.id),class:"text-green-100 hover:text-white transition-colors flex-shrink-0"},[e.createVNode(e.unref(S),{class:"h-4 w-4"})],8,Tt)]))),128))]),_:1})]))}}),V=(s,l)=>{const n=s.__vccOpts||s;for(const[t,o]of l)n[t]=o;return n},H=V(Ft,[["__scopeId","data-v-55903525"]]),jt={class:"fixed inset-0 z-50 bg-black/80"},It={class:"fixed bg-white left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-200 sm:rounded-lg max-w-4xl max-h-[90vh] p-0"},At={class:"flex flex-col space-y-1.5 text-center sm:text-left p-4 pb-2"},Ht={class:"flex items-center justify-between"},Ot={class:"flex items-center gap-2"},Rt={class:"tracking-tight text-base font-medium"},Ut={class:"p-4 pt-0"},Wt={class:"flex flex-col items-center"},Pt=["src","alt"],qt={class:"mt-3 flex items-center gap-4 text-sm text-gray-600"},Gt={class:"mt-3 flex gap-2"},Kt=e.defineComponent({__name:"GalleryModal",props:{item:{}},emits:["close"],setup(s){const l=e.ref(),n=d=>new Date(d).toLocaleDateString("uk-UA",{day:"2-digit",month:"2-digit",year:"numeric"}),t=d=>d>=1024*1024*1024?(d/(1024*1024*1024)).toFixed(2)+" GB":d>=1024*1024?(d/(1024*1024)).toFixed(2)+" MB":d>=1024?(d/1024).toFixed(2)+" KB":d+" B",o=d=>{navigator.clipboard.writeText(d),l.value?.addNotification()},g=async(d,p)=>{try{const m=await(await fetch(d)).blob(),r=window.URL.createObjectURL(m),f=document.createElement("a");f.href=r,f.download=p,document.body.appendChild(f),f.click(),window.URL.revokeObjectURL(r),document.body.removeChild(f)}catch(c){console.error("Download failed:",c),alert("Download failed. Please try opening the image in a new tab.")}};return(d,p)=>(e.openBlock(),e.createElementBlock("div",jt,[e.createElementVNode("div",It,[e.createElementVNode("div",At,[e.createElementVNode("div",Ht,[e.createElementVNode("div",Ot,[e.createElementVNode("h2",Rt,e.toDisplayString(d.item.name),1)])])]),e.createElementVNode("div",Ut,[e.createElementVNode("div",Wt,[e.createElementVNode("img",{src:d.item.path,alt:d.item.name,class:"max-w-full max-h-[60vh] object-contain rounded border"},null,8,Pt),e.createElementVNode("div",qt,[e.createElementVNode("span",null,"Size: "+e.toDisplayString(t(d.item.size)),1),p[3]||(p[3]=e.createElementVNode("span",null,"•",-1)),e.createElementVNode("span",null,"Date: "+e.toDisplayString(n(d.item.createdAt)),1)]),e.createElementVNode("div",Gt,[e.createElementVNode("button",{onClick:p[0]||(p[0]=c=>g(d.item.path,d.item.name)),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border h-9 rounded-md px-3"},[e.createVNode(e.unref(z),{class:"h-3 w-3 mr-1"}),p[4]||(p[4]=e.createTextVNode(" Download ",-1))]),e.createElementVNode("button",{onClick:p[1]||(p[1]=c=>o(d.item.path)),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border h-9 rounded-md px-3"},[e.createVNode(e.unref(ge),{class:"h-3 w-3 mr-1"}),p[5]||(p[5]=e.createTextVNode(" Share ",-1))])])])]),e.createElementVNode("button",{type:"button",onClick:p[2]||(p[2]=c=>d.$emit("close")),class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},[e.createVNode(e.unref(S),{class:"h-4 w-4"}),p[6]||(p[6]=e.createElementVNode("span",{class:"sr-only"},"Close",-1))])]),e.createVNode(H,{ref_key:"copyNotificationRef",ref:l},null,512)]))}}),Zt={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Jt=["onClick"],Xt=["src","alt"],O=e.defineComponent({__name:"GalleryWidget",props:{title:{},items:{},columns:{},maxHeight:{},id:{},className:{},style:{}},setup(s){const l=s,n=e.ref(!1),t=e.ref(null),o=e.ref(),g=e.ref(0);let d=null;const p=e.computed(()=>{const r=l.columns||4;return g.value>=1440?r:g.value>=1024?Math.max(1,r-1):g.value>=768?Math.max(1,r-2):g.value>=640?Math.max(1,r-3):1}),c=()=>{o.value&&(g.value=o.value.offsetWidth)};e.onMounted(()=>{e.nextTick(()=>{o.value&&(d=new ResizeObserver(r=>{for(const f of r)f.target===o.value&&(g.value=f.contentRect.width)}),d.observe(o.value),c())})}),e.onUnmounted(()=>{d&&d.disconnect()});const m=r=>{t.value=r,n.value=!0};return(r,f)=>(e.openBlock(),e.createElementBlock("div",{class:"w-full mx-auto font-sans",ref_key:"containerRef",ref:o},[r.title?(e.openBlock(),e.createElementBlock("h3",Zt,e.toDisplayString(r.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(r.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:r.maxHeight+"px"})},[e.createElementVNode("div",{style:e.normalizeStyle({columns:p.value+" auto",gap:"12px"}),class:"space-y-3"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.items,w=>(e.openBlock(),e.createElementBlock("div",{key:w.id,onClick:_=>m(w),class:"group relative break-inside-avoid bg-gray-200 rounded-lg overflow-hidden cursor-pointer hover:shadow-md transition-all mb-3"},[e.createElementVNode("img",{src:w.path,alt:w.name,class:"w-full h-auto min-h-40 rounded-md object-contain"},null,8,Xt),f[1]||(f[1]=e.createElementVNode("div",{class:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent p-4 pt-12"},[e.createElementVNode("h3",{class:"text-white font-medium text-base leading-tight mb-1"},"Mountain Landscape"),e.createElementVNode("p",{class:"text-white/90 text-sm"},"2.4 MB")],-1)),f[2]||(f[2]=e.createElementVNode("div",{class:"absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors duration-200"},null,-1))],8,Jt))),128))],4)],6),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[n.value&&t.value?(e.openBlock(),e.createBlock(Kt,{key:0,item:t.value,onClose:f[0]||(f[0]=w=>n.value=!1)},null,8,["item"])):e.createCommentVNode("",!0)]))],512))}}),Qt={key:0,class:"overflow-hidden"},Yt={class:"flex border-b border-gray-200 bg-gray-50"},vt=["onClick"],eo={class:"p-4"},to=["innerHTML"],oo={key:1,class:"p-4"},no={class:"grid grid-cols-12 gap-4"},lo={key:0,class:"mb-4 pb-2 border-b border-gray-200"},so={class:"text-lg font-semibold text-gray-900"},ro=["innerHTML"],X=e.defineComponent({__name:"Card",props:{panels:{default:()=>[]},data:{default:()=>({})},view:{default:"plain"},id:{},className:{},style:{}},setup(s){const l=s,n=e.ref(0),t=e.computed(()=>l.panels&&l.panels.length>0?l.panels:l.data&&Array.isArray(l.data)?l.data.filter(m=>m.type==="tabs")[0]?.items||[]:[]),o=e.computed(()=>l.panels&&l.panels.length>0?l.panels:l.data&&Array.isArray(l.data)?l.data:[]),g=e.computed(()=>({[`view-${l.view}`]:!0})),d=c=>{const m={};return c.count&&(m.count=c.count),c.col&&(m.col=c.col),l.data&&c.name&&Object.assign(m,l.data[c.name]),m},p=c=>c.width?{gridColumn:`span ${c.width}`}:{};return(c,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["bg-white rounded-lg shadow-sm border border-gray-200",g.value])},[c.view==="tab"?(e.openBlock(),e.createElementBlock("div",Qt,[e.createElementVNode("div",Yt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(r,f)=>(e.openBlock(),e.createElementBlock("button",{key:r.name||f,onClick:w=>n.value=f,class:e.normalizeClass(["px-4 py-3 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-100 transition-colors",{"text-blue-600 bg-white border-b-2 border-blue-600":n.value===f}])},e.toDisplayString(r.title||r.label||r.name||`Tab ${f+1}`),11,vt))),128))]),e.createElementVNode("div",eo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(r,f)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:r.name||f,class:e.normalizeClass(["min-h-[400px] w-full",`col-span-${r.col||12}`])},[r.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:r.html,class:"text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"},null,8,to)):c.$slots[`tab-${f}`]?e.renderSlot(c.$slots,`tab-${f}`,{key:1,item:r,data:c.data}):r.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.component),e.mergeProps({key:2,ref_for:!0},d(r),{class:"w-full h-full"}),null,16)):e.renderSlot(c.$slots,r.slot||`tab-${f}`,{key:3,item:r,data:c.data})],2)),[[e.vShow,n.value===f]])),128))])])):(e.openBlock(),e.createElementBlock("div",oo,[e.createElementVNode("div",no,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(r,f)=>(e.openBlock(),e.createElementBlock("div",{key:r.name||f,class:e.normalizeClass(["bg-gray-50 rounded-lg p-4 min-h-[300px]",`col-span-${r.col||12}`]),style:e.normalizeStyle(p(r))},[r.title||r.label?(e.openBlock(),e.createElementBlock("div",lo,[e.createElementVNode("h3",so,e.toDisplayString(r.title||r.label),1)])):e.createCommentVNode("",!0),r.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:r.html,class:"text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"},null,8,ro)):c.$slots[`panel-${f}`]?e.renderSlot(c.$slots,`panel-${f}`,{key:2,item:r,data:c.data}):r.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.component),e.mergeProps({key:3,ref_for:!0},d(r),{class:"w-full h-full"}),null,16)):e.renderSlot(c.$slots,r.slot||`panel-${f}`,{key:4,item:r,data:c.data})],6))),128))])]))],2))}}),ao=["innerHTML"],Q=e.defineComponent({__name:"CardItem",props:{name:{},label:{},component:{},slot:{},col:{default:12},html:{},title:{},id:{},className:{},style:{}},setup(s){const l=s,n=e.computed(()=>({[`col-span-${l.col}`]:!0})),t=e.computed(()=>{const o={};return o.col&&(o.col=o.col),o});return(o,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["w-full",n.value])},[o.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:o.html,class:"text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"},null,8,ao)):o.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.component),e.mergeProps({key:1},t.value,{class:"w-full"}),null,16)):e.renderSlot(o.$slots,"default",{key:2})],2))}}),io={class:"text-value"},co={class:"text-sm text-gray-900"},mo=V(e.defineComponent({__name:"TextValue",props:{item:{}},setup(s){const l=s,n=e.computed(()=>{const t=l.item.value;return typeof t=="boolean"?t?"Так":"Ні":t==null?"—":String(t)});return(t,o)=>(e.openBlock(),e.createElementBlock("div",io,[e.createElementVNode("span",co,e.toDisplayString(n.value),1)]))}}),[["__scopeId","data-v-c14550b7"]]),po={class:"link-value"},fo=["href"],go=V(e.defineComponent({__name:"LinkValue",props:{item:{}},setup(s){const l=s,n=e.computed(()=>{const t=String(l.item.value);try{const o=new URL(t);return o.hostname+o.pathname}catch{return t}});return(t,o)=>(e.openBlock(),e.createElementBlock("div",po,[e.createElementVNode("a",{href:String(t.item.value),target:"_blank",rel:"noopener noreferrer",class:"text-blue-600 hover:text-blue-800 underline text-sm"},[e.createTextVNode(e.toDisplayString(n.value)+" ",1),o[0]||(o[0]=e.createElementVNode("i",{class:"fas fa-external-link-alt ml-1 text-xs"},null,-1))],8,fo)]))}}),[["__scopeId","data-v-e6eb07a6"]]),ho={class:"date-value"},yo={class:"text-sm text-gray-900"},ko=V(e.defineComponent({__name:"DateValue",props:{item:{}},setup(s){const l=s,n=e.computed(()=>{const t=l.item.value;if(t instanceof Date)return t.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});if(typeof t=="string"){const o=new Date(t);if(!isNaN(o.getTime()))return o.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}return String(t)});return(t,o)=>(e.openBlock(),e.createElementBlock("div",ho,[e.createElementVNode("span",yo,e.toDisplayString(n.value),1)]))}}),[["__scopeId","data-v-b9600618"]]),bo={class:"status-value"},xo={key:0,class:"mr-1"},uo=V(e.defineComponent({__name:"StatusValue",props:{item:{}},setup(s){const l=s,n=e.computed(()=>{switch(String(l.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"bg-green-100 text-green-800";case"inactive":case"неактивний":case"pending":case"очікує":return"bg-yellow-100 text-yellow-800";case"error":case"помилка":case"failed":case"неуспішно":return"bg-red-100 text-red-800";case"draft":case"чернетка":return"bg-gray-100 text-gray-800";default:return"bg-blue-100 text-blue-800"}}),t=e.computed(()=>{switch(String(l.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"fas fa-check-circle";case"inactive":case"неактивний":case"pending":case"очікує":return"fas fa-clock";case"error":case"помилка":case"failed":case"неуспішно":return"fas fa-exclamation-circle";case"draft":case"чернетка":return"fas fa-edit";default:return"fas fa-info-circle"}});return(o,g)=>(e.openBlock(),e.createElementBlock("div",bo,[e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",n.value])},[t.value?(e.openBlock(),e.createElementBlock("span",xo,[e.createElementVNode("i",{class:e.normalizeClass(t.value)},null,2)])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(String(o.item.value)),1)],2)]))}}),[["__scopeId","data-v-c72e0b01"]]),wo={class:"custom-value"},_o={class:"text-sm text-gray-900"},Vo=V(e.defineComponent({__name:"CustomValue",props:{item:{}},setup(s){return(l,n)=>(e.openBlock(),e.createElementBlock("div",wo,[e.renderSlot(l.$slots,"default",{item:l.item,value:l.item.value},()=>[e.createElementVNode("span",_o,e.toDisplayString(String(l.item.value)),1)],!0)]))}}),[["__scopeId","data-v-11a73810"]]),Eo=["id"],No={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Bo={key:1,class:"overflow-x-auto"},Co={class:"min-w-full divide-y divide-gray-200"},$o={class:"bg-white divide-y divide-gray-200"},Mo={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},Do={class:"flex items-center gap-2"},Lo=["title"],So={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},zo={key:2,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},To={class:"flex items-start gap-3"},Fo={key:0,class:"flex-shrink-0"},jo={class:"flex-1 min-w-0"},Io={class:"flex items-center gap-2 mb-2"},Ao={class:"text-sm font-medium text-gray-900"},Ho=["title"],Oo={key:3,class:"overflow-x-auto"},Ro={class:"min-w-full divide-y divide-gray-200"},Uo={class:"bg-white divide-y divide-gray-200"},Wo={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},Po={class:"flex items-center gap-2"},qo=["title"],Go={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},Y=V(e.defineComponent({__name:"DescriptionListWidget",props:{title:{},items:{},view:{},id:{},className:{},style:{}},setup(s){const l=n=>{switch(n.type){case"link":return go;case"date":return ko;case"status":return uo;case"custom":return Vo;default:return mo}};return(n,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["description-list-widget",n.className]),id:n.id,style:e.normalizeStyle(n.style)},[n.title?(e.openBlock(),e.createElementBlock("h3",No,e.toDisplayString(n.title),1)):e.createCommentVNode("",!0),n.view==="table"?(e.openBlock(),e.createElementBlock("div",Bo,[e.createElementVNode("table",Co,[e.createElementVNode("tbody",$o,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.items,o=>(e.openBlock(),e.createElementBlock("tr",{key:o.id||o.label},[e.createElementVNode("td",Mo,[e.createElementVNode("div",Do,[o.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([o.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(o.label)+" ",1),o.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:o.tooltip},t[0]||(t[0]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,Lo)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",So,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(o)),{item:o},null,8,["item"]))])]))),128))])])])):n.view==="grid"?(e.openBlock(),e.createElementBlock("div",zo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.items,o=>(e.openBlock(),e.createElementBlock("div",{key:o.id||o.label,class:"description-item-card bg-white border border-gray-200 rounded-lg p-4"},[e.createElementVNode("div",To,[o.icon?(e.openBlock(),e.createElementBlock("div",Fo,[e.createElementVNode("i",{class:e.normalizeClass([o.icon,"text-gray-500 text-lg"])},null,2)])):e.createCommentVNode("",!0),e.createElementVNode("div",jo,[e.createElementVNode("div",Io,[e.createElementVNode("h4",Ao,e.toDisplayString(o.label),1),o.tooltip?(e.openBlock(),e.createElementBlock("span",{key:0,class:"text-gray-400 cursor-help",title:o.tooltip},t[1]||(t[1]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,Ho)):e.createCommentVNode("",!0)]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(o)),{item:o},null,8,["item"]))])])]))),128))])):(e.openBlock(),e.createElementBlock("div",Oo,[e.createElementVNode("table",Ro,[e.createElementVNode("tbody",Uo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.items,o=>(e.openBlock(),e.createElementBlock("tr",{key:o.id||o.label},[e.createElementVNode("td",Wo,[e.createElementVNode("div",Po,[o.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([o.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(o.label)+" ",1),o.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:o.tooltip},t[2]||(t[2]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,qo)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",Go,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(o)),{item:o},null,8,["item"]))])]))),128))])])]))],14,Eo))}}),[["__scopeId","data-v-36d43e50"]]),Ko={draw:{toolbar:{actions:{title:"Скасувати малювання",text:"Скасувати"},finish:{title:"Завершити малювання",text:"Завершити"},undo:{title:"Видалити останню точку",text:"Видалити останню"},buttons:{polyline:"Намалювати лінію",polygon:"Намалювати полігон",rectangle:"Намалювати прямокутник",circle:"Намалювати коло",marker:"Додати точку",circlemarker:"Додати маркер-коло"}},handlers:{circle:{tooltip:{start:"Клацніть і тягніть, щоб намалювати коло",end:"Відпустіть кнопку миші, щоб завершити"},radius:"Радіус"},circlemarker:{tooltip:{start:"Клацніть на карту, щоб додати маркер-коло"}},marker:{tooltip:{start:"Клацніть на карту, щоб додати точку"}},polygon:{tooltip:{start:"Клацніть, щоб почати малювати полігон",cont:"Клацайте, щоб продовжити малювати полігон",end:"Клацніть першу точку, щоб завершити полігон"}},polyline:{error:"<strong>Помилка:</strong> лінія не може перетинатися сама з собою",tooltip:{start:"Клацніть, щоб почати малювати лінію",cont:"Клацайте, щоб продовжити малювати лінію",end:"Клацніть останню точку, щоб завершити лінію"}},rectangle:{tooltip:{start:"Клацніть і тягніть, щоб намалювати прямокутник",end:"Відпустіть кнопку миші, щоб завершити"}},simpleshape:{tooltip:{end:"Відпустіть кнопку миші, щоб завершити"}}}},edit:{toolbar:{actions:{save:{title:"Зберегти зміни",text:"Зберегти"},cancel:{title:"Скасувати редагування",text:"Скасувати"},clearAll:{title:"Очистити всі шари",text:"Очистити все"}},buttons:{edit:"Редагувати шари",editDisabled:"Немає шарів для редагування",remove:"Видалити шари",removeDisabled:"Немає шарів для видалення"}},handlers:{edit:{tooltip:{text:"Перетягніть маркери, щоб редагувати шари",subtext:"Натисніть 'Скасувати', щоб повернутися"}},remove:{tooltip:{text:"Клацніть на шари, щоб видалити їх"}}}}};function Zo(s){return s?s.type==="FeatureCollection"||s.type==="Feature"?s:s.geom?{type:"Feature",geometry:{type:s.geom.type,coordinates:s.geom.coordinates},properties:{}}:s.type&&s.coordinates?{type:"Feature",geometry:s,properties:{}}:null:null}const Jo={class:"relative"},Xo={key:1,class:"bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"},Qo={class:"flex items-center justify-between p-2 border-b"},Yo={class:"p-2 border-b"},vo={class:"flex items-center"},en={class:"flex items-center"},tn={class:"flex items-center"},on={class:"p-2"},nn={class:"flex items-center"},R=e.defineComponent({__name:"MapWidget",props:{data:{}},setup(s){const l=s,n=e.ref(null);let t,o;const g={topo100:{url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"},orto10:{url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png"},osmb:{url:"https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"}},d=e.ref("topo100");let p;const c=e.ref(!0),m=e.ref(!1);function r(){return new Promise((k,a)=>{if(window.L&&window.L.Draw)return k(0);const i=h=>{if(Array.from(document.styleSheets).some(C=>C?.href?.includes(h)))return;const B=document.createElement("link");B.rel="stylesheet",B.href=h,document.head.appendChild(B)},b=h=>new Promise((u,B)=>{const C=Array.from(document.scripts).find(M=>M.src===h);if(C){C.addEventListener("load",()=>u()),C.addEventListener("error",M=>B(M));return}const $=document.createElement("script");$.src=h,$.async=!0,$.onload=()=>u(),$.onerror=M=>B(M),document.body.appendChild($)});i("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),i("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"),b("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(()=>b("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(()=>k(0)).catch(a)})}e.onMounted(async()=>{await r(),L.drawLocal=Ko,t=L.map(n.value,{zoomControl:!1}).setView([50,30],10),L.control.zoom({position:"bottomright"}).addTo(t),p=L.tileLayer(g.topo100.url,{maxZoom:19}).addTo(t),d.value="topo100",o=new L.FeatureGroup().addTo(t);const k=Zo(l.data);if(k){const a=[];L.geoJSON(k).eachLayer(i=>a.push(i)),a.length&&o.addLayer(a[0]),o.toGeoJSON(),f()}});function f(k=30){const a=o.getLayers();if(!a.length)return;const b=L.featureGroup(a).getBounds();b&&b.isValid()&&t.fitBounds(b,{padding:[k,k]})}function w(k){p&&p.removeFrom(t);const a=g[k];p=L.tileLayer(a.url,a.options||{}).addTo(t),d.value=k}function _(){w(d.value)}function N(){o&&(c.value?o.addTo(t):o.removeFrom(t))}return(k,a)=>(e.openBlock(),e.createElementBlock("div",Jo,[e.createElementVNode("div",{ref_key:"mapContainer",ref:n,class:"w-full h-[350px]"},null,512),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:a[0]||(a[0]=i=>m.value=!0),class:"z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer"}," Шари ")),m.value?(e.openBlock(),e.createElementBlock("div",Xo,[e.createElementVNode("div",Qo,[a[7]||(a[7]=e.createElementVNode("div",null,"Шари",-1)),(e.openBlock(),e.createElementBlock("svg",{onClick:a[1]||(a[1]=i=>m.value=!1),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-x w-4 h-4"},a[6]||(a[6]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)])))]),e.createElementVNode("div",Yo,[e.createElementVNode("div",null,[e.createElementVNode("label",vo,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"base-layer",value:"topo100","onUpdate:modelValue":a[2]||(a[2]=i=>d.value=i),onChange:_},null,544),[[e.vModelRadio,d.value]]),a[8]||(a[8]=e.createElementVNode("span",{class:"ml-2"},"Карта України",-1))])]),e.createElementVNode("div",null,[e.createElementVNode("label",en,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"base-layer",value:"orto10","onUpdate:modelValue":a[3]||(a[3]=i=>d.value=i),onChange:_},null,544),[[e.vModelRadio,d.value]]),a[9]||(a[9]=e.createElementVNode("span",{class:"ml-2"},"Ortophoto 1:10К",-1))])]),e.createElementVNode("div",null,[e.createElementVNode("label",tn,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"base-layer",value:"osmb","onUpdate:modelValue":a[4]||(a[4]=i=>d.value=i),onChange:_},null,544),[[e.vModelRadio,d.value]]),a[10]||(a[10]=e.createElementVNode("span",{class:"ml-2"},"Open Street Map",-1))])])]),e.createElementVNode("div",on,[e.createElementVNode("label",nn,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":a[5]||(a[5]=i=>c.value=i),onChange:N},null,544),[[e.vModelCheckbox,c.value]]),a[11]||(a[11]=e.createElementVNode("span",{class:"ml-2"}," Показати геометрію ",-1))])])])):e.createCommentVNode("",!0)]))}}),ln={install:s=>{s.component("vs-widget-file",A),s.component("vs-widget-comments",j),s.component("vs-widget-history",I),s.component("vs-widget-gallery",O),s.component("vs-widget-map",R),s.component("CommentsWidget",j),s.component("HistoryWidget",I),s.component("GalleryWidget",O),s.component("FilesWidget",A),s.component("MapWidget",R),s.component("Card",X),s.component("CardItem",Q),s.component("DescriptionListWidget",Y),s.component("CopyNotification",H)}};x.Card=X,x.CardItem=Q,x.CommentsWidget=j,x.CopyNotification=H,x.DescriptionListWidget=Y,x.FilesWidget=A,x.GalleryWidget=O,x.HistoryWidget=I,x.MapWidget=R,x.default=ln,Object.defineProperties(x,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
136
|
+
*/const S=u("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),xe={class:"border-t pt-3 mt-4"},ue={class:"flex gap-2"},_e={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},we={class:"flex-1 space-y-2"},Ee={class:"flex justify-between items-center"},Ve={class:"flex gap-2"},Ne=["disabled"],K=e.defineComponent({__name:"CommentInputZone",props:{isReply:{type:Boolean,required:!1,default:!1},isReplyModifiers:{}},emits:e.mergeModels(["sendComment"],["update:isReply"]),setup(a,{emit:l}){const s=e.useModel(a,"isReply"),t=e.ref(""),o=l,g=()=>{t.value.trim()&&(o("sendComment",t.value),t.value="")},n=m=>{(m.ctrlKey||m.metaKey)&&m.key==="Enter"&&(m.preventDefault(),g())};return(m,h)=>(e.openBlock(),e.createElementBlock("div",xe,[e.createElementVNode("div",ue,[e.createElementVNode("span",_e,[e.createVNode(e.unref(R),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",we,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":h[0]||(h[0]=p=>t.value=p),onKeydown:n,placeholder:"Add a comment...",class:"w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"},null,544),[[e.vModelText,t.value]]),e.createElementVNode("div",Ee,[h[4]||(h[4]=e.createElementVNode("span",{class:"text-xs text-gray-500 hidden sm:inline"},"Cmd+Enter to send",-1)),e.createElementVNode("div",Ve,[s.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:h[1]||(h[1]=p=>s.value=!1)},[e.createVNode(e.unref(S),{class:"h-3 w-3"}),h[2]||(h[2]=e.createTextVNode(" Cancel ",-1))])):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",disabled:!t.value.trim(),onClick:g},[e.createVNode(e.unref(G),{class:"h-3 w-3 mr-1"}),h[3]||(h[3]=e.createTextVNode(" Send ",-1))],8,Ne)])])])])]))}}),Be={class:"z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md w-32 outline-none pointer-events-auto"},Ce=e.defineComponent({__name:"CommentDetails",props:{showMoreOptions:{type:Boolean,required:!0,default:!1},showMoreOptionsModifiers:{}},emits:e.mergeModels(["edit","delete"],["update:showMoreOptions"]),setup(a,{emit:l}){const s=l,t=e.useModel(a,"showMoreOptions"),o=e.ref(),g=e.ref(!0),n=async p=>{t.value&&o.value&&!o.value.contains(p.target)&&!g.value&&(t.value=!1),g.value=!1},m=()=>{t.value=!1,s("edit")},h=()=>{t.value=!1,s("delete")};return e.onMounted(()=>{document.addEventListener("click",n)}),e.onUnmounted(()=>{document.removeEventListener("click",n)}),(p,r)=>(e.openBlock(),e.createElementBlock("div",{class:"absolute bg-white left-0 top-full transform min-w-max z-50",ref_key:"moreOptionsRef",ref:o},[e.createElementVNode("div",Be,[e.createElementVNode("div",{class:"relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs hover:bg-gray-100 transition-colors duration-300",onClick:m},[e.createVNode(e.unref(ye),{class:"h-3 w-3 mr-2"}),r[0]||(r[0]=e.createTextVNode(" Edit ",-1))]),e.createElementVNode("div",{class:"relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs text-red-600 hover:bg-gray-100 transition-colors duration-300",onClick:h},[e.createVNode(e.unref(O),{class:"h-3 w-3 mr-2"}),r[1]||(r[1]=e.createTextVNode(" Delete ",-1))])])],512))}}),$e={class:"space-y-2"},Me={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},De={class:"flex-1 min-w-0 space-y-1 relative"},Le={class:"flex items-center gap-2"},Se={class:"font-medium text-xs"},ze={class:"text-xs text-gray-500"},Te={key:0,class:"text-xs text-gray-700 leading-relaxed"},Fe={class:"flex justify-between text-xs"},Ie={class:"flex items-center gap-2"},je={key:0,class:"flex gap-2"},He=["disabled"],Ae={key:0,class:"ml-8 space-y-1 border-l-2 border-gray-100 pl-3"},Oe=e.defineComponent({__name:"CommentItem",props:{comment:{},isInside:{type:Boolean}},emits:["like","reply","edit","delete"],setup(a,{emit:l}){const s=l,t=a,o=e.ref(t.comment.text),g=e.ref("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"),n=e.ref("w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"),m=e.ref(!1),h=e.ref(!1),p=e.ref(!1),r=e.ref(!1),y=i=>{const f=new Date,V=Math.floor((f.getTime()-i.getTime())/(1e3*60*60));return V<1?`${Math.floor((f.getTime()-i.getTime())/6e4)}m`:V<24?`${V}h`:`${Math.floor(V/24)}d`},d=()=>{r.value=!r.value,r.value?s("like",t.comment.id,"add"):s("like",t.comment.id,"delete")},k=()=>{s("edit",t.comment.id,o.value),p.value=!1},M=(i,f)=>{s("like",i,f)},w=(i,f)=>{s("edit",i,f)};return(i,f)=>{const V=e.resolveComponent("CommentItem",!0);return e.openBlock(),e.createElementBlock("div",$e,[e.createElementVNode("div",{class:e.normalizeClass(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative",p.value?"bg-gray-50":""])},[e.createElementVNode("span",Me,[e.createVNode(e.unref(R),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",De,[e.createElementVNode("div",Le,[e.createElementVNode("span",Se,e.toDisplayString(i.comment?.author),1),e.createElementVNode("span",ze,e.toDisplayString(y(i.comment?.createdAt)),1)]),p.value?e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,"onUpdate:modelValue":f[0]||(f[0]=x=>o.value=x),class:e.normalizeClass(p.value?n.value:g.value)},null,2)),[[e.vModelText,o.value]]):(e.openBlock(),e.createElementBlock("p",Te,e.toDisplayString(i.comment?.text),1)),e.createElementVNode("div",Fe,[e.createElementVNode("div",Ie,[e.createElementVNode("button",{class:e.normalizeClass(["flex items-center gap-1",r.value?"text-blue-600":"text-gray-500 hover:text-blue-600 transition-colors"]),onClick:f[1]||(f[1]=x=>d())},[e.createVNode(e.unref(ce),{class:e.normalizeClass(["h-3 w-3",r.value?"fill-blue-600":""])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(i.comment?.likes),1)],2),i.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"text-gray-500 hover:text-blue-600 transition-colors",onClick:f[2]||(f[2]=x=>h.value=!0)},[e.createVNode(e.unref(fe),{class:"h-3 w-3"})])),e.createElementVNode("button",{class:"text-gray-400 hover:text-gray-600 transition-colors opacity-0 group-hover:opacity-100",type:"button",onClick:f[3]||(f[3]=x=>m.value=!0)},[e.createVNode(e.unref(ae),{class:"h-3 w-3"})])]),p.value?(e.openBlock(),e.createElementBlock("div",je,[e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:f[4]||(f[4]=x=>p.value=!1)},[e.createVNode(e.unref(S),{class:"h-3 w-3"}),f[11]||(f[11]=e.createTextVNode(" Cancel ",-1))]),e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",disabled:!o.value.trim(),onClick:f[5]||(f[5]=x=>k())},[e.createVNode(e.unref(G),{class:"h-3 w-3 mr-1"}),f[12]||(f[12]=e.createTextVNode(" Send ",-1))],8,He)])):e.createCommentVNode("",!0)])]),m.value?(e.openBlock(),e.createBlock(Ce,{key:0,showMoreOptions:m.value,"onUpdate:showMoreOptions":f[6]||(f[6]=x=>m.value=x),onEdit:f[7]||(f[7]=x=>p.value=!0),onDelete:f[8]||(f[8]=x=>i.$emit("delete",i.comment?.id)),comment:i.comment},null,8,["showMoreOptions","comment"])):e.createCommentVNode("",!0)],2),i.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.comment?.replies,x=>(e.openBlock(),e.createBlock(V,{key:x.id,comment:x,isInside:!0,onDelete:b=>i.$emit("delete",x.id),onLike:M,onEdit:w},null,8,["comment","onDelete"]))),128)),h.value&&!i.isInside?(e.openBlock(),e.createBlock(K,{key:0,onSendComment:f[9]||(f[9]=x=>i.$emit("reply",i.comment?.id,x)),isReply:h.value,"onUpdate:isReply":f[10]||(f[10]=x=>h.value=x)},null,8,["isReply"])):e.createCommentVNode("",!0)]))])}}}),Re=["id"],Ue={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},z=e.defineComponent({__name:"CommentsWidget",props:{title:{},comments:{},maxHeight:{},onAddComment:{type:Function},onReply:{type:Function},onLike:{type:Function},onDelete:{type:Function},onEdit:{type:Function},id:{},className:{},style:{}},emits:["add","reply","like","delete","edit"],setup(a,{emit:l}){const s=a,t=l,o=p=>{s?.onAddComment?.(p),t("add",p)},g=(p,r)=>{s?.onLike?.(p,r),t("like",p,r)},n=(p,r)=>{s.onReply?.(p,r),t("reply",p,r)},m=(p,r)=>{s.onEdit?.(p,r),t("edit",p,r)},h=p=>{s.onDelete?.(p),t("delete",p)};return(p,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mx-auto font-sans",p.className]),id:p.id,style:e.normalizeStyle(p.style)},[p.title?(e.openBlock(),e.createElementBlock("h3",Ue,e.toDisplayString(p.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([p.maxHeight?"overflow-y-auto":"","space-y-3"]),style:e.normalizeStyle({maxHeight:p.maxHeight+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.comments,y=>(e.openBlock(),e.createBlock(Oe,{key:y.id,comment:y,onReply:n,onLike:g,onDelete:r[0]||(r[0]=d=>h(d)),onEdit:m},null,8,["comment"]))),128))],6),e.createVNode(K,{onSendComment:r[1]||(r[1]=y=>o(y))})],14,Re))}}),Z=new Map([["file",{name:"File",color:"bg-green-100 text-green-700 border-green-200",icon:$}],["post",{name:"Post",color:"bg-blue-100 text-blue-700 border-blue-200",icon:he}],["user",{name:"User",color:"bg-purple-100 text-purple-700 border-purple-200",icon:ke}],["custom",{name:"Custom",color:"bg-gray-100 text-gray-700 border-gray-200",icon:de}]]),Pe={class:"mx-auto font-sans"},We={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},qe={class:"relative"},Ge={class:"space-y-3"},Ke={class:"flex-1 min-w-0 pb-2"},Ze={class:"flex items-center gap-1.5 mb-1 mt-0.5"},Je={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Xe={class:"font-medium text-xs"},Qe={class:"text-xs text-gray-500"},Ye={class:"space-y-1"},ve={class:"text-xs text-gray-700"},et={class:"capitalize mr-1"},tt={key:0,class:"inline-flex items-center rounded-full border py-0.5 font-semibold transition-colors text-foreground text-xs h-4 px-1 capitalize"},ot={key:0,class:"flex items-center gap-1 text-xs"},nt={key:0,class:"bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"},st={key:2,class:"bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"},T=e.defineComponent({__name:"HistoryWidget",props:{data:{},title:{},maxHeight:{},id:{},className:{},style:{}},setup(a){const l=a,s=e.ref(l.data??[]);s.value.length===0&&l.id&&t(),console.log(l);async function t(){const o=await fetch(`/api/widget/history/${l.id}`);if(!o.ok)return{data:[]};const g=await o.json();g.rows.forEach(n=>{n.timestamp=new Date(n.cdate),n.id=n.entity_id,n.entityType=n.entity_type,n.entityId=n.entity_id,n.action=n.change_type,n.userId=n.change_user_id,n.userName=n.username,n.timestamp=new Date(n.cdate),n.description=n.username,n.status=n.username}),s.value=g.rows}return(o,g)=>(e.openBlock(),e.createElementBlock("div",Pe,[o.title?(e.openBlock(),e.createElementBlock("h3",We,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(o.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:o.maxHeight+"px"})},[e.createElementVNode("div",qe,[g[0]||(g[0]=e.createElementVNode("div",{class:"absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200"},null,-1)),e.createElementVNode("div",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,n=>(e.openBlock(),e.createElementBlock("div",{class:"relative flex items-start gap-2",key:n?.id},[e.createElementVNode("div",{class:e.normalizeClass(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${e.unref(Z).get(n?.entityType)?.color}`)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Z).get(n?.entityType)?.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",Ke,[e.createElementVNode("div",Ze,[e.createElementVNode("span",Je,[e.createVNode(e.unref(R),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("span",Xe,e.toDisplayString(n?.userName),1),e.createElementVNode("span",Qe,e.toDisplayString(n?.timestamp.toLocaleTimeString("ua-UA",{hour:"2-digit",minute:"2-digit"})),1)]),e.createElementVNode("div",Ye,[e.createElementVNode("div",ve,[e.createElementVNode("span",et,e.toDisplayString(n?.action),1),n?.entityId?(e.openBlock(),e.createElementBlock("span",tt,e.toDisplayString(n?.entityId),1)):e.createCommentVNode("",!0)]),n?.changes?.[n?.entityId]?(e.openBlock(),e.createElementBlock("div",ot,[n?.changes?.[n?.entityId]?.old?(e.openBlock(),e.createElementBlock("span",nt,e.toDisplayString(n?.changes?.[n?.entityId]?.old),1)):e.createCommentVNode("",!0),n?.changes?.[n?.entityId]?.old&&n?.changes?.[n?.entityId]?.new?(e.openBlock(),e.createBlock(e.unref(se),{key:1,class:"h-2 w-2 text-gray-400"})):e.createCommentVNode("",!0),n?.changes?.[n?.entityId]?.new?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(n?.changes?.[n?.entityId]?.new),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])]))),128))])])],6)]))}}),lt={key:0,class:"text-xl font-semibold"},at={class:"flex gap-1"},rt={class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer"},it=e.defineComponent({__name:"FileHeader",props:e.mergeModels({title:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["onAddFile"],["update:modelValue"]),setup(a){const l=e.useModel(a,"modelValue"),s={active:"bg-blue-100 text-black hover:bg-blue-100",inactive:"bg-white text-black hover:bg-blue-100"};return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",t.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[t.title?(e.openBlock(),e.createElementBlock("h3",lt,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",at,[e.createElementVNode("button",{class:e.normalizeClass(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",l.value==="list"?s.active:s.inactive]),onClick:o[0]||(o[0]=g=>l.value="list")},[e.createVNode(e.unref(me),{class:"h-4 w-4"})],2),e.createElementVNode("button",{class:e.normalizeClass(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",l.value==="grid"?s.active:s.inactive]),onClick:o[1]||(o[1]=g=>l.value="grid")},[e.createVNode(e.unref(ie),{class:"h-4 w-4"})],2),e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:o[2]||(o[2]=g=>t.$emit("onAddFile",g))},null,32),e.createElementVNode("div",rt,[e.createVNode(e.unref(pe),{class:"h-4 w-4"}),o[3]||(o[3]=e.createTextVNode(" Додати файл ",-1))])])])],2))}}),J={pdf:{color:"bg-red-100 text-red-700 border-red-200",icon:$,label:"PDF"},sketch:{color:"bg-gray-100 text-gray-700 border-gray-200",icon:re,label:"SKETCH"},mp4:{color:"bg-purple-100 text-purple-700 border-purple-200",icon:be,label:"VIDEO"},docx:{color:"bg-blue-100 text-blue-700 border-blue-200",icon:$,label:"DOC"},zip:{color:"bg-orange-100 text-orange-700 border-orange-200",icon:ne,label:"ARCHIVE"},png:{color:"bg-green-100 text-green-700 border-green-200",icon:q,label:"IMAGE"},jpg:{color:"bg-green-100 text-green-700 border-green-200",icon:q,label:"IMAGE"},xlsx:{color:"bg-emerald-100 text-emerald-700 border-emerald-200",icon:$,label:"EXCEL"},pptx:{color:"bg-amber-100 text-amber-700 border-amber-200",icon:$,label:"PPT"}};function X(a,l="en"){const s={month:"short",day:"numeric"};return new Intl.DateTimeFormat(l,s).format(a)}function Q(a){if(a===0)return"0 B";const l=1024,s=["B","KB","MB","GB","TB"],t=Math.floor(Math.log(a)/Math.log(l));return`${parseFloat((a/Math.pow(l,t)).toFixed(1))} ${s[t]}`}const ct={class:"space-y-0.5"},dt=["onClick"],mt=["onClick"],pt={class:"flex items-center gap-2"},ft={class:"font-medium text-xs truncate hover:text-blue-600 cursor-pointer"},gt={class:"hidden sm:block text-xs text-gray-500 w-16 text-right"},ht={class:"hidden md:block text-xs text-gray-500 w-12 text-right"},yt={class:"flex items-center gap-1"},kt=["onClick"],bt=["onClick"],xt=e.defineComponent({__name:"FileList",props:{files:{}},emits:["delete","download","openLightbox"],setup(a){return(l,s)=>(e.openBlock(),e.createElementBlock("div",ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.files,t=>(e.openBlock(),e.createElementBlock("div",{class:"flex items-center gap-2 p-1.5 rounded hover:bg-gray-50 group border-b border-gray-100 last:border-b-0",key:t.id,onClick:e.withModifiers(o=>l.$emit("openLightbox",t),["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(["p-1 rounded",e.unref(J)[t?.ext]?.color])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(J)[t?.ext]?.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",{class:"flex-1 min-w-0",onClick:o=>l.$emit("openLightbox",t)},[e.createElementVNode("div",pt,[e.createElementVNode("span",ft,e.toDisplayString(t?.uploaded_name||t?.name),1)])],8,mt),e.createElementVNode("div",gt,e.toDisplayString(e.unref(Q)(t.size)),1),e.createElementVNode("div",ht,e.toDisplayString(e.unref(X)(t.createdAt)),1),e.createElementVNode("div",yt,[e.createElementVNode("button",{onClick:e.withModifiers(o=>l.$emit("download",t),["stop"]),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity"},[e.createVNode(e.unref(A),{class:"h-3 w-3"})],8,kt),e.createElementVNode("button",{class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700",onClick:e.withModifiers(o=>l.$emit("delete",o,t?.file_id),["stop"])},[e.createVNode(e.unref(O),{class:"h-3 w-3"})],8,bt)])],8,dt))),128))]))}}),ut={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3"},_t=["onClick"],wt={class:"space-y-2"},Et={class:"flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden"},Vt=["src"],Nt={class:"space-y-1"},Bt=["title"],Ct={class:"text-xs text-gray-500 text-left"},$t={class:"absolute top-2 right-1 flex items-center gap-1"},Mt=["onClick"],Dt=["onClick"],Lt=e.defineComponent({__name:"FileGrid",props:{files:{}},emits:["delete","download","openLightbox"],setup(a){return(l,s)=>(e.openBlock(),e.createElementBlock("div",ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.files,t=>(e.openBlock(),e.createElementBlock("div",{key:t.id,onClick:e.withModifiers(o=>l.$emit("openLightbox",t),["stop"]),class:"group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"},[e.createElementVNode("div",wt,[e.createElementVNode("div",Et,[t.ext==="png"||t.ext==="jpg"||t.ext==="jpeg"||t.ext==="gif"||t.ext==="svg"||t.ext==="webp"?(e.openBlock(),e.createElementBlock("img",{key:0,src:`/file/resize?filepath=${t?.file_path}&w=500`,alt:"file",class:"w-full h-full object-cover"},null,8,Vt)):(e.openBlock(),e.createBlock(e.unref($),{key:1,class:"h-10 w-10 text-gray-500"}))]),e.createElementVNode("div",Nt,[e.createElementVNode("h3",{class:"font-medium text-xs leading-tight text-left",title:t.uploaded_name||t.name},e.toDisplayString(t.uploaded_name||t.name),9,Bt),e.createElementVNode("p",Ct,e.toDisplayString(e.unref(X)(t.createdAt))+", "+e.toDisplayString(e.unref(Q)(t.size)),1)])]),e.createElementVNode("div",$t,[e.createElementVNode("button",{onClick:e.withModifiers(o=>l.$emit("download",t),["stop"]),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50"},[e.createVNode(e.unref(A),{class:"h-3 w-3"})],8,Mt),e.createElementVNode("a",{class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700 hover:bg-red-50",onClick:e.withModifiers(o=>l.$emit("delete",o,t?.file_id),["stop"])},[e.createVNode(e.unref(O),{class:"h-3 w-3"})],8,Dt)])],8,_t))),128))]))}}),St={class:"mx-auto font-sans"},zt={key:1},F=e.defineComponent({__name:"FilesWidget",props:{title:{},view:{},files:{default:()=>[]},maxHeight:{},onAddFile:{},id:{},className:{},style:{},onDelete:{}},emits:["delete","add","openLightbox"],setup(a,{emit:l}){const s=a,t=e.ref(!1),o=e.ref(null),g=e.ref(!1),n=e.ref(0),m=e.ref(s.files??[]),h=l;m.value.length===0&&f();const p=(b,c)=>{o.value=c,t.value=!0},r=()=>{o.value&&(M(o.value),o.value=null,t.value=!1)},y=e.computed(()=>Array.isArray(m.value)?m.value.map(b=>b?.file_path):[]),d=b=>{const c=y.value.findIndex(N=>N===b.file_path);c!==-1&&(g.value=!0,n.value=c)},k=b=>{s.onAddFile?s.onAddFile(b):V(b),h("add",b)},M=b=>{s.onDelete?s.onDelete(b):x(b),h("delete",b)},w=b=>{const c=document.createElement("a");c.setAttribute("download",b?.uploaded_name||b?.name),c.href=b?.file_path||b?.path,c.click()},i=e.ref("list");async function f(){if(!s.id)return;const b=await fetch(`/api/widget/file/${s.id}`).then(c=>c.json());b.rows.forEach(c=>{c.timestamp=new Date(c.cdate),c.id=c.entity_id,c.entityType=c.entity_type,c.entityId=c.entity_id,c.entityType=c.entity_type,c.action=c.change_type,c.userId=c.change_user_id,c.userName=c.username,c.timestamp=new Date(c.cdate),c.description=c.username,c.status=c.username}),m.value=b.rows}const V=async b=>{if(!(!b.target||!b.target.files||b.target.files.length===0))try{await Promise.all(Array.from(b.target.files).map(async c=>{const N=new FormData;N.append("file",c);const B=`/api/widget/file/${s.id}`,_=await fetch(B,{method:"POST",body:N});if(!_.ok)throw new Error(`HTTP error! status: ${_.status}`);return c})),await f()}catch(c){console.error("Помилка при завантаженні файлів:",c)}},x=async b=>{try{await fetch(`/api/widget/file/${s.id}/${b}`,{method:"DELETE"}),await f()}catch(c){console.error(c)}};return(b,c)=>{const N=e.resolveComponent("MessageBox"),B=e.resolveComponent("Lightbox");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",St,[e.createVNode(it,{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=_=>i.value=_),title:s.title,onOnAddFile:c[1]||(c[1]=_=>k(_))},null,8,["modelValue","title"]),m.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(b.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:b.maxHeight+"px"})},[i.value==="list"?(e.openBlock(),e.createBlock(xt,{key:0,onDelete:p,onDownload:w,onOpenLightbox:c[2]||(c[2]=_=>d(_)),files:m.value},null,8,["files"])):e.createCommentVNode("",!0),i.value==="grid"?(e.openBlock(),e.createBlock(Lt,{key:1,onDelete:p,onDownload:w,onOpenLightbox:c[3]||(c[3]=_=>d(_)),files:m.value},null,8,["files"])):e.createCommentVNode("",!0)],6)):(e.openBlock(),e.createElementBlock("div",zt,c[6]||(c[6]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Файлів не знайдено")],-1)])))]),e.createVNode(N,{modelValue:t.value,"onUpdate:modelValue":c[4]||(c[4]=_=>t.value=_),onConfirm:r,title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати"},null,8,["modelValue"]),e.createVNode(B,{modelValue:g.value,"onUpdate:modelValue":c[5]||(c[5]=_=>g.value=_),images:y.value,"start-index":n.value},null,8,["modelValue","images","start-index"])],64)}}}),Tt=["onClick"],Ft=e.defineComponent({__name:"CopyNotification",setup(a,{expose:l}){const s=e.ref([]);let t=1;const o=()=>{if(s.value.length>=10){const m=s.value[0];clearTimeout(m.timer),s.value.shift()}const n={id:t++,timer:setTimeout(()=>{g(n.id)},1500)};s.value.push(n)},g=n=>{const m=s.value.findIndex(h=>h.id===n);if(m!==-1){const h=s.value[m];clearTimeout(h.timer),s.value.splice(m,1)}};return l({addNotification:o}),e.onUnmounted(()=>{s.value.forEach(n=>{clearTimeout(n.timer)})}),(n,m)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.TransitionGroup,{name:"notification",tag:"div",class:"fixed top-4 right-4 z-50 space-y-2"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,h=>(e.openBlock(),e.createElementBlock("div",{key:h.id,class:"bg-green-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center gap-3 min-w-64 max-w-sm"},[e.createVNode(e.unref(le),{class:"h-5 w-5 text-green-100 flex-shrink-0"}),m[0]||(m[0]=e.createElementVNode("div",{class:"flex-1"},[e.createElementVNode("p",{class:"font-medium text-sm"},"Ссылка скопирована!"),e.createElementVNode("p",{class:"text-xs text-green-100 opacity-90"},"Файл добавлен в буфер обмена")],-1)),e.createElementVNode("button",{onClick:p=>g(h.id),class:"text-green-100 hover:text-white transition-colors flex-shrink-0"},[e.createVNode(e.unref(S),{class:"h-4 w-4"})],8,Tt)]))),128))]),_:1})]))}}),C=(a,l)=>{const s=a.__vccOpts||a;for(const[t,o]of l)s[t]=o;return s},U=C(Ft,[["__scopeId","data-v-55903525"]]),It={class:"fixed inset-0 z-50 bg-black/80"},jt={class:"fixed bg-white left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-200 sm:rounded-lg max-w-4xl max-h-[90vh] p-0"},Ht={class:"flex flex-col space-y-1.5 text-center sm:text-left p-4 pb-2"},At={class:"flex items-center justify-between"},Ot={class:"flex items-center gap-2"},Rt={class:"tracking-tight text-base font-medium"},Ut={class:"p-4 pt-0"},Pt={class:"flex flex-col items-center"},Wt=["src","alt"],qt={class:"mt-3 flex items-center gap-4 text-sm text-gray-600"},Gt={class:"mt-3 flex gap-2"},Kt=e.defineComponent({__name:"GalleryModal",props:{item:{}},emits:["close"],setup(a){const l=e.ref(),s=n=>new Date(n).toLocaleDateString("uk-UA",{day:"2-digit",month:"2-digit",year:"numeric"}),t=n=>n>=1024*1024*1024?(n/(1024*1024*1024)).toFixed(2)+" GB":n>=1024*1024?(n/(1024*1024)).toFixed(2)+" MB":n>=1024?(n/1024).toFixed(2)+" KB":n+" B",o=n=>{navigator.clipboard.writeText(n),l.value?.addNotification()},g=async(n,m)=>{try{const p=await(await fetch(n)).blob(),r=window.URL.createObjectURL(p),y=document.createElement("a");y.href=r,y.download=m,document.body.appendChild(y),y.click(),window.URL.revokeObjectURL(r),document.body.removeChild(y)}catch(h){console.error("Download failed:",h),alert("Download failed. Please try opening the image in a new tab.")}};return(n,m)=>(e.openBlock(),e.createElementBlock("div",It,[e.createElementVNode("div",jt,[e.createElementVNode("div",Ht,[e.createElementVNode("div",At,[e.createElementVNode("div",Ot,[e.createElementVNode("h2",Rt,e.toDisplayString(n.item.name),1)])])]),e.createElementVNode("div",Ut,[e.createElementVNode("div",Pt,[e.createElementVNode("img",{src:n.item.path,alt:n.item.name,class:"max-w-full max-h-[60vh] object-contain rounded border"},null,8,Wt),e.createElementVNode("div",qt,[e.createElementVNode("span",null,"Size: "+e.toDisplayString(t(n.item.size)),1),m[3]||(m[3]=e.createElementVNode("span",null,"•",-1)),e.createElementVNode("span",null,"Date: "+e.toDisplayString(s(n.item.createdAt)),1)]),e.createElementVNode("div",Gt,[e.createElementVNode("button",{onClick:m[0]||(m[0]=h=>g(n.item.path,n.item.name)),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border h-9 rounded-md px-3"},[e.createVNode(e.unref(A),{class:"h-3 w-3 mr-1"}),m[4]||(m[4]=e.createTextVNode(" Download ",-1))]),e.createElementVNode("button",{onClick:m[1]||(m[1]=h=>o(n.item.path)),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border h-9 rounded-md px-3"},[e.createVNode(e.unref(ge),{class:"h-3 w-3 mr-1"}),m[5]||(m[5]=e.createTextVNode(" Share ",-1))])])])]),e.createElementVNode("button",{type:"button",onClick:m[2]||(m[2]=h=>n.$emit("close")),class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},[e.createVNode(e.unref(S),{class:"h-4 w-4"}),m[6]||(m[6]=e.createElementVNode("span",{class:"sr-only"},"Close",-1))])]),e.createVNode(U,{ref_key:"copyNotificationRef",ref:l},null,512)]))}}),Zt={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Jt=["onClick"],Xt=["src","alt"],I=e.defineComponent({__name:"GalleryWidget",props:{title:{},items:{},columns:{},maxHeight:{},id:{},className:{},style:{}},setup(a){const l=a,s=e.ref(!1),t=e.ref(null),o=e.ref(),g=e.ref(0);let n=null;const m=e.computed(()=>{const r=l.columns||4;return g.value>=1440?r:g.value>=1024?Math.max(1,r-1):g.value>=768?Math.max(1,r-2):g.value>=640?Math.max(1,r-3):1}),h=()=>{o.value&&(g.value=o.value.offsetWidth)};e.onMounted(()=>{e.nextTick(()=>{o.value&&(n=new ResizeObserver(r=>{for(const y of r)y.target===o.value&&(g.value=y.contentRect.width)}),n.observe(o.value),h())})}),e.onUnmounted(()=>{n&&n.disconnect()});const p=r=>{t.value=r,s.value=!0};return(r,y)=>(e.openBlock(),e.createElementBlock("div",{class:"w-full mx-auto font-sans",ref_key:"containerRef",ref:o},[r.title?(e.openBlock(),e.createElementBlock("h3",Zt,e.toDisplayString(r.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(r.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:r.maxHeight+"px"})},[e.createElementVNode("div",{style:e.normalizeStyle({columns:m.value+" auto",gap:"12px"}),class:"space-y-3"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.items,d=>(e.openBlock(),e.createElementBlock("div",{key:d.id,onClick:k=>p(d),class:"group relative break-inside-avoid bg-gray-200 rounded-lg overflow-hidden cursor-pointer hover:shadow-md transition-all mb-3"},[e.createElementVNode("img",{src:d.path,alt:d.name,class:"w-full h-auto min-h-40 rounded-md object-contain"},null,8,Xt),y[1]||(y[1]=e.createElementVNode("div",{class:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent p-4 pt-12"},[e.createElementVNode("h3",{class:"text-white font-medium text-base leading-tight mb-1"},"Mountain Landscape"),e.createElementVNode("p",{class:"text-white/90 text-sm"},"2.4 MB")],-1)),y[2]||(y[2]=e.createElementVNode("div",{class:"absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors duration-200"},null,-1))],8,Jt))),128))],4)],6),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[s.value&&t.value?(e.openBlock(),e.createBlock(Kt,{key:0,item:t.value,onClose:y[0]||(y[0]=d=>s.value=!1)},null,8,["item"])):e.createCommentVNode("",!0)]))],512))}}),Qt={class:"text-value"},Yt={class:"text-sm text-gray-900"},vt=C(e.defineComponent({__name:"TextValue",props:{item:{}},setup(a){const l=a,s=e.computed(()=>{const t=l.item.value;return typeof t=="boolean"?t?"Так":"Ні":t==null?"—":String(t)});return(t,o)=>(e.openBlock(),e.createElementBlock("div",Qt,[e.createElementVNode("span",Yt,e.toDisplayString(s.value),1)]))}}),[["__scopeId","data-v-c14550b7"]]),eo={class:"link-value"},to=["href"],oo=C(e.defineComponent({__name:"LinkValue",props:{item:{}},setup(a){const l=a,s=e.computed(()=>{const t=String(l.item.value);try{const o=new URL(t);return o.hostname+o.pathname}catch{return t}});return(t,o)=>(e.openBlock(),e.createElementBlock("div",eo,[e.createElementVNode("a",{href:String(t.item.value),target:"_blank",rel:"noopener noreferrer",class:"text-blue-600 hover:text-blue-800 underline text-sm"},[e.createTextVNode(e.toDisplayString(s.value)+" ",1),o[0]||(o[0]=e.createElementVNode("i",{class:"fas fa-external-link-alt ml-1 text-xs"},null,-1))],8,to)]))}}),[["__scopeId","data-v-e6eb07a6"]]),no={class:"date-value"},so={class:"text-sm text-gray-900"},lo=C(e.defineComponent({__name:"DateValue",props:{item:{}},setup(a){const l=a,s=e.computed(()=>{const t=l.item.value;if(t instanceof Date)return t.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});if(typeof t=="string"){const o=new Date(t);if(!isNaN(o.getTime()))return o.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}return String(t)});return(t,o)=>(e.openBlock(),e.createElementBlock("div",no,[e.createElementVNode("span",so,e.toDisplayString(s.value),1)]))}}),[["__scopeId","data-v-b9600618"]]),ao={class:"status-value"},ro={key:0,class:"mr-1"},io=C(e.defineComponent({__name:"StatusValue",props:{item:{}},setup(a){const l=a,s=e.computed(()=>{switch(String(l.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"bg-green-100 text-green-800";case"inactive":case"неактивний":case"pending":case"очікує":return"bg-yellow-100 text-yellow-800";case"error":case"помилка":case"failed":case"неуспішно":return"bg-red-100 text-red-800";case"draft":case"чернетка":return"bg-gray-100 text-gray-800";default:return"bg-blue-100 text-blue-800"}}),t=e.computed(()=>{switch(String(l.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"fas fa-check-circle";case"inactive":case"неактивний":case"pending":case"очікує":return"fas fa-clock";case"error":case"помилка":case"failed":case"неуспішно":return"fas fa-exclamation-circle";case"draft":case"чернетка":return"fas fa-edit";default:return"fas fa-info-circle"}});return(o,g)=>(e.openBlock(),e.createElementBlock("div",ao,[e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",s.value])},[t.value?(e.openBlock(),e.createElementBlock("span",ro,[e.createElementVNode("i",{class:e.normalizeClass(t.value)},null,2)])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(String(o.item.value)),1)],2)]))}}),[["__scopeId","data-v-c72e0b01"]]),co={class:"custom-value"},mo={class:"text-sm text-gray-900"},po=C(e.defineComponent({__name:"CustomValue",props:{item:{}},setup(a){return(l,s)=>(e.openBlock(),e.createElementBlock("div",co,[e.renderSlot(l.$slots,"default",{item:l.item,value:l.item.value},()=>[e.createElementVNode("span",mo,e.toDisplayString(String(l.item.value)),1)],!0)]))}}),[["__scopeId","data-v-11a73810"]]),fo=["id"],go={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},ho={key:1,class:"overflow-x-auto"},yo={class:"min-w-full divide-y divide-gray-200"},ko={class:"bg-white divide-y divide-gray-200"},bo={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},xo={class:"flex items-center gap-2"},uo=["title"],_o={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},wo={key:2,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},Eo={class:"flex items-start gap-3"},Vo={key:0,class:"flex-shrink-0"},No={class:"flex-1 min-w-0"},Bo={class:"flex items-center gap-2 mb-2"},Co={class:"text-sm font-medium text-gray-900"},$o=["title"],Mo={key:3,class:"overflow-x-auto"},Do={class:"min-w-full divide-y divide-gray-200"},Lo={class:"bg-white divide-y divide-gray-200"},So={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},zo={class:"flex items-center gap-2"},To=["title"],Fo={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},P=C(e.defineComponent({__name:"DescriptionListWidget",props:{title:{},items:{},view:{},id:{},className:{},style:{}},setup(a){const l=s=>{switch(s.type){case"link":return oo;case"date":return lo;case"status":return io;case"custom":return po;default:return vt}};return(s,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["description-list-widget",s.className]),id:s.id,style:e.normalizeStyle(s.style)},[s.title?(e.openBlock(),e.createElementBlock("h3",go,e.toDisplayString(s.title),1)):e.createCommentVNode("",!0),s.view==="table"?(e.openBlock(),e.createElementBlock("div",ho,[e.createElementVNode("table",yo,[e.createElementVNode("tbody",ko,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,o=>(e.openBlock(),e.createElementBlock("tr",{key:o.id||o.label},[e.createElementVNode("td",bo,[e.createElementVNode("div",xo,[o.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([o.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(o.label)+" ",1),o.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:o.tooltip},t[0]||(t[0]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,uo)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",_o,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(o)),{item:o},null,8,["item"]))])]))),128))])])])):s.view==="grid"?(e.openBlock(),e.createElementBlock("div",wo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,o=>(e.openBlock(),e.createElementBlock("div",{key:o.id||o.label,class:"description-item-card bg-white border border-gray-200 rounded-lg p-4"},[e.createElementVNode("div",Eo,[o.icon?(e.openBlock(),e.createElementBlock("div",Vo,[e.createElementVNode("i",{class:e.normalizeClass([o.icon,"text-gray-500 text-lg"])},null,2)])):e.createCommentVNode("",!0),e.createElementVNode("div",No,[e.createElementVNode("div",Bo,[e.createElementVNode("h4",Co,e.toDisplayString(o.label),1),o.tooltip?(e.openBlock(),e.createElementBlock("span",{key:0,class:"text-gray-400 cursor-help",title:o.tooltip},t[1]||(t[1]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,$o)):e.createCommentVNode("",!0)]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(o)),{item:o},null,8,["item"]))])])]))),128))])):(e.openBlock(),e.createElementBlock("div",Mo,[e.createElementVNode("table",Do,[e.createElementVNode("tbody",Lo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,o=>(e.openBlock(),e.createElementBlock("tr",{key:o.id||o.label},[e.createElementVNode("td",So,[e.createElementVNode("div",zo,[o.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([o.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(o.label)+" ",1),o.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:o.tooltip},t[2]||(t[2]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,To)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",Fo,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(o)),{item:o},null,8,["item"]))])]))),128))])])]))],14,fo))}}),[["__scopeId","data-v-36d43e50"]]),Io={draw:{toolbar:{actions:{title:"Скасувати малювання",text:"Скасувати"},finish:{title:"Завершити малювання",text:"Завершити"},undo:{title:"Видалити останню точку",text:"Видалити останню"},buttons:{polyline:"Намалювати лінію",polygon:"Намалювати полігон",rectangle:"Намалювати прямокутник",circle:"Намалювати коло",marker:"Додати точку",circlemarker:"Додати маркер-коло"}},handlers:{circle:{tooltip:{start:"Клацніть і тягніть, щоб намалювати коло",end:"Відпустіть кнопку миші, щоб завершити"},radius:"Радіус"},circlemarker:{tooltip:{start:"Клацніть на карту, щоб додати маркер-коло"}},marker:{tooltip:{start:"Клацніть на карту, щоб додати точку"}},polygon:{tooltip:{start:"Клацніть, щоб почати малювати полігон",cont:"Клацайте, щоб продовжити малювати полігон",end:"Клацніть першу точку, щоб завершити полігон"}},polyline:{error:"<strong>Помилка:</strong> лінія не може перетинатися сама з собою",tooltip:{start:"Клацніть, щоб почати малювати лінію",cont:"Клацайте, щоб продовжити малювати лінію",end:"Клацніть останню точку, щоб завершити лінію"}},rectangle:{tooltip:{start:"Клацніть і тягніть, щоб намалювати прямокутник",end:"Відпустіть кнопку миші, щоб завершити"}},simpleshape:{tooltip:{end:"Відпустіть кнопку миші, щоб завершити"}}}},edit:{toolbar:{actions:{save:{title:"Зберегти зміни",text:"Зберегти"},cancel:{title:"Скасувати редагування",text:"Скасувати"},clearAll:{title:"Очистити всі шари",text:"Очистити все"}},buttons:{edit:"Редагувати шари",editDisabled:"Немає шарів для редагування",remove:"Видалити шари",removeDisabled:"Немає шарів для видалення"}},handlers:{edit:{tooltip:{text:"Перетягніть маркери, щоб редагувати шари",subtext:"Натисніть 'Скасувати', щоб повернутися"}},remove:{tooltip:{text:"Клацніть на шари, щоб видалити їх"}}}}};function jo(a){return a?a.type==="FeatureCollection"||a.type==="Feature"?a:a.geom?{type:"Feature",geometry:{type:a.geom.type,coordinates:a.geom.coordinates},properties:{}}:a.type&&a.coordinates?{type:"Feature",geometry:a,properties:{}}:null:null}const Ho={class:"relative min-h-[300px] pb-[3.25rem]"},Ao={key:1,class:"bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"},Oo={class:"flex items-center justify-between p-2 border-b"},Ro={class:"p-2 border-b"},Uo={class:"flex items-center"},Po={class:"flex items-center"},Wo={class:"flex items-center"},qo={class:"p-2"},Go={class:"flex items-center"},j=e.defineComponent({__name:"MapWidget",props:{geom:{},id:{},className:{},style:{}},setup(a){const l=a,s=e.ref(null);let t,o;const g={topo100:{url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"},orto10:{url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png"},osmb:{url:"https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"}},n=e.ref("topo100");let m;const h=e.ref(!0),p=e.ref(!1);function r(){return new Promise((w,i)=>{if(window.L&&window.L.Draw)return w(0);const f=x=>{if(Array.from(document.styleSheets).some(N=>N?.href?.includes(x)))return;const c=document.createElement("link");c.rel="stylesheet",c.href=x,document.head.appendChild(c)},V=x=>new Promise((b,c)=>{const N=Array.from(document.scripts).find(_=>_.src===x);if(N){N.addEventListener("load",()=>b()),N.addEventListener("error",_=>c(_));return}const B=document.createElement("script");B.src=x,B.async=!0,B.onload=()=>b(),B.onerror=_=>c(_),document.body.appendChild(B)});f("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),f("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"),V("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(()=>V("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(()=>w(0)).catch(i)})}e.onMounted(async()=>{await r(),L.drawLocal=Io,t=L.map(s.value,{zoomControl:!1}).setView([50,30],10),L.control.zoom({position:"bottomright"}).addTo(t),m=L.tileLayer(g.topo100.url,{maxZoom:19}).addTo(t),n.value="topo100",o=new L.FeatureGroup().addTo(t);const w=jo(l.geom);if(w){const i=[];L.geoJSON(w).eachLayer(f=>i.push(f)),i.length&&o.addLayer(i[0]),o.toGeoJSON(),y()}});function y(w=30){const i=o.getLayers();if(!i.length)return;const V=L.featureGroup(i).getBounds();V&&V.isValid()&&t.fitBounds(V,{padding:[w,w]})}function d(w){m&&m.removeFrom(t);const i=g[w];m=L.tileLayer(i.url,i.options||{}).addTo(t),n.value=w}function k(){d(n.value)}function M(){o&&(h.value?o.addTo(t):o.removeFrom(t))}return(w,i)=>(e.openBlock(),e.createElementBlock("div",Ho,[e.createElementVNode("div",{ref_key:"mapContainer",ref:s,class:"w-full h-full"},null,512),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:i[0]||(i[0]=f=>p.value=!0),class:"z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer"}," Шари ")),p.value?(e.openBlock(),e.createElementBlock("div",Ao,[e.createElementVNode("div",Oo,[i[7]||(i[7]=e.createElementVNode("div",null,"Шари",-1)),(e.openBlock(),e.createElementBlock("svg",{onClick:i[1]||(i[1]=f=>p.value=!1),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-x w-4 h-4"},i[6]||(i[6]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)])))]),e.createElementVNode("div",Ro,[e.createElementVNode("div",null,[e.createElementVNode("label",Uo,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"base-layer",value:"topo100","onUpdate:modelValue":i[2]||(i[2]=f=>n.value=f),onChange:k},null,544),[[e.vModelRadio,n.value]]),i[8]||(i[8]=e.createElementVNode("span",{class:"ml-2"},"Карта України",-1))])]),e.createElementVNode("div",null,[e.createElementVNode("label",Po,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"base-layer",value:"orto10","onUpdate:modelValue":i[3]||(i[3]=f=>n.value=f),onChange:k},null,544),[[e.vModelRadio,n.value]]),i[9]||(i[9]=e.createElementVNode("span",{class:"ml-2"},"Ortophoto 1:10К",-1))])]),e.createElementVNode("div",null,[e.createElementVNode("label",Wo,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"base-layer",value:"osmb","onUpdate:modelValue":i[4]||(i[4]=f=>n.value=f),onChange:k},null,544),[[e.vModelRadio,n.value]]),i[10]||(i[10]=e.createElementVNode("span",{class:"ml-2"},"Open Street Map",-1))])])]),e.createElementVNode("div",qo,[e.createElementVNode("label",Go,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":i[5]||(i[5]=f=>h.value=f),onChange:M},null,544),[[e.vModelCheckbox,h.value]]),i[11]||(i[11]=e.createElementVNode("span",{class:"ml-2"}," Показати геометрію ",-1))])])])):e.createCommentVNode("",!0)]))}}),Ko={"vs-widget-map":j,"vs-widget-comments":z,"vs-widget-history":T,"vs-widget-gallery":I,"vs-widget-file":F,"vs-widget-list":P},Zo={key:0,class:"overflow-hidden"},Jo={class:"flex border-b border-gray-200 bg-gray-50"},Xo=["onClick"],Qo={class:"p-1"},Yo=["innerHTML"],vo={key:1,class:"p-1"},en={class:"grid grid-cols-12 gap-4"},tn={key:0,class:"mb-4 pb-2 border-b border-gray-200"},on={class:"text-lg font-semibold text-gray-900"},nn=["innerHTML"],H=e.defineComponent({__name:"Card",props:{panels:{default:()=>[]},data:{default:()=>({})},view:{default:"plain"},classWrapper:{default:""},classPanel:{},normalizeTabs:{type:Boolean,default:!1},id:{},className:{},style:{}},setup(a){const l=a,s=e.ref(0);function t(r){return Ko[r]||r}function o(r){const y=[];for(const d of r){if(!d?.items){y.push(d);continue}if(d.items.length===1){let k=d.items[0];delete d.items,k={...d,...k},y.push(k)}else{const k=d;k.component="Card",d.type&&(k.view=d.type.includes("tab")?"tab":"plain"),k.panels=d.items,k.data=l.data,k.normalizeTabs=!1,y.push(k)}}return y}const g=e.computed(()=>l.panels&&l.panels.length>0?l.normalizeTabs?o(l.panels):l.panels:l.data&&Array.isArray(l.data)?l.data.filter(y=>y.type==="tabs")[0]?.items||[]:[]),n=e.computed(()=>l.panels&&l.panels.length>0?l.normalizeTabs?o(l.panels):l.panels:l.data&&Array.isArray(l.data)?l.data:[]),m=e.computed(()=>({[`view-${l.view}`]:!0})),h=r=>{const y=l.data?{...l.data}:{};return r.count&&(y.count=r.count),r.col&&(y.col=r.col),y},p=r=>r.width?{gridColumn:`span ${r.width}`}:{};return(r,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(m.value+r.classWrapper)},[r.view==="tab"?(e.openBlock(),e.createElementBlock("div",Zo,[e.createElementVNode("div",Jo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(d,k)=>(e.openBlock(),e.createElementBlock("button",{key:d.name||k,onClick:M=>s.value=k,class:e.normalizeClass(["px-4 py-3 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-100 transition-colors",{"text-blue-600 bg-white border-b-2 border-blue-600":s.value===k}])},e.toDisplayString(d.title||d.label||d.name||`Tab ${k+1}`),11,Xo))),128))]),e.createElementVNode("div",Qo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(d,k)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:d.name||k,class:e.normalizeClass([r.classPanel||"w-full border-gray-100",`col-span-${d.col||12}`])},[d.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:d.html,class:"text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"},null,8,Yo)):r.$slots[`tab-${k}`]?e.renderSlot(r.$slots,`tab-${k}`,{key:1,item:d,data:r.data}):d.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.component),e.mergeProps({key:2,ref_for:!0},d.component==="Card"?d:h(d),{class:"w-full h-full"}),null,16)):e.renderSlot(r.$slots,d.slot||`tab-${k}`,{key:3,item:d,data:r.data})],2)),[[e.vShow,s.value===k]])),128))])])):(e.openBlock(),e.createElementBlock("div",vo,[e.createElementVNode("div",en,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(d,k)=>(e.openBlock(),e.createElementBlock("div",{key:d.name||k,class:e.normalizeClass([r.classPanel||"bg-gray-50 rounded-lg p-4 border-gray-100",`col-span-${d.col||12}`]),style:e.normalizeStyle(p(d))},[d.title||d.label?(e.openBlock(),e.createElementBlock("div",tn,[e.createElementVNode("h3",on,e.toDisplayString(d.title||d.label),1)])):e.createCommentVNode("",!0),d.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:d.html,class:"text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"},null,8,nn)):r.$slots[`panel-${k}`]?e.renderSlot(r.$slots,`panel-${k}`,{key:2,item:d,data:r.data}):d.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t(d.component)),e.mergeProps({key:3,ref_for:!0},d.component==="Card"?d:h(d),{class:"w-full h-full"}),null,16)):e.renderSlot(r.$slots,d.slot||`panel-${k}`,{key:4,item:d,data:r.data})],6))),128))])]))],2))}}),sn=["innerHTML"],Y=e.defineComponent({__name:"CardItem",props:{name:{},label:{},component:{},slot:{},col:{default:12},html:{},title:{},id:{},className:{},style:{}},setup(a){const l=a,s=e.computed(()=>({[`col-span-${l.col}`]:!0})),t=e.computed(()=>{const o={};return o.col&&(o.col=o.col),o});return(o,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["w-full",s.value])},[o.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:o.html,class:"text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"},null,8,sn)):o.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.component),e.mergeProps({key:1},t.value,{class:"w-full"}),null,16)):e.renderSlot(o.$slots,"default",{key:2})],2))}});H.install=function(a){a.component("vs-widget-file",F),a.component("vs-widget-comments",z),a.component("vs-widget-history",T),a.component("vs-widget-gallery",I),a.component("vs-widget-map",j),a.component("CommentsWidget",z),a.component("HistoryWidget",T),a.component("GalleryWidget",I),a.component("FilesWidget",F),a.component("MapWidget",j),a.component("Card",H),a.component("CardItem",Y),a.component("DescriptionListWidget",P),a.component("CopyNotification",U)},E.Card=H,E.CardItem=Y,E.CommentsWidget=z,E.CopyNotification=U,E.DescriptionListWidget=P,E.FilesWidget=F,E.GalleryWidget=I,E.HistoryWidget=T,E.MapWidget=j,E.default=H,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export interface ICardItem {
|
|
|
14
14
|
title?: string;
|
|
15
15
|
type?: string;
|
|
16
16
|
count?: number;
|
|
17
|
+
items?: ICardItem[];
|
|
17
18
|
}
|
|
18
19
|
export interface ICard {
|
|
19
20
|
panels?: ICardItem[];
|
|
@@ -50,7 +51,7 @@ export interface Comment {
|
|
|
50
51
|
}
|
|
51
52
|
export interface CommentsWidgetProps extends BaseWidgetProps {
|
|
52
53
|
title?: string;
|
|
53
|
-
comments
|
|
54
|
+
comments?: Comment[];
|
|
54
55
|
maxHeight?: number;
|
|
55
56
|
onAddComment?: (content: string) => void;
|
|
56
57
|
onReply?: (commentId: string, content: string) => void;
|
|
@@ -74,10 +75,13 @@ export interface HistoryItem {
|
|
|
74
75
|
status: 'success' | 'error' | 'pending';
|
|
75
76
|
}
|
|
76
77
|
export interface HistoryWidgetProps extends BaseWidgetProps {
|
|
77
|
-
data
|
|
78
|
+
data?: HistoryItem[];
|
|
78
79
|
title?: string;
|
|
79
80
|
maxHeight?: number;
|
|
80
81
|
}
|
|
82
|
+
export interface MapWidgetProps extends BaseWidgetProps {
|
|
83
|
+
geom?: object;
|
|
84
|
+
}
|
|
81
85
|
export interface FileItem {
|
|
82
86
|
id: string;
|
|
83
87
|
entityId: string;
|
|
@@ -98,10 +102,10 @@ export interface FileItem {
|
|
|
98
102
|
uploaded_name?: string;
|
|
99
103
|
ext?: string;
|
|
100
104
|
}
|
|
101
|
-
export interface FileListType {
|
|
105
|
+
export interface FileListType extends BaseWidgetProps {
|
|
102
106
|
title?: string;
|
|
103
107
|
view?: 'grid' | 'list' | 'compact';
|
|
104
|
-
files
|
|
108
|
+
files?: FileItem[];
|
|
105
109
|
maxHeight?: number;
|
|
106
110
|
onAddFile?: (event: Event) => void;
|
|
107
111
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC5B;AAGD,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC5B;AAGD,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,SAAS,EAAE,CAAA;CACpB;AAED,MAAM,WAAW,KAAK;IACpB,MAAM,CAAC,EAAE,SAAS,EAAE,CAAA;IACpB,IAAI,CAAC,EAAE,GAAG,CAAA;IACV,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,SAAU,SAAQ,eAAe;IAChD,MAAM,CAAC,EAAE,SAAS,EAAE,CAAA;IACpB,IAAI,CAAC,EAAE,GAAG,CAAA;IACV,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,aAAc,SAAQ,eAAe;IACpD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAGD,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACxC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACtD,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,GAAG,QAAQ,KAAK,IAAI,CAAA;IAC9D,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACtD;AAGD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;IAChD,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,GAAG,CAAC;QAAC,GAAG,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC;IACjD,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;CACzC;AAED,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,IAAI,CAAC,EAAE,WAAW,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IAEjB,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IAC1C,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAGD,MAAM,WAAW,YAAa,SAAQ,eAAe;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACnC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAGD,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;IACvC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAA;IACrD,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAA;CACpC;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,0BAA2B,SAAQ,eAAe;IACjE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;CACxB"}
|
|
@@ -3,6 +3,9 @@ interface Props extends CardProps {
|
|
|
3
3
|
panels?: ICardItem[];
|
|
4
4
|
data?: any;
|
|
5
5
|
view?: 'tab' | 'plain';
|
|
6
|
+
classWrapper?: string;
|
|
7
|
+
classPanel?: string;
|
|
8
|
+
normalizeTabs?: boolean;
|
|
6
9
|
}
|
|
7
10
|
declare var __VLS_2: `tab-${number}`, __VLS_3: {
|
|
8
11
|
item: any;
|
|
@@ -30,6 +33,8 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {},
|
|
|
30
33
|
panels: ICardItem[];
|
|
31
34
|
data: any;
|
|
32
35
|
view: "tab" | "plain";
|
|
36
|
+
classWrapper: string;
|
|
37
|
+
normalizeTabs: boolean;
|
|
33
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
39
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
35
40
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.vue.d.ts","sourceRoot":"","sources":["../../../src/widgets/card/Card.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Card.vue.d.ts","sourceRoot":"","sources":["../../../src/widgets/card/Card.vue"],"names":[],"mappings":"AAiOA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvD,UAAU,KAAM,SAAQ,SAAS;IAC/B,MAAM,CAAC,EAAE,SAAS,EAAE,CAAA;IACpB,IAAI,CAAC,EAAE,GAAG,CAAA;IACV,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AA+UD,QAAA,IAAI,OAAO,iBAAU,EAAE,OAAO;;;CAAU,EAAE,QAAQ,KAAU,EAAE,QAAQ;;;CAAU,EAAE,QAAQ,mBAAW,EAAE,QAAQ;;;CAAW,EAAE,QAAQ,KAAW,EAAE,QAAQ;;;CAAY,CAAE;AACvK,KAAK,WAAW,GAAG,EAAE,GACnB;KAAG,CAAC,IAAI,WAAW,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG;CAAE,GACvE;KAAG,CAAC,IAAI,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG;CAAE,GACzE;KAAG,CAAC,IAAI,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG;CAAE,GACzE;KAAG,CAAC,IAAI,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG;CAAE,CAAC;AA2B5E,QAAA,MAAM,eAAe;YArXV,SAAS,EAAE;UACb,GAAG;UACH,KAAK,GAAG,OAAO;kBACP,MAAM;mBAEL,OAAO;6EAuXvB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { FileListType } from "../../types";
|
|
1
|
+
import type { FileListType, FileItem } from "../../types";
|
|
2
2
|
type __VLS_Props = FileListType & {
|
|
3
3
|
onAddFile?: (event: Event) => void;
|
|
4
|
+
onDelete?: (id: string) => void;
|
|
4
5
|
};
|
|
5
6
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
7
|
add: (event: Event) => any;
|
|
@@ -10,6 +11,8 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
10
11
|
onAdd?: ((event: Event) => any) | undefined;
|
|
11
12
|
onDelete?: ((id: string) => any) | undefined;
|
|
12
13
|
onOpenLightbox?: ((event: Event) => any) | undefined;
|
|
13
|
-
}>, {
|
|
14
|
+
}>, {
|
|
15
|
+
files: FileItem[];
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
17
|
export default _default;
|
|
15
18
|
//# sourceMappingURL=FilesWidget.vue.d.ts.map
|