Files
klz-cables.com/.pnpm-store/v10/files/07/8f3955a8c130f4a6a5a31eb9596688a3bc784503d460c0e7f8cca9f99d12e66b9eaf192c8ddbbca935e85ab0086e032c1299b7581d2e438cd87fabfa180d68
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

1 line
1.4 KiB
Plaintext

{"version":3,"sources":["../../src/utilities/wordBoundariesRegex.ts"],"sourcesContent":["export const wordBoundariesRegex = (input: string): RegExp => {\n const words = input.split(' ')\n\n // Regex word boundaries that work for cyrillic characters - https://stackoverflow.com/a/47062016/1717697\n const wordBoundaryBefore = '(?:(?:[^\\\\p{L}\\\\p{N}])|^)' // Converted to a non-matching group instead of positive lookbehind for Safari\n const wordBoundaryAfter = '(?=[^\\\\p{L}\\\\p{N}]|$)'\n const regex = words.reduce((pattern, word, i) => {\n const escapedWord = word.replace(/[\\\\^$*+?.()|[\\]{}]/g, '\\\\$&')\n return `${pattern}(?=.*${wordBoundaryBefore}.*${escapedWord}.*${wordBoundaryAfter})${\n i + 1 === words.length ? '.+' : ''\n }`\n }, '')\n return new RegExp(regex, 'i')\n}\n"],"names":["wordBoundariesRegex","input","words","split","wordBoundaryBefore","wordBoundaryAfter","regex","reduce","pattern","word","i","escapedWord","replace","length","RegExp"],"mappings":"AAAA,OAAO,MAAMA,sBAAsB,CAACC;IAClC,MAAMC,QAAQD,MAAME,KAAK,CAAC;IAE1B,yGAAyG;IACzG,MAAMC,qBAAqB,4BAA4B,8EAA8E;;IACrI,MAAMC,oBAAoB;IAC1B,MAAMC,QAAQJ,MAAMK,MAAM,CAAC,CAACC,SAASC,MAAMC;QACzC,MAAMC,cAAcF,KAAKG,OAAO,CAAC,uBAAuB;QACxD,OAAO,GAAGJ,QAAQ,KAAK,EAAEJ,mBAAmB,EAAE,EAAEO,YAAY,EAAE,EAAEN,kBAAkB,CAAC,EACjFK,IAAI,MAAMR,MAAMW,MAAM,GAAG,OAAO,IAChC;IACJ,GAAG;IACH,OAAO,IAAIC,OAAOR,OAAO;AAC3B,EAAC"}