{"ast":null,"code":"import Platform from \"react-native-web/dist/exports/Platform\";\nvar useNewWebImplementation = true;\nvar getWasCalled = false;\nexport function enableExperimentalWebImplementation() {\n  var _shouldEnable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n}\nexport function enableLegacyWebImplementation() {\n  var shouldUseLegacyImplementation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n  if (Platform.OS !== 'web' || useNewWebImplementation === !shouldUseLegacyImplementation) {\n    return;\n  }\n  if (getWasCalled) {\n    console.error('Some parts of this application have already started using the new gesture handler implementation. No changes will be applied. You can try enabling legacy implementation earlier.');\n    return;\n  }\n  useNewWebImplementation = !shouldUseLegacyImplementation;\n}\nexport function isNewWebImplementationEnabled() {\n  getWasCalled = true;\n  return useNewWebImplementation;\n}","map":{"version":3,"sources":["EnableNewWebImplementation.ts"],"names":["useNewWebImplementation","getWasCalled","enableExperimentalWebImplementation","_shouldEnable","enableLegacyWebImplementation","shouldUseLegacyImplementation","Platform","OS","console","error","isNewWebImplementationEnabled"],"mappings":";AAEA,IAAIA,uBAAuB,GAAG,IAA9B;AACA,IAAIC,YAAY,GAAG,KAAnB;AAEA,OAAO,SAASC,mCAAT,CAAA,EAEC;EAAA,IADNC,aAAa,GAAA,SAAA,CAAA,MAAA,QAAA,SAAA,QAAA,SAAA,GAAA,SAAA,MAAG,IADX;AAIN;AAED,OAAO,SAASC,6BAAT,CAAA,EAEC;EAAA,IADNC,6BAA6B,GAAA,SAAA,CAAA,MAAA,QAAA,SAAA,QAAA,SAAA,GAAA,SAAA,MAAG,IAD3B;EAGL,IACEC,QAAQ,CAACC,EAATD,KAAgB,KAAhBA,IACAN,uBAAuB,KAAK,CAACK,6BAF/B,EAGE;IACA;EACD;EAED,IAAIJ,YAAJ,EAAkB;IAChBO,OAAO,CAACC,KAARD,CACE,mLADFA,CAAAA;IAGA;EACD;EAEDR,uBAAuB,GAAG,CAACK,6BAA3BL;AACD;AAED,OAAO,SAASU,6BAAT,CAAA,EAAkD;EACvDT,YAAY,GAAG,IAAfA;EACA,OAAOD,uBAAP;AACD","sourcesContent":["import { Platform } from 'react-native';\n\nlet useNewWebImplementation = true;\nlet getWasCalled = false;\n\nexport function enableExperimentalWebImplementation(\n  _shouldEnable = true\n): void {\n  // NO-OP since the new implementation is now the default\n}\n\nexport function enableLegacyWebImplementation(\n  shouldUseLegacyImplementation = true\n): void {\n  if (\n    Platform.OS !== 'web' ||\n    useNewWebImplementation === !shouldUseLegacyImplementation\n  ) {\n    return;\n  }\n\n  if (getWasCalled) {\n    console.error(\n      'Some parts of this application have already started using the new gesture handler implementation. No changes will be applied. You can try enabling legacy implementation earlier.'\n    );\n    return;\n  }\n\n  useNewWebImplementation = !shouldUseLegacyImplementation;\n}\n\nexport function isNewWebImplementationEnabled(): boolean {\n  getWasCalled = true;\n  return useNewWebImplementation;\n}\n"]},"metadata":{},"sourceType":"module"}