react-native-inapp-inspector 2.5.8 → 2.5.10
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/dist/commonjs/components/BrandCircleIcon.js +8 -3
- package/dist/commonjs/components/Inspector/ConsoleExportModal.d.ts +10 -0
- package/dist/commonjs/components/Inspector/ConsoleExportModal.js +317 -0
- package/dist/commonjs/components/Inspector/ConsoleTab.js +20 -15
- package/dist/commonjs/components/Inspector/FabLauncher.js +8 -8
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +4 -4
- package/dist/commonjs/components/Inspector/InspectorHeader.js +30 -45
- package/dist/commonjs/components/Inspector/MainScreen.js +1 -1
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +34 -20
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +49 -44
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +5 -5
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +3 -3
- package/dist/commonjs/components/SkeletonPlaceholder.js +3 -3
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/networkLogger.d.ts +1 -17
- package/dist/commonjs/customHooks/networkLogger.js +1 -1
- package/dist/commonjs/helpers/shareFormatter.d.ts +15 -0
- package/dist/commonjs/helpers/shareFormatter.js +15 -8
- package/dist/commonjs/i18n/locales/ar.json +1 -1
- package/dist/commonjs/i18n/locales/bn.json +1 -1
- package/dist/commonjs/i18n/locales/de.json +1 -1
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/i18n/locales/es.json +1 -1
- package/dist/commonjs/i18n/locales/fr.json +1 -1
- package/dist/commonjs/i18n/locales/gu.json +1 -1
- package/dist/commonjs/i18n/locales/hi.json +1 -1
- package/dist/commonjs/i18n/locales/id.json +1 -1
- package/dist/commonjs/i18n/locales/it.json +1 -1
- package/dist/commonjs/i18n/locales/ja.json +1 -1
- package/dist/commonjs/i18n/locales/kn.json +1 -1
- package/dist/commonjs/i18n/locales/ko.json +1 -1
- package/dist/commonjs/i18n/locales/ml.json +1 -1
- package/dist/commonjs/i18n/locales/mr.json +1 -1
- package/dist/commonjs/i18n/locales/nl.json +1 -1
- package/dist/commonjs/i18n/locales/pa.json +1 -1
- package/dist/commonjs/i18n/locales/pl.json +1 -1
- package/dist/commonjs/i18n/locales/pt.json +1 -1
- package/dist/commonjs/i18n/locales/ru.json +1 -1
- package/dist/commonjs/i18n/locales/ta.json +1 -1
- package/dist/commonjs/i18n/locales/te.json +1 -1
- package/dist/commonjs/i18n/locales/tr.json +1 -1
- package/dist/commonjs/i18n/locales/vi.json +1 -1
- package/dist/commonjs/i18n/locales/zh.json +1 -1
- package/dist/commonjs/index.js +1 -1
- package/dist/commonjs/styles/index.d.ts +3 -0
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/interfaces.d.ts +4 -2
- package/dist/esm/components/BrandCircleIcon.js +9 -4
- package/dist/esm/components/Inspector/ConsoleExportModal.d.ts +10 -0
- package/dist/esm/components/Inspector/ConsoleExportModal.js +317 -0
- package/dist/esm/components/Inspector/ConsoleTab.js +38 -33
- package/dist/esm/components/Inspector/FabLauncher.js +1 -1
- package/dist/esm/components/Inspector/FloatingCaptureWidget.js +9 -9
- package/dist/esm/components/Inspector/InspectorHeader.js +75 -90
- package/dist/esm/components/Inspector/MainScreen.js +1 -1
- package/dist/esm/components/Inspector/MediaGalleryTab.js +88 -74
- package/dist/esm/components/Inspector/MediaPreviewModal.js +178 -173
- package/dist/esm/components/Inspector/NpmUpdateToast.js +18 -18
- package/dist/esm/components/Inspector/SkeletonPlaceholder.js +11 -11
- package/dist/esm/components/SkeletonPlaceholder.js +11 -11
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/networkLogger.d.ts +1 -17
- package/dist/esm/customHooks/networkLogger.js +1 -1
- package/dist/esm/helpers/shareFormatter.d.ts +15 -0
- package/dist/esm/helpers/shareFormatter.js +15 -8
- package/dist/esm/i18n/locales/ar.json +1 -1
- package/dist/esm/i18n/locales/bn.json +1 -1
- package/dist/esm/i18n/locales/de.json +1 -1
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/i18n/locales/es.json +1 -1
- package/dist/esm/i18n/locales/fr.json +1 -1
- package/dist/esm/i18n/locales/gu.json +1 -1
- package/dist/esm/i18n/locales/hi.json +1 -1
- package/dist/esm/i18n/locales/id.json +1 -1
- package/dist/esm/i18n/locales/it.json +1 -1
- package/dist/esm/i18n/locales/ja.json +1 -1
- package/dist/esm/i18n/locales/kn.json +1 -1
- package/dist/esm/i18n/locales/ko.json +1 -1
- package/dist/esm/i18n/locales/ml.json +1 -1
- package/dist/esm/i18n/locales/mr.json +1 -1
- package/dist/esm/i18n/locales/nl.json +1 -1
- package/dist/esm/i18n/locales/pa.json +1 -1
- package/dist/esm/i18n/locales/pl.json +1 -1
- package/dist/esm/i18n/locales/pt.json +1 -1
- package/dist/esm/i18n/locales/ru.json +1 -1
- package/dist/esm/i18n/locales/ta.json +1 -1
- package/dist/esm/i18n/locales/te.json +1 -1
- package/dist/esm/i18n/locales/tr.json +1 -1
- package/dist/esm/i18n/locales/vi.json +1 -1
- package/dist/esm/i18n/locales/zh.json +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/styles/index.d.ts +3 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/interfaces.d.ts +4 -2
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import Ao,{useCallback as ot,useContext as
|
|
1
|
+
import Ao,{useCallback as ot,useContext as ur,useEffect as ci,useMemo as eo,useRef as G,useState as V}from"react";import{Animated as Ht,Dimensions as ui,Image as Co,Modal as Ci,PanResponder as Gt,Platform as to,Pressable as Oo,ScrollView as Ti,Share as Mi,StatusBar as Fi,StyleSheet as N,Text as R,TextInput as Cr,TouchableOpacity as A,useWindowDimensions as Tr,View as F}from"react-native";import Mr from"react-native-linear-gradient";import Fr,{Circle as Si,Ellipse as To,G as Ct,Line as Lt,Path as Mo,Polygon as Ri,Rect as $t,Text as Pi}from"react-native-svg";import{AppColors as S}from"../../styles/AppColors";import{AppFonts as $}from"../../styles/AppFonts";import Tt from"../TouchableScale";import{InspectorContext as kr}from"./InspectorContext";import{ConfirmationModal as Sr}from"./ConfirmationModal";import{ArrowRightIcon as Rr,CameraRollIcon as Fo,CheckIcon as Pr,CloseWhite as Do,CropIcon as Bi,EyeCompareIcon as Br,EyeIcon as Ii,FilmIcon as Ir,GifIcon as Wo,GridlinesIcon as Vo,HighlighterIcon as Ar,MaximizeIcon as Or,MoreDotsIcon as Dr,PauseIcon as Ai,PenIcon as Eo,PixelateIcon as Wr,PlayIcon as Ho,RedactIcon as Vr,RedoIcon as Er,ResetIcon as Oi,RotateIcon as Hr,SaveIcon as Gr,ScissorsIcon as Di,ShareIcon as Lr,SunAdjustIcon as Wi,TrashIcon as $r,TypeIcon as Vi,UndoIcon as Ei,VolumeXIcon as So,WhiteBackNavigation as Nr,ZoomInIcon as Ur,ZoomOutIcon as Xr,BrightnessIcon as Yr,ContrastIcon as _r,SaturationIcon as Zr,WarmthIcon as qr,ExposureIcon as Qr,VignetteIcon as Kr,ZapIcon as Go}from"../NetworkIcons";import{ScreenCapture as Jr}from"../../capture";import{MediaEditor as Mt}from"../../editor";import{formatBytes as Hi}from"../../helpers";import{showToast as L}from"../../helpers/toast";import{useTranslation as en}from"../../i18n";import{triggerNativeHaptic as I}from"../../native/NativeInspector";const Gi=["#EF4444","#F59E0B","#38BDF8","#10B981","#A855F7","#FFFFFF","#0F172A"],Cn=({textItem:M,canvasWidth:De,canvasHeight:we,scale:Bt,onUpdate:vt,onDelete:z,onEdit:We})=>{const te=G(new Ht.ValueXY({x:0,y:0})).current,qe=G(M);qe.current=M;const Qe=G(De);Qe.current=De;const Ve=G(we);Ve.current=we;const Ne=G(Bt);Ne.current=Bt;const me=G(vt);me.current=vt;const Q=G(!1),Y=G(Gt.create({onStartShouldSetPanResponder:()=>!0,onStartShouldSetPanResponderCapture:()=>!1,onMoveShouldSetPanResponder:(ge,U)=>Math.abs(U.dx)>3||Math.abs(U.dy)>3,onMoveShouldSetPanResponderCapture:()=>!1,onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0,onPanResponderGrant:()=>{Q.current=!1,te.setValue({x:0,y:0})},onPanResponderMove:(ge,U)=>{(Math.abs(U.dx)>3||Math.abs(U.dy)>3)&&(Q.current=!0),te.setValue({x:U.dx,y:U.dy})},onPanResponderRelease:(ge,U)=>{if(!Q.current){We(qe.current),te.setValue({x:0,y:0});return}const de=(Qe.current||300)*(Ne.current||1),he=(Ve.current||500)*(Ne.current||1),ce=U.dx/de,be=U.dy/he,ne=qe.current,it=Math.max(0,Math.min(.85,ne.x+ce)),Ke=Math.max(0,Math.min(.92,ne.y+be));te.setValue({x:0,y:0}),me.current(ne.id,{x:it,y:Ke})},onPanResponderTerminate:()=>{te.setValue({x:0,y:0}),Q.current=!1}})).current;return<Ht.View{...Y.panHandlers}style={[t.textAnnotationPill,{left:`${M.x*100}%`,top:`${M.y*100}%`,backgroundColor:M.bgColor,transform:te.getTranslateTransform()}]}>
|
|
2
2
|
<R style={[t.textAnnotationText,{color:M.color}]}pointerEvents="none">
|
|
3
3
|
{M.text}
|
|
4
4
|
</R>
|
|
5
|
-
<A style={t.textDeleteBtn}onPress={()=>
|
|
6
|
-
<
|
|
5
|
+
<A style={t.textDeleteBtn}onPress={()=>z(M.id)}hitSlop={{top:10,bottom:10,left:10,right:10}}>
|
|
6
|
+
<Do size={8}/>
|
|
7
7
|
</A>
|
|
8
|
-
</
|
|
8
|
+
</Ht.View>},Tn=({cropBox:M,imageWidth:De,imageHeight:we,imageOffsetX:Bt,imageOffsetY:vt,scale:z,onUpdateCropBox:We,onApplyCrop:te,onCancelCrop:qe})=>{const Qe=Math.max(0,Math.min(.9,isFinite(M?.x)?M.x:.08)),Ve=Math.max(0,Math.min(.9,isFinite(M?.y)?M.y:.12)),Ne=Math.max(.1,Math.min(1-Qe,isFinite(M?.width)?M.width:.84)),me=Math.max(.1,Math.min(1-Ve,isFinite(M?.height)?M.height:.76)),Q=Bt+Qe*De,Y=vt+Ve*we,ge=Ne*De,U=me*we,de=G({x:Qe,y:Ve,width:Ne,height:me});de.current={x:Qe,y:Ve,width:Ne,height:me};const he=G(De);he.current=De;const ce=G(we);ce.current=we;const be=G(z);be.current=z;const ne=G(We);ne.current=We;const it=G({origBox:{x:.08,y:.12,width:.84,height:.76}}),Ke=G(Gt.create({onStartShouldSetPanResponder:()=>!0,onMoveShouldSetPanResponder:(ue,Xe)=>Math.abs(Xe.dx)>3||Math.abs(Xe.dy)>3,onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0,onPanResponderGrant:()=>{it.current.origBox={...de.current}},onPanResponderMove:(ue,Xe)=>{const Ye=he.current*(be.current||1),Je=ce.current*(be.current||1);if(!Ye||!Je)return;const{x:O,y:_,width:ae,height:xe}=it.current.origBox,Z=Math.max(0,Math.min(1-ae,O+Xe.dx/Ye)),Se=Math.max(0,Math.min(1-xe,_+Xe.dy/Je));ne.current({x:Z,y:Se,width:ae,height:xe})},onPanResponderRelease:()=>{}})).current,Ue=ue=>Gt.create({onStartShouldSetPanResponder:()=>!0,onMoveShouldSetPanResponder:(Xe,Ye)=>Math.abs(Ye.dx)>2||Math.abs(Ye.dy)>2,onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0,onPanResponderGrant:()=>{it.current.origBox={...de.current}},onPanResponderMove:(Xe,Ye)=>{const Je=he.current*(be.current||1),O=ce.current*(be.current||1);if(!Je||!O)return;const _=Ye.dx/Je,ae=Ye.dy/O,{x:xe,y:Z,width:Se,height:Ce}=it.current.origBox,rt=.1;let Ee=xe,Ft=Z,Be=Se,It=Ce;(ue==="tl"||ue==="left"||ue==="bl")&&(Ee=Math.max(0,Math.min(xe+Se-rt,xe+_)),Be=Se-(Ee-xe)),(ue==="tr"||ue==="right"||ue==="br")&&(Be=Math.max(rt,Math.min(1-xe,Se+_))),(ue==="tl"||ue==="top"||ue==="tr")&&(Ft=Math.max(0,Math.min(Z+Ce-rt,Z+ae)),It=Ce-(Ft-Z)),(ue==="bl"||ue==="bottom"||ue==="br")&&(It=Math.max(rt,Math.min(1-Z,Ce+ae))),ne.current({x:Ee,y:Ft,width:Be,height:It})},onPanResponderRelease:()=>{}}),ze=G({tl:Ue("tl"),tr:Ue("tr"),bl:Ue("bl"),br:Ue("br"),top:Ue("top"),bottom:Ue("bottom"),left:Ue("left"),right:Ue("right")}).current;return De<20||we<20?null:<F style={N.absoluteFill}pointerEvents="box-none">
|
|
9
9
|
|
|
10
10
|
<F style={N.absoluteFill}pointerEvents="none">
|
|
11
11
|
|
|
@@ -56,17 +56,17 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
56
56
|
</F>
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
{qe&&<A activeOpacity={.8}onPress={()=>{
|
|
60
|
-
<
|
|
59
|
+
{qe&&<A activeOpacity={.8}onPress={()=>{I("light"),qe()}}style={t.cropCancelBtn}accessibilityLabel="Cancel Crop">
|
|
60
|
+
<Do size={14}color={S.white}/>
|
|
61
61
|
</A>}
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
{te&&<A activeOpacity={.8}onPress={()=>{
|
|
64
|
+
{te&&<A activeOpacity={.8}onPress={()=>{I("medium"),te()}}style={t.cropConfirmBtn}accessibilityLabel="Apply Crop Selection">
|
|
65
65
|
<Pr size={18}color={S.white}/>
|
|
66
66
|
</A>}
|
|
67
|
-
</F>};export const MediaPreviewModal=({item:M,visible:De,onClose:ke,onDelete:It,onConvertToGif:Mt})=>{const{t:I}=en(),We=pr(kr),te=We?.modalHeightPercent??90,{width:qe}=Tr(),Qe=oo(()=>io.OS==="ios"?te>=98?qe>=390?50:44:0:io.OS==="android"&&te>=98?Fi.currentHeight||24:0,[te,qe]),[Ve,Ne]=V(!1),[me,Q]=V(!1),[Y,ge]=V(null),[U,de]=V(M?.width),[he,ce]=V(M?.height),[be,ne]=V(M?.sizeBytes),[it,Ke]=V(M?.durationMs),[Ue,ze]=V(!1),[ue,Xe]=V(!1),[Ye,Je]=V(!1),[O,_]=V("none"),[ae,xe]=V(1),[Z,Se]=V(0),[we,rt]=V([]),[Ee,vt]=V([]),[Be,At]=V(!1),[$i,nt]=V(!1),[D,_e]=V("brush"),[Ro,ji]=V(24),[He,Ni]=V("brightness"),[K,Ut]=V("none"),[Ce,Ot]=V(!1),[ye,Dt]=V(!1),[E,Ft]=V({brightness:0,contrast:0,saturation:0,warmth:0,exposure:0,vignette:0}),[Te,Xt]=V(!1),[Me,Yt]=V(!1),[se,at]=V(0),[pe,st]=V(M?.durationMs||1e4),[et,ro]=V("end"),[fe,_t]=V(!1),[Ze,no]=V(100),[Ge,ao]=V(1),[Zt,Go]=V(12),[Po,Ui]=V(480),[Lo,$o]=V([]),[Mn,jo]=V(!1),[vn,Xi]=V(0),[zo,qt]=V("free"),[Qt,kt]=V({x:.08,y:.12,width:.84,height:.76}),[ve,No]=V("#EF4444"),[Ie,Yi]=V(4),[oe,Le]=V([]),[H,Kt]=V(null),[Fe,$e]=V([]),[_i,Jt]=V(!1),[Uo,Xo]=V(null),[so,lo]=V(""),[ho,Zi]=V({x:.3,y:.4}),re=ot(()=>{vt([]),rt(e=>[...e,{uri:Y||M?.uri||null,inkPaths:[...oe],texts:[...Fe],adjustments:{...E},filterPreset:K,showWatermark:Ce,showGridlines:ye,rotationAngle:Z,flipH:Te,flipV:Me,width:U,height:he,sizeBytes:be}])},[Y,M?.uri,oe,Fe,E,K,Ce,ye,Z,Te,Me,U,he,be]),Yo=G(re);Yo.current=re;const Fn=G(null),[lt,_o]=V({width:ci.get("window").width-16,height:ci.get("window").height*.72,pageX:0,pageY:0}),je=G(O);je.current=O;const co=G(D);co.current=D;const Wt=G(ve);Wt.current=ve;const Vt=G(Ie);Vt.current=Ie;const qi=G(Lt.create({onStartShouldSetPanResponder:()=>je.current==="draw",onMoveShouldSetPanResponder:()=>je.current==="draw",onPanResponderGrant:e=>{Yo.current();const{locationX:C,locationY:T}=e.nativeEvent;Kt([{x:C,y:T}])},onPanResponderMove:e=>{const{locationX:C,locationY:T}=e.nativeEvent,k=co.current;Kt(k==="brush"||k==="highlighter"?P=>P?[...P,{x:C,y:T}]:[{x:C,y:T}]:P=>[P&&P.length>0?P[0]:{x:C,y:T},{x:C,y:T}])},onPanResponderRelease:()=>{Kt(e=>{if(e&&e.length>0){const C=co.current,T=e[0],k=e[e.length-1]||T;if((C==="brush"||C==="highlighter")&&e.length>1)Le(P=>[...P,{id:`stroke_${Date.now()}_${Math.random()}`,type:C,points:e,color:Wt.current,strokeWidth:Vt.current}]);else if(C==="arrow"&&e.length>1)Math.hypot(k.x-T.x,k.y-T.y)>6&&Le(z=>[...z,{id:`stroke_${Date.now()}_${Math.random()}`,type:"arrow",points:[T,k],color:Wt.current,strokeWidth:Vt.current}]);else if(C==="circle"||C==="spotlight")Math.hypot(k.x-T.x,k.y-T.y)>6&&Le(z=>[...z,{id:`stroke_${Date.now()}_${Math.random()}`,type:C,points:[T,k],color:Wt.current,strokeWidth:Vt.current}]);else if(C==="step"){const P=oe.filter(z=>z.type==="step").length;Le(z=>[...z,{id:`stroke_${Date.now()}_${Math.random()}`,type:"step",points:[T],color:Wt.current,strokeWidth:Vt.current,stepNumber:P+1}])}else if(C==="rect"||C==="redact"||C==="pixelate"){const P=Math.min(T.x,k.x),z=Math.min(T.y,k.y),W=Math.abs(k.x-T.x),X=Math.abs(k.y-T.y);W>4&&X>4&&Le(J=>[...J,{id:`stroke_${Date.now()}_${Math.random()}`,type:C,points:[T,k],rect:{x:P,y:z,width:W,height:X},color:Wt.current,strokeWidth:Vt.current}])}}return null})}})).current,Et=(e,C,T)=>{const k=C&&C>0?C:1e3,P=T&&T>0?T:1e3,z=k/P;if(e==="free")return{x:parseFloat(((1-.84)/2).toFixed(4)),y:parseFloat(((1-.76)/2).toFixed(4)),width:.84,height:.76};let W=1;e==="1:1"?W=1:e==="4:3"?W=4/3:e==="16:9"?W=16/9:e==="9:16"?W=9/16:e==="3:2"&&(W=3/2);const X=W/z;let J=.88,ee=.88;if(X>=1){if(J=.88,ee=.88/X,ee>.88){const Ht=.88/ee;J*=Ht,ee=.88}}else if(ee=.88,J=.88*X,J>.88){const Ht=.88/J;ee*=Ht,J=.88}J=Math.max(.1,Math.min(.96,parseFloat(J.toFixed(4)))),ee=Math.max(.1,Math.min(.96,parseFloat(ee.toFixed(4))));const tt=parseFloat(((1-J)/2).toFixed(4)),Pt=parseFloat(((1-ee)/2).toFixed(4));return{x:tt,y:Pt,width:J,height:ee}};Ao.useEffect(()=>{M?.uri&&(ge(M.uri),de(M.width),ce(M.height),ne(M.sizeBytes),Ke(M.durationMs),ze(!1),xe(1),_("none"),Le([]),Kt(null),$e([]),kt(Et("free",M.width,M.height)),at(0),st(M.durationMs||1e4),ro("end"),_t(!1),no(100),ao(1),Xi(0))},[M?.uri,M?.width,M?.height,M?.sizeBytes,M?.durationMs]),Ao.useEffect(()=>{if(M?.type==="video"&&M?.uri){let e=!0;return jo(!0),Tt.generateFilmstrip({uri:M.uri,count:10,targetWidth:120,targetHeight:120}).then(C=>{e&&C?.thumbnails&&$o(C.thumbnails)}).catch(()=>{}).finally(()=>{e&&jo(!1)}),()=>{e=!1}}else $o([])},[M?.type,M?.uri]),Ao.useEffect(()=>{if(Y||M?.uri){const e=Y||M?.uri;e&&M?.type==="image"&&(!U||!he)&&Co.getSize(e,(C,T)=>{C>0&&T>0&&(de(C),ce(T))},()=>{})}},[Y,M?.uri,M?.type,U,he]);const Ae=oo(()=>{const e=lt.width,C=lt.height;if(!e||!C)return{width:e,height:C};const T=U??M?.width,k=he??M?.height;if(!T||!k||T<=0||k<=0)return{width:e,height:C};const P=T/k,z=e/C;let W=e,X=C;return P>z?(W=e,X=e/P):(X=C,W=C*P),{width:Math.max(20,Math.floor(W)),height:Math.max(20,Math.floor(X))}},[lt.width,lt.height,U,he,M?.width,M?.height]),q=Y||M?.uri,Re=U??M?.width,Pe=he??M?.height,Zo=be??M?.sizeBytes,le=it??M?.durationMs,j=M?.type==="video",kn=M?.type==="gif",ie=M?.type==="image",Oe=G(new Gt.ValueXY({x:0,y:0})).current,dt=G({x:0,y:0}),eo=G({x:0,y:0});hi(()=>{const e=Oe.x.addListener(T=>dt.current.x=T.value),C=Oe.y.addListener(T=>dt.current.y=T.value);return()=>{Oe.x.removeListener(e),Oe.y.removeListener(C)}},[Oe]);const ht=G(ae);ht.current=ae;const St=G(Ae);St.current=Ae;const Rt=G(lt);Rt.current=lt;const qo=ot(()=>{const e=ht.current;if(e<=1)return{maxX:0,maxY:0};const C=St.current.width,T=St.current.height,k=Rt.current.width,P=Rt.current.height,z=Math.max(0,(C*e-k)/2/e),W=Math.max(0,(T*e-P)/2/e);return{maxX:z,maxY:W}},[]),Qo=ot((e,C)=>{const{maxX:T,maxY:k}=qo();return{x:Math.max(-T,Math.min(T,e)),y:Math.max(-k,Math.min(k,C))}},[qo]),Qi=G(Lt.create({onStartShouldSetPanResponder:()=>ht.current>1,onMoveShouldSetPanResponder:(e,C)=>ht.current>1&&(Math.abs(C.dx)>4||Math.abs(C.dy)>4),onMoveShouldSetPanResponderCapture:(e,C)=>ht.current>1&&(Math.abs(C.dx)>6||Math.abs(C.dy)>6),onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0,onPanResponderGrant:()=>{eo.current={...dt.current}},onPanResponderMove:(e,C)=>{const T=ht.current,k=eo.current.x+C.dx/T,P=eo.current.y+C.dy/T,{maxX:z,maxY:W}=(()=>{const ee=ht.current;if(ee<=1)return{maxX:0,maxY:0};const tt=St.current.width,Pt=St.current.height,Ht=Rt.current.width,di=Rt.current.height;return{maxX:Math.max(0,(tt*ee-Ht)/2/ee),maxY:Math.max(0,(Pt*ee-di)/2/ee)}})(),X=Math.max(-z,Math.min(z,k)),J=Math.max(-W,Math.min(W,P));Oe.setValue({x:X,y:J})},onPanResponderRelease:()=>{const{maxX:e,maxY:C}=(()=>{const P=ht.current;if(P<=1)return{maxX:0,maxY:0};const z=St.current.width,W=St.current.height,X=Rt.current.width,J=Rt.current.height;return{maxX:Math.max(0,(z*P-X)/2/P),maxY:Math.max(0,(W*P-J)/2/P)}})(),T=dt.current,k={x:Math.max(-e,Math.min(e,T.x)),y:Math.max(-C,Math.min(C,T.y))};(k.x!==T.x||k.y!==T.y)&&Gt.spring(Oe,{toValue:k,friction:7,tension:60,useNativeDriver:!1}).start()},onPanResponderTerminate:()=>{}})).current;hi(()=>{if(ae<=1)Oe.setValue({x:0,y:0}),eo.current={x:0,y:0};else{const e=Qo(dt.current.x,dt.current.y);(e.x!==dt.current.x||e.y!==dt.current.y)&&Gt.spring(Oe,{toValue:e,friction:7,tension:60,useNativeDriver:!1}).start()}},[ae,Oe,Qo]);const Ki=()=>{B("light"),xe(e=>Math.min(4,parseFloat((e+.25).toFixed(2))))},Ji=()=>{B("light"),xe(e=>Math.max(1,parseFloat((e-.25).toFixed(2))))},Ko=()=>{B("medium"),xe(1),Oe.setValue({x:0,y:0}),eo.current={x:0,y:0}},Jo=G(240),ei=ot(e=>{const C=Math.max(50,Jo.current),T=Math.max(0,Math.min(1,e/C));if(je.current==="draw"){const k=co.current;if(k==="brush"||k==="highlighter"||k==="arrow"||k==="rect"||k==="circle"||k==="spotlight"||k==="step"){const P=Math.round(2+T*22);Yi(P)}else if(k==="pixelate"){const P=Math.round(4+T*36);ji(P)}}else if(je.current==="adjust")if(He==="vignette"){const k=Math.round(T*100);Ft(P=>({...P,vignette:k}))}else{const k=Math.round(T*100-50);Ft(P=>({...P,[He]:k}))}else if(je.current==="crop"){const k=Math.round(T*360);Se(k)}else if(je.current==="trim"){const P=Math.round(T*(le||1e4));et==="start"?at(Math.min(pe-500,P)):st(Math.max(se+500,P))}else if(je.current==="audio"){const k=Math.round(T*100);no(k),_t(k===0)}else if(je.current==="speed"){const k=parseFloat((.5+T*1.5).toFixed(2));ao(k)}else if(je.current==="gif"){const k=Math.round(6+T*18);Go(k)}else if(je.current==="none"){const k=parseFloat((1+T*3).toFixed(2));xe(k)}},[He,le,et,se,pe]),er=G(Lt.create({onStartShouldSetPanResponder:()=>!0,onStartShouldSetPanResponderCapture:()=>!0,onMoveShouldSetPanResponder:()=>!0,onMoveShouldSetPanResponderCapture:()=>!0,onPanResponderGrant:e=>{B("light"),ei(e.nativeEvent.locationX)},onPanResponderMove:e=>{ei(e.nativeEvent.locationX)},onPanResponderRelease:()=>{B("light")}})).current,ti=oo(()=>{if(O==="draw"){if(D==="brush"||D==="highlighter"||D==="arrow"||D==="rect"||D==="circle"||D==="spotlight"||D==="step")return Math.min(100,Math.max(0,(Ie-2)/22*100));if(D==="pixelate")return Math.min(100,Math.max(0,(Ro-4)/36*100));if(D==="redact")return 100}return O==="adjust"?He==="vignette"?Math.min(100,Math.max(0,E.vignette)):Math.min(100,Math.max(0,E[He]+50)):O==="crop"?Math.min(100,Math.max(0,Z/360*100)):O==="trim"?Math.min(100,Math.max(0,(et==="start"?se:pe)/(le||1e4)*100)):O==="audio"?fe?0:Ze:O==="speed"?Math.min(100,Math.max(0,(Ge-.5)/1.5*100)):O==="gif"?Math.min(100,Math.max(0,(Zt-6)/18*100)):O==="none"?Math.min(100,Math.max(0,(ae-1)/3*100)):50},[O,D,Ie,Ro,He,E,Z,ae,le,et,se,pe,fe,Ze,Ge,Zt]),oi=ot(()=>{if(we.length===0)return;B("light");const e=we[we.length-1];vt(C=>[...C,{uri:Y||M?.uri||null,inkPaths:[...oe],texts:[...Fe],adjustments:{...E},filterPreset:K,showWatermark:Ce,rotationAngle:Z,flipH:Te,flipV:Me,width:U,height:he,sizeBytes:be}]),rt(C=>C.slice(0,C.length-1)),e&&(ge(e.uri),Le(e.inkPaths),$e(e.texts),e.adjustments&&Ft(e.adjustments),e.filterPreset&&Ut(e.filterPreset),e.showWatermark!==void 0&&Ot(e.showWatermark),e.showGridlines!==void 0&&Dt(e.showGridlines),e.rotationAngle!==void 0&&Se(e.rotationAngle),e.flipH!==void 0&&Xt(e.flipH),e.flipV!==void 0&&Yt(e.flipV),e.width&&de(e.width),e.height&&ce(e.height),e.sizeBytes&&ne(e.sizeBytes),L(I("mediaGallery.undone","Action Undone")))},[we,Y,M?.uri,oe,Fe,E,K,Ce,ye,Z,Te,Me,U,he,be,I]),tr=ot(()=>{if(Ee.length===0)return;B("light");const e=Ee[Ee.length-1];rt(C=>[...C,{uri:Y||M?.uri||null,inkPaths:[...oe],texts:[...Fe],adjustments:{...E},filterPreset:K,showWatermark:Ce,showGridlines:ye,rotationAngle:Z,flipH:Te,flipV:Me,width:U,height:he,sizeBytes:be}]),vt(C=>C.slice(0,C.length-1)),e&&(ge(e.uri),Le(e.inkPaths),$e(e.texts),e.adjustments&&Ft(e.adjustments),e.filterPreset&&Ut(e.filterPreset),e.showWatermark!==void 0&&Ot(e.showWatermark),e.showGridlines!==void 0&&Dt(e.showGridlines),e.rotationAngle!==void 0&&Se(e.rotationAngle),e.flipH!==void 0&&Xt(e.flipH),e.flipV!==void 0&&Yt(e.flipV),e.width&&de(e.width),e.height&&ce(e.height),e.sizeBytes&&ne(e.sizeBytes),L(I("mediaGallery.redone","Action Redone")))},[Ee,Y,M?.uri,oe,Fe,E,K,Ce,ye,Z,Te,Me,U,he,be,I]),or=ot(()=>{M&&(B("medium"),re(),ge(M.uri),Le([]),$e([]),Ft({brightness:0,contrast:0,saturation:0,warmth:0,exposure:0,vignette:0}),Ut("none"),Ot(!1),Dt(!1),Se(0),Xt(!1),Yt(!1),de(M.width),ce(M.height),ne(M.sizeBytes),Ke(M.durationMs),xe(1),_("none"),at(0),st(M.durationMs||1e4),ro("end"),_t(!1),no(100),ao(1),L(I("mediaGallery.resetSuccess",M.type==="video"?"Reset to original video":"Reset to original image")))},[M,re,I]),ii=ot(async()=>{if(!(!M||!q)){if(B("medium"),Q(!0),j){try{const e=le||M.durationMs||1e4,C=await Tt.trimVideo({uri:q,startTimeMs:se,endTimeMs:pe<e?pe:void 0,muteAudio:fe||Ze===0,quality:"high"});C?.uri?(ge(C.uri),C.width&&de(C.width),C.height&&ce(C.height),C.size&&ne(C.size),C.durationMs&&Ke(C.durationMs),L(I("mediaGallery.videoSaved","Video Saved Successfully")),We?.refreshMediaCount?.().catch(()=>{})):L(I("mediaGallery.videoSaved","Video Saved"))}catch{L(I("mediaGallery.saveFailed","Failed to save video"))}finally{Q(!1)}return}try{const e=Math.max(1,Re||1e3),C=Math.max(1,Pe||1e3),T=oe.filter(z=>(z.type==="redact"||z.type==="pixelate")&&z.rect).map(z=>{const W=z.rect;return{x:W.x/e,y:W.y/C,width:W.width/e,height:W.height/C,style:z.type==="pixelate"?"blur":"blackout",isNormalized:!0}}),k=[...Fe.map(z=>({x:z.x,y:z.y,width:.22,height:.06,color:z.bgColor||"#EF4444",label:z.text,isNormalized:!0})),...oe.filter(z=>z.type==="rect"||z.type==="arrow"||z.type==="circle").map(z=>{const W=z.points[0]||{x:0,y:0},X=z.points[z.points.length-1]||W,J=Math.min(W.x,X.x),ee=Math.min(W.y,X.y),tt=Math.max(10,Math.abs(X.x-W.x)),Pt=Math.max(10,Math.abs(X.y-W.y));return{x:J/e,y:ee/C,width:tt/e,height:Pt/C,color:z.color||"#EF4444",isNormalized:!0}})],P=await Tt.editPhoto({uri:q,rotation:Z!==0?Z:void 0,flipHorizontal:Te,flipVertical:Me,adjustments:{brightness:E.brightness/50,contrast:1+E.contrast/50,saturation:1+E.saturation/50,temperature:E.warmth/50,vignette:E.vignette/100},filterPreset:K!=="none"?K:void 0,redactions:T.length>0?T:void 0,annotations:k.length>0?k:void 0,format:M.format==="png"?"png":"jpeg",quality:.92});P?.uri?(ge(P.uri),P.width&&de(P.width),P.height&&ce(P.height),P.size&&ne(P.size),Le([]),$e([]),Ft({brightness:0,contrast:0,saturation:0,warmth:0,exposure:0,vignette:0}),Se(0),Xt(!1),Yt(!1),L(I("mediaGallery.savedSuccess","Image Saved Successfully")),We?.refreshMediaCount?.().catch(()=>{})):L(I("mediaGallery.savedSuccess","Image Saved"))}catch{L(I("mediaGallery.saveFailed","Failed to save image"))}finally{Q(!1)}}},[M,q,j,le,se,pe,fe,Ze,Re,Pe,Z,Te,Me,E,K,oe,Fe,We,I]),ri=ot(async()=>{if(!(!M||!q||!j||me)){B("medium"),Q(!0);try{const e=await Tt.generateFilmstrip({uri:q,count:1,targetWidth:Re||1080,targetHeight:Pe||1920});e?.thumbnails&&e.thumbnails.length>0?(L(I("mediaGallery.snapshotSaved","Frame Snapshot Saved (PNG)")),We?.refreshMediaCount?.().catch(()=>{})):L(I("mediaGallery.snapshotFailed","Failed to snapshot frame"))}catch{L(I("mediaGallery.snapshotFailed","Failed to snapshot frame"))}finally{Q(!1)}}},[M,q,j,me,Re,Pe,We,I]),ir=oo(()=>{if(!j||!M)return!1;const e=M.durationMs||1e4,C=se>0||pe<e,T=fe||Ze<100,k=Ge!==1,P=Y!=null&&Y!==M.uri;return C||T||k||P},[j,M,se,pe,fe,Ze,Ge,Y]),ni=oo(()=>{if(!M)return!1;const e=Y!=null&&Y!==M.uri,C=oe.length>0,T=Fe.length>0,k=we.length>0,P=E.brightness!==0||E.contrast!==0||E.saturation!==0||E.warmth!==0||E.exposure!==0||E.vignette!==0;return e||C||T||k||P||(Z!==0||Te||Me)||K!=="none"||Ce||ye},[Y,M,oe.length,Fe.length,we.length,E,Z,Te,Me,K,Ce,ye]),rr=()=>{B("light"),oi()},nr=()=>{B("medium"),re(),Le([])},Sn=e=>{B("light"),_("crop"),qt(e),kt(Et(e,Re,Pe))},ai=async()=>{if(!(!q||!ie)){B("medium"),re(),Q(!0);try{const e=await Tt.cropToDefect(q,{x:Qt.x,y:Qt.y,width:Qt.width,height:Qt.height,isNormalized:!0});e?.uri?(ge(e.uri),e.width&&de(e.width),e.height&&ce(e.height),e.size&&ne(e.size),kt(Et("free",e.width,e.height)),qt("free"),L(I("mediaGallery.croppedSuccess","Image Cropped")),_("none")):L(I("mediaGallery.cropFailed","Crop failed"))}catch{L(I("mediaGallery.cropFailed","Crop failed"))}finally{Q(!1)}}},Bo=e=>{B("light"),e?(Xo(e),lo(e.text)):(Xo(null),lo("")),Jt(!0)},ar=e=>{B("light"),re(),$e(C=>C.filter(T=>T.id!==e))},sr=()=>{if(!so.trim()){Jt(!1);return}if(re(),Uo)$e(e=>e.map(C=>C.id===Uo.id?{...C,text:so.trim(),color:ve}:C));else{const e={id:`text_${Date.now()}`,text:so.trim(),x:ho.x,y:ho.y,color:S.white,bgColor:ve==="#FFFFFF"?"#0F172A":ve};$e(C=>[...C,e])}Jt(!1),lo(""),L(I("mediaGallery.textAdded","Text Added"))},Rn=async e=>{if(!(!q||!ie||me)){B("medium"),re(),Q(!0);try{const C=await Tt.editPhoto({uri:q,quality:.85,crop:{x:0,y:0,width:1,height:1,isNormalized:!0}});if(C?.uri){ge(C.uri);const T=Math.round((Re||1080)*e),k=Math.round((Pe||1920)*e);de(T),ce(k),C.size&&ne(Math.round(C.size*e*e)),L(I("mediaGallery.resizedSuccess",`Resized to ${Math.round(e*100)}% (${T}\xD7${k})`)),_("none")}}catch{L(I("mediaGallery.resizeFailed","Resize failed"))}finally{Q(!1)}}},lr=async()=>{try{B("light");const e=q.startsWith("file://")||q.startsWith("content://")||q.startsWith("http")?q:`file://${q}`,C=io.select({ios:{url:e,title:M.filename},default:{title:M.filename,message:M.filename,url:e}});(await Mi.share(C)).action===Mi.sharedAction&&L(I("mediaGallery.shareSuccess","Shared successfully"))}catch(e){e?.message!=="User did not share"&&L(I("mediaGallery.shareUnavailable","Sharing not available on this device"))}},dr=()=>{B("medium"),Je(!0)},si=async()=>{if(Mt){Ne(!0);try{await Mt(M),L(I("mediaGallery.convertedSuccess","Converted to GIF!"))}catch{L(I("mediaGallery.convertFailed","Conversion failed"))}finally{Ne(!1)}}},Io=async()=>{try{Xe(!0),await Jr.playVideo(q)}catch{L(I("mediaGallery.playError","Unable to play video"))}finally{Xe(!1)}},Pn=async()=>{if(!(!q||!j||me)){Q(!0),B("light");try{const C=Math.min(le||1e4,5e3),T=await Tt.trimReproClip(q,0,C,{quality:"medium"});T?.uri&&(ge(T.uri),T.width&&de(T.width),T.height&&ce(T.height),T.size&&ne(T.size),T.durationMs&&Ke(T.durationMs),L(I("mediaGallery.trimmedSuccess","Trimmed to 5s Repro Clip")))}catch{L(I("mediaGallery.trimFailed","Trim failed"))}finally{Q(!1)}}},hr=async()=>{if(!(!q||!j||me)){Q(!0),B("light");try{const e=await Tt.muteVideo(q);e?.uri&&(ge(e.uri),e.width&&de(e.width),e.height&&ce(e.height),e.size&&ne(e.size),e.durationMs&&Ke(e.durationMs),L(I("mediaGallery.mutedSuccess","Audio Stripped")))}catch{L(I("mediaGallery.muteFailed","Mute failed"))}finally{Q(!1)}}},to=le?(le/1e3).toFixed(1):null,li=to?`00:${Number(to)<10?"0":""}${to}`:null,cr=[{key:"none",label:I("mediaGallery.preview","Preview"),themeColor:S.brandPurple,icon:e=><Ai size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"crop",label:"Crop",themeColor:S.sky600,icon:e=><Ii size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"adjust",label:"Adjust",themeColor:S.amber500,icon:e=><Vi size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"draw",label:"Markup",themeColor:S.sky400,icon:e=><Vo size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"text",label:"Text",themeColor:S.violet600,icon:e=><Ei size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>}],ur=[{key:"none",label:I("mediaGallery.preview","Player"),themeColor:S.brandPurple,icon:e=><Ai size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"trim",label:I("media.trim","Trim"),themeColor:S.sky600,icon:e=><Wi size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>,hasBadge:se>0||pe<(le||1e4)},{key:"audio",label:I("media.audio","Audio"),themeColor:S.amber600,icon:e=><So size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>,hasBadge:fe||Ze<100},{key:"speed",label:I("media.speed","Speed"),themeColor:S.violet600,icon:e=><Ho size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>,hasBadge:Ge!==1},{key:"gif",label:I("media.toGif","To GIF"),themeColor:S.emerald500,icon:e=><Do size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"snapshot",label:I("media.snapshot","Snapshot"),themeColor:S.pink500,icon:e=><Fo size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>}];return!M||!De?null:<Ci visible={De}transparent={!0}animationType="fade"statusBarTranslucent={!0}onRequestClose={ke}>
|
|
67
|
+
</F>};export const MediaPreviewModal=({item:M,visible:De,onClose:we,onDelete:Bt,onConvertToGif:vt})=>{const{t:z}=en(),We=ur(kr),te=We?.modalHeightPercent??90,{width:qe}=Tr(),Qe=eo(()=>to.OS==="ios"?te>=98?qe>=390?50:44:0:to.OS==="android"&&te>=98?Fi.currentHeight||24:0,[te,qe]),[Ve,Ne]=V(!1),[me,Q]=V(!1),[Y,ge]=V(null),[U,de]=V(M?.width),[he,ce]=V(M?.height),[be,ne]=V(M?.sizeBytes),[it,Ke]=V(M?.durationMs),[Ue,ze]=V(!1),[ue,Xe]=V(!1),[Ye,Je]=V(!1),[O,_]=V("none"),[ae,xe]=V(1),[Z,Se]=V(0),[Ce,rt]=V([]),[Ee,Ft]=V([]),[Be,It]=V(!1),[Li,nt]=V(!1),[D,_e]=V("brush"),[Ro,$i]=V(24),[He,ji]=V("brightness"),[K,jt]=V("none"),[Te,At]=V(!1),[ye,Ot]=V(!1),[E,kt]=V({brightness:0,contrast:0,saturation:0,warmth:0,exposure:0,vignette:0}),[Me,Nt]=V(!1),[ve,Ut]=V(!1),[se,at]=V(0),[pe,st]=V(M?.durationMs||1e4),[et,oo]=V("end"),[fe,Xt]=V(!1),[Ze,io]=V(100),[Ge,ro]=V(1),[Yt,Lo]=V(12),[Po,Ni]=V(480),[$o,jo]=V([]),[Mn,No]=V(!1),[vn,Ui]=V(0),[zo,_t]=V("free"),[Zt,St]=V({x:.08,y:.12,width:.84,height:.76}),[Fe,Uo]=V("#EF4444"),[Ie,Xi]=V(4),[oe,Le]=V([]),[H,qt]=V(null),[ke,$e]=V([]),[Yi,Qt]=V(!1),[Xo,Yo]=V(null),[no,ao]=V(""),[so,_i]=V({x:.3,y:.4}),re=ot(()=>{Ft([]),rt(e=>[...e,{uri:Y||M?.uri||null,inkPaths:[...oe],texts:[...ke],adjustments:{...E},filterPreset:K,showWatermark:Te,showGridlines:ye,rotationAngle:Z,flipH:Me,flipV:ve,width:U,height:he,sizeBytes:be}])},[Y,M?.uri,oe,ke,E,K,Te,ye,Z,Me,ve,U,he,be]),_o=G(re);_o.current=re;const Fn=G(null),[lt,Zo]=V({width:ui.get("window").width-16,height:ui.get("window").height*.72,pageX:0,pageY:0}),je=G(O);je.current=O;const lo=G(D);lo.current=D;const Dt=G(Fe);Dt.current=Fe;const Wt=G(Ie);Wt.current=Ie;const Zi=G(Gt.create({onStartShouldSetPanResponder:()=>je.current==="draw",onMoveShouldSetPanResponder:()=>je.current==="draw",onPanResponderGrant:e=>{_o.current();const{locationX:C,locationY:T}=e.nativeEvent;qt([{x:C,y:T}])},onPanResponderMove:e=>{const{locationX:C,locationY:T}=e.nativeEvent,k=lo.current;qt(k==="brush"||k==="highlighter"?P=>P?[...P,{x:C,y:T}]:[{x:C,y:T}]:P=>[P&&P.length>0?P[0]:{x:C,y:T},{x:C,y:T}])},onPanResponderRelease:()=>{qt(e=>{if(e&&e.length>0){const C=lo.current,T=e[0],k=e[e.length-1]||T;if((C==="brush"||C==="highlighter")&&e.length>1)Le(P=>[...P,{id:`stroke_${Date.now()}_${Math.random()}`,type:C,points:e,color:Dt.current,strokeWidth:Wt.current}]);else if(C==="arrow"&&e.length>1)Math.hypot(k.x-T.x,k.y-T.y)>6&&Le(B=>[...B,{id:`stroke_${Date.now()}_${Math.random()}`,type:"arrow",points:[T,k],color:Dt.current,strokeWidth:Wt.current}]);else if(C==="circle"||C==="spotlight")Math.hypot(k.x-T.x,k.y-T.y)>6&&Le(B=>[...B,{id:`stroke_${Date.now()}_${Math.random()}`,type:C,points:[T,k],color:Dt.current,strokeWidth:Wt.current}]);else if(C==="step"){const P=oe.filter(B=>B.type==="step").length;Le(B=>[...B,{id:`stroke_${Date.now()}_${Math.random()}`,type:"step",points:[T],color:Dt.current,strokeWidth:Wt.current,stepNumber:P+1}])}else if(C==="rect"||C==="redact"||C==="pixelate"){const P=Math.min(T.x,k.x),B=Math.min(T.y,k.y),W=Math.abs(k.x-T.x),X=Math.abs(k.y-T.y);W>4&&X>4&&Le(J=>[...J,{id:`stroke_${Date.now()}_${Math.random()}`,type:C,points:[T,k],rect:{x:P,y:B,width:W,height:X},color:Dt.current,strokeWidth:Wt.current}])}}return null})}})).current,Vt=(e,C,T)=>{const k=C&&C>0?C:1e3,P=T&&T>0?T:1e3,B=k/P;if(e==="free")return{x:parseFloat(((1-.84)/2).toFixed(4)),y:parseFloat(((1-.76)/2).toFixed(4)),width:.84,height:.76};let W=1;e==="1:1"?W=1:e==="4:3"?W=4/3:e==="16:9"?W=16/9:e==="9:16"?W=9/16:e==="3:2"&&(W=3/2);const X=W/B;let J=.88,ee=.88;if(X>=1){if(J=.88,ee=.88/X,ee>.88){const Et=.88/ee;J*=Et,ee=.88}}else if(ee=.88,J=.88*X,J>.88){const Et=.88/J;ee*=Et,J=.88}J=Math.max(.1,Math.min(.96,parseFloat(J.toFixed(4)))),ee=Math.max(.1,Math.min(.96,parseFloat(ee.toFixed(4))));const tt=parseFloat(((1-J)/2).toFixed(4)),zt=parseFloat(((1-ee)/2).toFixed(4));return{x:tt,y:zt,width:J,height:ee}};Ao.useEffect(()=>{M?.uri&&(ge(M.uri),de(M.width),ce(M.height),ne(M.sizeBytes),Ke(M.durationMs),ze(!1),xe(1),_("none"),Le([]),qt(null),$e([]),St(Vt("free",M.width,M.height)),at(0),st(M.durationMs||1e4),oo("end"),Xt(!1),io(100),ro(1),Ui(0))},[M?.uri,M?.width,M?.height,M?.sizeBytes,M?.durationMs]),Ao.useEffect(()=>{if(M?.type==="video"&&M?.uri){let e=!0;return No(!0),Mt.generateFilmstrip({uri:M.uri,count:10,targetWidth:120,targetHeight:120}).then(C=>{e&&C?.thumbnails&&jo(C.thumbnails)}).catch(()=>{}).finally(()=>{e&&No(!1)}),()=>{e=!1}}else jo([])},[M?.type,M?.uri]),Ao.useEffect(()=>{if(Y||M?.uri){const e=Y||M?.uri;e&&M?.type==="image"&&(!U||!he)&&Co.getSize(e,(C,T)=>{C>0&&T>0&&(de(C),ce(T))},()=>{})}},[Y,M?.uri,M?.type,U,he]);const Ae=eo(()=>{const e=lt.width,C=lt.height;if(!e||!C)return{width:e,height:C};const T=U??M?.width,k=he??M?.height;if(!T||!k||T<=0||k<=0)return{width:e,height:C};const P=T/k,B=e/C;let W=e,X=C;return P>B?(W=e,X=e/P):(X=C,W=C*P),{width:Math.max(20,Math.floor(W)),height:Math.max(20,Math.floor(X))}},[lt.width,lt.height,U,he,M?.width,M?.height]),q=Y||M?.uri,Re=U??M?.width,Pe=he??M?.height,qo=be??M?.sizeBytes,le=it??M?.durationMs,j=M?.type==="video",kn=M?.type==="gif",ie=M?.type==="image",Oe=G(new Ht.ValueXY({x:0,y:0})).current,dt=G({x:0,y:0}),Kt=G({x:0,y:0});ci(()=>{const e=Oe.x.addListener(T=>dt.current.x=T.value),C=Oe.y.addListener(T=>dt.current.y=T.value);return()=>{Oe.x.removeListener(e),Oe.y.removeListener(C)}},[Oe]);const ht=G(ae);ht.current=ae;const Rt=G(Ae);Rt.current=Ae;const Pt=G(lt);Pt.current=lt;const Qo=ot(()=>{const e=ht.current;if(e<=1)return{maxX:0,maxY:0};const C=Rt.current.width,T=Rt.current.height,k=Pt.current.width,P=Pt.current.height,B=Math.max(0,(C*e-k)/2/e),W=Math.max(0,(T*e-P)/2/e);return{maxX:B,maxY:W}},[]),Ko=ot((e,C)=>{const{maxX:T,maxY:k}=Qo();return{x:Math.max(-T,Math.min(T,e)),y:Math.max(-k,Math.min(k,C))}},[Qo]),qi=G(Gt.create({onStartShouldSetPanResponder:()=>ht.current>1,onMoveShouldSetPanResponder:(e,C)=>ht.current>1&&(Math.abs(C.dx)>4||Math.abs(C.dy)>4),onMoveShouldSetPanResponderCapture:(e,C)=>ht.current>1&&(Math.abs(C.dx)>6||Math.abs(C.dy)>6),onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0,onPanResponderGrant:()=>{Kt.current={...dt.current}},onPanResponderMove:(e,C)=>{const T=ht.current,k=Kt.current.x+C.dx/T,P=Kt.current.y+C.dy/T,{maxX:B,maxY:W}=(()=>{const ee=ht.current;if(ee<=1)return{maxX:0,maxY:0};const tt=Rt.current.width,zt=Rt.current.height,Et=Pt.current.width,hi=Pt.current.height;return{maxX:Math.max(0,(tt*ee-Et)/2/ee),maxY:Math.max(0,(zt*ee-hi)/2/ee)}})(),X=Math.max(-B,Math.min(B,k)),J=Math.max(-W,Math.min(W,P));Oe.setValue({x:X,y:J})},onPanResponderRelease:()=>{const{maxX:e,maxY:C}=(()=>{const P=ht.current;if(P<=1)return{maxX:0,maxY:0};const B=Rt.current.width,W=Rt.current.height,X=Pt.current.width,J=Pt.current.height;return{maxX:Math.max(0,(B*P-X)/2/P),maxY:Math.max(0,(W*P-J)/2/P)}})(),T=dt.current,k={x:Math.max(-e,Math.min(e,T.x)),y:Math.max(-C,Math.min(C,T.y))};(k.x!==T.x||k.y!==T.y)&&Ht.spring(Oe,{toValue:k,friction:7,tension:60,useNativeDriver:!1}).start()},onPanResponderTerminate:()=>{}})).current;ci(()=>{if(ae<=1)Oe.setValue({x:0,y:0}),Kt.current={x:0,y:0};else{const e=Ko(dt.current.x,dt.current.y);(e.x!==dt.current.x||e.y!==dt.current.y)&&Ht.spring(Oe,{toValue:e,friction:7,tension:60,useNativeDriver:!1}).start()}},[ae,Oe,Ko]);const Qi=()=>{I("light"),xe(e=>Math.min(4,parseFloat((e+.25).toFixed(2))))},Ki=()=>{I("light"),xe(e=>Math.max(1,parseFloat((e-.25).toFixed(2))))},Jo=()=>{I("medium"),xe(1),Oe.setValue({x:0,y:0}),Kt.current={x:0,y:0}},ei=G(240),ti=ot(e=>{const C=Math.max(50,ei.current),T=Math.max(0,Math.min(1,e/C));if(je.current==="draw"){const k=lo.current;if(k==="brush"||k==="highlighter"||k==="arrow"||k==="rect"||k==="circle"||k==="spotlight"||k==="step"){const P=Math.round(2+T*22);Xi(P)}else if(k==="pixelate"){const P=Math.round(4+T*36);$i(P)}}else if(je.current==="adjust")if(He==="vignette"){const k=Math.round(T*100);kt(P=>({...P,vignette:k}))}else{const k=Math.round(T*100-50);kt(P=>({...P,[He]:k}))}else if(je.current==="crop"){const k=Math.round(T*360);Se(k)}else if(je.current==="trim"){const P=Math.round(T*(le||1e4));et==="start"?at(Math.min(pe-500,P)):st(Math.max(se+500,P))}else if(je.current==="audio"){const k=Math.round(T*100);io(k),Xt(k===0)}else if(je.current==="speed"){const k=parseFloat((.5+T*1.5).toFixed(2));ro(k)}else if(je.current==="gif"){const k=Math.round(6+T*18);Lo(k)}else if(je.current==="none"){const k=parseFloat((1+T*3).toFixed(2));xe(k)}},[He,le,et,se,pe]),Ji=G(Gt.create({onStartShouldSetPanResponder:()=>!0,onStartShouldSetPanResponderCapture:()=>!0,onMoveShouldSetPanResponder:()=>!0,onMoveShouldSetPanResponderCapture:()=>!0,onPanResponderGrant:e=>{I("light"),ti(e.nativeEvent.locationX)},onPanResponderMove:e=>{ti(e.nativeEvent.locationX)},onPanResponderRelease:()=>{I("light")}})).current,oi=eo(()=>{if(O==="draw"){if(D==="brush"||D==="highlighter"||D==="arrow"||D==="rect"||D==="circle"||D==="spotlight"||D==="step")return Math.min(100,Math.max(0,(Ie-2)/22*100));if(D==="pixelate")return Math.min(100,Math.max(0,(Ro-4)/36*100));if(D==="redact")return 100}return O==="adjust"?He==="vignette"?Math.min(100,Math.max(0,E.vignette)):Math.min(100,Math.max(0,E[He]+50)):O==="crop"?Math.min(100,Math.max(0,Z/360*100)):O==="trim"?Math.min(100,Math.max(0,(et==="start"?se:pe)/(le||1e4)*100)):O==="audio"?fe?0:Ze:O==="speed"?Math.min(100,Math.max(0,(Ge-.5)/1.5*100)):O==="gif"?Math.min(100,Math.max(0,(Yt-6)/18*100)):O==="none"?Math.min(100,Math.max(0,(ae-1)/3*100)):50},[O,D,Ie,Ro,He,E,Z,ae,le,et,se,pe,fe,Ze,Ge,Yt]),ii=ot(()=>{if(Ce.length===0)return;I("light");const e=Ce[Ce.length-1];Ft(C=>[...C,{uri:Y||M?.uri||null,inkPaths:[...oe],texts:[...ke],adjustments:{...E},filterPreset:K,showWatermark:Te,rotationAngle:Z,flipH:Me,flipV:ve,width:U,height:he,sizeBytes:be}]),rt(C=>C.slice(0,C.length-1)),e&&(ge(e.uri),Le(e.inkPaths),$e(e.texts),e.adjustments&&kt(e.adjustments),e.filterPreset&&jt(e.filterPreset),e.showWatermark!==void 0&&At(e.showWatermark),e.showGridlines!==void 0&&Ot(e.showGridlines),e.rotationAngle!==void 0&&Se(e.rotationAngle),e.flipH!==void 0&&Nt(e.flipH),e.flipV!==void 0&&Ut(e.flipV),e.width&&de(e.width),e.height&&ce(e.height),e.sizeBytes&&ne(e.sizeBytes),L(z("mediaGallery.undone","Action Undone")))},[Ce,Y,M?.uri,oe,ke,E,K,Te,ye,Z,Me,ve,U,he,be,z]),er=ot(()=>{if(Ee.length===0)return;I("light");const e=Ee[Ee.length-1];rt(C=>[...C,{uri:Y||M?.uri||null,inkPaths:[...oe],texts:[...ke],adjustments:{...E},filterPreset:K,showWatermark:Te,showGridlines:ye,rotationAngle:Z,flipH:Me,flipV:ve,width:U,height:he,sizeBytes:be}]),Ft(C=>C.slice(0,C.length-1)),e&&(ge(e.uri),Le(e.inkPaths),$e(e.texts),e.adjustments&&kt(e.adjustments),e.filterPreset&&jt(e.filterPreset),e.showWatermark!==void 0&&At(e.showWatermark),e.showGridlines!==void 0&&Ot(e.showGridlines),e.rotationAngle!==void 0&&Se(e.rotationAngle),e.flipH!==void 0&&Nt(e.flipH),e.flipV!==void 0&&Ut(e.flipV),e.width&&de(e.width),e.height&&ce(e.height),e.sizeBytes&&ne(e.sizeBytes),L(z("mediaGallery.redone","Action Redone")))},[Ee,Y,M?.uri,oe,ke,E,K,Te,ye,Z,Me,ve,U,he,be,z]),tr=ot(()=>{M&&(I("medium"),re(),ge(M.uri),Le([]),$e([]),kt({brightness:0,contrast:0,saturation:0,warmth:0,exposure:0,vignette:0}),jt("none"),At(!1),Ot(!1),Se(0),Nt(!1),Ut(!1),de(M.width),ce(M.height),ne(M.sizeBytes),Ke(M.durationMs),xe(1),_("none"),at(0),st(M.durationMs||1e4),oo("end"),Xt(!1),io(100),ro(1),L(z("mediaGallery.resetSuccess",M.type==="video"?"Reset to original video":"Reset to original image")))},[M,re,z]),ri=ot(async()=>{if(!(!M||!q)){if(I("medium"),Q(!0),j){try{const e=le||M.durationMs||1e4,C=await Mt.trimVideo({uri:q,startTimeMs:se,endTimeMs:pe<e?pe:void 0,muteAudio:fe||Ze===0,quality:"high"});C?.uri?(ge(C.uri),C.width&&de(C.width),C.height&&ce(C.height),C.size&&ne(C.size),C.durationMs&&Ke(C.durationMs),L(z("mediaGallery.videoSaved","Video Saved Successfully")),We?.refreshMediaCount?.().catch(()=>{})):L(z("mediaGallery.videoSaved","Video Saved"))}catch{L(z("mediaGallery.saveFailed","Failed to save video"))}finally{Q(!1)}return}try{const e=Math.max(1,Re||1e3),C=Math.max(1,Pe||1e3),T=oe.filter(B=>(B.type==="redact"||B.type==="pixelate")&&B.rect).map(B=>{const W=B.rect;return{x:W.x/e,y:W.y/C,width:W.width/e,height:W.height/C,style:B.type==="pixelate"?"blur":"blackout",isNormalized:!0}}),k=[...ke.map(B=>({x:B.x,y:B.y,width:.22,height:.06,color:B.bgColor||"#EF4444",label:B.text,isNormalized:!0})),...oe.filter(B=>B.type==="rect"||B.type==="arrow"||B.type==="circle").map(B=>{const W=B.points[0]||{x:0,y:0},X=B.points[B.points.length-1]||W,J=Math.min(W.x,X.x),ee=Math.min(W.y,X.y),tt=Math.max(10,Math.abs(X.x-W.x)),zt=Math.max(10,Math.abs(X.y-W.y));return{x:J/e,y:ee/C,width:tt/e,height:zt/C,color:B.color||"#EF4444",isNormalized:!0}})],P=await Mt.editPhoto({uri:q,rotation:Z!==0?Z:void 0,flipHorizontal:Me,flipVertical:ve,adjustments:{brightness:E.brightness/50,contrast:1+E.contrast/50,saturation:1+E.saturation/50,temperature:E.warmth/50,vignette:E.vignette/100},filterPreset:K!=="none"?K:void 0,redactions:T.length>0?T:void 0,annotations:k.length>0?k:void 0,format:M.format==="png"?"png":"jpeg",quality:.92});P?.uri?(ge(P.uri),P.width&&de(P.width),P.height&&ce(P.height),P.size&&ne(P.size),Le([]),$e([]),kt({brightness:0,contrast:0,saturation:0,warmth:0,exposure:0,vignette:0}),Se(0),Nt(!1),Ut(!1),L(z("mediaGallery.savedSuccess","Image Saved Successfully")),We?.refreshMediaCount?.().catch(()=>{})):L(z("mediaGallery.savedSuccess","Image Saved"))}catch{L(z("mediaGallery.saveFailed","Failed to save image"))}finally{Q(!1)}}},[M,q,j,le,se,pe,fe,Ze,Re,Pe,Z,Me,ve,E,K,oe,ke,We,z]),ni=ot(async()=>{if(!(!M||!q||!j||me)){I("medium"),Q(!0);try{const e=await Mt.generateFilmstrip({uri:q,count:1,targetWidth:Re||1080,targetHeight:Pe||1920});e?.thumbnails&&e.thumbnails.length>0?(L(z("mediaGallery.snapshotSaved","Frame Snapshot Saved (PNG)")),We?.refreshMediaCount?.().catch(()=>{})):L(z("mediaGallery.snapshotFailed","Failed to snapshot frame"))}catch{L(z("mediaGallery.snapshotFailed","Failed to snapshot frame"))}finally{Q(!1)}}},[M,q,j,me,Re,Pe,We,z]),or=eo(()=>{if(!j||!M)return!1;const e=M.durationMs||1e4,C=se>0||pe<e,T=fe||Ze<100,k=Ge!==1,P=Y!=null&&Y!==M.uri;return C||T||k||P},[j,M,se,pe,fe,Ze,Ge,Y]),ai=eo(()=>{if(!M)return!1;const e=Y!=null&&Y!==M.uri,C=oe.length>0,T=ke.length>0,k=Ce.length>0,P=E.brightness!==0||E.contrast!==0||E.saturation!==0||E.warmth!==0||E.exposure!==0||E.vignette!==0;return e||C||T||k||P||(Z!==0||Me||ve)||K!=="none"||Te||ye},[Y,M,oe.length,ke.length,Ce.length,E,Z,Me,ve,K,Te,ye]),ir=()=>{I("light"),ii()},rr=()=>{I("medium"),re(),Le([])},Sn=e=>{I("light"),_("crop"),_t(e),St(Vt(e,Re,Pe))},si=async()=>{if(!(!q||!ie)){I("medium"),re(),Q(!0);try{const e=await Mt.cropToDefect(q,{x:Zt.x,y:Zt.y,width:Zt.width,height:Zt.height,isNormalized:!0});e?.uri?(ge(e.uri),e.width&&de(e.width),e.height&&ce(e.height),e.size&&ne(e.size),St(Vt("free",e.width,e.height)),_t("free"),L(z("mediaGallery.croppedSuccess","Image Cropped")),_("none")):L(z("mediaGallery.cropFailed","Crop failed"))}catch{L(z("mediaGallery.cropFailed","Crop failed"))}finally{Q(!1)}}},Bo=e=>{I("light"),e?(Yo(e),ao(e.text)):(Yo(null),ao("")),Qt(!0)},nr=e=>{I("light"),re(),$e(C=>C.filter(T=>T.id!==e))},ar=()=>{if(!no.trim()){Qt(!1);return}if(re(),Xo)$e(e=>e.map(C=>C.id===Xo.id?{...C,text:no.trim(),color:Fe}:C));else{const e={id:`text_${Date.now()}`,text:no.trim(),x:so.x,y:so.y,color:S.white,bgColor:Fe==="#FFFFFF"?"#0F172A":Fe};$e(C=>[...C,e])}Qt(!1),ao(""),L(z("mediaGallery.textAdded","Text Added"))},Rn=async e=>{if(!(!q||!ie||me)){I("medium"),re(),Q(!0);try{const C=await Mt.editPhoto({uri:q,quality:.85,crop:{x:0,y:0,width:1,height:1,isNormalized:!0}});if(C?.uri){ge(C.uri);const T=Math.round((Re||1080)*e),k=Math.round((Pe||1920)*e);de(T),ce(k),C.size&&ne(Math.round(C.size*e*e)),L(z("mediaGallery.resizedSuccess",`Resized to ${Math.round(e*100)}% (${T}\xD7${k})`)),_("none")}}catch{L(z("mediaGallery.resizeFailed","Resize failed"))}finally{Q(!1)}}},sr=async()=>{try{I("light");const e=q.startsWith("file://")||q.startsWith("content://")||q.startsWith("http")?q:`file://${q}`,C=to.select({ios:{url:e,title:M.filename},default:{title:M.filename,message:M.filename,url:e}});(await Mi.share(C)).action===Mi.sharedAction&&L(z("mediaGallery.shareSuccess","Shared successfully"))}catch(e){e?.message!=="User did not share"&&L(z("mediaGallery.shareUnavailable","Sharing not available on this device"))}},lr=()=>{I("medium"),Je(!0)},li=async()=>{if(vt){Ne(!0);try{await vt(M),L(z("mediaGallery.convertedSuccess","Converted to GIF!"))}catch{L(z("mediaGallery.convertFailed","Conversion failed"))}finally{Ne(!1)}}},Io=async()=>{try{Xe(!0),await Jr.playVideo(q)}catch{L(z("mediaGallery.playError","Unable to play video"))}finally{Xe(!1)}},Pn=async()=>{if(!(!q||!j||me)){Q(!0),I("light");try{const C=Math.min(le||1e4,5e3),T=await Mt.trimReproClip(q,0,C,{quality:"medium"});T?.uri&&(ge(T.uri),T.width&&de(T.width),T.height&&ce(T.height),T.size&&ne(T.size),T.durationMs&&Ke(T.durationMs),L(z("mediaGallery.trimmedSuccess","Trimmed to 5s Repro Clip")))}catch{L(z("mediaGallery.trimFailed","Trim failed"))}finally{Q(!1)}}},dr=async()=>{if(!(!q||!j||me)){Q(!0),I("light");try{const e=await Mt.muteVideo(q);e?.uri&&(ge(e.uri),e.width&&de(e.width),e.height&&ce(e.height),e.size&&ne(e.size),e.durationMs&&Ke(e.durationMs),L(z("mediaGallery.mutedSuccess","Audio Stripped")))}catch{L(z("mediaGallery.muteFailed","Mute failed"))}finally{Q(!1)}}},Jt=le?(le/1e3).toFixed(1):null,di=Jt?`00:${Number(Jt)<10?"0":""}${Jt}`:null,hr=[{key:"none",label:z("mediaGallery.preview","Preview"),themeColor:S.brandPurple,icon:e=><Ii size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"crop",label:"Crop",themeColor:S.sky600,icon:e=><Bi size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"adjust",label:"Adjust",themeColor:S.amber500,icon:e=><Wi size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"draw",label:"Markup",themeColor:S.sky400,icon:e=><Eo size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"text",label:"Text",themeColor:S.violet600,icon:e=><Vi size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>}],cr=[{key:"none",label:z("mediaGallery.preview","Player"),themeColor:S.brandPurple,icon:e=><Ii size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"trim",label:z("media.trim","Trim"),themeColor:S.sky600,icon:e=><Di size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>,hasBadge:se>0||pe<(le||1e4)},{key:"audio",label:z("media.audio","Audio"),themeColor:S.amber600,icon:e=><So size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>,hasBadge:fe||Ze<100},{key:"speed",label:z("media.speed","Speed"),themeColor:S.violet600,icon:e=><Go size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>,hasBadge:Ge!==1},{key:"gif",label:z("media.toGif","To GIF"),themeColor:S.emerald500,icon:e=><Wo size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"snapshot",label:z("media.snapshot","Snapshot"),themeColor:S.pink500,icon:e=><Fo size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>}];return!M||!De?null:<Ci visible={De}transparent={!0}animationType="fade"statusBarTranslucent={!0}onRequestClose={we}>
|
|
68
68
|
<F style={t.modalBackdrop}>
|
|
69
|
-
<Oo style={t.modalBackdropPressable}onPress={
|
|
69
|
+
<Oo style={t.modalBackdropPressable}onPress={we}/>
|
|
70
70
|
<F style={[t.modalContentCard,{height:`${te}%`,borderTopLeftRadius:te>=100?0:20,borderTopRightRadius:te>=100?0:20}]}>
|
|
71
71
|
<Fi translucent backgroundColor="transparent"barStyle="light-content"/>
|
|
72
72
|
|
|
@@ -75,9 +75,9 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
75
75
|
<F style={t.headerInner}>
|
|
76
76
|
|
|
77
77
|
<F style={t.headerLeft}>
|
|
78
|
-
<
|
|
78
|
+
<Tt accessible={!0}accessibilityRole="button"accessibilityLabel={z("common.back","Back")}onPress={we}hitSlop={15}style={t.headerBackBtn}>
|
|
79
79
|
<Nr size={17}/>
|
|
80
|
-
</
|
|
80
|
+
</Tt>
|
|
81
81
|
<F style={t.headerTextCol}>
|
|
82
82
|
<F style={t.headerTitleRow}>
|
|
83
83
|
<R style={t.title}numberOfLines={1}>
|
|
@@ -93,10 +93,10 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
93
93
|
<R style={t.subtitleDim}numberOfLines={1}>
|
|
94
94
|
{Re&&Pe?`${Re} \xD7 ${Pe}`:ie?"1320 \xD7 2868":"1080 \xD7 1920"}
|
|
95
95
|
</R>
|
|
96
|
-
{
|
|
96
|
+
{qo?<>
|
|
97
97
|
<R style={t.subtitleDot}>•</R>
|
|
98
98
|
<R style={t.subtitleSize}>
|
|
99
|
-
{
|
|
99
|
+
{Hi(qo)}
|
|
100
100
|
</R>
|
|
101
101
|
</>:<>
|
|
102
102
|
<R style={t.subtitleDot}>•</R>
|
|
@@ -110,78 +110,83 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
110
110
|
<F style={t.headerRight}>
|
|
111
111
|
|
|
112
112
|
{ie&&<F style={t.undoRedoGroup}>
|
|
113
|
-
<A accessible={!0}accessibilityRole="button"accessibilityLabel={
|
|
114
|
-
<
|
|
113
|
+
<A accessible={!0}accessibilityRole="button"accessibilityLabel={z("common.undo","Undo")}onPress={ii}disabled={Ce.length===0}style={[t.undoHalfBtn,Ce.length===0&&t.actionDisabled]}hitSlop={{top:8,bottom:8,left:6,right:4}}>
|
|
114
|
+
<Ei size={14}color={Ce.length>0?S.white:"rgba(255, 255, 255, 0.35)"}/>
|
|
115
115
|
</A>
|
|
116
116
|
<F style={t.undoDivider}/>
|
|
117
|
-
<A accessible={!0}accessibilityRole="button"accessibilityLabel="Redo"onPress={
|
|
117
|
+
<A accessible={!0}accessibilityRole="button"accessibilityLabel="Redo"onPress={er}disabled={Ee.length===0}style={[t.redoHalfBtn,Ee.length===0&&t.actionDisabled]}hitSlop={{top:8,bottom:8,left:4,right:6}}>
|
|
118
118
|
<Er size={14}color={Ee.length>0?S.white:"rgba(255, 255, 255, 0.35)"}/>
|
|
119
119
|
</A>
|
|
120
120
|
</F>}
|
|
121
121
|
|
|
122
122
|
|
|
123
|
-
<
|
|
123
|
+
<Tt accessible={!0}accessibilityRole="button"accessibilityLabel="More Options"onPress={()=>{I("light"),nt(e=>!e)}}style={t.headerMoreBtn}hitSlop={{top:8,bottom:8,left:6,right:6}}>
|
|
124
124
|
<Dr size={16}color={S.white}/>
|
|
125
|
-
</
|
|
125
|
+
</Tt>
|
|
126
126
|
|
|
127
127
|
|
|
128
|
-
<
|
|
128
|
+
<Tt accessible={!0}accessibilityRole="button"accessibilityLabel={z("common.save","Save")}onPress={ri}disabled={me}style={[t.headerSaveBtn,me&&{opacity:.6}]}hitSlop={{top:8,bottom:8,left:6,right:6}}>
|
|
129
129
|
<Gr size={14}color={S.white}/>
|
|
130
|
-
<R style={t.headerSaveText}>{
|
|
131
|
-
</
|
|
130
|
+
<R style={t.headerSaveText}>{z("common.save","Save")}</R>
|
|
131
|
+
</Tt>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
<Tt accessible={!0}accessibilityRole="button"accessibilityLabel={z("common.close","Close")}onPress={we}style={t.headerCloseBtn}hitSlop={{top:8,bottom:8,left:6,right:6}}>
|
|
135
|
+
<Do size={15}color={S.white}/>
|
|
136
|
+
</Tt>
|
|
132
137
|
</F>
|
|
133
138
|
</F>
|
|
134
139
|
</F>
|
|
135
140
|
|
|
136
141
|
|
|
137
|
-
{
|
|
138
|
-
{(ie&&
|
|
139
|
-
<
|
|
142
|
+
{Li&&<F style={t.moreMenuDropdown}>
|
|
143
|
+
{(ie&&ai||j&&or)&&<A onPress={()=>{nt(!1),tr()}}style={t.moreMenuItem}>
|
|
144
|
+
<Oi size={14}color={S.sky400}/>
|
|
140
145
|
<R style={t.moreMenuItemText}>
|
|
141
|
-
{
|
|
146
|
+
{z("common.reset","Reset to Original")}
|
|
142
147
|
</R>
|
|
143
148
|
</A>}
|
|
144
|
-
{ie&&<A onPress={()=>{
|
|
145
|
-
<
|
|
149
|
+
{ie&&<A onPress={()=>{I("light"),Ot(e=>!e),nt(!1)}}style={t.moreMenuItem}>
|
|
150
|
+
<Vo size={14}color={ye?S.sky400:S.white}/>
|
|
146
151
|
<R style={t.moreMenuItemText}>
|
|
147
|
-
{ye?
|
|
152
|
+
{ye?z("mediaGallery.hideGridlines","Hide Instagram Grid (3\xD73)"):z("mediaGallery.showGridlines","Show Instagram Grid (3\xD73)")}
|
|
148
153
|
</R>
|
|
149
154
|
</A>}
|
|
150
|
-
{ie&&<A onPress={()=>{
|
|
155
|
+
{ie&&<A onPress={()=>{I("light"),re(),At(e=>!e),nt(!1)}}style={t.moreMenuItem}>
|
|
151
156
|
<R style={t.moreMenuItemIconText}>🛡</R>
|
|
152
157
|
<R style={t.moreMenuItemText}>
|
|
153
|
-
{
|
|
158
|
+
{Te?z("mediaGallery.hideWatermark","Hide QA Watermark"):z("mediaGallery.showWatermark","Show QA Watermark")}
|
|
154
159
|
</R>
|
|
155
160
|
</A>}
|
|
156
|
-
{j&&<A onPress={()=>{nt(!1),
|
|
157
|
-
<
|
|
161
|
+
{j&&<A onPress={()=>{nt(!1),li()}}style={t.moreMenuItem}>
|
|
162
|
+
<Wo size={14}color={S.violet600}/>
|
|
158
163
|
<R style={t.moreMenuItemText}>
|
|
159
|
-
{
|
|
164
|
+
{z("mediaGallery.exportGif","Export as Animated GIF")}
|
|
160
165
|
</R>
|
|
161
166
|
</A>}
|
|
162
|
-
{j&&<A onPress={()=>{nt(!1),
|
|
167
|
+
{j&&<A onPress={()=>{nt(!1),ni()}}style={t.moreMenuItem}>
|
|
163
168
|
<Fo size={14}color={S.sky400}/>
|
|
164
169
|
<R style={t.moreMenuItemText}>
|
|
165
|
-
{
|
|
170
|
+
{z("mediaGallery.snapshotFrame","Snapshot Frame (PNG)")}
|
|
166
171
|
</R>
|
|
167
172
|
</A>}
|
|
168
|
-
<A onPress={()=>{nt(!1),
|
|
173
|
+
<A onPress={()=>{nt(!1),sr()}}style={t.moreMenuItem}>
|
|
169
174
|
<Lr size={14}color={S.white}/>
|
|
170
175
|
<R style={t.moreMenuItemText}>
|
|
171
|
-
{
|
|
176
|
+
{z("mediaGallery.share",j?"Share Video":"Share Image")}
|
|
172
177
|
</R>
|
|
173
178
|
</A>
|
|
174
|
-
<A onPress={()=>{nt(!1),
|
|
179
|
+
<A onPress={()=>{nt(!1),lr()}}style={[t.moreMenuItem,t.moreMenuItemDestructive]}>
|
|
175
180
|
<$r size={14}color={S.rose500}/>
|
|
176
181
|
<R style={[t.moreMenuItemText,{color:S.rose500}]}>
|
|
177
|
-
{
|
|
182
|
+
{z("mediaGallery.delete","Delete Media")}
|
|
178
183
|
</R>
|
|
179
184
|
</A>
|
|
180
185
|
</F>}
|
|
181
186
|
|
|
182
187
|
|
|
183
188
|
<F style={t.stageWrapper}>
|
|
184
|
-
<F onLayout={e=>{const{width:C,height:T}=e.nativeEvent.layout;C>20&&T>20&&
|
|
189
|
+
<F onLayout={e=>{const{width:C,height:T}=e.nativeEvent.layout;C>20&&T>20&&Zo(k=>({...k,width:C,height:T}))}}style={t.previewCard}>
|
|
185
190
|
{j?M.thumbnailUri&&!Ue?<>
|
|
186
191
|
<Co source={{uri:M.thumbnailUri}}style={t.image}resizeMode="contain"onError={()=>ze(!0)}/>
|
|
187
192
|
<F style={t.videoImageOverlay}/>
|
|
@@ -192,11 +197,11 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
192
197
|
{M.width&&M.height?`${M.width} \xD7 ${M.height}`:"HD Video Recording"}
|
|
193
198
|
</R>
|
|
194
199
|
<R style={t.videoFallbackSubtitle}>
|
|
195
|
-
{
|
|
196
|
-
{
|
|
200
|
+
{Jt?`${Jt}s duration`:"MP4 Video"} •{" "}
|
|
201
|
+
{Hi(M.sizeBytes)}
|
|
197
202
|
</R>
|
|
198
|
-
</F>:<
|
|
199
|
-
<F style={[t.imageCanvasWrapper,{width:Ae.width,height:Ae.height,transform:[{rotate:`${Z}deg`},{scaleX:
|
|
203
|
+
</F>:<Ht.View onLayout={e=>{const{width:C,height:T}=e.nativeEvent.layout;C>20&&T>20&&Zo(k=>({...k,width:C,height:T}))}}style={[t.canvasContainer,{transform:[...Oe.getTranslateTransform(),{scale:ae}]}]}{...O==="draw"?Zi.panHandlers:O==="none"&&ae>1?qi.panHandlers:{}}>
|
|
204
|
+
<F style={[t.imageCanvasWrapper,{width:Ae.width,height:Ae.height,transform:[{rotate:`${Z}deg`},{scaleX:Me?-1:1},{scaleY:ve?-1:1}]}]}>
|
|
200
205
|
|
|
201
206
|
<Co key={Be?M?.uri:q}source={{uri:Be?M?.uri:q}}style={t.image}resizeMode="cover"onError={()=>ze(!0)}/>
|
|
202
207
|
|
|
@@ -229,61 +234,61 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
229
234
|
{!Be&&<Fr style={N.absoluteFill}pointerEvents={O==="draw"?"auto":"none"}>
|
|
230
235
|
<Ct>
|
|
231
236
|
|
|
232
|
-
{oe.map(e=>{if(e.type==="brush"){if(e.points.length<2)return null;const C=e.points.reduce((T,k,P)=>P===0?`M ${k.x} ${k.y}`:`${T} L ${k.x} ${k.y}`,"");return<Mo key={e.id}d={C}stroke={e.color}strokeWidth={e.strokeWidth}strokeLinecap="round"strokeLinejoin="round"fill="none"/>}if(e.type==="highlighter"){if(e.points.length<2)return null;const C=e.points.reduce((T,k,P)=>P===0?`M ${k.x} ${k.y}`:`${T} L ${k.x} ${k.y}`,"");return<Mo key={e.id}d={C}stroke={e.color}strokeWidth={e.strokeWidth*2.5}strokeOpacity={.4}strokeLinecap="round"strokeLinejoin="round"fill="none"/>}if(e.type==="arrow"){if(e.points.length<2)return null;const C=e.points[0],T=e.points[1],k=T.x-C.x,P=T.y-C.y,
|
|
233
|
-
|
|
234
|
-
<Ri points={`${T.x},${T.y} ${J},${ee} ${tt},${
|
|
235
|
-
</Ct>}if(e.type==="rect"){const C=e.rect||{x:Math.min(e.points[0]?.x||0,e.points[1]?.x||0),y:Math.min(e.points[0]?.y||0,e.points[1]?.y||0),width:Math.abs((e.points[1]?.x||0)-(e.points[0]?.x||0)),height:Math.abs((e.points[1]?.y||0)-(e.points[0]?.y||0))};return
|
|
236
|
-
<To cx={k+
|
|
237
|
+
{oe.map(e=>{if(e.type==="brush"){if(e.points.length<2)return null;const C=e.points.reduce((T,k,P)=>P===0?`M ${k.x} ${k.y}`:`${T} L ${k.x} ${k.y}`,"");return<Mo key={e.id}d={C}stroke={e.color}strokeWidth={e.strokeWidth}strokeLinecap="round"strokeLinejoin="round"fill="none"/>}if(e.type==="highlighter"){if(e.points.length<2)return null;const C=e.points.reduce((T,k,P)=>P===0?`M ${k.x} ${k.y}`:`${T} L ${k.x} ${k.y}`,"");return<Mo key={e.id}d={C}stroke={e.color}strokeWidth={e.strokeWidth*2.5}strokeOpacity={.4}strokeLinecap="round"strokeLinejoin="round"fill="none"/>}if(e.type==="arrow"){if(e.points.length<2)return null;const C=e.points[0],T=e.points[1],k=T.x-C.x,P=T.y-C.y,B=Math.atan2(P,k),W=Math.min(28,Math.max(14,e.strokeWidth*3.5)),X=Math.PI/6,J=T.x-W*Math.cos(B-X),ee=T.y-W*Math.sin(B-X),tt=T.x-W*Math.cos(B+X),zt=T.y-W*Math.sin(B+X);return<Ct key={e.id}>
|
|
238
|
+
<Lt x1={C.x}y1={C.y}x2={T.x}y2={T.y}stroke={e.color}strokeWidth={e.strokeWidth}strokeLinecap="round"/>
|
|
239
|
+
<Ri points={`${T.x},${T.y} ${J},${ee} ${tt},${zt}`}fill={e.color}/>
|
|
240
|
+
</Ct>}if(e.type==="rect"){const C=e.rect||{x:Math.min(e.points[0]?.x||0,e.points[1]?.x||0),y:Math.min(e.points[0]?.y||0,e.points[1]?.y||0),width:Math.abs((e.points[1]?.x||0)-(e.points[0]?.x||0)),height:Math.abs((e.points[1]?.y||0)-(e.points[0]?.y||0))};return<$t key={e.id}x={C.x}y={C.y}width={C.width}height={C.height}stroke={e.color}strokeWidth={e.strokeWidth}rx={6}ry={6}fill="none"/>}if(e.type==="circle"){const C=e.points[0]||{x:0,y:0},T=e.points[1]||C,k=Math.min(C.x,T.x),P=Math.min(C.y,T.y),B=Math.max(10,Math.abs(T.x-C.x)),W=Math.max(10,Math.abs(T.y-C.y));return<To key={e.id}cx={k+B/2}cy={P+W/2}rx={B/2}ry={W/2}stroke={e.color}strokeWidth={e.strokeWidth}fill="none"/>}if(e.type==="spotlight"){const C=e.points[0]||{x:0,y:0},T=e.points[1]||C,k=Math.min(C.x,T.x),P=Math.min(C.y,T.y),B=Math.max(16,Math.abs(T.x-C.x)),W=Math.max(16,Math.abs(T.y-C.y));return<Ct key={e.id}>
|
|
241
|
+
<To cx={k+B/2}cy={P+W/2}rx={B/2}ry={W/2}stroke="#FBBF24"strokeWidth={2.5}strokeDasharray="5,3"fill="rgba(255, 255, 255, 0.15)"/>
|
|
237
242
|
</Ct>}if(e.type==="step"){const C=e.points[0]||{x:0,y:0},T=Math.max(12,Math.min(20,e.strokeWidth*2.2+8));return<Ct key={e.id}>
|
|
238
243
|
<Si cx={C.x}cy={C.y}r={T}fill={e.color||"#EF4444"}stroke="#FFFFFF"strokeWidth={1.5}/>
|
|
239
244
|
<Pi x={C.x}y={C.y+T*.35}fill="#FFFFFF"fontSize={Math.round(T*.95)}fontWeight="bold"textAnchor="middle">
|
|
240
245
|
{e.stepNumber||1}
|
|
241
246
|
</Pi>
|
|
242
|
-
</Ct>}if(e.type==="redact"){const C=e.rect||{x:Math.min(e.points[0]?.x||0,e.points[1]?.x||0),y:Math.min(e.points[0]?.y||0,e.points[1]?.y||0),width:Math.abs((e.points[1]?.x||0)-(e.points[0]?.x||0)),height:Math.abs((e.points[1]?.y||0)-(e.points[0]?.y||0))};return
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
247
|
+
</Ct>}if(e.type==="redact"){const C=e.rect||{x:Math.min(e.points[0]?.x||0,e.points[1]?.x||0),y:Math.min(e.points[0]?.y||0,e.points[1]?.y||0),width:Math.abs((e.points[1]?.x||0)-(e.points[0]?.x||0)),height:Math.abs((e.points[1]?.y||0)-(e.points[0]?.y||0))};return<$t key={e.id}x={C.x}y={C.y}width={C.width}height={C.height}fill="#000000"rx={4}ry={4}/>}if(e.type==="pixelate"){const C=e.rect||{x:Math.min(e.points[0]?.x||0,e.points[1]?.x||0),y:Math.min(e.points[0]?.y||0,e.points[1]?.y||0),width:Math.abs((e.points[1]?.x||0)-(e.points[0]?.x||0)),height:Math.abs((e.points[1]?.y||0)-(e.points[0]?.y||0))};return<Ct key={e.id}>
|
|
248
|
+
<$t x={C.x}y={C.y}width={C.width}height={C.height}fill="rgba(255,255,255,0.22)"stroke="rgba(255,255,255,0.5)"strokeWidth={1.5}strokeDasharray="4,4"rx={4}ry={4}/>
|
|
249
|
+
<Lt x1={C.x}y1={C.y+C.height*.33}x2={C.x+C.width}y2={C.y+C.height*.33}stroke="rgba(255,255,255,0.35)"strokeWidth={1}/>
|
|
250
|
+
<Lt x1={C.x}y1={C.y+C.height*.66}x2={C.x+C.width}y2={C.y+C.height*.66}stroke="rgba(255,255,255,0.35)"strokeWidth={1}/>
|
|
251
|
+
<Lt x1={C.x+C.width*.33}y1={C.y}x2={C.x+C.width*.33}y2={C.y+C.height}stroke="rgba(255,255,255,0.35)"strokeWidth={1}/>
|
|
252
|
+
<Lt x1={C.x+C.width*.66}y1={C.y}x2={C.x+C.width*.66}y2={C.y+C.height}stroke="rgba(255,255,255,0.35)"strokeWidth={1}/>
|
|
248
253
|
</Ct>}return null})}
|
|
249
254
|
|
|
250
255
|
|
|
251
256
|
{H&&H.length>0&&<>
|
|
252
|
-
{D==="brush"&&H.length>1&&<Mo d={H.reduce((e,C,T)=>T===0?`M ${C.x} ${C.y}`:`${e} L ${C.x} ${C.y}`,"")}stroke={
|
|
257
|
+
{D==="brush"&&H.length>1&&<Mo d={H.reduce((e,C,T)=>T===0?`M ${C.x} ${C.y}`:`${e} L ${C.x} ${C.y}`,"")}stroke={Fe}strokeWidth={Ie}strokeLinecap="round"strokeLinejoin="round"fill="none"/>}
|
|
253
258
|
|
|
254
|
-
{D==="highlighter"&&H.length>1&&<Mo d={H.reduce((e,C,T)=>T===0?`M ${C.x} ${C.y}`:`${e} L ${C.x} ${C.y}`,"")}stroke={
|
|
259
|
+
{D==="highlighter"&&H.length>1&&<Mo d={H.reduce((e,C,T)=>T===0?`M ${C.x} ${C.y}`:`${e} L ${C.x} ${C.y}`,"")}stroke={Fe}strokeWidth={Ie*2.5}strokeOpacity={.4}strokeLinecap="round"strokeLinejoin="round"fill="none"/>}
|
|
255
260
|
|
|
256
|
-
{D==="arrow"&&H.length>1&&(()=>{const e=H[0],C=H[H.length-1],T=C.x-e.x,k=C.y-e.y,P=Math.atan2(k,T),
|
|
257
|
-
|
|
258
|
-
<Ri points={`${C.x},${C.y} ${X},${J} ${ee},${tt}`}fill={
|
|
261
|
+
{D==="arrow"&&H.length>1&&(()=>{const e=H[0],C=H[H.length-1],T=C.x-e.x,k=C.y-e.y,P=Math.atan2(k,T),B=Math.min(28,Math.max(14,Ie*3.5)),W=Math.PI/6,X=C.x-B*Math.cos(P-W),J=C.y-B*Math.sin(P-W),ee=C.x-B*Math.cos(P+W),tt=C.y-B*Math.sin(P+W);return<Ct>
|
|
262
|
+
<Lt x1={e.x}y1={e.y}x2={C.x}y2={C.y}stroke={Fe}strokeWidth={Ie}strokeLinecap="round"/>
|
|
263
|
+
<Ri points={`${C.x},${C.y} ${X},${J} ${ee},${tt}`}fill={Fe}/>
|
|
259
264
|
</Ct>})()}
|
|
260
265
|
|
|
261
|
-
{D==="rect"&&H.length>1&&(()=>{const e=H[0],C=H[H.length-1],T=Math.min(e.x,C.x),k=Math.min(e.y,C.y),P=Math.abs(C.x-e.x),
|
|
266
|
+
{D==="rect"&&H.length>1&&(()=>{const e=H[0],C=H[H.length-1],T=Math.min(e.x,C.x),k=Math.min(e.y,C.y),P=Math.abs(C.x-e.x),B=Math.abs(C.y-e.y);return<$t x={T}y={k}width={P}height={B}stroke={Fe}strokeWidth={Ie}rx={6}ry={6}fill="none"/>})()}
|
|
262
267
|
|
|
263
|
-
{D==="circle"&&H.length>1&&(()=>{const e=H[0],C=H[H.length-1],T=Math.min(e.x,C.x),k=Math.min(e.y,C.y),P=Math.max(10,Math.abs(C.x-e.x)),
|
|
268
|
+
{D==="circle"&&H.length>1&&(()=>{const e=H[0],C=H[H.length-1],T=Math.min(e.x,C.x),k=Math.min(e.y,C.y),P=Math.max(10,Math.abs(C.x-e.x)),B=Math.max(10,Math.abs(C.y-e.y));return<To cx={T+P/2}cy={k+B/2}rx={P/2}ry={B/2}stroke={Fe}strokeWidth={Ie}fill="none"/>})()}
|
|
264
269
|
|
|
265
|
-
{D==="spotlight"&&H.length>1&&(()=>{const e=H[0],C=H[H.length-1],T=Math.min(e.x,C.x),k=Math.min(e.y,C.y),P=Math.max(16,Math.abs(C.x-e.x)),
|
|
266
|
-
<To cx={T+P/2}cy={k+
|
|
270
|
+
{D==="spotlight"&&H.length>1&&(()=>{const e=H[0],C=H[H.length-1],T=Math.min(e.x,C.x),k=Math.min(e.y,C.y),P=Math.max(16,Math.abs(C.x-e.x)),B=Math.max(16,Math.abs(C.y-e.y));return<Ct>
|
|
271
|
+
<To cx={T+P/2}cy={k+B/2}rx={P/2}ry={B/2}stroke="#FBBF24"strokeWidth={2.5}strokeDasharray="5,3"fill="rgba(255, 255, 255, 0.15)"/>
|
|
267
272
|
</Ct>})()}
|
|
268
273
|
|
|
269
274
|
{D==="step"&&H.length>0&&(()=>{const e=H[0],C=oe.filter(k=>k.type==="step").length,T=Math.max(12,Math.min(20,Ie*2.2+8));return<Ct>
|
|
270
|
-
<Si cx={e.x}cy={e.y}r={T}fill={
|
|
275
|
+
<Si cx={e.x}cy={e.y}r={T}fill={Fe||"#EF4444"}stroke="#FFFFFF"strokeWidth={1.5}/>
|
|
271
276
|
<Pi x={e.x}y={e.y+T*.35}fill="#FFFFFF"fontSize={Math.round(T*.95)}fontWeight="bold"textAnchor="middle">
|
|
272
277
|
{C+1}
|
|
273
278
|
</Pi>
|
|
274
279
|
</Ct>})()}
|
|
275
280
|
|
|
276
|
-
{D==="redact"&&H.length>1&&(()=>{const e=H[0],C=H[H.length-1],T=Math.min(e.x,C.x),k=Math.min(e.y,C.y),P=Math.abs(C.x-e.x),
|
|
281
|
+
{D==="redact"&&H.length>1&&(()=>{const e=H[0],C=H[H.length-1],T=Math.min(e.x,C.x),k=Math.min(e.y,C.y),P=Math.abs(C.x-e.x),B=Math.abs(C.y-e.y);return<$t x={T}y={k}width={P}height={B}fill="#000000"stroke="rgba(255,255,255,0.4)"strokeWidth={1}strokeDasharray="3,3"rx={4}ry={4}/>})()}
|
|
277
282
|
|
|
278
|
-
{D==="pixelate"&&H.length>1&&(()=>{const e=H[0],C=H[H.length-1],T=Math.min(e.x,C.x),k=Math.min(e.y,C.y),P=Math.abs(C.x-e.x),
|
|
283
|
+
{D==="pixelate"&&H.length>1&&(()=>{const e=H[0],C=H[H.length-1],T=Math.min(e.x,C.x),k=Math.min(e.y,C.y),P=Math.abs(C.x-e.x),B=Math.abs(C.y-e.y);return<$t x={T}y={k}width={P}height={B}fill="rgba(255,255,255,0.22)"stroke="rgba(255,255,255,0.6)"strokeWidth={1.5}strokeDasharray="4,4"rx={4}ry={4}/>})()}
|
|
279
284
|
</>}
|
|
280
285
|
</Ct>
|
|
281
286
|
</Fr>}
|
|
282
287
|
|
|
283
288
|
|
|
284
|
-
{
|
|
289
|
+
{Te&&!Be&&<F pointerEvents="none"style={t.watermarkOverlay}>
|
|
285
290
|
<R style={t.watermarkText}>
|
|
286
|
-
{
|
|
291
|
+
{to.OS.toUpperCase()} • {Re}×{Pe} • QA DIAGNOSTIC
|
|
287
292
|
</R>
|
|
288
293
|
<R style={t.watermarkTime}>
|
|
289
294
|
{new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}
|
|
@@ -291,10 +296,10 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
291
296
|
</F>}
|
|
292
297
|
|
|
293
298
|
|
|
294
|
-
{O==="text"&&<Oo style={N.absoluteFill}onPress={e=>{const{locationX:C,locationY:T}=e.nativeEvent,k=Math.max(1,Ae.width),P=Math.max(1,Ae.height),
|
|
299
|
+
{O==="text"&&<Oo style={N.absoluteFill}onPress={e=>{const{locationX:C,locationY:T}=e.nativeEvent,k=Math.max(1,Ae.width),P=Math.max(1,Ae.height),B=Math.max(.05,Math.min(.85,C/k)),W=Math.max(.05,Math.min(.85,T/P));_i({x:B,y:W}),Bo()}}/>}
|
|
295
300
|
|
|
296
301
|
|
|
297
|
-
{!Be&&
|
|
302
|
+
{!Be&&ke.map(e=><Cn key={e.id}textItem={e}canvasWidth={Ae.width}canvasHeight={Ae.height}scale={ae}onUpdate={(C,T)=>{re(),$e(k=>k.map(P=>P.id===C?{...P,...T}:P))}}onDelete={C=>{nr(C)}}onEdit={C=>Bo(C)}/>)}
|
|
298
303
|
|
|
299
304
|
|
|
300
305
|
{(ye||O==="crop")&&!Be&&<F pointerEvents="none"style={t.instagramGridOverlay}>
|
|
@@ -304,12 +309,12 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
304
309
|
<F style={[t.instagramGridVLine,{left:"66.67%"}]}/>
|
|
305
310
|
</F>}
|
|
306
311
|
</F>
|
|
307
|
-
</
|
|
312
|
+
</Ht.View>}
|
|
308
313
|
|
|
309
314
|
|
|
310
315
|
|
|
311
316
|
|
|
312
|
-
{ie&&
|
|
317
|
+
{ie&&ai&&<Oo onPressIn={()=>{I("light"),It(!0)}}onPressOut={()=>{I("light"),It(!1)}}style={({pressed:e})=>[t.holdCompareBtn,e&&t.holdCompareBtnPressed]}>
|
|
313
318
|
<Br size={14}color={S.white}/>
|
|
314
319
|
<R style={t.holdCompareText}>
|
|
315
320
|
{Be?"Original Image":"Hold to Compare"}
|
|
@@ -318,21 +323,21 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
318
323
|
|
|
319
324
|
|
|
320
325
|
{j&&<A onPress={Io}activeOpacity={.85}style={t.modernCenterPlayBtn}>
|
|
321
|
-
{ue?<
|
|
322
|
-
<
|
|
326
|
+
{ue?<Ai size={24}color={S.white}/>:<F style={{marginLeft:3}}>
|
|
327
|
+
<Ho size={24}color={S.white}/>
|
|
323
328
|
</F>}
|
|
324
329
|
</A>}
|
|
325
330
|
|
|
326
331
|
|
|
327
332
|
{j&&<F style={t.videoFloatingHud}>
|
|
328
333
|
<A onPress={Io}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
329
|
-
{ue?<
|
|
334
|
+
{ue?<Ai size={13}color={S.white}/>:<Ho size={13}color={S.white}/>}
|
|
330
335
|
</A>
|
|
331
336
|
<F style={t.videoHudProgressBar}>
|
|
332
337
|
<F style={[t.videoHudProgressFill,{left:`${se/(le||1e4)*100}%`,width:`${Math.max(4,(pe-se)/(le||1e4)*100)}%`}]}/>
|
|
333
338
|
</F>
|
|
334
339
|
<R style={t.videoHudTimeText}>
|
|
335
|
-
{
|
|
340
|
+
{di||"00:05"}
|
|
336
341
|
</R>
|
|
337
342
|
{fe&&<F style={t.videoHudBadge}>
|
|
338
343
|
<So size={10}color="#F87171"/>
|
|
@@ -344,27 +349,27 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
344
349
|
|
|
345
350
|
|
|
346
351
|
{ie&&<F style={t.floatingZoomBar}>
|
|
347
|
-
<
|
|
352
|
+
<Tt onPress={Qi}style={t.zoomBtn}accessibilityLabel="Zoom In">
|
|
348
353
|
<Ur size={15}color={S.white}/>
|
|
349
|
-
</
|
|
354
|
+
</Tt>
|
|
350
355
|
|
|
351
|
-
<A onPress={
|
|
356
|
+
<A onPress={Jo}activeOpacity={.8}style={t.zoomLevelBadge}>
|
|
352
357
|
<R style={t.zoomLevelText}>
|
|
353
358
|
{Math.round(ae*100)}%
|
|
354
359
|
</R>
|
|
355
360
|
</A>
|
|
356
361
|
|
|
357
|
-
<
|
|
362
|
+
<Tt onPress={Ki}style={t.zoomBtn}accessibilityLabel="Zoom Out">
|
|
358
363
|
<Xr size={15}color={S.white}/>
|
|
359
|
-
</
|
|
364
|
+
</Tt>
|
|
360
365
|
|
|
361
|
-
<
|
|
366
|
+
<Tt onPress={Jo}style={t.zoomBtn}accessibilityLabel="Fit to Screen">
|
|
362
367
|
<Or size={14}color={S.white}/>
|
|
363
|
-
</
|
|
368
|
+
</Tt>
|
|
364
369
|
</F>}
|
|
365
370
|
|
|
366
371
|
|
|
367
|
-
{ie&&O==="crop"&&<Tn cropBox={
|
|
372
|
+
{ie&&O==="crop"&&<Tn cropBox={Zt}imageWidth={Ae.width}imageHeight={Ae.height}imageOffsetX={(lt.width-Ae.width)/2}imageOffsetY={(lt.height-Ae.height)/2}scale={ae}onUpdateCropBox={St}onApplyCrop={si}onCancelCrop={()=>_("none")}/>}
|
|
368
373
|
</F>
|
|
369
374
|
</F>
|
|
370
375
|
|
|
@@ -382,14 +387,14 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
382
387
|
</F>
|
|
383
388
|
<F style={t.panelValueBadge}>
|
|
384
389
|
<R style={t.panelValueText}>
|
|
385
|
-
{ie?O==="draw"?D==="redact"?"100% Solid":D==="pixelate"?`+${Ro} px`:D==="step"?`Badge #${oe.filter(e=>e.type==="step").length+1}`:`+${Ie} px`:O==="crop"?`${zo.toUpperCase()} \u2022 ${Z}\xB0`:O==="adjust"?He==="vignette"?`+${E.vignette}%`:`${E[He]>=0?"+":""}${E[He]}%`:O==="text"?`${
|
|
390
|
+
{ie?O==="draw"?D==="redact"?"100% Solid":D==="pixelate"?`+${Ro} px`:D==="step"?`Badge #${oe.filter(e=>e.type==="step").length+1}`:`+${Ie} px`:O==="crop"?`${zo.toUpperCase()} \u2022 ${Z}\xB0`:O==="adjust"?He==="vignette"?`+${E.vignette}%`:`${E[He]>=0?"+":""}${E[He]}%`:O==="text"?`${ke.length} Notes`:`${Math.round(ae*100)}%`:O==="trim"?`${(se/1e3).toFixed(1)}s - ${(pe/1e3).toFixed(1)}s (${((pe-se)/1e3).toFixed(1)}s)`:O==="audio"?fe?"Muted (0%)":`${Ze}% Vol`:O==="speed"?`${Ge}x Speed`:O==="gif"?`${Yt} FPS \u2022 ${Po}px`:O==="snapshot"?`${Re||1080}\xD7${Pe||1920}`:di||"00:05"}
|
|
386
391
|
</R>
|
|
387
392
|
</F>
|
|
388
393
|
</F>
|
|
389
394
|
|
|
390
395
|
|
|
391
|
-
{j&&O==="trim"
|
|
392
|
-
{
|
|
396
|
+
{j&&O==="trim"&&$o.length>0&&<Ti horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={t.filmstripScroll}>
|
|
397
|
+
{$o.map(e=>{const C=e.timeMs>=se&&e.timeMs<=pe;return<A key={`thumb_${e.index}_${e.timeMs}`}onPress={()=>{I("light"),et==="start"?at(Math.min(pe-500,e.timeMs)):st(Math.max(se+500,e.timeMs))}}style={[t.filmstripThumbItem,C&&t.filmstripThumbActive]}>
|
|
393
398
|
<Co source={{uri:e.uri}}style={t.filmstripThumbImg}resizeMode="cover"/>
|
|
394
399
|
<R style={t.filmstripThumbTime}>
|
|
395
400
|
{(e.timeMs/1e3).toFixed(1)}s
|
|
@@ -402,10 +407,10 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
402
407
|
<R style={t.sliderMinIndicator}>
|
|
403
408
|
{j&&O==="speed"?"0.5x":j&&O==="gif"?"6fps":"\u25CB"}
|
|
404
409
|
</R>
|
|
405
|
-
<F onLayout={e=>{const C=e.nativeEvent.layout.width;C>20&&(
|
|
410
|
+
<F onLayout={e=>{const C=e.nativeEvent.layout.width;C>20&&(ei.current=C)}}style={t.sliderTrackTouchable}{...Ji.panHandlers}>
|
|
406
411
|
<F style={t.sliderTrackBg}>
|
|
407
|
-
<F style={[t.sliderFillTrack,{width:`${
|
|
408
|
-
<F pointerEvents="none"style={[t.sliderThumbHandle,{left:`${
|
|
412
|
+
<F style={[t.sliderFillTrack,{width:`${oi}%`},j&&O==="trim"&&{left:`${se/(le||1e4)*100}%`,width:`${Math.max(4,(pe-se)/(le||1e4)*100)}%`,backgroundColor:"#38BDF8"}]}/>
|
|
413
|
+
<F pointerEvents="none"style={[t.sliderThumbHandle,{left:`${oi}%`}]}>
|
|
409
414
|
<F style={t.sliderThumbInnerGlow}/>
|
|
410
415
|
</F>
|
|
411
416
|
</F>
|
|
@@ -419,13 +424,13 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
419
424
|
<Ti horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={t.modeChipsScroll}>
|
|
420
425
|
{j?O==="trim"?<>
|
|
421
426
|
|
|
422
|
-
<A onPress={()=>{
|
|
427
|
+
<A onPress={()=>{I("light"),oo("start")}}style={[t.modeChip,et==="start"&&t.modeChipActive]}>
|
|
423
428
|
<R style={[t.modeChipText,et==="start"&&t.modeChipTextActive]}>
|
|
424
429
|
Start: {(se/1e3).toFixed(1)}s
|
|
425
430
|
</R>
|
|
426
431
|
</A>
|
|
427
432
|
|
|
428
|
-
<A onPress={()=>{
|
|
433
|
+
<A onPress={()=>{I("light"),oo("end")}}style={[t.modeChip,et==="end"&&t.modeChipActive]}>
|
|
429
434
|
<R style={[t.modeChipText,et==="end"&&t.modeChipTextActive]}>
|
|
430
435
|
End: {(pe/1e3).toFixed(1)}s
|
|
431
436
|
</R>
|
|
@@ -434,29 +439,29 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
434
439
|
<F style={t.subDivider}/>
|
|
435
440
|
|
|
436
441
|
|
|
437
|
-
<A onPress={()=>{
|
|
442
|
+
<A onPress={()=>{I("light");const e=le||1e4;at(0),st(Math.min(e,3e3))}}style={t.modeChip}>
|
|
438
443
|
<R style={t.modeChipText}>First 3s</R>
|
|
439
444
|
</A>
|
|
440
445
|
|
|
441
|
-
<A onPress={()=>{
|
|
446
|
+
<A onPress={()=>{I("light");const e=le||1e4;at(0),st(Math.min(e,5e3))}}style={t.modeChip}>
|
|
442
447
|
<R style={t.modeChipText}>First 5s</R>
|
|
443
448
|
</A>
|
|
444
449
|
|
|
445
|
-
<A onPress={()=>{
|
|
450
|
+
<A onPress={()=>{I("light");const e=le||1e4;at(0),st(Math.min(e,1e4))}}style={t.modeChip}>
|
|
446
451
|
<R style={t.modeChipText}>First 10s</R>
|
|
447
452
|
</A>
|
|
448
453
|
|
|
449
454
|
<F style={t.subDivider}/>
|
|
450
455
|
|
|
451
|
-
<A onPress={
|
|
456
|
+
<A onPress={ri}style={t.applyActionBtn}>
|
|
452
457
|
<R style={t.applyActionText}>Apply Trim</R>
|
|
453
458
|
</A>
|
|
454
459
|
|
|
455
|
-
<A onPress={()=>{
|
|
460
|
+
<A onPress={()=>{I("light"),at(0),st(le||1e4)}}style={t.cancelActionBtn}>
|
|
456
461
|
<R style={t.cancelActionText}>Reset</R>
|
|
457
462
|
</A>
|
|
458
463
|
</>:O==="audio"?<>
|
|
459
|
-
<A onPress={()=>{
|
|
464
|
+
<A onPress={()=>{I("light"),Xt(e=>!e)}}style={[t.modeChip,fe&&t.modeChipActive]}>
|
|
460
465
|
<So size={14}color={fe?S.white:"rgba(255,255,255,0.7)"}/>
|
|
461
466
|
<R style={[t.modeChipText,fe&&t.modeChipTextActive]}>
|
|
462
467
|
{fe?"Muted":"Unmuted"}
|
|
@@ -465,7 +470,7 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
465
470
|
|
|
466
471
|
<F style={t.subDivider}/>
|
|
467
472
|
|
|
468
|
-
{[100,75,50,25,0].map(e=><A key={e}onPress={()=>{
|
|
473
|
+
{[100,75,50,25,0].map(e=><A key={e}onPress={()=>{I("light"),io(e),Xt(e===0)}}style={[t.modeChip,!fe&&Ze===e&&t.modeChipActive]}>
|
|
469
474
|
<R style={[t.modeChipText,!fe&&Ze===e&&t.modeChipTextActive]}>
|
|
470
475
|
{e}%
|
|
471
476
|
</R>
|
|
@@ -473,20 +478,20 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
473
478
|
|
|
474
479
|
<F style={t.subDivider}/>
|
|
475
480
|
|
|
476
|
-
<A onPress={
|
|
481
|
+
<A onPress={dr}style={t.applyActionBtn}>
|
|
477
482
|
<R style={t.applyActionText}>Strip Audio</R>
|
|
478
483
|
</A>
|
|
479
484
|
</>:O==="speed"?<>
|
|
480
|
-
{[.5,.75,1,1.25,1.5,2].map(e=><A key={e}onPress={()=>{
|
|
481
|
-
<
|
|
485
|
+
{[.5,.75,1,1.25,1.5,2].map(e=><A key={e}onPress={()=>{I("light"),ro(e)}}style={[t.modeChip,Ge===e&&t.modeChipActive]}>
|
|
486
|
+
<Go size={13}color={Ge===e?S.white:"rgba(255,255,255,0.7)"}/>
|
|
482
487
|
<R style={[t.modeChipText,Ge===e&&t.modeChipTextActive]}>
|
|
483
488
|
{e===1?"1.0x (Normal)":`${e}x`}
|
|
484
489
|
</R>
|
|
485
490
|
</A>)}
|
|
486
491
|
</>:O==="gif"?<>
|
|
487
492
|
|
|
488
|
-
{[{fps:8,label:"8 FPS (Small)"},{fps:12,label:"12 FPS (Smooth)"},{fps:20,label:"20 FPS (HD)"}].map(e=><A key={e.fps}onPress={()=>{
|
|
489
|
-
<R style={[t.modeChipText,
|
|
493
|
+
{[{fps:8,label:"8 FPS (Small)"},{fps:12,label:"12 FPS (Smooth)"},{fps:20,label:"20 FPS (HD)"}].map(e=><A key={e.fps}onPress={()=>{I("light"),Lo(e.fps)}}style={[t.modeChip,Yt===e.fps&&t.modeChipActive]}>
|
|
494
|
+
<R style={[t.modeChipText,Yt===e.fps&&t.modeChipTextActive]}>
|
|
490
495
|
{e.label}
|
|
491
496
|
</R>
|
|
492
497
|
</A>)}
|
|
@@ -494,7 +499,7 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
494
499
|
<F style={t.subDivider}/>
|
|
495
500
|
|
|
496
501
|
|
|
497
|
-
{[{w:320,label:"320px"},{w:480,label:"480px"},{w:640,label:"640px"}].map(e=><A key={e.w}onPress={()=>{
|
|
502
|
+
{[{w:320,label:"320px"},{w:480,label:"480px"},{w:640,label:"640px"}].map(e=><A key={e.w}onPress={()=>{I("light"),Ni(e.w)}}style={[t.modeChip,Po===e.w&&t.modeChipActive]}>
|
|
498
503
|
<R style={[t.modeChipText,Po===e.w&&t.modeChipTextActive]}>
|
|
499
504
|
{e.label}
|
|
500
505
|
</R>
|
|
@@ -502,13 +507,13 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
502
507
|
|
|
503
508
|
<F style={t.subDivider}/>
|
|
504
509
|
|
|
505
|
-
<A onPress={
|
|
510
|
+
<A onPress={li}disabled={Ve}style={[t.applyActionBtn,Ve&&{opacity:.6}]}>
|
|
506
511
|
<R style={t.applyActionText}>
|
|
507
512
|
{Ve?"Exporting...":"Export GIF"}
|
|
508
513
|
</R>
|
|
509
514
|
</A>
|
|
510
515
|
</>:O==="snapshot"?<>
|
|
511
|
-
<A onPress={
|
|
516
|
+
<A onPress={ni}disabled={me}style={t.applyActionBtn}>
|
|
512
517
|
<Fo size={14}color={S.white}/>
|
|
513
518
|
<R style={t.applyActionText}>
|
|
514
519
|
Snapshot Current Frame (PNG)
|
|
@@ -516,40 +521,40 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
516
521
|
</A>
|
|
517
522
|
</>:<>
|
|
518
523
|
<A onPress={Io}style={t.modeChipActive}>
|
|
519
|
-
<
|
|
524
|
+
<Ho size={14}color={S.white}/>
|
|
520
525
|
<R style={t.modeChipTextActive}>Play Video</R>
|
|
521
526
|
</A>
|
|
522
|
-
<A onPress={()=>{
|
|
523
|
-
<
|
|
527
|
+
<A onPress={()=>{I("light"),_("trim")}}style={t.modeChip}>
|
|
528
|
+
<Di size={14}color="rgba(255,255,255,0.7)"/>
|
|
524
529
|
<R style={t.modeChipText}>Trim Clip</R>
|
|
525
530
|
</A>
|
|
526
|
-
<A onPress={()=>{
|
|
531
|
+
<A onPress={()=>{I("light"),_("audio")}}style={t.modeChip}>
|
|
527
532
|
<So size={14}color="rgba(255,255,255,0.7)"/>
|
|
528
533
|
<R style={t.modeChipText}>Audio</R>
|
|
529
534
|
</A>
|
|
530
|
-
<A onPress={()=>{
|
|
531
|
-
<
|
|
535
|
+
<A onPress={()=>{I("light"),_("speed")}}style={t.modeChip}>
|
|
536
|
+
<Go size={14}color="rgba(255,255,255,0.7)"/>
|
|
532
537
|
<R style={t.modeChipText}>Speed</R>
|
|
533
538
|
</A>
|
|
534
|
-
<A onPress={()=>{
|
|
535
|
-
<
|
|
539
|
+
<A onPress={()=>{I("light"),_("gif")}}style={t.modeChip}>
|
|
540
|
+
<Wo size={14}color="rgba(255,255,255,0.7)"/>
|
|
536
541
|
<R style={t.modeChipText}>Export GIF</R>
|
|
537
542
|
</A>
|
|
538
|
-
<A onPress={()=>{
|
|
543
|
+
<A onPress={()=>{I("light"),_("snapshot")}}style={t.modeChip}>
|
|
539
544
|
<Fo size={14}color="rgba(255,255,255,0.7)"/>
|
|
540
545
|
<R style={t.modeChipText}>Snapshot</R>
|
|
541
546
|
</A>
|
|
542
547
|
</>:O==="draw"?<>
|
|
543
548
|
|
|
544
|
-
<A onPress={()=>{
|
|
545
|
-
<
|
|
549
|
+
<A onPress={()=>{I("light"),_e("brush")}}style={[t.modeChip,D==="brush"&&t.modeChipActive]}>
|
|
550
|
+
<Eo size={14}color={D==="brush"?S.white:"rgba(255,255,255,0.6)"}/>
|
|
546
551
|
<R style={[t.modeChipText,D==="brush"&&t.modeChipTextActive]}>
|
|
547
552
|
Brush
|
|
548
553
|
</R>
|
|
549
554
|
</A>
|
|
550
555
|
|
|
551
556
|
|
|
552
|
-
<A onPress={()=>{
|
|
557
|
+
<A onPress={()=>{I("light"),_e("highlighter")}}style={[t.modeChip,D==="highlighter"&&t.modeChipActive]}>
|
|
553
558
|
<Ar size={14}color={D==="highlighter"?S.white:"rgba(255,255,255,0.6)"}/>
|
|
554
559
|
<R style={[t.modeChipText,D==="highlighter"&&t.modeChipTextActive]}>
|
|
555
560
|
Highlighter
|
|
@@ -557,7 +562,7 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
557
562
|
</A>
|
|
558
563
|
|
|
559
564
|
|
|
560
|
-
<A onPress={()=>{
|
|
565
|
+
<A onPress={()=>{I("light"),_e("arrow")}}style={[t.modeChip,D==="arrow"&&t.modeChipActive]}>
|
|
561
566
|
<Rr size={14}color={D==="arrow"?S.white:"rgba(255,255,255,0.6)"}/>
|
|
562
567
|
<R style={[t.modeChipText,D==="arrow"&&t.modeChipTextActive]}>
|
|
563
568
|
Arrow
|
|
@@ -565,7 +570,7 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
565
570
|
</A>
|
|
566
571
|
|
|
567
572
|
|
|
568
|
-
<A onPress={()=>{
|
|
573
|
+
<A onPress={()=>{I("light"),_e("rect")}}style={[t.modeChip,D==="rect"&&t.modeChipActive]}>
|
|
569
574
|
<R style={[t.modeChipIconText,D==="rect"&&{color:S.white}]}>
|
|
570
575
|
□
|
|
571
576
|
</R>
|
|
@@ -575,7 +580,7 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
575
580
|
</A>
|
|
576
581
|
|
|
577
582
|
|
|
578
|
-
<A onPress={()=>{
|
|
583
|
+
<A onPress={()=>{I("light"),_e("circle")}}style={[t.modeChip,D==="circle"&&t.modeChipActive]}>
|
|
579
584
|
<R style={[t.modeChipIconText,D==="circle"&&{color:S.white}]}>
|
|
580
585
|
○
|
|
581
586
|
</R>
|
|
@@ -585,7 +590,7 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
585
590
|
</A>
|
|
586
591
|
|
|
587
592
|
|
|
588
|
-
<A onPress={()=>{
|
|
593
|
+
<A onPress={()=>{I("light"),_e("spotlight")}}style={[t.modeChip,D==="spotlight"&&t.modeChipActive]}>
|
|
589
594
|
<R style={[t.modeChipIconText,D==="spotlight"&&{color:S.white}]}>
|
|
590
595
|
🔦
|
|
591
596
|
</R>
|
|
@@ -595,7 +600,7 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
595
600
|
</A>
|
|
596
601
|
|
|
597
602
|
|
|
598
|
-
<A onPress={()=>{
|
|
603
|
+
<A onPress={()=>{I("light"),_e("step"),L(z("mediaGallery.tapToPlaceStep","Tap or drag on image to place numbered steps \u2460 \u2461 \u2462"))}}style={[t.modeChip,D==="step"&&t.modeChipActive]}>
|
|
599
604
|
<R style={[t.modeChipIconText,D==="step"&&{color:S.white}]}>
|
|
600
605
|
①
|
|
601
606
|
</R>
|
|
@@ -605,7 +610,7 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
605
610
|
</A>
|
|
606
611
|
|
|
607
612
|
|
|
608
|
-
<A onPress={()=>{
|
|
613
|
+
<A onPress={()=>{I("light"),_e("redact")}}style={[t.modeChip,D==="redact"&&t.modeChipActive]}>
|
|
609
614
|
<Vr size={14}color={D==="redact"?S.white:"rgba(255,255,255,0.6)"}/>
|
|
610
615
|
<R style={[t.modeChipText,D==="redact"&&t.modeChipTextActive]}>
|
|
611
616
|
Redact
|
|
@@ -613,7 +618,7 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
613
618
|
</A>
|
|
614
619
|
|
|
615
620
|
|
|
616
|
-
<A onPress={()=>{
|
|
621
|
+
<A onPress={()=>{I("light"),_e("pixelate")}}style={[t.modeChip,D==="pixelate"&&t.modeChipActive]}>
|
|
617
622
|
<Wr size={14}color={D==="pixelate"?S.white:"rgba(255,255,255,0.6)"}/>
|
|
618
623
|
<R style={[t.modeChipText,D==="pixelate"&&t.modeChipTextActive]}>
|
|
619
624
|
Pixelate
|
|
@@ -622,23 +627,23 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
622
627
|
|
|
623
628
|
<F style={t.subDivider}/>
|
|
624
629
|
|
|
625
|
-
{
|
|
630
|
+
{Gi.map(e=><A key={e}onPress={()=>{I("light"),Uo(e)}}style={[t.colorDot,{backgroundColor:e},Fe===e&&t.colorDotActive]}/>)}
|
|
626
631
|
|
|
627
632
|
<F style={t.subDivider}/>
|
|
628
633
|
|
|
629
|
-
<A onPress={
|
|
630
|
-
<
|
|
634
|
+
<A onPress={ir}disabled={oe.length===0}style={[t.actionPillBtn,oe.length===0&&{opacity:.4}]}>
|
|
635
|
+
<Ei size={13}color={S.white}/>
|
|
631
636
|
<R style={t.actionPillText}>Undo</R>
|
|
632
637
|
</A>
|
|
633
638
|
|
|
634
|
-
{oe.length>0&&<A onPress={
|
|
639
|
+
{oe.length>0&&<A onPress={rr}style={[t.actionPillBtn,{backgroundColor:"rgba(239, 68, 68, 0.2)"}]}>
|
|
635
640
|
<R style={[t.actionPillText,{color:S.rose400}]}>
|
|
636
641
|
Clear ({oe.length})
|
|
637
642
|
</R>
|
|
638
643
|
</A>}
|
|
639
644
|
</>:O==="adjust"?<>
|
|
640
645
|
|
|
641
|
-
{[{key:"none",label:"Original",icon:"\u2726"},{key:"vibrant",label:"Vibrant",icon:"\u{1F308}"},{key:"mono",label:"Mono",icon:"\u25D0"},{key:"sepia",label:"Sepia",icon:"\u2615"},{key:"vintage",label:"Vintage",icon:"\u{1F39E}"},{key:"noir",label:"Noir",icon:"\u{1F311}"},{key:"cool",label:"Cool",icon:"\u2744"},{key:"warm",label:"Warm",icon:"\u2600"},{key:"fade",label:"Fade",icon:"\u{1F32B}"}].map(e=><A key={e.key}onPress={()=>{
|
|
646
|
+
{[{key:"none",label:"Original",icon:"\u2726"},{key:"vibrant",label:"Vibrant",icon:"\u{1F308}"},{key:"mono",label:"Mono",icon:"\u25D0"},{key:"sepia",label:"Sepia",icon:"\u2615"},{key:"vintage",label:"Vintage",icon:"\u{1F39E}"},{key:"noir",label:"Noir",icon:"\u{1F311}"},{key:"cool",label:"Cool",icon:"\u2744"},{key:"warm",label:"Warm",icon:"\u2600"},{key:"fade",label:"Fade",icon:"\u{1F32B}"}].map(e=><A key={e.key}onPress={()=>{I("light"),re(),jt(e.key)}}style={[t.modeChip,K===e.key&&t.modeChipActive]}>
|
|
642
647
|
<R style={[t.modeChipIconText,K===e.key&&{color:S.white}]}>
|
|
643
648
|
{e.icon}
|
|
644
649
|
</R>
|
|
@@ -650,18 +655,18 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
650
655
|
<F style={t.subDivider}/>
|
|
651
656
|
|
|
652
657
|
|
|
653
|
-
<A onPress={()=>{
|
|
654
|
-
<R style={[t.modeChipIconText,
|
|
658
|
+
<A onPress={()=>{I("light"),re(),At(e=>!e)}}style={[t.modeChip,Te&&t.modeChipActive]}>
|
|
659
|
+
<R style={[t.modeChipIconText,Te&&{color:S.white}]}>
|
|
655
660
|
🛡
|
|
656
661
|
</R>
|
|
657
|
-
<R style={[t.modeChipText,
|
|
658
|
-
QA Bar {
|
|
662
|
+
<R style={[t.modeChipText,Te&&t.modeChipTextActive]}>
|
|
663
|
+
QA Bar {Te?"ON":"OFF"}
|
|
659
664
|
</R>
|
|
660
665
|
</A>
|
|
661
666
|
|
|
662
667
|
|
|
663
|
-
<A onPress={()=>{
|
|
664
|
-
<
|
|
668
|
+
<A onPress={()=>{I("light"),Ot(e=>!e)}}style={[t.modeChip,ye&&t.modeChipActive]}>
|
|
669
|
+
<Vo size={13}color={ye?S.white:"rgba(255,255,255,0.8)"}/>
|
|
665
670
|
<R style={[t.modeChipText,ye&&t.modeChipTextActive]}>
|
|
666
671
|
Grid 3×3
|
|
667
672
|
</R>
|
|
@@ -670,56 +675,56 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
670
675
|
<F style={t.subDivider}/>
|
|
671
676
|
|
|
672
677
|
|
|
673
|
-
{[{key:"brightness",label:
|
|
678
|
+
{[{key:"brightness",label:z("media.brightness","Brightness"),IconComponent:Yr},{key:"contrast",label:z("media.contrast","Contrast"),IconComponent:_r},{key:"saturation",label:z("media.saturation","Saturation"),IconComponent:Zr},{key:"warmth",label:z("media.warmth","Warmth"),IconComponent:qr},{key:"exposure",label:z("media.exposure","Exposure"),IconComponent:Qr},{key:"vignette",label:z("media.vignette","Vignette"),IconComponent:Kr}].map(e=>{const C=e.IconComponent,T=He===e.key;return<A key={e.key}onPress={()=>{I("light"),ji(e.key)}}style={[t.modeChip,T&&t.modeChipActive]}>
|
|
674
679
|
<C size={14}color={T?S.white:S.grayTextWeak}/>
|
|
675
680
|
<R style={[t.modeChipText,T&&t.modeChipTextActive]}>
|
|
676
681
|
{e.label}
|
|
677
682
|
</R>
|
|
678
683
|
</A>})}
|
|
679
684
|
<F style={t.subDivider}/>
|
|
680
|
-
<A onPress={()=>{
|
|
681
|
-
<
|
|
685
|
+
<A onPress={()=>{I("medium"),re(),jt("none"),At(!1),kt({brightness:0,contrast:0,saturation:0,warmth:0,exposure:0,vignette:0}),L(z("mediaGallery.resetAdjustments","Adjustments Reset"))}}style={t.modeChip}>
|
|
686
|
+
<Oi size={12}color="rgba(255,255,255,0.7)"/>
|
|
682
687
|
<R style={t.modeChipText}>Reset</R>
|
|
683
688
|
</A>
|
|
684
689
|
</>:O==="crop"?<>
|
|
685
|
-
{["free","1:1","4:3","16:9","9:16","3:2"].map(e=><A key={e}onPress={()=>{
|
|
690
|
+
{["free","1:1","4:3","16:9","9:16","3:2"].map(e=><A key={e}onPress={()=>{I("light"),_t(e);const C=Vt(e,Re,Pe);St(C)}}style={[t.modeChip,zo===e&&t.modeChipActive]}>
|
|
686
691
|
<R style={[t.modeChipText,zo===e&&t.modeChipTextActive]}>
|
|
687
692
|
{e==="free"?"Free":e}
|
|
688
693
|
</R>
|
|
689
694
|
</A>)}
|
|
690
695
|
<F style={t.subDivider}/>
|
|
691
696
|
|
|
692
|
-
<A onPress={()=>{
|
|
697
|
+
<A onPress={()=>{I("light"),re(),Se(e=>(e+90)%360)}}style={t.modeChip}>
|
|
693
698
|
<Hr size={13}color="rgba(255,255,255,0.8)"/>
|
|
694
699
|
<R style={t.modeChipText}>Rotate 90°</R>
|
|
695
700
|
</A>
|
|
696
701
|
|
|
697
|
-
<A onPress={()=>{
|
|
698
|
-
<R style={[t.modeChipIconText,
|
|
702
|
+
<A onPress={()=>{I("light"),re(),Nt(e=>!e)}}style={[t.modeChip,Me&&t.modeChipActive]}>
|
|
703
|
+
<R style={[t.modeChipIconText,Me&&{color:S.white}]}>
|
|
699
704
|
⇄
|
|
700
705
|
</R>
|
|
701
|
-
<R style={[t.modeChipText,
|
|
706
|
+
<R style={[t.modeChipText,Me&&t.modeChipTextActive]}>
|
|
702
707
|
Flip H
|
|
703
708
|
</R>
|
|
704
709
|
</A>
|
|
705
710
|
|
|
706
|
-
<A onPress={()=>{
|
|
707
|
-
<R style={[t.modeChipIconText,
|
|
711
|
+
<A onPress={()=>{I("light"),re(),Ut(e=>!e)}}style={[t.modeChip,ve&&t.modeChipActive]}>
|
|
712
|
+
<R style={[t.modeChipIconText,ve&&{color:S.white}]}>
|
|
708
713
|
⇅
|
|
709
714
|
</R>
|
|
710
|
-
<R style={[t.modeChipText,
|
|
715
|
+
<R style={[t.modeChipText,ve&&t.modeChipTextActive]}>
|
|
711
716
|
Flip V
|
|
712
717
|
</R>
|
|
713
718
|
</A>
|
|
714
719
|
|
|
715
|
-
<A onPress={()=>{
|
|
716
|
-
<
|
|
720
|
+
<A onPress={()=>{I("light"),Ot(e=>!e)}}style={[t.modeChip,ye&&t.modeChipActive]}>
|
|
721
|
+
<Vo size={13}color={ye?S.white:"rgba(255,255,255,0.8)"}/>
|
|
717
722
|
<R style={[t.modeChipText,ye&&t.modeChipTextActive]}>
|
|
718
723
|
Grid 3×3
|
|
719
724
|
</R>
|
|
720
725
|
</A>
|
|
721
726
|
<F style={t.subDivider}/>
|
|
722
|
-
<A onPress={
|
|
727
|
+
<A onPress={si}style={t.applyActionBtn}>
|
|
723
728
|
<R style={t.applyActionText}>Apply</R>
|
|
724
729
|
</A>
|
|
725
730
|
<A onPress={()=>_("none")}style={t.cancelActionBtn}>
|
|
@@ -733,7 +738,7 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
733
738
|
<F style={t.subDivider}/>
|
|
734
739
|
|
|
735
740
|
|
|
736
|
-
{[{label:"\u{1F41E} BUG",color:"#EF4444"},{label:"\u26A0\uFE0F OVERFLOW",color:"#F59E0B"},{label:"\u26A1 SLOW >3s",color:"#8B5CF6"},{label:"\u{1F6AB} API 500",color:"#DC2626"},{label:"\u{1F4A5} CRASH",color:"#991B1B"}].map(e=><A key={e.label}onPress={()=>{
|
|
741
|
+
{[{label:"\u{1F41E} BUG",color:"#EF4444"},{label:"\u26A0\uFE0F OVERFLOW",color:"#F59E0B"},{label:"\u26A1 SLOW >3s",color:"#8B5CF6"},{label:"\u{1F6AB} API 500",color:"#DC2626"},{label:"\u{1F4A5} CRASH",color:"#991B1B"}].map(e=><A key={e.label}onPress={()=>{I("light"),re(),$e(C=>[...C,{id:`text_${Date.now()}_${Math.random()}`,text:e.label,x:so?.x??.35,y:so?.y??.35,color:"#FFFFFF",bgColor:e.color,fontSize:13}]),L(z("mediaGallery.tagPlaced",`Placed tag: ${e.label}`))}}style={[t.modeChip,{borderColor:e.color,backgroundColor:`${e.color}26`}]}>
|
|
737
742
|
<R style={[t.modeChipText,{color:e.color,fontWeight:"700"}]}>
|
|
738
743
|
{e.label}
|
|
739
744
|
</R>
|
|
@@ -741,30 +746,30 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
741
746
|
|
|
742
747
|
<F style={t.subDivider}/>
|
|
743
748
|
|
|
744
|
-
{
|
|
745
|
-
{
|
|
749
|
+
{Gi.map(e=><A key={e}onPress={()=>{I("light"),Uo(e)}}style={[t.colorDot,{backgroundColor:e},Fe===e&&t.colorDotActive]}/>)}
|
|
750
|
+
{ke.length>0&&<>
|
|
746
751
|
<F style={t.subDivider}/>
|
|
747
|
-
<A onPress={()=>{
|
|
752
|
+
<A onPress={()=>{I("medium"),re(),$e([])}}style={[t.modeChip,{backgroundColor:"rgba(239, 68, 68, 0.2)"}]}>
|
|
748
753
|
<R style={[t.modeChipText,{color:S.rose500}]}>
|
|
749
|
-
Clear All ({
|
|
754
|
+
Clear All ({ke.length})
|
|
750
755
|
</R>
|
|
751
756
|
</A>
|
|
752
757
|
</>}
|
|
753
758
|
</>:<>
|
|
754
|
-
<A onPress={()=>{
|
|
755
|
-
<
|
|
759
|
+
<A onPress={()=>{I("light"),_("draw"),_e("brush")}}style={t.modeChip}>
|
|
760
|
+
<Eo size={14}color="rgba(255,255,255,0.7)"/>
|
|
756
761
|
<R style={t.modeChipText}>Markup</R>
|
|
757
762
|
</A>
|
|
758
|
-
<A onPress={()=>{
|
|
759
|
-
<
|
|
763
|
+
<A onPress={()=>{I("light");const e=Vt("free",Re,Pe);St(e),_t("free"),_("crop")}}style={t.modeChip}>
|
|
764
|
+
<Bi size={14}color="rgba(255,255,255,0.7)"/>
|
|
760
765
|
<R style={t.modeChipText}>Crop</R>
|
|
761
766
|
</A>
|
|
762
|
-
<A onPress={()=>{
|
|
763
|
-
<
|
|
767
|
+
<A onPress={()=>{I("light"),_("adjust")}}style={t.modeChip}>
|
|
768
|
+
<Wi size={14}color="rgba(255,255,255,0.7)"/>
|
|
764
769
|
<R style={t.modeChipText}>Adjust</R>
|
|
765
770
|
</A>
|
|
766
|
-
<A onPress={()=>{
|
|
767
|
-
<
|
|
771
|
+
<A onPress={()=>{I("light"),_("text"),L(z("mediaGallery.tapToAddText","Tap anywhere on the image to add text"))}}style={t.modeChip}>
|
|
772
|
+
<Vi size={14}color="rgba(255,255,255,0.7)"/>
|
|
768
773
|
<R style={t.modeChipText}>Add Text</R>
|
|
769
774
|
</A>
|
|
770
775
|
</>}
|
|
@@ -773,31 +778,31 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
773
778
|
|
|
774
779
|
|
|
775
780
|
<F style={t.studioToolbar}>
|
|
776
|
-
{(ie?cr
|
|
781
|
+
{(ie?hr:cr).map(e=>{const C=O===e.key;return<Tt key={e.key}onPress={()=>{if(I("light"),e.key==="crop"){const T=Vt("free",Re,Pe);St(T),_t("free"),_("crop")}else e.key==="text"?(_("text"),L(z("mediaGallery.tapToAddText","Tap anywhere on the image to add text"))):_(e.key)}}style={[t.studioToolItem,C&&t.studioToolItemActive]}>
|
|
777
782
|
{e.icon(C)}
|
|
778
783
|
<R style={[t.studioToolLabel,C&&t.studioToolLabelActive]}>
|
|
779
784
|
{e.label}
|
|
780
785
|
</R>
|
|
781
786
|
{"hasBadge"in e&&e.hasBadge&&<F style={t.studioTabBadgeDot}/>}
|
|
782
|
-
</
|
|
787
|
+
</Tt>})}
|
|
783
788
|
</F>
|
|
784
789
|
</F>
|
|
785
790
|
</F>
|
|
786
791
|
</F>
|
|
787
792
|
|
|
788
793
|
|
|
789
|
-
<Ci visible={
|
|
794
|
+
<Ci visible={Yi}transparent={!0}animationType="fade"onRequestClose={()=>Qt(!1)}>
|
|
790
795
|
<F style={t.textModalBackdrop}>
|
|
791
796
|
<F style={t.textModalCard}>
|
|
792
797
|
<R style={t.textModalTitle}>
|
|
793
798
|
Add Text Note / Callout
|
|
794
799
|
</R>
|
|
795
|
-
<Cr style={t.textModalInput}placeholder="e.g. Defect: Button overlap"placeholderTextColor="rgba(255,255,255,0.4)"value={
|
|
800
|
+
<Cr style={t.textModalInput}placeholder="e.g. Defect: Button overlap"placeholderTextColor="rgba(255,255,255,0.4)"value={no}onChangeText={ao}autoFocus={!0}multiline={!0}/>
|
|
796
801
|
<F style={t.textModalActions}>
|
|
797
|
-
<A onPress={()=>
|
|
802
|
+
<A onPress={()=>Qt(!1)}style={t.modalCancelBtn}>
|
|
798
803
|
<R style={t.modalCancelText}>Cancel</R>
|
|
799
804
|
</A>
|
|
800
|
-
<A onPress={
|
|
805
|
+
<A onPress={ar}style={t.modalConfirmBtn}>
|
|
801
806
|
<R style={t.modalConfirmText}>Place Text</R>
|
|
802
807
|
</A>
|
|
803
808
|
</F>
|
|
@@ -806,5 +811,5 @@ import Ao,{useCallback as ot,useContext as pr,useEffect as hi,useMemo as oo,useR
|
|
|
806
811
|
</Ci>
|
|
807
812
|
|
|
808
813
|
|
|
809
|
-
<Sr visible={Ye}title={
|
|
810
|
-
</Ci>};const t=N.create({modalBackdrop:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.70)",justifyContent:"flex-end",zIndex:999999,elevation:999999},modalBackdropPressable:{...N.absoluteFillObject},modalContentCard:{backgroundColor:"#070A14",borderTopLeftRadius:20,borderTopRightRadius:20,overflow:"hidden",shadowColor:S.black,shadowOffset:{width:0,height:-4},shadowOpacity:.25,shadowRadius:10,elevation:16},header:{width:"100%",zIndex:10,borderBottomWidth:N.hairlineWidth,borderBottomColor:"rgba(255, 255, 255, 0.12)"},headerInner:{width:"100%",flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingTop:6,paddingBottom:8,minHeight:48},headerLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0,marginRight:6},headerTextCol:{flex:1,minWidth:0,justifyContent:"center"},headerTitleRow:{flexDirection:"row",alignItems:"center",gap:6},title:{fontFamily:$.interBold,fontSize:13,color:S.white,letterSpacing:-.1,flexShrink:1},formatBadge:{backgroundColor:"rgba(255, 255, 255, 0.18)",paddingHorizontal:5,paddingVertical:1.5,borderRadius:4,borderWidth:N.hairlineWidth,borderColor:"rgba(255, 255, 255, 0.25)"},formatBadgeText:{fontFamily:$.interBold,fontSize:8.5,color:S.white,letterSpacing:.4},headerSubtitleRow:{flexDirection:"row",alignItems:"center",gap:4,marginTop:1},subtitleDim:{fontFamily:$.interMedium,fontSize:10,color:"rgba(255, 255, 255, 0.85)"},subtitleDot:{fontSize:10,color:"rgba(255, 255, 255, 0.45)"},subtitleSize:{fontFamily:$.interBold,fontSize:10,color:"#38BDF8"},headerBackBtn:{width:32,height:32,borderRadius:16,alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.12)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)"},headerRight:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:0},undoRedoGroup:{flexDirection:"row",alignItems:"center",backgroundColor:"rgba(255, 255, 255, 0.12)",borderRadius:8,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",height:30,overflow:"hidden"},undoHalfBtn:{paddingHorizontal:8,height:"100%",alignItems:"center",justifyContent:"center"},redoHalfBtn:{paddingHorizontal:8,height:"100%",alignItems:"center",justifyContent:"center"},undoDivider:{width:1,height:14,backgroundColor:"rgba(255, 255, 255, 0.2)"},actionDisabled:{opacity:.35},headerMoreBtn:{width:30,height:30,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.12)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",alignItems:"center",justifyContent:"center"},headerSaveBtn:{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:"#059669",borderRadius:8,borderWidth:1,borderColor:"rgba(52, 211, 153, 0.45)",paddingHorizontal:11,height:30},headerSaveText:{fontFamily:$.interBold,fontSize:11,color:S.white},headerExportBtn:{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:"#0284C7",borderRadius:8,borderWidth:1,borderColor:"rgba(56, 189, 248, 0.5)",paddingHorizontal:10,height:30},headerExportText:{fontFamily:$.interBold,fontSize:11,color:S.white},headerActionBtn:{width:30,height:30,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.08)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)",alignItems:"center",justifyContent:"center"},moreMenuDropdown:{position:"absolute",top:52,right:12,backgroundColor:"#0F172A",borderRadius:12,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",padding:6,zIndex:100,elevation:12,shadowColor:S.black,shadowOffset:{width:0,height:4},shadowOpacity:.5,shadowRadius:8,minWidth:160},moreMenuItem:{flexDirection:"row",alignItems:"center",gap:8,paddingVertical:8,paddingHorizontal:10,borderRadius:8},moreMenuItemDestructive:{borderTopWidth:N.hairlineWidth,borderTopColor:"rgba(255, 255, 255, 0.1)",marginTop:4,paddingTop:8},moreMenuItemText:{fontFamily:$.interMedium,fontSize:12,color:S.white},stageWrapper:{flex:1,width:"100%",backgroundColor:"#03050A",paddingHorizontal:8,paddingTop:8,paddingBottom:4,minHeight:0},previewCard:{flex:1,width:"100%",borderRadius:12,overflow:"hidden",backgroundColor:"#03050A",alignItems:"center",justifyContent:"center",position:"relative"},canvasContainer:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",position:"relative"},imageCanvasWrapper:{position:"relative",alignItems:"center",justifyContent:"center"},instagramGridOverlay:{...N.absoluteFillObject,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.45)",zIndex:15},instagramGridHLine:{position:"absolute",left:0,right:0,height:1,backgroundColor:"rgba(255, 255, 255, 0.45)",shadowColor:"#000000",shadowOpacity:.6,shadowRadius:1,shadowOffset:{width:0,height:.5}},instagramGridVLine:{position:"absolute",top:0,bottom:0,width:1,backgroundColor:"rgba(255, 255, 255, 0.45)",shadowColor:"#000000",shadowOpacity:.6,shadowRadius:1,shadowOffset:{width:.5,height:0}},image:{width:"100%",height:"100%"},stageTopLeftBadge:{position:"absolute",top:12,left:12,flexDirection:"row",alignItems:"center",gap:6,backgroundColor:"rgba(10, 15, 29, 0.88)",paddingHorizontal:10,paddingVertical:5,borderRadius:12,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)",zIndex:20},badgeGlowDot:{width:7,height:7,borderRadius:3.5,backgroundColor:"#38BDF8",shadowColor:"#38BDF8",shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:4},badgeGlowText:{fontFamily:$.interSemiBold,fontSize:10.5,color:"rgba(255, 255, 255, 0.92)"},holdCompareBtn:{position:"absolute",bottom:12,left:12,flexDirection:"row",alignItems:"center",gap:6,backgroundColor:"rgba(10, 15, 29, 0.90)",paddingHorizontal:12,paddingVertical:7,borderRadius:14,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.15)",shadowColor:S.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:4,zIndex:20},holdCompareBtnPressed:{backgroundColor:S.indigo600,borderColor:S.indigo400},holdCompareText:{fontFamily:$.interSemiBold,fontSize:11,color:S.white},floatingZoomBar:{position:"absolute",right:12,bottom:12,backgroundColor:"rgba(10, 15, 29, 0.92)",borderRadius:22,borderWidth:1.2,borderColor:"rgba(255, 255, 255, 0.16)",paddingVertical:5,paddingHorizontal:5,alignItems:"center",gap:4,shadowColor:S.black,shadowOffset:{width:0,height:4},shadowOpacity:.5,shadowRadius:10,elevation:12,zIndex:35},zoomBtn:{width:28,height:28,borderRadius:14,backgroundColor:"rgba(255, 255, 255, 0.10)",alignItems:"center",justifyContent:"center"},zoomLevelBadge:{paddingHorizontal:4,paddingVertical:3},zoomLevelText:{fontFamily:$.interBold,fontSize:9.5,color:"#38BDF8",letterSpacing:.2},videoImageOverlay:{...N.absoluteFillObject,backgroundColor:"rgba(10, 13, 20, 0.28)"},videoFallbackBackdrop:{flex:1,width:"100%",backgroundColor:S.slate900,alignItems:"center",justifyContent:"center",padding:24},videoFallbackGlow:{position:"absolute",width:150,height:150,borderRadius:75,backgroundColor:"rgba(56, 189, 248, 0.08)"},videoFallbackTitle:{fontFamily:$.interSemiBold,fontSize:15,color:S.white,marginTop:12},videoFallbackSubtitle:{fontFamily:$.interRegular,fontSize:12,color:"rgba(255, 255, 255, 0.6)",marginTop:4},modernCenterPlayBtn:{position:"absolute",width:60,height:60,borderRadius:30,backgroundColor:"rgba(15, 23, 42, 0.78)",borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.45)",alignItems:"center",justifyContent:"center",shadowColor:S.black,shadowOffset:{width:0,height:4},shadowOpacity:.6,shadowRadius:10,elevation:12,zIndex:25},videoFloatingHud:{position:"absolute",bottom:12,left:12,right:12,backgroundColor:"rgba(10, 15, 29, 0.88)",borderRadius:14,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.16)",flexDirection:"row",alignItems:"center",paddingHorizontal:12,paddingVertical:8,gap:10,shadowColor:S.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:6,elevation:6,zIndex:20},videoHudProgressBar:{flex:1,height:4,backgroundColor:"rgba(255, 255, 255, 0.15)",borderRadius:2,position:"relative",overflow:"hidden"},videoHudProgressFill:{position:"absolute",top:0,bottom:0,backgroundColor:"#38BDF8",borderRadius:2},videoHudTimeText:{fontFamily:$.interBold,fontSize:10.5,color:S.white,letterSpacing:.2},videoHudBadge:{backgroundColor:"rgba(255, 255, 255, 0.12)",paddingHorizontal:5,paddingVertical:2,borderRadius:6},videoHudBadgeText:{fontFamily:$.interBold,fontSize:9,color:"#C084FC"},filmstripScroll:{flexDirection:"row",alignItems:"center",gap:6,paddingVertical:2},filmstripThumbItem:{width:48,height:48,borderRadius:8,borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.2)",overflow:"hidden",position:"relative",backgroundColor:"#0F172A"},filmstripThumbActive:{borderColor:"#38BDF8",borderWidth:2,transform:[{scale:1.05}]},filmstripThumbImg:{width:"100%",height:"100%"},filmstripThumbTime:{position:"absolute",bottom:2,right:2,backgroundColor:"rgba(0, 0, 0, 0.75)",paddingHorizontal:3,paddingVertical:1,borderRadius:3,fontFamily:$.interBold,fontSize:7.5,color:S.white},bottomControlsContainer:{width:"100%",backgroundColor:"#070A14",paddingHorizontal:8,paddingTop:6,paddingBottom:io.OS==="ios"?24:12,borderTopWidth:N.hairlineWidth,borderTopColor:"rgba(255, 255, 255, 0.08)",gap:6},contextToolPanel:{width:"100%",backgroundColor:"rgba(10, 15, 29, 0.96)",borderRadius:16,paddingVertical:9,paddingHorizontal:12,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)",gap:8},panelHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"100%"},panelHeaderLeft:{flexDirection:"row",alignItems:"center",gap:7},panelGlowDot:{width:7,height:7,borderRadius:3.5,backgroundColor:"#818CF8",shadowColor:"#818CF8",shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:4},panelHeaderTitle:{fontFamily:$.interBold,fontSize:11,color:S.white,letterSpacing:.6},panelValueBadge:{backgroundColor:"rgba(2, 132, 199, 0.22)",paddingHorizontal:8,paddingVertical:3,borderRadius:8,borderWidth:1,borderColor:"rgba(56, 189, 248, 0.45)"},panelValueText:{fontFamily:$.interBold,fontSize:10.5,color:"#38BDF8"},sliderRowContainer:{flexDirection:"row",alignItems:"center",width:"100%",gap:8,paddingHorizontal:2},sliderMinIndicator:{fontSize:10,color:"rgba(255, 255, 255, 0.5)"},sliderMaxIndicator:{fontSize:12,color:"rgba(255, 255, 255, 0.85)"},sliderTrackTouchable:{flex:1,height:36,justifyContent:"center"},sliderTrackBg:{width:"100%",height:4,backgroundColor:"rgba(255, 255, 255, 0.14)",borderRadius:2,position:"relative",justifyContent:"center"},sliderFillTrack:{height:4,backgroundColor:"#0284C7",borderRadius:2},sliderThumbHandle:{position:"absolute",width:20,height:20,borderRadius:10,backgroundColor:"#38BDF8",marginLeft:-10,alignItems:"center",justifyContent:"center",shadowColor:"#38BDF8",shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:6,elevation:6},sliderThumbInnerGlow:{width:8,height:8,borderRadius:4,backgroundColor:S.white},modeChipsScroll:{flexDirection:"row",alignItems:"center",gap:8,paddingTop:2},modeChip:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:12,paddingVertical:6,borderRadius:10,backgroundColor:"rgba(255, 255, 255, 0.08)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)"},modeChipActive:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:12,paddingVertical:6,borderRadius:10,backgroundColor:"rgba(2, 132, 199, 0.28)",borderColor:"#38BDF8",borderWidth:1.2},modeChipText:{fontFamily:$.interSemiBold,fontSize:11,color:"rgba(255, 255, 255, 0.75)"},modeChipTextActive:{color:S.white,fontFamily:$.interBold,fontSize:11},modeChipIconText:{fontSize:13,color:"rgba(255, 255, 255, 0.7)",marginRight:1},subDivider:{width:1,height:18,backgroundColor:"rgba(255, 255, 255, 0.16)",marginHorizontal:4},colorDot:{width:22,height:22,borderRadius:11,borderWidth:2,borderColor:"rgba(255, 255, 255, 0.3)"},colorDotActive:{borderColor:S.white,transform:[{scale:1.25}]},actionPillBtn:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:10,paddingVertical:6,borderRadius:10,backgroundColor:"rgba(255, 255, 255, 0.10)"},actionPillText:{fontFamily:$.interSemiBold,fontSize:10.5,color:S.white},applyActionBtn:{backgroundColor:S.emerald600,paddingHorizontal:14,paddingVertical:6,borderRadius:10},applyActionText:{fontFamily:$.interBold,fontSize:11.5,color:S.white},cancelActionBtn:{backgroundColor:"rgba(255, 255, 255, 0.14)",paddingHorizontal:12,paddingVertical:6,borderRadius:10},cancelActionText:{fontFamily:$.interSemiBold,fontSize:11.5,color:"rgba(255, 255, 255, 0.85)"},studioToolbar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:"rgba(15, 20, 36, 0.95)",borderRadius:16,paddingVertical:4,paddingHorizontal:5,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.08)",gap:4},studioToolItem:{flex:1,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,paddingVertical:7,paddingHorizontal:4,borderRadius:12,borderWidth:1,borderColor:"transparent",position:"relative"},studioToolItemActive:{backgroundColor:"rgba(2, 132, 199, 0.22)",borderColor:"#38BDF8",borderWidth:1.2},studioToolLabel:{fontFamily:$.interSemiBold,fontSize:10,color:"rgba(255, 255, 255, 0.60)",letterSpacing:.1},studioToolLabelActive:{color:"#38BDF8",fontFamily:$.interBold},studioTabBadgeDot:{position:"absolute",top:6,right:12,width:5,height:5,borderRadius:2.5,backgroundColor:"#C084FC"},textAnnotationPill:{position:"absolute",flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:8,paddingVertical:4,borderRadius:8,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.35)",shadowColor:S.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:4},textAnnotationText:{fontFamily:$.interBold,fontSize:11},textDeleteBtn:{width:14,height:14,borderRadius:7,backgroundColor:"rgba(0, 0, 0, 0.45)",alignItems:"center",justifyContent:"center"},cropOverlayMask:{...N.absoluteFillObject,zIndex:100,elevation:100},cropDimMask:{position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.58)"},cropBoxFrame:{position:"absolute",borderWidth:2,borderStyle:"solid",borderColor:"#FFFFFF",backgroundColor:"rgba(56, 189, 248, 0.08)",shadowColor:S.black,shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:5,elevation:10},cropGridH:{position:"absolute",left:0,right:0,height:1,backgroundColor:"rgba(255, 255, 255, 0.45)"},cropGridV:{position:"absolute",top:0,bottom:0,width:1,backgroundColor:"rgba(255, 255, 255, 0.45)"},cropCornerBracket:{position:"absolute",width:20,height:20,borderColor:"#FFFFFF",shadowColor:S.black,shadowOffset:{width:0,height:1},shadowOpacity:.8,shadowRadius:3,elevation:6},bracketTL:{top:-3,left:-3,borderTopWidth:4,borderLeftWidth:4},bracketTR:{top:-3,right:-3,borderTopWidth:4,borderRightWidth:4},bracketBL:{bottom:-3,left:-3,borderBottomWidth:4,borderLeftWidth:4},bracketBR:{bottom:-3,right:-3,borderBottomWidth:4,borderRightWidth:4},cropEdgeBarTop:{position:"absolute",top:-3,left:"50%",marginLeft:-18,width:36,height:5,backgroundColor:"#FFFFFF",borderRadius:2.5},cropEdgeBarBottom:{position:"absolute",bottom:-3,left:"50%",marginLeft:-18,width:36,height:5,backgroundColor:"#FFFFFF",borderRadius:2.5},cropEdgeBarLeft:{position:"absolute",left:-3,top:"50%",marginTop:-18,width:5,height:36,backgroundColor:"#FFFFFF",borderRadius:2.5},cropEdgeBarRight:{position:"absolute",right:-3,top:"50%",marginTop:-18,width:5,height:36,backgroundColor:"#FFFFFF",borderRadius:2.5},cropHandleTouchArea:{position:"absolute",width:44,height:44,alignItems:"center",justifyContent:"center",zIndex:30},handleAreaTL:{top:-22,left:-22},handleAreaTR:{top:-22,right:-22},handleAreaBL:{bottom:-22,left:-22},handleAreaBR:{bottom:-22,right:-22},cropEdgeTouchAreaTop:{position:"absolute",top:-20,left:"25%",right:"25%",height:40,alignItems:"center",justifyContent:"center",zIndex:25},cropEdgeTouchAreaBottom:{position:"absolute",bottom:-20,left:"25%",right:"25%",height:40,alignItems:"center",justifyContent:"center",zIndex:25},cropEdgeTouchAreaLeft:{position:"absolute",left:-20,top:"25%",bottom:"25%",width:40,alignItems:"center",justifyContent:"center",zIndex:25},cropEdgeTouchAreaRight:{position:"absolute",right:-20,top:"25%",bottom:"25%",width:40,alignItems:"center",justifyContent:"center",zIndex:25},cropCancelBtn:{position:"absolute",top:14,left:14,width:38,height:38,borderRadius:19,backgroundColor:"#DC2626",borderWidth:2,borderColor:S.white,alignItems:"center",justifyContent:"center",shadowColor:S.black,shadowOffset:{width:0,height:4},shadowOpacity:.6,shadowRadius:8,elevation:16,zIndex:200},cropConfirmBtn:{position:"absolute",top:14,right:14,width:38,height:38,borderRadius:19,backgroundColor:"#10B981",borderWidth:2,borderColor:S.white,alignItems:"center",justifyContent:"center",shadowColor:S.black,shadowOffset:{width:0,height:4},shadowOpacity:.6,shadowRadius:8,elevation:16,zIndex:200},textModalBackdrop:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.70)",alignItems:"center",justifyContent:"center",padding:20},textModalCard:{width:"100%",maxWidth:360,backgroundColor:"#0F172A",borderRadius:16,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",padding:16,gap:12},textModalTitle:{fontFamily:$.interBold,fontSize:14,color:S.white},textModalInput:{minHeight:80,backgroundColor:"rgba(255, 255, 255, 0.08)",borderRadius:10,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.15)",padding:12,fontFamily:$.interRegular,fontSize:13,color:S.white,textAlignVertical:"top"},textModalActions:{flexDirection:"row",alignItems:"center",justifyContent:"flex-end",gap:10},modalCancelBtn:{paddingHorizontal:14,paddingVertical:8,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.1)"},modalCancelText:{fontFamily:$.interSemiBold,fontSize:12,color:"rgba(255, 255, 255, 0.7)"},modalConfirmBtn:{paddingHorizontal:16,paddingVertical:8,borderRadius:8,backgroundColor:S.indigo600},modalConfirmText:{fontFamily:$.interBold,fontSize:12,color:S.white},watermarkOverlay:{position:"absolute",bottom:0,left:0,right:0,backgroundColor:"rgba(3, 7, 18, 0.85)",paddingHorizontal:10,paddingVertical:5,flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderTopWidth:N.hairlineWidth,borderTopColor:"rgba(255, 255, 255, 0.2)"},watermarkText:{fontFamily:$.interBold,fontSize:9.5,color:"#38BDF8",letterSpacing:.2},watermarkTime:{fontFamily:$.interSemiBold,fontSize:9.5,color:"#94A3B8"},moreMenuItemIconText:{fontSize:14}});
|
|
814
|
+
<Sr visible={Ye}title={z("mediaGallery.deleteTitle","Delete Media?")}message={z("mediaGallery.deleteMessage",{filename:M.filename})}confirmText={z("mediaGallery.delete","Delete")}cancelText={z("common.cancel","Cancel")}isDestructive={!0}icon="trash"onConfirm={()=>{Je(!1),Bt(M),we()}}onCancel={()=>Je(!1)}/>
|
|
815
|
+
</Ci>};const t=N.create({modalBackdrop:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.70)",justifyContent:"flex-end",zIndex:999999,elevation:999999},modalBackdropPressable:{...N.absoluteFillObject},modalContentCard:{backgroundColor:"#070A14",borderTopLeftRadius:20,borderTopRightRadius:20,overflow:"hidden",shadowColor:S.black,shadowOffset:{width:0,height:-4},shadowOpacity:.25,shadowRadius:10,elevation:16},header:{width:"100%",zIndex:10,borderBottomWidth:N.hairlineWidth,borderBottomColor:"rgba(255, 255, 255, 0.12)"},headerInner:{width:"100%",flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingTop:6,paddingBottom:8,minHeight:48},headerLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0,marginRight:6},headerTextCol:{flex:1,minWidth:0,justifyContent:"center"},headerTitleRow:{flexDirection:"row",alignItems:"center",gap:6},title:{fontFamily:$.interBold,fontSize:13,color:S.white,letterSpacing:-.1,flexShrink:1},formatBadge:{backgroundColor:"rgba(255, 255, 255, 0.18)",paddingHorizontal:5,paddingVertical:1.5,borderRadius:4,borderWidth:N.hairlineWidth,borderColor:"rgba(255, 255, 255, 0.25)"},formatBadgeText:{fontFamily:$.interBold,fontSize:8.5,color:S.white,letterSpacing:.4},headerSubtitleRow:{flexDirection:"row",alignItems:"center",gap:4,marginTop:1},subtitleDim:{fontFamily:$.interMedium,fontSize:10,color:"rgba(255, 255, 255, 0.85)"},subtitleDot:{fontSize:10,color:"rgba(255, 255, 255, 0.45)"},subtitleSize:{fontFamily:$.interBold,fontSize:10,color:"#38BDF8"},headerBackBtn:{width:32,height:32,borderRadius:16,alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.12)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)"},headerRight:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:0},undoRedoGroup:{flexDirection:"row",alignItems:"center",backgroundColor:"rgba(255, 255, 255, 0.12)",borderRadius:8,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",height:30,overflow:"hidden"},undoHalfBtn:{paddingHorizontal:8,height:"100%",alignItems:"center",justifyContent:"center"},redoHalfBtn:{paddingHorizontal:8,height:"100%",alignItems:"center",justifyContent:"center"},undoDivider:{width:1,height:14,backgroundColor:"rgba(255, 255, 255, 0.2)"},actionDisabled:{opacity:.35},headerMoreBtn:{width:30,height:30,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.12)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",alignItems:"center",justifyContent:"center"},headerCloseBtn:{width:30,height:30,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.16)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.25)",alignItems:"center",justifyContent:"center"},headerSaveBtn:{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:"#059669",borderRadius:8,borderWidth:1,borderColor:"rgba(52, 211, 153, 0.45)",paddingHorizontal:11,height:30},headerSaveText:{fontFamily:$.interBold,fontSize:11,color:S.white},headerExportBtn:{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:"#0284C7",borderRadius:8,borderWidth:1,borderColor:"rgba(56, 189, 248, 0.5)",paddingHorizontal:10,height:30},headerExportText:{fontFamily:$.interBold,fontSize:11,color:S.white},headerActionBtn:{width:30,height:30,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.08)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)",alignItems:"center",justifyContent:"center"},moreMenuDropdown:{position:"absolute",top:52,right:12,backgroundColor:"#0F172A",borderRadius:12,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",padding:6,zIndex:100,elevation:12,shadowColor:S.black,shadowOffset:{width:0,height:4},shadowOpacity:.5,shadowRadius:8,minWidth:160},moreMenuItem:{flexDirection:"row",alignItems:"center",gap:8,paddingVertical:8,paddingHorizontal:10,borderRadius:8},moreMenuItemDestructive:{borderTopWidth:N.hairlineWidth,borderTopColor:"rgba(255, 255, 255, 0.1)",marginTop:4,paddingTop:8},moreMenuItemText:{fontFamily:$.interMedium,fontSize:12,color:S.white},stageWrapper:{flex:1,width:"100%",backgroundColor:"#03050A",paddingHorizontal:8,paddingTop:8,paddingBottom:4,minHeight:0},previewCard:{flex:1,width:"100%",borderRadius:12,overflow:"hidden",backgroundColor:"#03050A",alignItems:"center",justifyContent:"center",position:"relative"},canvasContainer:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",position:"relative"},imageCanvasWrapper:{position:"relative",alignItems:"center",justifyContent:"center"},instagramGridOverlay:{...N.absoluteFillObject,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.45)",zIndex:15},instagramGridHLine:{position:"absolute",left:0,right:0,height:1,backgroundColor:"rgba(255, 255, 255, 0.45)",shadowColor:"#000000",shadowOpacity:.6,shadowRadius:1,shadowOffset:{width:0,height:.5}},instagramGridVLine:{position:"absolute",top:0,bottom:0,width:1,backgroundColor:"rgba(255, 255, 255, 0.45)",shadowColor:"#000000",shadowOpacity:.6,shadowRadius:1,shadowOffset:{width:.5,height:0}},image:{width:"100%",height:"100%"},stageTopLeftBadge:{position:"absolute",top:12,left:12,flexDirection:"row",alignItems:"center",gap:6,backgroundColor:"rgba(10, 15, 29, 0.88)",paddingHorizontal:10,paddingVertical:5,borderRadius:12,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)",zIndex:20},badgeGlowDot:{width:7,height:7,borderRadius:3.5,backgroundColor:"#38BDF8",shadowColor:"#38BDF8",shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:4},badgeGlowText:{fontFamily:$.interSemiBold,fontSize:10.5,color:"rgba(255, 255, 255, 0.92)"},holdCompareBtn:{position:"absolute",bottom:12,left:12,flexDirection:"row",alignItems:"center",gap:6,backgroundColor:"rgba(10, 15, 29, 0.90)",paddingHorizontal:12,paddingVertical:7,borderRadius:14,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.15)",shadowColor:S.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:4,zIndex:20},holdCompareBtnPressed:{backgroundColor:S.indigo600,borderColor:S.indigo400},holdCompareText:{fontFamily:$.interSemiBold,fontSize:11,color:S.white},floatingZoomBar:{position:"absolute",right:12,bottom:12,backgroundColor:"rgba(10, 15, 29, 0.92)",borderRadius:22,borderWidth:1.2,borderColor:"rgba(255, 255, 255, 0.16)",paddingVertical:5,paddingHorizontal:5,alignItems:"center",gap:4,shadowColor:S.black,shadowOffset:{width:0,height:4},shadowOpacity:.5,shadowRadius:10,elevation:12,zIndex:35},zoomBtn:{width:28,height:28,borderRadius:14,backgroundColor:"rgba(255, 255, 255, 0.10)",alignItems:"center",justifyContent:"center"},zoomLevelBadge:{paddingHorizontal:4,paddingVertical:3},zoomLevelText:{fontFamily:$.interBold,fontSize:9.5,color:"#38BDF8",letterSpacing:.2},videoImageOverlay:{...N.absoluteFillObject,backgroundColor:"rgba(10, 13, 20, 0.28)"},videoFallbackBackdrop:{flex:1,width:"100%",backgroundColor:S.slate900,alignItems:"center",justifyContent:"center",padding:24},videoFallbackGlow:{position:"absolute",width:150,height:150,borderRadius:75,backgroundColor:"rgba(56, 189, 248, 0.08)"},videoFallbackTitle:{fontFamily:$.interSemiBold,fontSize:15,color:S.white,marginTop:12},videoFallbackSubtitle:{fontFamily:$.interRegular,fontSize:12,color:"rgba(255, 255, 255, 0.6)",marginTop:4},modernCenterPlayBtn:{position:"absolute",width:60,height:60,borderRadius:30,backgroundColor:"rgba(15, 23, 42, 0.78)",borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.45)",alignItems:"center",justifyContent:"center",shadowColor:S.black,shadowOffset:{width:0,height:4},shadowOpacity:.6,shadowRadius:10,elevation:12,zIndex:25},videoFloatingHud:{position:"absolute",bottom:12,left:12,right:12,backgroundColor:"rgba(10, 15, 29, 0.88)",borderRadius:14,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.16)",flexDirection:"row",alignItems:"center",paddingHorizontal:12,paddingVertical:8,gap:10,shadowColor:S.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:6,elevation:6,zIndex:20},videoHudProgressBar:{flex:1,height:4,backgroundColor:"rgba(255, 255, 255, 0.15)",borderRadius:2,position:"relative",overflow:"hidden"},videoHudProgressFill:{position:"absolute",top:0,bottom:0,backgroundColor:"#38BDF8",borderRadius:2},videoHudTimeText:{fontFamily:$.interBold,fontSize:10.5,color:S.white,letterSpacing:.2},videoHudBadge:{backgroundColor:"rgba(255, 255, 255, 0.12)",paddingHorizontal:5,paddingVertical:2,borderRadius:6},videoHudBadgeText:{fontFamily:$.interBold,fontSize:9,color:"#C084FC"},filmstripScroll:{flexDirection:"row",alignItems:"center",gap:6,paddingVertical:2},filmstripThumbItem:{width:48,height:48,borderRadius:8,borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.2)",overflow:"hidden",position:"relative",backgroundColor:"#0F172A"},filmstripThumbActive:{borderColor:"#38BDF8",borderWidth:2,transform:[{scale:1.05}]},filmstripThumbImg:{width:"100%",height:"100%"},filmstripThumbTime:{position:"absolute",bottom:2,right:2,backgroundColor:"rgba(0, 0, 0, 0.75)",paddingHorizontal:3,paddingVertical:1,borderRadius:3,fontFamily:$.interBold,fontSize:7.5,color:S.white},bottomControlsContainer:{width:"100%",backgroundColor:"#070A14",paddingHorizontal:8,paddingTop:6,paddingBottom:to.OS==="ios"?24:12,borderTopWidth:N.hairlineWidth,borderTopColor:"rgba(255, 255, 255, 0.08)",gap:6},contextToolPanel:{width:"100%",backgroundColor:"rgba(10, 15, 29, 0.96)",borderRadius:16,paddingVertical:9,paddingHorizontal:12,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)",gap:8},panelHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"100%"},panelHeaderLeft:{flexDirection:"row",alignItems:"center",gap:7},panelGlowDot:{width:7,height:7,borderRadius:3.5,backgroundColor:"#818CF8",shadowColor:"#818CF8",shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:4},panelHeaderTitle:{fontFamily:$.interBold,fontSize:11,color:S.white,letterSpacing:.6},panelValueBadge:{backgroundColor:"rgba(2, 132, 199, 0.22)",paddingHorizontal:8,paddingVertical:3,borderRadius:8,borderWidth:1,borderColor:"rgba(56, 189, 248, 0.45)"},panelValueText:{fontFamily:$.interBold,fontSize:10.5,color:"#38BDF8"},sliderRowContainer:{flexDirection:"row",alignItems:"center",width:"100%",gap:8,paddingHorizontal:2},sliderMinIndicator:{fontSize:10,color:"rgba(255, 255, 255, 0.5)"},sliderMaxIndicator:{fontSize:12,color:"rgba(255, 255, 255, 0.85)"},sliderTrackTouchable:{flex:1,height:36,justifyContent:"center"},sliderTrackBg:{width:"100%",height:4,backgroundColor:"rgba(255, 255, 255, 0.14)",borderRadius:2,position:"relative",justifyContent:"center"},sliderFillTrack:{height:4,backgroundColor:"#0284C7",borderRadius:2},sliderThumbHandle:{position:"absolute",width:20,height:20,borderRadius:10,backgroundColor:"#38BDF8",marginLeft:-10,alignItems:"center",justifyContent:"center",shadowColor:"#38BDF8",shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:6,elevation:6},sliderThumbInnerGlow:{width:8,height:8,borderRadius:4,backgroundColor:S.white},modeChipsScroll:{flexDirection:"row",alignItems:"center",gap:8,paddingTop:2},modeChip:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:12,paddingVertical:6,borderRadius:10,backgroundColor:"rgba(255, 255, 255, 0.08)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)"},modeChipActive:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:12,paddingVertical:6,borderRadius:10,backgroundColor:"rgba(2, 132, 199, 0.28)",borderColor:"#38BDF8",borderWidth:1.2},modeChipText:{fontFamily:$.interSemiBold,fontSize:11,color:"rgba(255, 255, 255, 0.75)"},modeChipTextActive:{color:S.white,fontFamily:$.interBold,fontSize:11},modeChipIconText:{fontSize:13,color:"rgba(255, 255, 255, 0.7)",marginRight:1},subDivider:{width:1,height:18,backgroundColor:"rgba(255, 255, 255, 0.16)",marginHorizontal:4},colorDot:{width:22,height:22,borderRadius:11,borderWidth:2,borderColor:"rgba(255, 255, 255, 0.3)"},colorDotActive:{borderColor:S.white,transform:[{scale:1.25}]},actionPillBtn:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:10,paddingVertical:6,borderRadius:10,backgroundColor:"rgba(255, 255, 255, 0.10)"},actionPillText:{fontFamily:$.interSemiBold,fontSize:10.5,color:S.white},applyActionBtn:{backgroundColor:S.emerald600,paddingHorizontal:14,paddingVertical:6,borderRadius:10},applyActionText:{fontFamily:$.interBold,fontSize:11.5,color:S.white},cancelActionBtn:{backgroundColor:"rgba(255, 255, 255, 0.14)",paddingHorizontal:12,paddingVertical:6,borderRadius:10},cancelActionText:{fontFamily:$.interSemiBold,fontSize:11.5,color:"rgba(255, 255, 255, 0.85)"},studioToolbar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:"rgba(15, 20, 36, 0.95)",borderRadius:16,paddingVertical:4,paddingHorizontal:5,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.08)",gap:4},studioToolItem:{flex:1,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,paddingVertical:7,paddingHorizontal:4,borderRadius:12,borderWidth:1,borderColor:"transparent",position:"relative"},studioToolItemActive:{backgroundColor:"rgba(2, 132, 199, 0.22)",borderColor:"#38BDF8",borderWidth:1.2},studioToolLabel:{fontFamily:$.interSemiBold,fontSize:10,color:"rgba(255, 255, 255, 0.60)",letterSpacing:.1},studioToolLabelActive:{color:"#38BDF8",fontFamily:$.interBold},studioTabBadgeDot:{position:"absolute",top:6,right:12,width:5,height:5,borderRadius:2.5,backgroundColor:"#C084FC"},textAnnotationPill:{position:"absolute",flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:8,paddingVertical:4,borderRadius:8,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.35)",shadowColor:S.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:4},textAnnotationText:{fontFamily:$.interBold,fontSize:11},textDeleteBtn:{width:14,height:14,borderRadius:7,backgroundColor:"rgba(0, 0, 0, 0.45)",alignItems:"center",justifyContent:"center"},cropOverlayMask:{...N.absoluteFillObject,zIndex:100,elevation:100},cropDimMask:{position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.58)"},cropBoxFrame:{position:"absolute",borderWidth:2,borderStyle:"solid",borderColor:"#FFFFFF",backgroundColor:"rgba(56, 189, 248, 0.08)",shadowColor:S.black,shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:5,elevation:10},cropGridH:{position:"absolute",left:0,right:0,height:1,backgroundColor:"rgba(255, 255, 255, 0.45)"},cropGridV:{position:"absolute",top:0,bottom:0,width:1,backgroundColor:"rgba(255, 255, 255, 0.45)"},cropCornerBracket:{position:"absolute",width:20,height:20,borderColor:"#FFFFFF",shadowColor:S.black,shadowOffset:{width:0,height:1},shadowOpacity:.8,shadowRadius:3,elevation:6},bracketTL:{top:-3,left:-3,borderTopWidth:4,borderLeftWidth:4},bracketTR:{top:-3,right:-3,borderTopWidth:4,borderRightWidth:4},bracketBL:{bottom:-3,left:-3,borderBottomWidth:4,borderLeftWidth:4},bracketBR:{bottom:-3,right:-3,borderBottomWidth:4,borderRightWidth:4},cropEdgeBarTop:{position:"absolute",top:-3,left:"50%",marginLeft:-18,width:36,height:5,backgroundColor:"#FFFFFF",borderRadius:2.5},cropEdgeBarBottom:{position:"absolute",bottom:-3,left:"50%",marginLeft:-18,width:36,height:5,backgroundColor:"#FFFFFF",borderRadius:2.5},cropEdgeBarLeft:{position:"absolute",left:-3,top:"50%",marginTop:-18,width:5,height:36,backgroundColor:"#FFFFFF",borderRadius:2.5},cropEdgeBarRight:{position:"absolute",right:-3,top:"50%",marginTop:-18,width:5,height:36,backgroundColor:"#FFFFFF",borderRadius:2.5},cropHandleTouchArea:{position:"absolute",width:44,height:44,alignItems:"center",justifyContent:"center",zIndex:30},handleAreaTL:{top:-22,left:-22},handleAreaTR:{top:-22,right:-22},handleAreaBL:{bottom:-22,left:-22},handleAreaBR:{bottom:-22,right:-22},cropEdgeTouchAreaTop:{position:"absolute",top:-20,left:"25%",right:"25%",height:40,alignItems:"center",justifyContent:"center",zIndex:25},cropEdgeTouchAreaBottom:{position:"absolute",bottom:-20,left:"25%",right:"25%",height:40,alignItems:"center",justifyContent:"center",zIndex:25},cropEdgeTouchAreaLeft:{position:"absolute",left:-20,top:"25%",bottom:"25%",width:40,alignItems:"center",justifyContent:"center",zIndex:25},cropEdgeTouchAreaRight:{position:"absolute",right:-20,top:"25%",bottom:"25%",width:40,alignItems:"center",justifyContent:"center",zIndex:25},cropCancelBtn:{position:"absolute",top:14,left:14,width:38,height:38,borderRadius:19,backgroundColor:"#DC2626",borderWidth:2,borderColor:S.white,alignItems:"center",justifyContent:"center",shadowColor:S.black,shadowOffset:{width:0,height:4},shadowOpacity:.6,shadowRadius:8,elevation:16,zIndex:200},cropConfirmBtn:{position:"absolute",top:14,right:14,width:38,height:38,borderRadius:19,backgroundColor:"#10B981",borderWidth:2,borderColor:S.white,alignItems:"center",justifyContent:"center",shadowColor:S.black,shadowOffset:{width:0,height:4},shadowOpacity:.6,shadowRadius:8,elevation:16,zIndex:200},textModalBackdrop:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.70)",alignItems:"center",justifyContent:"center",padding:20},textModalCard:{width:"100%",maxWidth:360,backgroundColor:"#0F172A",borderRadius:16,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",padding:16,gap:12},textModalTitle:{fontFamily:$.interBold,fontSize:14,color:S.white},textModalInput:{minHeight:80,backgroundColor:"rgba(255, 255, 255, 0.08)",borderRadius:10,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.15)",padding:12,fontFamily:$.interRegular,fontSize:13,color:S.white,textAlignVertical:"top"},textModalActions:{flexDirection:"row",alignItems:"center",justifyContent:"flex-end",gap:10},modalCancelBtn:{paddingHorizontal:14,paddingVertical:8,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.1)"},modalCancelText:{fontFamily:$.interSemiBold,fontSize:12,color:"rgba(255, 255, 255, 0.7)"},modalConfirmBtn:{paddingHorizontal:16,paddingVertical:8,borderRadius:8,backgroundColor:S.indigo600},modalConfirmText:{fontFamily:$.interBold,fontSize:12,color:S.white},watermarkOverlay:{position:"absolute",bottom:0,left:0,right:0,backgroundColor:"rgba(3, 7, 18, 0.85)",paddingHorizontal:10,paddingVertical:5,flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderTopWidth:N.hairlineWidth,borderTopColor:"rgba(255, 255, 255, 0.2)"},watermarkText:{fontFamily:$.interBold,fontSize:9.5,color:"#38BDF8",letterSpacing:.2},watermarkTime:{fontFamily:$.interSemiBold,fontSize:9.5,color:"#94A3B8"},moreMenuItemIconText:{fontSize:14}});
|