{"version":3,"file":"loadZxcvbn.mjs","names":[],"sources":["../../../../../src/internal/clerk-js/passwords/loadZxcvbn.ts"],"sourcesContent":["import type { ModuleManager } from '@/moduleManager';\nimport type { ZxcvbnResult } from '@/types';\n\nexport type zxcvbnFN = (password: string, userInputs?: (string | number)[]) => ZxcvbnResult;\n\nexport const createLoadZxcvbn = (moduleManager: ModuleManager) => {\n const loadZxcvbn = () => {\n return Promise.all([\n moduleManager.import('@zxcvbn-ts/core'),\n moduleManager.import('@zxcvbn-ts/language-common'),\n ]).then(([coreModule, languageCommonModule]) => {\n if (!coreModule || !languageCommonModule) {\n throw new Error('Failed to load zxcvbn modules');\n }\n const { zxcvbnOptions, zxcvbn } = coreModule;\n const { dictionary, adjacencyGraphs } = languageCommonModule;\n zxcvbnOptions.setOptions({\n dictionary: {\n ...dictionary,\n },\n graphs: adjacencyGraphs,\n });\n return zxcvbn;\n });\n };\n\n return { loadZxcvbn };\n};\n"],"mappings":";AAKA,MAAa,oBAAoB,kBAAiC;CAChE,MAAM,mBAAmB;AACvB,SAAO,QAAQ,IAAI,CACjB,cAAc,OAAO,kBAAkB,EACvC,cAAc,OAAO,6BAA6B,CACnD,CAAC,CAAC,MAAM,CAAC,YAAY,0BAA0B;AAC9C,OAAI,CAAC,cAAc,CAAC,qBAClB,OAAM,IAAI,MAAM,gCAAgC;GAElD,MAAM,EAAE,eAAe,WAAW;GAClC,MAAM,EAAE,YAAY,oBAAoB;AACxC,iBAAc,WAAW;IACvB,YAAY,EACV,GAAG,YACJ;IACD,QAAQ;IACT,CAAC;AACF,UAAO;IACP;;AAGJ,QAAO,EAAE,YAAY"}