PageSourceSearch

https://assets.livid.com/assets/defaults-CyU3Grg1.js

js livid.com collected 2026-09-24 18:32:45 UTC 14,447 bytes, 1 lines download raw bytes

1import{a as z,M,N as W,h as d,C as b,r as j,j as e,Q as w,X as g,V as I}from"./main-0mA9R0ha.js";import{M as G}from"./index-HLoljSSQ.js";import{s as R,u as Q}from"./getFolderSettings-CLH7-ElK.js";import{P as $}from"./PageErrorState-1t1WXhG3.js";import{P as q}from"./PendingState-CNHsjULm.js";import{f as H}from"./featureFlags-BOi46rME.js";import{S as X}from"./Layout-C9nCEdgz.js";import{u as v,a as y,C as E}from"./zod-DA4AU65J.js";import{A as J,a as K}from"./alert-BnfI6jbS.js";import{b as P,F as C,a as N}from"./field-exJSamwr.js";import{S}from"./switch-C2jd_loS.js";import{T as B,a as A,b as U}from"./tooltip-yTBPDVlc.js";import{C as L,l as Y,i as O,n as Z}from"./ChangePlanModal-BEsCowJs.js";import{V as ee}from"./VisibilitySelect-DbUqz6iB.js";import{a as ae}from"./PrivacyPageForm-DnWzec1T.js";import{u as V}from"./getOrganization-DMvRGc4R.js";import{U as _}from"./UpgradePlanModal-B2E5dRA2.js";import"./ForceRefreshLink-BAe36JGn.js";import{L as te}from"./label-ChVe-3FY.js";import{S as se,a as ne,b as oe,c as re,d as F}from"./select-CmcA--ZY.js";import{f as le}from"./transcriptLanguages-WltIb-K0.js";import"./spinner-DrCkCm73.js";import"./loader-circle-MNFmGwwL.js";import"./createLucideIcon-4vlm1tE4.js";import"./useLocation-9uR3VWRP.js";import"./AppHeader-DJcoZVU6.js";import"./AppLogo-Bt9K5yFL.js";import"./LividLogo-DdGoVvHR.js";import"./LivPremiumLogo-BBcsfjMm.js";import"./LivProLogo-7lMAiflb.js";import"./ProBadge-CkPMbEUp.js";import"./proxy-C9Nn89kr.js";import"./index-BgDIeaAD.js";import"./queryKeys-Dcy9-8_H.js";import"./videoUploadV2-yA7YN8li.js";import"./v4-CNyQI5kN.js";import"./spriteStore-BMlXi-2V.js";import"./collapsible-BROdYCEw.js";import"./index-DkQxBBIZ.js";import"./index-C5i3-hSU.js";import"./sheet-BhTJxo1L.js";import"./index-DJEMsTTh.js";import"./index-BHj7PaJO.js";import"./tslib.es6-Bdd1sz-K.js";import"./x-DMa84inB.js";import"./use-sign-out-n_08Ye5q.js";import"./auth-client-CNxfcYaR.js";import"./user-DQ31X3Q_.js";import"./renderBytes-DbQij4i5.js";import"./film-xjSyG-xi.js";import"./settings-L9KGY4of.js";import"./chevron-down-C_0fMmDI.js";import"./users-Bp0iV0tn.js";import"./menu-DFit-I6m.js";import"./search-BYU42hno.js";import"./AppSidebar-C0xKrcrX.js";import"./dropdown-menu-Drl0vodX.js";import"./index-C4uhXlwe.js";import"./index-tGM1HEyG.js";import"./index-BBS4A968.js";import"./index-Bzj8x_lz.js";import"./check-uGO9KJbG.js";import"./chevron-right-BOGpebV2.js";import"./useAppBanner-BS55suY2.js";import"./UploadStatusIndicator-By1ZEEeo.js";import"./circle-alert-DWlw_4Go.js";import"./cloud-upload-BRcvMHLN.js";import"./index-DzprJ28Q.js";import"./index-tuxMpY6F.js";import"./isAfter-80q3UWB7.js";import"./parseISO-CVxaNFUA.js";import"./index-Bug3L8aA.js";import"./dialog-Vjf52_l7.js";import"./index-C8Q6bsOO.js";import"./usePrevious-BD8c2UmH.js";import"./pricing-BGJ7c-T0.js";import"./Trans-BaFPqO0H.js";import"./input-CuZMW64l.js";import"./eye-BFuDP5KG.js";import"./Patreon-BB8g1DGh.js";import"./lock-CIr6Cg04.js";import"./users-round-CsdCZYyC.js";import"./checkbox-CBwRLvuD.js";import"./radio-group-Cfp4aWkE.js";import"./popover-BCsdoCCU.js";import"./hard-drive-BLl-cYV1.js";import"./chevron-up-3WZKr6Gt.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="67739742-ccd2-446c-a96b-cabfc0a616d8",a._sentryDebugIdIdentifier="sentry-dbid-67739742-ccd2-446c-a96b-cabfc0a616d8")}catch{}})();const ie=({body:a})=>W.put("/v1/folder-settings",a).then(({data:t})=>t),f=(a={})=>{const t=z();return M({mutationFn:ie,onError:a.onError,onSuccess:async s=>{await Promise.all([R({folderSettings:s,queryClient:t})]),a.onSuccess?.(s)}})},de=b({embedEnabled:w()}),ce=({defaultPrivacyPage:a,embedEnabled:t})=>{const{t:s}=d("settingsDefaults"),{control:n,handleSubmit:l,reset:r,setValue:o}=v({defaultValues:{embedEnabled:t??!1},mode:"onBlur",resolver:y(de)}),i=f({onError:()=>{o("embedEnabled",t??!1),g.error(s("error.unknown",{ns:"common"}))}});j.useEffect(()=>{r({embedEnabled:t??!1})},[t,r]);const c=async({embedEnabled:m})=>{m!==t&&i.mutate({body:{defaultEmbedEnabled:m,folderId:void 0}})},h=a&&a!=="private";return e.jsx("form",{onChange:l(c),children:e.jsx(P,{children:e.jsxs(C,{className:"justify-start",orientation:"horizontal",children:[e.jsx(E,{control:n,name:"embedEnabled",render:({field:m})=>e.jsx(S,{checked:m.value,disabled:!h||i.isPending,id:"embedEnabled",onCheckedChange:m.onChange})}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(N,{className:"grow-0! shrink-0",htmlFor:"embedEnabled",children:s("defaultEmbedEnabled.label")}),e.jsxs(B,{children:[e.jsx(A,{asChild:!0,children:e.jsx(L,{className:"size-4 text-muted-foreground"})}),e.jsx(U,{children:s("defaultEmbedEnabled.tooltip")})]})]}),!h&&e.jsx(J,{className:"w-auto py-2 px-3",variant:"warning",children:e.jsx(K,{className:"text-xs",children:s("defaultEmbedEnabled.private")})})]})})})}
1,me=b({watchPageEnabled:w()}),ue=({watchPageEnabled:a})=>{const{t}=d("settingsDefaults"),{control:s,handleSubmit:n,reset:l,setValue:r}=v({defaultValues:{watchPageEnabled:a??!0},mode:"onBlur",resolver:y(me)}),o=f({onError:()=>{r("watchPageEnabled",a??!0),g.error(t("error.unknown",{ns:"common"}))}});j.useEffect(()=>{l({watchPageEnabled:a??!0})},[l,a]);const i=async({watchPageEnabled:c})=>{c!==a&&o.mutate({body:{defaultWatchPageEnabled:c,folderId:void 0}})};return e.jsx("form",{onChange:n(i),children:e.jsx(P,{children:e.jsxs(C,{className:"justify-start",orientation:"horizontal",children:[e.jsx(E,{control:s,name:"watchPageEnabled",render:({field:c})=>e.jsx(S,{checked:c.value,disabled:o.isPending,id:"watchPageEnabled",onCheckedChange:c.onChange})}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(N,{className:"grow-0!",htmlFor:"watchPageEnabled",children:t("defaultWatchPageEnabled.label")}),e.jsxs(B,{children:[e.jsx(A,{asChild:!0,children:e.jsx(L,{className:"size-4 text-muted-foreground"})}),e.jsx(U,{children:t("shareAndEmbed.modal.watchPage.tooltip",{ns:"videoId"})})]})]})]})})})},pe=({privacyPassword:a})=>{const{t}=d("common"),s=f({onError:()=>{g.error(t("error.unknown"))}}),n=async l=>{s.mutate({body:{defaultPrivacyPassword:l,folderId:void 0}})};return e.jsx(ee,{isSubmitting:s.isPending,onSubmit:n,privacyPassword:a,submitOnChange:!1})},ge=({embedEnabled:a,privacyPage:t})=>{const{t:s}=d("settingsDefaults"),n=f({onError:()=>{g.error(s("error.unknown",{ns:"common"}))}}),l=({body:r,errorCallback:o,successCallback:i})=>n.mutate({body:{defaultEmbedEnabled:r.embedEnabled,defaultPrivacyPage:r.privacyPage,folderId:void 0}},{onError:o,onSuccess:i});return e.jsx(ae,{embedEnabled:a??!1,isSubmitting:n.isPending,onSubmit:l,privacyPage:t??"private",showPrivacyWarning:!1})},fe=({folderSettings:a})=>{const{t}=d("settingsDefaults");return e.jsxs("section",{className:"flex w-full flex-col gap-4 lg:flex-row lg:gap-10",children:[e.jsx("div",{className:"flex flex-col w-full max-w-50",children:e.jsx("h1",{className:"font-semibold",children:t("section.privacy.title")})}),e.jsxs("div",{className:"flex flex-col w-full gap-4 max-w-120",children:[e.jsx(ge,{embedEnabled:a?.defaultEmbedEnabled,privacyPage:a?.defaultPrivacyPage}),a?.defaultPrivacyPage==="password"&&e.jsx(pe,{privacyPassword:a.defaultPrivacyPassword},a.defaultPrivacyPassword),e.jsx(ce,{defaultPrivacyPage:a?.defaultPrivacyPage,embedEnabled:a?.defaultEmbedEnabled}),e.jsx(ue,{watchPageEnabled:a?.defaultWatchPageEnabled})]})]})},he=b({allowComments:w()}),xe=({allowComments:a})=>{const{t}=d("settingsDefaults"),{control:s,handleSubmit:n,setValue:l}=v({defaultValues:{allowComments:a??!1},mode:"onBlur",resolver:y(he)}),r=f({onError:()=>{l("allowComments",a??!1),g.error(t("error.unknown",{ns:"common"}))}}),o=async({allowComments:i})=>{i!==a&&r.mutate({body:{defaultAllowComments:i,folderId:void 0}})};return e.jsx("form",{onChange:n(o),children:e.jsx(P,{children:e.jsxs(C,{className:"justify-start",orientation:"horizontal",children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(E,{control:s,name:"allowComments",render:({field:i})=>e.jsx(S,{checked:i.value,disabled:r.isPending,id:"allowComments",onCheckedChange:i.onChange})})}),e.jsx(N,{className:"grow-0!",htmlFor:"allowComments",children:t("defaultAllowComments.label")})]})})})},be=b({allowDownloads:w()}),je=({allowDownloads:a})=>{const{t}=d("settingsDefaults"),{control:s,handleSubmit:n,setValue:l}=v({defaultValues:{allowDownloads:a??!1},mode:"onBlur",resolver:y(be)}),{data:r}=V(),o=r&&Y({organization:r}),i=r&&O(r),[c,h]=j.useState(!1),m=f({onError:()=>{l("allowDownloads",a??!1),g.error(t("error.unknown",{ns:"common"}))}}),x=u=>{h(!0),I({event:"Subscription Upgrade Modal Opened",properties:{location:`Allow Downloads ${u}`}})},D=()=>{l("allowDownloads",a??!1),h(!1)},T=async({allowDownloads:u})=>{if(u!==a){if(u&&!o){x("Switch");return}m.mutate({body:{defaultAllowDownloads:u,folderId:void 0}})}};return e.jsxs(e.Fragment,{children:[e.jsx("form",{onChange:n(T),children:e.jsx(P,{children:e.jsxs(C,{className:"justify-start",orientation:"horizontal",children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(E,{control:s,name:"allowDownloads",render:({field:u})=>e.jsx(S,{checked:u.value,disabled:m.isPending,id:"allowDownloads",onCheckedChange:u.onChange})})}),e.jsx(N,{className:"grow-0!",htmlFor:"allowDownloads",children:t("defaultAllowDownloads.label")}),(i||!o)&&e.jsx("button",{className:"px-2 py-0.75 rounded-sm bg-indigo-2 text-xs",onClick:()=>x("Pro Badge"),type:"button",children:t("plan.pro.badge",{ns:"common"})})]})})}),c&&e.jsx(_,{onClose:D,openInNewWindow:!0,trigger:"allowDownloads"})]})},we=b({hideBranding:w()}),ve=({showBranding:a})=>{const{t}=d("settingsDefaults"),s=a===!1,{control:n,handleSubmit:l,setValue:r}=v({defaultValues:{hideBranding:s},mode:"onBlur",resolver:y(we)}),{data:o}=V(),i=o&&Z({organization:o}),c=o&&O(o),[h,m]=j.useState(!1),x=f({onError:()=>{r("hideBranding",s),g.error(t("error.unknown",{ns:"common"}))}}),D=p=>{m(!0),I({event:"Subscription Upgrade Modal Opened",properties:{location:`Hide Branding ${p}`}})},T=()=>{r("hideBranding",s),m(!1)},u=async({hideBranding:p})=>{if(p!==s){if(p&&!i){D("Switch");return}x.mutate({body:{defaultShowBranding:!p,folderId:void 0}})}};return e.jsxs(e.Fragment,{children:[e.jsx("form",{onChange:l(u),children:e.jsx(P,{children:e.jsxs(C,{className:"justify-start",orientation:"horizontal",children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(E,{control:n,name:"hideBranding",render:({field:p})=>e.jsx(S,{checked:p.value,disabled:x.isPending,id:"hideBranding",onCheckedChange:p.onChange})})}),e.jsx(N,{className:"grow-0!",htmlFor:"hideBranding",children:t("defaultShowBranding.label")}),(c||!i)&&e.jsx("button",{className:"px-2 py-0.75 rounded-sm bg-indigo-2 text-xs",onClick:()=>D("Pro Badge"),type:"button",children:t("plan.pro.badge",{ns:"common"})})]})})}),h&&e.jsx(_,{onClose:T,openInNewWindow:!0,trigger:"hideBranding"})]})},ye=({folderSettings:a})=>{const{t}=d("settingsDefaults");return e.jsxs("section",{className:"flex w-full flex-col gap-4 lg:flex-row lg:gap-10",children:[e.jsx("div",{className:"w-full max-w-50",children:e.jsx("h1",{className:"font-semibold",children:t("section.sharing.title")})}),e.jsxs("div",{className:"flex flex-col w-full gap-4",children:[e.jsx(xe,{allowComments:a?.defaultAllowComments}),e.jsx(je,{allowDownloads:a?.defaultAllowDownloads}),e.jsx(ve,{showBranding:a?.defaultShowBranding})]})]})},Ee=["en","en_au","en_uk","en_us","es","fr","de","de_ch","it","pt","nl","af","sq","am","ar","hy","as","az","ba","eu","be","bn","b
1s","br","bg","my","ca","zh","hr","cs","da","et","fo","fi","gl","ka","el","gu","ht","ha","haw","he","hi","hu","is","id","ja","jw","kn","kk","km","ko","lo","la","lv","ln","lt","lb","mk","mg","ms","ml","mt","mi","mr","mn","ne","no","nn","oc","pa","ps","fa","pl","ro","ru","sa","sr","sn","sd","si","sk","sl","so","su","sw","sv","tl","tg","ta","tt","te","th","bo","tr","tk","uk","ur","uz","vi","cy","yi","yo"],Pe=typeof Intl<"u"&&"DisplayNames"in Intl?new Intl.DisplayNames(["en"],{type:"language"}):null,Ce=a=>{const[t,s]=a.split("_");let n;try{n=Pe?.of(t)}catch{}return(!n||n===t)&&(n=le(t)),s?`${n} (${s.toUpperCase()})`:n},Ne=Ee.map(a=>({code:a,label:Ce(a)})).sort((a,t)=>a.label.localeCompare(t.label)),k="auto",Se=({transcriptionLanguage:a})=>{const{t}=d("settingsDefaults"),[s,n]=j.useState(a??k),l=f({onError:()=>{n(a??k),g.error(t("error.unknown",{ns:"common"}))}}),r=o=>{n(o),l.mutate({body:{defaultTranscriptionLanguage:o===k?null:o,folderId:void 0}})};return e.jsxs("div",{className:"flex flex-col gap-3 min-w-0",children:[e.jsx(te,{htmlFor:"defaultTranscriptionLanguage",children:t("defaultTranscriptionLanguage.label")}),e.jsxs(se,{disabled:l.isPending,onValueChange:r,value:s,children:[e.jsx(ne,{id:"defaultTranscriptionLanguage",children:e.jsx(oe,{})}),e.jsxs(re,{children:[e.jsx(F,{value:k,children:t("defaultTranscriptionLanguage.autoDetect")}),Ne.map(o=>e.jsx(F,{value:o.code,children:o.label},o.code))]})]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:t("defaultTranscriptionLanguage.description")})]})},De=({folderSettings:a})=>{const{t}=d("settingsDefaults");return e.jsxs("section",{className:"flex w-full flex-col gap-4 lg:flex-row lg:gap-10",children:[e.jsx("div",{className:"w-full max-w-50",children:e.jsx("h1",{className:"font-semibold",children:t("section.transcription.title")})}),e.jsx("div",{className:"flex flex-col w-full gap-4 max-w-120",children:e.jsx(Se,{transcriptionLanguage:a?.defaultTranscriptionLanguage})})]})},ke=()=>{const{t:a}=d("settingsDefaults"),t=Q({folderId:null});return e.jsx(X,{children:G(t).with({status:"pending"},()=>e.jsx(q,{})).with({status:"error"},()=>e.jsx($,{queries:[t],title:a("error.initial.title",{ns:"common"})})).with({status:"success"},({data:s})=>e.jsxs("div",{className:"flex flex-col w-full gap-6",children:[e.jsxs("div",{className:"flex flex-col w-full gap-2",children:[e.jsx("h1",{className:"text-xl font-medium",children:a("header.title")}),e.jsx("span",{className:"text-sm text-muted-foreground",children:a("header.explanation")})]}),e.jsx("hr",{className:"bg-border h-[1px]"}),e.jsx(fe,{folderSettings:s}),e.jsx("hr",{className:"bg-border h-[1px]"}),e.jsx(ye,{folderSettings:s}),H.templates,e.jsx("hr",{className:"bg-border h-[1px]"}),e.jsx(De,{folderSettings:s})]})).exhaustive()})},dt=()=>e.jsx(ke,{});export{dt as component};

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.