{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAQM,MAAM,kDAAkB;IAI7B,YAAY,IAAgC,EAAE,SAAsB,EAAE,UAAuB,CAAE;QAC7F,KAAK,CAAC;QACN,IAAI,gBAAgB,2CAAW;YAC7B,IAAI,CAAC,SAAS,GAAG,aAAa,KAAK,SAAS;YAC5C,IAAI,CAAC,UAAU,GAAG,cAAc,KAAK,UAAU;QACjD,OAAO;YACL,IAAI,CAAC,SAAS,GAAG,aAAa;YAC9B,IAAI,CAAC,UAAU,GAAG,cAAc;QAClC;IACF;AACF","sources":["packages/react-stately/src/selection/Selection.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Key} from '@react-types/shared';\n\n/**\n * A Selection is a special Set containing Keys, which also has an anchor\n * and current selected key for use when range selecting.\n */\nexport class Selection extends Set<Key> {\n  anchorKey: Key | null;\n  currentKey: Key | null;\n\n  constructor(keys?: Iterable<Key> | Selection, anchorKey?: Key | null, currentKey?: Key | null) {\n    super(keys);\n    if (keys instanceof Selection) {\n      this.anchorKey = anchorKey ?? keys.anchorKey;\n      this.currentKey = currentKey ?? keys.currentKey;\n    } else {\n      this.anchorKey = anchorKey ?? null;\n      this.currentKey = currentKey ?? null;\n    }\n  }\n}\n"],"names":[],"version":3,"file":"Selection.cjs.map"}