react-native-inapp-inspector 2.5.10 → 2.5.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/README.ar.md +0 -8
  2. package/README.de.md +0 -8
  3. package/README.es.md +0 -8
  4. package/README.fr.md +0 -8
  5. package/README.hi.md +0 -8
  6. package/README.ja.md +0 -8
  7. package/README.ko.md +0 -8
  8. package/README.md +54 -26
  9. package/README.pt-BR.md +0 -8
  10. package/README.ru.md +0 -8
  11. package/README.zh-CN.md +0 -8
  12. package/dist/commonjs/components/ConsoleLogCard.js +32 -26
  13. package/dist/commonjs/components/ErrorBoundary.js +1 -1
  14. package/dist/commonjs/components/Inspector/ConsoleTab.js +19 -14
  15. package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +4 -4
  16. package/dist/commonjs/components/Inspector/InspectorHeader.js +73 -65
  17. package/dist/commonjs/components/Inspector/MainScreen.js +9 -6
  18. package/dist/commonjs/components/Inspector/MediaGalleryTab.js +187 -90
  19. package/dist/commonjs/components/Inspector/NetworkDetail.js +11 -8
  20. package/dist/commonjs/components/Inspector/NetworkTab.js +33 -31
  21. package/dist/commonjs/components/Inspector/PerformanceTab.d.ts +2 -0
  22. package/dist/commonjs/components/Inspector/PerformanceTab.js +652 -0
  23. package/dist/commonjs/components/Inspector/SettingsPanel.js +346 -245
  24. package/dist/commonjs/components/Inspector/TabBar.js +17 -16
  25. package/dist/commonjs/components/LogCard.js +11 -8
  26. package/dist/commonjs/components/ModuleErrorBoundary.js +1 -1
  27. package/dist/commonjs/components/NetworkIcons.d.ts +9 -0
  28. package/dist/commonjs/components/NetworkIcons.js +51 -6
  29. package/dist/commonjs/constants/index.d.ts +1 -0
  30. package/dist/commonjs/constants/index.js +1 -1
  31. package/dist/commonjs/constants/version.d.ts +1 -1
  32. package/dist/commonjs/constants/version.js +1 -1
  33. package/dist/commonjs/customHooks/crashHandler.d.ts +9 -1
  34. package/dist/commonjs/customHooks/crashHandler.js +4 -4
  35. package/dist/commonjs/helpers/index.d.ts +3 -0
  36. package/dist/commonjs/helpers/index.js +8 -6
  37. package/dist/commonjs/helpers/performanceSampler.d.ts +88 -0
  38. package/dist/commonjs/helpers/performanceSampler.js +1 -0
  39. package/dist/commonjs/helpers/remoteConfig.d.ts +6 -0
  40. package/dist/commonjs/helpers/remoteConfig.js +1 -1
  41. package/dist/commonjs/helpers/telemetry.js +1 -1
  42. package/dist/commonjs/i18n/locales/ar.json +1 -1
  43. package/dist/commonjs/i18n/locales/bn.json +1 -1
  44. package/dist/commonjs/i18n/locales/de.json +1 -1
  45. package/dist/commonjs/i18n/locales/en.json +1 -1
  46. package/dist/commonjs/i18n/locales/es.json +1 -1
  47. package/dist/commonjs/i18n/locales/fr.json +1 -1
  48. package/dist/commonjs/i18n/locales/gu.json +1 -1
  49. package/dist/commonjs/i18n/locales/hi.json +1 -1
  50. package/dist/commonjs/i18n/locales/id.json +1 -1
  51. package/dist/commonjs/i18n/locales/it.json +1 -1
  52. package/dist/commonjs/i18n/locales/ja.json +1 -1
  53. package/dist/commonjs/i18n/locales/kn.json +1 -1
  54. package/dist/commonjs/i18n/locales/ko.json +1 -1
  55. package/dist/commonjs/i18n/locales/ml.json +1 -1
  56. package/dist/commonjs/i18n/locales/mr.json +1 -1
  57. package/dist/commonjs/i18n/locales/nl.json +1 -1
  58. package/dist/commonjs/i18n/locales/pa.json +1 -1
  59. package/dist/commonjs/i18n/locales/pl.json +1 -1
  60. package/dist/commonjs/i18n/locales/pt.json +1 -1
  61. package/dist/commonjs/i18n/locales/ru.json +1 -1
  62. package/dist/commonjs/i18n/locales/ta.json +1 -1
  63. package/dist/commonjs/i18n/locales/te.json +1 -1
  64. package/dist/commonjs/i18n/locales/tr.json +1 -1
  65. package/dist/commonjs/i18n/locales/vi.json +1 -1
  66. package/dist/commonjs/i18n/locales/zh.json +1 -1
  67. package/dist/commonjs/index.d.ts +4 -2
  68. package/dist/commonjs/index.js +3 -3
  69. package/dist/commonjs/styles/index.js +1 -1
  70. package/dist/commonjs/types/enums.d.ts +1 -0
  71. package/dist/commonjs/types/enums.js +1 -1
  72. package/dist/commonjs/types/interfaces.d.ts +28 -0
  73. package/dist/esm/components/ConsoleLogCard.js +67 -61
  74. package/dist/esm/components/ErrorBoundary.js +10 -10
  75. package/dist/esm/components/Inspector/ConsoleTab.js +33 -28
  76. package/dist/esm/components/Inspector/FloatingCaptureWidget.js +22 -22
  77. package/dist/esm/components/Inspector/InspectorHeader.js +194 -186
  78. package/dist/esm/components/Inspector/MainScreen.js +61 -58
  79. package/dist/esm/components/Inspector/MediaGalleryTab.js +254 -157
  80. package/dist/esm/components/Inspector/NetworkDetail.js +62 -59
  81. package/dist/esm/components/Inspector/NetworkTab.js +39 -37
  82. package/dist/esm/components/Inspector/PerformanceTab.d.ts +2 -0
  83. package/dist/esm/components/Inspector/PerformanceTab.js +652 -0
  84. package/dist/esm/components/Inspector/SettingsPanel.js +407 -306
  85. package/dist/esm/components/Inspector/TabBar.js +4 -3
  86. package/dist/esm/components/LogCard.js +37 -34
  87. package/dist/esm/components/ModuleErrorBoundary.js +1 -1
  88. package/dist/esm/components/NetworkIcons.d.ts +9 -0
  89. package/dist/esm/components/NetworkIcons.js +48 -3
  90. package/dist/esm/constants/index.d.ts +1 -0
  91. package/dist/esm/constants/index.js +1 -1
  92. package/dist/esm/constants/version.d.ts +1 -1
  93. package/dist/esm/constants/version.js +1 -1
  94. package/dist/esm/customHooks/crashHandler.d.ts +9 -1
  95. package/dist/esm/customHooks/crashHandler.js +6 -6
  96. package/dist/esm/helpers/index.d.ts +3 -0
  97. package/dist/esm/helpers/index.js +8 -6
  98. package/dist/esm/helpers/performanceSampler.d.ts +88 -0
  99. package/dist/esm/helpers/performanceSampler.js +1 -0
  100. package/dist/esm/helpers/remoteConfig.d.ts +6 -0
  101. package/dist/esm/helpers/remoteConfig.js +1 -1
  102. package/dist/esm/helpers/telemetry.js +1 -1
  103. package/dist/esm/i18n/locales/ar.json +1 -1
  104. package/dist/esm/i18n/locales/bn.json +1 -1
  105. package/dist/esm/i18n/locales/de.json +1 -1
  106. package/dist/esm/i18n/locales/en.json +1 -1
  107. package/dist/esm/i18n/locales/es.json +1 -1
  108. package/dist/esm/i18n/locales/fr.json +1 -1
  109. package/dist/esm/i18n/locales/gu.json +1 -1
  110. package/dist/esm/i18n/locales/hi.json +1 -1
  111. package/dist/esm/i18n/locales/id.json +1 -1
  112. package/dist/esm/i18n/locales/it.json +1 -1
  113. package/dist/esm/i18n/locales/ja.json +1 -1
  114. package/dist/esm/i18n/locales/kn.json +1 -1
  115. package/dist/esm/i18n/locales/ko.json +1 -1
  116. package/dist/esm/i18n/locales/ml.json +1 -1
  117. package/dist/esm/i18n/locales/mr.json +1 -1
  118. package/dist/esm/i18n/locales/nl.json +1 -1
  119. package/dist/esm/i18n/locales/pa.json +1 -1
  120. package/dist/esm/i18n/locales/pl.json +1 -1
  121. package/dist/esm/i18n/locales/pt.json +1 -1
  122. package/dist/esm/i18n/locales/ru.json +1 -1
  123. package/dist/esm/i18n/locales/ta.json +1 -1
  124. package/dist/esm/i18n/locales/te.json +1 -1
  125. package/dist/esm/i18n/locales/tr.json +1 -1
  126. package/dist/esm/i18n/locales/vi.json +1 -1
  127. package/dist/esm/i18n/locales/zh.json +1 -1
  128. package/dist/esm/index.d.ts +4 -2
  129. package/dist/esm/index.js +8 -8
  130. package/dist/esm/styles/index.js +1 -1
  131. package/dist/esm/types/enums.d.ts +1 -0
  132. package/dist/esm/types/enums.js +1 -1
  133. package/dist/esm/types/interfaces.d.ts +28 -0
  134. package/package.json +24 -1
