@opengis/cms 0.0.44 → 0.0.45
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/README.md +98 -98
- package/dist/{en-OTy187va.js → en-sWmaB9uu.js} +3 -1
- package/dist/index.html +29 -29
- package/dist/index.js +4208 -4125
- package/dist/index.umd.cjs +70 -65
- package/dist/{uk-Dy2psXBp.js → uk-rH4IPxG5.js} +4 -2
- package/input-types.json +9 -9
- package/module/cms/cls/content.status.json +17 -17
- package/module/cms/cls/user_type.json +9 -9
- package/module/cms/form/admin.users.form.json +77 -77
- package/module/cms/select/cms.page_type.sql +1 -1
- package/module/cms/select/news_tag_id.sql +11 -11
- package/module/cms/table/admin.users.table.json +53 -53
- package/module/cms/table/collection.default.table.json +96 -96
- package/module/cms/table/single.default.table.json +116 -116
- package/package.json +3 -3
- package/plugin.js +43 -43
- package/server/app.js +35 -35
- package/server/config.js +4 -4
- package/server/functions/getDraftKey.js +22 -22
- package/server/index.js +22 -22
- package/server/migrations/fixes.sql +124 -124
- package/server/migrations/site.sql +595 -595
- package/server/plugins/adminHook.js +78 -78
- package/server/plugins/hook.js +59 -59
- package/server/plugins/vite.js +75 -75
- package/server/routes/category/controllers/cms.category.delete.js +21 -21
- package/server/routes/category/controllers/cms.category.get.js +17 -17
- package/server/routes/category/controllers/cms.category.list.js +16 -16
- package/server/routes/category/controllers/cms.category.post.js +21 -21
- package/server/routes/category/controllers/cms.category.put.js +23 -23
- package/server/routes/category/index.mjs +22 -22
- package/server/routes/cms/controllers/cmsStat.js +55 -55
- package/server/routes/cms/controllers/cmsSuggest.js +57 -57
- package/server/routes/cms/controllers/deleteContent.js +113 -113
- package/server/routes/cms/controllers/deleteMedia.js +76 -76
- package/server/routes/cms/controllers/downloadMedia.js +84 -49
- package/server/routes/cms/controllers/getContent.js +110 -110
- package/server/routes/cms/controllers/getContentBySlug.js +93 -93
- package/server/routes/cms/controllers/getPermissions.js +15 -15
- package/server/routes/cms/controllers/insertContent.js +217 -217
- package/server/routes/cms/controllers/listMedia.js +108 -94
- package/server/routes/cms/controllers/metadataMedia.js +39 -39
- package/server/routes/cms/controllers/properties.get.js +53 -53
- package/server/routes/cms/controllers/properties.post.js +99 -99
- package/server/routes/cms/controllers/searchContent.js +205 -205
- package/server/routes/cms/controllers/setPermissions.js +49 -49
- package/server/routes/cms/controllers/translate.js +89 -89
- package/server/routes/cms/controllers/updateContent.js +238 -238
- package/server/routes/cms/controllers/uploadMedia.js +79 -79
- package/server/routes/cms/index.mjs +112 -112
- package/server/routes/cms/utils/additionalData.js +35 -35
- package/server/routes/cms/utils/getCollection.js +82 -82
- package/server/routes/cms/utils/getSingle.js +187 -187
- package/server/routes/cms/utils/inputTypes.js +5 -5
- package/server/routes/cms/utils/insertContentLocalization.js +86 -86
- package/server/routes/cms/utils/requestTranslation.js +85 -85
- package/server/routes/cms/utils/updateLocalization.js +47 -47
- package/server/routes/cmsSpace/controllers/deleteSpace.js +25 -25
- package/server/routes/cmsSpace/controllers/getSpaces.js +27 -27
- package/server/routes/cmsSpace/controllers/insertSpace.js +21 -21
- package/server/routes/cmsSpace/controllers/updateSpace.js +23 -23
- package/server/routes/cmsSpace/index.mjs +20 -20
- package/server/routes/contentType/controllers/addContentType.js +162 -162
- package/server/routes/contentType/controllers/contentTypeList.js +54 -54
- package/server/routes/contentType/controllers/delContentType.js +75 -75
- package/server/routes/contentType/controllers/editContentType.js +61 -61
- package/server/routes/contentType/controllers/getContentType.js +37 -37
- package/server/routes/contentType/index.mjs +35 -35
- package/server/routes/contentType/utils/updateContents.js +28 -28
- package/server/routes/contentType/utils/updateCustomContentTable.js +53 -53
- package/server/routes/feedback/controllers/email.list.js +24 -24
- package/server/routes/feedback/controllers/feedback.js +48 -48
- package/server/routes/feedback/controllers/feedback.list.js +37 -37
- package/server/routes/feedback/controllers/news.subscriptions.js +44 -44
- package/server/routes/feedback/index.mjs +71 -71
- package/server/routes/logs/controllers/export.user.logs.js +77 -77
- package/server/routes/logs/controllers/user.logs.js +44 -44
- package/server/routes/logs/index.mjs +9 -9
- package/server/routes/menu/controllers/addMenu.js +37 -37
- package/server/routes/menu/controllers/delMenu.js +31 -31
- package/server/routes/menu/controllers/editMenu.js +41 -41
- package/server/routes/menu/controllers/getMenu.js +42 -42
- package/server/routes/menu/index.mjs +13 -13
- package/server/routes/migration/controllers/collectionToCustom.js +137 -137
- package/server/routes/migration/index.mjs +8 -8
- package/server/routes/root.mjs +8 -8
- package/server/routes/tags/controllers/add.tags.js +24 -24
- package/server/routes/tags/controllers/del.tags.js +19 -19
- package/server/routes/tags/controllers/edit.tags.js +25 -25
- package/server/routes/tags/controllers/get.tags.js +15 -15
- package/server/routes/tags/index.mjs +14 -14
- package/server/templates/cls/cms.category_type.json +9 -9
- package/server/templates/cls/cms.content_review_status.json +9 -9
- package/server/templates/cls/cms.content_status.json +9 -9
- package/server/templates/cls/cms.content_type.json +9 -9
- package/server/templates/cls/cms.lang.json +9 -9
- package/server/templates/page/login.html +126 -126
- package/server/templates/select/core.user_mentioned.sql +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,267 +1,272 @@
|
|
|
1
|
-
(function(he,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vue-router"),require("@opengis/core"),require("@opengis/form"),require("@opengis/filter")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@opengis/core","@opengis/form","@opengis/filter"],t):(he=typeof globalThis<"u"?globalThis:he||self,t(he.cms={},he.Vue,he.vueRouter,he.openGIScore,he.openGISform,he.openGISfilter))})(this,function(he,t,
|
|
1
|
+
(function(he,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vue-router"),require("@opengis/core"),require("@opengis/form"),require("@opengis/filter")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@opengis/core","@opengis/form","@opengis/filter"],t):(he=typeof globalThis<"u"?globalThis:he||self,t(he.cms={},he.Vue,he.vueRouter,he.openGIScore,he.openGISform,he.openGISfilter))})(this,function(he,t,De,Q,Y,Mo){"use strict";/**
|
|
2
2
|
* @license lucide-vue-next v0.344.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
|
-
*/var
|
|
6
|
+
*/var $r={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
|
|
7
7
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const Os=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),
|
|
11
|
+
*/const Os=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),z=(e,r)=>({size:n,strokeWidth:o=2,absoluteStrokeWidth:a,color:l,class:s,...i},{attrs:c,slots:u})=>t.h("svg",{...$r,width:n||$r.width,height:n||$r.height,stroke:l||$r.stroke,"stroke-width":a?Number(o)*24/Number(n):o,...c,class:["lucide",`lucide-${Os(e)}`],...i},[...r.map(d=>t.h(...d)),...u.default?[u.default()]:[]]);/**
|
|
12
12
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
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 Bs=
|
|
16
|
+
*/const Bs=z("ActivityIcon",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]);/**
|
|
17
17
|
* @license lucide-vue-next v0.344.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 fn=
|
|
21
|
+
*/const fn=z("ArrowLeftIcon",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
22
22
|
* @license lucide-vue-next v0.344.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 Ir=
|
|
26
|
+
*/const Ir=z("CalendarIcon",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
27
27
|
* @license lucide-vue-next v0.344.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 Oo=z("CheckCircleIcon",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
32
32
|
* @license lucide-vue-next v0.344.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 Bo=z("CheckSquareIcon",[["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}],["path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11",key:"1jnkn4"}]]);/**
|
|
37
37
|
* @license lucide-vue-next v0.344.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 Fs=
|
|
41
|
+
*/const Fs=z("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
42
42
|
* @license lucide-vue-next v0.344.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 Fo=z("ChevronDownIcon",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
47
47
|
* @license lucide-vue-next v0.344.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 Ps=
|
|
51
|
+
*/const Ps=z("ChevronLeftIcon",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
52
52
|
* @license lucide-vue-next v0.344.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 Ut=z("ChevronRightIcon",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
57
57
|
* @license lucide-vue-next v0.344.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 Rs=
|
|
61
|
+
*/const Rs=z("ClockIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
62
62
|
* @license lucide-vue-next v0.344.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 gn=
|
|
66
|
+
*/const gn=z("DownloadIcon",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
67
67
|
* @license lucide-vue-next v0.344.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 Us=
|
|
71
|
+
*/const Us=z("ExternalLinkIcon",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
72
72
|
* @license lucide-vue-next v0.344.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 hn=
|
|
76
|
+
*/const hn=z("EyeIcon",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
77
77
|
* @license lucide-vue-next v0.344.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
|
|
81
|
+
*/const sr=z("FileTextIcon",[["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"}]]);/**
|
|
82
82
|
* @license lucide-vue-next v0.344.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
|
|
86
|
+
*/const jt=z("FileIcon",[["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"}]]);/**
|
|
87
87
|
* @license lucide-vue-next v0.344.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
|
|
91
|
+
*/const Po=z("FolderIcon",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
92
92
|
* @license lucide-vue-next v0.344.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 js=
|
|
96
|
+
*/const js=z("GlobeIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
97
97
|
* @license lucide-vue-next v0.344.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
|
|
101
|
+
*/const Ro=z("GripVerticalIcon",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
102
102
|
* @license lucide-vue-next v0.344.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
|
|
106
|
+
*/const Uo=z("HashIcon",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
|
|
107
107
|
* @license lucide-vue-next v0.344.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
|
|
111
|
+
*/const wt=z("HelpCircleIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
112
112
|
* @license lucide-vue-next v0.344.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 ir=z("ImageIcon",[["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"}]]);/**
|
|
117
117
|
* @license lucide-vue-next v0.344.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
|
|
121
|
+
*/const qt=z("LayersIcon",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
|
|
122
122
|
* @license lucide-vue-next v0.344.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 qs=
|
|
126
|
+
*/const qs=z("LayoutGridIcon",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
|
|
127
127
|
* @license lucide-vue-next v0.344.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 Hs=
|
|
131
|
+
*/const Hs=z("LayoutTemplateIcon",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);/**
|
|
132
132
|
* @license lucide-vue-next v0.344.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
|
|
136
|
+
*/const jo=z("LinkIcon",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
|
|
137
137
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
138
138
|
*
|
|
139
139
|
* This source code is licensed under the ISC license.
|
|
140
140
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const
|
|
141
|
+
*/const qo=z("ListTreeIcon",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);/**
|
|
142
142
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
143
143
|
*
|
|
144
144
|
* This source code is licensed under the ISC license.
|
|
145
145
|
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const
|
|
146
|
+
*/const Lr=z("ListIcon",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/**
|
|
147
147
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
148
148
|
*
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const bn=
|
|
151
|
+
*/const bn=z("Loader2Icon",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
152
152
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
153
153
|
*
|
|
154
154
|
* This source code is licensed under the ISC license.
|
|
155
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const yn=
|
|
156
|
+
*/const yn=z("PencilIcon",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
157
157
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the ISC license.
|
|
160
160
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const
|
|
161
|
+
*/const pt=z("PlusIcon",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
162
162
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
163
163
|
*
|
|
164
164
|
* This source code is licensed under the ISC license.
|
|
165
165
|
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const _n=
|
|
166
|
+
*/const _n=z("SaveIcon",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]);/**
|
|
167
167
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
168
168
|
*
|
|
169
169
|
* This source code is licensed under the ISC license.
|
|
170
170
|
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const
|
|
171
|
+
*/const kn=z("SearchIcon",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
172
172
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
173
173
|
*
|
|
174
174
|
* This source code is licensed under the ISC license.
|
|
175
175
|
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const
|
|
176
|
+
*/const Gs=z("SettingsIcon",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
177
177
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
178
178
|
*
|
|
179
179
|
* This source code is licensed under the ISC license.
|
|
180
180
|
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const
|
|
181
|
+
*/const Ht=z("SquarePenIcon",[["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.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z",key:"1lpok0"}]]);/**
|
|
182
182
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
183
183
|
*
|
|
184
184
|
* This source code is licensed under the ISC license.
|
|
185
185
|
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const
|
|
186
|
+
*/const ft=z("Trash2Icon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
187
187
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
188
188
|
*
|
|
189
189
|
* This source code is licensed under the ISC license.
|
|
190
190
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const
|
|
191
|
+
*/const Ws=z("TrashIcon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);/**
|
|
192
192
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
193
193
|
*
|
|
194
194
|
* This source code is licensed under the ISC license.
|
|
195
195
|
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const
|
|
196
|
+
*/const Mr=z("TypeIcon",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/**
|
|
197
197
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
198
198
|
*
|
|
199
199
|
* This source code is licensed under the ISC license.
|
|
200
200
|
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const
|
|
201
|
+
*/const Ys=z("UserIcon",[["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"}]]);/**
|
|
202
202
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
203
203
|
*
|
|
204
204
|
* This source code is licensed under the ISC license.
|
|
205
205
|
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const
|
|
206
|
+
*/const xn=z("UsersIcon",[["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"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
|
207
207
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
208
208
|
*
|
|
209
209
|
* This source code is licensed under the ISC license.
|
|
210
210
|
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const
|
|
211
|
+
*/const Ho=z("XCircleIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
212
212
|
* @license lucide-vue-next v0.344.0 - ISC
|
|
213
213
|
*
|
|
214
214
|
* This source code is licensed under the ISC license.
|
|
215
215
|
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const zs=
|
|
216
|
+
*/const zs=z("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
217
|
+
* @license lucide-vue-next v0.344.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const Ks=z("ZapIcon",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]);/*!
|
|
217
222
|
* shared v11.1.5
|
|
218
223
|
* (c) 2025 kazuya kawaguchi
|
|
219
224
|
* Released under the MIT License.
|
|
220
|
-
*/const
|
|
221
|
-
`)}function
|
|
225
|
+
*/const ot=typeof window<"u";let Xe,Tt;if(process.env.NODE_ENV!=="production"){const e=ot&&window.performance;e&&e.mark&&e.measure&&e.clearMarks&&e.clearMeasures&&(Xe=r=>{e.mark(r)},Tt=(r,n,o)=>{e.measure(r,n,o),e.clearMarks(n),e.clearMarks(o)})}const Xs=/\{([0-9a-zA-Z]+)\}/g;function Or(e,...r){return r.length===1&&oe(r[0])&&(r=r[0]),(!r||!r.hasOwnProperty)&&(r={}),e.replace(Xs,(n,o)=>r.hasOwnProperty(o)?r[o]:"")}const st=(e,r=!1)=>r?Symbol.for(e):Symbol(e),Qs=(e,r,n)=>Zs({l:e,k:r,s:n}),Zs=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Te=e=>typeof e=="number"&&isFinite(e),Js=e=>wn(e)==="[object Date]",Gt=e=>wn(e)==="[object RegExp]",Br=e=>re(e)&&Object.keys(e).length===0,$e=Object.assign,ei=Object.create,pe=(e=null)=>ei(e);let Go;const At=()=>Go||(Go=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:pe());function Wo(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const ti=Object.prototype.hasOwnProperty;function at(e,r){return ti.call(e,r)}const _e=Array.isArray,fe=e=>typeof e=="function",M=e=>typeof e=="string",ae=e=>typeof e=="boolean",oe=e=>e!==null&&typeof e=="object",ri=e=>oe(e)&&fe(e.then)&&fe(e.catch),Yo=Object.prototype.toString,wn=e=>Yo.call(e),re=e=>wn(e)==="[object Object]",ni=e=>e==null?"":_e(e)||re(e)&&e.toString===Yo?JSON.stringify(e,null,2):String(e);function En(e,r=""){return e.reduce((n,o,a)=>a===0?n+o:n+r+o,"")}const zo=2;function oi(e,r=0,n=e.length){const o=e.split(/\r?\n/);let a=0;const l=[];for(let s=0;s<o.length;s++)if(a+=o[s].length+1,a>=r){for(let i=s-zo;i<=s+zo||n>a;i++){if(i<0||i>=o.length)continue;const c=i+1;l.push(`${c}${" ".repeat(3-String(c).length)}| ${o[i]}`);const u=o[i].length;if(i===s){const d=r-(a-u)+1,m=Math.max(1,n>a?u-d:n-r);l.push(" | "+" ".repeat(d)+"^".repeat(m))}else if(i>s){if(n>a){const d=Math.max(Math.min(n-a,u),1);l.push(" | "+"^".repeat(d))}a+=u+1}}break}return l.join(`
|
|
226
|
+
`)}function Et(e,r){typeof console<"u"&&(console.warn("[intlify] "+e),r&&console.warn(r.stack))}const Ko={};function vn(e){Ko[e]||(Ko[e]=!0,Et(e))}function Nn(){const e=new Map;return{events:e,on(n,o){const a=e.get(n);a&&a.push(o)||e.set(n,[o])},off(n,o){const a=e.get(n);a&&a.splice(a.indexOf(o)>>>0,1)},emit(n,o){(e.get(n)||[]).slice().map(a=>a(o)),(e.get("*")||[]).slice().map(a=>a(n,o))}}}const Fr=e=>!oe(e)||_e(e);function Pr(e,r){if(Fr(e)||Fr(r))throw new Error("Invalid value");const n=[{src:e,des:r}];for(;n.length;){const{src:o,des:a}=n.pop();Object.keys(o).forEach(l=>{l!=="__proto__"&&(oe(o[l])&&!oe(a[l])&&(a[l]=Array.isArray(o[l])?[]:pe()),Fr(a[l])||Fr(o[l])?a[l]=o[l]:n.push({src:o[l],des:a[l]}))})}}/*!
|
|
222
227
|
* message-compiler v11.1.5
|
|
223
228
|
* (c) 2025 kazuya kawaguchi
|
|
224
229
|
* Released under the MIT License.
|
|
225
|
-
*/function
|
|
226
|
-
`,ui="\u2028",mi="\u2029";function pi(e){const r=e;let n=0,o=1,a=1,l=0;const s=N=>r[N]===di&&r[N+1]===Be,i=N=>r[N]===Be,c=N=>r[N]===mi,d=N=>r[N]===ui,m=N=>s(N)||i(N)||c(N)||d(N),u=()=>n,p=()=>o,f=()=>a,g=()=>l,h=N=>s(N)||c(N)||d(N)?Be:r[N],k=()=>h(n),b=()=>h(n+l);function x(){return l=0,m(n)&&(o++,a=0),s(n)&&n++,n++,a++,r[n]}function w(){return s(n+l)&&l++,l++,r[n+l]}function E(){n=0,o=1,a=1,l=0}function D(N=0){l=N}function S(){const N=n+l;for(;N!==n;)x();l=0}return{index:u,line:p,column:f,peekOffset:g,charAt:h,currentChar:k,currentPeek:b,next:x,peek:w,reset:E,resetPeek:D,skipToPeek:S}}const bt=void 0,fi=".",Ko="'",gi="tokenizer";function hi(e,r={}){const n=r.location!==!1,o=pi(e),a=()=>o.index(),l=()=>oi(o.line(),o.column(),o.index()),s=l(),i=a(),c={currentType:13,offset:i,startLoc:s,endLoc:s,lastType:13,lastOffset:i,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},d=()=>c,{onError:m}=r;function u(y,_,V,...j){const Ee=d();if(_.column+=V,_.offset+=V,m){const ve=n?Cn(Ee.startLoc,_):null,ie=jt(y,ve,{domain:gi,args:j});m(ie)}}function p(y,_,V){y.endLoc=l(),y.currentType=_;const j={type:_};return n&&(j.loc=Cn(y.startLoc,y.endLoc)),V!=null&&(j.value=V),j}const f=y=>p(y,13);function g(y,_){return y.currentChar()===_?(y.next(),_):(u(Y.EXPECTED_TOKEN,l(),0,_),"")}function h(y){let _="";for(;y.currentPeek()===it||y.currentPeek()===Be;)_+=y.currentPeek(),y.peek();return _}function k(y){const _=h(y);return y.skipToPeek(),_}function b(y){if(y===bt)return!1;const _=y.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_===95}function x(y){if(y===bt)return!1;const _=y.charCodeAt(0);return _>=48&&_<=57}function w(y,_){const{currentType:V}=_;if(V!==2)return!1;h(y);const j=b(y.currentPeek());return y.resetPeek(),j}function E(y,_){const{currentType:V}=_;if(V!==2)return!1;h(y);const j=y.currentPeek()==="-"?y.peek():y.currentPeek(),Ee=x(j);return y.resetPeek(),Ee}function D(y,_){const{currentType:V}=_;if(V!==2)return!1;h(y);const j=y.currentPeek()===Ko;return y.resetPeek(),j}function S(y,_){const{currentType:V}=_;if(V!==7)return!1;h(y);const j=y.currentPeek()===".";return y.resetPeek(),j}function N(y,_){const{currentType:V}=_;if(V!==8)return!1;h(y);const j=b(y.currentPeek());return y.resetPeek(),j}function P(y,_){const{currentType:V}=_;if(!(V===7||V===11))return!1;h(y);const j=y.currentPeek()===":";return y.resetPeek(),j}function T(y,_){const{currentType:V}=_;if(V!==9)return!1;const j=()=>{const ve=y.currentPeek();return ve==="{"?b(y.peek()):ve==="@"||ve==="|"||ve===":"||ve==="."||ve===it||!ve?!1:ve===Be?(y.peek(),j()):R(y,!1)},Ee=j();return y.resetPeek(),Ee}function $(y){h(y);const _=y.currentPeek()==="|";return y.resetPeek(),_}function R(y,_=!0){const V=(Ee=!1,ve="")=>{const ie=y.currentPeek();return ie==="{"||ie==="@"||!ie?Ee:ie==="|"?!(ve===it||ve===Be):ie===it?(y.peek(),V(!0,it)):ie===Be?(y.peek(),V(!0,Be)):!0},j=V();return _&&y.resetPeek(),j}function H(y,_){const V=y.currentChar();return V===bt?bt:_(V)?(y.next(),V):null}function re(y){const _=y.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_>=48&&_<=57||_===95||_===36}function ne(y){return H(y,re)}function ee(y){const _=y.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_>=48&&_<=57||_===95||_===36||_===45}function ge(y){return H(y,ee)}function te(y){const _=y.charCodeAt(0);return _>=48&&_<=57}function be(y){return H(y,te)}function U(y){const _=y.charCodeAt(0);return _>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102}function q(y){return H(y,U)}function O(y){let _="",V="";for(;_=be(y);)V+=_;return V}function se(y){let _="";for(;;){const V=y.currentChar();if(V==="{"||V==="}"||V==="@"||V==="|"||!V)break;if(V===it||V===Be)if(R(y))_+=V,y.next();else{if($(y))break;_+=V,y.next()}else _+=V,y.next()}return _}function Ae(y){k(y);let _="",V="";for(;_=ge(y);)V+=_;return y.currentChar()===bt&&u(Y.UNTERMINATED_CLOSING_BRACE,l(),0),V}function We(y){k(y);let _="";return y.currentChar()==="-"?(y.next(),_+=`-${O(y)}`):_+=O(y),y.currentChar()===bt&&u(Y.UNTERMINATED_CLOSING_BRACE,l(),0),_}function Et(y){return y!==Ko&&y!==Be}function mn(y){k(y),g(y,"'");let _="",V="";for(;_=H(y,Et);)_==="\\"?V+=$t(y):V+=_;const j=y.currentChar();return j===Be||j===bt?(u(Y.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,l(),0),j===Be&&(y.next(),g(y,"'")),V):(g(y,"'"),V)}function $t(y){const _=y.currentChar();switch(_){case"\\":case"'":return y.next(),`\\${_}`;case"u":return Lt(y,_,4);case"U":return Lt(y,_,6);default:return u(Y.UNKNOWN_ESCAPE_SEQUENCE,l(),0,_),""}}function Lt(y,_,V){g(y,_);let j="";for(let Ee=0;Ee<V;Ee++){const ve=q(y);if(!ve){u(Y.INVALID_UNICODE_ESCAPE_SEQUENCE,l(),0,`\\${_}${j}${y.currentChar()}`);break}j+=ve}return`\\${_}${j}`}function rr(y){return y!=="{"&&y!=="}"&&y!==it&&y!==Be}function Tr(y){k(y);let _="",V="";for(;_=H(y,rr);)V+=_;return V}function nr(y){let _="",V="";for(;_=ne(y);)V+=_;return V}function C(y){const _=V=>{const j=y.currentChar();return j==="{"||j==="@"||j==="|"||j==="("||j===")"||!j||j===it?V:(V+=j,y.next(),_(V))};return _("")}function L(y){k(y);const _=g(y,"|");return k(y),_}function B(y,_){let V=null;switch(y.currentChar()){case"{":return _.braceNest>=1&&u(Y.NOT_ALLOW_NEST_PLACEHOLDER,l(),0),y.next(),V=p(_,2,"{"),k(y),_.braceNest++,V;case"}":return _.braceNest>0&&_.currentType===2&&u(Y.EMPTY_PLACEHOLDER,l(),0),y.next(),V=p(_,3,"}"),_.braceNest--,_.braceNest>0&&k(y),_.inLinked&&_.braceNest===0&&(_.inLinked=!1),V;case"@":return _.braceNest>0&&u(Y.UNTERMINATED_CLOSING_BRACE,l(),0),V=F(y,_)||f(_),_.braceNest=0,V;default:{let Ee=!0,ve=!0,ie=!0;if($(y))return _.braceNest>0&&u(Y.UNTERMINATED_CLOSING_BRACE,l(),0),V=p(_,1,L(y)),_.braceNest=0,_.inLinked=!1,V;if(_.braceNest>0&&(_.currentType===4||_.currentType===5||_.currentType===6))return u(Y.UNTERMINATED_CLOSING_BRACE,l(),0),_.braceNest=0,Q(y,_);if(Ee=w(y,_))return V=p(_,4,Ae(y)),k(y),V;if(ve=E(y,_))return V=p(_,5,We(y)),k(y),V;if(ie=D(y,_))return V=p(_,6,mn(y)),k(y),V;if(!Ee&&!ve&&!ie)return V=p(_,12,Tr(y)),u(Y.INVALID_TOKEN_IN_PLACEHOLDER,l(),0,V.value),k(y),V;break}}return V}function F(y,_){const{currentType:V}=_;let j=null;const Ee=y.currentChar();switch((V===7||V===8||V===11||V===9)&&(Ee===Be||Ee===it)&&u(Y.INVALID_LINKED_FORMAT,l(),0),Ee){case"@":return y.next(),j=p(_,7,"@"),_.inLinked=!0,j;case".":return k(y),y.next(),p(_,8,".");case":":return k(y),y.next(),p(_,9,":");default:return $(y)?(j=p(_,1,L(y)),_.braceNest=0,_.inLinked=!1,j):S(y,_)||P(y,_)?(k(y),F(y,_)):N(y,_)?(k(y),p(_,11,nr(y))):T(y,_)?(k(y),Ee==="{"?B(y,_)||j:p(_,10,C(y))):(V===7&&u(Y.INVALID_LINKED_FORMAT,l(),0),_.braceNest=0,_.inLinked=!1,Q(y,_))}}function Q(y,_){let V={type:13};if(_.braceNest>0)return B(y,_)||f(_);if(_.inLinked)return F(y,_)||f(_);switch(y.currentChar()){case"{":return B(y,_)||f(_);case"}":return u(Y.UNBALANCED_CLOSING_BRACE,l(),0),y.next(),p(_,3,"}");case"@":return F(y,_)||f(_);default:{if($(y))return V=p(_,1,L(y)),_.braceNest=0,_.inLinked=!1,V;if(R(y))return p(_,0,se(y));break}}return V}function we(){const{currentType:y,offset:_,startLoc:V,endLoc:j}=c;return c.lastType=y,c.lastOffset=_,c.lastStartLoc=V,c.lastEndLoc=j,c.offset=a(),c.startLoc=l(),o.currentChar()===bt?p(c,13):Q(o,c)}return{nextToken:we,currentOffset:a,currentPosition:l,context:d}}const bi="parser",yi=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function _i(e,r,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const o=parseInt(r||n,16);return o<=55295||o>=57344?String.fromCodePoint(o):"�"}}}function xi(e={}){const r=e.location!==!1,{onError:n}=e;function o(b,x,w,E,...D){const S=b.currentPosition();if(S.offset+=E,S.column+=E,n){const N=r?Cn(w,S):null,P=jt(x,N,{domain:bi,args:D});n(P)}}function a(b,x,w){const E={type:b};return r&&(E.start=x,E.end=x,E.loc={start:w,end:w}),E}function l(b,x,w,E){r&&(b.end=x,b.loc&&(b.loc.end=w))}function s(b,x){const w=b.context(),E=a(3,w.offset,w.startLoc);return E.value=x,l(E,b.currentOffset(),b.currentPosition()),E}function i(b,x){const w=b.context(),{lastOffset:E,lastStartLoc:D}=w,S=a(5,E,D);return S.index=parseInt(x,10),b.nextToken(),l(S,b.currentOffset(),b.currentPosition()),S}function c(b,x){const w=b.context(),{lastOffset:E,lastStartLoc:D}=w,S=a(4,E,D);return S.key=x,b.nextToken(),l(S,b.currentOffset(),b.currentPosition()),S}function d(b,x){const w=b.context(),{lastOffset:E,lastStartLoc:D}=w,S=a(9,E,D);return S.value=x.replace(yi,_i),b.nextToken(),l(S,b.currentOffset(),b.currentPosition()),S}function m(b){const x=b.nextToken(),w=b.context(),{lastOffset:E,lastStartLoc:D}=w,S=a(8,E,D);return x.type!==11?(o(b,Y.UNEXPECTED_EMPTY_LINKED_MODIFIER,w.lastStartLoc,0),S.value="",l(S,E,D),{nextConsumeToken:x,node:S}):(x.value==null&&o(b,Y.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,tt(x)),S.value=x.value||"",l(S,b.currentOffset(),b.currentPosition()),{node:S})}function u(b,x){const w=b.context(),E=a(7,w.offset,w.startLoc);return E.value=x,l(E,b.currentOffset(),b.currentPosition()),E}function p(b){const x=b.context(),w=a(6,x.offset,x.startLoc);let E=b.nextToken();if(E.type===8){const D=m(b);w.modifier=D.node,E=D.nextConsumeToken||b.nextToken()}switch(E.type!==9&&o(b,Y.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,tt(E)),E=b.nextToken(),E.type===2&&(E=b.nextToken()),E.type){case 10:E.value==null&&o(b,Y.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,tt(E)),w.key=u(b,E.value||"");break;case 4:E.value==null&&o(b,Y.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,tt(E)),w.key=c(b,E.value||"");break;case 5:E.value==null&&o(b,Y.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,tt(E)),w.key=i(b,E.value||"");break;case 6:E.value==null&&o(b,Y.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,tt(E)),w.key=d(b,E.value||"");break;default:{o(b,Y.UNEXPECTED_EMPTY_LINKED_KEY,x.lastStartLoc,0);const D=b.context(),S=a(7,D.offset,D.startLoc);return S.value="",l(S,D.offset,D.startLoc),w.key=S,l(w,D.offset,D.startLoc),{nextConsumeToken:E,node:w}}}return l(w,b.currentOffset(),b.currentPosition()),{node:w}}function f(b){const x=b.context(),w=x.currentType===1?b.currentOffset():x.offset,E=x.currentType===1?x.endLoc:x.startLoc,D=a(2,w,E);D.items=[];let S=null;do{const T=S||b.nextToken();switch(S=null,T.type){case 0:T.value==null&&o(b,Y.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,tt(T)),D.items.push(s(b,T.value||""));break;case 5:T.value==null&&o(b,Y.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,tt(T)),D.items.push(i(b,T.value||""));break;case 4:T.value==null&&o(b,Y.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,tt(T)),D.items.push(c(b,T.value||""));break;case 6:T.value==null&&o(b,Y.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,tt(T)),D.items.push(d(b,T.value||""));break;case 7:{const $=p(b);D.items.push($.node),S=$.nextConsumeToken||null;break}}}while(x.currentType!==13&&x.currentType!==1);const N=x.currentType===1?x.lastOffset:b.currentOffset(),P=x.currentType===1?x.lastEndLoc:b.currentPosition();return l(D,N,P),D}function g(b,x,w,E){const D=b.context();let S=E.items.length===0;const N=a(1,x,w);N.cases=[],N.cases.push(E);do{const P=f(b);S||(S=P.items.length===0),N.cases.push(P)}while(D.currentType!==13);return S&&o(b,Y.MUST_HAVE_MESSAGES_IN_PLURAL,w,0),l(N,b.currentOffset(),b.currentPosition()),N}function h(b){const x=b.context(),{offset:w,startLoc:E}=x,D=f(b);return x.currentType===13?D:g(b,w,E,D)}function k(b){const x=hi(b,De({},e)),w=x.context(),E=a(0,w.offset,w.startLoc);return r&&E.loc&&(E.loc.source=b),E.body=h(x),e.onCacheKey&&(E.cacheKey=e.onCacheKey(b)),w.currentType!==13&&o(x,Y.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,b[w.offset]||""),l(E,x.currentOffset(),x.currentPosition()),E}return{parse:k}}function tt(e){if(e.type===13)return"EOF";const r=(e.value||"").replace(/\r?\n/gu,"\\n");return r.length>10?r.slice(0,9)+"…":r}function ki(e,r={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:l=>(n.helpers.add(l),l)}}function Xo(e,r){for(let n=0;n<e.length;n++)Sn(e[n],r)}function Sn(e,r){switch(e.type){case 1:Xo(e.cases,r),r.helper("plural");break;case 2:Xo(e.items,r);break;case 6:{Sn(e.key,r),r.helper("linked"),r.helper("type");break}case 5:r.helper("interpolate"),r.helper("list");break;case 4:r.helper("interpolate"),r.helper("named");break}}function wi(e,r={}){const n=ki(e);n.helper("normalize"),e.body&&Sn(e.body,n);const o=n.context();e.helpers=Array.from(o.helpers)}function Ei(e){const r=e.body;return r.type===2?Qo(r):r.cases.forEach(n=>Qo(n)),e}function Qo(e){if(e.items.length===1){const r=e.items[0];(r.type===3||r.type===9)&&(e.static=r.value,delete r.value)}else{const r=[];for(let n=0;n<e.items.length;n++){const o=e.items[n];if(!(o.type===3||o.type===9)||o.value==null)break;r.push(o.value)}if(r.length===e.items.length){e.static=En(r);for(let n=0;n<e.items.length;n++){const o=e.items[n];(o.type===3||o.type===9)&&delete o.value}}}}const vi="minifier";function qt(e){switch(e.t=e.type,e.type){case 0:{const r=e;qt(r.body),r.b=r.body,delete r.body;break}case 1:{const r=e,n=r.cases;for(let o=0;o<n.length;o++)qt(n[o]);r.c=n,delete r.cases;break}case 2:{const r=e,n=r.items;for(let o=0;o<n.length;o++)qt(n[o]);r.i=n,delete r.items,r.static&&(r.s=r.static,delete r.static);break}case 3:case 9:case 8:case 7:{const r=e;r.value&&(r.v=r.value,delete r.value);break}case 6:{const r=e;qt(r.key),r.k=r.key,delete r.key,r.modifier&&(qt(r.modifier),r.m=r.modifier,delete r.modifier);break}case 5:{const r=e;r.i=r.index,delete r.index;break}case 4:{const r=e;r.k=r.key,delete r.key;break}default:if(process.env.NODE_ENV!=="production")throw jt(Y.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:vi,args:[e.type]})}delete e.type}const Ni="parser";function Ci(e,r){const{filename:n,breakLineCode:o,needIndent:a}=r,l=r.location!==!1,s={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:a,indentLevel:0};l&&e.loc&&(s.source=e.loc.source);const i=()=>s;function c(h,k){s.code+=h}function d(h,k=!0){const b=k?o:"";c(a?b+" ".repeat(h):b)}function m(h=!0){const k=++s.indentLevel;h&&d(k)}function u(h=!0){const k=--s.indentLevel;h&&d(k)}function p(){d(s.indentLevel)}return{context:i,push:c,indent:m,deindent:u,newline:p,helper:h=>`_${h}`,needIndent:()=>s.needIndent}}function Si(e,r){const{helper:n}=e;e.push(`${n("linked")}(`),Ht(e,r.key),r.modifier?(e.push(", "),Ht(e,r.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function Vi(e,r){const{helper:n,needIndent:o}=e;e.push(`${n("normalize")}([`),e.indent(o());const a=r.items.length;for(let l=0;l<a&&(Ht(e,r.items[l]),l!==a-1);l++)e.push(", ");e.deindent(o()),e.push("])")}function Di(e,r){const{helper:n,needIndent:o}=e;if(r.cases.length>1){e.push(`${n("plural")}([`),e.indent(o());const a=r.cases.length;for(let l=0;l<a&&(Ht(e,r.cases[l]),l!==a-1);l++)e.push(", ");e.deindent(o()),e.push("])")}}function Ti(e,r){r.body?Ht(e,r.body):e.push("null")}function Ht(e,r){const{helper:n}=e;switch(r.type){case 0:Ti(e,r);break;case 1:Di(e,r);break;case 2:Vi(e,r);break;case 6:Si(e,r);break;case 8:e.push(JSON.stringify(r.value),r);break;case 7:e.push(JSON.stringify(r.value),r);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${r.index}))`,r);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(r.key)}))`,r);break;case 9:e.push(JSON.stringify(r.value),r);break;case 3:e.push(JSON.stringify(r.value),r);break;default:if(process.env.NODE_ENV!=="production")throw jt(Y.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:Ni,args:[r.type]})}}const Ai=(e,r={})=>{const n=M(r.mode)?r.mode:"normal",o=M(r.filename)?r.filename:"message.intl";r.sourceMap;const a=r.breakLineCode!=null?r.breakLineCode:n==="arrow"?";":`
|
|
227
|
-
`,
|
|
230
|
+
*/function ai(e,r,n){return{line:e,column:r,offset:n}}function Cn(e,r,n){return{start:e,end:r}}const G={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},li=17,si={[G.EXPECTED_TOKEN]:"Expected token: '{0}'",[G.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[G.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[G.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[G.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[G.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[G.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[G.EMPTY_PLACEHOLDER]:"Empty placeholder",[G.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[G.INVALID_LINKED_FORMAT]:"Invalid linked format",[G.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[G.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[G.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[G.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[G.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[G.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function Wt(e,r,n={}){const{domain:o,messages:a,args:l}=n,s=process.env.NODE_ENV!=="production"?Or((a||si)[e]||"",...l||[]):e,i=new SyntaxError(String(s));return i.code=e,r&&(i.location=r),i.domain=o,i}function ii(e){throw e}const ci=/<\/?[\w\s="/.':;#-\/]+>/,di=e=>ci.test(e),gt=" ",ui="\r",He=`
|
|
231
|
+
`,mi="\u2028",pi="\u2029";function fi(e){const r=e;let n=0,o=1,a=1,l=0;const s=v=>r[v]===ui&&r[v+1]===He,i=v=>r[v]===He,c=v=>r[v]===pi,u=v=>r[v]===mi,d=v=>s(v)||i(v)||c(v)||u(v),m=()=>n,p=()=>o,f=()=>a,g=()=>l,y=v=>s(v)||c(v)||u(v)?He:r[v],x=()=>y(n),h=()=>y(n+l);function k(){return l=0,d(n)&&(o++,a=0),s(n)&&n++,n++,a++,r[n]}function w(){return s(n+l)&&l++,l++,r[n+l]}function E(){n=0,o=1,a=1,l=0}function V(v=0){l=v}function S(){const v=n+l;for(;v!==n;)k();l=0}return{index:m,line:p,column:f,peekOffset:g,charAt:y,currentChar:x,currentPeek:h,next:k,peek:w,reset:E,resetPeek:V,skipToPeek:S}}const vt=void 0,gi=".",Xo="'",hi="tokenizer";function bi(e,r={}){const n=r.location!==!1,o=fi(e),a=()=>o.index(),l=()=>ai(o.line(),o.column(),o.index()),s=l(),i=a(),c={currentType:13,offset:i,startLoc:s,endLoc:s,lastType:13,lastOffset:i,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},u=()=>c,{onError:d}=r;function m(b,_,D,...U){const Ce=u();if(_.column+=D,_.offset+=D,d){const Se=n?Cn(Ce.startLoc,_):null,se=Wt(b,Se,{domain:hi,args:U});d(se)}}function p(b,_,D){b.endLoc=l(),b.currentType=_;const U={type:_};return n&&(U.loc=Cn(b.startLoc,b.endLoc)),D!=null&&(U.value=D),U}const f=b=>p(b,13);function g(b,_){return b.currentChar()===_?(b.next(),_):(m(G.EXPECTED_TOKEN,l(),0,_),"")}function y(b){let _="";for(;b.currentPeek()===gt||b.currentPeek()===He;)_+=b.currentPeek(),b.peek();return _}function x(b){const _=y(b);return b.skipToPeek(),_}function h(b){if(b===vt)return!1;const _=b.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_===95}function k(b){if(b===vt)return!1;const _=b.charCodeAt(0);return _>=48&&_<=57}function w(b,_){const{currentType:D}=_;if(D!==2)return!1;y(b);const U=h(b.currentPeek());return b.resetPeek(),U}function E(b,_){const{currentType:D}=_;if(D!==2)return!1;y(b);const U=b.currentPeek()==="-"?b.peek():b.currentPeek(),Ce=k(U);return b.resetPeek(),Ce}function V(b,_){const{currentType:D}=_;if(D!==2)return!1;y(b);const U=b.currentPeek()===Xo;return b.resetPeek(),U}function S(b,_){const{currentType:D}=_;if(D!==7)return!1;y(b);const U=b.currentPeek()===".";return b.resetPeek(),U}function v(b,_){const{currentType:D}=_;if(D!==8)return!1;y(b);const U=h(b.currentPeek());return b.resetPeek(),U}function L(b,_){const{currentType:D}=_;if(!(D===7||D===11))return!1;y(b);const U=b.currentPeek()===":";return b.resetPeek(),U}function P(b,_){const{currentType:D}=_;if(D!==9)return!1;const U=()=>{const Se=b.currentPeek();return Se==="{"?h(b.peek()):Se==="@"||Se==="|"||Se===":"||Se==="."||Se===gt||!Se?!1:Se===He?(b.peek(),U()):ce(b,!1)},Ce=U();return b.resetPeek(),Ce}function Z(b){y(b);const _=b.currentPeek()==="|";return b.resetPeek(),_}function ce(b,_=!0){const D=(Ce=!1,Se="")=>{const se=b.currentPeek();return se==="{"||se==="@"||!se?Ce:se==="|"?!(Se===gt||Se===He):se===gt?(b.peek(),D(!0,gt)):se===He?(b.peek(),D(!0,He)):!0},U=D();return _&&b.resetPeek(),U}function ee(b,_){const D=b.currentChar();return D===vt?vt:_(D)?(b.next(),D):null}function Ee(b){const _=b.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_>=48&&_<=57||_===95||_===36}function ke(b){return ee(b,Ee)}function Ue(b){const _=b.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_>=48&&_<=57||_===95||_===36||_===45}function Le(b){return ee(b,Ue)}function We(b){const _=b.charCodeAt(0);return _>=48&&_<=57}function Oe(b){return ee(b,We)}function j(b){const _=b.charCodeAt(0);return _>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102}function W(b){return ee(b,j)}function O(b){let _="",D="";for(;_=Oe(b);)D+=_;return D}function A(b){let _="";for(;;){const D=b.currentChar();if(D==="{"||D==="}"||D==="@"||D==="|"||!D)break;if(D===gt||D===He)if(ce(b))_+=D,b.next();else{if(Z(b))break;_+=D,b.next()}else _+=D,b.next()}return _}function B(b){x(b);let _="",D="";for(;_=Le(b);)D+=_;return b.currentChar()===vt&&m(G.UNTERMINATED_CLOSING_BRACE,l(),0),D}function J(b){x(b);let _="";return b.currentChar()==="-"?(b.next(),_+=`-${O(b)}`):_+=O(b),b.currentChar()===vt&&m(G.UNTERMINATED_CLOSING_BRACE,l(),0),_}function te(b){return b!==Xo&&b!==He}function be(b){x(b),g(b,"'");let _="",D="";for(;_=ee(b,te);)_==="\\"?D+=Ne(b):D+=_;const U=b.currentChar();return U===He||U===vt?(m(G.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,l(),0),U===He&&(b.next(),g(b,"'")),D):(g(b,"'"),D)}function Ne(b){const _=b.currentChar();switch(_){case"\\":case"'":return b.next(),`\\${_}`;case"u":return de(b,_,4);case"U":return de(b,_,6);default:return m(G.UNKNOWN_ESCAPE_SEQUENCE,l(),0,_),""}}function de(b,_,D){g(b,_);let U="";for(let Ce=0;Ce<D;Ce++){const Se=W(b);if(!Se){m(G.INVALID_UNICODE_ESCAPE_SEQUENCE,l(),0,`\\${_}${U}${b.currentChar()}`);break}U+=Se}return`\\${_}${U}`}function je(b){return b!=="{"&&b!=="}"&&b!==gt&&b!==He}function ne(b){x(b);let _="",D="";for(;_=ee(b,je);)D+=_;return D}function qe(b){let _="",D="";for(;_=ke(b);)D+=_;return D}function C(b){const _=D=>{const U=b.currentChar();return U==="{"||U==="@"||U==="|"||U==="("||U===")"||!U||U===gt?D:(D+=U,b.next(),_(D))};return _("")}function I(b){x(b);const _=g(b,"|");return x(b),_}function F(b,_){let D=null;switch(b.currentChar()){case"{":return _.braceNest>=1&&m(G.NOT_ALLOW_NEST_PLACEHOLDER,l(),0),b.next(),D=p(_,2,"{"),x(b),_.braceNest++,D;case"}":return _.braceNest>0&&_.currentType===2&&m(G.EMPTY_PLACEHOLDER,l(),0),b.next(),D=p(_,3,"}"),_.braceNest--,_.braceNest>0&&x(b),_.inLinked&&_.braceNest===0&&(_.inLinked=!1),D;case"@":return _.braceNest>0&&m(G.UNTERMINATED_CLOSING_BRACE,l(),0),D=R(b,_)||f(_),_.braceNest=0,D;default:{let Ce=!0,Se=!0,se=!0;if(Z(b))return _.braceNest>0&&m(G.UNTERMINATED_CLOSING_BRACE,l(),0),D=p(_,1,I(b)),_.braceNest=0,_.inLinked=!1,D;if(_.braceNest>0&&(_.currentType===4||_.currentType===5||_.currentType===6))return m(G.UNTERMINATED_CLOSING_BRACE,l(),0),_.braceNest=0,X(b,_);if(Ce=w(b,_))return D=p(_,4,B(b)),x(b),D;if(Se=E(b,_))return D=p(_,5,J(b)),x(b),D;if(se=V(b,_))return D=p(_,6,be(b)),x(b),D;if(!Ce&&!Se&&!se)return D=p(_,12,ne(b)),m(G.INVALID_TOKEN_IN_PLACEHOLDER,l(),0,D.value),x(b),D;break}}return D}function R(b,_){const{currentType:D}=_;let U=null;const Ce=b.currentChar();switch((D===7||D===8||D===11||D===9)&&(Ce===He||Ce===gt)&&m(G.INVALID_LINKED_FORMAT,l(),0),Ce){case"@":return b.next(),U=p(_,7,"@"),_.inLinked=!0,U;case".":return x(b),b.next(),p(_,8,".");case":":return x(b),b.next(),p(_,9,":");default:return Z(b)?(U=p(_,1,I(b)),_.braceNest=0,_.inLinked=!1,U):S(b,_)||L(b,_)?(x(b),R(b,_)):v(b,_)?(x(b),p(_,11,qe(b))):P(b,_)?(x(b),Ce==="{"?F(b,_)||U:p(_,10,C(b))):(D===7&&m(G.INVALID_LINKED_FORMAT,l(),0),_.braceNest=0,_.inLinked=!1,X(b,_))}}function X(b,_){let D={type:13};if(_.braceNest>0)return F(b,_)||f(_);if(_.inLinked)return R(b,_)||f(_);switch(b.currentChar()){case"{":return F(b,_)||f(_);case"}":return m(G.UNBALANCED_CLOSING_BRACE,l(),0),b.next(),p(_,3,"}");case"@":return R(b,_)||f(_);default:{if(Z(b))return D=p(_,1,I(b)),_.braceNest=0,_.inLinked=!1,D;if(ce(b))return p(_,0,A(b));break}}return D}function ve(){const{currentType:b,offset:_,startLoc:D,endLoc:U}=c;return c.lastType=b,c.lastOffset=_,c.lastStartLoc=D,c.lastEndLoc=U,c.offset=a(),c.startLoc=l(),o.currentChar()===vt?p(c,13):X(o,c)}return{nextToken:ve,currentOffset:a,currentPosition:l,context:u}}const yi="parser",_i=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function ki(e,r,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const o=parseInt(r||n,16);return o<=55295||o>=57344?String.fromCodePoint(o):"�"}}}function xi(e={}){const r=e.location!==!1,{onError:n}=e;function o(h,k,w,E,...V){const S=h.currentPosition();if(S.offset+=E,S.column+=E,n){const v=r?Cn(w,S):null,L=Wt(k,v,{domain:yi,args:V});n(L)}}function a(h,k,w){const E={type:h};return r&&(E.start=k,E.end=k,E.loc={start:w,end:w}),E}function l(h,k,w,E){r&&(h.end=k,h.loc&&(h.loc.end=w))}function s(h,k){const w=h.context(),E=a(3,w.offset,w.startLoc);return E.value=k,l(E,h.currentOffset(),h.currentPosition()),E}function i(h,k){const w=h.context(),{lastOffset:E,lastStartLoc:V}=w,S=a(5,E,V);return S.index=parseInt(k,10),h.nextToken(),l(S,h.currentOffset(),h.currentPosition()),S}function c(h,k){const w=h.context(),{lastOffset:E,lastStartLoc:V}=w,S=a(4,E,V);return S.key=k,h.nextToken(),l(S,h.currentOffset(),h.currentPosition()),S}function u(h,k){const w=h.context(),{lastOffset:E,lastStartLoc:V}=w,S=a(9,E,V);return S.value=k.replace(_i,ki),h.nextToken(),l(S,h.currentOffset(),h.currentPosition()),S}function d(h){const k=h.nextToken(),w=h.context(),{lastOffset:E,lastStartLoc:V}=w,S=a(8,E,V);return k.type!==11?(o(h,G.UNEXPECTED_EMPTY_LINKED_MODIFIER,w.lastStartLoc,0),S.value="",l(S,E,V),{nextConsumeToken:k,node:S}):(k.value==null&&o(h,G.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,it(k)),S.value=k.value||"",l(S,h.currentOffset(),h.currentPosition()),{node:S})}function m(h,k){const w=h.context(),E=a(7,w.offset,w.startLoc);return E.value=k,l(E,h.currentOffset(),h.currentPosition()),E}function p(h){const k=h.context(),w=a(6,k.offset,k.startLoc);let E=h.nextToken();if(E.type===8){const V=d(h);w.modifier=V.node,E=V.nextConsumeToken||h.nextToken()}switch(E.type!==9&&o(h,G.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,it(E)),E=h.nextToken(),E.type===2&&(E=h.nextToken()),E.type){case 10:E.value==null&&o(h,G.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,it(E)),w.key=m(h,E.value||"");break;case 4:E.value==null&&o(h,G.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,it(E)),w.key=c(h,E.value||"");break;case 5:E.value==null&&o(h,G.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,it(E)),w.key=i(h,E.value||"");break;case 6:E.value==null&&o(h,G.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,it(E)),w.key=u(h,E.value||"");break;default:{o(h,G.UNEXPECTED_EMPTY_LINKED_KEY,k.lastStartLoc,0);const V=h.context(),S=a(7,V.offset,V.startLoc);return S.value="",l(S,V.offset,V.startLoc),w.key=S,l(w,V.offset,V.startLoc),{nextConsumeToken:E,node:w}}}return l(w,h.currentOffset(),h.currentPosition()),{node:w}}function f(h){const k=h.context(),w=k.currentType===1?h.currentOffset():k.offset,E=k.currentType===1?k.endLoc:k.startLoc,V=a(2,w,E);V.items=[];let S=null;do{const P=S||h.nextToken();switch(S=null,P.type){case 0:P.value==null&&o(h,G.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,it(P)),V.items.push(s(h,P.value||""));break;case 5:P.value==null&&o(h,G.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,it(P)),V.items.push(i(h,P.value||""));break;case 4:P.value==null&&o(h,G.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,it(P)),V.items.push(c(h,P.value||""));break;case 6:P.value==null&&o(h,G.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,it(P)),V.items.push(u(h,P.value||""));break;case 7:{const Z=p(h);V.items.push(Z.node),S=Z.nextConsumeToken||null;break}}}while(k.currentType!==13&&k.currentType!==1);const v=k.currentType===1?k.lastOffset:h.currentOffset(),L=k.currentType===1?k.lastEndLoc:h.currentPosition();return l(V,v,L),V}function g(h,k,w,E){const V=h.context();let S=E.items.length===0;const v=a(1,k,w);v.cases=[],v.cases.push(E);do{const L=f(h);S||(S=L.items.length===0),v.cases.push(L)}while(V.currentType!==13);return S&&o(h,G.MUST_HAVE_MESSAGES_IN_PLURAL,w,0),l(v,h.currentOffset(),h.currentPosition()),v}function y(h){const k=h.context(),{offset:w,startLoc:E}=k,V=f(h);return k.currentType===13?V:g(h,w,E,V)}function x(h){const k=bi(h,$e({},e)),w=k.context(),E=a(0,w.offset,w.startLoc);return r&&E.loc&&(E.loc.source=h),E.body=y(k),e.onCacheKey&&(E.cacheKey=e.onCacheKey(h)),w.currentType!==13&&o(k,G.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,h[w.offset]||""),l(E,k.currentOffset(),k.currentPosition()),E}return{parse:x}}function it(e){if(e.type===13)return"EOF";const r=(e.value||"").replace(/\r?\n/gu,"\\n");return r.length>10?r.slice(0,9)+"…":r}function wi(e,r={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:l=>(n.helpers.add(l),l)}}function Qo(e,r){for(let n=0;n<e.length;n++)Sn(e[n],r)}function Sn(e,r){switch(e.type){case 1:Qo(e.cases,r),r.helper("plural");break;case 2:Qo(e.items,r);break;case 6:{Sn(e.key,r),r.helper("linked"),r.helper("type");break}case 5:r.helper("interpolate"),r.helper("list");break;case 4:r.helper("interpolate"),r.helper("named");break}}function Ei(e,r={}){const n=wi(e);n.helper("normalize"),e.body&&Sn(e.body,n);const o=n.context();e.helpers=Array.from(o.helpers)}function vi(e){const r=e.body;return r.type===2?Zo(r):r.cases.forEach(n=>Zo(n)),e}function Zo(e){if(e.items.length===1){const r=e.items[0];(r.type===3||r.type===9)&&(e.static=r.value,delete r.value)}else{const r=[];for(let n=0;n<e.items.length;n++){const o=e.items[n];if(!(o.type===3||o.type===9)||o.value==null)break;r.push(o.value)}if(r.length===e.items.length){e.static=En(r);for(let n=0;n<e.items.length;n++){const o=e.items[n];(o.type===3||o.type===9)&&delete o.value}}}}const Ni="minifier";function Yt(e){switch(e.t=e.type,e.type){case 0:{const r=e;Yt(r.body),r.b=r.body,delete r.body;break}case 1:{const r=e,n=r.cases;for(let o=0;o<n.length;o++)Yt(n[o]);r.c=n,delete r.cases;break}case 2:{const r=e,n=r.items;for(let o=0;o<n.length;o++)Yt(n[o]);r.i=n,delete r.items,r.static&&(r.s=r.static,delete r.static);break}case 3:case 9:case 8:case 7:{const r=e;r.value&&(r.v=r.value,delete r.value);break}case 6:{const r=e;Yt(r.key),r.k=r.key,delete r.key,r.modifier&&(Yt(r.modifier),r.m=r.modifier,delete r.modifier);break}case 5:{const r=e;r.i=r.index,delete r.index;break}case 4:{const r=e;r.k=r.key,delete r.key;break}default:if(process.env.NODE_ENV!=="production")throw Wt(G.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:Ni,args:[e.type]})}delete e.type}const Ci="parser";function Si(e,r){const{sourceMap:n,filename:o,breakLineCode:a,needIndent:l}=r,s=r.location!==!1,i={filename:o,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:a,needIndent:l,indentLevel:0};s&&e.loc&&(i.source=e.loc.source);const c=()=>i;function u(x,h){i.code+=x}function d(x,h=!0){const k=h?a:"";u(l?k+" ".repeat(x):k)}function m(x=!0){const h=++i.indentLevel;x&&d(h)}function p(x=!0){const h=--i.indentLevel;x&&d(h)}function f(){d(i.indentLevel)}return{context:c,push:u,indent:m,deindent:p,newline:f,helper:x=>`_${x}`,needIndent:()=>i.needIndent}}function Vi(e,r){const{helper:n}=e;e.push(`${n("linked")}(`),zt(e,r.key),r.modifier?(e.push(", "),zt(e,r.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function Di(e,r){const{helper:n,needIndent:o}=e;e.push(`${n("normalize")}([`),e.indent(o());const a=r.items.length;for(let l=0;l<a&&(zt(e,r.items[l]),l!==a-1);l++)e.push(", ");e.deindent(o()),e.push("])")}function Ti(e,r){const{helper:n,needIndent:o}=e;if(r.cases.length>1){e.push(`${n("plural")}([`),e.indent(o());const a=r.cases.length;for(let l=0;l<a&&(zt(e,r.cases[l]),l!==a-1);l++)e.push(", ");e.deindent(o()),e.push("])")}}function Ai(e,r){r.body?zt(e,r.body):e.push("null")}function zt(e,r){const{helper:n}=e;switch(r.type){case 0:Ai(e,r);break;case 1:Ti(e,r);break;case 2:Di(e,r);break;case 6:Vi(e,r);break;case 8:e.push(JSON.stringify(r.value),r);break;case 7:e.push(JSON.stringify(r.value),r);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${r.index}))`,r);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(r.key)}))`,r);break;case 9:e.push(JSON.stringify(r.value),r);break;case 3:e.push(JSON.stringify(r.value),r);break;default:if(process.env.NODE_ENV!=="production")throw Wt(G.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:Ci,args:[r.type]})}}const $i=(e,r={})=>{const n=M(r.mode)?r.mode:"normal",o=M(r.filename)?r.filename:"message.intl",a=!!r.sourceMap,l=r.breakLineCode!=null?r.breakLineCode:n==="arrow"?";":`
|
|
232
|
+
`,s=r.needIndent?r.needIndent:n!=="arrow",i=e.helpers||[],c=Si(e,{mode:n,filename:o,sourceMap:a,breakLineCode:l,needIndent:s});c.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(s),i.length>0&&(c.push(`const { ${En(i.map(m=>`${m}: _${m}`),", ")} } = ctx`),c.newline()),c.push("return "),zt(c,e),c.deindent(s),c.push("}"),delete e.helpers;const{code:u,map:d}=c.context();return{ast:e,code:u,map:d?d.toJSON():void 0}};function Ii(e,r={}){const n=$e({},r),o=!!n.jit,a=!!n.minify,l=n.optimize==null?!0:n.optimize,i=xi(n).parse(e);return o?(l&&vi(i),a&&Yt(i),{ast:i,code:""}):(Ei(i,n),$i(i,n))}/*!
|
|
228
233
|
* core-base v11.1.5
|
|
229
234
|
* (c) 2025 kazuya kawaguchi
|
|
230
235
|
* Released under the MIT License.
|
|
231
|
-
*/function $i(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Nt().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Nt().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Ye(e){return oe(e)&&Vn(e)===0&&(Ze(e,"b")||Ze(e,"body"))}const Zo=["b","body"];function Li(e){return yt(e,Zo)}const Jo=["c","cases"];function Mi(e){return yt(e,Jo,[])}const ea=["s","static"];function Oi(e){return yt(e,ea)}const ta=["i","items"];function Bi(e){return yt(e,ta,[])}const ra=["t","type"];function Vn(e){return yt(e,ra)}const na=["v","value"];function Pr(e,r){const n=yt(e,na);if(n!=null)return n;throw sr(r)}const oa=["m","modifier"];function Fi(e){return yt(e,oa)}const aa=["k","key"];function Pi(e){const r=yt(e,aa);if(r)return r;throw sr(6)}function yt(e,r,n){for(let o=0;o<r.length;o++){const a=r[o];if(Ze(e,a)&&e[a]!=null)return e[a]}return n}const la=[...Zo,...Jo,...ea,...ta,...aa,...oa,...na,...ra];function sr(e){return new Error(`unhandled node type: ${e}`)}function Dn(e){return n=>Ri(n,e)}function Ri(e,r){const n=Li(r);if(n==null)throw sr(0);if(Vn(n)===1){const l=Mi(n);return e.plural(l.reduce((s,i)=>[...s,sa(e,i)],[]))}else return sa(e,n)}function sa(e,r){const n=Oi(r);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const o=Bi(r).reduce((a,l)=>[...a,Tn(e,l)],[]);return e.normalize(o)}}function Tn(e,r){const n=Vn(r);switch(n){case 3:return Pr(r,n);case 9:return Pr(r,n);case 4:{const o=r;if(Ze(o,"k")&&o.k)return e.interpolate(e.named(o.k));if(Ze(o,"key")&&o.key)return e.interpolate(e.named(o.key));throw sr(n)}case 5:{const o=r;if(Ze(o,"i")&&Se(o.i))return e.interpolate(e.list(o.i));if(Ze(o,"index")&&Se(o.index))return e.interpolate(e.list(o.index));throw sr(n)}case 6:{const o=r,a=Fi(o),l=Pi(o);return e.linked(Tn(e,l),a?Tn(e,a):void 0,e.type)}case 7:return Pr(r,n);case 8:return Pr(r,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const Ui="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function ji(e,r){r&&ci(e)&&ht(Mr(Ui,{source:e}))}const qi=e=>e;let Rr=me();function Hi(e,r={}){let n=!1;const o=r.onError||si;return r.onError=a=>{n=!0,o(a)},{...Ii(e,r),detectError:n}}function Gi(e,r){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&M(e)){const n=ae(r.warnHtmlMessage)?r.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&ji(e,n);const a=(r.onCacheKey||qi)(e),l=Rr[a];if(l)return l;const{ast:s,detectError:i}=Hi(e,{...r,location:process.env.NODE_ENV!=="production",jit:!0}),c=Dn(s);return i?c:Rr[a]=c}else{if(process.env.NODE_ENV!=="production"&&!Ye(e))return ht(`the message that is resolve with key '${r.key}' is not supported for jit compilation`),()=>e;const n=e.cacheKey;if(n){const o=Rr[n];return o||(Rr[n]=Dn(e))}else return Dn(e)}}let ir=null;function Wi(e){ir=e}function Yi(e,r,n){ir&&ir.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:r,meta:n})}const zi=Ki("function:translate");function Ki(e){return r=>ir&&ir.emit(e,r)}const $e={INVALID_ARGUMENT:ai,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},Xi=24;function ct(e){return jt(e,null,process.env.NODE_ENV!=="production"?{messages:Qi}:void 0)}const Qi={[$e.INVALID_ARGUMENT]:"Invalid arguments",[$e.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[$e.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[$e.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[$e.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[$e.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[$e.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function An(e,r){return r.locale!=null?ia(r.locale):ia(e.locale)}let In;function ia(e){if(M(e))return e;if(pe(e)){if(e.resolvedOnce&&In!=null)return In;if(e.constructor.name==="Function"){const r=e();if(ti(r))throw ct($e.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return In=r}else throw ct($e.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw ct($e.NOT_SUPPORT_LOCALE_TYPE)}function Zi(e,r,n){return[...new Set([n,..._e(r)?r:oe(r)?Object.keys(r):M(r)?[r]:[n]])]}function ca(e,r,n){const o=M(n)?n:cr,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let l=a.__localeChainCache.get(o);if(!l){l=[];let s=[n];for(;_e(s);)s=da(l,s,r);const i=_e(r)||!J(r)?r:r.default?r.default:null;s=M(i)?[i]:i,_e(s)&&da(l,s,!1),a.__localeChainCache.set(o,l)}return l}function da(e,r,n){let o=!0;for(let a=0;a<r.length&&ae(o);a++){const l=r[a];M(l)&&(o=Ji(e,r[a],n))}return o}function Ji(e,r,n){let o;const a=r.split("-");do{const l=a.join("-");o=ec(e,l,n),a.splice(-1,1)}while(a.length&&o===!0);return o}function ec(e,r,n){let o=!1;if(!e.includes(r)&&(o=!0,r)){o=r[r.length-1]!=="!";const a=r.replace(/!/g,"");e.push(a),(_e(n)||J(n))&&n[a]&&(o=n[a])}return o}const _t=[];_t[0]={w:[0],i:[3,0],"[":[4],o:[7]},_t[1]={w:[1],".":[2],"[":[4],o:[7]},_t[2]={w:[2],i:[3,0],0:[3,0]},_t[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},_t[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},_t[5]={"'":[4,0],o:8,l:[5,0]},_t[6]={'"':[4,0],o:8,l:[6,0]};const tc=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function rc(e){return tc.test(e)}function nc(e){const r=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return r===n&&(r===34||r===39)?e.slice(1,-1):e}function oc(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function ac(e){const r=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:rc(r)?nc(r):"*"+r}function lc(e){const r=[];let n=-1,o=0,a=0,l,s,i,c,d,m,u;const p=[];p[0]=()=>{s===void 0?s=i:s+=i},p[1]=()=>{s!==void 0&&(r.push(s),s=void 0)},p[2]=()=>{p[0](),a++},p[3]=()=>{if(a>0)a--,o=4,p[0]();else{if(a=0,s===void 0||(s=ac(s),s===!1))return!1;p[1]()}};function f(){const g=e[n+1];if(o===5&&g==="'"||o===6&&g==='"')return n++,i="\\"+g,p[0](),!0}for(;o!==null;)if(n++,l=e[n],!(l==="\\"&&f())){if(c=oc(l),u=_t[o],d=u[c]||u.l||8,d===8||(o=d[0],d[1]!==void 0&&(m=p[d[1]],m&&(i=l,m()===!1))))return;if(o===7)return r}}const ua=new Map;function sc(e,r){return oe(e)?e[r]:null}function ic(e,r){if(!oe(e))return null;let n=ua.get(r);if(n||(n=lc(r),n&&ua.set(r,n)),!n)return null;const o=n.length;let a=e,l=0;for(;l<o;){const s=n[l];if(la.includes(s)&&Ye(a))return null;const i=a[s];if(i===void 0||pe(a))return null;a=i,l++}return a}const Pe={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},cc=8,dc={[Pe.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[Pe.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[Pe.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[Pe.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[Pe.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[Pe.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[Pe.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function Ct(e,...r){return Mr(dc[e],...r)}const uc="11.1.5",Ur=-1,cr="en-US",jr="",ma=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function mc(){return{upper:(e,r)=>r==="text"&&M(e)?e.toUpperCase():r==="vnode"&&oe(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,r)=>r==="text"&&M(e)?e.toLowerCase():r==="vnode"&&oe(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,r)=>r==="text"&&M(e)?ma(e):r==="vnode"&&oe(e)&&"__v_isVNode"in e?ma(e.children):e}}let pa;function pc(e){pa=e}let fa;function fc(e){fa=e}let ga;function gc(e){ga=e}let ha=null;const hc=e=>{ha=e},bc=()=>ha;let ba=null;const ya=e=>{ba=e},yc=()=>ba;let _a=0;function _c(e={}){const r=pe(e.onWarn)?e.onWarn:ht,n=M(e.version)?e.version:uc,o=M(e.locale)||pe(e.locale)?e.locale:cr,a=pe(o)?cr:o,l=_e(e.fallbackLocale)||J(e.fallbackLocale)||M(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a,s=J(e.messages)?e.messages:$n(a),i=J(e.datetimeFormats)?e.datetimeFormats:$n(a),c=J(e.numberFormats)?e.numberFormats:$n(a),d=De(me(),e.modifiers,mc()),m=e.pluralRules||me(),u=pe(e.missing)?e.missing:null,p=ae(e.missingWarn)||Ut(e.missingWarn)?e.missingWarn:!0,f=ae(e.fallbackWarn)||Ut(e.fallbackWarn)?e.fallbackWarn:!0,g=!!e.fallbackFormat,h=!!e.unresolving,k=pe(e.postTranslation)?e.postTranslation:null,b=J(e.processor)?e.processor:null,x=ae(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter,E=pe(e.messageCompiler)?e.messageCompiler:pa;process.env.NODE_ENV!=="production"&&pe(e.messageCompiler)&&vn(Ct(Pe.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const D=pe(e.messageResolver)?e.messageResolver:fa||sc,S=pe(e.localeFallbacker)?e.localeFallbacker:ga||Zi,N=oe(e.fallbackContext)?e.fallbackContext:void 0,P=e,T=oe(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,$=oe(P.__numberFormatters)?P.__numberFormatters:new Map,R=oe(P.__meta)?P.__meta:{};_a++;const H={version:n,cid:_a,locale:o,fallbackLocale:l,messages:s,modifiers:d,pluralRules:m,missing:u,missingWarn:p,fallbackWarn:f,fallbackFormat:g,unresolving:h,postTranslation:k,processor:b,warnHtmlMessage:x,escapeParameter:w,messageCompiler:E,messageResolver:D,localeFallbacker:S,fallbackContext:N,onWarn:r,__meta:R};return H.datetimeFormats=i,H.numberFormats=c,H.__datetimeFormatters=T,H.__numberFormatters=$,process.env.NODE_ENV!=="production"&&(H.__v_emitter=P.__v_emitter!=null?P.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&Yi(H,n,R),H}const $n=e=>({[e]:me()});function qr(e,r){return e instanceof RegExp?e.test(r):e}function xa(e,r){return e instanceof RegExp?e.test(r):e}function Ln(e,r,n,o,a){const{missing:l,onWarn:s}=e;if(process.env.NODE_ENV!=="production"){const i=e.__v_emitter;i&&i.emit("missing",{locale:n,key:r,type:a,groupId:`${a}:${r}`})}if(l!==null){const i=l(e,n,r,a);return M(i)?i:r}else return process.env.NODE_ENV!=="production"&&xa(o,r)&&s(Ct(Pe.NOT_FOUND_KEY,{key:r,locale:n})),r}function dr(e,r,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,r)}function ka(e,r){return e===r?!1:e.split("-")[0]===r.split("-")[0]}function xc(e,r){const n=r.indexOf(e);if(n===-1)return!1;for(let o=n+1;o<r.length;o++)if(ka(e,r[o]))return!0;return!1}const wa=typeof Intl<"u",Ea={dateTimeFormat:wa&&typeof Intl.DateTimeFormat<"u",numberFormat:wa&&typeof Intl.NumberFormat<"u"};function va(e,...r){const{datetimeFormats:n,unresolving:o,fallbackLocale:a,onWarn:l,localeFallbacker:s}=e,{__datetimeFormatters:i}=e;if(process.env.NODE_ENV!=="production"&&!Ea.dateTimeFormat)return l(Ct(Pe.CANNOT_FORMAT_DATE)),jr;const[c,d,m,u]=Mn(...r),p=ae(m.missingWarn)?m.missingWarn:e.missingWarn,f=ae(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn,g=!!m.part,h=An(e,m),k=s(e,a,h);if(!M(c)||c==="")return new Intl.DateTimeFormat(h,u).format(d);let b={},x,w=null,E=h,D=null;const S="datetime format";for(let T=0;T<k.length;T++){if(x=D=k[T],process.env.NODE_ENV!=="production"&&h!==x&&qr(f,c)&&l(Ct(Pe.FALLBACK_TO_DATE_FORMAT,{key:c,target:x})),process.env.NODE_ENV!=="production"&&h!==x){const $=e.__v_emitter;$&&$.emit("fallback",{type:S,key:c,from:E,to:D,groupId:`${S}:${c}`})}if(b=n[x]||{},w=b[c],J(w))break;Ln(e,c,x,p,S),E=D}if(!J(w)||!M(x))return o?Ur:c;let N=`${x}__${c}`;Or(u)||(N=`${N}__${JSON.stringify(u)}`);let P=i.get(N);return P||(P=new Intl.DateTimeFormat(x,De({},w,u)),i.set(N,P)),g?P.formatToParts(d):P.format(d)}const Na=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Mn(...e){const[r,n,o,a]=e,l=me();let s=me(),i;if(M(r)){const c=r.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!c)throw ct($e.INVALID_ISO_DATE_ARGUMENT);const d=c[3]?c[3].trim().startsWith("T")?`${c[1].trim()}${c[3].trim()}`:`${c[1].trim()}T${c[3].trim()}`:c[1].trim();i=new Date(d);try{i.toISOString()}catch{throw ct($e.INVALID_ISO_DATE_ARGUMENT)}}else if(Zs(r)){if(isNaN(r.getTime()))throw ct($e.INVALID_DATE_ARGUMENT);i=r}else if(Se(r))i=r;else throw ct($e.INVALID_ARGUMENT);return M(n)?l.key=n:J(n)&&Object.keys(n).forEach(c=>{Na.includes(c)?s[c]=n[c]:l[c]=n[c]}),M(o)?l.locale=o:J(o)&&(s=o),J(a)&&(s=a),[l.key||"",i,l,s]}function Ca(e,r,n){const o=e;for(const a in n){const l=`${r}__${a}`;o.__datetimeFormatters.has(l)&&o.__datetimeFormatters.delete(l)}}function Sa(e,...r){const{numberFormats:n,unresolving:o,fallbackLocale:a,onWarn:l,localeFallbacker:s}=e,{__numberFormatters:i}=e;if(process.env.NODE_ENV!=="production"&&!Ea.numberFormat)return l(Ct(Pe.CANNOT_FORMAT_NUMBER)),jr;const[c,d,m,u]=On(...r),p=ae(m.missingWarn)?m.missingWarn:e.missingWarn,f=ae(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn,g=!!m.part,h=An(e,m),k=s(e,a,h);if(!M(c)||c==="")return new Intl.NumberFormat(h,u).format(d);let b={},x,w=null,E=h,D=null;const S="number format";for(let T=0;T<k.length;T++){if(x=D=k[T],process.env.NODE_ENV!=="production"&&h!==x&&qr(f,c)&&l(Ct(Pe.FALLBACK_TO_NUMBER_FORMAT,{key:c,target:x})),process.env.NODE_ENV!=="production"&&h!==x){const $=e.__v_emitter;$&&$.emit("fallback",{type:S,key:c,from:E,to:D,groupId:`${S}:${c}`})}if(b=n[x]||{},w=b[c],J(w))break;Ln(e,c,x,p,S),E=D}if(!J(w)||!M(x))return o?Ur:c;let N=`${x}__${c}`;Or(u)||(N=`${N}__${JSON.stringify(u)}`);let P=i.get(N);return P||(P=new Intl.NumberFormat(x,De({},w,u)),i.set(N,P)),g?P.formatToParts(d):P.format(d)}const Va=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function On(...e){const[r,n,o,a]=e,l=me();let s=me();if(!Se(r))throw ct($e.INVALID_ARGUMENT);const i=r;return M(n)?l.key=n:J(n)&&Object.keys(n).forEach(c=>{Va.includes(c)?s[c]=n[c]:l[c]=n[c]}),M(o)?l.locale=o:J(o)&&(s=o),J(a)&&(s=a),[l.key||"",i,l,s]}function Da(e,r,n){const o=e;for(const a in n){const l=`${r}__${a}`;o.__numberFormatters.has(l)&&o.__numberFormatters.delete(l)}}const kc=e=>e,wc=e=>"",Ec="text",vc=e=>e.length===0?"":En(e),Nc=ri;function Ta(e,r){return e=Math.abs(e),r===2?e?e>1?1:0:1:e?Math.min(e,2):0}function Cc(e){const r=Se(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(Se(e.named.count)||Se(e.named.n))?Se(e.named.count)?e.named.count:Se(e.named.n)?e.named.n:r:r}function Sc(e,r){r.count||(r.count=e),r.n||(r.n=e)}function Vc(e={}){const r=e.locale,n=Cc(e),o=oe(e.pluralRules)&&M(r)&&pe(e.pluralRules[r])?e.pluralRules[r]:Ta,a=oe(e.pluralRules)&&M(r)&&pe(e.pluralRules[r])?Ta:void 0,l=b=>b[o(n,b.length,a)],s=e.list||[],i=b=>s[b],c=e.named||me();Se(e.pluralIndex)&&Sc(n,c);const d=b=>c[b];function m(b,x){const w=pe(e.messages)?e.messages(b,!!x):oe(e.messages)?e.messages[b]:!1;return w||(e.parent?e.parent.message(b):wc)}const u=b=>e.modifiers?e.modifiers[b]:kc,p=J(e.processor)&&pe(e.processor.normalize)?e.processor.normalize:vc,f=J(e.processor)&&pe(e.processor.interpolate)?e.processor.interpolate:Nc,g=J(e.processor)&&M(e.processor.type)?e.processor.type:Ec,k={list:i,named:d,plural:l,linked:(b,...x)=>{const[w,E]=x;let D="text",S="";x.length===1?oe(w)?(S=w.modifier||S,D=w.type||D):M(w)&&(S=w||S):x.length===2&&(M(w)&&(S=w||S),M(E)&&(D=E||D));const N=m(b,!0)(k),P=D==="vnode"&&_e(N)&&S?N[0]:N;return S?u(S)(P,D):P},message:m,type:g,interpolate:f,normalize:p,values:De(me(),s,c)};return k}const Aa=()=>"",ze=e=>pe(e);function Ia(e,...r){const{fallbackFormat:n,postTranslation:o,unresolving:a,messageCompiler:l,fallbackLocale:s,messages:i}=e,[c,d]=Bn(...r),m=ae(d.missingWarn)?d.missingWarn:e.missingWarn,u=ae(d.fallbackWarn)?d.fallbackWarn:e.fallbackWarn,p=ae(d.escapeParameter)?d.escapeParameter:e.escapeParameter,f=!!d.resolvedMessage,g=M(d.default)||ae(d.default)?ae(d.default)?l?c:()=>c:d.default:n?l?c:()=>c:null,h=n||g!=null&&(M(g)||pe(g)),k=An(e,d);p&&Dc(d);let[b,x,w]=f?[c,k,i[k]||me()]:$a(e,c,k,s,u,m),E=b,D=c;if(!f&&!(M(E)||Ye(E)||ze(E))&&h&&(E=g,D=E),!f&&(!(M(E)||Ye(E)||ze(E))||!M(x)))return a?Ur:c;if(process.env.NODE_ENV!=="production"&&M(E)&&e.messageCompiler==null)return ht(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${c}'.`),c;let S=!1;const N=()=>{S=!0},P=ze(E)?E:La(e,c,x,E,D,N);if(S)return E;const T=$c(e,x,w,d),$=Vc(T),R=Tc(e,P,$),H=o?o(R,c):R;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const re={timestamp:Date.now(),key:M(c)?c:ze(E)?E.key:"",locale:x||(ze(E)?E.locale:""),format:M(E)?E:ze(E)?E.source:"",message:H};re.meta=De({},e.__meta,bc()||{}),zi(re)}return H}function Dc(e){_e(e.list)?e.list=e.list.map(r=>M(r)?Go(r):r):oe(e.named)&&Object.keys(e.named).forEach(r=>{M(e.named[r])&&(e.named[r]=Go(e.named[r]))})}function $a(e,r,n,o,a,l){const{messages:s,onWarn:i,messageResolver:c,localeFallbacker:d}=e,m=d(e,o,n);let u=me(),p,f=null,g=n,h=null;const k="translate";for(let b=0;b<m.length;b++){if(p=h=m[b],process.env.NODE_ENV!=="production"&&n!==p&&!ka(n,p)&&qr(a,r)&&i(Ct(Pe.FALLBACK_TO_TRANSLATE,{key:r,target:p})),process.env.NODE_ENV!=="production"&&n!==p){const D=e.__v_emitter;D&&D.emit("fallback",{type:k,key:r,from:g,to:h,groupId:`${k}:${r}`})}u=s[p]||me();let x=null,w,E;if(process.env.NODE_ENV!=="production"&&Qe&&(x=window.performance.now(),w="intlify-message-resolve-start",E="intlify-message-resolve-end",je&&je(w)),(f=c(u,r))===null&&(f=u[r]),process.env.NODE_ENV!=="production"&&Qe){const D=window.performance.now(),S=e.__v_emitter;S&&x&&f&&S.emit("message-resolve",{type:"message-resolve",key:r,message:f,time:D-x,groupId:`${k}:${r}`}),w&&E&&je&&vt&&(je(E),vt("intlify message resolve",w,E))}if(M(f)||Ye(f)||ze(f))break;if(!xc(p,m)){const D=Ln(e,r,p,l,k);D!==r&&(f=D)}g=h}return[f,p,u]}function La(e,r,n,o,a,l){const{messageCompiler:s,warnHtmlMessage:i}=e;if(ze(o)){const p=o;return p.locale=p.locale||n,p.key=p.key||r,p}if(s==null){const p=()=>o;return p.locale=n,p.key=r,p}let c=null,d,m;process.env.NODE_ENV!=="production"&&Qe&&(c=window.performance.now(),d="intlify-message-compilation-start",m="intlify-message-compilation-end",je&&je(d));const u=s(o,Ac(e,n,a,o,i,l));if(process.env.NODE_ENV!=="production"&&Qe){const p=window.performance.now(),f=e.__v_emitter;f&&c&&f.emit("message-compilation",{type:"message-compilation",message:o,time:p-c,groupId:`translate:${r}`}),d&&m&&je&&vt&&(je(m),vt("intlify message compilation",d,m))}return u.locale=n,u.key=r,u.source=o,u}function Tc(e,r,n){let o=null,a,l;process.env.NODE_ENV!=="production"&&Qe&&(o=window.performance.now(),a="intlify-message-evaluation-start",l="intlify-message-evaluation-end",je&&je(a));const s=r(n);if(process.env.NODE_ENV!=="production"&&Qe){const i=window.performance.now(),c=e.__v_emitter;c&&o&&c.emit("message-evaluation",{type:"message-evaluation",value:s,time:i-o,groupId:`translate:${r.key}`}),a&&l&&je&&vt&&(je(l),vt("intlify message evaluation",a,l))}return s}function Bn(...e){const[r,n,o]=e,a=me();if(!M(r)&&!Se(r)&&!ze(r)&&!Ye(r))throw ct($e.INVALID_ARGUMENT);const l=Se(r)?String(r):(ze(r),r);return Se(n)?a.plural=n:M(n)?a.default=n:J(n)&&!Or(n)?a.named=n:_e(n)&&(a.list=n),Se(o)?a.plural=o:M(o)?a.default=o:J(o)&&De(a,o),[l,a]}function Ac(e,r,n,o,a,l){return{locale:r,key:n,warnHtmlMessage:a,onError:s=>{if(l&&l(s),process.env.NODE_ENV!=="production"){const i=Ic(o),c=`Message compilation error: ${s.message}`,d=s.location&&i&&ni(i,s.location.start.offset,s.location.end.offset),m=e.__v_emitter;m&&i&&m.emit("compile-error",{message:i,error:s.message,start:s.location&&s.location.start.offset,end:s.location&&s.location.end.offset,groupId:`translate:${n}`}),console.error(d?`${c}
|
|
232
|
-
${
|
|
236
|
+
*/function Li(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(At().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(At().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function et(e){return oe(e)&&Vn(e)===0&&(at(e,"b")||at(e,"body"))}const Jo=["b","body"];function Mi(e){return Nt(e,Jo)}const ea=["c","cases"];function Oi(e){return Nt(e,ea,[])}const ta=["s","static"];function Bi(e){return Nt(e,ta)}const ra=["i","items"];function Fi(e){return Nt(e,ra,[])}const na=["t","type"];function Vn(e){return Nt(e,na)}const oa=["v","value"];function Rr(e,r){const n=Nt(e,oa);if(n!=null)return n;throw cr(r)}const aa=["m","modifier"];function Pi(e){return Nt(e,aa)}const la=["k","key"];function Ri(e){const r=Nt(e,la);if(r)return r;throw cr(6)}function Nt(e,r,n){for(let o=0;o<r.length;o++){const a=r[o];if(at(e,a)&&e[a]!=null)return e[a]}return n}const sa=[...Jo,...ea,...ta,...ra,...la,...aa,...oa,...na];function cr(e){return new Error(`unhandled node type: ${e}`)}function Dn(e){return n=>Ui(n,e)}function Ui(e,r){const n=Mi(r);if(n==null)throw cr(0);if(Vn(n)===1){const l=Oi(n);return e.plural(l.reduce((s,i)=>[...s,ia(e,i)],[]))}else return ia(e,n)}function ia(e,r){const n=Bi(r);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const o=Fi(r).reduce((a,l)=>[...a,Tn(e,l)],[]);return e.normalize(o)}}function Tn(e,r){const n=Vn(r);switch(n){case 3:return Rr(r,n);case 9:return Rr(r,n);case 4:{const o=r;if(at(o,"k")&&o.k)return e.interpolate(e.named(o.k));if(at(o,"key")&&o.key)return e.interpolate(e.named(o.key));throw cr(n)}case 5:{const o=r;if(at(o,"i")&&Te(o.i))return e.interpolate(e.list(o.i));if(at(o,"index")&&Te(o.index))return e.interpolate(e.list(o.index));throw cr(n)}case 6:{const o=r,a=Pi(o),l=Ri(o);return e.linked(Tn(e,l),a?Tn(e,a):void 0,e.type)}case 7:return Rr(r,n);case 8:return Rr(r,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const ji="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function qi(e,r){r&&di(e)&&Et(Or(ji,{source:e}))}const Hi=e=>e;let Ur=pe();function Gi(e,r={}){let n=!1;const o=r.onError||ii;return r.onError=a=>{n=!0,o(a)},{...Ii(e,r),detectError:n}}function Wi(e,r){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&M(e)){const n=ae(r.warnHtmlMessage)?r.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&qi(e,n);const a=(r.onCacheKey||Hi)(e),l=Ur[a];if(l)return l;const{ast:s,detectError:i}=Gi(e,{...r,location:process.env.NODE_ENV!=="production",jit:!0}),c=Dn(s);return i?c:Ur[a]=c}else{if(process.env.NODE_ENV!=="production"&&!et(e))return Et(`the message that is resolve with key '${r.key}' is not supported for jit compilation`),()=>e;const n=e.cacheKey;if(n){const o=Ur[n];return o||(Ur[n]=Dn(e))}else return Dn(e)}}let dr=null;function Yi(e){dr=e}function zi(e,r,n){dr&&dr.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:r,meta:n})}const Ki=Xi("function:translate");function Xi(e){return r=>dr&&dr.emit(e,r)}const Be={INVALID_ARGUMENT:li,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},Qi=24;function ht(e){return Wt(e,null,process.env.NODE_ENV!=="production"?{messages:Zi}:void 0)}const Zi={[Be.INVALID_ARGUMENT]:"Invalid arguments",[Be.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[Be.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[Be.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[Be.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[Be.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[Be.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function An(e,r){return r.locale!=null?ca(r.locale):ca(e.locale)}let $n;function ca(e){if(M(e))return e;if(fe(e)){if(e.resolvedOnce&&$n!=null)return $n;if(e.constructor.name==="Function"){const r=e();if(ri(r))throw ht(Be.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return $n=r}else throw ht(Be.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw ht(Be.NOT_SUPPORT_LOCALE_TYPE)}function Ji(e,r,n){return[...new Set([n,..._e(r)?r:oe(r)?Object.keys(r):M(r)?[r]:[n]])]}function da(e,r,n){const o=M(n)?n:ur,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let l=a.__localeChainCache.get(o);if(!l){l=[];let s=[n];for(;_e(s);)s=ua(l,s,r);const i=_e(r)||!re(r)?r:r.default?r.default:null;s=M(i)?[i]:i,_e(s)&&ua(l,s,!1),a.__localeChainCache.set(o,l)}return l}function ua(e,r,n){let o=!0;for(let a=0;a<r.length&&ae(o);a++){const l=r[a];M(l)&&(o=ec(e,r[a],n))}return o}function ec(e,r,n){let o;const a=r.split("-");do{const l=a.join("-");o=tc(e,l,n),a.splice(-1,1)}while(a.length&&o===!0);return o}function tc(e,r,n){let o=!1;if(!e.includes(r)&&(o=!0,r)){o=r[r.length-1]!=="!";const a=r.replace(/!/g,"");e.push(a),(_e(n)||re(n))&&n[a]&&(o=n[a])}return o}const Ct=[];Ct[0]={w:[0],i:[3,0],"[":[4],o:[7]},Ct[1]={w:[1],".":[2],"[":[4],o:[7]},Ct[2]={w:[2],i:[3,0],0:[3,0]},Ct[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Ct[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Ct[5]={"'":[4,0],o:8,l:[5,0]},Ct[6]={'"':[4,0],o:8,l:[6,0]};const rc=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function nc(e){return rc.test(e)}function oc(e){const r=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return r===n&&(r===34||r===39)?e.slice(1,-1):e}function ac(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function lc(e){const r=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:nc(r)?oc(r):"*"+r}function sc(e){const r=[];let n=-1,o=0,a=0,l,s,i,c,u,d,m;const p=[];p[0]=()=>{s===void 0?s=i:s+=i},p[1]=()=>{s!==void 0&&(r.push(s),s=void 0)},p[2]=()=>{p[0](),a++},p[3]=()=>{if(a>0)a--,o=4,p[0]();else{if(a=0,s===void 0||(s=lc(s),s===!1))return!1;p[1]()}};function f(){const g=e[n+1];if(o===5&&g==="'"||o===6&&g==='"')return n++,i="\\"+g,p[0](),!0}for(;o!==null;)if(n++,l=e[n],!(l==="\\"&&f())){if(c=ac(l),m=Ct[o],u=m[c]||m.l||8,u===8||(o=u[0],u[1]!==void 0&&(d=p[u[1]],d&&(i=l,d()===!1))))return;if(o===7)return r}}const ma=new Map;function ic(e,r){return oe(e)?e[r]:null}function cc(e,r){if(!oe(e))return null;let n=ma.get(r);if(n||(n=sc(r),n&&ma.set(r,n)),!n)return null;const o=n.length;let a=e,l=0;for(;l<o;){const s=n[l];if(sa.includes(s)&&et(a))return null;const i=a[s];if(i===void 0||fe(a))return null;a=i,l++}return a}const Ye={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},dc=8,uc={[Ye.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[Ye.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[Ye.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[Ye.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[Ye.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[Ye.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[Ye.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function $t(e,...r){return Or(uc[e],...r)}const mc="11.1.5",jr=-1,ur="en-US",qr="",pa=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function pc(){return{upper:(e,r)=>r==="text"&&M(e)?e.toUpperCase():r==="vnode"&&oe(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,r)=>r==="text"&&M(e)?e.toLowerCase():r==="vnode"&&oe(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,r)=>r==="text"&&M(e)?pa(e):r==="vnode"&&oe(e)&&"__v_isVNode"in e?pa(e.children):e}}let fa;function fc(e){fa=e}let ga;function gc(e){ga=e}let ha;function hc(e){ha=e}let ba=null;const bc=e=>{ba=e},yc=()=>ba;let ya=null;const _a=e=>{ya=e},_c=()=>ya;let ka=0;function kc(e={}){const r=fe(e.onWarn)?e.onWarn:Et,n=M(e.version)?e.version:mc,o=M(e.locale)||fe(e.locale)?e.locale:ur,a=fe(o)?ur:o,l=_e(e.fallbackLocale)||re(e.fallbackLocale)||M(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a,s=re(e.messages)?e.messages:In(a),i=re(e.datetimeFormats)?e.datetimeFormats:In(a),c=re(e.numberFormats)?e.numberFormats:In(a),u=$e(pe(),e.modifiers,pc()),d=e.pluralRules||pe(),m=fe(e.missing)?e.missing:null,p=ae(e.missingWarn)||Gt(e.missingWarn)?e.missingWarn:!0,f=ae(e.fallbackWarn)||Gt(e.fallbackWarn)?e.fallbackWarn:!0,g=!!e.fallbackFormat,y=!!e.unresolving,x=fe(e.postTranslation)?e.postTranslation:null,h=re(e.processor)?e.processor:null,k=ae(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter,E=fe(e.messageCompiler)?e.messageCompiler:fa;process.env.NODE_ENV!=="production"&&fe(e.messageCompiler)&&vn($t(Ye.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const V=fe(e.messageResolver)?e.messageResolver:ga||ic,S=fe(e.localeFallbacker)?e.localeFallbacker:ha||Ji,v=oe(e.fallbackContext)?e.fallbackContext:void 0,L=e,P=oe(L.__datetimeFormatters)?L.__datetimeFormatters:new Map,Z=oe(L.__numberFormatters)?L.__numberFormatters:new Map,ce=oe(L.__meta)?L.__meta:{};ka++;const ee={version:n,cid:ka,locale:o,fallbackLocale:l,messages:s,modifiers:u,pluralRules:d,missing:m,missingWarn:p,fallbackWarn:f,fallbackFormat:g,unresolving:y,postTranslation:x,processor:h,warnHtmlMessage:k,escapeParameter:w,messageCompiler:E,messageResolver:V,localeFallbacker:S,fallbackContext:v,onWarn:r,__meta:ce};return ee.datetimeFormats=i,ee.numberFormats=c,ee.__datetimeFormatters=P,ee.__numberFormatters=Z,process.env.NODE_ENV!=="production"&&(ee.__v_emitter=L.__v_emitter!=null?L.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&zi(ee,n,ce),ee}const In=e=>({[e]:pe()});function Hr(e,r){return e instanceof RegExp?e.test(r):e}function xa(e,r){return e instanceof RegExp?e.test(r):e}function Ln(e,r,n,o,a){const{missing:l,onWarn:s}=e;if(process.env.NODE_ENV!=="production"){const i=e.__v_emitter;i&&i.emit("missing",{locale:n,key:r,type:a,groupId:`${a}:${r}`})}if(l!==null){const i=l(e,n,r,a);return M(i)?i:r}else return process.env.NODE_ENV!=="production"&&xa(o,r)&&s($t(Ye.NOT_FOUND_KEY,{key:r,locale:n})),r}function mr(e,r,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,r)}function wa(e,r){return e===r?!1:e.split("-")[0]===r.split("-")[0]}function xc(e,r){const n=r.indexOf(e);if(n===-1)return!1;for(let o=n+1;o<r.length;o++)if(wa(e,r[o]))return!0;return!1}const Ea=typeof Intl<"u",va={dateTimeFormat:Ea&&typeof Intl.DateTimeFormat<"u",numberFormat:Ea&&typeof Intl.NumberFormat<"u"};function Na(e,...r){const{datetimeFormats:n,unresolving:o,fallbackLocale:a,onWarn:l,localeFallbacker:s}=e,{__datetimeFormatters:i}=e;if(process.env.NODE_ENV!=="production"&&!va.dateTimeFormat)return l($t(Ye.CANNOT_FORMAT_DATE)),qr;const[c,u,d,m]=Mn(...r),p=ae(d.missingWarn)?d.missingWarn:e.missingWarn,f=ae(d.fallbackWarn)?d.fallbackWarn:e.fallbackWarn,g=!!d.part,y=An(e,d),x=s(e,a,y);if(!M(c)||c==="")return new Intl.DateTimeFormat(y,m).format(u);let h={},k,w=null,E=y,V=null;const S="datetime format";for(let P=0;P<x.length;P++){if(k=V=x[P],process.env.NODE_ENV!=="production"&&y!==k&&Hr(f,c)&&l($t(Ye.FALLBACK_TO_DATE_FORMAT,{key:c,target:k})),process.env.NODE_ENV!=="production"&&y!==k){const Z=e.__v_emitter;Z&&Z.emit("fallback",{type:S,key:c,from:E,to:V,groupId:`${S}:${c}`})}if(h=n[k]||{},w=h[c],re(w))break;Ln(e,c,k,p,S),E=V}if(!re(w)||!M(k))return o?jr:c;let v=`${k}__${c}`;Br(m)||(v=`${v}__${JSON.stringify(m)}`);let L=i.get(v);return L||(L=new Intl.DateTimeFormat(k,$e({},w,m)),i.set(v,L)),g?L.formatToParts(u):L.format(u)}const Ca=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Mn(...e){const[r,n,o,a]=e,l=pe();let s=pe(),i;if(M(r)){const c=r.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!c)throw ht(Be.INVALID_ISO_DATE_ARGUMENT);const u=c[3]?c[3].trim().startsWith("T")?`${c[1].trim()}${c[3].trim()}`:`${c[1].trim()}T${c[3].trim()}`:c[1].trim();i=new Date(u);try{i.toISOString()}catch{throw ht(Be.INVALID_ISO_DATE_ARGUMENT)}}else if(Js(r)){if(isNaN(r.getTime()))throw ht(Be.INVALID_DATE_ARGUMENT);i=r}else if(Te(r))i=r;else throw ht(Be.INVALID_ARGUMENT);return M(n)?l.key=n:re(n)&&Object.keys(n).forEach(c=>{Ca.includes(c)?s[c]=n[c]:l[c]=n[c]}),M(o)?l.locale=o:re(o)&&(s=o),re(a)&&(s=a),[l.key||"",i,l,s]}function Sa(e,r,n){const o=e;for(const a in n){const l=`${r}__${a}`;o.__datetimeFormatters.has(l)&&o.__datetimeFormatters.delete(l)}}function Va(e,...r){const{numberFormats:n,unresolving:o,fallbackLocale:a,onWarn:l,localeFallbacker:s}=e,{__numberFormatters:i}=e;if(process.env.NODE_ENV!=="production"&&!va.numberFormat)return l($t(Ye.CANNOT_FORMAT_NUMBER)),qr;const[c,u,d,m]=On(...r),p=ae(d.missingWarn)?d.missingWarn:e.missingWarn,f=ae(d.fallbackWarn)?d.fallbackWarn:e.fallbackWarn,g=!!d.part,y=An(e,d),x=s(e,a,y);if(!M(c)||c==="")return new Intl.NumberFormat(y,m).format(u);let h={},k,w=null,E=y,V=null;const S="number format";for(let P=0;P<x.length;P++){if(k=V=x[P],process.env.NODE_ENV!=="production"&&y!==k&&Hr(f,c)&&l($t(Ye.FALLBACK_TO_NUMBER_FORMAT,{key:c,target:k})),process.env.NODE_ENV!=="production"&&y!==k){const Z=e.__v_emitter;Z&&Z.emit("fallback",{type:S,key:c,from:E,to:V,groupId:`${S}:${c}`})}if(h=n[k]||{},w=h[c],re(w))break;Ln(e,c,k,p,S),E=V}if(!re(w)||!M(k))return o?jr:c;let v=`${k}__${c}`;Br(m)||(v=`${v}__${JSON.stringify(m)}`);let L=i.get(v);return L||(L=new Intl.NumberFormat(k,$e({},w,m)),i.set(v,L)),g?L.formatToParts(u):L.format(u)}const Da=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function On(...e){const[r,n,o,a]=e,l=pe();let s=pe();if(!Te(r))throw ht(Be.INVALID_ARGUMENT);const i=r;return M(n)?l.key=n:re(n)&&Object.keys(n).forEach(c=>{Da.includes(c)?s[c]=n[c]:l[c]=n[c]}),M(o)?l.locale=o:re(o)&&(s=o),re(a)&&(s=a),[l.key||"",i,l,s]}function Ta(e,r,n){const o=e;for(const a in n){const l=`${r}__${a}`;o.__numberFormatters.has(l)&&o.__numberFormatters.delete(l)}}const wc=e=>e,Ec=e=>"",vc="text",Nc=e=>e.length===0?"":En(e),Cc=ni;function Aa(e,r){return e=Math.abs(e),r===2?e?e>1?1:0:1:e?Math.min(e,2):0}function Sc(e){const r=Te(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(Te(e.named.count)||Te(e.named.n))?Te(e.named.count)?e.named.count:Te(e.named.n)?e.named.n:r:r}function Vc(e,r){r.count||(r.count=e),r.n||(r.n=e)}function Dc(e={}){const r=e.locale,n=Sc(e),o=oe(e.pluralRules)&&M(r)&&fe(e.pluralRules[r])?e.pluralRules[r]:Aa,a=oe(e.pluralRules)&&M(r)&&fe(e.pluralRules[r])?Aa:void 0,l=h=>h[o(n,h.length,a)],s=e.list||[],i=h=>s[h],c=e.named||pe();Te(e.pluralIndex)&&Vc(n,c);const u=h=>c[h];function d(h,k){const w=fe(e.messages)?e.messages(h,!!k):oe(e.messages)?e.messages[h]:!1;return w||(e.parent?e.parent.message(h):Ec)}const m=h=>e.modifiers?e.modifiers[h]:wc,p=re(e.processor)&&fe(e.processor.normalize)?e.processor.normalize:Nc,f=re(e.processor)&&fe(e.processor.interpolate)?e.processor.interpolate:Cc,g=re(e.processor)&&M(e.processor.type)?e.processor.type:vc,x={list:i,named:u,plural:l,linked:(h,...k)=>{const[w,E]=k;let V="text",S="";k.length===1?oe(w)?(S=w.modifier||S,V=w.type||V):M(w)&&(S=w||S):k.length===2&&(M(w)&&(S=w||S),M(E)&&(V=E||V));const v=d(h,!0)(x),L=V==="vnode"&&_e(v)&&S?v[0]:v;return S?m(S)(L,V):L},message:d,type:g,interpolate:f,normalize:p,values:$e(pe(),s,c)};return x}const $a=()=>"",tt=e=>fe(e);function Ia(e,...r){const{fallbackFormat:n,postTranslation:o,unresolving:a,messageCompiler:l,fallbackLocale:s,messages:i}=e,[c,u]=Bn(...r),d=ae(u.missingWarn)?u.missingWarn:e.missingWarn,m=ae(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,p=ae(u.escapeParameter)?u.escapeParameter:e.escapeParameter,f=!!u.resolvedMessage,g=M(u.default)||ae(u.default)?ae(u.default)?l?c:()=>c:u.default:n?l?c:()=>c:null,y=n||g!=null&&(M(g)||fe(g)),x=An(e,u);p&&Tc(u);let[h,k,w]=f?[c,x,i[x]||pe()]:La(e,c,x,s,m,d),E=h,V=c;if(!f&&!(M(E)||et(E)||tt(E))&&y&&(E=g,V=E),!f&&(!(M(E)||et(E)||tt(E))||!M(k)))return a?jr:c;if(process.env.NODE_ENV!=="production"&&M(E)&&e.messageCompiler==null)return Et(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${c}'.`),c;let S=!1;const v=()=>{S=!0},L=tt(E)?E:Ma(e,c,k,E,V,v);if(S)return E;const P=Lc(e,k,w,u),Z=Dc(P),ce=Ac(e,L,Z),ee=o?o(ce,c):ce;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const Ee={timestamp:Date.now(),key:M(c)?c:tt(E)?E.key:"",locale:k||(tt(E)?E.locale:""),format:M(E)?E:tt(E)?E.source:"",message:ee};Ee.meta=$e({},e.__meta,yc()||{}),Ki(Ee)}return ee}function Tc(e){_e(e.list)?e.list=e.list.map(r=>M(r)?Wo(r):r):oe(e.named)&&Object.keys(e.named).forEach(r=>{M(e.named[r])&&(e.named[r]=Wo(e.named[r]))})}function La(e,r,n,o,a,l){const{messages:s,onWarn:i,messageResolver:c,localeFallbacker:u}=e,d=u(e,o,n);let m=pe(),p,f=null,g=n,y=null;const x="translate";for(let h=0;h<d.length;h++){if(p=y=d[h],process.env.NODE_ENV!=="production"&&n!==p&&!wa(n,p)&&Hr(a,r)&&i($t(Ye.FALLBACK_TO_TRANSLATE,{key:r,target:p})),process.env.NODE_ENV!=="production"&&n!==p){const V=e.__v_emitter;V&&V.emit("fallback",{type:x,key:r,from:g,to:y,groupId:`${x}:${r}`})}m=s[p]||pe();let k=null,w,E;if(process.env.NODE_ENV!=="production"&&ot&&(k=window.performance.now(),w="intlify-message-resolve-start",E="intlify-message-resolve-end",Xe&&Xe(w)),(f=c(m,r))===null&&(f=m[r]),process.env.NODE_ENV!=="production"&&ot){const V=window.performance.now(),S=e.__v_emitter;S&&k&&f&&S.emit("message-resolve",{type:"message-resolve",key:r,message:f,time:V-k,groupId:`${x}:${r}`}),w&&E&&Xe&&Tt&&(Xe(E),Tt("intlify message resolve",w,E))}if(M(f)||et(f)||tt(f))break;if(!xc(p,d)){const V=Ln(e,r,p,l,x);V!==r&&(f=V)}g=y}return[f,p,m]}function Ma(e,r,n,o,a,l){const{messageCompiler:s,warnHtmlMessage:i}=e;if(tt(o)){const p=o;return p.locale=p.locale||n,p.key=p.key||r,p}if(s==null){const p=()=>o;return p.locale=n,p.key=r,p}let c=null,u,d;process.env.NODE_ENV!=="production"&&ot&&(c=window.performance.now(),u="intlify-message-compilation-start",d="intlify-message-compilation-end",Xe&&Xe(u));const m=s(o,$c(e,n,a,o,i,l));if(process.env.NODE_ENV!=="production"&&ot){const p=window.performance.now(),f=e.__v_emitter;f&&c&&f.emit("message-compilation",{type:"message-compilation",message:o,time:p-c,groupId:`translate:${r}`}),u&&d&&Xe&&Tt&&(Xe(d),Tt("intlify message compilation",u,d))}return m.locale=n,m.key=r,m.source=o,m}function Ac(e,r,n){let o=null,a,l;process.env.NODE_ENV!=="production"&&ot&&(o=window.performance.now(),a="intlify-message-evaluation-start",l="intlify-message-evaluation-end",Xe&&Xe(a));const s=r(n);if(process.env.NODE_ENV!=="production"&&ot){const i=window.performance.now(),c=e.__v_emitter;c&&o&&c.emit("message-evaluation",{type:"message-evaluation",value:s,time:i-o,groupId:`translate:${r.key}`}),a&&l&&Xe&&Tt&&(Xe(l),Tt("intlify message evaluation",a,l))}return s}function Bn(...e){const[r,n,o]=e,a=pe();if(!M(r)&&!Te(r)&&!tt(r)&&!et(r))throw ht(Be.INVALID_ARGUMENT);const l=Te(r)?String(r):(tt(r),r);return Te(n)?a.plural=n:M(n)?a.default=n:re(n)&&!Br(n)?a.named=n:_e(n)&&(a.list=n),Te(o)?a.plural=o:M(o)?a.default=o:re(o)&&$e(a,o),[l,a]}function $c(e,r,n,o,a,l){return{locale:r,key:n,warnHtmlMessage:a,onError:s=>{if(l&&l(s),process.env.NODE_ENV!=="production"){const i=Ic(o),c=`Message compilation error: ${s.message}`,u=s.location&&i&&oi(i,s.location.start.offset,s.location.end.offset),d=e.__v_emitter;d&&i&&d.emit("compile-error",{message:i,error:s.message,start:s.location&&s.location.start.offset,end:s.location&&s.location.end.offset,groupId:`translate:${n}`}),console.error(u?`${c}
|
|
237
|
+
${u}`:c)}else throw s},onCacheKey:s=>Qs(r,n,s)}}function Ic(e){if(M(e))return e;if(e.loc&&e.loc.source)return e.loc.source}function Lc(e,r,n,o){const{modifiers:a,pluralRules:l,messageResolver:s,fallbackLocale:i,fallbackWarn:c,missingWarn:u,fallbackContext:d}=e,p={locale:r,modifiers:a,pluralRules:l,messages:(f,g)=>{let y=s(n,f);if(y==null&&(d||g)){const[,,x]=La(d||e,f,r,i,c,u);y=s(x,f)}if(M(y)||et(y)){let x=!1;const k=Ma(e,f,r,y,f,()=>{x=!0});return x?$a:k}else return tt(y)?y:$a}};return e.processor&&(p.processor=e.processor),o.list&&(p.list=o.list),o.named&&(p.named=o.named),Te(o.plural)&&(p.pluralIndex=o.plural),p}Li();function Mc(){return Oa().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Oa(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Oc=typeof Proxy=="function",Bc="devtools-plugin:setup",Fc="plugin:settings:set";let Kt,Fn;function Pc(){var e;return Kt!==void 0||(typeof window<"u"&&window.performance?(Kt=!0,Fn=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Kt=!0,Fn=globalThis.perf_hooks.performance):Kt=!1),Kt}function Rc(){return Pc()?Fn.now():Date.now()}class Uc{constructor(r,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=r,this.hook=n;const o={};if(r.settings)for(const s in r.settings){const i=r.settings[s];o[s]=i.defaultValue}const a=`__vue-devtools-plugin-settings__${r.id}`;let l=Object.assign({},o);try{const s=localStorage.getItem(a),i=JSON.parse(s);Object.assign(l,i)}catch{}this.fallbacks={getSettings(){return l},setSettings(s){try{localStorage.setItem(a,JSON.stringify(s))}catch{}l=s},now(){return Rc()}},n&&n.on(Fc,(s,i)=>{s===this.plugin.id&&this.fallbacks.setSettings(i)}),this.proxiedOn=new Proxy({},{get:(s,i)=>this.target?this.target.on[i]:(...c)=>{this.onQueue.push({method:i,args:c})}}),this.proxiedTarget=new Proxy({},{get:(s,i)=>this.target?this.target[i]:i==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(i)?(...c)=>(this.targetQueue.push({method:i,args:c,resolve:()=>{}}),this.fallbacks[i](...c)):(...c)=>new Promise(u=>{this.targetQueue.push({method:i,args:c,resolve:u})})})}async setRealTarget(r){this.target=r;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function jc(e,r){const n=e,o=Oa(),a=Mc(),l=Oc&&n.enableEarlyProxy;if(a&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!l))a.emit(Bc,e,r);else{const s=l?new Uc(n,a):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:r,proxy:s}),s&&r(s.proxiedTarget)}}/*!
|
|
233
238
|
* vue-i18n v11.1.5
|
|
234
239
|
* (c) 2025 kazuya kawaguchi
|
|
235
240
|
* Released under the MIT License.
|
|
236
|
-
*/const
|
|
237
|
-
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[rt.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead."};function mr(e,...r){return Mr(Gc[e],...r)}function pr(e){if(!oe(e)||Ye(e))return e;for(const r in e)if(Ze(e,r))if(!r.includes("."))oe(e[r])&&pr(e[r]);else{const n=r.split("."),o=n.length-1;let a=e,l=!1;for(let s=0;s<o;s++){if(n[s]==="__proto__")throw new Error(`unsafe key: ${n[s]}`);if(n[s]in a||(a[n[s]]=me()),!oe(a[n[s]])){process.env.NODE_ENV!=="production"&&ht(mr(rt.IGNORE_OBJ_FLATTEN,{key:n[s]})),l=!0;break}a=a[n[s]]}if(l||(Ye(a)?la.includes(n[o])||delete e[r]:(a[n[o]]=e[r],delete e[r])),!Ye(a)){const s=a[n[o]];oe(s)&&pr(s)}}return e}function qn(e,r){const{messages:n,__i18n:o,messageResolver:a,flatJson:l}=r,s=J(n)?n:_e(o)?me():{[e]:me()};if(_e(o)&&o.forEach(i=>{if("locale"in i&&"resource"in i){const{locale:c,resource:d}=i;c?(s[c]=s[c]||me(),Fr(d,s[c])):Fr(d,s)}else M(i)&&Fr(JSON.parse(i),s)}),a==null&&l)for(const i in s)Ze(s,i)&&pr(s[i]);return s}function Fa(e){return e.type}function Pa(e,r,n){let o=oe(r.messages)?r.messages:me();"__i18nGlobal"in n&&(o=qn(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const a=Object.keys(o);a.length&&a.forEach(l=>{e.mergeLocaleMessage(l,o[l])});{if(oe(r.datetimeFormats)){const l=Object.keys(r.datetimeFormats);l.length&&l.forEach(s=>{e.mergeDateTimeFormat(s,r.datetimeFormats[s])})}if(oe(r.numberFormats)){const l=Object.keys(r.numberFormats);l.length&&l.forEach(s=>{e.mergeNumberFormat(s,r.numberFormats[s])})}}}function Ra(e){return t.createVNode(t.Text,null,e,0)}const Ua="__INTLIFY_META__",ja=()=>[],Wc=()=>!1;let qa=0;function Ha(e){return(r,n,o,a)=>e(n,o,t.getCurrentInstance()||void 0,a)}const Yc=()=>{const e=t.getCurrentInstance();let r=null;return e&&(r=Fa(e)[Ua])?{[Ua]:r}:null};function Hn(e={}){const{__root:r,__injectWithOption:n}=e,o=r===void 0,a=e.flatJson,l=Qe?t.ref:t.shallowRef;let s=ae(e.inheritLocale)?e.inheritLocale:!0;const i=l(r&&s?r.locale.value:M(e.locale)?e.locale:cr),c=l(r&&s?r.fallbackLocale.value:M(e.fallbackLocale)||_e(e.fallbackLocale)||J(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i.value),d=l(qn(i.value,e)),m=l(J(e.datetimeFormats)?e.datetimeFormats:{[i.value]:{}}),u=l(J(e.numberFormats)?e.numberFormats:{[i.value]:{}});let p=r?r.missingWarn:ae(e.missingWarn)||Ut(e.missingWarn)?e.missingWarn:!0,f=r?r.fallbackWarn:ae(e.fallbackWarn)||Ut(e.fallbackWarn)?e.fallbackWarn:!0,g=r?r.fallbackRoot:ae(e.fallbackRoot)?e.fallbackRoot:!0,h=!!e.fallbackFormat,k=pe(e.missing)?e.missing:null,b=pe(e.missing)?Ha(e.missing):null,x=pe(e.postTranslation)?e.postTranslation:null,w=r?r.warnHtmlMessage:ae(e.warnHtmlMessage)?e.warnHtmlMessage:!0,E=!!e.escapeParameter;const D=r?r.modifiers:J(e.modifiers)?e.modifiers:{};let S=e.pluralRules||r&&r.pluralRules,N;N=(()=>{o&&ya(null);const v={version:jc,locale:i.value,fallbackLocale:c.value,messages:d.value,modifiers:D,pluralRules:S,missing:b===null?void 0:b,missingWarn:p,fallbackWarn:f,fallbackFormat:h,unresolving:!0,postTranslation:x===null?void 0:x,warnHtmlMessage:w,escapeParameter:E,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};v.datetimeFormats=m.value,v.numberFormats=u.value,v.__datetimeFormatters=J(N)?N.__datetimeFormatters:void 0,v.__numberFormatters=J(N)?N.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(v.__v_emitter=J(N)?N.__v_emitter:void 0);const A=_c(v);return o&&ya(A),A})(),dr(N,i.value,c.value);function T(){return[i.value,c.value,d.value,m.value,u.value]}const $=t.computed({get:()=>i.value,set:v=>{N.locale=v,i.value=v}}),R=t.computed({get:()=>c.value,set:v=>{N.fallbackLocale=v,c.value=v,dr(N,i.value,v)}}),H=t.computed(()=>d.value),re=t.computed(()=>m.value),ne=t.computed(()=>u.value);function ee(){return pe(x)?x:null}function ge(v){x=v,N.postTranslation=v}function te(){return k}function be(v){v!==null&&(b=Ha(v)),k=v,N.missing=b}function U(v,A){return v!=="translate"||!A.resolvedMessage}const q=(v,A,de,Ne,Mt,pn)=>{T();let or;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,o||(N.fallbackContext=r?yc():void 0),or=v(N)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,o||(N.fallbackContext=void 0)}if(de!=="translate exists"&&Se(or)&&or===Ur||de==="translate exists"&&!or){const[Ot,Gx]=A();if(process.env.NODE_ENV!=="production"&&r&&M(Ot)&&U(de,Gx)&&(g&&(qr(f,Ot)||xa(p,Ot))&&ht(mr(rt.FALLBACK_TO_ROOT,{key:Ot,type:de})),process.env.NODE_ENV!=="production")){const{__v_emitter:Ms}=N;Ms&&g&&Ms.emit("fallback",{type:de,key:Ot,to:"global",groupId:`${de}:${Ot}`})}return r&&g?Ne(r):Mt(Ot)}else{if(pn(or))return or;throw Re(fe.UNEXPECTED_RETURN_TYPE)}};function O(...v){return q(A=>Reflect.apply(Ia,null,[A,...v]),()=>Bn(...v),"translate",A=>Reflect.apply(A.t,A,[...v]),A=>A,A=>M(A))}function se(...v){const[A,de,Ne]=v;if(Ne&&!oe(Ne))throw Re(fe.INVALID_ARGUMENT);return O(A,de,De({resolvedMessage:!0},Ne||{}))}function Ae(...v){return q(A=>Reflect.apply(va,null,[A,...v]),()=>Mn(...v),"datetime format",A=>Reflect.apply(A.d,A,[...v]),()=>jr,A=>M(A)||_e(A))}function We(...v){return q(A=>Reflect.apply(Sa,null,[A,...v]),()=>On(...v),"number format",A=>Reflect.apply(A.n,A,[...v]),()=>jr,A=>M(A)||_e(A))}function Et(v){return v.map(A=>M(A)||Se(A)||ae(A)?Ra(String(A)):A)}const $t={normalize:Et,interpolate:v=>v,type:"vnode"};function Lt(...v){return q(A=>{let de;const Ne=A;try{Ne.processor=$t,de=Reflect.apply(Ia,null,[Ne,...v])}finally{Ne.processor=null}return de},()=>Bn(...v),"translate",A=>A[Pn](...v),A=>[Ra(A)],A=>_e(A))}function rr(...v){return q(A=>Reflect.apply(Sa,null,[A,...v]),()=>On(...v),"number format",A=>A[Un](...v),ja,A=>M(A)||_e(A))}function Tr(...v){return q(A=>Reflect.apply(va,null,[A,...v]),()=>Mn(...v),"datetime format",A=>A[Rn](...v),ja,A=>M(A)||_e(A))}function nr(v){S=v,N.pluralRules=S}function C(v,A){return q(()=>{if(!v)return!1;const de=M(A)?A:i.value,Ne=F(de),Mt=N.messageResolver(Ne,v);return Ye(Mt)||ze(Mt)||M(Mt)},()=>[v],"translate exists",de=>Reflect.apply(de.te,de,[v,A]),Wc,de=>ae(de))}function L(v){let A=null;const de=ca(N,c.value,i.value);for(let Ne=0;Ne<de.length;Ne++){const Mt=d.value[de[Ne]]||{},pn=N.messageResolver(Mt,v);if(pn!=null){A=pn;break}}return A}function B(v){const A=L(v);return A??(r?r.tm(v)||{}:{})}function F(v){return d.value[v]||{}}function Q(v,A){if(a){const de={[v]:A};for(const Ne in de)Ze(de,Ne)&&pr(de[Ne]);A=de[v]}d.value[v]=A,N.messages=d.value}function we(v,A){d.value[v]=d.value[v]||{};const de={[v]:A};if(a)for(const Ne in de)Ze(de,Ne)&&pr(de[Ne]);A=de[v],Fr(A,d.value[v]),N.messages=d.value}function y(v){return m.value[v]||{}}function _(v,A){m.value[v]=A,N.datetimeFormats=m.value,Ca(N,v,A)}function V(v,A){m.value[v]=De(m.value[v]||{},A),N.datetimeFormats=m.value,Ca(N,v,A)}function j(v){return u.value[v]||{}}function Ee(v,A){u.value[v]=A,N.numberFormats=u.value,Da(N,v,A)}function ve(v,A){u.value[v]=De(u.value[v]||{},A),N.numberFormats=u.value,Da(N,v,A)}qa++,r&&Qe&&(t.watch(r.locale,v=>{s&&(i.value=v,N.locale=v,dr(N,i.value,c.value))}),t.watch(r.fallbackLocale,v=>{s&&(c.value=v,N.fallbackLocale=v,dr(N,i.value,c.value))}));const ie={id:qa,locale:$,fallbackLocale:R,get inheritLocale(){return s},set inheritLocale(v){s=v,v&&r&&(i.value=r.locale.value,c.value=r.fallbackLocale.value,dr(N,i.value,c.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:H,get modifiers(){return D},get pluralRules(){return S||{}},get isGlobal(){return o},get missingWarn(){return p},set missingWarn(v){p=v,N.missingWarn=p},get fallbackWarn(){return f},set fallbackWarn(v){f=v,N.fallbackWarn=f},get fallbackRoot(){return g},set fallbackRoot(v){g=v},get fallbackFormat(){return h},set fallbackFormat(v){h=v,N.fallbackFormat=h},get warnHtmlMessage(){return w},set warnHtmlMessage(v){w=v,N.warnHtmlMessage=v},get escapeParameter(){return E},set escapeParameter(v){E=v,N.escapeParameter=v},t:O,getLocaleMessage:F,setLocaleMessage:Q,mergeLocaleMessage:we,getPostTranslationHandler:ee,setPostTranslationHandler:ge,getMissingHandler:te,setMissingHandler:be,[Oa]:nr};return ie.datetimeFormats=re,ie.numberFormats=ne,ie.rt=se,ie.te=C,ie.tm=B,ie.d=Ae,ie.n=We,ie.getDateTimeFormat=y,ie.setDateTimeFormat=_,ie.mergeDateTimeFormat=V,ie.getNumberFormat=j,ie.setNumberFormat=Ee,ie.mergeNumberFormat=ve,ie[Ba]=n,ie[Pn]=Lt,ie[Rn]=Tr,ie[Un]=rr,process.env.NODE_ENV!=="production"&&(ie[St]=v=>{N.__v_emitter=v},ie[ur]=()=>{N.__v_emitter=void 0}),ie}const Ga="vue-i18n: composer properties",Gn={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},zc={"vue-i18n-resource-inspector":"Search for scopes ..."},Kc={"vue-i18n-timeline":16764185};let Wn;async function Xc(e,r){return new Promise((n,o)=>{try{Uc({id:"vue-devtools-plugin-vue-i18n",label:Gn["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[Ga],app:e},a=>{Wn=a,a.on.visitComponentTree(({componentInstance:s,treeNode:i})=>{Qc(s,i,r)}),a.on.inspectComponent(({componentInstance:s,instanceData:i})=>{s.vnode.el&&s.vnode.el.__VUE_I18N__&&i&&(r.mode==="legacy"?s.vnode.el.__VUE_I18N__!==r.global.__composer&&Ya(i,s.vnode.el.__VUE_I18N__):Ya(i,s.vnode.el.__VUE_I18N__))}),a.addInspector({id:"vue-i18n-resource-inspector",label:Gn["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:zc["vue-i18n-resource-inspector"]}),a.on.getInspectorTree(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&rd(s,r)});const l=new Map;a.on.getInspectorState(async s=>{if(s.app===e&&s.inspectorId==="vue-i18n-resource-inspector")if(a.unhighlightElement(),od(s,r),s.nodeId==="global"){if(!l.has(s.app)){const[i]=await a.getComponentInstances(s.app);l.set(s.app,i)}a.highlightElement(l.get(s.app))}else{const i=nd(s.nodeId,r);i&&a.highlightElement(i)}}),a.on.editInspectorState(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&ld(s,r)}),a.addTimelineLayer({id:"vue-i18n-timeline",label:Gn["vue-i18n-timeline"],color:Kc["vue-i18n-timeline"]}),n(!0)})}catch(a){console.error(a),o(!1)}})}function Wa(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function Qc(e,r,n){const o=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==o){const a={label:`i18n (${Wa(e)} Scope)`,textColor:0,backgroundColor:16764185};r.tags.push(a)}}function Ya(e,r){const n=Ga;e.state.push({type:n,key:"locale",editable:!0,value:r.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:r.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:r.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:r.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:Yn(r.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:r.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:r.numberFormats.value})}function Yn(e){const r={};return Object.keys(e).forEach(n=>{const o=e[n];pe(o)&&"source"in o?r[n]=td(o):Ye(o)&&o.loc&&o.loc.source?r[n]=o.loc.source:oe(o)?r[n]=Yn(o):r[n]=o}),r}const Zc={"<":"<",">":">",'"':""","&":"&"};function Jc(e){return e.replace(/[<>"&]/g,ed)}function ed(e){return Zc[e]||e}function td(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${Jc(e.source)}")`:"(?)"}`}}}function rd(e,r){e.rootNodes.push({id:"global",label:"Global Scope"});const n=r.mode==="composition"?r.global:r.global.__composer;for(const[o,a]of r.__instances){const l=r.mode==="composition"?a:a.__composer;n!==l&&e.rootNodes.push({id:l.id.toString(),label:`${Wa(o)} Scope`})}}function nd(e,r){let n=null;if(e!=="global"){for(const[o,a]of r.__instances.entries())if(a.id.toString()===e){n=o;break}}return n}function za(e,r){if(e==="global")return r.mode==="composition"?r.global:r.global.__composer;{const n=Array.from(r.__instances.values()).find(o=>o.id.toString()===e);return n?r.mode==="composition"?n:n.__composer:null}}function od(e,r){const n=za(e.nodeId,r);return n&&(e.state=ad(n)),null}function ad(e){const r={},n="Locale related info",o=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];r[n]=o;const a="Locale messages info",l=[{type:a,key:"messages",editable:!1,value:Yn(e.messages.value)}];r[a]=l;{const s="Datetime formats info",i=[{type:s,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];r[s]=i;const c="Datetime formats info",d=[{type:c,key:"numberFormats",editable:!1,value:e.numberFormats.value}];r[c]=d}return r}function fr(e,r){if(Wn){let n;r&&"groupId"in r&&(n=r.groupId,delete r.groupId),Wn.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:r||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function ld(e,r){const n=za(e.nodeId,r);if(n){const[o]=e.path;o==="locale"&&M(e.state.value)?n.locale.value=e.state.value:o==="fallbackLocale"&&(M(e.state.value)||_e(e.state.value)||oe(e.state.value))?n.fallbackLocale.value=e.state.value:o==="inheritLocale"&&ae(e.state.value)&&(n.inheritLocale=e.state.value)}}function sd(e){const r=M(e.locale)?e.locale:cr,n=M(e.fallbackLocale)||_e(e.fallbackLocale)||J(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:r,o=pe(e.missing)?e.missing:void 0,a=ae(e.silentTranslationWarn)||Ut(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,l=ae(e.silentFallbackWarn)||Ut(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,s=ae(e.fallbackRoot)?e.fallbackRoot:!0,i=!!e.formatFallbackMessages,c=J(e.modifiers)?e.modifiers:{},d=e.pluralizationRules,m=pe(e.postTranslation)?e.postTranslation:void 0,u=M(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,p=!!e.escapeParameterHtml,f=ae(e.sync)?e.sync:!0;let g=e.messages;if(J(e.sharedMessages)){const D=e.sharedMessages;g=Object.keys(D).reduce((N,P)=>{const T=N[P]||(N[P]={});return De(T,D[P]),N},g||{})}const{__i18n:h,__root:k,__injectWithOption:b}=e,x=e.datetimeFormats,w=e.numberFormats,E=e.flatJson;return{locale:r,fallbackLocale:n,messages:g,flatJson:E,datetimeFormats:x,numberFormats:w,missing:o,missingWarn:a,fallbackWarn:l,fallbackRoot:s,fallbackFormat:i,modifiers:c,pluralRules:d,postTranslation:m,warnHtmlMessage:u,escapeParameter:p,messageResolver:e.messageResolver,inheritLocale:f,__i18n:h,__root:k,__injectWithOption:b}}function zn(e={}){const r=Hn(sd(e)),{__extender:n}=e,o={id:r.id,get locale(){return r.locale.value},set locale(a){r.locale.value=a},get fallbackLocale(){return r.fallbackLocale.value},set fallbackLocale(a){r.fallbackLocale.value=a},get messages(){return r.messages.value},get datetimeFormats(){return r.datetimeFormats.value},get numberFormats(){return r.numberFormats.value},get availableLocales(){return r.availableLocales},get missing(){return r.getMissingHandler()},set missing(a){r.setMissingHandler(a)},get silentTranslationWarn(){return ae(r.missingWarn)?!r.missingWarn:r.missingWarn},set silentTranslationWarn(a){r.missingWarn=ae(a)?!a:a},get silentFallbackWarn(){return ae(r.fallbackWarn)?!r.fallbackWarn:r.fallbackWarn},set silentFallbackWarn(a){r.fallbackWarn=ae(a)?!a:a},get modifiers(){return r.modifiers},get formatFallbackMessages(){return r.fallbackFormat},set formatFallbackMessages(a){r.fallbackFormat=a},get postTranslation(){return r.getPostTranslationHandler()},set postTranslation(a){r.setPostTranslationHandler(a)},get sync(){return r.inheritLocale},set sync(a){r.inheritLocale=a},get warnHtmlInMessage(){return r.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(a){r.warnHtmlMessage=a!=="off"},get escapeParameterHtml(){return r.escapeParameter},set escapeParameterHtml(a){r.escapeParameter=a},get pluralizationRules(){return r.pluralRules||{}},__composer:r,t(...a){return Reflect.apply(r.t,r,[...a])},rt(...a){return Reflect.apply(r.rt,r,[...a])},te(a,l){return r.te(a,l)},tm(a){return r.tm(a)},getLocaleMessage(a){return r.getLocaleMessage(a)},setLocaleMessage(a,l){r.setLocaleMessage(a,l)},mergeLocaleMessage(a,l){r.mergeLocaleMessage(a,l)},d(...a){return Reflect.apply(r.d,r,[...a])},getDateTimeFormat(a){return r.getDateTimeFormat(a)},setDateTimeFormat(a,l){r.setDateTimeFormat(a,l)},mergeDateTimeFormat(a,l){r.mergeDateTimeFormat(a,l)},n(...a){return Reflect.apply(r.n,r,[...a])},getNumberFormat(a){return r.getNumberFormat(a)},setNumberFormat(a,l){r.setNumberFormat(a,l)},mergeNumberFormat(a,l){r.mergeNumberFormat(a,l)}};return o.__extender=n,process.env.NODE_ENV!=="production"&&(o.__enableEmitter=a=>{const l=r;l[St]&&l[St](a)},o.__disableEmitter=()=>{const a=r;a[ur]&&a[ur]()}),o}function id(e,r,n){return{beforeCreate(){const o=t.getCurrentInstance();if(!o)throw Re(fe.UNEXPECTED_ERROR);const a=this.$options;if(a.i18n){const l=a.i18n;if(a.__i18n&&(l.__i18n=a.__i18n),l.__root=r,this===this.$root)this.$i18n=Ka(e,l);else{l.__injectWithOption=!0,l.__extender=n.__vueI18nExtend,this.$i18n=zn(l);const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}}else if(a.__i18n)if(this===this.$root)this.$i18n=Ka(e,a);else{this.$i18n=zn({__i18n:a.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:r});const l=this.$i18n;l.__extender&&(l.__disposer=l.__extender(this.$i18n))}else this.$i18n=e;a.__i18nGlobal&&Pa(r,a,a),this.$t=(...l)=>this.$i18n.t(...l),this.$rt=(...l)=>this.$i18n.rt(...l),this.$te=(l,s)=>this.$i18n.te(l,s),this.$d=(...l)=>this.$i18n.d(...l),this.$n=(...l)=>this.$i18n.n(...l),this.$tm=l=>this.$i18n.tm(l),n.__setInstance(o,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const o=this.$i18n;this.$el.__VUE_I18N__=o.__composer;const a=this.__v_emitter=Nn();o.__enableEmitter&&o.__enableEmitter(a),a.on("*",fr)}},unmounted(){const o=t.getCurrentInstance();if(!o)throw Re(fe.UNEXPECTED_ERROR);const a=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",fr),delete this.__v_emitter),this.$i18n&&(a.__disableEmitter&&a.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,a.__disposer&&(a.__disposer(),delete a.__disposer,delete a.__extender),n.__deleteInstance(o),delete this.$i18n}}}function Ka(e,r){e.locale=r.locale||e.locale,e.fallbackLocale=r.fallbackLocale||e.fallbackLocale,e.missing=r.missing||e.missing,e.silentTranslationWarn=r.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=r.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=r.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=r.postTranslation||e.postTranslation,e.warnHtmlInMessage=r.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=r.escapeParameterHtml||e.escapeParameterHtml,e.sync=r.sync||e.sync,e.__composer[Oa](r.pluralizationRules||e.pluralizationRules);const n=qn(e.locale,{messages:r.messages,__i18n:r.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),r.datetimeFormats&&Object.keys(r.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,r.datetimeFormats[o])),r.numberFormats&&Object.keys(r.numberFormats).forEach(o=>e.mergeNumberFormat(o,r.numberFormats[o])),e}const Kn={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function cd({slots:e},r){return r.length===1&&r[0]==="default"?(e.default?e.default():[]).reduce((o,a)=>[...o,...a.type===t.Fragment?a.children:[a]],[]):r.reduce((n,o)=>{const a=e[o];return a&&(n[o]=a()),n},me())}function Xa(){return t.Fragment}const Qa=t.defineComponent({name:"i18n-t",props:De({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Se(e)||!isNaN(e)}},Kn),setup(e,r){const{slots:n,attrs:o}=r,a=e.i18n||ue({useScope:e.scope,__useComponent:!0});return()=>{const l=Object.keys(n).filter(u=>u[0]!=="_"),s=me();e.locale&&(s.locale=e.locale),e.plural!==void 0&&(s.plural=M(e.plural)?+e.plural:e.plural);const i=cd(r,l),c=a[Pn](e.keypath,i,s),d=De(me(),o),m=M(e.tag)||oe(e.tag)?e.tag:Xa();return t.h(m,d,c)}}});function dd(e){return _e(e)&&!M(e[0])}function Za(e,r,n,o){const{slots:a,attrs:l}=r;return()=>{const s={part:!0};let i=me();e.locale&&(s.locale=e.locale),M(e.format)?s.key=e.format:oe(e.format)&&(M(e.format.key)&&(s.key=e.format.key),i=Object.keys(e.format).reduce((p,f)=>n.includes(f)?De(me(),p,{[f]:e.format[f]}):p,me()));const c=o(e.value,s,i);let d=[s.key];_e(c)?d=c.map((p,f)=>{const g=a[p.type],h=g?g({[p.type]:p.value,index:f,parts:c}):[p.value];return dd(h)&&(h[0].key=`${p.type}-${f}`),h}):M(c)&&(d=[c]);const m=De(me(),l),u=M(e.tag)||oe(e.tag)?e.tag:Xa();return t.h(u,m,d)}}const Ja=t.defineComponent({name:"i18n-n",props:De({value:{type:Number,required:!0},format:{type:[String,Object]}},Kn),setup(e,r){const n=e.i18n||ue({useScope:e.scope,__useComponent:!0});return Za(e,r,Va,(...o)=>n[Un](...o))}});function ud(e,r){const n=e;if(e.mode==="composition")return n.__getInstance(r)||e.global;{const o=n.__getInstance(r);return o!=null?o.__composer:e.global.__composer}}function md(e){const r=s=>{process.env.NODE_ENV!=="production"&&vn(mr(rt.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:i,value:c}=s;if(!i||!i.$)throw Re(fe.UNEXPECTED_ERROR);const d=ud(e,i.$),m=el(c);return[Reflect.apply(d.t,d,[...tl(m)]),d]};return{created:(s,i)=>{const[c,d]=r(i);Qe&&e.global===d&&(s.__i18nWatcher=t.watch(d.locale,()=>{i.instance&&i.instance.$forceUpdate()})),s.__composer=d,s.textContent=c},unmounted:s=>{Qe&&s.__i18nWatcher&&(s.__i18nWatcher(),s.__i18nWatcher=void 0,delete s.__i18nWatcher),s.__composer&&(s.__composer=void 0,delete s.__composer)},beforeUpdate:(s,{value:i})=>{if(s.__composer){const c=s.__composer,d=el(i);s.textContent=Reflect.apply(c.t,c,[...tl(d)])}},getSSRProps:s=>{const[i]=r(s);return{textContent:i}}}}function el(e){if(M(e))return{path:e};if(J(e)){if(!("path"in e))throw Re(fe.REQUIRED_VALUE,"path");return e}else throw Re(fe.INVALID_VALUE)}function tl(e){const{path:r,locale:n,args:o,choice:a,plural:l}=e,s={},i=o||{};return M(n)&&(s.locale=n),Se(a)&&(s.plural=a),Se(l)&&(s.plural=l),[r,i,s]}function pd(e,r,...n){const o=J(n[0])?n[0]:{};(ae(o.globalInstall)?o.globalInstall:!0)&&([Qa.name,"I18nT"].forEach(l=>e.component(l,Qa)),[Ja.name,"I18nN"].forEach(l=>e.component(l,Ja)),[nl.name,"I18nD"].forEach(l=>e.component(l,nl))),e.directive("t",md(r))}const fd=et("global-vue-i18n");function gd(e={}){const r=__VUE_I18N_LEGACY_API__&&ae(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__;process.env.NODE_ENV!=="production"&&r&&vn(mr(rt.DEPRECATE_LEGACY_MODE));const n=ae(e.globalInjection)?e.globalInjection:!0,o=new Map,[a,l]=hd(e,r),s=et(process.env.NODE_ENV!=="production"?"vue-i18n":"");function i(u){return o.get(u)||null}function c(u,p){o.set(u,p)}function d(u){o.delete(u)}const m={get mode(){return __VUE_I18N_LEGACY_API__&&r?"legacy":"composition"},async install(u,...p){if(process.env.NODE_ENV!=="production"&&(u.__VUE_I18N__=m),u.__VUE_I18N_SYMBOL__=s,u.provide(u.__VUE_I18N_SYMBOL__,m),J(p[0])){const h=p[0];m.__composerExtend=h.__composerExtend,m.__vueI18nExtend=h.__vueI18nExtend}let f=null;!r&&n&&(f=vd(u,m.global)),__VUE_I18N_FULL_INSTALL__&&pd(u,m,...p),__VUE_I18N_LEGACY_API__&&r&&u.mixin(id(l,l.__composer,m));const g=u.unmount;if(u.unmount=()=>{f&&f(),m.dispose(),g()},process.env.NODE_ENV!=="production"){if(!await Xc(u,m))throw Re(fe.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const k=Nn();if(r){const b=l;b.__enableEmitter&&b.__enableEmitter(k)}else{const b=l;b[St]&&b[St](k)}k.on("*",fr)}},get global(){return l},dispose(){a.stop()},__instances:o,__getInstance:i,__setInstance:c,__deleteInstance:d};return m}function ue(e={}){const r=t.getCurrentInstance();if(r==null)throw Re(fe.MUST_BE_CALL_SETUP_TOP);if(!r.isCE&&r.appContext.app!=null&&!r.appContext.app.__VUE_I18N_SYMBOL__)throw Re(fe.NOT_INSTALLED);const n=bd(r),o=_d(n),a=Fa(r),l=yd(e,a);if(l==="global")return Pa(o,e,a),o;if(l==="parent"){let c=xd(n,r,e.__useComponent);return c==null&&(process.env.NODE_ENV!=="production"&&ht(mr(rt.NOT_FOUND_PARENT_SCOPE)),c=o),c}const s=n;let i=s.__getInstance(r);if(i==null){const c=De({},e);"__i18n"in a&&(c.__i18n=a.__i18n),o&&(c.__root=o),i=Hn(c),s.__composerExtend&&(i[jn]=s.__composerExtend(i)),wd(s,r,i),s.__setInstance(r,i)}return i}function hd(e,r){const n=t.effectScope(),o=__VUE_I18N_LEGACY_API__&&r?n.run(()=>zn(e)):n.run(()=>Hn(e));if(o==null)throw Re(fe.UNEXPECTED_ERROR);return[n,o]}function bd(e){const r=t.inject(e.isCE?fd:e.appContext.app.__VUE_I18N_SYMBOL__);if(!r)throw Re(e.isCE?fe.NOT_INSTALLED_WITH_PROVIDE:fe.UNEXPECTED_ERROR);return r}function yd(e,r){return Or(e)?"__i18n"in r?"local":"global":e.useScope?e.useScope:"local"}function _d(e){return e.mode==="composition"?e.global:e.global.__composer}function xd(e,r,n=!1){let o=null;const a=r.root;let l=kd(r,n);for(;l!=null;){const s=e;if(e.mode==="composition")o=s.__getInstance(l);else if(__VUE_I18N_LEGACY_API__){const i=s.__getInstance(l);i!=null&&(o=i.__composer,n&&o&&!o[Ba]&&(o=null))}if(o!=null||a===l)break;l=l.parent}return o}function kd(e,r=!1){return e==null?null:r&&e.vnode.ctx||e.parent}function wd(e,r,n){let o=null;t.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&r.vnode.el){r.vnode.el.__VUE_I18N__=n,o=Nn();const a=n;a[St]&&a[St](o),o.on("*",fr)}},r),t.onUnmounted(()=>{const a=n;process.env.NODE_ENV!=="production"&&r.vnode.el&&r.vnode.el.__VUE_I18N__&&(o&&o.off("*",fr),a[ur]&&a[ur](),delete r.vnode.el.__VUE_I18N__),e.__deleteInstance(r);const l=a[jn];l&&(l(),delete a[jn])},r)}const Ed=["locale","fallbackLocale","availableLocales"],rl=["t","rt","d","n","tm","te"];function vd(e,r){const n=Object.create(null);return Ed.forEach(a=>{const l=Object.getOwnPropertyDescriptor(r,a);if(!l)throw Re(fe.UNEXPECTED_ERROR);const s=t.isRef(l.value)?{get(){return l.value.value},set(i){l.value.value=i}}:{get(){return l.get&&l.get()}};Object.defineProperty(n,a,s)}),e.config.globalProperties.$i18n=n,rl.forEach(a=>{const l=Object.getOwnPropertyDescriptor(r,a);if(!l||!l.value)throw Re(fe.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${a}`,l)}),()=>{delete e.config.globalProperties.$i18n,rl.forEach(a=>{delete e.config.globalProperties[`$${a}`]})}}const nl=t.defineComponent({name:"i18n-d",props:De({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Kn),setup(e,r){const n=e.i18n||ue({useScope:e.scope,__useComponent:!0});return Za(e,r,Na,(...o)=>n[Rn](...o))}});if(qc(),pc(Gi),fc(ic),gc(ca),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Nt();e.__INTLIFY__=!0,Wi(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Nd={class:"flex items-center justify-between"},Cd={class:"flex items-center gap-2"},Sd={class:"text-4xl font-bold text-slate-800 dark:text-slate-100 mb-2"},Vd=["href","title"],Dd={class:"text-lg text-slate-600 dark:text-slate-300"},Td=t.defineComponent({__name:"DashboardHeader",setup(e){const{locale:r}=ue();return(n,o)=>{const a=t.resolveComponent("router-link");return t.openBlock(),t.createElementBlock("div",Nd,[t.createElementVNode("div",null,[t.createElementVNode("div",Cd,[t.createElementVNode("h1",Sd,t.toDisplayString(n.$t("cms.dashboard.title")),1),t.createElementVNode("a",{href:`https://cms.opengis.info/${t.unref(r)}/get-started/app-overview`,target:"_blank",title:n.$t("cms.guide.appOverview")},[t.createVNode(t.unref(gt),{class:"w-5 h-5"})],8,Vd)]),t.createElementVNode("div",Dd,t.toDisplayString(n.$t("cms.dashboard.description")),1)]),t.createElementVNode("div",null,[t.createVNode(a,{to:"/settings/collections",class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 shadow h-9 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white"},{default:t.withCtx(()=>[t.createVNode(t.unref(lt),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(n.$t("cms.dashboard.newCollection")),1)]),_:1})])])}}}),Ad={class:"rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-300 transform hover:scale-105"},Id={class:"p-6"},$d={class:"flex items-start justify-between"},Ld={class:"flex-1"},Md={class:"flex items-center space-x-2 mb-2"},Od={class:"text-sm font-medium text-slate-600 dark:text-slate-400"},Bd={class:"text-3xl font-bold text-slate-800 dark:text-slate-100 mb-1"},Fd={class:"text-xs text-slate-500 dark:text-slate-400 mb-3"},Pd=t.defineComponent({__name:"StatCard",props:{stat:{}},setup(e){const r=n=>({"file-text":ar,users:kn,image:lr,eye:hn})[n]||ar;return(n,o)=>(t.openBlock(),t.createElementBlock("div",Ad,[t.createElementVNode("div",Id,[t.createElementVNode("div",$d,[t.createElementVNode("div",Ld,[t.createElementVNode("div",Md,[t.createElementVNode("div",{class:t.normalizeClass(`p-2 rounded-lg bg-${e.stat.color}-50 dark:bg-${e.stat.color}-900/20`)},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r(e.stat.icon)),{class:t.normalizeClass(`w-5 h-5 text-${e.stat.color}-600`)},null,8,["class"]))],2),t.createElementVNode("p",Od,t.toDisplayString(e.stat.title),1)]),t.createElementVNode("p",Bd,t.toDisplayString(e.stat.value),1),t.createElementVNode("p",Fd,t.toDisplayString(e.stat.description),1)])])])]))}}),Rd={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6"},Ud=t.defineComponent({__name:"StatsGrid",props:{stats:{}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Rd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.stats,o=>(t.openBlock(),t.createBlock(Pd,{key:o.id,stat:o},null,8,["stat"]))),128))]))}}),jd={class:"p-4 hover:bg-slate-50 dark:hover:bg-slate-700/50 transition-colors"},qd={class:"flex items-center justify-between"},Hd={class:"flex-1"},Gd={class:"flex items-center space-x-3 mb-2"},Wd={class:"inline-flex items-center rounded-md border px-2.5 py-0.5 font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 text-xs bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-600 dark:text-slate-300"},Yd={class:"font-semibold text-slate-800 dark:text-slate-100 mb-1"},zd={class:"flex items-center space-x-4 text-sm text-slate-500 dark:text-slate-400"},Kd={class:"flex items-center"},Xd={class:"flex items-center"},Qd={class:"flex items-center"},Zd={class:"flex items-center space-x-2"},Jd=t.defineComponent({__name:"ContentItem",props:{item:{}},setup(e){const r=o=>{const a={published:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300",draft:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-300",review:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-300"};return a[o]||a.draft},n=o=>{if(!o)return"--.--.--";const a=new Date(o);return new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric"}).format(a)};return(o,a)=>{const l=t.resolveComponent("router-link");return t.openBlock(),t.createElementBlock("div",jd,[t.createElementVNode("div",qd,[t.createElementVNode("div",Hd,[t.createElementVNode("div",Gd,[t.createElementVNode("div",Wd,t.toDisplayString(e.item.type),1),t.createElementVNode("div",{class:t.normalizeClass(r(e.item.status))},t.toDisplayString(e.item.status||"--"),3)]),t.createElementVNode("h3",Yd,t.toDisplayString(e.item.title||"--"),1),t.createElementVNode("div",zd,[t.createElementVNode("span",Kd,[t.createVNode(t.unref(kn),{class:"w-4 h-4 mr-1"}),t.createTextVNode(" "+t.toDisplayString(e.item.author||"--"),1)]),t.createElementVNode("span",Xd,[t.createVNode(t.unref(Ir),{class:"w-4 h-4 mr-1"}),t.createTextVNode(" "+t.toDisplayString(n(e.item.updated_at)||"--.--.--"),1)]),t.createElementVNode("span",Qd,[t.createVNode(t.unref(hn),{class:"w-4 h-4 mr-1"}),t.createTextVNode(" "+t.toDisplayString(e.item.views||"--")+" "+t.toDisplayString(o.$t("cms.dashboard.views")),1)])])]),t.createElementVNode("div",Zd,[t.createVNode(l,{to:`/collections/${e.item.object_id}/${e.item.content_id}`,class:"inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors border shadow-sm rounded-md text-xs h-8 w-8 p-0 bg-white border-slate-300 hover:text-accent-foreground hover:bg-slate-50 dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600"},{default:t.withCtx(()=>[t.createVNode(t.unref(Rt),{class:"w-4 h-4 dark:text-blue-50"})]),_:1},8,["to"])])])])}}}),eu={class:"lg:col-span-2"},tu={class:"rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm"},ru={class:"flex flex-col space-y-1.5 p-6 border-b border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 dark:from-slate-800 to-white dark:to-slate-800"},nu={class:"flex items-center justify-between"},ou={class:"tracking-tight text-xl font-semibold text-slate-800 dark:text-slate-100 flex items-center"},au={class:"p-0"},lu={class:"divide-y divide-slate-100 dark:divide-slate-700"},su=t.defineComponent({__name:"RecentContent",props:{content:{}},setup(e){const r=Ce.useRouter(),n=o=>{r.push(o)};return(o,a)=>(t.openBlock(),t.createElementBlock("div",eu,[t.createElementVNode("div",tu,[t.createElementVNode("div",ru,[t.createElementVNode("div",nu,[t.createElementVNode("h3",ou,[t.createVNode(t.unref(Bs),{class:"w-5 h-5 mr-2"}),t.createTextVNode(" "+t.toDisplayString(o.$t("cms.dashboard.recentContent")),1)]),t.createElementVNode("button",{onClick:a[0]||(a[0]=l=>n("/settings/collections")),class:"inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border shadow-sm hover:text-accent-foreground h-8 rounded-md px-3 text-xs bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600"},t.toDisplayString(o.$t("cms.dashboard.viewAll")),1)])]),t.createElementVNode("div",au,[t.createElementVNode("div",lu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.content,l=>(t.openBlock(),t.createBlock(Jd,{key:l.id,item:l},null,8,["item"]))),128))])])])]))}}),iu={class:"rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm"},cu={class:"flex flex-col space-y-1.5 p-6 border-b border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 dark:from-slate-800 to-white dark:to-slate-800"},du={class:"tracking-tight text-lg font-semibold text-slate-800 dark:text-slate-100 flex items-center"},uu={class:"p-4"},mu={class:"grid grid-cols-2 gap-3"},pu=["onClick"],fu={class:"p-2 rounded-lg bg-blue-50 dark:bg-blue-900/20 mb-2 w-fit"},gu={class:"font-medium text-slate-800 dark:text-slate-100 text-sm mb-1 group-hover:text-slate-900 dark:group-hover:text-slate-50"},hu={class:"text-xs text-slate-500 dark:text-slate-400 group-hover:text-slate-600 dark:group-hover:text-slate-300"},bu=t.defineComponent({__name:"QuickActions",setup(e){const r=Ce.useRouter(),{t:n}=ue(),o=[{id:"create-article",title:n("cms.dashboard.createArticle"),description:n("cms.dashboard.createArticleDescription"),icon:ar,iconColor:"text-blue-500",link:"/collections/pages/create"},{id:"upload-media",title:n("cms.dashboard.uploadMedia"),description:n("cms.dashboard.uploadMediaDescription"),icon:lr,iconColor:"text-purple-500",link:"/media"},{id:"manage-users",title:n("cms.dashboard.manageUsers"),description:n("cms.dashboard.manageUsersDescription"),icon:kn,iconColor:"text-green-500",link:"/settings/users"}],a=l=>{l&&r.push(l)};return(l,s)=>(t.openBlock(),t.createElementBlock("div",iu,[t.createElementVNode("div",cu,[t.createElementVNode("h3",du,[t.createVNode(t.unref(zs),{class:"w-5 h-5 mr-2"}),t.createTextVNode(" "+t.toDisplayString(l.$t("cms.dashboard.quickActions")),1)])]),t.createElementVNode("div",uu,[t.createElementVNode("div",mu,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(o,i=>t.createElementVNode("button",{key:i.id,class:"p-3 rounded-lg border border-slate-200 transition-all duration-200 text-left group hover:bg-slate-50 hover:shadow-md dark:border-slate-600 bg-white dark:bg-slate-700 dark:hover:bg-slate-600",onClick:c=>a(i==null?void 0:i.link)},[t.createElementVNode("div",fu,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i==null?void 0:i.icon),{class:t.normalizeClass(`w-4 h-4 ${i==null?void 0:i.iconColor}`)},null,8,["class"]))]),t.createElementVNode("h3",gu,t.toDisplayString(i==null?void 0:i.title),1),t.createElementVNode("p",hu,t.toDisplayString(i==null?void 0:i.description),1)],8,pu)),64))])])]))}}),yu={class:"w-full max-w-7xl mx-auto space-y-8"},_u={class:"grid grid-cols-1 lg:grid-cols-3 gap-6"},Xn=t.defineComponent({__name:"Dashboard",setup(e){const{t:r}=ue(),n=t.ref([{id:"total-content",title:r("cms.dashboard.totalContent"),value:"2,847",description:r("cms.dashboard.articlesPostsPages"),change:{value:"+12.5%",isPositive:!0},icon:"file-text",color:"blue"},{id:"active-users",title:r("cms.dashboard.activeUsers"),value:"1,234",description:r("cms.dashboard.monthlyActiveUsers"),change:{value:"+8.2%",isPositive:!0},icon:"users",color:"emerald"},{id:"media-files",title:r("cms.dashboard.mediaFiles"),value:"5,692",description:r("cms.dashboard.imagesVideosDocs"),change:{value:"+23.1%",isPositive:!0},icon:"image",color:"purple"},{id:"new-media",title:r("cms.dashboard.newMediaFiles"),value:"89.2K",description:r("cms.dashboard.thisMonth"),change:{value:"-2.4%",isPositive:!1},icon:"eye",color:"orange"}]),o=t.ref([{id:1,type:"Article",status:"published",title:r("cms.dashboard.gettingStartedWithNextJs14"),author:r("cms.dashboard.sarahJohnson"),updated_at:"2024-01-15",views:1247},{id:2,type:"Post",status:"draft",title:r("cms.dashboard.advancedReactPatterns"),author:r("cms.dashboard.mikeChen"),updated_at:"2024-01-14",views:0},{id:3,type:"Article",status:"published",title:r("cms.dashboard.uiUxDesignPrinciples"),author:r("cms.dashboard.emmaWilson"),updated_at:"2024-01-13",views:892},{id:4,type:"Post",status:"review",title:r("cms.dashboard.databaseOptimizationTips"),author:r("cms.dashboard.alexRodriguez"),updated_at:"2024-01-12",views:0}]),a=s=>{n.value=n.value.map(i=>{var c,d,m,u;switch(i.id){case"total-content":return{...i,value:((c=s.totalContent)==null?void 0:c.toLocaleString())??i.value};case"active-users":return{...i,value:((d=s.totalUsers)==null?void 0:d.toLocaleString())??i.value};case"media-files":return{...i,value:((m=s.totalMediaFiles)==null?void 0:m.toLocaleString())??i.value};case"new-media":return{...i,value:((u=s.newMediaFiles)==null?void 0:u.toLocaleString())??i.value};default:return i}})},l=async()=>{const i=await(await fetch("api/cms-stat")).json();o.value=i.recentContent,a(i.stat)};return t.onMounted(()=>{l()}),(s,i)=>(t.openBlock(),t.createElementBlock("div",yu,[t.createVNode(Td),t.createVNode(Ud,{stats:n.value},null,8,["stats"]),t.createElementVNode("div",_u,[t.createVNode(su,{content:o.value,class:"lg:col-span-2"},null,8,["content"]),t.createElementVNode("div",null,[t.createVNode(bu)])])]))}}),xu={class:"rounded-xl text-card-foreground shadow-lg bg-white dark:bg-slate-800 backdrop-blur-sm border-2 border-dashed border-slate-300 dark:border-slate-600"},ku={class:"p-12 text-center"},wu={class:"text-lg font-medium text-slate-600 dark:text-slate-300 mb-2"},Eu={class:"text-slate-500 dark:text-slate-400 mb-6"},ol={__name:"EmptyData",props:{title:{type:String,default:()=>"emptyData.title"},description:{type:String,default:()=>"emptyData.description"},buttonText:{type:String,default:()=>"emptyData.buttonText"},showButton:{type:Boolean,default:!0}},emits:["action"],setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",xu,[t.createElementVNode("div",ku,[n[2]||(n[2]=t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-layers w-12 h-12 mx-auto mb-4 text-slate-400 dark:text-slate-500"},[t.createElementVNode("path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"}),t.createElementVNode("path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65"}),t.createElementVNode("path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65"})],-1)),t.createElementVNode("h3",wu,t.toDisplayString(r.$t(e.title)),1),t.createElementVNode("p",Eu,t.toDisplayString(r.$t(e.description)),1),e.showButton?(t.openBlock(),t.createElementBlock("button",{key:0,onClick:n[0]||(n[0]=o=>r.$emit("action")),class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 shadow h-9 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white"},[n[1]||(n[1]=t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-plus w-4 h-4 mr-2"},[t.createElementVNode("path",{d:"M5 12h14"}),t.createElementVNode("path",{d:"M12 5v14"})],-1)),t.createTextVNode(" "+t.toDisplayString(r.$t(e.buttonText)),1)])):t.createCommentVNode("",!0)])]))}},vu={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},al={__name:"CreateForm",props:{redirectAfterCreate:Function},setup(e){const r=t.inject("cms.fetchContentTypes"),{t:n}=ue(),o=Ce.useRouter(),a=e,l=t.ref({}),s=t.ref(!1),i=t.ref({type:"collection"}),c={name:{type:"text",label:n("cms.builder.scheme.name.label"),required:!0,placeholder:n("cms.builder.scheme.name.placeholder"),validators:["required"]},title:{type:"text",label:n("cms.builder.scheme.title.label"),required:!0,placeholder:n("cms.builder.scheme.title.placeholder"),validators:["required"]},type:{type:"combobox",mode:"combo",label:n("cms.builder.scheme.type.label"),required:!0,placeholder:n("cms.builder.scheme.type.placeholder"),validators:["required"],options:[{text:n("cms.builder.scheme.type.options.collection"),id:"collection"},{text:n("cms.builder.scheme.type.options.single"),id:"single"}]},customTable:{type:"switcher",label:n("cms.builder.scheme.customTable.label")}},d=async()=>{var u;if(await l.value.validate()){Z.notify({type:"warning",title:n("cms.common.actions.warning"),message:n("cms.collections.collectionCreationFailed")});return}try{const f=await(await fetch("/api/cms-type",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i.value)})).json(),g=((u=a.redirectAfterCreate)==null?void 0:u.call(a,f))??`/settings/collections/edit/${f.id}`;o.push(g),r(),Z.notify({type:"success",title:n("cms.common.actions.success"),message:n("cms.collections.collectionCreated")})}catch(p){Z.notify({type:"error",title:n("cms.common.actions.error"),message:n("cms.collections.collectionCreationFailed")}),console.error(p)}};return(m,u)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("button",{onClick:u[0]||(u[0]=p=>s.value=!0),class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 h-9 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white shadow-md hover:shadow-lg transition-all duration-200 transform hover:scale-105"},[t.createVNode(t.unref(lt),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(m.$t("cms.collections.createCollection")),1)]),t.createVNode(t.unref(Z.VsModal),{teleport:"#modal",visible:s.value,title:m.$t("cms.collections.createCollection"),onClose:u[4]||(u[4]=p=>s.value=!1)},{footer:t.withCtx(()=>[t.createElementVNode("div",vu,[t.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:u[3]||(u[3]=p=>s.value=!1)},t.toDisplayString(m.$t("cms.common.actions.cancel")),1),t.createElementVNode("button",{onClick:d,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},t.toDisplayString(m.$t("cms.common.actions.save")),1)])]),default:t.withCtx(()=>[t.createVNode(t.unref(z),{form:l.value,"onUpdate:form":u[1]||(u[1]=p=>l.value=p),modelValue:i.value,"onUpdate:modelValue":u[2]||(u[2]=p=>i.value=p),schema:c},null,8,["form","modelValue"])]),_:1},8,["visible","title"])]))}},Nu={class:"space-y-6 max-w-7xl mx-auto"},Cu={class:"flex items-center justify-between mb-8"},Su={class:"flex gap-4"},Vu={class:"text-3xl font-bold text-slate-800 dark:text-slate-100 mb-2"},Du={class:"text-slate-600 dark:text-slate-300"},Tu=["href","title"],Au={class:"flex items-center gap-3"},Iu={class:"relative w-full max-w-sm"},$u={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Lu=["placeholder"],Mu={key:0},Ou={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6"},Bu=["onClick"],Fu={class:"flex items-start justify-between"},Pu={class:"flex items-start gap-3"},Ru={class:"text-sm font-semibold text-gray-800 mb-1"},Uu={class:"flex items-center gap-2"},ju={class:"text-xs text-gray-500 whitespace-nowrap"},qu={class:"pl-8 text-xs text-gray-600 line-clamp-2"},Hu={key:1,class:"flex items-center justify-center min-h-[400px]"},Qn=t.defineComponent({__name:"CollectionsPage",setup(e){const{t:r,locale:n}=ue(),o=Ce.useRouter();t.inject("fetchContentTypes");const a=t.ref([]),l=t.ref(""),s=t.computed(()=>{const d=a.value.filter(f=>f.type!=="single"),m=l.value.trim().toLowerCase();return[...m?d.filter(f=>[f==null?void 0:f.title,f==null?void 0:f.name,f==null?void 0:f.id,f==null?void 0:f.description].filter(Boolean).join(" ").toLowerCase().includes(m)):d].sort((f,g)=>f.id==="pages"?-1:g.id==="pages"?1:0)});async function i(){try{const d=await fetch("/api/cms-type?type=collection");if(!d.ok)throw new Error("Failed to fetch collections");const m=await d.json();a.value=m.rows||[]}catch(d){console.error("Error fetching collections:",d)}}const c=d=>{o.push(`/collections/${d.id}`)};return t.onMounted(()=>{i()}),(d,m)=>(t.openBlock(),t.createElementBlock("div",Nu,[t.createElementVNode("div",Cu,[t.createElementVNode("div",Su,[t.createElementVNode("div",null,[t.createElementVNode("h1",Vu,t.toDisplayString(d.$t("cms.navigation.collections")),1),t.createElementVNode("p",Du,t.toDisplayString(d.$t("cms.collections.selectCollection")),1)]),t.createElementVNode("a",{href:`https://cms.opengis.info/${t.unref(n)}/guides/collections/`,target:"_blank",title:d.$t("cms.guide.collections"),class:"mt-2"},[t.createVNode(t.unref(gt),{class:"w-5 h-5"})],8,Tu)]),t.createElementVNode("div",Au,[t.createElementVNode("div",Iu,[t.createElementVNode("div",$u,[t.createVNode(t.unref(xn),{class:"w-5 h-5 text-gray-400"})]),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":m[0]||(m[0]=u=>l.value=u),type:"text",class:"block w-full py-2 pl-10 pr-3 leading-5 text-gray-900 placeholder-gray-500 transition-colors bg-white border border-gray-300 rounded-md dark:border-gray-600 dark:bg-gray-700 dark:placeholder-gray-400 focus:outline-none focus:ring-sky-500 focus:border-sky-500 dark:text-white sm:text-sm",placeholder:d.$t("cms.collections.searchCollections")},null,8,Lu),[[t.vModelText,l.value]])]),t.createVNode(al,{redirectAfterCreate:u=>`/collections/${u.id}`},null,8,["redirectAfterCreate"])])]),a.value.length>0?(t.openBlock(),t.createElementBlock("div",Mu,[t.createElementVNode("div",Ou,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,u=>(t.openBlock(),t.createElementBlock("button",{key:u.id,onClick:p=>c(u),class:"w-full border border-gray-200 bg-white rounded-lg p-4 text-left hover:shadow-md transition-all hover:border-gray-300"},[t.createElementVNode("div",null,[t.createElementVNode("div",Fu,[t.createElementVNode("div",Pu,[u.id==="pages"?(t.openBlock(),t.createBlock(t.unref(Ft),{key:0,class:"shrink-0 lucide lucide-page w-5 h-5 text-blue-600"})):(t.openBlock(),t.createBlock(t.unref(Pt),{key:1,class:"shrink-0 lucide lucide-layers w-5 h-5 text-blue-600"})),t.createElementVNode("div",null,[t.createElementVNode("h4",Ru,t.toDisplayString(u.title),1)])]),t.createElementVNode("div",Uu,[t.createElementVNode("span",ju,t.toDisplayString(u.entries)+" записів",1),t.createVNode(t.unref(Bt),{class:"w-4 h-4 text-gray-400"})])]),t.createElementVNode("p",qu,t.toDisplayString(u.description||"Опис відсутній"),1)])],8,Bu))),128))])])):(t.openBlock(),t.createElementBlock("div",Hu,[t.createVNode(ol)]))]))}}),Gu={class:"text-card-foreground border-0 bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm"},Wu={class:"p-0"},Yu={class:"table-scroll overflow-x-auto"},zu={class:"relative w-full overflow-auto max-h-[calc(100vh-270px)]"},Ku={class:"w-full caption-bottom text-sm"},Xu={class:"border-b border-slate-200 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors"},Qu={class:"flex items-center gap-2"},Zu={class:"h-10 text-center px-4 font-semibold text-slate-700 dark:text-slate-300 max-w-32"},Ju=["onClick"],em={key:1,class:"whitespace-nowrap"},tm={key:2,class:"whitespace-nowrap"},rm={key:3,class:"flex items-center"},nm={key:4,class:"inline-flex whitespace-nowrap items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300"},om={key:5,class:"flex items-center"},am={key:6,class:"flex items-center gap-3"},lm={key:8,class:"flex items-center gap-3"},sm={key:11,class:"flex items-center gap-3"},im={class:"line-clamp-2"},cm={class:"flex justify-end py-2 px-4 align-middle max-w-40"},dm={class:"flex items-center justify-center gap-1"},um=["onClick"],mm=["onClick"],Zn=t.defineComponent({__name:"UniversalTable",props:{rows:{},query:{},filterFn:{type:Function},onEdit:{type:Function},onView:{type:Function},onDelete:{type:Function},columns:{},onMore:{type:Function},customRender:{}},emits:["edit","view","delete","more"],setup(e,{emit:r}){const{t:n}=ue();t.ref(null);const o=e,a=r,l=t.computed(()=>!o.query||!o.filterFn?o.rows:o.rows.filter(u=>o.filterFn(u,o.query))),s=u=>{if(!u)return"";const p=new Date(u);return isNaN(p.getTime())?"":u.includes("T")||u.includes(" ")||u.includes(":")?p.toLocaleString("uk-UA",{dateStyle:"medium",timeStyle:"medium"}):p.toLocaleDateString("uk-UA",{dateStyle:"medium"})},i=u=>{switch(u){case"published":return{icon:Mo,text:n("cms.common.status.published"),classes:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-200 border-green-200 dark:border-green-700"};case"draft":return{icon:Rt,text:n("cms.common.status.draft"),classes:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-200 border-yellow-200 dark:border-yellow-700"};case"archived":return{icon:qo,text:n("cms.common.status.archived"),classes:"bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-300 border-gray-200 dark:border-gray-700"};default:return null}},c=(u,p)=>{switch(u){case"edit":a("edit",p),o.onEdit&&o.onEdit(p);break;case"view":a("view",p),o.onView&&o.onView(p);break;case"delete":a("delete",p);break;case"more":a("more",p),o.onMore&&o.onMore(p);break}},d=u=>{c("edit",u)},m=u=>{const p=new Date,f=new Date(u),g=p-f,h=Math.floor(g/1e3),k=Math.floor(h/60),b=Math.floor(k/60),x=Number(Math.floor(b/24)),w=Number(Math.floor(x/7));return w>=2?n("cms.table.time.weeksAgo",{count:w}):w===1?n("cms.table.time.weekAgo"):x>=2?n("cms.table.time.daysAgo",{count:x}):x===1?n("cms.table.time.dayAgo"):b>=2?n("cms.table.time.hoursAgo",{count:b}):b===1?n("cms.table.time.hourAgo"):k>=2?n("cms.table.time.minutesAgo",{count:k}):n(k===1?"cms.table.time.minuteAgo":"cms.table.time.justNow")};return(u,p)=>(t.openBlock(),t.createElementBlock("div",Gu,[t.createElementVNode("div",Wu,[t.createElementVNode("div",Yu,[t.createElementVNode("div",zu,[t.createElementVNode("table",Ku,[t.createElementVNode("thead",null,[t.createElementVNode("tr",Xu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,f=>(t.openBlock(),t.createElementBlock("th",{key:f.name,class:t.normalizeClass(["h-10 px-4 text-left align-middle font-semibold text-slate-700 dark:text-slate-300 max-w-80",{"min-w-[200px]":["title","name"].includes(f.name),"min-w-[150px]":f.name==="slug","min-w-[250px]":f.name==="description"}])},[t.createElementVNode("div",Qu,[f.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(f.icon),{key:0,class:"w-5 h-5"})):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(f.label||f.title||f.ua||f.name),1)])],2))),128)),t.createElementVNode("th",Zu,t.toDisplayString(u.$t("cms.table.actions")),1)])]),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,f=>(t.openBlock(),t.createElementBlock("tr",{key:f.id||f._id||f.name,class:"transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,(g,h)=>{var k,b,x,w,E;return t.openBlock(),t.createElementBlock("td",{key:g.name,class:t.normalizeClass(["py-2 px-4 align-middle max-w-80",{"font-medium text-slate-800 dark:text-white cursor-pointer":h===0,"text-slate-600 dark:text-slate-400 font-mono text-sm":h!==0}]),onClick:D=>h===0?d(f):void 0},[e.customRender&&e.customRender[g.name]?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.customRender[g.name](f[g.name],f)),{key:0})):t.createCommentVNode("",!0),["published_at","publish_at","created_at","date"].includes(g.name)&&f[g.name]?(t.openBlock(),t.createElementBlock("span",em,t.toDisplayString(s(f[g.name])),1)):["updated_at","lastModified","last_edit"].includes(g.name)?(t.openBlock(),t.createElementBlock("span",tm,t.toDisplayString(m(f[g.name])||"--"),1)):g.name==="views"?(t.openBlock(),t.createElementBlock("div",rm,[t.createVNode(t.unref(hn),{class:"w-4 h-4 mr-1"}),t.createTextVNode(" "+t.toDisplayString(((b=(k=f[g.name])==null?void 0:k.toLocaleString)==null?void 0:b.call(k))??f[g.name]),1)])):["entries","fields"].includes(g.name)?(t.openBlock(),t.createElementBlock("div",nm,t.toDisplayString(f[g.name]||"-"),1)):g.name==="type"?(t.openBlock(),t.createElementBlock("div",om,[t.createElementVNode("div",{class:t.normalizeClass(["whitespace-nowrap inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors border-transparent hover:bg-secondary/80",f[g.name]==="pages"?"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300":"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300"])},t.toDisplayString(f[g.name]||"-"),3)])):g.name==="name"?(t.openBlock(),t.createElementBlock("div",am,[f.type==="single"?(t.openBlock(),t.createBlock(t.unref(Ft),{key:0,class:"shrink-0 lucide lucide-page w-5 h-5 text-blue-600"})):(t.openBlock(),t.createBlock(t.unref(Pt),{key:1,class:"shrink-0 lucide lucide-layers w-5 h-5 text-blue-600"})),t.createTextVNode(" "+t.toDisplayString(f[g.name]),1)])):g.name==="status"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:7},[i(f[g.name])?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["whitespace-nowrap rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors hover:bg-secondary/80 flex items-center w-fit bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-700",(x=i(f[g.name]))==null?void 0:x.classes])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent((w=i(f[g.name]))==null?void 0:w.icon),{class:"w-3 h-3 mr-1"})),t.createTextVNode(" "+t.toDisplayString((E=i(f[g.name]))==null?void 0:E.text),1)],2)):t.createCommentVNode("",!0)],64)):g.name==="slug"?(t.openBlock(),t.createElementBlock("div",lm,t.toDisplayString(f[g.name]?"/"+f[g.name]:"-"),1)):g.name==="color"?(t.openBlock(),t.createElementBlock("span",{key:9,class:t.normalizeClass(["w-4 h-4 rounded-full block ml-2","bg-["+f[g.name]+"]"])},null,2)):g.name==="enabled"?(t.openBlock(),t.createElementBlock("span",{key:10,class:t.normalizeClass(["whitespace-nowrap rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors hover:bg-secondary/80 flex items-center w-fit",f[g.name]?"bg-green-100 text-green-800 border-green-200":"bg-red-100 text-red-800 border-red-200"])},t.toDisplayString(f[g.name]?"Доступ":"Заборонено"),3)):(t.openBlock(),t.createElementBlock("div",sm,[t.createElementVNode("p",im,t.toDisplayString(f[g.name]||"-"),1)]))],10,Ju)}),128)),t.createElementVNode("td",cm,[t.createElementVNode("div",dm,[t.createElementVNode("button",{onClick:t.withModifiers(g=>c("edit",f),["stop"]),class:"inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:text-slate-200 hover:border-blue-300 hover:bg-blue-50 hover:text-blue-600",title:"Edit"},[t.createVNode(t.unref(yn),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-green-600 dark:group-hover:text-blue-50"})],8,um),t.createElementVNode("button",{onClick:t.withModifiers(g=>c("delete",f),["stop"]),class:"inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:text-slate-200 hover:border-blue-300 hover:bg-blue-50 hover:text-blue-600",title:"Preview"},[t.createVNode(t.unref(st),{class:"w-4 h-4 text-slate-800 dark:text-slate-200 group-hover:text-red-600 dark:group-hover:text-blue-50"})],8,mm),t.renderSlot(u.$slots,"actions",{row:f})])])]))),128))])])])])])]))}}),pm={class:"flex items-center justify-between px-6 py-4 border-t border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-800"},fm={class:"flex justify-between flex-1 sm:hidden"},gm={class:"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},hm={class:"relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},bm={class:"hidden sm:flex-1 sm:flex sm:items-center sm:justify-between"},ym={class:"text-sm text-slate-600 dark:text-slate-400"},_m={class:"font-medium text-slate-800 dark:text-slate-100"},xm={class:"font-medium text-slate-800 dark:text-slate-100"},km={class:"relative z-0 inline-flex space-x-2 rounded-md shadow-sm","aria-label":"Pagination"},wm=["disabled"],Em={class:"sr-only"},vm={class:"space-x-1"},Nm={key:0,class:"px-2 py-2 text-gray-400"},Cm=["onClick"],Sm=["disabled"],Vm={class:"sr-only"},ll=t.defineComponent({__name:"UniversalTablePagination",props:t.mergeModels({total:{},count:{},limit:{}},{page:{},pageModifiers:{}}),emits:["update:page"],setup(e){const r=t.useModel(e,"page"),n=t.computed(()=>Math.ceil(e.total/e.limit)),o=t.computed(()=>{const l=[];if(n.value<=4){for(let c=1;c<=n.value;c++)l.push(c);return l}const s=Math.max(2,r.value-2),i=Math.min(n.value-1,r.value+2);l.push(1),s>2&&l.push("ellipsis");for(let c=s;c<=i;c++)l.push(c);return i<n.value-1&&l.push("ellipsis"),l.push(n.value),l});return(a,l)=>(t.openBlock(),t.createElementBlock("div",pm,[t.createElementVNode("div",fm,[t.createElementVNode("button",gm,t.toDisplayString(a.$t("cms.common.pagination.previous")),1),t.createElementVNode("button",hm,t.toDisplayString(a.$t("cms.common.pagination.next")),1)]),t.createElementVNode("div",bm,[t.createElementVNode("div",null,[t.createElementVNode("p",ym,[t.createTextVNode(t.toDisplayString(a.$t("cms.common.pagination.showing"))+" ",1),t.createElementVNode("span",_m,t.toDisplayString(e.count),1),t.createTextVNode(" "+t.toDisplayString(a.$t("cms.common.pagination.of"))+" ",1),t.createElementVNode("span",xm,t.toDisplayString(e.total),1),t.createTextVNode(" "+t.toDisplayString(a.$t("cms.common.pagination.results")),1)])]),t.createElementVNode("div",null,[t.createElementVNode("nav",km,[t.createElementVNode("button",{onClick:l[0]||(l[0]=s=>r.value=r.value>1?r.value-1:1),disabled:r.value===1,class:"inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors border shadow-sm rounded-md text-xs h-8 w-8 p-0 bg-white border-slate-300 text-slate-600 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed hover:text-accent-foreground hover:bg-slate-50 dark:bg-slate-700 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-slate-600"},[t.createElementVNode("span",Em,t.toDisplayString(a.$t("cms.common.pagination.previous")),1),t.createVNode(t.unref(Ps),{class:"w-5 h-5"})],8,wm),t.createElementVNode("div",vm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,(s,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:s+"-"+i},[s==="ellipsis"?(t.openBlock(),t.createElementBlock("span",Nm,"...")):(t.openBlock(),t.createElementBlock("button",{key:1,onClick:c=>r.value=s,class:t.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors h-8 w-8 p-0 text-sm rounded-md",{"border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-600 dark:text-slate-300 hover:border-blue-600 hover:bg-slate-50 dark:hover:bg-slate-600":s!==r.value,"shadow bg-blue-600 hover:bg-blue-700 text-white border-blue-600":s===r.value}])},t.toDisplayString(s),11,Cm))],64))),128))]),t.createElementVNode("button",{onClick:l[1]||(l[1]=s=>r.value=r.value<Math.ceil(e.total/e.limit)?r.value+1:Math.ceil(e.total/e.limit)),disabled:r.value===Math.ceil(e.total/e.limit),class:"inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors border shadow-sm rounded-md text-xs h-8 w-8 p-0 bg-white border-slate-300 text-slate-600 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed hover:text-accent-foreground hover:bg-slate-50 dark:bg-slate-700 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-slate-600"},[t.createElementVNode("span",Vm,t.toDisplayString(a.$t("cms.common.pagination.next")),1),t.createVNode(t.unref(Bt),{class:"w-5 h-5"})],8,Sm)])])])]))}}),Dm={class:"flex items-center space-x-1 mb-4"},Tm=["onClick"],Am={key:1,class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium text-slate-700 dark:text-slate-300"},sl=t.defineComponent({__name:"CollectionsBreadcrumb",props:{items:{}},emits:["navigate"],setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Dm,[t.createElementVNode("button",{class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20 hover:bg-blue-100 dark:hover:bg-blue-900/30",onClick:n[0]||(n[0]=o=>r.$emit("navigate","collections"))},[t.createVNode(t.unref(Pt),{class:"w-3 h-3"}),t.createTextVNode(" "+t.toDisplayString(r.$t("cms.navigation.collections")),1)]),e.items.length>0?(t.openBlock(),t.createBlock(t.unref(Bt),{key:0,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(o,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:a},[a<e.items.length-1?(t.openBlock(),t.createElementBlock("button",{key:0,class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/20 hover:bg-blue-100 dark:hover:bg-blue-900/30",onClick:l=>r.$emit("navigate",o.route)},t.toDisplayString(o.label),9,Tm)):(t.openBlock(),t.createElementBlock("span",Am,t.toDisplayString(o.label),1)),a<e.items.length-1?(t.openBlock(),t.createBlock(t.unref(Bt),{key:2,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):t.createCommentVNode("",!0)],64))),128))]))}}),Im={class:"space-y-6 max-w-7xl mx-auto"},$m={class:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"},Lm={class:"flex items-center gap-2"},Mm={class:"text-3xl font-bold text-slate-800 dark:text-white mb-2"},Om=["href","title"],Bm={class:"flex items-center gap-2"},Fm={key:0,class:"text-card-foreground shadow-lg border-0 bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm"},Pm={key:0,class:"p-2 border-b border-gray-200 sm:px-4 sm:py-2 dark:border-gray-700"},Rm={class:"flex flex-col gap-4 sm:flex-row"},Um={class:"relative flex items-center gap-2 ml-auto"},jm={key:1,class:"absolute top-full right-1/2 translate-x-1/2 min-w-full p-4 z-10 bg-white border border-gray-300 rounded-md mt-2 dark:bg-slate-800 dark:border-slate-700"},qm={class:"max-h-60 overflow-y-auto overflow-x-hidden"},Hm={key:1},il=t.defineComponent({__name:"ArticlesPage",setup(e){const r=Ce.useRoute(),n=Ce.useRouter(),o=t.ref(null),a=t.ref(""),{t:l,locale:s}=ue(),i=t.ref([]),c=t.inject("cms.menu")||[],d=t.ref(""),m=t.ref(null),u=t.ref(1),p=t.ref(!1),f=t.ref(["title","slug","author","publish_at","published_at","status"]),g=t.ref([]),h=t.ref([]),k=t.ref([]),b=t.ref({}),x=t.ref(0),w=t.ref(!1),E=()=>{var q;let U=(q=o.value)==null?void 0:q.columns.filter(O=>{var se;return(se=f==null?void 0:f.value)==null?void 0:se.includes(O.name)});g.value=U.map(O=>{switch(O.name){case"title":return{...O,title:O.name?O.name.charAt(0).toUpperCase()+O.name.slice(1):"--",icon:ar};case"slug":return{...O,title:O.name?O.name.charAt(0).toUpperCase()+O.name.slice(1):"-",icon:js};case"author":return{...O,title:O.name?O.name.charAt(0).toUpperCase()+O.name.slice(1):"-",icon:Ws};case"publish_at":return{...O,title:O.name?O.name.charAt(0).toUpperCase()+O.name.slice(1):"-",icon:Ir};case"published_at":return{...O,title:O.name?O.name.charAt(0).toUpperCase()+O.name.slice(1):"-",icon:Ir};default:return{...O,title:O.name?O.name.charAt(0).toUpperCase()+O.name.slice(1):"-"}}}),p.value=!1},D=t.computed(()=>{var U,q,O,se;return((U=m.value)==null?void 0:U.title)||((q=o.value)==null?void 0:q.title)||((se=(O=c.value)==null?void 0:O.find(Ae=>Ae.id===r.params.id))==null?void 0:se.title)||r.params.id}),S=async()=>{try{const U=await fetch("/api/cms-type?type=collection");if(!U.ok)return;const O=((await U.json()).rows||[]).find(se=>se.id===r.params.id);O&&(m.value=O)}catch(U){console.error("Error fetching collection meta:",U)}},N=t.computed(()=>[{label:D.value||r.params.id,route:`collections/${r.params.id}`}]),P=U=>{U==="collections"?n.push("/collections"):n.push(`/${U}`)},T=()=>{n.push(`/collections/${r.params.id}/create`)},$=()=>{n.push(`/collections/${r.params.id}/edit`)},R=async()=>{Z.confirm({title:l("cms.builder.deleteTitle"),message:l("cms.builder.deleteObject"),type:"error",onConfirm:async()=>{try{await fetch(`/api/cms-type/${r.params.id}`,{method:"DELETE"}),n.push("/collections")}catch(U){console.error("Failed to delete collection:",U)}}})},H=async U=>{console.log("handleRemoveArticle"),Z.confirm({title:l("cms.builder.deleteTitle"),message:l("cms.builder.deleteObject"),type:"error",onConfirm:async()=>{await fetch(`/api/cms/${r.params.id}/${U.id}`,{method:"DELETE"}),ne()}})},re=U=>{n.push(`/collections/${r.params.id}/${U.id}`)},ne=async()=>{if(!w.value){w.value=!0;try{const q=await(await fetch(`/api/cms/${r.params.id}?page=${u.value}&filter=${d.value}`)).json();if(i.value=q.rows||[],o.value=q,!k.value.length){const O=(q.filters||[]).map(se=>{const{extra:Ae,title:We,...Et}=se;return Et});k.value=O}r.params.id==="pages"&&f.value.push("type"),ee(),E()}finally{w.value=!1}}},ee=()=>{var q;if(!((q=o.value)!=null&&q.columns))return;const U=o.value.columns.map((O,se)=>({text:O.label,id:O.name}));h.value=[...f.value.map(O=>U.find(se=>se.id===O)).filter(Boolean),...U.filter(O=>!f.value.includes(O.id))]},ge=(U,q)=>{if(!q)return!0;const O=q.toLowerCase();return g.value.some(se=>{const Ae=U[se.name];return Ae&&Ae.toString().toLowerCase().includes(O)})},te=U=>{const q=Object.entries(U==null?void 0:U.data).filter(([,se])=>se!=null).map(([se,Ae])=>`${se}=${Ae}`).join("|");d.value=q;const O={...r.query};q?O.filter=q:delete O.filter,n.replace({query:O})},be=()=>{if(r.query.filter){d.value=r.query.filter;const U=r.query.filter.split("|"),q={};U.forEach(O=>{const[se,Ae]=O.split("=");se&&Ae&&(q[se]=Ae)}),b.value=q}else d.value="",b.value={},x.value++};return t.onMounted(()=>{be(),S(),ne()}),t.watch(()=>r.params.id,()=>{b.value={},d.value="",k.value=[],m.value=null;const U={...r.query};delete U.filter,n.replace({query:U}),x.value++,be(),S(),ne()}),t.watch(()=>r.query,async()=>{be(),await t.nextTick(),ne()},{deep:!0}),t.watch(u,async()=>{r.query.filter||(d.value="",b.value={},x.value++),await t.nextTick(),ne()}),(U,q)=>{var O,se,Ae;return t.openBlock(),t.createElementBlock("div",Im,[t.createVNode(sl,{items:N.value,onNavigate:P},null,8,["items"]),t.createElementVNode("div",$m,[t.createElementVNode("div",Lm,[t.createElementVNode("h1",Mm,t.toDisplayString(D.value),1),t.createElementVNode("a",{href:`https://cms.opengis.info/${t.unref(s)}/guides/content/`,target:"_blank",title:U.$t("cms.guide.content")},[t.createVNode(t.unref(gt),{class:"w-5 h-5"})],8,Om)]),t.createElementVNode("div",Bm,[i.value.length?(t.openBlock(),t.createElementBlock("button",{key:0,onClick:T,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[t.createVNode(t.unref(lt),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(U.$t("cms.articles.createArticle")),1)])):t.createCommentVNode("",!0),t.createElementVNode("button",{onClick:$,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 border border-slate-300 bg-white text-slate-700 shadow-sm transition-all duration-200 transform hover:bg-slate-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"},t.toDisplayString(U.$t("cms.common.actions.edit")),1),t.createElementVNode("button",{onClick:R,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 border border-red-300 bg-white text-red-600 shadow-sm transition-all duration-200 transform hover:bg-red-50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"},t.toDisplayString(U.$t("cms.common.actions.delete")),1)])]),i.value.length||d.value.length?(t.openBlock(),t.createElementBlock("div",Fm,[(t.openBlock(),t.createElementBlock("div",Pm,[t.createElementVNode("div",Rm,[(t.openBlock(),t.createBlock(t.unref(Lo),{key:x.value,schema:k.value,history:!0,value:b.value,view:"inline",onChange:te},null,8,["schema","value"])),t.createElementVNode("div",Um,[h.value.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"flex items-center gap-2 cursor-pointer text-sm border border-gray-300 rounded-md p-2 dark:text-white",onClick:q[0]||(q[0]=We=>p.value=!p.value)},[t.createElementVNode("p",null,t.toDisplayString(U.$t("cms.articles.showColumns")),1),t.createVNode(t.unref(Bo),{class:"w-4 h-4"})])):t.createCommentVNode("",!0),h.value.length>0&&p.value?(t.openBlock(),t.createElementBlock("div",jm,[t.createElementVNode("div",qm,[h.value.length>0&&p.value?(t.openBlock(),t.createBlock(t.unref(z.VsInputCheckbox),{key:0,options:h.value,modelValue:f.value,"onUpdate:modelValue":q[1]||(q[1]=We=>f.value=We)},null,8,["options","modelValue"])):t.createCommentVNode("",!0)]),t.createElementVNode("button",{class:"text-sm bg-blue-600 text-white rounded-md p-2 mt-4 w-full",onClick:E},t.toDisplayString(U.$t("cms.articles.update")),1)])):t.createCommentVNode("",!0)])])])),g.value.length>0?(t.openBlock(),t.createBlock(Zn,{key:1,class:"max-h-[calc(100vh-270px)] overflow-y-auto",rows:i.value,columns:g.value,query:a.value,filterFn:ge,onDelete:H,onEdit:re},null,8,["rows","columns","query"])):t.createCommentVNode("",!0),((O=o.value)==null?void 0:O.total)>20?(t.openBlock(),t.createBlock(ll,{key:2,total:(se=o.value)==null?void 0:se.filtered,count:(Ae=o.value)==null?void 0:Ae.count,page:u.value,"onUpdate:page":q[2]||(q[2]=We=>u.value=We),limit:20},null,8,["total","count","page"])):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",Hm,[t.createVNode(ol,{onAction:T})]))])}}});let Gm;function Wm(){return Gm}t.version[0];function Ym(e){return typeof e=="function"?e():t.unref(e)}function Jn(e){if(e instanceof Promise||e instanceof Date||e instanceof RegExp)return e;const r=Ym(e);if(!e||!r)return r;if(Array.isArray(r))return r.map(n=>Jn(n));if(typeof r=="object"){const n={};for(const o in r)if(Object.prototype.hasOwnProperty.call(r,o)){if(o==="titleTemplate"||o[0]==="o"&&o[1]==="n"){n[o]=t.unref(r[o]);continue}n[o]=Jn(r[o])}return n}return r}const zm="usehead",cl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},dl="__unhead_injection_handler__";function Km(){if(dl in cl)return cl[dl]();const e=t.inject(zm);return!e&&process.env.NODE_ENV!=="production"&&console.warn("Unhead is missing Vue context, falling back to shared context. This may have unexpected results."),e||Wm()}function Xm(e,r={}){const n=r.head||Km();if(n)return n.ssr?n.push(e,r):Qm(n,e,r)}function Qm(e,r,n={}){const o=t.ref(!1),a=t.ref({});t.watchEffect(()=>{a.value=o.value?{}:Jn(r)});const l=e.push(a.value,n);return t.watch(a,i=>{l.patch(i)}),t.getCurrentInstance()&&(t.onBeforeUnmount(()=>{l.dispose()}),t.onDeactivated(()=>{o.value=!0}),t.onActivated(()=>{o.value=!1})),l}function Zm(e,r=300){const n=t.ref(e.value);let o;return t.watch(e,a=>{clearTimeout(o),o=setTimeout(()=>{n.value=a},r)},{immediate:!0}),n}const dt=(e,r)=>{const n=e.__vccOpts||e;for(const[o,a]of r)n[o]=a;return n},Jm={},ep={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function tp(e,r){return t.openBlock(),t.createElementBlock("svg",ep,[...r[0]||(r[0]=[t.createStaticVNode('<line x1="8" x2="21" y1="6" y2="6"></line><line x1="8" x2="21" y1="12" y2="12"></line><line x1="8" x2="21" y1="18" y2="18"></line><line x1="3" x2="3.01" y1="6" y2="6"></line><line x1="3" x2="3.01" y1="12" y2="12"></line><line x1="3" x2="3.01" y1="18" y2="18"></line>',6)])])}const rp=dt(Jm,[["render",tp]]),np={},op={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"};function ap(e,r){return t.openBlock(),t.createElementBlock("svg",op,[...r[0]||(r[0]=[t.createStaticVNode('<rect width="18" height="18" x="3" y="3" rx="2"></rect><path d="M3 9h18"></path><path d="M3 15h18"></path><path d="M9 3v18"></path><path d="M15 3v18"></path>',5)])])}const lp=dt(np,[["render",ap]]),sp={class:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6 pb-6"},ip={class:"flex items-center gap-2 space-y-1.5 p-6 border-b border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 dark:from-slate-800 to-white dark:to-slate-800"},cp={class:"line-clamp-1 tracking-tight text-lg font-semibold text-slate-800 dark:text-slate-100 vertical-center"},dp={class:"w-full flex flex-col gap-2 p-6"},up=["title"],mp={class:"flex items-center justify-between gap-2"},pp={class:"text-sm text-slate-600 dark:text-slate-400"},fp={class:"font-semibold text-slate-800 dark:text-slate-100"},gp={class:"flex items-center justify-between gap-2"},hp={class:"text-sm text-slate-500 dark:text-slate-400"},bp={class:"font-semibold text-slate-800 dark:text-slate-100"},yp={class:"flex items-center justify-between gap-2"},_p={class:"text-sm text-slate-500 dark:text-slate-400"},xp={class:"text-sm text-slate-600 dark:text-slate-300"},kp={class:"flex items-center justify-between gap-2 mt-6"},wp=["onClick"],Ep={class:"text-slate-800 dark:text-slate-200 group-hover:text-green-600 dark:group-hover:text-blue-50"},vp=["onClick"],Np=["onClick"],Cp=t.defineComponent({__name:"CollectionsGrid",props:{collections:{},onEdit:{type:Function},onView:{type:Function},onDelete:{type:Function}},emits:["edit","view","delete"],setup(e,{emit:r}){t.ref(!1),t.ref(null);const n=e,o=r,a=(i,c)=>{switch(i){case"edit":o("edit",c),n.onEdit&&n.onEdit(c);break;case"view":o("view",c),n.onView&&n.onView(c);break;case"delete":o("delete",c),n.onDelete&&n.onDelete(c);break}},l=i=>{const c=new Date,d=new Date(i),m=c.getTime()-d.getTime(),u=Math.floor(m/1e3),p=Math.floor(u/60),f=Math.floor(p/60),g=Math.floor(f/24),h=Math.floor(g/7);return h>=2?`${h} weeks ago`:h===1?"1 week ago":g>=2?`${g} days ago`:g===1?"1 day ago":f>=2?`${f} hours ago`:f===1?"1 hour ago":p>=2?`${p} minutes ago`:p===1?"1 minute ago":"just now"},s=i=>{switch(i){case"published":return{icon:Mo,text:"Published",classes:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-200 border-green-200 dark:border-green-700"};case"draft":return{icon:Rt,text:"Draft",classes:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-200 border-yellow-200 dark:border-yellow-700"};case"archived":return{icon:qo,text:"Archived",classes:"bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-300 border-gray-200 dark:border-gray-700"};default:return{icon:gt,text:"--",classes:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-200 border-yellow-200 dark:border-yellow-700"}}};return(i,c)=>(t.openBlock(),t.createElementBlock("div",sp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.collections,d=>{var m,u,p;return t.openBlock(),t.createElementBlock("div",{key:d.id,class:"rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:bg-slate-50"},[t.createElementVNode("div",ip,[d.type==="single"?(t.openBlock(),t.createBlock(t.unref(Ft),{key:0,class:"shrink-0 lucide lucide-page w-5 h-5 text-blue-600"})):(t.openBlock(),t.createBlock(t.unref(Pt),{key:1,class:"shrink-0 lucide lucide-layers w-5 h-5 text-blue-600"})),t.createElementVNode("p",cp,t.toDisplayString(d.title),1),s(d.status)?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["whitespace-nowrap rounded-md border ml-auto px-2.5 py-0.5 text-xs font-semibold transition-colors hover:bg-secondary/80 flex items-center w-fit bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-700",(m=s(d.status))==null?void 0:m.classes])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent((u=s(d.status))==null?void 0:u.icon),{class:"w-3 h-3 mr-1"})),t.createTextVNode(" "+t.toDisplayString((p=s(d.status))==null?void 0:p.text),1)],2)):t.createCommentVNode("",!0)]),t.createElementVNode("div",dp,[t.createElementVNode("p",{class:"text-slate-600 dark:text-slate-300 mb-4 line-clamp-2",title:d.description},t.toDisplayString(d.description!==null?d.description:"No description"),9,up),t.createElementVNode("div",mp,[t.createElementVNode("p",pp,t.toDisplayString(i.$t("cms.collections.entries"))+":",1),t.createElementVNode("p",fp,t.toDisplayString(d.entries),1)]),t.createElementVNode("div",gp,[t.createElementVNode("p",hp,t.toDisplayString(i.$t("cms.collections.fields"))+":",1),t.createElementVNode("p",bp,t.toDisplayString(d.fields),1)]),t.createElementVNode("div",yp,[t.createElementVNode("p",_p,t.toDisplayString(i.$t("cms.collections.lastModified"))+":",1),t.createElementVNode("p",xp,t.toDisplayString(l(d.last_edit)),1)]),t.createElementVNode("div",kp,[t.renderSlot(i.$slots,"actions",{collection:d,handleAction:a},()=>[t.createElementVNode("button",{class:"inline-flex gap-1 items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-4/5 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-green-50 hover:border-green-300",onClick:t.withModifiers(f=>a("edit",d),["stop"])},[t.createVNode(t.unref(Rt),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-green-600 dark:group-hover:text-blue-50"}),t.createElementVNode("span",Ep,t.toDisplayString(i.$t("cms.common.actions.edit")),1)],8,wp),t.createElementVNode("button",{class:t.normalizeClass([d.id==="pages"?"disabled":"","inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-red-50 hover:border-red-300"]),onClick:t.withModifiers(f=>d.id==="pages"?null:a("delete",d),["stop"])},[t.createVNode(t.unref(st),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-red-600 dark:group-hover:text-blue-50"})],10,vp),t.createElementVNode("button",{class:t.normalizeClass([d.type==="single"?"disabled cursor-not-allowed":"","inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-blue-50 hover:border-blue-300"]),onClick:t.withModifiers(f=>d.type==="single"?null:a("view",d),["stop"])},[t.createVNode(t.unref($r),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-blue-600 dark:group-hover:text-blue-50"})],10,Np)])])])])}),128))]))}}),eo=localStorage.getItem("collectionView"),Hr=t.ref(eo==="list"||eo==="grid"?eo:"list");t.watch(Hr,e=>{localStorage.setItem("collectionView",e)});function Sp(){Hr.value=Hr.value==="grid"?"list":"grid"}function Vp(){return{collectionView:Hr,toggleCollectionView:Sp}}const Dp={class:"space-y-6 max-w-7xl mx-auto"},Tp={class:"flex items-center justify-between mb-8"},Ap={class:"flex gap-4"},Ip={class:"text-3xl font-bold text-slate-800 dark:text-slate-100 mb-2"},$p={class:"text-slate-600 dark:text-slate-300"},Lp=["href","title"],Mp={class:"flex items-center gap-3"},Op={class:"relative"},Bp={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Fp=["placeholder"],Pp={class:"flex items-center bg-white dark:bg-slate-700 border border-slate-200 dark:border-slate-600 rounded-lg p-1 max-w-[fit-content]"},Rp=["onClick"],Up=t.defineComponent({__name:"BuilderPage",setup(e){const{t:r,locale:n}=ue(),o=Ce.useRouter(),a=[{name:"name",title:r("cms.builder.collectionName"),type:"text",icon:Pt},{name:"title",title:r("cms.builder.title"),type:"text",icon:Pt},{name:"description",title:r("cms.common.description"),type:"text"},{name:"entries",title:r("cms.builder.entries"),type:"number"},{name:"fields",title:r("cms.builder.fields"),type:"number"},{name:"status",title:r("cms.builder.status"),type:"text"},{name:"last_edit",title:r("cms.builder.lastModified"),type:"date"}],l=t.ref(""),s=Zm(l,300);Xm({title:()=>r("cms.collections.title")+" | CMS"});const i=t.ref([]),c=t.inject("fetchContentTypes"),d=t.ref(1),m=t.ref(16),u=t.ref(null),{collectionView:p}=Vp();async function f(){try{const x=s.value?`&search=${encodeURIComponent(String(s.value))}`:"",w=`/api/cms-type?page=${d.value}&limit=${m.value}${x}`;console.log("Fetching collections with URL:",w);const E=await fetch(w);if(!E.ok)throw new Error("Failed to fetch collections");const D=await E.json();console.log("Collections fetched:",D),i.value=D.rows,u.value=D}catch(x){console.error("Error fetching collections:",x)}}t.onMounted(()=>{f()});const g=t.computed(()=>[...i.value].sort((w,E)=>w.id==="pages"?-1:E.id==="pages"?1:0)),h=async x=>{try{await fetch(`/api/cms-type/${x.id}`,{method:"DELETE"}),f(),c()}catch(w){console.error("Error deleting collection:",w)}},k=x=>{o.push(`/settings/collections/edit/${x.id||x.name}`)},b=x=>{x.type==="single"?o.push(`/collections/single/${x.name}`):o.push(`/collections/${x.name}`)};return t.watch(d,()=>{f()}),t.watch(s,x=>{console.log("Search query changed:",x),d.value=1,f()}),(x,w)=>{var E,D,S,N;return t.openBlock(),t.createElementBlock("div",Dp,[t.createElementVNode("div",Tp,[t.createElementVNode("div",Ap,[t.createElementVNode("div",null,[t.createElementVNode("h1",Ip,t.toDisplayString(x.$t("cms.builder.collections")),1),t.createElementVNode("p",$p,t.toDisplayString(x.$t("cms.builder.manageContentCollections")),1)]),t.createElementVNode("a",{href:`https://cms.opengis.info/${t.unref(n)}/guides/collections/`,target:"_blank",title:x.$t("cms.guide.collections"),class:"mt-2"},[t.createVNode(t.unref(gt),{class:"w-5 h-5"})],8,Lp)]),t.createElementVNode("div",Mp,[t.createElementVNode("div",Op,[t.createElementVNode("div",Bp,[t.createVNode(t.unref(xn),{class:"w-5 h-5 text-gray-400"})]),t.withDirectives(t.createElementVNode("input",{type:"text",class:"block w-full py-2 pl-10 pr-3 leading-5 text-gray-900 placeholder-gray-500 transition-colors bg-white border border-gray-300 rounded-md dark:border-gray-600 dark:bg-gray-700 dark:placeholder-gray-400 focus:outline-none focus:ring-sky-500 focus:border-sky-500 dark:text-white sm:text-sm",placeholder:x.$t("cms.builder.searchCollections"),"onUpdate:modelValue":w[0]||(w[0]=P=>l.value=P)},null,8,Fp),[[t.vModelText,l.value]])]),t.createElementVNode("div",Pp,[t.createElementVNode("button",{class:t.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors rounded-md text-xs h-8 w-8 p-0 hover:bg-blue-700 hover:text-white cursor-pointer",{"bg-blue-600 text-white":t.unref(p)==="list"}]),onClick:w[1]||(w[1]=P=>p.value="list")},[t.createVNode(rp,{class:"dark:text-blue-50 w-4 h-4"})],2),t.createElementVNode("button",{class:t.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors rounded-md text-xs h-8 w-8 p-0 hover:bg-blue-700 hover:text-white cursor-pointer",{"bg-blue-600 text-white":t.unref(p)==="grid"}]),onClick:w[2]||(w[2]=P=>p.value="grid")},[t.createVNode(lp,{class:"dark:text-blue-50 w-4 h-4"})],2)]),t.createVNode(al)])]),t.createElementVNode("div",null,[t.unref(p)==="list"?(t.openBlock(),t.createBlock(Zn,{key:0,class:"max-h-[calc(100vh-270px)] overflow-y-auto overflow-x-hidden",columns:a,rows:g.value,onDelete:h,onEdit:k,onView:b},{actions:t.withCtx(({row:P})=>[t.createElementVNode("button",{class:"inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-blue-50 hover:border-blue-300 hover:text-blue-600",onClick:T=>b(P)},[t.createVNode(t.unref($r),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-blue-600 dark:group-hover:text-blue-50"})],8,Rp)]),_:1},8,["rows"])):t.createCommentVNode("",!0),t.unref(p)==="grid"?(t.openBlock(),t.createBlock(Cp,{key:1,collections:g.value,onEdit:k,onView:b,onDelete:h,class:"max-h-[calc(100vh-270px)] overflow-y-auto overflow-x-hidden"},null,8,["collections"])):t.createCommentVNode("",!0),((E=u.value)==null?void 0:E.total)>16?(t.openBlock(),t.createBlock(ll,{key:2,total:(D=u.value)==null?void 0:D.filtered,count:((S=u.value)==null?void 0:S.count)||((N=u.value)==null?void 0:N.total),page:d.value,"onUpdate:page":w[3]||(w[3]=P=>d.value=P),limit:m.value},null,8,["total","count","page","limit"])):t.createCommentVNode("",!0)])])}}});async function jp(){if(window.monaco)return window.monaco;const e="https://cdn.jsdelivr.net/npm/monaco-editor@0.45.0/min";return window.require||(window.require={paths:{vs:`${e}/vs`}},await new Promise((r,n)=>{const o=document.createElement("script");o.src=`${e}/vs/loader.min.js`,o.onload=()=>r(),o.onerror=n,document.head.appendChild(o)})),new Promise(r=>{window.require(["vs/editor/editor.main"],()=>r(window.monaco))})}const Gr=t.defineComponent({__name:"MonacoEditor",props:t.mergeModels({language:{default:"javascript"},theme:{default:"vs-dark"},width:{default:"100%"},height:{default:"100%"},options:{default:()=>({minimap:{enabled:!1}})}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const r=e,n=t.useModel(e,"modelValue"),o=t.ref(null);let a=null,l=null;return t.onMounted(async()=>{var s;if(o.value)try{l=await jp();const i=((s=n.value)==null?void 0:s.replace(/\\n/g,`
|
|
241
|
+
*/const qc="11.1.5";function Hc(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(At().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(At().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(At().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(At().__INTLIFY_PROD_DEVTOOLS__=!1)}const ge={UNEXPECTED_RETURN_TYPE:Qi,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function ze(e,...r){return Wt(e,null,process.env.NODE_ENV!=="production"?{messages:Gc,args:r}:void 0)}const Gc={[ge.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[ge.INVALID_ARGUMENT]:"Invalid argument",[ge.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[ge.NOT_INSTALLED]:"Need to install with `app.use` function",[ge.UNEXPECTED_ERROR]:"Unexpected error",[ge.REQUIRED_VALUE]:"Required in value: {0}",[ge.INVALID_VALUE]:"Invalid value",[ge.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[ge.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[ge.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[ge.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},Pn=st("__translateVNode"),Rn=st("__datetimeParts"),Un=st("__numberParts"),It=st("__enableEmitter"),pr=st("__disableEmitter"),Ba=st("__setPluralRules"),Fa=st("__injectWithOption"),jn=st("__dispose"),ct={FALLBACK_TO_ROOT:dc,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_LEGACY_MODE:11,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:12},Wc={[ct.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[ct.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[ct.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[ct.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
|
|
242
|
+
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[ct.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead."};function fr(e,...r){return Or(Wc[e],...r)}function gr(e){if(!oe(e)||et(e))return e;for(const r in e)if(at(e,r))if(!r.includes("."))oe(e[r])&&gr(e[r]);else{const n=r.split("."),o=n.length-1;let a=e,l=!1;for(let s=0;s<o;s++){if(n[s]==="__proto__")throw new Error(`unsafe key: ${n[s]}`);if(n[s]in a||(a[n[s]]=pe()),!oe(a[n[s]])){process.env.NODE_ENV!=="production"&&Et(fr(ct.IGNORE_OBJ_FLATTEN,{key:n[s]})),l=!0;break}a=a[n[s]]}if(l||(et(a)?sa.includes(n[o])||delete e[r]:(a[n[o]]=e[r],delete e[r])),!et(a)){const s=a[n[o]];oe(s)&&gr(s)}}return e}function qn(e,r){const{messages:n,__i18n:o,messageResolver:a,flatJson:l}=r,s=re(n)?n:_e(o)?pe():{[e]:pe()};if(_e(o)&&o.forEach(i=>{if("locale"in i&&"resource"in i){const{locale:c,resource:u}=i;c?(s[c]=s[c]||pe(),Pr(u,s[c])):Pr(u,s)}else M(i)&&Pr(JSON.parse(i),s)}),a==null&&l)for(const i in s)at(s,i)&&gr(s[i]);return s}function Pa(e){return e.type}function Ra(e,r,n){let o=oe(r.messages)?r.messages:pe();"__i18nGlobal"in n&&(o=qn(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const a=Object.keys(o);a.length&&a.forEach(l=>{e.mergeLocaleMessage(l,o[l])});{if(oe(r.datetimeFormats)){const l=Object.keys(r.datetimeFormats);l.length&&l.forEach(s=>{e.mergeDateTimeFormat(s,r.datetimeFormats[s])})}if(oe(r.numberFormats)){const l=Object.keys(r.numberFormats);l.length&&l.forEach(s=>{e.mergeNumberFormat(s,r.numberFormats[s])})}}}function Ua(e){return t.createVNode(t.Text,null,e,0)}const ja="__INTLIFY_META__",qa=()=>[],Yc=()=>!1;let Ha=0;function Ga(e){return(r,n,o,a)=>e(n,o,t.getCurrentInstance()||void 0,a)}const zc=()=>{const e=t.getCurrentInstance();let r=null;return e&&(r=Pa(e)[ja])?{[ja]:r}:null};function Hn(e={}){const{__root:r,__injectWithOption:n}=e,o=r===void 0,a=e.flatJson,l=ot?t.ref:t.shallowRef;let s=ae(e.inheritLocale)?e.inheritLocale:!0;const i=l(r&&s?r.locale.value:M(e.locale)?e.locale:ur),c=l(r&&s?r.fallbackLocale.value:M(e.fallbackLocale)||_e(e.fallbackLocale)||re(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i.value),u=l(qn(i.value,e)),d=l(re(e.datetimeFormats)?e.datetimeFormats:{[i.value]:{}}),m=l(re(e.numberFormats)?e.numberFormats:{[i.value]:{}});let p=r?r.missingWarn:ae(e.missingWarn)||Gt(e.missingWarn)?e.missingWarn:!0,f=r?r.fallbackWarn:ae(e.fallbackWarn)||Gt(e.fallbackWarn)?e.fallbackWarn:!0,g=r?r.fallbackRoot:ae(e.fallbackRoot)?e.fallbackRoot:!0,y=!!e.fallbackFormat,x=fe(e.missing)?e.missing:null,h=fe(e.missing)?Ga(e.missing):null,k=fe(e.postTranslation)?e.postTranslation:null,w=r?r.warnHtmlMessage:ae(e.warnHtmlMessage)?e.warnHtmlMessage:!0,E=!!e.escapeParameter;const V=r?r.modifiers:re(e.modifiers)?e.modifiers:{};let S=e.pluralRules||r&&r.pluralRules,v;v=(()=>{o&&_a(null);const N={version:qc,locale:i.value,fallbackLocale:c.value,messages:u.value,modifiers:V,pluralRules:S,missing:h===null?void 0:h,missingWarn:p,fallbackWarn:f,fallbackFormat:y,unresolving:!0,postTranslation:k===null?void 0:k,warnHtmlMessage:w,escapeParameter:E,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};N.datetimeFormats=d.value,N.numberFormats=m.value,N.__datetimeFormatters=re(v)?v.__datetimeFormatters:void 0,N.__numberFormatters=re(v)?v.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(N.__v_emitter=re(v)?v.__v_emitter:void 0);const T=kc(N);return o&&_a(T),T})(),mr(v,i.value,c.value);function P(){return[i.value,c.value,u.value,d.value,m.value]}const Z=t.computed({get:()=>i.value,set:N=>{v.locale=N,i.value=N}}),ce=t.computed({get:()=>c.value,set:N=>{v.fallbackLocale=N,c.value=N,mr(v,i.value,N)}}),ee=t.computed(()=>u.value),Ee=t.computed(()=>d.value),ke=t.computed(()=>m.value);function Ue(){return fe(k)?k:null}function Le(N){k=N,v.postTranslation=N}function We(){return x}function Oe(N){N!==null&&(h=Ga(N)),x=N,v.missing=h}function j(N,T){return N!=="translate"||!T.resolvedMessage}const W=(N,T,ue,Ve,Pt,pn)=>{P();let lr;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,o||(v.fallbackContext=r?_c():void 0),lr=N(v)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,o||(v.fallbackContext=void 0)}if(ue!=="translate exists"&&Te(lr)&&lr===jr||ue==="translate exists"&&!lr){const[Rt,Xk]=T();if(process.env.NODE_ENV!=="production"&&r&&M(Rt)&&j(ue,Xk)&&(g&&(Hr(f,Rt)||xa(p,Rt))&&Et(fr(ct.FALLBACK_TO_ROOT,{key:Rt,type:ue})),process.env.NODE_ENV!=="production")){const{__v_emitter:Ms}=v;Ms&&g&&Ms.emit("fallback",{type:ue,key:Rt,to:"global",groupId:`${ue}:${Rt}`})}return r&&g?Ve(r):Pt(Rt)}else{if(pn(lr))return lr;throw ze(ge.UNEXPECTED_RETURN_TYPE)}};function O(...N){return W(T=>Reflect.apply(Ia,null,[T,...N]),()=>Bn(...N),"translate",T=>Reflect.apply(T.t,T,[...N]),T=>T,T=>M(T))}function A(...N){const[T,ue,Ve]=N;if(Ve&&!oe(Ve))throw ze(ge.INVALID_ARGUMENT);return O(T,ue,$e({resolvedMessage:!0},Ve||{}))}function B(...N){return W(T=>Reflect.apply(Na,null,[T,...N]),()=>Mn(...N),"datetime format",T=>Reflect.apply(T.d,T,[...N]),()=>qr,T=>M(T)||_e(T))}function J(...N){return W(T=>Reflect.apply(Va,null,[T,...N]),()=>On(...N),"number format",T=>Reflect.apply(T.n,T,[...N]),()=>qr,T=>M(T)||_e(T))}function te(N){return N.map(T=>M(T)||Te(T)||ae(T)?Ua(String(T)):T)}const Ne={normalize:te,interpolate:N=>N,type:"vnode"};function de(...N){return W(T=>{let ue;const Ve=T;try{Ve.processor=Ne,ue=Reflect.apply(Ia,null,[Ve,...N])}finally{Ve.processor=null}return ue},()=>Bn(...N),"translate",T=>T[Pn](...N),T=>[Ua(T)],T=>_e(T))}function je(...N){return W(T=>Reflect.apply(Va,null,[T,...N]),()=>On(...N),"number format",T=>T[Un](...N),qa,T=>M(T)||_e(T))}function ne(...N){return W(T=>Reflect.apply(Na,null,[T,...N]),()=>Mn(...N),"datetime format",T=>T[Rn](...N),qa,T=>M(T)||_e(T))}function qe(N){S=N,v.pluralRules=S}function C(N,T){return W(()=>{if(!N)return!1;const ue=M(T)?T:i.value,Ve=R(ue),Pt=v.messageResolver(Ve,N);return et(Pt)||tt(Pt)||M(Pt)},()=>[N],"translate exists",ue=>Reflect.apply(ue.te,ue,[N,T]),Yc,ue=>ae(ue))}function I(N){let T=null;const ue=da(v,c.value,i.value);for(let Ve=0;Ve<ue.length;Ve++){const Pt=u.value[ue[Ve]]||{},pn=v.messageResolver(Pt,N);if(pn!=null){T=pn;break}}return T}function F(N){const T=I(N);return T??(r?r.tm(N)||{}:{})}function R(N){return u.value[N]||{}}function X(N,T){if(a){const ue={[N]:T};for(const Ve in ue)at(ue,Ve)&&gr(ue[Ve]);T=ue[N]}u.value[N]=T,v.messages=u.value}function ve(N,T){u.value[N]=u.value[N]||{};const ue={[N]:T};if(a)for(const Ve in ue)at(ue,Ve)&&gr(ue[Ve]);T=ue[N],Pr(T,u.value[N]),v.messages=u.value}function b(N){return d.value[N]||{}}function _(N,T){d.value[N]=T,v.datetimeFormats=d.value,Sa(v,N,T)}function D(N,T){d.value[N]=$e(d.value[N]||{},T),v.datetimeFormats=d.value,Sa(v,N,T)}function U(N){return m.value[N]||{}}function Ce(N,T){m.value[N]=T,v.numberFormats=m.value,Ta(v,N,T)}function Se(N,T){m.value[N]=$e(m.value[N]||{},T),v.numberFormats=m.value,Ta(v,N,T)}Ha++,r&&ot&&(t.watch(r.locale,N=>{s&&(i.value=N,v.locale=N,mr(v,i.value,c.value))}),t.watch(r.fallbackLocale,N=>{s&&(c.value=N,v.fallbackLocale=N,mr(v,i.value,c.value))}));const se={id:Ha,locale:Z,fallbackLocale:ce,get inheritLocale(){return s},set inheritLocale(N){s=N,N&&r&&(i.value=r.locale.value,c.value=r.fallbackLocale.value,mr(v,i.value,c.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:ee,get modifiers(){return V},get pluralRules(){return S||{}},get isGlobal(){return o},get missingWarn(){return p},set missingWarn(N){p=N,v.missingWarn=p},get fallbackWarn(){return f},set fallbackWarn(N){f=N,v.fallbackWarn=f},get fallbackRoot(){return g},set fallbackRoot(N){g=N},get fallbackFormat(){return y},set fallbackFormat(N){y=N,v.fallbackFormat=y},get warnHtmlMessage(){return w},set warnHtmlMessage(N){w=N,v.warnHtmlMessage=N},get escapeParameter(){return E},set escapeParameter(N){E=N,v.escapeParameter=N},t:O,getLocaleMessage:R,setLocaleMessage:X,mergeLocaleMessage:ve,getPostTranslationHandler:Ue,setPostTranslationHandler:Le,getMissingHandler:We,setMissingHandler:Oe,[Ba]:qe};return se.datetimeFormats=Ee,se.numberFormats=ke,se.rt=A,se.te=C,se.tm=F,se.d=B,se.n=J,se.getDateTimeFormat=b,se.setDateTimeFormat=_,se.mergeDateTimeFormat=D,se.getNumberFormat=U,se.setNumberFormat=Ce,se.mergeNumberFormat=Se,se[Fa]=n,se[Pn]=de,se[Rn]=ne,se[Un]=je,process.env.NODE_ENV!=="production"&&(se[It]=N=>{v.__v_emitter=N},se[pr]=()=>{v.__v_emitter=void 0}),se}const Wa="vue-i18n: composer properties",Gn={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},Kc={"vue-i18n-resource-inspector":"Search for scopes ..."},Xc={"vue-i18n-timeline":16764185};let Wn;async function Qc(e,r){return new Promise((n,o)=>{try{jc({id:"vue-devtools-plugin-vue-i18n",label:Gn["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[Wa],app:e},a=>{Wn=a,a.on.visitComponentTree(({componentInstance:s,treeNode:i})=>{Zc(s,i,r)}),a.on.inspectComponent(({componentInstance:s,instanceData:i})=>{s.vnode.el&&s.vnode.el.__VUE_I18N__&&i&&(r.mode==="legacy"?s.vnode.el.__VUE_I18N__!==r.global.__composer&&za(i,s.vnode.el.__VUE_I18N__):za(i,s.vnode.el.__VUE_I18N__))}),a.addInspector({id:"vue-i18n-resource-inspector",label:Gn["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:Kc["vue-i18n-resource-inspector"]}),a.on.getInspectorTree(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&nd(s,r)});const l=new Map;a.on.getInspectorState(async s=>{if(s.app===e&&s.inspectorId==="vue-i18n-resource-inspector")if(a.unhighlightElement(),ad(s,r),s.nodeId==="global"){if(!l.has(s.app)){const[i]=await a.getComponentInstances(s.app);l.set(s.app,i)}a.highlightElement(l.get(s.app))}else{const i=od(s.nodeId,r);i&&a.highlightElement(i)}}),a.on.editInspectorState(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&sd(s,r)}),a.addTimelineLayer({id:"vue-i18n-timeline",label:Gn["vue-i18n-timeline"],color:Xc["vue-i18n-timeline"]}),n(!0)})}catch(a){console.error(a),o(!1)}})}function Ya(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function Zc(e,r,n){const o=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==o){const a={label:`i18n (${Ya(e)} Scope)`,textColor:0,backgroundColor:16764185};r.tags.push(a)}}function za(e,r){const n=Wa;e.state.push({type:n,key:"locale",editable:!0,value:r.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:r.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:r.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:r.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:Yn(r.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:r.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:r.numberFormats.value})}function Yn(e){const r={};return Object.keys(e).forEach(n=>{const o=e[n];fe(o)&&"source"in o?r[n]=rd(o):et(o)&&o.loc&&o.loc.source?r[n]=o.loc.source:oe(o)?r[n]=Yn(o):r[n]=o}),r}const Jc={"<":"<",">":">",'"':""","&":"&"};function ed(e){return e.replace(/[<>"&]/g,td)}function td(e){return Jc[e]||e}function rd(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${ed(e.source)}")`:"(?)"}`}}}function nd(e,r){e.rootNodes.push({id:"global",label:"Global Scope"});const n=r.mode==="composition"?r.global:r.global.__composer;for(const[o,a]of r.__instances){const l=r.mode==="composition"?a:a.__composer;n!==l&&e.rootNodes.push({id:l.id.toString(),label:`${Ya(o)} Scope`})}}function od(e,r){let n=null;if(e!=="global"){for(const[o,a]of r.__instances.entries())if(a.id.toString()===e){n=o;break}}return n}function Ka(e,r){if(e==="global")return r.mode==="composition"?r.global:r.global.__composer;{const n=Array.from(r.__instances.values()).find(o=>o.id.toString()===e);return n?r.mode==="composition"?n:n.__composer:null}}function ad(e,r){const n=Ka(e.nodeId,r);return n&&(e.state=ld(n)),null}function ld(e){const r={},n="Locale related info",o=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];r[n]=o;const a="Locale messages info",l=[{type:a,key:"messages",editable:!1,value:Yn(e.messages.value)}];r[a]=l;{const s="Datetime formats info",i=[{type:s,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];r[s]=i;const c="Datetime formats info",u=[{type:c,key:"numberFormats",editable:!1,value:e.numberFormats.value}];r[c]=u}return r}function hr(e,r){if(Wn){let n;r&&"groupId"in r&&(n=r.groupId,delete r.groupId),Wn.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:r||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function sd(e,r){const n=Ka(e.nodeId,r);if(n){const[o]=e.path;o==="locale"&&M(e.state.value)?n.locale.value=e.state.value:o==="fallbackLocale"&&(M(e.state.value)||_e(e.state.value)||oe(e.state.value))?n.fallbackLocale.value=e.state.value:o==="inheritLocale"&&ae(e.state.value)&&(n.inheritLocale=e.state.value)}}function id(e){const r=M(e.locale)?e.locale:ur,n=M(e.fallbackLocale)||_e(e.fallbackLocale)||re(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:r,o=fe(e.missing)?e.missing:void 0,a=ae(e.silentTranslationWarn)||Gt(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,l=ae(e.silentFallbackWarn)||Gt(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,s=ae(e.fallbackRoot)?e.fallbackRoot:!0,i=!!e.formatFallbackMessages,c=re(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,d=fe(e.postTranslation)?e.postTranslation:void 0,m=M(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,p=!!e.escapeParameterHtml,f=ae(e.sync)?e.sync:!0;let g=e.messages;if(re(e.sharedMessages)){const V=e.sharedMessages;g=Object.keys(V).reduce((v,L)=>{const P=v[L]||(v[L]={});return $e(P,V[L]),v},g||{})}const{__i18n:y,__root:x,__injectWithOption:h}=e,k=e.datetimeFormats,w=e.numberFormats,E=e.flatJson;return{locale:r,fallbackLocale:n,messages:g,flatJson:E,datetimeFormats:k,numberFormats:w,missing:o,missingWarn:a,fallbackWarn:l,fallbackRoot:s,fallbackFormat:i,modifiers:c,pluralRules:u,postTranslation:d,warnHtmlMessage:m,escapeParameter:p,messageResolver:e.messageResolver,inheritLocale:f,__i18n:y,__root:x,__injectWithOption:h}}function zn(e={}){const r=Hn(id(e)),{__extender:n}=e,o={id:r.id,get locale(){return r.locale.value},set locale(a){r.locale.value=a},get fallbackLocale(){return r.fallbackLocale.value},set fallbackLocale(a){r.fallbackLocale.value=a},get messages(){return r.messages.value},get datetimeFormats(){return r.datetimeFormats.value},get numberFormats(){return r.numberFormats.value},get availableLocales(){return r.availableLocales},get missing(){return r.getMissingHandler()},set missing(a){r.setMissingHandler(a)},get silentTranslationWarn(){return ae(r.missingWarn)?!r.missingWarn:r.missingWarn},set silentTranslationWarn(a){r.missingWarn=ae(a)?!a:a},get silentFallbackWarn(){return ae(r.fallbackWarn)?!r.fallbackWarn:r.fallbackWarn},set silentFallbackWarn(a){r.fallbackWarn=ae(a)?!a:a},get modifiers(){return r.modifiers},get formatFallbackMessages(){return r.fallbackFormat},set formatFallbackMessages(a){r.fallbackFormat=a},get postTranslation(){return r.getPostTranslationHandler()},set postTranslation(a){r.setPostTranslationHandler(a)},get sync(){return r.inheritLocale},set sync(a){r.inheritLocale=a},get warnHtmlInMessage(){return r.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(a){r.warnHtmlMessage=a!=="off"},get escapeParameterHtml(){return r.escapeParameter},set escapeParameterHtml(a){r.escapeParameter=a},get pluralizationRules(){return r.pluralRules||{}},__composer:r,t(...a){return Reflect.apply(r.t,r,[...a])},rt(...a){return Reflect.apply(r.rt,r,[...a])},te(a,l){return r.te(a,l)},tm(a){return r.tm(a)},getLocaleMessage(a){return r.getLocaleMessage(a)},setLocaleMessage(a,l){r.setLocaleMessage(a,l)},mergeLocaleMessage(a,l){r.mergeLocaleMessage(a,l)},d(...a){return Reflect.apply(r.d,r,[...a])},getDateTimeFormat(a){return r.getDateTimeFormat(a)},setDateTimeFormat(a,l){r.setDateTimeFormat(a,l)},mergeDateTimeFormat(a,l){r.mergeDateTimeFormat(a,l)},n(...a){return Reflect.apply(r.n,r,[...a])},getNumberFormat(a){return r.getNumberFormat(a)},setNumberFormat(a,l){r.setNumberFormat(a,l)},mergeNumberFormat(a,l){r.mergeNumberFormat(a,l)}};return o.__extender=n,process.env.NODE_ENV!=="production"&&(o.__enableEmitter=a=>{const l=r;l[It]&&l[It](a)},o.__disableEmitter=()=>{const a=r;a[pr]&&a[pr]()}),o}function cd(e,r,n){return{beforeCreate(){const o=t.getCurrentInstance();if(!o)throw ze(ge.UNEXPECTED_ERROR);const a=this.$options;if(a.i18n){const l=a.i18n;if(a.__i18n&&(l.__i18n=a.__i18n),l.__root=r,this===this.$root)this.$i18n=Xa(e,l);else{l.__injectWithOption=!0,l.__extender=n.__vueI18nExtend,this.$i18n=zn(l);const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}}else if(a.__i18n)if(this===this.$root)this.$i18n=Xa(e,a);else{this.$i18n=zn({__i18n:a.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:r});const l=this.$i18n;l.__extender&&(l.__disposer=l.__extender(this.$i18n))}else this.$i18n=e;a.__i18nGlobal&&Ra(r,a,a),this.$t=(...l)=>this.$i18n.t(...l),this.$rt=(...l)=>this.$i18n.rt(...l),this.$te=(l,s)=>this.$i18n.te(l,s),this.$d=(...l)=>this.$i18n.d(...l),this.$n=(...l)=>this.$i18n.n(...l),this.$tm=l=>this.$i18n.tm(l),n.__setInstance(o,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const o=this.$i18n;this.$el.__VUE_I18N__=o.__composer;const a=this.__v_emitter=Nn();o.__enableEmitter&&o.__enableEmitter(a),a.on("*",hr)}},unmounted(){const o=t.getCurrentInstance();if(!o)throw ze(ge.UNEXPECTED_ERROR);const a=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",hr),delete this.__v_emitter),this.$i18n&&(a.__disableEmitter&&a.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,a.__disposer&&(a.__disposer(),delete a.__disposer,delete a.__extender),n.__deleteInstance(o),delete this.$i18n}}}function Xa(e,r){e.locale=r.locale||e.locale,e.fallbackLocale=r.fallbackLocale||e.fallbackLocale,e.missing=r.missing||e.missing,e.silentTranslationWarn=r.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=r.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=r.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=r.postTranslation||e.postTranslation,e.warnHtmlInMessage=r.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=r.escapeParameterHtml||e.escapeParameterHtml,e.sync=r.sync||e.sync,e.__composer[Ba](r.pluralizationRules||e.pluralizationRules);const n=qn(e.locale,{messages:r.messages,__i18n:r.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),r.datetimeFormats&&Object.keys(r.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,r.datetimeFormats[o])),r.numberFormats&&Object.keys(r.numberFormats).forEach(o=>e.mergeNumberFormat(o,r.numberFormats[o])),e}const Kn={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function dd({slots:e},r){return r.length===1&&r[0]==="default"?(e.default?e.default():[]).reduce((o,a)=>[...o,...a.type===t.Fragment?a.children:[a]],[]):r.reduce((n,o)=>{const a=e[o];return a&&(n[o]=a()),n},pe())}function Qa(){return t.Fragment}const Za=t.defineComponent({name:"i18n-t",props:$e({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Te(e)||!isNaN(e)}},Kn),setup(e,r){const{slots:n,attrs:o}=r,a=e.i18n||me({useScope:e.scope,__useComponent:!0});return()=>{const l=Object.keys(n).filter(m=>m[0]!=="_"),s=pe();e.locale&&(s.locale=e.locale),e.plural!==void 0&&(s.plural=M(e.plural)?+e.plural:e.plural);const i=dd(r,l),c=a[Pn](e.keypath,i,s),u=$e(pe(),o),d=M(e.tag)||oe(e.tag)?e.tag:Qa();return t.h(d,u,c)}}});function ud(e){return _e(e)&&!M(e[0])}function Ja(e,r,n,o){const{slots:a,attrs:l}=r;return()=>{const s={part:!0};let i=pe();e.locale&&(s.locale=e.locale),M(e.format)?s.key=e.format:oe(e.format)&&(M(e.format.key)&&(s.key=e.format.key),i=Object.keys(e.format).reduce((p,f)=>n.includes(f)?$e(pe(),p,{[f]:e.format[f]}):p,pe()));const c=o(e.value,s,i);let u=[s.key];_e(c)?u=c.map((p,f)=>{const g=a[p.type],y=g?g({[p.type]:p.value,index:f,parts:c}):[p.value];return ud(y)&&(y[0].key=`${p.type}-${f}`),y}):M(c)&&(u=[c]);const d=$e(pe(),l),m=M(e.tag)||oe(e.tag)?e.tag:Qa();return t.h(m,d,u)}}const el=t.defineComponent({name:"i18n-n",props:$e({value:{type:Number,required:!0},format:{type:[String,Object]}},Kn),setup(e,r){const n=e.i18n||me({useScope:e.scope,__useComponent:!0});return Ja(e,r,Da,(...o)=>n[Un](...o))}});function md(e,r){const n=e;if(e.mode==="composition")return n.__getInstance(r)||e.global;{const o=n.__getInstance(r);return o!=null?o.__composer:e.global.__composer}}function pd(e){const r=s=>{process.env.NODE_ENV!=="production"&&vn(fr(ct.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:i,value:c}=s;if(!i||!i.$)throw ze(ge.UNEXPECTED_ERROR);const u=md(e,i.$),d=tl(c);return[Reflect.apply(u.t,u,[...rl(d)]),u]};return{created:(s,i)=>{const[c,u]=r(i);ot&&e.global===u&&(s.__i18nWatcher=t.watch(u.locale,()=>{i.instance&&i.instance.$forceUpdate()})),s.__composer=u,s.textContent=c},unmounted:s=>{ot&&s.__i18nWatcher&&(s.__i18nWatcher(),s.__i18nWatcher=void 0,delete s.__i18nWatcher),s.__composer&&(s.__composer=void 0,delete s.__composer)},beforeUpdate:(s,{value:i})=>{if(s.__composer){const c=s.__composer,u=tl(i);s.textContent=Reflect.apply(c.t,c,[...rl(u)])}},getSSRProps:s=>{const[i]=r(s);return{textContent:i}}}}function tl(e){if(M(e))return{path:e};if(re(e)){if(!("path"in e))throw ze(ge.REQUIRED_VALUE,"path");return e}else throw ze(ge.INVALID_VALUE)}function rl(e){const{path:r,locale:n,args:o,choice:a,plural:l}=e,s={},i=o||{};return M(n)&&(s.locale=n),Te(a)&&(s.plural=a),Te(l)&&(s.plural=l),[r,i,s]}function fd(e,r,...n){const o=re(n[0])?n[0]:{};(ae(o.globalInstall)?o.globalInstall:!0)&&([Za.name,"I18nT"].forEach(l=>e.component(l,Za)),[el.name,"I18nN"].forEach(l=>e.component(l,el)),[ol.name,"I18nD"].forEach(l=>e.component(l,ol))),e.directive("t",pd(r))}const gd=st("global-vue-i18n");function hd(e={}){const r=__VUE_I18N_LEGACY_API__&&ae(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__;process.env.NODE_ENV!=="production"&&r&&vn(fr(ct.DEPRECATE_LEGACY_MODE));const n=ae(e.globalInjection)?e.globalInjection:!0,o=new Map,[a,l]=bd(e,r),s=st(process.env.NODE_ENV!=="production"?"vue-i18n":"");function i(m){return o.get(m)||null}function c(m,p){o.set(m,p)}function u(m){o.delete(m)}const d={get mode(){return __VUE_I18N_LEGACY_API__&&r?"legacy":"composition"},async install(m,...p){if(process.env.NODE_ENV!=="production"&&(m.__VUE_I18N__=d),m.__VUE_I18N_SYMBOL__=s,m.provide(m.__VUE_I18N_SYMBOL__,d),re(p[0])){const y=p[0];d.__composerExtend=y.__composerExtend,d.__vueI18nExtend=y.__vueI18nExtend}let f=null;!r&&n&&(f=Nd(m,d.global)),__VUE_I18N_FULL_INSTALL__&&fd(m,d,...p),__VUE_I18N_LEGACY_API__&&r&&m.mixin(cd(l,l.__composer,d));const g=m.unmount;if(m.unmount=()=>{f&&f(),d.dispose(),g()},process.env.NODE_ENV!=="production"){if(!await Qc(m,d))throw ze(ge.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const x=Nn();if(r){const h=l;h.__enableEmitter&&h.__enableEmitter(x)}else{const h=l;h[It]&&h[It](x)}x.on("*",hr)}},get global(){return l},dispose(){a.stop()},__instances:o,__getInstance:i,__setInstance:c,__deleteInstance:u};return d}function me(e={}){const r=t.getCurrentInstance();if(r==null)throw ze(ge.MUST_BE_CALL_SETUP_TOP);if(!r.isCE&&r.appContext.app!=null&&!r.appContext.app.__VUE_I18N_SYMBOL__)throw ze(ge.NOT_INSTALLED);const n=yd(r),o=kd(n),a=Pa(r),l=_d(e,a);if(l==="global")return Ra(o,e,a),o;if(l==="parent"){let c=xd(n,r,e.__useComponent);return c==null&&(process.env.NODE_ENV!=="production"&&Et(fr(ct.NOT_FOUND_PARENT_SCOPE)),c=o),c}const s=n;let i=s.__getInstance(r);if(i==null){const c=$e({},e);"__i18n"in a&&(c.__i18n=a.__i18n),o&&(c.__root=o),i=Hn(c),s.__composerExtend&&(i[jn]=s.__composerExtend(i)),Ed(s,r,i),s.__setInstance(r,i)}return i}function bd(e,r){const n=t.effectScope(),o=__VUE_I18N_LEGACY_API__&&r?n.run(()=>zn(e)):n.run(()=>Hn(e));if(o==null)throw ze(ge.UNEXPECTED_ERROR);return[n,o]}function yd(e){const r=t.inject(e.isCE?gd:e.appContext.app.__VUE_I18N_SYMBOL__);if(!r)throw ze(e.isCE?ge.NOT_INSTALLED_WITH_PROVIDE:ge.UNEXPECTED_ERROR);return r}function _d(e,r){return Br(e)?"__i18n"in r?"local":"global":e.useScope?e.useScope:"local"}function kd(e){return e.mode==="composition"?e.global:e.global.__composer}function xd(e,r,n=!1){let o=null;const a=r.root;let l=wd(r,n);for(;l!=null;){const s=e;if(e.mode==="composition")o=s.__getInstance(l);else if(__VUE_I18N_LEGACY_API__){const i=s.__getInstance(l);i!=null&&(o=i.__composer,n&&o&&!o[Fa]&&(o=null))}if(o!=null||a===l)break;l=l.parent}return o}function wd(e,r=!1){return e==null?null:r&&e.vnode.ctx||e.parent}function Ed(e,r,n){let o=null;t.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&r.vnode.el){r.vnode.el.__VUE_I18N__=n,o=Nn();const a=n;a[It]&&a[It](o),o.on("*",hr)}},r),t.onUnmounted(()=>{const a=n;process.env.NODE_ENV!=="production"&&r.vnode.el&&r.vnode.el.__VUE_I18N__&&(o&&o.off("*",hr),a[pr]&&a[pr](),delete r.vnode.el.__VUE_I18N__),e.__deleteInstance(r);const l=a[jn];l&&(l(),delete a[jn])},r)}const vd=["locale","fallbackLocale","availableLocales"],nl=["t","rt","d","n","tm","te"];function Nd(e,r){const n=Object.create(null);return vd.forEach(a=>{const l=Object.getOwnPropertyDescriptor(r,a);if(!l)throw ze(ge.UNEXPECTED_ERROR);const s=t.isRef(l.value)?{get(){return l.value.value},set(i){l.value.value=i}}:{get(){return l.get&&l.get()}};Object.defineProperty(n,a,s)}),e.config.globalProperties.$i18n=n,nl.forEach(a=>{const l=Object.getOwnPropertyDescriptor(r,a);if(!l||!l.value)throw ze(ge.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${a}`,l)}),()=>{delete e.config.globalProperties.$i18n,nl.forEach(a=>{delete e.config.globalProperties[`$${a}`]})}}const ol=t.defineComponent({name:"i18n-d",props:$e({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Kn),setup(e,r){const n=e.i18n||me({useScope:e.scope,__useComponent:!0});return Ja(e,r,Ca,(...o)=>n[Rn](...o))}});if(Hc(),fc(Wi),gc(cc),hc(da),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=At();e.__INTLIFY__=!0,Yi(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Cd={class:"flex items-center justify-between"},Sd={class:"flex items-center gap-2"},Vd={class:"text-4xl font-bold text-slate-800 dark:text-slate-100 mb-2"},Dd=["href","title"],Td={class:"text-lg text-slate-600 dark:text-slate-300"},Ad=t.defineComponent({__name:"DashboardHeader",setup(e){const{locale:r}=me();return(n,o)=>{const a=t.resolveComponent("router-link");return t.openBlock(),t.createElementBlock("div",Cd,[t.createElementVNode("div",null,[t.createElementVNode("div",Sd,[t.createElementVNode("h1",Vd,t.toDisplayString(n.$t("cms.dashboard.title")),1),t.createElementVNode("a",{href:`https://cms.opengis.info/${t.unref(r)}/get-started/app-overview`,target:"_blank",title:n.$t("cms.guide.appOverview")},[t.createVNode(t.unref(wt),{class:"w-5 h-5"})],8,Dd)]),t.createElementVNode("div",Td,t.toDisplayString(n.$t("cms.dashboard.description")),1)]),t.createElementVNode("div",null,[t.createVNode(a,{to:"/settings/collections",class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 shadow h-9 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white"},{default:t.withCtx(()=>[t.createVNode(t.unref(pt),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(n.$t("cms.dashboard.newCollection")),1)]),_:1})])])}}}),$d={class:"rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-300 transform hover:scale-105"},Id={class:"p-6"},Ld={class:"flex items-start justify-between"},Md={class:"flex-1"},Od={class:"flex items-center space-x-2 mb-2"},Bd={class:"text-sm font-medium text-slate-600 dark:text-slate-400"},Fd={class:"text-3xl font-bold text-slate-800 dark:text-slate-100 mb-1"},Pd={class:"text-xs text-slate-500 dark:text-slate-400 mb-3"},Rd=t.defineComponent({__name:"StatCard",props:{stat:{}},setup(e){const r=n=>({"file-text":sr,users:xn,image:ir,eye:hn})[n]||sr;return(n,o)=>(t.openBlock(),t.createElementBlock("div",$d,[t.createElementVNode("div",Id,[t.createElementVNode("div",Ld,[t.createElementVNode("div",Md,[t.createElementVNode("div",Od,[t.createElementVNode("div",{class:t.normalizeClass(`p-2 rounded-lg bg-${n.stat.color}-50 dark:bg-${n.stat.color}-900/20`)},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r(n.stat.icon)),{class:t.normalizeClass(`w-5 h-5 text-${n.stat.color}-600`)},null,8,["class"]))],2),t.createElementVNode("p",Bd,t.toDisplayString(n.stat.title),1)]),t.createElementVNode("p",Fd,t.toDisplayString(n.stat.value),1),t.createElementVNode("p",Pd,t.toDisplayString(n.stat.description),1)])])])]))}}),Ud={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6"},jd=t.defineComponent({__name:"StatsGrid",props:{stats:{}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Ud,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.stats,o=>(t.openBlock(),t.createBlock(Rd,{key:o.id,stat:o},null,8,["stat"]))),128))]))}}),qd={class:"p-4 hover:bg-slate-50 dark:hover:bg-slate-700/50 transition-colors"},Hd={class:"flex items-center justify-between"},Gd={class:"flex-1"},Wd={class:"flex items-center space-x-3 mb-2"},Yd={class:"inline-flex items-center rounded-md border px-2.5 py-0.5 font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 text-xs bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-600 dark:text-slate-300"},zd={class:"font-semibold text-slate-800 dark:text-slate-100 mb-1"},Kd={class:"flex items-center space-x-4 text-sm text-slate-500 dark:text-slate-400"},Xd={class:"flex items-center"},Qd={class:"flex items-center"},Zd={class:"flex items-center"},Jd={class:"flex items-center space-x-2"},eu=t.defineComponent({__name:"ContentItem",props:{item:{}},setup(e){const r=o=>{const a={published:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300",draft:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-300",review:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-300"};return a[o]||a.draft},n=o=>{if(!o)return"--.--.--";const a=new Date(o);return new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric"}).format(a)};return(o,a)=>{const l=t.resolveComponent("router-link");return t.openBlock(),t.createElementBlock("div",qd,[t.createElementVNode("div",Hd,[t.createElementVNode("div",Gd,[t.createElementVNode("div",Wd,[t.createElementVNode("div",Yd,t.toDisplayString(o.item.type),1),t.createElementVNode("div",{class:t.normalizeClass(r(o.item.status))},t.toDisplayString(o.item.status||"--"),3)]),t.createElementVNode("h3",zd,t.toDisplayString(o.item.title||"--"),1),t.createElementVNode("div",Kd,[t.createElementVNode("span",Xd,[t.createVNode(t.unref(xn),{class:"w-4 h-4 mr-1"}),t.createTextVNode(" "+t.toDisplayString(o.item.author||"--"),1)]),t.createElementVNode("span",Qd,[t.createVNode(t.unref(Ir),{class:"w-4 h-4 mr-1"}),t.createTextVNode(" "+t.toDisplayString(n(o.item.updated_at)||"--.--.--"),1)]),t.createElementVNode("span",Zd,[t.createVNode(t.unref(hn),{class:"w-4 h-4 mr-1"}),t.createTextVNode(" "+t.toDisplayString(o.item.views||"--")+" "+t.toDisplayString(o.$t("cms.dashboard.views")),1)])])]),t.createElementVNode("div",Jd,[t.createVNode(l,{to:`/collections/${o.item.object_id}/${o.item.content_id}`,class:"inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors border shadow-sm rounded-md text-xs h-8 w-8 p-0 bg-white border-slate-300 hover:text-accent-foreground hover:bg-slate-50 dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600"},{default:t.withCtx(()=>[t.createVNode(t.unref(Ht),{class:"w-4 h-4 dark:text-blue-50"})]),_:1},8,["to"])])])])}}}),tu={class:"lg:col-span-2"},ru={class:"rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm"},nu={class:"flex flex-col space-y-1.5 p-6 border-b border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 dark:from-slate-800 to-white dark:to-slate-800"},ou={class:"flex items-center justify-between"},au={class:"tracking-tight text-xl font-semibold text-slate-800 dark:text-slate-100 flex items-center"},lu={class:"p-0"},su={class:"divide-y divide-slate-100 dark:divide-slate-700"},iu=t.defineComponent({__name:"RecentContent",props:{content:{}},setup(e){const r=De.useRouter(),n=o=>{r.push(o)};return(o,a)=>(t.openBlock(),t.createElementBlock("div",tu,[t.createElementVNode("div",ru,[t.createElementVNode("div",nu,[t.createElementVNode("div",ou,[t.createElementVNode("h3",au,[t.createVNode(t.unref(Bs),{class:"w-5 h-5 mr-2"}),t.createTextVNode(" "+t.toDisplayString(o.$t("cms.dashboard.recentContent")),1)]),t.createElementVNode("button",{onClick:a[0]||(a[0]=l=>n("/settings/collections")),class:"inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border shadow-sm hover:text-accent-foreground h-8 rounded-md px-3 text-xs bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600"},t.toDisplayString(o.$t("cms.dashboard.viewAll")),1)])]),t.createElementVNode("div",lu,[t.createElementVNode("div",su,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.content,l=>(t.openBlock(),t.createBlock(eu,{key:l.id,item:l},null,8,["item"]))),128))])])])]))}}),cu={class:"rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm"},du={class:"flex flex-col space-y-1.5 p-6 border-b border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 dark:from-slate-800 to-white dark:to-slate-800"},uu={class:"tracking-tight text-lg font-semibold text-slate-800 dark:text-slate-100 flex items-center"},mu={class:"p-4"},pu={class:"grid grid-cols-2 gap-3"},fu=["onClick"],gu={class:"p-2 rounded-lg bg-blue-50 dark:bg-blue-900/20 mb-2 w-fit"},hu={class:"font-medium text-slate-800 dark:text-slate-100 text-sm mb-1 group-hover:text-slate-900 dark:group-hover:text-slate-50"},bu={class:"text-xs text-slate-500 dark:text-slate-400 group-hover:text-slate-600 dark:group-hover:text-slate-300"},yu=t.defineComponent({__name:"QuickActions",setup(e){const r=De.useRouter(),{t:n}=me(),o=[{id:"create-article",title:n("cms.dashboard.createArticle"),description:n("cms.dashboard.createArticleDescription"),icon:sr,iconColor:"text-blue-500",link:"/collections/pages/create"},{id:"upload-media",title:n("cms.dashboard.uploadMedia"),description:n("cms.dashboard.uploadMediaDescription"),icon:ir,iconColor:"text-purple-500",link:"/media"},{id:"manage-users",title:n("cms.dashboard.manageUsers"),description:n("cms.dashboard.manageUsersDescription"),icon:xn,iconColor:"text-green-500",link:"/settings/users"}],a=l=>{l&&r.push(l)};return(l,s)=>(t.openBlock(),t.createElementBlock("div",cu,[t.createElementVNode("div",du,[t.createElementVNode("h3",uu,[t.createVNode(t.unref(Ks),{class:"w-5 h-5 mr-2"}),t.createTextVNode(" "+t.toDisplayString(l.$t("cms.dashboard.quickActions")),1)])]),t.createElementVNode("div",mu,[t.createElementVNode("div",pu,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(o,i=>t.createElementVNode("button",{key:i.id,class:"p-3 rounded-lg border border-slate-200 transition-all duration-200 text-left group hover:bg-slate-50 hover:shadow-md dark:border-slate-600 bg-white dark:bg-slate-700 dark:hover:bg-slate-600",onClick:c=>a(i==null?void 0:i.link)},[t.createElementVNode("div",gu,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i==null?void 0:i.icon),{class:t.normalizeClass(`w-4 h-4 ${i==null?void 0:i.iconColor}`)},null,8,["class"]))]),t.createElementVNode("h3",hu,t.toDisplayString(i==null?void 0:i.title),1),t.createElementVNode("p",bu,t.toDisplayString(i==null?void 0:i.description),1)],8,fu)),64))])])]))}}),_u={class:"w-full max-w-7xl mx-auto space-y-8"},ku={class:"grid grid-cols-1 lg:grid-cols-3 gap-6"},Xn=t.defineComponent({__name:"Dashboard",setup(e){const{t:r}=me(),n=t.ref([{id:"total-content",title:r("cms.dashboard.totalContent"),value:"2,847",description:r("cms.dashboard.articlesPostsPages"),change:{value:"+12.5%",isPositive:!0},icon:"file-text",color:"blue"},{id:"active-users",title:r("cms.dashboard.activeUsers"),value:"1,234",description:r("cms.dashboard.monthlyActiveUsers"),change:{value:"+8.2%",isPositive:!0},icon:"users",color:"emerald"},{id:"media-files",title:r("cms.dashboard.mediaFiles"),value:"5,692",description:r("cms.dashboard.imagesVideosDocs"),change:{value:"+23.1%",isPositive:!0},icon:"image",color:"purple"},{id:"new-media",title:r("cms.dashboard.newMediaFiles"),value:"89.2K",description:r("cms.dashboard.thisMonth"),change:{value:"-2.4%",isPositive:!1},icon:"eye",color:"orange"}]),o=t.ref([{id:1,type:"Article",status:"published",title:r("cms.dashboard.gettingStartedWithNextJs14"),author:r("cms.dashboard.sarahJohnson"),updated_at:"2024-01-15",views:1247},{id:2,type:"Post",status:"draft",title:r("cms.dashboard.advancedReactPatterns"),author:r("cms.dashboard.mikeChen"),updated_at:"2024-01-14",views:0},{id:3,type:"Article",status:"published",title:r("cms.dashboard.uiUxDesignPrinciples"),author:r("cms.dashboard.emmaWilson"),updated_at:"2024-01-13",views:892},{id:4,type:"Post",status:"review",title:r("cms.dashboard.databaseOptimizationTips"),author:r("cms.dashboard.alexRodriguez"),updated_at:"2024-01-12",views:0}]),a=s=>{n.value=n.value.map(i=>{var c,u,d,m;switch(i.id){case"total-content":return{...i,value:((c=s.totalContent)==null?void 0:c.toLocaleString())??i.value};case"active-users":return{...i,value:((u=s.totalUsers)==null?void 0:u.toLocaleString())??i.value};case"media-files":return{...i,value:((d=s.totalMediaFiles)==null?void 0:d.toLocaleString())??i.value};case"new-media":return{...i,value:((m=s.newMediaFiles)==null?void 0:m.toLocaleString())??i.value};default:return i}})},l=async()=>{const i=await(await fetch("api/cms-stat")).json();o.value=i.recentContent,a(i.stat)};return t.onMounted(()=>{l()}),(s,i)=>(t.openBlock(),t.createElementBlock("div",_u,[t.createVNode(Ad),t.createVNode(jd,{stats:n.value},null,8,["stats"]),t.createElementVNode("div",ku,[t.createVNode(iu,{content:o.value,class:"lg:col-span-2"},null,8,["content"]),t.createElementVNode("div",null,[t.createVNode(yu)])])]))}}),xu={class:"rounded-xl text-card-foreground shadow-lg bg-white dark:bg-slate-800 backdrop-blur-sm border-2 border-dashed border-slate-300 dark:border-slate-600"},wu={class:"p-12 text-center"},Eu={class:"text-lg font-medium text-slate-600 dark:text-slate-300 mb-2"},vu={class:"text-slate-500 dark:text-slate-400 mb-6"},al={__name:"EmptyData",props:{title:{type:String,default:()=>"emptyData.title"},description:{type:String,default:()=>"emptyData.description"},buttonText:{type:String,default:()=>"emptyData.buttonText"},showButton:{type:Boolean,default:!0}},emits:["action"],setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",xu,[t.createElementVNode("div",wu,[n[2]||(n[2]=t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-layers w-12 h-12 mx-auto mb-4 text-slate-400 dark:text-slate-500"},[t.createElementVNode("path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"}),t.createElementVNode("path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65"}),t.createElementVNode("path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65"})],-1)),t.createElementVNode("h3",Eu,t.toDisplayString(r.$t(e.title)),1),t.createElementVNode("p",vu,t.toDisplayString(r.$t(e.description)),1),e.showButton?(t.openBlock(),t.createElementBlock("button",{key:0,onClick:n[0]||(n[0]=o=>r.$emit("action")),class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 shadow h-9 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white"},[n[1]||(n[1]=t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-plus w-4 h-4 mr-2"},[t.createElementVNode("path",{d:"M5 12h14"}),t.createElementVNode("path",{d:"M12 5v14"})],-1)),t.createTextVNode(" "+t.toDisplayString(r.$t(e.buttonText)),1)])):t.createCommentVNode("",!0)])]))}},Nu={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},ll={__name:"CreateForm",props:{redirectAfterCreate:Function},setup(e){const r=t.inject("cms.fetchContentTypes"),{t:n}=me(),o=De.useRouter(),a=e,l=t.ref({}),s=t.ref(!1),i=t.ref({type:"collection"}),c={name:{type:"text",label:n("cms.builder.scheme.name.label"),required:!0,placeholder:n("cms.builder.scheme.name.placeholder"),validators:["required"]},title:{type:"text",label:n("cms.builder.scheme.title.label"),required:!0,placeholder:n("cms.builder.scheme.title.placeholder"),validators:["required"]},type:{type:"combobox",mode:"combo",hidden:!0,label:n("cms.builder.scheme.type.label"),required:!0,placeholder:n("cms.builder.scheme.type.placeholder"),validators:["required"],default:"collection",options:[{text:n("cms.builder.scheme.type.options.collection"),id:"collection"},{text:n("cms.builder.scheme.type.options.single"),id:"single"}]},customTable:{type:"switcher",hidden:!0,default:!0,label:n("cms.builder.scheme.customTable.label")}},u=async()=>{var m;if(await l.value.validate()){Q.notify({type:"warning",title:n("cms.common.actions.warning"),message:n("cms.collections.collectionCreationFailed")});return}try{i.value.customTable=!0;const f=await(await fetch("/api/cms-type",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i.value)})).json(),g=((m=a.redirectAfterCreate)==null?void 0:m.call(a,f))??`/settings/collections/edit/${f.id}`;o.push(g),r(),Q.notify({type:"success",title:n("cms.common.actions.success"),message:n("cms.collections.collectionCreated")})}catch(p){Q.notify({type:"error",title:n("cms.common.actions.error"),message:n("cms.collections.collectionCreationFailed")}),console.error(p)}};return(d,m)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("button",{onClick:m[0]||(m[0]=p=>s.value=!0),class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 h-9 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white shadow-md hover:shadow-lg transition-all duration-200 transform hover:scale-105"},[t.createVNode(t.unref(pt),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(d.$t("cms.collections.createCollection")),1)]),t.createVNode(t.unref(Q.VsModal),{teleport:"#modal",visible:s.value,title:d.$t("cms.collections.createCollection"),onClose:m[4]||(m[4]=p=>s.value=!1)},{footer:t.withCtx(()=>[t.createElementVNode("div",Nu,[t.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:m[3]||(m[3]=p=>s.value=!1)},t.toDisplayString(d.$t("cms.common.actions.cancel")),1),t.createElementVNode("button",{onClick:u,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},t.toDisplayString(d.$t("cms.common.actions.save")),1)])]),default:t.withCtx(()=>[t.createVNode(t.unref(Y),{form:l.value,"onUpdate:form":m[1]||(m[1]=p=>l.value=p),modelValue:i.value,"onUpdate:modelValue":m[2]||(m[2]=p=>i.value=p),schema:c},null,8,["form","modelValue"])]),_:1},8,["visible","title"])]))}},Cu={class:"space-y-6 mx-auto max-w-[90%]"},Su={class:"flex items-center justify-between mb-8"},Vu={class:"flex gap-4"},Du={class:"text-3xl font-bold text-slate-800 dark:text-slate-100 mb-2"},Tu={class:"text-slate-600 dark:text-slate-300"},Au=["href","title"],$u={class:"flex items-center gap-3"},Iu={class:"relative w-full max-w-sm"},Lu={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Mu=["placeholder"],Ou={key:0},Bu={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6"},Fu=["onClick"],Pu={class:"flex items-start justify-between"},Ru={class:"flex items-start gap-3"},Uu={class:"text-sm font-semibold text-gray-800 mb-1"},ju={class:"flex items-center gap-2"},qu={class:"text-xs text-gray-500 whitespace-nowrap"},Hu={class:"pl-8 text-xs text-gray-600 line-clamp-2"},Gu={key:1,class:"flex items-center justify-center min-h-[400px]"},Qn=t.defineComponent({__name:"CollectionsPage",setup(e){const{t:r,locale:n}=me(),o=De.useRouter();t.inject("fetchContentTypes");const a=t.ref([]),l=t.ref(""),s=t.computed(()=>{const u=a.value.filter(f=>f.type!=="single"),d=l.value.trim().toLowerCase();return[...d?u.filter(f=>[f==null?void 0:f.title,f==null?void 0:f.name,f==null?void 0:f.id,f==null?void 0:f.description].filter(Boolean).join(" ").toLowerCase().includes(d)):u].sort((f,g)=>f.id==="pages"?-1:g.id==="pages"?1:0)});async function i(){try{const u=await fetch("/api/cms-type?type=collection");if(!u.ok)throw new Error("Failed to fetch collections");const d=await u.json();a.value=d.rows||[]}catch(u){console.error("Error fetching collections:",u)}}const c=u=>{o.push(`/collections/${u.id}`)};return t.onMounted(()=>{i()}),(u,d)=>(t.openBlock(),t.createElementBlock("div",Cu,[t.createElementVNode("div",Su,[t.createElementVNode("div",Vu,[t.createElementVNode("div",null,[t.createElementVNode("h1",Du,t.toDisplayString(u.$t("cms.navigation.collections")),1),t.createElementVNode("p",Tu,t.toDisplayString(u.$t("cms.collections.selectCollection")),1)]),t.createElementVNode("a",{href:`https://cms.opengis.info/${t.unref(n)}/guides/collections/`,target:"_blank",title:u.$t("cms.guide.collections"),class:"mt-2"},[t.createVNode(t.unref(wt),{class:"w-5 h-5"})],8,Au)]),t.createElementVNode("div",$u,[t.createElementVNode("div",Iu,[t.createElementVNode("div",Lu,[t.createVNode(t.unref(kn),{class:"w-5 h-5 text-gray-400"})]),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":d[0]||(d[0]=m=>l.value=m),type:"text",class:"block w-full py-2 pl-10 pr-3 leading-5 text-gray-900 placeholder-gray-500 transition-colors bg-white border border-gray-300 rounded-md dark:border-gray-600 dark:bg-gray-700 dark:placeholder-gray-400 focus:outline-none focus:ring-sky-500 focus:border-sky-500 dark:text-white sm:text-sm",placeholder:u.$t("cms.collections.searchCollections")},null,8,Mu),[[t.vModelText,l.value]])]),t.createVNode(ll,{redirectAfterCreate:m=>`/collections/${m.id}`},null,8,["redirectAfterCreate"])])]),a.value.length>0?(t.openBlock(),t.createElementBlock("div",Ou,[t.createElementVNode("div",Bu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,m=>(t.openBlock(),t.createElementBlock("button",{key:m.id,onClick:p=>c(m),class:"w-full border border-gray-200 bg-white rounded-lg p-4 text-left hover:shadow-md transition-all hover:border-gray-300"},[t.createElementVNode("div",null,[t.createElementVNode("div",Pu,[t.createElementVNode("div",Ru,[m.id==="pages"?(t.openBlock(),t.createBlock(t.unref(jt),{key:0,class:"shrink-0 lucide lucide-page w-5 h-5 text-blue-600"})):(t.openBlock(),t.createBlock(t.unref(qt),{key:1,class:"shrink-0 lucide lucide-layers w-5 h-5 text-blue-600"})),t.createElementVNode("div",null,[t.createElementVNode("h4",Uu,t.toDisplayString(m.title),1)])]),t.createElementVNode("div",ju,[t.createElementVNode("span",qu,t.toDisplayString(m.entries)+" записів",1),t.createVNode(t.unref(Ut),{class:"w-4 h-4 text-gray-400"})])]),t.createElementVNode("p",Hu,t.toDisplayString(m.description||"Опис відсутній"),1)])],8,Fu))),128))])])):(t.openBlock(),t.createElementBlock("div",Gu,[t.createVNode(al)]))]))}}),Wu={class:"text-card-foreground border-0 bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm"},Yu={class:"p-0"},zu={class:"table-scroll overflow-x-auto"},Ku={class:"relative w-full overflow-auto max-h-[calc(100vh-270px)]"},Xu={class:"w-full caption-bottom text-sm"},Qu={class:"border-b border-slate-200 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors"},Zu={class:"flex items-center gap-2"},Ju={class:"h-10 text-center px-4 font-semibold text-slate-700 dark:text-slate-300 max-w-32"},em=["onClick"],tm={key:1,class:"whitespace-nowrap"},rm={key:2,class:"whitespace-nowrap"},nm={key:3,class:"flex items-center"},om={key:4,class:"inline-flex whitespace-nowrap items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300"},am={key:5,class:"flex items-center"},lm={key:6,class:"flex items-center gap-3"},sm={key:8,class:"flex items-center gap-3"},im={key:11,class:"flex items-center gap-3"},cm={class:"line-clamp-2"},dm={class:"flex justify-end py-2 px-4 align-middle max-w-40"},um={class:"flex items-center justify-center gap-1"},mm=["onClick"],pm=["onClick"],Zn=t.defineComponent({__name:"UniversalTable",props:{rows:{},query:{},filterFn:{type:Function},onEdit:{type:Function},onView:{type:Function},onDelete:{type:Function},columns:{},onMore:{type:Function},customRender:{}},emits:["edit","view","delete","more"],setup(e,{emit:r}){const{t:n}=me();t.ref(null);const o=e,a=r,l=t.computed(()=>!o.query||!o.filterFn?o.rows:o.rows.filter(m=>o.filterFn(m,o.query))),s=m=>{if(!m)return"";const p=new Date(m);return isNaN(p.getTime())?"":m.includes("T")||m.includes(" ")||m.includes(":")?p.toLocaleString("uk-UA",{dateStyle:"medium",timeStyle:"medium"}):p.toLocaleDateString("uk-UA",{dateStyle:"medium"})},i=m=>{switch(m){case"published":return{icon:Oo,text:n("cms.common.status.published"),classes:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-200 border-green-200 dark:border-green-700"};case"draft":return{icon:Ht,text:n("cms.common.status.draft"),classes:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-200 border-yellow-200 dark:border-yellow-700"};case"archived":return{icon:Ho,text:n("cms.common.status.archived"),classes:"bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-300 border-gray-200 dark:border-gray-700"};default:return null}},c=(m,p)=>{switch(m){case"edit":a("edit",p),o.onEdit&&o.onEdit(p);break;case"view":a("view",p),o.onView&&o.onView(p);break;case"delete":a("delete",p);break;case"more":a("more",p),o.onMore&&o.onMore(p);break}},u=m=>{c("edit",m)},d=m=>{const p=new Date,f=new Date(m),g=p-f,y=Math.floor(g/1e3),x=Math.floor(y/60),h=Math.floor(x/60),k=Number(Math.floor(h/24)),w=Number(Math.floor(k/7));return w>=2?n("cms.table.time.weeksAgo",{count:w}):w===1?n("cms.table.time.weekAgo"):k>=2?n("cms.table.time.daysAgo",{count:k}):k===1?n("cms.table.time.dayAgo"):h>=2?n("cms.table.time.hoursAgo",{count:h}):h===1?n("cms.table.time.hourAgo"):x>=2?n("cms.table.time.minutesAgo",{count:x}):n(x===1?"cms.table.time.minuteAgo":"cms.table.time.justNow")};return(m,p)=>(t.openBlock(),t.createElementBlock("div",Wu,[t.createElementVNode("div",Yu,[t.createElementVNode("div",zu,[t.createElementVNode("div",Ku,[t.createElementVNode("table",Xu,[t.createElementVNode("thead",null,[t.createElementVNode("tr",Qu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.columns,f=>(t.openBlock(),t.createElementBlock("th",{key:f.name,class:t.normalizeClass(["h-10 px-4 text-left align-middle font-semibold text-slate-700 dark:text-slate-300 max-w-80",{"min-w-[200px]":["title","name"].includes(f.name),"min-w-[150px]":f.name==="slug","min-w-[250px]":f.name==="description"}])},[t.createElementVNode("div",Zu,[f.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(f.icon),{key:0,class:"w-5 h-5"})):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(f.label||f.title||f.ua||f.name),1)])],2))),128)),t.createElementVNode("th",Ju,t.toDisplayString(m.$t("cms.table.actions")),1)])]),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,f=>(t.openBlock(),t.createElementBlock("tr",{key:f.id||f._id||f.name,class:"transition-all duration-200 hover:bg-slate-100 dark:hover:bg-slate-700/60"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.columns,(g,y)=>{var x,h,k,w,E;return t.openBlock(),t.createElementBlock("td",{key:g.name,class:t.normalizeClass(["py-2 px-4 align-middle max-w-80",{"font-medium text-slate-800 dark:text-white cursor-pointer":y===0,"text-slate-600 dark:text-slate-400 font-mono text-sm":y!==0}]),onClick:V=>y===0?u(f):void 0},[m.customRender&&m.customRender[g.name]?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(m.customRender[g.name](f[g.name],f)),{key:0})):t.createCommentVNode("",!0),["published_at","publish_at","created_at","date"].includes(g.name)&&f[g.name]?(t.openBlock(),t.createElementBlock("span",tm,t.toDisplayString(s(f[g.name])),1)):["updated_at","lastModified","last_edit"].includes(g.name)?(t.openBlock(),t.createElementBlock("span",rm,t.toDisplayString(d(f[g.name])||"--"),1)):g.name==="views"?(t.openBlock(),t.createElementBlock("div",nm,[t.createVNode(t.unref(hn),{class:"w-4 h-4 mr-1"}),t.createTextVNode(" "+t.toDisplayString(((h=(x=f[g.name])==null?void 0:x.toLocaleString)==null?void 0:h.call(x))??f[g.name]),1)])):["entries","fields"].includes(g.name)?(t.openBlock(),t.createElementBlock("div",om,t.toDisplayString(f[g.name]||"-"),1)):g.name==="type"?(t.openBlock(),t.createElementBlock("div",am,[t.createElementVNode("div",{class:t.normalizeClass(["whitespace-nowrap inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors border-transparent hover:bg-secondary/80",f[g.name]==="pages"?"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300":"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300"])},t.toDisplayString(f[g.name]||"-"),3)])):g.name==="name"?(t.openBlock(),t.createElementBlock("div",lm,[f.type==="single"?(t.openBlock(),t.createBlock(t.unref(jt),{key:0,class:"shrink-0 lucide lucide-page w-5 h-5 text-blue-600"})):(t.openBlock(),t.createBlock(t.unref(qt),{key:1,class:"shrink-0 lucide lucide-layers w-5 h-5 text-blue-600"})),t.createTextVNode(" "+t.toDisplayString(f[g.name]),1)])):g.name==="status"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:7},[i(f[g.name])?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["whitespace-nowrap rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors hover:bg-secondary/80 flex items-center w-fit bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-700",(k=i(f[g.name]))==null?void 0:k.classes])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent((w=i(f[g.name]))==null?void 0:w.icon),{class:"w-3 h-3 mr-1"})),t.createTextVNode(" "+t.toDisplayString((E=i(f[g.name]))==null?void 0:E.text),1)],2)):t.createCommentVNode("",!0)],64)):g.name==="slug"?(t.openBlock(),t.createElementBlock("div",sm,t.toDisplayString(f[g.name]?"/"+f[g.name]:"-"),1)):g.name==="color"?(t.openBlock(),t.createElementBlock("span",{key:9,class:t.normalizeClass(["w-4 h-4 rounded-full block ml-2","bg-["+f[g.name]+"]"])},null,2)):g.name==="enabled"?(t.openBlock(),t.createElementBlock("span",{key:10,class:t.normalizeClass(["whitespace-nowrap rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors hover:bg-secondary/80 flex items-center w-fit",f[g.name]?"bg-green-100 text-green-800 border-green-200":"bg-red-100 text-red-800 border-red-200"])},t.toDisplayString(f[g.name]?"Доступ":"Заборонено"),3)):(t.openBlock(),t.createElementBlock("div",im,[t.createElementVNode("p",cm,t.toDisplayString(f[g.name]||"-"),1)]))],10,em)}),128)),t.createElementVNode("td",dm,[t.createElementVNode("div",um,[t.createElementVNode("button",{onClick:t.withModifiers(g=>c("edit",f),["stop"]),class:"inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:text-slate-200 hover:border-blue-300 hover:bg-blue-50 hover:text-blue-600",title:"Edit"},[t.createVNode(t.unref(yn),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-green-600 dark:group-hover:text-blue-50"})],8,mm),t.createElementVNode("button",{onClick:t.withModifiers(g=>c("delete",f),["stop"]),class:"inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:text-slate-200 hover:border-blue-300 hover:bg-blue-50 hover:text-blue-600",title:"Preview"},[t.createVNode(t.unref(ft),{class:"w-4 h-4 text-slate-800 dark:text-slate-200 group-hover:text-red-600 dark:group-hover:text-blue-50"})],8,pm),t.renderSlot(m.$slots,"actions",{row:f})])])]))),128))])])])])])]))}}),fm={class:"flex items-center justify-between px-6 py-4 border-t border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-800"},gm={class:"flex justify-between flex-1 sm:hidden"},hm={class:"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},bm={class:"relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},ym={class:"hidden sm:flex-1 sm:flex sm:items-center sm:justify-between"},_m={class:"text-sm text-slate-600 dark:text-slate-400"},km={class:"font-medium text-slate-800 dark:text-slate-100"},xm={class:"font-medium text-slate-800 dark:text-slate-100"},wm={class:"relative z-0 inline-flex space-x-2 rounded-md shadow-sm","aria-label":"Pagination"},Em=["disabled"],vm={class:"sr-only"},Nm={class:"space-x-1"},Cm={key:0,class:"px-2 py-2 text-gray-400"},Sm=["onClick"],Vm=["disabled"],Dm={class:"sr-only"},sl=t.defineComponent({__name:"UniversalTablePagination",props:t.mergeModels({total:{},count:{},limit:{}},{page:{},pageModifiers:{}}),emits:["update:page"],setup(e){const r=t.useModel(e,"page"),n=t.computed(()=>Math.ceil(e.total/e.limit)),o=t.computed(()=>{const l=[];if(n.value<=4){for(let c=1;c<=n.value;c++)l.push(c);return l}const s=Math.max(2,r.value-2),i=Math.min(n.value-1,r.value+2);l.push(1),s>2&&l.push("ellipsis");for(let c=s;c<=i;c++)l.push(c);return i<n.value-1&&l.push("ellipsis"),l.push(n.value),l});return(a,l)=>(t.openBlock(),t.createElementBlock("div",fm,[t.createElementVNode("div",gm,[t.createElementVNode("button",hm,t.toDisplayString(a.$t("cms.common.pagination.previous")),1),t.createElementVNode("button",bm,t.toDisplayString(a.$t("cms.common.pagination.next")),1)]),t.createElementVNode("div",ym,[t.createElementVNode("div",null,[t.createElementVNode("p",_m,[t.createTextVNode(t.toDisplayString(a.$t("cms.common.pagination.showing"))+" ",1),t.createElementVNode("span",km,t.toDisplayString(a.count),1),t.createTextVNode(" "+t.toDisplayString(a.$t("cms.common.pagination.of"))+" ",1),t.createElementVNode("span",xm,t.toDisplayString(a.total),1),t.createTextVNode(" "+t.toDisplayString(a.$t("cms.common.pagination.results")),1)])]),t.createElementVNode("div",null,[t.createElementVNode("nav",wm,[t.createElementVNode("button",{onClick:l[0]||(l[0]=s=>r.value=r.value>1?r.value-1:1),disabled:r.value===1,class:"inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors border shadow-sm rounded-md text-xs h-8 w-8 p-0 bg-white border-slate-300 text-slate-600 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed hover:text-accent-foreground hover:bg-slate-50 dark:bg-slate-700 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-slate-600"},[t.createElementVNode("span",vm,t.toDisplayString(a.$t("cms.common.pagination.previous")),1),t.createVNode(t.unref(Ps),{class:"w-5 h-5"})],8,Em),t.createElementVNode("div",Nm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,(s,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:s+"-"+i},[s==="ellipsis"?(t.openBlock(),t.createElementBlock("span",Cm,"...")):(t.openBlock(),t.createElementBlock("button",{key:1,onClick:c=>r.value=s,class:t.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors h-8 w-8 p-0 text-sm rounded-md",{"border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-600 dark:text-slate-300 hover:border-blue-600 hover:bg-slate-50 dark:hover:bg-slate-600":s!==r.value,"shadow bg-blue-600 hover:bg-blue-700 text-white border-blue-600":s===r.value}])},t.toDisplayString(s),11,Sm))],64))),128))]),t.createElementVNode("button",{onClick:l[1]||(l[1]=s=>r.value=r.value<Math.ceil(a.total/a.limit)?r.value+1:Math.ceil(a.total/a.limit)),disabled:r.value===Math.ceil(a.total/a.limit),class:"inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors border shadow-sm rounded-md text-xs h-8 w-8 p-0 bg-white border-slate-300 text-slate-600 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed hover:text-accent-foreground hover:bg-slate-50 dark:bg-slate-700 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-slate-600"},[t.createElementVNode("span",Dm,t.toDisplayString(a.$t("cms.common.pagination.next")),1),t.createVNode(t.unref(Ut),{class:"w-5 h-5"})],8,Vm)])])])]))}}),Tm={class:"flex items-center space-x-1 mb-4 overflow-hidden"},Am={class:"truncate block max-w-[12rem]"},$m=["onClick"],Im={class:"truncate block max-w-[20rem]"},Lm={key:1,class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium text-slate-700 dark:text-slate-300 min-w-0 overflow-hidden whitespace-nowrap text-ellipsis"},Mm={class:"truncate block max-w-[20rem]"},Jn=t.defineComponent({__name:"CollectionsBreadcrumb",props:{items:{}},emits:["navigate"],setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Tm,[t.createElementVNode("button",{class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20 hover:bg-blue-100 dark:hover:bg-blue-900/30 min-w-0 overflow-hidden whitespace-nowrap text-ellipsis",onClick:n[0]||(n[0]=o=>r.$emit("navigate","collections"))},[t.createVNode(t.unref(qt),{class:"w-3 h-3 flex-shrink-0"}),t.createElementVNode("span",Am,t.toDisplayString(r.$t("cms.navigation.collections")),1)]),r.items.length>0?(t.openBlock(),t.createBlock(t.unref(Ut),{key:0,class:"w-3 h-3 text-slate-400 dark:text-slate-500 flex-shrink-0"})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.items,(o,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:a},[a<r.items.length-1?(t.openBlock(),t.createElementBlock("button",{key:0,class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/20 hover:bg-blue-100 dark:hover:bg-blue-900/30 min-w-0 overflow-hidden whitespace-nowrap text-ellipsis",onClick:l=>r.$emit("navigate",o.route)},[t.createElementVNode("span",Im,t.toDisplayString(o.label),1)],8,$m)):(t.openBlock(),t.createElementBlock("span",Lm,[t.createElementVNode("span",Mm,t.toDisplayString(o.label),1)])),a<r.items.length-1?(t.openBlock(),t.createBlock(t.unref(Ut),{key:2,class:"w-3 h-3 text-slate-400 dark:text-slate-500 flex-shrink-0"})):t.createCommentVNode("",!0)],64))),128))]))}}),Om={class:"space-y-6 mx-auto max-w-[90%]"},Bm={class:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"},Fm={class:"flex items-center gap-2"},Pm={class:"text-3xl font-bold text-slate-800 dark:text-white mb-2"},Rm=["href","title"],Um={class:"flex items-center gap-2"},jm={key:0,class:"text-card-foreground shadow-lg border-0 bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm"},qm={key:0,class:"p-2 border-b border-gray-200 sm:px-4 sm:py-2 dark:border-gray-700"},Hm={class:"flex flex-col gap-4 sm:flex-row"},Gm={class:"relative flex items-center gap-2 ml-auto"},Wm={key:1,class:"absolute top-full right-2/3 translate-x-1/2 min-w-[150%] p-4 z-10 bg-white border border-gray-300 rounded-md mt-2 dark:bg-slate-800 dark:border-slate-700 shadow-lg"},Ym={class:"max-h-60 overflow-y-auto overflow-x-hidden"},zm={key:1},il=t.defineComponent({__name:"ArticlesPage",setup(e){const r=De.useRoute(),n=De.useRouter(),o=t.ref(null),a=t.ref(""),{t:l,locale:s}=me(),i=t.ref([]),c=t.inject("cms.menu")||[],u=t.ref(""),d=t.ref(null),m=t.ref(1),p=t.ref(!1),f=t.ref(["title","slug","author","publish_at","published_at","status"]),g=t.ref([]),y=t.ref([]),x=t.ref([]),h=t.ref({}),k=t.ref(0),w=t.ref(!1),E=()=>{var W;let j=(W=o.value)==null?void 0:W.columns.filter(O=>{var A;return(A=f==null?void 0:f.value)==null?void 0:A.includes(O.name)});g.value=j.map(O=>{switch(O.name){case"title":return{...O,title:O.name?O.name.charAt(0).toUpperCase()+O.name.slice(1):"--",icon:sr};case"slug":return{...O,title:O.name?O.name.charAt(0).toUpperCase()+O.name.slice(1):"-",icon:js};case"author":return{...O,title:O.name?O.name.charAt(0).toUpperCase()+O.name.slice(1):"-",icon:Ys};case"publish_at":return{...O,title:O.name?O.name.charAt(0).toUpperCase()+O.name.slice(1):"-",icon:Ir};case"published_at":return{...O,title:O.name?O.name.charAt(0).toUpperCase()+O.name.slice(1):"-",icon:Ir};default:return{...O,title:O.name?O.name.charAt(0).toUpperCase()+O.name.slice(1):"-"}}}),p.value=!1},V=t.computed(()=>{var j,W,O,A;return((j=d.value)==null?void 0:j.title)||((W=o.value)==null?void 0:W.title)||((A=(O=c.value)==null?void 0:O.find(B=>B.id===r.params.id))==null?void 0:A.title)||r.params.id}),S=async()=>{try{const j=await fetch("/api/cms-type?type=collection");if(!j.ok)return;const O=((await j.json()).rows||[]).find(A=>A.id===r.params.id);O&&(d.value=O)}catch(j){console.error("Error fetching collection meta:",j)}},v=t.computed(()=>[{label:V.value||r.params.id,route:`collections/${r.params.id}`}]),L=j=>{j==="collections"?n.push("/collections"):n.push(`/${j}`)},P=()=>{n.push(`/collections/${r.params.id}/create`)},Z=()=>{n.push(`/collections/${r.params.id}/edit`)},ce=async()=>{Q.confirm({title:l("cms.builder.deleteTitle"),message:l("cms.builder.deleteObject"),type:"error",onConfirm:async()=>{try{await fetch(`/api/cms-type/${r.params.id}`,{method:"DELETE"}),n.push("/collections")}catch(j){console.error("Failed to delete collection:",j)}}})},ee=async j=>{Q.confirm({title:l("cms.builder.deleteTitle"),message:l("cms.builder.deleteObject"),type:"error",onConfirm:async()=>{await fetch(`/api/cms/${r.params.id}/${j.id}`,{method:"DELETE"}),ke()}})},Ee=j=>{n.push(`/collections/${r.params.id}/${j.id}`)},ke=async()=>{if(!w.value){w.value=!0;try{const W=await(await fetch(`/api/cms/${r.params.id}?page=${m.value}&filter=${u.value}&limit=12`)).json();if(i.value=W.rows||[],o.value=W,!x.value.length){const O=(W.filters||[]).map(A=>{const{extra:B,title:J,...te}=A;return te});x.value=O}r.params.id==="pages"&&f.value.push("type"),Ue(),E()}finally{w.value=!1}}},Ue=()=>{var W;if(!((W=o.value)!=null&&W.columns))return;const j=o.value.columns.map((O,A)=>({text:O.label,id:O.name}));y.value=[...f.value.map(O=>j.find(A=>A.id===O)).filter(Boolean),...j.filter(O=>!f.value.includes(O.id))]},Le=(j,W)=>{if(!W)return!0;const O=W.toLowerCase();return g.value.some(A=>{const B=j[A.name];return B&&B.toString().toLowerCase().includes(O)})},We=j=>{const W=Object.entries(j==null?void 0:j.data).filter(([,A])=>A!=null).map(([A,B])=>`${A}=${B}`).join("|");u.value=W;const O={...r.query};W?O.filter=W:delete O.filter,n.replace({query:O})},Oe=()=>{if(r.query.filter){u.value=r.query.filter;const j=r.query.filter.split("|"),W={};j.forEach(O=>{const[A,B]=O.split("=");A&&B&&(W[A]=B)}),h.value=W}else u.value="",h.value={},k.value++};return t.onMounted(()=>{Oe(),S(),ke()}),t.watch(()=>r.params.id,()=>{h.value={},u.value="",x.value=[],d.value=null;const j={...r.query};delete j.filter,n.replace({query:j}),k.value++,Oe(),S(),ke()}),t.watch(()=>r.query,async()=>{Oe(),await t.nextTick(),ke()},{deep:!0}),t.watch(m,async()=>{r.query.filter||(u.value="",h.value={},k.value++),await t.nextTick(),ke()}),(j,W)=>{var O,A,B,J;return t.openBlock(),t.createElementBlock("div",Om,[t.createVNode(Jn,{items:v.value,onNavigate:L},null,8,["items"]),t.createElementVNode("div",Bm,[t.createElementVNode("div",Fm,[t.createElementVNode("h1",Pm,t.toDisplayString(V.value),1),t.createElementVNode("a",{href:`https://cms.opengis.info/${t.unref(s)}/guides/content/`,target:"_blank",title:j.$t("cms.guide.content")},[t.createVNode(t.unref(wt),{class:"w-5 h-5"})],8,Rm)]),t.createElementVNode("div",Um,[i.value.length?(t.openBlock(),t.createElementBlock("button",{key:0,onClick:P,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[t.createVNode(t.unref(pt),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(j.$t("cms.articles.createArticle")),1)])):t.createCommentVNode("",!0),((O=o.value)==null?void 0:O.type)==="collection"?(t.openBlock(),t.createElementBlock("button",{key:1,onClick:Z,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 border border-slate-300 bg-white text-slate-700 shadow-sm transition-all duration-200 transform hover:bg-slate-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"},t.toDisplayString(j.$t("cms.common.actions.edit")),1)):t.createCommentVNode("",!0),t.createElementVNode("button",{onClick:ce,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 border border-red-300 bg-white text-red-600 shadow-sm transition-all duration-200 transform hover:bg-red-50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"},t.toDisplayString(j.$t("cms.common.actions.delete")),1)])]),i.value.length||u.value.length?(t.openBlock(),t.createElementBlock("div",jm,[(t.openBlock(),t.createElementBlock("div",qm,[t.createElementVNode("div",Hm,[(t.openBlock(),t.createBlock(t.unref(Mo),{key:k.value,schema:x.value,history:!0,value:h.value,view:"inline",onChange:We},null,8,["schema","value"])),t.createElementVNode("div",Gm,[y.value.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"flex items-center gap-2 cursor-pointer text-sm border border-gray-300 rounded-md p-2 dark:text-white",onClick:W[0]||(W[0]=te=>p.value=!p.value)},[t.createElementVNode("p",null,t.toDisplayString(j.$t("cms.articles.showColumns")),1),t.createVNode(t.unref(Fo),{class:"w-4 h-4"})])):t.createCommentVNode("",!0),y.value.length>0&&p.value?(t.openBlock(),t.createElementBlock("div",Wm,[t.createElementVNode("div",Ym,[y.value.length>0&&p.value?(t.openBlock(),t.createBlock(t.unref(Y.VsInputCheckbox),{key:0,options:y.value,modelValue:f.value,"onUpdate:modelValue":W[1]||(W[1]=te=>f.value=te)},null,8,["options","modelValue"])):t.createCommentVNode("",!0)]),t.createElementVNode("button",{class:"text-sm bg-blue-600 text-white rounded-md p-2 mt-4 w-full",onClick:E},t.toDisplayString(j.$t("cms.articles.update")),1)])):t.createCommentVNode("",!0)])])])),g.value.length>0?(t.openBlock(),t.createBlock(Zn,{key:1,class:"max-h-[calc(100vh-290px)] overflow-y-auto",rows:i.value,columns:g.value,query:a.value,filterFn:Le,onDelete:ee,onEdit:Ee},null,8,["rows","columns","query"])):t.createCommentVNode("",!0),((A=o.value)==null?void 0:A.total)>20?(t.openBlock(),t.createBlock(sl,{key:2,total:(B=o.value)==null?void 0:B.filtered,count:(J=o.value)==null?void 0:J.count,page:m.value,"onUpdate:page":W[2]||(W[2]=te=>m.value=te),limit:20},null,8,["total","count","page"])):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",zm,[t.createVNode(al,{onAction:P})]))])}}});let Km;function Xm(){return Km}t.version[0];function Qm(e){return typeof e=="function"?e():t.unref(e)}function eo(e){if(e instanceof Promise||e instanceof Date||e instanceof RegExp)return e;const r=Qm(e);if(!e||!r)return r;if(Array.isArray(r))return r.map(n=>eo(n));if(typeof r=="object"){const n={};for(const o in r)if(Object.prototype.hasOwnProperty.call(r,o)){if(o==="titleTemplate"||o[0]==="o"&&o[1]==="n"){n[o]=t.unref(r[o]);continue}n[o]=eo(r[o])}return n}return r}const Zm="usehead",cl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},dl="__unhead_injection_handler__";function Jm(){if(dl in cl)return cl[dl]();const e=t.inject(Zm);return!e&&process.env.NODE_ENV!=="production"&&console.warn("Unhead is missing Vue context, falling back to shared context. This may have unexpected results."),e||Xm()}function ep(e,r={}){const n=r.head||Jm();if(n)return n.ssr?n.push(e,r):tp(n,e,r)}function tp(e,r,n={}){const o=t.ref(!1),a=t.ref({});t.watchEffect(()=>{a.value=o.value?{}:eo(r)});const l=e.push(a.value,n);return t.watch(a,i=>{l.patch(i)}),t.getCurrentInstance()&&(t.onBeforeUnmount(()=>{l.dispose()}),t.onDeactivated(()=>{o.value=!0}),t.onActivated(()=>{o.value=!1})),l}function rp(e,r=300){const n=t.ref(e.value);let o;return t.watch(e,a=>{clearTimeout(o),o=setTimeout(()=>{n.value=a},r)},{immediate:!0}),n}const bt=(e,r)=>{const n=e.__vccOpts||e;for(const[o,a]of r)n[o]=a;return n},np={},op={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function ap(e,r){return t.openBlock(),t.createElementBlock("svg",op,[...r[0]||(r[0]=[t.createStaticVNode('<line x1="8" x2="21" y1="6" y2="6"></line><line x1="8" x2="21" y1="12" y2="12"></line><line x1="8" x2="21" y1="18" y2="18"></line><line x1="3" x2="3.01" y1="6" y2="6"></line><line x1="3" x2="3.01" y1="12" y2="12"></line><line x1="3" x2="3.01" y1="18" y2="18"></line>',6)])])}const lp=bt(np,[["render",ap]]),sp={},ip={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"};function cp(e,r){return t.openBlock(),t.createElementBlock("svg",ip,[...r[0]||(r[0]=[t.createStaticVNode('<rect width="18" height="18" x="3" y="3" rx="2"></rect><path d="M3 9h18"></path><path d="M3 15h18"></path><path d="M9 3v18"></path><path d="M15 3v18"></path>',5)])])}const dp=bt(sp,[["render",cp]]),up={class:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6 pb-6"},mp={class:"flex items-center gap-2 space-y-1.5 p-6 border-b border-slate-200 dark:border-slate-700 bg-gradient-to-r from-slate-50 dark:from-slate-800 to-white dark:to-slate-800"},pp={class:"line-clamp-1 tracking-tight text-lg font-semibold text-slate-800 dark:text-slate-100 vertical-center"},fp={class:"w-full flex flex-col gap-2 p-6"},gp=["title"],hp={class:"flex items-center justify-between gap-2"},bp={class:"text-sm text-slate-600 dark:text-slate-400"},yp={class:"font-semibold text-slate-800 dark:text-slate-100"},_p={class:"flex items-center justify-between gap-2"},kp={class:"text-sm text-slate-500 dark:text-slate-400"},xp={class:"font-semibold text-slate-800 dark:text-slate-100"},wp={class:"flex items-center justify-between gap-2"},Ep={class:"text-sm text-slate-500 dark:text-slate-400"},vp={class:"text-sm text-slate-600 dark:text-slate-300"},Np={class:"flex items-center justify-between gap-2 mt-6"},Cp=["onClick"],Sp={class:"text-slate-800 dark:text-slate-200 group-hover:text-green-600 dark:group-hover:text-blue-50"},Vp=["onClick"],Dp=["onClick"],Tp=t.defineComponent({__name:"CollectionsGrid",props:{collections:{},onEdit:{type:Function},onView:{type:Function},onDelete:{type:Function}},emits:["edit","view","delete"],setup(e,{emit:r}){t.ref(!1),t.ref(null);const n=e,o=r,a=(i,c)=>{switch(i){case"edit":o("edit",c),n.onEdit&&n.onEdit(c);break;case"view":o("view",c),n.onView&&n.onView(c);break;case"delete":o("delete",c),n.onDelete&&n.onDelete(c);break}},l=i=>{const c=new Date,u=new Date(i),d=c.getTime()-u.getTime(),m=Math.floor(d/1e3),p=Math.floor(m/60),f=Math.floor(p/60),g=Math.floor(f/24),y=Math.floor(g/7);return y>=2?`${y} weeks ago`:y===1?"1 week ago":g>=2?`${g} days ago`:g===1?"1 day ago":f>=2?`${f} hours ago`:f===1?"1 hour ago":p>=2?`${p} minutes ago`:p===1?"1 minute ago":"just now"},s=i=>{switch(i){case"published":return{icon:Oo,text:"Published",classes:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-200 border-green-200 dark:border-green-700"};case"draft":return{icon:Ht,text:"Draft",classes:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-200 border-yellow-200 dark:border-yellow-700"};case"archived":return{icon:Ho,text:"Archived",classes:"bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-300 border-gray-200 dark:border-gray-700"};default:return{icon:wt,text:"--",classes:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-200 border-yellow-200 dark:border-yellow-700"}}};return(i,c)=>(t.openBlock(),t.createElementBlock("div",up,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.collections,u=>{var d,m,p;return t.openBlock(),t.createElementBlock("div",{key:u.id,class:"rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:bg-slate-50"},[t.createElementVNode("div",mp,[u.type==="single"?(t.openBlock(),t.createBlock(t.unref(jt),{key:0,class:"shrink-0 lucide lucide-page w-5 h-5 text-blue-600"})):(t.openBlock(),t.createBlock(t.unref(qt),{key:1,class:"shrink-0 lucide lucide-layers w-5 h-5 text-blue-600"})),t.createElementVNode("p",pp,t.toDisplayString(u.title),1),s(u.status)?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["whitespace-nowrap rounded-md border ml-auto px-2.5 py-0.5 text-xs font-semibold transition-colors hover:bg-secondary/80 flex items-center w-fit bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-700",(d=s(u.status))==null?void 0:d.classes])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent((m=s(u.status))==null?void 0:m.icon),{class:"w-3 h-3 mr-1"})),t.createTextVNode(" "+t.toDisplayString((p=s(u.status))==null?void 0:p.text),1)],2)):t.createCommentVNode("",!0)]),t.createElementVNode("div",fp,[t.createElementVNode("p",{class:"text-slate-600 dark:text-slate-300 mb-4 line-clamp-2",title:u.description},t.toDisplayString(u.description!==null?u.description:"No description"),9,gp),t.createElementVNode("div",hp,[t.createElementVNode("p",bp,t.toDisplayString(i.$t("cms.collections.entries"))+":",1),t.createElementVNode("p",yp,t.toDisplayString(u.entries),1)]),t.createElementVNode("div",_p,[t.createElementVNode("p",kp,t.toDisplayString(i.$t("cms.collections.fields"))+":",1),t.createElementVNode("p",xp,t.toDisplayString(u.fields),1)]),t.createElementVNode("div",wp,[t.createElementVNode("p",Ep,t.toDisplayString(i.$t("cms.collections.lastModified"))+":",1),t.createElementVNode("p",vp,t.toDisplayString(l(u.last_edit)),1)]),t.createElementVNode("div",Np,[t.renderSlot(i.$slots,"actions",{collection:u,handleAction:a},()=>[t.createElementVNode("button",{class:"inline-flex gap-1 items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-4/5 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-green-50 hover:border-green-300",onClick:t.withModifiers(f=>a("edit",u),["stop"])},[t.createVNode(t.unref(Ht),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-green-600 dark:group-hover:text-blue-50"}),t.createElementVNode("span",Sp,t.toDisplayString(i.$t("cms.common.actions.edit")),1)],8,Cp),t.createElementVNode("button",{class:t.normalizeClass([u.id==="pages"?"disabled":"","inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-red-50 hover:border-red-300"]),onClick:t.withModifiers(f=>u.id==="pages"?null:a("delete",u),["stop"])},[t.createVNode(t.unref(ft),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-red-600 dark:group-hover:text-blue-50"})],10,Vp),t.createElementVNode("button",{class:t.normalizeClass([u.type==="single"?"disabled cursor-not-allowed":"","inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-blue-50 hover:border-blue-300"]),onClick:t.withModifiers(f=>u.type==="single"?null:a("view",u),["stop"])},[t.createVNode(t.unref(Lr),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-blue-600 dark:group-hover:text-blue-50"})],10,Dp)])])])])}),128))]))}}),to=localStorage.getItem("collectionView"),Gr=t.ref(to==="list"||to==="grid"?to:"list");t.watch(Gr,e=>{localStorage.setItem("collectionView",e)});function Ap(){Gr.value=Gr.value==="grid"?"list":"grid"}function $p(){return{collectionView:Gr,toggleCollectionView:Ap}}const Ip={class:"space-y-6 max-w-7xl mx-auto"},Lp={class:"flex items-center justify-between mb-8"},Mp={class:"flex gap-4"},Op={class:"text-3xl font-bold text-slate-800 dark:text-slate-100 mb-2"},Bp={class:"text-slate-600 dark:text-slate-300"},Fp=["href","title"],Pp={class:"flex items-center gap-3"},Rp={class:"relative"},Up={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},jp=["placeholder"],qp={class:"flex items-center bg-white dark:bg-slate-700 border border-slate-200 dark:border-slate-600 rounded-lg p-1 max-w-[fit-content]"},Hp=["onClick"],Gp=t.defineComponent({__name:"BuilderPage",setup(e){const{t:r,locale:n}=me(),o=De.useRouter(),a=[{name:"name",title:r("cms.builder.collectionName"),type:"text",icon:qt},{name:"title",title:r("cms.builder.title"),type:"text",icon:qt},{name:"description",title:r("cms.common.description"),type:"text"},{name:"entries",title:r("cms.builder.entries"),type:"number"},{name:"fields",title:r("cms.builder.fields"),type:"number"},{name:"status",title:r("cms.builder.status"),type:"text"},{name:"last_edit",title:r("cms.builder.lastModified"),type:"date"}],l=t.ref(""),s=rp(l,300);ep({title:()=>r("cms.collections.title")+" | CMS"});const i=t.ref([]),c=t.inject("fetchContentTypes"),u=t.ref(1),d=t.ref(16),m=t.ref(null),{collectionView:p,toggleCollectionView:f}=$p();async function g(){try{const w=s.value?`&search=${encodeURIComponent(String(s.value))}`:"",E=`/api/cms-type?page=${u.value}&limit=${d.value}${w}`,V=await fetch(E);if(!V.ok)throw new Error("Failed to fetch collections");const S=await V.json();i.value=S.rows,m.value=S}catch(w){console.error("Error fetching collections:",w)}}t.onMounted(()=>{g()});const y=t.computed(()=>[...i.value].sort((E,V)=>E.id==="pages"?-1:V.id==="pages"?1:0)),x=async w=>{try{await fetch(`/api/cms-type/${w.id}`,{method:"DELETE"}),g(),c()}catch(E){console.error("Error deleting collection:",E)}},h=w=>{o.push(`/settings/collections/edit/${w.id||w.name}`)},k=w=>{w.type==="single"?o.push(`/collections/single/${w.name}`):o.push(`/collections/${w.name}`)};return t.watch(u,()=>{g()}),t.watch(s,w=>{console.log("Search query changed:",w),u.value=1,g()}),(w,E)=>{var V,S,v,L;return t.openBlock(),t.createElementBlock("div",Ip,[t.createElementVNode("div",Lp,[t.createElementVNode("div",Mp,[t.createElementVNode("div",null,[t.createElementVNode("h1",Op,t.toDisplayString(w.$t("cms.builder.collections")),1),t.createElementVNode("p",Bp,t.toDisplayString(w.$t("cms.builder.manageContentCollections")),1)]),t.createElementVNode("a",{href:`https://cms.opengis.info/${t.unref(n)}/guides/collections/`,target:"_blank",title:w.$t("cms.guide.collections"),class:"mt-2"},[t.createVNode(t.unref(wt),{class:"w-5 h-5"})],8,Fp)]),t.createElementVNode("div",Pp,[t.createElementVNode("div",Rp,[t.createElementVNode("div",Up,[t.createVNode(t.unref(kn),{class:"w-5 h-5 text-gray-400"})]),t.withDirectives(t.createElementVNode("input",{type:"text",class:"block w-full py-2 pl-10 pr-3 leading-5 text-gray-900 placeholder-gray-500 transition-colors bg-white border border-gray-300 rounded-md dark:border-gray-600 dark:bg-gray-700 dark:placeholder-gray-400 focus:outline-none focus:ring-sky-500 focus:border-sky-500 dark:text-white sm:text-sm",placeholder:w.$t("cms.builder.searchCollections"),"onUpdate:modelValue":E[0]||(E[0]=P=>l.value=P)},null,8,jp),[[t.vModelText,l.value]])]),t.createElementVNode("div",qp,[t.createElementVNode("button",{class:t.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors rounded-md text-xs h-8 w-8 p-0 hover:bg-blue-700 hover:text-white cursor-pointer",{"bg-blue-600 text-white":t.unref(p)==="list"}]),onClick:E[1]||(E[1]=P=>p.value="list")},[t.createVNode(lp,{class:"dark:text-blue-50 w-4 h-4"})],2),t.createElementVNode("button",{class:t.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors rounded-md text-xs h-8 w-8 p-0 hover:bg-blue-700 hover:text-white cursor-pointer",{"bg-blue-600 text-white":t.unref(p)==="grid"}]),onClick:E[2]||(E[2]=P=>p.value="grid")},[t.createVNode(dp,{class:"dark:text-blue-50 w-4 h-4"})],2)]),t.createVNode(ll)])]),t.createElementVNode("div",null,[t.unref(p)==="list"?(t.openBlock(),t.createBlock(Zn,{key:0,class:"max-h-[calc(100vh-270px)] overflow-y-auto overflow-x-hidden",columns:a,rows:y.value,onDelete:x,onEdit:h,onView:k},{actions:t.withCtx(({row:P})=>[t.createElementVNode("button",{class:"inline-flex items-center justify-center whitespace-nowrap font-medium border rounded-md text-xs h-8 w-8 p-0 border-slate-300 bg-white transition-all duration-200 shadow-sm group dark:border-slate-600 dark:bg-slate-700 dark:hover:bg-slate-600 dark:hover:border-slate-500 dark:hover:text-slate-200 hover:bg-blue-50 hover:border-blue-300 hover:text-blue-600",onClick:Z=>k(P)},[t.createVNode(t.unref(Lr),{class:"text-slate-800 dark:text-slate-200 w-4 h-4 group-hover:text-blue-600 dark:group-hover:text-blue-50"})],8,Hp)]),_:1},8,["rows"])):t.createCommentVNode("",!0),t.unref(p)==="grid"?(t.openBlock(),t.createBlock(Tp,{key:1,collections:y.value,onEdit:h,onView:k,onDelete:x,class:"max-h-[calc(100vh-270px)] overflow-y-auto overflow-x-hidden"},null,8,["collections"])):t.createCommentVNode("",!0),((V=m.value)==null?void 0:V.total)>16?(t.openBlock(),t.createBlock(sl,{key:2,total:(S=m.value)==null?void 0:S.filtered,count:((v=m.value)==null?void 0:v.count)||((L=m.value)==null?void 0:L.total),page:u.value,"onUpdate:page":E[3]||(E[3]=P=>u.value=P),limit:d.value},null,8,["total","count","page","limit"])):t.createCommentVNode("",!0)])])}}});async function Wp(){if(window.monaco)return window.monaco;const e="https://cdn.jsdelivr.net/npm/monaco-editor@0.45.0/min";return window.require||(window.require={paths:{vs:`${e}/vs`}},await new Promise((r,n)=>{const o=document.createElement("script");o.src=`${e}/vs/loader.min.js`,o.onload=()=>r(),o.onerror=n,document.head.appendChild(o)})),new Promise(r=>{window.require(["vs/editor/editor.main"],()=>r(window.monaco))})}const Wr=t.defineComponent({__name:"MonacoEditor",props:t.mergeModels({language:{default:"javascript"},theme:{default:"vs-dark"},width:{default:"100%"},height:{default:"100%"},options:{default:()=>({minimap:{enabled:!1}})}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const r=e,n=t.useModel(e,"modelValue"),o=t.ref(null);let a=null,l=null;return t.onMounted(async()=>{var s;if(o.value)try{l=await Wp();const i=((s=n.value)==null?void 0:s.replace(/\\n/g,`
|
|
238
243
|
`))||"";a=l.editor.create(o.value,{value:i,language:r.language,theme:r.theme,automaticLayout:!0,...r.options}),a.onDidChangeModelContent(()=>{const c=(a==null?void 0:a.getValue())||"";n.value=c})}catch(i){console.error("Failed to load Monaco Editor:",i)}}),t.watch(()=>n.value,s=>{if(a){const i=(s==null?void 0:s.replace(/\\n/g,`
|
|
239
|
-
`))||"";i!==a.getValue()&&a.setValue(i)}},{immediate:!0}),t.watch(()=>r.language,s=>{a&&s&&l&&l.editor.setModelLanguage(a.getModel(),s)}),t.watch(()=>r.theme,s=>{a&&s&&l&&l.editor.setTheme(s)}),t.onBeforeUnmount(()=>{a&&(a.dispose(),a=null)}),(s,i)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"editorContainer",ref:o,style:t.normalizeStyle({width:e.width,height:e.height})},null,4))}}),qp={__name:"vs-builder-monaco",props:{yaml:{type:String,default:""},yamlModifiers:{}},emits:["update:yaml"],setup(e){const r=t.ref("");t.useModel(e,"yaml");const n=t.ref(null);return t.onMounted(()=>{n.value=Math.random().toString(36).substring(2,15)}),(o,a)=>n.value?(t.openBlock(),t.createElementBlock("div",{key:n.value},[t.createVNode(Gr,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value=l),language:"yaml",theme:"vs-light",height:"calc(100vh - 200px)",width:"100%",options:{minimap:{enabled:!1}}},null,8,["modelValue"])])):t.createCommentVNode("",!0)}},Vt=(e=0,r)=>({name:{type:"text",label:r("cms.builder.fieldLabels.name"),required:!0,placeholder:r("cms.builder.fieldPlaceholders.name"),validators:["required"]},label:{type:"text",label:r("cms.builder.fieldLabels.label"),required:!0,placeholder:r("cms.builder.fieldPlaceholders.label"),validators:["required"]},placeholder:{type:"text",label:r("cms.builder.fieldLabels.placeholder"),required:!0,placeholder:r("cms.builder.fieldPlaceholders.placeholder")},help:{type:"text",label:r("cms.builder.fieldLabels.help"),placeholder:r("cms.builder.fieldPlaceholders.help")},type:{type:"combobox",mode:"combo",label:r("cms.builder.fieldLabels.type"),required:!0,maxHeight:"300",slots:{option:'<div class="flex items-center gap-2 p-2 py-1 rounded hover:bg-gray-100" :class="{ \'bg-gray-100\': selectedNavIndex === ind, \'bg-gray-100\': modelValue == ind }" ><div :class="`flex items-center gap-2 p-1 bg-${color }-100 rounded`"><component :is="`icon-${id}`" class="block" height="24" width="30" /></div><span class="text-sm text-gray-700">{{ text }}</span></div>'},options:[{text:r("cms.builder.fieldOptions.text"),id:"text",color:"blue"},{text:r("cms.builder.fieldOptions.number"),id:"number",color:"green"},{text:r("cms.builder.fieldOptions.date"),id:"date",color:"red"},{text:r("cms.builder.fieldOptions.datetime"),id:"datetime",color:"purple"},{text:r("cms.builder.fieldOptions.file"),id:"file",color:"yellow"},{text:r("cms.builder.fieldOptions.select"),id:"select",color:"yellow"},{text:r("cms.builder.fieldOptions.multiselect"),id:"multiselect",color:"blue"},{text:r("cms.builder.fieldOptions.mediaselect"),id:"mediaselect",color:"orange"},{text:r("cms.builder.fieldOptions.radio"),id:"radio",color:"blue"},{text:r("cms.builder.fieldOptions.boolean"),id:"boolean",color:"red"},{text:r("cms.builder.fieldOptions.datalist"),id:"datalist",color:"orange"},{text:r("cms.builder.fieldOptions.image"),id:"image",color:"blue"},{text:r("cms.builder.fieldOptions.slug"),id:"slug",color:"green"},{text:r("cms.builder.fieldOptions.richtext"),id:"richtext",color:"red"},{text:r("cms.builder.fieldOptions.reference"),id:"reference",color:"yellow"},{text:r("cms.builder.fieldOptions.relation"),id:"relation",color:"pink"},{text:r("cms.builder.fieldOptions.fileList"),id:"FileList",color:"orange"},{text:r("cms.builder.fieldOptions.tags"),id:"tags",color:"blue"}].filter(n=>e>1?n.id!=="datalist":!0),validators:["required"]},subtype:{type:"combobox",mode:"combo",label:r("cms.builder.fieldLabels.subtype"),placeholder:r("cms.builder.fieldPlaceholders.subtype"),options:[{text:r("cms.builder.fieldOptions.text"),id:"text"},{text:r("cms.builder.fieldOptions.number"),id:"number"},{text:r("cms.builder.fieldOptions.date"),id:"date"},{text:r("cms.builder.fieldOptions.datetime"),id:"datetime"}],conditions:["type","==","array"]},parent:{type:"text",label:r("cms.builder.fieldLabels.parent"),placeholder:r("cms.builder.fieldPlaceholders.parent"),conditions:["type","in",["slug","select","multiselect"]]},data:{type:"text",label:r("cms.builder.fieldLabels.data"),placeholder:r("cms.builder.fieldPlaceholders.data"),conditions:["type","in",["select","multiselect"]]},options:{type:"datalist",label:r("cms.builder.fieldLabels.options"),conditions:["type","in",["select","multiselect","radio"]],colModel:[{key:"id",ua:"ID",type:"text",validators:["required"],col:6},{key:"text",ua:"Text",type:"text",validators:["required"],col:6}]},colModel:e<=1?{type:"datalist",label:r("cms.builder.fieldLabels.colModel"),conditions:["type","==","datalist"],colModel:Object.entries(Vt(e+1,r)).map(([n,o])=>({key:n,...o,ua:(o==null?void 0:o.label)||(o==null?void 0:o.ua)}))}:{type:"switcher",label:r("cms.builder.fieldLabels.required"),hidden:!0,required:!0},multiple:{type:"switcher",label:r("cms.builder.fieldLabels.multiple"),conditions:["type","==","file"]},relation:{type:"combobox",data:"collection",label:r("cms.builder.fieldLabels.relation"),conditions:["type","==","relation"]},required:{type:"switcher",label:r("cms.builder.fieldLabels.required"),required:!0},localization:{type:"switcher",label:r("cms.builder.fieldLabels.localization"),conditions:["type","in",["richtext","text","reference","multiselect","datalist"]],required:!0}}),Hp={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Gp={__name:"vs-builder-datatable-form",props:{modelValue:{type:Array,default:()=>[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const{t:r}=ue();z.inputs["vs-input-datalist"]=z.inputs.VsInputDatatable;const n=t.useModel(e,"modelValue"),o=t.ref(!1),a=t.ref({}),l=t.ref({}),s=t.computed(()=>(l.value,Vt(0,r))),i=async()=>{if(await a.value.validate()){Z.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.builder.createFieldFailed")});return}try{n.value=[...n.value,l.value],l.value={},o.value=!1}catch(d){console.log(d)}};return(c,d)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("button",{onClick:d[0]||(d[0]=m=>o.value=!0),class:"inline-flex items-center justify-center h-10 gap-2 px-4 py-2 text-sm font-medium transition-colors border rounded-md hover hover:bg-gray-200 whitespace-nowrap ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring 0"},[t.createVNode(t.unref(lt),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(c.$t("cms.common.actions.addField")),1)]),t.createVNode(t.unref(Z.VsModal),{teleport:"#modal",title:c.$t("cms.builder.createField"),size:"small",visible:o.value,"onUpdate:visible":d[4]||(d[4]=m=>o.value=m),onClose:d[5]||(d[5]=m=>o.value=!1)},{footer:t.withCtx(()=>[t.createElementVNode("div",Hp,[t.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:d[3]||(d[3]=m=>o.value=!1)},t.toDisplayString(c.$t("cms.common.actions.cancel")),1),t.createElementVNode("button",{onClick:i,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},t.toDisplayString(c.$t("cms.common.actions.save")),1)])]),default:t.withCtx(()=>[t.createVNode(t.unref(z.VForm),{modelValue:l.value,"onUpdate:modelValue":d[1]||(d[1]=m=>l.value=m),schema:s.value,form:a.value,"onUpdate:form":d[2]||(d[2]=m=>a.value=m)},null,8,["modelValue","schema","form"])]),_:1},8,["title","visible"])]))}},Wp={class:"flex items-center justify-end col-span-3 gap-2"},Yp={key:2,class:"w-8 h-4"},zp={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Kp={__name:"vs-builder-datatable-controls",props:t.mergeModels({index:{type:Number,required:!0},data:{type:Object,required:!0}},{columns:{type:Array,default:()=>[]},columnsModifiers:{}}),emits:["update:columns"],setup(e){const{t:r}=ue(),n=e,o=t.useModel(e,"columns"),a=t.ref(!1),l=t.ref({}),s=t.ref({...n.data||{}}),i=t.ref({});t.onMounted(()=>{n.data.required?i.value={...Vt(0,r),name:{...Vt(0,r).name,disabled:!0},label:{...Vt(0,r).label,disabled:!0},type:{...Vt(0,r).type,disabled:!0}}:i.value=Vt(0,r)});const c=()=>{Z.confirm({title:r("cms.builder.deleteTitle"),message:r("cms.builder.deleteField"),type:"error",onConfirm:()=>{d()}})},d=()=>{o.value=o.value.filter((u,p)=>p!==n.index)},m=async()=>{if(await l.value.validate()){Z.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.builder.editFieldFailed")});return}try{o.value[n.index]=s.value,a.value=!1}catch(p){console.log(p)}};return(u,p)=>(t.openBlock(),t.createElementBlock("div",Wp,[["status"].includes(e.data.name)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("button",{key:0,onClick:p[0]||(p[0]=f=>a.value=!0),class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground h-8 w-8 rounded-full hover:bg-gray-100"},[t.createVNode(t.unref(Rt),{class:"w-4 h-4"})])),e.data.required?(t.openBlock(),t.createElementBlock("button",Yp)):(t.openBlock(),t.createElementBlock("button",{key:1,onClick:c,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 h-8 w-8 rounded-full hover:bg-red-100 text-red-600 hover:text-red-700"},[t.createVNode(t.unref(Gs),{class:"w-4 h-4"})])),t.createVNode(t.unref(Z.VsModal),{teleport:"#modal",visible:a.value,title:u.$t("cms.builder.editField"),onClose:p[4]||(p[4]=f=>a.value=!1)},{footer:t.withCtx(()=>[t.createElementVNode("div",zp,[t.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:p[3]||(p[3]=f=>a.value=!1)},t.toDisplayString(u.$t("cms.common.actions.cancel")),1),t.createElementVNode("button",{class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:m},t.toDisplayString(u.$t("cms.common.actions.save")),1)])]),default:t.withCtx(()=>[t.createVNode(t.unref(z),{modelValue:s.value,"onUpdate:modelValue":p[1]||(p[1]=f=>s.value=f),schema:i.value,form:l.value,"onUpdate:form":p[2]||(p[2]=f=>l.value=f)},null,8,["modelValue","schema","form"])]),_:1},8,["visible","title"])]))}};/**!
|
|
244
|
+
`))||"";i!==a.getValue()&&a.setValue(i)}},{immediate:!0}),t.watch(()=>r.language,s=>{a&&s&&l&&l.editor.setModelLanguage(a.getModel(),s)}),t.watch(()=>r.theme,s=>{a&&s&&l&&l.editor.setTheme(s)}),t.onBeforeUnmount(()=>{a&&(a.dispose(),a=null)}),(s,i)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"editorContainer",ref:o,style:t.normalizeStyle({width:s.width,height:s.height})},null,4))}}),Yp={__name:"vs-builder-monaco",props:{yaml:{type:String,default:""},yamlModifiers:{}},emits:["update:yaml"],setup(e){const r=t.ref("");t.useModel(e,"yaml");const n=t.ref(null);return t.onMounted(()=>{n.value=Math.random().toString(36).substring(2,15)}),(o,a)=>n.value?(t.openBlock(),t.createElementBlock("div",{key:n.value},[t.createVNode(Wr,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value=l),language:"yaml",theme:"vs-light",height:"calc(100vh - 200px)",width:"100%",options:{minimap:{enabled:!1}}},null,8,["modelValue"])])):t.createCommentVNode("",!0)}},Lt=(e=0,r)=>({name:{type:"text",label:r("cms.builder.fieldLabels.name"),required:!0,placeholder:r("cms.builder.fieldPlaceholders.name"),validators:["required"]},label:{type:"text",label:r("cms.builder.fieldLabels.label"),required:!0,placeholder:r("cms.builder.fieldPlaceholders.label"),validators:["required"]},placeholder:{type:"text",label:r("cms.builder.fieldLabels.placeholder"),required:!0,placeholder:r("cms.builder.fieldPlaceholders.placeholder")},help:{type:"text",label:r("cms.builder.fieldLabels.help"),placeholder:r("cms.builder.fieldPlaceholders.help")},type:{type:"combobox",mode:"combo",label:r("cms.builder.fieldLabels.type"),required:!0,maxHeight:"300",slots:{option:'<div class="flex items-center gap-2 p-2 py-1 rounded hover:bg-gray-100" :class="{ \'bg-gray-100\': selectedNavIndex === ind, \'bg-gray-100\': modelValue == ind }" ><div :class="`flex items-center gap-2 p-1 bg-${color }-100 rounded`"><component :is="`icon-${id}`" class="block" height="24" width="30" /></div><span class="text-sm text-gray-700">{{ text }}</span></div>'},options:[{text:r("cms.builder.fieldOptions.text"),id:"text",color:"blue"},{text:r("cms.builder.fieldOptions.number"),id:"number",color:"green"},{text:r("cms.builder.fieldOptions.date"),id:"date",color:"red"},{text:r("cms.builder.fieldOptions.datetime"),id:"datetime",color:"purple"},{text:r("cms.builder.fieldOptions.file"),id:"file",color:"yellow"},{text:r("cms.builder.fieldOptions.select"),id:"select",color:"yellow"},{text:r("cms.builder.fieldOptions.multiselect"),id:"multiselect",color:"blue"},{text:r("cms.builder.fieldOptions.mediaselect"),id:"mediaselect",color:"orange"},{text:r("cms.builder.fieldOptions.radio"),id:"radio",color:"blue"},{text:r("cms.builder.fieldOptions.boolean"),id:"boolean",color:"red"},{text:r("cms.builder.fieldOptions.datalist"),id:"datalist",color:"orange"},{text:r("cms.builder.fieldOptions.image"),id:"image",color:"blue"},{text:r("cms.builder.fieldOptions.slug"),id:"slug",color:"green"},{text:r("cms.builder.fieldOptions.richtext"),id:"richtext",color:"red"},{text:r("cms.builder.fieldOptions.reference"),id:"reference",color:"yellow"},{text:r("cms.builder.fieldOptions.relation"),id:"relation",color:"pink"},{text:r("cms.builder.fieldOptions.fileList"),id:"FileList",color:"orange"},{text:r("cms.builder.fieldOptions.tags"),id:"tags",color:"blue"}].filter(n=>e>1?n.id!=="datalist":!0),validators:["required"]},subtype:{type:"combobox",mode:"combo",label:r("cms.builder.fieldLabels.subtype"),placeholder:r("cms.builder.fieldPlaceholders.subtype"),options:[{text:r("cms.builder.fieldOptions.text"),id:"text"},{text:r("cms.builder.fieldOptions.number"),id:"number"},{text:r("cms.builder.fieldOptions.date"),id:"date"},{text:r("cms.builder.fieldOptions.datetime"),id:"datetime"}],conditions:["type","==","array"]},parent:{type:"text",label:r("cms.builder.fieldLabels.parent"),placeholder:r("cms.builder.fieldPlaceholders.parent"),conditions:["type","in",["slug","select","multiselect"]]},data:{type:"text",label:r("cms.builder.fieldLabels.data"),placeholder:r("cms.builder.fieldPlaceholders.data"),conditions:["type","in",["select","multiselect"]]},options:{type:"datalist",label:r("cms.builder.fieldLabels.options"),conditions:["type","in",["select","multiselect","radio"]],colModel:[{key:"id",ua:"ID",type:"text",validators:["required"],col:6},{key:"text",ua:"Text",type:"text",validators:["required"],col:6}]},colModel:e<=1?{type:"datalist",label:r("cms.builder.fieldLabels.colModel"),conditions:["type","==","datalist"],colModel:Object.entries(Lt(e+1,r)).map(([n,o])=>({key:n,...o,ua:(o==null?void 0:o.label)||(o==null?void 0:o.ua)}))}:{type:"switcher",label:r("cms.builder.fieldLabels.required"),hidden:!0,required:!0},multiple:{type:"switcher",label:r("cms.builder.fieldLabels.multiple"),conditions:["type","==","file"]},relation:{type:"combobox",data:"collection",label:r("cms.builder.fieldLabels.relation"),conditions:["type","==","relation"]},required:{type:"switcher",label:r("cms.builder.fieldLabels.required"),required:!0},localization:{type:"switcher",label:r("cms.builder.fieldLabels.localization"),conditions:["type","in",["richtext","text","reference","multiselect","datalist"]],required:!0}}),zp={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Kp={__name:"vs-builder-datatable-form",props:{modelValue:{type:Array,default:()=>[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const{t:r}=me();Y.inputs["vs-input-datalist"]=Y.inputs.VsInputDatatable;const n=t.useModel(e,"modelValue"),o=t.ref(!1),a=t.ref({}),l=t.ref({}),s=t.computed(()=>(l.value,Lt(0,r))),i=async()=>{if(await a.value.validate()){Q.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.builder.createFieldFailed")});return}try{n.value=[...n.value,l.value],l.value={},o.value=!1}catch(u){console.log(u)}};return(c,u)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("button",{onClick:u[0]||(u[0]=d=>o.value=!0),class:"inline-flex items-center justify-center h-10 gap-2 px-4 py-2 text-sm font-medium transition-colors border rounded-md hover hover:bg-gray-200 whitespace-nowrap ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring 0"},[t.createVNode(t.unref(pt),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(c.$t("cms.common.actions.addField")),1)]),t.createVNode(t.unref(Q.VsModal),{teleport:"#modal",title:c.$t("cms.builder.createField"),size:"small",visible:o.value,"onUpdate:visible":u[4]||(u[4]=d=>o.value=d),onClose:u[5]||(u[5]=d=>o.value=!1)},{footer:t.withCtx(()=>[t.createElementVNode("div",zp,[t.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:u[3]||(u[3]=d=>o.value=!1)},t.toDisplayString(c.$t("cms.common.actions.cancel")),1),t.createElementVNode("button",{onClick:i,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},t.toDisplayString(c.$t("cms.common.actions.save")),1)])]),default:t.withCtx(()=>[t.createVNode(t.unref(Y.VForm),{modelValue:l.value,"onUpdate:modelValue":u[1]||(u[1]=d=>l.value=d),schema:s.value,form:a.value,"onUpdate:form":u[2]||(u[2]=d=>a.value=d)},null,8,["modelValue","schema","form"])]),_:1},8,["title","visible"])]))}},Xp={class:"flex items-center justify-end col-span-3 gap-2"},Qp={key:2,class:"w-8 h-4"},Zp={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Jp={__name:"vs-builder-datatable-controls",props:t.mergeModels({index:{type:Number,required:!0},data:{type:Object,required:!0}},{columns:{type:Array,default:()=>[]},columnsModifiers:{}}),emits:["update:columns"],setup(e){const{t:r}=me(),n=e,o=t.useModel(e,"columns"),a=t.ref(!1),l=t.ref({}),s=t.ref({...n.data||{}}),i=t.ref({});t.onMounted(()=>{n.data.required?i.value={...Lt(0,r),name:{...Lt(0,r).name,disabled:!0},label:{...Lt(0,r).label,disabled:!0},type:{...Lt(0,r).type,disabled:!0}}:i.value=Lt(0,r)});const c=()=>{Q.confirm({title:r("cms.builder.deleteTitle"),message:r("cms.builder.deleteField"),type:"error",onConfirm:()=>{u()}})},u=()=>{o.value=o.value.filter((m,p)=>p!==n.index)},d=async()=>{if(await l.value.validate()){Q.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.builder.editFieldFailed")});return}try{o.value[n.index]=s.value,a.value=!1}catch(p){console.log(p)}};return(m,p)=>(t.openBlock(),t.createElementBlock("div",Xp,[["status"].includes(e.data.name)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("button",{key:0,onClick:p[0]||(p[0]=f=>a.value=!0),class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground h-8 w-8 rounded-full hover:bg-gray-100"},[t.createVNode(t.unref(Ht),{class:"w-4 h-4"})])),e.data.required?(t.openBlock(),t.createElementBlock("button",Qp)):(t.openBlock(),t.createElementBlock("button",{key:1,onClick:c,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 h-8 w-8 rounded-full hover:bg-red-100 text-red-600 hover:text-red-700"},[t.createVNode(t.unref(Ws),{class:"w-4 h-4"})])),t.createVNode(t.unref(Q.VsModal),{teleport:"#modal",visible:a.value,title:m.$t("cms.builder.editField"),onClose:p[4]||(p[4]=f=>a.value=!1)},{footer:t.withCtx(()=>[t.createElementVNode("div",Zp,[t.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:p[3]||(p[3]=f=>a.value=!1)},t.toDisplayString(m.$t("cms.common.actions.cancel")),1),t.createElementVNode("button",{class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:d},t.toDisplayString(m.$t("cms.common.actions.save")),1)])]),default:t.withCtx(()=>[t.createVNode(t.unref(Y),{modelValue:s.value,"onUpdate:modelValue":p[1]||(p[1]=f=>s.value=f),schema:i.value,form:l.value,"onUpdate:form":p[2]||(p[2]=f=>l.value=f)},null,8,["modelValue","schema","form"])]),_:1},8,["visible","title"])]))}};/**!
|
|
240
245
|
* Sortable 1.14.0
|
|
241
246
|
* @author RubaXa <trash@rubaxa.org>
|
|
242
247
|
* @author owenm <owen23355@gmail.com>
|
|
243
248
|
* @license MIT
|
|
244
|
-
*/function ul(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,o)}return n}function nt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?ul(Object(n),!0).forEach(function(o){Xp(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ul(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Wr(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wr=function(r){return typeof r}:Wr=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Wr(e)}function Xp(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function ut(){return ut=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ut.apply(this,arguments)}function Qp(e,r){if(e==null)return{};var n={},o=Object.keys(e),a,l;for(l=0;l<o.length;l++)a=o[l],!(r.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Zp(e,r){if(e==null)return{};var n=Qp(e,r),o,a;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)o=l[a],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}var Jp="1.14.0";function mt(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var pt=mt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),gr=mt(/Edge/i),ml=mt(/firefox/i),hr=mt(/safari/i)&&!mt(/chrome/i)&&!mt(/android/i),pl=mt(/iP(ad|od|hone)/i),ef=mt(/chrome/i)&&mt(/android/i),fl={capture:!1,passive:!1};function ce(e,r,n){e.addEventListener(r,n,!pt&&fl)}function le(e,r,n){e.removeEventListener(r,n,!pt&&fl)}function Yr(e,r){if(r){if(r[0]===">"&&(r=r.substring(1)),e)try{if(e.matches)return e.matches(r);if(e.msMatchesSelector)return e.msMatchesSelector(r);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(r)}catch{return!1}return!1}}function tf(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ot(e,r,n,o){if(e){n=n||document;do{if(r!=null&&(r[0]===">"?e.parentNode===n&&Yr(e,r):Yr(e,r))||o&&e===n)return e;if(e===n)break}while(e=tf(e))}return null}var gl=/\s+/g;function qe(e,r,n){if(e&&r)if(e.classList)e.classList[n?"add":"remove"](r);else{var o=(" "+e.className+" ").replace(gl," ").replace(" "+r+" "," ");e.className=(o+(n?" "+r:"")).replace(gl," ")}}function G(e,r,n){var o=e&&e.style;if(o){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),r===void 0?n:n[r];!(r in o)&&r.indexOf("webkit")===-1&&(r="-webkit-"+r),o[r]=n+(typeof n=="string"?"":"px")}}function Wt(e,r){var n="";if(typeof e=="string")n=e;else do{var o=G(e,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!r&&(e=e.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(n)}function hl(e,r,n){if(e){var o=e.getElementsByTagName(r),a=0,l=o.length;if(n)for(;a<l;a++)n(o[a],a);return o}return[]}function at(){var e=document.scrollingElement;return e||document.documentElement}function Te(e,r,n,o,a){if(!(!e.getBoundingClientRect&&e!==window)){var l,s,i,c,d,m,u;if(e!==window&&e.parentNode&&e!==at()?(l=e.getBoundingClientRect(),s=l.top,i=l.left,c=l.bottom,d=l.right,m=l.height,u=l.width):(s=0,i=0,c=window.innerHeight,d=window.innerWidth,m=window.innerHeight,u=window.innerWidth),(r||n)&&e!==window&&(a=a||e.parentNode,!pt))do if(a&&a.getBoundingClientRect&&(G(a,"transform")!=="none"||n&&G(a,"position")!=="static")){var p=a.getBoundingClientRect();s-=p.top+parseInt(G(a,"border-top-width")),i-=p.left+parseInt(G(a,"border-left-width")),c=s+l.height,d=i+l.width;break}while(a=a.parentNode);if(o&&e!==window){var f=Wt(a||e),g=f&&f.a,h=f&&f.d;f&&(s/=h,i/=g,u/=g,m/=h,c=s+m,d=i+u)}return{top:s,left:i,bottom:c,right:d,width:u,height:m}}}function bl(e,r,n){for(var o=xt(e,!0),a=Te(e)[r];o;){var l=Te(o)[n],s=void 0;if(s=a>=l,!s)return o;if(o===at())break;o=xt(o,!1)}return!1}function Yt(e,r,n,o){for(var a=0,l=0,s=e.children;l<s.length;){if(s[l].style.display!=="none"&&s[l]!==W.ghost&&(o||s[l]!==W.dragged)&&ot(s[l],n.draggable,e,!1)){if(a===r)return s[l];a++}l++}return null}function to(e,r){for(var n=e.lastElementChild;n&&(n===W.ghost||G(n,"display")==="none"||r&&!Yr(n,r));)n=n.previousElementSibling;return n||null}function Ke(e,r){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==W.clone&&(!r||Yr(e,r))&&n++;return n}function yl(e){var r=0,n=0,o=at();if(e)do{var a=Wt(e),l=a.a,s=a.d;r+=e.scrollLeft*l,n+=e.scrollTop*s}while(e!==o&&(e=e.parentNode));return[r,n]}function rf(e,r){for(var n in e)if(e.hasOwnProperty(n)){for(var o in r)if(r.hasOwnProperty(o)&&r[o]===e[n][o])return Number(n)}return-1}function xt(e,r){if(!e||!e.getBoundingClientRect)return at();var n=e,o=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var a=G(n);if(n.clientWidth<n.scrollWidth&&(a.overflowX=="auto"||a.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(a.overflowY=="auto"||a.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return at();if(o||r)return n;o=!0}}while(n=n.parentNode);return at()}function nf(e,r){if(e&&r)for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);return e}function ro(e,r){return Math.round(e.top)===Math.round(r.top)&&Math.round(e.left)===Math.round(r.left)&&Math.round(e.height)===Math.round(r.height)&&Math.round(e.width)===Math.round(r.width)}var br;function _l(e,r){return function(){if(!br){var n=arguments,o=this;n.length===1?e.call(o,n[0]):e.apply(o,n),br=setTimeout(function(){br=void 0},r)}}}function of(){clearTimeout(br),br=void 0}function xl(e,r,n){e.scrollLeft+=r,e.scrollTop+=n}function kl(e){var r=window.Polymer,n=window.jQuery||window.Zepto;return r&&r.dom?r.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var He="Sortable"+new Date().getTime();function af(){var e=[],r;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(a){if(!(G(a,"display")==="none"||a===W.ghost)){e.push({target:a,rect:Te(a)});var l=nt({},e[e.length-1].rect);if(a.thisAnimationDuration){var s=Wt(a,!0);s&&(l.top-=s.f,l.left-=s.e)}a.fromRect=l}})}},addAnimationState:function(o){e.push(o)},removeAnimationState:function(o){e.splice(rf(e,{target:o}),1)},animateAll:function(o){var a=this;if(!this.options.animation){clearTimeout(r),typeof o=="function"&&o();return}var l=!1,s=0;e.forEach(function(i){var c=0,d=i.target,m=d.fromRect,u=Te(d),p=d.prevFromRect,f=d.prevToRect,g=i.rect,h=Wt(d,!0);h&&(u.top-=h.f,u.left-=h.e),d.toRect=u,d.thisAnimationDuration&&ro(p,u)&&!ro(m,u)&&(g.top-u.top)/(g.left-u.left)===(m.top-u.top)/(m.left-u.left)&&(c=sf(g,p,f,a.options)),ro(u,m)||(d.prevFromRect=m,d.prevToRect=u,c||(c=a.options.animation),a.animate(d,g,u,c)),c&&(l=!0,s=Math.max(s,c),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},c),d.thisAnimationDuration=c)}),clearTimeout(r),l?r=setTimeout(function(){typeof o=="function"&&o()},s):typeof o=="function"&&o(),e=[]},animate:function(o,a,l,s){if(s){G(o,"transition",""),G(o,"transform","");var i=Wt(this.el),c=i&&i.a,d=i&&i.d,m=(a.left-l.left)/(c||1),u=(a.top-l.top)/(d||1);o.animatingX=!!m,o.animatingY=!!u,G(o,"transform","translate3d("+m+"px,"+u+"px,0)"),this.forRepaintDummy=lf(o),G(o,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),G(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){G(o,"transition",""),G(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},s)}}}}function lf(e){return e.offsetWidth}function sf(e,r,n,o){return Math.sqrt(Math.pow(r.top-e.top,2)+Math.pow(r.left-e.left,2))/Math.sqrt(Math.pow(r.top-n.top,2)+Math.pow(r.left-n.left,2))*o.animation}var zt=[],no={initializeByDefault:!0},yr={mount:function(r){for(var n in no)no.hasOwnProperty(n)&&!(n in r)&&(r[n]=no[n]);zt.forEach(function(o){if(o.pluginName===r.pluginName)throw"Sortable: Cannot mount plugin ".concat(r.pluginName," more than once")}),zt.push(r)},pluginEvent:function(r,n,o){var a=this;this.eventCanceled=!1,o.cancel=function(){a.eventCanceled=!0};var l=r+"Global";zt.forEach(function(s){n[s.pluginName]&&(n[s.pluginName][l]&&n[s.pluginName][l](nt({sortable:n},o)),n.options[s.pluginName]&&n[s.pluginName][r]&&n[s.pluginName][r](nt({sortable:n},o)))})},initializePlugins:function(r,n,o,a){zt.forEach(function(i){var c=i.pluginName;if(!(!r.options[c]&&!i.initializeByDefault)){var d=new i(r,n,r.options);d.sortable=r,d.options=r.options,r[c]=d,ut(o,d.defaults)}});for(var l in r.options)if(r.options.hasOwnProperty(l)){var s=this.modifyOption(r,l,r.options[l]);typeof s<"u"&&(r.options[l]=s)}},getEventProperties:function(r,n){var o={};return zt.forEach(function(a){typeof a.eventProperties=="function"&&ut(o,a.eventProperties.call(n[a.pluginName],r))}),o},modifyOption:function(r,n,o){var a;return zt.forEach(function(l){r[l.pluginName]&&l.optionListeners&&typeof l.optionListeners[n]=="function"&&(a=l.optionListeners[n].call(r[l.pluginName],o))}),a}};function cf(e){var r=e.sortable,n=e.rootEl,o=e.name,a=e.targetEl,l=e.cloneEl,s=e.toEl,i=e.fromEl,c=e.oldIndex,d=e.newIndex,m=e.oldDraggableIndex,u=e.newDraggableIndex,p=e.originalEvent,f=e.putSortable,g=e.extraEventProperties;if(r=r||n&&n[He],!!r){var h,k=r.options,b="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!pt&&!gr?h=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(h=document.createEvent("Event"),h.initEvent(o,!0,!0)),h.to=s||n,h.from=i||n,h.item=a||n,h.clone=l,h.oldIndex=c,h.newIndex=d,h.oldDraggableIndex=m,h.newDraggableIndex=u,h.originalEvent=p,h.pullMode=f?f.lastPutMode:void 0;var x=nt(nt({},g),yr.getEventProperties(o,r));for(var w in x)h[w]=x[w];n&&n.dispatchEvent(h),k[b]&&k[b].call(r,h)}}var df=["evt"],Ue=function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.evt,l=Zp(o,df);yr.pluginEvent.bind(W)(r,n,nt({dragEl:I,parentEl:xe,ghostEl:K,rootEl:ye,nextEl:Dt,lastDownEl:zr,cloneEl:ke,cloneHidden:kt,dragStarted:xr,putSortable:Ie,activeSortable:W.active,originalEvent:a,oldIndex:Kt,oldDraggableIndex:_r,newIndex:Ge,newDraggableIndex:wt,hideGhostForTarget:Vl,unhideGhostForTarget:Dl,cloneNowHidden:function(){kt=!0},cloneNowShown:function(){kt=!1},dispatchSortableEvent:function(i){Fe({sortable:n,name:i,originalEvent:a})}},l))};function Fe(e){cf(nt({putSortable:Ie,cloneEl:ke,targetEl:I,rootEl:ye,oldIndex:Kt,oldDraggableIndex:_r,newIndex:Ge,newDraggableIndex:wt},e))}var I,xe,K,ye,Dt,zr,ke,kt,Kt,Ge,_r,wt,Kr,Ie,Xt=!1,Xr=!1,Qr=[],Tt,Je,oo,ao,wl,El,xr,Qt,kr,wr=!1,Zr=!1,Jr,Le,lo=[],so=!1,en=[],tn=typeof document<"u",rn=pl,vl=gr||pt?"cssFloat":"float",uf=tn&&!ef&&!pl&&"draggable"in document.createElement("div"),Nl=function(){if(tn){if(pt)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Cl=function(r,n){var o=G(r),a=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),l=Yt(r,0,n),s=Yt(r,1,n),i=l&&G(l),c=s&&G(s),d=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+Te(l).width,m=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+Te(s).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(l&&i.float&&i.float!=="none"){var u=i.float==="left"?"left":"right";return s&&(c.clear==="both"||c.clear===u)?"vertical":"horizontal"}return l&&(i.display==="block"||i.display==="flex"||i.display==="table"||i.display==="grid"||d>=a&&o[vl]==="none"||s&&o[vl]==="none"&&d+m>a)?"vertical":"horizontal"},mf=function(r,n,o){var a=o?r.left:r.top,l=o?r.right:r.bottom,s=o?r.width:r.height,i=o?n.left:n.top,c=o?n.right:n.bottom,d=o?n.width:n.height;return a===i||l===c||a+s/2===i+d/2},pf=function(r,n){var o;return Qr.some(function(a){var l=a[He].options.emptyInsertThreshold;if(!(!l||to(a))){var s=Te(a),i=r>=s.left-l&&r<=s.right+l,c=n>=s.top-l&&n<=s.bottom+l;if(i&&c)return o=a}}),o},Sl=function(r){function n(l,s){return function(i,c,d,m){var u=i.options.group.name&&c.options.group.name&&i.options.group.name===c.options.group.name;if(l==null&&(s||u))return!0;if(l==null||l===!1)return!1;if(s&&l==="clone")return l;if(typeof l=="function")return n(l(i,c,d,m),s)(i,c,d,m);var p=(s?i:c).options.group.name;return l===!0||typeof l=="string"&&l===p||l.join&&l.indexOf(p)>-1}}var o={},a=r.group;(!a||Wr(a)!="object")&&(a={name:a}),o.name=a.name,o.checkPull=n(a.pull,!0),o.checkPut=n(a.put),o.revertClone=a.revertClone,r.group=o},Vl=function(){!Nl&&K&&G(K,"display","none")},Dl=function(){!Nl&&K&&G(K,"display","")};tn&&document.addEventListener("click",function(e){if(Xr)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Xr=!1,!1},!0);var At=function(r){if(I){r=r.touches?r.touches[0]:r;var n=pf(r.clientX,r.clientY);if(n){var o={};for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);o.target=o.rootEl=n,o.preventDefault=void 0,o.stopPropagation=void 0,n[He]._onDragOver(o)}}},ff=function(r){I&&I.parentNode[He]._isOutsideThisEl(r.target)};function W(e,r){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=r=ut({},r),e[He]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Cl(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,i){s.setData("Text",i.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:W.supportPointer!==!1&&"PointerEvent"in window&&!hr,emptyInsertThreshold:5};yr.initializePlugins(this,e,n);for(var o in n)!(o in r)&&(r[o]=n[o]);Sl(r);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=r.forceFallback?!1:uf,this.nativeDraggable&&(this.options.touchStartThreshold=1),r.supportPointer?ce(e,"pointerdown",this._onTapStart):(ce(e,"mousedown",this._onTapStart),ce(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(ce(e,"dragover",this),ce(e,"dragenter",this)),Qr.push(this.el),r.store&&r.store.get&&this.sort(r.store.get(this)||[]),ut(this,af())}W.prototype={constructor:W,_isOutsideThisEl:function(r){!this.el.contains(r)&&r!==this.el&&(Qt=null)},_getDirection:function(r,n){return typeof this.options.direction=="function"?this.options.direction.call(this,r,n,I):this.options.direction},_onTapStart:function(r){if(r.cancelable){var n=this,o=this.el,a=this.options,l=a.preventOnFilter,s=r.type,i=r.touches&&r.touches[0]||r.pointerType&&r.pointerType==="touch"&&r,c=(i||r).target,d=r.target.shadowRoot&&(r.path&&r.path[0]||r.composedPath&&r.composedPath()[0])||c,m=a.filter;if(wf(o),!I&&!(/mousedown|pointerdown/.test(s)&&r.button!==0||a.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&hr&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=ot(c,a.draggable,o,!1),!(c&&c.animated)&&zr!==c)){if(Kt=Ke(c),_r=Ke(c,a.draggable),typeof m=="function"){if(m.call(this,r,c,this)){Fe({sortable:n,rootEl:d,name:"filter",targetEl:c,toEl:o,fromEl:o}),Ue("filter",n,{evt:r}),l&&r.cancelable&&r.preventDefault();return}}else if(m&&(m=m.split(",").some(function(u){if(u=ot(d,u.trim(),o,!1),u)return Fe({sortable:n,rootEl:u,name:"filter",targetEl:c,fromEl:o,toEl:o}),Ue("filter",n,{evt:r}),!0}),m)){l&&r.cancelable&&r.preventDefault();return}a.handle&&!ot(d,a.handle,o,!1)||this._prepareDragStart(r,i,c)}}},_prepareDragStart:function(r,n,o){var a=this,l=a.el,s=a.options,i=l.ownerDocument,c;if(o&&!I&&o.parentNode===l){var d=Te(o);if(ye=l,I=o,xe=I.parentNode,Dt=I.nextSibling,zr=o,Kr=s.group,W.dragged=I,Tt={target:I,clientX:(n||r).clientX,clientY:(n||r).clientY},wl=Tt.clientX-d.left,El=Tt.clientY-d.top,this._lastX=(n||r).clientX,this._lastY=(n||r).clientY,I.style["will-change"]="all",c=function(){if(Ue("delayEnded",a,{evt:r}),W.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!ml&&a.nativeDraggable&&(I.draggable=!0),a._triggerDragStart(r,n),Fe({sortable:a,name:"choose",originalEvent:r}),qe(I,s.chosenClass,!0)},s.ignore.split(",").forEach(function(m){hl(I,m.trim(),io)}),ce(i,"dragover",At),ce(i,"mousemove",At),ce(i,"touchmove",At),ce(i,"mouseup",a._onDrop),ce(i,"touchend",a._onDrop),ce(i,"touchcancel",a._onDrop),ml&&this.nativeDraggable&&(this.options.touchStartThreshold=4,I.draggable=!0),Ue("delayStart",this,{evt:r}),s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(gr||pt))){if(W.eventCanceled){this._onDrop();return}ce(i,"mouseup",a._disableDelayedDrag),ce(i,"touchend",a._disableDelayedDrag),ce(i,"touchcancel",a._disableDelayedDrag),ce(i,"mousemove",a._delayedDragTouchMoveHandler),ce(i,"touchmove",a._delayedDragTouchMoveHandler),s.supportPointer&&ce(i,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(c,s.delay)}else c()}},_delayedDragTouchMoveHandler:function(r){var n=r.touches?r.touches[0]:r;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){I&&io(I),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var r=this.el.ownerDocument;le(r,"mouseup",this._disableDelayedDrag),le(r,"touchend",this._disableDelayedDrag),le(r,"touchcancel",this._disableDelayedDrag),le(r,"mousemove",this._delayedDragTouchMoveHandler),le(r,"touchmove",this._delayedDragTouchMoveHandler),le(r,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(r,n){n=n||r.pointerType=="touch"&&r,!this.nativeDraggable||n?this.options.supportPointer?ce(document,"pointermove",this._onTouchMove):n?ce(document,"touchmove",this._onTouchMove):ce(document,"mousemove",this._onTouchMove):(ce(I,"dragend",this),ce(ye,"dragstart",this._onDragStart));try{document.selection?on(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(r,n){if(Xt=!1,ye&&I){Ue("dragStarted",this,{evt:n}),this.nativeDraggable&&ce(document,"dragover",ff);var o=this.options;!r&&qe(I,o.dragClass,!1),qe(I,o.ghostClass,!0),W.active=this,r&&this._appendGhost(),Fe({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Je){this._lastX=Je.clientX,this._lastY=Je.clientY,Vl();for(var r=document.elementFromPoint(Je.clientX,Je.clientY),n=r;r&&r.shadowRoot&&(r=r.shadowRoot.elementFromPoint(Je.clientX,Je.clientY),r!==n);)n=r;if(I.parentNode[He]._isOutsideThisEl(r),n)do{if(n[He]){var o=void 0;if(o=n[He]._onDragOver({clientX:Je.clientX,clientY:Je.clientY,target:r,rootEl:n}),o&&!this.options.dragoverBubble)break}r=n}while(n=n.parentNode);Dl()}},_onTouchMove:function(r){if(Tt){var n=this.options,o=n.fallbackTolerance,a=n.fallbackOffset,l=r.touches?r.touches[0]:r,s=K&&Wt(K,!0),i=K&&s&&s.a,c=K&&s&&s.d,d=rn&&Le&&yl(Le),m=(l.clientX-Tt.clientX+a.x)/(i||1)+(d?d[0]-lo[0]:0)/(i||1),u=(l.clientY-Tt.clientY+a.y)/(c||1)+(d?d[1]-lo[1]:0)/(c||1);if(!W.active&&!Xt){if(o&&Math.max(Math.abs(l.clientX-this._lastX),Math.abs(l.clientY-this._lastY))<o)return;this._onDragStart(r,!0)}if(K){s?(s.e+=m-(oo||0),s.f+=u-(ao||0)):s={a:1,b:0,c:0,d:1,e:m,f:u};var p="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");G(K,"webkitTransform",p),G(K,"mozTransform",p),G(K,"msTransform",p),G(K,"transform",p),oo=m,ao=u,Je=l}r.cancelable&&r.preventDefault()}},_appendGhost:function(){if(!K){var r=this.options.fallbackOnBody?document.body:ye,n=Te(I,!0,rn,!0,r),o=this.options;if(rn){for(Le=r;G(Le,"position")==="static"&&G(Le,"transform")==="none"&&Le!==document;)Le=Le.parentNode;Le!==document.body&&Le!==document.documentElement?(Le===document&&(Le=at()),n.top+=Le.scrollTop,n.left+=Le.scrollLeft):Le=at(),lo=yl(Le)}K=I.cloneNode(!0),qe(K,o.ghostClass,!1),qe(K,o.fallbackClass,!0),qe(K,o.dragClass,!0),G(K,"transition",""),G(K,"transform",""),G(K,"box-sizing","border-box"),G(K,"margin",0),G(K,"top",n.top),G(K,"left",n.left),G(K,"width",n.width),G(K,"height",n.height),G(K,"opacity","0.8"),G(K,"position",rn?"absolute":"fixed"),G(K,"zIndex","100000"),G(K,"pointerEvents","none"),W.ghost=K,r.appendChild(K),G(K,"transform-origin",wl/parseInt(K.style.width)*100+"% "+El/parseInt(K.style.height)*100+"%")}},_onDragStart:function(r,n){var o=this,a=r.dataTransfer,l=o.options;if(Ue("dragStart",this,{evt:r}),W.eventCanceled){this._onDrop();return}Ue("setupClone",this),W.eventCanceled||(ke=kl(I),ke.draggable=!1,ke.style["will-change"]="",this._hideClone(),qe(ke,this.options.chosenClass,!1),W.clone=ke),o.cloneId=on(function(){Ue("clone",o),!W.eventCanceled&&(o.options.removeCloneOnHide||ye.insertBefore(ke,I),o._hideClone(),Fe({sortable:o,name:"clone"}))}),!n&&qe(I,l.dragClass,!0),n?(Xr=!0,o._loopId=setInterval(o._emulateDragOver,50)):(le(document,"mouseup",o._onDrop),le(document,"touchend",o._onDrop),le(document,"touchcancel",o._onDrop),a&&(a.effectAllowed="move",l.setData&&l.setData.call(o,a,I)),ce(document,"drop",o),G(I,"transform","translateZ(0)")),Xt=!0,o._dragStartId=on(o._dragStarted.bind(o,n,r)),ce(document,"selectstart",o),xr=!0,hr&&G(document.body,"user-select","none")},_onDragOver:function(r){var n=this.el,o=r.target,a,l,s,i=this.options,c=i.group,d=W.active,m=Kr===c,u=i.sort,p=Ie||d,f,g=this,h=!1;if(so)return;function k(be,U){Ue(be,g,nt({evt:r,isOwner:m,axis:f?"vertical":"horizontal",revert:s,dragRect:a,targetRect:l,canSort:u,fromSortable:p,target:o,completed:x,onMove:function(O,se){return nn(ye,n,I,a,O,Te(O),r,se)},changed:w},U))}function b(){k("dragOverAnimationCapture"),g.captureAnimationState(),g!==p&&p.captureAnimationState()}function x(be){return k("dragOverCompleted",{insertion:be}),be&&(m?d._hideClone():d._showClone(g),g!==p&&(qe(I,Ie?Ie.options.ghostClass:d.options.ghostClass,!1),qe(I,i.ghostClass,!0)),Ie!==g&&g!==W.active?Ie=g:g===W.active&&Ie&&(Ie=null),p===g&&(g._ignoreWhileAnimating=o),g.animateAll(function(){k("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(o===I&&!I.animated||o===n&&!o.animated)&&(Qt=null),!i.dragoverBubble&&!r.rootEl&&o!==document&&(I.parentNode[He]._isOutsideThisEl(r.target),!be&&At(r)),!i.dragoverBubble&&r.stopPropagation&&r.stopPropagation(),h=!0}function w(){Ge=Ke(I),wt=Ke(I,i.draggable),Fe({sortable:g,name:"change",toEl:n,newIndex:Ge,newDraggableIndex:wt,originalEvent:r})}if(r.preventDefault!==void 0&&r.cancelable&&r.preventDefault(),o=ot(o,i.draggable,n,!0),k("dragOver"),W.eventCanceled)return h;if(I.contains(r.target)||o.animated&&o.animatingX&&o.animatingY||g._ignoreWhileAnimating===o)return x(!1);if(Xr=!1,d&&!i.disabled&&(m?u||(s=xe!==ye):Ie===this||(this.lastPutMode=Kr.checkPull(this,d,I,r))&&c.checkPut(this,d,I,r))){if(f=this._getDirection(r,o)==="vertical",a=Te(I),k("dragOverValid"),W.eventCanceled)return h;if(s)return xe=ye,b(),this._hideClone(),k("revert"),W.eventCanceled||(Dt?ye.insertBefore(I,Dt):ye.appendChild(I)),x(!0);var E=to(n,i.draggable);if(!E||yf(r,f,this)&&!E.animated){if(E===I)return x(!1);if(E&&n===r.target&&(o=E),o&&(l=Te(o)),nn(ye,n,I,a,o,l,r,!!o)!==!1)return b(),n.appendChild(I),xe=n,w(),x(!0)}else if(E&&bf(r,f,this)){var D=Yt(n,0,i,!0);if(D===I)return x(!1);if(o=D,l=Te(o),nn(ye,n,I,a,o,l,r,!1)!==!1)return b(),n.insertBefore(I,D),xe=n,w(),x(!0)}else if(o.parentNode===n){l=Te(o);var S=0,N,P=I.parentNode!==n,T=!mf(I.animated&&I.toRect||a,o.animated&&o.toRect||l,f),$=f?"top":"left",R=bl(o,"top","top")||bl(I,"top","top"),H=R?R.scrollTop:void 0;Qt!==o&&(N=l[$],wr=!1,Zr=!T&&i.invertSwap||P),S=_f(r,o,l,f,T?1:i.swapThreshold,i.invertedSwapThreshold==null?i.swapThreshold:i.invertedSwapThreshold,Zr,Qt===o);var re;if(S!==0){var ne=Ke(I);do ne-=S,re=xe.children[ne];while(re&&(G(re,"display")==="none"||re===K))}if(S===0||re===o)return x(!1);Qt=o,kr=S;var ee=o.nextElementSibling,ge=!1;ge=S===1;var te=nn(ye,n,I,a,o,l,r,ge);if(te!==!1)return(te===1||te===-1)&&(ge=te===1),so=!0,setTimeout(hf,30),b(),ge&&!ee?n.appendChild(I):o.parentNode.insertBefore(I,ge?ee:o),R&&xl(R,0,H-R.scrollTop),xe=I.parentNode,N!==void 0&&!Zr&&(Jr=Math.abs(N-Te(o)[$])),w(),x(!0)}if(n.contains(I))return x(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){le(document,"mousemove",this._onTouchMove),le(document,"touchmove",this._onTouchMove),le(document,"pointermove",this._onTouchMove),le(document,"dragover",At),le(document,"mousemove",At),le(document,"touchmove",At)},_offUpEvents:function(){var r=this.el.ownerDocument;le(r,"mouseup",this._onDrop),le(r,"touchend",this._onDrop),le(r,"pointerup",this._onDrop),le(r,"touchcancel",this._onDrop),le(document,"selectstart",this)},_onDrop:function(r){var n=this.el,o=this.options;if(Ge=Ke(I),wt=Ke(I,o.draggable),Ue("drop",this,{evt:r}),xe=I&&I.parentNode,Ge=Ke(I),wt=Ke(I,o.draggable),W.eventCanceled){this._nulling();return}Xt=!1,Zr=!1,wr=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),co(this.cloneId),co(this._dragStartId),this.nativeDraggable&&(le(document,"drop",this),le(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),hr&&G(document.body,"user-select",""),G(I,"transform",""),r&&(xr&&(r.cancelable&&r.preventDefault(),!o.dropBubble&&r.stopPropagation()),K&&K.parentNode&&K.parentNode.removeChild(K),(ye===xe||Ie&&Ie.lastPutMode!=="clone")&&ke&&ke.parentNode&&ke.parentNode.removeChild(ke),I&&(this.nativeDraggable&&le(I,"dragend",this),io(I),I.style["will-change"]="",xr&&!Xt&&qe(I,Ie?Ie.options.ghostClass:this.options.ghostClass,!1),qe(I,this.options.chosenClass,!1),Fe({sortable:this,name:"unchoose",toEl:xe,newIndex:null,newDraggableIndex:null,originalEvent:r}),ye!==xe?(Ge>=0&&(Fe({rootEl:xe,name:"add",toEl:xe,fromEl:ye,originalEvent:r}),Fe({sortable:this,name:"remove",toEl:xe,originalEvent:r}),Fe({rootEl:xe,name:"sort",toEl:xe,fromEl:ye,originalEvent:r}),Fe({sortable:this,name:"sort",toEl:xe,originalEvent:r})),Ie&&Ie.save()):Ge!==Kt&&Ge>=0&&(Fe({sortable:this,name:"update",toEl:xe,originalEvent:r}),Fe({sortable:this,name:"sort",toEl:xe,originalEvent:r})),W.active&&((Ge==null||Ge===-1)&&(Ge=Kt,wt=_r),Fe({sortable:this,name:"end",toEl:xe,originalEvent:r}),this.save()))),this._nulling()},_nulling:function(){Ue("nulling",this),ye=I=xe=K=Dt=ke=zr=kt=Tt=Je=xr=Ge=wt=Kt=_r=Qt=kr=Ie=Kr=W.dragged=W.ghost=W.clone=W.active=null,en.forEach(function(r){r.checked=!0}),en.length=oo=ao=0},handleEvent:function(r){switch(r.type){case"drop":case"dragend":this._onDrop(r);break;case"dragenter":case"dragover":I&&(this._onDragOver(r),gf(r));break;case"selectstart":r.preventDefault();break}},toArray:function(){for(var r=[],n,o=this.el.children,a=0,l=o.length,s=this.options;a<l;a++)n=o[a],ot(n,s.draggable,this.el,!1)&&r.push(n.getAttribute(s.dataIdAttr)||kf(n));return r},sort:function(r,n){var o={},a=this.el;this.toArray().forEach(function(l,s){var i=a.children[s];ot(i,this.options.draggable,a,!1)&&(o[l]=i)},this),n&&this.captureAnimationState(),r.forEach(function(l){o[l]&&(a.removeChild(o[l]),a.appendChild(o[l]))}),n&&this.animateAll()},save:function(){var r=this.options.store;r&&r.set&&r.set(this)},closest:function(r,n){return ot(r,n||this.options.draggable,this.el,!1)},option:function(r,n){var o=this.options;if(n===void 0)return o[r];var a=yr.modifyOption(this,r,n);typeof a<"u"?o[r]=a:o[r]=n,r==="group"&&Sl(o)},destroy:function(){Ue("destroy",this);var r=this.el;r[He]=null,le(r,"mousedown",this._onTapStart),le(r,"touchstart",this._onTapStart),le(r,"pointerdown",this._onTapStart),this.nativeDraggable&&(le(r,"dragover",this),le(r,"dragenter",this)),Array.prototype.forEach.call(r.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Qr.splice(Qr.indexOf(this.el),1),this.el=r=null},_hideClone:function(){if(!kt){if(Ue("hideClone",this),W.eventCanceled)return;G(ke,"display","none"),this.options.removeCloneOnHide&&ke.parentNode&&ke.parentNode.removeChild(ke),kt=!0}},_showClone:function(r){if(r.lastPutMode!=="clone"){this._hideClone();return}if(kt){if(Ue("showClone",this),W.eventCanceled)return;I.parentNode==ye&&!this.options.group.revertClone?ye.insertBefore(ke,I):Dt?ye.insertBefore(ke,Dt):ye.appendChild(ke),this.options.group.revertClone&&this.animate(I,ke),G(ke,"display",""),kt=!1}}};function gf(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function nn(e,r,n,o,a,l,s,i){var c,d=e[He],m=d.options.onMove,u;return window.CustomEvent&&!pt&&!gr?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=r,c.from=e,c.dragged=n,c.draggedRect=o,c.related=a||r,c.relatedRect=l||Te(r),c.willInsertAfter=i,c.originalEvent=s,e.dispatchEvent(c),m&&(u=m.call(d,c,s)),u}function io(e){e.draggable=!1}function hf(){so=!1}function bf(e,r,n){var o=Te(Yt(n.el,0,n.options,!0)),a=10;return r?e.clientX<o.left-a||e.clientY<o.top&&e.clientX<o.right:e.clientY<o.top-a||e.clientY<o.bottom&&e.clientX<o.left}function yf(e,r,n){var o=Te(to(n.el,n.options.draggable)),a=10;return r?e.clientX>o.right+a||e.clientX<=o.right&&e.clientY>o.bottom&&e.clientX>=o.left:e.clientX>o.right&&e.clientY>o.top||e.clientX<=o.right&&e.clientY>o.bottom+a}function _f(e,r,n,o,a,l,s,i){var c=o?e.clientY:e.clientX,d=o?n.height:n.width,m=o?n.top:n.left,u=o?n.bottom:n.right,p=!1;if(!s){if(i&&Jr<d*a){if(!wr&&(kr===1?c>m+d*l/2:c<u-d*l/2)&&(wr=!0),wr)p=!0;else if(kr===1?c<m+Jr:c>u-Jr)return-kr}else if(c>m+d*(1-a)/2&&c<u-d*(1-a)/2)return xf(r)}return p=p||s,p&&(c<m+d*l/2||c>u-d*l/2)?c>m+d/2?1:-1:0}function xf(e){return Ke(I)<Ke(e)?1:-1}function kf(e){for(var r=e.tagName+e.className+e.src+e.href+e.textContent,n=r.length,o=0;n--;)o+=r.charCodeAt(n);return o.toString(36)}function wf(e){en.length=0;for(var r=e.getElementsByTagName("input"),n=r.length;n--;){var o=r[n];o.checked&&en.push(o)}}function on(e){return setTimeout(e,0)}function co(e){return clearTimeout(e)}tn&&ce(document,"touchmove",function(e){(W.active||Xt)&&e.cancelable&&e.preventDefault()}),W.utils={on:ce,off:le,css:G,find:hl,is:function(r,n){return!!ot(r,n,r,!1)},extend:nf,throttle:_l,closest:ot,toggleClass:qe,clone:kl,index:Ke,nextTick:on,cancelNextTick:co,detectDirection:Cl,getChild:Yt},W.get=function(e){return e[He]},W.mount=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];r[0].constructor===Array&&(r=r[0]),r.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(W.utils=nt(nt({},W.utils),o.utils)),yr.mount(o)})},W.create=function(e,r){return new W(e,r)},W.version=Jp;var Ve=[],Er,uo,mo=!1,po,fo,an,vr;function Ef(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this))}return e.prototype={dragStarted:function(n){var o=n.originalEvent;this.sortable.nativeDraggable?ce(document,"dragover",this._handleAutoScroll):this.options.supportPointer?ce(document,"pointermove",this._handleFallbackAutoScroll):o.touches?ce(document,"touchmove",this._handleFallbackAutoScroll):ce(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var o=n.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?le(document,"dragover",this._handleAutoScroll):(le(document,"pointermove",this._handleFallbackAutoScroll),le(document,"touchmove",this._handleFallbackAutoScroll),le(document,"mousemove",this._handleFallbackAutoScroll)),Tl(),ln(),of()},nulling:function(){an=uo=Er=mo=vr=po=fo=null,Ve.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,o){var a=this,l=(n.touches?n.touches[0]:n).clientX,s=(n.touches?n.touches[0]:n).clientY,i=document.elementFromPoint(l,s);if(an=n,o||this.options.forceAutoScrollFallback||gr||pt||hr){go(n,this.options,i,o);var c=xt(i,!0);mo&&(!vr||l!==po||s!==fo)&&(vr&&Tl(),vr=setInterval(function(){var d=xt(document.elementFromPoint(l,s),!0);d!==c&&(c=d,ln()),go(n,a.options,d,o)},10),po=l,fo=s)}else{if(!this.options.bubbleScroll||xt(i,!0)===at()){ln();return}go(n,this.options,xt(i,!1),!1)}}},ut(e,{pluginName:"scroll",initializeByDefault:!0})}function ln(){Ve.forEach(function(e){clearInterval(e.pid)}),Ve=[]}function Tl(){clearInterval(vr)}var go=_l(function(e,r,n,o){if(r.scroll){var a=(e.touches?e.touches[0]:e).clientX,l=(e.touches?e.touches[0]:e).clientY,s=r.scrollSensitivity,i=r.scrollSpeed,c=at(),d=!1,m;uo!==n&&(uo=n,ln(),Er=r.scroll,m=r.scrollFn,Er===!0&&(Er=xt(n,!0)));var u=0,p=Er;do{var f=p,g=Te(f),h=g.top,k=g.bottom,b=g.left,x=g.right,w=g.width,E=g.height,D=void 0,S=void 0,N=f.scrollWidth,P=f.scrollHeight,T=G(f),$=f.scrollLeft,R=f.scrollTop;f===c?(D=w<N&&(T.overflowX==="auto"||T.overflowX==="scroll"||T.overflowX==="visible"),S=E<P&&(T.overflowY==="auto"||T.overflowY==="scroll"||T.overflowY==="visible")):(D=w<N&&(T.overflowX==="auto"||T.overflowX==="scroll"),S=E<P&&(T.overflowY==="auto"||T.overflowY==="scroll"));var H=D&&(Math.abs(x-a)<=s&&$+w<N)-(Math.abs(b-a)<=s&&!!$),re=S&&(Math.abs(k-l)<=s&&R+E<P)-(Math.abs(h-l)<=s&&!!R);if(!Ve[u])for(var ne=0;ne<=u;ne++)Ve[ne]||(Ve[ne]={});(Ve[u].vx!=H||Ve[u].vy!=re||Ve[u].el!==f)&&(Ve[u].el=f,Ve[u].vx=H,Ve[u].vy=re,clearInterval(Ve[u].pid),(H!=0||re!=0)&&(d=!0,Ve[u].pid=setInterval((function(){o&&this.layer===0&&W.active._onTouchMove(an);var ee=Ve[this.layer].vy?Ve[this.layer].vy*i:0,ge=Ve[this.layer].vx?Ve[this.layer].vx*i:0;typeof m=="function"&&m.call(W.dragged.parentNode[He],ge,ee,e,an,Ve[this.layer].el)!=="continue"||xl(Ve[this.layer].el,ge,ee)}).bind({layer:u}),24))),u++}while(r.bubbleScroll&&p!==c&&(p=xt(p,!1)));mo=d}},30),Al=function(r){var n=r.originalEvent,o=r.putSortable,a=r.dragEl,l=r.activeSortable,s=r.dispatchSortableEvent,i=r.hideGhostForTarget,c=r.unhideGhostForTarget;if(n){var d=o||l;i();var m=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,u=document.elementFromPoint(m.clientX,m.clientY);c(),d&&!d.el.contains(u)&&(s("spill"),this.onSpill({dragEl:a,putSortable:o}))}};function ho(){}ho.prototype={startIndex:null,dragStart:function(r){var n=r.oldDraggableIndex;this.startIndex=n},onSpill:function(r){var n=r.dragEl,o=r.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var a=Yt(this.sortable.el,this.startIndex,this.options);a?this.sortable.el.insertBefore(n,a):this.sortable.el.appendChild(n),this.sortable.animateAll(),o&&o.animateAll()},drop:Al},ut(ho,{pluginName:"revertOnSpill"});function bo(){}bo.prototype={onSpill:function(r){var n=r.dragEl,o=r.putSortable,a=o||this.sortable;a.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),a.animateAll()},drop:Al},ut(bo,{pluginName:"removeOnSpill"}),W.mount(new Ef),W.mount(bo,ho);function yo(e){e.parentElement!==null&&e.parentElement.removeChild(e)}function Il(e,r,n){const o=n===0?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(r,o)}function vf(){return typeof window<"u"?window.console:global.console}const Nf=vf();function Cf(e){const r=Object.create(null);return function(o){return r[o]||(r[o]=e(o))}}const Sf=/-(\w)/g,Vf=Cf(e=>e.replace(Sf,(r,n)=>n.toUpperCase())),$l=["Start","Add","Remove","Update","End"],Ll=["Choose","Unchoose","Sort","Filter","Clone"],Ml=["Move"],Df=[Ml,$l,Ll].flatMap(e=>e).map(e=>`on${e}`),_o={manage:Ml,manageAndEmit:$l,emit:Ll};function Tf(e){return Df.indexOf(e)!==-1}const Af=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function If(e){return Af.includes(e)}function $f(e){return["transition-group","TransitionGroup"].includes(e)}function Ol(e){return["id","class","role","style"].includes(e)||e.startsWith("data-")||e.startsWith("aria-")||e.startsWith("on")}function Bl(e){return e.reduce((r,[n,o])=>(r[n]=o,r),{})}function Lf({$attrs:e,componentData:r={}}){return{...Bl(Object.entries(e).filter(([o,a])=>Ol(o))),...r}}function Mf({$attrs:e,callBackBuilder:r}){const n=Bl(Fl(e));Object.entries(r).forEach(([a,l])=>{_o[a].forEach(s=>{n[`on${s}`]=l(s)})});const o=`[data-draggable]${n.draggable||""}`;return{...n,draggable:o}}function Fl(e){return Object.entries(e).filter(([r,n])=>!Ol(r)).map(([r,n])=>[Vf(r),n]).filter(([r,n])=>!Tf(r))}const Pl=({el:e})=>e,Of=(e,r)=>e.__draggable_context=r,Rl=e=>e.__draggable_context;class Bf{constructor({nodes:{header:r,default:n,footer:o},root:a,realList:l}){this.defaultNodes=n,this.children=[...r,...n,...o],this.externalComponent=a.externalComponent,this.rootTransition=a.transition,this.tag=a.tag,this.realList=l}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(r,n){const{tag:o,children:a,_isRootComponent:l}=this;return r(o,n,l?{default:()=>a}:a)}updated(){const{defaultNodes:r,realList:n}=this;r.forEach((o,a)=>{Of(Pl(o),{element:n[a],index:a})})}getUnderlyingVm(r){return Rl(r)}getVmIndexFromDomIndex(r,n){const{defaultNodes:o}=this,{length:a}=o,l=n.children,s=l.item(r);if(s===null)return a;const i=Rl(s);if(i)return i.index;if(a===0)return 0;const c=Pl(o[0]),d=[...l].findIndex(m=>m===c);return r<d?0:a}}function Ff(e,r){const n=e[r];return n?n():[]}function Pf({$slots:e,realList:r,getKey:n}){const o=r||[],[a,l]=["header","footer"].map(c=>Ff(e,c)),{item:s}=e;if(!s)throw new Error("draggable element must have an item slot");const i=o.flatMap((c,d)=>s({element:c,index:d}).map(m=>(m.key=n(c),m.props={...m.props||{},"data-draggable":!0},m)));if(i.length!==o.length)throw new Error("Item slot must have only one child");return{header:a,footer:l,default:i}}function Rf(e){const r=$f(e),n=!If(e)&&!r;return{transition:r,externalComponent:n,tag:n?t.resolveComponent(e):r?t.TransitionGroup:e}}function Uf({$slots:e,tag:r,realList:n,getKey:o}){const a=Pf({$slots:e,realList:n,getKey:o}),l=Rf(r);return new Bf({nodes:a,root:l,realList:n})}function Ul(e,r){t.nextTick(()=>this.$emit(e.toLowerCase(),r))}function jl(e){return(r,n)=>{if(this.realList!==null)return this[`onDrag${e}`](r,n)}}function jf(e){const r=jl.call(this,e);return(n,o)=>{r.call(this,n,o),Ul.call(this,e,n)}}let xo=null;const qf={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},Hf=["update:modelValue","change",...[..._o.manageAndEmit,..._o.emit].map(e=>e.toLowerCase())],ko=t.defineComponent({name:"draggable",inheritAttrs:!1,props:qf,emits:Hf,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:e,$attrs:r,tag:n,componentData:o,realList:a,getKey:l}=this,s=Uf({$slots:e,tag:n,realList:a,getKey:l});this.componentStructure=s;const i=Lf({$attrs:r,componentData:o});return s.render(t.h,i)}catch(e){return this.error=!0,t.h("pre",{style:{color:"red"}},e.stack)}},created(){this.list!==null&&this.modelValue!==null&&Nf.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:e,$el:r,componentStructure:n}=this;n.updated();const o=Mf({$attrs:e,callBackBuilder:{manageAndEmit:l=>jf.call(this,l),emit:l=>Ul.bind(this,l),manage:l=>jl.call(this,l)}}),a=r.nodeType===1?r:r.parentElement;this._sortable=new W(a,o),this.targetDomElement=a,a.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList(){const{list:e}=this;return e||this.modelValue},getKey(){const{itemKey:e}=this;return typeof e=="function"?e:r=>r[e]}},watch:{$attrs:{handler(e){const{_sortable:r}=this;r&&Fl(e).forEach(([n,o])=>{r.option(n,o)})},deep:!0}},methods:{getUnderlyingVm(e){return this.componentStructure.getUnderlyingVm(e)||null},getUnderlyingPotencialDraggableComponent(e){return e.__draggable_component__},emitChanges(e){t.nextTick(()=>this.$emit("change",e))},alterList(e){if(this.list){e(this.list);return}const r=[...this.modelValue];e(r),this.$emit("update:modelValue",r)},spliceList(){const e=r=>r.splice(...arguments);this.alterList(e)},updatePosition(e,r){const n=o=>o.splice(r,0,o.splice(e,1)[0]);this.alterList(n)},getRelatedContextFromMoveEvent({to:e,related:r}){const n=this.getUnderlyingPotencialDraggableComponent(e);if(!n)return{component:n};const o=n.realList,a={list:o,component:n};return e!==r&&o?{...n.getUnderlyingVm(r)||{},...a}:a},getVmIndexFromDomIndex(e){return this.componentStructure.getVmIndexFromDomIndex(e,this.targetDomElement)},onDragStart(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),xo=e.item},onDragAdd(e){const r=e.item._underlying_vm_;if(r===void 0)return;yo(e.item);const n=this.getVmIndexFromDomIndex(e.newIndex);this.spliceList(n,0,r);const o={element:r,newIndex:n};this.emitChanges({added:o})},onDragRemove(e){if(Il(this.$el,e.item,e.oldIndex),e.pullMode==="clone"){yo(e.clone);return}const{index:r,element:n}=this.context;this.spliceList(r,1);const o={element:n,oldIndex:r};this.emitChanges({removed:o})},onDragUpdate(e){yo(e.item),Il(e.from,e.item,e.oldIndex);const r=this.context.index,n=this.getVmIndexFromDomIndex(e.newIndex);this.updatePosition(r,n);const o={element:this.context.element,oldIndex:r,newIndex:n};this.emitChanges({moved:o})},computeFutureIndex(e,r){if(!e.element)return 0;const n=[...r.to.children].filter(s=>s.style.display!=="none"),o=n.indexOf(r.related),a=e.component.getVmIndexFromDomIndex(o);return n.indexOf(xo)!==-1||!r.willInsertAfter?a:a+1},onDragMove(e,r){const{move:n,realList:o}=this;if(!n||!o)return!0;const a=this.getRelatedContextFromMoveEvent(e),l=this.computeFutureIndex(a,e),s={...this.context,futureIndex:l},i={...e,relatedContext:a,draggedContext:s};return n(i,r)},onDragEnd(){xo=null}}}),Gf={class:"flex items-center justify-between mb-6"},Wf={class:"text-xl font-semibold text-gray-900"},Yf={class:"mt-1 text-sm text-gray-600"},zf={class:"flex items-center gap-2"},Kf={class:"overflow-hidden bg-white border border-gray-200 shadow-sm rounded-xl"},Xf={class:"grid grid-cols-12 gap-4 px-6 py-4 border-b border-gray-200 bg-gray-50"},Qf={class:"col-span-5 font-medium text-gray-700"},Zf={class:"col-span-3 font-medium text-gray-700"},Jf={class:"col-span-2 font-medium text-gray-700"},eg={class:"col-span-2 font-medium text-right text-gray-700"},tg={class:"divide-y divide-gray-100"},rg={class:"grid items-center grid-cols-12 gap-4 px-6 py-4 transition-colors hover:bg-gray-50/50"},ng={class:"flex items-center col-span-5 gap-3"},og={class:"font-medium text-gray-900"},ag={class:"text-xs text-gray-500"},lg={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-blue-700 rounded-full bg-blue-50 ring-1 ring-inset ring-blue-700/10"},sg={class:"col-span-3"},ig={class:"inline-flex items-center px-2 py-1 text-sm font-medium text-gray-600 rounded-md bg-gray-50 ring-1 ring-inset ring-gray-500/10"},cg={class:"col-span-1"},dg={key:0,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-circle-check w-4 h-4 text-emerald-600"},ug={key:1,class:"grid items-center grid-cols-12 gap-4 px-6 py-4 transition-colors hover:bg-gray-50/50"},mg={class:"col-span-5"},pg={class:"text-gray-500"},fg={__name:"vs-builder-datatable",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const r=t.useModel(e,"modelValue"),n=a=>a==="array"?"purple":a==="boolean"||a==="date"?"red":a==="datetime"?"purple":a==="number"?"green":a==="text"?"blue":a==="file"||a==="select"?"yellow":a==="slug"?"green":a==="image"?"blue":"gray",o=a=>{switch(a){case"text":return Lr;case"number":return Ro;case"integer":return Ro;case"date":return Ir;case"datetime":return Rs;case"file":return Ft;case"select":return jo;case"multiselect":return $r;case"mediaselect":return lr;case"radio":return Oo;case"boolean":return Oo;case"datalist":return jo;case"image":return lr;case"slug":return Uo;case"richtext":return Lr;case"markdown":return Lr;case"reference":return Hs;case"relation":return Uo;case"FileList":return Ft;default:return Lr}};return(a,l)=>{var s,i;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Gf,[t.createElementVNode("div",null,[t.createElementVNode("h2",Wf,t.toDisplayString(a.$t("cms.builder.collectionStructure")),1),t.createElementVNode("p",Yf,t.toDisplayString(a.$t("cms.builder.defineFields")),1)]),t.createElementVNode("div",zf,[t.createVNode(Gp,{modelValue:r.value.columns,"onUpdate:modelValue":l[0]||(l[0]=c=>r.value.columns=c)},null,8,["modelValue"])])]),t.createElementVNode("div",Kf,[t.createElementVNode("div",Xf,[t.createElementVNode("div",Qf,t.toDisplayString(a.$t("cms.builder.name")),1),t.createElementVNode("div",Zf,t.toDisplayString(a.$t("cms.builder.type")),1),t.createElementVNode("div",Jf,t.toDisplayString(a.$t("cms.builder.localization")),1),t.createElementVNode("div",eg,t.toDisplayString(a.$t("cms.builder.actions")),1)]),t.createElementVNode("div",tg,[(i=(s=r.value)==null?void 0:s.columns)!=null&&i.length?(t.openBlock(),t.createBlock(t.unref(ko),{key:0,modelValue:r.value.columns,"onUpdate:modelValue":l[2]||(l[2]=c=>r.value.columns=c),"item-key":"name",handle:".drag-handle",animation:200},{item:t.withCtx(({element:c,index:d})=>{var m,u;return[t.createElementVNode("div",rg,[t.createElementVNode("div",ng,[l[3]||(l[3]=t.createElementVNode("span",{class:"drag-handle cursor-move mr-2 text-gray-400"},"☰",-1)),t.createElementVNode("div",{class:t.normalizeClass(["flex items-center justify-center p-1 rounded",`bg-${n((m=c.type)==null?void 0:m.toLowerCase())}-100`])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o((u=c.type)==null?void 0:u.toLowerCase())),{class:"w-4 h-4"}))],2),t.createElementVNode("div",null,[t.createElementVNode("p",og,t.toDisplayString(c.label),1),t.createElementVNode("p",ag,t.toDisplayString(c.name),1)]),c.required?(t.openBlock(),t.createElementBlock("span",lg,t.toDisplayString(a.$t("cms.builder.required")),1)):t.createCommentVNode("",!0)]),t.createElementVNode("div",sg,[t.createElementVNode("span",ig,t.toDisplayString(c.type),1)]),t.createElementVNode("div",cg,[c.localization?(t.openBlock(),t.createElementBlock("svg",dg,[...l[4]||(l[4]=[t.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),t.createElementVNode("path",{d:"m9 12 2 2 4-4"},null,-1)])])):t.createCommentVNode("",!0)]),t.createVNode(Kp,{columns:r.value.columns,"onUpdate:columns":l[1]||(l[1]=p=>r.value.columns=p),data:r.value.columns[d],index:d},null,8,["columns","data","index"])])]}),_:1},8,["modelValue"])):(t.openBlock(),t.createElementBlock("div",ug,[t.createElementVNode("div",mg,[t.createElementVNode("p",pg,t.toDisplayString(a.$t("cms.builder.noColumnsFound")),1)])]))])])],64)}}},gg={__name:"vs-builder-edit",props:{data:{},dataModifiers:{},form:{},formModifiers:{}},emits:["update:data","update:form"],setup(e){const{t:r}=ue(),n=t.useModel(e,"data"),o=t.useModel(e,"form");t.ref({});const a=t.computed(()=>({name:{type:"text",label:r("cms.builder.scheme.name.label"),required:!0,placeholder:r("cms.builder.scheme.name.placeholder"),validators:["required"],col:4},title:{type:"text",label:r("cms.builder.scheme.title.label"),required:!0,placeholder:r("cms.builder.scheme.title.placeholder"),validators:["required"],col:4},preview_path:{type:"text",label:r("cms.builder.scheme.preview_path.label"),placeholder:r("cms.builder.scheme.preview_path.placeholder"),col:4,info:r("cms.builder.scheme.preview_path.info")},type:{type:"select",label:r("cms.builder.scheme.type.label"),required:!0,placeholder:r("cms.builder.scheme.type.placeholder"),validators:["required"],col:4,options:[{text:r("cms.builder.scheme.type.options.collection"),id:"collection"},{text:r("cms.builder.scheme.type.options.single"),id:"single"}]},status:{type:"select",label:r("cms.builder.scheme.status.label"),required:!0,placeholder:r("cms.builder.scheme.status.placeholder"),col:4,options:[{text:r("cms.builder.scheme.status.options.published"),id:"published"},{text:r("cms.builder.scheme.status.options.draft"),id:"draft"},{text:r("cms.builder.scheme.status.options.archived"),id:"archived"}]},include_search:{type:"switcher",label:r("cms.builder.scheme.include_search.label"),placeholder:r("cms.builder.scheme.include_search.placeholder"),col:4},description:{type:"textarea",label:r("cms.builder.scheme.description.label"),required:!0,placeholder:r("cms.builder.scheme.description.placeholder")}}));return t.onBeforeUnmount(()=>{o.value=null}),(l,s)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(t.unref(z),{modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=i=>n.value=i),schema:a.value,form:o.value,"onUpdate:form":s[1]||(s[1]=i=>o.value=i)},null,8,["modelValue","schema","form"]),t.createVNode(fg,{modelValue:n.value,"onUpdate:modelValue":s[2]||(s[2]=i=>n.value=i)},null,8,["modelValue"])]))}},wo=e=>{var o,a;const r=(o=e==null?void 0:e.type)==null?void 0:o.toLowerCase(),n=e!=null&&e.required?["required"]:null;return r==="array"?{key:e.name,label:e.label||e.title,type:"multi-text",help:e==null?void 0:e.help,colModel:{type:(e==null?void 0:e.subtype)||"text",placeholder:e==null?void 0:e.placeholder},validators:n}:r==="boolean"?{key:e.name,label:e.label||e.title,type:"Switcher",help:e==null?void 0:e.help,validators:n}:r==="tags"?{key:e.name,label:e.label||e.title,type:"tags",help:e==null?void 0:e.help,validators:n}:r==="radio"?{key:e.name,label:e.label||e.title,type:"radio",help:e==null?void 0:e.help,options:e.options||[],validators:n}:r==="date"?{key:e.name,label:e.label||e.title,type:"Date",time:!1,help:e==null?void 0:e.help,validators:n}:r==="datetime"?{key:e.name,label:e.label||e.title,type:"Date",help:e==null?void 0:e.help,mode:"datetime",time:!0,validators:n}:r==="number"?{key:e.name,label:e.label||e.title,help:e==null?void 0:e.help,type:"Number",validators:n}:r==="integer"?{key:e.name,label:e.label||e.title,type:"Integer",help:e==null?void 0:e.help,validators:n}:r==="text"?{key:e.name,label:e.label||e.title,type:"Text",help:e==null?void 0:e.help,validators:n}:r==="file"?{key:e.name,label:e.label||e.title,type:"File",multiple:e.multi||e.multiple,help:e==null?void 0:e.help,validators:n,api:"/api/cms-media/upload?subdir=",dir:"uploads/"+new Date().toLocaleDateString("en-US").replace(/\//g,"-")}:r==="filelist"?{key:e.name,label:e.label||e.title,type:"file",multiple:!0,help:e==null?void 0:e.help,validators:n}:r==="slug"?{key:e.name,label:e.label||e.title,type:"Slug",parent:e.parent||"",help:e==null?void 0:e.help,validators:n}:r==="image"?{key:e.name,label:e.label||e.title,type:"File",multi:e.multiple,help:e==null?void 0:e.help,validators:n,api:"/api/cms-media/upload?subdir=",dir:"uploads/"+new Date().toLocaleDateString("en-US").replace(/\//g,"-")}:r==="select"?e.options?{key:e.name,label:e.label||e.title,type:"select",options:e.options||[],help:e==null?void 0:e.help,validators:n}:{key:e.name,label:e.label||e.title,type:"select",data:e.data||[],help:e==null?void 0:e.help,validators:n}:r==="multiselect"?{key:e.name,label:e.label||e.title,type:"select",data:e.data||[],parent:e.parent||"",options:e.options||[],help:e==null?void 0:e.help,validators:n,multiple:!0}:r==="richtext"?{key:e.name,label:e.label||e.title,type:"Texteditor",help:e==null?void 0:e.help,validators:n}:r==="datalist"?{key:e.name,label:e.label||e.title,type:"Custom-Datatable",colModel:((a=e.colModel)==null?void 0:a.map(l=>wo(l)))||[],help:e==null?void 0:e.help,validators:n}:r==="reference"?{key:e.name,label:e.label||e.title,type:"reference",reference_type:e.reference_type,help:e==null?void 0:e.help,validators:n}:r==="reference-list"?{key:e.name,label:e.label||e.title,type:"reference",reference_type:e.reference_type,help:e==null?void 0:e.help,validators:n}:r==="relation"?(console.log(e),{key:e.name,label:e.label||e.title,type:"relation-link",help:e==null?void 0:e.help,relation:e.relation,validators:n}):r==="markdown"?{key:e.name,label:e.label||e.title,type:"richtext-md",help:e==null?void 0:e.help,validators:n}:r==="mediaselect"?{key:e.name,label:e.label||e.title,type:"mediaselect",help:e==null?void 0:e.help,validators:n}:{key:e.name,label:e.label||e.title,placeholder:e.placeholder,help:e==null?void 0:e.help,type:"Text",validators:n}},hg={class:"flex items-center justify-end gap-2"},bg={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},yg={__name:"vs-form-custom-datatable-controls",props:t.mergeModels({item:{type:Object,required:!0},colModel:{type:Array,required:!0}},{modelValue:{type:Array,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{t:r}=ue(),n=e,o=t.useModel(e,"modelValue"),a=t.ref(!1),l=t.ref({}),s=t.ref({}),i=()=>{Z.confirm({title:r("cms.builder.deleteTitle"),message:r("cms.builder.deleteField"),type:"error",onConfirm:()=>{c()}})},c=()=>{o.value=o.value.filter(m=>m.id!==n.item.id)},d=async()=>{if(await s.value.validate()){Z.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.builder.editFieldFailed")});return}o.value=o.value.map(u=>u.id===n.item.id?l.value:u),a.value=!1};return t.watch(a,m=>{m&&(l.value=n.item)}),(m,u)=>(t.openBlock(),t.createElementBlock("div",hg,[t.createElementVNode("button",{class:"inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-8 w-8 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-blue-50 dark:hover:bg-slate-600 hover:border-blue-300 dark:hover:border-slate-500 hover:text-blue-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm",onClick:u[0]||(u[0]=p=>a.value=!0)},[t.createVNode(t.unref(yn),{class:"w-4 h-4"})]),t.createElementVNode("button",{onClick:i,class:"inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-8 w-8 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-red-50 dark:hover:bg-slate-600 hover:border-red-300 dark:hover:border-slate-500 hover:text-red-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"},[t.createVNode(t.unref(st),{class:"w-4 h-4"})]),t.createVNode(t.unref(Z.VsModal),{teleport:"#modal",title:m.$t("cms.builder.editField"),visible:a.value,onClose:u[4]||(u[4]=p=>a.value=!1)},{footer:t.withCtx(()=>[t.createElementVNode("div",bg,[t.createElementVNode("button",{class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:u[3]||(u[3]=p=>a.value=!1)},t.toDisplayString(m.$t("cms.common.actions.cancel")),1),t.createElementVNode("button",{onClick:d,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},t.toDisplayString(m.$t("cms.common.actions.save")),1)])]),default:t.withCtx(()=>[t.createVNode(t.unref(z),{form:s.value,"onUpdate:form":u[1]||(u[1]=p=>s.value=p),schema:e.colModel,modelValue:l.value,"onUpdate:modelValue":u[2]||(u[2]=p=>l.value=p)},null,8,["form","schema","modelValue"])]),_:1},8,["title","visible"])]))}},_g={class:"p-6 border-t border-slate-200 dark:border-slate-700 bg-slate-50/30 dark:bg-slate-700/30"},xg={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},kg={__name:"vs-form-custom-datatable-add",props:t.mergeModels({colModel:{type:Array,required:!0}},{modelValue:{type:Array,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{t:r}=ue(),n=t.useModel(e,"modelValue"),o=t.ref(!1),a=t.ref({}),l=t.ref({}),s=async()=>{try{if(await l.value.validate()){Z.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.builder.editFieldFailed")});return}n.value=[...n.value||[],{...a.value,id:Math.random().toString(36).substring(2,15)}],o.value=!1,a.value={}}catch(i){console.log(i)}};return(i,c)=>(t.openBlock(),t.createElementBlock("div",_g,[t.createElementVNode("button",{class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 shadow-sm h-9 px-4 w-full border-2 border-dashed border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-slate-50 dark:hover:bg-slate-600 hover:border-blue-400 dark:hover:border-blue-500 text-slate-600 dark:text-slate-300 hover:text-blue-600 dark:hover:text-blue-400 py-3 transition-all duration-200",onClick:c[0]||(c[0]=d=>o.value=!0)},[t.createVNode(t.unref(lt),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(i.$t("cms.common.actions.add")),1)]),t.createVNode(t.unref(Z.VsModal),{teleport:"#modal",title:i.$t("cms.common.actions.add"),visible:o.value,onClose:c[4]||(c[4]=d=>o.value=!1)},{footer:t.withCtx(()=>[t.createElementVNode("div",xg,[t.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:c[3]||(c[3]=d=>o.value=!1)},t.toDisplayString(i.$t("cms.common.actions.cancel")),1),t.createElementVNode("button",{onClick:s,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},t.toDisplayString(i.$t("cms.common.actions.save")),1)])]),default:t.withCtx(()=>[t.createVNode(t.unref(z),{form:l.value,"onUpdate:form":c[1]||(c[1]=d=>l.value=d),schema:e.colModel,modelValue:a.value,"onUpdate:modelValue":c[2]||(c[2]=d=>a.value=d)},null,8,["form","schema","modelValue"])]),_:1},8,["title","visible"])]))}},wg={class:"p-0 shadow w-full"},Eg={class:"overflow-x-auto"},vg={class:"relative w-full overflow-auto"},Ng={class:"w-full caption-bottom text-sm"},Cg={class:"[&_tr]:border-b"},Sg={class:"border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors"},Vg={class:"h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-end"},Dg={class:"[&_tr:last-child]:border-0"},Tg=["onDragstart","onDragover","onDrop","onDragenter"],Ag={class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center"},Ig={class:"flex items-center justify-center text-slate-400"},$g=["innerHTML"],Lg={key:1,class:"flex items-center gap-2"},Mg={key:0,class:"flex items-center gap-1"},Og=["src","alt"],Bg={key:0,class:"text-xs text-gray-500 dark:text-gray-400 ml-1"},Fg={key:1,class:"w-8 h-8 rounded bg-gray-100 dark:bg-gray-700 flex items-center justify-center"},Pg={key:2},Rg={class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"},Ug={key:0,class:"h-2 bg-blue-200 dark:bg-blue-800 transition-all duration-200"},ql=3,Hl={__name:"vs-form-custom-datatable",props:t.mergeModels({colModel:{type:Array,required:!0}},{modelValue:{type:Array,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const r=t.useModel(e,"modelValue"),n=t.ref(null),o=t.ref(-1),a=t.ref(!1),l=(f,g,h)=>{n.value=g,o.value=h,f.dataTransfer.effectAllowed="move",f.dataTransfer.setData("text/html","")},s=(f,g)=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},i=(f,g)=>{o.value!==g&&(a.value=!0)},c=f=>{f.currentTarget.contains(f.relatedTarget)||(a.value=!1)},d=(f,g)=>{if(f.preventDefault(),a.value=!1,o.value===-1||o.value===g)return;const h=[...r.value],[k]=h.splice(o.value,1);h.splice(g,0,k),r.value=h,n.value=null,o.value=-1},m=f=>Array.isArray(f)?f.slice(0,ql):[],u=f=>Array.isArray(f)?Math.max(0,f.length-ql):0,p=f=>{const g=f.target;g.style.display="none";const h=document.createElement("cms.div");h.className="w-full h-full flex items-center justify-center bg-gray-200 dark:bg-gray-600",h.innerHTML=`
|
|
249
|
+
*/function ul(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,o)}return n}function dt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?ul(Object(n),!0).forEach(function(o){ef(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ul(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Yr(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Yr=function(r){return typeof r}:Yr=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Yr(e)}function ef(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function yt(){return yt=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},yt.apply(this,arguments)}function tf(e,r){if(e==null)return{};var n={},o=Object.keys(e),a,l;for(l=0;l<o.length;l++)a=o[l],!(r.indexOf(a)>=0)&&(n[a]=e[a]);return n}function rf(e,r){if(e==null)return{};var n=tf(e,r),o,a;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)o=l[a],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}var nf="1.14.0";function _t(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var kt=_t(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),br=_t(/Edge/i),ml=_t(/firefox/i),yr=_t(/safari/i)&&!_t(/chrome/i)&&!_t(/android/i),pl=_t(/iP(ad|od|hone)/i),of=_t(/chrome/i)&&_t(/android/i),fl={capture:!1,passive:!1};function ie(e,r,n){e.addEventListener(r,n,!kt&&fl)}function le(e,r,n){e.removeEventListener(r,n,!kt&&fl)}function zr(e,r){if(r){if(r[0]===">"&&(r=r.substring(1)),e)try{if(e.matches)return e.matches(r);if(e.msMatchesSelector)return e.msMatchesSelector(r);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(r)}catch{return!1}return!1}}function af(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ut(e,r,n,o){if(e){n=n||document;do{if(r!=null&&(r[0]===">"?e.parentNode===n&&zr(e,r):zr(e,r))||o&&e===n)return e;if(e===n)break}while(e=af(e))}return null}var gl=/\s+/g;function Qe(e,r,n){if(e&&r)if(e.classList)e.classList[n?"add":"remove"](r);else{var o=(" "+e.className+" ").replace(gl," ").replace(" "+r+" "," ");e.className=(o+(n?" "+r:"")).replace(gl," ")}}function q(e,r,n){var o=e&&e.style;if(o){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),r===void 0?n:n[r];!(r in o)&&r.indexOf("webkit")===-1&&(r="-webkit-"+r),o[r]=n+(typeof n=="string"?"":"px")}}function Xt(e,r){var n="";if(typeof e=="string")n=e;else do{var o=q(e,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!r&&(e=e.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(n)}function hl(e,r,n){if(e){var o=e.getElementsByTagName(r),a=0,l=o.length;if(n)for(;a<l;a++)n(o[a],a);return o}return[]}function mt(){var e=document.scrollingElement;return e||document.documentElement}function Ie(e,r,n,o,a){if(!(!e.getBoundingClientRect&&e!==window)){var l,s,i,c,u,d,m;if(e!==window&&e.parentNode&&e!==mt()?(l=e.getBoundingClientRect(),s=l.top,i=l.left,c=l.bottom,u=l.right,d=l.height,m=l.width):(s=0,i=0,c=window.innerHeight,u=window.innerWidth,d=window.innerHeight,m=window.innerWidth),(r||n)&&e!==window&&(a=a||e.parentNode,!kt))do if(a&&a.getBoundingClientRect&&(q(a,"transform")!=="none"||n&&q(a,"position")!=="static")){var p=a.getBoundingClientRect();s-=p.top+parseInt(q(a,"border-top-width")),i-=p.left+parseInt(q(a,"border-left-width")),c=s+l.height,u=i+l.width;break}while(a=a.parentNode);if(o&&e!==window){var f=Xt(a||e),g=f&&f.a,y=f&&f.d;f&&(s/=y,i/=g,m/=g,d/=y,c=s+d,u=i+m)}return{top:s,left:i,bottom:c,right:u,width:m,height:d}}}function bl(e,r,n){for(var o=St(e,!0),a=Ie(e)[r];o;){var l=Ie(o)[n],s=void 0;if(s=a>=l,!s)return o;if(o===mt())break;o=St(o,!1)}return!1}function Qt(e,r,n,o){for(var a=0,l=0,s=e.children;l<s.length;){if(s[l].style.display!=="none"&&s[l]!==H.ghost&&(o||s[l]!==H.dragged)&&ut(s[l],n.draggable,e,!1)){if(a===r)return s[l];a++}l++}return null}function ro(e,r){for(var n=e.lastElementChild;n&&(n===H.ghost||q(n,"display")==="none"||r&&!zr(n,r));)n=n.previousElementSibling;return n||null}function rt(e,r){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==H.clone&&(!r||zr(e,r))&&n++;return n}function yl(e){var r=0,n=0,o=mt();if(e)do{var a=Xt(e),l=a.a,s=a.d;r+=e.scrollLeft*l,n+=e.scrollTop*s}while(e!==o&&(e=e.parentNode));return[r,n]}function lf(e,r){for(var n in e)if(e.hasOwnProperty(n)){for(var o in r)if(r.hasOwnProperty(o)&&r[o]===e[n][o])return Number(n)}return-1}function St(e,r){if(!e||!e.getBoundingClientRect)return mt();var n=e,o=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var a=q(n);if(n.clientWidth<n.scrollWidth&&(a.overflowX=="auto"||a.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(a.overflowY=="auto"||a.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return mt();if(o||r)return n;o=!0}}while(n=n.parentNode);return mt()}function sf(e,r){if(e&&r)for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);return e}function no(e,r){return Math.round(e.top)===Math.round(r.top)&&Math.round(e.left)===Math.round(r.left)&&Math.round(e.height)===Math.round(r.height)&&Math.round(e.width)===Math.round(r.width)}var _r;function _l(e,r){return function(){if(!_r){var n=arguments,o=this;n.length===1?e.call(o,n[0]):e.apply(o,n),_r=setTimeout(function(){_r=void 0},r)}}}function cf(){clearTimeout(_r),_r=void 0}function kl(e,r,n){e.scrollLeft+=r,e.scrollTop+=n}function xl(e){var r=window.Polymer,n=window.jQuery||window.Zepto;return r&&r.dom?r.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var Ze="Sortable"+new Date().getTime();function df(){var e=[],r;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(a){if(!(q(a,"display")==="none"||a===H.ghost)){e.push({target:a,rect:Ie(a)});var l=dt({},e[e.length-1].rect);if(a.thisAnimationDuration){var s=Xt(a,!0);s&&(l.top-=s.f,l.left-=s.e)}a.fromRect=l}})}},addAnimationState:function(o){e.push(o)},removeAnimationState:function(o){e.splice(lf(e,{target:o}),1)},animateAll:function(o){var a=this;if(!this.options.animation){clearTimeout(r),typeof o=="function"&&o();return}var l=!1,s=0;e.forEach(function(i){var c=0,u=i.target,d=u.fromRect,m=Ie(u),p=u.prevFromRect,f=u.prevToRect,g=i.rect,y=Xt(u,!0);y&&(m.top-=y.f,m.left-=y.e),u.toRect=m,u.thisAnimationDuration&&no(p,m)&&!no(d,m)&&(g.top-m.top)/(g.left-m.left)===(d.top-m.top)/(d.left-m.left)&&(c=mf(g,p,f,a.options)),no(m,d)||(u.prevFromRect=d,u.prevToRect=m,c||(c=a.options.animation),a.animate(u,g,m,c)),c&&(l=!0,s=Math.max(s,c),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},c),u.thisAnimationDuration=c)}),clearTimeout(r),l?r=setTimeout(function(){typeof o=="function"&&o()},s):typeof o=="function"&&o(),e=[]},animate:function(o,a,l,s){if(s){q(o,"transition",""),q(o,"transform","");var i=Xt(this.el),c=i&&i.a,u=i&&i.d,d=(a.left-l.left)/(c||1),m=(a.top-l.top)/(u||1);o.animatingX=!!d,o.animatingY=!!m,q(o,"transform","translate3d("+d+"px,"+m+"px,0)"),this.forRepaintDummy=uf(o),q(o,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),q(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){q(o,"transition",""),q(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},s)}}}}function uf(e){return e.offsetWidth}function mf(e,r,n,o){return Math.sqrt(Math.pow(r.top-e.top,2)+Math.pow(r.left-e.left,2))/Math.sqrt(Math.pow(r.top-n.top,2)+Math.pow(r.left-n.left,2))*o.animation}var Zt=[],oo={initializeByDefault:!0},kr={mount:function(r){for(var n in oo)oo.hasOwnProperty(n)&&!(n in r)&&(r[n]=oo[n]);Zt.forEach(function(o){if(o.pluginName===r.pluginName)throw"Sortable: Cannot mount plugin ".concat(r.pluginName," more than once")}),Zt.push(r)},pluginEvent:function(r,n,o){var a=this;this.eventCanceled=!1,o.cancel=function(){a.eventCanceled=!0};var l=r+"Global";Zt.forEach(function(s){n[s.pluginName]&&(n[s.pluginName][l]&&n[s.pluginName][l](dt({sortable:n},o)),n.options[s.pluginName]&&n[s.pluginName][r]&&n[s.pluginName][r](dt({sortable:n},o)))})},initializePlugins:function(r,n,o,a){Zt.forEach(function(i){var c=i.pluginName;if(!(!r.options[c]&&!i.initializeByDefault)){var u=new i(r,n,r.options);u.sortable=r,u.options=r.options,r[c]=u,yt(o,u.defaults)}});for(var l in r.options)if(r.options.hasOwnProperty(l)){var s=this.modifyOption(r,l,r.options[l]);typeof s<"u"&&(r.options[l]=s)}},getEventProperties:function(r,n){var o={};return Zt.forEach(function(a){typeof a.eventProperties=="function"&&yt(o,a.eventProperties.call(n[a.pluginName],r))}),o},modifyOption:function(r,n,o){var a;return Zt.forEach(function(l){r[l.pluginName]&&l.optionListeners&&typeof l.optionListeners[n]=="function"&&(a=l.optionListeners[n].call(r[l.pluginName],o))}),a}};function pf(e){var r=e.sortable,n=e.rootEl,o=e.name,a=e.targetEl,l=e.cloneEl,s=e.toEl,i=e.fromEl,c=e.oldIndex,u=e.newIndex,d=e.oldDraggableIndex,m=e.newDraggableIndex,p=e.originalEvent,f=e.putSortable,g=e.extraEventProperties;if(r=r||n&&n[Ze],!!r){var y,x=r.options,h="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!kt&&!br?y=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(o,!0,!0)),y.to=s||n,y.from=i||n,y.item=a||n,y.clone=l,y.oldIndex=c,y.newIndex=u,y.oldDraggableIndex=d,y.newDraggableIndex=m,y.originalEvent=p,y.pullMode=f?f.lastPutMode:void 0;var k=dt(dt({},g),kr.getEventProperties(o,r));for(var w in k)y[w]=k[w];n&&n.dispatchEvent(y),x[h]&&x[h].call(r,y)}}var ff=["evt"],Ke=function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.evt,l=rf(o,ff);kr.pluginEvent.bind(H)(r,n,dt({dragEl:$,parentEl:xe,ghostEl:K,rootEl:ye,nextEl:Mt,lastDownEl:Kr,cloneEl:we,cloneHidden:Vt,dragStarted:wr,putSortable:Me,activeSortable:H.active,originalEvent:a,oldIndex:Jt,oldDraggableIndex:xr,newIndex:Je,newDraggableIndex:Dt,hideGhostForTarget:Vl,unhideGhostForTarget:Dl,cloneNowHidden:function(){Vt=!0},cloneNowShown:function(){Vt=!1},dispatchSortableEvent:function(i){Ge({sortable:n,name:i,originalEvent:a})}},l))};function Ge(e){pf(dt({putSortable:Me,cloneEl:we,targetEl:$,rootEl:ye,oldIndex:Jt,oldDraggableIndex:xr,newIndex:Je,newDraggableIndex:Dt},e))}var $,xe,K,ye,Mt,Kr,we,Vt,Jt,Je,xr,Dt,Xr,Me,er=!1,Qr=!1,Zr=[],Ot,lt,ao,lo,wl,El,wr,tr,Er,vr=!1,Jr=!1,en,Fe,so=[],io=!1,tn=[],rn=typeof document<"u",nn=pl,vl=br||kt?"cssFloat":"float",gf=rn&&!of&&!pl&&"draggable"in document.createElement("div"),Nl=function(){if(rn){if(kt)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Cl=function(r,n){var o=q(r),a=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),l=Qt(r,0,n),s=Qt(r,1,n),i=l&&q(l),c=s&&q(s),u=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+Ie(l).width,d=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+Ie(s).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(l&&i.float&&i.float!=="none"){var m=i.float==="left"?"left":"right";return s&&(c.clear==="both"||c.clear===m)?"vertical":"horizontal"}return l&&(i.display==="block"||i.display==="flex"||i.display==="table"||i.display==="grid"||u>=a&&o[vl]==="none"||s&&o[vl]==="none"&&u+d>a)?"vertical":"horizontal"},hf=function(r,n,o){var a=o?r.left:r.top,l=o?r.right:r.bottom,s=o?r.width:r.height,i=o?n.left:n.top,c=o?n.right:n.bottom,u=o?n.width:n.height;return a===i||l===c||a+s/2===i+u/2},bf=function(r,n){var o;return Zr.some(function(a){var l=a[Ze].options.emptyInsertThreshold;if(!(!l||ro(a))){var s=Ie(a),i=r>=s.left-l&&r<=s.right+l,c=n>=s.top-l&&n<=s.bottom+l;if(i&&c)return o=a}}),o},Sl=function(r){function n(l,s){return function(i,c,u,d){var m=i.options.group.name&&c.options.group.name&&i.options.group.name===c.options.group.name;if(l==null&&(s||m))return!0;if(l==null||l===!1)return!1;if(s&&l==="clone")return l;if(typeof l=="function")return n(l(i,c,u,d),s)(i,c,u,d);var p=(s?i:c).options.group.name;return l===!0||typeof l=="string"&&l===p||l.join&&l.indexOf(p)>-1}}var o={},a=r.group;(!a||Yr(a)!="object")&&(a={name:a}),o.name=a.name,o.checkPull=n(a.pull,!0),o.checkPut=n(a.put),o.revertClone=a.revertClone,r.group=o},Vl=function(){!Nl&&K&&q(K,"display","none")},Dl=function(){!Nl&&K&&q(K,"display","")};rn&&document.addEventListener("click",function(e){if(Qr)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Qr=!1,!1},!0);var Bt=function(r){if($){r=r.touches?r.touches[0]:r;var n=bf(r.clientX,r.clientY);if(n){var o={};for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);o.target=o.rootEl=n,o.preventDefault=void 0,o.stopPropagation=void 0,n[Ze]._onDragOver(o)}}},yf=function(r){$&&$.parentNode[Ze]._isOutsideThisEl(r.target)};function H(e,r){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=r=yt({},r),e[Ze]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Cl(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,i){s.setData("Text",i.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:H.supportPointer!==!1&&"PointerEvent"in window&&!yr,emptyInsertThreshold:5};kr.initializePlugins(this,e,n);for(var o in n)!(o in r)&&(r[o]=n[o]);Sl(r);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=r.forceFallback?!1:gf,this.nativeDraggable&&(this.options.touchStartThreshold=1),r.supportPointer?ie(e,"pointerdown",this._onTapStart):(ie(e,"mousedown",this._onTapStart),ie(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(ie(e,"dragover",this),ie(e,"dragenter",this)),Zr.push(this.el),r.store&&r.store.get&&this.sort(r.store.get(this)||[]),yt(this,df())}H.prototype={constructor:H,_isOutsideThisEl:function(r){!this.el.contains(r)&&r!==this.el&&(tr=null)},_getDirection:function(r,n){return typeof this.options.direction=="function"?this.options.direction.call(this,r,n,$):this.options.direction},_onTapStart:function(r){if(r.cancelable){var n=this,o=this.el,a=this.options,l=a.preventOnFilter,s=r.type,i=r.touches&&r.touches[0]||r.pointerType&&r.pointerType==="touch"&&r,c=(i||r).target,u=r.target.shadowRoot&&(r.path&&r.path[0]||r.composedPath&&r.composedPath()[0])||c,d=a.filter;if(Cf(o),!$&&!(/mousedown|pointerdown/.test(s)&&r.button!==0||a.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&yr&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=ut(c,a.draggable,o,!1),!(c&&c.animated)&&Kr!==c)){if(Jt=rt(c),xr=rt(c,a.draggable),typeof d=="function"){if(d.call(this,r,c,this)){Ge({sortable:n,rootEl:u,name:"filter",targetEl:c,toEl:o,fromEl:o}),Ke("filter",n,{evt:r}),l&&r.cancelable&&r.preventDefault();return}}else if(d&&(d=d.split(",").some(function(m){if(m=ut(u,m.trim(),o,!1),m)return Ge({sortable:n,rootEl:m,name:"filter",targetEl:c,fromEl:o,toEl:o}),Ke("filter",n,{evt:r}),!0}),d)){l&&r.cancelable&&r.preventDefault();return}a.handle&&!ut(u,a.handle,o,!1)||this._prepareDragStart(r,i,c)}}},_prepareDragStart:function(r,n,o){var a=this,l=a.el,s=a.options,i=l.ownerDocument,c;if(o&&!$&&o.parentNode===l){var u=Ie(o);if(ye=l,$=o,xe=$.parentNode,Mt=$.nextSibling,Kr=o,Xr=s.group,H.dragged=$,Ot={target:$,clientX:(n||r).clientX,clientY:(n||r).clientY},wl=Ot.clientX-u.left,El=Ot.clientY-u.top,this._lastX=(n||r).clientX,this._lastY=(n||r).clientY,$.style["will-change"]="all",c=function(){if(Ke("delayEnded",a,{evt:r}),H.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!ml&&a.nativeDraggable&&($.draggable=!0),a._triggerDragStart(r,n),Ge({sortable:a,name:"choose",originalEvent:r}),Qe($,s.chosenClass,!0)},s.ignore.split(",").forEach(function(d){hl($,d.trim(),co)}),ie(i,"dragover",Bt),ie(i,"mousemove",Bt),ie(i,"touchmove",Bt),ie(i,"mouseup",a._onDrop),ie(i,"touchend",a._onDrop),ie(i,"touchcancel",a._onDrop),ml&&this.nativeDraggable&&(this.options.touchStartThreshold=4,$.draggable=!0),Ke("delayStart",this,{evt:r}),s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(br||kt))){if(H.eventCanceled){this._onDrop();return}ie(i,"mouseup",a._disableDelayedDrag),ie(i,"touchend",a._disableDelayedDrag),ie(i,"touchcancel",a._disableDelayedDrag),ie(i,"mousemove",a._delayedDragTouchMoveHandler),ie(i,"touchmove",a._delayedDragTouchMoveHandler),s.supportPointer&&ie(i,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(c,s.delay)}else c()}},_delayedDragTouchMoveHandler:function(r){var n=r.touches?r.touches[0]:r;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){$&&co($),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var r=this.el.ownerDocument;le(r,"mouseup",this._disableDelayedDrag),le(r,"touchend",this._disableDelayedDrag),le(r,"touchcancel",this._disableDelayedDrag),le(r,"mousemove",this._delayedDragTouchMoveHandler),le(r,"touchmove",this._delayedDragTouchMoveHandler),le(r,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(r,n){n=n||r.pointerType=="touch"&&r,!this.nativeDraggable||n?this.options.supportPointer?ie(document,"pointermove",this._onTouchMove):n?ie(document,"touchmove",this._onTouchMove):ie(document,"mousemove",this._onTouchMove):(ie($,"dragend",this),ie(ye,"dragstart",this._onDragStart));try{document.selection?an(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(r,n){if(er=!1,ye&&$){Ke("dragStarted",this,{evt:n}),this.nativeDraggable&&ie(document,"dragover",yf);var o=this.options;!r&&Qe($,o.dragClass,!1),Qe($,o.ghostClass,!0),H.active=this,r&&this._appendGhost(),Ge({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(lt){this._lastX=lt.clientX,this._lastY=lt.clientY,Vl();for(var r=document.elementFromPoint(lt.clientX,lt.clientY),n=r;r&&r.shadowRoot&&(r=r.shadowRoot.elementFromPoint(lt.clientX,lt.clientY),r!==n);)n=r;if($.parentNode[Ze]._isOutsideThisEl(r),n)do{if(n[Ze]){var o=void 0;if(o=n[Ze]._onDragOver({clientX:lt.clientX,clientY:lt.clientY,target:r,rootEl:n}),o&&!this.options.dragoverBubble)break}r=n}while(n=n.parentNode);Dl()}},_onTouchMove:function(r){if(Ot){var n=this.options,o=n.fallbackTolerance,a=n.fallbackOffset,l=r.touches?r.touches[0]:r,s=K&&Xt(K,!0),i=K&&s&&s.a,c=K&&s&&s.d,u=nn&&Fe&&yl(Fe),d=(l.clientX-Ot.clientX+a.x)/(i||1)+(u?u[0]-so[0]:0)/(i||1),m=(l.clientY-Ot.clientY+a.y)/(c||1)+(u?u[1]-so[1]:0)/(c||1);if(!H.active&&!er){if(o&&Math.max(Math.abs(l.clientX-this._lastX),Math.abs(l.clientY-this._lastY))<o)return;this._onDragStart(r,!0)}if(K){s?(s.e+=d-(ao||0),s.f+=m-(lo||0)):s={a:1,b:0,c:0,d:1,e:d,f:m};var p="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");q(K,"webkitTransform",p),q(K,"mozTransform",p),q(K,"msTransform",p),q(K,"transform",p),ao=d,lo=m,lt=l}r.cancelable&&r.preventDefault()}},_appendGhost:function(){if(!K){var r=this.options.fallbackOnBody?document.body:ye,n=Ie($,!0,nn,!0,r),o=this.options;if(nn){for(Fe=r;q(Fe,"position")==="static"&&q(Fe,"transform")==="none"&&Fe!==document;)Fe=Fe.parentNode;Fe!==document.body&&Fe!==document.documentElement?(Fe===document&&(Fe=mt()),n.top+=Fe.scrollTop,n.left+=Fe.scrollLeft):Fe=mt(),so=yl(Fe)}K=$.cloneNode(!0),Qe(K,o.ghostClass,!1),Qe(K,o.fallbackClass,!0),Qe(K,o.dragClass,!0),q(K,"transition",""),q(K,"transform",""),q(K,"box-sizing","border-box"),q(K,"margin",0),q(K,"top",n.top),q(K,"left",n.left),q(K,"width",n.width),q(K,"height",n.height),q(K,"opacity","0.8"),q(K,"position",nn?"absolute":"fixed"),q(K,"zIndex","100000"),q(K,"pointerEvents","none"),H.ghost=K,r.appendChild(K),q(K,"transform-origin",wl/parseInt(K.style.width)*100+"% "+El/parseInt(K.style.height)*100+"%")}},_onDragStart:function(r,n){var o=this,a=r.dataTransfer,l=o.options;if(Ke("dragStart",this,{evt:r}),H.eventCanceled){this._onDrop();return}Ke("setupClone",this),H.eventCanceled||(we=xl($),we.draggable=!1,we.style["will-change"]="",this._hideClone(),Qe(we,this.options.chosenClass,!1),H.clone=we),o.cloneId=an(function(){Ke("clone",o),!H.eventCanceled&&(o.options.removeCloneOnHide||ye.insertBefore(we,$),o._hideClone(),Ge({sortable:o,name:"clone"}))}),!n&&Qe($,l.dragClass,!0),n?(Qr=!0,o._loopId=setInterval(o._emulateDragOver,50)):(le(document,"mouseup",o._onDrop),le(document,"touchend",o._onDrop),le(document,"touchcancel",o._onDrop),a&&(a.effectAllowed="move",l.setData&&l.setData.call(o,a,$)),ie(document,"drop",o),q($,"transform","translateZ(0)")),er=!0,o._dragStartId=an(o._dragStarted.bind(o,n,r)),ie(document,"selectstart",o),wr=!0,yr&&q(document.body,"user-select","none")},_onDragOver:function(r){var n=this.el,o=r.target,a,l,s,i=this.options,c=i.group,u=H.active,d=Xr===c,m=i.sort,p=Me||u,f,g=this,y=!1;if(io)return;function x(Oe,j){Ke(Oe,g,dt({evt:r,isOwner:d,axis:f?"vertical":"horizontal",revert:s,dragRect:a,targetRect:l,canSort:m,fromSortable:p,target:o,completed:k,onMove:function(O,A){return on(ye,n,$,a,O,Ie(O),r,A)},changed:w},j))}function h(){x("dragOverAnimationCapture"),g.captureAnimationState(),g!==p&&p.captureAnimationState()}function k(Oe){return x("dragOverCompleted",{insertion:Oe}),Oe&&(d?u._hideClone():u._showClone(g),g!==p&&(Qe($,Me?Me.options.ghostClass:u.options.ghostClass,!1),Qe($,i.ghostClass,!0)),Me!==g&&g!==H.active?Me=g:g===H.active&&Me&&(Me=null),p===g&&(g._ignoreWhileAnimating=o),g.animateAll(function(){x("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(o===$&&!$.animated||o===n&&!o.animated)&&(tr=null),!i.dragoverBubble&&!r.rootEl&&o!==document&&($.parentNode[Ze]._isOutsideThisEl(r.target),!Oe&&Bt(r)),!i.dragoverBubble&&r.stopPropagation&&r.stopPropagation(),y=!0}function w(){Je=rt($),Dt=rt($,i.draggable),Ge({sortable:g,name:"change",toEl:n,newIndex:Je,newDraggableIndex:Dt,originalEvent:r})}if(r.preventDefault!==void 0&&r.cancelable&&r.preventDefault(),o=ut(o,i.draggable,n,!0),x("dragOver"),H.eventCanceled)return y;if($.contains(r.target)||o.animated&&o.animatingX&&o.animatingY||g._ignoreWhileAnimating===o)return k(!1);if(Qr=!1,u&&!i.disabled&&(d?m||(s=xe!==ye):Me===this||(this.lastPutMode=Xr.checkPull(this,u,$,r))&&c.checkPut(this,u,$,r))){if(f=this._getDirection(r,o)==="vertical",a=Ie($),x("dragOverValid"),H.eventCanceled)return y;if(s)return xe=ye,h(),this._hideClone(),x("revert"),H.eventCanceled||(Mt?ye.insertBefore($,Mt):ye.appendChild($)),k(!0);var E=ro(n,i.draggable);if(!E||wf(r,f,this)&&!E.animated){if(E===$)return k(!1);if(E&&n===r.target&&(o=E),o&&(l=Ie(o)),on(ye,n,$,a,o,l,r,!!o)!==!1)return h(),n.appendChild($),xe=n,w(),k(!0)}else if(E&&xf(r,f,this)){var V=Qt(n,0,i,!0);if(V===$)return k(!1);if(o=V,l=Ie(o),on(ye,n,$,a,o,l,r,!1)!==!1)return h(),n.insertBefore($,V),xe=n,w(),k(!0)}else if(o.parentNode===n){l=Ie(o);var S=0,v,L=$.parentNode!==n,P=!hf($.animated&&$.toRect||a,o.animated&&o.toRect||l,f),Z=f?"top":"left",ce=bl(o,"top","top")||bl($,"top","top"),ee=ce?ce.scrollTop:void 0;tr!==o&&(v=l[Z],vr=!1,Jr=!P&&i.invertSwap||L),S=Ef(r,o,l,f,P?1:i.swapThreshold,i.invertedSwapThreshold==null?i.swapThreshold:i.invertedSwapThreshold,Jr,tr===o);var Ee;if(S!==0){var ke=rt($);do ke-=S,Ee=xe.children[ke];while(Ee&&(q(Ee,"display")==="none"||Ee===K))}if(S===0||Ee===o)return k(!1);tr=o,Er=S;var Ue=o.nextElementSibling,Le=!1;Le=S===1;var We=on(ye,n,$,a,o,l,r,Le);if(We!==!1)return(We===1||We===-1)&&(Le=We===1),io=!0,setTimeout(kf,30),h(),Le&&!Ue?n.appendChild($):o.parentNode.insertBefore($,Le?Ue:o),ce&&kl(ce,0,ee-ce.scrollTop),xe=$.parentNode,v!==void 0&&!Jr&&(en=Math.abs(v-Ie(o)[Z])),w(),k(!0)}if(n.contains($))return k(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){le(document,"mousemove",this._onTouchMove),le(document,"touchmove",this._onTouchMove),le(document,"pointermove",this._onTouchMove),le(document,"dragover",Bt),le(document,"mousemove",Bt),le(document,"touchmove",Bt)},_offUpEvents:function(){var r=this.el.ownerDocument;le(r,"mouseup",this._onDrop),le(r,"touchend",this._onDrop),le(r,"pointerup",this._onDrop),le(r,"touchcancel",this._onDrop),le(document,"selectstart",this)},_onDrop:function(r){var n=this.el,o=this.options;if(Je=rt($),Dt=rt($,o.draggable),Ke("drop",this,{evt:r}),xe=$&&$.parentNode,Je=rt($),Dt=rt($,o.draggable),H.eventCanceled){this._nulling();return}er=!1,Jr=!1,vr=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),uo(this.cloneId),uo(this._dragStartId),this.nativeDraggable&&(le(document,"drop",this),le(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),yr&&q(document.body,"user-select",""),q($,"transform",""),r&&(wr&&(r.cancelable&&r.preventDefault(),!o.dropBubble&&r.stopPropagation()),K&&K.parentNode&&K.parentNode.removeChild(K),(ye===xe||Me&&Me.lastPutMode!=="clone")&&we&&we.parentNode&&we.parentNode.removeChild(we),$&&(this.nativeDraggable&&le($,"dragend",this),co($),$.style["will-change"]="",wr&&!er&&Qe($,Me?Me.options.ghostClass:this.options.ghostClass,!1),Qe($,this.options.chosenClass,!1),Ge({sortable:this,name:"unchoose",toEl:xe,newIndex:null,newDraggableIndex:null,originalEvent:r}),ye!==xe?(Je>=0&&(Ge({rootEl:xe,name:"add",toEl:xe,fromEl:ye,originalEvent:r}),Ge({sortable:this,name:"remove",toEl:xe,originalEvent:r}),Ge({rootEl:xe,name:"sort",toEl:xe,fromEl:ye,originalEvent:r}),Ge({sortable:this,name:"sort",toEl:xe,originalEvent:r})),Me&&Me.save()):Je!==Jt&&Je>=0&&(Ge({sortable:this,name:"update",toEl:xe,originalEvent:r}),Ge({sortable:this,name:"sort",toEl:xe,originalEvent:r})),H.active&&((Je==null||Je===-1)&&(Je=Jt,Dt=xr),Ge({sortable:this,name:"end",toEl:xe,originalEvent:r}),this.save()))),this._nulling()},_nulling:function(){Ke("nulling",this),ye=$=xe=K=Mt=we=Kr=Vt=Ot=lt=wr=Je=Dt=Jt=xr=tr=Er=Me=Xr=H.dragged=H.ghost=H.clone=H.active=null,tn.forEach(function(r){r.checked=!0}),tn.length=ao=lo=0},handleEvent:function(r){switch(r.type){case"drop":case"dragend":this._onDrop(r);break;case"dragenter":case"dragover":$&&(this._onDragOver(r),_f(r));break;case"selectstart":r.preventDefault();break}},toArray:function(){for(var r=[],n,o=this.el.children,a=0,l=o.length,s=this.options;a<l;a++)n=o[a],ut(n,s.draggable,this.el,!1)&&r.push(n.getAttribute(s.dataIdAttr)||Nf(n));return r},sort:function(r,n){var o={},a=this.el;this.toArray().forEach(function(l,s){var i=a.children[s];ut(i,this.options.draggable,a,!1)&&(o[l]=i)},this),n&&this.captureAnimationState(),r.forEach(function(l){o[l]&&(a.removeChild(o[l]),a.appendChild(o[l]))}),n&&this.animateAll()},save:function(){var r=this.options.store;r&&r.set&&r.set(this)},closest:function(r,n){return ut(r,n||this.options.draggable,this.el,!1)},option:function(r,n){var o=this.options;if(n===void 0)return o[r];var a=kr.modifyOption(this,r,n);typeof a<"u"?o[r]=a:o[r]=n,r==="group"&&Sl(o)},destroy:function(){Ke("destroy",this);var r=this.el;r[Ze]=null,le(r,"mousedown",this._onTapStart),le(r,"touchstart",this._onTapStart),le(r,"pointerdown",this._onTapStart),this.nativeDraggable&&(le(r,"dragover",this),le(r,"dragenter",this)),Array.prototype.forEach.call(r.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Zr.splice(Zr.indexOf(this.el),1),this.el=r=null},_hideClone:function(){if(!Vt){if(Ke("hideClone",this),H.eventCanceled)return;q(we,"display","none"),this.options.removeCloneOnHide&&we.parentNode&&we.parentNode.removeChild(we),Vt=!0}},_showClone:function(r){if(r.lastPutMode!=="clone"){this._hideClone();return}if(Vt){if(Ke("showClone",this),H.eventCanceled)return;$.parentNode==ye&&!this.options.group.revertClone?ye.insertBefore(we,$):Mt?ye.insertBefore(we,Mt):ye.appendChild(we),this.options.group.revertClone&&this.animate($,we),q(we,"display",""),Vt=!1}}};function _f(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function on(e,r,n,o,a,l,s,i){var c,u=e[Ze],d=u.options.onMove,m;return window.CustomEvent&&!kt&&!br?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=r,c.from=e,c.dragged=n,c.draggedRect=o,c.related=a||r,c.relatedRect=l||Ie(r),c.willInsertAfter=i,c.originalEvent=s,e.dispatchEvent(c),d&&(m=d.call(u,c,s)),m}function co(e){e.draggable=!1}function kf(){io=!1}function xf(e,r,n){var o=Ie(Qt(n.el,0,n.options,!0)),a=10;return r?e.clientX<o.left-a||e.clientY<o.top&&e.clientX<o.right:e.clientY<o.top-a||e.clientY<o.bottom&&e.clientX<o.left}function wf(e,r,n){var o=Ie(ro(n.el,n.options.draggable)),a=10;return r?e.clientX>o.right+a||e.clientX<=o.right&&e.clientY>o.bottom&&e.clientX>=o.left:e.clientX>o.right&&e.clientY>o.top||e.clientX<=o.right&&e.clientY>o.bottom+a}function Ef(e,r,n,o,a,l,s,i){var c=o?e.clientY:e.clientX,u=o?n.height:n.width,d=o?n.top:n.left,m=o?n.bottom:n.right,p=!1;if(!s){if(i&&en<u*a){if(!vr&&(Er===1?c>d+u*l/2:c<m-u*l/2)&&(vr=!0),vr)p=!0;else if(Er===1?c<d+en:c>m-en)return-Er}else if(c>d+u*(1-a)/2&&c<m-u*(1-a)/2)return vf(r)}return p=p||s,p&&(c<d+u*l/2||c>m-u*l/2)?c>d+u/2?1:-1:0}function vf(e){return rt($)<rt(e)?1:-1}function Nf(e){for(var r=e.tagName+e.className+e.src+e.href+e.textContent,n=r.length,o=0;n--;)o+=r.charCodeAt(n);return o.toString(36)}function Cf(e){tn.length=0;for(var r=e.getElementsByTagName("input"),n=r.length;n--;){var o=r[n];o.checked&&tn.push(o)}}function an(e){return setTimeout(e,0)}function uo(e){return clearTimeout(e)}rn&&ie(document,"touchmove",function(e){(H.active||er)&&e.cancelable&&e.preventDefault()}),H.utils={on:ie,off:le,css:q,find:hl,is:function(r,n){return!!ut(r,n,r,!1)},extend:sf,throttle:_l,closest:ut,toggleClass:Qe,clone:xl,index:rt,nextTick:an,cancelNextTick:uo,detectDirection:Cl,getChild:Qt},H.get=function(e){return e[Ze]},H.mount=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];r[0].constructor===Array&&(r=r[0]),r.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(H.utils=dt(dt({},H.utils),o.utils)),kr.mount(o)})},H.create=function(e,r){return new H(e,r)},H.version=nf;var Ae=[],Nr,mo,po=!1,fo,go,ln,Cr;function Sf(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this))}return e.prototype={dragStarted:function(n){var o=n.originalEvent;this.sortable.nativeDraggable?ie(document,"dragover",this._handleAutoScroll):this.options.supportPointer?ie(document,"pointermove",this._handleFallbackAutoScroll):o.touches?ie(document,"touchmove",this._handleFallbackAutoScroll):ie(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var o=n.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?le(document,"dragover",this._handleAutoScroll):(le(document,"pointermove",this._handleFallbackAutoScroll),le(document,"touchmove",this._handleFallbackAutoScroll),le(document,"mousemove",this._handleFallbackAutoScroll)),Tl(),sn(),cf()},nulling:function(){ln=mo=Nr=po=Cr=fo=go=null,Ae.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,o){var a=this,l=(n.touches?n.touches[0]:n).clientX,s=(n.touches?n.touches[0]:n).clientY,i=document.elementFromPoint(l,s);if(ln=n,o||this.options.forceAutoScrollFallback||br||kt||yr){ho(n,this.options,i,o);var c=St(i,!0);po&&(!Cr||l!==fo||s!==go)&&(Cr&&Tl(),Cr=setInterval(function(){var u=St(document.elementFromPoint(l,s),!0);u!==c&&(c=u,sn()),ho(n,a.options,u,o)},10),fo=l,go=s)}else{if(!this.options.bubbleScroll||St(i,!0)===mt()){sn();return}ho(n,this.options,St(i,!1),!1)}}},yt(e,{pluginName:"scroll",initializeByDefault:!0})}function sn(){Ae.forEach(function(e){clearInterval(e.pid)}),Ae=[]}function Tl(){clearInterval(Cr)}var ho=_l(function(e,r,n,o){if(r.scroll){var a=(e.touches?e.touches[0]:e).clientX,l=(e.touches?e.touches[0]:e).clientY,s=r.scrollSensitivity,i=r.scrollSpeed,c=mt(),u=!1,d;mo!==n&&(mo=n,sn(),Nr=r.scroll,d=r.scrollFn,Nr===!0&&(Nr=St(n,!0)));var m=0,p=Nr;do{var f=p,g=Ie(f),y=g.top,x=g.bottom,h=g.left,k=g.right,w=g.width,E=g.height,V=void 0,S=void 0,v=f.scrollWidth,L=f.scrollHeight,P=q(f),Z=f.scrollLeft,ce=f.scrollTop;f===c?(V=w<v&&(P.overflowX==="auto"||P.overflowX==="scroll"||P.overflowX==="visible"),S=E<L&&(P.overflowY==="auto"||P.overflowY==="scroll"||P.overflowY==="visible")):(V=w<v&&(P.overflowX==="auto"||P.overflowX==="scroll"),S=E<L&&(P.overflowY==="auto"||P.overflowY==="scroll"));var ee=V&&(Math.abs(k-a)<=s&&Z+w<v)-(Math.abs(h-a)<=s&&!!Z),Ee=S&&(Math.abs(x-l)<=s&&ce+E<L)-(Math.abs(y-l)<=s&&!!ce);if(!Ae[m])for(var ke=0;ke<=m;ke++)Ae[ke]||(Ae[ke]={});(Ae[m].vx!=ee||Ae[m].vy!=Ee||Ae[m].el!==f)&&(Ae[m].el=f,Ae[m].vx=ee,Ae[m].vy=Ee,clearInterval(Ae[m].pid),(ee!=0||Ee!=0)&&(u=!0,Ae[m].pid=setInterval((function(){o&&this.layer===0&&H.active._onTouchMove(ln);var Ue=Ae[this.layer].vy?Ae[this.layer].vy*i:0,Le=Ae[this.layer].vx?Ae[this.layer].vx*i:0;typeof d=="function"&&d.call(H.dragged.parentNode[Ze],Le,Ue,e,ln,Ae[this.layer].el)!=="continue"||kl(Ae[this.layer].el,Le,Ue)}).bind({layer:m}),24))),m++}while(r.bubbleScroll&&p!==c&&(p=St(p,!1)));po=u}},30),Al=function(r){var n=r.originalEvent,o=r.putSortable,a=r.dragEl,l=r.activeSortable,s=r.dispatchSortableEvent,i=r.hideGhostForTarget,c=r.unhideGhostForTarget;if(n){var u=o||l;i();var d=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,m=document.elementFromPoint(d.clientX,d.clientY);c(),u&&!u.el.contains(m)&&(s("spill"),this.onSpill({dragEl:a,putSortable:o}))}};function bo(){}bo.prototype={startIndex:null,dragStart:function(r){var n=r.oldDraggableIndex;this.startIndex=n},onSpill:function(r){var n=r.dragEl,o=r.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var a=Qt(this.sortable.el,this.startIndex,this.options);a?this.sortable.el.insertBefore(n,a):this.sortable.el.appendChild(n),this.sortable.animateAll(),o&&o.animateAll()},drop:Al},yt(bo,{pluginName:"revertOnSpill"});function yo(){}yo.prototype={onSpill:function(r){var n=r.dragEl,o=r.putSortable,a=o||this.sortable;a.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),a.animateAll()},drop:Al},yt(yo,{pluginName:"removeOnSpill"}),H.mount(new Sf),H.mount(yo,bo);function _o(e){e.parentElement!==null&&e.parentElement.removeChild(e)}function $l(e,r,n){const o=n===0?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(r,o)}function Vf(){return typeof window<"u"?window.console:global.console}const Df=Vf();function Tf(e){const r=Object.create(null);return function(o){return r[o]||(r[o]=e(o))}}const Af=/-(\w)/g,$f=Tf(e=>e.replace(Af,(r,n)=>n.toUpperCase())),Il=["Start","Add","Remove","Update","End"],Ll=["Choose","Unchoose","Sort","Filter","Clone"],Ml=["Move"],If=[Ml,Il,Ll].flatMap(e=>e).map(e=>`on${e}`),ko={manage:Ml,manageAndEmit:Il,emit:Ll};function Lf(e){return If.indexOf(e)!==-1}const Mf=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function Of(e){return Mf.includes(e)}function Bf(e){return["transition-group","TransitionGroup"].includes(e)}function Ol(e){return["id","class","role","style"].includes(e)||e.startsWith("data-")||e.startsWith("aria-")||e.startsWith("on")}function Bl(e){return e.reduce((r,[n,o])=>(r[n]=o,r),{})}function Ff({$attrs:e,componentData:r={}}){return{...Bl(Object.entries(e).filter(([o,a])=>Ol(o))),...r}}function Pf({$attrs:e,callBackBuilder:r}){const n=Bl(Fl(e));Object.entries(r).forEach(([a,l])=>{ko[a].forEach(s=>{n[`on${s}`]=l(s)})});const o=`[data-draggable]${n.draggable||""}`;return{...n,draggable:o}}function Fl(e){return Object.entries(e).filter(([r,n])=>!Ol(r)).map(([r,n])=>[$f(r),n]).filter(([r,n])=>!Lf(r))}const Pl=({el:e})=>e,Rf=(e,r)=>e.__draggable_context=r,Rl=e=>e.__draggable_context;class Uf{constructor({nodes:{header:r,default:n,footer:o},root:a,realList:l}){this.defaultNodes=n,this.children=[...r,...n,...o],this.externalComponent=a.externalComponent,this.rootTransition=a.transition,this.tag=a.tag,this.realList=l}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(r,n){const{tag:o,children:a,_isRootComponent:l}=this;return r(o,n,l?{default:()=>a}:a)}updated(){const{defaultNodes:r,realList:n}=this;r.forEach((o,a)=>{Rf(Pl(o),{element:n[a],index:a})})}getUnderlyingVm(r){return Rl(r)}getVmIndexFromDomIndex(r,n){const{defaultNodes:o}=this,{length:a}=o,l=n.children,s=l.item(r);if(s===null)return a;const i=Rl(s);if(i)return i.index;if(a===0)return 0;const c=Pl(o[0]),u=[...l].findIndex(d=>d===c);return r<u?0:a}}function jf(e,r){const n=e[r];return n?n():[]}function qf({$slots:e,realList:r,getKey:n}){const o=r||[],[a,l]=["header","footer"].map(c=>jf(e,c)),{item:s}=e;if(!s)throw new Error("draggable element must have an item slot");const i=o.flatMap((c,u)=>s({element:c,index:u}).map(d=>(d.key=n(c),d.props={...d.props||{},"data-draggable":!0},d)));if(i.length!==o.length)throw new Error("Item slot must have only one child");return{header:a,footer:l,default:i}}function Hf(e){const r=Bf(e),n=!Of(e)&&!r;return{transition:r,externalComponent:n,tag:n?t.resolveComponent(e):r?t.TransitionGroup:e}}function Gf({$slots:e,tag:r,realList:n,getKey:o}){const a=qf({$slots:e,realList:n,getKey:o}),l=Hf(r);return new Uf({nodes:a,root:l,realList:n})}function Ul(e,r){t.nextTick(()=>this.$emit(e.toLowerCase(),r))}function jl(e){return(r,n)=>{if(this.realList!==null)return this[`onDrag${e}`](r,n)}}function Wf(e){const r=jl.call(this,e);return(n,o)=>{r.call(this,n,o),Ul.call(this,e,n)}}let xo=null;const Yf={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},zf=["update:modelValue","change",...[...ko.manageAndEmit,...ko.emit].map(e=>e.toLowerCase())],wo=t.defineComponent({name:"draggable",inheritAttrs:!1,props:Yf,emits:zf,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:e,$attrs:r,tag:n,componentData:o,realList:a,getKey:l}=this,s=Gf({$slots:e,tag:n,realList:a,getKey:l});this.componentStructure=s;const i=Ff({$attrs:r,componentData:o});return s.render(t.h,i)}catch(e){return this.error=!0,t.h("pre",{style:{color:"red"}},e.stack)}},created(){this.list!==null&&this.modelValue!==null&&Df.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:e,$el:r,componentStructure:n}=this;n.updated();const o=Pf({$attrs:e,callBackBuilder:{manageAndEmit:l=>Wf.call(this,l),emit:l=>Ul.bind(this,l),manage:l=>jl.call(this,l)}}),a=r.nodeType===1?r:r.parentElement;this._sortable=new H(a,o),this.targetDomElement=a,a.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList(){const{list:e}=this;return e||this.modelValue},getKey(){const{itemKey:e}=this;return typeof e=="function"?e:r=>r[e]}},watch:{$attrs:{handler(e){const{_sortable:r}=this;r&&Fl(e).forEach(([n,o])=>{r.option(n,o)})},deep:!0}},methods:{getUnderlyingVm(e){return this.componentStructure.getUnderlyingVm(e)||null},getUnderlyingPotencialDraggableComponent(e){return e.__draggable_component__},emitChanges(e){t.nextTick(()=>this.$emit("change",e))},alterList(e){if(this.list){e(this.list);return}const r=[...this.modelValue];e(r),this.$emit("update:modelValue",r)},spliceList(){const e=r=>r.splice(...arguments);this.alterList(e)},updatePosition(e,r){const n=o=>o.splice(r,0,o.splice(e,1)[0]);this.alterList(n)},getRelatedContextFromMoveEvent({to:e,related:r}){const n=this.getUnderlyingPotencialDraggableComponent(e);if(!n)return{component:n};const o=n.realList,a={list:o,component:n};return e!==r&&o?{...n.getUnderlyingVm(r)||{},...a}:a},getVmIndexFromDomIndex(e){return this.componentStructure.getVmIndexFromDomIndex(e,this.targetDomElement)},onDragStart(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),xo=e.item},onDragAdd(e){const r=e.item._underlying_vm_;if(r===void 0)return;_o(e.item);const n=this.getVmIndexFromDomIndex(e.newIndex);this.spliceList(n,0,r);const o={element:r,newIndex:n};this.emitChanges({added:o})},onDragRemove(e){if($l(this.$el,e.item,e.oldIndex),e.pullMode==="clone"){_o(e.clone);return}const{index:r,element:n}=this.context;this.spliceList(r,1);const o={element:n,oldIndex:r};this.emitChanges({removed:o})},onDragUpdate(e){_o(e.item),$l(e.from,e.item,e.oldIndex);const r=this.context.index,n=this.getVmIndexFromDomIndex(e.newIndex);this.updatePosition(r,n);const o={element:this.context.element,oldIndex:r,newIndex:n};this.emitChanges({moved:o})},computeFutureIndex(e,r){if(!e.element)return 0;const n=[...r.to.children].filter(s=>s.style.display!=="none"),o=n.indexOf(r.related),a=e.component.getVmIndexFromDomIndex(o);return n.indexOf(xo)!==-1||!r.willInsertAfter?a:a+1},onDragMove(e,r){const{move:n,realList:o}=this;if(!n||!o)return!0;const a=this.getRelatedContextFromMoveEvent(e),l=this.computeFutureIndex(a,e),s={...this.context,futureIndex:l},i={...e,relatedContext:a,draggedContext:s};return n(i,r)},onDragEnd(){xo=null}}}),Kf={class:"flex items-center justify-between mb-6"},Xf={class:"text-xl font-semibold text-gray-900"},Qf={class:"mt-1 text-sm text-gray-600"},Zf={class:"flex items-center gap-2"},Jf={class:"overflow-hidden bg-white border border-gray-200 shadow-sm rounded-xl"},eg={class:"grid grid-cols-12 gap-4 px-6 py-4 border-b border-gray-200 bg-gray-50"},tg={class:"col-span-5 font-medium text-gray-700"},rg={class:"col-span-3 font-medium text-gray-700"},ng={class:"col-span-2 font-medium text-gray-700"},og={class:"col-span-2 font-medium text-right text-gray-700"},ag={class:"divide-y divide-gray-100"},lg={class:"grid items-center grid-cols-12 gap-4 px-6 py-4 transition-colors hover:bg-gray-50/50"},sg={class:"flex items-center col-span-5 gap-3"},ig={class:"font-medium text-gray-900"},cg={class:"text-xs text-gray-500"},dg={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-blue-700 rounded-full bg-blue-50 ring-1 ring-inset ring-blue-700/10"},ug={class:"col-span-3"},mg={class:"inline-flex items-center px-2 py-1 text-sm font-medium text-gray-600 rounded-md bg-gray-50 ring-1 ring-inset ring-gray-500/10"},pg={class:"col-span-1"},fg={key:0,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-circle-check w-4 h-4 text-emerald-600"},gg={key:1,class:"grid items-center grid-cols-12 gap-4 px-6 py-4 transition-colors hover:bg-gray-50/50"},hg={class:"col-span-5"},bg={class:"text-gray-500"},yg={__name:"vs-builder-datatable",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const r=t.useModel(e,"modelValue"),n=a=>a==="array"?"purple":a==="boolean"||a==="date"?"red":a==="datetime"?"purple":a==="number"?"green":a==="text"?"blue":a==="file"||a==="select"?"yellow":a==="slug"?"green":a==="image"?"blue":"gray",o=a=>{switch(a){case"text":return Mr;case"number":return Uo;case"integer":return Uo;case"date":return Ir;case"datetime":return Rs;case"file":return jt;case"select":return qo;case"multiselect":return Lr;case"mediaselect":return ir;case"radio":return Bo;case"boolean":return Bo;case"datalist":return qo;case"image":return ir;case"slug":return jo;case"richtext":return Mr;case"markdown":return Mr;case"reference":return Hs;case"relation":return jo;case"FileList":return jt;default:return Mr}};return(a,l)=>{var s,i;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Kf,[t.createElementVNode("div",null,[t.createElementVNode("h2",Xf,t.toDisplayString(a.$t("cms.builder.collectionStructure")),1),t.createElementVNode("p",Qf,t.toDisplayString(a.$t("cms.builder.defineFields")),1)]),t.createElementVNode("div",Zf,[t.createVNode(Kp,{modelValue:r.value.columns,"onUpdate:modelValue":l[0]||(l[0]=c=>r.value.columns=c)},null,8,["modelValue"])])]),t.createElementVNode("div",Jf,[t.createElementVNode("div",eg,[t.createElementVNode("div",tg,t.toDisplayString(a.$t("cms.builder.name")),1),t.createElementVNode("div",rg,t.toDisplayString(a.$t("cms.builder.type")),1),t.createElementVNode("div",ng,t.toDisplayString(a.$t("cms.builder.localization")),1),t.createElementVNode("div",og,t.toDisplayString(a.$t("cms.builder.actions")),1)]),t.createElementVNode("div",ag,[(i=(s=r.value)==null?void 0:s.columns)!=null&&i.length?(t.openBlock(),t.createBlock(t.unref(wo),{key:0,modelValue:r.value.columns,"onUpdate:modelValue":l[2]||(l[2]=c=>r.value.columns=c),"item-key":"name",handle:".drag-handle",animation:200},{item:t.withCtx(({element:c,index:u})=>{var d,m;return[t.createElementVNode("div",lg,[t.createElementVNode("div",sg,[l[3]||(l[3]=t.createElementVNode("span",{class:"drag-handle cursor-move mr-2 text-gray-400"},"☰",-1)),t.createElementVNode("div",{class:t.normalizeClass(["flex items-center justify-center p-1 rounded",`bg-${n((d=c.type)==null?void 0:d.toLowerCase())}-100`])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o((m=c.type)==null?void 0:m.toLowerCase())),{class:"w-4 h-4"}))],2),t.createElementVNode("div",null,[t.createElementVNode("p",ig,t.toDisplayString(c.label),1),t.createElementVNode("p",cg,t.toDisplayString(c.name),1)]),c.required?(t.openBlock(),t.createElementBlock("span",dg,t.toDisplayString(a.$t("cms.builder.required")),1)):t.createCommentVNode("",!0)]),t.createElementVNode("div",ug,[t.createElementVNode("span",mg,t.toDisplayString(c.type),1)]),t.createElementVNode("div",pg,[c.localization?(t.openBlock(),t.createElementBlock("svg",fg,[...l[4]||(l[4]=[t.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),t.createElementVNode("path",{d:"m9 12 2 2 4-4"},null,-1)])])):t.createCommentVNode("",!0)]),t.createVNode(Jp,{columns:r.value.columns,"onUpdate:columns":l[1]||(l[1]=p=>r.value.columns=p),data:r.value.columns[u],index:u},null,8,["columns","data","index"])])]}),_:1},8,["modelValue"])):(t.openBlock(),t.createElementBlock("div",gg,[t.createElementVNode("div",hg,[t.createElementVNode("p",bg,t.toDisplayString(a.$t("cms.builder.noColumnsFound")),1)])]))])])],64)}}},_g={__name:"vs-builder-edit",props:{data:{},dataModifiers:{},form:{},formModifiers:{}},emits:["update:data","update:form"],setup(e){const{t:r}=me(),n=t.useModel(e,"data"),o=t.useModel(e,"form");t.ref({});const a=t.computed(()=>({name:{type:"text",disabled:!0,readonly:!0,label:r("cms.builder.scheme.name.label"),required:!0,placeholder:r("cms.builder.scheme.name.placeholder"),validators:["required"],col:3},title:{type:"text",label:r("cms.builder.scheme.title.label"),required:!0,placeholder:r("cms.builder.scheme.title.placeholder"),validators:["required"],col:3},preview_path:{type:"text",label:r("cms.builder.scheme.preview_path.label"),placeholder:r("cms.builder.scheme.preview_path.placeholder"),col:3,info:r("cms.builder.scheme.preview_path.info")},type:{hidden:!0,type:"select",label:r("cms.builder.scheme.type.label"),required:!0,placeholder:r("cms.builder.scheme.type.placeholder"),validators:["required"],col:4,options:[{text:r("cms.builder.scheme.type.options.collection"),id:"collection"},{text:r("cms.builder.scheme.type.options.single"),id:"single"}]},status:{hidden:!0,type:"select",label:r("cms.builder.scheme.status.label"),required:!0,placeholder:r("cms.builder.scheme.status.placeholder"),col:4,options:[{text:r("cms.builder.scheme.status.options.published"),id:"published"},{text:r("cms.builder.scheme.status.options.draft"),id:"draft"},{text:r("cms.builder.scheme.status.options.archived"),id:"archived"}]},include_search:{type:"switcher",label:r("cms.builder.scheme.include_search.label"),placeholder:r("cms.builder.scheme.include_search.placeholder"),col:3},description:{type:"textarea",label:r("cms.builder.scheme.description.label"),required:!0,placeholder:r("cms.builder.scheme.description.placeholder")}}));return t.onBeforeUnmount(()=>{o.value=null}),(l,s)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(t.unref(Y),{modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=i=>n.value=i),schema:a.value,form:o.value,"onUpdate:form":s[1]||(s[1]=i=>o.value=i)},null,8,["modelValue","schema","form"]),t.createVNode(yg,{modelValue:n.value,"onUpdate:modelValue":s[2]||(s[2]=i=>n.value=i)},null,8,["modelValue"])]))}},Eo=e=>{var o,a;const r=(o=e==null?void 0:e.type)==null?void 0:o.toLowerCase(),n=e!=null&&e.required?["required"]:null;return r==="array"?{key:e.name,label:e.label||e.title,type:"multi-text",help:e==null?void 0:e.help,colModel:{type:(e==null?void 0:e.subtype)||"text",placeholder:e==null?void 0:e.placeholder},validators:n}:r==="boolean"?{key:e.name,label:e.label||e.title,type:"Switcher",help:e==null?void 0:e.help,validators:n}:r==="tags"?{key:e.name,label:e.label||e.title,type:"tags",help:e==null?void 0:e.help,validators:n}:r==="radio"?{key:e.name,label:e.label||e.title,type:"radio",help:e==null?void 0:e.help,options:e.options||[],validators:n}:r==="date"?{key:e.name,label:e.label||e.title,type:"Date",time:!1,help:e==null?void 0:e.help,validators:n}:r==="datetime"?{key:e.name,label:e.label||e.title,type:"Date",help:e==null?void 0:e.help,mode:"datetime",time:!0,validators:n}:r==="number"?{key:e.name,label:e.label||e.title,help:e==null?void 0:e.help,type:"Number",validators:n}:r==="integer"?{key:e.name,label:e.label||e.title,type:"Integer",help:e==null?void 0:e.help,validators:n}:r==="text"?{key:e.name,label:e.label||e.title,type:"Text",help:e==null?void 0:e.help,validators:n}:r==="file"?{key:e.name,label:e.label||e.title,type:"File",multiple:e.multi||e.multiple,help:e==null?void 0:e.help,validators:n,api:"/api/cms-media/upload?subdir=",dir:"uploads/"+new Date().toLocaleDateString("en-US").replace(/\//g,"-")}:r==="filelist"?{key:e.name,label:e.label||e.title,type:"file",multiple:!0,help:e==null?void 0:e.help,validators:n}:r==="slug"?{key:e.name,label:e.label||e.title,type:"Slug",parent:e.parent||"",help:e==null?void 0:e.help,validators:n}:r==="image"?{key:e.name,label:e.label||e.title,type:"File",multi:e.multiple,help:e==null?void 0:e.help,validators:n,api:"/api/cms-media/upload?subdir=",dir:"uploads/"+new Date().toLocaleDateString("en-US").replace(/\//g,"-")}:r==="select"?e.options?{key:e.name,label:e.label||e.title,type:"select",options:e.options||[],help:e==null?void 0:e.help,validators:n}:{key:e.name,label:e.label||e.title,type:"select",data:e.data||[],help:e==null?void 0:e.help,validators:n}:r==="multiselect"?{key:e.name,label:e.label||e.title,type:"select",data:e.data||[],parent:e.parent||"",options:e.options||[],help:e==null?void 0:e.help,validators:n,multiple:!0}:r==="richtext"?{key:e.name,label:e.label||e.title,type:"Texteditor",help:e==null?void 0:e.help,validators:n}:r==="datalist"?{key:e.name,label:e.label||e.title,type:"Custom-Datatable",colModel:((a=e.colModel)==null?void 0:a.map(l=>Eo(l)))||[],help:e==null?void 0:e.help,validators:n}:r==="reference"?{key:e.name,label:e.label||e.title,type:"reference",reference_type:e.reference_type,help:e==null?void 0:e.help,validators:n}:r==="reference-list"?{key:e.name,label:e.label||e.title,type:"reference",reference_type:e.reference_type,help:e==null?void 0:e.help,validators:n}:r==="relation"?{key:e.name,label:e.label||e.title,type:"relation-link",help:e==null?void 0:e.help,relation:e.relation,validators:n}:r==="markdown"?{key:e.name,label:e.label||e.title,type:"richtext-md",help:e==null?void 0:e.help,validators:n}:r==="mediaselect"?{key:e.name,label:e.label||e.title,type:"mediaselect",help:e==null?void 0:e.help,validators:n}:{key:e.name,label:e.label||e.title,placeholder:e.placeholder,help:e==null?void 0:e.help,type:"Text",validators:n}},kg={class:"flex items-center justify-end gap-2"},xg={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},wg={__name:"vs-form-custom-datatable-controls",props:t.mergeModels({item:{type:Object,required:!0},colModel:{type:Array,required:!0}},{modelValue:{type:Array,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{t:r}=me(),n=e,o=t.useModel(e,"modelValue"),a=t.ref(!1),l=t.ref({}),s=t.ref({}),i=()=>{Q.confirm({title:r("cms.builder.deleteTitle"),message:r("cms.builder.deleteField"),type:"error",onConfirm:()=>{c()}})},c=()=>{o.value=o.value.filter(d=>d.id!==n.item.id)},u=async()=>{if(await s.value.validate()){Q.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.builder.editFieldFailed")});return}o.value=o.value.map(m=>m.id===n.item.id?l.value:m),a.value=!1};return t.watch(a,d=>{d&&(l.value=n.item)}),(d,m)=>(t.openBlock(),t.createElementBlock("div",kg,[t.createElementVNode("button",{class:"inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-8 w-8 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-blue-50 dark:hover:bg-slate-600 hover:border-blue-300 dark:hover:border-slate-500 hover:text-blue-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm",onClick:m[0]||(m[0]=p=>a.value=!0)},[t.createVNode(t.unref(yn),{class:"w-4 h-4"})]),t.createElementVNode("button",{onClick:i,class:"inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-8 w-8 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-red-50 dark:hover:bg-slate-600 hover:border-red-300 dark:hover:border-slate-500 hover:text-red-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"},[t.createVNode(t.unref(ft),{class:"w-4 h-4"})]),t.createVNode(t.unref(Q.VsModal),{teleport:"#modal",title:d.$t("cms.builder.editField"),visible:a.value,onClose:m[4]||(m[4]=p=>a.value=!1)},{footer:t.withCtx(()=>[t.createElementVNode("div",xg,[t.createElementVNode("button",{class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:m[3]||(m[3]=p=>a.value=!1)},t.toDisplayString(d.$t("cms.common.actions.cancel")),1),t.createElementVNode("button",{onClick:u,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},t.toDisplayString(d.$t("cms.common.actions.save")),1)])]),default:t.withCtx(()=>[t.createVNode(t.unref(Y),{form:s.value,"onUpdate:form":m[1]||(m[1]=p=>s.value=p),schema:e.colModel,modelValue:l.value,"onUpdate:modelValue":m[2]||(m[2]=p=>l.value=p)},null,8,["form","schema","modelValue"])]),_:1},8,["title","visible"])]))}},Eg={class:"p-6 border-t border-slate-200 dark:border-slate-700 bg-slate-50/30 dark:bg-slate-700/30"},vg={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Ng={__name:"vs-form-custom-datatable-add",props:t.mergeModels({colModel:{type:Array,required:!0}},{modelValue:{type:Array,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{t:r}=me(),n=t.useModel(e,"modelValue"),o=t.ref(!1),a=t.ref({}),l=t.ref({}),s=async()=>{try{if(await l.value.validate()){Q.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.builder.editFieldFailed")});return}n.value=[...n.value||[],{...a.value,id:Math.random().toString(36).substring(2,15)}],o.value=!1,a.value={}}catch(i){console.log(i)}};return(i,c)=>(t.openBlock(),t.createElementBlock("div",Eg,[t.createElementVNode("button",{class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 shadow-sm h-9 px-4 w-full border-2 border-dashed border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-slate-50 dark:hover:bg-slate-600 hover:border-blue-400 dark:hover:border-blue-500 text-slate-600 dark:text-slate-300 hover:text-blue-600 dark:hover:text-blue-400 py-3 transition-all duration-200",onClick:c[0]||(c[0]=u=>o.value=!0)},[t.createVNode(t.unref(pt),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(i.$t("cms.common.actions.add")),1)]),t.createVNode(t.unref(Q.VsModal),{teleport:"#modal",title:i.$t("cms.common.actions.add"),visible:o.value,onClose:c[4]||(c[4]=u=>o.value=!1)},{footer:t.withCtx(()=>[t.createElementVNode("div",vg,[t.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:c[3]||(c[3]=u=>o.value=!1)},t.toDisplayString(i.$t("cms.common.actions.cancel")),1),t.createElementVNode("button",{onClick:s,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},t.toDisplayString(i.$t("cms.common.actions.save")),1)])]),default:t.withCtx(()=>[t.createVNode(t.unref(Y),{form:l.value,"onUpdate:form":c[1]||(c[1]=u=>l.value=u),schema:e.colModel,modelValue:a.value,"onUpdate:modelValue":c[2]||(c[2]=u=>a.value=u)},null,8,["form","schema","modelValue"])]),_:1},8,["title","visible"])]))}},Cg={class:"p-0 shadow w-full"},Sg={class:"overflow-x-auto"},Vg={class:"relative w-full overflow-auto"},Dg={class:"w-full caption-bottom text-sm"},Tg={class:"[&_tr]:border-b"},Ag={class:"border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors"},$g={class:"h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-end"},Ig={class:"[&_tr:last-child]:border-0"},Lg=["onDragstart","onDragover","onDrop","onDragenter"],Mg={class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center"},Og={class:"flex items-center justify-center text-slate-400"},Bg=["innerHTML"],Fg={key:1,class:"flex items-center gap-2"},Pg={key:0,class:"flex items-center gap-1"},Rg=["src","alt"],Ug={key:0,class:"text-xs text-gray-500 dark:text-gray-400 ml-1"},jg={key:1,class:"w-8 h-8 rounded bg-gray-100 dark:bg-gray-700 flex items-center justify-center"},qg={key:2},Hg={class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"},Gg={key:0,class:"h-2 bg-blue-200 dark:bg-blue-800 transition-all duration-200"},ql=3,Hl={__name:"vs-form-custom-datatable",props:t.mergeModels({colModel:{type:Array,required:!0}},{modelValue:{type:Array,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const r=t.useModel(e,"modelValue"),n=t.ref(null),o=t.ref(-1),a=t.ref(!1),l=(f,g,y)=>{n.value=g,o.value=y,f.dataTransfer.effectAllowed="move",f.dataTransfer.setData("text/html","")},s=(f,g)=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},i=(f,g)=>{o.value!==g&&(a.value=!0)},c=f=>{f.currentTarget.contains(f.relatedTarget)||(a.value=!1)},u=(f,g)=>{if(f.preventDefault(),a.value=!1,o.value===-1||o.value===g)return;const y=[...r.value],[x]=y.splice(o.value,1);y.splice(g,0,x),r.value=y,n.value=null,o.value=-1},d=f=>Array.isArray(f)?f.slice(0,ql):[],m=f=>Array.isArray(f)?Math.max(0,f.length-ql):0,p=f=>{const g=f.target;g.style.display="none";const y=document.createElement("cms.div");y.className="w-full h-full flex items-center justify-center bg-gray-200 dark:bg-gray-600",y.innerHTML=`
|
|
245
250
|
<svg class="w-4 h-4 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
|
|
246
251
|
<path fill-rule="evenodd" d="M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z" clip-rule="evenodd" />
|
|
247
252
|
</svg>
|
|
248
|
-
`,g.parentNode.appendChild(h)};return t.onMounted(()=>{var f,g;(g=(f=r.value)==null?void 0:f.filter(h=>typeof h=="object"))==null||g.forEach(h=>h.id?h.id:h.id=Math.random().toString(36).substring(2,15))}),(f,g)=>(t.openBlock(),t.createElementBlock("div",wg,[t.createElementVNode("div",Eg,[t.createElementVNode("div",vg,[t.createElementVNode("table",Ng,[t.createElementVNode("thead",Cg,[t.createElementVNode("tr",Sg,[g[4]||(g[4]=t.createElementVNode("th",{class:"h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center"},null,-1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colModel,h=>(t.openBlock(),t.createElementBlock("th",{key:h.name,class:"h-10 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 min-w-[150px]"},t.toDisplayString(h.label||h.title||h.name),1))),128)),t.createElementVNode("th",Vg,t.toDisplayString(f.$t("cms.table.actions")),1)])]),t.createElementVNode("tbody",Dg,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.value,(h,k)=>(t.openBlock(),t.createElementBlock("tr",{key:h==null?void 0:h.id,class:t.normalizeClass(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move",{"opacity-50":n.value===h}]),draggable:"true",onDragstart:b=>l(b,h,k),onDragover:b=>s(b),onDrop:b=>d(b,k),onDragenter:b=>i(b,k),onDragleave:g[2]||(g[2]=b=>c(b))},[t.createElementVNode("td",Ag,[t.createElementVNode("div",Ig,[t.createVNode(t.unref(Po))])]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colModel,b=>(t.openBlock(),t.createElementBlock("td",{key:b.name,class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-slate-600 dark:text-slate-400 text-sm"},[b.type==="Texteditor"?(t.openBlock(),t.createElementBlock("span",{key:0,innerHTML:h[b.key]||"-"},null,8,$g)):b.type==="File"?(t.openBlock(),t.createElementBlock("div",Lg,[Array.isArray(h[b.key])&&h[b.key].length>0?(t.openBlock(),t.createElementBlock("div",Mg,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m(h[b.key]),(x,w)=>(t.openBlock(),t.createElementBlock("div",{key:w,class:"relative w-8 h-8 rounded overflow-hidden bg-gray-100 dark:bg-gray-700 flex-shrink-0"},[t.createElementVNode("img",{src:x,alt:`Image ${w+1}`,class:"w-full h-full object-cover",onError:g[0]||(g[0]=E=>p(E))},null,40,Og)]))),128)),u(h[b.key])>0?(t.openBlock(),t.createElementBlock("span",Bg," +"+t.toDisplayString(u(h[b.key])),1)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",Fg,[...g[5]||(g[5]=[t.createElementVNode("svg",{class:"w-4 h-4 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z","clip-rule":"evenodd"})],-1)])]))])):(t.openBlock(),t.createElementBlock("span",Pg,t.toDisplayString(h[b.key]||"-"),1))]))),128)),t.createElementVNode("td",Rg,[t.createVNode(yg,{item:h,colModel:e.colModel,modelValue:r.value,"onUpdate:modelValue":g[1]||(g[1]=b=>r.value=b)},null,8,["item","colModel","modelValue"])])],42,Tg))),128)),a.value?(t.openBlock(),t.createElementBlock("tr",Ug)):t.createCommentVNode("",!0)])])])]),t.createVNode(kg,{colModel:e.colModel,modelValue:r.value,"onUpdate:modelValue":g[3]||(g[3]=h=>r.value=h)},null,8,["colModel","modelValue"])]))}},Gl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAAAGfklEQVR4Ae3d7W6baBSF0d7/7Q6IDxkzmrHEQU2DHZudWH1XflRHcXNqVnka4tL01+qNAIGwwK/wfusJEFjPyexyuUzTNAxD3/dd1/3z/1vXdX3fD8MwTdPlcoFNoFmBlzJblmWapr7vb10d/9j3/TRNy7I0a+3AmxV4MrPr9TqO43FXnz06juP1em1W3IE3KPBMZvM8b1eGn7V0/P6u6+Z5bpDbIbcp8OXMnv4k9jG8cRzbRHfUrQl8LbNhGD7W8sp7hmFoTdzxNijwhcxOb+zWp9IaPO1aO+RHMzvxWvHjZz9Xj62ddq0d70OZzfP8sY1z3+MVkdbOvKaO935m1+v1xdcVHwmy6zqv8jd15jV1sPczi14u7gt06djUmdfUwd7JbFmWfQnp2T0iTZ187RzsncymaUqntd8/TVM79I60HYE7mT14v+I+lVfmvu+P6W93UQ7eCLyxwMd7d48yu1wurzTz3Mce3Mu/LMs4jt3/b88t91EE0gK383Mcx/1XQEeZffMV4+34D64bb42lmewn8LpA13X7l/SOMgvd9nF8DAc3hXzzFezx8/QogWOB/VdAR5n9yGm9f3K/fZ32DX99dwznUQKPC3Rdt53AR5n9yGm9f3Lbs7wNjx+hn0ngHQS2E/gos596otuT+234qefj1yXwnMB2AsvsOUAfReC+wEOZuWi8D+lnEPhc4KHM3u0lkM8PxyME3lHgocze7QX9d4T0nAh8LvBQZu/219M/8tn1c0OPEDgS2P/V1NFLIO92s9U0TT/y5eKRpccI/Emg67r9/UxHma3r+s2fQPZ/AGyfcLfhlW8O+ScK7yOQEvjtm5Heyeybrxv3fwBsde2HZVnmeZ68EXhjgXme9/cNr+u976Hvn3XuIzcTeE7gzmezdV19k4LnZH0UgU3gfma+5c6GZSDwnMD9zNZ19Q3knsP1UQRuAg9llr503P8DOL8xBP4+gUczW9c1dFPIwb/j/Pu4HVGbAl/ILFGaxto87Vo76q9ldu7Vo2vF1s62Zo/3y5ndXhF58aYn/41gsydcmwf+TGbrur5y39Nv96G06e6omxJ4MrObkf/ivalzxcE+LfBSZtuverlcpmkahqHv++16suu6vu+HYZim6eCbnG5LDAT+VoFzMvtbdRwXgVMEZHYKoyUEjgRkdqTjMQKnCMjsFEZLCBwJyOxIx2METhGQ2SmMlhA4EpDZkY7HCJwiILNTGC0hcCTwX2a3/1/QjwQInCuwlSezc2FtI1ACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhAS2DL7F8r/OP7dtZNpAAAAAElFTkSuQmCC",Wl={faq:{schema:{title:{type:"text",label:"Назва",placeholder:"Назва"},show_dots:{type:"switcher",label:"Показувати точки"},show_index:{type:"switcher",conditions:["show_dots","==","true"],label:"Показувати нумерацію"},index_type:{type:"combobox",conditions:["show_index","==","true"],label:"Тип нумерації",options:[{id:"decimal",text:"Десятковий"},{id:"upper-alpha",text:"Латинські великі букви"},{id:"lower-alpha",text:"Латинські маленькі букви"},{id:"upper-roman",text:"Римські великі цифри"},{id:"lower-roman",text:"Римські маленькі цифри"},{id:"upper-cyrillic",text:"Кириличні великі букви"},{id:"lower-cyrillic",text:"Кириличні маленькі букви"}]},openfirst:{type:"switcher",label:"Відкрити перший елемент?"},collapse_mode:{type:"switcher",label:"Не згортати попередній елемент?"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"}],required:!0,validators:["required"]},{key:"section",type:"reference",label:"Вкладений контент",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},banner:{schema:{title:{type:"text",label:"Назва",placeholder:"Назва"},image:{type:"file",label:"Зображення",placeholder:"Зображення"}}},photoGrid:{schema:{columns:{type:"number",label:"Кількість колонок",placeholder:"Кількість колонок",default:3},data:{type:"DataTable",colModel:[{key:"image",ua:"Зображення",type:"file"},{key:"caption",ua:"Заголовок",type:"text"}]}}},slider:{schema:{autoplay:{type:"switcher",label:"Автоматичне гортання?",default:!0},autoplaySpeed:{type:"number",label:"Швидкість автоматичного гортання(мс)",placeholder:"Швидкість автоматичного гортання(мс)",default:3e3},show_navigation:{type:"switcher",label:"Показувати кнопки навігації?"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"link",ua:"Посилання",type:"text"},{key:"image",ua:"Зображення",type:"file"},{key:"image_width",ua:"Ширина зображення(px)",type:"number",placeholder:"Ширина зображення"},{key:"image_height",ua:"Висота зображення(px)",type:"number",placeholder:"Висота зображення"},{ua:"Розтягувати по ширині",key:"stretch",type:"switcher"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"}]}}},video:{schema:{file:{type:"file",max_size:50,description:"Максимальний розмір файлу 50MB",label:"Завантажити відео",placeholder:"Завантажити відео"},hidden_gif:{type:"switcher",label:"Сховати GIF"},preview:{type:"file",label:"Прев'ю для відео"},link:{type:"text",label:"Посилання",placeholder:"Посилання"}}},about:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},text:{type:"tiptap-editor",label:"Текст",placeholder:"Текст"},url:{type:"file",label:"Зображення / відео",placeholder:"Посилання"}}},cards:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"img",ua:"Зображення",type:"file"},{key:"link",ua:"Посилання",type:"text"},{key:"description",ua:"Опис",type:"text"}]}}},usefulLinks:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"text",ua:"Назва",type:"text"},{key:"url",ua:"Посилання",type:"text"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"}]}}},team:{schema:{data:{type:"DataTable",colModel:[{key:"avatar",ua:"Аватар",type:"file"},{key:"title",ua:"Ім'я/ПІБ",type:"text"},{key:"description",ua:"Опис",type:"textarea",optional:!0},{key:"position",ua:"Посада",type:"text",tooltip:!0},{key:"email",ua:"Email",type:"text",optional:!0},{key:"tel",ua:"Телефон",type:"text",optional:!0},{key:"schedule",ua:"Графік прийому",type:"text",optional:!0},{key:"isinfo",type:"switcher",label:"Відображати кнопку 'Детальніше'"},{key:"slug",ua:"Slug",type:"text",label:"Унікальний ідентифікатор"}]}}},body:{schema:{background_color:{type:"switcher",label:"Додати білий фон?"},content:{type:"tiptap-editor",label:"Текст",placeholder:"Текст"}}},news:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},buttonText:{type:"text",label:"Текст кнопки",placeholder:"Текст кнопки"},buttonLink:{type:"text",label:"Посилання кнопки",placeholder:"Посилання кнопки"},tag:{type:"select",label:"Тег",placeholder:"Тег",data:"tag_id"},news_list:{type:"select",label:"Список новин",multiple:!0,placeholder:"Список новин",parent:"tag",data:"news_tag_id"}}},form:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},formUrl:{type:"text",label:"Посилання для відправки форми",placeholder:"Посилання"},schema:{label:"Схема форми",type:"DataTable",colModel:[{key:"name",ua:"Name",type:"text",placeholder:"Name"},{key:"label",ua:"Title",type:"text",placeholder:"Title"},{key:"type",ua:"Type",type:"combobox",options:[{text:"Text",id:"text"},{text:"Textarea",id:"textarea"},{text:"switcher",id:"switcher"},{text:"Email",id:"email"},{text:"Mask",id:"mask"},{text:"Number",id:"number"},{text:"Date",id:"date"},{text:"Datetime",id:"datetime"}]},{key:"mask",ua:"Маска",type:"text",conditions:["type","==","mask"],placeholder:"Маска"},{key:"placeholder",ua:"Плейсхолдер",type:"text",placeholder:"Placeholder"},{key:"required",ua:"Required",type:"switcher"}]}}},tabs:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},description:{type:"textarea",label:"Опис",placeholder:"Опис"},history_mode:{type:"switcher",label:"Використовувати історію сторінки?"},data:{type:"DataTable",colModel:[{key:"slug",type:"slug",label:"Slug",parent:"title",placeholder:"Slug"},{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"}],required:!0,validators:["required"]},{key:"section",type:"reference",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},vertical_tabs:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},history_mode:{type:"switcher",label:"Використовувати історію сторінки?"},data:{type:"DataTable",colModel:[{key:"slug",type:"slug",label:"Slug",parent:"title",placeholder:"Slug"},{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"},{id:"slug",text:"Привязати сторінку"}],required:!0,validators:["required"]},{key:"slug",type:"text",label:"Slug",placeholder:"Slug",conditions:["is_section","==","slug"]},{key:"section",type:"reference",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},documents:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},icon:{type:"file",label:"Завантажити іконку",placeholder:"Завантажити іконку"},show_icon:{type:"switcher",label:"Показувати іконку?"},documents:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"file",info:"Прев'ю доступно тільки для документів у форматі pdf, html, txt. Інші формати одразу завантажуються.",ua:"Файл",type:"file"}]}}},infoLine:{schema:{divider:{type:"file",label:"Завантажити розподілювач"},speed:{type:"number",label:"Швидкість автоматичного гортання(с)",placeholder:"Швидкість автоматичного гортання(с)",default:20},data:{type:"DataTable",colModel:[{key:"title",ua:"Текст",type:"text"}]}}},interested:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"title",ua:"Заголовок",type:"text"},{key:"link",ua:"Посилання",type:"text"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"},{key:"color",ua:"Колір фону",type:"color"}]}}},contact:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"type",ua:"Тип",type:"combobox",options:[{id:"email",text:"Email"},{id:"tel",text:"Телефон"},{id:"address",text:"Адреса"}]},{key:"title",ua:"Пошта",type:"text",conditions:["type","==","email"]},{key:"title",ua:"Телефон",type:"text",conditions:["type","==","tel"]},{key:"title",ua:"Адреса",type:"text",conditions:["type","==","address"]},{key:"description",ua:"Опис",type:"text"}]}}},iframe:{schema:{link:{type:"text",label:"Посилання",placeholder:"Посилання"},file:{type:"file",label:"Завантажити файл",placeholder:"Завантажити файл"},height:{type:"text",label:"Висота iframe(px)",placeholder:"Висота iframe(px)"}}}},sn=[{text:"reference.faq",id:"faq"},{text:"reference.banner",id:"banner"},{text:"reference.slider",id:"slider"},{text:"reference.photoGrid",id:"photoGrid"},{text:"reference.video",id:"video"},{text:"reference.about",id:"about"},{text:"reference.cards",id:"cards"},{text:"reference.usefulLinks",id:"usefulLinks"},{text:"reference.team",id:"team"},{text:"reference.body",id:"body"},{text:"reference.news",id:"news"},{text:"reference.form",id:"form"},{text:"reference.tabs",id:"tabs"},{text:"reference.vertical_tabs",id:"vertical_tabs"},{text:"reference.documents",id:"documents"},{text:"reference.infoLine",id:"infoLine"},{text:"reference.interested",id:"interested"},{text:"reference.contact",id:"contact"},{text:"reference.iframe",id:"iframe"}],jg={class:"h-full w-full flex flex-col"},qg={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},Hg={class:"text-xs font-medium text-gray-600"},Gg={key:0,class:"text-xs text-gray-500"},Yl={__name:"cards-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",jg,[n[0]||(n[0]=t.createStaticVNode('<div class="flex-1 grid grid-cols-3 gap-1.5"><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div></div>',1)),t.createElementVNode("div",qg,[t.createElementVNode("div",Hg,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",Gg,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},Wg={class:"h-full w-full flex flex-col"},Yg={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},zg={class:"text-xs font-medium text-gray-600"},Kg={key:0,class:"text-xs text-gray-500"},Xg={__name:"faq-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Wg,[n[0]||(n[0]=t.createStaticVNode('<div class="h-3 bg-gray-500 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div><div class="mt-1 pt-1 border-t border-gray-200"><div class="space-y-0.5"><div class="h-1 bg-gray-200 rounded"></div><div class="h-1 bg-gray-200 rounded w-5/6"></div><div class="h-1 bg-gray-200 rounded w-4/5"></div></div></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div></div>',2)),t.createElementVNode("div",Yg,[t.createElementVNode("div",zg,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",Kg,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},Qg={class:"h-full w-full flex flex-col"},Zg={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},Jg={class:"text-xs font-medium text-gray-600"},eh={key:0,class:"text-xs text-gray-500"},zl={__name:"banner-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Qg,[n[0]||(n[0]=t.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-16 h-10 bg-gray-300 rounded"></div></div><div class="absolute bottom-2 left-2"><div class="h-3 bg-gray-400 rounded w-16"></div></div></div>',1)),t.createElementVNode("div",Zg,[t.createElementVNode("div",Jg,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",eh,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},th={class:"h-full w-full flex flex-col"},rh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},nh={class:"text-xs font-medium text-gray-600"},oh={key:0,class:"text-xs text-gray-500"},ah={__name:"form-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",th,[n[0]||(n[0]=t.createStaticVNode('<div class="h-3 bg-gray-500 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/4"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/3"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/4"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/3"></div><div class="h-8 bg-gray-200 rounded border border-gray-300"></div></div></div><div class="h-6 bg-gray-600 rounded mt-2"></div>',3)),t.createElementVNode("div",rh,[t.createElementVNode("div",nh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",oh,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},lh={class:"h-full w-full flex flex-col"},sh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},ih={class:"text-xs font-medium text-gray-600"},ch={key:0,class:"text-xs text-gray-500"},Kl={__name:"news-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",lh,[n[0]||(n[0]=t.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-2"></div><div class="flex gap-2 flex-1"><div class="flex-1 space-y-2"><div class="bg-gray-200 rounded p-1.5"><div class="h-8 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-3/4"></div></div><div class="bg-gray-200 rounded p-1.5"><div class="h-8 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-3/4"></div></div></div><div class="w-20 space-y-1"><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div></div></div>',2)),t.createElementVNode("div",sh,[t.createElementVNode("div",ih,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",ch,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},dh={class:"h-full w-full flex flex-col"},uh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},mh={class:"text-xs font-medium text-gray-600"},ph={key:0,class:"text-xs text-gray-500"},fh={__name:"team-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",dh,[n[0]||(n[0]=t.createStaticVNode('<div class="space-y-2 flex-1"><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div></div>',1)),t.createElementVNode("div",uh,[t.createElementVNode("div",mh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",ph,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},gh={class:"h-full w-full flex flex-col"},hh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},bh={class:"text-xs font-medium text-gray-600"},yh={key:0,class:"text-xs text-gray-500"},Xl={__name:"usefulLinks-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",gh,[n[0]||(n[0]=t.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-3"></div><div class="grid grid-cols-2 gap-2 flex-1"><div class="space-y-2"><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div></div><div class="space-y-2"><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div></div></div>',2)),t.createElementVNode("div",hh,[t.createElementVNode("div",bh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",yh,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},_h={class:"h-full w-full flex flex-col"},xh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},kh={class:"text-xs font-medium text-gray-600"},wh={key:0,class:"text-xs text-gray-500"},Eh={__name:"video-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",_h,[n[0]||(n[0]=t.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-10 h-10 bg-gray-400 rounded-full flex items-center justify-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-play w-5 h-5 text-white ml-0.5"><polygon points="6 3 20 12 6 21 6 3"></polygon></svg></div></div><div class="absolute bottom-1.5 left-1.5 right-1.5"><div class="h-2 bg-gray-400 rounded mb-1"></div><div class="h-2 bg-gray-400 rounded w-3/4"></div></div></div><div class="mt-2 flex items-center gap-2"><div class="w-5 h-5 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded flex-1"></div></div>',2)),t.createElementVNode("div",xh,[t.createElementVNode("div",kh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",wh,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},vh={class:"h-full w-full flex flex-col"},Nh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},Ch={class:"text-xs font-medium text-gray-600"},Sh={key:0,class:"text-xs text-gray-500"},Vh={__name:"about-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",vh,[n[0]||(n[0]=t.createStaticVNode('<div class="flex flex-1"><div class="flex-1 pr-2"><div class="h-4 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded w-4/5"></div><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded w-3/4"></div><div class="h-2 bg-gray-300 rounded"></div></div></div><div class="w-16 h-20 bg-gray-200 rounded flex items-center justify-center"><div class="w-6 h-6 bg-gray-300 rounded-full"></div></div></div>',1)),t.createElementVNode("div",Nh,[t.createElementVNode("div",Ch,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",Sh,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},Dh={class:"h-full w-full flex flex-col"},Th={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},Ah={class:"text-xs font-medium text-gray-600"},Ih={key:0,class:"text-xs text-gray-500"},$h={__name:"slider-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Dh,[n[0]||(n[0]=t.createStaticVNode('<div class="flex-1 bg-gray-200 rounded mb-2 relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-12 h-8 bg-gray-300 rounded"></div></div><div class="absolute left-1 top-1/2 transform -translate-y-1/2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-left w-4 h-4 text-gray-400"><path d="m15 18-6-6 6-6"></path></svg></div><div class="absolute right-1 top-1/2 transform -translate-y-1/2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right w-4 h-4 text-gray-400"><path d="m9 18 6-6-6-6"></path></svg></div></div><div class="h-3 bg-gray-300 rounded mb-2"></div><div class="h-6 w-20 bg-gray-400 rounded"></div><div class="flex justify-center gap-1 mt-2"><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div></div>',4)),t.createElementVNode("div",Th,[t.createElementVNode("div",Ah,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",Ih,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},Lh={class:"h-full flex flex-col"},Mh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},Oh={class:"text-xs font-medium text-gray-600"},Bh={key:0,class:"text-xs text-gray-500"},Fh={__name:"infoLine-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Lh,[n[0]||(n[0]=t.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative overflow-hidden"><div class="absolute inset-0 flex items-center"><div class="flex gap-8 whitespace-nowrap animate-pulse"><div class="h-3 bg-gray-400 rounded w-32"></div><div class="h-3 bg-gray-300 rounded w-24"></div><div class="h-3 bg-gray-400 rounded w-40"></div><div class="h-3 bg-gray-300 rounded w-28"></div><div class="h-3 bg-gray-400 rounded w-36"></div><div class="h-3 bg-gray-300 rounded w-20"></div></div></div><div class="absolute top-2 left-2 right-2 flex justify-between items-center"><div class="w-2 h-2 bg-gray-500 rounded-full"></div><div class="w-2 h-2 bg-gray-500 rounded-full"></div></div></div>',1)),t.createElementVNode("div",Mh,[t.createElementVNode("div",Oh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",Bh,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},Ph={class:"h-full flex flex-col"},Rh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},Uh={class:"text-xs font-medium text-gray-600"},jh={key:0,class:"text-xs text-gray-500"},qh={__name:"tabs-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Ph,[n[0]||(n[0]=t.createStaticVNode('<div class="h-2 bg-gray-300 rounded mb-2"></div><div class="flex gap-1 mb-3"><div class="h-4 w-16 bg-gray-400 rounded"></div><div class="h-4 w-16 bg-gray-200 rounded"></div></div><div class="space-y-2 flex-1"><div class="h-2 bg-gray-300 rounded w-5/6"></div><div class="h-2 bg-gray-300 rounded"></div><div class="space-y-1 mt-3"><div class="flex items-center gap-2"><div class="w-2 h-2 bg-gray-400 rounded-full"></div><div class="h-1.5 bg-gray-300 rounded w-20"></div></div><div class="flex items-center gap-2"><div class="w-2 h-2 bg-gray-400 rounded-full"></div><div class="h-1.5 bg-gray-300 rounded w-16"></div></div></div></div>',3)),t.createElementVNode("div",Rh,[t.createElementVNode("div",Uh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",jh,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},Hh={class:"h-full flex flex-col"},Gh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},Wh={class:"text-xs font-medium text-gray-600"},Yh={key:0,class:"text-xs text-gray-500"},Ql={__name:"documents-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Hh,[n[0]||(n[0]=t.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div></div>',2)),t.createElementVNode("div",Gh,[t.createElementVNode("div",Wh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",Yh,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},zh={class:"h-full flex flex-col"},Kh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},Xh={class:"text-xs font-medium text-gray-600"},Qh={key:0,class:"text-xs text-gray-500"},cn={faq:Xg,banner:zl,slider:$h,video:Eh,about:Vh,cards:Yl,usefulLinks:Xl,team:fh,news:Kl,form:ah,tabs:qh,vertical_tabs:Kl,documents:Ql,infoLine:Fh,body:{__name:"body-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",zh,[n[0]||(n[0]=t.createStaticVNode('<div class="grid grid-cols-3 gap-2 flex-1"><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div></div>',1)),t.createElementVNode("div",Kh,[t.createElementVNode("div",Xh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",Qh,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},photoGrid:Yl,interested:Xl,contact:Ql,iframe:zl},Zh={class:"grid grid-cols-1 md:grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-4"},Jh=["onClick"],e0={class:"wireframe-block h-[240px] !p-4 border-2 border-dashed bg-white relative overflow-hidden transition-all rounded-lg shadow-sm border-gray-300 hover:border-gray-400 cursor-pointer"},t0=["src"],r0={__name:"vs-form-reference-choce",props:{modelValue:{type:String,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const r=t.useModel(e,"modelValue");return(n,o)=>(t.openBlock(),t.createElementBlock("div",Zh,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(sn),a=>(t.openBlock(),t.createElementBlock("div",{key:a.id,onClick:l=>r.value=a.id,class:"relative"},[t.createElementVNode("div",e0,[t.unref(cn)[a.id]?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(cn)[a.id]),{key:0,text:a==null?void 0:a.text,count:(a==null?void 0:a.data)||0},null,8,["text","count"])):(t.openBlock(),t.createElementBlock("img",{key:1,src:t.unref(Gl),alt:"Team collaboration",class:"w-full h-full object-cover"},null,8,t0))])],8,Jh))),128))]))}},n0={};function o0(e,r,n,o,a,l){const s=t.resolveComponent("vs-richtext");return t.openBlock(),t.createBlock(s,{class:"w-full"})}const Eo=dt(n0,[["render",o0]]),a0={class:"flex gap-4"},l0={class:"text-sm text-gray-500 dark:text-gray-400 border flex items-center h-10 px-4 rounded-lg w-full"},s0={class:"flex items-center justify-between w-full p-4 border-t border-gray-200 dark:border-gray-700"},i0={__name:"vs-form-reference-add",props:t.mergeModels({title:{type:String,required:!0}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{t:r}=ue();z.inputs["vs-input-reference"]=vo,z.inputs["vs-input-tiptap-editor"]=Eo;const n=t.useModel(e,"modelValue"),o=t.ref(!1),a=t.ref({}),l=t.ref(null),s=t.ref({}),i=t.computed(()=>{var d;return((d=Wl[l.value])==null?void 0:d.schema)||null}),c=async()=>{if(await a.value.validate()){Z.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.builder.editFieldFailed")});return}try{Object.keys(s.value).length!==0&&(n.value=[...n.value||[],{...s.value,id:Math.random().toString(36).substring(2,15),reference_type:l.value}]),o.value=!1,l.value=null,s.value={}}catch(m){console.log(m)}};return t.watch(o,()=>{o.value||(l.value=null,s.value={})}),(d,m)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("button",{type:"button",class:"inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-sky-500",onClick:m[0]||(m[0]=u=>o.value=!o.value)},t.toDisplayString(d.$t("cms.builder.create")),1),t.createVNode(t.unref(Z.VsDrawer),{visible:o.value,"onUpdate:visible":m[6]||(m[6]=u=>o.value=u),position:"right",closeClickBackdrop:!1,onClose:m[7]||(m[7]=u=>o.value=!1),title:l.value?d.$t("cms.builder."+l.value):d.$t("cms.builder.selectType"),size:"50vw"},{footer:t.withCtx(()=>[t.createElementVNode("div",s0,[t.createElementVNode("button",{onClick:m[5]||(m[5]=u=>o.value=!1),class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100"},t.toDisplayString(d.$t("cms.builder.cancel")),1),t.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},t.toDisplayString(d.$t("cms.builder.create")),1)])]),default:t.withCtx(()=>{var u;return[l.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",a0,[t.createElementVNode("div",l0,[t.createElementVNode("span",null,t.toDisplayString((u=t.unref(sn).find(p=>p.id===l.value))==null?void 0:u.text),1)]),t.createElementVNode("button",{class:"py-2.5 px-3 mb-4 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:m[2]||(m[2]=p=>l.value=null)},t.toDisplayString(d.$t("cms.builder.changeType")),1)]),i.value?(t.openBlock(),t.createBlock(t.unref(z.VForm),{key:l.value,schema:i.value,modelValue:s.value,"onUpdate:modelValue":m[3]||(m[3]=p=>s.value=p),form:a.value,"onUpdate:form":m[4]||(m[4]=p=>a.value=p)},null,8,["schema","modelValue","form"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createBlock(r0,{key:0,modelValue:l.value,"onUpdate:modelValue":m[1]||(m[1]=p=>l.value=p),options:t.unref(sn)},null,8,["modelValue","options"]))]}),_:1},8,["visible","title"])]))}},c0={class:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity flex space-x-1 z-10"},d0={class:"flex items-center justify-between w-full p-4 border-t border-gray-200 dark:border-gray-700"},u0={__name:"vs-form-reference-controls",props:t.mergeModels({title:{type:String,required:!0}},{modelValue:{type:Object,default:()=>({})},modelModifiers:{},parent:{type:Array,default:()=>[]},parentModifiers:{}}),emits:["update:modelValue","update:parent"],setup(e){const{t:r}=ue(),n=t.useModel(e,"modelValue"),o=t.useModel(e,"parent"),a=t.ref(!1),l=t.ref({}),s=t.ref({}),i=t.computed(()=>{var d;return((d=Wl[n.value.reference_type])==null?void 0:d.schema)||null});t.watch(a,d=>{d&&(l.value={...n.value})});const c=async()=>{try{if(await s.value.validate()){Z.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.builder.editFieldFailed")});return}n.value={...l.value},a.value=!1}catch(d){console.log(d)}};return(d,m)=>(t.openBlock(),t.createElementBlock("div",c0,[t.createElementVNode("button",{onClick:m[0]||(m[0]=u=>a.value=!a.value),class:"p-1.5 bg-white dark:bg-gray-800 rounded shadow-sm hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors border border-gray-200 dark:border-gray-700"},[t.createVNode(t.unref(Rt),{class:"h-4 w-4 text-gray-400"})]),t.createElementVNode("button",{onClick:m[1]||(m[1]=u=>o.value=o.value.filter(p=>p.id!==n.value.id)),class:"p-1.5 bg-white dark:bg-gray-800 rounded shadow-sm hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors border border-gray-200 dark:border-gray-700"},[t.createVNode(t.unref(st),{class:"h-4 w-4 text-red-500"})]),t.createVNode(t.unref(Z.VsDrawer),{visible:a.value,"onUpdate:visible":m[5]||(m[5]=u=>a.value=u),onClose:m[6]||(m[6]=u=>a.value=!1),title:e.title,width:"50vw"},{footer:t.withCtx(()=>[t.createElementVNode("div",d0,[t.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:m[4]||(m[4]=u=>a.value=!1)},t.toDisplayString(d.$t("cms.common.actions.cancel")),1),t.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},t.toDisplayString(d.$t("cms.common.actions.save")),1)])]),default:t.withCtx(()=>[i.value?(t.openBlock(),t.createBlock(t.unref(z.VForm),{key:0,form:s.value,"onUpdate:form":m[2]||(m[2]=u=>s.value=u),schema:i.value,modelValue:l.value,"onUpdate:modelValue":m[3]||(m[3]=u=>l.value=u),class:"-mr-[10px] ml-[10px] mt-[10px]"},null,8,["form","schema","modelValue"])):t.createCommentVNode("",!0)]),_:1},8,["visible","title"])]))}},m0={class:"w-full"},p0={key:0,class:"relative"},f0={class:"group wireframe-block h-[280px] !p-4 border-2 border-dashed bg-white relative overflow-hidden transition-all rounded-lg shadow-sm border-gray-00 hover:border-gray-400 cursor-grab"},g0=["src"],vo={__name:"vs-form-reference-list",props:t.mergeModels({reference_type:{type:String,required:!0},title:{type:String,required:!0}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const r=a=>{var l;return(l=sn.find(s=>s.id===a))==null?void 0:l.text},n=t.useModel(e,"modelValue"),o=t.computed({get(){const a=n.value;return a==null?[]:Array.isArray(a)?a:[]},set(a){n.value=Array.isArray(a)?a:[]}});return t.watch(n,a=>{a!=null&&!Array.isArray(a)&&(n.value=[])},{immediate:!0}),(a,l)=>{var s;return t.openBlock(),t.createElementBlock("div",m0,[((s=o.value)==null?void 0:s.length)>0?(t.openBlock(),t.createBlock(t.unref(ko),{key:0,modelValue:o.value,"onUpdate:modelValue":l[1]||(l[1]=i=>o.value=i),"item-key":"id",handle:".drag-handle",class:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4"},{item:t.withCtx(({element:i,index:c})=>[i!=null&&i.reference_type?(t.openBlock(),t.createElementBlock("div",p0,[t.createElementVNode("div",f0,[(t.openBlock(),t.createElementBlock("div",{key:i.id,class:"absolute top-2 left-2 opacity-0 group-hover:opacity-100 border border-gray-200 dark:border-gray-700 transition-opacity cursor-move z-10 bg-white dark:bg-gray-800 rounded p-1 shadow-sm drag-handle"},[t.createVNode(t.unref(Po),{class:"h-4 w-4 text-gray-400"})])),t.createVNode(u0,{title:a.$t("cms.builder."+(i==null?void 0:i.reference_type)),modelValue:o.value[c],"onUpdate:modelValue":d=>o.value[c]=d,parent:o.value,"onUpdate:parent":l[0]||(l[0]=d=>o.value=d)},null,8,["title","modelValue","onUpdate:modelValue","parent"]),t.unref(cn)[i==null?void 0:i.reference_type]?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(cn)[i==null?void 0:i.reference_type]),{key:0,index:c,text:r(i==null?void 0:i.reference_type),count:Array.isArray(i==null?void 0:i.data)?i.data.length:0},null,8,["index","text","count"])):(t.openBlock(),t.createElementBlock("img",{key:1,src:t.unref(Gl),alt:"Team collaboration",class:"w-full h-full object-cover"},null,8,g0))])])):t.createCommentVNode("",!0)]),_:1},8,["modelValue"])):t.createCommentVNode("",!0),t.createVNode(i0,{class:"mt-4",title:e.title,modelValue:o.value,"onUpdate:modelValue":l[2]||(l[2]=i=>o.value=i)},null,8,["title","modelValue"])])}}};function Zl(e){if(e===0)return"0 Bytes";const r=1024,n=["Bytes","KB","MB","GB","TB"],o=Math.floor(Math.log(e)/Math.log(r));return Number.parseFloat((e/Math.pow(r,o)).toFixed(2))+" "+n[o]}function h0(e){const r=new Date(e);return isNaN(r.getTime())?"":r.toISOString().slice(0,10)}const b0={__name:"TypeTag",props:{type:{type:String,required:!0}},setup(e){const r=new Map([["document","bg-blue-100 text-blue-800 border-blue-200 dark:bg-blue-900/30 dark:text-blue-300 dark:border-blue-700"],["image","bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-700"],["video","bg-purple-100 text-purple-800 border-purple-200 dark:bg-purple-900/30 dark:text-purple-300 dark:border-purple-700"]]);return(n,o)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors shadow-lg backdrop-blur-sm",t.unref(r).get(e.type)])},t.toDisplayString(e.type),3))}},y0={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 max-h-[calc(100%-130px)] overflow-y-auto px-2 pt-2 pb-5"},_0={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground col-span-full"},x0=["onClick"],k0=["onClick"],w0={class:"truncate font-medium text-slate-800 dark:text-slate-100 mb-2"},E0={class:"text-sm text-slate-500 dark:text-slate-400"},v0=["onClick"],N0={class:"p-0"},C0={class:"aspect-video bg-slate-100 dark:bg-slate-700 rounded-t-lg overflow-hidden relative"},S0={class:"w-full h-full flex items-center justify-center bg-gradient-to-br from-slate-100 to-slate-200 dark:from-slate-700 dark:to-slate-800"},V0={key:0,class:"relative w-full"},D0=["src","alt"],T0={class:"p-4"},A0={class:"flex items-center justify-between mb-2"},I0={class:"font-medium text-slate-800 dark:text-slate-100 truncate flex-1 mr-2"},$0={class:"space-y-1 text-sm text-slate-500 dark:text-slate-400"},L0={class:"flex justify-between"},M0={class:"flex justify-between"},O0={__name:"MediaGrid",props:{files:{type:Array,required:!0},selectedFile:{type:Object,default:null},selectedFiles:{type:Array,default:()=>[]},isDeleteButton:{type:Boolean,default:!1}},emits:["delete-file","file-click","delete-folder"],setup(e,{emit:r}){const{t:n}=ue(),o=e,a=t.ref([]),l=t.ref(null),s=c=>{if(!c)return"";const d=new Date(c);return isNaN(d.getTime())?"":d.toISOString().slice(0,10)},i=()=>{a.value=o.files.sort((c,d)=>c.type==="dir"&&d.type!=="dir"?-1:c.type!=="dir"&&d.type==="dir"?1:0)};return t.onMounted(()=>i()),t.onUpdated(()=>i()),(c,d)=>{var m;return t.openBlock(),t.createElementBlock("div",y0,[((m=e.files)==null?void 0:m.length)===0?(t.openBlock(),t.createElementBlock("div",_0,[t.createVNode(t.unref(Ft),{class:"w-12 h-12 mb-2"}),t.createElementVNode("p",null,t.toDisplayString(c.$t("cms.noFilesInFolder")),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,u=>{var p;return t.openBlock(),t.createElementBlock(t.Fragment,{key:u==null?void 0:u.url},[(u==null?void 0:u.type)==="dir"?(t.openBlock(),t.createElementBlock("div",{key:0,class:"p-6 text-center rounded-xl h-[fit-content] relative text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:scale-105 cursor-pointer",onClick:f=>c.$emit("file-click",u)},[e.isDeleteButton?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:t.withModifiers(f=>{l.value=u},["stop"]),class:"absolute top-4 right-4 p-1 border border-gray-300 dark:border-slate-700 rounded-lg cursor-pointer hover:bg-gray-200 dark:hover:bg-slate-700 group"},[t.createVNode(t.unref(st),{class:"w-4 h-4 text-gray-500 group-hover:text-red-500"})],8,k0)):t.createCommentVNode("",!0),t.createVNode(t.unref(Fo),{class:"w-16 h-16 mx-auto mb-4 text-blue-600"}),t.createElementVNode("h3",w0,t.toDisplayString(u==null?void 0:u.name),1),t.createElementVNode("p",E0,t.toDisplayString(u==null?void 0:u.count)+" "+t.toDisplayString(c.$t("cms.media.files")),1)],8,x0)):(u==null?void 0:u.type)==="file"?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["h-[fit-content] rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:scale-105 group cursor-pointer",{"bg-accent text-accent-foreground ring-2 ring-primary":((p=e.selectedFile)==null?void 0:p.url)===(u==null?void 0:u.url)||e.selectedFiles&&e.selectedFiles.some(f=>f.id===u.id)}]),onClick:f=>c.$emit("file-click",u)},[t.createElementVNode("div",N0,[t.createElementVNode("div",C0,[t.createElementVNode("div",S0,[(u==null?void 0:u.filetype)==="image"&&(u!=null&&u.filepath||u!=null&&u.url)?(t.openBlock(),t.createElementBlock("div",V0,[t.createElementVNode("img",{src:u==null?void 0:u.preview,alt:(u==null?void 0:u.alt)||(u==null?void 0:u.filename),class:"object-cover w-full h-full rounded text-xs"},null,8,D0)])):(t.openBlock(),t.createBlock(t.unref(ar),{key:1,class:"w-12 h-12 text-gray-500"}))])]),t.createElementVNode("div",T0,[t.createElementVNode("div",A0,[t.createElementVNode("h3",I0,t.toDisplayString(u.filename),1),t.createVNode(b0,{type:u==null?void 0:u.filetype},null,8,["type"])]),t.createElementVNode("div",$0,[t.createElementVNode("div",L0,[t.createElementVNode("span",null,t.toDisplayString(c.$t("cms.media.size"))+":",1),t.createElementVNode("span",null,t.toDisplayString(t.unref(Zl)(u.filesize)),1)]),t.createElementVNode("div",M0,[t.createElementVNode("span",null,t.toDisplayString(c.$t("cms.media.uploaded"))+":",1),t.createElementVNode("span",null,t.toDisplayString(s(u.created_at)),1)])])])])],10,v0)):t.createCommentVNode("",!0)],64)}),128))])}}},B0={},F0={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function P0(e,r){return t.openBlock(),t.createElementBlock("svg",F0,[...r[0]||(r[0]=[t.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),t.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)])])}const R0=dt(B0,[["render",P0]]),U0={},j0={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function q0(e,r){return t.openBlock(),t.createElementBlock("svg",j0,[...r[0]||(r[0]=[t.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),t.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)])])}const H0=dt(U0,[["render",q0]]),G0={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground"},W0={key:1,class:"w-full text-sm caption-bottom"},Y0={class:"[&_tr]:border-b"},z0={class:"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"},K0={class:"h-12 px-4 text-left align-middle font-medium text-muted-foreground w-[300px]"},X0={class:"h-12 px-4 font-medium text-left align-middle text-muted-foreground"},Q0={class:"h-12 px-4 font-medium text-left align-middle text-muted-foreground"},Z0={class:"hidden h-12 px-4 font-medium text-left align-middle text-muted-foreground md:table-cell"},J0={class:"[&_tr:last-child]:border-0"},eb=["onClick"],tb={class:"p-4 font-medium align-middle"},rb={class:"flex items-center gap-2"},nb={key:1,class:"relative w-8 h-8"},ob=["src","alt"],ab={class:"truncate max-w-[200px]"},lb={class:"p-4 align-middle"},sb={class:"p-4 align-middle"},ib={class:"hidden p-4 align-middle md:table-cell"},cb={key:0},db={__name:"MediaList",props:{files:{type:Array,required:!0},selectedFile:{type:Object,default:null},selectedFiles:{type:Array,default:()=>[]}},emits:["file-click","delete-folder"],setup(e,{emit:r}){const{t:n}=ue(),o=t.ref(null),a=r,l=()=>{Z.confirm({title:n("cms.builder.deleteTitle"),message:n("cms.builder.deleteObject"),type:"error",onConfirm:()=>{s()}})},s=()=>{a("delete-folder",o.value)};return(i,c)=>{const d=t.resolveComponent("File");return t.openBlock(),t.createElementBlock("div",null,[e.files.length===0?(t.openBlock(),t.createElementBlock("div",G0,[t.createVNode(d,{class:"w-12 h-12 mb-2"}),t.createElementVNode("p",null,t.toDisplayString(i.$t("cms.media.noFilesInFolder")),1)])):(t.openBlock(),t.createElementBlock("table",W0,[t.createElementVNode("thead",Y0,[t.createElementVNode("tr",z0,[t.createElementVNode("th",K0,t.toDisplayString(i.$t("cms.media.name")),1),t.createElementVNode("th",X0,t.toDisplayString(i.$t("cms.media.type")),1),t.createElementVNode("th",Q0,t.toDisplayString(i.$t("cms.media.size")),1),t.createElementVNode("th",Z0,t.toDisplayString(i.$t("cms.media.updatedAt")),1),c[0]||(c[0]=t.createElementVNode("th",null,null,-1))])]),t.createElementVNode("tbody",J0,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.files,m=>{var u,p,f,g,h;return t.openBlock(),t.createElementBlock("tr",{key:m.id,class:t.normalizeClass(["border-b transition-colors hover:bg-blue-200/50 data-[state=selected]:bg-muted cursor-pointer",{"bg-blue-200":((u=o.value)==null?void 0:u.id)===m.id&&((p=o.value)==null?void 0:p.type)===m.type||e.selectedFiles&&e.selectedFiles.some(k=>k.id===m.id&&k.type===m.type)}]),onClick:k=>i.$emit("cms.file-click",m)},[t.createElementVNode("td",tb,[t.createElementVNode("div",rb,[m.type==="dir"?(t.openBlock(),t.createBlock(R0,{key:0,class:"w-5 h-5 text-blue-500"})):(m==null?void 0:m.filetype)==="image"&&(m!=null&&m.filepath)?(t.openBlock(),t.createElementBlock("div",nb,[t.createElementVNode("img",{src:m==null?void 0:m.preview,alt:(m==null?void 0:m.alt)||(m==null?void 0:m.filename),class:"object-cover w-full h-full rounded"},null,8,ob)])):(m==null?void 0:m.filetype)==="image"?(t.openBlock(),t.createBlock(H0,{key:2,class:"w-5 h-5 text-green-500"})):(t.openBlock(),t.createBlock(d,{key:3,class:"w-5 h-5 text-gray-500"})),t.createElementVNode("span",ab,t.toDisplayString((m==null?void 0:m.filename)||(m==null?void 0:m.name)),1)])]),t.createElementVNode("td",lb,t.toDisplayString((m==null?void 0:m.type)==="dir"?i.$t("cms.media.folder"):((g=(f=m==null?void 0:m.filetype)==null?void 0:f.charAt(0))==null?void 0:g.toUpperCase())+((h=m==null?void 0:m.filetype)==null?void 0:h.slice(1))),1),t.createElementVNode("td",sb,t.toDisplayString((m==null?void 0:m.type)==="dir"?"--":t.unref(Zl)(m==null?void 0:m.filesize)),1),t.createElementVNode("td",ib,t.toDisplayString(m!=null&&m.updated_at?t.unref(h0)(m==null?void 0:m.updated_at):"--"),1),m.type==="dir"?(t.openBlock(),t.createElementBlock("td",cb,[t.createVNode(t.unref(st),{class:"w-4 h-4 text-red-500 cursor-pointer",onClick:t.withModifiers(l,["stop"])},null,8,["onClick"])])):t.createCommentVNode("",!0)],10,eb)}),128))])]))])}}},ub={},mb={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function pb(e,r){return t.openBlock(),t.createElementBlock("svg",mb,[...r[0]||(r[0]=[t.createElementVNode("path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},null,-1),t.createElementVNode("polyline",{points:"9 22 9 12 15 12 15 22"},null,-1)])])}const fb=dt(ub,[["render",pb]]),gb={class:"flex items-center space-x-1"},hb=["onClick"],bb={__name:"MediaBreadcrumb",props:{currentPath:{type:Array,required:!0}},emits:["navigate"],setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",gb,[t.createElementVNode("button",{class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20",onClick:n[0]||(n[0]=o=>r.$emit("navigate",[]))},[t.createVNode(fb,{class:"w-3 h-3"}),t.createTextVNode(" "+t.toDisplayString(r.$t("cms.media.mediaLibrary")),1)]),e.currentPath.length>0?(t.openBlock(),t.createBlock(t.unref(Bt),{key:0,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.currentPath,(o,a)=>(t.openBlock(),t.createElementBlock("button",{key:a,class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/20",onClick:l=>r.$emit("navigate",e.currentPath.slice(0,a+1))},[t.createVNode(t.unref(Fo),{class:"w-3 h-3"}),t.createTextVNode(" "+t.toDisplayString(o)+" ",1),a<e.currentPath.length-1?(t.openBlock(),t.createBlock(t.unref(Bt),{key:0,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):t.createCommentVNode("",!0)],8,hb))),128))]))}},yb=["src"],_b={class:"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity rounded-lg gap-2"},xb=["onClick"],kb=["onClick"],wb=["title"],Eb={key:1,class:"relative group"},vb=["src"],Nb={class:"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity rounded-lg gap-2"},Cb=["title"],Sb={key:2,class:"absolute inset-0 bg-white bg-opacity-75 flex items-center justify-center rounded-lg z-10"},Vb={class:"flex flex-col items-center gap-2"},Db={class:"text-xs text-gray-600"},Tb=["multiple","disabled"],Ab={class:"whitespace-nowrap text-sm"},Ib={class:"whitespace-nowrap text-sm"},$b={class:"flex items-center justify-between p-4 border-b"},Lb={class:"text-lg font-semibold"},Mb={class:"flex items-center justify-between gap-4 p-4 border-b"},Ob={class:"relative z-[1] rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm mb-6 p-4 mx-4"},Bb={class:"flex items-center justify-between gap-4"},Fb={class:"flex items-center gap-4 flex-1"},Pb={class:"relative flex-1 max-w-md"},Rb=["placeholder"],Ub={class:"flex items-center gap-2 relative"},jb={class:"text-xs font-bold"},qb={class:"text-xs font-bold"},Hb={key:0,class:"w-full absolute top-full left-1/2 transform -translate-x-1/2 mt-2 z-50 bg-white dark:bg-slate-700 flex flex-col items-start border border-slate-200 dark:border-slate-600 rounded-md shadow-lg"},Gb={class:"flex items-center gap-2"},Wb={class:"flex flex-col gap-4 overflow-y-auto p-4 flex-1"},Yb={class:"p-4 border-t flex items-center justify-between"},zb={key:0,class:"text-sm text-gray-600 dark:text-gray-400"},Kb={key:1},Xb=["disabled"],Zt={__name:"vs-form-media-select",props:t.mergeModels({multiple:{type:Boolean,default:!1},multi:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:r}){const{t:n}=ue(),o=Ce.useRoute(),a=Ce.useRouter(),l=t.useModel(e,"modelValue"),s=r,i=e,c=t.computed(()=>i.multiple||i.multi),d=t.ref(null),m=t.computed(()=>l.value||d.value),u=t.computed(()=>{if(!c.value)return[];const C=m.value;return C?Array.isArray(C)?C:[C]:[]}),p=t.computed(()=>m.value?typeof m.value=="object"?m.value.filename||m.value.file_name||m.value.native_file_name||"File":typeof m.value=="string"?m.value.split("cms./").pop()||m.value:"File":""),f=t.ref(!1),g=t.ref(!1),h=t.ref("grid"),k=t.ref([]),b=t.ref([]),x=t.ref([]),w=t.ref(),E=t.ref([]),D=t.ref(null),S=t.ref(!1),N=t.ref(null),P=t.ref(null),T=t.ref({}),$=t.ref(""),R=t.ref(!1),H=t.ref("name"),re=new Map([["name",n("cms.media.sortBy.name")],["filesize",n("cms.media.sortBy.filesize")]]),ne=C=>typeof C=="string"?C:(C==null?void 0:C.filepath)||(C==null?void 0:C.file_path)||C,ee=C=>C?typeof C=="string"?C.split("cms./").pop()||C:C.filename||C.file_name||C.native_file_name||"File":"",ge=C=>typeof C=="string"?C:(C==null?void 0:C.preview)||`/file/resize?filepath=${ne(C)}&h=137&quality=75`,te=()=>{D.value&&D.value.click()},be=()=>{f.value=!f.value,f.value&&U()},U=()=>{if(N.value){const C=N.value.getBoundingClientRect();T.value={top:`${C.bottom+10}px`,left:`${C.left+C.width/2}px`,transform:"translateX(-50%)",width:"200px"}}},q=C=>{var L;if(C.type==="dir")Et([...k.value,C.name]);else if(c.value){const B=E.value.findIndex(F=>F.id===C.id);B>=0?E.value.splice(B,1):E.value.push(C)}else w.value=C.id===((L=w.value)==null?void 0:L.id)?null:C},O=C=>{H.value=C,R.value=!1,b.value=b.value.sort((L,B)=>{var F;if((L==null?void 0:L.type)==="dir")return-1;if(C==="name")return(F=L==null?void 0:L.name)==null?void 0:F.localeCompare(B==null?void 0:B.name);if(C==="filesize")return(B==null?void 0:B.filesize)-(L==null?void 0:L.filesize)})},se=async()=>{try{const C=k.value.join("/"),B=await(await fetch(`/api/cms-media?subdir=${C}${$.value?"&search="+$.value:""}`,{method:"GET"})).json();B.data?(b.value=B.data.map(F=>({...F,id:F.type==="dir"?`dir-${F.name}`:F.id,preview:`/file/resize?filepath=${F.filepath}&h=137&quality=75`})),O(H.value)):b.value=[]}catch(C){console.error("Search error:",C),b.value=[]}},Ae=()=>{if(c.value){if(E.value.length>0){const C=Array.isArray(l.value)?[...l.value]:l.value?[l.value]:[],L=Array.isArray(d.value)?[...d.value]:d.value?[d.value]:[];E.value.forEach(B=>{const F=B.filepath||B.file_path;C.some(Q=>(typeof Q=="string"?Q:(Q==null?void 0:Q.filepath)||(Q==null?void 0:Q.file_path))===F)||(C.push(F),L.push(B))}),l&&(l.value=C),d.value=L,s("cms.change",C),E.value=[]}}else if(w.value){const C=w.value.filepath||w.value.file_path;l&&(l.value=C),d.value=w.value,s("cms.change",C),w.value=null}We()},We=()=>{g.value=!1},Et=C=>{k.value=C,x.value=[...x.value,C],w.value=null,c.value&&(E.value=[]),$t()},mn=()=>{x.value.length>1&&(x.value.pop(),k.value=x.value[x.value.length-1],w.value=null,c.value&&(E.value=[]),$t())},$t=async()=>{try{const C=k.value.join("/"),B=await(await fetch(`/api/cms-media?subdir=${C}${$.value?"&search="+$.value:""}`,{method:"GET"})).json();B.data?(b.value=B.data.map(F=>({...F,id:F.type==="dir"?`dir-${F.name}`:F.id,preview:`/file/resize?filepath=${F.filepath}&h=137&quality=75`})),O(H.value)):b.value=[]}catch(C){console.error("Fetch error:",C),b.value=[]}},Lt=async(C,L)=>{try{const B=typeof C=="string"?C:ne(C);if(await fetch(`/file/delete${B}`),c.value){const F=Array.isArray(l.value)?[...l.value]:[],Q=Array.isArray(d.value)?[...d.value]:[];if(L!==void 0&&L>=0)F.splice(L,1),Q.splice(L,1);else{const we=F.findIndex(y=>(typeof y=="string"?y:(y==null?void 0:y.filepath)||(y==null?void 0:y.file_path))===B);we>=0&&(F.splice(we,1),Q.splice(we,1))}l&&(l.value=F.length>0?F:null),d.value=Q.length>0?Q:null,s("cms.change",F.length>0?F:null)}else l&&(l.value=null),d.value=null,s("cms.change",null);return!0}catch(B){return console.error(B),!1}},rr=async C=>{try{const L=await fetch(`/file/download/files/uploads${C}`),B=await L.arrayBuffer(),F=L.headers["content-type"],Q=new TextDecoder("utf-8").decode(B),we=new Blob([Q],{type:F}),y=document.createElement("cms.a");y.setAttribute("download",C),y.href=window.URL.createObjectURL(we),y.click()}catch(L){console.error(L.message)}},Tr=async C=>{if(!C.target.files||C.target.files.length===0)return;const L=Array.from(C.target.files);console.log("Uploading files:",L),S.value=!0;try{const B=[];for(const F of L){const Q=new FormData;Q.append("file",F);const we=await fetch("/file/upload/uploads?id=1&form=form&table=table",{method:"POST",body:Q});if(!we.ok)throw new Error(`Upload failed: ${we.status}`);const y=await we.json();console.log("Upload result:",y);const _=y.result,V={file_id:_.file_id,file_name:_.file_name,file_path:_.file_path,filepath:_.file_path,format:_.format,size:_.size,entity_id:_.entity_id,dir:_.dir,native_file_name:_.native_file_name,preview:`/file/resize?filepath=${_.file_path}&h=137&quality=75`};B.push(V)}if(c.value){const F=Array.isArray(l.value)?[...l.value]:l.value?[l.value]:[],Q=Array.isArray(d.value)?[...d.value]:d.value?[d.value]:[];B.forEach(we=>{F.push(we.file_path),Q.push(we)}),l&&(l.value=F),d.value=Q,s("cms.change",F)}else{const F=B[0];l&&(l.value=F.file_path),d.value=F,s("cms.change",F.file_path)}f.value=!1}catch(B){console.error("Upload error:",B),alert("cms.Помилка завантаження файлу: "+B.message)}finally{S.value=!1}C.target.value=""};t.watch(g,C=>{C&&$t()}),t.watch(k,C=>{C.length>0?a.push({query:{path:C.join("/")}}):a.push({query:{path:void 0}})});let nr;return t.watch($,C=>{clearTimeout(nr),nr=setTimeout(()=>{se()},500)}),t.watch(l,C=>{var L,B,F,Q;if(C&&typeof C=="object"){const we=((L=w.value)==null?void 0:L.filepath)||((B=w.value)==null?void 0:B.file_path);C.filepath!==we&&C.file_path!==we&&(w.value=null)}else if(C&&typeof C=="string"){const we=((F=w.value)==null?void 0:F.filepath)||((Q=w.value)==null?void 0:Q.file_path);C!==we&&(w.value=null)}}),t.onMounted(()=>{var L,B;k.value=((B=(L=o.query)==null?void 0:L.path)==null?void 0:B.split("cms./"))||[],x.value=[[]],l.value||(w.value=null);const C=F=>{var Q;f.value&&!((Q=N.value)!=null&&Q.contains(F.target))&&(f.value=!1),R.value&&P.value&&!P.value.contains(F.target)&&(R.value=!1)};document.addEventListener("click",C)}),(C,L)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",t.mergeProps(C.$attrs,{class:"flex gap-4 flex-wrap"}),[c.value?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(u.value,(B,F)=>(t.openBlock(),t.createElementBlock("div",{key:F,class:"relative group"},[t.createElementVNode("img",{src:ge(B),alt:"Selected File",class:"w-32 h-32 object-cover rounded-lg"},null,8,yb),t.createElementVNode("div",_b,[t.createElementVNode("button",{type:"button",onClick:Q=>Lt(B,F),class:"p-2 rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors"},[t.createVNode(t.unref(st),{class:"w-4 h-4"})],8,xb),t.createElementVNode("button",{type:"button",onClick:Q=>rr(ne(B)),class:"p-2 rounded-full bg-blue-500 text-white hover:bg-blue-600 transition-colors"},[t.createVNode(t.unref(gn),{class:"w-4 h-4"})],8,kb)]),t.createElementVNode("div",{class:"absolute bottom-full left-0 mb-2 px-3 py-1.5 bg-gray-900 text-white text-xs rounded-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10 max-w-[200px] truncate",title:ee(B)},[t.createTextVNode(t.toDisplayString(ee(B))+" ",1),L[12]||(L[12]=t.createElementVNode("div",{class:"absolute top-full left-4 border-4 border-transparent border-t-gray-900"},null,-1))],8,wb)]))),128)):m.value?(t.openBlock(),t.createElementBlock("div",Eb,[t.createElementVNode("img",{src:m.value.preview||m.value,alt:"Selected File",class:"w-32 h-32 object-cover rounded-lg"},null,8,vb),t.createElementVNode("div",Nb,[t.createElementVNode("button",{type:"button",onClick:L[0]||(L[0]=B=>{var F,Q;return Lt(((F=m.value)==null?void 0:F.filepath)||((Q=m.value)==null?void 0:Q.file_path)||m.value)}),class:"p-2 rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors"},[t.createVNode(t.unref(st),{class:"w-4 h-4"})]),t.createElementVNode("button",{type:"button",onClick:L[1]||(L[1]=B=>{var F,Q;return rr(((F=m.value)==null?void 0:F.filepath)||((Q=m.value)==null?void 0:Q.file_path)||m.value)}),class:"p-2 rounded-full bg-blue-500 text-white hover:bg-blue-600 transition-colors"},[t.createVNode(t.unref(gn),{class:"w-4 h-4"})])]),t.createElementVNode("div",{class:"absolute bottom-full left-0 mb-2 px-3 py-1.5 bg-gray-900 text-white text-xs rounded-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10 max-w-[200px] truncate",title:p.value},[t.createTextVNode(t.toDisplayString(p.value)+" ",1),L[13]||(L[13]=t.createElementVNode("div",{class:"absolute top-full left-4 border-4 border-transparent border-t-gray-900"},null,-1))],8,Cb)])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"triggerButton",ref:N,class:t.normalizeClass(["relative w-32 h-32 flex items-center justify-center border border-dotted border-gray-300 rounded-lg hover:border-blue-500 hover:bg-blue-500/10 hover:cursor-pointer transition-all",{"border-blue-500 bg-blue-500/10":f.value,"opacity-50 cursor-not-allowed":S.value}]),onClick:be},[S.value?(t.openBlock(),t.createBlock(t.unref(bn),{key:0,class:"w-4 h-4 animate-spin text-blue-500"})):(t.openBlock(),t.createBlock(t.unref(lt),{key:1,class:"w-4 h-4"})),S.value?(t.openBlock(),t.createElementBlock("div",Sb,[t.createElementVNode("div",Vb,[t.createVNode(t.unref(bn),{class:"w-6 h-6 animate-spin text-blue-500"}),t.createElementVNode("span",Db,t.toDisplayString(C.$t("cms.media.uploading")),1)])])):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[f.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fixed bg-white z-50 border border-gray-200 rounded-lg shadow-lg flex flex-col items-center justify-center",style:t.normalizeStyle(T.value)},[t.createElementVNode("div",{class:t.normalizeClass(["relative overflow-hidden flex justify-start items-center w-full gap-2 p-4 hover:bg-blue-50 text-blue-700 border hover:border-blue-200 dark:bg-slate-700 dark:text-slate-100 hover:cursor-pointer",{"opacity-50 cursor-not-allowed":S.value}]),onClick:L[3]||(L[3]=B=>!S.value&&te())},[t.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:D,class:"absolute justify-center bottom-0 left-0 w-full opacity-0",onChange:Tr,onClick:L[2]||(L[2]=t.withModifiers(()=>{},["stop"])),multiple:c.value,disabled:S.value},null,40,Tb),S.value?(t.openBlock(),t.createBlock(t.unref(bn),{key:0,class:"w-4 h-4 animate-spin"})):(t.openBlock(),t.createBlock(t.unref(gn),{key:1})),t.createElementVNode("span",Ab,t.toDisplayString(S.value?C.$t("cms.media.uploading"):C.$t("cms.media.upload")),1)],2),t.createElementVNode("div",{onClick:L[4]||(L[4]=B=>g.value=!0),class:"flex justify-start items-center w-full gap-2 p-4 hover:bg-blue-50 text-blue-700 border hover:border-blue-200 dark:bg-slate-700 dark:text-slate-100 hover:cursor-pointer"},[t.createVNode(t.unref(lr)),t.createElementVNode("span",Ib,t.toDisplayString(C.$t("cms.media.selectFromMedia")),1)])],4)):t.createCommentVNode("",!0)]))],2)],16),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[g.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:We},[t.createElementVNode("div",{class:"bg-white rounded-lg shadow-xl max-w-4xl w-full mx-4 max-h-[90vh] flex flex-col",onClick:L[11]||(L[11]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",$b,[t.createElementVNode("h3",Lb,t.toDisplayString(C.$t("cms.media.selectFiles")),1),t.createElementVNode("button",{onClick:We,class:"text-gray-400 hover:text-gray-600"},[...L[14]||(L[14]=[t.createElementVNode("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),t.createElementVNode("div",Mb,[t.createVNode(bb,{"current-path":k.value,onNavigate:Et,onNavigateBack:mn},null,8,["current-path"])]),t.createElementVNode("div",Ob,[t.createElementVNode("div",Bb,[t.createElementVNode("div",Fb,[t.createElementVNode("div",Pb,[t.createVNode(t.unref(xn),{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-slate-400 dark:text-slate-500"}),t.withDirectives(t.createElementVNode("input",{type:"text",placeholder:C.$t("cms.media.search"),class:"w-full pl-10 pr-4 py-2 text-sm border border-slate-200 dark:border-slate-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-slate-700 text-slate-700 dark:text-slate-200 placeholder-slate-400 dark:placeholder-slate-500","onUpdate:modelValue":L[5]||(L[5]=B=>$.value=B)},null,8,Rb),[[t.vModelText,$.value]])]),t.createElementVNode("div",Ub,[t.createElementVNode("span",jb,t.toDisplayString(C.$t("cms.media.sortBy.title")+": "),1),t.createElementVNode("button",{ref_key:"sortByButton",ref:P,class:"relative z-[1000] inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border shadow-sm h-8 rounded-md px-3 text-xs bg-white border-slate-300 text-slate-700 disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground hover:bg-slate-50 dark:bg-slate-700 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-slate-600",onClick:L[8]||(L[8]=B=>R.value=!R.value)},[t.createVNode(t.unref(Bo),{class:"w-4 h-4"}),t.createElementVNode("span",qb,t.toDisplayString(t.unref(re).get(H.value)),1),R.value?(t.openBlock(),t.createElementBlock("div",Hb,[t.createElementVNode("span",{class:"text-left text-xs font-bold w-full p-2 hover:bg-slate-100 dark:hover:bg-slate-600 border-b border-slate-200 dark:border-slate-600 cursor-pointer",onClick:L[6]||(L[6]=t.withModifiers(B=>O("name"),["stop"]))},t.toDisplayString(C.$t("cms.media.sortBy.name")),1),t.createElementVNode("span",{class:"text-left text-xs font-bold w-full p-2 hover:bg-slate-100 dark:hover:bg-slate-600 cursor-pointer",onClick:L[7]||(L[7]=t.withModifiers(B=>O("filesize"),["stop"]))},t.toDisplayString(C.$t("cms.media.sortBy.filesize")),1)])):t.createCommentVNode("",!0)],512)])]),t.createElementVNode("div",Gb,[t.createElementVNode("button",{class:t.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 h-8 px-3 text-xs rounded-md",{"shadow bg-blue-600 hover:bg-blue-700 text-white":h.value==="grid","border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600":h.value==="list"}]),onClick:L[9]||(L[9]=B=>h.value="grid")},[t.createVNode(t.unref(qs),{class:"w-4 h-4"})],2),t.createElementVNode("button",{class:t.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 h-8 px-3 text-xs rounded-md",{"shadow bg-blue-600 hover:bg-blue-700 text-white":h.value==="list","border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600":h.value==="grid"}]),onClick:L[10]||(L[10]=B=>h.value="list")},[t.createVNode(t.unref($r),{class:"w-4 h-4"})],2)])])]),t.createElementVNode("div",Wb,[h.value==="grid"?(t.openBlock(),t.createBlock(O0,{key:0,files:b.value,"selected-file":c.value?null:w.value,"selected-files":c.value?E.value:[],onFileClick:q},null,8,["files","selected-file","selected-files"])):(t.openBlock(),t.createBlock(db,{key:1,files:b.value,"selected-file":c.value?null:w.value,"selected-files":c.value?E.value:[],onFileClick:q},null,8,["files","selected-file","selected-files"]))]),t.createElementVNode("div",Yb,[c.value&&E.value.length>0?(t.openBlock(),t.createElementBlock("div",zb,t.toDisplayString(C.$t("cms.media.selectedFiles",{count:E.value.length})),1)):(t.openBlock(),t.createElementBlock("div",Kb)),t.createElementVNode("button",{onClick:Ae,disabled:c.value?E.value.length===0:!w.value,class:"flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium disabled:pointer-events-none disabled:opacity-50 h-9 px-4 py-2 ml-auto bg-blue-600 hover:bg-blue-700 text-white shadow-md hover:shadow-lg transition-all duration-200 transform hover:scale-105"},[t.createVNode(t.unref(lt),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(C.$t("cms.common.actions.add")),1)],8,Xb)])])])):t.createCommentVNode("",!0)]))],64))}},Qb={};function Zb(e,r){const n=t.resolveComponent("vs-richtext-md",!0);return t.openBlock(),t.createBlock(n,{class:"w-full h-[300px]"})}const Jl=dt(Qb,[["render",Zb]]),Jb={props:{min:{type:Number},step:{type:Number,default:()=>1},max:{type:Number,default:()=>1/0},modelValue:{type:Number,default:()=>null},label:{type:String,default:()=>""},placeholder:{type:String,default:()=>"0"},disabled:{type:Boolean,default:()=>!1}},data(){return{id:`input-number-${Math.floor(Math.random()*1e3)}`,inputValue:this.modelValue}},watch:{modelValue(e){this.inputValue=e},inputValue(e){this.$emit("update:modelValue",e)}},methods:{validateInput(e){(e.key==="+"||e.key===","||e.key==="."||e.key==="-"&&this.inputValue&&this.inputValue.toString().length>0)&&e.preventDefault()},handleBlur(){let e=parseFloat(this.inputValue);this.$emit("blur"),isNaN(e)?e=this.min:e>this.max?e=this.max:e<this.min&&(e=this.min),this.inputValue=e,this.$emit("update:modelValue",this.inputValue)}}},ey={class:"p-0"},ty=["step","min","max","id","placeholder","disabled"];function ry(e,r,n,o,a,l){return t.openBlock(),t.createElementBlock("div",ey,[t.renderSlot(e.$slots,"label",t.normalizeProps(t.guardReactiveProps({id:a.id}))),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=s=>a.inputValue=s),type:"number",onKeydown:r[1]||(r[1]=(...s)=>l.validateInput&&l.validateInput(...s)),onBlur:r[2]||(r[2]=(...s)=>l.handleBlur&&l.handleBlur(...s)),step:n.step,min:n.min,max:n.max,id:a.id,"aria-describedby":"helper-text-explanation",class:t.normalizeClass(["vs-number__input py-2 px-3 block w-full h-[38px] border border-solid border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-500 focus:z-10 focus:border-1 focus:outline-none focus:border-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 dark:placeholder:text-neutral-500 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-neutral-600",{"cursor-not-allowed":n.disabled}]),placeholder:n.placeholder,disabled:n.disabled},null,42,ty),[[t.vModelText,a.inputValue]])])}const es=dt(Jb,[["render",ry]]),ts={__name:"vs-form-reletion-link",props:t.mergeModels({relation:{type:String,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const r=t.useModel(e,"modelValue"),n=e,o=t.ref([]),a=async()=>{const s=await(await fetch(`/api/cms-suggest/${n.relation}`)).json();o.value=s==null?void 0:s.data};return t.onMounted(a),(l,s)=>{var i;return(i=o.value)!=null&&i.length?(t.openBlock(),t.createBlock(t.unref(z.VsInputSelect),{key:0,mode:"combo",modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=c=>r.value=c),options:o.value},null,8,["modelValue","options"])):t.createCommentVNode("",!0)}}},ny={monaco:qp,edit:gg,preview:{__name:"vs-builder-preview",props:{data:{},dataModifiers:{},form:{},formModifiers:{}},emits:["update:data","update:form"],setup(e){z.inputs["vs-input-custom-datatable"]=Hl,z.inputs["vs-input-reference"]=vo,z.inputs["vs-input-texteditor"]=Eo,z.inputs["vs-input-mediaselect"]=Zt,z.inputs["vs-input-file"]=Zt,z.inputs["vs-input-image"]=Zt,z.inputs["vs-input-richtext-md"]=Jl,z.inputs["vs-input-integer"]=es,z.inputs["vs-input-relation-link"]=ts;const r=t.ref({}),n=t.useModel(e,"data"),o=t.useModel(e,"form"),a=t.computed(()=>{var l,s;return((s=(l=n.value)==null?void 0:l.columns)==null?void 0:s.map(wo))||[]});return(l,s)=>{var i;return t.openBlock(),t.createElementBlock("div",{ref_key:"form",ref:o},[((i=a.value)==null?void 0:i.length)>0?(t.openBlock(),t.createBlock(t.unref(z.VForm),{key:0,modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=c=>r.value=c),schema:a.value},null,8,["modelValue","schema"])):t.createCommentVNode("",!0)],512)}}}},oy={class:"max-w-6xl mx-auto"},ay={class:"flex items-center justify-between mb-6"},ly={class:"mb-2 text-2xl font-semibold text-gray-900"},sy={class:"lowercase"},iy={class:"text-gray-600"},cy={class:"flex items-center gap-2"},dy={class:"w-full"},uy={class:"flex items-center w-full h-10 max-w-md grid-cols-3 p-1 mb-6 bg-white border border-gray-200 rounded-md text-muted-foreground"},my=["onClick"],py={key:0,class:"container mx-auto bg-white rounded-md py-4 px-2 bg-opacity-50"},rs={__name:"EditCollectionPage",setup(e){const{t:r}=ue(),n=t.inject("cms.fetchContentTypes"),o=t.ref("edit"),a=t.ref({yaml:"",data:{columns:[],type:"collection"}}),l=t.ref({}),s=t.ref(""),i=Ce.useRoute(),c=Ce.useRouter(),d=t.ref(!1),m=t.computed(()=>[{name:r("cms.builder.edit"),id:"edit"},{name:r("cms.builder.preview"),id:"preview"}]),u=t.computed(()=>{const g=i.params.id;return g==="edit"?i.params.collection:g}),p=async()=>{var g;try{if(!u.value)return;const k=await(await fetch(`/api/cms-type/${u.value}`)).json(),b={...k,columns:Array.isArray(k.columns)?k.columns:(g=Object.entries((k==null?void 0:k.columns)||{}))==null?void 0:g.map(([x,w])=>({...w,name:x}))};a.value={...a.value,data:b},s.value=b.title||b.name}catch(h){console.error(h)}finally{d.value=!0}},f=async()=>{var g,h;try{if(await l.value.validate()){Z.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.builder.editFieldFailed")});return}const b=u.value;if(!b)return;const x=await fetch(`/api/cms-type/${b}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(o.value==="monaco"?(g=a.value)==null?void 0:g.yaml:(h=a.value)==null?void 0:h.data)});c.back(),n&&n(),Z.notify({type:"success",title:r("cms.common.actions.success"),message:r("cms.collections.collectionCreated")})}catch(k){console.error(k),Z.notify({type:"error",title:r("cms.common.actions.error"),message:r("cms.collections.collectionCreationFailed")})}};return t.onMounted(()=>{p()}),(g,h)=>(t.openBlock(),t.createElementBlock("div",oy,[t.createElementVNode("div",ay,[t.createElementVNode("div",null,[t.createElementVNode("h1",ly,[t.createTextVNode(t.toDisplayString(g.$t("cms.builder.editCollection"))+" ",1),t.createElementVNode("span",sy,t.toDisplayString(s.value),1)]),t.createElementVNode("p",iy,t.toDisplayString(g.$t("cms.builder.editContentForYourSite")),1)]),t.createElementVNode("div",cy,[t.createElementVNode("a",{onClick:h[0]||(h[0]=k=>t.unref(c).back()),class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border bg-background hover:text-accent-foreground h-10 px-4 py-2 border-gray-300 text-gray-700 hover:bg-gray-50"},t.toDisplayString(g.$t("cms.common.actions.back")),1),t.createElementVNode("button",{onClick:f,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-white rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-primary-foreground h-10 px-4 py-2 bg-blue-600 hover:bg-blue-700"},t.toDisplayString(g.$t("cms.common.actions.save")),1)])]),t.createElementVNode("div",dy,[t.createElementVNode("div",uy,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,k=>(t.openBlock(),t.createElementBlock("button",{key:k.id,onClick:b=>o.value=k.id,class:t.normalizeClass(["inline-flex flex-1 items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm data-[state=active]:bg-blue-50 data-[state=active]:text-blue-700 data-[state=active]:border-blue-200",k.id===o.value?"bg-blue-50 text-blue-700 border-blue-200":""])},t.toDisplayString(k.name),11,my))),128))])]),d.value?(t.openBlock(),t.createElementBlock("div",py,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(ny)[o.value]),{yaml:a.value.yaml,"onUpdate:yaml":h[1]||(h[1]=k=>a.value.yaml=k),data:a.value.data,"onUpdate:data":h[2]||(h[2]=k=>a.value.data=k),form:l.value,"onUpdate:form":h[3]||(h[3]=k=>l.value=k)},null,40,["yaml","data","form"]))])):t.createCommentVNode("",!0)]))}},fy="menu",gy=(e,r)=>{const n=e==null?void 0:e.trim();return n?n===fy?r?r==="create"?{type:"createMenu",collection:n}:{type:"editMenu",collection:n,id:r}:{type:"menu",collection:n}:r==="edit"?{type:"editCollection",collection:n}:r?r==="create"?{type:"createArticle",collection:n}:{type:"editArticle",collection:n,id:r}:{type:"articles",collection:n}:{type:"collections"}},hy=[{key:"title",label:"common.title",localization:!0,type:"text"},{key:"description",label:"common.description",localization:!0,type:"text"},{key:"keywords",label:"common.keywords",localization:!0,type:"text"},{key:"meta",label:"common.meta",type:"key-value",ignore:["title","description","keywords"]}],by={__name:"VsFormTags",props:{modelValue:{default:()=>[]},modelModifiers:{}},emits:["update:modelValue"],setup(e,{expose:r}){const{t:n}=ue(),o=t.useModel(e,"modelValue"),a=t.ref({}),l=t.ref(!1);t.provide("metaParentValue",o);const s=u=>Array.isArray(u)?u.map(p=>typeof p=="object"&&p!==null&&p.id?p.id:p):[],i=async u=>{if(!Array.isArray(u)||u.length===0)return[];try{const f=await(await fetch("/api/tags")).json(),g=(f==null?void 0:f.rows)||[];return u.map(h=>{const k=g.find(b=>b.tag_id===h);return k?{id:k.tag_id,text:k.value,color:k.color}:{id:h,text:"",color:"#ababab"}})}catch(p){return console.error("Error fetching tags:",p),u.map(f=>({id:f,text:"",color:"#ababab"}))}};t.onMounted(async()=>{await t.nextTick(),await t.nextTick(),setTimeout(()=>{var u;if(Array.isArray((u=o.value)==null?void 0:u.tag_list)){const p=s(o.value.tag_list);JSON.stringify(p)!==JSON.stringify(o.value.tag_list)&&(o.value.tag_list=p)}},100)}),t.watch(()=>o.value.tag_list,u=>{if(Array.isArray(u)&&!l.value){const p=s(u);JSON.stringify(p)!==JSON.stringify(u)&&(o.value.tag_list=p)}},{deep:!0}),t.watch(()=>o.value,u=>{if(u&&Array.isArray(u.tag_list)&&!l.value){const p=s(u.tag_list);JSON.stringify(p)!==JSON.stringify(u.tag_list)&&(u.tag_list=p)}},{deep:!0,immediate:!0}),t.watch(()=>{var u;return(u=o.value)==null?void 0:u.tag_list},u=>{Array.isArray(u)&&a.value&&t.nextTick(()=>{a.value&&a.value.setValue&&a.value.setValue("tag_list",u)})},{deep:!0});const c=async u=>{if(u.tag_list&&(u.tag_list=s(u.tag_list),o.value.tag_list=u.tag_list),await a.value.validate()){Z.notify({type:"warning",title:n("cms.common.actions.warning"),message:n("cms.builder.editFieldFailed")});return}};r({restoreTagsBeforeSubmit:async()=>{var u;if(l.value=!0,Array.isArray((u=o.value)==null?void 0:u.tag_list)){console.log("Before restore:",o.value.tag_list);const p=await i(o.value.tag_list);console.log("After restore:",p),o.value.tag_list=p}setTimeout(()=>{l.value=!1},2e3)}});const m=t.computed(()=>{var u;return[{key:"tag_list",type:"select",multiple:!0,searchable:!1,placeholder:n("cms.builder.tags"),data:"tag_id",value:((u=o.value)==null?void 0:u.tag_list)||[]}]});return(u,p)=>o.value?(t.openBlock(),t.createBlock(t.unref(z),{key:0,schema:m.value,modelValue:o.value,"onUpdate:modelValue":[p[0]||(p[0]=f=>o.value=f),c]},null,8,["schema","modelValue"])):t.createCommentVNode("",!0)}},yy={class:"flex justify-end mb-4"},_y=["href"],xy=["src"],ky=["src"],wy={key:2,class:"w-full h-[80vh] flex items-center justify-center text-gray-500"},Ey={__name:"VsPreview",props:{preview_path:{type:String,default:""},slug:{type:String,default:""}},setup(e){const r=t.ref(""),n=t.ref(""),o=async()=>{var l,s;try{const c=await(await fetch("/api/settings")).json();r.value=((s=(l=c==null?void 0:c.settings)==null?void 0:l.site_info)==null?void 0:s.previewUrl)||"http://ip.local.softpro.ua"}catch(i){console.error("Failed to fetch settings:",i),r.value="http://ip.local.softpro.ua"}},a=async()=>{var l;try{const i=await(await fetch("/user")).json();n.value=(l=i==null?void 0:i.user)==null?void 0:l.draftKey}catch(s){console.error("Failed to fetch user:",s)}};return t.onMounted(()=>{o(),a()}),(l,s)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",yy,[t.createElementVNode("a",{href:`${r.value}/uk/${e.preview_path}${e.slug}${n.value?`?draftKey=${n.value}`:""}`,target:"_blank",class:"inline-flex items-center gap-2 px-3 py-1.5 text-black-600 bg-white border border-blue-200 rounded hover:border-blue-300 hover:bg-blue-50 transition-colors duration-200 font-normal cursor-pointer"},[s[0]||(s[0]=t.createTextVNode(" Переглянути на сайті ",-1)),t.createVNode(t.unref(Us),{class:"w-4 h-4"})],8,_y)]),r.value&&e.preview_path?(t.openBlock(),t.createElementBlock("iframe",{key:0,src:`${r.value}/uk/${e.preview_path}${e.slug}?hideHeader=true&hideFooter=true`,class:"w-full h-[80vh]"},null,8,xy)):r.value?(t.openBlock(),t.createElementBlock("iframe",{key:1,src:`${r.value}/uk/${e.slug}?hideHeader=true&hideFooter=true`,class:"w-full h-[80vh]"},null,8,ky)):(t.openBlock(),t.createElementBlock("div",wy," Loading preview... "))]))}},vy={class:"space-y-6 max-w-6xl mx-auto relative bg-white"},Ny={class:"p-4 sticky top-[-24px] z-10 bg-white dark:bg-slate-800"},Cy={class:"flex items-center justify-between"},Sy={class:"flex items-center gap-4"},Vy={class:"text-2xl font-semibold text-gray-900 dark:text-white"},Dy=["href","title"],Ty={class:"flex items-center space-x-3"},Ay={class:"w-full mt-6 flex items-center justify-between"},Iy={class:"flex items-center w-full h-10 max-w-md grid-cols-3 p-1 bg-white border border-gray-200 rounded-md text-muted-foreground"},$y=["onClick"],Ly={class:"flex items-center gap-2"},My={for:"is_pin",class:"text-sm font-medium text-gray-700 dark:text-gray-300 cursor-pointer"},Oy={class:"relative"},By={key:0,class:"w-3 h-3 text-white",fill:"currentColor",viewBox:"0 0 20 20"},Fy={class:"container mx-auto bg-white rounded-md pb-4 px-5"},Py={class:"container mx-auto bg-white rounded-md pb-4 px-2"},Ry={key:0,class:"container mx-auto bg-white rounded-md pb-4 px-2"},Uy={key:1,class:"container mx-auto bg-white rounded-md pb-4 px-2"},ns=t.defineComponent({__name:"contentForm",setup(e){z.inputs["vs-input-custom-datatable"]=Hl,z.inputs["vs-input-reference"]=vo,z.inputs["vs-input-texteditor"]=Eo,z.inputs["vs-input-mediaselect"]=Zt,z.inputs["vs-input-file"]=Zt,z.inputs["vs-input-image"]=Zt,z.inputs["vs-input-richtext-md"]=Jl,z.inputs["vs-input-integer"]=es,z.inputs["vs-input-relation-link"]=ts;const{t:r,locale:n}=ue(),o=Ce.useRouter(),a=Ce.useRoute(),l=t.inject("menu",t.ref([])),s=t.ref([]),i=t.ref({}),c=t.ref({}),d=t.ref({}),m=t.ref(""),u=T=>{const $=[];return T.forEach(R=>{if($.push(R),R.localization){const H={...R,name:R.name+":en",label:R.label+" (en)"};$.push(H)}}),$},p=t.computed(()=>{var T;return(T=s.value)==null?void 0:T.map(wo)}),f=t.computed(()=>(n.value,hy.flatMap(T=>{const $={...T,label:r(T.label)};if(T.localization){const R={...T,key:`${T.key}:en`,label:r(T.label)+" (en)"};return[$,R]}return[$]}))),g=t.ref({}),h=t.ref({title:"",status:"draft"}),k=t.computed(()=>{const T=[{id:"content",name:r("cms.builder.content")},{id:"seo",name:r("cms.builder.seo")},{id:"tags",name:r("cms.builder.tags")}];return m.value&&T.push({id:"preview",name:r("cms.builder.preview")}),T}),b=t.ref("content"),x=t.computed(()=>{var $,R,H,re;const T=(($=a.params)==null?void 0:$.collection)||((R=a.params)==null?void 0:R.id);return((re=(H=l.value)==null?void 0:H.find(ne=>ne.id===T))==null?void 0:re.title)||T}),w=t.computed(()=>{var T,$;return((T=h.value)==null?void 0:T.title)||(($=a.params)!=null&&$.id?r("cms.builder.editCollection"):r("cms.articles.createArticle"))}),E=t.computed(()=>{var H,re,ne;const T=((H=a.params)==null?void 0:H.collection)||((re=a.params)==null?void 0:re.id),$=(ne=a.params)==null?void 0:ne.id,R=[{label:x.value,route:`collections/${T}`}];return $?R.push({label:w.value,route:`collections/${T}/${$}`}):R.push({label:r("cms.articles.createArticle"),route:`collections/${T}/create`}),R}),D=T=>{T==="collections"?o.push("/collections"):o.push(`/${T}`)};t.onMounted(async()=>{var re,ne,ee;const T=(re=a.params)==null?void 0:re.collection,$=(ne=a.params)==null?void 0:ne.id,R=T||$,H=T&&$?$:void 0;if(!H){if(!R)return;const te=await(await fetch(`/api/cms/${R}/`)).json();s.value=u(te.columns)}try{if(!H||!R)return;const ge=await fetch(`/api/cms/${R}/${H}`);if(!ge.ok)throw new Error("Failed to fetch article");const te=await ge.json();if(s.value=u(te==null?void 0:te.columns),te!=null&&te.preview_path&&(m.value=te==null?void 0:te.preview_path),te.rows){let be=te.rows;Array.isArray(be)||(be=[be]),h.value=be[0],await t.nextTick(),(ee=be[0])!=null&&ee.meta?g.value={...be[0].meta}:g.value={title:"",description:"",keywords:"",meta:{}},console.log("Initialized seoData from rows[0]:",g.value)}else h.value=te,await t.nextTick(),te!=null&&te.meta?(g.value={title:te.meta.title||"",description:te.meta.description||"",keywords:te.meta.keywords||"",meta:{...te.meta}},delete g.value.meta.title,delete g.value.meta.description,delete g.value.meta.keywords):g.value={title:"",description:"",keywords:"",meta:{}},console.log("Initialized seoData from data:",g.value)}catch(ge){console.error("Error fetching article:",ge)}});const S=t.computed({get:()=>{var T;return((T=h.value)==null?void 0:T.is_pin)||!1},set:T=>{h.value&&(h.value.is_pin=T)}}),N=()=>{h.value&&(h.value.is_pin=!h.value.is_pin)};t.watch(g,T=>{console.log("seoData changed:",T)},{deep:!0});const P=async T=>{var ee,ge,te,be;const $=(ee=a.params)==null?void 0:ee.collection,R=(ge=a.params)==null?void 0:ge.id,H=await i.value.validate();if(H){Z.notify({title:r("cms.validation"),message:JSON.stringify(H),type:"warning"});return}(te=d.value)!=null&&te.restoreTagsBeforeSubmit&&await d.value.restoreTagsBeforeSubmit();const re=g.value||{},ne={...h.value,meta:{...re,...re.meta||{}}};console.log("Payload before submit:",ne);try{const U=await fetch(`/api/cms/${$}/${R||""}`,{method:R?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ne)});if(!U.ok){let q;try{const O=await U.json();q=JSON.stringify(O,null,2)}catch{q=await U.text()}throw new Error(`HTTP ${U.status}: ${q}`)}if(!R)try{const q=await U.json(),O=q.id||((be=q.data)==null?void 0:be.id);O&&a.name==="createArticle"&&await o.push(`/collections/${$}/${O}`)}catch(q){console.warn("Could not parse response to get ID:",q)}Z.notify({title:r("cms.common.success"),message:r("cms.common.successMessage"),type:"success"})}catch(U){console.error("Submit error:",U),Z.notify({title:r("cms.common.error"),message:"Помилка збереження",type:"error"})}};return(T,$)=>{var R,H,re,ne;return t.openBlock(),t.createElementBlock("div",vy,[t.createElementVNode("div",Ny,[t.createVNode(sl,{items:E.value,onNavigate:D},null,8,["items"]),t.createElementVNode("div",Cy,[t.createElementVNode("div",Sy,[t.createElementVNode("button",{onClick:$[0]||($[0]=ee=>t.unref(o).back()),class:"p-2 text-gray-500 rounded-full hover:text-gray-900 dark:text-gray-400 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"},[t.createVNode(t.unref(fn),{class:"w-5 h-5"})]),t.createElementVNode("h1",Vy,[t.createTextVNode(t.toDisplayString(T.$t("cms.builder.editCollection"))+" ",1),t.createElementVNode("span",null,'"'+t.toDisplayString(h.value.title)+'"',1)]),t.createElementVNode("a",{href:`https://cms.opengis.info/${t.unref(n)}/guides/content/`,target:"_blank",title:T.$t("cms.guide.content")},[t.createVNode(t.unref(gt),{class:"w-5 h-5"})],8,Dy)]),t.createElementVNode("div",Ty,[t.createElementVNode("button",{onClick:P,type:"submit",class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[t.createVNode(t.unref(_n),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(T.$t("cms.builder.save")),1)])])]),t.createElementVNode("div",Ay,[t.createElementVNode("div",Iy,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value,ee=>(t.openBlock(),t.createElementBlock("button",{key:ee.id,onClick:ge=>b.value=ee.id,class:t.normalizeClass(["inline-flex flex-1 items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm data-[state=active]:bg-blue-50 data-[state=active]:text-blue-700 data-[state=active]:border-blue-200",ee.id===b.value?"bg-blue-50 text-blue-700 border-blue-200":""])},t.toDisplayString(ee.name),11,$y))),128))]),t.createElementVNode("div",Ly,[t.createElementVNode("label",My,t.toDisplayString(T.$t("cms.collections.pinPublication")),1),t.createElementVNode("div",Oy,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",id:"is_pin","onUpdate:modelValue":$[1]||($[1]=ee=>S.value=ee),class:"sr-only"},null,512),[[t.vModelCheckbox,S.value]]),t.createElementVNode("div",{class:t.normalizeClass(["w-5 h-5 border-2 rounded transition-all duration-200 cursor-pointer flex items-center justify-center",(R=h.value)!=null&&R.is_pin?"bg-sky-600 border-sky-600":"bg-white border-gray-300 hover:border-sky-400 dark:bg-gray-700 dark:border-gray-600 dark:hover:border-sky-400"]),onClick:N},[(H=h.value)!=null&&H.is_pin?(t.openBlock(),t.createElementBlock("svg",By,[...$[7]||($[7]=[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"},null,-1)])])):t.createCommentVNode("",!0)],2)])])])]),t.withDirectives(t.createElementVNode("div",Fy,[(re=s.value)!=null&&re.length?(t.openBlock(),t.createBlock(t.unref(z.VForm),{key:0,modelValue:h.value,"onUpdate:modelValue":$[2]||($[2]=ee=>h.value=ee),schema:p.value,form:i.value,"onUpdate:form":$[3]||($[3]=ee=>i.value=ee)},null,8,["modelValue","schema","form"])):t.createCommentVNode("",!0)],512),[[t.vShow,b.value==="content"]]),t.withDirectives(t.createElementVNode("div",Py,[t.createVNode(t.unref(z.VForm),{schema:f.value,values:g.value,"onUpdate:values":$[4]||($[4]=ee=>g.value=ee),form:c.value,"onUpdate:form":$[5]||($[5]=ee=>c.value=ee)},null,8,["schema","values","form"])],512),[[t.vShow,b.value==="seo"]]),b.value==="tags"?(t.openBlock(),t.createElementBlock("div",Ry,[t.createVNode(by,{ref_key:"tagsForm",ref:d,modelValue:h.value,"onUpdate:modelValue":$[6]||($[6]=ee=>h.value=ee)},null,8,["modelValue"])])):t.createCommentVNode("",!0),b.value==="preview"?(t.openBlock(),t.createElementBlock("div",Uy,[t.createVNode(Ey,{slug:(ne=h.value)==null?void 0:ne.slug,preview_path:m.value},null,8,["slug","preview_path"])])):t.createCommentVNode("",!0)])}}}),jy=t.defineAsyncComponent(()=>Promise.resolve().then(()=>o1)),qy=t.defineAsyncComponent(()=>Promise.resolve().then(()=>Ox)),Hy=t.defineAsyncComponent(()=>Promise.resolve().then(()=>u1)),Gy={collections:Qn,articles:il,createArticle:ns,editArticle:ns,editCollection:rs,menu:jy,editMenu:qy,createMenu:Hy},Wy=Qn,Yy=e=>Gy[e]??Wy,zy={key:1,class:"p-4 text-sm text-slate-600 dark:text-slate-300"},Ky=t.defineComponent({__name:"CmsContentWrapper",setup(e){const r=Ce.useRoute(),n=t.getCurrentInstance();if(!n)throw new Error("CmsContentWrapper must be used within a component instance");const o=t.computed(()=>{const f=n.appContext.config.globalProperties.$route;if(!f)throw new Error("Vue Router is not registered on the app instance");return f}),a=t.computed(()=>r??o.value),l=t.computed(()=>{var f;return((f=a.value)==null?void 0:f.params)??{}}),s=t.computed(()=>{var f,g;return((f=l.value)==null?void 0:f.collection)??((g=l.value)==null?void 0:g.type)}),i=t.computed(()=>{var f;return(f=l.value)==null?void 0:f.id}),c=t.computed(()=>gy(s.value,i.value)),d=t.computed(()=>Yy(c.value.type)),m=t.computed(()=>`${c.value.type}-${c.value.collection??""}-${c.value.id??""}`),u=t.computed(()=>{const{type:f,collection:g,id:h}=c.value,k={...l.value};return s.value?k.collection=s.value:delete k.collection,f==="articles"?k.id=g:f==="createArticle"?delete k.id:f==="editCollection"?k.id=g:f==="editArticle"&&h?k.id=h:delete k.id,k}),p=new Proxy({},{get(f,g,h){const k=a.value;if(!k)return;if(g==="params")return u.value;const b=Reflect.get(k,g,h);return typeof b=="function"?b.bind(k):b},has(f,g){if(g==="params")return!0;const h=a.value;return h?Reflect.has(h,g):!1},ownKeys(){const f=a.value;return f?Reflect.ownKeys(f):["params"]},getOwnPropertyDescriptor(f,g){if(g==="params")return{configurable:!0,enumerable:!0,value:u.value};const h=a.value;if(!h)return;const k=Reflect.getOwnPropertyDescriptor(h,g);if(k)return{...k,configurable:!0}}});return t.provide(Ce.routeLocationKey,p),(f,g)=>d.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(d.value),{key:m.value})):(t.openBlock(),t.createElementBlock("div",zy,t.toDisplayString(f.$t("cms.navigation.collections")),1))}}),Xy={class:"space-y-6 max-w-7xl mx-auto"},Qy={class:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"},Zy={class:"flex items-center gap-2"},Jy={class:"text-3xl font-bold text-slate-800 dark:text-slate-100 mb-2"},e1=["href","title"],t1={class:"text-slate-600 dark:text-slate-300"},r1={class:"overflow-hidden bg-white border border-gray-200 rounded-lg shadow-sm dark:bg-gray-800 dark:border-gray-700"},n1={key:0,class:"p-4 border-b border-gray-200 sm:p-6 dark:border-gray-700"},os=t.defineComponent({__name:"MenuPage",setup(e){const{t:r,locale:n}=ue(),o=Ce.useRouter(),a=t.ref(""),l=t.ref([]),s=t.ref([]),i=t.ref(""),c=t.ref([{name:"name",title:r("cms.menu.form.name"),type:"text"},{name:"description",title:r("cms.menu.form.description"),type:"text"},{name:"locale",title:r("cms.menu.form.language"),type:"select",data:[{text:"uk",id:"uk"},{text:"en",id:"en"}]}]),d=async()=>{const h=await(await fetch("/api/cms-menu")).json(),k=h.rows;l.value=k;const b=(h.filters||[]).map(x=>{const{extra:w,title:E,...D}=x;return D});s.value=b},m=g=>{o.push(`/menu/edit/${g==null?void 0:g.menu_id}`)},u=async g=>{try{await fetch(`/api/cms-menu/${g==null?void 0:g.menu_id}`,{method:"DELETE"}),await Z.notify({title:r("cms.menu.menuDeleted"),type:"success",message:r("cms.menu.menuDeleted")}),await d()}catch{Z.notify({title:r("cms.menu.menuDeleteError"),type:"error",message:r("cms.menu.menuDeleteError")})}},p=(g,h)=>{if(!h)return!0;const k=h.toLowerCase();return c.value.some(b=>{const x=g[b.name];return x&&x.toString().toLowerCase().includes(k)})},f=g=>{const h=Object.entries(g==null?void 0:g.data).filter(([,k])=>k!=null).map(([k,b])=>`${k}=${b}`).join("|");i.value=h};return t.onMounted(d),(g,h)=>{var b;const k=t.resolveComponent("router-link");return t.openBlock(),t.createElementBlock("div",Xy,[t.createElementVNode("div",Qy,[t.createElementVNode("div",null,[t.createElementVNode("div",Zy,[t.createElementVNode("h1",Jy,t.toDisplayString(g.$t("cms.menu.title")),1),t.createElementVNode("a",{href:`https://cms.opengis.info/${t.unref(n)}/guides/menu/`,target:"_blank",title:g.$t("cms.guide.menu")},[t.createVNode(t.unref(gt),{class:"w-5 h-5"})],8,e1)]),t.createElementVNode("p",t1,t.toDisplayString(g.$t("cms.menu.description")),1)]),t.createVNode(k,{to:"/menu/create",class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105"},{default:t.withCtx(()=>[t.createVNode(t.unref(lt),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(g.$t("cms.menu.menuAdd")),1)]),_:1})]),t.createElementVNode("div",r1,[((b=s.value)==null?void 0:b.length)>0?(t.openBlock(),t.createElementBlock("div",n1,[t.createVNode(t.unref(Lo),{schema:s.value,view:"inline",onChange:f},null,8,["schema"])])):t.createCommentVNode("",!0),t.createVNode(Zn,{rows:l.value,columns:c.value,query:a.value,filterFn:p,onEdit:m,onDelete:u},null,8,["rows","columns","query"])])])}}}),o1=Object.freeze(Object.defineProperty({__proto__:null,default:os},Symbol.toStringTag,{value:"Module"})),a1={class:"space-y-6 max-w-7xl mx-auto"},l1={class:"flex items-center justify-between"},s1={class:"flex items-center gap-4"},i1={class:"text-2xl font-semibold text-gray-900 dark:text-white"},c1={class:"flex items-center space-x-3"},d1={class:"max-w-[1000px]"},as=t.defineComponent({__name:"MenuAddPage",setup(e){z.inputs["vs-input-monaco-editor"]=Gr;const{t:r}=ue(),n=Ce.useRouter();Ce.useRoute();const o=t.ref([{key:"name",title:r("cms.menu.form.name"),type:"text",placeholder:r("cms.menu.form.name"),required:!0,validators:["required"]},{key:"description",title:r("cms.menu.form.description"),type:"text",placeholder:r("cms.menu.form.description"),required:!0,validators:["required"]},{key:"locale",title:r("cms.menu.form.language"),type:"select",placeholder:r("cms.menu.form.language"),options:[{text:"Ukrainian",id:"uk"},{text:"English",id:"en"}],required:!0,validators:["required"]},{key:"content",title:r("cms.menu.form.content"),type:"monaco-editor",height:"500px",language:"yaml",theme:"vs-light"}]),a=t.ref({}),l=t.ref({}),s=async()=>{try{if(await l.value.validate()){Z.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.menu.createMenuFailed")});return}await fetch("/api/cms-menu",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a.value)}),Z.notify({title:r("cms.common.success"),type:"success",message:r("cms.common.successMessage")}),a.value={},n.push("/menu")}catch(i){console.log(i),Z.notify({title:r("cms.common.error"),type:"error",message:r("cms.common.errorMessage")})}};return(i,c)=>(t.openBlock(),t.createElementBlock("div",a1,[t.createElementVNode("div",l1,[t.createElementVNode("div",s1,[t.createElementVNode("button",{onClick:c[0]||(c[0]=d=>t.unref(n).back()),class:"p-2 text-gray-500 rounded-full hover:text-gray-900 dark:text-gray-400 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"},[t.createVNode(t.unref(fn),{class:"w-5 h-5"})]),t.createElementVNode("h1",i1,t.toDisplayString(i.$t("cms.menu.menuAdd")),1)]),t.createElementVNode("div",c1,[t.createElementVNode("button",{onClick:s,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[t.createVNode(t.unref(_n),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(i.$t("cms.common.actions.save")),1)])])]),t.createElementVNode("div",d1,[t.createVNode(t.unref(z.VForm),{schema:o.value,modelValue:a.value,"onUpdate:modelValue":c[1]||(c[1]=d=>a.value=d),form:l.value,"onUpdate:form":c[2]||(c[2]=d=>l.value=d)},null,8,["schema","modelValue","form"])])]))}}),u1=Object.freeze(Object.defineProperty({__proto__:null,default:as},Symbol.toStringTag,{value:"Module"})),m1={},p1={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function f1(e,r){return t.openBlock(),t.createElementBlock("svg",p1,[...r[0]||(r[0]=[t.createStaticVNode('<circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle>',6)])])}const g1=dt(m1,[["render",f1]]),h1={key:0,class:"p-3 flex items-center gap-x-3 cursor-grab bg-gray-100 border border-gray-300 rounded-lg font-medium text-sm text-gray-800 dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-200"},b1={key:0,class:"text-xs text-gray-500 dark:text-neutral-400 ml-2"},y1={key:1,class:"p-3 flex items-center gap-x-2 bg-gray-100 border border-gray-300 rounded-lg dark:bg-neutral-900 dark:border-neutral-700"},_1={class:"text-sm font-medium text-gray-800 dark:text-neutral-200 shrink-0"},x1=t.defineComponent({__name:"MenuItem",props:{title:{},value:{}},emits:["delete","update:value"],setup(e,{emit:r}){const n=e,o=r,a=t.ref(!1),l=t.ref(""),s=()=>{typeof n.value=="string"&&(l.value=n.value,a.value=!0)},i=()=>{typeof n.value=="string"&&(o("update:value",l.value),a.value=!1)},c=()=>{a.value=!1,l.value=""};return(d,m)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([{"space-y-1":typeof e.value!="string"},"dark:bg-transparent"])},[a.value?(t.openBlock(),t.createElementBlock("div",y1,[t.createElementVNode("span",_1,t.toDisplayString(e.title)+":",1),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":m[1]||(m[1]=u=>l.value=u),onKeyup:[t.withKeys(i,["enter"]),t.withKeys(c,["esc"])],onBlur:i,class:"flex-1 px-2 py-1 text-sm border border-gray-300 rounded dark:bg-neutral-800 dark:border-neutral-600 dark:text-neutral-200 focus:outline-none focus:ring-2 focus:ring-blue-500",type:"text",placeholder:"/link"},null,544),[[t.vModelText,l.value]]),t.createElementVNode("button",{onClick:t.withModifiers(i,["stop"]),class:"shrink-0 p-1 text-green-600 dark:text-green-400 hover:bg-green-50 dark:hover:bg-green-900/20 rounded",title:"Save"},[t.createVNode(t.unref(Fs),{class:"size-4"})]),t.createElementVNode("button",{onClick:t.withModifiers(c,["stop"]),class:"shrink-0 p-1 text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 rounded",title:"Cancel"},[t.createVNode(t.unref(Ys),{class:"size-4"})])])):(t.openBlock(),t.createElementBlock("div",h1,[t.createTextVNode(t.toDisplayString(e.title)+" ",1),typeof e.value=="string"?(t.openBlock(),t.createElementBlock("span",b1,t.toDisplayString(e.value),1)):t.createCommentVNode("",!0),typeof e.value=="string"?(t.openBlock(),t.createBlock(t.unref(yn),{key:1,class:"shrink-0 size-4 ml-auto text-gray-500 dark:text-neutral-500 cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:t.withModifiers(s,["stop"])})):t.createCommentVNode("",!0),t.createVNode(t.unref(st),{class:"shrink-0 size-4 text-gray-500 dark:text-neutral-500 cursor-pointer hover:text-red-600 dark:hover:text-red-400",onClick:m[0]||(m[0]=t.withModifiers(u=>o("delete"),["stop"]))}),t.createVNode(g1,{class:"shrink-0 size-4 cursor-pointer text-gray-500 dark:text-neutral-500"})]))],2))}}),k1={class:"space-y-1"},w1=t.defineComponent({__name:"MenuList",props:{list:{type:Array,default:()=>[]},inside:{type:Boolean,default:!1}},emits:["update:list","delete:item"],setup(e,{emit:r}){const{t:n}=ue(),o=e,a=r,l=t.ref([]);t.watch(()=>o.list,m=>{l.value=m?[...m]:[]},{immediate:!0,deep:!0});const s=()=>{a("update:list",l.value)},i=m=>{Z.confirm({title:n("cms.builder.deleteTitle"),message:n("cms.builder.deleteObject"),type:"error",onConfirm:()=>{a("update:list",l.value),a("delete:item",m)}})},c=(m,u)=>{m.value=u,t.nextTick(()=>{l.value=[...l.value],a("update:list",l.value)})},d=(m,u)=>{m.children=u,t.nextTick(()=>{l.value=[...l.value],a("update:list",l.value)})};return(m,u)=>{const p=t.resolveComponent("MenuList",!0);return t.openBlock(),t.createBlock(t.unref(ko),{tag:"ul",list:l.value,group:{name:"nested",pull:!0,put:!0},"item-key":"id",class:t.normalizeClass(["nested-sortable space-y-1",{"ps-5 dark:bg-transparent":e.inside}]),onChange:s,onEnd:s},{item:t.withCtx(({element:f})=>[t.createElementVNode("div",k1,[t.createVNode(x1,{title:f.title,value:f.value,onDelete:g=>i(f),"onUpdate:value":g=>c(f,g)},null,8,["title","value","onDelete","onUpdate:value"]),Array.isArray(f.children)?(t.openBlock(),t.createBlock(p,{key:0,list:f.children,inside:!0,"onUpdate:list":g=>d(f,g),"onDelete:item":i},null,8,["list","onUpdate:list"])):t.createCommentVNode("",!0)])]),_:1},8,["list","class"])}}}),E1={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},v1=t.defineComponent({__name:"AddNewItemInTree",props:{isOpen:{type:Boolean,required:!0},isOpenModifiers:{}},emits:t.mergeModels(["addNewItem"],["update:isOpen"]),setup(e,{emit:r}){const{t:n}=ue(),o=t.useModel(e,"isOpen"),a=t.ref({}),l=r,s=t.ref({}),i={title:{type:"text",label:n("cms.menu.form.name"),required:!0,placeholder:n("cms.menu.form.name"),validators:["required"]},value:{type:"text",label:n("cms.menu.form.value"),required:!0,placeholder:n("cms.menu.form.value"),validators:["required"]}},c=async()=>{if(await a.value.validate()){Z.notify({type:"warning",title:n("cms.common.actions.warning"),message:n("cms.menu.createMenuFailed")});return}l("addNewItem",s.value),s.value={}};return(d,m)=>(t.openBlock(),t.createBlock(t.unref(Z.VsModal),{teleport:"#modal",visible:o.value,title:d.$t("cms.menu.createMenu"),template:"default",closeClickBack:!1,onClose:m[3]||(m[3]=u=>o.value=!1)},{footer:t.withCtx(()=>[t.createElementVNode("div",E1,[t.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:m[2]||(m[2]=u=>{o.value=!1,s.value={}})},t.toDisplayString(d.$t("cms.common.actions.cancel")),1),t.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},t.toDisplayString(d.$t("cms.common.actions.save")),1)])]),default:t.withCtx(()=>[t.createVNode(t.unref(z),{form:a.value,"onUpdate:form":m[0]||(m[0]=u=>a.value=u),modelValue:s.value,"onUpdate:modelValue":m[1]||(m[1]=u=>s.value=u),schema:i},null,8,["form","modelValue"])]),_:1},8,["visible","title"]))}}),N1=t.defineComponent({__name:"MenuBody",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){z.inputs["vs-input-monaco-editor"]=Gr;const{t:r}=ue(),n=t.ref(!1),o=t.ref(null),a=t.useModel(e,"modelValue"),l=t.ref({}),s=async p=>{try{if(await l.value.validate()){Z.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.menu.createMenuFailed")});return}n.value=!1,p.id=Math.random().toString(36).substr(2,9),p.children=[],a.value.items.unshift(p)}catch(f){console.log(f)}},i=t.ref([{key:"name",title:r("cms.common.title"),type:"text",placeholder:r("cms.common.title"),required:!0,validators:["required"]},{key:"description",title:r("cms.common.description"),type:"text",placeholder:r("cms.common.description"),required:!0,validators:["required"]},{key:"locale",title:r("cms.menu.form.language"),type:"select",placeholder:r("cms.menu.form.language"),required:!0,options:[{text:"Ukrainian",id:"uk"},{text:"English",id:"en"}],validators:["required"]}]),c=p=>{let f=[];for(const g in p)typeof p[g]=="object"?f.push({title:g,value:"",id:Math.random().toString(36).substr(2,9),children:c(p[g])}):f.push({title:g,value:p[g],id:Math.random().toString(36).substr(2,9),children:[]});return f},d=p=>{a.value.items=p},m=p=>{u(a.value.items,p.id)};function u(p,f){for(let g=p.length-1;g>=0;g--){if(p[g].id===f)return p.splice(g,1),!0;if(p[g].children&&p[g].children.length&&u(p[g].children,f))return!0}return!1}return t.onBeforeMount(()=>{Array.isArray(a.value.items)||(a.value.items=c(a.value.items))}),(p,f)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(z.VForm),{schema:i.value,modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=g=>a.value=g),form:l.value,"onUpdate:form":f[1]||(f[1]=g=>l.value=g)},null,8,["schema","modelValue","form"]),t.createElementVNode("button",{onClick:f[2]||(f[2]=g=>n.value=!0),class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium w-min ml-auto my-6 h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[t.createVNode(t.unref(lt),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(p.$t("cms.menu.createMenu")),1)]),t.createVNode(v1,{isOpen:n.value,"onUpdate:isOpen":f[3]||(f[3]=g=>n.value=g),form:o.value,"onUpdate:form":f[4]||(f[4]=g=>o.value=g),onAddNewItem:s},null,8,["isOpen","form"]),t.createVNode(w1,{class:"px-2",list:a.value.items,"onUpdate:list":d,"onDelete:item":m},null,8,["list"])],64))}});/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */function ls(e){return typeof e>"u"||e===null}function C1(e){return typeof e=="object"&&e!==null}function S1(e){return Array.isArray(e)?e:ls(e)?[]:[e]}function V1(e,r){var n,o,a,l;if(r)for(l=Object.keys(r),n=0,o=l.length;n<o;n+=1)a=l[n],e[a]=r[a];return e}function D1(e,r){var n="",o;for(o=0;o<r;o+=1)n+=e;return n}function T1(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var A1=ls,I1=C1,$1=S1,L1=D1,M1=T1,O1=V1,It={isNothing:A1,isObject:I1,toArray:$1,repeat:L1,isNegativeZero:M1,extend:O1};function ss(e,r){var n="",o=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!r&&e.mark.snippet&&(n+=`
|
|
253
|
+
`,g.parentNode.appendChild(y)};return t.onMounted(()=>{var f,g;(g=(f=r.value)==null?void 0:f.filter(y=>typeof y=="object"))==null||g.forEach(y=>y.id?y.id:y.id=Math.random().toString(36).substring(2,15))}),(f,g)=>(t.openBlock(),t.createElementBlock("div",Cg,[t.createElementVNode("div",Sg,[t.createElementVNode("div",Vg,[t.createElementVNode("table",Dg,[t.createElementVNode("thead",Tg,[t.createElementVNode("tr",Ag,[g[4]||(g[4]=t.createElementVNode("th",{class:"h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center"},null,-1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colModel,y=>(t.openBlock(),t.createElementBlock("th",{key:y.name,class:"h-10 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 min-w-[150px]"},t.toDisplayString(y.label||y.title||y.name),1))),128)),t.createElementVNode("th",$g,t.toDisplayString(f.$t("cms.table.actions")),1)])]),t.createElementVNode("tbody",Ig,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.value,(y,x)=>(t.openBlock(),t.createElementBlock("tr",{key:y==null?void 0:y.id,class:t.normalizeClass(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move",{"opacity-50":n.value===y}]),draggable:"true",onDragstart:h=>l(h,y,x),onDragover:h=>s(h),onDrop:h=>u(h,x),onDragenter:h=>i(h,x),onDragleave:g[2]||(g[2]=h=>c(h))},[t.createElementVNode("td",Mg,[t.createElementVNode("div",Og,[t.createVNode(t.unref(Ro))])]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.colModel,h=>(t.openBlock(),t.createElementBlock("td",{key:h.name,class:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-slate-600 dark:text-slate-400 text-sm"},[h.type==="Texteditor"?(t.openBlock(),t.createElementBlock("span",{key:0,innerHTML:y[h.key]||"-"},null,8,Bg)):h.type==="File"?(t.openBlock(),t.createElementBlock("div",Fg,[Array.isArray(y[h.key])&&y[h.key].length>0?(t.openBlock(),t.createElementBlock("div",Pg,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d(y[h.key]),(k,w)=>(t.openBlock(),t.createElementBlock("div",{key:w,class:"relative w-8 h-8 rounded overflow-hidden bg-gray-100 dark:bg-gray-700 flex-shrink-0"},[t.createElementVNode("img",{src:k,alt:`Image ${w+1}`,class:"w-full h-full object-cover",onError:g[0]||(g[0]=E=>p(E))},null,40,Rg)]))),128)),m(y[h.key])>0?(t.openBlock(),t.createElementBlock("span",Ug," +"+t.toDisplayString(m(y[h.key])),1)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",jg,[...g[5]||(g[5]=[t.createElementVNode("svg",{class:"w-4 h-4 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z","clip-rule":"evenodd"})],-1)])]))])):(t.openBlock(),t.createElementBlock("span",qg,t.toDisplayString(y[h.key]||"-"),1))]))),128)),t.createElementVNode("td",Hg,[t.createVNode(wg,{item:y,colModel:e.colModel,modelValue:r.value,"onUpdate:modelValue":g[1]||(g[1]=h=>r.value=h)},null,8,["item","colModel","modelValue"])])],42,Lg))),128)),a.value?(t.openBlock(),t.createElementBlock("tr",Gg)):t.createCommentVNode("",!0)])])])]),t.createVNode(Ng,{colModel:e.colModel,modelValue:r.value,"onUpdate:modelValue":g[3]||(g[3]=y=>r.value=y)},null,8,["colModel","modelValue"])]))}},Gl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAACbCAIAAABJbgHoAAAGfklEQVR4Ae3d7W6baBSF0d7/7Q6IDxkzmrHEQU2DHZudWH1XflRHcXNqVnka4tL01+qNAIGwwK/wfusJEFjPyexyuUzTNAxD3/dd1/3z/1vXdX3fD8MwTdPlcoFNoFmBlzJblmWapr7vb10d/9j3/TRNy7I0a+3AmxV4MrPr9TqO43FXnz06juP1em1W3IE3KPBMZvM8b1eGn7V0/P6u6+Z5bpDbIbcp8OXMnv4k9jG8cRzbRHfUrQl8LbNhGD7W8sp7hmFoTdzxNijwhcxOb+zWp9IaPO1aO+RHMzvxWvHjZz9Xj62ddq0d70OZzfP8sY1z3+MVkdbOvKaO935m1+v1xdcVHwmy6zqv8jd15jV1sPczi14u7gt06djUmdfUwd7JbFmWfQnp2T0iTZ187RzsncymaUqntd8/TVM79I60HYE7mT14v+I+lVfmvu+P6W93UQ7eCLyxwMd7d48yu1wurzTz3Mce3Mu/LMs4jt3/b88t91EE0gK383Mcx/1XQEeZffMV4+34D64bb42lmewn8LpA13X7l/SOMgvd9nF8DAc3hXzzFezx8/QogWOB/VdAR5n9yGm9f3K/fZ32DX99dwznUQKPC3Rdt53AR5n9yGm9f3Lbs7wNjx+hn0ngHQS2E/gos596otuT+234qefj1yXwnMB2AsvsOUAfReC+wEOZuWi8D+lnEPhc4KHM3u0lkM8PxyME3lHgocze7QX9d4T0nAh8LvBQZu/219M/8tn1c0OPEDgS2P/V1NFLIO92s9U0TT/y5eKRpccI/Emg67r9/UxHma3r+s2fQPZ/AGyfcLfhlW8O+ScK7yOQEvjtm5Heyeybrxv3fwBsde2HZVnmeZ68EXhjgXme9/cNr+u976Hvn3XuIzcTeE7gzmezdV19k4LnZH0UgU3gfma+5c6GZSDwnMD9zNZ19Q3knsP1UQRuAg9llr503P8DOL8xBP4+gUczW9c1dFPIwb/j/Pu4HVGbAl/ILFGaxto87Vo76q9ldu7Vo2vF1s62Zo/3y5ndXhF58aYn/41gsydcmwf+TGbrur5y39Nv96G06e6omxJ4MrObkf/ivalzxcE+LfBSZtuverlcpmkahqHv++16suu6vu+HYZim6eCbnG5LDAT+VoFzMvtbdRwXgVMEZHYKoyUEjgRkdqTjMQKnCMjsFEZLCBwJyOxIx2METhGQ2SmMlhA4EpDZkY7HCJwiILNTGC0hcCTwX2a3/1/QjwQInCuwlSezc2FtI1ACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhASkFkI1loCJSCzsjARCAnILARrLYESkFlZmAiEBGQWgrWWQAnIrCxMBEICMgvBWkugBGRWFiYCIQGZhWCtJVACMisLE4GQgMxCsNYSKAGZlYWJQEhAZiFYawmUgMzKwkQgJCCzEKy1BEpAZmVhIhAS2DL7F8r/OP7dtZNpAAAAAElFTkSuQmCC",Wl={faq:{schema:{title:{type:"text",label:"Назва",placeholder:"Назва"},show_dots:{type:"switcher",label:"Показувати точки"},show_index:{type:"switcher",conditions:["show_dots","==","true"],label:"Показувати нумерацію"},index_type:{type:"combobox",conditions:["show_index","==","true"],label:"Тип нумерації",options:[{id:"decimal",text:"Десятковий"},{id:"upper-alpha",text:"Латинські великі букви"},{id:"lower-alpha",text:"Латинські маленькі букви"},{id:"upper-roman",text:"Римські великі цифри"},{id:"lower-roman",text:"Римські маленькі цифри"},{id:"upper-cyrillic",text:"Кириличні великі букви"},{id:"lower-cyrillic",text:"Кириличні маленькі букви"}]},openfirst:{type:"switcher",label:"Відкрити перший елемент?"},collapse_mode:{type:"switcher",label:"Не згортати попередній елемент?"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"}],required:!0,validators:["required"]},{key:"section",type:"reference",label:"Вкладений контент",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},banner:{schema:{title:{type:"text",label:"Назва",placeholder:"Назва"},image:{type:"file",label:"Зображення",placeholder:"Зображення"}}},photoGrid:{schema:{columns:{type:"number",label:"Кількість колонок",placeholder:"Кількість колонок",default:3},data:{type:"DataTable",colModel:[{key:"image",ua:"Зображення",type:"file"},{key:"caption",ua:"Заголовок",type:"text"}]}}},slider:{schema:{autoplay:{type:"switcher",label:"Автоматичне гортання?",default:!0},autoplaySpeed:{type:"number",label:"Швидкість автоматичного гортання(мс)",placeholder:"Швидкість автоматичного гортання(мс)",default:3e3},show_navigation:{type:"switcher",label:"Показувати кнопки навігації?"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"link",ua:"Посилання",type:"text"},{key:"image",ua:"Зображення",type:"file"},{key:"image_width",ua:"Ширина зображення(px)",type:"number",placeholder:"Ширина зображення"},{key:"image_height",ua:"Висота зображення(px)",type:"number",placeholder:"Висота зображення"},{ua:"Розтягувати по ширині",key:"stretch",type:"switcher"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"}]}}},video:{schema:{file:{type:"file",max_size:50,description:"Максимальний розмір файлу 50MB",label:"Завантажити відео",placeholder:"Завантажити відео"},hidden_gif:{type:"switcher",label:"Сховати GIF"},preview:{type:"file",label:"Прев'ю для відео"},link:{type:"text",label:"Посилання",placeholder:"Посилання"}}},about:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},text:{type:"tiptap-editor",label:"Текст",placeholder:"Текст"},url:{type:"file",label:"Зображення / відео",placeholder:"Посилання"}}},cards:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"img",ua:"Зображення",type:"file"},{key:"link",ua:"Посилання",type:"text"},{key:"description",ua:"Опис",type:"text"}]}}},usefulLinks:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"text",ua:"Назва",type:"text"},{key:"url",ua:"Посилання",type:"text"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"}]}}},team:{schema:{data:{type:"DataTable",colModel:[{key:"avatar",ua:"Аватар",type:"file"},{key:"title",ua:"Ім'я/ПІБ",type:"text"},{key:"description",ua:"Опис",type:"textarea",optional:!0},{key:"position",ua:"Посада",type:"text",tooltip:!0},{key:"email",ua:"Email",type:"text",optional:!0},{key:"tel",ua:"Телефон",type:"text",optional:!0},{key:"schedule",ua:"Графік прийому",type:"text",optional:!0},{key:"isinfo",type:"switcher",label:"Відображати кнопку 'Детальніше'"},{key:"slug",ua:"Slug",type:"text",label:"Унікальний ідентифікатор"}]}}},body:{schema:{background_color:{type:"switcher",label:"Додати білий фон?"},content:{type:"tiptap-editor",label:"Текст",placeholder:"Текст"}}},news:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},buttonText:{type:"text",label:"Текст кнопки",placeholder:"Текст кнопки"},buttonLink:{type:"text",label:"Посилання кнопки",placeholder:"Посилання кнопки"},tag:{type:"select",label:"Тег",placeholder:"Тег",data:"tag_id"},news_list:{type:"select",label:"Список новин",multiple:!0,placeholder:"Список новин",parent:"tag",data:"news_tag_id"}}},form:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},formUrl:{type:"text",label:"Посилання для відправки форми",placeholder:"Посилання"},schema:{label:"Схема форми",type:"DataTable",colModel:[{key:"name",ua:"Name",type:"text",placeholder:"Name"},{key:"label",ua:"Title",type:"text",placeholder:"Title"},{key:"type",ua:"Type",type:"combobox",options:[{text:"Text",id:"text"},{text:"Textarea",id:"textarea"},{text:"switcher",id:"switcher"},{text:"Email",id:"email"},{text:"Mask",id:"mask"},{text:"Number",id:"number"},{text:"Date",id:"date"},{text:"Datetime",id:"datetime"}]},{key:"mask",ua:"Маска",type:"text",conditions:["type","==","mask"],placeholder:"Маска"},{key:"placeholder",ua:"Плейсхолдер",type:"text",placeholder:"Placeholder"},{key:"required",ua:"Required",type:"switcher"}]}}},tabs:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},description:{type:"textarea",label:"Опис",placeholder:"Опис"},history_mode:{type:"switcher",label:"Використовувати історію сторінки?"},data:{type:"DataTable",colModel:[{key:"slug",type:"slug",label:"Slug",parent:"title",placeholder:"Slug"},{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"}],required:!0,validators:["required"]},{key:"section",type:"reference",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},vertical_tabs:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},history_mode:{type:"switcher",label:"Використовувати історію сторінки?"},data:{type:"DataTable",colModel:[{key:"slug",type:"slug",label:"Slug",parent:"title",placeholder:"Slug"},{key:"title",ua:"Назва",type:"text",required:!0,validators:["required"]},{key:"is_section",type:"Radio",label:"Заповнити секціями",options:[{id:"yes",text:"Так"},{id:"no",text:"Ні"},{id:"slug",text:"Привязати сторінку"}],required:!0,validators:["required"]},{key:"slug",type:"text",label:"Slug",placeholder:"Slug",conditions:["is_section","==","slug"]},{key:"section",type:"reference",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","yes"],required:!0,validators:["required"]},{key:"body",type:"tiptap-editor",label:"Тіло вкладки",placeholder:"Ваш контент",conditions:["is_section","==","no"],required:!0,validators:["required"]}]}}},documents:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},icon:{type:"file",label:"Завантажити іконку",placeholder:"Завантажити іконку"},show_icon:{type:"switcher",label:"Показувати іконку?"},documents:{type:"DataTable",colModel:[{key:"title",ua:"Назва",type:"text"},{key:"file",info:"Прев'ю доступно тільки для документів у форматі pdf, html, txt. Інші формати одразу завантажуються.",ua:"Файл",type:"file"}]}}},infoLine:{schema:{divider:{type:"file",label:"Завантажити розподілювач"},speed:{type:"number",label:"Швидкість автоматичного гортання(с)",placeholder:"Швидкість автоматичного гортання(с)",default:20},data:{type:"DataTable",colModel:[{key:"title",ua:"Текст",type:"text"}]}}},interested:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"title",ua:"Заголовок",type:"text"},{key:"link",ua:"Посилання",type:"text"},{key:"target_blank",ua:"Відкривати в новій вкладці?",type:"switcher"},{key:"color",ua:"Колір фону",type:"color"}]}}},contact:{schema:{title:{type:"text",label:"Заголовок",placeholder:"Заголовок"},data:{type:"DataTable",colModel:[{key:"type",ua:"Тип",type:"combobox",options:[{id:"email",text:"Email"},{id:"tel",text:"Телефон"},{id:"address",text:"Адреса"}]},{key:"title",ua:"Пошта",type:"text",conditions:["type","==","email"]},{key:"title",ua:"Телефон",type:"text",conditions:["type","==","tel"]},{key:"title",ua:"Адреса",type:"text",conditions:["type","==","address"]},{key:"description",ua:"Опис",type:"text"}]}}},iframe:{schema:{link:{type:"text",label:"Посилання",placeholder:"Посилання"},file:{type:"file",label:"Завантажити файл",placeholder:"Завантажити файл"},height:{type:"text",label:"Висота iframe(px)",placeholder:"Висота iframe(px)"}}}},cn=[{text:"reference.faq",id:"faq"},{text:"reference.banner",id:"banner"},{text:"reference.slider",id:"slider"},{text:"reference.photoGrid",id:"photoGrid"},{text:"reference.video",id:"video"},{text:"reference.about",id:"about"},{text:"reference.cards",id:"cards"},{text:"reference.usefulLinks",id:"usefulLinks"},{text:"reference.team",id:"team"},{text:"reference.body",id:"body"},{text:"reference.news",id:"news"},{text:"reference.form",id:"form"},{text:"reference.tabs",id:"tabs"},{text:"reference.vertical_tabs",id:"vertical_tabs"},{text:"reference.documents",id:"documents"},{text:"reference.infoLine",id:"infoLine"},{text:"reference.interested",id:"interested"},{text:"reference.contact",id:"contact"},{text:"reference.iframe",id:"iframe"}],Wg={class:"h-full w-full flex flex-col"},Yg={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},zg={class:"text-xs font-medium text-gray-600"},Kg={key:0,class:"text-xs text-gray-500"},Yl={__name:"cards-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Wg,[n[0]||(n[0]=t.createStaticVNode('<div class="flex-1 grid grid-cols-3 gap-1.5"><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div><div class="bg-gray-200 rounded p-1.5 flex flex-col"><div class="flex-1 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded"></div></div></div>',1)),t.createElementVNode("div",Yg,[t.createElementVNode("div",zg,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",Kg,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},Xg={class:"h-full w-full flex flex-col"},Qg={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},Zg={class:"text-xs font-medium text-gray-600"},Jg={key:0,class:"text-xs text-gray-500"},eh={__name:"faq-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Xg,[n[0]||(n[0]=t.createStaticVNode('<div class="h-3 bg-gray-500 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div><div class="mt-1 pt-1 border-t border-gray-200"><div class="space-y-0.5"><div class="h-1 bg-gray-200 rounded"></div><div class="h-1 bg-gray-200 rounded w-5/6"></div><div class="h-1 bg-gray-200 rounded w-4/5"></div></div></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div><div class="border border-gray-300 rounded p-1"><div class="flex items-center justify-between"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down w-2.5 h-2.5 text-gray-400"><path d="m6 9 6 6 6-6"></path></svg></div></div></div>',2)),t.createElementVNode("div",Qg,[t.createElementVNode("div",Zg,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",Jg,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},th={class:"h-full w-full flex flex-col"},rh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},nh={class:"text-xs font-medium text-gray-600"},oh={key:0,class:"text-xs text-gray-500"},zl={__name:"banner-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",th,[n[0]||(n[0]=t.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-16 h-10 bg-gray-300 rounded"></div></div><div class="absolute bottom-2 left-2"><div class="h-3 bg-gray-400 rounded w-16"></div></div></div>',1)),t.createElementVNode("div",rh,[t.createElementVNode("div",nh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",oh,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},ah={class:"h-full w-full flex flex-col"},lh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},sh={class:"text-xs font-medium text-gray-600"},ih={key:0,class:"text-xs text-gray-500"},ch={__name:"form-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",ah,[n[0]||(n[0]=t.createStaticVNode('<div class="h-3 bg-gray-500 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/4"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/3"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/4"></div><div class="h-5 bg-gray-200 rounded border border-gray-300"></div></div><div><div class="h-1.5 bg-gray-300 rounded mb-1 w-1/3"></div><div class="h-8 bg-gray-200 rounded border border-gray-300"></div></div></div><div class="h-6 bg-gray-600 rounded mt-2"></div>',3)),t.createElementVNode("div",lh,[t.createElementVNode("div",sh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",ih,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},dh={class:"h-full w-full flex flex-col"},uh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},mh={class:"text-xs font-medium text-gray-600"},ph={key:0,class:"text-xs text-gray-500"},Kl={__name:"news-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",dh,[n[0]||(n[0]=t.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-2"></div><div class="flex gap-2 flex-1"><div class="flex-1 space-y-2"><div class="bg-gray-200 rounded p-1.5"><div class="h-8 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-3/4"></div></div><div class="bg-gray-200 rounded p-1.5"><div class="h-8 bg-gray-300 rounded mb-1"></div><div class="h-1.5 bg-gray-400 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-3/4"></div></div></div><div class="w-20 space-y-1"><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div><div class="border-b border-gray-300 pb-1"><div class="h-1 bg-gray-300 rounded mb-1"></div><div class="h-1 bg-gray-300 rounded w-4/5"></div></div></div></div>',2)),t.createElementVNode("div",uh,[t.createElementVNode("div",mh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",ph,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},fh={class:"h-full w-full flex flex-col"},gh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},hh={class:"text-xs font-medium text-gray-600"},bh={key:0,class:"text-xs text-gray-500"},yh={__name:"team-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",fh,[n[0]||(n[0]=t.createStaticVNode('<div class="space-y-2 flex-1"><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div><div class="flex items-start gap-2"><div class="w-8 h-8 bg-gray-300 rounded flex-shrink-0"></div><div class="flex-1 min-w-0"><div class="h-2 bg-gray-400 rounded mb-1 w-2/3"></div><div class="h-1.5 bg-gray-300 rounded mb-1"></div><div class="flex gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone w-2.5 h-2.5 text-gray-400"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail w-2.5 h-2.5 text-gray-400"><rect width="20" height="16" x="2" y="4" rx="2"></rect><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-clock w-2.5 h-2.5 text-gray-400"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></div></div></div></div>',1)),t.createElementVNode("div",gh,[t.createElementVNode("div",hh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",bh,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},_h={class:"h-full w-full flex flex-col"},kh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},xh={class:"text-xs font-medium text-gray-600"},wh={key:0,class:"text-xs text-gray-500"},Xl={__name:"usefulLinks-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",_h,[n[0]||(n[0]=t.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-3"></div><div class="grid grid-cols-2 gap-2 flex-1"><div class="space-y-2"><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div></div><div class="space-y-2"><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div><div class="flex items-center justify-between p-1.5 border border-gray-300 rounded"><div class="h-1.5 bg-gray-300 rounded flex-1 mr-2"></div><div class="w-2 h-2 bg-gray-400 rounded-full"></div></div></div></div>',2)),t.createElementVNode("div",kh,[t.createElementVNode("div",xh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",wh,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},Eh={class:"h-full w-full flex flex-col"},vh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},Nh={class:"text-xs font-medium text-gray-600"},Ch={key:0,class:"text-xs text-gray-500"},Sh={__name:"video-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Eh,[n[0]||(n[0]=t.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-10 h-10 bg-gray-400 rounded-full flex items-center justify-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-play w-5 h-5 text-white ml-0.5"><polygon points="6 3 20 12 6 21 6 3"></polygon></svg></div></div><div class="absolute bottom-1.5 left-1.5 right-1.5"><div class="h-2 bg-gray-400 rounded mb-1"></div><div class="h-2 bg-gray-400 rounded w-3/4"></div></div></div><div class="mt-2 flex items-center gap-2"><div class="w-5 h-5 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded flex-1"></div></div>',2)),t.createElementVNode("div",vh,[t.createElementVNode("div",Nh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",Ch,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},Vh={class:"h-full w-full flex flex-col"},Dh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},Th={class:"text-xs font-medium text-gray-600"},Ah={key:0,class:"text-xs text-gray-500"},$h={__name:"about-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Vh,[n[0]||(n[0]=t.createStaticVNode('<div class="flex flex-1"><div class="flex-1 pr-2"><div class="h-4 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded w-4/5"></div><div class="h-2 bg-gray-300 rounded"></div><div class="h-2 bg-gray-300 rounded w-3/4"></div><div class="h-2 bg-gray-300 rounded"></div></div></div><div class="w-16 h-20 bg-gray-200 rounded flex items-center justify-center"><div class="w-6 h-6 bg-gray-300 rounded-full"></div></div></div>',1)),t.createElementVNode("div",Dh,[t.createElementVNode("div",Th,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",Ah,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},Ih={class:"h-full w-full flex flex-col"},Lh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},Mh={class:"text-xs font-medium text-gray-600"},Oh={key:0,class:"text-xs text-gray-500"},Bh={__name:"slider-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Ih,[n[0]||(n[0]=t.createStaticVNode('<div class="flex-1 bg-gray-200 rounded mb-2 relative"><div class="absolute inset-0 flex items-center justify-center"><div class="w-12 h-8 bg-gray-300 rounded"></div></div><div class="absolute left-1 top-1/2 transform -translate-y-1/2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-left w-4 h-4 text-gray-400"><path d="m15 18-6-6 6-6"></path></svg></div><div class="absolute right-1 top-1/2 transform -translate-y-1/2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right w-4 h-4 text-gray-400"><path d="m9 18 6-6-6-6"></path></svg></div></div><div class="h-3 bg-gray-300 rounded mb-2"></div><div class="h-6 w-20 bg-gray-400 rounded"></div><div class="flex justify-center gap-1 mt-2"><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div><div class="w-1.5 h-1.5 bg-gray-300 rounded-full"></div></div>',4)),t.createElementVNode("div",Lh,[t.createElementVNode("div",Mh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",Oh,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},Fh={class:"h-full flex flex-col"},Ph={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},Rh={class:"text-xs font-medium text-gray-600"},Uh={key:0,class:"text-xs text-gray-500"},jh={__name:"infoLine-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Fh,[n[0]||(n[0]=t.createStaticVNode('<div class="flex-1 bg-gray-200 rounded relative overflow-hidden"><div class="absolute inset-0 flex items-center"><div class="flex gap-8 whitespace-nowrap animate-pulse"><div class="h-3 bg-gray-400 rounded w-32"></div><div class="h-3 bg-gray-300 rounded w-24"></div><div class="h-3 bg-gray-400 rounded w-40"></div><div class="h-3 bg-gray-300 rounded w-28"></div><div class="h-3 bg-gray-400 rounded w-36"></div><div class="h-3 bg-gray-300 rounded w-20"></div></div></div><div class="absolute top-2 left-2 right-2 flex justify-between items-center"><div class="w-2 h-2 bg-gray-500 rounded-full"></div><div class="w-2 h-2 bg-gray-500 rounded-full"></div></div></div>',1)),t.createElementVNode("div",Ph,[t.createElementVNode("div",Rh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",Uh,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},qh={class:"h-full flex flex-col"},Hh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},Gh={class:"text-xs font-medium text-gray-600"},Wh={key:0,class:"text-xs text-gray-500"},Yh={__name:"tabs-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",qh,[n[0]||(n[0]=t.createStaticVNode('<div class="h-2 bg-gray-300 rounded mb-2"></div><div class="flex gap-1 mb-3"><div class="h-4 w-16 bg-gray-400 rounded"></div><div class="h-4 w-16 bg-gray-200 rounded"></div></div><div class="space-y-2 flex-1"><div class="h-2 bg-gray-300 rounded w-5/6"></div><div class="h-2 bg-gray-300 rounded"></div><div class="space-y-1 mt-3"><div class="flex items-center gap-2"><div class="w-2 h-2 bg-gray-400 rounded-full"></div><div class="h-1.5 bg-gray-300 rounded w-20"></div></div><div class="flex items-center gap-2"><div class="w-2 h-2 bg-gray-400 rounded-full"></div><div class="h-1.5 bg-gray-300 rounded w-16"></div></div></div></div>',3)),t.createElementVNode("div",Hh,[t.createElementVNode("div",Gh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",Wh,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},zh={class:"h-full flex flex-col"},Kh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},Xh={class:"text-xs font-medium text-gray-600"},Qh={key:0,class:"text-xs text-gray-500"},Ql={__name:"documents-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",zh,[n[0]||(n[0]=t.createStaticVNode('<div class="h-4 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5 flex-1"><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div><div class="flex items-center justify-between p-1.5 border-b border-gray-200"><div class="flex items-center gap-2"><div class="w-3 h-3 bg-gray-400 rounded-full"></div><div class="h-2 bg-gray-300 rounded flex-1 w-28"></div></div><div class="flex gap-1.5"><div class="w-3 h-3 bg-gray-200 rounded"></div><div class="w-3 h-3 bg-gray-200 rounded"></div></div></div></div>',2)),t.createElementVNode("div",Kh,[t.createElementVNode("div",Xh,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",Qh,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},Zh={class:"h-full flex flex-col"},Jh={class:"flex justify-between items-center mt-2 pt-2 border-t border-gray-300"},e0={class:"text-xs font-medium text-gray-600"},t0={key:0,class:"text-xs text-gray-500"},dn={faq:eh,banner:zl,slider:Bh,video:Sh,about:$h,cards:Yl,usefulLinks:Xl,team:yh,news:Kl,form:ch,tabs:Yh,vertical_tabs:Kl,documents:Ql,infoLine:jh,body:{__name:"body-skeleton",props:{text:{type:String,required:!0},count:{type:Number,required:!0}},setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",Zh,[n[0]||(n[0]=t.createStaticVNode('<div class="grid grid-cols-3 gap-2 flex-1"><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div><div class="flex flex-col"><div class="h-3 bg-gray-400 rounded mb-2"></div><div class="space-y-1.5"><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div><div class="h-4 bg-gray-200 rounded border border-gray-300 p-1.5"><div class="h-1.5 bg-gray-300 rounded w-3/4"></div></div></div></div></div>',1)),t.createElementVNode("div",Jh,[t.createElementVNode("div",e0,t.toDisplayString(r.$t(e.text)),1),e.count&&e.count>0?(t.openBlock(),t.createElementBlock("div",t0,t.toDisplayString(e.count),1)):t.createCommentVNode("",!0)])]))}},photoGrid:Yl,interested:Xl,contact:Ql,iframe:zl},r0={class:"grid grid-cols-1 md:grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-4"},n0=["onClick"],o0={class:"wireframe-block h-[240px] !p-4 border-2 border-dashed bg-white relative overflow-hidden transition-all rounded-lg shadow-sm border-gray-300 hover:border-gray-400 cursor-pointer"},a0=["src"],l0={__name:"vs-form-reference-choce",props:{modelValue:{type:String,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const r=t.useModel(e,"modelValue");return(n,o)=>(t.openBlock(),t.createElementBlock("div",r0,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(cn),a=>(t.openBlock(),t.createElementBlock("div",{key:a.id,onClick:l=>r.value=a.id,class:"relative"},[t.createElementVNode("div",o0,[t.unref(dn)[a.id]?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(dn)[a.id]),{key:0,text:a==null?void 0:a.text,count:(a==null?void 0:a.data)||0},null,8,["text","count"])):(t.openBlock(),t.createElementBlock("img",{key:1,src:t.unref(Gl),alt:"Team collaboration",class:"w-full h-full object-cover"},null,8,a0))])],8,n0))),128))]))}},s0={};function i0(e,r,n,o,a,l){const s=t.resolveComponent("vs-richtext");return t.openBlock(),t.createBlock(s,{class:"w-full"})}const vo=bt(s0,[["render",i0]]),c0={class:"flex gap-4"},d0={class:"text-sm text-gray-500 dark:text-gray-400 border flex items-center h-10 px-4 rounded-lg w-full"},u0={class:"flex items-center justify-between w-full p-4 border-t border-gray-200 dark:border-gray-700"},m0={__name:"vs-form-reference-add",props:t.mergeModels({title:{type:String,required:!0}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{t:r}=me();Y.inputs["vs-input-reference"]=No,Y.inputs["vs-input-tiptap-editor"]=vo;const n=t.useModel(e,"modelValue"),o=t.ref(!1),a=t.ref({}),l=t.ref(null),s=t.ref({}),i=t.computed(()=>{var u;return((u=Wl[l.value])==null?void 0:u.schema)||null}),c=async()=>{if(await a.value.validate()){Q.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.builder.editFieldFailed")});return}try{Object.keys(s.value).length!==0&&(n.value=[...n.value||[],{...s.value,id:Math.random().toString(36).substring(2,15),reference_type:l.value}]),o.value=!1,l.value=null,s.value={}}catch(d){console.log(d)}};return t.watch(o,()=>{o.value||(l.value=null,s.value={})}),(u,d)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("button",{type:"button",class:"inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-sky-500",onClick:d[0]||(d[0]=m=>o.value=!o.value)},t.toDisplayString(u.$t("cms.builder.create")),1),t.createVNode(t.unref(Q.VsDrawer),{visible:o.value,"onUpdate:visible":d[6]||(d[6]=m=>o.value=m),position:"right",closeClickBackdrop:!1,onClose:d[7]||(d[7]=m=>o.value=!1),title:l.value?u.$t("cms.builder."+l.value):u.$t("cms.builder.selectType"),size:"50vw"},{footer:t.withCtx(()=>[t.createElementVNode("div",u0,[t.createElementVNode("button",{onClick:d[5]||(d[5]=m=>o.value=!1),class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100"},t.toDisplayString(u.$t("cms.builder.cancel")),1),t.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},t.toDisplayString(u.$t("cms.builder.create")),1)])]),default:t.withCtx(()=>{var m;return[l.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",c0,[t.createElementVNode("div",d0,[t.createElementVNode("span",null,t.toDisplayString((m=t.unref(cn).find(p=>p.id===l.value))==null?void 0:m.text),1)]),t.createElementVNode("button",{class:"py-2.5 px-3 mb-4 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:d[2]||(d[2]=p=>l.value=null)},t.toDisplayString(u.$t("cms.builder.changeType")),1)]),i.value?(t.openBlock(),t.createBlock(t.unref(Y.VForm),{key:l.value,schema:i.value,modelValue:s.value,"onUpdate:modelValue":d[3]||(d[3]=p=>s.value=p),form:a.value,"onUpdate:form":d[4]||(d[4]=p=>a.value=p)},null,8,["schema","modelValue","form"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createBlock(l0,{key:0,modelValue:l.value,"onUpdate:modelValue":d[1]||(d[1]=p=>l.value=p),options:t.unref(cn)},null,8,["modelValue","options"]))]}),_:1},8,["visible","title"])]))}},p0={class:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity flex space-x-1 z-10"},f0={class:"flex items-center justify-between w-full p-4 border-t border-gray-200 dark:border-gray-700"},g0={__name:"vs-form-reference-controls",props:t.mergeModels({title:{type:String,required:!0}},{modelValue:{type:Object,default:()=>({})},modelModifiers:{},parent:{type:Array,default:()=>[]},parentModifiers:{}}),emits:["update:modelValue","update:parent"],setup(e){const{t:r}=me(),n=t.useModel(e,"modelValue"),o=t.useModel(e,"parent"),a=t.ref(!1),l=t.ref({}),s=t.ref({}),i=t.computed(()=>{var u;return((u=Wl[n.value.reference_type])==null?void 0:u.schema)||null});t.watch(a,u=>{u&&(l.value={...n.value})});const c=async()=>{try{if(await s.value.validate()){Q.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.builder.editFieldFailed")});return}n.value={...l.value},a.value=!1}catch(u){console.log(u)}};return(u,d)=>(t.openBlock(),t.createElementBlock("div",p0,[t.createElementVNode("button",{onClick:d[0]||(d[0]=m=>a.value=!a.value),class:"p-1.5 bg-white dark:bg-gray-800 rounded shadow-sm hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors border border-gray-200 dark:border-gray-700"},[t.createVNode(t.unref(Ht),{class:"h-4 w-4 text-gray-400"})]),t.createElementVNode("button",{onClick:d[1]||(d[1]=m=>o.value=o.value.filter(p=>p.id!==n.value.id)),class:"p-1.5 bg-white dark:bg-gray-800 rounded shadow-sm hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors border border-gray-200 dark:border-gray-700"},[t.createVNode(t.unref(ft),{class:"h-4 w-4 text-red-500"})]),t.createVNode(t.unref(Q.VsDrawer),{visible:a.value,"onUpdate:visible":d[5]||(d[5]=m=>a.value=m),onClose:d[6]||(d[6]=m=>a.value=!1),title:e.title,width:"50vw"},{footer:t.withCtx(()=>[t.createElementVNode("div",f0,[t.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:d[4]||(d[4]=m=>a.value=!1)},t.toDisplayString(u.$t("cms.common.actions.cancel")),1),t.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},t.toDisplayString(u.$t("cms.common.actions.save")),1)])]),default:t.withCtx(()=>[i.value?(t.openBlock(),t.createBlock(t.unref(Y.VForm),{key:0,form:s.value,"onUpdate:form":d[2]||(d[2]=m=>s.value=m),schema:i.value,modelValue:l.value,"onUpdate:modelValue":d[3]||(d[3]=m=>l.value=m),class:"-mr-[10px] ml-[10px] mt-[10px]"},null,8,["form","schema","modelValue"])):t.createCommentVNode("",!0)]),_:1},8,["visible","title"])]))}},h0={class:"w-full"},b0={key:0,class:"relative"},y0={class:"group wireframe-block h-[280px] !p-4 border-2 border-dashed bg-white relative overflow-hidden transition-all rounded-lg shadow-sm border-gray-00 hover:border-gray-400 cursor-grab"},_0=["src"],No={__name:"vs-form-reference-list",props:t.mergeModels({reference_type:{type:String,required:!0},title:{type:String,required:!0}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const r=a=>{var l;return(l=cn.find(s=>s.id===a))==null?void 0:l.text},n=t.useModel(e,"modelValue"),o=t.computed({get(){const a=n.value;return a==null?[]:Array.isArray(a)?a:[]},set(a){n.value=Array.isArray(a)?a:[]}});return t.watch(n,a=>{a!=null&&!Array.isArray(a)&&(n.value=[])},{immediate:!0}),(a,l)=>{var s;return t.openBlock(),t.createElementBlock("div",h0,[((s=o.value)==null?void 0:s.length)>0?(t.openBlock(),t.createBlock(t.unref(wo),{key:0,modelValue:o.value,"onUpdate:modelValue":l[1]||(l[1]=i=>o.value=i),"item-key":"id",handle:".drag-handle",class:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4"},{item:t.withCtx(({element:i,index:c})=>[i!=null&&i.reference_type?(t.openBlock(),t.createElementBlock("div",b0,[t.createElementVNode("div",y0,[(t.openBlock(),t.createElementBlock("div",{key:i.id,class:"absolute top-2 left-2 opacity-0 group-hover:opacity-100 border border-gray-200 dark:border-gray-700 transition-opacity cursor-move z-10 bg-white dark:bg-gray-800 rounded p-1 shadow-sm drag-handle"},[t.createVNode(t.unref(Ro),{class:"h-4 w-4 text-gray-400"})])),t.createVNode(g0,{title:a.$t("cms.builder."+(i==null?void 0:i.reference_type)),modelValue:o.value[c],"onUpdate:modelValue":u=>o.value[c]=u,parent:o.value,"onUpdate:parent":l[0]||(l[0]=u=>o.value=u)},null,8,["title","modelValue","onUpdate:modelValue","parent"]),t.unref(dn)[i==null?void 0:i.reference_type]?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(dn)[i==null?void 0:i.reference_type]),{key:0,index:c,text:r(i==null?void 0:i.reference_type),count:Array.isArray(i==null?void 0:i.data)?i.data.length:0},null,8,["index","text","count"])):(t.openBlock(),t.createElementBlock("img",{key:1,src:t.unref(Gl),alt:"Team collaboration",class:"w-full h-full object-cover"},null,8,_0))])])):t.createCommentVNode("",!0)]),_:1},8,["modelValue"])):t.createCommentVNode("",!0),t.createVNode(m0,{class:"mt-4",title:e.title,modelValue:o.value,"onUpdate:modelValue":l[2]||(l[2]=i=>o.value=i)},null,8,["title","modelValue"])])}}};function Zl(e){if(e===0)return"0 Bytes";const r=1024,n=["Bytes","KB","MB","GB","TB"],o=Math.floor(Math.log(e)/Math.log(r));return Number.parseFloat((e/Math.pow(r,o)).toFixed(2))+" "+n[o]}function k0(e){const r=new Date(e);return isNaN(r.getTime())?"":r.toISOString().slice(0,10)}const x0={__name:"TypeTag",props:{type:{type:String,required:!0}},setup(e){const r=new Map([["document","bg-blue-100 text-blue-800 border-blue-200 dark:bg-blue-900/30 dark:text-blue-300 dark:border-blue-700"],["image","bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-700"],["video","bg-purple-100 text-purple-800 border-purple-200 dark:bg-purple-900/30 dark:text-purple-300 dark:border-purple-700"]]);return(n,o)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors shadow-lg backdrop-blur-sm",t.unref(r).get(e.type)])},t.toDisplayString(e.type),3))}},w0={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 max-h-[calc(100%-130px)] overflow-y-auto px-2 pt-2 pb-5"},E0={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground col-span-full"},v0=["onClick"],N0=["onClick"],C0={class:"truncate font-medium text-slate-800 dark:text-slate-100 mb-2"},S0={class:"text-sm text-slate-500 dark:text-slate-400"},V0=["onClick"],D0={class:"p-0"},T0={class:"aspect-video bg-slate-100 dark:bg-slate-700 rounded-t-lg overflow-hidden relative"},A0={class:"w-full h-full flex items-center justify-center bg-gradient-to-br from-slate-100 to-slate-200 dark:from-slate-700 dark:to-slate-800"},$0={key:0,class:"relative w-full"},I0=["src","alt"],L0={class:"p-4"},M0={class:"flex items-center justify-between mb-2"},O0={class:"font-medium text-slate-800 dark:text-slate-100 truncate flex-1 mr-2"},B0={class:"space-y-1 text-sm text-slate-500 dark:text-slate-400"},F0={class:"flex justify-between"},P0={class:"flex justify-between"},R0={__name:"MediaGrid",props:{files:{type:Array,required:!0},selectedFile:{type:Object,default:null},selectedFiles:{type:Array,default:()=>[]},isDeleteButton:{type:Boolean,default:!1}},emits:["delete-file","file-click","delete-folder"],setup(e,{emit:r}){me();const n=e,o=t.ref([]),a=t.ref(null),l=i=>{if(!i)return"";const c=new Date(i);return isNaN(c.getTime())?"":c.toISOString().slice(0,10)},s=()=>{o.value=n.files.sort((i,c)=>i.type==="dir"&&c.type!=="dir"?-1:i.type!=="dir"&&c.type==="dir"?1:0)};return t.onMounted(()=>s()),t.onUpdated(()=>s()),(i,c)=>{var u;return t.openBlock(),t.createElementBlock("div",w0,[((u=e.files)==null?void 0:u.length)===0?(t.openBlock(),t.createElementBlock("div",E0,[t.createVNode(t.unref(jt),{class:"w-12 h-12 mb-2"}),t.createElementVNode("p",null,t.toDisplayString(i.$t("cms.noFilesInFolder")),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,d=>{var m;return t.openBlock(),t.createElementBlock(t.Fragment,{key:d==null?void 0:d.url},[(d==null?void 0:d.type)==="dir"?(t.openBlock(),t.createElementBlock("div",{key:0,class:"p-6 text-center rounded-xl h-[fit-content] relative text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:scale-105 cursor-pointer",onClick:p=>i.$emit("file-click",d)},[e.isDeleteButton?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:t.withModifiers(p=>{a.value=d},["stop"]),class:"absolute top-4 right-4 p-1 border border-gray-300 dark:border-slate-700 rounded-lg cursor-pointer hover:bg-gray-200 dark:hover:bg-slate-700 group"},[t.createVNode(t.unref(ft),{class:"w-4 h-4 text-gray-500 group-hover:text-red-500"})],8,N0)):t.createCommentVNode("",!0),t.createVNode(t.unref(Po),{class:"w-16 h-16 mx-auto mb-4 text-blue-600"}),t.createElementVNode("h3",C0,t.toDisplayString(d==null?void 0:d.name),1),t.createElementVNode("p",S0,t.toDisplayString(d==null?void 0:d.count)+" "+t.toDisplayString(i.$t("cms.media.files")),1)],8,v0)):(d==null?void 0:d.type)==="file"?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["h-[fit-content] rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm hover:shadow-xl transition-all duration-200 transform hover:scale-105 group cursor-pointer",{"bg-accent text-accent-foreground ring-2 ring-primary":((m=e.selectedFile)==null?void 0:m.url)===(d==null?void 0:d.url)||e.selectedFiles&&e.selectedFiles.some(p=>p.id===d.id)}]),onClick:p=>i.$emit("file-click",d)},[t.createElementVNode("div",D0,[t.createElementVNode("div",T0,[t.createElementVNode("div",A0,[(d==null?void 0:d.filetype)==="image"&&(d!=null&&d.filepath||d!=null&&d.url)?(t.openBlock(),t.createElementBlock("div",$0,[t.createElementVNode("img",{src:d==null?void 0:d.preview,alt:(d==null?void 0:d.alt)||(d==null?void 0:d.filename),class:"object-cover w-full h-full rounded text-xs"},null,8,I0)])):(t.openBlock(),t.createBlock(t.unref(sr),{key:1,class:"w-12 h-12 text-gray-500"}))])]),t.createElementVNode("div",L0,[t.createElementVNode("div",M0,[t.createElementVNode("h3",O0,t.toDisplayString(d.filename),1),t.createVNode(x0,{type:d==null?void 0:d.filetype},null,8,["type"])]),t.createElementVNode("div",B0,[t.createElementVNode("div",F0,[t.createElementVNode("span",null,t.toDisplayString(i.$t("cms.media.size"))+":",1),t.createElementVNode("span",null,t.toDisplayString(t.unref(Zl)(d.filesize)),1)]),t.createElementVNode("div",P0,[t.createElementVNode("span",null,t.toDisplayString(i.$t("cms.media.uploaded"))+":",1),t.createElementVNode("span",null,t.toDisplayString(l(d.created_at)),1)])])])])],10,V0)):t.createCommentVNode("",!0)],64)}),128))])}}},U0={},j0={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function q0(e,r){return t.openBlock(),t.createElementBlock("svg",j0,[...r[0]||(r[0]=[t.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),t.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)])])}const H0=bt(U0,[["render",q0]]),G0={},W0={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function Y0(e,r){return t.openBlock(),t.createElementBlock("svg",W0,[...r[0]||(r[0]=[t.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),t.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)])])}const z0=bt(G0,[["render",Y0]]),K0={key:0,class:"flex flex-col items-center justify-center h-64 text-muted-foreground"},X0={key:1,class:"w-full text-sm caption-bottom"},Q0={class:"[&_tr]:border-b"},Z0={class:"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"},J0={class:"h-12 px-4 text-left align-middle font-medium text-muted-foreground w-[300px]"},eb={class:"h-12 px-4 font-medium text-left align-middle text-muted-foreground"},tb={class:"h-12 px-4 font-medium text-left align-middle text-muted-foreground"},rb={class:"hidden h-12 px-4 font-medium text-left align-middle text-muted-foreground md:table-cell"},nb={class:"[&_tr:last-child]:border-0"},ob=["onClick"],ab={class:"p-4 font-medium align-middle"},lb={class:"flex items-center gap-2"},sb={key:1,class:"relative w-8 h-8"},ib=["src","alt"],cb={class:"truncate max-w-[200px]"},db={class:"p-4 align-middle"},ub={class:"p-4 align-middle"},mb={class:"hidden p-4 align-middle md:table-cell"},pb={key:0},fb={__name:"MediaList",props:{files:{type:Array,required:!0},selectedFile:{type:Object,default:null},selectedFiles:{type:Array,default:()=>[]}},emits:["file-click","delete-folder"],setup(e,{emit:r}){const{t:n}=me(),o=t.ref(null),a=r,l=()=>{Q.confirm({title:n("cms.builder.deleteTitle"),message:n("cms.builder.deleteObject"),type:"error",onConfirm:()=>{s()}})},s=()=>{a("delete-folder",o.value)};return(i,c)=>{const u=t.resolveComponent("File");return t.openBlock(),t.createElementBlock("div",null,[e.files.length===0?(t.openBlock(),t.createElementBlock("div",K0,[t.createVNode(u,{class:"w-12 h-12 mb-2"}),t.createElementVNode("p",null,t.toDisplayString(i.$t("cms.media.noFilesInFolder")),1)])):(t.openBlock(),t.createElementBlock("table",X0,[t.createElementVNode("thead",Q0,[t.createElementVNode("tr",Z0,[t.createElementVNode("th",J0,t.toDisplayString(i.$t("cms.media.name")),1),t.createElementVNode("th",eb,t.toDisplayString(i.$t("cms.media.type")),1),t.createElementVNode("th",tb,t.toDisplayString(i.$t("cms.media.size")),1),t.createElementVNode("th",rb,t.toDisplayString(i.$t("cms.media.updatedAt")),1),c[0]||(c[0]=t.createElementVNode("th",null,null,-1))])]),t.createElementVNode("tbody",nb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.files,d=>{var m,p,f,g,y;return t.openBlock(),t.createElementBlock("tr",{key:d.id,class:t.normalizeClass(["border-b transition-colors hover:bg-blue-200/50 data-[state=selected]:bg-muted cursor-pointer",{"bg-blue-200":((m=o.value)==null?void 0:m.id)===d.id&&((p=o.value)==null?void 0:p.type)===d.type||e.selectedFiles&&e.selectedFiles.some(x=>x.id===d.id&&x.type===d.type)}]),onClick:x=>i.$emit("cms.file-click",d)},[t.createElementVNode("td",ab,[t.createElementVNode("div",lb,[d.type==="dir"?(t.openBlock(),t.createBlock(H0,{key:0,class:"w-5 h-5 text-blue-500"})):(d==null?void 0:d.filetype)==="image"&&(d!=null&&d.filepath)?(t.openBlock(),t.createElementBlock("div",sb,[t.createElementVNode("img",{src:d==null?void 0:d.preview,alt:(d==null?void 0:d.alt)||(d==null?void 0:d.filename),class:"object-cover w-full h-full rounded"},null,8,ib)])):(d==null?void 0:d.filetype)==="image"?(t.openBlock(),t.createBlock(z0,{key:2,class:"w-5 h-5 text-green-500"})):(t.openBlock(),t.createBlock(u,{key:3,class:"w-5 h-5 text-gray-500"})),t.createElementVNode("span",cb,t.toDisplayString((d==null?void 0:d.filename)||(d==null?void 0:d.name)),1)])]),t.createElementVNode("td",db,t.toDisplayString((d==null?void 0:d.type)==="dir"?i.$t("cms.media.folder"):((g=(f=d==null?void 0:d.filetype)==null?void 0:f.charAt(0))==null?void 0:g.toUpperCase())+((y=d==null?void 0:d.filetype)==null?void 0:y.slice(1))),1),t.createElementVNode("td",ub,t.toDisplayString((d==null?void 0:d.type)==="dir"?"--":t.unref(Zl)(d==null?void 0:d.filesize)),1),t.createElementVNode("td",mb,t.toDisplayString(d!=null&&d.updated_at?t.unref(k0)(d==null?void 0:d.updated_at):"--"),1),d.type==="dir"?(t.openBlock(),t.createElementBlock("td",pb,[t.createVNode(t.unref(ft),{class:"w-4 h-4 text-red-500 cursor-pointer",onClick:t.withModifiers(l,["stop"])},null,8,["onClick"])])):t.createCommentVNode("",!0)],10,ob)}),128))])]))])}}},gb={},hb={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function bb(e,r){return t.openBlock(),t.createElementBlock("svg",hb,[...r[0]||(r[0]=[t.createElementVNode("path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},null,-1),t.createElementVNode("polyline",{points:"9 22 9 12 15 12 15 22"},null,-1)])])}const yb=bt(gb,[["render",bb]]),_b={class:"flex items-center space-x-1"},kb=["onClick"],xb={__name:"MediaBreadcrumb",props:{currentPath:{type:Array,required:!0}},emits:["navigate"],setup(e){return(r,n)=>(t.openBlock(),t.createElementBlock("div",_b,[t.createElementVNode("button",{class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20",onClick:n[0]||(n[0]=o=>r.$emit("navigate",[]))},[t.createVNode(yb,{class:"w-3 h-3"}),t.createTextVNode(" "+t.toDisplayString(r.$t("cms.media.mediaLibrary")),1)]),e.currentPath.length>0?(t.openBlock(),t.createBlock(t.unref(Ut),{key:0,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.currentPath,(o,a)=>(t.openBlock(),t.createElementBlock("button",{key:a,class:"flex gap-x-1 items-center px-2 py-1 rounded text-sm font-medium transition-all duration-200 text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/20",onClick:l=>r.$emit("navigate",e.currentPath.slice(0,a+1))},[t.createVNode(t.unref(Po),{class:"w-3 h-3"}),t.createTextVNode(" "+t.toDisplayString(o)+" ",1),a<e.currentPath.length-1?(t.openBlock(),t.createBlock(t.unref(Ut),{key:0,class:"w-3 h-3 text-slate-400 dark:text-slate-500"})):t.createCommentVNode("",!0)],8,kb))),128))]))}},wb=["src"],Eb={class:"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity rounded-lg gap-2"},vb=["onClick"],Nb=["onClick"],Cb=["title"],Sb={key:1,class:"relative group"},Vb=["src"],Db={class:"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity rounded-lg gap-2"},Tb=["title"],Ab={key:2,class:"absolute inset-0 bg-white bg-opacity-75 flex items-center justify-center rounded-lg z-10"},$b={class:"flex flex-col items-center gap-2"},Ib={class:"text-xs text-gray-600"},Lb=["multiple","disabled"],Mb={class:"whitespace-nowrap text-sm"},Ob={class:"whitespace-nowrap text-sm"},Bb={class:"flex items-center justify-between p-4 border-b"},Fb={class:"text-lg font-semibold"},Pb={class:"flex items-center justify-between gap-4 p-4 border-b"},Rb={class:"relative z-[1] rounded-xl text-card-foreground shadow-lg border-0 bg-white dark:bg-slate-800 backdrop-blur-sm mb-6 p-4 mx-4"},Ub={class:"flex items-center justify-between gap-4"},jb={class:"flex items-center gap-4 flex-1"},qb={class:"relative flex-1 max-w-md"},Hb=["placeholder"],Gb={class:"flex items-center gap-2 relative"},Wb={class:"text-xs font-bold"},Yb={class:"text-xs font-bold"},zb={key:0,class:"w-full absolute top-full left-1/2 transform -translate-x-1/2 mt-2 z-50 bg-white dark:bg-slate-700 flex flex-col items-start border border-slate-200 dark:border-slate-600 rounded-md shadow-lg"},Kb={class:"flex items-center gap-2"},Xb={class:"flex flex-col gap-4 overflow-y-auto p-4 flex-1"},Qb={class:"p-4 border-t flex items-center justify-between"},Zb={key:0,class:"text-sm text-gray-600 dark:text-gray-400"},Jb={key:1},ey=["disabled"],rr={__name:"vs-form-media-select",props:t.mergeModels({multiple:{type:Boolean,default:!1},multi:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:r}){const{t:n}=me(),o=De.useRoute(),a=De.useRouter(),l=t.useModel(e,"modelValue"),s=r,i=e,c=t.computed(()=>i.multiple||i.multi),u=t.ref(null),d=t.computed(()=>l.value||u.value),m=t.computed(()=>{if(!c.value)return[];const C=d.value;return C?Array.isArray(C)?C:[C]:[]}),p=t.computed(()=>d.value?typeof d.value=="object"?d.value.filename||d.value.file_name||d.value.native_file_name||"File":typeof d.value=="string"?d.value.split("cms./").pop()||d.value:"File":""),f=t.ref(!1),g=t.ref(!1),y=t.ref("grid"),x=t.ref([]),h=t.ref([]),k=t.ref([]),w=t.ref(),E=t.ref([]),V=t.ref(null),S=t.ref(!1),v=t.ref(null),L=t.ref(null),P=t.ref({}),Z=t.ref(""),ce=t.ref(!1),ee=t.ref("name"),Ee=new Map([["name",n("cms.media.sortBy.name")],["filesize",n("cms.media.sortBy.filesize")]]),ke=C=>typeof C=="string"?C:(C==null?void 0:C.filepath)||(C==null?void 0:C.file_path)||C,Ue=C=>C?typeof C=="string"?C.split("cms./").pop()||C:C.filename||C.file_name||C.native_file_name||"File":"",Le=C=>typeof C=="string"?C:(C==null?void 0:C.preview)||`/file/resize?filepath=${ke(C)}&h=137&quality=75`,We=()=>{V.value&&V.value.click()},Oe=()=>{f.value=!f.value,f.value&&j()},j=()=>{if(v.value){const C=v.value.getBoundingClientRect();P.value={top:`${C.bottom+10}px`,left:`${C.left+C.width/2}px`,transform:"translateX(-50%)",width:"200px"}}},W=C=>{var I;if(C.type==="dir")te([...x.value,C.name]);else if(c.value){const F=E.value.findIndex(R=>R.id===C.id);F>=0?E.value.splice(F,1):E.value.push(C)}else w.value=C.id===((I=w.value)==null?void 0:I.id)?null:C},O=C=>{ee.value=C,ce.value=!1,h.value=h.value.sort((I,F)=>{var R;if((I==null?void 0:I.type)==="dir")return-1;if(C==="name")return(R=I==null?void 0:I.name)==null?void 0:R.localeCompare(F==null?void 0:F.name);if(C==="filesize")return(F==null?void 0:F.filesize)-(I==null?void 0:I.filesize)})},A=async()=>{try{const C=x.value.join("/"),F=await(await fetch(`/api/cms-media?subdir=${C}${Z.value?"&search="+Z.value:""}`,{method:"GET"})).json();F.data?(h.value=F.data.map(R=>({...R,id:R.type==="dir"?`dir-${R.name}`:R.id,preview:`/file/resize?filepath=${R.filepath}&h=137&quality=75`})),O(ee.value)):h.value=[]}catch(C){console.error("Search error:",C),h.value=[]}},B=()=>{if(c.value){if(E.value.length>0){const C=Array.isArray(l.value)?[...l.value]:l.value?[l.value]:[],I=Array.isArray(u.value)?[...u.value]:u.value?[u.value]:[];E.value.forEach(F=>{const R=F.filepath||F.file_path;C.some(X=>(typeof X=="string"?X:(X==null?void 0:X.filepath)||(X==null?void 0:X.file_path))===R)||(C.push(R),I.push(F))}),l&&(l.value=C),u.value=I,s("cms.change",C),E.value=[]}}else if(w.value){const C=w.value.filepath||w.value.file_path;l&&(l.value=C),u.value=w.value,s("cms.change",C),w.value=null}J()},J=()=>{g.value=!1},te=C=>{x.value=C,k.value=[...k.value,C],w.value=null,c.value&&(E.value=[]),Ne()},be=()=>{k.value.length>1&&(k.value.pop(),x.value=k.value[k.value.length-1],w.value=null,c.value&&(E.value=[]),Ne())},Ne=async()=>{try{const C=x.value.join("/"),F=await(await fetch(`/api/cms-media?subdir=${C}${Z.value?"&search="+Z.value:""}`,{method:"GET"})).json();F.data?(h.value=F.data.map(R=>({...R,id:R.type==="dir"?`dir-${R.name}`:R.id,preview:`/file/resize?filepath=${R.filepath}&h=137&quality=75`})),O(ee.value)):h.value=[]}catch(C){console.error("Fetch error:",C),h.value=[]}},de=async(C,I)=>{try{const F=typeof C=="string"?C:ke(C);if(await fetch(`/file/delete${F}`),c.value){const R=Array.isArray(l.value)?[...l.value]:[],X=Array.isArray(u.value)?[...u.value]:[];if(I!==void 0&&I>=0)R.splice(I,1),X.splice(I,1);else{const ve=R.findIndex(b=>(typeof b=="string"?b:(b==null?void 0:b.filepath)||(b==null?void 0:b.file_path))===F);ve>=0&&(R.splice(ve,1),X.splice(ve,1))}l&&(l.value=R.length>0?R:null),u.value=X.length>0?X:null,s("cms.change",R.length>0?R:null)}else l&&(l.value=null),u.value=null,s("cms.change",null);return!0}catch(F){return console.error(F),!1}},je=async C=>{try{const I=await fetch(`/file/download/files/uploads${C}`),F=await I.arrayBuffer(),R=I.headers["content-type"],X=new TextDecoder("utf-8").decode(F),ve=new Blob([X],{type:R}),b=document.createElement("cms.a");b.setAttribute("download",C),b.href=window.URL.createObjectURL(ve),b.click()}catch(I){console.error(I.message)}},ne=async C=>{if(!C.target.files||C.target.files.length===0)return;const I=Array.from(C.target.files);S.value=!0;try{const F=[];for(const R of I){const X=new FormData;X.append("file",R);const ve=await fetch("/file/upload/uploads?id=1&form=form&table=table",{method:"POST",body:X});if(!ve.ok)throw new Error(`Upload failed: ${ve.status}`);const _=(await ve.json()).result,D={file_id:_.file_id,file_name:_.file_name,file_path:_.file_path,filepath:_.file_path,format:_.format,size:_.size,entity_id:_.entity_id,dir:_.dir,native_file_name:_.native_file_name,preview:`/file/resize?filepath=${_.file_path}&h=137&quality=75`};F.push(D)}if(c.value){const R=Array.isArray(l.value)?[...l.value]:l.value?[l.value]:[],X=Array.isArray(u.value)?[...u.value]:u.value?[u.value]:[];F.forEach(ve=>{R.push(ve.file_path),X.push(ve)}),l&&(l.value=R),u.value=X,s("cms.change",R)}else{const R=F[0];l&&(l.value=R.file_path),u.value=R,s("cms.change",R.file_path)}f.value=!1}catch(F){console.error("Upload error:",F),alert("cms.Помилка завантаження файлу: "+F.message)}finally{S.value=!1}C.target.value=""};t.watch(g,C=>{C&&Ne()}),t.watch(x,C=>{C.length>0?a.push({query:{path:C.join("/")}}):a.push({query:{path:void 0}})});let qe;return t.watch(Z,C=>{clearTimeout(qe),qe=setTimeout(()=>{A()},500)}),t.watch(l,C=>{var I,F,R,X;if(C&&typeof C=="object"){const ve=((I=w.value)==null?void 0:I.filepath)||((F=w.value)==null?void 0:F.file_path);C.filepath!==ve&&C.file_path!==ve&&(w.value=null)}else if(C&&typeof C=="string"){const ve=((R=w.value)==null?void 0:R.filepath)||((X=w.value)==null?void 0:X.file_path);C!==ve&&(w.value=null)}}),t.onMounted(()=>{var I,F;x.value=((F=(I=o.query)==null?void 0:I.path)==null?void 0:F.split("cms./"))||[],k.value=[[]],l.value||(w.value=null);const C=R=>{var X;f.value&&!((X=v.value)!=null&&X.contains(R.target))&&(f.value=!1),ce.value&&L.value&&!L.value.contains(R.target)&&(ce.value=!1)};document.addEventListener("click",C)}),(C,I)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",t.mergeProps(C.$attrs,{class:"flex gap-4 flex-wrap"}),[c.value?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(m.value,(F,R)=>(t.openBlock(),t.createElementBlock("div",{key:R,class:"relative group"},[t.createElementVNode("img",{src:Le(F),alt:"Selected File",class:"w-32 h-32 object-cover rounded-lg"},null,8,wb),t.createElementVNode("div",Eb,[t.createElementVNode("button",{type:"button",onClick:X=>de(F,R),class:"p-2 rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors"},[t.createVNode(t.unref(ft),{class:"w-4 h-4"})],8,vb),t.createElementVNode("button",{type:"button",onClick:X=>je(ke(F)),class:"p-2 rounded-full bg-blue-500 text-white hover:bg-blue-600 transition-colors"},[t.createVNode(t.unref(gn),{class:"w-4 h-4"})],8,Nb)]),t.createElementVNode("div",{class:"absolute bottom-full left-0 mb-2 px-3 py-1.5 bg-gray-900 text-white text-xs rounded-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10 max-w-[200px] truncate",title:Ue(F)},[t.createTextVNode(t.toDisplayString(Ue(F))+" ",1),I[12]||(I[12]=t.createElementVNode("div",{class:"absolute top-full left-4 border-4 border-transparent border-t-gray-900"},null,-1))],8,Cb)]))),128)):d.value?(t.openBlock(),t.createElementBlock("div",Sb,[t.createElementVNode("img",{src:d.value.preview||d.value,alt:"Selected File",class:"w-32 h-32 object-cover rounded-lg"},null,8,Vb),t.createElementVNode("div",Db,[t.createElementVNode("button",{type:"button",onClick:I[0]||(I[0]=F=>{var R,X;return de(((R=d.value)==null?void 0:R.filepath)||((X=d.value)==null?void 0:X.file_path)||d.value)}),class:"p-2 rounded-full bg-red-500 text-white hover:bg-red-600 transition-colors"},[t.createVNode(t.unref(ft),{class:"w-4 h-4"})]),t.createElementVNode("button",{type:"button",onClick:I[1]||(I[1]=F=>{var R,X;return je(((R=d.value)==null?void 0:R.filepath)||((X=d.value)==null?void 0:X.file_path)||d.value)}),class:"p-2 rounded-full bg-blue-500 text-white hover:bg-blue-600 transition-colors"},[t.createVNode(t.unref(gn),{class:"w-4 h-4"})])]),t.createElementVNode("div",{class:"absolute bottom-full left-0 mb-2 px-3 py-1.5 bg-gray-900 text-white text-xs rounded-lg opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10 max-w-[200px] truncate",title:p.value},[t.createTextVNode(t.toDisplayString(p.value)+" ",1),I[13]||(I[13]=t.createElementVNode("div",{class:"absolute top-full left-4 border-4 border-transparent border-t-gray-900"},null,-1))],8,Tb)])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"triggerButton",ref:v,class:t.normalizeClass(["relative w-32 h-32 flex items-center justify-center border border-dotted border-gray-300 rounded-lg hover:border-blue-500 hover:bg-blue-500/10 hover:cursor-pointer transition-all",{"border-blue-500 bg-blue-500/10":f.value,"opacity-50 cursor-not-allowed":S.value}]),onClick:Oe},[S.value?(t.openBlock(),t.createBlock(t.unref(bn),{key:0,class:"w-4 h-4 animate-spin text-blue-500"})):(t.openBlock(),t.createBlock(t.unref(pt),{key:1,class:"w-4 h-4"})),S.value?(t.openBlock(),t.createElementBlock("div",Ab,[t.createElementVNode("div",$b,[t.createVNode(t.unref(bn),{class:"w-6 h-6 animate-spin text-blue-500"}),t.createElementVNode("span",Ib,t.toDisplayString(C.$t("cms.media.uploading")),1)])])):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[f.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fixed bg-white z-50 border border-gray-200 rounded-lg shadow-lg flex flex-col items-center justify-center",style:t.normalizeStyle(P.value)},[t.createElementVNode("div",{class:t.normalizeClass(["relative overflow-hidden flex justify-start items-center w-full gap-2 p-4 hover:bg-blue-50 text-blue-700 border hover:border-blue-200 dark:bg-slate-700 dark:text-slate-100 hover:cursor-pointer",{"opacity-50 cursor-not-allowed":S.value}]),onClick:I[3]||(I[3]=F=>!S.value&&We())},[t.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:V,class:"absolute justify-center bottom-0 left-0 w-full opacity-0",onChange:ne,onClick:I[2]||(I[2]=t.withModifiers(()=>{},["stop"])),multiple:c.value,disabled:S.value},null,40,Lb),S.value?(t.openBlock(),t.createBlock(t.unref(bn),{key:0,class:"w-4 h-4 animate-spin"})):(t.openBlock(),t.createBlock(t.unref(gn),{key:1})),t.createElementVNode("span",Mb,t.toDisplayString(S.value?C.$t("cms.media.uploading"):C.$t("cms.media.upload")),1)],2),t.createElementVNode("div",{onClick:I[4]||(I[4]=F=>g.value=!0),class:"flex justify-start items-center w-full gap-2 p-4 hover:bg-blue-50 text-blue-700 border hover:border-blue-200 dark:bg-slate-700 dark:text-slate-100 hover:cursor-pointer"},[t.createVNode(t.unref(ir)),t.createElementVNode("span",Ob,t.toDisplayString(C.$t("cms.media.selectFromMedia")),1)])],4)):t.createCommentVNode("",!0)]))],2)],16),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[g.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:J},[t.createElementVNode("div",{class:"bg-white rounded-lg shadow-xl max-w-4xl w-full mx-4 max-h-[90vh] flex flex-col",onClick:I[11]||(I[11]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",Bb,[t.createElementVNode("h3",Fb,t.toDisplayString(C.$t("cms.media.selectFiles")),1),t.createElementVNode("button",{onClick:J,class:"text-gray-400 hover:text-gray-600"},[...I[14]||(I[14]=[t.createElementVNode("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),t.createElementVNode("div",Pb,[t.createVNode(xb,{"current-path":x.value,onNavigate:te,onNavigateBack:be},null,8,["current-path"])]),t.createElementVNode("div",Rb,[t.createElementVNode("div",Ub,[t.createElementVNode("div",jb,[t.createElementVNode("div",qb,[t.createVNode(t.unref(kn),{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-slate-400 dark:text-slate-500"}),t.withDirectives(t.createElementVNode("input",{type:"text",placeholder:C.$t("cms.media.search"),class:"w-full pl-10 pr-4 py-2 text-sm border border-slate-200 dark:border-slate-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white dark:bg-slate-700 text-slate-700 dark:text-slate-200 placeholder-slate-400 dark:placeholder-slate-500","onUpdate:modelValue":I[5]||(I[5]=F=>Z.value=F)},null,8,Hb),[[t.vModelText,Z.value]])]),t.createElementVNode("div",Gb,[t.createElementVNode("span",Wb,t.toDisplayString(C.$t("cms.media.sortBy.title")+": "),1),t.createElementVNode("button",{ref_key:"sortByButton",ref:L,class:"relative z-[1000] inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border shadow-sm h-8 rounded-md px-3 text-xs bg-white border-slate-300 text-slate-700 disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground hover:bg-slate-50 dark:bg-slate-700 dark:border-slate-600 dark:text-slate-300 dark:hover:bg-slate-600",onClick:I[8]||(I[8]=F=>ce.value=!ce.value)},[t.createVNode(t.unref(Fo),{class:"w-4 h-4"}),t.createElementVNode("span",Yb,t.toDisplayString(t.unref(Ee).get(ee.value)),1),ce.value?(t.openBlock(),t.createElementBlock("div",zb,[t.createElementVNode("span",{class:"text-left text-xs font-bold w-full p-2 hover:bg-slate-100 dark:hover:bg-slate-600 border-b border-slate-200 dark:border-slate-600 cursor-pointer",onClick:I[6]||(I[6]=t.withModifiers(F=>O("name"),["stop"]))},t.toDisplayString(C.$t("cms.media.sortBy.name")),1),t.createElementVNode("span",{class:"text-left text-xs font-bold w-full p-2 hover:bg-slate-100 dark:hover:bg-slate-600 cursor-pointer",onClick:I[7]||(I[7]=t.withModifiers(F=>O("filesize"),["stop"]))},t.toDisplayString(C.$t("cms.media.sortBy.filesize")),1)])):t.createCommentVNode("",!0)],512)])]),t.createElementVNode("div",Kb,[t.createElementVNode("button",{class:t.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 h-8 px-3 text-xs rounded-md",{"shadow bg-blue-600 hover:bg-blue-700 text-white":y.value==="grid","border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600":y.value==="list"}]),onClick:I[9]||(I[9]=F=>y.value="grid")},[t.createVNode(t.unref(qs),{class:"w-4 h-4"})],2),t.createElementVNode("button",{class:t.normalizeClass(["inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 h-8 px-3 text-xs rounded-md",{"shadow bg-blue-600 hover:bg-blue-700 text-white":y.value==="list","border shadow-sm hover:text-accent-foreground bg-white dark:bg-slate-700 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-600":y.value==="grid"}]),onClick:I[10]||(I[10]=F=>y.value="list")},[t.createVNode(t.unref(Lr),{class:"w-4 h-4"})],2)])])]),t.createElementVNode("div",Xb,[y.value==="grid"?(t.openBlock(),t.createBlock(R0,{key:0,files:h.value,"selected-file":c.value?null:w.value,"selected-files":c.value?E.value:[],onFileClick:W},null,8,["files","selected-file","selected-files"])):(t.openBlock(),t.createBlock(fb,{key:1,files:h.value,"selected-file":c.value?null:w.value,"selected-files":c.value?E.value:[],onFileClick:W},null,8,["files","selected-file","selected-files"]))]),t.createElementVNode("div",Qb,[c.value&&E.value.length>0?(t.openBlock(),t.createElementBlock("div",Zb,t.toDisplayString(C.$t("cms.media.selectedFiles",{count:E.value.length})),1)):(t.openBlock(),t.createElementBlock("div",Jb)),t.createElementVNode("button",{onClick:B,disabled:c.value?E.value.length===0:!w.value,class:"flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium disabled:pointer-events-none disabled:opacity-50 h-9 px-4 py-2 ml-auto bg-blue-600 hover:bg-blue-700 text-white shadow-md hover:shadow-lg transition-all duration-200 transform hover:scale-105"},[t.createVNode(t.unref(pt),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(C.$t("cms.common.actions.add")),1)],8,ey)])])])):t.createCommentVNode("",!0)]))],64))}},ty={};function ry(e,r){const n=t.resolveComponent("vs-richtext-md",!0);return t.openBlock(),t.createBlock(n,{class:"w-full h-[300px]"})}const Jl=bt(ty,[["render",ry]]),ny={props:{min:{type:Number},step:{type:Number,default:()=>1},max:{type:Number,default:()=>1/0},modelValue:{type:Number,default:()=>null},label:{type:String,default:()=>""},placeholder:{type:String,default:()=>"0"},disabled:{type:Boolean,default:()=>!1}},data(){return{id:`input-number-${Math.floor(Math.random()*1e3)}`,inputValue:this.modelValue}},watch:{modelValue(e){this.inputValue=e},inputValue(e){this.$emit("update:modelValue",e)}},methods:{validateInput(e){(e.key==="+"||e.key===","||e.key==="."||e.key==="-"&&this.inputValue&&this.inputValue.toString().length>0)&&e.preventDefault()},handleBlur(){let e=parseFloat(this.inputValue);this.$emit("blur"),isNaN(e)?e=this.min:e>this.max?e=this.max:e<this.min&&(e=this.min),this.inputValue=e,this.$emit("update:modelValue",this.inputValue)}}},oy={class:"p-0"},ay=["step","min","max","id","placeholder","disabled"];function ly(e,r,n,o,a,l){return t.openBlock(),t.createElementBlock("div",oy,[t.renderSlot(e.$slots,"label",t.normalizeProps(t.guardReactiveProps({id:a.id}))),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=s=>a.inputValue=s),type:"number",onKeydown:r[1]||(r[1]=(...s)=>l.validateInput&&l.validateInput(...s)),onBlur:r[2]||(r[2]=(...s)=>l.handleBlur&&l.handleBlur(...s)),step:n.step,min:n.min,max:n.max,id:a.id,"aria-describedby":"helper-text-explanation",class:t.normalizeClass(["vs-number__input py-2 px-3 block w-full h-[38px] border border-solid border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-500 focus:z-10 focus:border-1 focus:outline-none focus:border-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 dark:placeholder:text-neutral-500 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-neutral-600",{"cursor-not-allowed":n.disabled}]),placeholder:n.placeholder,disabled:n.disabled},null,42,ay),[[t.vModelText,a.inputValue]])])}const es=bt(ny,[["render",ly]]),ts={__name:"vs-form-reletion-link",props:t.mergeModels({relation:{type:String,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const r=t.useModel(e,"modelValue"),n=e,o=t.ref([]),a=async()=>{const s=await(await fetch(`/api/cms-suggest/${n.relation}`)).json();o.value=s==null?void 0:s.data};return t.onMounted(a),(l,s)=>{var i;return(i=o.value)!=null&&i.length?(t.openBlock(),t.createBlock(t.unref(Y.VsInputSelect),{key:0,mode:"combo",modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=c=>r.value=c),options:o.value},null,8,["modelValue","options"])):t.createCommentVNode("",!0)}}},sy={monaco:Yp,edit:_g,preview:{__name:"vs-builder-preview",props:{data:{},dataModifiers:{},form:{},formModifiers:{}},emits:["update:data","update:form"],setup(e){Y.inputs["vs-input-custom-datatable"]=Hl,Y.inputs["vs-input-reference"]=No,Y.inputs["vs-input-texteditor"]=vo,Y.inputs["vs-input-mediaselect"]=rr,Y.inputs["vs-input-file"]=rr,Y.inputs["vs-input-image"]=rr,Y.inputs["vs-input-richtext-md"]=Jl,Y.inputs["vs-input-integer"]=es,Y.inputs["vs-input-relation-link"]=ts;const r=t.ref({}),n=t.useModel(e,"data"),o=t.useModel(e,"form"),a=t.computed(()=>{var l,s;return((s=(l=n.value)==null?void 0:l.columns)==null?void 0:s.map(Eo))||[]});return(l,s)=>{var i;return t.openBlock(),t.createElementBlock("div",{ref_key:"form",ref:o},[((i=a.value)==null?void 0:i.length)>0?(t.openBlock(),t.createBlock(t.unref(Y.VForm),{key:0,modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=c=>r.value=c),schema:a.value},null,8,["modelValue","schema"])):t.createCommentVNode("",!0)],512)}}}},iy={class:"mx-auto max-w-[90%]"},cy={class:"flex items-center justify-between mb-6"},dy={class:"mb-2 text-2xl font-semibold text-gray-900"},uy={class:"lowercase"},my={class:"text-gray-600"},py={class:"flex items-center gap-2"},fy={class:"w-full"},gy={class:"flex items-center w-full h-10 max-w-md grid-cols-3 p-1 mb-6 bg-white border border-gray-200 rounded-md text-muted-foreground"},hy=["onClick"],by={key:0,class:"mx-auto bg-white rounded-md py-4 px-2 bg-opacity-50"},rs=t.defineComponent({__name:"EditCollectionPage",setup(e){const{t:r}=me(),n=t.inject("cms.fetchContentTypes"),o=t.ref("edit"),a=t.ref({yaml:"",data:{columns:[],type:"collection"}}),l=t.ref({}),s=t.ref(""),i=De.useRoute(),c=De.useRouter(),u=t.ref(!1),d=t.computed(()=>[{name:r("cms.builder.edit"),id:"edit"},{name:r("cms.builder.preview"),id:"preview"}]),m=t.computed(()=>{const x=i.params.id;return x==="edit"?i.params.collection:x}),p=t.computed(()=>[{label:s.value||m.value,route:`collections/${m.value}`},{label:r("cms.collections.edit")}]),f=x=>{c.push(`/${x}`)},g=async()=>{var x;try{if(!m.value)return;const k=await(await fetch(`/api/cms-type/${m.value}`)).json(),w={...k,columns:Array.isArray(k.columns)?k.columns:(x=Object.entries((k==null?void 0:k.columns)||{}))==null?void 0:x.map(([E,V])=>({...V,name:E}))};a.value={...a.value,data:w},s.value=w.title||w.name}catch(h){console.error(h)}finally{u.value=!0}},y=async()=>{var x,h;try{if(await l.value.validate()){Q.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.builder.editFieldFailed")});return}const w=m.value;if(!w)return;const E=await fetch(`/api/cms-type/${w}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(o.value==="monaco"?(x=a.value)==null?void 0:x.yaml:(h=a.value)==null?void 0:h.data)});c.back(),n&&n(),Q.notify({type:"success",title:r("cms.common.actions.success"),message:r("cms.collections.collectionCreated")})}catch(k){console.error(k),Q.notify({type:"error",title:r("cms.common.actions.error"),message:r("cms.collections.collectionCreationFailed")})}};return t.onMounted(()=>{g()}),(x,h)=>(t.openBlock(),t.createElementBlock("div",iy,[t.createVNode(Jn,{items:p.value,onNavigate:f},null,8,["items"]),t.createElementVNode("div",cy,[t.createElementVNode("div",null,[t.createElementVNode("h1",dy,[t.createTextVNode(t.toDisplayString(x.$t("cms.builder.editCollection"))+": ",1),t.createElementVNode("span",uy,' "'+t.toDisplayString(s.value)+'" ',1)]),t.createElementVNode("p",my,t.toDisplayString(x.$t("cms.builder.editContentForYourSite")),1)]),t.createElementVNode("div",py,[t.createElementVNode("a",{onClick:h[0]||(h[0]=k=>t.unref(c).back()),class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border bg-background hover:text-accent-foreground h-10 px-4 py-2 border-gray-300 text-gray-700 hover:bg-gray-50"},t.toDisplayString(x.$t("cms.common.actions.back")),1),t.createElementVNode("button",{onClick:y,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-white rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-primary-foreground h-10 px-4 py-2 bg-blue-600 hover:bg-blue-700"},t.toDisplayString(x.$t("cms.common.actions.save")),1)])]),t.createElementVNode("div",fy,[t.createElementVNode("div",gy,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.value,k=>(t.openBlock(),t.createElementBlock("button",{key:k.id,onClick:w=>o.value=k.id,class:t.normalizeClass(["inline-flex flex-1 items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm data-[state=active]:bg-blue-50 data-[state=active]:text-blue-700 data-[state=active]:border-blue-200",k.id===o.value?"bg-blue-50 text-blue-700 border-blue-200":""])},t.toDisplayString(k.name),11,hy))),128))])]),u.value?(t.openBlock(),t.createElementBlock("div",by,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(sy)[o.value]),{yaml:a.value.yaml,"onUpdate:yaml":h[1]||(h[1]=k=>a.value.yaml=k),data:a.value.data,"onUpdate:data":h[2]||(h[2]=k=>a.value.data=k),form:l.value,"onUpdate:form":h[3]||(h[3]=k=>l.value=k)},null,40,["yaml","data","form"]))])):t.createCommentVNode("",!0)]))}}),yy="menu",_y=(e,r)=>{const n=e==null?void 0:e.trim();return n?n===yy?r?r==="create"?{type:"createMenu",collection:n}:{type:"editMenu",collection:n,id:r}:{type:"menu",collection:n}:r==="edit"?{type:"editCollection",collection:n}:r?r==="create"?{type:"createArticle",collection:n}:{type:"editArticle",collection:n,id:r}:{type:"articles",collection:n}:{type:"collections"}},ky=[{key:"title",label:"cms.common.title",localization:!0,type:"text"},{key:"description",label:"cms.common.description",localization:!0,type:"text"},{key:"keywords",label:"cms.common.keywords",localization:!0,type:"text"},{key:"meta",label:"cms.common.meta",type:"key-value",ignore:["title","description","keywords"]}],xy={__name:"VsFormTags",props:{modelValue:{default:()=>[]},modelModifiers:{}},emits:["update:modelValue"],setup(e,{expose:r}){const{t:n}=me(),o=t.useModel(e,"modelValue"),a=t.ref({}),l=t.ref(!1);t.provide("metaParentValue",o);const s=m=>Array.isArray(m)?m.map(p=>typeof p=="object"&&p!==null&&p.id?p.id:p):[],i=async m=>{if(!Array.isArray(m)||m.length===0)return[];try{const f=await(await fetch("/api/tags")).json(),g=(f==null?void 0:f.rows)||[];return m.map(y=>{const x=g.find(h=>h.tag_id===y);return x?{id:x.tag_id,text:x.value,color:x.color}:{id:y,text:"",color:"#ababab"}})}catch(p){return console.error("Error fetching tags:",p),m.map(f=>({id:f,text:"",color:"#ababab"}))}};t.onMounted(async()=>{await t.nextTick(),await t.nextTick(),setTimeout(()=>{var m;if(Array.isArray((m=o.value)==null?void 0:m.tag_list)){const p=s(o.value.tag_list);JSON.stringify(p)!==JSON.stringify(o.value.tag_list)&&(o.value.tag_list=p)}},100)}),t.watch(()=>o.value.tag_list,m=>{if(Array.isArray(m)&&!l.value){const p=s(m);JSON.stringify(p)!==JSON.stringify(m)&&(o.value.tag_list=p)}},{deep:!0}),t.watch(()=>o.value,m=>{if(m&&Array.isArray(m.tag_list)&&!l.value){const p=s(m.tag_list);JSON.stringify(p)!==JSON.stringify(m.tag_list)&&(m.tag_list=p)}},{deep:!0,immediate:!0}),t.watch(()=>{var m;return(m=o.value)==null?void 0:m.tag_list},m=>{Array.isArray(m)&&a.value&&t.nextTick(()=>{a.value&&a.value.setValue&&a.value.setValue("tag_list",m)})},{deep:!0});const c=async m=>{if(m.tag_list&&(m.tag_list=s(m.tag_list),o.value.tag_list=m.tag_list),await a.value.validate()){Q.notify({type:"warning",title:n("cms.common.actions.warning"),message:n("cms.builder.editFieldFailed")});return}};r({restoreTagsBeforeSubmit:async()=>{var m;if(l.value=!0,Array.isArray((m=o.value)==null?void 0:m.tag_list)){const p=await i(o.value.tag_list);o.value.tag_list=p}setTimeout(()=>{l.value=!1},2e3)}});const d=t.computed(()=>{var m;return[{key:"tag_list",type:"select",multiple:!0,searchable:!1,placeholder:n("cms.builder.tags"),data:"tag_id",value:((m=o.value)==null?void 0:m.tag_list)||[]}]});return(m,p)=>o.value?(t.openBlock(),t.createBlock(t.unref(Y),{key:0,schema:d.value,modelValue:o.value,"onUpdate:modelValue":[p[0]||(p[0]=f=>o.value=f),c]},null,8,["schema","modelValue"])):t.createCommentVNode("",!0)}},wy={class:"flex justify-end mb-4"},Ey=["href"],vy=["src"],Ny=["src"],Cy={key:2,class:"w-full h-[80vh] flex items-center justify-center text-gray-500"},Sy={__name:"VsPreview",props:{preview_path:{type:String,default:""},slug:{type:String,default:""}},setup(e){const r=t.ref(""),n=t.ref(""),o=async()=>{var l,s;try{const c=await(await fetch("/api/settings")).json();r.value=((s=(l=c==null?void 0:c.settings)==null?void 0:l.site_info)==null?void 0:s.previewUrl)||"http://ip.local.softpro.ua"}catch(i){console.error("Failed to fetch settings:",i),r.value="http://ip.local.softpro.ua"}},a=async()=>{var l;try{const i=await(await fetch("/user")).json();n.value=(l=i==null?void 0:i.user)==null?void 0:l.draftKey}catch(s){console.error("Failed to fetch user:",s)}};return t.onMounted(()=>{o(),a()}),(l,s)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",wy,[t.createElementVNode("a",{href:`${r.value}/uk/${e.preview_path}${e.slug}${n.value?`?draftKey=${n.value}`:""}`,target:"_blank",class:"inline-flex items-center gap-2 px-3 py-1.5 text-black-600 bg-white border border-blue-200 rounded hover:border-blue-300 hover:bg-blue-50 transition-colors duration-200 font-normal cursor-pointer"},[s[0]||(s[0]=t.createTextVNode(" Переглянути на сайті ",-1)),t.createVNode(t.unref(Us),{class:"w-4 h-4"})],8,Ey)]),r.value&&e.preview_path?(t.openBlock(),t.createElementBlock("iframe",{key:0,src:`${r.value}/uk/${e.preview_path}${e.slug}?hideHeader=true&hideFooter=true`,class:"w-full h-[80vh]"},null,8,vy)):r.value?(t.openBlock(),t.createElementBlock("iframe",{key:1,src:`${r.value}/uk/${e.slug}?hideHeader=true&hideFooter=true`,class:"w-full h-[80vh]"},null,8,Ny)):(t.openBlock(),t.createElementBlock("div",Cy," Loading preview... "))]))}},Vy={class:"space-y-6 mx-auto relativ max-w-[90%]"},Dy={class:""},Ty={class:"flex items-center justify-between"},Ay={class:"flex items-center gap-4"},$y={class:"text-2xl font-semibold text-gray-900 dark:text-white line-clamp-1"},Iy=["href","title"],Ly={class:"flex items-center space-x-3"},My=["title"],Oy={class:"w-full mt-6 flex items-center justify-between"},By={class:"flex items-center w-full h-10 max-w-md grid-cols-3 p-1 bg-white border border-gray-200 rounded-md text-muted-foreground"},Fy=["onClick"],Py={class:"flex items-center gap-2"},Ry={for:"is_pin",class:"text-sm font-medium text-gray-700 dark:text-gray-300 cursor-pointer"},Uy={class:"relative"},jy={key:0,class:"w-3 h-3 text-white",fill:"currentColor",viewBox:"0 0 20 20"},qy={class:"mx-auto bg-white rounded-md p-5"},Hy={class:"mx-auto bg-white rounded-md p-5"},Gy={key:0,class:"mx-auto bg-white rounded-md p-5"},Wy={key:1,class:"mx-auto bg-white rounded-md p-5"},ns=t.defineComponent({__name:"contentForm",setup(e){Y.inputs["vs-input-custom-datatable"]=Hl,Y.inputs["vs-input-reference"]=No,Y.inputs["vs-input-texteditor"]=vo,Y.inputs["vs-input-mediaselect"]=rr,Y.inputs["vs-input-file"]=rr,Y.inputs["vs-input-image"]=rr,Y.inputs["vs-input-richtext-md"]=Jl,Y.inputs["vs-input-integer"]=es,Y.inputs["vs-input-relation-link"]=ts;const{t:r,locale:n}=me(),o=De.useRouter(),a=De.useRoute(),l=t.inject("menu",t.ref([])),s=t.ref([]),i=t.ref({}),c=t.ref({}),u=t.ref({}),d=t.ref(""),m=t.getCurrentInstance(),p=m==null?void 0:m.appContext,f=(p==null?void 0:p.config.globalProperties)||{},g=t.toRef(f,"$settings"),y=t.computed(()=>{var A;return((A=g.value)==null?void 0:A.cms)||{}}),x=t.computed(()=>Array.isArray(y.value.locales)?y.value.locales:[]),h=t.computed(()=>x.value.filter(Boolean)),k=t.computed(()=>y.value.locale||h.value[0]||"uk");t.watch(g,()=>{s.value.length&&(s.value=s.value.map(A=>({...A})))},{deep:!0});const w=A=>{const B=[],J=h.value.filter(te=>te!==k.value);return Array.isArray(A)&&A.forEach(te=>{B.push(te),!(!te.localization||J.length===0)&&J.forEach(be=>{B.push({...te,name:`${te.name}:${be}`,label:`${te.label} (${be})`})})}),B},E=t.computed(()=>w(s.value)),V=t.computed(()=>{var A;return(A=E.value)==null?void 0:A.map(Eo)}),S=t.computed(()=>{n.value;const A=h.value.filter(B=>B!==k.value);return ky.flatMap(B=>{const J={...B,label:r(B.label)};if(!B.localization||A.length===0)return[J];const te=A.map(be=>({...B,key:`${B.key}:${be}`,label:`${r(B.label)} (${be})`,localization:!1}));return[J,...te]})}),v=t.ref({}),L=t.ref({title:"",status:"draft"}),P=t.ref(null),Z=t.computed(()=>{var A;return(((A=L.value)==null?void 0:A.type)||P.value)==="single"}),ce=t.computed(()=>{const A=[{id:"content",name:r("cms.builder.content")},{id:"seo",name:r("cms.builder.seo")},{id:"tags",name:r("cms.builder.tags")}];return d.value&&A.push({id:"preview",name:r("cms.builder.preview")}),A}),ee=t.ref("content"),Ee=t.computed(()=>{var B,J,te,be;const A=((B=a.params)==null?void 0:B.collection)||((J=a.params)==null?void 0:J.id);return((be=(te=l.value)==null?void 0:te.find(Ne=>Ne.id===A))==null?void 0:be.title)||A}),ke=t.computed(()=>{var B,J;const A=Z.value?"cms.builder.editPage":"cms.builder.editCollection";return((B=L.value)==null?void 0:B.title)||((J=a.params)!=null&&J.id?r(A):r("cms.articles.createArticle"))}),Ue=t.computed(()=>{var te,be,Ne;const A=((te=a.params)==null?void 0:te.collection)||((be=a.params)==null?void 0:be.id),B=(Ne=a.params)==null?void 0:Ne.id,J=[{label:Ee.value,route:`collections/${A}`}];return B?J.push({label:ke.value,route:`collections/${A}/${B}`}):J.push({label:r("cms.articles.createArticle"),route:`collections/${A}/create`}),J}),Le=A=>{A==="collections"?o.push("/collections"):o.push(`/${A}`)};t.onMounted(async()=>{var be,Ne,de;const A=(be=a.params)==null?void 0:be.collection,B=(Ne=a.params)==null?void 0:Ne.id,J=A||B,te=A&&B?B:void 0;if(!te){if(!J)return;const ne=await(await fetch(`/api/cms/${J}/`)).json();s.value=ne.columns,P.value=(ne==null?void 0:ne.type)||null}try{if(!te||!J)return;const je=await fetch(`/api/cms/${J}/${te}`);if(!je.ok)throw new Error("Failed to fetch article");const ne=await je.json();if(s.value=(ne==null?void 0:ne.columns)||[],ne!=null&&ne.preview_path&&(d.value=ne==null?void 0:ne.preview_path),P.value=(ne==null?void 0:ne.type)||null,ne.rows){let qe=ne.rows;Array.isArray(qe)||(qe=[qe]),L.value=qe[0],await t.nextTick(),(de=qe[0])!=null&&de.meta?v.value={...qe[0].meta}:v.value={title:"",description:"",keywords:"",meta:{}}}else L.value=ne,await t.nextTick(),ne!=null&&ne.meta?(v.value={title:ne.meta.title||"",description:ne.meta.description||"",keywords:ne.meta.keywords||"",meta:{...ne.meta}},delete v.value.meta.title,delete v.value.meta.description,delete v.value.meta.keywords):v.value={title:"",description:"",keywords:"",meta:{}}}catch(je){console.error("Error fetching article:",je)}});const We=t.computed({get:()=>{var A;return((A=L.value)==null?void 0:A.is_pin)||!1},set:A=>{L.value&&(L.value.is_pin=A)}}),Oe=()=>{L.value&&(L.value.is_pin=!L.value.is_pin)},j=t.computed(()=>{var B;const A=(B=L.value)==null?void 0:B.content_type_id;return A?`/collections/${A}/edit`:null}),W=()=>{j.value&&o.push(j.value)},O=async A=>{var de,je,ne,qe;const B=(de=a.params)==null?void 0:de.collection,J=(je=a.params)==null?void 0:je.id,te=await i.value.validate();if(te){Q.notify({title:r("cms.validation"),message:JSON.stringify(te),type:"warning"});return}(ne=u.value)!=null&&ne.restoreTagsBeforeSubmit&&await u.value.restoreTagsBeforeSubmit();const be=v.value||{},Ne={...L.value,meta:{...be,...be.meta||{}}};console.log("Payload before submit:",Ne);try{const C=await fetch(`/api/cms/${B}/${J||""}`,{method:J?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ne)});if(!C.ok){let I;try{const F=await C.json();I=JSON.stringify(F,null,2)}catch{I=await C.text()}throw new Error(`HTTP ${C.status}: ${I}`)}if(!J)try{const I=await C.json(),F=I.id||((qe=I.data)==null?void 0:qe.id);F&&a.name==="createArticle"&&await o.push(`/collections/${B}/${F}`)}catch(I){console.warn("Could not parse response to get ID:",I)}Q.notify({title:r("cms.common.success"),message:r("cms.common.successMessage"),type:"success"})}catch(C){console.error("Submit error:",C),Q.notify({title:r("cms.common.error"),message:"Помилка збереження",type:"error"})}};return(A,B)=>{var J,te,be,Ne;return t.openBlock(),t.createElementBlock("div",Vy,[t.createElementVNode("div",Dy,[t.createVNode(Jn,{items:Ue.value,onNavigate:Le},null,8,["items"]),t.createElementVNode("div",Ty,[t.createElementVNode("div",Ay,[t.createElementVNode("button",{onClick:B[0]||(B[0]=de=>t.unref(o).back()),class:"p-2 text-gray-500 rounded-full hover:text-gray-900 dark:text-gray-400 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"},[t.createVNode(t.unref(fn),{class:"w-5 h-5"})]),t.createElementVNode("h1",$y,t.toDisplayString(A.$t(Z.value?"cms.builder.editPage":"cms.builder.editCollection"))+' "'+t.toDisplayString(L.value.title)+'" ',1),t.createElementVNode("a",{href:`https://cms.opengis.info/${t.unref(n)}/guides/content/`,target:"_blank",title:A.$t("cms.guide.content")},[t.createVNode(t.unref(wt),{class:"w-5 h-5"})],8,Iy)]),t.createElementVNode("div",Ly,[j.value&&Z.value?(t.openBlock(),t.createElementBlock("button",{key:0,onClick:W,type:"button",title:A.$t("cms.builder.editContentType"),class:"inline-flex items-center justify-center rounded-md h-9 w-9 border border-gray-200 bg-white text-gray-700 shadow-sm transition-all duration-200 transform hover:text-gray-900 hover:shadow-md focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50","aria-label":"$t('cms.builder.editContentType')"},[t.createVNode(t.unref(Gs),{class:"w-4 h-4"})],8,My)):t.createCommentVNode("",!0),t.createElementVNode("button",{onClick:O,type:"submit",class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[t.createVNode(t.unref(_n),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(A.$t("cms.builder.save")),1)])])]),t.createElementVNode("div",Oy,[t.createElementVNode("div",By,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(ce.value,de=>(t.openBlock(),t.createElementBlock("button",{key:de.id,onClick:je=>{ee.value=de.id,console.log("cmsSettings:",y.value.value)},class:t.normalizeClass(["inline-flex flex-1 items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm data-[state=active]:bg-blue-50 data-[state=active]:text-blue-700 data-[state=active]:border-blue-200",de.id===ee.value?"bg-blue-50 text-blue-700 border-blue-200":""])},t.toDisplayString(de.name),11,Fy))),128))]),t.createElementVNode("div",Py,[t.createElementVNode("label",Ry,t.toDisplayString(A.$t("cms.collections.pinPublication")),1),t.createElementVNode("div",Uy,[t.withDirectives(t.createElementVNode("input",{type:"checkbox",id:"is_pin","onUpdate:modelValue":B[1]||(B[1]=de=>We.value=de),class:"sr-only"},null,512),[[t.vModelCheckbox,We.value]]),t.createElementVNode("div",{class:t.normalizeClass(["w-5 h-5 border-2 rounded transition-all duration-200 cursor-pointer flex items-center justify-center",(J=L.value)!=null&&J.is_pin?"bg-sky-600 border-sky-600":"bg-white border-gray-300 hover:border-sky-400 dark:bg-gray-700 dark:border-gray-600 dark:hover:border-sky-400"]),onClick:Oe},[(te=L.value)!=null&&te.is_pin?(t.openBlock(),t.createElementBlock("svg",jy,[...B[7]||(B[7]=[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"},null,-1)])])):t.createCommentVNode("",!0)],2)])])])]),t.withDirectives(t.createElementVNode("div",qy,[(be=E.value)!=null&&be.length?(t.openBlock(),t.createBlock(t.unref(Y.VForm),{key:0,modelValue:L.value,"onUpdate:modelValue":B[2]||(B[2]=de=>L.value=de),schema:V.value,form:i.value,"onUpdate:form":B[3]||(B[3]=de=>i.value=de)},null,8,["modelValue","schema","form"])):t.createCommentVNode("",!0)],512),[[t.vShow,ee.value==="content"]]),t.withDirectives(t.createElementVNode("div",Hy,[t.createVNode(t.unref(Y.VForm),{schema:S.value,values:v.value,"onUpdate:values":B[4]||(B[4]=de=>v.value=de),form:c.value,"onUpdate:form":B[5]||(B[5]=de=>c.value=de)},null,8,["schema","values","form"])],512),[[t.vShow,ee.value==="seo"]]),ee.value==="tags"?(t.openBlock(),t.createElementBlock("div",Gy,[t.createVNode(xy,{ref_key:"tagsForm",ref:u,modelValue:L.value,"onUpdate:modelValue":B[6]||(B[6]=de=>L.value=de)},null,8,["modelValue"])])):t.createCommentVNode("",!0),ee.value==="preview"?(t.openBlock(),t.createElementBlock("div",Wy,[t.createVNode(Sy,{slug:(Ne=L.value)==null?void 0:Ne.slug,preview_path:d.value},null,8,["slug","preview_path"])])):t.createCommentVNode("",!0)])}}}),Yy=t.defineAsyncComponent(()=>Promise.resolve().then(()=>c1)),zy=t.defineAsyncComponent(()=>Promise.resolve().then(()=>Uk)),Ky=t.defineAsyncComponent(()=>Promise.resolve().then(()=>h1)),Xy={collections:Qn,articles:il,createArticle:ns,editArticle:ns,editCollection:rs,menu:Yy,editMenu:zy,createMenu:Ky},Qy=Qn,Zy=e=>Xy[e]??Qy,Jy={key:1,class:"p-4 text-sm text-slate-600 dark:text-slate-300"},e1=t.defineComponent({__name:"CmsContentWrapper",setup(e){const r=De.useRoute(),n=t.getCurrentInstance();if(!n)throw new Error("CmsContentWrapper must be used within a component instance");const o=t.computed(()=>{const f=n.appContext.config.globalProperties.$route;if(!f)throw new Error("Vue Router is not registered on the app instance");return f}),a=t.computed(()=>r??o.value),l=t.computed(()=>{var f;return((f=a.value)==null?void 0:f.params)??{}}),s=t.computed(()=>{var f,g;return((f=l.value)==null?void 0:f.collection)??((g=l.value)==null?void 0:g.type)}),i=t.computed(()=>{var f;return(f=l.value)==null?void 0:f.id}),c=t.computed(()=>_y(s.value,i.value)),u=t.computed(()=>Zy(c.value.type)),d=t.computed(()=>`${c.value.type}-${c.value.collection??""}-${c.value.id??""}`),m=t.computed(()=>{const{type:f,collection:g,id:y}=c.value,x={...l.value};return s.value?x.collection=s.value:delete x.collection,f==="articles"?x.id=g:f==="createArticle"?delete x.id:f==="editCollection"?x.id=g:f==="editArticle"&&y?x.id=y:delete x.id,x}),p=new Proxy({},{get(f,g,y){const x=a.value;if(!x)return;if(g==="params")return m.value;const h=Reflect.get(x,g,y);return typeof h=="function"?h.bind(x):h},has(f,g){if(g==="params")return!0;const y=a.value;return y?Reflect.has(y,g):!1},ownKeys(){const f=a.value;return f?Reflect.ownKeys(f):["params"]},getOwnPropertyDescriptor(f,g){if(g==="params")return{configurable:!0,enumerable:!0,value:m.value};const y=a.value;if(!y)return;const x=Reflect.getOwnPropertyDescriptor(y,g);if(x)return{...x,configurable:!0}}});return t.provide(De.routeLocationKey,p),(f,g)=>u.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u.value),{key:d.value})):(t.openBlock(),t.createElementBlock("div",Jy,t.toDisplayString(f.$t("cms.navigation.collections")),1))}}),t1={class:"space-y-6 max-w-7xl mx-auto"},r1={class:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"},n1={class:"flex items-center gap-2"},o1={class:"text-3xl font-bold text-slate-800 dark:text-slate-100 mb-2"},a1=["href","title"],l1={class:"text-slate-600 dark:text-slate-300"},s1={class:"overflow-hidden bg-white border border-gray-200 rounded-lg shadow-sm dark:bg-gray-800 dark:border-gray-700"},i1={key:0,class:"p-4 border-b border-gray-200 sm:p-6 dark:border-gray-700"},os=t.defineComponent({__name:"MenuPage",setup(e){const{t:r,locale:n}=me(),o=De.useRouter(),a=t.ref(""),l=t.ref([]),s=t.ref([]),i=t.ref(""),c=t.ref([{name:"name",title:r("cms.menu.form.name"),type:"text"},{name:"description",title:r("cms.menu.form.description"),type:"text"},{name:"locale",title:r("cms.menu.form.language"),type:"select",data:[{text:"uk",id:"uk"},{text:"en",id:"en"}]}]),u=async()=>{const y=await(await fetch("/api/cms-menu")).json(),x=y.rows;l.value=x;const h=(y.filters||[]).map(k=>{const{extra:w,title:E,...V}=k;return V});s.value=h},d=g=>{o.push(`/menu/edit/${g==null?void 0:g.menu_id}`)},m=async g=>{try{await fetch(`/api/cms-menu/${g==null?void 0:g.menu_id}`,{method:"DELETE"}),await Q.notify({title:r("cms.menu.menuDeleted"),type:"success",message:r("cms.menu.menuDeleted")}),await u()}catch{Q.notify({title:r("cms.menu.menuDeleteError"),type:"error",message:r("cms.menu.menuDeleteError")})}},p=(g,y)=>{if(!y)return!0;const x=y.toLowerCase();return c.value.some(h=>{const k=g[h.name];return k&&k.toString().toLowerCase().includes(x)})},f=g=>{const y=Object.entries(g==null?void 0:g.data).filter(([,x])=>x!=null).map(([x,h])=>`${x}=${h}`).join("|");i.value=y};return t.onMounted(u),(g,y)=>{var h;const x=t.resolveComponent("router-link");return t.openBlock(),t.createElementBlock("div",t1,[t.createElementVNode("div",r1,[t.createElementVNode("div",null,[t.createElementVNode("div",n1,[t.createElementVNode("h1",o1,t.toDisplayString(g.$t("cms.menu.title")),1),t.createElementVNode("a",{href:`https://cms.opengis.info/${t.unref(n)}/guides/menu/`,target:"_blank",title:g.$t("cms.guide.menu")},[t.createVNode(t.unref(wt),{class:"w-5 h-5"})],8,a1)]),t.createElementVNode("p",l1,t.toDisplayString(g.$t("cms.menu.description")),1)]),t.createVNode(x,{to:"/menu/create",class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105"},{default:t.withCtx(()=>[t.createVNode(t.unref(pt),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(g.$t("cms.menu.menuAdd")),1)]),_:1})]),t.createElementVNode("div",s1,[((h=s.value)==null?void 0:h.length)>0?(t.openBlock(),t.createElementBlock("div",i1,[t.createVNode(t.unref(Mo),{schema:s.value,view:"inline",onChange:f},null,8,["schema"])])):t.createCommentVNode("",!0),t.createVNode(Zn,{rows:l.value,columns:c.value,query:a.value,filterFn:p,onEdit:d,onDelete:m},null,8,["rows","columns","query"])])])}}}),c1=Object.freeze(Object.defineProperty({__proto__:null,default:os},Symbol.toStringTag,{value:"Module"})),d1={class:"space-y-6 max-w-7xl mx-auto"},u1={class:"flex items-center justify-between"},m1={class:"flex items-center gap-4"},p1={class:"text-2xl font-semibold text-gray-900 dark:text-white"},f1={class:"flex items-center space-x-3"},g1={class:"max-w-[1000px]"},as=t.defineComponent({__name:"MenuAddPage",setup(e){Y.inputs["vs-input-monaco-editor"]=Wr;const{t:r}=me(),n=De.useRouter();De.useRoute();const o=t.ref([{key:"name",title:r("cms.menu.form.name"),type:"text",placeholder:r("cms.menu.form.name"),required:!0,validators:["required"]},{key:"description",title:r("cms.menu.form.description"),type:"text",placeholder:r("cms.menu.form.description"),required:!0,validators:["required"]},{key:"locale",title:r("cms.menu.form.language"),type:"select",placeholder:r("cms.menu.form.language"),options:[{text:"Ukrainian",id:"uk"},{text:"English",id:"en"}],required:!0,validators:["required"]},{key:"content",title:r("cms.menu.form.content"),type:"monaco-editor",height:"500px",language:"yaml",theme:"vs-light"}]),a=t.ref({}),l=t.ref({}),s=async()=>{try{if(await l.value.validate()){Q.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.menu.createMenuFailed")});return}await fetch("/api/cms-menu",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a.value)}),Q.notify({title:r("cms.common.success"),type:"success",message:r("cms.common.successMessage")}),a.value={},n.push("/menu")}catch(i){console.log(i),Q.notify({title:r("cms.common.error"),type:"error",message:r("cms.common.errorMessage")})}};return(i,c)=>(t.openBlock(),t.createElementBlock("div",d1,[t.createElementVNode("div",u1,[t.createElementVNode("div",m1,[t.createElementVNode("button",{onClick:c[0]||(c[0]=u=>t.unref(n).back()),class:"p-2 text-gray-500 rounded-full hover:text-gray-900 dark:text-gray-400 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"},[t.createVNode(t.unref(fn),{class:"w-5 h-5"})]),t.createElementVNode("h1",p1,t.toDisplayString(i.$t("cms.menu.menuAdd")),1)]),t.createElementVNode("div",f1,[t.createElementVNode("button",{onClick:s,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[t.createVNode(t.unref(_n),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(i.$t("cms.common.actions.save")),1)])])]),t.createElementVNode("div",g1,[t.createVNode(t.unref(Y.VForm),{schema:o.value,modelValue:a.value,"onUpdate:modelValue":c[1]||(c[1]=u=>a.value=u),form:l.value,"onUpdate:form":c[2]||(c[2]=u=>l.value=u)},null,8,["schema","modelValue","form"])])]))}}),h1=Object.freeze(Object.defineProperty({__proto__:null,default:as},Symbol.toStringTag,{value:"Module"})),b1={},y1={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function _1(e,r){return t.openBlock(),t.createElementBlock("svg",y1,[...r[0]||(r[0]=[t.createStaticVNode('<circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle>',6)])])}const k1=bt(b1,[["render",_1]]),x1={key:0,class:"p-3 flex items-center gap-x-3 cursor-grab bg-gray-100 border border-gray-300 rounded-lg font-medium text-sm text-gray-800 dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-200"},w1={key:0,class:"text-xs text-gray-500 dark:text-neutral-400 ml-2"},E1={key:1,class:"p-3 flex items-center gap-x-2 bg-gray-100 border border-gray-300 rounded-lg dark:bg-neutral-900 dark:border-neutral-700"},v1={class:"text-sm font-medium text-gray-800 dark:text-neutral-200 shrink-0"},N1=t.defineComponent({__name:"MenuItem",props:{title:{},value:{}},emits:["delete","update:value"],setup(e,{emit:r}){const n=e,o=r,a=t.ref(!1),l=t.ref(""),s=()=>{typeof n.value=="string"&&(l.value=n.value,a.value=!0)},i=()=>{typeof n.value=="string"&&(o("update:value",l.value),a.value=!1)},c=()=>{a.value=!1,l.value=""};return(u,d)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([{"space-y-1":typeof u.value!="string"},"dark:bg-transparent"])},[a.value?(t.openBlock(),t.createElementBlock("div",E1,[t.createElementVNode("span",v1,t.toDisplayString(u.title)+":",1),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":d[1]||(d[1]=m=>l.value=m),onKeyup:[t.withKeys(i,["enter"]),t.withKeys(c,["esc"])],onBlur:i,class:"flex-1 px-2 py-1 text-sm border border-gray-300 rounded dark:bg-neutral-800 dark:border-neutral-600 dark:text-neutral-200 focus:outline-none focus:ring-2 focus:ring-blue-500",type:"text",placeholder:"/link"},null,544),[[t.vModelText,l.value]]),t.createElementVNode("button",{onClick:t.withModifiers(i,["stop"]),class:"shrink-0 p-1 text-green-600 dark:text-green-400 hover:bg-green-50 dark:hover:bg-green-900/20 rounded",title:"Save"},[t.createVNode(t.unref(Fs),{class:"size-4"})]),t.createElementVNode("button",{onClick:t.withModifiers(c,["stop"]),class:"shrink-0 p-1 text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 rounded",title:"Cancel"},[t.createVNode(t.unref(zs),{class:"size-4"})])])):(t.openBlock(),t.createElementBlock("div",x1,[t.createTextVNode(t.toDisplayString(u.title)+" ",1),typeof u.value=="string"?(t.openBlock(),t.createElementBlock("span",w1,t.toDisplayString(u.value),1)):t.createCommentVNode("",!0),typeof u.value=="string"?(t.openBlock(),t.createBlock(t.unref(yn),{key:1,class:"shrink-0 size-4 ml-auto text-gray-500 dark:text-neutral-500 cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:t.withModifiers(s,["stop"])})):t.createCommentVNode("",!0),t.createVNode(t.unref(ft),{class:"shrink-0 size-4 text-gray-500 dark:text-neutral-500 cursor-pointer hover:text-red-600 dark:hover:text-red-400",onClick:d[0]||(d[0]=t.withModifiers(m=>o("delete"),["stop"]))}),t.createVNode(k1,{class:"shrink-0 size-4 cursor-pointer text-gray-500 dark:text-neutral-500"})]))],2))}}),C1={class:"space-y-1"},S1=t.defineComponent({__name:"MenuList",props:{list:{type:Array,default:()=>[]},inside:{type:Boolean,default:!1}},emits:["update:list","delete:item"],setup(e,{emit:r}){const{t:n}=me(),o=e,a=r,l=t.ref([]);t.watch(()=>o.list,d=>{l.value=d?[...d]:[]},{immediate:!0,deep:!0});const s=()=>{a("update:list",l.value)},i=d=>{Q.confirm({title:n("cms.builder.deleteTitle"),message:n("cms.builder.deleteObject"),type:"error",onConfirm:()=>{a("update:list",l.value),a("delete:item",d)}})},c=(d,m)=>{d.value=m,t.nextTick(()=>{l.value=[...l.value],a("update:list",l.value)})},u=(d,m)=>{d.children=m,t.nextTick(()=>{l.value=[...l.value],a("update:list",l.value)})};return(d,m)=>{const p=t.resolveComponent("MenuList",!0);return t.openBlock(),t.createBlock(t.unref(wo),{tag:"ul",list:l.value,group:{name:"nested",pull:!0,put:!0},"item-key":"id",class:t.normalizeClass(["nested-sortable space-y-1",{"ps-5 dark:bg-transparent":e.inside}]),onChange:s,onEnd:s},{item:t.withCtx(({element:f})=>[t.createElementVNode("div",C1,[t.createVNode(N1,{title:f.title,value:f.value,onDelete:g=>i(f),"onUpdate:value":g=>c(f,g)},null,8,["title","value","onDelete","onUpdate:value"]),Array.isArray(f.children)?(t.openBlock(),t.createBlock(p,{key:0,list:f.children,inside:!0,"onUpdate:list":g=>u(f,g),"onDelete:item":i},null,8,["list","onUpdate:list"])):t.createCommentVNode("",!0)])]),_:1},8,["list","class"])}}}),V1={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},D1=t.defineComponent({__name:"AddNewItemInTree",props:{isOpen:{type:Boolean,required:!0},isOpenModifiers:{}},emits:t.mergeModels(["addNewItem"],["update:isOpen"]),setup(e,{emit:r}){const{t:n}=me(),o=t.useModel(e,"isOpen"),a=t.ref({}),l=r,s=t.ref({}),i={title:{type:"text",label:n("cms.menu.form.name"),required:!0,placeholder:n("cms.menu.form.name"),validators:["required"]},value:{type:"text",label:n("cms.menu.form.value"),required:!0,placeholder:n("cms.menu.form.value"),validators:["required"]}},c=async()=>{if(await a.value.validate()){Q.notify({type:"warning",title:n("cms.common.actions.warning"),message:n("cms.menu.createMenuFailed")});return}l("addNewItem",s.value),s.value={}};return(u,d)=>(t.openBlock(),t.createBlock(t.unref(Q.VsModal),{teleport:"#modal",visible:o.value,title:u.$t("cms.menu.createMenu"),template:"default",closeClickBack:!1,onClose:d[3]||(d[3]=m=>o.value=!1)},{footer:t.withCtx(()=>[t.createElementVNode("div",V1,[t.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm text-black duration-300 border border-gray-200 rounded-lg gap-x-2 whitespace-nowrap hover:bg-gray-100",onClick:d[2]||(d[2]=m=>{o.value=!1,s.value={}})},t.toDisplayString(u.$t("cms.common.actions.cancel")),1),t.createElementVNode("button",{onClick:c,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"},t.toDisplayString(u.$t("cms.common.actions.save")),1)])]),default:t.withCtx(()=>[t.createVNode(t.unref(Y),{form:a.value,"onUpdate:form":d[0]||(d[0]=m=>a.value=m),modelValue:s.value,"onUpdate:modelValue":d[1]||(d[1]=m=>s.value=m),schema:i},null,8,["form","modelValue"])]),_:1},8,["visible","title"]))}}),T1=t.defineComponent({__name:"MenuBody",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){Y.inputs["vs-input-monaco-editor"]=Wr;const{t:r}=me(),n=t.ref(!1),o=t.ref(null),a=t.useModel(e,"modelValue"),l=t.ref({}),s=async p=>{try{if(await l.value.validate()){Q.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.menu.createMenuFailed")});return}n.value=!1,p.id=Math.random().toString(36).substr(2,9),p.children=[],a.value.items.unshift(p)}catch(f){console.log(f)}},i=t.ref([{key:"name",title:r("cms.common.title"),type:"text",placeholder:r("cms.common.title"),required:!0,validators:["required"]},{key:"description",title:r("cms.common.description"),type:"text",placeholder:r("cms.common.description"),required:!0,validators:["required"]},{key:"locale",title:r("cms.menu.form.language"),type:"select",placeholder:r("cms.menu.form.language"),required:!0,options:[{text:"Ukrainian",id:"uk"},{text:"English",id:"en"}],validators:["required"]}]),c=p=>{let f=[];for(const g in p)typeof p[g]=="object"?f.push({title:g,value:"",id:Math.random().toString(36).substr(2,9),children:c(p[g])}):f.push({title:g,value:p[g],id:Math.random().toString(36).substr(2,9),children:[]});return f},u=p=>{a.value.items=p},d=p=>{m(a.value.items,p.id)};function m(p,f){for(let g=p.length-1;g>=0;g--){if(p[g].id===f)return p.splice(g,1),!0;if(p[g].children&&p[g].children.length&&m(p[g].children,f))return!0}return!1}return t.onBeforeMount(()=>{Array.isArray(a.value.items)||(a.value.items=c(a.value.items))}),(p,f)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(Y.VForm),{schema:i.value,modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=g=>a.value=g),form:l.value,"onUpdate:form":f[1]||(f[1]=g=>l.value=g)},null,8,["schema","modelValue","form"]),t.createElementVNode("button",{onClick:f[2]||(f[2]=g=>n.value=!0),class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium w-min ml-auto my-6 h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[t.createVNode(t.unref(pt),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(p.$t("cms.menu.createMenu")),1)]),t.createVNode(D1,{isOpen:n.value,"onUpdate:isOpen":f[3]||(f[3]=g=>n.value=g),form:o.value,"onUpdate:form":f[4]||(f[4]=g=>o.value=g),onAddNewItem:s},null,8,["isOpen","form"]),t.createVNode(S1,{class:"px-2",list:a.value.items,"onUpdate:list":u,"onDelete:item":d},null,8,["list"])],64))}});/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function ls(e){return typeof e>"u"||e===null}function A1(e){return typeof e=="object"&&e!==null}function $1(e){return Array.isArray(e)?e:ls(e)?[]:[e]}function I1(e,r){var n,o,a,l;if(r)for(l=Object.keys(r),n=0,o=l.length;n<o;n+=1)a=l[n],e[a]=r[a];return e}function L1(e,r){var n="",o;for(o=0;o<r;o+=1)n+=e;return n}function M1(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var O1=ls,B1=A1,F1=$1,P1=L1,R1=M1,U1=I1,Ft={isNothing:O1,isObject:B1,toArray:F1,repeat:P1,isNegativeZero:R1,extend:U1};function ss(e,r){var n="",o=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!r&&e.mark.snippet&&(n+=`
|
|
249
254
|
|
|
250
|
-
`+e.mark.snippet),o+" "+n):o}function
|
|
251
|
-
\r`;function
|
|
252
|
-
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}for(var
|
|
255
|
+
`+e.mark.snippet),o+" "+n):o}function Sr(e,r){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=r,this.message=ss(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Sr.prototype=Object.create(Error.prototype),Sr.prototype.constructor=Sr,Sr.prototype.toString=function(r){return this.name+": "+ss(this,r)};var nt=Sr,j1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],q1=["scalar","sequence","mapping"];function H1(e){var r={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(o){r[String(o)]=n})}),r}function G1(e,r){if(r=r||{},Object.keys(r).forEach(function(n){if(j1.indexOf(n)===-1)throw new nt('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=r,this.tag=e,this.kind=r.kind||null,this.resolve=r.resolve||function(){return!0},this.construct=r.construct||function(n){return n},this.instanceOf=r.instanceOf||null,this.predicate=r.predicate||null,this.represent=r.represent||null,this.representName=r.representName||null,this.defaultStyle=r.defaultStyle||null,this.multi=r.multi||!1,this.styleAliases=H1(r.styleAliases||null),q1.indexOf(this.kind)===-1)throw new nt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Pe=G1;function is(e,r){var n=[];return e[r].forEach(function(o){var a=n.length;n.forEach(function(l,s){l.tag===o.tag&&l.kind===o.kind&&l.multi===o.multi&&(a=s)}),n[a]=o}),n}function W1(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},r,n;function o(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(r=0,n=arguments.length;r<n;r+=1)arguments[r].forEach(o);return e}function Co(e){return this.extend(e)}Co.prototype.extend=function(r){var n=[],o=[];if(r instanceof Pe)o.push(r);else if(Array.isArray(r))o=o.concat(r);else if(r&&(Array.isArray(r.implicit)||Array.isArray(r.explicit)))r.implicit&&(n=n.concat(r.implicit)),r.explicit&&(o=o.concat(r.explicit));else throw new nt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(l){if(!(l instanceof Pe))throw new nt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.loadKind!=="scalar")throw new nt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(l.multi)throw new nt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),o.forEach(function(l){if(!(l instanceof Pe))throw new nt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(Co.prototype);return a.implicit=(this.implicit||[]).concat(n),a.explicit=(this.explicit||[]).concat(o),a.compiledImplicit=is(a,"implicit"),a.compiledExplicit=is(a,"explicit"),a.compiledTypeMap=W1(a.compiledImplicit,a.compiledExplicit),a};var Y1=Co,z1=new Pe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),K1=new Pe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),X1=new Pe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Q1=new Y1({explicit:[z1,K1,X1]});function Z1(e){if(e===null)return!0;var r=e.length;return r===1&&e==="~"||r===4&&(e==="null"||e==="Null"||e==="NULL")}function J1(){return null}function e_(e){return e===null}var t_=new Pe("tag:yaml.org,2002:null",{kind:"scalar",resolve:Z1,construct:J1,predicate:e_,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function r_(e){if(e===null)return!1;var r=e.length;return r===4&&(e==="true"||e==="True"||e==="TRUE")||r===5&&(e==="false"||e==="False"||e==="FALSE")}function n_(e){return e==="true"||e==="True"||e==="TRUE"}function o_(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var a_=new Pe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:r_,construct:n_,predicate:o_,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function l_(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function s_(e){return 48<=e&&e<=55}function i_(e){return 48<=e&&e<=57}function c_(e){if(e===null)return!1;var r=e.length,n=0,o=!1,a;if(!r)return!1;if(a=e[n],(a==="-"||a==="+")&&(a=e[++n]),a==="0"){if(n+1===r)return!0;if(a=e[++n],a==="b"){for(n++;n<r;n++)if(a=e[n],a!=="_"){if(a!=="0"&&a!=="1")return!1;o=!0}return o&&a!=="_"}if(a==="x"){for(n++;n<r;n++)if(a=e[n],a!=="_"){if(!l_(e.charCodeAt(n)))return!1;o=!0}return o&&a!=="_"}if(a==="o"){for(n++;n<r;n++)if(a=e[n],a!=="_"){if(!s_(e.charCodeAt(n)))return!1;o=!0}return o&&a!=="_"}}if(a==="_")return!1;for(;n<r;n++)if(a=e[n],a!=="_"){if(!i_(e.charCodeAt(n)))return!1;o=!0}return!(!o||a==="_")}function d_(e){var r=e,n=1,o;if(r.indexOf("_")!==-1&&(r=r.replace(/_/g,"")),o=r[0],(o==="-"||o==="+")&&(o==="-"&&(n=-1),r=r.slice(1),o=r[0]),r==="0")return 0;if(o==="0"){if(r[1]==="b")return n*parseInt(r.slice(2),2);if(r[1]==="x")return n*parseInt(r.slice(2),16);if(r[1]==="o")return n*parseInt(r.slice(2),8)}return n*parseInt(r,10)}function u_(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ft.isNegativeZero(e)}var m_=new Pe("tag:yaml.org,2002:int",{kind:"scalar",resolve:c_,construct:d_,predicate:u_,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),p_=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function f_(e){return!(e===null||!p_.test(e)||e[e.length-1]==="_")}function g_(e){var r,n;return r=e.replace(/_/g,"").toLowerCase(),n=r[0]==="-"?-1:1,"+-".indexOf(r[0])>=0&&(r=r.slice(1)),r===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:r===".nan"?NaN:n*parseFloat(r,10)}var h_=/^[-+]?[0-9]+e/;function b_(e,r){var n;if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ft.isNegativeZero(e))return"-0.0";return n=e.toString(10),h_.test(n)?n.replace("e",".e"):n}function y_(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ft.isNegativeZero(e))}var __=new Pe("tag:yaml.org,2002:float",{kind:"scalar",resolve:f_,construct:g_,predicate:y_,represent:b_,defaultStyle:"lowercase"}),k_=Q1.extend({implicit:[t_,a_,m_,__]}),x_=k_,cs=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ds=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function w_(e){return e===null?!1:cs.exec(e)!==null||ds.exec(e)!==null}function E_(e){var r,n,o,a,l,s,i,c=0,u=null,d,m,p;if(r=cs.exec(e),r===null&&(r=ds.exec(e)),r===null)throw new Error("Date resolve error");if(n=+r[1],o=+r[2]-1,a=+r[3],!r[4])return new Date(Date.UTC(n,o,a));if(l=+r[4],s=+r[5],i=+r[6],r[7]){for(c=r[7].slice(0,3);c.length<3;)c+="0";c=+c}return r[9]&&(d=+r[10],m=+(r[11]||0),u=(d*60+m)*6e4,r[9]==="-"&&(u=-u)),p=new Date(Date.UTC(n,o,a,l,s,i,c)),u&&p.setTime(p.getTime()-u),p}function v_(e){return e.toISOString()}var N_=new Pe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:w_,construct:E_,instanceOf:Date,represent:v_});function C_(e){return e==="<<"||e===null}var S_=new Pe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:C_}),So=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
256
|
+
\r`;function V_(e){if(e===null)return!1;var r,n,o=0,a=e.length,l=So;for(n=0;n<a;n++)if(r=l.indexOf(e.charAt(n)),!(r>64)){if(r<0)return!1;o+=6}return o%8===0}function D_(e){var r,n,o=e.replace(/[\r\n=]/g,""),a=o.length,l=So,s=0,i=[];for(r=0;r<a;r++)r%4===0&&r&&(i.push(s>>16&255),i.push(s>>8&255),i.push(s&255)),s=s<<6|l.indexOf(o.charAt(r));return n=a%4*6,n===0?(i.push(s>>16&255),i.push(s>>8&255),i.push(s&255)):n===18?(i.push(s>>10&255),i.push(s>>2&255)):n===12&&i.push(s>>4&255),new Uint8Array(i)}function T_(e){var r="",n=0,o,a,l=e.length,s=So;for(o=0;o<l;o++)o%3===0&&o&&(r+=s[n>>18&63],r+=s[n>>12&63],r+=s[n>>6&63],r+=s[n&63]),n=(n<<8)+e[o];return a=l%3,a===0?(r+=s[n>>18&63],r+=s[n>>12&63],r+=s[n>>6&63],r+=s[n&63]):a===2?(r+=s[n>>10&63],r+=s[n>>4&63],r+=s[n<<2&63],r+=s[64]):a===1&&(r+=s[n>>2&63],r+=s[n<<4&63],r+=s[64],r+=s[64]),r}function A_(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var $_=new Pe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:V_,construct:D_,predicate:A_,represent:T_}),I_=Object.prototype.hasOwnProperty,L_=Object.prototype.toString;function M_(e){if(e===null)return!0;var r=[],n,o,a,l,s,i=e;for(n=0,o=i.length;n<o;n+=1){if(a=i[n],s=!1,L_.call(a)!=="[object Object]")return!1;for(l in a)if(I_.call(a,l))if(!s)s=!0;else return!1;if(!s)return!1;if(r.indexOf(l)===-1)r.push(l);else return!1}return!0}function O_(e){return e!==null?e:[]}var B_=new Pe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:M_,construct:O_}),F_=Object.prototype.toString;function P_(e){if(e===null)return!0;var r,n,o,a,l,s=e;for(l=new Array(s.length),r=0,n=s.length;r<n;r+=1){if(o=s[r],F_.call(o)!=="[object Object]"||(a=Object.keys(o),a.length!==1))return!1;l[r]=[a[0],o[a[0]]]}return!0}function R_(e){if(e===null)return[];var r,n,o,a,l,s=e;for(l=new Array(s.length),r=0,n=s.length;r<n;r+=1)o=s[r],a=Object.keys(o),l[r]=[a[0],o[a[0]]];return l}var U_=new Pe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:P_,construct:R_}),j_=Object.prototype.hasOwnProperty;function q_(e){if(e===null)return!0;var r,n=e;for(r in n)if(j_.call(n,r)&&n[r]!==null)return!1;return!0}function H_(e){return e!==null?e:{}}var G_=new Pe("tag:yaml.org,2002:set",{kind:"mapping",resolve:q_,construct:H_}),W_=x_.extend({implicit:[N_,S_],explicit:[$_,B_,U_,G_]});function us(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
257
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}for(var Y_=new Array(256),z_=new Array(256),nr=0;nr<256;nr++)Y_[nr]=us(nr)?1:0,z_[nr]=us(nr);var ms=Object.prototype.toString,ps=Object.prototype.hasOwnProperty,Vo=65279,K_=9,Vr=10,X_=13,Q_=32,Z_=33,J_=34,Do=35,ek=37,tk=38,rk=39,nk=42,fs=44,ok=45,un=58,ak=61,lk=62,sk=63,ik=64,gs=91,hs=93,ck=96,bs=123,dk=124,ys=125,Re={};Re[0]="\\0",Re[7]="\\a",Re[8]="\\b",Re[9]="\\t",Re[10]="\\n",Re[11]="\\v",Re[12]="\\f",Re[13]="\\r",Re[27]="\\e",Re[34]='\\"',Re[92]="\\\\",Re[133]="\\N",Re[160]="\\_",Re[8232]="\\L",Re[8233]="\\P";var uk=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],mk=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function pk(e,r){var n,o,a,l,s,i,c;if(r===null)return{};for(n={},o=Object.keys(r),a=0,l=o.length;a<l;a+=1)s=o[a],i=String(r[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),c=e.compiledTypeMap.fallback[s],c&&ps.call(c.styleAliases,i)&&(i=c.styleAliases[i]),n[s]=i;return n}function fk(e){var r,n,o;if(r=e.toString(16).toUpperCase(),e<=255)n="x",o=2;else if(e<=65535)n="u",o=4;else if(e<=4294967295)n="U",o=8;else throw new nt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+Ft.repeat("0",o-r.length)+r}var gk=1,Dr=2;function hk(e){this.schema=e.schema||W_,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ft.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=pk(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Dr:gk,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function _s(e,r){for(var n=Ft.repeat(" ",r),o=0,a=-1,l="",s,i=e.length;o<i;)a=e.indexOf(`
|
|
253
258
|
`,o),a===-1?(s=e.slice(o),o=i):(s=e.slice(o,a+1),o=a+1),s.length&&s!==`
|
|
254
|
-
`&&(l+=n),l+=s;return l}function
|
|
255
|
-
`+
|
|
259
|
+
`&&(l+=n),l+=s;return l}function To(e,r){return`
|
|
260
|
+
`+Ft.repeat(" ",e.indent*r)}function bk(e,r){var n,o,a;for(n=0,o=e.implicitTypes.length;n<o;n+=1)if(a=e.implicitTypes[n],a.resolve(r))return!0;return!1}function mn(e){return e===Q_||e===K_}function Tr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Vo||65536<=e&&e<=1114111}function ks(e){return Tr(e)&&e!==Vo&&e!==X_&&e!==Vr}function xs(e,r,n){var o=ks(e),a=o&&!mn(e);return(n?o:o&&e!==fs&&e!==gs&&e!==hs&&e!==bs&&e!==ys)&&e!==Do&&!(r===un&&!a)||ks(r)&&!mn(r)&&e===Do||r===un&&a}function yk(e){return Tr(e)&&e!==Vo&&!mn(e)&&e!==ok&&e!==sk&&e!==un&&e!==fs&&e!==gs&&e!==hs&&e!==bs&&e!==ys&&e!==Do&&e!==tk&&e!==nk&&e!==Z_&&e!==dk&&e!==ak&&e!==lk&&e!==rk&&e!==J_&&e!==ek&&e!==ik&&e!==ck}function _k(e){return!mn(e)&&e!==un}function Ar(e,r){var n=e.charCodeAt(r),o;return n>=55296&&n<=56319&&r+1<e.length&&(o=e.charCodeAt(r+1),o>=56320&&o<=57343)?(n-55296)*1024+o-56320+65536:n}function ws(e){var r=/^\n* /;return r.test(e)}var Es=1,Ao=2,vs=3,Ns=4,or=5;function kk(e,r,n,o,a,l,s,i){var c,u=0,d=null,m=!1,p=!1,f=o!==-1,g=-1,y=yk(Ar(e,0))&&_k(Ar(e,e.length-1));if(r||s)for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=Ar(e,c),!Tr(u))return or;y=y&&xs(u,d,i),d=u}else{for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=Ar(e,c),u===Vr)m=!0,f&&(p=p||c-g-1>o&&e[g+1]!==" ",g=c);else if(!Tr(u))return or;y=y&&xs(u,d,i),d=u}p=p||f&&c-g-1>o&&e[g+1]!==" "}return!m&&!p?y&&!s&&!a(e)?Es:l===Dr?or:Ao:n>9&&ws(e)?or:s?l===Dr?or:Ao:p?Ns:vs}function xk(e,r,n,o,a){e.dump=function(){if(r.length===0)return e.quotingType===Dr?'""':"''";if(!e.noCompatMode&&(uk.indexOf(r)!==-1||mk.test(r)))return e.quotingType===Dr?'"'+r+'"':"'"+r+"'";var l=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-l),i=o||e.flowLevel>-1&&n>=e.flowLevel;function c(u){return bk(e,u)}switch(kk(r,i,e.indent,s,c,e.quotingType,e.forceQuotes&&!o,a)){case Es:return r;case Ao:return"'"+r.replace(/'/g,"''")+"'";case vs:return"|"+Cs(r,e.indent)+Ss(_s(r,l));case Ns:return">"+Cs(r,e.indent)+Ss(_s(wk(r,s),l));case or:return'"'+Ek(r)+'"';default:throw new nt("impossible error: invalid scalar style")}}()}function Cs(e,r){var n=ws(e)?String(r):"",o=e[e.length-1]===`
|
|
256
261
|
`,a=o&&(e[e.length-2]===`
|
|
257
262
|
`||e===`
|
|
258
263
|
`),l=a?"+":o?"":"-";return n+l+`
|
|
259
264
|
`}function Ss(e){return e[e.length-1]===`
|
|
260
|
-
`?e.slice(0,-1):e}function
|
|
261
|
-
`);return
|
|
265
|
+
`?e.slice(0,-1):e}function wk(e,r){for(var n=/(\n+)([^\n]*)/g,o=function(){var u=e.indexOf(`
|
|
266
|
+
`);return u=u!==-1?u:e.length,n.lastIndex=u,Vs(e.slice(0,u),r)}(),a=e[0]===`
|
|
262
267
|
`||e[0]===" ",l,s;s=n.exec(e);){var i=s[1],c=s[2];l=c[0]===" ",o+=i+(!a&&!l&&c!==""?`
|
|
263
268
|
`:"")+Vs(c,r),a=l}return o}function Vs(e,r){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,o,a=0,l,s=0,i=0,c="";o=n.exec(e);)i=o.index,i-a>r&&(l=s>a?s:i,c+=`
|
|
264
269
|
`+e.slice(a,l),a=l+1),s=i;return c+=`
|
|
265
270
|
`,e.length-a>r&&s>a?c+=e.slice(a,s)+`
|
|
266
|
-
`+e.slice(s+1):c+=e.slice(a),c.slice(1)}function
|
|
267
|
-
`:""}var vx=Ex,Nx={dump:vx},Cx=Nx.dump;const Sx={class:"space-y-6 max-w-7xl mx-auto"},Vx={class:"flex items-center justify-between"},Dx={class:"flex items-center gap-4"},Tx={class:"flex items-center gap-2"},Ax={class:"text-2xl font-semibold text-gray-900 dark:text-white"},Ix=["href","title"],$x={class:"flex items-center space-x-3"},Lx={key:0,class:"max-w-[1000px] flex flex-col"},Mx={class:"flex ml-2 mb-6 w-min border border-gray-200 dark:border-gray-700 rounded-full overflow-hidden"},As=t.defineComponent({__name:"MenuItemPage",setup(e){z.inputs["vs-input-monaco-editor"]=Gr;const{t:r,locale:n}=ue(),o=Ce.useRouter(),a=Ce.useRoute(),l=t.computed(()=>[{key:"name",title:r("cms.menu.form.name"),type:"text",placeholder:r("cms.menu.form.name"),required:!0,validators:["required"]},{key:"description",title:r("cms.menu.form.description"),type:"text",placeholder:r("cms.menu.form.description"),required:!0,validators:["required"]},{key:"locale",title:r("cms.menu.form.language"),type:"select",placeholder:r("cms.menu.form.language"),options:[{text:"Ukrainian",id:"uk"},{text:"English",id:"en"}],required:!0,validators:["required"]},{key:"content",title:r("cms.menu.form.content"),type:"monaco-editor",height:"500px",language:"yaml",theme:"vs-light"}]),s=t.ref(null),i=t.ref({}),c=t.ref(!1),d=t.ref(!1),m=f=>{const g={};for(const h of f){const{title:k,value:b,children:x}=h;x&&x.length>0?g[k]=m(x):g[k]=b}return g},u=async()=>{let f={...s.value||{}};if(await i.value.validate()){Z.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.menu.createMenuFailed")});return}Array.isArray(f.items)&&(f.items=m(f.items),f.content=Cx(f.items));try{await fetch(`/api/cms-menu/${a.params.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}),Z.notify({title:r("cms.menu.menuUpdated"),type:"success",message:r("cms.menu.menuUpdated")}),o.push("/menu")}catch{Z.notify({title:r("cms.menu.menuUpdateError"),type:"error",message:r("cms.menu.menuUpdateError")})}},p=async()=>{try{const g=await(await fetch(`/api/cms-menu/${a.params.id}`)).json();s.value=g,c.value=!0}catch{c.value=!1}};return t.onMounted(p),(f,g)=>(t.openBlock(),t.createElementBlock("div",Sx,[t.createElementVNode("div",Vx,[t.createElementVNode("div",Dx,[t.createElementVNode("button",{onClick:g[0]||(g[0]=h=>t.unref(o).back()),class:"p-2 text-gray-500 rounded-full hover:text-gray-900 dark:text-gray-400 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"},[t.createVNode(t.unref(fn),{class:"w-5 h-5"})]),t.createElementVNode("div",Tx,[t.createElementVNode("h1",Ax,t.toDisplayString(f.$t("cms.menu.editMenu")),1),t.createElementVNode("a",{href:`https://cms.opengis.info/${t.unref(n)}/guides/menu/`,target:"_blank",title:f.$t("cms.guide.menu")},[t.createVNode(t.unref(gt),{class:"w-5 h-5"})],8,Ix)])]),t.createElementVNode("div",$x,[t.createElementVNode("button",{onClick:u,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[t.createVNode(t.unref(_n),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(f.$t("cms.common.actions.save")),1)])])]),c.value?(t.openBlock(),t.createElementBlock("div",Lx,[t.createElementVNode("div",Mx,[t.createElementVNode("button",{onClick:g[1]||(g[1]=h=>d.value=!1),class:t.normalizeClass([{"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-white":!d.value},"text-gray-500 hover:text-gray-900 dark:hover:text-white hover:bg-gray-200 dark:hover:bg-gray-700 whitespace-nowrap px-5 py-2 w-[200px] text-sm font-medium"])},t.toDisplayString(f.$t("cms.menu.textEditor")),3),t.createElementVNode("button",{onClick:g[2]||(g[2]=h=>d.value=!0),class:t.normalizeClass([{"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-white":d.value},"text-gray-500 hover:text-gray-900 dark:hover:text-white hover:bg-gray-200 dark:hover:bg-gray-700 whitespace-nowrap px-5 py-2 w-[200px] text-sm font-medium"])},t.toDisplayString(f.$t("cms.menu.listTree")),3)]),d.value?(t.openBlock(),t.createBlock(N1,{key:0,modelValue:s.value,"onUpdate:modelValue":g[3]||(g[3]=h=>s.value=h)},null,8,["modelValue"])):(t.openBlock(),t.createBlock(t.unref(z.VForm),{key:1,schema:l.value,modelValue:s.value,"onUpdate:modelValue":g[4]||(g[4]=h=>s.value=h),form:i.value,"onUpdate:form":g[5]||(g[5]=h=>i.value=h)},null,8,["schema","modelValue","form"]))])):t.createCommentVNode("",!0)]))}}),Ox=Object.freeze(Object.defineProperty({__proto__:null,default:As},Symbol.toStringTag,{value:"Module"})),Bx=(e,r)=>{const n=e[r];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((o,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+r)))})},Fx=localStorage.locale||navigator.language.split("cms.-")[0]||"uk",tr=gd({legacy:!1,locale:Fx,fallbackLocale:"en",datetimeFormats:{en:{short:{year:"numeric",month:"short",day:"numeric"},long:{dateStyle:"full",timeStyle:"short"},time:{hour:"2-digit",minute:"2-digit"}},uk:{short:{year:"numeric",month:"short",day:"numeric"},long:{dateStyle:"full",timeStyle:"short"},time:{hour:"2-digit",minute:"2-digit"}}},numberFormats:{en:{currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0},compact:{notation:"compact"}},uk:{currency:{style:"currency",currency:"UAH"},percent:{style:"percent",minimumFractionDigits:0},compact:{notation:"compact"}}},messages:{}}),Io="en";async function Is(e){return(await Bx(Object.assign({"./locales/en.json":()=>Promise.resolve().then(()=>qx),"./locales/uk.json":()=>Promise.resolve().then(()=>Hx)}),`./locales/${e}.json`)).default}async function $o(e){try{const r=await Is(e);return tr.global.setLocaleMessage(e,r),r}catch(r){if(console.error(`Failed to load locale ${e}:`,r),e!==Io)try{const n=await Is(Io);return tr.global.setLocaleMessage(e,n),n}catch(n){throw console.error(`Failed to load fallback locale ${Io}:`,n),n}throw r}}async function Px(e){await $o(e),tr.global.locale.value=e,localStorage.setItem("locale",e),document.documentElement.lang=e,window.dispatchEvent(new CustomEvent("cms.storage",{detail:{key:"locale",oldValue:null,newValue:e}}))}async function Rx(){const e=tr.global.locale.value;await $o(e),tr.global.locale.value=e,localStorage.setItem("locale",e),document.documentElement.lang=e}async function Ux(e){return await $o(e)}function jx(e){e.component("Dashboard",Xn)}const $s={reference:{faq:"FAQ",banner:"Banner",slider:"Slider",video:"Video",about:"About",cards:"Cards",usefulLinks:"Useful Links",team:"Team",body:"Body",news:"News",form:"Form",tabs:"Tabs",vertical_tabs:"Vertical Tabs",documents:"Documents",infoLine:"Information Line",interested:"You may be interested",contact:"Contact"},navigation:{editMenu:"Edit Menu",dashboard:"Dashboard",collections:"Collections Structure",articles:"Articles",posts:"Posts",media:"Media",permissions:"Permissions",tags:"Tags",singletons:"Pages",feedback:"Feedback",email:"Пошти користувачів",singletonsMenu:"Menu",menuAdd:"Create Menu",builder:"Collections Structure",back:"Back",settings:"Settings",settingsDescription:"Manage your CMS configuration",singletonsMenuDescription:"Manage your menu.",users:"Users",general:"General",apiKeys:"API Keys",appearance:"Appearance",logs:"Logs"},dashboard:{title:"Dashboard",newCollection:"Create Collection",quickActions:"Quick Actions",views:"views",stats:{totalArticles:"Total Articles",totalMedia:"Total Media",activeUsers:"Active Users",apiRequests:"API Requests",fromLastMonth:"from last month"},collections:{title:"Collections",articles:"Articles",articlesDesc:"Description for articles",posts:"Posts",postsDesc:"Description for posts",products:"Products",productsDesc:"Description for products",categories:"Categories",categoriesDesc:"Description for categories",items:"items",new:"New Collection"},recentArticles:"Recent Articles",recentPosts:"Recent Posts",activeUsers:"Active Users",mediaFiles:"Media Files",createArticle:"Create Article",createPost:"Create Post",uploadMedia:"Upload Media",manageUsers:"Manage Users",feedback:"Feedback",createArticleDescription:"Create a new article for your site",uploadMediaDescription:"Upload media files for your site",manageUsersDescription:"Manage users for your site",viewFeedbackDescription:"View feedback for your site",activityFeed:"Activity Feed",viewAll:"View all",description:"Welcome to the CMS dashboard. You can create, edit, and manage your site's content.",newArticle:"Create Article",totalContent:"Total Content",articlesPostsPages:"Articles, Posts and Pages",monthlyActiveUsers:"Monthly Active Users",imagesVideosDocs:"Images, Videos and Docs",thisMonth:"This Month",newMediaFiles:"New Media Files",gettingStartedWithNextJs14:"Getting Started with Next.js 14",sarahJohnson:"Sarah Johnson",advancedReactPatterns:"Advanced React Patterns",uiUxDesignPrinciples:"UI/UX Design Principles",databaseOptimizationTips:"Database Optimization Tips",mikeChen:"Mike Chen",emmaWilson:"Emma Wilson",alexRodriguez:"Alex Rodriguez",recentContent:"Recent Content"},collections:{title:"Collections",selectCollection:"Select a collection to view its content",createCollection:"New Collection",searchCollections:"Search collections...",entries:"Entries",fields:"Fields",lastModified:"Last Modified",edit:"Edit",delete:"Delete",view:"View",form:{name:"Collection Name",slug:"Slug",description:"Description",fields:"Fields",addField:"Add Field"},dragToBuild:"Drag and drop content blocks here to build your collection structure",collectionCreated:"Collection created successfully",collectionCreationFailed:"Error creating collection",pinPublication:"Pin Publication"},articles:{title:"Articles",createArticle:"Create Article",searchArticles:"Search articles...",showColumns:"Show columns",update:"Update",create:"Create",form:{title:"Title",content:"Content",author:"Author",category:"Category",status:"Status"}},posts:{title:"Posts",createPost:"Create Post",searchPosts:"Search posts...",form:{title:"Title",content:"Content",author:"Author",category:"Category",status:"Status"}},singletons:{title:"Singletons",createSingleton:"Create Singleton",searchSingletons:"Search singletons...",form:{name:"Name",description:"Description",content:"Content",status:"Status"},search:"Search singletons..."},media:{title:"Media Library",description:"Manage your images, documents, and media files.",uploadMedia:"Upload Media",searchMedia:"Search files...",fileInfo:"File Information",preview:"Preview",newFolder:"New Folder",selectFile:"Select a file to view details",fileDetails:"File Details",name:"Name",size:"Size",dimensions:"Dimensions",uploadDate:"Upload Date",author:"Author",tags:"Tags",banner:"Banner",hero:"Hero",homepage:"Homepage",download:"Download",copyPath:"Copy path",copyPathFailed:"Failed to copy path",delete:"Delete",edit:"Edit",share:"Share",moreActions:"More actions",deleteFile:"Delete File",cancel:"Cancel",mediaLibrary:"Media Library",showColumns:"Show columns",update:"Update",create:"Create",createFolder:"Create Folder",files:"files",noFilesInFolder:"No files in this folder",deleteConfirmation:"Are you sure you want to delete this file?",uploaded:"Uploaded",filter:"Filter",search:"Search media files...",uploadingFiles:"Uploading files",uploading:"Uploading...",folder:"Folder",updatedAt:"Updated At",type:"Type",sortBy:{title:"Sort by",name:"File name",filesize:"File size"},upload:"Upload",selectFromMedia:"Select from media",selectedFiles:"Selected files: {count}",selectFiles:"Select files"},tags:{title:"Tags",description:"Manage your tags.",createTag:"Create Tag",editTag:"Edit Tag",searchTags:"Search tags...",form:{name:"Name",description:"Description",color:"Color",created_at:"Created At",count_data:"Count of Used",topic:"Topic"},emptyTitle:"No tags found",emptyDescription:"Create your first tag to get started.",emptyButton:"Create Tag"},feedback:{title:"Feedback",description:"View feedback",table:{number:"№",noFeedback:"No feedback",email:"Email",userName:"Full name",messageText:"Message text",feedbackType:"Type of appeal",phone:"Phone",resumeLink:"Resume link",linkedinLink:"Linkedin link",portfolioLink:"Portfolio link",telegramLink:"Telegram link"}},email:{title:"User mails",description:"View users awaiting feedback",table:{number:"№",date:"Date of shipment",email:"Email"}},emptyData:{title:"No data found",description:"Create your first item to get started.",buttonText:"Create Item"},form:{gen:"Generate",key:"Key",value:"Value",noDataToDisplay:"No data to display",add:"Add"},builder:{manageContentCollections:"Manage content collections",searchCollections:"Search collections...",collections:"Collections",collectionStructure:"Collection Structure",defineFields:"Define the fields and their types for this collection",name:"Name",edit:"Edit",preview:"Preview",type:"Type",content:"Content",seo:"SEO",tags:"Tags",save:"Save",cancel:"Cancel",create:"Create",localization:"Localization",actions:"Actions",noColumnsFound:"No columns found",collectionName:"Collection Name",title:"Title",entries:"Entries",fields:"Fields",status:"Status",lastModified:"Last Modified",editCollection:"Edit collection",editContentForYourSite:"Edit content for your site",deleteObject:"Are you sure you want to delete this object?",editField:"Edit field",deleteTitle:"Delete field",deleteField:"Are you sure you want to delete this field?",scheme:{name:{label:"Name",placeholder:"Name"},title:{label:"Title",placeholder:"Title"},type:{label:"Type",placeholder:"Type",options:{collection:"Collection",single:"Single"}},customTable:{label:"Custom Table"},status:{label:"Status",placeholder:"Status",options:{published:"Published",draft:"Draft",archived:"Archived"}},description:{label:"Description",placeholder:"Description"},preview_path:{label:"Preview path",placeholder:"Preview path",info:"Path to slug for preview"},include_search:{label:"Include in search?",placeholder:"Include in search?"}},required:"Required field",createField:"Create field",selectType:"Select type",createFolder:"Create folder",changeType:"Change type",fieldLabels:{name:"Name",label:"Label",placeholder:"Placeholder",help:"Help",type:"Type",subtype:"Subtype",parent:"Parent",options:"Options",colModel:"ColModel",multiple:"Multiple",api:"API",relation:"Relation",required:"Required",localization:"Localization"},fieldPlaceholders:{name:"Name",label:"Title",placeholder:"Placeholder",help:"Help",type:"Type",subtype:"Subtype",parent:"Parent",options:"Options",colModel:"ColModel",api:"API",relation:"Relation"},fieldOptions:{text:"Text",number:"Number",integer:"Integer",date:"Date",datetime:"Datetime",file:"File",select:"Select",multiselect:"MultiSelect",mediaselect:"MediaSelect",radio:"Radio",boolean:"Boolean",datalist:"Data list",image:"Image",slug:"Slug",richtext:"Rich Text",markdown:"Markdown",reference:"Reference",relation:"Relation",fileList:"Gallery",tags:"Tags"}},menu:{title:"Menu",description:"Manage your menu.",createMenu:"Create Menu",searchMenu:"Search menu...",menuAdd:"Add Menu",editMenu:"Edit Menu",textEditor:"Text Editor",listTree:"List Tree",filter:"Filter",search:"Search menu...",menuCreated:"Menu created",menuCreateError:"Error creating menu",menuUpdated:"Menu updated",menuUpdateError:"Error updating menu",menuDeleted:"Menu deleted",menuDeleteError:"Error deleting menu",form:{name:"Name",description:"Description",content:"Content",status:"Status",value:"Value",language:"Language"}},settings:{title:"Settings",description:"Configure your CMS settings and preferences.",systemStatus:"System Status",siteInformation:"Site Information",siteName:"Site Name",version:"Version",environment:"Environment",security:"Security",localization:"Localization",production:"Production",systemHealth:"System Health",database:"Database",connected:"Connected",cache:"Cache",active:"Active",storage:"Storage",used:"Used",configure:"Configure",successTitle:"Success",successMessage:"Settings saved successfully",errorTitle:"Error",errorMessage:"Error saving settings",generateNewKey:"Generate New Key",apiSecurity:"API Security",general:{general:"General Settings",generalDescription:"Manage your general settings.",url:"URL",language:"Language",languages:"Languages",contacts:"Contacts",showSocialsNumber:"Number of socials to display",headerBtn:"Title of header button",mapCoords:"Map coordinates",socials:"Socials",saveChanges:"Save Changes",cancel:"Cancel",notifications:"Notifications",emailNotifications:"Email Notifications",emailNotificationsDescription:"Receive notifications by email",pushNotifications:"Browser Notifications",pushNotificationsDescription:"Browser notifications for important updates",smsNotifications:"SMS Notifications",smsNotificationsDescription:"SMS notifications for critical updates",desktopNotifications:"Desktop Notifications",desktopNotificationsDescription:"Desktop notifications",siteDescription:"Site Description",siteUrl:"Site URL",siteLanguage:"Site Language",siteEmail:"Site Email",sitePhone:"Site Phone",siteAddress:"Site Address",siteName:"Site Name",title:"Title",content:"Content",name:"Name",siteInformation:"Site Information",logoSite:"Site Logo",logoCms:"CMS Logo",imageLogin:"Login Image",logo:"Logo",siteInformationDescription:"Manage your site information."},users:{users:"User Management",usersDescription:"Manage your user management configuration.",userRegistration:"User Registration",allowRegistration:"Allow User Registration",allowRegistrationDescription:"Enable new users to register accounts",emailVerification:"Email Verification Required",emailVerificationDescription:"Require email verification for new accounts",autoApprove:"Auto-approve Users",autoApproveDescription:"Automatically approve new user registrations",defaultRole:"Default User Role"},"api-keys":{apiKeys:"API Keys",apiKeysDescription:"Manage your api keys configuration.",productionApiKey:"Production API Key",developmentApiKey:"Development API Key",generateNewKey:"Generate New Key",apiSecurity:"API Security",rateLimiting:"Rate Limiting",rateLimitingDescription:"Enable API rate limiting protection",corsProtection:"CORS Protection",corsProtectionDescription:"Cross-origin request security",apiLogging:"API Logging",apiLoggingDescription:"Log all API requests and responses"},appearance:{appearance:"Appearance",appearanceDescription:"Manage your appearance settings.",colorTheme:"Color Theme",darkMode:"Dark Mode",darkModeDescription:"Switch to dark theme",compactMode:"Compact Mode",compactModeDescription:"Reduce spacing and padding",animations:"Animations",animationsDescription:"Enable interface animations",themeBlue:"Blue",themeGreen:"Green",themePurple:"Purple"},logs:{title:"Logs",description:"View all your actions in the system",table:{objectId:"Object Identifier",dateTime:"Date and Time of Change",changeType:"Change Type",noLogs:"No user logs found",noLogsDescription:"No user logs found"}},permissions:{title:"Permissions",user:"User",role:"Role",lastActive:"Last Active",actions:"Actions",rolePermissions:"Role Permissions",rolePermissionsDescription:"Permissions assigned to each role in the system.",permission:"Permission",admin:"Admin",editor:"Editor",author:"Author",viewer:"Viewer",customizePermissions:"Customize Permissions",inviteUser:"Invite User",searchUsers:"Search users...",createContent:"Create Content",editContent:"Edit Content",deleteContent:"Delete Content",publishContent:"Publish Content",manageMedia:"Manage Media",manageUsers:"Manage Users",manageSettings:"Manage Settings",remove:"Remove",edit:"Edit",time:{hoursAgo:"{count} hours ago",hourAgo:"1 hour ago",daysAgo:"{count} days ago",dayAgo:"1 day ago",weeksAgo:"{count} weeks ago",weekAgo:"1 week ago",minutesAgo:"{count} minutes ago",minuteAgo:"1 minute ago",justNow:"just now"},roles:{admin:"Admin",editor:"Editor",author:"Author",viewer:"Viewer"}}},block:{type:{heading:"Heading",paragraph:"Paragraph"}},app:{name:"SOFTPRO software package: GIS MBK Kamyansk City TG",tagline:"Do more with less"},nav:{home:"Home",about:"About",profile:"Profile",settings:"Settings",logout:"Log out"},common:{ok:"OK",save:"Save",cancel:"Cancel",close:"Close",delete:"Delete",edit:"Edit",loading:"Loading…",retry:"Retry",title:"Title",description:"Description",keywords:"Keywords",successMessage:"Success",errorMessage:"Error",success:"Success",error:"Error",meta:"Meta",actions:{add:"Add",save:"Save",cancel:"Cancel",edit:"Edit",delete:"Delete",create:"Create",preview:"Preview",search:"Search",filter:"Filter",export:"Export",addField:"Add Field",success:"Success",error:"Error",back:"Back"},status:{published:"Published",draft:"Draft",archived:"Archived"},content:"Content",pagination:{showing:"Showing",to:"to",of:"of",results:"results",previous:"Previous",next:"Next"}},auth:{title:"Sign in",email:"Email",password:"Password",remember:"Remember me",submit:"Sign in",errors:{invalid:"Invalid email or password",required:"{field} is required"}},table:{choose:"Choose columns to display",columns:"Columns",actions:"Actions",search:"Search",export:"Export",exportTitle:"Export table",close:"Close",chooseColumns:"Select columns for export:",selectAll:"Select all",selectCurrent:"Select current",none:"None",chooseFormat:"Choose table format:",time:{weeksAgo:"{count} weeks ago",weekAgo:"1 week ago",daysAgo:"{count} days ago",dayAgo:"1 day ago",hoursAgo:"{count} hours ago",hourAgo:"1 hour ago",minutesAgo:"{count} minutes ago",minuteAgo:"1 minute ago",justNow:"just now"},format:{json:"JSON format",csv:"CSV format",xlsx:"XLSX format"},cancel:"Cancel",download:"Download table"},filter:{search:"Search",more:"Show more",less:"Show less",selected:"selected",clear:"Clear",apply:"Apply",from:"From",to:"To",notfound:"Nothing found",period:"Period",today:"Today",week:"Week",month:"Month",quarter:"Quarter",year:"Year",alltime:"All Time",prev:"Prev",next:"Next"},items:{title:"Items",add:"Add item",count:"No items | One item | {count} items",created:"Item “{name}” has been created",deleted:"Item deleted"},errors:{network:"Network error. Please try again.",notFound:"We couldn't find what you were looking for."},toast:{saved:"Changes saved",copied:"Copied to clipboard"},users:{title:"Users",description:"Manage your users.",createUser:"Create User",editUser:"Edit User",searchUsers:"Search users...",createUserFailed:"Create user failed",createUserSuccess:"User created successfully",editUserFailed:"Edit user failed",editUserSuccess:"User edited successfully",deleteUserSuccess:"User deleted successfully",deleteUserFailed:"User deleted failed",form:{name:"Name",description:"Description",color:"Color",created_at:"Created At",count_data:"Count of Used",topic:"Topic"},emptyTitle:"No users found",emptyDescription:"Create your first user to get started.",emptyButton:"Create User"},fetchContentTypes:"fetchContentTypes",action:"action",delete:"delete","create-folder":"create-folder",formValues:"formValues",metaParentValue:"metaParentValue",blur:"blur","-":"-",noFilesInFolder:"noFilesInFolder",guide:{menu:"Guide for menu",general:"Guide",media:"Guide for media",settings:"Guide for settings",users:"Guide for users",content:"Guide for content",appOverview:"Guide for app overview",collections:"Guide for collections",help:"Help"}},qx=Object.freeze(Object.defineProperty({__proto__:null,cms:$s,default:{cms:$s}},Symbol.toStringTag,{value:"Module"})),Ls={reference:{faq:"Акордeон",photoGrid:"Фотогалерея",banner:"Банер",slider:"Слайдер",video:"Відео",about:"Про нас",cards:"Картки",usefulLinks:"Корисні посилання",team:"Команда",body:"Тіло",news:"Новини",form:"Форма",tabs:"Таби",vertical_tabs:"Вертикальні таби",documents:"Документи",infoLine:"Інформаційна лінія",iframe:"Iframe",interested:"Вас може зацікавити",contact:"Контакти"},navigation:{editMenu:"Редагувати меню",dashboard:"Панель керування",collections:"Керування контентом",articles:"Статті",posts:"Дописи",media:"Медіа",permissions:"Дозволи",tags:"Теги",singletons:"Сторінки",singletonsMenu:"Меню",feedback:"Зворотній зв'язок",email:"Пошти користувачів",menuAdd:"Створити меню",builder:"Структура колекцій",back:"Назад",settings:"Налаштування",settingsDescription:"Налаштування вашого сайту",singletonsMenuDescription:"Керування меню.",users:"Користувачі",general:"Основні",apiKeys:"API ключі",appearance:"Вигляд",logs:"Логи"},dashboard:{title:"Панель керування",description:"Вітаємо в панелі керування CMS. Ви можете створювати, редагувати та управляти контентом вашого сайту.",newCollection:"Створити колекцію",quickActions:"Швидкі дії",views:"переглядів",stats:{totalArticles:"Всього статей",totalMedia:"Всього медіа",activeUsers:"Активні користувачі",apiRequests:"API запити",fromLastMonth:"з минулого місяця"},collections:{title:"Колекції",articles:"Статті",articlesDesc:"Опис для статей",posts:"Дописи",postsDesc:"Опис для дописів",products:"Продукти",productsDesc:"Опис для продуктів",categories:"Категорії",categoriesDesc:"Опис для категорій",items:"шт.",new:"Нова колекція"},recentArticles:"Останні статті",recentPosts:"Останні дописи",recentContent:"Останній контент",activityFeed:"Стрічка активності",viewAll:"Показати все",totalContent:"Всього контенту",articlesPostsPages:"Статті, дописи та сторінки",monthlyActiveUsers:"Активних користувачів за місяць",imagesVideosDocs:"Зображення, відео та документи",thisMonth:"Цього місяця",activeUsers:"Активні користувачі",mediaFiles:"Файли медіа",createArticle:"Створити статтю",createPost:"Створити допис",uploadMedia:"Завантажити медіа",createArticleDescription:"Створіть статтю для вашого сайту",uploadMediaDescription:"Завантажте медіа файли для вашого сайту",manageUsersDescription:"Керуйте користувачами вашого сайту",viewFeedbackDescription:"Перегляд зворотнього зв'язку",manageUsers:"Керування користувачами",feedback:"Зворотній зв'язок",newMediaFiles:"Нових файлів медіа",gettingStartedWithNextJs14:"Початок роботи з Next.js 14",sarahJohnson:"Sarah Johnson",advancedReactPatterns:"Підвищені шаблони React",uiUxDesignPrinciples:"Принципи дизайну UI/UX",databaseOptimizationTips:"Поради з оптимізації бази даних",mikeChen:"Mike Chen",emmaWilson:"Emma Wilson",alexRodriguez:"Alex Rodriguez"},collections:{title:"Колекції",selectCollection:"Виберіть колекцію для перегляду її контенту",createCollection:"Створити колекцію",searchCollections:"Пошук колекцій...",entries:"Записи",fields:"Поля",lastModified:"Останнє редагування",edit:"Редагувати",delete:"Видалити",view:"Перегляд",form:{name:"Назва колекції",slug:"Слаг",description:"Опис",fields:"Поля",addField:"Додати поле"},dragToBuild:"Перетягніть блоки контенту сюди, щоб створити структуру колекції",collectionCreated:"Колекція успішно створена",collectionCreationFailed:"Помилка при створенні колекції",pinPublication:"Закріпити публікацію"},articles:{title:"Сторінки",createArticle:"Створити сторінку",searchArticles:"Пошук статей...",showColumns:"Показати колонки",update:"Оновити",create:"Створити",form:{title:"Заголовок",content:"Зміст",author:"Автор",category:"Категорія",status:"Статус"}},posts:{title:"Дописи",createPost:"Створити допис",searchPosts:"Пошук дописів...",form:{title:"Заголовок",content:"Зміст",author:"Автор",category:"Категорія",status:"Статус"}},singletons:{title:"Синглтони",createSingleton:"Створити синглтон",searchSingletons:"Пошук синглтонів...",form:{name:"Назва",description:"Опис",content:"Зміст",status:"Статус"},search:"Пошук синглтонів..."},media:{title:"Медіа бібліотека",description:"Керуйте своїми зображеннями, документами та медіа файлами.",uploadMedia:"Завантажити медіа",searchMedia:"Пошук файлів...",fileInfo:"Інформація про файл",preview:"Перегляд",newFolder:"Нова папка",selectFile:"Виберіть файл для перегляду деталей",fileDetails:"Інформація про файл",name:"Назва",size:"Розмір",dimensions:"Розміри",uploadDate:"Дата завантаження",author:"Автор",tags:"Теги",banner:"Банер",hero:"Герой",homepage:"Головна",download:"Завантажити",copyPath:"Копіювати шлях",copyPathFailed:"Не вдалося скопіювати шлях",delete:"Видалити",edit:"Редагувати",share:"Поділитися",moreActions:"Більше дій",deleteFile:"Ви впевнені, що хочете видалити цей файл?",createFolder:"Створити папку",cancel:"Скасувати",mediaLibrary:"Медіа бібліотека",files:"файлів",noFilesInFolder:"Немає файлів у цій папці",deleteConfirmation:"Ви впевнені, що хочете видалити цей файл?",uploaded:"Завантажено",filter:"Фільтр",search:"Пошук файлів...",uploadingFiles:"Завантаження файлів",uploading:"Завантаження...",folder:"Папка",type:"Тип",updatedAt:"Оновлено",sortBy:{title:"Сортувати за",name:"Назва файлу",filesize:"Розмір файлу"},upload:"Завантажити",selectFromMedia:"Вибрати з медіа",selectFiles:"Вибрати файли",selectedFiles:"Вибрано файлів: {count}"},tags:{title:"Теги",description:"Керування тегами.",createTag:"Створити тег",editTag:"Редагувати тег",searchTags:"Пошук тегів...",form:{name:"Назва",description:"Опис",color:"Колір",slug:"Slug",created_at:"Дата створення",count_data:"Кількість використань",topic:"Тема"},emptyTitle:"Теги не знайдені",emptyDescription:"Створіть свій перший тег, щоб почати.",emptyButton:"Створити тег"},feedback:{title:"Зворотній зв'язок",description:"Переглядайте зворотній зв'язок",table:{number:"№",noFeedback:"Фідбек відсутній",email:"Email",userName:"ПІБ",messageText:"Текст повідомлення",feedbackType:"Тип звернення",cdate:"Дата відгуку",phone:"Телефон",resumeLink:"Посилання на резюме",linkedinLink:"Посилання на лінкедин",portfolioLink:"Посилання на портфоліо",telegramLink:"Посилання на телеграм"}},email:{title:"Пошти користувачів",description:"Переглядайте користувачів, які очікують зворотнього зв'язку",table:{number:"№",date:"Дата відправки",email:"Email"}},emptyData:{title:"Немає даних",description:"Створіть свій перший елемент, щоб почати.",buttonText:"Створити елемент"},form:{gen:"Згенерувати",key:"Ключ",value:"Значення",noDataToDisplay:"Дані для відображення відсутні",add:"Додати"},builder:{faq:"Акордeон",photoGrid:"Фотогалерея",banner:"Банер",slider:"Слайдер",video:"Відео",about:"Про нас",cards:"Картки",usefulLinks:"Корисні посилання",team:"Команда",body:"Тіло",news:"Новини",form:"Форма",tabs:"Таби",vertical_tabs:"Вертикальні таби",documents:"Документи",infoLine:"Інформаційна лінія",iframe:"Iframe",manageContentCollections:"Керування колекціями контенту",searchCollections:"Пошук колекцій...",collections:"Структура колекцій",collectionStructure:"Структура колекції",defineFields:"Визначте поля та їх типи для цієї колекції",name:"Назва",changeType:"Змінити тип",type:"Тип",save:"Зберегти",edit:"Редагувати",content:"Контент",seo:"SEO",tags:"Теги",preview:"Перегляд",collectionName:"Назва колекції",title:"Заголовок",entries:"Записи",fields:"Поля",status:"Статус",lastModified:"Останнє редагування",cancel:"Скасувати",create:"Створити",localization:"Локалізація",actions:"Дії",noColumnsFound:"Немає колонок",editCollection:"Редагувати колекцію",editContentForYourSite:"Редагувати контент для вашого сайту",deleteObject:"Ви впевнені, що хочете видалити цей об'єкт?",editField:"Редагувати поле",deleteTitle:"Видалити поле",deleteField:"Ви впевнені, що хочете видалити це поле?",scheme:{name:{label:"Назва",placeholder:"Назва"},title:{label:"Заголовок",placeholder:"Заголовок"},type:{label:"Тип",placeholder:"Тип",options:{collection:"Колекція",single:"Сторінка"}},customTable:{label:"Власна таблиця"},status:{label:"Статус",placeholder:"Статус",options:{published:"Опубліковано",draft:"Чернетка",archived:"Архівовано"}},description:{label:"Опис",placeholder:"Опис"},preview_path:{label:"Шлях для прев'ю",placeholder:"Шлях для прев'ю",info:"Шлях до slug для прев'ю"},include_search:{label:"Включити в пошук?",placeholder:"Включити в пошук?"}},required:"Обов'язкове поле",createField:"Створити поле",selectType:"Оберіть тип",createFolder:"Створити папку",fieldLabels:{name:"Назва",label:"Мітка",placeholder:"Плейсхолдер",help:"Допомога",type:"Тип",subtype:"Підтип",parent:"Батьківський",data:"ID класифікатора",options:"Опції",colModel:"Модель колонок",multiple:"Множинний",api:"API",relation:"Зв'язок",required:"Обов'язковий",localization:"Локалізація"},fieldPlaceholders:{name:"Назва",label:"Заголовок",placeholder:"Плейсхолдер",help:"Допомога",type:"Тип",subtype:"Підтип",parent:"Батьківський",data:"ID класифікатора",options:"Опції",colModel:"Модель колонок",api:"API",relation:"Зв'язок"},fieldOptions:{text:"Текст",number:"Число",integer:"Ціле число",date:"Дата",datetime:"Дата і час",file:"Файл",select:"Селект",multiselect:"Мультиселект",mediaselect:"Вибір медіа",radio:"Радіо",boolean:"Булевий",datalist:"Дататейбл",image:"Зображення",slug:"Слаг",richtext:"Текстовий редактор",markdown:"Markdown",reference:"Секції",relation:"Зв'язок",fileList:"Мультифайл",tags:"Теги"}},menu:{title:"Меню",description:"Керування меню.",createMenu:"Створити меню",searchMenu:"Пошук меню...",menuAdd:"Додати меню",editMenu:"Редагувати меню",textEditor:"Текстовий редактор",menuCreated:"Меню створено",menuCreateError:"Помилка при створенні меню",menuUpdated:"Меню оновлено",menuUpdateError:"Помилка при оновленні меню",menuDeleted:"Меню видалено",menuDeleteError:"Помилка при видаленні меню",listTree:"Список дерева",filter:"Фільтр",search:"Пошук меню...",form:{name:"Назва",description:"Опис",content:"Зміст",status:"Статус",value:"Значення",language:"Мова"}},settings:{title:"Налаштування",description:"Налаштуйте ваші налаштування CMS та налаштування.",systemStatus:"Статус системи",siteInformation:"Інформація про сайт",logo:"Логотип",siteName:"Назва сайту",version:"Версія",environment:"Середовище",security:"Безпека",localization:"Локалізація",production:"Виробництво",systemHealth:"Здоров'я системи",database:"База даних",connected:"З'єднано",cache:"Кеш",active:"Активний",storage:"Хмарне сховище",used:"Використано",configure:"Налаштувати",successTitle:"Успішно",successMessage:"Налаштування успішно збережено",errorTitle:"Помилка",errorMessage:"Помилка при збереженні налаштувань",generateNewKey:"Згенерувати новий ключ",apiSecurity:"Безпека API",general:{general:"Основні налаштування",generalDescription:"Керуйте вашими загальними налаштуваннями.",url:"URL",language:"Мова",languages:"Мови",contacts:"Контакти",socials:"Соціальні мережі",showSocialsNumber:"Кількість соціальних мереж для відображення",headerBtn:"Текст кнопки в хедері",mapCoords:"Координати для відображення на карті",saveChanges:"Зберегти зміни",cancel:"Скасувати",notifications:"Сповіщення",emailNotifications:"Сповіщення по email",emailNotificationsDescription:"Отримувати сповіщення по email",pushNotifications:"Сповіщення в браузері",pushNotificationsDescription:"Сповіщення в браузері для важливих оновлень",smsNotifications:"Сповіщення по SMS",smsNotificationsDescription:"Сповіщення по SMS для критичних оновлень",desktopNotifications:"Сповіщення на комп'ютері",desktopNotificationsDescription:"Сповіщення на комп'ютері",siteName:"Назва сайту",siteDescription:"Опис сайту",siteUrl:"URL сайту",previewUrl:"URL попереднього перегляду",logoSite:"Логотип сайту",logoCms:"Логотип CMS",imageLogin:"Зображення для входу",siteLanguage:"Мова сайту",siteEmail:"Email сайту",sitePhone:"Телефон сайту",siteAddress:"Адреса сайту",siteInformation:"Інформація про сайт",logo:"Логотип",siteInformationDescription:"Керуйте вашою інформацією про сайт.",title:"Заголовок",content:"Контент",name:"Назва соцмережі"},users:{users:"Керування користувачами",usersDescription:"Керуйте налаштуваннями керування користувачами.",userRegistration:"Реєстрація користувачів",allowRegistration:"Дозволити реєстрацію користувачів",allowRegistrationDescription:"Дозволити новим користувачам реєструвати акаунти",emailVerification:"Потрібна верифікація email",emailVerificationDescription:"Вимагати підтвердження email для нових акаунтів",autoApprove:"Автоматичне схвалення користувачів",autoApproveDescription:"Автоматично схвалювати нові реєстрації користувачів",defaultRole:"Роль за замовчуванням"},"api-keys":{apiKeys:"API ключі",apiKeysDescription:"Керуйте налаштуваннями API ключів.",productionApiKey:"Production API ключ",developmentApiKey:"Development API ключ",generateNewKey:"Згенерувати новий ключ",apiSecurity:"Безпека API",rateLimiting:"Обмеження швидкості",rateLimitingDescription:"Увімкнути захист обмеження швидкості API",corsProtection:"Захист CORS",corsProtectionDescription:"Безпека крос-доменних запитів",apiLogging:"Логування API",apiLoggingDescription:"Логувати всі API запити та відповіді"},appearance:{appearance:"Вигляд",appearanceDescription:"Керуйте вашим виглядом та налаштуваннями.",colorTheme:"Кольорова тема",darkMode:"Темний режим",darkModeDescription:"Перемкнути на темну тему",compactMode:"Компактний режим",compactModeDescription:"Зменшити відступи та поля",animations:"Анімації",animationsDescription:"Увімкнути анімації інтерфейсу",themeBlue:"Синя",themeGreen:"Зелена",themePurple:"Фіолетова"},logs:{title:"Логи",description:"Переглядай всі свої дії в системі",table:{number:"№",objectId:"Ідентифікатор об'єкта",dateTime:"Дата та час зміни",changeType:"Тип зміни",noLogs:"Логи користувача відсутні"}},permissions:{title:"Дозволи",user:"Користувач",role:"Роль",lastActive:"Остання активність",actions:"Дії",rolePermissions:"Дозволи ролі",rolePermissionsDescription:"Дозволи, призначені для кожної ролі в системі.",permission:"Дозвіл",admin:"Адміністратор",editor:"Редактор",author:"Автор",viewer:"Переглядач",customizePermissions:"Налаштувати дозволи",inviteUser:"Запросити користувача",searchUsers:"Пошук користувачів...",createContent:"Створити контент",editContent:"Редагувати контент",deleteContent:"Видалити контент",publishContent:"Опублікувати контент",manageMedia:"Керування медіа",manageUsers:"Керування користувачами",manageSettings:"Керування налаштуваннями",remove:"Вилучити",edit:"Редагувати",time:{hoursAgo:"{count} годин тому",hourAgo:"1 година тому",daysAgo:"{count} днів тому",dayAgo:"1 день тому",weeksAgo:"{count} тижнів тому",weekAgo:"1 тиждень тому",minutesAgo:"{count} хвилин тому",minuteAgo:"1 хвилина тому",justNow:"щойно"},roles:{admin:"Адміністратор",editor:"Редактор",author:"Автор",viewer:"Переглядач"}}},block:{type:{heading:"Заголовок",paragraph:"Параграф"}},app:{name:"Програмний комплекс SOFTPRO: ГІС МБК Кам'янської міської ТГ",tagline:"Зробіть більше з меншим"},nav:{home:"Домашній",about:"Про",profile:"Профіль",settings:"Налаштування",logout:"Вихід"},common:{ok:"Добре",save:"Зберегти",cancel:"Скасувати",close:"Закрити",delete:"Вилучити",edit:"Редагувати",loading:"Завантаження…",retry:"Повторити",title:"Назва",description:"Опис",keywords:"Ключові слова",success:"Успіх",error:"Помилка",successMessage:"Успішно",errorMessage:"Помилка",meta:"Мета",content:"Контент",actions:{add:"Додати",save:"Зберегти",cancel:"Скасувати",edit:"Редагувати",delete:"Видалити",create:"Створити",preview:"Перегляд",search:"Пошук",filter:"Фільтр",export:"Експорт",addField:"Додати поле",success:"Успіх",error:"Помилка",back:"Повернутися"},status:{published:"Опубліковано",draft:"Чернетка",archived:"Архівовано"},pagination:{showing:"Показано",to:"по",of:"з",results:"результатів",previous:"Попередня",next:"Наступна"}},auth:{title:"Увійти",email:"Електронна пошта",password:"Пароль",remember:"Пам'ятайте мене",submit:"Увійти",errors:{invalid:"Недійсний електронний лист або пароль",required:"{Поле} потрібно"}},table:{choose:"Оберіть колонки для відображення",columns:"Колонки",actions:"Дії",search:"Пошук",export:"Експорт",exportTitle:"Експорт таблиці",close:"Закрити",chooseColumns:"Виберіть стовпці таблиці для експорту:",selectAll:"Вибрати усі",selectCurrent:"Вибрати поточні",none:"Жодного",chooseFormat:"Виберіть формат таблиці:",cancel:"Скасувати",download:"Завантажити таблицю",time:{weeksAgo:"{count} тижнів тому",weekAgo:"1 тиждень тому",daysAgo:"{count} днів тому",dayAgo:"1 день тому",hoursAgo:"{count} годин тому",hourAgo:"1 година тому",minutesAgo:"{count} хвилин тому",minuteAgo:"1 хвилина тому",justNow:"щойно"},format:{json:"Формат json",csv:"Формат csv",xlsx:"Формат xlsx"}},filter:{search:"Пошук",more:"Показати більше",less:"Показати меньше",selected:"обрано",clear:"Очистити",apply:"Застосувати",from:"Від",period:"Період",today:"Сьогодні",week:"Тиждень",month:"Місяць",quarter:"Квартал",year:"Рік",alltime:"Весь час",prev:"Попередній період",next:"Настпуний період",to:"До",notfound:"Нічого не знайдено"},items:{title:"Предмети",add:"Додати елемент",count:"Немає предметів | ",created:`Елемент "{Ім'я}" створений`,deleted:"Елемент видалено"},errors:{network:"Помилка мережі. ",notFound:"Ми не змогли знайти те, що ви шукали."},toast:{saved:"Збережені зміни",copied:"Скопіювано в буфер обміну"},users:{title:"Користувачі",description:"Керування користувачами.",createUser:"Створити користувача",editUser:"Редагувати користувача",searchUsers:"Пошук користувачів...",createUserFailed:"Створити користувача не вдалося",createUserSuccess:"Користувача створено успішно",editUserFailed:"Редагувати користувача не вдалося",editUserSuccess:"Користувача редаговано успішно",deleteUserSuccess:"Користувача видалено успішно",deleteUserFailed:"Користувача видалено не вдалося",form:{name:"Назва",description:"Опис",color:"Колір",created_at:"Дата створення",count_data:"Кількість використань",topic:"Тема"}},fetchContentTypes:"fetchContentTypes",action:"action",delete:"delete","create-folder":"create-folder",formValues:"formValues",metaParentValue:"metaParentValue",blur:"blur","-":"-",noFilesInFolder:"noFilesInFolder",guide:{menu:"Посібник з меню",general:"Посібник",media:"Посібник з медіа",settings:"Посібник з налаштувань",users:"Посібник з користувачів",content:"Посібник з контенту",appOverview:"Посібник з огляду програми",collections:"Посібник з колекцій",help:"Допомога"}},Hx=Object.freeze(Object.defineProperty({__proto__:null,cms:Ls,default:{cms:Ls}},Symbol.toStringTag,{value:"Module"}));he.ArticlesPage=il,he.BuilderPage=Up,he.CmsContentWrapper=Ky,he.CollectionsPage=Qn,he.Dashboard=Xn,he.EditCollectionPage=rs,he.MenuAddPage=as,he.MenuItemPage=As,he.MenuPage=os,he.default=Xn,he.i18n=tr,he.initI18n=Rx,he.install=jx,he.loadLocaleMessages=Ux,he.setLocale=Px,Object.defineProperties(he,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
271
|
+
`+e.slice(s+1):c+=e.slice(a),c.slice(1)}function Ek(e){for(var r="",n=0,o,a=0;a<e.length;n>=65536?a+=2:a++)n=Ar(e,a),o=Re[n],!o&&Tr(n)?(r+=e[a],n>=65536&&(r+=e[a+1])):r+=o||fk(n);return r}function vk(e,r,n){var o="",a=e.tag,l,s,i;for(l=0,s=n.length;l<s;l+=1)i=n[l],e.replacer&&(i=e.replacer.call(n,String(l),i)),(xt(e,r,i,!1,!1)||typeof i>"u"&&xt(e,r,null,!1,!1))&&(o!==""&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=a,e.dump="["+o+"]"}function Ds(e,r,n,o){var a="",l=e.tag,s,i,c;for(s=0,i=n.length;s<i;s+=1)c=n[s],e.replacer&&(c=e.replacer.call(n,String(s),c)),(xt(e,r+1,c,!0,!0,!1,!0)||typeof c>"u"&&xt(e,r+1,null,!0,!0,!1,!0))&&((!o||a!=="")&&(a+=To(e,r)),e.dump&&Vr===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=l,e.dump=a||"[]"}function Nk(e,r,n){var o="",a=e.tag,l=Object.keys(n),s,i,c,u,d;for(s=0,i=l.length;s<i;s+=1)d="",o!==""&&(d+=", "),e.condenseFlow&&(d+='"'),c=l[s],u=n[c],e.replacer&&(u=e.replacer.call(n,c,u)),xt(e,r,c,!1,!1)&&(e.dump.length>1024&&(d+="? "),d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),xt(e,r,u,!1,!1)&&(d+=e.dump,o+=d));e.tag=a,e.dump="{"+o+"}"}function Ck(e,r,n,o){var a="",l=e.tag,s=Object.keys(n),i,c,u,d,m,p;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new nt("sortKeys must be a boolean or a function");for(i=0,c=s.length;i<c;i+=1)p="",(!o||a!=="")&&(p+=To(e,r)),u=s[i],d=n[u],e.replacer&&(d=e.replacer.call(n,u,d)),xt(e,r+1,u,!0,!0,!0)&&(m=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,m&&(e.dump&&Vr===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,m&&(p+=To(e,r)),xt(e,r+1,d,!0,m)&&(e.dump&&Vr===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,a+=p));e.tag=l,e.dump=a||"{}"}function Ts(e,r,n){var o,a,l,s,i,c;for(a=n?e.explicitTypes:e.implicitTypes,l=0,s=a.length;l<s;l+=1)if(i=a[l],(i.instanceOf||i.predicate)&&(!i.instanceOf||typeof r=="object"&&r instanceof i.instanceOf)&&(!i.predicate||i.predicate(r))){if(n?i.multi&&i.representName?e.tag=i.representName(r):e.tag=i.tag:e.tag="?",i.represent){if(c=e.styleMap[i.tag]||i.defaultStyle,ms.call(i.represent)==="[object Function]")o=i.represent(r,c);else if(ps.call(i.represent,c))o=i.represent[c](r,c);else throw new nt("!<"+i.tag+'> tag resolver accepts not "'+c+'" style');e.dump=o}return!0}return!1}function xt(e,r,n,o,a,l,s){e.tag=null,e.dump=n,Ts(e,n,!1)||Ts(e,n,!0);var i=ms.call(e.dump),c=o,u;o&&(o=e.flowLevel<0||e.flowLevel>r);var d=i==="[object Object]"||i==="[object Array]",m,p;if(d&&(m=e.duplicates.indexOf(n),p=m!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&r>0)&&(a=!1),p&&e.usedDuplicates[m])e.dump="*ref_"+m;else{if(d&&p&&!e.usedDuplicates[m]&&(e.usedDuplicates[m]=!0),i==="[object Object]")o&&Object.keys(e.dump).length!==0?(Ck(e,r,e.dump,a),p&&(e.dump="&ref_"+m+e.dump)):(Nk(e,r,e.dump),p&&(e.dump="&ref_"+m+" "+e.dump));else if(i==="[object Array]")o&&e.dump.length!==0?(e.noArrayIndent&&!s&&r>0?Ds(e,r-1,e.dump,a):Ds(e,r,e.dump,a),p&&(e.dump="&ref_"+m+e.dump)):(vk(e,r,e.dump),p&&(e.dump="&ref_"+m+" "+e.dump));else if(i==="[object String]")e.tag!=="?"&&xk(e,e.dump,r,l,c);else{if(i==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new nt("unacceptable kind of an object to dump "+i)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}function Sk(e,r){var n=[],o=[],a,l;for($o(e,n,o),a=0,l=o.length;a<l;a+=1)r.duplicates.push(n[o[a]]);r.usedDuplicates=new Array(l)}function $o(e,r,n){var o,a,l;if(e!==null&&typeof e=="object")if(a=r.indexOf(e),a!==-1)n.indexOf(a)===-1&&n.push(a);else if(r.push(e),Array.isArray(e))for(a=0,l=e.length;a<l;a+=1)$o(e[a],r,n);else for(o=Object.keys(e),a=0,l=o.length;a<l;a+=1)$o(e[o[a]],r,n)}function Vk(e,r){r=r||{};var n=new hk(r);n.noRefs||Sk(e,n);var o=e;return n.replacer&&(o=n.replacer.call({"":o},"",o)),xt(n,0,o,!0,!0)?n.dump+`
|
|
272
|
+
`:""}var Dk=Vk,Tk={dump:Dk},Ak=Tk.dump;const $k={class:"space-y-6 max-w-7xl mx-auto"},Ik={class:"flex items-center justify-between"},Lk={class:"flex items-center gap-4"},Mk={class:"flex items-center gap-2"},Ok={class:"text-2xl font-semibold text-gray-900 dark:text-white"},Bk=["href","title"],Fk={class:"flex items-center space-x-3"},Pk={key:0,class:"max-w-[1000px] flex flex-col"},Rk={class:"flex ml-2 mb-6 w-min border border-gray-200 dark:border-gray-700 rounded-full overflow-hidden"},As=t.defineComponent({__name:"MenuItemPage",setup(e){Y.inputs["vs-input-monaco-editor"]=Wr;const{t:r,locale:n}=me(),o=De.useRouter(),a=De.useRoute(),l=t.computed(()=>[{key:"name",title:r("cms.menu.form.name"),type:"text",placeholder:r("cms.menu.form.name"),required:!0,validators:["required"]},{key:"description",title:r("cms.menu.form.description"),type:"text",placeholder:r("cms.menu.form.description"),required:!0,validators:["required"]},{key:"locale",title:r("cms.menu.form.language"),type:"select",placeholder:r("cms.menu.form.language"),options:[{text:"Ukrainian",id:"uk"},{text:"English",id:"en"}],required:!0,validators:["required"]},{key:"content",title:r("cms.menu.form.content"),type:"monaco-editor",height:"500px",language:"yaml",theme:"vs-light"}]),s=t.ref(null),i=t.ref({}),c=t.ref(!1),u=t.ref(!1),d=f=>{const g={};for(const y of f){const{title:x,value:h,children:k}=y;k&&k.length>0?g[x]=d(k):g[x]=h}return g},m=async()=>{let f={...s.value||{}};if(await i.value.validate()){Q.notify({type:"warning",title:r("cms.common.actions.warning"),message:r("cms.menu.createMenuFailed")});return}Array.isArray(f.items)&&(f.items=d(f.items),f.content=Ak(f.items));try{await fetch(`/api/cms-menu/${a.params.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}),Q.notify({title:r("cms.menu.menuUpdated"),type:"success",message:r("cms.menu.menuUpdated")}),o.push("/menu")}catch{Q.notify({title:r("cms.menu.menuUpdateError"),type:"error",message:r("cms.menu.menuUpdateError")})}},p=async()=>{try{const g=await(await fetch(`/api/cms-menu/${a.params.id}`)).json();s.value=g,c.value=!0}catch{c.value=!1}};return t.onMounted(p),(f,g)=>(t.openBlock(),t.createElementBlock("div",$k,[t.createElementVNode("div",Ik,[t.createElementVNode("div",Lk,[t.createElementVNode("button",{onClick:g[0]||(g[0]=y=>t.unref(o).back()),class:"p-2 text-gray-500 rounded-full hover:text-gray-900 dark:text-gray-400 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"},[t.createVNode(t.unref(fn),{class:"w-5 h-5"})]),t.createElementVNode("div",Mk,[t.createElementVNode("h1",Ok,t.toDisplayString(f.$t("cms.menu.editMenu")),1),t.createElementVNode("a",{href:`https://cms.opengis.info/${t.unref(n)}/guides/menu/`,target:"_blank",title:f.$t("cms.guide.menu")},[t.createVNode(t.unref(wt),{class:"w-5 h-5"})],8,Bk)])]),t.createElementVNode("div",Fk,[t.createElementVNode("button",{onClick:m,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 bg-blue-600 text-white shadow-md transition-all duration-200 transform hover:bg-blue-700 hover:shadow-lg hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"},[t.createVNode(t.unref(_n),{class:"w-4 h-4 mr-2"}),t.createTextVNode(" "+t.toDisplayString(f.$t("cms.common.actions.save")),1)])])]),c.value?(t.openBlock(),t.createElementBlock("div",Pk,[t.createElementVNode("div",Rk,[t.createElementVNode("button",{onClick:g[1]||(g[1]=y=>u.value=!1),class:t.normalizeClass([{"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-white":!u.value},"text-gray-500 hover:text-gray-900 dark:hover:text-white hover:bg-gray-200 dark:hover:bg-gray-700 whitespace-nowrap px-5 py-2 w-[200px] text-sm font-medium"])},t.toDisplayString(f.$t("cms.menu.textEditor")),3),t.createElementVNode("button",{onClick:g[2]||(g[2]=y=>u.value=!0),class:t.normalizeClass([{"bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-white":u.value},"text-gray-500 hover:text-gray-900 dark:hover:text-white hover:bg-gray-200 dark:hover:bg-gray-700 whitespace-nowrap px-5 py-2 w-[200px] text-sm font-medium"])},t.toDisplayString(f.$t("cms.menu.listTree")),3)]),u.value?(t.openBlock(),t.createBlock(T1,{key:0,modelValue:s.value,"onUpdate:modelValue":g[3]||(g[3]=y=>s.value=y)},null,8,["modelValue"])):(t.openBlock(),t.createBlock(t.unref(Y.VForm),{key:1,schema:l.value,modelValue:s.value,"onUpdate:modelValue":g[4]||(g[4]=y=>s.value=y),form:i.value,"onUpdate:form":g[5]||(g[5]=y=>i.value=y)},null,8,["schema","modelValue","form"]))])):t.createCommentVNode("",!0)]))}}),Uk=Object.freeze(Object.defineProperty({__proto__:null,default:As},Symbol.toStringTag,{value:"Module"})),jk=(e,r)=>{const n=e[r];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((o,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+r)))})},qk=localStorage.locale||navigator.language.split("cms.-")[0]||"uk",ar=hd({legacy:!1,locale:qk,fallbackLocale:"en",datetimeFormats:{en:{short:{year:"numeric",month:"short",day:"numeric"},long:{dateStyle:"full",timeStyle:"short"},time:{hour:"2-digit",minute:"2-digit"}},uk:{short:{year:"numeric",month:"short",day:"numeric"},long:{dateStyle:"full",timeStyle:"short"},time:{hour:"2-digit",minute:"2-digit"}}},numberFormats:{en:{currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0},compact:{notation:"compact"}},uk:{currency:{style:"currency",currency:"UAH"},percent:{style:"percent",minimumFractionDigits:0},compact:{notation:"compact"}}},messages:{}}),Io="en";async function $s(e){return(await jk(Object.assign({"./locales/en.json":()=>Promise.resolve().then(()=>zk),"./locales/uk.json":()=>Promise.resolve().then(()=>Kk)}),`./locales/${e}.json`)).default}async function Lo(e){try{const r=await $s(e);return ar.global.setLocaleMessage(e,r),r}catch(r){if(console.error(`Failed to load locale ${e}:`,r),e!==Io)try{const n=await $s(Io);return ar.global.setLocaleMessage(e,n),n}catch(n){throw console.error(`Failed to load fallback locale ${Io}:`,n),n}throw r}}async function Hk(e){await Lo(e),ar.global.locale.value=e,localStorage.setItem("locale",e),document.documentElement.lang=e,window.dispatchEvent(new CustomEvent("cms.storage",{detail:{key:"locale",oldValue:null,newValue:e}}))}async function Gk(){const e=ar.global.locale.value;await Lo(e),ar.global.locale.value=e,localStorage.setItem("locale",e),document.documentElement.lang=e}async function Wk(e){return await Lo(e)}function Yk(e){e.component("Dashboard",Xn)}const Is={reference:{faq:"FAQ",banner:"Banner",slider:"Slider",video:"Video",about:"About",cards:"Cards",usefulLinks:"Useful Links",team:"Team",body:"Body",news:"News",form:"Form",tabs:"Tabs",vertical_tabs:"Vertical Tabs",documents:"Documents",infoLine:"Information Line",interested:"You may be interested",contact:"Contact"},navigation:{editMenu:"Edit Menu",dashboard:"Dashboard",collections:"Collections Structure",articles:"Articles",posts:"Posts",media:"Media",permissions:"Permissions",tags:"Tags",singletons:"Pages",feedback:"Feedback",email:"Пошти користувачів",singletonsMenu:"Menu",menuAdd:"Create Menu",builder:"Collections Structure",back:"Back",settings:"Settings",settingsDescription:"Manage your CMS configuration",singletonsMenuDescription:"Manage your menu.",users:"Users",general:"General",apiKeys:"API Keys",appearance:"Appearance",logs:"Logs",cms:"CMS"},dashboard:{title:"Dashboard",newCollection:"Create Collection",quickActions:"Quick Actions",views:"views",stats:{totalArticles:"Total Articles",totalMedia:"Total Media",activeUsers:"Active Users",apiRequests:"API Requests",fromLastMonth:"from last month"},collections:{title:"Collections",articles:"Articles",articlesDesc:"Description for articles",posts:"Posts",postsDesc:"Description for posts",products:"Products",productsDesc:"Description for products",categories:"Categories",categoriesDesc:"Description for categories",items:"items",new:"New Collection"},recentArticles:"Recent Articles",recentPosts:"Recent Posts",activeUsers:"Active Users",mediaFiles:"Media Files",createArticle:"Create Article",createPost:"Create Post",uploadMedia:"Upload Media",manageUsers:"Manage Users",feedback:"Feedback",createArticleDescription:"Create a new article for your site",uploadMediaDescription:"Upload media files for your site",manageUsersDescription:"Manage users for your site",viewFeedbackDescription:"View feedback for your site",activityFeed:"Activity Feed",viewAll:"View all",description:"Welcome to the CMS dashboard. You can create, edit, and manage your site's content.",newArticle:"Create Article",totalContent:"Total Content",articlesPostsPages:"Articles, Posts and Pages",monthlyActiveUsers:"Monthly Active Users",imagesVideosDocs:"Images, Videos and Docs",thisMonth:"This Month",newMediaFiles:"New Media Files",gettingStartedWithNextJs14:"Getting Started with Next.js 14",sarahJohnson:"Sarah Johnson",advancedReactPatterns:"Advanced React Patterns",uiUxDesignPrinciples:"UI/UX Design Principles",databaseOptimizationTips:"Database Optimization Tips",mikeChen:"Mike Chen",emmaWilson:"Emma Wilson",alexRodriguez:"Alex Rodriguez",recentContent:"Recent Content"},collections:{title:"Collections",selectCollection:"Select a collection to view its content",createCollection:"New Collection",searchCollections:"Search collections...",entries:"Entries",fields:"Fields",lastModified:"Last Modified",edit:"Edit",delete:"Delete",view:"View",form:{name:"Collection Name",slug:"Slug",description:"Description",fields:"Fields",addField:"Add Field"},dragToBuild:"Drag and drop content blocks here to build your collection structure",collectionCreated:"Collection created successfully",collectionCreationFailed:"Error creating collection",pinPublication:"Pin Publication"},articles:{title:"Articles",createArticle:"Create Article",searchArticles:"Search articles...",showColumns:"Show columns",update:"Update",create:"Create",form:{title:"Title",content:"Content",author:"Author",category:"Category",status:"Status"}},posts:{title:"Posts",createPost:"Create Post",searchPosts:"Search posts...",form:{title:"Title",content:"Content",author:"Author",category:"Category",status:"Status"}},singletons:{title:"Singletons",createSingleton:"Create Singleton",searchSingletons:"Search singletons...",form:{name:"Name",description:"Description",content:"Content",status:"Status"},search:"Search singletons..."},media:{title:"Media Library",description:"Manage your images, documents, and media files.",uploadMedia:"Upload Media",searchMedia:"Search files...",fileInfo:"File Information",preview:"Preview",newFolder:"New Folder",selectFile:"Select a file to view details",fileDetails:"File Details",name:"Name",size:"Size",dimensions:"Dimensions",uploadDate:"Upload Date",author:"Author",tags:"Tags",banner:"Banner",hero:"Hero",homepage:"Homepage",download:"Download",copyPath:"Copy path",copyPathFailed:"Failed to copy path",delete:"Delete",edit:"Edit",share:"Share",moreActions:"More actions",deleteFile:"Delete File",cancel:"Cancel",mediaLibrary:"Media Library",showColumns:"Show columns",update:"Update",create:"Create",createFolder:"Create Folder",files:"files",noFilesInFolder:"No files in this folder",deleteConfirmation:"Are you sure you want to delete this file?",uploaded:"Uploaded",filter:"Filter",search:"Search media files...",uploadingFiles:"Uploading files",uploading:"Uploading...",folder:"Folder",updatedAt:"Updated At",type:"Type",sortBy:{title:"Sort by",name:"File name",filesize:"File size"},upload:"Upload",selectFromMedia:"Select from media",selectedFiles:"Selected files: {count}",selectFiles:"Select files"},tags:{title:"Tags",description:"Manage your tags.",createTag:"Create Tag",editTag:"Edit Tag",searchTags:"Search tags...",form:{name:"Name",description:"Description",color:"Color",created_at:"Created At",count_data:"Count of Used",topic:"Topic"},emptyTitle:"No tags found",emptyDescription:"Create your first tag to get started.",emptyButton:"Create Tag"},feedback:{title:"Feedback",description:"View feedback",table:{number:"№",noFeedback:"No feedback",email:"Email",userName:"Full name",messageText:"Message text",feedbackType:"Type of appeal",phone:"Phone",resumeLink:"Resume link",linkedinLink:"Linkedin link",portfolioLink:"Portfolio link",telegramLink:"Telegram link"}},email:{title:"User mails",description:"View users awaiting feedback",table:{number:"№",date:"Date of shipment",email:"Email"}},emptyData:{title:"No data found",description:"Create your first item to get started.",buttonText:"Create Item"},form:{gen:"Generate",key:"Key",value:"Value",noDataToDisplay:"No data to display",add:"Add"},builder:{manageContentCollections:"Manage content collections",searchCollections:"Search collections...",collections:"Collections",collectionStructure:"Collection Structure",defineFields:"Define the fields and their types for this collection",name:"Name",edit:"Edit",preview:"Preview",type:"Type",content:"Content",seo:"SEO",tags:"Tags",save:"Save",cancel:"Cancel",create:"Create",localization:"Localization",actions:"Actions",noColumnsFound:"No columns found",collectionName:"Collection Name",title:"Title",entries:"Entries",fields:"Fields",status:"Status",lastModified:"Last Modified",editCollection:"Edit collection",editPage:"Edit page",editContentForYourSite:"Edit content for your site",deleteObject:"Are you sure you want to delete this object?",editField:"Edit field",deleteTitle:"Delete field",deleteField:"Are you sure you want to delete this field?",scheme:{name:{label:"Name",placeholder:"Name"},title:{label:"Title",placeholder:"Title"},type:{label:"Type",placeholder:"Type",options:{collection:"Collection",single:"Single"}},customTable:{label:"Custom Table"},status:{label:"Status",placeholder:"Status",options:{published:"Published",draft:"Draft",archived:"Archived"}},description:{label:"Description",placeholder:"Description"},preview_path:{label:"Preview path",placeholder:"Preview path",info:"Path to slug for preview"},include_search:{label:"Include in search?",placeholder:"Include in search?"}},required:"Required field",createField:"Create field",selectType:"Select type",createFolder:"Create folder",changeType:"Change type",fieldLabels:{name:"Name",label:"Label",placeholder:"Placeholder",help:"Help",type:"Type",subtype:"Subtype",parent:"Parent",options:"Options",colModel:"ColModel",multiple:"Multiple",api:"API",relation:"Relation",required:"Required",localization:"Localization"},fieldPlaceholders:{name:"Name",label:"Title",placeholder:"Placeholder",help:"Help",type:"Type",subtype:"Subtype",parent:"Parent",options:"Options",colModel:"ColModel",api:"API",relation:"Relation"},fieldOptions:{text:"Text",number:"Number",integer:"Integer",date:"Date",datetime:"Datetime",file:"File",select:"Select",multiselect:"MultiSelect",mediaselect:"MediaSelect",radio:"Radio",boolean:"Boolean",datalist:"Data list",image:"Image",slug:"Slug",richtext:"Rich Text",markdown:"Markdown",reference:"Reference",relation:"Relation",fileList:"Gallery",tags:"Tags"}},menu:{title:"Menu",description:"Manage your menu.",createMenu:"Create Menu",searchMenu:"Search menu...",menuAdd:"Add Menu",editMenu:"Edit Menu",textEditor:"Text Editor",listTree:"List Tree",filter:"Filter",search:"Search menu...",menuCreated:"Menu created",menuCreateError:"Error creating menu",menuUpdated:"Menu updated",menuUpdateError:"Error updating menu",menuDeleted:"Menu deleted",menuDeleteError:"Error deleting menu",form:{name:"Name",description:"Description",content:"Content",status:"Status",value:"Value",language:"Language"}},settings:{title:"Settings",description:"Configure your CMS settings and preferences.",systemStatus:"System Status",siteInformation:"Site Information",siteName:"Site Name",version:"Version",environment:"Environment",security:"Security",localization:"Localization",production:"Production",systemHealth:"System Health",database:"Database",connected:"Connected",cache:"Cache",active:"Active",storage:"Storage",used:"Used",configure:"Configure",successTitle:"Success",successMessage:"Settings saved successfully",errorTitle:"Error",errorMessage:"Error saving settings",generateNewKey:"Generate New Key",apiSecurity:"API Security",general:{general:"General Settings",generalDescription:"Manage your general settings.",url:"URL",language:"Language",languages:"Languages",contacts:"Contacts",showSocialsNumber:"Number of socials to display",headerBtn:"Title of header button",mapCoords:"Map coordinates",socials:"Socials",saveChanges:"Save Changes",cancel:"Cancel",notifications:"Notifications",emailNotifications:"Email Notifications",emailNotificationsDescription:"Receive notifications by email",pushNotifications:"Browser Notifications",pushNotificationsDescription:"Browser notifications for important updates",smsNotifications:"SMS Notifications",smsNotificationsDescription:"SMS notifications for critical updates",desktopNotifications:"Desktop Notifications",desktopNotificationsDescription:"Desktop notifications",siteDescription:"Site Description",siteUrl:"Site URL",siteLanguage:"Site Language",siteEmail:"Site Email",sitePhone:"Site Phone",siteAddress:"Site Address",siteName:"Site Name",title:"Title",content:"Content",name:"Name",siteInformation:"Site Information",logoSite:"Site Logo",logoCms:"CMS Logo",imageLogin:"Login Image",logo:"Logo",siteInformationDescription:"Manage your site information."},users:{users:"User Management",usersDescription:"Manage your user management configuration.",userRegistration:"User Registration",allowRegistration:"Allow User Registration",allowRegistrationDescription:"Enable new users to register accounts",emailVerification:"Email Verification Required",emailVerificationDescription:"Require email verification for new accounts",autoApprove:"Auto-approve Users",autoApproveDescription:"Automatically approve new user registrations",defaultRole:"Default User Role"},"api-keys":{apiKeys:"API Keys",apiKeysDescription:"Manage your api keys configuration.",productionApiKey:"Production API Key",developmentApiKey:"Development API Key",generateNewKey:"Generate New Key",apiSecurity:"API Security",rateLimiting:"Rate Limiting",rateLimitingDescription:"Enable API rate limiting protection",corsProtection:"CORS Protection",corsProtectionDescription:"Cross-origin request security",apiLogging:"API Logging",apiLoggingDescription:"Log all API requests and responses"},appearance:{appearance:"Appearance",appearanceDescription:"Manage your appearance settings.",colorTheme:"Color Theme",darkMode:"Dark Mode",darkModeDescription:"Switch to dark theme",compactMode:"Compact Mode",compactModeDescription:"Reduce spacing and padding",animations:"Animations",animationsDescription:"Enable interface animations",themeBlue:"Blue",themeGreen:"Green",themePurple:"Purple"},logs:{title:"Logs",description:"View all your actions in the system",table:{objectId:"Object Identifier",dateTime:"Date and Time of Change",changeType:"Change Type",noLogs:"No user logs found",noLogsDescription:"No user logs found"}},permissions:{title:"Permissions",user:"User",role:"Role",lastActive:"Last Active",actions:"Actions",rolePermissions:"Role Permissions",rolePermissionsDescription:"Permissions assigned to each role in the system.",permission:"Permission",admin:"Admin",editor:"Editor",author:"Author",viewer:"Viewer",customizePermissions:"Customize Permissions",inviteUser:"Invite User",searchUsers:"Search users...",createContent:"Create Content",editContent:"Edit Content",deleteContent:"Delete Content",publishContent:"Publish Content",manageMedia:"Manage Media",manageUsers:"Manage Users",manageSettings:"Manage Settings",remove:"Remove",edit:"Edit",time:{hoursAgo:"{count} hours ago",hourAgo:"1 hour ago",daysAgo:"{count} days ago",dayAgo:"1 day ago",weeksAgo:"{count} weeks ago",weekAgo:"1 week ago",minutesAgo:"{count} minutes ago",minuteAgo:"1 minute ago",justNow:"just now"},roles:{admin:"Admin",editor:"Editor",author:"Author",viewer:"Viewer"}}},block:{type:{heading:"Heading",paragraph:"Paragraph"}},app:{name:"SOFTPRO software package: GIS MBK Kamyansk City TG",tagline:"Do more with less"},nav:{home:"Home",about:"About",profile:"Profile",settings:"Settings",logout:"Log out"},common:{ok:"OK",save:"Save",cancel:"Cancel",close:"Close",delete:"Delete",edit:"Edit",loading:"Loading…",retry:"Retry",title:"Title",description:"Description",keywords:"Keywords",successMessage:"Success",errorMessage:"Error",success:"Success",error:"Error",meta:"Meta",actions:{add:"Add",save:"Save",cancel:"Cancel",edit:"Edit",delete:"Delete",create:"Create",preview:"Preview",search:"Search",filter:"Filter",export:"Export",addField:"Add Field",success:"Success",error:"Error",back:"Back"},status:{published:"Published",draft:"Draft",archived:"Archived"},content:"Content",pagination:{showing:"Showing",to:"to",of:"of",results:"results",previous:"Previous",next:"Next"}},auth:{title:"Sign in",email:"Email",password:"Password",remember:"Remember me",submit:"Sign in",errors:{invalid:"Invalid email or password",required:"{field} is required"}},table:{choose:"Choose columns to display",columns:"Columns",actions:"Actions",search:"Search",export:"Export",exportTitle:"Export table",close:"Close",chooseColumns:"Select columns for export:",selectAll:"Select all",selectCurrent:"Select current",none:"None",chooseFormat:"Choose table format:",time:{weeksAgo:"{count} weeks ago",weekAgo:"1 week ago",daysAgo:"{count} days ago",dayAgo:"1 day ago",hoursAgo:"{count} hours ago",hourAgo:"1 hour ago",minutesAgo:"{count} minutes ago",minuteAgo:"1 minute ago",justNow:"just now"},format:{json:"JSON format",csv:"CSV format",xlsx:"XLSX format"},cancel:"Cancel",download:"Download table"},filter:{search:"Search",more:"Show more",less:"Show less",selected:"selected",clear:"Clear",apply:"Apply",from:"From",to:"To",notfound:"Nothing found",period:"Period",today:"Today",week:"Week",month:"Month",quarter:"Quarter",year:"Year",alltime:"All Time",prev:"Prev",next:"Next"},items:{title:"Items",add:"Add item",count:"No items | One item | {count} items",created:"Item “{name}” has been created",deleted:"Item deleted"},errors:{network:"Network error. Please try again.",notFound:"We couldn't find what you were looking for."},toast:{saved:"Changes saved",copied:"Copied to clipboard"},users:{title:"Users",description:"Manage your users.",createUser:"Create User",editUser:"Edit User",searchUsers:"Search users...",createUserFailed:"Create user failed",createUserSuccess:"User created successfully",editUserFailed:"Edit user failed",editUserSuccess:"User edited successfully",deleteUserSuccess:"User deleted successfully",deleteUserFailed:"User deleted failed",form:{name:"Name",description:"Description",color:"Color",created_at:"Created At",count_data:"Count of Used",topic:"Topic"},emptyTitle:"No users found",emptyDescription:"Create your first user to get started.",emptyButton:"Create User"},fetchContentTypes:"fetchContentTypes",action:"action",delete:"delete","create-folder":"create-folder",formValues:"formValues",metaParentValue:"metaParentValue",blur:"blur","-":"-",noFilesInFolder:"noFilesInFolder",guide:{menu:"Guide for menu",general:"Guide",media:"Guide for media",settings:"Guide for settings",users:"Guide for users",content:"Guide for content",appOverview:"Guide for app overview",collections:"Guide for collections",help:"Help"}},zk=Object.freeze(Object.defineProperty({__proto__:null,cms:Is,default:{cms:Is}},Symbol.toStringTag,{value:"Module"})),Ls={reference:{faq:"Акордeон",photoGrid:"Фотогалерея",banner:"Банер",slider:"Слайдер",video:"Відео",about:"Про нас",cards:"Картки",usefulLinks:"Корисні посилання",team:"Команда",body:"Тіло",news:"Новини",form:"Форма",tabs:"Таби",vertical_tabs:"Вертикальні таби",documents:"Документи",infoLine:"Інформаційна лінія",iframe:"Iframe",interested:"Вас може зацікавити",contact:"Контакти"},navigation:{editMenu:"Редагувати меню",dashboard:"Панель керування",collections:"Керування контентом",articles:"Статті",posts:"Дописи",media:"Медіа",permissions:"Дозволи",tags:"Теги",singletons:"Сторінки",singletonsMenu:"Меню",feedback:"Зворотній зв'язок",email:"Пошти користувачів",menuAdd:"Створити меню",builder:"Структура колекцій",back:"Назад",settings:"Налаштування",settingsDescription:"Налаштування вашого сайту",singletonsMenuDescription:"Керування меню.",users:"Користувачі",general:"Основні",apiKeys:"API ключі",appearance:"Вигляд",logs:"Логи",cms:"ЦМС"},dashboard:{title:"Панель керування",description:"Вітаємо в панелі керування CMS. Ви можете створювати, редагувати та управляти контентом вашого сайту.",newCollection:"Створити колекцію",quickActions:"Швидкі дії",views:"переглядів",stats:{totalArticles:"Всього статей",totalMedia:"Всього медіа",activeUsers:"Активні користувачі",apiRequests:"API запити",fromLastMonth:"з минулого місяця"},collections:{title:"Колекції",articles:"Статті",articlesDesc:"Опис для статей",posts:"Дописи",postsDesc:"Опис для дописів",products:"Продукти",productsDesc:"Опис для продуктів",categories:"Категорії",categoriesDesc:"Опис для категорій",items:"шт.",new:"Нова колекція"},recentArticles:"Останні статті",recentPosts:"Останні дописи",recentContent:"Останній контент",activityFeed:"Стрічка активності",viewAll:"Показати все",totalContent:"Всього контенту",articlesPostsPages:"Статті, дописи та сторінки",monthlyActiveUsers:"Активних користувачів за місяць",imagesVideosDocs:"Зображення, відео та документи",thisMonth:"Цього місяця",activeUsers:"Активні користувачі",mediaFiles:"Файли медіа",createArticle:"Створити статтю",createPost:"Створити допис",uploadMedia:"Завантажити медіа",createArticleDescription:"Створіть статтю для вашого сайту",uploadMediaDescription:"Завантажте медіа файли для вашого сайту",manageUsersDescription:"Керуйте користувачами вашого сайту",viewFeedbackDescription:"Перегляд зворотнього зв'язку",manageUsers:"Керування користувачами",feedback:"Зворотній зв'язок",newMediaFiles:"Нових файлів медіа",gettingStartedWithNextJs14:"Початок роботи з Next.js 14",sarahJohnson:"Sarah Johnson",advancedReactPatterns:"Підвищені шаблони React",uiUxDesignPrinciples:"Принципи дизайну UI/UX",databaseOptimizationTips:"Поради з оптимізації бази даних",mikeChen:"Mike Chen",emmaWilson:"Emma Wilson",alexRodriguez:"Alex Rodriguez"},collections:{title:"Колекції",selectCollection:"Виберіть колекцію для перегляду її контенту",createCollection:"Створити колекцію",searchCollections:"Пошук колекцій...",entries:"Записи",fields:"Поля",lastModified:"Останнє редагування",edit:"Редагувати",delete:"Видалити",view:"Перегляд",form:{name:"Назва колекції",slug:"Слаг",description:"Опис",fields:"Поля",addField:"Додати поле"},dragToBuild:"Перетягніть блоки контенту сюди, щоб створити структуру колекції",collectionCreated:"Колекція успішно створена",collectionCreationFailed:"Помилка при створенні колекції",pinPublication:"Закріпити публікацію"},articles:{title:"Сторінки",createArticle:"Створити сторінку",searchArticles:"Пошук статей...",showColumns:"Показати колонки",update:"Оновити",create:"Створити",form:{title:"Заголовок",content:"Зміст",author:"Автор",category:"Категорія",status:"Статус"}},posts:{title:"Дописи",createPost:"Створити допис",searchPosts:"Пошук дописів...",form:{title:"Заголовок",content:"Зміст",author:"Автор",category:"Категорія",status:"Статус"}},singletons:{title:"Синглтони",createSingleton:"Створити синглтон",searchSingletons:"Пошук синглтонів...",form:{name:"Назва",description:"Опис",content:"Зміст",status:"Статус"},search:"Пошук синглтонів..."},media:{title:"Медіа бібліотека",description:"Керуйте своїми зображеннями, документами та медіа файлами.",uploadMedia:"Завантажити медіа",searchMedia:"Пошук файлів...",fileInfo:"Інформація про файл",preview:"Перегляд",newFolder:"Нова папка",selectFile:"Виберіть файл для перегляду деталей",fileDetails:"Інформація про файл",name:"Назва",size:"Розмір",dimensions:"Розміри",uploadDate:"Дата завантаження",author:"Автор",tags:"Теги",banner:"Банер",hero:"Герой",homepage:"Головна",download:"Завантажити",copyPath:"Копіювати шлях",copyPathFailed:"Не вдалося скопіювати шлях",delete:"Видалити",edit:"Редагувати",share:"Поділитися",moreActions:"Більше дій",deleteFile:"Ви впевнені, що хочете видалити цей файл?",createFolder:"Створити папку",cancel:"Скасувати",mediaLibrary:"Медіа бібліотека",files:"файлів",noFilesInFolder:"Немає файлів у цій папці",deleteConfirmation:"Ви впевнені, що хочете видалити цей файл?",uploaded:"Завантажено",filter:"Фільтр",search:"Пошук файлів...",uploadingFiles:"Завантаження файлів",uploading:"Завантаження...",folder:"Папка",type:"Тип",updatedAt:"Оновлено",sortBy:{title:"Сортувати за",name:"Назва файлу",filesize:"Розмір файлу"},upload:"Завантажити",selectFromMedia:"Вибрати з медіа",selectFiles:"Вибрати файли",selectedFiles:"Вибрано файлів: {count}"},tags:{title:"Теги",description:"Керування тегами.",createTag:"Створити тег",editTag:"Редагувати тег",searchTags:"Пошук тегів...",form:{name:"Назва",description:"Опис",color:"Колір",slug:"Slug",created_at:"Дата створення",count_data:"Кількість використань",topic:"Тема"},emptyTitle:"Теги не знайдені",emptyDescription:"Створіть свій перший тег, щоб почати.",emptyButton:"Створити тег"},feedback:{title:"Зворотній зв'язок",description:"Переглядайте зворотній зв'язок",table:{number:"№",noFeedback:"Фідбек відсутній",email:"Email",userName:"ПІБ",messageText:"Текст повідомлення",feedbackType:"Тип звернення",cdate:"Дата відгуку",phone:"Телефон",resumeLink:"Посилання на резюме",linkedinLink:"Посилання на лінкедин",portfolioLink:"Посилання на портфоліо",telegramLink:"Посилання на телеграм"}},email:{title:"Пошти користувачів",description:"Переглядайте користувачів, які очікують зворотнього зв'язку",table:{number:"№",date:"Дата відправки",email:"Email"}},emptyData:{title:"Немає даних",description:"Створіть свій перший елемент, щоб почати.",buttonText:"Створити елемент"},form:{gen:"Згенерувати",key:"Ключ",value:"Значення",noDataToDisplay:"Дані для відображення відсутні",add:"Додати"},builder:{faq:"Акордeон",photoGrid:"Фотогалерея",banner:"Банер",slider:"Слайдер",video:"Відео",about:"Про нас",cards:"Картки",usefulLinks:"Корисні посилання",team:"Команда",body:"Тіло",news:"Новини",form:"Форма",tabs:"Таби",vertical_tabs:"Вертикальні таби",documents:"Документи",infoLine:"Інформаційна лінія",iframe:"Iframe",manageContentCollections:"Керування колекціями контенту",searchCollections:"Пошук колекцій...",collections:"Структура колекцій",collectionStructure:"Структура колекції",defineFields:"Визначте поля та їх типи для цієї колекції",name:"Назва",changeType:"Змінити тип",type:"Тип",save:"Зберегти",edit:"Редагувати",content:"Контент",seo:"SEO",tags:"Теги",preview:"Перегляд",collectionName:"Назва колекції",title:"Заголовок",entries:"Записи",fields:"Поля",status:"Статус",lastModified:"Останнє редагування",cancel:"Скасувати",create:"Створити",localization:"Локалізація",actions:"Дії",noColumnsFound:"Немає колонок",editCollection:"Редагувати структуру",editPage:"Редагувати сторінку",editContentForYourSite:"Редагувати контент для вашого сайту",deleteObject:"Ви впевнені, що хочете видалити цей об'єкт?",editField:"Редагувати поле",deleteTitle:"Видалити поле",deleteField:"Ви впевнені, що хочете видалити це поле?",scheme:{name:{label:"Назва",placeholder:"Назва"},title:{label:"Заголовок",placeholder:"Заголовок"},type:{label:"Тип",placeholder:"Тип",options:{collection:"Колекція",single:"Сторінка"}},customTable:{label:"Власна таблиця"},status:{label:"Статус",placeholder:"Статус",options:{published:"Опубліковано",draft:"Чернетка",archived:"Архівовано"}},description:{label:"Опис",placeholder:"Опис"},preview_path:{label:"Шлях для прев'ю",placeholder:"Шлях для прев'ю",info:"Шлях до slug для прев'ю"},include_search:{label:"Включити в пошук?",placeholder:"Включити в пошук?"}},required:"Обов'язкове поле",createField:"Створити поле",selectType:"Оберіть тип",createFolder:"Створити папку",fieldLabels:{name:"Назва",label:"Мітка",placeholder:"Плейсхолдер",help:"Допомога",type:"Тип",subtype:"Підтип",parent:"Батьківський",data:"ID класифікатора",options:"Опції",colModel:"Модель колонок",multiple:"Множинний",api:"API",relation:"Зв'язок",required:"Обов'язковий",localization:"Локалізація"},fieldPlaceholders:{name:"Назва",label:"Заголовок",placeholder:"Плейсхолдер",help:"Допомога",type:"Тип",subtype:"Підтип",parent:"Батьківський",data:"ID класифікатора",options:"Опції",colModel:"Модель колонок",api:"API",relation:"Зв'язок"},fieldOptions:{text:"Текст",number:"Число",integer:"Ціле число",date:"Дата",datetime:"Дата і час",file:"Файл",select:"Селект",multiselect:"Мультиселект",mediaselect:"Вибір медіа",radio:"Радіо",boolean:"Булевий",datalist:"Дататейбл",image:"Зображення",slug:"Слаг",richtext:"Текстовий редактор",markdown:"Markdown",reference:"Секції",relation:"Зв'язок",fileList:"Мультифайл",tags:"Теги"}},menu:{title:"Меню",description:"Керування меню.",createMenu:"Створити меню",searchMenu:"Пошук меню...",menuAdd:"Додати меню",editMenu:"Редагувати меню",textEditor:"Текстовий редактор",menuCreated:"Меню створено",menuCreateError:"Помилка при створенні меню",menuUpdated:"Меню оновлено",menuUpdateError:"Помилка при оновленні меню",menuDeleted:"Меню видалено",menuDeleteError:"Помилка при видаленні меню",listTree:"Список дерева",filter:"Фільтр",search:"Пошук меню...",form:{name:"Назва",description:"Опис",content:"Зміст",status:"Статус",value:"Значення",language:"Мова"}},settings:{title:"Налаштування",description:"Налаштуйте ваші налаштування CMS та налаштування.",systemStatus:"Статус системи",siteInformation:"Інформація про сайт",logo:"Логотип",siteName:"Назва сайту",version:"Версія",environment:"Середовище",security:"Безпека",localization:"Локалізація",production:"Виробництво",systemHealth:"Здоров'я системи",database:"База даних",connected:"З'єднано",cache:"Кеш",active:"Активний",storage:"Хмарне сховище",used:"Використано",configure:"Налаштувати",successTitle:"Успішно",successMessage:"Налаштування успішно збережено",errorTitle:"Помилка",errorMessage:"Помилка при збереженні налаштувань",generateNewKey:"Згенерувати новий ключ",apiSecurity:"Безпека API",general:{general:"Основні налаштування",generalDescription:"Керуйте вашими загальними налаштуваннями.",url:"URL",language:"Мова",languages:"Мови",contacts:"Контакти",socials:"Соціальні мережі",showSocialsNumber:"Кількість соціальних мереж для відображення",headerBtn:"Текст кнопки в хедері",mapCoords:"Координати для відображення на карті",saveChanges:"Зберегти зміни",cancel:"Скасувати",notifications:"Сповіщення",emailNotifications:"Сповіщення по email",emailNotificationsDescription:"Отримувати сповіщення по email",pushNotifications:"Сповіщення в браузері",pushNotificationsDescription:"Сповіщення в браузері для важливих оновлень",smsNotifications:"Сповіщення по SMS",smsNotificationsDescription:"Сповіщення по SMS для критичних оновлень",desktopNotifications:"Сповіщення на комп'ютері",desktopNotificationsDescription:"Сповіщення на комп'ютері",siteName:"Назва сайту",siteDescription:"Опис сайту",siteUrl:"URL сайту",previewUrl:"URL попереднього перегляду",logoSite:"Логотип сайту",logoCms:"Логотип CMS",imageLogin:"Зображення для входу",siteLanguage:"Мова сайту",siteEmail:"Email сайту",sitePhone:"Телефон сайту",siteAddress:"Адреса сайту",siteInformation:"Інформація про сайт",logo:"Логотип",siteInformationDescription:"Керуйте вашою інформацією про сайт.",title:"Заголовок",content:"Контент",name:"Назва соцмережі"},users:{users:"Керування користувачами",usersDescription:"Керуйте налаштуваннями керування користувачами.",userRegistration:"Реєстрація користувачів",allowRegistration:"Дозволити реєстрацію користувачів",allowRegistrationDescription:"Дозволити новим користувачам реєструвати акаунти",emailVerification:"Потрібна верифікація email",emailVerificationDescription:"Вимагати підтвердження email для нових акаунтів",autoApprove:"Автоматичне схвалення користувачів",autoApproveDescription:"Автоматично схвалювати нові реєстрації користувачів",defaultRole:"Роль за замовчуванням"},"api-keys":{apiKeys:"API ключі",apiKeysDescription:"Керуйте налаштуваннями API ключів.",productionApiKey:"Production API ключ",developmentApiKey:"Development API ключ",generateNewKey:"Згенерувати новий ключ",apiSecurity:"Безпека API",rateLimiting:"Обмеження швидкості",rateLimitingDescription:"Увімкнути захист обмеження швидкості API",corsProtection:"Захист CORS",corsProtectionDescription:"Безпека крос-доменних запитів",apiLogging:"Логування API",apiLoggingDescription:"Логувати всі API запити та відповіді"},appearance:{appearance:"Вигляд",appearanceDescription:"Керуйте вашим виглядом та налаштуваннями.",colorTheme:"Кольорова тема",darkMode:"Темний режим",darkModeDescription:"Перемкнути на темну тему",compactMode:"Компактний режим",compactModeDescription:"Зменшити відступи та поля",animations:"Анімації",animationsDescription:"Увімкнути анімації інтерфейсу",themeBlue:"Синя",themeGreen:"Зелена",themePurple:"Фіолетова"},logs:{title:"Логи",description:"Переглядай всі свої дії в системі",table:{number:"№",objectId:"Ідентифікатор об'єкта",dateTime:"Дата та час зміни",changeType:"Тип зміни",noLogs:"Логи користувача відсутні"}},permissions:{title:"Дозволи",user:"Користувач",role:"Роль",lastActive:"Остання активність",actions:"Дії",rolePermissions:"Дозволи ролі",rolePermissionsDescription:"Дозволи, призначені для кожної ролі в системі.",permission:"Дозвіл",admin:"Адміністратор",editor:"Редактор",author:"Автор",viewer:"Переглядач",customizePermissions:"Налаштувати дозволи",inviteUser:"Запросити користувача",searchUsers:"Пошук користувачів...",createContent:"Створити контент",editContent:"Редагувати контент",deleteContent:"Видалити контент",publishContent:"Опублікувати контент",manageMedia:"Керування медіа",manageUsers:"Керування користувачами",manageSettings:"Керування налаштуваннями",remove:"Вилучити",edit:"Редагувати",time:{hoursAgo:"{count} годин тому",hourAgo:"1 година тому",daysAgo:"{count} днів тому",dayAgo:"1 день тому",weeksAgo:"{count} тижнів тому",weekAgo:"1 тиждень тому",minutesAgo:"{count} хвилин тому",minuteAgo:"1 хвилина тому",justNow:"щойно"},roles:{admin:"Адміністратор",editor:"Редактор",author:"Автор",viewer:"Переглядач"}}},block:{type:{heading:"Заголовок",paragraph:"Параграф"}},app:{name:"Програмний комплекс SOFTPRO: ГІС МБК Кам'янської міської ТГ",tagline:"Зробіть більше з меншим"},nav:{home:"Домашній",about:"Про",profile:"Профіль",settings:"Налаштування",logout:"Вихід"},common:{ok:"Добре",save:"Зберегти",cancel:"Скасувати",close:"Закрити",delete:"Вилучити",edit:"Редагувати",loading:"Завантаження…",retry:"Повторити",title:"Назва",description:"Опис",keywords:"Ключові слова",success:"Успіх",error:"Помилка",successMessage:"Успішно",errorMessage:"Помилка",meta:"Мета",content:"Контент",actions:{add:"Додати",save:"Зберегти",cancel:"Скасувати",edit:"Редагувати",delete:"Видалити",create:"Створити",preview:"Перегляд",search:"Пошук",filter:"Фільтр",export:"Експорт",addField:"Додати поле",success:"Успіх",error:"Помилка",back:"Повернутися"},status:{published:"Опубліковано",draft:"Чернетка",archived:"Архівовано"},pagination:{showing:"Показано",to:"по",of:"з",results:"результатів",previous:"Попередня",next:"Наступна"}},auth:{title:"Увійти",email:"Електронна пошта",password:"Пароль",remember:"Пам'ятайте мене",submit:"Увійти",errors:{invalid:"Недійсний електронний лист або пароль",required:"{Поле} потрібно"}},table:{choose:"Оберіть колонки для відображення",columns:"Колонки",actions:"Дії",search:"Пошук",export:"Експорт",exportTitle:"Експорт таблиці",close:"Закрити",chooseColumns:"Виберіть стовпці таблиці для експорту:",selectAll:"Вибрати усі",selectCurrent:"Вибрати поточні",none:"Жодного",chooseFormat:"Виберіть формат таблиці:",cancel:"Скасувати",download:"Завантажити таблицю",time:{weeksAgo:"{count} тижнів тому",weekAgo:"1 тиждень тому",daysAgo:"{count} днів тому",dayAgo:"1 день тому",hoursAgo:"{count} годин тому",hourAgo:"1 година тому",minutesAgo:"{count} хвилин тому",minuteAgo:"1 хвилина тому",justNow:"щойно"},format:{json:"Формат json",csv:"Формат csv",xlsx:"Формат xlsx"}},filter:{search:"Пошук",more:"Показати більше",less:"Показати меньше",selected:"обрано",clear:"Очистити",apply:"Застосувати",from:"Від",period:"Період",today:"Сьогодні",week:"Тиждень",month:"Місяць",quarter:"Квартал",year:"Рік",alltime:"Весь час",prev:"Попередній період",next:"Настпуний період",to:"До",notfound:"Нічого не знайдено"},items:{title:"Предмети",add:"Додати елемент",count:"Немає предметів | ",created:`Елемент "{Ім'я}" створений`,deleted:"Елемент видалено"},errors:{network:"Помилка мережі. ",notFound:"Ми не змогли знайти те, що ви шукали."},toast:{saved:"Збережені зміни",copied:"Скопіювано в буфер обміну"},users:{title:"Користувачі",description:"Керування користувачами.",createUser:"Створити користувача",editUser:"Редагувати користувача",searchUsers:"Пошук користувачів...",createUserFailed:"Створити користувача не вдалося",createUserSuccess:"Користувача створено успішно",editUserFailed:"Редагувати користувача не вдалося",editUserSuccess:"Користувача редаговано успішно",deleteUserSuccess:"Користувача видалено успішно",deleteUserFailed:"Користувача видалено не вдалося",form:{name:"Назва",description:"Опис",color:"Колір",created_at:"Дата створення",count_data:"Кількість використань",topic:"Тема"}},fetchContentTypes:"fetchContentTypes",action:"action",delete:"delete","create-folder":"create-folder",formValues:"formValues",metaParentValue:"metaParentValue",blur:"blur","-":"-",noFilesInFolder:"noFilesInFolder",guide:{menu:"Посібник з меню",general:"Посібник",media:"Посібник з медіа",settings:"Посібник з налаштувань",users:"Посібник з користувачів",content:"Посібник з контенту",appOverview:"Посібник з огляду програми",collections:"Посібник з колекцій",help:"Допомога"}},Kk=Object.freeze(Object.defineProperty({__proto__:null,cms:Ls,default:{cms:Ls}},Symbol.toStringTag,{value:"Module"}));he.ArticlesPage=il,he.BuilderPage=Gp,he.CmsContentWrapper=e1,he.CollectionsPage=Qn,he.Dashboard=Xn,he.EditCollectionPage=rs,he.MenuAddPage=as,he.MenuItemPage=As,he.MenuPage=os,he.default=Xn,he.i18n=ar,he.initI18n=Gk,he.install=Yk,he.loadLocaleMessages=Wk,he.setLocale=Hk,Object.defineProperties(he,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|