PageSourceSearch

https://bgov.kz/build/assets/Design-5b3a9cb0.js

js bgov.kz collected 2026-10-08 00:01:44 UTC 13,710 bytes, 1 lines download raw bytes

1import{o as l,e as a,a as e,i as W,h as y,z as X,s as Y,t as x,n as T,u as i,F as g,r as L,l as h,c as j,m as _,v as C,b as f,p as O,g as p,w as $,f as S}from"./app-3767b508.js";import{_ as q}from"./SecondaryButton-507ab9e8.js";import{_ as F}from"./Editor-e65df946.js";import{u as Z}from"./Emitter-1565b776.js";import{_ as ee}from"./DialogModal-3ec4c543.js";import{_ as te}from"./PrimaryButton-fad68cbe.js";import{r as I}from"./PlusCircleIcon-5dd26774.js";import"./Modal-6175ac5d.js";function J(c,n){return l(),a("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"})])}function K(c,n){return l(),a("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})])}const oe={class:"px-2 py-5 bg-white sm:p-2"},se={class:"flex justify-between"},ne={class:"inline-flex shadow-sm rounded-md"},le={class:"mt-4 grid grid-cols-10"},ae={class:"col-span-1 px-2 py-3 text-right float-right"},re=["onClick"],ie=["src"],de={class:"col-span-8"},ce=["onUpdate:modelValue"],ue={class:"col-span-1 px-2 py-3"},me=["onClick"],ge={class:"col-span-8"},fe={class:"col-span-1 px-2 py-3"},pe={class:"col-span-1 px-2 py-3 text-right float-right"},he=["onClick"],ve=["src"],xe={class:"col-span-8"},ke=["onUpdate:modelValue"],ye={class:"col-span-1 px-2 py-3"},we=["onClick"],be={class:"col-span-8"},_e={class:"col-span-1 px-2 py-3"},Ce={class:"col-span-1 px-2 py-3 text-right float-right"},$e=["onClick"],je=["src"],Ve={class:"col-span-8"},Me=["onUpdate:modelValue"],De={class:"col-span-1 px-2 py-3"},Ue=["onClick"],ze={class:"col-span-8"},Be={class:"col-span-1 px-2 py-3"},Ee={class:"flex justify-between mt-8"},He={key:0,class:"mt-4"},Ne={key:1,class:"mt-4"},Te={key:2,class:"mt-4"},Le={class:"flex justify-between mt-8"},Oe={class:"flex"},Se={key:3,class:"mt-4 h-96 justify-center w-full"},Fe=["src"],Ie={key:4,class:"mt-4"},Je=["value"],Ke={class:"space-y-1 text-center"},Ae={class:"flex text-sm text-gray-600"},Pe={for:"logo",class:"relative cursor-pointer rounded-md font-medium text-gray-500 hover:text-gray-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-gray-500"},qe={class:"mt-4 flex justify-between"},Ge={class:"flex"},Qe={key:0},Re={class:"mt-4 p-10 justify-center w-full"},We=["src"],Xe={class:"space-y-1 text-center"},Ye={class:"flex text-sm text-gray-600"},Ze={for:"icon",class:"relative cursor-pointer rounded-md font-medium text-gray-500 hover:text-gray-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-gray-500"},dt={__name:"Design",props:{model:Object},setup(c){const n=c;let V=y(!1);const M=()=>{V.value=!1},G={logo:null,percent:0,message:"",errors:[],progress:!1},k=y({text:""}),v=y(G),D=W(()=>n.model.logo),A=(o,s)=>{let t=[];o.dataTransfer.items?[...o.dataTransfer.items].forEach((u,d)=>{u.kind==="file"&&t.push(u.getAsFile())}):[...o.dataTransfer.files].forEach((u,d)=>{t.push(u)}),z(o,t[0],s)},w=y(""),U=y(0),z=(o,s,t)=>{v.value.percent=0,v.value.message="",v.value.errors=[],t=t||"logo";const u={headers:{"content-type":"multipart/form-data"},onUploadProgress:m=>{m.lengthComputable&&(v.value.percent=parseInt(Math.round(m.loaded*100/m.total)))}};let d=new FormData;d.append("upload",s||o.target.files[0]),axios.post(route("upload"),d,u).then(m=>{v.percent=0,o.target&&(o.target.value=""),t==="logo"?n.model.logo=m.data.link:w.value=m.data.link}).catch(m=>{m&&m.response&&m.response.data&&(v.value.message=m.response.data.exception||m.response.data.message,v.value.errors=m.response.data.errors||[],console.error(m))})},Q=Z(),P=y();Q.on("exportBlocks",o=>o(P.value));const b=()=>{r.value==="ru"?(n.model.tags||(n.model.tags=[]),n.model.tags.length<5&&n.model.tags.push(k.value)):(n.model.translations[r.value].tags||(n.model.translations[r.value].tags=[]),n.model.translations[r.value].tags.length<5&&n.model.translations[r.value].tags.push(k.value)),k.value={text:""}}
1,B=o=>{r.value==="ru"?n.model.tags.splice(o,1):n.model.translations[r.value].tags.splice(o,1)},E=o=>{U.value=o,V.value=!0},R=()=>{if(r.value==="ru"){let o=[...n.model.tags];o[U.value].icon=w.value,n.model.tags=[...o]}else{let o=[...n.model.translations[r.value].tags];o[U.value].icon=w.value,n.model.translations[r.value].tags=[...o]}w.value="",M()};let r=y(X());const H=o=>{r.value=o};Y(()=>{n.model.translations.en.tags&&(n.model.translations.en.tags=JSON.parse(n.model.translations.en.tags)),n.model.translations.kk.tags&&(n.model.translations.kk.tags=JSON.parse(n.model.translations.kk.tags)),n.model.translations.en.content&&(n.model.translations.en.content=JSON.parse(n.model.translations.en.content)),n.model.translations.kk.content&&(n.model.translations.kk.content=JSON.parse(n.model.translations.kk.content))});const N=o=>{r.value==="ru"?n.model.content=o:n.model.translations[r.value].content=o};return(o,s)=>(l(),a(g,null,[e("div",oe,[e("div",se,[e("h2",null,x(o.$t("Метки")),1),e("span",ne,[e("button",{onClick:s[0]||(s[0]=t=>H("ru")),type:"button",class:T(["inline-flex items-center px-4 py-2 rounded-l-md border border-gray-300 bg-white text-xs font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500",{"bg-blue-700 text-white":i(r)==="ru"}])},"Рус",2),e("button",{onClick:s[1]||(s[1]=t=>H("kk")),type:"button",class:T(["-ml-px inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-xs font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500",{"bg-blue-700 text-white":i(r)==="kk"}])},"Қаз",2),e("button",{onClick:s[2]||(s[2]=t=>H("en")),type:"button",class:T(["-ml-px inline-flex items-center px-4 py-2 rounded-r-md border border-gray-300 bg-white text-xs font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500",{"bg-blue-700 text-white":i(r)==="en"}])},"Eng",2)])]),e("div",le,[i(r)==="ru"?(l(),a(g,{key:0},[(l(!0),a(g,null,L(c.model.tags,(t,u)=>(l(),a(g,null,[e("div",ae,[e("a",{href:"#",class:"float-right",onClick:h(d=>E(u),["prevent"])},[t.icon?(l(),a("img",{key:0,src:t.icon,class:"h-6 w-6",alt:"icon"},null,8,ie)):(l(),j(i(K),{key:1,class:"h-6 w-6 text-gray-400"}))],8,re)]),e("div",de,[_(e("input",{"onUpdate:modelValue":d=>t.text=d,type:"text",name:"tag",id:"tag",class:"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md",placeholder:"Текст"},null,8,ce),[[C,t.text]])]),e("div",ue,[e("a",{href:"#",onClick:h(d=>B(u),["prevent"])},[f(i(J),{class:"text-red-600 h-5 w-5"})],8,me)])],64))),256)),!c.model.tags||c.model.tags.length<4?(l(),a(g,{key:0},[s[11]||(s[11]=e("div",{class:"col-span-1 px-2 py-3 text-right text-right float-right"},null,-1)),e("div",ge,[_(e("input",{"onUpdate:modelValue":s[3]||(s[3]=t=>k.value.text=t),type:"text",name:"tag",id:"tag",class:"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md",placeholder:"Текст",onKeydown:O(b,["enter"])},null,544),[[C,k.value.text]])]),e("div",fe,[f(i(I),{onClick:b,class:"text-green-600 h-5 w-5 cursor-pointer"})])],64)):p("",!0)],64)):p("",!0),i(r)==="en"?(l(),a(g,{key:1},[(l(!0),a(g,null,L(c.model.translations.en.tags,(t,u)=>(l(),a(g,null,[e("div",pe,[e("a",{href:"#",class:"float-right",onClick:h(d=>E(u),["prevent"])},[t.icon?(l(),a("img",{key:0,src:t.icon,class:"h-6 w-6",alt:"icon"},null,8,ve)):(l(),j(i(K),{key:1,class:"h-6 w-6 text-gray-400"}))],8,he)]),e("div",xe,[_(e("input",{"onUpdate:modelValue":d=>t.text=d,type:"text",name:"tag",id:"tag",class:"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md",placeholder:"Текст"},null,8,ke),[[C,t.text]])]),e("div",ye,[e("a",{href:"#",onClick:h(d=>B(u),["prevent"])},[f(i(J),{class:"text-red-600 h-5 w-5"})],8,we)])],64))),256)),!c.model.translations.en.tags||c.model.translations.en.tags.length<4?(l(),a(g,{key:0},[s[12]||(s[12]=e("div",{class:"col-span-1 px-2 py-3 text-right text-right float-right"},null,-1)),e("div",be,[_(e("input",{"onUpdate:modelValue":s[4]||(s[4]=t=>k.value.text=t),type:"text",name:"tag",id:"tag",class:"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md",placeholder:"Текст",onKeydown:O(b,["enter"])},null,544),[[C,k.value.text]])]),e("div",_e,[f(i(I),{onClick:b,class:"text-green-600 h-5 w-5 cursor-pointer"})])],64)):p("",!0)],64)):p("",!0),i(r)==="kk"?(l(),a(g,{key:2},[(l(!0),a(g,null,L(c.model.translations.kk.tags,(t,u)=>(l(),a(g,null,[e("div",Ce,[e("a",{href:"#",class:"float-right",onClick:h(d=>E(u),["prevent"])},[t.icon?(l(),a("img",{key:0,src:t.icon,class:"h-6 w-6",alt:"icon"},null,8,je)):(l(),j(i(K),{key:1,class:"h-6 w-6 text-gray-400"}))],8,$e)]),e("div",Ve,[_(e("input",{"onUpdate:modelValue":d=>t.text=d,type:"text",name:"tag",id:"tag",class:"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md",placeholder:"Текст"}
1,null,8,Me),[[C,t.text]])]),e("div",De,[e("a",{href:"#",onClick:h(d=>B(u),["prevent"])},[f(i(J),{class:"text-red-600 h-5 w-5"})],8,Ue)])],64))),256)),!c.model.translations.kk.tags||c.model.translations.kk.tags.length<4?(l(),a(g,{key:0},[s[13]||(s[13]=e("div",{class:"col-span-1 px-2 py-3 text-right text-right float-right"},null,-1)),e("div",ze,[_(e("input",{"onUpdate:modelValue":s[5]||(s[5]=t=>k.value.text=t),type:"text",name:"tag",id:"tag",class:"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md",placeholder:"Текст",onKeydown:O(b,["enter"])},null,544),[[C,k.value.text]])]),e("div",Be,[f(i(I),{onClick:b,class:"text-green-600 h-5 w-5 cursor-pointer"})])],64)):p("",!0)],64)):p("",!0)]),e("div",Ee,[e("h2",null,x(o.$t("Блоки")),1)]),i(r)==="ru"?(l(),a("div",He,[f(F,{blocks:c.model.content,ref_key:"editor",ref:P,track:!0,onExport:N},null,8,["blocks"])])):i(r)==="en"?(l(),a("div",Ne,[f(F,{blocks:c.model.translations.en.content,track:!0,onExport:N},null,8,["blocks"])])):i(r)==="kk"?(l(),a("div",Te,[f(F,{blocks:c.model.translations.kk.content,track:!0,onExport:N},null,8,["blocks"])])):p("",!0),e("div",Le,[e("h2",null,x(o.$t("Изображение")),1),e("div",Oe,[n.model.logo?(l(),j(q,{key:0,href:"#",onClick:s[6]||(s[6]=h(t=>n.model.logo=null,["prevent"])),class:"mt-1"},{default:$(()=>[S(x(o.$t("Удалить")),1)]),_:1})):p("",!0)])]),D.value?(l(),a("div",Se,[e("img",{class:"w-full h-full object-center object-cover sm:w-full sm:h-full m-auto",src:D.value,alt:"logo"},null,8,Fe)])):p("",!0),D.value?p("",!0):(l(),a("div",Ie,[v.value.progress?(l(),a("progress",{key:0,value:v.value.percent,max:"100"},x(v.value.percent)+"% ",9,Je)):p("",!0),e("div",{class:"mt-4 flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-md hover:bg-gray-50",onDrop:s[8]||(s[8]=h(t=>A(t,"logo"),["prevent"])),onDragover:h(t=>!1,["prevent"])},[e("div",Ke,[s[14]||(s[14]=e("svg",{class:"mx-auto h-12 w-12 text-gray-400",stroke:"currentColor",fill:"none",viewBox:"0 0 48 48","aria-hidden":"true"},[e("path",{d:"M28 8H12a4 4 0 00-4 4v20m32-12v8m0 0v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-4l-3.172-3.172a4 4 0 00-5.656 0L28 28M8 32l9.172-9.172a4 4 0 015.656 0L28 28m0 0l4 4m4-24h8m-4-4v8m-12 4h.02","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),e("div",Ae,[e("label",Pe,[e("span",null,x(o.$t("Выберите файл для загрузки")),1),e("input",{name:"logo",type:"file",class:"sr-only",id:"logo",onChange:s[7]||(s[7]=t=>z(t,t.target.files[0],"logo")),accept:"image/*"},null,32)])])])],32)]))]),f(ee,{show:i(V),onClose:M},{title:$(()=>[e("div",qe,[e("div",Ge,x(o.$t("Выбор изображения")),1)])]),content:$(()=>[w.value?(l(),a("div",Qe,[e("div",Re,[e("img",{class:"w-10 h-10 object-center object-cover m-auto",src:w.value,alt:"icon"},null,8,We)])])):p("",!0),e("div",{class:"mt-4 flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-md hover:bg-gray-50",onDrop:s[10]||(s[10]=h(t=>A(t,"icon"),["prevent"])),onDragover:h(t=>!1,["prevent"])},[e("div",Xe,[s[15]||(s[15]=e("svg",{class:"mx-auto h-12 w-12 text-gray-400",stroke:"currentColor",fill:"none",viewBox:"0 0 48 48","aria-hidden":"true"},[e("path",{d:"M28 8H12a4 4 0 00-4 4v20m32-12v8m0 0v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-4l-3.172-3.172a4 4 0 00-5.656 0L28 28M8 32l9.172-9.172a4 4 0 015.656 0L28 28m0 0l4 4m4-24h8m-4-4v8m-12 4h.02","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),e("div",Ye,[e("label",Ze,[e("span",null,x(o.$t("Выберите файл для загрузки")),1),e("input",{name:"icon",type:"file",class:"sr-only",id:"icon",onChange:s[9]||(s[9]=t=>z(t,t.target.files[0],"icon")),accept:"image/*"},null,32)])])])],32)]),footer:$(()=>[f(te,{onClick:R},{default:$(()=>[S(x(o.$t("Сохранить")),1)]),_:1}),f(q,{onClick:M,class:"ml-2"},{default:$(()=>[S(x(o.$t("Закрыть")),1)]),_:1})]),_:1},8,["show"])],64))}};export{dt as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.