@@ -1,4 +1,4 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(r,t,i,o){o===void 0&&(o=i);var n=Object.getOwnPropertyDescriptor(t,i);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(r,o,n)}):(function(r,t,i,o){o===void 0&&(o=i),r[o]=t[i]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}):function(r,t){r.default=t}),__importStar=this&&this.__importStar||(function(){var r=function(t){return r=Object.getOwnPropertyNames||function(i){var o=[];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(o[o.length]=n);return o},r(t)};return function(t){if(t&&t.__esModule)return t;var i={};if(t!=null)for(var o=r(t),n=0;n<o.length;n++)o[n]!=="default"&&__createBinding(i,t,o[n]);return __setModuleDefault(i,t),i}})(),__importDefault=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),InspectorContext_1=require("./InspectorContext"),i18n_1=require("../../i18n"),styles_1=__importDefault(require("../../styles")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),TouchableScale_1=__importDefault(require("../TouchableScale")),NetworkIcons_1=require("../NetworkIcons"),reduxLogger_1=require("../../customHooks/reduxLogger"),analyticsLogger_1=require("../../customHooks/analyticsLogger"),helpers_1=require("../../helpers"),HEADER_TAB_THEME={themeColor:AppColors_1.AppColors.brandPurple,bgInactive:`${AppColors_1.AppColors.brandPurple}0D`,borderInactive:`${AppColors_1.AppColors.brandPurple}2B`,iconInactive:AppColors_1.AppColors.brandPurple,idBadgeBg:`${AppColors_1.AppColors.brandPurple}1C`,idBadgeBorder:`${AppColors_1.AppColors.brandPurple}3D`,idBadgeText:AppColors_1.AppColors.brandPurple},TAB_THEMES={apis:HEADER_TAB_THEME,logs:HEADER_TAB_THEME,analytics:HEADER_TAB_THEME,redux:HEADER_TAB_THEME,storage:HEADER_TAB_THEME,device:HEADER_TAB_THEME,crash:HEADER_TAB_THEME,push:HEADER_TAB_THEME,socket:HEADER_TAB_THEME,debugging:HEADER_TAB_THEME,media:HEADER_TAB_THEME},TabBar=react_1.default.memo(()=>{const{t:r}=(0,i18n_1.useTranslation)(),{activeTab:t,switchActiveTab:i,tabVisibility:o,logs:n,consoleLogs:y,analyticsEvents:m,crashRecords:f,pushRecords:C,socketRecords:b,unreadPushCount:S,unreadSocketCount:I,lastReadApisCount:T,lastReadLogsCount:x,lastReadCrashesCount:R,lastReadSocketCount:B,mediaCount:_}=(0,InspectorContext_1.useInspector)(),P=(0,reduxLogger_1.isReduxConnected)(),O=(0,analyticsLogger_1.isAnalyticsConnected)(),c=t==="media",g=(o?.media??!0)&&(_>0||c||__DEV__),w=(0,react_1.useRef)(null),[h,V]=(0,react_1.useState)(!1),[v,z]=(0,react_1.useState)(!0),A=(0,react_1.useRef)(0),L=e=>{const{contentOffset:s,layoutMeasurement:a,contentSize:l}=e.nativeEvent,d=s.x;A.current=d;const u=d>8,p=d<l.width-a.width-8;h!==u&&V(u),v!==p&&z(p)},k=e=>{w.current?.scrollTo({x:Math.max(0,A.current+e),animated:!0})};return<react_native_1.View style={[styles_1.default.tabBarContainer,{flexDirection:"row",alignItems:"center",paddingHorizontal:0}]}>
1
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(r,t,i,o){o===void 0&&(o=i);var n=Object.getOwnPropertyDescriptor(t,i);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(r,o,n)}):(function(r,t,i,o){o===void 0&&(o=i),r[o]=t[i]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}):function(r,t){r.default=t}),__importStar=this&&this.__importStar||(function(){var r=function(t){return r=Object.getOwnPropertyNames||function(i){var o=[];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(o[o.length]=n);return o},r(t)};return function(t){if(t&&t.__esModule)return t;var i={};if(t!=null)for(var o=r(t),n=0;n<o.length;n++)o[n]!=="default"&&__createBinding(i,t,o[n]);return __setModuleDefault(i,t),i}})(),__importDefault=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),InspectorContext_1=require("./InspectorContext"),i18n_1=require("../../i18n"),styles_1=__importDefault(require("../../styles")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),TouchableScale_1=__importDefault(require("../TouchableScale")),NetworkIcons_1=require("../NetworkIcons"),reduxLogger_1=require("../../customHooks/reduxLogger"),analyticsLogger_1=require("../../customHooks/analyticsLogger"),helpers_1=require("../../helpers"),HEADER_TAB_THEME={themeColor:AppColors_1.AppColors.brandPurple,bgInactive:`${AppColors_1.AppColors.brandPurple}0D`,borderInactive:`${AppColors_1.AppColors.brandPurple}2B`,iconInactive:AppColors_1.AppColors.brandPurple,idBadgeBg:`${AppColors_1.AppColors.brandPurple}1C`,idBadgeBorder:`${AppColors_1.AppColors.brandPurple}3D`,idBadgeText:AppColors_1.AppColors.brandPurple},TAB_THEMES={apis:HEADER_TAB_THEME,logs:HEADER_TAB_THEME,perf:HEADER_TAB_THEME,analytics:HEADER_TAB_THEME,redux:HEADER_TAB_THEME,storage:HEADER_TAB_THEME,device:HEADER_TAB_THEME,crash:HEADER_TAB_THEME,push:HEADER_TAB_THEME,socket:HEADER_TAB_THEME,debugging:HEADER_TAB_THEME,media:HEADER_TAB_THEME},TabBar=react_1.default.memo(()=>{const{t:r}=(0,i18n_1.useTranslation)(),{activeTab:t,switchActiveTab:i,tabVisibility:o,logs:n,consoleLogs:f,analyticsEvents:m,crashRecords:y,pushRecords:C,socketRecords:b,unreadPushCount:S,unreadSocketCount:I,lastReadApisCount:T,lastReadLogsCount:x,lastReadCrashesCount:R,lastReadSocketCount:B,mediaCount:_}=(0,InspectorContext_1.useInspector)(),P=(0,reduxLogger_1.isReduxConnected)(),O=(0,analyticsLogger_1.isAnalyticsConnected)(),c=t==="media",g=(o?.media??!0)&&(_>0||c||__DEV__),w=(0,react_1.useRef)(null),[h,z]=(0,react_1.useState)(!1),[v,V]=(0,react_1.useState)(!0),A=(0,react_1.useRef)(0),L=e=>{const{contentOffset:s,layoutMeasurement:l,contentSize:a}=e.nativeEvent,d=s.x;A.current=d;const u=d>8,p=d<a.width-l.width-8;h!==u&&z(u),v!==p&&V(p)},k=e=>{w.current?.scrollTo({x:Math.max(0,A.current+e),animated:!0})};return<react_native_1.View style={[styles_1.default.tabBarContainer,{flexDirection:"row",alignItems:"center",paddingHorizontal:0}]}>
2
2
 
3
3
  {h&&<react_native_1.TouchableOpacity onPress={()=>k(-160)}hitSlop={{top:6,bottom:6,left:6,right:6}}activeOpacity={.7}style={{paddingLeft:6,paddingRight:2,justifyContent:"center",alignItems:"center"}}>
4
4
  <react_native_1.View style={{width:22,height:22,borderRadius:11,backgroundColor:AppColors_1.AppColors.grayBorderSecondary,alignItems:"center",justifyContent:"center"}}>
@@ -8,28 +8,29 @@
8
8
 
9
9
 
10
10
  <react_native_1.ScrollView testID="inspector.tab.scrollview"ref={w}horizontal showsHorizontalScrollIndicator={!1}onScroll={L}scrollEventThrottle={16}style={{flex:1}}contentContainerStyle={{paddingLeft:h?4:12,paddingRight:g?6:12}}>
11
- {[{id:1,key:"apis",label:"APIs",count:n.length,icon:"apis"},{id:2,key:"logs",label:"Logs",count:y.length,icon:"logs"},{id:3,key:"analytics",label:"Analytics",count:m.length,icon:"analytics"},{id:4,key:"redux",label:"Redux",count:0,icon:"redux"},{id:5,key:"storage",label:"Storage",count:0,icon:"storage"},{id:6,key:"device",label:"Device",count:0,icon:"device"},{id:7,key:"crash",label:"Crash",count:f?.length||0,icon:"crash"},{id:8,key:"push",label:"Push",count:C?.length||0,icon:"push"},{id:9,key:"socket",label:"WebSocket",count:b?.length||0,icon:"socket"},{id:10,key:"debugging",label:"Debugging",count:0,icon:"debugging"}].filter(e=>e.key==="debugging"?react_native_1.Platform.OS==="android"&&(0,helpers_1.isLocalDebugEnvironment)()&&!!o?.debugging:!(!o?.[e.key]||e.key==="redux"&&!P||e.key==="analytics"&&!O)).map(e=>{const s=t===e.key,a=TAB_THEMES[e.key]||TAB_THEMES.apis,l=s?AppColors_1.AppColors.white:a.iconInactive,d=e.count>99?"99+":String(e.count),u=t!=="apis"&&n.length>T,p=t!=="logs"&&y.length>x,D=t!=="crash"&&(f?.length||0)>(R||0),j=t!=="socket"&&((b?.length||0)>(B||0)||I>0);return<TouchableScale_1.default key={e.key}testID={`inspector.tab.${e.key}`}onPress={()=>{i(e.key)}}style={[styles_1.default.contentTabButton,{backgroundColor:s?a.themeColor:a.bgInactive,borderColor:s?a.themeColor:a.borderInactive},s&&{shadowColor:a.themeColor,shadowOffset:{width:0,height:2},shadowOpacity:.28,shadowRadius:3.5,elevation:3}]}>
11
+ {[{id:1,key:"apis",label:"APIs",count:n.length,icon:"apis"},{id:2,key:"logs",label:"Logs",count:f.length,icon:"logs"},{id:3,key:"perf",label:"Perf / FPS",count:0,icon:"perf"},{id:4,key:"analytics",label:"Analytics",count:m.length,icon:"analytics"},{id:5,key:"redux",label:"Redux",count:0,icon:"redux"},{id:6,key:"storage",label:"Storage",count:0,icon:"storage"},{id:7,key:"device",label:"Device",count:0,icon:"device"},{id:8,key:"crash",label:"Crash",count:y?.length||0,icon:"crash"},{id:9,key:"push",label:"Push",count:C?.length||0,icon:"push"},{id:10,key:"socket",label:"WebSocket",count:b?.length||0,icon:"socket"},{id:11,key:"debugging",label:"Debugging",count:0,icon:"debugging"}].filter(e=>e.key==="debugging"?react_native_1.Platform.OS==="android"&&(0,helpers_1.isLocalDebugEnvironment)()&&!!o?.debugging:!(!o?.[e.key]||e.key==="redux"&&!P||e.key==="analytics"&&!O)).map(e=>{const s=t===e.key,l=TAB_THEMES[e.key]||TAB_THEMES.apis,a=s?AppColors_1.AppColors.white:l.iconInactive,d=e.count>99?"99+":String(e.count),u=t!=="apis"&&n.length>T,p=t!=="logs"&&f.length>x,D=t!=="crash"&&(y?.length||0)>(R||0),j=t!=="socket"&&((b?.length||0)>(B||0)||I>0);return<TouchableScale_1.default key={e.key}testID={`inspector.tab.${e.key}`}onPress={()=>{i(e.key)}}style={[styles_1.default.contentTabButton,{backgroundColor:s?l.themeColor:l.bgInactive,borderColor:s?l.themeColor:l.borderInactive},s&&{shadowColor:l.themeColor,shadowOffset:{width:0,height:2},shadowOpacity:.28,shadowRadius:3.5,elevation:3}]}>
12
12
  <react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:6}}>
13
- {e.icon==="apis"&&<NetworkIcons_1.SignalIcon color={l}size={14}/>}
14
- {e.icon==="logs"&&<NetworkIcons_1.TerminalIcon color={l}size={14}/>}
15
- {e.icon==="analytics"&&<NetworkIcons_1.AnalyticsIcon color={l}size={14}/>}
16
- {e.icon==="redux"&&<NetworkIcons_1.ReduxIcon color={l}size={14}/>}
17
- {e.icon==="storage"&&<NetworkIcons_1.DatabaseIcon color={l}size={14}/>}
18
- {e.icon==="device"&&<NetworkIcons_1.SmartphoneIcon color={l}size={14}/>}
19
- {e.icon==="crash"&&<NetworkIcons_1.CrashIcon color={l}size={14}/>}
20
- {e.icon==="push"&&<NetworkIcons_1.BellIcon color={l}size={14}/>}
21
- {e.icon==="socket"&&<NetworkIcons_1.WebsocketIcon color={l}size={14}/>}
22
- {e.icon==="debugging"&&<NetworkIcons_1.QrCodeIcon color={l}size={14}/>}
23
- <react_native_1.View style={{minWidth:20,height:20,paddingHorizontal:4,borderRadius:10,backgroundColor:s?`${AppColors_1.AppColors.white}33`:a.idBadgeBg,borderWidth:1,borderColor:s?`${AppColors_1.AppColors.white}66`:a.idBadgeBorder,alignItems:"center",justifyContent:"center"}}>
24
- <react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,lineHeight:12,color:s?AppColors_1.AppColors.white:a.idBadgeText}}>
13
+ {e.icon==="apis"&&<NetworkIcons_1.SignalIcon color={a}size={14}/>}
14
+ {e.icon==="logs"&&<NetworkIcons_1.TerminalIcon color={a}size={14}/>}
15
+ {e.icon==="perf"&&<NetworkIcons_1.SpeedometerIcon color={a}size={14}/>}
16
+ {e.icon==="analytics"&&<NetworkIcons_1.AnalyticsIcon color={a}size={14}/>}
17
+ {e.icon==="redux"&&<NetworkIcons_1.ReduxIcon color={a}size={14}/>}
18
+ {e.icon==="storage"&&<NetworkIcons_1.DatabaseIcon color={a}size={14}/>}
19
+ {e.icon==="device"&&<NetworkIcons_1.SmartphoneIcon color={a}size={14}/>}
20
+ {e.icon==="crash"&&<NetworkIcons_1.CrashIcon color={a}size={14}/>}
21
+ {e.icon==="push"&&<NetworkIcons_1.BellIcon color={a}size={14}/>}
22
+ {e.icon==="socket"&&<NetworkIcons_1.WebsocketIcon color={a}size={14}/>}
23
+ {e.icon==="debugging"&&<NetworkIcons_1.QrCodeIcon color={a}size={14}/>}
24
+ <react_native_1.View style={{minWidth:20,height:20,paddingHorizontal:4,borderRadius:10,backgroundColor:s?`${AppColors_1.AppColors.white}33`:l.idBadgeBg,borderWidth:1,borderColor:s?`${AppColors_1.AppColors.white}66`:l.idBadgeBorder,alignItems:"center",justifyContent:"center"}}>
25
+ <react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,lineHeight:12,color:s?AppColors_1.AppColors.white:l.idBadgeText}}>
25
26
  #{e.id}
26
27
  </react_native_1.Text>
27
28
  </react_native_1.View>
28
29
  <react_native_1.Text numberOfLines={1}ellipsizeMode="tail"style={[styles_1.default.contentTabButtonText,{color:s?AppColors_1.AppColors.white:AppColors_1.AppColors.grayTextStrong,fontFamily:s?AppFonts_1.AppFonts.interBold:AppFonts_1.AppFonts.interSemiBold}]}>
29
30
  {r(`tabs.${e.key}`,e.label)}
30
31
  </react_native_1.Text>
31
- {e.count>0&&e.key!=="push"&&<react_native_1.View style={{paddingHorizontal:5,paddingVertical:1,borderRadius:8,backgroundColor:s?AppColors_1.AppColors.overlayWhite25:a.idBadgeBg,borderWidth:.5,borderColor:s?AppColors_1.AppColors.overlayWhite45:a.idBadgeBorder,marginLeft:1,alignItems:"center",justifyContent:"center"}}>
32
- <react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,lineHeight:12,color:s?AppColors_1.AppColors.white:a.themeColor}}>
32
+ {e.count>0&&e.key!=="push"&&<react_native_1.View style={{paddingHorizontal:5,paddingVertical:1,borderRadius:8,backgroundColor:s?AppColors_1.AppColors.overlayWhite25:l.idBadgeBg,borderWidth:.5,borderColor:s?AppColors_1.AppColors.overlayWhite45:l.idBadgeBorder,marginLeft:1,alignItems:"center",justifyContent:"center"}}>
33
+ <react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,lineHeight:12,color:s?AppColors_1.AppColors.white:l.themeColor}}>
33
34
  {d}
34
35
  </react_native_1.Text>
35
36
  </react_native_1.View>}
