PageSourceSearch

https://cyberstock.lol/assets/Releases-OtUhsDtp.js

js cyberstock.lol collected 2026-09-24 14:25:14 UTC 53,270 bytes, 12 lines download raw bytes

1import{c as K,r as g,j as e,a4 as Z,a0 as ee,bD as H,a5 as se,an as A,ac as D,cJ as ce,bG as Q,aM as O,b3 as I,l as ne,aL as te,cz as ie,n as de,o as pe,ai as xe,bF as me,Y as ue,E as he,al as ge}from"./index-CE18-tb0.js";import{u as h,c as G,l as be,b as $,a as ye,R as ve}from"./ReleaseUploadDialog-4ZcaE0Ht.js";import{F as fe}from"./filter-lCQR2OdB.js";import{L as je}from"./layout-grid-Cb6PDzl3.js";import{L as Ne}from"./list-BItBfSqt.js";import{E as re}from"./ellipsis-D0j_j842.js";import{P as we}from"./pencil-DVmdVhCl.js";import{C as ae}from"./calendar-Cdlu7faK.js";import{F as E}from"./file-text-BiI4ahgV.js";import{U as le}from"./upload-BTbSUZ_s.js";import{C as T}from"./circle-x-DpjNHquW.js";import{L as oe}from"./link-2-_LL5uyrJ.js";import{C as ke}from"./chart-column-CSiTVLFU.js";import{E as _e}from"./earth-Cdgb2cYa.js";import"./vendor-Y7T1HomI.js";import"./supabase-BwgEV_BN.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Pe=K("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const Ce=K("FileDown",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]),B={model:{bg:"rgba(124,92,255,.15)",text:"var(--cs-purple-400)",label:"Model"},property:{bg:"rgba(96,165,250,.15)",text:"var(--cs-blue-400)",label:"Property"},minor:{bg:"rgba(251,191,36,.15)",text:"var(--cs-amber-400)",label:"Minor"}},V={draft:{bg:"rgba(255,255,255,.06)",text:"var(--cs-text-secondary)",dot:"var(--cs-text-tertiary)"},active:{bg:"rgba(34,197,94,.12)",text:"var(--cs-green-400)",dot:"var(--cs-green-500)"},archived:{bg:"rgba(255,255,255,.04)",text:"var(--cs-text-tertiary)",dot:"var(--cs-text-tertiary)"},rejected:{bg:"rgba(239,68,68,.12)",text:"var(--cs-red-400)",dot:"var(--cs-red-500)"},needs_review:{bg:"rgba(245,158,11,.12)",text:"var(--cs-amber-400)",dot:"var(--cs-amber-500)"}};function Se({onUploadClick:a,onCreateClick:t,onOpenRelease:i}){const d=h(s=>s.releases),n=h(s=>s.searchQuery),p=h(s=>s.setSearchQuery),r=h(s=>s.viewMode),b=h(s=>s.setViewMode),c=h(s=>s.filters),f=h(s=>s.setFilter),m=h(s=>s.resetFilters),l=h(s=>s.selectedIds),k=h(s=>s.toggleSelected),o=h(s=>s.selectAll),N=h(s=>s.clearSelection),[y,P]=g.useState(!1),[C,R]=g.useState(null),_=c.type||c.status||c.hasPerson!==null||c.platform,w=g.useMemo(()=>{let s=[...d];if(n){const x=n.toLowerCase();s=s.filter(v=>v.display_name.toLowerCase().includes(x)||v.legal_name?.toLowerCase().includes(x)||v.person?.display_name?.toLowerCase().includes(x)||v.tags?.some(j=>j.toLowerCase().includes(x)))}return c.type&&(s=s.filter(x=>x.type===c.type)),c.status&&(s=s.filter(x=>x.status===c.status)),c.hasPerson===!0&&(s=s.filter(x=>x.person_id)),c.hasPerson===!1&&(s=s.filter(x=>!x.person_id)),s},[d,n,c]),z=w.map(s=>s.id);function F({release:s}){const x=G(s),v=[{key:"adobe",label:"Ad"},{key:"shutterstock",label:"Sh"},{key:"pond5",label:"P5"},{key:"getty",label:"Gt"}],j=u=>u==="ready"?{bg:"rgba(34,197,94,.12)",color:"var(--cs-green-400)",border:"rgba(34,197,94,.20)"}:u==="needs_review"?{bg:"rgba(245,158,11,.12)",color:"var(--cs-amber-400)",border:"rgba(245,158,11,.22)"}:u==="unsupported_for_platform"?{bg:"rgba(255,255,255,.04)",color:"var(--cs-text-tertiary)",border:"var(--cs-border)"}:{bg:"rgba(239,68,68,.12)",color:"var(--cs-red-400)",border:"rgba(239,68,68,.22)"};return e.jsx("div",{className:"flex items-center gap-1 flex-wrap",children:v.map(({key:u,label:M})=>{const L=x[u],S=j(L.status);return e.jsx("span",{className:"text-[10px] font-semibold px-1.5 py-0.5 rounded-full whitespace-nowrap",style:{background:S.bg,color:S.color,border:`1px solid ${S.border}`},title:L.issues.length?L.issues.join(", "):L.status==="ready"?"Ready":L.status.replace(/_/g," "),children:M},u)})})}function W({release:s}){const x=B[s.type]||B.model,v=V[s.status]||V.draft,j=l.has(s.id);return e.jsxs("div",{className:"group relative rounded-xl p-4 transition-all duration-150 cursor-pointer",style:{background:"var(--cs-bg-card)",border:`1px solid ${j?"var(--cs-purple-400)":"var(--cs-border)"}`,boxShadow:j?"0 0 0 2px rgba(124,92,255,.2)":"var(--cs-shadow-card)"},onClick:()=>i(s),children:[e.jsx("div",{className:"absolute top-3 left-3 w-5 h-5 rounded-md flex items-center justify-center transition-all",style:{background:j?"var(--cs-purple-400)":"var(--cs-bg-hover)",border:`1.5px solid ${j?"var(--cs-purple-400)":"var(--cs-border-strong)"}`},onClick:u=>
11{u.stopPropagation(),k(s.id)},children:j&&e.jsx("span",{className:"text-white text-[11px] font-bold",children:"✓"})}),e.jsx("button",{className:"absolute top-3 right-3 w-7 h-7 rounded-md flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",style:{background:"var(--cs-bg-hover)",color:"var(--cs-text-secondary)"},onClick:u=>{u.stopPropagation(),R(C===s.id?null:s.id)},children:e.jsx(re,{className:"h-4 w-4"})}),C===s.id&&e.jsx("div",{className:"absolute top-10 right-3 z-50 rounded-lg py-1 min-w-[140px]",style:{background:"var(--cs-bg-card)",border:"1px solid var(--cs-border-strong)",boxShadow:"var(--cs-shadow-elevated)"},onClick:u=>u.stopPropagation(),children:[{icon:H,label:"Open",action:()=>{i(s),R(null)}},{icon:we,label:"Edit",action:()=>{i(s),R(null)}},{icon:Pe,label:"Archive",action:()=>R(null)},{icon:se,label:"Delete",action:()=>R(null),danger:!0}].map(u=>e.jsxs("button",{className:"w-full text-left px-3 py-1.5 text-[13px] flex items-center gap-2 transition-colors",style:{color:u.danger?"var(--cs-red-400)":"var(--cs-text-secondary)"},onMouseEnter:M=>{M.currentTarget.style.background="var(--cs-bg-hover)"},onMouseLeave:M=>{M.currentTarget.style.background="transparent"},onClick:u.action,children:[e.jsx(u.icon,{className:"h-3.5 w-3.5"}),u.label]},u.label))}),e.jsxs("div",{className:"mt-6 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[11px] font-bold px-2 py-0.5 rounded-full uppercase tracking-wide",style:{background:x.bg,color:x.text},children:x.label}),e.jsxs("span",{className:"text-[11px] font-medium px-2 py-0.5 rounded-full flex items-center gap-1.5 capitalize",style:{background:v.bg,color:v.text},children:[e.jsx("span",{className:"w-[5px] h-[5px] rounded-full",style:{background:v.dot}}),s.status.replace("_"," ")]})]}),e.jsx("h3",{className:"text-[15px] font-semibold leading-tight line-clamp-2",style:{color:"var(--cs-text-primary)"},children:s.display_name}),s.person&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(A,{className:"h-3 w-3",style:{color:"var(--cs-purple-300)"}}),e.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--cs-purple-300)"},children:s.person.display_name})]}),s.signed_at&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(ae,{className:"h-3 w-3",style:{color:"var(--cs-text-tertiary)"}}),e.jsxs("span",{className:"text-[12px]",style:{color:"var(--cs-text-tertiary)"},children:["Signed ",new Date(s.signed_at).toLocaleDateString()]})]}),e.jsx(F,{release:s}),s.tags&&s.tags.length>0&&e.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[s.tags.slice(0,3).map(u=>e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-md",style:{background:"var(--cs-bg-hover)",color:"var(--cs-text-secondary)"},children:u},u)),s.tags.length>3&&e.jsxs("span",{className:"text-[10px]",style:{color:"var(--cs-text-tertiary)"},children:["+",s.tags.length-3]})]})]})]})}function q(){return e.jsx("div",{className:"overflow-x-auto rounded-xl",style:{border:"1px solid var(--cs-border)"},children:e.jsxs("table",{className:"w-full text-[13px]",children:[e.jsx("thead",{children:e.jsxs("tr",{style:{background:"var(--cs-bg-hover)",borderBottom:"1px solid var(--cs-border)"},children:[e.jsx("th",{className:"w-10 px-3 py-2.5",children:e.jsx("div",{className:"w-4 h-4 rounded cursor-pointer flex items-center justify-center",style:{background:l.size===w.length&&w.length>0?"var(--cs-purple-400)":"var(--cs-bg-card)",border:"1.5px solid var(--cs-border-strong)"},onClick:()=>l.size===w.length?N():o(z),children:l.size===w.length&&w.length>0&&e.jsx("span",{className:"text-white text-[10px] font-bold",children:"✓"})})}),["Name","Type","Person","Status","Signed","Platforms",""].map(s=>e.jsx("th",{className:"text-left px-3 py-2.5 font-semibold",style:{color:"var(--cs-text-secondary)"},children:s},s))]})}),e.jsx("tbody",{children:w.map(s=>{const x=B[s.type]||B.model,v=V[s.status]||V.draft,j=l.has(s.id);return e.jsxs("tr",{className:"cursor-pointer transition-colors",style:{borderBottom:"1px solid var(--cs-border)",background:j?"rgba(124,92,255,.06)":"transparent"},onMouseEnter:u=>{j||(u.currentTarget.style.background="var(--cs-bg-hover)")},onMouseLeave:u=>{j||(u.currentTarget.style.background="transparent")},onClick:()=>i(s),children:[e.jsx("td",{className:"px-3 py-2.5",onClick:u=>u.stopPropagation(),children:e.jsx("div",{className:"w-4 h-4 rounded cursor-pointer flex items-center justify-center",style:{background:j?"var(--cs-purple-400)":"transparent",border:`1.5px solid ${j?"var(--cs-purple-400)":"var(--cs-border-strong)"}`},onClick:()=>k(s.id),children:j&&e.jsx("span",{className:"text-white text-[10px] font-bold",children:"✓"})})}),e.jsx("td",{className:"px-3 py-2.5",children:e.jsx("span",{className:"font-medium",style:{color:"var(--cs-text-primary)"},children:s.display_name})}),e.jsx("td",{className:"px-3 py-2.5",children:e.jsx("span",{className:"text-[11px] font-bold px-2 py-0.5 rounded-full uppercase",style:{background:x.bg,color:x.text},children:x.label})}),e.jsx("td",{className:"px-3 py-2.5",style:{color:s.person?"var(--cs-purple-300)":"var(--cs-text-tertiary)"},children:s.person?.display_name||"—"}),e.jsx("td",{className:"px-3 py-2.5",children:e.jsxs("span",{className:"text-[11px] font-medium px-2 py-0.5 rounded-full flex items-center gap-1.5 w-fit capitalize",style:{background:v.bg,color:v.text},children:[e.jsx("span",{className:"w-[5px] h-[5px] rounded-full",style:{background:v.dot}}),s.status.replace("_"," ")]})}),e.jsx("td",{className:"px-3 py-2.5",style:{color:"var(--cs-text-tertiary)"},children:s.signed_at?new Date(s.signed_at).toLocaleDateString():"—"}),e.jsx("td",{className:"px-3 py-2.5",children:e.jsx(F,{release:s})}),e.jsx("td",{className:"px-3 py-2.5",children:e.jsx("button",{className:"w-7 h-7 rounded-md flex items-center justify-center opacity-60 hover:opacity-100 transition-opacity",style:{color:"var(--cs-text-secondary)"},onClick:u=>{u.stopPropagation(),i(s)},children:e.jsx(H,{className:"h-3.5 w-3.5"})})})]},s.id)})})]})})}function J(){return e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 px-4 text-center",children:[e.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center mb-5",style:{background:"rgba(124,92,255,.1)",boxShadow:"0 0 32px rgba(124,92,255,.15)"},children:e.jsx(E,{className:"h-7 w-7",style:{color:"var(--cs-purple-400)"}})}),e.jsx("h3",{className:"text-lg font-semibold mb-2",style:{color:"var(--cs-text-primary)"},children:"No releases yet"}),e.jsx("p",{className:"text-[14px] mb-6 max-w-sm",style:{color:"var(--cs-text-secondary)"},children:"Upload your model & property releases, or create new ones from scratch. Releases help you stay compliant across all stock platforms."}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{onClick:a,className:"flex items-center gap-2 px-4 py-2.5 rounded-lg text-[13px] font-semibold text-white transition-all",style:{background:"var(--cs-purple-400)",boxShadow:"var(--cs-shadow-purple-btn)"},children:[e.jsx(le,{className:"h-4 w-4"})," Upload Release"]}),e.jsxs("button",{onClick:t,className:"flex items-center gap-2 px-4 py-2.5 rounded-lg text-[13px] font-semibold transition-all",style:{background:"var(--cs-bg-hover)",color:"var(--cs-text-primary)",border:"1px solid var(--cs-border)"},children:[e.jsx(D,{className:"h-4 w-4"})," Create Release"]})]})]})}return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[e.jsxs("div",{className:"relative flex-1 min-w-[200px] max-w-md",children:[e.jsx(Z,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4",style:{color:"var(--cs-text-tertiary)"}}),e.jsx("input",{type:"text",placeholder:"Search releases...",value:n,onChange:s=>p(s.target.value),className:"cs-input pl-9"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>P(!y),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg text-[13px] font-medium transition-all",style:{background:_?"rgba(124,92,255,.12)":"var(--cs-bg-hover)",color:_?"var(--cs-purple-400)":"var(--cs-text-secondary)",border:`1px solid ${_?"rgba(124,92,255,.3)":"var(--cs-border)"}`},children:[e.jsx(fe,{className:"h-3.5 w-3.5"}),"Filters",_&&e.jsx("span",{className:"w-4 h-4 rounded-full text-[10px] font-bold flex items-center justify-center",style:{background:"var(--cs-purple-400)",color:"#fff"},children:[c.type,c.status,c.hasPerson,c.platform].filter(s=>s!==null).length})]}),e.jsx("div",{className:"flex items-center rounded-lg overflow-hidden",style:{border:"1px solid var(--cs-border)"},children:["card","table"].map(s=>e.jsx("button",{onClick:()=>b(s),className:"px-2.5 py-2 transition-all",style:{background:r===s?"var(--cs-bg-active)":"transparent",color:r===s?"var(--cs-text-primary)":"var(--cs-text-tertiary)"},children:s==="card"?e.jsx(je,{className:"h-4 w-4"}):e.jsx(Ne,{className:"h-4 w-4"})},s))})]})]}),y&&e.jsxs("div",{className:"flex items-center gap-3 flex-wrap p-3 rounded-xl",style:{background:"var(--cs-bg-hover)",border:"1px solid var(--cs-border)"},children:[e.jsxs("select",{value:c.type||"",onChange:s=>
11f("type",s.target.value||null),className:"cs-input",style:{width:"auto",minWidth:120},children:[e.jsx("option",{value:"",children:"All types"}),e.jsx("option",{value:"model",children:"Model"}),e.jsx("option",{value:"property",children:"Property"}),e.jsx("option",{value:"minor",children:"Minor"})]}),e.jsxs("select",{value:c.status||"",onChange:s=>f("status",s.target.value||null),className:"cs-input",style:{width:"auto",minWidth:130},children:[e.jsx("option",{value:"",children:"All statuses"}),e.jsx("option",{value:"draft",children:"Draft"}),e.jsx("option",{value:"active",children:"Active"}),e.jsx("option",{value:"needs_review",children:"Needs Review"}),e.jsx("option",{value:"archived",children:"Archived"}),e.jsx("option",{value:"rejected",children:"Rejected"})]}),e.jsxs("select",{value:c.hasPerson===null?"":c.hasPerson?"yes":"no",onChange:s=>f("hasPerson",s.target.value===""?null:s.target.value==="yes"),className:"cs-input",style:{width:"auto",minWidth:130},children:[e.jsx("option",{value:"",children:"Person: Any"}),e.jsx("option",{value:"yes",children:"Has person"}),e.jsx("option",{value:"no",children:"No person"})]}),_&&e.jsxs("button",{onClick:m,className:"flex items-center gap-1 text-[12px] font-medium px-2 py-1 rounded-md",style:{color:"var(--cs-red-400)"},children:[e.jsx(ee,{className:"h-3 w-3"})," Clear"]})]}),l.size>0&&e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-xl",style:{background:"rgba(124,92,255,.08)",border:"1px solid rgba(124,92,255,.2)"},children:[e.jsxs("span",{className:"text-[13px] font-medium",style:{color:"var(--cs-purple-300)"},children:[l.size," selected"]}),e.jsx("button",{className:"text-[12px] font-medium px-2.5 py-1 rounded-md",style:{background:"var(--cs-bg-hover)",color:"var(--cs-text-secondary)"},children:"Archive"}),e.jsx("button",{className:"text-[12px] font-medium px-2.5 py-1 rounded-md",style:{color:"var(--cs-red-400)"},children:"Delete"}),e.jsx("button",{onClick:N,className:"ml-auto text-[12px]",style:{color:"var(--cs-text-tertiary)"},children:"Deselect all"})]}),w.length===0?d.length===0?e.jsx(J,{}):e.jsx("div",{className:"text-center py-16",children:e.jsxs("p",{className:"text-[14px]",style:{color:"var(--cs-text-secondary)"},children:["No releases match your ",n?"search":"filters","."]})}):r==="card"?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3",children:w.map(s=>e.jsx(W,{release:s},s.id))}):e.jsx(q,{})]})}function Re({onOpenPerson:a,onCreatePerson:t,onCreateReleaseForPerson:i}){const d=h(o=>o.persons),n=h(o=>o.releases),[p,r]=g.useState(""),[b,c]=g.useState(null),f=g.useMemo(()=>{if(!p)return d;const o=p.toLowerCase();return d.filter(N=>N.display_name.toLowerCase().includes(o)||N.legal_name?.toLowerCase().includes(o)||N.aliases?.some(y=>y.toLowerCase().includes(o)))},[d,p]),m=g.useMemo(()=>{const o={};return n.forEach(N=>{N.person_id&&(o[N.person_id]=(o[N.person_id]||0)+1)}),o},[n]);function l({person:o}){const N=m[o.id]||o.release_count||0;return e.jsxs("div",{className:"group relative rounded-xl p-4 transition-all duration-150 cursor-pointer",style:{background:"var(--cs-bg-card)",border:"1px solid var(--cs-border)",boxShadow:"var(--cs-shadow-card)"},onClick:()=>a(o),children:[e.jsx("button",{className:"absolute top-3 right-3 w-7 h-7 rounded-md flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",style:{background:"var(--cs-bg-hover)",color:"var(--cs-text-secondary)"},onClick:y=>{y.stopPropagation(),c(b===o.id?null:o.id)},children:e.jsx(re,{className:"h-4 w-4"})}),b===o.id&&e.jsx("div",{className:"absolute top-10 right-3 z-50 rounded-lg py-1 min-w-[160px]",style:{background:"var(--cs-bg-card)",border:"1px solid var(--cs-border-strong)",boxShadow:"var(--cs-shadow-elevated)"},onClick:y=>y.stopPropagation(),children:[{icon:H,label:"View profile",action:()=>{a(o),c(null)}},{icon:D,label:"Create release",action:()=>{i(o.id),c(null)}},{icon:se,label:"Delete",action:()=>c(null),danger:!0}].map(y=>e.jsxs("button",{className:"w-full text-left px-3 py-1.5 text-[13px] flex items-center gap-2 transition-colors",style:{color:y.danger?"var(--cs-red-400)":"var(--cs-text-secondary)"},onMouseEnter:P=>{P.currentTarget.style.background="var(--cs-bg-hover)"},onMouseLeave:P=>{P.currentTarget.style.background="transparent"},onClick:y.action,children:[e.jsx(y.icon,{className:"h-3.5 w-3.5"}),y.label]},y.label))}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center flex-shrink-0 overflow-hidden",style:{background:"rgba(124,92,255,.1)",border:"1px solid rgba(124,92,255,.15)"},children:o.reference_image_url?e.jsx("img",{src:o.reference_image_url,alt:"",className:"w-full h-full object-cover"}):e.jsx(A,{className:"h-5 w-5",style:{color:"var(--cs-purple-400)"}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-[14px] font-semibold leading-tight",style:{color:"var(--cs-text-primary)"},children:o.display_name}),o.legal_name&&o.legal_name!==o.display_name&&e.jsx("p",{className:"text-[12px] mt-0.5",style:{color:"var(--cs-text-tertiary)"},children:o.legal_name}),o.aliases&&o.aliases.length>0&&e.jsx("div",{className:"flex items-center gap-1 mt-2 flex-wrap",children:o.aliases.map(y=>e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-md",style:{background:"var(--cs-bg-hover)",color:"var(--cs-text-secondary)"},children:y},y))}),e.jsxs("div",{className:"flex items-center gap-4 mt-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(E,{className:"h-3 w-3",style:{color:"var(--cs-text-tertiary)"}}),e.jsxs("span",{className:"text-[12px] font-medium",style:{color:"var(--cs-text-secondary)"},children:[N," ",N===1?"release":"releases"]})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(ce,{className:"h-3 w-3",style:{color:"var(--cs-text-tertiary)"}}),e.jsxs("span",{className:"text-[12px] font-medium",style:{color:"var(--cs-text-secondary)"},children:[o.assigned_assets_count||0," assets"]})]})]})]})]})]})}function k(){return e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 px-4 text-center",children:[e.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center mb-5",style:{background:"rgba(124,92,255,.1)",boxShadow:"0 0 32px rgba(124,92,255,.15)"},children:e.jsx(A,{className:"h-7 w-7",style:{color:"var(--cs-purple-400)"}})}),e.jsx("h3",{className:"text-lg font-semibold mb-2",style:{color:"var(--cs-text-primary)"},children:"No people yet"}),e.jsx("p",{className:"text-[14px] mb-6 max-w-sm",style:{color:"var(--cs-text-secondary)"},children:"Add people and models that appear in your content. Link them to releases for organized compliance tracking."}),e.jsxs("button",{onClick:t,className:"flex items-center gap-2 px-4 py-2.5 rounded-lg text-[13px] font-semibold text-white transition-all",style:{background:"var(--cs-purple-400)",boxShadow:"var(--cs-shadow-purple-btn)"},children:[e.jsx(D,{className:"h-4 w-4"})," Add Person"]})]})}return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"relative flex-1 min-w-[200px] max-w-md",children:[e.jsx(Z,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4",style:{color:"var(--cs-text-tertiary)"}}),e.jsx("input",{type:"text",placeholder:"Search people...",value:p,onChange:o=>r(o.target.value),className:"cs-input pl-9"})]}),e.jsxs("button",{onClick:t,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg text-[13px] font-semibold text-white transition-all",style:{background:"var(--cs-purple-400)",boxShadow:"var(--cs-shadow-purple-btn)"},children:[e.jsx(D,{className:"h-3.5 w-3.5"})," Add Person"]})]}),f.length===0?d.length===0?e.jsx(k,{}):e.jsx("div",{className:"text-center py-16",children:e.jsx("p",{className:"text-[14px]",style:{color:"var(--cs-text-secondary)"},children:"No people match your search."})}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:f.map(o=>e.jsx(l,{person:o},o.id))})]})}const Y={ready:{icon:I,color:"var(--cs-green-400)",bg:"rgba(34,197,94,.1)"},warning:{icon:O,color:"var(--cs-amber-400)",bg:"rgba(245,158,11,.1)"},error:{icon:T,color:"var(--cs-red-400)",bg:"rgba(239,68,68,.1)"}};function Me(a){const t=[];return a.original_file_url||t.push({label:"Missing File",level:"error"}),a.signed_at||t.push({label:"Missing Signature Date",level:"error"}),a.legal_name||t.push({label:"Missing Legal Name",level:"warning"}
11),a.type==="model"&&!a.person_id&&t.push({label:"No Person Linked",level:"warning"}),a.type==="minor"&&!a.guardian_name&&t.push({label:"Minor Info Required",level:"error"}),a.status==="needs_review"&&t.push({label:"Needs Review",level:"warning"}),a.status==="draft"&&t.push({label:"Still Draft",level:"warning"}),t.length===0&&t.push({label:"All Good",level:"ready"}),t}function X(a){return a.some(t=>t==="missing_data"||t==="wrong_format"||t==="missing_signature"||t==="missing_minor_info"||t==="missing_person_link")?"error":a.some(t=>t==="needs_review")||a.some(t=>t==="unsupported_for_platform")?"warning":"ready"}function Le({onOpenRelease:a}){const t=h(n=>n.releases),i=g.useMemo(()=>t.filter(n=>n.status!=="archived"),[t]),d=g.useMemo(()=>{let n=0,p=0,r=0;return i.forEach(b=>{const c=G(b),f=Object.values(c).map(l=>l.status),m=X(f);m==="ready"?n++:m==="error"?r++:p++}),{ready:n,warnings:p,errors:r,total:i.length}},[i]);return i.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[e.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center mb-5",style:{background:"rgba(124,92,255,.1)"},children:e.jsx(Q,{className:"h-7 w-7",style:{color:"var(--cs-purple-400)"}})}),e.jsx("h3",{className:"text-lg font-semibold mb-2",style:{color:"var(--cs-text-primary)"},children:"No releases to validate"}),e.jsx("p",{className:"text-[14px]",style:{color:"var(--cs-text-secondary)"},children:"Upload or create releases first, then check platform readiness here."})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-3",children:[{label:"Total",value:d.total,color:"var(--cs-text-primary)",bg:"var(--cs-bg-card)"},{label:"Ready",value:d.ready,color:"var(--cs-green-400)",bg:"rgba(34,197,94,.08)"},{label:"Warnings",value:d.warnings,color:"var(--cs-amber-400)",bg:"rgba(245,158,11,.08)"},{label:"Errors",value:d.errors,color:"var(--cs-red-400)",bg:"rgba(239,68,68,.08)"}].map(n=>e.jsxs("div",{className:"rounded-xl p-4 text-center",style:{background:n.bg,border:"1px solid var(--cs-border)"},children:[e.jsx("div",{className:"text-2xl font-bold",style:{color:n.color},children:n.value}),e.jsx("div",{className:"text-[12px] font-medium mt-1",style:{color:"var(--cs-text-secondary)"},children:n.label})]},n.label))}),e.jsx("div",{className:"space-y-3",children:i.map(n=>{const p=G(n),r=Me(n),b=X(Object.values(p).map(m=>m.status)),c=r.some(m=>m.level==="error")||b==="error"?"error":r.some(m=>m.level==="warning")||b==="warning"?"warning":"ready",f=Y[c];return e.jsx("div",{className:"rounded-xl p-4 cursor-pointer transition-all hover:shadow-md",style:{background:"var(--cs-bg-card)",border:"1px solid var(--cs-border)"},onClick:()=>a(n),children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center flex-shrink-0",style:{background:f.bg},children:e.jsx(f.icon,{className:"h-5 w-5",style:{color:f.color}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("h4",{className:"text-[14px] font-semibold",style:{color:"var(--cs-text-primary)"},children:n.display_name}),e.jsx("span",{className:"text-[10px] font-bold uppercase px-1.5 py-0.5 rounded-full",style:{background:"rgba(124,92,255,.12)",color:"var(--cs-purple-400)"},children:n.type})]}),e.jsx("div",{className:"flex items-center gap-2 flex-wrap mb-3",children:r.map(m=>{const l=Y[m.level];return e.jsxs("span",{className:"text-[11px] font-medium px-2 py-0.5 rounded-full flex items-center gap-1",style:{background:l.bg,color:l.color},children:[e.jsx(l.icon,{className:"h-3 w-3"}),m.label]},m.label)})}),e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:Object.entries(p).map(([m,l])=>e.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-[11px] font-semibold",style:{background:l.status==="ready"?"rgba(34,197,94,.08)":l.status==="needs_review"?"rgba(245,158,11,.08)":l.status==="unsupported_for_platform"?"rgba(255,255,255,.04)":"rgba(239,68,68,.06)",border:`1px solid ${l.status==="ready"?"rgba(34,197,94,.2)":l.status==="needs_review"?"rgba(245,158,11,.2)":l.status==="unsupported_for_platform"?"var(--cs-border)":"rgba(239,68,68,.18)"}`,color:l.status==="ready"?"var(--cs-green-400)":l.status==="needs_review"?"var(--cs-amber-400)":l.status==="unsupported_for_platform"?"var(--cs-text-tertiary)":"var(--cs-red-400)"},title:l.issues.length?l.issues.join(`
12`):l.status==="ready"?"Ready":l.status.replace(/_/g," "),children:[l.status==="ready"?e.jsx(I,{className:"h-3 w-3"}):l.status==="needs_review"?e.jsx(O,{className:"h-3 w-3"}):e.jsx(T,{className:"h-3 w-3"}),m.charAt(0).toUpperCase()+m.slice(1)," ",l.status==="ready"?"Ready":l.status.replace(/_/g," ")
12]},m))})]})]})},n.id)})})]})}function Ae({onOpenRelease:a}){const t=h(r=>r.releases),i=h(r=>r.persons),d=r=>{const b=G(r),c=Object.values(b).map(m=>m.status),f=["missing_data","wrong_format","missing_signature","missing_person_link","missing_minor_info"];return c.some(m=>f.includes(m))?{level:"blocked",label:"Blocked"}:c.some(m=>m==="needs_review"||m==="unsupported_for_platform")?{level:"review",label:"Review"}:{level:"ready",label:"Ready"}},n=({release:r})=>{const b=d(r),c=b.level==="ready"?{bg:"rgba(34,197,94,.10)",border:"rgba(34,197,94,.22)",color:"var(--cs-green-400)"}:b.level==="review"?{bg:"rgba(245,158,11,.10)",border:"rgba(245,158,11,.22)",color:"var(--cs-amber-400)"}:{bg:"rgba(239,68,68,.10)",border:"rgba(239,68,68,.22)",color:"var(--cs-red-400)"};return e.jsx("span",{className:"text-[10px] font-bold uppercase px-2 py-0.5 rounded-full",style:{background:c.bg,border:`1px solid ${c.border}`,color:c.color,letterSpacing:"0.04em"},title:"Platform readiness overview",children:b.label})},p=g.useMemo(()=>{const r=t.filter(l=>(l.assignment_count||0)>0),b=t.filter(l=>!l.assignment_count&&l.status!=="archived"),c=t.filter(l=>l.status==="needs_review"),f=i.filter(l=>!t.some(k=>k.person_id===l.id)),m=t.reduce((l,k)=>l+(k.assignment_count||0),0);return{assigned:r,unassigned:b,needsReview:c,personsWithoutRelease:f,totalAssignments:m}},[t,i]);return t.length===0&&i.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[e.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center mb-5",style:{background:"rgba(124,92,255,.1)"},children:e.jsx(oe,{className:"h-7 w-7",style:{color:"var(--cs-purple-400)"}})}),e.jsx("h3",{className:"text-lg font-semibold mb-2",style:{color:"var(--cs-text-primary)"},children:"No assignments yet"}),e.jsx("p",{className:"text-[14px]",style:{color:"var(--cs-text-secondary)"},children:"Once you create releases and assign them to photos, this dashboard will show the overview."})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-5 gap-3",children:[{icon:ke,label:"Total Assignments",value:p.totalAssignments,color:"var(--cs-purple-400)",bg:"rgba(124,92,255,.08)"},{icon:I,label:"Assigned Releases",value:p.assigned.length,color:"var(--cs-green-400)",bg:"rgba(34,197,94,.08)"},{icon:T,label:"Unassigned",value:p.unassigned.length,color:"var(--cs-amber-400)",bg:"rgba(245,158,11,.08)"},{icon:O,label:"Needs Review",value:p.needsReview.length,color:"var(--cs-red-400)",bg:"rgba(239,68,68,.08)"},{icon:A,label:"Persons w/o Release",value:p.personsWithoutRelease.length,color:"var(--cs-text-secondary)",bg:"var(--cs-bg-card)"}].map(r=>e.jsxs("div",{className:"rounded-xl p-4 text-center",style:{background:r.bg,border:"1px solid var(--cs-border)"},children:[e.jsx(r.icon,{className:"h-5 w-5 mx-auto mb-2",style:{color:r.color}}),e.jsx("div",{className:"text-xl font-bold",style:{color:r.color},children:r.value}),e.jsx("div",{className:"text-[11px] font-medium mt-1",style:{color:"var(--cs-text-secondary)"},children:r.label})]},r.label))}),p.unassigned.length>0&&e.jsxs("div",{children:[e.jsxs("h3",{className:"text-[14px] font-semibold mb-3 flex items-center gap-2",style:{color:"var(--cs-text-primary)"},children:[e.jsx(T,{className:"h-4 w-4",style:{color:"var(--cs-amber-400)"}}),"Unassigned Releases"]}),e.jsx("div",{className:"space-y-2",children:p.unassigned.map(r=>e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg cursor-pointer transition-all",style:{background:"var(--cs-bg-card)",border:"1px solid var(--cs-border)"},onClick:()=>a(r),onMouseEnter:b=>{b.currentTarget.style.borderColor="var(--cs-border-strong)"},onMouseLeave:b=>{b.currentTarget.style.borderColor="var(--cs-border)"},children:[e.jsx(E,{className:"h-4 w-4 flex-shrink-0",style:{color:"var(--cs-text-tertiary)"}}),e.jsx("span",{className:"text-[13px] font-medium flex-1",style:{color:"var(--cs-text-primary)"},children:r.display_name}),e.jsx(n,{release:r}),e.jsx("span",{className:"text-[11px] font-bold uppercase px-1.5 py-0.5 rounded-full",style:{background:"rgba(124,92,255,.12)",color:"var(--cs-purple-400)"},children:r.type}),e.jsx("span",{className:"text-[11px]",style:{color:"var(--cs-text-tertiary)"},children:r.status})]},r.id))})]}),p.needsReview.length>0&&e.jsxs("div",{children:[e.jsxs("h3",{className:"text-[14px] font-semibold mb-3 flex items-center gap-2",style:{color:"var(--cs-text-primary)"},children:[e.jsx(O,{className:"h-4 w-4",style:{color:"var(--cs-red-400)"}}),"Needs Review"]}),e.jsx("div",{className:"space-y-2",children:p.needsReview.map(r=>e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg cursor-pointer transition-all",style:{background:"rgba(239,68,68,.04)",border:"1px solid rgba(239,68,68,.15)"},onClick:()=>a(r),children:[e.jsx(O,{className:"h-4 w-4 flex-shrink-0",style:{color:"var(--cs-red-400)"}}),e.jsx("span",{className:"text-[13px] font-medium flex-1",style:{color:"var(--cs-text-primary)"},children:r.display_name}),e.jsx(n,{release:r})]},r.id))})]}),p.personsWithoutRelease.length>0&&e.jsxs("div",{children:[e.jsxs("h3",{className:"text-[14px] font-semibold mb-3 flex items-center gap-2",style:{color:"var(--cs-text-primary)"},children:[e.jsx(A,{className:"h-4 w-4",style:{color:"var(--cs-text-tertiary)"}}),"People Without Releases"]}),e.jsx("div",{className:"space-y-2",children:p.personsWithoutRelease.map(r=>e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg",style:{background:"var(--cs-bg-card)",border:"1px solid var(--cs-border)"},children:[e.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:"rgba(124,92,255,.1)"},children:e.jsx(A,{className:"h-4 w-4",style:{color:"var(--cs-purple-400)"}})}),e.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--cs-text-primary)"},children:r.display_name}),e.jsx("span",{className:"text-[11px] ml-auto",style:{color:"var(--cs-text-tertiary)"},children:"No releases attached"})]},r.id))})]}),p.assigned.length>0&&e.jsxs("div",{children:[e.jsxs("h3",{className:"text-[14px] font-semibold mb-3 flex items-center gap-2",style:{color:"var(--cs-text-primary)"},children:[e.jsx(I,{className:"h-4 w-4",style:{color:"var(--cs-green-400)"}}),"Assigned Releases"]}),e.jsx("div",{className:"space-y-2",children:p.assigned.map(r=>e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg cursor-pointer transition-all",style:{background:"var(--cs-bg-card)",border:"1px solid var(--cs-border)"},onClick:()=>a(r),children:[e.jsx(E,{className:"h-4 w-4 flex-shrink-0",style:{color:"var(--cs-green-400)"}}),e.jsx("span",{className:"text-[13px] font-medium flex-1",style:{color:"var(--cs-text-primary)"},children:r.display_name}),e.jsx(n,{release:r}),e.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--cs-green-400)"},children:[r.assignment_count," ",r.assignment_count===1?"asset":"assets"]})]},r.id))})]})]})}function Fe({status:a}){const t=a==="ready"?{label:"Ready",bg:"rgba(34,197,94,.12)",border:"rgba(34,197,94,.22)",color:"var(--cs-green-400)",Icon:I}:a==="needs_review"?{label:"Needs review",bg:"rgba(245,158,11,.12)",border:"rgba(245,158,11,.22)",color:"var(--cs-amber-400)",Icon:O}:a==="unsupported_for_platform"?{label:"Unsupported",bg:"rgba(255,255,255,.06)",border:"var(--cs-border)",color:"var(--cs-text-tertiary)",Icon:T}:{label:a.replace(/_/g," "),bg:"rgba(239,68,68,.12)",border:"rgba(239,68,68,.22)",color:"var(--cs-red-400)",Icon:T};return e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-semibold",style:{background:t.bg,border:`1px solid ${t.border}`,color:t.color},children:[e.jsx(t.Icon,{className:"h-3.5 w-3.5"}),t.label]})}function Ue({platform:a}
12){const t=a==="adobe"?"Adobe":a==="shutterstock"?"Shutterstock":a==="pond5"?"Pond5":"Getty";return e.jsxs("span",{className:"inline-flex items-center gap-2 text-[12px] font-semibold",style:{color:"var(--cs-text-primary)"},children:[e.jsx(_e,{className:"h-3.5 w-3.5",style:{color:"var(--cs-text-tertiary)"}}),t]})}function De(a){const t=a.release,i=g.useMemo(()=>t?G(t):null,[t]);return!a.open||!t?null:e.jsxs("div",{className:"fixed inset-0 z-[140] flex items-center justify-center",onClick:a.onClose,children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),e.jsxs("div",{className:"relative w-full max-w-3xl max-h-[88vh] overflow-hidden rounded-2xl",style:{background:"var(--cs-bg-elevated)",border:"1px solid var(--cs-border-strong)",boxShadow:"var(--cs-shadow-elevated)"},onClick:d=>d.stopPropagation(),children:[e.jsxs("div",{className:"px-5 py-4 flex items-start justify-between gap-3",style:{borderBottom:"1px solid var(--cs-border)"},children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-[14px] font-bold truncate",style:{color:"var(--cs-text-primary)"},children:t.display_name}),e.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-[11px]",style:{color:"var(--cs-text-tertiary)"},children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(E,{className:"h-3.5 w-3.5"})," ",t.type]}),e.jsx("span",{children:"·"}),e.jsx("span",{children:t.status.replace(/_/g," ")}),t.person?.display_name&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(A,{className:"h-3.5 w-3.5"})," ",t.person.display_name]})]}),t.signed_at&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(ae,{className:"h-3.5 w-3.5"})," Signed ",new Date(t.signed_at).toLocaleDateString()]})]})]})]}),e.jsx(ne,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:a.onClose,children:e.jsx(ee,{className:"h-4 w-4"})})]}),e.jsx("div",{className:"p-5 space-y-4 overflow-auto max-h-[72vh]",children:e.jsxs("div",{className:"rounded-xl p-4",style:{background:"var(--cs-bg-card)",border:"1px solid var(--cs-border)"},children:[e.jsx("div",{className:"text-[12px] font-semibold",style:{color:"var(--cs-text-primary)"},children:"Validation"}),e.jsx("div",{className:"mt-1 text-[11px]",style:{color:"var(--cs-text-tertiary)"},children:"Platform-aware readiness checks on top of a canonical release schema. This is a workflow layer (not legal advice)."}),i&&e.jsx("div",{className:"mt-4 space-y-3",children:Object.keys(i).map(d=>{const n=i[d];return e.jsxs("div",{className:"rounded-xl p-3",style:{background:"var(--cs-bg-elevated)",border:"1px solid var(--cs-border)"},children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(Ue,{platform:d}),e.jsx(Fe,{status:n.status})]}),n.issues.length>0?e.jsx("ul",{className:"mt-2 space-y-1",children:n.issues.slice(0,6).map(p=>e.jsxs("li",{className:"text-[12px]",style:{color:"var(--cs-text-secondary)"},children:["• ",p]},p))}):e.jsxs("div",{className:"mt-2 text-[12px]",style:{color:"var(--cs-text-tertiary)"},children:["Ready for ",be(d),"."]})]},d)})})]})})]})]})}const Oe=[{id:"adobe-model-en",platform:"adobe",platformLabel:"Adobe Stock",kind:"model",title:"Model Release (EN)",description:"Official Adobe Stock model release PDF.",formUrl:"https://contributor.stock.adobe.com/static/releases/model/Releases-en.pdf",docsUrl:"https://helpx.adobe.com/stock/contributor/help/upload-a-model-or-property-release.html",acceptedFormats:["pdf","jpg","jpeg","png"],createPreset:{type:"model",platformScope:["adobe"],displayName:"Adobe — Model Release"}},{id:"adobe-property-en",platform:"adobe",platformLabel:"Adobe Stock",kind:"property",title:"Property Release (EN)",description:"Official Adobe Stock property release PDF.",formUrl:"https://contributor.stock.adobe.com/static/releases/property/Releases-en.pdf",docsUrl:"https://helpx.adobe.com/stock/contributor/help/property-release.html",acceptedFormats:["pdf","jpg","jpeg","png"],createPreset:{type:"property",platformScope:["adobe"],displayName:"Adobe — Property Release"}},{id:"shutterstock-model-adult-en",platform:"shutterstock",platformLabel:"Shutterstock",kind:"model",title:"Model Release (Adult, EN)",description:"Official Shutterstock adult model release PDF.",formUrl:"https://ak.picdn.net/assets/cms/2e36c8b30913813b9e424f37ba0a730ec0c33de9-MR_Adult_en.pdf",docsUrl:"https://submit.shutterstock.com/help/en/articles/12135904-what-are-the-requirements-for-model-releases",acceptedFormats:["jpg","jpeg"],createPreset:{type:"model",platformScope:["shutterstock"],displayName:"Shutterstock — Model Release"}},{id:"shutterstock-model-minor-en",platform:"shutterstock",platformLabel:"Shutterstock",kind:"minor",title:"Model Release (Minor, EN)",description:"Official Shutterstock minor model release PDF.",formUrl:"https://ak.picdn.net/assets/cms/e1efa3785a32dbe2e1dc82d42959143a4d88077e-MINOR_print_en2.pdf",docsUrl:"https://submit.shutterstock.com/help/en/articles/10617411-content-publishing-standards-legal-documentation",acceptedFormats:["jpg","jpeg"],createPreset:{type:"minor",platformScope:["shutterstock"],displayName:"Shutterstock — Minor Release"}},{id:"shutterstock-property-en",platform:"shutterstock",platformLabel:"Shutterstock",kind:"property",title:"Property Release (EN)",description:"Official Shutterstock property release PDF.",formUrl:"https://ak.picdn.net/assets/cms/7bf49e59939f27ac2e40c733a1de209a93c59226-PROPERTY_print_en.pdf",docsUrl:"https://submit.shutterstock.com/help/en/articles/10617411-content-publishing-standards-legal-documentation",acceptedFormats:["jpg","jpeg"],createPreset:{type:"property",platformScope:["shutterstock"],displayName:"Shutterstock — Property Release"}},{id:"pond5-model-adult-en",platform:"pond5",platformLabel:"Pond5",kind:"model",title:"Model Release (Adult)",description:"Standard Pond5 adult model release PDF.",formUrl:"https://st.pond5.com/sitedoc/modelrelease2022.pdf",docsUrl:"https://contributor.pond5.com/getting-started/model-property-releases/",acceptedFormats:["jpg","jpeg","pdf","doc","tif","tiff"],createPreset:{type:"model",platformScope:["pond5"],displayName:"Pond5 — Model Release"}},{id:"pond5-model-minor-en",platform:"pond5",platformLabel:"Pond5",kind:"minor",title:"Model Release (Minor)",description:"Standard Pond5 minor model release PDF.",formUrl:"https://st.pond5.com/sitedoc/modelreleaseminor2022.pdf",docsUrl:"https://contributor.pond5.com/getting-started/model-property-releases/",acceptedFormats:["jpg","jpeg","pdf","doc","tif","tiff"],createPreset:{type:"minor",platformScope:["pond5"],displayName:"Pond5 — Minor Release"}},{id:"pond5-property-en",platform:"pond5",platformLabel:"Pond5",kind:"property",title:"Property Release",description:"Standard Pond5 property release PDF.",formUrl:"https://st.pond5.com/sitedoc/propertyrelease2022.pdf",docsUrl:"https://contributor.pond5.com/getting-started/model-property-releases/",acceptedFormats:["jpg","jpeg","pdf","doc","tif","tiff"],createPreset:{type:"property",platformScope:["pond5"],displayName:"Pond5 — Property Release"}},{id:"getty-releases",platform:"getty",platformLabel:"Getty / iStock",kind:"model",title:"Model & Property Releases",description:"Official release downloads page (may open outside CyberStock).",docsUrl:"https://contributors.gettyimages.com/article/3069",acceptedFormats:["pdf"],createPreset:{type:"model",platformScope:["getty"],displayName:"Getty — Model Release"}}];function Ee({platform:a}
12){const t=a==="adobe"?"Adobe Stock":a==="shutterstock"?"Shutterstock":a==="pond5"?"Pond5":"Getty / iStock",i=a==="adobe"?"PDF/JPG/PNG accepted; can upload scans or use digital signing in the contributor portal.":a==="shutterstock"?"Download the official PDFs, but keep a JPEG scan ready for submission (Shutterstock attaches releases as JPEG).":a==="pond5"?"Pond5 provides standard releases and accepts JPG/PDF/DOC/TIF, as long as required fields are present.":"Use Getty’s latest approved releases from the Contributor Community downloads.";return e.jsx("div",{className:"flex items-start justify-between gap-3",children:e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-[14px] font-bold",style:{color:"var(--cs-text-primary)"},children:t}),e.jsx("div",{className:"text-[12px]",style:{color:"var(--cs-text-tertiary)"},children:i})]})})}function U({children:a}){return e.jsx("span",{className:"inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-semibold",style:{background:"rgba(255,255,255,.06)",border:"1px solid var(--cs-border)",color:"var(--cs-text-secondary)"},children:a})}function Te(a){const t=a.template,i=t.kind==="model"?"Model":t.kind==="minor"?"Minor":"Property";return e.jsxs("div",{className:"rounded-xl p-4 flex flex-col gap-3",style:{background:"var(--cs-bg-card)",border:"1px solid var(--cs-border)",boxShadow:"var(--cs-shadow-card)"},children:[e.jsx("div",{className:"flex items-start justify-between gap-3",children:e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("div",{className:"text-[13px] font-semibold",style:{color:"var(--cs-text-primary)"},children:t.title}),e.jsx(U,{children:i}),t.acceptedFormats?.length?e.jsx(U,{children:t.acceptedFormats.map(d=>d.toUpperCase()).join(" / ")}):null]}),e.jsx("div",{className:"mt-1 text-[12px]",style:{color:"var(--cs-text-tertiary)"},children:t.description})]})}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[t.formUrl?e.jsxs("a",{href:t.formUrl,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 px-3 py-2 rounded-lg text-[12px] font-semibold transition-all",style:{background:"rgba(124,92,255,.14)",border:"1px solid rgba(124,92,255,.28)",color:"var(--cs-purple-300)"},title:"Open the official PDF in a new tab",children:[e.jsx(Ce,{className:"h-4 w-4"}),"Download"]}):null,t.docsUrl?e.jsxs("a",{href:t.docsUrl,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 px-3 py-2 rounded-lg text-[12px] font-semibold transition-all",style:{background:"var(--cs-bg-hover)",border:"1px solid var(--cs-border)",color:"var(--cs-text-secondary)"},title:"Open platform guidance / downloads",children:[e.jsx(ie,{className:"h-4 w-4"}),"Guidelines"]}):null,e.jsxs("button",{type:"button",onClick:()=>a.onCreate(t.createPreset),className:"inline-flex items-center gap-1.5 px-3 py-2 rounded-lg text-[12px] font-semibold transition-all",style:{background:"var(--cs-bg-hover)",border:"1px solid var(--cs-border)",color:"var(--cs-text-primary)"},title:"Create a draft release with the platform scope pre-selected",children:[e.jsx(D,{className:"h-4 w-4"}),"Create draft"]})]})]})}function Ie(a){const t=g.useMemo(()=>{const i={adobe:[],shutterstock:[],pond5:[],getty:[]};for(const d of Oe)i[d.platform].push(d);return i},[]);return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"rounded-xl p-4 flex items-start gap-3",style:{background:"rgba(124,92,255,.08)",border:"1px solid rgba(124,92,255,.18)"},children:[e.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center",style:{background:"rgba(124,92,255,.12)"},children:e.jsx(Q,{className:"h-5 w-5",style:{color:"var(--cs-purple-300)"}})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-[14px] font-semibold",style:{color:"var(--cs-text-primary)"},children:"Release templates"}),e.jsx("div",{className:"mt-1 text-[12px]",style:{color:"var(--cs-text-secondary)"},children:"Download official platform forms and create platform-scoped drafts in CyberStock. Templates are guidance only — you always stay in control."}),e.jsxs("div",{className:"mt-2 flex items-center gap-2 flex-wrap",children:[e.jsx(U,{children:"Keep all fields complete"}),e.jsx(U,{children:"Use legible signatures"}),e.jsx(U,{children:"One release per subject"}),e.jsx(U,{children:"Attach visual reference when required"})]})]})]}),["adobe","shutterstock","pond5","getty"].map(i=>e.jsxs("div",{className:"space-y-3",children:[e.jsx(Ee,{platform:i}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[t[i].map(d=>e.jsx(Te,{template:d,onCreate:a.onCreateFromTemplate},d.id)),t[i].length===0&&e.jsx("div",{className:"rounded-xl p-6 flex items-center justify-center text-center",style:{background:"var(--cs-bg-card)",border:"1px solid var(--cs-border)"},children:e.jsxs("div",{children:[e.jsx(te,{className:"h-5 w-5 mx-auto mb-2",style:{color:"var(--cs-text-tertiary)"}}),e.jsx("div",{className:"text-[13px] font-semibold",style:{color:"var(--cs-text-primary)"},children:"No templates yet"}),e.jsx("div",{className:"text-[12px]",style:{color:"var(--cs-text-tertiary)"},children:"Add templates for this platform."})]})})]})]},i))]})}const Ge=[{id:"library",label:"Library",icon:E},{id:"people",label:"People",icon:me},{id:"assignments",label:"Assignments",icon:oe},{id:"validation",label:"Validation",icon:Q},{id:"templates",label:"Templates",icon:te}];function rs(){const a=de(),{user:t}=pe(),[i,d]=g.useState(!1),[n,p]=g.useState(!1),r=h(s=>s.activeTab),b=h(s=>s.setActiveTab),c=h(s=>s.loading),f=h(s=>s.setLoading),m=h(s=>s.setReleases),l=h(s=>s.setPersons);h(s=>s.releases),h(s=>s.persons);const[k,o]=g.useState(!1),[N,y]=g.useState(!1),[P,C]=g.useState(null),[R,_]=g.useState(null),[w,z]=g.useState(null);g.useEffect(()=>{if(!t?.id)return;let s=!1;return(async()=>{f(!0);try{const[v,j]=await Promise.all([$.listReleases(t.id),$.listPersons(t.id)]);if(s)return;const u=v.map(S=>
12S.id),M=await $.getAssignmentCountsForReleases(u),L=v.map(S=>({...S,assignment_count:M[S.id]||0}));m(L),l(j)}catch(v){console.error("[Releases] Load error:",v)}finally{s||f(!1)}})(),()=>{s=!0}},[t?.id]);const F=g.useCallback(s=>{z(s)},[]),W=g.useCallback(s=>{toast({title:s.display_name,description:`${s.release_count||0} releases`})},[]),q=g.useCallback(s=>{C(s),y(!0)},[]),J=g.useCallback(async()=>{if(!t?.id)return;const s=prompt("Person name:");if(s?.trim())try{const x=await $.createPerson(t.id,{display_name:s.trim(),legal_name:null,aliases:[],notes:null,reference_image_url:null});h.getState().addPerson({...x,release_count:0,assigned_assets_count:0}),toast({title:"Person added",description:`${x.display_name} created.`})}catch(x){toast({title:"Error",description:x?.message,variant:"destructive"})}},[t?.id]);return e.jsxs("div",{className:"cs-page",style:{minHeight:"100vh"},children:[e.jsx(xe,{onUploadClick:()=>a("/dashboard"),onSessionsClick:()=>a("/dashboard?tab=sessions"),onPurchaseOpen:()=>d(!0),onAccountOpen:()=>p(!0)}),e.jsxs("div",{className:"max-w-[1400px] mx-auto px-5 py-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h1",{className:"text-[22px] font-bold tracking-tight",style:{color:"var(--cs-text-primary)"},children:"Releases"}),e.jsx("span",{className:"text-[9px] font-extrabold uppercase px-2 py-0.5 rounded-full",style:{background:"rgba(34,197,94,.15)",color:"var(--cs-green-400)",letterSpacing:"0.05em"},children:"New"})]}),e.jsx("p",{className:"text-[13px] mt-1",style:{color:"var(--cs-text-secondary)"},children:"Manage model & property releases, track people, and ensure platform compliance."})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>o(!0),className:"flex items-center gap-1.5 px-3.5 py-2 rounded-lg text-[13px] font-semibold text-white transition-all",style:{background:"var(--cs-purple-400)",boxShadow:"var(--cs-shadow-purple-btn)"},children:[e.jsx(le,{className:"h-3.5 w-3.5"})," Upload"]}),e.jsxs("button",{onClick:()=>{C(null),y(!0)},className:"flex items-center gap-1.5 px-3.5 py-2 rounded-lg text-[13px] font-semibold transition-all",style:{background:"var(--cs-bg-hover)",color:"var(--cs-text-primary)",border:"1px solid var(--cs-border)"},children:[e.jsx(D,{className:"h-3.5 w-3.5"})," Create"]})]})]}),e.jsx("div",{className:"flex items-center gap-1 mb-6 p-1 rounded-xl w-fit",style:{background:"var(--cs-bg-hover)",border:"1px solid var(--cs-border)"},children:Ge.map(s=>{const x=r===s.id,v=s.icon;return e.jsxs("button",{onClick:()=>!s.soon&&b(s.id),className:"flex items-center gap-1.5 px-3.5 py-2 rounded-lg text-[13px] font-medium transition-all relative",style:{background:x?"var(--cs-bg-card)":"transparent",color:x?"var(--cs-text-primary)":"var(--cs-text-tertiary)",boxShadow:x?"var(--cs-shadow-card)":"none",cursor:s.soon?"default":"pointer",opacity:s.soon?.5:1},children:[e.jsx(v,{className:"h-3.5 w-3.5"}),s.label,s.soon&&e.jsx("span",{className:"text-[8px] font-bold uppercase px-1.5 py-0.5 rounded-full ml-1",style:{background:"var(--cs-amber-glow)",color:"var(--cs-amber-400)",border:"1px solid rgba(245,158,11,.3)"},children:"Soon"})]},s.id)})}),c?e.jsxs("div",{className:"flex items-center justify-center py-20",children:[e.jsx(ue,{className:"h-6 w-6 animate-spin",style:{color:"var(--cs-purple-400)"}}),e.jsx("span",{className:"ml-3 text-[14px]",style:{color:"var(--cs-text-secondary)"},children:"Loading releases..."})]}):e.jsxs(e.Fragment,{children:[r==="library"&&e.jsx(Se,{onUploadClick:()=>o(!0),onCreateClick:()=>{C(null),_(null),y(!0)},onOpenRelease:F}),r==="people"&&e.jsx(Re,{onOpenPerson:W,onCreatePerson:J,onCreateReleaseForPerson:q}),r==="assignments"&&e.jsx(Ae,{onOpenRelease:F}),r==="validation"&&e.jsx(Le,{onOpenRelease:F}),r==="templates"&&e.jsx(Ie,{onCreateFromTemplate:s=>{C(null),_(s),y(!0)}})]})]}),e.jsx(ye,{open:k,onClose:()=>o(!1),preselectedPersonId:P}),e.jsx(ve,{open:N,onClose:()=>{y(!1),C(null),_(null)},preselectedPersonId:P,preset:R}),e.jsx(he,{open:i,onOpenChange:d,initialTab:"credits"}),e.jsx(ge,{open:n,onOpenChange:p,onUpgrade:()=>d(!0)}),e.jsx(De,{open:!!w,release:w,onClose:()=>z(null)})]})}export{rs 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.