{"version":3,"file":"WeftFAQ.IRLNRoFr.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/VKjxRsJ8obB93CJpUt8R/MvvtgOwjoyip8VGTwfjI/WeftFAQ.js"],"sourcesContent":["// Weft — Help / FAQ.\n// Tabbed help centre: switch topic (Orders, Shipping, Returns, Care…) and open questions in a\n// smooth accordion. Optional size-guide table below (link to it with /help#size-guide).\n// The default answers match the template's legal pages (Shipping, Returns & withdrawal) — keep\n// them in sync when you edit either.\n// Site search: every question (all tabs) is exposed to the Header's search, which reads the Help\n// page — so edits here show up in search automatically. A search result opens the right tab and\n// question through /help#faq-<question>.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState}from\"react\";/** URL-safe id for a question: \"Is delivery free?\" → \"is-delivery-free\" */export const faqId=q=>String(q||\"\").toLowerCase().normalize(\"NFD\").replace(/[̀-ͯ]/g,\"\").replace(/[^a-z0-9]+/g,\"-\").replace(/^-+|-+$/g,\"\").slice(0,60);export const FAQ_DEFAULT=[{topic:\"Shipping\",q:\"How long does delivery take?\",a:\"2–4 working days across the EU and the UK. You'll get a tracking link as soon as your order leaves the studio.\"},{topic:\"Shipping\",q:\"Is delivery free?\",a:\"Delivery is free on orders over €150. Below that it's a flat rate, shown at checkout before you pay.\"},{topic:\"Shipping\",q:\"Where do you deliver?\",a:\"Across the EU and the United Kingdom. If your country isn't available at checkout, write to us — we may be able to help.\"},{topic:\"Returns\",q:\"What's your returns policy?\",a:\"You have 30 days from delivery to return unworn pieces with tags attached. On top of that, EU and UK customers have a legal 14-day right to withdraw from any purchase without giving a reason.\"},{topic:\"Returns\",q:\"How do I start a return?\",a:\"Use “Withdraw from contract here” at the bottom of any page — two steps, no account needed — or reply to your order confirmation email. We confirm by email and send you the returns address.\"},{topic:\"Returns\",q:\"When do I get my refund?\",a:\"Within 14 days of receiving your withdrawal at the latest — usually much sooner. We may wait until the parcel reaches us. Refunds go back to the payment method you used.\"},{topic:\"Returns\",q:\"Can I exchange a size?\",a:\"Yes. Start a return and tell us the size you'd like in the note — we'll ship it as soon as your return is on its way.\"},{topic:\"Orders\",q:\"Can I change or cancel my order?\",a:\"Within one hour of ordering, reply to your confirmation email and we'll change or cancel it before it's packed.\"},{topic:\"Orders\",q:\"Which payment methods do you accept?\",a:\"All the methods shown at checkout — typically Visa, Mastercard, Amex, Apple Pay and Google Pay.\"},{topic:\"Care\",q:\"How should I care for wool?\",a:\"Brush after wearing, air it out, steam out creases and dry clean at most once a season.\"},{topic:\"Care\",q:\"Do you offer repairs?\",a:\"Yes, for life. Send us any Weft piece that needs mending and we'll fix it — free for the first two years.\"}];const SIZES=[[\"XS\",\"32\",\"80–84\",\"62–66\"],[\"S\",\"34–36\",\"84–88\",\"66–70\"],[\"M\",\"38\",\"88–92\",\"70–74\"],[\"L\",\"40\",\"92–98\",\"74–80\"],[\"XL\",\"42\",\"98–104\",\"80–86\"]];/**\n * Weft — Help / FAQ\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 1000\n */export default function WeftFAQ(props){const{items,showSizeGuide=true,ink=\"#121110\",soft=\"#5C5853\",muted=\"#8F8A82\",line=\"#D9D4CA\",accent=\"#2B35E0\",card=\"#F7F5F1\",style}=props;const list=Array.isArray(items)&&items.length?items:FAQ_DEFAULT;const topics=Array.from(new Set(list.map(x=>x.topic)));const[topic,setTopic]=useState(topics[0]||\"\");const[open,setOpen]=useState(0);const shown=list.filter(x=>x.topic===topic);// /help#size-guide scrolls to the size guide; /help#faq-<question> opens that question\nconst listKey=list.map(x=>x.q).join(\"|\");useEffect(()=>{if(typeof window===\"undefined\")return;let t=0;const go=()=>{const hash=decodeURIComponent(window.location.hash||\"\").replace(/^#/,\"\");if(!hash)return;let id=\"\";if(hash===\"size-guide\")id=\"size-guide\";else if(hash.startsWith(\"faq-\")){const hit=list.find(x=>\"faq-\"+faqId(x.q)===hash);if(!hit)return;setTopic(hit.topic);setOpen(list.filter(x=>x.topic===hit.topic).indexOf(hit));id=hash;}if(!id)return;clearTimeout(t);t=setTimeout(()=>document.getElementById(id)?.scrollIntoView({behavior:\"smooth\",block:\"start\"}),200);};go();window.addEventListener(\"hashchange\",go);return()=>{clearTimeout(t);window.removeEventListener(\"hashchange\",go);};},[listKey]);// Every question, for the Header's site search\nconst searchData=JSON.stringify(list.map(x=>({s:\"Help\",t:x.q,d:x.a,m:x.topic,h:\"#faq-\"+faqId(x.q)})));const css=`\n      .wq { container-type: inline-size; }\n      .wq-tab { all: unset; cursor: pointer; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid ${line}; font-size: 14px; transition: all 250ms; white-space: nowrap; }\n      .wq-tab[aria-selected=\"true\"] { background: ${ink}; color: #F7F5F1; border-color: ${ink}; }\n      .wq-tab:focus-visible, .wq-item button:focus-visible { outline: 2px solid ${accent}; outline-offset: 2px; }\n      .wq-item button { all: unset; cursor: pointer; width: 100%; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; font-size: clamp(17px, 1.8cqw, 21px); letter-spacing: -0.02em; }\n      .wq-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 500ms cubic-bezier(.2,.8,.2,1); }\n      .wq-body.on { grid-template-rows: 1fr; }\n      .wq-body > div { overflow: hidden; }\n      .wq-plus { width: 34px; height: 34px; flex: none; border-radius: 999px; border: 1px solid ${line}; display: grid; place-items: center; transition: transform 400ms cubic-bezier(.2,.8,.2,1), background 300ms, color 300ms; }\n      .wq-item button[aria-expanded=\"true\"] .wq-plus { transform: rotate(45deg); background: ${accent}; color: #fff; border-color: ${accent}; }\n      .wq table { width: 100%; border-collapse: collapse; font-size: 14px; }\n      .wq th, .wq td { text-align: left; padding: 12px 10px; border-bottom: 1px solid ${line}; }\n      .wq th { font: 500 11px 'Geist Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: ${muted}; }\n      #size-guide, .wq-item { scroll-margin-top: 104px; }\n    `;return /*#__PURE__*/_jsxs(\"section\",{className:\"wq\",\"data-weft-search\":searchData,style:{...style,width:\"100%\",color:ink,fontFamily:\"'Inter Tight', system-ui, sans-serif\"},children:[/*#__PURE__*/_jsx(\"style\",{children:css}),/*#__PURE__*/_jsx(\"div\",{role:\"tablist\",\"aria-label\":\"Help topics\",style:{display:\"flex\",gap:8,flexWrap:\"wrap\",marginBottom:20},children:topics.map(t=>/*#__PURE__*/_jsx(\"button\",{role:\"tab\",className:\"wq-tab\",\"aria-selected\":topic===t,onClick:()=>{setTopic(t);setOpen(0);},children:t},t))}),/*#__PURE__*/_jsx(\"div\",{role:\"tabpanel\",\"aria-label\":topic,style:{borderTop:`1px solid ${line}`},children:shown.map((x,i)=>/*#__PURE__*/_jsxs(\"div\",{id:\"faq-\"+faqId(x.q),className:\"wq-item\",style:{borderBottom:`1px solid ${line}`},children:[/*#__PURE__*/_jsxs(\"button\",{\"aria-expanded\":open===i,onClick:()=>setOpen(open===i?-1:i),children:[x.q,/*#__PURE__*/_jsx(\"span\",{className:\"wq-plus\",\"aria-hidden\":\"true\",children:\"+\"})]}),/*#__PURE__*/_jsx(\"div\",{className:`wq-body ${open===i?\"on\":\"\"}`,children:/*#__PURE__*/_jsx(\"div\",{children:/*#__PURE__*/_jsx(\"p\",{style:{margin:0,padding:\"0 48px 22px 0\",color:soft,fontSize:16,lineHeight:1.65},children:x.a})})})]},`${topic}${i}`))}),showSizeGuide&&/*#__PURE__*/_jsxs(\"div\",{id:\"size-guide\",style:{marginTop:\"clamp(40px, 5cqw, 72px)\",padding:\"clamp(20px, 2.6cqw, 32px)\",background:card,border:`1px solid ${line}`,borderRadius:22,overflowX:\"auto\"},children:[/*#__PURE__*/_jsx(\"h3\",{style:{margin:\"0 0 6px\",fontSize:24,fontWeight:500,letterSpacing:\"-0.03em\"},children:\"Size guide\"}),/*#__PURE__*/_jsx(\"p\",{style:{margin:\"0 0 18px\",color:soft,fontSize:14},children:\"Body measurements in centimetres. Between sizes? Size up for outerwear, down for knitwear.\"}),/*#__PURE__*/_jsxs(\"table\",{children:[/*#__PURE__*/_jsx(\"thead\",{children:/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"th\",{scope:\"col\",children:\"Size\"}),/*#__PURE__*/_jsx(\"th\",{scope:\"col\",children:\"EU\"}),/*#__PURE__*/_jsx(\"th\",{scope:\"col\",children:\"Chest\"}),/*#__PURE__*/_jsx(\"th\",{scope:\"col\",children:\"Waist\"})]})}),/*#__PURE__*/_jsx(\"tbody\",{children:SIZES.map(r=>/*#__PURE__*/_jsx(\"tr\",{children:r.map((c,k)=>/*#__PURE__*/_jsx(\"td\",{style:{fontWeight:k===0?500:400},children:c},k))},r[0]))})]})]})]});}WeftFAQ.defaultProps={showSizeGuide:true,ink:\"#121110\",soft:\"#5C5853\",muted:\"#8F8A82\",line:\"#D9D4CA\",accent:\"#2B35E0\",card:\"#F7F5F1\"};addPropertyControls(WeftFAQ,{items:{type:ControlType.Array,title:\"Questions\",maxCount:40,control:{type:ControlType.Object,controls:{topic:{type:ControlType.String,title:\"Topic\"},q:{type:ControlType.String,title:\"Question\"},a:{type:ControlType.String,title:\"Answer\",displayTextArea:true}}},description:\"Empty = default help content. Questions are grouped into tabs by Topic.\"},showSizeGuide:{type:ControlType.Boolean,title:\"Size guide\"},ink:{type:ControlType.Color,title:\"Ink\",defaultValue:\"#121110\"},soft:{type:ControlType.Color,title:\"Body\",defaultValue:\"#5C5853\"},muted:{type:ControlType.Color,title:\"Muted\",defaultValue:\"#8F8A82\"},line:{type:ControlType.Color,title:\"Line\",defaultValue:\"#D9D4CA\"},accent:{type:ControlType.Color,title:\"Accent\",defaultValue:\"#2B35E0\"},card:{type:ControlType.Color,title:\"Card\",defaultValue:\"#F7F5F1\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WeftFAQ\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"1000\"}},\"faqId\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"FAQ_DEFAULT\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WeftFAQ.map"],"mappings":"sMAaG,SAAwB,EAAQ,EAAM,CAAC,GAAK,CAAC,QAAM,gBAAc,GAAK,MAAI,UAAU,OAAK,UAAU,QAAM,UAAU,OAAK,UAAU,SAAO,UAAU,OAAK,UAAU,SAAO,EAAY,EAAK,MAAM,QAAQ,CAAK,GAAG,EAAM,OAAO,EAAM,EAAkB,EAAO,MAAM,KAAK,IAAI,IAAI,EAAK,IAAI,GAAG,EAAE,KAAK,CAAC,CAAC,EAAO,CAAC,EAAM,GAAUA,EAAS,EAAO,IAAI,EAAE,EAAO,CAAC,EAAK,GAASA,EAAS,CAAC,EAAQ,EAAM,EAAK,OAAO,GAAG,EAAE,QAAQ,CAAK,EACxX,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAI,EAAE,EAAQ,MAAO,CAAC,IAAM,EAAK,mBAAmB,EAAO,SAAS,MAAM,EAAE,CAAC,CAAC,QAAQ,KAAK,EAAE,EAAE,GAAG,CAAC,EAAK,OAAO,IAAI,EAAG,GAAG,GAAG,IAAO,aAAa,EAAG,kBAAkB,GAAG,EAAK,WAAW,MAAM,EAAE,CAAC,IAAM,EAAI,EAAK,KAAK,GAAG,OAAO,EAAM,EAAE,CAAC,IAAI,CAAI,EAAE,GAAG,CAAC,EAAI,OAAO,EAAS,EAAI,KAAK,EAAE,EAAQ,EAAK,OAAO,GAAG,EAAE,QAAQ,EAAI,KAAK,CAAC,CAAC,QAAQ,CAAG,CAAC,EAAE,EAAG,CAAK,CAAK,IAAU,aAAa,CAAC,EAAE,EAAE,eAAe,SAAS,eAAe,CAAE,CAAC,EAAE,eAAe,CA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