1import{A as o,B as b,C as x,Eb as T,Fb as U,I as O,Ib as E,Jb as G,Kb as I,N as D,Z as M,ea as w,g as P,ib as f,m as L,s as v,w as h,y as A,z as C}from"./chunk-OCZA4CEZ.js";import{a as s,b as u,c as p}from"./chunk-YRBOWA3O.js";var F={siteUrl:"https://spaceparrots.de",siteName:"SpaceParrots",defaultDescription:"SpaceParrots - Digital solutions and creative development",defaultKeywords:"web development, software, digital solutions",titleSeparator:" | ",appendSiteName:!0,defaultLang:"de",allowIndexing:!0},c=class a{meta=o(T);title=o(U);router=o(I);document=o(O);renderer;routerSubscription;config=F;locales=[];currentLocale;defaultLocale;currentMetadata=D(void 0);constructor(e){this.renderer=e.createRenderer(null,null)}setLocaleConfig(e,t,r){this.locales=e,this.currentLocale=t,this.defaultLocale=r}getCurrentLocale(){return this.currentLocale}getLocales(){return[...this.locales]}configure(e){this.config=s(s({},F),e)}getConfig(){return s({},this.config)}init(){this.setDefaults(),this.routerSubscription=this.router.events.pipe(L(e=>e instanceof E)).subscribe(e=>{let t=this.buildCanonicalUrl(e.urlAfterRedirects);this.updateCanonicalUrl(t),this.setProperty("og:url",t),this.locales.length>0&&this.generateHreflangForPath(this.getPathWithoutLocale(e.urlAfterRedirects))})}buildLocalizedUrl(e="/"){let r=(e.startsWith("/")?e:`/${e}`).split("?")[0].split("#")[0],i=this.getPathWithoutLocale(r),n=i==="/"?"/":i.replace(/\/+$/,""),d=this.currentLocale?.urlPrefix??"";return`${this.config.siteUrl}${d}${n}`}buildCanonicalUrl(e){let t=this.currentLocale?.urlPrefix??"",r=this.getPathWithoutLocale(e);return`${this.config.siteUrl}${t}${r}`}getPathWithoutLocale(e){for(let t of this.locales)if(t.urlPrefix&&e.startsWith(t.urlPrefix))return e.slice(t.urlPrefix.length)||"/";return e}generateHreflangForPath(e){let t=this.locales.map(i=>({href:`${this.config.siteUrl}${i.urlPrefix}${e}`,hreflang:i.code})),r=this.defaultLocale?`${this.config.siteUrl}${this.defaultLocale.urlPrefix}${e}`:`${this.config.siteUrl}${e}`;this.updateAlternateUrls(t,r)}setDefaults(){this.setTitle(this.config.siteName),this.setDescription(this.config.defaultDescription),this.config.defaultKeywords&&this.setKeywords(this.config.defaultKeywords),this.config.defaultImage&&this.setImage(this.config.defaultImage),this.setProperty("og:type",this.config.defaultOpenGraph?.type??"website"),this.setProperty("og:site_name",this.config.siteName);let e=this.buildCanonicalUrl(this.router.url);this.setProperty("og:url",e),this.config.defaultOpenGraph?.locale&&this.setProperty("og:locale",this.config.defaultOpenGraph.locale),this.config.defaultOpenGraph?.localeAlternate&&this.config.defaultOpenGraph.localeAlternate.forEach(r=>{this.addProperty("og:locale:alternate",r)}),this.config.defaultTwitter?.site&&this.setMeta("twitter:site",this.config.defaultTwitter.site),this.setMeta("twitter:card",this.config.defaultTwitter?.card??"summary_large_image");let t=this.currentLocale?.code??this.config.defaultLang??"de";this.setLanguage(t),this.updateCanonicalUrl(e),this.locales.length>0&&this.generateHreflangForPath(this.getPathWithoutLocale(this.router.url)),this.config.allowIndexing||this.setRobots("noindex","nofollow")}destroy(){this.routerSubscription?.unsubscribe()}setPageMetadata(e){if(!e){this.resetToDefaults();return}if(this.currentMetadata.set(e),this.setTitle(e.title),e.description&&this.setDescription(e.description),e.keywords&&this.setKeywords(e.keywords),e.author&&this.setAuthor(e.author),e.asset?this.setAsset(e.asset):e.image&&this.setImage(e.image),e.canonicalUrl&&this.updateCanonicalUrl(e.canonicalUrl),e.alternateUrls?.length&&this.updateAlternateUrls(e.alternateUrls,e.canonicalUrl),e.noIndex||e.noFollow?this.setRobots(e.noIndex?"noindex":"index",e.noFollow?"nofollow":"follow"):this.config.allowIndexing&&this.meta.removeTag('name="robots"'),e.lang&&this.setLanguage(e.lang),e.openGraph&&this.setOpenGraph(e.openGraph),e.twitter&&this.setTwitterCard(e.twitter),e.customMeta&&Object.entries(e.customMeta).forEach(([t,r])=>{this.setMeta(t,r)}),e.customProperty&&Object.entries(e.customProperty).forEach(([t,r])=>{this.setProperty(t,r)}
1),e.structuredData){let t=Array.isArray(e.structuredData)?e.structuredData:[e.structuredData];this.setStructuredData(t)}}resetToDefaults(){this.currentMetadata.set(void 0),this.setDefaults(),this.clearStructuredData()}setTitle(e){let t=this.config.appendSiteName?`${e}${this.config.titleSeparator}${this.config.siteName}`:e;return this.title.setTitle(t),this.setMeta("title",t),this.setProperty("og:title",e),this.setMeta("twitter:title",e),this}setDescription(e){return this.setMeta("description",e),this.setProperty("og:description",e),this.setMeta("twitter:description",e),this}setKeywords(e){return this.setMeta("keywords",e),this}setAuthor(e){return this.setMeta("author",e),this}setImage(e){return this.setProperty("og:image",e),this.setMeta("twitter:image",e),this}setAsset(e){return this.setProperty("og:image",e.url),this.setProperty("og:image:width",String(e.width)),this.setProperty("og:image:height",String(e.height)),e.mimeType&&this.setProperty("og:image:type",e.mimeType),e.alt&&(this.setProperty("og:image:alt",e.alt),this.setMeta("twitter:image:alt",e.alt)),this.setMeta("twitter:image",e.url),this}setRobots(e,t){return this.setMeta("robots",`${e}, ${t}`),this}setLanguage(e){return this.document.documentElement&&this.renderer.setAttribute(this.document.documentElement,"lang",e),this}setOpenGraph(e){return e.type&&this.setProperty("og:type",e.type),e.siteName&&this.setProperty("og:site_name",e.siteName),e.locale&&this.setProperty("og:locale",e.locale),e.localeAlternate&&e.localeAlternate.forEach(t=>{this.addProperty("og:locale:alternate",t)}),e.article&&(e.article.publishedTime&&this.setProperty("article:published_time",e.article.publishedTime),e.article.modifiedTime&&this.setProperty("article:modified_time",e.article.modifiedTime),e.article.expirationTime&&this.setProperty("article:expiration_time",e.article.expirationTime),e.article.section&&this.setProperty("article:section",e.article.section),e.article.author&&e.article.author.forEach(t=>{this.addProperty("article:author",t)}),e.article.tag&&e.article.tag.forEach(t=>{this.addProperty("article:tag",t)})),e.profile&&(e.profile.firstName&&this.setProperty("profile:first_name",e.profile.firstName),e.profile.lastName&&this.setProperty("profile:last_name",e.profile.lastName),e.profile.username&&this.setProperty("profile:username",e.profile.username),e.profile.gender&&this.setProperty("profile:gender",e.profile.gender)),e.video&&(this.setProperty("og:video",e.video.url),e.video.secureUrl&&this.setProperty("og:video:secure_url",e.video.secureUrl),e.video.type&&this.setProperty("og:video:type",e.video.type),e.video.width&&this.setProperty("og:video:width",String(e.video.width)),e.video.height&&this.setProperty("og:video:height",String(e.video.height))),this}setTwitterCard(e){return e.card&&this.setMeta("twitter:card",e.card),e.site&&this.setMeta("twitter:site",e.site),e.creator&&this.setMeta("twitter:creator",e.creator),e.title&&this.setMeta("twitter:title",e.title),e.description&&this.setMeta("twitter:description",e.description),e.image&&this.setMeta("twitter:image",e.image),e.imageAlt&&this.setMeta("twitter:image:alt",e.imageAlt),e.player&&(this.setMeta("twitter:player",e.player.url),this.setMeta("twitter:player:width",String(e.player.width)),this.setMeta("twitter:player:height",String(e.player.height)),e.player.stream&&this.setMeta("twitter:player:stream",e.player.stream)),this}updateCanonicalUrl(e){let t=this.cleanUrl(e),r=this.document.querySelector('link[rel="canonical"]');return r||(r=this.renderer.createElement("link"),this.renderer.setAttribute(r,"rel","canonical"),this.renderer.appendChild(this.document.head,r)),this.renderer.setAttribute(r,"href",t),this}updateAlternateUrls(e,t){return this.document.querySelectorAll('link[rel="alternate"][hreflang]').forEach(i=>i.remove()),e.forEach(({href:i,hreflang:n})=>{this.createAlternateLink(i,n)}),t&&this.createAlternateLink(t,"x-default"),this}createAlternateLink(e,t){let r=this.renderer.createElement("link");this.renderer.setAttribute(r,"rel","alternate"),this.renderer.setAttribute(r,"hreflang",t),this.renderer.setAttribute(r,"href",e),this.renderer.appendChild(this.document.head,r)}setStructuredData(e){return this.clearStructuredData(),e.forEach(t=>this.upsertStructuredData(t)),this}addStructuredData(e){return this.upsertStructuredData(e),this}upsertStructuredData(e){let t=String(e["@id"]??e["@type"]),r=JSON.stringify(s({"@context":"https://schema.org"},e)),i=this.document.querySelector(`script[data-seo="structured-data"][data-schema-key="${t}"]`);if(i){i.textContent=r;return}let n=this.renderer.createElement("script");this.renderer.setAttribute(n,"type","application/ld+json"),this.renderer.setAttribute(n,"data-seo","structured-data"),this.renderer.setAttribute(n,"data-schema-key",t);let d=this.renderer.createText(r);this.renderer.appendChild(n,d),this.renderer.appendChild(this.document.head,n)}clearStructuredData(){return this.document.querySelectorAll('script[data-seo="structured-data"]').forEach(t=>t.remove()),this}setMeta(e,t){let r=`name="${e}"`;return this.meta.getTag(r)?this.meta.updateTag({name:e,content:t},r):this.meta.addTag({name:e,content:t}),this}setProperty(e,t){let r=`property="${e}"`;return this.meta.getTag(r)?this.meta.updateTag({property:e,content:t},r):this.meta.addTag({property:e,content:t}),this}addProperty(e,t){return this.meta.addTag({property:e,content:t}),this}removeMeta(e){return this.meta.removeTag(`name="${e}"`),this}removeProperty(e){return this.meta.removeTag(`property="${e}"`),this}cleanUrl(e){try{let t=new URL(e);return`${t.origin}${t.pathname}`}catch{return e.split("?")[0].split("#")[0]}}static \u0275fac=function(t){return new(t||a)(C(M))};static \u0275prov=h({token:a,factory:a.\u0275fac,providedIn:"root"})};var m=class a{seo=o(c);setOrganization(e){return this.seo.addStructuredData(s({"@type":"Organization"},e)),this}setDefaultOrganization(e={}){return this.setOrganization({name:"SpaceParrots",url:e.url??"https://spaceparrots.de",logo:e.logo??"https://spaceparrots.de/assets/logo/logo_styled.webp",description:e.description??"Digital solutions and creative development",sameAs:e.socialLinks})}setWebsite(e){return this.seo.addStructuredData(s({"@type":"WebSite"},e)),this}setWebsiteWithSearch(e,t,r,i){let n={"@type":"WebSite",name:e,url:t,description:i,potentialAction:{"@type":"SearchAction",target:`${r}?q={search_term_string}`,"query-input":"required name=search_term_string"}};return this.seo.addStructuredData(n),this}setBreadcrumbs(e){let r={"@type":"BreadcrumbList",itemListElement:e.map((i,n)=>s({"@type":"ListItem",position:n+1,name:i.name},i.url&&{item:i.url}))};return this.seo.addStructuredData(r),this}setArticle(e){let i=e,{type:t}=i,r=p(i,["type"]);return this.seo.addStructuredData(s({"@type":t??"Article"},r)),this}setBlogPost(e){let t={"@type":"Person",name:e.authorName,url:e.authorUrl},r={"@type":"Organization",name:e.publisherName,logo:e.publisherL
1ogo};return this.setArticle({type:"BlogPosting",headline:e.headline,description:e.description,image:e.image,author:t,publisher:r,datePublished:e.datePublished,dateModified:e.dateModified??e.datePublished,mainEntityOfPage:e.url})}setFAQ(e){let r={"@type":"FAQPage",mainEntity:e.map(i=>({"@type":"Question",name:i.question,acceptedAnswer:{"@type":"Answer",text:i.answer}}))};return this.seo.addStructuredData(r),this}setService(e){return this.seo.addStructuredData(s({"@type":"Service"},e)),this}setServices(e){return e.forEach(t=>this.setService(t)),this}setLocalBusiness(e){let i=e,{type:t}=i,r=p(i,["type"]);return this.seo.addStructuredData(s({"@type":t??"LocalBusiness"},r)),this}setProfessionalService(e){let t={type:"ProfessionalService",name:e.name,description:e.description,url:e.url,telephone:e.telephone,email:e.email,image:e.image,sameAs:e.socialLinks,priceRange:e.priceRange,address:e.address?{"@type":"PostalAddress",streetAddress:e.address.street,addressLocality:e.address.city,addressRegion:e.address.region,postalCode:e.address.postalCode,addressCountry:e.address.country}:void 0,geo:e.coordinates?{"@type":"GeoCoordinates",latitude:e.coordinates.lat,longitude:e.coordinates.lng}:void 0};return this.setLocalBusiness(t)}setPerson(e){return this.seo.addStructuredData(s({"@type":"Person"},e)),this}addCustomSchema(e){return this.seo.addStructuredData(e),this}clear(){return this.seo.clearStructuredData(),this}static \u0275fac=function(t){return new(t||a)};static \u0275prov=h({token:a,factory:a.\u0275fac,providedIn:"root"})};function y(a){return typeof a=="object"&&a!==null&&"pageMetadata"in a&&typeof a.pageMetadata?.subscribe=="function"}var S=class a{routerOutlet=o(G);seoService=o(c);subscription;constructor(){this.subscription=this.routerOutlet.activateEvents.pipe(v(e=>y(e)?e.pageMetadata:P(void 0))).subscribe(e=>{this.seoService.setPageMetadata(e)})}ngOnDestroy(){this.subscription?.unsubscribe()}static \u0275fac=function(t){return new(t||a)};static \u0275dir=w({type:a,selectors:[["router-outlet"]]})};var g=new A("LOCALE_CONFIG");function $(a){return{provide:g,useValue:a}}function k(a){return x([{provide:b,multi:!0,useValue:()=>{let e=o(c),t=o(f),r=o(g,{optional:!0}),i=r?.find(l=>l.code===t),n=r?.find(l=>l.isDefault),d=u(s({},a),{defaultLang:t,defaultOpenGraph:u(s({},a?.defaultOpenGraph),{locale:i?.fullCode??a?.defaultOpenGraph?.locale,localeAlternate:r?.filter(l=>l.code!==t).map(l=>l.fullCode)})});e.configure(d),e.setLocaleConfig(r??[],i,n),e.init()}}])}export{c as a,m as b,S as c,g as d,$ as e,k as f}; 2/**i18n:afbde2c97221427f27063cfdef8eb598434691497ebf474a79adfa318cc57c1f*/
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.