From: 
Subject: Debian changes

The Debian packaging of node-fullcalendar is maintained in git, using a workflow
similar to the one described in dgit-maint-merge(7).
The Debian delta is represented by this one combined patch; there isn't a
patch queue that can be represented as a quilt series.

A detailed breakdown of the changes is available from their canonical
representation -- git commits in the packaging repository.
For example, to see the changes made by the Debian maintainer in the first
upload of upstream version 1.2.3, you could use:

    % git clone https://git.dgit.debian.org/node-fullcalendar
    % cd node-fullcalendar
    % git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian'

(If you have dgit, use `dgit clone node-fullcalendar`, rather than plain `git clone`.)

We don't use debian/source/options single-debian-patch because it has bugs.
Therefore, NMUs etc. may nevertheless have made additional patches.

---

diff --git a/packages/icalendar/src/event-source-def.ts b/packages/icalendar/src/event-source-def.ts
index dc9a6ae30..a903490d3 100644
--- a/packages/icalendar/src/event-source-def.ts
+++ b/packages/icalendar/src/event-source-def.ts
@@ -1,7 +1,8 @@
 import { DateRange, addDays } from '@full-ui/headless-calendar'
-import ICAL from 'ical.js'
 import { IcalExpander } from './ical-expander/IcalExpander'
 
+type ICalEvent = any
+
 export interface ICalFeedMeta {
   url: string
   format: 'ics', // for EventSourceApi
@@ -113,7 +114,7 @@ function expandICalEvents(iCalExpander: IcalExpander, range: DateRange): EventIn
   return expanded
 }
 
