@opengis/widgets 0.0.34 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3124 -3037
- package/dist/index.umd.cjs +38 -38
- package/dist/widgets/table/TableWidget.vue.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,151 +1,151 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(V,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@opengis/core")):typeof define=="function"&&define.amd?define(["exports","vue","@opengis/core"],e):(V=typeof globalThis<"u"?globalThis:V||self,e(V.WidgetLib={},V.Vue,V.OpenGISCore))})(this,(function(V,e,nt){"use strict";function Os(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,s.get?s:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const As=Os(e);/**
|
|
2
2
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const
|
|
6
|
+
*/const ro=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ls=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,o,s)=>s?s.toUpperCase():o.toLowerCase()),Is=t=>{const n=Ls(t);return n.charAt(0).toUpperCase()+n.slice(1)},Ms=(...t)=>t.filter((n,o,s)=>!!n&&n.trim()!==""&&s.indexOf(n)===o).join(" ").trim();/**
|
|
7
7
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var
|
|
11
|
+
*/var kt={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"};/**
|
|
12
12
|
* @license lucide-vue-next v0.535.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
|
|
16
|
+
*/const Ps=({size:t,strokeWidth:n=2,absoluteStrokeWidth:o,color:s,iconNode:r,name:l,class:i,...a},{slots:c})=>e.h("svg",{...kt,width:t||kt.width,height:t||kt.height,stroke:s||kt.stroke,"stroke-width":o?Number(n)*24/Number(t):n,class:Ms("lucide",...l?[`lucide-${ro(Is(l))}-icon`,`lucide-${ro(l)}`]:["lucide-icon"]),...a},[...r.map(p=>e.h(...p)),...c.default?[c.default()]:[]]);/**
|
|
17
17
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const
|
|
21
|
+
*/const Y=(t,n)=>(o,{slots:s})=>e.h(Ps,{...o,iconNode:n,name:t},s);/**
|
|
22
22
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const
|
|
26
|
+
*/const Rs=Y("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
|
|
27
27
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const
|
|
31
|
+
*/const Fs=Y("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
32
32
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const
|
|
36
|
+
*/const js=Y("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
37
37
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
40
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const
|
|
41
|
+
*/const io=Y("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);/**
|
|
42
42
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const
|
|
46
|
+
*/const zs=Y("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
47
47
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the ISC license.
|
|
50
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const
|
|
51
|
+
*/const Je=Y("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
52
52
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const
|
|
56
|
+
*/const Hs=Y("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
|
|
57
57
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const
|
|
61
|
+
*/const Us=Y("grid-3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
62
62
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const
|
|
66
|
+
*/const qs=Y("heart",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]);/**
|
|
67
67
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
68
68
|
*
|
|
69
69
|
* This source code is licensed under the ISC license.
|
|
70
70
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const
|
|
71
|
+
*/const Ws=Y("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
72
72
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
73
73
|
*
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const
|
|
76
|
+
*/const lo=Y("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
77
77
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const
|
|
81
|
+
*/const Ks=Y("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
82
82
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const
|
|
86
|
+
*/const ao=Y("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
87
87
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const
|
|
91
|
+
*/const Gs=Y("reply",[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]]);/**
|
|
92
92
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
96
|
+
*/const co=Y("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
97
97
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const
|
|
101
|
+
*/const Js=Y("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);/**
|
|
102
102
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const
|
|
106
|
+
*/const Zs=Y("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
|
|
107
107
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
108
108
|
*
|
|
109
109
|
* This source code is licensed under the ISC license.
|
|
110
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const
|
|
111
|
+
*/const nn=Y("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);/**
|
|
112
112
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
116
|
+
*/const Ys=Y("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);/**
|
|
117
117
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
120
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const
|
|
121
|
+
*/const on=Y("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
122
122
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const
|
|
126
|
+
*/const Xs=Y("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
|
|
127
127
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const sn=Q("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Jo={class:"border-t pt-3 mt-4"},Zo={class:"flex gap-2"},Yo={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Xo={class:"flex-1 space-y-2"},Qo={class:"flex justify-between items-center"},Vo={class:"flex gap-2"},er=["disabled"],is=e.defineComponent({__name:"CommentInputZone",props:{isReply:{type:Boolean,required:!1,default:!1},isReplyModifiers:{}},emits:e.mergeModels(["sendComment"],["update:isReply"]),setup(t,{emit:n}){const s=e.useModel(t,"isReply"),o=e.ref(""),r=n,l=()=>{o.value.trim()&&(r("sendComment",o.value),o.value="")},i=c=>{(c.ctrlKey||c.metaKey)&&c.key==="Enter"&&(c.preventDefault(),l())};return(c,d)=>(e.openBlock(),e.createElementBlock("div",Jo,[e.createElementVNode("div",Zo,[e.createElementVNode("span",Yo,[e.createVNode(e.unref(nn),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",Xo,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":d[0]||(d[0]=p=>o.value=p),onKeydown:i,placeholder:"Add a comment...",class:"w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"},null,544),[[e.vModelText,o.value]]),e.createElementVNode("div",Qo,[d[4]||(d[4]=e.createElementVNode("span",{class:"text-xs text-gray-500 hidden sm:inline"},"Cmd+Enter to send",-1)),e.createElementVNode("div",Vo,[s.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:d[1]||(d[1]=p=>s.value=!1)},[e.createVNode(e.unref(sn),{class:"h-3 w-3"}),d[2]||(d[2]=e.createTextVNode(" Cancel ",-1))])):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",disabled:!o.value.trim(),onClick:l},[e.createVNode(e.unref(rs),{class:"h-3 w-3 mr-1"}),d[3]||(d[3]=e.createTextVNode(" Send ",-1))],8,er)])])])])]))}}),tr={class:"z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md w-32 outline-none pointer-events-auto"},nr=e.defineComponent({__name:"CommentDetails",props:{showMoreOptions:{type:Boolean,required:!0,default:!1},showMoreOptionsModifiers:{}},emits:e.mergeModels(["edit","delete"],["update:showMoreOptions"]),setup(t,{emit:n}){const s=n,o=e.useModel(t,"showMoreOptions"),r=e.ref(),l=e.ref(!0),i=async p=>{o.value&&r.value&&!r.value.contains(p.target)&&!l.value&&(o.value=!1),l.value=!1},c=()=>{o.value=!1,s("edit")},d=()=>{o.value=!1,s("delete")};return e.onMounted(()=>{document.addEventListener("click",i)}),e.onUnmounted(()=>{document.removeEventListener("click",i)}),(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:"absolute bg-white left-0 top-full transform min-w-max z-50",ref_key:"moreOptionsRef",ref:r},[e.createElementVNode("div",tr,[e.createElementVNode("div",{class:"relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs hover:bg-gray-100 transition-colors duration-300",onClick:c},[e.createVNode(e.unref(Wo),{class:"h-3 w-3 mr-2"}),m[0]||(m[0]=e.createTextVNode(" Edit ",-1))]),e.createElementVNode("div",{class:"relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs text-red-600 hover:bg-gray-100 transition-colors duration-300",onClick:d},[e.createVNode(e.unref(tn),{class:"h-3 w-3 mr-2"}),m[1]||(m[1]=e.createTextVNode(" Delete ",-1))])])],512))}}),sr={class:"space-y-2"},or={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},rr={class:"flex-1 min-w-0 space-y-1 relative"},ir={class:"flex items-center gap-2"},lr={class:"font-medium text-xs"},ar={class:"text-xs text-gray-500"},cr={key:0,class:"text-xs text-gray-700 leading-relaxed"},dr={class:"flex justify-between text-xs"},pr={class:"flex items-center gap-2"},fr={key:0,class:"flex gap-2"},mr=["disabled"],ur={key:0,class:"ml-8 space-y-1 border-l-2 border-gray-100 pl-3"},hr=e.defineComponent({__name:"CommentItem",props:{comment:{},isInside:{type:Boolean}},emits:["like","reply","edit","delete"],setup(t,{emit:n}){const s=n,o=t,r=e.ref(o.comment.text),l=e.ref("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"),i=e.ref("w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"),c=e.ref(!1),d=e.ref(!1),p=e.ref(!1),m=e.ref(!1),f=E=>{const S=new Date,L=Math.floor((S.getTime()-E.getTime())/(1e3*60*60));return L<1?`${Math.floor((S.getTime()-E.getTime())/6e4)}m`:L<24?`${L}h`:`${Math.floor(L/24)}d`},h=()=>{m.value=!m.value,m.value?s("like",o.comment.id,"add"):s("like",o.comment.id,"delete")},y=()=>{s("edit",o.comment.id,r.value),p.value=!1},x=(E,S)=>{s("like",E,S)},_=(E,S)=>{s("edit",E,S)};return(E,S)=>{const L=e.resolveComponent("CommentItem",!0);return e.openBlock(),e.createElementBlock("div",sr,[e.createElementVNode("div",{class:e.normalizeClass(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative",p.value?"bg-gray-50":""])},[e.createElementVNode("span",or,[e.createVNode(e.unref(nn),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",rr,[e.createElementVNode("div",ir,[e.createElementVNode("span",lr,e.toDisplayString(E.comment?.author),1),e.createElementVNode("span",ar,e.toDisplayString(f(E.comment?.createdAt)),1)]),p.value?e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,"onUpdate:modelValue":S[0]||(S[0]=$=>r.value=$),class:e.normalizeClass(p.value?i.value:l.value)},null,2)),[[e.vModelText,r.value]]):(e.openBlock(),e.createElementBlock("p",cr,e.toDisplayString(E.comment?.text),1)),e.createElementVNode("div",dr,[e.createElementVNode("div",pr,[e.createElementVNode("button",{class:e.normalizeClass(["flex items-center gap-1",m.value?"text-blue-600":"text-gray-500 hover:text-blue-600 transition-colors"]),onClick:S[1]||(S[1]=$=>h())},[e.createVNode(e.unref(zo),{class:e.normalizeClass(["h-3 w-3",m.value?"fill-blue-600":""])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(E.comment?.likes),1)],2),E.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"text-gray-500 hover:text-blue-600 transition-colors",onClick:S[2]||(S[2]=$=>d.value=!0)},[e.createVNode(e.unref(Uo),{class:"h-3 w-3"})])),e.createElementVNode("button",{class:"text-gray-400 hover:text-gray-600 transition-colors opacity-0 group-hover:opacity-100",type:"button",onClick:S[3]||(S[3]=$=>c.value=!0)},[e.createVNode(e.unref(Po),{class:"h-3 w-3"})])]),p.value?(e.openBlock(),e.createElementBlock("div",fr,[e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:S[4]||(S[4]=$=>p.value=!1)},[e.createVNode(e.unref(sn),{class:"h-3 w-3"}),S[11]||(S[11]=e.createTextVNode(" Cancel ",-1))]),e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",disabled:!r.value.trim(),onClick:S[5]||(S[5]=$=>y())},[e.createVNode(e.unref(rs),{class:"h-3 w-3 mr-1"}),S[12]||(S[12]=e.createTextVNode(" Send ",-1))],8,mr)])):e.createCommentVNode("",!0)])]),c.value?(e.openBlock(),e.createBlock(nr,{key:0,showMoreOptions:c.value,"onUpdate:showMoreOptions":S[6]||(S[6]=$=>c.value=$),onEdit:S[7]||(S[7]=$=>p.value=!0),onDelete:S[8]||(S[8]=$=>E.$emit("delete",E.comment?.id)),comment:E.comment},null,8,["showMoreOptions","comment"])):e.createCommentVNode("",!0)],2),E.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ur,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.comment?.replies,$=>(e.openBlock(),e.createBlock(L,{key:$.id,comment:$,isInside:!0,onDelete:D=>E.$emit("delete",$.id),onLike:x,onEdit:_},null,8,["comment","onDelete"]))),128)),d.value&&!E.isInside?(e.openBlock(),e.createBlock(is,{key:0,onSendComment:S[9]||(S[9]=$=>E.$emit("reply",E.comment?.id,$)),isReply:d.value,"onUpdate:isReply":S[10]||(S[10]=$=>d.value=$)},null,8,["isReply"])):e.createCommentVNode("",!0)]))])}}}),gr=["id"],yr={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},kt=e.defineComponent({__name:"CommentsWidget",props:{title:{},comments:{},maxHeight:{},onAddComment:{type:Function},onReply:{type:Function},onLike:{type:Function},onDelete:{type:Function},onEdit:{type:Function},id:{},className:{},style:{}},emits:["add","reply","like","delete","edit"],setup(t,{emit:n}){const s=t,o=n,r=e.ref(s.comments??[]);async function l(){if(!s.id)return;const f=await fetch(`/api/widget/comment/${s.id}`).then(h=>h.json());r.value=f.rows.map(h=>({id:h.communication_id,author:h.username,text:h.body,createdAt:new Date(h.cdate)}))}r.value.length===0&&l();const i=async f=>{s.onAddComment?s.onAddComment(f):s.id&&(await fetch(`/api/widget/comment/${s.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:f})}),await l()),o("add",f)},c=(f,h)=>{s?.onLike?.(f,h),o("like",f,h)},d=(f,h)=>{s.onReply?.(f,h),o("reply",f,h)},p=async(f,h)=>{s.onEdit?s.onEdit(f,h):s.id&&(await fetch(`/api/widget/comment/${s.id}/${f}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:h})}),await l()),o("edit",f,h)},m=async f=>{s.onDelete?s.onDelete(f):s.id&&(await fetch(`/api/widget/comment/${s.id}/${f}`,{method:"DELETE"}),await l()),o("delete",f)};return(f,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mx-auto font-sans",f.className]),id:f.id,style:e.normalizeStyle(f.style)},[f.title?(e.openBlock(),e.createElementBlock("h3",yr,e.toDisplayString(f.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([f.maxHeight?"overflow-y-auto":"","space-y-3"]),style:e.normalizeStyle({maxHeight:f.maxHeight+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,y=>(e.openBlock(),e.createBlock(hr,{key:y.id,comment:y,onReply:d,onLike:c,onDelete:h[0]||(h[0]=x=>m(x)),onEdit:p},null,8,["comment"]))),128))],6),e.createVNode(is,{onSendComment:h[1]||(h[1]=y=>i(y))})],14,gr))}}),ls=new Map([["file",{name:"File",color:"bg-green-100 text-green-700 border-green-200",icon:Ke}],["post",{name:"Post",color:"bg-blue-100 text-blue-700 border-blue-200",icon:qo}],["user",{name:"User",color:"bg-purple-100 text-purple-700 border-purple-200",icon:Ko}],["custom",{name:"Custom",color:"bg-gray-100 text-gray-700 border-gray-200",icon:jo}]]),vr={class:"mx-auto font-sans"},br={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},kr={class:"relative"},Er={class:"space-y-3"},Nr={class:"flex-1 min-w-0 pb-2"},wr={class:"flex items-center gap-1.5 mb-1 mt-0.5"},xr={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},_r={class:"font-medium text-xs"},Cr={class:"text-xs text-gray-500"},Sr={class:"space-y-1"},Br={class:"text-xs text-gray-700"},$r={class:"capitalize mr-1"},Tr={key:0,class:"inline-flex items-center rounded-full border py-0.5 font-semibold transition-colors text-foreground text-xs h-4 px-1 capitalize"},Dr={key:0,class:"flex items-center gap-1 text-xs"},Or={key:0,class:"bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"},Ar={key:2,class:"bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"},Et=e.defineComponent({__name:"HistoryWidget",props:{data:{},title:{},maxHeight:{},id:{},className:{},style:{}},setup(t){const n=t,s=e.ref(Array.isArray(n.data)?n.data:[]);s.value.length===0&&n.id&&o();async function o(){const r=await fetch(`/api/widget/history/${n.id}`);if(!r.ok)return{data:[]};const l=await r.json();l.rows.forEach(i=>{i.timestamp=new Date(i.cdate),i.id=i.entity_id,i.entityType=i.entity_type,i.entityId=i.entity_id,i.action=i.change_type,i.userId=i.change_user_id,i.userName=i.username,i.timestamp=new Date(i.cdate),i.description=i.username,i.status=i.username}),s.value=l.rows}return(r,l)=>(e.openBlock(),e.createElementBlock("div",vr,[r.title?(e.openBlock(),e.createElementBlock("h3",br,e.toDisplayString(r.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(r.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:r.maxHeight+"px"})},[e.createElementVNode("div",kr,[l[0]||(l[0]=e.createElementVNode("div",{class:"absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200"},null,-1)),e.createElementVNode("div",Er,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,i=>(e.openBlock(),e.createElementBlock("div",{class:"relative flex items-start gap-2",key:i?.id},[e.createElementVNode("div",{class:e.normalizeClass(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${e.unref(ls).get(i?.entityType)?.color}`)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(ls).get(i?.entityType)?.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",Nr,[e.createElementVNode("div",wr,[e.createElementVNode("span",xr,[e.createVNode(e.unref(nn),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("span",_r,e.toDisplayString(i?.userName),1),e.createElementVNode("span",Cr,e.toDisplayString(i?.timestamp.toLocaleDateString("ua-UA",{day:"2-digit",month:"2-digit",year:"numeric"}))+" "+e.toDisplayString(i?.timestamp.toLocaleTimeString("ua-UA",{hour:"2-digit",minute:"2-digit"})),1)]),e.createElementVNode("div",Sr,[e.createElementVNode("div",Br,[e.createElementVNode("span",$r,e.toDisplayString(i?.action),1),i?.entityId?(e.openBlock(),e.createElementBlock("span",Tr,e.toDisplayString(i?.entityId),1)):e.createCommentVNode("",!0)]),i?.changes?.[i?.entityId]?(e.openBlock(),e.createElementBlock("div",Dr,[i?.changes?.[i?.entityId]?.old?(e.openBlock(),e.createElementBlock("span",Or,e.toDisplayString(i?.changes?.[i?.entityId]?.old),1)):e.createCommentVNode("",!0),i?.changes?.[i?.entityId]?.old&&i?.changes?.[i?.entityId]?.new?(e.openBlock(),e.createBlock(e.unref(Io),{key:1,class:"h-2 w-2 text-gray-400"})):e.createCommentVNode("",!0),i?.changes?.[i?.entityId]?.new?(e.openBlock(),e.createElementBlock("span",Ar,e.toDisplayString(i?.changes?.[i?.entityId]?.new),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])]))),128))])])],6)]))}}),Lr={key:0,class:"text-xl font-semibold"},Ir={class:"flex gap-1"},Mr={class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer"},Pr=e.defineComponent({__name:"FileHeader",props:e.mergeModels({title:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["onAddFile"],["update:modelValue"]),setup(t){const n=e.useModel(t,"modelValue"),s={active:"bg-blue-100 text-black hover:bg-blue-100",inactive:"bg-white text-black hover:bg-blue-100"};return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",o.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[o.title?(e.openBlock(),e.createElementBlock("h3",Lr,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Ir,[e.createElementVNode("button",{class:e.normalizeClass(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",n.value==="list"?s.active:s.inactive]),onClick:r[0]||(r[0]=l=>n.value="list")},[e.createVNode(e.unref(Ho),{class:"h-4 w-4"})],2),e.createElementVNode("button",{class:e.normalizeClass(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",n.value==="grid"?s.active:s.inactive]),onClick:r[1]||(r[1]=l=>n.value="grid")},[e.createVNode(e.unref(Fo),{class:"h-4 w-4"})],2),e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:r[2]||(r[2]=l=>o.$emit("onAddFile",l))},null,32),e.createElementVNode("div",Mr,[e.createVNode(e.unref(os),{class:"h-4 w-4"}),r[3]||(r[3]=e.createTextVNode(" Додати файл ",-1))])])])],2))}}),on={pdf:{color:"bg-red-100 text-red-700 border-red-200",icon:Ke,label:"PDF"},sketch:{color:"bg-gray-100 text-gray-700 border-gray-200",icon:Ro,label:"SKETCH"},mp4:{color:"bg-purple-100 text-purple-700 border-purple-200",icon:Go,label:"VIDEO"},docx:{color:"bg-blue-100 text-blue-700 border-blue-200",icon:Ke,label:"DOC"},zip:{color:"bg-orange-100 text-orange-700 border-orange-200",icon:Lo,label:"ARCHIVE"},png:{color:"bg-green-100 text-green-700 border-green-200",icon:ss,label:"IMAGE"},jpg:{color:"bg-green-100 text-green-700 border-green-200",icon:ss,label:"IMAGE"},xlsx:{color:"bg-emerald-100 text-emerald-700 border-emerald-200",icon:Ke,label:"EXCEL"},pptx:{color:"bg-amber-100 text-amber-700 border-amber-200",icon:Ke,label:"PPT"}};function as(t,n="en"){const s={month:"short",day:"numeric"};return new Intl.DateTimeFormat(n,s).format(t)}function cs(t){if(t===0)return"0 B";const n=1024,s=["B","KB","MB","GB","TB"],o=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,o)).toFixed(1))} ${s[o]}`}const Rr={class:"space-y-0.5"},Fr=["onClick"],zr=["onClick"],jr={class:"flex items-center gap-2"},Hr={class:"font-medium text-xs truncate hover:text-blue-600 cursor-pointer"},Ur={class:"hidden sm:block text-xs text-gray-500 w-16 text-right"},qr={class:"hidden md:block text-xs text-gray-500 w-12 text-right"},Wr={class:"flex items-center gap-1"},Kr=["onClick"],Gr=["onClick"],Jr=e.defineComponent({__name:"FileList",props:{files:{}},emits:["delete","download","openLightbox"],setup(t){return(n,s)=>(e.openBlock(),e.createElementBlock("div",Rr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.files,o=>(e.openBlock(),e.createElementBlock("div",{class:"flex items-center gap-2 p-1.5 rounded hover:bg-gray-50 group border-b border-gray-100 last:border-b-0",key:o.id,onClick:e.withModifiers(r=>n.$emit("openLightbox",o),["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(["p-1 rounded",e.unref(on)[o?.ext]?.color||"bg-blue-100 text-blue-700 border-blue-200"])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(on)[o?.ext]?.icon||e.unref(on).pdf.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",{class:"flex-1 min-w-0",onClick:r=>n.$emit("openLightbox",o)},[e.createElementVNode("div",jr,[e.createElementVNode("span",Hr,e.toDisplayString(o?.uploaded_name||o?.name),1)])],8,zr),e.createElementVNode("div",Ur,e.toDisplayString(e.unref(cs)(o.size)),1),e.createElementVNode("div",qr,e.toDisplayString(e.unref(as)(o.createdAt)),1),e.createElementVNode("div",Wr,[e.createElementVNode("button",{onClick:e.withModifiers(r=>n.$emit("download",o),["stop"]),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity"},[e.createVNode(e.unref(ns),{class:"h-3 w-3"})],8,Kr),e.createElementVNode("button",{class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700",onClick:e.withModifiers(r=>n.$emit("delete",r,o?.file_id),["stop"])},[e.createVNode(e.unref(tn),{class:"h-3 w-3"})],8,Gr)])],8,Fr))),128))]))}}),Zr={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3"},Yr=["onClick"],Xr={class:"space-y-2"},Qr={class:"flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden"},Vr=["src"],ei={class:"space-y-1"},ti=["title"],ni={class:"text-xs text-gray-500 text-left"},si={class:"absolute top-2 right-1 flex items-center gap-1"},oi=["onClick"],ri=["onClick"],ii=e.defineComponent({__name:"FileGrid",props:{files:{}},emits:["delete","download","openLightbox"],setup(t){return(n,s)=>(e.openBlock(),e.createElementBlock("div",Zr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.files,o=>(e.openBlock(),e.createElementBlock("div",{key:o.id,onClick:e.withModifiers(r=>n.$emit("openLightbox",o),["stop"]),class:"group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"},[e.createElementVNode("div",Xr,[e.createElementVNode("div",Qr,[o.ext==="png"||o.ext==="jpg"||o.ext==="jpeg"||o.ext==="gif"||o.ext==="svg"||o.ext==="webp"?(e.openBlock(),e.createElementBlock("img",{key:0,src:`/file/resize?filepath=${o?.file_path}&w=500`,alt:"file",class:"w-full h-full object-cover"},null,8,Vr)):(e.openBlock(),e.createBlock(e.unref(Ke),{key:1,class:"h-10 w-10 text-gray-500"}))]),e.createElementVNode("div",ei,[e.createElementVNode("h3",{class:"font-medium text-xs leading-tight text-left",title:o.uploaded_name||o.name},e.toDisplayString(o.uploaded_name||o.name),9,ti),e.createElementVNode("p",ni,e.toDisplayString(e.unref(as)(o.createdAt))+", "+e.toDisplayString(e.unref(cs)(o.size)),1)])]),e.createElementVNode("div",si,[e.createElementVNode("button",{onClick:e.withModifiers(r=>n.$emit("download",o),["stop"]),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50"},[e.createVNode(e.unref(ns),{class:"h-3 w-3"})],8,oi),e.createElementVNode("button",{class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700 hover:bg-red-50",onClick:e.withModifiers(r=>n.$emit("delete",r,o?.file_id),["stop"])},[e.createVNode(e.unref(tn),{class:"h-3 w-3"})],8,ri)])],8,Yr))),128))]))}}),li={class:"mx-auto font-sans"},ai={key:1},Nt=e.defineComponent({__name:"FilesWidget",props:{title:{},view:{},files:{default:()=>[]},maxHeight:{},onAddFile:{},id:{},className:{},style:{},onDelete:{}},emits:["delete","add","openLightbox"],setup(t,{emit:n}){const s=t,o=e.ref(!1),r=e.ref(null),l=e.ref(!1),i=e.ref(0),c=e.ref(s.files??[]),d=n;c.value.length===0&&S();const p=(D,B)=>{r.value=B,o.value=!0},m=()=>{r.value&&(x(r.value),r.value=null,o.value=!1)},f=e.computed(()=>Array.isArray(c.value)?c.value.map(D=>D?.file_path):[]),h=D=>{const B=f.value.findIndex(q=>q===D.file_path);B!==-1&&(l.value=!0,i.value=B)},y=D=>{s.onAddFile?s.onAddFile(D):L(D),d("add",D)},x=D=>{s.onDelete?s.onDelete(D):$(D),d("delete",D)},_=D=>{const B=document.createElement("a");B.setAttribute("download",D?.uploaded_name||D?.name),B.href=D?.file_path||D?.path,B.click()},E=e.ref("list");async function S(){if(!s.id)return;const D=await fetch(`/api/widget/file/${s.id}`).then(B=>B.json());D.rows.forEach(B=>{B.timestamp=new Date(B.cdate),B.id=B.entity_id,B.entityType=B.entity_type,B.entityId=B.entity_id,B.entityType=B.entity_type,B.action=B.change_type,B.userId=B.change_user_id,B.userName=B.username,B.timestamp=new Date(B.cdate),B.description=B.username,B.status=B.username}),c.value=D.rows}const L=async D=>{if(!(!D.target||!D.target.files||D.target.files.length===0))try{await Promise.all(Array.from(D.target.files).map(async B=>{const q=new FormData;q.append("file",B);const ee=`/api/widget/file/${s.id}`,M=await fetch(ee,{method:"POST",body:q});if(!M.ok)throw new Error(`HTTP error! status: ${M.status}`);return B})),await S()}catch(B){console.error("Помилка при завантаженні файлів:",B)}},$=async D=>{try{await fetch(`/api/widget/file/${s.id}/${D}`,{method:"DELETE"}),await S()}catch(B){console.error(B)}};return(D,B)=>{const q=e.resolveComponent("MessageBox"),ee=e.resolveComponent("Lightbox");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",li,[e.createVNode(Pr,{modelValue:E.value,"onUpdate:modelValue":B[0]||(B[0]=M=>E.value=M),title:s.title,onOnAddFile:B[1]||(B[1]=M=>y(M))},null,8,["modelValue","title"]),c.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(D.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:D.maxHeight+"px"})},[E.value==="list"?(e.openBlock(),e.createBlock(Jr,{key:0,onDelete:p,onDownload:_,onOpenLightbox:B[2]||(B[2]=M=>h(M)),files:c.value},null,8,["files"])):e.createCommentVNode("",!0),E.value==="grid"?(e.openBlock(),e.createBlock(ii,{key:1,onDelete:p,onDownload:_,onOpenLightbox:B[3]||(B[3]=M=>h(M)),files:c.value},null,8,["files"])):e.createCommentVNode("",!0)],6)):(e.openBlock(),e.createElementBlock("div",ai,B[6]||(B[6]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Файлів не знайдено")],-1)])))]),e.createVNode(q,{modelValue:o.value,"onUpdate:modelValue":B[4]||(B[4]=M=>o.value=M),onConfirm:m,title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати"},null,8,["modelValue"]),e.createVNode(ee,{modelValue:l.value,"onUpdate:modelValue":B[5]||(B[5]=M=>l.value=M),images:f.value,"start-index":i.value},null,8,["modelValue","images","start-index"])],64)}}}),ci={key:0,class:"image-wrapper h-full max-h-[400px]",id:"lightbox-gallery"},di=["onClick"],pi={key:0,rel:"noreferrer",class:"relative block h-full w-full"},fi=["src"],mi={key:0,class:"thumb-cover"},ui=e.defineComponent({__name:"GalleryContent",props:{title:{},items:{},columns:{},maxHeight:{},onAddImage:{type:Function},onDelete:{type:Function},id:{},className:{},style:{}},emits:["delete"],setup(t,{emit:n}){const s=n,o=e.ref(!1),r=e.ref(0),l=t,i=e.computed(()=>Array.isArray(l.items)?l.items.map(d=>d?.file_path):[]),c=d=>{const p=i.value.findIndex(m=>m===d.file_path);p!==-1&&(o.value=!0,r.value=p)};return(d,p)=>{const m=e.resolveComponent("Lightbox");return d.items?.length>=1?(e.openBlock(),e.createElementBlock("div",ci,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.items,(f,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["h-full w-full image"+h,"cursor-pointer bg-teal-500 rounded-[3px]"]),key:h,onClick:e.withModifiers(y=>c(f),["stop"])},[h<5?(e.openBlock(),e.createElementBlock("div",pi,[e.createElementVNode("img",{src:`/file/resize?filepath=${f?.file_path}&w=500`,alt:"alt",height:"auto",width:"100%",class:e.normalizeClass(["object-cover h-full w-full bg-gray-200 rounded-[3px]",h===0?"max-h-[411px]":"max-h-[calc((411px-3px)/2)]"])},null,10,fi),h===4&&d.items?.length>5?(e.openBlock(),e.createElementBlock("div",mi," +"+e.toDisplayString(d.items?.length-5),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,di))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Math.max(0,5-d.items.length),f=>(e.openBlock(),e.createElementBlock("div",{key:"empty-"+f,class:e.normalizeClass(["h-full w-full image"+(d.items.length+f-1),"bg-gray-300 rounded-[3px]"])},null,2))),128)),e.createVNode(m,{modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=f=>o.value=f),images:i.value,"start-index":r.value,delete:"true",download:"true",onDelete:p[1]||(p[1]=f=>s("delete",f))},null,8,["modelValue","images","start-index"])])):e.createCommentVNode("",!0)}}}),hi={key:0,class:"text-xl font-semibold"},gi={class:"flex gap-1"},yi={class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer"},vi=e.defineComponent({__name:"widgetHeader",props:{title:{}},emits:["onAddImage"],setup(t){return(n,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",n.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[n.title?(e.openBlock(),e.createElementBlock("h3",hi,e.toDisplayString(n.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",gi,[e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:s[0]||(s[0]=o=>n.$emit("onAddImage",o))},null,32),e.createElementVNode("div",yi,[e.createVNode(e.unref(os),{class:"h-4 w-4"}),s[1]||(s[1]=e.createTextVNode(" Додати зображення ",-1))])])])],2))}}),bi={class:"w-full mx-auto font-sans",ref:"containerRef"},ki={key:1},wt=e.defineComponent({__name:"GalleryWidget",props:{title:{},items:{default:()=>[]},columns:{},maxHeight:{},onAddImage:{},onDelete:{},id:{},className:{},style:{}},emits:["delete","add","openLightbox"],setup(t,{emit:n}){const s=t,o=e.ref(s.items??[]),r=n;o.value.length===0&&d();const l=m=>{s.onAddImage?s.onAddImage(m):c(m),r("add",m)},i=m=>{const f=o.value.find(h=>h.file_path===m)?.file_id;f&&(s.onDelete?s.onDelete(f):p(f))},c=async m=>{if(!(!m.target||!m.target.files||m.target.files.length===0))try{await Promise.all(Array.from(m.target.files).map(async f=>{const h=new FormData;h.append("file",f);const y=`/api/widget/file/${s.id}`,x=await fetch(y,{method:"POST",body:h});if(!x.ok)throw new Error(`HTTP error! status: ${x.status}`);return f})),await d()}catch(f){console.error("Помилка при завантаженні файлів:",f)}};async function d(){if(!s.id)return;const m=await fetch(`/api/widget/file/${s.id}`).then(f=>f.json());o.value=m.rows}const p=async m=>{try{await fetch(`/api/widget/file/${s.id}/${m}`,{method:"DELETE"}),await d()}catch(f){console.error(f)}};return(m,f)=>(e.openBlock(),e.createElementBlock("div",bi,[e.createVNode(vi,{title:m.title,onOnAddImage:f[0]||(f[0]=h=>l(h))},null,8,["title"]),o.value.length>0?(e.openBlock(),e.createBlock(ui,{key:0,items:o.value,onDelete:f[1]||(f[1]=h=>i(h))},null,8,["items"])):(e.openBlock(),e.createElementBlock("div",ki,f[2]||(f[2]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Зображень не знайдено")],-1)])))],512))}}),Ei={class:"text-value"},Ni={class:"text-sm text-gray-900"},wi=e.defineComponent({__name:"TextValue",props:{item:{}},setup(t){const n=t,s=e.computed(()=>{const o=n.item.value;return typeof o=="boolean"?o?"Так":"Ні":o==null?"—":String(o)});return(o,r)=>(e.openBlock(),e.createElementBlock("div",Ei,[e.createElementVNode("span",Ni,e.toDisplayString(s.value),1)]))}}),Me=(t,n)=>{const s=t.__vccOpts||t;for(const[o,r]of n)s[o]=r;return s},xi=Me(wi,[["__scopeId","data-v-34a76c89"]]),_i={class:"link-value"},Ci=["href"],Si=Me(e.defineComponent({__name:"LinkValue",props:{item:{}},setup(t){const n=t,s=e.computed(()=>{const o=String(n.item.value);try{const r=new URL(o);return r.hostname+r.pathname}catch{return o}});return(o,r)=>(e.openBlock(),e.createElementBlock("div",_i,[e.createElementVNode("a",{href:String(o.item.value),target:"_blank",rel:"noopener noreferrer",class:"text-blue-600 hover:text-blue-800 underline text-sm"},[e.createTextVNode(e.toDisplayString(s.value)+" ",1),r[0]||(r[0]=e.createElementVNode("i",{class:"fas fa-external-link-alt ml-1 text-xs"},null,-1))],8,Ci)]))}}),[["__scopeId","data-v-932f028c"]]),Bi={class:"date-value"},$i={class:"text-sm text-gray-900"},Ti=Me(e.defineComponent({__name:"DateValue",props:{item:{}},setup(t){const n=t,s=e.computed(()=>{const o=n.item.value;if(o instanceof Date)return o.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});if(typeof o=="string"){const r=new Date(o);if(!isNaN(r.getTime()))return r.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}return String(o)});return(o,r)=>(e.openBlock(),e.createElementBlock("div",Bi,[e.createElementVNode("span",$i,e.toDisplayString(s.value),1)]))}}),[["__scopeId","data-v-cd4df08e"]]),Di={class:"status-value"},Oi={key:0,class:"mr-1"},Ai=Me(e.defineComponent({__name:"StatusValue",props:{item:{}},setup(t){const n=t,s=e.computed(()=>{switch(String(n.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"bg-green-100 text-green-800";case"inactive":case"неактивний":case"pending":case"очікує":return"bg-yellow-100 text-yellow-800";case"error":case"помилка":case"failed":case"неуспішно":return"bg-red-100 text-red-800";case"draft":case"чернетка":return"bg-gray-100 text-gray-800";default:return"bg-blue-100 text-blue-800"}}),o=e.computed(()=>{switch(String(n.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"fas fa-check-circle";case"inactive":case"неактивний":case"pending":case"очікує":return"fas fa-clock";case"error":case"помилка":case"failed":case"неуспішно":return"fas fa-exclamation-circle";case"draft":case"чернетка":return"fas fa-edit";default:return"fas fa-info-circle"}});return(r,l)=>(e.openBlock(),e.createElementBlock("div",Di,[e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",s.value])},[o.value?(e.openBlock(),e.createElementBlock("span",Oi,[e.createElementVNode("i",{class:e.normalizeClass(o.value)},null,2)])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(String(r.item.value)),1)],2)]))}}),[["__scopeId","data-v-aea1f529"]]),Li={class:"custom-value"},Ii={class:"text-sm text-gray-900"},Mi=Me(e.defineComponent({__name:"CustomValue",props:{item:{}},setup(t){return(n,s)=>(e.openBlock(),e.createElementBlock("div",Li,[e.renderSlot(n.$slots,"default",{item:n.item,value:n.item.value},()=>[e.createElementVNode("span",Ii,e.toDisplayString(String(n.item.value)),1)],!0)]))}}),[["__scopeId","data-v-12c8b3f3"]]),Pi=["id"],Ri={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Fi={key:1,class:"overflow-x-auto"},zi={class:"min-w-full divide-y divide-gray-200"},ji={class:"bg-white divide-y divide-gray-200"},Hi={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},Ui={class:"flex items-center gap-2"},qi=["title"],Wi={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},Ki={key:2,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},Gi={class:"flex items-start gap-3"},Ji={key:0,class:"flex-shrink-0"},Zi={class:"flex-1 min-w-0"},Yi={class:"flex items-center gap-2 mb-2"},Xi={class:"text-sm font-medium text-gray-900"},Qi=["title"],Vi={key:3,class:"overflow-x-auto"},el={class:"min-w-full divide-y divide-gray-200"},tl={class:"bg-white divide-y divide-gray-200"},nl={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},sl={class:"flex items-center gap-2"},ol=["title"],rl={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},rn=Me(e.defineComponent({__name:"DescriptionListWidget",props:{title:{},items:{},view:{},id:{},className:{},style:{}},setup(t){const n=s=>{switch(s.type){case"link":return Si;case"date":return Ti;case"status":return Ai;case"custom":return Mi;default:return xi}};return(s,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["description-list-widget",s.className]),id:s.id,style:e.normalizeStyle(s.style)},[s.title?(e.openBlock(),e.createElementBlock("h3",Ri,e.toDisplayString(s.title),1)):e.createCommentVNode("",!0),s.view==="table"?(e.openBlock(),e.createElementBlock("div",Fi,[e.createElementVNode("table",zi,[e.createElementVNode("tbody",ji,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.id||r.label},[e.createElementVNode("td",Hi,[e.createElementVNode("div",Ui,[r.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([r.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.label)+" ",1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:r.tooltip},o[0]||(o[0]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,qi)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",Wi,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])]))),128))])])])):s.view==="grid"?(e.openBlock(),e.createElementBlock("div",Ki,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,r=>(e.openBlock(),e.createElementBlock("div",{key:r.id||r.label,class:"description-item-card bg-white border border-gray-200 rounded-lg p-4"},[e.createElementVNode("div",Gi,[r.icon?(e.openBlock(),e.createElementBlock("div",Ji,[e.createElementVNode("i",{class:e.normalizeClass([r.icon,"text-gray-500 text-lg"])},null,2)])):e.createCommentVNode("",!0),e.createElementVNode("div",Zi,[e.createElementVNode("div",Yi,[e.createElementVNode("h4",Xi,e.toDisplayString(r.label),1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:0,class:"text-gray-400 cursor-help",title:r.tooltip},o[1]||(o[1]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,Qi)):e.createCommentVNode("",!0)]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])])]))),128))])):(e.openBlock(),e.createElementBlock("div",Vi,[e.createElementVNode("table",el,[e.createElementVNode("tbody",tl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.id||r.label},[e.createElementVNode("td",nl,[e.createElementVNode("div",sl,[r.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([r.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.label)+" ",1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:r.tooltip},o[2]||(o[2]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,ol)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",rl,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])]))),128))])])]))],14,Pi))}}),[["__scopeId","data-v-106790ef"]]),il={draw:{toolbar:{actions:{title:"Скасувати малювання",text:"Скасувати"},finish:{title:"Завершити малювання",text:"Завершити"},undo:{title:"Видалити останню точку",text:"Видалити останню"},buttons:{polyline:"Намалювати лінію",polygon:"Намалювати полігон",rectangle:"Намалювати прямокутник",circle:"Намалювати коло",marker:"Додати точку",circlemarker:"Додати маркер-коло"}},handlers:{circle:{tooltip:{start:"Клацніть і тягніть, щоб намалювати коло",end:"Відпустіть кнопку миші, щоб завершити"},radius:"Радіус"},circlemarker:{tooltip:{start:"Клацніть на карту, щоб додати маркер-коло"}},marker:{tooltip:{start:"Клацніть на карту, щоб додати точку"}},polygon:{tooltip:{start:"Клацніть, щоб почати малювати полігон",cont:"Клацайте, щоб продовжити малювати полігон",end:"Клацніть першу точку, щоб завершити полігон"}},polyline:{error:"<strong>Помилка:</strong> лінія не може перетинатися сама з собою",tooltip:{start:"Клацніть, щоб почати малювати лінію",cont:"Клацайте, щоб продовжити малювати лінію",end:"Клацніть останню точку, щоб завершити лінію"}},rectangle:{tooltip:{start:"Клацніть і тягніть, щоб намалювати прямокутник",end:"Відпустіть кнопку миші, щоб завершити"}},simpleshape:{tooltip:{end:"Відпустіть кнопку миші, щоб завершити"}}}},edit:{toolbar:{actions:{save:{title:"Зберегти зміни",text:"Зберегти"},cancel:{title:"Скасувати редагування",text:"Скасувати"},clearAll:{title:"Очистити всі шари",text:"Очистити все"}},buttons:{edit:"Редагувати шари",editDisabled:"Немає шарів для редагування",remove:"Видалити шари",removeDisabled:"Немає шарів для видалення"}},handlers:{edit:{tooltip:{text:"Перетягніть маркери, щоб редагувати шари",subtext:"Натисніть 'Скасувати', щоб повернутися"}},remove:{tooltip:{text:"Клацніть на шари, щоб видалити їх"}}}}};function ds(t){return t?t.type==="FeatureCollection"||t.type==="Feature"?t:t.geom?{type:"Feature",geometry:{type:t.geom.type,coordinates:t.geom.coordinates},properties:{}}:t.type&&t.coordinates?{type:"Feature",geometry:t,properties:{}}:null:null}const ll={key:0,class:"absolute inset-0 z-[600] flex items-center justify-center pointer-events-none bg-black/20"},al={class:"bg-black/70 text-white text-xs sm:text-sm px-4 py-2 rounded-md shadow"},cl={class:"bg-white/95 border border-gray-200 rounded-md shadow-xl px-3 py-2 max-w-[240px] text-[11px] sm:text-xs text-gray-900"},dl={class:"space-y-0.5"},pl={class:"text-gray-500"},fl={class:"text-gray-900 text-right break-all"},ml={key:2,class:"absolute bottom-3 left-3 z-[400] bg-white/90 border border-gray-200 rounded-md shadow px-3 py-2 text-[11px] sm:text-xs space-y-1 max-w-[220px]"},ul={class:"leading-tight"},hl={key:4,class:"bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"},gl={class:"flex items-center justify-between p-2 border-b"},yl={class:"p-2 border-b"},vl={class:"flex items-center"},bl=["value"],kl={class:"ml-2"},El={class:"p-2"},Nl={class:"flex items-center"},wl=["checked","onChange"],xl={class:"ml-2"},xt=e.defineComponent({__name:"MapWidget",props:{pattern:{},geom:{},id:{},katottg:{},tms:{},layers:{},title:{},height:{},bounds:{},legend:{}},setup(t){function n(a){let u=a?.parent??null;for(;u;){const v=u.props?.view;if(v==="tabs"||v==="vertical-tabs")return!0;u=u.parent??null}return!1}const s=t,o=e.getCurrentInstance(),r=e.inject("vsCardTabsContext",!1),l=e.computed(()=>(typeof r=="boolean"?r:r.value)?!0:n(o)),i=o?.appContext.config.globalProperties?.$settings??{},c=(()=>{const a=Array.isArray(i.center)?i.center:[],u=Number(a[0]),v=Number(a[1]);return Number.isFinite(u)&&Number.isFinite(v)?[u,v]:[50,30]})(),d=o?.uid??Math.floor(Math.random()*1e4),p=e.ref(null);let m,f,h,y;const x=ke(),_=e.ref(Object.keys(x)[0]),E=`base-layer-${d}`;let S;const L=e.ref(!0),$=e.ref(!1),D=e.ref(!1),B=e.ref(!1),q=e.ref("Використовуйте Ctrl + колесо миші для зміни масштабу");let ee=null;const M=e.ref([]),I=e.reactive({}),H=e.ref([]),j=e.computed(()=>H.value.map(a=>I[a]).filter(Boolean)),g=e.ref(null),T=e.computed(()=>g.value?.entries??[]),k=e.computed(()=>{if(!g.value)return;const a=12,u=g.value.point.x+a,v=g.value.point.y+a;return{left:`${u}px`,top:`${v}px`}}),O=e.computed(()=>Array.isArray(s.legend)?s.legend.map((a,u)=>{const v=typeof a?.color=="string"?a.color.trim():"",b=typeof a?.label=="string"?a.label.trim():"";return!v||!b?null:{color:v,label:b,key:`${b}-${u}`}}).filter(a=>!!a):[]),Y=e.computed(()=>{if($.value)return"fixed inset-0 w-screen h-screen z-[9999] bg-white";const a=["relative","h-full"];return s.height||a.push("min-h-[300px]"),s.title&&!l.value&&a.push("pb-[3.25rem]"),a.join(" ")}),ce=e.computed(()=>$.value||s.height==null?void 0:{height:typeof s.height=="number"?`${s.height}px`:String(s.height)}),Ie=e.computed(()=>{const a=["w-full","h-full"];return!s.height&&!$.value&&a.push("min-h-[300px]"),a.join(" ")});async function Be(){const a=b=>{if(!Array.from(document.styleSheets??[]).some(P=>P?.href?.includes(b))){const P=document.createElement("link");P.rel="stylesheet",P.href=b,document.head.appendChild(P)}};a("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),a("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css");const u=b=>new Promise((A,P)=>{if(Array.from(document.scripts??[]).some(G=>G.src===b))return A();const W=document.createElement("script");W.src=b,W.async=!0,W.onload=()=>A(),W.onerror=G=>P(G),document.body.appendChild(W)});return await u("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").catch(()=>{}),await u("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js").catch(()=>{}),await u("https://unpkg.com/leaflet.vectorgrid@1.3.0/dist/Leaflet.VectorGrid.bundled.js").catch(()=>{}),window.L}function ke(){const a=u=>u.map((v,b)=>{const A=typeof v?.key=="string"&&v.key?v.key:`b${b}`,P=we(v?.url);return P?{...v,key:A,url:P}:null}).filter(v=>!!v).reduce((v,b)=>({...v,[b.key]:b}),{});return Array.isArray(i?.basemaps)&&i.basemaps.length?a(i.basemaps):a([{key:"topo100",url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"},{key:"orto10",url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png"},{key:"osmb",url:"https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"}])}function we(a){if(typeof a!="string"||!a.trim())return"";const u=a.trim();if(/^https?:\/\//i.test(u))return u;const v=window.location?.origin??"",b=u.replace(/^\/+/,"");return v?`${v}/${b}`:`/${b}`}function xe(a,u){return a?.id!=null?String(a.id):a?.url?`${a.url}-${u}`:`layer-${u}`}function Gn(a){if(!a||typeof a!="object")return;const u={},v=R=>{if(typeof R=="string"){const z=R.trim().replace(/,+$/,"");return z?/^-?\d+(\.\d+)?$/.test(z)?Number(z):z:void 0}return R},b=()=>(u.colorSet||(u.colorSet={}),u.colorSet),A=(R,z)=>{if(R==null||typeof z!="string")return;const W=z.trim().replace(/,+$/,"");W&&(b()[String(R)]=W)},P=R=>{const z=["color","fill","hex","valueColor","value_color"].map(G=>R[G]).find(G=>typeof G=="string"&&G.trim());if(!z)return!1;const W=["value","key","id","code","status"].map(G=>R[G]).find(G=>G!=null&&G!=="");return W==null?!1:(A(W,z),!0)};return Object.entries(a).forEach(([R,z])=>{if(R==="colorSet"&&z!=null){Array.isArray(z)?z.forEach(G=>{G&&(typeof G=="object"&&P(G)||typeof G=="object"&&Object.entries(G).forEach(([en,So])=>A(en,typeof So=="string"?So:void 0)))}):typeof z=="object"&&(P(z)||Object.entries(z).forEach(([G,en])=>A(G,typeof en=="string"?en:void 0)));return}const W=v(z);if(W!==void 0){if(R==="border"){typeof W=="number"&&u.width==null?u.width=W:typeof W=="string"&&u.stroke==null&&(u.stroke=W);return}u[R]=W}}),u.colorSet&&!Object.keys(u.colorSet).length&&delete u.colorSet,Object.keys(u).length?u:void 0}function Jn(){if(Array.isArray(s.layers)&&s.layers.length)return s.layers.map((u,v)=>{if(!u)return null;const b=xe(u,v),A=u.url||(s.pattern&&b?s.pattern.replace("{{id}}",String(u.id??b)):"");return A?{...u,id:b,url:A,name:u.name||`Шар ${v+1}`,style:Gn(u.style)}:null}).filter(u=>!!u?.url);const a=Array.isArray(s.tms)?s.tms:s.tms?.split(",");return a?a.map((u,v)=>{if(!u)return null;const b=typeof u=="string"?u.trim():`${u}`;if(!b)return null;const A=`legacy-${v}`,P=s.pattern?s.pattern.replace("{{id}}",b):b;return{id:A,name:`Шар ${v+1}`,url:P,visible:!0}}).filter(u=>!!u?.url):[]}function qe(a){const u=(a?.url??"").trim();if(!u)return"";if(/^https?:\/\//i.test(u))return u;const v=window.location?.origin??"",b=u.replace(/^\/+/,"");return`${v}/${b}`}function Gt(a){const u=a.style??{};return v=>{const b=u.colorAttr,A=u.colorSet??{},P=typeof b=="string"?A?.[v?.[b]]??u.color??"#3388ff":u.color??"#3388ff",R=u.stroke??P;return{weight:u.width??1,color:R,opacity:u.opacity??1,fill:u.type?u.type!=="polyline":!0,fillColor:P,fillOpacity:u.opacity??.5}}}function Jt(a,u){if(!m||!u?.latlng||a.popup===!1)return;const v=m.latLngToContainerPoint(u.latlng),b=Zt(u),A=Yt(a,b);if(!A.length){We(a.id);return}g.value={layerId:a.id,title:b?.name??a.name,properties:b,entries:A,point:{x:v.x,y:v.y}}}function We(a){a&&g.value?.layerId!==a||(g.value=null)}function Zt(a){return a?.layer?.properties||a?.layer?.feature?.properties||a?.properties||a?.data||{}}function Yt(a,u={}){const v=b=>b==null||b===""?"—":typeof b=="object"?JSON.stringify(b):String(b);return a.popup&&Array.isArray(a.popup)&&a.popup.length?a.popup.map(b=>({label:b.label||b.field,value:v(u?.[b.field])})):Object.entries(u).map(([b,A])=>({label:b,value:v(A)}))}function Zn(a,u){if(!m||a.popup===!1||!u?.latlng)return;const v=Zt(u),b=Yt(a,v);if(!b.length)return;const A=['<div class="map-popup">'];A.push('<div class="map-popup__body">'),b.forEach(P=>{A.push(`<div class="map-popup__row"><span class="map-popup__label">${P.label}: </span><span class="map-popup__value">${P.value}</span></div>`)}),A.push("</div></div>"),y.popup({maxWidth:360}).setLatLng(u.latlng).setContent(A.join("")).openOn(m)}e.onMounted(async()=>{y=await Be(),y.drawLocal={...il};const a=typeof i?.zoom=="number"&&Number.isFinite(i.zoom)?i.zoom:10;m=y.map(p.value,{zoomControl:!1}).setView(c,a),y.control.zoom({position:"bottomright"}).addTo(m),S=y.tileLayer(x[_.value].url,{maxZoom:19}).addTo(m),f=new y.FeatureGroup().addTo(m),vt(),et(),ee=C();const u=ds(s.geom);if(u){const v=[];y.geoJSON(u).eachLayer(b=>v.push(b)),v.length&&f.addLayer(v[0]),w()}if(p.value){const v=new ResizeObserver(()=>{m&&m.invalidateSize()});v.observe(p.value),e.onBeforeUnmount(()=>{v.disconnect()})}});function Yn(){if(!f)return;f.clearLayers();const a=ds(s.geom);if(!a)return;const u=[];y.geoJSON(a).eachLayer(v=>u.push(v)),u.length&&(u.forEach(v=>f.addLayer(v)),w())}e.onBeforeUnmount(()=>{ee?.(),Vn(),h&&m?.hasLayer(h)&&m.removeLayer(h)});function Xn(a){const u=(a?.service??"").toLowerCase();if(u)return u;const v=(a?.url??"").toLowerCase();return/\.(mvt|pbf|vtile|vmt)(\?|$)/.test(v)?"vtile":/service=wms|request=getmap|\/(wms|ows)(\?|$)/.test(v)?"wms":""}function _e(a){const u=Xn(a),v=qe(a),A={opacity:a?.style?.opacity??1,...a.options??{}},P=!!(a?.style&&Object.keys(a.style).length),R=a.sourceLayer||a.layer||a.service_layer||a.service_key||a.map_key||a.dataset?.layer||a.id;if(u==="vtile"){const z=y?.vectorGrid;if(z?.protobuf&&(P||!y?.maplibreGL)){const W=z.protobuf(v,{interactive:!0,maxNativeZoom:a.maxzoom??19,vectorTileLayerStyles:{[R??"default"]:Gt(a),default:Gt(a)}});return W.on?.("mouseover",G=>Jt(a,G)),W.on?.("mousemove",G=>Jt(a,G)),W.on?.("mouseout",()=>We(a.id)),W.on?.("click",G=>Zn(a,G)),W}if(!P&&y?.maplibreGL&&window?.maplibregl){const W=v;return y.maplibreGL({style:W,interactive:!1,pane:"overlayPane"})}}if(u==="wms"&&y?.tileLayer?.wms){const z={...a.params??{}};return R&&!z.layers&&(z.layers=R),z.format==null&&(z.format="image/png"),z.transparent==null&&(z.transparent=!0),y.tileLayer.wms(v,{...z,...A})}return y.tileLayer(v,A)}function gt(a){const u=("bounds"in a?a.bounds:void 0)??s.bounds??M.value;if(!Array.isArray(u)||!u.length||!y)return null;const b={color:a.style?.stroke??a.style?.color??"#2563eb",weight:a.style?.width??2,interactive:!1,opacity:a.style?.opacity??.8,dashArray:"4 4"},A=Array.isArray(a.bounds)&&a.bounds.length?a.bounds:u,P=Qn(A);if(!P.length||!y.polyline)return null;const R=P.map(z=>{if(!z.length)return z;const W=z[0],G=z[z.length-1];return W&&G&&(!G.equals||!G.equals(W))?[...z,W]:z});return y.polyline(R,b)}function Qn(a){const u=A=>{if(!Array.isArray(A)||A.length<2)return null;const[P,R]=A;return!Number.isFinite(Number(R))||!Number.isFinite(Number(P))?null:y.latLng(Number(R),Number(P))},v=A=>Array.isArray(A)&&A.length>=2&&A.every(P=>Number.isFinite(Number(P))),b=A=>Array.isArray(A)?A.map(u).filter(Boolean):[];if(!Array.isArray(a))return[];if(a.length&&v(a[0])){const A=a.map(u).filter(Boolean);return A.length?[A]:[]}if(a.length&&Array.isArray(a[0])){if(v(a[0][0]))return a.map(P=>b(P)).filter(P=>P.length);if(Array.isArray(a[0][0])&&v(a[0][0][0]))return a.flatMap(P=>Array.isArray(P)?P.map(R=>b(R)).filter(R=>R.length):[]).filter(P=>P.length)}return[]}function Vn(){Object.values(I).forEach(a=>{a.layer&&m?.hasLayer(a.layer)&&m.removeLayer(a.layer),a.boundsLayer&&m?.hasLayer(a.boundsLayer)&&m.removeLayer(a.boundsLayer),a.layer=null,a.boundsLayer=null}),We()}function et(){if(!m)return;h&&m.hasLayer(h)&&m.removeLayer(h);const a=gt({id:"global-bounds",bounds:s.bounds,style:{}});a?(h=a,h.addTo(m)):h=null}function yt(){m&&H.value.forEach(a=>{const u=I[a];u&&(u.visible?(u.layer||(u.layer=_e(u.config)),u.boundsLayer||(u.boundsLayer=gt(u.config)),u.layer&&!m.hasLayer(u.layer)&&u.layer.addTo(m),u.boundsLayer&&!m.hasLayer(u.boundsLayer)&&u.boundsLayer.addTo(m)):(u.layer&&m.hasLayer(u.layer)&&m.removeLayer(u.layer),u.boundsLayer&&m.hasLayer(u.boundsLayer)&&m.removeLayer(u.boundsLayer)))})}function vt(){const a=Jn(),u=[],v=new Set;a.forEach((b,A)=>{const P=xe(b,A);u.push(P),v.add(P);const R=I[P];R&&R.config.url!==b.url&&(R.layer&&m?.hasLayer(R.layer)&&m.removeLayer(R.layer),R.layer=null);const z=R?.visible??b.visible??b.overlay!==!1;I[P]={id:P,config:{...b,id:P},visible:z,layer:R?.layer??null,boundsLayer:R?.boundsLayer??null}}),Object.keys(I).forEach(b=>{if(!v.has(b)){const A=I[b];A?.layer&&m?.hasLayer(A.layer)&&m.removeLayer(A.layer),delete I[b]}}),H.value=u,m&&yt()}function Xt(a,u){const v=typeof u=="boolean"?u:u.target?.checked;if(v==null)return;const b=I[a];b&&(b.visible=v,b.visible?(b.layer||(b.layer=_e(b.config)),b.boundsLayer||(b.boundsLayer=gt(b.config)),b.layer&&!m.hasLayer(b.layer)&&b.layer.addTo(m),b.boundsLayer&&!m.hasLayer(b.boundsLayer)&&b.boundsLayer.addTo(m)):(b.layer&&m.hasLayer(b.layer)&&(m.removeLayer(b.layer),We(a)),b.boundsLayer&&m.hasLayer(b.boundsLayer)&&m.removeLayer(b.boundsLayer)))}function Qt(a){tt(a),_.value=a}function tt(a){if(!m||!x[a])return;S&&S.removeFrom(m);const u=x[a];S=y.tileLayer(u.url,u.options||{}).addTo(m),S.bringToBack()}function es(){!m||!f||L.value&&!m.hasLayer(f)&&f.addTo(m)}function Vt(){Qt(_.value)}function N(){L.value?f.addTo(m):f.removeFrom(m)}function w(a=30){const u=f.getLayers();if(!u.length)return;const b=y.featureGroup(u).getBounds();b&&b.isValid()&&m.fitBounds(b,{padding:[a,a],maxZoom:16})}function C(){if(!m||!p.value)return null;m.scrollWheelZoom.disable(),q.value="Використовуйте Ctrl + колесо миші для зміни масштабу";let a;const u=(b=1500)=>{B.value=!0,a&&clearTimeout(a),a=window.setTimeout(()=>B.value=!1,b)},v=b=>{if(!(b.ctrlKey||b.metaKey||b.shiftKey)){u(),m.scrollWheelZoom.disable();return}b.preventDefault(),b.stopPropagation(),m.scrollWheelZoom.enable(),B.value=!1,a&&clearTimeout(a),a=window.setTimeout(()=>m.scrollWheelZoom.disable(),200)};return p.value.addEventListener("wheel",v,{passive:!1}),()=>{m.scrollWheelZoom.enable(),p.value?.removeEventListener("wheel",v),a&&clearTimeout(a),B.value=!1}}return e.watch($,async()=>{await e.nextTick(),requestAnimationFrame(()=>{m?.invalidateSize(!0),tt(_.value),es(),yt(),h&&!m?.hasLayer(h)&&h.addTo(m)})}),e.watch(()=>s.layers,()=>vt(),{deep:!0}),e.watch(()=>[s.tms,s.pattern],()=>{s.layers?.length||vt()}),e.watch(()=>s.bounds,()=>et(),{deep:!0}),e.watch(()=>s.geom,()=>Yn(),{deep:!0}),e.watch(()=>s.katottg,async a=>{if(M.value=[],!a){et();return}try{const u=await fetch(`https://data.gki.com.ua/api-user/atu/${a}`);if(!u?.ok)return;const b=(await u.json())?.geometry?.coordinates;Array.isArray(b)&&b.length&&(M.value=b)}catch(u){console.error("Failed to fetch KATOTTG bounds",u)}finally{et(),yt()}},{immediate:!0}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(Y.value),style:e.normalizeStyle(ce.value)},[e.createElementVNode("div",{ref_key:"mapContainer",ref:p,class:e.normalizeClass(Ie.value)},null,2),B.value?(e.openBlock(),e.createElementBlock("div",ll,[e.createElementVNode("div",al,e.toDisplayString(q.value),1)])):e.createCommentVNode("",!0),T.value.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:"absolute z-[550] pointer-events-none",style:e.normalizeStyle(k.value)},[e.createElementVNode("div",cl,[e.createElementVNode("dl",dl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,v=>(e.openBlock(),e.createElementBlock("div",{key:`${v.label}-${v.value}`,class:"flex justify-between gap-2"},[e.createElementVNode("dt",pl,e.toDisplayString(v.label),1),e.createElementVNode("dd",fl,e.toDisplayString(v.value),1)]))),128))])])],4)):e.createCommentVNode("",!0),O.value.length?(e.openBlock(),e.createElementBlock("div",ml,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,v=>(e.openBlock(),e.createElementBlock("div",{key:v.key,class:"flex items-center gap-2 text-gray-800"},[e.createElementVNode("span",{class:"w-3.5 h-3.5 rounded-[2px] border border-black/10 shrink-0",style:e.normalizeStyle({backgroundColor:v.color})},null,4),e.createElementVNode("span",ul,e.toDisplayString(v.label),1)]))),128))])):e.createCommentVNode("",!0),D.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:3,onClick:u[0]||(u[0]=v=>D.value=!0),class:"z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer layers-button"}," Шари ")),D.value?(e.openBlock(),e.createElementBlock("div",hl,[e.createElementVNode("div",gl,[u[5]||(u[5]=e.createElementVNode("div",null,"Шари",-1)),(e.openBlock(),e.createElementBlock("svg",{onClick:u[1]||(u[1]=v=>D.value=!1),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4"},u[4]||(u[4]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)])))]),e.createElementVNode("div",yl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(x),(v,b)=>(e.openBlock(),e.createElementBlock("div",{key:`base-${b}`},[e.createElementVNode("label",vl,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:E,value:b,"onUpdate:modelValue":u[2]||(u[2]=A=>_.value=A),onChange:Vt},null,40,bl),[[e.vModelRadio,_.value]]),e.createElementVNode("span",kl,e.toDisplayString(v.name||b),1)])]))),128))]),e.createElementVNode("div",El,[e.createElementVNode("label",Nl,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":u[3]||(u[3]=v=>L.value=v),onChange:N},null,544),[[e.vModelCheckbox,L.value]]),u[6]||(u[6]=e.createElementVNode("span",{class:"ml-2"},"Геометрія/Межі",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,v=>(e.openBlock(),e.createElementBlock("label",{class:"flex items-center",key:v.id},[e.createElementVNode("input",{type:"checkbox",checked:v.visible,onChange:b=>Xt(v.id,b)},null,40,wl),e.createElementVNode("span",xl,e.toDisplayString(v.config.name||v.id),1)]))),128))])])):e.createCommentVNode("",!0)],6))}});/**
|
|
131
|
+
*/const sn=Y("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Qs={class:"border-t pt-3 mt-4"},Vs={class:"flex gap-2"},er={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},tr={class:"flex-1 space-y-2"},nr={class:"flex justify-between items-center"},or={class:"flex gap-2"},sr=["disabled"],po=e.defineComponent({__name:"CommentInputZone",props:{isReply:{type:Boolean,required:!1,default:!1},isReplyModifiers:{}},emits:e.mergeModels(["sendComment"],["update:isReply"]),setup(t,{emit:n}){const o=e.useModel(t,"isReply"),s=e.ref(""),r=n,l=()=>{s.value.trim()&&(r("sendComment",s.value),s.value="")},i=a=>{(a.ctrlKey||a.metaKey)&&a.key==="Enter"&&(a.preventDefault(),l())};return(a,c)=>(e.openBlock(),e.createElementBlock("div",Qs,[e.createElementVNode("div",Vs,[e.createElementVNode("span",er,[e.createVNode(e.unref(on),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",tr,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":c[0]||(c[0]=p=>s.value=p),onKeydown:i,placeholder:"Add a comment...",class:"w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"},null,544),[[e.vModelText,s.value]]),e.createElementVNode("div",nr,[c[4]||(c[4]=e.createElementVNode("span",{class:"text-xs text-gray-500 hidden sm:inline"},"Cmd+Enter to send",-1)),e.createElementVNode("div",or,[o.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:c[1]||(c[1]=p=>o.value=!1)},[e.createVNode(e.unref(sn),{class:"h-3 w-3"}),c[2]||(c[2]=e.createTextVNode(" Cancel ",-1))])):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",disabled:!s.value.trim(),onClick:l},[e.createVNode(e.unref(co),{class:"h-3 w-3 mr-1"}),c[3]||(c[3]=e.createTextVNode(" Send ",-1))],8,sr)])])])])]))}}),rr={class:"z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md w-32 outline-none pointer-events-auto"},ir=e.defineComponent({__name:"CommentDetails",props:{showMoreOptions:{type:Boolean,required:!0,default:!1},showMoreOptionsModifiers:{}},emits:e.mergeModels(["edit","delete"],["update:showMoreOptions"]),setup(t,{emit:n}){const o=n,s=e.useModel(t,"showMoreOptions"),r=e.ref(),l=e.ref(!0),i=async p=>{s.value&&r.value&&!r.value.contains(p.target)&&!l.value&&(s.value=!1),l.value=!1},a=()=>{s.value=!1,o("edit")},c=()=>{s.value=!1,o("delete")};return e.onMounted(()=>{document.addEventListener("click",i)}),e.onUnmounted(()=>{document.removeEventListener("click",i)}),(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:"absolute bg-white left-0 top-full transform min-w-max z-50",ref_key:"moreOptionsRef",ref:r},[e.createElementVNode("div",rr,[e.createElementVNode("div",{class:"relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs hover:bg-gray-100 transition-colors duration-300",onClick:a},[e.createVNode(e.unref(Zs),{class:"h-3 w-3 mr-2"}),m[0]||(m[0]=e.createTextVNode(" Edit ",-1))]),e.createElementVNode("div",{class:"relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs text-red-600 hover:bg-gray-100 transition-colors duration-300",onClick:c},[e.createVNode(e.unref(nn),{class:"h-3 w-3 mr-2"}),m[1]||(m[1]=e.createTextVNode(" Delete ",-1))])])],512))}}),lr={class:"space-y-2"},ar={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},cr={class:"flex-1 min-w-0 space-y-1 relative"},dr={class:"flex items-center gap-2"},pr={class:"font-medium text-xs"},fr={class:"text-xs text-gray-500"},mr={key:0,class:"text-xs text-gray-700 leading-relaxed"},ur={class:"flex justify-between text-xs"},hr={class:"flex items-center gap-2"},gr={key:0,class:"flex gap-2"},yr=["disabled"],vr={key:0,class:"ml-8 space-y-1 border-l-2 border-gray-100 pl-3"},br=e.defineComponent({__name:"CommentItem",props:{comment:{},isInside:{type:Boolean}},emits:["like","reply","edit","delete"],setup(t,{emit:n}){const o=n,s=t,r=e.ref(s.comment.text),l=e.ref("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"),i=e.ref("w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"),a=e.ref(!1),c=e.ref(!1),p=e.ref(!1),m=e.ref(!1),f=w=>{const C=new Date,I=Math.floor((C.getTime()-w.getTime())/(1e3*60*60));return I<1?`${Math.floor((C.getTime()-w.getTime())/6e4)}m`:I<24?`${I}h`:`${Math.floor(I/24)}d`},u=()=>{m.value=!m.value,m.value?o("like",s.comment.id,"add"):o("like",s.comment.id,"delete")},E=()=>{o("edit",s.comment.id,r.value),p.value=!1},x=(w,C)=>{o("like",w,C)},_=(w,C)=>{o("edit",w,C)};return(w,C)=>{const I=e.resolveComponent("CommentItem",!0);return e.openBlock(),e.createElementBlock("div",lr,[e.createElementVNode("div",{class:e.normalizeClass(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative",p.value?"bg-gray-50":""])},[e.createElementVNode("span",ar,[e.createVNode(e.unref(on),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",cr,[e.createElementVNode("div",dr,[e.createElementVNode("span",pr,e.toDisplayString(w.comment?.author),1),e.createElementVNode("span",fr,e.toDisplayString(f(w.comment?.createdAt)),1)]),p.value?e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,"onUpdate:modelValue":C[0]||(C[0]=$=>r.value=$),class:e.normalizeClass(p.value?i.value:l.value)},null,2)),[[e.vModelText,r.value]]):(e.openBlock(),e.createElementBlock("p",mr,e.toDisplayString(w.comment?.text),1)),e.createElementVNode("div",ur,[e.createElementVNode("div",hr,[e.createElementVNode("button",{class:e.normalizeClass(["flex items-center gap-1",m.value?"text-blue-600":"text-gray-500 hover:text-blue-600 transition-colors"]),onClick:C[1]||(C[1]=$=>u())},[e.createVNode(e.unref(qs),{class:e.normalizeClass(["h-3 w-3",m.value?"fill-blue-600":""])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(w.comment?.likes),1)],2),w.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"text-gray-500 hover:text-blue-600 transition-colors",onClick:C[2]||(C[2]=$=>c.value=!0)},[e.createVNode(e.unref(Gs),{class:"h-3 w-3"})])),e.createElementVNode("button",{class:"text-gray-400 hover:text-gray-600 transition-colors opacity-0 group-hover:opacity-100",type:"button",onClick:C[3]||(C[3]=$=>a.value=!0)},[e.createVNode(e.unref(zs),{class:"h-3 w-3"})])]),p.value?(e.openBlock(),e.createElementBlock("div",gr,[e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:C[4]||(C[4]=$=>p.value=!1)},[e.createVNode(e.unref(sn),{class:"h-3 w-3"}),C[11]||(C[11]=e.createTextVNode(" Cancel ",-1))]),e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",disabled:!r.value.trim(),onClick:C[5]||(C[5]=$=>E())},[e.createVNode(e.unref(co),{class:"h-3 w-3 mr-1"}),C[12]||(C[12]=e.createTextVNode(" Send ",-1))],8,yr)])):e.createCommentVNode("",!0)])]),a.value?(e.openBlock(),e.createBlock(ir,{key:0,showMoreOptions:a.value,"onUpdate:showMoreOptions":C[6]||(C[6]=$=>a.value=$),onEdit:C[7]||(C[7]=$=>p.value=!0),onDelete:C[8]||(C[8]=$=>w.$emit("delete",w.comment?.id)),comment:w.comment},null,8,["showMoreOptions","comment"])):e.createCommentVNode("",!0)],2),w.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",vr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.comment?.replies,$=>(e.openBlock(),e.createBlock(I,{key:$.id,comment:$,isInside:!0,onDelete:D=>w.$emit("delete",$.id),onLike:x,onEdit:_},null,8,["comment","onDelete"]))),128)),c.value&&!w.isInside?(e.openBlock(),e.createBlock(po,{key:0,onSendComment:C[9]||(C[9]=$=>w.$emit("reply",w.comment?.id,$)),isReply:c.value,"onUpdate:isReply":C[10]||(C[10]=$=>c.value=$)},null,8,["isReply"])):e.createCommentVNode("",!0)]))])}}}),kr=["id"],Er={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Et=e.defineComponent({__name:"CommentsWidget",props:{title:{},comments:{},maxHeight:{},onAddComment:{type:Function},onReply:{type:Function},onLike:{type:Function},onDelete:{type:Function},onEdit:{type:Function},id:{},className:{},style:{}},emits:["add","reply","like","delete","edit"],setup(t,{emit:n}){const o=t,s=n,r=e.ref(o.comments??[]);async function l(){if(!o.id)return;const f=await fetch(`/api/widget/comment/${o.id}`).then(u=>u.json());r.value=f.rows.map(u=>({id:u.communication_id,author:u.username,text:u.body,createdAt:new Date(u.cdate)}))}r.value.length===0&&l();const i=async f=>{o.onAddComment?o.onAddComment(f):o.id&&(await fetch(`/api/widget/comment/${o.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:f})}),await l()),s("add",f)},a=(f,u)=>{o?.onLike?.(f,u),s("like",f,u)},c=(f,u)=>{o.onReply?.(f,u),s("reply",f,u)},p=async(f,u)=>{o.onEdit?o.onEdit(f,u):o.id&&(await fetch(`/api/widget/comment/${o.id}/${f}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:u})}),await l()),s("edit",f,u)},m=async f=>{o.onDelete?o.onDelete(f):o.id&&(await fetch(`/api/widget/comment/${o.id}/${f}`,{method:"DELETE"}),await l()),s("delete",f)};return(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mx-auto font-sans",f.className]),id:f.id,style:e.normalizeStyle(f.style)},[f.title?(e.openBlock(),e.createElementBlock("h3",Er,e.toDisplayString(f.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([f.maxHeight?"overflow-y-auto":"","space-y-3"]),style:e.normalizeStyle({maxHeight:f.maxHeight+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,E=>(e.openBlock(),e.createBlock(br,{key:E.id,comment:E,onReply:c,onLike:a,onDelete:u[0]||(u[0]=x=>m(x)),onEdit:p},null,8,["comment"]))),128))],6),e.createVNode(po,{onSendComment:u[1]||(u[1]=E=>i(E))})],14,kr))}}),fo=new Map([["file",{name:"File",color:"bg-green-100 text-green-700 border-green-200",icon:Je}],["post",{name:"Post",color:"bg-blue-100 text-blue-700 border-blue-200",icon:Js}],["user",{name:"User",color:"bg-purple-100 text-purple-700 border-purple-200",icon:Ys}],["custom",{name:"Custom",color:"bg-gray-100 text-gray-700 border-gray-200",icon:Ws}]]),Nr={class:"mx-auto font-sans"},wr={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},xr={class:"relative"},_r={class:"space-y-3"},Cr={class:"flex-1 min-w-0 pb-2"},Sr={class:"flex items-center gap-1.5 mb-1 mt-0.5"},Br={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},$r={class:"font-medium text-xs"},Tr={class:"text-xs text-gray-500"},Dr={class:"space-y-1"},Or={class:"text-xs text-gray-700"},Ar={class:"capitalize mr-1"},Lr={key:0,class:"inline-flex items-center rounded-full border py-0.5 font-semibold transition-colors text-foreground text-xs h-4 px-1 capitalize"},Ir={key:0,class:"flex items-center gap-1 text-xs"},Mr={key:0,class:"bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"},Pr={key:2,class:"bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"},Nt=e.defineComponent({__name:"HistoryWidget",props:{data:{},title:{},maxHeight:{},id:{},className:{},style:{}},setup(t){const n=t,o=e.ref(Array.isArray(n.data)?n.data:[]);o.value.length===0&&n.id&&s();async function s(){const r=await fetch(`/api/widget/history/${n.id}`);if(!r.ok)return{data:[]};const l=await r.json();l.rows.forEach(i=>{i.timestamp=new Date(i.cdate),i.id=i.entity_id,i.entityType=i.entity_type,i.entityId=i.entity_id,i.action=i.change_type,i.userId=i.change_user_id,i.userName=i.username,i.timestamp=new Date(i.cdate),i.description=i.username,i.status=i.username}),o.value=l.rows}return(r,l)=>(e.openBlock(),e.createElementBlock("div",Nr,[r.title?(e.openBlock(),e.createElementBlock("h3",wr,e.toDisplayString(r.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(r.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:r.maxHeight+"px"})},[e.createElementVNode("div",xr,[l[0]||(l[0]=e.createElementVNode("div",{class:"absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200"},null,-1)),e.createElementVNode("div",_r,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,i=>(e.openBlock(),e.createElementBlock("div",{class:"relative flex items-start gap-2",key:i?.id},[e.createElementVNode("div",{class:e.normalizeClass(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${e.unref(fo).get(i?.entityType)?.color}`)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(fo).get(i?.entityType)?.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",Cr,[e.createElementVNode("div",Sr,[e.createElementVNode("span",Br,[e.createVNode(e.unref(on),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("span",$r,e.toDisplayString(i?.userName),1),e.createElementVNode("span",Tr,e.toDisplayString(i?.timestamp.toLocaleDateString("ua-UA",{day:"2-digit",month:"2-digit",year:"numeric"}))+" "+e.toDisplayString(i?.timestamp.toLocaleTimeString("ua-UA",{hour:"2-digit",minute:"2-digit"})),1)]),e.createElementVNode("div",Dr,[e.createElementVNode("div",Or,[e.createElementVNode("span",Ar,e.toDisplayString(i?.action),1),i?.entityId?(e.openBlock(),e.createElementBlock("span",Lr,e.toDisplayString(i?.entityId),1)):e.createCommentVNode("",!0)]),i?.changes?.[i?.entityId]?(e.openBlock(),e.createElementBlock("div",Ir,[i?.changes?.[i?.entityId]?.old?(e.openBlock(),e.createElementBlock("span",Mr,e.toDisplayString(i?.changes?.[i?.entityId]?.old),1)):e.createCommentVNode("",!0),i?.changes?.[i?.entityId]?.old&&i?.changes?.[i?.entityId]?.new?(e.openBlock(),e.createBlock(e.unref(Fs),{key:1,class:"h-2 w-2 text-gray-400"})):e.createCommentVNode("",!0),i?.changes?.[i?.entityId]?.new?(e.openBlock(),e.createElementBlock("span",Pr,e.toDisplayString(i?.changes?.[i?.entityId]?.new),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])]))),128))])])],6)]))}}),Rr={key:0,class:"text-xl font-semibold"},Fr={class:"flex gap-1"},jr={class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer"},zr=e.defineComponent({__name:"FileHeader",props:e.mergeModels({title:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["onAddFile"],["update:modelValue"]),setup(t){const n=e.useModel(t,"modelValue"),o={active:"bg-blue-100 text-black hover:bg-blue-100",inactive:"bg-white text-black hover:bg-blue-100"};return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",s.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[s.title?(e.openBlock(),e.createElementBlock("h3",Rr,e.toDisplayString(s.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Fr,[e.createElementVNode("button",{class:e.normalizeClass(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",n.value==="list"?o.active:o.inactive]),onClick:r[0]||(r[0]=l=>n.value="list")},[e.createVNode(e.unref(Ks),{class:"h-4 w-4"})],2),e.createElementVNode("button",{class:e.normalizeClass(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",n.value==="grid"?o.active:o.inactive]),onClick:r[1]||(r[1]=l=>n.value="grid")},[e.createVNode(e.unref(Us),{class:"h-4 w-4"})],2),e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:r[2]||(r[2]=l=>s.$emit("onAddFile",l))},null,32),e.createElementVNode("div",jr,[e.createVNode(e.unref(ao),{class:"h-4 w-4"}),r[3]||(r[3]=e.createTextVNode(" Додати файл ",-1))])])])],2))}}),rn={pdf:{color:"bg-red-100 text-red-700 border-red-200",icon:Je,label:"PDF"},sketch:{color:"bg-gray-100 text-gray-700 border-gray-200",icon:Hs,label:"SKETCH"},mp4:{color:"bg-purple-100 text-purple-700 border-purple-200",icon:Xs,label:"VIDEO"},docx:{color:"bg-blue-100 text-blue-700 border-blue-200",icon:Je,label:"DOC"},zip:{color:"bg-orange-100 text-orange-700 border-orange-200",icon:Rs,label:"ARCHIVE"},png:{color:"bg-green-100 text-green-700 border-green-200",icon:lo,label:"IMAGE"},jpg:{color:"bg-green-100 text-green-700 border-green-200",icon:lo,label:"IMAGE"},xlsx:{color:"bg-emerald-100 text-emerald-700 border-emerald-200",icon:Je,label:"EXCEL"},pptx:{color:"bg-amber-100 text-amber-700 border-amber-200",icon:Je,label:"PPT"}};function mo(t,n="en"){const o={month:"short",day:"numeric"};return new Intl.DateTimeFormat(n,o).format(t)}function uo(t){if(t===0)return"0 B";const n=1024,o=["B","KB","MB","GB","TB"],s=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,s)).toFixed(1))} ${o[s]}`}const Hr={class:"space-y-0.5"},Ur=["onClick"],qr=["onClick"],Wr={class:"flex items-center gap-2"},Kr={class:"font-medium text-xs truncate hover:text-blue-600 cursor-pointer"},Gr={class:"hidden sm:block text-xs text-gray-500 w-16 text-right"},Jr={class:"hidden md:block text-xs text-gray-500 w-12 text-right"},Zr={class:"flex items-center gap-1"},Yr=["onClick"],Xr=["onClick"],Qr=e.defineComponent({__name:"FileList",props:{files:{}},emits:["delete","download","openLightbox"],setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",Hr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.files,s=>(e.openBlock(),e.createElementBlock("div",{class:"flex items-center gap-2 p-1.5 rounded hover:bg-gray-50 group border-b border-gray-100 last:border-b-0",key:s.id,onClick:e.withModifiers(r=>n.$emit("openLightbox",s),["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(["p-1 rounded",e.unref(rn)[s?.ext]?.color||"bg-blue-100 text-blue-700 border-blue-200"])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(rn)[s?.ext]?.icon||e.unref(rn).pdf.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",{class:"flex-1 min-w-0",onClick:r=>n.$emit("openLightbox",s)},[e.createElementVNode("div",Wr,[e.createElementVNode("span",Kr,e.toDisplayString(s?.uploaded_name||s?.name),1)])],8,qr),e.createElementVNode("div",Gr,e.toDisplayString(e.unref(uo)(s.size)),1),e.createElementVNode("div",Jr,e.toDisplayString(e.unref(mo)(s.createdAt)),1),e.createElementVNode("div",Zr,[e.createElementVNode("button",{onClick:e.withModifiers(r=>n.$emit("download",s),["stop"]),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity"},[e.createVNode(e.unref(io),{class:"h-3 w-3"})],8,Yr),e.createElementVNode("button",{class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700",onClick:e.withModifiers(r=>n.$emit("delete",r,s?.file_id),["stop"])},[e.createVNode(e.unref(nn),{class:"h-3 w-3"})],8,Xr)])],8,Ur))),128))]))}}),Vr={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3"},ei=["onClick"],ti={class:"space-y-2"},ni={class:"flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden"},oi=["src"],si={class:"space-y-1"},ri=["title"],ii={class:"text-xs text-gray-500 text-left"},li={class:"absolute top-2 right-1 flex items-center gap-1"},ai=["onClick"],ci=["onClick"],di=e.defineComponent({__name:"FileGrid",props:{files:{}},emits:["delete","download","openLightbox"],setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",Vr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.files,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,onClick:e.withModifiers(r=>n.$emit("openLightbox",s),["stop"]),class:"group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"},[e.createElementVNode("div",ti,[e.createElementVNode("div",ni,[s.ext==="png"||s.ext==="jpg"||s.ext==="jpeg"||s.ext==="gif"||s.ext==="svg"||s.ext==="webp"?(e.openBlock(),e.createElementBlock("img",{key:0,src:`/file/resize?filepath=${s?.file_path}&w=500`,alt:"file",class:"w-full h-full object-cover"},null,8,oi)):(e.openBlock(),e.createBlock(e.unref(Je),{key:1,class:"h-10 w-10 text-gray-500"}))]),e.createElementVNode("div",si,[e.createElementVNode("h3",{class:"font-medium text-xs leading-tight text-left",title:s.uploaded_name||s.name},e.toDisplayString(s.uploaded_name||s.name),9,ri),e.createElementVNode("p",ii,e.toDisplayString(e.unref(mo)(s.createdAt))+", "+e.toDisplayString(e.unref(uo)(s.size)),1)])]),e.createElementVNode("div",li,[e.createElementVNode("button",{onClick:e.withModifiers(r=>n.$emit("download",s),["stop"]),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50"},[e.createVNode(e.unref(io),{class:"h-3 w-3"})],8,ai),e.createElementVNode("button",{class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700 hover:bg-red-50",onClick:e.withModifiers(r=>n.$emit("delete",r,s?.file_id),["stop"])},[e.createVNode(e.unref(nn),{class:"h-3 w-3"})],8,ci)])],8,ei))),128))]))}}),pi={class:"mx-auto font-sans"},fi={key:1},wt=e.defineComponent({__name:"FilesWidget",props:{title:{},view:{},files:{default:()=>[]},maxHeight:{},onAddFile:{},id:{},className:{},style:{},onDelete:{}},emits:["delete","add","openLightbox"],setup(t,{emit:n}){const o=t,s=e.ref(!1),r=e.ref(null),l=e.ref(!1),i=e.ref(0),a=e.ref(o.files??[]),c=n;a.value.length===0&&C();const p=(D,B)=>{r.value=B,s.value=!0},m=()=>{r.value&&(x(r.value),r.value=null,s.value=!1)},f=e.computed(()=>Array.isArray(a.value)?a.value.map(D=>D?.file_path):[]),u=D=>{const B=f.value.findIndex(H=>H===D.file_path);B!==-1&&(l.value=!0,i.value=B)},E=D=>{o.onAddFile?o.onAddFile(D):I(D),c("add",D)},x=D=>{o.onDelete?o.onDelete(D):$(D),c("delete",D)},_=D=>{const B=document.createElement("a");B.setAttribute("download",D?.uploaded_name||D?.name),B.href=D?.file_path||D?.path,B.click()},w=e.ref("list");async function C(){if(!o.id)return;const D=await fetch(`/api/widget/file/${o.id}`).then(B=>B.json());D.rows.forEach(B=>{B.timestamp=new Date(B.cdate),B.id=B.entity_id,B.entityType=B.entity_type,B.entityId=B.entity_id,B.entityType=B.entity_type,B.action=B.change_type,B.userId=B.change_user_id,B.userName=B.username,B.timestamp=new Date(B.cdate),B.description=B.username,B.status=B.username}),a.value=D.rows}const I=async D=>{if(!(!D.target||!D.target.files||D.target.files.length===0))try{await Promise.all(Array.from(D.target.files).map(async B=>{const H=new FormData;H.append("file",B);const Z=`/api/widget/file/${o.id}`,P=await fetch(Z,{method:"POST",body:H});if(!P.ok)throw new Error(`HTTP error! status: ${P.status}`);return B})),await C()}catch(B){console.error("Помилка при завантаженні файлів:",B)}},$=async D=>{try{await fetch(`/api/widget/file/${o.id}/${D}`,{method:"DELETE"}),await C()}catch(B){console.error(B)}};return(D,B)=>{const H=e.resolveComponent("MessageBox"),Z=e.resolveComponent("Lightbox");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",pi,[e.createVNode(zr,{modelValue:w.value,"onUpdate:modelValue":B[0]||(B[0]=P=>w.value=P),title:o.title,onOnAddFile:B[1]||(B[1]=P=>E(P))},null,8,["modelValue","title"]),a.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(D.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:D.maxHeight+"px"})},[w.value==="list"?(e.openBlock(),e.createBlock(Qr,{key:0,onDelete:p,onDownload:_,onOpenLightbox:B[2]||(B[2]=P=>u(P)),files:a.value},null,8,["files"])):e.createCommentVNode("",!0),w.value==="grid"?(e.openBlock(),e.createBlock(di,{key:1,onDelete:p,onDownload:_,onOpenLightbox:B[3]||(B[3]=P=>u(P)),files:a.value},null,8,["files"])):e.createCommentVNode("",!0)],6)):(e.openBlock(),e.createElementBlock("div",fi,B[6]||(B[6]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Файлів не знайдено")],-1)])))]),e.createVNode(H,{modelValue:s.value,"onUpdate:modelValue":B[4]||(B[4]=P=>s.value=P),onConfirm:m,title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати"},null,8,["modelValue"]),e.createVNode(Z,{modelValue:l.value,"onUpdate:modelValue":B[5]||(B[5]=P=>l.value=P),images:f.value,"start-index":i.value},null,8,["modelValue","images","start-index"])],64)}}}),mi={key:0,class:"image-wrapper h-full max-h-[400px]",id:"lightbox-gallery"},ui=["onClick"],hi={key:0,rel:"noreferrer",class:"relative block h-full w-full"},gi=["src"],yi={key:0,class:"thumb-cover"},vi=e.defineComponent({__name:"GalleryContent",props:{title:{},items:{},columns:{},maxHeight:{},onAddImage:{type:Function},onDelete:{type:Function},id:{},className:{},style:{}},emits:["delete"],setup(t,{emit:n}){const o=n,s=e.ref(!1),r=e.ref(0),l=t,i=e.computed(()=>Array.isArray(l.items)?l.items.map(c=>c?.file_path):[]),a=c=>{const p=i.value.findIndex(m=>m===c.file_path);p!==-1&&(s.value=!0,r.value=p)};return(c,p)=>{const m=e.resolveComponent("Lightbox");return c.items?.length>=1?(e.openBlock(),e.createElementBlock("div",mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.items,(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["h-full w-full image"+u,"cursor-pointer bg-teal-500 rounded-[3px]"]),key:u,onClick:e.withModifiers(E=>a(f),["stop"])},[u<5?(e.openBlock(),e.createElementBlock("div",hi,[e.createElementVNode("img",{src:`/file/resize?filepath=${f?.file_path}&w=500`,alt:"alt",height:"auto",width:"100%",class:e.normalizeClass(["object-cover h-full w-full bg-gray-200 rounded-[3px]",u===0?"max-h-[411px]":"max-h-[calc((411px-3px)/2)]"])},null,10,gi),u===4&&c.items?.length>5?(e.openBlock(),e.createElementBlock("div",yi," +"+e.toDisplayString(c.items?.length-5),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,ui))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Math.max(0,5-c.items.length),f=>(e.openBlock(),e.createElementBlock("div",{key:"empty-"+f,class:e.normalizeClass(["h-full w-full image"+(c.items.length+f-1),"bg-gray-300 rounded-[3px]"])},null,2))),128)),e.createVNode(m,{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=f=>s.value=f),images:i.value,"start-index":r.value,delete:"true",download:"true",onDelete:p[1]||(p[1]=f=>o("delete",f))},null,8,["modelValue","images","start-index"])])):e.createCommentVNode("",!0)}}}),bi={key:0,class:"text-xl font-semibold"},ki={class:"flex gap-1"},Ei={class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer"},Ni=e.defineComponent({__name:"widgetHeader",props:{title:{}},emits:["onAddImage"],setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",n.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[n.title?(e.openBlock(),e.createElementBlock("h3",bi,e.toDisplayString(n.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",ki,[e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:o[0]||(o[0]=s=>n.$emit("onAddImage",s))},null,32),e.createElementVNode("div",Ei,[e.createVNode(e.unref(ao),{class:"h-4 w-4"}),o[1]||(o[1]=e.createTextVNode(" Додати зображення ",-1))])])])],2))}}),wi={class:"w-full mx-auto font-sans",ref:"containerRef"},xi={key:1},xt=e.defineComponent({__name:"GalleryWidget",props:{title:{},items:{default:()=>[]},columns:{},maxHeight:{},onAddImage:{},onDelete:{},id:{},className:{},style:{}},emits:["delete","add","openLightbox"],setup(t,{emit:n}){const o=t,s=e.ref(o.items??[]),r=n;s.value.length===0&&c();const l=m=>{o.onAddImage?o.onAddImage(m):a(m),r("add",m)},i=m=>{const f=s.value.find(u=>u.file_path===m)?.file_id;f&&(o.onDelete?o.onDelete(f):p(f))},a=async m=>{if(!(!m.target||!m.target.files||m.target.files.length===0))try{await Promise.all(Array.from(m.target.files).map(async f=>{const u=new FormData;u.append("file",f);const E=`/api/widget/file/${o.id}`,x=await fetch(E,{method:"POST",body:u});if(!x.ok)throw new Error(`HTTP error! status: ${x.status}`);return f})),await c()}catch(f){console.error("Помилка при завантаженні файлів:",f)}};async function c(){if(!o.id)return;const m=await fetch(`/api/widget/file/${o.id}`).then(f=>f.json());s.value=m.rows}const p=async m=>{try{await fetch(`/api/widget/file/${o.id}/${m}`,{method:"DELETE"}),await c()}catch(f){console.error(f)}};return(m,f)=>(e.openBlock(),e.createElementBlock("div",wi,[e.createVNode(Ni,{title:m.title,onOnAddImage:f[0]||(f[0]=u=>l(u))},null,8,["title"]),s.value.length>0?(e.openBlock(),e.createBlock(vi,{key:0,items:s.value,onDelete:f[1]||(f[1]=u=>i(u))},null,8,["items"])):(e.openBlock(),e.createElementBlock("div",xi,f[2]||(f[2]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Зображень не знайдено")],-1)])))],512))}}),_i={class:"text-value"},Ci={class:"text-sm text-gray-900"},Si=e.defineComponent({__name:"TextValue",props:{item:{}},setup(t){const n=t,o=e.computed(()=>{const s=n.item.value;return typeof s=="boolean"?s?"Так":"Ні":s==null?"—":String(s)});return(s,r)=>(e.openBlock(),e.createElementBlock("div",_i,[e.createElementVNode("span",Ci,e.toDisplayString(o.value),1)]))}}),Pe=(t,n)=>{const o=t.__vccOpts||t;for(const[s,r]of n)o[s]=r;return o},Bi=Pe(Si,[["__scopeId","data-v-34a76c89"]]),$i={class:"link-value"},Ti=["href"],Di=Pe(e.defineComponent({__name:"LinkValue",props:{item:{}},setup(t){const n=t,o=e.computed(()=>{const s=String(n.item.value);try{const r=new URL(s);return r.hostname+r.pathname}catch{return s}});return(s,r)=>(e.openBlock(),e.createElementBlock("div",$i,[e.createElementVNode("a",{href:String(s.item.value),target:"_blank",rel:"noopener noreferrer",class:"text-blue-600 hover:text-blue-800 underline text-sm"},[e.createTextVNode(e.toDisplayString(o.value)+" ",1),r[0]||(r[0]=e.createElementVNode("i",{class:"fas fa-external-link-alt ml-1 text-xs"},null,-1))],8,Ti)]))}}),[["__scopeId","data-v-932f028c"]]),Oi={class:"date-value"},Ai={class:"text-sm text-gray-900"},Li=Pe(e.defineComponent({__name:"DateValue",props:{item:{}},setup(t){const n=t,o=e.computed(()=>{const s=n.item.value;if(s instanceof Date)return s.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});if(typeof s=="string"){const r=new Date(s);if(!isNaN(r.getTime()))return r.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}return String(s)});return(s,r)=>(e.openBlock(),e.createElementBlock("div",Oi,[e.createElementVNode("span",Ai,e.toDisplayString(o.value),1)]))}}),[["__scopeId","data-v-cd4df08e"]]),Ii={class:"status-value"},Mi={key:0,class:"mr-1"},Pi=Pe(e.defineComponent({__name:"StatusValue",props:{item:{}},setup(t){const n=t,o=e.computed(()=>{switch(String(n.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"bg-green-100 text-green-800";case"inactive":case"неактивний":case"pending":case"очікує":return"bg-yellow-100 text-yellow-800";case"error":case"помилка":case"failed":case"неуспішно":return"bg-red-100 text-red-800";case"draft":case"чернетка":return"bg-gray-100 text-gray-800";default:return"bg-blue-100 text-blue-800"}}),s=e.computed(()=>{switch(String(n.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"fas fa-check-circle";case"inactive":case"неактивний":case"pending":case"очікує":return"fas fa-clock";case"error":case"помилка":case"failed":case"неуспішно":return"fas fa-exclamation-circle";case"draft":case"чернетка":return"fas fa-edit";default:return"fas fa-info-circle"}});return(r,l)=>(e.openBlock(),e.createElementBlock("div",Ii,[e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",o.value])},[s.value?(e.openBlock(),e.createElementBlock("span",Mi,[e.createElementVNode("i",{class:e.normalizeClass(s.value)},null,2)])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(String(r.item.value)),1)],2)]))}}),[["__scopeId","data-v-aea1f529"]]),Ri={class:"custom-value"},Fi={class:"text-sm text-gray-900"},ji=Pe(e.defineComponent({__name:"CustomValue",props:{item:{}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",Ri,[e.renderSlot(n.$slots,"default",{item:n.item,value:n.item.value},()=>[e.createElementVNode("span",Fi,e.toDisplayString(String(n.item.value)),1)],!0)]))}}),[["__scopeId","data-v-12c8b3f3"]]),zi=["id"],Hi={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Ui={key:1,class:"overflow-x-auto"},qi={class:"min-w-full divide-y divide-gray-200"},Wi={class:"bg-white divide-y divide-gray-200"},Ki={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},Gi={class:"flex items-center gap-2"},Ji=["title"],Zi={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},Yi={key:2,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},Xi={class:"flex items-start gap-3"},Qi={key:0,class:"flex-shrink-0"},Vi={class:"flex-1 min-w-0"},el={class:"flex items-center gap-2 mb-2"},tl={class:"text-sm font-medium text-gray-900"},nl=["title"],ol={key:3,class:"overflow-x-auto"},sl={class:"min-w-full divide-y divide-gray-200"},rl={class:"bg-white divide-y divide-gray-200"},il={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},ll={class:"flex items-center gap-2"},al=["title"],cl={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},ln=Pe(e.defineComponent({__name:"DescriptionListWidget",props:{title:{},items:{},view:{},id:{},className:{},style:{}},setup(t){const n=o=>{switch(o.type){case"link":return Di;case"date":return Li;case"status":return Pi;case"custom":return ji;default:return Bi}};return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["description-list-widget",o.className]),id:o.id,style:e.normalizeStyle(o.style)},[o.title?(e.openBlock(),e.createElementBlock("h3",Hi,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),o.view==="table"?(e.openBlock(),e.createElementBlock("div",Ui,[e.createElementVNode("table",qi,[e.createElementVNode("tbody",Wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.id||r.label},[e.createElementVNode("td",Ki,[e.createElementVNode("div",Gi,[r.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([r.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.label)+" ",1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:r.tooltip},s[0]||(s[0]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,Ji)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",Zi,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])]))),128))])])])):o.view==="grid"?(e.openBlock(),e.createElementBlock("div",Yi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,r=>(e.openBlock(),e.createElementBlock("div",{key:r.id||r.label,class:"description-item-card bg-white border border-gray-200 rounded-lg p-4"},[e.createElementVNode("div",Xi,[r.icon?(e.openBlock(),e.createElementBlock("div",Qi,[e.createElementVNode("i",{class:e.normalizeClass([r.icon,"text-gray-500 text-lg"])},null,2)])):e.createCommentVNode("",!0),e.createElementVNode("div",Vi,[e.createElementVNode("div",el,[e.createElementVNode("h4",tl,e.toDisplayString(r.label),1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:0,class:"text-gray-400 cursor-help",title:r.tooltip},s[1]||(s[1]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,nl)):e.createCommentVNode("",!0)]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])])]))),128))])):(e.openBlock(),e.createElementBlock("div",ol,[e.createElementVNode("table",sl,[e.createElementVNode("tbody",rl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.id||r.label},[e.createElementVNode("td",il,[e.createElementVNode("div",ll,[r.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([r.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.label)+" ",1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:r.tooltip},s[2]||(s[2]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,al)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",cl,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])]))),128))])])]))],14,zi))}}),[["__scopeId","data-v-106790ef"]]),dl={draw:{toolbar:{actions:{title:"Скасувати малювання",text:"Скасувати"},finish:{title:"Завершити малювання",text:"Завершити"},undo:{title:"Видалити останню точку",text:"Видалити останню"},buttons:{polyline:"Намалювати лінію",polygon:"Намалювати полігон",rectangle:"Намалювати прямокутник",circle:"Намалювати коло",marker:"Додати точку",circlemarker:"Додати маркер-коло"}},handlers:{circle:{tooltip:{start:"Клацніть і тягніть, щоб намалювати коло",end:"Відпустіть кнопку миші, щоб завершити"},radius:"Радіус"},circlemarker:{tooltip:{start:"Клацніть на карту, щоб додати маркер-коло"}},marker:{tooltip:{start:"Клацніть на карту, щоб додати точку"}},polygon:{tooltip:{start:"Клацніть, щоб почати малювати полігон",cont:"Клацайте, щоб продовжити малювати полігон",end:"Клацніть першу точку, щоб завершити полігон"}},polyline:{error:"<strong>Помилка:</strong> лінія не може перетинатися сама з собою",tooltip:{start:"Клацніть, щоб почати малювати лінію",cont:"Клацайте, щоб продовжити малювати лінію",end:"Клацніть останню точку, щоб завершити лінію"}},rectangle:{tooltip:{start:"Клацніть і тягніть, щоб намалювати прямокутник",end:"Відпустіть кнопку миші, щоб завершити"}},simpleshape:{tooltip:{end:"Відпустіть кнопку миші, щоб завершити"}}}},edit:{toolbar:{actions:{save:{title:"Зберегти зміни",text:"Зберегти"},cancel:{title:"Скасувати редагування",text:"Скасувати"},clearAll:{title:"Очистити всі шари",text:"Очистити все"}},buttons:{edit:"Редагувати шари",editDisabled:"Немає шарів для редагування",remove:"Видалити шари",removeDisabled:"Немає шарів для видалення"}},handlers:{edit:{tooltip:{text:"Перетягніть маркери, щоб редагувати шари",subtext:"Натисніть 'Скасувати', щоб повернутися"}},remove:{tooltip:{text:"Клацніть на шари, щоб видалити їх"}}}}};function ho(t){return t?t.type==="FeatureCollection"||t.type==="Feature"?t:t.geom?{type:"Feature",geometry:{type:t.geom.type,coordinates:t.geom.coordinates},properties:{}}:t.type&&t.coordinates?{type:"Feature",geometry:t,properties:{}}:null:null}const pl={key:0,class:"absolute inset-0 z-[600] flex items-center justify-center pointer-events-none bg-black/20"},fl={class:"bg-black/70 text-white text-xs sm:text-sm px-4 py-2 rounded-md shadow"},ml={class:"bg-white/95 border border-gray-200 rounded-md shadow-xl px-3 py-2 max-w-[240px] text-[11px] sm:text-xs text-gray-900"},ul={class:"space-y-0.5"},hl={class:"text-gray-500"},gl={class:"text-gray-900 text-right break-all"},yl={key:2,class:"absolute bottom-3 left-3 z-[400] bg-white/90 border border-gray-200 rounded-md shadow px-3 py-2 text-[11px] sm:text-xs space-y-1 max-w-[220px]"},vl={class:"leading-tight"},bl={key:4,class:"bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"},kl={class:"flex items-center justify-between p-2 border-b"},El={class:"p-2 border-b"},Nl={class:"flex items-center"},wl=["value"],xl={class:"ml-2"},_l={class:"p-2"},Cl={class:"flex items-center"},Sl=["checked","onChange"],Bl={class:"ml-2"},_t=e.defineComponent({__name:"MapWidget",props:{pattern:{},geom:{},id:{},katottg:{},tms:{},layers:{},title:{},height:{},bounds:{},legend:{}},setup(t){function n(h){let v=h?.parent??null;for(;v;){const S=v.props?.view;if(S==="tabs"||S==="vertical-tabs")return!0;v=v.parent??null}return!1}const o=t,s=e.getCurrentInstance(),r=e.inject("vsCardTabsContext",!1),l=e.computed(()=>(typeof r=="boolean"?r:r.value)?!0:n(s)),i=s?.appContext.config.globalProperties?.$settings??{},a=(()=>{const h=Array.isArray(i.center)?i.center:[],v=Number(h[0]),S=Number(h[1]);return Number.isFinite(v)&&Number.isFinite(S)?[v,S]:[50,30]})(),c=s?.uid??Math.floor(Math.random()*1e4),p=e.ref(null);let m,f,u,E;const x=be(),_=e.ref(Object.keys(x)[0]),w=`base-layer-${c}`;let C;const I=e.ref(!0),$=e.ref(!1),D=e.ref(!1),B=e.ref(!1),H=e.ref("Використовуйте Ctrl + колесо миші для зміни масштабу");let Z=null;const P=e.ref([]),M=e.reactive({}),z=e.ref([]),j=e.computed(()=>z.value.map(h=>M[h]).filter(Boolean)),k=e.ref(null),T=e.computed(()=>k.value?.entries??[]),N=e.computed(()=>{if(!k.value)return;const h=12,v=k.value.point.x+h,S=k.value.point.y+h;return{left:`${v}px`,top:`${S}px`}}),O=e.computed(()=>Array.isArray(o.legend)?o.legend.map((h,v)=>{const S=typeof h?.color=="string"?h.color.trim():"",d=typeof h?.label=="string"?h.label.trim():"";return!S||!d?null:{color:S,label:d,key:`${d}-${v}`}}).filter(h=>!!h):[]),G=e.computed(()=>{if($.value)return"fixed inset-0 w-screen h-screen z-[9999] bg-white";const h=["relative","h-full"];return o.height||h.push("min-h-[300px]"),o.title&&!l.value&&h.push("pb-[3.25rem]"),h.join(" ")}),ae=e.computed(()=>$.value||o.height==null?void 0:{height:typeof o.height=="number"?`${o.height}px`:String(o.height)}),Me=e.computed(()=>{const h=["w-full","h-full"];return!o.height&&!$.value&&h.push("min-h-[300px]"),h.join(" ")});async function $e(){const h=d=>{if(!Array.from(document.styleSheets??[]).some(y=>y?.href?.includes(d))){const y=document.createElement("link");y.rel="stylesheet",y.href=d,document.head.appendChild(y)}};h("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),h("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css");const v=d=>new Promise((g,y)=>{if(Array.from(document.scripts??[]).some(R=>R.src===d))return g();const L=document.createElement("script");L.src=d,L.async=!0,L.onload=()=>g(),L.onerror=R=>y(R),document.body.appendChild(L)});return await v("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").catch(()=>{}),await v("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js").catch(()=>{}),await v("https://unpkg.com/leaflet.vectorgrid@1.3.0/dist/Leaflet.VectorGrid.bundled.js").catch(()=>{}),window.L}function be(){const h=v=>v.map((S,d)=>{const g=typeof S?.key=="string"&&S.key?S.key:`b${d}`,y=we(S?.url);return y?{...S,key:g,url:y}:null}).filter(S=>!!S).reduce((S,d)=>({...S,[d.key]:d}),{});return Array.isArray(i?.basemaps)&&i.basemaps.length?h(i.basemaps):h([{key:"topo100",url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"},{key:"orto10",url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png"},{key:"osmb",url:"https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"}])}function we(h){if(typeof h!="string"||!h.trim())return"";const v=h.trim();if(/^https?:\/\//i.test(v))return v;const S=window.location?.origin??"",d=v.replace(/^\/+/,"");return S?`${S}/${d}`:`/${d}`}function xe(h,v){return h?.id!=null?String(h.id):h?.url?`${h.url}-${v}`:`layer-${v}`}function Jn(h){if(!h||typeof h!="object")return;const v={},S=b=>{if(typeof b=="string"){const A=b.trim().replace(/,+$/,"");return A?/^-?\d+(\.\d+)?$/.test(A)?Number(A):A:void 0}return b},d=()=>(v.colorSet||(v.colorSet={}),v.colorSet),g=(b,A)=>{if(b==null||typeof A!="string")return;const L=A.trim().replace(/,+$/,"");L&&(d()[String(b)]=L)},y=b=>{const A=["color","fill","hex","valueColor","value_color"].map(R=>b[R]).find(R=>typeof R=="string"&&R.trim());if(!A)return!1;const L=["value","key","id","code","status"].map(R=>b[R]).find(R=>R!=null&&R!=="");return L==null?!1:(g(L,A),!0)};return Object.entries(h).forEach(([b,A])=>{if(b==="colorSet"&&A!=null){Array.isArray(A)?A.forEach(R=>{R&&(typeof R=="object"&&y(R)||typeof R=="object"&&Object.entries(R).forEach(([se,ke])=>g(se,typeof ke=="string"?ke:void 0)))}):typeof A=="object"&&(y(A)||Object.entries(A).forEach(([R,se])=>g(R,typeof se=="string"?se:void 0)));return}const L=S(A);if(L!==void 0){if(b==="border"){typeof L=="number"&&v.width==null?v.width=L:typeof L=="string"&&v.stroke==null&&(v.stroke=L);return}v[b]=L}}),v.colorSet&&!Object.keys(v.colorSet).length&&delete v.colorSet,Object.keys(v).length?v:void 0}function Zn(){if(Array.isArray(o.layers)&&o.layers.length)return o.layers.map((v,S)=>{if(!v)return null;const d=xe(v,S),g=v.url||(o.pattern&&d?o.pattern.replace("{{id}}",String(v.id??d)):"");return g?{...v,id:d,url:g,name:v.name||`Шар ${S+1}`,style:Jn(v.style)}:null}).filter(v=>!!v?.url);const h=Array.isArray(o.tms)?o.tms:o.tms?.split(",");return h?h.map((v,S)=>{if(!v)return null;const d=typeof v=="string"?v.trim():`${v}`;if(!d)return null;const g=`legacy-${S}`,y=o.pattern?o.pattern.replace("{{id}}",d):d;return{id:g,name:`Шар ${S+1}`,url:y,visible:!0}}).filter(v=>!!v?.url):[]}function We(h){const v=(h?.url??"").trim();if(!v)return"";if(/^https?:\/\//i.test(v))return v;const S=window.location?.origin??"",d=v.replace(/^\/+/,"");return`${S}/${d}`}function Jt(h){const v=h.style??{};return S=>{const d=v.colorAttr,g=v.colorSet??{},y=typeof d=="string"?g?.[S?.[d]]??v.color??"#3388ff":v.color??"#3388ff",b=v.stroke??y;return{weight:v.width??1,color:b,opacity:v.opacity??1,fill:v.type?v.type!=="polyline":!0,fillColor:y,fillOpacity:v.opacity??.5}}}function Zt(h,v){if(!m||!v?.latlng||h.popup===!1)return;const S=m.latLngToContainerPoint(v.latlng),d=Yt(v),g=Xt(h,d);if(!g.length){Ke(h.id);return}k.value={layerId:h.id,title:d?.name??h.name,properties:d,entries:g,point:{x:S.x,y:S.y}}}function Ke(h){h&&k.value?.layerId!==h||(k.value=null)}function Yt(h){return h?.layer?.properties||h?.layer?.feature?.properties||h?.properties||h?.data||{}}function Xt(h,v={}){const S=d=>d==null||d===""?"—":typeof d=="object"?JSON.stringify(d):String(d);return h.popup&&Array.isArray(h.popup)&&h.popup.length?h.popup.map(d=>({label:d.label||d.field,value:S(v?.[d.field])})):Object.entries(v).map(([d,g])=>({label:d,value:S(g)}))}function Yn(h,v){if(!m||h.popup===!1||!v?.latlng)return;const S=Yt(v),d=Xt(h,S);if(!d.length)return;const g=['<div class="map-popup">'];g.push('<div class="map-popup__body">'),d.forEach(y=>{g.push(`<div class="map-popup__row"><span class="map-popup__label">${y.label}: </span><span class="map-popup__value">${y.value}</span></div>`)}),g.push("</div></div>"),E.popup({maxWidth:360}).setLatLng(v.latlng).setContent(g.join("")).openOn(m)}e.onMounted(async()=>{E=await $e(),E.drawLocal={...dl};const h=typeof i?.zoom=="number"&&Number.isFinite(i.zoom)?i.zoom:10;m=E.map(p.value,{zoomControl:!1}).setView(a,h),E.control.zoom({position:"bottomright"}).addTo(m),C=E.tileLayer(x[_.value].url,{maxZoom:19}).addTo(m),f=new E.FeatureGroup().addTo(m),vt(),Ge(),Z=en();const v=ho(o.geom);if(v){const S=[];E.geoJSON(v).eachLayer(d=>S.push(d)),S.length&&f.addLayer(S[0]),bt()}if(p.value){const S=new ResizeObserver(()=>{m&&m.invalidateSize()});S.observe(p.value),e.onBeforeUnmount(()=>{S.disconnect()})}});function Xn(){if(!f)return;f.clearLayers();const h=ho(o.geom);if(!h)return;const v=[];E.geoJSON(h).eachLayer(S=>v.push(S)),v.length&&(v.forEach(S=>f.addLayer(S)),bt())}e.onBeforeUnmount(()=>{Z?.(),eo(),u&&m?.hasLayer(u)&&m.removeLayer(u)});function Qn(h){const v=(h?.service??"").toLowerCase();if(v)return v;const S=(h?.url??"").toLowerCase();return/\.(mvt|pbf|vtile|vmt)(\?|$)/.test(S)?"vtile":/service=wms|request=getmap|\/(wms|ows)(\?|$)/.test(S)?"wms":""}function _e(h){const v=Qn(h),S=We(h),g={opacity:h?.style?.opacity??1,...h.options??{}},y=!!(h?.style&&Object.keys(h.style).length),b=h.sourceLayer||h.layer||h.service_layer||h.service_key||h.map_key||h.dataset?.layer||h.id;if(v==="vtile"){const A=E?.vectorGrid;if(A?.protobuf&&(y||!E?.maplibreGL)){const L=A.protobuf(S,{interactive:!0,maxNativeZoom:h.maxzoom??19,vectorTileLayerStyles:{[b??"default"]:Jt(h),default:Jt(h)}});return L.on?.("mouseover",R=>Zt(h,R)),L.on?.("mousemove",R=>Zt(h,R)),L.on?.("mouseout",()=>Ke(h.id)),L.on?.("click",R=>Yn(h,R)),L}if(!y&&E?.maplibreGL&&window?.maplibregl){const L=S;return E.maplibreGL({style:L,interactive:!1,pane:"overlayPane"})}}if(v==="wms"&&E?.tileLayer?.wms){const A={...h.params??{}};return b&&!A.layers&&(A.layers=b),A.format==null&&(A.format="image/png"),A.transparent==null&&(A.transparent=!0),E.tileLayer.wms(S,{...A,...g})}return E.tileLayer(S,g)}function gt(h){const v=("bounds"in h?h.bounds:void 0)??o.bounds??P.value;if(!Array.isArray(v)||!v.length||!E)return null;const d={color:h.style?.stroke??h.style?.color??"#2563eb",weight:h.style?.width??2,interactive:!1,opacity:h.style?.opacity??.8,dashArray:"4 4"},g=Array.isArray(h.bounds)&&h.bounds.length?h.bounds:v,y=Vn(g);if(!y.length||!E.polyline)return null;const b=y.map(A=>{if(!A.length)return A;const L=A[0],R=A[A.length-1];return L&&R&&(!R.equals||!R.equals(L))?[...A,L]:A});return E.polyline(b,d)}function Vn(h){const v=g=>{if(!Array.isArray(g)||g.length<2)return null;const[y,b]=g;return!Number.isFinite(Number(b))||!Number.isFinite(Number(y))?null:E.latLng(Number(b),Number(y))},S=g=>Array.isArray(g)&&g.length>=2&&g.every(y=>Number.isFinite(Number(y))),d=g=>Array.isArray(g)?g.map(v).filter(Boolean):[];if(!Array.isArray(h))return[];if(h.length&&S(h[0])){const g=h.map(v).filter(Boolean);return g.length?[g]:[]}if(h.length&&Array.isArray(h[0])){if(S(h[0][0]))return h.map(y=>d(y)).filter(y=>y.length);if(Array.isArray(h[0][0])&&S(h[0][0][0]))return h.flatMap(y=>Array.isArray(y)?y.map(b=>d(b)).filter(b=>b.length):[]).filter(y=>y.length)}return[]}function eo(){Object.values(M).forEach(h=>{h.layer&&m?.hasLayer(h.layer)&&m.removeLayer(h.layer),h.boundsLayer&&m?.hasLayer(h.boundsLayer)&&m.removeLayer(h.boundsLayer),h.layer=null,h.boundsLayer=null}),Ke()}function Ge(){if(!m)return;u&&m.hasLayer(u)&&m.removeLayer(u);const h=gt({id:"global-bounds",bounds:o.bounds,style:{}});h?(u=h,u.addTo(m)):u=null}function yt(){m&&z.value.forEach(h=>{const v=M[h];v&&(v.visible?(v.layer||(v.layer=_e(v.config)),v.boundsLayer||(v.boundsLayer=gt(v.config)),v.layer&&!m.hasLayer(v.layer)&&v.layer.addTo(m),v.boundsLayer&&!m.hasLayer(v.boundsLayer)&&v.boundsLayer.addTo(m)):(v.layer&&m.hasLayer(v.layer)&&m.removeLayer(v.layer),v.boundsLayer&&m.hasLayer(v.boundsLayer)&&m.removeLayer(v.boundsLayer)))})}function vt(){const h=Zn(),v=[],S=new Set;h.forEach((d,g)=>{const y=xe(d,g);v.push(y),S.add(y);const b=M[y];b&&b.config.url!==d.url&&(b.layer&&m?.hasLayer(b.layer)&&m.removeLayer(b.layer),b.layer=null);const A=b?.visible??d.visible??d.overlay!==!1;M[y]={id:y,config:{...d,id:y},visible:A,layer:b?.layer??null,boundsLayer:b?.boundsLayer??null}}),Object.keys(M).forEach(d=>{if(!S.has(d)){const g=M[d];g?.layer&&m?.hasLayer(g.layer)&&m.removeLayer(g.layer),delete M[d]}}),z.value=v,m&&yt()}function to(h,v){const S=typeof v=="boolean"?v:v.target?.checked;if(S==null)return;const d=M[h];d&&(d.visible=S,d.visible?(d.layer||(d.layer=_e(d.config)),d.boundsLayer||(d.boundsLayer=gt(d.config)),d.layer&&!m.hasLayer(d.layer)&&d.layer.addTo(m),d.boundsLayer&&!m.hasLayer(d.boundsLayer)&&d.boundsLayer.addTo(m)):(d.layer&&m.hasLayer(d.layer)&&(m.removeLayer(d.layer),Ke(h)),d.boundsLayer&&m.hasLayer(d.boundsLayer)&&m.removeLayer(d.boundsLayer)))}function no(h){Qt(h),_.value=h}function Qt(h){if(!m||!x[h])return;C&&C.removeFrom(m);const v=x[h];C=E.tileLayer(v.url,v.options||{}).addTo(m),C.bringToBack()}function Vt(){!m||!f||I.value&&!m.hasLayer(f)&&f.addTo(m)}function oo(){no(_.value)}function so(){I.value?f.addTo(m):f.removeFrom(m)}function bt(h=30){const v=f.getLayers();if(!v.length)return;const d=E.featureGroup(v).getBounds();d&&d.isValid()&&m.fitBounds(d,{padding:[h,h],maxZoom:16})}function en(){if(!m||!p.value)return null;m.scrollWheelZoom.disable(),H.value="Використовуйте Ctrl + колесо миші для зміни масштабу";let h;const v=(d=1500)=>{B.value=!0,h&&clearTimeout(h),h=window.setTimeout(()=>B.value=!1,d)},S=d=>{if(!(d.ctrlKey||d.metaKey||d.shiftKey)){v(),m.scrollWheelZoom.disable();return}d.preventDefault(),d.stopPropagation(),m.scrollWheelZoom.enable(),B.value=!1,h&&clearTimeout(h),h=window.setTimeout(()=>m.scrollWheelZoom.disable(),200)};return p.value.addEventListener("wheel",S,{passive:!1}),()=>{m.scrollWheelZoom.enable(),p.value?.removeEventListener("wheel",S),h&&clearTimeout(h),B.value=!1}}return e.watch($,async()=>{await e.nextTick(),requestAnimationFrame(()=>{m?.invalidateSize(!0),Qt(_.value),Vt(),yt(),u&&!m?.hasLayer(u)&&u.addTo(m)})}),e.watch(()=>o.layers,()=>vt(),{deep:!0}),e.watch(()=>[o.tms,o.pattern],()=>{o.layers?.length||vt()}),e.watch(()=>o.bounds,()=>Ge(),{deep:!0}),e.watch(()=>o.geom,()=>Xn(),{deep:!0}),e.watch(()=>o.katottg,async h=>{if(P.value=[],!h){Ge();return}try{const v=await fetch(`https://data.gki.com.ua/api-user/atu/${h}`);if(!v?.ok)return;const d=(await v.json())?.geometry?.coordinates;Array.isArray(d)&&d.length&&(P.value=d)}catch(v){console.error("Failed to fetch KATOTTG bounds",v)}finally{Ge(),yt()}},{immediate:!0}),(h,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(G.value),style:e.normalizeStyle(ae.value)},[e.createElementVNode("div",{ref_key:"mapContainer",ref:p,class:e.normalizeClass(Me.value)},null,2),B.value?(e.openBlock(),e.createElementBlock("div",pl,[e.createElementVNode("div",fl,e.toDisplayString(H.value),1)])):e.createCommentVNode("",!0),T.value.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:"absolute z-[550] pointer-events-none",style:e.normalizeStyle(N.value)},[e.createElementVNode("div",ml,[e.createElementVNode("dl",ul,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,S=>(e.openBlock(),e.createElementBlock("div",{key:`${S.label}-${S.value}`,class:"flex justify-between gap-2"},[e.createElementVNode("dt",hl,e.toDisplayString(S.label),1),e.createElementVNode("dd",gl,e.toDisplayString(S.value),1)]))),128))])])],4)):e.createCommentVNode("",!0),O.value.length?(e.openBlock(),e.createElementBlock("div",yl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,S=>(e.openBlock(),e.createElementBlock("div",{key:S.key,class:"flex items-center gap-2 text-gray-800"},[e.createElementVNode("span",{class:"w-3.5 h-3.5 rounded-[2px] border border-black/10 shrink-0",style:e.normalizeStyle({backgroundColor:S.color})},null,4),e.createElementVNode("span",vl,e.toDisplayString(S.label),1)]))),128))])):e.createCommentVNode("",!0),D.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:3,onClick:v[0]||(v[0]=S=>D.value=!0),class:"z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer layers-button"}," Шари ")),D.value?(e.openBlock(),e.createElementBlock("div",bl,[e.createElementVNode("div",kl,[v[5]||(v[5]=e.createElementVNode("div",null,"Шари",-1)),(e.openBlock(),e.createElementBlock("svg",{onClick:v[1]||(v[1]=S=>D.value=!1),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4"},v[4]||(v[4]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)])))]),e.createElementVNode("div",El,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(x),(S,d)=>(e.openBlock(),e.createElementBlock("div",{key:`base-${d}`},[e.createElementVNode("label",Nl,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:w,value:d,"onUpdate:modelValue":v[2]||(v[2]=g=>_.value=g),onChange:oo},null,40,wl),[[e.vModelRadio,_.value]]),e.createElementVNode("span",xl,e.toDisplayString(S.name||d),1)])]))),128))]),e.createElementVNode("div",_l,[e.createElementVNode("label",Cl,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":v[3]||(v[3]=S=>I.value=S),onChange:so},null,544),[[e.vModelCheckbox,I.value]]),v[6]||(v[6]=e.createElementVNode("span",{class:"ml-2"},"Геометрія/Межі",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,S=>(e.openBlock(),e.createElementBlock("label",{class:"flex items-center",key:S.id},[e.createElementVNode("input",{type:"checkbox",checked:S.visible,onChange:d=>to(S.id,d)},null,40,Sl),e.createElementVNode("span",Bl,e.toDisplayString(S.config.name||S.id),1)]))),128))])])):e.createCommentVNode("",!0)],6))}});/**
|
|
132
132
|
* @vue/shared v3.5.18
|
|
133
133
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
134
134
|
* @license MIT
|
|
135
|
-
**//*! #__NO_SIDE_EFFECTS__ */function Ee(t){const n=Object.create(null);for(const
|
|
135
|
+
**//*! #__NO_SIDE_EFFECTS__ */function Ee(t){const n=Object.create(null);for(const o of t.split(","))n[o]=1;return o=>o in n}const $l=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const an=()=>{},Ct=()=>!1,cn=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Te=Object.assign,Ne=Array.isArray,te=t=>typeof t=="string",dn=t=>typeof t=="symbol",Tl=t=>t!==null&&typeof t=="object",go=Ee(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Dl=Ee("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),pn=t=>{const n=Object.create(null);return o=>n[o]||(n[o]=t(o))},Ol=/-(\w)/g,De=pn(t=>t.replace(Ol,(n,o)=>o?o.toUpperCase():"")),fn=pn(t=>t.charAt(0).toUpperCase()+t.slice(1)),Al=pn(t=>t?`on${fn(t)}`:""),ot={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"NEED_HYDRATION",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"CACHED",[-2]:"BAIL"},Ll={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},Il=/;(?![^(]*\))/g,Ml=/:([^]+)/,Pl=/\/\*[^]*?\*\//g;function Rl(t){const n={};return t.replace(Pl,"").split(Il).forEach(o=>{if(o){const s=o.split(Ml);s.length>1&&(n[s[0].trim()]=s[1].trim())}}),n}const Fl="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",jl="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",zl="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",Hl="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",Ul=Ee(Fl),ql=Ee(jl),Wl=Ee(zl),Kl=Ee(Hl);/**
|
|
136
136
|
* @vue/compiler-core v3.5.18
|
|
137
137
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
138
138
|
* @license MIT
|
|
139
|
-
**/const ot=Symbol(process.env.NODE_ENV!=="production"?"Fragment":""),rt=Symbol(process.env.NODE_ENV!=="production"?"Teleport":""),fn=Symbol(process.env.NODE_ENV!=="production"?"Suspense":""),Ct=Symbol(process.env.NODE_ENV!=="production"?"KeepAlive":""),fs=Symbol(process.env.NODE_ENV!=="production"?"BaseTransition":""),Pe=Symbol(process.env.NODE_ENV!=="production"?"openBlock":""),ms=Symbol(process.env.NODE_ENV!=="production"?"createBlock":""),us=Symbol(process.env.NODE_ENV!=="production"?"createElementBlock":""),mn=Symbol(process.env.NODE_ENV!=="production"?"createVNode":""),un=Symbol(process.env.NODE_ENV!=="production"?"createElementVNode":""),it=Symbol(process.env.NODE_ENV!=="production"?"createCommentVNode":""),hn=Symbol(process.env.NODE_ENV!=="production"?"createTextVNode":""),hs=Symbol(process.env.NODE_ENV!=="production"?"createStaticVNode":""),gn=Symbol(process.env.NODE_ENV!=="production"?"resolveComponent":""),yn=Symbol(process.env.NODE_ENV!=="production"?"resolveDynamicComponent":""),vn=Symbol(process.env.NODE_ENV!=="production"?"resolveDirective":""),bn=Symbol(process.env.NODE_ENV!=="production"?"resolveFilter":""),kn=Symbol(process.env.NODE_ENV!=="production"?"withDirectives":""),En=Symbol(process.env.NODE_ENV!=="production"?"renderList":""),gs=Symbol(process.env.NODE_ENV!=="production"?"renderSlot":""),ys=Symbol(process.env.NODE_ENV!=="production"?"createSlots":""),St=Symbol(process.env.NODE_ENV!=="production"?"toDisplayString":""),Bt=Symbol(process.env.NODE_ENV!=="production"?"mergeProps":""),Nn=Symbol(process.env.NODE_ENV!=="production"?"normalizeClass":""),wn=Symbol(process.env.NODE_ENV!=="production"?"normalizeStyle":""),lt=Symbol(process.env.NODE_ENV!=="production"?"normalizeProps":""),at=Symbol(process.env.NODE_ENV!=="production"?"guardReactiveProps":""),xn=Symbol(process.env.NODE_ENV!=="production"?"toHandlers":""),_n=Symbol(process.env.NODE_ENV!=="production"?"camelize":""),Ul=Symbol(process.env.NODE_ENV!=="production"?"capitalize":""),Cn=Symbol(process.env.NODE_ENV!=="production"?"toHandlerKey":""),$t=Symbol(process.env.NODE_ENV!=="production"?"setBlockTracking":""),ql=Symbol(process.env.NODE_ENV!=="production"?"pushScopeId":""),Wl=Symbol(process.env.NODE_ENV!=="production"?"popScopeId":""),Sn=Symbol(process.env.NODE_ENV!=="production"?"withCtx":""),Kl=Symbol(process.env.NODE_ENV!=="production"?"unref":""),Gl=Symbol(process.env.NODE_ENV!=="production"?"isRef":""),Bn=Symbol(process.env.NODE_ENV!=="production"?"withMemo":""),vs=Symbol(process.env.NODE_ENV!=="production"?"isMemoSame":""),Ge={[ot]:"Fragment",[rt]:"Teleport",[fn]:"Suspense",[Ct]:"KeepAlive",[fs]:"BaseTransition",[Pe]:"openBlock",[ms]:"createBlock",[us]:"createElementBlock",[mn]:"createVNode",[un]:"createElementVNode",[it]:"createCommentVNode",[hn]:"createTextVNode",[hs]:"createStaticVNode",[gn]:"resolveComponent",[yn]:"resolveDynamicComponent",[vn]:"resolveDirective",[bn]:"resolveFilter",[kn]:"withDirectives",[En]:"renderList",[gs]:"renderSlot",[ys]:"createSlots",[St]:"toDisplayString",[Bt]:"mergeProps",[Nn]:"normalizeClass",[wn]:"normalizeStyle",[lt]:"normalizeProps",[at]:"guardReactiveProps",[xn]:"toHandlers",[_n]:"camelize",[Ul]:"capitalize",[Cn]:"toHandlerKey",[$t]:"setBlockTracking",[ql]:"pushScopeId",[Wl]:"popScopeId",[Sn]:"withCtx",[Kl]:"unref",[Gl]:"isRef",[Bn]:"withMemo",[vs]:"isMemoSame"};function Jl(t){Object.getOwnPropertySymbols(t).forEach(n=>{Ge[n]=t[n]})}const ue={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function Zl(t,n=""){return{type:0,source:n,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:ue}}function ct(t,n,s,o,r,l,i,c=!1,d=!1,p=!1,m=ue){return t&&(c?(t.helper(Pe),t.helper(Ye(t.inSSR,p))):t.helper(Ze(t.inSSR,p)),i&&t.helper(kn)),{type:13,tag:n,props:s,children:o,patchFlag:r,dynamicProps:l,directives:i,isBlock:c,disableTracking:d,isComponent:p,loc:m}}function Re(t,n=ue){return{type:17,loc:n,elements:t}}function ye(t,n=ue){return{type:15,loc:n,properties:t}}function V(t,n){return{type:16,loc:ue,key:oe(t)?F(t,!0):t,value:n}}function F(t,n=!1,s=ue,o=0){return{type:4,loc:s,content:t,isStatic:n,constType:n?3:o}}function ve(t,n=ue){return{type:8,loc:n,children:t}}function se(t,n=[],s=ue){return{type:14,loc:s,callee:t,arguments:n}}function Je(t,n=void 0,s=!1,o=!1,r=ue){return{type:18,params:t,returns:n,newline:s,isSlot:o,loc:r}}function $n(t,n,s,o=!0){return{type:19,test:t,consequent:n,alternate:s,newline:o,loc:ue}}function Yl(t,n,s=!1,o=!1){return{type:20,index:t,value:n,needPauseTracking:s,inVOnce:o,needArraySpread:!1,loc:ue}}function Xl(t){return{type:21,body:t,loc:ue}}function Ze(t,n){return t||n?mn:un}function Ye(t,n){return t||n?ms:us}function Tn(t,{helper:n,removeHelper:s,inSSR:o}){t.isBlock||(t.isBlock=!0,s(Ze(o,t.isComponent)),n(Pe),n(Ye(o,t.isComponent)))}const bs=new Uint8Array([123,123]),ks=new Uint8Array([125,125]);function Es(t){return t>=97&&t<=122||t>=65&&t<=90}function he(t){return t===32||t===10||t===9||t===12||t===13}function De(t){return t===47||t===62||he(t)}function Tt(t){const n=new Uint8Array(t.length);for(let s=0;s<t.length;s++)n[s]=t.charCodeAt(s);return n}const re={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class Ql{constructor(n,s){this.stack=n,this.cbs=s,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=bs,this.delimiterClose=ks,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=bs,this.delimiterClose=ks}getPos(n){let s=1,o=n+1;for(let r=this.newlines.length-1;r>=0;r--){const l=this.newlines[r];if(n>l){s=r+2,o=n-l;break}}return{column:o,line:s,offset:n}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(n){n===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&n===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(n))}stateInterpolationOpen(n){if(n===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const s=this.index+1-this.delimiterOpen.length;s>this.sectionStart&&this.cbs.ontext(this.sectionStart,s),this.state=3,this.sectionStart=s}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(n)):(this.state=1,this.stateText(n))}stateInterpolation(n){n===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(n))}stateInterpolationClose(n){n===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(n))}stateSpecialStartSequence(n){const s=this.sequenceIndex===this.currentSequence.length;if(!(s?De(n):(n|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!s){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(n)}stateInRCDATA(n){if(this.sequenceIndex===this.currentSequence.length){if(n===62||he(n)){const s=this.index-this.currentSequence.length;if(this.sectionStart<s){const o=this.index;this.index=s,this.cbs.ontext(this.sectionStart,s),this.index=o}this.sectionStart=s+2,this.stateInClosingTagName(n),this.inRCDATA=!1;return}this.sequenceIndex=0}(n|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===re.TitleEnd||this.currentSequence===re.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&n===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(n)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(n===60)}stateCDATASequence(n){n===re.Cdata[this.sequenceIndex]?++this.sequenceIndex===re.Cdata.length&&(this.state=28,this.currentSequence=re.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(n))}fastForwardTo(n){for(;++this.index<this.buffer.length;){const s=this.buffer.charCodeAt(this.index);if(s===10&&this.newlines.push(this.index),s===n)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(n){n===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===re.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):n!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(n,s){this.enterRCDATA(n,s),this.state=31}enterRCDATA(n,s){this.inRCDATA=!0,this.currentSequence=n,this.sequenceIndex=s}stateBeforeTagName(n){n===33?(this.state=22,this.sectionStart=this.index+1):n===63?(this.state=24,this.sectionStart=this.index+1):Es(n)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:n===116?this.state=30:this.state=n===115?29:6):n===47?this.state=8:(this.state=1,this.stateText(n))}stateInTagName(n){De(n)&&this.handleTagName(n)}stateInSFCRootTagName(n){if(De(n)){const s=this.buffer.slice(this.sectionStart,this.index);s!=="template"&&this.enterRCDATA(Tt("</"+s),0),this.handleTagName(n)}}handleTagName(n){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(n)}stateBeforeClosingTagName(n){he(n)||(n===62?(process.env.NODE_ENV!=="production"&&this.cbs.onerr(14,this.index),this.state=1,this.sectionStart=this.index+1):(this.state=Es(n)?9:27,this.sectionStart=this.index))}stateInClosingTagName(n){(n===62||he(n))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(n))}stateAfterClosingTagName(n){n===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(n){n===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):n===47?(this.state=7,process.env.NODE_ENV!=="production"&&this.peek()!==62&&this.cbs.onerr(22,this.index)):n===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):he(n)||(process.env.NODE_ENV!=="production"&&n===61&&this.cbs.onerr(19,this.index),this.handleAttrStart(n))}handleAttrStart(n){n===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):n===46||n===58||n===64||n===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(n){n===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):he(n)||(this.state=11,this.stateBeforeAttrName(n))}stateInAttrName(n){n===61||De(n)?(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(n)):process.env.NODE_ENV!=="production"&&(n===34||n===39||n===60)&&this.cbs.onerr(17,this.index)}stateInDirName(n){n===61||De(n)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):n===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(n){n===61||De(n)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===91?this.state=15:n===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(n){n===93?this.state=14:(n===61||De(n))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(n),process.env.NODE_ENV!=="production"&&this.cbs.onerr(27,this.index))}stateInDirModifier(n){n===61||De(n)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(n){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(n)}stateAfterAttrName(n){n===61?this.state=18:n===47||n===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(n)):he(n)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(n))}stateBeforeAttrValue(n){n===34?(this.state=19,this.sectionStart=this.index+1):n===39?(this.state=20,this.sectionStart=this.index+1):he(n)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(n))}handleInAttrValue(n,s){(n===s||this.fastForwardTo(s))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(s===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(n){this.handleInAttrValue(n,34)}stateInAttrValueSingleQuotes(n){this.handleInAttrValue(n,39)}stateInAttrValueNoQuotes(n){he(n)||n===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(n)):(process.env.NODE_ENV!=="production"&&n===34||n===39||n===60||n===61||n===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(n){n===91?(this.state=26,this.sequenceIndex=0):this.state=n===45?25:23}stateInDeclaration(n){(n===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(n){(n===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(n){n===45?(this.state=28,this.currentSequence=re.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(n){(n===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(n){n===re.ScriptEnd[3]?this.startSpecial(re.ScriptEnd,4):n===re.StyleEnd[3]?this.startSpecial(re.StyleEnd,4):(this.state=6,this.stateInTagName(n))}stateBeforeSpecialT(n){n===re.TitleEnd[3]?this.startSpecial(re.TitleEnd,4):n===re.TextareaEnd[3]?this.startSpecial(re.TextareaEnd,4):(this.state=6,this.stateInTagName(n))}startEntity(){}stateInEntity(){}parse(n){for(this.buffer=n;this.index<this.buffer.length;){const s=this.buffer.charCodeAt(this.index);switch(s===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(s);break}case 2:{this.stateInterpolationOpen(s);break}case 3:{this.stateInterpolation(s);break}case 4:{this.stateInterpolationClose(s);break}case 31:{this.stateSpecialStartSequence(s);break}case 32:{this.stateInRCDATA(s);break}case 26:{this.stateCDATASequence(s);break}case 19:{this.stateInAttrValueDoubleQuotes(s);break}case 12:{this.stateInAttrName(s);break}case 13:{this.stateInDirName(s);break}case 14:{this.stateInDirArg(s);break}case 15:{this.stateInDynamicDirArg(s);break}case 16:{this.stateInDirModifier(s);break}case 28:{this.stateInCommentLike(s);break}case 27:{this.stateInSpecialComment(s);break}case 11:{this.stateBeforeAttrName(s);break}case 6:{this.stateInTagName(s);break}case 34:{this.stateInSFCRootTagName(s);break}case 9:{this.stateInClosingTagName(s);break}case 5:{this.stateBeforeTagName(s);break}case 17:{this.stateAfterAttrName(s);break}case 20:{this.stateInAttrValueSingleQuotes(s);break}case 18:{this.stateBeforeAttrValue(s);break}case 8:{this.stateBeforeClosingTagName(s);break}case 10:{this.stateAfterClosingTagName(s);break}case 29:{this.stateBeforeSpecialS(s);break}case 30:{this.stateBeforeSpecialT(s);break}case 21:{this.stateInAttrValueNoQuotes(s);break}case 7:{this.stateInSelfClosingTag(s);break}case 23:{this.stateInDeclaration(s);break}case 22:{this.stateBeforeDeclaration(s);break}case 25:{this.stateBeforeComment(s);break}case 24:{this.stateInProcessingInstruction(s);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const n=this.buffer.length;this.sectionStart>=n||(this.state===28?this.currentSequence===re.CdataEnd?this.cbs.oncdata(this.sectionStart,n):this.cbs.oncomment(this.sectionStart,n):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,n))}emitCodePoint(n,s){}}const Vl={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:t=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${t}.sync\` should be changed to \`v-model:${t}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function Dn(t,{compatConfig:n}){const s=n&&n[t];return t==="MODE"?s||3:s}function Oe(t,n){const s=Dn("MODE",n),o=Dn(t,n);return s===3?o===!0:o!==!1}function Xe(t,n,s,...o){const r=Oe(t,n);return process.env.NODE_ENV!=="production"&&r&&Dt(t,n,s,...o),r}function Dt(t,n,s,...o){if(Dn(t,n)==="suppress-warning")return;const{message:l,link:i}=Vl[t],c=`(deprecation ${t}) ${typeof l=="function"?l(...o):l}${i?`
|
|
140
|
-
Details: ${i}`:""}`,
|
|
141
|
-
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',53:""},de=t=>t.type===4&&t.isStatic;function ws(t){switch(t){case"Teleport":case"teleport":return rt;case"Suspense":case"suspense":return fn;case"KeepAlive":case"keep-alive":return Ct;case"BaseTransition":case"base-transition":return fs}}const ta=/^$|^\d|[^\$\w\xA0-\uFFFF]/,An=t=>!ta.test(t),na=/[A-Za-z_$\xA0-\uFFFF]/,sa=/[\.\?\w$\xA0-\uFFFF]/,oa=/\s+[.[]\s*|\s*[.[]\s+/g,xs=t=>t.type===4?t.content:t.loc.source,_s=t=>{const n=xs(t).trim().replace(oa,c=>c.trim());let s=0,o=[],r=0,l=0,i=null;for(let c=0;c<n.length;c++){const d=n.charAt(c);switch(s){case 0:if(d==="[")o.push(s),s=1,r++;else if(d==="(")o.push(s),s=2,l++;else if(!(c===0?na:sa).test(d))return!1;break;case 1:d==="'"||d==='"'||d==="`"?(o.push(s),s=3,i=d):d==="["?r++:d==="]"&&(--r||(s=o.pop()));break;case 2:if(d==="'"||d==='"'||d==="`")o.push(s),s=3,i=d;else if(d==="(")l++;else if(d===")"){if(c===n.length-1)return!1;--l||(s=o.pop())}break;case 3:d===i&&(s=o.pop(),i=null);break}}return!r&&!l},ra=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,ia=t=>ra.test(xs(t));function Cs(t,n){if(!t)throw new Error(n||"unexpected compiler condition")}function pe(t,n,s=!1){for(let o=0;o<t.props.length;o++){const r=t.props[o];if(r.type===7&&(s||r.exp)&&(oe(n)?r.name===n:n.test(r.name)))return r}}function dt(t,n,s=!1,o=!1){for(let r=0;r<t.props.length;r++){const l=t.props[r];if(l.type===6){if(s)continue;if(l.name===n&&(l.value||o))return l}else if(l.name==="bind"&&(l.exp||o)&&Ae(l.arg,n))return l}}function Ae(t,n){return!!(t&&de(t)&&t.content===n)}function la(t){return t.props.some(n=>n.type===7&&n.name==="bind"&&(!n.arg||n.arg.type!==4||!n.arg.isStatic))}function Ln(t){return t.type===5||t.type===2}function Ss(t){return t.type===7&&t.name==="pre"}function aa(t){return t.type===7&&t.name==="slot"}function Ot(t){return t.type===1&&t.tagType===3}function At(t){return t.type===1&&t.tagType===2}const ca=new Set([lt,at]);function Bs(t,n=[]){if(t&&!oe(t)&&t.type===14){const s=t.callee;if(!oe(s)&&ca.has(s))return Bs(t.arguments[0],n.concat(t))}return[t,n]}function Lt(t,n,s){let o,r=t.type===13?t.props:t.arguments[2],l=[],i;if(r&&!oe(r)&&r.type===14){const c=Bs(r);r=c[0],l=c[1],i=l[l.length-1]}if(r==null||oe(r))o=ye([n]);else if(r.type===14){const c=r.arguments[0];!oe(c)&&c.type===15?$s(n,c)||c.properties.unshift(n):r.callee===xn?o=se(s.helper(Bt),[ye([n]),r]):r.arguments.unshift(ye([n])),!o&&(o=r)}else r.type===15?($s(n,r)||r.properties.unshift(n),o=r):(o=se(s.helper(Bt),[ye([n]),r]),i&&i.callee===at&&(i=l[l.length-2]));t.type===13?i?i.arguments[0]=o:t.props=o:i?i.arguments[0]=o:t.arguments[2]=o}function $s(t,n){let s=!1;if(t.key.type===4){const o=t.key.content;s=n.properties.some(r=>r.key.type===4&&r.key.content===o)}return s}function pt(t,n){return`_${n}_${t.replace(/[^\w]/g,(s,o)=>s==="-"?"_":t.charCodeAt(o).toString())}`}function da(t){return t.type===14&&t.callee===Bn?t.arguments[1].returns:t}const pa=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,Ts={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:_t,isPreTag:_t,isIgnoreNewlineTag:_t,isCustomElement:_t,onError:On,onWarn:Ns,comments:process.env.NODE_ENV!=="production",prefixIdentifiers:!1};let K=Ts,ft=null,Ce="",le=null,U=null,fe="",Se=-1,Fe=-1,In=0,Le=!1,Mn=null;const X=[],Z=new Ql(X,{onerr:me,ontext(t,n){It(ie(t,n),t,n)},ontextentity(t,n,s){It(t,n,s)},oninterpolation(t,n){if(Le)return It(ie(t,n),t,n);let s=t+Z.delimiterOpen.length,o=n-Z.delimiterClose.length;for(;he(Ce.charCodeAt(s));)s++;for(;he(Ce.charCodeAt(o-1));)o--;let r=ie(s,o);r.includes("&")&&(r=K.decodeEntities(r,!1)),Pn({type:5,content:Pt(r,!1,te(s,o)),loc:te(t,n)})},onopentagname(t,n){const s=ie(t,n);le={type:1,tag:s,ns:K.getNamespace(s,X[0],K.ns),tagType:0,props:[],children:[],loc:te(t-1,n),codegenNode:void 0}},onopentagend(t){Os(t)},onclosetag(t,n){const s=ie(t,n);if(!K.isVoidTag(s)){let o=!1;for(let r=0;r<X.length;r++)if(X[r].tag.toLowerCase()===s.toLowerCase()){o=!0,r>0&&me(24,X[0].loc.start.offset);for(let i=0;i<=r;i++){const c=X.shift();Mt(c,n,i<r)}break}o||me(23,As(t,60))}},onselfclosingtag(t){const n=le.tag;le.isSelfClosing=!0,Os(t),X[0]&&X[0].tag===n&&Mt(X.shift(),t)},onattribname(t,n){U={type:6,name:ie(t,n),nameLoc:te(t,n),value:void 0,loc:te(t)}},ondirname(t,n){const s=ie(t,n),o=s==="."||s===":"?"bind":s==="@"?"on":s==="#"?"slot":s.slice(2);if(!Le&&o===""&&me(26,t),Le||o==="")U={type:6,name:s,nameLoc:te(t,n),value:void 0,loc:te(t)};else if(U={type:7,name:o,rawName:s,exp:void 0,arg:void 0,modifiers:s==="."?[F("prop")]:[],loc:te(t)},o==="pre"){Le=Z.inVPre=!0,Mn=le;const r=le.props;for(let l=0;l<r.length;l++)r[l].type===7&&(r[l]=Na(r[l]))}},ondirarg(t,n){if(t===n)return;const s=ie(t,n);if(Le&&!Ss(U))U.name+=s,ze(U.nameLoc,n);else{const o=s[0]!=="[";U.arg=Pt(o?s:s.slice(1,-1),o,te(t,n),o?3:0)}},ondirmodifier(t,n){const s=ie(t,n);if(Le&&!Ss(U))U.name+="."+s,ze(U.nameLoc,n);else if(U.name==="slot"){const o=U.arg;o&&(o.content+="."+s,ze(o.loc,n))}else{const o=F(s,!0,te(t,n));U.modifiers.push(o)}},onattribdata(t,n){fe+=ie(t,n),Se<0&&(Se=t),Fe=n},onattribentity(t,n,s){fe+=t,Se<0&&(Se=n),Fe=s},onattribnameend(t){const n=U.loc.start.offset,s=ie(n,t);U.type===7&&(U.rawName=s),le.props.some(o=>(o.type===7?o.rawName:o.name)===s)&&me(2,n)},onattribend(t,n){if(le&&U){if(ze(U.loc,n),t!==0)if(fe.includes("&")&&(fe=K.decodeEntities(fe,!0)),U.type===6)U.name==="class"&&(fe=Ms(fe).trim()),t===1&&!fe&&me(13,n),U.value={type:2,content:fe,loc:t===1?te(Se,Fe):te(Se-1,Fe+1)},Z.inSFCRoot&&le.tag==="template"&&U.name==="lang"&&fe&&fe!=="html"&&Z.enterRCDATA(Tt("</template"),0);else{let s=0;U.exp=Pt(fe,!1,te(Se,Fe),0,s),U.name==="for"&&(U.forParseResult=ma(U.exp));let o=-1;U.name==="bind"&&(o=U.modifiers.findIndex(r=>r.content==="sync"))>-1&&Xe("COMPILER_V_BIND_SYNC",K,U.loc,U.arg.loc.source)&&(U.name="model",U.modifiers.splice(o,1))}(U.type!==7||U.name!=="pre")&&le.props.push(U)}fe="",Se=Fe=-1},oncomment(t,n){K.comments&&Pn({type:3,content:ie(t,n),loc:te(t-4,n+3)})},onend(){const t=Ce.length;if(process.env.NODE_ENV!=="production"&&Z.state!==1)switch(Z.state){case 5:case 8:me(5,t);break;case 3:case 4:me(25,Z.sectionStart);break;case 28:Z.currentSequence===re.CdataEnd?me(6,t):me(7,t);break;case 6:case 7:case 9:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:me(9,t);break}for(let n=0;n<X.length;n++)Mt(X[n],t-1),me(24,X[n].loc.start.offset)},oncdata(t,n){X[0].ns!==0?It(ie(t,n),t,n):me(1,t-9)},onprocessinginstruction(t){(X[0]?X[0].ns:K.ns)===0&&me(21,t-1)}}),Ds=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,fa=/^\(|\)$/g;function ma(t){const n=t.loc,s=t.content,o=s.match(pa);if(!o)return;const[,r,l]=o,i=(f,h,y=!1)=>{const x=n.start.offset+h,_=x+f.length;return Pt(f,!1,te(x,_),0,y?1:0)},c={source:i(l.trim(),s.indexOf(l,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let d=r.trim().replace(fa,"").trim();const p=r.indexOf(d),m=d.match(Ds);if(m){d=d.replace(Ds,"").trim();const f=m[1].trim();let h;if(f&&(h=s.indexOf(f,p+d.length),c.key=i(f,h,!0)),m[2]){const y=m[2].trim();y&&(c.index=i(y,s.indexOf(y,c.key?h+f.length:p+d.length),!0))}}return d&&(c.value=i(d,p,!0)),c}function ie(t,n){return Ce.slice(t,n)}function Os(t){Z.inSFCRoot&&(le.innerLoc=te(t+1,t+1)),Pn(le);const{tag:n,ns:s}=le;s===0&&K.isPreTag(n)&&In++,K.isVoidTag(n)?Mt(le,t):(X.unshift(le),(s===1||s===2)&&(Z.inXML=!0)),le=null}function It(t,n,s){{const l=X[0]&&X[0].tag;l!=="script"&&l!=="style"&&t.includes("&")&&(t=K.decodeEntities(t,!1))}const o=X[0]||ft,r=o.children[o.children.length-1];r&&r.type===2?(r.content+=t,ze(r.loc,s)):o.children.push({type:2,content:t,loc:te(n,s)})}function Mt(t,n,s=!1){s?ze(t.loc,As(n,60)):ze(t.loc,ua(n,62)+1),Z.inSFCRoot&&(t.children.length?t.innerLoc.end=$e({},t.children[t.children.length-1].loc.end):t.innerLoc.end=$e({},t.innerLoc.start),t.innerLoc.source=ie(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:o,ns:r,children:l}=t;if(Le||(o==="slot"?t.tagType=2:Ls(t)?t.tagType=3:ga(t)&&(t.tagType=1)),Z.inRCDATA||(t.children=Is(l)),r===0&&K.isIgnoreNewlineTag(o)){const i=l[0];i&&i.type===2&&(i.content=i.content.replace(/^\r?\n/,""))}r===0&&K.isPreTag(o)&&In--,Mn===t&&(Le=Z.inVPre=!1,Mn=null),Z.inXML&&(X[0]?X[0].ns:K.ns)===0&&(Z.inXML=!1);{const i=t.props;if(process.env.NODE_ENV!=="production"&&Oe("COMPILER_V_IF_V_FOR_PRECEDENCE",K)){let d=!1,p=!1;for(let m=0;m<i.length;m++){const f=i[m];if(f.type===7&&(f.name==="if"?d=!0:f.name==="for"&&(p=!0)),d&&p){Dt("COMPILER_V_IF_V_FOR_PRECEDENCE",K,t.loc);break}}}if(!Z.inSFCRoot&&Oe("COMPILER_NATIVE_TEMPLATE",K)&&t.tag==="template"&&!Ls(t)){process.env.NODE_ENV!=="production"&&Dt("COMPILER_NATIVE_TEMPLATE",K,t.loc);const d=X[0]||ft,p=d.children.indexOf(t);d.children.splice(p,1,...t.children)}const c=i.find(d=>d.type===6&&d.name==="inline-template");c&&Xe("COMPILER_INLINE_TEMPLATE",K,c.loc)&&t.children.length&&(c.value={type:2,content:ie(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:c.loc})}}function ua(t,n){let s=t;for(;Ce.charCodeAt(s)!==n&&s<Ce.length-1;)s++;return s}function As(t,n){let s=t;for(;Ce.charCodeAt(s)!==n&&s>=0;)s--;return s}const ha=new Set(["if","else","else-if","for","slot"]);function Ls({tag:t,props:n}){if(t==="template"){for(let s=0;s<n.length;s++)if(n[s].type===7&&ha.has(n[s].name))return!0}return!1}function ga({tag:t,props:n}){if(K.isCustomElement(t))return!1;if(t==="component"||ya(t.charCodeAt(0))||ws(t)||K.isBuiltInComponent&&K.isBuiltInComponent(t)||K.isNativeTag&&!K.isNativeTag(t))return!0;for(let s=0;s<n.length;s++){const o=n[s];if(o.type===6){if(o.name==="is"&&o.value){if(o.value.content.startsWith("vue:"))return!0;if(Xe("COMPILER_IS_ON_ELEMENT",K,o.loc))return!0}}else if(o.name==="bind"&&Ae(o.arg,"is")&&Xe("COMPILER_IS_ON_ELEMENT",K,o.loc))return!0}return!1}function ya(t){return t>64&&t<91}const va=/\r\n/g;function Is(t){const n=K.whitespace!=="preserve";let s=!1;for(let o=0;o<t.length;o++){const r=t[o];if(r.type===2)if(In)r.content=r.content.replace(va,`
|
|
142
|
-
`);else if(ba(r.content)){const l=t[o-1]&&t[o-1].type,i=t[o+1]&&t[o+1].type;!l||!i||n&&(l===3&&(i===3||i===1)||l===1&&(i===3||i===1&&ka(r.content)))?(s=!0,t[o]=null):r.content=" "}else n&&(r.content=Ms(r.content))}return s?t.filter(Boolean):t}function ba(t){for(let n=0;n<t.length;n++)if(!he(t.charCodeAt(n)))return!1;return!0}function ka(t){for(let n=0;n<t.length;n++){const s=t.charCodeAt(n);if(s===10||s===13)return!0}return!1}function Ms(t){let n="",s=!1;for(let o=0;o<t.length;o++)he(t.charCodeAt(o))?s||(n+=" ",s=!0):(n+=t[o],s=!1);return n}function Pn(t){(X[0]||ft).children.push(t)}function te(t,n){return{start:Z.getPos(t),end:n==null?n:Z.getPos(n),source:n==null?n:ie(t,n)}}function Ea(t){return te(t.start.offset,t.end.offset)}function ze(t,n){t.end=Z.getPos(n),t.source=ie(t.start.offset,n)}function Na(t){const n={type:6,name:t.rawName,nameLoc:te(t.loc.start.offset,t.loc.start.offset+t.rawName.length),value:void 0,loc:t.loc};if(t.exp){const s=t.exp.loc;s.end.offset<t.loc.end.offset&&(s.start.offset--,s.start.column--,s.end.offset++,s.end.column++),n.value={type:2,content:t.exp.content,loc:s}}return n}function Pt(t,n=!1,s,o=0,r=0){return F(t,n,s,o)}function me(t,n,s){K.onError(J(t,te(n,n),void 0,s))}function wa(){Z.reset(),le=null,U=null,fe="",Se=-1,Fe=-1,X.length=0}function xa(t,n){if(wa(),Ce=t,K=$e({},Ts),n){let r;for(r in n)n[r]!=null&&(K[r]=n[r])}if(process.env.NODE_ENV!=="production"&&!K.decodeEntities)throw new Error("[@vue/compiler-core] decodeEntities option is required in browser builds.");Z.mode=K.parseMode==="html"?1:K.parseMode==="sfc"?2:0,Z.inXML=K.ns===1||K.ns===2;const s=n&&n.delimiters;s&&(Z.delimiterOpen=Tt(s[0]),Z.delimiterClose=Tt(s[1]));const o=ft=Zl([],t);return Z.parse(Ce),o.loc=te(0,t.length),o.children=Is(o.children),ft=null,o}function _a(t,n){Rt(t,void 0,n,!!Ps(t))}function Ps(t){const n=t.children.filter(s=>s.type!==3);return n.length===1&&n[0].type===1&&!At(n[0])?n[0]:null}function Rt(t,n,s,o=!1,r=!1){const{children:l}=t,i=[];for(let f=0;f<l.length;f++){const h=l[f];if(h.type===1&&h.tagType===0){const y=o?0:ge(h,s);if(y>0){if(y>=2){h.codegenNode.patchFlag=-1,i.push(h);continue}}else{const x=h.codegenNode;if(x.type===13){const _=x.patchFlag;if((_===void 0||_===512||_===1)&&Fs(h,s)>=2){const E=zs(h);E&&(x.props=s.hoist(E))}x.dynamicProps&&(x.dynamicProps=s.hoist(x.dynamicProps))}}}else if(h.type===12&&(o?0:ge(h,s))>=2){h.codegenNode.type===14&&h.codegenNode.arguments.length>0&&h.codegenNode.arguments.push(-1+(process.env.NODE_ENV!=="production"?` /* ${st[-1]} */`:"")),i.push(h);continue}if(h.type===1){const y=h.tagType===1;y&&s.scopes.vSlot++,Rt(h,t,s,!1,r),y&&s.scopes.vSlot--}else if(h.type===11)Rt(h,t,s,h.children.length===1,!0);else if(h.type===9)for(let y=0;y<h.branches.length;y++)Rt(h.branches[y],t,s,h.branches[y].children.length===1,r)}let c=!1;const d=[];if(i.length===l.length&&t.type===1){if(t.tagType===0&&t.codegenNode&&t.codegenNode.type===13&&Ne(t.codegenNode.children))t.codegenNode.children=p(Re(t.codegenNode.children)),c=!0;else if(t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!Ne(t.codegenNode.children)&&t.codegenNode.children.type===15){const f=m(t.codegenNode,"default");f&&(d.push(s.cached.length),f.returns=p(Re(f.returns)),c=!0)}else if(t.tagType===3&&n&&n.type===1&&n.tagType===1&&n.codegenNode&&n.codegenNode.type===13&&n.codegenNode.children&&!Ne(n.codegenNode.children)&&n.codegenNode.children.type===15){const f=pe(t,"slot",!0),h=f&&f.arg&&m(n.codegenNode,f.arg);h&&(d.push(s.cached.length),h.returns=p(Re(h.returns)),c=!0)}}if(!c)for(const f of i)d.push(s.cached.length),f.codegenNode=s.cache(f.codegenNode);d.length&&t.type===1&&t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!Ne(t.codegenNode.children)&&t.codegenNode.children.type===15&&t.codegenNode.children.properties.push(V("__",F(JSON.stringify(d),!1)));function p(f){const h=s.cache(f);return r&&s.hmr&&(h.needArraySpread=!0),h}function m(f,h){if(f.children&&!Ne(f.children)&&f.children.type===15){const y=f.children.properties.find(x=>x.key===h||x.key.content===h);return y&&y.value}}i.length&&s.transformHoist&&s.transformHoist(l,s,t)}function ge(t,n){const{constantCache:s}=n;switch(t.type){case 1:if(t.tagType!==0)return 0;const o=s.get(t);if(o!==void 0)return o;const r=t.codegenNode;if(r.type!==13||r.isBlock&&t.tag!=="svg"&&t.tag!=="foreignObject"&&t.tag!=="math")return 0;if(r.patchFlag===void 0){let i=3;const c=Fs(t,n);if(c===0)return s.set(t,0),0;c<i&&(i=c);for(let d=0;d<t.children.length;d++){const p=ge(t.children[d],n);if(p===0)return s.set(t,0),0;p<i&&(i=p)}if(i>1)for(let d=0;d<t.props.length;d++){const p=t.props[d];if(p.type===7&&p.name==="bind"&&p.exp){const m=ge(p.exp,n);if(m===0)return s.set(t,0),0;m<i&&(i=m)}}if(r.isBlock){for(let d=0;d<t.props.length;d++)if(t.props[d].type===7)return s.set(t,0),0;n.removeHelper(Pe),n.removeHelper(Ye(n.inSSR,r.isComponent)),r.isBlock=!1,n.helper(Ze(n.inSSR,r.isComponent))}return s.set(t,i),i}else return s.set(t,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return ge(t.content,n);case 4:return t.constType;case 8:let l=3;for(let i=0;i<t.children.length;i++){const c=t.children[i];if(oe(c)||cn(c))continue;const d=ge(c,n);if(d===0)return 0;d<l&&(l=d)}return l;case 20:return 2;default:return process.env.NODE_ENV,0}}const Ca=new Set([Nn,wn,lt,at]);function Rs(t,n){if(t.type===14&&!oe(t.callee)&&Ca.has(t.callee)){const s=t.arguments[0];if(s.type===4)return ge(s,n);if(s.type===14)return Rs(s,n)}return 0}function Fs(t,n){let s=3;const o=zs(t);if(o&&o.type===15){const{properties:r}=o;for(let l=0;l<r.length;l++){const{key:i,value:c}=r[l],d=ge(i,n);if(d===0)return d;d<s&&(s=d);let p;if(c.type===4?p=ge(c,n):c.type===14?p=Rs(c,n):p=0,p===0)return p;p<s&&(s=p)}}return s}function zs(t){const n=t.codegenNode;if(n.type===13)return n.props}function Sa(t,{filename:n="",prefixIdentifiers:s=!1,hoistStatic:o=!1,hmr:r=!1,cacheHandlers:l=!1,nodeTransforms:i=[],directiveTransforms:c={},transformHoist:d=null,isBuiltInComponent:p=ln,isCustomElement:m=ln,expressionPlugins:f=[],scopeId:h=null,slotted:y=!0,ssr:x=!1,inSSR:_=!1,ssrCssVars:E="",bindingMetadata:S=_l,inline:L=!1,isTS:$=!1,onError:D=On,onWarn:B=Ns,compatConfig:q}){const ee=n.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),M={filename:n,selfName:ee&&pn(Te(ee[1])),prefixIdentifiers:s,hoistStatic:o,hmr:r,cacheHandlers:l,nodeTransforms:i,directiveTransforms:c,transformHoist:d,isBuiltInComponent:p,isCustomElement:m,expressionPlugins:f,scopeId:h,slotted:y,ssr:x,inSSR:_,ssrCssVars:E,bindingMetadata:S,inline:L,isTS:$,onError:D,onWarn:B,compatConfig:q,root:t,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:t,childIndex:0,inVOnce:!1,helper(I){const H=M.helpers.get(I)||0;return M.helpers.set(I,H+1),I},removeHelper(I){const H=M.helpers.get(I);if(H){const j=H-1;j?M.helpers.set(I,j):M.helpers.delete(I)}},helperString(I){return`_${Ge[M.helper(I)]}`},replaceNode(I){if(process.env.NODE_ENV!=="production"){if(!M.currentNode)throw new Error("Node being replaced is already removed.");if(!M.parent)throw new Error("Cannot replace root node.")}M.parent.children[M.childIndex]=M.currentNode=I},removeNode(I){if(process.env.NODE_ENV!=="production"&&!M.parent)throw new Error("Cannot remove root node.");const H=M.parent.children,j=I?H.indexOf(I):M.currentNode?M.childIndex:-1;if(process.env.NODE_ENV!=="production"&&j<0)throw new Error("node being removed is not a child of current parent");!I||I===M.currentNode?(M.currentNode=null,M.onNodeRemoved()):M.childIndex>j&&(M.childIndex--,M.onNodeRemoved()),M.parent.children.splice(j,1)},onNodeRemoved:ln,addIdentifiers(I){},removeIdentifiers(I){},hoist(I){oe(I)&&(I=F(I)),M.hoists.push(I);const H=F(`_hoisted_${M.hoists.length}`,!1,I.loc,2);return H.hoisted=I,H},cache(I,H=!1,j=!1){const g=Yl(M.cached.length,I,H,j);return M.cached.push(g),g}};return M.filters=new Set,M}function Ba(t,n){const s=Sa(t,n);Ft(t,s),n.hoistStatic&&_a(t,s),n.ssr||$a(t,s),t.helpers=new Set([...s.helpers.keys()]),t.components=[...s.components],t.directives=[...s.directives],t.imports=s.imports,t.hoists=s.hoists,t.temps=s.temps,t.cached=s.cached,t.transformed=!0,t.filters=[...s.filters]}function $a(t,n){const{helper:s}=n,{children:o}=t;if(o.length===1){const r=Ps(t);if(r&&r.codegenNode){const l=r.codegenNode;l.type===13&&Tn(l,n),t.codegenNode=l}else t.codegenNode=o[0]}else if(o.length>1){let r=64;process.env.NODE_ENV!=="production"&&o.filter(l=>l.type!==3).length===1&&(r|=2048),t.codegenNode=ct(n,s(ot),void 0,t.children,r,void 0,void 0,!0,void 0,!1)}}function Ta(t,n){let s=0;const o=()=>{s--};for(;s<t.children.length;s++){const r=t.children[s];oe(r)||(n.grandParent=n.parent,n.parent=t,n.childIndex=s,n.onNodeRemoved=o,Ft(r,n))}}function Ft(t,n){n.currentNode=t;const{nodeTransforms:s}=n,o=[];for(let l=0;l<s.length;l++){const i=s[l](t,n);if(i&&(Ne(i)?o.push(...i):o.push(i)),n.currentNode)t=n.currentNode;else return}switch(t.type){case 3:n.ssr||n.helper(it);break;case 5:n.ssr||n.helper(St);break;case 9:for(let l=0;l<t.branches.length;l++)Ft(t.branches[l],n);break;case 10:case 11:case 1:case 0:Ta(t,n);break}n.currentNode=t;let r=o.length;for(;r--;)o[r]()}function js(t,n){const s=oe(t)?o=>o===t:o=>t.test(o);return(o,r)=>{if(o.type===1){const{props:l}=o;if(o.tagType===3&&l.some(aa))return;const i=[];for(let c=0;c<l.length;c++){const d=l[c];if(d.type===7&&s(d.name)){l.splice(c,1),c--;const p=n(o,d,r);p&&i.push(p)}}return i}}}const zt="/*@__PURE__*/",Hs=t=>`${Ge[t]}: _${Ge[t]}`;function Da(t,{mode:n="function",prefixIdentifiers:s=n==="module",sourceMap:o=!1,filename:r="template.vue.html",scopeId:l=null,optimizeImports:i=!1,runtimeGlobalName:c="Vue",runtimeModuleName:d="vue",ssrRuntimeModuleName:p="vue/server-renderer",ssr:m=!1,isTS:f=!1,inSSR:h=!1}){const y={mode:n,prefixIdentifiers:s,sourceMap:o,filename:r,scopeId:l,optimizeImports:i,runtimeGlobalName:c,runtimeModuleName:d,ssrRuntimeModuleName:p,ssr:m,isTS:f,inSSR:h,source:t.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(_){return`_${Ge[_]}`},push(_,E=-2,S){y.code+=_},indent(){x(++y.indentLevel)},deindent(_=!1){_?--y.indentLevel:x(--y.indentLevel)},newline(){x(y.indentLevel)}};function x(_){y.push(`
|
|
143
|
-
`+" ".repeat(_),0)}return
|
|
144
|
-
`,-1),
|
|
145
|
-
`,0),
|
|
146
|
-
`,-1),t.hoists.length)){const f=[
|
|
147
|
-
`,-1)}La(t.hoists,n),l(),r("return ")}function Rn(t,n,{helper:s,push:o,newline:r,isTS:l}){const i=s(n==="filter"?bn:n==="component"?gn:vn);for(let c=0;c<t.length;c++){let d=t[c];const p=d.endsWith("__self");p&&(d=d.slice(0,-6)),o(`const ${pt(d,n)} = ${i}(${JSON.stringify(d)}${p?", true":""})${l?"!":""}`),c<t.length-1&&r()}}function La(t,n){if(!t.length)return;n.pure=!0;const{push:s,newline:o}=n;o();for(let r=0;r<t.length;r++){const l=t[r];l&&(s(`const _hoisted_${r+1} = `),ae(l,n),o())}n.pure=!1}function Ia(t){return oe(t)||t.type===4||t.type===2||t.type===5||t.type===8}function Fn(t,n){const s=t.length>3||process.env.NODE_ENV!=="production"&&t.some(o=>Ne(o)||!Ia(o));n.push("["),s&&n.indent(),mt(t,n,s),s&&n.deindent(),n.push("]")}function mt(t,n,s=!1,o=!0){const{push:r,newline:l}=n;for(let i=0;i<t.length;i++){const c=t[i];oe(c)?r(c,-3):Ne(c)?Fn(c,n):ae(c,n),i<t.length-1&&(s?(o&&r(","),l()):o&&r(", "))}}function ae(t,n){if(oe(t)){n.push(t,-3);return}if(cn(t)){n.push(n.helper(t));return}switch(t.type){case 1:case 9:case 11:process.env.NODE_ENV!=="production"&&Cs(t.codegenNode!=null,"Codegen node is missing for element/if/for node. Apply appropriate transforms first."),ae(t.codegenNode,n);break;case 2:Ma(t,n);break;case 4:Us(t,n);break;case 5:Pa(t,n);break;case 12:ae(t.codegenNode,n);break;case 8:qs(t,n);break;case 3:Fa(t,n);break;case 13:za(t,n);break;case 14:Ha(t,n);break;case 15:Ua(t,n);break;case 17:qa(t,n);break;case 18:Wa(t,n);break;case 19:Ka(t,n);break;case 20:Ga(t,n);break;case 21:mt(t.body,n,!0,!1);break;case 22:break;case 23:break;case 24:break;case 25:break;case 26:break;case 10:break;default:if(process.env.NODE_ENV!=="production")return Cs(!1,`unhandled codegen node type: ${t.type}`),t}}function Ma(t,n){n.push(JSON.stringify(t.content),-3,t)}function Us(t,n){const{content:s,isStatic:o}=t;n.push(o?JSON.stringify(s):s,-3,t)}function Pa(t,n){const{push:s,helper:o,pure:r}=n;r&&s(zt),s(`${o(St)}(`),ae(t.content,n),s(")")}function qs(t,n){for(let s=0;s<t.children.length;s++){const o=t.children[s];oe(o)?n.push(o,-3):ae(o,n)}}function Ra(t,n){const{push:s}=n;if(t.type===8)s("["),qs(t,n),s("]");else if(t.isStatic){const o=An(t.content)?t.content:JSON.stringify(t.content);s(o,-2,t)}else s(`[${t.content}]`,-3,t)}function Fa(t,n){const{push:s,helper:o,pure:r}=n;r&&s(zt),s(`${o(it)}(${JSON.stringify(t.content)})`,-3,t)}function za(t,n){const{push:s,helper:o,pure:r}=n,{tag:l,props:i,children:c,patchFlag:d,dynamicProps:p,directives:m,isBlock:f,disableTracking:h,isComponent:y}=t;let x;if(d)if(process.env.NODE_ENV!=="production")if(d<0)x=d+` /* ${st[d]} */`;else{const E=Object.keys(st).map(Number).filter(S=>S>0&&d&S).map(S=>st[S]).join(", ");x=d+` /* ${E} */`}else x=String(d);m&&s(o(kn)+"("),f&&s(`(${o(Pe)}(${h?"true":""}), `),r&&s(zt);const _=f?Ye(n.inSSR,y):Ze(n.inSSR,y);s(o(_)+"(",-2,t),mt(ja([l,i,c,x,p]),n),s(")"),f&&s(")"),m&&(s(", "),ae(m,n),s(")"))}function ja(t){let n=t.length;for(;n--&&t[n]==null;);return t.slice(0,n+1).map(s=>s||"null")}function Ha(t,n){const{push:s,helper:o,pure:r}=n,l=oe(t.callee)?t.callee:o(t.callee);r&&s(zt),s(l+"(",-2,t),mt(t.arguments,n),s(")")}function Ua(t,n){const{push:s,indent:o,deindent:r,newline:l}=n,{properties:i}=t;if(!i.length){s("{}",-2,t);return}const c=i.length>1||process.env.NODE_ENV!=="production"&&i.some(d=>d.value.type!==4);s(c?"{":"{ "),c&&o();for(let d=0;d<i.length;d++){const{key:p,value:m}=i[d];Ra(p,n),s(": "),ae(m,n),d<i.length-1&&(s(","),l())}c&&r(),s(c?"}":" }")}function qa(t,n){Fn(t.elements,n)}function Wa(t,n){const{push:s,indent:o,deindent:r}=n,{params:l,returns:i,body:c,newline:d,isSlot:p}=t;p&&s(`_${Ge[Sn]}(`),s("(",-2,t),Ne(l)?mt(l,n):l&&ae(l,n),s(") => "),(d||c)&&(s("{"),o()),i?(d&&s("return "),Ne(i)?Fn(i,n):ae(i,n)):c&&ae(c,n),(d||c)&&(r(),s("}")),p&&(t.isNonScopedSlot&&s(", undefined, true"),s(")"))}function Ka(t,n){const{test:s,consequent:o,alternate:r,newline:l}=t,{push:i,indent:c,deindent:d,newline:p}=n;if(s.type===4){const f=!An(s.content);f&&i("("),Us(s,n),f&&i(")")}else i("("),ae(s,n),i(")");l&&c(),n.indentLevel++,l||i(" "),i("? "),ae(o,n),n.indentLevel--,l&&p(),l||i(" "),i(": ");const m=r.type===19;m||n.indentLevel++,ae(r,n),m||n.indentLevel--,l&&d(!0)}function Ga(t,n){const{push:s,helper:o,indent:r,deindent:l,newline:i}=n,{needPauseTracking:c,needArraySpread:d}=t;d&&s("[...("),s(`_cache[${t.index}] || (`),c&&(r(),s(`${o($t)}(-1`),t.inVOnce&&s(", true"),s("),"),i(),s("(")),s(`_cache[${t.index}] = `),ae(t.value,n),c&&(s(`).cacheIndex = ${t.index},`),i(),s(`${o($t)}(1),`),i(),s(`_cache[${t.index}]`),l()),s(")"),d&&s(")]")}const Ja=new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b"),Za=/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;function je(t,n,s=!1,o=!1){const r=t.content;if(r.trim())try{new Function(o?` ${r} `:`return ${s?`(${r}) => {}`:`(${r})`}`)}catch(l){let i=l.message;const c=r.replace(Za,"").match(Ja);c&&(i=`avoid using JavaScript keyword as property name: "${c[0]}"`),n.onError(J(45,t.loc,void 0,i))}}const Ya=(t,n)=>{if(t.type===5)t.content=zn(t.content,n);else if(t.type===1){const s=pe(t,"memo");for(let o=0;o<t.props.length;o++){const r=t.props[o];if(r.type===7&&r.name!=="for"){const l=r.exp,i=r.arg;l&&l.type===4&&!(r.name==="on"&&i)&&!(s&&i&&i.type===4&&i.content==="key")&&(r.exp=zn(l,n,r.name==="slot")),i&&i.type===4&&!i.isStatic&&(r.arg=zn(i,n))}}}};function zn(t,n,s=!1,o=!1,r=Object.create(n.identifiers)){return process.env.NODE_ENV!=="production"&&je(t,n,s,o),t}const Xa=js(/^(if|else|else-if)$/,(t,n,s)=>Qa(t,n,s,(o,r,l)=>{const i=s.parent.children;let c=i.indexOf(o),d=0;for(;c-->=0;){const p=i[c];p&&p.type===9&&(d+=p.branches.length)}return()=>{if(l)o.codegenNode=Ks(r,d,s);else{const p=ec(o.codegenNode);p.alternate=Ks(r,d+o.branches.length-1,s)}}}));function Qa(t,n,s,o){if(n.name!=="else"&&(!n.exp||!n.exp.content.trim())){const r=n.exp?n.exp.loc:t.loc;s.onError(J(28,n.loc)),n.exp=F("true",!1,r)}if(process.env.NODE_ENV!=="production"&&n.exp&&je(n.exp,s),n.name==="if"){const r=Ws(t,n),l={type:9,loc:Ea(t.loc),branches:[r]};if(s.replaceNode(l),o)return o(l,r,!0)}else{const r=s.parent.children,l=[];let i=r.indexOf(t);for(;i-->=-1;){const c=r[i];if(c&&c.type===3){s.removeNode(c),process.env.NODE_ENV!=="production"&&l.unshift(c);continue}if(c&&c.type===2&&!c.content.trim().length){s.removeNode(c);continue}if(c&&c.type===9){n.name==="else-if"&&c.branches[c.branches.length-1].condition===void 0&&s.onError(J(30,t.loc)),s.removeNode();const d=Ws(t,n);if(process.env.NODE_ENV!=="production"&&l.length&&!(s.parent&&s.parent.type===1&&(s.parent.tag==="transition"||s.parent.tag==="Transition"))&&(d.children=[...l,...d.children]),process.env.NODE_ENV!=="production"){const m=d.userKey;m&&c.branches.forEach(({userKey:f})=>{Va(f,m)&&s.onError(J(29,d.userKey.loc))})}c.branches.push(d);const p=o&&o(c,d,!1);Ft(d,s),p&&p(),s.currentNode=null}else s.onError(J(30,t.loc));break}}}function Ws(t,n){const s=t.tagType===3;return{type:10,loc:t.loc,condition:n.name==="else"?void 0:n.exp,children:s&&!pe(t,"for")?t.children:[t],userKey:dt(t,"key"),isTemplateIf:s}}function Ks(t,n,s){return t.condition?$n(t.condition,Gs(t,n,s),se(s.helper(it),[process.env.NODE_ENV!=="production"?'"v-if"':'""',"true"])):Gs(t,n,s)}function Gs(t,n,s){const{helper:o}=s,r=V("key",F(`${n}`,!1,ue,2)),{children:l}=t,i=l[0];if(l.length!==1||i.type!==1)if(l.length===1&&i.type===11){const d=i.codegenNode;return Lt(d,r,s),d}else{let d=64;return process.env.NODE_ENV!=="production"&&!t.isTemplateIf&&l.filter(p=>p.type!==3).length===1&&(d|=2048),ct(s,o(ot),ye([r]),l,d,void 0,void 0,!0,!1,!1,t.loc)}else{const d=i.codegenNode,p=da(d);return p.type===13&&Tn(p,s),Lt(p,r,s),d}}function Va(t,n){if(!t||t.type!==n.type)return!1;if(t.type===6){if(t.value.content!==n.value.content)return!1}else{const s=t.exp,o=n.exp;if(s.type!==o.type||s.type!==4||s.isStatic!==o.isStatic||s.content!==o.content)return!1}return!0}function ec(t){for(;;)if(t.type===19)if(t.alternate.type===19)t=t.alternate;else return t;else t.type===20&&(t=t.value)}const tc=(t,n,s)=>{const{modifiers:o,loc:r}=t,l=t.arg;let{exp:i}=t;if(i&&i.type===4&&!i.content.trim()&&(i=void 0),!i){if(l.type!==4||!l.isStatic)return s.onError(J(52,l.loc)),{props:[V(l,F("",!0,r))]};Js(t),i=t.exp}return l.type!==4?(l.children.unshift("("),l.children.push(') || ""')):l.isStatic||(l.content=l.content?`${l.content} || ""`:'""'),o.some(c=>c.content==="camel")&&(l.type===4?l.isStatic?l.content=Te(l.content):l.content=`${s.helperString(_n)}(${l.content})`:(l.children.unshift(`${s.helperString(_n)}(`),l.children.push(")"))),s.inSSR||(o.some(c=>c.content==="prop")&&Zs(l,"."),o.some(c=>c.content==="attr")&&Zs(l,"^")),{props:[V(l,i)]}},Js=(t,n)=>{const s=t.arg,o=Te(s.content);t.exp=F(o,!1,s.loc)},Zs=(t,n)=>{t.type===4?t.isStatic?t.content=n+t.content:t.content=`\`${n}\${${t.content}}\``:(t.children.unshift(`'${n}' + (`),t.children.push(")"))},nc=js("for",(t,n,s)=>{const{helper:o,removeHelper:r}=s;return sc(t,n,s,l=>{const i=se(o(En),[l.source]),c=Ot(t),d=pe(t,"memo"),p=dt(t,"key",!1,!0);p&&p.type===7&&!p.exp&&Js(p);let f=p&&(p.type===6?p.value?F(p.value.content,!0):void 0:p.exp);const h=p&&f?V("key",f):null,y=l.source.type===4&&l.source.constType>0,x=y?64:p?128:256;return l.codegenNode=ct(s,o(ot),void 0,i,x,void 0,void 0,!0,!y,!1,t.loc),()=>{let _;const{children:E}=l;process.env.NODE_ENV!=="production"&&c&&t.children.some($=>{if($.type===1){const D=dt($,"key");if(D)return s.onError(J(33,D.loc)),!0}});const S=E.length!==1||E[0].type!==1,L=At(t)?t:c&&t.children.length===1&&At(t.children[0])?t.children[0]:null;if(L?(_=L.codegenNode,c&&h&&Lt(_,h,s)):S?_=ct(s,o(ot),h?ye([h]):void 0,t.children,64,void 0,void 0,!0,void 0,!1):(_=E[0].codegenNode,c&&h&&Lt(_,h,s),_.isBlock!==!y&&(_.isBlock?(r(Pe),r(Ye(s.inSSR,_.isComponent))):r(Ze(s.inSSR,_.isComponent))),_.isBlock=!y,_.isBlock?(o(Pe),o(Ye(s.inSSR,_.isComponent))):o(Ze(s.inSSR,_.isComponent))),d){const $=Je(jn(l.parseResult,[F("_cached")]));$.body=Xl([ve(["const _memo = (",d.exp,")"]),ve(["if (_cached",...f?[" && _cached.key === ",f]:[],` && ${s.helperString(vs)}(_cached, _memo)) return _cached`]),ve(["const _item = ",_]),F("_item.memo = _memo"),F("return _item")]),i.arguments.push($,F("_cache"),F(String(s.cached.length))),s.cached.push(null)}else i.arguments.push(Je(jn(l.parseResult),_,!0))}})});function sc(t,n,s,o){if(!n.exp){s.onError(J(31,n.loc));return}const r=n.forParseResult;if(!r){s.onError(J(32,n.loc));return}Ys(r,s);const{addIdentifiers:l,removeIdentifiers:i,scopes:c}=s,{source:d,value:p,key:m,index:f}=r,h={type:11,loc:n.loc,source:d,valueAlias:p,keyAlias:m,objectIndexAlias:f,parseResult:r,children:Ot(t)?t.children:[t]};s.replaceNode(h),c.vFor++;const y=o&&o(h);return()=>{c.vFor--,y&&y()}}function Ys(t,n){t.finalized||(process.env.NODE_ENV!=="production"&&(je(t.source,n),t.key&&je(t.key,n,!0),t.index&&je(t.index,n,!0),t.value&&je(t.value,n,!0)),t.finalized=!0)}function jn({value:t,key:n,index:s},o=[]){return oc([t,n,s,...o])}function oc(t){let n=t.length;for(;n--&&!t[n];);return t.slice(0,n+1).map((s,o)=>s||F("_".repeat(o+1),!1))}const Xs=F("undefined",!1),rc=(t,n)=>{if(t.type===1&&(t.tagType===1||t.tagType===3)){const s=pe(t,"slot");if(s)return s.exp,n.scopes.vSlot++,()=>{n.scopes.vSlot--}}},ic=(t,n,s,o)=>Je(t,s,!1,!0,s.length?s[0].loc:o);function lc(t,n,s=ic){n.helper(Sn);const{children:o,loc:r}=t,l=[],i=[];let c=n.scopes.vSlot>0||n.scopes.vFor>0;const d=pe(t,"slot",!0);if(d){const{arg:E,exp:S}=d;E&&!de(E)&&(c=!0),l.push(V(E||F("default",!0),s(S,void 0,o,r)))}let p=!1,m=!1;const f=[],h=new Set;let y=0;for(let E=0;E<o.length;E++){const S=o[E];let L;if(!Ot(S)||!(L=pe(S,"slot",!0))){S.type!==3&&f.push(S);continue}if(d){n.onError(J(37,L.loc));break}p=!0;const{children:$,loc:D}=S,{arg:B=F("default",!0),exp:q,loc:ee}=L;let M;de(B)?M=B?B.content:"default":c=!0;const I=pe(S,"for"),H=s(q,I,$,D);let j,g;if(j=pe(S,"if"))c=!0,i.push($n(j.exp,jt(B,H,y++),Xs));else if(g=pe(S,/^else(-if)?$/,!0)){let T=E,k;for(;T--&&(k=o[T],!(k.type!==3&&Hn(k))););if(k&&Ot(k)&&pe(k,/^(else-)?if$/)){let O=i[i.length-1];for(;O.alternate.type===19;)O=O.alternate;O.alternate=g.exp?$n(g.exp,jt(B,H,y++),Xs):jt(B,H,y++)}else n.onError(J(30,g.loc))}else if(I){c=!0;const T=I.forParseResult;T?(Ys(T,n),i.push(se(n.helper(En),[T.source,Je(jn(T),jt(B,H),!0)]))):n.onError(J(32,I.loc))}else{if(M){if(h.has(M)){n.onError(J(38,ee));continue}h.add(M),M==="default"&&(m=!0)}l.push(V(B,H))}}if(!d){const E=(S,L)=>{const $=s(S,void 0,L,r);return n.compatConfig&&($.isNonScopedSlot=!0),V("default",$)};p?f.length&&f.some(S=>Hn(S))&&(m?n.onError(J(39,f[0].loc)):l.push(E(void 0,f))):l.push(E(void 0,o))}const x=c?2:Ht(t.children)?3:1;let _=ye(l.concat(V("_",F(x+(process.env.NODE_ENV!=="production"?` /* ${Tl[x]} */`:""),!1))),r);return i.length&&(_=se(n.helper(ys),[_,Re(i)])),{slots:_,hasDynamicSlots:c}}function jt(t,n,s){const o=[V("name",t),V("fn",n)];return s!=null&&o.push(V("key",F(String(s),!0))),ye(o)}function Ht(t){for(let n=0;n<t.length;n++){const s=t[n];switch(s.type){case 1:if(s.tagType===2||Ht(s.children))return!0;break;case 9:if(Ht(s.branches))return!0;break;case 10:case 11:if(Ht(s.children))return!0;break}}return!1}function Hn(t){return t.type!==2&&t.type!==12?!0:t.type===2?!!t.content.trim():Hn(t.content)}const Qs=new WeakMap,ac=(t,n)=>function(){if(t=n.currentNode,!(t.type===1&&(t.tagType===0||t.tagType===1)))return;const{tag:o,props:r}=t,l=t.tagType===1;let i=l?cc(t,n):`"${o}"`;const c=Cl(i)&&i.callee===yn;let d,p,m=0,f,h,y,x=c||i===rt||i===fn||!l&&(o==="svg"||o==="foreignObject"||o==="math");if(r.length>0){const _=Vs(t,n,void 0,l,c);d=_.props,m=_.patchFlag,h=_.dynamicPropNames;const E=_.directives;y=E&&E.length?Re(E.map(S=>pc(S,n))):void 0,_.shouldUseBlock&&(x=!0)}if(t.children.length>0)if(i===Ct&&(x=!0,m|=1024,process.env.NODE_ENV!=="production"&&t.children.length>1&&n.onError(J(46,{start:t.children[0].loc.start,end:t.children[t.children.length-1].loc.end,source:""}))),l&&i!==rt&&i!==Ct){const{slots:E,hasDynamicSlots:S}=lc(t,n);p=E,S&&(m|=1024)}else if(t.children.length===1&&i!==rt){const E=t.children[0],S=E.type,L=S===5||S===8;L&&ge(E,n)===0&&(m|=1),L||S===2?p=E:p=t.children}else p=t.children;h&&h.length&&(f=fc(h)),t.codegenNode=ct(n,i,d,p,m===0?void 0:m,f,y,!!x,!1,l,t.loc)};function cc(t,n,s=!1){let{tag:o}=t;const r=Un(o),l=dt(t,"is",!1,!0);if(l)if(r||Oe("COMPILER_IS_ON_ELEMENT",n)){let c;if(l.type===6?c=l.value&&F(l.value.content,!0):(c=l.exp,c||(c=F("is",!1,l.arg.loc))),c)return se(n.helper(yn),[c])}else l.type===6&&l.value.content.startsWith("vue:")&&(o=l.value.content.slice(4));const i=ws(o)||n.isBuiltInComponent(o);return i?(s||n.helper(i),i):(n.helper(gn),n.components.add(o),pt(o,"component"))}function Vs(t,n,s=t.props,o,r,l=!1){const{tag:i,loc:c,children:d}=t;let p=[];const m=[],f=[],h=d.length>0;let y=!1,x=0,_=!1,E=!1,S=!1,L=!1,$=!1,D=!1;const B=[],q=H=>{p.length&&(m.push(ye(eo(p),c)),p=[]),H&&m.push(H)},ee=()=>{n.scopes.vFor>0&&p.push(V(F("ref_for",!0),F("true")))},M=({key:H,value:j})=>{if(de(H)){const g=H.content,T=an(g);if(T&&(!o||r)&&g.toLowerCase()!=="onclick"&&g!=="onUpdate:modelValue"&&!ps(g)&&(L=!0),T&&ps(g)&&(D=!0),T&&j.type===14&&(j=j.arguments[0]),j.type===20||(j.type===4||j.type===8)&&ge(j,n)>0)return;g==="ref"?_=!0:g==="class"?E=!0:g==="style"?S=!0:g!=="key"&&!B.includes(g)&&B.push(g),o&&(g==="class"||g==="style")&&!B.includes(g)&&B.push(g)}else $=!0};for(let H=0;H<s.length;H++){const j=s[H];if(j.type===6){const{loc:g,name:T,nameLoc:k,value:O}=j;let Y=!0;if(T==="ref"&&(_=!0,ee()),T==="is"&&(Un(i)||O&&O.content.startsWith("vue:")||Oe("COMPILER_IS_ON_ELEMENT",n)))continue;p.push(V(F(T,!0,k),F(O?O.content:"",Y,O?O.loc:g)))}else{const{name:g,arg:T,exp:k,loc:O,modifiers:Y}=j,ce=g==="bind",Ie=g==="on";if(g==="slot"){o||n.onError(J(40,O));continue}if(g==="once"||g==="memo"||g==="is"||ce&&Ae(T,"is")&&(Un(i)||Oe("COMPILER_IS_ON_ELEMENT",n))||Ie&&l)continue;if((ce&&Ae(T,"key")||Ie&&h&&Ae(T,"vue:before-update"))&&(y=!0),ce&&Ae(T,"ref")&&ee(),!T&&(ce||Ie)){if($=!0,k)if(ce){if(q(),process.env.NODE_ENV!=="production"&&m.some(we=>we.type===15?we.properties.some(({key:xe})=>xe.type!==4||!xe.isStatic?!0:xe.content!=="class"&&xe.content!=="style"&&!an(xe.content)):!0)&&Xe("COMPILER_V_BIND_OBJECT_ORDER",n,O),Oe("COMPILER_V_BIND_OBJECT_ORDER",n)){m.unshift(k);continue}ee(),q(),m.push(k)}else q({type:14,loc:O,callee:n.helper(xn),arguments:o?[k]:[k,"true"]});else n.onError(J(ce?34:35,O));continue}ce&&Y.some(ke=>ke.content==="prop")&&(x|=32);const Be=n.directiveTransforms[g];if(Be){const{props:ke,needRuntime:we}=Be(j,t,n);!l&&ke.forEach(M),Ie&&T&&!de(T)?q(ye(ke,c)):p.push(...ke),we&&(f.push(j),cn(we)&&Qs.set(j,we))}else Sl(g)||(f.push(j),h&&(y=!0))}}let I;if(m.length?(q(),m.length>1?I=se(n.helper(Bt),m,c):I=m[0]):p.length&&(I=ye(eo(p),c)),$?x|=16:(E&&!o&&(x|=2),S&&!o&&(x|=4),B.length&&(x|=8),L&&(x|=32)),!y&&(x===0||x===32)&&(_||D||f.length>0)&&(x|=512),!n.inSSR&&I)switch(I.type){case 15:let H=-1,j=-1,g=!1;for(let O=0;O<I.properties.length;O++){const Y=I.properties[O].key;de(Y)?Y.content==="class"?H=O:Y.content==="style"&&(j=O):Y.isHandlerKey||(g=!0)}const T=I.properties[H],k=I.properties[j];g?I=se(n.helper(lt),[I]):(T&&!de(T.value)&&(T.value=se(n.helper(Nn),[T.value])),k&&(S||k.value.type===4&&k.value.content.trim()[0]==="["||k.value.type===17)&&(k.value=se(n.helper(wn),[k.value])));break;case 14:break;default:I=se(n.helper(lt),[se(n.helper(at),[I])]);break}return{props:I,directives:f,patchFlag:x,dynamicPropNames:B,shouldUseBlock:y}}function eo(t){const n=new Map,s=[];for(let o=0;o<t.length;o++){const r=t[o];if(r.key.type===8||!r.key.isStatic){s.push(r);continue}const l=r.key.content,i=n.get(l);i?(l==="style"||l==="class"||an(l))&&dc(i,r):(n.set(l,r),s.push(r))}return s}function dc(t,n){t.value.type===17?t.value.elements.push(n.value):t.value=Re([t.value,n.value],t.loc)}function pc(t,n){const s=[],o=Qs.get(t);o?s.push(n.helperString(o)):(n.helper(vn),n.directives.add(t.name),s.push(pt(t.name,"directive")));const{loc:r}=t;if(t.exp&&s.push(t.exp),t.arg&&(t.exp||s.push("void 0"),s.push(t.arg)),Object.keys(t.modifiers).length){t.arg||(t.exp||s.push("void 0"),s.push("void 0"));const l=F("true",!1,r);s.push(ye(t.modifiers.map(i=>V(i,l)),r))}return Re(s,t.loc)}function fc(t){let n="[";for(let s=0,o=t.length;s<o;s++)n+=JSON.stringify(t[s]),s<o-1&&(n+=", ");return n+"]"}function Un(t){return t==="component"||t==="Component"}const mc=(t,n)=>{if(At(t)){const{children:s,loc:o}=t,{slotName:r,slotProps:l}=uc(t,n),i=[n.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let c=2;l&&(i[2]=l,c=3),s.length&&(i[3]=Je([],s,!1,!1,o),c=4),n.scopeId&&!n.slotted&&(c=5),i.splice(c),t.codegenNode=se(n.helper(gs),i,o)}};function uc(t,n){let s='"default"',o;const r=[];for(let l=0;l<t.props.length;l++){const i=t.props[l];if(i.type===6)i.value&&(i.name==="name"?s=JSON.stringify(i.value.content):(i.name=Te(i.name),r.push(i)));else if(i.name==="bind"&&Ae(i.arg,"name")){if(i.exp)s=i.exp;else if(i.arg&&i.arg.type===4){const c=Te(i.arg.content);s=i.exp=F(c,!1,i.arg.loc)}}else i.name==="bind"&&i.arg&&de(i.arg)&&(i.arg.content=Te(i.arg.content)),r.push(i)}if(r.length>0){const{props:l,directives:i}=Vs(t,n,r,!1,!1);o=l,i.length&&n.onError(J(36,i[0].loc))}return{slotName:s,slotProps:o}}const to=(t,n,s,o)=>{const{loc:r,modifiers:l,arg:i}=t;!t.exp&&!l.length&&s.onError(J(35,r));let c;if(i.type===4)if(i.isStatic){let f=i.content;process.env.NODE_ENV!=="production"&&f.startsWith("vnode")&&s.onError(J(51,i.loc)),f.startsWith("vue:")&&(f=`vnode-${f.slice(4)}`);const h=n.tagType!==0||f.startsWith("vnode")||!/[A-Z]/.test(f)?$l(Te(f)):`on:${f}`;c=F(h,!0,i.loc)}else c=ve([`${s.helperString(Cn)}(`,i,")"]);else c=i,c.children.unshift(`${s.helperString(Cn)}(`),c.children.push(")");let d=t.exp;d&&!d.content.trim()&&(d=void 0);let p=s.cacheHandlers&&!d&&!s.inVOnce;if(d){const f=_s(d),h=!(f||ia(d)),y=d.content.includes(";");process.env.NODE_ENV!=="production"&&je(d,s,!1,y),(h||p&&f)&&(d=ve([`${h?"$event":"(...args)"} => ${y?"{":"("}`,d,y?"}":")"]))}let m={props:[V(c,d||F("() => {}",!1,r))]};return o&&(m=o(m)),p&&(m.props[0].value=s.cache(m.props[0].value)),m.props.forEach(f=>f.key.isHandlerKey=!0),m},hc=(t,n)=>{if(t.type===0||t.type===1||t.type===11||t.type===10)return()=>{const s=t.children;let o,r=!1;for(let l=0;l<s.length;l++){const i=s[l];if(Ln(i)){r=!0;for(let c=l+1;c<s.length;c++){const d=s[c];if(Ln(d))o||(o=s[l]=ve([i],i.loc)),o.children.push(" + ",d),s.splice(c,1),c--;else{o=void 0;break}}}}if(!(!r||s.length===1&&(t.type===0||t.type===1&&t.tagType===0&&!t.props.find(l=>l.type===7&&!n.directiveTransforms[l.name])&&t.tag!=="template")))for(let l=0;l<s.length;l++){const i=s[l];if(Ln(i)||i.type===8){const c=[];(i.type!==2||i.content!==" ")&&c.push(i),!n.ssr&&ge(i,n)===0&&c.push(1+(process.env.NODE_ENV!=="production"?` /* ${st[1]} */`:"")),s[l]={type:12,content:i,loc:i.loc,codegenNode:se(n.helper(hn),c)}}}}},no=new WeakSet,gc=(t,n)=>{if(t.type===1&&pe(t,"once",!0))return no.has(t)||n.inVOnce||n.inSSR?void 0:(no.add(t),n.inVOnce=!0,n.helper($t),()=>{n.inVOnce=!1;const s=n.currentNode;s.codegenNode&&(s.codegenNode=n.cache(s.codegenNode,!0,!0))})},so=(t,n,s)=>{const{exp:o,arg:r}=t;if(!o)return s.onError(J(41,t.loc)),Ut();const l=o.loc.source.trim(),i=o.type===4?o.content:l,c=s.bindingMetadata[l];if(c==="props"||c==="props-aliased")return s.onError(J(44,o.loc)),Ut();if(!i.trim()||!_s(o))return s.onError(J(42,o.loc)),Ut();const d=r||F("modelValue",!0),p=r?de(r)?`onUpdate:${Te(r.content)}`:ve(['"onUpdate:" + ',r]):"onUpdate:modelValue";let m;const f=s.isTS?"($event: any)":"$event";m=ve([`${f} => ((`,o,") = $event)"]);const h=[V(d,t.exp),V(p,m)];if(t.modifiers.length&&n.tagType===1){const y=t.modifiers.map(_=>_.content).map(_=>(An(_)?_:JSON.stringify(_))+": true").join(", "),x=r?de(r)?`${r.content}Modifiers`:ve([r,' + "Modifiers"']):"modelModifiers";h.push(V(x,F(`{ ${y} }`,!1,t.loc,2)))}return Ut(h)};function Ut(t=[]){return{props:t}}const yc=/[\w).+\-_$\]]/,vc=(t,n)=>{Oe("COMPILER_FILTERS",n)&&(t.type===5?qt(t.content,n):t.type===1&&t.props.forEach(s=>{s.type===7&&s.name!=="for"&&s.exp&&qt(s.exp,n)}))};function qt(t,n){if(t.type===4)oo(t,n);else for(let s=0;s<t.children.length;s++){const o=t.children[s];typeof o=="object"&&(o.type===4?oo(o,n):o.type===8?qt(t,n):o.type===5&&qt(o.content,n))}}function oo(t,n){const s=t.content;let o=!1,r=!1,l=!1,i=!1,c=0,d=0,p=0,m=0,f,h,y,x,_=[];for(y=0;y<s.length;y++)if(h=f,f=s.charCodeAt(y),o)f===39&&h!==92&&(o=!1);else if(r)f===34&&h!==92&&(r=!1);else if(l)f===96&&h!==92&&(l=!1);else if(i)f===47&&h!==92&&(i=!1);else if(f===124&&s.charCodeAt(y+1)!==124&&s.charCodeAt(y-1)!==124&&!c&&!d&&!p)x===void 0?(m=y+1,x=s.slice(0,y).trim()):E();else{switch(f){case 34:r=!0;break;case 39:o=!0;break;case 96:l=!0;break;case 40:p++;break;case 41:p--;break;case 91:d++;break;case 93:d--;break;case 123:c++;break;case 125:c--;break}if(f===47){let S=y-1,L;for(;S>=0&&(L=s.charAt(S),L===" ");S--);(!L||!yc.test(L))&&(i=!0)}}x===void 0?x=s.slice(0,y).trim():m!==0&&E();function E(){_.push(s.slice(m,y).trim()),m=y+1}if(_.length){for(process.env.NODE_ENV!=="production"&&Dt("COMPILER_FILTERS",n,t.loc),y=0;y<_.length;y++)x=bc(x,_[y],n);t.content=x,t.ast=void 0}}function bc(t,n,s){s.helper(bn);const o=n.indexOf("(");if(o<0)return s.filters.add(n),`${pt(n,"filter")}(${t})`;{const r=n.slice(0,o),l=n.slice(o+1);return s.filters.add(r),`${pt(r,"filter")}(${t}${l!==")"?","+l:l}`}}const ro=new WeakSet,kc=(t,n)=>{if(t.type===1){const s=pe(t,"memo");return!s||ro.has(t)?void 0:(ro.add(t),()=>{const o=t.codegenNode||n.currentNode.codegenNode;o&&o.type===13&&(t.tagType!==1&&Tn(o,n),t.codegenNode=se(n.helper(Bn),[s.exp,Je(void 0,o),"_cache",String(n.cached.length)]),n.cached.push(null))})}};function Ec(t){return[[gc,Xa,kc,nc,vc,...process.env.NODE_ENV!=="production"?[Ya]:[],mc,ac,rc,hc],{on:to,bind:tc,model:so}]}function Nc(t,n={}){const s=n.onError||On,o=n.mode==="module";n.prefixIdentifiers===!0?s(J(47)):o&&s(J(48));const r=!1;n.cacheHandlers&&s(J(49)),n.scopeId&&!o&&s(J(50));const l=$e({},n,{prefixIdentifiers:r}),i=oe(t)?xa(t,l):t,[c,d]=Ec();return Ba(i,$e({},l,{nodeTransforms:[...c,...n.nodeTransforms||[]],directiveTransforms:$e({},d,n.directiveTransforms||{})})),Oa(i,l)}const wc=()=>({props:[]});/**
|
|
139
|
+
**/const st=Symbol(process.env.NODE_ENV!=="production"?"Fragment":""),rt=Symbol(process.env.NODE_ENV!=="production"?"Teleport":""),mn=Symbol(process.env.NODE_ENV!=="production"?"Suspense":""),St=Symbol(process.env.NODE_ENV!=="production"?"KeepAlive":""),yo=Symbol(process.env.NODE_ENV!=="production"?"BaseTransition":""),Re=Symbol(process.env.NODE_ENV!=="production"?"openBlock":""),vo=Symbol(process.env.NODE_ENV!=="production"?"createBlock":""),bo=Symbol(process.env.NODE_ENV!=="production"?"createElementBlock":""),un=Symbol(process.env.NODE_ENV!=="production"?"createVNode":""),hn=Symbol(process.env.NODE_ENV!=="production"?"createElementVNode":""),it=Symbol(process.env.NODE_ENV!=="production"?"createCommentVNode":""),gn=Symbol(process.env.NODE_ENV!=="production"?"createTextVNode":""),ko=Symbol(process.env.NODE_ENV!=="production"?"createStaticVNode":""),yn=Symbol(process.env.NODE_ENV!=="production"?"resolveComponent":""),vn=Symbol(process.env.NODE_ENV!=="production"?"resolveDynamicComponent":""),bn=Symbol(process.env.NODE_ENV!=="production"?"resolveDirective":""),kn=Symbol(process.env.NODE_ENV!=="production"?"resolveFilter":""),En=Symbol(process.env.NODE_ENV!=="production"?"withDirectives":""),Nn=Symbol(process.env.NODE_ENV!=="production"?"renderList":""),Eo=Symbol(process.env.NODE_ENV!=="production"?"renderSlot":""),No=Symbol(process.env.NODE_ENV!=="production"?"createSlots":""),Bt=Symbol(process.env.NODE_ENV!=="production"?"toDisplayString":""),$t=Symbol(process.env.NODE_ENV!=="production"?"mergeProps":""),wn=Symbol(process.env.NODE_ENV!=="production"?"normalizeClass":""),xn=Symbol(process.env.NODE_ENV!=="production"?"normalizeStyle":""),lt=Symbol(process.env.NODE_ENV!=="production"?"normalizeProps":""),at=Symbol(process.env.NODE_ENV!=="production"?"guardReactiveProps":""),_n=Symbol(process.env.NODE_ENV!=="production"?"toHandlers":""),Cn=Symbol(process.env.NODE_ENV!=="production"?"camelize":""),Gl=Symbol(process.env.NODE_ENV!=="production"?"capitalize":""),Sn=Symbol(process.env.NODE_ENV!=="production"?"toHandlerKey":""),Tt=Symbol(process.env.NODE_ENV!=="production"?"setBlockTracking":""),Jl=Symbol(process.env.NODE_ENV!=="production"?"pushScopeId":""),Zl=Symbol(process.env.NODE_ENV!=="production"?"popScopeId":""),Bn=Symbol(process.env.NODE_ENV!=="production"?"withCtx":""),Yl=Symbol(process.env.NODE_ENV!=="production"?"unref":""),Xl=Symbol(process.env.NODE_ENV!=="production"?"isRef":""),$n=Symbol(process.env.NODE_ENV!=="production"?"withMemo":""),wo=Symbol(process.env.NODE_ENV!=="production"?"isMemoSame":""),Ze={[st]:"Fragment",[rt]:"Teleport",[mn]:"Suspense",[St]:"KeepAlive",[yo]:"BaseTransition",[Re]:"openBlock",[vo]:"createBlock",[bo]:"createElementBlock",[un]:"createVNode",[hn]:"createElementVNode",[it]:"createCommentVNode",[gn]:"createTextVNode",[ko]:"createStaticVNode",[yn]:"resolveComponent",[vn]:"resolveDynamicComponent",[bn]:"resolveDirective",[kn]:"resolveFilter",[En]:"withDirectives",[Nn]:"renderList",[Eo]:"renderSlot",[No]:"createSlots",[Bt]:"toDisplayString",[$t]:"mergeProps",[wn]:"normalizeClass",[xn]:"normalizeStyle",[lt]:"normalizeProps",[at]:"guardReactiveProps",[_n]:"toHandlers",[Cn]:"camelize",[Gl]:"capitalize",[Sn]:"toHandlerKey",[Tt]:"setBlockTracking",[Jl]:"pushScopeId",[Zl]:"popScopeId",[Bn]:"withCtx",[Yl]:"unref",[Xl]:"isRef",[$n]:"withMemo",[wo]:"isMemoSame"};function Ql(t){Object.getOwnPropertySymbols(t).forEach(n=>{Ze[n]=t[n]})}const me={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function Vl(t,n=""){return{type:0,source:n,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:me}}function ct(t,n,o,s,r,l,i,a=!1,c=!1,p=!1,m=me){return t&&(a?(t.helper(Re),t.helper(Qe(t.inSSR,p))):t.helper(Xe(t.inSSR,p)),i&&t.helper(En)),{type:13,tag:n,props:o,children:s,patchFlag:r,dynamicProps:l,directives:i,isBlock:a,disableTracking:c,isComponent:p,loc:m}}function Fe(t,n=me){return{type:17,loc:n,elements:t}}function ge(t,n=me){return{type:15,loc:n,properties:t}}function X(t,n){return{type:16,loc:me,key:te(t)?F(t,!0):t,value:n}}function F(t,n=!1,o=me,s=0){return{type:4,loc:o,content:t,isStatic:n,constType:n?3:s}}function ye(t,n=me){return{type:8,loc:n,children:t}}function ee(t,n=[],o=me){return{type:14,loc:o,callee:t,arguments:n}}function Ye(t,n=void 0,o=!1,s=!1,r=me){return{type:18,params:t,returns:n,newline:o,isSlot:s,loc:r}}function Tn(t,n,o,s=!0){return{type:19,test:t,consequent:n,alternate:o,newline:s,loc:me}}function ea(t,n,o=!1,s=!1){return{type:20,index:t,value:n,needPauseTracking:o,inVOnce:s,needArraySpread:!1,loc:me}}function ta(t){return{type:21,body:t,loc:me}}function Xe(t,n){return t||n?un:hn}function Qe(t,n){return t||n?vo:bo}function Dn(t,{helper:n,removeHelper:o,inSSR:s}){t.isBlock||(t.isBlock=!0,o(Xe(s,t.isComponent)),n(Re),n(Qe(s,t.isComponent)))}const xo=new Uint8Array([123,123]),_o=new Uint8Array([125,125]);function Co(t){return t>=97&&t<=122||t>=65&&t<=90}function ue(t){return t===32||t===10||t===9||t===12||t===13}function Oe(t){return t===47||t===62||ue(t)}function Dt(t){const n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}const ne={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class na{constructor(n,o){this.stack=n,this.cbs=o,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=xo,this.delimiterClose=_o,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=xo,this.delimiterClose=_o}getPos(n){let o=1,s=n+1;for(let r=this.newlines.length-1;r>=0;r--){const l=this.newlines[r];if(n>l){o=r+2,s=n-l;break}}return{column:s,line:o,offset:n}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(n){n===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&n===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(n))}stateInterpolationOpen(n){if(n===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const o=this.index+1-this.delimiterOpen.length;o>this.sectionStart&&this.cbs.ontext(this.sectionStart,o),this.state=3,this.sectionStart=o}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(n)):(this.state=1,this.stateText(n))}stateInterpolation(n){n===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(n))}stateInterpolationClose(n){n===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(n))}stateSpecialStartSequence(n){const o=this.sequenceIndex===this.currentSequence.length;if(!(o?Oe(n):(n|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!o){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(n)}stateInRCDATA(n){if(this.sequenceIndex===this.currentSequence.length){if(n===62||ue(n)){const o=this.index-this.currentSequence.length;if(this.sectionStart<o){const s=this.index;this.index=o,this.cbs.ontext(this.sectionStart,o),this.index=s}this.sectionStart=o+2,this.stateInClosingTagName(n),this.inRCDATA=!1;return}this.sequenceIndex=0}(n|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===ne.TitleEnd||this.currentSequence===ne.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&n===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(n)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(n===60)}stateCDATASequence(n){n===ne.Cdata[this.sequenceIndex]?++this.sequenceIndex===ne.Cdata.length&&(this.state=28,this.currentSequence=ne.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(n))}fastForwardTo(n){for(;++this.index<this.buffer.length;){const o=this.buffer.charCodeAt(this.index);if(o===10&&this.newlines.push(this.index),o===n)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(n){n===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===ne.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):n!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(n,o){this.enterRCDATA(n,o),this.state=31}enterRCDATA(n,o){this.inRCDATA=!0,this.currentSequence=n,this.sequenceIndex=o}stateBeforeTagName(n){n===33?(this.state=22,this.sectionStart=this.index+1):n===63?(this.state=24,this.sectionStart=this.index+1):Co(n)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:n===116?this.state=30:this.state=n===115?29:6):n===47?this.state=8:(this.state=1,this.stateText(n))}stateInTagName(n){Oe(n)&&this.handleTagName(n)}stateInSFCRootTagName(n){if(Oe(n)){const o=this.buffer.slice(this.sectionStart,this.index);o!=="template"&&this.enterRCDATA(Dt("</"+o),0),this.handleTagName(n)}}handleTagName(n){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(n)}stateBeforeClosingTagName(n){ue(n)||(n===62?(process.env.NODE_ENV!=="production"&&this.cbs.onerr(14,this.index),this.state=1,this.sectionStart=this.index+1):(this.state=Co(n)?9:27,this.sectionStart=this.index))}stateInClosingTagName(n){(n===62||ue(n))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(n))}stateAfterClosingTagName(n){n===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(n){n===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):n===47?(this.state=7,process.env.NODE_ENV!=="production"&&this.peek()!==62&&this.cbs.onerr(22,this.index)):n===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):ue(n)||(process.env.NODE_ENV!=="production"&&n===61&&this.cbs.onerr(19,this.index),this.handleAttrStart(n))}handleAttrStart(n){n===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):n===46||n===58||n===64||n===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(n){n===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):ue(n)||(this.state=11,this.stateBeforeAttrName(n))}stateInAttrName(n){n===61||Oe(n)?(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(n)):process.env.NODE_ENV!=="production"&&(n===34||n===39||n===60)&&this.cbs.onerr(17,this.index)}stateInDirName(n){n===61||Oe(n)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):n===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(n){n===61||Oe(n)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===91?this.state=15:n===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(n){n===93?this.state=14:(n===61||Oe(n))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(n),process.env.NODE_ENV!=="production"&&this.cbs.onerr(27,this.index))}stateInDirModifier(n){n===61||Oe(n)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(n){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(n)}stateAfterAttrName(n){n===61?this.state=18:n===47||n===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(n)):ue(n)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(n))}stateBeforeAttrValue(n){n===34?(this.state=19,this.sectionStart=this.index+1):n===39?(this.state=20,this.sectionStart=this.index+1):ue(n)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(n))}handleInAttrValue(n,o){(n===o||this.fastForwardTo(o))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(o===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(n){this.handleInAttrValue(n,34)}stateInAttrValueSingleQuotes(n){this.handleInAttrValue(n,39)}stateInAttrValueNoQuotes(n){ue(n)||n===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(n)):(process.env.NODE_ENV!=="production"&&n===34||n===39||n===60||n===61||n===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(n){n===91?(this.state=26,this.sequenceIndex=0):this.state=n===45?25:23}stateInDeclaration(n){(n===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(n){(n===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(n){n===45?(this.state=28,this.currentSequence=ne.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(n){(n===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(n){n===ne.ScriptEnd[3]?this.startSpecial(ne.ScriptEnd,4):n===ne.StyleEnd[3]?this.startSpecial(ne.StyleEnd,4):(this.state=6,this.stateInTagName(n))}stateBeforeSpecialT(n){n===ne.TitleEnd[3]?this.startSpecial(ne.TitleEnd,4):n===ne.TextareaEnd[3]?this.startSpecial(ne.TextareaEnd,4):(this.state=6,this.stateInTagName(n))}startEntity(){}stateInEntity(){}parse(n){for(this.buffer=n;this.index<this.buffer.length;){const o=this.buffer.charCodeAt(this.index);switch(o===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(o);break}case 2:{this.stateInterpolationOpen(o);break}case 3:{this.stateInterpolation(o);break}case 4:{this.stateInterpolationClose(o);break}case 31:{this.stateSpecialStartSequence(o);break}case 32:{this.stateInRCDATA(o);break}case 26:{this.stateCDATASequence(o);break}case 19:{this.stateInAttrValueDoubleQuotes(o);break}case 12:{this.stateInAttrName(o);break}case 13:{this.stateInDirName(o);break}case 14:{this.stateInDirArg(o);break}case 15:{this.stateInDynamicDirArg(o);break}case 16:{this.stateInDirModifier(o);break}case 28:{this.stateInCommentLike(o);break}case 27:{this.stateInSpecialComment(o);break}case 11:{this.stateBeforeAttrName(o);break}case 6:{this.stateInTagName(o);break}case 34:{this.stateInSFCRootTagName(o);break}case 9:{this.stateInClosingTagName(o);break}case 5:{this.stateBeforeTagName(o);break}case 17:{this.stateAfterAttrName(o);break}case 20:{this.stateInAttrValueSingleQuotes(o);break}case 18:{this.stateBeforeAttrValue(o);break}case 8:{this.stateBeforeClosingTagName(o);break}case 10:{this.stateAfterClosingTagName(o);break}case 29:{this.stateBeforeSpecialS(o);break}case 30:{this.stateBeforeSpecialT(o);break}case 21:{this.stateInAttrValueNoQuotes(o);break}case 7:{this.stateInSelfClosingTag(o);break}case 23:{this.stateInDeclaration(o);break}case 22:{this.stateBeforeDeclaration(o);break}case 25:{this.stateBeforeComment(o);break}case 24:{this.stateInProcessingInstruction(o);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const n=this.buffer.length;this.sectionStart>=n||(this.state===28?this.currentSequence===ne.CdataEnd?this.cbs.oncdata(this.sectionStart,n):this.cbs.oncomment(this.sectionStart,n):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,n))}emitCodePoint(n,o){}}const oa={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:t=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${t}.sync\` should be changed to \`v-model:${t}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function On(t,{compatConfig:n}){const o=n&&n[t];return t==="MODE"?o||3:o}function Ae(t,n){const o=On("MODE",n),s=On(t,n);return o===3?s===!0:s!==!1}function Ve(t,n,o,...s){const r=Ae(t,n);return process.env.NODE_ENV!=="production"&&r&&Ot(t,n,o,...s),r}function Ot(t,n,o,...s){if(On(t,n)==="suppress-warning")return;const{message:l,link:i}=oa[t],a=`(deprecation ${t}) ${typeof l=="function"?l(...s):l}${i?`
|
|
140
|
+
Details: ${i}`:""}`,c=new SyntaxError(a);c.code=t,o&&(c.loc=o),n.onWarn(c)}function An(t){throw t}function So(t){process.env.NODE_ENV!=="production"&&console.warn(`[Vue warn] ${t.message}`)}function W(t,n,o,s){const r=process.env.NODE_ENV!=="production"?(o||sa)[t]+(s||""):`https://vuejs.org/error-reference/#compiler-${t}`,l=new SyntaxError(String(r));return l.code=t,l.loc=n,l}const sa={0:"Illegal comment.",1:"CDATA section is allowed only in XML context.",2:"Duplicate attribute.",3:"End tag cannot have attributes.",4:"Illegal '/' in tags.",5:"Unexpected EOF in tag.",6:"Unexpected EOF in CDATA section.",7:"Unexpected EOF in comment.",8:"Unexpected EOF in script.",9:"Unexpected EOF in tag.",10:"Incorrectly closed comment.",11:"Incorrectly opened comment.",12:"Illegal tag name. Use '<' to print '<'.",13:"Attribute value was expected.",14:"End tag name was expected.",15:"Whitespace was expected.",16:"Unexpected '<!--' in comment.",17:`Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"v-if/v-else-if is missing expression.",29:"v-if/else branches must use unique keys.",30:"v-else/v-else-if has no adjacent v-if or v-else-if.",31:"v-for is missing expression.",32:"v-for has invalid expression.",33:"<template v-for> key should be placed on the <template> tag.",34:"v-bind is missing expression.",52:"v-bind with same-name shorthand only allows static argument.",35:"v-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"v-slot can only be used on components or <template> tags.",41:"v-model is missing expression.",42:"v-model value must be a valid JavaScript member expression.",43:"v-model cannot be used on v-for or v-slot scope variables because they are not writable.",44:`v-model cannot be used on a prop, because local prop bindings are not writable.
|
|
141
|
+
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',53:""},ce=t=>t.type===4&&t.isStatic;function Bo(t){switch(t){case"Teleport":case"teleport":return rt;case"Suspense":case"suspense":return mn;case"KeepAlive":case"keep-alive":return St;case"BaseTransition":case"base-transition":return yo}}const ra=/^$|^\d|[^\$\w\xA0-\uFFFF]/,Ln=t=>!ra.test(t),ia=/[A-Za-z_$\xA0-\uFFFF]/,la=/[\.\?\w$\xA0-\uFFFF]/,aa=/\s+[.[]\s*|\s*[.[]\s+/g,$o=t=>t.type===4?t.content:t.loc.source,To=t=>{const n=$o(t).trim().replace(aa,a=>a.trim());let o=0,s=[],r=0,l=0,i=null;for(let a=0;a<n.length;a++){const c=n.charAt(a);switch(o){case 0:if(c==="[")s.push(o),o=1,r++;else if(c==="(")s.push(o),o=2,l++;else if(!(a===0?ia:la).test(c))return!1;break;case 1:c==="'"||c==='"'||c==="`"?(s.push(o),o=3,i=c):c==="["?r++:c==="]"&&(--r||(o=s.pop()));break;case 2:if(c==="'"||c==='"'||c==="`")s.push(o),o=3,i=c;else if(c==="(")l++;else if(c===")"){if(a===n.length-1)return!1;--l||(o=s.pop())}break;case 3:c===i&&(o=s.pop(),i=null);break}}return!r&&!l},ca=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,da=t=>ca.test($o(t));function Do(t,n){if(!t)throw new Error(n||"unexpected compiler condition")}function de(t,n,o=!1){for(let s=0;s<t.props.length;s++){const r=t.props[s];if(r.type===7&&(o||r.exp)&&(te(n)?r.name===n:n.test(r.name)))return r}}function dt(t,n,o=!1,s=!1){for(let r=0;r<t.props.length;r++){const l=t.props[r];if(l.type===6){if(o)continue;if(l.name===n&&(l.value||s))return l}else if(l.name==="bind"&&(l.exp||s)&&Le(l.arg,n))return l}}function Le(t,n){return!!(t&&ce(t)&&t.content===n)}function pa(t){return t.props.some(n=>n.type===7&&n.name==="bind"&&(!n.arg||n.arg.type!==4||!n.arg.isStatic))}function In(t){return t.type===5||t.type===2}function Oo(t){return t.type===7&&t.name==="pre"}function fa(t){return t.type===7&&t.name==="slot"}function At(t){return t.type===1&&t.tagType===3}function Lt(t){return t.type===1&&t.tagType===2}const ma=new Set([lt,at]);function Ao(t,n=[]){if(t&&!te(t)&&t.type===14){const o=t.callee;if(!te(o)&&ma.has(o))return Ao(t.arguments[0],n.concat(t))}return[t,n]}function It(t,n,o){let s,r=t.type===13?t.props:t.arguments[2],l=[],i;if(r&&!te(r)&&r.type===14){const a=Ao(r);r=a[0],l=a[1],i=l[l.length-1]}if(r==null||te(r))s=ge([n]);else if(r.type===14){const a=r.arguments[0];!te(a)&&a.type===15?Lo(n,a)||a.properties.unshift(n):r.callee===_n?s=ee(o.helper($t),[ge([n]),r]):r.arguments.unshift(ge([n])),!s&&(s=r)}else r.type===15?(Lo(n,r)||r.properties.unshift(n),s=r):(s=ee(o.helper($t),[ge([n]),r]),i&&i.callee===at&&(i=l[l.length-2]));t.type===13?i?i.arguments[0]=s:t.props=s:i?i.arguments[0]=s:t.arguments[2]=s}function Lo(t,n){let o=!1;if(t.key.type===4){const s=t.key.content;o=n.properties.some(r=>r.key.type===4&&r.key.content===s)}return o}function pt(t,n){return`_${n}_${t.replace(/[^\w]/g,(o,s)=>o==="-"?"_":t.charCodeAt(s).toString())}`}function ua(t){return t.type===14&&t.callee===$n?t.arguments[1].returns:t}const ha=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,Io={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:Ct,isPreTag:Ct,isIgnoreNewlineTag:Ct,isCustomElement:Ct,onError:An,onWarn:So,comments:process.env.NODE_ENV!=="production",prefixIdentifiers:!1};let q=Io,ft=null,Se="",re=null,U=null,pe="",Be=-1,je=-1,Mn=0,Ie=!1,Pn=null;const J=[],K=new na(J,{onerr:fe,ontext(t,n){Mt(oe(t,n),t,n)},ontextentity(t,n,o){Mt(t,n,o)},oninterpolation(t,n){if(Ie)return Mt(oe(t,n),t,n);let o=t+K.delimiterOpen.length,s=n-K.delimiterClose.length;for(;ue(Se.charCodeAt(o));)o++;for(;ue(Se.charCodeAt(s-1));)s--;let r=oe(o,s);r.includes("&")&&(r=q.decodeEntities(r,!1)),Rn({type:5,content:Rt(r,!1,Q(o,s)),loc:Q(t,n)})},onopentagname(t,n){const o=oe(t,n);re={type:1,tag:o,ns:q.getNamespace(o,J[0],q.ns),tagType:0,props:[],children:[],loc:Q(t-1,n),codegenNode:void 0}},onopentagend(t){Po(t)},onclosetag(t,n){const o=oe(t,n);if(!q.isVoidTag(o)){let s=!1;for(let r=0;r<J.length;r++)if(J[r].tag.toLowerCase()===o.toLowerCase()){s=!0,r>0&&fe(24,J[0].loc.start.offset);for(let i=0;i<=r;i++){const a=J.shift();Pt(a,n,i<r)}break}s||fe(23,Ro(t,60))}},onselfclosingtag(t){const n=re.tag;re.isSelfClosing=!0,Po(t),J[0]&&J[0].tag===n&&Pt(J.shift(),t)},onattribname(t,n){U={type:6,name:oe(t,n),nameLoc:Q(t,n),value:void 0,loc:Q(t)}},ondirname(t,n){const o=oe(t,n),s=o==="."||o===":"?"bind":o==="@"?"on":o==="#"?"slot":o.slice(2);if(!Ie&&s===""&&fe(26,t),Ie||s==="")U={type:6,name:o,nameLoc:Q(t,n),value:void 0,loc:Q(t)};else if(U={type:7,name:s,rawName:o,exp:void 0,arg:void 0,modifiers:o==="."?[F("prop")]:[],loc:Q(t)},s==="pre"){Ie=K.inVPre=!0,Pn=re;const r=re.props;for(let l=0;l<r.length;l++)r[l].type===7&&(r[l]=Ca(r[l]))}},ondirarg(t,n){if(t===n)return;const o=oe(t,n);if(Ie&&!Oo(U))U.name+=o,ze(U.nameLoc,n);else{const s=o[0]!=="[";U.arg=Rt(s?o:o.slice(1,-1),s,Q(t,n),s?3:0)}},ondirmodifier(t,n){const o=oe(t,n);if(Ie&&!Oo(U))U.name+="."+o,ze(U.nameLoc,n);else if(U.name==="slot"){const s=U.arg;s&&(s.content+="."+o,ze(s.loc,n))}else{const s=F(o,!0,Q(t,n));U.modifiers.push(s)}},onattribdata(t,n){pe+=oe(t,n),Be<0&&(Be=t),je=n},onattribentity(t,n,o){pe+=t,Be<0&&(Be=n),je=o},onattribnameend(t){const n=U.loc.start.offset,o=oe(n,t);U.type===7&&(U.rawName=o),re.props.some(s=>(s.type===7?s.rawName:s.name)===o)&&fe(2,n)},onattribend(t,n){if(re&&U){if(ze(U.loc,n),t!==0)if(pe.includes("&")&&(pe=q.decodeEntities(pe,!0)),U.type===6)U.name==="class"&&(pe=zo(pe).trim()),t===1&&!pe&&fe(13,n),U.value={type:2,content:pe,loc:t===1?Q(Be,je):Q(Be-1,je+1)},K.inSFCRoot&&re.tag==="template"&&U.name==="lang"&&pe&&pe!=="html"&&K.enterRCDATA(Dt("</template"),0);else{let o=0;U.exp=Rt(pe,!1,Q(Be,je),0,o),U.name==="for"&&(U.forParseResult=ya(U.exp));let s=-1;U.name==="bind"&&(s=U.modifiers.findIndex(r=>r.content==="sync"))>-1&&Ve("COMPILER_V_BIND_SYNC",q,U.loc,U.arg.loc.source)&&(U.name="model",U.modifiers.splice(s,1))}(U.type!==7||U.name!=="pre")&&re.props.push(U)}pe="",Be=je=-1},oncomment(t,n){q.comments&&Rn({type:3,content:oe(t,n),loc:Q(t-4,n+3)})},onend(){const t=Se.length;if(process.env.NODE_ENV!=="production"&&K.state!==1)switch(K.state){case 5:case 8:fe(5,t);break;case 3:case 4:fe(25,K.sectionStart);break;case 28:K.currentSequence===ne.CdataEnd?fe(6,t):fe(7,t);break;case 6:case 7:case 9:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:fe(9,t);break}for(let n=0;n<J.length;n++)Pt(J[n],t-1),fe(24,J[n].loc.start.offset)},oncdata(t,n){J[0].ns!==0?Mt(oe(t,n),t,n):fe(1,t-9)},onprocessinginstruction(t){(J[0]?J[0].ns:q.ns)===0&&fe(21,t-1)}}),Mo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ga=/^\(|\)$/g;function ya(t){const n=t.loc,o=t.content,s=o.match(ha);if(!s)return;const[,r,l]=s,i=(f,u,E=!1)=>{const x=n.start.offset+u,_=x+f.length;return Rt(f,!1,Q(x,_),0,E?1:0)},a={source:i(l.trim(),o.indexOf(l,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=r.trim().replace(ga,"").trim();const p=r.indexOf(c),m=c.match(Mo);if(m){c=c.replace(Mo,"").trim();const f=m[1].trim();let u;if(f&&(u=o.indexOf(f,p+c.length),a.key=i(f,u,!0)),m[2]){const E=m[2].trim();E&&(a.index=i(E,o.indexOf(E,a.key?u+f.length:p+c.length),!0))}}return c&&(a.value=i(c,p,!0)),a}function oe(t,n){return Se.slice(t,n)}function Po(t){K.inSFCRoot&&(re.innerLoc=Q(t+1,t+1)),Rn(re);const{tag:n,ns:o}=re;o===0&&q.isPreTag(n)&&Mn++,q.isVoidTag(n)?Pt(re,t):(J.unshift(re),(o===1||o===2)&&(K.inXML=!0)),re=null}function Mt(t,n,o){{const l=J[0]&&J[0].tag;l!=="script"&&l!=="style"&&t.includes("&")&&(t=q.decodeEntities(t,!1))}const s=J[0]||ft,r=s.children[s.children.length-1];r&&r.type===2?(r.content+=t,ze(r.loc,o)):s.children.push({type:2,content:t,loc:Q(n,o)})}function Pt(t,n,o=!1){o?ze(t.loc,Ro(n,60)):ze(t.loc,va(n,62)+1),K.inSFCRoot&&(t.children.length?t.innerLoc.end=Te({},t.children[t.children.length-1].loc.end):t.innerLoc.end=Te({},t.innerLoc.start),t.innerLoc.source=oe(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:s,ns:r,children:l}=t;if(Ie||(s==="slot"?t.tagType=2:Fo(t)?t.tagType=3:ka(t)&&(t.tagType=1)),K.inRCDATA||(t.children=jo(l)),r===0&&q.isIgnoreNewlineTag(s)){const i=l[0];i&&i.type===2&&(i.content=i.content.replace(/^\r?\n/,""))}r===0&&q.isPreTag(s)&&Mn--,Pn===t&&(Ie=K.inVPre=!1,Pn=null),K.inXML&&(J[0]?J[0].ns:q.ns)===0&&(K.inXML=!1);{const i=t.props;if(process.env.NODE_ENV!=="production"&&Ae("COMPILER_V_IF_V_FOR_PRECEDENCE",q)){let c=!1,p=!1;for(let m=0;m<i.length;m++){const f=i[m];if(f.type===7&&(f.name==="if"?c=!0:f.name==="for"&&(p=!0)),c&&p){Ot("COMPILER_V_IF_V_FOR_PRECEDENCE",q,t.loc);break}}}if(!K.inSFCRoot&&Ae("COMPILER_NATIVE_TEMPLATE",q)&&t.tag==="template"&&!Fo(t)){process.env.NODE_ENV!=="production"&&Ot("COMPILER_NATIVE_TEMPLATE",q,t.loc);const c=J[0]||ft,p=c.children.indexOf(t);c.children.splice(p,1,...t.children)}const a=i.find(c=>c.type===6&&c.name==="inline-template");a&&Ve("COMPILER_INLINE_TEMPLATE",q,a.loc)&&t.children.length&&(a.value={type:2,content:oe(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:a.loc})}}function va(t,n){let o=t;for(;Se.charCodeAt(o)!==n&&o<Se.length-1;)o++;return o}function Ro(t,n){let o=t;for(;Se.charCodeAt(o)!==n&&o>=0;)o--;return o}const ba=new Set(["if","else","else-if","for","slot"]);function Fo({tag:t,props:n}){if(t==="template"){for(let o=0;o<n.length;o++)if(n[o].type===7&&ba.has(n[o].name))return!0}return!1}function ka({tag:t,props:n}){if(q.isCustomElement(t))return!1;if(t==="component"||Ea(t.charCodeAt(0))||Bo(t)||q.isBuiltInComponent&&q.isBuiltInComponent(t)||q.isNativeTag&&!q.isNativeTag(t))return!0;for(let o=0;o<n.length;o++){const s=n[o];if(s.type===6){if(s.name==="is"&&s.value){if(s.value.content.startsWith("vue:"))return!0;if(Ve("COMPILER_IS_ON_ELEMENT",q,s.loc))return!0}}else if(s.name==="bind"&&Le(s.arg,"is")&&Ve("COMPILER_IS_ON_ELEMENT",q,s.loc))return!0}return!1}function Ea(t){return t>64&&t<91}const Na=/\r\n/g;function jo(t){const n=q.whitespace!=="preserve";let o=!1;for(let s=0;s<t.length;s++){const r=t[s];if(r.type===2)if(Mn)r.content=r.content.replace(Na,`
|
|
142
|
+
`);else if(wa(r.content)){const l=t[s-1]&&t[s-1].type,i=t[s+1]&&t[s+1].type;!l||!i||n&&(l===3&&(i===3||i===1)||l===1&&(i===3||i===1&&xa(r.content)))?(o=!0,t[s]=null):r.content=" "}else n&&(r.content=zo(r.content))}return o?t.filter(Boolean):t}function wa(t){for(let n=0;n<t.length;n++)if(!ue(t.charCodeAt(n)))return!1;return!0}function xa(t){for(let n=0;n<t.length;n++){const o=t.charCodeAt(n);if(o===10||o===13)return!0}return!1}function zo(t){let n="",o=!1;for(let s=0;s<t.length;s++)ue(t.charCodeAt(s))?o||(n+=" ",o=!0):(n+=t[s],o=!1);return n}function Rn(t){(J[0]||ft).children.push(t)}function Q(t,n){return{start:K.getPos(t),end:n==null?n:K.getPos(n),source:n==null?n:oe(t,n)}}function _a(t){return Q(t.start.offset,t.end.offset)}function ze(t,n){t.end=K.getPos(n),t.source=oe(t.start.offset,n)}function Ca(t){const n={type:6,name:t.rawName,nameLoc:Q(t.loc.start.offset,t.loc.start.offset+t.rawName.length),value:void 0,loc:t.loc};if(t.exp){const o=t.exp.loc;o.end.offset<t.loc.end.offset&&(o.start.offset--,o.start.column--,o.end.offset++,o.end.column++),n.value={type:2,content:t.exp.content,loc:o}}return n}function Rt(t,n=!1,o,s=0,r=0){return F(t,n,o,s)}function fe(t,n,o){q.onError(W(t,Q(n,n),void 0,o))}function Sa(){K.reset(),re=null,U=null,pe="",Be=-1,je=-1,J.length=0}function Ba(t,n){if(Sa(),Se=t,q=Te({},Io),n){let r;for(r in n)n[r]!=null&&(q[r]=n[r])}if(process.env.NODE_ENV!=="production"&&!q.decodeEntities)throw new Error("[@vue/compiler-core] decodeEntities option is required in browser builds.");K.mode=q.parseMode==="html"?1:q.parseMode==="sfc"?2:0,K.inXML=q.ns===1||q.ns===2;const o=n&&n.delimiters;o&&(K.delimiterOpen=Dt(o[0]),K.delimiterClose=Dt(o[1]));const s=ft=Vl([],t);return K.parse(Se),s.loc=Q(0,t.length),s.children=jo(s.children),ft=null,s}function $a(t,n){Ft(t,void 0,n,!!Ho(t))}function Ho(t){const n=t.children.filter(o=>o.type!==3);return n.length===1&&n[0].type===1&&!Lt(n[0])?n[0]:null}function Ft(t,n,o,s=!1,r=!1){const{children:l}=t,i=[];for(let f=0;f<l.length;f++){const u=l[f];if(u.type===1&&u.tagType===0){const E=s?0:he(u,o);if(E>0){if(E>=2){u.codegenNode.patchFlag=-1,i.push(u);continue}}else{const x=u.codegenNode;if(x.type===13){const _=x.patchFlag;if((_===void 0||_===512||_===1)&&qo(u,o)>=2){const w=Wo(u);w&&(x.props=o.hoist(w))}x.dynamicProps&&(x.dynamicProps=o.hoist(x.dynamicProps))}}}else if(u.type===12&&(s?0:he(u,o))>=2){u.codegenNode.type===14&&u.codegenNode.arguments.length>0&&u.codegenNode.arguments.push(-1+(process.env.NODE_ENV!=="production"?` /* ${ot[-1]} */`:"")),i.push(u);continue}if(u.type===1){const E=u.tagType===1;E&&o.scopes.vSlot++,Ft(u,t,o,!1,r),E&&o.scopes.vSlot--}else if(u.type===11)Ft(u,t,o,u.children.length===1,!0);else if(u.type===9)for(let E=0;E<u.branches.length;E++)Ft(u.branches[E],t,o,u.branches[E].children.length===1,r)}let a=!1;const c=[];if(i.length===l.length&&t.type===1){if(t.tagType===0&&t.codegenNode&&t.codegenNode.type===13&&Ne(t.codegenNode.children))t.codegenNode.children=p(Fe(t.codegenNode.children)),a=!0;else if(t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!Ne(t.codegenNode.children)&&t.codegenNode.children.type===15){const f=m(t.codegenNode,"default");f&&(c.push(o.cached.length),f.returns=p(Fe(f.returns)),a=!0)}else if(t.tagType===3&&n&&n.type===1&&n.tagType===1&&n.codegenNode&&n.codegenNode.type===13&&n.codegenNode.children&&!Ne(n.codegenNode.children)&&n.codegenNode.children.type===15){const f=de(t,"slot",!0),u=f&&f.arg&&m(n.codegenNode,f.arg);u&&(c.push(o.cached.length),u.returns=p(Fe(u.returns)),a=!0)}}if(!a)for(const f of i)c.push(o.cached.length),f.codegenNode=o.cache(f.codegenNode);c.length&&t.type===1&&t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!Ne(t.codegenNode.children)&&t.codegenNode.children.type===15&&t.codegenNode.children.properties.push(X("__",F(JSON.stringify(c),!1)));function p(f){const u=o.cache(f);return r&&o.hmr&&(u.needArraySpread=!0),u}function m(f,u){if(f.children&&!Ne(f.children)&&f.children.type===15){const E=f.children.properties.find(x=>x.key===u||x.key.content===u);return E&&E.value}}i.length&&o.transformHoist&&o.transformHoist(l,o,t)}function he(t,n){const{constantCache:o}=n;switch(t.type){case 1:if(t.tagType!==0)return 0;const s=o.get(t);if(s!==void 0)return s;const r=t.codegenNode;if(r.type!==13||r.isBlock&&t.tag!=="svg"&&t.tag!=="foreignObject"&&t.tag!=="math")return 0;if(r.patchFlag===void 0){let i=3;const a=qo(t,n);if(a===0)return o.set(t,0),0;a<i&&(i=a);for(let c=0;c<t.children.length;c++){const p=he(t.children[c],n);if(p===0)return o.set(t,0),0;p<i&&(i=p)}if(i>1)for(let c=0;c<t.props.length;c++){const p=t.props[c];if(p.type===7&&p.name==="bind"&&p.exp){const m=he(p.exp,n);if(m===0)return o.set(t,0),0;m<i&&(i=m)}}if(r.isBlock){for(let c=0;c<t.props.length;c++)if(t.props[c].type===7)return o.set(t,0),0;n.removeHelper(Re),n.removeHelper(Qe(n.inSSR,r.isComponent)),r.isBlock=!1,n.helper(Xe(n.inSSR,r.isComponent))}return o.set(t,i),i}else return o.set(t,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return he(t.content,n);case 4:return t.constType;case 8:let l=3;for(let i=0;i<t.children.length;i++){const a=t.children[i];if(te(a)||dn(a))continue;const c=he(a,n);if(c===0)return 0;c<l&&(l=c)}return l;case 20:return 2;default:return process.env.NODE_ENV,0}}const Ta=new Set([wn,xn,lt,at]);function Uo(t,n){if(t.type===14&&!te(t.callee)&&Ta.has(t.callee)){const o=t.arguments[0];if(o.type===4)return he(o,n);if(o.type===14)return Uo(o,n)}return 0}function qo(t,n){let o=3;const s=Wo(t);if(s&&s.type===15){const{properties:r}=s;for(let l=0;l<r.length;l++){const{key:i,value:a}=r[l],c=he(i,n);if(c===0)return c;c<o&&(o=c);let p;if(a.type===4?p=he(a,n):a.type===14?p=Uo(a,n):p=0,p===0)return p;p<o&&(o=p)}}return o}function Wo(t){const n=t.codegenNode;if(n.type===13)return n.props}function Da(t,{filename:n="",prefixIdentifiers:o=!1,hoistStatic:s=!1,hmr:r=!1,cacheHandlers:l=!1,nodeTransforms:i=[],directiveTransforms:a={},transformHoist:c=null,isBuiltInComponent:p=an,isCustomElement:m=an,expressionPlugins:f=[],scopeId:u=null,slotted:E=!0,ssr:x=!1,inSSR:_=!1,ssrCssVars:w="",bindingMetadata:C=$l,inline:I=!1,isTS:$=!1,onError:D=An,onWarn:B=So,compatConfig:H}){const Z=n.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),P={filename:n,selfName:Z&&fn(De(Z[1])),prefixIdentifiers:o,hoistStatic:s,hmr:r,cacheHandlers:l,nodeTransforms:i,directiveTransforms:a,transformHoist:c,isBuiltInComponent:p,isCustomElement:m,expressionPlugins:f,scopeId:u,slotted:E,ssr:x,inSSR:_,ssrCssVars:w,bindingMetadata:C,inline:I,isTS:$,onError:D,onWarn:B,compatConfig:H,root:t,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:t,childIndex:0,inVOnce:!1,helper(M){const z=P.helpers.get(M)||0;return P.helpers.set(M,z+1),M},removeHelper(M){const z=P.helpers.get(M);if(z){const j=z-1;j?P.helpers.set(M,j):P.helpers.delete(M)}},helperString(M){return`_${Ze[P.helper(M)]}`},replaceNode(M){if(process.env.NODE_ENV!=="production"){if(!P.currentNode)throw new Error("Node being replaced is already removed.");if(!P.parent)throw new Error("Cannot replace root node.")}P.parent.children[P.childIndex]=P.currentNode=M},removeNode(M){if(process.env.NODE_ENV!=="production"&&!P.parent)throw new Error("Cannot remove root node.");const z=P.parent.children,j=M?z.indexOf(M):P.currentNode?P.childIndex:-1;if(process.env.NODE_ENV!=="production"&&j<0)throw new Error("node being removed is not a child of current parent");!M||M===P.currentNode?(P.currentNode=null,P.onNodeRemoved()):P.childIndex>j&&(P.childIndex--,P.onNodeRemoved()),P.parent.children.splice(j,1)},onNodeRemoved:an,addIdentifiers(M){},removeIdentifiers(M){},hoist(M){te(M)&&(M=F(M)),P.hoists.push(M);const z=F(`_hoisted_${P.hoists.length}`,!1,M.loc,2);return z.hoisted=M,z},cache(M,z=!1,j=!1){const k=ea(P.cached.length,M,z,j);return P.cached.push(k),k}};return P.filters=new Set,P}function Oa(t,n){const o=Da(t,n);jt(t,o),n.hoistStatic&&$a(t,o),n.ssr||Aa(t,o),t.helpers=new Set([...o.helpers.keys()]),t.components=[...o.components],t.directives=[...o.directives],t.imports=o.imports,t.hoists=o.hoists,t.temps=o.temps,t.cached=o.cached,t.transformed=!0,t.filters=[...o.filters]}function Aa(t,n){const{helper:o}=n,{children:s}=t;if(s.length===1){const r=Ho(t);if(r&&r.codegenNode){const l=r.codegenNode;l.type===13&&Dn(l,n),t.codegenNode=l}else t.codegenNode=s[0]}else if(s.length>1){let r=64;process.env.NODE_ENV!=="production"&&s.filter(l=>l.type!==3).length===1&&(r|=2048),t.codegenNode=ct(n,o(st),void 0,t.children,r,void 0,void 0,!0,void 0,!1)}}function La(t,n){let o=0;const s=()=>{o--};for(;o<t.children.length;o++){const r=t.children[o];te(r)||(n.grandParent=n.parent,n.parent=t,n.childIndex=o,n.onNodeRemoved=s,jt(r,n))}}function jt(t,n){n.currentNode=t;const{nodeTransforms:o}=n,s=[];for(let l=0;l<o.length;l++){const i=o[l](t,n);if(i&&(Ne(i)?s.push(...i):s.push(i)),n.currentNode)t=n.currentNode;else return}switch(t.type){case 3:n.ssr||n.helper(it);break;case 5:n.ssr||n.helper(Bt);break;case 9:for(let l=0;l<t.branches.length;l++)jt(t.branches[l],n);break;case 10:case 11:case 1:case 0:La(t,n);break}n.currentNode=t;let r=s.length;for(;r--;)s[r]()}function Ko(t,n){const o=te(t)?s=>s===t:s=>t.test(s);return(s,r)=>{if(s.type===1){const{props:l}=s;if(s.tagType===3&&l.some(fa))return;const i=[];for(let a=0;a<l.length;a++){const c=l[a];if(c.type===7&&o(c.name)){l.splice(a,1),a--;const p=n(s,c,r);p&&i.push(p)}}return i}}}const zt="/*@__PURE__*/",Go=t=>`${Ze[t]}: _${Ze[t]}`;function Ia(t,{mode:n="function",prefixIdentifiers:o=n==="module",sourceMap:s=!1,filename:r="template.vue.html",scopeId:l=null,optimizeImports:i=!1,runtimeGlobalName:a="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:p="vue/server-renderer",ssr:m=!1,isTS:f=!1,inSSR:u=!1}){const E={mode:n,prefixIdentifiers:o,sourceMap:s,filename:r,scopeId:l,optimizeImports:i,runtimeGlobalName:a,runtimeModuleName:c,ssrRuntimeModuleName:p,ssr:m,isTS:f,inSSR:u,source:t.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(_){return`_${Ze[_]}`},push(_,w=-2,C){E.code+=_},indent(){x(++E.indentLevel)},deindent(_=!1){_?--E.indentLevel:x(--E.indentLevel)},newline(){x(E.indentLevel)}};function x(_){E.push(`
|
|
143
|
+
`+" ".repeat(_),0)}return E}function Ma(t,n={}){const o=Ia(t,n);n.onContextCreated&&n.onContextCreated(o);const{mode:s,push:r,prefixIdentifiers:l,indent:i,deindent:a,newline:c,scopeId:p,ssr:m}=o,f=Array.from(t.helpers),u=f.length>0,E=!l&&s!=="module";Pa(t,o);const _=m?"ssrRender":"render",C=(m?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(r(`function ${_}(${C}) {`),i(),E&&(r("with (_ctx) {"),i(),u&&(r(`const { ${f.map(Go).join(", ")} } = _Vue
|
|
144
|
+
`,-1),c())),t.components.length&&(Fn(t.components,"component",o),(t.directives.length||t.temps>0)&&c()),t.directives.length&&(Fn(t.directives,"directive",o),t.temps>0&&c()),t.filters&&t.filters.length&&(c(),Fn(t.filters,"filter",o),c()),t.temps>0){r("let ");for(let I=0;I<t.temps;I++)r(`${I>0?", ":""}_temp${I}`)}return(t.components.length||t.directives.length||t.temps)&&(r(`
|
|
145
|
+
`,0),c()),m||r("return "),t.codegenNode?ie(t.codegenNode,o):r("null"),E&&(a(),r("}")),a(),r("}"),{ast:t,code:o.code,preamble:"",map:o.map?o.map.toJSON():void 0}}function Pa(t,n){const{ssr:o,prefixIdentifiers:s,push:r,newline:l,runtimeModuleName:i,runtimeGlobalName:a,ssrRuntimeModuleName:c}=n,p=a,m=Array.from(t.helpers);if(m.length>0&&(r(`const _Vue = ${p}
|
|
146
|
+
`,-1),t.hoists.length)){const f=[un,hn,it,gn,ko].filter(u=>m.includes(u)).map(Go).join(", ");r(`const { ${f} } = _Vue
|
|
147
|
+
`,-1)}Ra(t.hoists,n),l(),r("return ")}function Fn(t,n,{helper:o,push:s,newline:r,isTS:l}){const i=o(n==="filter"?kn:n==="component"?yn:bn);for(let a=0;a<t.length;a++){let c=t[a];const p=c.endsWith("__self");p&&(c=c.slice(0,-6)),s(`const ${pt(c,n)} = ${i}(${JSON.stringify(c)}${p?", true":""})${l?"!":""}`),a<t.length-1&&r()}}function Ra(t,n){if(!t.length)return;n.pure=!0;const{push:o,newline:s}=n;s();for(let r=0;r<t.length;r++){const l=t[r];l&&(o(`const _hoisted_${r+1} = `),ie(l,n),s())}n.pure=!1}function Fa(t){return te(t)||t.type===4||t.type===2||t.type===5||t.type===8}function jn(t,n){const o=t.length>3||process.env.NODE_ENV!=="production"&&t.some(s=>Ne(s)||!Fa(s));n.push("["),o&&n.indent(),mt(t,n,o),o&&n.deindent(),n.push("]")}function mt(t,n,o=!1,s=!0){const{push:r,newline:l}=n;for(let i=0;i<t.length;i++){const a=t[i];te(a)?r(a,-3):Ne(a)?jn(a,n):ie(a,n),i<t.length-1&&(o?(s&&r(","),l()):s&&r(", "))}}function ie(t,n){if(te(t)){n.push(t,-3);return}if(dn(t)){n.push(n.helper(t));return}switch(t.type){case 1:case 9:case 11:process.env.NODE_ENV!=="production"&&Do(t.codegenNode!=null,"Codegen node is missing for element/if/for node. Apply appropriate transforms first."),ie(t.codegenNode,n);break;case 2:ja(t,n);break;case 4:Jo(t,n);break;case 5:za(t,n);break;case 12:ie(t.codegenNode,n);break;case 8:Zo(t,n);break;case 3:Ua(t,n);break;case 13:qa(t,n);break;case 14:Ka(t,n);break;case 15:Ga(t,n);break;case 17:Ja(t,n);break;case 18:Za(t,n);break;case 19:Ya(t,n);break;case 20:Xa(t,n);break;case 21:mt(t.body,n,!0,!1);break;case 22:break;case 23:break;case 24:break;case 25:break;case 26:break;case 10:break;default:if(process.env.NODE_ENV!=="production")return Do(!1,`unhandled codegen node type: ${t.type}`),t}}function ja(t,n){n.push(JSON.stringify(t.content),-3,t)}function Jo(t,n){const{content:o,isStatic:s}=t;n.push(s?JSON.stringify(o):o,-3,t)}function za(t,n){const{push:o,helper:s,pure:r}=n;r&&o(zt),o(`${s(Bt)}(`),ie(t.content,n),o(")")}function Zo(t,n){for(let o=0;o<t.children.length;o++){const s=t.children[o];te(s)?n.push(s,-3):ie(s,n)}}function Ha(t,n){const{push:o}=n;if(t.type===8)o("["),Zo(t,n),o("]");else if(t.isStatic){const s=Ln(t.content)?t.content:JSON.stringify(t.content);o(s,-2,t)}else o(`[${t.content}]`,-3,t)}function Ua(t,n){const{push:o,helper:s,pure:r}=n;r&&o(zt),o(`${s(it)}(${JSON.stringify(t.content)})`,-3,t)}function qa(t,n){const{push:o,helper:s,pure:r}=n,{tag:l,props:i,children:a,patchFlag:c,dynamicProps:p,directives:m,isBlock:f,disableTracking:u,isComponent:E}=t;let x;if(c)if(process.env.NODE_ENV!=="production")if(c<0)x=c+` /* ${ot[c]} */`;else{const w=Object.keys(ot).map(Number).filter(C=>C>0&&c&C).map(C=>ot[C]).join(", ");x=c+` /* ${w} */`}else x=String(c);m&&o(s(En)+"("),f&&o(`(${s(Re)}(${u?"true":""}), `),r&&o(zt);const _=f?Qe(n.inSSR,E):Xe(n.inSSR,E);o(s(_)+"(",-2,t),mt(Wa([l,i,a,x,p]),n),o(")"),f&&o(")"),m&&(o(", "),ie(m,n),o(")"))}function Wa(t){let n=t.length;for(;n--&&t[n]==null;);return t.slice(0,n+1).map(o=>o||"null")}function Ka(t,n){const{push:o,helper:s,pure:r}=n,l=te(t.callee)?t.callee:s(t.callee);r&&o(zt),o(l+"(",-2,t),mt(t.arguments,n),o(")")}function Ga(t,n){const{push:o,indent:s,deindent:r,newline:l}=n,{properties:i}=t;if(!i.length){o("{}",-2,t);return}const a=i.length>1||process.env.NODE_ENV!=="production"&&i.some(c=>c.value.type!==4);o(a?"{":"{ "),a&&s();for(let c=0;c<i.length;c++){const{key:p,value:m}=i[c];Ha(p,n),o(": "),ie(m,n),c<i.length-1&&(o(","),l())}a&&r(),o(a?"}":" }")}function Ja(t,n){jn(t.elements,n)}function Za(t,n){const{push:o,indent:s,deindent:r}=n,{params:l,returns:i,body:a,newline:c,isSlot:p}=t;p&&o(`_${Ze[Bn]}(`),o("(",-2,t),Ne(l)?mt(l,n):l&&ie(l,n),o(") => "),(c||a)&&(o("{"),s()),i?(c&&o("return "),Ne(i)?jn(i,n):ie(i,n)):a&&ie(a,n),(c||a)&&(r(),o("}")),p&&(t.isNonScopedSlot&&o(", undefined, true"),o(")"))}function Ya(t,n){const{test:o,consequent:s,alternate:r,newline:l}=t,{push:i,indent:a,deindent:c,newline:p}=n;if(o.type===4){const f=!Ln(o.content);f&&i("("),Jo(o,n),f&&i(")")}else i("("),ie(o,n),i(")");l&&a(),n.indentLevel++,l||i(" "),i("? "),ie(s,n),n.indentLevel--,l&&p(),l||i(" "),i(": ");const m=r.type===19;m||n.indentLevel++,ie(r,n),m||n.indentLevel--,l&&c(!0)}function Xa(t,n){const{push:o,helper:s,indent:r,deindent:l,newline:i}=n,{needPauseTracking:a,needArraySpread:c}=t;c&&o("[...("),o(`_cache[${t.index}] || (`),a&&(r(),o(`${s(Tt)}(-1`),t.inVOnce&&o(", true"),o("),"),i(),o("(")),o(`_cache[${t.index}] = `),ie(t.value,n),a&&(o(`).cacheIndex = ${t.index},`),i(),o(`${s(Tt)}(1),`),i(),o(`_cache[${t.index}]`),l()),o(")"),c&&o(")]")}const Qa=new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b"),Va=/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;function He(t,n,o=!1,s=!1){const r=t.content;if(r.trim())try{new Function(s?` ${r} `:`return ${o?`(${r}) => {}`:`(${r})`}`)}catch(l){let i=l.message;const a=r.replace(Va,"").match(Qa);a&&(i=`avoid using JavaScript keyword as property name: "${a[0]}"`),n.onError(W(45,t.loc,void 0,i))}}const ec=(t,n)=>{if(t.type===5)t.content=zn(t.content,n);else if(t.type===1){const o=de(t,"memo");for(let s=0;s<t.props.length;s++){const r=t.props[s];if(r.type===7&&r.name!=="for"){const l=r.exp,i=r.arg;l&&l.type===4&&!(r.name==="on"&&i)&&!(o&&i&&i.type===4&&i.content==="key")&&(r.exp=zn(l,n,r.name==="slot")),i&&i.type===4&&!i.isStatic&&(r.arg=zn(i,n))}}}};function zn(t,n,o=!1,s=!1,r=Object.create(n.identifiers)){return process.env.NODE_ENV!=="production"&&He(t,n,o,s),t}const tc=Ko(/^(if|else|else-if)$/,(t,n,o)=>nc(t,n,o,(s,r,l)=>{const i=o.parent.children;let a=i.indexOf(s),c=0;for(;a-->=0;){const p=i[a];p&&p.type===9&&(c+=p.branches.length)}return()=>{if(l)s.codegenNode=Xo(r,c,o);else{const p=sc(s.codegenNode);p.alternate=Xo(r,c+s.branches.length-1,o)}}}));function nc(t,n,o,s){if(n.name!=="else"&&(!n.exp||!n.exp.content.trim())){const r=n.exp?n.exp.loc:t.loc;o.onError(W(28,n.loc)),n.exp=F("true",!1,r)}if(process.env.NODE_ENV!=="production"&&n.exp&&He(n.exp,o),n.name==="if"){const r=Yo(t,n),l={type:9,loc:_a(t.loc),branches:[r]};if(o.replaceNode(l),s)return s(l,r,!0)}else{const r=o.parent.children,l=[];let i=r.indexOf(t);for(;i-->=-1;){const a=r[i];if(a&&a.type===3){o.removeNode(a),process.env.NODE_ENV!=="production"&&l.unshift(a);continue}if(a&&a.type===2&&!a.content.trim().length){o.removeNode(a);continue}if(a&&a.type===9){n.name==="else-if"&&a.branches[a.branches.length-1].condition===void 0&&o.onError(W(30,t.loc)),o.removeNode();const c=Yo(t,n);if(process.env.NODE_ENV!=="production"&&l.length&&!(o.parent&&o.parent.type===1&&(o.parent.tag==="transition"||o.parent.tag==="Transition"))&&(c.children=[...l,...c.children]),process.env.NODE_ENV!=="production"){const m=c.userKey;m&&a.branches.forEach(({userKey:f})=>{oc(f,m)&&o.onError(W(29,c.userKey.loc))})}a.branches.push(c);const p=s&&s(a,c,!1);jt(c,o),p&&p(),o.currentNode=null}else o.onError(W(30,t.loc));break}}}function Yo(t,n){const o=t.tagType===3;return{type:10,loc:t.loc,condition:n.name==="else"?void 0:n.exp,children:o&&!de(t,"for")?t.children:[t],userKey:dt(t,"key"),isTemplateIf:o}}function Xo(t,n,o){return t.condition?Tn(t.condition,Qo(t,n,o),ee(o.helper(it),[process.env.NODE_ENV!=="production"?'"v-if"':'""',"true"])):Qo(t,n,o)}function Qo(t,n,o){const{helper:s}=o,r=X("key",F(`${n}`,!1,me,2)),{children:l}=t,i=l[0];if(l.length!==1||i.type!==1)if(l.length===1&&i.type===11){const c=i.codegenNode;return It(c,r,o),c}else{let c=64;return process.env.NODE_ENV!=="production"&&!t.isTemplateIf&&l.filter(p=>p.type!==3).length===1&&(c|=2048),ct(o,s(st),ge([r]),l,c,void 0,void 0,!0,!1,!1,t.loc)}else{const c=i.codegenNode,p=ua(c);return p.type===13&&Dn(p,o),It(p,r,o),c}}function oc(t,n){if(!t||t.type!==n.type)return!1;if(t.type===6){if(t.value.content!==n.value.content)return!1}else{const o=t.exp,s=n.exp;if(o.type!==s.type||o.type!==4||o.isStatic!==s.isStatic||o.content!==s.content)return!1}return!0}function sc(t){for(;;)if(t.type===19)if(t.alternate.type===19)t=t.alternate;else return t;else t.type===20&&(t=t.value)}const rc=(t,n,o)=>{const{modifiers:s,loc:r}=t,l=t.arg;let{exp:i}=t;if(i&&i.type===4&&!i.content.trim()&&(i=void 0),!i){if(l.type!==4||!l.isStatic)return o.onError(W(52,l.loc)),{props:[X(l,F("",!0,r))]};Vo(t),i=t.exp}return l.type!==4?(l.children.unshift("("),l.children.push(') || ""')):l.isStatic||(l.content=l.content?`${l.content} || ""`:'""'),s.some(a=>a.content==="camel")&&(l.type===4?l.isStatic?l.content=De(l.content):l.content=`${o.helperString(Cn)}(${l.content})`:(l.children.unshift(`${o.helperString(Cn)}(`),l.children.push(")"))),o.inSSR||(s.some(a=>a.content==="prop")&&es(l,"."),s.some(a=>a.content==="attr")&&es(l,"^")),{props:[X(l,i)]}},Vo=(t,n)=>{const o=t.arg,s=De(o.content);t.exp=F(s,!1,o.loc)},es=(t,n)=>{t.type===4?t.isStatic?t.content=n+t.content:t.content=`\`${n}\${${t.content}}\``:(t.children.unshift(`'${n}' + (`),t.children.push(")"))},ic=Ko("for",(t,n,o)=>{const{helper:s,removeHelper:r}=o;return lc(t,n,o,l=>{const i=ee(s(Nn),[l.source]),a=At(t),c=de(t,"memo"),p=dt(t,"key",!1,!0);p&&p.type===7&&!p.exp&&Vo(p);let f=p&&(p.type===6?p.value?F(p.value.content,!0):void 0:p.exp);const u=p&&f?X("key",f):null,E=l.source.type===4&&l.source.constType>0,x=E?64:p?128:256;return l.codegenNode=ct(o,s(st),void 0,i,x,void 0,void 0,!0,!E,!1,t.loc),()=>{let _;const{children:w}=l;process.env.NODE_ENV!=="production"&&a&&t.children.some($=>{if($.type===1){const D=dt($,"key");if(D)return o.onError(W(33,D.loc)),!0}});const C=w.length!==1||w[0].type!==1,I=Lt(t)?t:a&&t.children.length===1&&Lt(t.children[0])?t.children[0]:null;if(I?(_=I.codegenNode,a&&u&&It(_,u,o)):C?_=ct(o,s(st),u?ge([u]):void 0,t.children,64,void 0,void 0,!0,void 0,!1):(_=w[0].codegenNode,a&&u&&It(_,u,o),_.isBlock!==!E&&(_.isBlock?(r(Re),r(Qe(o.inSSR,_.isComponent))):r(Xe(o.inSSR,_.isComponent))),_.isBlock=!E,_.isBlock?(s(Re),s(Qe(o.inSSR,_.isComponent))):s(Xe(o.inSSR,_.isComponent))),c){const $=Ye(Hn(l.parseResult,[F("_cached")]));$.body=ta([ye(["const _memo = (",c.exp,")"]),ye(["if (_cached",...f?[" && _cached.key === ",f]:[],` && ${o.helperString(wo)}(_cached, _memo)) return _cached`]),ye(["const _item = ",_]),F("_item.memo = _memo"),F("return _item")]),i.arguments.push($,F("_cache"),F(String(o.cached.length))),o.cached.push(null)}else i.arguments.push(Ye(Hn(l.parseResult),_,!0))}})});function lc(t,n,o,s){if(!n.exp){o.onError(W(31,n.loc));return}const r=n.forParseResult;if(!r){o.onError(W(32,n.loc));return}ts(r,o);const{addIdentifiers:l,removeIdentifiers:i,scopes:a}=o,{source:c,value:p,key:m,index:f}=r,u={type:11,loc:n.loc,source:c,valueAlias:p,keyAlias:m,objectIndexAlias:f,parseResult:r,children:At(t)?t.children:[t]};o.replaceNode(u),a.vFor++;const E=s&&s(u);return()=>{a.vFor--,E&&E()}}function ts(t,n){t.finalized||(process.env.NODE_ENV!=="production"&&(He(t.source,n),t.key&&He(t.key,n,!0),t.index&&He(t.index,n,!0),t.value&&He(t.value,n,!0)),t.finalized=!0)}function Hn({value:t,key:n,index:o},s=[]){return ac([t,n,o,...s])}function ac(t){let n=t.length;for(;n--&&!t[n];);return t.slice(0,n+1).map((o,s)=>o||F("_".repeat(s+1),!1))}const ns=F("undefined",!1),cc=(t,n)=>{if(t.type===1&&(t.tagType===1||t.tagType===3)){const o=de(t,"slot");if(o)return o.exp,n.scopes.vSlot++,()=>{n.scopes.vSlot--}}},dc=(t,n,o,s)=>Ye(t,o,!1,!0,o.length?o[0].loc:s);function pc(t,n,o=dc){n.helper(Bn);const{children:s,loc:r}=t,l=[],i=[];let a=n.scopes.vSlot>0||n.scopes.vFor>0;const c=de(t,"slot",!0);if(c){const{arg:w,exp:C}=c;w&&!ce(w)&&(a=!0),l.push(X(w||F("default",!0),o(C,void 0,s,r)))}let p=!1,m=!1;const f=[],u=new Set;let E=0;for(let w=0;w<s.length;w++){const C=s[w];let I;if(!At(C)||!(I=de(C,"slot",!0))){C.type!==3&&f.push(C);continue}if(c){n.onError(W(37,I.loc));break}p=!0;const{children:$,loc:D}=C,{arg:B=F("default",!0),exp:H,loc:Z}=I;let P;ce(B)?P=B?B.content:"default":a=!0;const M=de(C,"for"),z=o(H,M,$,D);let j,k;if(j=de(C,"if"))a=!0,i.push(Tn(j.exp,Ht(B,z,E++),ns));else if(k=de(C,/^else(-if)?$/,!0)){let T=w,N;for(;T--&&(N=s[T],!(N.type!==3&&Un(N))););if(N&&At(N)&&de(N,/^(else-)?if$/)){let O=i[i.length-1];for(;O.alternate.type===19;)O=O.alternate;O.alternate=k.exp?Tn(k.exp,Ht(B,z,E++),ns):Ht(B,z,E++)}else n.onError(W(30,k.loc))}else if(M){a=!0;const T=M.forParseResult;T?(ts(T,n),i.push(ee(n.helper(Nn),[T.source,Ye(Hn(T),Ht(B,z),!0)]))):n.onError(W(32,M.loc))}else{if(P){if(u.has(P)){n.onError(W(38,Z));continue}u.add(P),P==="default"&&(m=!0)}l.push(X(B,z))}}if(!c){const w=(C,I)=>{const $=o(C,void 0,I,r);return n.compatConfig&&($.isNonScopedSlot=!0),X("default",$)};p?f.length&&f.some(C=>Un(C))&&(m?n.onError(W(39,f[0].loc)):l.push(w(void 0,f))):l.push(w(void 0,s))}const x=a?2:Ut(t.children)?3:1;let _=ge(l.concat(X("_",F(x+(process.env.NODE_ENV!=="production"?` /* ${Ll[x]} */`:""),!1))),r);return i.length&&(_=ee(n.helper(No),[_,Fe(i)])),{slots:_,hasDynamicSlots:a}}function Ht(t,n,o){const s=[X("name",t),X("fn",n)];return o!=null&&s.push(X("key",F(String(o),!0))),ge(s)}function Ut(t){for(let n=0;n<t.length;n++){const o=t[n];switch(o.type){case 1:if(o.tagType===2||Ut(o.children))return!0;break;case 9:if(Ut(o.branches))return!0;break;case 10:case 11:if(Ut(o.children))return!0;break}}return!1}function Un(t){return t.type!==2&&t.type!==12?!0:t.type===2?!!t.content.trim():Un(t.content)}const os=new WeakMap,fc=(t,n)=>function(){if(t=n.currentNode,!(t.type===1&&(t.tagType===0||t.tagType===1)))return;const{tag:s,props:r}=t,l=t.tagType===1;let i=l?mc(t,n):`"${s}"`;const a=Tl(i)&&i.callee===vn;let c,p,m=0,f,u,E,x=a||i===rt||i===mn||!l&&(s==="svg"||s==="foreignObject"||s==="math");if(r.length>0){const _=ss(t,n,void 0,l,a);c=_.props,m=_.patchFlag,u=_.dynamicPropNames;const w=_.directives;E=w&&w.length?Fe(w.map(C=>hc(C,n))):void 0,_.shouldUseBlock&&(x=!0)}if(t.children.length>0)if(i===St&&(x=!0,m|=1024,process.env.NODE_ENV!=="production"&&t.children.length>1&&n.onError(W(46,{start:t.children[0].loc.start,end:t.children[t.children.length-1].loc.end,source:""}))),l&&i!==rt&&i!==St){const{slots:w,hasDynamicSlots:C}=pc(t,n);p=w,C&&(m|=1024)}else if(t.children.length===1&&i!==rt){const w=t.children[0],C=w.type,I=C===5||C===8;I&&he(w,n)===0&&(m|=1),I||C===2?p=w:p=t.children}else p=t.children;u&&u.length&&(f=gc(u)),t.codegenNode=ct(n,i,c,p,m===0?void 0:m,f,E,!!x,!1,l,t.loc)};function mc(t,n,o=!1){let{tag:s}=t;const r=qn(s),l=dt(t,"is",!1,!0);if(l)if(r||Ae("COMPILER_IS_ON_ELEMENT",n)){let a;if(l.type===6?a=l.value&&F(l.value.content,!0):(a=l.exp,a||(a=F("is",!1,l.arg.loc))),a)return ee(n.helper(vn),[a])}else l.type===6&&l.value.content.startsWith("vue:")&&(s=l.value.content.slice(4));const i=Bo(s)||n.isBuiltInComponent(s);return i?(o||n.helper(i),i):(n.helper(yn),n.components.add(s),pt(s,"component"))}function ss(t,n,o=t.props,s,r,l=!1){const{tag:i,loc:a,children:c}=t;let p=[];const m=[],f=[],u=c.length>0;let E=!1,x=0,_=!1,w=!1,C=!1,I=!1,$=!1,D=!1;const B=[],H=z=>{p.length&&(m.push(ge(rs(p),a)),p=[]),z&&m.push(z)},Z=()=>{n.scopes.vFor>0&&p.push(X(F("ref_for",!0),F("true")))},P=({key:z,value:j})=>{if(ce(z)){const k=z.content,T=cn(k);if(T&&(!s||r)&&k.toLowerCase()!=="onclick"&&k!=="onUpdate:modelValue"&&!go(k)&&(I=!0),T&&go(k)&&(D=!0),T&&j.type===14&&(j=j.arguments[0]),j.type===20||(j.type===4||j.type===8)&&he(j,n)>0)return;k==="ref"?_=!0:k==="class"?w=!0:k==="style"?C=!0:k!=="key"&&!B.includes(k)&&B.push(k),s&&(k==="class"||k==="style")&&!B.includes(k)&&B.push(k)}else $=!0};for(let z=0;z<o.length;z++){const j=o[z];if(j.type===6){const{loc:k,name:T,nameLoc:N,value:O}=j;let G=!0;if(T==="ref"&&(_=!0,Z()),T==="is"&&(qn(i)||O&&O.content.startsWith("vue:")||Ae("COMPILER_IS_ON_ELEMENT",n)))continue;p.push(X(F(T,!0,N),F(O?O.content:"",G,O?O.loc:k)))}else{const{name:k,arg:T,exp:N,loc:O,modifiers:G}=j,ae=k==="bind",Me=k==="on";if(k==="slot"){s||n.onError(W(40,O));continue}if(k==="once"||k==="memo"||k==="is"||ae&&Le(T,"is")&&(qn(i)||Ae("COMPILER_IS_ON_ELEMENT",n))||Me&&l)continue;if((ae&&Le(T,"key")||Me&&u&&Le(T,"vue:before-update"))&&(E=!0),ae&&Le(T,"ref")&&Z(),!T&&(ae||Me)){if($=!0,N)if(ae){if(H(),process.env.NODE_ENV!=="production"&&m.some(we=>we.type===15?we.properties.some(({key:xe})=>xe.type!==4||!xe.isStatic?!0:xe.content!=="class"&&xe.content!=="style"&&!cn(xe.content)):!0)&&Ve("COMPILER_V_BIND_OBJECT_ORDER",n,O),Ae("COMPILER_V_BIND_OBJECT_ORDER",n)){m.unshift(N);continue}Z(),H(),m.push(N)}else H({type:14,loc:O,callee:n.helper(_n),arguments:s?[N]:[N,"true"]});else n.onError(W(ae?34:35,O));continue}ae&&G.some(be=>be.content==="prop")&&(x|=32);const $e=n.directiveTransforms[k];if($e){const{props:be,needRuntime:we}=$e(j,t,n);!l&&be.forEach(P),Me&&T&&!ce(T)?H(ge(be,a)):p.push(...be),we&&(f.push(j),dn(we)&&os.set(j,we))}else Dl(k)||(f.push(j),u&&(E=!0))}}let M;if(m.length?(H(),m.length>1?M=ee(n.helper($t),m,a):M=m[0]):p.length&&(M=ge(rs(p),a)),$?x|=16:(w&&!s&&(x|=2),C&&!s&&(x|=4),B.length&&(x|=8),I&&(x|=32)),!E&&(x===0||x===32)&&(_||D||f.length>0)&&(x|=512),!n.inSSR&&M)switch(M.type){case 15:let z=-1,j=-1,k=!1;for(let O=0;O<M.properties.length;O++){const G=M.properties[O].key;ce(G)?G.content==="class"?z=O:G.content==="style"&&(j=O):G.isHandlerKey||(k=!0)}const T=M.properties[z],N=M.properties[j];k?M=ee(n.helper(lt),[M]):(T&&!ce(T.value)&&(T.value=ee(n.helper(wn),[T.value])),N&&(C||N.value.type===4&&N.value.content.trim()[0]==="["||N.value.type===17)&&(N.value=ee(n.helper(xn),[N.value])));break;case 14:break;default:M=ee(n.helper(lt),[ee(n.helper(at),[M])]);break}return{props:M,directives:f,patchFlag:x,dynamicPropNames:B,shouldUseBlock:E}}function rs(t){const n=new Map,o=[];for(let s=0;s<t.length;s++){const r=t[s];if(r.key.type===8||!r.key.isStatic){o.push(r);continue}const l=r.key.content,i=n.get(l);i?(l==="style"||l==="class"||cn(l))&&uc(i,r):(n.set(l,r),o.push(r))}return o}function uc(t,n){t.value.type===17?t.value.elements.push(n.value):t.value=Fe([t.value,n.value],t.loc)}function hc(t,n){const o=[],s=os.get(t);s?o.push(n.helperString(s)):(n.helper(bn),n.directives.add(t.name),o.push(pt(t.name,"directive")));const{loc:r}=t;if(t.exp&&o.push(t.exp),t.arg&&(t.exp||o.push("void 0"),o.push(t.arg)),Object.keys(t.modifiers).length){t.arg||(t.exp||o.push("void 0"),o.push("void 0"));const l=F("true",!1,r);o.push(ge(t.modifiers.map(i=>X(i,l)),r))}return Fe(o,t.loc)}function gc(t){let n="[";for(let o=0,s=t.length;o<s;o++)n+=JSON.stringify(t[o]),o<s-1&&(n+=", ");return n+"]"}function qn(t){return t==="component"||t==="Component"}const yc=(t,n)=>{if(Lt(t)){const{children:o,loc:s}=t,{slotName:r,slotProps:l}=vc(t,n),i=[n.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let a=2;l&&(i[2]=l,a=3),o.length&&(i[3]=Ye([],o,!1,!1,s),a=4),n.scopeId&&!n.slotted&&(a=5),i.splice(a),t.codegenNode=ee(n.helper(Eo),i,s)}};function vc(t,n){let o='"default"',s;const r=[];for(let l=0;l<t.props.length;l++){const i=t.props[l];if(i.type===6)i.value&&(i.name==="name"?o=JSON.stringify(i.value.content):(i.name=De(i.name),r.push(i)));else if(i.name==="bind"&&Le(i.arg,"name")){if(i.exp)o=i.exp;else if(i.arg&&i.arg.type===4){const a=De(i.arg.content);o=i.exp=F(a,!1,i.arg.loc)}}else i.name==="bind"&&i.arg&&ce(i.arg)&&(i.arg.content=De(i.arg.content)),r.push(i)}if(r.length>0){const{props:l,directives:i}=ss(t,n,r,!1,!1);s=l,i.length&&n.onError(W(36,i[0].loc))}return{slotName:o,slotProps:s}}const is=(t,n,o,s)=>{const{loc:r,modifiers:l,arg:i}=t;!t.exp&&!l.length&&o.onError(W(35,r));let a;if(i.type===4)if(i.isStatic){let f=i.content;process.env.NODE_ENV!=="production"&&f.startsWith("vnode")&&o.onError(W(51,i.loc)),f.startsWith("vue:")&&(f=`vnode-${f.slice(4)}`);const u=n.tagType!==0||f.startsWith("vnode")||!/[A-Z]/.test(f)?Al(De(f)):`on:${f}`;a=F(u,!0,i.loc)}else a=ye([`${o.helperString(Sn)}(`,i,")"]);else a=i,a.children.unshift(`${o.helperString(Sn)}(`),a.children.push(")");let c=t.exp;c&&!c.content.trim()&&(c=void 0);let p=o.cacheHandlers&&!c&&!o.inVOnce;if(c){const f=To(c),u=!(f||da(c)),E=c.content.includes(";");process.env.NODE_ENV!=="production"&&He(c,o,!1,E),(u||p&&f)&&(c=ye([`${u?"$event":"(...args)"} => ${E?"{":"("}`,c,E?"}":")"]))}let m={props:[X(a,c||F("() => {}",!1,r))]};return s&&(m=s(m)),p&&(m.props[0].value=o.cache(m.props[0].value)),m.props.forEach(f=>f.key.isHandlerKey=!0),m},bc=(t,n)=>{if(t.type===0||t.type===1||t.type===11||t.type===10)return()=>{const o=t.children;let s,r=!1;for(let l=0;l<o.length;l++){const i=o[l];if(In(i)){r=!0;for(let a=l+1;a<o.length;a++){const c=o[a];if(In(c))s||(s=o[l]=ye([i],i.loc)),s.children.push(" + ",c),o.splice(a,1),a--;else{s=void 0;break}}}}if(!(!r||o.length===1&&(t.type===0||t.type===1&&t.tagType===0&&!t.props.find(l=>l.type===7&&!n.directiveTransforms[l.name])&&t.tag!=="template")))for(let l=0;l<o.length;l++){const i=o[l];if(In(i)||i.type===8){const a=[];(i.type!==2||i.content!==" ")&&a.push(i),!n.ssr&&he(i,n)===0&&a.push(1+(process.env.NODE_ENV!=="production"?` /* ${ot[1]} */`:"")),o[l]={type:12,content:i,loc:i.loc,codegenNode:ee(n.helper(gn),a)}}}}},ls=new WeakSet,kc=(t,n)=>{if(t.type===1&&de(t,"once",!0))return ls.has(t)||n.inVOnce||n.inSSR?void 0:(ls.add(t),n.inVOnce=!0,n.helper(Tt),()=>{n.inVOnce=!1;const o=n.currentNode;o.codegenNode&&(o.codegenNode=n.cache(o.codegenNode,!0,!0))})},as=(t,n,o)=>{const{exp:s,arg:r}=t;if(!s)return o.onError(W(41,t.loc)),qt();const l=s.loc.source.trim(),i=s.type===4?s.content:l,a=o.bindingMetadata[l];if(a==="props"||a==="props-aliased")return o.onError(W(44,s.loc)),qt();if(!i.trim()||!To(s))return o.onError(W(42,s.loc)),qt();const c=r||F("modelValue",!0),p=r?ce(r)?`onUpdate:${De(r.content)}`:ye(['"onUpdate:" + ',r]):"onUpdate:modelValue";let m;const f=o.isTS?"($event: any)":"$event";m=ye([`${f} => ((`,s,") = $event)"]);const u=[X(c,t.exp),X(p,m)];if(t.modifiers.length&&n.tagType===1){const E=t.modifiers.map(_=>_.content).map(_=>(Ln(_)?_:JSON.stringify(_))+": true").join(", "),x=r?ce(r)?`${r.content}Modifiers`:ye([r,' + "Modifiers"']):"modelModifiers";u.push(X(x,F(`{ ${E} }`,!1,t.loc,2)))}return qt(u)};function qt(t=[]){return{props:t}}const Ec=/[\w).+\-_$\]]/,Nc=(t,n)=>{Ae("COMPILER_FILTERS",n)&&(t.type===5?Wt(t.content,n):t.type===1&&t.props.forEach(o=>{o.type===7&&o.name!=="for"&&o.exp&&Wt(o.exp,n)}))};function Wt(t,n){if(t.type===4)cs(t,n);else for(let o=0;o<t.children.length;o++){const s=t.children[o];typeof s=="object"&&(s.type===4?cs(s,n):s.type===8?Wt(t,n):s.type===5&&Wt(s.content,n))}}function cs(t,n){const o=t.content;let s=!1,r=!1,l=!1,i=!1,a=0,c=0,p=0,m=0,f,u,E,x,_=[];for(E=0;E<o.length;E++)if(u=f,f=o.charCodeAt(E),s)f===39&&u!==92&&(s=!1);else if(r)f===34&&u!==92&&(r=!1);else if(l)f===96&&u!==92&&(l=!1);else if(i)f===47&&u!==92&&(i=!1);else if(f===124&&o.charCodeAt(E+1)!==124&&o.charCodeAt(E-1)!==124&&!a&&!c&&!p)x===void 0?(m=E+1,x=o.slice(0,E).trim()):w();else{switch(f){case 34:r=!0;break;case 39:s=!0;break;case 96:l=!0;break;case 40:p++;break;case 41:p--;break;case 91:c++;break;case 93:c--;break;case 123:a++;break;case 125:a--;break}if(f===47){let C=E-1,I;for(;C>=0&&(I=o.charAt(C),I===" ");C--);(!I||!Ec.test(I))&&(i=!0)}}x===void 0?x=o.slice(0,E).trim():m!==0&&w();function w(){_.push(o.slice(m,E).trim()),m=E+1}if(_.length){for(process.env.NODE_ENV!=="production"&&Ot("COMPILER_FILTERS",n,t.loc),E=0;E<_.length;E++)x=wc(x,_[E],n);t.content=x,t.ast=void 0}}function wc(t,n,o){o.helper(kn);const s=n.indexOf("(");if(s<0)return o.filters.add(n),`${pt(n,"filter")}(${t})`;{const r=n.slice(0,s),l=n.slice(s+1);return o.filters.add(r),`${pt(r,"filter")}(${t}${l!==")"?","+l:l}`}}const ds=new WeakSet,xc=(t,n)=>{if(t.type===1){const o=de(t,"memo");return!o||ds.has(t)?void 0:(ds.add(t),()=>{const s=t.codegenNode||n.currentNode.codegenNode;s&&s.type===13&&(t.tagType!==1&&Dn(s,n),t.codegenNode=ee(n.helper($n),[o.exp,Ye(void 0,s),"_cache",String(n.cached.length)]),n.cached.push(null))})}};function _c(t){return[[kc,tc,xc,ic,Nc,...process.env.NODE_ENV!=="production"?[ec]:[],yc,fc,cc,bc],{on:is,bind:rc,model:as}]}function Cc(t,n={}){const o=n.onError||An,s=n.mode==="module";n.prefixIdentifiers===!0?o(W(47)):s&&o(W(48));const r=!1;n.cacheHandlers&&o(W(49)),n.scopeId&&!s&&o(W(50));const l=Te({},n,{prefixIdentifiers:r}),i=te(t)?Ba(t,l):t,[a,c]=_c();return Oa(i,Te({},l,{nodeTransforms:[...a,...n.nodeTransforms||[]],directiveTransforms:Te({},c,n.directiveTransforms||{})})),Ma(i,l)}const Sc=()=>({props:[]});/**
|
|
148
148
|
* @vue/compiler-dom v3.5.18
|
|
149
149
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
150
150
|
* @license MIT
|
|
151
|
-
**/const io=Symbol(process.env.NODE_ENV!=="production"?"vModelRadio":""),lo=Symbol(process.env.NODE_ENV!=="production"?"vModelCheckbox":""),ao=Symbol(process.env.NODE_ENV!=="production"?"vModelText":""),co=Symbol(process.env.NODE_ENV!=="production"?"vModelSelect":""),qn=Symbol(process.env.NODE_ENV!=="production"?"vModelDynamic":""),po=Symbol(process.env.NODE_ENV!=="production"?"vOnModifiersGuard":""),fo=Symbol(process.env.NODE_ENV!=="production"?"vOnKeysGuard":""),mo=Symbol(process.env.NODE_ENV!=="production"?"vShow":""),Wn=Symbol(process.env.NODE_ENV!=="production"?"Transition":""),uo=Symbol(process.env.NODE_ENV!=="production"?"TransitionGroup":"");Jl({[io]:"vModelRadio",[lo]:"vModelCheckbox",[ao]:"vModelText",[co]:"vModelSelect",[qn]:"vModelDynamic",[po]:"withModifiers",[fo]:"withKeys",[mo]:"vShow",[Wn]:"Transition",[uo]:"TransitionGroup"});let Qe;function xc(t,n=!1){return Qe||(Qe=document.createElement("div")),n?(Qe.innerHTML=`<div foo="${t.replace(/"/g,""")}">`,Qe.children[0].getAttribute("foo")):(Qe.innerHTML=t,Qe.textContent)}const _c={parseMode:"html",isVoidTag:Hl,isNativeTag:t=>Fl(t)||zl(t)||jl(t),isPreTag:t=>t==="pre",isIgnoreNewlineTag:t=>t==="pre"||t==="textarea",decodeEntities:xc,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return Wn;if(t==="TransitionGroup"||t==="transition-group")return uo},getNamespace(t,n,s){let o=n?n.ns:s;if(n&&o===2)if(n.tag==="annotation-xml"){if(t==="svg")return 1;n.props.some(r=>r.type===6&&r.name==="encoding"&&r.value!=null&&(r.value.content==="text/html"||r.value.content==="application/xhtml+xml"))&&(o=0)}else/^m(?:[ions]|text)$/.test(n.tag)&&t!=="mglyph"&&t!=="malignmark"&&(o=0);else n&&o===1&&(n.tag==="foreignObject"||n.tag==="desc"||n.tag==="title")&&(o=0);if(o===0){if(t==="svg")return 1;if(t==="math")return 2}return o}},Cc=t=>{t.type===1&&t.props.forEach((n,s)=>{n.type===6&&n.name==="style"&&n.value&&(t.props[s]={type:7,name:"bind",arg:F("style",!0,n.loc),exp:Sc(n.value.content,n.loc),modifiers:[],loc:n.loc})})},Sc=(t,n)=>{const s=Ll(t);return F(JSON.stringify(s),!1,n,3)};function be(t,n){return J(t,n,process.env.NODE_ENV!=="production"?Bc:void 0)}const Bc={53:"v-html is missing expression.",54:"v-html will override element children.",55:"v-text is missing expression.",56:"v-text will override element children.",57:"v-model can only be used on <input>, <textarea> and <select> elements.",58:"v-model argument is not supported on plain elements.",59:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",60:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",61:"v-show is missing expression.",62:"<Transition> expects exactly one child element or component.",63:"Tags with side effect (<script> and <style>) are ignored in client component templates."},$c=(t,n,s)=>{const{exp:o,loc:r}=t;return o||s.onError(be(53,r)),n.children.length&&(s.onError(be(54,r)),n.children.length=0),{props:[V(F("innerHTML",!0,r),o||F("",!0))]}},Tc=(t,n,s)=>{const{exp:o,loc:r}=t;return o||s.onError(be(55,r)),n.children.length&&(s.onError(be(56,r)),n.children.length=0),{props:[V(F("textContent",!0),o?ge(o,s)>0?o:se(s.helperString(St),[o],r):F("",!0))]}},Dc=(t,n,s)=>{const o=so(t,n,s);if(!o.props.length||n.tagType===1)return o;t.arg&&s.onError(be(58,t.arg.loc));function r(){const c=pe(n,"bind");c&&Ae(c.arg,"value")&&s.onError(be(60,c.loc))}const{tag:l}=n,i=s.isCustomElement(l);if(l==="input"||l==="textarea"||l==="select"||i){let c=ao,d=!1;if(l==="input"||i){const p=dt(n,"type");if(p){if(p.type===7)c=qn;else if(p.value)switch(p.value.content){case"radio":c=io;break;case"checkbox":c=lo;break;case"file":d=!0,s.onError(be(59,t.loc));break;default:process.env.NODE_ENV!=="production"&&r();break}}else la(n)?c=qn:process.env.NODE_ENV!=="production"&&r()}else l==="select"?c=co:process.env.NODE_ENV!=="production"&&r();d||(o.needRuntime=s.helper(c))}else s.onError(be(57,t.loc));return o.props=o.props.filter(c=>!(c.key.type===4&&c.key.content==="modelValue")),o},Oc=Ee("passive,once,capture"),Ac=Ee("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Lc=Ee("left,right"),ho=Ee("onkeyup,onkeydown,onkeypress"),Ic=(t,n,s,o)=>{const r=[],l=[],i=[];for(let c=0;c<n.length;c++){const d=n[c].content;d==="native"&&Xe("COMPILER_V_ON_NATIVE",s,o)||Oc(d)?i.push(d):Lc(d)?de(t)?ho(t.content.toLowerCase())?r.push(d):l.push(d):(r.push(d),l.push(d)):Ac(d)?l.push(d):r.push(d)}return{keyModifiers:r,nonKeyModifiers:l,eventOptionModifiers:i}},go=(t,n)=>de(t)&&t.content.toLowerCase()==="onclick"?F(n,!0):t.type!==4?ve(["(",t,`) === "onClick" ? "${n}" : (`,t,")"]):t,Mc=(t,n,s)=>to(t,n,s,o=>{const{modifiers:r}=t;if(!r.length)return o;let{key:l,value:i}=o.props[0];const{keyModifiers:c,nonKeyModifiers:d,eventOptionModifiers:p}=Ic(l,r,s,t.loc);if(d.includes("right")&&(l=go(l,"onContextmenu")),d.includes("middle")&&(l=go(l,"onMouseup")),d.length&&(i=se(s.helper(po),[i,JSON.stringify(d)])),c.length&&(!de(l)||ho(l.content.toLowerCase()))&&(i=se(s.helper(fo),[i,JSON.stringify(c)])),p.length){const m=p.map(pn).join("");l=de(l)?F(`${l.content}${m}`,!0):ve(["(",l,`) + "${m}"`])}return{props:[V(l,i)]}}),Pc=(t,n,s)=>{const{exp:o,loc:r}=t;return o||s.onError(be(61,r)),{props:[],needRuntime:s.helper(mo)}},Rc=(t,n)=>{if(t.type===1&&t.tagType===1&&n.isBuiltInComponent(t.tag)===Wn)return()=>{if(!t.children.length)return;yo(t)&&n.onError(be(62,{start:t.children[0].loc.start,end:t.children[t.children.length-1].loc.end,source:""}));const o=t.children[0];if(o.type===1)for(const r of o.props)r.type===7&&r.name==="show"&&t.props.push({type:6,name:"persisted",nameLoc:t.loc,value:void 0,loc:t.loc})}};function yo(t){const n=t.children=t.children.filter(o=>o.type!==3&&!(o.type===2&&!o.content.trim())),s=n[0];return n.length!==1||s.type===11||s.type===9&&s.branches.some(yo)}const Fc=(t,n)=>{t.type===1&&t.tagType===0&&(t.tag==="script"||t.tag==="style")&&(process.env.NODE_ENV!=="production"&&n.onError(be(63,t.loc)),n.removeNode())};function zc(t,n){return t==="template"?!0:t in vo?vo[t].has(n):n in bo?bo[n].has(t):!(t in ko&&ko[t].has(n)||n in Eo&&Eo[n].has(t))}const Ve=new Set(["h1","h2","h3","h4","h5","h6"]),He=new Set([]),vo={head:new Set(["base","basefront","bgsound","link","meta","title","noscript","noframes","style","script","template"]),optgroup:new Set(["option"]),select:new Set(["optgroup","option","hr"]),table:new Set(["caption","colgroup","tbody","tfoot","thead"]),tr:new Set(["td","th"]),colgroup:new Set(["col"]),tbody:new Set(["tr"]),thead:new Set(["tr"]),tfoot:new Set(["tr"]),script:He,iframe:He,option:He,textarea:He,style:He,title:He},bo={html:He,body:new Set(["html"]),head:new Set(["html"]),td:new Set(["tr"]),colgroup:new Set(["table"]),caption:new Set(["table"]),tbody:new Set(["table"]),tfoot:new Set(["table"]),col:new Set(["colgroup"]),th:new Set(["tr"]),thead:new Set(["table"]),tr:new Set(["tbody","thead","tfoot"]),dd:new Set(["dl","div"]),dt:new Set(["dl","div"]),figcaption:new Set(["figure"]),summary:new Set(["details"]),area:new Set(["map"])},ko={p:new Set(["address","article","aside","blockquote","center","details","dialog","dir","div","dl","fieldset","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","menu","ol","p","pre","section","table","ul"]),svg:new Set(["b","blockquote","br","code","dd","div","dl","dt","em","embed","h1","h2","h3","h4","h5","h6","hr","i","img","li","menu","meta","ol","p","pre","ruby","s","small","span","strong","sub","sup","table","u","ul","var"])},Eo={a:new Set(["a"]),button:new Set(["button"]),dd:new Set(["dd","dt"]),dt:new Set(["dd","dt"]),form:new Set(["form"]),li:new Set(["li"]),h1:Ve,h2:Ve,h3:Ve,h4:Ve,h5:Ve,h6:Ve},jc=(t,n)=>{if(t.type===1&&t.tagType===0&&n.parent&&n.parent.type===1&&n.parent.tagType===0&&!zc(n.parent.tag,t.tag)){const s=new SyntaxError(`<${t.tag}> cannot be child of <${n.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.`);s.loc=t.loc,n.onWarn(s)}},Hc=[Cc,...process.env.NODE_ENV!=="production"?[Rc,jc]:[]],Uc={cloak:wc,html:$c,text:Tc,model:Dc,on:Mc,show:Pc};function qc(t,n={}){return Nc(t,$e({},_c,n,{nodeTransforms:[Fc,...Hc,...n.nodeTransforms||[]],directiveTransforms:$e({},Uc,n.directiveTransforms||{}),transformHoist:null}))}function Wc(t,n={}){const s=t.trim().startsWith("<")?t:`<span>${t}</span>`,{code:o}=qc(s,{mode:"function"}),r=new Function("Vue",`${o}; return render;`)($o);return e.defineComponent({name:"DynamicFromString",props:n.props??{},emits:n.emits??[],setup(){return n.setup?.()??{}},render:r})}const Kn={};function Kc(t){return Kn[t]||(Kn[t]=Wc(t,{props:{row:{type:Object,default:void 0},value:{type:null,default:void 0},data:{type:Object,default:void 0},column:{type:Object,default:void 0}}})),Kn[t]}const Gc={class:"mt-4 flex flex-wrap items-center justify-between gap-3 text-sm text-gray-600"},Jc={class:"flex items-center gap-2"},Zc=["disabled"],Yc={class:"text-sm"},Xc=["disabled"],Qc=e.defineComponent({__name:"TablePagination",props:{currentPage:{},totalPages:{},label:{}},setup(t){const n=t,s=e.computed(()=>n.currentPage<=1),o=e.computed(()=>n.currentPage>=n.totalPages);return(r,l)=>(e.openBlock(),e.createElementBlock("div",Gc,[e.createElementVNode("div",null,e.toDisplayString(r.label),1),e.createElementVNode("div",Jc,[e.createElementVNode("button",{class:"rounded-md border border-gray-300 px-3 py-1 text-sm transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-400",disabled:s.value,onClick:l[0]||(l[0]=i=>r.$emit("previous"))}," Назад ",8,Zc),e.createElementVNode("span",Yc,"Сторінка "+e.toDisplayString(r.currentPage)+" з "+e.toDisplayString(r.totalPages),1),e.createElementVNode("button",{class:"rounded-md border border-gray-300 px-3 py-1 text-sm transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-400",disabled:o.value,onClick:l[1]||(l[1]=i=>r.$emit("next"))}," Далі ",8,Xc)])]))}}),Vc={class:"relative inline-flex"},ed=["aria-label"],td={class:"px-3 pb-2"},nd={class:"px-3 pb-3 max-h-64 overflow-y-auto"},sd=["onClick"],od={class:"truncate"},rd={key:0,xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},id="inline-flex items-center justify-center size-8 rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",ld=e.defineComponent({__name:"TableColumnSettings",props:{columns:{}},emits:["update:columns"],setup(t,{emit:n}){const s=t,o=n,r=e.useAttrs(),l=e.ref(!1),i=e.ref(""),c=e.ref([...s.columns]),d=e.ref(null),p=e.ref(null),m=e.ref(null),f=e.ref({top:0,left:0}),h=e.computed(()=>{if(!i.value)return c.value;const $=i.value.toLowerCase();return c.value.filter(D=>y(D).toLowerCase().includes($))});e.watch(()=>s.columns,$=>{if(!$){c.value=[];return}const D=JSON.stringify($),B=JSON.stringify(c.value);D!==B&&(c.value=[...$])},{deep:!0}),e.watch(c,$=>{o("update:columns",$)},{deep:!0});function y($){return $.ua||$.label||$.name||"Колонка"}function x($){const D=!$.hidden;D&&c.value.filter(B=>!B.hidden).length<=1||($.hidden=D)}function _(){l.value=!l.value,l.value&&e.nextTick(()=>{m.value?.focus(),E()})}function E(){if(!d.value)return;const $=d.value.getBoundingClientRect();f.value={top:$.bottom+window.scrollY+6,left:$.left+window.scrollX-200}}function S($){if(!l.value)return;const D=$.target;D&&(p.value?.contains(D)||d.value?.contains(D)||(l.value=!1))}function L($){$.key==="Escape"&&(l.value=!1)}return e.onMounted(()=>{document.addEventListener("click",S,!0),document.addEventListener("keydown",L)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",S,!0),document.removeEventListener("keydown",L)}),($,D)=>(e.openBlock(),e.createElementBlock("div",Vc,[e.createElementVNode("button",{ref_key:"buttonRef",ref:d,type:"button",onClick:_,class:e.normalizeClass([id,e.unref(r).class]),"aria-label":e.unref(r)["aria-label"]??"Налаштування колонок",title:"Налаштування колонок"},D[2]||(D[2]=[e.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-columns" height="18" width="18" aria-hidden="true"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6h5.5"></path><path d="M4 10h5.5"></path><path d="M4 14h5.5"></path><path d="M4 18h5.5"></path><path d="M14.5 6h5.5"></path><path d="M14.5 10h5.5"></path><path d="M14.5 14h5.5"></path><path d="M14.5 18h5.5"></path></svg>',1)]),10,ed),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"modalRef",ref:p,class:"fixed z-50 w-64 bg-white rounded-xl shadow-lg border border-gray-200 dark:bg-neutral-900 dark:border-neutral-700",style:e.normalizeStyle({top:`${f.value.top}px`,left:`${f.value.left}px`})},[D[5]||(D[5]=e.createElementVNode("div",{class:"flex items-center justify-between h-12 px-4 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Налаштування колонок ",-1)),e.createElementVNode("div",td,[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:m,"onUpdate:modelValue":D[0]||(D[0]=B=>i.value=B),type:"text",class:"w-full rounded-md border border-gray-200 px-3 py-2 text-sm text-gray-800 placeholder:text-gray-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200",placeholder:"Пошук колонок"},null,512),[[e.vModelText,i.value]])]),e.createElementVNode("div",nd,[D[4]||(D[4]=e.createElementVNode("p",{class:"px-1 pb-2 text-xs text-gray-500 uppercase tracking-wide"},"Виберіть колонки",-1)),e.createElementVNode("ul",{class:"space-y-1",onClick:D[1]||(D[1]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,B=>(e.openBlock(),e.createElementBlock("li",{key:B.name,class:"flex items-center justify-between rounded-lg px-3 py-2 text-sm text-gray-800 hover:bg-gray-100 dark:text-neutral-200 dark:hover:bg-neutral-800 cursor-pointer",onClick:q=>x(B)},[e.createElementVNode("span",od,e.toDisplayString(y(B)),1),e.createElementVNode("span",{class:e.normalizeClass(["flex items-center justify-center size-4 rounded border border-gray-300 text-white",B.hidden?"bg-white text-transparent":"bg-blue-600 border-blue-600"])},[B.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("svg",rd,D[3]||(D[3]=[e.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)])))],2)],8,sd))),128))])])],4)):e.createCommentVNode("",!0)]))]))}}),ad={class:"flex flex-col gap-4 mb-[15px]"},cd={class:"flex flex-wrap items-center gap-4"},dd={class:"relative"},pd={class:"ml-auto flex items-center gap-2"},fd={class:"overflow-x-auto"},md={class:"min-w-full relative divide-y-2 divide-gray-200 bg-white min-w-full overflow-auto divide-y-2 divide-gray-200 bg-white text-[12px] text-gray-600"},ud={class:"text-left font-medium text-gray-700"},hd={key:0,class:"py-2 pr-4 min-w-[80px] max-w-[120px] text-right"},gd={class:"divide-y divide-gray-200"},yd=["href"],vd={key:2},bd={key:3},kd={key:0,class:"py-2 pr-4 text-right"},Ed=["data-action-key"],Nd=["onClick"],wd=["onClick"],xd={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},_d={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Cd={key:2,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Sd={key:3,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Bd={key:0},$d=["colspan"],No=e.defineComponent({__name:"TableWidget",props:{name:{},label:{},component:{},path:{},slot:{},col:{},width:{},html:{},title:{},type:{},token:{},count:{},props:{},items:{}},setup(t){const n=e.getCurrentInstance(),s=e.ref([]),o=e.ref([]),r=new Map,l=t,i=e.ref([]),c=e.ref(""),d=e.ref(""),p=e.ref(""),m=e.ref(1),f=e.ref(10),h=e.ref(0),y=e.ref(0),x=e.ref("id"),_=e.ref("");let E=null,S=0;const L=e.ref(null);async function $(){const N=m.value,w=++S,C=new URLSearchParams,a=p.value.trim();a&&C.set("search",a),C.set("page",String(N)),C.set("limit",String(f.value));const u=`/api/data/${l.token}${C.toString()?`?${C.toString()}`:""}`;let v;try{const W=await fetch(u);if(!W.ok)throw new Error(`Request failed with status ${W.status}`);v=await W.json()}catch(W){w===S&&(s.value=[],y.value=0,h.value=0),console.error("Failed to load table data",W);return}if(w!==S)return;s.value=Array.isArray(v?.rows)?v.rows:[],o.value=g(v?.columns||[]),i.value=Array.isArray(v?.actions)?v.actions:[],c.value=v?.form,d.value=v?.addToken,x.value=typeof v?.pk=="string"&&v.pk?v.pk:x.value,typeof v?.form=="string"&&v.form&&(_.value=v.form.replace(/\.form$/,".table")),_e();const b=Number(v?.total??v?.count??v?.totalCount),A=Number(v?.filtered??v?.filteredCount);h.value=Number.isFinite(b)&&b>0?b:s.value.length,y.value=Number.isFinite(A)&&A>0?A:Math.max(s.value.length,h.value);const P=Math.max(1,Math.ceil((y.value||s.value.length||1)/f.value));let R=N;typeof v?.page=="number"&&v.page>0&&(R=v.page),R>P&&(R=P),R<1&&(R=1);const z=R!==N;if(m.value=R,z&&y.value>0)return $()}const{$notify:D,$confirm:B,$form:q}=n?.appContext?.config?.globalProperties||{};function ee(){if(nt.emitter?.emit){nt.emitter.emit("updateCard");return}if(typeof window<"u"&&typeof window.location?.reload=="function"){window.location.reload();return}$()}async function M(N){typeof q=="function"&&(await q({token:N.token}),ee())}async function I(){typeof q=="function"&&(await q({token:d.value}),ee())}function H(N){B({title:"Підтвердіть дію",type:"error",message:"Ви впевненні що бажаєте видалити даний рядок?",onConfirm:async()=>{const w=await fetch(`/api/table/${N.token}`,{method:"DELETE"});if(!w.ok){const{error:C}=await w.json();D({title:"Помилка",type:"warning",message:C});return}D({title:"Видаленно",message:"Успішно видалено"}),await $()}})}e.onMounted(async()=>{await $(),nt.emitter?.on?.("updateCard",$)});function j(N){return typeof N?.format=="string"?N.format.toLowerCase():""}function g(N){const w=new Map;o.value.forEach(a=>{a?.name&&w.set(a.name,!!a.hidden)});const C=N.map(a=>{const u=w.has(a.name)?w.get(a.name):!!a.hidden;return{...a,hidden:u}});return C.length&&!C.some(a=>!a.hidden)&&(C[0].hidden=!1),C}const T=e.computed(()=>{const N=o.value.filter(w=>!w.hidden);return N.length?N:o.value}),k=e.computed(()=>{const N=[],w=new Set;for(const C of i.value){if(typeof C=="string"){if(C==="view"){const a="row:view";w.has(a)||(N.push({key:a,type:"view",label:"Переглянути",scope:"row",handler:vt}),w.add(a));continue}if(C==="edit"){const a="row:edit";w.has(a)||(N.push({key:a,type:"edit",label:"Редагувати",scope:"row",handler:gt}),w.add(a));continue}if(C==="delete"||C==="del"){const a="row:delete";w.has(a)||(N.push({key:a,type:"delete",label:"Видалити",scope:"row",handler:Qn,variant:"danger"}),w.add(a));continue}if(C==="add"){const a="toolbar:add";w.has(a)||(N.push({key:a,type:"add",label:"Додати",scope:"toolbar"}),w.add(a))}continue}if(C&&typeof C=="object"){const a=String(C.name??C.type??"action"),u=String(C.label??C.title??a),v=C.scope==="toolbar"?"toolbar":"row",b=`${v}:${a}`;if(w.has(b))continue;w.add(b),N.push({key:b,type:a,label:u,scope:v,handler:v==="row"?A=>Vn(C,A):void 0,variant:C.variant==="danger"?"danger":"default",original:C})}}return N}),O=e.computed(()=>k.value.filter(N=>N.scope==="row"&&typeof N.handler=="function")),Y=e.computed(()=>k.value.filter(N=>N.scope==="toolbar")),ce=e.computed(()=>O.value.length>0),Ie=e.computed(()=>Y.value.some(N=>N.type==="add")),Be=e.computed(()=>s.value),ke=e.computed(()=>{const N=y.value||Be.value.length,w=Math.ceil(N/f.value);return w>0?w:1}),we=e.computed(()=>{const N=Be.value.length,w=y.value||N,C=h.value||w;return`Показано ${N} з ${w} (усього ${C})`});function xe(){m.value<ke.value&&(m.value+=1,$())}function Gn(){m.value>1&&(m.value-=1,$())}e.watch(o,N=>{N?.length&&(N.some(w=>!w.hidden)||(N[0].hidden=!1))},{deep:!0});function Jn(){E&&clearTimeout(E),_e(),E=setTimeout(()=>{m.value=1,$()},300)}function qe(N){const w=x.value||"id",C=N?.token??N?.[w]??N?.id;return C?String(C):""}function Gt(N){const w=T.value[N],C=["py-2",...We(w)];N===0&&C.push("pl-4");const a=N===T.value.length-1&&!ce.value;return C.push(a?"pr-4":"pr-5"),C.join(" ")}function Jt(N,w){const C=["py-2",...We(w)];j(w)==="badge"&&C.push("center"),N===0&&C.push("pl-4");const a=N===T.value.length-1&&!ce.value;return C.push(a?"pr-4":"pr-5"),C.join(" ")}function We(N){const w=[],C=b=>{if(b==null||b==="")return;const A=Number(b);return Number.isFinite(A)&&A>0?`${A}px`:String(b).replace(/\s+/g,"")},a=C(N?.width),u=C(N?.minWidth),v=C(N?.maxWidth);return a?(w.push(`min-w-[${a}]`,`max-w-[${a}]`),w):(w.push(`min-w-[${u??"100px"}]`),w.push(`max-w-[${v??"350px"}]`),w)}function Zt(N){if(!O.value.length)return!1;const w=x.value||"id";return!!(N?.token||N?.[w]||N?.id)}function Yt(N){return L.value===qe(N)}function Zn(N){const w=qe(N);w&&(L.value=L.value===w?null:w)}function Yn(N,w){const C=qe(N);if(C){if(w){r.set(C,w);return}r.delete(C)}}function Xn(N){const w=qe(N),C=r.get(w);if(!C)return{};const a=C.getBoundingClientRect();return{top:`${a.bottom+window.scrollY+8}px`,left:`${a.right+window.scrollX-200}px`,width:"auto"}}function _e(){L.value=null}function gt(N){_e(),M(N)}function Qn(N){_e(),H(N)}async function Vn(N,w){_e();const C=x.value||"id",a=N.isId?w?.[C]??w?.id:w?.token??w?.[C]??w?.id;if(!a){console.warn("Cannot execute action without identifier",N);return}if(N.form&&typeof q=="function"){const u=await yt(N.form,a),v={form:N.form,token:u?.token??w?.token??a,schema:u?.schema,mode:u?.mode??"edit"};console.log("formConfig",u),u?.data!==void 0&&(v.defaultValue=u.data);try{await q(v),ee()}catch(b){console.error("Failed to execute form action",b)}return}if(typeof N.api=="string"&&N.api){const u=et(N.api,a);window.location.href=u;return}w?.token&&typeof q=="function"&&(await q({token:w.token}),ee())}function et(N,w){return`${N.endsWith("/")?N:`${N}/`}${w}`}async function yt(N,w){const C=`/api/form/${N}/${w}`;try{const a=await fetch(C);if(!a.ok)throw new Error(`Request failed with status ${a.status}`);return await a.json()}catch(a){console.error("Failed to load form config",a),typeof D=="function"&&D({title:"Помилка",type:"warning",message:"Не вдалося отримати дані форми."});return}}function vt(N){_e();const w=_.value||(c.value?String(c.value).replace(/\.form$/,".table"):""),C=x.value||"id",a=N?.[C]??N?.id??N?.token;if(w&&a){const u=`/card/${w}/${a}`;window.location.href=u;return}if(N?.token&&typeof q=="function"){q({token:N.token,readonly:!0,mode:"view"});return}N?.token&&M(N)}function Xt(N){if(!L.value)return;const w=N.target;if(!w)return;const C=w.closest("[data-action-key]");C&&C.getAttribute("data-action-key")===L.value||_e()}e.onMounted(()=>{document.addEventListener("click",Xt,!0)}),e.onBeforeUnmount(()=>{E&&clearTimeout(E),document.removeEventListener("click",Xt,!0),nt.emitter?.off?.("updateCard",$)});function Qt(N,w){const a=N?.[`${w.name}_text`];if(Array.isArray(a))return a.length?a.join(", "):"-";if(a!=null&&a!=="")return a;const u=N?.[w.name];return Array.isArray(u)?u.length?u.join(", "):"-":u??"-"}function tt(N,w){const a=N?.[`${w.name}_data`];if(a&&typeof a=="object")return{text:a.text??a.label??a.name??a.title??"-",color:a.color,textColor:a.textColor};const u=N?.[`${w.name}_text`]??N?.[w.name];return{text:(Array.isArray(u)?u.join(", "):u)??"-"}}function es(N,w){const C=tt(N,w);return C.color?{backgroundColor:C.color,color:C.textColor??"#ffffff"}:{}}function Vt(N,w){const C=j(w);if(C==="badge")return tt(N,w).text;if(C==="select")return Qt(N,w);if(C==="slot")return"-";if(C==="text")return N?.[w.name]??"-";const a=N?.[`${w.name}_data`];return a!=null&&typeof a!="object"?a:N?.[`${w.name}_text`]??N?.[w.name]??"-"}return(N,w)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",ad,[e.createElementVNode("div",cd,[e.createElementVNode("div",dd,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":w[0]||(w[0]=C=>p.value=C),type:"text",class:"w-52 rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Пошук",onInput:Jn},null,544),[[e.vModelText,p.value]])]),e.createElementVNode("div",pd,[e.createVNode(ld,{columns:o.value,"onUpdate:columns":w[1]||(w[1]=C=>o.value=C)},null,8,["columns"]),Ie.value&&d.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",onClick:I,class:"inline-flex size-8 items-center justify-center rounded-lg bg-blue-500 text-white shadow-sm transition-colors hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",title:"Додати запис","aria-label":"Додати запис"},w[3]||(w[3]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M5 12h14"}),e.createElementVNode("path",{d:"M12 5v14"})],-1)]))):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",fd,[e.createElementVNode("table",md,[e.createElementVNode("thead",ud,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(C,a)=>(e.openBlock(),e.createElementBlock("th",{key:C.name,class:e.normalizeClass(Gt(a))},e.toDisplayString(C.ua),3))),128)),ce.value?(e.openBlock(),e.createElementBlock("th",hd," Дії ")):e.createCommentVNode("",!0)])]),e.createElementVNode("tbody",gd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Be.value,C=>(e.openBlock(),e.createElementBlock("tr",{class:"bg-white odd:bg-gray-50",key:C.id??JSON.stringify(C)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,u)=>(e.openBlock(),e.createElementBlock("td",{key:a.name,class:e.normalizeClass([Jt(u,a),"truncate"])},[a.link?(e.openBlock(),e.createElementBlock("a",{key:0,href:a.link.replace("{{id}}",C.id),class:"font-medium cursor-pointer text-start text-wrap text-cyan-800 decoration-2 focus:outline-none focus:underline hover:text-cyan-700 hover:underline"},e.toDisplayString(Vt(C,a)),9,yd)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[j(a)==="slot"&&a.slot?.content?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Kc)(a.slot.content)),{key:0,data:C,row:C,column:a,value:C?.[a.name]},null,8,["data","row","column","value"])):j(a)==="badge"?(e.openBlock(),e.createElementBlock("span",{key:1,class:"items-center px-2 py-1 rounded-full text-xs font-semibold text-center justify-center flex",style:e.normalizeStyle(es(C,a))},e.toDisplayString(tt(C,a).text),5)):j(a)==="select"?(e.openBlock(),e.createElementBlock("span",vd,e.toDisplayString(Qt(C,a)),1)):(e.openBlock(),e.createElementBlock("span",bd,e.toDisplayString(Vt(C,a)),1))],64))],2))),128)),ce.value?(e.openBlock(),e.createElementBlock("td",kd,[Zt(C)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"relative inline-flex","data-action-key":qe(C),ref_for:!0,ref:a=>Yn(C,a)},[e.createElementVNode("button",{type:"button",class:"inline-flex size-7 items-center justify-center rounded-md border border-gray-200 text-gray-500 transition-colors hover:bg-gray-50 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500",onClick:e.withModifiers(a=>Zn(C),["stop"])},w[4]||(w[4]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"1"}),e.createElementVNode("circle",{cx:"12",cy:"5",r:"1"}),e.createElementVNode("circle",{cx:"12",cy:"19",r:"1"})],-1)]),8,Nd),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[Yt(C)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed z-50 w-40 overflow-hidden rounded-lg border border-gray-200 bg-white py-1 shadow-lg",style:e.normalizeStyle(Xn(C)),onClick:w[2]||(w[2]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,a=>(e.openBlock(),e.createElementBlock("button",{key:a.type,type:"button",class:e.normalizeClass(["flex w-full items-center gap-2 px-4 py-2 text-sm transition-colors",a.variant==="danger"?"text-red-600 hover:bg-red-50":"text-gray-700 hover:bg-gray-50"]),onClick:u=>a.handler?.(C)},[a.type==="view"?(e.openBlock(),e.createElementBlock("svg",xd,w[5]||(w[5]=[e.createElementVNode("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"12",r:"3"},null,-1)]))):a.type==="edit"?(e.openBlock(),e.createElementBlock("svg",_d,w[6]||(w[6]=[e.createElementVNode("path",{d:"M18 2a2.828 2.828 0 1 1 4 4L7 21l-4 1 1-4Z"},null,-1)]))):a.type==="delete"?(e.openBlock(),e.createElementBlock("svg",Cd,w[7]||(w[7]=[e.createElementVNode("path",{d:"M3 6h18"},null,-1),e.createElementVNode("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"},null,-1),e.createElementVNode("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"},null,-1),e.createElementVNode("line",{x1:"10",x2:"10",y1:"11",y2:"17"},null,-1),e.createElementVNode("line",{x1:"14",x2:"14",y1:"11",y2:"17"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",Sd,w[8]||(w[8]=[e.createElementVNode("path",{d:"M12 8v8"},null,-1),e.createElementVNode("path",{d:"M8 12h8"},null,-1)]))),e.createTextVNode(" "+e.toDisplayString(a.label),1)],10,wd))),128))],4)):e.createCommentVNode("",!0)]))],8,Ed)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),128)),Be.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",Bd,[e.createElementVNode("td",{colspan:T.value.length+(ce.value?1:0),class:"py-6 text-center text-gray-500"}," Немає записів для відображення ",8,$d)]))])])]),e.createVNode(Qc,{"current-page":m.value,"total-pages":ke.value,label:we.value,onPrevious:Gn,onNext:xe},null,8,["current-page","total-pages","label"])]))}}),Td={class:"p-[20px]"},Dd={class:"flex gap-[6px] mb-5"},Od={class:"vs-form-text relative bg-white rounded-lg flex-grow"},Ad={class:"grid p-3 lg:gap-x-3 md:gap-x-6 md:p-5 grid-cols-6"},Ld={class:"mt-2 text-sm font-medium text-gray-800 dark:text-neutral-200"},Id={class:"space-y-8"},Md={key:0},Pd={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},Rd=["onClick"],Fd={class:"md:col-span-2"},zd={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},jd={class:"text-sm text-gray-500 dark:text-neutral-500"},Hd={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},Ud=["checked","onChange"],qd={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},Wd={class:"md:col-span-2"},Kd={class:"font-semibold text-gray-800 dark:text-neutral-200"},Gd=["onClick"],Jd={class:"md:col-span-2"},Zd={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},Yd={class:"text-sm text-gray-500 dark:text-neutral-500"},Xd={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},Qd=["checked","onChange"],Wt=e.defineComponent({__name:"GroupInterfaceWidget",props:{data:{},id:{}},setup(t){const n=t,s=e.ref(""),o=["view","add","edit","del"],r=e.ref({});e.onMounted(async()=>{const _=await(await fetch(`/api/access-group/${n.id}?tab=vs-group-interface`)).json();_.routes&&_.routes.forEach(E=>{r.value[E.path]=new Set(E.actions)})});const l=(x,_)=>r.value[x]?.has(_)??!1,i=(x,_)=>{r.value[x]||(r.value[x]=new Set),r.value[x].has(_)?r.value[x].delete(_):r.value[x].add(_)},c=(x,_)=>{x.forEach(E=>{E.path&&(r.value[E.path]||(r.value[E.path]=new Set),r.value[E.path].has(_)?r.value[E.path].delete(_):r.value[E.path].add(_))})},d=e.computed(()=>Object.entries(r.value).map(([x,_])=>({path:x,actions:Array.from(_)})).filter(x=>x.actions.length)),p=async()=>{await fetch(`/api/access-group/${n.id}?tab=vs-group-interface`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({routes:d.value})}),nt.notify({title:"Success!",message:"Permissions saved."})},m=()=>{r.value={}},f=x=>{if(!s.value.trim())return x;const _=s.value.toLowerCase();return x.filter(E=>E.ua.toLowerCase().includes(_)||E.path&&E.path.toLowerCase().includes(_))},h=e.computed(()=>f(n.data.routers.filter(x=>!x.menu))),y=e.computed(()=>n.data.routers.filter(x=>x.menu).map(x=>({...x,menu:f(x.menu||[])})).filter(x=>x.menu&&x.menu.length>0));return(x,_)=>(e.openBlock(),e.createElementBlock("div",Td,[e.createElementVNode("div",Dd,[e.createElementVNode("div",Od,[_[1]||(_[1]=e.createElementVNode("i",{class:"absolute bottom-2/4 translate-y-2/4 text-gray-500 cursor-pointer ti"},null,-1)),e.withDirectives(e.createElementVNode("input",{type:"text",placeholder:"Пошук","onUpdate:modelValue":_[0]||(_[0]=E=>s.value=E),class:"bg-white h-[38px] text-sm py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,512),[[e.vModelText,s.value]])]),e.createElementVNode("button",{onClick:m,class:"inline-flex items-center px-3 py-2 text-sm font-medium duration-300 bg-white border rounded-lg gap-x-2 hover:bg-gray-100"}," Скинути всі "),e.createElementVNode("button",{onClick:p,class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"}," Зберегти ")]),e.createElementVNode("div",Ad,[_[2]||(_[2]=e.createElementVNode("div",{class:"self-center col-span-2"},[e.createElementVNode("h2",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Групи")],-1)),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(E,S)=>e.createElementVNode("div",{class:"col-span-1 text-center",key:S},[e.createElementVNode("h3",Ld,e.toDisplayString(E),1)])),64))]),e.createElementVNode("div",Id,[h.value.length?(e.openBlock(),e.createElementBlock("div",Md,[e.createElementVNode("ul",Pd,[_[3]||(_[3]=e.createElementVNode("li",{class:"md:col-span-2"},[e.createElementVNode("h3",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Без категорії")],-1)),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(E,S)=>e.createElementVNode("li",{key:S,class:"md:block md:col-span-1 md:text-center"},[e.createElementVNode("button",{type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline",onClick:L=>c(h.value,o[S])}," Toggle all ",8,Rd)])),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(E,S)=>(e.openBlock(),e.createElementBlock("ul",{key:"uncat-"+S,class:"grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3 grid-cols-6"},[e.createElementVNode("li",Fd,[e.createElementVNode("p",zd,e.toDisplayString(E.ua),1),e.createElementVNode("p",jd,e.toDisplayString(E.path),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(L,$)=>e.createElementVNode("li",{key:$,class:"col-span-1"},[e.createElementVNode("div",Hd,[e.createElementVNode("input",{type:"checkbox",checked:l(E.path,L),onChange:D=>i(E.path,L),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,Ud)])])),64))]))),128))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(E,S)=>(e.openBlock(),e.createElementBlock("div",{key:S,class:"space-y-5"},[e.createElementVNode("ul",qd,[e.createElementVNode("li",Wd,[e.createElementVNode("h3",Kd,e.toDisplayString(E.ua),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(L,$)=>e.createElementVNode("li",{key:$,class:"md:block md:col-span-1 md:text-center"},[e.createElementVNode("button",{type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline",onClick:D=>c(E.menu,o[$])}," Toggle all ",8,Gd)])),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.menu,(L,$)=>(e.openBlock(),e.createElementBlock("ul",{key:$,class:"grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3 grid-cols-6"},[e.createElementVNode("li",Jd,[e.createElementVNode("p",Zd,e.toDisplayString(L.ua),1),e.createElementVNode("p",Yd,e.toDisplayString(L.path),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(D,B)=>e.createElementVNode("li",{key:B,class:"col-span-1"},[e.createElementVNode("div",Xd,[e.createElementVNode("input",{type:"checkbox",checked:l(L.path,D),onChange:q=>i(L.path,D),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,Qd)])])),64))]))),128))]))),128))])]))}}),Ue={"vs-widget-map":xt,"vs-widget-comments":kt,"vs-widget-history":Et,"vs-widget-gallery":wt,"vs-widget-file":Nt,"vs-widget-list":rn,"vs-widget-table":No,"vs-group-interface":Wt};function wo(t){if(t==null)return null;const n=Number(t);return Number.isFinite(n)?Math.max(1,Math.min(12,Math.floor(n))):null}function xo(t){const n={...t};return Array.isArray(t.items)&&(n.items=t.items.map(s=>xo(s))),n}function Vd(t,n=12){if(!t.length)return;const s=[],o=[];t.forEach(d=>{const p=wo(d.col);p?(d.col=p,s.push({item:d,span:p})):o.push(d)});const r=s.reduce((d,p)=>d+p.span,0);let l=n-r;if(o.length===0)return;l<=0&&(l=n);const i=Math.max(1,Math.floor(l/o.length));let c=Math.max(0,l-i*o.length);o.forEach(d=>{let p=i;c>0&&(p+=1,c-=1),d.col=Math.max(1,Math.min(12,p))})}function Kt(t,n=12){if(!Array.isArray(t)||!t.length)return[];const s=t.map(o=>xo(o));return s.forEach(o=>{Array.isArray(o.items)&&o.items.length&&(o.items=Kt(o.items,12))}),Vd(s,n),s}function _o(t){const n=wo(t);return n?n>=12?["md:col-span-12","lg:col-span-12"]:[`md:col-span-${n}`,`lg:col-span-${n}`]:[]}const ep={class:"text-lg font-semibold text-gray-900"},tp=["innerHTML"],np={key:0,class:"grid grid-cols-12 gap-4"},sp={key:0,class:"mb-4 pb-2 border-b border-gray-200"},op={class:"text-lg font-semibold text-gray-900"},rp=["innerHTML"],ut=e.defineComponent({__name:"CardItem",props:{items:{},type:{},col:{},data:{},html:{},title:{},hideTitle:{type:Boolean},styling:{},name:{},label:{},component:{},slot:{},id:{},className:{},style:{}},setup(t){const n=t,s=e.computed(()=>{if(!n.col)return{};const p=Math.max(1,Math.min(12,Number(n.col)));return{[`md:col-span-${p}`]:!0,[`lg:col-span-${p}`]:!0}}),o=e.computed(()=>Kt(n.items));function r(p){const m=["col-span-12"],f=_o(p.col);return f.length&&m.push(...f),m}function l(p){return Ue[p]||p}function i(p,m){if(!p||typeof m!="string"||!m)return{found:!1,value:void 0};const f=m.split(".");let h=p;for(const y of f){if(h==null||typeof h!="object"&&!Array.isArray(h))return{found:!1,value:void 0};if(!(y in h))return{found:!1,value:void 0};h=h[y]}return{found:!0,value:h}}const c=function(p={}){const m={...p};return Object.entries(m).forEach(([f,h])=>{if(f!=="props"&&typeof h=="string"){const y=i(n.data,h);y.found&&(m[f]=y.value)}}),p.props&&typeof p.props=="object"&&Object.entries(p.props).forEach(([f,h])=>{if(typeof h=="string"){const y=i(n.data,h);m[f]=y.found?y.value:h}else m[f]=h}),delete m.props,m},d=e.computed(()=>{const p={};return n.col&&(p.col=n.col),p});return(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([[s.value,p.styling?.classItem],"w-full bg-gray-50 rounded-lg p-4 col-span-12"])},[!p.hideTitle&&p.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["mb-4 pb-2 border-b border-gray-200",p.styling?.classItemTitle])},[e.createElementVNode("h3",ep,e.toDisplayString(p.title),1)],2)):e.createCommentVNode("",!0),p.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:p.html,class:"text-gray-900 leading-relaxed"},null,8,tp)):p.type?.includes("tabs")?(e.openBlock(),e.createBlock(ht,{key:2,view:p.type,panels:p.items,data:p.data,styling:p.styling},null,8,["view","panels","data","styling"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[o.value.length?(e.openBlock(),e.createElementBlock("div",np,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(f,h)=>(e.openBlock(),e.createElementBlock("div",{key:f.name||f.component||h,class:e.normalizeClass(r(f))},[f.title||f.label?(e.openBlock(),e.createElementBlock("div",sp,[e.createElementVNode("h3",op,e.toDisplayString(f.title||f.label),1)])):e.createCommentVNode("",!0),f.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:f.html,class:"text-gray-900 leading-relaxed"},null,8,rp)):f.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(f.component)),e.mergeProps({key:2,ref_for:!0},{geom:p.data.geom,id:p.data.id,...d.value,...c(f),data:p.data},{class:"w-full"}),null,16)):e.renderSlot(p.$slots,"default",{key:3})],2))),128))])):e.createCommentVNode("",!0)],64))],2))}}),ip={class:"grid grid-cols-12 gap-[20px]"},lp={key:0,class:"col-span-4"},ap=["innerHTML"],cp=["onClick"],dp=["innerHTML"],pp={key:1,class:"flex w-full"},fp={class:"flex flex-col w-56 border-r border-gray-200 bg-gray-50 relative"},mp=["onClick"],up={key:0,class:"absolute right-3 top-1/2 -translate-y-1/2 transition-all duration-300"},hp={class:"flex-1 p-4"},gp=["innerHTML"],yp={class:"grid grid-cols-12 gap-4"},vp={key:3,class:"w-full h-full"},ht=e.defineComponent({__name:"Card",props:{panels:{default:()=>[]},data:{default:()=>({})},view:{default:"plain"},styling:{},classWrapper:{default:""},classPanel:{},normalizeTabs:{type:Boolean,default:!0},backgroundClass:{},tabContentWrapperClass:{},tabPanelClass:{},id:{},className:{},style:{}},setup(t){const n=t;function s(){const g=typeof window<"u"?window:globalThis,T="__vsCardAnonymousCounter__",k=g[T]??0;return g[T]=k+1,k===0?"tab":`tab${k}`}const o=e.ref(0),r=e.ref([]);let l=!1;const i=e.ref(n.id??s());e.watch(()=>n.id,g=>{g&&(i.value=g)});const c=new Map,d=e.computed(()=>n.view==="tabs"||n.view==="vertical-tabs");e.provide("vsCardTabsContext",d);function p(g,T){const k=T?.path;return k?(c.has(k)||c.set(k,e.defineAsyncComponent(()=>import(k))),c.get(k)):typeof g=="string"&&Ue[g]?Ue[g]:T?.component&&Ue[T.component]?Ue[T.component]:T?.name&&Ue[T.name]?Ue[T.name]:g}function m(g){return g.forEach(T=>{T.type&&(T.view=T.type)}),r.value=g.filter(T=>T.type==="pin"),g.filter(T=>T.type!=="pin")}const f=e.computed(()=>{let g;return n.panels&&n.panels.length>0?g=n.normalizeTabs?m(n.panels):n.panels:n.data&&Array.isArray(n.data)&&(g=n.data.filter(k=>k.type.includes("tabs"))[0]?.items),Kt(g,12)}),h=e.computed(()=>i.value),y=e.computed(()=>{let g;return n.panels&&n.panels.length>0?g=n.normalizeTabs?m(n.panels):n.panels:n.data&&Array.isArray(n.data)&&(g=n.data),Kt(g,12)}),x=e.computed(()=>({[`view-${n.view}`]:!0}));function _(g,T){if(!g||typeof T!="string"||!T)return{found:!1,value:void 0};const k=T.split(".");let O=g;for(const Y of k){if(O==null||typeof O!="object"&&!Array.isArray(O))return{found:!1,value:void 0};if(!(Y in O))return{found:!1,value:void 0};O=O[Y]}return{found:!0,value:O}}const E=g=>{const T={...g};return Object.entries(T).forEach(([k,O])=>{if(k!=="props"&&typeof O=="string"){const Y=_(n.data,O);Y.found&&(T[k]=Y.value)}}),g.props&&typeof g.props=="object"&&Object.entries(g.props).forEach(([k,O])=>{if(typeof O=="string"){const Y=_(n.data,O);T[k]=Y.found?Y.value:O}else T[k]=O}),delete T.props,n.data&&(T.data=n.data),T};function S(g){const T=["col-span-12"],k=_o(g.col);return k.length&&T.push(...k),T}const L=e.ref([]),$=e.ref([]),D=e.ref([]);function B(g,T){g&&g instanceof HTMLElement&&(L.value[T]=g)}function q(){$.value=L.value.map(g=>g.offsetWidth),D.value=L.value.map(g=>g.offsetLeft)}function ee(){if(typeof window>"u")return null;const g=h.value;if(!g)return null;const k=new URL(window.location.href).searchParams.get(g);if(k===null)return null;const O=Number.parseInt(k,10);return Number.isNaN(O)?null:O}function M(g){if(typeof window>"u")return;const T=h.value;if(!T)return;const k=new URL(window.location.href);g<=0?k.searchParams.delete(T):k.searchParams.set(T,String(g));const O=window.history.state??{};window.history.replaceState(O,document.title,k)}function I(){if(l)return;const g=ee();if(g===null||!f.value.length)return;const T=Math.min(Math.max(g,0),f.value.length-1);T!==g&&M(T),T!==o.value&&(o.value=T),l=!0}function H(){l=!1,I()}let j=null;return e.onMounted(()=>{e.nextTick(()=>{I(),q()}),typeof window<"u"&&window.addEventListener("popstate",H),j=new ResizeObserver(()=>q()),j.observe(document.body)}),e.onBeforeUnmount(()=>{j?.disconnect(),typeof window<"u"&&window.removeEventListener("popstate",H)}),e.watch(o,g=>{e.nextTick(()=>{q()}),M(g)}),e.watch(f,()=>{l=!1,I()}),(g,T)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(g.classWrapper||x.value)},[e.createElementVNode("div",ip,[r.value.length!==0?(e.openBlock(),e.createElementBlock("div",lp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value[0].items,(k,O)=>(e.openBlock(),e.createElementBlock("div",{key:k.name||O,class:"w-full bg-gray-50 rounded-lg p-4 col-span-12 m-1 mb-3"},[k.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:k.html,class:"text-gray-900 leading-relaxed"},null,8,ap)):k.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(k.component,k)),e.mergeProps({key:1,ref_for:!0},k.component==="Card"?k:E(k),{id:g.data.id,class:["w-full h-full",g.styling?.classItem]}),null,16,["id","class"])):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(r.value.length!==0?"col-span-8":"col-span-12")},[g.view==="tabs"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["overflow-hidden w-full",g.styling?.classTabWrapper])},[e.createElementVNode("div",{class:e.normalizeClass(["flex border-b border-gray-200 bg-gray-50 relative gap-4 my-6",g.styling?.classTabHeader])},[$.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute bottom-0 h-[2px] bg-blue-600 transition-all duration-300",style:e.normalizeStyle({width:$.value[o.value]+"px",left:D.value[o.value]+"px"})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(k,O)=>(e.openBlock(),e.createElementBlock("button",{key:k.name||O,ref_for:!0,ref:Y=>B(Y,O),onClick:Y=>o.value=O,class:e.normalizeClass(["px-1 py-2 text-sm font-medium transition-colors",o.value===O?"text-blue-600 border-blue-600 border-b-2 ":"text-gray-600 hover:text-gray-800"])},e.toDisplayString(k.title||k.label||k.name||`Tab ${O+1}`),11,cp))),128))],2),e.createElementVNode("div",{class:e.normalizeClass([g.styling?.classTabContent,"p-1"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(k,O)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:k.name||O,class:e.normalizeClass(["transition-all duration-300 ease-in-out",o.value===O?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",g.classPanel||"w-full border-gray-100"])},[k.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:k.html,class:"text-gray-900 leading-relaxed"},null,8,dp)):g.$slots[`tab-${O}`]?e.renderSlot(g.$slots,`tab-${O}`,{key:1,item:k,data:g.data}):k.items?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ut),e.mergeProps({key:2,ref_for:!0},E(k),{items:k.items,"hide-title":!0,class:["w-full h-full",g.styling?.classItem],styling:g.styling}),null,16,["items","class","styling"])):k.component||k.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(k.component||k.name,k)),e.mergeProps({key:3,ref_for:!0},k.component==="Card"?k:E(k),{styling:g.styling,id:g.data.id,class:["w-full h-full",g.styling?.classItem]}),null,16,["styling","id","class"])):e.renderSlot(g.$slots,k.slot||`tab-${O}`,{key:4,item:k,data:g.data})],2)),[[e.vShow,o.value===O]])),128))],2)],2)):g.view==="vertical-tabs"?(e.openBlock(),e.createElementBlock("div",pp,[e.createElementVNode("div",fp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(k,O)=>(e.openBlock(),e.createElementBlock("button",{key:k.name||O,onClick:Y=>o.value=O,class:e.normalizeClass(["relative px-1 py-4 text-sm font-medium text-left transition-colors duration-300",o.value===O?"text-blue-600 bg-white":"text-gray-600 hover:text-gray-800 hover:bg-gray-100"])},[e.createTextVNode(e.toDisplayString(k.title||k.label||k.name||`Tab ${O+1}`)+" ",1),o.value===O?(e.openBlock(),e.createElementBlock("span",up,T[0]||(T[0]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"remixicon text-blue-600 rounded-full bg-white shadow scale-90 opacity-100 transition ease-out"},[e.createElementVNode("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"})],-1)]))):e.createCommentVNode("",!0)],10,mp))),128))]),e.createElementVNode("div",hp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(k,O)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:k.name||O,class:e.normalizeClass(["transition-all duration-300 ease-in-out",o.value===O?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",g.classPanel||"w-full border-gray-100 py-2"])},[k.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:k.html,class:"text-gray-900 leading-relaxed"},null,8,gp)):g.$slots[`tab-${O}`]?e.renderSlot(g.$slots,`tab-${O}`,{key:1,item:k,data:g.data}):k.items?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ut),e.mergeProps({key:2,ref_for:!0},E(k),{items:k.items,"hide-title":!0,class:["w-full h-full",g.styling?.classItem],styling:g.styling}),null,16,["items","class","styling"])):k.component||k.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(k.component||k.name,k)),e.mergeProps({key:3,ref_for:!0},k.component==="Card"?k:E(k),{id:g.data.id,class:["w-full h-full",g.styling?.classItem]}),null,16,["id","class"])):e.renderSlot(g.$slots,k.slot||`tab-${O}`,{key:4,item:k,data:g.data})],2)),[[e.vShow,o.value===O]])),128))])])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(g.styling?.classPlain||"p-1 w-full")},[e.createElementVNode("div",yp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(k,O)=>(e.openBlock(),e.createElementBlock("div",{key:k.name||k.component||O,class:e.normalizeClass(S(k))},[g.$slots[`panel-${O}`]?e.renderSlot(g.$slots,`panel-${O}`,{key:0,item:k,data:g.data}):k.items||k.html?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ut),e.mergeProps({key:1,ref_for:!0},E(k),{items:k.items||[],class:["w-full h-full",g.styling?.classItem],styling:g.styling}),null,16,["items","class","styling"])):k.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(k.component,k)),e.mergeProps({key:2,ref_for:!0},E(k),{class:["w-full h-full",[g.styling?.classItem]],styling:g.styling}),null,16,["class","styling"])):(e.openBlock(),e.createElementBlock("div",vp,[e.renderSlot(g.$slots,k.slot||`panel-${O}`,{item:k,data:g.data})]))],2))),128))])],2))],2)])],2))}}),bp=["onClick"],Co=Me(e.defineComponent({__name:"CopyNotification",setup(t,{expose:n}){const s=e.ref([]);let o=1;const r=()=>{if(s.value.length>=10){const c=s.value[0];clearTimeout(c.timer),s.value.shift()}const i={id:o++,timer:setTimeout(()=>{l(i.id)},1500)};s.value.push(i)},l=i=>{const c=s.value.findIndex(d=>d.id===i);if(c!==-1){const d=s.value[c];clearTimeout(d.timer),s.value.splice(c,1)}};return n({addNotification:r}),e.onUnmounted(()=>{s.value.forEach(i=>{clearTimeout(i.timer)})}),(i,c)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.TransitionGroup,{name:"notification",tag:"div",class:"fixed top-4 right-4 z-50 space-y-2"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d.id,class:"bg-green-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center gap-3 min-w-64 max-w-sm"},[e.createVNode(e.unref(Mo),{class:"h-5 w-5 text-green-100 flex-shrink-0"}),c[0]||(c[0]=e.createElementVNode("div",{class:"flex-1"},[e.createElementVNode("p",{class:"font-medium text-sm"},"Ссылка скопирована!"),e.createElementVNode("p",{class:"text-xs text-green-100 opacity-90"},"Файл добавлен в буфер обмена")],-1)),e.createElementVNode("button",{onClick:p=>l(d.id),class:"text-green-100 hover:text-white transition-colors flex-shrink-0"},[e.createVNode(e.unref(sn),{class:"h-4 w-4"})],8,bp)]))),128))]),_:1})]))}}),[["__scopeId","data-v-d1ac6329"]]);ht.install=function(t){t.component("vs-widget-file",Nt),t.component("vs-widget-comments",kt),t.component("vs-widget-history",Et),t.component("vs-widget-gallery",wt),t.component("vs-widget-map",xt),t.component("vs-group-interface",Wt),t.component("CommentsWidget",kt),t.component("HistoryWidget",Et),t.component("GalleryWidget",wt),t.component("FilesWidget",Nt),t.component("MapWidget",xt),t.component("Card",ht),t.component("CardItem",ut),t.component("DescriptionListWidget",rn),t.component("CopyNotification",Co),t.component("GroupInterfaceWidget",Wt)},ne.Card=ht,ne.CardItem=ut,ne.CommentsWidget=kt,ne.CopyNotification=Co,ne.DescriptionListWidget=rn,ne.FilesWidget=Nt,ne.GalleryWidget=wt,ne.GroupInterfaceWidget=Wt,ne.HistoryWidget=Et,ne.MapWidget=xt,ne.TableWidget=No,ne.default=ht,Object.defineProperties(ne,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
151
|
+
**/const ps=Symbol(process.env.NODE_ENV!=="production"?"vModelRadio":""),fs=Symbol(process.env.NODE_ENV!=="production"?"vModelCheckbox":""),ms=Symbol(process.env.NODE_ENV!=="production"?"vModelText":""),us=Symbol(process.env.NODE_ENV!=="production"?"vModelSelect":""),Wn=Symbol(process.env.NODE_ENV!=="production"?"vModelDynamic":""),hs=Symbol(process.env.NODE_ENV!=="production"?"vOnModifiersGuard":""),gs=Symbol(process.env.NODE_ENV!=="production"?"vOnKeysGuard":""),ys=Symbol(process.env.NODE_ENV!=="production"?"vShow":""),Kn=Symbol(process.env.NODE_ENV!=="production"?"Transition":""),vs=Symbol(process.env.NODE_ENV!=="production"?"TransitionGroup":"");Ql({[ps]:"vModelRadio",[fs]:"vModelCheckbox",[ms]:"vModelText",[us]:"vModelSelect",[Wn]:"vModelDynamic",[hs]:"withModifiers",[gs]:"withKeys",[ys]:"vShow",[Kn]:"Transition",[vs]:"TransitionGroup"});let et;function Bc(t,n=!1){return et||(et=document.createElement("div")),n?(et.innerHTML=`<div foo="${t.replace(/"/g,""")}">`,et.children[0].getAttribute("foo")):(et.innerHTML=t,et.textContent)}const $c={parseMode:"html",isVoidTag:Kl,isNativeTag:t=>Ul(t)||ql(t)||Wl(t),isPreTag:t=>t==="pre",isIgnoreNewlineTag:t=>t==="pre"||t==="textarea",decodeEntities:Bc,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return Kn;if(t==="TransitionGroup"||t==="transition-group")return vs},getNamespace(t,n,o){let s=n?n.ns:o;if(n&&s===2)if(n.tag==="annotation-xml"){if(t==="svg")return 1;n.props.some(r=>r.type===6&&r.name==="encoding"&&r.value!=null&&(r.value.content==="text/html"||r.value.content==="application/xhtml+xml"))&&(s=0)}else/^m(?:[ions]|text)$/.test(n.tag)&&t!=="mglyph"&&t!=="malignmark"&&(s=0);else n&&s===1&&(n.tag==="foreignObject"||n.tag==="desc"||n.tag==="title")&&(s=0);if(s===0){if(t==="svg")return 1;if(t==="math")return 2}return s}},Tc=t=>{t.type===1&&t.props.forEach((n,o)=>{n.type===6&&n.name==="style"&&n.value&&(t.props[o]={type:7,name:"bind",arg:F("style",!0,n.loc),exp:Dc(n.value.content,n.loc),modifiers:[],loc:n.loc})})},Dc=(t,n)=>{const o=Rl(t);return F(JSON.stringify(o),!1,n,3)};function ve(t,n){return W(t,n,process.env.NODE_ENV!=="production"?Oc:void 0)}const Oc={53:"v-html is missing expression.",54:"v-html will override element children.",55:"v-text is missing expression.",56:"v-text will override element children.",57:"v-model can only be used on <input>, <textarea> and <select> elements.",58:"v-model argument is not supported on plain elements.",59:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",60:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",61:"v-show is missing expression.",62:"<Transition> expects exactly one child element or component.",63:"Tags with side effect (<script> and <style>) are ignored in client component templates."},Ac=(t,n,o)=>{const{exp:s,loc:r}=t;return s||o.onError(ve(53,r)),n.children.length&&(o.onError(ve(54,r)),n.children.length=0),{props:[X(F("innerHTML",!0,r),s||F("",!0))]}},Lc=(t,n,o)=>{const{exp:s,loc:r}=t;return s||o.onError(ve(55,r)),n.children.length&&(o.onError(ve(56,r)),n.children.length=0),{props:[X(F("textContent",!0),s?he(s,o)>0?s:ee(o.helperString(Bt),[s],r):F("",!0))]}},Ic=(t,n,o)=>{const s=as(t,n,o);if(!s.props.length||n.tagType===1)return s;t.arg&&o.onError(ve(58,t.arg.loc));function r(){const a=de(n,"bind");a&&Le(a.arg,"value")&&o.onError(ve(60,a.loc))}const{tag:l}=n,i=o.isCustomElement(l);if(l==="input"||l==="textarea"||l==="select"||i){let a=ms,c=!1;if(l==="input"||i){const p=dt(n,"type");if(p){if(p.type===7)a=Wn;else if(p.value)switch(p.value.content){case"radio":a=ps;break;case"checkbox":a=fs;break;case"file":c=!0,o.onError(ve(59,t.loc));break;default:process.env.NODE_ENV!=="production"&&r();break}}else pa(n)?a=Wn:process.env.NODE_ENV!=="production"&&r()}else l==="select"?a=us:process.env.NODE_ENV!=="production"&&r();c||(s.needRuntime=o.helper(a))}else o.onError(ve(57,t.loc));return s.props=s.props.filter(a=>!(a.key.type===4&&a.key.content==="modelValue")),s},Mc=Ee("passive,once,capture"),Pc=Ee("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Rc=Ee("left,right"),bs=Ee("onkeyup,onkeydown,onkeypress"),Fc=(t,n,o,s)=>{const r=[],l=[],i=[];for(let a=0;a<n.length;a++){const c=n[a].content;c==="native"&&Ve("COMPILER_V_ON_NATIVE",o,s)||Mc(c)?i.push(c):Rc(c)?ce(t)?bs(t.content.toLowerCase())?r.push(c):l.push(c):(r.push(c),l.push(c)):Pc(c)?l.push(c):r.push(c)}return{keyModifiers:r,nonKeyModifiers:l,eventOptionModifiers:i}},ks=(t,n)=>ce(t)&&t.content.toLowerCase()==="onclick"?F(n,!0):t.type!==4?ye(["(",t,`) === "onClick" ? "${n}" : (`,t,")"]):t,jc=(t,n,o)=>is(t,n,o,s=>{const{modifiers:r}=t;if(!r.length)return s;let{key:l,value:i}=s.props[0];const{keyModifiers:a,nonKeyModifiers:c,eventOptionModifiers:p}=Fc(l,r,o,t.loc);if(c.includes("right")&&(l=ks(l,"onContextmenu")),c.includes("middle")&&(l=ks(l,"onMouseup")),c.length&&(i=ee(o.helper(hs),[i,JSON.stringify(c)])),a.length&&(!ce(l)||bs(l.content.toLowerCase()))&&(i=ee(o.helper(gs),[i,JSON.stringify(a)])),p.length){const m=p.map(fn).join("");l=ce(l)?F(`${l.content}${m}`,!0):ye(["(",l,`) + "${m}"`])}return{props:[X(l,i)]}}),zc=(t,n,o)=>{const{exp:s,loc:r}=t;return s||o.onError(ve(61,r)),{props:[],needRuntime:o.helper(ys)}},Hc=(t,n)=>{if(t.type===1&&t.tagType===1&&n.isBuiltInComponent(t.tag)===Kn)return()=>{if(!t.children.length)return;Es(t)&&n.onError(ve(62,{start:t.children[0].loc.start,end:t.children[t.children.length-1].loc.end,source:""}));const s=t.children[0];if(s.type===1)for(const r of s.props)r.type===7&&r.name==="show"&&t.props.push({type:6,name:"persisted",nameLoc:t.loc,value:void 0,loc:t.loc})}};function Es(t){const n=t.children=t.children.filter(s=>s.type!==3&&!(s.type===2&&!s.content.trim())),o=n[0];return n.length!==1||o.type===11||o.type===9&&o.branches.some(Es)}const Uc=(t,n)=>{t.type===1&&t.tagType===0&&(t.tag==="script"||t.tag==="style")&&(process.env.NODE_ENV!=="production"&&n.onError(ve(63,t.loc)),n.removeNode())};function qc(t,n){return t==="template"?!0:t in Ns?Ns[t].has(n):n in ws?ws[n].has(t):!(t in xs&&xs[t].has(n)||n in _s&&_s[n].has(t))}const tt=new Set(["h1","h2","h3","h4","h5","h6"]),Ue=new Set([]),Ns={head:new Set(["base","basefront","bgsound","link","meta","title","noscript","noframes","style","script","template"]),optgroup:new Set(["option"]),select:new Set(["optgroup","option","hr"]),table:new Set(["caption","colgroup","tbody","tfoot","thead"]),tr:new Set(["td","th"]),colgroup:new Set(["col"]),tbody:new Set(["tr"]),thead:new Set(["tr"]),tfoot:new Set(["tr"]),script:Ue,iframe:Ue,option:Ue,textarea:Ue,style:Ue,title:Ue},ws={html:Ue,body:new Set(["html"]),head:new Set(["html"]),td:new Set(["tr"]),colgroup:new Set(["table"]),caption:new Set(["table"]),tbody:new Set(["table"]),tfoot:new Set(["table"]),col:new Set(["colgroup"]),th:new Set(["tr"]),thead:new Set(["table"]),tr:new Set(["tbody","thead","tfoot"]),dd:new Set(["dl","div"]),dt:new Set(["dl","div"]),figcaption:new Set(["figure"]),summary:new Set(["details"]),area:new Set(["map"])},xs={p:new Set(["address","article","aside","blockquote","center","details","dialog","dir","div","dl","fieldset","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","menu","ol","p","pre","section","table","ul"]),svg:new Set(["b","blockquote","br","code","dd","div","dl","dt","em","embed","h1","h2","h3","h4","h5","h6","hr","i","img","li","menu","meta","ol","p","pre","ruby","s","small","span","strong","sub","sup","table","u","ul","var"])},_s={a:new Set(["a"]),button:new Set(["button"]),dd:new Set(["dd","dt"]),dt:new Set(["dd","dt"]),form:new Set(["form"]),li:new Set(["li"]),h1:tt,h2:tt,h3:tt,h4:tt,h5:tt,h6:tt},Wc=(t,n)=>{if(t.type===1&&t.tagType===0&&n.parent&&n.parent.type===1&&n.parent.tagType===0&&!qc(n.parent.tag,t.tag)){const o=new SyntaxError(`<${t.tag}> cannot be child of <${n.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.`);o.loc=t.loc,n.onWarn(o)}},Kc=[Tc,...process.env.NODE_ENV!=="production"?[Hc,Wc]:[]],Gc={cloak:Sc,html:Ac,text:Lc,model:Ic,on:jc,show:zc};function Jc(t,n={}){return Cc(t,Te({},$c,n,{nodeTransforms:[Uc,...Kc,...n.nodeTransforms||[]],directiveTransforms:Te({},Gc,n.directiveTransforms||{}),transformHoist:null}))}function Zc(t,n={}){const o=t.trim().startsWith("<")?t:`<span>${t}</span>`,{code:s}=Jc(o,{mode:"function"}),r=new Function("Vue",`${s}; return render;`)(As);return e.defineComponent({name:"DynamicFromString",props:n.props??{},emits:n.emits??[],setup(){return n.setup?.()??{}},render:r})}const Gn={};function Yc(t){return Gn[t]||(Gn[t]=Zc(t,{props:{row:{type:Object,default:void 0},value:{type:null,default:void 0},data:{type:Object,default:void 0},column:{type:Object,default:void 0}}})),Gn[t]}const Xc={class:"mt-4 flex flex-wrap items-center justify-between gap-3 text-sm text-gray-600"},Qc={class:"flex items-center gap-2"},Vc=["disabled"],ed={class:"text-sm"},td=["disabled"],nd=e.defineComponent({__name:"TablePagination",props:{currentPage:{},totalPages:{},label:{}},setup(t){const n=t,o=e.computed(()=>n.currentPage<=1),s=e.computed(()=>n.currentPage>=n.totalPages);return(r,l)=>(e.openBlock(),e.createElementBlock("div",Xc,[e.createElementVNode("div",null,e.toDisplayString(r.label),1),e.createElementVNode("div",Qc,[e.createElementVNode("button",{class:"rounded-md border border-gray-300 px-3 py-1 text-sm transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-400",disabled:o.value,onClick:l[0]||(l[0]=i=>r.$emit("previous"))}," Назад ",8,Vc),e.createElementVNode("span",ed,"Сторінка "+e.toDisplayString(r.currentPage)+" з "+e.toDisplayString(r.totalPages),1),e.createElementVNode("button",{class:"rounded-md border border-gray-300 px-3 py-1 text-sm transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-400",disabled:s.value,onClick:l[1]||(l[1]=i=>r.$emit("next"))}," Далі ",8,td)])]))}}),od={class:"relative inline-flex"},sd=["aria-label"],rd={class:"px-3 pb-2"},id={class:"px-3 pb-3 max-h-64 overflow-y-auto"},ld=["onClick"],ad={class:"truncate"},cd={key:0,xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},dd="inline-flex items-center justify-center size-8 rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",pd=e.defineComponent({__name:"TableColumnSettings",props:{columns:{}},emits:["update:columns"],setup(t,{emit:n}){const o=t,s=n,r=e.useAttrs(),l=e.ref(!1),i=e.ref(""),a=e.ref([...o.columns]),c=e.ref(null),p=e.ref(null),m=e.ref(null),f=e.ref({top:0,left:0}),u=e.computed(()=>{if(!i.value)return a.value;const $=i.value.toLowerCase();return a.value.filter(D=>E(D).toLowerCase().includes($))});e.watch(()=>o.columns,$=>{if(!$){a.value=[];return}const D=JSON.stringify($),B=JSON.stringify(a.value);D!==B&&(a.value=[...$])},{deep:!0}),e.watch(a,$=>{s("update:columns",$)},{deep:!0});function E($){return $.ua||$.label||$.name||"Колонка"}function x($){const D=!$.hidden;D&&a.value.filter(B=>!B.hidden).length<=1||($.hidden=D)}function _(){l.value=!l.value,l.value&&e.nextTick(()=>{m.value?.focus(),w()})}function w(){if(!c.value)return;const $=c.value.getBoundingClientRect();f.value={top:$.bottom+window.scrollY+6,left:$.left+window.scrollX-200}}function C($){if(!l.value)return;const D=$.target;D&&(p.value?.contains(D)||c.value?.contains(D)||(l.value=!1))}function I($){$.key==="Escape"&&(l.value=!1)}return e.onMounted(()=>{document.addEventListener("click",C,!0),document.addEventListener("keydown",I)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",C,!0),document.removeEventListener("keydown",I)}),($,D)=>(e.openBlock(),e.createElementBlock("div",od,[e.createElementVNode("button",{ref_key:"buttonRef",ref:c,type:"button",onClick:_,class:e.normalizeClass([dd,e.unref(r).class]),"aria-label":e.unref(r)["aria-label"]??"Налаштування колонок",title:"Налаштування колонок"},D[2]||(D[2]=[e.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-columns" height="18" width="18" aria-hidden="true"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6h5.5"></path><path d="M4 10h5.5"></path><path d="M4 14h5.5"></path><path d="M4 18h5.5"></path><path d="M14.5 6h5.5"></path><path d="M14.5 10h5.5"></path><path d="M14.5 14h5.5"></path><path d="M14.5 18h5.5"></path></svg>',1)]),10,sd),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"modalRef",ref:p,class:"fixed z-50 w-64 bg-white rounded-xl shadow-lg border border-gray-200 dark:bg-neutral-900 dark:border-neutral-700",style:e.normalizeStyle({top:`${f.value.top}px`,left:`${f.value.left}px`})},[D[5]||(D[5]=e.createElementVNode("div",{class:"flex items-center justify-between h-12 px-4 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Налаштування колонок ",-1)),e.createElementVNode("div",rd,[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:m,"onUpdate:modelValue":D[0]||(D[0]=B=>i.value=B),type:"text",class:"w-full rounded-md border border-gray-200 px-3 py-2 text-sm text-gray-800 placeholder:text-gray-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200",placeholder:"Пошук колонок"},null,512),[[e.vModelText,i.value]])]),e.createElementVNode("div",id,[D[4]||(D[4]=e.createElementVNode("p",{class:"px-1 pb-2 text-xs text-gray-500 uppercase tracking-wide"},"Виберіть колонки",-1)),e.createElementVNode("ul",{class:"space-y-1",onClick:D[1]||(D[1]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,B=>(e.openBlock(),e.createElementBlock("li",{key:B.name,class:"flex items-center justify-between rounded-lg px-3 py-2 text-sm text-gray-800 hover:bg-gray-100 dark:text-neutral-200 dark:hover:bg-neutral-800 cursor-pointer",onClick:H=>x(B)},[e.createElementVNode("span",ad,e.toDisplayString(E(B)),1),e.createElementVNode("span",{class:e.normalizeClass(["flex items-center justify-center size-4 rounded border border-gray-300 text-white",B.hidden?"bg-white text-transparent":"bg-blue-600 border-blue-600"])},[B.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("svg",cd,D[3]||(D[3]=[e.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)])))],2)],8,ld))),128))])])],4)):e.createCommentVNode("",!0)]))]))}}),fd={class:"flex flex-col gap-4 mb-[15px]"},md={class:"flex flex-wrap items-center gap-4"},ud={class:"relative"},hd={class:"ml-auto flex items-center gap-2"},gd={class:"overflow-x-auto"},yd={class:"min-w-full relative divide-y-2 divide-gray-200 bg-white min-w-full overflow-auto divide-y-2 divide-gray-200 bg-white text-[12px] text-gray-600"},vd={class:"text-left font-medium text-gray-700"},bd={key:0,class:"py-2 pr-4 min-w-[80px] max-w-[120px] text-right"},kd={class:"divide-y divide-gray-200"},Ed=["href"],Nd={key:2},wd={key:3},xd={key:0,class:"py-2 pr-4 text-right"},_d=["data-action-key"],Cd=["onClick"],Sd=["onClick"],Bd={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},$d={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Td={key:2,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Dd={key:3,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Od={key:0},Ad=["colspan"],Cs=e.defineComponent({__name:"TableWidget",props:{name:{},label:{},component:{},path:{},slot:{},col:{},width:{},html:{},title:{},type:{},token:{},count:{},props:{},items:{}},setup(t){const n=e.getCurrentInstance(),o=e.ref([]),s=e.ref([]),r=new Map,l=t,i=e.ref([]),a=e.ref(""),c=e.ref(""),p=e.ref(""),m=e.ref(1),f=e.ref(10),u=e.ref(0),E=e.ref(0),x=e.ref("id"),_=e.ref("");let w=null,C=0;const I=e.ref(null);async function $(){const d=m.value,g=++C,y=new URLSearchParams,b=p.value.trim();b&&y.set("search",b),y.set("page",String(d)),y.set("limit",String(f.value));const A=`/api/data/${l.token}${y.toString()?`?${y.toString()}`:""}`;let L;try{const le=await fetch(A);if(!le.ok)throw new Error(`Request failed with status ${le.status}`);L=await le.json()}catch(le){g===C&&(o.value=[],E.value=0,u.value=0),console.error("Failed to load table data",le);return}if(g!==C)return;o.value=Array.isArray(L?.rows)?L.rows:[],s.value=k(L?.columns||[]),i.value=Array.isArray(L?.actions)?L.actions:[],a.value=L?.form,c.value=L?.addToken,x.value=typeof L?.pk=="string"&&L.pk?L.pk:x.value,typeof L?.form=="string"&&L.form&&(_.value=L.form.replace(/\.form$/,".table")),_e();const R=Number(L?.total??L?.count??L?.totalCount),se=Number(L?.filtered??L?.filteredCount);u.value=Number.isFinite(R)&&R>0?R:o.value.length,E.value=Number.isFinite(se)&&se>0?se:Math.max(o.value.length,u.value);const ke=Math.max(1,Math.ceil((E.value||o.value.length||1)/f.value));let Ce=d;typeof L?.page=="number"&&L.page>0&&(Ce=L.page),Ce>ke&&(Ce=ke),Ce<1&&(Ce=1);const tn=Ce!==d;if(m.value=Ce,tn&&E.value>0)return $()}const{$notify:D,$confirm:B,$form:H}=n?.appContext?.config?.globalProperties||{};function Z(){if(nt.emitter?.emit){nt.emitter.emit("updateCard");return}if(typeof window<"u"&&typeof window.location?.reload=="function"){window.location.reload();return}$()}async function P(d){typeof H=="function"&&(await H({token:d.token}),Z())}async function M(){typeof H=="function"&&(await H({token:c.value}),Z())}function z(d){B({title:"Підтвердіть дію",type:"error",message:"Ви впевненні що бажаєте видалити даний рядок?",onConfirm:async()=>{const g=await fetch(`/api/table/${d.token}`,{method:"DELETE"});if(!g.ok){const{error:y}=await g.json();D({title:"Помилка",type:"warning",message:y});return}D({title:"Видаленно",message:"Успішно видалено"}),await $()}})}e.onMounted(async()=>{await $(),nt.emitter?.on?.("updateCard",$)});function j(d){return typeof d?.format=="string"?d.format.toLowerCase():""}function k(d){const g=new Map;s.value.forEach(b=>{b?.name&&g.set(b.name,!!b.hidden)});const y=d.map(b=>{const A=g.has(b.name)?g.get(b.name):!!b.hidden;return{...b,hidden:A}});return y.length&&!y.some(b=>!b.hidden)&&(y[0].hidden=!1),y}const T=e.computed(()=>{const d=s.value.filter(g=>!g.hidden);return d.length?d:s.value}),N=e.computed(()=>{const d=[],g=new Set;for(const y of i.value){if(typeof y=="string"){if(y==="view"){const b="row:view";g.has(b)||(d.push({key:b,type:"view",label:"Переглянути",scope:"row",handler:so}),g.add(b));continue}if(y==="edit"){const b="row:edit";g.has(b)||(d.push({key:b,type:"edit",label:"Редагувати",scope:"row",handler:gt}),g.add(b));continue}if(y==="delete"||y==="del"){const b="row:delete";g.has(b)||(d.push({key:b,type:"delete",label:"Видалити",scope:"row",handler:Vn,variant:"danger"}),g.add(b));continue}if(y==="add"){const b="toolbar:add";g.has(b)||(d.push({key:b,type:"add",label:"Додати",scope:"toolbar"}),g.add(b))}continue}if(y&&typeof y=="object"){const b=String(y.name??y.type??"action"),A=String(y.label??y.title??b),L=y.scope==="toolbar"?"toolbar":"row",R=`${L}:${b}`;if(g.has(R))continue;g.add(R),d.push({key:R,type:b,label:A,scope:L,handler:L==="row"?se=>eo(y,se):void 0,variant:y.variant==="danger"?"danger":"default",original:y})}}return d}),O=e.computed(()=>N.value.filter(d=>d.scope==="row"&&typeof d.handler=="function")),G=e.computed(()=>N.value.filter(d=>d.scope==="toolbar")),ae=e.computed(()=>O.value.length>0),Me=e.computed(()=>G.value.some(d=>d.type==="add")),$e=e.computed(()=>o.value),be=e.computed(()=>{const d=E.value||$e.value.length,g=Math.ceil(d/f.value);return g>0?g:1}),we=e.computed(()=>{const d=$e.value.length,g=E.value||d,y=u.value||g;return`Показано ${d} з ${g} (усього ${y})`});function xe(){m.value<be.value&&(m.value+=1,$())}function Jn(){m.value>1&&(m.value-=1,$())}e.watch(s,d=>{d?.length&&(d.some(g=>!g.hidden)||(d[0].hidden=!1))},{deep:!0});function Zn(){w&&clearTimeout(w),_e(),w=setTimeout(()=>{m.value=1,$()},300)}function We(d){const g=x.value||"id",y=d?.token??d?.[g]??d?.id;return y?String(y):""}function Jt(d){const g=T.value[d],y=["py-2",...Ke(g)];d===0&&y.push("pl-4");const b=d===T.value.length-1&&!ae.value;return y.push(b?"pr-4":"pr-5"),y.join(" ")}function Zt(d,g){const y=["py-2",...Ke(g)];j(g)==="badge"&&y.push("center"),d===0&&y.push("pl-4");const b=d===T.value.length-1&&!ae.value;return y.push(b?"pr-4":"pr-5"),y.join(" ")}function Ke(d){const g=[],y=R=>{if(R==null||R==="")return;const se=Number(R);return Number.isFinite(se)&&se>0?`${se}px`:String(R).replace(/\s+/g,"")},b=y(d?.width),A=y(d?.minWidth),L=y(d?.maxWidth);return b?(g.push(`min-w-[${b}]`,`max-w-[${b}]`),g):(g.push(`min-w-[${A??"100px"}]`),g.push(`max-w-[${L??"350px"}]`),g)}function Yt(d){if(!O.value.length)return!1;const g=x.value||"id";return!!(d?.token||d?.[g]||d?.id)}function Xt(d){return I.value===We(d)}function Yn(d){const g=We(d);g&&(I.value=I.value===g?null:g)}function Xn(d,g){const y=We(d);if(y){if(g){r.set(y,g);return}r.delete(y)}}function Qn(d){const g=We(d),y=r.get(g);if(!y)return{};const b=y.getBoundingClientRect();return{top:`${b.bottom+window.scrollY+8}px`,left:`${b.right+window.scrollX-200}px`,width:"auto"}}function _e(){I.value=null}function gt(d){_e(),P(d)}function Vn(d){_e(),z(d)}async function eo(d,g){_e();const y=x.value||"id",b=d.isId?g?.[y]??g?.id:g?.token??g?.[y]??g?.id;if(!b){console.warn("Cannot execute action without identifier",d);return}if(d.form&&typeof d.api=="string"&&d.api&&typeof H=="function"){await no(d,g,b);return}if(d.form&&typeof H=="function"){const A=await yt(d.form,b),L={form:d.form,token:A?.token??g?.token??b,schema:A?.schema,mode:A?.mode??"edit"};A?.data!==void 0&&(L.defaultValue=A.data);try{await H(L),Z()}catch(R){console.error("Failed to execute form action",R)}return}if(typeof d.api=="string"&&d.api){const A=Ge(d.api,b);window.location.href=A;return}g?.token&&typeof H=="function"&&(await H({token:g.token}),Z())}function Ge(d,g){return`${d.endsWith("/")?d:`${d}/`}${g}`}async function yt(d,g){const y=`/api/form/${d}/${g}`;try{const b=await fetch(y);if(!b.ok)throw new Error(`Request failed with status ${b.status}`);return await b.json()}catch(b){console.error("Failed to load form config",b),D({title:"Помилка",type:"warning",message:"Не вдалося отримати дані форми."});return}}async function vt(d){const g=`/api/template/form/${d}`;try{const y=await fetch(g);if(!y.ok)throw new Error(`Request failed with status ${y.status}`);return(await y.json())?.schema}catch(y){console.error("Failed to load form template",y);return}}function to(d){if(d!=null){if(d?.data!==void 0)return d.data;if(d?.defaultValue!==void 0)return d.defaultValue;if(d?.values!==void 0)return d.values;if(typeof d=="object"&&!Array.isArray(d)){const{schema:g,token:y,mode:b,message:A,successMessage:L,...R}=d;if(Object.keys(R).length)return R}}}async function no(d,g,y){const b=Ge(d.api,y),A=(typeof d.method=="string"?d.method:"PUT").toUpperCase();let L;try{const le=await fetch(b);if(!le.ok)throw new Error(`Request failed with status ${le.status}`);L=await le.json()}catch(le){console.error("Failed to load action data",le),Vt("Не вдалося отримати дані форми.");return}const R=typeof d.form=="string"?d.form.replace(/\.table$/,".form"):void 0,se=L?.schema??(R?await vt(R):void 0),ke={mode:L?.mode??"edit"};R&&(ke.form=R),se&&(ke.schema=se);const Ce=to(L);Ce!==void 0&&(ke.defaultValue=Ce);const tn=await H(ke);if(tn)try{const le=await fetch(b,{method:A,headers:{"Content-Type":"application/json"},body:JSON.stringify(tn)});if(!le.ok){const Ds=await Qt(le),xp=Ds?.error??Ds?.message??"Не вдалося зберегти дані.";throw new Error(xp)}oo(`Дані успішно ${ke.value==="add"?"збережено":"оновлено"}`),Z()}catch(le){console.error("Failed to submit action data",le),Vt("Не вдалося зберегти дані.")}}async function Qt(d){try{return await d.json()}catch{return}}function Vt(d){D({title:"Помилка",type:"error",message:d})}function oo(d){D({title:"Успіх",type:"success",message:d})}function so(d){_e();const g=_.value||(a.value?String(a.value).replace(/\.form$/,".table"):""),y=x.value||"id",b=d?.[y]??d?.id??d?.token;if(g&&b){const A=`/card/${g}/${b}`;window.location.href=A;return}if(d?.token&&typeof H=="function"){H({token:d.token,readonly:!0,mode:"view"});return}d?.token&&P(d)}function bt(d){if(!I.value)return;const g=d.target;if(!g)return;const y=g.closest("[data-action-key]");y&&y.getAttribute("data-action-key")===I.value||_e()}e.onMounted(()=>{document.addEventListener("click",bt,!0)}),e.onBeforeUnmount(()=>{w&&clearTimeout(w),document.removeEventListener("click",bt,!0),nt.emitter?.off?.("updateCard",$)});function en(d,g){const b=d?.[`${g.name}_text`];if(Array.isArray(b))return b.length?b.join(", "):"-";if(b!=null&&b!=="")return b;const A=d?.[g.name];return Array.isArray(A)?A.length?A.join(", "):"-":A??"-"}function h(d,g){const b=d?.[`${g.name}_data`];if(b&&typeof b=="object")return{text:b.text??b.label??b.name??b.title??"-",color:b.color,textColor:b.textColor};const A=d?.[`${g.name}_text`]??d?.[g.name];return{text:(Array.isArray(A)?A.join(", "):A)??"-"}}function v(d,g){const y=h(d,g);return y.color?{backgroundColor:y.color,color:y.textColor??"#ffffff"}:{}}function S(d,g){const y=j(g);if(y==="badge")return h(d,g).text;if(y==="select")return en(d,g);if(y==="slot")return"-";if(y==="text")return d?.[g.name]??"-";const b=d?.[`${g.name}_data`];return b!=null&&typeof b!="object"?b:d?.[`${g.name}_text`]??d?.[g.name]??"-"}return(d,g)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",fd,[e.createElementVNode("div",md,[e.createElementVNode("div",ud,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":g[0]||(g[0]=y=>p.value=y),type:"text",class:"w-52 rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Пошук",onInput:Zn},null,544),[[e.vModelText,p.value]])]),e.createElementVNode("div",hd,[e.createVNode(pd,{columns:s.value,"onUpdate:columns":g[1]||(g[1]=y=>s.value=y)},null,8,["columns"]),Me.value&&c.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",onClick:M,class:"inline-flex size-8 items-center justify-center rounded-lg bg-blue-500 text-white shadow-sm transition-colors hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",title:"Додати запис","aria-label":"Додати запис"},g[3]||(g[3]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M5 12h14"}),e.createElementVNode("path",{d:"M12 5v14"})],-1)]))):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",gd,[e.createElementVNode("table",yd,[e.createElementVNode("thead",vd,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(y,b)=>(e.openBlock(),e.createElementBlock("th",{key:y.name,class:e.normalizeClass(Jt(b))},e.toDisplayString(y.ua),3))),128)),ae.value?(e.openBlock(),e.createElementBlock("th",bd," Дії ")):e.createCommentVNode("",!0)])]),e.createElementVNode("tbody",kd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($e.value,y=>(e.openBlock(),e.createElementBlock("tr",{class:"bg-white odd:bg-gray-50",key:y.id??JSON.stringify(y)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(b,A)=>(e.openBlock(),e.createElementBlock("td",{key:b.name,class:e.normalizeClass([Zt(A,b),"truncate"])},[b.link?(e.openBlock(),e.createElementBlock("a",{key:0,href:b.link.replace("{{id}}",y.id),class:"font-medium cursor-pointer text-start text-wrap text-cyan-800 decoration-2 focus:outline-none focus:underline hover:text-cyan-700 hover:underline"},e.toDisplayString(S(y,b)),9,Ed)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[j(b)==="slot"&&b.slot?.content?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Yc)(b.slot.content)),{key:0,data:y,row:y,column:b,value:y?.[b.name]},null,8,["data","row","column","value"])):j(b)==="badge"?(e.openBlock(),e.createElementBlock("span",{key:1,class:"items-center px-2 py-1 rounded-full text-xs font-semibold text-center justify-center flex",style:e.normalizeStyle(v(y,b))},e.toDisplayString(h(y,b).text),5)):j(b)==="select"?(e.openBlock(),e.createElementBlock("span",Nd,e.toDisplayString(en(y,b)),1)):(e.openBlock(),e.createElementBlock("span",wd,e.toDisplayString(S(y,b)),1))],64))],2))),128)),ae.value?(e.openBlock(),e.createElementBlock("td",xd,[Yt(y)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"relative inline-flex","data-action-key":We(y),ref_for:!0,ref:b=>Xn(y,b)},[e.createElementVNode("button",{type:"button",class:"inline-flex size-7 items-center justify-center rounded-md border border-gray-200 text-gray-500 transition-colors hover:bg-gray-50 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500",onClick:e.withModifiers(b=>Yn(y),["stop"])},g[4]||(g[4]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"1"}),e.createElementVNode("circle",{cx:"12",cy:"5",r:"1"}),e.createElementVNode("circle",{cx:"12",cy:"19",r:"1"})],-1)]),8,Cd),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[Xt(y)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed z-50 w-40 overflow-hidden rounded-lg border border-gray-200 bg-white py-1 shadow-lg",style:e.normalizeStyle(Qn(y)),onClick:g[2]||(g[2]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,b=>(e.openBlock(),e.createElementBlock("button",{key:b.type,type:"button",class:e.normalizeClass(["flex w-full items-center gap-2 px-4 py-2 text-sm transition-colors",b.variant==="danger"?"text-red-600 hover:bg-red-50":"text-gray-700 hover:bg-gray-50"]),onClick:A=>b.handler?.(y)},[b.type==="view"?(e.openBlock(),e.createElementBlock("svg",Bd,g[5]||(g[5]=[e.createElementVNode("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"12",r:"3"},null,-1)]))):b.type==="edit"?(e.openBlock(),e.createElementBlock("svg",$d,g[6]||(g[6]=[e.createElementVNode("path",{d:"M18 2a2.828 2.828 0 1 1 4 4L7 21l-4 1 1-4Z"},null,-1)]))):b.type==="delete"?(e.openBlock(),e.createElementBlock("svg",Td,g[7]||(g[7]=[e.createElementVNode("path",{d:"M3 6h18"},null,-1),e.createElementVNode("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"},null,-1),e.createElementVNode("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"},null,-1),e.createElementVNode("line",{x1:"10",x2:"10",y1:"11",y2:"17"},null,-1),e.createElementVNode("line",{x1:"14",x2:"14",y1:"11",y2:"17"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",Dd,g[8]||(g[8]=[e.createElementVNode("path",{d:"M12 8v8"},null,-1),e.createElementVNode("path",{d:"M8 12h8"},null,-1)]))),e.createTextVNode(" "+e.toDisplayString(b.label),1)],10,Sd))),128))],4)):e.createCommentVNode("",!0)]))],8,_d)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),128)),$e.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",Od,[e.createElementVNode("td",{colspan:T.value.length+(ae.value?1:0),class:"py-6 text-center text-gray-500"}," Немає записів для відображення ",8,Ad)]))])])]),e.createVNode(nd,{"current-page":m.value,"total-pages":be.value,label:we.value,onPrevious:Jn,onNext:xe},null,8,["current-page","total-pages","label"])]))}}),Ld={class:"p-[20px]"},Id={class:"flex gap-[6px] mb-5"},Md={class:"vs-form-text relative bg-white rounded-lg flex-grow"},Pd={class:"grid p-3 lg:gap-x-3 md:gap-x-6 md:p-5 grid-cols-6"},Rd={class:"mt-2 text-sm font-medium text-gray-800 dark:text-neutral-200"},Fd={class:"space-y-8"},jd={key:0},zd={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},Hd=["onClick"],Ud={class:"md:col-span-2"},qd={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},Wd={class:"text-sm text-gray-500 dark:text-neutral-500"},Kd={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},Gd=["checked","onChange"],Jd={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},Zd={class:"md:col-span-2"},Yd={class:"font-semibold text-gray-800 dark:text-neutral-200"},Xd=["onClick"],Qd={class:"md:col-span-2"},Vd={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},ep={class:"text-sm text-gray-500 dark:text-neutral-500"},tp={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},np=["checked","onChange"],Kt=e.defineComponent({__name:"GroupInterfaceWidget",props:{data:{},id:{}},setup(t){const n=t,o=e.ref(""),s=["view","add","edit","del"],r=e.ref({});e.onMounted(async()=>{const _=await(await fetch(`/api/access-group/${n.id}?tab=vs-group-interface`)).json();_.routes&&_.routes.forEach(w=>{r.value[w.path]=new Set(w.actions)})});const l=(x,_)=>r.value[x]?.has(_)??!1,i=(x,_)=>{r.value[x]||(r.value[x]=new Set),r.value[x].has(_)?r.value[x].delete(_):r.value[x].add(_)},a=(x,_)=>{x.forEach(w=>{w.path&&(r.value[w.path]||(r.value[w.path]=new Set),r.value[w.path].has(_)?r.value[w.path].delete(_):r.value[w.path].add(_))})},c=e.computed(()=>Object.entries(r.value).map(([x,_])=>({path:x,actions:Array.from(_)})).filter(x=>x.actions.length)),p=async()=>{await fetch(`/api/access-group/${n.id}?tab=vs-group-interface`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({routes:c.value})}),nt.notify({title:"Success!",message:"Permissions saved."})},m=()=>{r.value={}},f=x=>{if(!o.value.trim())return x;const _=o.value.toLowerCase();return x.filter(w=>w.ua.toLowerCase().includes(_)||w.path&&w.path.toLowerCase().includes(_))},u=e.computed(()=>f(n.data.routers.filter(x=>!x.menu))),E=e.computed(()=>n.data.routers.filter(x=>x.menu).map(x=>({...x,menu:f(x.menu||[])})).filter(x=>x.menu&&x.menu.length>0));return(x,_)=>(e.openBlock(),e.createElementBlock("div",Ld,[e.createElementVNode("div",Id,[e.createElementVNode("div",Md,[_[1]||(_[1]=e.createElementVNode("i",{class:"absolute bottom-2/4 translate-y-2/4 text-gray-500 cursor-pointer ti"},null,-1)),e.withDirectives(e.createElementVNode("input",{type:"text",placeholder:"Пошук","onUpdate:modelValue":_[0]||(_[0]=w=>o.value=w),class:"bg-white h-[38px] text-sm py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,512),[[e.vModelText,o.value]])]),e.createElementVNode("button",{onClick:m,class:"inline-flex items-center px-3 py-2 text-sm font-medium duration-300 bg-white border rounded-lg gap-x-2 hover:bg-gray-100"}," Скинути всі "),e.createElementVNode("button",{onClick:p,class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"}," Зберегти ")]),e.createElementVNode("div",Pd,[_[2]||(_[2]=e.createElementVNode("div",{class:"self-center col-span-2"},[e.createElementVNode("h2",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Групи")],-1)),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(s,(w,C)=>e.createElementVNode("div",{class:"col-span-1 text-center",key:C},[e.createElementVNode("h3",Rd,e.toDisplayString(w),1)])),64))]),e.createElementVNode("div",Fd,[u.value.length?(e.openBlock(),e.createElementBlock("div",jd,[e.createElementVNode("ul",zd,[_[3]||(_[3]=e.createElementVNode("li",{class:"md:col-span-2"},[e.createElementVNode("h3",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Без категорії")],-1)),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(s,(w,C)=>e.createElementVNode("li",{key:C,class:"md:block md:col-span-1 md:text-center"},[e.createElementVNode("button",{type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline",onClick:I=>a(u.value,s[C])}," Toggle all ",8,Hd)])),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(w,C)=>(e.openBlock(),e.createElementBlock("ul",{key:"uncat-"+C,class:"grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3 grid-cols-6"},[e.createElementVNode("li",Ud,[e.createElementVNode("p",qd,e.toDisplayString(w.ua),1),e.createElementVNode("p",Wd,e.toDisplayString(w.path),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(s,(I,$)=>e.createElementVNode("li",{key:$,class:"col-span-1"},[e.createElementVNode("div",Kd,[e.createElementVNode("input",{type:"checkbox",checked:l(w.path,I),onChange:D=>i(w.path,I),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,Gd)])])),64))]))),128))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(w,C)=>(e.openBlock(),e.createElementBlock("div",{key:C,class:"space-y-5"},[e.createElementVNode("ul",Jd,[e.createElementVNode("li",Zd,[e.createElementVNode("h3",Yd,e.toDisplayString(w.ua),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(s,(I,$)=>e.createElementVNode("li",{key:$,class:"md:block md:col-span-1 md:text-center"},[e.createElementVNode("button",{type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline",onClick:D=>a(w.menu,s[$])}," Toggle all ",8,Xd)])),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.menu,(I,$)=>(e.openBlock(),e.createElementBlock("ul",{key:$,class:"grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3 grid-cols-6"},[e.createElementVNode("li",Qd,[e.createElementVNode("p",Vd,e.toDisplayString(I.ua),1),e.createElementVNode("p",ep,e.toDisplayString(I.path),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(s,(D,B)=>e.createElementVNode("li",{key:B,class:"col-span-1"},[e.createElementVNode("div",tp,[e.createElementVNode("input",{type:"checkbox",checked:l(I.path,D),onChange:H=>i(I.path,D),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,np)])])),64))]))),128))]))),128))])]))}}),qe={"vs-widget-map":_t,"vs-widget-comments":Et,"vs-widget-history":Nt,"vs-widget-gallery":xt,"vs-widget-file":wt,"vs-widget-list":ln,"vs-widget-table":Cs,"vs-group-interface":Kt};function Ss(t){if(t==null)return null;const n=Number(t);return Number.isFinite(n)?Math.max(1,Math.min(12,Math.floor(n))):null}function Bs(t){const n={...t};return Array.isArray(t.items)&&(n.items=t.items.map(o=>Bs(o))),n}function op(t,n=12){if(!t.length)return;const o=[],s=[];t.forEach(c=>{const p=Ss(c.col);p?(c.col=p,o.push({item:c,span:p})):s.push(c)});const r=o.reduce((c,p)=>c+p.span,0);let l=n-r;if(s.length===0)return;l<=0&&(l=n);const i=Math.max(1,Math.floor(l/s.length));let a=Math.max(0,l-i*s.length);s.forEach(c=>{let p=i;a>0&&(p+=1,a-=1),c.col=Math.max(1,Math.min(12,p))})}function Gt(t,n=12){if(!Array.isArray(t)||!t.length)return[];const o=t.map(s=>Bs(s));return o.forEach(s=>{Array.isArray(s.items)&&s.items.length&&(s.items=Gt(s.items,12))}),op(o,n),o}function $s(t){const n=Ss(t);return n?n>=12?["md:col-span-12","lg:col-span-12"]:[`md:col-span-${n}`,`lg:col-span-${n}`]:[]}const sp={class:"text-lg font-semibold text-gray-900"},rp=["innerHTML"],ip={key:0,class:"grid grid-cols-12 gap-4"},lp={key:0,class:"mb-4 pb-2 border-b border-gray-200"},ap={class:"text-lg font-semibold text-gray-900"},cp=["innerHTML"],ut=e.defineComponent({__name:"CardItem",props:{items:{},type:{},col:{},data:{},html:{},title:{},hideTitle:{type:Boolean},styling:{},name:{},label:{},component:{},slot:{},id:{},className:{},style:{}},setup(t){const n=t,o=e.computed(()=>{if(!n.col)return{};const p=Math.max(1,Math.min(12,Number(n.col)));return{[`md:col-span-${p}`]:!0,[`lg:col-span-${p}`]:!0}}),s=e.computed(()=>Gt(n.items));function r(p){const m=["col-span-12"],f=$s(p.col);return f.length&&m.push(...f),m}function l(p){return qe[p]||p}function i(p,m){if(!p||typeof m!="string"||!m)return{found:!1,value:void 0};const f=m.split(".");let u=p;for(const E of f){if(u==null||typeof u!="object"&&!Array.isArray(u))return{found:!1,value:void 0};if(!(E in u))return{found:!1,value:void 0};u=u[E]}return{found:!0,value:u}}const a=function(p={}){const m={...p};return Object.entries(m).forEach(([f,u])=>{if(f!=="props"&&typeof u=="string"){const E=i(n.data,u);E.found&&(m[f]=E.value)}}),p.props&&typeof p.props=="object"&&Object.entries(p.props).forEach(([f,u])=>{if(typeof u=="string"){const E=i(n.data,u);m[f]=E.found?E.value:u}else m[f]=u}),delete m.props,m},c=e.computed(()=>{const p={};return n.col&&(p.col=n.col),p});return(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([[o.value,p.styling?.classItem],"w-full bg-gray-50 rounded-lg p-4 col-span-12"])},[!p.hideTitle&&p.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["mb-4 pb-2 border-b border-gray-200",p.styling?.classItemTitle])},[e.createElementVNode("h3",sp,e.toDisplayString(p.title),1)],2)):e.createCommentVNode("",!0),p.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:p.html,class:"text-gray-900 leading-relaxed"},null,8,rp)):p.type?.includes("tabs")?(e.openBlock(),e.createBlock(ht,{key:2,view:p.type,panels:p.items,data:p.data,styling:p.styling},null,8,["view","panels","data","styling"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[s.value.length?(e.openBlock(),e.createElementBlock("div",ip,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(f,u)=>(e.openBlock(),e.createElementBlock("div",{key:f.name||f.component||u,class:e.normalizeClass(r(f))},[f.title||f.label?(e.openBlock(),e.createElementBlock("div",lp,[e.createElementVNode("h3",ap,e.toDisplayString(f.title||f.label),1)])):e.createCommentVNode("",!0),f.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:f.html,class:"text-gray-900 leading-relaxed"},null,8,cp)):f.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(f.component)),e.mergeProps({key:2,ref_for:!0},{geom:p.data.geom,id:p.data.id,...c.value,...a(f),data:p.data},{class:"w-full"}),null,16)):e.renderSlot(p.$slots,"default",{key:3})],2))),128))])):e.createCommentVNode("",!0)],64))],2))}}),dp={class:"grid grid-cols-12 gap-[20px]"},pp={key:0,class:"col-span-4"},fp=["innerHTML"],mp=["onClick"],up=["innerHTML"],hp={key:1,class:"flex w-full"},gp={class:"flex flex-col w-56 border-r border-gray-200 bg-gray-50 relative"},yp=["onClick"],vp={key:0,class:"absolute right-3 top-1/2 -translate-y-1/2 transition-all duration-300"},bp={class:"flex-1 p-4"},kp=["innerHTML"],Ep={class:"grid grid-cols-12 gap-4"},Np={key:3,class:"w-full h-full"},ht=e.defineComponent({__name:"Card",props:{panels:{default:()=>[]},data:{default:()=>({})},view:{default:"plain"},styling:{},classWrapper:{default:""},classPanel:{},normalizeTabs:{type:Boolean,default:!0},backgroundClass:{},tabContentWrapperClass:{},tabPanelClass:{},id:{},className:{},style:{}},setup(t){const n=t;function o(){const k=typeof window<"u"?window:globalThis,T="__vsCardAnonymousCounter__",N=k[T]??0;return k[T]=N+1,N===0?"tab":`tab${N}`}const s=e.ref(0),r=e.ref([]);let l=!1;const i=e.ref(n.id??o());e.watch(()=>n.id,k=>{k&&(i.value=k)});const a=new Map,c=e.computed(()=>n.view==="tabs"||n.view==="vertical-tabs");e.provide("vsCardTabsContext",c);function p(k,T){const N=T?.path;return N?(a.has(N)||a.set(N,e.defineAsyncComponent(()=>import(N))),a.get(N)):typeof k=="string"&&qe[k]?qe[k]:T?.component&&qe[T.component]?qe[T.component]:T?.name&&qe[T.name]?qe[T.name]:k}function m(k){return k.forEach(T=>{T.type&&(T.view=T.type)}),r.value=k.filter(T=>T.type==="pin"),k.filter(T=>T.type!=="pin")}const f=e.computed(()=>{let k;return n.panels&&n.panels.length>0?k=n.normalizeTabs?m(n.panels):n.panels:n.data&&Array.isArray(n.data)&&(k=n.data.filter(N=>N.type.includes("tabs"))[0]?.items),Gt(k,12)}),u=e.computed(()=>i.value),E=e.computed(()=>{let k;return n.panels&&n.panels.length>0?k=n.normalizeTabs?m(n.panels):n.panels:n.data&&Array.isArray(n.data)&&(k=n.data),Gt(k,12)}),x=e.computed(()=>({[`view-${n.view}`]:!0}));function _(k,T){if(!k||typeof T!="string"||!T)return{found:!1,value:void 0};const N=T.split(".");let O=k;for(const G of N){if(O==null||typeof O!="object"&&!Array.isArray(O))return{found:!1,value:void 0};if(!(G in O))return{found:!1,value:void 0};O=O[G]}return{found:!0,value:O}}const w=k=>{const T={...k};return Object.entries(T).forEach(([N,O])=>{if(N!=="props"&&typeof O=="string"){const G=_(n.data,O);G.found&&(T[N]=G.value)}}),k.props&&typeof k.props=="object"&&Object.entries(k.props).forEach(([N,O])=>{if(typeof O=="string"){const G=_(n.data,O);T[N]=G.found?G.value:O}else T[N]=O}),delete T.props,n.data&&(T.data=n.data),T};function C(k){const T=["col-span-12"],N=$s(k.col);return N.length&&T.push(...N),T}const I=e.ref([]),$=e.ref([]),D=e.ref([]);function B(k,T){k&&k instanceof HTMLElement&&(I.value[T]=k)}function H(){$.value=I.value.map(k=>k.offsetWidth),D.value=I.value.map(k=>k.offsetLeft)}function Z(){if(typeof window>"u")return null;const k=u.value;if(!k)return null;const N=new URL(window.location.href).searchParams.get(k);if(N===null)return null;const O=Number.parseInt(N,10);return Number.isNaN(O)?null:O}function P(k){if(typeof window>"u")return;const T=u.value;if(!T)return;const N=new URL(window.location.href);k<=0?N.searchParams.delete(T):N.searchParams.set(T,String(k));const O=window.history.state??{};window.history.replaceState(O,document.title,N)}function M(){if(l)return;const k=Z();if(k===null||!f.value.length)return;const T=Math.min(Math.max(k,0),f.value.length-1);T!==k&&P(T),T!==s.value&&(s.value=T),l=!0}function z(){l=!1,M()}let j=null;return e.onMounted(()=>{e.nextTick(()=>{M(),H()}),typeof window<"u"&&window.addEventListener("popstate",z),j=new ResizeObserver(()=>H()),j.observe(document.body)}),e.onBeforeUnmount(()=>{j?.disconnect(),typeof window<"u"&&window.removeEventListener("popstate",z)}),e.watch(s,k=>{e.nextTick(()=>{H()}),P(k)}),e.watch(f,()=>{l=!1,M()}),(k,T)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(k.classWrapper||x.value)},[e.createElementVNode("div",dp,[r.value.length!==0?(e.openBlock(),e.createElementBlock("div",pp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value[0].items,(N,O)=>(e.openBlock(),e.createElementBlock("div",{key:N.name||O,class:"w-full bg-gray-50 rounded-lg p-4 col-span-12 m-1 mb-3"},[N.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:N.html,class:"text-gray-900 leading-relaxed"},null,8,fp)):N.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(N.component,N)),e.mergeProps({key:1,ref_for:!0},N.component==="Card"?N:w(N),{id:k.data.id,class:["w-full h-full",k.styling?.classItem]}),null,16,["id","class"])):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(r.value.length!==0?"col-span-8":"col-span-12")},[k.view==="tabs"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["overflow-hidden w-full",k.styling?.classTabWrapper])},[e.createElementVNode("div",{class:e.normalizeClass(["flex border-b border-gray-200 bg-gray-50 relative gap-4 my-6",k.styling?.classTabHeader])},[$.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute bottom-0 h-[2px] bg-blue-600 transition-all duration-300",style:e.normalizeStyle({width:$.value[s.value]+"px",left:D.value[s.value]+"px"})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(N,O)=>(e.openBlock(),e.createElementBlock("button",{key:N.name||O,ref_for:!0,ref:G=>B(G,O),onClick:G=>s.value=O,class:e.normalizeClass(["px-1 py-2 text-sm font-medium transition-colors",s.value===O?"text-blue-600 border-blue-600 border-b-2 ":"text-gray-600 hover:text-gray-800"])},e.toDisplayString(N.title||N.label||N.name||`Tab ${O+1}`),11,mp))),128))],2),e.createElementVNode("div",{class:e.normalizeClass([k.styling?.classTabContent,"p-1"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(N,O)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:N.name||O,class:e.normalizeClass(["transition-all duration-300 ease-in-out",s.value===O?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",k.classPanel||"w-full border-gray-100"])},[N.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:N.html,class:"text-gray-900 leading-relaxed"},null,8,up)):k.$slots[`tab-${O}`]?e.renderSlot(k.$slots,`tab-${O}`,{key:1,item:N,data:k.data}):N.items?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ut),e.mergeProps({key:2,ref_for:!0},w(N),{items:N.items,"hide-title":!0,class:["w-full h-full",k.styling?.classItem],styling:k.styling}),null,16,["items","class","styling"])):N.component||N.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(N.component||N.name,N)),e.mergeProps({key:3,ref_for:!0},N.component==="Card"?N:w(N),{styling:k.styling,id:k.data.id,class:["w-full h-full",k.styling?.classItem]}),null,16,["styling","id","class"])):e.renderSlot(k.$slots,N.slot||`tab-${O}`,{key:4,item:N,data:k.data})],2)),[[e.vShow,s.value===O]])),128))],2)],2)):k.view==="vertical-tabs"?(e.openBlock(),e.createElementBlock("div",hp,[e.createElementVNode("div",gp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(N,O)=>(e.openBlock(),e.createElementBlock("button",{key:N.name||O,onClick:G=>s.value=O,class:e.normalizeClass(["relative px-1 py-4 text-sm font-medium text-left transition-colors duration-300",s.value===O?"text-blue-600 bg-white":"text-gray-600 hover:text-gray-800 hover:bg-gray-100"])},[e.createTextVNode(e.toDisplayString(N.title||N.label||N.name||`Tab ${O+1}`)+" ",1),s.value===O?(e.openBlock(),e.createElementBlock("span",vp,T[0]||(T[0]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"remixicon text-blue-600 rounded-full bg-white shadow scale-90 opacity-100 transition ease-out"},[e.createElementVNode("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"})],-1)]))):e.createCommentVNode("",!0)],10,yp))),128))]),e.createElementVNode("div",bp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(N,O)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:N.name||O,class:e.normalizeClass(["transition-all duration-300 ease-in-out",s.value===O?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",k.classPanel||"w-full border-gray-100 py-2"])},[N.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:N.html,class:"text-gray-900 leading-relaxed"},null,8,kp)):k.$slots[`tab-${O}`]?e.renderSlot(k.$slots,`tab-${O}`,{key:1,item:N,data:k.data}):N.items?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ut),e.mergeProps({key:2,ref_for:!0},w(N),{items:N.items,"hide-title":!0,class:["w-full h-full",k.styling?.classItem],styling:k.styling}),null,16,["items","class","styling"])):N.component||N.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(N.component||N.name,N)),e.mergeProps({key:3,ref_for:!0},N.component==="Card"?N:w(N),{id:k.data.id,class:["w-full h-full",k.styling?.classItem]}),null,16,["id","class"])):e.renderSlot(k.$slots,N.slot||`tab-${O}`,{key:4,item:N,data:k.data})],2)),[[e.vShow,s.value===O]])),128))])])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(k.styling?.classPlain||"p-1 w-full")},[e.createElementVNode("div",Ep,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(N,O)=>(e.openBlock(),e.createElementBlock("div",{key:N.name||N.component||O,class:e.normalizeClass(C(N))},[k.$slots[`panel-${O}`]?e.renderSlot(k.$slots,`panel-${O}`,{key:0,item:N,data:k.data}):N.items||N.html?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ut),e.mergeProps({key:1,ref_for:!0},w(N),{items:N.items||[],class:["w-full h-full",k.styling?.classItem],styling:k.styling}),null,16,["items","class","styling"])):N.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(N.component,N)),e.mergeProps({key:2,ref_for:!0},w(N),{class:["w-full h-full",[k.styling?.classItem]],styling:k.styling}),null,16,["class","styling"])):(e.openBlock(),e.createElementBlock("div",Np,[e.renderSlot(k.$slots,N.slot||`panel-${O}`,{item:N,data:k.data})]))],2))),128))])],2))],2)])],2))}}),wp=["onClick"],Ts=Pe(e.defineComponent({__name:"CopyNotification",setup(t,{expose:n}){const o=e.ref([]);let s=1;const r=()=>{if(o.value.length>=10){const a=o.value[0];clearTimeout(a.timer),o.value.shift()}const i={id:s++,timer:setTimeout(()=>{l(i.id)},1500)};o.value.push(i)},l=i=>{const a=o.value.findIndex(c=>c.id===i);if(a!==-1){const c=o.value[a];clearTimeout(c.timer),o.value.splice(a,1)}};return n({addNotification:r}),e.onUnmounted(()=>{o.value.forEach(i=>{clearTimeout(i.timer)})}),(i,a)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.TransitionGroup,{name:"notification",tag:"div",class:"fixed top-4 right-4 z-50 space-y-2"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,c=>(e.openBlock(),e.createElementBlock("div",{key:c.id,class:"bg-green-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center gap-3 min-w-64 max-w-sm"},[e.createVNode(e.unref(js),{class:"h-5 w-5 text-green-100 flex-shrink-0"}),a[0]||(a[0]=e.createElementVNode("div",{class:"flex-1"},[e.createElementVNode("p",{class:"font-medium text-sm"},"Ссылка скопирована!"),e.createElementVNode("p",{class:"text-xs text-green-100 opacity-90"},"Файл добавлен в буфер обмена")],-1)),e.createElementVNode("button",{onClick:p=>l(c.id),class:"text-green-100 hover:text-white transition-colors flex-shrink-0"},[e.createVNode(e.unref(sn),{class:"h-4 w-4"})],8,wp)]))),128))]),_:1})]))}}),[["__scopeId","data-v-d1ac6329"]]);ht.install=function(t){t.component("vs-widget-file",wt),t.component("vs-widget-comments",Et),t.component("vs-widget-history",Nt),t.component("vs-widget-gallery",xt),t.component("vs-widget-map",_t),t.component("vs-group-interface",Kt),t.component("CommentsWidget",Et),t.component("HistoryWidget",Nt),t.component("GalleryWidget",xt),t.component("FilesWidget",wt),t.component("MapWidget",_t),t.component("Card",ht),t.component("CardItem",ut),t.component("DescriptionListWidget",ln),t.component("CopyNotification",Ts),t.component("GroupInterfaceWidget",Kt)},V.Card=ht,V.CardItem=ut,V.CommentsWidget=Et,V.CopyNotification=Ts,V.DescriptionListWidget=ln,V.FilesWidget=wt,V.GalleryWidget=xt,V.GroupInterfaceWidget=Kt,V.HistoryWidget=Nt,V.MapWidget=_t,V.TableWidget=Cs,V.default=ht,Object.defineProperties(V,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|