@xtrable-ltd/nanoesis 0.1.35 → 0.1.37

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 (28) hide show
  1. package/dist/adapter-azure-blob.js +1 -1
  2. package/dist/adapter-sharp.js +4 -1
  3. package/dist/{chunk-K6WMGWIF.js → chunk-APYNH4WV.js} +6 -1
  4. package/dist/{chunk-GWK7KV2Z.js → chunk-PC4CBVFU.js} +80 -27
  5. package/dist/editor-api.js +2 -2
  6. package/dist/index.d.ts +75 -13
  7. package/dist/index.js +3 -1
  8. package/dist/mcp.js +3 -3
  9. package/editor/assets/{MigrationsPane-CyoVYzF0.js → MigrationsPane-Gl4TRput.js} +1 -1
  10. package/editor/assets/{TemplatesPane-DpsCh-o4.js → TemplatesPane-B61rHJkg.js} +7 -7
  11. package/editor/assets/{cssMode-BAqMF74N.js → cssMode-bYk8sP3U.js} +1 -1
  12. package/editor/assets/{freemarker2-CwSWbc4F.js → freemarker2-BU4rgrfa.js} +1 -1
  13. package/editor/assets/{handlebars-Bsu2MfUx.js → handlebars-CZr10U1G.js} +1 -1
  14. package/editor/assets/{html-CBiUJhK7.js → html-BHiPgbpO.js} +1 -1
  15. package/editor/assets/{htmlMode-CpcJVgL-.js → htmlMode-CRDc1TY9.js} +1 -1
  16. package/editor/assets/{index-DcIPxwAD.js → index-CHzAqQHp.js} +72 -72
  17. package/editor/assets/{javascript-8DiMKs99.js → javascript-BnirEF_x.js} +1 -1
  18. package/editor/assets/{jsonMode-DXHVjz3Z.js → jsonMode-CGYlgPX5.js} +1 -1
  19. package/editor/assets/{liquid-B2vMjkXF.js → liquid-CE01l5IB.js} +1 -1
  20. package/editor/assets/{mdx-Di8mcbBz.js → mdx-WWDFUE9y.js} +1 -1
  21. package/editor/assets/{python-B14f4cy5.js → python-336D9sQt.js} +1 -1
  22. package/editor/assets/{razor-Bia-zZON.js → razor-D-m82ylU.js} +1 -1
  23. package/editor/assets/{tsMode-DYYHZehT.js → tsMode-Dtinbfel.js} +1 -1
  24. package/editor/assets/{typescript-DSAquhra.js → typescript-C3y5Ddzl.js} +1 -1
  25. package/editor/assets/{xml-T7SznOD_.js → xml-Dh77Kjd0.js} +1 -1
  26. package/editor/assets/{yaml-CfKxtDta.js → yaml-4PsSVpRL.js} +1 -1
  27. package/editor/index.html +1 -1
  28. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  contentHash,
3
3
  contentTypeFor
4
- } from "./chunk-GWK7KV2Z.js";
4
+ } from "./chunk-PC4CBVFU.js";
5
5
 
6
6
  // ../../adapters/azure-blob/src/container.ts
