@ceraph/react-native-mcp 1.0.0 → 1.0.1

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.
package/README.md CHANGED
@@ -4,7 +4,7 @@ MCP server for React Native and Expo development. It lets your coding agent driv
4
4
 
5
5
  Works with any MCP client: Claude Code, Cursor, Codex, VS Code, Antigravity, and others.
6
6
 
7
- > ⚠️ **Ignore the `npm i` line above.** Run this once instead:
7
+ > **To install and configure Ceraph, run this command from your project root:**
8
8
  >
9
9
  > ```bash
10
10
  > npx @ceraph/react-native-mcp@latest init
@@ -16,8 +16,9 @@ Ceraph supports React Native and Expo apps. iOS testing runs on macOS through
16
16
  Xcode and WebDriverAgent. Android testing runs on macOS, Windows, or Linux
17
17
  through ADB and UiAutomator2.
18
18
 
19
- Ceraph supports Expo projects through a development build that `ceraph start`
20
- creates, installs, and launches when needed.
19
+ For both Expo and bare React Native projects, `ceraph start` creates, installs,
20
+ and launches the native development build as needed. Expo projects run
21
+ through that build rather than Expo Go.
21
22
 
22
23
  | Target / host | Status | Notes |
23
24
  | -------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------- |
@@ -58,8 +59,8 @@ The `rn_target_status` tool reports the active platform, exact runtime, target p
58
59
  ## Requirements
59
60
 
60
61
  - Node.js 20.19+, 22.12+, or 24+
61
- - For iOS: macOS with Xcode 14+ and either an iOS 16+ USB device or a booted Simulator. See [iOS setup](#ios-setup).
62
- - For Android: the Android SDK/JDK used by your project, with `adb` available, and either an authorized USB device or a booted Android Emulator. See [Android setup](#android-setup).
62
+ - For iOS: macOS with Xcode 14+ and either an iOS 16+ USB device or an available Simulator runtime. See [iOS setup](#ios-setup).
63
+ - For Android: the Android SDK/JDK used by your project, with `adb` available, and either an authorized USB device or a configured Android Emulator. See [Android setup](#android-setup).
63
64
 
64
65
  > **Multiple agents:** One running app instance has one active Ceraph driver. Simultaneous contenders are arbitrated so they receive a busy result instead of fighting over the same device, simulator, or emulator.
65
66
 
@@ -67,9 +68,6 @@ The `rn_target_status` tool reports the active platform, exact runtime, target p
67
68
 
68
69
  iOS device testing requires macOS, Xcode 14+, and iOS 16 or later.
69
70
 
70
- For projects with multiple iOS build flavors, use `--scheme <name>` and
71
- `--configuration <name>` (default `Debug`).
72
-
73
71
  ### Physical device
74
72
 
75
73
  Connect and unlock the device over USB, trust the Mac when prompted, and enable
@@ -86,27 +84,24 @@ dependency, `ceraph doctor` provides the exact installation step.
86
84
 
87
85
  The Simulator has two presentation modes:
88
86
 
89
- - `ceraph start --simulator` opens a windowed Simulator for visible testing.
87
+ - `ceraph start --simulator` selects and boots a windowed Simulator for visible testing.
90
88
  - `ceraph start --headless` runs without Simulator.app for CI, cloud Macs, and
91
89
  background agent verification. Screenshots, recordings, snapshots, and WDA
92
90
  remain available; host audio is not disabled.
93
91
 
94
92
  Add an exact simulator UDID after either flag to select a particular simulator.
93
+ For projects with multiple iOS build flavors, add `--scheme <name>` and
94
+ `--configuration <name>` (default `Debug`).
95
95
 
96
96
  Ceraph automatically installs the optional `appium-webdriveragent` package the
97
97
  first time it targets a Simulator, then builds and launches WDA. The first build
98
98
  usually takes about a minute; later runs reuse it. Device-only setups do not
99
99
  install this dependency.
100
100
 
101
- You can let Ceraph boot a Simulator or boot one yourself:
102
-
103
- ```bash
104
- open -a Simulator
105
- # or: xcrun simctl boot <UDID>
106
- ```
107
-
108
- Use `xcrun simctl list devices booted` to see booted Simulators. Call
109
- `rn_wda_stop` to stop WDA, or exit the MCP server to stop its managed process.
101
+ Ceraph reuses an eligible booted Simulator or boots the selected/default one
102
+ when needed. Use `xcrun simctl list devices available` to see available
103
+ Simulators. Call `rn_wda_stop` to stop WDA, or exit the MCP server to stop its
104
+ managed process.
110
105
 
111
106
  To make headless mode the default for the current environment:
112
107
 
@@ -127,8 +122,6 @@ never selected automatically. Target one explicitly with
127
122
 
128
123
  ## Android setup
129
124
 
130
- Use `--variant <name>` when the project has multiple debuggable build variants.
131
-
132
125
  Install Android Studio and use its SDK Manager to install Platform-Tools and the
133
126
  SDK components required by your React Native project. Ensure `adb` is available
134
127
  on your `PATH`, then confirm that it can see the intended runtime:
@@ -153,7 +146,8 @@ The Android Emulator has two presentation modes:
153
146
  and background testing.
154
147
 
155
148
  Add an AVD name after either flag to select the virtual device to start or reuse.
156
- `--emulator` also accepts the adb serial of a running emulator.
149
+ `--emulator` also accepts the adb serial of a running emulator. When the project
150
+ has multiple debuggable build variants, add `--variant <name>`.
157
151
 
158
152
  Ceraph manages build and installation, automation, app launch, wake and unlock
159
153
  verification, and Expo dev-client routing for both Android targets.
@@ -1 +1 @@
1
- 'use strict';const _0x2b5fa5=_0x16da;(function(_0x17e19a,_0x50d9fb){const _0x5873ef=_0x16da,_0x1d8d39=_0x17e19a();while(!![]){try{const _0x26ef88=parseInt(_0x5873ef(0xef))/0x1*(parseInt(_0x5873ef(0xd6))/0x2)+parseInt(_0x5873ef(0xe2))/0x3*(-parseInt(_0x5873ef(0xc1))/0x4)+-parseInt(_0x5873ef(0xd3))/0x5+-parseInt(_0x5873ef(0xde))/0x6+-parseInt(_0x5873ef(0xe6))/0x7*(parseInt(_0x5873ef(0xe3))/0x8)+-parseInt(_0x5873ef(0xea))/0x9+-parseInt(_0x5873ef(0xd2))/0xa*(-parseInt(_0x5873ef(0xe0))/0xb);if(_0x26ef88===_0x50d9fb)break;else _0x1d8d39['push'](_0x1d8d39['shift']());}catch(_0x4c68d5){_0x1d8d39['push'](_0x1d8d39['shift']());}}}(_0x4cf8,0x1aaea));var __defProp=Object[_0x2b5fa5(0xd9)],__getOwnPropDesc=Object['getOwnPropertyDescriptor'],__getOwnPropNames=Object['getOwnPropertyNames'],__hasOwnProp=Object['prototype']['hasOwnProperty'],__export=(_0x50d821,_0x3fe370)=>{for(var _0x13fcab in _0x3fe370)__defProp(_0x50d821,_0x13fcab,{'get':_0x3fe370[_0x13fcab],'enumerable':!![]});},__copyProps=(_0x93af45,_0x35b48c,_0x53fc0f,_0x2e92b7)=>{const _0x5d65c4=_0x2b5fa5;if(_0x35b48c&&typeof _0x35b48c==='object'||typeof _0x35b48c===_0x5d65c4(0xc2)){for(let _0x1ffe33 of __getOwnPropNames(_0x35b48c))if(!__hasOwnProp['call'](_0x93af45,_0x1ffe33)&&_0x1ffe33!==_0x53fc0f)__defProp(_0x93af45,_0x1ffe33,{'get':()=>_0x35b48c[_0x1ffe33],'enumerable':!(_0x2e92b7=__getOwnPropDesc(_0x35b48c,_0x1ffe33))||_0x2e92b7[_0x5d65c4(0xce)]});}return _0x93af45;},__toCommonJS=_0x1c3508=>__copyProps(__defProp({},_0x2b5fa5(0xca),{'value':!![]}),_0x1c3508),babel_plugin_exports={};__export(babel_plugin_exports,{'default':()=>ceraphTestIdPlugin}),module[_0x2b5fa5(0xba)]=__toCommonJS(babel_plugin_exports);var CERAPH_TESTID_PREFIX=_0x2b5fa5(0xec);function normalizeRelPath(_0x202f90){const _0x3194b0=_0x2b5fa5;return _0x202f90['replace'](/\\/g,'/')[_0x3194b0(0xeb)](/^\.\//,'')['replace'](/^\/+/,'');}function slug(_0x270c8d){const _0x7ce41=_0x2b5fa5,_0x478cd4=_0x270c8d[_0x7ce41(0xeb)](/\.[jt]sx?$/i,''),_0x48d7f9=_0x478cd4['toLowerCase']()['replace'](/[^a-z0-9]+/g,'-')['replace'](/-+/g,'-')['replace'](/^-+|-+$/g,'');return _0x48d7f9['length']>0x28?_0x48d7f9['slice'](_0x48d7f9[_0x7ce41(0xc6)]-0x28)[_0x7ce41(0xeb)](/^-+/,''):_0x48d7f9;}function fnv1a64Hex(_0x1b8841){const _0x5b31bf=_0x2b5fa5;let _0x39f8dc=0xcbf29ce484222325n;const _0x2f23de=0x100000001b3n,_0x55213e=0xffffffffffffffffn;for(let _0x3411ab=0x0;_0x3411ab<_0x1b8841['length'];_0x3411ab++){_0x39f8dc^=BigInt(_0x1b8841[_0x5b31bf(0xe8)](_0x3411ab)),_0x39f8dc=_0x39f8dc*_0x2f23de&_0x55213e;}return _0x39f8dc['toString'](0x10)[_0x5b31bf(0xe4)](0x10,'0');}function deriveTestId(_0x57280a){const _0x34b8f6=_0x2b5fa5,_0x195579=normalizeRelPath(_0x57280a[_0x34b8f6(0xc9)]),_0x59f93d=_0x195579+'|'+_0x57280a[_0x34b8f6(0xdc)]+'|'+_0x57280a[_0x34b8f6(0xbe)]+'|'+(_0x57280a[_0x34b8f6(0xbb)]??''),_0x4f8d19=fnv1a64Hex(_0x59f93d)['slice'](0x0,0xa);return''+CERAPH_TESTID_PREFIX+slug(_0x195579)+'_'+_0x57280a[_0x34b8f6(0xdc)]+'_'+_0x57280a[_0x34b8f6(0xbe)]+'_'+_0x4f8d19;}var INTERACTIVE_TAGS=new Set([_0x2b5fa5(0xe7),'TouchableOpacity','TouchableHighlight',_0x2b5fa5(0xda),_0x2b5fa5(0xcd),_0x2b5fa5(0xcb),'Link','IconButton','MenuItem','ListItem',_0x2b5fa5(0xb9)]),INPUT_TAGS=new Set(['TextInput','TextField','Switch','Picker','Slider','Checkbox','SegmentedControl','SearchBar']),PRESS_PROPS=new Set([_0x2b5fa5(0xbc),_0x2b5fa5(0xe1),'onLongPress','onClick']),INPUT_PROPS=new Set(['onChangeText','onValueChange','onChange']);function baseTag(_0x35d191){return _0x35d191['split']('.')[0x0];}function _0x16da(_0x489059,_0x4d633c){_0x489059=_0x489059-0xb8;const _0x4cf879=_0x4cf8();let _0x16dad0=_0x4cf879[_0x489059];return _0x16dad0;}function isTargetableJsx(_0x43d133,_0x6322c1){const _0x4f93f2=_0x2b5fa5,_0x149385=baseTag(_0x43d133);if(INTERACTIVE_TAGS['has'](_0x43d133)||INTERACTIVE_TAGS['has'](_0x149385)||INPUT_TAGS[_0x4f93f2(0xc4)](_0x43d133)||INPUT_TAGS['has'](_0x149385)){if('vskEM'===_0x4f93f2(0xee))return!![];else _0x4a7cc1^=_0x3fe6a9(_0x51ddb5['charCodeAt'](_0x11b36b)),_0x4f64a0=_0x408250*_0x3f421a&_0x523d2e;}for(const _0x21dbd2 of _0x6322c1){if('REHBY'!=='Cswhv'){if(PRESS_PROPS[_0x4f93f2(0xc4)](_0x21dbd2)||INPUT_PROPS['has'](_0x21dbd2))return!![];}else{if(_0x47d829[_0x4f93f2(0xc4)](_0xb05506)||_0x34e2ee['has'](_0x55376b))return!![];}}return![];}var import_node_path=require('path');function jsxTagName(_0x1bae14,_0x4ebb99){const _0x95ab42=_0x2b5fa5;if(_0x4ebb99[_0x95ab42(0xb8)](_0x1bae14))return _0x1bae14[_0x95ab42(0xc7)];if(_0x4ebb99[_0x95ab42(0xd1)](_0x1bae14)){if(_0x95ab42(0xdf)==='qrpLY'){const _0x1445eb=[];let _0x496bdc=_0x1bae14;while(_0x4ebb99[_0x95ab42(0xd1)](_0x496bdc)){if(_0x95ab42(0xd0)==='AsBxx')_0x1445eb['unshift'](_0x496bdc[_0x95ab42(0xc8)]['name']),_0x496bdc=_0x496bdc[_0x95ab42(0xc0)];else{const _0x5efc0c=_0x96134[_0x95ab42(0xc5)]?.['env'];return _0x5efc0c?.[_0x95ab42(0xe5)]!=='production';}}if(_0x4ebb99['isJSXIdentifier'](_0x496bdc))_0x1445eb['unshift'](_0x496bdc[_0x95ab42(0xc7)]);return _0x1445eb[_0x95ab42(0xdd)]('.');}else{const _0x322f84=_0x2334b9[_0x95ab42(0xeb)](/\.[jt]sx?$/i,''),_0x428ceb=_0x322f84['toLowerCase']()['replace'](/[^a-z0-9]+/g,'-')[_0x95ab42(0xeb)](/-+/g,'-')[_0x95ab42(0xeb)](/^-+|-+$/g,'');return _0x428ceb[_0x95ab42(0xc6)]>0x28?_0x428ceb['slice'](_0x428ceb[_0x95ab42(0xc6)]-0x28)['replace'](/^-+/,''):_0x428ceb;}}if(_0x4ebb99['isJSXNamespacedName'](_0x1bae14))return _0x1bae14['namespace'][_0x95ab42(0xc7)]+':'+_0x1bae14[_0x95ab42(0xc7)][_0x95ab42(0xc7)];return'';}function _0x4cf8(){const _0x209199=['sep','object','319044UHxUEB','function','testID','has','process','length','name','property','relPath','__esModule','Button','node','TouchableNativeFeedback','enumerable','types','AsBxx','isJSXMemberExpression','670COmwQO','840nugnGT','ceraph-testid-injector','start','19958cmOMaM','enabled','opts','defineProperty','TouchableWithoutFeedback','filename','line','join','1280448fBjloT','qrpLY','80707Fpqugx','onPressIn','3CISvAE','304RuBBCl','padStart','NODE_ENV','9317ZDcLtq','Pressable','charCodeAt','attributes','614799ahPxgo','replace','cer_','jsxAttribute','vskEM','3ftcKtl','isJSXIdentifier','Chip','exports','tag','onPress','split','col'];_0x4cf8=function(){return _0x209199;};return _0x4cf8();}function attrName(_0x57e9b8,_0x411bb5){const _0x403186=_0x2b5fa5;return _0x411bb5[_0x403186(0xb8)](_0x57e9b8['name'])?_0x57e9b8[_0x403186(0xc7)][_0x403186(0xc7)]:void 0x0;}function attrNames(_0x51f7e0,_0x3b63f9){const _0x4a7058=_0x2b5fa5,_0x276182=[];for(const _0x1c4741 of _0x51f7e0[_0x4a7058(0xe9)]){if('htVEj'==='RYMFA'){for(var _0x15af03 in _0x10fa17)_0x5bae95(_0x570918,_0x15af03,{'get':_0x4fd00c[_0x15af03],'enumerable':!![]});}else{if(_0x3b63f9['isJSXAttribute'](_0x1c4741)){const _0xe66c1=attrName(_0x1c4741,_0x3b63f9);if(_0xe66c1)_0x276182['push'](_0xe66c1);}}}return _0x276182;}function hasTestId(_0xbc09cb){return _0xbc09cb['includes']('testID');}function toRelPath(_0x212905,_0x596427){const _0x609a4c=_0x2b5fa5,_0x223627=_0x212905??'',_0x28394b=_0x223627?(0x0,import_node_path['relative'])(_0x223627,_0x596427):_0x596427;return import_node_path['sep']==='/'?_0x28394b:_0x28394b[_0x609a4c(0xbd)](import_node_path[_0x609a4c(0xbf)])['join'](import_node_path['posix'][_0x609a4c(0xbf)]);}function defaultEnabled(){const _0x2ff4ef=_0x2b5fa5,_0x2eed18=globalThis[_0x2ff4ef(0xc5)]?.['env'];return _0x2eed18?.[_0x2ff4ef(0xe5)]!=='production';}function ceraphTestIdPlugin(_0x337b5b,_0x1a2625={}){const _0x114e7e=_0x2b5fa5,_0x959fc3=_0x337b5b[_0x114e7e(0xcf)],_0x5cb655=_0x1a2625[_0x114e7e(0xd7)]??defaultEnabled();return{'name':_0x114e7e(0xd4),'visitor':{'JSXOpeningElement'(_0x40c805,_0x56a93f){const _0x21be0f=_0x114e7e;if(!_0x5cb655)return;const _0x375428=_0x40c805[_0x21be0f(0xcc)],_0x289883=_0x375428['loc'];if(!_0x289883)return;const _0x4464c9=_0x56a93f['file'][_0x21be0f(0xd8)][_0x21be0f(0xdb)];if(!_0x4464c9)return;const _0x33a08c=jsxTagName(_0x375428[_0x21be0f(0xc7)],_0x959fc3),_0x12cb4a=attrNames(_0x375428,_0x959fc3);if(hasTestId(_0x12cb4a))return;if(!isTargetableJsx(_0x33a08c,_0x12cb4a))return;const _0x243b07=toRelPath(_0x56a93f['file'][_0x21be0f(0xd8)]['root']??null,_0x4464c9),_0x4f544c=deriveTestId({'relPath':_0x243b07,'line':_0x289883[_0x21be0f(0xd5)]['line'],'col':_0x289883['start']['column']+0x1,'tag':_0x33a08c});_0x375428[_0x21be0f(0xe9)]['unshift'](_0x959fc3[_0x21be0f(0xed)](_0x959fc3['jsxIdentifier'](_0x21be0f(0xc3)),_0x959fc3['stringLiteral'](_0x4f544c)));}}};}
1
+ 'use strict';const _0x51198b=_0x59b4;(function(_0x45942f,_0x48abe5){const _0x3d5773=_0x59b4,_0x37d5cf=_0x45942f();while(!![]){try{const _0x50af78=parseInt(_0x3d5773(0x166))/0x1+-parseInt(_0x3d5773(0x148))/0x2*(-parseInt(_0x3d5773(0x163))/0x3)+parseInt(_0x3d5773(0x160))/0x4+-parseInt(_0x3d5773(0x167))/0x5+-parseInt(_0x3d5773(0x149))/0x6*(-parseInt(_0x3d5773(0x141))/0x7)+-parseInt(_0x3d5773(0x168))/0x8*(parseInt(_0x3d5773(0x15d))/0x9)+-parseInt(_0x3d5773(0x13b))/0xa*(-parseInt(_0x3d5773(0x171))/0xb);if(_0x50af78===_0x48abe5)break;else _0x37d5cf['push'](_0x37d5cf['shift']());}catch(_0x5f336a){_0x37d5cf['push'](_0x37d5cf['shift']());}}}(_0x307e,0x3ba23));var __defProp=Object['defineProperty'],__getOwnPropDesc=Object['getOwnPropertyDescriptor'],__getOwnPropNames=Object[_0x51198b(0x170)],__hasOwnProp=Object['prototype'][_0x51198b(0x16a)],__export=(_0x38dd1d,_0x83eb36)=>{for(var _0x418f44 in _0x83eb36)__defProp(_0x38dd1d,_0x418f44,{'get':_0x83eb36[_0x418f44],'enumerable':!![]});},__copyProps=(_0x119769,_0xb7958b,_0x23a6e4,_0x45b1e1)=>{const _0x17c482=_0x51198b;if(_0xb7958b&&typeof _0xb7958b==='object'||typeof _0xb7958b==='function'){for(let _0x3bba5d of __getOwnPropNames(_0xb7958b))if(!__hasOwnProp[_0x17c482(0x154)](_0x119769,_0x3bba5d)&&_0x3bba5d!==_0x23a6e4)__defProp(_0x119769,_0x3bba5d,{'get':()=>_0xb7958b[_0x3bba5d],'enumerable':!(_0x45b1e1=__getOwnPropDesc(_0xb7958b,_0x3bba5d))||_0x45b1e1[_0x17c482(0x16f)]});}return _0x119769;},__toCommonJS=_0x48df48=>__copyProps(__defProp({},'__esModule',{'value':!![]}),_0x48df48),babel_plugin_exports={};__export(babel_plugin_exports,{'default':()=>ceraphTestIdPlugin}),module['exports']=__toCommonJS(babel_plugin_exports);var CERAPH_TESTID_PREFIX=_0x51198b(0x161);function _0x307e(){const _0x3cd0a4=['line','process','call','TextField','onLongPress','onChangeText','NODE_ENV','column','padStart','TouchableNativeFeedback','relative','738Vdzovb','name','Pressable','216628lmSSgd','cer_','isJSXAttribute','12eXABvP','relPath','onChange','19674CcrdOq','1168700KFcKno','26224VKGyDO','join','hasOwnProperty','has','MenuItem','length','node','enumerable','getOwnPropertyNames','143UQNoZH','stringLiteral','col','116930IrzLvL','isJSXNamespacedName','types','unshift','opts','charCodeAt','418103MuEEON','replace','testID','file','loc','split','start','51426REuHrn','42CPQvCZ','Picker','IrRKn','ListItem','onPressIn','toString','TextInput','attributes','push'];_0x307e=function(){return _0x3cd0a4;};return _0x307e();}function normalizeRelPath(_0x2dfc76){const _0x15e3a9=_0x51198b;return _0x2dfc76['replace'](/\\/g,'/')[_0x15e3a9(0x142)](/^\.\//,'')['replace'](/^\/+/,'');}function slug(_0x4e77e6){const _0x75b84b=_0x51198b,_0x55a407=_0x4e77e6['replace'](/\.[jt]sx?$/i,''),_0x4e97fb=_0x55a407['toLowerCase']()['replace'](/[^a-z0-9]+/g,'-')[_0x75b84b(0x142)](/-+/g,'-')['replace'](/^-+|-+$/g,'');return _0x4e97fb[_0x75b84b(0x16d)]>0x28?_0x4e97fb['slice'](_0x4e97fb['length']-0x28)['replace'](/^-+/,''):_0x4e97fb;}function fnv1a64Hex(_0xdc5f45){const _0x37065b=_0x51198b;let _0x555040=0xcbf29ce484222325n;const _0x5e784e=0x100000001b3n,_0x30e960=0xffffffffffffffffn;for(let _0x4e7d1c=0x0;_0x4e7d1c<_0xdc5f45['length'];_0x4e7d1c++){_0x555040^=BigInt(_0xdc5f45[_0x37065b(0x140)](_0x4e7d1c)),_0x555040=_0x555040*_0x5e784e&_0x30e960;}return _0x555040[_0x37065b(0x14e)](0x10)['padStart'](0x10,'0');}function deriveTestId(_0x1f97b9){const _0x448283=_0x51198b,_0x4d367f=normalizeRelPath(_0x1f97b9[_0x448283(0x164)]),_0x118410=_0x4d367f+'|'+_0x1f97b9[_0x448283(0x152)]+'|'+_0x1f97b9[_0x448283(0x173)]+'|'+(_0x1f97b9['tag']??''),_0x242002=fnv1a64Hex(_0x118410)['slice'](0x0,0xa);return''+CERAPH_TESTID_PREFIX+slug(_0x4d367f)+'_'+_0x1f97b9[_0x448283(0x152)]+'_'+_0x1f97b9['col']+'_'+_0x242002;}var INTERACTIVE_TAGS=new Set([_0x51198b(0x15f),'TouchableOpacity','TouchableHighlight','TouchableWithoutFeedback',_0x51198b(0x15b),'Button','Link','IconButton',_0x51198b(0x16c),_0x51198b(0x14c),'Chip']),INPUT_TAGS=new Set([_0x51198b(0x14f),_0x51198b(0x155),'Switch',_0x51198b(0x14a),'Slider','Checkbox','SegmentedControl','SearchBar']),PRESS_PROPS=new Set(['onPress',_0x51198b(0x14d),_0x51198b(0x156),'onClick']),INPUT_PROPS=new Set([_0x51198b(0x157),'onValueChange',_0x51198b(0x165)]);function baseTag(_0x151708){return _0x151708['split']('.')[0x0];}function isTargetableJsx(_0x1c4660,_0x378d7c){const _0x541b90=_0x51198b,_0x375ec7=baseTag(_0x1c4660);if(INTERACTIVE_TAGS[_0x541b90(0x16b)](_0x1c4660)||INTERACTIVE_TAGS[_0x541b90(0x16b)](_0x375ec7)||INPUT_TAGS[_0x541b90(0x16b)](_0x1c4660)||INPUT_TAGS[_0x541b90(0x16b)](_0x375ec7))return!![];for(const _0x6e6e8f of _0x378d7c){if(PRESS_PROPS['has'](_0x6e6e8f)||INPUT_PROPS['has'](_0x6e6e8f))return!![];}return![];}var import_node_path=require('path');function jsxTagName(_0x337a9b,_0x42a024){const _0x533d23=_0x51198b;if(_0x42a024['isJSXIdentifier'](_0x337a9b))return _0x337a9b[_0x533d23(0x15e)];if(_0x42a024['isJSXMemberExpression'](_0x337a9b)){const _0x1e1406=[];let _0x1a7b6a=_0x337a9b;while(_0x42a024['isJSXMemberExpression'](_0x1a7b6a)){if('iWMIG'===_0x533d23(0x14b)){let _0x303498=0xcbf29ce484222325n;const _0x24a2dc=0x100000001b3n,_0x31d911=0xffffffffffffffffn;for(let _0x2c2f4b=0x0;_0x2c2f4b<_0x2865a7[_0x533d23(0x16d)];_0x2c2f4b++){_0x303498^=_0x15ec85(_0x3d6cbf['charCodeAt'](_0x2c2f4b)),_0x303498=_0x303498*_0x24a2dc&_0x31d911;}return _0x303498['toString'](0x10)[_0x533d23(0x15a)](0x10,'0');}else _0x1e1406[_0x533d23(0x13e)](_0x1a7b6a['property'][_0x533d23(0x15e)]),_0x1a7b6a=_0x1a7b6a['object'];}if(_0x42a024['isJSXIdentifier'](_0x1a7b6a))_0x1e1406['unshift'](_0x1a7b6a[_0x533d23(0x15e)]);return _0x1e1406[_0x533d23(0x169)]('.');}if(_0x42a024[_0x533d23(0x13c)](_0x337a9b))return _0x337a9b['namespace']['name']+':'+_0x337a9b['name']['name'];return'';}function attrName(_0x3c13e9,_0x454b93){const _0x21672b=_0x51198b;return _0x454b93['isJSXIdentifier'](_0x3c13e9[_0x21672b(0x15e)])?_0x3c13e9[_0x21672b(0x15e)]['name']:void 0x0;}function attrNames(_0x5e2428,_0x29fbe9){const _0x131a47=_0x51198b,_0x55df7d=[];for(const _0x8a02c5 of _0x5e2428['attributes']){if(_0x29fbe9[_0x131a47(0x162)](_0x8a02c5)){if('MGgrv'!=='MGgrv'){const _0x1a778c=_0x4e3374(_0x3d1798);if(_0x13e807['has'](_0x2db297)||_0xf3081['has'](_0x1a778c)||_0x5b092b['has'](_0x5e47de)||_0x495ffe[_0x131a47(0x16b)](_0x1a778c))return!![];for(const _0x2d77a2 of _0x23c52b){if(_0x403f4d['has'](_0x2d77a2)||_0x11a352[_0x131a47(0x16b)](_0x2d77a2))return!![];}return![];}else{const _0x3f00c4=attrName(_0x8a02c5,_0x29fbe9);if(_0x3f00c4)_0x55df7d[_0x131a47(0x151)](_0x3f00c4);}}}return _0x55df7d;}function hasTestId(_0x307c59){return _0x307c59['includes']('testID');}function _0x59b4(_0x111992,_0x4d4318){_0x111992=_0x111992-0x13b;const _0x307e61=_0x307e();let _0x59b49a=_0x307e61[_0x111992];return _0x59b49a;}function toRelPath(_0x5255b5,_0x31c736){const _0x11c5da=_0x51198b,_0x2386e6=_0x5255b5??'',_0x33c8cc=_0x2386e6?(0x0,import_node_path[_0x11c5da(0x15c)])(_0x2386e6,_0x31c736):_0x31c736;return import_node_path['sep']==='/'?_0x33c8cc:_0x33c8cc[_0x11c5da(0x146)](import_node_path['sep'])[_0x11c5da(0x169)](import_node_path['posix']['sep']);}function defaultEnabled(){const _0x36aa09=_0x51198b,_0x479c92=globalThis[_0x36aa09(0x153)]?.['env'];return _0x479c92?.[_0x36aa09(0x158)]!=='production';}function ceraphTestIdPlugin(_0x2a408c,_0x52fa28={}){const _0xc477e5=_0x51198b,_0x1ad342=_0x2a408c[_0xc477e5(0x13d)],_0x40eeda=_0x52fa28['enabled']??defaultEnabled();return{'name':'ceraph-testid-injector','visitor':{'JSXOpeningElement'(_0x1d7034,_0x36c781){const _0x4a7010=_0xc477e5;if(!_0x40eeda)return;const _0x34de1b=_0x1d7034[_0x4a7010(0x16e)],_0x289f50=_0x34de1b[_0x4a7010(0x145)];if(!_0x289f50)return;const _0x135c94=_0x36c781['file'][_0x4a7010(0x13f)]['filename'];if(!_0x135c94)return;const _0x2ff256=jsxTagName(_0x34de1b['name'],_0x1ad342),_0x4874c1=attrNames(_0x34de1b,_0x1ad342);if(hasTestId(_0x4874c1))return;if(!isTargetableJsx(_0x2ff256,_0x4874c1))return;const _0x435e34=toRelPath(_0x36c781[_0x4a7010(0x144)][_0x4a7010(0x13f)]['root']??null,_0x135c94),_0x304ee6=deriveTestId({'relPath':_0x435e34,'line':_0x289f50['start'][_0x4a7010(0x152)],'col':_0x289f50[_0x4a7010(0x147)][_0x4a7010(0x159)]+0x1,'tag':_0x2ff256});_0x34de1b[_0x4a7010(0x150)][_0x4a7010(0x13e)](_0x1ad342['jsxAttribute'](_0x1ad342['jsxIdentifier'](_0x4a7010(0x143)),_0x1ad342[_0x4a7010(0x172)](_0x304ee6)));}}};}
@@ -1 +1 @@
1
- const _0x19a59a=_0x4878;(function(_0x3c8dff,_0x1f963b){const _0x2e70c2=_0x4878,_0x1154ad=_0x3c8dff();while(!![]){try{const _0x2bbe8d=-parseInt(_0x2e70c2(0x21f))/0x1*(parseInt(_0x2e70c2(0x21e))/0x2)+-parseInt(_0x2e70c2(0x1f6))/0x3*(parseInt(_0x2e70c2(0x205))/0x4)+-parseInt(_0x2e70c2(0x20b))/0x5*(-parseInt(_0x2e70c2(0x20d))/0x6)+-parseInt(_0x2e70c2(0x1ef))/0x7*(parseInt(_0x2e70c2(0x221))/0x8)+-parseInt(_0x2e70c2(0x218))/0x9*(-parseInt(_0x2e70c2(0x1fc))/0xa)+-parseInt(_0x2e70c2(0x1f5))/0xb*(-parseInt(_0x2e70c2(0x1f4))/0xc)+parseInt(_0x2e70c2(0x215))/0xd;if(_0x2bbe8d===_0x1f963b)break;else _0x1154ad['push'](_0x1154ad['shift']());}catch(_0x5960b8){_0x1154ad['push'](_0x1154ad['shift']());}}}(_0x47f7,0x9b589));var CERAPH_TESTID_PREFIX=_0x19a59a(0x1f0);function normalizeRelPath(_0x24414d){const _0x577453=_0x19a59a;return _0x24414d['replace'](/\\/g,'/')[_0x577453(0x217)](/^\.\//,'')[_0x577453(0x217)](/^\/+/,'');}function slug(_0x47fa67){const _0x1fa879=_0x19a59a,_0x4894c3=_0x47fa67['replace'](/\.[jt]sx?$/i,''),_0xb99dda=_0x4894c3[_0x1fa879(0x1f7)]()['replace'](/[^a-z0-9]+/g,'-')['replace'](/-+/g,'-')[_0x1fa879(0x217)](/^-+|-+$/g,'');return _0xb99dda[_0x1fa879(0x219)]>0x28?_0xb99dda['slice'](_0xb99dda['length']-0x28)['replace'](/^-+/,''):_0xb99dda;}function _0x4878(_0x3b375f,_0x390e3d){_0x3b375f=_0x3b375f-0x1ec;const _0x47f760=_0x47f7();let _0x4878d2=_0x47f760[_0x3b375f];return _0x4878d2;}function fnv1a64Hex(_0x3d4e1d){let _0x5bc8a8=0xcbf29ce484222325n;const _0x151397=0x100000001b3n,_0x461ba8=0xffffffffffffffffn;for(let _0x3393b3=0x0;_0x3393b3<_0x3d4e1d['length'];_0x3393b3++){_0x5bc8a8^=BigInt(_0x3d4e1d['charCodeAt'](_0x3393b3)),_0x5bc8a8=_0x5bc8a8*_0x151397&_0x461ba8;}return _0x5bc8a8['toString'](0x10)['padStart'](0x10,'0');}function deriveTestId(_0xc33e36){const _0x203f75=_0x19a59a,_0x59b431=normalizeRelPath(_0xc33e36['relPath']),_0x30310b=_0x59b431+'|'+_0xc33e36['line']+'|'+_0xc33e36['col']+'|'+(_0xc33e36['tag']??''),_0x1dbc75=fnv1a64Hex(_0x30310b)[_0x203f75(0x21a)](0x0,0xa);return''+CERAPH_TESTID_PREFIX+slug(_0x59b431)+'_'+_0xc33e36[_0x203f75(0x1ff)]+'_'+_0xc33e36[_0x203f75(0x1fb)]+'_'+_0x1dbc75;}var INTERACTIVE_TAGS=new Set(['Pressable',_0x19a59a(0x1ee),_0x19a59a(0x203),_0x19a59a(0x201),'TouchableNativeFeedback',_0x19a59a(0x210),'Link','IconButton','MenuItem','ListItem',_0x19a59a(0x20a)]),INPUT_TAGS=new Set(['TextInput','TextField','Switch',_0x19a59a(0x202),_0x19a59a(0x222),_0x19a59a(0x1f9),'SegmentedControl',_0x19a59a(0x1f3)]),PRESS_PROPS=new Set([_0x19a59a(0x20c),'onPressIn','onLongPress','onClick']),INPUT_PROPS=new Set(['onChangeText',_0x19a59a(0x1f8),'onChange']);function baseTag(_0x566668){return _0x566668['split']('.')[0x0];}function isTargetableJsx(_0x3d6fd0,_0xf24719){const _0x285502=_0x19a59a,_0x531d0c=baseTag(_0x3d6fd0);if(INTERACTIVE_TAGS[_0x285502(0x20f)](_0x3d6fd0)||INTERACTIVE_TAGS['has'](_0x531d0c)||INPUT_TAGS['has'](_0x3d6fd0)||INPUT_TAGS['has'](_0x531d0c))return!![];for(const _0x1caf1c of _0xf24719){if(PRESS_PROPS[_0x285502(0x20f)](_0x1caf1c)||INPUT_PROPS[_0x285502(0x20f)](_0x1caf1c))return!![];}return![];}import{posix,relative,sep}from'path';function jsxTagName(_0x2e63c0,_0x169a93){const _0x480680=_0x19a59a;if(_0x169a93[_0x480680(0x208)](_0x2e63c0))return _0x2e63c0[_0x480680(0x1ed)];if(_0x169a93['isJSXMemberExpression'](_0x2e63c0)){if('jJVbQ'===_0x480680(0x20e))_0xdf70a2['unshift'](_0x597cde[_0x480680(0x209)]['name']),_0x10c235=_0x214857['object'];else{const _0x216faf=[];let _0x4c3c85=_0x2e63c0;while(_0x169a93['isJSXMemberExpression'](_0x4c3c85)){_0x216faf['unshift'](_0x4c3c85['property']['name']),_0x4c3c85=_0x4c3c85['object'];}if(_0x169a93['isJSXIdentifier'](_0x4c3c85))_0x216faf[_0x480680(0x1fa)](_0x4c3c85['name']);return _0x216faf['join']('.');}}if(_0x169a93['isJSXNamespacedName'](_0x2e63c0))return _0x2e63c0[_0x480680(0x220)]['name']+':'+_0x2e63c0['name']['name'];return'';}function attrName(_0x3c12b4,_0x5677aa){const _0x576b70=_0x19a59a;return _0x5677aa[_0x576b70(0x208)](_0x3c12b4[_0x576b70(0x1ed)])?_0x3c12b4['name']['name']:void 0x0;}function attrNames(_0xd5ea8b,_0x2e2d3d){const _0x4c837f=_0x19a59a,_0x2f1e55=[];for(const _0x3feb94 of _0xd5ea8b[_0x4c837f(0x206)]){if(_0x2e2d3d[_0x4c837f(0x21b)](_0x3feb94)){const _0x52ad47=attrName(_0x3feb94,_0x2e2d3d);if(_0x52ad47)_0x2f1e55['push'](_0x52ad47);}}return _0x2f1e55;}function hasTestId(_0x1814f8){const _0x415d46=_0x19a59a;return _0x1814f8[_0x415d46(0x216)](_0x415d46(0x213));}function _0x47f7(){const _0x175d3b=['file','line','jsxAttribute','TouchableWithoutFeedback','Picker','TouchableHighlight','start','5872ihzYQV','attributes','root','isJSXIdentifier','property','Chip','15510eoIczp','onPress','678RjbFBF','TPeBe','has','Button','production','opts','testID','loc','23756343uCCJvq','includes','replace','5787stEJgU','length','slice','isJSXAttribute','env','enabled','355468wkEVyf','6XTQKgs','namespace','4326176FassNc','Slider','types','sep','name','TouchableOpacity','14uNAXrY','cer_','column','filename','SearchBar','13314300rsDmPV','11yWlKDp','2370fjRCNJ','toLowerCase','onValueChange','Checkbox','unshift','col','10210CuNWsk','join'];_0x47f7=function(){return _0x175d3b;};return _0x47f7();}function toRelPath(_0x357132,_0x1e571e){const _0x1a1ca5=_0x19a59a,_0x2d7b48=_0x357132??'',_0x364ae5=_0x2d7b48?relative(_0x2d7b48,_0x1e571e):_0x1e571e;return sep==='/'?_0x364ae5:_0x364ae5['split'](sep)[_0x1a1ca5(0x1fd)](posix[_0x1a1ca5(0x1ec)]);}function defaultEnabled(){const _0x163337=_0x19a59a,_0x5ef0d0=globalThis['process']?.[_0x163337(0x21c)];return _0x5ef0d0?.['NODE_ENV']!==_0x163337(0x211);}function ceraphTestIdPlugin(_0x563960,_0x4b2f71={}){const _0x48258e=_0x19a59a,_0x195d5f=_0x563960[_0x48258e(0x223)],_0x5bb06a=_0x4b2f71[_0x48258e(0x21d)]??defaultEnabled();return{'name':'ceraph-testid-injector','visitor':{'JSXOpeningElement'(_0x3b16e1,_0xe87300){const _0x50b2eb=_0x48258e;if(!_0x5bb06a)return;const _0x3db1cc=_0x3b16e1['node'],_0x18193f=_0x3db1cc[_0x50b2eb(0x214)];if(!_0x18193f)return;const _0x5646e9=_0xe87300[_0x50b2eb(0x1fe)]['opts'][_0x50b2eb(0x1f2)];if(!_0x5646e9)return;const _0x27c9ed=jsxTagName(_0x3db1cc['name'],_0x195d5f),_0x58713a=attrNames(_0x3db1cc,_0x195d5f);if(hasTestId(_0x58713a))return;if(!isTargetableJsx(_0x27c9ed,_0x58713a))return;const _0x33a71e=toRelPath(_0xe87300['file'][_0x50b2eb(0x212)][_0x50b2eb(0x207)]??null,_0x5646e9),_0x521342=deriveTestId({'relPath':_0x33a71e,'line':_0x18193f[_0x50b2eb(0x204)][_0x50b2eb(0x1ff)],'col':_0x18193f['start'][_0x50b2eb(0x1f1)]+0x1,'tag':_0x27c9ed});_0x3db1cc['attributes']['unshift'](_0x195d5f[_0x50b2eb(0x200)](_0x195d5f['jsxIdentifier'](_0x50b2eb(0x213)),_0x195d5f['stringLiteral'](_0x521342)));}}};}export{ceraphTestIdPlugin as default};
1
+ const _0x57ee3a=_0x2910;(function(_0x5c03fb,_0x5d82f6){const _0x413a5c=_0x2910,_0x4cc2f3=_0x5c03fb();while(!![]){try{const _0x5b6477=parseInt(_0x413a5c(0x172))/0x1+parseInt(_0x413a5c(0x153))/0x2*(parseInt(_0x413a5c(0x166))/0x3)+parseInt(_0x413a5c(0x14e))/0x4*(parseInt(_0x413a5c(0x171))/0x5)+parseInt(_0x413a5c(0x151))/0x6+-parseInt(_0x413a5c(0x160))/0x7*(-parseInt(_0x413a5c(0x16f))/0x8)+-parseInt(_0x413a5c(0x177))/0x9+-parseInt(_0x413a5c(0x155))/0xa;if(_0x5b6477===_0x5d82f6)break;else _0x4cc2f3['push'](_0x4cc2f3['shift']());}catch(_0x2f03a3){_0x4cc2f3['push'](_0x4cc2f3['shift']());}}}(_0x647c,0x68575));var CERAPH_TESTID_PREFIX=_0x57ee3a(0x164);function _0x647c(){const _0x3559d0=['slice','onValueChange','testID','namespace','Pressable','IconButton','line','types','ceraph-testid-injector','file','join','onLongPress','split','isJSXMemberExpression','40KzaPdk','TouchableHighlight','enabled','117954GRTfSg','node','2friuxM','replace','12917560cOfzvX','charCodeAt','dViHO','length','isJSXIdentifier','sep','isJSXAttribute','loc','root','attributes','Picker','161bpKujm','unshift','NODE_ENV','Switch','cer_','has','1331238tuihaR','SegmentedControl','jsxAttribute','TouchableOpacity','onPress','Checkbox','opts','ListItem','stringLiteral','201448BwcQEA','tag','252690jXxbyO','783752kdmMdn','TextField','start','push','toLowerCase','5513067AZPpyt','name','SearchBar'];_0x647c=function(){return _0x3559d0;};return _0x647c();}function normalizeRelPath(_0x59d9fa){const _0x2e432b=_0x57ee3a;return _0x59d9fa['replace'](/\\/g,'/')[_0x2e432b(0x154)](/^\.\//,'')['replace'](/^\/+/,'');}function slug(_0x3c0853){const _0x10c4e8=_0x57ee3a,_0x519460=_0x3c0853[_0x10c4e8(0x154)](/\.[jt]sx?$/i,''),_0xb94032=_0x519460[_0x10c4e8(0x176)]()[_0x10c4e8(0x154)](/[^a-z0-9]+/g,'-')['replace'](/-+/g,'-')['replace'](/^-+|-+$/g,'');return _0xb94032[_0x10c4e8(0x158)]>0x28?_0xb94032[_0x10c4e8(0x140)](_0xb94032[_0x10c4e8(0x158)]-0x28)[_0x10c4e8(0x154)](/^-+/,''):_0xb94032;}function fnv1a64Hex(_0xf7fbdc){const _0x156e6a=_0x57ee3a;let _0x37c152=0xcbf29ce484222325n;const _0x617b28=0x100000001b3n,_0x1cfc97=0xffffffffffffffffn;for(let _0x1337d8=0x0;_0x1337d8<_0xf7fbdc[_0x156e6a(0x158)];_0x1337d8++){_0x37c152^=BigInt(_0xf7fbdc[_0x156e6a(0x156)](_0x1337d8)),_0x37c152=_0x37c152*_0x617b28&_0x1cfc97;}return _0x37c152['toString'](0x10)['padStart'](0x10,'0');}function deriveTestId(_0x3b2ca6){const _0x35cee3=_0x57ee3a,_0x4c7877=normalizeRelPath(_0x3b2ca6['relPath']),_0x3737d6=_0x4c7877+'|'+_0x3b2ca6['line']+'|'+_0x3b2ca6['col']+'|'+(_0x3b2ca6[_0x35cee3(0x170)]??''),_0x2b4678=fnv1a64Hex(_0x3737d6)['slice'](0x0,0xa);return''+CERAPH_TESTID_PREFIX+slug(_0x4c7877)+'_'+_0x3b2ca6[_0x35cee3(0x146)]+'_'+_0x3b2ca6['col']+'_'+_0x2b4678;}var INTERACTIVE_TAGS=new Set([_0x57ee3a(0x144),_0x57ee3a(0x169),_0x57ee3a(0x14f),'TouchableWithoutFeedback','TouchableNativeFeedback','Button','Link',_0x57ee3a(0x145),'MenuItem',_0x57ee3a(0x16d),'Chip']),INPUT_TAGS=new Set(['TextInput',_0x57ee3a(0x173),_0x57ee3a(0x163),_0x57ee3a(0x15f),'Slider',_0x57ee3a(0x16b),_0x57ee3a(0x167),_0x57ee3a(0x13f)]),PRESS_PROPS=new Set([_0x57ee3a(0x16a),'onPressIn',_0x57ee3a(0x14b),'onClick']),INPUT_PROPS=new Set(['onChangeText',_0x57ee3a(0x141),'onChange']);function baseTag(_0x59a8cf){const _0x1c4883=_0x57ee3a;return _0x59a8cf[_0x1c4883(0x14c)]('.')[0x0];}function isTargetableJsx(_0x3a3f6c,_0x4418bb){const _0x512b75=_0x57ee3a,_0x1118c3=baseTag(_0x3a3f6c);if(INTERACTIVE_TAGS['has'](_0x3a3f6c)||INTERACTIVE_TAGS[_0x512b75(0x165)](_0x1118c3)||INPUT_TAGS[_0x512b75(0x165)](_0x3a3f6c)||INPUT_TAGS['has'](_0x1118c3))return!![];for(const _0x419e5d of _0x4418bb){if(PRESS_PROPS[_0x512b75(0x165)](_0x419e5d)||INPUT_PROPS[_0x512b75(0x165)](_0x419e5d))return!![];}return![];}import{posix,relative,sep}from'path';function jsxTagName(_0x31bbb6,_0x25c290){const _0x8f5103=_0x57ee3a;if(_0x25c290[_0x8f5103(0x159)](_0x31bbb6))return _0x31bbb6[_0x8f5103(0x178)];if(_0x25c290[_0x8f5103(0x14d)](_0x31bbb6)){if('NwHYR'!==_0x8f5103(0x157)){const _0x231934=[];let _0x36b2e4=_0x31bbb6;while(_0x25c290[_0x8f5103(0x14d)](_0x36b2e4)){_0x231934[_0x8f5103(0x161)](_0x36b2e4['property'][_0x8f5103(0x178)]),_0x36b2e4=_0x36b2e4['object'];}if(_0x25c290[_0x8f5103(0x159)](_0x36b2e4))_0x231934[_0x8f5103(0x161)](_0x36b2e4[_0x8f5103(0x178)]);return _0x231934[_0x8f5103(0x14a)]('.');}else{if(!_0x138fe9)return;const _0x4a8c33=_0x2376b4['node'],_0x3ecd0a=_0x4a8c33['loc'];if(!_0x3ecd0a)return;const _0x3971ff=_0x2216b9[_0x8f5103(0x149)][_0x8f5103(0x16c)]['filename'];if(!_0x3971ff)return;const _0x401844=_0x4ae0c7(_0x4a8c33[_0x8f5103(0x178)],_0x162b78),_0x368b38=_0x1cef9b(_0x4a8c33,_0x304c9d);if(_0x321b8d(_0x368b38))return;if(!_0x358c17(_0x401844,_0x368b38))return;const _0x262bbf=_0x53f735(_0x1bb857[_0x8f5103(0x149)]['opts'][_0x8f5103(0x15d)]??null,_0x3971ff),_0x469633=_0x2e7bee({'relPath':_0x262bbf,'line':_0x3ecd0a[_0x8f5103(0x174)][_0x8f5103(0x146)],'col':_0x3ecd0a['start']['column']+0x1,'tag':_0x401844});_0x4a8c33['attributes'][_0x8f5103(0x161)](_0x78ead8['jsxAttribute'](_0x18058f['jsxIdentifier'](_0x8f5103(0x142)),_0x31e750[_0x8f5103(0x16e)](_0x469633)));}}if(_0x25c290['isJSXNamespacedName'](_0x31bbb6))return _0x31bbb6[_0x8f5103(0x143)]['name']+':'+_0x31bbb6['name'][_0x8f5103(0x178)];return'';}function attrName(_0x2caa7d,_0x5ee43f){const _0x40bd92=_0x57ee3a;return _0x5ee43f['isJSXIdentifier'](_0x2caa7d['name'])?_0x2caa7d[_0x40bd92(0x178)]['name']:void 0x0;}function attrNames(_0xb30ec,_0x1eafb7){const _0x3e07f2=_0x57ee3a,_0x1f8f61=[];for(const _0x22661b of _0xb30ec['attributes']){if(_0x1eafb7[_0x3e07f2(0x15b)](_0x22661b)){const _0x1e576d=attrName(_0x22661b,_0x1eafb7);if(_0x1e576d)_0x1f8f61[_0x3e07f2(0x175)](_0x1e576d);}}return _0x1f8f61;}function hasTestId(_0x3f8e13){const _0x52b4fb=_0x57ee3a;return _0x3f8e13['includes'](_0x52b4fb(0x142));}function toRelPath(_0xb292c7,_0x4e9d31){const _0x3f509c=_0x57ee3a,_0x5d08f3=_0xb292c7??'',_0x1631e3=_0x5d08f3?relative(_0x5d08f3,_0x4e9d31):_0x4e9d31;return sep==='/'?_0x1631e3:_0x1631e3['split'](sep)[_0x3f509c(0x14a)](posix[_0x3f509c(0x15a)]);}function defaultEnabled(){const _0xa6f07d=_0x57ee3a,_0x5cd527=globalThis['process']?.['env'];return _0x5cd527?.[_0xa6f07d(0x162)]!=='production';}function ceraphTestIdPlugin(_0x5b1280,_0x594cb5={}){const _0x4648fd=_0x57ee3a,_0x2a8381=_0x5b1280[_0x4648fd(0x147)],_0x185ea6=_0x594cb5[_0x4648fd(0x150)]??defaultEnabled();return{'name':_0x4648fd(0x148),'visitor':{'JSXOpeningElement'(_0x2d2ea7,_0x1d6a3a){const _0x1ab614=_0x4648fd;if(!_0x185ea6)return;const _0x282c00=_0x2d2ea7[_0x1ab614(0x152)],_0x385387=_0x282c00[_0x1ab614(0x15c)];if(!_0x385387)return;const _0x23a561=_0x1d6a3a['file'][_0x1ab614(0x16c)]['filename'];if(!_0x23a561)return;const _0x2e9af9=jsxTagName(_0x282c00[_0x1ab614(0x178)],_0x2a8381),_0x519748=attrNames(_0x282c00,_0x2a8381);if(hasTestId(_0x519748))return;if(!isTargetableJsx(_0x2e9af9,_0x519748))return;const _0x41bc15=toRelPath(_0x1d6a3a[_0x1ab614(0x149)]['opts'][_0x1ab614(0x15d)]??null,_0x23a561),_0x5810a6=deriveTestId({'relPath':_0x41bc15,'line':_0x385387[_0x1ab614(0x174)][_0x1ab614(0x146)],'col':_0x385387['start']['column']+0x1,'tag':_0x2e9af9});_0x282c00[_0x1ab614(0x15e)]['unshift'](_0x2a8381[_0x1ab614(0x168)](_0x2a8381['jsxIdentifier'](_0x1ab614(0x142)),_0x2a8381['stringLiteral'](_0x5810a6)));}}};}function _0x2910(_0x49e452,_0x2fa3db){_0x49e452=_0x49e452-0x13f;const _0x647c1a=_0x647c();let _0x29102d=_0x647c1a[_0x49e452];return _0x29102d;}export{ceraphTestIdPlugin as default};