{"version":3,"file":"SmartSearch.Dh3uuLsJ.mjs","names":["L.SELECT_FIELD","L.SCOPE_KEYS","L.slugifyLabel","useState","useRef","L.createSequencer","L.searchable","useCallback","L.liveText","L.liveFills","L.planApplied","L.SLOW_MS","L.TIMEOUT_MS","L.queryBody","L.currentScope","L.isGoodResponse","L.createScheduler","L.KEYSTROKE","L.qFromSearch","L.scopeKeyForName","L.datesAfter","L.ALL_VALUE","L.planUndo","L.setLabels","L.datePill","L.undoLabel","L.mobileFiltersLabel","p","L.broaderWord","L.zeroTitle","L.resultsHeader","L.scopeLine","L.labelForSlug","L.sectionColor","L.longDate"],"sources":["https:/framerusercontent.com/modules/ppnMKQOvaY4G9mx10lDQ/HleGJ4MbbxAGG8Xtrt9C/SmartSearchLogic.js","https:/framerusercontent.com/modules/KAhhiRgQg6CZszXqHzy9/KTI0T93QMT8KX1GCqWfV/SmartSearch.js"],"sourcesContent":["// JWN_SmartSearch_Logic.ts - pure logic for JWN_SmartSearch.tsx (Framer code file, no React, no DOM)\n//\n// Created: 2026-10-10 14:10 EDT | Author: Claude (Builder, Step 4110.ui.2, task reciSrOui1ZSI1dqf)\n// Last modified: 2026-10-11 18:20 EDT | Author: Claude (Builder, Step 4438.sync.1, task rec5slqVMpNVw0ytu) |\n//   header names the Framer code files; no logic change (Decision recePn5wppTKQ29Uw).\n// Paste into Framer: Assets > Code > create the code file SmartSearchLogic.tsx FIRST and paste this\n//   file into it; JWN_SmartSearch.tsx goes into the code file SmartSearch.tsx after it. The repo\n//   names carry the JWN_ prefix and the Framer names do not; the component imports this file as\n//   ./ plus the Framer file name (./SmartSearchLogic.tsx).\n//\n// Everything the search box DECIDES lives here so node can test it:\n//   URL to scope, label to slug, the All-only fill rule, the undo rule, request bodies, the\n//   keystroke/settle scheduler and the reader-facing copy. JWN_SmartSearch.tsx only renders and\n//   touches the DOM. Tests: test/smart-search.assert.mjs (node --experimental-strip-types).\n//\n// Specs: blueprint TPR-6090 section 4 (the /query seam), the Step's own R1-R7, and the design\n// spec TPR recrL0YBLvHRd5xcN (direction A, \"Results replace the list\").\n// ── Scope keys, URL params and the native selects ──\nexport const SCOPE_KEYS=[\"section\",\"category\",\"tag\"];// The native CMS filter writes these URL params (measured 2026-10-10 with headless Chromium on\n// www.jewishworldnews.org/browse: each select change rewrites ?section=, ?category=, ?tag=).\nexport const URL_PARAM={section:\"section\",category:\"category\",tag:\"tag\"};// The native selects are found by the END of their `name`. Framer names a form field\n// <breakpoint node id><field id>, and each breakpoint renders its own copy of the form, so the\n// prefix changes with the viewport while the 9-character field id does not. Measured 2026-10-10:\n// V33CBqTm6k6QUhxlMB at 1280, n9BDIbHgXk6QUhxlMB at 375, AYr_Kdhoek6QUhxlMB at 600 and 810,\n// oYhgqz3P1k6QUhxlMB at 1000 and 1199, bare k6QUhxlMB at 1440.\nexport const SELECT_FIELD={section:\"k6QUhxlMB\",category:\"fJVf59vXX\",tag:\"cwefg1qO5\"};export function scopeKeyForName(name){if(!name)return null;return SCOPE_KEYS.find(k=>name.endsWith(SELECT_FIELD[k]))||null;}// The value of the \"All\" option in every native select (measured).\nexport const ALL_VALUE=\"__all__\";// Label -> URL slug, the rule the native filter uses. Checked against all 123 measured options\n// in test/smart-search-selectmap.json: lowercase, \"&\" -> \"and\", dots and apostrophes dropped,\n// any other run of non-alphanumerics -> \"-\".\nexport function slugifyLabel(label){return String(label||\"\").toLowerCase().replace(/&/g,\"and\").replace(/[.'’]/g,\"\").replace(/[^a-z0-9]+/g,\"-\").replace(/^-+|-+$/g,\"\");}// \"?section=local&tag=youth\" -> { section: \"local\", tag: \"youth\" }. One slug each; anything that\n// is not a slug is ignored, because the Worker refuses a malformed scope with a 400.\nconst SLUG=/^[a-z0-9][a-z0-9-]{0,99}$/;export function scopeFromSearch(search){const params=new URLSearchParams(search||\"\");const scope={};for(const key of SCOPE_KEYS){const v=(params.get(URL_PARAM[key])||\"\").trim().toLowerCase();if(v&&SLUG.test(v))scope[key]=v;}return scope;}export function qFromSearch(search){return(new URLSearchParams(search||\"\").get(\"q\")||\"\").trim().slice(0,200);}export function readsAll(s){return!!s&&(s.value===ALL_VALUE||s.value===\"\");}export function optionForSlug(s,slug){if(!s||!slug)return null;return s.options.find(o=>o.value!==ALL_VALUE&&o.slug===slug)||null;}export function selectedOption(s){if(!s||readsAll(s))return null;return s.options.find(o=>o.value===s.value)||null;}// THE ALL-ONLY RULE (blueprint 4c, R2). `applied` fills a select only when that select reads All.\n// A select the reader set is never changed, whatever the parser said. A slug with no matching\n// option is skipped (the select cannot show it). tags: only the first is applied.\n// Dates follow the same rule, per bound (Step 4110.parse.2): `sent` is the pill the request carried\n// in its scope, and the Worker never lets the parser override a bound the scope set, so a sent\n// bound stays and the parser fills only a bound the pill lacked.\nexport function planApplied(applied,selects,sent=null){const a=applied||{};const wanted={section:a.section,category:a.category,tag:Array.isArray(a.tags)?a.tags[0]:undefined};const fills=[];for(const key of SCOPE_KEYS){const slug=wanted[key];if(!slug)continue;const s=selects[key];if(!readsAll(s))continue;const opt=optionForSlug(s,slug);if(!opt)continue;fills.push({key,value:opt.value,label:opt.label,slug:opt.slug});}const from=sent?.from||a.date_from||undefined;const to=sent?.to||a.date_to||undefined;return{fills,dates:from||to?{from,to}:null};}export function datesAfter(action,dates){if(action===\"remove-dates\"||action===\"undo\"||action===\"search-all\")return null;return dates&&(dates.from||dates.to)?{...dates}:null;}// THE UNDO RULE (R4). Undo resets every select the parser filled AND that still holds the value\n// the parser put there. A filled select the reader has since changed by hand is the reader's now,\n// and a select the parser never filled is never touched.\nexport function planUndo(fills,selects){return fills.filter(f=>selects[f.key]?.value===f.value).map(f=>f.key);}// Which fills are still the parser's (the \"FROM YOUR WORDS\" tag and the chips follow this).\nexport function liveFills(fills,selects){return fills.filter(f=>selects[f.key]?.value===f.value);}// ── Request bodies ──\nexport const PAGE_SIZE=12;export const KEYSTROKE={parse:false,log:false};export const SETTLED={parse:true,log:true};export function queryBody(q,scope,flags,page,offset=0,dates=null){const s={...scope};if(dates?.from)s.date_from=dates.from;if(dates?.to)s.date_to=dates.to;return{q:q.trim(),collection:\"articles\",scope:s,parse:flags.parse,log:flags.log,page,limit:PAGE_SIZE,offset};}export const MIN_CHARS=2;export function searchable(q){return q.trim().length>=MIN_CHARS;}// ── The keystroke / settle scheduler (R3) ──\n//\n// Every keystroke: a keystroke request 300 ms after the last key (parse:false, log:false), and a\n// settle 800 ms after the last key (parse:true, log:true). Enter settles at once. A query settles\n// EXACTLY ONCE: Enter after the idle settle, or a second Enter, sends nothing new for the same text.\n// Under 2 trimmed characters nothing is sent and nothing is scheduled.\nexport const KEYSTROKE_MS=300;export const SETTLE_MS=800;export function createScheduler(timers,send){let kTimer=null;let sTimer=null;let settledQ=null;const clearAll=()=>{if(kTimer!==null)timers.clear(kTimer);if(sTimer!==null)timers.clear(sTimer);kTimer=sTimer=null;};const settle=q=>{clearAll();const t=q.trim();if(!searchable(t)||t===settledQ)return;settledQ=t;send(t,SETTLED);};return{input(q){clearAll();const t=q.trim();if(!searchable(t))return;if(t!==settledQ)settledQ=null;kTimer=timers.set(()=>{kTimer=null;send(t,KEYSTROKE);},KEYSTROKE_MS);sTimer=timers.set(()=>{sTimer=null;settle(t);},SETTLE_MS);},enter(q){settle(q);},cancel(){clearAll();},// Clear (button, Escape, emptied field) forgets the settled text, so typing it again settles again.\nforget(){clearAll();settledQ=null;}};}// ── Newest-answer-wins ──\nexport function createSequencer(){let n=0;return{next:()=>++n,isCurrent:id=>id===n};}// ── Reader-facing copy (design spec section 6). Curly quotes; hyphens, never en or em dashes. ──\nexport function quoted(q){return\"“\"+q+\"”\";}export function resultsHeader(total,q){return total===1?`1 article for ${quoted(q)}`:`${total} articles for ${quoted(q)}`;}export function scopeLine(labels){return labels.length?`In ${labels.join(\" \\xb7 \")}. Best match first.`:\"In all sections. Best match first.\";}const COUNT_WORDS=[\"\",\"it\",\"both\",\"all three\",\"all four\",\"all five\"];export function undoLabel(n){if(n<1)return\"\";return\"Undo \"+(COUNT_WORDS[n]||`all ${n}`);}const MONTHS_SHORT=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];function ymd(iso){const m=/^(\\d{4})-(\\d{2})-(\\d{2})/.exec(iso||\"\");return m?[Number(m[1]),Number(m[2]),Number(m[3])]:null;}// \"Sep 1-30, 2026\", \"Sep 28 - Oct 3, 2026\", \"Dec 28, 2026 - Jan 3, 2027\", \"From Sep 1, 2026\", \"Until Sep 30, 2026\".\n// The design spec draws an en dash; JW's copy rule allows hyphens only, so a hyphen it is.\nexport function datePill(from,to){const f=from?ymd(from):null;const t=to?ymd(to):null;const day=d=>`${MONTHS_SHORT[d[1]-1]} ${d[2]}`;if(f&&t){if(f[0]===t[0]&&f[1]===t[1]){if(f[2]===t[2])return`${day(f)}, ${f[0]}`;return`${MONTHS_SHORT[f[1]-1]} ${f[2]}-${t[2]}, ${f[0]}`;}if(f[0]===t[0])return`${day(f)} - ${day(t)}, ${f[0]}`;return`${day(f)}, ${f[0]} - ${day(t)}, ${t[0]}`;}if(f)return`From ${day(f)}, ${f[0]}`;if(t)return`Until ${day(t)}, ${t[0]}`;return\"\";}// \"September 14, 2026\" in America/New_York. A bare YYYY-MM-DD is a calendar date, not an instant,\n// so it is printed as written rather than shifted a day by a timezone.\nconst MONTHS_LONG=[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"];export function longDate(iso){if(!iso)return\"\";if(/^\\d{4}-\\d{2}-\\d{2}$/.test(iso)){const d=ymd(iso);return`${MONTHS_LONG[d[1]-1]} ${d[2]}, ${d[0]}`;}const t=new Date(iso);if(isNaN(t.getTime()))return\"\";return new Intl.DateTimeFormat(\"en-US\",{timeZone:\"America/New_York\",month:\"long\",day:\"numeric\",year:\"numeric\"}).format(t);}// The zero-result \"Search “word”\" button: the longest word of 4+ letters that is not a stop word.\n// Hidden (null) for a one-word query.\nconst STOP=new Set([\"about\",\"after\",\"also\",\"been\",\"before\",\"from\",\"have\",\"into\",\"just\",\"more\",\"most\",\"over\",\"some\",\"than\",\"that\",\"their\",\"them\",\"then\",\"there\",\"these\",\"they\",\"this\",\"what\",\"when\",\"where\",\"which\",\"while\",\"with\",\"would\",\"your\"]);export function broaderWord(q){const words=q.trim().split(/\\s+/).filter(Boolean);if(words.length<2)return null;let best=null;for(const raw of words){const w=raw.replace(RegExp(\"^[^\\\\p{L}\\\\p{N}]+|[^\\\\p{L}\\\\p{N}]+$\",\"gu\"),\"\");if(w.length<4||STOP.has(w.toLowerCase()))continue;if(!best||w.length>best.length)best=w;}return best;}export function zeroTitle(q,labels){return`No articles match ${quoted(q)}`+(labels.length?` in ${labels.join(\" \\xb7 \")}`:\"\");}export function liveText(kind,q,total=0){if(kind===\"error\")return\"Search is not responding\";if(kind===\"none\")return`No results for ${q}`;return`${total} results for ${q}`;}export function mobileFiltersLabel(parserSet,readerSet){if(parserSet>0)return`Filters \\xb7 ${parserSet} set from your words ▾`;if(readerSet>0)return`Filters \\xb7 ${readerSet} set ▾`;return\"Filters ▾\";}export const COPY={label:\"Search articles\",placeholder:\"Try “Hanukkah events”\",help:\"Searches inside the Section, Category and Tag you choose below.\",examples:[\"Hanukkah events\",\"Albany community news\",\"Israel hostage families\"],clearAria:\"Clear search\",clear:\"Clear\",more:\"Show more results\",appliedTitle:\"Set from your words\",residual:r=>`Still searching the words: ${r}`,selectTag:\"FROM YOUR WORDS\",chipAria:label=>`Remove ${label}`,zeroHint:\"Try fewer filters or a broader word.\",searchAll:\"Search all sections\",searchWord:w=>`Search ${quoted(w)}`,slow:q=>`Still searching for ${quoted(q)}…`,error:\"Search is not responding right now. Your filters still work, so the article list is back below.\",retry:\"Try again\"};export function isGoodResponse(r){return!!r&&r.ok===true&&Array.isArray(r.results)&&typeof r.total===\"number\";}export const SLOW_MS=1500;export const TIMEOUT_MS=8e3;// ── Section label colour in a result row (design spec section 2) ──\n// Live values measured on /browse cards 2026-10-10, except: World and Culture use the spec's picked\n// text colours (#3d5a9e, #8a44a8), and Opinions (live #c8733a, 3.1:1 on the card) and Featured (navbar\n// gold #c8a820, 2.0:1) fall under 4.5:1, so they take the existing navy token rather than a new colour.\nexport const SECTION_TEXT={local:\"#2d6a4f\",world:\"#3d5a9e\",culture:\"#8a44a8\",opinions:\"#1a2744\",featured:\"#1a2744\",editorial:\"#c0392b\"};export function sectionColor(slug){return slug&&SECTION_TEXT[slug]||\"#1a2744\";}// A result carries slugs; the row shows the select's own label when the page has it.\nexport function labelForSlug(s,slug){if(!slug)return\"\";const opt=optionForSlug(s,slug);if(opt)return opt.label;return slug.split(\"-\").map(w=>w===\"and\"?\"&\":w.charAt(0).toUpperCase()+w.slice(1)).join(\" \");}// Labels of the selects currently set (scope line, zero-result title), in Section, Category, Tag order.\nexport function setLabels(selects){return SCOPE_KEYS.map(k=>selectedOption(selects[k])?.label).filter(x=>!!x);}// The scope a request carries. The URL params are the source (the native filter writes them, and a\n// shared /browse?category=... link sets the selects from them). A select the page has decides its own\n// key, because a change event fires before the native filter has rewritten the URL; a select the page\n// lacks falls back to the URL (fail soft).\nexport function currentScope(search,selects){const fromUrl=scopeFromSearch(search);const scope={};for(const key of SCOPE_KEYS){const s=selects[key];if(!s){if(fromUrl[key])scope[key]=fromUrl[key];continue;}const opt=selectedOption(s);if(opt&&opt.slug)scope[key]=opt.slug;}return scope;}\nexport const __FramerMetadata__ = {\"exports\":{\"longDate\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PAGE_SIZE\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ScopeKey\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"KEYSTROKE\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Scope\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"COPY\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"resultsHeader\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"RerunAction\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"scopeKeyForName\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SLOW_MS\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"FillPlan\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"createScheduler\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SCOPE_KEYS\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"liveText\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SelectState\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"QueryScope\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"qFromSearch\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"datePill\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"createSequencer\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"selectedOption\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Dates\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"optionForSlug\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Applied\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isGoodResponse\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MIN_CHARS\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SELECT_FIELD\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"sectionColor\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"queryBody\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"searchable\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"TIMEOUT_MS\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"mobileFiltersLabel\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SelectStates\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Scheduler\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"planApplied\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SETTLED\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"broaderWord\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Result\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"URL_PARAM\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Flags\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"QueryResponse\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"undoLabel\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"setLabels\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"KEYSTROKE_MS\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"QueryBody\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"readsAll\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SETTLE_MS\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"slugifyLabel\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"labelForSlug\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"planUndo\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"scopeFromSearch\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Timers\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"zeroTitle\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SECTION_TEXT\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"quoted\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"currentScope\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ALL_VALUE\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"datesAfter\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Fill\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SelectOption\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"liveFills\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"scopeLine\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SmartSearchLogic.map","// JWN_SmartSearch.tsx - Framer Code Component: the /browse article search box\n//\n// Created: 2026-10-10 14:45 EDT | Author: Claude (Builder, Step 4110.ui.2, task reciSrOui1ZSI1dqf)\n// Last modified: 2026-10-11 18:18 EDT | Author: Claude (Builder, Task 4436, task recp2dDW4IcxEy8gk) |\n//   the component's <style> is set through dangerouslySetInnerHTML, so the server render and the\n//   browser hold the same text (React error #425). Built to design direction A (\"Results replace the\n//   list\"), design spec TPR recrL0YBLvHRd5xcN, against blueprint TPR-6090 section 4 (the /query seam).\n// Previously: 2026-10-11 18:20 EDT | Author: Claude (Builder, Step 4438.sync.1, task rec5slqVMpNVw0ytu) |\n//   the logic import uses the Framer file name ./SmartSearchLogic.tsx, and the paste text names the\n//   Framer files (Decision recePn5wppTKQ29Uw, blueprint TPR-6935).\n//\n// Paste into Framer: Assets > Code. Create the code file SmartSearchLogic.tsx FIRST and paste\n// JWN_SmartSearch_Logic.ts into it; then paste this file into the code file SmartSearch.tsx. The repo\n// names carry the JWN_ prefix and the Framer names do not, so the import below must stay ./ plus the\n// Framer file name (./SmartSearchLogic.tsx), never the repo name. Place ONE instance at the top of\n// the \"Filter Articles\" panel on /browse, above the Section select, width Fill.\n//\n// What it does. The reader types; 300 ms after the last key a keystroke query goes out\n// (parse:false, log:false); 800 ms after the last key, or on Enter, the settled query goes out once\n// (parse:true, log:true). Results replace the native article list (which is hidden while a query is\n// active and comes back on clear, under 2 characters, or on error). When the settled answer carries\n// `applied`, the parser's Section / Category / Tag are put into the native selects that read All,\n// never into one the reader set, and a \"Set from your words\" block offers a one-tap undo.\n//\n// Every decision lives in JWN_SmartSearch_Logic.ts and is tested by\n// test/smart-search.assert.mjs. This file renders and touches the page DOM, nothing else.\n//\n// Fail soft: no select found -> search still runs on the URL scope, one console warning. No\n// native list found -> results render under the field, one console warning.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect,useRef,useCallback}from\"react\";import{createPortal}from\"react-dom\";import*as L from\"https://framerusercontent.com/modules/ppnMKQOvaY4G9mx10lDQ/HleGJ4MbbxAGG8Xtrt9C/SmartSearchLogic.js\";// ── Tokens (design spec section 2) ──\nconst T={head:\"Volkhov, serif\",ui:\"Satoshi, system-ui, sans-serif\",navy:\"#1a2744\",body:\"#4a4a4a\",muted:\"#6b6b6b\",card:\"#f5f0e5\",fill:\"#e8e2d4\",border:\"#c9c0ab\",blue:\"#3d5a9e\",tint:\"#e9eef8\",err:\"#a33a2c\",errBg:\"#fbecea\",ring:\"0 0 0 3px rgba(61,90,158,.35)\"};// ── The page DOM seam: the only code here that reads or writes Framer's own elements ──\nconst warned=new Set;function warnOnce(key,msg){if(warned.has(key))return;warned.add(key);console.warn(\"JWN_SmartSearch: \"+msg);}// Matched by the field id at the END of the name (the prefix is per breakpoint); when Framer has\n// more than one breakpoint's copy in the DOM, the visible one wins.\nfunction selectEl(key){const all=Array.from(document.querySelectorAll(`select[name$=\"${L.SELECT_FIELD[key]}\"]`));return all.find(s=>s.offsetParent!==null)||all[0]||null;}function readSelects(){const out={};for(const key of L.SCOPE_KEYS){const s=selectEl(key);if(!s){warnOnce(\"select-\"+key,`the ${key} select was not found; searching with the URL scope only.`);continue;}out[key]={value:s.value,options:Array.from(s.options).map(o=>({value:o.value,label:o.text,slug:L.slugifyLabel(o.text)}))};}return out;}// A change WE dispatch must not read as the reader's own choice, so the change listener skips\n// while this counter is up (dispatchEvent runs listeners synchronously).\nlet programmatic=0;function setSelect(key,value){const s=selectEl(key);if(!s)return false;if(s.value===value)return true;programmatic++;try{s.value=value;s.dispatchEvent(new Event(\"change\",{bubbles:true}));}finally{programmatic--;}return true;}// The native list is the parent of the article links in the same Framer Section as this\n// component, and See More is its next sibling, a \"Button CTA\" (measured 2026-10-10).\nfunction findNativeList(root,own){const scope=root?.closest('[data-framer-name=\"Section\"]')||document.body;const links=scope.querySelectorAll('a[href*=\"news-posts/\"]');for(const a of Array.from(links)){if(root?.contains(a)||own?.contains(a))continue;const list=a.parentElement;if(!list)continue;const next=list.nextElementSibling;return{list,seeMore:next&&next.getAttribute(\"data-framer-name\")===\"Button CTA\"?next:null};}return null;}function hideEl(el){if(!el||el.dataset.jwnSsHidden)return;el.dataset.jwnSsPrev=el.style.display;el.dataset.jwnSsHidden=\"1\";el.style.display=\"none\";}function showEl(el){if(!el||!el.dataset.jwnSsHidden)return;el.style.display=el.dataset.jwnSsPrev||\"\";delete el.dataset.jwnSsHidden;delete el.dataset.jwnSsPrev;}// The \"FROM YOUR WORDS\" tag and the 3 px left rule on a select the parser filled (spec 4.4),\n// and the mobile collapse of the selects (spec 5). Both act on the select's wrapper.\nfunction decorateSelects(tagged,collapsed){for(const key of L.SCOPE_KEYS){const s=selectEl(key);const wrap=s?.parentElement;if(!wrap||!wrap.parentElement)continue;const id=\"jwn-ss-tag-\"+key;let tag=document.getElementById(id);if(tagged.has(key)&&!collapsed){if(!tag){tag=document.createElement(\"div\");tag.id=id;tag.textContent=L.COPY.selectTag;Object.assign(tag.style,{font:`700 11px/1.4 ${T.ui}`,color:T.blue,letterSpacing:\".06em\",textTransform:\"uppercase\",margin:\"0 0 4px 0\"});wrap.parentElement.insertBefore(tag,wrap);}if(wrap.dataset.jwnSsRule===undefined)wrap.dataset.jwnSsRule=wrap.style.boxShadow;wrap.style.boxShadow=`inset 3px 0 0 ${T.blue}`;}else{tag?.remove();if(wrap.dataset.jwnSsRule!==undefined){wrap.style.boxShadow=wrap.dataset.jwnSsRule;delete wrap.dataset.jwnSsRule;}}if(collapsed)hideEl(wrap);else showEl(wrap);}}function sendClick(endpoint,body){const url=endpoint.replace(/\\/+$/,\"\")+\"/click\";const data=JSON.stringify(body);try{// text/plain keeps the beacon a simple request; the Worker parses the body as JSON either way.\nif(navigator.sendBeacon&&navigator.sendBeacon(url,new Blob([data],{type:\"text/plain;charset=UTF-8\"})))return;}catch{}fetch(url,{method:\"POST\",body:data,headers:{\"Content-Type\":\"application/json\"},keepalive:true}).catch(()=>{});}/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function JWN_SmartSearch(props){const endpoint=(props.endpoint||\"\").replace(/\\/+$/,\"\");const[q,setQ]=useState(\"\");const[phase,setPhase]=useState(\"idle\");const[rows,setRows]=useState([]);const[total,setTotal]=useState(0);const[shownQ,setShownQ]=useState(\"\");const[inFlight,setInFlight]=useState(false);const[slow,setSlow]=useState(false);const[fills,setFills]=useState([]);const[dates,setDates]=useState(null);const[residual,setResidual]=useState(\"\");const[live,setLive]=useState(\"\");const[selVer,setSelVer]=useState(0);const[host,setHost]=useState(null);const[narrow,setNarrow]=useState(false);const[filtersOpen,setFiltersOpen]=useState(false);const[focused,setFocused]=useState(false);const rootRef=useRef(null);const inputRef=useRef(null);const nativeRef=useRef(null);const seqRef=useRef(L.createSequencer());const abortRef=useRef(null);const timersRef=useRef({});const settledRef=useRef(null);const qRef=useRef(\"\");const fillsRef=useRef([]);// The pill the next request carries. A ref beside the state, because a handler that changes the\n// pill re-runs in the same tick, before React has re-rendered.\nconst datesRef=useRef(null);const putDates=d=>{datesRef.current=d;setDates(d);};qRef.current=q;fillsRef.current=fills;const active=L.searchable(q)&&phase!==\"idle\";// ── Requests ──\nconst stopTimers=()=>{clearTimeout(timersRef.current.slow);clearTimeout(timersRef.current.out);};const invalidate=useCallback(()=>{seqRef.current.next();abortRef.current?.abort();stopTimers();setInFlight(false);setSlow(false);},[]);const fail=useCallback(()=>{stopTimers();setInFlight(false);setSlow(false);setPhase(\"error\");setLive(L.liveText(\"error\",\"\"));},[]);// Put the parser's choices into the selects that read All, keeping fills from an earlier settle\n// that the reader has not touched (so their undo stays reachable).\nconst applyParsed=useCallback((applied,sent)=>{const before=readSelects();const kept=L.liveFills(fillsRef.current,before);const plan=L.planApplied(applied,before,sent);const done=plan.fills.filter(f=>setSelect(f.key,f.value));setFills([...kept,...done]);putDates(plan.dates);setResidual(applied?.residual||\"\");setSelVer(v=>v+1);},[]);const run=useCallback((text,flags,kind,offset=0)=>{if(!endpoint){warnOnce(\"endpoint\",\"no Search API URL is set.\");return;}const id=seqRef.current.next();abortRef.current?.abort();const ctl=new AbortController;abortRef.current=ctl;stopTimers();if(kind!==\"keystroke\")settledRef.current=kind===\"more\"?settledRef.current:{q:text,flags};setInFlight(true);setSlow(false);if(kind!==\"more\")setPhase(p=>p===\"idle\"||p===\"error\"?\"loading\":p);timersRef.current.slow=setTimeout(()=>{if(seqRef.current.isCurrent(id))setSlow(true);},L.SLOW_MS);timersRef.current.out=setTimeout(()=>{if(!seqRef.current.isCurrent(id))return;ctl.abort();fail();},L.TIMEOUT_MS);const sent=datesRef.current;const body=L.queryBody(text,L.currentScope(window.location.search,readSelects()),flags,window.location.pathname,offset,sent);fetch(endpoint+\"/query\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(body),signal:ctl.signal}).then(r=>r.json().catch(()=>null)).then(json=>{if(!seqRef.current.isCurrent(id))return;if(!L.isGoodResponse(json))return fail();stopTimers();setInFlight(false);setSlow(false);if(flags.parse)applyParsed(json.applied,sent);const got=json.results.map((r,i)=>({...r,rank:offset+i+1,qid:json.query_id}));setRows(prev=>kind===\"more\"?[...prev,...got]:got);setTotal(json.total);setShownQ(text);setPhase(json.total===0?\"zero\":\"results\");if(kind===\"settled\")setLive(json.total===0?L.liveText(\"none\",text):L.liveText(\"results\",text,json.total));}).catch(err=>{if(err?.name===\"AbortError\"&&!seqRef.current.isCurrent(id))return;if(seqRef.current.isCurrent(id))fail();});},[endpoint,applyParsed,fail]);const runRef=useRef(run);runRef.current=run;const schedRef=useRef(null);if(!schedRef.current){schedRef.current=L.createScheduler({set:(fn,ms)=>setTimeout(fn,ms),clear:h=>clearTimeout(h)},(text,flags)=>runRef.current(text,flags,flags.parse?\"settled\":\"keystroke\"));}const sched=schedRef.current;// A re-run after the reader or a button changed the scope: same words, parser off.\nconst rerun=useCallback((flags=L.KEYSTROKE)=>{const text=qRef.current.trim();if(!L.searchable(text))return;sched.cancel();runRef.current(text,flags,\"settled\");},[sched]);const clearAll=useCallback(()=>{sched.forget();invalidate();setQ(\"\");setRows([]);setTotal(0);setPhase(\"idle\");setFiltersOpen(false);inputRef.current?.focus();},[sched,invalidate]);// ── Page wiring: list host, #search, ?q=, hand changes to the selects ──\nuseEffect(()=>{const root=rootRef.current;const el=document.createElement(\"div\");el.setAttribute(\"data-jwn-smart-search-results\",\"\");const found=findNativeList(root,el);if(found&&found.list.parentElement){nativeRef.current=found;found.list.parentElement.insertBefore(el,found.list);setHost(el);}else{warnOnce(\"list\",\"the native article list was not found; results show under the field.\");}readSelects()// warns once for any select it cannot find\n;const focusIfHash=()=>{if(window.location.hash===\"#search\")inputRef.current?.focus();};focusIfHash();window.addEventListener(\"hashchange\",focusIfHash);const q0=L.qFromSearch(window.location.search);if(L.searchable(q0)){setQ(q0);sched.enter(q0);}const onChange=e=>{if(programmatic>0)return;const t=e.target;if(!t||t.tagName!==\"SELECT\")return;if(!L.scopeKeyForName(t.name))return;setSelVer(v=>v+1);putDates(L.datesAfter(\"select-change\",datesRef.current))// the pill stays: the request carries it\n;if(L.searchable(qRef.current))rerun();};document.addEventListener(\"change\",onChange,true);return()=>{window.removeEventListener(\"hashchange\",focusIfHash);document.removeEventListener(\"change\",onChange,true);sched.cancel();abortRef.current?.abort();stopTimers();decorateSelects(new Set,false);showEl(nativeRef.current?.list||null);showEl(nativeRef.current?.seeMore||null);el.remove();};},[]);// Narrow layout follows the width of the area the results render in (spec 5: under 600 px).\nuseEffect(()=>{const target=host||rootRef.current;if(!target||typeof ResizeObserver===\"undefined\")return;const ro=new ResizeObserver(()=>setNarrow(target.getBoundingClientRect().width<600));ro.observe(target);return()=>ro.disconnect();},[host]);// One list at a time: hide the native list while a query is active, show it otherwise.\nuseEffect(()=>{let n=nativeRef.current;if(n&&!document.contains(n.list)){n=findNativeList(rootRef.current,host);if(n)nativeRef.current=n;}const hide=L.searchable(q)&&phase!==\"idle\"&&phase!==\"error\";if(hide){hideEl(n?.list||null);hideEl(n?.seeMore||null);}else{showEl(n?.list||null);showEl(n?.seeMore||null);}},[q,phase,host]);const selects=typeof document===\"undefined\"?{}:readSelects();const parserFills=L.liveFills(fills,selects);const collapsed=narrow&&active&&!filtersOpen;useEffect(()=>{decorateSelects(new Set(parserFills.map(f=>f.key)),collapsed);},[selVer,fills,collapsed]);// ── Handlers ──\nconst onInput=v=>{setQ(v);if(!L.searchable(v)){invalidate();setPhase(\"idle\");setRows([]);if(!v.trim())sched.forget();}sched.input(v);};const onKey=e=>{if(e.key===\"Enter\"){e.preventDefault();sched.enter(q);}else if(e.key===\"Escape\"){e.preventDefault();clearAll();}};const settleText=text=>{setQ(text);sched.forget();sched.enter(text);};const removeFill=f=>{setSelect(f.key,L.ALL_VALUE);setFills(fills.filter(x=>x!==f));putDates(L.datesAfter(\"remove-fill\",datesRef.current));setSelVer(v=>v+1);rerun();};const removeDates=()=>{putDates(L.datesAfter(\"remove-dates\",datesRef.current));rerun();};const undo=()=>{for(const key of L.planUndo(fills,readSelects()))setSelect(key,L.ALL_VALUE);setFills([]);putDates(L.datesAfter(\"undo\",datesRef.current));setResidual(\"\");setSelVer(v=>v+1);rerun();inputRef.current?.focus();};const searchAllSections=()=>{for(const key of L.SCOPE_KEYS)setSelect(key,L.ALL_VALUE);setFills([]);putDates(L.datesAfter(\"search-all\",datesRef.current));setResidual(\"\");setSelVer(v=>v+1);rerun({parse:false,log:true});};const showMore=()=>{const s=settledRef.current;putDates(L.datesAfter(\"more\",datesRef.current));if(s)run(s.q,s.flags,\"more\",rows.length);};const retry=()=>{const s=settledRef.current;putDates(L.datesAfter(\"retry\",datesRef.current));if(s)run(s.q,s.flags,\"settled\");else sched.enter(q);};const onRowClick=r=>{if(r.qid)sendClick(endpoint,{query_id:r.qid,slug:r.slug,rank:r.rank});};// ── Render ──\nconst labels=L.setLabels(selects);const chipCount=parserFills.length+(dates?1:0);const showBlock=chipCount>0;const readerSet=labels.length-parserFills.length;const results=active?/*#__PURE__*/_jsx(Results,{phase:phase,rows:rows,total:total,q:shownQ||q.trim(),labels:labels,selects:selects,narrow:narrow,fading:inFlight&&rows.length>0,slow:slow&&inFlight,onClear:clearAll,onMore:showMore,onRetry:retry,onSearchAll:searchAllSections,onSearchWord:settleText,onRowClick:onRowClick}):null;return /*#__PURE__*/_jsxs(\"div\",{ref:rootRef,className:\"jwn-ss\",style:{width:\"100%\",maxWidth:\"100%\",minWidth:0,fontFamily:T.ui,color:T.navy},children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:CSS}}),/*#__PURE__*/_jsx(\"label\",{htmlFor:\"jwn-ss-input\",className:\"jwn-ss-sr\",children:L.COPY.label}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\"},children:[/*#__PURE__*/_jsxs(\"svg\",{\"aria-hidden\":\"true\",width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",style:{position:\"absolute\",left:14,top:16,color:T.muted},children:[/*#__PURE__*/_jsx(\"circle\",{cx:\"10.5\",cy:\"10.5\",r:\"6.5\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2.2\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M15.5 15.5 21 21\",stroke:\"currentColor\",strokeWidth:\"2.2\",strokeLinecap:\"round\"})]}),/*#__PURE__*/_jsx(\"input\",{id:\"jwn-ss-input\",ref:inputRef,className:\"jwn-ss-input\",type:\"search\",autoComplete:\"off\",spellCheck:false,placeholder:L.COPY.placeholder,value:q,onChange:e=>onInput(e.target.value),onKeyDown:onKey,onFocus:()=>setFocused(true),onBlur:()=>setFocused(false)}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",right:2,top:2,width:44,height:44,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:inFlight?/*#__PURE__*/_jsx(\"span\",{className:\"jwn-ss-spin\",\"aria-hidden\":\"true\"}):q?/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"jwn-ss-x\",\"aria-label\":L.COPY.clearAria,onClick:clearAll,children:\"\\xd7\"}):null})]}),!active&&(focused||q)&&!L.searchable(q)?/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"p\",{style:{margin:\"8px 0 4px\",font:`13px/1.45 ${T.ui}`,color:T.body},children:L.COPY.help}),L.COPY.examples.map(ex=>/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"jwn-ss-example\",onMouseDown:e=>e.preventDefault(),onClick:()=>settleText(ex),children:ex},ex))]}):null,showBlock?/*#__PURE__*/_jsxs(\"div\",{className:\"jwn-ss-applied\",style:{marginTop:12,background:T.tint,borderLeft:`3px solid ${T.blue}`,borderRadius:4,padding:\"12px 16px\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{font:`700 13px/1.4 ${T.ui}`,color:T.navy,marginBottom:8},children:L.COPY.appliedTitle}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexWrap:\"wrap\",gap:8},children:[parserFills.map(f=>/*#__PURE__*/_jsx(Chip,{label:f.label,onRemove:()=>removeFill(f)},f.key)),dates?/*#__PURE__*/_jsx(Chip,{label:L.datePill(dates.from,dates.to),onRemove:removeDates}):null]}),residual?/*#__PURE__*/_jsx(\"p\",{style:{margin:\"8px 0 0\",font:`13px/1.45 ${T.ui}`,color:T.body},children:L.COPY.residual(residual)}):null,/*#__PURE__*/_jsx(\"div\",{style:{display:narrow?\"block\":\"inline-block\",marginTop:4},children:/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"jwn-ss-undo\",onClick:undo,children:L.undoLabel(chipCount)})})]}):null,narrow&&active?/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"jwn-ss-btn jwn-ss-filters\",\"aria-expanded\":filtersOpen,onClick:()=>setFiltersOpen(o=>!o),children:L.mobileFiltersLabel(parserFills.length,Math.max(0,readerSet))}):null,/*#__PURE__*/_jsx(\"div\",{className:\"jwn-ss-sr\",\"aria-live\":\"polite\",children:live}),results?host?/*#__PURE__*/createPortal(results,host):/*#__PURE__*/_jsx(\"div\",{style:{marginTop:16},children:results}):null]});}// ── Pieces ──\nfunction Chip(p){return /*#__PURE__*/_jsxs(\"span\",{className:\"jwn-ss-chip\",children:[p.label,/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"jwn-ss-chip-x\",\"aria-label\":L.COPY.chipAria(p.label),onClick:p.onRemove,children:\"\\xd7\"})]});}function Results(p){if(p.phase===\"error\"){return /*#__PURE__*/_jsxs(\"div\",{className:\"jwn-ss jwn-ss-results\",style:{background:T.errBg,borderRadius:10,padding:16,marginBottom:24},children:[/*#__PURE__*/_jsx(\"p\",{style:{margin:\"0 0 12px\",font:`15px/1.5 ${T.ui}`,color:T.err},children:L.COPY.error}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"jwn-ss-btn\",style:{color:T.err,borderColor:T.err},onClick:p.onRetry,children:L.COPY.retry})]});}if(p.slow&&(p.phase===\"loading\"||p.rows.length===0)){return /*#__PURE__*/_jsxs(\"div\",{className:\"jwn-ss jwn-ss-results\",style:{marginBottom:24},children:[/*#__PURE__*/_jsx(\"p\",{style:{margin:\"0 0 16px\",font:`15px/1.5 ${T.ui}`,color:T.body},children:L.COPY.slow(p.q)}),[0,1,2].map(i=>/*#__PURE__*/_jsx(Skeleton,{narrow:p.narrow},i))]});}if(p.phase===\"loading\")return null;if(p.phase===\"zero\"){const word=L.broaderWord(p.q);return /*#__PURE__*/_jsxs(\"div\",{className:\"jwn-ss jwn-ss-results\",style:{background:T.card,borderRadius:10,padding:24,marginBottom:24},children:[/*#__PURE__*/_jsx(\"p\",{style:{margin:\"0 0 8px\",font:`19px/1.3 ${T.head}`,color:T.navy},children:L.zeroTitle(p.q,p.labels)}),/*#__PURE__*/_jsx(\"p\",{style:{margin:\"0 0 16px\",font:`15px/1.5 ${T.ui}`,color:T.body},children:L.COPY.zeroHint}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexWrap:\"wrap\",gap:8},children:[p.labels.length?/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"jwn-ss-primary\",onClick:p.onSearchAll,children:L.COPY.searchAll}):null,word?/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"jwn-ss-btn\",onClick:()=>p.onSearchWord(word),children:L.COPY.searchWord(word)}):null]})]});}return /*#__PURE__*/_jsxs(\"div\",{className:\"jwn-ss jwn-ss-results\",style:{marginBottom:24,opacity:p.fading?.55:1},children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:p.narrow?\"column\":\"row\",alignItems:p.narrow?\"flex-start\":\"flex-start\",justifyContent:\"space-between\",gap:12,marginBottom:16},children:[/*#__PURE__*/_jsxs(\"div\",{style:{minWidth:0},children:[/*#__PURE__*/_jsx(\"p\",{style:{margin:0,font:`19px/1.3 ${T.head}`,color:T.navy},children:L.resultsHeader(p.total,p.q)}),/*#__PURE__*/_jsx(\"p\",{style:{margin:\"4px 0 0\",font:`13px/1.45 ${T.ui}`,color:T.muted},children:L.scopeLine(p.labels)})]}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"jwn-ss-btn\",onClick:p.onClear,children:L.COPY.clear})]}),/*#__PURE__*/_jsx(\"ol\",{style:{listStyle:\"none\",margin:0,padding:0,display:\"flex\",flexDirection:\"column\",gap:12},children:p.rows.map(r=>/*#__PURE__*/_jsx(\"li\",{children:/*#__PURE__*/_jsx(ResultRow,{r:r,selects:p.selects,narrow:p.narrow,onClick:()=>p.onRowClick(r)})},r.rank+\":\"+r.slug))}),p.total>p.rows.length?/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"jwn-ss-btn\",style:{width:\"100%\",marginTop:16},onClick:p.onMore,children:L.COPY.more}):null]});}function ResultRow(p){const{r,narrow}=p;const w=narrow?88:176;const h=narrow?88:99;const section=L.labelForSlug(p.selects.section,r.section);const category=L.labelForSlug(p.selects.category,r.category);return /*#__PURE__*/_jsxs(\"a\",{href:r.url,className:\"jwn-ss-row\",onClick:p.onClick,style:{display:\"flex\",gap:16,alignItems:\"flex-start\",background:T.card,borderRadius:10,padding:16,textDecoration:\"none\",minWidth:0},children:[r.image?/*#__PURE__*/_jsx(\"img\",{src:r.image,alt:\"\",loading:\"lazy\",width:w,height:h,style:{width:w,height:h,flex:\"none\",borderRadius:4,objectFit:\"cover\"}}):/*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{width:w,height:h,flex:\"none\",borderRadius:4,background:T.fill,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",font:`23px/1 ${T.head}`,color:T.muted},children:\"JW\"}),/*#__PURE__*/_jsxs(\"div\",{style:{minWidth:0,flex:1},children:[section||category?/*#__PURE__*/_jsxs(\"div\",{style:{font:`12px/1.4 ${T.ui}`,textTransform:\"uppercase\",letterSpacing:\".06em\",marginBottom:4},children:[section?/*#__PURE__*/_jsx(\"span\",{style:{color:L.sectionColor(r.section)},children:section}):null,section&&category?/*#__PURE__*/_jsx(\"span\",{style:{color:T.muted},children:\" \\xb7 \"}):null,category?/*#__PURE__*/_jsx(\"span\",{style:{color:T.muted},children:category}):null]}):null,/*#__PURE__*/_jsx(\"span\",{className:\"jwn-ss-title\",style:{font:`${narrow?17:19}px/1.3 ${T.head}`,color:T.navy,WebkitLineClamp:narrow?3:2},children:r.title}),!narrow&&r.summary?/*#__PURE__*/_jsx(\"span\",{className:\"jwn-ss-summary\",style:{font:`15px/1.5 ${T.ui}`,color:T.body},children:r.summary}):null,r.date?/*#__PURE__*/_jsx(\"span\",{style:{display:\"block\",marginTop:4,font:`italic 13px/1.4 ${T.ui}`,color:T.muted},children:L.longDate(r.date)}):null]})]});}function Skeleton(p){const w=p.narrow?88:176;const h=p.narrow?88:99;return /*#__PURE__*/_jsxs(\"div\",{\"aria-hidden\":\"true\",className:\"jwn-ss-skel\",style:{display:\"flex\",gap:16,background:T.card,borderRadius:10,padding:16,marginBottom:12},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:w,height:h,flex:\"none\",borderRadius:4,background:T.fill}}),/*#__PURE__*/_jsxs(\"div\",{style:{flex:1,minWidth:0},children:[/*#__PURE__*/_jsx(\"div\",{style:{height:12,width:\"30%\",background:T.fill,borderRadius:4,marginBottom:10}}),/*#__PURE__*/_jsx(\"div\",{style:{height:19,width:\"85%\",background:T.fill,borderRadius:4,marginBottom:10}}),/*#__PURE__*/_jsx(\"div\",{style:{height:15,width:\"65%\",background:T.fill,borderRadius:4}})]})]});}// Hover, focus and motion rules need real CSS; everything is scoped under .jwn-ss.\nconst CSS=`\n.jwn-ss, .jwn-ss * { box-sizing: border-box; }\n.jwn-ss-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }\n.jwn-ss-input { width: 100%; height: 48px; padding: 0 44px 0 40px; background: #fff; border: 1px solid ${T.border}; border-radius: 4px; font: 16px/1.2 ${T.ui}; color: ${T.navy}; outline: none; -webkit-appearance: none; appearance: none; }\n.jwn-ss-input::placeholder { color: ${T.muted}; opacity: 1; }\n.jwn-ss-input::-webkit-search-cancel-button { display: none; }\n.jwn-ss-input:focus { border-color: ${T.blue}; box-shadow: ${T.ring}; }\n.jwn-ss button { cursor: pointer; font-family: ${T.ui}; }\n.jwn-ss button:focus-visible, .jwn-ss-row:focus-visible { outline: 2px solid ${T.blue}; outline-offset: 0; box-shadow: ${T.ring}; }\n.jwn-ss-x { width: 44px; height: 44px; border: 0; background: transparent; color: ${T.muted}; font-size: 22px; line-height: 1; border-radius: 4px; }\n.jwn-ss-spin { width: 16px; height: 16px; border: 2px solid ${T.fill}; border-top-color: ${T.blue}; border-radius: 50%; animation: jwn-ss-rot .8s linear infinite; }\n@keyframes jwn-ss-rot { to { transform: rotate(360deg); } }\n.jwn-ss-example { display: block; width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; text-align: left; font-size: 14px; color: ${T.blue}; }\n.jwn-ss-example:hover { text-decoration: underline; }\n.jwn-ss-chip { display: inline-flex; align-items: center; height: 36px; padding: 0 0 0 14px; background: #fff; border: 1px solid ${T.blue}; border-radius: 999px; font: 14px/1 ${T.ui}; color: ${T.blue}; }\n.jwn-ss-chip-x { position: relative; width: 28px; height: 28px; margin: 0 4px 0 2px; border: 0; background: transparent; color: ${T.blue}; font-size: 18px; line-height: 1; border-radius: 50%; }\n.jwn-ss-chip-x::before { content: \"\"; position: absolute; inset: -8px; }\n.jwn-ss-undo { min-height: 44px; padding: 0; border: 0; background: transparent; font-size: 14px; font-weight: 700; color: ${T.blue}; text-decoration: underline; }\n.jwn-ss-btn { min-height: 44px; padding: 0 16px; background: transparent; border: 1px solid ${T.border}; border-radius: 4px; font-size: 14px; color: ${T.navy}; flex: none; }\n.jwn-ss-filters { width: 100%; margin-top: 12px; text-align: left; }\n.jwn-ss-primary { min-height: 44px; padding: 0 16px; background: ${T.navy}; color: #fff; border: 0; border-radius: 4px; font-size: 15px; font-weight: 700; }\n.jwn-ss-row:hover .jwn-ss-title { text-decoration: underline; }\n.jwn-ss-title { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }\n.jwn-ss-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 4px; }\n.jwn-ss-results, .jwn-ss-applied { transition: opacity 200ms ease; }\n@media (prefers-reduced-motion: reduce) {\n  .jwn-ss-results, .jwn-ss-applied { transition: none; }\n  .jwn-ss-spin { animation-duration: 2.4s; }\n}\n`;addPropertyControls(JWN_SmartSearch,{endpoint:{type:ControlType.String,title:\"Search API URL\",defaultValue:\"https://jw-search.eric-belozovsky.workers.dev\",description:\"The jw-search Worker. /query and /click are added to it.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"JWN_SmartSearch\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SmartSearch.map"],"mappings":"qOAyBqF,SAAgB,GAAgB,EAAK,CAAsB,OAAjB,GAAwB,EAAW,KAAK,GAAG,EAAK,SAAS,EAAa,EAAE,CAAC,GAA7D,IAAqE,CAIhN,SAAgB,GAAa,EAAM,CAAC,OAAO,OAAO,GAAO,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,QAAQ,SAAS,EAAE,CAAC,CAAC,QAAQ,cAAc,GAAG,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAE,CAE/H,SAAgB,GAAgB,EAAO,CAAC,IAAM,EAAO,IAAI,gBAAgB,GAAQ,EAAE,EAAQ,EAAM,CAAC,EAAE,IAAI,IAAM,KAAO,EAAW,CAAC,IAAM,GAAG,EAAO,IAAI,EAAU,EAAI,GAAG,GAAA,CAAI,KA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