"use strict";Liferay.Loader.define("@liferay!analytics-settings-web$testing-library/dom@8.20.0/dist/queries/title",["module","exports","require","../query-helpers","../helpers","./all-utils"],(function(e,t,l){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.queryByTitle=t.queryAllByTitle=t.getByTitle=t.getAllByTitle=t.findByTitle=t.findAllByTitle=void 0;var i=l("../query-helpers"),r=l("../helpers"),a=l("./all-utils");const isSvgTitle=e=>{var t;return"title"===e.tagName.toLowerCase()&&"svg"===(null==(t=e.parentElement)?void 0:t.tagName.toLowerCase())},queryAllByTitle=(e,t,{exact:l=!0,collapseWhitespace:i,trim:n,normalizer:s}={})=>{(0,r.checkContainerType)(e);const y=l?a.matches:a.fuzzyMatches,o=(0,a.makeNormalizer)({collapseWhitespace:i,trim:n,normalizer:s});return Array.from(e.querySelectorAll("[title], svg > title")).filter((e=>y(e.getAttribute("title"),e,t,o)||isSvgTitle(e)&&y((0,a.getNodeText)(e),e,t,o)))},getMultipleError=(e,t)=>`Found multiple elements with the title: ${t}.`,getMissingError=(e,t)=>`Unable to find an element with the title: ${t}.`,e=(0,i.wrapAllByQueryWithSuggestion)(queryAllByTitle,queryAllByTitle.name,"queryAll");t.queryAllByTitle=e;const[n,s,y,o,u]=(0,a.buildQueries)(queryAllByTitle,getMultipleError,getMissingError);t.findByTitle=u,t.findAllByTitle=o,t.getByTitle=y,t.getAllByTitle=s,t.queryByTitle=n}}));
//# sourceMappingURL=title.js.map