{"version":3,"sources":["globals/internal/collection-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,MAAM,MACd,UAAU,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC,OAAO,CAAC,sBAC3B,IAAI,iCAAqB,OAAO,eACvC,GAAG,UACwC,CAAC;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,SAAS,MACjB,UAAU,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC,OAAO,CAAC,sBAC3B,IAAI,iCAAqB,OAAO,eACvC,GAAG,WAC2C,CAAC;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,IAAI,MACZ,UAAU,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC,OAAO,CAAC,sBAC3B,IAAI,iCAAqB,OAAO,eACvC,GAAG,QACsC,CAAC;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,OAAO,MACf,UAAU,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC,OAAO,CAAC,sBAC3B,OAAO,iCAAqB,IAAI,eACvC,GAAG,SACyC,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,OAAO,MAAO,UAAU,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC,OAAO,CAAC,QAAQ,IAAI,WAA0C,CAAC","file":"collection-helpers.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * @param a A DOM collection.\n * @param predicate The callback function.\n * @param [thisObject] The context object for the given callback function.\n * @returns A new array with all elements where `predicate` returns truthy.\n */\nexport const filter = (\n  a: NodeListOf<Node> | HTMLCollectionOf<Element>,\n  predicate: (search: Node, index?: number) => boolean,\n  thisObject?: any\n) => Array.prototype.filter.call(a, predicate, thisObject);\n\n/**\n * @param a A DOM collection.\n * @param predicate The callback function.\n * @param [thisObject] The context object for the given callback function.\n * @returns The index of the first item in the given collection where `predicate` returns `true`. `-1` if no such item is found.\n */\nexport const findIndex = (\n  a: NodeListOf<Node> | HTMLCollectionOf<Element>,\n  predicate: (search: Node, index?: number) => boolean,\n  thisObject?: any\n) => Array.prototype.findIndex.call(a, predicate, thisObject);\n\n/**\n * @param a A DOM collection.\n * @param predicate The callback function.\n * @param [thisObject] The context object for the given callback function.\n * @returns The first item in the given collection where `predicate` returns `true`. `null` if no such item is found.\n */\nexport const find = (\n  a: NodeListOf<Node> | HTMLCollectionOf<Element>,\n  predicate: (search: Node, index?: number) => boolean,\n  thisObject?: any\n) => Array.prototype.find.call(a, predicate, thisObject);\n\n/**\n * Walks through the given DOM collection and runs the given callback.\n * @param a A DOM collection.\n * @param predicate The callback function.\n * @param [thisObject] The context object for the given callback function.\n */\nexport const forEach = (\n  a: NodeListOf<Node> | HTMLCollectionOf<Element>,\n  predicate: (search: Element, index?: number) => void,\n  thisObject?: any\n) => Array.prototype.forEach.call(a, predicate, thisObject);\n\n/**\n * @param a A DOM collection.\n * @param item An item in the DOM collection.\n * @returns The index of the first occurence of the given item in the given collection. `-1` if no such item is found.\n */\nexport const indexOf = (a: NodeListOf<Node> | HTMLCollectionOf<Element>, item: Node) => Array.prototype.indexOf.call(a, item);\n"]}