You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
144 KiB
2 lines
144 KiB
2 weeks ago
|
var B=Object.defineProperty;var P=(e,a,l)=>a in e?B(e,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[a]=l;var C=(e,a,l)=>P(e,typeof a!="symbol"?a+"":a,l);import{aa as H,C as I,V as O,_ as j,x as L,h as R}from"./index-BLqts8WY.js";function d(e){return e.replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function T(e){var a,l,i,n,t,c,f;const r=(a=e.meta)===null||a===void 0?void 0:a.title,u=(l=e.meta)===null||l===void 0?void 0:l.creator,s=(i=e.meta)===null||i===void 0?void 0:i.source,o=(t=(n=e.meta)===null||n===void 0?void 0:n.license)===null||t===void 0?void 0:t.url,h=E(e);return!r&&!u&&!s&&!o&&!h?"":'<metadata xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"><rdf:RDF><rdf:Description>'+(r?`<dc:title>${d(r)}</dc:title>`:"")+(u?`<dc:creator>${d(u)}</dc:creator>`:"")+(s?`<dc:source xsi:type="dcterms:URI">${d((f=(c=e.meta)===null||c===void 0?void 0:c.source)!==null&&f!==void 0?f:"")}</dc:source>`:"")+(o?`<dcterms:license xsi:type="dcterms:URI">${d(o)}</dcterms:license>`:"")+(h?`<dc:rights>${d(h)}</dc:rights>`:"")+"</rdf:Description></rdf:RDF></metadata>"}function E(e){var a,l,i,n,t,c,f,r,u,s,o,h,p,_,y;let g=!((a=e.meta)===null||a===void 0)&&a.title?`„${(l=e.meta)===null||l===void 0?void 0:l.title}”`:"Design",Z=`„${(n=(i=e.meta)===null||i===void 0?void 0:i.creator)!==null&&n!==void 0?n:"Unknown"}”`;!((t=e.meta)===null||t===void 0)&&t.source&&(g+=` (${e.meta.source})`);let b="";return((f=(c=e.meta)===null||c===void 0?void 0:c.license)===null||f===void 0?void 0:f.name)!=="MIT"&&((r=e.meta)===null||r===void 0?void 0:r.creator)!=="DiceBear"&&(!((u=e.meta)===null||u===void 0)&&u.title)&&(b+="Remix of "),b+=`${g} by ${Z}`,!((o=(s=e.meta)===null||s===void 0?void 0:s.license)===null||o===void 0)&&o.name&&(b+=`, licensed under „${(p=(h=e.meta)===null||h===void 0?void 0:h.license)===null||p===void 0?void 0:p.name}”`,!((y=(_=e.meta)===null||_===void 0?void 0:_.license)===null||y===void 0)&&y.url&&(b+=` (${e.meta.license.url})`)),b}function G(e){var a,l,i,n,t,c,f,r,u;const s=E(e);return{"IPTC:ObjectName":(a=e.meta)===null||a===void 0?void 0:a.title,"XMP-dc:Title":(l=e.meta)===null||l===void 0?void 0:l.title,"IPTC:CopyrightNotice":s,"XMP-dc:Rights":s,"IPTC:By-line":(i=e.meta)===null||i===void 0?void 0:i.creator,"XMP-dc:Creator":(n=e.meta)===null||n===void 0?void 0:n.creator,"IPTC:Credit":(t=e.meta)===null||t===void 0?void 0:t.creator,"XMP-photoshop:Credit":(c=e.meta)===null||c===void 0?void 0:c.creator,"XMP-plus:LicensorURL":(f=e.meta)===null||f===void 0?void 0:f.source,"XMP-xmpRights:WebStatement":(u=(r=e.meta)===null||r===void 0?void 0:r.license)===null||u===void 0?void 0:u.url}}const S=-2147483648,W=2147483647;function N(e){return e^=e<<13,e^=e>>17,e^=e<<5,e}function X(e){let a=0;for(let l=0;l<e.length;l++)a=(a<<5)-a+e.charCodeAt(l)|0,a=N(a);return a}function w(e=""){e=e.toString();let a=X(e)||1;const l=()=>a=N(a),i=(n,t)=>Math.floor((l()-S)/(W-S)*(t+1-n)+n);return{seed:e,next:l,bool(n=50){return i(0,100)<=n},integer(n,t){return i(n,t)},pick(n,t){var c;return n.length===0?(l(),t):(c=n[i(0,n.length-1)])!==null&&c!==void 0?c:t},shuffle(n){const t=w(l().toString());return n.sort(()=>t.integer(-1,1))},string(n,t="abcdefghijklmnopqrstuvwxyz1234567890"){const c=w(l().toString());let f="";for(let r=0;r<n;r++)f+=t[c.integer(0,t.length-1)];return f}}}function $(e){let a=e.attributes.viewBox.split(" "),l=parseInt(a[0]),i=parseInt(a[1]),n=parseInt(a[2]),t=parseInt(a[3]);return{x:l,y:i,width:n,height:t}}function q(e,a,l,i,n){let{width:t,height:c,x:f,y:r}=$(e);const u=`<rect fill="${a}" width="${t}" height="${c}" x="${f}" y="${r}" />`;switch(i){case"solid":return u+e.body;case"gradientLinear":return`<rect fill="url(#backgroundLinear)" width="${t}" height="${c}" x="${f}" y="${r}" /><defs><linearGradient id="backgroundLinear" gradientTransform="rotate(${n} 0.5 0.5)"><stop stop-color="${a}"/><stop offset="1" stop-color="${l}"/>
|