3 lines
10 KiB
JavaScript
3 lines
10 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HeadingBlock-iaPv_EZx.js","assets/SearchModal-CGHtjMJb.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/app-lWrE2aWG.js","assets/app-BuUCQLTR.css","assets/SearchModal-wAgUXteK.css","assets/ParagraphBlock-64oJsNrU.js","assets/ParagraphBlock-DFLxgZzs.css","assets/ClientImageSlider-ZnyNtD9R.js","assets/v3-CDJmn87G.js","assets/ImageBlock-Bz4NDWK1.js","assets/ImageBlock-CjbQ7Xd1.css","assets/FileBlock-DP4RAJQp.js","assets/PersonBlock-C8nng2Wc.js","assets/PersonBlock-Y1OFixhA.css","assets/StepperBlock-Cnp91vN2.js","assets/StepperBlock-DNUyIEMk.css","assets/VideoBlock-NJG_Gd3K.js","assets/TabBlock-BtQJWrfw.js","assets/PageTabBuilder-81M-YOIr.js","assets/PostListBlock-BoZg3Tch.js","assets/PostItemBlock-CA1v0gBs.js","assets/PageItemBlock-DlR0YBkQ.js","assets/FormBlock-BVey85an.js","assets/FormBlock-BGQ6HgNS.css"])))=>i.map(i=>d[i]);
|
||
import{q as y,o as c,c as d,d as w,e as S,k as L,F as x,_ as l,i as k,r as B,b as s,a as b,w as f,g as v,l as p,t as m,f as h,n as N,T as E}from"./app-lWrE2aWG.js";import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{s as T}from"./SearchModal-CGHtjMJb.js";const C={name:"PageBuilder",methods:{getComponent(t){return y({heading:()=>l(()=>import("./HeadingBlock-iaPv_EZx.js"),__vite__mapDeps([0,1,2,3,4,5])),paragraph:()=>l(()=>import("./ParagraphBlock-64oJsNrU.js"),__vite__mapDeps([6,1,2,3,4,5,7])),images:()=>l(()=>import("./ClientImageSlider-ZnyNtD9R.js"),__vite__mapDeps([8,9,3,4,2])),image:()=>l(()=>import("./ImageBlock-Bz4NDWK1.js"),__vite__mapDeps([10,1,2,3,4,5,9,11])),files:()=>l(()=>import("./FileBlock-DP4RAJQp.js"),__vite__mapDeps([12,1,2,3,4,5,9,11])),person:()=>l(()=>import("./PersonBlock-C8nng2Wc.js"),__vite__mapDeps([13,1,2,3,4,5,9,14])),stepper:()=>l(()=>import("./StepperBlock-Cnp91vN2.js"),__vite__mapDeps([15,1,2,3,4,5,9,16])),video:()=>l(()=>import("./VideoBlock-NJG_Gd3K.js"),__vite__mapDeps([17,1,2,3,4,5,9])),tabs:()=>l(()=>import("./TabBlock-BtQJWrfw.js"),__vite__mapDeps([18,1,2,3,4,5,19,0,6,7,8,9,10,11,12,13,14,15,16,17,20])),postsList:()=>l(()=>import("./PostListBlock-BoZg3Tch.js"),__vite__mapDeps([20,1,2,3,4,5,11])),postItem:()=>l(()=>import("./PostItemBlock-CA1v0gBs.js"),__vite__mapDeps([21,1,2,3,4,5,11])),pageItem:()=>l(()=>import("./PageItemBlock-DlR0YBkQ.js"),__vite__mapDeps([22,1,2,3,4,5])),customForm:()=>l(()=>import("./FormBlock-BVey85an.js"),__vite__mapDeps([23,1,2,3,4,5,9,24]))}[t]||null)}},props:{blocks:{type:Array,required:!0}}};function I(t,e,o,a,r,n){return c(!0),d(x,null,w(o.blocks,(i,u)=>(c(),S(L(n.getComponent(i.type)),{key:u,block:i},null,8,["block"]))),128)}const ne=_(C,[["render",I]]),M={name:"PageBreadcrumbs",components:{Link:k},data(){return{}},methods:{textLimit(t,e){if(t.length>e){let o;return o=t.substring(0,e),o+"..."}return t},isMobileDevice(){return window.innerWidth<1024},handleSectionClick(t){this.isMobileDevice()?this.toggleMobileNavSection(t):this.toggleDesktopNavSection(t)},handleSubSectionClick(t,e){this.isMobileDevice()?this.toggleMobileNavSubSection(t,e):this.toggleDesktopNavSubSection(t,e)},highlightNavItem(t){t.classList.add("animate-pulse"),setTimeout(()=>{t.classList.remove("animate-pulse")},4e3)},openMobileNavMenu(){document.getElementById("open-mobile-btn").click()},toggleMobileNavSubSection(t,e){this.openMobileNavMenu();const o=document.getElementById("open-mobile-nav"),a=o.querySelector("#nav-section-accordion-"+t.data.slug),r=o.querySelector("#nav-section-accordion-btn-"+t.data.slug);a.classList.contains("active")||r.click();const n=o.querySelector("#nav-sub-section-accordion-"+e.data.slug),i=o.querySelector("#nav-sub-section-accordion-btn-"+e.data.slug);n.classList.contains("active")&&i.click(),this.highlightNavItem(n)},toggleMobileNavSection(t){const e=document.getElementById("open-mobile-nav"),o=e.querySelector("#nav-section-accordion-"+t.data.slug),a=e.querySelector("#nav-section-accordion-btn-"+t.data.slug);o.classList.contains("active")&&a.click(),this.openMobileNavMenu(),this.highlightNavItem(o)},toggleDesktopNavSubSection(t,e){const o=document.getElementById("desktop-nav"),a=o.querySelector("#nav-sub-section-title-"+e.data.slug);o.querySelector("#nav-section-btn-"+t.data.slug).click(),this.highlightNavItem(a)},toggleDesktopNavSection(t){const e=document.getElementById("desktop-nav");e.querySelector("#nav-section-menu-"+t.data.slug),e.querySelector("#nav-section-btn-"+t.data.slug).click()}},props:{breadcrumbs:{type:Object},pageTitle:{type:String}}},P={class:"flex justify-between pb-4 items-center"},D={class:"flex w-full sm:items-center gap-x-5 sm:gap-x-3"},V={class:"grow"},A={class:"grid sm:flex sm:justify-between sm:items-center gap-2"},R={key:0,class:"flex items-center whitespace-normal min-w-0 flex-wrap gap-y-2","aria-label":"Breadcrumb"},q={class:"text-sm"},O={class:"text-sm"},$={class:"text-sm"},j={class:"text-sm"},F={key:1,class:"flex items-center whitespace-nowrap min-w-0 flex-wrap","aria-label":"Breadcrumb"},z={class:"text-sm"};function H(t,e,o,a,r,n){const i=B("Link");return c(),d("div",P,[s("div",D,[s("div",V,[s("div",A,[o.breadcrumbs?(c(),d("ol",R,[s("li",q,[b(i,{href:t.route("index"),class:"flex items-center text-gray-500 hover:text-primaryBlue"},{default:f(()=>e[3]||(e[3]=[v(" Главная "),s("svg",{class:"flex-shrink-0 mx-3 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)])),_:1},8,["href"])]),s("li",O,[s("span",{class:"flex items-center text-gray-500 hover:text-primaryBlue cursor-pointer",onClick:e[0]||(e[0]=p(u=>n.handleSectionClick(this.breadcrumbs.mainSection),["prevent"]))},[v(m(n.textLimit(this.breadcrumbs.mainSection.data.title,25))+" ",1),e[4]||(e[4]=s("svg",{class:"flex-shrink-0 mx-3 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1))])]),s("li",$,[s("span",{class:"flex items-center text-gray-500 hover:text-primaryBlue cursor-pointer",onClick:e[1]||(e[1]=p(u=>n.handleSubSectionClick(this.breadcrumbs.mainSection,this.breadcrumbs.subSection),["prevent"]))},[v(m(n.textLimit(this.breadcrumbs.subSection.data.title,25))+" ",1),e[5]||(e[5]=s("svg",{class:"flex-shrink-0 mx-3 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1))])]),s("li",j,[b(i,{href:t.route("page.view",this.breadcrumbs.page.data.path),class:"flex items-center text-gray-500 hover:text-primaryBlue"},{default:f(()=>[v(m(n.textLimit(this.breadcrumbs.page.data.title,25)),1)]),_:1},8,["href"])])])):h("",!0),o.breadcrumbs?h("",!0):(c(),d("ol",F,[e[6]||(e[6]=s("li",{class:"text-sm"},[s("span",{class:"flex items-center text-gray-500 hover:text-blue-600",href:"/"},[v(" Главная "),s("svg",{class:"flex-shrink-0 mx-3 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})])])],-1)),s("li",z,[s("span",{class:"flex items-center text-gray-500 hover:text-blue-600",onClick:e[2]||(e[2]=p(()=>{},["prevent"]))},m(n.textLimit(o.pageTitle,30)),1)])]))])])])])}const ie=_(M,[["render",H]]),Y={name:"PageTitle",components:{Link:k},data(){return{}},methods:{textLimit(t,e){if(t.length>e){let o;return o=t.substring(0,e),o+"..."}return t}},props:{header:{type:String}}},W={class:"space-y-3"},G={class:"text-2xl mb-10 font-bold md:text-3xl"};function J(t,e,o,a,r,n){return c(),d("div",W,[s("h1",G,m(o.header),1)])}const re=_(Y,[["render",J]]),K={name:"PageNavigateLinks",components:{Link:k},data(){return{currentNavSection:null,scrollTop:!1}},methods:{textLimit(t,e){if(t.length>e){let o;return o=t.substring(0,e),o+"..."}return t},generateSlug(t){return T(t,{lower:!0,strict:!0,locale:"ru"})},onScroll(t){const e=window.scrollY;this.scrollTop=e>100;const o=document.querySelectorAll("h2"),a=document.querySelector("#visor");let r=null;const n=a.getBoundingClientRect();if(n.top>window.scrollY){this.currentNavSection=null,r=null;return}for(let i=0;i<o.length;i++){const u=o[i],g=u.getBoundingClientRect();if(g.top>=0&&g.bottom<=window.innerHeight&&g.bottom>=n.top&&g.top<=n.bottom){u!==r&&(this.currentNavSection=u.id,r=u);break}}},scrollToTop(){window.scrollTo(0,0)}},mounted(){window.addEventListener("scroll",this.onScroll)},unmounted(){window.removeEventListener("scroll",this.onScroll)},props:{headerNavs:{type:Array}}},Q={class:"order-last hidden w-56 shrink-0 lg:block"},U={key:0,class:"sticky top-[100px] h-[calc(100vh-121px)]"},X={class:"styled-scrollbar max-h-[70vh] space-y-1.5 overflow-y-auto py-2 text-sm"},Z=["href"];function ee(t,e,o,a,r,n){return c(),d(x,null,[e[3]||(e[3]=s("div",{class:"w-full h-[67px] fixed pointer-events-none",id:"visor"},null,-1)),s("nav",Q,[o.headerNavs.length>0?(c(),d("div",U,[e[2]||(e[2]=s("div",{class:"text-gray-1000 mb-2 text-md font-medium"},"На этой странице",-1)),s("ul",X,[(c(!0),d(x,null,w(o.headerNavs,i=>(c(),d("li",{class:"anchor-li",key:i.id},[s("a",{class:N([{"translate-x-2 text-primaryBlue":r.currentNavSection===n.generateSlug(i.text),"bg-transperant text-gray-600 hover:text-gray-900":r.currentNavSection!==n.generateSlug(i.text)},"duration-150 block py-1 px-2 leading-[1.6] rounded-md"]),href:"#"+n.generateSlug(i.text)},m(i.text),11,Z)]))),128)),b(E,{name:"fade"},{default:f(()=>[r.scrollTop?(c(),d("li",{key:0,class:"anchor-li flex items-center py-2 border-t",onClick:e[0]||(e[0]=p((...i)=>n.scrollToTop&&n.scrollToTop(...i),["prevent"]))},e[1]||(e[1]=[s("button",{class:"bg-transperant text-gray-600 cursor-pointer hover:text-gray-900 duration-300 block px-2 leading-[1.6] rounded-md"},"К началу",-1),s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-[17px] text-gray-600"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 11.25l-3-3m0 0l-3 3m3-3v7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)]))):h("",!0)]),_:1})])])):h("",!0)])],64)}const le=_(K,[["render",ee]]);export{le as P,re as a,ie as b,ne as c};
|