@opengis/gis 0.2.170 → 0.2.172
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/{CardIcon-DXaESte6.js → CardIcon-DrNd-2PW.js} +1 -1
- package/dist/{EntityTablePage-BwyMNhrm.js → EntityTablePage-CERD3KWs.js} +1 -1
- package/dist/{ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-DrHke0pk.js → ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-3IWWtgKt.js} +1 -1
- package/dist/{HeaderActions.vue_vue_type_script_setup_true_lang-9Rm8Dhc4.js → HeaderActions.vue_vue_type_script_setup_true_lang-D_BESZDN.js} +1 -1
- package/dist/{MapSettings-E1aNltts.js → MapSettings-Dlo25naH.js} +1 -1
- package/dist/{RastersTablePage-CJblEi8a.js → RastersTablePage-BB5DAQ9o.js} +1 -1
- package/dist/{cartocss-Dv2QILZ2.js → cartocss-DmNfkX6X.js} +5 -5
- package/dist/{import-utils-CL-V2wSj.js → import-utils-Dp6H-Ajf.js} +1 -1
- package/dist/{index-Bi60lcRm.js → index-BaB3A3Tb.js} +10 -10
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/{raster-nn-sOUb9.js → raster-GtCFqtk-.js} +3 -3
- package/dist/{register-CjHXBGr5.js → register-BQEx0elz.js} +3 -3
- package/dist/{service-l3Csdnxm.js → service-CgO3RsDo.js} +5 -5
- package/dist/{vs-datatable-CJlE3-mz.js → vs-datatable-B3hGBtGc.js} +2 -3
- package/module/gis/card/gis.metadata.table/index.yml +22 -22
- package/module/gis/card/gis.rasters.table/index.yml +11 -11
- package/module/gis/card/gis.registers.table/index.yml +23 -23
- package/module/gis/card/gis.services.table/index.yml +25 -25
- package/module/gis/cls/bool.yes_no.json +12 -12
- package/module/gis/cls/encoding.json +14 -14
- package/module/gis/cls/geom_type.json +14 -14
- package/module/gis/cls/gis.column_type.json +34 -34
- package/module/gis/cls/gis.column_view_type.json +26 -26
- package/module/gis/cls/gis.filter_type.json +22 -22
- package/module/gis/cls/language.json +10 -10
- package/module/gis/cls/meta.service_type.json +42 -42
- package/module/gis/cls/ogc.service.json +21 -21
- package/module/gis/cls/source_type.json +10 -10
- package/module/gis/cls/standarts.json +6 -6
- package/module/gis/cls/topic_category.json +106 -106
- package/module/gis/cls/update_frequency.json +29 -29
- package/module/gis/cls/view.json +21 -21
- package/module/gis/form/feedback.answer.form.json +10 -10
- package/module/gis/form/gis.cartocss.form.json +64 -64
- package/module/gis/form/gis.group_list.form.json +17 -17
- package/module/gis/form/gis.maps.form.json +61 -61
- package/module/gis/form/gis.metadata.form.json +240 -240
- package/module/gis/form/gis.metadata_new.form.json +195 -195
- package/module/gis/form/gis.ogc_service.form.json +51 -51
- package/module/gis/form/gis.rasters.form.json +76 -76
- package/module/gis/form/gis.registers.form.json +124 -124
- package/module/gis/form/gis.registers_column.form.json +84 -84
- package/module/gis/form/gis.registers_filter.form.json +65 -65
- package/module/gis/form/gis.services.form.json +111 -111
- package/module/gis/form/gis.services_attributes.form.json +75 -75
- package/module/gis/form/gis.services_filter.form.json +65 -65
- package/module/gis/menu.json +43 -43
- package/module/gis/select/admin.cls.name.sql +9 -9
- package/module/gis/select/layer_list.sql +7 -7
- package/module/gis/select/layer_list_text.sql +7 -7
- package/module/gis/select/pg.column_name.geometry.sql +12 -12
- package/module/gis/select/pg.columns.parent.sql +6 -6
- package/module/gis/select/pg.table_name.sql +17 -17
- package/module/gis/select/service_id.sql +1 -1
- package/module/gis/select/srid.sql +7 -7
- package/module/gis/table/gis.cartocss.table.json +74 -74
- package/module/gis/table/gis.group_list.table.json +58 -58
- package/module/gis/table/gis.maps.table.json +110 -110
- package/module/gis/table/gis.metadata.table.json +70 -70
- package/module/gis/table/gis.metadata_new.table.json +137 -137
- package/module/gis/table/gis.ogc_service.table.json +100 -100
- package/module/gis/table/gis.rasters.table.json +113 -113
- package/module/gis/table/gis.registers.table.json +143 -143
- package/module/gis/table/gis.services.table.json +120 -120
- package/module/gis/table/site.gis.registers.table.json +88 -88
- package/module/gis/table/site.gis.services.table.json +106 -106
- package/module/gis/templates/ISO19136_2017_gml_template.xml +330 -330
- package/module/gis/tokens.yml +5 -5
- package/module/permissions/form/permissions.users.form.json +151 -151
- package/module/permissions/table/gis.permissions.table.json +97 -97
- package/package.json +1 -1
- package/server/plugins/mapnik/funcs/checkRasterFile.js +1 -1
- package/server/routes/registers/functions/map.registry.js +20 -12
- package/utils.js +3 -3
package/dist/index.umd.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`)});return}const f=await fetch("/api/table/"+l.value,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o.value)});if(!f.ok){Ce.notify({type:"error",title:"Error",message:`Error code: ${f.status}`});return}await f.json(),Ce.notify({title:"Success!",message:"Object created."}),s.back()}return e.onMounted(async()=>{const h=d.entityKey||String(i.name??"").split("-")[0],f=await fetch(`/api/form/gis.${h}.table`).then(b=>b.json());l.value=f.token,c.value=f.id,r.value=f.schema,document.title=g.value}),(h,f)=>{const b=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(an,{variant:"form"},e.createSlots({breadcrumbs:e.withCtx(()=>[p.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(b,{to:p.value,class:"text-gray-500 hover:text-gray-700"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]),_:1},8,["to"]),e.createElementVNode("span",kb,[e.createVNode(e.unref(ge.LucideChevronRight),{size:16,class:"shrink-0"})])],64)):e.createCommentVNode("",!0),f[2]||(f[2]=e.createElementVNode("span",{class:"text-gray-900 font-semibold"},"Створення",-1))]),title:e.withCtx(()=>[e.createElementVNode("div",wb,[e.createElementVNode("button",{type:"button",class:"p-0 m-0 border-0 bg-transparent cursor-pointer text-inherit hover:opacity-80",onClick:y,"aria-label":"Назад"},[e.createVNode(e.unref(ge.ArrowLeft),{size:20,class:"shrink-0"})]),e.createElementVNode("span",null,e.toDisplayString(a.value||"Створення"),1)])]),actions:e.withCtx(()=>[e.createElementVNode("button",{class:"cursor-pointer flex items-center px-3 py-2 text-sm font-medium text-gray-800 duration-300 bg-white border border-gray-100 rounded-lg shadow gap-x-2 focus:outline-none hover:bg-gray-50 hover:border-gray-100",onClick:y}," Назад "),e.createElementVNode("button",{onClick:k,class:"cursor-pointer inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 hover:bg-blue-700 border border-transparent rounded-lg gap-x-2 hover:text-white"}," Зберегти ")]),_:2},[m.value?{name:"description",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value),1)]),key:"0"}:void 0]),1024),e.createElementVNode("div",_b,[e.createElementVNode("div",Eb,[e.createElementVNode("div",Cb,[e.createElementVNode("div",Nb,[r.value?(e.openBlock(),e.createBlock(e.unref(n),{key:0,values:o.value,"onUpdate:values":f[0]||(f[0]=x=>o.value=x),form:u.value,"onUpdate:form":f[1]||(f[1]=x=>u.value=x),schema:r.value,style:{primaryColor:"blue"},formId:c.value},null,8,["values","form","schema","formId"])):e.createCommentVNode("",!0)])])])])],64)}}})},Symbol.toStringTag,{value:"Module"})),Vb={class:"mx-1"},Bb={class:"mx-1"},$b={class:"flex items-center gap-2 mt-[0.4rem]"},Sb={class:"flex-1 px-4 sm:px-6 pb-4 overflow-y-auto"},vb={class:"bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden"},Lb={class:"w-full relative overflow-auto p-5 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},Tb={class:"vs-form w-full"},An=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"EntityEditPage",props:{entityKey:{default:""}},setup(t){const n=e.defineAsyncComponent(()=>import("@opengis/form")),o=e.ref({}),r=e.ref(null),l=e.ref(null),s=e.ref({}),i=e.ref(""),d=qe.useRoute(),u=qe.useRouter(),p=t.entityKey||String(d.name??"").split("-")[0],{id:a}=d.params,g=e.computed(()=>d.path.replace(/\/edit\/[^/]+$/,"").replace(/\/[^/]+\/edit$/,"")),m=e.computed(()=>a?`${g.value}/${a}`:g.value||"/"),y=e.computed(()=>{var b;return((b=u.resolve(g.value).meta)==null?void 0:b.title)??""}),k=e.computed(()=>{var b;return((b=d.meta)==null?void 0:b.description)??""});function h(){u.push(g.value||"/")}async function f(){const b=s.value.validate();if(b){Ce.notify({type:"warning",title:"Validation",message:Object.entries(b).map(([C,V])=>`${C}: ${V}`).join(`
|
|
4
4
|
`)});return}if(!l.value){Ce.notify({type:"error",title:"Error",message:"Edit token is missing."});return}const x=await fetch(`/api/table/${l.value}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(o.value)});if(!x.ok){Ce.notify({type:"error",title:"Error",message:`Error code: ${x.status}`});return}await x.json(),Ce.notify({title:"Success!",message:"Your changes have been saved."}),u.back()}return e.onMounted(async()=>{const b=await fetch(`/api/form/gis.${p}.table/${a}`).then(C=>C.json());o.value=b.data,l.value=b.token,r.value=b.schema;const x=b.data;i.value=(x==null?void 0:x.name)||(x==null?void 0:x.title)||(x==null?void 0:x.register_key)||(x==null?void 0:x.map_key)||""}),(b,x)=>{const C=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(an,{variant:"form"},e.createSlots({breadcrumbs:e.withCtx(()=>[g.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(C,{to:g.value,class:"text-gray-500 hover:text-gray-700"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value),1)]),_:1},8,["to"]),e.createElementVNode("span",Vb,[e.createVNode(e.unref(ge.LucideChevronRight),{size:16,class:"shrink-0"})])],64)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(C,{to:m.value,class:"text-gray-500 hover:text-gray-700"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),_:1},8,["to"]),e.createElementVNode("span",Bb,[e.createVNode(e.unref(ge.LucideChevronRight),{size:16,class:"shrink-0"})])],64)):e.createCommentVNode("",!0),x[2]||(x[2]=e.createElementVNode("span",{class:"text-gray-900 font-semibold"},"Редагування",-1))]),title:e.withCtx(()=>[e.createElementVNode("div",$b,[e.createElementVNode("button",{type:"button",class:"p-0 m-0 border-0 bg-transparent cursor-pointer text-inherit hover:opacity-80",onClick:h,"aria-label":"Назад"},[e.createVNode(e.unref(ge.ArrowLeft),{size:20,class:"shrink-0"})]),e.createElementVNode("span",null,e.toDisplayString(i.value||y.value||"Редагування"),1)])]),actions:e.withCtx(()=>[e.createElementVNode("button",{class:"cursor-pointer flex items-center px-3 py-2 text-sm font-medium text-gray-800 duration-300 bg-white border border-gray-100 rounded-lg shadow gap-x-2 focus:outline-none hover:bg-gray-50 hover:border-gray-100",onClick:h}," Назад "),e.createElementVNode("button",{onClick:f,class:"cursor-pointer inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 hover:bg-blue-700 border border-transparent rounded-lg gap-x-2 hover:text-white"}," Зберегти ")]),_:2},[k.value?{name:"description",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.value),1)]),key:"0"}:void 0]),1024),e.createElementVNode("div",Sb,[e.createElementVNode("div",vb,[e.createElementVNode("div",Lb,[e.createElementVNode("div",Tb,[r.value?(e.openBlock(),e.createBlock(e.unref(n),{key:0,schema:r.value,values:o.value,"onUpdate:values":x[0]||(x[0]=V=>o.value=V),form:s.value,"onUpdate:form":x[1]||(x[1]=V=>s.value=V),style:{primaryColor:"blue"}},null,8,["schema","values","form"])):e.createCommentVNode("",!0)])])])])],64)}}})},Symbol.toStringTag,{value:"Module"})),Ab={class:"flex items-center justify-center col-span-3 gap-2"},Mb={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Fb=e.defineComponent({__name:"vs-datatable-controls",props:e.mergeModels({index:{},data:{},scheme:{}},{columns:{type:Array,default:()=>[]},columnsModifiers:{}}),emits:["update:columns"],setup(t){const n=e.defineAsyncComponent(()=>import("@opengis/form")),o=e.defineAsyncComponent(()=>import("@opengis/core").then(p=>p.VsModal)),r=t,l=e.useModel(t,"columns"),s=e.ref(!1),i=e.ref({}),d=e.ref({...r.data||{}});e.watch(()=>r.data,p=>{d.value={...p||{}}},{deep:!0});const u=()=>l.value=l.value.filter((p,a)=>a!==r.index),c=async()=>{const p=i.value.validate();if(p){Ce.notify({type:"warning",title:"Validation",message:Object.entries(p).map(([a,g])=>`${a}: ${g}`).join(`
|
|
5
5
|
`)});return}l.value[r.index]=d.value,s.value=!1};return(p,a)=>(e.openBlock(),e.createElementBlock("div",Ab,[e.createElementVNode("button",{onClick:a[0]||(a[0]=g=>{s.value=!0}),class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground h-8 w-8 rounded-full hover:bg-gray-100"},[e.createVNode(e.unref(ge.Edit),{class:"w-4 h-4"})]),e.createElementVNode("button",{onClick:u,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 h-8 w-8 rounded-full hover:bg-red-100 text-red-600 hover:text-red-700"},[e.createVNode(e.unref(ge.Trash),{class:"w-4 h-4"})]),e.createVNode(e.unref(o),{teleport:"#modal",size:"lg",visible:s.value,"onUpdate:visible":a[4]||(a[4]=g=>s.value=g),title:"Редагувати поле"},{footer:e.withCtx(()=>[e.createElementVNode("div",Mb,[e.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border border-gray-200 rounded-lg hover:bg-gray-100 duration-300",onClick:a[3]||(a[3]=g=>s.value=!1)}," Скасувати "),e.createElementVNode("button",{class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:c}," Зберегти ")])]),default:e.withCtx(()=>[e.createVNode(e.unref(n),{values:d.value,"onUpdate:values":a[1]||(a[1]=g=>d.value=g),schema:t.scheme,form:i.value,"onUpdate:form":a[2]||(a[2]=g=>i.value=g)},null,8,["values","schema","form"])]),_:1},8,["visible"])]))}}),Db={mounted(t){setTimeout(()=>{t.scrollWidth>t.clientWidth?t.setAttribute("title",t.textContent):t.removeAttribute("title")})},updated(t){setTimeout(()=>{t.scrollWidth>t.clientWidth?t.setAttribute("title",t.textContent):t.removeAttribute("title")})}},Pb={array:"purple",boolean:"red",date:"red",datetime:"purple",number:"green",text:"blue",file:"yellow",select:"yellow",slug:"green",image:"blue",badge:"orange",title:"blue",features:"green",status:"red",tags:"yellow",category:"purple",check:"green",range:"orange",autocomplete:"yellow",other:"gray","yes/no":"green"},Gl=t=>Pb[t==null?void 0:t.toLowerCase()]||"gray",zb=["array","boolean","date","datetime","number","text","file","select","slug","image","badge","title","features","status","tags","category","check","range","autocomplete"],Zl=t=>{var n;return zb.includes((n=t||"")==null?void 0:n.toLowerCase())},Rb={},Ib={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4 text-gray-700 lucide lucide-type",__v0_r:"0,5361,5384"};function jb(t,n){return e.openBlock(),e.createElementBlock("svg",Ib,[...n[0]||(n[0]=[e.createElementVNode("polyline",{points:"4 7 4 4 20 4 20 7"},null,-1),e.createElementVNode("line",{x1:"9",x2:"15",y1:"20",y2:"20"},null,-1),e.createElementVNode("line",{x1:"12",x2:"12",y1:"4",y2:"20"},null,-1)])])}const Ob=Fe(Rb,[["render",jb]]),Ub={},qb={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4 text-gray-700 lucide lucide-hash",__v0_r:"0,5361,5384"};function Hb(t,n){return e.openBlock(),e.createElementBlock("svg",qb,[...n[0]||(n[0]=[e.createElementVNode("line",{x1:"4",x2:"20",y1:"9",y2:"9"},null,-1),e.createElementVNode("line",{x1:"4",x2:"20",y1:"15",y2:"15"},null,-1),e.createElementVNode("line",{x1:"10",x2:"8",y1:"3",y2:"21"},null,-1),e.createElementVNode("line",{x1:"16",x2:"14",y1:"3",y2:"21"},null,-1)])])}const Wb=Fe(Ub,[["render",Hb]]),Yb={},Gb={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4 text-gray-700 lucide lucide-calendar",__v0_r:"0,5361,5384"};function Zb(t,n){return e.openBlock(),e.createElementBlock("svg",Gb,[...n[0]||(n[0]=[e.createElementVNode("path",{d:"M8 2v4"},null,-1),e.createElementVNode("path",{d:"M16 2v4"},null,-1),e.createElementVNode("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"},null,-1),e.createElementVNode("path",{d:"M3 10h18"},null,-1)])])}const Kb=Fe(Yb,[["render",Zb]]),Xb={},Jb={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4 text-gray-700 lucide lucide-calendar",__v0_r:"0,5361,5384"};function Qb(t,n){return e.openBlock(),e.createElementBlock("svg",Jb,[...n[0]||(n[0]=[e.createElementVNode("path",{d:"M8 2v4"},null,-1),e.createElementVNode("path",{d:"M16 2v4"},null,-1),e.createElementVNode("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"},null,-1),e.createElementVNode("path",{d:"M3 10h18"},null,-1)])])}const ex=Fe(Xb,[["render",Qb]]),tx={},nx={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4 text-gray-700 lucide lucide-code",__v0_r:"0,5361,5384"};function ox(t,n){return e.openBlock(),e.createElementBlock("svg",nx,[...n[0]||(n[0]=[e.createElementVNode("polyline",{points:"16 18 22 12 16 6"},null,-1),e.createElementVNode("polyline",{points:"8 6 2 12 8 18"},null,-1)])])}const rx=Fe(tx,[["render",ox]]),lx={},ax={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4 text-gray-700 lucide lucide-toggle-left",__v0_r:"0,5361,5384"};function sx(t,n){return e.openBlock(),e.createElementBlock("svg",ax,[...n[0]||(n[0]=[e.createElementVNode("rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6"},null,-1),e.createElementVNode("circle",{cx:"8",cy:"12",r:"2"},null,-1)])])}const ix=Fe(lx,[["render",sx]]),cx={},dx={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4 text-gray-700 lucide lucide-file-text",__v0_r:"0,5361,5384"};function ux(t,n){return e.openBlock(),e.createElementBlock("svg",dx,[...n[0]||(n[0]=[e.createStaticVNode('<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path><path d="M10 9H8"></path><path d="M16 13H8"></path><path d="M16 17H8"></path>',5)])])}const fx=Fe(cx,[["render",ux]]),mx={},px={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4 text-gray-700 lucide lucide-image",__v0_r:"0,5361,5384"};function gx(t,n){return e.openBlock(),e.createElementBlock("svg",px,[...n[0]||(n[0]=[e.createElementVNode("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"},null,-1),e.createElementVNode("circle",{cx:"9",cy:"9",r:"2"},null,-1),e.createElementVNode("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"},null,-1)])])}const yx=Fe(mx,[["render",gx]]),hx={},bx={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4 text-gray-700 lucide lucide-list",__v0_r:"0,5361,5384"};function xx(t,n){return e.openBlock(),e.createElementBlock("svg",bx,[...n[0]||(n[0]=[e.createStaticVNode('<line x1="8" x2="21" y1="6" y2="6"></line><line x1="8" x2="21" y1="12" y2="12"></line><line x1="8" x2="21" y1="18" y2="18"></line><line x1="3" x2="3.01" y1="6" y2="6"></line><line x1="3" x2="3.01" y1="12" y2="12"></line><line x1="3" x2="3.01" y1="18" y2="18"></line>',6)])])}const kx=Fe(hx,[["render",xx]]),wx={},_x={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4 text-gray-700 lucide lucide-list",__v0_r:"0,5361,5384"};function Ex(t,n){return e.openBlock(),e.createElementBlock("svg",_x,[...n[0]||(n[0]=[e.createStaticVNode('<line x1="8" x2="21" y1="6" y2="6"></line><line x1="8" x2="21" y1="12" y2="12"></line><line x1="8" x2="21" y1="18" y2="18"></line><line x1="3" x2="3.01" y1="6" y2="6"></line><line x1="3" x2="3.01" y1="12" y2="12"></line><line x1="3" x2="3.01" y1="18" y2="18"></line>',6)])])}const Cx=Fe(wx,[["render",Ex]]),Nx={},Vx={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4 text-gray-700 lucide lucide-link2",__v0_r:"0,5361,5384"};function Bx(t,n){return e.openBlock(),e.createElementBlock("svg",Vx,[...n[0]||(n[0]=[e.createElementVNode("path",{d:"M9 17H7A5 5 0 0 1 7 7h2"},null,-1),e.createElementVNode("path",{d:"M15 7h2a5 5 0 1 1 0 10h-2"},null,-1),e.createElementVNode("line",{x1:"8",x2:"16",y1:"12",y2:"12"},null,-1)])])}const $x=Fe(Nx,[["render",Bx]]),Sx={},vx={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4 text-gray-700 lucide lucide-list",__v0_r:"0,5361,5384"};function Lx(t,n){return e.openBlock(),e.createElementBlock("svg",vx,[...n[0]||(n[0]=[e.createStaticVNode('<line x1="8" x2="21" y1="6" y2="6"></line><line x1="8" x2="21" y1="12" y2="12"></line><line x1="8" x2="21" y1="18" y2="18"></line><line x1="3" x2="3.01" y1="6" y2="6"></line><line x1="3" x2="3.01" y1="12" y2="12"></line><line x1="3" x2="3.01" y1="18" y2="18"></line>',6)])])}const Tx=Fe(Sx,[["render",Lx]]),Ax={},Mx={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4 text-gray-700 lucide lucide-link2",__v0_r:"0,5361,5384"};function Fx(t,n){return e.openBlock(),e.createElementBlock("svg",Mx,[...n[0]||(n[0]=[e.createElementVNode("path",{d:"M9 17H7A5 5 0 0 1 7 7h2"},null,-1),e.createElementVNode("path",{d:"M15 7h2a5 5 0 1 1 0 10h-2"},null,-1),e.createElementVNode("line",{x1:"8",x2:"16",y1:"12",y2:"12"},null,-1)])])}const Dx=Fe(Ax,[["render",Fx]]),Px={},zx={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-4 h-4 text-gray-700 lucide lucide-list",__v0_r:"0,5361,5384"};function Rx(t,n){return e.openBlock(),e.createElementBlock("svg",zx,[...n[0]||(n[0]=[e.createStaticVNode('<line x1="8" x2="21" y1="6" y2="6"></line><line x1="8" x2="21" y1="12" y2="12"></line><line x1="8" x2="21" y1="18" y2="18"></line><line x1="3" x2="3.01" y1="6" y2="6"></line><line x1="3" x2="3.01" y1="12" y2="12"></line><line x1="3" x2="3.01" y1="18" y2="18"></line>',6)])])}const Ix=Fe(Px,[["render",Rx]]),jx={},Ox={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",height:"800px",width:"800px",version:"1.1",id:"_x32_",viewBox:"0 0 512 512","xml:space":"preserve"};function Ux(t,n){return e.openBlock(),e.createElementBlock("svg",Ox,[...n[0]||(n[0]=[e.createElementVNode("g",null,[e.createElementVNode("path",{class:"st0",d:"M511.989,292.396c0.021-16.486-6.344-33.136-18.945-45.703L273.605,27.242 C262.3,15.936,247.175,9.22,231.184,8.407L66.821,0.032l1.184,0.066C66.974,0.044,65.866,0,64.67,0 C47.58,0,31.105,6.783,18.944,18.955C6.783,31.106-0.001,47.58,0.011,64.67c0,1.076,0.034,2.172,0.078,3.27l8.297,163.254 c0.835,15.981,7.54,31.106,18.857,42.421l219.451,219.451c12.578,12.589,29.217,18.955,45.703,18.934 c16.496,0.021,33.124-6.356,45.703-18.934l154.956-154.945l-11.92-11.92l11.932,11.909 C505.645,325.521,512.011,308.881,511.989,292.396z M314.26,469.216c-6.08,6.08-13.895,9.044-21.864,9.067 c-7.969-0.023-15.783-2.986-21.864-9.067L51.082,249.765c-5.4-5.4-8.616-12.633-9.023-20.305L33.762,66.238l-0.034-1.569 c0-8.188,3.238-16.048,9.055-21.875c5.839-5.839,13.697-9.077,21.886-9.077l1.502,0.044l163.288,8.319 c7.683,0.396,14.904,3.6,20.305,9.012l219.45,219.45c6.059,6.069,9.033,13.884,9.056,21.853 c-0.023,7.968-2.986,15.794-9.067,21.886h0.011L314.26,469.216z"}),e.createElementVNode("path",{class:"st0",d:"M105.632,105.642c-15.366,15.378-15.366,40.27,0,55.636c15.366,15.366,40.259,15.366,55.625,0 c15.366-15.366,15.366-40.259,0-55.636C145.891,90.276,120.998,90.276,105.632,105.642z"})],-1)])])}const qx=Fe(jx,[["render",Ux]]),Hx={},Wx={xmlns:"http://www.w3.org/2000/svg",width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none"};function Yx(t,n){return e.openBlock(),e.createElementBlock("svg",Wx,[...n[0]||(n[0]=[e.createElementVNode("path",{d:"M3 12C3 4.5885 4.5885 3 12 3C19.4115 3 21 4.5885 21 12C21 19.4115 19.4115 21 12 21C4.5885 21 3 19.4115 3 12Z",stroke:"#323232","stroke-width":"2"},null,-1),e.createElementVNode("path",{d:"M9 12L10.6828 13.6828V13.6828C10.858 13.858 11.142 13.858 11.3172 13.6828V13.6828L15 10",stroke:"#323232","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const Kl={IconText:Ob,IconNumber:Wb,IconDate:Kb,IconDatetime:ex,IconRichtext:rx,IconBoolean:ix,IconFile:fx,IconImage:yx,IconArray:kx,IconSelect:Cx,IconSlug:$x,IconDatalist:Tx,IconReference:Dx,IconReferenceList:Ix,IconBadge:qx,IconCheck:Fe(Hx,[["render",Yx]])},Gx={key:0,class:"flex items-center justify-between mb-6"},Zx={class:"flex justify-end w-full"},Kx={class:"overflow-hidden bg-white border border-gray-200 shadow-sm rounded-xl flex flex-col flex-1 min-h-0"},Xx={class:"table-scroll-wrapper flex-1 overflow-y-auto min-h-0"},Jx={class:"table-fixed w-full text-[13px]"},Qx={class:"bg-gray-50 border-b border-gray-200"},e1={key:0},t1=["onDragstart","onDragover","onDrop"],n1={key:0,class:"flex w-fit items-center gap-2 text-left"},o1={class:"flex-1 min-w-0"},r1={class:"font-medium text-gray-900 truncate"},l1={class:"text-xs text-gray-500"},a1={key:1,class:"flex items-center justify-center"},s1={key:0,class:"inline-flex items-center px-2 py-1 h-fit text-[13px] font-medium rounded-md ring-1 ring-inset ring-gray-500/10 bg-gray-100"},i1={key:1,class:"text-gray-500 text-sm"},c1={key:3},d1={class:"px-6 py-4"},u1={key:1},f1=["colspan"],Pt=Fe(e.defineComponent({__name:"vs-datatable",props:e.mergeModels({columnsScheme:{},formScheme:{},addButton:{type:Boolean,default:!0},mainColWidth:{default:""}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t,{expose:n}){function o(_){return _.charAt(0).toUpperCase()+_.slice(1)}const r=e.defineAsyncComponent(()=>import("@opengis/core").then(_=>_.VsModal)),l=e.defineAsyncComponent(()=>import("@opengis/form")),s=e.useModel(t,"modelValue"),i=t,d=e.ref({}),u=e.ref(!1),c=e.ref({}),p=e.ref(null),a=e.useSlots(),g=_=>!!(_&&a[_]);n({openCreateDialog:()=>{u.value=!0}});const m=e.computed({get(){return Array.isArray(s.value)?s.value:s.value&&Array.isArray(s.value.columns)?s.value.columns:[]},set(_){Array.isArray(s.value)?s.value=_:s.value&&Array.isArray(s.value.columns)&&(s.value.columns=_)}}),y=e.computed(()=>{const _=i.columnsScheme.map(w=>w.key);return _.includes("name")&&_.includes("label")||_.includes("id")&&_.includes("label")?[{key:"main",label:"Назва",type:"main",width:"100%"},...i.columnsScheme.filter(w=>!["name","id","label"].includes(w.key))]:i.columnsScheme});function k(){u.value=!1,c.value={},p.value=null}async function h(){const _=d.value.validate();if(_){Ce.notify({type:"warning",title:"Validation",message:Object.entries(_).map(([w,$])=>`${w}: ${$}`).join(`
|
|
6
|
-
`)});return}if(p.value===null)m.value=[...m.value,{...c.value}];else{const w=[...m.value];w[p.value]={...c.value},m.value=w}k()}const f=e.ref(null),b=e.ref(null),x=_=>{f.value=_},C=_=>{b.value=_},V=_=>{if(f.value===null||f.value===_){f.value=null,b.value=null;return}const w=[...m.value],[$]=w.splice(f.value,1);w.splice(_,0,$),m.value=w,f.value=null,b.value=null};return(_,w)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.addButton?(e.openBlock(),e.createElementBlock("div",Gx,[e.createElementVNode("div",Zx,[e.createElementVNode("button",{onClick:w[0]||(w[0]=$=>u.value=!0),class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&_svg]:shrink-0 bg-primary hover:bg-primary/90 h-10 px-4 py-2 bg-gradient-to-r from-blue-600 to-blue-500 hover:from-blue-700 hover:to-blue-600 text-white"},[...w[4]||(w[4]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),e.createTextVNode(" Додати поле ",-1)])])])])):e.createCommentVNode("",!0),e.createElementVNode("div",Kx,[e.createElementVNode("div",Xx,[e.createElementVNode("table",Jx,[e.createElementVNode("colgroup",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,$=>(e.openBlock(),e.createElementBlock("col",{key:$.key,style:e.normalizeStyle($.type==="main"?`width: ${t.mainColWidth}`:$.width?`width: ${$.width}`:"auto")},null,4))),128)),w[5]||(w[5]=e.createElementVNode("col",null,null,-1))]),e.createElementVNode("thead",null,[e.createElementVNode("tr",Qx,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,$=>(e.openBlock(),e.createElementBlock("th",{key:$.key,class:"px-6 py-4"},e.toDisplayString($.label),1))),128)),w[6]||(w[6]=e.createElementVNode("th",{class:"px-6 py-4"},"Дії",-1))])]),m.value.length?(e.openBlock(),e.createElementBlock("tbody",e1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,($,L)=>(e.openBlock(),e.createElementBlock("tr",{key:$.id||$.name||L,class:e.normalizeClass(["transition-colors hover:bg-gray-50/50 cursor-move",{"opacity-50":f.value===L,"border-t-2 border-b-2 border-blue-500 bg-blue-50":b.value===L}]),draggable:"true",onDragstart:G=>x(L),onDragover:e.withModifiers(G=>C(L),["prevent"]),onDrop:G=>V(L)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,G=>(e.openBlock(),e.createElementBlock("td",{key:G.key,class:"px-6 py-4 align-middle text-center"},[G.type==="main"?(e.openBlock(),e.createElementBlock("div",n1,[w[7]||(w[7]=e.createElementVNode("span",{class:"drag-handle cursor-move mr-2 text-gray-400"},"☰",-1)),e.unref(Zl)($.format==="yes/no"?"check":$.format||$.type)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex items-center justify-center p-1 rounded",`bg-${e.unref(Gl)($.format==="yes/no"?"check":$.format||$.type)}-100`])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent($.format==="yes/no"?"icon-check":e.unref(Kl)["Icon"+o($.format||$.type)]||e.unref(Kl).IconText),{class:"w-4 h-4"}))],2)):e.createCommentVNode("",!0),e.createElementVNode("div",o1,[e.withDirectives((e.openBlock(),e.createElementBlock("p",r1,[e.createTextVNode(e.toDisplayString($.name||$.id),1)])),[[e.unref(Db)]]),e.createElementVNode("p",l1,e.toDisplayString($.ua||$.label||$.name||$.id),1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[G.slot&&g(G.slot)?e.renderSlot(_.$slots,G.slot,{key:0,row:$,column:G,value:$[G.key],rowIndex:L},void 0,!0):G.type==="color"?(e.openBlock(),e.createElementBlock("div",a1,[e.createElementVNode("div",{class:e.normalizeClass(["w-4 h-4 rounded-full align-middle",`bg-[${$[G.key]}]`])},null,2)])):["format","type","meta"].includes(G.key)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[$[G.key]?(e.openBlock(),e.createElementBlock("span",s1,e.toDisplayString($[G.key]),1)):(e.openBlock(),e.createElementBlock("span",i1,"Не вказано"))],64)):(e.openBlock(),e.createElementBlock("span",c1,e.toDisplayString($[G.key]),1))],64))]))),128)),e.createElementVNode("td",d1,[e.createVNode(Fb,{columns:m.value,"onUpdate:columns":w[1]||(w[1]=G=>m.value=G),data:$,index:L,scheme:t.formScheme},null,8,["columns","data","index","scheme"])])],42,t1))),128))])):(e.openBlock(),e.createElementBlock("tr",u1,[e.createElementVNode("td",{colspan:y.value.length+1,class:"text-gray-500 text-center py-4"}," Поля не знайдені ",8,f1)]))])])]),e.createVNode(e.unref(r),{teleport:"#modal",title:"Створити поле",size:"lg",visible:u.value,"onUpdate:visible":w[3]||(w[3]=$=>u.value=$)},{footer:e.withCtx(()=>[e.createElementVNode("div",{class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},[e.createElementVNode("button",{type:"button",onClick:k,class:"px-4 py-2 rounded bg-gray-100 text-gray-700"}," Скасувати "),e.createElementVNode("button",{type:"button",onClick:h,class:"px-4 py-2 rounded bg-blue-600 text-white"}," Зберегти1 ")])]),default:e.withCtx(()=>[e.createVNode(e.unref(l),{ref_key:"form",ref:d,modelValue:c.value,"onUpdate:modelValue":w[2]||(w[2]=$=>c.value=$),schema:t.formScheme},null,8,["modelValue","schema"])]),_:1},8,["visible"])],64))}}),[["__scopeId","data-v-25566600"]]),m1={class:"p-4 text-[13px]"},p1={class:"grid grid-cols-2 gap-x-6 gap-y-2"},g1=["id","checked","onChange"],y1={class:"ml-2 flex-1 min-w-0 flex items-center gap-2"},h1={class:"font-medium text-gray-900 truncate"},b1={class:"text-xs text-gray-500"},x1={key:0,class:"text-xs text-[#B2C9D6]"},k1={class:"flex justify-end gap-2 p-4 border-t w-full"},sn=e.defineComponent({__name:"import-fields-dialog",props:e.mergeModels({fields:{default:()=>[]},title:{},idPrefix:{default:"import"},confirmText:{default:"Імпортувати"},cancelText:{default:"Скасувати"}},{visible:{type:Boolean,default:!1},visibleModifiers:{},selection:{default:[]},selectionModifiers:{}}),emits:e.mergeModels(["confirm","cancel"],["update:visible","update:selection"]),setup(t,{emit:n}){const o=e.useModel(t,"visible"),r=e.useModel(t,"selection"),l=t,s=n,i=e.defineAsyncComponent(()=>import("@opengis/core").then(x=>x.VsModal)),d=e.computed(()=>Array.isArray(l.fields)?l.fields.filter(Boolean):[]),u=x=>(x==null?void 0:x.name)??(x==null?void 0:x.id)??(x==null?void 0:x.key)??(x==null?void 0:x.code)??(x==null?void 0:x.field)??(x==null?void 0:x.value)??"",c=x=>String(u(x)??"").trim(),p=x=>(x==null?void 0:x.title)??(x==null?void 0:x.label)??c(x),a=x=>String((x==null?void 0:x.type)??"").trim(),g=e.computed(()=>new Set(r.value.map(x=>String(x??"").trim()))),m=x=>g.value.has(c(x)),y=x=>{const C=c(x);if(!C)return;const V=new Set(g.value);V.has(C)?V.delete(C):V.add(C),r.value=Array.from(V)},k=e.computed(()=>l.confirmText||"Імпортувати"),h=e.computed(()=>l.cancelText||"Скасувати"),f=()=>{o.value=!1,s("cancel")},b=()=>{s("confirm"),o.value=!1};return(x,C)=>(e.openBlock(),e.createBlock(e.unref(i),{visible:o.value,"onUpdate:visible":C[0]||(C[0]=V=>o.value=V),teleport:"#modal",title:t.title,size:"lg"},{footer:e.withCtx(()=>[e.createElementVNode("div",k1,[e.createElementVNode("button",{onClick:f,class:"px-4 py-2 rounded bg-gray-100 text-gray-700"},e.toDisplayString(h.value),1),e.createElementVNode("button",{onClick:b,class:"px-4 py-2 rounded bg-blue-600 text-white"},e.toDisplayString(k.value),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",m1,[e.createElementVNode("div",p1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,V=>(e.openBlock(),e.createElementBlock("label",{key:c(V),class:"flex items-center hover:bg-gray-100 rounded p-2 cursor-pointer"},[e.createElementVNode("input",{type:"checkbox",id:`${t.idPrefix}-${c(V)}`,checked:m(V),onChange:_=>y(V)},null,40,g1),e.createElementVNode("div",y1,[e.unref(Zl)(V.type)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`bg-${e.unref(Gl)(V.type)}-100 p-1 rounded`)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(`icon-${V.type}`),{class:"w-4 h-4"}))],2)):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("p",h1,e.toDisplayString(c(V)),1),e.createElementVNode("p",b1,e.toDisplayString(p(V)),1),a(V)?(e.openBlock(),e.createElementBlock("p",x1,e.toDisplayString(a(V)),1)):e.createCommentVNode("",!0)])])]))),128))])])]),_:1},8,["visible","title"]))}});function cn(t){return t==null?"":String(t).trim()}function zt(t){return cn((t==null?void 0:t.name)??(t==null?void 0:t.id)??(t==null?void 0:t.key)??(t==null?void 0:t.code)??(t==null?void 0:t.field)??(t==null?void 0:t.value)??"")}function dn(t,n,o){const r=Array.isArray(t)?[...t]:[],l=Array.isArray(n)?n:[],{selectedKeys:s,resolveKey:i}=o,d=new Set;for(const a of s){const g=cn(a);g&&d.add(g)}if(d.size===0)return[];const u=a=>cn(i(a)),c=[],p=new Set;for(const a of r){const g=u(a);!g||!d.has(g)||(c.push(a),p.add(g))}for(const a of l){const g=u(a);!g||p.has(g)||!d.has(g)||(c.push(a),p.add(g))}return c}const w1={class:"vs-form"},_1={class:"vs-form__body auto-rows-max container"},E1={class:"flex flex-wrap"},C1={class:"h-fit w-full mb-6 bg-white border border-gray-200 rounded-lg p-6"},N1={class:"h-fit w-full flex flex-wrap"},V1={class:"w-full"},B1=e.defineComponent({__name:"list-tab",props:e.mergeModels({fields:{}},{data:{default:{}},dataModifiers:{},form:{},formModifiers:{}}),emits:["update:data","update:form"],setup(t){const n=e.useModel(t,"data"),o=e.useModel(t,"form"),r=t,l=e.computed(()=>Array.isArray(r.fields)?r.fields:[]),s=b=>zt(b||{}),i=e.defineAsyncComponent(()=>import("@opengis/form")),d=e.ref(),u=e.ref(!1),c=e.ref([]),p=()=>{const b=g.value.map(x=>s(x)).filter(x=>x.length>0);c.value=[...b],u.value=!0},a=e.computed(()=>{var b,x;return((b=n.value)==null?void 0:b.token)||((x=n.value)==null?void 0:x.id)||"register-form"}),g=e.computed({get:()=>(n.value||(n.value={}),Array.isArray(n.value.columns)||(n.value.columns=[]),n.value.columns),set:b=>{n.value||(n.value={}),n.value.columns=Array.isArray(b)?b:[]}}),m=e.computed({get:()=>n.value||{},set:b=>{var C;const x=Array.isArray((C=n.value)==null?void 0:C.columns)?n.value.columns:[];n.value={...n.value,...b,columns:x}}});e.watch(()=>d.value,b=>{o.value=b||null},{immediate:!0}),e.watch(u,b=>{b||(c.value=[])});const y=()=>{const b=new Set(c.value.map(V=>cn(V)).filter(V=>V.length>0)),x=Array.isArray(g.value)?[...g.value]:[],C=l.value.filter(V=>b.has(s(V))).map(V=>{const _=s(V),w=V.title??V.label??_;return{...V,name:_,label:w,type:V.type||"text",meta:V.meta??"features"}});g.value=dn(x,C,{selectedKeys:c.value,resolveKey:s}),u.value=!1,c.value=[]},k={table_name:{type:"select",label:"Таблиця",required:!0,data:"pg.table_name",placeholder:"Таблиця в БД",validators:["required"],col:6},name:{type:"text",label:"Назва",required:!0,placeholder:"Назва",validators:["required"],col:6},query:{type:"text",label:"Умова",placeholder:"Умова",col:6},order:{type:"text",label:"Сортування",placeholder:"Сортування",col:6},description:{type:"textarea",label:"Опис",placeholder:"Опис",col:12}},h=[{key:"name",label:"Name",type:"text"},{key:"label",label:"Назва",type:"text"},{key:"meta",label:"Мета",type:"text"}],f={name:{type:"text",label:"Назва колонки",validators:["required"],disabled:!0},ua:{type:"text",label:"Назва",validators:["required"]},format:{type:"radio",label:"Формат",position:"horizontal",options:[{text:"Text",id:"text"},{text:"Number",id:"number"},{text:"Date",id:"date"},{text:"File",id:"file"},{text:"Select",id:"select"},{text:"Badge",id:"badge"},{text:"Tags",id:"tags"}],validators:["required"]},is_export:{type:"switcher",label:"Експорт",info:"Чи експортувати дані колонки?",view:"switcher"},meta:{type:"combobox",label:"Мета",mode:"combo",options:[{text:"Title",id:"title"},{text:"Features",id:"features"},{text:"Status",id:"status"},{text:"Tags",id:"tags"},{text:"Category",id:"category"},{text:"Image",id:"image"}]},data:{type:"select",label:"Класифікатор",data:"admin.cls.name",conditions:["format","in",["select","badge","tags"]]}};return e.onBeforeUnmount(()=>{o.value=null}),(b,x)=>(e.openBlock(),e.createElementBlock("div",w1,[e.createElementVNode("div",_1,[e.createElementVNode("div",E1,[e.createElementVNode("div",C1,[(e.openBlock(),e.createBlock(e.unref(i),{ref_key:"formEl",ref:d,key:a.value,schema:k,modelValue:m.value,"onUpdate:modelValue":x[0]||(x[0]=C=>m.value=C)},null,8,["modelValue"]))]),e.createElementVNode("div",N1,[e.createElementVNode("div",{class:"flex justify-end mb-3 gap-2 w-full"},[e.createElementVNode("button",{onClick:p,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary hover:bg-primary/90 h-10 px-4 py-2 bg-gradient-to-r from-blue-600 to-blue-500 hover:from-blue-700 hover:to-blue-600 text-white"},[...x[4]||(x[4]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2",class:"mr-1"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4v16m8-8H4"})],-1),e.createTextVNode(" Імпорт ",-1)])])]),e.createElementVNode("div",V1,[e.createVNode(Pt,{modelValue:g.value,"onUpdate:modelValue":x[1]||(x[1]=C=>g.value=C),"columns-scheme":h,"form-scheme":f,"main-col-width":"250px","add-button":!1},null,8,["modelValue"])])])])]),e.createVNode(sn,{visible:u.value,"onUpdate:visible":x[2]||(x[2]=C=>u.value=C),selection:c.value,"onUpdate:selection":x[3]||(x[3]=C=>c.value=C),fields:l.value,title:"Імпорт колонок","id-prefix":"import-column",onConfirm:y},null,8,["visible","selection","fields"])]))}}),$1={class:"vs-form"},S1={class:"vs-form__body auto-rows-max container"},v1={class:"flex flex-wrap"},L1={class:"h-fit w-full flex flex-wrap"},T1={class:"w-full"},A1=e.defineComponent({__name:"filter-tab",props:e.mergeModels({fields:{}},{data:{default:{}},dataModifiers:{},form:{},formModifiers:{}}),emits:["update:data","update:form"],setup(t){const n=e.useModel(t,"data"),o=e.useModel(t,"form"),r=t,l=e.computed(()=>Array.isArray(r.fields)?r.fields:[]),s=m=>zt(m||{}),i=e.ref(!1),d=e.ref([]),u=()=>{const m=c.value.map(y=>s(y)).filter(y=>y.length>0);d.value=[...m],i.value=!0},c=e.computed({get:()=>(n.value||(n.value={}),Array.isArray(n.value.filters)||(n.value.filters=[]),n.value.filters),set:m=>{n.value||(n.value={}),n.value.filters=Array.isArray(m)?m:[]}});e.watch(i,m=>{m||(d.value=[])});const p=()=>{const m=new Set(d.value.map(h=>cn(h)).filter(h=>h.length>0)),y=Array.isArray(c.value)?[...c.value]:[],k=l.value.filter(h=>m.has(s(h))).map(h=>({name:s(h),label:h.title??h.label??s(h),type:h.type||"text"}));c.value=dn(y,k,{selectedKeys:d.value,resolveKey:s}),i.value=!1,d.value=[]},a=[{key:"id",label:"Name"},{key:"label",label:"Назва"},{key:"type",label:"Тип"}],g={name:{type:"text",label:"Назва колонки",validators:["required"],disabled:!0},ua:{type:"text",label:"Назва",validators:["required"]},type:{type:"radio",label:"Тип",validators:["required"],position:"horizontal",options:[{text:"Check",id:"Check"},{text:"Range",id:"Range"},{text:"Date",id:"Date"},{text:"Text",id:"Text"},{text:"Select",id:"Select"}]},hidden:{label:"Приховати",type:"Switcher"},data:{type:"select",label:"Класифікатор",data:"admin.cls.name",conditions:["type","in",["Select","Autocomplete","Check"]]}};return e.onBeforeUnmount(()=>{o.value=null}),(m,y)=>(e.openBlock(),e.createElementBlock("div",$1,[e.createElementVNode("div",S1,[e.createElementVNode("div",v1,[y[4]||(y[4]=e.createElementVNode("div",{class:"h-fit w-full flex flex-wrap mb-6 px-2"},[e.createElementVNode("p",{class:"text-sm text-gray-600"}," Налаштуйте фільтри реєстру. Оберіть поля для імпорту або відредагуйте властивості вручну. ")],-1)),e.createElementVNode("div",L1,[e.createElementVNode("div",{class:"flex justify-end mb-3 gap-2 w-full"},[e.createElementVNode("button",{onClick:u,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary hover:bg-primary/90 h-10 px-4 py-2 bg-gradient-to-r from-blue-600 to-blue-500 hover:from-blue-700 hover:to-blue-600 text-white"},[...y[3]||(y[3]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2",class:"mr-1"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4v16m8-8H4"})],-1),e.createTextVNode(" Імпорт ",-1)])])]),e.createElementVNode("div",T1,[e.createVNode(Pt,{modelValue:c.value,"onUpdate:modelValue":y[0]||(y[0]=k=>c.value=k),"columns-scheme":a,"form-scheme":g,"main-col-width":"250px","add-button":!1},null,8,["modelValue"])])])])]),e.createVNode(sn,{visible:i.value,"onUpdate:visible":y[1]||(y[1]=k=>i.value=k),selection:d.value,"onUpdate:selection":y[2]||(y[2]=k=>d.value=k),fields:l.value,title:"Імпорт фільтрів","id-prefix":"import-filter",onConfirm:p},null,8,["visible","selection","fields"])]))}}),M1={class:"vs-form"},F1={class:"vs-form__body auto-rows-max container"},D1={class:"flex flex-wrap"},P1={class:"h-fit w-full flex flex-wrap"},z1={class:"w-full"},R1=e.defineComponent({__name:"card-tab",props:e.mergeModels({fields:{}},{data:{default:{}},dataModifiers:{},form:{},formModifiers:{}}),emits:["update:data","update:form"],setup(t){const n=e.useModel(t,"data"),o=e.useModel(t,"form"),r=t,l=e.computed(()=>Array.isArray(r.fields)?r.fields:[]),s=m=>zt(m||{}),i=e.ref(!1),d=e.ref([]),u=()=>{const m=c.value.map(y=>s(y)).filter(y=>y.length>0);d.value=[...m],i.value=!0},c=e.computed({get:()=>n.value.card,set:m=>{n.value||(n.value={}),n.value.card=Array.isArray(m)?m:[]}});e.watch(i,m=>{var y;if(m){const k=((y=c.value)==null?void 0:y.map(h=>h.name))||[];d.value=[...k]}});const p=()=>{const m=new Set(d.value.map(h=>cn(h)).filter(h=>h.length>0)),y=Array.isArray(c.value)?[...c.value]:[],k=l.value.filter(h=>m.has(s(h))).map(h=>{const f=s(h),b=h.title??h.label??f;return{...h,name:f,label:b,format:h.format||h.type||"text",meta:h.meta||"title"}});c.value=dn(y,k,{selectedKeys:d.value,resolveKey:s}),i.value=!1,d.value=[]},a=[{key:"name",label:"Name",type:"text"},{key:"label",label:"Назва",type:"text"},{key:"format",label:"Формат",type:"text"}],g={name:{type:"text",label:"Назва колонки",validators:["required"],disabled:!0},ua:{type:"text",label:"Назва",validators:["required"]},format:{type:"radio",label:"Формат",position:"horizontal",options:[{text:"Text",id:"text"},{text:"Number",id:"number"},{text:"Date",id:"date"},{text:"File",id:"file"},{text:"Select",id:"select"},{text:"Badge",id:"badge"},{text:"Tags",id:"tags"}],validators:["required"]},data:{type:"select",label:"Класифікатор",data:"admin.cls.name",conditions:["format","in",["select","badge","tags"]]}};return e.onBeforeUnmount(()=>{o.value=null}),(m,y)=>(e.openBlock(),e.createElementBlock("div",M1,[e.createElementVNode("div",F1,[e.createElementVNode("div",D1,[y[4]||(y[4]=e.createElementVNode("div",{class:"h-fit w-full flex flex-wrap mb-6 px-2"},[e.createElementVNode("p",{class:"text-sm text-gray-600"}," Налаштуйте відображення картки. Оберіть потрібні поля та відредагуйте їхні властивості. ")],-1)),e.createElementVNode("div",P1,[e.createElementVNode("div",{class:"flex justify-end mb-3 gap-2 w-full"},[e.createElementVNode("button",{onClick:u,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary hover:bg-primary/90 h-10 px-4 py-2 bg-gradient-to-r from-blue-600 to-blue-500 hover:from-blue-700 hover:to-blue-600 text-white"},[...y[3]||(y[3]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2",class:"mr-1"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4v16m8-8H4"})],-1),e.createTextVNode(" Імпорт ",-1)])])]),e.createElementVNode("div",z1,[e.createVNode(Pt,{modelValue:c.value,"onUpdate:modelValue":y[0]||(y[0]=k=>c.value=k),"columns-scheme":a,"form-scheme":g,"main-col-width":"250px","add-button":!1},null,8,["modelValue"])])])])]),e.createVNode(sn,{visible:i.value,"onUpdate:visible":y[1]||(y[1]=k=>i.value=k),selection:d.value,"onUpdate:selection":y[2]||(y[2]=k=>d.value=k),fields:l.value,title:"Імпорт полів картки","id-prefix":"import-card",onConfirm:p},null,8,["visible","selection","fields"])]))}}),Xl={template1:Ul,template2:ql,template3:Hl,template4:Wl,template5:Yl},I1={class:"space-y-4"},j1={class:"flex items-center gap-4 bg-white border border-gray-200 rounded-lg px-6 py-4"},O1={class:"text-lg font-semibold mb-4"},U1={class:"bg-white"},q1={key:1,class:"text-gray-400 text-center py-12"},H1={key:2,class:"text-gray-400 text-center py-12"},W1=e.defineComponent({__name:"preview-tab",props:e.mergeModels({hideDetailsButton:{type:Boolean,default:!1}},{data:{default:{}},dataModifiers:{}}),emits:["update:data"],setup(t){const n=e.defineAsyncComponent(()=>import("@opengis/form")),o=e.useModel(t,"data"),r=[{text:"template1",id:"template1"},{text:"template2",id:"template2"},{text:"template3",id:"template3"},{text:"template4",id:"template4"},{text:"template5",id:"template5"}],l={view:{type:"radio",label:"Вигляд",position:"horizontal",required:!0,options:r,col:12}},s=e.computed(()=>{var p;return Array.isArray((p=o.value)==null?void 0:p.columns)?o.value.columns:[]}),i=e.computed(()=>{var p;return((p=o.value)==null?void 0:p.view)||"template1"}),d=e.computed(()=>Xl[i.value]||Xl.template1),u=e.computed(()=>{var g;const p=(g=o.value)==null?void 0:g.view;if(!p)return"template1";const a=r.find(m=>m.id===p);return(a==null?void 0:a.text)||p}),c=e.computed(()=>(Array.isArray(o.value.tableData)?o.value.tableData:[]).slice(0,5).map(a=>{var g,m;return{...a,service_id:(g=o.value)==null?void 0:g.service_id,is_map:(m=o.value)==null?void 0:m.is_map}}));return(p,a)=>(e.openBlock(),e.createElementBlock("div",I1,[e.createElementVNode("div",j1,[(e.openBlock(),e.createBlock(e.unref(n),{key:o.value.id,schema:l,modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=g=>o.value=g)},null,8,["modelValue"]))]),e.createElementVNode("h2",O1," Превʼю таблиці ("+e.toDisplayString(u.value)+") ",1),e.createElementVNode("div",U1,[d.value&&c.value.length&&s.value.length?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value),{items:c.value,columns:s.value,path:"#",id_key:"id","hide-details-button":t.hideDetailsButton,key:i.value},null,8,["items","columns","hide-details-button"])):c.value.length?(e.openBlock(),e.createElementBlock("div",H1," Додайте колонки та виберіть вигляд для перегляду ")):(e.openBlock(),e.createElementBlock("div",q1," Немає даних для превʼю "))])]))}}),Y1={class:"w-full mb-6"},G1={class:"flex items-center w-full h-10 max-w-md p-1 bg-white border border-gray-200 rounded-md"},Z1=["onClick"],Jl=e.defineComponent({__name:"MapSettingsTabs",props:{tabs:{},activeTab:{}},emits:["update:activeTab"],setup(t,{emit:n}){const o=n,r=l=>{o("update:activeTab",l)};return(l,s)=>(e.openBlock(),e.createElementBlock("div",Y1,[e.createElementVNode("div",G1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabs,i=>(e.openBlock(),e.createElementBlock("button",{key:i.id,onClick:d=>r(i.id),class:e.normalizeClass(["inline-flex flex-1 items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all",i.id===t.activeTab?"bg-blue-50 text-blue-700":"text-gray-600 hover:bg-gray-50"])},e.toDisplayString(i.name),11,Z1))),128))])]))}}),K1={class:"relative h-full flex flex-col flex-1 min-h-0 overflow-hidden mx-auto w-full"},X1={class:"mx-1"},J1={class:"text-gray-900 font-semibold"},Q1={key:0,class:"text-center py-12 mt-6 px-[24px]"},ek={key:1,class:"px-[24px] overflow-y-auto"},tk={class:"space-y-6"},nk=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"register",props:{hideDetailsButton:{type:Boolean,default:!1}},setup(t){const n=qe.useRoute(),o=qe.useRouter(),r=e.computed(()=>n.path.replace(/\/[^/]+$/,"")),l=e.computed(()=>{var f;return((f=o.resolve(r.value).meta)==null?void 0:f.title)??""}),s=e.computed(()=>{var f;return((f=g.value)==null?void 0:f.name)||"Налаштування реєстру"}),i=e.ref("list"),d=e.ref(""),u=e.ref(!0),c=[{name:"Список",id:"list"},{name:"Фільтри",id:"filters"},{name:"Картка",id:"card"},{name:"Перегляд",id:"preview"}],p={list:B1,filters:A1,card:R1,preview:W1},a=c.map(f=>f.id),g=e.ref({columns:[],filters:[],card:[],tableData:[]}),m=e.ref([]),y=async()=>{var b;if(!((b=g.value)==null?void 0:b.token)){Ce.notify({type:"error",title:"Помилка",message:"Відсутній токен для збереження"});return}try{const x=await fetch(`/api/gis-registry/${n.params.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(g.value)});if(!x.ok)throw new Error(`Failed to save content: ${x.status}`);Ce.notify({type:"success",title:"Успіх",message:"Контент збережено"})}catch(x){Ce.notify({type:"error",title:"Помилка",message:"Не вдалося зберегти контент"}),console.error(x)}},k=async f=>{try{const x=await(await fetch(`/api/gis-registry/${f}`)).json(),C=Array.isArray(x==null?void 0:x.rows)?x.rows:[];g.value.tableData=C.slice(0,3)}catch(b){console.error("Помилка завантаження превʼю:",b)}},h=async()=>{var f,b;try{u.value=!0;const C=await(await fetch(`/api/data/gis.registers.table/${n.params.id}`)).json(),V=((f=C==null?void 0:C.rows)==null?void 0:f[0])||{};d.value=V.register_key||"",g.value={...V,columns:Array.isArray(V.columns)?V.columns:[],filters:Array.isArray(V.filters)?V.filters:[],card:Array.isArray(V.card)?V.card:[],tableData:Array.isArray(V.tableData)?V.tableData:[]},(b=C==null?void 0:C.tokens)!=null&&b.edit&&(g.value.token=C.tokens.edit),m.value=Array.isArray(C==null?void 0:C.fields)?C.fields:[]}catch(x){console.error("Помилка завантаження даних:",x)}finally{u.value=!1}};return e.onMounted(async()=>{const f=n.query.tab;typeof f=="string"&&a.includes(f)&&(i.value=f),await h(),d.value&&await k(d.value)}),e.watch(i,f=>{n.query.tab!==f&&o.replace({query:{...n.query,tab:f}})}),e.watch(()=>n.query.tab,f=>{typeof f=="string"&&a.includes(f)&&i.value!==f&&(i.value=f)}),e.watch(()=>n.params.id,async(f,b)=>{!f||f===b||(await h(),d.value&&await k(d.value))}),(f,b)=>{const x=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",K1,[e.createVNode(an,{variant:"form",title:s.value},{breadcrumbs:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(x,{to:r.value,class:"text-gray-500 hover:text-gray-700"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1},8,["to"]),e.createElementVNode("span",X1,[e.createVNode(e.unref(ge.LucideChevronRight),{size:16,class:"shrink-0"})])],64)):e.createCommentVNode("",!0),e.createElementVNode("span",J1,e.toDisplayString(s.value),1)]),description:e.withCtx(()=>[...b[3]||(b[3]=[e.createTextVNode("Налаштування реєстру",-1)])]),actions:e.withCtx(()=>[e.createElementVNode("button",{onClick:b[0]||(b[0]=C=>e.unref(o).back()),class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium border h-10 px-4 py-2 border-gray-300 text-gray-700 hover:bg-gray-50"}," Повернутися "),e.createElementVNode("button",{onClick:y,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-white rounded-md text-sm font-medium h-10 px-4 py-2 bg-blue-600 hover:bg-blue-700"}," Зберегти ")]),_:1},8,["title"]),u.value?(e.openBlock(),e.createElementBlock("div",Q1,[...b[4]||(b[4]=[e.createElementVNode("p",{class:"text-gray-500"},"Завантаження...",-1)])])):(e.openBlock(),e.createElementBlock("div",ek,[e.createVNode(Jl,{tabs:c,activeTab:i.value,"onUpdate:activeTab":b[1]||(b[1]=C=>i.value=C)},null,8,["activeTab"]),e.createElementVNode("div",tk,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p[i.value]),{data:g.value,"onUpdate:data":b[2]||(b[2]=C=>g.value=C),fields:m.value,"hide-details-button":t.hideDetailsButton,key:i.value},null,40,["data","fields","hide-details-button"]))])]))])}}})},Symbol.toStringTag,{value:"Module"}));/*! js-yaml 5.2.1 https://github.com/nodeca/js-yaml @license MIT */var Ze=Symbol("NOT_RESOLVED"),pr=Symbol("MERGE_KEY");function ut(t,n){return{tagName:t,nodeKind:"scalar",implicit:n.implicit??!1,matchByTagPrefix:n.matchByTagPrefix??!1,implicitFirstChars:n.implicitFirstChars??null,resolve:n.resolve,identify:n.identify??null,represent:n.represent??(o=>String(o)),representTagName:n.representTagName??null}}function gr(t,n){const o=n.finalize===void 0;return{tagName:t,nodeKind:"sequence",implicit:!1,matchByTagPrefix:n.matchByTagPrefix??!1,create:n.create,addItem:n.addItem,finalize:n.finalize??(r=>r),carrierIsResult:o,identify:n.identify??null,represent:n.represent??(r=>r),representTagName:n.representTagName??null}}function Co(t,n){const o=n.finalize===void 0;return{tagName:t,nodeKind:"mapping",implicit:!1,matchByTagPrefix:n.matchByTagPrefix??!1,create:n.create,addPair:n.addPair,has:n.has,keys:n.keys,get:n.get,finalize:n.finalize??(r=>r),carrierIsResult:o,identify:n.identify??null,represent:n.represent??(r=>r),representTagName:n.representTagName??null}}var ok=ut("tag:yaml.org,2002:str",{resolve:t=>t,identify:t=>typeof t=="string"}),rk=["","~","null","Null","NULL"],lk=ut("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:t=>rk.indexOf(t)!==-1?null:Ze,identify:t=>t===null,represent:()=>"null"}),ak=ut("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:(t,n)=>t==="null"||n&&t===""?null:Ze,identify:t=>t===null,represent:()=>"null"}),sk=["","~","null","Null","NULL"],ik=ut("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:t=>sk.indexOf(t)!==-1?null:Ze,identify:t=>t===null,represent:()=>"null"}),ck=["true","True","TRUE"],dk=["false","False","FALSE"],uk=ut("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:t=>ck.indexOf(t)!==-1?!0:dk.indexOf(t)!==-1?!1:Ze,identify:t=>Object.prototype.toString.call(t)==="[object Boolean]",represent:t=>t?"true":"false"}),fk=["true"],mk=["false"],pk=ut("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:t=>fk.indexOf(t)!==-1?!0:mk.indexOf(t)!==-1?!1:Ze,identify:t=>Object.prototype.toString.call(t)==="[object Boolean]",represent:t=>t?"true":"false"}),gk=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],yk=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],hk=ut("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:t=>gk.indexOf(t)!==-1?!0:yk.indexOf(t)!==-1?!1:Ze,identify:t=>Object.prototype.toString.call(t)==="[object Boolean]",represent:t=>t?"true":"false"}),bk=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),xk=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function kk(t){let n=t,o=1;return(n[0]==="-"||n[0]==="+")&&(n[0]==="-"&&(o=-1),n=n.slice(1)),n.startsWith("0b")?o*parseInt(n.slice(2),2):n.startsWith("0o")?o*parseInt(n.slice(2),8):n.startsWith("0x")?o*parseInt(n.slice(2),16):o*parseInt(n,10)}function wk(t,n){if(n){if(!xk.test(t))return Ze}else if(!bk.test(t))return Ze;const o=kk(t);return Number.isFinite(o)?o:Ze}var Ql=ut("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:wk,identify:t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,represent:t=>t.toString(10)}),_k=new RegExp("^-?(?:0|[1-9][0-9]*)$"),Ek=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function Ck(t){let n=t,o=1;return(n[0]==="-"||n[0]==="+")&&(n[0]==="-"&&(o=-1),n=n.slice(1)),n.startsWith("0b")?o*parseInt(n.slice(2),2):n.startsWith("0o")?o*parseInt(n.slice(2),8):n.startsWith("0x")?o*parseInt(n.slice(2),16):o*parseInt(n,10)}function Nk(t,n){if(n){if(!Ek.test(t))return Ze}else if(!_k.test(t))return Ze;const o=Ck(t);return Number.isFinite(o)?o:Ze}var Vk=ut("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Nk,identify:t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,represent:t=>t.toString(10)}),Bk=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");function $k(t){let n=t.replace(/_/g,""),o=1;if((n[0]==="-"||n[0]==="+")&&(n[0]==="-"&&(o=-1),n=n.slice(1)),n.startsWith("0b"))return o*parseInt(n.slice(2),2);if(n.startsWith("0x"))return o*parseInt(n.slice(2),16);if(n.includes(":")){let r=0;for(const l of n.split(":"))r=r*60+Number(l);return o*r}return n!=="0"&&n[0]==="0"?o*parseInt(n,8):o*parseInt(n,10)}function Sk(t){if(!Bk.test(t))return Ze;const n=$k(t);return Number.isFinite(n)?n:Ze}var yr=ut("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:Sk,identify:t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,represent:t=>t.toString(10)}),vk=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Lk=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Tk(t){if(!vk.test(t))return Ze;let n=t.toLowerCase();const o=n[0]==="-"?-1:1;if("+-".includes(n[0])&&(n=n.slice(1)),n===".inf")return o===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(n===".nan")return NaN;const r=o*parseFloat(n);return Number.isFinite(r)||Lk.test(t)?r:Ze}function Ak(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";const n=t.toString(10);return/^[-+]?[0-9]+e/.test(n)?n.replace("e",".e"):n}var ea=ut("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:Tk,identify:t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),represent:Ak}),Mk=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),Fk=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Dk(t,n){if(n){if(!Fk.test(t))return Ze;let r=t.toLowerCase();const l=r[0]==="-"?-1:1;if("+-".includes(r[0])&&(r=r.slice(1)),r===".inf")return l===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(r===".nan")return NaN;const s=l*parseFloat(r);return Number.isFinite(s)?s:Ze}if(!Mk.test(t))return Ze;const o=Number(t);return Number.isFinite(o)?o:Ze}function Pk(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";const n=t.toString(10);return/^[-+]?[0-9]+e/.test(n)?n.replace("e",".e"):n}var zk=ut("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Dk,identify:t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),represent:Pk}),Rk=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Ik=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function jk(t){if(!Rk.test(t))return Ze;let n=t.toLowerCase().replace(/_/g,"");const o=n[0]==="-"?-1:1;if("+-".includes(n[0])&&(n=n.slice(1)),n===".inf")return o===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(n===".nan")return NaN;let r=0;if(n.includes(":")){for(const l of n.split(":"))r=r*60+Number(l);r*=o}else r=o*parseFloat(n);return Number.isFinite(r)||Ik.test(t)?r:Ze}function Ok(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";const n=t.toString(10);return/^[-+]?[0-9]+e/.test(n)?n.replace("e",".e"):n}var hr=ut("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:jk,identify:t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),represent:Ok}),Uk=ut("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:(t,n)=>t==="<<"||n&&t===""?pr:Ze}),qk=/^[A-Za-z0-9+/]*={0,2}$/;function Hk(t){const n=t.replace(/\s/g,"");if(n.length%4!==0||!qk.test(n))return Ze;const o=atob(n),r=new Uint8Array(o.length);for(let l=0;l<o.length;l++)r[l]=o.charCodeAt(l);return r}function Wk(t){let n="";for(let o=0;o<t.length;o++)n+=String.fromCharCode(t[o]);return btoa(n)}var Yk=ut("tag:yaml.org,2002:binary",{resolve:Hk,identify:t=>Object.prototype.toString.call(t)==="[object Uint8Array]",represent:Wk}),Gk=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Zk=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Kk(t){let n=Gk.exec(t);if(n===null&&(n=Zk.exec(t)),n===null)return Ze;const o=+n[1],r=+n[2]-1,l=+n[3];if(!n[4]){const p=new Date(Date.UTC(o,r,l));return p.getUTCFullYear()!==o||p.getUTCMonth()!==r||p.getUTCDate()!==l?Ze:p}const s=+n[4],i=+n[5],d=+n[6];let u=0;if(s>23||i>59||d>59)return Ze;if(n[7]){let p=n[7].slice(0,3);for(;p.length<3;)p+="0";u=+p}const c=new Date(Date.UTC(o,r,l,s,i,d,u));if(c.getUTCFullYear()!==o||c.getUTCMonth()!==r||c.getUTCDate()!==l)return Ze;if(n[9]){const p=+n[10],a=+(n[11]||0);if(p>23||a>59)return Ze;const g=(p*60+a)*6e4;c.setTime(c.getTime()-(n[9]==="-"?-g:g))}return c}var Xk=ut("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:Kk,identify:t=>t instanceof Date,represent:t=>t.toISOString()}),Jk=gr("tag:yaml.org,2002:seq",{create:()=>[],addItem:(t,n)=>{t.push(n)},identify:Array.isArray});function No(t){if(t===null||typeof t!="object"||Array.isArray(t))return!1;const n=Object.getPrototypeOf(t);return n===null||n===Object.prototype}function br(t,n){const o={};for(const r of n)t[r]!==void 0&&(o[r]=t[r]);return o}var Qk=gr("tag:yaml.org,2002:omap",{create:()=>({list:[],seen:new Set}),addItem:(t,n)=>{let o;if(n instanceof Map){if(n.size!==1)return"cannot resolve an ordered map item";o=n.keys().next().value}else if(No(n)){const r=Object.keys(n);if(r.length!==1)return"cannot resolve an ordered map item";o=r[0]}else return"cannot resolve an ordered map item";return t.seen.has(o)?"duplicate key in ordered map":(t.seen.add(o),t.list.push(n),"")},finalize:t=>t.list}),ew=gr("tag:yaml.org,2002:pairs",{create:()=>[],addItem:(t,n)=>{if(n instanceof Map)return n.size!==1?"cannot resolve a pairs item":(t.push(n.entries().next().value),"");if(Object.prototype.toString.call(n)!=="[object Object]")return"cannot resolve a pairs item";const o=n,r=Object.keys(o);return r.length!==1?"cannot resolve a pairs item":(t.push([r[0],o[r[0]]]),"")}}),tw=Co("tag:yaml.org,2002:map",{create:()=>({}),identify:No,represent:t=>{const n=new Map;for(const o of Object.keys(t))n.set(o,t[o]);return n},addPair:(t,n,o)=>{if(n!==null&&typeof n=="object")return"object-based map does not support complex keys";const r=String(n);return r==="__proto__"?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,""},has:(t,n)=>n!==null&&typeof n=="object"?!1:Object.prototype.hasOwnProperty.call(t,String(n)),keys:t=>Object.keys(t),get:(t,n)=>t[String(n)]}),nw=Co("tag:yaml.org,2002:set",{create:()=>new Set,identify:t=>t instanceof Set,represent:t=>{const n=new Map;for(const o of t)n.set(o,null);return n},addPair:(t,n,o)=>o!==null?"cannot resolve a set item":(t.add(n),""),has:(t,n)=>t.has(n),keys:t=>t.keys(),get:()=>null});function ow(){return{scalar:{},sequence:{},mapping:{}}}function rw(){return{scalar:[],sequence:[],mapping:[]}}function lw(t){const n=[];for(const o of t){let r=n.length;for(let l=0;l<n.length;l++){const s=n[l];if(s.nodeKind===o.nodeKind&&s.tagName===o.tagName&&s.matchByTagPrefix===o.matchByTagPrefix){r=l;break}}n[r]=o}return n}var Vo=class ts{constructor(n){dt(this,"tags");dt(this,"implicitScalarTags");dt(this,"implicitScalarByFirstChar");dt(this,"implicitScalarAnyFirstChar");dt(this,"defaultScalarTag");dt(this,"defaultSequenceTag");dt(this,"defaultMappingTag");dt(this,"exact");dt(this,"prefix");const o=lw(n),r=[],l=ow(),s=rw();for(const p of o){if(p.nodeKind==="scalar"&&p.implicit){if(p.matchByTagPrefix)throw new Error("Implicit scalar tags cannot match by tag prefix");r.push(p)}switch(p.nodeKind){case"scalar":p.matchByTagPrefix?s.scalar.push(p):l.scalar[p.tagName]=p;break;case"sequence":p.matchByTagPrefix?s.sequence.push(p):l.sequence[p.tagName]=p;break;case"mapping":p.matchByTagPrefix?s.mapping.push(p):l.mapping[p.tagName]=p;break}}const i=r.filter(p=>p.implicitFirstChars===null),d=new Set;for(const p of r)if(p.implicitFirstChars!==null)for(const a of p.implicitFirstChars)d.add(a);const u=new Map;for(const p of d)u.set(p,r.filter(a=>a.implicitFirstChars===null||a.implicitFirstChars.indexOf(p)!==-1));const c=l.scalar["tag:yaml.org,2002:str"];if(!c)throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=o,this.implicitScalarTags=r,this.implicitScalarByFirstChar=u,this.implicitScalarAnyFirstChar=i,this.defaultScalarTag=c,this.defaultSequenceTag=l.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=l.mapping["tag:yaml.org,2002:map"],this.exact=l,this.prefix=s}withTags(...n){let o=[];for(const r of n)o=o.concat(r);return new ts([...this.tags,...o])}},xr=new Vo([ok,Jk,tw]);new Vo([...xr.tags,ak,pk,Vk,zk]);var aw=new Vo([...xr.tags,lk,uk,Ql,ea]),sw=new Vo([...xr.tags,ik,hk,yr,hr,Xk,Uk,Yk,Qk,ew,nw]);Co("tag:yaml.org,2002:map",{create:()=>new Map,addPair:(t,n,o)=>(t.set(n,o),""),has:(t,n)=>t.has(n),keys:t=>t.keys(),get:(t,n)=>t.get(n),identify:t=>t instanceof Map||No(t),represent:t=>{if(t instanceof Map)return t;const n=new Map,o=t;for(const r of Object.keys(o))n.set(r,o[r]);return n}});function ta(t){if(Array.isArray(t)){const n=Array.prototype.slice.call(t);for(let o=0;o<n.length;o++){if(Array.isArray(n[o]))return null;typeof n[o]=="object"&&Object.prototype.toString.call(n[o])==="[object Object]"&&(n[o]="[object Object]")}return String(n)}return typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"?"[object Object]":String(t)}Co("tag:yaml.org,2002:map",{create:()=>({}),identify:No,represent:t=>{const n=new Map;for(const o of Object.keys(t))n.set(o,t[o]);return n},addPair:(t,n,o)=>{const r=ta(n);return r===null?"nested arrays are not supported inside keys":(r==="__proto__"?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,"")},has:(t,n)=>{const o=ta(n);return o!==null&&Object.prototype.hasOwnProperty.call(t,o)},keys:t=>Object.keys(t),get:(t,n)=>t[String(n)]});var iw={maxLength:79,indent:1,linesBefore:3,linesAfter:2};function kr(t,n,o,r,l){let s="",i="";const d=Math.floor(l/2)-1;return r-n>d&&(s=" ... ",n=r-d+s.length),o-r>d&&(i=" ...",o=r+d-i.length),{str:s+t.slice(n,o).replace(/\t/g,"→")+i,pos:r-n+s.length}}function wr(t,n){return" ".repeat(Math.max(n-t.length,0))+t}function cw(t,n){if(!t.buffer)return null;const o={...iw,...n},r=/\r?\n|\r|\0/g,l=[0],s=[];let i,d=-1;for(;i=r.exec(t.buffer);)s.push(i.index),l.push(i.index+i[0].length),t.position<=i.index&&d<0&&(d=l.length-2);d<0&&(d=l.length-1);let u="";const c=Math.min(t.line+o.linesAfter,s.length).toString().length,p=o.maxLength-(o.indent+c+3);for(let g=1;g<=o.linesBefore&&!(d-g<0);g++){const m=kr(t.buffer,l[d-g],s[d-g],t.position-(l[d]-l[d-g]),p);u=`${" ".repeat(o.indent)}${wr((t.line-g+1).toString(),c)} | ${m.str}
|
|
6
|
+
`)});return}if(p.value===null)m.value=[...m.value,{...c.value}];else{const w=[...m.value];w[p.value]={...c.value},m.value=w}k()}const f=e.ref(null),b=e.ref(null),x=_=>{f.value=_},C=_=>{b.value=_},V=_=>{if(f.value===null||f.value===_){f.value=null,b.value=null;return}const w=[...m.value],[$]=w.splice(f.value,1);w.splice(_,0,$),m.value=w,f.value=null,b.value=null};return(_,w)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.addButton?(e.openBlock(),e.createElementBlock("div",Gx,[e.createElementVNode("div",Zx,[e.createElementVNode("button",{onClick:w[0]||(w[0]=$=>u.value=!0),class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&_svg]:shrink-0 bg-primary hover:bg-primary/90 h-10 px-4 py-2 bg-gradient-to-r from-blue-600 to-blue-500 hover:from-blue-700 hover:to-blue-600 text-white"},[...w[4]||(w[4]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),e.createTextVNode(" Додати поле ",-1)])])])])):e.createCommentVNode("",!0),e.createElementVNode("div",Kx,[e.createElementVNode("div",Xx,[e.createElementVNode("table",Jx,[e.createElementVNode("colgroup",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,$=>(e.openBlock(),e.createElementBlock("col",{key:$.key,style:e.normalizeStyle($.type==="main"?`width: ${t.mainColWidth}`:$.width?`width: ${$.width}`:"auto")},null,4))),128)),w[5]||(w[5]=e.createElementVNode("col",null,null,-1))]),e.createElementVNode("thead",null,[e.createElementVNode("tr",Qx,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,$=>(e.openBlock(),e.createElementBlock("th",{key:$.key,class:"px-6 py-4"},e.toDisplayString($.label),1))),128)),w[6]||(w[6]=e.createElementVNode("th",{class:"px-6 py-4"},"Дії",-1))])]),m.value.length?(e.openBlock(),e.createElementBlock("tbody",e1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,($,L)=>(e.openBlock(),e.createElementBlock("tr",{key:$.id||$.name||L,class:e.normalizeClass(["transition-colors hover:bg-gray-50/50 cursor-move",{"opacity-50":f.value===L,"border-t-2 border-b-2 border-blue-500 bg-blue-50":b.value===L}]),draggable:"true",onDragstart:G=>x(L),onDragover:e.withModifiers(G=>C(L),["prevent"]),onDrop:G=>V(L)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,G=>(e.openBlock(),e.createElementBlock("td",{key:G.key,class:"px-6 py-4 align-middle text-center"},[G.type==="main"?(e.openBlock(),e.createElementBlock("div",n1,[w[7]||(w[7]=e.createElementVNode("span",{class:"drag-handle cursor-move mr-2 text-gray-400"},"☰",-1)),e.unref(Zl)($.format==="yes/no"?"check":$.format||$.type)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex items-center justify-center p-1 rounded",`bg-${e.unref(Gl)($.format==="yes/no"?"check":$.format||$.type)}-100`])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent($.format==="yes/no"?"icon-check":e.unref(Kl)["Icon"+o($.format||$.type)]||e.unref(Kl).IconText),{class:"w-4 h-4"}))],2)):e.createCommentVNode("",!0),e.createElementVNode("div",o1,[e.withDirectives((e.openBlock(),e.createElementBlock("p",r1,[e.createTextVNode(e.toDisplayString($.name||$.id),1)])),[[e.unref(Db)]]),e.createElementVNode("p",l1,e.toDisplayString($.ua||$.label||$.name||$.id),1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[G.slot&&g(G.slot)?e.renderSlot(_.$slots,G.slot,{row:$,column:G,value:$[G.key],rowIndex:L},void 0,!0,0):G.type==="color"?(e.openBlock(),e.createElementBlock("div",a1,[e.createElementVNode("div",{class:e.normalizeClass(["w-4 h-4 rounded-full align-middle",`bg-[${$[G.key]}]`])},null,2)])):["format","type","meta"].includes(G.key)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[$[G.key]?(e.openBlock(),e.createElementBlock("span",s1,e.toDisplayString($[G.key]),1)):(e.openBlock(),e.createElementBlock("span",i1,"Не вказано"))],64)):(e.openBlock(),e.createElementBlock("span",c1,e.toDisplayString($[G.key]),1))],64))]))),128)),e.createElementVNode("td",d1,[e.createVNode(Fb,{columns:m.value,"onUpdate:columns":w[1]||(w[1]=G=>m.value=G),data:$,index:L,scheme:t.formScheme},null,8,["columns","data","index","scheme"])])],42,t1))),128))])):(e.openBlock(),e.createElementBlock("tr",u1,[e.createElementVNode("td",{colspan:y.value.length+1,class:"text-gray-500 text-center py-4"}," Поля не знайдені ",8,f1)]))])])]),e.createVNode(e.unref(r),{teleport:"#modal",title:"Створити поле",size:"lg",visible:u.value,"onUpdate:visible":w[3]||(w[3]=$=>u.value=$)},{footer:e.withCtx(()=>[e.createElementVNode("div",{class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},[e.createElementVNode("button",{type:"button",onClick:k,class:"px-4 py-2 rounded bg-gray-100 text-gray-700"}," Скасувати "),e.createElementVNode("button",{type:"button",onClick:h,class:"px-4 py-2 rounded bg-blue-600 text-white"}," Зберегти1 ")])]),default:e.withCtx(()=>[e.createVNode(e.unref(l),{ref_key:"form",ref:d,modelValue:c.value,"onUpdate:modelValue":w[2]||(w[2]=$=>c.value=$),schema:t.formScheme},null,8,["modelValue","schema"])]),_:1},8,["visible"])],64))}}),[["__scopeId","data-v-25566600"]]),m1={class:"p-4 text-[13px]"},p1={class:"grid grid-cols-2 gap-x-6 gap-y-2"},g1=["id","checked","onChange"],y1={class:"ml-2 flex-1 min-w-0 flex items-center gap-2"},h1={class:"font-medium text-gray-900 truncate"},b1={class:"text-xs text-gray-500"},x1={key:0,class:"text-xs text-[#B2C9D6]"},k1={class:"flex justify-end gap-2 p-4 border-t w-full"},sn=e.defineComponent({__name:"import-fields-dialog",props:e.mergeModels({fields:{default:()=>[]},title:{},idPrefix:{default:"import"},confirmText:{default:"Імпортувати"},cancelText:{default:"Скасувати"}},{visible:{type:Boolean,default:!1},visibleModifiers:{},selection:{default:[]},selectionModifiers:{}}),emits:e.mergeModels(["confirm","cancel"],["update:visible","update:selection"]),setup(t,{emit:n}){const o=e.useModel(t,"visible"),r=e.useModel(t,"selection"),l=t,s=n,i=e.defineAsyncComponent(()=>import("@opengis/core").then(x=>x.VsModal)),d=e.computed(()=>Array.isArray(l.fields)?l.fields.filter(Boolean):[]),u=x=>(x==null?void 0:x.name)??(x==null?void 0:x.id)??(x==null?void 0:x.key)??(x==null?void 0:x.code)??(x==null?void 0:x.field)??(x==null?void 0:x.value)??"",c=x=>String(u(x)??"").trim(),p=x=>(x==null?void 0:x.title)??(x==null?void 0:x.label)??c(x),a=x=>String((x==null?void 0:x.type)??"").trim(),g=e.computed(()=>new Set(r.value.map(x=>String(x??"").trim()))),m=x=>g.value.has(c(x)),y=x=>{const C=c(x);if(!C)return;const V=new Set(g.value);V.has(C)?V.delete(C):V.add(C),r.value=Array.from(V)},k=e.computed(()=>l.confirmText||"Імпортувати"),h=e.computed(()=>l.cancelText||"Скасувати"),f=()=>{o.value=!1,s("cancel")},b=()=>{s("confirm"),o.value=!1};return(x,C)=>(e.openBlock(),e.createBlock(e.unref(i),{visible:o.value,"onUpdate:visible":C[0]||(C[0]=V=>o.value=V),teleport:"#modal",title:t.title,size:"lg"},{footer:e.withCtx(()=>[e.createElementVNode("div",k1,[e.createElementVNode("button",{onClick:f,class:"px-4 py-2 rounded bg-gray-100 text-gray-700"},e.toDisplayString(h.value),1),e.createElementVNode("button",{onClick:b,class:"px-4 py-2 rounded bg-blue-600 text-white"},e.toDisplayString(k.value),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",m1,[e.createElementVNode("div",p1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,V=>(e.openBlock(),e.createElementBlock("label",{key:c(V),class:"flex items-center hover:bg-gray-100 rounded p-2 cursor-pointer"},[e.createElementVNode("input",{type:"checkbox",id:`${t.idPrefix}-${c(V)}`,checked:m(V),onChange:_=>y(V)},null,40,g1),e.createElementVNode("div",y1,[e.unref(Zl)(V.type)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`bg-${e.unref(Gl)(V.type)}-100 p-1 rounded`)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(`icon-${V.type}`),{class:"w-4 h-4"}))],2)):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("p",h1,e.toDisplayString(c(V)),1),e.createElementVNode("p",b1,e.toDisplayString(p(V)),1),a(V)?(e.openBlock(),e.createElementBlock("p",x1,e.toDisplayString(a(V)),1)):e.createCommentVNode("",!0)])])]))),128))])])]),_:1},8,["visible","title"]))}});function cn(t){return t==null?"":String(t).trim()}function zt(t){return cn((t==null?void 0:t.name)??(t==null?void 0:t.id)??(t==null?void 0:t.key)??(t==null?void 0:t.code)??(t==null?void 0:t.field)??(t==null?void 0:t.value)??"")}function dn(t,n,o){const r=Array.isArray(t)?[...t]:[],l=Array.isArray(n)?n:[],{selectedKeys:s,resolveKey:i}=o,d=new Set;for(const a of s){const g=cn(a);g&&d.add(g)}if(d.size===0)return[];const u=a=>cn(i(a)),c=[],p=new Set;for(const a of r){const g=u(a);!g||!d.has(g)||(c.push(a),p.add(g))}for(const a of l){const g=u(a);!g||p.has(g)||!d.has(g)||(c.push(a),p.add(g))}return c}const w1={class:"vs-form"},_1={class:"vs-form__body auto-rows-max container"},E1={class:"flex flex-wrap"},C1={class:"h-fit w-full mb-6 bg-white border border-gray-200 rounded-lg p-6"},N1={class:"h-fit w-full flex flex-wrap"},V1={class:"w-full"},B1=e.defineComponent({__name:"list-tab",props:e.mergeModels({fields:{}},{data:{default:{}},dataModifiers:{},form:{},formModifiers:{}}),emits:["update:data","update:form"],setup(t){const n=e.useModel(t,"data"),o=e.useModel(t,"form"),r=t,l=e.computed(()=>Array.isArray(r.fields)?r.fields:[]),s=b=>zt(b||{}),i=e.defineAsyncComponent(()=>import("@opengis/form")),d=e.ref(),u=e.ref(!1),c=e.ref([]),p=()=>{const b=g.value.map(x=>s(x)).filter(x=>x.length>0);c.value=[...b],u.value=!0},a=e.computed(()=>{var b,x;return((b=n.value)==null?void 0:b.token)||((x=n.value)==null?void 0:x.id)||"register-form"}),g=e.computed({get:()=>(n.value||(n.value={}),Array.isArray(n.value.columns)||(n.value.columns=[]),n.value.columns),set:b=>{n.value||(n.value={}),n.value.columns=Array.isArray(b)?b:[]}}),m=e.computed({get:()=>n.value||{},set:b=>{var C;const x=Array.isArray((C=n.value)==null?void 0:C.columns)?n.value.columns:[];n.value={...n.value,...b,columns:x}}});e.watch(()=>d.value,b=>{o.value=b||null},{immediate:!0}),e.watch(u,b=>{b||(c.value=[])});const y=()=>{const b=new Set(c.value.map(V=>cn(V)).filter(V=>V.length>0)),x=Array.isArray(g.value)?[...g.value]:[],C=l.value.filter(V=>b.has(s(V))).map(V=>{const _=s(V),w=V.title??V.label??_;return{...V,name:_,label:w,type:V.type||"text",meta:V.meta??"features"}});g.value=dn(x,C,{selectedKeys:c.value,resolveKey:s}),u.value=!1,c.value=[]},k={table_name:{type:"select",label:"Таблиця",required:!0,data:"pg.table_name",placeholder:"Таблиця в БД",validators:["required"],col:6},name:{type:"text",label:"Назва",required:!0,placeholder:"Назва",validators:["required"],col:6},query:{type:"text",label:"Умова",placeholder:"Умова",col:6},order:{type:"text",label:"Сортування",placeholder:"Сортування",col:6},description:{type:"textarea",label:"Опис",placeholder:"Опис",col:12}},h=[{key:"name",label:"Name",type:"text"},{key:"label",label:"Назва",type:"text"},{key:"meta",label:"Мета",type:"text"}],f={name:{type:"text",label:"Назва колонки",validators:["required"],disabled:!0},ua:{type:"text",label:"Назва",validators:["required"]},format:{type:"radio",label:"Формат",position:"horizontal",options:[{text:"Text",id:"text"},{text:"Number",id:"number"},{text:"Date",id:"date"},{text:"File",id:"file"},{text:"Select",id:"select"},{text:"Badge",id:"badge"},{text:"Tags",id:"tags"}],validators:["required"]},is_export:{type:"switcher",label:"Експорт",info:"Чи експортувати дані колонки?",view:"switcher"},meta:{type:"combobox",label:"Мета",mode:"combo",options:[{text:"Title",id:"title"},{text:"Features",id:"features"},{text:"Status",id:"status"},{text:"Tags",id:"tags"},{text:"Category",id:"category"},{text:"Image",id:"image"}]},data:{type:"select",label:"Класифікатор",data:"admin.cls.name",conditions:["format","in",["select","badge","tags"]]}};return e.onBeforeUnmount(()=>{o.value=null}),(b,x)=>(e.openBlock(),e.createElementBlock("div",w1,[e.createElementVNode("div",_1,[e.createElementVNode("div",E1,[e.createElementVNode("div",C1,[(e.openBlock(),e.createBlock(e.unref(i),{ref_key:"formEl",ref:d,key:a.value,schema:k,modelValue:m.value,"onUpdate:modelValue":x[0]||(x[0]=C=>m.value=C)},null,8,["modelValue"]))]),e.createElementVNode("div",N1,[e.createElementVNode("div",{class:"flex justify-end mb-3 gap-2 w-full"},[e.createElementVNode("button",{onClick:p,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary hover:bg-primary/90 h-10 px-4 py-2 bg-gradient-to-r from-blue-600 to-blue-500 hover:from-blue-700 hover:to-blue-600 text-white"},[...x[4]||(x[4]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2",class:"mr-1"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4v16m8-8H4"})],-1),e.createTextVNode(" Імпорт ",-1)])])]),e.createElementVNode("div",V1,[e.createVNode(Pt,{modelValue:g.value,"onUpdate:modelValue":x[1]||(x[1]=C=>g.value=C),"columns-scheme":h,"form-scheme":f,"main-col-width":"250px","add-button":!1},null,8,["modelValue"])])])])]),e.createVNode(sn,{visible:u.value,"onUpdate:visible":x[2]||(x[2]=C=>u.value=C),selection:c.value,"onUpdate:selection":x[3]||(x[3]=C=>c.value=C),fields:l.value,title:"Імпорт колонок","id-prefix":"import-column",onConfirm:y},null,8,["visible","selection","fields"])]))}}),$1={class:"vs-form"},S1={class:"vs-form__body auto-rows-max container"},v1={class:"flex flex-wrap"},L1={class:"h-fit w-full flex flex-wrap"},T1={class:"w-full"},A1=e.defineComponent({__name:"filter-tab",props:e.mergeModels({fields:{}},{data:{default:{}},dataModifiers:{},form:{},formModifiers:{}}),emits:["update:data","update:form"],setup(t){const n=e.useModel(t,"data"),o=e.useModel(t,"form"),r=t,l=e.computed(()=>Array.isArray(r.fields)?r.fields:[]),s=m=>zt(m||{}),i=e.ref(!1),d=e.ref([]),u=()=>{const m=c.value.map(y=>s(y)).filter(y=>y.length>0);d.value=[...m],i.value=!0},c=e.computed({get:()=>(n.value||(n.value={}),Array.isArray(n.value.filters)||(n.value.filters=[]),n.value.filters),set:m=>{n.value||(n.value={}),n.value.filters=Array.isArray(m)?m:[]}});e.watch(i,m=>{m||(d.value=[])});const p=()=>{const m=new Set(d.value.map(h=>cn(h)).filter(h=>h.length>0)),y=Array.isArray(c.value)?[...c.value]:[],k=l.value.filter(h=>m.has(s(h))).map(h=>({name:s(h),label:h.title??h.label??s(h),type:h.type||"text"}));c.value=dn(y,k,{selectedKeys:d.value,resolveKey:s}),i.value=!1,d.value=[]},a=[{key:"id",label:"Name"},{key:"label",label:"Назва"},{key:"type",label:"Тип"}],g={name:{type:"text",label:"Назва колонки",validators:["required"],disabled:!0},ua:{type:"text",label:"Назва",validators:["required"]},type:{type:"radio",label:"Тип",validators:["required"],position:"horizontal",options:[{text:"Check",id:"Check"},{text:"Range",id:"Range"},{text:"Date",id:"Date"},{text:"Text",id:"Text"},{text:"Select",id:"Select"}]},hidden:{label:"Приховати",type:"Switcher"},data:{type:"select",label:"Класифікатор",data:"admin.cls.name",conditions:["type","in",["Select","Autocomplete","Check"]]}};return e.onBeforeUnmount(()=>{o.value=null}),(m,y)=>(e.openBlock(),e.createElementBlock("div",$1,[e.createElementVNode("div",S1,[e.createElementVNode("div",v1,[y[4]||(y[4]=e.createElementVNode("div",{class:"h-fit w-full flex flex-wrap mb-6 px-2"},[e.createElementVNode("p",{class:"text-sm text-gray-600"}," Налаштуйте фільтри реєстру. Оберіть поля для імпорту або відредагуйте властивості вручну. ")],-1)),e.createElementVNode("div",L1,[e.createElementVNode("div",{class:"flex justify-end mb-3 gap-2 w-full"},[e.createElementVNode("button",{onClick:u,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary hover:bg-primary/90 h-10 px-4 py-2 bg-gradient-to-r from-blue-600 to-blue-500 hover:from-blue-700 hover:to-blue-600 text-white"},[...y[3]||(y[3]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2",class:"mr-1"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4v16m8-8H4"})],-1),e.createTextVNode(" Імпорт ",-1)])])]),e.createElementVNode("div",T1,[e.createVNode(Pt,{modelValue:c.value,"onUpdate:modelValue":y[0]||(y[0]=k=>c.value=k),"columns-scheme":a,"form-scheme":g,"main-col-width":"250px","add-button":!1},null,8,["modelValue"])])])])]),e.createVNode(sn,{visible:i.value,"onUpdate:visible":y[1]||(y[1]=k=>i.value=k),selection:d.value,"onUpdate:selection":y[2]||(y[2]=k=>d.value=k),fields:l.value,title:"Імпорт фільтрів","id-prefix":"import-filter",onConfirm:p},null,8,["visible","selection","fields"])]))}}),M1={class:"vs-form"},F1={class:"vs-form__body auto-rows-max container"},D1={class:"flex flex-wrap"},P1={class:"h-fit w-full flex flex-wrap"},z1={class:"w-full"},R1=e.defineComponent({__name:"card-tab",props:e.mergeModels({fields:{}},{data:{default:{}},dataModifiers:{},form:{},formModifiers:{}}),emits:["update:data","update:form"],setup(t){const n=e.useModel(t,"data"),o=e.useModel(t,"form"),r=t,l=e.computed(()=>Array.isArray(r.fields)?r.fields:[]),s=m=>zt(m||{}),i=e.ref(!1),d=e.ref([]),u=()=>{const m=c.value.map(y=>s(y)).filter(y=>y.length>0);d.value=[...m],i.value=!0},c=e.computed({get:()=>n.value.card,set:m=>{n.value||(n.value={}),n.value.card=Array.isArray(m)?m:[]}});e.watch(i,m=>{var y;if(m){const k=((y=c.value)==null?void 0:y.map(h=>h.name))||[];d.value=[...k]}});const p=()=>{const m=new Set(d.value.map(h=>cn(h)).filter(h=>h.length>0)),y=Array.isArray(c.value)?[...c.value]:[],k=l.value.filter(h=>m.has(s(h))).map(h=>{const f=s(h),b=h.title??h.label??f;return{...h,name:f,label:b,format:h.format||h.type||"text",meta:h.meta||"title"}});c.value=dn(y,k,{selectedKeys:d.value,resolveKey:s}),i.value=!1,d.value=[]},a=[{key:"name",label:"Name",type:"text"},{key:"label",label:"Назва",type:"text"},{key:"format",label:"Формат",type:"text"}],g={name:{type:"text",label:"Назва колонки",validators:["required"],disabled:!0},ua:{type:"text",label:"Назва",validators:["required"]},format:{type:"radio",label:"Формат",position:"horizontal",options:[{text:"Text",id:"text"},{text:"Number",id:"number"},{text:"Date",id:"date"},{text:"File",id:"file"},{text:"Select",id:"select"},{text:"Badge",id:"badge"},{text:"Tags",id:"tags"}],validators:["required"]},data:{type:"select",label:"Класифікатор",data:"admin.cls.name",conditions:["format","in",["select","badge","tags"]]}};return e.onBeforeUnmount(()=>{o.value=null}),(m,y)=>(e.openBlock(),e.createElementBlock("div",M1,[e.createElementVNode("div",F1,[e.createElementVNode("div",D1,[y[4]||(y[4]=e.createElementVNode("div",{class:"h-fit w-full flex flex-wrap mb-6 px-2"},[e.createElementVNode("p",{class:"text-sm text-gray-600"}," Налаштуйте відображення картки. Оберіть потрібні поля та відредагуйте їхні властивості. ")],-1)),e.createElementVNode("div",P1,[e.createElementVNode("div",{class:"flex justify-end mb-3 gap-2 w-full"},[e.createElementVNode("button",{onClick:u,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary hover:bg-primary/90 h-10 px-4 py-2 bg-gradient-to-r from-blue-600 to-blue-500 hover:from-blue-700 hover:to-blue-600 text-white"},[...y[3]||(y[3]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2",class:"mr-1"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4v16m8-8H4"})],-1),e.createTextVNode(" Імпорт ",-1)])])]),e.createElementVNode("div",z1,[e.createVNode(Pt,{modelValue:c.value,"onUpdate:modelValue":y[0]||(y[0]=k=>c.value=k),"columns-scheme":a,"form-scheme":g,"main-col-width":"250px","add-button":!1},null,8,["modelValue"])])])])]),e.createVNode(sn,{visible:i.value,"onUpdate:visible":y[1]||(y[1]=k=>i.value=k),selection:d.value,"onUpdate:selection":y[2]||(y[2]=k=>d.value=k),fields:l.value,title:"Імпорт полів картки","id-prefix":"import-card",onConfirm:p},null,8,["visible","selection","fields"])]))}}),Xl={template1:Ul,template2:ql,template3:Hl,template4:Wl,template5:Yl},I1={class:"space-y-4"},j1={class:"flex items-center gap-4 bg-white border border-gray-200 rounded-lg px-6 py-4"},O1={class:"text-lg font-semibold mb-4"},U1={class:"bg-white"},q1={key:1,class:"text-gray-400 text-center py-12"},H1={key:2,class:"text-gray-400 text-center py-12"},W1=e.defineComponent({__name:"preview-tab",props:e.mergeModels({hideDetailsButton:{type:Boolean,default:!1}},{data:{default:{}},dataModifiers:{}}),emits:["update:data"],setup(t){const n=e.defineAsyncComponent(()=>import("@opengis/form")),o=e.useModel(t,"data"),r=[{text:"template1",id:"template1"},{text:"template2",id:"template2"},{text:"template3",id:"template3"},{text:"template4",id:"template4"},{text:"template5",id:"template5"}],l={view:{type:"radio",label:"Вигляд",position:"horizontal",required:!0,options:r,col:12}},s=e.computed(()=>{var p;return Array.isArray((p=o.value)==null?void 0:p.columns)?o.value.columns:[]}),i=e.computed(()=>{var p;return((p=o.value)==null?void 0:p.view)||"template1"}),d=e.computed(()=>Xl[i.value]||Xl.template1),u=e.computed(()=>{var g;const p=(g=o.value)==null?void 0:g.view;if(!p)return"template1";const a=r.find(m=>m.id===p);return(a==null?void 0:a.text)||p}),c=e.computed(()=>(Array.isArray(o.value.tableData)?o.value.tableData:[]).slice(0,5).map(a=>{var g,m;return{...a,service_id:(g=o.value)==null?void 0:g.service_id,is_map:(m=o.value)==null?void 0:m.is_map}}));return(p,a)=>(e.openBlock(),e.createElementBlock("div",I1,[e.createElementVNode("div",j1,[(e.openBlock(),e.createBlock(e.unref(n),{key:o.value.id,schema:l,modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=g=>o.value=g)},null,8,["modelValue"]))]),e.createElementVNode("h2",O1," Превʼю таблиці ("+e.toDisplayString(u.value)+") ",1),e.createElementVNode("div",U1,[d.value&&c.value.length&&s.value.length?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value),{items:c.value,columns:s.value,path:"#",id_key:"id","hide-details-button":t.hideDetailsButton,key:i.value},null,8,["items","columns","hide-details-button"])):c.value.length?(e.openBlock(),e.createElementBlock("div",H1," Додайте колонки та виберіть вигляд для перегляду ")):(e.openBlock(),e.createElementBlock("div",q1," Немає даних для превʼю "))])]))}}),Y1={class:"w-full mb-6"},G1={class:"flex items-center w-full h-10 max-w-md p-1 bg-white border border-gray-200 rounded-md"},Z1=["onClick"],Jl=e.defineComponent({__name:"MapSettingsTabs",props:{tabs:{},activeTab:{}},emits:["update:activeTab"],setup(t,{emit:n}){const o=n,r=l=>{o("update:activeTab",l)};return(l,s)=>(e.openBlock(),e.createElementBlock("div",Y1,[e.createElementVNode("div",G1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabs,i=>(e.openBlock(),e.createElementBlock("button",{key:i.id,onClick:d=>r(i.id),class:e.normalizeClass(["inline-flex flex-1 items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all",i.id===t.activeTab?"bg-blue-50 text-blue-700":"text-gray-600 hover:bg-gray-50"])},e.toDisplayString(i.name),11,Z1))),128))])]))}}),K1={class:"relative h-full flex flex-col flex-1 min-h-0 overflow-hidden mx-auto w-full"},X1={class:"mx-1"},J1={class:"text-gray-900 font-semibold"},Q1={key:0,class:"text-center py-12 mt-6 px-[24px]"},ek={key:1,class:"px-[24px] overflow-y-auto"},tk={class:"space-y-6"},nk=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"register",props:{hideDetailsButton:{type:Boolean,default:!1}},setup(t){const n=qe.useRoute(),o=qe.useRouter(),r=e.computed(()=>n.path.replace(/\/[^/]+$/,"")),l=e.computed(()=>{var f;return((f=o.resolve(r.value).meta)==null?void 0:f.title)??""}),s=e.computed(()=>{var f;return((f=g.value)==null?void 0:f.name)||"Налаштування реєстру"}),i=e.ref("list"),d=e.ref(""),u=e.ref(!0),c=[{name:"Список",id:"list"},{name:"Фільтри",id:"filters"},{name:"Картка",id:"card"},{name:"Перегляд",id:"preview"}],p={list:B1,filters:A1,card:R1,preview:W1},a=c.map(f=>f.id),g=e.ref({columns:[],filters:[],card:[],tableData:[]}),m=e.ref([]),y=async()=>{var b;if(!((b=g.value)==null?void 0:b.token)){Ce.notify({type:"error",title:"Помилка",message:"Відсутній токен для збереження"});return}try{const x=await fetch(`/api/gis-registry/${n.params.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(g.value)});if(!x.ok)throw new Error(`Failed to save content: ${x.status}`);Ce.notify({type:"success",title:"Успіх",message:"Контент збережено"})}catch(x){Ce.notify({type:"error",title:"Помилка",message:"Не вдалося зберегти контент"}),console.error(x)}},k=async f=>{try{const x=await(await fetch(`/api/gis-registry/${f}`)).json(),C=Array.isArray(x==null?void 0:x.rows)?x.rows:[];g.value.tableData=C.slice(0,3)}catch(b){console.error("Помилка завантаження превʼю:",b)}},h=async()=>{var f,b;try{u.value=!0;const C=await(await fetch(`/api/data/gis.registers.table/${n.params.id}`)).json(),V=((f=C==null?void 0:C.rows)==null?void 0:f[0])||{};d.value=V.register_key||"",g.value={...V,columns:Array.isArray(V.columns)?V.columns:[],filters:Array.isArray(V.filters)?V.filters:[],card:Array.isArray(V.card)?V.card:[],tableData:Array.isArray(V.tableData)?V.tableData:[]},(b=C==null?void 0:C.tokens)!=null&&b.edit&&(g.value.token=C.tokens.edit),m.value=Array.isArray(C==null?void 0:C.fields)?C.fields:[]}catch(x){console.error("Помилка завантаження даних:",x)}finally{u.value=!1}};return e.onMounted(async()=>{const f=n.query.tab;typeof f=="string"&&a.includes(f)&&(i.value=f),await h(),d.value&&await k(d.value)}),e.watch(i,f=>{n.query.tab!==f&&o.replace({query:{...n.query,tab:f}})}),e.watch(()=>n.query.tab,f=>{typeof f=="string"&&a.includes(f)&&i.value!==f&&(i.value=f)}),e.watch(()=>n.params.id,async(f,b)=>{!f||f===b||(await h(),d.value&&await k(d.value))}),(f,b)=>{const x=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",K1,[e.createVNode(an,{variant:"form",title:s.value},{breadcrumbs:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(x,{to:r.value,class:"text-gray-500 hover:text-gray-700"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value),1)]),_:1},8,["to"]),e.createElementVNode("span",X1,[e.createVNode(e.unref(ge.LucideChevronRight),{size:16,class:"shrink-0"})])],64)):e.createCommentVNode("",!0),e.createElementVNode("span",J1,e.toDisplayString(s.value),1)]),description:e.withCtx(()=>[...b[3]||(b[3]=[e.createTextVNode("Налаштування реєстру",-1)])]),actions:e.withCtx(()=>[e.createElementVNode("button",{onClick:b[0]||(b[0]=C=>e.unref(o).back()),class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium border h-10 px-4 py-2 border-gray-300 text-gray-700 hover:bg-gray-50"}," Повернутися "),e.createElementVNode("button",{onClick:y,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-white rounded-md text-sm font-medium h-10 px-4 py-2 bg-blue-600 hover:bg-blue-700"}," Зберегти ")]),_:1},8,["title"]),u.value?(e.openBlock(),e.createElementBlock("div",Q1,[...b[4]||(b[4]=[e.createElementVNode("p",{class:"text-gray-500"},"Завантаження...",-1)])])):(e.openBlock(),e.createElementBlock("div",ek,[e.createVNode(Jl,{tabs:c,activeTab:i.value,"onUpdate:activeTab":b[1]||(b[1]=C=>i.value=C)},null,8,["activeTab"]),e.createElementVNode("div",tk,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p[i.value]),{data:g.value,"onUpdate:data":b[2]||(b[2]=C=>g.value=C),fields:m.value,"hide-details-button":t.hideDetailsButton,key:i.value},null,40,["data","fields","hide-details-button"]))])]))])}}})},Symbol.toStringTag,{value:"Module"}));/*! js-yaml 5.2.1 https://github.com/nodeca/js-yaml @license MIT */var Ze=Symbol("NOT_RESOLVED"),pr=Symbol("MERGE_KEY");function ut(t,n){return{tagName:t,nodeKind:"scalar",implicit:n.implicit??!1,matchByTagPrefix:n.matchByTagPrefix??!1,implicitFirstChars:n.implicitFirstChars??null,resolve:n.resolve,identify:n.identify??null,represent:n.represent??(o=>String(o)),representTagName:n.representTagName??null}}function gr(t,n){const o=n.finalize===void 0;return{tagName:t,nodeKind:"sequence",implicit:!1,matchByTagPrefix:n.matchByTagPrefix??!1,create:n.create,addItem:n.addItem,finalize:n.finalize??(r=>r),carrierIsResult:o,identify:n.identify??null,represent:n.represent??(r=>r),representTagName:n.representTagName??null}}function Co(t,n){const o=n.finalize===void 0;return{tagName:t,nodeKind:"mapping",implicit:!1,matchByTagPrefix:n.matchByTagPrefix??!1,create:n.create,addPair:n.addPair,has:n.has,keys:n.keys,get:n.get,finalize:n.finalize??(r=>r),carrierIsResult:o,identify:n.identify??null,represent:n.represent??(r=>r),representTagName:n.representTagName??null}}var ok=ut("tag:yaml.org,2002:str",{resolve:t=>t,identify:t=>typeof t=="string"}),rk=["","~","null","Null","NULL"],lk=ut("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:t=>rk.indexOf(t)!==-1?null:Ze,identify:t=>t===null,represent:()=>"null"}),ak=ut("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:(t,n)=>t==="null"||n&&t===""?null:Ze,identify:t=>t===null,represent:()=>"null"}),sk=["","~","null","Null","NULL"],ik=ut("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:t=>sk.indexOf(t)!==-1?null:Ze,identify:t=>t===null,represent:()=>"null"}),ck=["true","True","TRUE"],dk=["false","False","FALSE"],uk=ut("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:t=>ck.indexOf(t)!==-1?!0:dk.indexOf(t)!==-1?!1:Ze,identify:t=>Object.prototype.toString.call(t)==="[object Boolean]",represent:t=>t?"true":"false"}),fk=["true"],mk=["false"],pk=ut("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:t=>fk.indexOf(t)!==-1?!0:mk.indexOf(t)!==-1?!1:Ze,identify:t=>Object.prototype.toString.call(t)==="[object Boolean]",represent:t=>t?"true":"false"}),gk=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],yk=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],hk=ut("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:t=>gk.indexOf(t)!==-1?!0:yk.indexOf(t)!==-1?!1:Ze,identify:t=>Object.prototype.toString.call(t)==="[object Boolean]",represent:t=>t?"true":"false"}),bk=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),xk=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function kk(t){let n=t,o=1;return(n[0]==="-"||n[0]==="+")&&(n[0]==="-"&&(o=-1),n=n.slice(1)),n.startsWith("0b")?o*parseInt(n.slice(2),2):n.startsWith("0o")?o*parseInt(n.slice(2),8):n.startsWith("0x")?o*parseInt(n.slice(2),16):o*parseInt(n,10)}function wk(t,n){if(n){if(!xk.test(t))return Ze}else if(!bk.test(t))return Ze;const o=kk(t);return Number.isFinite(o)?o:Ze}var Ql=ut("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:wk,identify:t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,represent:t=>t.toString(10)}),_k=new RegExp("^-?(?:0|[1-9][0-9]*)$"),Ek=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function Ck(t){let n=t,o=1;return(n[0]==="-"||n[0]==="+")&&(n[0]==="-"&&(o=-1),n=n.slice(1)),n.startsWith("0b")?o*parseInt(n.slice(2),2):n.startsWith("0o")?o*parseInt(n.slice(2),8):n.startsWith("0x")?o*parseInt(n.slice(2),16):o*parseInt(n,10)}function Nk(t,n){if(n){if(!Ek.test(t))return Ze}else if(!_k.test(t))return Ze;const o=Ck(t);return Number.isFinite(o)?o:Ze}var Vk=ut("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Nk,identify:t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,represent:t=>t.toString(10)}),Bk=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");function $k(t){let n=t.replace(/_/g,""),o=1;if((n[0]==="-"||n[0]==="+")&&(n[0]==="-"&&(o=-1),n=n.slice(1)),n.startsWith("0b"))return o*parseInt(n.slice(2),2);if(n.startsWith("0x"))return o*parseInt(n.slice(2),16);if(n.includes(":")){let r=0;for(const l of n.split(":"))r=r*60+Number(l);return o*r}return n!=="0"&&n[0]==="0"?o*parseInt(n,8):o*parseInt(n,10)}function Sk(t){if(!Bk.test(t))return Ze;const n=$k(t);return Number.isFinite(n)?n:Ze}var yr=ut("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:Sk,identify:t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,represent:t=>t.toString(10)}),vk=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Lk=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Tk(t){if(!vk.test(t))return Ze;let n=t.toLowerCase();const o=n[0]==="-"?-1:1;if("+-".includes(n[0])&&(n=n.slice(1)),n===".inf")return o===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(n===".nan")return NaN;const r=o*parseFloat(n);return Number.isFinite(r)||Lk.test(t)?r:Ze}function Ak(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";const n=t.toString(10);return/^[-+]?[0-9]+e/.test(n)?n.replace("e",".e"):n}var ea=ut("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:Tk,identify:t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),represent:Ak}),Mk=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),Fk=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Dk(t,n){if(n){if(!Fk.test(t))return Ze;let r=t.toLowerCase();const l=r[0]==="-"?-1:1;if("+-".includes(r[0])&&(r=r.slice(1)),r===".inf")return l===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(r===".nan")return NaN;const s=l*parseFloat(r);return Number.isFinite(s)?s:Ze}if(!Mk.test(t))return Ze;const o=Number(t);return Number.isFinite(o)?o:Ze}function Pk(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";const n=t.toString(10);return/^[-+]?[0-9]+e/.test(n)?n.replace("e",".e"):n}var zk=ut("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Dk,identify:t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),represent:Pk}),Rk=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Ik=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function jk(t){if(!Rk.test(t))return Ze;let n=t.toLowerCase().replace(/_/g,"");const o=n[0]==="-"?-1:1;if("+-".includes(n[0])&&(n=n.slice(1)),n===".inf")return o===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(n===".nan")return NaN;let r=0;if(n.includes(":")){for(const l of n.split(":"))r=r*60+Number(l);r*=o}else r=o*parseFloat(n);return Number.isFinite(r)||Ik.test(t)?r:Ze}function Ok(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";const n=t.toString(10);return/^[-+]?[0-9]+e/.test(n)?n.replace("e",".e"):n}var hr=ut("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:jk,identify:t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),represent:Ok}),Uk=ut("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:(t,n)=>t==="<<"||n&&t===""?pr:Ze}),qk=/^[A-Za-z0-9+/]*={0,2}$/;function Hk(t){const n=t.replace(/\s/g,"");if(n.length%4!==0||!qk.test(n))return Ze;const o=atob(n),r=new Uint8Array(o.length);for(let l=0;l<o.length;l++)r[l]=o.charCodeAt(l);return r}function Wk(t){let n="";for(let o=0;o<t.length;o++)n+=String.fromCharCode(t[o]);return btoa(n)}var Yk=ut("tag:yaml.org,2002:binary",{resolve:Hk,identify:t=>Object.prototype.toString.call(t)==="[object Uint8Array]",represent:Wk}),Gk=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Zk=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Kk(t){let n=Gk.exec(t);if(n===null&&(n=Zk.exec(t)),n===null)return Ze;const o=+n[1],r=+n[2]-1,l=+n[3];if(!n[4]){const p=new Date(Date.UTC(o,r,l));return p.getUTCFullYear()!==o||p.getUTCMonth()!==r||p.getUTCDate()!==l?Ze:p}const s=+n[4],i=+n[5],d=+n[6];let u=0;if(s>23||i>59||d>59)return Ze;if(n[7]){let p=n[7].slice(0,3);for(;p.length<3;)p+="0";u=+p}const c=new Date(Date.UTC(o,r,l,s,i,d,u));if(c.getUTCFullYear()!==o||c.getUTCMonth()!==r||c.getUTCDate()!==l)return Ze;if(n[9]){const p=+n[10],a=+(n[11]||0);if(p>23||a>59)return Ze;const g=(p*60+a)*6e4;c.setTime(c.getTime()-(n[9]==="-"?-g:g))}return c}var Xk=ut("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:Kk,identify:t=>t instanceof Date,represent:t=>t.toISOString()}),Jk=gr("tag:yaml.org,2002:seq",{create:()=>[],addItem:(t,n)=>{t.push(n)},identify:Array.isArray});function No(t){if(t===null||typeof t!="object"||Array.isArray(t))return!1;const n=Object.getPrototypeOf(t);return n===null||n===Object.prototype}function br(t,n){const o={};for(const r of n)t[r]!==void 0&&(o[r]=t[r]);return o}var Qk=gr("tag:yaml.org,2002:omap",{create:()=>({list:[],seen:new Set}),addItem:(t,n)=>{let o;if(n instanceof Map){if(n.size!==1)return"cannot resolve an ordered map item";o=n.keys().next().value}else if(No(n)){const r=Object.keys(n);if(r.length!==1)return"cannot resolve an ordered map item";o=r[0]}else return"cannot resolve an ordered map item";return t.seen.has(o)?"duplicate key in ordered map":(t.seen.add(o),t.list.push(n),"")},finalize:t=>t.list}),ew=gr("tag:yaml.org,2002:pairs",{create:()=>[],addItem:(t,n)=>{if(n instanceof Map)return n.size!==1?"cannot resolve a pairs item":(t.push(n.entries().next().value),"");if(Object.prototype.toString.call(n)!=="[object Object]")return"cannot resolve a pairs item";const o=n,r=Object.keys(o);return r.length!==1?"cannot resolve a pairs item":(t.push([r[0],o[r[0]]]),"")}}),tw=Co("tag:yaml.org,2002:map",{create:()=>({}),identify:No,represent:t=>{const n=new Map;for(const o of Object.keys(t))n.set(o,t[o]);return n},addPair:(t,n,o)=>{if(n!==null&&typeof n=="object")return"object-based map does not support complex keys";const r=String(n);return r==="__proto__"?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,""},has:(t,n)=>n!==null&&typeof n=="object"?!1:Object.prototype.hasOwnProperty.call(t,String(n)),keys:t=>Object.keys(t),get:(t,n)=>t[String(n)]}),nw=Co("tag:yaml.org,2002:set",{create:()=>new Set,identify:t=>t instanceof Set,represent:t=>{const n=new Map;for(const o of t)n.set(o,null);return n},addPair:(t,n,o)=>o!==null?"cannot resolve a set item":(t.add(n),""),has:(t,n)=>t.has(n),keys:t=>t.keys(),get:()=>null});function ow(){return{scalar:{},sequence:{},mapping:{}}}function rw(){return{scalar:[],sequence:[],mapping:[]}}function lw(t){const n=[];for(const o of t){let r=n.length;for(let l=0;l<n.length;l++){const s=n[l];if(s.nodeKind===o.nodeKind&&s.tagName===o.tagName&&s.matchByTagPrefix===o.matchByTagPrefix){r=l;break}}n[r]=o}return n}var Vo=class ts{constructor(n){dt(this,"tags");dt(this,"implicitScalarTags");dt(this,"implicitScalarByFirstChar");dt(this,"implicitScalarAnyFirstChar");dt(this,"defaultScalarTag");dt(this,"defaultSequenceTag");dt(this,"defaultMappingTag");dt(this,"exact");dt(this,"prefix");const o=lw(n),r=[],l=ow(),s=rw();for(const p of o){if(p.nodeKind==="scalar"&&p.implicit){if(p.matchByTagPrefix)throw new Error("Implicit scalar tags cannot match by tag prefix");r.push(p)}switch(p.nodeKind){case"scalar":p.matchByTagPrefix?s.scalar.push(p):l.scalar[p.tagName]=p;break;case"sequence":p.matchByTagPrefix?s.sequence.push(p):l.sequence[p.tagName]=p;break;case"mapping":p.matchByTagPrefix?s.mapping.push(p):l.mapping[p.tagName]=p;break}}const i=r.filter(p=>p.implicitFirstChars===null),d=new Set;for(const p of r)if(p.implicitFirstChars!==null)for(const a of p.implicitFirstChars)d.add(a);const u=new Map;for(const p of d)u.set(p,r.filter(a=>a.implicitFirstChars===null||a.implicitFirstChars.indexOf(p)!==-1));const c=l.scalar["tag:yaml.org,2002:str"];if(!c)throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=o,this.implicitScalarTags=r,this.implicitScalarByFirstChar=u,this.implicitScalarAnyFirstChar=i,this.defaultScalarTag=c,this.defaultSequenceTag=l.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=l.mapping["tag:yaml.org,2002:map"],this.exact=l,this.prefix=s}withTags(...n){let o=[];for(const r of n)o=o.concat(r);return new ts([...this.tags,...o])}},xr=new Vo([ok,Jk,tw]);new Vo([...xr.tags,ak,pk,Vk,zk]);var aw=new Vo([...xr.tags,lk,uk,Ql,ea]),sw=new Vo([...xr.tags,ik,hk,yr,hr,Xk,Uk,Yk,Qk,ew,nw]);Co("tag:yaml.org,2002:map",{create:()=>new Map,addPair:(t,n,o)=>(t.set(n,o),""),has:(t,n)=>t.has(n),keys:t=>t.keys(),get:(t,n)=>t.get(n),identify:t=>t instanceof Map||No(t),represent:t=>{if(t instanceof Map)return t;const n=new Map,o=t;for(const r of Object.keys(o))n.set(r,o[r]);return n}});function ta(t){if(Array.isArray(t)){const n=Array.prototype.slice.call(t);for(let o=0;o<n.length;o++){if(Array.isArray(n[o]))return null;typeof n[o]=="object"&&Object.prototype.toString.call(n[o])==="[object Object]"&&(n[o]="[object Object]")}return String(n)}return typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"?"[object Object]":String(t)}Co("tag:yaml.org,2002:map",{create:()=>({}),identify:No,represent:t=>{const n=new Map;for(const o of Object.keys(t))n.set(o,t[o]);return n},addPair:(t,n,o)=>{const r=ta(n);return r===null?"nested arrays are not supported inside keys":(r==="__proto__"?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,"")},has:(t,n)=>{const o=ta(n);return o!==null&&Object.prototype.hasOwnProperty.call(t,o)},keys:t=>Object.keys(t),get:(t,n)=>t[String(n)]});var iw={maxLength:79,indent:1,linesBefore:3,linesAfter:2};function kr(t,n,o,r,l){let s="",i="";const d=Math.floor(l/2)-1;return r-n>d&&(s=" ... ",n=r-d+s.length),o-r>d&&(i=" ...",o=r+d-i.length),{str:s+t.slice(n,o).replace(/\t/g,"→")+i,pos:r-n+s.length}}function wr(t,n){return" ".repeat(Math.max(n-t.length,0))+t}function cw(t,n){if(!t.buffer)return null;const o={...iw,...n},r=/\r?\n|\r|\0/g,l=[0],s=[];let i,d=-1;for(;i=r.exec(t.buffer);)s.push(i.index),l.push(i.index+i[0].length),t.position<=i.index&&d<0&&(d=l.length-2);d<0&&(d=l.length-1);let u="";const c=Math.min(t.line+o.linesAfter,s.length).toString().length,p=o.maxLength-(o.indent+c+3);for(let g=1;g<=o.linesBefore&&!(d-g<0);g++){const m=kr(t.buffer,l[d-g],s[d-g],t.position-(l[d]-l[d-g]),p);u=`${" ".repeat(o.indent)}${wr((t.line-g+1).toString(),c)} | ${m.str}
|
|
7
7
|
${u}`}const a=kr(t.buffer,l[d],s[d],t.position,p);u+=`${" ".repeat(o.indent)}${wr((t.line+1).toString(),c)} | ${a.str}
|
|
8
8
|
`,u+=`${"-".repeat(o.indent+c+3+a.pos)}^
|
|
9
9
|
`;for(let g=1;g<=o.linesAfter&&!(d+g>=s.length);g++){const m=kr(t.buffer,l[d+g],s[d+g],t.position-(l[d]-l[d+g]),p);u+=`${" ".repeat(o.indent)}${wr((t.line+g+1).toString(),c)} | ${m.str}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as te, resolveDirective as We, openBlock as u, createElementBlock as m, createElementVNode as n, Fragment as W, renderList as X, toDisplayString as d, withDirectives as we, createTextVNode as Xe, normalizeClass as ae, ref as $, watch as S, computed as h, vModelText as Ke, onMounted as Ye, onBeforeUnmount as Ze, createCommentVNode as q, createVNode as B, withCtx as He, createBlock as F, resolveDynamicComponent as Je } from "vue";
|
|
2
2
|
import { useRouter as et, useRoute as tt } from "vue-router";
|
|
3
3
|
import { TooltipDirective as st, notify as M } from "@opengis/core";
|
|
4
|
-
import { _ as nt, u as lt, f as rt, M as ot, i as it, j as be, F as at } from "./index-
|
|
5
|
-
import { _ as ut, a as ct, b as dt, c as ft } from "./HeaderActions.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { _ as he } from "./ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as nt, u as lt, f as rt, M as ot, i as it, j as be, F as at } from "./index-BaB3A3Tb.js";
|
|
5
|
+
import { _ as ut, a as ct, b as dt, c as ft } from "./HeaderActions.vue_vue_type_script_setup_true_lang-D_BESZDN.js";
|
|
6
|
+
import { _ as he } from "./ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-3IWWtgKt.js";
|
|
7
7
|
const mt = { class: "flex-1 overflow-y-auto p-4 sm:p-6" }, pt = { class: "space-y-3" }, gt = { class: "bg-white p-3 rounded-xl border border-gray-200 shadow-sm" }, yt = { class: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2" }, vt = { class: "text-xs text-gray-500 mb-1" }, xt = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "text-base text-md font-semibold text-gray-900"
|
|
@@ -2,9 +2,9 @@ import { defineComponent as B, mergeModels as j, useModel as S, computed as h, d
|
|
|
2
2
|
import { useRoute as Z, useRouter as ee } from "vue-router";
|
|
3
3
|
import { notify as F } from "@opengis/core";
|
|
4
4
|
import { _ as te } from "./TableFormHeader.vue_vue_type_script_setup_true_lang-Mci_tseM.js";
|
|
5
|
-
import { V as N } from "./vs-datatable-
|
|
6
|
-
import { _ as z, n as R, m as E, r as H } from "./import-utils-
|
|
7
|
-
import { a as ae, b as le, c as se, d as oe, e as ie } from "./index-
|
|
5
|
+
import { V as N } from "./vs-datatable-B3hGBtGc.js";
|
|
6
|
+
import { _ as z, n as R, m as E, r as H } from "./import-utils-Dp6H-Ajf.js";
|
|
7
|
+
import { a as ae, b as le, c as se, d as oe, e as ie } from "./index-BaB3A3Tb.js";
|
|
8
8
|
import { LucideChevronRight as re } from "lucide-vue-next";
|
|
9
9
|
import { _ as ne } from "./MapSettingsTabs.vue_vue_type_script_setup_true_lang-CKCK3NqY.js";
|
|
10
10
|
const ue = { class: "vs-form" }, de = { class: "vs-form__body auto-rows-max container" }, ce = { class: "flex flex-wrap" }, me = { class: "h-fit w-full mb-6 bg-white border border-gray-200 rounded-lg p-6" }, ve = { class: "h-fit w-full flex flex-wrap" }, pe = { class: "w-full" }, fe = /* @__PURE__ */ B({
|
|
@@ -4,12 +4,12 @@ var L = (e, n, t) => pi(e, typeof n != "symbol" ? n + "" : n, t);
|
|
|
4
4
|
import { openBlock as _, createElementBlock as M, createElementVNode as g, defineComponent as ae, ref as E, watch as $, createTextVNode as mi, createVNode as D, createBlock as P, createCommentVNode as W, defineAsyncComponent as hi, unref as ze, withCtx as bn, withDirectives as fn, vModelText as dn, normalizeClass as _e, Fragment as kt, renderList as At, toDisplayString as fe, getCurrentInstance as Ct, onBeforeUnmount as wt, toRef as gi, computed as ve, onMounted as yi, resolveDynamicComponent as vi } from "vue";
|
|
5
5
|
import { useRoute as bi, useRouter as xi } from "vue-router";
|
|
6
6
|
import { notify as X } from "@opengis/core";
|
|
7
|
-
import { _ as Xe, u as Ge, f as Si, M as ki, g as Ai, h as Ci, i as wi, j as tt, k as Ti, l as _i, m as Ei, s as it, n as Ii } from "./index-
|
|
8
|
-
import { _ as Ni, a as $i, b as Li, c as Fi } from "./HeaderActions.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { S as Oi, C as Ri } from "./CardIcon-
|
|
7
|
+
import { _ as Xe, u as Ge, f as Si, M as ki, g as Ai, h as Ci, i as wi, j as tt, k as Ti, l as _i, m as Ei, s as it, n as Ii } from "./index-BaB3A3Tb.js";
|
|
8
|
+
import { _ as Ni, a as $i, b as Li, c as Fi } from "./HeaderActions.vue_vue_type_script_setup_true_lang-D_BESZDN.js";
|
|
9
|
+
import { S as Oi, C as Ri } from "./CardIcon-DrNd-2PW.js";
|
|
10
10
|
import { _ as Tt } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-D3ZPeXMw.js";
|
|
11
|
-
import { V as Ze } from "./vs-datatable-
|
|
12
|
-
import { _ as Nn, m as $n, r as $e } from "./import-utils-
|
|
11
|
+
import { V as Ze } from "./vs-datatable-B3hGBtGc.js";
|
|
12
|
+
import { _ as Nn, m as $n, r as $e } from "./import-utils-Dp6H-Ajf.js";
|
|
13
13
|
/*! js-yaml 5.2.1 https://github.com/nodeca/js-yaml @license MIT */
|
|
14
14
|
var T = Symbol("NOT_RESOLVED"), Ln = Symbol("MERGE_KEY");
|
|
15
15
|
function U(e, n) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as F, mergeModels as O, defineAsyncComponent as I, useModel as R, ref as y, watch as K, openBlock as o, createElementBlock as s, createElementVNode as e, createVNode as $, unref as x, withCtx as S, createStaticVNode as V, useSlots as P, computed as H, Fragment as b, createTextVNode as U, createCommentVNode as N, renderList as A, normalizeStyle as Q, toDisplayString as M, normalizeClass as z, withModifiers as X, createBlock as Y, resolveDynamicComponent as ee, withDirectives as te, renderSlot as ne } from "vue";
|
|
2
2
|
import { notify as E } from "@opengis/core";
|
|
3
3
|
import { Edit as le, Trash as oe } from "lucide-vue-next";
|
|
4
|
-
import { _ as u } from "./index-
|
|
4
|
+
import { _ as u } from "./index-BaB3A3Tb.js";
|
|
5
5
|
const se = { class: "flex items-center justify-center col-span-3 gap-2" }, re = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, ie = /* @__PURE__ */ F({
|
|
6
6
|
__name: "vs-datatable-controls",
|
|
7
7
|
props: /* @__PURE__ */ O({
|
|
@@ -725,12 +725,11 @@ const kt = /* @__PURE__ */ u(pt, [["render", wt]]), W = {
|
|
|
725
725
|
])
|
|
726
726
|
])) : (o(), s(b, { key: 1 }, [
|
|
727
727
|
a.slot && g(a.slot) ? ne(i.$slots, a.slot, {
|
|
728
|
-
key: 0,
|
|
729
728
|
row: l,
|
|
730
729
|
column: a,
|
|
731
730
|
value: l[a.key],
|
|
732
731
|
rowIndex: f
|
|
733
|
-
}, void 0, !0) : a.type === "color" ? (o(), s("div", zt, [
|
|
732
|
+
}, void 0, !0, 0) : a.type === "color" ? (o(), s("div", zt, [
|
|
734
733
|
e("div", {
|
|
735
734
|
class: z(["w-4 h-4 rounded-full align-middle", `bg-[${l[a.key]}]`])
|
|
736
735
|
}, null, 2)
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
component: default
|
|
2
|
-
|
|
3
|
-
tokens:
|
|
4
|
-
edit: { table: gis.metadata, form: gis.metadata.form, id: '{{id}}', ignoreCheck: true }
|
|
5
|
-
|
|
6
|
-
panels:
|
|
7
|
-
- type: container
|
|
8
|
-
col: 5
|
|
9
|
-
items:
|
|
10
|
-
- name: main_info
|
|
11
|
-
- component: vs-widget-map
|
|
12
|
-
title: Просторове охоплення
|
|
13
|
-
- component: vs-widget-file
|
|
14
|
-
- type: tabs
|
|
15
|
-
col: 7
|
|
16
|
-
items:
|
|
17
|
-
- name: metadata_info
|
|
18
|
-
title: Просторове охоплення
|
|
19
|
-
- name: other
|
|
20
|
-
title: Інше
|
|
21
|
-
- component: vs-widget-history
|
|
22
|
-
title: Історія
|
|
1
|
+
component: default
|
|
2
|
+
|
|
3
|
+
tokens:
|
|
4
|
+
edit: { table: gis.metadata, form: gis.metadata.form, id: '{{id}}', ignoreCheck: true }
|
|
5
|
+
|
|
6
|
+
panels:
|
|
7
|
+
- type: container
|
|
8
|
+
col: 5
|
|
9
|
+
items:
|
|
10
|
+
- name: main_info
|
|
11
|
+
- component: vs-widget-map
|
|
12
|
+
title: Просторове охоплення
|
|
13
|
+
- component: vs-widget-file
|
|
14
|
+
- type: tabs
|
|
15
|
+
col: 7
|
|
16
|
+
items:
|
|
17
|
+
- name: metadata_info
|
|
18
|
+
title: Просторове охоплення
|
|
19
|
+
- name: other
|
|
20
|
+
title: Інше
|
|
21
|
+
- component: vs-widget-history
|
|
22
|
+
title: Історія
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
component: default
|
|
2
|
-
|
|
3
|
-
tokens:
|
|
4
|
-
edit: { table: gis.rasters, form: gis.rasters.form, id: '{{id}}', ignoreCheck: true }
|
|
5
|
-
|
|
6
|
-
panels:
|
|
7
|
-
- type: container
|
|
8
|
-
col: 5
|
|
9
|
-
items:
|
|
10
|
-
- name: main_info
|
|
11
|
-
|
|
1
|
+
component: default
|
|
2
|
+
|
|
3
|
+
tokens:
|
|
4
|
+
edit: { table: gis.rasters, form: gis.rasters.form, id: '{{id}}', ignoreCheck: true }
|
|
5
|
+
|
|
6
|
+
panels:
|
|
7
|
+
- type: container
|
|
8
|
+
col: 5
|
|
9
|
+
items:
|
|
10
|
+
- name: main_info
|
|
11
|
+
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
component: default
|
|
2
|
-
|
|
3
|
-
tokens:
|
|
4
|
-
edit: { table: gis.registers, form: gis.registers.form, id: '{{id}}', ignoreCheck: true }
|
|
5
|
-
|
|
6
|
-
panels:
|
|
7
|
-
- type: container # закріплений зліва container col, width як простіше
|
|
8
|
-
col: 5
|
|
9
|
-
items:
|
|
10
|
-
- name: main_info
|
|
11
|
-
|
|
12
|
-
- type: tabs
|
|
13
|
-
col: 7
|
|
14
|
-
items:
|
|
15
|
-
- name: source
|
|
16
|
-
title: Джерело даних
|
|
17
|
-
- name: columns
|
|
18
|
-
title: Колонки
|
|
19
|
-
- name: filters
|
|
20
|
-
title: Фільтри
|
|
21
|
-
- name: cls
|
|
22
|
-
title: Класифікатори
|
|
23
|
-
- component: vs-widget-history
|
|
1
|
+
component: default
|
|
2
|
+
|
|
3
|
+
tokens:
|
|
4
|
+
edit: { table: gis.registers, form: gis.registers.form, id: '{{id}}', ignoreCheck: true }
|
|
5
|
+
|
|
6
|
+
panels:
|
|
7
|
+
- type: container # закріплений зліва container col, width як простіше
|
|
8
|
+
col: 5
|
|
9
|
+
items:
|
|
10
|
+
- name: main_info
|
|
11
|
+
|
|
12
|
+
- type: tabs
|
|
13
|
+
col: 7
|
|
14
|
+
items:
|
|
15
|
+
- name: source
|
|
16
|
+
title: Джерело даних
|
|
17
|
+
- name: columns
|
|
18
|
+
title: Колонки
|
|
19
|
+
- name: filters
|
|
20
|
+
title: Фільтри
|
|
21
|
+
- name: cls
|
|
22
|
+
title: Класифікатори
|
|
23
|
+
- component: vs-widget-history
|
|
24
24
|
title: Історія редагування
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
component: default
|
|
2
|
-
|
|
3
|
-
tokens:
|
|
4
|
-
edit: { table: gis.services, form: gis.services.form, id: '{{id}}', ignoreCheck: true }
|
|
5
|
-
|
|
6
|
-
panels:
|
|
7
|
-
- type: container # закріплений зліва container col, width як простіше
|
|
8
|
-
col: 4
|
|
9
|
-
items:
|
|
10
|
-
- name: main_info
|
|
11
|
-
|
|
12
|
-
- type: tabs
|
|
13
|
-
col: 8
|
|
14
|
-
items:
|
|
15
|
-
- component: vs-widget-map-extended
|
|
16
|
-
title: Шар
|
|
17
|
-
height: 500px
|
|
18
|
-
- name: source
|
|
19
|
-
title: Інформація про джерело
|
|
20
|
-
- name: attributes
|
|
21
|
-
title: Атрибути
|
|
22
|
-
- name: filters
|
|
23
|
-
title: Фільтри
|
|
24
|
-
- component: vs-style-yml
|
|
25
|
-
title: Стилізація
|
|
1
|
+
component: default
|
|
2
|
+
|
|
3
|
+
tokens:
|
|
4
|
+
edit: { table: gis.services, form: gis.services.form, id: '{{id}}', ignoreCheck: true }
|
|
5
|
+
|
|
6
|
+
panels:
|
|
7
|
+
- type: container # закріплений зліва container col, width як простіше
|
|
8
|
+
col: 4
|
|
9
|
+
items:
|
|
10
|
+
- name: main_info
|
|
11
|
+
|
|
12
|
+
- type: tabs
|
|
13
|
+
col: 8
|
|
14
|
+
items:
|
|
15
|
+
- component: vs-widget-map-extended
|
|
16
|
+
title: Шар
|
|
17
|
+
height: 500px
|
|
18
|
+
- name: source
|
|
19
|
+
title: Інформація про джерело
|
|
20
|
+
- name: attributes
|
|
21
|
+
title: Атрибути
|
|
22
|
+
- name: filters
|
|
23
|
+
title: Фільтри
|
|
24
|
+
- component: vs-style-yml
|
|
25
|
+
title: Стилізація
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"id": true,
|
|
4
|
-
"text": "Так",
|
|
5
|
-
"color": "green"
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"id": false,
|
|
9
|
-
"text": "Ні",
|
|
10
|
-
"color": "red"
|
|
11
|
-
}
|
|
12
|
-
]
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": true,
|
|
4
|
+
"text": "Так",
|
|
5
|
+
"color": "green"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"id": false,
|
|
9
|
+
"text": "Ні",
|
|
10
|
+
"color": "red"
|
|
11
|
+
}
|
|
12
|
+
]
|