@aparte/n8n-chat 0.5.0 → 1.0.0

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 (87) hide show
  1. package/README.md +109 -18
  2. package/dist/cdn/chunks/{chunk-27HPUSEO.js → chunk-75MBZEMR.js} +2 -2
  3. package/dist/cdn/chunks/{chunk-27HPUSEO.js.map → chunk-75MBZEMR.js.map} +1 -1
  4. package/dist/cdn/chunks/{chunk-J2RB5NH4.js → chunk-EKOAQWDB.js} +2 -2
  5. package/dist/cdn/chunks/{chunk-J2RB5NH4.js.map → chunk-EKOAQWDB.js.map} +1 -1
  6. package/dist/cdn/chunks/chunk-FPBJCFJN.js +379 -0
  7. package/dist/cdn/chunks/chunk-FPBJCFJN.js.map +7 -0
  8. package/dist/cdn/chunks/chunk-FZXRS5MT.js +208 -0
  9. package/dist/cdn/chunks/chunk-FZXRS5MT.js.map +7 -0
  10. package/dist/cdn/chunks/{chunk-A2H2YABP.js → chunk-UCBMONE6.js} +2 -2
  11. package/dist/cdn/chunks/{chunk-A2H2YABP.js.map → chunk-UCBMONE6.js.map} +1 -1
  12. package/dist/cdn/chunks/{chunk-GJ4YMVTA.js → chunk-WCZRD7U7.js} +1 -1
  13. package/dist/cdn/chunks/{chunk-GJ4YMVTA.js.map → chunk-WCZRD7U7.js.map} +1 -1
  14. package/dist/cdn/chunks/de-7JCOF7FR.js +2 -0
  15. package/dist/cdn/chunks/de-7JCOF7FR.js.map +7 -0
  16. package/dist/cdn/chunks/es-KUX7YCK6.js +2 -0
  17. package/dist/cdn/chunks/es-KUX7YCK6.js.map +7 -0
  18. package/dist/cdn/chunks/fr-VYD7EC55.js +2 -0
  19. package/dist/cdn/chunks/fr-VYD7EC55.js.map +7 -0
  20. package/dist/cdn/chunks/{highlight-SCSTGNZJ.js → highlight-W7QGGHNK.js} +2 -2
  21. package/dist/cdn/chunks/{highlight-SCSTGNZJ.js.map → highlight-W7QGGHNK.js.map} +1 -1
  22. package/dist/cdn/chunks/it-BXNO2THQ.js +2 -0
  23. package/dist/cdn/chunks/it-BXNO2THQ.js.map +7 -0
  24. package/dist/cdn/chunks/{items-TBASSOQ3.js → items-X2D73Z5A.js} +3 -3
  25. package/dist/cdn/chunks/{items-TBASSOQ3.js.map → items-X2D73Z5A.js.map} +4 -4
  26. package/dist/cdn/chunks/ja-6VGJFQ66.js +2 -0
  27. package/dist/cdn/chunks/ja-6VGJFQ66.js.map +7 -0
  28. package/dist/cdn/chunks/ko-HUU4F44X.js +2 -0
  29. package/dist/cdn/chunks/ko-HUU4F44X.js.map +7 -0
  30. package/dist/cdn/chunks/{link-VR62DJAD.js → link-LNDRLLUH.js} +3 -3
  31. package/dist/cdn/chunks/link-LNDRLLUH.js.map +7 -0
  32. package/dist/cdn/chunks/{media-O7WQHRGC.js → media-JDTPNZHJ.js} +4 -4
  33. package/dist/cdn/chunks/{media-O7WQHRGC.js.map → media-JDTPNZHJ.js.map} +4 -4
  34. package/dist/cdn/chunks/{order-H7FHTQ2J.js → order-HS6FXBIB.js} +3 -3
  35. package/dist/cdn/chunks/{order-H7FHTQ2J.js.map → order-HS6FXBIB.js.map} +3 -3
  36. package/dist/cdn/chunks/{place-TGHDGFFI.js → place-N3E7T2EV.js} +3 -3
  37. package/dist/cdn/chunks/{place-TGHDGFFI.js.map → place-N3E7T2EV.js.map} +4 -4
  38. package/dist/cdn/chunks/{plan-JA7466PF.js → plan-TCWRW3OC.js} +3 -3
  39. package/dist/cdn/chunks/{plan-JA7466PF.js.map → plan-TCWRW3OC.js.map} +4 -4
  40. package/dist/cdn/chunks/{product-VEI5FUDZ.js → product-JH7QUP6I.js} +3 -3
  41. package/dist/cdn/chunks/{product-VEI5FUDZ.js.map → product-JH7QUP6I.js.map} +4 -4
  42. package/dist/cdn/chunks/pt-BR-SNSDLB4C.js +2 -0
  43. package/dist/cdn/chunks/pt-BR-SNSDLB4C.js.map +7 -0
  44. package/dist/cdn/chunks/ru-QE2LLTEY.js +2 -0
  45. package/dist/cdn/chunks/ru-QE2LLTEY.js.map +7 -0
  46. package/dist/cdn/chunks/{score-QTZEGTBP.js → score-GUHJWHW3.js} +6 -6
  47. package/dist/cdn/chunks/{score-QTZEGTBP.js.map → score-GUHJWHW3.js.map} +4 -4
  48. package/dist/cdn/chunks/{stats-CNVSRBY6.js → stats-UIVYR2CG.js} +2 -2
  49. package/dist/cdn/chunks/{stats-CNVSRBY6.js.map → stats-UIVYR2CG.js.map} +1 -1
  50. package/dist/cdn/chunks/{stock-2KHFILSB.js → stock-PV4GC573.js} +2 -2
  51. package/dist/cdn/chunks/{stock-2KHFILSB.js.map → stock-PV4GC573.js.map} +1 -1
  52. package/dist/cdn/chunks/{weather-FAK6EHSV.js → weather-7L3Y3DNB.js} +2 -2
  53. package/dist/cdn/chunks/{weather-FAK6EHSV.js.map → weather-7L3Y3DNB.js.map} +1 -1
  54. package/dist/cdn/chunks/zh-CN-WKC5MGZY.js +2 -0
  55. package/dist/cdn/chunks/zh-CN-WKC5MGZY.js.map +7 -0
  56. package/dist/cdn/n8n-chat.js +61 -61
  57. package/dist/cdn/n8n-chat.js.map +4 -4
  58. package/dist/create-chat.d.ts +27 -2
  59. package/dist/index.js +18 -5
  60. package/dist/index.js.map +1 -1
  61. package/dist/strings.d.ts +5 -0
  62. package/dist/style.css +5 -9
  63. package/dist/theme.css +4 -8
  64. package/package.json +7 -7
  65. package/dist/cdn/chunks/chunk-7CJVMXIB.js +0 -356
  66. package/dist/cdn/chunks/chunk-7CJVMXIB.js.map +0 -7
  67. package/dist/cdn/chunks/chunk-N7SVHDCW.js +0 -206
  68. package/dist/cdn/chunks/chunk-N7SVHDCW.js.map +0 -7
  69. package/dist/cdn/chunks/de-NQDMZC5V.js +0 -2
  70. package/dist/cdn/chunks/de-NQDMZC5V.js.map +0 -7
  71. package/dist/cdn/chunks/es-IBJAOBGB.js +0 -2
  72. package/dist/cdn/chunks/es-IBJAOBGB.js.map +0 -7
  73. package/dist/cdn/chunks/fr-32HJELG3.js +0 -2
  74. package/dist/cdn/chunks/fr-32HJELG3.js.map +0 -7
  75. package/dist/cdn/chunks/it-HHSL2KBW.js +0 -2
  76. package/dist/cdn/chunks/it-HHSL2KBW.js.map +0 -7
  77. package/dist/cdn/chunks/ja-2EHR4WNO.js +0 -2
  78. package/dist/cdn/chunks/ja-2EHR4WNO.js.map +0 -7
  79. package/dist/cdn/chunks/ko-XONDEFR4.js +0 -2
  80. package/dist/cdn/chunks/ko-XONDEFR4.js.map +0 -7
  81. package/dist/cdn/chunks/link-VR62DJAD.js.map +0 -7
  82. package/dist/cdn/chunks/pt-BR-367NLYVE.js +0 -2
  83. package/dist/cdn/chunks/pt-BR-367NLYVE.js.map +0 -7
  84. package/dist/cdn/chunks/ru-ETHLBBSY.js +0 -2
  85. package/dist/cdn/chunks/ru-ETHLBBSY.js.map +0 -7
  86. package/dist/cdn/chunks/zh-CN-OGEW5BS2.js +0 -2
  87. package/dist/cdn/chunks/zh-CN-OGEW5BS2.js.map +0 -7
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../node_modules/.pnpm/@aparte+plugin-cards@0.31.0_@aparte+core@0.31.0/node_modules/@aparte/plugin-cards/src/product/icons.ts", "../../../node_modules/.pnpm/@aparte+plugin-cards@0.31.0_@aparte+core@0.31.0/node_modules/@aparte/plugin-cards/src/product/product.css", "../../../node_modules/.pnpm/@aparte+plugin-cards@0.31.0_@aparte+core@0.31.0/node_modules/@aparte/plugin-cards/src/product/index.ts"],
4
- "sourcesContent": ["/**\n * The product card's glyphs: the bag a tile shows when it has no photo, the van beside a\n * delivery line, the loupe before a search that is still running.\n *\n * Drawn on a 24 × 24 grid in `currentColor` strokes, so the sheet colours them through\n * `color` and a theme follows. Constants of this package — the only markup the card parses.\n */\n\nconst svg = (body: string) =>\n `<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\" xmlns=\"http://www.w3.org/2000/svg\">${body}</svg>`; // safe-text: this package's own SVG, built from its glyph constants\n\n/** A shopping bag: the placeholder where a photo is missing or failed to load. */\nexport const BAG = svg('<path d=\"M5.5 8h13l-1 11.2a1.8 1.8 0 0 1-1.8 1.6H8.3a1.8 1.8 0 0 1-1.8-1.6z\"/><path d=\"M9 10.5V6.8a3 3 0 0 1 6 0v3.7\"/>');\n\n/** A delivery van, before the shipping line. */\nexport const TRUCK = svg('<path d=\"M2.8 6.5h10.4v9.3H2.8z\"/><path d=\"M13.2 9.5h4.1l3 3.2v3.1h-7.1\"/><circle cx=\"7\" cy=\"17.3\" r=\"1.7\"/><circle cx=\"17\" cy=\"17.3\" r=\"1.7\"/>');\n\n/** A loupe, before the query a running search was given. */\nexport const SEARCH = svg('<circle cx=\"10.8\" cy=\"10.8\" r=\"6.3\"/><path d=\"M15.5 15.5l4.7 4.7\"/>');\n\n/** The card's own glyph, for its one-line states (waiting, refused, failed). */\nexport const TAG = svg('<path d=\"M3.5 12.6V4.8a1.3 1.3 0 0 1 1.3-1.3h7.8l8 8a1.3 1.3 0 0 1 0 1.8l-7 7a1.3 1.3 0 0 1-1.8 0z\"/><circle cx=\"8.3\" cy=\"8.3\" r=\"1.5\"/>');\n", "export default \"/* =========================================\\n The product card — @aparte/plugin-cards/product\\n =========================================\\n Three variants of one card, chosen by `data-variant` on its root:\\n card a tile: the photo, the shop, the name, the stars, the price. Several\\n products are a row of tiles that scrolls, and the card drops its own\\n frame so the tiles are not boxes inside a box.\\n compact a row per product — thumbnail, name, stars, price — a list to scan.\\n detail one product at length: the photo beside the facts on a wide card, above\\n them on a narrow one; the others in a small row under it.\\n Every colour is a theme token or derived from one, so light and dark follow the chat.\\n */\\n\\n.aparte-product-card {\\n --aparte-product-tile-size: 12.5rem;\\n --aparte-product-thumb-size: 3.5rem;\\n --aparte-product-media-radius: var(--aparte-radius-lg);\\n /* A product photo is shot on white. The plate it sits on is near-white in BOTH schemes\\n (derived from the ink, so it is a hair off white in light and a hair off cream in\\n dark) and the photo is multiplied into it: its white background melts into the plate\\n instead of sitting as a white square on a grey one. A photo on a dark plate in dark\\n mode keeps its white box whatever we do — the shops' own apps show it light too. */\\n --aparte-product-media-bg: color-mix(in oklab, var(--aparte-text) 5%, #fff);\\n --aparte-product-image-fit: contain;\\n --aparte-product-image-inset: 7%;\\n /* Where there is no photo: the theme's own surfaces, warmed by its accent. */\\n --aparte-product-placeholder: linear-gradient(\\n 145deg,\\n color-mix(in oklab, var(--aparte-primary) 16%, var(--aparte-surface-2)) 0%,\\n var(--aparte-surface-2) 55%,\\n color-mix(in oklab, var(--aparte-text) 5%, var(--aparte-surface-2)) 100%\\n );\\n --aparte-product-placeholder-ink: color-mix(in oklab, var(--aparte-text) 30%, transparent);\\n --aparte-product-price-color: var(--aparte-text);\\n --aparte-product-hover-border: color-mix(in oklab, var(--aparte-text) 22%, var(--aparte-border));\\n --aparte-product-hover-shadow: 0 8px 18px -12px rgb(0 0 0 / 0.38);\\n}\\n\\n/* ── Widths: each variant asks for its own; the bubble's limit caps them all ── */\\n\\n.aparte-product-card[data-variant=\\\"card\\\"] { --aparte-rich-card-max-inline-size: 16.5rem; }\\n.aparte-product-card[data-variant=\\\"compact\\\"] { --aparte-rich-card-max-inline-size: 28rem; }\\n.aparte-product-card[data-variant=\\\"detail\\\"] { --aparte-rich-card-max-inline-size: 36rem; }\\n.aparte-product-card:has(> .aparte-product__collection) { --aparte-rich-card-max-inline-size: 42rem; }\\n\\n/* Several tiles: each is framed, so the card is not. The kit's buttons under it lose\\n their band, which would otherwise float as a strip under nothing. */\\n.aparte-product-card:has(> .aparte-product__collection) {\\n overflow: visible;\\n border-color: transparent;\\n border-radius: 0;\\n background: transparent;\\n}\\n\\n.aparte-product-card:has(> .aparte-product__collection) > .aparte-rich-card__actions {\\n padding-inline: 0;\\n border-block-start: 0;\\n background: none;\\n}\\n\\n/* ── Headings: the collection's title, the query of a running search ─── */\\n\\n.aparte-product__heading {\\n margin-block-end: var(--aparte-space-4);\\n font-size: var(--aparte-font-size-md);\\n font-weight: var(--aparte-font-weight-semibold);\\n overflow-wrap: anywhere;\\n}\\n\\n.aparte-product-card[data-variant=\\\"compact\\\"] > .aparte-product__heading {\\n margin: 0;\\n padding: var(--aparte-space-5) var(--aparte-space-6) var(--aparte-space-2);\\n}\\n\\n.aparte-product__query {\\n display: flex;\\n align-items: center;\\n gap: var(--aparte-space-3);\\n min-inline-size: 0;\\n margin-block-end: var(--aparte-space-4);\\n color: var(--aparte-text-muted);\\n font-size: var(--aparte-font-size-md);\\n --aparte-rich-card-glyph-size: 1rem;\\n}\\n\\n.aparte-product__query-text {\\n overflow: hidden;\\n text-overflow: ellipsis;\\n white-space: nowrap;\\n}\\n\\n.aparte-product-card[data-variant=\\\"compact\\\"] > .aparte-product__query,\\n.aparte-product-card[data-variant=\\\"detail\\\"] > .aparte-product__query {\\n margin: 0;\\n padding: var(--aparte-space-5) var(--aparte-space-6) 0;\\n}\\n\\n/* ── The carousel, in product sizes ──────────────────────────────────── */\\n\\n.aparte-product-card .aparte-rich-card__carousel {\\n --aparte-rich-card-slide-size: var(--aparte-product-tile-size);\\n}\\n\\n/* ── A product, whatever its shape ───────────────────────────────────── */\\n\\n.aparte-product {\\n position: relative;\\n min-inline-size: 0;\\n color: var(--aparte-text);\\n}\\n\\n/* The title's link covers the tile or the row: one link per product, read once. */\\n.aparte-product__link {\\n color: inherit;\\n text-decoration: none;\\n}\\n\\n.aparte-product--tile .aparte-product__link,\\n.aparte-product--row .aparte-product__link {\\n outline: none;\\n}\\n\\n.aparte-product--tile .aparte-product__link::after,\\n.aparte-product--row .aparte-product__link::after {\\n content: \\\"\\\";\\n position: absolute;\\n inset: 0;\\n border-radius: inherit;\\n}\\n\\n.aparte-product[data-linked]:hover .aparte-product__title {\\n text-decoration: underline;\\n text-decoration-thickness: 1px;\\n text-underline-offset: 0.18em;\\n}\\n\\n/* The ring is the product's, since the link is all of it. */\\n.aparte-product--tile:has(.aparte-product__link:focus-visible) {\\n outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);\\n outline-offset: var(--aparte-focus-outline-offset);\\n}\\n\\n.aparte-product--row:has(.aparte-product__link:focus-visible) {\\n /* A row reaches the card's clipped edges: its ring is drawn inside. */\\n outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);\\n outline-offset: calc(var(--aparte-focus-outline-width) * -1);\\n}\\n\\n/* ── The photo ───────────────────────────────────────────────────────── */\\n\\n.aparte-product__media {\\n position: relative;\\n display: grid;\\n place-items: center;\\n aspect-ratio: 1;\\n overflow: hidden;\\n border-radius: var(--aparte-product-media-radius);\\n background: var(--aparte-product-media-bg);\\n isolation: isolate;\\n}\\n\\n.aparte-product__media[data-empty] {\\n background: var(--aparte-product-placeholder);\\n}\\n\\n.aparte-product__placeholder {\\n grid-area: 1 / 1;\\n color: var(--aparte-product-placeholder-ink);\\n --aparte-rich-card-glyph-size: clamp(1.25rem, 30%, 3.5rem);\\n}\\n\\n.aparte-product__media:not([data-empty]) .aparte-product__placeholder { visibility: hidden; }\\n\\n.aparte-product__image {\\n grid-area: 1 / 1;\\n /* The frame centres its children (for the placeholder's glyph): without this the photo's\\n 100% height never resolves and `--aparte-product-image-fit: cover` left bands above and\\n below a photo that is not square. */\\n place-self: stretch;\\n box-sizing: border-box;\\n inline-size: 100%;\\n block-size: 100%;\\n padding: var(--aparte-product-image-inset);\\n object-fit: var(--aparte-product-image-fit);\\n mix-blend-mode: multiply;\\n transition: scale var(--aparte-duration-slower) ease, opacity var(--aparte-duration-base) ease;\\n}\\n\\n.aparte-product__image[hidden] { display: none; }\\n\\n.aparte-product[data-linked]:hover .aparte-product__image,\\n.aparte-product__media-link:hover .aparte-product__image {\\n scale: 1.04;\\n}\\n\\n/* Out of stock: the photo steps back, the line under it says why. */\\n.aparte-product[data-availability=\\\"out-of-stock\\\"] .aparte-product__image {\\n opacity: 0.55;\\n filter: grayscale(0.5);\\n}\\n\\n.aparte-product__flags {\\n position: absolute;\\n z-index: 1;\\n inset-block-start: var(--aparte-space-3);\\n inset-inline-start: var(--aparte-space-3);\\n display: flex;\\n flex-wrap: wrap;\\n gap: var(--aparte-space-2);\\n max-inline-size: calc(100% - var(--aparte-space-3) * 2);\\n}\\n\\n/* The shop's word: a pill of the card's own surface over the plate, in either scheme. */\\n.aparte-product__flags .aparte-product__badge {\\n max-inline-size: 100%;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n background: color-mix(in oklab, var(--aparte-surface-1) 90%, transparent);\\n color: var(--aparte-text);\\n box-shadow: 0 1px 3px rgb(0 0 0 / 0.14);\\n backdrop-filter: blur(6px);\\n}\\n\\n.aparte-product__discount {\\n font-variant-numeric: tabular-nums;\\n}\\n\\n/* ── The words beside the photo ──────────────────────────────────────── */\\n\\n.aparte-product__body {\\n display: flex;\\n flex: 1;\\n flex-direction: column;\\n gap: var(--aparte-space-2);\\n min-inline-size: 0;\\n}\\n\\n.aparte-product__merchant {\\n display: flex;\\n align-items: center;\\n gap: var(--aparte-space-2);\\n min-inline-size: 0;\\n color: var(--aparte-text-muted);\\n font-size: var(--aparte-font-size-xs);\\n}\\n\\n.aparte-product__merchant-name {\\n overflow: hidden;\\n text-overflow: ellipsis;\\n white-space: nowrap;\\n}\\n\\n.aparte-product__logo {\\n flex: none;\\n inline-size: 1rem;\\n block-size: 1rem;\\n border-radius: var(--aparte-radius-xs);\\n object-fit: cover;\\n}\\n\\n.aparte-product__logo[hidden] { display: none; }\\n\\n.aparte-product__title {\\n display: -webkit-box;\\n overflow: hidden;\\n -webkit-box-orient: vertical;\\n -webkit-line-clamp: 2;\\n line-clamp: 2;\\n font-size: var(--aparte-font-size-md);\\n font-weight: var(--aparte-font-weight-medium);\\n line-height: 1.3;\\n overflow-wrap: anywhere;\\n}\\n\\n.aparte-product__price {\\n display: flex;\\n flex-wrap: wrap;\\n align-items: baseline;\\n gap: var(--aparte-space-1) var(--aparte-space-3);\\n font-variant-numeric: tabular-nums;\\n}\\n\\n.aparte-product__now {\\n color: var(--aparte-product-price-color);\\n font-size: var(--aparte-font-size-lg);\\n font-weight: var(--aparte-font-weight-bold);\\n letter-spacing: -0.01em;\\n white-space: nowrap;\\n}\\n\\n.aparte-product__was {\\n color: var(--aparte-text-muted);\\n font-size: var(--aparte-font-size-sm);\\n text-decoration-thickness: 1px;\\n white-space: nowrap;\\n}\\n\\n.aparte-product__price .aparte-product__discount { align-self: center; }\\n\\n/* Stock: a dot in the state's colour, the word in its readable ink. */\\n.aparte-product__stock {\\n --aparte-product-stock-tone: var(--aparte-neutral);\\n --aparte-product-stock-ink: var(--aparte-text-muted);\\n display: inline-flex;\\n align-items: center;\\n gap: var(--aparte-space-2);\\n min-inline-size: 0;\\n color: var(--aparte-product-stock-ink);\\n font-size: var(--aparte-font-size-xs);\\n font-weight: var(--aparte-font-weight-medium);\\n}\\n\\n.aparte-product__stock[data-availability=\\\"in-stock\\\"] { --aparte-product-stock-tone: var(--aparte-success); --aparte-product-stock-ink: var(--aparte-success-ink); }\\n.aparte-product__stock[data-availability=\\\"low-stock\\\"] { --aparte-product-stock-tone: var(--aparte-warning); --aparte-product-stock-ink: var(--aparte-warning-ink); }\\n.aparte-product__stock[data-availability=\\\"out-of-stock\\\"] { --aparte-product-stock-tone: var(--aparte-error); --aparte-product-stock-ink: var(--aparte-error-ink); }\\n.aparte-product__stock[data-availability=\\\"preorder\\\"] { --aparte-product-stock-tone: var(--aparte-info); --aparte-product-stock-ink: var(--aparte-info-ink); }\\n\\n.aparte-product__dot {\\n flex: none;\\n inline-size: 0.4375rem;\\n block-size: 0.4375rem;\\n border-radius: var(--aparte-radius-full);\\n background: var(--aparte-product-stock-tone);\\n box-shadow: 0 0 0 3px color-mix(in oklab, var(--aparte-product-stock-tone) 20%, transparent);\\n}\\n\\n.aparte-product__stock-text {\\n overflow: hidden;\\n text-overflow: ellipsis;\\n white-space: nowrap;\\n}\\n\\n.aparte-product__shipping {\\n display: inline-flex;\\n align-items: center;\\n gap: var(--aparte-space-2);\\n min-inline-size: 0;\\n color: var(--aparte-text-muted);\\n font-size: var(--aparte-font-size-xs);\\n --aparte-rich-card-glyph-size: 1rem;\\n}\\n\\n.aparte-product__shipping[data-free] {\\n color: var(--aparte-success-ink);\\n font-weight: var(--aparte-font-weight-medium);\\n}\\n\\n.aparte-product__shipping-icon:dir(rtl) { transform: scaleX(-1); }\\n\\n/* Buttons sit above the link that covers the product. */\\n.aparte-product__actions {\\n position: relative;\\n z-index: 1;\\n display: flex;\\n flex-wrap: wrap;\\n gap: var(--aparte-space-2);\\n}\\n\\n/* ── card: the tile ──────────────────────────────────────────────────── */\\n\\n.aparte-product--tile {\\n display: flex;\\n flex-direction: column;\\n gap: var(--aparte-space-4);\\n padding: var(--aparte-space-3) var(--aparte-space-3) var(--aparte-space-4);\\n border-radius: var(--aparte-card-radius);\\n}\\n\\n.aparte-product--tile .aparte-product__body { padding-inline: var(--aparte-space-2); }\\n\\n/* Two lines held even when the name takes one, so the prices in a row line up. */\\n.aparte-product--tile .aparte-product__title { min-block-size: 2lh; }\\n\\n/* The price sits at the foot of the tile, level with its neighbours'. */\\n.aparte-product--tile .aparte-product__price {\\n margin-block-start: auto;\\n padding-block-start: var(--aparte-space-1);\\n}\\n\\n.aparte-product--tile .aparte-product__actions { padding-inline: var(--aparte-space-2); }\\n.aparte-product--tile .aparte-product__action { flex: 1 1 auto; justify-content: center; }\\n\\n/* A tile alone, the one product of an answer: a square photo the width of a chat column is\\n taller than the chat's view, and without a photo the square held nothing. A landscape frame,\\n and a low band when there is no picture; in a row of tiles they stay square and level. */\\n.aparte-product--tile:not(:is(.aparte-product__collection, .aparte-product__more) .aparte-product--tile) .aparte-product__media {\\n aspect-ratio: 4 / 3;\\n}\\n\\n.aparte-product--tile:not(:is(.aparte-product__collection, .aparte-product__more) .aparte-product--tile) .aparte-product__media[data-empty] {\\n aspect-ratio: 3 / 1;\\n}\\n\\n.aparte-product__collection .aparte-product--tile,\\n.aparte-product__more .aparte-product--tile {\\n border: var(--aparte-border-width) solid var(--aparte-border);\\n background: var(--aparte-surface-1);\\n transition:\\n border-color var(--aparte-duration-base) ease,\\n box-shadow var(--aparte-duration-base) ease,\\n translate var(--aparte-duration-base) ease;\\n}\\n\\n.aparte-product__collection .aparte-product--tile[data-linked]:hover,\\n.aparte-product__more .aparte-product--tile[data-linked]:hover {\\n border-color: var(--aparte-product-hover-border);\\n box-shadow: var(--aparte-product-hover-shadow);\\n translate: 0 -2px;\\n}\\n\\n/* A mini tile: the others under a detail. */\\n.aparte-product--mini {\\n gap: var(--aparte-space-3);\\n padding: var(--aparte-space-2) var(--aparte-space-2) var(--aparte-space-3);\\n}\\n\\n.aparte-product--mini .aparte-product__body { gap: var(--aparte-space-1); }\\n.aparte-product--mini .aparte-product__title { font-size: var(--aparte-font-size-sm); }\\n.aparte-product--mini .aparte-product__now { font-size: var(--aparte-font-size-md); }\\n.aparte-product--mini .aparte-product__was { font-size: var(--aparte-font-size-xs); }\\n\\n/* ── compact: the rows ───────────────────────────────────────────────── */\\n\\n/* On the drawn card only: a one-line state shrinks to its words, and a size container\\n cannot. */\\n.aparte-product-card[data-variant=\\\"compact\\\"][data-state=\\\"ready\\\"] {\\n container: aparte-product-rows / inline-size;\\n}\\n\\n.aparte-product__rows {\\n margin: 0;\\n padding: var(--aparte-space-2) 0;\\n list-style: none;\\n}\\n\\n/* A divider starting after the thumbnail, the way a settings list draws it. */\\n.aparte-product__item { position: relative; }\\n\\n.aparte-product__item + .aparte-product__item::before {\\n content: \\\"\\\";\\n position: absolute;\\n inset-block-start: 0;\\n inset-inline: calc(var(--aparte-space-6) + var(--aparte-product-thumb-size) + var(--aparte-space-5)) var(--aparte-space-6);\\n border-block-start: var(--aparte-border-width) solid var(--aparte-border);\\n}\\n\\n.aparte-product--row {\\n display: grid;\\n grid-template-columns: var(--aparte-product-thumb-size) minmax(0, 1fr) auto;\\n align-items: center;\\n column-gap: var(--aparte-space-5);\\n padding: var(--aparte-space-4) var(--aparte-space-6);\\n transition: background-color var(--aparte-duration-fast) ease;\\n}\\n\\n.aparte-product--row:has(> .aparte-product__actions) {\\n grid-template-columns: var(--aparte-product-thumb-size) minmax(0, 1fr) auto auto;\\n}\\n\\n.aparte-product--row[data-linked]:hover { background: var(--aparte-surface-2); }\\n\\n.aparte-product__thumb {\\n inline-size: var(--aparte-product-thumb-size);\\n --aparte-product-media-radius: var(--aparte-radius-md);\\n --aparte-product-image-inset: 4%;\\n}\\n\\n.aparte-product__thumb .aparte-product__placeholder { --aparte-rich-card-glyph-size: 45%; }\\n\\n.aparte-product__main {\\n display: flex;\\n flex-direction: column;\\n gap: var(--aparte-space-1);\\n min-inline-size: 0;\\n}\\n\\n.aparte-product__meta {\\n display: flex;\\n flex-wrap: wrap;\\n align-items: center;\\n gap: var(--aparte-space-1) var(--aparte-space-3);\\n min-inline-size: 0;\\n color: var(--aparte-text-muted);\\n font-size: var(--aparte-font-size-xs);\\n}\\n\\n.aparte-product__meta .aparte-rich-card__rating { font-size: var(--aparte-font-size-xs); }\\n\\n.aparte-product--row .aparte-product__price {\\n flex-direction: column;\\n align-items: flex-end;\\n gap: 0;\\n text-align: end;\\n}\\n\\n.aparte-product--row .aparte-product__now { font-size: var(--aparte-font-size-base); }\\n.aparte-product--row .aparte-product__was { font-size: var(--aparte-font-size-xs); }\\n\\n/* On a narrow card a row's button goes under its name rather than squeeze it. */\\n@container aparte-product-rows (max-width: 24rem) {\\n .aparte-product--row:has(> .aparte-product__actions) {\\n grid-template-columns: var(--aparte-product-thumb-size) minmax(0, 1fr) auto;\\n }\\n\\n .aparte-product--row > .aparte-product__actions {\\n grid-column: 2 / -1;\\n margin-block-start: var(--aparte-space-3);\\n }\\n}\\n\\n/* ── detail: one product at length ───────────────────────────────────── */\\n\\n.aparte-product__detail {\\n container: aparte-product-detail / inline-size;\\n}\\n\\n.aparte-product--detail {\\n display: grid;\\n gap: var(--aparte-space-6);\\n padding: var(--aparte-space-6);\\n}\\n\\n.aparte-product--detail .aparte-product__media,\\n.aparte-product--detail .aparte-product__sk-media {\\n aspect-ratio: 4 / 3;\\n}\\n\\n/* No picture: a low band for the glyph, not a frame the size of a photo that is not there. */\\n.aparte-product--detail .aparte-product__media[data-empty] {\\n aspect-ratio: 3 / 1;\\n}\\n\\n.aparte-product__media-link {\\n display: block;\\n border-radius: var(--aparte-product-media-radius);\\n}\\n\\n.aparte-product--detail .aparte-product__body { gap: var(--aparte-space-3); }\\n\\n/* The clamp clips what overflows it, the focus ring included: the padding gives the ring\\n room inside, and the margin takes that room back from the layout. */\\n.aparte-product--detail .aparte-product__title {\\n -webkit-line-clamp: 4;\\n line-clamp: 4;\\n margin: calc(var(--aparte-space-2) * -1);\\n padding: var(--aparte-space-2);\\n font-size: var(--aparte-font-size-lg);\\n font-weight: var(--aparte-font-weight-semibold);\\n}\\n\\n.aparte-product--detail .aparte-product__link:hover { text-decoration: underline; text-underline-offset: 0.18em; }\\n\\n.aparte-product--detail .aparte-product__link:focus-visible {\\n border-radius: var(--aparte-radius-xs);\\n outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);\\n outline-offset: var(--aparte-focus-outline-offset);\\n}\\n\\n.aparte-product--detail .aparte-product__now { font-size: var(--aparte-font-size-2xl); }\\n.aparte-product--detail .aparte-product__was { font-size: var(--aparte-font-size-md); }\\n\\n.aparte-product__facts {\\n display: flex;\\n flex-wrap: wrap;\\n align-items: center;\\n gap: var(--aparte-space-2) var(--aparte-space-6);\\n}\\n\\n.aparte-product__description {\\n display: -webkit-box;\\n margin: 0;\\n overflow: hidden;\\n -webkit-box-orient: vertical;\\n -webkit-line-clamp: 3;\\n line-clamp: 3;\\n color: var(--aparte-text-muted);\\n font-size: var(--aparte-font-size-sm);\\n line-height: 1.5;\\n overflow-wrap: anywhere;\\n}\\n\\n.aparte-product__options {\\n display: flex;\\n flex-wrap: wrap;\\n gap: var(--aparte-space-2);\\n margin: 0;\\n padding: 0;\\n list-style: none;\\n}\\n\\n.aparte-product__option--more { color: var(--aparte-text-muted); }\\n\\n.aparte-product--detail .aparte-product__actions { margin-block-start: var(--aparte-space-2); }\\n.aparte-product--detail .aparte-product__action { flex: 1 1 8rem; justify-content: center; }\\n\\n@container aparte-product-detail (min-width: 30rem) {\\n .aparte-product--detail {\\n grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);\\n align-items: start;\\n gap: var(--aparte-space-7);\\n }\\n\\n .aparte-product--detail .aparte-product__media,\\n .aparte-product--detail .aparte-product__sk-media {\\n aspect-ratio: 1;\\n }\\n}\\n\\n/* The others, under the detail. */\\n.aparte-product__more {\\n --aparte-product-tile-size: 9.5rem;\\n padding: var(--aparte-space-5) var(--aparte-space-6) var(--aparte-space-6);\\n border-block-start: var(--aparte-border-width) solid var(--aparte-border);\\n background: color-mix(in oklab, var(--aparte-surface-2) 45%, var(--aparte-surface-1));\\n}\\n\\n.aparte-product__more-title {\\n margin-block-end: var(--aparte-space-4);\\n color: var(--aparte-text-muted);\\n font-size: var(--aparte-font-size-sm);\\n font-weight: var(--aparte-font-weight-semibold);\\n}\\n\\n/* ── Loading ─────────────────────────────────────────────────────────── */\\n\\n.aparte-product__sk-track {\\n display: grid;\\n grid-auto-flow: column;\\n grid-auto-columns: var(--aparte-product-tile-size);\\n column-gap: var(--aparte-space-4);\\n overflow: hidden;\\n}\\n\\n.aparte-product-card .aparte-product__sk-media {\\n block-size: auto;\\n aspect-ratio: 1;\\n border-radius: var(--aparte-product-media-radius);\\n}\\n\\n.aparte-product-card .aparte-product__sk-thumb {\\n inline-size: var(--aparte-product-thumb-size);\\n block-size: auto;\\n aspect-ratio: 1;\\n border-radius: var(--aparte-radius-md);\\n}\\n\\n.aparte-product-card .aparte-product__sk-line--short { inline-size: 60%; }\\n\\n.aparte-product-card .aparte-product__sk-price {\\n inline-size: 4.5rem;\\n block-size: 1.125rem;\\n margin-block-start: auto;\\n}\\n\\n.aparte-product--row .aparte-product__sk-price { margin-block-start: 0; }\\n\\n/* ── Small screens, motion ───────────────────────────────────────────── */\\n\\n@media (max-width: 380px) {\\n .aparte-product-card { --aparte-product-tile-size: 10.75rem; --aparte-product-thumb-size: 3rem; }\\n .aparte-product--row { column-gap: var(--aparte-space-4); padding-inline: var(--aparte-space-5); }\\n .aparte-product__item + .aparte-product__item::before {\\n inset-inline: calc(var(--aparte-space-5) + var(--aparte-product-thumb-size) + var(--aparte-space-4)) var(--aparte-space-5);\\n }\\n .aparte-product--detail { padding: var(--aparte-space-5); }\\n .aparte-product__more { padding-inline: var(--aparte-space-5); }\\n}\\n\\n/* The kit stops every transition under reduced motion; the hover's lift and zoom are\\n end states, not transitions, so they are taken out here. */\\n@media (prefers-reduced-motion: reduce) {\\n .aparte-product__collection .aparte-product--tile[data-linked]:hover,\\n .aparte-product__more .aparte-product--tile[data-linked]:hover { translate: none; }\\n\\n .aparte-product[data-linked]:hover .aparte-product__image,\\n .aparte-product__media-link:hover .aparte-product__image { scale: none; }\\n}\\n\"", "/**\n * @aparte/plugin-cards/product — a tool's products, drawn as cards.\n *\n * import { setupProductCard } from '@aparte/plugin-cards/product';\n *\n * setupProductCard({\n * tool: 'search_products',\n * map: (result) => ({ title: result.query, products: result.items }),\n * });\n *\n * Three variants of one card: `card` (a tile — the photo, the shop, the name, the stars,\n * the price; several products are a row of tiles that scrolls), `compact` (a row per\n * product, to scan) and `detail` (one product at length, the others in a small row under\n * it). Your tool keeps its own fields: `readProducts` already reads the usual spellings —\n * `name` or `title`, a price as `49.9`, `\"49.90\"` or `\"49,90 € TTC\"`, schema.org's `offers`\n * and `aggregateRating`, a Google Shopping result's `extracted_price` and `source`, a Shopify\n * product from the Admin API (`variants`, `body_html`) or the Storefront API (`priceRange`,\n * `onlineStoreUrl`) — and `map` covers the rest.\n */\nimport type { AparteConfig } from '@aparte/core';\nimport { defineCard, type CardAction, type CardContext, type CardSetupOptions } from '../kit/define.js';\nimport { el, glyph, num, str, webUrl } from '../kit/dom.js';\nimport { carousel } from '../kit/carousel.js';\nimport { currencyCode, formatNumber, formatPercent, formatPrice, readPriceText } from '../kit/format.js';\nimport { rating } from '../kit/rating.js';\nimport { word, type CardWord } from '../kit/strings.js';\nimport { BAG, SEARCH, TAG, TRUCK } from './icons.js';\nimport productStyles from './product.css?raw';\n\nexport type ProductVariant = 'card' | 'compact' | 'detail';\n\n/** Where a product stands; anything else a tool writes is shown as it wrote it. */\nexport type ProductAvailability = 'in-stock' | 'low-stock' | 'out-of-stock' | 'preorder';\n\n/**\n * One product as `map` returns it. Only `title` is needed; every other field adds a line\n * when it is there and nothing when it is not.\n */\nexport interface ProductInput {\n title: string;\n /** An `http(s)` URL, or `{ src, alt }`. Anything else is no photo. */\n image?: string | { src: string; alt?: string };\n /** `49.9`, or a string a shop writes: `\"49.90\"`, `\"$49.90\"`, `\"49,90 €\"`. */\n price?: number | string;\n /** An ISO 4217 code (`EUR`) or a usual symbol (`€`). */\n currency?: string;\n /** The price before the sale: struck through, and the discount computed from it. */\n compareAtPrice?: number | string;\n /** 0–5. */\n rating?: number;\n reviewCount?: number;\n availability?: ProductAvailability | string;\n merchant?: string;\n /** The shop's logo, small, before its name. */\n merchantLogo?: string;\n /** A word over the photo: \"Bestseller\", \"New\". */\n badge?: string;\n /** Sizes, colours: drawn as chips in `detail`. */\n options?: string[];\n /** A line of your own (\"Delivered tomorrow\"), or a cost — `0` reads \"Free delivery\". */\n shipping?: string | number;\n /** A few lines, in `detail`. Tags are stripped: it is shown as text. */\n description?: string;\n /** Where the product's name and photo link to; `http(s)` only. */\n url?: string;\n /** Your own id, handed back with the product in `aparte-card-action`. */\n id?: string;\n /**\n * At most two buttons per product, each a link (`http(s)`) or an `id`, reporting the\n * product as its `data`. A `send` is dropped: a result never writes the person's next\n * message — send one from your `aparte-card-action` listener, or the card's `actions`.\n */\n actions?: CardAction[];\n}\n\n/** What `map` returns: one product, a list, or a list with a heading. */\nexport type ProductsInput = ProductInput | ProductInput[] | { title?: string; products: ProductInput[] };\n\n/** One product as the card draws it, once read. */\nexport interface Product {\n id?: string;\n title: string;\n image?: { src: string; alt?: string };\n price?: number;\n /** An ISO 4217 code. */\n currency?: string;\n /** Kept only when it is above `price`: a \"was\" price lower than the price is no sale. */\n compareAtPrice?: number;\n rating?: number;\n reviewCount?: number;\n /** One of the four, or the tool's own words. */\n availability?: { status: ProductAvailability } | { text: string };\n merchant?: string;\n merchantLogo?: string;\n badge?: string;\n options: string[];\n shipping?: { text: string } | { cost: number };\n description?: string;\n url?: string;\n actions: CardAction[];\n}\n\n/** The data as the card draws it. */\nexport interface ProductData {\n /** The heading over several products (\"Trail shoes under €100\"). */\n title?: string;\n products: Product[];\n}\n\nconst P = {\n cardsProductTitle: { en: 'Products', fr: 'Produits', de: 'Produkte', es: 'Productos', it: 'Prodotti', ja: '商品', ko: '상품', pt: 'Produtos', ru: 'Товары', zh: '商品' },\n cardsProductCount: { en: '{n} products', fr: '{n} produits', de: '{n} Produkte', es: '{n} productos', it: '{n} prodotti', ja: '{n}件の商品', ko: '상품 {n}개', pt: '{n} produtos', ru: 'Товаров: {n}', zh: '{n} 件商品' },\n cardsProductInStock: { en: 'In stock', fr: 'En stock', de: 'Auf Lager', es: 'En stock', it: 'Disponibile', ja: '在庫あり', ko: '재고 있음', pt: 'Em estoque', ru: 'В наличии', zh: '有货' },\n cardsProductLowStock: { en: 'Only a few left', fr: 'Plus que quelques-uns', de: 'Nur noch wenige', es: 'Quedan pocas unidades', it: 'Ultimi pezzi', ja: '残りわずか', ko: '품절 임박', pt: 'Últimas unidades', ru: 'Осталось мало', zh: '仅剩少量' },\n cardsProductOutOfStock: { en: 'Out of stock', fr: 'Rupture de stock', de: 'Ausverkauft', es: 'Agotado', it: 'Esaurito', ja: '在庫切れ', ko: '품절', pt: 'Esgotado', ru: 'Нет в наличии', zh: '缺货' },\n cardsProductPreorder: { en: 'Pre-order', fr: 'Précommande', de: 'Vorbestellbar', es: 'Preventa', it: 'Preordine', ja: '予約受付中', ko: '예약 판매', pt: 'Pré-venda', ru: 'Предзаказ', zh: '预售' },\n cardsProductWas: { en: 'Was', fr: 'Au lieu de', de: 'Statt', es: 'Antes', it: 'Prima', ja: '通常価格', ko: '정가', pt: 'De', ru: 'Было', zh: '原价' },\n cardsProductFreeShipping: { en: 'Free delivery', fr: 'Livraison gratuite', de: 'Kostenloser Versand', es: 'Envío gratis', it: 'Spedizione gratuita', ja: '送料無料', ko: '무료 배송', pt: 'Frete grátis', ru: 'Бесплатная доставка', zh: '免运费' },\n cardsProductShippingCost: { en: '{price} delivery', fr: 'Livraison {price}', de: 'Versand {price}', es: 'Envío {price}', it: 'Spedizione {price}', ja: '送料 {price}', ko: '배송비 {price}', pt: 'Frete {price}', ru: 'Доставка {price}', zh: '运费 {price}' },\n cardsProductOptions: { en: 'Options', fr: 'Options', de: 'Optionen', es: 'Opciones', it: 'Opzioni', ja: 'オプション', ko: '옵션', pt: 'Opções', ru: 'Варианты', zh: '可选项' },\n cardsProductMoreOptions: { en: '{n} more', fr: '{n} de plus', de: '{n} weitere', es: '{n} más', it: 'altri {n}', ja: 'ほか{n}件', ko: '{n}개 더', pt: 'mais {n}', ru: 'ещё {n}', zh: '还有 {n} 个' },\n cardsProductMore: { en: 'More options', fr: 'Autres choix', de: 'Weitere Angebote', es: 'Más opciones', it: 'Altre proposte', ja: 'その他の候補', ko: '다른 상품', pt: 'Mais opções', ru: 'Другие варианты', zh: '更多选择' },\n} satisfies Record<string, CardWord>;\n\nconst STOCK_WORD: Record<ProductAvailability, keyof typeof P> = {\n 'in-stock': 'cardsProductInStock',\n 'low-stock': 'cardsProductLowStock',\n 'out-of-stock': 'cardsProductOutOfStock',\n preorder: 'cardsProductPreorder',\n};\n\n/** Ten: past that a row of tiles is a catalogue, not an answer (3–8 is the comfortable range). */\nconst PRODUCTS_SHOWN = 10;\nconst OPTIONS_SHOWN = 6;\nconst ACTIONS_PER_PRODUCT = 2;\n\n// ── Reading ──────────────────────────────────────────────────────────────────\n\ntype Raw = Record<string, unknown>;\n\nconst isObject = (value: unknown): value is Raw => !!value && typeof value === 'object' && !Array.isArray(value);\n\n/** The first of `keys` that `r` has a value for. */\nfunction pick(r: Raw | undefined, keys: readonly string[]): unknown {\n if (!r) return undefined;\n for (const key of keys) if (r[key] !== undefined && r[key] !== null) return r[key];\n return undefined;\n}\n\n/** A list from an array or a GraphQL connection (`{ nodes }`, `{ edges }`) — Shopify's Storefront API returns the latter. */\nfunction listOf(value: unknown): unknown[] {\n if (Array.isArray(value)) return value;\n if (!isObject(value)) return [];\n if (Array.isArray(value['nodes'])) return value['nodes'];\n if (Array.isArray(value['edges'])) return value['edges'].map((e) => (isObject(e) ? e['node'] : undefined));\n return [];\n}\n\n/** An amount and its currency, from a number, a shop's text, or `{ amount, currencyCode }`. */\nfunction readMoney(value: unknown): { amount?: number; currency?: string } {\n if (typeof value === 'number') return { amount: Number.isFinite(value) && value >= 0 ? value : undefined };\n if (typeof value === 'string') {\n // A price is not negative: a minus in a shop's text is not this price's.\n const { amount, currency } = readPriceText(value);\n return { amount: amount === undefined ? undefined : Math.abs(amount), currency };\n }\n if (isObject(value)) {\n return {\n amount: readMoney(pick(value, ['amount', 'value', 'price'])).amount,\n currency: currencyCode(pick(value, ['currencyCode', 'currency_code', 'currency'])),\n };\n }\n return {};\n}\n\nfunction readImage(value: unknown): Product['image'] {\n if (Array.isArray(value)) {\n for (const item of value) {\n const image = readImage(item);\n if (image) return image;\n }\n return undefined;\n }\n if (isObject(value)) {\n // schema.org's ImageObject keeps its address in `contentUrl`.\n const src = webUrl(pick(value, ['src', 'url', 'contentUrl', 'href', 'large', 'medium', 'thumbnail']));\n const alt = str(pick(value, ['alt', 'altText', 'alt_text']));\n return src ? { src, ...(alt ? { alt } : {}) } : undefined;\n }\n const src = webUrl(value);\n return src ? { src } : undefined;\n}\n\n/** schema.org's ItemAvailability names and the usual shop words, squeezed to letters. */\nconst AVAILABILITY: Record<string, ProductAvailability> = {\n instock: 'in-stock', available: 'in-stock', instoreonly: 'in-stock', onlineonly: 'in-stock',\n lowstock: 'low-stock', limitedavailability: 'low-stock', fewleft: 'low-stock',\n outofstock: 'out-of-stock', soldout: 'out-of-stock', unavailable: 'out-of-stock', discontinued: 'out-of-stock',\n preorder: 'preorder', presale: 'preorder', backorder: 'preorder',\n};\n\nfunction readAvailability(r: Raw, offer: Raw | undefined): Product['availability'] {\n const value = pick(r, ['availability', 'stockStatus', 'stock_status']) ?? pick(offer, ['availability']);\n if (typeof value === 'string' && value.trim()) {\n // `https://schema.org/InStock`, `schema:InStock` (a JSON-LD prefix), `InStock`: one key.\n const key = value.trim().toLowerCase().replace(/^(?:https?:\\/\\/schema\\.org\\/|schema:)/, '').replace(/[^a-z]/g, '');\n const status = AVAILABILITY[key];\n return status ? { status } : { text: value.trim() };\n }\n const flag = typeof value === 'boolean' ? value : pick(r, ['inStock', 'in_stock', 'available']);\n if (typeof flag === 'boolean') return { status: flag ? 'in-stock' : 'out-of-stock' };\n return undefined;\n}\n\nfunction readRating(r: Raw): { rating?: number; reviewCount?: number } {\n const aggregate = isObject(r['aggregateRating']) ? r['aggregateRating'] : undefined;\n let value = pick(r, ['rating', 'stars', 'ratingValue', 'rating_value', 'averageRating', 'average_rating']) ?? pick(aggregate, ['ratingValue']);\n let count = pick(r, ['reviewCount', 'review_count', 'reviews', 'reviewsCount', 'reviews_count', 'ratingCount', 'rating_count', 'numReviews'])\n ?? pick(aggregate, ['reviewCount', 'ratingCount']);\n // `{ rate, count }`, as the Fake Store API and others nest it.\n if (isObject(value)) {\n count ??= pick(value, ['count', 'reviews']);\n value = pick(value, ['rate', 'value', 'average']);\n }\n if (Array.isArray(count)) count = count.length;\n // schema.org names the scale with `bestRating` (5 when missing): 4 out of 10 is two stars, not four.\n const best = num(pick(r, ['bestRating', 'best_rating']) ?? pick(aggregate, ['bestRating']));\n const given = num(value);\n const stars = given !== undefined && best !== undefined && best > 0 && given <= best ? (given * 5) / best : given;\n const reviews = num(count);\n return {\n // A value off the five-star scale is another scale, not a five: drawn as none.\n rating: stars !== undefined && stars >= 0 && stars <= 5 ? stars : undefined,\n reviewCount: reviews !== undefined && reviews >= 0 ? Math.floor(reviews) : undefined,\n };\n}\n\n/** Shopify's name for the one variant of a product that has none. */\nconst NO_VARIANT = 'Default Title';\n\nfunction readOptions(r: Raw): string[] {\n const out: string[] = [];\n const add = (value: unknown) => {\n const s = str(value);\n if (s && s !== NO_VARIANT && !out.includes(s)) out.push(s);\n };\n // A shop's variants are its options combined (\"Pink / M\"): beside the options they would\n // say each value a second time, in another chip.\n const keys = Array.isArray(r['options']) ? ['options', 'sizes', 'colors', 'colours'] : ['sizes', 'colors', 'colours', 'variants'];\n for (const key of keys) {\n for (const item of listOf(r[key])) {\n if (!isObject(item)) add(item);\n // Shopify's `{ name: 'Size', values: ['S', 'M'] }`: the values are the choices.\n else if (Array.isArray(item['values'])) item['values'].forEach(add);\n else add(pick(item, ['title', 'name', 'value', 'label']));\n }\n }\n return out.slice(0, 50);\n}\n\nfunction readShipping(r: Raw): Product['shipping'] {\n if (r['freeShipping'] === true || r['free_shipping'] === true) return { cost: 0 };\n let value = pick(r, ['shipping', 'delivery', 'shippingInfo', 'shipping_info']);\n if (isObject(value)) value = pick(value, ['text', 'label', 'description']) ?? pick(value, ['cost', 'price', 'amount']);\n if (typeof value === 'number') return Number.isFinite(value) && value >= 0 ? { cost: value } : undefined;\n const text = str(value);\n if (!text) return undefined;\n const cost = num(text);\n return cost !== undefined && cost >= 0 ? { cost } : { text };\n}\n\n/**\n * A product's own buttons, as the result gave them: a link (`http(s)`) or an `id` your\n * `aparte-card-action` listener handles. Never a `send`: the result is the tool's — a shop's\n * page, a feed, a model — and a button that posts its text as the person's next message lets\n * that text speak for them, a lever for prompt injection. A message is the app's to write: in\n * its listener, from the product the event carries, or in the card's `actions` option.\n */\nfunction readActions(value: unknown): CardAction[] {\n if (!Array.isArray(value)) return [];\n return value\n .map((a): CardAction | null => {\n const label = isObject(a) ? str(a['label']) : undefined;\n if (!label) return null;\n const url = a['url'] !== undefined ? webUrl(a['url']) : undefined;\n if (url === null) return null;\n const id = str(a['id']);\n if (!url && !id) return null;\n return { label, ...(url ? { url } : {}), ...(id ? { id } : {}), ...(a['primary'] === true ? { primary: true } : {}) };\n })\n .filter((a): a is CardAction => a !== null)\n .slice(0, ACTIONS_PER_PRODUCT);\n}\n\n/** HTML's usual entities, once its tags are out: `&amp;` is `&`. One pass, so `&amp;lt;` stays `&lt;`. */\nconst ENTITIES: Record<string, string> = { amp: '&', lt: '<', gt: '>', quot: '\"', apos: '\\'', nbsp: ' ' };\nfunction decodeEntities(text: string): string {\n return text.replace(/&(#x[0-9a-f]+|#\\d+|[a-z]+);/gi, (whole, name: string) => {\n if (name.startsWith('#')) {\n const code = /^#x/i.test(name) ? parseInt(name.slice(2), 16) : Number(name.slice(1));\n return code > 0 && code <= 0x10ffff ? String.fromCodePoint(code) : whole;\n }\n return ENTITIES[name.toLowerCase()] ?? whole;\n });\n}\n\n/** The markup a shop writes a description in (Shopify's `body_html`), as the words a reader sees. */\nfunction plainText(html: string): string {\n return decodeEntities(html.replace(/<\\/?(?:br|p|li|div|h\\d)(?=[\\s/>])[^>]*>/gi, ' ').replace(/<[^>]*>/g, '')).replace(/\\s+/g, ' ').trim();\n}\n\ntype Money = ReturnType<typeof readMoney>;\n\n/**\n * The cheapest of a product's variants, with the price it replaces — where Shopify's Admin\n * API keeps a product's price (`variants[].price`, `compare_at_price`).\n */\nfunction cheapestVariant(r: Raw): { price: Money; compare: Money } | undefined {\n let best: { price: Money; compare: Money } | undefined;\n for (const v of listOf(r['variants'])) {\n if (!isObject(v)) continue;\n const price = readMoney(pick(v, ['price', 'amount']));\n if (price.amount === undefined) continue;\n if (!best || price.amount < best.price.amount!) best = { price, compare: readMoney(pick(v, ['compare_at_price', 'compareAtPrice'])) };\n }\n return best;\n}\n\n/** The low end of Shopify's Storefront range, `{ minVariantPrice: { amount, currencyCode } }`. */\nconst lowEnd = (range: unknown) => (isObject(range) ? range['minVariantPrice'] : undefined);\n\n/** One product from whatever a tool wrote, or `null` without a name to show. */\nfunction readProduct(raw: unknown): Product | null {\n if (!isObject(raw)) return null;\n const r = raw;\n const title = str(pick(r, ['title', 'name', 'productName', 'product_title']));\n if (!title) return null;\n // schema.org puts the price, the currency, the stock and the link on an offer.\n const offers = r['offers'];\n const offer = Array.isArray(offers) ? (isObject(offers[0]) ? offers[0] : undefined) : isObject(offers) ? offers : undefined;\n\n // A price of its own, an offer's, Shopify Storefront's range — else its cheapest variant's.\n const own = pick(r, ['price', 'extracted_price', 'salePrice', 'sale_price', 'currentPrice', 'current_price'])\n ?? pick(offer, ['price', 'lowPrice']) ?? lowEnd(r['priceRange']);\n const variant = own === undefined ? cheapestVariant(r) : undefined;\n const price = variant ? variant.price : readMoney(own);\n const compareOwn = pick(r, [\n 'compareAtPrice', 'compare_at_price', 'originalPrice', 'original_price', 'listPrice', 'list_price',\n 'regularPrice', 'regular_price', 'wasPrice', 'was_price', 'extracted_old_price', 'oldPrice', 'old_price', 'msrp',\n ]) ?? lowEnd(r['compareAtPriceRange']);\n const compare = compareOwn === undefined && variant ? variant.compare : readMoney(compareOwn);\n const currency = currencyCode(pick(r, ['currency', 'currency_code', 'currencyCode', 'priceCurrency']) ?? pick(offer, ['priceCurrency']))\n ?? price.currency ?? compare.currency;\n\n const merchantRaw = pick(r, ['merchant', 'seller', 'store', 'shop', 'source', 'retailer', 'vendor']) ?? pick(r, ['brand']);\n const merchant = isObject(merchantRaw) ? str(pick(merchantRaw, ['name', 'title'])) : str(merchantRaw);\n const merchantLogo = webUrl(pick(r, ['merchantLogo', 'merchant_logo', 'source_icon', 'storeLogo', 'logo'])\n ?? (isObject(merchantRaw) ? pick(merchantRaw, ['logo', 'icon', 'image']) : undefined));\n\n const description = str(pick(r, ['description', 'summary', 'snippet', 'subtitle', 'body_html', 'descriptionHtml']));\n const { rating: stars, reviewCount } = readRating(r);\n const availability = readAvailability(r, offer);\n const shipping = readShipping(r);\n const image = readImage(pick(r, ['image', 'images', 'thumbnail', 'image_url', 'imageUrl', 'featuredImage', 'photo']));\n const url = webUrl(pick(r, ['url', 'link', 'permalink', 'product_link', 'productUrl', 'product_url', 'onlineStoreUrl', 'href']) ?? pick(offer, ['url']));\n const id = str(pick(r, ['id', 'sku', 'product_id', 'productId']));\n const badge = str(pick(r, ['badge', 'tag', 'ribbon']));\n\n return {\n title,\n ...(id ? { id } : {}),\n ...(image ? { image } : {}),\n ...(price.amount !== undefined ? { price: price.amount } : {}),\n ...(currency ? { currency } : {}),\n ...(price.amount !== undefined && compare.amount !== undefined && compare.amount > price.amount ? { compareAtPrice: compare.amount } : {}),\n ...(stars !== undefined ? { rating: stars } : {}),\n ...(reviewCount !== undefined ? { reviewCount } : {}),\n ...(availability ? { availability } : {}),\n ...(merchant ? { merchant } : {}),\n ...(merchant && merchantLogo ? { merchantLogo } : {}),\n ...(badge ? { badge } : {}),\n options: readOptions(r),\n ...(shipping ? { shipping } : {}),\n // Shown as text, so a tag would show as `<p>`: take the words out of the markup.\n ...(description ? { description: plainText(description) } : {}),\n ...(url ? { url } : {}),\n actions: readActions(r['actions']),\n };\n}\n\n/**\n * The card's data from the loose shape `map` returns — one product, a list, or\n * `{ title, products }` (also `results`, `items`, Google Shopping's `shopping_results`) —\n * or `null` when not one product has a name. At most ten are kept.\n */\nexport function readProducts(raw: unknown): ProductData | null {\n if (!raw || typeof raw !== 'object') return null;\n let list: unknown[];\n let title: string | undefined;\n if (Array.isArray(raw)) {\n list = raw;\n } else {\n const r = raw as Raw;\n const many = ['products', 'results', 'shopping_results', 'items'].map((key) => r[key]).find(Array.isArray);\n if (many) {\n list = many;\n title = str(pick(r, ['title', 'heading']));\n } else {\n list = [r];\n }\n }\n const products = list.map(readProduct).filter((p): p is Product => p !== null).slice(0, PRODUCTS_SHOWN);\n return products.length ? { ...(title ? { title } : {}), products } : null;\n}\n\n/** The share taken off, from the two prices — never read from a tool's \"-20%\". `undefined` under one percent. */\nexport function discountOf(product: Pick<Product, 'price' | 'compareAtPrice'>): number | undefined {\n const { price, compareAtPrice } = product;\n if (price === undefined || compareAtPrice === undefined || compareAtPrice <= price || compareAtPrice <= 0) return undefined;\n const ratio = (compareAtPrice - price) / compareAtPrice;\n return Math.round(ratio * 100) >= 1 ? ratio : undefined;\n}\n\n// ── Drawing ──────────────────────────────────────────────────────────────────\n\nconst money = (config: AparteConfig, product: Product, amount: number) => formatPrice(config, amount, product.currency);\nconst notNull = <T>(value: T | null | undefined): value is T => value !== null && value !== undefined;\n\n/**\n * The photo in its square, over a bag glyph that stays underneath: a missing photo shows\n * the bag, and one that fails to load is hidden to show it — no node comes or goes.\n */\nfunction media(product: Product, className = ''): HTMLElement {\n const frame = el('div', { class: `aparte-product__media${className ? ` ${className}` : ''}` },\n glyph(BAG, 'aparte-rich-card__glyph aparte-product__placeholder'));\n if (!product.image) {\n frame.setAttribute('data-empty', '');\n return frame;\n }\n const image = el('img', {\n class: 'aparte-product__image',\n attrs: {\n src: product.image.src,\n alt: product.image.alt ?? product.title,\n loading: 'lazy',\n decoding: 'async',\n // A shop's CDN learns nothing about the chat page that showed its photo.\n referrerpolicy: 'no-referrer',\n },\n });\n image.addEventListener('error', () => {\n image.hidden = true;\n frame.setAttribute('data-empty', '');\n }, { once: true });\n frame.append(image);\n return frame;\n}\n\n/** The product's name, a link out when it has a URL — the one link a tile or a row has. */\nfunction titleOf(product: Product): HTMLElement {\n const title = el('div', { class: 'aparte-product__title' });\n if (product.url) {\n title.append(el('a', {\n class: 'aparte-product__link',\n attrs: { href: product.url, target: '_blank', rel: 'noopener noreferrer' },\n text: product.title,\n }));\n } else {\n title.textContent = product.title;\n }\n return title;\n}\n\nfunction merchantOf(product: Product): HTMLElement | null {\n if (!product.merchant) return null;\n const node = el('div', { class: 'aparte-product__merchant' });\n if (product.merchantLogo) {\n // Empty alt: the shop's name is written right beside it.\n const logo = el('img', { class: 'aparte-product__logo', attrs: { src: product.merchantLogo, alt: '', loading: 'lazy', decoding: 'async', referrerpolicy: 'no-referrer' } });\n logo.addEventListener('error', () => { logo.hidden = true; }, { once: true });\n node.append(logo);\n }\n node.append(el('span', { class: 'aparte-product__merchant-name', text: product.merchant }));\n return node;\n}\n\nfunction discountBadge(ctx: CardContext, product: Product): HTMLElement | null {\n const ratio = discountOf(product);\n if (ratio === undefined) return null;\n const badge = el('span', { class: 'aparte-badge aparte-badge--danger aparte-badge--solid aparte-badge--sm aparte-product__discount' });\n ctx.bind(badge, () => `\\u2212${formatPercent(ctx.config, ratio)}`);\n return badge;\n}\n\n/** The price, the \"was\" price struck through after it, and — in `detail` — the discount beside them. */\nfunction priceOf(ctx: CardContext, product: Product, withDiscount = false): HTMLElement | null {\n if (product.price === undefined) return null;\n const row = el('div', { class: 'aparte-product__price' });\n const now = el('span', { class: 'aparte-product__now' });\n ctx.bind(now, () => money(ctx.config, product, product.price!));\n row.append(now);\n if (product.compareAtPrice !== undefined) {\n // A struck-through number is silent to a screen reader: it is told which one this is.\n const said = el('span', { class: 'aparte-sr-only' });\n ctx.bind(said, () => `${word(ctx.config, 'cardsProductWas', P.cardsProductWas)} `);\n const value = el('span', { class: 'aparte-product__was-value' });\n ctx.bind(value, () => money(ctx.config, product, product.compareAtPrice!));\n row.append(el('del', { class: 'aparte-product__was' }, said, value));\n const discount = withDiscount ? discountBadge(ctx, product) : null;\n if (discount) row.append(discount);\n }\n return row;\n}\n\nfunction availabilityOf(ctx: CardContext, product: Product): HTMLElement | null {\n const availability = product.availability;\n if (!availability) return null;\n const status = 'status' in availability ? availability.status : undefined;\n const text = el('span', { class: 'aparte-product__stock-text' });\n if (status) ctx.word(text, STOCK_WORD[status], P[STOCK_WORD[status]]);\n else text.textContent = (availability as { text: string }).text;\n return el('div', { class: 'aparte-product__stock', attrs: { 'data-availability': status ?? 'other' } },\n el('span', { class: 'aparte-product__dot', attrs: { 'aria-hidden': 'true' } }),\n text);\n}\n\nfunction shippingOf(ctx: CardContext, product: Product): HTMLElement | null {\n const shipping = product.shipping;\n if (!shipping) return null;\n const text = el('span', { class: 'aparte-product__shipping-text' });\n if ('text' in shipping) text.textContent = shipping.text;\n else if (shipping.cost === 0) ctx.word(text, 'cardsProductFreeShipping', P.cardsProductFreeShipping);\n else ctx.bind(text, () => word(ctx.config, 'cardsProductShippingCost', P.cardsProductShippingCost, { price: money(ctx.config, product, shipping.cost) }));\n return el('div', { class: 'aparte-product__shipping', attrs: { 'data-free': 'cost' in shipping && shipping.cost === 0 } },\n glyph(TRUCK, 'aparte-rich-card__glyph aparte-product__shipping-icon'),\n text);\n}\n\n/** What sits over the photo's corner: the shop's badge, and the discount where the variant puts it there. */\nfunction flags(ctx: CardContext, product: Product, withDiscount: boolean): HTMLElement | null {\n const items = [\n product.badge ? el('span', { class: 'aparte-badge aparte-badge--sm aparte-product__badge', text: product.badge }) : null,\n withDiscount ? discountBadge(ctx, product) : null,\n ].filter(notNull);\n return items.length ? el('div', { class: 'aparte-product__flags' }, ...items) : null;\n}\n\n/** Sizes, colours: six chips, then \"+n\" for the rest. */\nfunction optionsOf(ctx: CardContext, product: Product): HTMLElement | null {\n if (!product.options.length) return null;\n const list = el('ul', { class: 'aparte-product__options', attrs: { role: 'list' } });\n ctx.bind(list, () => word(ctx.config, 'cardsProductOptions', P.cardsProductOptions), 'aria-label');\n for (const option of product.options.slice(0, OPTIONS_SHOWN)) {\n list.append(el('li', { class: 'aparte-tag aparte-tag--sm aparte-product__option' }, el('span', { class: 'aparte-tag__label', text: option })));\n }\n const rest = product.options.length - OPTIONS_SHOWN;\n if (rest > 0) {\n const shown = el('span', { class: 'aparte-tag__label', attrs: { 'aria-hidden': 'true' } });\n ctx.bind(shown, () => `+${formatNumber(ctx.config, rest)}`);\n const said = el('span', { class: 'aparte-sr-only' });\n ctx.bind(said, () => word(ctx.config, 'cardsProductMoreOptions', P.cardsProductMoreOptions, { n: formatNumber(ctx.config, rest) }));\n list.append(el('li', { class: 'aparte-tag aparte-tag--sm aparte-product__option aparte-product__option--more' }, shown, said));\n }\n return list;\n}\n\n/** A product's own buttons, each handing the product back as the event's `data`. */\nfunction actionsOf(ctx: CardContext, product: Product, max: number): HTMLElement | null {\n const buttons = product.actions.slice(0, max).map((action) => ctx.action(action, product, 'aparte-product__action')).filter(notNull);\n return buttons.length ? el('div', { class: 'aparte-product__actions' }, ...buttons) : null;\n}\n\nfunction productRoot(kind: 'tile' | 'row' | 'detail', product: Product, extra = ''): HTMLElement {\n return el('div', {\n class: `aparte-product aparte-product--${kind}${extra ? ` ${extra}` : ''}`,\n attrs: {\n 'data-availability': product.availability && 'status' in product.availability ? product.availability.status : undefined,\n 'data-linked': product.url !== undefined,\n },\n });\n}\n\n/**\n * The `card` variant's tile. The title's link stretches over the whole tile (the sheet's\n * `::after`), so the tile is one link, read once, with its buttons lifted above it.\n * A `mini` tile — the others under a `detail` — keeps the photo, the name and the price.\n */\nfunction tile(ctx: CardContext, product: Product, { actions, mini = false }: { actions: number; mini?: boolean }): HTMLElement {\n const node = productRoot('tile', product, mini ? 'aparte-product--mini' : '');\n const photo = media(product);\n const corner = mini ? null : flags(ctx, product, true);\n if (corner) photo.append(corner);\n const body = el('div', { class: 'aparte-product__body' },\n mini ? null : merchantOf(product),\n titleOf(product),\n mini ? null : rating(ctx, product.rating, { count: product.reviewCount }),\n priceOf(ctx, product),\n mini ? null : availabilityOf(ctx, product));\n node.append(photo, body);\n const buttons = actionsOf(ctx, product, actions);\n if (buttons) node.append(buttons);\n return node;\n}\n\n/**\n * The `compact` variant's row: thumbnail, name, shop and stars, price. \"In stock\" is left\n * out — it is what a reader assumes — so the line only speaks when the stock changes the choice.\n */\nfunction row(ctx: CardContext, product: Product): HTMLElement {\n const node = productRoot('row', product);\n const meta = el('div', { class: 'aparte-product__meta' },\n product.merchant ? el('span', { class: 'aparte-product__merchant-name', text: product.merchant }) : null,\n rating(ctx, product.rating, { starsOnly: true }),\n product.availability && !('status' in product.availability && product.availability.status === 'in-stock') ? availabilityOf(ctx, product) : null);\n const main = el('div', { class: 'aparte-product__main' }, titleOf(product), meta.childNodes.length ? meta : null);\n node.append(media(product, 'aparte-product__thumb'), main);\n const amount = priceOf(ctx, product);\n if (amount) node.append(amount);\n const buttons = actionsOf(ctx, product, 1);\n if (buttons) node.append(buttons);\n return node;\n}\n\n/** The `detail` variant: everything the card knows, the photo beside it on a wide card. */\nfunction detail(ctx: CardContext, product: Product): HTMLElement {\n const node = productRoot('detail', product);\n const photo = media(product);\n const corner = flags(ctx, product, false);\n if (corner) photo.append(corner);\n // The photo links where the name does; the name's link is the one a keyboard and a\n // screen reader meet, so this copy is out of both.\n const shown = product.url\n ? el('a', { class: 'aparte-product__media-link', attrs: { href: product.url, target: '_blank', rel: 'noopener noreferrer', tabindex: -1, 'aria-hidden': 'true' } }, photo)\n : photo;\n const facts = el('div', { class: 'aparte-product__facts' }, availabilityOf(ctx, product), shippingOf(ctx, product));\n const body = el('div', { class: 'aparte-product__body' },\n merchantOf(product),\n titleOf(product),\n rating(ctx, product.rating, { count: product.reviewCount }),\n priceOf(ctx, product, true),\n facts.childNodes.length ? facts : null,\n product.description ? el('p', { class: 'aparte-product__description', text: product.description }) : null,\n optionsOf(ctx, product),\n actionsOf(ctx, product, ACTIONS_PER_PRODUCT));\n node.append(shown, body);\n return el('div', { class: 'aparte-product__detail' }, node);\n}\n\nfunction heading(data: ProductData): HTMLElement | null {\n return data.title ? el('div', { class: 'aparte-product__heading', text: data.title }) : null;\n}\n\nfunction labelOf(data: Partial<ProductData> | null, ctx: CardContext): string {\n const products = data?.products ?? [];\n if (products.length === 1) return products[0]!.title;\n if (data?.title) return data.title;\n if (products.length > 1) return word(ctx.config, 'cardsProductCount', P.cardsProductCount, { n: formatNumber(ctx.config, products.length) });\n return word(ctx.config, 'cardsProductTitle', P.cardsProductTitle);\n}\n\nfunction render(data: ProductData, ctx: CardContext<ProductVariant>): Node[] {\n const { products } = data;\n const first = products[0]!;\n\n if (ctx.variant === 'detail') {\n // One product looked at closely; the others stay one swipe away, small, rather\n // than a second row of full tiles competing with it. Rows were the other choice,\n // but nine rows under a detail make a page, and a row of mini tiles stays one line.\n const out: Node[] = [detail(ctx, first)];\n if (products.length > 1) {\n const title = el('div', { class: 'aparte-product__more-title' });\n ctx.word(title, 'cardsProductMore', P.cardsProductMore);\n const slides = products.slice(1).map((p) => tile(ctx, p, { actions: 0, mini: true }));\n out.push(el('div', { class: 'aparte-product__more' }, title,\n carousel(ctx, slides, { label: () => word(ctx.config, 'cardsProductMore', P.cardsProductMore) })));\n }\n return out;\n }\n\n if (ctx.variant === 'compact') {\n if (products.length === 1) return [row(ctx, first)];\n const list = el('ul', { class: 'aparte-product__rows', attrs: { role: 'list' } },\n ...products.map((p) => el('li', { class: 'aparte-product__item' }, row(ctx, p))));\n return [heading(data), list].filter(notNull);\n }\n\n if (products.length === 1) return [tile(ctx, first, { actions: ACTIONS_PER_PRODUCT })];\n // Several: tiles in a row that scrolls, one button each — a row of tiles reads as a\n // choice when each offers one thing to do.\n const slides = products.map((p) => tile(ctx, p, { actions: 1 }));\n return [el('div', { class: 'aparte-product__collection' },\n heading(data),\n carousel(ctx, slides, { label: () => labelOf(data, ctx) }))];\n}\n\nfunction skeleton(partial: Partial<ProductData> | null, ctx: CardContext<ProductVariant>): Node[] {\n const block = (cls: string, kind: 'text' | 'rect' = 'rect') =>\n el('span', { class: `aparte-skeleton aparte-skeleton--${kind} ${cls}`, attrs: { 'aria-hidden': 'true' } });\n const lines = () => [block('aparte-product__sk-line', 'text'), block('aparte-product__sk-line aparte-product__sk-line--short', 'text')];\n // What the search was for, before anything is found: the call's input already says it.\n const query = partial?.title\n ? el('div', { class: 'aparte-product__query' }, glyph(SEARCH, 'aparte-rich-card__glyph aparte-product__query-icon'), el('span', { class: 'aparte-product__query-text', text: partial.title }))\n : null;\n\n if (ctx.variant === 'compact') {\n const rows = [0, 1, 2].map(() => el('div', { class: 'aparte-product__item' },\n el('div', { class: 'aparte-product aparte-product--row aparte-product--skeleton' },\n block('aparte-product__sk-thumb'),\n el('div', { class: 'aparte-product__main' }, ...lines()),\n block('aparte-product__sk-price', 'text'))));\n return [query, el('div', { class: 'aparte-product__rows' }, ...rows)].filter(notNull);\n }\n if (ctx.variant === 'detail') {\n return [query, el('div', { class: 'aparte-product__detail' },\n el('div', { class: 'aparte-product aparte-product--detail aparte-product--skeleton' },\n block('aparte-product__sk-media'),\n el('div', { class: 'aparte-product__body' }, ...lines(), block('aparte-product__sk-price', 'text'), block('aparte-product__sk-line', 'text'))))].filter(notNull);\n }\n // Three tiles, the third cut by the edge: the shape a row of results will take.\n const tiles = [0, 1, 2].map(() => el('div', { class: 'aparte-product aparte-product--tile aparte-product--skeleton' },\n block('aparte-product__sk-media'),\n el('div', { class: 'aparte-product__body' }, ...lines(), block('aparte-product__sk-price', 'text'))));\n return [el('div', { class: 'aparte-product__collection' }, query, el('div', { class: 'aparte-product__sk-track' }, ...tiles))];\n}\n\nexport const productCard = defineCard<ProductData, ProductVariant>({\n name: 'product',\n variants: ['card', 'compact', 'detail'],\n styles: productStyles,\n icon: TAG,\n normalize: readProducts,\n render,\n skeleton,\n label: labelOf,\n fallback: (data, ctx) => {\n // One line per product, \"Title — price (4.6/5)\", the way a model or a text-only\n // reader would want them listed.\n const lines = data.products.map((p) => {\n const amount = p.price !== undefined ? ` — ${money(ctx.config, p, p.price)}` : '';\n const stars = p.rating !== undefined ? ` (${formatNumber(ctx.config, p.rating, { maximumFractionDigits: 1 })}/5)` : '';\n return `${p.title}${amount}${stars}`;\n });\n return [data.title, ...lines].filter(notNull).join('\\n');\n },\n partial: (input) => {\n const query = str(input['query'] ?? input['q'] ?? input['search'] ?? input['keywords'] ?? input['term'] ?? input['product']);\n return query ? { title: query } : null;\n },\n});\n\n/** Draw a tool's products as this card — returns the function that stops it. */\nexport function setupProductCard(options: CardSetupOptions<ProductData, ProductVariant> = {}): () => void {\n return productCard.setup(options);\n}\n"],
5
- "mappings": "6PAQA,IAAMA,EAAOC,GACT,mKAAmKA,CAAI,SAG9JC,GAAMF,EAAI,yHAAyH,EAGnIG,GAAQH,EAAI,iJAAiJ,EAG7JI,GAASJ,EAAI,qEAAqE,EAGlFK,GAAML,EAAI,0IAA0I,ECrBjKM,GAAe;;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ACN,UAAWgF,GACX,OAAA6D,GACA,SAAAI,GACA,MAAOL,GACP,SAAU,CAACD,EAAMpC,IAAQ,CAGrB,IAAM8C,EAAQV,EAAK,SAAS,IAAKvD,GAAM,CACnC,IAAMpE,EAASoE,EAAE,QAAU,OAAY,WAAMK,EAAMc,EAAI,OAAQnB,EAAGA,EAAE,KAAK,CAAC,GAAK,GACzE9C,EAAQ8C,EAAE,SAAW,OAAY,KAAKoC,EAAajB,EAAI,OAAQnB,EAAE,OAAQ,CAAE,sBAAuB,CAAA,CAAG,CAAC,MAAQ,GACpH,MAAO,GAAGA,EAAE,KAAK,GAAGpE,CAAM,GAAGsB,CAAK,EACtC,CAAC,EACD,MAAO,CAACqG,EAAK,MAAO,GAAGU,CAAK,EAAE,OAAOzD,CAAO,EAAE,KAAK;CAAI,CAC3D,EACA,QAAU+D,GAAU,CAChB,IAAML,EAAQ5H,EAAIiI,EAAM,OAAYA,EAAM,GAAQA,EAAM,QAAaA,EAAM,UAAeA,EAAM,MAAWA,EAAM,OAAU,EAC3H,OAAOL,EAAQ,CAAE,MAAOA,CAAA,EAAU,IACtC,CACJ,CAAC,EAGM,SAASM,GAAiBC,EAAyD,CAAA,EAAgB,CACtG,OAAOJ,GAAY,MAAMI,CAAO,CACpC",
6
- "names": ["svg", "body", "BAG", "TRUCK", "SEARCH", "TAG", "productStyles", "P", "STOCK_WORD", "PRODUCTS_SHOWN", "OPTIONS_SHOWN", "ACTIONS_PER_PRODUCT", "isObject", "value", "pick", "r", "keys", "key", "listOf", "e", "readMoney", "amount", "currency", "readPriceText", "currencyCode", "readImage", "item", "image", "src", "webUrl", "alt", "str", "AVAILABILITY", "readAvailability", "offer", "status", "flag", "readRating", "aggregate", "count", "best", "num", "given", "stars", "reviews", "NO_VARIANT", "readOptions", "out", "add", "s", "readShipping", "text", "cost", "readActions", "label", "url", "id", "ENTITIES", "decodeEntities", "whole", "name", "code", "plainText", "html", "cheapestVariant", "v", "price", "lowEnd", "range", "readProduct", "raw", "title", "offers", "own", "variant", "compareOwn", "compare", "merchantRaw", "merchant", "merchantLogo", "description", "reviewCount", "availability", "shipping", "badge", "readProducts", "list", "many", "products", "p", "discountOf", "product", "compareAtPrice", "ratio", "money", "config", "formatPrice", "notNull", "media", "className", "frame", "el", "glyph", "titleOf", "merchantOf", "node", "logo", "discountBadge", "ctx", "formatPercent", "priceOf", "withDiscount", "row", "now", "said", "word", "discount", "availabilityOf", "shippingOf", "flags", "items", "optionsOf", "option", "rest", "shown", "formatNumber", "actionsOf", "max", "buttons", "action", "productRoot", "kind", "extra", "tile", "actions", "mini", "photo", "corner", "rating", "meta", "main", "detail", "facts", "heading", "data", "labelOf", "render", "first", "slides", "carousel", "skeleton", "partial", "block", "cls", "lines", "query", "rows", "tiles", "productCard", "defineCard", "input", "setupProductCard", "options"]
3
+ "sources": ["../../../node_modules/.pnpm/@aparte+plugin-cards@1.0.0_@aparte+core@1.0.0/node_modules/@aparte/plugin-cards/src/product/icons.ts", "../../../node_modules/.pnpm/@aparte+plugin-cards@1.0.0_@aparte+core@1.0.0/node_modules/@aparte/plugin-cards/src/product/product.css", "../../../node_modules/.pnpm/@aparte+plugin-cards@1.0.0_@aparte+core@1.0.0/node_modules/@aparte/plugin-cards/src/product/index.ts"],
4
+ "sourcesContent": ["/**\n * The product card's glyphs: the bag a tile shows when it has no photo, the van beside a\n * delivery line, the loupe before a search that is still running.\n *\n * Drawn on a 24 × 24 grid in `currentColor` strokes, so the sheet colours them through\n * `color` and a theme follows. Constants of this package — the only markup the card parses.\n */\n\nconst svg = (body: string) =>\n `<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\" xmlns=\"http://www.w3.org/2000/svg\">${body}</svg>`; // safe-text: this package's own SVG, built from its glyph constants\n\n/** A shopping bag: the placeholder where a photo is missing or failed to load. */\nexport const BAG = svg('<path d=\"M5.5 8h13l-1 11.2a1.8 1.8 0 0 1-1.8 1.6H8.3a1.8 1.8 0 0 1-1.8-1.6z\"/><path d=\"M9 10.5V6.8a3 3 0 0 1 6 0v3.7\"/>');\n\n/** A delivery van, before the shipping line. */\nexport const TRUCK = svg('<path d=\"M2.8 6.5h10.4v9.3H2.8z\"/><path d=\"M13.2 9.5h4.1l3 3.2v3.1h-7.1\"/><circle cx=\"7\" cy=\"17.3\" r=\"1.7\"/><circle cx=\"17\" cy=\"17.3\" r=\"1.7\"/>');\n\n/** A loupe, before the query a running search was given. */\nexport const SEARCH = svg('<circle cx=\"10.8\" cy=\"10.8\" r=\"6.3\"/><path d=\"M15.5 15.5l4.7 4.7\"/>');\n\n/** The card's own glyph, for its one-line states (waiting, refused, failed). */\nexport const TAG = svg('<path d=\"M3.5 12.6V4.8a1.3 1.3 0 0 1 1.3-1.3h7.8l8 8a1.3 1.3 0 0 1 0 1.8l-7 7a1.3 1.3 0 0 1-1.8 0z\"/><circle cx=\"8.3\" cy=\"8.3\" r=\"1.5\"/>');\n", "export default \"/* =========================================\\n The product card — @aparte/plugin-cards/product\\n =========================================\\n Three variants of one card, chosen by `data-variant` on its root:\\n card a tile: the photo, the shop, the name, the stars, the price. Several\\n products are a row of tiles that scrolls, and the card drops its own\\n frame so the tiles are not boxes inside a box.\\n compact a row per product — thumbnail, name, stars, price — a list to scan.\\n detail one product at length: the photo beside the facts on a wide card, above\\n them on a narrow one; the others in a small row under it.\\n Every colour is a theme token or derived from one, so light and dark follow the chat.\\n */\\n\\n.aparte-product-card {\\n --aparte-product-tile-size: 12.5rem;\\n --aparte-product-thumb-size: 3.5rem;\\n --aparte-product-media-radius: var(--aparte-radius-lg);\\n /* A product photo is shot on white. The plate it sits on is near-white in BOTH schemes\\n (derived from the ink, so it is a hair off white in light and a hair off cream in\\n dark) and the photo is multiplied into it: its white background melts into the plate\\n instead of sitting as a white square on a grey one. A photo on a dark plate in dark\\n mode keeps its white box whatever we do — the shops' own apps show it light too. */\\n --aparte-product-media-bg: color-mix(in oklab, var(--aparte-text) 5%, #fff);\\n --aparte-product-image-fit: contain;\\n --aparte-product-image-inset: 7%;\\n /* Where there is no photo: the theme's own surfaces, warmed by its accent. */\\n --aparte-product-placeholder: linear-gradient(\\n 145deg,\\n color-mix(in oklab, var(--aparte-primary) 16%, var(--aparte-surface-2)) 0%,\\n var(--aparte-surface-2) 55%,\\n color-mix(in oklab, var(--aparte-text) 5%, var(--aparte-surface-2)) 100%\\n );\\n --aparte-product-placeholder-ink: color-mix(in oklab, var(--aparte-text) 30%, transparent);\\n --aparte-product-price-color: var(--aparte-text);\\n --aparte-product-hover-border: color-mix(in oklab, var(--aparte-text) 22%, var(--aparte-border));\\n --aparte-product-hover-shadow: 0 8px 18px -12px rgb(0 0 0 / 0.38);\\n}\\n\\n/* ── Widths: each variant asks for its own; the bubble's limit caps them all ── */\\n\\n.aparte-product-card[data-variant=\\\"card\\\"] { --aparte-rich-card-max-inline-size: 16.5rem; }\\n.aparte-product-card[data-variant=\\\"compact\\\"] { --aparte-rich-card-max-inline-size: 28rem; }\\n.aparte-product-card[data-variant=\\\"detail\\\"] { --aparte-rich-card-max-inline-size: 36rem; }\\n.aparte-product-card:has(> .aparte-product__collection) { --aparte-rich-card-max-inline-size: 42rem; }\\n\\n/* Several tiles: each is framed, so the card is not. The kit's buttons under it lose\\n their band, which would otherwise float as a strip under nothing. */\\n.aparte-product-card:has(> .aparte-product__collection) {\\n overflow: visible;\\n border-color: transparent;\\n border-radius: 0;\\n background: transparent;\\n}\\n\\n.aparte-product-card:has(> .aparte-product__collection) > .aparte-rich-card__actions {\\n padding-inline: 0;\\n border-block-start: 0;\\n background: none;\\n}\\n\\n/* ── Headings: the collection's title, the query of a running search ─── */\\n\\n.aparte-product__heading {\\n margin-block-end: var(--aparte-space-4);\\n font-size: var(--aparte-font-size-md);\\n font-weight: var(--aparte-font-weight-semibold);\\n overflow-wrap: anywhere;\\n}\\n\\n.aparte-product-card[data-variant=\\\"compact\\\"] > .aparte-product__heading {\\n margin: 0;\\n padding: var(--aparte-space-5) var(--aparte-space-6) var(--aparte-space-2);\\n}\\n\\n.aparte-product__query {\\n display: flex;\\n align-items: center;\\n gap: var(--aparte-space-3);\\n min-inline-size: 0;\\n margin-block-end: var(--aparte-space-4);\\n color: var(--aparte-text-muted);\\n font-size: var(--aparte-font-size-md);\\n --aparte-rich-card-glyph-size: 1rem;\\n}\\n\\n.aparte-product__query-text {\\n overflow: hidden;\\n text-overflow: ellipsis;\\n white-space: nowrap;\\n}\\n\\n.aparte-product-card[data-variant=\\\"compact\\\"] > .aparte-product__query,\\n.aparte-product-card[data-variant=\\\"detail\\\"] > .aparte-product__query {\\n margin: 0;\\n padding: var(--aparte-space-5) var(--aparte-space-6) 0;\\n}\\n\\n/* ── The carousel, in product sizes ──────────────────────────────────── */\\n\\n.aparte-product-card .aparte-rich-card__carousel {\\n --aparte-rich-card-slide-size: var(--aparte-product-tile-size);\\n}\\n\\n/* ── A product, whatever its shape ───────────────────────────────────── */\\n\\n.aparte-product {\\n position: relative;\\n min-inline-size: 0;\\n color: var(--aparte-text);\\n}\\n\\n/* The title's link covers the tile or the row: one link per product, read once. */\\n.aparte-product__link {\\n color: inherit;\\n text-decoration: none;\\n}\\n\\n.aparte-product--tile .aparte-product__link,\\n.aparte-product--row .aparte-product__link {\\n outline: none;\\n}\\n\\n.aparte-product--tile .aparte-product__link::after,\\n.aparte-product--row .aparte-product__link::after {\\n content: \\\"\\\";\\n position: absolute;\\n inset: 0;\\n border-radius: inherit;\\n}\\n\\n.aparte-product[data-linked]:hover .aparte-product__title {\\n text-decoration: underline;\\n text-decoration-thickness: 1px;\\n text-underline-offset: 0.18em;\\n}\\n\\n/* The ring is the product's, since the link is all of it. */\\n.aparte-product--tile:has(.aparte-product__link:focus-visible) {\\n outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);\\n outline-offset: var(--aparte-focus-outline-offset);\\n}\\n\\n.aparte-product--row:has(.aparte-product__link:focus-visible) {\\n /* A row reaches the card's clipped edges: its ring is drawn inside. */\\n outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);\\n outline-offset: calc(var(--aparte-focus-outline-width) * -1);\\n}\\n\\n/* ── The photo ───────────────────────────────────────────────────────── */\\n\\n.aparte-product__media {\\n position: relative;\\n display: grid;\\n place-items: center;\\n aspect-ratio: 1;\\n overflow: hidden;\\n border-radius: var(--aparte-product-media-radius);\\n background: var(--aparte-product-media-bg);\\n isolation: isolate;\\n}\\n\\n.aparte-product__media[data-empty] {\\n background: var(--aparte-product-placeholder);\\n}\\n\\n.aparte-product__placeholder {\\n grid-area: 1 / 1;\\n color: var(--aparte-product-placeholder-ink);\\n --aparte-rich-card-glyph-size: clamp(1.25rem, 30%, 3.5rem);\\n}\\n\\n.aparte-product__media:not([data-empty]) .aparte-product__placeholder { visibility: hidden; }\\n\\n.aparte-product__image {\\n grid-area: 1 / 1;\\n /* The frame centres its children (for the placeholder's glyph): without this the photo's\\n 100% height never resolves and `--aparte-product-image-fit: cover` left bands above and\\n below a photo that is not square. */\\n place-self: stretch;\\n box-sizing: border-box;\\n inline-size: 100%;\\n block-size: 100%;\\n padding: var(--aparte-product-image-inset);\\n object-fit: var(--aparte-product-image-fit);\\n mix-blend-mode: multiply;\\n transition: scale var(--aparte-duration-slower) ease, opacity var(--aparte-duration-base) ease;\\n}\\n\\n.aparte-product__image[hidden] { display: none; }\\n\\n.aparte-product[data-linked]:hover .aparte-product__image,\\n.aparte-product__media-link:hover .aparte-product__image {\\n scale: 1.04;\\n}\\n\\n/* Out of stock: the photo steps back, the line under it says why. */\\n.aparte-product[data-availability=\\\"out-of-stock\\\"] .aparte-product__image {\\n opacity: 0.55;\\n filter: grayscale(0.5);\\n}\\n\\n.aparte-product__flags {\\n position: absolute;\\n z-index: 1;\\n inset-block-start: var(--aparte-space-3);\\n inset-inline-start: var(--aparte-space-3);\\n display: flex;\\n flex-wrap: wrap;\\n gap: var(--aparte-space-2);\\n max-inline-size: calc(100% - var(--aparte-space-3) * 2);\\n}\\n\\n/* The shop's word: a pill of the card's own surface over the plate, in either scheme. */\\n.aparte-product__flags .aparte-product__badge {\\n max-inline-size: 100%;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n background: color-mix(in oklab, var(--aparte-surface-1) 90%, transparent);\\n color: var(--aparte-text);\\n box-shadow: 0 1px 3px rgb(0 0 0 / 0.14);\\n backdrop-filter: blur(6px);\\n}\\n\\n.aparte-product__discount {\\n font-variant-numeric: tabular-nums;\\n}\\n\\n/* ── The words beside the photo ──────────────────────────────────────── */\\n\\n.aparte-product__body {\\n display: flex;\\n flex: 1;\\n flex-direction: column;\\n gap: var(--aparte-space-2);\\n min-inline-size: 0;\\n}\\n\\n.aparte-product__merchant {\\n display: flex;\\n align-items: center;\\n gap: var(--aparte-space-2);\\n min-inline-size: 0;\\n color: var(--aparte-text-muted);\\n font-size: var(--aparte-font-size-xs);\\n}\\n\\n.aparte-product__merchant-name {\\n overflow: hidden;\\n text-overflow: ellipsis;\\n white-space: nowrap;\\n}\\n\\n.aparte-product__logo {\\n flex: none;\\n inline-size: 1rem;\\n block-size: 1rem;\\n border-radius: var(--aparte-radius-xs);\\n object-fit: cover;\\n}\\n\\n.aparte-product__logo[hidden] { display: none; }\\n\\n.aparte-product__title {\\n display: -webkit-box;\\n overflow: hidden;\\n -webkit-box-orient: vertical;\\n -webkit-line-clamp: 2;\\n line-clamp: 2;\\n font-size: var(--aparte-font-size-md);\\n font-weight: var(--aparte-font-weight-medium);\\n line-height: 1.3;\\n overflow-wrap: anywhere;\\n}\\n\\n.aparte-product__price {\\n display: flex;\\n flex-wrap: wrap;\\n align-items: baseline;\\n gap: var(--aparte-space-1) var(--aparte-space-3);\\n font-variant-numeric: tabular-nums;\\n}\\n\\n.aparte-product__now {\\n color: var(--aparte-product-price-color);\\n font-size: var(--aparte-font-size-lg);\\n font-weight: var(--aparte-font-weight-bold);\\n letter-spacing: -0.01em;\\n white-space: nowrap;\\n}\\n\\n.aparte-product__was {\\n color: var(--aparte-text-muted);\\n font-size: var(--aparte-font-size-sm);\\n text-decoration-thickness: 1px;\\n white-space: nowrap;\\n}\\n\\n.aparte-product__price .aparte-product__discount { align-self: center; }\\n\\n/* Stock: a dot in the state's colour, the word in its readable ink. */\\n.aparte-product__stock {\\n --aparte-product-stock-tone: var(--aparte-neutral);\\n --aparte-product-stock-ink: var(--aparte-text-muted);\\n display: inline-flex;\\n align-items: center;\\n gap: var(--aparte-space-2);\\n min-inline-size: 0;\\n color: var(--aparte-product-stock-ink);\\n font-size: var(--aparte-font-size-xs);\\n font-weight: var(--aparte-font-weight-medium);\\n}\\n\\n.aparte-product__stock[data-availability=\\\"in-stock\\\"] { --aparte-product-stock-tone: var(--aparte-success); --aparte-product-stock-ink: var(--aparte-success-ink); }\\n.aparte-product__stock[data-availability=\\\"low-stock\\\"] { --aparte-product-stock-tone: var(--aparte-warning); --aparte-product-stock-ink: var(--aparte-warning-ink); }\\n.aparte-product__stock[data-availability=\\\"out-of-stock\\\"] { --aparte-product-stock-tone: var(--aparte-error); --aparte-product-stock-ink: var(--aparte-error-ink); }\\n.aparte-product__stock[data-availability=\\\"preorder\\\"] { --aparte-product-stock-tone: var(--aparte-info); --aparte-product-stock-ink: var(--aparte-info-ink); }\\n\\n.aparte-product__dot {\\n flex: none;\\n inline-size: 0.4375rem;\\n block-size: 0.4375rem;\\n border-radius: var(--aparte-radius-full);\\n background: var(--aparte-product-stock-tone);\\n box-shadow: 0 0 0 3px color-mix(in oklab, var(--aparte-product-stock-tone) 20%, transparent);\\n}\\n\\n.aparte-product__stock-text {\\n overflow: hidden;\\n text-overflow: ellipsis;\\n white-space: nowrap;\\n}\\n\\n.aparte-product__shipping {\\n display: inline-flex;\\n align-items: center;\\n gap: var(--aparte-space-2);\\n min-inline-size: 0;\\n color: var(--aparte-text-muted);\\n font-size: var(--aparte-font-size-xs);\\n --aparte-rich-card-glyph-size: 1rem;\\n}\\n\\n.aparte-product__shipping[data-free] {\\n color: var(--aparte-success-ink);\\n font-weight: var(--aparte-font-weight-medium);\\n}\\n\\n.aparte-product__shipping-icon:dir(rtl) { transform: scaleX(-1); }\\n\\n/* Buttons sit above the link that covers the product. */\\n.aparte-product__actions {\\n position: relative;\\n z-index: 1;\\n display: flex;\\n flex-wrap: wrap;\\n gap: var(--aparte-space-2);\\n}\\n\\n/* ── card: the tile ──────────────────────────────────────────────────── */\\n\\n.aparte-product--tile {\\n display: flex;\\n flex-direction: column;\\n gap: var(--aparte-space-4);\\n padding: var(--aparte-space-3) var(--aparte-space-3) var(--aparte-space-4);\\n border-radius: var(--aparte-card-radius);\\n}\\n\\n.aparte-product--tile .aparte-product__body { padding-inline: var(--aparte-space-2); }\\n\\n/* Two lines held even when the name takes one, so the prices in a row line up. */\\n.aparte-product--tile .aparte-product__title { min-block-size: 2lh; }\\n\\n/* The price sits at the foot of the tile, level with its neighbours'. */\\n.aparte-product--tile .aparte-product__price {\\n margin-block-start: auto;\\n padding-block-start: var(--aparte-space-1);\\n}\\n\\n.aparte-product--tile .aparte-product__actions { padding-inline: var(--aparte-space-2); }\\n.aparte-product--tile .aparte-product__action { flex: 1 1 auto; justify-content: center; }\\n\\n/* A tile alone, the one product of an answer: a square photo the width of a chat column is\\n taller than the chat's view, and without a photo the square held nothing. A landscape frame,\\n and a low band when there is no picture; in a row of tiles they stay square and level. */\\n.aparte-product--tile:not(:is(.aparte-product__collection, .aparte-product__more) .aparte-product--tile) .aparte-product__media {\\n aspect-ratio: 4 / 3;\\n}\\n\\n.aparte-product--tile:not(:is(.aparte-product__collection, .aparte-product__more) .aparte-product--tile) .aparte-product__media[data-empty] {\\n aspect-ratio: 3 / 1;\\n}\\n\\n.aparte-product__collection .aparte-product--tile,\\n.aparte-product__more .aparte-product--tile {\\n border: var(--aparte-border-width) solid var(--aparte-border);\\n background: var(--aparte-surface-1);\\n transition:\\n border-color var(--aparte-duration-base) ease,\\n box-shadow var(--aparte-duration-base) ease,\\n translate var(--aparte-duration-base) ease;\\n}\\n\\n.aparte-product__collection .aparte-product--tile[data-linked]:hover,\\n.aparte-product__more .aparte-product--tile[data-linked]:hover {\\n border-color: var(--aparte-product-hover-border);\\n box-shadow: var(--aparte-product-hover-shadow);\\n translate: 0 -2px;\\n}\\n\\n/* A mini tile: the others under a detail. */\\n.aparte-product--mini {\\n gap: var(--aparte-space-3);\\n padding: var(--aparte-space-2) var(--aparte-space-2) var(--aparte-space-3);\\n}\\n\\n.aparte-product--mini .aparte-product__body { gap: var(--aparte-space-1); }\\n.aparte-product--mini .aparte-product__title { font-size: var(--aparte-font-size-sm); }\\n.aparte-product--mini .aparte-product__now { font-size: var(--aparte-font-size-md); }\\n.aparte-product--mini .aparte-product__was { font-size: var(--aparte-font-size-xs); }\\n\\n/* ── compact: the rows ───────────────────────────────────────────────── */\\n\\n/* On the drawn card only: a one-line state shrinks to its words, and a size container\\n cannot. */\\n.aparte-product-card[data-variant=\\\"compact\\\"][data-state=\\\"ready\\\"] {\\n container: aparte-product-rows / inline-size;\\n}\\n\\n.aparte-product__rows {\\n margin: 0;\\n padding: var(--aparte-space-2) 0;\\n list-style: none;\\n}\\n\\n/* A divider starting after the thumbnail, the way a settings list draws it. */\\n.aparte-product__item { position: relative; }\\n\\n.aparte-product__item + .aparte-product__item::before {\\n content: \\\"\\\";\\n position: absolute;\\n inset-block-start: 0;\\n inset-inline: calc(var(--aparte-space-6) + var(--aparte-product-thumb-size) + var(--aparte-space-5)) var(--aparte-space-6);\\n border-block-start: var(--aparte-border-width) solid var(--aparte-border);\\n}\\n\\n.aparte-product--row {\\n display: grid;\\n grid-template-columns: var(--aparte-product-thumb-size) minmax(0, 1fr) auto;\\n align-items: center;\\n column-gap: var(--aparte-space-5);\\n padding: var(--aparte-space-4) var(--aparte-space-6);\\n transition: background-color var(--aparte-duration-fast) ease;\\n}\\n\\n.aparte-product--row:has(> .aparte-product__actions) {\\n grid-template-columns: var(--aparte-product-thumb-size) minmax(0, 1fr) auto auto;\\n}\\n\\n.aparte-product--row[data-linked]:hover { background: var(--aparte-surface-2); }\\n\\n.aparte-product__thumb {\\n inline-size: var(--aparte-product-thumb-size);\\n --aparte-product-media-radius: var(--aparte-radius-md);\\n --aparte-product-image-inset: 4%;\\n}\\n\\n.aparte-product__thumb .aparte-product__placeholder { --aparte-rich-card-glyph-size: 45%; }\\n\\n.aparte-product__main {\\n display: flex;\\n flex-direction: column;\\n gap: var(--aparte-space-1);\\n min-inline-size: 0;\\n}\\n\\n.aparte-product__meta {\\n display: flex;\\n flex-wrap: wrap;\\n align-items: center;\\n gap: var(--aparte-space-1) var(--aparte-space-3);\\n min-inline-size: 0;\\n color: var(--aparte-text-muted);\\n font-size: var(--aparte-font-size-xs);\\n}\\n\\n.aparte-product__meta .aparte-rich-card__rating { font-size: var(--aparte-font-size-xs); }\\n\\n.aparte-product--row .aparte-product__price {\\n flex-direction: column;\\n align-items: flex-end;\\n gap: 0;\\n text-align: end;\\n}\\n\\n.aparte-product--row .aparte-product__now { font-size: var(--aparte-font-size-base); }\\n.aparte-product--row .aparte-product__was { font-size: var(--aparte-font-size-xs); }\\n\\n/* On a narrow card a row's button goes under its name rather than squeeze it. */\\n@container aparte-product-rows (max-width: 24rem) {\\n .aparte-product--row:has(> .aparte-product__actions) {\\n grid-template-columns: var(--aparte-product-thumb-size) minmax(0, 1fr) auto;\\n }\\n\\n .aparte-product--row > .aparte-product__actions {\\n grid-column: 2 / -1;\\n margin-block-start: var(--aparte-space-3);\\n }\\n}\\n\\n/* ── detail: one product at length ───────────────────────────────────── */\\n\\n.aparte-product__detail {\\n container: aparte-product-detail / inline-size;\\n}\\n\\n.aparte-product--detail {\\n display: grid;\\n gap: var(--aparte-space-6);\\n padding: var(--aparte-space-6);\\n}\\n\\n.aparte-product--detail .aparte-product__media,\\n.aparte-product--detail .aparte-product__sk-media {\\n aspect-ratio: 4 / 3;\\n}\\n\\n/* No picture: a low band for the glyph, not a frame the size of a photo that is not there. */\\n.aparte-product--detail .aparte-product__media[data-empty] {\\n aspect-ratio: 3 / 1;\\n}\\n\\n.aparte-product__media-link {\\n display: block;\\n border-radius: var(--aparte-product-media-radius);\\n}\\n\\n.aparte-product--detail .aparte-product__body { gap: var(--aparte-space-3); }\\n\\n/* The clamp clips what overflows it, the focus ring included: the padding gives the ring\\n room inside, and the margin takes that room back from the layout. */\\n.aparte-product--detail .aparte-product__title {\\n -webkit-line-clamp: 4;\\n line-clamp: 4;\\n margin: calc(var(--aparte-space-2) * -1);\\n padding: var(--aparte-space-2);\\n font-size: var(--aparte-font-size-lg);\\n font-weight: var(--aparte-font-weight-semibold);\\n}\\n\\n.aparte-product--detail .aparte-product__link:hover { text-decoration: underline; text-underline-offset: 0.18em; }\\n\\n.aparte-product--detail .aparte-product__link:focus-visible {\\n border-radius: var(--aparte-radius-xs);\\n outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);\\n outline-offset: var(--aparte-focus-outline-offset);\\n}\\n\\n.aparte-product--detail .aparte-product__now { font-size: var(--aparte-font-size-2xl); }\\n.aparte-product--detail .aparte-product__was { font-size: var(--aparte-font-size-md); }\\n\\n.aparte-product__facts {\\n display: flex;\\n flex-wrap: wrap;\\n align-items: center;\\n gap: var(--aparte-space-2) var(--aparte-space-6);\\n}\\n\\n.aparte-product__description {\\n display: -webkit-box;\\n margin: 0;\\n overflow: hidden;\\n -webkit-box-orient: vertical;\\n -webkit-line-clamp: 3;\\n line-clamp: 3;\\n color: var(--aparte-text-muted);\\n font-size: var(--aparte-font-size-sm);\\n line-height: 1.5;\\n overflow-wrap: anywhere;\\n}\\n\\n.aparte-product__options {\\n display: flex;\\n flex-wrap: wrap;\\n gap: var(--aparte-space-2);\\n margin: 0;\\n padding: 0;\\n list-style: none;\\n}\\n\\n.aparte-product__option--more { color: var(--aparte-text-muted); }\\n\\n.aparte-product--detail .aparte-product__actions { margin-block-start: var(--aparte-space-2); }\\n.aparte-product--detail .aparte-product__action { flex: 1 1 8rem; justify-content: center; }\\n\\n@container aparte-product-detail (min-width: 30rem) {\\n .aparte-product--detail {\\n grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);\\n align-items: start;\\n gap: var(--aparte-space-7);\\n }\\n\\n .aparte-product--detail .aparte-product__media,\\n .aparte-product--detail .aparte-product__sk-media {\\n aspect-ratio: 1;\\n }\\n}\\n\\n/* The others, under the detail. */\\n.aparte-product__more {\\n --aparte-product-tile-size: 9.5rem;\\n padding: var(--aparte-space-5) var(--aparte-space-6) var(--aparte-space-6);\\n border-block-start: var(--aparte-border-width) solid var(--aparte-border);\\n background: color-mix(in oklab, var(--aparte-surface-2) 45%, var(--aparte-surface-1));\\n}\\n\\n.aparte-product__more-title {\\n margin-block-end: var(--aparte-space-4);\\n color: var(--aparte-text-muted);\\n font-size: var(--aparte-font-size-sm);\\n font-weight: var(--aparte-font-weight-semibold);\\n}\\n\\n/* ── Loading ─────────────────────────────────────────────────────────── */\\n\\n.aparte-product__sk-track {\\n display: grid;\\n grid-auto-flow: column;\\n grid-auto-columns: var(--aparte-product-tile-size);\\n column-gap: var(--aparte-space-4);\\n overflow: hidden;\\n}\\n\\n.aparte-product-card .aparte-product__sk-media {\\n block-size: auto;\\n aspect-ratio: 1;\\n border-radius: var(--aparte-product-media-radius);\\n}\\n\\n.aparte-product-card .aparte-product__sk-thumb {\\n inline-size: var(--aparte-product-thumb-size);\\n block-size: auto;\\n aspect-ratio: 1;\\n border-radius: var(--aparte-radius-md);\\n}\\n\\n.aparte-product-card .aparte-product__sk-line--short { inline-size: 60%; }\\n\\n.aparte-product-card .aparte-product__sk-price {\\n inline-size: 4.5rem;\\n block-size: 1.125rem;\\n margin-block-start: auto;\\n}\\n\\n.aparte-product--row .aparte-product__sk-price { margin-block-start: 0; }\\n\\n/* ── Small screens, motion ───────────────────────────────────────────── */\\n\\n@media (max-width: 380px) {\\n .aparte-product-card { --aparte-product-tile-size: 10.75rem; --aparte-product-thumb-size: 3rem; }\\n .aparte-product--row { column-gap: var(--aparte-space-4); padding-inline: var(--aparte-space-5); }\\n .aparte-product__item + .aparte-product__item::before {\\n inset-inline: calc(var(--aparte-space-5) + var(--aparte-product-thumb-size) + var(--aparte-space-4)) var(--aparte-space-5);\\n }\\n .aparte-product--detail { padding: var(--aparte-space-5); }\\n .aparte-product__more { padding-inline: var(--aparte-space-5); }\\n}\\n\\n/* The kit stops every transition under reduced motion; the hover's lift and zoom are\\n end states, not transitions, so they are taken out here. */\\n@media (prefers-reduced-motion: reduce) {\\n .aparte-product__collection .aparte-product--tile[data-linked]:hover,\\n .aparte-product__more .aparte-product--tile[data-linked]:hover { translate: none; }\\n\\n .aparte-product[data-linked]:hover .aparte-product__image,\\n .aparte-product__media-link:hover .aparte-product__image { scale: none; }\\n}\\n\"", "/**\n * @aparte/plugin-cards/product — a tool's products, drawn as cards.\n *\n * import { setupProductCard } from '@aparte/plugin-cards/product';\n *\n * setupProductCard({\n * tool: 'search_products',\n * map: (result) => ({ title: result.query, products: result.items }),\n * });\n *\n * Three variants of one card: `card` (a tile — the photo, the shop, the name, the stars,\n * the price; several products are a row of tiles that scrolls), `compact` (a row per\n * product, to scan) and `detail` (one product at length, the others in a small row under\n * it). Your tool keeps its own fields: `readProducts` already reads the usual spellings —\n * `name` or `title`, a price as `49.9`, `\"49.90\"` or `\"49,90 € TTC\"`, schema.org's `offers`\n * and `aggregateRating`, a Google Shopping result's `extracted_price` and `source`, a Shopify\n * product from the Admin API (`variants`, `body_html`) or the Storefront API (`priceRange`,\n * `onlineStoreUrl`) — and `map` covers the rest.\n */\nimport type { AparteConfig } from '@aparte/core';\nimport { defineCard, type CardAction, type CardContext, type CardSetupOptions } from '../kit/define.js';\nimport { el, glyph, num, str, webUrl } from '../kit/dom.js';\nimport { carousel } from '../kit/carousel.js';\nimport { currencyCode, formatNumber, formatPercent, formatPrice, readPriceText } from '../kit/format.js';\nimport { rating } from '../kit/rating.js';\nimport { word, type CardWord } from '../kit/strings.js';\nimport { BAG, SEARCH, TAG, TRUCK } from './icons.js';\nimport productStyles from './product.css?raw';\n\nexport type ProductVariant = 'card' | 'compact' | 'detail';\n\n/** Where a product stands; anything else a tool writes is shown as it wrote it. */\nexport type ProductAvailability = 'in-stock' | 'low-stock' | 'out-of-stock' | 'preorder';\n\n/**\n * One product as `map` returns it. Only `title` is needed; every other field adds a line\n * when it is there and nothing when it is not.\n */\nexport interface ProductInput {\n title: string;\n /** An `http(s)` URL, or `{ src, alt }`. Anything else is no photo. */\n image?: string | { src: string; alt?: string };\n /** `49.9`, or a string a shop writes: `\"49.90\"`, `\"$49.90\"`, `\"49,90 €\"`. */\n price?: number | string;\n /** An ISO 4217 code (`EUR`) or a usual symbol (`€`). */\n currency?: string;\n /** The price before the sale: struck through, and the discount computed from it. */\n compareAtPrice?: number | string;\n /** 0–5. */\n rating?: number;\n reviewCount?: number;\n availability?: ProductAvailability | string;\n merchant?: string;\n /** The shop's logo, small, before its name. */\n merchantLogo?: string;\n /** A word over the photo: \"Bestseller\", \"New\". */\n badge?: string;\n /** Sizes, colours: drawn as chips in `detail`. */\n options?: string[];\n /** A line of your own (\"Delivered tomorrow\"), or a cost — `0` reads \"Free delivery\". */\n shipping?: string | number;\n /** A few lines, in `detail`. Tags are stripped: it is shown as text. */\n description?: string;\n /** Where the product's name and photo link to; `http(s)` only. */\n url?: string;\n /** Your own id, handed back with the product in `aparte-card-action`. */\n id?: string;\n /**\n * At most two buttons per product, each a link (`http(s)`) or an `id`, reporting the\n * product as its `data`. A `send` is dropped: a result never writes the person's next\n * message — send one from your `aparte-card-action` listener, or the card's `actions`.\n */\n actions?: CardAction[];\n}\n\n/** What `map` returns: one product, a list, or a list with a heading. */\nexport type ProductsInput = ProductInput | ProductInput[] | { title?: string; products: ProductInput[] };\n\n/** One product as the card draws it, once read. */\nexport interface Product {\n id?: string;\n title: string;\n image?: { src: string; alt?: string };\n price?: number;\n /** An ISO 4217 code. */\n currency?: string;\n /** Kept only when it is above `price`: a \"was\" price lower than the price is no sale. */\n compareAtPrice?: number;\n rating?: number;\n reviewCount?: number;\n /** One of the four, or the tool's own words. */\n availability?: { status: ProductAvailability } | { text: string };\n merchant?: string;\n merchantLogo?: string;\n badge?: string;\n options: string[];\n shipping?: { text: string } | { cost: number };\n description?: string;\n url?: string;\n actions: CardAction[];\n}\n\n/** The data as the card draws it. */\nexport interface ProductData {\n /** The heading over several products (\"Trail shoes under €100\"). */\n title?: string;\n products: Product[];\n}\n\nconst P = {\n cardsProductTitle: { en: 'Products', fr: 'Produits', de: 'Produkte', es: 'Productos', it: 'Prodotti', ja: '商品', ko: '상품', pt: 'Produtos', ru: 'Товары', zh: '商品' },\n cardsProductCount: { en: '{n} products', fr: '{n} produits', de: '{n} Produkte', es: '{n} productos', it: '{n} prodotti', ja: '{n}件の商品', ko: '상품 {n}개', pt: '{n} produtos', ru: 'Товаров: {n}', zh: '{n} 件商品' },\n cardsProductInStock: { en: 'In stock', fr: 'En stock', de: 'Auf Lager', es: 'En stock', it: 'Disponibile', ja: '在庫あり', ko: '재고 있음', pt: 'Em estoque', ru: 'В наличии', zh: '有货' },\n cardsProductLowStock: { en: 'Only a few left', fr: 'Plus que quelques-uns', de: 'Nur noch wenige', es: 'Quedan pocas unidades', it: 'Ultimi pezzi', ja: '残りわずか', ko: '품절 임박', pt: 'Últimas unidades', ru: 'Осталось мало', zh: '仅剩少量' },\n cardsProductOutOfStock: { en: 'Out of stock', fr: 'Rupture de stock', de: 'Ausverkauft', es: 'Agotado', it: 'Esaurito', ja: '在庫切れ', ko: '품절', pt: 'Esgotado', ru: 'Нет в наличии', zh: '缺货' },\n cardsProductPreorder: { en: 'Pre-order', fr: 'Précommande', de: 'Vorbestellbar', es: 'Preventa', it: 'Preordine', ja: '予約受付中', ko: '예약 판매', pt: 'Pré-venda', ru: 'Предзаказ', zh: '预售' },\n cardsProductWas: { en: 'Was', fr: 'Au lieu de', de: 'Statt', es: 'Antes', it: 'Prima', ja: '通常価格', ko: '정가', pt: 'De', ru: 'Было', zh: '原价' },\n cardsProductFreeShipping: { en: 'Free delivery', fr: 'Livraison gratuite', de: 'Kostenloser Versand', es: 'Envío gratis', it: 'Spedizione gratuita', ja: '送料無料', ko: '무료 배송', pt: 'Frete grátis', ru: 'Бесплатная доставка', zh: '免运费' },\n cardsProductShippingCost: { en: '{price} delivery', fr: 'Livraison {price}', de: 'Versand {price}', es: 'Envío {price}', it: 'Spedizione {price}', ja: '送料 {price}', ko: '배송비 {price}', pt: 'Frete {price}', ru: 'Доставка {price}', zh: '运费 {price}' },\n cardsProductOptions: { en: 'Options', fr: 'Options', de: 'Optionen', es: 'Opciones', it: 'Opzioni', ja: 'オプション', ko: '옵션', pt: 'Opções', ru: 'Варианты', zh: '可选项' },\n cardsProductMoreOptions: { en: '{n} more', fr: '{n} de plus', de: '{n} weitere', es: '{n} más', it: 'altri {n}', ja: 'ほか{n}件', ko: '{n}개 더', pt: 'mais {n}', ru: 'ещё {n}', zh: '还有 {n} 个' },\n cardsProductMore: { en: 'More options', fr: 'Autres choix', de: 'Weitere Angebote', es: 'Más opciones', it: 'Altre proposte', ja: 'その他の候補', ko: '다른 상품', pt: 'Mais opções', ru: 'Другие варианты', zh: '更多选择' },\n} satisfies Record<string, CardWord>;\n\nconst STOCK_WORD: Record<ProductAvailability, keyof typeof P> = {\n 'in-stock': 'cardsProductInStock',\n 'low-stock': 'cardsProductLowStock',\n 'out-of-stock': 'cardsProductOutOfStock',\n preorder: 'cardsProductPreorder',\n};\n\n/** Ten: past that a row of tiles is a catalogue, not an answer (3–8 is the comfortable range). */\nconst PRODUCTS_SHOWN = 10;\nconst OPTIONS_SHOWN = 6;\nconst ACTIONS_PER_PRODUCT = 2;\n\n// ── Reading ──────────────────────────────────────────────────────────────────\n\ntype Raw = Record<string, unknown>;\n\nconst isObject = (value: unknown): value is Raw => !!value && typeof value === 'object' && !Array.isArray(value);\n\n/** The first of `keys` that `r` has a value for. */\nfunction pick(r: Raw | undefined, keys: readonly string[]): unknown {\n if (!r) return undefined;\n for (const key of keys) if (r[key] !== undefined && r[key] !== null) return r[key];\n return undefined;\n}\n\n/** A list from an array or a GraphQL connection (`{ nodes }`, `{ edges }`) — Shopify's Storefront API returns the latter. */\nfunction listOf(value: unknown): unknown[] {\n if (Array.isArray(value)) return value;\n if (!isObject(value)) return [];\n if (Array.isArray(value['nodes'])) return value['nodes'];\n if (Array.isArray(value['edges'])) return value['edges'].map((e) => (isObject(e) ? e['node'] : undefined));\n return [];\n}\n\n/** An amount and its currency, from a number, a shop's text, or `{ amount, currencyCode }`. */\nfunction readMoney(value: unknown): { amount?: number; currency?: string } {\n if (typeof value === 'number') return { amount: Number.isFinite(value) && value >= 0 ? value : undefined };\n if (typeof value === 'string') {\n // A price is not negative: a minus in a shop's text is not this price's.\n const { amount, currency } = readPriceText(value);\n return { amount: amount === undefined ? undefined : Math.abs(amount), currency };\n }\n if (isObject(value)) {\n return {\n amount: readMoney(pick(value, ['amount', 'value', 'price'])).amount,\n currency: currencyCode(pick(value, ['currencyCode', 'currency_code', 'currency'])),\n };\n }\n return {};\n}\n\nfunction readImage(value: unknown): Product['image'] {\n if (Array.isArray(value)) {\n for (const item of value) {\n const image = readImage(item);\n if (image) return image;\n }\n return undefined;\n }\n if (isObject(value)) {\n // schema.org's ImageObject keeps its address in `contentUrl`.\n const src = webUrl(pick(value, ['src', 'url', 'contentUrl', 'href', 'large', 'medium', 'thumbnail']));\n const alt = str(pick(value, ['alt', 'altText', 'alt_text']));\n return src ? { src, ...(alt ? { alt } : {}) } : undefined;\n }\n const src = webUrl(value);\n return src ? { src } : undefined;\n}\n\n/** schema.org's ItemAvailability names and the usual shop words, squeezed to letters. */\nconst AVAILABILITY: Record<string, ProductAvailability> = {\n instock: 'in-stock', available: 'in-stock', instoreonly: 'in-stock', onlineonly: 'in-stock',\n lowstock: 'low-stock', limitedavailability: 'low-stock', fewleft: 'low-stock',\n outofstock: 'out-of-stock', soldout: 'out-of-stock', unavailable: 'out-of-stock', discontinued: 'out-of-stock',\n preorder: 'preorder', presale: 'preorder', backorder: 'preorder',\n};\n\nfunction readAvailability(r: Raw, offer: Raw | undefined): Product['availability'] {\n const value = pick(r, ['availability', 'stockStatus', 'stock_status']) ?? pick(offer, ['availability']);\n if (typeof value === 'string' && value.trim()) {\n // `https://schema.org/InStock`, `schema:InStock` (a JSON-LD prefix), `InStock`: one key.\n const key = value.trim().toLowerCase().replace(/^(?:https?:\\/\\/schema\\.org\\/|schema:)/, '').replace(/[^a-z]/g, '');\n const status = AVAILABILITY[key];\n return status ? { status } : { text: value.trim() };\n }\n const flag = typeof value === 'boolean' ? value : pick(r, ['inStock', 'in_stock', 'available']);\n if (typeof flag === 'boolean') return { status: flag ? 'in-stock' : 'out-of-stock' };\n return undefined;\n}\n\nfunction readRating(r: Raw): { rating?: number; reviewCount?: number } {\n const aggregate = isObject(r['aggregateRating']) ? r['aggregateRating'] : undefined;\n let value = pick(r, ['rating', 'stars', 'ratingValue', 'rating_value', 'averageRating', 'average_rating']) ?? pick(aggregate, ['ratingValue']);\n let count = pick(r, ['reviewCount', 'review_count', 'reviews', 'reviewsCount', 'reviews_count', 'ratingCount', 'rating_count', 'numReviews'])\n ?? pick(aggregate, ['reviewCount', 'ratingCount']);\n // `{ rate, count }`, as the Fake Store API and others nest it.\n if (isObject(value)) {\n count ??= pick(value, ['count', 'reviews']);\n value = pick(value, ['rate', 'value', 'average']);\n }\n if (Array.isArray(count)) count = count.length;\n // schema.org names the scale with `bestRating` (5 when missing): 4 out of 10 is two stars, not four.\n const best = num(pick(r, ['bestRating', 'best_rating']) ?? pick(aggregate, ['bestRating']));\n const given = num(value);\n const stars = given !== undefined && best !== undefined && best > 0 && given <= best ? (given * 5) / best : given;\n const reviews = num(count);\n return {\n // A value off the five-star scale is another scale, not a five: drawn as none.\n rating: stars !== undefined && stars >= 0 && stars <= 5 ? stars : undefined,\n reviewCount: reviews !== undefined && reviews >= 0 ? Math.floor(reviews) : undefined,\n };\n}\n\n/** Shopify's name for the one variant of a product that has none. */\nconst NO_VARIANT = 'Default Title';\n\nfunction readOptions(r: Raw): string[] {\n const out: string[] = [];\n const add = (value: unknown) => {\n const s = str(value);\n if (s && s !== NO_VARIANT && !out.includes(s)) out.push(s);\n };\n // A shop's variants are its options combined (\"Pink / M\"): beside the options they would\n // say each value a second time, in another chip.\n const keys = Array.isArray(r['options']) ? ['options', 'sizes', 'colors', 'colours'] : ['sizes', 'colors', 'colours', 'variants'];\n for (const key of keys) {\n for (const item of listOf(r[key])) {\n if (!isObject(item)) add(item);\n // Shopify's `{ name: 'Size', values: ['S', 'M'] }`: the values are the choices.\n else if (Array.isArray(item['values'])) item['values'].forEach(add);\n else add(pick(item, ['title', 'name', 'value', 'label']));\n }\n }\n return out.slice(0, 50);\n}\n\nfunction readShipping(r: Raw): Product['shipping'] {\n if (r['freeShipping'] === true || r['free_shipping'] === true) return { cost: 0 };\n let value = pick(r, ['shipping', 'delivery', 'shippingInfo', 'shipping_info']);\n if (isObject(value)) value = pick(value, ['text', 'label', 'description']) ?? pick(value, ['cost', 'price', 'amount']);\n if (typeof value === 'number') return Number.isFinite(value) && value >= 0 ? { cost: value } : undefined;\n const text = str(value);\n if (!text) return undefined;\n const cost = num(text);\n return cost !== undefined && cost >= 0 ? { cost } : { text };\n}\n\n/**\n * A product's own buttons, as the result gave them: a link (`http(s)`) or an `id` your\n * `aparte-card-action` listener handles. Never a `send`: the result is the tool's — a shop's\n * page, a feed, a model — and a button that posts its text as the person's next message lets\n * that text speak for them, a lever for prompt injection. A message is the app's to write: in\n * its listener, from the product the event carries, or in the card's `actions` option.\n */\nfunction readActions(value: unknown): CardAction[] {\n if (!Array.isArray(value)) return [];\n return value\n .map((a): CardAction | null => {\n const label = isObject(a) ? str(a['label']) : undefined;\n if (!label) return null;\n const url = a['url'] !== undefined ? webUrl(a['url']) : undefined;\n if (url === null) return null;\n const id = str(a['id']);\n if (!url && !id) return null;\n return { label, ...(url ? { url } : {}), ...(id ? { id } : {}), ...(a['primary'] === true ? { primary: true } : {}) };\n })\n .filter((a): a is CardAction => a !== null)\n .slice(0, ACTIONS_PER_PRODUCT);\n}\n\n/** HTML's usual entities, once its tags are out: `&amp;` is `&`. One pass, so `&amp;lt;` stays `&lt;`. */\nconst ENTITIES: Record<string, string> = { amp: '&', lt: '<', gt: '>', quot: '\"', apos: '\\'', nbsp: ' ' };\nfunction decodeEntities(text: string): string {\n return text.replace(/&(#x[0-9a-f]+|#\\d+|[a-z]+);/gi, (whole, name: string) => {\n if (name.startsWith('#')) {\n const code = /^#x/i.test(name) ? parseInt(name.slice(2), 16) : Number(name.slice(1));\n return code > 0 && code <= 0x10ffff ? String.fromCodePoint(code) : whole;\n }\n return ENTITIES[name.toLowerCase()] ?? whole;\n });\n}\n\n/** The markup a shop writes a description in (Shopify's `body_html`), as the words a reader sees. */\nfunction plainText(html: string): string {\n return decodeEntities(html.replace(/<\\/?(?:br|p|li|div|h\\d)(?=[\\s/>])[^>]*>/gi, ' ').replace(/<[^>]*>/g, '')).replace(/\\s+/g, ' ').trim();\n}\n\ntype Money = ReturnType<typeof readMoney>;\n\n/**\n * The cheapest of a product's variants, with the price it replaces — where Shopify's Admin\n * API keeps a product's price (`variants[].price`, `compare_at_price`).\n */\nfunction cheapestVariant(r: Raw): { price: Money; compare: Money } | undefined {\n let best: { price: Money; compare: Money } | undefined;\n for (const v of listOf(r['variants'])) {\n if (!isObject(v)) continue;\n const price = readMoney(pick(v, ['price', 'amount']));\n if (price.amount === undefined) continue;\n if (!best || price.amount < best.price.amount!) best = { price, compare: readMoney(pick(v, ['compare_at_price', 'compareAtPrice'])) };\n }\n return best;\n}\n\n/** The low end of Shopify's Storefront range, `{ minVariantPrice: { amount, currencyCode } }`. */\nconst lowEnd = (range: unknown) => (isObject(range) ? range['minVariantPrice'] : undefined);\n\n/** One product from whatever a tool wrote, or `null` without a name to show. */\nfunction readProduct(raw: unknown): Product | null {\n if (!isObject(raw)) return null;\n const r = raw;\n const title = str(pick(r, ['title', 'name', 'productName', 'product_title']));\n if (!title) return null;\n // schema.org puts the price, the currency, the stock and the link on an offer.\n const offers = r['offers'];\n const offer = Array.isArray(offers) ? (isObject(offers[0]) ? offers[0] : undefined) : isObject(offers) ? offers : undefined;\n\n // A price of its own, an offer's, Shopify Storefront's range — else its cheapest variant's.\n const own = pick(r, ['price', 'extracted_price', 'salePrice', 'sale_price', 'currentPrice', 'current_price'])\n ?? pick(offer, ['price', 'lowPrice']) ?? lowEnd(r['priceRange']);\n const variant = own === undefined ? cheapestVariant(r) : undefined;\n const price = variant ? variant.price : readMoney(own);\n const compareOwn = pick(r, [\n 'compareAtPrice', 'compare_at_price', 'originalPrice', 'original_price', 'listPrice', 'list_price',\n 'regularPrice', 'regular_price', 'wasPrice', 'was_price', 'extracted_old_price', 'oldPrice', 'old_price', 'msrp',\n ]) ?? lowEnd(r['compareAtPriceRange']);\n const compare = compareOwn === undefined && variant ? variant.compare : readMoney(compareOwn);\n const currency = currencyCode(pick(r, ['currency', 'currency_code', 'currencyCode', 'priceCurrency']) ?? pick(offer, ['priceCurrency']))\n ?? price.currency ?? compare.currency;\n\n const merchantRaw = pick(r, ['merchant', 'seller', 'store', 'shop', 'source', 'retailer', 'vendor']) ?? pick(r, ['brand']);\n const merchant = isObject(merchantRaw) ? str(pick(merchantRaw, ['name', 'title'])) : str(merchantRaw);\n const merchantLogo = webUrl(pick(r, ['merchantLogo', 'merchant_logo', 'source_icon', 'storeLogo', 'logo'])\n ?? (isObject(merchantRaw) ? pick(merchantRaw, ['logo', 'icon', 'image']) : undefined));\n\n const description = str(pick(r, ['description', 'summary', 'snippet', 'subtitle', 'body_html', 'descriptionHtml']));\n const { rating: stars, reviewCount } = readRating(r);\n const availability = readAvailability(r, offer);\n const shipping = readShipping(r);\n const image = readImage(pick(r, ['image', 'images', 'thumbnail', 'image_url', 'imageUrl', 'featuredImage', 'photo']));\n const url = webUrl(pick(r, ['url', 'link', 'permalink', 'product_link', 'productUrl', 'product_url', 'onlineStoreUrl', 'href']) ?? pick(offer, ['url']));\n const id = str(pick(r, ['id', 'sku', 'product_id', 'productId']));\n const badge = str(pick(r, ['badge', 'tag', 'ribbon']));\n\n return {\n title,\n ...(id ? { id } : {}),\n ...(image ? { image } : {}),\n ...(price.amount !== undefined ? { price: price.amount } : {}),\n ...(currency ? { currency } : {}),\n ...(price.amount !== undefined && compare.amount !== undefined && compare.amount > price.amount ? { compareAtPrice: compare.amount } : {}),\n ...(stars !== undefined ? { rating: stars } : {}),\n ...(reviewCount !== undefined ? { reviewCount } : {}),\n ...(availability ? { availability } : {}),\n ...(merchant ? { merchant } : {}),\n ...(merchant && merchantLogo ? { merchantLogo } : {}),\n ...(badge ? { badge } : {}),\n options: readOptions(r),\n ...(shipping ? { shipping } : {}),\n // Shown as text, so a tag would show as `<p>`: take the words out of the markup.\n ...(description ? { description: plainText(description) } : {}),\n ...(url ? { url } : {}),\n actions: readActions(r['actions']),\n };\n}\n\n/**\n * The card's data from the loose shape `map` returns — one product, a list, or\n * `{ title, products }` (also `results`, `items`, Google Shopping's `shopping_results`) —\n * or `null` when not one product has a name. At most ten are kept.\n */\nexport function readProducts(raw: unknown): ProductData | null {\n if (!raw || typeof raw !== 'object') return null;\n let list: unknown[];\n let title: string | undefined;\n if (Array.isArray(raw)) {\n list = raw;\n } else {\n const r = raw as Raw;\n const many = ['products', 'results', 'shopping_results', 'items'].map((key) => r[key]).find(Array.isArray);\n if (many) {\n list = many;\n title = str(pick(r, ['title', 'heading']));\n } else {\n list = [r];\n }\n }\n const products = list.map(readProduct).filter((p): p is Product => p !== null).slice(0, PRODUCTS_SHOWN);\n return products.length ? { ...(title ? { title } : {}), products } : null;\n}\n\n/** The share taken off, from the two prices — never read from a tool's \"-20%\". `undefined` under one percent. */\nexport function discountOf(product: Pick<Product, 'price' | 'compareAtPrice'>): number | undefined {\n const { price, compareAtPrice } = product;\n if (price === undefined || compareAtPrice === undefined || compareAtPrice <= price || compareAtPrice <= 0) return undefined;\n const ratio = (compareAtPrice - price) / compareAtPrice;\n return Math.round(ratio * 100) >= 1 ? ratio : undefined;\n}\n\n// ── Drawing ──────────────────────────────────────────────────────────────────\n\nconst money = (config: AparteConfig, product: Product, amount: number) => formatPrice(config, amount, product.currency);\nconst notNull = <T>(value: T | null | undefined): value is T => value !== null && value !== undefined;\n\n/**\n * The photo in its square, over a bag glyph that stays underneath: a missing photo shows\n * the bag, and one that fails to load is hidden to show it — no node comes or goes.\n */\nfunction media(ctx: CardContext, product: Product, className = ''): HTMLElement {\n const frame = el('div', { class: `aparte-product__media${className ? ` ${className}` : ''}` },\n glyph(BAG, 'aparte-rich-card__glyph aparte-product__placeholder'));\n // A photo the policy holds shows the bag, as a product without one does.\n const image = product.image\n ? ctx.image(product.image.src, { class: 'aparte-product__image', attrs: { alt: product.image.alt ?? product.title, loading: 'lazy', decoding: 'async' } })\n : null;\n if (!image) {\n frame.setAttribute('data-empty', '');\n return frame;\n }\n image.addEventListener('error', () => {\n image.hidden = true;\n frame.setAttribute('data-empty', '');\n }, { once: true });\n frame.append(image);\n return frame;\n}\n\n/** The product's name, a link out when it has a URL — the one link a tile or a row has. */\nfunction titleOf(product: Product): HTMLElement {\n const title = el('div', { class: 'aparte-product__title' });\n if (product.url) {\n title.append(el('a', {\n class: 'aparte-product__link',\n attrs: { href: product.url, target: '_blank', rel: 'noopener noreferrer' },\n text: product.title,\n }));\n } else {\n title.textContent = product.title;\n }\n return title;\n}\n\nfunction merchantOf(ctx: CardContext, product: Product): HTMLElement | null {\n if (!product.merchant) return null;\n const node = el('div', { class: 'aparte-product__merchant' });\n // Empty alt: the shop's name is written right beside it. A held logo leaves the name alone.\n const logo = product.merchantLogo ? ctx.image(product.merchantLogo, { class: 'aparte-product__logo', attrs: { alt: '', loading: 'lazy', decoding: 'async' } }) : null;\n if (logo) {\n logo.addEventListener('error', () => { logo.hidden = true; }, { once: true });\n node.append(logo);\n }\n node.append(el('span', { class: 'aparte-product__merchant-name', text: product.merchant }));\n return node;\n}\n\nfunction discountBadge(ctx: CardContext, product: Product): HTMLElement | null {\n const ratio = discountOf(product);\n if (ratio === undefined) return null;\n const badge = el('span', { class: 'aparte-badge aparte-badge--danger aparte-badge--solid aparte-badge--sm aparte-product__discount' });\n ctx.bind(badge, () => `\\u2212${formatPercent(ctx.config, ratio)}`);\n return badge;\n}\n\n/** The price, the \"was\" price struck through after it, and — in `detail` — the discount beside them. */\nfunction priceOf(ctx: CardContext, product: Product, withDiscount = false): HTMLElement | null {\n if (product.price === undefined) return null;\n const row = el('div', { class: 'aparte-product__price' });\n const now = el('span', { class: 'aparte-product__now' });\n ctx.bind(now, () => money(ctx.config, product, product.price!));\n row.append(now);\n if (product.compareAtPrice !== undefined) {\n // A struck-through number is silent to a screen reader: it is told which one this is.\n const said = el('span', { class: 'aparte-sr-only' });\n ctx.bind(said, () => `${word(ctx.config, 'cardsProductWas', P.cardsProductWas)} `);\n const value = el('span', { class: 'aparte-product__was-value' });\n ctx.bind(value, () => money(ctx.config, product, product.compareAtPrice!));\n row.append(el('del', { class: 'aparte-product__was' }, said, value));\n const discount = withDiscount ? discountBadge(ctx, product) : null;\n if (discount) row.append(discount);\n }\n return row;\n}\n\nfunction availabilityOf(ctx: CardContext, product: Product): HTMLElement | null {\n const availability = product.availability;\n if (!availability) return null;\n const status = 'status' in availability ? availability.status : undefined;\n const text = el('span', { class: 'aparte-product__stock-text' });\n if (status) ctx.word(text, STOCK_WORD[status], P[STOCK_WORD[status]]);\n else text.textContent = (availability as { text: string }).text;\n return el('div', { class: 'aparte-product__stock', attrs: { 'data-availability': status ?? 'other' } },\n el('span', { class: 'aparte-product__dot', attrs: { 'aria-hidden': 'true' } }),\n text);\n}\n\nfunction shippingOf(ctx: CardContext, product: Product): HTMLElement | null {\n const shipping = product.shipping;\n if (!shipping) return null;\n const text = el('span', { class: 'aparte-product__shipping-text' });\n if ('text' in shipping) text.textContent = shipping.text;\n else if (shipping.cost === 0) ctx.word(text, 'cardsProductFreeShipping', P.cardsProductFreeShipping);\n else ctx.bind(text, () => word(ctx.config, 'cardsProductShippingCost', P.cardsProductShippingCost, { price: money(ctx.config, product, shipping.cost) }));\n return el('div', { class: 'aparte-product__shipping', attrs: { 'data-free': 'cost' in shipping && shipping.cost === 0 } },\n glyph(TRUCK, 'aparte-rich-card__glyph aparte-product__shipping-icon'),\n text);\n}\n\n/** What sits over the photo's corner: the shop's badge, and the discount where the variant puts it there. */\nfunction flags(ctx: CardContext, product: Product, withDiscount: boolean): HTMLElement | null {\n const items = [\n product.badge ? el('span', { class: 'aparte-badge aparte-badge--sm aparte-product__badge', text: product.badge }) : null,\n withDiscount ? discountBadge(ctx, product) : null,\n ].filter(notNull);\n return items.length ? el('div', { class: 'aparte-product__flags' }, ...items) : null;\n}\n\n/** Sizes, colours: six chips, then \"+n\" for the rest. */\nfunction optionsOf(ctx: CardContext, product: Product): HTMLElement | null {\n if (!product.options.length) return null;\n const list = el('ul', { class: 'aparte-product__options', attrs: { role: 'list' } });\n ctx.bind(list, () => word(ctx.config, 'cardsProductOptions', P.cardsProductOptions), 'aria-label');\n for (const option of product.options.slice(0, OPTIONS_SHOWN)) {\n list.append(el('li', { class: 'aparte-tag aparte-tag--sm aparte-product__option' }, el('span', { class: 'aparte-tag__label', text: option })));\n }\n const rest = product.options.length - OPTIONS_SHOWN;\n if (rest > 0) {\n const shown = el('span', { class: 'aparte-tag__label', attrs: { 'aria-hidden': 'true' } });\n ctx.bind(shown, () => `+${formatNumber(ctx.config, rest)}`);\n const said = el('span', { class: 'aparte-sr-only' });\n ctx.bind(said, () => word(ctx.config, 'cardsProductMoreOptions', P.cardsProductMoreOptions, { n: formatNumber(ctx.config, rest) }));\n list.append(el('li', { class: 'aparte-tag aparte-tag--sm aparte-product__option aparte-product__option--more' }, shown, said));\n }\n return list;\n}\n\n/** A product's own buttons, each handing the product back as the event's `data`. */\nfunction actionsOf(ctx: CardContext, product: Product, max: number): HTMLElement | null {\n const buttons = product.actions.slice(0, max).map((action) => ctx.action(action, product, 'aparte-product__action')).filter(notNull);\n return buttons.length ? el('div', { class: 'aparte-product__actions' }, ...buttons) : null;\n}\n\nfunction productRoot(kind: 'tile' | 'row' | 'detail', product: Product, extra = ''): HTMLElement {\n return el('div', {\n class: `aparte-product aparte-product--${kind}${extra ? ` ${extra}` : ''}`,\n attrs: {\n 'data-availability': product.availability && 'status' in product.availability ? product.availability.status : undefined,\n 'data-linked': product.url !== undefined,\n },\n });\n}\n\n/**\n * The `card` variant's tile. The title's link stretches over the whole tile (the sheet's\n * `::after`), so the tile is one link, read once, with its buttons lifted above it.\n * A `mini` tile — the others under a `detail` — keeps the photo, the name and the price.\n */\nfunction tile(ctx: CardContext, product: Product, { actions, mini = false }: { actions: number; mini?: boolean }): HTMLElement {\n const node = productRoot('tile', product, mini ? 'aparte-product--mini' : '');\n const photo = media(ctx, product);\n const corner = mini ? null : flags(ctx, product, true);\n if (corner) photo.append(corner);\n const body = el('div', { class: 'aparte-product__body' },\n mini ? null : merchantOf(ctx, product),\n titleOf(product),\n mini ? null : rating(ctx, product.rating, { count: product.reviewCount }),\n priceOf(ctx, product),\n mini ? null : availabilityOf(ctx, product));\n node.append(photo, body);\n const buttons = actionsOf(ctx, product, actions);\n if (buttons) node.append(buttons);\n return node;\n}\n\n/**\n * The `compact` variant's row: thumbnail, name, shop and stars, price. \"In stock\" is left\n * out — it is what a reader assumes — so the line only speaks when the stock changes the choice.\n */\nfunction row(ctx: CardContext, product: Product): HTMLElement {\n const node = productRoot('row', product);\n const meta = el('div', { class: 'aparte-product__meta' },\n product.merchant ? el('span', { class: 'aparte-product__merchant-name', text: product.merchant }) : null,\n rating(ctx, product.rating, { starsOnly: true }),\n product.availability && !('status' in product.availability && product.availability.status === 'in-stock') ? availabilityOf(ctx, product) : null);\n const main = el('div', { class: 'aparte-product__main' }, titleOf(product), meta.childNodes.length ? meta : null);\n node.append(media(ctx, product, 'aparte-product__thumb'), main);\n const amount = priceOf(ctx, product);\n if (amount) node.append(amount);\n const buttons = actionsOf(ctx, product, 1);\n if (buttons) node.append(buttons);\n return node;\n}\n\n/** The `detail` variant: everything the card knows, the photo beside it on a wide card. */\nfunction detail(ctx: CardContext, product: Product): HTMLElement {\n const node = productRoot('detail', product);\n const photo = media(ctx, product);\n const corner = flags(ctx, product, false);\n if (corner) photo.append(corner);\n // The photo links where the name does; the name's link is the one a keyboard and a\n // screen reader meet, so this copy is out of both.\n const shown = product.url\n ? el('a', { class: 'aparte-product__media-link', attrs: { href: product.url, target: '_blank', rel: 'noopener noreferrer', tabindex: -1, 'aria-hidden': 'true' } }, photo)\n : photo;\n const facts = el('div', { class: 'aparte-product__facts' }, availabilityOf(ctx, product), shippingOf(ctx, product));\n const body = el('div', { class: 'aparte-product__body' },\n merchantOf(ctx, product),\n titleOf(product),\n rating(ctx, product.rating, { count: product.reviewCount }),\n priceOf(ctx, product, true),\n facts.childNodes.length ? facts : null,\n product.description ? el('p', { class: 'aparte-product__description', text: product.description }) : null,\n optionsOf(ctx, product),\n actionsOf(ctx, product, ACTIONS_PER_PRODUCT));\n node.append(shown, body);\n return el('div', { class: 'aparte-product__detail' }, node);\n}\n\nfunction heading(data: ProductData): HTMLElement | null {\n return data.title ? el('div', { class: 'aparte-product__heading', text: data.title }) : null;\n}\n\nfunction labelOf(data: Partial<ProductData> | null, ctx: CardContext): string {\n const products = data?.products ?? [];\n if (products.length === 1) return products[0]!.title;\n if (data?.title) return data.title;\n if (products.length > 1) return word(ctx.config, 'cardsProductCount', P.cardsProductCount, { n: formatNumber(ctx.config, products.length) });\n return word(ctx.config, 'cardsProductTitle', P.cardsProductTitle);\n}\n\nfunction render(data: ProductData, ctx: CardContext<ProductVariant>): Node[] {\n const { products } = data;\n const first = products[0]!;\n\n if (ctx.variant === 'detail') {\n // One product looked at closely; the others stay one swipe away, small, rather\n // than a second row of full tiles competing with it. Rows were the other choice,\n // but nine rows under a detail make a page, and a row of mini tiles stays one line.\n const out: Node[] = [detail(ctx, first)];\n if (products.length > 1) {\n const title = el('div', { class: 'aparte-product__more-title' });\n ctx.word(title, 'cardsProductMore', P.cardsProductMore);\n const slides = products.slice(1).map((p) => tile(ctx, p, { actions: 0, mini: true }));\n out.push(el('div', { class: 'aparte-product__more' }, title,\n carousel(ctx, slides, { label: () => word(ctx.config, 'cardsProductMore', P.cardsProductMore) })));\n }\n return out;\n }\n\n if (ctx.variant === 'compact') {\n if (products.length === 1) return [row(ctx, first)];\n const list = el('ul', { class: 'aparte-product__rows', attrs: { role: 'list' } },\n ...products.map((p) => el('li', { class: 'aparte-product__item' }, row(ctx, p))));\n return [heading(data), list].filter(notNull);\n }\n\n if (products.length === 1) return [tile(ctx, first, { actions: ACTIONS_PER_PRODUCT })];\n // Several: tiles in a row that scrolls, one button each — a row of tiles reads as a\n // choice when each offers one thing to do.\n const slides = products.map((p) => tile(ctx, p, { actions: 1 }));\n return [el('div', { class: 'aparte-product__collection' },\n heading(data),\n carousel(ctx, slides, { label: () => labelOf(data, ctx) }))];\n}\n\nfunction skeleton(partial: Partial<ProductData> | null, ctx: CardContext<ProductVariant>): Node[] {\n const block = (cls: string, kind: 'text' | 'rect' = 'rect') =>\n el('span', { class: `aparte-skeleton aparte-skeleton--${kind} ${cls}`, attrs: { 'aria-hidden': 'true' } });\n const lines = () => [block('aparte-product__sk-line', 'text'), block('aparte-product__sk-line aparte-product__sk-line--short', 'text')];\n // What the search was for, before anything is found: the call's input already says it.\n const query = partial?.title\n ? el('div', { class: 'aparte-product__query' }, glyph(SEARCH, 'aparte-rich-card__glyph aparte-product__query-icon'), el('span', { class: 'aparte-product__query-text', text: partial.title }))\n : null;\n\n if (ctx.variant === 'compact') {\n const rows = [0, 1, 2].map(() => el('div', { class: 'aparte-product__item' },\n el('div', { class: 'aparte-product aparte-product--row aparte-product--skeleton' },\n block('aparte-product__sk-thumb'),\n el('div', { class: 'aparte-product__main' }, ...lines()),\n block('aparte-product__sk-price', 'text'))));\n return [query, el('div', { class: 'aparte-product__rows' }, ...rows)].filter(notNull);\n }\n if (ctx.variant === 'detail') {\n return [query, el('div', { class: 'aparte-product__detail' },\n el('div', { class: 'aparte-product aparte-product--detail aparte-product--skeleton' },\n block('aparte-product__sk-media'),\n el('div', { class: 'aparte-product__body' }, ...lines(), block('aparte-product__sk-price', 'text'), block('aparte-product__sk-line', 'text'))))].filter(notNull);\n }\n // Three tiles, the third cut by the edge: the shape a row of results will take.\n const tiles = [0, 1, 2].map(() => el('div', { class: 'aparte-product aparte-product--tile aparte-product--skeleton' },\n block('aparte-product__sk-media'),\n el('div', { class: 'aparte-product__body' }, ...lines(), block('aparte-product__sk-price', 'text'))));\n return [el('div', { class: 'aparte-product__collection' }, query, el('div', { class: 'aparte-product__sk-track' }, ...tiles))];\n}\n\nexport const productCard = defineCard<ProductData, ProductVariant>({\n name: 'product',\n variants: ['card', 'compact', 'detail'],\n styles: productStyles,\n icon: TAG,\n normalize: readProducts,\n render,\n skeleton,\n label: labelOf,\n fallback: (data, ctx) => {\n // One line per product, \"Title — price (4.6/5)\", the way a model or a text-only\n // reader would want them listed.\n const lines = data.products.map((p) => {\n const amount = p.price !== undefined ? ` — ${money(ctx.config, p, p.price)}` : '';\n const stars = p.rating !== undefined ? ` (${formatNumber(ctx.config, p.rating, { maximumFractionDigits: 1 })}/5)` : '';\n return `${p.title}${amount}${stars}`;\n });\n return [data.title, ...lines].filter(notNull).join('\\n');\n },\n partial: (input) => {\n const query = str(input['query'] ?? input['q'] ?? input['search'] ?? input['keywords'] ?? input['term'] ?? input['product']);\n return query ? { title: query } : null;\n },\n});\n\n/** Draw a tool's products as this card — returns the function that stops it. */\nexport function setupProductCard(options: CardSetupOptions<ProductData, ProductVariant> = {}): () => void {\n return productCard.setup(options);\n}\n"],
5
+ "mappings": "6PAQA,IAAMA,EAAOC,GACT,mKAAmKA,CAAI,SAG9JC,GAAMF,EAAI,yHAAyH,EAGnIG,GAAQH,EAAI,iJAAiJ,EAG7JI,GAASJ,EAAI,qEAAqE,EAGlFK,GAAML,EAAI,0IAA0I,ECrBjKM,GAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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MK,EAAMK,EAAI,OAAQV,EAAGA,EAAE,KAAK,CAAC,GAAK,GACzE9C,EAAQ8C,EAAE,SAAW,OAAY,KAAKoC,EAAa1B,EAAI,OAAQV,EAAE,OAAQ,CAAE,sBAAuB,CAAA,CAAG,CAAC,MAAQ,GACpH,MAAO,GAAGA,EAAE,KAAK,GAAGpE,CAAM,GAAGsB,CAAK,EACtC,CAAC,EACD,MAAO,CAACqG,EAAK,MAAO,GAAGU,CAAK,EAAE,OAAOzD,CAAO,EAAE,KAAK;CAAI,CAC3D,EACA,QAAU+D,GAAU,CAChB,IAAML,EAAQ5H,EAAIiI,EAAM,OAAYA,EAAM,GAAQA,EAAM,QAAaA,EAAM,UAAeA,EAAM,MAAWA,EAAM,OAAU,EAC3H,OAAOL,EAAQ,CAAE,MAAOA,CAAA,EAAU,IACtC,CACJ,CAAC,EAGM,SAASM,GAAiBC,EAAyD,CAAA,EAAgB,CACtG,OAAOJ,GAAY,MAAMI,CAAO,CACpC",
6
+ "names": ["svg", "body", "BAG", "TRUCK", "SEARCH", "TAG", "productStyles", "P", "STOCK_WORD", "PRODUCTS_SHOWN", "OPTIONS_SHOWN", "ACTIONS_PER_PRODUCT", "isObject", "value", "pick", "r", "keys", "key", "listOf", "e", "readMoney", "amount", "currency", "readPriceText", "currencyCode", "readImage", "item", "image", "src", "webUrl", "alt", "str", "AVAILABILITY", "readAvailability", "offer", "status", "flag", "readRating", "aggregate", "count", "best", "num", "given", "stars", "reviews", "NO_VARIANT", "readOptions", "out", "add", "s", "readShipping", "text", "cost", "readActions", "label", "url", "id", "ENTITIES", "decodeEntities", "whole", "name", "code", "plainText", "html", "cheapestVariant", "v", "price", "lowEnd", "range", "readProduct", "raw", "title", "offers", "own", "variant", "compareOwn", "compare", "merchantRaw", "merchant", "merchantLogo", "description", "reviewCount", "availability", "shipping", "badge", "readProducts", "list", "many", "products", "p", "discountOf", "product", "compareAtPrice", "ratio", "money", "config", "formatPrice", "notNull", "media", "ctx", "className", "frame", "el", "glyph", "titleOf", "merchantOf", "node", "logo", "discountBadge", "formatPercent", "priceOf", "withDiscount", "row", "now", "said", "word", "discount", "availabilityOf", "shippingOf", "flags", "items", "optionsOf", "option", "rest", "shown", "formatNumber", "actionsOf", "max", "buttons", "action", "productRoot", "kind", "extra", "tile", "actions", "mini", "photo", "corner", "rating", "meta", "main", "detail", "facts", "heading", "data", "labelOf", "render", "first", "slides", "carousel", "skeleton", "partial", "block", "cls", "lines", "query", "rows", "tiles", "productCard", "defineCard", "input", "setupProductCard", "options"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ import"./chunk-XAWE4EAK.js";var e={inputPlaceholder:"Digite uma mensagem\u2026",sendButton:"Enviar",copy:"Copiar",copied:"Copiado!",retry:"Tentar novamente",thinking:"Racioc\xEDnio",elicitationOther:"Outra resposta\u2026",elicitationOtherPlaceholder:"Digite sua resposta\u2026",elicitationOtherLabel:"Resposta livre",submitButton:"Confirmar",stopButton:"Parar",elicitationRecommended:"Recomendado",elicitationSkip:"Pular",elicitationHide:"Ocultar por enquanto",elicitationWaiting:"Aguardando sua resposta",elicitationYes:"Sim",elicitationNo:"N\xE3o",elicitationAnswerLabel:"Sua resposta",approvalInstructionPlaceholder:"Ou diga o que fazer em vez disso\u2026",approvalOptionsLabel:"Sua decis\xE3o",approvalArgsLabel:"Argumentos",approvalAsk:"Permitir {tool}?",approvalWaiting:"Aguardando",scrollToBottom:"Ir para o fim",suggestionsLabel:"Sugest\xF5es de mensagens",contextLabel:"Janela de contexto",contextSystem:"Prompt do sistema",contextTools:"Ferramentas",contextSummary:"Resumo",contextMessages:"Mensagens",contextOther:"Outros",contextFree:"Livre",contextTotal:"Total",contextReclaim:"Compactar agora liberaria ~{n} tokens",contextCompactNow:"Compactar agora",checkpointCount:"{n} mensagens resumidas para o modelo",checkpointCountOne:"1 mensagem resumida para o modelo",checkpointLegacy:"As mensagens anteriores foram resumidas",checkpointGroup:"Resumo do contexto",checkpointShow:"Mostrar resumo",checkpointHide:"Ocultar resumo",checkpointRestore:"Restaurar",checkpointRestoreConfirm:"Enviar as mensagens originais ao modelo novamente?",checkpointPending:"Resumindo o contexto\u2026",checkpointFailed:"N\xE3o foi poss\xEDvel resumir o contexto",toolRunning:"Em execu\xE7\xE3o",toolFailed:"Falhou",toolCompleted:"Conclu\xEDdo",toolRejected:"Recusado",toolStopped:"Interrompido",toolInput:"Entrada",toolOutput:"Sa\xEDda",toolRejectedSaid:"Voc\xEA disse: \u201C{instruction}\u201D",toolRefusedByPolicy:"Recusado por uma regra",toolNotRunAfterRefusal:"N\xE3o executado: uma chamada anterior foi recusada",toolTimedOut:"Tempo esgotado",toolUnavailable:"Indispon\xEDvel aqui",toolNoApprover:"Ningu\xE9m podia aprov\xE1-lo",toolTurnLimit:"Limite de turnos atingido",maxTurnsReached:"Interrompido ap\xF3s {n} turnos para evitar um loop infinito.",sourcesCount:"{n} fontes",sourcesOne:"1 fonte",sourcesCard:"Fontes",sourcePrevious:"Fonte anterior",sourceNext:"Pr\xF3xima fonte",sourcePosition:"Fonte {i} de {n}",opensInNewTab:"(abre em uma nova aba)",imageLoad:"Carregar a imagem de {host}",imageLoadNamed:"Carregar a imagem \u201C{alt}\u201D de {host}",questionDeclined:"Voc\xEA optou por n\xE3o responder.",artifactNotCreated:"N\xE3o criado",thoughtFor:"Racioc\xEDnio: {duration}",thought:"Racioc\xEDnio conclu\xEDdo",actionUpload:"Anexar arquivo",removeAttachment:"Remover {name}",messageFrom:"Mensagem de {name}",selectSearchPlaceholder:"Pesquisar\u2026",selectSearchLabel:"Pesquisar nas op\xE7\xF5es",loading:"Carregando\u2026",download:"Baixar",openArtifact:"Abrir",modelContextWindow:"{n} de contexto",previewPending:"Pressione Visualizar para executar este artefato.",sandboxError:"O sandbox falhou durante a gera\xE7\xE3o.",sandboxErrorHint:"Causa comum: o modelo gerou c\xF3digo inv\xE1lido (vari\xE1vel n\xE3o definida, tipo de argumento errado). Tente novamente \u2014 o modelo pode gerar outro c\xF3digo.",preview:"Visualizar",code:"C\xF3digo",generating:"Gerando\u2026",rebuildingPreview:"Reconstruindo a visualiza\xE7\xE3o\u2026",typing:"Digitando",responseCutOff:"Interrompida no limite de tamanho do modelo.",error:"Erro",errorUnreachable:"N\xE3o foi poss\xEDvel falar com o assistente agora. Tente novamente em instantes.",errorTimeout:"A resposta demorou demais. Tente novamente em instantes.",errorRefused:"O assistente n\xE3o tem permiss\xE3o para responder agora.",errorRateLimited:"Muitas solicita\xE7\xF5es agora. Tente novamente em instantes.",errorTooLong:"Esta conversa \xE9 longa demais para o modelo. Comece uma nova.",errorFailed:"O assistente n\xE3o conseguiu responder. Tente novamente em instantes.",errorNoAnswer:"O assistente n\xE3o conseguiu responder a esta solicita\xE7\xE3o.",running:"Executando\u2026",run:"Executar",file:"Arquivo",modelSelectorPlaceholder:"Selecione um modelo\u2026",approvalModeLabel:"Modo de aprova\xE7\xE3o",roleNameUser:"Voc\xEA",roleNameAssistant:"Assistente",yourMessage:"Sua mensagem",assistantResponse:"Resposta do assistente",messageActions:"A\xE7\xF5es da mensagem",edit:"Editar mensagem",editConfirm:"Enviar",editCancel:"Cancelar",feedbackPositive:"Boa resposta",feedbackNegative:"Resposta ruim",previousResponse:"Resposta anterior",nextResponse:"Pr\xF3xima resposta",approveTool:"Aprovar",rejectTool:"Recusar",messageInfo:"Detalhes",newChat:"Nova conversa",loadingConversations:"Carregando conversas",conversationSearchEmpty:"Nenhuma conversa corresponde",conversationList:"Conversas",loadingConversation:"Carregando a conversa",deleteConversation:"Excluir",archiveConversation:"Arquivar",unarchiveConversation:"Desarquivar",conversationActions:"A\xE7\xF5es da conversa",conversationRunning:"Respondendo",conversationWaiting:"Aguardando voc\xEA",renameConversation:"Renomear",conversationTitle:"T\xEDtulo da conversa",pinConversation:"Fixar",unpinConversation:"Desafixar",deleteConversationConfirm:"Excluir \u201C{title}\u201D?",cancel:"Cancelar",conversationGroupPinned:"Fixadas",conversationGroupToday:"Hoje",conversationGroupYesterday:"Ontem",conversationGroupWeek:"\xDAltimos 7 dias",conversationGroupMonth:"\xDAltimos 30 dias",scrollRailLabel:"Estrutura da conversa",sidebarLabel:"Conversas",splitHandleLabel:"Redimensionar os pain\xE9is",launcherOpen:"Abrir o chat",launcherClose:"Fechar o chat",transcript:"Transcri\xE7\xE3o",tag:"pt-BR",direction:"ltr"};export{e as default,e as ptBR};
2
+ //# sourceMappingURL=pt-BR-SNSDLB4C.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../node_modules/.pnpm/@aparte+locales@1.0.0_@aparte+core@1.0.0/node_modules/@aparte/locales/src/pt-BR.ts"],
4
+ "sourcesContent": ["/**\n * Portuguese (Brazil) (pt-BR) — the chat's interface strings: pass `ptBR` to `aparteGlobalConfig.setLocale()`.\n *\n * Core ships English (`APARTE_DEFAULT_LOCALE`). Every key is translated here — a key left out\n * would show in English, and the package's tests and `check:locale-keys` refuse that.\n */\nimport type { AparteLocale } from '@aparte/core';\n\nexport const ptBR: AparteLocale = {\n inputPlaceholder: \"Digite uma mensagem…\",\n sendButton: \"Enviar\",\n copy: \"Copiar\",\n copied: \"Copiado!\",\n retry: \"Tentar novamente\",\n thinking: \"Raciocínio\",\n elicitationOther: \"Outra resposta…\",\n elicitationOtherPlaceholder: \"Digite sua resposta…\",\n elicitationOtherLabel: \"Resposta livre\",\n submitButton: \"Confirmar\",\n stopButton: \"Parar\",\n elicitationRecommended: \"Recomendado\",\n elicitationSkip: \"Pular\",\n elicitationHide: \"Ocultar por enquanto\",\n elicitationWaiting: \"Aguardando sua resposta\",\n elicitationYes: \"Sim\",\n elicitationNo: \"Não\",\n elicitationAnswerLabel: \"Sua resposta\",\n approvalInstructionPlaceholder: \"Ou diga o que fazer em vez disso…\",\n approvalOptionsLabel: \"Sua decisão\",\n approvalArgsLabel: \"Argumentos\",\n approvalAsk: \"Permitir {tool}?\",\n approvalWaiting: \"Aguardando\",\n scrollToBottom: \"Ir para o fim\",\n suggestionsLabel: \"Sugestões de mensagens\",\n contextLabel: \"Janela de contexto\",\n contextSystem: \"Prompt do sistema\",\n contextTools: \"Ferramentas\",\n contextSummary: \"Resumo\",\n contextMessages: \"Mensagens\",\n contextOther: \"Outros\",\n contextFree: \"Livre\",\n contextTotal: \"Total\",\n contextReclaim: \"Compactar agora liberaria ~{n} tokens\",\n contextCompactNow: \"Compactar agora\",\n checkpointCount: \"{n} mensagens resumidas para o modelo\",\n checkpointCountOne: \"1 mensagem resumida para o modelo\",\n checkpointLegacy: \"As mensagens anteriores foram resumidas\",\n checkpointGroup: \"Resumo do contexto\",\n checkpointShow: \"Mostrar resumo\",\n checkpointHide: \"Ocultar resumo\",\n checkpointRestore: \"Restaurar\",\n checkpointRestoreConfirm: \"Enviar as mensagens originais ao modelo novamente?\",\n checkpointPending: \"Resumindo o contexto…\",\n checkpointFailed: \"Não foi possível resumir o contexto\",\n toolRunning: \"Em execução\",\n toolFailed: \"Falhou\",\n toolCompleted: \"Concluído\",\n toolRejected: \"Recusado\",\n toolStopped: \"Interrompido\",\n toolInput: \"Entrada\",\n toolOutput: \"Saída\",\n toolRejectedSaid: \"Você disse: “{instruction}”\",\n toolRefusedByPolicy: \"Recusado por uma regra\",\n toolNotRunAfterRefusal: \"Não executado: uma chamada anterior foi recusada\",\n toolTimedOut: \"Tempo esgotado\",\n toolUnavailable: \"Indisponível aqui\",\n toolNoApprover: \"Ninguém podia aprová-lo\",\n toolTurnLimit: \"Limite de turnos atingido\",\n maxTurnsReached: \"Interrompido após {n} turnos para evitar um loop infinito.\",\n sourcesCount: \"{n} fontes\",\n sourcesOne: \"1 fonte\",\n sourcesCard: \"Fontes\",\n sourcePrevious: \"Fonte anterior\",\n sourceNext: \"Próxima fonte\",\n sourcePosition: \"Fonte {i} de {n}\",\n opensInNewTab: \"(abre em uma nova aba)\",\n imageLoad: \"Carregar a imagem de {host}\",\n imageLoadNamed: \"Carregar a imagem “{alt}” de {host}\",\n questionDeclined: \"Você optou por não responder.\",\n artifactNotCreated: \"Não criado\",\n thoughtFor: \"Raciocínio: {duration}\",\n thought: \"Raciocínio concluído\",\n actionUpload: \"Anexar arquivo\",\n removeAttachment: \"Remover {name}\",\n messageFrom: \"Mensagem de {name}\",\n selectSearchPlaceholder: \"Pesquisar…\",\n selectSearchLabel: \"Pesquisar nas opções\",\n loading: \"Carregando…\",\n download: \"Baixar\",\n openArtifact: \"Abrir\",\n modelContextWindow: \"{n} de contexto\",\n previewPending: \"Pressione Visualizar para executar este artefato.\",\n sandboxError: \"O sandbox falhou durante a geração.\",\n sandboxErrorHint: \"Causa comum: o modelo gerou código inválido (variável não definida, tipo de argumento errado). Tente novamente — o modelo pode gerar outro código.\",\n preview: \"Visualizar\",\n code: \"Código\",\n generating: \"Gerando…\",\n rebuildingPreview: \"Reconstruindo a visualização…\",\n typing: \"Digitando\",\n responseCutOff: \"Interrompida no limite de tamanho do modelo.\",\n error: \"Erro\",\n errorUnreachable: \"Não foi possível falar com o assistente agora. Tente novamente em instantes.\",\n errorTimeout: \"A resposta demorou demais. Tente novamente em instantes.\",\n errorRefused: \"O assistente não tem permissão para responder agora.\",\n errorRateLimited: \"Muitas solicitações agora. Tente novamente em instantes.\",\n errorTooLong: \"Esta conversa é longa demais para o modelo. Comece uma nova.\",\n errorFailed: \"O assistente não conseguiu responder. Tente novamente em instantes.\",\n errorNoAnswer: \"O assistente não conseguiu responder a esta solicitação.\",\n running: \"Executando…\",\n run: \"Executar\",\n file: \"Arquivo\",\n modelSelectorPlaceholder: \"Selecione um modelo…\",\n approvalModeLabel: \"Modo de aprovação\",\n roleNameUser: \"Você\",\n roleNameAssistant: \"Assistente\",\n yourMessage: \"Sua mensagem\",\n assistantResponse: \"Resposta do assistente\",\n messageActions: \"Ações da mensagem\",\n edit: \"Editar mensagem\",\n editConfirm: \"Enviar\",\n editCancel: \"Cancelar\",\n feedbackPositive: \"Boa resposta\",\n feedbackNegative: \"Resposta ruim\",\n previousResponse: \"Resposta anterior\",\n nextResponse: \"Próxima resposta\",\n approveTool: \"Aprovar\",\n rejectTool: \"Recusar\",\n messageInfo: \"Detalhes\",\n newChat: \"Nova conversa\",\n loadingConversations: \"Carregando conversas\",\n conversationSearchEmpty: \"Nenhuma conversa corresponde\",\n conversationList: \"Conversas\",\n loadingConversation: \"Carregando a conversa\",\n deleteConversation: \"Excluir\",\n archiveConversation: \"Arquivar\",\n unarchiveConversation: \"Desarquivar\",\n conversationActions: \"Ações da conversa\",\n conversationRunning: \"Respondendo\",\n conversationWaiting: \"Aguardando você\",\n renameConversation: \"Renomear\",\n conversationTitle: \"Título da conversa\",\n pinConversation: \"Fixar\",\n unpinConversation: \"Desafixar\",\n deleteConversationConfirm: \"Excluir “{title}”?\",\n cancel: \"Cancelar\",\n conversationGroupPinned: \"Fixadas\",\n conversationGroupToday: \"Hoje\",\n conversationGroupYesterday: \"Ontem\",\n conversationGroupWeek: \"Últimos 7 dias\",\n conversationGroupMonth: \"Últimos 30 dias\",\n scrollRailLabel: \"Estrutura da conversa\",\n sidebarLabel: \"Conversas\",\n splitHandleLabel: \"Redimensionar os painéis\",\n launcherOpen: \"Abrir o chat\",\n launcherClose: \"Fechar o chat\",\n transcript: \"Transcrição\",\n tag: \"pt-BR\",\n direction: 'ltr',\n};\n\nexport default ptBR;\n"],
5
+ "mappings": "4BAQO,IAAMA,EAAqB,CAC9B,iBAAkB,4BAClB,WAAY,SACZ,KAAM,SACN,OAAQ,WACR,MAAO,mBACP,SAAU,gBACV,iBAAkB,uBAClB,4BAA6B,4BAC7B,sBAAuB,iBACvB,aAAc,YACd,WAAY,QACZ,uBAAwB,cACxB,gBAAiB,QACjB,gBAAiB,uBACjB,mBAAoB,0BACpB,eAAgB,MAChB,cAAe,SACf,uBAAwB,eACxB,+BAAgC,yCAChC,qBAAsB,iBACtB,kBAAmB,aACnB,YAAa,mBACb,gBAAiB,aACjB,eAAgB,gBAChB,iBAAkB,4BAClB,aAAc,qBACd,cAAe,oBACf,aAAc,cACd,eAAgB,SAChB,gBAAiB,YACjB,aAAc,SACd,Y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AAqB,wBACrB,mBAAoB,UACpB,oBAAqB,WACrB,sBAAuB,cACvB,oBAAqB,0BACrB,oBAAqB,cACrB,oBAAqB,qBACrB,mBAAoB,WACpB,kBAAmB,wBACnB,gBAAiB,QACjB,kBAAmB,YACnB,0BAA2B,+BAC3B,OAAQ,WACR,wBAAyB,UACzB,uBAAwB,OACxB,2BAA4B,QAC5B,sBAAuB,oBACvB,uBAAwB,qBACxB,gBAAiB,wBACjB,aAAc,YACd,iBAAkB,8BAClB,aAAc,eACd,cAAe,gBACf,WAAY,oBACZ,IAAK,QACL,UAAW,KACf",
6
+ "names": ["ptBR"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import"./chunk-XAWE4EAK.js";var e={inputPlaceholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435\u2026",sendButton:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C",copy:"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C",copied:"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E!",retry:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",thinking:"\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435",elicitationOther:"\u0414\u0440\u0443\u0433\u043E\u0439 \u043E\u0442\u0432\u0435\u0442\u2026",elicitationOtherPlaceholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0432\u043E\u0439 \u043E\u0442\u0432\u0435\u0442\u2026",elicitationOtherLabel:"\u0421\u0432\u043E\u0439 \u043E\u0442\u0432\u0435\u0442",submitButton:"\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C",stopButton:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C",elicitationRecommended:"\u0420\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0443\u0435\u0442\u0441\u044F",elicitationSkip:"\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C",elicitationHide:"\u0421\u043A\u0440\u044B\u0442\u044C \u043F\u043E\u043A\u0430",elicitationWaiting:"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430",elicitationYes:"\u0414\u0430",elicitationNo:"\u041D\u0435\u0442",elicitationAnswerLabel:"\u0412\u0430\u0448 \u043E\u0442\u0432\u0435\u0442",approvalInstructionPlaceholder:"\u0418\u043B\u0438 \u0441\u043A\u0430\u0436\u0438\u0442\u0435, \u0447\u0442\u043E \u0441\u0434\u0435\u043B\u0430\u0442\u044C \u0432\u043C\u0435\u0441\u0442\u043E \u044D\u0442\u043E\u0433\u043E\u2026",approvalOptionsLabel:"\u0412\u0430\u0448\u0435 \u0440\u0435\u0448\u0435\u043D\u0438\u0435",approvalArgsLabel:"\u0410\u0440\u0433\u0443\u043C\u0435\u043D\u0442\u044B",approvalAsk:"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044C {tool}?",approvalWaiting:"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435",scrollToBottom:"\u041F\u0440\u043E\u043A\u0440\u0443\u0442\u0438\u0442\u044C \u0432\u043D\u0438\u0437",suggestionsLabel:"\u041F\u0440\u0435\u0434\u043B\u0430\u0433\u0430\u0435\u043C\u044B\u0435 \u0437\u0430\u043F\u0440\u043E\u0441\u044B",contextLabel:"\u041A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u043D\u043E\u0435 \u043E\u043A\u043D\u043E",contextSystem:"\u0421\u0438\u0441\u0442\u0435\u043C\u043D\u044B\u0439 \u043F\u0440\u043E\u043C\u043F\u0442",contextTools:"\u0418\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u044B",contextSummary:"\u0421\u0432\u043E\u0434\u043A\u0430",contextMessages:"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F",contextOther:"\u041F\u0440\u043E\u0447\u0435\u0435",contextFree:"\u0421\u0432\u043E\u0431\u043E\u0434\u043D\u043E",contextTotal:"\u0412\u0441\u0435\u0433\u043E",contextReclaim:"\u0421\u0436\u0430\u0442\u0438\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u043E\u0441\u0432\u043E\u0431\u043E\u0434\u0438\u0442 ~{n} \u0442\u043E\u043A\u0435\u043D\u043E\u0432",contextCompactNow:"\u0421\u0436\u0430\u0442\u044C \u0441\u0435\u0439\u0447\u0430\u0441",checkpointCount:"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u0441\u0436\u0430\u0442\u043E \u0434\u043B\u044F \u043C\u043E\u0434\u0435\u043B\u0438: {n}",checkpointCountOne:"1 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0441\u0436\u0430\u0442\u043E \u0434\u043B\u044F \u043C\u043E\u0434\u0435\u043B\u0438",checkpointLegacy:"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0441\u0436\u0430\u0442\u044B",checkpointGroup:"\u0421\u0432\u043E\u0434\u043A\u0430 \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430",checkpointShow:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0441\u0432\u043E\u0434\u043A\u0443",checkpointHide:"\u0421\u043A\u0440\u044B\u0442\u044C \u0441\u0432\u043E\u0434\u043A\u0443",checkpointRestore:"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C",checkpointRestoreConfirm:"\u0421\u043D\u043E\u0432\u0430 \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043C\u043E\u0434\u0435\u043B\u0438?",checkpointPending:"\u0421\u0436\u0430\u0442\u0438\u0435 \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430\u2026",checkpointFailed:"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u0436\u0430\u0442\u044C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442",toolRunning:"\u0412\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F",toolFailed:"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C",toolCompleted:"\u0413\u043E\u0442\u043E\u0432\u043E",toolRejected:"\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E",toolStopped:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E",toolInput:"\u0412\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435",toolOutput:"\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442",toolRejectedSaid:"\u0412\u044B \u0441\u043A\u0430\u0437\u0430\u043B\u0438: \xAB{instruction}\xBB",toolRefusedByPolicy:"\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E \u043F\u0440\u0430\u0432\u0438\u043B\u043E\u043C",toolNotRunAfterRefusal:"\u041D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E: \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0432\u044B\u0437\u043E\u0432 \u0431\u044B\u043B \u043E\u0442\u043A\u043B\u043E\u043D\u0451\u043D",toolTimedOut:"\u0412\u0440\u0435\u043C\u044F \u0438\u0441\u0442\u0435\u043A\u043B\u043E",toolUnavailable:"\u0417\u0434\u0435\u0441\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E",toolNoApprover:"\u041D\u0438\u043A\u0442\u043E \u043D\u0435 \u043C\u043E\u0433 \u044D\u0442\u043E \u043E\u0434\u043E\u0431\u0440\u0438\u0442\u044C",toolTurnLimit:"\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043B\u0438\u043C\u0438\u0442 \u0445\u043E\u0434\u043E\u0432",maxTurnsReached:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E: \u0434\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043F\u0440\u0435\u0434\u0435\u043B \u0445\u043E\u0434\u043E\u0432 ({n}), \u0447\u0442\u043E\u0431\u044B \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044C \u0431\u0435\u0441\u043A\u043E\u043D\u0435\u0447\u043D\u043E\u0433\u043E \u0446\u0438\u043A\u043B\u0430.",sourcesCount:"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u043E\u0432: {n}",sourcesOne:"1 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A",sourcesCard:"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438",sourcePrevious:"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A",sourceNext:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A",sourcePosition:"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A {i} \u0438\u0437 {n}",opensInNewTab:"(\u043E\u0442\u043A\u0440\u043E\u0435\u0442\u0441\u044F \u0432 \u043D\u043E\u0432\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0435)",imageLoad:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0441 {host}",imageLoadNamed:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \xAB{alt}\xBB \u0441 {host}",questionDeclined:"\u0412\u044B \u0440\u0435\u0448\u0438\u043B\u0438 \u043D\u0435 \u043E\u0442\u0432\u0435\u0447\u0430\u0442\u044C.",artifactNotCreated:"\u041D\u0435 \u0441\u043E\u0437\u0434\u0430\u043D\u043E",thoughtFor:"\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435: {duration}",thought:"\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E",actionUpload:"\u041F\u0440\u0438\u043A\u0440\u0435\u043F\u0438\u0442\u044C \u0444\u0430\u0439\u043B",removeAttachment:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C {name}",messageFrom:"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043E\u0442 {name}",selectSearchPlaceholder:"\u041F\u043E\u0438\u0441\u043A\u2026",selectSearchLabel:"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u0430\u043C",loading:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430\u2026",download:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C",openArtifact:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C",modelContextWindow:"\u041A\u043E\u043D\u0442\u0435\u043A\u0441\u0442: {n}",previewPending:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \xAB\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\xBB, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u044D\u0442\u043E\u0442 \u0430\u0440\u0442\u0435\u0444\u0430\u043A\u0442.",sandboxError:"\u041F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u0430 \u0434\u0430\u043B\u0430 \u0441\u0431\u043E\u0439 \u0432\u043E \u0432\u0440\u0435\u043C\u044F \u0433\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u0438.",sandboxErrorHint:"\u0427\u0430\u0441\u0442\u0430\u044F \u043F\u0440\u0438\u0447\u0438\u043D\u0430: \u043C\u043E\u0434\u0435\u043B\u044C \u0441\u043E\u0437\u0434\u0430\u043B\u0430 \u043D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 \u043A\u043E\u0434 (\u043D\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0451\u043D\u043D\u0430\u044F \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F, \u043D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0442\u0438\u043F \u0430\u0440\u0433\u0443\u043C\u0435\u043D\u0442\u0430). \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u0437\u0430\u043F\u0440\u043E\u0441 \u2014 \u043C\u043E\u0434\u0435\u043B\u044C \u043C\u043E\u0436\u0435\u0442 \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0434\u0440\u0443\u0433\u043E\u0439 \u043A\u043E\u0434.",preview:"\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440",code:"\u041A\u043E\u0434",generating:"\u0413\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u044F\u2026",rebuildingPreview:"\u041F\u0435\u0440\u0435\u0441\u0431\u043E\u0440\u043A\u0430 \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430\u2026",typing:"\u041F\u0435\u0447\u0430\u0442\u0430\u0435\u0442",responseCutOff:"\u041E\u0431\u0440\u0435\u0437\u0430\u043D\u043E \u043D\u0430 \u043F\u0440\u0435\u0434\u0435\u043B\u0435 \u0434\u043B\u0438\u043D\u044B \u043C\u043E\u0434\u0435\u043B\u0438.",error:"\u041E\u0448\u0438\u0431\u043A\u0430",errorUnreachable:"\u0421\u0435\u0439\u0447\u0430\u0441 \u043D\u0435 \u0443\u0434\u0430\u0451\u0442\u0441\u044F \u0441\u0432\u044F\u0437\u0430\u0442\u044C\u0441\u044F \u0441 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u043E\u043C. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437 \u0447\u0443\u0442\u044C \u043F\u043E\u0437\u0436\u0435.",errorTimeout:"\u041E\u0442\u0432\u0435\u0442 \u0437\u0430\u043D\u044F\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u0432\u0440\u0435\u043C\u0435\u043D\u0438. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437 \u0447\u0443\u0442\u044C \u043F\u043E\u0437\u0436\u0435.",errorRefused:"\u0421\u0435\u0439\u0447\u0430\u0441 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0443 \u043D\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u043E \u043E\u0442\u0432\u0435\u0447\u0430\u0442\u044C.",errorRateLimited:"\u0421\u0435\u0439\u0447\u0430\u0441 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437 \u0447\u0443\u0442\u044C \u043F\u043E\u0437\u0436\u0435.",errorTooLong:"\u042D\u0442\u0430 \u0431\u0435\u0441\u0435\u0434\u0430 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0434\u043B\u0438\u043D\u043D\u0430\u044F \u0434\u043B\u044F \u043C\u043E\u0434\u0435\u043B\u0438. \u041D\u0430\u0447\u043D\u0438\u0442\u0435 \u043D\u043E\u0432\u0443\u044E.",errorFailed:"\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u043D\u0435 \u0441\u043C\u043E\u0433 \u043E\u0442\u0432\u0435\u0442\u0438\u0442\u044C. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437 \u0447\u0443\u0442\u044C \u043F\u043E\u0437\u0436\u0435.",errorNoAnswer:"\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u043D\u0435 \u0441\u043C\u043E\u0433 \u043E\u0442\u0432\u0435\u0442\u0438\u0442\u044C \u043D\u0430 \u044D\u0442\u043E\u0442 \u0437\u0430\u043F\u0440\u043E\u0441.",running:"\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435\u2026",run:"\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C",file:"\u0424\u0430\u0439\u043B",modelSelectorPlaceholder:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043C\u043E\u0434\u0435\u043B\u044C\u2026",approvalModeLabel:"\u0420\u0435\u0436\u0438\u043C \u043E\u0434\u043E\u0431\u0440\u0435\u043D\u0438\u044F",roleNameUser:"\u0412\u044B",roleNameAssistant:"\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442",yourMessage:"\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",assistantResponse:"\u041E\u0442\u0432\u0435\u0442 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430",messageActions:"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435\u043C",edit:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",editConfirm:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C",editCancel:"\u041E\u0442\u043C\u0435\u043D\u0430",feedbackPositive:"\u0425\u043E\u0440\u043E\u0448\u0438\u0439 \u043E\u0442\u0432\u0435\u0442",feedbackNegative:"\u041F\u043B\u043E\u0445\u043E\u0439 \u043E\u0442\u0432\u0435\u0442",previousResponse:"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u043E\u0442\u0432\u0435\u0442",nextResponse:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u043E\u0442\u0432\u0435\u0442",approveTool:"\u041E\u0434\u043E\u0431\u0440\u0438\u0442\u044C",rejectTool:"\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C",messageInfo:"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438",newChat:"\u041D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442",loadingConversations:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0431\u0435\u0441\u0435\u0434",conversationSearchEmpty:"\u041D\u0435\u0442 \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0438\u0445 \u0431\u0435\u0441\u0435\u0434",conversationList:"\u0411\u0435\u0441\u0435\u0434\u044B",loadingConversation:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0431\u0435\u0441\u0435\u0434\u044B",deleteConversation:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",archiveConversation:"\u0410\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C",unarchiveConversation:"\u0420\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C",conversationActions:"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441 \u0431\u0435\u0441\u0435\u0434\u043E\u0439",conversationRunning:"\u041E\u0442\u0432\u0435\u0447\u0430\u0435\u0442",conversationWaiting:"\u0416\u0434\u0451\u0442 \u0432\u0430\u0441",renameConversation:"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C",conversationTitle:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0431\u0435\u0441\u0435\u0434\u044B",pinConversation:"\u0417\u0430\u043A\u0440\u0435\u043F\u0438\u0442\u044C",unpinConversation:"\u041E\u0442\u043A\u0440\u0435\u043F\u0438\u0442\u044C",deleteConversationConfirm:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \xAB{title}\xBB?",cancel:"\u041E\u0442\u043C\u0435\u043D\u0430",conversationGroupPinned:"\u0417\u0430\u043A\u0440\u0435\u043F\u043B\u0451\u043D\u043D\u044B\u0435",conversationGroupToday:"\u0421\u0435\u0433\u043E\u0434\u043D\u044F",conversationGroupYesterday:"\u0412\u0447\u0435\u0440\u0430",conversationGroupWeek:"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 7 \u0434\u043D\u0435\u0439",conversationGroupMonth:"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 30 \u0434\u043D\u0435\u0439",scrollRailLabel:"\u0421\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0430 \u0431\u0435\u0441\u0435\u0434\u044B",sidebarLabel:"\u0411\u0435\u0441\u0435\u0434\u044B",splitHandleLabel:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0440\u0430\u0437\u043C\u0435\u0440 \u043F\u0430\u043D\u0435\u043B\u0435\u0439",launcherOpen:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0447\u0430\u0442",launcherClose:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0447\u0430\u0442",transcript:"\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439",tag:"ru",direction:"ltr"};export{e as default,e as ru};
2
+ //# sourceMappingURL=ru-QE2LLTEY.js.map