{"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-boolean-intersects/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACCA,yDAAgC;AA2BhC,SAAS,iBAAA,CACP,QAAA,EACA,QAAA,EACA;AAAA,EACE,wBAAA,EAA0B;AAC5B,EAAA,EAEI,CAAC,CAAA,EACL;AAGA,EAAA,OAAO,CAAC,8CAAA,QAAgB,EAAU,QAAA,EAAU,EAAE,wBAAwB,CAAC,CAAA;AACzE;AAGA,IAAO,cAAA,EAAQ,iBAAA;ADnCf;AACE;AACA;AACF,+EAAC","file":"/home/runner/work/turf/turf/packages/turf-boolean-intersects/dist/cjs/index.cjs","sourcesContent":[null,"import { Feature, Geometry } from \"geojson\";\nimport { booleanDisjoint } from \"@turf/boolean-disjoint\";\n\n/**\n * Boolean-intersects returns (TRUE) if the intersection of the two geometries is NOT an empty set.\n *\n * @function\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.ignoreSelfIntersections=true] ignore self-intersections on input features\n * @returns {boolean} true if geometries intersect, false otherwise\n * @example\n * var point1 = turf.point([2, 2]);\n * var point2 = turf.point([1, 2]);\n * var line = turf.lineString([[1, 1], [1, 3], [1, 4]]);\n *\n * turf.booleanIntersects(line, point1);\n * //=false\n *\n * turf.booleanIntersects(line, point2);\n * //=true\n *\n * //addToMap\n * var addToMap = [point1, point2, line];\n * point1.properties['marker-color'] = '#f00'\n * point2.properties['marker-color'] = '#0f0'\n */\nfunction booleanIntersects(\n  feature1: Feature<any> | Geometry,\n  feature2: Feature<any> | Geometry,\n  {\n    ignoreSelfIntersections = true,\n  }: {\n    ignoreSelfIntersections?: boolean;\n  } = {}\n) {\n  // booleanDisjoint already compares every flattened geometry pair, so\n  // intersects is simply its negation.\n  return !booleanDisjoint(feature1, feature2, { ignoreSelfIntersections });\n}\n\nexport { booleanIntersects };\nexport default booleanIntersects;\n"]}