@@ -1,7 +1,7 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,a,n){n===void 0&&(n=a);var o=Object.getOwnPropertyDescriptor(t,a);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,n,o)}):(function(e,t,a,n){n===void 0&&(n=a),e[n]=t[a]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),__importStar=this&&this.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(a){var n=[];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var a={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&__createBinding(a,t,n[o]);return __setModuleDefault(a,t),a}})(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),react_native_svg_1=__importStar(require("react-native-svg")),AppColors_1=require("../styles/AppColors"),constants_1=require("../constants"),helpers_1=require("../helpers"),NetworkIcons_1=require("./NetworkIcons"),AppFonts_1=require("../styles/AppFonts"),HighlightText_1=__importDefault(require("./HighlightText")),TouchableScale_1=__importDefault(require("./TouchableScale")),i18n_1=require("../i18n");function LogCard({item:e,onPress:t,timelineMinStart:a,timelineTotalRange:n,isNew:o,isSelected:h,onToggleSelect:_,searchStr:C,testID:b}){const{t:l}=(0,i18n_1.useTranslation)(),f=constants_1.METHOD_COLORS[e.method]??constants_1.METHOD_COLORS.ALL,s=(0,react_1.useMemo)(()=>{try{const r=new URL(e.url),g=r.host,w=r.pathname+(r.search?r.search:""),S=r.protocol==="https:";return{host:g,path:w||"/",isHttps:S}}catch{const r=e.url.toLowerCase().startsWith("https:"),g=(0,helpers_1.getPath)(e.url);return{host:(0,helpers_1.getBaseUrl)(e.url).replace(/^https?:\/\//,""),path:g||e.url,isHttps:r}}},[e.url]),y=r=>{r?.stopPropagation?.(),react_native_1.Alert.alert(l("common.openInBrowser")||"Open in Browser",`${l("common.openInBrowserPrompt")||"Are you sure you want to open this URL in your external browser?"}
1
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,a,n){n===void 0&&(n=a);var r=Object.getOwnPropertyDescriptor(t,a);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,n,r)}):(function(e,t,a,n){n===void 0&&(n=a),e[n]=t[a]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),__importStar=this&&this.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(a){var n=[];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(n[n.length]=r);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var a={};if(t!=null)for(var n=e(t),r=0;r<n.length;r++)n[r]!=="default"&&__createBinding(a,t,n[r]);return __setModuleDefault(a,t),a}})(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),react_native_svg_1=__importStar(require("react-native-svg")),AppColors_1=require("../styles/AppColors"),constants_1=require("../constants"),helpers_1=require("../helpers"),NetworkIcons_1=require("./NetworkIcons"),AppFonts_1=require("../styles/AppFonts"),HighlightText_1=__importDefault(require("./HighlightText")),TouchableScale_1=__importDefault(require("./TouchableScale")),i18n_1=require("../i18n");function LogCard({item:e,onPress:t,timelineMinStart:a,timelineTotalRange:n,isNew:r,isSelected:h,onToggleSelect:_,searchStr:C,testID:b}){const{t:l}=(0,i18n_1.useTranslation)(),f=constants_1.METHOD_COLORS[e.method]??constants_1.METHOD_COLORS.ALL,s=(0,react_1.useMemo)(()=>{try{const o=new URL(e.url),g=o.host,w=o.pathname+(o.search?o.search:""),V=o.protocol==="https:";return{host:g,path:w||"/",isHttps:V}}catch{const o=e.url.toLowerCase().startsWith("https:"),g=(0,helpers_1.getPath)(e.url);return{host:(0,helpers_1.getBaseUrl)(e.url).replace(/^https?:\/\//,""),path:g||e.url,isHttps:o}}},[e.url]),y=o=>{o?.stopPropagation?.(),react_native_1.Alert.alert(l("common.openInBrowser")||"Open URL",`${l("common.openInBrowserPrompt")||"Choose how you want to open or inspect this URL:"}
2
2
 
3
- ${e.url}`,[{text:l("common.cancel")||"Cancel",style:"cancel"},{text:l("common.open")||"Open",onPress:()=>{react_native_1.Linking.openURL(e.url).catch(()=>{react_native_1.Alert.alert(l("common.error")||"Error",l("common.cannotOpenUrl")||"Could not open URL")})}}])},i=e.status===0||e.status!=null&&e.status>=400,p=e.status==null,d=(0,helpers_1.getStatusColor)(e.status),c=(0,helpers_1.getDurationColor)(e.duration),x=p?AppColors_1.AppColors.darkOrange:i?AppColors_1.AppColors.errorColor:AppColors_1.AppColors.greenColor,u=(0,react_1.useRef)(new react_native_1.Animated.Value(o?.35:0)).current;(0,react_1.useEffect)(()=>{o&&react_native_1.Animated.timing(u,{toValue:0,duration:1200,useNativeDriver:!0}).start()},[o,u]);const A=()=>{if(p)return"...";if(e.status===0||e.status==null)return l("network.statusFailed")||"FAILED";const r=typeof e.status=="number"?e.status:parseInt(String(e.status||0),10);return r===200?"200 OK":r===201?"201 Created":r===204?"204 No Content":r===304?"304 Not Modified":r===400?"400 Bad Req":r===401?"401 Unauth":r===403?"403 Forbidden":r===404?"404 Not Found":r===500?"500 Error":String(e.status)},T=()=>{if(p)return<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.darkOrange}size={10}/>;const r=typeof e.status=="number"?e.status:parseInt(String(e.status||0),10);return r>=200&&r<300?<NetworkIcons_1.CircleCheckIcon color={AppColors_1.AppColors.greenColor}size={10}/>:r>=300&&r<400?<NetworkIcons_1.RepeatIcon color={AppColors_1.AppColors.amber700}size={10}/>:r>=400&&r<500?<NetworkIcons_1.CircleAlertIcon color={AppColors_1.AppColors.darkOrange}size={10}/>:<NetworkIcons_1.CircleXIcon color={AppColors_1.AppColors.errorColor}size={10}/>},v=(0,helpers_1.formatDateTime)(e.startTime),V=e.url.split("?")[0].toLowerCase().endsWith(".json");return<react_native_1.View style={styles.container}>
4
- <TouchableScale_1.default testID={b}onPress={t}style={[styles.card,{borderLeftWidth:3.5,borderLeftColor:x,backgroundColor:i?AppColors_1.AppColors.errorCardBg:AppColors_1.AppColors.white}]}>
3
+ ${e.url}`,[{text:l("common.cancel")||"Cancel",style:"cancel"},{text:"Open in Postman",onPress:()=>(0,helpers_1.openWithPostman)(e)},{text:l("common.open")||"Browser",onPress:()=>{react_native_1.Linking.openURL(e.url).catch(()=>{react_native_1.Alert.alert(l("common.error")||"Error",l("common.cannotOpenUrl")||"Could not open URL")})}}])},x=o=>{o?.stopPropagation?.(),(0,helpers_1.openWithPostman)(e)},i=e.status===0||e.status!=null&&e.status>=400,p=e.status==null,d=(0,helpers_1.getStatusColor)(e.status),c=(0,helpers_1.getDurationColor)(e.duration),A=p?AppColors_1.AppColors.darkOrange:i?AppColors_1.AppColors.errorColor:AppColors_1.AppColors.greenColor,u=(0,react_1.useRef)(new react_native_1.Animated.Value(r?.35:0)).current;(0,react_1.useEffect)(()=>{r&&react_native_1.Animated.timing(u,{toValue:0,duration:1200,useNativeDriver:!0}).start()},[r,u]);const T=()=>{if(p)return"...";if(e.status===0||e.status==null)return l("network.statusFailed")||"FAILED";const o=typeof e.status=="number"?e.status:parseInt(String(e.status||0),10);return o===200?"200 OK":o===201?"201 Created":o===204?"204 No Content":o===304?"304 Not Modified":o===400?"400 Bad Req":o===401?"401 Unauth":o===403?"403 Forbidden":o===404?"404 Not Found":o===500?"500 Error":String(e.status)},v=()=>{if(p)return<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.darkOrange}size={10}/>;const o=typeof e.status=="number"?e.status:parseInt(String(e.status||0),10);return o>=200&&o<300?<NetworkIcons_1.CircleCheckIcon color={AppColors_1.AppColors.greenColor}size={10}/>:o>=300&&o<400?<NetworkIcons_1.RepeatIcon color={AppColors_1.AppColors.amber700}size={10}/>:o>=400&&o<500?<NetworkIcons_1.CircleAlertIcon color={AppColors_1.AppColors.darkOrange}size={10}/>:<NetworkIcons_1.CircleXIcon color={AppColors_1.AppColors.errorColor}size={10}/>},m=(0,helpers_1.formatDateTime)(e.startTime),S=e.url.split("?")[0].toLowerCase().endsWith(".json");return<react_native_1.View style={styles.container}>
4
+ <TouchableScale_1.default testID={b}onPress={t}style={[styles.card,{borderLeftWidth:3.5,borderLeftColor:A,backgroundColor:i?AppColors_1.AppColors.errorCardBg:AppColors_1.AppColors.white}]}>
5
5
  <react_native_1.View style={styles.cardBody}>
6
6
 
7
7
  <react_native_1.View style={styles.cardHeaderRow}>
@@ -36,14 +36,17 @@ ${e.url}`,[{text:l("common.cancel")||"Cancel",style:"cancel"},{text:l("common.op
36
36
 
37
37
  <react_native_1.View style={styles.cardHeaderRight}>
38
38
  <react_native_1.View style={[styles.statusPill,{backgroundColor:i?`${AppColors_1.AppColors.errorColor}14`:p?`${AppColors_1.AppColors.darkOrange}14`:`${d}14`,borderColor:i?`${AppColors_1.AppColors.errorColor}33`:p?`${AppColors_1.AppColors.darkOrange}33`:`${d}33`}]}>
39
- {T()}
39
+ {v()}
40
40
  <react_native_1.Text style={[styles.statusPillText,{color:i?AppColors_1.AppColors.errorColor:p?AppColors_1.AppColors.darkOrange:d}]}>
41
- {A()}
41
+ {T()}
42
42
  </react_native_1.Text>
43
43
  </react_native_1.View>
44
44
  <react_native_1.Pressable onPress={y}hitSlop={8}style={styles.globeBtn}accessibilityRole="button"accessibilityLabel="Open in Browser">
45
45
  <NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.grayTextWeak}size={12}/>
46
46
  </react_native_1.Pressable>
47
+ <react_native_1.Pressable onPress={x}hitSlop={8}style={[styles.globeBtn,{backgroundColor:"rgba(255, 108, 55, 0.12)",borderColor:"rgba(255, 108, 55, 0.28)"}]}accessibilityRole="button"accessibilityLabel="Open with Postman">
48
+ <NetworkIcons_1.PostmanIcon color="#FF6C37"size={11}/>
49
+ </react_native_1.Pressable>
47
50
  <NetworkIcons_1.ForwardChevronIcon color={AppColors_1.AppColors.grayTextWeak}size={13}/>
48
51
  </react_native_1.View>
49
52
  </react_native_1.View>
@@ -61,7 +64,7 @@ ${e.url}`,[{text:l("common.cancel")||"Cancel",style:"cancel"},{text:l("common.op
61
64
  <HighlightText_1.default text={s.host||e.url}search={C}style={styles.hostText}highlightStyle={styles.highlight}numberOfLines={1}ellipsizeMode="tail"/>
62
65
  </react_native_1.View>
63
66
  <react_native_1.View style={styles.urlBadgeRow}>
64
- {V&&<react_native_1.View style={styles.jsonBadge}>
67
+ {S&&<react_native_1.View style={styles.jsonBadge}>
65
68
  <react_native_1.Text style={styles.jsonBadgeText}>.json</react_native_1.Text>
66
69
  </react_native_1.View>}
67
70
  {e.duplicateCount!=null&&e.duplicateCount>1&&<react_native_1.View style={styles.dupBadge}>
@@ -81,7 +84,7 @@ ${e.url}`,[{text:l("common.cancel")||"Cancel",style:"cancel"},{text:l("common.op
81
84
  <react_native_1.View style={styles.footerLeft}>
82
85
  <react_native_1.View style={styles.cardDateRow}>
83
86
  <NetworkIcons_1.CalendarIcon color={AppColors_1.AppColors.grayTextWeak}size={10}/>
84
- <react_native_1.Text style={styles.cardDateText}numberOfLines={1}>{v}</react_native_1.Text>
87
+ <react_native_1.Text style={styles.cardDateText}numberOfLines={1}>{m}</react_native_1.Text>
85
88
  </react_native_1.View>
86
89
  </react_native_1.View>
87
90
 
@@ -108,6 +111,6 @@ ${e.url}`,[{text:l("common.cancel")||"Cancel",style:"cancel"},{text:l("common.op
108
111
  </react_native_1.View>
109
112
  </react_native_1.View>
110
113
 
111
- {o&&<react_native_1.Animated.View pointerEvents="none"style={[react_native_1.StyleSheet.absoluteFill,{backgroundColor:f,opacity:u}]}/>}
114
+ {r&&<react_native_1.Animated.View pointerEvents="none"style={[react_native_1.StyleSheet.absoluteFill,{backgroundColor:f,opacity:u}]}/>}
112
115
  </TouchableScale_1.default>
113
116
  </react_native_1.View>}const styles=react_native_1.StyleSheet.create({container:{paddingHorizontal:8,paddingVertical:4,height:126,justifyContent:"center"},card:{height:118,alignSelf:"stretch",borderRadius:10,overflow:"hidden",borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,shadowColor:AppColors_1.AppColors.shadowColorString},cardBody:{height:"100%",paddingHorizontal:8,paddingTop:8,paddingBottom:6,justifyContent:"space-between"},cardHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:22,minHeight:22,maxHeight:22},cardHeaderLeft:{flexDirection:"row",alignItems:"center",flex:1,marginRight:4,gap:4.5,minWidth:0,overflow:"hidden"},cardHeaderRight:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},smallCheckbox:{width:15,height:15,borderRadius:4,borderWidth:1.5,borderColor:AppColors_1.AppColors.grayTextWeak,alignItems:"center",justifyContent:"center",backgroundColor:AppColors_1.AppColors.white},smallCheckboxChecked:{backgroundColor:AppColors_1.AppColors.purple,borderColor:AppColors_1.AppColors.purple},serialNumber:{fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.grayTextWeak,fontSize:10},methodBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:5,alignItems:"center",justifyContent:"center"},methodBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,lineHeight:12,letterSpacing:.5,color:AppColors_1.AppColors.white},chip:{paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:4,borderWidth:1},chipText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9,lineHeight:12},statusPill:{flexDirection:"row",alignItems:"center",gap:3.5,paddingHorizontal:6,paddingVertical:2,borderRadius:6,borderWidth:1,flexShrink:0},statusPillText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,lineHeight:12},globeBtn:{padding:3,borderRadius:4,backgroundColor:`${AppColors_1.AppColors.grayTextWeak}12`,alignItems:"center",justifyContent:"center"},urlBox:{backgroundColor:AppColors_1.AppColors.grayBackground,borderRadius:7,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,paddingHorizontal:7,paddingVertical:4.5,height:48,minHeight:48,maxHeight:48,justifyContent:"center",gap:2.5,overflow:"hidden"},urlMainRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:4,minHeight:16},hostRow:{flexDirection:"row",alignItems:"center",gap:5,flex:1,minWidth:0},protoBadge:{paddingHorizontal:4,paddingVertical:1,borderRadius:3.5,borderWidth:1},protoBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8,lineHeight:10},hostText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11.5,lineHeight:15,color:AppColors_1.AppColors.primaryBlack,flex:1},urlBadgeRow:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},jsonBadge:{backgroundColor:`${AppColors_1.AppColors.darkOrange}14`,borderColor:`${AppColors_1.AppColors.darkOrange}2E`,borderWidth:1,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3.5},jsonBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5,color:AppColors_1.AppColors.darkOrange},dupBadge:{backgroundColor:`${AppColors_1.AppColors.purple}14`,borderColor:`${AppColors_1.AppColors.purple}2E`,borderWidth:1,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3.5},dupBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5,color:AppColors_1.AppColors.purple},slugRow:{flexDirection:"row",alignItems:"center",minHeight:15},pathText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10.5,lineHeight:14,color:AppColors_1.AppColors.slate600||AppColors_1.AppColors.grayText,flex:1},highlight:{backgroundColor:AppColors_1.AppColors.yellowHighlight,color:AppColors_1.AppColors.primaryBlack,borderRadius:2},cardFooterRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:18,minHeight:18,maxHeight:18,gap:4},footerLeft:{flexDirection:"row",alignItems:"center",gap:4.5,flex:1,minWidth:0,overflow:"hidden"},footerRight:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},cardDateRow:{flexDirection:"row",alignItems:"center",gap:3.5},cardDateText:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,lineHeight:13,color:AppColors_1.AppColors.slate400},metaStatChip:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:AppColors_1.AppColors.violetSoftBg,borderColor:AppColors_1.AppColors.violetSoftBorder,borderWidth:1,paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:4},metaStatText:{fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.violetSoftText,fontSize:9,lineHeight:12},waterfallContainer:{height:2.5,width:"100%",backgroundColor:AppColors_1.AppColors.graySurface,borderRadius:1.5,overflow:"hidden",marginTop:2},waterfallBar:{height:"100%",borderRadius:1.5}});function areLogCardPropsEqual(e,t){return e.item===t.item&&e.isSelected===t.isSelected&&e.isNew===t.isNew&&e.searchStr===t.searchStr&&e.timelineMinStart===t.timelineMinStart&&e.timelineTotalRange===t.timelineTotalRange&&e.onPress===t.onPress&&e.onToggleSelect===t.onToggleSelect}exports.default=react_1.default.memo(LogCard,areLogCardPropsEqual);
@@ -1,6 +1,6 @@
1
1
  "use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var o=Object.getOwnPropertyDescriptor(e,t);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,o)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),__importStar=this&&this.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[r.length]=o);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),o=0;o<r.length;o++)r[o]!=="default"&&__createBinding(t,e,r[o]);return __setModuleDefault(t,e),t}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.ModuleErrorBoundary=void 0;const react_1=__importStar(require("react")),react_native_1=require("react-native"),AppFonts_1=require("../styles/AppFonts"),AppColors_1=require("../styles/AppColors"),helpers_1=require("../helpers"),NetworkIcons_1=require("./NetworkIcons"),crashHandler_1=require("../customHooks/crashHandler"),enums_1=require("../types/enums"),i18n_1=require("../i18n");class ModuleErrorBoundary extends react_1.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null,copied:!1},this.handleRetry=()=>{this.setState({hasError:!1,error:null,copied:!1}),this.props.onRetry&&this.props.onRetry()},this.handleCopy=()=>{if(!this.state.error)return;const e=`[Module Error: ${this.props.moduleName||"Micro-Feature"}]
2
2
  Message: ${this.state.error.message}
