1import{a as P}from"./chunk-FCG72MYM.js";import{a as U,b as q}from"./chunk-NH6JOR7N.js";import"./chunk-3J5UD56K.js";import"./chunk-XXLI3WL3.js";import"./chunk-YOF2T3F3.js";import"./chunk-IWVIATIX.js";import"./chunk-UCY2FEHX.js";import"./chunk-O6DB7GE6.js";import"./chunk-IHQRRUNB.js";import"./chunk-IPGYUTJN.js";import"./chunk-ULJV3DCW.js";import"./chunk-USRAOEBW.js";import"./chunk-64DIT5X4.js";import{a as k}from"./chunk-I42NZW4Y.js";import{Ga as M,Ja as O}from"./chunk-BUUTWPG4.js";import{a as o}from"./chunk-YKCGA2DE.js";import{Ba as v,Ca as r,Dc as E,Fc as a,Gc as s,Ha as u,Pc as j,Qc as R,Va as S,Vc as _,W as d,Xa as y,Xc as A,ab as I,bb as T,cb as b,da as l,db as C,ea as p,ic as x,kb as w,ma as h,pa as m,sa as g,ya as f}from"./chunk-K5J7UZ3Z.js";import"./chunk-WCABR6TI.js";function Y(n,z){if(n&1&&(T(0,"div",0),C(1,"app-contenteditor",1),b()),n&2){let t=w();f(),I("datas",t.datas)}}var c="datas",ht=(()=>{class n{guardService;metaService;titleService;cdr;elem;globalcontentService;route;router;platformId;_renderer2;googleService;document;state;request;partner_id;destroyRef=d(p);datas;partnerid="";schema={};constructor(t,e,i,B,N,L,F,G,H,K,$,J,Q,V,W){this.guardService=t,this.metaService=e,this.titleService=i,this.cdr=B,this.elem=N,this.globalcontentService=L,this.route=F,this.router=G,this.platformId=H,this._renderer2=K,this.googleService=$,this.document=J,this.state=Q,this.request=V,this.partner_id=W,s(this.platformId)&&(this.partnerid=this.partner_id.toString())}ngOnInit(){s(this.platformId),this.getcontents(),this.checkPartner()}checkPartner(){this.guardService.getPartner$.pipe(o(this.destroyRef)).subscribe(t=>{t.nositemap?this.metaService.updateTag({name:"robots",content:"noindex,follow,max-image-preview:large,noodp,noydir"}):this.metaService.updateTag({name:"robots",content:"index,follow,max-image-preview:large,noodp,noydir"})})}async getcontents(){this.datas=this.state.get(c,{}),this.state.set(c,{}),!this.datas?.elements&&this.partnerid?.length>0?this.globalcontentService.request({partnerid:this.partnerid},"getstartsite").pipe(o(this.destroyRef)).subscribe(t=>{t?.globalcontentid?.length>0&&(this.datas=t,s(this.platformId)&&this.state.set(c,this.datas),a(this.platformId)&&this.incview(t?.globalcontentid),this.addTags(this.datas?.meta),this.setExtraScript(this.datas?.extraScript),this.cdr.detectChanges())}):this.datas?.elements&&this.partnerid?.length>0&&a(this.platformId)&&(this.setExtraScript(this.datas?.extraScript),this.incview(this.datas?.globalcontentid))}incview(t){this.globalcontentService.request({partnerid:this.partnerid,globalcontentid:t},"incview").pipe(o(this.destroyRef)).subscribe(e=>{})}initContent(t){t?.globalcontentid?.length>0&&(this.datas=t,s(this.platformId)&&this.state.set(c,this.datas),this.addTags(this.datas?.meta),a(this.platformId)&&this.setExtraScript(this.datas?.extraScript),this.cdr.detectChanges())}setExtraScript(t){this.googleService.gTagIsCreated$().pipe(o(this.destroyRef)).subscribe(e=>{if(e&&t?.length>0){let i=this._renderer2.createElement("script");i.text=t.trim().replaceAll(` 2`,"").replaceAll("<script>","").replaceAll("<\/script>",""),this._renderer2.appendChild(this.document.body,i)}})}updateCanonicalUrl(t){if(t?.length>0){let e=this.document.getElementsByTagName("head")[0],i=this.document.querySelector("link[rel='canonical']")||null;i==null&&(i=this.document.createElement("link"),e.appendChild(i)),i.setAttribute("rel","canonical"),i.setAttribute("href",t)}}ngAfterViewInit(){if(this.datas?.scriptdata?.length>0){let t=this.document.getElementById("clever-custom-content-script");t&&setTimeout(()=>{var e=this.document.createElement("script");e.textContent=this.datas?.scriptdata,e.id="clever-custom-content-script",this.document.body.replaceChild(e,t)},100)}}addTags(t){if(this.datas?.cssdata?.length>0){let i=this.document.getElementById("clever-custom-content-style");i&&(i.innerText=this.datas?.cssdata.replaceAll(` 3`,""))}let e=new URL(this.document.URL);if(this.metaService.updateTag({property:"og:type",content:"article"}),this.metaService.updateTag({property:"og:title",content:t?.title}),this.metaService.updateTag({name:"url",content:String(e.origin+e.pathname).replace(/http:/,"https:")}),this.updateCanonicalUrl(String(e.origin+e.pathname).replace(/http:/,"https:")),this.metaService.updateTag({property:"og:site_name",content:String(e.origin+e.pathname).replace(/http:/,"https:")}),this.metaService.updateTag({property:"og:url",content:String(e.origin+e.pathname).replace(/http:/,"https:")}),t?.description?.length>0&&(this.metaService.updateTag({name:"description",content:t.description}),this.metaService.updateTag({property:"og:description",content:t.description})),t?.keywords?.length>0&&this.metaService.updateTag({name:"keywords",content:t.keywords}),this.schema={"@context":"http://schema.org","@type":"WebSite",name:t?.title,de
3scription:t?.description,keywords:t?.keywords},this.globalcontentService.loadjsonld(this.schema),this.datas?.sdata&&this.datas?.sdata)try{this.globalcontentService.loadjsonld(JSON.parse(this.datas?.sdata))}catch(i){console.log(i)}t?.title?.length>0?this.titleService.setTitle(t?.title):this.titleService.setTitle("")}static \u0275fac=function(e){return new(e||n)(r(O),r(j),r(R),r(x),r(h),r(q),r(_),r(A),r(m),r(v),r(M),r(l),r(g),r(P,8),r(k,8))};static \u0275cmp=u({type:n,selectors:[["app-home"]],decls:1,vars:1,consts:[[1,"wrp"],[3,"datas"]],template:function(e,i){e&1&&S(0,Y,2,1,"div",0),e&2&&y(i.datas!=null&&i.datas.elements?0:-1)},dependencies:[E,U],styles:[`.wrp[_ngcontent-%COMP%]{height:max-content;width:100%} 4/*# sourceMappingURL=home.component-FO65IB66.css.map */`]})}return n})();export{ht as HomeComponent}; 5//# sourceMappingURL=chunk-5KXSYA2C.js.map
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.