theme.keycloak.v2.account.resources.util.ParseLink.js.map Maven / Gradle / Ivy
{"version":3,"file":"ParseLink.js","names":["parse","linkHeader","links","split","reduce","acc","link","matcher","match","linkUrl","rel"],"sources":["../../src/app/util/ParseLink.ts"],"sourcesContent":["\nexport interface Links {\n prev?: string;\n next?: string;\n}\n\nfunction parse(linkHeader: string | undefined): Links {\n if (!linkHeader) return {};\n const links = linkHeader.split(/,\\s*);\n return links.reduce((acc: Links, link: string): Links => {\n const matcher = link.match(/([^>]*)>(.*)/);\n if (!matcher) return {};\n const linkUrl = matcher[1];\n const rel = matcher[2].match(/\\s*(.+)\\s*=\\s*\"?([^\"]+)\"?/);\n if (rel) {\n acc[rel[2]] = linkUrl;\n }\n return acc;\n }, {});\n}\n\nexport default parse;"],"mappings":"AAMA,SAASA,KAAKA,CAACC,UAA8B,EAAS;EACpD,IAAI,CAACA,UAAU,EAAE,OAAO,CAAC,CAAC;EAC1B,MAAMC,KAAK,GAAGD,UAAU,CAACE,KAAK,CAAC,OAAO,CAAC;EACvC,OAAOD,KAAK,CAACE,MAAM,CAAQ,CAACC,GAAU,EAAEC,IAAY,KAAY;IAC9D,MAAMC,OAAO,GAAGD,IAAI,CAACE,KAAK,CAAC,gBAAgB,CAAC;IAC5C,IAAI,CAACD,OAAO,EAAE,OAAO,CAAC,CAAC;IACvB,MAAME,OAAO,GAAGF,OAAO,CAAC,CAAC,CAAC;IAC1B,MAAMG,GAAG,GAAGH,OAAO,CAAC,CAAC,CAAC,CAACC,KAAK,CAAC,2BAA2B,CAAC;IACzD,IAAIE,GAAG,EAAE;MACLL,GAAG,CAACK,GAAG,CAAC,CAAC,CAAC,CAAC,GAAGD,OAAO;IACzB;IACA,OAAOJ,GAAG;EACZ,CAAC,EAAE,CAAC,CAAC,CAAC;AACR;AAEA,eAAeL,KAAK"}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy