PageSourceSearch

https://jchen8000-librechat.hf.space/assets/avatars.CH7OGiPh.js

js jchen8000-librechat.hf.space collected 2026-10-03 16:59:08 UTC 8,126 bytes, 1 lines download raw bytes

1import{r as e}from"./rolldown-runtime.Cyuzqnbw.js";function t(e){return e.replace(/&/g,`&amp;`).replace(/'/g,`&apos;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function n(e){let n=e.meta?.title,i=e.meta?.creator,a=e.meta?.source,o=e.meta?.license?.url,s=r(e);return!n&&!i&&!a&&!o&&!s?``:`<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>`+(n?`<dc:title>${t(n)}</dc:title>`:``)+(i?`<dc:creator>${t(i)}</dc:creator>`:``)+(a?`<dc:source xsi:type="dcterms:URI">${t(e.meta?.source??``)}</dc:source>`:``)+(o?`<dcterms:license xsi:type="dcterms:URI">${t(o)}</dcterms:license>`:``)+(s?`<dc:rights>${t(s)}</dc:rights>`:``)+`</rdf:Description></rdf:RDF></metadata>`}function r(e){let t=e.meta?.title?`„${e.meta?.title}”`:`Design`,n=`„${e.meta?.creator??`Unknown`}”`;e.meta?.source&&(t+=` (${e.meta.source})`);let r=``;return e.meta?.license?.name!==`MIT`&&e.meta?.creator!==`DiceBear`&&e.meta?.title&&(r+=`Remix of `),r+=`${t} by ${n}`,e.meta?.license?.name&&(r+=`, licensed under „${e.meta?.license?.name}”`,e.meta?.license?.url&&(r+=` (${e.meta.license.url})`)),r}var i=-2147483648,a=2147483647;function o(e){return e^=e<<13,e^=e>>17,e^=e<<5,e}function s(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0,t=o(t);return t}function c(e=``){e=e.toString();let t=s(e)||1,n=()=>t=o(t),r=(e,t)=>Math.floor((n()-i)/(a-i)*(t+1-e)+e);return{seed:e,next:n,bool(e=50){return r(1,100)<=e},integer(e,t){return r(e,t)},pick(e,t){return e.length===0?(n(),t):e[r(0,e.length-1)]??t},shuffle(e){let t=c(n().toString()),r=[...e];for(let e=r.length-1;e>0;e--){let n=t.integer(0,e);[r[e],r[n]]=[r[n],r[e]]}return r},string(e,t=`abcdefghijklmnopqrstuvwxyz1234567890`){let r=c(n().toString()),i=``;for(let n=0;n<e;n++)i+=t[r.integer(0,t.length-1)];return i}}}function l(e){let t=e.attributes.viewBox.split(` `);return{x:parseInt(t[0]),y:parseInt(t[1]),width:parseInt(t[2]),height:parseInt(t[3])}}function u(e,n,r,i,a){let{width:o,height:s,x:c,y:u}=l(e),d=`<rect fill="${t(n)}" width="${o}" height="${s}" x="${c}" y="${u}" />`;switch(i){case`solid`:return d+e.body;case`gradientLinear`:return`<rect fill="url(#backgroundLinear)" width="${o}" height="${s}" x="${c}" y="${u}" /><defs><linearGradient id="backgroundLinear" gradientTransform="rotate(${a} 0.5 0.5)"><stop stop-color="${t(n)}"/><stop offset="1" stop-color="${t(r)}"/></linearGradient></defs>`+e.body}}function d(e,t){let{width:n,height:r,x:i,y:a}=l(e),o=t?(t-100)/100:0;return`<g transform="translate(${(n/2+i)*o*-1} ${(r/2+a)*o*-1}) scale(${t/100})">${e.body}</g>`}function f(e,t,n){let r=l(e);return`<g transform="translate(${(r.width+r.x*2)*((t??0)/100)} ${(r.height+r.y*2)*((n??0)/100)})">${e.body}</g>`}function p(e,t){let{width:n,height:r,x:i,y:a}=l(e);return`<g transform="rotate(${t}, ${n/2+i}, ${r/2+a})">${e.body}</g>`}function m(e){let{width:t,x:n}=l(e);return`<g transform="scale(-1 1) translate(${t*-1-n*2} 0)">${e.body}</g>`}function h(e,t){let{width:n,height:r,x:i,y:a}=l(e);return`<mask id="viewboxMask"><rect width="${n}" height="${r}" rx="${t?n*t/100:0}" ry="${t?r*t/100:0}" x="${i}" y="${a}" fill="#fff" /></mask><g mask="url(#viewboxMask)">${e.body}</g>`}function g(e){let n={xmlns:`http://www.w3.org/2000/svg`,...e.attributes};return Object.keys(n).map(e=>`${t(e)}="${t(n[e])}"`).join(` `)}function _(e){let t=c(Math.random().toString()),n={};return e.body.replace(/(id="|url\(#)([a-z0-9-_]+)([")])/gi,(e,r,i,a)=>(n[i]=n[i]||t.string(8),`${r}${n[i]}${a}`))}var v={type:`object`,$schema:`http://json-schema.org/draft-07/schema#`,properties:{seed:{type:`string`},flip:{type:`boolean`,default:!1},rotate:{type:`integer`,minimum:0,maximum:360,default:0},scale:{type:`integer`,minimum:0,maximum:200,default:100},radius:{type:`integer`,minimum:0,maximum:50,default:0},size:{type:`integer`,minimum:1},backgroundColor:{type:`array`,items:{type:`string`,pattern:`^(transparent|[a-fA-F0-9]{6})$`}},backgroundType:{type:`array`,items:{type:`string`,enum:[`solid`,`gradientLinear`]},default:[`solid`]},backgroundRotation:{type:`array`,items:{type:`integer`,minimum:-360,maximum:360},default:[0,360]},translateX:{type:`integer`,minimum:-100,maximum:100,default:0},translateY:{type:`integer`,minimum:-100,maximum:100,default:0},clip:{type:`boolean`,default:!0},randomizeIds:{type:`boolean`,default:!1}}};function y(e){let t={},n=e.properties??{};
1return Object.keys(n).forEach(e=>{let r=n[e];typeof r==`object`&&r.default!==void 0&&(Array.isArray(r.default)?t[e]=[...r.default]:typeof r.default==`object`?t[e]={...r.default}:t[e]=r.default)}),t}function b(e,t){let n={...y(v),...y(e.schema??{}),...t};return JSON.parse(JSON.stringify(n))}function x(e){return e===`transparent`?e:`#${e}`}function S(e,t,n){let r=e.shuffle(t);r.length<=1||t.length==2&&n==`gradientLinear`?(r=t,e.next()):r=e.shuffle(t),r.length===0&&(r=[`transparent`]);let i=r[0],a=r[1]??r[0];return{primary:x(i),secondary:x(a)}}function C(e,t={}){t=b(e,t);let r=c(t.seed),i=e.create({prng:r,options:t}),a=r.pick(t.backgroundType??[],`solid`),{primary:o,secondary:s}=S(r,t.backgroundColor??[],a),l=r.integer(t.backgroundRotation?.length?Math.min(...t.backgroundRotation):0,t.backgroundRotation?.length?Math.max(...t.backgroundRotation):0);t.size&&(i.attributes.width=t.size.toString(),i.attributes.height=t.size.toString()),t.scale!==void 0&&t.scale!==100&&(i.body=d(i,t.scale)),t.flip&&(i.body=m(i)),t.rotate&&(i.body=p(i,t.rotate)),(t.translateX||t.translateY)&&(i.body=f(i,t.translateX,t.translateY)),o!==`transparent`&&s!==`transparent`&&(i.body=u(i,o,s,a,l)),(t.radius||t.clip)&&(i.body=h(i,t.radius??0)),t.randomizeIds&&(i.body=_(i));let v=`<svg ${g(i)}>${n(e)}${i.body}</svg>`;return{toString:()=>v,toJson:()=>({svg:v,extra:{primaryBackgroundColor:o,secondaryBackgroundColor:s,backgroundType:a,backgroundRotation:l,...i.extra?.call(i)}}),toDataUri:()=>`data:image/svg+xml;utf8,${encodeURIComponent(v)}`}}function w(e,t=!0){let n=e;t&&(n=e.replace(/@.*/,``)),n=n.replace(/[`´‘’'ʼ]/g,``);let r=n.match(/(\p{L}[\p{L}\p{M}]*)/gu);return r?r.length===1?r[0].match(/^(?:\p{L}\p{M}*){1,2}/u)[0].toUpperCase():(r[0].match(/^(?:\p{L}\p{M}*)/u)[0]+r[r.length-1].match(/^(?:\p{L}\p{M}*)/u)[0]).toUpperCase():t?w(e,!1):``}function T(e){return e===`transparent`?e:`#${e}`}function E(e){return e.replace(/&/g,`&amp;`).replace(/'/g,`&apos;`).replace(/"/g,`&quot;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}var D={$schema:`http://json-schema.org/draft-07/schema#`,properties:{backgroundColor:{type:`array`,items:{type:`string`,pattern:`^(transparent|[a-fA-F0-9]{6})$`},default:[`e53935`,`d81b60`,`8e24aa`,`5e35b1`,`3949ab`,`1e88e5`,`039be5`,`00acc1`,`00897b`,`43a047`,`7cb342`,`c0ca33`,`fdd835`,`ffb300`,`fb8c00`,`f4511e`]},textColor:{type:`array`,items:{type:`string`,pattern:`^(transparent|[a-fA-F0-9]{6})$`},default:[`ffffff`]},fontFamily:{type:`array`,minItems:1,items:{type:`string`,enum:[`Arial`,`Verdana`,`Helvetica`,`Tahoma`,`Trebuchet MS`,`Times New Roman`,`Georgia`,`Garamond`,`Courier New`,`Brush Script MT`,`sans-serif`,`serif`]},default:[`Arial`,`sans-serif`]},fontSize:{type:`integer`,minimum:1,maximum:100,default:50},chars:{type:`integer`,minimum:0,maximum:2,default:2},fontWeight:{type:`integer`,default:400,enum:[100,200,300,400,500,600,700,800,900]}}},O=e({create:()=>A,meta:()=>k,schema:()=>D}),k={title:`Initials`,creator:`DiceBear`,source:`https://github.com/dicebear/dicebear`,license:{name:`CC0 1.0`,url:`https://creativecommons.org/publicdomain/zero/1.0/`}},A=({prng:e,options:t})=>{let n=t.fontFamily?.join(`, `)??`Arial, sans-serif`,r=t.fontSize??50,i=t.fontWeight??400,a=T(e.pick(t.textColor??[])??`ffffff`),o=w(e.seed.trim()).slice(0,t.chars??2);return{attributes:{viewBox:`0 0 100 100`},body:[`<text x="50%" y="50%" font-family="${E(n)}" font-size="${r}" font-weight="${i}" fill="${E(a)}" text-anchor="middle" dy="${(r*.356).toFixed(3)}">${E(o)}</text>`].join(``),extra:()=>({fontFamily:n,fontSize:r,fontWeight:i,textColor:a,initials:o})}};export{C as n,O as t};

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.