-function buildNonDateProps(iCalEvent: ICAL.Event): EventInput {
+function buildNonDateProps(iCalEvent: ICalEvent): EventInput {
   return {
     title: iCalEvent.summary,
     url: extractEventUrl(iCalEvent),
@@ -125,12 +126,12 @@ function buildNonDateProps(iCalEvent: ICAL.Event): EventInput {
   }
 }
 
-function extractEventUrl(iCalEvent: ICAL.Event): string {
+function extractEventUrl(iCalEvent: ICalEvent): string {
   let urlProp = iCalEvent.component.getFirstProperty('url')
   return urlProp ? urlProp.getFirstValue() as string : ''
 }
 
-function specifiesEnd(iCalEvent: ICAL.Event) {
+function specifiesEnd(iCalEvent: ICalEvent) {
   return Boolean(iCalEvent.component.getFirstProperty('dtend')) ||
     Boolean(iCalEvent.component.getFirstProperty('duration'))
 }
diff --git a/packages/preact/src/Calendar.tsx b/packages/preact/src/Calendar.tsx
index 305be792f..673d95d8a 100644
--- a/packages/preact/src/Calendar.tsx
+++ b/packages/preact/src/Calendar.tsx
@@ -1,7 +1,6 @@
 import React, {
   PropsWithoutRef,
   Ref,
-  FunctionComponent,
   forwardRef,
   useState,
   useEffect,
@@ -26,7 +25,7 @@ export interface CalendarRef {
 type CalendarPropsInternal = CalendarOptions & { id?: string }
 export type CalendarProps = PropsWithoutRef<CalendarPropsInternal> & { ref?: Ref<CalendarRef> }
 
-export const Calendar: FunctionComponent<CalendarProps> = forwardRef<CalendarRef, CalendarPropsInternal>((props, ref) => {
+export const Calendar = forwardRef<CalendarRef, CalendarPropsInternal>((props, ref) => {
   const baseId = useStableId(props.id) // for DOM ids
 
   const [_revision, setRevision] = useState('')
diff --git a/packages/preact/tsconfig.json b/packages/preact/tsconfig.json
index dc294c4b6..09a1a0c29 100644
--- a/packages/preact/tsconfig.json
+++ b/packages/preact/tsconfig.json
@@ -6,10 +6,10 @@
     "rootDir": "./src",
     "outDir": "./dist/.tsout",
     "paths": {
-      "react": ["./node_modules/preact/compat/"],
-      "react/jsx-runtime": ["./node_modules/preact/jsx-runtime"],
-      "react-dom": ["./node_modules/preact/compat/"],
-      "react-dom/*": ["./node_modules/preact/compat/*"]
+      "react": ["../../node_modules/preact/compat/"],
+      "react/jsx-runtime": ["../../node_modules/preact/jsx-runtime"],
+      "react-dom": ["../../node_modules/preact/compat/"],
+      "react-dom/*": ["../../node_modules/preact/compat/*"]
     }
   },
   "include": [
diff --git a/packages/vanilla-w-react/tsconfig.json b/packages/vanilla-w-react/tsconfig.json
index e1395741e..39084af5e 100644
--- a/packages/vanilla-w-react/tsconfig.json
+++ b/packages/vanilla-w-react/tsconfig.json
@@ -4,13 +4,7 @@
     "jsx": "react-jsx",
     "jsxImportSource": "react",
     "rootDir": "./src",
-    "outDir": "./dist/.tsout",
-    "paths": {
-      "react": ["./node_modules/preact/compat/"],
-      "react/jsx-runtime": ["./node_modules/preact/jsx-runtime"],
-      "react-dom": ["./node_modules/preact/compat/"],
-      "react-dom/*": ["./node_modules/preact/compat/*"]
-    }
+    "outDir": "./dist/.tsout"
   },
   "include": [
     "./src/**/*"
diff --git a/packages/vanilla/tsconfig.json b/packages/vanilla/tsconfig.json
index e1395741e..13ebc39fe 100644
--- a/packages/vanilla/tsconfig.json
+++ b/packages/vanilla/tsconfig.json
@@ -6,10 +6,10 @@
     "rootDir": "./src",
     "outDir": "./dist/.tsout",
     "paths": {
-      "react": ["./node_modules/preact/compat/"],
-      "react/jsx-runtime": ["./node_modules/preact/jsx-runtime"],
-      "react-dom": ["./node_modules/preact/compat/"],
-      "react-dom/*": ["./node_modules/preact/compat/*"]
+      "react": ["../../node_modules/preact/compat/"],
+      "react/jsx-runtime": ["../../node_modules/preact/jsx-runtime"],
+      "react-dom": ["../../node_modules/preact/compat/"],
+      "react-dom/*": ["../../node_modules/preact/compat/*"]
     }
   },
   "include": [
diff --git a/packages/web-component/tsconfig.json b/packages/web-component/tsconfig.json
index 0845b0450..74a677acb 100644
--- a/packages/web-component/tsconfig.json
+++ b/packages/web-component/tsconfig.json
@@ -4,10 +4,10 @@
     "rootDir": "./src",
     "outDir": "./dist/.tsout",
     "paths": {
-      "react": ["./node_modules/preact/compat/"],
-      "react/jsx-runtime": ["./node_modules/preact/jsx-runtime"],
-      "react-dom": ["./node_modules/preact/compat/"],
-      "react-dom/*": ["./node_modules/preact/compat/*"]
+      "react": ["../../node_modules/preact/compat/"],
+      "react/jsx-runtime": ["../../node_modules/preact/jsx-runtime"],
+      "react-dom": ["../../node_modules/preact/compat/"],
+      "react-dom/*": ["../../node_modules/preact/compat/*"]
     }
   },
   "include": [
diff --git a/scripts/config/tsconfig.browser.json b/scripts/config/tsconfig.browser.json
index b59bdefda..7d906ddfd 100644
--- a/scripts/config/tsconfig.browser.json
+++ b/scripts/config/tsconfig.browser.json
@@ -1,6 +1,7 @@
 {
   "compilerOptions": {
     "target": "es2020",
+    "strict": false,
     "module": "esnext",
     "moduleResolution": "bundler",
     "allowJs": true,
@@ -15,9 +16,11 @@
     "skipLibCheck": true,
     "sourceMap": true,
     "types": [],
+    "paths": { "moment": ["../../node_modules/moment/dist/moment.d.cts"] },
     "composite": true,
     "declaration": true,
     "declarationMap": true,
-    "allowSyntheticDefaultImports": true
+    "allowSyntheticDefaultImports": true,
+    "esModuleInterop": true
   }
 }
diff --git a/scripts/src/pkg/bundle.ts b/scripts/src/pkg/bundle.ts
index de2a4c9e0..756a1d041 100644
--- a/scripts/src/pkg/bundle.ts
+++ b/scripts/src/pkg/bundle.ts
@@ -53,16 +53,14 @@ export async function writeBundles(
     dtsEnabled && buildDtsOptions(pkgBundleStruct, isDev)
   ].filter(Boolean) as RollupOptions[]
 
-  await Promise.all(
-    optionsObjs.map(async (options) => {
-      const bundle = await rollup(options)
-      const outputOptionObjs: OutputOptions[] = arrayify(options.output)
-
-      await Promise.all(
-        outputOptionObjs.map((outputOptions) => bundle.write(outputOptions)),
-      )
-    }),
-  )
+  for (const options of optionsObjs) {
+    const bundle = await rollup(options)
+    const outputOptionObjs: OutputOptions[] = arrayify(options.output)
+
+    await Promise.all(
+      outputOptionObjs.map((outputOptions) => bundle.write(outputOptions)),
+    )
+  }
 }
 
 export async function watchBundles(
diff --git a/scripts/src/pkg/utils/bundle-struct.ts b/scripts/src/pkg/utils/bundle-struct.ts
index 1545f6ab5..2a523e50a 100644
--- a/scripts/src/pkg/utils/bundle-struct.ts
+++ b/scripts/src/pkg/utils/bundle-struct.ts
@@ -107,11 +107,10 @@ export async function buildPkgBundleStruct(
 ): Promise<PkgBundleStruct> {
   const buildConfig = await resolveBuildConfig(pkgDir, pkgJson.buildConfig) || {}
   const entryConfigMap: EntryConfigMap = buildConfig.exports || {}
-  const entryStructMap: { [entryAlias: string]: EntryStruct } = {}
   const copySrcToDest: CopyOperation[] = []
   const miscWatchPaths: string[] = []
 
-  await Promise.all(
+  const entryStructMaps = await Promise.all(
     Object.keys(entryConfigMap).map(async (entryGlob) => {
       const entryConfig = entryConfigMap[entryGlob]
       const isCssAsJs = entryConfig.format === 'css-as-js'
@@ -147,15 +146,16 @@ export async function buildPkgBundleStruct(
           })
         }
       } else {
-        const newEntryStructMap = entryConfig.generator ?
-          await generateEntryStructMap(pkgDir, pkgJson, entryGlob, entryConfig.generator, miscWatchPaths) :
-          await unglobEntryStructMap(pkgDir, entryGlob, entryConfig.src)
-
-        Object.assign(entryStructMap, newEntryStructMap)
+        return entryConfig.generator
+          ? generateEntryStructMap(pkgDir, pkgJson, entryGlob, entryConfig.generator, miscWatchPaths)
+          : unglobEntryStructMap(pkgDir, entryGlob, entryConfig.src)
       }
     }),
   )
 
+  // Rollup uses input order when bundling. Merge results in configuration order.
+  const entryStructMap: EntryStructMap = Object.assign({}, ...entryStructMaps)
+
   return {
     pkgDir,
     pkgJson,
@@ -192,7 +192,7 @@ async function unglobEntryStructMap(
     throw new Error(`Glob '${entryGlob}' does not exist in package '${pkgDir}'`)
   }
 
-  for (const srcPath of srcPaths) {
+  for (const srcPath of srcPaths.sort()) {
     for (const srcExtension of srcExtensions) {
       if (srcPath.endsWith(srcExtension)) {
         const entrySrcAlias = srcPath.substring(0, srcPath.length - srcExtension.length)
@@ -260,7 +260,7 @@ async function generateEntryStructMap(
       throw new Error('Generator object output must have glob entrypoint name')
     }
 
-    for (const key in generatorRes) {
+    for (const key of Object.keys(generatorRes).sort()) {
       const entryAlias = removeDotSlash(entryGlob).replace('*', key)
       const entrySrcBase = joinPaths(transpiledDir, entryAlias)
       const entrySrcPath = entrySrcBase + transpiledExtension
diff --git a/scripts/src/pkg/utils/rollup-plugins.ts b/scripts/src/pkg/utils/rollup-plugins.ts
index 11445e5e9..313ec41e3 100644
--- a/scripts/src/pkg/utils/rollup-plugins.ts
+++ b/scripts/src/pkg/utils/rollup-plugins.ts
@@ -9,8 +9,9 @@ import { readFile, writeFile } from 'fs/promises'
 import { existsSync, statSync } from 'fs'
 import { createRequire } from 'module'
 import { type Plugin } from 'rollup'
-import Terser, { type MinifyOptions as TerserOptions } from 'terser'
-import cssnano from 'cssnano'
+import * as Terser from 'terser'
+import { type MinifyOptions as TerserOptions } from 'terser'
+import { transform as transformCss } from 'esbuild'
 import { standardScriptsDir } from '../../utils/script-runner.ts'
 import { type CopyOperation } from './bundle-struct.ts'
 
@@ -288,7 +289,7 @@ async function getTerserOptions(): Promise<TerserOptions> {
 
 export async function minifyJs(jsText: string): Promise<string> {
   const options = await getTerserOptions()
-  const result = Terser.minify(jsText, options)
+  const result = await Terser.minify(jsText, options)
   if (result.code === undefined) {
     throw new Error('Terser minification failed')
   }
@@ -296,12 +297,12 @@ export async function minifyJs(jsText: string): Promise<string> {
 }
 
 export async function minifyCss(cssText: string): Promise<string> {
-  const result = await cssnano({
-    preset: ['default', {
-      calc: false,
-    }],
-  }).process(cssText)
-  return result.css
+  const result = await transformCss(cssText, {
+    loader: 'css',
+    minifyWhitespace: true,
+    minifyIdentifiers: true,
+  })
+  return result.code
 }
 
 // .d.ts
diff --git a/scripts/src/pkg/utils/rollup-presets.ts b/scripts/src/pkg/utils/rollup-presets.ts
index 2915ed232..7e97c8c0b 100644
--- a/scripts/src/pkg/utils/rollup-presets.ts
+++ b/scripts/src/pkg/utils/rollup-presets.ts
@@ -1,12 +1,14 @@
 import commonjsPluginLib from '@rollup/plugin-commonjs'
 import jsonPluginLib from '@rollup/plugin-json'
+import postcssCommentParserLib from 'postcss-comment'
 import nodeResolvePlugin from '@rollup/plugin-node-resolve'
 import replacePluginLib from '@rollup/plugin-replace'
 import injectPluginLib from '@rollup/plugin-inject'
+import { createHash } from 'crypto'
 import { readFileSync } from 'fs'
 import { readFile } from 'fs/promises'
 import handlebars from 'handlebars'
-import { dirname, join as joinPaths, resolve as resolvePath } from 'path'
+import { dirname, join as joinPaths, relative, resolve as resolvePath, sep } from 'path'
 import { fileURLToPath } from 'url'
 import { type OutputOptions, type Plugin, type RollupOptions } from 'rollup'
 import dtsPlugin from 'rollup-plugin-dts'
@@ -28,7 +30,6 @@ import {
   assetExtensions,
   esmExtension,
 } from './config.ts'
-import { HashGenerator } from './hash-generator.ts'
 import transformClassNamesPlugin from './rollup-plugins-theming.ts'
 import {
   copyFilesPlugin,
@@ -45,6 +46,7 @@ import {
 const commonjsPlugin = cjsInterop(commonjsPluginLib)
 const jsonPlugin = cjsInterop(jsonPluginLib)
 const postcssPlugin = cjsInterop(postcssPluginLib)
+const postcssCommentParser = cjsInterop(postcssCommentParserLib)
 const replacePlugin = cjsInterop(replacePluginLib)
 const injectPlugin = cjsInterop(injectPluginLib)
 
@@ -504,21 +506,34 @@ function cssPlugin(options?: {
 }): Plugin {
   const { extract, minifyClassNames, inject } = options || {}
 
-  return postcssPlugin({
+  const plugin = postcssPlugin({
     config: {
       path: joinPaths(standardScriptsDir, 'config/postcss.config.cjs'),
       ctx: {}, // arguments given to config file
     },
     modules: {
       generateScopedName(localName: string, resourcePath: string) {
-        return minifyClassNames
-          ? 'fc-' + hashGenerator.generate(localName + resourcePath)
-          : 'f-' + localName
+        if (!minifyClassNames) {
+          return 'f-' + localName
+        }
+
+        // Use a stable source path and enough hash bits to avoid order-dependent collision handling.
+        const sourcePath = relative(monorepoRoot, resourcePath).split(sep).join('/')
+        const hash = createHash('sha256')
+          .update(JSON.stringify([pkgManifest.version, sourcePath, localName]))
+          .digest('hex')
+        return 'fc-' + hash.slice(0, 16)
       },
     },
+    parser: (postcssCommentParser as any).parse,
     extract,
     inject: inject || false,
   })
+
+  // Extracted CSS has its own filename. PostCSS's hash hook adds absolute
+  // paths and transform order to otherwise identical JavaScript chunks.
+  delete plugin.augmentChunkHash
+  return plugin
 }
 
 function rerootAssetsPlugin(pkgDir: string): Plugin {
@@ -555,12 +570,9 @@ function cjsInterop<DefaultExport>(namespace: { default: DefaultExport }): Defau
   return namespace.default || (namespace as DefaultExport)
 }
 
-const pkgManifestJson = readFileSync(
-  joinPaths(__dirname, '..', '..', '..', '..', 'package.json'), // in standard root
-  'utf8',
-)
+const monorepoRoot = resolvePath(__dirname, '..', '..', '..', '..')
+const pkgManifestJson = readFileSync(joinPaths(monorepoRoot, 'package.json'), 'utf8')
 const pkgManifest = JSON.parse(pkgManifestJson)
 if (!pkgManifest.version) {
   throw new Error('Must have package.json#version')
 }
-const hashGenerator = new HashGenerator(2, pkgManifest.version)