7
7
  var InMemoryBlobContainer = class {
@@ -7,7 +7,10 @@ function createSharpEncoder() {
7
7
  const metadata = await sharp(buffer).metadata();
8
8
  const sourceWidth = metadata.width ?? 0;
9
9
  const sourceHeight = metadata.height ?? 0;
10
- const widths = [.../* @__PURE__ */ new Set([...request.widths, sourceWidth])].filter((width) => width > 0 && width <= sourceWidth).sort((a, b) => a - b);
10
+ const fitted = [
11
+ ...new Set(request.widths.filter((width) => width > 0 && width <= sourceWidth))
12
+ ];
13
+ const widths = (fitted.length > 0 ? fitted : [sourceWidth]).sort((a, b) => a - b);
11
14
  const variants = [];
12
15
  for (const format of request.formats) {
13
16
  for (const width of widths) {
@@ -18,7 +18,7 @@ import {
18
18
  renderReferenceMarkdown,
19
19
  validateSite,
20
20
  workingStoreRoundTripDiagnostic
21
- } from "./chunk-GWK7KV2Z.js";
21
+ } from "./chunk-PC4CBVFU.js";
22
22
 
23
23
  // ../editor-api/src/scaffold.ts
24
24
  var HOME_HTML = `<!doctype html>
@@ -940,6 +940,7 @@ function createEditor(config) {
940
940
  const reconcile = config.enumerate === void 0 ? void 0 : async () => working.reconcile([...await config.enumerate()]);
941
941
  let progressEvents = [];
942
942
  let progressRunning = false;
943
+ let mediaCache = /* @__PURE__ */ new Map();
943
944
  const publish = async (options) => {
944
945
  progressEvents = [];
945
946
  progressRunning = true;
@@ -954,17 +955,21 @@ function createEditor(config) {
954
955
  }
955
956
  const dir = config.users === void 0 ? void 0 : authorDirectory(await config.users());
956
957
  const prebuild = typeof config.prebuild === "function" ? await config.prebuild() : config.prebuild;
958
+ const nextCache = /* @__PURE__ */ new Map();
957
959
  const result = await publishSite(working, sink, {
958
960
  ...config.images !== void 0 && { imageEncoder: config.images },
959
961
  ...config.purge !== void 0 && { purge: config.purge },
960
962
  ...config.baseUrl !== void 0 && { baseUrl: config.baseUrl },
961
963
  ...dir !== void 0 && { authorDirectory: dir },
962
964
  ...prebuild !== void 0 && { prebuild },
965
+ mediaCache,
966
+ onMediaEntry: (hash, cached) => nextCache.set(hash, cached),
963
967
  onProgress: record
964
968
  });
965
969
  if (result.ok && wipeBeforePublish && config.website.prune !== void 0) {
966
970
  await config.website.prune(new Set(result.written));
967
971
  }
972
+ if (result.ok) mediaCache = nextCache;
968
973
  return result;
969
974
  } finally {
970
975
  progressRunning = false;
@@ -1664,7 +1664,7 @@ function cacheControlFor(artifact) {
1664
1664
  }
1665
1665
 
1666
1666
  // ../engine/src/media/media.ts
1667
- var DEFAULT_WIDTHS = [400, 800, 1200, 1600];
1667
+ var DEFAULT_WIDTHS = [1600];
1668
1668
  var MIME = {
1669
1669
  avif: "image/avif",
1670
1670
  webp: "image/webp",
@@ -1688,47 +1688,87 @@ function contentHash(bytes) {
1688
1688
  }
1689
1689
  return (hash >>> 0).toString(36);
1690
1690
  }
1691
- async function processImage(input, assetPath, encoder) {
1691
+ function buildImageOutput(assetPath, hash, source, variants, bytesFor) {
1692
1692
  const fallbackFormat = fallbackFormatFor(assetPath);
1693
- const formats = [.../* @__PURE__ */ new Set(["avif", "webp", fallbackFormat])];
1694
- const encoded = await encoder.encode(input, { widths: DEFAULT_WIDTHS, formats });
1695
- const hash = contentHash(input);
1696
1693
  const base = assetPath.slice(
1697
1694
  0,
1698
1695
  assetPath.lastIndexOf(".") >= 0 ? assetPath.lastIndexOf(".") : assetPath.length
1699
1696
  );
1700
1697
  const artifacts = [];
1701
- const urlOf = (variant) => {
1702
- const path = `${base}.${hash}-${variant.width}.${extOf(variant.format)}`;
1703
- artifacts.push({ path, contents: variant.bytes, cacheControl: CACHE_IMMUTABLE });
1704
- return `/${path}`;
1705
- };
1706
1698
  const byFormat = /* @__PURE__ */ new Map();
1707
- for (const variant of [...encoded.variants].sort((a, b) => a.width - b.width)) {
1708
- const url = urlOf(variant);
1699
+ for (const variant of [...variants].sort((a, b) => a.width - b.width)) {
1700
+ const path = `${base}.${hash}-${variant.width}.${extOf(variant.format)}`;
1701
+ const bytes = bytesFor(variant);
1702
+ artifacts.push(
1703
+ bytes === void 0 ? { path, contents: EMPTY_BYTES, cacheControl: CACHE_IMMUTABLE, present: true } : { path, contents: bytes, cacheControl: CACHE_IMMUTABLE }
1704
+ );
1709
1705
  const list = byFormat.get(variant.format) ?? [];
1710
- list.push({ url, width: variant.width });
1706
+ list.push({ url: `/${path}`, width: variant.width });
1711
1707
  byFormat.set(variant.format, list);
1712
1708
  }
1713
1709
  const srcsetOf = (format) => (byFormat.get(format) ?? []).map((entry) => `${entry.url} ${entry.width}w`).join(", ");
1714
- const sources = ["avif", "webp"].filter((format) => byFormat.has(format)).map((format) => ({ format, mime: MIME[format], srcset: srcsetOf(format) }));
1715
- const fallbackList = byFormat.get(fallbackFormat) ?? [];
1716
- const fallbackSrc = fallbackList[fallbackList.length - 1]?.url ?? `/${assetPath}`;
1710
+ const produced = [...byFormat.keys()];
1711
+ const imgFormat = byFormat.has(fallbackFormat) ? fallbackFormat : produced[0];
1712
+ const sources = ["avif", "webp"].filter((format) => format !== imgFormat && byFormat.has(format)).map((format) => ({ format, mime: MIME[format], srcset: srcsetOf(format) }));
1713
+ const imgList = imgFormat === void 0 ? [] : byFormat.get(imgFormat) ?? [];
1714
+ const fallbackSrc = imgList[imgList.length - 1]?.url ?? `/${assetPath}`;
1717
1715
  const info = {
1718
- width: encoded.sourceWidth,
1719
- height: encoded.sourceHeight,
1716
+ width: source.width,
1717
+ height: source.height,
1720
1718
  sources,
1721
1719
  fallbackSrc,
1722
- ...encoded.blurDataUri !== void 0 && { blurDataUri: encoded.blurDataUri }
1720
+ ...source.blurDataUri !== void 0 && { blurDataUri: source.blurDataUri }
1723
1721
  };
1724
1722
  return { artifacts, info };
1725
1723
  }
1724
+ var EMPTY_BYTES = new Uint8Array(0);
1725
+ async function processImage(input, assetPath, encoder) {
1726
+ const encoded = await encoder.encode(input, { widths: DEFAULT_WIDTHS, formats: ["webp"] });
1727
+ const hash = contentHash(input);
1728
+ const bytesByVariant = /* @__PURE__ */ new Map();
1729
+ const variants = [];
1730
+ for (const variant of encoded.variants) {
1731
+ bytesByVariant.set(variantKey(variant), variant.bytes);
1732
+ variants.push({ format: variant.format, width: variant.width });
1733
+ }
1734
+ const { artifacts, info } = buildImageOutput(
1735
+ assetPath,
1736
+ hash,
1737
+ { width: encoded.sourceWidth, height: encoded.sourceHeight, ...blur(encoded.blurDataUri) },
1738
+ variants,
1739
+ (variant) => bytesByVariant.get(variantKey(variant))
1740
+ );
1741
+ const cached = {
1742
+ sourceWidth: encoded.sourceWidth,
1743
+ sourceHeight: encoded.sourceHeight,
1744
+ // Stored width-ascending so a cache hit rebuilds the identical artifact/srcset order.
1745
+ variants: [...variants].sort((a, b) => a.width - b.width),
1746
+ ...blur(encoded.blurDataUri)
1747
+ };
1748
+ return { artifacts, info, cached };
1749
+ }
1750
+ function processImageFromCache(assetPath, hash, cached) {
1751
+ return buildImageOutput(
1752
+ assetPath,
1753
+ hash,
1754
+ { width: cached.sourceWidth, height: cached.sourceHeight, ...blur(cached.blurDataUri) },
1755
+ cached.variants,
1756
+ () => void 0
1757
+ );
1758
+ }
1759
+ function variantKey(variant) {
1760
+ return `${variant.format}-${variant.width}`;
1761
+ }
1762
+ function blur(blurDataUri) {
1763
+ return blurDataUri !== void 0 ? { blurDataUri } : {};
1764
+ }
1726
1765
  function buildPictureMarkup(info, extraAttrs) {
1766
+ const carried = extraAttrs.filter(([name]) => name !== "src" && name !== "width" && name !== "height").map(([name, value]) => ` ${name}="${escapeHtmlAttribute(value)}"`).join("");
1767
+ const img = `<img src="${escapeHtmlAttribute(info.fallbackSrc)}" width="${info.width}" height="${info.height}" loading="lazy" decoding="async"${carried}>`;
1768
+ if (info.sources.length === 0) return img;
1727
1769
  const sources = info.sources.map(
1728
1770
  (source) => `<source type="${source.mime}" srcset="${escapeHtmlAttribute(source.srcset)}">`
1729
1771
  ).join("");
1730
- const carried = extraAttrs.filter(([name]) => name !== "src" && name !== "width" && name !== "height").map(([name, value]) => ` ${name}="${escapeHtmlAttribute(value)}"`).join("");
1731
- const img = `<img src="${escapeHtmlAttribute(info.fallbackSrc)}" width="${info.width}" height="${info.height}" loading="lazy" decoding="async"${carried}>`;
1732
1772
  return `<picture>${sources}${img}</picture>`;
1733
1773
  }
1734
1774
 
@@ -2287,7 +2327,9 @@ async function compileSite(source, options = {}) {
2287
2327
  plans.map((p) => p.refs),
2288
2328
  options.imageEncoder,
2289
2329
  options.imageConcurrency ?? DEFAULT_IMAGE_CONCURRENCY,
2290
- onProgress === void 0 ? void 0 : (published) => report(published)
2330
+ onProgress === void 0 ? void 0 : (published) => report(published),
2331
+ options.mediaCache,
2332
+ options.onMediaEntry
2291
2333
  );
2292
2334
  artifacts.push(...mediaArtifacts);
2293
2335
  for (const { node, templateName, template, refs } of plans) {
@@ -2440,7 +2482,7 @@ function itemMediaRefs(node, analysis) {
2440
2482
  }
2441
2483
  return { images, files };
2442
2484
  }
2443
- async function collectSiteMedia(source, itemRefs, encoder, imageConcurrency, onAsset) {
2485
+ async function collectSiteMedia(source, itemRefs, encoder, imageConcurrency, onAsset, mediaCache, onMediaEntry) {
2444
2486
  const uniqueOrdered = (pick) => {
2445
2487
  const seen = /* @__PURE__ */ new Set();
2446
2488
  const order = [];
@@ -2473,7 +2515,14 @@ async function collectSiteMedia(source, itemRefs, encoder, imageConcurrency, onA
2473
2515
  const imagePaths = uniqueOrdered((r) => r.images);
2474
2516
  const encoded = await mapWithConcurrency(imagePaths, imageConcurrency, async (published) => {
2475
2517
  const bytes = await tryReadBytes(source, `content/${published}`);
2476
- const result = bytes === void 0 ? void 0 : await processImage(bytes, published, encoder);
2518
+ if (bytes === void 0) {
2519
+ onAsset?.(published);
2520
+ return void 0;
2521
+ }
2522
+ const hash = contentHash(bytes);
2523
+ const hit = mediaCache?.get(hash);
2524
+ const result = hit !== void 0 ? { ...processImageFromCache(published, hash, hit), cached: hit } : await processImage(bytes, published, encoder);
2525
+ onMediaEntry?.(hash, result.cached);
2477
2526
  onAsset?.(published);
2478
2527
  return result;
2479
2528
  });
@@ -2632,7 +2681,7 @@ var FIELD_TYPE_DOCS = [
2632
2681
  },
2633
2682
  {
2634
2683
  type: "image",
2635
- summary: "An image asset. On publish it runs the media pipeline (responsive <picture> variants). Inferred from <img src>.",
2684
+ summary: "An image asset. On publish it is re-encoded to an optimised WebP and the <img> is rewritten to point at it (lazy-loaded, fixed dimensions). Inferred from <img src>.",
2636
2685
  example: '<img src="{hero}" alt="{caption}">'
2637
2686
  },
2638
2687
  {
@@ -3323,7 +3372,8 @@ async function publishSite(source, sink, options = {}) {
3323
3372
  const passthrough = await collectPublic(source, publicDir);
3324
3373
  const hashByPath = /* @__PURE__ */ new Map();
3325
3374
  for (const artifact of [...artifacts, ...passthrough])
3326
- hashByPath.set(artifact.path, contentHash(asBytes(artifact.contents)));
3375
+ if (cacheControlFor(artifact) !== CACHE_IMMUTABLE)
3376
+ hashByPath.set(artifact.path, contentHash(asBytes(artifact.contents)));
3327
3377
  const hashFor = (path) => hashByPath.get(path);
3328
3378
  const stamped = artifacts.map(
3329
3379
  (artifact) => typeof artifact.contents === "string" && artifact.path.endsWith(".html") ? { ...artifact, contents: cacheBustAssets(artifact.contents, hashFor) } : artifact
@@ -3337,7 +3387,9 @@ async function publishSite(source, sink, options = {}) {
3337
3387
  let uploaded = 0;
3338
3388
  const writeGroup = async (group) => {
3339
3389
  await mapWithConcurrency(group, writeConcurrency, async (artifact) => {
3340
- await sink.write(artifact.path, artifact.contents, cacheControlFor(artifact));
3390
+ if (artifact.present !== true) {
3391
+ await sink.write(artifact.path, artifact.contents, cacheControlFor(artifact));
3392
+ }
3341
3393
  uploaded += 1;
3342
3394
  onProgress?.({ phase: "upload", written: uploaded, total: uploadTotal });
3343
3395
  });
@@ -3653,6 +3705,7 @@ export {
3653
3705
  cacheControlFor,
3654
3706
  contentHash,
3655
3707
  processImage,
3708
+ processImageFromCache,
3656
3709
  buildPictureMarkup,
3657
3710
  compileTemplate,
3658
3711
  textContent,
@@ -21,8 +21,8 @@ import {
21
21
  serveEditorAsset,
22
22
  templateSnapshotIntegrityDiagnostic,
23
23
  templateSuffixConflictDiagnostic
24
- } from "./chunk-K6WMGWIF.js";
25
- import "./chunk-GWK7KV2Z.js";
24
+ } from "./chunk-APYNH4WV.js";
25
+ import "./chunk-PC4CBVFU.js";
26
26
  export {
27
27
  FileBrandingStore,
28
28
  InMemoryBrandingStore,
package/dist/index.d.ts CHANGED
@@ -448,6 +448,18 @@ interface CompileSiteOptions {
448
448
  readonly imageEncoder?: ImageEncoder;
449
449
  /** Max images encoded in parallel *site-wide* (default {@link DEFAULT_IMAGE_CONCURRENCY}). */
450
450
  readonly imageConcurrency?: number;
451
+ /**
452
+ * The variant cache (DESIGN §8/§11): facts about already-published images keyed by the
453
+ * original's content hash. An image whose hash is here skips the (CPU-heavy) re-encode, its
454
+ * variants are kept (as *present* artifacts) instead of re-uploaded. Omit for a full encode.
455
+ */
456
+ readonly mediaCache?: ReadonlyMap<string, CachedImage>;
457
+ /**
458
+ * Reports each processed image's {@link CachedImage} facts, whether freshly encoded or read
459
+ * from {@link mediaCache}, keyed by content hash, so a host can persist the manifest for the
460
+ * next publish. Side-effect-only; never changes the output (like {@link onProgress}).
461
+ */
462
+ readonly onMediaEntry?: (hash: string, cached: CachedImage) => void;
451
463
  /**
452
464
  * Resolve an author's stored `user` handle to its current display name (DESIGN
453
465
  * §6.11). Host-injected (the engine can't read the user store); without it,
@@ -473,6 +485,13 @@ interface Artifact {
473
485
  * (content-hashed) asset sets it to immutable. Only the publish sink reads it.
474
486
  */
475
487
  readonly cacheControl?: string;
488
+ /**
489
+ * When true, this artifact is **already published** at its (content-hashed) path and its
490
+ * bytes are unchanged, a variant-cache hit (DESIGN §8/§11). The publish keeps the path in
491
+ * its written set (so the orphan sweep does not delete it) but does **not** re-upload it,
492
+ * and `contents` is empty. Absent/false means a normal artifact to write.
493
+ */
494
+ readonly present?: boolean;
476
495
  }
477
496
  /**
478
497
  * Compute what a publish *will* produce (DESIGN §11) without encoding or writing anything:
@@ -533,15 +552,20 @@ declare function compilePage(source: ContentSource, itemPath: string, options?:
533
552
  declare function buildResolveContext(tree: DirNode): ResolveContext;
534
553
 
535
554
  /**
536
- * The media pipeline (DESIGN §8). Images are transformed into responsive,
537
- * modern-format variants and an `<img>` is expanded into an optimised `<picture>`.
538
- * The *policy* (which widths/formats, content-hashed names, picture markup) lives
539
- * here in the pure engine; the actual pixel encoding is a port (CLAUDE.md §3) so
540
- * the engine needs no native dependency and stays testable.
555
+ * The media pipeline (DESIGN §8). Each image is re-encoded once into a single, modern,
556
+ * content-hashed **WebP** and the author's `<img>` is rewritten to point at it (lazy-loaded,
557
+ * with intrinsic width/height so there is no layout shift). WebP has near-universal support
558
+ * and is much smaller than the original; one encode per image keeps publish fast (the earlier
559
+ * AVIF + multi-width + JPEG-fallback fan-out made adding images take minutes on a small
560
+ * instance). Display sizing is the site's CSS job, so we do not emit a responsive `srcset`.
561
+ * The *policy* (one WebP, the width cap, content-hashed names) lives here in the pure engine;
562
+ * the actual pixel encoding is a port (CLAUDE.md §3) so the engine needs no native dependency
563
+ * and stays testable.
541
564
  */
542
565
  type ImageFormat = 'avif' | 'webp' | 'jpeg' | 'png';
543
566
  interface EncodeRequest {
544
- /** Candidate widths; the encoder must not upscale and should include the native width. */
567
+ /** Candidate widths (a size cap): the encoder emits each that does not upscale, and falls
568
+ * back to the native width only when none fit. It does not otherwise add the native width. */
545
569
  readonly widths: readonly number[];
546
570
  readonly formats: readonly ImageFormat[];
547
571
  }
@@ -575,6 +599,27 @@ interface ImageInfo {
575
599
  readonly fallbackSrc: string;
576
600
  readonly blurDataUri?: string;
577
601
  }
602
+ /** One produced variant's identity, the format + pixel width whose URL is derived
603
+ * from the original's content hash. The bytes are not part of it (they live at the
604
+ * derived path); this is what the variant cache stores. */
605
+ interface VariantSpec {
606
+ readonly format: ImageFormat;
607
+ readonly width: number;
608
+ }
609
+ /**
610
+ * The cacheable facts about one processed image (the publish variant cache, DESIGN §8/§11):
611
+ * everything needed to rebuild its {@link ImageInfo} and variant artifact paths *without*
612
+ * re-running the (CPU-heavy) encode. Keyed by the original's content hash, so an unchanged
613
+ * image reuses its already-published variants instead of encoding again. Holds no bytes,
614
+ * the variant bytes are already at their content-hashed paths in the published site.
615
+ */
616
+ interface CachedImage {
617
+ readonly sourceWidth: number;
618
+ readonly sourceHeight: number;
619
+ /** The variants that were produced, in publish order (width ascending). */
620
+ readonly variants: readonly VariantSpec[];
621
+ readonly blurDataUri?: string;
622
+ }
578
623
  /**
579
624
  * Per-item media lookup the compiler consults: a processed image by its asset
580
625
  * reference, or the published URL of a copied file. Built by the orchestrator.
@@ -586,18 +631,35 @@ interface MediaResolver {
586
631
  /** A small, fast, non-cryptographic content hash (FNV-1a) for cache-busting names. */
587
632
  declare function contentHash(bytes: Uint8Array): string;
588
633
  /**
589
- * Encode one image into variants and compute its {@link ImageInfo} plus the
590
- * binary artifacts to publish. Variant filenames are content-hashed so they
591
- * cache-bust for free (DESIGN §8). `assetPath` is the published-relative path of
592
- * the original, e.g. "blog/assets/hero.jpg".
634
+ * Encode one image into variants and compute its {@link ImageInfo}, the binary artifacts to
635
+ * publish, and the {@link CachedImage} facts a host can cache so the next publish of the same
636
+ * bytes skips this (CPU-heavy) encode. Variant filenames are content-hashed so they cache-bust
637
+ * for free (DESIGN §8). `assetPath` is the published-relative path of the original, e.g.
638
+ * "blog/assets/hero.jpg".
593
639
  */
594
640
  declare function processImage(input: Uint8Array, assetPath: string, encoder: ImageEncoder): Promise<{
595
641
  readonly artifacts: readonly Artifact[];
596
642
  readonly info: ImageInfo;
643
+ readonly cached: CachedImage;
597
644
  }>;
598
645
  /**
599
- * Build the `<picture>` markup for an image (DESIGN §8). `extraAttrs` carries the
600
- * resolved attributes from the original `<img>` (alt, class, …) onto the fallback.
646
+ * Rebuild an image's {@link ImageInfo} and **present** variant artifacts from a
647
+ * {@link CachedImage} (a variant-cache hit, DESIGN §8/§11), without encoding. `hash` is the
648
+ * original's content hash (the cache key); the output is byte-identical to what
649
+ * {@link processImage} produced for the same bytes, because both go through
650
+ * {@link buildImageOutput}. The artifacts are *present* (already published), so the publish
651
+ * keeps their paths but does not re-upload them.
652
+ */
653
+ declare function processImageFromCache(assetPath: string, hash: string, cached: CachedImage): {
654
+ readonly artifacts: readonly Artifact[];
655
+ readonly info: ImageInfo;
656
+ };
657
+ /**
658
+ * Build the markup for a processed image (DESIGN §8). `extraAttrs` carries the resolved
659
+ * attributes from the author's `<img>` (alt, class, …) onto the emitted `<img>`. With no
660
+ * alternate-format sources (the default, single-WebP policy) this is a plain optimised
661
+ * `<img>`; when {@link ImageInfo.sources} carries other formats it is wrapped in a
662
+ * `<picture>` with one `<source>` each.
601
663
  */
602
664
  declare function buildPictureMarkup(info: ImageInfo, extraAttrs: ReadonlyArray<readonly [string, string]>): string;
603
665
 
@@ -1970,4 +2032,4 @@ declare function createDiagnosticRegistry(): DiagnosticRegistry;
1970
2032
 
1971
2033
  declare const workingStoreRoundTripDiagnostic: Diagnostic;
1972
2034
 
1973
- export { type Artifact, type ArtifactSink, type AuthEndpoints, type AuthResult, type AuthorDirectory, type AuthorEntry, type AuthorOption, type AuthorRef, type AuthoringReference, type BlobStore, type BoundItem, CACHE_IMMUTABLE, CACHE_REVALIDATE, type ChangePasswordRequest, type ChangePasswordSuccess, type CollectionConfig, type CollectionQuery, type CompileInput, type CompilePageOptions, type CompileSiteOptions, type CompiledPage, type ComponentMap, type ConditionalBlobStore, type ContentIndex, type ContentItem, ContentParseError, type ContentSource, type CreateTokenSuccess, type CreateUserRequest, DEFAULT_DIRS, DOCUMENT_SHELL, type DerivedField, type DiagnoseDeps, type Severity as DiagnoseSeverity, type Source as DiagnoseSource, type Diagnostic$1 as Diagnostic, type Diagnostic as DiagnosticCheck, type DiagnosticRegistry, type DirEntry, type DirNode, type EncodeRequest, type EncodedImage, type EncodedVariant, type EntryKind, FIELD_TYPES, type FieldPrimitive, type FieldRecord, type FieldType, type FieldTypeDef, type FieldValue, type Finding, type IdentityProvider, type ImageEncoder, type ImageFormat, type ImageInfo, InMemoryArtifactSink, InMemoryBlobStore, InMemoryContentSource, IndexedStore, type ItemNode, type LengthConstraints, type LoginRequest, type LoginSuccess, type MediaResolver, type MigrationResolution, NotFoundError, type PageEntry, type PendingMigrationItem, type PendingMigrations, type PreBuildHook, type Principal, type ProgressReporter, type ProgressSummary, type PublishOptions, type PublishPlan, type PublishProgress, type PublishResource, type PublishResult, type PublishSummary, type PurgeService, RESERVED_PREFIX, type ReconcileResult, type RedirectRule, type ReferenceContext, type ReferenceEntry, type ReferenceSection, type RefreshSuccess, type RenameResult, type Repair, type RepairArgs, type ResetPasswordRequest, type ResolveContext, type Role, type RssOptions, type SchemaDelta, type SchemaFieldRef, type Scope, type Severity$1 as Severity, type SiteConfig, type SortFile, type StampDecision, type StampRecord, type Storage, type TemplateAnalysis, type TemplateKind, type TokenContext, type TokenRef, type TreeNode, type TypeChange, type UpdateUserRequest, type UserAdminEndpoints, type UserSummary, type ValidationResult, type ValueKind, type VersionedIndex, type WorkingStore, analyzeTemplate, applyMigration, baseTemplateName, bestFitSnapshot, buildAuthoringReference, buildContentIndex, buildPictureMarkup, buildRedirects, buildResolveContext, buildRss, buildSitemap, cacheControlFor, canEdit, compilePage, compileSite, compileTemplate, computeSchemaDelta, contentHash, contentTypeFor, createDiagnosticRegistry, deriveFields, detectStamp, emptyIndex, escapeHtmlAttribute, escapeHtmlText, escapeJsonStringContent, findTokens, hasRole, humanize, inferControl, isConditionalBlobStore, isDestructiveTypeChange, isFieldType, isReservedVersionedPath, isVersionedTemplateName, joinAuthors, loadComponentScripts, loadComponentStyles, loadComponents, loadContentTree, loadDocumentShell, loadIndex, loadIndexVersioned, loadRedirects, loadSiteConfig, loadTemplate, nextVersionNumber, noopPurgeService, outputPathForItem, parseContentItem, parseRedirects, parseSortFile, pendingMigrations, planPublish, processImage, publishSite, reconcileIndex, renderAuthors, renderReferenceMarkdown, sanitizeUrl, saveIndex, saveIndexConditional, slugify, snapshotName, textContent, toAuthorRefs, urlForItem, validateSite, valueKindOf, versionNumber, wholeValueToken, workingStoreRoundTripDiagnostic };
2035
+ export { type Artifact, type ArtifactSink, type AuthEndpoints, type AuthResult, type AuthorDirectory, type AuthorEntry, type AuthorOption, type AuthorRef, type AuthoringReference, type BlobStore, type BoundItem, CACHE_IMMUTABLE, CACHE_REVALIDATE, type CachedImage, type ChangePasswordRequest, type ChangePasswordSuccess, type CollectionConfig, type CollectionQuery, type CompileInput, type CompilePageOptions, type CompileSiteOptions, type CompiledPage, type ComponentMap, type ConditionalBlobStore, type ContentIndex, type ContentItem, ContentParseError, type ContentSource, type CreateTokenSuccess, type CreateUserRequest, DEFAULT_DIRS, DOCUMENT_SHELL, type DerivedField, type DiagnoseDeps, type Severity as DiagnoseSeverity, type Source as DiagnoseSource, type Diagnostic$1 as Diagnostic, type Diagnostic as DiagnosticCheck, type DiagnosticRegistry, type DirEntry, type DirNode, type EncodeRequest, type EncodedImage, type EncodedVariant, type EntryKind, FIELD_TYPES, type FieldPrimitive, type FieldRecord, type FieldType, type FieldTypeDef, type FieldValue, type Finding, type IdentityProvider, type ImageEncoder, type ImageFormat, type ImageInfo, InMemoryArtifactSink, InMemoryBlobStore, InMemoryContentSource, IndexedStore, type ItemNode, type LengthConstraints, type LoginRequest, type LoginSuccess, type MediaResolver, type MigrationResolution, NotFoundError, type PageEntry, type PendingMigrationItem, type PendingMigrations, type PreBuildHook, type Principal, type ProgressReporter, type ProgressSummary, type PublishOptions, type PublishPlan, type PublishProgress, type PublishResource, type PublishResult, type PublishSummary, type PurgeService, RESERVED_PREFIX, type ReconcileResult, type RedirectRule, type ReferenceContext, type ReferenceEntry, type ReferenceSection, type RefreshSuccess, type RenameResult, type Repair, type RepairArgs, type ResetPasswordRequest, type ResolveContext, type Role, type RssOptions, type SchemaDelta, type SchemaFieldRef, type Scope, type Severity$1 as Severity, type SiteConfig, type SortFile, type StampDecision, type StampRecord, type Storage, type TemplateAnalysis, type TemplateKind, type TokenContext, type TokenRef, type TreeNode, type TypeChange, type UpdateUserRequest, type UserAdminEndpoints, type UserSummary, type ValidationResult, type ValueKind, type VariantSpec, type VersionedIndex, type WorkingStore, analyzeTemplate, applyMigration, baseTemplateName, bestFitSnapshot, buildAuthoringReference, buildContentIndex, buildPictureMarkup, buildRedirects, buildResolveContext, buildRss, buildSitemap, cacheControlFor, canEdit, compilePage, compileSite, compileTemplate, computeSchemaDelta, contentHash, contentTypeFor, createDiagnosticRegistry, deriveFields, detectStamp, emptyIndex, escapeHtmlAttribute, escapeHtmlText, escapeJsonStringContent, findTokens, hasRole, humanize, inferControl, isConditionalBlobStore, isDestructiveTypeChange, isFieldType, isReservedVersionedPath, isVersionedTemplateName, joinAuthors, loadComponentScripts, loadComponentStyles, loadComponents, loadContentTree, loadDocumentShell, loadIndex, loadIndexVersioned, loadRedirects, loadSiteConfig, loadTemplate, nextVersionNumber, noopPurgeService, outputPathForItem, parseContentItem, parseRedirects, parseSortFile, pendingMigrations, planPublish, processImage, processImageFromCache, publishSite, reconcileIndex, renderAuthors, renderReferenceMarkdown, sanitizeUrl, saveIndex, saveIndexConditional, slugify, snapshotName, textContent, toAuthorRefs, urlForItem, validateSite, valueKindOf, versionNumber, wholeValueToken, workingStoreRoundTripDiagnostic };
package/dist/index.js CHANGED
@@ -66,6 +66,7 @@ import {
66
66
  pendingMigrations,
67
67
  planPublish,
68
68
  processImage,
69
+ processImageFromCache,
69
70
  publishSite,
70
71
  reconcileIndex,
71
72
  renderAuthors,
@@ -83,7 +84,7 @@ import {
83
84
  versionNumber,
84
85
  wholeValueToken,
85
86
  workingStoreRoundTripDiagnostic
86
- } from "./chunk-GWK7KV2Z.js";
87
+ } from "./chunk-PC4CBVFU.js";
87
88
  export {
88
89
  CACHE_IMMUTABLE,
89
90
  CACHE_REVALIDATE,
@@ -152,6 +153,7 @@ export {
152
153
  pendingMigrations,
153
154
  planPublish,
154
155
  processImage,
156
+ processImageFromCache,
155
157
  publishSite,
156
158
  reconcileIndex,
157
159
  renderAuthors,
package/dist/mcp.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  MCP_TOOLS,
4
4
  callMcpTool,
5
5
  readMcpResource
6
- } from "./chunk-K6WMGWIF.js";
7
- import "./chunk-GWK7KV2Z.js";
6
+ } from "./chunk-APYNH4WV.js";
7
+ import "./chunk-PC4CBVFU.js";
8
8
 
9
9
  // ../../hosts/host-mcp/src/http.ts
10
10
  import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
@@ -56,7 +56,7 @@ function createMcpServer(deps, identity) {
56
56
  }
57
57
 
58
58
  // ../../hosts/host-mcp/src/http.ts
59
- var DEFAULT_VERSION = true ? "0.1.35" : "0.0.0-workspace";
59
+ var DEFAULT_VERSION = true ? "0.1.37" : "0.0.0-workspace";
60
60
  async function handleMcpRequest(deps, request, opts) {
61
61
  const server = createMcpServer(deps, {
62
62
  name: opts?.name ?? "nanoesis",
@@ -1,4 +1,4 @@
1
- import{ai as Ke,aG as F,ag as Te,aa as g,W as w,T as e,h as n,ab as Qe,q as a,Q as z,aH as h,y as j,aC as o,R as _,au as v,r as Ve,J as U,x as Ye,i as ze,aN as Ue,aA as c,aI as J,aw as X,ax as _e,Y as Xe,at as Ze,ac as ea}from"./index-DcIPxwAD.js";var aa=_('<p class="placeholder svelte-1lpfi31">Loading preview…</p>'),ta=_('<p class="error svelte-1lpfi31" role="alert"> </p>'),la=_("<option> </option>"),sa=_('<select class="svelte-1lpfi31"></select>'),ra=_('<li class="orphan svelte-1lpfi31"><div class="orphan-head svelte-1lpfi31"><code class="orphan-name svelte-1lpfi31"> </code> <span class="orphan-value svelte-1lpfi31"> </span></div> <div class="orphan-actions svelte-1lpfi31" role="radiogroup"><label class="svelte-1lpfi31"><input type="radio" value="drop"/> Drop</label> <label class="svelte-1lpfi31"><input type="radio" value="keep"/> Keep (unrendered)</label> <label class="svelte-1lpfi31"><input type="radio" value="rename"/> Rename to</label> <!></div></li>'),ia=_(`<section class="resolutions svelte-1lpfi31" aria-label="Orphan field resolutions"><h3 class="svelte-1lpfi31">Orphan fields</h3> <p class="hint svelte-1lpfi31">These fields exist in this item's JSON but the current template doesn't render them.
1
+ import{ai as Ke,aG as F,ag as Te,aa as g,W as w,T as e,h as n,ab as Qe,q as a,Q as z,aH as h,y as j,aC as o,R as _,au as v,r as Ve,J as U,x as Ye,i as ze,aN as Ue,aA as c,aI as J,aw as X,ax as _e,Y as Xe,at as Ze,ac as ea}from"./index-CHzAqQHp.js";var aa=_('<p class="placeholder svelte-1lpfi31">Loading preview…</p>'),ta=_('<p class="error svelte-1lpfi31" role="alert"> </p>'),la=_("<option> </option>"),sa=_('<select class="svelte-1lpfi31"></select>'),ra=_('<li class="orphan svelte-1lpfi31"><div class="orphan-head svelte-1lpfi31"><code class="orphan-name svelte-1lpfi31"> </code> <span class="orphan-value svelte-1lpfi31"> </span></div> <div class="orphan-actions svelte-1lpfi31" role="radiogroup"><label class="svelte-1lpfi31"><input type="radio" value="drop"/> Drop</label> <label class="svelte-1lpfi31"><input type="radio" value="keep"/> Keep (unrendered)</label> <label class="svelte-1lpfi31"><input type="radio" value="rename"/> Rename to</label> <!></div></li>'),ia=_(`<section class="resolutions svelte-1lpfi31" aria-label="Orphan field resolutions"><h3 class="svelte-1lpfi31">Orphan fields</h3> <p class="hint svelte-1lpfi31">These fields exist in this item's JSON but the current template doesn't render them.
2
2
  Pick what to do with each.</p> <ul class="orphans svelte-1lpfi31"></ul></section>`),na=_('<p class="error svelte-1lpfi31" role="alert"> </p>'),oa=_('<div class="diff svelte-1lpfi31"><section class="pane svelte-1lpfi31" aria-label="Previous version (left)"><header class="pane-head svelte-1lpfi31"><!></header> <pre class="source svelte-1lpfi31"> </pre></section> <section class="pane svelte-1lpfi31" aria-label="Current template (right)"><header class="pane-head svelte-1lpfi31"> </header> <pre class="source svelte-1lpfi31"> </pre></section></div> <!> <!> <div class="commit-bar svelte-1lpfi31"><button type="button" class="primary svelte-1lpfi31"> </button></div>',1),va=_('<header class="detail-head svelte-1lpfi31"><button type="button" class="back svelte-1lpfi31">← Back</button> <h2 class="svelte-1lpfi31"> </h2></header> <!>',1),pa=_('<p class="error svelte-1lpfi31" role="alert"> </p>'),ca=_('<p class="placeholder svelte-1lpfi31">Loading…</p>'),fa=_(`<div class="empty svelte-1lpfi31"><h3 class="svelte-1lpfi31">All caught up</h3> <p>Every content item's fields match its bound template. Migrations show up here when a
3
3
  destructive template edit (or a manual hand-edit) leaves an item with orphan fields.</p></div>`),ua=_('<li class="item"><button class="item-row svelte-1lpfi31" type="button"><span class="item-path svelte-1lpfi31"><code> </code></span> <span class="item-summary svelte-1lpfi31"><!> <!> <!></span> <span class="open-icon svelte-1lpfi31">→</span></button></li>'),da=_('<section class="group svelte-1lpfi31"><h3 class="group-title svelte-1lpfi31"><code class="svelte-1lpfi31"> </code> <span class="count svelte-1lpfi31"> </span></h3> <ul class="items svelte-1lpfi31"></ul></section>'),ma=_('<header class="list-head svelte-1lpfi31"><h2>Migrations</h2> <button type="button" class="svelte-1lpfi31"> </button></header> <!>',1),_a=_('<div class="migrations svelte-1lpfi31"><!> <!></div>');function ga(Re,Le){Ke(Le,!0);let M=F(null),u=F(null),Z=F(!1),C=F(null),r=F(Te({})),he=F(Te({})),N=F(!1),W=F(null);g.ensureLoaded();async function Ce(s){v(M,s,!0),v(r,{},!0),v(he,{},!0),v(u,null),v(C,null),v(Z,!0);try{v(u,await ea(s),!0);const f={};for(const l of e(u).orphans){const d=Ee(l.name,e(u).currentTemplateFields);f[l.name]=d?{rename:d}:"keep"}v(r,f,!0)}catch(f){v(C,f instanceof Error?f.message:String(f),!0)}finally{v(Z,!1)}}function ge(){v(M,null),v(u,null),v(C,null)}function Ee(s,f){const l=s.toLowerCase();for(const d of f)if(d.toLowerCase().startsWith(l)||d.toLowerCase().endsWith(l))return d;return null}async function Se(){if(!(e(M)===null||e(u)===null)){v(N,!0),v(W,null);try{const s={drop:Object.entries(e(r)).filter(([,l])=>l==="drop").map(([l])=>l),keep:Object.entries(e(r)).filter(([,l])=>l==="keep").map(([l])=>l),rename:Object.fromEntries(Object.entries(e(r)).filter(([,l])=>typeof l=="object"&&l!==null&&"rename"in l).map(([l,d])=>[l,d.rename])),fill:{...e(he)}},f=await ze(e(M),s);g.refresh().catch(()=>{}),ge()}catch(s){v(W,s instanceof Error?s.message:String(s),!0)}finally{v(N,!1)}}}function Pe(s){return typeof s=="string"?s:JSON.stringify(s)}const qe=Ue(()=>g.list===null?[]:Object.entries(g.list.byTemplate).map(([s,f])=>({template:s,items:[...f].sort((l,d)=>l.path.localeCompare(d.path))})));var be=_a(),xe=a(be);{var Ae=s=>{var f=va(),l=z(f),d=a(l),ee=o(d,2),ae=a(ee),te=o(l,2);{var le=i=>{var m=aa();n(i,m)},se=i=>{var m=ta(),k=a(m);h(()=>c(k,e(C))),n(i,m)},re=i=>{var m=oa(),k=z(m),R=a(k),O=a(R),I=a(O);{var $=p=>{var x=J();h(()=>c(x,`Before — ${e(u).left.template??""}`)),n(p,x)},D=p=>{var x=J("Before — no snapshot available");n(p,x)};w(I,p=>{e(u).left?p($):p(D,-1)})}var ie=o(O,2),ne=a(ie),oe=o(R,2),G=a(oe),E=a(G),b=o(G,2),H=a(b),S=o(k,2);{var K=p=>{var x=ia(),P=o(a(x),4);U(P,21,()=>e(u).orphans,q=>q.name,(q,t)=>{var y=ra(),V=a(y),ye=a(V),We=a(ye),Ie=o(ye,2),$e=a(Ie),we=o(V,2),ke=a(we),fe=a(ke),Fe=o(ke,2),ue=a(Fe),je=o(Fe,2),de=a(je),De=o(je,2);{var Ge=A=>{var T=sa();U(T,20,()=>e(u).currentTemplateFields,B=>B,(B,me)=>{var Y=la(),He=a(Y),Oe={};h(()=>{c(He,me),Oe!==(Oe=me)&&(Y.value=(Y.__value=me)??"")}),n(B,Y)});var Me;Xe(T),h(()=>{Me!==(Me=e(r)[e(t).name].rename)&&(T.value=(T.__value=e(r)[e(t).name].rename)??"",Ze(T,e(r)[e(t).name].rename))}),j("change",T,B=>v(r,{...e(r),[e(t).name]:{rename:B.currentTarget.value}},!0)),n(A,T)};w(De,A=>{typeof e(r)[e(t).name]=="object"&&e(r)[e(t).name]!==null&&"rename"in e(r)[e(t).name]&&A(Ge)})}h(A=>{c(We,e(t).name),c($e,A),X(we,"aria-label",`Resolution for ${e(t).name}`),X(fe,"name",`d-${e(t).name}`),_e(fe,e(r)[e(t).name]==="drop"),X(ue,"name",`d-${e(t).name}`),_e(ue,e(r)[e(t).name]==="keep"),X(de,"name",`d-${e(t).name}`),_e(de,typeof e(r)[e(t).name]=="object"&&e(r)[e(t).name]!==null&&"rename"in e(r)[e(t).name])},[()=>Pe(e(t).value)]),j("change",fe,()=>v(r,{...e(r),[e(t).name]:"drop"},!0)),j("change",ue,()=>v(r,{...e(r),[e(t).name]:"keep"},!0)),j("change",de,()=>v(r,{...e(r),[e(t).name]:{rename:e(u).currentTemplateFields[0]??""}},!0)),n(q,y)}),n(p,x)};w(S,p=>{e(u).orphans.length>0&&p(K)})}var Q=o(S,2);{var ve=p=>{var x=na(),P=a(x);h(()=>c(P,e(W))),n(p,x)};w(Q,p=>{e(W)&&p(ve)})}var pe=o(Q,2),L=a(pe),ce=a(L);h(()=>{var p;c(ne,((p=e(u).left)==null?void 0:p.html)??"(no snapshot covers this item)"),c(E,`After — ${e(u).right.template??""}`),c(H,e(u).right.html),L.disabled=e(N)||e(u).orphans.length===0,c(ce,e(N)?"Migrating…":"Migrate item")}),j("click",L,Se),n(i,m)};w(te,i=>{e(Z)?i(le):e(C)?i(se,1):e(u)&&i(re,2)})}h(()=>c(ae,e(M))),j("click",d,ge),n(s,f)},Be=s=>{var f=ma(),l=z(f),d=o(a(l),2),ee=a(d),ae=o(l,2);{var te=i=>{var m=pa(),k=a(m);h(()=>c(k,g.error)),n(i,m)},le=i=>{var m=ca();n(i,m)},se=i=>{var m=fa();n(i,m)},re=i=>{var m=Ve(),k=z(m);U(k,17,()=>e(qe),R=>R.template,(R,O)=>{var I=da(),$=a(I),D=a($),ie=a(D),ne=o(D,2),oe=a(ne),G=o($,2);U(G,21,()=>e(O).items,E=>E.path,(E,b)=>{var H=ua(),S=a(H),K=a(S),Q=a(K),ve=a(Q),pe=o(K,2),L=a(pe);{var ce=t=>{var y=J();h(V=>c(y,`${e(b).orphanFields.length??""} orphan field${e(b).orphanFields.length===1?"":"s"}:
4
4
  ${V??""}`),[()=>e(b).orphanFields.join(", ")]),n(t,y)};w(L,t=>{e(b).orphanFields.length>0&&t(ce)})}var p=o(L,2);{var x=t=>{var y=J();h(()=>c(y,`· ${e(b).missingRequiredFields.length??""} missing required`)),n(t,y)};w(p,t=>{e(b).missingRequiredFields.length>0&&t(x)})}var P=o(p,2);{var q=t=>{var y=J();h(()=>c(y,`· best-fit: ${e(b).bestFitSnapshot??""}`)),n(t,y)};w(P,t=>{e(b).bestFitSnapshot&&t(q)})}h(()=>c(ve,e(b).path)),j("click",S,()=>Ce(e(b).path)),n(E,H)}),h(()=>{c(ie,e(O).template),c(oe,`${e(O).items.length??""} item${e(O).items.length===1?"":"s"}`)}),n(R,I)}),n(i,m)};w(ae,i=>{g.error?i(te):g.loading&&g.list===null?i(le,1):g.count===0?i(se,2):i(re,-1)})}h(()=>{d.disabled=g.loading,c(ee,g.loading?"Refreshing…":"Refresh")}),j("click",d,()=>g.refresh()),n(s,f)};w(xe,s=>{e(M)!==null?s(Ae):s(Be,-1)})}var Je=o(xe,2);{var Ne=s=>{};w(Je,s=>{!e(M)&&g.list===null&&s(Ne)})}n(Re,be),Qe()}Ye(["click","change"]);export{ga as default};