{"version":3,"sources":["node_modules\\fbjs\\lib\\EventListener.js"],"names":["emptyFunction","require","EventListener","listen","target","eventType","callback","addEventListener","remove","removeEventListener","attachEvent","detachEvent","capture","process","env","NODE_ENV","console","error","registerDefault","module","exports"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;AAoBA,GAAIA,eAAgBC,QAAQ,iBAAR,CAApB;;;;;;AAMA,GAAIC,eAAgB;;;;;;;;;AASlBC,OAAQ,QAASA,OAAT,CAAgBC,MAAhB,CAAwBC,SAAxB,CAAmCC,QAAnC,CAA6C;AACnD,GAAIF,OAAOG,gBAAX,CAA6B;AAC3BH,OAAOG,gBAAP,CAAwBF,SAAxB,CAAmCC,QAAnC,CAA6C,KAA7C;AACA,MAAO;AACLE,OAAQ,QAASA,OAAT,EAAkB;AACxBJ,OAAOK,mBAAP,CAA2BJ,SAA3B,CAAsCC,QAAtC,CAAgD,KAAhD;AACD,CAHI,CAAP;;AAKD,CAPD,IAOO,IAAIF,OAAOM,WAAX,CAAwB;AAC7BN,OAAOM,WAAP,CAAmB,KAAOL,SAA1B,CAAqCC,QAArC;AACA,MAAO;AACLE,OAAQ,QAASA,OAAT,EAAkB;AACxBJ,OAAOO,WAAP,CAAmB,KAAON,SAA1B,CAAqCC,QAArC;AACD,CAHI,CAAP;;AAKD;AACF,CAzBiB;;;;;;;;;;AAmClBM,QAAS,QAASA,QAAT,CAAiBR,MAAjB,CAAyBC,SAAzB,CAAoCC,QAApC,CAA8C;AACrD,GAAIF,OAAOG,gBAAX,CAA6B;AAC3BH,OAAOG,gBAAP,CAAwBF,SAAxB,CAAmCC,QAAnC,CAA6C,IAA7C;AACA,MAAO;AACLE,OAAQ,QAASA,OAAT,EAAkB;AACxBJ,OAAOK,mBAAP,CAA2BJ,SAA3B,CAAsCC,QAAtC,CAAgD,IAAhD;AACD,CAHI,CAAP;;AAKD,CAPD,IAOO;AACL,GAAIO,QAAQC,GAAR,CAAYC,QAAZ,GAAyB,YAA7B,CAA2C;AACzCC,QAAQC,KAAR,CAAc,+DAAiE,oEAAjE,CAAwI,+BAAtJ;AACD;AACD,MAAO;AACLT,OAAQR,aADH,CAAP;;AAGD;AACF,CAnDiB;;AAqDlBkB,gBAAiB,QAASA,gBAAT,EAA2B,CAAE,CArD5B,CAApB;;;AAwDAC,OAAOC,OAAP,CAAiBlB,aAAjB","file":"EventListener.js","sourceRoot":"d:/Work/Office/react-native-on-web/cli/tmpl/project","sourcesContent":["'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @typechecks\n */\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Upstream version of event listener. Does not take into account specific\n * nature of platform.\n */\nvar EventListener = {\n  /**\n   * Listen to DOM events during the bubble phase.\n   *\n   * @param {DOMEventTarget} target DOM element to register listener on.\n   * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.\n   * @param {function} callback Callback function.\n   * @return {object} Object with a `remove` method.\n   */\n  listen: function listen(target, eventType, callback) {\n    if (target.addEventListener) {\n      target.addEventListener(eventType, callback, false);\n      return {\n        remove: function remove() {\n          target.removeEventListener(eventType, callback, false);\n        }\n      };\n    } else if (target.attachEvent) {\n      target.attachEvent('on' + eventType, callback);\n      return {\n        remove: function remove() {\n          target.detachEvent('on' + eventType, callback);\n        }\n      };\n    }\n  },\n\n  /**\n   * Listen to DOM events during the capture phase.\n   *\n   * @param {DOMEventTarget} target DOM element to register listener on.\n   * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.\n   * @param {function} callback Callback function.\n   * @return {object} Object with a `remove` method.\n   */\n  capture: function capture(target, eventType, callback) {\n    if (target.addEventListener) {\n      target.addEventListener(eventType, callback, true);\n      return {\n        remove: function remove() {\n          target.removeEventListener(eventType, callback, true);\n        }\n      };\n    } else {\n      if (process.env.NODE_ENV !== 'production') {\n        console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.');\n      }\n      return {\n        remove: emptyFunction\n      };\n    }\n  },\n\n  registerDefault: function registerDefault() {}\n};\n\nmodule.exports = EventListener;"]}