1import"../chunks/BEeTzD81.js";import{z as X,A as T,a as v,p as Ee,e as Oe,au as Ue,t as A,g as a,b as we,s,c as t,f as m,r as e,C as F,d as Ce,u as q,aJ as Me}from"../chunks/UogNUigb.js";import{s as _}from"../chunks/D9BQNI7n.js";import{i as ne}from"../chunks/D2i9yI8Q.js";import{e as B}from"../chunks/CChIdX3P.js";import{a as H}from"../chunks/CwoqccGz.js";import{d as Ne,r as J,a as ie,s as K,e as Q}from"../chunks/B19PBCYW.js";import{e as V}from"../chunks/BXZUnN3R.js";import{P as We}from"../chunks/DDhZJMip.js";import{T as De}from"../chunks/C6gOHIQk.js";import"../chunks/Btqf53j4.js";import{I as ve,s as pe}from"../chunks/QzxoO3bF.js";import{l as ue,s as me}from"../chunks/BLXAlSTo.js";function Ge(h,i){const f=ue(i,["children","$$slots","$$events","$$legacy"]);/** 2 * @license lucide-svelte v1.0.1 - ISC 3 * 4 * ISC License 5 * 6 * Copyright (c) 2026 Lucide Icons and Contributors 7 * 8 * Permission to use, copy, modify, and/or distribute this software for any 9 * purpose with or without fee is hereby granted, provided that the above 10 * copyright notice and this permission notice appear in all copies. 11 * 12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 15 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 * 20 * --- 21 * 22 * The following Lucide icons are derived from the Feather project: 23 * 24 * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out 25 * 26 * The MIT License (MIT) (for the icons listed above) 27 * 28 * Copyright (c) 2013-present Cole Bemis 29 * 30 * Permission is hereby granted, free of charge, to any person obtaining a copy 31 * of this software and associated documentation files (the "Software"), to deal 32 * in the Software without restriction, including without limitation the rights 33 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 34 * copies of the Software, and to permit persons to whom the Software is 35 * furnished to do so, subject to the following conditions: 36 * 37 * The above copyright notice and this permission notice shall be included in all 38 * copies or substantial portions of the Software. 39 * 40 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 41 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 42 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 43 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 44 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 45 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 46 * SOFTWARE. 47 * 48 */const x=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}],["path",{d:"m2 2 20 20"}]];ve(h,me({name:"eye-off"},()=>f,{get iconNode(){return x},children:(b,y)=>{var p=X(),u=T(p);pe(u,i,"default",{}),v(b,p)},$$slots:{default:!0}}
48))}function Ie(h,i){const f=ue(i,["children","$$slots","$$events","$$legacy"]);/** 49 * @license lucide-svelte v1.0.1 - ISC 50 * 51 * ISC License 52 * 53 * Copyright (c) 2026 Lucide Icons and Contributors 54 * 55 * Permission to use, copy, modify, and/or distribute this software for any 56 * purpose with or without fee is hereby granted, provided that the above 57 * copyright notice and this permission notice appear in all copies. 58 * 59 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 60 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 61 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 62 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 63 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 64 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 65 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 66 * 67 * --- 68 * 69 * The following Lucide icons are derived from the Feather project: 70 * 71 * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out 72 * 73 * The MIT License (MIT) (for the icons listed above) 74 * 75 * Copyright (c) 2013-present Cole Bemis 76 * 77 * Permission is hereby granted, free of charge, to any person obtaining a copy 78 * of this software and associated documentation files (the "Software"), to deal 79 * in the Software without restriction, including without limitation the rights 80 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 81 * copies of the Software, and to permit persons to whom the Software is 82 * furnished to do so, subject to the following conditions: 83 * 84 * The above copyright notice and this permission notice shall be included in all 85 * copies or substantial portions of the Software. 86 * 87 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 88 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 89 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 90 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 91 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 92 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 93 * SOFTWARE. 94 * 95 */const x=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];ve(h,me({name:"eye"},()=>f,{get iconNode(){return x},children:(b,y)=>{var p=X(),u=T(p);pe(u,i,"default",{}),v(b,p)},$$slots:{default:!0}}))}var Le=m("<option> </option>"),Re=m('<div class="rounded-[14px] border border-dashed border-[var(--color-border)] p-12 text-center text-sm text-[var(--color-muted)]">No backgrounds yet. Add the first one above.</div>'),Fe=m("<!> Hide",1),qe=m("<!> Show",1),Be=m('<article><div class="aspect-video bg-[var(--color-surface-2)]"><img alt="" loading="lazy" class="w-full h-full object-cover block"/></div> <div class="p-3 flex flex-col gap-2"><div class="flex items-center justify-between text-[11px] text-[var(--color-muted)]"><span> </span> <span> </span></div> <a target="_blank" rel="noreferrer" class="text-[11px] truncate text-[var(--color-muted)] hover:text-[var(--color-accent)]"> </a> <div class="flex items-center gap-1.5"><form method="POST" action="?/setStatus" class="flex-1"><input type="hidden" name="id"/> <input type="hidden" name="status"/> <button type="submit" class="w-full h-8 flex items-center justify-center gap-1.5 text-xs rounded-[6px] bg-[var(--color-surface-2)] hover:bg-[var(--color-border)]"><!></button></form> <form method="POST" action="?/delete"><input type="hidden" name="id"/> <button type="submit" class="h-8 w-8 flex items-center justify-center rounded-[6px] bg-[var(--color-surface-2)] hover:bg-[var(--color-border)] text-[var(--color-ink-2)]" aria-label="Delete"><!></button></form></div></div></article>'),He=m('<section><h2 class="text-[10px] tracking-[0.16em] uppercase text-[var(--color-muted)] mb-3" style="font-family: var(--font-mono);"> </h2> <div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3"></div></section>'),Je=m('<div class="max-w-6xl mx-auto flex flex-col gap-8"><div class="flex items-end justify-between gap-4"><div><h1 class="text-2xl font-semibold mb-1">
95Background images</h1> <p class="text-sm text-[var(--color-muted)]"> </p></div></div> <section class="rounded-[14px] border border-[var(--color-border)] bg-[var(--color-surface)] p-5"><h2 class="text-[10px] tracking-[0.16em] uppercase text-[var(--color-muted)] mb-3" style="font-family: var(--font-mono);">Add background</h2> <form method="POST" action="?/add" class="grid grid-cols-1 md:grid-cols-[1fr_1fr_180px_100px_auto] gap-2 items-end"><label class="flex flex-col gap-1 text-xs"><span class="text-[var(--color-muted)]">Full image URL *</span> <input name="url" type="url" required="" placeholder="https://images.pexels.com/â¦/large.jpg" class="h-9 px-2 rounded-[8px] border border-[var(--color-border)] bg-[var(--color-surface-2)] text-sm"/></label> <label class="flex flex-col gap-1 text-xs"><span class="text-[var(--color-muted)]">Thumbnail URL (optional)</span> <input name="thumbnailUrl" type="url" placeholder="https://images.pexels.com/â¦/small.jpg" class="h-9 px-2 rounded-[8px] border border-[var(--color-border)] bg-[var(--color-surface-2)] text-sm"/></label> <label class="flex flex-col gap-1 text-xs"><span class="text-[var(--color-muted)]">Category</span> <select name="category" class="h-9 px-2 rounded-[8px] border border-[var(--color-border)] bg-[var(--color-surface-2)] text-sm"></select></label> <label class="flex flex-col gap-1 text-xs"><span class="text-[var(--color-muted)]">Sort</span> <input name="sortOrder" type="number" value="100" class="h-9 px-2 rounded-[8px] border border-[var(--color-border)] bg-[var(--color-surface-2)] text-sm"/></label> <button type="submit" class="h-9 px-4 rounded-[8px] bg-[var(--color-ink)] text-[var(--color-paper)] text-sm font-medium flex items-center gap-1.5 hover:opacity-90"><!> Add</button></form></section> <!></div>');function dr(h,i){Ee(i,!0);const f=["Landscape","Sky","Sea","Forest","Urban","Texture","Abstract"];let x=Oe(Ue(f[0]));const b=q(()=>{const r=new Map;for(const o of i.data.rows){const l=r.get(o.category)??[];l.push(o),r.set(o.category,l)}return[...r.entries()].sort(([o],[l])=>o.localeCompare(l))}),y=q(()=>({total:i.data.rows.length,approved:i.data.rows.filter(r=>r.status==="approved").length,removed:i.data.rows.filter(r=>r.status==="removed").length}));var p=Je(),u=t(p),Y=t(u),Z=s(t(Y),2),fe=t(Z);e(Z),e(Y),e(u);var E=s(u,2),O=s(t(E),2),U=s(t(O),4),w=s(t(U),2);B(w,20,()=>f,r=>r,(r,o)=>{var l=Le(),$=t(l,!0);e(l);var k={};A(()=>{_($,o),k!==(k=o)&&(l.value=(l.__value=o)??"")}),v(r,l)}),e(w),e(U);var ee=s(U,4),xe=t(ee);We(xe,{size:14,strokeWidth:2.4}),F(),e(ee),e(O),H(O,(r,o)=>{var l;return(l=V)==null?void 0:l(r,o)},()=>()=>({update:r})=>r({reset:!0})),e(E);var be=s(E,2);{var ge=r=>{var o=Re();v(r,o)},_e=r=>{var o=X(),l=T(o);B(l,17,()=>a(b),([$,k])=>$,($,k)=>{var re=q(()=>Me(a(k),2));let he=()=>a(re)[0],te=()=>a(re)[1];var C=He(),M=t(C),ye=t(M);e(M);var ae=s(M,2);B(ae,21,te,N=>N.id,(N,d)=>{var z=Be(),W=t(z),$e=t(W);e(W);var oe=s(W,2),D=t(oe),j=t(D),ke=t(j,!0);e(j);var se=s(j,2),Se=t(se);e(se),e(D);var S=s(D,2),Te=t(S,!0);e(S);var le=s(S,2),P=t(le),G=t(P);J(G);var I=s(G,2);J(I);var de=s(I,2),ze=t(de);{var je=c=>{var n=Fe(),g=T(n);Ge(g,{size:13,strokeWidth:1.8}),F(),v(c,n)},Pe=c=>{var n=qe(),g=T(n);Ie(g,{size:13,strokeWidth:1.8}),F(),v(c,n)};ne(ze,c=>{a(d).status==="approved"?c(je):c(Pe,-1)})}e(de),e(P),H(P,c=>{var n;return(n=V)==null?void 0:n(c)});var L=s(P,2),R=t(L);J(R);var ce=s(R,2),Ae=t(ce);De(Ae,{size:13,strokeWidth:1.8}),e(ce),e(L),H(L,(c,n)=>{var g;return(g=V)==null?void 0:g(c,n)},()=>({cancel:c})=>(confirm("Delete this background?")||c(),({update:n})=>n())),e(le),e(oe),e(z),A(()=>{ie(z,1,`rounded-[12px] border border-[var(--color-border)] bg-[var(--color-surface)] overflow-hidden flex flex-col ${a(d).status==="removed"?"opacity-50":""}`),K($e,"src",a(d).thumbnailUrl),ie(j,1,`px-1.5 py-0.5 rounded-[4px] ${a(d).status==="approved"?"bg-[var(--color-surface-2)] text-[var(--color-ink)]":"bg-[var(--color-surface-2)]"}`),_(ke,a(d).status),_(Se,`sort ${a(d).sortOrder??""}`),K(S,"href",a(d).url),K(S,"title",a(d).url),_(Te,a(d).url),Q(G,a(d).id),Q(I,a(d).status==="approved"?"removed":"approved"),Q(R,a(d).id)}),v(N,z)}),e(ae),e(C),A(()=>_(ye,`${he()??""} · ${te().length??""}`)),v($,C)}),v(r,o)};ne(be,r=>{a(b).length===0?r(ge):r(_e,-1)})}e(p),A(()=>_(fe,`${a(y).approved??""} approved · ${a(y).removed??""} hidden · ${a(y).total??""} total`)),Ne(w,()=>a(x),r=>Ce(x,r)),v(h,p),we()}
95export{dr 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.