PageSourceSearch

https://faptap.net/assets/VideoForm.37e02e65.js

js faptap.net collected 2026-09-25 22:11:07 UTC 46,363 bytes, 1 lines download raw bytes

1import{d as It,u as $,a6 as zt,b as g,r as Oe,c as C,q as Ft,s as Ut,w as Y,e as Vt,L as At,a as k,ag as Dt,ah as Ct,a4 as Ot,a0 as Pt,v as f,f as m,j as d,n as w,x as L,i as s,t as v,h as U,cX as Mt,l as y,cE as tt,m as T,k as j,z as Ee,a8 as Nt,aq as Pe,p as K,_ as R,F as Q,N as Se,Q as Bt,aH as $t,g as re,M as st,ac as ke,ad as lt,aJ as jt,aI as Ht,D as Me,aE as Wt}from"./index.16ba4ea0.js";import{_ as ot}from"./SelectInput.vue_vue_type_script_setup_true_lang.493d8564.js";import{_ as Gt}from"./ExtraInput.vue_vue_type_style_index_0_lang.6d02d9ec.js";import"./vendor-highcharts.9b480a8e.js";import"https://cdn.jsdelivr.net/npm/[email protected]/dist/buttplug-wasm.mjs";const qt={key:0,class:"w-full py-3 px-4 bg-red-900/30 border border-red-500/50 rounded-md text-base text-red-300 mb-6 flex items-start gap-3"},Jt={class:"flex-1"},Yt={class:"text-sm text-red-200/80"},Kt={class:"flex flex-col items-center justify-center text-center mb-2"},Qt={class:"flex items-center gap-2"},Xt={key:0,class:"bg-zinc-800 flex justify-between mb-12 rounded-md text-md m-4"},Zt={class:"m-3.5 text-red-400"},es={class:"flex"},ts={key:1,class:"bg-zinc-800 flex justify-between mb-12 rounded-md text-md m-4"},ss={class:"flex"},ls={key:2,class:"bg-zinc-800 flex justify-between mb-12 rounded-md text-md m-4"},os={class:"m-3.5"},is={key:3,class:"mx-4 mb-6 rounded-lg border border-blue-500/30 bg-zinc-900/90 p-4"},as={class:"mb-3 flex items-center justify-between gap-4"},rs={class:"text-sm text-zinc-400"},ns={class:"font-mono text-lg text-blue-300"},ds={class:"h-2.5 overflow-hidden rounded-full bg-zinc-700"},us={class:"mt-4 grid grid-cols-2 gap-3 text-sm md:grid-cols-4"},fs={class:"rounded bg-zinc-800 p-3"},cs={class:"mt-1 text-zinc-100"},ms={class:"rounded bg-zinc-800 p-3"},ps={class:"mt-1 text-zinc-100"},vs={class:"rounded bg-zinc-800 p-3"},gs={class:"mt-1 text-zinc-100"},xs={key:0,class:"mt-4 rounded border border-amber-500/40 bg-amber-500/10 p-3 text-sm text-amber-200"},bs={class:"flex flex-col gap-y-6"},hs={class:"flex flex-col gap-y-1"},_s={class:"flex items-center gap-3 mt-2"},ys={class:"text-gray-200 font-medium"},ws={key:0,class:"flex flex-col gap-y-1"},Ts={class:"flex items-center gap-6 mt-1"},Es={class:"flex items-center space-x-2 cursor-pointer"},Ss=["checked","disabled"],ks=["checked","disabled"],Ls={key:0,class:"bg-red-500/10 border border-red-500/20 text-red-400 p-3 rounded-md flex gap-3 items-start mt-3"},Rs={class:"text-sm"},Is={class:"mt-0.5 text-red-400/90 leading-relaxed"},zs={key:1,class:"flex flex-col gap-y-1"},Fs={class:"flex gap-2 mt-1"},Us={class:"w-64 p-3"},Vs={class:"text-zinc-300 mt-3 text-sm"},As={class:"overflow-y-auto no-scrollbar"},Ds=["href"],Cs={key:2,class:"flex flex-col gap-y-4"},Os={class:"flex flex-col gap-y-1"},Ps={class:"mt-1"},Ms={class:"w-full flex gap-4"},Ns=["disabled"],Bs={key:0,class:"absolute top-2 right-2 flex gap-1.5 opacity-70 hover:opacity-90 z-10"},$s={key:1,class:"w-1/2 md:pl-0 border-zinc-700 md:border-t-0 border-t pt-2"},js={class:"flex flex-col gap-y-1"},Hs={class:"flex gap-2 mt-1"},Ws={class:"flex flex-col gap-y-1"},Gs={class:"mt-1"},qs={key:0,class:"relative w-48 aspect-video rounded overflow-hidden border border-zinc-700 bg-zinc-900 group"},Js=["src"],Ys={key:1,class:"flex items-center gap-3 w-full"},Ks=["disabled"],Qs={key:0,class:"text-xs text-zinc-400"},Xs={class:"flex flex-col gap-y-1"},Zs={class:"flex flex-col gap-y-1"},el={class:"flex justify-between items-center text-xs mt-1"},tl={class:"flex flex-col gap-y-4"},sl={class:"flex flex-col gap-y-1"},ll={class:"flex justify-between items-center text-xs mt-1"},ol={key:0},il={class:"flex flex-nowrap gap-2 mt-2 px-2 lg:px-0"},al={key:0,class:"ml-2 w-5 h-5 flex items-center justify-center rounded-full bg-white text-gray-800 text-xs"},rl={class:"flex flex-nowrap gap-2 mt-2 px-2 lg:px-0"},nl={key:0,class:"ml-2 w-5 h-5 flex items-center justify-center rounded-full bg-white text-gray-800 text-xs"},dl={class:"bg-amber-500/10 border border-amber-500/20 text-amber-400 p-3 rounded-md flex gap-3 items-start mt-1 mb-3"},ul={class:"flex flex-col gap-y-1"},fl={class:"text-xs text-zinc-400"},cl={key:0,class:"text-red-400 text-sm mt-1"},ml={class:"flex flex-col gap-y-1"},pl=["disabled"],vl={class:"flex flex-col gap-y-1"},gl={class:"flex gap-3 mt-1"},xl={class:"flex flex-col gap-y-1"},bl=["value"],hl={class:"flex flex-col gap-y-1"},_l={key:0,class:"flex items-center gap-1.5 text-zinc-300"},yl={key:0},wl={key:1},Tl={key:1,class:"text-center"},El={key:0},Sl={key:0,class:"mt-1 text-xs text-amber-300"},kl=["disabled"],Ll={class:"flex flex-col gap-y-1"},Rl={class:"flex gap-3 mt-1"},Il={key:3,class:"text-green-400 text-sm"},zl={key:4,class:"mt-2 mb-4"}
1,Fl={class:"flex flex-col"},Ul={class:"flex items-center gap-1.5"},Vl={class:"flex items-center gap-2 cursor-pointer select-none"},Al={class:"flex items-center justify-between gap-3 w-full"},Dl={class:"flex items-center gap-3"},Cl={key:0,class:"text-sm text-center text-red-500 mt-4 block"},Ol={class:"flex flex-col-reverse sm:flex-row gap-2 mt-6 justify-end"},Pl={key:0,class:"text-sm text-center text-red-500 mt-4 block"},Ml={class:"flex flex-col-reverse sm:flex-row gap-2 mt-6 justify-end"},Nl={class:"flex justify-end mt-6"},it=30*60,Bl=It({__name:"VideoForm",props:{video:{}},emits:["submit-video"],setup(at,{emit:rt}){const X=$(),{isAdmin:Ne}=zt(X),H=g(!1),Le=g(null),b={PROHIBITED_DOMAIN:"URL from a prohibited domain. See our Terms of Service.",THUMBNAIL_SIZE_LIMIT:"Thumbnail file size exceeds 2 MB limit.",ENTER_URL:"Please enter a URL to fetch metadata.",INVALID_HTTP_URL:"Please enter a valid HTTP or HTTPS URL (e.g., https://example.com/video).",FETCH_METADATA_FAILED:"Failed to fetch metadata for the provided URL. Please check the link or enter details manually.",LOAD_VIDEO_FAILED:"Failed to load video details. The video may not exist or you may not have permission to edit it.",SELECT_VIDEO_FILE:"Please select a video file.",SELECT_VIDEO_FILE_TO_PROCEED:"Please select a video file to proceed.",SAVE_SUCCESS:"Your video has been saved successfully.",UPLOAD_TIMEOUT:"Upload stopped after reaching the 30-minute server limit. Please use a faster connection or a smaller video.",INTERNAL_SERVER_ERROR:"Internal server error. Please try to contact support.",FETCH_PERFORMERS_ERROR:"Error fetching performers",WRONG_VIDEO_FORMAT:"Wrong format. Please select a video file (MP4, AVI, MOV, etc.).",NO_FILE_DROPPED:"No file dropped. Please drag and drop your video file again.",FIELD_STREAM_URL:"Stream URL",FIELD_VALID_STREAM_URL:"a valid Stream URL starting with http:// or https://",FIELD_VIDEO_FILE:"Video file",FIELD_VALID_SOURCE_URL:"a valid Source URL starting with http:// or https://",FIELD_TITLE:"Title",FIELD_TAGS:"Tags",FIELD_AT_LEAST_3_TAGS:"At least 3 Tags",FIELD_FUNSCRIPT_FILE:"Funscript file",FIELD_DESCRIPTION_LIMIT:"Description (must be 2500 characters or less)",FIELD_COMPLIANCE_TERMS:"Content Compliance terms agreement"},nt=l=>`Please fill in all required fields: ${l.join(", ")}.`,dt=l=>`This video is ${l}. The maximum upload size is 5 GiB.`,Re=l=>{if(!l||typeof l!="string")return!1;const e=l.trim();if(!e.startsWith("http://")&&!e.startsWith("https://"))return!1;try{const i=new URL(e);return i.protocol==="http:"||i.protocol==="https:"}catch{return!1}},W=()=>{if(Le.value){const l=Le.value.closest(".dialog");if(l){l.scrollTo({top:0,behavior:"smooth"});return}}window.scrollTo({top:0,behavior:"smooth"})},t=Oe({loading:!1,deleting:!1,restoring:!1,performers:[],tags:[],providers:[],projections:["MONO_FLAT","MONO_360","STEREO_FLAT_LR","STEREO_FLAT_LR_SQUARE","STEREO_FLAT_TB","STEREO_FLAT_TB_SQUARE","STEREO_180_LR","STEREO_180_LR_SPHERICAL","STEREO_180_TB","STEREO_180_TB_SPHERICAL","STEREO_360_LR","STEREO_360_TB","STEREO_FISHEYE_200_LR"],fields:{name:"",description:"",stream_url:"",stream_url_selfhosted:"",downloadable:!0,performers:[],tags:[],orientation:0,vr:!1,projection:"MONO_FLAT",upload_video:!1,duration:0,token:"",is_private:!1},fileerror:"",scriptSizeLabel:"",scriptSizeBytes:0,scriptLargeWarning:!1}),Be=g(""),$e=g(""),x=C(()=>{var l;return Boolean(Ne.value&&O.value&&((l=X.user)==null?void 0:l.id)&&me.value&&String(X.user.id)!==String(me.value))}),ut=C(()=>{const l=Be.value!==JSON.stringify(t.fields),e=D.value!==void 0||P.value||V.value!==$e.value;return l||e}),ne=()=>{Be.value=JSON.stringify(t.fields),$e.value=V.value},ft=C(()=>{const l=[...X.badTags||[],...X.animaTionTags||[]],e=new Map;for(const o of l){if(!o)continue;const n=(typeof o=="string"?o:o.name||"").toLowerCase();n&&!e.has(n)&&e.set(n,o)}return Array.from(e.values()).sort((o,n)=>(n.count||0)-(o.count||0))}),ct=C(()=>ft.value.map(l=>typeof l=="string"?l:l.name)),je=l=>(t.fields.tags||[]).some(e=>(typeof e=="string"?e:e.label||e.name||"").toLowerCase()===l.toLowerCase()),Ie=50,He=10,F=g(""),Z=g(0),de=g(!1),ee=g(!1);g("");const ze=g(),We=g(),G=g(!1),Fe=g(""),te=g(!1),se=Ft(),ue=Ut(),Ue=g([]),fe=g(""),ce=g(!1),S=Oe({stream_url:"",name:"",tags:"",script:"",terms:""});Y(()=>t.fields.stream_url,l=>{l&&l.trim()&&(S.stream_url="")}),Y(()=>t.fields.name,l=>{l&&l.trim()&&(S.name="")}),Y(()=>t.fields.tags,l=>{l&&l.length>=3&&(S.tags="",fe.value="")},{deep:!0});const V=g(""),D=g(void 0),le=g(""),P=g(!1),oe=g(!1),M=g(void 0),me=g(void 0),mt=l=>{if(x.value)return;P.value=!1;const e=l.target.files;if(e&&e[0]){const i=e[0];if(i.size>2*1024*1024){t.error=b.THUMBNAIL_SIZE_LIMIT;return}const o=new FileReader;o.onload=n=>{var E;const r=new Image;r.onload=()=>{const a=document.createElement("canvas");a.width=r.width,a.height=r.height;const p=a.getContext("2d");p&&(p.drawImage(r,0,0),a.toBlob(c=>{if(c){const _=i.name.replace(/\.[^/.]+$/,"")+".webp",A=new File([c],_,{type:"image/webp"});D.value=A,le.value=_,V.value=URL.createObjectURL(A),oe.value=!0}},"image/webp",.85))},r.src=(E=n.target)==null?void 0:E.result},o.readAsDataURL(i)}},Ge=()=>{x.value||(D.value=void 0,V.value="",le.value="",P.value=oe.value,oe.value=!1)},qe=l=>{if(x.value||!l)return;const e=t.fields.tags||[],i=e.findIndex(o=>
1(typeof o=="string"?o:o.label||o.name||"").toLowerCase()===l.toLowerCase());i>=0?e.splice(i,1):e.length<Ie&&e.push(l),e.length>=3&&(S.tags="",fe.value="")},Je=async l=>{if(x.value)return;if(!l||!l.trim()){t.error=b.ENTER_URL,W();return}if(!Re(l)){t.error=b.INVALID_HTTP_URL,W();return}ce.value=!0,t.error=void 0;const e=l.trim();let i=null;try{const o=await k.videos.getMetadataPh(e);o&&(o.title||o.duration||o.thumbnail)&&(i=o)}catch(o){console.warn("getMetadataPh failed",o)}if(i){i.title&&(t.fields.name=i.title,S.name=""),i.description&&(t.fields.description=i.description),i.duration&&(t.fields.duration=i.duration),i.thumbnail&&(V.value=i.thumbnail,oe.value=!1),Array.isArray(i.tags)&&i.tags.length>0&&(t.fields.tags=i.tags.slice(0,50),t.fields.tags.length>=3&&(S.tags="",fe.value=""));const o=i.performers||i.pornstars;if(Array.isArray(o)&&o.length>0){const n=o.map(r=>{const E=typeof r=="string"?r:r.name||r.label||"",a=typeof r=="object"&&r.id?r.id:E;return{label:E,value:a}}).filter(r=>r.label);t.fields.performers=n,ae.value=n}}else t.error=b.FETCH_METADATA_FAILED,W();ce.value=!1},O=C(()=>{var l;return!!se.params.id||!!((l=q.video)!=null&&l.id)}),q=at,pt=rt,vt=C(()=>{const l=O.value,e=l?se.fullPath:"https://faptap.net/studio/videos/create";return{meta:[{name:"description",content:l?"Edit your video on faptap.":"Dive into an immersive and interactive porn experience with FapTap."}],link:[{rel:"canonical",href:e}]}});Vt(vt);function Ve(l){t.fields.upload_video=l,l||(h&&(h.value=""),h=void 0,t.fields.duration=0,t.fileerror="",I.value={fileSize:"",fileType:""},N())}let I=g({fileSize:"",fileType:""}),h;const u=Oe({active:!1,phase:"idle",loaded:0,total:0,percent:0,bytesPerSecond:0,elapsedSeconds:0,etaSeconds:0,slowWarning:!1});let z,pe,ve,ge,xe,be=0,ie=[],he;const gt=C(()=>u.bytesPerSecond<=0?"Calculating...":`${(u.bytesPerSecond/(1024*1024)).toFixed(2)} MB/s`),xt=C(()=>u.bytesPerSecond<=0?"Calculating...":Ye(u.etaSeconds)),Ye=l=>{const e=Math.max(0,Math.round(l)),i=Math.floor(e/3600),o=Math.floor(e%3600/60),n=e%60;return i>0?`${i}h ${o}m ${n}s`:o>0?`${o}m ${n}s`:`${n}s`},_e=()=>{pe&&(clearTimeout(pe),pe=void 0),ve&&(clearInterval(ve),ve=void 0)},Ke=()=>{ge&&(clearTimeout(ge),ge=void 0),xe&&(clearTimeout(xe),xe=void 0),F.value="",t.error=void 0,t.fileerror="",ee.value=!1},N=()=>{_e(),u.active=!1,u.phase="idle",u.loaded=0,u.total=0,u.percent=0,u.bytesPerSecond=0,u.elapsedSeconds=0,u.etaSeconds=0,u.slowWarning=!1,be=0,ie=[],he=void 0,z=void 0},B=l=>{!z||z.signal.aborted||(he=l,z.abort())},Qe=()=>{N(),F.value="Video file upload is in progress. Please wait.",u.active=!0,u.phase="uploading",be=performance.now(),z=new AbortController,pe=setTimeout(()=>{u.slowWarning=!0,B("timeout")},it*1e3),ve=setInterval(()=>{u.elapsedSeconds=(performance.now()-be)/1e3},1e3)},bt=(l,e)=>{const i=performance.now();u.loaded=l,u.total=e,u.percent=e>0?Math.min(100,l/e*100):0,u.elapsedSeconds=(i-be)/1e3,e>0&&l>=e&&(u.phase="processing",F.value="Upload complete. Processing the video. Please wait.",_e()),ie.push({time:i,loaded:l});const o=i-8e3;ie=ie.filter(a=>a.time>=o);const n=ie[0],r=n?(i-n.time)/1e3:0,E=n?l-n.loaded:0;if(r>=3&&E>0){u.bytesPerSecond=E/r,u.etaSeconds=Math.max(0,e-l)/u.bytesPerSecond;const a=u.elapsedSeconds+u.etaSeconds;u.slowWarning=a>it}},ht=()=>{u.phase==="uploading"&&(u.percent=100,u.total>0&&(u.loaded=u.total),u.phase="processing",F.value="Upload complete. Processing the video. Please wait.",_e())},Xe=(l,e,i)=>new Promise((o,n)=>{const r=new XMLHttpRequest;r.open("POST",k.videos.uploadEndpoint(i)),r.withCredentials=!0,r.setRequestHeader("Fileuploadtoken",e);const E=()=>r.abort();if(z!=null&&z.signal.aborted){n(new Error("Upload cancelled."));return}z==null||z.signal.addEventListener("abort",E,{once:!0}),r.upload.onprogress=a=>{a.lengthComputable&&bt(a.loaded,a.total)},r.upload.onload=ht,r.onload=()=>{if(!(r.getResponseHeader("content-type")||"").includes("application/json")){const p=r.responseText.slice(0,120).replace(/\s+/g," ").trim();n(new Error(`Unexpected API response format (${r.status} ${r.statusText})${p?`: ${p}`:""}`));return}try{const p=JSON.parse(r.responseText);if("error"in p){n(p.error);return}o(p.data)}catch(p){n(new Error(`Failed to parse API response as JSON: ${p.message}`))}},r.onerror=()=>n(new Error("Video upload failed because of a network error.")),r.onabort=()=>n(new Error("Upload cancelled.")),r.ontimeout=()=>n(new Error("Video upload timed out.")),r.onloadend=()=>z==null?void 0:z.signal.removeEventListener("abort",E),r.send(l)}),Ae=g(!1),ye=C(()=>t.fields.is_private&&Ae.value&&!O.value);Y(()=>t.fields.is_private,l=>{l&&Ae.value&&t.fields.upload_video&&!O.value&&Ve(!1)}),Y(G,l=>{l&&(S.terms="",Fe.value="")}
1),At(async()=>{var l,e,i,o,n,r,E;try{const a=await k.tags.getTopTags();let p=[];Array.isArray(a)?p=a:(a==null?void 0:a.tags)&&Array.isArray(a.tags)&&(p=a.tags),Ue.value=p.map(c=>typeof c=="string"?c:c.name).filter(c=>{if(!c)return!1;const _=c.toLowerCase();return!_.includes("faptapai")&&_!=="ai"&&_!=="faptap ai"}).slice(0,20)}catch(a){console.error("Failed to load popular tags:",a)}try{const a=await k.user.getUploadQuota();Ae.value=(l=a==null?void 0:a.is_at_limit)!=null?l:!1}catch(a){console.error("Failed to load upload quota:",a)}if(se.params.id)try{const a=await k.videos.getVideoCreator(se.params.id,"manage"),p=(e=$().user)==null?void 0:e.id,c=(i=$().user)==null?void 0:i.admin,_=(o=a.user)==null?void 0:o.id;if(!(p===_||c)){console.log("User not authorized to edit this video. Redirecting to home page."),ue.push("/");return}De(a)}catch(a){console.error("Failed to load video details for editing:",a),t.error=b.LOAD_VIDEO_FAILED}else if(q.video){const a=(n=$().user)==null?void 0:n.id,p=(r=$().user)==null?void 0:r.admin,c=(E=q.video.user)==null?void 0:E.id;if(!(a===c||p)){console.log("User not authorized to edit this video. Redirecting to home page."),ue.push("/");return}De(q.video)}try{const a=await k.user.accessTokenFileUpload();a&&(t.fields.token=a,ne())}catch(a){console.error("Failed to retrieve file upload access token:",a)}try{let a=await k.providers.getProviders();if(Array.isArray(a)){const p=["eporner.com","erome.com","pornzog.com","noodlemagazine.com","playvids.com","pornhub.com","porntrex.com","rule34video.com","tnaflix.com","vk.com","xhamster.com","xnxx.com","xvideos.com","youporn.com"],c=_=>_.replace(/^www\./i,"");a=a.map(c).filter(_=>p.includes(_)).sort((_,A)=>_.localeCompare(A)),t.providers=a}}catch(a){console.error("Failed to load video providers:",a)}t.fields.token&&ne()}),Y(()=>se.params.id,async(l,e)=>{var i,o,n;if(l!==e&&(Te(),l))try{const r=await k.videos.getVideoCreator(l,"manage"),E=(i=$().user)==null?void 0:i.id,a=(o=$().user)==null?void 0:o.admin,p=(n=r.user)==null?void 0:n.id;if(!(E===p||a)){ue.push("/");return}De(r)}catch(r){console.error("Failed to load video details for editing:",r),t.error=b.LOAD_VIDEO_FAILED}});const De=l=>{var e,i,o,n;if(t.fields.id=l.id,me.value=(e=l.user)==null?void 0:e.id,t.fields.name=l.name,t.fields.downloadable=l.downloadable,t.fields.description=l.description||"",t.fields.stream_url=l.stream_url,t.fields.stream_url_selfhosted=l.stream_url_selfhosted||"",t.fields.orientation=l.orientation,t.fields.vr=l.vr,t.fields.projection=l.projection,t.fields.is_private=(i=l.is_private)!=null?i:!1,t.fields.upload_video=(!l.stream_url||!l.stream_url.trim())&&!!l.stream_url_selfhosted,l.tags&&(t.fields.tags=l.tags.map(r=>r.name)),l.performers&&(t.fields.performers=l.performers.map(r=>({label:r.name,value:r.id})),ae.value=l.performers.map(r=>({label:r.name,value:r.id}))),V.value=l.user_thumbnail_url||"",oe.value=Boolean(l.user_thumbnail_url),P.value=!1,D.value=void 0,le.value="",M.value=l.script?{url:l.script.url,total_actions:l.script.total_actions}:void 0,((o=l.script)==null?void 0:o.url)&&!((n=M.value)!=null&&n.total_actions)){const r=l.id;k.videos.getScript(l.script.url).then(E=>{Array.isArray(E)&&t.fields.id===r&&M.value&&(M.value.total_actions=E.length)}).catch(()=>{})}Z.value=Number(l.is_softdeleted),l.is_softdeleted&&Number(l.is_softdeleted)>0&&(de.value=!0),ne()},_t=async()=>{var o,n,r,E;Fe.value="",fe.value="",S.stream_url="",S.name="",S.tags="",S.script="",S.terms="",t.fileerror="";let l=!1,e=!1,i=!1;try{ze.value&&ze.value.commitInput(),t.error=void 0;let a=[];if(t.fields.upload_video?(!((o=h==null?void 0:h.files)==null?void 0:o[0])&&!t.fields.id&&a.push(b.FIELD_VIDEO_FILE),t.fields.stream_url&&t.fields.stream_url.trim()&&!Re(t.fields.stream_url)&&a.push(b.FIELD_VALID_SOURCE_URL)):!t.fields.stream_url||!t.fields.stream_url.trim()?a.push(b.FIELD_STREAM_URL):Re(t.fields.stream_url)||a.push(b.FIELD_VALID_STREAM_URL),(!t.fields.name||!t.fields.name.trim())&&a.push(b.FIELD_TITLE),(!t.fields.tags||t.fields.tags.length<3)&&a.push(!t.fields.tags||t.fields.tags.length===0?b.FIELD_TAGS:b.FIELD_AT_LEAST_3_TAGS),!O.value&&(!t.fields.script||t.fields.script.length===0)&&a.push(b.FIELD_FUNSCRIPT_FILE),t.fields.description&&t.fields.description.length>2500&&a.push(b.FIELD_DESCRIPTION_LIMIT),!O.value&&!G.value&&a.push(b.FIELD_COMPLIANCE_TERMS),a.length>0){t.error=nt(a),W();return}t.loading=!0,t.error=void 0,F.value="Video is being processed. This may take a few minutes. Please wait.",t.fields.performers=t.fields.performers.map(c=>typeof c=="string"?{name:c}:c!=null&&c.label?{name:c.label}:c!=null&&c.name?c:{name:String(c)});let p;
1if(t.fields.id){const c=new FormData,_=(n=h==null?void 0:h.files)==null?void 0:n[0];c.append("data",JSON.stringify({...t.fields,upload_size:(_==null?void 0:_.size)||0,clear_user_thumbnail:P.value})),D.value&&c.append("thumbnail",D.value),_&&c.append("video",_),l=Boolean(_);const A=t.fields.token;l&&Qe(),p=l?await Xe(c,A,t.fields.id):await k.videos.updateVideo(c,t.fields.id,!1,A),e=l,t.fields.script&&await k.videos.updateScript(t.fields.id,t.fields.script)}else{const c=new FormData,_=(r=h==null?void 0:h.files)==null?void 0:r[0];if(c.append("data",JSON.stringify({...t.fields,content_compliance_terms_accepted:G.value,upload_size:(_==null?void 0:_.size)||0,clear_user_thumbnail:P.value})),D.value&&(t.fields.upload_video||c.append("thumbnail",D.value)),t.fields.upload_video)if(_)c.append("video",_),D.value&&c.append("thumbnail",D.value);else{t.error=b.SELECT_VIDEO_FILE,t.fileerror=b.SELECT_VIDEO_FILE,t.loading=!1,F.value="",W();return}l=Boolean(((E=h==null?void 0:h.files)==null?void 0:E.length)&&h.files[0]),l&&Qe();const A=t.fields.token;p=l?await Xe(c,A):await k.videos.createVideo(c,!1,A),e=l}l&&(u.phase="completed",F.value="Video processing completed."),t.fileerror=b.SAVE_SUCCESS,q.video?pt("submit-video",p):ge=setTimeout(()=>{Te(),t.fileerror="",ue.push("/studio/videos")},1e3)}catch(a){if(F.value="",he==="timeout"){t.error=b.UPLOAD_TIMEOUT;return}if(he==="navigation")return;const p=(a==null?void 0:a.message)||String(a);if(p==="Upload cancelled."&&!u.active)return;if(p==="This field is required."){Fe.value=p,i=!0;return}p.toLowerCase().includes("pq")?t.error=b.INTERNAL_SERVER_ERROR:t.error=p}finally{t.loading=!1,e?q.video&&(xe=setTimeout(()=>{F.value="",N()},1500)):(F.value="",N()),t.error&&!i&&W()}},yt=l=>{const e=l.target.files;if(!e.length){t.fields.script=void 0,t.filename="",t.scriptSizeLabel="",t.scriptSizeBytes=0,t.scriptLargeWarning=!1;return}const i=new FileReader;i.onload=()=>{t.fields.script=JSON.parse(i.result).actions.map(o=>[o.at,o.pos]),t.filename=e[0].name,t.scriptSizeBytes=e[0].size,t.scriptSizeLabel=J(e[0].size),t.scriptLargeWarning=e[0].size>3*1024*1024,S.script=""},i.readAsText(e[0])},wt=async l=>{if(l.length<2){t.tags=[];return}try{const e=await k.tags.getPendingTags({query:l,page:1,limit:10});t.tags=(e.tags||[]).map(i=>i.name)}catch(e){console.error("findTags error:",e),t.tags=[]}},ae=g([]),we=g(""),Tt=async l=>{we.value="",ae.value=[];try{const e=await k.performers.getPerformers({query:l,page:1,limit:5,force:!0,contextPage:"create-video"});if(!e||!e.performers)return;const i=e.performers;if(i.length===0)return;ae.value=i.map(o=>({label:o.name,value:o.id}))}catch(e){we.value=b.FETCH_PERFORMERS_ERROR,console.error("FindPerformers Error:",e)}},Et=async()=>{if(!!t.fields.id){t.loading=!0,t.error=void 0;try{await k.videos.deleteVideo(t.fields.id),window.location.href="/videos"}catch(l){t.error=(l==null?void 0:l.message)||String(l)}finally{t.loading=!1}}},St=async()=>{if(!!t.fields.id){t.loading=!0,t.error=void 0;try{await k.videos.restoreVideo(t.fields.id),t.restoring=!1,ee.value=!0,Z.value=0,de.value=!1,setTimeout(()=>{window.location.href="/studio/videos",ee.value=!1},2e3)}catch(l){t.error=(l==null?void 0:l.message)||String(l)}finally{t.loading=!1}}},Ze=l=>{var e;if(B("navigation"),N(),t.fileerror="",h=l.target,!h.files||h.files.length===0)I.value.fileSize="",I.value.fileType="",t.fileerror=b.SELECT_VIDEO_FILE_TO_PROCEED;else{const i=(e=h==null?void 0:h.files)==null?void 0:e[0];if(i&&i.type.startsWith("video/")){if(i.size>5368709120){I.value.fileSize=J(i.size),I.value.fileType=i.type,t.fileerror=dt(J(i.size)),t.fields.duration=0,"value"in h&&(h.value=""),h=void 0;return}if(i.size){I.value.fileSize=J(i.size),I.value.fileType=i.type;const n=document.createElement("video");n.preload="metadata",n.onloadedmetadata=()=>{window.URL.revokeObjectURL(n.src),n.duration,t.fields.duration=Math.round(n.duration)},n.src=URL.createObjectURL(i)}}else t.fileerror=b.WRONG_VIDEO_FORMAT}},kt=l=>{B("navigation"),l&&"value"in l&&(l.value=""),h=void 0,t.fields.duration=0,I.value={fileSize:"",fileType:""},N()},J=l=>{if(l===0)return"0 Bytes";const e=1024,i=2,o=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],n=Math.floor(Math.log(l)/Math.log(e));return parseFloat((l/Math.pow(e,n)).toFixed(i))+" "+o[n]},Lt=l=>{l.preventDefault(),l.stopPropagation()},Rt=l=>{var i;l.preventDefault(),l.stopPropagation();const e=(i=l.dataTransfer)==null?void 0:i.files;if(e&&e.length>0){const o=e[0];t.fileerror="",Ze({target:{files:[o]}})}else t.fileerror=b.NO_FILE_DROPPED};Dt(()=>{B("navigation"),H.value=!1,Te()}),Ct(()=>{B("navigation"),H.value=!1,Te()}),Ot(()=>{B("navigation"),Ke(),_e()});const Ce=g(),et=g(0),Te=()=>{B("navigation"),Ke(),N(),t.fields={name:"",description:"",stream_url:"",stream_url_selfhosted:"",downloadable:!0,performers:[],tags:[],orientation:0,vr:!1,projection:"MONO_FLAT",upload_video:!1,duration:0,token:t.fields.token,is_private:!1},et.value+=1,t.filename="",t.fields.script=void 0,t.scriptSizeLabel="",t.scriptSizeBytes=0,t.scriptLargeWarning=!1,h&&(h.value=""),I.value={fileSize:"",fileType:""},Ce.value&&(Ce.value.value=""),t.fields.upload_video=!1,M.value=void 0,me.value=void 0,t.restoring=!1,Z.value=0,de.value=!1,ee.value=!1,Ge(),P.value=!1,S.stream_url="",S.name="",S.tags="",S.script="",S.terms="",G.value=!1,te.value=!1,ne()};return(l,e)=>{const i=Pt("router-link");return f(),m(Q,null,[d(tt,{name:"fade"},{default:w(()=>[de.value?(f(),m("div",qt,[d(L,{name:"alert-circle",class:"h-5 w-5 mt-0.5 flex-shrink-0"}),s("div",Jt,[e[31]||(e[31]=s("p",{class:"font-semibold mb-1"},"Video Flagged as Broken",-1)),s("p",Yt,"This video was flagged as broken on "+v(U(Mt)(Z.value))+" because the source could not be found. Please verify and update the video source URL.",1)])])):y("",!0)]),_:1}),s("div",{ref_key:"formWrapperRef",ref:Le,class:"flex flex-col gap-y-3"},[s("div",Kt,[s("div",Qt,[e[32]||(e[32]=s("h1",{class:"text-white font-medium text-xl"},"Upload Script",-1)),d(L,{name:"document-plus",class:"h-5 w-5 mb-1"})]),e[33]||(e[33]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1"},[T("Need help? Check out our "),s("a",{target:"_blank",href:"/how-to-upload-a-script",class:"text-blue-400 hover:underline"},"step-by-step guide"),T(" on how to properly fill out this form and tag your upload.")],-1))]),s("form",{novalidate:"",onSubmit:j(_t,["prevent"]),class:"flex flex-col gap-y-3 mt-4"},[d(Ee,{type:"hidden",modelValue:t.fields.token,"onUpdate:modelValue":e[0]||(e[0]=o=>t.fields.token=o)},null,8,["modelValue"]),(t.error||t.fileerror)&&t.error!==b.PROHIBITED_DOMAIN&&t.fileerror!==b.PROHIBITED_DOMAIN?(f(),m("div",Xt,[s("div",Zt,v(t.error||t.fileerror),1),s("div",es,[d(L,{name:"close",class:"h-6 w-6 mr-4 my-auto pointer",onClick:e[1]||(e[1]=o=>{t.error="",t.fileerror=""})})])])):y("",!0),t.error===b.PROHIBITED_DOMAIN?(f(),m("div",ts,[e[34]||(e[34]=s("div",{class:"m-3.5 text-red-400"},[T(" URL from a prohibited domain. See our "),s("a",{href:"/terms-of-service",target:"_blank",class:"underline"},"Terms of Service"),T(". ")],-1)),s("div",ss,[d(L,{name:"close",class:"h-6 w-6 mr-4 my-auto pointer",onClick:e[2]||(e[2]=o=>t.error="")})])])):y("",!0),F.value?(f(),m("div",ls,[s("div",os,v(F.value),1)])):y("",!0),u.phase==="uploading"?(f(),m("div",is,[s("div",as,[s("div",null,[e[35]||(e[35]=s("p",{class:"font-medium text-white"},"Video upload",-1)),s("p",rs,v(J(u.loaded))+" of "+v(J(u.total)),1)]),s("span",ns,v(u.percent.toFixed(1))+"%",1)]),s("div",ds,[s("div",{class:"h-full rounded-full bg-blue-500 transition-[width] duration-300",style:Nt({width:`${u.percent}%`})},null,4)]),s("div",us,[s("div",fs,[e[36]||(e[36]=s("p",{class:"text-zinc-500"}
1,"Upload speed",-1)),s("p",cs,v(gt.value),1)]),s("div",ms,[e[37]||(e[37]=s("p",{class:"text-zinc-500"},"Upload time",-1)),s("p",ps,v(Ye(u.elapsedSeconds)),1)]),s("div",vs,[e[38]||(e[38]=s("p",{class:"text-zinc-500"},"Time remaining",-1)),s("p",gs,v(xt.value),1)]),e[39]||(e[39]=s("div",{class:"rounded bg-zinc-800 p-3"},[s("p",{class:"text-zinc-500"},"Server limit"),s("p",{class:"mt-1 text-zinc-100"},"30 minutes")],-1))]),u.slowWarning?(f(),m("div",xs," At the current upload speed, this transfer is projected to take more than 30 minutes and may be discarded. ")):y("",!0)])):y("",!0),s("div",bs,[s("div",hs,[e[40]||(e[40]=s("label",{class:"text-white font-medium"},"Privacy",-1)),e[41]||(e[41]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1"},"Turn on to make the video private (only viewable via a direct link).",-1)),s("div",_s,[d(Pe,{modelValue:t.fields.is_private,"onUpdate:modelValue":e[3]||(e[3]=o=>t.fields.is_private=o),disabled:x.value},null,8,["modelValue","disabled"]),s("span",ys,v(t.fields.is_private?"Private":"Public"),1)])]),t.fields.id?y("",!0):(f(),m("div",ws,[e[48]||(e[48]=s("label",{class:"text-white font-medium"},"Video Source",-1)),e[49]||(e[49]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1"},"Choose 'Stream URL' to link a video hosted on another platform or 'File Upload' to upload your own video file.",-1)),s("div",Ts,[s("label",Es,[s("input",{type:"radio",checked:!t.fields.upload_video,disabled:x.value,onClick:e[4]||(e[4]=o=>!x.value&&Ve(!1)),class:"form-radio text-blue-600"},null,8,Ss),e[42]||(e[42]=s("span",null,"Stream URL",-1))]),s("label",{class:K(["flex items-center space-x-2",ye.value||x.value?"cursor-not-allowed opacity-50":"cursor-pointer"])},[s("input",{type:"radio",checked:t.fields.upload_video,disabled:ye.value||x.value,onClick:e[5]||(e[5]=o=>!ye.value&&!x.value&&Ve(!0)),class:"form-radio text-blue-600"},null,8,ks),e[43]||(e[43]=s("span",null,"File Upload",-1))],2)]),d(tt,{name:"fade"},{default:w(()=>[ye.value?(f(),m("div",Ls,[d(L,{name:"alert-circle",class:"h-5 w-5 shrink-0 mt-0.5"}),s("div",Rs,[e[47]||(e[47]=s("p",{class:"font-medium text-red-300"},"File Upload Unavailable",-1)),s("p",Is,[e[45]||(e[45]=T("You have reached your limit for private file uploads, as outlined in our ",-1)),d(i,{to:"/terms-of-service",class:"text-red-400 hover:underline"},{default:w(()=>[...e[44]||(e[44]=[s("u",null,"Terms of Service ",-1)])]),_:1}),e[46]||(e[46]=T(". To unlock that feature, please make some of your existing uploaded videos public, or delete them. You can still create private videos using the Stream URL option.",-1))])])])):y("",!0)]),_:1})])),t.fields.upload_video?(f(),m("div",Cs,[s("div",Os,[e[58]||(e[58]=s("label",{class:"text-white font-medium"},"Video",-1)),e[59]||(e[59]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1"},"Upload a video file from your device.",-1)),s("div",Ps,[s("div",Ms,[s("div",{class:K(["flex items-center justify-center w-full flex-1 aspect-video border rounded-lg cursor-pointer border-gray-500 bg-zinc-800 hover:bg-zinc-700 relative md:flex-row flex-col md:gap-10 gap-4",U(I).fileSize?" h-56 md:h-40":"h-40"])},[s("label",{for:"dropzoneFile",class:"w-full flex flex-col items-center justify-center border-zinc-700 md:border-r",onDragover:j(Lt,["prevent"]),onDrop:j(Rt,["prevent"])},[d(L,{name:"upload-video",class:"h-8 w-8 mb-4 text-gray-500"}),e[55]||(e[55]=s("p",{class:"mb-2 text-sm text-gray-500"},[s("span",{class:"font-semibold"},"Click to Upload Your Video "),T(" or drag and drop")],-1)),e[56]||
1(e[56]=s("p",{class:"text-xs text-gray-500 dark:text-gray-400"},"Video files only (MP4, AVI, etc.). Maximum 5 GiB.",-1)),s("input",{id:"dropzoneFile",type:"file",class:"hidden",accept:"video/*",disabled:x.value,onChange:j(Ze,["prevent"]),ref:"videoFileInput"},null,40,Ns)],32),U(I).fileSize?(f(),m("div",Bs,[s("div",{class:"border text-red-400 border-red-600 rounded backdrop-blur px-3 py-1 font-medium text-sm lg:text-xs cursor-pointer",onClick:e[10]||(e[10]=o=>kt(l.$refs.videoFileInput))},[d(L,{name:"trash",class:"h-7 w-7"})])])):y("",!0),U(I).fileSize?(f(),m("div",$s,[e[57]||(e[57]=s("strong",null," File Description",-1)),s("ul",null,[s("li",null,"File size : "+v(U(I).fileSize),1),s("li",null,"File type : "+v(U(I).fileType),1),s("li",null,"Duration : "+v(t.fields.duration)+" Seconds",1)])])):y("",!0)],2)])])]),s("div",js,[e[61]||(e[61]=s("label",{class:"text-white font-medium"},"Source URL",-1)),e[62]||(e[62]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1"},"Paste the link to the original video page.",-1)),s("div",Hs,[d(Ee,{type:"url",class:"flex-1",modelValue:t.fields.stream_url,"onUpdate:modelValue":e[11]||(e[11]=o=>t.fields.stream_url=o),placeholder:"Source URL",disabled:x.value},null,8,["modelValue","disabled"]),d(R,{type:"button",theme:"blue",loading:ce.value,disabled:x.value,onClick:e[12]||(e[12]=o=>Je(t.fields.stream_url))},{default:w(()=>[...e[60]||(e[60]=[T(" Fetch Metadata ",-1)])]),_:1},8,["loading","disabled"])])])])):(f(),m("div",zs,[e[53]||(e[53]=s("label",{class:"text-white font-medium"},"Stream URL",-1)),e[54]||(e[54]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1"},"Paste a public video URL from a supported website.",-1)),s("div",Fs,[d(Ee,{type:"url",class:"flex-1",modelValue:t.fields.stream_url,"onUpdate:modelValue":e[6]||(e[6]=o=>t.fields.stream_url=o),placeholder:"Stream URL",disabled:x.value},null,8,["modelValue","disabled"]),s("div",{ref_key:"helpIcon",ref:We,class:"flex items-center"},[d(R,{onClick:e[7]||(e[7]=o=>H.value=!H.value),type:"button",theme:"transparent",class:"px-1"},{default:w(()=>[d(L,{name:"help-outline",class:"h-6 w-6 text-zinc-400"})]),_:1})],512),d(R,{type:"button",theme:"blue",loading:ce.value,disabled:x.value,onClick:e[8]||(e[8]=o=>Je(t.fields.stream_url))},{default:w(()=>[...e[50]||(e[50]=[T(" Fetch Metadata ",-1)])]),_:1},8,["loading","disabled"]),d(Bt,{modelValue:H.value,"onUpdate:modelValue":e[9]||(e[9]=o=>H.value=o),target:We.value,placement:"right",offset:8},{default:w(()=>[s("div",Us,[e[51]||(e[51]=s("p",{class:"text-white font-medium"},"Faptap-Supported Sites",-1)),s("ul",Vs,[s("div",As,[(f(!0),m(Q,null,Se(t.providers,o=>(f(),m("li",{key:o},[s("a",{href:`https://${o}/`,target:"_blank",class:"hover:text-white"},v(o),9,Ds)]))),128))])]),e[52]||(e[52]=s("ul",{class:"text-zinc-300 mt-3 text-sm"},[s("li",null,[s("p",null,[s("strong",{class:"text-white font-medium"},"Note"),T(": We support many additional sites via community tools. Almost any site should work. ("),s("a",{href:"/how-to-upload-a-script",target:"_blank",class:"text-blue-400 hover:underline"},"learn more"),T(")")])])],-1))])]),_:1},8,["modelValue","target"])])])),s("div",Ws,[e[64]||(e[64]=s("label",{class:"text-white font-medium"},"Thumbnail",-1)),e[65]||(e[65]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1"},"Upload a custom image to use as the video cover (JPG or PNG only, 2 MB max., 1280x720 recommended).",-1)),s("div",Gs,[V.value?(f(),m("div",qs,[s("img",{src:V.value.startsWith("blob:")||V.value.startsWith("data:")?V.value:U($t)(V.value),class:"w-full h-full object-cover"},null,8,Js),x.value?y("",!0):(f(),m("button",{key:0,type:"button",onClick:j(Ge,["prevent","stop"]),class:"absolute top-1 right-1 bg-red-600/80 hover:bg-red-600 text-white rounded p-1"},[d(L,{name:"trash",class:"h-4 w-4"})]))])):(f(),m("div",Ys,[s("label",{class:K(["flex-1 px-4 py-2 bg-zinc-800 hover:bg-zinc-700 text-zinc-200 border border-zinc-700 rounded-md cursor-pointer text-sm font-medium flex items-center justify-center gap-2",{"opacity-60 cursor-not-allowed hover:bg-zinc-800":x.value}])},[e[63]||(e[63]=s("span",null,"Upload Thumbnail",-1)),d(L,{name:"upload",class:"h-4 w-4"}),s("input",{type:"file",accept:"image/jpeg,image/png,image/webp",class:"hidden",disabled:x.value,onChange:mt},null,40,Ks)],2),le.value?(f(),m("span",Qs,v(le.value),1)):y("",!0)]))])]),s("div",Xs,[e[66]||(e[66]=s("label",{class:"text-white font-medium"},"Title",-1)),e[67]||(e[67]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1"},"Enter a clear, descriptive title. Keep it concise (60 characters max.) and front-load keywords (e.g., performer name, actions).",-1)),d(Ee,{modelValue:t.fields.name,"onUpdate:modelValue":e[13]||(e[13]=o=>t.fields.name=o),placeholder:"Title",disabled:x.value,class:"mt-1"},null,8,["modelValue","disabled"])]),s("div",Zs,[e[68]||(e[68]=s("label",{class:"text-white font-medium"},"Description",-1)),e[69]||(e[69]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1"},"Describe the scene and your scripting style. Add external links to promote your other profiles.",-1)),(f(),re(Gt,{modelValue:t.fields.description,"onUpdate:modelValue":e[14]||(e[14]=o=>t.fields.description=o),placeholder:"Description",key:et.value,disabled:x.value,class:"mt-1"},null,8,["modelValue","disabled"])),s("div",el,[s("span",{class:K((t.fields.description||"").length>2500?"text-red-400 font-medium":"text-zinc-400")},v((t.fields.description||"").length)+"/2500 ",3)])]),s("div",tl,[s("div",sl,[e[70]||
1(e[70]=s("label",{class:"text-white font-medium"},"Tags",-1)),e[71]||(e[71]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1"},"Enter at least 3 tags (videos with 3+ tags get ~20% more views on average). Select from the autocomplete dropdown or paste a comma-separated list.",-1)),d(ot,{ref_key:"tagsInput",ref:ze,onSearch:wt,modelValue:t.fields.tags,"onUpdate:modelValue":e[15]||(e[15]=o=>t.fields.tags=o),options:t.tags,max:U(Ie),placeholder:"Tags",create:!0,disabled:x.value,class:"mt-1"},null,8,["modelValue","options","max","disabled"]),s("div",ll,[s("span",{class:K(t.fields.tags.length<3?" font-medium":"text-zinc-400")},v(t.fields.tags.length)+"/"+v(U(Ie)),3)])]),Ue.value.length>0?(f(),m("div",ol,[e[72]||(e[72]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1"},"Click to add the most popular tags.",-1)),d(st,{gap:"gap-1.5",class:"-mx-2 lg:mx-0 mb-3"},{default:w(()=>[s("div",il,[(f(!0),m(Q,null,Se(Ue.value,o=>(f(),re(R,{key:o,type:"button",disabled:x.value,onClick:j(n=>qe(o),["prevent","stop"]),class:"flex items-center bg-gray-800 text-white px-3 py-1 rounded-full text-sm hover:bg-gray-700 transition-colors"},{default:w(()=>[T(v(o)+" ",1),je(o)?(f(),m("span",al," \u2715 ")):y("",!0)]),_:2},1032,["disabled","onClick"]))),128))])]),_:1}),e[73]||(e[73]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1 mb-2"},"Click to add if your content contains any of these sensitive tags.",-1)),d(st,{gap:"gap-1.5",class:"-mx-2 lg:mx-0"},{default:w(()=>[s("div",rl,[(f(!0),m(Q,null,Se(ct.value,o=>(f(),re(R,{key:o,type:"button",disabled:x.value,onClick:j(n=>qe(o),["prevent","stop"]),class:"flex items-center bg-gray-800 border border-amber-900/50 text-amber-300 px-3 py-1 rounded-full text-sm hover:bg-amber-900/40 transition-colors"},{default:w(()=>[T(v(o)+" ",1),je(o)?(f(),m("span",nl," \u2715 ")):y("",!0)]),_:2},1032,["disabled","onClick"]))),128))])]),_:1})])):y("",!0),s("div",dl,[d(L,{name:"alert-circle",class:"h-5 w-5 shrink-0 mt-0.5 text-amber-400"}),e[74]||(e[74]=s("div",{class:"text-sm"},[s("p",{class:"font-medium text-amber-300"},"Mandatory Sensitive Tags"),s("p",{class:"mt-0.5 text-amber-400/90 leading-relaxed"},"Sensitive content must be tagged correctly. Untagged videos will be hidden or deleted, and you may lose your Creator permissions")],-1))])]),s("div",ul,[e[75]||(e[75]=s("label",{class:"text-white font-medium"},"Performers",-1)),e[76]||(e[76]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1"},"Give credit to the performers in this video. Select from the autocomplete dropdown or paste a comma-separated list.",-1)),d(ot,{onSearch:Tt,modelValue:t.fields.performers,"onUpdate:modelValue":e[16]||(e[16]=o=>t.fields.performers=o),options:ae.value,max:U(He),placeholder:"Performers",context:"performer",create:!0,disabled:x.value,class:"mt-1"},null,8,["modelValue","options","max","disabled"]),s("span",fl,v(t.fields.performers.length)+"/"+v(U(He)),1),we.value?(f(),m("p",cl,v(we.value),1)):y("",!0)]),s("div",ml,[e[78]||(e[78]=s("label",{class:"text-white font-medium"},"Orientation",-1)),e[79]||(e[79]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1"},"Select the category that best matches the content of the video to help users filter their feeds.",-1)),ke(s("select",{"onUpdate:modelValue":e[17]||(e[17]=o=>t.fields.orientation=o),disabled:x.value,class:"w-full bg-zinc-800 rounded px-2 py-2 focus-visible:outline-none focus:ring-2 ring-blue-500 disabled:opacity-60 disabled:cursor-not-allowed mt-1"},[...e[77]||(e[77]=[s("option",{value:0},"Straight",-1),s("option",{value:1},"Transgender",-1),s("option",{value:2},"Gay",-1)])],8,pl),[[lt,t.fields.orientation]])]),s("div",vl,[e[80]||(e[80]=s("label",{class:"text-white font-medium"},"VR",-1)),e[81]||(e[81]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1"},"Enable this if the video is VR content to ensure it plays in our immersive player and appears in VR-specific filters.",-1)),s("div",gl,[d(Pe,{modelValue:t.fields.vr,"onUpdate:modelValue":e[18]||(e[18]=o=>t.fields.vr=o)},null,8,["modelValue"])])]),ke(s("div",xl,[e[82]||(e[82]=s("label",{class:"text-white font-medium"},"Projection",-1)),e[83]||(e[83]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1"},"Select the VR format that matches the original layout. Check the source video description or metadata if you are unsure.",-1)),ke(s("select",{"onUpdate:modelValue":e[19]||(e[19]=o=>t.fields.projection=o),class:"w-full bg-zinc-800 rounded px-2 py-2 focus-visible:outline-none focus:ring-2 ring-blue-500 mt-1"},[(f(!0),m(Q,null,Se(t.projections,o=>(f(),m("option",{value:o},v(o),9,bl))),256))],512),[[lt,t.fields.projection]])],512),[[jt,t.fields.vr]]),s("div",hl,[e[86]||(e[86]=s("label",{class:"text-white font-medium"},"Funscript",-1)),e[87]||(e[87]=s("small",{class:"block text-sm text-zinc-400 font-normal"},"Upload your corresponding interactive funscript file (.funscript).",-1)),d(R,{type:"button",disabled:x.value,class:"mt-1"},{default:w(()=>{var o;return[s("label",{class:K(["flex justify-center items-center cursor-pointer",{"cursor-not-allowed":
1x.value}])},[t.fields.script?(f(),m("div",Tl,[s("p",null,[T(v(t.filename||"New Funscript"),1),t.scriptSizeLabel?(f(),m("span",El," - "+v(t.scriptSizeLabel),1)):y("",!0),T(" - "+v(t.fields.script.length)+" actions",1)]),t.scriptLargeWarning?(f(),m("p",Sl," Large funscripts can take longer time to process. ")):y("",!0)])):(f(),m("div",_l,[O.value?(f(),m("p",yl,[e[84]||(e[84]=T(" Funscript attached",-1)),(o=M.value)!=null&&o.total_actions?(f(),m(Q,{key:0},[T(" - "+v(M.value.total_actions)+" actions",1)],64)):y("",!0),e[85]||(e[85]=T(" (Click to replace) ",-1))])):(f(),m("p",wl,"Click to Upload Your Funscript")),d(L,{name:"upload",class:"h-6 w-6 ml-1"})])),s("input",{class:"hidden",accept:".funscript",disabled:x.value,onChange:yt,type:"file",ref_key:"scriptInput",ref:Ce},null,40,kl)],2)]}),_:1},8,["disabled"])]),s("div",Ll,[e[88]||(e[88]=s("label",{class:"text-white font-medium"},"Script Download",-1)),e[89]||(e[89]=s("small",{class:"block text-sm text-zinc-400 font-normal mt-1"},"Disable to prevent users from downloading your .funscript file.",-1)),s("div",Rl,[d(Pe,{modelValue:t.fields.downloadable,"onUpdate:modelValue":e[20]||(e[20]=o=>t.fields.downloadable=o),disabled:x.value},null,8,["modelValue","disabled"])])]),ee.value?(f(),m("div",Il," Video restored successfully. ")):y("",!0),O.value?y("",!0):(f(),m("div",zl,[s("div",Fl,[s("div",Ul,[s("label",Vl,[ke(s("input",{type:"checkbox","onUpdate:modelValue":e[21]||(e[21]=o=>G.value=o),class:"form-checkbox h-4 w-4 rounded border-zinc-600 bg-zinc-800"},null,512),[[Ht,G.value]]),e[90]||(e[90]=s("span",{class:"text-sm text-zinc-200"},"I agree to the content compliance terms.",-1))]),d(R,{onClick:e[22]||(e[22]=o=>te.value=!0),type:"button",theme:"transparent",class:"p-1",title:"Content Compliance Terms"},{default:w(()=>[d(L,{name:"help-outline",class:"h-5 w-5 text-zinc-400 hover:text-white"})]),_:1})])])])),s("div",Al,[s("div",null,[t.fields.id?(f(),re(R,{key:0,theme:"red",onClick:e[23]||(e[23]=o=>t.deleting=!0),type:"button",class:"shrink-0 flex items-center gap-1.5"},{default:w(()=>[d(L,{name:"trash",class:"h-4 w-4"}),e[91]||(e[91]=s("span",null,"Delete",-1))]),_:1})):y("",!0)]),s("div",Dl,[t.fields.id&&U(Ne)&&Z.value>0?(f(),re(R,{key:0,theme:"green",onClick:e[24]||(e[24]=o=>t.restoring=!0),type:"button",class:"shrink-0"},{default:w(()=>[...e[92]||(e[92]=[T("Restore",-1)])]),_:1})):y("",!0),d(R,{loading:t.loading,disabled:!ut.value,theme:"blue",type:"submit",class:"px-6 flex items-center gap-1.5"},{default:w(()=>[d(L,{name:t.fields.id?"save":"upload",class:"h-4 w-4"},null,8,["name"]),s("span",null,v(t.fields.id?"Save":"Create"),1)]),_:1},8,["loading","disabled"])])])])],32),d(Me,{modelValue:t.deleting,"onUpdate:modelValue":e[26]||(e[26]=o=>t.deleting=o),title:"Delete Video"},{default:w(()=>[e[95]||(e[95]=s("p",{class:"my-3 text-zinc-300 text-center"},"Are you sure you want to delete this video?",-1)),t.error?(f(),m("span",Cl,v(t.error),1)):y("",!0),s("div",Ol,[d(R,{class:"w-full sm:w-auto",onClick:e[25]||(e[25]=o=>t.deleting=!1)},{default:w(()=>[...e[93]||(e[93]=[T("Cancel",-1)])]),_:1}),d(R,{class:"w-full sm:w-auto",loading:t.loading,onClick:Et,theme:"red"},{default:w(()=>[...e[94]||(e[94]=[T("Delete",-1)])]),_:1},8,["loading"])])]),_:1},8,["modelValue"])],512),d(Me,{modelValue:t.restoring,"onUpdate:modelValue":e[28]||(e[28]=o=>t.restoring=o),title:"Restore Video"},{default:w(()=>[e[98]||(e[98]=s("p",{class:"my-3 text-zinc-300 text-center"},"Are you sure you want to restore this video?",-1)),t.error?(f(),m("span",Pl,v(t.error),1)):y("",!0),s("div",Ml,[d(R,{class:"w-full sm:w-auto",onClick:e[27]||(e[27]=o=>t.restoring=!1)},{default:w(()=>[...e[96]||(e[96]=[T("Cancel",-1)])]),_:1}),d(R,{class:"w-full sm:w-auto",loading:t.loading,onClick:St,theme:"green"},{default:w(()=>[...e[97]||(e[97]=[T("Restore",-1)])]),_:1},8,["loading"])])]),_:1},8,["modelValue"]),d(Me,{modelValue:te.value,"onUpdate:modelValue":e[30]||(e[30]=o=>te.value=o),title:"Content Compliance Terms"},{default:w(()=>[e[100]||(e[100]=s("div",{class:"text-sm text-zinc-200 leading-relaxed space-y-3"},[s("p",null,"By uploading, I certify under penalty of perjury that:"),s("ol",{class:"list-decimal pl-5 space-y-1"},[s("li",null,"I am at least 18 years of age."),s("li",null,"All persons depicted in the video were at least 18 years of age at the time the content was created."),s("li",null,"I own or c
1ontrol all necessary rights to distribute this content and the paired funscript."),s("li",null,"Records required by 18 U.S.C. Section 2257 and 28 C.F.R. Part 75 are maintained by the applicable producer's custodian of records.")]),s("p",null,"If I am the producer of the paired video, I affirm that I maintain these records and will provide custodian information upon request. If I am not the producer, I affirm that the records are maintained by the source platform or original producer and that I have made this content available solely to pair it with a funscript. ")],-1)),s("div",Nl,[d(R,{onClick:e[29]||(e[29]=o=>te.value=!1)},{default:w(()=>[...e[99]||(e[99]=[T("Close",-1)])]),_:1})])]),_:1},8,["modelValue"])],64)}}});const ql=Wt(Bl,[["__scopeId","data-v-c0b1aadc"]]);export{ql as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.