// @requirements REQ-QC-PROFILING REQ-PRODUCT-MOBILE REQ-PRODUCT-A11Y import {readFile} from 'node:fs/promises'; import {build as bundle} from 'esbuild'; import {compileLegalDocuments,compileConsentRuntimeConfig} from '@notabenda/core/content'; import {createTechnologyCollectionNotice,renderTechnologyCollectionNotice} from '@notabenda/core/technology'; import {renderLegalLinks} from '@notabenda/core'; import {technologyExampleConfig,technologySettings} from './config.mjs'; export async function technologyFiles(base){ const config=technologyExampleConfig(base),build=compileLegalDocuments(config,{mode:'preview'}),notice=createTechnologyCollectionNotice(build.artifact,technologySettings,{mode:'preview'}); const script=(await bundle({entryPoints:[new URL('./client.mjs',import.meta.url).pathname],bundle:true,minify:true,platform:'browser',format:'esm',target:'es2022',write:false})).outputFiles[0].text; const html=`Your reading interests · Juniper
juniper / reading← Examples

YOUR READING SPACE

Choose whether to
personalise your reading

Browse any topic. If you want suggestions based on what you open, choose whether to enable Reading interests below.

OPEN NOW

Choose a topic

Every topic is available with Reading interests switched off.

Reading interestsOff

No reading profile is being built.

${renderTechnologyCollectionNotice(notice,{idPrefix:'reading-notice',allowPreview:true})}
About this integration

This browser-only example uses ordinary topic counts. It does not request location, verify identity, contact a provider or establish a reviewed Québec compliance profile.

Read the implementation guide ↗
`; return {...build.files,'technology/index.html':html,'technology/notice.json':JSON.stringify(notice),'technology/runtime.json':JSON.stringify(compileConsentRuntimeConfig(config,{mode:'preview',evidence:'local'})),'assets/technology-example.mjs':script,'assets/technology.css':await readFile(new URL('../../packages/notabenda/dist/technology.css',import.meta.url),'utf8'),'assets/technology-example.css':await readFile(new URL('./style.css',import.meta.url),'utf8')}; }