diff --git a/dist/__chunks__/createOptimizedPicture.CyR9tLTg.js b/dist/__chunks__/createOptimizedPicture.CyR9tLTg.js new file mode 100644 index 00000000..c856fa48 --- /dev/null +++ b/dist/__chunks__/createOptimizedPicture.CyR9tLTg.js @@ -0,0 +1,7 @@ +<<<<<<<< HEAD:dist/__chunks__/createOptimizedPicture.DLZ8Nghn.js +import{F as w,m as u}from"./fetch.service.yiMnp1FM.js";import{i as f}from"./isSidekickLibraryActive.U-fJCMMj.js";class g{async getPlaceHolder(o){try{const c="/placeholder.json",h={cacheOptions:{cacheType:"runtime"}},n=(await w.fetchJson(c,h)).data.find(t=>t.Key===o);if(!n){const t=`PlaceholderService: Placeholder with key ${o} could not be found.`;throw u.error(t),new Error(t)}return n.Text}catch(c){throw u.error("PlaceholderService: Error fetching placeholder data:",c),c}}}const P=new g;function $(){if(!f())return window.location.href;const{location:i}=window.parent,o=new URLSearchParams(i.search);return`${i.origin}${o.get("path")}`}function S(i){if(i.src==="")return;const{src:o,alt:c,eager:h=!1,width:l,height:n,breakpoints:t=[{media:"(min-width: 600px)",width:2e3},{width:750}]}=i,p=new URL(o,$()),d=document.createElement("picture"),{pathname:a}=p,m=a.substring(a.lastIndexOf(".")+1);return t.forEach(r=>{const s=document.createElement("source");r.media&&s.setAttribute("media",r.media),s.setAttribute("type","image/webp"),s.setAttribute("srcset",`${a}?width=${r.width}&format=webply&optimize=medium`),d.appendChild(s)}),t.forEach((r,s)=>{if(st.Key===o);if(!n){const t=`PlaceholderService: Placeholder with key ${o} could not be found.`;throw u.error(t),new Error(t)}return n.Text}catch(c){throw u.error("PlaceholderService: Error fetching placeholder data:",c),c}}}const P=new g;function $(){if(!f())return window.location.href;const{location:i}=window.parent,o=new URLSearchParams(i.search);return`${i.origin}${o.get("path")}`}function S(i){if(i.src==="")return;const{src:o,alt:c,eager:h=!1,width:l,height:n,breakpoints:t=[{media:"(min-width: 600px)",width:2e3},{width:750}]}=i,p=new URL(o,$()),d=document.createElement("picture"),{pathname:a}=p,m=a.substring(a.lastIndexOf(".")+1);return t.forEach(r=>{const s=document.createElement("source");r.media&&s.setAttribute("media",r.media),s.setAttribute("type","image/webp"),s.setAttribute("srcset",`${a}?width=${r.width}&format=webply&optimize=medium`),d.appendChild(s)}),t.forEach((r,s)=>{if(s>>>>>>> origin/develop:dist/__chunks__/createOptimizedPicture.CyR9tLTg.js diff --git a/dist/__chunks__/createOptimizedPicture.CyR9tLTg.js.map b/dist/__chunks__/createOptimizedPicture.CyR9tLTg.js.map new file mode 100644 index 00000000..84f33de7 --- /dev/null +++ b/dist/__chunks__/createOptimizedPicture.CyR9tLTg.js.map @@ -0,0 +1,5 @@ +<<<<<<<< HEAD:dist/__chunks__/createOptimizedPicture.DLZ8Nghn.js.map +{"version":3,"file":"createOptimizedPicture.DLZ8Nghn.js","sources":["../../src/services/placeholder.service.ts","../../src/helpers/sidekick/getHref.ts","../../src/utils/createOptimizedPicture.ts"],"sourcesContent":["import { DebuggerService } from '@kluntje/services';\nimport FetchService, { FetchServiceOptions } from './fetch.service.ts';\nimport { SheetsResponse } from 'Types/sheetResponse.types.ts';\nimport { Placeholder } from 'Types/siteMap.types.ts';\n\nclass PlaceholderService {\n public async getPlaceHolder(key: string): Promise {\n try {\n const url = '/placeholder.json';\n const options: FetchServiceOptions = {\n cacheOptions: { cacheType: 'runtime' },\n };\n const sheetsResponse = await FetchService.fetchJson>(url, options);\n const placeholderRecord = sheetsResponse.data.find((item: Placeholder): boolean => item.Key === key);\n\n if (!placeholderRecord) {\n const errorMessage = `PlaceholderService: Placeholder with key ${key} could not be found.`;\n DebuggerService.error(errorMessage);\n throw new Error(errorMessage);\n }\n\n return placeholderRecord!.Text;\n } catch (error) {\n DebuggerService.error('PlaceholderService: Error fetching placeholder data:', error);\n throw error;\n }\n }\n}\n\nexport default new PlaceholderService();\n","import { isSidekickLibraryActive } from './isSidekickLibraryActive.ts';\n\n/**\n * Returns the true origin of the current page in the browser.\n * If the page is running in an iframe with srcdoc, the ancestor origin + the path query param is returned.\n * @returns {String} The href of the current page or the href of the block running in the library\n *\n * @example\n * const url = new URL(src, getHref());\n *\n * @remarks\n * Needs to be used when the Sidekick Library Plugin is in use.\n */\nexport function getHref(): string {\n if (!isSidekickLibraryActive()) return window.location.href;\n\n const { location: parentLocation } = window.parent;\n const urlParams = new URLSearchParams(parentLocation.search);\n return `${parentLocation.origin}${urlParams.get('path')}`;\n}\n","import { getHref } from 'Helpers/sidekick/getHref.ts';\n\n/**\n * Represents a breakpoint configuration used in responsive web design.\n *\n * @interface BreakPoint\n * @property {number} [media] - The media query string defining the condition for this breakpoint.\n * @property {number} [width] - The width associated with this breakpoint.\n *\n * @example\n * // Example usage:\n * const exampleBreakPoint: BreakPoint = {\n * media: \"(min-width: 600px)\",\n * width: \"100\"\n * };\n */\ninterface BreakPoint {\n media?: string;\n width?: number;\n}\n\n/**\n * Represents the arguments for creating an optimized picture element.\n *\n * @interface CreateOptimizedPictureArgs\n * @property {string} src - The URL of the image.\n * @property {string} alt - The alternative text for the image.\n * @property {number} width - The width of the image in CSS pixels.\n * @property {number} height - The height of the image in CSS pixels.\n * @property {boolean} [eager] - Whether to load the image immediately.\n * @property {BreakPoint[]} [breakpoints] - The breakpoints for responsive images.\n */\nexport interface CreateOptimizedPictureArgs {\n src: string;\n alt: string;\n width: number;\n height: number;\n eager?: boolean;\n breakpoints?: BreakPoint[];\n}\n\n/**\n * Creates an optimized HTML picture element with responsive image sources and a fallback image.\n *\n * @param {CreateOptimizedPictureArgs} createOptimizedPictureArgs - The arguments for creating the picture element.\n * @returns {HTMLPictureElement} - The created HTML picture element.\n *\n * @example\n * const args = {\n * src: 'image.jpg',\n * alt: 'Example Image',\n * width: '200',\n * height: '150',\n * eager: true,\n * breakpoints: [\n * { media: '(min-width: 600px)', width: '800' },\n * { media: '(min-width: 1200px)', width: '1600' }\n * ]\n * };\n * const pictureElement = createOptimizedPicture(args);\n * document.body.appendChild(pictureElement);\n *\n * @remarks\n * The last breakpoint provided in the `breakpoints` array is used as the source for the fallback image.\n */\nexport function createOptimizedPicture(\n createOptimizedPictureArgs: CreateOptimizedPictureArgs\n): HTMLPictureElement | undefined {\n if (createOptimizedPictureArgs.src === '') return undefined;\n\n const {\n src,\n alt,\n eager = false,\n width,\n height,\n breakpoints = [{ media: '(min-width: 600px)', width: 2000 }, { width: 750 }],\n } = createOptimizedPictureArgs;\n const url = new URL(src, getHref());\n const picture = document.createElement('picture');\n const { pathname } = url;\n const ext = pathname.substring(pathname.lastIndexOf('.') + 1);\n\n // webp\n breakpoints.forEach((breakpoint: BreakPoint): void => {\n const source = document.createElement('source');\n if (breakpoint.media) source.setAttribute('media', breakpoint.media);\n source.setAttribute('type', 'image/webp');\n source.setAttribute('srcset', `${pathname}?width=${breakpoint.width}&format=webply&optimize=medium`);\n picture.appendChild(source);\n });\n\n // fallback\n breakpoints.forEach((breakpoint: Record, index: number): void => {\n if (index < breakpoints.length - 1) {\n const source = document.createElement('source');\n if (breakpoint.media) source.setAttribute('media', breakpoint.media);\n source.setAttribute('srcset', `${pathname}?width=${breakpoint.width}&format=${ext}&optimize=medium`);\n picture.appendChild(source);\n } else {\n const img = document.createElement('img');\n img.setAttribute('loading', eager ? 'eager' : 'lazy');\n img.setAttribute('alt', alt);\n img.setAttribute('width', width.toString());\n img.setAttribute('height', height.toString());\n picture.appendChild(img);\n img.setAttribute('src', `${pathname}?width=${breakpoint.width}&format=${ext}&optimize=medium`);\n }\n });\n\n return picture;\n}\n"],"names":["PlaceholderService","key","url","options","placeholderRecord","FetchService","item","errorMessage","DebuggerService","error","PlaceholderService$1","getHref","isSidekickLibraryActive","parentLocation","urlParams","createOptimizedPicture","createOptimizedPictureArgs","src","alt","eager","width","height","breakpoints","picture","pathname","ext","breakpoint","source","index","img"],"mappings":"iHAKA,MAAMA,CAAmB,CACvB,MAAa,eAAeC,EAA8B,CACpD,GAAA,CACF,MAAMC,EAAM,oBACNC,EAA+B,CACnC,aAAc,CAAE,UAAW,SAAU,CAAA,EAGjCC,G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L,EAAA,QAAQ,CAACI,EAAoCE,IAAwB,CAC3E,GAAAA,EAAQN,EAAY,OAAS,EAAG,CAC5B,MAAAK,EAAS,SAAS,cAAc,QAAQ,EAC1CD,EAAW,OAAcC,EAAA,aAAa,QAASD,EAAW,KAAK,EAC5DC,EAAA,aAAa,SAAU,GAAGH,CAAQ,UAAUE,EAAW,KAAK,WAAWD,CAAG,kBAAkB,EACnGF,EAAQ,YAAYI,CAAM,CAAA,KACrB,CACC,MAAAE,EAAM,SAAS,cAAc,KAAK,EACxCA,EAAI,aAAa,UAAWV,EAAQ,QAAU,MAAM,EAChDU,EAAA,aAAa,MAAOX,CAAG,EAC3BW,EAAI,aAAa,QAAST,EAAM,SAAU,CAAA,EAC1CS,EAAI,aAAa,SAAUR,EAAO,SAAU,CAAA,EAC5CE,EAAQ,YAAYM,CAAG,EACnBA,EAAA,aAAa,MAAO,GAAGL,CAAQ,UAAUE,EAAW,KAAK,WAAWD,CAAG,kBAAkB,CAC/F,CAAA,CACD,EAEMF,CACT"} +======== +{"version":3,"file":"createOptimizedPicture.CyR9tLTg.js","sources":["../../src/services/placeholder.service.ts","../../src/helpers/sidekick/getHref.ts","../../src/utils/createOptimizedPicture.ts"],"sourcesContent":["import { DebuggerService } from '@kluntje/services';\nimport FetchService, { FetchServiceOptions } from './fetch.service.ts';\nimport { SheetsResponse } from 'Types/sheetResponse.types.ts';\nimport { Placeholder } from 'Types/siteMap.types.ts';\n\nclass PlaceholderService {\n public async getPlaceHolder(key: string): Promise {\n try {\n const url = '/placeholder.json';\n const options: FetchServiceOptions = {\n cacheOptions: { cacheType: 'runtime' },\n };\n const sheetsResponse = await FetchService.fetchJson>(url, options);\n const placeholderRecord = sheetsResponse.data.find((item: Placeholder): boolean => item.Key === key);\n\n if (!placeholderRecord) {\n const errorMessage = `PlaceholderService: Placeholder with key ${key} could not be found.`;\n DebuggerService.error(errorMessage);\n throw new Error(errorMessage);\n }\n\n return placeholderRecord!.Text;\n } catch (error) {\n DebuggerService.error('PlaceholderService: Error fetching placeholder data:', error);\n throw error;\n }\n }\n}\n\nexport default new PlaceholderService();\n","import { isSidekickLibraryActive } from './isSidekickLibraryActive.ts';\n\n/**\n * Returns the true origin of the current page in the browser.\n * If the page is running in an iframe with srcdoc, the ancestor origin + the path query param is returned.\n * @returns {String} The href of the current page or the href of the block running in the library\n *\n * @example\n * const url = new URL(src, getHref());\n *\n * @remarks\n * Needs to be used when the Sidekick Library Plugin is in use.\n */\nexport function getHref(): string {\n if (!isSidekickLibraryActive()) return window.location.href;\n\n const { location: parentLocation } = window.parent;\n const urlParams = new URLSearchParams(parentLocation.search);\n return `${parentLocation.origin}${urlParams.get('path')}`;\n}\n","import { getHref } from 'Helpers/sidekick/getHref.ts';\n\n/**\n * Represents a breakpoint configuration used in responsive web design.\n *\n * @interface BreakPoint\n * @property {number} [media] - The media query string defining the condition for this breakpoint.\n * @property {number} [width] - The width associated with this breakpoint.\n *\n * @example\n * // Example usage:\n * const exampleBreakPoint: BreakPoint = {\n * media: \"(min-width: 600px)\",\n * width: \"100\"\n * };\n */\ninterface BreakPoint {\n media?: string;\n width?: number;\n}\n\n/**\n * Represents the arguments for creating an optimized picture element.\n *\n * @interface CreateOptimizedPictureArgs\n * @property {string} src - The URL of the image.\n * @property {string} alt - The alternative text for the image.\n * @property {number} width - The width of the image in CSS pixels.\n * @property {number} height - The height of the image in CSS pixels.\n * @property {boolean} [eager] - Whether to load the image immediately.\n * @property {BreakPoint[]} [breakpoints] - The breakpoints for responsive images.\n */\nexport interface CreateOptimizedPictureArgs {\n src: string;\n alt: string;\n width: number;\n height: number;\n eager?: boolean;\n breakpoints?: BreakPoint[];\n}\n\n/**\n * Creates an optimized HTML picture element with responsive image sources and a fallback image.\n *\n * @param {CreateOptimizedPictureArgs} createOptimizedPictureArgs - The arguments for creating the picture element.\n * @returns {HTMLPictureElement} - The created HTML picture element.\n *\n * @example\n * const args = {\n * src: 'image.jpg',\n * alt: 'Example Image',\n * width: '200',\n * height: '150',\n * eager: true,\n * breakpoints: [\n * { media: '(min-width: 600px)', width: '800' },\n * { media: '(min-width: 1200px)', width: '1600' }\n * ]\n * };\n * const pictureElement = createOptimizedPicture(args);\n * document.body.appendChild(pictureElement);\n *\n * @remarks\n * The last breakpoint provided in the `breakpoints` array is used as the source for the fallback image.\n */\nexport function createOptimizedPicture(\n createOptimizedPictureArgs: CreateOptimizedPictureArgs\n): HTMLPictureElement | undefined {\n if (createOptimizedPictureArgs.src === '') return undefined;\n\n const {\n src,\n alt,\n eager = false,\n width,\n height,\n breakpoints = [{ media: '(min-width: 600px)', width: 2000 }, { width: 750 }],\n } = createOptimizedPictureArgs;\n const url = new URL(src, getHref());\n const picture = document.createElement('picture');\n const { pathname } = url;\n const ext = pathname.substring(pathname.lastIndexOf('.') + 1);\n\n // webp\n breakpoints.forEach((breakpoint: BreakPoint): void => {\n const source = document.createElement('source');\n if (breakpoint.media) source.setAttribute('media', breakpoint.media);\n source.setAttribute('type', 'image/webp');\n source.setAttribute('srcset', `${pathname}?width=${breakpoint.width}&format=webply&optimize=medium`);\n picture.appendChild(source);\n });\n\n // fallback\n breakpoints.forEach((breakpoint: Record, index: number): void => {\n if (index < breakpoints.length - 1) {\n const source = document.createElement('source');\n if (breakpoint.media) source.setAttribute('media', breakpoint.media);\n source.setAttribute('srcset', `${pathname}?width=${breakpoint.width}&format=${ext}&optimize=medium`);\n picture.appendChild(source);\n } else {\n const img = document.createElement('img');\n img.setAttribute('loading', eager ? 'eager' : 'lazy');\n img.setAttribute('alt', alt);\n img.setAttribute('width', width.toString());\n img.setAttribute('height', height.toString());\n picture.appendChild(img);\n img.setAttribute('src', `${pathname}?width=${breakpoint.width}&format=${ext}&optimize=medium`);\n }\n });\n\n return picture;\n}\n"],"names":["PlaceholderService","key","url","options","placeholderRecord","FetchService","item","errorMessage","DebuggerService","error","PlaceholderService$1","getHref","isSidekickLibraryActive","parentLocation","urlParams","createOptimizedPicture","createOptimizedPictureArgs","src","alt","eager","width","height","breakpoints","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A,aAAa,QAASD,EAAW,KAAK,EAC5DC,EAAA,aAAa,OAAQ,YAAY,EACxCA,EAAO,aAAa,SAAU,GAAGH,CAAQ,UAAUE,EAAW,KAAK,gCAAgC,EACnGH,EAAQ,YAAYI,CAAM,CAAA,CAC3B,EAGWL,EAAA,QAAQ,CAACI,EAAoCE,IAAwB,CAC3E,GAAAA,EAAQN,EAAY,OAAS,EAAG,CAC5B,MAAAK,EAAS,SAAS,cAAc,QAAQ,EAC1CD,EAAW,OAAcC,EAAA,aAAa,QAASD,EAAW,KAAK,EAC5DC,EAAA,aAAa,SAAU,GAAGH,CAAQ,UAAUE,EAAW,KAAK,WAAWD,CAAG,kBAAkB,EACnGF,EAAQ,YAAYI,CAAM,CAAA,KACrB,CACC,MAAAE,EAAM,SAAS,cAAc,KAAK,EACxCA,EAAI,aAAa,UAAWV,EAAQ,QAAU,MAAM,EAChDU,EAAA,aAAa,MAAOX,CAAG,EAC3BW,EAAI,aAAa,QAAST,EAAM,SAAU,CAAA,EAC1CS,EAAI,aAAa,SAAUR,EAAO,SAAU,CAAA,EAC5CE,EAAQ,YAAYM,CAAG,EACnBA,EAAA,aAAa,MAAO,GAAGL,CAAQ,UAAUE,EAAW,KAAK,WAAWD,CAAG,kBAAkB,CAC/F,CAAA,CACD,EAEMF,CACT"} +>>>>>>>> origin/develop:dist/__chunks__/createOptimizedPicture.CyR9tLTg.js.map diff --git a/dist/__chunks__/createOptimizedPicture.DLZ8Nghn.js b/dist/__chunks__/createOptimizedPicture.DLZ8Nghn.js deleted file mode 100644 index e144d64d..00000000 --- a/dist/__chunks__/createOptimizedPicture.DLZ8Nghn.js +++ /dev/null @@ -1,2 +0,0 @@ -import{F as w,m as u}from"./fetch.service.yiMnp1FM.js";import{i as f}from"./isSidekickLibraryActive.U-fJCMMj.js";class g{async getPlaceHolder(o){try{const c="/placeholder.json",h={cacheOptions:{cacheType:"runtime"}},n=(await w.fetchJson(c,h)).data.find(t=>t.Key===o);if(!n){const t=`PlaceholderService: Placeholder with key ${o} could not be found.`;throw u.error(t),new Error(t)}return n.Text}catch(c){throw u.error("PlaceholderService: Error fetching placeholder data:",c),c}}}const P=new g;function $(){if(!f())return window.location.href;const{location:i}=window.parent,o=new URLSearchParams(i.search);return`${i.origin}${o.get("path")}`}function S(i){if(i.src==="")return;const{src:o,alt:c,eager:h=!1,width:l,height:n,breakpoints:t=[{media:"(min-width: 600px)",width:2e3},{width:750}]}=i,p=new URL(o,$()),d=document.createElement("picture"),{pathname:a}=p,m=a.substring(a.lastIndexOf(".")+1);return t.forEach(r=>{const s=document.createElement("source");r.media&&s.setAttribute("media",r.media),s.setAttribute("type","image/webp"),s.setAttribute("srcset",`${a}?width=${r.width}&format=webply&optimize=medium`),d.appendChild(s)}),t.forEach((r,s)=>{if(s {\n try {\n const url = '/placeholder.json';\n const options: FetchServiceOptions = {\n cacheOptions: { cacheType: 'runtime' },\n };\n const sheetsResponse = await FetchService.fetchJson>(url, options);\n const placeholderRecord = sheetsResponse.data.find((item: Placeholder): boolean => item.Key === key);\n\n if (!placeholderRecord) {\n const errorMessage = `PlaceholderService: Placeholder with key ${key} could not be found.`;\n DebuggerService.error(errorMessage);\n throw new Error(errorMessage);\n }\n\n return placeholderRecord!.Text;\n } catch (error) {\n DebuggerService.error('PlaceholderService: Error fetching placeholder data:', error);\n throw error;\n }\n }\n}\n\nexport default new PlaceholderService();\n","import { isSidekickLibraryActive } from './isSidekickLibraryActive.ts';\n\n/**\n * Returns the true origin of the current page in the browser.\n * If the page is running in an iframe with srcdoc, the ancestor origin + the path query param is returned.\n * @returns {String} The href of the current page or the href of the block running in the library\n *\n * @example\n * const url = new URL(src, getHref());\n *\n * @remarks\n * Needs to be used when the Sidekick Library Plugin is in use.\n */\nexport function getHref(): string {\n if (!isSidekickLibraryActive()) return window.location.href;\n\n const { location: parentLocation } = window.parent;\n const urlParams = new URLSearchParams(parentLocation.search);\n return `${parentLocation.origin}${urlParams.get('path')}`;\n}\n","import { getHref } from 'Helpers/sidekick/getHref.ts';\n\n/**\n * Represents a breakpoint configuration used in responsive web design.\n *\n * @interface BreakPoint\n * @property {number} [media] - The media query string defining the condition for this breakpoint.\n * @property {number} [width] - The width associated with this breakpoint.\n *\n * @example\n * // Example usage:\n * const exampleBreakPoint: BreakPoint = {\n * media: \"(min-width: 600px)\",\n * width: \"100\"\n * };\n */\ninterface BreakPoint {\n media?: string;\n width?: number;\n}\n\n/**\n * Represents the arguments for creating an optimized picture element.\n *\n * @interface CreateOptimizedPictureArgs\n * @property {string} src - The URL of the image.\n * @property {string} alt - The alternative text for the image.\n * @property {number} width - The width of the image in CSS pixels.\n * @property {number} height - The height of the image in CSS pixels.\n * @property {boolean} [eager] - Whether to load the image immediately.\n * @property {BreakPoint[]} [breakpoints] - The breakpoints for responsive images.\n */\nexport interface CreateOptimizedPictureArgs {\n src: string;\n alt: string;\n width: number;\n height: number;\n eager?: boolean;\n breakpoints?: BreakPoint[];\n}\n\n/**\n * Creates an optimized HTML picture element with responsive image sources and a fallback image.\n *\n * @param {CreateOptimizedPictureArgs} createOptimizedPictureArgs - The arguments for creating the picture element.\n * @returns {HTMLPictureElement} - The created HTML picture element.\n *\n * @example\n * const args = {\n * src: 'image.jpg',\n * alt: 'Example Image',\n * width: '200',\n * height: '150',\n * eager: true,\n * breakpoints: [\n * { media: '(min-width: 600px)', width: '800' },\n * { media: '(min-width: 1200px)', width: '1600' }\n * ]\n * };\n * const pictureElement = createOptimizedPicture(args);\n * document.body.appendChild(pictureElement);\n *\n * @remarks\n * The last breakpoint provided in the `breakpoints` array is used as the source for the fallback image.\n */\nexport function createOptimizedPicture(\n createOptimizedPictureArgs: CreateOptimizedPictureArgs\n): HTMLPictureElement | undefined {\n if (createOptimizedPictureArgs.src === '') return undefined;\n\n const {\n src,\n alt,\n eager = false,\n width,\n height,\n breakpoints = [{ media: '(min-width: 600px)', width: 2000 }, { width: 750 }],\n } = createOptimizedPictureArgs;\n const url = new URL(src, getHref());\n const picture = document.createElement('picture');\n const { pathname } = url;\n const ext = pathname.substring(pathname.lastIndexOf('.') + 1);\n\n // webp\n breakpoints.forEach((breakpoint: BreakPoint): void => {\n const source = document.createElement('source');\n if (breakpoint.media) source.setAttribute('media', breakpoint.media);\n source.setAttribute('type', 'image/webp');\n source.setAttribute('srcset', `${pathname}?width=${breakpoint.width}&format=webply&optimize=medium`);\n picture.appendChild(source);\n });\n\n // fallback\n breakpoints.forEach((breakpoint: Record, index: number): void => {\n if (index < breakpoints.length - 1) {\n const source = document.createElement('source');\n if (breakpoint.media) source.setAttribute('media', breakpoint.media);\n source.setAttribute('srcset', `${pathname}?width=${breakpoint.width}&format=${ext}&optimize=medium`);\n picture.appendChild(source);\n } else {\n const img = document.createElement('img');\n img.setAttribute('loading', eager ? 'eager' : 'lazy');\n img.setAttribute('alt', alt);\n img.setAttribute('width', width.toString());\n img.setAttribute('height', height.toString());\n picture.appendChild(img);\n img.setAttribute('src', `${pathname}?width=${breakpoint.width}&format=${ext}&optimize=medium`);\n }\n });\n\n return picture;\n}\n"],"names":["PlaceholderService","key","url","options","placeholderRecord","FetchService","item","errorMessage","DebuggerService","error","PlaceholderService$1","getHref","isSidekickLibraryActive","parentLocation","urlParams","createOptimizedPicture","createOptimizedPictureArgs","src","alt","eager","width","height","breakpoints","picture","pathname","ext","breakpoint","source","index","img"],"mappings":"iHAKA,MAAMA,CAAmB,CACvB,MAAa,eAAeC,EAA8B,CACpD,GAAA,CACF,MAAMC,EAAM,oBACNC,EAA+B,CACnC,aAAc,CAAE,UAAW,SAAU,CAAA,EAGjCC,GADiB,MAAMC,EAAa,UAAuCH,EAAKC,CAAO,GACpD,KAAK,KAAMG,GAA+BA,EAAK,MAAQL,CAAG,EAEnG,GAAI,CAACG,EAAmB,CAChB,MAAAG,EAAe,4CAA4CN,CAAG,uBACpEO,MAAAA,EAAgB,MAAMD,CAAY,EAC5B,IAAI,MAAMA,CAAY,CAC9B,CAEA,OAAOH,EAAmB,WACnBK,EAAO,CACED,MAAAA,EAAA,MAAM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AM,CAAA,KACrB,CACC,MAAAE,EAAM,SAAS,cAAc,KAAK,EACxCA,EAAI,aAAa,UAAWV,EAAQ,QAAU,MAAM,EAChDU,EAAA,aAAa,MAAOX,CAAG,EAC3BW,EAAI,aAAa,QAAST,EAAM,SAAU,CAAA,EAC1CS,EAAI,aAAa,SAAUR,EAAO,SAAU,CAAA,EAC5CE,EAAQ,YAAYM,CAAG,EACnBA,EAAA,aAAa,MAAO,GAAGL,CAAQ,UAAUE,EAAW,KAAK,WAAWD,CAAG,kBAAkB,CAC/F,CAAA,CACD,EAEMF,CACT"} \ No newline at end of file diff --git a/dist/__chunks__/fetch.service.yiMnp1FM.js b/dist/__chunks__/fetch.service.C1Ie3Sjw.js similarity index 51% rename from dist/__chunks__/fetch.service.yiMnp1FM.js rename to dist/__chunks__/fetch.service.C1Ie3Sjw.js index 53539a02..1ac27d9d 100644 --- a/dist/__chunks__/fetch.service.yiMnp1FM.js +++ b/dist/__chunks__/fetch.service.C1Ie3Sjw.js @@ -1,7 +1,14 @@ +<<<<<<<< HEAD:dist/__chunks__/fetch.service.yiMnp1FM.js const b=e=>{const t=new URL(window.hlx.codeBasePath,window.location.origin);return new URL(e,t)};var p={},P;function x(e){return function(...t){return function(n,r,o){return Object.assign(Object.assign({},o),{value:e(o.value,...t)})}}}Object.defineProperty(p,"__esModule",{value:!0});const O=x(function(e,t=0){let n=-1;const r=function(...o){clearTimeout(n),n=window.setTimeout(()=>{e.call(this,...o)},t)};return r.cancel=function(){clearTimeout(n)},r}),Q=x(function(e,t=0){let n,r=[];const o=function(...s){r=s,n===void 0&&(n=window.setTimeout(()=>{n=void 0,e.call(this,...r)},t))};return o.cancel=function(){clearTimeout(n),n=void 0},o});p.debounce=O,P=p.throttle=Q;var i={},R,w;Object.defineProperty(i,"__esModule",{value:!0});const L=(e,t)=>e===null?[]:e instanceof Document||e.shadowRoot===null||e.shadowRoot===void 0?Array.from(e.querySelectorAll(t)):Array.from(e.shadowRoot.querySelectorAll(t)),C=(e,...t)=>{if(e!==void 0&&t.length!==0&&e!==null){e instanceof Element&&(e=[e]),e instanceof NodeList&&(e=Array.from(e));for(const n of e)n.classList.remove(...t)}},f=(e,...t)=>{if(e!==void 0&&t.length!==0&&e!==null){e instanceof Element&&(e=[e]),e instanceof NodeList&&(e=Array.from(e));for(const n of e)n.classList.add(...t)}},M=(e,t)=>e.classList.contains(t);function d(e){return Symbol.iterator in e}function T(e){return"length"in e?e.length>0:!e[Symbol.iterator]().next().done}const j=(e,t,n,r,o)=>{if(e==null||d(e)&&!T(e))return;if(d(e)&&!(e instanceof HTMLElement)){for(const a of e)j(a,t,n,r,o);return}let s;s=typeof t=="string"?t.trim().split(" "):t,s.forEach(a=>{const c=$(e,a,n,r);if(!r.eventBindingMap[c]){const l=n.bind(r);return r.eventBindingMap[c]=l,e.addEventListener(a.trim(),l,o)}})};function $(e,t,n,r){return`${m(e,r)}# ${t.trim()}# ${m(n,r)}# ${m(r,r)}`.replace(/\n/gm,"").replace(/\s/g,"")}function m(e,t){let n;if(t.eventIdMap.has(e))n=t.eventIdMap.get(e);else{const r="xxxxxxxx".replace(/x/g,D).toLowerCase();t.eventIdMap.set(e,r),n=r}return n}function D(){return(100*Math.random()%36|0).toString(36)}const A=(e,t,n,r,o)=>{if(e==null||d(e)&&!T(e))return;if(d(e)&&!(e instanceof HTMLElement)){for(const a of e)A(a,t,n,r,o);return}let s;s=typeof t=="string"?t.trim().split(" "):t,s.forEach(a=>{const c=$(e,a,n,r),l=r.eventBindingMap[c];l&&(delete r.eventBindingMap[c],e.removeEventListener(a,l,o))})},E=(e,t)=>{L(e,t).forEach(n=>e.removeChild(n))},S=(e,t,n)=>new Promise(r=>{n!==void 0&&setTimeout(()=>r(),n),e.addEventListener(t,()=>r())});i.addClass=f,i.find=(e,t)=>e===null?null:e instanceof Document||e.shadowRoot===null||e.shadowRoot===void 0?e.querySelector(t):e.shadowRoot.querySelector(t),i.findAll=L,i.forEachNode=(e,t,n=window)=>{for(let r=0;r{let t="";return e.forEach(n=>{!t.length&&window.matchMedia(n.query).matches&&(t=n.name)}),t},i.getInnerText=e=>e.innerText||e.textContent||"",i.getParent=(e,t)=>e.closest(t),i.getUniqueID=()=>Math.random().toString(36).substr(2,9),i.hasChild=(e,t)=>e.shadowRoot!==null&&e.shadowRoot!==void 0?e.shadowRoot.querySelector(t)!==null:e.querySelector(t)!==null,i.hasClass=M,i.inViewport=(e,t)=>{const n=e.getBoundingClientRect();let r={top:0,right:window.innerWidth||document.documentElement.clientWidth,bottom:window.innerHeight||document.documentElement.clientHeight,left:0};return t!==void 0&&(r=t.getBoundingClientRect()),n.top>=r.top&&n.right<=r.right&&n.bottom<=r.bottom&&n.left>=r.left},i.isNodeList=e=>!(e instanceof HTMLElement||e instanceof Window),R=i.onEvent=j,i.removeChildren=E,i.removeChilds=E,i.removeClass=C,i.removeEvent=A,i.toggleClass=(e,t,n)=>{if(e!=null){e instanceof Element&&(e=[e]),e instanceof NodeList&&(e=Array.from(e));for(const r of e)n===!0?f(r,t):M(r,t)||n===!1?C(r,t):f(r,t)}},i.waitFor=e=>new Promise(t=>{setTimeout(()=>t(),e)}),i.waitForAnimationEnd=function(e,t){return new Promise((n,r)=>{e.addEventListener("animationend",function o(s){s.target===e&&(t&&s.animationName!==t||(e.removeEventListener("animationend",o),n(s)))})})},i.waitForEvent=S,i.waitForInitialization=e=>{var t;return((t=e.state)===null||t===void 0?void 0:t.initialized)===!0?Promise.resolve():S(e,"kl-component-initialized",3e3)},i.waitForTransitionEnd=function(e,t){return new Promise((n,r)=>{e.addEventListener("transitionend",function o(s){s.target===e&&(t&&s.propertyName!==t||(e.removeEventListener("transitionend",o),n(s)))})})};var q={};Object.defineProperty(q,"__esModule",{value:!0});q.fetchJSON=(e,t)=>new Promise((n,r)=>{fetch(e,t).then(o=>{o.ok?n(o.json()):r(o)}).catch(o=>r(o))});var h={};Object.defineProperty(h,"__esModule",{value:!0});const g=e=>typeof e=="object"&&e!==null?JSON.stringify(e):String(e);h.getValue=(e={},t="")=>{const n=t.split(".");let r=0,o=e;for(;o&&rtypeof e==typeof t&&(typeof e=="object"?g(e).localeCompare(g(t))===0:e===t),h.isFilledObject=function(e){return typeof e=="object"&&e!==null&&Object.keys(e).length>0},h.naiveClone=function e(t){return typeof t!="object"?t:t===null?null:Array.isArray(t)?t.map(n=>e(n)):Object.entries(t).reduce((n,[r,o])=>(n[r]=e(o),n),{})},h.toArray=e=>Array.isArray(e)?e:[e],h.toString=g;/*! ***************************************************************************** +======== +var p={},P;function x(e){return function(...t){return function(n,r,o){return Object.assign(Object.assign({},o),{value:e(o.value,...t)})}}}Object.defineProperty(p,"__esModule",{value:!0});const O=x(function(e,t=0){let n=-1;const r=function(...o){clearTimeout(n),n=window.setTimeout(()=>{e.call(this,...o)},t)};return r.cancel=function(){clearTimeout(n)},r}),Q=x(function(e,t=0){let n,r=[];const o=function(...s){r=s,n===void 0&&(n=window.setTimeout(()=>{n=void 0,e.call(this,...r)},t))};return o.cancel=function(){clearTimeout(n),n=void 0},o});p.debounce=O,P=p.throttle=Q;var i={},R,w;Object.defineProperty(i,"__esModule",{value:!0});const L=(e,t)=>e===null?[]:e instanceof Document||e.shadowRoot===null||e.shadowRoot===void 0?Array.from(e.querySelectorAll(t)):Array.from(e.shadowRoot.querySelectorAll(t)),b=(e,...t)=>{if(e!==void 0&&t.length!==0&&e!==null){e instanceof Element&&(e=[e]),e instanceof NodeList&&(e=Array.from(e));for(const n of e)n.classList.remove(...t)}},f=(e,...t)=>{if(e!==void 0&&t.length!==0&&e!==null){e instanceof Element&&(e=[e]),e instanceof NodeList&&(e=Array.from(e));for(const n of e)n.classList.add(...t)}},C=(e,t)=>e.classList.contains(t);function d(e){return Symbol.iterator in e}function T(e){return"length"in e?e.length>0:!e[Symbol.iterator]().next().done}const j=(e,t,n,r,o)=>{if(e==null||d(e)&&!T(e))return;if(d(e)&&!(e instanceof HTMLElement)){for(const a of e)j(a,t,n,r,o);return}let s;s=typeof t=="string"?t.trim().split(" "):t,s.forEach(a=>{const c=$(e,a,n,r);if(!r.eventBindingMap[c]){const l=n.bind(r);return r.eventBindingMap[c]=l,e.addEventListener(a.trim(),l,o)}})};function $(e,t,n,r){return`${m(e,r)}# + ${t.trim()}# + ${m(n,r)}# + ${m(r,r)}`.replace(/\n/gm,"").replace(/\s/g,"")}function m(e,t){let n;if(t.eventIdMap.has(e))n=t.eventIdMap.get(e);else{const r="xxxxxxxx".replace(/x/g,D).toLowerCase();t.eventIdMap.set(e,r),n=r}return n}function D(){return(100*Math.random()%36|0).toString(36)}const A=(e,t,n,r,o)=>{if(e==null||d(e)&&!T(e))return;if(d(e)&&!(e instanceof HTMLElement)){for(const a of e)A(a,t,n,r,o);return}let s;s=typeof t=="string"?t.trim().split(" "):t,s.forEach(a=>{const c=$(e,a,n,r),l=r.eventBindingMap[c];l&&(delete r.eventBindingMap[c],e.removeEventListener(a,l,o))})},M=(e,t)=>{L(e,t).forEach(n=>e.removeChild(n))},E=(e,t,n)=>new Promise(r=>{n!==void 0&&setTimeout(()=>r(),n),e.addEventListener(t,()=>r())});i.addClass=f,i.find=(e,t)=>e===null?null:e instanceof Document||e.shadowRoot===null||e.shadowRoot===void 0?e.querySelector(t):e.shadowRoot.querySelector(t),i.findAll=L,i.forEachNode=(e,t,n=window)=>{for(let r=0;r{let t="";return e.forEach(n=>{!t.length&&window.matchMedia(n.query).matches&&(t=n.name)}),t},i.getInnerText=e=>e.innerText||e.textContent||"",i.getParent=(e,t)=>e.closest(t),i.getUniqueID=()=>Math.random().toString(36).substr(2,9),i.hasChild=(e,t)=>e.shadowRoot!==null&&e.shadowRoot!==void 0?e.shadowRoot.querySelector(t)!==null:e.querySelector(t)!==null,i.hasClass=C,i.inViewport=(e,t)=>{const n=e.getBoundingClientRect();let r={top:0,right:window.innerWidth||document.documentElement.clientWidth,bottom:window.innerHeight||document.documentElement.clientHeight,left:0};return t!==void 0&&(r=t.getBoundingClientRect()),n.top>=r.top&&n.right<=r.right&&n.bottom<=r.bottom&&n.left>=r.left},i.isNodeList=e=>!(e instanceof HTMLElement||e instanceof Window),R=i.onEvent=j,i.removeChildren=M,i.removeChilds=M,i.removeClass=b,i.removeEvent=A,i.toggleClass=(e,t,n)=>{if(e!=null){e instanceof Element&&(e=[e]),e instanceof NodeList&&(e=Array.from(e));for(const r of e)n===!0?f(r,t):C(r,t)||n===!1?b(r,t):f(r,t)}},i.waitFor=e=>new Promise(t=>{setTimeout(()=>t(),e)}),i.waitForAnimationEnd=function(e,t){return new Promise((n,r)=>{e.addEventListener("animationend",function o(s){s.target===e&&(t&&s.animationName!==t||(e.removeEventListener("animationend",o),n(s)))})})},i.waitForEvent=E,i.waitForInitialization=e=>{var t;return((t=e.state)===null||t===void 0?void 0:t.initialized)===!0?Promise.resolve():E(e,"kl-component-initialized",3e3)},i.waitForTransitionEnd=function(e,t){return new Promise((n,r)=>{e.addEventListener("transitionend",function o(s){s.target===e&&(t&&s.propertyName!==t||(e.removeEventListener("transitionend",o),n(s)))})})};var q={};Object.defineProperty(q,"__esModule",{value:!0});q.fetchJSON=(e,t)=>new Promise((n,r)=>{fetch(e,t).then(o=>{o.ok?n(o.json()):r(o)}).catch(o=>r(o))});var h={};Object.defineProperty(h,"__esModule",{value:!0});const g=e=>typeof e=="object"&&e!==null?JSON.stringify(e):String(e);h.getValue=(e={},t="")=>{const n=t.split(".");let r=0,o=e;for(;o&&rtypeof e==typeof t&&(typeof e=="object"?g(e).localeCompare(g(t))===0:e===t),h.isFilledObject=function(e){return typeof e=="object"&&e!==null&&Object.keys(e).length>0},h.naiveClone=function e(t){return typeof t!="object"?t:t===null?null:Array.isArray(t)?t.map(n=>e(n)):Object.entries(t).reduce((n,[r,o])=>(n[r]=e(o),n),{})},h.toArray=e=>Array.isArray(e)?e:[e],h.toString=g;/*! ***************************************************************************** +>>>>>>>> origin/develop:dist/__chunks__/fetch.service.C1Ie3Sjw.js Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -14,5 +21,10 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +<<<<<<<< HEAD:dist/__chunks__/fetch.service.yiMnp1FM.js ***************************************************************************** */class u{constructor(){this.eventIdMap=new WeakMap,this.eventBindingMap={},this.lastMQ=w(u.mediaQuerys),R(window,"resize",this.handleMQChange,this)}static getInstance(t){return u.instance===void 0&&(u.mediaQuerys=t,u.instance=new u),u.instance}handleMQChange(){const t=w(u.mediaQuerys);t!==this.lastMQ&&(window.dispatchEvent(new CustomEvent("kl-mq-change",{detail:{newMQ:t,oldMQ:this.lastMQ}})),this.lastMQ=t)}}(function(e,t,n,r){var o,s=arguments.length,a=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(t,n,a):o(t,n))||a);s>3&&a&&Object.defineProperty(t,n,a)})([P(100)],u.prototype,"handleMQChange",null);var I=new class{constructor(){this.urlSearchParams=new URLSearchParams(window.location.search)}get(e){return this.urlSearchParams.get(e)}getAll(e){return this.urlSearchParams.getAll(e)}getAllKeys(){return Array.from(this.urlSearchParams.keys())}set(e,t){this.urlSearchParams.set(e,t),this.updateUrl()}delete(e){this.urlSearchParams.delete(e),this.updateUrl()}getString(){return this.urlSearchParams.toString()}get curUrl(){return`${window.location.protocol}//${window.location.host}${window.location.pathname}`}updateUrl(){const e=this.getString(),t=this.curUrl,n=window.location.hash,r=e!==""?`${t}?${e}`:t;window.history.replaceState({path:r},"",r),n!==""&&(window.location.hash=n)}},F=new Proxy(console,{get:(e,t)=>I.get("js-debug")!==null?e[t]:()=>{}});new class{constructor(){this.componentMap=new WeakMap,this.intersectionObserver=new IntersectionObserver(e=>this.handleIntersectionChange(e),{rootMargin:"500px 0px"})}subscribe(e,t){this.componentMap.set(e,t),this.intersectionObserver.observe(e)}unsubscribe(e){this.intersectionObserver.unobserve(e),this.componentMap.delete(e)}handleIntersectionChange(e){e.forEach(t=>{const n=t.target;if(!t.isIntersecting||!this.componentMap.has(n))return;const r=this.componentMap.get(n);this.unsubscribe(n),r()})}};class N{constructor(){this.runtimeCache=new Map}get(t){return this.runtimeCache.get(t)}set(t,n){this.runtimeCache.set(t,n)}has(t){return this.runtimeCache.has(t)}delete(t){this.runtimeCache.delete(t)}}class U{constructor(){this.requestPipeline=new Map,this.runtimeCache=new N}fetchJson(t,n={}){return this.fetchData(b(t).href,n,this.getResponseJSON)}fetchText(t,n={}){return this.fetchData(b(t).href,n,this.getResponseText)}async fetchData(t,n,r){const{cacheOptions:o}=n,s=this.getCachedData(t,o);if(s!==null)return s;const a=this.requestPipeline.get(t);if(a!==void 0)return r(await a);const c=fetch(t,n.fetchOptions);this.requestPipeline.set(t,c);const l=await c;this.requestPipeline.delete(t);const v=await r(l);if(this.setCachedData(t,v,o),!l.ok){const y=await l.text();throw F.error(`FetchService: Error fetching data from ${t}: ${y}`),new Error(`Error fetching data from ${t}: ${y}`)}return v}async getResponseJSON(t){return await t.clone().json()}async getResponseText(t){return await t.clone().text()}getCachedData(t,n){return(n==null?void 0:n.cacheType)==="runtime"?this.runtimeCache.get(t)??null:null}setCachedData(t,n,r){(r==null?void 0:r.cacheType)==="runtime"&&this.runtimeCache.set(t,n)}}const k=new U;export{k as F,b as g,F as m}; //# sourceMappingURL=fetch.service.yiMnp1FM.js.map +======== +***************************************************************************** */class u{constructor(){this.eventIdMap=new WeakMap,this.eventBindingMap={},this.lastMQ=w(u.mediaQuerys),R(window,"resize",this.handleMQChange,this)}static getInstance(t){return u.instance===void 0&&(u.mediaQuerys=t,u.instance=new u),u.instance}handleMQChange(){const t=w(u.mediaQuerys);t!==this.lastMQ&&(window.dispatchEvent(new CustomEvent("kl-mq-change",{detail:{newMQ:t,oldMQ:this.lastMQ}})),this.lastMQ=t)}}(function(e,t,n,r){var o,s=arguments.length,a=s<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(t,n,a):o(t,n))||a);s>3&&a&&Object.defineProperty(t,n,a)})([P(100)],u.prototype,"handleMQChange",null);var I=new class{constructor(){this.urlSearchParams=new URLSearchParams(window.location.search)}get(e){return this.urlSearchParams.get(e)}getAll(e){return this.urlSearchParams.getAll(e)}getAllKeys(){return Array.from(this.urlSearchParams.keys())}set(e,t){this.urlSearchParams.set(e,t),this.updateUrl()}delete(e){this.urlSearchParams.delete(e),this.updateUrl()}getString(){return this.urlSearchParams.toString()}get curUrl(){return`${window.location.protocol}//${window.location.host}${window.location.pathname}`}updateUrl(){const e=this.getString(),t=this.curUrl,n=window.location.hash,r=e!==""?`${t}?${e}`:t;window.history.replaceState({path:r},"",r),n!==""&&(window.location.hash=n)}},F=new Proxy(console,{get:(e,t)=>I.get("js-debug")!==null?e[t]:()=>{}});new class{constructor(){this.componentMap=new WeakMap,this.intersectionObserver=new IntersectionObserver(e=>this.handleIntersectionChange(e),{rootMargin:"500px 0px"})}subscribe(e,t){this.componentMap.set(e,t),this.intersectionObserver.observe(e)}unsubscribe(e){this.intersectionObserver.unobserve(e),this.componentMap.delete(e)}handleIntersectionChange(e){e.forEach(t=>{const n=t.target;if(!t.isIntersecting||!this.componentMap.has(n))return;const r=this.componentMap.get(n);this.unsubscribe(n),r()})}};const S=e=>{const t=new URL(window.hlx.codeBasePath,window.location.origin);return new URL(e,t)};class N{constructor(){this.runtimeCache=new Map}get(t){return this.runtimeCache.get(t)}set(t,n){this.runtimeCache.set(t,n)}has(t){return this.runtimeCache.has(t)}delete(t){this.runtimeCache.delete(t)}}class U{constructor(){this.requestPipeline=new Map,this.runtimeCache=new N}fetchJson(t,n={}){return this.fetchData(S(t).href,n,this.getResponseJSON)}fetchText(t,n={}){return this.fetchData(S(t).href,n,this.getResponseText)}async fetchData(t,n,r){const{cacheOptions:o}=n,s=this.getCachedData(t,o);if(s!==null)return s;const a=this.requestPipeline.get(t);if(a!==void 0)return r(await a);const c=fetch(t,n.fetchOptions);this.requestPipeline.set(t,c);const l=await c;this.requestPipeline.delete(t);const v=await r(l);if(this.setCachedData(t,v,o),!l.ok){const y=await l.text();throw F.error(`FetchService: Error fetching data from ${t}: ${y}`),new Error(`Error fetching data from ${t}: ${y}`)}return v}async getResponseJSON(t){return await t.clone().json()}async getResponseText(t){return await t.clone().text()}getCachedData(t,n){return(n==null?void 0:n.cacheType)==="runtime"?this.runtimeCache.get(t)??null:null}setCachedData(t,n,r){(r==null?void 0:r.cacheType)==="runtime"&&this.runtimeCache.set(t,n)}}const k=new U;export{k as F,S as g,F as m}; +//# sourceMappingURL=fetch.service.C1Ie3Sjw.js.map +>>>>>>>> origin/develop:dist/__chunks__/fetch.service.C1Ie3Sjw.js diff --git a/dist/__chunks__/fetch.service.C1Ie3Sjw.js.map b/dist/__chunks__/fetch.service.C1Ie3Sjw.js.map new file mode 100644 index 00000000..0f64f88a --- /dev/null +++ b/dist/__chunks__/fetch.service.C1Ie3Sjw.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fetch.service.C1Ie3Sjw.js","sources":["../../node_modules/@kluntje/services/node_modules/@kluntje/js-utils/lib/function-helpers/decorators/index.js","../../node_modules/@kluntje/services/node_modules/@kluntje/js-utils/lib/dom-helpers/index.js","../../node_modules/@kluntje/services/node_modules/@kluntje/js-utils/lib/api-helpers/index.js","../../node_modules/@kluntje/services/node_modules/@kluntje/js-utils/lib/object-helpers/index.js","../../node_modules/@kluntje/services/lib/index.module.js","../../src/app/utils/getUrlForEndpoint.ts","../../src/utils/RuntimeCache.ts","../../src/services/fetch.service.ts"],"sourcesContent":["\"use strict\";function t(t){return function(...e){return function(n,o,c){return Object.assign(Object.assign({},c),{value:t(c.value,...e)})}}}Object.defineProperty(exports,\"__esModule\",{value:!0});const e=t((function(t,e=0){let n=-1;const o=function(...o){clearTimeout(n),n=window.setTimeout((()=>{t.call(this,...o)}),e)};return o.cancel=function(){clearTimeout(n)},o})),n=t((function(t,e=0){let n,o=[];const c=function(...c){o=c,void 0===n&&(n=window.setTimeout((()=>{n=void 0,t.call(this,...o)}),e))};return c.cancel=function(){clearTimeout(n),n=void 0},c}));exports.debounce=e,exports.throttle=n;\n//# sourceMappingURL=index.js.map\n","\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0});const e=(e,t)=>null===e?[]:e instanceof Document||null===e.shadowRoot||void 0===e.shadowRoot?Array.from(e.querySelectorAll(t)):Array.from(e.shadowRoot.querySelectorAll(t)),t=(e,...t)=>{if(void 0!==e&&0!==t.length&&null!==e){e instanceof Element&&(e=[e]),e instanceof NodeList&&(e=Array.from(e));for(const n of e)n.classList.remove(...t)}},n=(e,...t)=>{if(void 0!==e&&0!==t.length&&null!==e){e instanceof Element&&(e=[e]),e instanceof NodeList&&(e=Array.from(e));for(const n of e)n.classList.add(...t)}},o=(e,t)=>e.classList.contains(t);function r(e){return Symbol.iterator in e}function i(e){return\"length\"in e?e.length>0:!e[Symbol.iterator]().next().done}const s=(e,t,n,o,a)=>{if(null==e||r(e)&&!i(e))return;if(r(e)&&!(e instanceof HTMLElement)){for(const r of e)s(r,t,n,o,a);return}let d;d=\"string\"==typeof t?t.trim().split(\" \"):t,d.forEach((t=>{const r=l(e,t,n,o);if(!o.eventBindingMap[r]){const i=n.bind(o);return o.eventBindingMap[r]=i,e.addEventListener(t.trim(),i,a)}}))};function l(e,t,n,o){return`${a(e,o)}#\\n ${t.trim()}#\\n ${a(n,o)}#\\n ${a(o,o)}`.replace(/\\n/gm,\"\").replace(/\\s/g,\"\")}function a(e,t){let n;if(t.eventIdMap.has(e))n=t.eventIdMap.get(e);else{const o=\"xxxxxxxx\".replace(/x/g,d).toLowerCase();t.eventIdMap.set(e,o),n=o}return n}function d(){return(100*Math.random()%36|0).toString(36)}const c=(e,t,n,o,s)=>{if(null==e||r(e)&&!i(e))return;if(r(e)&&!(e instanceof HTMLElement)){for(const r of e)c(r,t,n,o,s);return}let a;a=\"string\"==typeof t?t.trim().split(\" \"):t,a.forEach((t=>{const r=l(e,t,n,o),i=o.eventBindingMap[r];i&&(delete o.eventBindingMap[r],e.removeEventListener(t,i,s))}))},u=(t,n)=>{e(t,n).forEach((e=>t.removeChild(e)))},f=(e,t,n)=>new Promise((o=>{void 0!==n&&setTimeout((()=>o()),n),e.addEventListener(t,(()=>o()))}));exports.addClass=n,exports.find=(e,t)=>null===e?null:e instanceof Document||null===e.shadowRoot||void 0===e.shadowRoot?e.querySelector(t):e.shadowRoot.querySelector(t),exports.findAll=e,exports.forEachNode=(e,t,n=window)=>{for(let o=0;o{let t=\"\";return e.forEach((e=>{!t.length&&window.matchMedia(e.query).matches&&(t=e.name)})),t},exports.getInnerText=e=>e.innerText||e.textContent||\"\",exports.getParent=(e,t)=>e.closest(t),exports.getUniqueID=()=>Math.random().toString(36).substr(2,9),exports.hasChild=(e,t)=>null!==e.shadowRoot&&void 0!==e.shadowRoot?null!==e.shadowRoot.querySelector(t):null!==e.querySelector(t),exports.hasClass=o,exports.inViewport=(e,t)=>{const n=e.getBoundingClientRect();let o={top:0,right:window.innerWidth||document.documentElement.clientWidth,bottom:window.innerHeight||document.documentElement.clientHeight,left:0};return void 0!==t&&(o=t.getBoundingClientRect()),n.top>=o.top&&n.right<=o.right&&n.bottom<=o.bottom&&n.left>=o.left},exports.isNodeList=e=>!(e instanceof HTMLElement||e instanceof Window),exports.onEvent=s,exports.removeChildren=u,exports.removeChilds=u,exports.removeClass=t,exports.removeEvent=c,exports.toggleClass=(e,r,i)=>{if(null!=e){e instanceof Element&&(e=[e]),e instanceof NodeList&&(e=Array.from(e));for(const s of e)!0===i?n(s,r):o(s,r)||!1===i?t(s,r):n(s,r)}},exports.waitFor=e=>new Promise((t=>{setTimeout((()=>t()),e)})),exports.waitForAnimationEnd=function(e,t){return new Promise(((n,o)=>{e.addEventListener(\"animationend\",(function o(r){r.target===e&&(t&&r.animationName!==t||(e.removeEventListener(\"animationend\",o),n(r)))}))}))},exports.waitForEvent=f,exports.waitForInitialization=e=>{var t;return!0===(null===(t=e.state)||void 0===t?void 0:t.initialized)?Promise.resolve():f(e,\"kl-component-initialized\",3e3)},exports.waitForTransitionEnd=function(e,t){return new Promise(((n,o)=>{e.addEventListener(\"transitionend\",(function o(r){r.target===e&&(t&&r.propertyName!==t||(e.removeEventListener(\"transitionend\",o),n(r)))}))}))};\n//# sourceMappingURL=index.js.map\n","\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0});exports.fetchJSON=(e,t)=>new Promise(((o,s)=>{fetch(e,t).then((e=>{e.ok?o(e.json()):s(e)})).catch((e=>s(e)))}));\n//# sourceMappingURL=index.js.map\n","\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0});const e=e=>\"object\"==typeof e&&null!==e?JSON.stringify(e):String(e);exports.getValue=(e={},t=\"\")=>{const r=t.split(\".\");let o=0,n=e;for(;n&&otypeof t==typeof r&&(\"object\"==typeof t?0===e(t).localeCompare(e(r)):t===r),exports.isFilledObject=function(e){return\"object\"==typeof e&&null!==e&&Object.keys(e).length>0},exports.naiveClone=function e(t){return\"object\"!=typeof t?t:null===t?null:Array.isArray(t)?t.map((t=>e(t))):Object.entries(t).reduce(((t,[r,o])=>(t[r]=e(o),t)),{})},exports.toArray=e=>Array.isArray(e)?e:[e],exports.toString=e;\n//# sourceMappingURL=index.js.map\n","import{throttle as e}from\"@kluntje/js-utils/lib/function-helpers/decorators\";import{getCurrentMQ as t,onEvent as n}from\"@kluntje/js-utils/lib/dom-helpers\";import{fetchJSON as r}from\"@kluntje/js-utils/lib/api-helpers\";import{isFilledObject as s}from\"@kluntje/js-utils/lib/object-helpers\";const i=\"kl-mq-change\",a=\"kl-in-vp\",o=\"kl-out-vp\";class l{constructor(){}static getInstance(){return void 0===l.instance&&(l.instance=new IntersectionObserver(l.handleIntersectionChange)),l.instance}static handleIntersectionChange(e){Object.keys(e).forEach((t=>{const n=e[t],r=n.target;n.isIntersecting?r.dispatchEvent(new CustomEvent(\"kl-in-vp\",{bubbles:!1})):r.dispatchEvent(new CustomEvent(\"kl-out-vp\",{bubbles:!1}))}))}}\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */class c{constructor(){this.eventIdMap=new WeakMap,this.eventBindingMap={},this.lastMQ=t(c.mediaQuerys),n(window,\"resize\",this.handleMQChange,this)}static getInstance(e){return void 0===c.instance&&(c.mediaQuerys=e,c.instance=new c),c.instance}handleMQChange(){const e=t(c.mediaQuerys);e!==this.lastMQ&&(window.dispatchEvent(new CustomEvent(\"kl-mq-change\",{detail:{newMQ:e,oldMQ:this.lastMQ}})),this.lastMQ=e)}}!function(e,t,n,r){var s,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,n,a):s(t,n))||a);i>3&&a&&Object.defineProperty(t,n,a)}([e(100)],c.prototype,\"handleMQChange\",null);const h=Symbol(\"resolve\"),d=Symbol(\"reject\"),u=Symbol(\"pending\");class p{static get PLACEHOLDER_SELECTOR(){return\"kl-i18n-placeholder\"}static getInstance(){return void 0===p._instance&&(p._instance=new p),p._instance}get isSetUp(){return Boolean(this._url||s(this._dictionary))}get loaded(){return this._loaded}get ready(){return this._ready[u]||this.fetchI18nDictionary(),this._ready}setUp({url:e,dictionary:t}={}){if(this.isSetUp)console.warn(\"@kluntje I18nService: service has already been set up. You can't set it up twice!\");else if(e)this._url=e;else{if(!t)throw new Error('@kluntje I18nService: a \"url\" or \"dictionary\" should have been passed to the setUp function.');this._dictionary=t,this._loaded=!0,this._ready[h](),this._ready[u]=!0}}get(e,{fallback:t,interpolations:n}={}){if(this.loaded){if(this._dictionary.hasOwnProperty(e)){let t=this._dictionary[e];return n&&Object.entries(n).forEach((([e,n])=>{t=t.split(`{${e}}`).join(String(n))})),t}return console.warn(`@kluntje I18nService: i18n for key '${e}' is missing in dictionary!`),void 0!==t?t:this.getHumanReadableName(e)}return this._ready[u]||(this.addStyling(),this.fetchI18nDictionary()),this.getPlaceholder(e,{fallback:t,interpolations:n})}constructor(){this._loaded=!1,this._dictionary={},this._ready=this.getReadyPromise()}getReadyPromise(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n[h]=e,n[d]=t,n[u]=!1,n}ensureSetup(){if(!this.isSetUp)throw new Error(\"@kluntje I18nService: should be set up before calling other APIs\")}addStyling(){const e=document.head,t=document.createElement(\"style\");t.type=\"text/css\",t.appendChild(document.createTextNode(`\\n .${p.PLACEHOLDER_SELECTOR} {\\n display: contents;\\n }\\n `)),e.appendChild(t)}fetchI18nDictionary(){this.ensureSetup(),this._ready[u]=!0,r(this._url).then((e=>{this._dictionary=e,this._loaded=!0,this._ready[h](),this.fillInPlaceholders()})).catch((e=>{console.error(\"@kluntje I18nService: unable to fetch keys from server!\",e),this._loaded=!0,this._ready[h]()}))}fillInPlaceholders(){Array.from(document.getElementsByClassName(p.PLACEHOLDER_SELECTOR)).forEach((e=>{const{key:t,fallback:n,interpolations:r}=e.dataset;e.replaceWith(this.get(t,{fallback:n,interpolations:r?JSON.parse(r):void 0}))}))}getHumanReadableName(e){return e.split(\".\").reverse()[0].replace(/[A-Z]/g,(e=>` ${e.toLowerCase()}`))}getPlaceholder(e,{fallback:t,interpolations:n}={}){const r=document.createElement(\"span\");return r.innerText=void 0!==t?t:this.getHumanReadableName(e),r.classList.add(p.PLACEHOLDER_SELECTOR),r.setAttribute(\"data-key\",e),t&&r.setAttribute(\"data-fallback\",t),n&&r.setAttribute(\"data-interpolations\",JSON.stringify(n)),r.outerHTML}}var g=new class{constructor(){this.urlSearchParams=new URLSearchParams(window.location.search)}get(e){return this.urlSearchParams.get(e)}getAll(e){return this.urlSearchParams.getAll(e)}getAllKeys(){return Array.from(this.urlSearchParams.keys())}set(e,t){this.urlSearchParams.set(e,t),this.updateUrl()}delete(e){this.urlSearchParams.delete(e),this.updateUrl()}getString(){return this.urlSearchParams.toString()}get curUrl(){return`${window.location.protocol}//${window.location.host}${window.location.pathname}`}updateUrl(){const e=this.getString(),t=this.curUrl,n=window.location.hash,r=\"\"!==e?`${t}?${e}`:t;window.history.replaceState({path:r},\"\",r),\"\"!==n&&(window.location.hash=n)}};var m=new Proxy(console,{get:(e,t)=>null!==g.get(\"js-debug\")?e[t]:()=>{}});var y=new class{constructor(){this.componentMap=new WeakMap,this.intersectionObserver=new IntersectionObserver((e=>this.handleIntersectionChange(e)),{rootMargin:\"500px 0px\"})}subscribe(e,t){this.componentMap.set(e,t),this.intersectionObserver.observe(e)}unsubscribe(e){this.intersectionObserver.unobserve(e),this.componentMap.delete(e)}handleIntersectionChange(e){e.forEach((e=>{const t=e.target;if(!e.isIntersecting||!this.componentMap.has(t))return;const n=this.componentMap.get(t);this.unsubscribe(t),n()}))}};export{m as DebuggerService,p as I18nService,a as IN_VP_EVENT,y as LazyConnectService,i as MQ_CHANGE_EVENT,c as MediaQueryService,o as OUT_VP_EVENT,g as URLSearchParamsService,l as ViewportObserver};\n//# sourceMappingURL=index.module.js.map\n","/**\n * Get the URL for an endpoint.\n * @param endpoint - The endpoint.\n * @returns URL\n * @example\n * const url = getUrlForEndpoint('block1/block1.css');\n * console.log(url);\n * Output: URL { href: 'http://localhost:3000/block1/block1.css' }\n */\nexport const getUrlForEndpoint = (endpoint: string): URL => {\n const baseUrl = new URL(window.hlx.codeBasePath, window.location.origin);\n return new URL(endpoint, baseUrl);\n};\n","export class RuntimeCache {\n private runtimeCache: Map = new Map();\n\n public get(key: string): T | undefined {\n return this.runtimeCache.get(key);\n }\n\n public set(key: string, value: T): void {\n this.runtimeCache.set(key, value);\n }\n\n public has(key: string): boolean {\n return this.runtimeCache.has(key);\n }\n\n public delete(key: string): void {\n this.runtimeCache.delete(key);\n }\n}\n","import { getUrlForEndpoint } from '../app/utils/getUrlForEndpoint';\nimport { RuntimeCache } from '../utils/RuntimeCache';\nimport { DebuggerService } from '@kluntje/services';\n\nexport interface FetchServiceCacheOptions {\n cacheType?: 'runtime'; // 'local' | 'session' | \"request\" can be added later\n}\n\nexport interface FetchServiceOptions {\n fetchOptions?: RequestInit;\n cacheOptions?: FetchServiceCacheOptions;\n}\n\nclass FetchService {\n private requestPipeline: Map> = new Map();\n\n private runtimeCache = new RuntimeCache();\n\n public fetchJson(endpoint: string, options: FetchServiceOptions = {}): Promise {\n return this.fetchData(getUrlForEndpoint(endpoint).href, options, this.getResponseJSON);\n }\n\n public fetchText(endpoint: string, options: FetchServiceOptions = {}): Promise {\n return this.fetchData(getUrlForEndpoint(endpoint).href, options, this.getResponseText);\n }\n\n private async fetchData(\n url: string,\n options: FetchServiceOptions,\n dataMapper: (Response) => Promise\n ): Promise {\n const { cacheOptions } = options;\n const cachedData = this.getCachedData(url, cacheOptions);\n if (cachedData !== null) return cachedData;\n\n const pipelinedRequest = this.requestPipeline.get(url);\n if (pipelinedRequest !== undefined) return dataMapper(await pipelinedRequest);\n\n const request = fetch(url, options.fetchOptions);\n this.requestPipeline.set(url, request);\n\n const response = await request;\n this.requestPipeline.delete(url);\n const responseData = await dataMapper(response);\n\n this.setCachedData(url, responseData, cacheOptions);\n\n if (!response.ok) {\n const errorText = await response.text();\n\n DebuggerService.error(`FetchService: Error fetching data from ${url}: ${errorText}`);\n\n throw new Error(`Error fetching data from ${url}: ${errorText}`);\n }\n return responseData;\n }\n\n private async getResponseJSON(response: Response): Promise {\n const responseClone = response.clone();\n const responseJson = await responseClone.json();\n return responseJson;\n }\n\n private async getResponseText(response: Response): Promise {\n const responseClone = response.clone();\n const responseText = await responseClone.text();\n return responseText;\n }\n\n private getCachedData(url: string, cacheOptions?: FetchServiceCacheOptions): T | null {\n if (cacheOptions?.cacheType === 'runtime') {\n return this.runtimeCache.get(url) ?? null;\n }\n return null;\n }\n\n private setCachedData(url: string, data: T, cacheOptions?: FetchServiceCacheOptions): void {\n if (cacheOptions?.cacheType === 'runtime') {\n this.runtimeCache.set(url, data);\n }\n }\n}\n\nexport default new FetchService();\n"],"names":["t","e","o","c","decorators","n","throttle","domHelpers","r","i","s","a","d","l","u","f","getCurrentMQ","onEvent","apiHelpers","objectHelpers","g","m","getUrlForEndpoint","endpoint","baseUrl","RuntimeCache","key","value","FetchService","options","url","dataMapper","cacheOptions","cachedData","pipelinedRequest","request","response","responseData","errorText","DebuggerService","data","FetchService$1"],"mappings":"WAAa,SAASA,EAAEA,EAAE,CAAC,OAAO,YAAYC,EAAE,CAAC,OAAO,SAAS,EAAEC,EAAEC,EAAE,CAAC,OAAO,OAAO,OAAO,OAAO,OAAO,CAAE,EAACA,CAAC,EAAE,CAAC,MAAMH,EAAEG,EAAE,MAAM,GAAGF,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,eAAeG,EAAQ,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,MAAMH,EAAED,EA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,GAAII,IAAqB,OAAkB,OAAAH,EAAW,MAAMG,CAAgB,EAE5E,MAAMC,EAAU,MAAML,EAAKD,EAAQ,YAAY,EAC1C,KAAA,gBAAgB,IAAIC,EAAKK,CAAO,EAErC,MAAMC,EAAW,MAAMD,EAClB,KAAA,gBAAgB,OAAOL,CAAG,EACzB,MAAAO,EAAe,MAAMN,EAAWK,CAAQ,EAI1C,GAFC,KAAA,cAAcN,EAAKO,EAAcL,CAAY,EAE9C,CAACI,EAAS,GAAI,CACV,MAAAE,EAAY,MAAMF,EAAS,OAEjCG,MAAAA,EAAgB,MAAM,0CAA0CT,CAAG,KAAKQ,CAAS,EAAE,EAE7E,IAAI,MAAM,4BAA4BR,CAAG,KAAKQ,CAAS,EAAE,CACjE,CACO,OAAAD,CACT,CAEA,MAAc,gBAAmBD,EAAgC,CAGxD,OADc,MADCA,EAAS,QACU,MAE3C,CAEA,MAAc,gBAAgBA,EAAqC,CAG1D,OADc,MADCA,EAAS,QACU,MAE3C,CAEQ,cAAiBN,EAAaE,EAAmD,CACnF,OAAAA,GAAA,YAAAA,EAAc,aAAc,UACvB,KAAK,aAAa,IAAIF,CAAG,GAAK,KAEhC,IACT,CAEQ,cAAiBA,EAAaU,EAASR,EAA+C,EACxFA,GAAA,YAAAA,EAAc,aAAc,WACzB,KAAA,aAAa,IAAIF,EAAKU,CAAI,CAEnC,CACF,CAEA,MAAeC,EAAA,IAAIb","x_google_ignoreList":[0,1,2,3,4]} \ No newline at end of file diff --git a/dist/form/form.js b/dist/form/form.js index dcb78399..6ac067b6 100644 --- a/dist/form/form.js +++ b/dist/form/form.js @@ -1,4 +1,4 @@ -import{x as n,T as u,s as f,j as w}from"../__chunks__/lit-element.CH8ciVnL.js";import{n as x,t as q}from"../__chunks__/property.Ds9fqW-T.js";import{t as D,r as E}from"../__chunks__/state.CJfvw0Ck.js";import{F as C,m as y}from"../__chunks__/fetch.service.yiMnp1FM.js";import{o as r}from"../__chunks__/if-defined.CrfpI-tB.js";/** +import{x as n,T as u,s as f,j as w}from"../__chunks__/lit-element.CH8ciVnL.js";import{n as x,t as q}from"../__chunks__/property.Ds9fqW-T.js";import{t as D,r as E}from"../__chunks__/state.CJfvw0Ck.js";import{F as C,m as y}from"../__chunks__/fetch.service.C1Ie3Sjw.js";import{o as r}from"../__chunks__/if-defined.CrfpI-tB.js";/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause diff --git a/dist/main/main.js b/dist/main/main.js index d4f6ce0e..ef6593c9 100644 --- a/dist/main/main.js +++ b/dist/main/main.js @@ -1,4 +1,4 @@ -import{t as I,r as f}from"../__chunks__/state.CJfvw0Ck.js";import{i as R}from"../__chunks__/isSidekickLibraryActive.U-fJCMMj.js";import{g as se,m as p,F as L}from"../__chunks__/fetch.service.yiMnp1FM.js";import{_ as n}from"../__chunks__/preload-helper.D7itGvJr.js";import{T as m,s as v,x as l,w as X,i as pe}from"../__chunks__/lit-element.CH8ciVnL.js";import{t as y,n as fe}from"../__chunks__/property.Ds9fqW-T.js";import{i as me,t as _e,e as j,o as oe,a as ge}from"../__chunks__/unsafe-html.C_rT9aKG.js";import{r as x}from"../__chunks__/icon.template.3G0fuXUC.js";import{P as g,c as ve}from"../__chunks__/createOptimizedPicture.DLZ8Nghn.js";const K=(e,t)=>{t.split(",").forEach(r=>{e.classList.add(I(r.trim()))})};function V(e,t=document){const r=e&&e.includes(":")?"property":"name",o=[...t.head.querySelectorAll(`meta[${r}="${e}"]`)].map(i=>i.content).join(", ");return o.length?o:""}function ye(){const e=V("template");e&&K(document.body,e);const t=V("theme");t&&K(document.body,t)}function be(e){e.querySelectorAll("a").forEach(t=>{if(t.title=t.title||t.textContent,t.href!==t.textContent){const r=t.parentElement,s=t.parentElement.parentElement;t.querySelector("img")||(r.childNodes.length===1&&(r.tagName==="P"||r.tagName==="DIV")&&(t.className="button",r.classList.add("button-container")),r.childNodes.length===1&&r.tagName==="STRONG"&&s.childNodes.length===1&&s.tagName==="P"&&(t.className="button primary",s.classList.add("button-container")),r.childNodes.length===1&&r.tagName==="EM"&&s.childNodes.length===1&&s.tagName==="P"&&(t.className="button secondary",s.classList.add("button-container")))}})}function Pe(e){return e.trim()===""?void 0:e}function we(){const e=V("language");document.documentElement.lang=Pe(e)||"en"}function Le(){return R()?window.parent.location:window.location}function E(e){return new Promise((t,r)=>{const{href:s}=se(e);if(document.querySelector(`head > link[href="${s}"]`))t();else{const o=document.createElement("link");o.rel="stylesheet",o.href=s,o.onload=()=>t(),o.onerror=r,document.head.append(o)}})}const H={mainTsPath:"./src/main.ts",mainScssPath:"./src/styles/sass/main.scss",iconsDirPath:"./public/icons",iconsTypesPath:"./src/types/icons.types.ts",fontsScssPath:"./src/styles/sass/fonts.scss",fontsCssPath:"./dist/fonts/fonts.css",lazyStylesScssPath:"./src/styles/sass/lazy-styles.scss",lazyStylesCssPath:"./dist/lazyStyles/lazyStyles.css",sidekickLibraryStylesScssPath:"./src/styles/sass/sidekick-library-styles.scss",sidekickLibraryStylesCssPath:"./dist/sidekickLibraryStyles/sidekickLibraryStyles.css",lcpBlocks:["banner"]};async function W(){const{fontsCssPath:e}=H;if(e){await E(e);try{Le().hostname.includes("localhost")||sessionStorage.setItem("fonts-loaded","true")}catch(t){p.error("loadFonts: Error setting fonts-loaded in session storage",t)}}}function c(e,t={}){c.defer=c.defer||[];const r=s=>{c[s]=c[s]||((...o)=>c.defer.push({fnname:s,args:o}))};c.drain=c.drain||((s,o)=>{c[s]=o,c.defer.filter(({fnname:i})=>s===i).forEach(({fnname:i,args:a})=>c[i](...a))}),c.always=c.always||[],c.always.on=(s,o)=>{c.always[s]=o},c.on=(s,o)=>{c.cases[s]=o},r("observe"),r("cwv");try{if(window.hlx=window.hlx||{},!window.hlx.rum){const d=new URLSearchParams(window.location.search).get("rum")==="on"?1:100,h=Array.from({length:75},(Z,ue)=>String.fromCharCode(48+ue)).filter(Z=>/\d|[A-Z]/i.test(Z)).filter(()=>Math.random()*75>70).join(""),_=Math.random(),u=_*d<1,b=Date.now(),he={full:()=>window.location.href,origin:()=>window.location.origin,path:()=>window.location.href.replace(/\?.*$/,"")};window.hlx.rum={weight:d,id:h,random:_,isSelected:u,firstReadTime:b,sampleRUM:c,sanitizeURL:he[window.hlx.RUM_MASK_URL||"path"]}}const{weight:s,id:o,firstReadTime:i}=window.hlx.rum;if(window.hlx&&window.hlx.rum&&window.hlx.rum.isSelected){const a=["weight","id","referer","checkpoint","t","source","target","cwv","CLS","FID","LCP","INP"],d=(h=t)=>{const _=JSON.stringify({weight:s,id:o,referer:window.hlx.rum.sanitizeURL(),checkpoint:e,t:Date.now()-i,...t},a),u=`https://rum.hlx.page/.rum/${s}`;navigator.sendBeacon(u,_),console.debug(`ping:${e}`,h)};c.cases=c.cases||{cwv:()=>c.cwv(t)||!0,lazy:()=>{const h=document.createElement("script");return h.src="https://rum.hlx.page/.rum/@adobe/helix-rum-enhancer@^1/src/index.js",document.head.appendChild(h),!0}},d(t),c.cases[e]&&c.cases[e]()}c.always[e]&&c.always[e](t)}catch{}}function $e(e="/dist/main/main.js"){window.hlx=window.hlx||{},window.hlx.RUM_MASK_URL="full",window.hlx.codeBasePath="",window.hlx.lighthouse=new URLSearchParams(window.location.search).get("lighthouse")==="on";const t=document.querySelector(`script[src$="${e}"]`);if(t)try{[window.hlx.codeBasePath]=new URL(t.src).pathname.split(e)}catch(r){p.log("setupHlxObj: Could not set codeBasePath.",r)}}function Ee(){$e(),c("top"),window.addEventListener("load",()=>c("load")),window.addEventListener("unhandledrejection",e=>{c("error",{source:e.reason.sourceURL,target:e.reason.line})}),window.addEventListener("error",e=>{c("error",{source:e.filename,target:e.lineno})})}function ie(e){const t=[];return e.querySelectorAll("[data-block-name]").forEach(s=>{t.push({name:s.dataset.blockName,element:s})}),t}async function ae(e){if((e.element.dataset.blockStatus??"unloaded")==="unloaded")try{e.element.dataset.blockStatus="loading";const{href:r}=se(`dist/${e.name}/${e.name}.js`),s=await n(()=>import(r),__vite__mapDeps([]));s.default&&await s.default(e.element),e.element.dataset.blockStatus="loaded"}catch(r){e.element.dataset.blockStatus="error",p.error("loadBlockModules:",r)}}async function ne(e){try{await E(`dist/${e.name}/${e.name}.css`)}catch(t){p.error("loadBlockStyles: Could not load css styles.",t)}}function N(e){e.style.removeProperty("display")}async function Ce(e){const t=ie(e);if(!t.length){N(e);return}const r=[];for(const s of t)r.push(Promise.all([ae(s),ne(s)]));await Promise.all(r),N(e)}async function Se(){const t=[...document.querySelectorAll(".section")].map(r=>Ce(r));await Promise.all(t)}function Te(){document.querySelectorAll(".default-content-wrapper picture").forEach(t=>{const r=t.parentElement;r&&r.classList.add("image","main")})}function Ae(e){const t=[];let r=!1;[...e.children].forEach(s=>{if(s.tagName==="DIV"||!r){const o=document.createElement("div");t.push(o),r=s.tagName!=="DIV",r&&o.classList.add("default-content-wrapper")}t[t.length-1].append(s)}),t.forEach(s=>e.append(s)),Te(),e.classList.add("section"),e.dataset.sectionStatus="initialized",e.style.display="none"}function De(e){return/^[a-z][A-Za-z0-9]*$/.test(e)?e:/^[A-Z][A-Za-z0-9]*$/.test(e)?e.charAt(0).toLowerCase()+e.slice(1):I(e).replace(/-([a-z])/g,t=>t[1].toUpperCase())}function Oe(e){const t={};return e.querySelectorAll(":scope > div").forEach(r=>{if(r.children){const s=[...r.children];if(s[1]){const o=s[1],i=I(s[0].textContent??"");let a="";if(o.querySelector("a")){const d=[...o.querySelectorAll("a")];d.length===1?a=d[0].href:a=d.map(h=>h.href)}else if(o.querySelector("img")){const d=[...o.querySelectorAll("img")];d.length===1?a=d[0].src:a=d.map(h=>h.src)}else if(o.querySelector("p")){const d=[...o.querySelectorAll("p")];d.length===1?a=d[0].textContent:a=d.map(h=>h.textContent)}else a=r.children[1].textContent;t[i]=a}}}),t}function ke(e){const t=e.querySelector("div.section-metadata");if(t){const r=Oe(t);Object.keys(r).forEach(s=>{s==="style"?r.style.split(",").filter(i=>i).map(i=>I(i.trim())).forEach(i=>e.classList.add(i)):e.dataset[De(s)]=r[s]}),t.parentElement&&t.parentElement.remove()}}function Ie(e){e.querySelectorAll(":scope > div").forEach(t=>{Ae(t),ke(t)})}function Re(e){e.querySelectorAll("div.section > div > div").forEach(t=>{const r=t.classList[0];if(r){t.classList.add("block"),t.dataset.blockName=r;const s=t.parentElement;s==null||s.classList.add(`${r}-wrapper`);const o=t.closest(".section");o&&o.classList.add(`${r}-container`)}})}async function xe(){const e=document.querySelector(".section"),{lcpBlocks:t}=H;if(e){const o=ie(e).map(async i=>{(t==null?void 0:t.includes(i.name))&&await Promise.all([ae(i),ne(i)])});await Promise.all(o),N(e)}document.body.style.display=null;const r=document.querySelector("main img");await new Promise(s=>{r&&!r.complete?(r.setAttribute("loading","eager"),r.setAttribute("fetchpriority","high"),r.addEventListener("load",()=>s()),r.addEventListener("error",()=>s())):s()})}class ze{constructor(){this.beforeEagerCallbacks=[],this.loadEagerCallbacks=[],this.beforeLoadLazyCallbacks=[],this.loadLazyCallbacks=[],this.beforeLoadDelayedCallbacks=[],this.loadDelayedCallbacks=[],this.initializedCallbacks=[]}get beforeEager(){return this.beforeEagerPromise===void 0&&(this.beforeEagerPromise=this.beforeLoadEager()),this.beforeEagerPromise}get loadEager(){return this.eagerPromise===void 0&&(this.eagerPromise=this.loadEagerPromise()),this.eagerPromise}get beforeLoadLazy(){return this.beforeLazyPromise===void 0&&(this.beforeLazyPromise=this.beforeLoadLazyPromise()),this.beforeLazyPromise}get loadLazy(){return this.lazyPromise===void 0&&(this.lazyPromise=this.loadLazyPromise()),this.lazyPromise}get beforeLoadDelayed(){return this.beforeDelayedPromise===void 0&&(this.beforeDelayedPromise=this.beforeLoadDelayedPromise()),this.beforeDelayedPromise}get loadDelayed(){return this.delayedPromise===void 0&&(this.delayedPromise=this.loadDelayedPromise()),this.delayedPromise}get initialized(){return this.initializedPromise===void 0&&(this.initializedPromise=this.getInitializedPromise()),this.initializedPromise}addBeforeEagerTask(t){this.beforeEagerCallbacks.push(t)}addLoadEagerTask(t){this.loadEagerCallbacks.push(t)}addBeforeLoadLazyTask(t){this.beforeLoadLazyCallbacks.push(t)}addLoadLazyTask(t){this.loadLazyCallbacks.push(t)}addBeforeLoadDelayedTask(t){this.beforeLoadDelayedCallbacks.push(t)}addLoadDelayedTask(t){this.loadDelayedCallbacks.push(t)}addInitializedTask(t){this.initializedCallbacks.push(t)}async init(){await this.beforeEager,await this.loadEager,await this.beforeLoadLazy,await this.loadLazy,await this.beforeLoadDelayed,await this.loadDelayed,await this.initialized}async beforeLoadEager(){const t=new Promise(r=>{Ee(),ye(),we(),r()});await Promise.all([...this.beforeEagerCallbacks.map(r=>r()),t])}async loadEagerPromise(){const t=new Promise(async r=>{try{const s=document.querySelector("main");be(s),Ie(s),Re(s),setTimeout(()=>{document.body.classList.add("show"),r()},100),(window.innerWidth>=900||sessionStorage.getItem("fonts-loaded"))&&await W()}catch(s){p.error("index: could not load fonts",s)}});await Promise.all([...this.loadEagerCallbacks.map(r=>r()),t,xe()])}async beforeLoadLazyPromise(){const t=new Promise(r=>r());await Promise.all([...this.beforeLoadLazyCallbacks.map(r=>r()),t])}async loadLazyPromise(){const t=new Promise(async r=>{try{const{lazyStylesScssPath:s,sidekickLibraryStylesScssPath:o,fontsScssPath:i,lazyStylesCssPath:a,sidekickLibraryStylesCssPath:d}=H;await Se();const{hash:h}=window.location,_=h?document.getElementById(h.substring(1)):!1;h&&_&&_.scrollIntoView(),s&&a&&await E(a),o&&d&&R()&&await E(d),i&&await W(),c("lazy");const u=document.querySelector("main");c.observe(u.querySelectorAll("div[data-block-name]")),c.observe(u.querySelectorAll("picture > img"))}catch(s){p.error("LoadLazyTask: ",s)}r()});await Promise.all([...this.loadLazyCallbacks.map(r=>r()),t])}async beforeLoadDelayedPromise(){const t=new Promise(r=>r());await Promise.all([...this.beforeLoadDelayedCallbacks.map(r=>r()),t])}async loadDelayedPromise(){const t=new Promise(r=>{setTimeout(()=>{r()},3e3)});await Promise.all([...this.loadDelayedCallbacks.map(r=>r()),t])}async getInitializedPromise(){const t=new Promise(r=>r());await Promise.all([...this.initializedCallbacks.map(r=>r()),t])}}const C=new ze;/** +import{t as k,r as p}from"../__chunks__/state.CJfvw0Ck.js";import{_ as n}from"../__chunks__/preload-helper.D7itGvJr.js";import{g as se,m as _,F as L}from"../__chunks__/fetch.service.C1Ie3Sjw.js";import{i as R}from"../__chunks__/isSidekickLibraryActive.U-fJCMMj.js";import{T as f,s as v,x as l,w as X,i as pe}from"../__chunks__/lit-element.CH8ciVnL.js";import{t as y,n as fe}from"../__chunks__/property.Ds9fqW-T.js";import{i as me,t as _e,e as j,o as oe,a as ge}from"../__chunks__/unsafe-html.C_rT9aKG.js";import{r as z}from"../__chunks__/icon.template.3G0fuXUC.js";import{P as g,c as ve}from"../__chunks__/createOptimizedPicture.CyR9tLTg.js";const K=(e,t)=>{t.split(",").forEach(r=>{e.classList.add(k(r.trim()))})};function V(e,t=document){const r=e&&e.includes(":")?"property":"name",o=[...t.head.querySelectorAll(`meta[${r}="${e}"]`)].map(i=>i.content).join(", ");return o.length?o:""}function ye(){const e=V("template");e&&K(document.body,e);const t=V("theme");t&&K(document.body,t)}function be(e){e.querySelectorAll("a").forEach(t=>{if(t.title=t.title||t.textContent,t.href!==t.textContent){const r=t.parentElement,s=t.parentElement.parentElement;t.querySelector("img")||(r.childNodes.length===1&&(r.tagName==="P"||r.tagName==="DIV")&&(t.className="button",r.classList.add("button-container")),r.childNodes.length===1&&r.tagName==="STRONG"&&s.childNodes.length===1&&s.tagName==="P"&&(t.className="button primary",s.classList.add("button-container")),r.childNodes.length===1&&r.tagName==="EM"&&s.childNodes.length===1&&s.tagName==="P"&&(t.className="button secondary",s.classList.add("button-container")))}})}function Pe(e){return e.trim()===""?void 0:e}function we(){const e=V("language");document.documentElement.lang=Pe(e)||"en"}function ie(e){const t=[];return e.querySelectorAll("[data-block-name]").forEach(s=>{t.push({name:s.dataset.blockName,element:s})}),t}async function ae(e){const t=e.element.dataset.blockStatus;if(t!=="loading"&&t!=="loaded")try{e.element.dataset.blockStatus="loading";const{href:r}=se(`dist/${e.name}/${e.name}.js`),s=await n(()=>import(r),__vite__mapDeps([]));s.default&&await s.default(e.element),e.element.dataset.blockStatus="loaded"}catch(r){e.element.dataset.blockStatus="error",_.error("laodBloackModules:",r)}}async function E(e){return new Promise((t,r)=>{const{href:s}=se(e);if(document.querySelector(`head > link[href="${s}"]`))t(!0);else{const o=document.createElement("link");o.rel="stylesheet",o.href=s,o.onload=t,o.onerror=r,document.head.append(o)}})}async function ne(e){try{await E(`dist/${e.name}/${e.name}.css`)}catch{}}const H={mainTsPath:"./src/main.ts",mainScssPath:"./src/styles/sass/main.scss",iconsDirPath:"./public/icons",iconsTypesPath:"./src/types/icons.types.ts",fontsScssPath:"./src/styles/sass/fonts.scss",fontsCssPath:"./dist/fonts/fonts.css",lazyStylesScssPath:"./src/styles/sass/lazy-styles.scss",lazyStylesCssPath:"./dist/lazyStyles/lazyStyles.css",sidekickLibraryStylesScssPath:"./src/styles/sass/sidekick-library-styles.scss",sidekickLibraryStylesCssPath:"./dist/sidekickLibraryStyles/sidekickLibraryStyles.css",lcpBlocks:[]};function N(e){e.style.removeProperty("display")}async function Le(){const e=document.querySelector(".section"),{lcpBlocks:t}=H;if(e){const o=ie(e).map(async i=>{(t==null?void 0:t.includes(i.name))&&await Promise.all([ae(i),ne(i)])});await Promise.all(o),N(e)}document.body.style.display=null;const r=document.querySelector("main img");await new Promise(s=>{r&&!r.complete?(r.setAttribute("loading","eager"),r.setAttribute("fetchpriority","high"),r.addEventListener("load",()=>s()),r.addEventListener("error",()=>s())):s()})}function $e(){return R()?window.parent.location:window.location}async function W(){const{fontsCssPath:e}=H;if(e){await E(e);try{$e().hostname.includes("localhost")||sessionStorage.setItem("fonts-loaded","true")}catch(t){console.error("Error setting fonts-loaded in session storage",t)}}}function c(e,t={}){c.defer=c.defer||[];const r=s=>{c[s]=c[s]||((...o)=>c.defer.push({fnname:s,args:o}))};c.drain=c.drain||((s,o)=>{c[s]=o,c.defer.filter(({fnname:i})=>s===i).forEach(({fnname:i,args:a})=>c[i](...a))}),c.always=c.always||[],c.always.on=(s,o)=>{c.always[s]=o},c.on=(s,o)=>{c.cases[s]=o},r("observe"),r("cwv");try{if(window.hlx=window.hlx||{},!window.hlx.rum){const d=new URLSearchParams(window.location.search).get("rum")==="on"?1:100,h=Array.from({length:75},(Z,ue)=>String.fromCharCode(48+ue)).filter(Z=>/\d|[A-Z]/i.test(Z)).filter(()=>Math.random()*75>70).join(""),m=Math.random(),u=m*d<1,b=Date.now(),he={full:()=>window.location.href,origin:()=>window.location.origin,path:()=>window.location.href.replace(/\?.*$/,"")};window.hlx.rum={weight:d,id:h,random:m,isSelected:u,firstReadTime:b,sampleRUM:c,sanitizeURL:he[window.hlx.RUM_MASK_URL||"path"]}}const{weight:s,id:o,firstReadTime:i}=window.hlx.rum;if(window.hlx&&window.hlx.rum&&window.hlx.rum.isSelected){const a=["weight","id","referer","checkpoint","t","source","target","cwv","CLS","FID","LCP","INP"],d=(h=t)=>{const m=JSON.stringify({weight:s,id:o,referer:window.hlx.rum.sanitizeURL(),checkpoint:e,t:Date.now()-i,...t},a),u=`https://rum.hlx.page/.rum/${s}`;navigator.sendBeacon(u,m),console.debug(`ping:${e}`,h)};c.cases=c.cases||{cwv:()=>c.cwv(t)||!0,lazy:()=>{const h=document.createElement("script");return h.src="https://rum.hlx.page/.rum/@adobe/helix-rum-enhancer@^1/src/index.js",document.head.appendChild(h),!0}},d(t),c.cases[e]&&c.cases[e]()}c.always[e]&&c.always[e](t)}catch{}}function Ee(e="/dist/main/main.js"){window.hlx=window.hlx||{},window.hlx.RUM_MASK_URL="full",window.hlx.codeBasePath="",window.hlx.lighthouse=new URLSearchParams(window.location.search).get("lighthouse")==="on";const t=document.querySelector(`script[src$="${e}"]`);if(t)try{[window.hlx.codeBasePath]=new URL(t.src).pathname.split(e)}catch(r){console.log("setupHlxObj",r)}}function Ce(){Ee(),c("top"),window.addEventListener("load",()=>c("load")),window.addEventListener("unhandledrejection",e=>{c("error",{source:e.reason.sourceURL,target:e.reason.line})}),window.addEventListener("error",e=>{c("error",{source:e.filename,target:e.lineno})})}async function Te(e){const t=ie(e);if(!t.length){N(e);return}for(const r of t)Promise.all([ae(r),ne(r)]);N(e)}async function Se(){const t=[...document.querySelectorAll(".section")].map(r=>Te(r));await Promise.all(t)}function Ae(){document.querySelectorAll(".default-content-wrapper picture").forEach(t=>{const r=t.parentElement;r&&r.classList.add("image","main")})}function De(e){const t=[];let r=!1;[...e.children].forEach(s=>{if(s.tagName==="DIV"||!r){const o=document.createElement("div");t.push(o),r=s.tagName!=="DIV",r&&o.classList.add("default-content-wrapper")}t[t.length-1].append(s)}),t.forEach(s=>e.append(s)),Ae(),e.classList.add("section"),e.dataset.sectionStatus="initialized",e.style.display="none"}function Oe(e){return/^[a-z][A-Za-z0-9]*$/.test(e)?e:/^[A-Z][A-Za-z0-9]*$/.test(e)?e.charAt(0).toLowerCase()+e.slice(1):k(e).replace(/-([a-z])/g,t=>t[1].toUpperCase())}function Ie(e){const t={};return e.querySelectorAll(":scope > div").forEach(r=>{if(r.children){const s=[...r.children];if(s[1]){const o=s[1],i=k(s[0].textContent??"");let a="";if(o.querySelector("a")){const d=[...o.querySelectorAll("a")];d.length===1?a=d[0].href:a=d.map(h=>h.href)}else if(o.querySelector("img")){const d=[...o.querySelectorAll("img")];d.length===1?a=d[0].src:a=d.map(h=>h.src)}else if(o.querySelector("p")){const d=[...o.querySelectorAll("p")];d.length===1?a=d[0].textContent:a=d.map(h=>h.textContent)}else a=r.children[1].textContent;t[i]=a}}}),t}function ke(e){const t=e.querySelector("div.section-metadata");if(t){const r=Ie(t);Object.keys(r).forEach(s=>{s==="style"?r.style.split(",").filter(i=>i).map(i=>k(i.trim())).forEach(i=>e.classList.add(i)):e.dataset[Oe(s)]=r[s]}),t.parentElement&&t.parentElement.remove()}}function Re(e){e.querySelectorAll(":scope > div").forEach(t=>{De(t),ke(t)})}function ze(e){e.querySelectorAll("div.section > div > div").forEach(t=>{const r=t.classList[0];if(r){t.classList.add("block"),t.dataset.blockName=r;const s=t.parentElement;s==null||s.classList.add(`${r}-wrapper`);const o=t.closest(".section");o&&o.classList.add(`${r}-container`)}})}class xe{constructor(){this.beforeEagerCallbacks=[],this.loadEagerCallbacks=[],this.beforeLoadLazyCallbacks=[],this.loadLazyCallbacks=[],this.beforeLoadDelayedCallbacks=[],this.loadDelayedCallbacks=[],this.initializedCallbacks=[]}get beforeEager(){return this.beforeEagerPromise===void 0&&(this.beforeEagerPromise=this.beforeLoadEager()),this.beforeEagerPromise}get loadEager(){return this.eagerPromise===void 0&&(this.eagerPromise=this.loadEagerPromise()),this.eagerPromise}get beforeLoadLazy(){return this.beforeLazyPromise===void 0&&(this.beforeLazyPromise=this.beforeLoadLazyPromise()),this.beforeLazyPromise}get loadLazy(){return this.lazyPromise===void 0&&(this.lazyPromise=this.loadLazyPromise()),this.lazyPromise}get beforeLoadDelayed(){return this.beforeDelayedPromise===void 0&&(this.beforeDelayedPromise=this.beforeLoadDelayedPromise()),this.beforeDelayedPromise}get loadDelayed(){return this.delayedPromise===void 0&&(this.delayedPromise=this.loadDelayedPromise()),this.delayedPromise}get initialized(){return this.initializedPromise===void 0&&(this.initializedPromise=this.getInitializedPromise()),this.initializedPromise}addBeforeEagerTask(t){this.beforeEagerCallbacks.push(t)}addLoadEagerTask(t){this.loadEagerCallbacks.push(t)}addBeforeLoadLazyTask(t){this.beforeLoadLazyCallbacks.push(t)}addLoadLazyTask(t){this.loadLazyCallbacks.push(t)}addBeforeLoadDelayedTask(t){this.beforeLoadDelayedCallbacks.push(t)}addLoadDelayedTask(t){this.loadDelayedCallbacks.push(t)}addInitializedTask(t){this.initializedCallbacks.push(t)}async init(){await this.beforeEager,await this.loadEager,await this.beforeLoadLazy,await this.loadLazy,await this.beforeLoadDelayed,await this.loadDelayed,await this.initialized}async beforeLoadEager(){const t=new Promise(r=>{Ce(),ye(),we(),r()});await Promise.all([...this.beforeEagerCallbacks.map(r=>r()),t])}async loadEagerPromise(){const t=new Promise(async r=>{const s=document.querySelector("main");be(s),Re(s),ze(s),setTimeout(()=>{document.body.classList.add("show"),r()},100),await Le();try{(window.innerWidth>=900||sessionStorage.getItem("fonts-loaded"))&&await W()}catch{}});await Promise.all([...this.loadEagerCallbacks.map(r=>r()),t])}async beforeLoadLazyPromise(){const t=new Promise(r=>r());await Promise.all([...this.beforeLoadLazyCallbacks.map(r=>r()),t])}async loadLazyPromise(){const t=new Promise(async r=>{try{const{lazyStylesScssPath:s,sidekickLibraryStylesScssPath:o,fontsScssPath:i,lazyStylesCssPath:a,sidekickLibraryStylesCssPath:d}=H;await Se();const{hash:h}=window.location,m=h?document.getElementById(h.substring(1)):!1;h&&m&&m.scrollIntoView(),s&&a&&await E(a),o&&d&&R()&&await E(d),i&&await W(),c("lazy");const u=document.querySelector("main");c.observe(u.querySelectorAll("div[data-block-name]")),c.observe(u.querySelectorAll("picture > img"))}catch(s){_.error("Load lazy Task: ",s)}r()});await Promise.all([...this.loadLazyCallbacks.map(r=>r()),t])}async beforeLoadDelayedPromise(){const t=new Promise(r=>r());await Promise.all([...this.beforeLoadDelayedCallbacks.map(r=>r()),t])}async loadDelayedPromise(){const t=new Promise(r=>{setTimeout(()=>{r()},3e3)});await Promise.all([...this.loadDelayedCallbacks.map(r=>r()),t])}async getInitializedPromise(){const t=new Promise(r=>r());await Promise.all([...this.initializedCallbacks.map(r=>r()),t])}}const C=new xe;/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause @@ -6,11 +6,11 @@ import{t as I,r as f}from"../__chunks__/state.CJfvw0Ck.js";import{i as R}from".. * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const P=(e,t)=>{var s;const r=e._$AN;if(r===void 0)return!1;for(const o of r)(s=o._$AO)==null||s.call(o,t,!1),P(o,t);return!0},S=e=>{let t,r;do{if((t=e._$AM)===void 0)break;r=t._$AN,r.delete(e),e=t}while((r==null?void 0:r.size)===0)},ce=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(r===void 0)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),je(t)}};function Ne(e){this._$AN!==void 0?(S(this),this._$AM=e,ce(this)):this._$AM=e}function qe(e,t=!1,r=0){const s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(s))for(let i=r;i{e.type==_e.CHILD&&(e._$AP??(e._$AP=qe),e._$AQ??(e._$AQ=Ne))};class le extends me{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,r,s){super._$AT(t,r,s),ce(this),this.isConnected=t._$AU}_$AO(t,r=!0){var s,o;t!==this.isConnected&&(this.isConnected=t,t?(s=this.reconnected)==null||s.call(this):(o=this.disconnected)==null||o.call(this)),r&&(P(this,t),S(this))}setValue(t){if(Ve(this._$Ct))this._$Ct._$AI(t,this);else{const r=[...this._$Ct._$AH];r[this._$Ci]=t,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}}/** + */const P=(e,t)=>{var s;const r=e._$AN;if(r===void 0)return!1;for(const o of r)(s=o._$AO)==null||s.call(o,t,!1),P(o,t);return!0},T=e=>{let t,r;do{if((t=e._$AM)===void 0)break;r=t._$AN,r.delete(e),e=t}while((r==null?void 0:r.size)===0)},ce=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(r===void 0)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),je(t)}};function Ne(e){this._$AN!==void 0?(T(this),this._$AM=e,ce(this)):this._$AM=e}function qe(e,t=!1,r=0){const s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(s))for(let i=r;i{e.type==_e.CHILD&&(e._$AP??(e._$AP=qe),e._$AQ??(e._$AQ=Ne))};class le extends me{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,r,s){super._$AT(t,r,s),ce(this),this.isConnected=t._$AU}_$AO(t,r=!0){var s,o;t!==this.isConnected&&(this.isConnected=t,t?(s=this.reconnected)==null||s.call(this):(o=this.disconnected)==null||o.call(this)),r&&(P(this,t),T(this))}setValue(t){if(Ve(this._$Ct))this._$Ct._$AI(t,this);else{const r=[...this._$Ct._$AH];r[this._$Ci]=t,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}}/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const He=()=>new Be;let Be=class{};const M=new WeakMap,Ue=j(class extends le{render(e){return m}update(e,[t]){var s;const r=t!==this.Y;return r&&this.Y!==void 0&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.Y=t,this.ht=(s=e.options)==null?void 0:s.host,this.rt(this.ct=e.element)),m}rt(e){if(typeof this.Y=="function"){const t=this.ht??globalThis;let r=M.get(t);r===void 0&&(r=new WeakMap,M.set(t,r)),r.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),r.set(this.Y,e),e!==void 0&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){var e,t;return typeof this.Y=="function"?(e=M.get(this.ht??globalThis))==null?void 0:e.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Fe=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,B=(e,t,r,s)=>{for(var o=s>1?void 0:s?Ye(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(s?a(t,r,o):a(o))||o);return s&&o&&Fe(t,r,o),o};let T=class extends v{constructor(){super(...arguments),this.error=null,this.getSubmenuName=e=>e.path.split("/")[1]}createRenderRoot(){return this}async firstUpdated(){this.items=await this.groupByFirstLevelPath()}async getPlaceholder(e){return await g.getPlaceHolder(e)}render(){if(this.error)return l`
${this.error}
`;if(this.items)return l``}toggleSubmenu({currentTarget:e}){!(e instanceof HTMLElement)||!e.classList.contains("opener")||e.classList.toggle("active")}renderSubMenu(e){return l`${e.navtitle} ${x("chevron-down","submenu__icon")}`}renderMenuItem(e){return e.error?l`

${e.error}

`:l`
  • ${e.children!==void 0?this.renderSubMenu(e):l`${e.navtitle}`}
  • `}renderMenuItems(){return l`
      ${this.items.map(e=>this.renderMenuItem(e))}
    `}getNavTitle(e){return e.path==="/"?"Homepage":e.navtitle||e.title}filterNavigation(e,t){return e.filter(r=>t.every(s=>!r.path.includes(s))).map(r=>({path:r.path,navtitle:this.getNavTitle(r)}))}groupItemsByFirstLevelPath(e){const t={};return e.forEach(r=>{const s=this.getSubmenuName(r);t[s]||(t[s]=[]),t[s].push({path:r.path,navtitle:this.getNavTitle(r)})}),t}async groupByFirstLevelPath(){const e="/query-index.json",t=["sidekick","sidekick-library","tools","development","dev-","__"];try{const r=await L.fetchJson(e);this.error=null;const s=this.filterNavigation(r.data,t),o=this.groupItemsByFirstLevelPath(s);return Object.values(o).map(a=>a.length===1?a[0]:{navtitle:a[0].path.split("/")[1],path:a[0].path,children:a})}catch(r){return p.error(`SidebarNav Component: Error while fetching ${e}`,r),this.error=await g.getPlaceHolder("error"),[]}}};B([f()],T.prototype,"items",2);B([f()],T.prototype,"error",2);T=B([y("sidebar-nav")],T);var Ze=Object.defineProperty,Xe=Object.getOwnPropertyDescriptor,U=(e,t,r,s)=>{for(var o=s>1?void 0:s?Xe(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(s?a(t,r,o):a(o))||o);return s&&o&&Ze(t,r,o),o};let A=class extends v{constructor(){super(...arguments),this.error=null}async connectedCallback(){super.connectedCallback();const e=await this.fetchContactsHtml();e!==null&&this.getContactTemplateArgs(e)}async fetchContactsHtml(){const e=new DOMParser,t="contact.plain.html";try{const r=await L.fetchText(t,{cacheOptions:{cacheType:"runtime"}});return this.error=null,e.parseFromString(r,"text/html")}catch(r){return p.error(`SidebarContacts Component: Error while fetching ${t}`,r),this.error=await g.getPlaceHolder("error"),null}}renderHeader(e){return e?l`

    ${e}

    `:m}renderText(e){return e?l`

    ${e}

    `:m}render(){if(this.error)return l`
    ${this.error}
    `;if(!this.contactTemplateArgs)return m;const{headline:e,text:t,contacts:r}=this.contactTemplateArgs;return l`
    ${this.renderHeader(e)} ${this.renderText(t)} ${this.renderContacts(r)}
    `}createRenderRoot(){return this}renderContact(e){const{icon:t,markup:r}=e;return!t&&!r?m:l`
  • ${this.renderIcon(t)} ${this.renderContactMarkup(r)}
  • `}getContactsArgs(e){const t=e.querySelectorAll(".contact > div:not(:first-child)");return Array.from(t).map(s=>({icon:s.querySelector("div"),markup:s.querySelector("div:last-child")}))}getContactTemplateArgs(e){const t=e.querySelector("h2"),r=e.querySelector("p"),s=this.getContactsArgs(e);this.contactTemplateArgs={headline:t,text:r,contacts:s}}renderContacts(e){return e.length===0?m:l`
      ${e.map(t=>this.renderContact(t))}
    `}renderIcon(e){return e?x(e.innerHTML):m}renderContactMarkup(e){return e?oe(e.innerHTML):m}};U([f()],A.prototype,"contactTemplateArgs",2);U([f()],A.prototype,"error",2);A=U([y("sidebar-contact")],A);var Ke=Object.defineProperty,We=Object.getOwnPropertyDescriptor,z=(e,t,r,s)=>{for(var o=s>1?void 0:s?We(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(s?a(t,r,o):a(o))||o);return s&&o&&Ke(t,r,o),o};let w=class extends v{constructor(){super(...arguments),this.error=null}async connectedCallback(){super.connectedCallback();const e=await this.getPosts();this.lastTreePosts=this.getLastThreePosts(e),this.noPostsPlaceholder=await g.getPlaceHolder("no posts")}render(){if(this.lastTreePosts)return l`${this.renderHeader()} ${this.renderPosts()}`}createRenderRoot(){return this}getLastThreePosts(e){return e.sort((t,r)=>t.lastModified>r.lastModified?-1:t.lastModified${t}`:m}renderPost(e){return l`
    ${this.renderPicture(e)}

    ${e.description}

    `}async getPosts(){const e="/query-index.json";try{return this.error=null,(await L.fetchJson(e)).data.filter(r=>r.path.startsWith("/posts"))}catch(t){return p.error(`SidebarPost Component: Error while fetching ${e}`,t),this.error=await g.getPlaceHolder("error"),[]}}renderPosts(){return this.error?l`
    ${this.error}
    `:this.lastTreePosts.length===0?l`
    ${this.noPostsPlaceholder}
    `:l`
    ${this.lastTreePosts.map(e=>this.renderPost(e))}
    `}renderHeader(){return l`

    Newest Posts

    `}};z([f()],w.prototype,"lastTreePosts",2);z([f()],w.prototype,"error",2);z([f()],w.prototype,"noPostsPlaceholder",2);w=z([y("sidebar-posts")],w);var Je=Object.defineProperty,Ge=Object.getOwnPropertyDescriptor,F=(e,t,r,s)=>{for(var o=s>1?void 0:s?Ge(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(s?a(t,r,o):a(o))||o);return s&&o&&Je(t,r,o),o};let D=class extends v{constructor(){super(...arguments),this.error=null}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.fetchFooterData()}async fetchFooterData(){const e="footer.plain.html";try{const t=await L.fetchText(e,{cacheOptions:{cacheType:"runtime"}});this.error=null;const r=document.createElement("div");r.innerHTML=t,this.footerMarkup=r.querySelector("p"),this.footerMarkup&&this.footerMarkup.classList.add("copyright")}catch(t){p.error(`SidebarFooter Component: Error while fetching ${e}`,t),this.error=await g.getPlaceHolder("error")}}render(){if(this.error)return l`
    ${this.error}
    `;if(this.footerMarkup)return l`${this.footerMarkup}`}};F([f()],D.prototype,"footerMarkup",2);F([f()],D.prototype,"error",2);D=F([y("sidebar-footer")],D);var Qe=Object.defineProperty,et=Object.getOwnPropertyDescriptor,tt=(e,t,r,s)=>{for(var o=s>1?void 0:s?et(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(s?a(t,r,o):a(o))||o);return s&&o&&Qe(t,r,o),o};let J=class extends v{constructor(){super(...arguments),this.toggleRef=He(),this.handleToggleClick=e=>{e.preventDefault(),this.classList.toggle("active")}}createRenderRoot(){return this}firstUpdated(){this.toggleRef.value.addEventListener("click",this.handleToggleClick),this.classList.add("activate-animations")}render(){return l`
    ${x("hamburger")}`}};J=tt([y("sidebar-component")],J);const rt=()=>{if(R())return;const e=document.createElement("sidebar-component");e.setAttribute("id","sidebar"),window.innerWidth<=1280?e.classList.remove("active"):e.classList.add("active"),window.innerWidth<=1280?e.classList.remove("active"):e.classList.add("active");const t=document.getElementById("main");t==null||t.after(e)};C.addLoadEagerTask(()=>(rt(),Promise.resolve()));function st(){const e=document.getElementById("main");if(!e)return;const t=e.innerHTML;e.innerHTML=`
    ${R()?"":''}${t}
    `}C.addLoadEagerTask(()=>(st(),Promise.resolve()));function ot({input:e,specifier:t,htmlTag:r}){return t===""||r===""?e:e.split(t).map((s,o)=>o%2===1?`<${r}>${s}`:s).join("")}var it=Object.defineProperty,at=Object.getOwnPropertyDescriptor,Y=(e,t,r,s)=>{for(var o=s>1?void 0:s?at(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(s?a(t,r,o):a(o))||o);return s&&o&&it(t,r,o),o};let O=class extends v{constructor(){super(...arguments),this.error=null}createRenderRoot(){return this}async firstUpdated(e){await this.fetchHeaderData()}async fetchHeaderData(){try{const e=await L.fetchJson("header.json",{cacheOptions:{cacheType:"runtime"}});this.headerData={leftCol:e.leftCol.data[0],rightCol:e.rightCol.data},this.error=null}catch(e){p.error("Header Component: Error while fetching header.json",e),this.error=await g.getPlaceHolder("error")}}render(){if(this.error)return l`
    ${this.error}
    `;if(!this.headerData)return;const{leftCol:e,rightCol:t}=this.headerData,r=ot({input:e.logoText,htmlTag:"strong",specifier:":::"}),s=oe(r);return l``}};Y([f()],O.prototype,"headerData",2);Y([f()],O.prototype,"error",2);O=Y([y("header-component")],O);/** + */const He=()=>new Be;let Be=class{};const M=new WeakMap,Ue=j(class extends le{render(e){return f}update(e,[t]){var s;const r=t!==this.Y;return r&&this.Y!==void 0&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.Y=t,this.ht=(s=e.options)==null?void 0:s.host,this.rt(this.ct=e.element)),f}rt(e){if(typeof this.Y=="function"){const t=this.ht??globalThis;let r=M.get(t);r===void 0&&(r=new WeakMap,M.set(t,r)),r.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),r.set(this.Y,e),e!==void 0&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){var e,t;return typeof this.Y=="function"?(e=M.get(this.ht??globalThis))==null?void 0:e.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Ye=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,B=(e,t,r,s)=>{for(var o=s>1?void 0:s?Fe(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(s?a(t,r,o):a(o))||o);return s&&o&&Ye(t,r,o),o};let S=class extends v{constructor(){super(...arguments),this.error=null,this.getSubmenuName=e=>e.path.split("/")[1]}createRenderRoot(){return this}async firstUpdated(){this.items=await this.groupByFirstLevelPath()}async getPlaceholder(e){return await g.getPlaceHolder(e)}render(){if(this.error)return l`
    ${this.error}
    `;if(this.items)return l``}toggleSubmenu({currentTarget:e}){!(e instanceof HTMLElement)||!e.classList.contains("opener")||e.classList.toggle("active")}renderSubMenu(e){return l`${e.navtitle} ${z("chevron-down","submenu__icon")}`}renderMenuItem(e){return e.error?l`

    ${e.error}

    `:l`
  • ${e.children!==void 0?this.renderSubMenu(e):l`${e.navtitle}`}
  • `}renderMenuItems(){return l`
      ${this.items.map(e=>this.renderMenuItem(e))}
    `}getNavTitle(e){return e.path==="/"?"Homepage":e.navtitle||e.title}filterNavigation(e,t){return e.filter(r=>t.every(s=>!r.path.includes(s))).map(r=>({path:r.path,navtitle:this.getNavTitle(r)}))}groupItemsByFirstLevelPath(e){const t={};return e.forEach(r=>{const s=this.getSubmenuName(r);t[s]||(t[s]=[]),t[s].push({path:r.path,navtitle:this.getNavTitle(r)})}),t}async groupByFirstLevelPath(){const e="/query-index.json",t=["sidekick","sidekick-library","tools","development","dev-","__"];try{const r=await L.fetchJson(e);this.error=null;const s=this.filterNavigation(r.data,t),o=this.groupItemsByFirstLevelPath(s);return Object.values(o).map(a=>a.length===1?a[0]:{navtitle:a[0].path.split("/")[1],path:a[0].path,children:a})}catch(r){return _.error(`SidebarNav Component: Error while fetching ${e}`,r),this.error=await g.getPlaceHolder("error"),[]}}};B([p()],S.prototype,"items",2);B([p()],S.prototype,"error",2);S=B([y("sidebar-nav")],S);var Ze=Object.defineProperty,Xe=Object.getOwnPropertyDescriptor,U=(e,t,r,s)=>{for(var o=s>1?void 0:s?Xe(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(s?a(t,r,o):a(o))||o);return s&&o&&Ze(t,r,o),o};let A=class extends v{constructor(){super(...arguments),this.error=null}async connectedCallback(){super.connectedCallback();const e=await this.fetchContactsHtml();e!==null&&this.getContactTemplateArgs(e)}async fetchContactsHtml(){const e=new DOMParser,t="contact.plain.html";try{const r=await L.fetchText(t,{cacheOptions:{cacheType:"runtime"}});return this.error=null,e.parseFromString(r,"text/html")}catch(r){return _.error(`SidebarContacts Component: Error while fetching ${t}`,r),this.error=await g.getPlaceHolder("error"),null}}renderHeader(e){return e?l`

    ${e}

    `:f}renderText(e){return e?l`

    ${e}

    `:f}render(){if(this.error)return l`
    ${this.error}
    `;if(!this.contactTemplateArgs)return f;const{headline:e,text:t,contacts:r}=this.contactTemplateArgs;return l`
    ${this.renderHeader(e)} ${this.renderText(t)} ${this.renderContacts(r)}
    `}createRenderRoot(){return this}renderContact(e){const{icon:t,markup:r}=e;return!t&&!r?f:l`
  • ${this.renderIcon(t)} ${this.renderContactMarkup(r)}
  • `}getContactsArgs(e){const t=e.querySelectorAll(".contact > div:not(:first-child)");return Array.from(t).map(s=>({icon:s.querySelector("div"),markup:s.querySelector("div:last-child")}))}getContactTemplateArgs(e){const t=e.querySelector("h2"),r=e.querySelector("p"),s=this.getContactsArgs(e);this.contactTemplateArgs={headline:t,text:r,contacts:s}}renderContacts(e){return e.length===0?f:l`
      ${e.map(t=>this.renderContact(t))}
    `}renderIcon(e){return e?z(e.innerHTML):f}renderContactMarkup(e){return e?oe(e.innerHTML):f}};U([p()],A.prototype,"contactTemplateArgs",2);U([p()],A.prototype,"error",2);A=U([y("sidebar-contact")],A);var Ke=Object.defineProperty,We=Object.getOwnPropertyDescriptor,x=(e,t,r,s)=>{for(var o=s>1?void 0:s?We(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(s?a(t,r,o):a(o))||o);return s&&o&&Ke(t,r,o),o};let w=class extends v{constructor(){super(...arguments),this.error=null}async connectedCallback(){super.connectedCallback();const e=await this.getPosts();this.lastTreePosts=this.getLastThreePosts(e),this.noPostsPlaceholder=await g.getPlaceHolder("no posts")}render(){if(this.lastTreePosts)return l`${this.renderHeader()} ${this.renderPosts()}`}createRenderRoot(){return this}getLastThreePosts(e){return e.sort((t,r)=>t.lastModified>r.lastModified?-1:t.lastModified${t}`:f}renderPost(e){return l`
    ${this.renderPicture(e)}

    ${e.description}

    `}async getPosts(){const e="/query-index.json";try{return this.error=null,(await L.fetchJson(e)).data.filter(r=>r.path.startsWith("/posts"))}catch(t){return _.error(`SidebarPost Component: Error while fetching ${e}`,t),this.error=await g.getPlaceHolder("error"),[]}}renderPosts(){return this.error?l`
    ${this.error}
    `:this.lastTreePosts.length===0?l`
    ${this.noPostsPlaceholder}
    `:l`
    ${this.lastTreePosts.map(e=>this.renderPost(e))}
    `}renderHeader(){return l`

    Newest Posts

    `}};x([p()],w.prototype,"lastTreePosts",2);x([p()],w.prototype,"error",2);x([p()],w.prototype,"noPostsPlaceholder",2);w=x([y("sidebar-posts")],w);var Je=Object.defineProperty,Ge=Object.getOwnPropertyDescriptor,Y=(e,t,r,s)=>{for(var o=s>1?void 0:s?Ge(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(s?a(t,r,o):a(o))||o);return s&&o&&Je(t,r,o),o};let D=class extends v{constructor(){super(...arguments),this.error=null}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.fetchFooterData()}async fetchFooterData(){const e="footer.plain.html";try{const t=await L.fetchText(e,{cacheOptions:{cacheType:"runtime"}});this.error=null;const r=document.createElement("div");r.innerHTML=t,this.footerMarkup=r.querySelector("p"),this.footerMarkup&&this.footerMarkup.classList.add("copyright")}catch(t){_.error(`SidebarFooter Component: Error while fetching ${e}`,t),this.error=await g.getPlaceHolder("error")}}render(){if(this.error)return l`
    ${this.error}
    `;if(this.footerMarkup)return l`${this.footerMarkup}`}};Y([p()],D.prototype,"footerMarkup",2);Y([p()],D.prototype,"error",2);D=Y([y("sidebar-footer")],D);var Qe=Object.defineProperty,et=Object.getOwnPropertyDescriptor,tt=(e,t,r,s)=>{for(var o=s>1?void 0:s?et(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(s?a(t,r,o):a(o))||o);return s&&o&&Qe(t,r,o),o};let J=class extends v{constructor(){super(...arguments),this.toggleRef=He(),this.handleToggleClick=e=>{e.preventDefault(),this.classList.toggle("active")}}createRenderRoot(){return this}firstUpdated(){this.toggleRef.value.addEventListener("click",this.handleToggleClick),this.classList.add("activate-animations")}render(){return l`
    ${z("hamburger")}`}};J=tt([y("sidebar-component")],J);const rt=()=>{if(R())return;const e=document.createElement("sidebar-component");e.setAttribute("id","sidebar"),window.innerWidth<=1280?e.classList.remove("active"):e.classList.add("active"),window.innerWidth<=1280?e.classList.remove("active"):e.classList.add("active");const t=document.getElementById("main");t==null||t.after(e)};C.addLoadEagerTask(()=>(rt(),Promise.resolve()));function st(){const e=document.getElementById("main");if(!e)return;const t=e.innerHTML;e.innerHTML=`
    ${R()?"":''}${t}
    `}C.addLoadEagerTask(()=>(st(),Promise.resolve()));function ot({input:e,specifier:t,htmlTag:r}){return t===""||r===""?e:e.split(t).map((s,o)=>o%2===1?`<${r}>${s}`:s).join("")}var it=Object.defineProperty,at=Object.getOwnPropertyDescriptor,F=(e,t,r,s)=>{for(var o=s>1?void 0:s?at(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(s?a(t,r,o):a(o))||o);return s&&o&&it(t,r,o),o};let O=class extends v{constructor(){super(...arguments),this.error=null}createRenderRoot(){return this}async firstUpdated(e){await this.fetchHeaderData()}async fetchHeaderData(){try{const e=await L.fetchJson("header.json",{cacheOptions:{cacheType:"runtime"}});this.headerData={leftCol:e.leftCol.data[0],rightCol:e.rightCol.data},this.error=null}catch(e){_.error("Header Component: Error while fetching header.json",e),this.error=await g.getPlaceHolder("error")}}render(){if(this.error)return l`
    ${this.error}
    `;if(!this.headerData)return;const{leftCol:e,rightCol:t}=this.headerData,r=ot({input:e.logoText,htmlTag:"strong",specifier:":::"}),s=oe(r);return l``}};F([p()],O.prototype,"headerData",2);F([p()],O.prototype,"error",2);O=F([y("header-component")],O);/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause @@ -22,7 +22,7 @@ import{t as I,r as f}from"../__chunks__/state.CJfvw0Ck.js";import{i as R}from".. * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const G=e=>!Me(e)&&typeof e.then=="function",Q=1073741823;class dt extends le{constructor(){super(...arguments),this._$Cwt=Q,this._$Cbt=[],this._$CK=new ct(this),this._$CX=new lt}render(...t){return t.find(r=>!G(r))??X}update(t,r){const s=this._$Cbt;let o=s.length;this._$Cbt=r;const i=this._$CK,a=this._$CX;this.isConnected||this.disconnected();for(let d=0;dthis._$Cwt);d++){const h=r[d];if(!G(h))return this._$Cwt=d,h;d{for(;a.get();)await a.get();const u=i.deref();if(u!==void 0){const b=u._$Cbt.indexOf(h);b>-1&&b{for(var o=s>1?void 0:s?pt(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(s?a(t,r,o):a(o))||o);return s&&o&&ut(t,r,o),o};const te=Object.assign({"/public/icons/angle-down.svg":()=>n(()=>import("../__chunks__/angle-down.CYLyXUSW.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/angle-left.svg":()=>n(()=>import("../__chunks__/angle-left.CuEqyOC8.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/angle-right.svg":()=>n(()=>import("../__chunks__/angle-right.Ke48OV-s.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/angle-small-down.svg":()=>n(()=>import("../__chunks__/angle-small-down.SNJn5nFt.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/angle-small-left.svg":()=>n(()=>import("../__chunks__/angle-small-left.Bq32-m-s.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/angle-small-right.svg":()=>n(()=>import("../__chunks__/angle-small-right.FYreGgDf.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/angle-up.svg":()=>n(()=>import("../__chunks__/angle-up.D0S_oJnp.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/bolt.svg":()=>n(()=>import("../__chunks__/bolt.BAJn0zD8.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/building-storefront.svg":()=>n(()=>import("../__chunks__/building-storefront.Pww5r_Sc.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/chat-bubble-left-right.svg":()=>n(()=>import("../__chunks__/chat-bubble-left-right.0PedyEPm.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/check.svg":()=>n(()=>import("../__chunks__/check.BHPURAzV.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/chevron-down.svg":()=>n(()=>import("../__chunks__/chevron-down.D5xOlW7p.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/clip.svg":()=>n(()=>import("../__chunks__/clip.DAiKYXCc.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/clock.svg":()=>n(()=>import("../__chunks__/clock.CQWyiDNK.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/cpu-chip.svg":()=>n(()=>import("../__chunks__/cpu-chip.DbktS35z.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/cross.svg":()=>n(()=>import("../__chunks__/cross.DjCq6kb8.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/cursor-arrow-ripple.svg":()=>n(()=>import("../__chunks__/cursor-arrow-ripple.DHyr9er2.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/download.svg":()=>n(()=>import("../__chunks__/download.BlSXR9C9.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/envelope.svg":()=>n(()=>import("../__chunks__/envelope.Cc7Mhg2-.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/eye-crossed.svg":()=>n(()=>import("../__chunks__/eye-crossed.C49v3GRJ.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/eye.svg":()=>n(()=>import("../__chunks__/eye.Cm2FxO9V.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/facebook.svg":()=>n(()=>import("../__chunks__/facebook.3ENFaNKU.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/globe.svg":()=>n(()=>import("../__chunks__/globe.DIrN3GJL.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/hamburger.svg":()=>n(()=>import("../__chunks__/hamburger.DXUzfmtf.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/heart.svg":()=>n(()=>import("../__chunks__/heart.DSQJkyzj.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/home.svg":()=>n(()=>import("../__chunks__/home.CfzaHiPS.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/instagram.svg":()=>n(()=>import("../__chunks__/instagram.BBx5qXGF.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/medium.svg":()=>n(()=>import("../__chunks__/medium.BPaQEP4K.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/menu-burger.svg":()=>n(()=>import("../__chunks__/menu-burger.DyVjSQ0K.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/paper-plane.svg":()=>n(()=>import("../__chunks__/paper-plane.CLiFs3FL.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/plus.svg":()=>n(()=>import("../__chunks__/plus.DuBm-jVv.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/rocket-lunch.svg":()=>n(()=>import("../__chunks__/rocket-lunch.C6eRDqkd.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/search.svg":()=>n(()=>import("../__chunks__/search.CtsY1mRN.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/share.svg":()=>n(()=>import("../__chunks__/share.D_3XZuic.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/snapchat.svg":()=>n(()=>import("../__chunks__/snapchat.Bct5wLOa.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/social-network.svg":()=>n(()=>import("../__chunks__/social-network.B-lhER-M.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/trash.svg":()=>n(()=>import("../__chunks__/trash.D1jfdnTM.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/twitter.svg":()=>n(()=>import("../__chunks__/twitter.d5w0828a.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/user.svg":()=>n(()=>import("../__chunks__/user.X8OGz61Z.js"),__vite__mapDeps([])).then(e=>e.default)});let k=class extends v{constructor(){super(...arguments),this.name=""}async getSvg(e){const r=te[`${ee}/${e}.svg`]??te[`${ee}/cross.svg`];try{const s=await r();return nt(s)}catch(s){p.error(`Icon Component: SVG icon: ${s.message}`,s);return}}render(){const e=this.getSvg(this.name);return l`${ht(e)}`}};k.styles=pe`:host{display:flex;align-items:center}svg{width:100%;height:auto}`;de([fe({type:String})],k.prototype,"name",2);k=de([y("icon-component")],k);const $={interactive:"interactive",complete:"complete"};function re(){C.addBeforeEagerTask(()=>(document.getElementsByTagName("main")[0].setAttribute("id","main"),Promise.resolve())),C.init()}function ft(){document.readyState===$.interactive||document.readyState===$.complete?re():document.addEventListener("readystatechange",()=>{const e=document.readyState;(e===$.interactive||e===$.complete)&&re()})}ft(); + */const G=e=>!Me(e)&&typeof e.then=="function",Q=1073741823;class dt extends le{constructor(){super(...arguments),this._$Cwt=Q,this._$Cbt=[],this._$CK=new ct(this),this._$CX=new lt}render(...t){return t.find(r=>!G(r))??X}update(t,r){const s=this._$Cbt;let o=s.length;this._$Cbt=r;const i=this._$CK,a=this._$CX;this.isConnected||this.disconnected();for(let d=0;dthis._$Cwt);d++){const h=r[d];if(!G(h))return this._$Cwt=d,h;d{for(;a.get();)await a.get();const u=i.deref();if(u!==void 0){const b=u._$Cbt.indexOf(h);b>-1&&b{for(var o=s>1?void 0:s?pt(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(s?a(t,r,o):a(o))||o);return s&&o&&ut(t,r,o),o};const te=Object.assign({"/public/icons/angle-down.svg":()=>n(()=>import("../__chunks__/angle-down.CYLyXUSW.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/angle-left.svg":()=>n(()=>import("../__chunks__/angle-left.CuEqyOC8.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/angle-right.svg":()=>n(()=>import("../__chunks__/angle-right.Ke48OV-s.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/angle-small-down.svg":()=>n(()=>import("../__chunks__/angle-small-down.SNJn5nFt.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/angle-small-left.svg":()=>n(()=>import("../__chunks__/angle-small-left.Bq32-m-s.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/angle-small-right.svg":()=>n(()=>import("../__chunks__/angle-small-right.FYreGgDf.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/angle-up.svg":()=>n(()=>import("../__chunks__/angle-up.D0S_oJnp.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/bolt.svg":()=>n(()=>import("../__chunks__/bolt.BAJn0zD8.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/building-storefront.svg":()=>n(()=>import("../__chunks__/building-storefront.Pww5r_Sc.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/chat-bubble-left-right.svg":()=>n(()=>import("../__chunks__/chat-bubble-left-right.0PedyEPm.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/check.svg":()=>n(()=>import("../__chunks__/check.BHPURAzV.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/chevron-down.svg":()=>n(()=>import("../__chunks__/chevron-down.D5xOlW7p.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/clip.svg":()=>n(()=>import("../__chunks__/clip.DAiKYXCc.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/clock.svg":()=>n(()=>import("../__chunks__/clock.CQWyiDNK.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/cpu-chip.svg":()=>n(()=>import("../__chunks__/cpu-chip.DbktS35z.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/cross.svg":()=>n(()=>import("../__chunks__/cross.DjCq6kb8.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/cursor-arrow-ripple.svg":()=>n(()=>import("../__chunks__/cursor-arrow-ripple.DHyr9er2.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/download.svg":()=>n(()=>import("../__chunks__/download.BlSXR9C9.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/envelope.svg":()=>n(()=>import("../__chunks__/envelope.Cc7Mhg2-.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/eye-crossed.svg":()=>n(()=>import("../__chunks__/eye-crossed.C49v3GRJ.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/eye.svg":()=>n(()=>import("../__chunks__/eye.Cm2FxO9V.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/facebook.svg":()=>n(()=>import("../__chunks__/facebook.3ENFaNKU.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/globe.svg":()=>n(()=>import("../__chunks__/globe.DIrN3GJL.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/hamburger.svg":()=>n(()=>import("../__chunks__/hamburger.DXUzfmtf.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/heart.svg":()=>n(()=>import("../__chunks__/heart.DSQJkyzj.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/home.svg":()=>n(()=>import("../__chunks__/home.CfzaHiPS.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/instagram.svg":()=>n(()=>import("../__chunks__/instagram.BBx5qXGF.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/medium.svg":()=>n(()=>import("../__chunks__/medium.BPaQEP4K.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/menu-burger.svg":()=>n(()=>import("../__chunks__/menu-burger.DyVjSQ0K.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/paper-plane.svg":()=>n(()=>import("../__chunks__/paper-plane.CLiFs3FL.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/plus.svg":()=>n(()=>import("../__chunks__/plus.DuBm-jVv.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/rocket-lunch.svg":()=>n(()=>import("../__chunks__/rocket-lunch.C6eRDqkd.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/search.svg":()=>n(()=>import("../__chunks__/search.CtsY1mRN.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/share.svg":()=>n(()=>import("../__chunks__/share.D_3XZuic.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/snapchat.svg":()=>n(()=>import("../__chunks__/snapchat.Bct5wLOa.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/social-network.svg":()=>n(()=>import("../__chunks__/social-network.B-lhER-M.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/trash.svg":()=>n(()=>import("../__chunks__/trash.D1jfdnTM.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/twitter.svg":()=>n(()=>import("../__chunks__/twitter.d5w0828a.js"),__vite__mapDeps([])).then(e=>e.default),"/public/icons/user.svg":()=>n(()=>import("../__chunks__/user.X8OGz61Z.js"),__vite__mapDeps([])).then(e=>e.default)});let I=class extends v{constructor(){super(...arguments),this.name=""}async getSvg(e){const r=te[`${ee}/${e}.svg`]??te[`${ee}/cross.svg`];try{const s=await r();return nt(s)}catch(s){_.error(`Icon Component: SVG icon: ${s.message}`,s);return}}render(){const e=this.getSvg(this.name);return l`${ht(e)}`}};I.styles=pe`:host{display:flex;align-items:center}svg{width:100%;height:auto}`;de([fe({type:String})],I.prototype,"name",2);I=de([y("icon-component")],I);const $={interactive:"interactive",complete:"complete"};function re(){C.addBeforeEagerTask(()=>(document.getElementsByTagName("main")[0].setAttribute("id","main"),Promise.resolve())),C.init()}function ft(){document.readyState===$.interactive||document.readyState===$.complete?re():document.addEventListener("readystatechange",()=>{const e=document.readyState;(e===$.interactive||e===$.complete)&&re()})}ft(); function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = [] diff --git a/dist/main/main.js.map b/dist/main/main.js.map index 9598e5ae..85e6c898 100644 --- a/dist/main/main.js.map +++ b/dist/main/main.js.map @@ -1 +1 @@ -{"version":3,"mappings":"koBAaa,MAAAA,EAAa,CAACC,EAAsBC,IAA0B,CACzEA,EAAQ,MAAM,GAAG,EAAE,QAASC,GAA2B,CACrDF,EAAQ,UAAU,IAAIG,EAAYD,EAAS,KAAM,EAAC,EACnD,CACH,ECIgB,SAAAE,EAAYC,EAAeC,EAAgB,SAAkB,CAC3E,MAAMC,EAA4BF,GAASA,EAAM,SAAS,GAAG,EAAI,WAAa,OAGxEG,EADH,CAAC,GAAGF,EAAI,KAAK,iBAAiB,QAAQC,CAAI,KAAKF,CAAK,IAAI,CAAC,EAC9B,IAAKI,GAAiCA,EAAY,OAAO,EAAE,KAAK,IAAI,EAC3F,OAAAD,EAAK,OAASA,EAAO,EAC9B,CCbO,SAASE,IAA2B,CACnC,MAAAC,EAAWP,EAAY,UAAU,EACnCO,GAAqBZ,EAAA,SAAS,KAAMY,CAAQ,EAC1C,MAAAC,EAAQR,EAAY,OAAO,EAC7BQ,GAAkBb,EAAA,SAAS,KAAMa,CAAK,CAC5C,CCfO,SAASC,GAAgBb,EAAS,CACvCA,EAAQ,iBAAiB,GAAG,EAAE,QAASc,GAAM,CAEvC,GADFA,EAAA,MAAQA,EAAE,OAASA,EAAE,YACnBA,EAAE,OAASA,EAAE,YAAa,CAC5B,MAAMC,EAAKD,EAAE,cACPE,EAAQF,EAAE,cAAc,cACzBA,EAAE,cAAc,KA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","getMetadata","value","doc","attr","meta","metaElement","decorateTemplateAndTheme","template","theme","decorateButtons","a","up","twoup","undefinedOnEmpty","setDocLanguage","lang","getLocation","isSidekickLibraryActive","loadCSS","endpoint","resolve","reject","href","getUrlForEndpoint","link","config","loadFonts","fontsCssPath","error","DebuggerService","sampleRUM","checkpoint","data","defer","fnname","args","dfnname","fn","chkpnt","weight","id","_","i","random","isSelected","firstReadTime","urlSanitizers","knownProperties","sendPing","pdata","body","url","script","setupHlxObj","mainScriptPath","scriptEl","initSampleRUM","event","collectBlocks","section","blockMap","block","loadBlockModules","blockModule","loadBlockStyles","showSection","loadBlock","sectionsBlocks","blockPromises","loadBlocks","SectionsPromises","decorateImages","item","parentElement","adjustMarkup","wrappers","defaultContent","e","wrapper","toCamelCase","name","g","readBlockConfig","row","cols","col","as","imgs","img","ps","p","processSectionMetaData","sectionMeta","key","style","transformSection","main","decorateBlocks","shortBlockName","blockWrapper","waitForLCP","firstSection","lcpBlocks","lcpCandidate","HLX","cb","beforeLoadEagerTask","loadEagerTask","beforeLoadLazyTask","loadLazyTask","lazyStylesScssPath","sidekickLibraryStylesScssPath","fontsScssPath","lazyStylesCssPath","sidekickLibraryStylesCssPath","hash","beforeLoadDelayedTask","loadDelayedTask","initializedTask","HLX$1","o","f","s","_a","r","c","h","n","t","_b","h$1","SidebarNav","LitElement","entry","PlaceholderService","html","currentTarget","renderIcon","child","queryIndex","filterValues","term","siteMapEntries","groups","firstLevelPath","FetchService","filteredNavigation","groupItems","group","__decorateClass","state","customElement","SidebarContact","contactHtml","parser","contactHtmlString","headline","nothing","text","contacts","contact","icon","markup","contactsElement","contactElement","unsafeHTML","SidebarPosts","posts","sitemapEntry","nextSitemapEntry","siteMapEntry","picture","createOptimizedPicture","SidebarFooter","response","responseMarkup","SidebarComponent","createRef","ref","addSidebarContainer","sidebarContainer","addInnerContainer","children","replaceBySpecifier","input","specifier","htmlTag","part","index","HeaderComponent","_changedProperties","leftCol","rightCol","logoText","logoTextHTML","m","ICONS_PATH","modules","Icon","iconMarkupFunc","iconMarkup","unsafeSVG","svg","until","css","property","READY_STATES","init","initHLXApp","readyState"],"sources":["../../src/utils/addClasses.ts","../../src/utils/getMetadata.ts","../../src/app/tasks/decorateTemplateAndTheme.ts","../../src/app/tasks/decorateButtons.ts","../../src/utils/undefinedOnEmpty.ts","../../src/app/tasks/setDocLanguage.ts","../../src/helpers/sidekick/getLocation.ts","../../src/app/tasks/loadCSS.ts","../../config.ts","../../src/app/tasks/loadFonts.ts","../../src/app/tasks/sampleRUM.ts","../../src/app/tasks/setupHlxObj.ts","../../src/app/tasks/initSampleRUM.ts","../../src/app/tasks/collectBlocks.ts","../../src/app/tasks/loadBlockModules.ts","../../src/app/tasks/loadBlockStyles.ts","../../src/app/tasks/showSection.ts","../../src/app/tasks/loadBlock.ts","../../src/app/tasks/loadBlocks.ts","../../src/app/tasks/decorateImages.ts","../../src/app/tasks/adjustMarkup.ts","../../src/utils/toCamelCase.ts","../../src/app/tasks/readBlockConfig.ts","../../src/app/tasks/processSectionMetaData.ts","../../src/app/tasks/transformSections.ts","../../src/app/tasks/decorateBlocks.ts","../../src/app/tasks/waitForLCP.ts","../../src/app/index.ts","../../node_modules/lit-html/directive-helpers.js","../../node_modules/lit-html/async-directive.js","../../node_modules/lit-html/directives/ref.js","../../src/components/sidebar/sidebarNav.ts","../../src/components/sidebar/sidebarContact.ts","../../src/components/sidebar/sidebarPosts.ts","../../src/components/sidebar/sidebarFooter.ts","../../src/components/sidebar/sidebar.ts","../../src/components/sidebar/sidebar.init.ts","../../src/components/innerContainer/innerContainer.ts","../../src/components/innerContainer/innerContainer.init.ts","../../src/utils/replaceBySpecifier.ts","../../src/components/header.ts","../../node_modules/lit-html/directives/unsafe-svg.js","../../node_modules/lit-html/directives/private-async-helpers.js","../../node_modules/lit-html/directives/until.js","../../src/constants/paths.ts","../../src/components/icon/icon.ts","../../src/app/init.ts","../../src/main.ts"],"sourcesContent":["import { toClassName } from './toClassName';\n\n/**\n * Adds CSS classes to an HTML element.\n *\n * @param {HTMLElement} element - The HTML element to which classes will be added.\n * @param {string} classes - A string containing CSS classes separated by commas.\n *\n * @example\n * const element = document.getElementById('myElement');\n * const classesToAdd = 'class1, class2, class3';\n * addClasses(element, classesToAdd);\n */\nexport const addClasses = (element: HTMLElement, classes: string): void => {\n classes.split(',').forEach((cssClass: string): void => {\n element.classList.add(toClassName(cssClass.trim()));\n });\n};\n","/**\n * Retrieves the content of a specified metadata tag from the document head.\n *\n * @param {string} value - The name or property attribute value of the metadata tag.\n * @param {Document} [doc=document] - The document to search for the metadata tag (default is the current document).\n * @returns {string} - The content of the metadata tag, if found; otherwise, an empty string.\n *\n * @example\n * Example 1:\n * Assuming exists in the document head.\n * const metaContent = getMetadata('description');\n * console.log(metaContent);\n * Output: 'This is a sample description.'\n *\n * @example\n * Example 2:\n * Assuming exists in the document head.\n * const metaContent = getMetadata('og:title', document);\n * console.log(metaContent);\n * Output: 'Open Graph Title'\n */\nexport function getMetadata(value: string, doc: Document = document): string {\n const attr: 'property' | 'name' = value && value.includes(':') ? 'property' : 'name';\n const metaTags: HTMLMetaElement[] =\n ([...doc.head.querySelectorAll(`meta[${attr}=\"${value}\"]`)] as HTMLMetaElement[]) || [];\n const meta: string = metaTags.map((metaElement: HTMLMetaElement) => metaElement.content).join(', ');\n return meta.length ? meta : '';\n}\n","import { addClasses } from '../../utils/addClasses';\nimport { getMetadata } from '../../utils/getMetadata';\n\n/**\n * Decorates the template and theme by adding classes to the body.\n * The classes are defined in the meta tags of the document.\n * Usefull for styling the page based on the template and theme meta tags\n * that can be set in the metadata table in EDS.\n * @example\n * \n * \n * @example\n * \n */\nexport function decorateTemplateAndTheme() {\n const template = getMetadata('template');\n if (template) addClasses(document.body, template);\n const theme = getMetadata('theme');\n if (theme) addClasses(document.body, theme);\n}\n","/**\n * Decorates paragraphs containing a single link as buttons.\n * @param {Element} element container element\n */\nexport function decorateButtons(element) {\n element.querySelectorAll('a').forEach((a) => {\n a.title = a.title || a.textContent;\n if (a.href !== a.textContent) {\n const up = a.parentElement;\n const twoup = a.parentElement.parentElement;\n if (!a.querySelector('img')) {\n if (up.childNodes.length === 1 && (up.tagName === 'P' || up.tagName === 'DIV')) {\n a.className = 'button'; // default\n up.classList.add('button-container');\n }\n if (\n up.childNodes.length === 1 &&\n up.tagName === 'STRONG' &&\n twoup.childNodes.length === 1 &&\n twoup.tagName === 'P'\n ) {\n a.className = 'button primary';\n twoup.classList.add('button-container');\n }\n if (\n up.childNodes.length === 1 &&\n up.tagName === 'EM' &&\n twoup.childNodes.length === 1 &&\n twoup.tagName === 'P'\n ) {\n a.className = 'button secondary';\n twoup.classList.add('button-container');\n }\n }\n }\n });\n}\n","/**\n * Returns undefined if the value is an empty string, otherwise returns the value itself.\n *\n * @param {string} value - The value to check.\n * @returns {string | undefined} - If the value is an empty string, returns undefined\n * otherwise, returns the value itself.\n *\n * @example\n * // Example usage:\n * const emptyValue = '';\n * const nonEmptyValue = 'Hello, World!';\n *\n * const result1 = undefinedOnEmpty(emptyValue);\n * console.log(result1); // Output: undefined\n *\n * const result2 = undefinedOnEmpty(nonEmptyValue);\n * console.log(result2); // Output: 'Hello, World!'\n */\nexport function undefinedOnEmpty(value: string): string | undefined {\n return value.trim() === '' ? undefined : value;\n}\n","import { getMetadata } from '../../utils/getMetadata';\nimport { undefinedOnEmpty } from '../../utils/undefinedOnEmpty';\n\n/*\n * This function sets the language of the document based on the language metadata.\n */\nexport function setDocLanguage() {\n const lang = getMetadata('language');\n document.documentElement.lang = undefinedOnEmpty(lang) || 'en';\n}\n","import { isSidekickLibraryActive } from './isSidekickLibraryActive.ts';\n\n/**\n * Returns the true origin of the current page in the browser.\n * If the page is running in an iframe with srcdoc, the query param is returned.\n * @returns {String} The query param of the current page or the query param of the block running in the library\n *\n * @example\n * const searchParams = new URLSearchParams(getLocation().search);\n *\n * @remarks\n * Needs to be used when the Sidekick Library Plugin is in use.\n */\nexport function getLocation(): Location {\n return isSidekickLibraryActive() ? window.parent.location : window.location;\n}\n","import { getUrlForEndpoint } from '../utils/getUrlForEndpoint';\n\n/**\n * Load a CSS file if it is not already loaded append it to the head.\n * @param endpoint - The endpoint of the CSS file.\n * @returns Promise\n */\nexport function loadCSS(endpoint: string): Promise {\n return new Promise((resolve, reject) => {\n const { href } = getUrlForEndpoint(endpoint);\n\n if (!document.querySelector(`head > link[href=\"${href}\"]`)) {\n const link = document.createElement('link');\n link.rel = 'stylesheet';\n link.href = href;\n link.onload = () => resolve();\n link.onerror = reject;\n document.head.append(link);\n } else {\n resolve();\n }\n });\n}\n","export interface Config {\n mainTsPath: string;\n mainScssPath: string;\n iconsDirPath: string;\n iconsTypesPath: string;\n fontsScssPath?: string;\n fontsCssPath?: string;\n lazyStylesScssPath?: string;\n lazyStylesCssPath?: string;\n sidekickLibraryStylesScssPath?: string;\n sidekickLibraryStylesCssPath?: string;\n lcpBlocks?: string[];\n}\n\nexport const config: Config = {\n mainTsPath: './src/main.ts',\n mainScssPath: './src/styles/sass/main.scss',\n iconsDirPath: './public/icons',\n iconsTypesPath: './src/types/icons.types.ts',\n fontsScssPath: './src/styles/sass/fonts.scss',\n fontsCssPath: './dist/fonts/fonts.css',\n lazyStylesScssPath: './src/styles/sass/lazy-styles.scss',\n lazyStylesCssPath: './dist/lazyStyles/lazyStyles.css',\n sidekickLibraryStylesScssPath: './src/styles/sass/sidekick-library-styles.scss',\n sidekickLibraryStylesCssPath: './dist/sidekickLibraryStyles/sidekickLibraryStyles.css',\n lcpBlocks: ['banner'],\n};\n","import { getLocation } from 'Helpers/sidekick/getLocation';\nimport { loadCSS } from './loadCSS';\nimport { config } from '../../../config';\nimport { DebuggerService } from '@kluntje/services';\n\nexport async function loadFonts(): Promise {\n const { fontsCssPath } = config;\n if (!fontsCssPath) return;\n await loadCSS(fontsCssPath);\n try {\n if (!getLocation().hostname.includes('localhost')) sessionStorage.setItem('fonts-loaded', 'true');\n } catch (error) {\n DebuggerService.error('loadFonts: Error setting fonts-loaded in session storage', error);\n }\n}\n","/**\n * log RUM if part of the sample.\n * @param {string} checkpoint identifies the checkpoint in funnel\n * @param {Object} data additional data for RUM sample\n * @param {string} data.source DOM node that is the source of a checkpoint event,\n * identified by #id or .classname\n * @param {string} data.target subject of the checkpoint event,\n * for instance the href of a link, or a search term\n */\n\nexport function sampleRUM(checkpoint, data = {}) {\n // @ts-ignore\n sampleRUM.defer = sampleRUM.defer || [];\n const defer = (fnname) => {\n // @ts-ignore\n sampleRUM[fnname] = sampleRUM[fnname] || ((...args) => sampleRUM.defer.push({ fnname, args }));\n };\n // @ts-ignore\n sampleRUM.drain =\n // @ts-ignore\n sampleRUM.drain ||\n ((dfnname, fn) => {\n sampleRUM[dfnname] = fn;\n // @ts-ignore\n sampleRUM.defer\n .filter(({ fnname }) => dfnname === fnname)\n .forEach(({ fnname, args }) => sampleRUM[fnname](...args));\n });\n // @ts-ignore\n sampleRUM.always = sampleRUM.always || [];\n // @ts-ignore\n sampleRUM.always.on = (chkpnt, fn) => {\n // @ts-ignore\n sampleRUM.always[chkpnt] = fn;\n };\n // @ts-ignore\n sampleRUM.on = (chkpnt, fn) => {\n // @ts-ignore\n sampleRUM.cases[chkpnt] = fn;\n };\n defer('observe');\n defer('cwv');\n try {\n window.hlx = window.hlx || {};\n // @ts-ignore\n if (!window.hlx.rum) {\n const usp = new URLSearchParams(window.location.search);\n const weight = usp.get('rum') === 'on' ? 1 : 100; // with parameter, weight is 1. Defaults to 100.\n const id = Array.from({ length: 75 }, (_, i) => String.fromCharCode(48 + i))\n .filter((a) => /\\d|[A-Z]/i.test(a))\n .filter(() => Math.random() * 75 > 70)\n .join('');\n const random = Math.random();\n const isSelected = random * weight < 1;\n const firstReadTime = Date.now();\n const urlSanitizers = {\n full: () => window.location.href,\n origin: () => window.location.origin,\n path: () => window.location.href.replace(/\\?.*$/, ''),\n };\n // @ts-ignore\n window.hlx.rum = {\n weight,\n id,\n random,\n isSelected,\n firstReadTime,\n sampleRUM,\n sanitizeURL: urlSanitizers[window.hlx.RUM_MASK_URL || 'path'],\n };\n }\n // @ts-ignore\n const { weight, id, firstReadTime } = window.hlx.rum;\n // @ts-ignore\n if (window.hlx && window.hlx.rum && window.hlx.rum.isSelected) {\n const knownProperties = [\n 'weight',\n 'id',\n 'referer',\n 'checkpoint',\n 't',\n 'source',\n 'target',\n 'cwv',\n 'CLS',\n 'FID',\n 'LCP',\n 'INP',\n ];\n const sendPing = (pdata = data) => {\n const body = JSON.stringify(\n {\n weight,\n id,\n // @ts-ignore\n referer: window.hlx.rum.sanitizeURL(),\n checkpoint,\n t: Date.now() - firstReadTime,\n ...data,\n },\n knownProperties\n );\n const url = `https://rum.hlx.page/.rum/${weight}`;\n navigator.sendBeacon(url, body);\n // eslint-disable-next-line no-console\n console.debug(`ping:${checkpoint}`, pdata);\n };\n // @ts-ignore\n sampleRUM.cases = sampleRUM.cases || {\n // @ts-ignore\n cwv: () => sampleRUM.cwv(data) || true,\n lazy: () => {\n // use classic script to avoid CORS issues\n const script = document.createElement('script');\n script.src = 'https://rum.hlx.page/.rum/@adobe/helix-rum-enhancer@^1/src/index.js';\n document.head.appendChild(script);\n return true;\n },\n };\n sendPing(data);\n // @ts-ignore\n if (sampleRUM.cases[checkpoint]) {\n // @ts-ignore\n sampleRUM.cases[checkpoint]();\n }\n }\n // @ts-ignore\n if (sampleRUM.always[checkpoint]) {\n // @ts-ignore\n sampleRUM.always[checkpoint](data);\n }\n } catch (error) {\n // something went wrong\n }\n}\n","import { DebuggerService } from '@kluntje/services';\n\nexport default function setupHlxObj(mainScriptPath: string = '/dist/main/main.js') {\n window.hlx = window.hlx || {};\n window.hlx.RUM_MASK_URL = 'full';\n window.hlx.codeBasePath = '';\n window.hlx.lighthouse = new URLSearchParams(window.location.search).get('lighthouse') === 'on';\n\n const scriptEl = document.querySelector(`script[src$=\"${mainScriptPath}\"]`) as HTMLScriptElement;\n if (scriptEl) {\n try {\n [window.hlx.codeBasePath] = new URL(scriptEl.src).pathname.split(mainScriptPath);\n } catch (error) {\n // eslint-disable-next-line no-console\n DebuggerService.log('setupHlxObj: Could not set codeBasePath.', error);\n }\n }\n}\n","import { sampleRUM } from './sampleRUM';\nimport setupHlxObj from './setupHlxObj';\n\nexport function initSampleRUM() {\n setupHlxObj();\n sampleRUM('top');\n\n window.addEventListener('load', () => sampleRUM('load'));\n\n window.addEventListener('unhandledrejection', (event) => {\n sampleRUM('error', { source: event.reason.sourceURL, target: event.reason.line });\n });\n\n window.addEventListener('error', (event) => {\n sampleRUM('error', { source: event.filename, target: event.lineno });\n });\n}\n","import { BlockMapping } from '../app.types';\n\n/**\n * Collect all blocks in a section.\n * @param section - The section to collect the blocks from.\n * @returns BlockMapping[]\n * @example\n * const blocks = collectBlocks(section);\n * console.log(blocks);\n * Output: [{ name: 'block1', element: HTMLElement }, { name: 'block2', element: HTMLElement }]\n */\nexport function collectBlocks(section: HTMLElement): BlockMapping[] {\n const blockMap: BlockMapping[] = [];\n const blocksElements = section.querySelectorAll('[data-block-name]');\n\n blocksElements.forEach((block: HTMLDivElement) => {\n blockMap.push({\n name: block.dataset['blockName'] as string,\n element: block,\n });\n });\n\n return blockMap;\n}\n","import { DebuggerService } from '@kluntje/services';\nimport { BlockMapping } from '../app.types';\nimport { getUrlForEndpoint } from '../utils/getUrlForEndpoint';\n\nenum Status {\n unloaded = 'unloaded',\n loading = 'loading',\n loaded = 'loaded',\n error = 'error',\n}\n\n/**\n * Load the es module for the block. The module should be named as the block name.\n * @param block - The block to load the module for.\n * @returns Promise\n */\nexport async function loadBlockModules(block: BlockMapping): Promise {\n const blockStatus = block.element.dataset.blockStatus ?? Status.unloaded;\n\n if (blockStatus === Status.unloaded) {\n try {\n block.element.dataset.blockStatus = Status.loading;\n const { href } = getUrlForEndpoint(`dist/${block.name}/${block.name}.js`);\n const blockModule = await import(href);\n\n if (blockModule.default) {\n await blockModule.default(block.element);\n }\n\n block.element.dataset.blockStatus = Status.loaded;\n } catch (error) {\n block.element.dataset.blockStatus = Status.error;\n DebuggerService.error('loadBlockModules:', error);\n }\n }\n}\n","import { BlockMapping } from '../app.types';\nimport { loadCSS } from './loadCSS';\nimport { DebuggerService } from '@kluntje/services';\n\n/**\n * Load the block styles. The styles should be named as the block name.\n * @param block - The block to load the styles for.\n * @returns Promise\n */\nexport async function loadBlockStyles(block: BlockMapping) {\n try {\n await loadCSS(`dist/${block.name}/${block.name}.css`);\n } catch (error) {\n DebuggerService.error('loadBlockStyles: Could not load css styles.', error);\n }\n}\n","/**\n * Removes the display property from the section\n * @param section - The section to show\n */\nexport function showSection(section: HTMLElement) {\n section.style.removeProperty('display');\n}\n","import { BlockMapping } from '../app.types';\nimport { collectBlocks } from './collectBlocks';\nimport { loadBlockModules } from './loadBlockModules';\nimport { loadBlockStyles } from './loadBlockStyles';\nimport { showSection } from './showSection';\n\n/**\n * Load the block modules and styles for a section and show the section.\n * @param section - The section to load the block modules and styles for.\n * @returns Promise\n */\nexport async function loadBlock(section: HTMLElement) {\n const sectionsBlocks: BlockMapping[] = collectBlocks(section);\n\n if (!sectionsBlocks.length) {\n showSection(section);\n return;\n }\n\n const blockPromises: Promise<[void, void]>[] = [];\n\n for (const block of sectionsBlocks) {\n blockPromises.push(Promise.all([loadBlockModules(block), loadBlockStyles(block)]));\n }\n\n await Promise.all(blockPromises);\n showSection(section);\n}\n","import { loadBlock } from './loadBlock';\n\n/**\n * Loads Blocks\n * by getting all sections and load every block in every section\n * and shows every section that is finished loading.\n */\nexport async function loadBlocks() {\n const sections = [...document.querySelectorAll('.section')];\n const SectionsPromises = sections.map((section) => loadBlock(section));\n\n await Promise.all(SectionsPromises);\n}\n","/*\n * This function is used to decorate images in the default content.\n * It adds the class 'image' and 'main' to the parent element of the image.\n */\nexport function decorateImages() {\n const picture = document.querySelectorAll('.default-content-wrapper picture');\n picture.forEach((item) => {\n const parentElement = item.parentElement;\n if (parentElement) {\n parentElement.classList.add('image', 'main');\n }\n });\n}\n","import { decorateImages } from './decorateImages';\n\n/**\n * This function is used to adjust the markup of a section.\n * It wraps the default content in a div with the class 'default-content-wrapper'.\n * It also adds the class 'section' to the section element.\n * It decorates the images in the default content by calling the 'decorateImages' function.\n * It sets the 'data-section-status' attribute to 'initialized'.\n * It hides the section element.\n * @param section - The section element to adjust.\n */\nexport function adjustMarkup(section: HTMLDivElement) {\n const wrappers: HTMLDivElement[] = [];\n let defaultContent = false;\n [...section.children].forEach((e) => {\n if (e.tagName === 'DIV' || !defaultContent) {\n const wrapper = document.createElement('div');\n wrappers.push(wrapper);\n defaultContent = e.tagName !== 'DIV';\n\n if (defaultContent) {\n wrapper.classList.add('default-content-wrapper');\n }\n }\n wrappers[wrappers.length - 1].append(e);\n });\n wrappers.forEach((wrapper) => section.append(wrapper));\n decorateImages();\n section.classList.add('section');\n section.dataset.sectionStatus = 'initialized';\n section.style.display = 'none';\n}\n","import { toClassName } from './toClassName';\n\n/**\n * Sanitizes a string for use as a JavaScript property name.\n *\n * @param {string} name - The unsanitized string.\n * @returns {string} - The camelCased name.\n *\n * @example\n * // Example usage:\n * const unsanitizedString = 'background-color';\n * const camelCasedName = toCamelCase(unsanitizedString);\n * console.log(camelCasedName); // Output: 'backgroundColor'\n */\nexport function toCamelCase(name: string): string {\n if (/^[a-z][A-Za-z0-9]*$/.test(name)) {\n return name;\n }\n\n if (/^[A-Z][A-Za-z0-9]*$/.test(name)) {\n return name.charAt(0).toLowerCase() + name.slice(1);\n }\n\n return toClassName(name).replace(/-([a-z])/g, (g: string) => g[1].toUpperCase());\n}\n","import { toClassName } from 'Utils/toClassName';\n\n/*\n This function reads the configuration of a block from the HTML file\n and returns it as a Record object.\n @param {Element} block The block element\n*/\nexport function readBlockConfig(block: Element): Record {\n const config: Record = {};\n block.querySelectorAll(':scope > div').forEach((row) => {\n if (row.children) {\n const cols = [...row.children];\n if (cols[1]) {\n const col = cols[1];\n const name = toClassName(cols[0].textContent ?? '');\n let value: any = '';\n if (col.querySelector('a')) {\n const as = [...col.querySelectorAll('a')];\n if (as.length === 1) {\n value = as[0].href;\n } else {\n value = as.map((a) => a.href);\n }\n } else if (col.querySelector('img')) {\n const imgs = [...col.querySelectorAll('img')];\n if (imgs.length === 1) {\n value = imgs[0].src;\n } else {\n value = imgs.map((img) => img.src);\n }\n } else if (col.querySelector('p')) {\n const ps = [...col.querySelectorAll('p')];\n if (ps.length === 1) {\n value = ps[0].textContent;\n } else {\n value = ps.map((p) => p.textContent);\n }\n } else value = row.children[1].textContent;\n config[name] = value;\n }\n }\n });\n return config;\n}\n","import { toCamelCase } from 'Utils/toCamelCase';\nimport { toClassName } from 'Utils/toClassName';\nimport { readBlockConfig } from './readBlockConfig';\n\n/*\n This function processes the metadata of a section and applies it to the section element.\n @param {HTMLElement} section The section element\n*/\nexport function processSectionMetaData(section: HTMLElement) {\n const sectionMeta = section.querySelector('div.section-metadata');\n if (sectionMeta) {\n const meta = readBlockConfig(sectionMeta);\n Object.keys(meta).forEach((key) => {\n if (key === 'style') {\n const styles = meta.style\n .split(',')\n .filter((style: string) => style)\n .map((style: string) => toClassName(style.trim()));\n styles.forEach((style: string) => section.classList.add(style));\n } else {\n section.dataset[toCamelCase(key)] = meta[key];\n }\n });\n if (sectionMeta.parentElement) sectionMeta.parentElement.remove();\n }\n}\n","import { adjustMarkup } from './adjustMarkup';\nimport { processSectionMetaData } from './processSectionMetaData';\n\n/**\n * This function is used to transform the sections of the main element.\n * It adjusts the markup of each section by calling the 'adjustMarkup' function.\n * It processes the metadata of each section by calling the 'processSectionMetaData' function.\n * @param main - The main element to transform.\n */\nexport function transformSection(main: HTMLElement) {\n main.querySelectorAll(':scope > div').forEach((section) => {\n adjustMarkup(section);\n processSectionMetaData(section);\n });\n}\n","/**\n * Decorate blocks with classes and data attributes.\n * @param main - Html main element\n */\nexport function decorateBlocks(main: HTMLElement) {\n main.querySelectorAll('div.section > div > div').forEach((block) => {\n const shortBlockName = block.classList[0];\n if (shortBlockName) {\n block.classList.add('block');\n block.dataset.blockName = shortBlockName;\n const blockWrapper = block.parentElement;\n blockWrapper?.classList.add(`${shortBlockName}-wrapper`);\n const section = block.closest('.section');\n if (section) section.classList.add(`${shortBlockName}-container`);\n }\n });\n}\n","import { collectBlocks } from './collectBlocks';\nimport { loadBlockModules } from './loadBlockModules';\nimport { loadBlockStyles } from './loadBlockStyles';\nimport { config } from '../../../config';\nimport { showSection } from './showSection';\nimport { LcpCandidate } from '../app.types';\n\n/**\n * Wait for the Largest Contentful Paint (LCP) candidate to be loaded.\n * This function will load the modules and styles for the first section after the LCP candidate.\n * @returns Promise\n */\nexport async function waitForLCP() {\n const firstSection: HTMLElement | null = document.querySelector('.section');\n const { lcpBlocks } = config;\n\n if (firstSection) {\n const blocks = collectBlocks(firstSection);\n const blockPromises = blocks.map(async (block) => {\n const hasLCPBlock = lcpBlocks?.includes(block.name);\n if (hasLCPBlock) await Promise.all([loadBlockModules(block), loadBlockStyles(block)]);\n });\n\n await Promise.all(blockPromises);\n showSection(firstSection);\n }\n\n // @ts-ignore\n document.body.style.display = null;\n const lcpCandidate = document.querySelector('main img');\n\n await new Promise((resolve) => {\n if (lcpCandidate && !lcpCandidate.complete) {\n lcpCandidate.setAttribute('loading', 'eager');\n lcpCandidate.setAttribute('fetchpriority', 'high');\n lcpCandidate.addEventListener('load', () => resolve());\n lcpCandidate.addEventListener('error', () => resolve());\n } else {\n resolve();\n }\n });\n}\n","import { decorateTemplateAndTheme } from './tasks/decorateTemplateAndTheme';\nimport { decorateButtons } from './tasks/decorateButtons';\nimport { setDocLanguage } from './tasks/setDocLanguage';\nimport { loadFonts } from './tasks/loadFonts';\nimport { initSampleRUM } from './tasks/initSampleRUM';\nimport { DebuggerService } from '@kluntje/services';\nimport { loadCSS } from './tasks/loadCSS';\nimport { isSidekickLibraryActive } from 'Helpers/sidekick/isSidekickLibraryActive';\nimport { config } from '../../config';\nimport { loadBlocks } from './tasks/loadBlocks';\nimport { transformSection } from './tasks/transformSections';\nimport { decorateBlocks } from './tasks/decorateBlocks';\nimport { sampleRUM } from './tasks/sampleRUM';\nimport { waitForLCP } from './tasks/waitForLCP.ts';\n\nclass HLX {\n private beforeEagerCallbacks: Array<() => Promise> = [];\n private loadEagerCallbacks: Array<() => Promise> = [];\n private beforeLoadLazyCallbacks: Array<() => Promise> = [];\n private loadLazyCallbacks: Array<() => Promise> = [];\n private beforeLoadDelayedCallbacks: Array<() => Promise> = [];\n private loadDelayedCallbacks: Array<() => Promise> = [];\n private initializedCallbacks: Array<() => Promise> = [];\n\n private beforeEagerPromise?: Promise;\n private eagerPromise?: Promise;\n private beforeLazyPromise?: Promise;\n private lazyPromise?: Promise;\n private beforeDelayedPromise?: Promise;\n private delayedPromise?: Promise;\n private initializedPromise?: Promise;\n\n private get beforeEager() {\n if (this.beforeEagerPromise === undefined) {\n this.beforeEagerPromise = this.beforeLoadEager();\n }\n return this.beforeEagerPromise;\n }\n\n private get loadEager() {\n if (this.eagerPromise === undefined) {\n this.eagerPromise = this.loadEagerPromise();\n }\n return this.eagerPromise;\n }\n\n private get beforeLoadLazy() {\n if (this.beforeLazyPromise === undefined) {\n this.beforeLazyPromise = this.beforeLoadLazyPromise();\n }\n return this.beforeLazyPromise;\n }\n\n private get loadLazy() {\n if (this.lazyPromise === undefined) {\n this.lazyPromise = this.loadLazyPromise();\n }\n return this.lazyPromise;\n }\n\n private get beforeLoadDelayed() {\n if (this.beforeDelayedPromise === undefined) {\n this.beforeDelayedPromise = this.beforeLoadDelayedPromise();\n }\n return this.beforeDelayedPromise;\n }\n\n private get loadDelayed() {\n if (this.delayedPromise === undefined) {\n this.delayedPromise = this.loadDelayedPromise();\n }\n return this.delayedPromise;\n }\n\n private get initialized() {\n if (this.initializedPromise === undefined) {\n this.initializedPromise = this.getInitializedPromise();\n }\n return this.initializedPromise;\n }\n\n public addBeforeEagerTask(cb: () => Promise) {\n this.beforeEagerCallbacks.push(cb);\n }\n\n public addLoadEagerTask(cb: () => Promise) {\n this.loadEagerCallbacks.push(cb);\n }\n\n public addBeforeLoadLazyTask(cb: () => Promise) {\n this.beforeLoadLazyCallbacks.push(cb);\n }\n\n public addLoadLazyTask(cb: () => Promise) {\n this.loadLazyCallbacks.push(cb);\n }\n\n public addBeforeLoadDelayedTask(cb: () => Promise) {\n this.beforeLoadDelayedCallbacks.push(cb);\n }\n\n public addLoadDelayedTask(cb: () => Promise) {\n this.loadDelayedCallbacks.push(cb);\n }\n\n public addInitializedTask(cb: () => Promise) {\n this.initializedCallbacks.push(cb);\n }\n\n public async init() {\n await this.beforeEager;\n await this.loadEager;\n await this.beforeLoadLazy;\n await this.loadLazy;\n await this.beforeLoadDelayed;\n await this.loadDelayed;\n await this.initialized;\n }\n\n private async beforeLoadEager(): Promise {\n const beforeLoadEagerTask: Promise = new Promise((resolve) => {\n initSampleRUM();\n decorateTemplateAndTheme();\n setDocLanguage();\n resolve();\n });\n\n await Promise.all([...this.beforeEagerCallbacks.map((cb) => cb()), beforeLoadEagerTask]);\n }\n\n private async loadEagerPromise(): Promise {\n const loadEagerTask: Promise = new Promise(async (resolve) => {\n try {\n const main = document.querySelector('main') as HTMLElement;\n decorateButtons(main);\n transformSection(main);\n decorateBlocks(main);\n setTimeout(() => {\n document.body.classList.add('show');\n resolve();\n }, 100);\n\n /* if desktop (proxy for fast connection) or fonts already loaded, load fonts.css */\n if (window.innerWidth >= 900 || sessionStorage.getItem('fonts-loaded')) {\n await loadFonts();\n }\n } catch (error) {\n DebuggerService.error('index: could not load fonts', error);\n }\n });\n\n await Promise.all([...this.loadEagerCallbacks.map((cb) => cb()), loadEagerTask, waitForLCP()]);\n }\n\n private async beforeLoadLazyPromise(): Promise {\n const beforeLoadLazyTask: Promise = new Promise((resolve) => resolve());\n\n await Promise.all([...this.beforeLoadLazyCallbacks.map((cb) => cb()), beforeLoadLazyTask]);\n }\n\n private async loadLazyPromise(): Promise {\n const loadLazyTask: Promise = new Promise(async (resolve) => {\n try {\n const {\n lazyStylesScssPath,\n sidekickLibraryStylesScssPath,\n fontsScssPath,\n lazyStylesCssPath,\n sidekickLibraryStylesCssPath,\n } = config;\n\n await loadBlocks();\n\n const { hash } = window.location;\n const element = hash ? document.getElementById(hash.substring(1)) : false;\n if (hash && element) element.scrollIntoView();\n\n if (lazyStylesScssPath && lazyStylesCssPath) await loadCSS(lazyStylesCssPath);\n if (sidekickLibraryStylesScssPath && sidekickLibraryStylesCssPath && isSidekickLibraryActive()) {\n await loadCSS(sidekickLibraryStylesCssPath);\n }\n if (fontsScssPath) await loadFonts();\n sampleRUM('lazy');\n const main = document.querySelector('main') as HTMLElement;\n // @ts-ignore\n sampleRUM.observe(main.querySelectorAll('div[data-block-name]'));\n // @ts-ignore\n sampleRUM.observe(main.querySelectorAll('picture > img'));\n } catch (error) {\n DebuggerService.error('LoadLazyTask: ', error);\n }\n resolve();\n });\n\n await Promise.all([...this.loadLazyCallbacks.map((cb) => cb()), loadLazyTask]);\n }\n\n private async beforeLoadDelayedPromise(): Promise {\n const beforeLoadDelayedTask: Promise = new Promise((resolve) => resolve());\n\n await Promise.all([...this.beforeLoadDelayedCallbacks.map((cb) => cb()), beforeLoadDelayedTask]);\n }\n\n private async loadDelayedPromise(): Promise {\n const loadDelayedTask: Promise = new Promise((resolve) => {\n setTimeout(() => {\n resolve();\n }, 3000);\n });\n\n await Promise.all([...this.loadDelayedCallbacks.map((cb) => cb()), loadDelayedTask]);\n }\n\n private async getInitializedPromise(): Promise {\n const initializedTask: Promise = new Promise((resolve) => resolve());\n\n await Promise.all([...this.initializedCallbacks.map((cb) => cb()), initializedTask]);\n }\n}\n\nexport default new HLX();\n","import{_$LH as o}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{I:t}=o,i=o=>null===o||\"object\"!=typeof o&&\"function\"!=typeof o,n={HTML:1,SVG:2},e=(o,t)=>void 0===t?void 0!==o?._$litType$:o?._$litType$===t,l=o=>null!=o?._$litType$?.h,c=o=>void 0!==o?._$litDirective$,d=o=>o?._$litDirective$,f=o=>void 0===o.strings,s=()=>document.createComment(\"\"),r=(o,i,n)=>{const e=o._$AA.parentNode,l=void 0===i?o._$AB:i._$AA;if(void 0===n){const i=e.insertBefore(s(),l),c=e.insertBefore(s(),l);n=new t(i,c,o,o.options)}else{const t=n._$AB.nextSibling,i=n._$AM,c=i!==o;if(c){let t;n._$AQ?.(o),n._$AM=o,void 0!==n._$AP&&(t=o._$AU)!==i._$AU&&n._$AP(t)}if(t!==l||c){let o=n._$AA;for(;o!==t;){const t=o.nextSibling;e.insertBefore(o,l),o=t}}}return n},v=(o,t,i=o)=>(o._$AI(t,i),o),u={},m=(o,t=u)=>o._$AH=t,p=o=>o._$AH,h=o=>{o._$AP?.(!1,!0);let t=o._$AA;const i=o._$AB.nextSibling;for(;t!==i;){const o=t.nextSibling;t.remove(),t=o}},j=o=>{o._$AR()};export{n as TemplateResultType,j as clearPart,p as getCommittedValue,d as getDirectiveClass,r as insertPart,l as isCompiledTemplateResult,c as isDirectiveResult,i as isPrimitive,f as isSingleExpression,e as isTemplateResult,h as removePart,v as setChildPartValue,m as setCommittedValue};\n//# sourceMappingURL=directive-helpers.js.map\n","import{isSingleExpression as i}from\"./directive-helpers.js\";import{Directive as t,PartType as e}from\"./directive.js\";export{Directive,PartType,directive}from\"./directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=(i,t)=>{const e=i._$AN;if(void 0===e)return!1;for(const i of e)i._$AO?.(t,!1),s(i,t);return!0},o=i=>{let t,e;do{if(void 0===(t=i._$AM))break;e=t._$AN,e.delete(i),i=t}while(0===e?.size)},r=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),c(t)}};function h(i){void 0!==this._$AN?(o(this),this._$AM=i,r(this)):this._$AM=i}function n(i,t=!1,e=0){const r=this._$AH,h=this._$AN;if(void 0!==h&&0!==h.size)if(t)if(Array.isArray(r))for(let i=e;i{i.type==e.CHILD&&(i._$AP??=n,i._$AQ??=h)};class f extends t{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,e){super._$AT(i,t,e),r(this),this.isConnected=i._$AU}_$AO(i,t=!0){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(s(this,i),o(this))}setValue(t){if(i(this._$Ct))this._$Ct._$AI(t,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}}export{f as AsyncDirective};\n//# sourceMappingURL=async-directive.js.map\n","import{nothing as t}from\"../lit-html.js\";import{AsyncDirective as i}from\"../async-directive.js\";import{directive as s}from\"../directive.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=()=>new h;class h{}const o=new WeakMap,n=s(class extends i{render(i){return t}update(i,[s]){const e=s!==this.Y;return e&&void 0!==this.Y&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=s,this.ht=i.options?.host,this.rt(this.ct=i.element)),t}rt(t){if(\"function\"==typeof this.Y){const i=this.ht??globalThis;let s=o.get(i);void 0===s&&(s=new WeakMap,o.set(i,s)),void 0!==s.get(this.Y)&&this.Y.call(this.ht,void 0),s.set(this.Y,t),void 0!==t&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){return\"function\"==typeof this.Y?o.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});export{e as createRef,n as ref};\n//# sourceMappingURL=ref.js.map\n","import { html, LitElement } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\n\nimport FetchService from 'Services/fetch.service.ts';\nimport { renderIcon } from '../icon/icon.template.ts';\nimport { DebuggerService } from '@kluntje/services';\nimport PlaceholderService from 'Services/placeholder.service.ts';\nimport { SiteMapEntry } from 'Types/siteMap.types.ts';\nimport { SheetsResponse } from 'Types/sheetResponse.types.ts';\n\ninterface SubMenuItem {\n path: string;\n navtitle: string;\n}\n\ninterface MenuItem {\n path: string;\n error?: string;\n navtitle: string;\n children?: SubMenuItem[];\n}\n\n@customElement('sidebar-nav')\nexport class SidebarNav extends LitElement {\n @state()\n items: MenuItem[];\n\n @state()\n error: string | null = null;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n async firstUpdated() {\n this.items = await this.groupByFirstLevelPath();\n }\n\n async getPlaceholder(key: string): Promise {\n const placeholder = await PlaceholderService.getPlaceHolder(key);\n return placeholder;\n }\n\n render() {\n if (this.error) {\n return html`
    ${this.error}
    `;\n }\n if (!this.items) return;\n\n return html` `;\n }\n\n private toggleSubmenu({ currentTarget }: Event) {\n if (!(currentTarget instanceof HTMLElement) || !currentTarget.classList.contains('opener')) return;\n currentTarget.classList.toggle('active');\n }\n\n private renderSubMenu(item) {\n return html`\n ${item.navtitle} \n ${renderIcon('chevron-down', 'submenu__icon')}\n \n `;\n }\n\n private renderMenuItem(item: MenuItem) {\n if (item.error) {\n return html`

    ${item.error}

    `;\n } else {\n return html`
  • \n ${item.children !== undefined ? this.renderSubMenu(item) : html`${item.navtitle}`}\n
  • `;\n }\n }\n\n private renderMenuItems() {\n return html`
      \n ${this.items.map((item: MenuItem) => this.renderMenuItem(item))}\n
    `;\n }\n\n private getSubmenuName = (entry: MenuItem) => {\n return entry.path.split('/')[1];\n };\n\n private getNavTitle(item: MenuItem | SiteMapEntry) {\n if (item.path === '/') return 'Homepage';\n return item['navtitle'] || item['title'];\n }\n\n private filterNavigation(queryIndex: SiteMapEntry[], filterValues: string[]): MenuItem[] {\n return queryIndex\n .filter((item) => filterValues.every((term) => !item.path.includes(term)))\n .map((item) => ({\n path: item.path,\n navtitle: this.getNavTitle(item),\n }));\n }\n\n private groupItemsByFirstLevelPath(siteMapEntries: MenuItem[]): Record {\n const groups = {};\n siteMapEntries.forEach((item) => {\n const firstLevelPath = this.getSubmenuName(item); // Extracting the first level of the path\n if (!groups[firstLevelPath]) {\n groups[firstLevelPath] = [];\n }\n groups[firstLevelPath].push({\n path: item.path,\n navtitle: this.getNavTitle(item),\n });\n });\n return groups;\n }\n\n private async groupByFirstLevelPath() {\n const endpoint = '/query-index.json';\n const filterValues: string[] = ['sidekick', 'sidekick-library', 'tools', 'development', 'dev-', '__'];\n\n try {\n const queryIndex = await FetchService.fetchJson>(endpoint);\n\n this.error = null;\n\n const filteredNavigation = this.filterNavigation(queryIndex.data, filterValues);\n const groupItems = this.groupItemsByFirstLevelPath(filteredNavigation);\n const groupedData = Object.values(groupItems);\n\n return groupedData.map((group: MenuItem[]) => {\n if (group.length === 1) {\n return group[0];\n }\n\n return {\n navtitle: group[0].path.split('/')[1],\n path: group[0].path,\n children: group,\n };\n });\n } catch (error) {\n DebuggerService.error(`SidebarNav Component: Error while fetching ${endpoint}`, error);\n this.error = await PlaceholderService.getPlaceHolder('error');\n return [];\n }\n }\n}\n","import { html, LitElement, nothing } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js';\nimport FetchService from '../../services/fetch.service.ts';\nimport { renderIcon } from '../icon/icon.template.ts';\nimport { DebuggerService } from '@kluntje/services';\nimport PlaceholderService from '../../services/placeholder.service.ts';\nimport { IconName } from 'Types/icons.types.ts';\n\ninterface SidebarContactTemplateArgs {\n headline: HTMLElement | null;\n text: HTMLElement | null;\n contacts: Contact[];\n}\n\ninterface Contact {\n icon: HTMLElement | null;\n markup: HTMLElement | null;\n}\n\n@customElement('sidebar-contact')\nexport class SidebarContact extends LitElement {\n @state()\n contactTemplateArgs: SidebarContactTemplateArgs;\n\n @state()\n error: string | null = null;\n\n async connectedCallback() {\n super.connectedCallback();\n const contactHtml = await this.fetchContactsHtml();\n if (contactHtml !== null) this.getContactTemplateArgs(contactHtml);\n }\n\n async fetchContactsHtml() {\n const parser = new DOMParser();\n const endpoint = 'contact.plain.html';\n\n try {\n const contactHtmlString = await FetchService.fetchText(endpoint, {\n cacheOptions: { cacheType: 'runtime' },\n });\n this.error = null;\n return parser.parseFromString(contactHtmlString, 'text/html');\n } catch (error) {\n DebuggerService.error(`SidebarContacts Component: Error while fetching ${endpoint}`, error);\n this.error = await PlaceholderService.getPlaceHolder('error');\n\n return null;\n }\n }\n\n renderHeader(headline: HTMLElement | null) {\n if (!headline) return nothing;\n return html`
    \n

    ${headline}

    \n
    `;\n }\n\n renderText(text: HTMLElement | null) {\n if (!text) return nothing;\n return html`

    ${text}

    `;\n }\n\n render() {\n if (this.error) {\n return html`
    ${this.error}
    `;\n }\n\n if (!this.contactTemplateArgs) return nothing;\n\n const { headline, text, contacts } = this.contactTemplateArgs;\n\n return html`\n
    ${this.renderHeader(headline)} ${this.renderText(text)} ${this.renderContacts(contacts)}
    \n `;\n }\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n private renderContact(contact: Contact) {\n const { icon, markup } = contact;\n if (!icon && !markup) return nothing;\n\n return html`
  • ${this.renderIcon(icon)} ${this.renderContactMarkup(markup)}
  • `;\n }\n\n private getContactsArgs(contactHtml: Document): Contact[] {\n const contactsElement = contactHtml.querySelectorAll('.contact > div:not(:first-child)');\n const contactsArray = Array.from(contactsElement);\n\n return contactsArray.map((contactElement) => {\n return {\n icon: contactElement.querySelector('div'),\n markup: contactElement.querySelector('div:last-child'),\n };\n });\n }\n\n private getContactTemplateArgs(contactHtml: Document) {\n const headline = contactHtml.querySelector('h2');\n const text = contactHtml.querySelector('p');\n const contacts = this.getContactsArgs(contactHtml);\n\n this.contactTemplateArgs = {\n headline,\n text,\n contacts,\n };\n }\n\n private renderContacts(contacts: Contact[]) {\n if (contacts.length === 0) return nothing;\n return html`
      \n ${contacts.map((contact) => this.renderContact(contact))}\n
    `;\n }\n\n private renderIcon(icon: HTMLElement | null) {\n if (!icon) return nothing;\n return renderIcon(icon.innerHTML as IconName);\n }\n\n private renderContactMarkup(markup: HTMLElement | null) {\n if (!markup) return nothing;\n return unsafeHTML(markup.innerHTML);\n }\n}\n","import { html, LitElement, nothing } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport { createOptimizedPicture } from 'Utils/createOptimizedPicture.ts';\nimport FetchService from 'Services/fetch.service.ts';\nimport { DebuggerService } from '@kluntje/services';\nimport PlaceholderService from 'Services/placeholder.service.ts';\nimport { Sitemap, SiteMapEntry } from 'Types/siteMap.types.ts';\nimport { SheetsResponse } from 'Types/sheetResponse.types.ts';\n\n@customElement('sidebar-posts')\nexport class SidebarPosts extends LitElement {\n @state()\n private lastTreePosts: Sitemap;\n\n @state()\n error: string | null = null;\n\n @state()\n private noPostsPlaceholder: string;\n\n async connectedCallback() {\n super.connectedCallback();\n const posts = await this.getPosts();\n this.lastTreePosts = this.getLastThreePosts(posts);\n this.noPostsPlaceholder = await PlaceholderService.getPlaceHolder('no posts');\n }\n\n render() {\n if (!this.lastTreePosts) return;\n\n return html` ${this.renderHeader()} ${this.renderPosts()} `;\n\n //TODO: Add overview if more button is needed\n /*\n \n */\n }\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n private getLastThreePosts(posts: Sitemap) {\n posts.sort((sitemapEntry: SiteMapEntry, nextSitemapEntry: SiteMapEntry) => {\n if (sitemapEntry.lastModified > nextSitemapEntry.lastModified) {\n return -1;\n } else if (sitemapEntry.lastModified < nextSitemapEntry.lastModified) {\n return 1;\n }\n\n return 0;\n });\n\n return posts.slice(0, 3);\n }\n\n private renderPicture(siteMapEntry: SiteMapEntry) {\n const picture = createOptimizedPicture({\n src: siteMapEntry.image,\n alt: siteMapEntry.imagealt,\n width: 336,\n height: 224,\n });\n if (!picture) return nothing;\n return html`${picture}`;\n }\n\n private renderPost(siteMapEntry: SiteMapEntry) {\n return html`
    \n ${this.renderPicture(siteMapEntry)}\n

    ${siteMapEntry.description}

    \n
    `;\n }\n\n private async getPosts() {\n const endpoint = '/query-index.json';\n\n try {\n this.error = null;\n const queryIndex = await FetchService.fetchJson>(endpoint);\n return queryIndex.data.filter((item) => item.path.startsWith('/posts'));\n } catch (error) {\n DebuggerService.error(`SidebarPost Component: Error while fetching ${endpoint}`, error);\n this.error = await PlaceholderService.getPlaceHolder('error');\n return [];\n }\n }\n\n private renderPosts() {\n if (this.error) return html`
    ${this.error}
    `;\n if (this.lastTreePosts.length === 0) return html`
    ${this.noPostsPlaceholder}
    `;\n\n return html`
    \n ${this.lastTreePosts.map((siteMapEntry) => this.renderPost(siteMapEntry))}\n
    `;\n }\n\n private renderHeader() {\n return html`
    \n

    Newest Posts

    \n
    `;\n }\n}\n","import { html, LitElement } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport FetchService from '../../services/fetch.service.ts';\nimport { DebuggerService } from '@kluntje/services';\nimport PlaceholderService from '../../services/placeholder.service.ts';\n\n@customElement('sidebar-footer')\nexport class SidebarFooter extends LitElement {\n @state()\n footerMarkup: HTMLParagraphElement | null;\n\n @state()\n error: string | null = null;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.fetchFooterData();\n }\n\n async fetchFooterData() {\n const endpoint = 'footer.plain.html';\n\n try {\n const response = await FetchService.fetchText(endpoint, {\n cacheOptions: { cacheType: 'runtime' },\n });\n this.error = null;\n const responseMarkup = document.createElement('div');\n responseMarkup.innerHTML = response;\n this.footerMarkup = responseMarkup.querySelector('p');\n if (this.footerMarkup) this.footerMarkup.classList.add('copyright');\n } catch (error) {\n DebuggerService.error(`SidebarFooter Component: Error while fetching ${endpoint}`, error);\n this.error = await PlaceholderService.getPlaceHolder('error');\n }\n }\n\n render() {\n if (this.error) {\n return html`
    ${this.error}
    `;\n }\n if (!this.footerMarkup) return;\n return html`${this.footerMarkup}`;\n }\n}\n","/**\n * @module SidebarComponent\n * @copyright diva-e (https://diva-e.com)\n */\n\nimport { html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { createRef, Ref, ref } from 'lit/directives/ref.js';\n\nimport './sidebarNav.ts';\nimport './sidebarContact.ts';\nimport './sidebarPosts.ts';\nimport './sidebarFooter.ts';\n\nimport { renderIcon } from '../icon/icon.template.ts';\n\n@customElement('sidebar-component')\nexport class SidebarComponent extends LitElement {\n toggleRef: Ref = createRef();\n createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n firstUpdated(): void {\n this.toggleRef.value!.addEventListener('click', this.handleToggleClick);\n this.classList.add('activate-animations');\n }\n\n handleToggleClick = (e: Event) => {\n e.preventDefault();\n this.classList.toggle('active');\n };\n\n render() {\n return html`\n
    \n \n \n \n \n
    \n \n ${renderIcon('hamburger')}\n \n `;\n }\n}\n","import HLX from '../../app/index.ts';\nimport './sidebar.ts';\nimport { isSidekickLibraryActive } from 'Helpers/sidekick/isSidekickLibraryActive.ts';\n\nconst addSidebarContainer = () => {\n if (isSidekickLibraryActive()) return;\n\n const sidebarContainer = document.createElement('sidebar-component');\n sidebarContainer.setAttribute('id', 'sidebar');\n window.innerWidth <= 1280 ? sidebarContainer.classList.remove('active') : sidebarContainer.classList.add('active');\n window.innerWidth <= 1280 ? sidebarContainer.classList.remove('active') : sidebarContainer.classList.add('active');\n const main = document.getElementById('main');\n main?.after(sidebarContainer);\n};\n\nHLX.addLoadEagerTask(() => {\n addSidebarContainer();\n return Promise.resolve();\n});\n","import { isSidekickLibraryActive } from 'Helpers/sidekick/isSidekickLibraryActive';\n\nexport function addInnerContainer() {\n const main = document.getElementById('main');\n if (!main) return;\n const children = main.innerHTML;\n main.innerHTML = `
    ${isSidekickLibraryActive() ? `` : ``}${children}
    `;\n}\n","import HLX from '../../app/index.ts';\nimport { addInnerContainer } from './innerContainer.ts';\n\nHLX.addLoadEagerTask(() => {\n addInnerContainer();\n return Promise.resolve();\n});\n","/**\n * Represents the structure of an object used to specify replacements in a string.\n *\n * @interface ReplaceBySpecifier\n * @property {string} input - The input string where replacements will be made.\n * @property {string} specifier - The specifier string to search for in the input.\n * @property {string} htmlTag - The HTML tag to wrap around the parts matched by the specifier.\n */\ninterface ReplaceBySpecifier {\n input: string;\n specifier: string;\n htmlTag: string;\n}\n\n/**\n * Replaces occurrences of a specified specifier in a string with an HTML tag.\n *\n * @param {ReplaceBySpecifier} param - An object containing input string, specifier, and HTML tag.\n * @param {string} param.input - The input string where replacements will be made.\n * @param {string} param.specifier - The specifier string to search for in the input.\n * @param {string} param.htmlTag - The HTML tag to wrap around the parts matched by the specifier.\n * @returns {string} - The modified string with replacements.\n *\n @example\n * // Example 1:\n * const result1 = replaceBySpecifier({\n * input: 'This is a test string with some test keywords.',\n * specifier: 'test',\n * htmlTag: 'strong'\n * });\n * console.log(result1);\n * // Output: 'This is a string with some keywords.'\n *\n * // Example 2:\n * const result2 = replaceBySpecifier({\n * input: 'Hello, world!',\n * specifier: ',',\n * htmlTag: 'span'\n * });\n * console.log(result2);\n * // Output: 'Hello world!'\n */\nexport function replaceBySpecifier({ input, specifier, htmlTag }: ReplaceBySpecifier): string {\n if (specifier === '' || htmlTag === '') return input;\n return input\n .split(specifier)\n .map((part: string, index: number): string => (index % 2 === 1 ? `<${htmlTag}>${part}` : part))\n .join('');\n}\n","import { html, LitElement, PropertyValueMap } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport { replaceBySpecifier } from 'Utils/replaceBySpecifier.ts';\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js';\nimport FetchService from 'Services/fetch.service.ts';\nimport { renderIcon } from './icon/icon.template.ts';\nimport { DebuggerService } from '@kluntje/services';\nimport PlaceholderService from 'Services/placeholder.service.ts';\nimport { IconName } from 'Types/icons.types.ts';\n\nexport interface HeaderResponseData {\n leftCol: LeftCol;\n rightCol: RightCol;\n}\n\nexport interface LeftCol {\n data: LeftColData[];\n}\n\nexport interface LeftColData {\n logoText: string;\n logoLink: string;\n}\n\nexport interface RightCol {\n data: RightColData[];\n}\n\nexport interface RightColData {\n socialIcon: IconName;\n socialLabel: string;\n socialLink: string;\n}\n\ninterface HeaderTemplateData {\n leftCol: LeftColData;\n rightCol: RightColData[];\n}\n\n@customElement('header-component')\nexport class HeaderComponent extends LitElement {\n @state()\n headerData: HeaderTemplateData;\n\n @state()\n error: string | null = null;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n protected async firstUpdated(_changedProperties: PropertyValueMap | Map) {\n await this.fetchHeaderData();\n }\n\n async fetchHeaderData() {\n try {\n const response = await FetchService.fetchJson('header.json', {\n cacheOptions: { cacheType: 'runtime' },\n });\n this.headerData = { leftCol: response.leftCol.data[0], rightCol: response.rightCol.data };\n this.error = null;\n } catch (error) {\n DebuggerService.error('Header Component: Error while fetching header.json', error);\n this.error = await PlaceholderService.getPlaceHolder('error');\n }\n }\n\n render() {\n if (this.error) {\n return html`
    ${this.error}
    `;\n }\n if (!this.headerData) return;\n const { leftCol, rightCol } = this.headerData;\n const logoText = replaceBySpecifier({ input: leftCol.logoText, htmlTag: 'strong', specifier: ':::' });\n const logoTextHTML = unsafeHTML(logoText);\n return html`\n ${logoTextHTML}\n \n `;\n }\n}\n","import{directive as s}from\"../directive.js\";import{UnsafeHTMLDirective as e}from\"./unsafe-html.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class t extends e{}t.directiveName=\"unsafeSVG\",t.resultType=2;const o=s(t);export{o as unsafeSVG};\n//# sourceMappingURL=unsafe-svg.js.map\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=async(t,s)=>{for await(const i of t)if(!1===await s(i))return};class s{constructor(t){this.Y=t}disconnect(){this.Y=void 0}reconnect(t){this.Y=t}deref(){return this.Y}}class i{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){this.Z??=new Promise((t=>this.q=t))}resume(){this.q?.(),this.Z=this.q=void 0}}export{i as Pauser,s as PseudoWeakRef,t as forAwaitOf};\n//# sourceMappingURL=private-async-helpers.js.map\n","import{noChange as t}from\"../lit-html.js\";import{isPrimitive as s}from\"../directive-helpers.js\";import{AsyncDirective as i}from\"../async-directive.js\";import{PseudoWeakRef as e,Pauser as r}from\"./private-async-helpers.js\";import{directive as o}from\"../directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const n=t=>!s(t)&&\"function\"==typeof t.then,h=1073741823;class c extends i{constructor(){super(...arguments),this._$Cwt=h,this._$Cbt=[],this._$CK=new e(this),this._$CX=new r}render(...s){return s.find((t=>!n(t)))??t}update(s,i){const e=this._$Cbt;let r=e.length;this._$Cbt=i;const o=this._$CK,c=this._$CX;this.isConnected||this.disconnected();for(let t=0;tthis._$Cwt);t++){const s=i[t];if(!n(s))return this._$Cwt=t,s;t{for(;c.get();)await c.get();const i=o.deref();if(void 0!==i){const e=i._$Cbt.indexOf(s);e>-1&&e {\n const main = document.getElementsByTagName('main')[0];\n main.setAttribute('id', 'main');\n return Promise.resolve();\n });\n\n HLX.init();\n}\n\nexport function initHLXApp() {\n if (document.readyState === READY_STATES.interactive || document.readyState === READY_STATES.complete) {\n init();\n } else {\n document.addEventListener('readystatechange', () => {\n const readyState = document.readyState;\n if (readyState === READY_STATES.interactive || readyState === READY_STATES.complete) {\n init();\n }\n });\n }\n}\n","import './components/sidebar/sidebar.init.ts';\nimport './components/innerContainer/innerContainer.init.ts';\nimport './components/header.ts';\nimport './components/icon/icon.ts';\nimport { initHLXApp } from './app/init.ts';\n\ninitHLXApp();\n\ndeclare global {\n interface Window {\n hlx: {\n RUM_MASK_URL: string;\n codeBasePath: string;\n lighthouse: boolean;\n };\n }\n}\n"],"file":"main/main.js"} \ No newline at end of file +{"version":3,"mappings":"koBAaa,MAAAA,EAAa,CAACC,EAAsBC,IAA0B,CACzEA,EAAQ,MAAM,GAAG,EAAE,QAASC,GAA2B,CACrDF,EAAQ,UAAU,IAAIG,EAAYD,EAAS,KAAM,EAAC,EACnD,CACH,ECIgB,SAAAE,EAAYC,EAAeC,EAAgB,SAAkB,CAC3E,MAAMC,EAA4BF,GAASA,EAAM,SAAS,GAAG,EAAI,WAAa,OAGxEG,EADH,CAA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nB,YAAa,cACb,SAAU,UACZ,EAEA,SAASC,IAAO,CACdvG,EAAI,mBAAmB,KACR,SAAS,qBAAqB,MAAM,EAAE,CAAC,EAC/C,aAAa,KAAM,MAAM,EACvB,QAAQ,UAChB,EAEDA,EAAI,KAAK,CACX,CAEO,SAASwG,IAAa,CACvB,SAAS,aAAeF,EAAa,aAAe,SAAS,aAAeA,EAAa,SACtFC,KAEI,0BAAiB,mBAAoB,IAAM,CAClD,MAAME,EAAa,SAAS,YACxBA,IAAeH,EAAa,aAAeG,IAAeH,EAAa,WACpEC,IACP,CACD,CAEL,CCtBAC,GAAW","names":["addClasses","element","classes","cssClass","toClassName","getMetadata","value","doc","attr","meta","metaElement","decorateTemplateAndTheme","template","theme","decorateButtons","a","up","twoup","undefinedOnEmpty","setDocLanguage","lang","collectBlocks","section","blockMap","block","loadBlockModules","status","href","getUrlForEndpoint","blockModule","error","DebuggerService","loadCSS","endpoint","resolve","reject","link","loadBlockStyles","config","showSection","waitForLCP","firstSection","lcpBlocks","blockPromises","lcpCandidate","getLocation","isSidekickLibraryActive","loadFonts","fontsCssPath","e","sampleRUM","checkpoint","data","defer","fnname","args","dfnname","fn","chkpnt","weight","id","_","i","random","isSelected","firstReadTime","urlSanitizers","knownProperties","sendPing","pdata","body","url","script","setupHlxObj","mainScriptPath","scriptEl","initSampleRUM","event","loadBlock","sectionsBlocks","loadBlocks","SectionsPromises","decorateImages","item","parentElement","adjustMarkup","wrappers","defaultContent","wrapper","toCamelCase","name","g","readBlockConfig","row","cols","col","as","imgs","img","ps","p","processSectionMetaData","sectionMeta","key","style","transformSection","main","decorateBlocks","shortBlockName","blockWrapper","HLX","cb","beforeLoadEagerTask","loadEagerTask","beforeLoadLazyTask","loadLazyTask","lazyStylesScssPath","sidekickLibraryStylesScssPath","fontsScssPath","lazyStylesCssPath","sidekickLibraryStylesCssPath","hash","beforeLoadDelayedTask","loadDelayedTask","initializedTask","HLX$1","o","f","s","_a","r","c","h","n","t","_b","h$1","SidebarNav","LitElement","entry","PlaceholderService","html","currentTarget","renderIcon","child","queryIndex","filterValues","term","siteMapEntries","groups","firstLevelPath","FetchService","filteredNavigation","groupItems","group","__decorateClass","state","customElement","SidebarContact","contactHtml","parser","contactHtmlString","headline","nothing","text","contacts","contact","icon","markup","contactsElement","contactElement","unsafeHTML","SidebarPosts","posts","sitemapEntry","nextSitemapEntry","siteMapEntry","picture","createOptimizedPicture","SidebarFooter","response","responseMarkup","SidebarComponent","createRef","ref","addSidebarContainer","sidebarContainer","addInnerContainer","children","replaceBySpecifier","input","specifier","htmlTag","part","index","HeaderComponent","_changedProperties","leftCol","rightCol","logoText","logoTextHTML","m","ICONS_PATH","modules","Icon","iconMarkupFunc","iconMarkup","unsafeSVG","svg","until","css","property","READY_STATES","init","initHLXApp","readyState"],"sources":["../../src/utils/addClasses.ts","../../src/utils/getMetadata.ts","../../src/app/tasks/decorateTemplateAndTheme.ts","../../src/app/tasks/decorateButtons.ts","../../src/utils/undefinedOnEmpty.ts","../../src/app/tasks/setDocLanguage.ts","../../src/app/tasks/collectBlocks.ts","../../src/app/tasks/loadBlockModules.ts","../../src/app/tasks/loadCSS.ts","../../src/app/tasks/loadBlockStyles.ts","../../config.ts","../../src/app/tasks/showSection.ts","../../src/app/tasks/waitForLCP.ts","../../src/helpers/sidekick/getLocation.ts","../../src/app/tasks/loadFonts.ts","../../src/app/tasks/sampleRUM.ts","../../src/app/tasks/setupHlxObj.ts","../../src/app/tasks/initSampleRUM.ts","../../src/app/tasks/loadBlock.ts","../../src/app/tasks/loadBlocks.ts","../../src/app/tasks/decorateImages.ts","../../src/app/tasks/adjustMarkup.ts","../../src/utils/toCamelCase.ts","../../src/app/tasks/readBlockConfig.ts","../../src/app/tasks/processSectionMetaData.ts","../../src/app/tasks/transformSections.ts","../../src/app/tasks/decorateBlocks.ts","../../src/app/index.ts","../../node_modules/lit-html/directive-helpers.js","../../node_modules/lit-html/async-directive.js","../../node_modules/lit-html/directives/ref.js","../../src/components/sidebar/sidebarNav.ts","../../src/components/sidebar/sidebarContact.ts","../../src/components/sidebar/sidebarPosts.ts","../../src/components/sidebar/sidebarFooter.ts","../../src/components/sidebar/sidebar.ts","../../src/components/sidebar/sidebar.init.ts","../../src/components/innerContainer/innerContainer.ts","../../src/components/innerContainer/innerContainer.init.ts","../../src/utils/replaceBySpecifier.ts","../../src/components/header.ts","../../node_modules/lit-html/directives/unsafe-svg.js","../../node_modules/lit-html/directives/private-async-helpers.js","../../node_modules/lit-html/directives/until.js","../../src/constants/paths.ts","../../src/components/icon/icon.ts","../../src/app/init.ts","../../src/main.ts"],"sourcesContent":["import { toClassName } from './toClassName';\n\n/**\n * Adds CSS classes to an HTML element.\n *\n * @param {HTMLElement} element - The HTML element to which classes will be added.\n * @param {string} classes - A string containing CSS classes separated by commas.\n *\n * @example\n * const element = document.getElementById('myElement');\n * const classesToAdd = 'class1, class2, class3';\n * addClasses(element, classesToAdd);\n */\nexport const addClasses = (element: HTMLElement, classes: string): void => {\n classes.split(',').forEach((cssClass: string): void => {\n element.classList.add(toClassName(cssClass.trim()));\n });\n};\n","/**\n * Retrieves the content of a specified metadata tag from the document head.\n *\n * @param {string} value - The name or property attribute value of the metadata tag.\n * @param {Document} [doc=document] - The document to search for the metadata tag (default is the current document).\n * @returns {string} - The content of the metadata tag, if found; otherwise, an empty string.\n *\n * @example\n * Example 1:\n * Assuming exists in the document head.\n * const metaContent = getMetadata('description');\n * console.log(metaContent);\n * Output: 'This is a sample description.'\n *\n * @example\n * Example 2:\n * Assuming exists in the document head.\n * const metaContent = getMetadata('og:title', document);\n * console.log(metaContent);\n * Output: 'Open Graph Title'\n */\nexport function getMetadata(value: string, doc: Document = document): string {\n const attr: 'property' | 'name' = value && value.includes(':') ? 'property' : 'name';\n const metaTags: HTMLMetaElement[] =\n ([...doc.head.querySelectorAll(`meta[${attr}=\"${value}\"]`)] as HTMLMetaElement[]) || [];\n const meta: string = metaTags.map((metaElement: HTMLMetaElement) => metaElement.content).join(', ');\n return meta.length ? meta : '';\n}\n","import { addClasses } from '../../utils/addClasses';\nimport { getMetadata } from '../../utils/getMetadata';\n\n/**\n * Decorates the template and theme by adding classes to the body.\n * The classes are defined in the meta tags of the document.\n * Usefull for styling the page based on the template and theme meta tags\n * that can be set in the metadata table in EDS.\n * @example\n * \n * \n * @example\n * \n */\nexport function decorateTemplateAndTheme() {\n const template = getMetadata('template');\n if (template) addClasses(document.body, template);\n const theme = getMetadata('theme');\n if (theme) addClasses(document.body, theme);\n}\n","/**\n * Decorates paragraphs containing a single link as buttons.\n * @param {Element} element container element\n */\nexport function decorateButtons(element) {\n element.querySelectorAll('a').forEach((a) => {\n a.title = a.title || a.textContent;\n if (a.href !== a.textContent) {\n const up = a.parentElement;\n const twoup = a.parentElement.parentElement;\n if (!a.querySelector('img')) {\n if (up.childNodes.length === 1 && (up.tagName === 'P' || up.tagName === 'DIV')) {\n a.className = 'button'; // default\n up.classList.add('button-container');\n }\n if (\n up.childNodes.length === 1 &&\n up.tagName === 'STRONG' &&\n twoup.childNodes.length === 1 &&\n twoup.tagName === 'P'\n ) {\n a.className = 'button primary';\n twoup.classList.add('button-container');\n }\n if (\n up.childNodes.length === 1 &&\n up.tagName === 'EM' &&\n twoup.childNodes.length === 1 &&\n twoup.tagName === 'P'\n ) {\n a.className = 'button secondary';\n twoup.classList.add('button-container');\n }\n }\n }\n });\n}\n","/**\n * Returns undefined if the value is an empty string, otherwise returns the value itself.\n *\n * @param {string} value - The value to check.\n * @returns {string | undefined} - If the value is an empty string, returns undefined\n * otherwise, returns the value itself.\n *\n * @example\n * // Example usage:\n * const emptyValue = '';\n * const nonEmptyValue = 'Hello, World!';\n *\n * const result1 = undefinedOnEmpty(emptyValue);\n * console.log(result1); // Output: undefined\n *\n * const result2 = undefinedOnEmpty(nonEmptyValue);\n * console.log(result2); // Output: 'Hello, World!'\n */\nexport function undefinedOnEmpty(value: string): string | undefined {\n return value.trim() === '' ? undefined : value;\n}\n","import { getMetadata } from '../../utils/getMetadata';\nimport { undefinedOnEmpty } from '../../utils/undefinedOnEmpty';\n\n/*\n * This function sets the language of the document based on the language metadata.\n */\nexport function setDocLanguage() {\n const lang = getMetadata('language');\n document.documentElement.lang = undefinedOnEmpty(lang) || 'en';\n}\n","import { BlockMapping } from '../app.types';\n\n/**\n * Collect all blocks in a section.\n * @param section - The section to collect the blocks from.\n * @returns BlockMapping[]\n * @example\n * const blocks = collectBlocks(section);\n * console.log(blocks);\n * Output: [{ name: 'block1', element: HTMLElement }, { name: 'block2', element: HTMLElement }]\n */\nexport function collectBlocks(section: HTMLElement): BlockMapping[] {\n const blockMap: BlockMapping[] = [];\n const blocksElements = section.querySelectorAll('[data-block-name]');\n\n blocksElements.forEach((block: HTMLDivElement) => {\n blockMap.push({\n name: block.dataset['blockName'] as string,\n element: block,\n });\n });\n\n return blockMap;\n}\n","import { DebuggerService } from '@kluntje/services';\nimport { BlockMapping } from '../app.types';\nimport { getUrlForEndpoint } from '../utils/getUrlForEndpoint';\n\n/*\n * Load the es module for the block. The module should be named as the block name.\n * @param block - The block to load the module for.\n * @returns Promise\n */\nexport async function loadBlockModules(block: BlockMapping): Promise {\n const status = block.element.dataset.blockStatus;\n if (status !== 'loading' && status !== 'loaded') {\n try {\n block.element.dataset.blockStatus = 'loading';\n const { href } = getUrlForEndpoint(`dist/${block.name}/${block.name}.js`);\n const blockModule = await import(href);\n\n if (blockModule.default) {\n await blockModule.default(block.element);\n }\n\n block.element.dataset.blockStatus = 'loaded';\n } catch (error) {\n block.element.dataset.blockStatus = 'error';\n DebuggerService.error('laodBloackModules:', error);\n }\n }\n}\n","import { getUrlForEndpoint } from '../utils/getUrlForEndpoint';\n\n/**\n * Load a CSS file if it is not already loaded append it to the head.\n * @param endpoint - The endpoint of the CSS file.\n * @returns Promise\n */\nexport async function loadCSS(endpoint: string) {\n return new Promise((resolve, reject) => {\n const { href } = getUrlForEndpoint(endpoint);\n\n if (!document.querySelector(`head > link[href=\"${href}\"]`)) {\n const link = document.createElement('link');\n link.rel = 'stylesheet';\n link.href = href;\n link.onload = resolve;\n link.onerror = reject;\n document.head.append(link);\n } else {\n resolve(true);\n }\n });\n}\n","import { BlockMapping } from '../app.types';\nimport { loadCSS } from './loadCSS';\n\n/**\n * Load the block styles. The styles should be named as the block name.\n * @param block - The block to load the styles for.\n * @returns Promise\n */\nexport async function loadBlockStyles(block: BlockMapping) {\n try {\n await loadCSS(`dist/${block.name}/${block.name}.css`);\n } catch (error) {\n //do nothing\n }\n}\n","export interface Config {\n mainTsPath: string;\n mainScssPath: string;\n iconsDirPath: string;\n iconsTypesPath: string;\n fontsScssPath?: string;\n fontsCssPath?: string;\n lazyStylesScssPath?: string;\n lazyStylesCssPath?: string;\n sidekickLibraryStylesScssPath?: string;\n sidekickLibraryStylesCssPath?: string;\n lcpBlocks?: string[];\n}\n\nexport const config: Config = {\n mainTsPath: './src/main.ts',\n mainScssPath: './src/styles/sass/main.scss',\n iconsDirPath: './public/icons',\n iconsTypesPath: './src/types/icons.types.ts',\n fontsScssPath: './src/styles/sass/fonts.scss',\n fontsCssPath: './dist/fonts/fonts.css',\n lazyStylesScssPath: './src/styles/sass/lazy-styles.scss',\n lazyStylesCssPath: './dist/lazyStyles/lazyStyles.css',\n sidekickLibraryStylesScssPath: './src/styles/sass/sidekick-library-styles.scss',\n sidekickLibraryStylesCssPath: './dist/sidekickLibraryStyles/sidekickLibraryStyles.css',\n lcpBlocks: [],\n};\n","/**\n * Removes the display property from the section\n * @param section - The section to show\n */\nexport function showSection(section: HTMLElement) {\n section.style.removeProperty('display');\n}\n","import { collectBlocks } from './collectBlocks';\nimport { loadBlockModules } from './loadBlockModules';\nimport { loadBlockStyles } from './loadBlockStyles';\nimport { config } from '../../../config';\nimport { showSection } from './showSection';\nimport { LcpCandidate } from '../app.types';\n\n/**\n * Wait for the Largest Contentful Paint (LCP) candidate to be loaded.\n * This function will load the modules and styles for the first section after the LCP candidate.\n * @returns Promise\n */\nexport async function waitForLCP() {\n const firstSection: HTMLElement | null = document.querySelector('.section');\n const { lcpBlocks } = config;\n\n if (firstSection) {\n const blocks = collectBlocks(firstSection);\n const blockPromises = blocks.map(async (block) => {\n const hasLCPBlock = lcpBlocks?.includes(block.name);\n if (hasLCPBlock) await Promise.all([loadBlockModules(block), loadBlockStyles(block)]);\n });\n\n await Promise.all(blockPromises);\n showSection(firstSection);\n }\n\n // @ts-ignore\n document.body.style.display = null;\n const lcpCandidate = document.querySelector('main img');\n\n await new Promise((resolve) => {\n if (lcpCandidate && !lcpCandidate.complete) {\n lcpCandidate.setAttribute('loading', 'eager');\n lcpCandidate.setAttribute('fetchpriority', 'high');\n lcpCandidate.addEventListener('load', () => resolve());\n lcpCandidate.addEventListener('error', () => resolve());\n } else {\n resolve();\n }\n });\n}\n","import { isSidekickLibraryActive } from './isSidekickLibraryActive.ts';\n\n/**\n * Returns the true origin of the current page in the browser.\n * If the page is running in an iframe with srcdoc, the query param is returned.\n * @returns {String} The query param of the current page or the query param of the block running in the library\n *\n * @example\n * const searchParams = new URLSearchParams(getLocation().search);\n *\n * @remarks\n * Needs to be used when the Sidekick Library Plugin is in use.\n */\nexport function getLocation(): Location {\n return isSidekickLibraryActive() ? window.parent.location : window.location;\n}\n","import { getLocation } from 'Helpers/sidekick/getLocation';\nimport { loadCSS } from './loadCSS';\nimport { config } from '../../../config';\n\nexport async function loadFonts(): Promise {\n const { fontsCssPath } = config;\n if (!fontsCssPath) return;\n await loadCSS(fontsCssPath);\n try {\n if (!getLocation().hostname.includes('localhost')) sessionStorage.setItem('fonts-loaded', 'true');\n } catch (e) {\n console.error('Error setting fonts-loaded in session storage', e);\n // do nothing\n }\n}\n","/**\n * log RUM if part of the sample.\n * @param {string} checkpoint identifies the checkpoint in funnel\n * @param {Object} data additional data for RUM sample\n * @param {string} data.source DOM node that is the source of a checkpoint event,\n * identified by #id or .classname\n * @param {string} data.target subject of the checkpoint event,\n * for instance the href of a link, or a search term\n */\n\nexport function sampleRUM(checkpoint, data = {}) {\n // @ts-ignore\n sampleRUM.defer = sampleRUM.defer || [];\n const defer = (fnname) => {\n // @ts-ignore\n sampleRUM[fnname] = sampleRUM[fnname] || ((...args) => sampleRUM.defer.push({ fnname, args }));\n };\n // @ts-ignore\n sampleRUM.drain =\n // @ts-ignore\n sampleRUM.drain ||\n ((dfnname, fn) => {\n sampleRUM[dfnname] = fn;\n // @ts-ignore\n sampleRUM.defer\n .filter(({ fnname }) => dfnname === fnname)\n .forEach(({ fnname, args }) => sampleRUM[fnname](...args));\n });\n // @ts-ignore\n sampleRUM.always = sampleRUM.always || [];\n // @ts-ignore\n sampleRUM.always.on = (chkpnt, fn) => {\n // @ts-ignore\n sampleRUM.always[chkpnt] = fn;\n };\n // @ts-ignore\n sampleRUM.on = (chkpnt, fn) => {\n // @ts-ignore\n sampleRUM.cases[chkpnt] = fn;\n };\n defer('observe');\n defer('cwv');\n try {\n window.hlx = window.hlx || {};\n // @ts-ignore\n if (!window.hlx.rum) {\n const usp = new URLSearchParams(window.location.search);\n const weight = usp.get('rum') === 'on' ? 1 : 100; // with parameter, weight is 1. Defaults to 100.\n const id = Array.from({ length: 75 }, (_, i) => String.fromCharCode(48 + i))\n .filter((a) => /\\d|[A-Z]/i.test(a))\n .filter(() => Math.random() * 75 > 70)\n .join('');\n const random = Math.random();\n const isSelected = random * weight < 1;\n const firstReadTime = Date.now();\n const urlSanitizers = {\n full: () => window.location.href,\n origin: () => window.location.origin,\n path: () => window.location.href.replace(/\\?.*$/, ''),\n };\n // @ts-ignore\n window.hlx.rum = {\n weight,\n id,\n random,\n isSelected,\n firstReadTime,\n sampleRUM,\n sanitizeURL: urlSanitizers[window.hlx.RUM_MASK_URL || 'path'],\n };\n }\n // @ts-ignore\n const { weight, id, firstReadTime } = window.hlx.rum;\n // @ts-ignore\n if (window.hlx && window.hlx.rum && window.hlx.rum.isSelected) {\n const knownProperties = [\n 'weight',\n 'id',\n 'referer',\n 'checkpoint',\n 't',\n 'source',\n 'target',\n 'cwv',\n 'CLS',\n 'FID',\n 'LCP',\n 'INP',\n ];\n const sendPing = (pdata = data) => {\n const body = JSON.stringify(\n {\n weight,\n id,\n // @ts-ignore\n referer: window.hlx.rum.sanitizeURL(),\n checkpoint,\n t: Date.now() - firstReadTime,\n ...data,\n },\n knownProperties\n );\n const url = `https://rum.hlx.page/.rum/${weight}`;\n navigator.sendBeacon(url, body);\n // eslint-disable-next-line no-console\n console.debug(`ping:${checkpoint}`, pdata);\n };\n // @ts-ignore\n sampleRUM.cases = sampleRUM.cases || {\n // @ts-ignore\n cwv: () => sampleRUM.cwv(data) || true,\n lazy: () => {\n // use classic script to avoid CORS issues\n const script = document.createElement('script');\n script.src = 'https://rum.hlx.page/.rum/@adobe/helix-rum-enhancer@^1/src/index.js';\n document.head.appendChild(script);\n return true;\n },\n };\n sendPing(data);\n // @ts-ignore\n if (sampleRUM.cases[checkpoint]) {\n // @ts-ignore\n sampleRUM.cases[checkpoint]();\n }\n }\n // @ts-ignore\n if (sampleRUM.always[checkpoint]) {\n // @ts-ignore\n sampleRUM.always[checkpoint](data);\n }\n } catch (error) {\n // something went wrong\n }\n}\n","export default function setupHlxObj(mainScriptPath: string = '/dist/main/main.js') {\n window.hlx = window.hlx || {};\n window.hlx.RUM_MASK_URL = 'full';\n window.hlx.codeBasePath = '';\n window.hlx.lighthouse = new URLSearchParams(window.location.search).get('lighthouse') === 'on';\n\n const scriptEl = document.querySelector(`script[src$=\"${mainScriptPath}\"]`) as HTMLScriptElement;\n if (scriptEl) {\n try {\n [window.hlx.codeBasePath] = new URL(scriptEl.src).pathname.split(mainScriptPath);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.log('setupHlxObj', error);\n }\n }\n}\n","import { sampleRUM } from './sampleRUM';\nimport setupHlxObj from './setupHlxObj';\n\nexport function initSampleRUM() {\n setupHlxObj();\n sampleRUM('top');\n\n window.addEventListener('load', () => sampleRUM('load'));\n\n window.addEventListener('unhandledrejection', (event) => {\n sampleRUM('error', { source: event.reason.sourceURL, target: event.reason.line });\n });\n\n window.addEventListener('error', (event) => {\n sampleRUM('error', { source: event.filename, target: event.lineno });\n });\n}\n","import { BlockMapping } from '../app.types';\nimport { collectBlocks } from './collectBlocks';\nimport { loadBlockModules } from './loadBlockModules';\nimport { loadBlockStyles } from './loadBlockStyles';\nimport { showSection } from './showSection';\n\n/**\n * Load the block modules and styles for a section and show the section.\n * @param section - The section to load the block modules and styles for.\n * @returns Promise\n */\nexport async function loadBlock(section: HTMLElement) {\n const sectionsBlocks: BlockMapping[] = collectBlocks(section);\n\n if (!sectionsBlocks.length) {\n showSection(section);\n return;\n }\n\n for (const block of sectionsBlocks) {\n Promise.all([loadBlockModules(block), loadBlockStyles(block)]);\n }\n\n showSection(section);\n}\n","import { loadBlock } from './loadBlock';\n\n/**\n * Loads Blocks\n * by getting all sections and load every block in every section\n * and shows every section that is finished loading.\n */\nexport async function loadBlocks() {\n const sections = [...document.querySelectorAll('.section')];\n const SectionsPromises = sections.map((section) => loadBlock(section));\n\n await Promise.all(SectionsPromises);\n}\n","/*\n * This function is used to decorate images in the default content.\n * It adds the class 'image' and 'main' to the parent element of the image.\n */\nexport function decorateImages() {\n const picture = document.querySelectorAll('.default-content-wrapper picture');\n picture.forEach((item) => {\n const parentElement = item.parentElement;\n if (parentElement) {\n parentElement.classList.add('image', 'main');\n }\n });\n}\n","import { decorateImages } from './decorateImages';\n\n/**\n * This function is used to adjust the markup of a section.\n * It wraps the default content in a div with the class 'default-content-wrapper'.\n * It also adds the class 'section' to the section element.\n * It decorates the images in the default content by calling the 'decorateImages' function.\n * It sets the 'data-section-status' attribute to 'initialized'.\n * It hides the section element.\n * @param section - The section element to adjust.\n */\nexport function adjustMarkup(section: HTMLDivElement) {\n const wrappers: HTMLDivElement[] = [];\n let defaultContent = false;\n [...section.children].forEach((e) => {\n if (e.tagName === 'DIV' || !defaultContent) {\n const wrapper = document.createElement('div');\n wrappers.push(wrapper);\n defaultContent = e.tagName !== 'DIV';\n\n if (defaultContent) {\n wrapper.classList.add('default-content-wrapper');\n }\n }\n wrappers[wrappers.length - 1].append(e);\n });\n wrappers.forEach((wrapper) => section.append(wrapper));\n decorateImages();\n section.classList.add('section');\n section.dataset.sectionStatus = 'initialized';\n section.style.display = 'none';\n}\n","import { toClassName } from './toClassName';\n\n/**\n * Sanitizes a string for use as a JavaScript property name.\n *\n * @param {string} name - The unsanitized string.\n * @returns {string} - The camelCased name.\n *\n * @example\n * // Example usage:\n * const unsanitizedString = 'background-color';\n * const camelCasedName = toCamelCase(unsanitizedString);\n * console.log(camelCasedName); // Output: 'backgroundColor'\n */\nexport function toCamelCase(name: string): string {\n if (/^[a-z][A-Za-z0-9]*$/.test(name)) {\n return name;\n }\n\n if (/^[A-Z][A-Za-z0-9]*$/.test(name)) {\n return name.charAt(0).toLowerCase() + name.slice(1);\n }\n\n return toClassName(name).replace(/-([a-z])/g, (g: string) => g[1].toUpperCase());\n}\n","import { toClassName } from 'Utils/toClassName';\n\n/*\n This function reads the configuration of a block from the HTML file\n and returns it as a Record object.\n @param {Element} block The block element\n*/\nexport function readBlockConfig(block: Element): Record {\n const config: Record = {};\n block.querySelectorAll(':scope > div').forEach((row) => {\n if (row.children) {\n const cols = [...row.children];\n if (cols[1]) {\n const col = cols[1];\n const name = toClassName(cols[0].textContent ?? '');\n let value: any = '';\n if (col.querySelector('a')) {\n const as = [...col.querySelectorAll('a')];\n if (as.length === 1) {\n value = as[0].href;\n } else {\n value = as.map((a) => a.href);\n }\n } else if (col.querySelector('img')) {\n const imgs = [...col.querySelectorAll('img')];\n if (imgs.length === 1) {\n value = imgs[0].src;\n } else {\n value = imgs.map((img) => img.src);\n }\n } else if (col.querySelector('p')) {\n const ps = [...col.querySelectorAll('p')];\n if (ps.length === 1) {\n value = ps[0].textContent;\n } else {\n value = ps.map((p) => p.textContent);\n }\n } else value = row.children[1].textContent;\n config[name] = value;\n }\n }\n });\n return config;\n}\n","import { toCamelCase } from 'Utils/toCamelCase';\nimport { toClassName } from 'Utils/toClassName';\nimport { readBlockConfig } from './readBlockConfig';\n\n/*\n This function processes the metadata of a section and applies it to the section element.\n @param {HTMLElement} section The section element\n*/\nexport function processSectionMetaData(section: HTMLElement) {\n const sectionMeta = section.querySelector('div.section-metadata');\n if (sectionMeta) {\n const meta = readBlockConfig(sectionMeta);\n Object.keys(meta).forEach((key) => {\n if (key === 'style') {\n const styles = meta.style\n .split(',')\n .filter((style: string) => style)\n .map((style: string) => toClassName(style.trim()));\n styles.forEach((style: string) => section.classList.add(style));\n } else {\n section.dataset[toCamelCase(key)] = meta[key];\n }\n });\n if (sectionMeta.parentElement) sectionMeta.parentElement.remove();\n }\n}\n","import { adjustMarkup } from './adjustMarkup';\nimport { processSectionMetaData } from './processSectionMetaData';\n\n/**\n * This function is used to transform the sections of the main element.\n * It adjusts the markup of each section by calling the 'adjustMarkup' function.\n * It processes the metadata of each section by calling the 'processSectionMetaData' function.\n * @param main - The main element to transform.\n */\nexport function transformSection(main: HTMLElement) {\n main.querySelectorAll(':scope > div').forEach((section) => {\n adjustMarkup(section);\n processSectionMetaData(section);\n });\n}\n","/**\n * Decorate blocks with classes and data attributes.\n * @param main - Html main element\n */\nexport function decorateBlocks(main: HTMLElement) {\n main.querySelectorAll('div.section > div > div').forEach((block) => {\n const shortBlockName = block.classList[0];\n if (shortBlockName) {\n block.classList.add('block');\n block.dataset.blockName = shortBlockName;\n const blockWrapper = block.parentElement;\n blockWrapper?.classList.add(`${shortBlockName}-wrapper`);\n const section = block.closest('.section');\n if (section) section.classList.add(`${shortBlockName}-container`);\n }\n });\n}\n","import { decorateTemplateAndTheme } from './tasks/decorateTemplateAndTheme';\nimport { decorateButtons } from './tasks/decorateButtons';\nimport { setDocLanguage } from './tasks/setDocLanguage';\nimport { waitForLCP } from './tasks/waitForLCP';\nimport { loadFonts } from './tasks/loadFonts';\nimport { initSampleRUM } from './tasks/initSampleRUM';\nimport { DebuggerService } from '@kluntje/services';\nimport { loadCSS } from './tasks/loadCSS';\nimport { isSidekickLibraryActive } from 'Helpers/sidekick/isSidekickLibraryActive';\nimport { config } from '../../config';\nimport { loadBlocks } from './tasks/loadBlocks';\nimport { transformSection } from './tasks/transformSections';\nimport { decorateBlocks } from './tasks/decorateBlocks';\nimport { sampleRUM } from './tasks/sampleRUM';\n\nclass HLX {\n private beforeEagerCallbacks: Array<() => Promise> = [];\n private loadEagerCallbacks: Array<() => Promise> = [];\n private beforeLoadLazyCallbacks: Array<() => Promise> = [];\n private loadLazyCallbacks: Array<() => Promise> = [];\n private beforeLoadDelayedCallbacks: Array<() => Promise> = [];\n private loadDelayedCallbacks: Array<() => Promise> = [];\n private initializedCallbacks: Array<() => Promise> = [];\n\n private beforeEagerPromise?: Promise;\n private eagerPromise?: Promise;\n private beforeLazyPromise?: Promise;\n private lazyPromise?: Promise;\n private beforeDelayedPromise?: Promise;\n private delayedPromise?: Promise;\n private initializedPromise?: Promise;\n\n private get beforeEager() {\n if (this.beforeEagerPromise === undefined) {\n this.beforeEagerPromise = this.beforeLoadEager();\n }\n return this.beforeEagerPromise;\n }\n\n private get loadEager() {\n if (this.eagerPromise === undefined) {\n this.eagerPromise = this.loadEagerPromise();\n }\n return this.eagerPromise;\n }\n\n private get beforeLoadLazy() {\n if (this.beforeLazyPromise === undefined) {\n this.beforeLazyPromise = this.beforeLoadLazyPromise();\n }\n return this.beforeLazyPromise;\n }\n\n private get loadLazy() {\n if (this.lazyPromise === undefined) {\n this.lazyPromise = this.loadLazyPromise();\n }\n return this.lazyPromise;\n }\n\n private get beforeLoadDelayed() {\n if (this.beforeDelayedPromise === undefined) {\n this.beforeDelayedPromise = this.beforeLoadDelayedPromise();\n }\n return this.beforeDelayedPromise;\n }\n\n private get loadDelayed() {\n if (this.delayedPromise === undefined) {\n this.delayedPromise = this.loadDelayedPromise();\n }\n return this.delayedPromise;\n }\n\n private get initialized() {\n if (this.initializedPromise === undefined) {\n this.initializedPromise = this.getInitializedPromise();\n }\n return this.initializedPromise;\n }\n\n public addBeforeEagerTask(cb: () => Promise) {\n this.beforeEagerCallbacks.push(cb);\n }\n\n public addLoadEagerTask(cb: () => Promise) {\n this.loadEagerCallbacks.push(cb);\n }\n\n public addBeforeLoadLazyTask(cb: () => Promise) {\n this.beforeLoadLazyCallbacks.push(cb);\n }\n\n public addLoadLazyTask(cb: () => Promise) {\n this.loadLazyCallbacks.push(cb);\n }\n\n public addBeforeLoadDelayedTask(cb: () => Promise) {\n this.beforeLoadDelayedCallbacks.push(cb);\n }\n\n public addLoadDelayedTask(cb: () => Promise) {\n this.loadDelayedCallbacks.push(cb);\n }\n\n public addInitializedTask(cb: () => Promise) {\n this.initializedCallbacks.push(cb);\n }\n\n public async init() {\n await this.beforeEager;\n await this.loadEager;\n await this.beforeLoadLazy;\n await this.loadLazy;\n await this.beforeLoadDelayed;\n await this.loadDelayed;\n await this.initialized;\n }\n\n private async beforeLoadEager(): Promise {\n const beforeLoadEagerTask: Promise = new Promise((resolve) => {\n initSampleRUM();\n decorateTemplateAndTheme();\n setDocLanguage();\n resolve();\n });\n\n await Promise.all([...this.beforeEagerCallbacks.map((cb) => cb()), beforeLoadEagerTask]);\n }\n\n private async loadEagerPromise(): Promise {\n const loadEagerTask: Promise = new Promise(async (resolve) => {\n const main = document.querySelector('main') as HTMLElement;\n decorateButtons(main);\n transformSection(main);\n decorateBlocks(main);\n setTimeout(() => {\n document.body.classList.add('show');\n resolve();\n }, 100);\n\n await waitForLCP();\n\n try {\n /* if desktop (proxy for fast connection) or fonts already loaded, load fonts.css */\n if (window.innerWidth >= 900 || sessionStorage.getItem('fonts-loaded')) {\n await loadFonts();\n }\n } catch (e) {\n // do nothing\n }\n });\n\n await Promise.all([...this.loadEagerCallbacks.map((cb) => cb()), loadEagerTask]);\n }\n\n private async beforeLoadLazyPromise(): Promise {\n const beforeLoadLazyTask: Promise = new Promise((resolve) => resolve());\n\n await Promise.all([...this.beforeLoadLazyCallbacks.map((cb) => cb()), beforeLoadLazyTask]);\n }\n\n private async loadLazyPromise(): Promise {\n const loadLazyTask: Promise = new Promise(async (resolve) => {\n try {\n const {\n lazyStylesScssPath,\n sidekickLibraryStylesScssPath,\n fontsScssPath,\n lazyStylesCssPath,\n sidekickLibraryStylesCssPath,\n } = config;\n\n await loadBlocks();\n\n const { hash } = window.location;\n const element = hash ? document.getElementById(hash.substring(1)) : false;\n if (hash && element) element.scrollIntoView();\n\n if (lazyStylesScssPath && lazyStylesCssPath) await loadCSS(lazyStylesCssPath);\n if (sidekickLibraryStylesScssPath && sidekickLibraryStylesCssPath && isSidekickLibraryActive()) {\n await loadCSS(sidekickLibraryStylesCssPath);\n }\n if (fontsScssPath) await loadFonts();\n sampleRUM('lazy');\n const main = document.querySelector('main') as HTMLElement;\n // @ts-ignore\n sampleRUM.observe(main.querySelectorAll('div[data-block-name]'));\n // @ts-ignore\n sampleRUM.observe(main.querySelectorAll('picture > img'));\n } catch (error) {\n DebuggerService.error('Load lazy Task: ', error);\n }\n resolve();\n });\n\n await Promise.all([...this.loadLazyCallbacks.map((cb) => cb()), loadLazyTask]);\n }\n\n private async beforeLoadDelayedPromise(): Promise {\n const beforeLoadDelayedTask: Promise = new Promise((resolve) => resolve());\n\n await Promise.all([...this.beforeLoadDelayedCallbacks.map((cb) => cb()), beforeLoadDelayedTask]);\n }\n\n private async loadDelayedPromise(): Promise {\n const loadDelayedTask: Promise = new Promise((resolve) => {\n setTimeout(() => {\n resolve();\n }, 3000);\n });\n\n await Promise.all([...this.loadDelayedCallbacks.map((cb) => cb()), loadDelayedTask]);\n }\n\n private async getInitializedPromise(): Promise {\n const initializedTask: Promise = new Promise((resolve) => resolve());\n\n await Promise.all([...this.initializedCallbacks.map((cb) => cb()), initializedTask]);\n }\n}\n\nexport default new HLX();\n","import{_$LH as o}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{I:t}=o,i=o=>null===o||\"object\"!=typeof o&&\"function\"!=typeof o,n={HTML:1,SVG:2},e=(o,t)=>void 0===t?void 0!==o?._$litType$:o?._$litType$===t,l=o=>null!=o?._$litType$?.h,c=o=>void 0!==o?._$litDirective$,d=o=>o?._$litDirective$,f=o=>void 0===o.strings,s=()=>document.createComment(\"\"),r=(o,i,n)=>{const e=o._$AA.parentNode,l=void 0===i?o._$AB:i._$AA;if(void 0===n){const i=e.insertBefore(s(),l),c=e.insertBefore(s(),l);n=new t(i,c,o,o.options)}else{const t=n._$AB.nextSibling,i=n._$AM,c=i!==o;if(c){let t;n._$AQ?.(o),n._$AM=o,void 0!==n._$AP&&(t=o._$AU)!==i._$AU&&n._$AP(t)}if(t!==l||c){let o=n._$AA;for(;o!==t;){const t=o.nextSibling;e.insertBefore(o,l),o=t}}}return n},v=(o,t,i=o)=>(o._$AI(t,i),o),u={},m=(o,t=u)=>o._$AH=t,p=o=>o._$AH,h=o=>{o._$AP?.(!1,!0);let t=o._$AA;const i=o._$AB.nextSibling;for(;t!==i;){const o=t.nextSibling;t.remove(),t=o}},j=o=>{o._$AR()};export{n as TemplateResultType,j as clearPart,p as getCommittedValue,d as getDirectiveClass,r as insertPart,l as isCompiledTemplateResult,c as isDirectiveResult,i as isPrimitive,f as isSingleExpression,e as isTemplateResult,h as removePart,v as setChildPartValue,m as setCommittedValue};\n//# sourceMappingURL=directive-helpers.js.map\n","import{isSingleExpression as i}from\"./directive-helpers.js\";import{Directive as t,PartType as e}from\"./directive.js\";export{Directive,PartType,directive}from\"./directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=(i,t)=>{const e=i._$AN;if(void 0===e)return!1;for(const i of e)i._$AO?.(t,!1),s(i,t);return!0},o=i=>{let t,e;do{if(void 0===(t=i._$AM))break;e=t._$AN,e.delete(i),i=t}while(0===e?.size)},r=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),c(t)}};function h(i){void 0!==this._$AN?(o(this),this._$AM=i,r(this)):this._$AM=i}function n(i,t=!1,e=0){const r=this._$AH,h=this._$AN;if(void 0!==h&&0!==h.size)if(t)if(Array.isArray(r))for(let i=e;i{i.type==e.CHILD&&(i._$AP??=n,i._$AQ??=h)};class f extends t{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,e){super._$AT(i,t,e),r(this),this.isConnected=i._$AU}_$AO(i,t=!0){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(s(this,i),o(this))}setValue(t){if(i(this._$Ct))this._$Ct._$AI(t,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}}export{f as AsyncDirective};\n//# sourceMappingURL=async-directive.js.map\n","import{nothing as t}from\"../lit-html.js\";import{AsyncDirective as i}from\"../async-directive.js\";import{directive as s}from\"../directive.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=()=>new h;class h{}const o=new WeakMap,n=s(class extends i{render(i){return t}update(i,[s]){const e=s!==this.Y;return e&&void 0!==this.Y&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=s,this.ht=i.options?.host,this.rt(this.ct=i.element)),t}rt(t){if(\"function\"==typeof this.Y){const i=this.ht??globalThis;let s=o.get(i);void 0===s&&(s=new WeakMap,o.set(i,s)),void 0!==s.get(this.Y)&&this.Y.call(this.ht,void 0),s.set(this.Y,t),void 0!==t&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){return\"function\"==typeof this.Y?o.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});export{e as createRef,n as ref};\n//# sourceMappingURL=ref.js.map\n","import { html, LitElement } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\n\nimport FetchService from 'Services/fetch.service.ts';\nimport { renderIcon } from '../icon/icon.template.ts';\nimport { DebuggerService } from '@kluntje/services';\nimport PlaceholderService from 'Services/placeholder.service.ts';\nimport { SiteMapEntry } from 'Types/siteMap.types.ts';\nimport { SheetsResponse } from 'Types/sheetResponse.types.ts';\n\ninterface SubMenuItem {\n path: string;\n navtitle: string;\n}\n\ninterface MenuItem {\n path: string;\n error?: string;\n navtitle: string;\n children?: SubMenuItem[];\n}\n\n@customElement('sidebar-nav')\nexport class SidebarNav extends LitElement {\n @state()\n items: MenuItem[];\n\n @state()\n error: string | null = null;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n async firstUpdated() {\n this.items = await this.groupByFirstLevelPath();\n }\n\n async getPlaceholder(key: string): Promise {\n const placeholder = await PlaceholderService.getPlaceHolder(key);\n return placeholder;\n }\n\n render() {\n if (this.error) {\n return html`
    ${this.error}
    `;\n }\n if (!this.items) return;\n\n return html` `;\n }\n\n private toggleSubmenu({ currentTarget }: Event) {\n if (!(currentTarget instanceof HTMLElement) || !currentTarget.classList.contains('opener')) return;\n currentTarget.classList.toggle('active');\n }\n\n private renderSubMenu(item) {\n return html`\n ${item.navtitle} \n ${renderIcon('chevron-down', 'submenu__icon')}\n \n `;\n }\n\n private renderMenuItem(item: MenuItem) {\n if (item.error) {\n return html`

    ${item.error}

    `;\n } else {\n return html`
  • \n ${item.children !== undefined ? this.renderSubMenu(item) : html`${item.navtitle}`}\n
  • `;\n }\n }\n\n private renderMenuItems() {\n return html`
      \n ${this.items.map((item: MenuItem) => this.renderMenuItem(item))}\n
    `;\n }\n\n private getSubmenuName = (entry: MenuItem) => {\n return entry.path.split('/')[1];\n };\n\n private getNavTitle(item: MenuItem | SiteMapEntry) {\n if (item.path === '/') return 'Homepage';\n return item['navtitle'] || item['title'];\n }\n\n private filterNavigation(queryIndex: SiteMapEntry[], filterValues: string[]): MenuItem[] {\n return queryIndex\n .filter((item) => filterValues.every((term) => !item.path.includes(term)))\n .map((item) => ({\n path: item.path,\n navtitle: this.getNavTitle(item),\n }));\n }\n\n private groupItemsByFirstLevelPath(siteMapEntries: MenuItem[]): Record {\n const groups = {};\n siteMapEntries.forEach((item) => {\n const firstLevelPath = this.getSubmenuName(item); // Extracting the first level of the path\n if (!groups[firstLevelPath]) {\n groups[firstLevelPath] = [];\n }\n groups[firstLevelPath].push({\n path: item.path,\n navtitle: this.getNavTitle(item),\n });\n });\n return groups;\n }\n\n private async groupByFirstLevelPath() {\n const endpoint = '/query-index.json';\n const filterValues: string[] = ['sidekick', 'sidekick-library', 'tools', 'development', 'dev-', '__'];\n\n try {\n const queryIndex = await FetchService.fetchJson>(endpoint);\n\n this.error = null;\n\n const filteredNavigation = this.filterNavigation(queryIndex.data, filterValues);\n const groupItems = this.groupItemsByFirstLevelPath(filteredNavigation);\n const groupedData = Object.values(groupItems);\n\n return groupedData.map((group: MenuItem[]) => {\n if (group.length === 1) {\n return group[0];\n }\n\n return {\n navtitle: group[0].path.split('/')[1],\n path: group[0].path,\n children: group,\n };\n });\n } catch (error) {\n DebuggerService.error(`SidebarNav Component: Error while fetching ${endpoint}`, error);\n this.error = await PlaceholderService.getPlaceHolder('error');\n return [];\n }\n }\n}\n","import { html, LitElement, nothing } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js';\nimport FetchService from '../../services/fetch.service.ts';\nimport { renderIcon } from '../icon/icon.template.ts';\nimport { DebuggerService } from '@kluntje/services';\nimport PlaceholderService from '../../services/placeholder.service.ts';\nimport { IconName } from 'Types/icons.types.ts';\n\ninterface SidebarContactTemplateArgs {\n headline: HTMLElement | null;\n text: HTMLElement | null;\n contacts: Contact[];\n}\n\ninterface Contact {\n icon: HTMLElement | null;\n markup: HTMLElement | null;\n}\n\n@customElement('sidebar-contact')\nexport class SidebarContact extends LitElement {\n @state()\n contactTemplateArgs: SidebarContactTemplateArgs;\n\n @state()\n error: string | null = null;\n\n async connectedCallback() {\n super.connectedCallback();\n const contactHtml = await this.fetchContactsHtml();\n if (contactHtml !== null) this.getContactTemplateArgs(contactHtml);\n }\n\n async fetchContactsHtml() {\n const parser = new DOMParser();\n const endpoint = 'contact.plain.html';\n\n try {\n const contactHtmlString = await FetchService.fetchText(endpoint, {\n cacheOptions: { cacheType: 'runtime' },\n });\n this.error = null;\n return parser.parseFromString(contactHtmlString, 'text/html');\n } catch (error) {\n DebuggerService.error(`SidebarContacts Component: Error while fetching ${endpoint}`, error);\n this.error = await PlaceholderService.getPlaceHolder('error');\n\n return null;\n }\n }\n\n renderHeader(headline: HTMLElement | null) {\n if (!headline) return nothing;\n return html`
    \n

    ${headline}

    \n
    `;\n }\n\n renderText(text: HTMLElement | null) {\n if (!text) return nothing;\n return html`

    ${text}

    `;\n }\n\n render() {\n if (this.error) {\n return html`
    ${this.error}
    `;\n }\n\n if (!this.contactTemplateArgs) return nothing;\n\n const { headline, text, contacts } = this.contactTemplateArgs;\n\n return html`\n
    ${this.renderHeader(headline)} ${this.renderText(text)} ${this.renderContacts(contacts)}
    \n `;\n }\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n private renderContact(contact: Contact) {\n const { icon, markup } = contact;\n if (!icon && !markup) return nothing;\n\n return html`
  • ${this.renderIcon(icon)} ${this.renderContactMarkup(markup)}
  • `;\n }\n\n private getContactsArgs(contactHtml: Document): Contact[] {\n const contactsElement = contactHtml.querySelectorAll('.contact > div:not(:first-child)');\n const contactsArray = Array.from(contactsElement);\n\n return contactsArray.map((contactElement) => {\n return {\n icon: contactElement.querySelector('div'),\n markup: contactElement.querySelector('div:last-child'),\n };\n });\n }\n\n private getContactTemplateArgs(contactHtml: Document) {\n const headline = contactHtml.querySelector('h2');\n const text = contactHtml.querySelector('p');\n const contacts = this.getContactsArgs(contactHtml);\n\n this.contactTemplateArgs = {\n headline,\n text,\n contacts,\n };\n }\n\n private renderContacts(contacts: Contact[]) {\n if (contacts.length === 0) return nothing;\n return html`
      \n ${contacts.map((contact) => this.renderContact(contact))}\n
    `;\n }\n\n private renderIcon(icon: HTMLElement | null) {\n if (!icon) return nothing;\n return renderIcon(icon.innerHTML as IconName);\n }\n\n private renderContactMarkup(markup: HTMLElement | null) {\n if (!markup) return nothing;\n return unsafeHTML(markup.innerHTML);\n }\n}\n","import { html, LitElement, nothing } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport { createOptimizedPicture } from 'Utils/createOptimizedPicture.ts';\nimport FetchService from 'Services/fetch.service.ts';\nimport { DebuggerService } from '@kluntje/services';\nimport PlaceholderService from 'Services/placeholder.service.ts';\nimport { Sitemap, SiteMapEntry } from 'Types/siteMap.types.ts';\nimport { SheetsResponse } from 'Types/sheetResponse.types.ts';\n\n@customElement('sidebar-posts')\nexport class SidebarPosts extends LitElement {\n @state()\n private lastTreePosts: Sitemap;\n\n @state()\n error: string | null = null;\n\n @state()\n private noPostsPlaceholder: string;\n\n async connectedCallback() {\n super.connectedCallback();\n const posts = await this.getPosts();\n this.lastTreePosts = this.getLastThreePosts(posts);\n this.noPostsPlaceholder = await PlaceholderService.getPlaceHolder('no posts');\n }\n\n render() {\n if (!this.lastTreePosts) return;\n\n return html` ${this.renderHeader()} ${this.renderPosts()} `;\n\n //TODO: Add overview if more button is needed\n /*\n \n */\n }\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n private getLastThreePosts(posts: Sitemap) {\n posts.sort((sitemapEntry: SiteMapEntry, nextSitemapEntry: SiteMapEntry) => {\n if (sitemapEntry.lastModified > nextSitemapEntry.lastModified) {\n return -1;\n } else if (sitemapEntry.lastModified < nextSitemapEntry.lastModified) {\n return 1;\n }\n\n return 0;\n });\n\n return posts.slice(0, 3);\n }\n\n private renderPicture(siteMapEntry: SiteMapEntry) {\n const picture = createOptimizedPicture({\n src: siteMapEntry.image,\n alt: siteMapEntry.imagealt,\n width: 336,\n height: 224,\n });\n if (!picture) return nothing;\n return html`${picture}`;\n }\n\n private renderPost(siteMapEntry: SiteMapEntry) {\n return html`
    \n ${this.renderPicture(siteMapEntry)}\n

    ${siteMapEntry.description}

    \n
    `;\n }\n\n private async getPosts() {\n const endpoint = '/query-index.json';\n\n try {\n this.error = null;\n const queryIndex = await FetchService.fetchJson>(endpoint);\n return queryIndex.data.filter((item) => item.path.startsWith('/posts'));\n } catch (error) {\n DebuggerService.error(`SidebarPost Component: Error while fetching ${endpoint}`, error);\n this.error = await PlaceholderService.getPlaceHolder('error');\n return [];\n }\n }\n\n private renderPosts() {\n if (this.error) return html`
    ${this.error}
    `;\n if (this.lastTreePosts.length === 0) return html`
    ${this.noPostsPlaceholder}
    `;\n\n return html`
    \n ${this.lastTreePosts.map((siteMapEntry) => this.renderPost(siteMapEntry))}\n
    `;\n }\n\n private renderHeader() {\n return html`
    \n

    Newest Posts

    \n
    `;\n }\n}\n","import { html, LitElement } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport FetchService from '../../services/fetch.service.ts';\nimport { DebuggerService } from '@kluntje/services';\nimport PlaceholderService from '../../services/placeholder.service.ts';\n\n@customElement('sidebar-footer')\nexport class SidebarFooter extends LitElement {\n @state()\n footerMarkup: HTMLParagraphElement | null;\n\n @state()\n error: string | null = null;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.fetchFooterData();\n }\n\n async fetchFooterData() {\n const endpoint = 'footer.plain.html';\n\n try {\n const response = await FetchService.fetchText(endpoint, {\n cacheOptions: { cacheType: 'runtime' },\n });\n this.error = null;\n const responseMarkup = document.createElement('div');\n responseMarkup.innerHTML = response;\n this.footerMarkup = responseMarkup.querySelector('p');\n if (this.footerMarkup) this.footerMarkup.classList.add('copyright');\n } catch (error) {\n DebuggerService.error(`SidebarFooter Component: Error while fetching ${endpoint}`, error);\n this.error = await PlaceholderService.getPlaceHolder('error');\n }\n }\n\n render() {\n if (this.error) {\n return html`
    ${this.error}
    `;\n }\n if (!this.footerMarkup) return;\n return html`${this.footerMarkup}`;\n }\n}\n","/**\n * @module SidebarComponent\n * @copyright diva-e (https://diva-e.com)\n */\n\nimport { html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { createRef, Ref, ref } from 'lit/directives/ref.js';\n\nimport './sidebarNav.ts';\nimport './sidebarContact.ts';\nimport './sidebarPosts.ts';\nimport './sidebarFooter.ts';\n\nimport { renderIcon } from '../icon/icon.template.ts';\n\n@customElement('sidebar-component')\nexport class SidebarComponent extends LitElement {\n toggleRef: Ref = createRef();\n createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n firstUpdated(): void {\n this.toggleRef.value!.addEventListener('click', this.handleToggleClick);\n this.classList.add('activate-animations');\n }\n\n handleToggleClick = (e: Event) => {\n e.preventDefault();\n this.classList.toggle('active');\n };\n\n render() {\n return html`\n
    \n \n \n \n \n
    \n \n ${renderIcon('hamburger')}\n \n `;\n }\n}\n","import HLX from '../../app/index.ts';\nimport './sidebar.ts';\nimport { isSidekickLibraryActive } from 'Helpers/sidekick/isSidekickLibraryActive.ts';\n\nconst addSidebarContainer = () => {\n if (isSidekickLibraryActive()) return;\n\n const sidebarContainer = document.createElement('sidebar-component');\n sidebarContainer.setAttribute('id', 'sidebar');\n window.innerWidth <= 1280 ? sidebarContainer.classList.remove('active') : sidebarContainer.classList.add('active');\n window.innerWidth <= 1280 ? sidebarContainer.classList.remove('active') : sidebarContainer.classList.add('active');\n const main = document.getElementById('main');\n main?.after(sidebarContainer);\n};\n\nHLX.addLoadEagerTask(() => {\n addSidebarContainer();\n return Promise.resolve();\n});\n","import { isSidekickLibraryActive } from 'Helpers/sidekick/isSidekickLibraryActive';\n\nexport function addInnerContainer() {\n const main = document.getElementById('main');\n if (!main) return;\n const children = main.innerHTML;\n main.innerHTML = `
    ${isSidekickLibraryActive() ? `` : ``}${children}
    `;\n}\n","import HLX from '../../app/index.ts';\nimport { addInnerContainer } from './innerContainer.ts';\n\nHLX.addLoadEagerTask(() => {\n addInnerContainer();\n return Promise.resolve();\n});\n","/**\n * Represents the structure of an object used to specify replacements in a string.\n *\n * @interface ReplaceBySpecifier\n * @property {string} input - The input string where replacements will be made.\n * @property {string} specifier - The specifier string to search for in the input.\n * @property {string} htmlTag - The HTML tag to wrap around the parts matched by the specifier.\n */\ninterface ReplaceBySpecifier {\n input: string;\n specifier: string;\n htmlTag: string;\n}\n\n/**\n * Replaces occurrences of a specified specifier in a string with an HTML tag.\n *\n * @param {ReplaceBySpecifier} param - An object containing input string, specifier, and HTML tag.\n * @param {string} param.input - The input string where replacements will be made.\n * @param {string} param.specifier - The specifier string to search for in the input.\n * @param {string} param.htmlTag - The HTML tag to wrap around the parts matched by the specifier.\n * @returns {string} - The modified string with replacements.\n *\n @example\n * // Example 1:\n * const result1 = replaceBySpecifier({\n * input: 'This is a test string with some test keywords.',\n * specifier: 'test',\n * htmlTag: 'strong'\n * });\n * console.log(result1);\n * // Output: 'This is a string with some keywords.'\n *\n * // Example 2:\n * const result2 = replaceBySpecifier({\n * input: 'Hello, world!',\n * specifier: ',',\n * htmlTag: 'span'\n * });\n * console.log(result2);\n * // Output: 'Hello world!'\n */\nexport function replaceBySpecifier({ input, specifier, htmlTag }: ReplaceBySpecifier): string {\n if (specifier === '' || htmlTag === '') return input;\n return input\n .split(specifier)\n .map((part: string, index: number): string => (index % 2 === 1 ? `<${htmlTag}>${part}` : part))\n .join('');\n}\n","import { html, LitElement, PropertyValueMap } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport { replaceBySpecifier } from 'Utils/replaceBySpecifier.ts';\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js';\nimport FetchService from 'Services/fetch.service.ts';\nimport { renderIcon } from './icon/icon.template.ts';\nimport { DebuggerService } from '@kluntje/services';\nimport PlaceholderService from 'Services/placeholder.service.ts';\nimport { IconName } from 'Types/icons.types.ts';\n\nexport interface HeaderResponseData {\n leftCol: LeftCol;\n rightCol: RightCol;\n}\n\nexport interface LeftCol {\n data: LeftColData[];\n}\n\nexport interface LeftColData {\n logoText: string;\n logoLink: string;\n}\n\nexport interface RightCol {\n data: RightColData[];\n}\n\nexport interface RightColData {\n socialIcon: IconName;\n socialLabel: string;\n socialLink: string;\n}\n\ninterface HeaderTemplateData {\n leftCol: LeftColData;\n rightCol: RightColData[];\n}\n\n@customElement('header-component')\nexport class HeaderComponent extends LitElement {\n @state()\n headerData: HeaderTemplateData;\n\n @state()\n error: string | null = null;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n protected async firstUpdated(_changedProperties: PropertyValueMap | Map) {\n await this.fetchHeaderData();\n }\n\n async fetchHeaderData() {\n try {\n const response = await FetchService.fetchJson('header.json', {\n cacheOptions: { cacheType: 'runtime' },\n });\n this.headerData = { leftCol: response.leftCol.data[0], rightCol: response.rightCol.data };\n this.error = null;\n } catch (error) {\n DebuggerService.error('Header Component: Error while fetching header.json', error);\n this.error = await PlaceholderService.getPlaceHolder('error');\n }\n }\n\n render() {\n if (this.error) {\n return html`
    ${this.error}
    `;\n }\n if (!this.headerData) return;\n const { leftCol, rightCol } = this.headerData;\n const logoText = replaceBySpecifier({ input: leftCol.logoText, htmlTag: 'strong', specifier: ':::' });\n const logoTextHTML = unsafeHTML(logoText);\n return html`\n ${logoTextHTML}\n \n `;\n }\n}\n","import{directive as s}from\"../directive.js\";import{UnsafeHTMLDirective as e}from\"./unsafe-html.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class t extends e{}t.directiveName=\"unsafeSVG\",t.resultType=2;const o=s(t);export{o as unsafeSVG};\n//# sourceMappingURL=unsafe-svg.js.map\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=async(t,s)=>{for await(const i of t)if(!1===await s(i))return};class s{constructor(t){this.Y=t}disconnect(){this.Y=void 0}reconnect(t){this.Y=t}deref(){return this.Y}}class i{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){this.Z??=new Promise((t=>this.q=t))}resume(){this.q?.(),this.Z=this.q=void 0}}export{i as Pauser,s as PseudoWeakRef,t as forAwaitOf};\n//# sourceMappingURL=private-async-helpers.js.map\n","import{noChange as t}from\"../lit-html.js\";import{isPrimitive as s}from\"../directive-helpers.js\";import{AsyncDirective as i}from\"../async-directive.js\";import{PseudoWeakRef as e,Pauser as r}from\"./private-async-helpers.js\";import{directive as o}from\"../directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const n=t=>!s(t)&&\"function\"==typeof t.then,h=1073741823;class c extends i{constructor(){super(...arguments),this._$Cwt=h,this._$Cbt=[],this._$CK=new e(this),this._$CX=new r}render(...s){return s.find((t=>!n(t)))??t}update(s,i){const e=this._$Cbt;let r=e.length;this._$Cbt=i;const o=this._$CK,c=this._$CX;this.isConnected||this.disconnected();for(let t=0;tthis._$Cwt);t++){const s=i[t];if(!n(s))return this._$Cwt=t,s;t{for(;c.get();)await c.get();const i=o.deref();if(void 0!==i){const e=i._$Cbt.indexOf(s);e>-1&&e {\n const main = document.getElementsByTagName('main')[0];\n main.setAttribute('id', 'main');\n return Promise.resolve();\n });\n\n HLX.init();\n}\n\nexport function initHLXApp() {\n if (document.readyState === READY_STATES.interactive || document.readyState === READY_STATES.complete) {\n init();\n } else {\n document.addEventListener('readystatechange', () => {\n const readyState = document.readyState;\n if (readyState === READY_STATES.interactive || readyState === READY_STATES.complete) {\n init();\n }\n });\n }\n}\n","import './components/sidebar/sidebar.init.ts';\nimport './components/innerContainer/innerContainer.init.ts';\nimport './components/header.ts';\nimport './components/icon/icon.ts';\nimport { initHLXApp } from './app/init.ts';\n\ninitHLXApp();\n\ndeclare global {\n interface Window {\n hlx: {\n RUM_MASK_URL: string;\n codeBasePath: string;\n lighthouse: boolean;\n };\n }\n}\n"],"file":"main/main.js"} \ No newline at end of file diff --git a/dist/posts/posts.js b/dist/posts/posts.js index 7908b633..b74f29b1 100644 --- a/dist/posts/posts.js +++ b/dist/posts/posts.js @@ -1,2 +1,2 @@ -import{j as l,x as i,T as c}from"../__chunks__/lit-element.CH8ciVnL.js";import{P as p,c as y}from"../__chunks__/createOptimizedPicture.DLZ8Nghn.js";import{F as h,m}from"../__chunks__/fetch.service.yiMnp1FM.js";import{o as u}from"../__chunks__/if-defined.CrfpI-tB.js";import{i as w}from"../__chunks__/isSidekickLibraryActive.U-fJCMMj.js";const $=t=>t?i`

    ${t}

    `:c,g=t=>t?t.length>200?i`

    ${t.slice(0,200)}...

    `:i`

    ${t}

    `:c,v=(t,e)=>e?i`${e}`:c,x=t=>{const{postUrl:e,headline:r,text:o,picture:a,buttontext:s}=t;return i``},T=async t=>{if(t.length===0){const e=await p.getPlaceHolder("no posts");return i`
    ${e}
    `}return t.map(e=>x(e))},H=t=>{var r;return(r=Array.from(t.querySelectorAll("p")).find(o=>o.innerText.trim().length>0))==null?void 0:r.innerText};function S(t){try{return h.fetchText(`${t.path}.plain.html`,{cacheOptions:{cacheType:"runtime"}})}catch(e){m.error(`Post Block: Error while fetching ${t.path}.plain.html`,e);return}}function q(t,e,r){var o,a;return{postUrl:w()?void 0:`${window.hlx.codeBasePath}${t[e].path}`,headline:((o=r.querySelector("h1"))==null?void 0:o.innerText)||((a=r.querySelector("h2"))==null?void 0:a.innerText),text:H(r),buttontext:t[e].buttontext,picture:y({src:t[e].image,alt:t[e].imagealt,width:323,height:199})}}async function j(t){t.innerHTML="";const e=new DOMParser;try{const o=(await h.fetchJson("/query-index.json")).data.filter(n=>n.path.startsWith("/posts")),f=(await Promise.all(o.map(n=>S(n)))).filter(n=>n!==void 0).map(n=>e.parseFromString(n,"text/html")).map((n,P)=>q(o,P,n));t.style.removeProperty("display");const d=await T(f);l(d,t)}catch(r){m.error("Post Block: Error while fetching posts.",r);const o=await p.getPlaceHolder("error"),a=document.createElement("div"),s=i`

    ${o}

    `;l(s,a),t.innerHTML="",t.appendChild(a)}}export{j as default}; +import{j as l,x as i,T as c}from"../__chunks__/lit-element.CH8ciVnL.js";import{P as p,c as y}from"../__chunks__/createOptimizedPicture.CyR9tLTg.js";import{F as h,m}from"../__chunks__/fetch.service.C1Ie3Sjw.js";import{o as u}from"../__chunks__/if-defined.CrfpI-tB.js";import{i as w}from"../__chunks__/isSidekickLibraryActive.U-fJCMMj.js";const $=t=>t?i`

    ${t}

    `:c,g=t=>t?t.length>200?i`

    ${t.slice(0,200)}...

    `:i`

    ${t}

    `:c,v=(t,e)=>e?i`${e}`:c,x=t=>{const{postUrl:e,headline:r,text:o,picture:a,buttontext:s}=t;return i``},T=async t=>{if(t.length===0){const e=await p.getPlaceHolder("no posts");return i`
    ${e}
    `}return t.map(e=>x(e))},H=t=>{var r;return(r=Array.from(t.querySelectorAll("p")).find(o=>o.innerText.trim().length>0))==null?void 0:r.innerText};function S(t){try{return h.fetchText(`${t.path}.plain.html`,{cacheOptions:{cacheType:"runtime"}})}catch(e){m.error(`Post Block: Error while fetching ${t.path}.plain.html`,e);return}}function q(t,e,r){var o,a;return{postUrl:w()?void 0:`${window.hlx.codeBasePath}${t[e].path}`,headline:((o=r.querySelector("h1"))==null?void 0:o.innerText)||((a=r.querySelector("h2"))==null?void 0:a.innerText),text:H(r),buttontext:t[e].buttontext,picture:y({src:t[e].image,alt:t[e].imagealt,width:323,height:199})}}async function j(t){t.innerHTML="";const e=new DOMParser;try{const o=(await h.fetchJson("/query-index.json")).data.filter(n=>n.path.startsWith("/posts")),f=(await Promise.all(o.map(n=>S(n)))).filter(n=>n!==void 0).map(n=>e.parseFromString(n,"text/html")).map((n,P)=>q(o,P,n));t.style.removeProperty("display");const d=await T(f);l(d,t)}catch(r){m.error("Post Block: Error while fetching posts.",r);const o=await p.getPlaceHolder("error"),a=document.createElement("div"),s=i`

    ${o}

    `;l(s,a),t.innerHTML="",t.appendChild(a)}}export{j as default}; //# sourceMappingURL=posts.js.map diff --git a/src/app/tasks/loadCSS.ts b/src/app/tasks/loadCSS.ts index 06e555c1..77b714d0 100644 --- a/src/app/tasks/loadCSS.ts +++ b/src/app/tasks/loadCSS.ts @@ -5,7 +5,7 @@ import { getUrlForEndpoint } from '../utils/getUrlForEndpoint'; * @param endpoint - The endpoint of the CSS file. * @returns Promise */ -export function loadCSS(endpoint: string): Promise { +export async function loadCSS(endpoint: string): Promise { return new Promise((resolve, reject) => { const { href } = getUrlForEndpoint(endpoint);