3
- Stack: ${this.state.error.stack||"N/A"}`;(0,helpers_1.copyToClipboard)(e),this.setState({copied:!0}),setTimeout(()=>{this.setState({copied:!1})},2e3)}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){try{(0,crashHandler_1.handleInterceptedCrash)(e,e?.stack,!1,enums_1.CrashType.Js,t.componentStack||void 0)}catch{}this.props.onError&&this.props.onError(e,t)}render(){if(this.state.hasError&&this.state.error){const{fallback:e,moduleName:t="UI Module",containerStyle:r}=this.props;return typeof e=="function"?e(this.state.error,this.handleRetry):e||<react_native_1.View style={[styles.card,r]}>
3
+ Stack: ${this.state.error.stack||"N/A"}`;(0,helpers_1.copyToClipboard)(e),this.setState({copied:!0}),setTimeout(()=>{this.setState({copied:!1})},2e3)}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){try{(0,crashHandler_1.handleInterceptedCrash)(e,e?.stack,!1,enums_1.CrashType.Render,t.componentStack||void 0)}catch{}this.props.onError&&this.props.onError(e,t)}render(){if(this.state.hasError&&this.state.error){const{fallback:e,moduleName:t="UI Module",containerStyle:r}=this.props;return typeof e=="function"?e(this.state.error,this.handleRetry):e||<react_native_1.View style={[styles.card,r]}>
4
4
  <react_native_1.View style={styles.headerRow}>
5
5
  <react_native_1.View style={styles.titleRow}>
6
6
  <NetworkIcons_1.WarningTriangleIcon color={AppColors_1.AppColors.red600}size={16}/>
@@ -58,6 +58,7 @@ export declare const WipeIcon: ({ color, size }: IconProps) => React.JSX.Element
58
58
  export declare const LayersIcon: ({ color, size, }: IconProps) => React.JSX.Element;
59
59
  export declare const UserIcon: ({ color, size }: IconProps) => React.JSX.Element;
60
60
  export declare const InfoCircleIcon: ({ color, size, }: IconProps) => React.JSX.Element;
61
+ export declare const PostmanIcon: ({ color, size, }: IconProps) => React.JSX.Element;
61
62
  export declare const WarningTriangleIcon: ({ color, size, }: IconProps) => React.JSX.Element;
62
63
  export declare const ErrorCircleIcon: ({ color, size, }: IconProps) => React.JSX.Element;
63
64
  export declare const TrendingUpIcon: ({ color, size, }: IconProps) => React.JSX.Element;
@@ -229,3 +230,11 @@ export declare const WarmthIcon: ({ color, size }: IconProps) => React.JSX.Eleme
229
230
  export declare const ExposureIcon: ({ color, size }: IconProps) => React.JSX.Element;
230
231
  export declare const VignetteIcon: ({ color, size }: IconProps) => React.JSX.Element;
231
232
  export declare const ArrowForwardIcon: ({ color, size }: IconProps) => React.JSX.Element;
233
+ export declare const ScaleBalanceIcon: ({ color, size }: IconProps) => React.JSX.Element;
234
+ export declare const VolumeMuteIcon: ({ color, size }: IconProps) => React.JSX.Element;
235
+ export declare const ShieldBanIcon: ({ color, size }: IconProps) => React.JSX.Element;
236
+ export declare const SpeedometerIcon: ({ color, size }: IconProps) => React.JSX.Element;
237
+ export declare const CpuChipIcon: ({ color, size }: IconProps) => React.JSX.Element;
238
+ export declare const PulseGraphIcon: ({ color, size }: IconProps) => React.JSX.Element;
239
+ export declare const GaugeIcon: ({ color, size }: IconProps) => React.JSX.Element;
240
+ export declare const MemoryRamIcon: ({ color, size }: IconProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,o,r){r===void 0&&(r=o);var n=Object.getOwnPropertyDescriptor(t,o);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,n)}):(function(e,t,o,r){r===void 0&&(r=o),e[r]=t[o]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),__importStar=this&&this.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(o){var r=[];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r[r.length]=n);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var o={};if(t!=null)for(var r=e(t),n=0;n<r.length;n++)r[n]!=="default"&&__createBinding(o,t,r[n]);return __setModuleDefault(o,t),o}})(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.InfoCircleIcon=exports.UserIcon=exports.LayersIcon=exports.WipeIcon=exports.FolderIcon=exports.SettingsIcon=exports.EyeIcon=exports.JsIcon=exports.CssIcon=exports.HtmlIcon=exports.BrandSquareIcon=exports.BrandCircleIcon=exports.MoonIcon=exports.SunIcon=exports.DebugIcon=exports.InsightsIcon=exports.AnalyticsIcon=exports.WhiteBackNavigation=exports.CloseWhite=exports.DownloadIcon=exports.FilterIcon=exports.ChevronIcon=exports.SortArrowIcon=exports.GlobeIcon=exports.DiffIcon=exports.SignalIcon=exports.ShareIcon=exports.ExportIcon=exports.TrashIcon=exports.FailIcon=exports.CircleAlertIcon=exports.CircleXIcon=exports.CircleCheckIcon=exports.CheckIcon=exports.TerminalIcon=exports.FetchIcon=exports.CopyIcon=exports.HeadersIcon=exports.ResponseIcon=exports.RequestIcon=exports.SizeIcon=exports.StatusIcon=exports.CalendarIcon=exports.ClockIcon=exports.ClearIcon=exports.SearchIcon=exports.ExpandCollapseIcon=exports.ScreenIcon=exports.MapPinIcon=exports.EmptyRadarIcon=void 0,exports.StackTraceIcon=exports.LayoutIcon=exports.ChipIcon=exports.SkullIcon=exports.ShieldAlertIcon=exports.CrashIcon=exports.UserCheckIcon=exports.TargetGoalIcon=exports.RepeatIcon=exports.PinIcon=exports.HourglassIcon=exports.FlameIcon=exports.CodeBracketsIcon=exports.AndroidIcon=exports.AppleIcon=exports.LinkChainIcon=exports.GitHubIcon=exports.StarIcon=exports.PackageBoxIcon=exports.ExternalLinkIcon=exports.MoneyIcon=exports.CartIcon=exports.TextAaIcon=exports.BrainIcon=exports.AtomIcon=exports.MapIcon=exports.SparkleIcon=exports.LightbulbIcon=exports.DocIcon=exports.FolderOpenIcon=exports.BanIcon=exports.BoltIcon=exports.PerformanceIcon=exports.ReduxIcon=exports.MetadataIcon=exports.StorageIcon=exports.RefreshCcwIcon=exports.TimelineIcon=exports.LiveStateIcon=exports.BundleIcon=exports.ForwardChevronIcon=exports.PackageIcon=exports.TableIcon=exports.RawIcon=exports.PrettyIcon=exports.SortIcon=exports.MotionIcon=exports.TrendingUpIcon=exports.ErrorCircleIcon=exports.WarningTriangleIcon=void 0,exports.GridIcon=exports.ListIcon=exports.ScreencastIcon=exports.FilmIcon=exports.ImageIcon=exports.PauseIcon=exports.PlayIcon=exports.GifIcon=exports.MicrophoneIcon=exports.VideoCameraIcon=exports.ScreenRecordIcon=exports.CameraLensIcon=exports.ScreenshotCaptureIcon=exports.CameraIcon=exports.LifeBuoyIcon=exports.SendIcon=exports.HelpCircleIcon=exports.HeadphonesIcon=exports.TurtleIcon=exports.RocketIcon=exports.UnlockIcon=exports.QrCodeIcon=exports.LockIcon=exports.PlusIcon=exports.PencilIcon=exports.DatabaseIcon=exports.ShieldCheckIcon=exports.WifiIcon=exports.CpuIcon=exports.MinimizeIcon=exports.MaximizeIcon=exports.ChevronDownIcon=exports.ResetIcon=exports.NpmIcon=exports.TagIcon=exports.BugIcon=exports.AlertTriangleIcon=exports.SmartphoneIcon=exports.KeyIcon=exports.BarChartIcon=exports.DiceIcon=exports.ZapIcon=exports.FlaskIcon=exports.LoadingSpinnerIcon=exports.ListenerIcon=exports.AllFramesIcon=exports.AppFramesIcon=exports.RawJsonIcon=exports.TrailIcon=exports.DiagnosticsIcon=void 0,exports.ResizeIcon=exports.UndoIcon=exports.ZoomOutIcon=exports.ZoomInIcon=exports.BlurIcon=exports.TypeIcon=exports.EllipseIconOutline=exports.CircleIconOutline=exports.RectangleIcon=exports.ShapesIcon=exports.PenIcon=exports.BatteryFullIcon=exports.BatteryChargingIcon=exports.SpeedIcon=exports.ActivityIcon=exports.MailIcon=exports.VolumeXIcon=exports.ScissorsIcon=exports.AnnotateIcon=exports.RedactIcon=exports.RotateIcon=exports.CropIcon=exports.HeartIcon=exports.SupportIcon=exports.ArrowDownIcon=exports.ArrowUpIcon=exports.BuildingIcon=exports.VolumeIcon=exports.BroadcastIcon=exports.PingIcon=exports.ReceiveFrameIcon=exports.SendFrameIcon=exports.WebsocketIcon=exports.SocketIcon=exports.CloudPushIcon=exports.NotificationIcon=exports.BellIcon=exports.HeartFaceIcon=exports.StarFaceIcon=exports.SmileFaceIcon=exports.NeutralFaceIcon=exports.AngryFaceIcon=exports.SparklesIcon=exports.MessageSquareIcon=exports.ChevronUpIcon=exports.WrenchIcon=exports.BookOpenIcon=exports.MinimizeWindowIcon=exports.CameraRollIcon=exports.GridlinesIcon=void 0,exports.ArrowForwardIcon=exports.VignetteIcon=exports.ExposureIcon=exports.WarmthIcon=exports.SaturationIcon=exports.ContrastIcon=exports.BrightnessIcon=exports.EyeCompareIcon=exports.ArrowRightIcon=exports.HighlighterIcon=exports.PixelateIcon=exports.DownloadExportIcon=exports.FlaskAiIcon=exports.SunAdjustIcon=exports.MoreDotsIcon=exports.RedoIcon=exports.SaveIcon=exports.GripVerticalIcon=exports.AspectRatioIcon=void 0;const react_1=__importDefault(require("react")),react_native_svg_1=__importStar(require("react-native-svg")),AppColors_1=require("../styles/AppColors"),EmptyRadarIcon=({color:e=AppColors_1.AppColors.purple,size:t=32})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
1
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,o,r){r===void 0&&(r=o);var n=Object.getOwnPropertyDescriptor(t,o);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,n)}):(function(e,t,o,r){r===void 0&&(r=o),e[r]=t[o]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),__importStar=this&&this.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(o){var r=[];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r[r.length]=n);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var o={};if(t!=null)for(var r=e(t),n=0;n<r.length;n++)r[n]!=="default"&&__createBinding(o,t,r[n]);return __setModuleDefault(o,t),o}})(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.InfoCircleIcon=exports.UserIcon=exports.LayersIcon=exports.WipeIcon=exports.FolderIcon=exports.SettingsIcon=exports.EyeIcon=exports.JsIcon=exports.CssIcon=exports.HtmlIcon=exports.BrandSquareIcon=exports.BrandCircleIcon=exports.MoonIcon=exports.SunIcon=exports.DebugIcon=exports.InsightsIcon=exports.AnalyticsIcon=exports.WhiteBackNavigation=exports.CloseWhite=exports.DownloadIcon=exports.FilterIcon=exports.ChevronIcon=exports.SortArrowIcon=exports.GlobeIcon=exports.DiffIcon=exports.SignalIcon=exports.ShareIcon=exports.ExportIcon=exports.TrashIcon=exports.FailIcon=exports.CircleAlertIcon=exports.CircleXIcon=exports.CircleCheckIcon=exports.CheckIcon=exports.TerminalIcon=exports.FetchIcon=exports.CopyIcon=exports.HeadersIcon=exports.ResponseIcon=exports.RequestIcon=exports.SizeIcon=exports.StatusIcon=exports.CalendarIcon=exports.ClockIcon=exports.ClearIcon=exports.SearchIcon=exports.ExpandCollapseIcon=exports.ScreenIcon=exports.MapPinIcon=exports.EmptyRadarIcon=void 0,exports.LayoutIcon=exports.ChipIcon=exports.SkullIcon=exports.ShieldAlertIcon=exports.CrashIcon=exports.UserCheckIcon=exports.TargetGoalIcon=exports.RepeatIcon=exports.PinIcon=exports.HourglassIcon=exports.FlameIcon=exports.CodeBracketsIcon=exports.AndroidIcon=exports.AppleIcon=exports.LinkChainIcon=exports.GitHubIcon=exports.StarIcon=exports.PackageBoxIcon=exports.ExternalLinkIcon=exports.MoneyIcon=exports.CartIcon=exports.TextAaIcon=exports.BrainIcon=exports.AtomIcon=exports.MapIcon=exports.SparkleIcon=exports.LightbulbIcon=exports.DocIcon=exports.FolderOpenIcon=exports.BanIcon=exports.BoltIcon=exports.PerformanceIcon=exports.ReduxIcon=exports.MetadataIcon=exports.StorageIcon=exports.RefreshCcwIcon=exports.TimelineIcon=exports.LiveStateIcon=exports.BundleIcon=exports.ForwardChevronIcon=exports.PackageIcon=exports.TableIcon=exports.RawIcon=exports.PrettyIcon=exports.SortIcon=exports.MotionIcon=exports.TrendingUpIcon=exports.ErrorCircleIcon=exports.WarningTriangleIcon=exports.PostmanIcon=void 0,exports.ListIcon=exports.ScreencastIcon=exports.FilmIcon=exports.ImageIcon=exports.PauseIcon=exports.PlayIcon=exports.GifIcon=exports.MicrophoneIcon=exports.VideoCameraIcon=exports.ScreenRecordIcon=exports.CameraLensIcon=exports.ScreenshotCaptureIcon=exports.CameraIcon=exports.LifeBuoyIcon=exports.SendIcon=exports.HelpCircleIcon=exports.HeadphonesIcon=exports.TurtleIcon=exports.RocketIcon=exports.UnlockIcon=exports.QrCodeIcon=exports.LockIcon=exports.PlusIcon=exports.PencilIcon=exports.DatabaseIcon=exports.ShieldCheckIcon=exports.WifiIcon=exports.CpuIcon=exports.MinimizeIcon=exports.MaximizeIcon=exports.ChevronDownIcon=exports.ResetIcon=exports.NpmIcon=exports.TagIcon=exports.BugIcon=exports.AlertTriangleIcon=exports.SmartphoneIcon=exports.KeyIcon=exports.BarChartIcon=exports.DiceIcon=exports.ZapIcon=exports.FlaskIcon=exports.LoadingSpinnerIcon=exports.ListenerIcon=exports.AllFramesIcon=exports.AppFramesIcon=exports.RawJsonIcon=exports.TrailIcon=exports.DiagnosticsIcon=exports.StackTraceIcon=void 0,exports.UndoIcon=exports.ZoomOutIcon=exports.ZoomInIcon=exports.BlurIcon=exports.TypeIcon=exports.EllipseIconOutline=exports.CircleIconOutline=exports.RectangleIcon=exports.ShapesIcon=exports.PenIcon=exports.BatteryFullIcon=exports.BatteryChargingIcon=exports.SpeedIcon=exports.ActivityIcon=exports.MailIcon=exports.VolumeXIcon=exports.ScissorsIcon=exports.AnnotateIcon=exports.RedactIcon=exports.RotateIcon=exports.CropIcon=exports.HeartIcon=exports.SupportIcon=exports.ArrowDownIcon=exports.ArrowUpIcon=exports.BuildingIcon=exports.VolumeIcon=exports.BroadcastIcon=exports.PingIcon=exports.ReceiveFrameIcon=exports.SendFrameIcon=exports.WebsocketIcon=exports.SocketIcon=exports.CloudPushIcon=exports.NotificationIcon=exports.BellIcon=exports.HeartFaceIcon=exports.StarFaceIcon=exports.SmileFaceIcon=exports.NeutralFaceIcon=exports.AngryFaceIcon=exports.SparklesIcon=exports.MessageSquareIcon=exports.ChevronUpIcon=exports.WrenchIcon=exports.BookOpenIcon=exports.MinimizeWindowIcon=exports.CameraRollIcon=exports.GridlinesIcon=exports.GridIcon=void 0,exports.MemoryRamIcon=exports.GaugeIcon=exports.PulseGraphIcon=exports.CpuChipIcon=exports.SpeedometerIcon=exports.ShieldBanIcon=exports.VolumeMuteIcon=exports.ScaleBalanceIcon=exports.ArrowForwardIcon=exports.VignetteIcon=exports.ExposureIcon=exports.WarmthIcon=exports.SaturationIcon=exports.ContrastIcon=exports.BrightnessIcon=exports.EyeCompareIcon=exports.ArrowRightIcon=exports.HighlighterIcon=exports.PixelateIcon=exports.DownloadExportIcon=exports.FlaskAiIcon=exports.SunAdjustIcon=exports.MoreDotsIcon=exports.RedoIcon=exports.SaveIcon=exports.GripVerticalIcon=exports.AspectRatioIcon=exports.ResizeIcon=void 0;const react_1=__importDefault(require("react")),react_native_svg_1=__importStar(require("react-native-svg")),AppColors_1=require("../styles/AppColors"),EmptyRadarIcon=({color:e=AppColors_1.AppColors.purple,size:t=32})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
2
2
  <react_native_svg_1.Path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"stroke={e}strokeWidth="1.5"strokeLinecap="round"strokeLinejoin="round"/>
3
3
  <react_native_svg_1.Circle cx="12"cy="11"r="3"stroke={e}strokeWidth="1.5"/>
4
4
  <react_native_svg_1.Path d="M12 14v3"stroke={e}strokeWidth="1.5"strokeLinecap="round"/>
@@ -143,10 +143,12 @@
143
143
  </react_native_svg_1.default>;exports.LayersIcon=LayersIcon;const UserIcon=({color:e=AppColors_1.AppColors.grayTextWeak,size:t=12})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
144
144
  <react_native_svg_1.Path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
145
145
  <react_native_svg_1.Circle cx="12"cy="7"r="4"stroke={e}strokeWidth="2"/>
146
- </react_native_svg_1.default>;exports.UserIcon=UserIcon;const InfoCircleIcon=({color:e=AppColors_1.AppColors.grayTextWeak,size:t=12})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
147
- <react_native_svg_1.Circle cx="12"cy="12"r="10"stroke={e}strokeWidth="2"/>
148
- <react_native_svg_1.Path d="M12 16v-4M12 8h.01"stroke={e}strokeWidth="2"strokeLinecap="round"/>
149
- </react_native_svg_1.default>;exports.InfoCircleIcon=InfoCircleIcon;const WarningTriangleIcon=({color:e=AppColors_1.AppColors.grayTextWeak,size:t=12})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
146
+ </react_native_svg_1.default>;exports.UserIcon=UserIcon;const InfoCircleIcon=({color:e=AppColors_1.AppColors.grayTextWeak,size:t=14})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
147
+ <react_native_svg_1.Circle cx="12"cy="12"r="9"stroke={e}strokeWidth="2"/>
148
+ <react_native_svg_1.Path d="M12 16v-4M12 8.5h.01"stroke={e}strokeWidth="2.2"strokeLinecap="round"strokeLinejoin="round"/>
149
+ </react_native_svg_1.default>;exports.InfoCircleIcon=InfoCircleIcon;const PostmanIcon=({color:e="#FF6C37",size:t=14})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
150
+ <react_native_svg_1.Path d="M21.5 2.5L10.5 13.5M21.5 2.5L14.5 21.5L10.5 13.5M21.5 2.5L2.5 9.5L10.5 13.5"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
151
+ </react_native_svg_1.default>;exports.PostmanIcon=PostmanIcon;const WarningTriangleIcon=({color:e=AppColors_1.AppColors.grayTextWeak,size:t=12})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
150
152
  <react_native_svg_1.Path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
151
153
  <react_native_svg_1.Path d="M12 9v4M12 17h.01"stroke={e}strokeWidth="2"strokeLinecap="round"/>
152
154
  </react_native_svg_1.default>;exports.WarningTriangleIcon=WarningTriangleIcon;const ErrorCircleIcon=({color:e=AppColors_1.AppColors.grayTextWeak,size:t=12})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
@@ -754,4 +756,47 @@
754
756
  <react_native_svg_1.Ellipse cx="12"cy="12"rx="6"ry="4.5"stroke={e}strokeWidth="1.8"strokeDasharray="2,2"/>
755
757
  </react_native_svg_1.default>;exports.VignetteIcon=VignetteIcon;const ArrowForwardIcon=({color:e=AppColors_1.AppColors.white,size:t=16})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
756
758
  <react_native_svg_1.Path d="M5 12h14M12 5l7 7-7 7"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
757
- </react_native_svg_1.default>;exports.ArrowForwardIcon=ArrowForwardIcon;
759
+ </react_native_svg_1.default>;exports.ArrowForwardIcon=ArrowForwardIcon;const ScaleBalanceIcon=({color:e=AppColors_1.AppColors.white,size:t=16})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
760
+ <react_native_svg_1.Path d="M12 3v18"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
761
+ <react_native_svg_1.Path d="M4 6l8-3 8 3"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
762
+ <react_native_svg_1.Path d="M4 10l4 8H0l4-8z"stroke={e}strokeWidth="1.5"strokeLinecap="round"strokeLinejoin="round"/>
763
+ <react_native_svg_1.Path d="M20 10l4 8h-8l4-8z"stroke={e}strokeWidth="1.5"strokeLinecap="round"strokeLinejoin="round"/>
764
+ <react_native_svg_1.Path d="M8 21h8"stroke={e}strokeWidth="2"strokeLinecap="round"/>
765
+ </react_native_svg_1.default>;exports.ScaleBalanceIcon=ScaleBalanceIcon;const VolumeMuteIcon=({color:e=AppColors_1.AppColors.white,size:t=16})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
766
+ <react_native_svg_1.Polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
767
+ <react_native_svg_1.Line x1="23"y1="9"x2="17"y2="15"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
768
+ <react_native_svg_1.Line x1="17"y1="9"x2="23"y2="15"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
769
+ </react_native_svg_1.default>;exports.VolumeMuteIcon=VolumeMuteIcon;const ShieldBanIcon=({color:e=AppColors_1.AppColors.white,size:t=16})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
770
+ <react_native_svg_1.Path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
771
+ <react_native_svg_1.Line x1="4.5"y1="4.5"x2="19.5"y2="19.5"stroke={e}strokeWidth="2"strokeLinecap="round"/>
772
+ </react_native_svg_1.default>;exports.ShieldBanIcon=ShieldBanIcon;const SpeedometerIcon=({color:e=AppColors_1.AppColors.white,size:t=16})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
773
+ <react_native_svg_1.Path d="M12 2a10 10 0 0 0-7.07 17.07L12 12l5.07-5.07"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
774
+ <react_native_svg_1.Path d="M2 12a10 10 0 1 0 20 0 10 10 0 0 0-20 0z"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
775
+ <react_native_svg_1.Circle cx="12"cy="12"r="2"fill={e}/>
776
+ </react_native_svg_1.default>;exports.SpeedometerIcon=SpeedometerIcon;const CpuChipIcon=({color:e=AppColors_1.AppColors.white,size:t=16})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
777
+ <react_native_svg_1.Rect x="4"y="4"width="16"height="16"rx="2"stroke={e}strokeWidth="2"/>
778
+ <react_native_svg_1.Rect x="9"y="9"width="6"height="6"stroke={e}strokeWidth="1.5"/>
779
+ <react_native_svg_1.Line x1="9"y1="1"x2="9"y2="4"stroke={e}strokeWidth="2"strokeLinecap="round"/>
780
+ <react_native_svg_1.Line x1="15"y1="1"x2="15"y2="4"stroke={e}strokeWidth="2"strokeLinecap="round"/>
781
+ <react_native_svg_1.Line x1="9"y1="20"x2="9"y2="23"stroke={e}strokeWidth="2"strokeLinecap="round"/>
782
+ <react_native_svg_1.Line x1="15"y1="20"x2="15"y2="23"stroke={e}strokeWidth="2"strokeLinecap="round"/>
783
+ <react_native_svg_1.Line x1="20"y1="9"x2="23"y2="9"stroke={e}strokeWidth="2"strokeLinecap="round"/>
784
+ <react_native_svg_1.Line x1="20"y1="15"x2="23"y2="15"stroke={e}strokeWidth="2"strokeLinecap="round"/>
785
+ <react_native_svg_1.Line x1="1"y1="9"x2="4"y2="9"stroke={e}strokeWidth="2"strokeLinecap="round"/>
786
+ <react_native_svg_1.Line x1="1"y1="15"x2="4"y2="15"stroke={e}strokeWidth="2"strokeLinecap="round"/>
787
+ </react_native_svg_1.default>;exports.CpuChipIcon=CpuChipIcon;const PulseGraphIcon=({color:e=AppColors_1.AppColors.white,size:t=16})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
788
+ <react_native_svg_1.Polyline points="22 12 18 12 15 21 9 3 6 12 2 12"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
789
+ </react_native_svg_1.default>;exports.PulseGraphIcon=PulseGraphIcon;const GaugeIcon=({color:e=AppColors_1.AppColors.white,size:t=16})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
790
+ <react_native_svg_1.Path d="M3.34 17a10 10 0 1 1 17.32 0"stroke={e}strokeWidth="2"strokeLinecap="round"/>
791
+ <react_native_svg_1.Path d="M12 12l4-4"stroke={e}strokeWidth="2"strokeLinecap="round"/>
792
+ <react_native_svg_1.Circle cx="12"cy="12"r="2"fill={e}/>
793
+ </react_native_svg_1.default>;exports.GaugeIcon=GaugeIcon;const MemoryRamIcon=({color:e=AppColors_1.AppColors.white,size:t=16})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
794
+ <react_native_svg_1.Rect x="2"y="6"width="20"height="12"rx="2"stroke={e}strokeWidth="2"/>
795
+ <react_native_svg_1.Line x1="6"y1="18"x2="6"y2="21"stroke={e}strokeWidth="2"strokeLinecap="round"/>
796
+ <react_native_svg_1.Line x1="10"y1="18"x2="10"y2="21"stroke={e}strokeWidth="2"strokeLinecap="round"/>
797
+ <react_native_svg_1.Line x1="14"y1="18"x2="14"y2="21"stroke={e}strokeWidth="2"strokeLinecap="round"/>
798
+ <react_native_svg_1.Line x1="18"y1="18"x2="18"y2="21"stroke={e}strokeWidth="2"strokeLinecap="round"/>
799
+ <react_native_svg_1.Rect x="5"y="9"width="3"height="5"fill={e}/>
800
+ <react_native_svg_1.Rect x="10.5"y="9"width="3"height="5"fill={e}/>
801
+ <react_native_svg_1.Rect x="16"y="9"width="3"height="5"fill={e}/>
802
+ </react_native_svg_1.default>;exports.MemoryRamIcon=MemoryRamIcon;
@@ -4,4 +4,5 @@ export declare const METHOD_COLORS: Record<Method, string>;
4
4
  export declare const DOMAIN_COLORS: string[];
5
5
  export declare const DURATION_FAST_MS = 200;
6
6
  export declare const DURATION_SLOW_MS = 800;
7
+ export declare const DEFAULT_HIDDEN_URL_PATTERNS: string[];
7
8
  export { LIB_VERSION } from './version';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LIB_VERSION=exports.DURATION_SLOW_MS=exports.DURATION_FAST_MS=exports.DOMAIN_COLORS=exports.METHOD_COLORS=exports.STATUS_FILTERS=void 0;const AppColors_1=require("../styles/AppColors");exports.STATUS_FILTERS=["ALL","2xx","200","3xx","4xx","400","404","5xx","500","Failed"],exports.METHOD_COLORS={ALL:AppColors_1.AppColors.slate500,GET:AppColors_1.AppColors.emerald600,POST:AppColors_1.AppColors.blue600,PUT:AppColors_1.AppColors.amber600,PATCH:AppColors_1.AppColors.violet600,DELETE:AppColors_1.AppColors.red600,QUERY:AppColors_1.AppColors.sky600,OPTIONS:AppColors_1.AppColors.slate600,HEAD:AppColors_1.AppColors.cyan600},exports.DOMAIN_COLORS=AppColors_1.AppColors.domainColors,exports.DURATION_FAST_MS=200,exports.DURATION_SLOW_MS=800;var version_1=require("./version");Object.defineProperty(exports,"LIB_VERSION",{enumerable:!0,get:function(){return version_1.LIB_VERSION}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LIB_VERSION=exports.DEFAULT_HIDDEN_URL_PATTERNS=exports.DURATION_SLOW_MS=exports.DURATION_FAST_MS=exports.DOMAIN_COLORS=exports.METHOD_COLORS=exports.STATUS_FILTERS=void 0;const AppColors_1=require("../styles/AppColors");exports.STATUS_FILTERS=["ALL","2xx","200","3xx","4xx","400","404","5xx","500","Failed"],exports.METHOD_COLORS={ALL:AppColors_1.AppColors.slate500,GET:AppColors_1.AppColors.emerald600,POST:AppColors_1.AppColors.blue600,PUT:AppColors_1.AppColors.amber600,PATCH:AppColors_1.AppColors.violet600,DELETE:AppColors_1.AppColors.red600,QUERY:AppColors_1.AppColors.sky600,OPTIONS:AppColors_1.AppColors.slate600,HEAD:AppColors_1.AppColors.cyan600},exports.DOMAIN_COLORS=AppColors_1.AppColors.domainColors,exports.DURATION_FAST_MS=200,exports.DURATION_SLOW_MS=800,exports.DEFAULT_HIDDEN_URL_PATTERNS=["https://google-analytics.com/g/collect","https://api.npmjs.org","https://api.github.com","https://registry.npmjs.org"];var version_1=require("./version");Object.defineProperty(exports,"LIB_VERSION",{enumerable:!0,get:function(){return version_1.LIB_VERSION}});
@@ -1 +1 @@
1
- export declare const LIB_VERSION = "2.5.10";
1
+ export declare const LIB_VERSION = "2.5.12";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LIB_VERSION=void 0,exports.LIB_VERSION="2.5.10";
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LIB_VERSION=void 0,exports.LIB_VERSION="2.5.12";
@@ -1,4 +1,4 @@
1
- import { CrashRecord, ParsedStackFrame, CrashBreadcrumb } from '../types';
1
+ import { CrashRecord, ParsedStackFrame, CrashBreadcrumb, CrashIgnoredTypes, CrashModalTriggerPolicy } from '../types';
2
2
  import { CrashExportFormat, CrashType } from '../types/enums';
3
3
  export interface CrashEventPayload {
4
4
  error: Error | any;
@@ -8,9 +8,17 @@ export interface CrashEventPayload {
8
8
  timestamp: number;
9
9
  logId?: number;
10
10
  crashRecord?: CrashRecord;
11
+ shouldShowModal?: boolean;
11
12
  }
12
13
  export { CrashExportFormat };
14
+ export declare const DEFAULT_CRASH_IGNORED_TYPES: CrashIgnoredTypes;
13
15
  type CrashListener = (payload: CrashEventPayload) => void;
16
+ export declare const setCrashIgnoredTypesConfig: (config: Partial<CrashIgnoredTypes>) => void;
17
+ export declare const getCrashIgnoredTypesConfig: () => CrashIgnoredTypes;
18
+ export declare const setCrashModalTriggerPolicyConfig: (policy: CrashModalTriggerPolicy) => void;
19
+ export declare const getCrashModalTriggerPolicyConfig: () => CrashModalTriggerPolicy;
20
+ export declare const setCrashThrottleDuplicatesConfig: (throttle: boolean) => void;
21
+ export declare const applyCrashPolicyPreset: (preset: "balanced" | "max_shield" | "silent") => CrashIgnoredTypes;
14
22
  export declare const setCrashModuleEnabled: (enabled: boolean) => void;
15
23
  export declare const getCrashModuleEnabled: () => boolean;
16
24
  export declare const setMaxCrashLogsLimit: (max: number) => void;
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setupGlobalCrashHandler=exports.exportCrashReport=exports.simulateTestCrash=exports.triggerGlobalCrashScreen=exports.recordCustomCrash=exports.handleInterceptedCrash=exports.emitCrashEvent=exports.subscribeCrashEvents=exports.clearCrashRecords=exports.getCrashRecords=exports.computeCrashFingerprint=exports.parseCrashStackTrace=exports.getCrashBreadcrumbs=exports.clearCrashBreadcrumbs=exports.recordUserActionBreadcrumb=exports.recordReduxBreadcrumb=exports.recordNetworkBreadcrumb=exports.recordNavigationBreadcrumb=exports.addCrashBreadcrumb=exports.pruneCrashRecords=exports.getMaxCrashLogsLimit=exports.setMaxCrashLogsLimit=exports.getCrashModuleEnabled=exports.setCrashModuleEnabled=exports.CrashExportFormat=void 0;const react_native_1=require("react-native"),enums_1=require("../types/enums");Object.defineProperty(exports,"CrashExportFormat",{enumerable:!0,get:function(){return enums_1.CrashExportFormat}});const consoleLogger_1=require("./consoleLogger"),NativeInspector_1=require("../native/NativeInspector"),i18n_1=require("../i18n");let crashListeners=[],isCrashHandlerInitialized=!1,lastHandledErrorTimestamp=0,crashRecordsStore=[],breadcrumbsStore=[];const MAX_BREADCRUMBS=50;let maxStoredCrashes=100;const appStartTime=Date.now();let isCrashModuleEnabled=!1;const setCrashModuleEnabled=e=>{isCrashModuleEnabled=e};exports.setCrashModuleEnabled=setCrashModuleEnabled;const getCrashModuleEnabled=()=>isCrashModuleEnabled;exports.getCrashModuleEnabled=getCrashModuleEnabled;const setMaxCrashLogsLimit=e=>{maxStoredCrashes=Math.max(10,e),crashRecordsStore.length>maxStoredCrashes&&(crashRecordsStore=crashRecordsStore.slice(0,maxStoredCrashes))};exports.setMaxCrashLogsLimit=setMaxCrashLogsLimit;const getMaxCrashLogsLimit=()=>maxStoredCrashes;exports.getMaxCrashLogsLimit=getMaxCrashLogsLimit;const pruneCrashRecords=e=>{const r=e!==void 0?Math.max(0,e):Math.floor(crashRecordsStore.length/2),o=crashRecordsStore.length-r;return o>0&&(crashRecordsStore=crashRecordsStore.slice(0,r)),breadcrumbsStore.length>20&&(breadcrumbsStore=breadcrumbsStore.slice(0,20)),Math.max(0,o)};exports.pruneCrashRecords=pruneCrashRecords;const addCrashBreadcrumb=(e,r,o)=>{if(isCrashModuleEnabled)try{const s={type:e,message:r,timestamp:Date.now(),data:o};breadcrumbsStore.unshift(s),breadcrumbsStore.length>MAX_BREADCRUMBS&&(breadcrumbsStore=breadcrumbsStore.slice(0,MAX_BREADCRUMBS))}catch{}};exports.addCrashBreadcrumb=addCrashBreadcrumb;const recordNavigationBreadcrumb=(e,r)=>{(0,exports.addCrashBreadcrumb)("navigation",(0,i18n_1.t)("crash.breadcrumbNavigation",{from:e||"/",to:r||"/"}),{from:e,to:r})};exports.recordNavigationBreadcrumb=recordNavigationBreadcrumb;const recordNetworkBreadcrumb=(e,r,o,s)=>{const t=o!=null?` [${o}]`:"",a=s!=null?` (${Math.round(s)}ms)`:"";(0,exports.addCrashBreadcrumb)("network",`${r.toUpperCase()} ${e}${t}${a}`,{url:e,method:r,status:o,duration:s})};exports.recordNetworkBreadcrumb=recordNetworkBreadcrumb;const recordReduxBreadcrumb=(e,r)=>{(0,exports.addCrashBreadcrumb)("redux",(0,i18n_1.t)("crash.breadcrumbAction",{actionType:e}),{type:e,payloadSummary:typeof r=="object"&&r!==null?Object.keys(r):typeof r})};exports.recordReduxBreadcrumb=recordReduxBreadcrumb;const recordUserActionBreadcrumb=(e,r)=>{(0,exports.addCrashBreadcrumb)("user",e,r)};exports.recordUserActionBreadcrumb=recordUserActionBreadcrumb;const clearCrashBreadcrumbs=()=>{breadcrumbsStore=[]};exports.clearCrashBreadcrumbs=clearCrashBreadcrumbs;const getCrashBreadcrumbs=()=>[...breadcrumbsStore];exports.getCrashBreadcrumbs=getCrashBreadcrumbs;const parseCrashStackTrace=e=>{if(!e||typeof e!="string")return[];const r=e.split(`
2
- `),o=[];for(const s of r){const t=s.trim();if(!t||t.includes("crashHandler.ts")||t.includes("handleInterceptedCrash")||t.includes("addLogFromCrash")||t.includes("setupGlobalCrashHandler"))continue;const a=t.match(/^([^@]+)@(.*):(\d+):(\d+)$/);if(a){const[,c,n,p,u]=a,h=n.split("?")[0].split("/").pop()||n,f=!n.includes("node_modules")&&!n.includes("react-native")&&!n.includes("react-dom")&&!n.includes("hermes")&&!n.includes("internal");o.push({method:c.trim(),file:h,lineNumber:parseInt(p,10),column:parseInt(u,10),raw:t,isAppCode:f});continue}const d=t.match(/^at\s+(.+)\s+\((.+):(\d+):(\d+)\)$/);if(d){const[,c,n,p,u]=d,h=n.split("?")[0].split("/").pop()||n,f=!n.includes("node_modules")&&!n.includes("react-native")&&!n.includes("react-dom")&&!n.includes("internal");o.push({method:c.trim(),file:h,lineNumber:parseInt(p,10),column:parseInt(u,10),raw:t,isAppCode:f});continue}const l=t.match(/^at\s+(.+):(\d+):(\d+)$/);if(l){const[,c,n,p]=l,u=c.split("?")[0].split("/").pop()||c,h=!c.includes("node_modules")&&!c.includes("react-native");o.push({method:"<anonymous>",file:u,lineNumber:parseInt(n,10),column:parseInt(p,10),raw:t,isAppCode:h});continue}const m=t.match(/^at\s+([a-zA-Z0-9_$.]+)\(([a-zA-Z0-9_$]+\.java):(\d+)\)$/);if(m){const[,c,n,p]=m,u=!c.startsWith("com.facebook.react")&&!c.startsWith("android.");o.push({method:c,file:n,lineNumber:parseInt(p,10),column:0,raw:t,isAppCode:u});continue}const i=t.match(/^\d+\s+([^\s]+)\s+(0x[0-9a-fA-F]+)\s+(.+)$/);if(i){const[,c,,n]=i,p=!c.startsWith("lib")&&!c.startsWith("Core")&&!c.startsWith("React");o.push({method:n,file:c,lineNumber:0,column:0,raw:t,isAppCode:p});continue}o.push({method:t.startsWith("at ")?t.slice(3):t,file:"runtime",lineNumber:0,column:0,raw:t,isAppCode:!1})}return o};exports.parseCrashStackTrace=parseCrashStackTrace;const getMemoryDiagnostics=()=>{try{const e=globalThis.performance;if(e&&e.memory)return{usedJSHeapSize:Math.round(e.memory.usedJSHeapSize/(1024*1024)),totalJSHeapSize:Math.round(e.memory.totalJSHeapSize/(1024*1024))}}catch{}},getScreenDimensions=()=>{try{const e=react_native_1.Dimensions.get("window");return`${Math.round(e.width)}x${Math.round(e.height)} (${e.scale}x)`}catch{return(0,i18n_1.t)("crash.unknown")}},computeCrashFingerprint=e=>{const r=e.type||"js",o=e.name||"Error",s=e.parsedStack&&e.parsedStack.length>0?e.parsedStack[0]:null,t=s?`${s.file}:${s.lineNumber}`:"unknown";return`${r}_${o}_${t}`};exports.computeCrashFingerprint=computeCrashFingerprint;const getCrashRecords=()=>[...crashRecordsStore];exports.getCrashRecords=getCrashRecords;const clearCrashRecords=()=>{crashRecordsStore=[],(0,exports.emitCrashEvent)({error:null,message:"__CLEARED__",timestamp:Date.now()})};exports.clearCrashRecords=clearCrashRecords;const subscribeCrashEvents=e=>(crashListeners.push(e),()=>{crashListeners=crashListeners.filter(r=>r!==e)});exports.subscribeCrashEvents=subscribeCrashEvents;const emitCrashEvent=e=>{if(e.message!=="__CLEARED__"){const r=Date.now();if(r-lastHandledErrorTimestamp<250)return;lastHandledErrorTimestamp=r}crashListeners.forEach(r=>{try{r(e)}catch{}})};exports.emitCrashEvent=emitCrashEvent;const handleInterceptedCrash=(e,r,o=!1,s,t)=>{try{const a=e instanceof Error||typeof e=="object"&&e!==null?e:new Error(String(e||(0,i18n_1.t)("crash.runtimeException"))),d=a.message||(typeof e=="string"?e:(0,i18n_1.t)("crash.runtimeException"));let l="";typeof r=="string"?l=r:Array.isArray(r)?l=r.map(g=>`at ${g.methodName||"<anonymous>"} (${g.file||"unknown"}:${g.lineNumber||0}:${g.column||0})`).join(`
3
- `):l=a.stack||new Error().stack||"";let m=s||enums_1.CrashType.Js;const i=d.toLowerCase();s||(i.includes("native")||i.includes("sigsegv")||i.includes("nsrange")||i.includes("nullpointerexception")||i.includes("fatal signal")?m=enums_1.CrashType.Native:i.includes("promise")||i.includes("unhandled rejection")||i.includes("unhandledrejection")?m=enums_1.CrashType.Promise:i.includes("render")||i.includes("errorboundary")||t?m=enums_1.CrashType.Render:m=enums_1.CrashType.Js);const c=new Date,n=c.toLocaleDateString(),p=c.toLocaleTimeString(),u=(0,exports.parseCrashStackTrace)(l),h=(0,consoleLogger_1.addLogFromCrash)(a,`[${o?(0,i18n_1.t)("crash.logFatalCrash"):(0,i18n_1.t)("crash.logUnhandledError")}] ${d}`,l,o),f=typeof globalThis.HermesInternal<"u",x=typeof globalThis.nativeFabricUIManager<"u",C={id:`crash_${Date.now()}_${Math.random().toString(36).substr(2,6)}`,error:a,isFatal:o,type:m,message:d,name:a.name||(o?(0,i18n_1.t)("crash.errorNameFatal"):(0,i18n_1.t)("crash.errorNameUnhandled")),stack:l,parsedStack:u,componentStack:t||void 0,timestamp:Date.now(),dateStr:n,timeStr:p,deviceInfo:{platform:react_native_1.Platform.OS,osVersion:String(react_native_1.Platform.Version),rnVersion:react_native_1.Platform.constants?.reactNativeVersion?`${react_native_1.Platform.constants.reactNativeVersion.major}.${react_native_1.Platform.constants.reactNativeVersion.minor}.${react_native_1.Platform.constants.reactNativeVersion.patch}`:(0,i18n_1.t)("crash.unknown"),isHermes:f,isFabric:x,appState:react_native_1.AppState.currentState||"active"},memoryInfo:getMemoryDiagnostics(),breadcrumbs:[...breadcrumbsStore],logId:h?.id};crashRecordsStore.unshift(C),crashRecordsStore.length>maxStoredCrashes&&(crashRecordsStore=crashRecordsStore.slice(0,maxStoredCrashes)),(0,exports.emitCrashEvent)({error:a,isFatal:o,message:`[${o?(0,i18n_1.t)("crash.logFatalCrash"):(0,i18n_1.t)("crash.logUnhandledError")}] ${d}`,stack:l,timestamp:Date.now(),logId:h?.id,crashRecord:C});try{(0,NativeInspector_1.showNativeFloatingButton)(),(0,NativeInspector_1.setNativeFloatingButtonBadge)(!0)}catch{}return C}catch{return{id:`crash_${Date.now()}`,isFatal:!0,type:enums_1.CrashType.Js,message:String(e||(0,i18n_1.t)("crash.unknownException")),timestamp:Date.now(),dateStr:new Date().toLocaleDateString(),timeStr:new Date().toLocaleTimeString()}}};exports.handleInterceptedCrash=handleInterceptedCrash;const recordCustomCrash=(e,r)=>(0,exports.handleInterceptedCrash)(e,typeof e=="object"?e.stack:void 0,r?.isFatal??!1,r?.type||enums_1.CrashType.Custom,r?.componentStack);exports.recordCustomCrash=recordCustomCrash;const triggerGlobalCrashScreen=e=>{(0,exports.emitCrashEvent)({error:e.error||new Error(e.message),isFatal:!0,message:e.message,stack:e.stack,timestamp:e.timestamp||Date.now(),logId:e.logId,crashRecord:e})};exports.triggerGlobalCrashScreen=triggerGlobalCrashScreen;const simulateTestCrash=(e=enums_1.CrashType.Js,r,o,s=!0)=>{const t=new Error(r||_defaultSimMessage(e));return(0,exports.handleInterceptedCrash)(e===enums_1.CrashType.Native?t.message:t,o||t.stack,s,e,e===enums_1.CrashType.Render?_buildComponentStack():void 0)};exports.simulateTestCrash=simulateTestCrash;const _defaultSimMessage=e=>{switch(e){case"native":return(0,i18n_1.t)("crash.simNativeMessage");case"promise":return(0,i18n_1.t)("crash.simPromiseMessage");case"render":return(0,i18n_1.t)("crash.simRenderMessage");default:return(0,i18n_1.t)("crash.simJsMessage")}},_buildComponentStack=()=>{try{const e=new Error;if(e.stack)return e.stack.split(`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setupGlobalCrashHandler=exports.exportCrashReport=exports.simulateTestCrash=exports.triggerGlobalCrashScreen=exports.recordCustomCrash=exports.handleInterceptedCrash=exports.emitCrashEvent=exports.subscribeCrashEvents=exports.clearCrashRecords=exports.getCrashRecords=exports.computeCrashFingerprint=exports.parseCrashStackTrace=exports.getCrashBreadcrumbs=exports.clearCrashBreadcrumbs=exports.recordUserActionBreadcrumb=exports.recordReduxBreadcrumb=exports.recordNetworkBreadcrumb=exports.recordNavigationBreadcrumb=exports.addCrashBreadcrumb=exports.pruneCrashRecords=exports.getMaxCrashLogsLimit=exports.setMaxCrashLogsLimit=exports.getCrashModuleEnabled=exports.setCrashModuleEnabled=exports.applyCrashPolicyPreset=exports.setCrashThrottleDuplicatesConfig=exports.getCrashModalTriggerPolicyConfig=exports.setCrashModalTriggerPolicyConfig=exports.getCrashIgnoredTypesConfig=exports.setCrashIgnoredTypesConfig=exports.DEFAULT_CRASH_IGNORED_TYPES=exports.CrashExportFormat=void 0;const react_native_1=require("react-native"),enums_1=require("../types/enums");Object.defineProperty(exports,"CrashExportFormat",{enumerable:!0,get:function(){return enums_1.CrashExportFormat}});const consoleLogger_1=require("./consoleLogger"),NativeInspector_1=require("../native/NativeInspector"),i18n_1=require("../i18n");exports.DEFAULT_CRASH_IGNORED_TYPES={js:!0,native:!1,render:!0,promise:!1,custom:!1};let crashListeners=[],isCrashHandlerInitialized=!1,lastHandledErrorTimestamp=0,lastHandledErrorFingerprint="",crashRecordsStore=[],breadcrumbsStore=[];const MAX_BREADCRUMBS=50;let maxStoredCrashes=100;const appStartTime=Date.now();let isCrashModuleEnabled=!1,crashIgnoredTypesConfig={...exports.DEFAULT_CRASH_IGNORED_TYPES},crashModalTriggerPolicyConfig="fatal_only",crashThrottleDuplicatesConfig=!0;const setCrashIgnoredTypesConfig=e=>{crashIgnoredTypesConfig={...crashIgnoredTypesConfig,...e}};exports.setCrashIgnoredTypesConfig=setCrashIgnoredTypesConfig;const getCrashIgnoredTypesConfig=()=>({...crashIgnoredTypesConfig});exports.getCrashIgnoredTypesConfig=getCrashIgnoredTypesConfig;const setCrashModalTriggerPolicyConfig=e=>{crashModalTriggerPolicyConfig=e};exports.setCrashModalTriggerPolicyConfig=setCrashModalTriggerPolicyConfig;const getCrashModalTriggerPolicyConfig=()=>crashModalTriggerPolicyConfig;exports.getCrashModalTriggerPolicyConfig=getCrashModalTriggerPolicyConfig;const setCrashThrottleDuplicatesConfig=e=>{crashThrottleDuplicatesConfig=e};exports.setCrashThrottleDuplicatesConfig=setCrashThrottleDuplicatesConfig;const applyCrashPolicyPreset=e=>{switch(e){case"max_shield":crashIgnoredTypesConfig={js:!1,native:!1,render:!1,promise:!1,custom:!1};break;case"silent":crashIgnoredTypesConfig={js:!0,native:!0,render:!0,promise:!0,custom:!0};break;default:crashIgnoredTypesConfig={...exports.DEFAULT_CRASH_IGNORED_TYPES};break}return{...crashIgnoredTypesConfig}};exports.applyCrashPolicyPreset=applyCrashPolicyPreset;const setCrashModuleEnabled=e=>{isCrashModuleEnabled=e};exports.setCrashModuleEnabled=setCrashModuleEnabled;const getCrashModuleEnabled=()=>isCrashModuleEnabled;exports.getCrashModuleEnabled=getCrashModuleEnabled;const setMaxCrashLogsLimit=e=>{maxStoredCrashes=Math.max(10,e),crashRecordsStore.length>maxStoredCrashes&&(crashRecordsStore=crashRecordsStore.slice(0,maxStoredCrashes))};exports.setMaxCrashLogsLimit=setMaxCrashLogsLimit;const getMaxCrashLogsLimit=()=>maxStoredCrashes;exports.getMaxCrashLogsLimit=getMaxCrashLogsLimit;const pruneCrashRecords=e=>{const r=e!==void 0?Math.max(0,e):Math.floor(crashRecordsStore.length/2),o=crashRecordsStore.length-r;return o>0&&(crashRecordsStore=crashRecordsStore.slice(0,r)),breadcrumbsStore.length>20&&(breadcrumbsStore=breadcrumbsStore.slice(0,20)),Math.max(0,o)};exports.pruneCrashRecords=pruneCrashRecords;const addCrashBreadcrumb=(e,r,o)=>{if(isCrashModuleEnabled)try{const s={type:e,message:r,timestamp:Date.now(),data:o};breadcrumbsStore.unshift(s),breadcrumbsStore.length>MAX_BREADCRUMBS&&(breadcrumbsStore=breadcrumbsStore.slice(0,MAX_BREADCRUMBS))}catch{}};exports.addCrashBreadcrumb=addCrashBreadcrumb;const recordNavigationBreadcrumb=(e,r)=>{(0,exports.addCrashBreadcrumb)("navigation",(0,i18n_1.t)("crash.breadcrumbNavigation",{from:e||"/",to:r||"/"}),{from:e,to:r})};exports.recordNavigationBreadcrumb=recordNavigationBreadcrumb;const recordNetworkBreadcrumb=(e,r,o,s)=>{const t=o!=null?` [${o}]`:"",a=s!=null?` (${Math.round(s)}ms)`:"";(0,exports.addCrashBreadcrumb)("network",`${r.toUpperCase()} ${e}${t}${a}`,{url:e,method:r,status:o,duration:s})};exports.recordNetworkBreadcrumb=recordNetworkBreadcrumb;const recordReduxBreadcrumb=(e,r)=>{(0,exports.addCrashBreadcrumb)("redux",(0,i18n_1.t)("crash.breadcrumbAction",{actionType:e}),{type:e,payloadSummary:typeof r=="object"&&r!==null?Object.keys(r):typeof r})};exports.recordReduxBreadcrumb=recordReduxBreadcrumb;const recordUserActionBreadcrumb=(e,r)=>{(0,exports.addCrashBreadcrumb)("user",e,r)};exports.recordUserActionBreadcrumb=recordUserActionBreadcrumb;const clearCrashBreadcrumbs=()=>{breadcrumbsStore=[]};exports.clearCrashBreadcrumbs=clearCrashBreadcrumbs;const getCrashBreadcrumbs=()=>[...breadcrumbsStore];exports.getCrashBreadcrumbs=getCrashBreadcrumbs;const parseCrashStackTrace=e=>{if(!e||typeof e!="string")return[];const r=e.split(`
2
+ `),o=[];for(const s of r){const t=s.trim();if(!t||t.includes("crashHandler.ts")||t.includes("handleInterceptedCrash")||t.includes("addLogFromCrash")||t.includes("setupGlobalCrashHandler"))continue;const a=t.match(/^([^@]+)@(.*):(\d+):(\d+)$/);if(a){const[,i,n,u,h]=a,m=n.split("?")[0].split("/").pop()||n,f=!n.includes("node_modules")&&!n.includes("react-native")&&!n.includes("react-dom")&&!n.includes("hermes")&&!n.includes("internal");o.push({method:i.trim(),file:m,lineNumber:parseInt(u,10),column:parseInt(h,10),raw:t,isAppCode:f});continue}const p=t.match(/^at\s+(.+)\s+\((.+):(\d+):(\d+)\)$/);if(p){const[,i,n,u,h]=p,m=n.split("?")[0].split("/").pop()||n,f=!n.includes("node_modules")&&!n.includes("react-native")&&!n.includes("react-dom")&&!n.includes("internal");o.push({method:i.trim(),file:m,lineNumber:parseInt(u,10),column:parseInt(h,10),raw:t,isAppCode:f});continue}const d=t.match(/^at\s+(.+):(\d+):(\d+)$/);if(d){const[,i,n,u]=d,h=i.split("?")[0].split("/").pop()||i,m=!i.includes("node_modules")&&!i.includes("react-native");o.push({method:"<anonymous>",file:h,lineNumber:parseInt(n,10),column:parseInt(u,10),raw:t,isAppCode:m});continue}const l=t.match(/^at\s+([a-zA-Z0-9_$.]+)\(([a-zA-Z0-9_$]+\.java):(\d+)\)$/);if(l){const[,i,n,u]=l,h=!i.startsWith("com.facebook.react")&&!i.startsWith("android.");o.push({method:i,file:n,lineNumber:parseInt(u,10),column:0,raw:t,isAppCode:h});continue}const c=t.match(/^\d+\s+([^\s]+)\s+(0x[0-9a-fA-F]+)\s+(.+)$/);if(c){const[,i,,n]=c,u=!i.startsWith("lib")&&!i.startsWith("Core")&&!i.startsWith("React");o.push({method:n,file:i,lineNumber:0,column:0,raw:t,isAppCode:u});continue}o.push({method:t.startsWith("at ")?t.slice(3):t,file:"runtime",lineNumber:0,column:0,raw:t,isAppCode:!1})}return o};exports.parseCrashStackTrace=parseCrashStackTrace;const getMemoryDiagnostics=()=>{try{const e=globalThis.performance;if(e&&e.memory)return{usedJSHeapSize:Math.round(e.memory.usedJSHeapSize/(1024*1024)),totalJSHeapSize:Math.round(e.memory.totalJSHeapSize/(1024*1024))}}catch{}},getScreenDimensions=()=>{try{const e=react_native_1.Dimensions.get("window");return`${Math.round(e.width)}x${Math.round(e.height)} (${e.scale}x)`}catch{return(0,i18n_1.t)("crash.unknown")}},computeCrashFingerprint=e=>{const r=e.type||"js",o=e.name||"Error",s=e.parsedStack&&e.parsedStack.length>0?e.parsedStack[0]:null,t=s?`${s.file}:${s.lineNumber}`:"unknown";return`${r}_${o}_${t}`};exports.computeCrashFingerprint=computeCrashFingerprint;const getCrashRecords=()=>[...crashRecordsStore];exports.getCrashRecords=getCrashRecords;const clearCrashRecords=()=>{crashRecordsStore=[],(0,exports.emitCrashEvent)({error:null,message:"__CLEARED__",timestamp:Date.now()})};exports.clearCrashRecords=clearCrashRecords;const subscribeCrashEvents=e=>(crashListeners.push(e),()=>{crashListeners=crashListeners.filter(r=>r!==e)});exports.subscribeCrashEvents=subscribeCrashEvents;const emitCrashEvent=e=>{if(e.message!=="__CLEARED__"){const r=Date.now();if(r-lastHandledErrorTimestamp<250)return;lastHandledErrorTimestamp=r}crashListeners.forEach(r=>{try{r(e)}catch{}})};exports.emitCrashEvent=emitCrashEvent;const handleInterceptedCrash=(e,r,o=!1,s,t)=>{try{const a=e instanceof Error||typeof e=="object"&&e!==null?e:new Error(String(e||(0,i18n_1.t)("crash.runtimeException"))),p=a.message||(typeof e=="string"?e:(0,i18n_1.t)("crash.runtimeException"));let d="";typeof r=="string"?d=r:Array.isArray(r)?d=r.map(C=>`at ${C.methodName||"<anonymous>"} (${C.file||"unknown"}:${C.lineNumber||0}:${C.column||0})`).join(`
3
+ `):d=a.stack||new Error().stack||"";let l=s||enums_1.CrashType.Js;const c=p.toLowerCase();if(s||(c.includes("native")||c.includes("sigsegv")||c.includes("nsrange")||c.includes("nullpointerexception")||c.includes("fatal signal")?l=enums_1.CrashType.Native:c.includes("promise")||c.includes("unhandled rejection")||c.includes("unhandledrejection")?l=enums_1.CrashType.Promise:c.includes("render")||c.includes("errorboundary")||t?l=enums_1.CrashType.Render:l=enums_1.CrashType.Js),!!crashIgnoredTypesConfig[l])return{id:`crash_ignored_${Date.now()}`,isFatal:o,type:l,message:p,timestamp:Date.now(),dateStr:new Date().toLocaleDateString(),timeStr:new Date().toLocaleTimeString()};const n=new Date,u=n.toLocaleDateString(),h=n.toLocaleTimeString(),m=(0,exports.parseCrashStackTrace)(d),f=`${l}_${p}_${d.slice(0,80)}`,b=Date.now();if(crashThrottleDuplicatesConfig&&f===lastHandledErrorFingerprint&&b-lastHandledErrorTimestamp<500)return crashRecordsStore.length>0&&(crashRecordsStore[0].duplicateCount=(crashRecordsStore[0].duplicateCount||1)+1),crashRecordsStore[0];lastHandledErrorFingerprint=f,lastHandledErrorTimestamp=b;const y=(0,consoleLogger_1.addLogFromCrash)(a,`[${o?(0,i18n_1.t)("crash.logFatalCrash"):(0,i18n_1.t)("crash.logUnhandledError")}] ${p}`,d,o),$=typeof globalThis.HermesInternal<"u",S=typeof globalThis.nativeFabricUIManager<"u",x={id:`crash_${Date.now()}_${Math.random().toString(36).substr(2,6)}`,error:a,isFatal:o,type:l,message:p,name:a.name||(o?(0,i18n_1.t)("crash.errorNameFatal"):(0,i18n_1.t)("crash.errorNameUnhandled")),stack:d,parsedStack:m,componentStack:t||void 0,timestamp:Date.now(),dateStr:u,timeStr:h,deviceInfo:{platform:react_native_1.Platform.OS,osVersion:String(react_native_1.Platform.Version),rnVersion:react_native_1.Platform.constants?.reactNativeVersion?`${react_native_1.Platform.constants.reactNativeVersion.major}.${react_native_1.Platform.constants.reactNativeVersion.minor}.${react_native_1.Platform.constants.reactNativeVersion.patch}`:(0,i18n_1.t)("crash.unknown"),isHermes:$,isFabric:S,appState:react_native_1.AppState.currentState||"active"},memoryInfo:getMemoryDiagnostics(),breadcrumbs:[...breadcrumbsStore],logId:y?.id};crashRecordsStore.unshift(x),crashRecordsStore.length>maxStoredCrashes&&(crashRecordsStore=crashRecordsStore.slice(0,maxStoredCrashes));let g=!1;crashModalTriggerPolicyConfig==="all_errors"?g=!0:crashModalTriggerPolicyConfig==="fatal_only"?g=o||l===enums_1.CrashType.Native:crashModalTriggerPolicyConfig==="silent_tab_only"&&(g=!1),(0,exports.emitCrashEvent)({error:a,isFatal:o,message:`[${o?(0,i18n_1.t)("crash.logFatalCrash"):(0,i18n_1.t)("crash.logUnhandledError")}] ${p}`,stack:d,timestamp:Date.now(),logId:y?.id,crashRecord:x,shouldShowModal:g});try{(0,NativeInspector_1.showNativeFloatingButton)(),(0,NativeInspector_1.setNativeFloatingButtonBadge)(!0)}catch{}return x}catch{return{id:`crash_${Date.now()}`,isFatal:!0,type:enums_1.CrashType.Js,message:String(e||(0,i18n_1.t)("crash.unknownException")),timestamp:Date.now(),dateStr:new Date().toLocaleDateString(),timeStr:new Date().toLocaleTimeString()}}};exports.handleInterceptedCrash=handleInterceptedCrash;const recordCustomCrash=(e,r)=>(0,exports.handleInterceptedCrash)(e,typeof e=="object"?e.stack:void 0,r?.isFatal??!1,r?.type||enums_1.CrashType.Custom,r?.componentStack);exports.recordCustomCrash=recordCustomCrash;const triggerGlobalCrashScreen=e=>{(0,exports.emitCrashEvent)({error:e.error||new Error(e.message),isFatal:!0,message:e.message,stack:e.stack,timestamp:e.timestamp||Date.now(),logId:e.logId,crashRecord:e})};exports.triggerGlobalCrashScreen=triggerGlobalCrashScreen;const simulateTestCrash=(e=enums_1.CrashType.Js,r,o,s=!0)=>{const t=new Error(r||_defaultSimMessage(e));return(0,exports.handleInterceptedCrash)(e===enums_1.CrashType.Native?t.message:t,o||t.stack,s,e,e===enums_1.CrashType.Render?_buildComponentStack():void 0)};exports.simulateTestCrash=simulateTestCrash;const _defaultSimMessage=e=>{switch(e){case"native":return(0,i18n_1.t)("crash.simNativeMessage");case"promise":return(0,i18n_1.t)("crash.simPromiseMessage");case"render":return(0,i18n_1.t)("crash.simRenderMessage");default:return(0,i18n_1.t)("crash.simJsMessage")}},_buildComponentStack=()=>{try{const e=new Error;if(e.stack)return e.stack.split(`
4
4
  `).slice(1,6).map(r=>` ${r.trim()}`).join(`
5
- `)}catch{}},exportCrashReport=(e,r="text")=>{if(r==="json")return JSON.stringify(e,null,2);const o=Math.round((e.timestamp-appStartTime)/1e3);if(r==="markdown"){const t=[];return t.push(`## ${(0,i18n_1.t)("crash.mdReportTitle",{name:e.name||"Error"})}`),t.push(`> **${e.message}**`),t.push(""),t.push(`- **${(0,i18n_1.t)("crash.reportType")}** \`${e.type.toUpperCase()}\``),t.push(`- **${(0,i18n_1.t)("crash.reportFatal")}** \`${e.isFatal?(0,i18n_1.t)("crash.mdSeverityFatal"):(0,i18n_1.t)("crash.mdSeverityHandled")}\``),t.push(`- **${(0,i18n_1.t)("crash.reportTimestamp")}** ${e.dateStr} ${e.timeStr}`),t.push(`- **${(0,i18n_1.t)("crash.reportUptime")}** ${o}s`),t.push(`- **${(0,i18n_1.t)("crash.reportPlatform")}** ${e.deviceInfo?.platform?.toUpperCase()} (v${e.deviceInfo?.osVersion})`),t.push(`- **${(0,i18n_1.t)("crash.reportReactNative")}** v${e.deviceInfo?.rnVersion||"N/A"}`),t.push(`- **${(0,i18n_1.t)("crash.jsEngine")}** ${e.deviceInfo?.isHermes?(0,i18n_1.t)("crash.hermesEngine"):(0,i18n_1.t)("crash.jsc")}`),t.push(`- **${(0,i18n_1.t)("crash.reportArchitecture")}** ${e.deviceInfo?.isFabric?(0,i18n_1.t)("crash.reportFabricNew"):(0,i18n_1.t)("crash.reportPaperLegacy")}`),e.memoryInfo&&t.push(`- **${(0,i18n_1.t)("crash.reportJsMemory")}** ${e.memoryInfo.usedJSHeapSize} MB / ${e.memoryInfo.totalJSHeapSize} MB`),t.push(""),t.push(`### ${(0,i18n_1.t)("crash.mdStackTrace")}`),t.push("```"),t.push(e.stack||(0,i18n_1.t)("crash.reportNoStackTrace")),t.push("```"),e.componentStack&&(t.push(""),t.push(`### ${(0,i18n_1.t)("crash.mdComponentHierarchy")}`),t.push("```"),t.push(e.componentStack),t.push("```")),e.breadcrumbs&&e.breadcrumbs.length>0&&(t.push(""),t.push(`### ${(0,i18n_1.t)("crash.mdRecentBreadcrumbs")}`),e.breadcrumbs.forEach(a=>{const d=new Date(a.timestamp).toLocaleTimeString();t.push(`- \`[${d}]\` **[${a.type.toUpperCase()}]** ${a.message}`)})),t.join(`
5
+ `)}catch{}},exportCrashReport=(e,r="text")=>{if(r==="json")return JSON.stringify(e,null,2);const o=Math.round((e.timestamp-appStartTime)/1e3);if(r==="markdown"){const t=[];return t.push(`## ${(0,i18n_1.t)("crash.mdReportTitle",{name:e.name||"Error"})}`),t.push(`> **${e.message}**`),t.push(""),t.push(`- **${(0,i18n_1.t)("crash.reportType")}** \`${e.type.toUpperCase()}\``),t.push(`- **${(0,i18n_1.t)("crash.reportFatal")}** \`${e.isFatal?(0,i18n_1.t)("crash.mdSeverityFatal"):(0,i18n_1.t)("crash.mdSeverityHandled")}\``),t.push(`- **${(0,i18n_1.t)("crash.reportTimestamp")}** ${e.dateStr} ${e.timeStr}`),t.push(`- **${(0,i18n_1.t)("crash.reportUptime")}** ${o}s`),t.push(`- **${(0,i18n_1.t)("crash.reportPlatform")}** ${e.deviceInfo?.platform?.toUpperCase()} (v${e.deviceInfo?.osVersion})`),t.push(`- **${(0,i18n_1.t)("crash.reportReactNative")}** v${e.deviceInfo?.rnVersion||"N/A"}`),t.push(`- **${(0,i18n_1.t)("crash.jsEngine")}** ${e.deviceInfo?.isHermes?(0,i18n_1.t)("crash.hermesEngine"):(0,i18n_1.t)("crash.jsc")}`),t.push(`- **${(0,i18n_1.t)("crash.reportArchitecture")}** ${e.deviceInfo?.isFabric?(0,i18n_1.t)("crash.reportFabricNew"):(0,i18n_1.t)("crash.reportPaperLegacy")}`),e.memoryInfo&&t.push(`- **${(0,i18n_1.t)("crash.reportJsMemory")}** ${e.memoryInfo.usedJSHeapSize} MB / ${e.memoryInfo.totalJSHeapSize} MB`),t.push(""),t.push(`### ${(0,i18n_1.t)("crash.mdStackTrace")}`),t.push("```"),t.push(e.stack||(0,i18n_1.t)("crash.reportNoStackTrace")),t.push("```"),e.componentStack&&(t.push(""),t.push(`### ${(0,i18n_1.t)("crash.mdComponentHierarchy")}`),t.push("```"),t.push(e.componentStack),t.push("```")),e.breadcrumbs&&e.breadcrumbs.length>0&&(t.push(""),t.push(`### ${(0,i18n_1.t)("crash.mdRecentBreadcrumbs")}`),e.breadcrumbs.forEach(a=>{const p=new Date(a.timestamp).toLocaleTimeString();t.push(`- \`[${p}]\` **[${a.type.toUpperCase()}]** ${a.message}`)})),t.join(`
6
6
  `)}const s=[];return s.push("===================================================="),s.push(` ${(0,i18n_1.t)("crash.reportTitle")} `),s.push("===================================================="),s.push(`${(0,i18n_1.t)("crash.reportErrorName")} ${e.name||"Error"}`),s.push(`${(0,i18n_1.t)("crash.reportMessage")} ${e.message}`),s.push(`${(0,i18n_1.t)("crash.reportType")} ${e.type.toUpperCase()}`),s.push(`${(0,i18n_1.t)("crash.reportFatal")} ${e.isFatal?(0,i18n_1.t)("crash.reportFatalYes"):(0,i18n_1.t)("crash.reportFatalNo")}`),s.push(`${(0,i18n_1.t)("crash.reportTimestamp")} ${e.dateStr} ${e.timeStr} (${e.timestamp})`),s.push(`${(0,i18n_1.t)("crash.reportUptime")} ${(0,i18n_1.t)("crash.reportUptimeValue",{seconds:o})}`),s.push(`${(0,i18n_1.t)("crash.reportPlatform")} ${e.deviceInfo?.platform?.toUpperCase()} (v${e.deviceInfo?.osVersion})`),s.push(`${(0,i18n_1.t)("crash.reportReactNative")} ${e.deviceInfo?.rnVersion||"N/A"}`),s.push(`${(0,i18n_1.t)("crash.reportHermes")} ${e.deviceInfo?.isHermes?(0,i18n_1.t)("crash.reportEnabled"):(0,i18n_1.t)("crash.reportDisabled")}`),s.push(`${(0,i18n_1.t)("crash.reportArchitecture")} ${e.deviceInfo?.isFabric?(0,i18n_1.t)("crash.reportFabricNew"):(0,i18n_1.t)("crash.reportPaperLegacy")}`),s.push(`${(0,i18n_1.t)("crash.reportScreenSize")} ${getScreenDimensions()}`),s.push(`${(0,i18n_1.t)("crash.reportAppState")} ${e.deviceInfo?.appState||"active"}`),e.memoryInfo&&s.push(`${(0,i18n_1.t)("crash.reportJsMemory")} ${e.memoryInfo.usedJSHeapSize} MB / ${e.memoryInfo.totalJSHeapSize} MB`),s.push("----------------------------------------------------"),s.push(`${(0,i18n_1.t)("crash.reportStackTrace")}`),s.push(e.stack||(0,i18n_1.t)("crash.reportNoStackTrace")),e.componentStack&&(s.push("----------------------------------------------------"),s.push(`${(0,i18n_1.t)("crash.reportComponentHierarchy")}`),s.push(e.componentStack)),e.breadcrumbs&&e.breadcrumbs.length>0&&(s.push("----------------------------------------------------"),s.push(`${(0,i18n_1.t)("crash.reportRecentBreadcrumbs")}`),e.breadcrumbs.forEach(t=>{const a=new Date(t.timestamp).toLocaleTimeString();s.push(` [${a}] [${t.type.toUpperCase()}] ${t.message}`)})),s.push("===================================================="),s.join(`
7
7
  `)};exports.exportCrashReport=exportCrashReport;const setupGlobalCrashHandler=()=>{if(!isCrashHandlerInitialized){isCrashHandlerInitialized=!0;try{react_native_1.LogBox&&typeof react_native_1.LogBox.ignoreAllLogs=="function"&&react_native_1.LogBox.ignoreAllLogs(!0)}catch{}try{const e=require("react-native/Libraries/LogBox/Data/LogBoxData");e&&typeof e.setDisabled=="function"&&e.setDisabled(!0)}catch{}try{const e=react_native_1.NativeModules?.NetworkInspectorModule;e&&(typeof e.enableNativeCrashProtection=="function"&&e.enableNativeCrashProtection(),new react_native_1.NativeEventEmitter(e).addListener("onNativeCrash",o=>{const t=`[${(o?.platform||react_native_1.Platform.OS).toUpperCase()} ${(0,i18n_1.t)("crash.nativeCrashTitle")}] ${o?.message||(0,i18n_1.t)("crash.nativeUncaughtException")}`,a=o?.stack||"";(0,exports.handleInterceptedCrash)(t,a,!0,"native")}))}catch{}try{const e=react_native_1.TurboModuleRegistry||globalThis.__turboModuleProxy,r=react_native_1.NativeModules?.ExceptionsManager||(e?.get?e.get("ExceptionsManager"):null);if(r){r.reportFatalException=(s,t,a)=>{(0,exports.handleInterceptedCrash)(s,t,!0,"native");try{typeof r.dismissRedbox=="function"&&r.dismissRedbox()}catch{}},r.reportSoftException=(s,t,a)=>{(0,exports.handleInterceptedCrash)(s,t,!1,"js");try{typeof r.dismissRedbox=="function"&&r.dismissRedbox()}catch{}},r.reportException=s=>{const t=s?.message||s?.title||(0,i18n_1.t)("crash.nativeException"),a=s?.stack||s?.rawStack;(0,exports.handleInterceptedCrash)(t,a,s?.isFatal??!0,"js");try{typeof r.dismissRedbox=="function"&&r.dismissRedbox()}catch{}},r.updateExceptionMessage=()=>{};try{typeof r.dismissRedbox=="function"&&r.dismissRedbox()}catch{}}const o=react_native_1.NativeModules?.RedBox||react_native_1.NativeModules?.RCTRedBox||(e?.get?e.get("RedBox")||e.get("RCTRedBox"):null);o&&(typeof o.showErrorMessage=="function"&&(o.showErrorMessage=()=>{}),typeof o.showUserError=="function"&&(o.showUserError=()=>{}),typeof o.dismiss=="function"&&o.dismiss())}catch{}try{const r=globalThis.ErrorUtils;r&&(typeof r.setGlobalHandler=="function"&&r.setGlobalHandler((o,s)=>{(0,exports.handleInterceptedCrash)(o,o?.stack,s??!1,"js")}),typeof r.reportFatalError=="function"&&(r.reportFatalError=o=>{(0,exports.handleInterceptedCrash)(o,o?.stack,!0,"js")}),typeof r.reportError=="function"&&(r.reportError=o=>{(0,exports.handleInterceptedCrash)(o,o?.stack,!1,"js")}))}catch{}try{const e=globalThis,r=o=>{try{const s=o?.reason||o?.detail?.reason||o,t=s?.stack||(o?.stack??new Error().stack);(0,exports.handleInterceptedCrash)(s,t,!1,"promise")}catch{}};typeof e.addEventListener=="function"&&e.addEventListener("unhandledrejection",r),typeof e.onunhandledrejection<"u"&&(e.onunhandledrejection=r)}catch{}}};exports.setupGlobalCrashHandler=setupGlobalCrashHandler;
@@ -17,6 +17,8 @@ export declare const getPath: (url: string) => string;
17
17
  export declare const getBaseUrl: (url: string) => string;
18
18
  export declare const getCurlCommand: (log: NetworkLog) => string;
19
19
  export declare const getFetchCommand: (log: NetworkLog) => string;
20
+ export declare const getPostmanRequestJson: (log: NetworkLog) => string;
21
+ export declare const openWithPostman: (log: NetworkLog, toastFn?: (msg: string) => void) => Promise<void>;
20
22
  export declare const deduplicateLogs: (raw: NetworkLog[]) => NetworkLog[];
21
23
  export declare const escapeRegex: (str: string) => string;
22
24
  export declare const getNavigationInfo: (state: any, path?: string[]) => RouteInfo;
@@ -82,3 +84,4 @@ export interface RuntimeDiagnostics {
82
84
  totalAllocMb: number;
83
85
  }
84
86
  export declare const getRuntimeDiagnostics: () => RuntimeDiagnostics;
87
+ export declare const isUrlHidden: (url: string | undefined | null, patterns: string[] | undefined | null) => boolean;