"use strict";Liferay.Loader.define("@liferay!analytics-settings-web$testing-library/dom@8.20.0/dist/matches",["module","exports","require"],(function(e,t,r){window;{function assertNotNullOrUndefined(e){if(null==e)throw new Error(`It looks like ${e} was passed instead of a matcher. Did you do something like getByText(${e})?`)}function getDefaultNormalizer({trim:e=!0,collapseWhitespace:t=!0}={}){return r=>{let o=r;return o=e?o.trim():o,o=t?o.replace(/\s+/g," "):o,o}}function matchRegExp(e,t){const r=e.test(t);return e.global&&0!==e.lastIndex&&(console.warn("To match all elements we had to reset the lastIndex of the RegExp because the global flag is enabled. We encourage to remove the global flag from the RegExp."),e.lastIndex=0),r}Object.defineProperty(t,"__esModule",{value:!0}),t.fuzzyMatches=function fuzzyMatches(e,t,r,o){if("string"!=typeof e)return!1;assertNotNullOrUndefined(r);const a=o(e);return"string"==typeof r||"number"==typeof r?a.toLowerCase().includes(r.toString().toLowerCase()):"function"==typeof r?r(a,t):matchRegExp(r,a)},t.getDefaultNormalizer=getDefaultNormalizer,t.makeNormalizer=function makeNormalizer({trim:e,collapseWhitespace:t,normalizer:r}){if(!r)return getDefaultNormalizer({trim:e,collapseWhitespace:t});if(void 0!==e||void 0!==t)throw new Error('trim and collapseWhitespace are not supported with a normalizer. If you want to use the default trim and collapseWhitespace logic in your normalizer, use "getDefaultNormalizer({trim, collapseWhitespace})" and compose that into your normalizer');return r},t.matches=function matches(e,t,r,o){if("string"!=typeof e)return!1;assertNotNullOrUndefined(r);const a=o(e);return r instanceof Function?r(a,t):r instanceof RegExp?matchRegExp(r,a):a===String(r)}}}));
//# sourceMappingURL=matches.js.map