@openpolicy/core 0.0.12 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/README.md +5 -4
  2. package/dist/index.d.ts +77 -29
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +424 -615
  5. package/dist/index.js.map +1 -1
  6. package/package.json +2 -4
  7. package/dist/index.test.d.ts +0 -2
  8. package/dist/index.test.d.ts.map +0 -1
  9. package/dist/privacy.d.ts +0 -7
  10. package/dist/privacy.d.ts.map +0 -1
  11. package/dist/privacy.test.d.ts +0 -2
  12. package/dist/privacy.test.d.ts.map +0 -1
  13. package/dist/renderers/html.d.ts +0 -3
  14. package/dist/renderers/html.d.ts.map +0 -1
  15. package/dist/renderers/markdown.d.ts +0 -3
  16. package/dist/renderers/markdown.d.ts.map +0 -1
  17. package/dist/templates/privacy/ccpa-supplement.d.ts +0 -3
  18. package/dist/templates/privacy/ccpa-supplement.d.ts.map +0 -1
  19. package/dist/templates/privacy/contact.d.ts +0 -3
  20. package/dist/templates/privacy/contact.d.ts.map +0 -1
  21. package/dist/templates/privacy/cookies.d.ts +0 -3
  22. package/dist/templates/privacy/cookies.d.ts.map +0 -1
  23. package/dist/templates/privacy/data-collected.d.ts +0 -3
  24. package/dist/templates/privacy/data-collected.d.ts.map +0 -1
  25. package/dist/templates/privacy/data-retention.d.ts +0 -3
  26. package/dist/templates/privacy/data-retention.d.ts.map +0 -1
  27. package/dist/templates/privacy/gdpr-supplement.d.ts +0 -3
  28. package/dist/templates/privacy/gdpr-supplement.d.ts.map +0 -1
  29. package/dist/templates/privacy/introduction.d.ts +0 -3
  30. package/dist/templates/privacy/introduction.d.ts.map +0 -1
  31. package/dist/templates/privacy/legal-basis.d.ts +0 -3
  32. package/dist/templates/privacy/legal-basis.d.ts.map +0 -1
  33. package/dist/templates/privacy/third-parties.d.ts +0 -3
  34. package/dist/templates/privacy/third-parties.d.ts.map +0 -1
  35. package/dist/templates/privacy/user-rights.d.ts +0 -3
  36. package/dist/templates/privacy/user-rights.d.ts.map +0 -1
  37. package/dist/templates/terms/acceptance.d.ts +0 -3
  38. package/dist/templates/terms/acceptance.d.ts.map +0 -1
  39. package/dist/templates/terms/accounts.d.ts +0 -3
  40. package/dist/templates/terms/accounts.d.ts.map +0 -1
  41. package/dist/templates/terms/availability.d.ts +0 -3
  42. package/dist/templates/terms/availability.d.ts.map +0 -1
  43. package/dist/templates/terms/changes-to-terms.d.ts +0 -3
  44. package/dist/templates/terms/changes-to-terms.d.ts.map +0 -1
  45. package/dist/templates/terms/contact.d.ts +0 -3
  46. package/dist/templates/terms/contact.d.ts.map +0 -1
  47. package/dist/templates/terms/disclaimers.d.ts +0 -3
  48. package/dist/templates/terms/disclaimers.d.ts.map +0 -1
  49. package/dist/templates/terms/dispute-resolution.d.ts +0 -3
  50. package/dist/templates/terms/dispute-resolution.d.ts.map +0 -1
  51. package/dist/templates/terms/eligibility.d.ts +0 -3
  52. package/dist/templates/terms/eligibility.d.ts.map +0 -1
  53. package/dist/templates/terms/governing-law.d.ts +0 -3
  54. package/dist/templates/terms/governing-law.d.ts.map +0 -1
  55. package/dist/templates/terms/indemnification.d.ts +0 -3
  56. package/dist/templates/terms/indemnification.d.ts.map +0 -1
  57. package/dist/templates/terms/intellectual-property.d.ts +0 -3
  58. package/dist/templates/terms/intellectual-property.d.ts.map +0 -1
  59. package/dist/templates/terms/introduction.d.ts +0 -3
  60. package/dist/templates/terms/introduction.d.ts.map +0 -1
  61. package/dist/templates/terms/limitation-of-liability.d.ts +0 -3
  62. package/dist/templates/terms/limitation-of-liability.d.ts.map +0 -1
  63. package/dist/templates/terms/payments.d.ts +0 -3
  64. package/dist/templates/terms/payments.d.ts.map +0 -1
  65. package/dist/templates/terms/prohibited-use.d.ts +0 -3
  66. package/dist/templates/terms/prohibited-use.d.ts.map +0 -1
  67. package/dist/templates/terms/termination.d.ts +0 -3
  68. package/dist/templates/terms/termination.d.ts.map +0 -1
  69. package/dist/templates/terms/third-party-services.d.ts +0 -3
  70. package/dist/templates/terms/third-party-services.d.ts.map +0 -1
  71. package/dist/templates/terms/user-content.d.ts +0 -3
  72. package/dist/templates/terms/user-content.d.ts.map +0 -1
  73. package/dist/terms.d.ts +0 -7
  74. package/dist/terms.d.ts.map +0 -1
  75. package/dist/terms.test.d.ts +0 -2
  76. package/dist/terms.test.d.ts.map +0 -1
  77. package/dist/types.d.ts +0 -119
  78. package/dist/types.d.ts.map +0 -1
  79. package/dist/validate-terms.d.ts +0 -3
  80. package/dist/validate-terms.d.ts.map +0 -1
  81. package/dist/validate-terms.test.d.ts +0 -2
  82. package/dist/validate-terms.test.d.ts.map +0 -1
  83. package/dist/validate.d.ts +0 -3
  84. package/dist/validate.d.ts.map +0 -1
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["buildContact","buildIntroduction","SECTION_BUILDERS","buildIntroduction","buildContact","buildContact","buildIntroduction","SECTION_BUILDERS","buildIntroduction","buildContact"],"sources":["../src/renderers/markdown.ts","../src/renderers/html.ts","../src/templates/cookie/consent.ts","../src/templates/cookie/contact.ts","../src/templates/cookie/cookie-duration.ts","../src/templates/cookie/cookie-types.ts","../src/templates/cookie/cookie-usage.ts","../src/templates/cookie/introduction.ts","../src/templates/cookie/jurisdiction.ts","../src/templates/cookie/managing-cookies.ts","../src/templates/cookie/third-party-cookies.ts","../src/templates/cookie/tracking-technologies.ts","../src/templates/cookie/updates.ts","../src/templates/cookie/what-are-cookies.ts","../src/cookie.ts","../src/templates/privacy/ccpa-supplement.ts","../src/templates/privacy/children-privacy.ts","../src/templates/privacy/contact.ts","../src/templates/privacy/cookies.ts","../src/templates/privacy/data-collected.ts","../src/templates/privacy/data-retention.ts","../src/templates/privacy/gdpr-supplement.ts","../src/templates/privacy/introduction.ts","../src/templates/privacy/legal-basis.ts","../src/templates/privacy/third-parties.ts","../src/templates/privacy/user-rights.ts","../src/privacy.ts","../src/templates/terms/acceptance.ts","../src/templates/terms/accounts.ts","../src/templates/terms/availability.ts","../src/templates/terms/changes-to-terms.ts","../src/templates/terms/contact.ts","../src/templates/terms/disclaimers.ts","../src/templates/terms/dispute-resolution.ts","../src/templates/terms/eligibility.ts","../src/templates/terms/governing-law.ts","../src/templates/terms/indemnification.ts","../src/templates/terms/intellectual-property.ts","../src/templates/terms/introduction.ts","../src/templates/terms/limitation-of-liability.ts","../src/templates/terms/payments.ts","../src/templates/terms/prohibited-use.ts","../src/templates/terms/termination.ts","../src/templates/terms/third-party-services.ts","../src/templates/terms/user-content.ts","../src/terms.ts","../src/types.ts","../src/validate.ts","../src/validate-cookie.ts","../src/validate-terms.ts","../src/index.ts"],"sourcesContent":["import type { PolicySection } from \"../types\";\n\nexport function renderMarkdown(sections: PolicySection[]): string {\n\treturn sections\n\t\t.map((section) => `## ${section.title}\\n\\n${section.body}`)\n\t\t.join(\"\\n\\n---\\n\\n\");\n}\n","import { marked } from \"marked\";\nimport type { PolicySection } from \"../types\";\nimport { renderMarkdown } from \"./markdown\";\n\nexport function renderHTML(sections: PolicySection[]): string {\n\tconst markdown = renderMarkdown(sections);\n\treturn marked(markdown) as string;\n}\n","import type { CookiePolicyConfig, PolicySection } from \"../../types\";\n\nexport function buildConsent(config: CookiePolicyConfig): PolicySection | null {\n\tif (!config.consentMechanism) return null;\n\n\tconst mechanisms: string[] = [];\n\n\tif (config.consentMechanism.hasBanner) {\n\t\tmechanisms.push(\n\t\t\t\"A **cookie consent banner** displayed on your first visit, where you can accept or decline non-essential cookies\",\n\t\t);\n\t}\n\tif (config.consentMechanism.hasPreferencePanel) {\n\t\tmechanisms.push(\n\t\t\t\"A **preference panel** where you can manage individual cookie categories\",\n\t\t);\n\t}\n\tif (config.consentMechanism.canWithdraw) {\n\t\tmechanisms.push(\n\t\t\t\"The ability to **withdraw your consent** at any time by updating your cookie preferences\",\n\t\t);\n\t}\n\n\tconst list =\n\t\tmechanisms.length > 0\n\t\t\t? `\\n\\nWe provide the following consent controls:\\n\\n${mechanisms.map((m) => `- ${m}`).join(\"\\n\")}`\n\t\t\t: \"\";\n\n\treturn {\n\t\tid: \"consent\",\n\t\ttitle: \"User Consent\",\n\t\tbody: `Where required by law, we will request your consent before placing non-essential cookies on your device.${list}\n\nEssential cookies do not require your consent as they are strictly necessary for the operation of our service.`,\n\t};\n}\n","import type { CookiePolicyConfig, PolicySection } from \"../../types\";\n\nexport function buildContact(config: CookiePolicyConfig): PolicySection {\n\treturn {\n\t\tid: \"contact\",\n\t\ttitle: \"Contact Us\",\n\t\tbody: `If you have any questions about our use of cookies or this Cookie Policy, please contact us:\n\n**${config.company.legalName}**\n${config.company.address}\n${config.company.contact}`,\n\t};\n}\n","import type { CookiePolicyConfig, PolicySection } from \"../../types\";\n\nexport function buildCookieDuration(\n\t_config: CookiePolicyConfig,\n): PolicySection {\n\treturn {\n\t\tid: \"cookie-duration\",\n\t\ttitle: \"Cookie Duration\",\n\t\tbody: `Cookies can be either **session cookies** or **persistent cookies**:\n\n- **Session cookies** are temporary and are deleted from your device when you close your browser. They are used to carry information across pages of our website and avoid having to re-enter information.\n- **Persistent cookies** remain on your device for a set period of time specified in the cookie. They are activated each time you visit the website that created that particular cookie.\n\nThe specific duration of each cookie depends on its purpose and is determined at the time it is set.`,\n\t};\n}\n","import type { CookiePolicyConfig, PolicySection } from \"../../types\";\n\nexport function buildCookieTypes(config: CookiePolicyConfig): PolicySection {\n\tconst types: string[] = [];\n\n\tif (config.cookies.essential) {\n\t\ttypes.push(\n\t\t\t\"**Essential Cookies** — These cookies are necessary for our website to function and cannot be switched off. They are usually set in response to actions you take, such as setting your privacy preferences, logging in, or filling in forms.\",\n\t\t);\n\t}\n\tif (config.cookies.analytics) {\n\t\ttypes.push(\n\t\t\t\"**Analytics Cookies** — These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand which pages are most and least popular and see how visitors move around the site.\",\n\t\t);\n\t}\n\tif (config.cookies.functional) {\n\t\ttypes.push(\n\t\t\t\"**Functional Cookies** — These cookies enable enhanced functionality and personalization, such as remembering your preferences and settings. They may be set by us or by third-party providers whose services we have added to our pages.\",\n\t\t);\n\t}\n\tif (config.cookies.marketing) {\n\t\ttypes.push(\n\t\t\t\"**Marketing Cookies** — These cookies may be set through our site by our advertising partners. They may be used to build a profile of your interests and show you relevant advertisements on other sites.\",\n\t\t);\n\t}\n\n\tconst list = types.map((t) => `- ${t}`).join(\"\\n\");\n\n\treturn {\n\t\tid: \"cookie-types\",\n\t\ttitle: \"Types of Cookies We Use\",\n\t\tbody: `We use the following categories of cookies:\\n\\n${list}`,\n\t};\n}\n","import type { CookiePolicyConfig, PolicySection } from \"../../types\";\n\nexport function buildCookieUsage(config: CookiePolicyConfig): PolicySection {\n\tconst purposes: string[] = [];\n\n\tif (config.cookies.essential) {\n\t\tpurposes.push(\"Providing core website functionality and security\");\n\t\tpurposes.push(\"Remembering your session and authentication state\");\n\t}\n\tif (config.cookies.analytics) {\n\t\tpurposes.push(\"Measuring website traffic and usage patterns\");\n\t\tpurposes.push(\"Identifying which pages and features are most popular\");\n\t}\n\tif (config.cookies.functional) {\n\t\tpurposes.push(\"Saving your preferences and settings\");\n\t\tpurposes.push(\"Providing personalized content and features\");\n\t}\n\tif (config.cookies.marketing) {\n\t\tpurposes.push(\"Delivering targeted advertising\");\n\t\tpurposes.push(\"Tracking the effectiveness of our marketing campaigns\");\n\t}\n\n\tconst list = purposes.map((p) => `- ${p}`).join(\"\\n\");\n\n\treturn {\n\t\tid: \"cookie-usage\",\n\t\ttitle: \"How We Use Cookies\",\n\t\tbody: `${config.company.name} uses cookies to:\\n\\n${list}`,\n\t};\n}\n","import type { CookiePolicyConfig, PolicySection } from \"../../types\";\n\nexport function buildIntroduction(config: CookiePolicyConfig): PolicySection {\n\treturn {\n\t\tid: \"introduction\",\n\t\ttitle: \"Introduction\",\n\t\tbody: `This Cookie Policy explains how ${config.company.name} (\"we\", \"us\", or \"our\") uses cookies and similar tracking technologies when you visit our website or use our services.\n\n**Effective Date:** ${config.effectiveDate}\n\nBy using our services, you consent to the use of cookies as described in this policy. If you have questions, please contact us at ${config.company.contact}.`,\n\t};\n}\n","import type { CookiePolicyConfig, PolicySection } from \"../../types\";\n\nexport function buildJurisdiction(\n\tconfig: CookiePolicyConfig,\n): PolicySection | null {\n\tif (!config.jurisdictions || config.jurisdictions.length === 0) return null;\n\n\tconst requirements: string[] = [];\n\n\tif (config.jurisdictions.includes(\"eu\")) {\n\t\trequirements.push(\n\t\t\t\"**European Union (GDPR/ePrivacy Directive):** We comply with EU cookie consent requirements. Non-essential cookies require your prior, informed, and freely given consent. You have the right to withdraw consent at any time.\",\n\t\t);\n\t}\n\tif (config.jurisdictions.includes(\"ca\")) {\n\t\trequirements.push(\n\t\t\t\"**California (CCPA):** California residents have the right to opt out of the sale of personal information collected through cookies. To exercise this right, please contact us.\",\n\t\t);\n\t}\n\tif (config.jurisdictions.includes(\"us\")) {\n\t\trequirements.push(\n\t\t\t\"**United States:** We comply with applicable U.S. federal and state privacy laws regarding cookie usage and disclosure.\",\n\t\t);\n\t}\n\tif (config.jurisdictions.includes(\"au\")) {\n\t\trequirements.push(\n\t\t\t\"**Australia (Privacy Act):** We comply with the Australian Privacy Principles regarding the collection of personal information through cookies.\",\n\t\t);\n\t}\n\tif (config.jurisdictions.includes(\"nz\")) {\n\t\trequirements.push(\n\t\t\t\"**New Zealand (Privacy Act 2020):** We comply with New Zealand privacy requirements for the collection of personal information through cookies.\",\n\t\t);\n\t}\n\tif (config.jurisdictions.includes(\"other\")) {\n\t\trequirements.push(\n\t\t\t\"**Other Jurisdictions:** We strive to comply with applicable cookie laws and regulations in all jurisdictions where we operate.\",\n\t\t);\n\t}\n\n\tconst list = requirements.map((r) => `- ${r}`).join(\"\\n\");\n\n\treturn {\n\t\tid: \"jurisdiction\",\n\t\ttitle: \"Legal Requirements\",\n\t\tbody: `Our cookie practices are designed to comply with applicable laws across the jurisdictions in which we operate:\\n\\n${list}`,\n\t};\n}\n","import type { CookiePolicyConfig, PolicySection } from \"../../types\";\n\nexport function buildManagingCookies(\n\t_config: CookiePolicyConfig,\n): PolicySection {\n\treturn {\n\t\tid: \"managing-cookies\",\n\t\ttitle: \"Managing Your Cookie Preferences\",\n\t\tbody: `You can control and manage cookies in several ways:\n\n**Browser settings:** Most browsers allow you to refuse cookies or delete existing ones. The process varies by browser:\n- **Chrome:** Settings → Privacy and security → Cookies and other site data\n- **Firefox:** Settings → Privacy & Security → Cookies and Site Data\n- **Safari:** Preferences → Privacy → Manage Website Data\n- **Edge:** Settings → Cookies and site permissions\n\n**Opt-out tools:** For analytics and advertising cookies, you may use industry opt-out tools such as the [NAI opt-out](http://optout.networkadvertising.org/) or [DAA opt-out](http://optout.aboutads.info/).\n\nPlease note that blocking or deleting cookies may affect your experience on our website, and some features may not function correctly if cookies are disabled.`,\n\t};\n}\n","import type { CookiePolicyConfig, PolicySection } from \"../../types\";\n\nexport function buildThirdPartyCookies(\n\tconfig: CookiePolicyConfig,\n): PolicySection | null {\n\tif (!config.thirdParties || config.thirdParties.length === 0) return null;\n\n\tconst rows = config.thirdParties\n\t\t.map((tp) => {\n\t\t\tconst policyLink = tp.policyUrl\n\t\t\t\t? ` ([Privacy Policy](${tp.policyUrl}))`\n\t\t\t\t: \"\";\n\t\t\treturn `- **${tp.name}** — ${tp.purpose}${policyLink}`;\n\t\t})\n\t\t.join(\"\\n\");\n\n\treturn {\n\t\tid: \"third-party-cookies\",\n\t\ttitle: \"Third-Party Cookies\",\n\t\tbody: `Some cookies on our site are placed by third-party services. These third parties may use cookies to collect information about your online activities across different websites. We do not control these third-party cookies.\n\nThe following third parties may set cookies through our service:\\n\\n${rows}\\n\\nWe encourage you to review the privacy policies of these third parties to understand their data practices.`,\n\t};\n}\n","import type { CookiePolicyConfig, PolicySection } from \"../../types\";\n\nexport function buildTrackingTechnologies(\n\tconfig: CookiePolicyConfig,\n): PolicySection | null {\n\tif (!config.trackingTechnologies || config.trackingTechnologies.length === 0)\n\t\treturn null;\n\n\tconst list = config.trackingTechnologies.map((t) => `- ${t}`).join(\"\\n\");\n\n\treturn {\n\t\tid: \"tracking-technologies\",\n\t\ttitle: \"Similar Tracking Technologies\",\n\t\tbody: `In addition to cookies, we may use the following tracking technologies:\\n\\n${list}\\n\\nThese technologies work similarly to cookies and are subject to the same controls described in this policy.`,\n\t};\n}\n","import type { CookiePolicyConfig, PolicySection } from \"../../types\";\n\nexport function buildUpdates(config: CookiePolicyConfig): PolicySection {\n\treturn {\n\t\tid: \"updates\",\n\t\ttitle: \"Updates to This Policy\",\n\t\tbody: `We may update this Cookie Policy from time to time to reflect changes in our practices or applicable law. When we make changes, we will update the **Effective Date** at the top of this policy.\n\nWe encourage you to review this Cookie Policy periodically. Your continued use of our services after any changes constitutes your acceptance of the updated policy.\n\nIf you have questions about changes to this policy, please contact ${config.company.name} at ${config.company.contact}.`,\n\t};\n}\n","import type { CookiePolicyConfig, PolicySection } from \"../../types\";\n\nexport function buildWhatAreCookies(\n\t_config: CookiePolicyConfig,\n): PolicySection {\n\treturn {\n\t\tid: \"what-are-cookies\",\n\t\ttitle: \"What Are Cookies\",\n\t\tbody: `Cookies are small text files that are placed on your device (computer, tablet, or mobile phone) when you visit a website. They are widely used to make websites work, or work more efficiently, and to provide information to the website owner.\n\nCookies are set by the website you visit (first-party cookies) or by third parties whose content appears on that page (third-party cookies). Cookies remain on your device for varying lengths of time depending on their type.`,\n\t};\n}\n","import { renderHTML } from \"./renderers/html\";\nimport { renderMarkdown } from \"./renderers/markdown\";\nimport {\n\tbuildConsent,\n\tbuildContact,\n\tbuildCookieDuration,\n\tbuildCookieTypes,\n\tbuildCookieUsage,\n\tbuildIntroduction,\n\tbuildJurisdiction,\n\tbuildManagingCookies,\n\tbuildThirdPartyCookies,\n\tbuildTrackingTechnologies,\n\tbuildUpdates,\n\tbuildWhatAreCookies,\n} from \"./templates/cookie\";\nimport type {\n\tCompileOptions,\n\tCookiePolicyConfig,\n\tOutputFormat,\n\tPolicySection,\n} from \"./types\";\n\nconst SECTION_BUILDERS: ((\n\tconfig: CookiePolicyConfig,\n) => PolicySection | null)[] = [\n\tbuildIntroduction,\n\tbuildWhatAreCookies,\n\tbuildCookieTypes,\n\tbuildTrackingTechnologies,\n\tbuildCookieUsage,\n\tbuildCookieDuration,\n\tbuildConsent,\n\tbuildManagingCookies,\n\tbuildThirdPartyCookies,\n\tbuildJurisdiction,\n\tbuildUpdates,\n\tbuildContact,\n];\n\nexport function compileCookiePolicy(\n\tconfig: CookiePolicyConfig,\n\toptions: CompileOptions = { formats: [\"markdown\"] },\n): { format: OutputFormat; content: string; sections: PolicySection[] }[] {\n\tconst sections = SECTION_BUILDERS.map((builder) => builder(config)).filter(\n\t\t(s): s is PolicySection => s !== null,\n\t);\n\n\treturn options.formats.map((format) => {\n\t\tswitch (format) {\n\t\t\tcase \"markdown\":\n\t\t\t\treturn { format, content: renderMarkdown(sections), sections };\n\t\t\tcase \"html\":\n\t\t\t\treturn { format, content: renderHTML(sections), sections };\n\t\t\tcase \"pdf\":\n\t\t\t\tthrow new Error(\"pdf format is not yet implemented\");\n\t\t\tcase \"jsx\":\n\t\t\t\tthrow new Error(\"jsx format is not yet implemented\");\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Unsupported format: ${format}`);\n\t\t}\n\t});\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildCcpaSupplement(\n\tconfig: PrivacyPolicyConfig,\n): PolicySection | null {\n\tif (!config.jurisdictions.includes(\"ca\")) return null;\n\n\treturn {\n\t\tid: \"ccpa-supplement\",\n\t\ttitle: \"California Privacy Rights (CCPA)\",\n\t\tbody: `This section applies to California residents under the California Consumer Privacy Act (CCPA) and the California Privacy Rights Act (CPRA).\n\n**Categories of Personal Information Collected:** We collect the categories of personal information described in the \"Information We Collect\" section above.\n\n**Your California Rights:**\n- **Right to Know:** You may request information about the personal information we have collected about you, including the categories of sources, the business purpose for collection, and the categories of third parties with whom we share information.\n- **Right to Delete:** You may request deletion of personal information we have collected from you, subject to certain exceptions.\n- **Right to Opt-Out:** You may opt out of the sale or sharing of your personal information.\n- **Right to Non-Discrimination:** We will not discriminate against you for exercising your California privacy rights.\n\nTo exercise your rights, contact us at ${config.company.contact}.`,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildChildrenPrivacy(\n\tconfig: PrivacyPolicyConfig,\n): PolicySection | null {\n\tif (!config.children) return null;\n\tconst { underAge, noticeUrl } = config.children;\n\tlet body = `Our service is not directed at children under ${underAge} years old.`;\n\tif (noticeUrl) {\n\t\tbody += ` See our notice for parents and guardians: ${noticeUrl}`;\n\t}\n\treturn {\n\t\tid: \"children-privacy\",\n\t\ttitle: \"Children’s Privacy\",\n\t\tbody,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildContact(config: PrivacyPolicyConfig): PolicySection {\n\treturn {\n\t\tid: \"contact\",\n\t\ttitle: \"Contact Us\",\n\t\tbody: `If you have questions or concerns about this Privacy Policy or our data practices, please contact us:\n\n**${config.company.legalName}**\n${config.company.address}\n\nEmail: ${config.company.contact}`,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildCookies(config: PrivacyPolicyConfig): PolicySection {\n\tconst enabled: string[] = [];\n\tif (config.cookies.essential)\n\t\tenabled.push(\n\t\t\t\"**Essential cookies** — required for the service to function\",\n\t\t);\n\tif (config.cookies.analytics)\n\t\tenabled.push(\n\t\t\t\"**Analytics cookies** — help us understand how visitors interact with our service\",\n\t\t);\n\tif (config.cookies.marketing)\n\t\tenabled.push(\n\t\t\t\"**Marketing cookies** — used to deliver relevant advertisements\",\n\t\t);\n\n\tconst body =\n\t\tenabled.length > 0\n\t\t\t? `We use the following types of cookies and tracking technologies:\\n\\n${enabled.map((e) => `- ${e}`).join(\"\\n\")}`\n\t\t\t: \"We do not use cookies or tracking technologies on our service.\";\n\n\treturn {\n\t\tid: \"cookies\",\n\t\ttitle: \"Cookies and Tracking\",\n\t\tbody,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildDataCollected(config: PrivacyPolicyConfig): PolicySection {\n\tconst entries = Object.entries(config.dataCollected);\n\tconst lines = entries.map(([category, items]) => {\n\t\tconst itemList = items.map((item) => ` - ${item}`).join(\"\\n\");\n\t\treturn `**${category}:**\\n${itemList}`;\n\t});\n\n\treturn {\n\t\tid: \"data-collected\",\n\t\ttitle: \"Information We Collect\",\n\t\tbody: `We collect the following categories of information:\\n\\n${lines.join(\"\\n\\n\")}`,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildDataRetention(config: PrivacyPolicyConfig): PolicySection {\n\tconst entries = Object.entries(config.retention);\n\tconst lines = entries.map(\n\t\t([category, period]) => `- **${category}:** ${period}`,\n\t);\n\n\treturn {\n\t\tid: \"data-retention\",\n\t\ttitle: \"Data Retention\",\n\t\tbody: `We retain your information for the following periods:\\n\\n${lines.join(\"\\n\")}`,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildGdprSupplement(\n\tconfig: PrivacyPolicyConfig,\n): PolicySection | null {\n\tif (!config.jurisdictions.includes(\"eu\")) return null;\n\n\treturn {\n\t\tid: \"gdpr-supplement\",\n\t\ttitle: \"GDPR Supplemental Disclosures\",\n\t\tbody: `This section applies to individuals in the European Economic Area (EEA) under the General Data Protection Regulation (GDPR).\n\n**Data Controller:** ${config.company.legalName}, ${config.company.address}\n\n**Your GDPR Rights:** In addition to the rights listed above, you have the right to lodge a complaint with your local data protection authority if you believe we have not handled your data in accordance with applicable law.\n\n**International Transfers:** If we transfer your personal data outside the EEA, we ensure adequate safeguards are in place in accordance with GDPR requirements.`,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildIntroduction(config: PrivacyPolicyConfig): PolicySection {\n\treturn {\n\t\tid: \"introduction\",\n\t\ttitle: \"Introduction\",\n\t\tbody: `This Privacy Policy describes how ${config.company.name} (\"we\", \"us\", or \"our\") collects, uses, and shares information about you when you use our services.\n\n**Effective Date:** ${config.effectiveDate}\n\nIf you have questions about this policy, please contact us at ${config.company.contact}.`,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildLegalBasis(\n\tconfig: PrivacyPolicyConfig,\n): PolicySection | null {\n\tif (!config.jurisdictions.includes(\"eu\")) return null;\n\n\treturn {\n\t\tid: \"legal-basis\",\n\t\ttitle: \"Legal Basis for Processing\",\n\t\tbody: `We process your personal data under the following legal basis:\\n\\n${config.legalBasis}`,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildThirdParties(config: PrivacyPolicyConfig): PolicySection {\n\tconst lines = config.thirdParties.map(\n\t\t(tp) => `- **${tp.name}** — ${tp.purpose}`,\n\t);\n\n\tconst body =\n\t\tlines.length > 0\n\t\t\t? `We share data with the following third-party services:\\n\\n${lines.join(\"\\n\")}`\n\t\t\t: \"We do not share your data with third-party services.\";\n\n\treturn {\n\t\tid: \"third-parties\",\n\t\ttitle: \"Third-Party Services\",\n\t\tbody,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nconst RIGHTS_LABELS: Record<string, string> = {\n\taccess: \"Right to access your personal data\",\n\trectification: \"Right to correct inaccurate data\",\n\terasure: \"Right to request deletion of your data\",\n\tportability: \"Right to receive your data in a portable format\",\n\trestriction: \"Right to restrict how we process your data\",\n\tobjection: \"Right to object to processing\",\n\topt_out_sale: \"Right to opt out of the sale of your personal information\",\n\tnon_discrimination:\n\t\t\"Right to non-discriminatory treatment for exercising your rights\",\n};\n\nexport function buildUserRights(config: PrivacyPolicyConfig): PolicySection {\n\tconst lines = config.userRights.map((right) => {\n\t\tconst label = RIGHTS_LABELS[right] ?? right;\n\t\treturn `- ${label}`;\n\t});\n\n\treturn {\n\t\tid: \"user-rights\",\n\t\ttitle: \"Your Rights\",\n\t\tbody: `You have the following rights regarding your personal data:\\n\\n${lines.join(\"\\n\")}`,\n\t};\n}\n","import { renderHTML } from \"./renderers/html\";\nimport { renderMarkdown } from \"./renderers/markdown\";\nimport {\n\tbuildCcpaSupplement,\n\tbuildChildrenPrivacy,\n\tbuildContact,\n\tbuildCookies,\n\tbuildDataCollected,\n\tbuildDataRetention,\n\tbuildGdprSupplement,\n\tbuildIntroduction,\n\tbuildLegalBasis,\n\tbuildThirdParties,\n\tbuildUserRights,\n} from \"./templates/privacy\";\nimport type {\n\tCompileOptions,\n\tOutputFormat,\n\tPolicySection,\n\tPrivacyPolicyConfig,\n} from \"./types\";\n\nconst SECTION_BUILDERS: ((\n\tconfig: PrivacyPolicyConfig,\n) => PolicySection | null)[] = [\n\tbuildIntroduction,\n\tbuildChildrenPrivacy,\n\tbuildDataCollected,\n\tbuildLegalBasis,\n\tbuildDataRetention,\n\tbuildCookies,\n\tbuildThirdParties,\n\tbuildUserRights,\n\tbuildGdprSupplement,\n\tbuildCcpaSupplement,\n\tbuildContact,\n];\n\nexport function compilePrivacyPolicy(\n\tconfig: PrivacyPolicyConfig,\n\toptions: CompileOptions = { formats: [\"markdown\"] },\n): { format: OutputFormat; content: string; sections: PolicySection[] }[] {\n\tconst sections = SECTION_BUILDERS.map((builder) => builder(config)).filter(\n\t\t(s): s is PolicySection => s !== null,\n\t);\n\n\treturn options.formats.map((format) => {\n\t\tswitch (format) {\n\t\t\tcase \"markdown\":\n\t\t\t\treturn { format, content: renderMarkdown(sections), sections };\n\t\t\tcase \"html\":\n\t\t\t\treturn { format, content: renderHTML(sections), sections };\n\t\t\tcase \"pdf\":\n\t\t\t\tthrow new Error(\"pdf format is not yet implemented\");\n\t\t\tcase \"jsx\":\n\t\t\t\tthrow new Error(\"jsx format is not yet implemented\");\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Unsupported format: ${format}`);\n\t\t}\n\t});\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildAcceptance(config: TermsOfServiceConfig): PolicySection {\n\tconst methodList = config.acceptance.methods.map((m) => `- ${m}`).join(\"\\n\");\n\n\treturn {\n\t\tid: \"tos-acceptance\",\n\t\ttitle: \"Acceptance of Terms\",\n\t\tbody: `By accessing or using our services, you agree to be bound by these Terms. You accept these Terms by:\\n\\n${methodList}\\n\\nIf you do not agree to these Terms, you may not use our services.`,\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildAccounts(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.accounts) return null;\n\n\tconst {\n\t\tregistrationRequired,\n\t\tuserResponsibleForCredentials,\n\t\tcompanyCanTerminate,\n\t} = config.accounts;\n\n\tconst lines: string[] = [];\n\n\tif (registrationRequired) {\n\t\tlines.push(\n\t\t\t\"You must create an account to access certain features of our services. You agree to provide accurate, current, and complete information during registration.\",\n\t\t);\n\t}\n\n\tif (userResponsibleForCredentials) {\n\t\tlines.push(\n\t\t\t\"You are responsible for maintaining the confidentiality of your account credentials and for all activities that occur under your account. You must notify us immediately of any unauthorized use of your account.\",\n\t\t);\n\t}\n\n\tif (companyCanTerminate) {\n\t\tlines.push(\n\t\t\t`${config.company.name} reserves the right to suspend or terminate your account at any time, with or without notice, for any reason including violation of these Terms.`,\n\t\t);\n\t}\n\n\treturn {\n\t\tid: \"tos-accounts\",\n\t\ttitle: \"Accounts\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildAvailability(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.availability) return null;\n\n\tconst lines: string[] = [];\n\n\tif (config.availability.noUptimeGuarantee) {\n\t\tlines.push(\n\t\t\t\"We do not guarantee that our services will be available at all times. Our services may be subject to interruptions, delays, or errors.\",\n\t\t);\n\t}\n\n\tif (config.availability.maintenanceWindows) {\n\t\tlines.push(`**Maintenance:** ${config.availability.maintenanceWindows}`);\n\t}\n\n\treturn {\n\t\tid: \"tos-availability\",\n\t\ttitle: \"Service Availability\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildChangesToTerms(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.changesPolicy) return null;\n\n\tconst { noticeMethod, noticePeriodDays } = config.changesPolicy;\n\n\tconst periodText = noticePeriodDays\n\t\t? ` at least **${noticePeriodDays} days** before they take effect`\n\t\t: \" before they take effect\";\n\n\treturn {\n\t\tid: \"tos-changes\",\n\t\ttitle: \"Changes to These Terms\",\n\t\tbody: `We may update these Terms from time to time. We will notify you of material changes via ${noticeMethod}${periodText}. Your continued use of our services after changes become effective constitutes your acceptance of the revised Terms.`,\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildContact(config: TermsOfServiceConfig): PolicySection {\n\treturn {\n\t\tid: \"tos-contact\",\n\t\ttitle: \"Contact Us\",\n\t\tbody: `If you have any questions about these Terms, please contact us at:\n\n**${config.company.legalName}**\n${config.company.address}\n${config.company.contact}`,\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildDisclaimers(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.disclaimers) return null;\n\n\tconst lines: string[] = [];\n\n\tif (config.disclaimers.serviceProvidedAsIs) {\n\t\tlines.push(\n\t\t\t'OUR SERVICES ARE PROVIDED \"AS IS\" AND \"AS AVAILABLE\" WITHOUT WARRANTIES OF ANY KIND.',\n\t\t);\n\t}\n\n\tif (config.disclaimers.noWarranties) {\n\t\tlines.push(\n\t\t\t`${config.company.legalName} EXPRESSLY DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.`,\n\t\t);\n\t}\n\n\treturn {\n\t\tid: \"tos-disclaimers\",\n\t\ttitle: \"Disclaimer of Warranties\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildDisputeResolution(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.disputeResolution) return null;\n\n\tconst { method, venue, classActionWaiver } = config.disputeResolution;\n\n\tconst methodDescriptions: Record<string, string> = {\n\t\tarbitration:\n\t\t\t\"Any disputes arising out of or relating to these Terms or our services shall be resolved by binding arbitration rather than in court.\",\n\t\tlitigation:\n\t\t\t\"Any disputes arising out of or relating to these Terms or our services shall be resolved through litigation in a court of competent jurisdiction.\",\n\t\tmediation:\n\t\t\t\"Any disputes arising out of or relating to these Terms or our services shall first be submitted to non-binding mediation before pursuing other remedies.\",\n\t};\n\n\tconst lines: string[] = [\n\t\tmethodDescriptions[method] ??\n\t\t\t\"Disputes arising out of or relating to these Terms shall be resolved as described below.\",\n\t];\n\n\tif (venue) {\n\t\tlines.push(`**Venue:** ${venue}`);\n\t}\n\n\tif (classActionWaiver) {\n\t\tlines.push(\n\t\t\t\"**Class Action Waiver:** You agree that any dispute resolution proceedings will be conducted only on an individual basis and not in a class, consolidated, or representative action.\",\n\t\t);\n\t}\n\n\treturn {\n\t\tid: \"tos-dispute-resolution\",\n\t\ttitle: \"Dispute Resolution\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildEligibility(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.eligibility) return null;\n\n\tconst { minimumAge, jurisdictionRestrictions } = config.eligibility;\n\n\tlet body = `You must be at least **${minimumAge} years old** to use our services. By using our services, you represent and warrant that you meet this age requirement.`;\n\n\tif (jurisdictionRestrictions && jurisdictionRestrictions.length > 0) {\n\t\tconst list = jurisdictionRestrictions.map((r) => `- ${r}`).join(\"\\n\");\n\t\tbody += `\\n\\nOur services are not available in the following jurisdictions:\\n\\n${list}`;\n\t}\n\n\treturn {\n\t\tid: \"tos-eligibility\",\n\t\ttitle: \"Eligibility\",\n\t\tbody,\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildGoverningLaw(config: TermsOfServiceConfig): PolicySection {\n\treturn {\n\t\tid: \"tos-governing-law\",\n\t\ttitle: \"Governing Law\",\n\t\tbody: `These Terms shall be governed by and construed in accordance with the laws of **${config.governingLaw.jurisdiction}**, without regard to its conflict of law provisions.`,\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildIndemnification(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.indemnification) return null;\n\n\tconst lines: string[] = [];\n\n\tif (config.indemnification.userIndemnifiesCompany) {\n\t\tlines.push(\n\t\t\t`You agree to indemnify and hold harmless ${config.company.legalName} and its officers, directors, employees, and agents from and against any claims, liabilities, damages, losses, and expenses arising out of or in any way connected with your access to or use of our services.`,\n\t\t);\n\t}\n\n\tif (config.indemnification.scope) {\n\t\tlines.push(`**Scope:** ${config.indemnification.scope}`);\n\t}\n\n\treturn {\n\t\tid: \"tos-indemnification\",\n\t\ttitle: \"Indemnification\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildIntellectualProperty(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.intellectualProperty) return null;\n\n\tconst { companyOwnsService, usersMayNotCopy } = config.intellectualProperty;\n\n\tconst lines: string[] = [];\n\n\tif (companyOwnsService) {\n\t\tlines.push(\n\t\t\t`The services and all content, features, and functionality (including but not limited to text, graphics, logos, and software) are owned by ${config.company.legalName} and are protected by intellectual property laws.`,\n\t\t);\n\t}\n\n\tif (usersMayNotCopy) {\n\t\tlines.push(\n\t\t\t\"You may not copy, modify, distribute, sell, or lease any part of our services or included software, nor may you reverse engineer or attempt to extract the source code of that software.\",\n\t\t);\n\t}\n\n\treturn {\n\t\tid: \"tos-intellectual-property\",\n\t\ttitle: \"Intellectual Property\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildIntroduction(config: TermsOfServiceConfig): PolicySection {\n\tconst privacyLine = config.privacyPolicyUrl\n\t\t? `\\n\\nFor information about how we collect and use your data, please review our [Privacy Policy](${config.privacyPolicyUrl}).`\n\t\t: \"\";\n\n\treturn {\n\t\tid: \"tos-introduction\",\n\t\ttitle: \"Terms of Service\",\n\t\tbody: `These Terms of Service (\"Terms\") govern your access to and use of the services provided by ${config.company.name} (\"${config.company.name}\", \"we\", \"us\", or \"our\"). By using our services, you agree to these Terms.\n\n**Effective Date:** ${config.effectiveDate}${privacyLine}`,\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildLimitationOfLiability(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.limitationOfLiability) return null;\n\n\tconst lines: string[] = [];\n\n\tif (config.limitationOfLiability.excludesIndirectDamages) {\n\t\tlines.push(\n\t\t\t`TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, ${config.company.legalName.toUpperCase()} SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR ANY LOSS OF PROFITS OR REVENUES, WHETHER INCURRED DIRECTLY OR INDIRECTLY, OR ANY LOSS OF DATA, USE, GOODWILL, OR OTHER INTANGIBLE LOSSES.`,\n\t\t);\n\t}\n\n\tif (config.limitationOfLiability.liabilityCap) {\n\t\tlines.push(\n\t\t\t`**Liability Cap:** ${config.limitationOfLiability.liabilityCap}`,\n\t\t);\n\t}\n\n\treturn {\n\t\tid: \"tos-limitation-of-liability\",\n\t\ttitle: \"Limitation of Liability\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildPayments(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.payments || !config.payments.hasPaidFeatures) return null;\n\n\tconst lines: string[] = [\n\t\t\"Some features of our services require payment. By selecting a paid plan, you agree to pay all applicable fees.\",\n\t];\n\n\tif (config.payments.refundPolicy) {\n\t\tlines.push(`**Refunds:** ${config.payments.refundPolicy}`);\n\t}\n\n\tif (config.payments.priceChangesNotice) {\n\t\tlines.push(`**Price Changes:** ${config.payments.priceChangesNotice}`);\n\t}\n\n\treturn {\n\t\tid: \"tos-payments\",\n\t\ttitle: \"Payments and Billing\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildProhibitedUse(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.prohibitedUses || config.prohibitedUses.length === 0) return null;\n\n\tconst list = config.prohibitedUses.map((u) => `- ${u}`).join(\"\\n\");\n\n\treturn {\n\t\tid: \"tos-prohibited-use\",\n\t\ttitle: \"Prohibited Uses\",\n\t\tbody: `You agree not to use our services for any of the following purposes:\\n\\n${list}`,\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildTermination(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.termination) return null;\n\n\tconst { companyCanTerminate, userCanTerminate, effectOfTermination } =\n\t\tconfig.termination;\n\n\tconst lines: string[] = [];\n\n\tif (companyCanTerminate) {\n\t\tlines.push(\n\t\t\t`${config.company.name} may suspend or terminate your access to the services at any time, with or without cause, and with or without notice.`,\n\t\t);\n\t}\n\n\tif (userCanTerminate) {\n\t\tlines.push(\n\t\t\t\"You may terminate your account at any time by discontinuing use of our services or by contacting us to close your account.\",\n\t\t);\n\t}\n\n\tif (effectOfTermination) {\n\t\tlines.push(`**Effect of Termination:** ${effectOfTermination}`);\n\t}\n\n\treturn {\n\t\tid: \"tos-termination\",\n\t\ttitle: \"Termination\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildThirdPartyServices(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.thirdPartyServices || config.thirdPartyServices.length === 0)\n\t\treturn null;\n\n\tconst list = config.thirdPartyServices\n\t\t.map((s) => `- **${s.name}** — ${s.purpose}`)\n\t\t.join(\"\\n\");\n\n\treturn {\n\t\tid: \"tos-third-party-services\",\n\t\ttitle: \"Third-Party Services\",\n\t\tbody: `Our services may integrate with or link to third-party services. Your use of those services is governed by their own terms and policies.\\n\\n${list}`,\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildUserContent(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.userContent) return null;\n\n\tconst {\n\t\tusersOwnContent,\n\t\tlicenseGrantedToCompany,\n\t\tlicenseDescription,\n\t\tcompanyCanRemoveContent,\n\t} = config.userContent;\n\n\tconst lines: string[] = [];\n\n\tif (usersOwnContent) {\n\t\tlines.push(\n\t\t\t'You retain ownership of any content you submit, post, or display on or through our services (\"User Content\").',\n\t\t);\n\t}\n\n\tif (licenseGrantedToCompany) {\n\t\tconst desc = licenseDescription\n\t\t\t? licenseDescription\n\t\t\t: \"a worldwide, royalty-free, non-exclusive license to use, reproduce, modify, and distribute your User Content in connection with operating and improving our services\";\n\t\tlines.push(\n\t\t\t`By submitting User Content, you grant ${config.company.name} ${desc}.`,\n\t\t);\n\t}\n\n\tif (companyCanRemoveContent) {\n\t\tlines.push(\n\t\t\t`${config.company.name} reserves the right to remove any User Content that violates these Terms or that we find objectionable, at our sole discretion.`,\n\t\t);\n\t}\n\n\treturn {\n\t\tid: \"tos-user-content\",\n\t\ttitle: \"User Content\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import { renderHTML } from \"./renderers/html\";\nimport { renderMarkdown } from \"./renderers/markdown\";\nimport { buildAcceptance } from \"./templates/terms/acceptance\";\nimport { buildAccounts } from \"./templates/terms/accounts\";\nimport { buildAvailability } from \"./templates/terms/availability\";\nimport { buildChangesToTerms } from \"./templates/terms/changes-to-terms\";\nimport { buildContact } from \"./templates/terms/contact\";\nimport { buildDisclaimers } from \"./templates/terms/disclaimers\";\nimport { buildDisputeResolution } from \"./templates/terms/dispute-resolution\";\nimport { buildEligibility } from \"./templates/terms/eligibility\";\nimport { buildGoverningLaw } from \"./templates/terms/governing-law\";\nimport { buildIndemnification } from \"./templates/terms/indemnification\";\nimport { buildIntellectualProperty } from \"./templates/terms/intellectual-property\";\nimport { buildIntroduction } from \"./templates/terms/introduction\";\nimport { buildLimitationOfLiability } from \"./templates/terms/limitation-of-liability\";\nimport { buildPayments } from \"./templates/terms/payments\";\nimport { buildProhibitedUse } from \"./templates/terms/prohibited-use\";\nimport { buildTermination } from \"./templates/terms/termination\";\nimport { buildThirdPartyServices } from \"./templates/terms/third-party-services\";\nimport { buildUserContent } from \"./templates/terms/user-content\";\nimport type {\n\tCompileOptions,\n\tOutputFormat,\n\tPolicySection,\n\tTermsOfServiceConfig,\n} from \"./types\";\n\nconst SECTION_BUILDERS: ((\n\tconfig: TermsOfServiceConfig,\n) => PolicySection | null)[] = [\n\tbuildIntroduction,\n\tbuildAcceptance,\n\tbuildEligibility,\n\tbuildAccounts,\n\tbuildProhibitedUse,\n\tbuildUserContent,\n\tbuildIntellectualProperty,\n\tbuildPayments,\n\tbuildAvailability,\n\tbuildTermination,\n\tbuildDisclaimers,\n\tbuildLimitationOfLiability,\n\tbuildIndemnification,\n\tbuildThirdPartyServices,\n\tbuildDisputeResolution,\n\tbuildGoverningLaw,\n\tbuildChangesToTerms,\n\tbuildContact,\n];\n\nexport function compileTermsOfService(\n\tconfig: TermsOfServiceConfig,\n\toptions: CompileOptions = { formats: [\"markdown\"] },\n): { format: OutputFormat; content: string; sections: PolicySection[] }[] {\n\tconst sections = SECTION_BUILDERS.map((builder) => builder(config)).filter(\n\t\t(s): s is PolicySection => s !== null,\n\t);\n\n\treturn options.formats.map((format) => {\n\t\tswitch (format) {\n\t\t\tcase \"markdown\":\n\t\t\t\treturn { format, content: renderMarkdown(sections), sections };\n\t\t\tcase \"html\":\n\t\t\t\treturn { format, content: renderHTML(sections), sections };\n\t\t\tcase \"pdf\":\n\t\t\t\tthrow new Error(\"pdf format is not yet implemented\");\n\t\t\tcase \"jsx\":\n\t\t\t\tthrow new Error(\"jsx format is not yet implemented\");\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Unsupported format: ${format}`);\n\t\t}\n\t});\n}\n","export type OutputFormat = \"markdown\" | \"html\" | \"pdf\" | \"jsx\";\n\nexport type CompileOptions = { formats: OutputFormat[] };\n\nexport type PolicySection = {\n\tid: string;\n\ttitle: string;\n\tbody: string;\n};\n\nexport type Jurisdiction = \"us\" | \"eu\" | \"ca\" | \"au\" | \"nz\" | \"other\";\n\nexport type CompanyConfig = {\n\tname: string;\n\tlegalName: string;\n\taddress: string;\n\tcontact: string;\n};\n\nexport type PrivacyPolicyConfig = {\n\teffectiveDate: string;\n\tcompany: CompanyConfig;\n\tdataCollected: Record<string, string[]>;\n\tlegalBasis: string;\n\tretention: Record<string, string>;\n\tcookies: { essential: boolean; analytics: boolean; marketing: boolean };\n\tthirdParties: { name: string; purpose: string }[];\n\tuserRights: string[];\n\tjurisdictions: Jurisdiction[];\n\t// optional children-specific policy\n\tchildren?: {\n\t\tunderAge: number;\n\t\tnoticeUrl?: string;\n\t};\n};\n\nexport type DisputeResolutionMethod =\n\t| \"arbitration\"\n\t| \"litigation\"\n\t| \"mediation\";\n\nexport type TermsOfServiceConfig = {\n\teffectiveDate: string;\n\tcompany: CompanyConfig;\n\tacceptance: { methods: string[] };\n\teligibility?: { minimumAge: number; jurisdictionRestrictions?: string[] };\n\taccounts?: {\n\t\tregistrationRequired: boolean;\n\t\tuserResponsibleForCredentials: boolean;\n\t\tcompanyCanTerminate: boolean;\n\t};\n\tprohibitedUses?: string[];\n\tuserContent?: {\n\t\tusersOwnContent: boolean;\n\t\tlicenseGrantedToCompany: boolean;\n\t\tlicenseDescription?: string;\n\t\tcompanyCanRemoveContent: boolean;\n\t};\n\tintellectualProperty?: {\n\t\tcompanyOwnsService: boolean;\n\t\tusersMayNotCopy: boolean;\n\t};\n\tpayments?: {\n\t\thasPaidFeatures: boolean;\n\t\trefundPolicy?: string;\n\t\tpriceChangesNotice?: string;\n\t};\n\tavailability?: { noUptimeGuarantee: boolean; maintenanceWindows?: string };\n\ttermination?: {\n\t\tcompanyCanTerminate: boolean;\n\t\tuserCanTerminate: boolean;\n\t\teffectOfTermination?: string;\n\t};\n\tdisclaimers?: { serviceProvidedAsIs: boolean; noWarranties: boolean };\n\tlimitationOfLiability?: {\n\t\texcludesIndirectDamages: boolean;\n\t\tliabilityCap?: string;\n\t};\n\tindemnification?: { userIndemnifiesCompany: boolean; scope?: string };\n\tthirdPartyServices?: { name: string; purpose: string }[];\n\tdisputeResolution?: {\n\t\tmethod: DisputeResolutionMethod;\n\t\tvenue?: string;\n\t\tclassActionWaiver?: boolean;\n\t};\n\tgoverningLaw: { jurisdiction: string };\n\tchangesPolicy?: { noticeMethod: string; noticePeriodDays?: number };\n\tprivacyPolicyUrl?: string;\n};\n\nexport type CookiePolicyConfig = {\n\teffectiveDate: string;\n\tcompany: CompanyConfig;\n\tcookies: {\n\t\tessential: boolean;\n\t\tanalytics: boolean;\n\t\tfunctional: boolean;\n\t\tmarketing: boolean;\n\t};\n\tthirdParties?: { name: string; purpose: string; policyUrl?: string }[];\n\ttrackingTechnologies?: string[];\n\tconsentMechanism?: {\n\t\thasBanner: boolean;\n\t\thasPreferencePanel: boolean;\n\t\tcanWithdraw: boolean;\n\t};\n\tjurisdictions: Jurisdiction[];\n};\n\nexport type PolicyInput =\n\t| ({ type: \"privacy\" } & PrivacyPolicyConfig)\n\t| ({ type: \"terms\" } & TermsOfServiceConfig)\n\t| ({ type: \"cookie\" } & CookiePolicyConfig);\n\nexport type OpenPolicyConfig = {\n\tcompany: CompanyConfig;\n\tprivacy?: Omit<PrivacyPolicyConfig, \"company\">;\n\tterms?: Omit<TermsOfServiceConfig, \"company\">;\n\tcookie?: Omit<CookiePolicyConfig, \"company\">;\n};\n\nexport function isOpenPolicyConfig(value: unknown): value is OpenPolicyConfig {\n\tif (value === null || typeof value !== \"object\") return false;\n\tconst obj = value as Record<string, unknown>;\n\treturn (\n\t\t\"company\" in obj &&\n\t\t!(\"effectiveDate\" in obj) &&\n\t\t(\"privacy\" in obj || \"terms\" in obj || \"cookie\" in obj)\n\t);\n}\n\nexport type ValidationIssue = {\n\tlevel: \"error\" | \"warning\";\n\tmessage: string;\n};\n","import type { PrivacyPolicyConfig, ValidationIssue } from \"./types\";\n\nexport function validatePrivacyPolicy(\n\tconfig: PrivacyPolicyConfig,\n): ValidationIssue[] {\n\tconst issues: ValidationIssue[] = [];\n\n\t// Required fields\n\tif (!config.effectiveDate)\n\t\tissues.push({ level: \"error\", message: \"effectiveDate is required\" });\n\tif (!config.company.name)\n\t\tissues.push({ level: \"error\", message: \"company.name is required\" });\n\tif (!config.company.legalName)\n\t\tissues.push({ level: \"error\", message: \"company.legalName is required\" });\n\tif (!config.company.address)\n\t\tissues.push({ level: \"error\", message: \"company.address is required\" });\n\tif (!config.company.contact)\n\t\tissues.push({ level: \"error\", message: \"company.contact is required\" });\n\tif (Object.keys(config.dataCollected).length === 0)\n\t\tissues.push({\n\t\t\tlevel: \"error\",\n\t\t\tmessage: \"dataCollected must have at least one entry\",\n\t\t});\n\tif (config.userRights.length === 0)\n\t\tissues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage: \"userRights is empty — consider listing applicable rights\",\n\t\t});\n\n\t// GDPR checks\n\tif (config.jurisdictions.includes(\"eu\")) {\n\t\tif (!config.legalBasis)\n\t\t\tissues.push({ level: \"error\", message: \"GDPR requires a legalBasis\" });\n\t\tfor (const right of [\n\t\t\t\"access\",\n\t\t\t\"rectification\",\n\t\t\t\"erasure\",\n\t\t\t\"portability\",\n\t\t\t\"restriction\",\n\t\t\t\"objection\",\n\t\t]) {\n\t\t\tif (!config.userRights.includes(right))\n\t\t\t\tissues.push({\n\t\t\t\t\tlevel: \"warning\",\n\t\t\t\t\tmessage: `GDPR recommends including the \"${right}\" right`,\n\t\t\t\t});\n\t\t}\n\t}\n\n\t// CCPA checks\n\tif (config.jurisdictions.includes(\"ca\")) {\n\t\tfor (const right of [\n\t\t\t\"access\",\n\t\t\t\"erasure\",\n\t\t\t\"opt_out_sale\",\n\t\t\t\"non_discrimination\",\n\t\t]) {\n\t\t\tif (!config.userRights.includes(right))\n\t\t\t\tissues.push({\n\t\t\t\t\tlevel: \"warning\",\n\t\t\t\t\tmessage: `CCPA recommends including the \"${right}\" right`,\n\t\t\t\t});\n\t\t}\n\t}\n\n\t// children config sanity\n\tif (config.children) {\n\t\tif (config.children.underAge <= 0) {\n\t\t\tissues.push({\n\t\t\t\tlevel: \"error\",\n\t\t\t\tmessage: \"children.underAge must be a positive number\",\n\t\t\t});\n\t\t}\n\t}\n\n\treturn issues;\n}\n","import type { CookiePolicyConfig, ValidationIssue } from \"./types\";\n\nexport function validateCookiePolicy(\n\tconfig: CookiePolicyConfig,\n): ValidationIssue[] {\n\tconst issues: ValidationIssue[] = [];\n\n\t// Required fields\n\tif (!config.effectiveDate)\n\t\tissues.push({ level: \"error\", message: \"effectiveDate is required\" });\n\tif (!config.company.name)\n\t\tissues.push({ level: \"error\", message: \"company.name is required\" });\n\tif (!config.company.legalName)\n\t\tissues.push({ level: \"error\", message: \"company.legalName is required\" });\n\tif (!config.company.address)\n\t\tissues.push({ level: \"error\", message: \"company.address is required\" });\n\tif (!config.company.contact)\n\t\tissues.push({ level: \"error\", message: \"company.contact is required\" });\n\n\tconst { essential, analytics, functional, marketing } = config.cookies;\n\tif (!essential && !analytics && !functional && !marketing) {\n\t\tissues.push({\n\t\t\tlevel: \"error\",\n\t\t\tmessage:\n\t\t\t\t\"At least one cookie type must be enabled (essential, analytics, functional, or marketing)\",\n\t\t});\n\t}\n\n\t// Advisory checks\n\tif (!config.consentMechanism) {\n\t\tissues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage:\n\t\t\t\t\"consentMechanism is not provided — consider describing how users can manage cookie consent\",\n\t\t});\n\t}\n\n\t// GDPR consent withdrawal check\n\tif (\n\t\tconfig.jurisdictions.includes(\"eu\") &&\n\t\tconfig.consentMechanism &&\n\t\t!config.consentMechanism.canWithdraw\n\t) {\n\t\tissues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage:\n\t\t\t\t\"GDPR requires that users can withdraw cookie consent — consider setting consentMechanism.canWithdraw to true\",\n\t\t});\n\t}\n\n\treturn issues;\n}\n","import type { TermsOfServiceConfig, ValidationIssue } from \"./types\";\n\nexport function validateTermsOfService(\n\tconfig: TermsOfServiceConfig,\n): ValidationIssue[] {\n\tconst issues: ValidationIssue[] = [];\n\n\t// Required fields\n\tif (!config.effectiveDate)\n\t\tissues.push({ level: \"error\", message: \"effectiveDate is required\" });\n\tif (!config.company.name)\n\t\tissues.push({ level: \"error\", message: \"company.name is required\" });\n\tif (!config.company.legalName)\n\t\tissues.push({ level: \"error\", message: \"company.legalName is required\" });\n\tif (!config.company.address)\n\t\tissues.push({ level: \"error\", message: \"company.address is required\" });\n\tif (!config.company.contact)\n\t\tissues.push({ level: \"error\", message: \"company.contact is required\" });\n\tif (!config.governingLaw.jurisdiction)\n\t\tissues.push({\n\t\t\tlevel: \"error\",\n\t\t\tmessage: \"governingLaw.jurisdiction is required\",\n\t\t});\n\n\t// Advisory checks\n\tif (!config.disclaimers) {\n\t\tissues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage:\n\t\t\t\t\"disclaimers is missing — consider adding a disclaimer of warranties\",\n\t\t});\n\t}\n\tif (!config.limitationOfLiability) {\n\t\tissues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage:\n\t\t\t\t\"limitationOfLiability is missing — consider adding a limitation of liability clause\",\n\t\t});\n\t}\n\tif (config.acceptance.methods.length === 0) {\n\t\tissues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage:\n\t\t\t\t\"acceptance.methods is empty — consider listing how users accept these Terms\",\n\t\t});\n\t}\n\n\treturn issues;\n}\n","export { compileCookiePolicy } from \"./cookie\";\nexport { compilePrivacyPolicy } from \"./privacy\";\nexport { compileTermsOfService } from \"./terms\";\nexport type {\n\tCompanyConfig,\n\tCompileOptions,\n\tCookiePolicyConfig,\n\tDisputeResolutionMethod,\n\tJurisdiction,\n\tOpenPolicyConfig,\n\tOutputFormat,\n\tPolicyInput,\n\tPolicySection,\n\tPrivacyPolicyConfig,\n\tTermsOfServiceConfig,\n\tValidationIssue,\n} from \"./types\";\nexport { isOpenPolicyConfig } from \"./types\";\nexport { validatePrivacyPolicy } from \"./validate\";\nexport { validateCookiePolicy } from \"./validate-cookie\";\nexport { validateTermsOfService } from \"./validate-terms\";\n\nimport { compileCookiePolicy } from \"./cookie\";\nimport { compilePrivacyPolicy } from \"./privacy\";\nimport { compileTermsOfService } from \"./terms\";\nimport type { CompileOptions, OpenPolicyConfig, PolicyInput } from \"./types\";\n\nexport function expandOpenPolicyConfig(\n\tconfig: OpenPolicyConfig,\n): PolicyInput[] {\n\tconst inputs: PolicyInput[] = [];\n\tif (config.privacy) {\n\t\tinputs.push({\n\t\t\ttype: \"privacy\",\n\t\t\tcompany: config.company,\n\t\t\t...config.privacy,\n\t\t});\n\t}\n\tif (config.terms) {\n\t\tinputs.push({ type: \"terms\", company: config.company, ...config.terms });\n\t}\n\tif (config.cookie) {\n\t\tinputs.push({ type: \"cookie\", company: config.company, ...config.cookie });\n\t}\n\treturn inputs;\n}\n\nexport function compilePolicy(input: PolicyInput, options?: CompileOptions) {\n\tswitch (input.type) {\n\t\tcase \"privacy\": {\n\t\t\tconst { type: _, ...config } = input;\n\t\t\treturn compilePrivacyPolicy(config, options);\n\t\t}\n\t\tcase \"terms\": {\n\t\t\tconst { type: _, ...config } = input;\n\t\t\treturn compileTermsOfService(config, options);\n\t\t}\n\t\tcase \"cookie\": {\n\t\t\tconst { type: _, ...config } = input;\n\t\t\treturn compileCookiePolicy(config, options);\n\t\t}\n\t}\n}\n"],"mappings":";;AAEA,SAAgB,eAAe,UAAmC;AACjE,QAAO,SACL,KAAK,YAAY,MAAM,QAAQ,MAAM,MAAM,QAAQ,OAAO,CAC1D,KAAK,cAAc;;;;ACDtB,SAAgB,WAAW,UAAmC;AAE7D,QAAO,OADU,eAAe,SAAS,CAClB;;;;ACJxB,SAAgB,aAAa,QAAkD;AAC9E,KAAI,CAAC,OAAO,iBAAkB,QAAO;CAErC,MAAM,aAAuB,EAAE;AAE/B,KAAI,OAAO,iBAAiB,UAC3B,YAAW,KACV,mHACA;AAEF,KAAI,OAAO,iBAAiB,mBAC3B,YAAW,KACV,2EACA;AAEF,KAAI,OAAO,iBAAiB,YAC3B,YAAW,KACV,2FACA;AAQF,QAAO;EACN,IAAI;EACJ,OAAO;EACP,MAAM,2GAPN,WAAW,SAAS,IACjB,qDAAqD,WAAW,KAAK,MAAM,KAAK,IAAI,CAAC,KAAK,KAAK,KAC/F,GAKmH;;;EAGtH;;;;AChCF,SAAgBA,eAAa,QAA2C;AACvE,QAAO;EACN,IAAI;EACJ,OAAO;EACP,MAAM;;IAEJ,OAAO,QAAQ,UAAU;EAC3B,OAAO,QAAQ,QAAQ;EACvB,OAAO,QAAQ;EACf;;;;ACTF,SAAgB,oBACf,SACgB;AAChB,QAAO;EACN,IAAI;EACJ,OAAO;EACP,MAAM;;;;;;EAMN;;;;ACZF,SAAgB,iBAAiB,QAA2C;CAC3E,MAAM,QAAkB,EAAE;AAE1B,KAAI,OAAO,QAAQ,UAClB,OAAM,KACL,+OACA;AAEF,KAAI,OAAO,QAAQ,UAClB,OAAM,KACL,0PACA;AAEF,KAAI,OAAO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,OAAO;EAAS,GAAG,OAAO;EAAQ,CAAC;AAE3E,QAAO;;AAGR,SAAgB,cAAc,OAAoB,SAA0B;AAC3E,SAAQ,MAAM,MAAd;EACC,KAAK,WAAW;GACf,MAAM,EAAE,MAAM,GAAG,GAAG,WAAW;AAC/B,UAAO,qBAAqB,QAAQ,QAAQ;;EAE7C,KAAK,SAAS;GACb,MAAM,EAAE,MAAM,GAAG,GAAG,WAAW;AAC/B,UAAO,sBAAsB,QAAQ,QAAQ;;EAE9C,KAAK,UAAU;GACd,MAAM,EAAE,MAAM,GAAG,GAAG,WAAW;AAC/B,UAAO,oBAAoB,QAAQ,QAAQ"}
1
+ {"version":3,"file":"index.js","names":["buildIntroduction","buildThirdParties","buildContact","SECTION_BUILDERS","buildIntroduction","buildContact","SECTION_BUILDERS"],"sources":["../src/documents/helpers.ts","../src/documents/cookie.ts","../src/documents/privacy.ts","../src/documents/terms.ts","../src/documents/index.ts","../src/types.ts","../src/validate.ts","../src/validate-cookie.ts","../src/validate-terms.ts","../src/index.ts"],"sourcesContent":["import type {\n\tBoldNode,\n\tContentNode,\n\tDocumentSection,\n\tHeadingNode,\n\tInlineNode,\n\tItalicNode,\n\tLinkNode,\n\tListItemNode,\n\tListNode,\n\tNodeContext,\n\tParagraphNode,\n\tTextNode,\n} from \"./types\";\n\nexport const heading = (\n\tvalue: string,\n\tlevelOrContext?: (1 | 2 | 3 | 4 | 5 | 6) | NodeContext,\n\tcontext?: NodeContext,\n): HeadingNode => {\n\tconst level = typeof levelOrContext === \"number\" ? levelOrContext : undefined;\n\tconst ctx = typeof levelOrContext === \"object\" ? levelOrContext : context;\n\treturn {\n\t\ttype: \"heading\",\n\t\t...(level !== undefined && { level }),\n\t\tvalue,\n\t\t...(ctx && { context: ctx }),\n\t};\n};\nexport const text = (value: string, context?: NodeContext): TextNode => ({\n\ttype: \"text\",\n\tvalue,\n\t...(context && { context }),\n});\nexport const bold = (value: string, context?: NodeContext): BoldNode => ({\n\ttype: \"bold\",\n\tvalue,\n\t...(context && { context }),\n});\nexport const italic = (value: string, context?: NodeContext): ItalicNode => ({\n\ttype: \"italic\",\n\tvalue,\n\t...(context && { context }),\n});\nexport const link = (\n\thref: string,\n\tvalue: string,\n\tcontext?: NodeContext,\n): LinkNode => ({ type: \"link\", href, value, ...(context && { context }) });\nexport const p = (\n\tchildren: (string | InlineNode)[],\n\tcontext?: NodeContext,\n): ParagraphNode => ({\n\ttype: \"paragraph\",\n\tchildren: children.map((c) => (typeof c === \"string\" ? text(c) : c)),\n\t...(context && { context }),\n});\nexport const li = (\n\tchildren: (string | InlineNode | ListNode)[],\n\tcontext?: NodeContext,\n): ListItemNode => ({\n\ttype: \"listItem\",\n\tchildren: children.map((c) => (typeof c === \"string\" ? text(c) : c)),\n\t...(context && { context }),\n});\nexport const ul = (items: ListItemNode[], context?: NodeContext): ListNode => ({\n\ttype: \"list\",\n\titems,\n\t...(context && { context }),\n});\nexport const ol = (items: ListItemNode[], context?: NodeContext): ListNode => ({\n\ttype: \"list\",\n\tordered: true,\n\titems,\n\t...(context && { context }),\n});\nexport const section = (\n\tid: string,\n\tcontent: ContentNode[],\n\tcontext?: NodeContext,\n): DocumentSection => ({\n\ttype: \"section\",\n\tid,\n\tcontent,\n\t...(context && { context }),\n});\n","import type { CookiePolicyConfig } from \"../types\";\nimport { bold, heading, li, link, p, section, ul } from \"./helpers\";\nimport type { DocumentSection } from \"./types\";\n\nfunction buildIntroduction(config: CookiePolicyConfig): DocumentSection {\n\treturn section(\"cookie-introduction\", [\n\t\theading(\"Cookie Policy\"),\n\t\tp([\n\t\t\t`This Cookie Policy explains how ${config.company.name} (\"we\", \"us\", or \"our\") uses cookies and similar tracking technologies on our services. Effective Date: ${config.effectiveDate}.`,\n\t\t]),\n\t]);\n}\n\nfunction buildWhatAreCookies(): DocumentSection {\n\treturn section(\"cookie-what-are-cookies\", [\n\t\theading(\"What Are Cookies?\"),\n\t\tp([\n\t\t\t\"Cookies are small text files placed on your device by websites you visit. They are widely used to make websites work more efficiently and to provide information to site owners.\",\n\t\t]),\n\t\tp([\n\t\t\t'Cookies can be \"session cookies\" (deleted when you close your browser) or \"persistent cookies\" (remain on your device until they expire or you delete them).',\n\t\t]),\n\t]);\n}\n\nfunction buildTypes(config: CookiePolicyConfig): DocumentSection {\n\tconst types: { label: string; description: string }[] = [];\n\tif (config.cookies.essential)\n\t\ttypes.push({\n\t\t\tlabel: \"Essential Cookies\",\n\t\t\tdescription:\n\t\t\t\t\"Required for the basic functioning of our services. These cannot be disabled.\",\n\t\t});\n\tif (config.cookies.analytics)\n\t\ttypes.push({\n\t\t\tlabel: \"Analytics Cookies\",\n\t\t\tdescription:\n\t\t\t\t\"Help us understand how visitors interact with our services so we can improve them.\",\n\t\t});\n\tif (config.cookies.functional)\n\t\ttypes.push({\n\t\t\tlabel: \"Functional Cookies\",\n\t\t\tdescription:\n\t\t\t\t\"Enable enhanced functionality and personalisation, such as remembering your preferences.\",\n\t\t});\n\tif (config.cookies.marketing)\n\t\ttypes.push({\n\t\t\tlabel: \"Marketing Cookies\",\n\t\t\tdescription:\n\t\t\t\t\"Used to deliver advertisements more relevant to you and your interests.\",\n\t\t});\n\n\tif (types.length === 0) {\n\t\treturn section(\"cookie-types\", [\n\t\t\theading(\"Types of Cookies We Use\"),\n\t\t\tp([\"We do not currently use any cookies.\"]),\n\t\t]);\n\t}\n\n\treturn section(\"cookie-types\", [\n\t\theading(\"Types of Cookies We Use\"),\n\t\tul(types.map((t) => li([bold(t.label), \" \\u2014 \", t.description]))),\n\t]);\n}\n\nfunction buildTrackingTechnologies(\n\tconfig: CookiePolicyConfig,\n): DocumentSection | null {\n\tif (!config.trackingTechnologies || config.trackingTechnologies.length === 0)\n\t\treturn null;\n\treturn section(\"cookie-tracking-technologies\", [\n\t\theading(\"Other Tracking Technologies\"),\n\t\tp([\n\t\t\t\"In addition to cookies, we may use the following tracking technologies:\",\n\t\t]),\n\t\tul(config.trackingTechnologies.map((t) => li([t]))),\n\t]);\n}\n\nfunction buildThirdParties(config: CookiePolicyConfig): DocumentSection | null {\n\tif (!config.thirdParties || config.thirdParties.length === 0) return null;\n\treturn section(\"cookie-third-parties\", [\n\t\theading(\"Third-Party Cookies\"),\n\t\tp([\"The following third parties may set cookies through our services:\"]),\n\t\tul(\n\t\t\tconfig.thirdParties.map((t) =>\n\t\t\t\tli([\n\t\t\t\t\tbold(t.name),\n\t\t\t\t\t\" \\u2014 \",\n\t\t\t\t\tt.purpose,\n\t\t\t\t\t...(t.policyUrl\n\t\t\t\t\t\t? [\" (\", link(t.policyUrl, \"Privacy Policy\"), \")\"]\n\t\t\t\t\t\t: []),\n\t\t\t\t]),\n\t\t\t),\n\t\t),\n\t]);\n}\n\nfunction buildConsent(config: CookiePolicyConfig): DocumentSection | null {\n\tif (!config.consentMechanism) return null;\n\tconst { hasBanner, hasPreferencePanel, canWithdraw } =\n\t\tconfig.consentMechanism;\n\tconst items: string[] = [];\n\tif (hasBanner)\n\t\titems.push(\n\t\t\t\"We display a cookie consent banner when you first visit our services.\",\n\t\t);\n\tif (hasPreferencePanel)\n\t\titems.push(\n\t\t\t\"You can manage your cookie preferences at any time via our preference panel.\",\n\t\t);\n\tif (canWithdraw)\n\t\titems.push(\n\t\t\t\"You may withdraw your consent at any time; however, this will not affect the lawfulness of processing based on consent before its withdrawal.\",\n\t\t);\n\tif (items.length === 0) return null;\n\treturn section(\"cookie-consent\", [\n\t\theading(\"Your Consent\"),\n\t\tul(items.map((i) => li([i]))),\n\t]);\n}\n\nfunction buildManaging(): DocumentSection {\n\treturn section(\"cookie-managing\", [\n\t\theading(\"Managing Cookies\"),\n\t\tp([\n\t\t\t\"Most web browsers allow you to control cookies through their settings. You can:\",\n\t\t]),\n\t\tul([\n\t\t\tli([\"Delete cookies already stored on your device\"]),\n\t\t\tli([\"Block cookies from being set on your device\"]),\n\t\t\tli([\"Set your browser to notify you when a cookie is being set\"]),\n\t\t]),\n\t\tp([\n\t\t\t\"Please note that restricting cookies may impact the functionality of our services. Consult your browser's help documentation for instructions on managing cookies.\",\n\t\t]),\n\t]);\n}\n\nfunction buildJurisdictionEu(\n\tconfig: CookiePolicyConfig,\n): DocumentSection | null {\n\tif (!config.jurisdictions.includes(\"eu\")) return null;\n\treturn section(\"cookie-jurisdiction-eu\", [\n\t\theading(\"European Users (GDPR)\", {\n\t\t\treason: \"Required under ePrivacy Directive and GDPR\",\n\t\t}),\n\t\tp([\n\t\t\t\"If you are located in the European Economic Area, we rely on your consent as our legal basis for setting non-essential cookies. You have the right to withdraw consent at any time.\",\n\t\t]),\n\t\tp([\n\t\t\t\"Essential cookies are set on the basis of our legitimate interests to provide you with a functioning service.\",\n\t\t]),\n\t]);\n}\n\nfunction buildContact(config: CookiePolicyConfig): DocumentSection {\n\treturn section(\"cookie-contact\", [\n\t\theading(\"Contact Us\"),\n\t\tp([\"If you have questions about this Cookie Policy, please contact us:\"]),\n\t\tul([\n\t\t\tli([bold(\"Legal Name: \"), config.company.legalName]),\n\t\t\tli([bold(\"Address: \"), config.company.address]),\n\t\t\tli([bold(\"Email: \"), config.company.contact]),\n\t\t]),\n\t]);\n}\n\nconst SECTION_BUILDERS: ((\n\tconfig: CookiePolicyConfig,\n) => DocumentSection | null)[] = [\n\tbuildIntroduction,\n\t() => buildWhatAreCookies(),\n\tbuildTypes,\n\tbuildTrackingTechnologies,\n\tbuildThirdParties,\n\tbuildConsent,\n\t() => buildManaging(),\n\tbuildJurisdictionEu,\n\tbuildContact,\n];\n\nexport function compileCookieDocument(\n\tconfig: CookiePolicyConfig,\n): DocumentSection[] {\n\treturn SECTION_BUILDERS.map((builder) => builder(config)).filter(\n\t\t(s): s is DocumentSection => s !== null,\n\t);\n}\n","import type { PrivacyPolicyConfig } from \"../types\";\nimport { bold, heading, li, link, p, section, ul } from \"./helpers\";\nimport type { DocumentSection } from \"./types\";\n\nconst RIGHTS_LABELS: Record<string, string> = {\n\taccess: \"Right to access your personal data\",\n\trectification: \"Right to correct inaccurate data\",\n\terasure: \"Right to request deletion of your data\",\n\tportability: \"Right to receive your data in a portable format\",\n\trestriction: \"Right to restrict how we process your data\",\n\tobjection: \"Right to object to processing\",\n\topt_out_sale: \"Right to opt out of the sale of your personal information\",\n\tnon_discrimination:\n\t\t\"Right to non-discriminatory treatment for exercising your rights\",\n};\n\nfunction buildIntroduction(config: PrivacyPolicyConfig): DocumentSection {\n\treturn section(\"introduction\", [\n\t\theading(\"Introduction\"),\n\t\tp([\n\t\t\t`This Privacy Policy describes how ${config.company.name} (\"we\", \"us\", or \"our\") collects, uses, and shares information about you when you use our services. Effective Date: ${config.effectiveDate}.`,\n\t\t]),\n\t\tp([\n\t\t\t`If you have questions about this policy, please contact us at ${config.company.contact}.`,\n\t\t]),\n\t]);\n}\n\nfunction buildChildrenPrivacy(\n\tconfig: PrivacyPolicyConfig,\n): DocumentSection | null {\n\tif (!config.children) return null;\n\tconst { underAge, noticeUrl } = config.children;\n\treturn section(\"children-privacy\", [\n\t\theading(\"Children's Privacy\", { reason: \"Required by COPPA\" }),\n\t\tp([\n\t\t\t`Our services are not directed to children under the age of ${underAge}. We do not knowingly collect personal information from children under ${underAge}. If you believe we have collected information from a child, please contact us immediately.`,\n\t\t]),\n\t\t...(noticeUrl\n\t\t\t? [\n\t\t\t\t\tp([\n\t\t\t\t\t\t\"For more information, see our \",\n\t\t\t\t\t\tlink(noticeUrl, \"Children's Privacy Notice\"),\n\t\t\t\t\t\t\".\",\n\t\t\t\t\t]),\n\t\t\t\t]\n\t\t\t: []),\n\t]);\n}\n\nfunction buildDataCollected(config: PrivacyPolicyConfig): DocumentSection {\n\tconst items = Object.entries(config.dataCollected).map(([category, fields]) =>\n\t\tli([bold(category), ul(fields.map((f) => li([f])))]),\n\t);\n\treturn section(\"data-collected\", [\n\t\theading(\"Information We Collect\"),\n\t\tp([\"We collect the following categories of information:\"]),\n\t\tul(items),\n\t]);\n}\n\nfunction buildLegalBasis(config: PrivacyPolicyConfig): DocumentSection | null {\n\tif (!config.jurisdictions.includes(\"eu\")) return null;\n\treturn section(\"legal-basis\", [\n\t\theading(\"Legal Basis for Processing\", {\n\t\t\treason: \"Required by GDPR Article 13\",\n\t\t}),\n\t\tp([config.legalBasis]),\n\t]);\n}\n\nfunction buildDataRetention(config: PrivacyPolicyConfig): DocumentSection {\n\tconst items = Object.entries(config.retention).map(([category, period]) =>\n\t\tli([bold(category), \": \", period]),\n\t);\n\treturn section(\"data-retention\", [\n\t\theading(\"Data Retention\"),\n\t\tp([\"We retain your data for the following periods:\"]),\n\t\tul(items),\n\t]);\n}\n\nfunction buildCookies(config: PrivacyPolicyConfig): DocumentSection {\n\tconst enabled: string[] = [];\n\tif (config.cookies.essential)\n\t\tenabled.push(\"Essential cookies — required for the service to function\");\n\tif (config.cookies.analytics)\n\t\tenabled.push(\n\t\t\t\"Analytics cookies — help us understand how the service is used\",\n\t\t);\n\tif (config.cookies.marketing)\n\t\tenabled.push(\"Marketing cookies — used to deliver relevant advertisements\");\n\n\tif (enabled.length === 0) {\n\t\treturn section(\"cookies\", [\n\t\t\theading(\"Cookies and Tracking\"),\n\t\t\tp([\"We do not use cookies or similar tracking technologies.\"]),\n\t\t]);\n\t}\n\treturn section(\"cookies\", [\n\t\theading(\"Cookies and Tracking\"),\n\t\tp([\"We use the following types of cookies and tracking technologies:\"]),\n\t\tul(enabled.map((e) => li([e]))),\n\t]);\n}\n\nfunction buildThirdParties(config: PrivacyPolicyConfig): DocumentSection {\n\tif (config.thirdParties.length === 0) {\n\t\treturn section(\"third-parties\", [\n\t\t\theading(\"Third-Party Services\"),\n\t\t\tp([\n\t\t\t\t\"We do not share your personal information with third parties except as required by law.\",\n\t\t\t]),\n\t\t]);\n\t}\n\treturn section(\"third-parties\", [\n\t\theading(\"Third-Party Services\"),\n\t\tp([\"We share data with the following third-party services:\"]),\n\t\tul(\n\t\t\tconfig.thirdParties.map((t) => li([bold(t.name), \" \\u2014 \", t.purpose])),\n\t\t),\n\t]);\n}\n\nfunction buildUserRights(config: PrivacyPolicyConfig): DocumentSection {\n\tconst items = config.userRights.map((right) => {\n\t\tconst label = RIGHTS_LABELS[right] ?? right;\n\t\treturn li([label]);\n\t});\n\treturn section(\"user-rights\", [\n\t\theading(\"Your Rights\"),\n\t\tp([\"You have the following rights regarding your personal data:\"]),\n\t\tul(items),\n\t]);\n}\n\nfunction buildGdprSupplement(\n\tconfig: PrivacyPolicyConfig,\n): DocumentSection | null {\n\tif (!config.jurisdictions.includes(\"eu\")) return null;\n\treturn section(\"gdpr-supplement\", [\n\t\theading(\"GDPR Supplemental Disclosures\", {\n\t\t\treason: \"Required by GDPR Article 13\",\n\t\t}),\n\t\tp([\n\t\t\t\"This section applies to individuals in the European Economic Area (EEA) under the General Data Protection Regulation (GDPR).\",\n\t\t]),\n\t\tp([\n\t\t\t\"Data Controller: \",\n\t\t\tbold(config.company.legalName),\n\t\t\t`, ${config.company.address}`,\n\t\t]),\n\t\tp([\n\t\t\t\"In addition to the rights listed above, you have the right to lodge a complaint with your local data protection authority if you believe we have not handled your data in accordance with applicable law.\",\n\t\t]),\n\t\tp([\n\t\t\t\"If we transfer your personal data outside the EEA, we ensure adequate safeguards are in place in accordance with GDPR requirements.\",\n\t\t]),\n\t]);\n}\n\nfunction buildCcpaSupplement(\n\tconfig: PrivacyPolicyConfig,\n): DocumentSection | null {\n\tif (!config.jurisdictions.includes(\"ca\")) return null;\n\treturn section(\"ccpa-supplement\", [\n\t\theading(\"California Privacy Rights (CCPA)\", { reason: \"Required by CCPA\" }),\n\t\tp([\n\t\t\t\"If you are a California resident, you have the following additional rights:\",\n\t\t]),\n\t\tul([\n\t\t\tli([\n\t\t\t\t\"Right to Know — You may request disclosure of the personal information we collect, use, and share about you.\",\n\t\t\t]),\n\t\t\tli([\n\t\t\t\t\"Right to Delete — You may request deletion of personal information we have collected about you.\",\n\t\t\t]),\n\t\t\tli([\n\t\t\t\t\"Right to Opt-Out — You may opt out of the sale of your personal information.\",\n\t\t\t]),\n\t\t\tli([\n\t\t\t\t\"Right to Non-Discrimination — We will not discriminate against you for exercising your CCPA rights.\",\n\t\t\t]),\n\t\t]),\n\t]);\n}\n\nfunction buildContact(config: PrivacyPolicyConfig): DocumentSection {\n\treturn section(\"contact\", [\n\t\theading(\"Contact Us\"),\n\t\tp([\"Contact us:\"]),\n\t\tul([\n\t\t\tli([bold(\"Legal Name: \"), config.company.legalName]),\n\t\t\tli([bold(\"Address: \"), config.company.address]),\n\t\t\tli([bold(\"Email: \"), config.company.contact]),\n\t\t]),\n\t]);\n}\n\nconst SECTION_BUILDERS: ((\n\tconfig: PrivacyPolicyConfig,\n) => DocumentSection | null)[] = [\n\tbuildIntroduction,\n\tbuildChildrenPrivacy,\n\tbuildDataCollected,\n\tbuildLegalBasis,\n\tbuildDataRetention,\n\tbuildCookies,\n\tbuildThirdParties,\n\tbuildUserRights,\n\tbuildGdprSupplement,\n\tbuildCcpaSupplement,\n\tbuildContact,\n];\n\nexport function compilePrivacyDocument(\n\tconfig: PrivacyPolicyConfig,\n): DocumentSection[] {\n\treturn SECTION_BUILDERS.map((builder) => builder(config)).filter(\n\t\t(s): s is DocumentSection => s !== null,\n\t);\n}\n","import type { TermsOfServiceConfig } from \"../types\";\nimport { bold, heading, li, p, section, ul } from \"./helpers\";\nimport type { DocumentSection } from \"./types\";\n\nfunction buildIntroduction(config: TermsOfServiceConfig): DocumentSection {\n\treturn section(\"tos-introduction\", [\n\t\theading(\"Terms of Service\"),\n\t\tp([\n\t\t\t`These Terms of Service (\"Terms\") govern your use of services provided by ${config.company.name} (\"we\", \"us\", or \"our\"). By using our services, you agree to these Terms. Effective Date: ${config.effectiveDate}.`,\n\t\t]),\n\t]);\n}\n\nfunction buildAcceptance(config: TermsOfServiceConfig): DocumentSection {\n\treturn section(\"tos-acceptance\", [\n\t\theading(\"Acceptance of Terms\"),\n\t\tp([\"You accept these Terms by:\"]),\n\t\tul(config.acceptance.methods.map((m) => li([m]))),\n\t]);\n}\n\nfunction buildEligibility(\n\tconfig: TermsOfServiceConfig,\n): DocumentSection | null {\n\tif (!config.eligibility) return null;\n\tconst { minimumAge, jurisdictionRestrictions } = config.eligibility;\n\treturn section(\"tos-eligibility\", [\n\t\theading(\"Eligibility\"),\n\t\tp([\n\t\t\t`You must be at least ${minimumAge} years old to use our services. By using the services, you represent that you meet this age requirement.`,\n\t\t]),\n\t\t...(jurisdictionRestrictions && jurisdictionRestrictions.length > 0\n\t\t\t? [\n\t\t\t\t\tp([\"Our services are not available in the following jurisdictions:\"]),\n\t\t\t\t\tul(jurisdictionRestrictions.map((j) => li([j]))),\n\t\t\t\t]\n\t\t\t: []),\n\t]);\n}\n\nfunction buildAccounts(config: TermsOfServiceConfig): DocumentSection | null {\n\tif (!config.accounts) return null;\n\tconst {\n\t\tregistrationRequired,\n\t\tuserResponsibleForCredentials,\n\t\tcompanyCanTerminate,\n\t} = config.accounts;\n\tconst items: string[] = [];\n\tif (registrationRequired)\n\t\titems.push(\n\t\t\t\"Registration is required to access certain features of our services.\",\n\t\t);\n\tif (userResponsibleForCredentials)\n\t\titems.push(\n\t\t\t\"You are responsible for maintaining the confidentiality of your account credentials and for all activity under your account.\",\n\t\t);\n\tif (companyCanTerminate)\n\t\titems.push(\n\t\t\t\"We reserve the right to terminate or suspend accounts at our discretion.\",\n\t\t);\n\treturn section(\"tos-accounts\", [\n\t\theading(\"Accounts\"),\n\t\tul(items.map((i) => li([i]))),\n\t]);\n}\n\nfunction buildProhibitedUses(\n\tconfig: TermsOfServiceConfig,\n): DocumentSection | null {\n\tif (!config.prohibitedUses || config.prohibitedUses.length === 0) return null;\n\treturn section(\"tos-prohibited-uses\", [\n\t\theading(\"Prohibited Uses\"),\n\t\tp([\"You may not use our services for the following purposes:\"]),\n\t\tul(config.prohibitedUses.map((u) => li([u]))),\n\t]);\n}\n\nfunction buildUserContent(\n\tconfig: TermsOfServiceConfig,\n): DocumentSection | null {\n\tif (!config.userContent) return null;\n\tconst {\n\t\tusersOwnContent,\n\t\tlicenseGrantedToCompany,\n\t\tlicenseDescription,\n\t\tcompanyCanRemoveContent,\n\t} = config.userContent;\n\tconst items: string[] = [];\n\tif (usersOwnContent)\n\t\titems.push(\"You retain ownership of content you submit to our services.\");\n\tif (licenseGrantedToCompany)\n\t\titems.push(\n\t\t\tlicenseDescription ??\n\t\t\t\t\"By submitting content, you grant us a license to use, reproduce, and display that content in connection with our services.\",\n\t\t);\n\tif (companyCanRemoveContent)\n\t\titems.push(\n\t\t\t\"We reserve the right to remove content that violates these Terms or that we find objectionable.\",\n\t\t);\n\treturn section(\"tos-user-content\", [\n\t\theading(\"User Content\"),\n\t\tul(items.map((i) => li([i]))),\n\t]);\n}\n\nfunction buildIntellectualProperty(\n\tconfig: TermsOfServiceConfig,\n): DocumentSection | null {\n\tif (!config.intellectualProperty) return null;\n\tconst { companyOwnsService, usersMayNotCopy } = config.intellectualProperty;\n\tconst items: string[] = [];\n\tif (companyOwnsService)\n\t\titems.push(\n\t\t\t`All content, features, and functionality of our services are owned by ${config.company.name} and are protected by intellectual property laws.`,\n\t\t);\n\tif (usersMayNotCopy)\n\t\titems.push(\n\t\t\t\"You may not copy, modify, distribute, sell, or lease any part of our services without our express written permission.\",\n\t\t);\n\treturn section(\"tos-intellectual-property\", [\n\t\theading(\"Intellectual Property\"),\n\t\tul(items.map((i) => li([i]))),\n\t]);\n}\n\nfunction buildPayments(config: TermsOfServiceConfig): DocumentSection | null {\n\tif (!config.payments) return null;\n\tconst { hasPaidFeatures, refundPolicy, priceChangesNotice } = config.payments;\n\tconst items: string[] = [];\n\tif (hasPaidFeatures)\n\t\titems.push(\"Some features of our services require payment.\");\n\tif (refundPolicy) items.push(refundPolicy);\n\tif (priceChangesNotice) items.push(priceChangesNotice);\n\tif (items.length === 0) return null;\n\treturn section(\"tos-payments\", [\n\t\theading(\"Payments\"),\n\t\tul(items.map((i) => li([i]))),\n\t]);\n}\n\nfunction buildAvailability(\n\tconfig: TermsOfServiceConfig,\n): DocumentSection | null {\n\tif (!config.availability) return null;\n\tconst { noUptimeGuarantee, maintenanceWindows } = config.availability;\n\tconst items: string[] = [];\n\tif (noUptimeGuarantee)\n\t\titems.push(\n\t\t\t\"We do not guarantee uninterrupted or error-free access to our services.\",\n\t\t);\n\tif (maintenanceWindows) items.push(maintenanceWindows);\n\treturn section(\"tos-availability\", [\n\t\theading(\"Service Availability\"),\n\t\tul(items.map((i) => li([i]))),\n\t]);\n}\n\nfunction buildTermination(\n\tconfig: TermsOfServiceConfig,\n): DocumentSection | null {\n\tif (!config.termination) return null;\n\tconst { companyCanTerminate, userCanTerminate, effectOfTermination } =\n\t\tconfig.termination;\n\tconst items: string[] = [];\n\tif (companyCanTerminate)\n\t\titems.push(\n\t\t\t\"We may terminate or suspend your access to our services at any time, with or without cause or notice.\",\n\t\t);\n\tif (userCanTerminate)\n\t\titems.push(\"You may terminate your use of our services at any time.\");\n\tif (effectOfTermination) items.push(effectOfTermination);\n\treturn section(\"tos-termination\", [\n\t\theading(\"Termination\"),\n\t\tul(items.map((i) => li([i]))),\n\t]);\n}\n\nfunction buildDisclaimers(\n\tconfig: TermsOfServiceConfig,\n): DocumentSection | null {\n\tif (!config.disclaimers) return null;\n\tconst { serviceProvidedAsIs, noWarranties } = config.disclaimers;\n\tconst items: string[] = [];\n\tif (serviceProvidedAsIs)\n\t\titems.push(\n\t\t\t'Our services are provided on an \"as is\" and \"as available\" basis.',\n\t\t);\n\tif (noWarranties)\n\t\titems.push(\n\t\t\t\"We make no warranties, express or implied, regarding the reliability, accuracy, or fitness for a particular purpose of our services.\",\n\t\t);\n\treturn section(\"tos-disclaimers\", [\n\t\theading(\"Disclaimers\"),\n\t\tul(items.map((i) => li([i]))),\n\t]);\n}\n\nfunction buildLimitationOfLiability(\n\tconfig: TermsOfServiceConfig,\n): DocumentSection | null {\n\tif (!config.limitationOfLiability) return null;\n\tconst { excludesIndirectDamages, liabilityCap } =\n\t\tconfig.limitationOfLiability;\n\tconst items: string[] = [];\n\tif (excludesIndirectDamages)\n\t\titems.push(\n\t\t\t\"To the fullest extent permitted by law, we shall not be liable for any indirect, incidental, special, or consequential damages.\",\n\t\t);\n\tif (liabilityCap) items.push(liabilityCap);\n\treturn section(\"tos-limitation-of-liability\", [\n\t\theading(\"Limitation of Liability\"),\n\t\tul(items.map((i) => li([i]))),\n\t]);\n}\n\nfunction buildIndemnification(\n\tconfig: TermsOfServiceConfig,\n): DocumentSection | null {\n\tif (!config.indemnification) return null;\n\tconst { userIndemnifiesCompany, scope } = config.indemnification;\n\tif (!userIndemnifiesCompany) return null;\n\treturn section(\"tos-indemnification\", [\n\t\theading(\"Indemnification\"),\n\t\tp([\n\t\t\tscope ??\n\t\t\t\t`You agree to indemnify and hold harmless ${config.company.name} and its officers, directors, employees, and agents from any claims arising out of your use of the services or violation of these Terms.`,\n\t\t]),\n\t]);\n}\n\nfunction buildThirdPartyServices(\n\tconfig: TermsOfServiceConfig,\n): DocumentSection | null {\n\tif (!config.thirdPartyServices || config.thirdPartyServices.length === 0)\n\t\treturn null;\n\treturn section(\"tos-third-party-services\", [\n\t\theading(\"Third-Party Services\"),\n\t\tp([\"Our services may integrate with or link to third-party services:\"]),\n\t\tul(\n\t\t\tconfig.thirdPartyServices.map((t) =>\n\t\t\t\tli([bold(t.name), \" \\u2014 \", t.purpose]),\n\t\t\t),\n\t\t),\n\t]);\n}\n\nfunction buildDisputeResolution(\n\tconfig: TermsOfServiceConfig,\n): DocumentSection | null {\n\tif (!config.disputeResolution) return null;\n\tconst { method, venue, classActionWaiver } = config.disputeResolution;\n\tconst items: string[] = [];\n\tconst methodLabel =\n\t\tmethod === \"arbitration\"\n\t\t\t? \"binding arbitration\"\n\t\t\t: method === \"mediation\"\n\t\t\t\t? \"mediation\"\n\t\t\t\t: \"litigation\";\n\titems.push(\n\t\t`Any disputes arising from these Terms or your use of our services shall be resolved through ${methodLabel}.`,\n\t);\n\tif (venue) items.push(`Venue: ${venue}.`);\n\tif (classActionWaiver)\n\t\titems.push(\n\t\t\t\"You waive any right to participate in class action lawsuits or class-wide arbitration.\",\n\t\t);\n\treturn section(\"tos-dispute-resolution\", [\n\t\theading(\"Dispute Resolution\"),\n\t\tul(items.map((i) => li([i]))),\n\t]);\n}\n\nfunction buildGoverningLaw(config: TermsOfServiceConfig): DocumentSection {\n\treturn section(\"tos-governing-law\", [\n\t\theading(\"Governing Law\"),\n\t\tp([\n\t\t\t`These Terms are governed by the laws of ${config.governingLaw.jurisdiction}, without regard to conflict of law principles.`,\n\t\t]),\n\t]);\n}\n\nfunction buildChanges(config: TermsOfServiceConfig): DocumentSection | null {\n\tif (!config.changesPolicy) return null;\n\tconst { noticeMethod, noticePeriodDays } = config.changesPolicy;\n\tconst notice = noticePeriodDays\n\t\t? `at least ${noticePeriodDays} days' notice via ${noticeMethod}`\n\t\t: `notice via ${noticeMethod}`;\n\treturn section(\"tos-changes\", [\n\t\theading(\"Changes to These Terms\"),\n\t\tp([\n\t\t\t`We may update these Terms from time to time. We will provide ${notice} before changes take effect. Continued use of our services after changes constitutes acceptance of the revised Terms.`,\n\t\t]),\n\t]);\n}\n\nfunction buildContact(config: TermsOfServiceConfig): DocumentSection {\n\treturn section(\"tos-contact\", [\n\t\theading(\"Contact Us\"),\n\t\tp([\"If you have questions about these Terms, please contact us:\"]),\n\t\tul([\n\t\t\tli([bold(\"Legal Name: \"), config.company.legalName]),\n\t\t\tli([bold(\"Address: \"), config.company.address]),\n\t\t\tli([bold(\"Email: \"), config.company.contact]),\n\t\t]),\n\t]);\n}\n\nconst SECTION_BUILDERS: ((\n\tconfig: TermsOfServiceConfig,\n) => DocumentSection | null)[] = [\n\tbuildIntroduction,\n\tbuildAcceptance,\n\tbuildEligibility,\n\tbuildAccounts,\n\tbuildProhibitedUses,\n\tbuildUserContent,\n\tbuildIntellectualProperty,\n\tbuildPayments,\n\tbuildAvailability,\n\tbuildTermination,\n\tbuildDisclaimers,\n\tbuildLimitationOfLiability,\n\tbuildIndemnification,\n\tbuildThirdPartyServices,\n\tbuildDisputeResolution,\n\tbuildGoverningLaw,\n\tbuildChanges,\n\tbuildContact,\n];\n\nexport function compileTermsDocument(\n\tconfig: TermsOfServiceConfig,\n): DocumentSection[] {\n\treturn SECTION_BUILDERS.map((builder) => builder(config)).filter(\n\t\t(s): s is DocumentSection => s !== null,\n\t);\n}\n","import type { PolicyInput } from \"../types\";\nimport { compileCookieDocument } from \"./cookie\";\nimport { compilePrivacyDocument } from \"./privacy\";\nimport { compileTermsDocument } from \"./terms\";\nimport type { Document } from \"./types\";\n\nexport function compile(input: PolicyInput): Document {\n\tif (input.type === \"privacy\") {\n\t\tconst { type: _, ...config } = input;\n\t\treturn {\n\t\t\ttype: \"document\",\n\t\t\tpolicyType: \"privacy\",\n\t\t\tsections: compilePrivacyDocument(config),\n\t\t};\n\t}\n\tif (input.type === \"terms\") {\n\t\tconst { type: _, ...config } = input;\n\t\treturn {\n\t\t\ttype: \"document\",\n\t\t\tpolicyType: \"terms\",\n\t\t\tsections: compileTermsDocument(config),\n\t\t};\n\t}\n\tconst { type: _, ...config } = input;\n\treturn {\n\t\ttype: \"document\",\n\t\tpolicyType: \"cookie\",\n\t\tsections: compileCookieDocument(config),\n\t};\n}\n\nexport {\n\tbold,\n\theading,\n\titalic,\n\tli,\n\tlink,\n\tol,\n\tp,\n\tsection,\n\ttext,\n\tul,\n} from \"./helpers\";\nexport type {\n\tBoldNode,\n\tContentNode,\n\tDocument,\n\tDocumentSection,\n\tHeadingNode,\n\tInlineNode,\n\tItalicNode,\n\tLinkNode,\n\tListItemNode,\n\tListNode,\n\tNode,\n\tNodeContext,\n\tParagraphNode,\n\tPolicyType,\n\tTextNode,\n} from \"./types\";\n","export type OutputFormat = \"markdown\" | \"html\" | \"pdf\" | \"jsx\";\n\nexport type CompileOptions = { formats: OutputFormat[] };\n\nexport type Jurisdiction = \"us\" | \"eu\" | \"ca\" | \"au\" | \"nz\" | \"other\";\n\nexport type CompanyConfig = {\n\tname: string;\n\tlegalName: string;\n\taddress: string;\n\tcontact: string;\n};\n\nexport type PrivacyPolicyConfig = {\n\teffectiveDate: string;\n\tcompany: CompanyConfig;\n\tdataCollected: Record<string, string[]>;\n\tlegalBasis: string;\n\tretention: Record<string, string>;\n\tcookies: { essential: boolean; analytics: boolean; marketing: boolean };\n\tthirdParties: { name: string; purpose: string }[];\n\tuserRights: string[];\n\tjurisdictions: Jurisdiction[];\n\t// optional children-specific policy\n\tchildren?: {\n\t\tunderAge: number;\n\t\tnoticeUrl?: string;\n\t};\n};\n\nexport type DisputeResolutionMethod =\n\t| \"arbitration\"\n\t| \"litigation\"\n\t| \"mediation\";\n\nexport type TermsOfServiceConfig = {\n\teffectiveDate: string;\n\tcompany: CompanyConfig;\n\tacceptance: { methods: string[] };\n\teligibility?: { minimumAge: number; jurisdictionRestrictions?: string[] };\n\taccounts?: {\n\t\tregistrationRequired: boolean;\n\t\tuserResponsibleForCredentials: boolean;\n\t\tcompanyCanTerminate: boolean;\n\t};\n\tprohibitedUses?: string[];\n\tuserContent?: {\n\t\tusersOwnContent: boolean;\n\t\tlicenseGrantedToCompany: boolean;\n\t\tlicenseDescription?: string;\n\t\tcompanyCanRemoveContent: boolean;\n\t};\n\tintellectualProperty?: {\n\t\tcompanyOwnsService: boolean;\n\t\tusersMayNotCopy: boolean;\n\t};\n\tpayments?: {\n\t\thasPaidFeatures: boolean;\n\t\trefundPolicy?: string;\n\t\tpriceChangesNotice?: string;\n\t};\n\tavailability?: { noUptimeGuarantee: boolean; maintenanceWindows?: string };\n\ttermination?: {\n\t\tcompanyCanTerminate: boolean;\n\t\tuserCanTerminate: boolean;\n\t\teffectOfTermination?: string;\n\t};\n\tdisclaimers?: { serviceProvidedAsIs: boolean; noWarranties: boolean };\n\tlimitationOfLiability?: {\n\t\texcludesIndirectDamages: boolean;\n\t\tliabilityCap?: string;\n\t};\n\tindemnification?: { userIndemnifiesCompany: boolean; scope?: string };\n\tthirdPartyServices?: { name: string; purpose: string }[];\n\tdisputeResolution?: {\n\t\tmethod: DisputeResolutionMethod;\n\t\tvenue?: string;\n\t\tclassActionWaiver?: boolean;\n\t};\n\tgoverningLaw: { jurisdiction: string };\n\tchangesPolicy?: { noticeMethod: string; noticePeriodDays?: number };\n\tprivacyPolicyUrl?: string;\n};\n\nexport type CookiePolicyConfig = {\n\teffectiveDate: string;\n\tcompany: CompanyConfig;\n\tcookies: {\n\t\tessential: boolean;\n\t\tanalytics: boolean;\n\t\tfunctional: boolean;\n\t\tmarketing: boolean;\n\t};\n\tthirdParties?: { name: string; purpose: string; policyUrl?: string }[];\n\ttrackingTechnologies?: string[];\n\tconsentMechanism?: {\n\t\thasBanner: boolean;\n\t\thasPreferencePanel: boolean;\n\t\tcanWithdraw: boolean;\n\t};\n\tjurisdictions: Jurisdiction[];\n};\n\nexport type PolicyInput =\n\t| ({ type: \"privacy\" } & PrivacyPolicyConfig)\n\t| ({ type: \"terms\" } & TermsOfServiceConfig)\n\t| ({ type: \"cookie\" } & CookiePolicyConfig);\n\nexport type OpenPolicyConfig = {\n\tcompany: CompanyConfig;\n\tprivacy?: Omit<PrivacyPolicyConfig, \"company\">;\n\tterms?: Omit<TermsOfServiceConfig, \"company\">;\n\tcookie?: Omit<CookiePolicyConfig, \"company\">;\n};\n\nexport function isOpenPolicyConfig(value: unknown): value is OpenPolicyConfig {\n\tif (value === null || typeof value !== \"object\") return false;\n\tconst obj = value as Record<string, unknown>;\n\treturn (\n\t\t\"company\" in obj &&\n\t\t!(\"effectiveDate\" in obj) &&\n\t\t(\"privacy\" in obj || \"terms\" in obj || \"cookie\" in obj)\n\t);\n}\n\nexport type ValidationIssue = {\n\tlevel: \"error\" | \"warning\";\n\tmessage: string;\n};\n","import type { PrivacyPolicyConfig, ValidationIssue } from \"./types\";\n\nexport function validatePrivacyPolicy(\n\tconfig: PrivacyPolicyConfig,\n): ValidationIssue[] {\n\tconst issues: ValidationIssue[] = [];\n\n\t// Required fields\n\tif (!config.effectiveDate)\n\t\tissues.push({ level: \"error\", message: \"effectiveDate is required\" });\n\tif (!config.company.name)\n\t\tissues.push({ level: \"error\", message: \"company.name is required\" });\n\tif (!config.company.legalName)\n\t\tissues.push({ level: \"error\", message: \"company.legalName is required\" });\n\tif (!config.company.address)\n\t\tissues.push({ level: \"error\", message: \"company.address is required\" });\n\tif (!config.company.contact)\n\t\tissues.push({ level: \"error\", message: \"company.contact is required\" });\n\tif (Object.keys(config.dataCollected).length === 0)\n\t\tissues.push({\n\t\t\tlevel: \"error\",\n\t\t\tmessage: \"dataCollected must have at least one entry\",\n\t\t});\n\tif (config.userRights.length === 0)\n\t\tissues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage: \"userRights is empty — consider listing applicable rights\",\n\t\t});\n\n\t// GDPR checks\n\tif (config.jurisdictions.includes(\"eu\")) {\n\t\tif (!config.legalBasis)\n\t\t\tissues.push({ level: \"error\", message: \"GDPR requires a legalBasis\" });\n\t\tfor (const right of [\n\t\t\t\"access\",\n\t\t\t\"rectification\",\n\t\t\t\"erasure\",\n\t\t\t\"portability\",\n\t\t\t\"restriction\",\n\t\t\t\"objection\",\n\t\t]) {\n\t\t\tif (!config.userRights.includes(right))\n\t\t\t\tissues.push({\n\t\t\t\t\tlevel: \"warning\",\n\t\t\t\t\tmessage: `GDPR recommends including the \"${right}\" right`,\n\t\t\t\t});\n\t\t}\n\t}\n\n\t// CCPA checks\n\tif (config.jurisdictions.includes(\"ca\")) {\n\t\tfor (const right of [\n\t\t\t\"access\",\n\t\t\t\"erasure\",\n\t\t\t\"opt_out_sale\",\n\t\t\t\"non_discrimination\",\n\t\t]) {\n\t\t\tif (!config.userRights.includes(right))\n\t\t\t\tissues.push({\n\t\t\t\t\tlevel: \"warning\",\n\t\t\t\t\tmessage: `CCPA recommends including the \"${right}\" right`,\n\t\t\t\t});\n\t\t}\n\t}\n\n\t// children config sanity\n\tif (config.children) {\n\t\tif (config.children.underAge <= 0) {\n\t\t\tissues.push({\n\t\t\t\tlevel: \"error\",\n\t\t\t\tmessage: \"children.underAge must be a positive number\",\n\t\t\t});\n\t\t}\n\t}\n\n\treturn issues;\n}\n","import type { CookiePolicyConfig, ValidationIssue } from \"./types\";\n\nexport function validateCookiePolicy(\n\tconfig: CookiePolicyConfig,\n): ValidationIssue[] {\n\tconst issues: ValidationIssue[] = [];\n\n\t// Required fields\n\tif (!config.effectiveDate)\n\t\tissues.push({ level: \"error\", message: \"effectiveDate is required\" });\n\tif (!config.company.name)\n\t\tissues.push({ level: \"error\", message: \"company.name is required\" });\n\tif (!config.company.legalName)\n\t\tissues.push({ level: \"error\", message: \"company.legalName is required\" });\n\tif (!config.company.address)\n\t\tissues.push({ level: \"error\", message: \"company.address is required\" });\n\tif (!config.company.contact)\n\t\tissues.push({ level: \"error\", message: \"company.contact is required\" });\n\n\tconst { essential, analytics, functional, marketing } = config.cookies;\n\tif (!essential && !analytics && !functional && !marketing) {\n\t\tissues.push({\n\t\t\tlevel: \"error\",\n\t\t\tmessage:\n\t\t\t\t\"At least one cookie type must be enabled (essential, analytics, functional, or marketing)\",\n\t\t});\n\t}\n\n\t// Advisory checks\n\tif (!config.consentMechanism) {\n\t\tissues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage:\n\t\t\t\t\"consentMechanism is not provided — consider describing how users can manage cookie consent\",\n\t\t});\n\t}\n\n\t// GDPR consent withdrawal check\n\tif (\n\t\tconfig.jurisdictions.includes(\"eu\") &&\n\t\tconfig.consentMechanism &&\n\t\t!config.consentMechanism.canWithdraw\n\t) {\n\t\tissues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage:\n\t\t\t\t\"GDPR requires that users can withdraw cookie consent — consider setting consentMechanism.canWithdraw to true\",\n\t\t});\n\t}\n\n\treturn issues;\n}\n","import type { TermsOfServiceConfig, ValidationIssue } from \"./types\";\n\nexport function validateTermsOfService(\n\tconfig: TermsOfServiceConfig,\n): ValidationIssue[] {\n\tconst issues: ValidationIssue[] = [];\n\n\t// Required fields\n\tif (!config.effectiveDate)\n\t\tissues.push({ level: \"error\", message: \"effectiveDate is required\" });\n\tif (!config.company.name)\n\t\tissues.push({ level: \"error\", message: \"company.name is required\" });\n\tif (!config.company.legalName)\n\t\tissues.push({ level: \"error\", message: \"company.legalName is required\" });\n\tif (!config.company.address)\n\t\tissues.push({ level: \"error\", message: \"company.address is required\" });\n\tif (!config.company.contact)\n\t\tissues.push({ level: \"error\", message: \"company.contact is required\" });\n\tif (!config.governingLaw.jurisdiction)\n\t\tissues.push({\n\t\t\tlevel: \"error\",\n\t\t\tmessage: \"governingLaw.jurisdiction is required\",\n\t\t});\n\n\t// Advisory checks\n\tif (!config.disclaimers) {\n\t\tissues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage:\n\t\t\t\t\"disclaimers is missing — consider adding a disclaimer of warranties\",\n\t\t});\n\t}\n\tif (!config.limitationOfLiability) {\n\t\tissues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage:\n\t\t\t\t\"limitationOfLiability is missing — consider adding a limitation of liability clause\",\n\t\t});\n\t}\n\tif (config.acceptance.methods.length === 0) {\n\t\tissues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage:\n\t\t\t\t\"acceptance.methods is empty — consider listing how users accept these Terms\",\n\t\t});\n\t}\n\n\treturn issues;\n}\n","export type {\n\tBoldNode,\n\tContentNode,\n\tDocument,\n\tDocumentSection,\n\tHeadingNode,\n\tInlineNode,\n\tItalicNode,\n\tLinkNode,\n\tListItemNode,\n\tListNode,\n\tNode,\n\tNodeContext,\n\tParagraphNode,\n\tPolicyType,\n\tTextNode,\n} from \"./documents\";\nexport {\n\tbold,\n\tcompile,\n\theading,\n\titalic,\n\tli,\n\tlink,\n\tol,\n\tp,\n\tsection,\n\ttext,\n\tul,\n} from \"./documents\";\nexport type {\n\tCompanyConfig,\n\tCompileOptions,\n\tCookiePolicyConfig,\n\tDisputeResolutionMethod,\n\tJurisdiction,\n\tOpenPolicyConfig,\n\tOutputFormat,\n\tPolicyInput,\n\tPrivacyPolicyConfig,\n\tTermsOfServiceConfig,\n\tValidationIssue,\n} from \"./types\";\nexport { isOpenPolicyConfig } from \"./types\";\nexport { validatePrivacyPolicy } from \"./validate\";\nexport { validateCookiePolicy } from \"./validate-cookie\";\nexport { validateTermsOfService } from \"./validate-terms\";\n\nimport type { OpenPolicyConfig, PolicyInput } from \"./types\";\n\nexport function expandOpenPolicyConfig(\n\tconfig: OpenPolicyConfig,\n): PolicyInput[] {\n\tconst inputs: PolicyInput[] = [];\n\tif (config.privacy) {\n\t\tinputs.push({\n\t\t\ttype: \"privacy\",\n\t\t\tcompany: config.company,\n\t\t\t...config.privacy,\n\t\t});\n\t}\n\tif (config.terms) {\n\t\tinputs.push({ type: \"terms\", company: config.company, ...config.terms });\n\t}\n\tif (config.cookie) {\n\t\tinputs.push({ type: \"cookie\", company: config.company, ...config.cookie });\n\t}\n\treturn inputs;\n}\n"],"mappings":";AAeA,MAAa,WACZ,OACA,gBACA,YACiB;CACjB,MAAM,QAAQ,OAAO,mBAAmB,WAAW,iBAAiB,KAAA;CACpE,MAAM,MAAM,OAAO,mBAAmB,WAAW,iBAAiB;AAClE,QAAO;EACN,MAAM;EACN,GAAI,UAAU,KAAA,KAAa,EAAE,OAAO;EACpC;EACA,GAAI,OAAO,EAAE,SAAS,KAAK;EAC3B;;AAEF,MAAa,QAAQ,OAAe,aAAqC;CACxE,MAAM;CACN;CACA,GAAI,WAAW,EAAE,SAAS;CAC1B;AACD,MAAa,QAAQ,OAAe,aAAqC;CACxE,MAAM;CACN;CACA,GAAI,WAAW,EAAE,SAAS;CAC1B;AACD,MAAa,UAAU,OAAe,aAAuC;CAC5E,MAAM;CACN;CACA,GAAI,WAAW,EAAE,SAAS;CAC1B;AACD,MAAa,QACZ,MACA,OACA,aACe;CAAE,MAAM;CAAQ;CAAM;CAAO,GAAI,WAAW,EAAE,SAAS;CAAG;AAC1E,MAAa,KACZ,UACA,aACoB;CACpB,MAAM;CACN,UAAU,SAAS,KAAK,MAAO,OAAO,MAAM,WAAW,KAAK,EAAE,GAAG,EAAG;CACpE,GAAI,WAAW,EAAE,SAAS;CAC1B;AACD,MAAa,MACZ,U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AAC,OAAO,QAAQ,QACnB,QAAO,KAAK;EAAE,OAAO;EAAS,SAAS;EAA+B,CAAC;AACxE,KAAI,CAAC,OAAO,aAAa,aACxB,QAAO,KAAK;EACX,OAAO;EACP,SAAS;EACT,CAAC;AAGH,KAAI,CAAC,OAAO,YACX,QAAO,KAAK;EACX,OAAO;EACP,SACC;EACD,CAAC;AAEH,KAAI,CAAC,OAAO,sBACX,QAAO,KAAK;EACX,OAAO;EACP,SACC;EACD,CAAC;AAEH,KAAI,OAAO,WAAW,QAAQ,WAAW,EACxC,QAAO,KAAK;EACX,OAAO;EACP,SACC;EACD,CAAC;AAGH,QAAO;;;;ACGR,SAAgB,uBACf,QACgB;CAChB,MAAM,SAAwB,EAAE;AAChC,KAAI,OAAO,QACV,QAAO,KAAK;EACX,MAAM;EACN,SAAS,OAAO;EAChB,GAAG,OAAO;EACV,CAAC;AAEH,KAAI,OAAO,MACV,QAAO,KAAK;EAAE,MAAM;EAAS,SAAS,OAAO;EAAS,GAAG,OAAO;EAAO,CAAC;AAEzE,KAAI,OAAO,OACV,QAAO,KAAK;EAAE,MAAM;EAAU,SAAS,OAAO;EAAS,GAAG,OAAO;EAAQ,CAAC;AAE3E,QAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openpolicy/core",
3
- "version": "0.0.12",
3
+ "version": "0.0.15",
4
4
  "type": "module",
5
5
  "description": "Core package for OpenPolicy",
6
6
  "license": "GPL-3.0-only",
@@ -9,6 +9,7 @@
9
9
  "url": "https://github.com/jamiedavenport/openpolicy",
10
10
  "directory": "packages/core"
11
11
  },
12
+ "sideEffects": false,
12
13
  "files": [
13
14
  "dist",
14
15
  "README.md"
@@ -27,8 +28,5 @@
27
28
  },
28
29
  "devDependencies": {
29
30
  "@openpolicy/tooling": "workspace:*"
30
- },
31
- "dependencies": {
32
- "marked": "^17.0.4"
33
31
  }
34
32
  }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":""}
package/dist/privacy.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import type { CompileOptions, OutputFormat, PolicySection, PrivacyPolicyConfig } from "./types";
2
- export declare function compilePrivacyPolicy(config: PrivacyPolicyConfig, options?: CompileOptions): {
3
- format: OutputFormat;
4
- content: string;
5
- sections: PolicySection[];
6
- }[];
7
- //# sourceMappingURL=privacy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"privacy.d.ts","sourceRoot":"","sources":["../src/privacy.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACX,cAAc,EACd,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,MAAM,SAAS,CAAC;AAiBjB,wBAAgB,oBAAoB,CACnC,MAAM,EAAE,mBAAmB,EAC3B,OAAO,GAAE,cAA0C,GACjD;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,aAAa,EAAE,CAAA;CAAE,EAAE,CAmBxE"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=privacy.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"privacy.test.d.ts","sourceRoot":"","sources":["../src/privacy.test.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import type { PolicySection } from "../types";
2
- export declare function renderHTML(sections: PolicySection[]): string;
3
- //# sourceMappingURL=html.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../src/renderers/html.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,wBAAgB,UAAU,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,MAAM,CAI5D"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection } from "../types";
2
- export declare function renderMarkdown(sections: PolicySection[]): string;
3
- //# sourceMappingURL=markdown.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/renderers/markdown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,wBAAgB,cAAc,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,MAAM,CAIhE"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, PrivacyPolicyConfig } from "../../types";
2
- export declare function buildCcpaSupplement(config: PrivacyPolicyConfig): PolicySection | null;
3
- //# sourceMappingURL=ccpa-supplement.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ccpa-supplement.d.ts","sourceRoot":"","sources":["../../../src/templates/privacy/ccpa-supplement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEtE,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,mBAAmB,GACzB,aAAa,GAAG,IAAI,CAkBtB"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, PrivacyPolicyConfig } from "../../types";
2
- export declare function buildContact(config: PrivacyPolicyConfig): PolicySection;
3
- //# sourceMappingURL=contact.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../../src/templates/privacy/contact.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEtE,wBAAgB,YAAY,CAAC,MAAM,EAAE,mBAAmB,GAAG,aAAa,CAWvE"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, PrivacyPolicyConfig } from "../../types";
2
- export declare function buildCookies(config: PrivacyPolicyConfig): PolicySection;
3
- //# sourceMappingURL=cookies.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cookies.d.ts","sourceRoot":"","sources":["../../../src/templates/privacy/cookies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEtE,wBAAgB,YAAY,CAAC,MAAM,EAAE,mBAAmB,GAAG,aAAa,CAyBvE"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, PrivacyPolicyConfig } from "../../types";
2
- export declare function buildDataCollected(config: PrivacyPolicyConfig): PolicySection;
3
- //# sourceMappingURL=data-collected.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-collected.d.ts","sourceRoot":"","sources":["../../../src/templates/privacy/data-collected.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEtE,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,aAAa,CAY7E"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, PrivacyPolicyConfig } from "../../types";
2
- export declare function buildDataRetention(config: PrivacyPolicyConfig): PolicySection;
3
- //# sourceMappingURL=data-retention.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-retention.d.ts","sourceRoot":"","sources":["../../../src/templates/privacy/data-retention.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEtE,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,aAAa,CAW7E"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, PrivacyPolicyConfig } from "../../types";
2
- export declare function buildGdprSupplement(config: PrivacyPolicyConfig): PolicySection | null;
3
- //# sourceMappingURL=gdpr-supplement.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gdpr-supplement.d.ts","sourceRoot":"","sources":["../../../src/templates/privacy/gdpr-supplement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEtE,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,mBAAmB,GACzB,aAAa,GAAG,IAAI,CActB"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, PrivacyPolicyConfig } from "../../types";
2
- export declare function buildIntroduction(config: PrivacyPolicyConfig): PolicySection;
3
- //# sourceMappingURL=introduction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"introduction.d.ts","sourceRoot":"","sources":["../../../src/templates/privacy/introduction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEtE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,GAAG,aAAa,CAU5E"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, PrivacyPolicyConfig } from "../../types";
2
- export declare function buildLegalBasis(config: PrivacyPolicyConfig): PolicySection | null;
3
- //# sourceMappingURL=legal-basis.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"legal-basis.d.ts","sourceRoot":"","sources":["../../../src/templates/privacy/legal-basis.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEtE,wBAAgB,eAAe,CAC9B,MAAM,EAAE,mBAAmB,GACzB,aAAa,GAAG,IAAI,CAQtB"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, PrivacyPolicyConfig } from "../../types";
2
- export declare function buildThirdParties(config: PrivacyPolicyConfig): PolicySection;
3
- //# sourceMappingURL=third-parties.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"third-parties.d.ts","sourceRoot":"","sources":["../../../src/templates/privacy/third-parties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEtE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,GAAG,aAAa,CAe5E"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, PrivacyPolicyConfig } from "../../types";
2
- export declare function buildUserRights(config: PrivacyPolicyConfig): PolicySection;
3
- //# sourceMappingURL=user-rights.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-rights.d.ts","sourceRoot":"","sources":["../../../src/templates/privacy/user-rights.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AActE,wBAAgB,eAAe,CAAC,MAAM,EAAE,mBAAmB,GAAG,aAAa,CAW1E"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, TermsOfServiceConfig } from "../../types";
2
- export declare function buildAcceptance(config: TermsOfServiceConfig): PolicySection;
3
- //# sourceMappingURL=acceptance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"acceptance.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/acceptance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,eAAe,CAAC,MAAM,EAAE,oBAAoB,GAAG,aAAa,CAQ3E"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, TermsOfServiceConfig } from "../../types";
2
- export declare function buildAccounts(config: TermsOfServiceConfig): PolicySection | null;
3
- //# sourceMappingURL=accounts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,aAAa,CAC5B,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAkCtB"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, TermsOfServiceConfig } from "../../types";
2
- export declare function buildAvailability(config: TermsOfServiceConfig): PolicySection | null;
3
- //# sourceMappingURL=availability.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"availability.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/availability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,iBAAiB,CAChC,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAoBtB"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, TermsOfServiceConfig } from "../../types";
2
- export declare function buildChangesToTerms(config: TermsOfServiceConfig): PolicySection | null;
3
- //# sourceMappingURL=changes-to-terms.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"changes-to-terms.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/changes-to-terms.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CActB"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, TermsOfServiceConfig } from "../../types";
2
- export declare function buildContact(config: TermsOfServiceConfig): PolicySection;
3
- //# sourceMappingURL=contact.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/contact.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,YAAY,CAAC,MAAM,EAAE,oBAAoB,GAAG,aAAa,CAUxE"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, TermsOfServiceConfig } from "../../types";
2
- export declare function buildDisclaimers(config: TermsOfServiceConfig): PolicySection | null;
3
- //# sourceMappingURL=disclaimers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"disclaimers.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/disclaimers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAsBtB"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, TermsOfServiceConfig } from "../../types";
2
- export declare function buildDisputeResolution(config: TermsOfServiceConfig): PolicySection | null;
3
- //# sourceMappingURL=dispute-resolution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dispute-resolution.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/dispute-resolution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,sBAAsB,CACrC,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAkCtB"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, TermsOfServiceConfig } from "../../types";
2
- export declare function buildEligibility(config: TermsOfServiceConfig): PolicySection | null;
3
- //# sourceMappingURL=eligibility.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eligibility.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/eligibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAiBtB"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, TermsOfServiceConfig } from "../../types";
2
- export declare function buildGoverningLaw(config: TermsOfServiceConfig): PolicySection;
3
- //# sourceMappingURL=governing-law.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"governing-law.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/governing-law.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,oBAAoB,GAAG,aAAa,CAM7E"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, TermsOfServiceConfig } from "../../types";
2
- export declare function buildIndemnification(config: TermsOfServiceConfig): PolicySection | null;
3
- //# sourceMappingURL=indemnification.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"indemnification.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/indemnification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,oBAAoB,CACnC,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAoBtB"}
@@ -1,3 +0,0 @@
1
- import type { PolicySection, TermsOfServiceConfig } from "../../types";
2
- export declare function buildIntellectualProperty(config: TermsOfServiceConfig): PolicySection | null;
3
- //# sourceMappingURL=intellectual-property.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"intellectual-property.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/intellectual-property.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,yBAAyB,CACxC,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAwBtB"}