1import{a as L}from"./chunk-YNTMUG3Q.js";import{c as k}from"./chunk-GYTFHDJ6.js";import{b,c as g}from"./chunk-XER5W7IO.js";import{a as S}from"./chunk-7CYF2ZD5.js";import{d as h}from"./chunk-56CZHGRG.js";import{e as A}from"./chunk-4ZHBVU6N.js";import{A as n}from"./chunk-TL22AELH.js";import{R as f,U as a,Y as u,aa as s,ba as c,d as m,ma as p,y as d}from"./chunk-WVWDRV7K.js";var T={[n.UK]:{href:"/rss-uk.xml",title:"\u041B\u044E\u043A\u0441 \u0424\u041C \u2014 \u041D\u043E\u0432\u0438\u043D\u0438"},[n.RU]:{href:"/ru/rss-ru.xml",title:"\u041B\u044E\u043A\u0441 \u0424\u041C \u2014 \u041D\u043E\u0432\u043E\u0441\u0442\u0438"}},q=(()=>{class l{constructor(t,e,i,o,r){this.dom=t,this.title=e,this.pd=i,this.meta=o,this.pageDataService=r,this._init$=new m,this.urlService=c(k),this.locale=c(S),this._init$.pipe(a(()=>{this.setDocumentLang(this.locale),this.createRssFeedLink(this.locale)}),f(()=>this.processPageData())).subscribe()}init(){this._init$.next()}setNoIndexFollow(){this.meta.removeTag("name='robots'"),this.meta.addTag({name:"robots",content:"noindex, follow"})}setNoIndexNoFollow(){this.meta.removeTag("name='robots'"),this.meta.addTag({name:"robots",content:"noindex, nofollow"})}setRatingAdult(){this.meta.removeTag("name='rating'"),this.meta.addTag({name:"rating",content:"RTA-5042-1996-1400-1577-RTA"})}processPageData(){return this.pageDataService.pageData$.pipe(a(t=>{this.title.setTitle(`${t.seoTitle||t.title}`),this.meta.addTag({name:"description",content:t.seoDescription||t.description}),this.createCanonicalURL(this.urlService.includeDomain(t.canonicalUrl)?t.canonicalUrl:`${h.protocol}${h.host}${t.canonicalUrl}`),this.createAlternate(t.alternateUa,t.alternateRu),this.createAmpUrl(t.ampUrl),this.initOgData(t.ogTags),this.initTwitterTags(t.twitterTags)}),d(()=>this.pd.isServer),a(t=>{this.initLdJsonPageData(t.breadcrumbs),this.initLdJsonPageData(t.newsStructuredData),t.newsMediaOrganization&&this.initLdJsonPageData(t.newsMediaOrganization),t.webPage&&this.initLdJsonPageData(t.webPage),t.schemaProfileData&&this.initLdJsonPageData(t.schemaProfileData),t.webSite&&this.initLdJsonPageData(t.webSite),t.collectionPage&&this.initLdJsonPageData(t.collectionPage),t.radioCatalog&&this.initLdJsonPageData(t.radioCatalog)}))}setDocumentLang(t){this.dom.documentElement.lang=t}createRssFeedLink(t){let e=T[t]??T[n.UK],i=this.dom.querySelector('link[rel="alternate"][type="application/rss+xml"]');i||(i=this.dom.createElement("link"),this.dom.head.appendChild(i)),i.setAttribute("rel","alternate"),i.setAttribute("type","application/rss+xml"),i.setAttribute("title",e.title),i.setAttribute("href",this.urlService.getUrlWithDomain(e.href))}createCanonicalURL(t){let e=this.dom.querySelector('link[rel="canonical"]');e||(e=this.dom.createElement("link"),this.dom.head.appendChild(e)),e.setAttribute("rel","canonical"),e.setAttribute("href",t)}createAlternate(t,e){if(!t||!e)return;let i=this.dom.querySelector(`link[rel="alternate"][hreflang="${n.UK}"]`),o=this.dom.querySelector(`link[rel="alternate"][hreflang="${n.RU}"]`),r=this.dom.querySelector('link[rel="alternate"][hreflang="x-default"]');this.createAlternateLink(i,n.UK,t,this),this.createAlternateLink(o,n.RU,e,this),this.createAlternateLink(r,"x-default",t,this)}createAlternateLink(t,e,i,o){let r=t;r||(r=o.dom.createElement("link"),o.dom.head.appendChild(r)),r.setAttribute("rel","alternate"),r.setAttribute("hreflang",e),r.setAttribute("href",this.urlService.getUrlWithDomain(i))}initLdJsonPageData(t){if(!t)return;let e=this.dom.createElement("script");e.type="application/ld+json",e.text=`${JSON.stringify(t)}`,this.dom.head.appendChild(e)}initOgData(t){t&&Object.keys(t).forEach(e=>{this.meta.updateTag({property:t[e].property,content:t[e].content})})}initTwitterTags(t){t&&Object.keys(t).forEach(e=>{this.meta.updateTag({property:t[e].property,content:t[e].content})})}createAmpUrl(t){if(!t)return;let e=this.dom.querySelector("link[rel=amphtml]");e||(e=this.dom.createElement("link"),this.dom.head.appendChild(e)),e.setAttribute("rel","amphtml"),e.setAttribute("href",t)}static{this.\u0275fac=function(e){return new(e||l)(s(p),s(g),s(A),s(b),s(L))}}static{this.\u0275prov=u({token:l,factory:l.\u0275fac,providedIn:"root"})}}return l})();export{q as a}; 2/**i18n:b952e75ab23741d25f680fedfc6f30d8ba4a08f86eea995ae72f1e104606fbd9*/
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.