-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpegeongen.html
More file actions
133 lines (117 loc) 路 37.6 KB
/
Copy pathpegeongen.html
File metadata and controls
133 lines (117 loc) 路 37.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>馃惁</text></svg>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pigeon Generator</title>
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@400;600;700;800&display=swap" rel="stylesheet">
<script type="module">
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},t=([e,n,r])=>{let i=document.createElementNS(`http://www.w3.org/2000/svg`,e);return Object.keys(n).forEach(e=>{i.setAttribute(e,String(n[e]))}),r?.length&&r.forEach(e=>{let n=t(e);i.appendChild(n)}),i},n=(n,r={})=>t([`svg`,{...e,...r},n]),r=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},i=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),a=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),o=e=>{let t=a(e);return t.charAt(0).toUpperCase()+t.slice(1)},s=e=>Array.from(e.attributes).reduce((e,t)=>(e[t.name]=t.value,e),{}),c=e=>typeof e==`string`?e:!e||!e.class?``:e.class&&typeof e.class==`string`?e.class.split(` `):e.class&&Array.isArray(e.class)?e.class:``,l=(t,{nameAttr:a,icons:l,attrs:u})=>{let d=t.getAttribute(a);if(d==null)return;let f=l[o(d)];if(!f)return console.warn(`${t.outerHTML} icon name was not found in the provided icons object.`);let p=s(t),m=r(p)?{}:{"aria-hidden":`true`},h={...e,"data-lucide":d,...m,...u,...p},g=c(p),_=c(u),v=i(`lucide`,`lucide-${d}`,...g,..._);v&&Object.assign(h,{class:v});let y=n(f,h);return t.parentNode?.replaceChild(y,t)},u=[[`path`,{d:`m16 18 6-6-6-6`}],[`path`,{d:`m8 6-6 6 6 6`}]],d=[[`path`,{d:`M12 15V3`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}],[`path`,{d:`m7 10 5 5 5-5`}]],f=[[`circle`,{cx:`18`,cy:`5`,r:`3`}],[`circle`,{cx:`6`,cy:`12`,r:`3`}],[`circle`,{cx:`18`,cy:`19`,r:`3`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`}]],p=({icons:e={},nameAttr:t=`data-lucide`,attrs:n={},root:r=document,inTemplates:i}={})=>{if(!Object.values(e).length)throw Error(`Please provide an icons object.
If you want to use all the icons you can import it like:
\`import { createIcons, icons } from 'lucide';
lucide.createIcons({icons});\``);if(r===void 0)throw Error("`createIcons()` only works in a browser environment.");if(Array.from(r.querySelectorAll(`[${t}]`)).forEach(r=>l(r,{nameAttr:t,icons:e,attrs:n})),i&&Array.from(r.querySelectorAll(`template`)).forEach(r=>p({icons:e,nameAttr:t,attrs:n,root:r.content,inTemplates:i})),t===`data-lucide`){let t=r.querySelectorAll(`[icon-name]`);t.length>0&&(console.warn(`[Lucide] Some icons were found with the now deprecated icon-name attribute. These will still be replaced for backwards compatibility, but will no longer be supported in v1.0 and you should switch to data-lucide`),Array.from(t).forEach(t=>l(t,{nameAttr:`icon-name`,icons:e,attrs:n})))}},m=class{constructor(e){this.setSeed(e)}setSeed(e){if(typeof e==`string`){let t=2166136261;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),16777619);this.seed=t>>>0}else typeof e==`number`?this.seed=Math.floor(e)>>>0:this.seed=Math.floor(Math.random()*4294967295);this.initialSeed=this.seed}random(){let e=this.seed+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}range(e,t){return e+this.random()*(t-e)}int(e,t){return Math.floor(this.range(e,t+1))}choice(e){return e[Math.floor(this.random()*e.length)]}boolean(e=.5){return this.random()<e}};function h(){let e=`PIGEON-`;for(let t=0;t<5;t++)e+=`ABCDEFGHJKLMNPQRSTUVWXYZ23456789`.charAt(Math.floor(Math.random()*32));return e}function g(e,t,n){e=(e%360+360)%360,t=Math.min(1,Math.max(0,t)),n=Math.min(1,Math.max(0,n));let r=(1-Math.abs(2*n-1))*t,i=r*(1-Math.abs(e/60%2-1)),a=n-r/2,o=0,s=0,c=0;e<60?[o,s,c]=[r,i,0]:e<120?[o,s,c]=[i,r,0]:e<180?[o,s,c]=[0,r,i]:e<240?[o,s,c]=[0,i,r]:e<300?[o,s,c]=[i,0,r]:[o,s,c]=[r,0,i];let l=e=>Math.round((e+a)*255).toString(16).padStart(2,`0`);return`#${l(o)}${l(s)}${l(c)}`}var _=[{name:`Blue Bar`,w:5,hue:[226,258],sat:[.1,.19],light:[.6,.7]},{name:`Slate`,w:3,hue:[212,246],sat:[.06,.14],light:[.45,.56]},{name:`Pearl`,w:2.5,hue:[228,272],sat:[.05,.13],light:[.79,.87]},{name:`Ash Rose`,w:2,hue:[298,342],sat:[.08,.17],light:[.62,.72]},{name:`Toasted`,w:2,hue:[16,34],sat:[.16,.29],light:[.54,.66]},{name:`Charcoal`,w:1.5,hue:[216,250],sat:[.05,.12],light:[.34,.43]},{name:`Cream`,w:1.5,hue:[34,52],sat:[.17,.31],light:[.78,.86]}];function v(e){let t=_.reduce((e,t)=>e+t.w,0),n=e.random()*t;for(let e of _)if(n-=e.w,n<=0)return e;return _[0]}function y(e){let t=v(e),n=e.range(t.hue[0],t.hue[1]),r=e.range(t.sat[0],t.sat[1]),i=e.range(t.light[0],t.light[1]),a=Math.min(.13,i*.28),o=e.range(14,30),s=e.range(18,34),c=e.range(288,322),l=e.range(138,168);return{name:t.name,hue:Math.round(n),body:g(n,r,i),bodyLight:g(n,r*.85,Math.min(.95,i+a*.55)),head:g(n+3,r*1.08,i-a*.35),wing:g(n-5,r*1.12,i-a),wingEdge:g(n-6,r*1.15,i-a*1.9),bar:g(n-8,r*1.2,Math.max(.13,i-a*2.4)),chest:g(o,e.range(.3,.46),Math.min(.88,i*.28+.6)),chestDeep:g(o-4,e.range(.34,.5),Math.min(.82,i*.24+.53)),beak:g(n,r*.7,Math.max(.28,i-a*1.6)),cere:g(n,.08,Math.min(.96,i*.15+.84)),foot:g(s,e.range(.68,.86),e.range(.52,.61)),footShade:g(s-6,e.range(.66,.82),e.range(.38,.45)),irid1:g(c,e.range(.45,.62),e.range(.4,.5)),irid2:g(l,e.range(.4,.58),e.range(.36,.46)),ink:g(n,Math.min(.3,r+.12),Math.max(.13,i-.4)),eye:g(n,.22,.11)}}function b(e,t,n){if(n<=0)return Math.min(e,t);let r=Math.max(n-Math.abs(e-t),0)/n;return Math.min(e,t)-r*r*n*.25}function x(e,t,n){let r=e-n.cx,i=t-n.cy;if(n.rot){let e=Math.cos(-n.rot),t=Math.sin(-n.rot),a=r*e-i*t;i=r*t+i*e,r=a}return(Math.hypot(r/n.rx,i/n.ry)-1)*Math.min(n.rx,n.ry)}function S(e,t=24){return(n,r)=>{let i=x(n,r,e[0]);for(let a=1;a<e.length;a++){let o=e[a];i=b(i,x(n,r,o),o.blend??t)}return i}}function C(e,t,n,r,i,a=420,o=200,s=22){let c=a/o,l=a,u=-1;for(let o=a;o>0;o-=c){if(e(t+r*o,n+i*o)<0){u=o;break}l=o}if(u<0)return null;for(let a=0;a<s;a++){let a=(u+l)*.5;e(t+r*a,n+i*a)<0?u=a:l=a}return(u+l)*.5}function w(e,t,n,{samples:r=96,rMax:i=420,wobble:a=null}={}){let o=[];for(let s=0;s<r;s++){let c=s/r*Math.PI*2,l=Math.cos(c),u=Math.sin(c),d=C(e,t,n,l,u,i);d!==null&&(a&&(d*=a(c)),o.push({x:t+l*d,y:n+u*d,t:c,r:d}))}return o}function T(e){let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let a of e)a.x<t&&(t=a.x),a.y<n&&(n=a.y),a.x>r&&(r=a.x),a.y>i&&(i=a.y);return{minX:t,minY:n,maxX:r,maxY:i}}var E=1/6,D=e=>(Math.round(e*10)/10).toString();function O(e,t=E){if(!e||e.length<3)return``;let n=e.length,r=`M${D(e[0].x)} ${D(e[0].y)}`;for(let i=0;i<n;i++){let a=e[(i-1+n)%n],o=e[i],s=e[(i+1)%n],c=e[(i+2)%n];r+=`C${D(o.x+(s.x-a.x)*t)} ${D(o.y+(s.y-a.y)*t)} ${D(s.x-(c.x-o.x)*t)} ${D(s.y-(c.y-o.y)*t)} ${D(s.x)} ${D(s.y)}`}return r+`Z`}function k(e,t=E){if(!e||e.length<2)return``;if(e.length===2)return`M${D(e[0].x)} ${D(e[0].y)}L${D(e[1].x)} ${D(e[1].y)}`;let n=e.length,r=`M${D(e[0].x)} ${D(e[0].y)}`;for(let i=0;i<n-1;i++){let a=e[Math.max(i-1,0)],o=e[i],s=e[i+1],c=e[Math.min(i+2,n-1)];r+=`C${D(o.x+(s.x-a.x)*t)} ${D(o.y+(s.y-a.y)*t)} ${D(s.x-(c.x-o.x)*t)} ${D(s.y-(c.y-o.y)*t)} ${D(s.x)} ${D(s.y)}`}return r}function A(e){let t=e*Math.PI/180;return{x:Math.cos(t),y:Math.sin(t)}}function j(e,t,n){let r=n*Math.PI/180,i=Math.cos(r),a=Math.sin(r),o=e.x-t.x,s=e.y-t.y;return{x:t.x+o*i-s*a,y:t.y+o*a+s*i}}function M(e){return{x:e.y,y:-e.x}}function N(e,t,n){return e+(t-e)*n}var ee=Math.PI/180,P=e=>(Math.round(e*10)/10).toString();function F(e){let t=new m(e),n=t.range(.9,1.12),r=t.range(-1,1),i=t.boolean(.42),a=t.range(33,44)*n;return{seed:e,palette:y(t),scale:n,bodyRX:t.range(68,84)*n*(1+r*.1),bodyRY:t.range(76,94)*n*(1-r*.1),blend:t.range(26,40),neckBlend:t.range(11,18),tailBlend:t.range(8,14),chestPuff:t.range(.88,1.18),chestDrop:t.range(-.04,.16),headR:a,headRise:t.range(20,38),headDX:i?t.range(8,24):t.range(24,42),headTilt:t.range(-13,13),threeQuarter:i,beakAngle:i?t.range(34,58):t.range(-2,18),hasCrest:t.boolean(.2),crestSize:t.range(.3,.44),tailLen:t.range(52,82)*n,tailW:t.range(.2,.3),tailAngle:t.range(154,180),tailFeathers:t.int(3,5),wingSpan:t.range(.88,1.06),wingH:t.range(.34,.44),wingShoulder:t.range(-68,-40),bars:t.int(2,3),checkered:t.boolean(.28),beakLen:t.range(.54,.7),beakThick:t.range(.21,.27),eyeStyle:t.choice([`bead`,`bead`,`bead`,`bead`,`sleepy`,`content`,`wink`,`derp`]),eyeR:t.range(.155,.205),legSpread:t.range(11,25),legLen:t.range(17,30)*n,legThick:t.range(4.6,6.4),footLen:t.range(13,20)*n,toeSpread:t.range(20,32),seam:t.boolean(.55),wobbleAmp:t.range(.004,.013),wobblePhase:t.range(0,Math.PI*2)}}function I(e){let t={x:0,y:25},n=[{cx:t.x,cy:t.y,rx:e.bodyRX,ry:e.bodyRY},{cx:t.x+e.bodyRX*.46,cy:t.y+e.bodyRY*e.chestDrop,rx:e.bodyRX*.56*e.chestPuff,ry:e.bodyRY*.54*e.chestPuff}],r={x:t.x,y:t.y-e.bodyRY*.35},i=j({x:t.x+e.headDX,y:t.y-e.bodyRY*.92-e.headRise},r,e.headTilt);n.push({cx:i.x,cy:i.y,rx:e.headR,ry:e.headR,blend:e.neckBlend});let a=e.beakAngle+e.headTilt,o=A(a),s=M(o);if(e.hasCrest){let t=A(a+196);n.push({cx:i.x+t.x*e.headR*.82,cy:i.y+t.y*e.headR*.82,rx:e.headR*e.crestSize,ry:e.headR*e.crestSize*.78,blend:9})}let c=A(e.tailAngle),l={x:t.x+c.x*e.bodyRX*.62,y:t.y+c.y*e.bodyRY*.52},u={x:l.x+c.x*e.tailLen,y:l.y+c.y*e.tailLen};n.push({cx:(l.x+u.x)/2,cy:(l.y+u.y)/2,rx:e.tailLen*.62,ry:e.tailLen*e.tailW,rot:e.tailAngle*ee,blend:e.tailBlend});let d=S(n,e.blend),f=w(d,t.x,t.y,{samples:132,wobble:t=>1+e.wobbleAmp*Math.sin(5*t+e.wobblePhase)+e.wobbleAmp*.7*Math.sin(9*t+e.wobblePhase*1.7)}),p=O(f),m=T(f),h=A(e.wingShoulder),g={x:t.x+h.x*e.bodyRX*.5,y:t.y+h.y*e.bodyRY*.5},_={x:N(g.x,l.x,e.wingSpan)+c.x*e.bodyRX*.16,y:N(g.y,l.y,e.wingSpan)+c.y*e.bodyRY*.16},v=Math.hypot(_.x-g.x,_.y-g.y),y=Math.atan2(_.y-g.y,_.x-g.x),b=e.bodyRY*e.wingH,x={x:Math.cos(y),y:Math.sin(y)},E={x:(g.x+_.x)/2,y:(g.y+_.y)/2},D=O(w(S([{cx:E.x-x.x*v*.12,cy:E.y-x.y*v*.12,rx:v*.46,ry:b,rot:y},{cx:E.x+x.x*v*.34,cy:E.y+x.y*v*.34,rx:v*.26,ry:b*.5,rot:y}],24),E.x,E.y,{samples:64,rMax:320})),F=[],I=M(x);for(let t=0;t<e.bars;t++){let e=.2+t*.16,n={x:E.x+x.x*v*e,y:E.y+x.y*v*e},r=b*1.6;F.push(k([{x:n.x-I.x*r,y:n.y-I.y*r},{x:n.x+x.x*v*.03,y:n.y+x.y*v*.03},{x:n.x+I.x*r,y:n.y+I.y*r}]))}let L=[];if(e.checkered)for(let e=-3;e<=3;e++)for(let t=-2;t<=2;t++){let n=(e*.5+(t%2?.25:0))*v*.26,r=t*b*.5;L.push({x:E.x+x.x*n+I.x*r,y:E.y+x.y*n+I.y*r})}let R=[];for(let t=1;t<e.tailFeathers;t++){let n=t/e.tailFeathers-.5,r=M(c),i={x:l.x+r.x*e.tailLen*e.tailW*n*.7,y:l.y+r.y*e.tailLen*e.tailW*n*.7},a={x:u.x+r.x*e.tailLen*e.tailW*n*2.1,y:u.y+r.y*e.tailLen*e.tailW*n*2.1};R.push(k([i,{x:(i.x+a.x)/2,y:(i.y+a.y)/2},a]))}let z={x:i.x+o.x*e.headR*.9,y:i.y+o.y*e.headR*.9},B=e.headR*e.beakLen,V=e.headR*e.beakThick,H=A(a+62),U={x:z.x+o.x*B+H.x*B*.16,y:z.y+o.y*B+H.y*B*.16},te=`M${P(z.x+s.x*V)} ${P(z.y+s.y*V)}C${P(z.x+o.x*B*.5+s.x*V*.78)} ${P(z.y+o.y*B*.5+s.y*V*.78)} ${P(U.x-o.x*B*.22+s.x*V*.24)} ${P(U.y-o.y*B*.22+s.y*V*.24)} ${P(U.x)} ${P(U.y)}C${P(U.x-o.x*B*.3-s.x*V*.3)} ${P(U.y-o.y*B*.3-s.y*V*.3)} ${P(z.x+o.x*B*.34-s.x*V*.88)} ${P(z.y+o.y*B*.34-s.y*V*.88)} ${P(z.x-s.x*V)} ${P(z.y-s.y*V)}Z`,ne=k([{x:z.x+o.x*B*.1,y:z.y+o.y*B*.1},{x:z.x+o.x*B*.55-s.x*V*.1,y:z.y+o.y*B*.55-s.y*V*.1},{x:U.x-o.x*B*.06,y:U.y-o.y*B*.06}]),W={x:z.x-o.x*V*.15+s.x*V*.72,y:z.y-o.y*V*.15+s.y*V*.72,rx:V*.62,ry:V*.42},re=e.headR*e.eyeR,G=A(e.headTilt),K=M(G),ie=[{x:i.x+G.x*e.headR*.4+K.x*e.headR*.14,y:i.y+G.y*e.headR*.4+K.y*e.headR*.14,r:re}];e.threeQuarter&&ie.push({x:i.x-G.x*e.headR*.33+K.x*e.headR*.16,y:i.y-G.y*e.headR*.33+K.y*e.headR*.16,r:re*.88});let q=[],J=m.maxY+e.legLen;for(let n of[-1,1]){let r=A(90+n*e.legSpread),i=C(d,t.x,t.y,r.x,r.y);if(i===null)continue;let a={x:t.x+r.x*(i-6),y:t.y+r.y*(i-6)},o={x:a.x+n*3,y:J};q.push({hip:a,ankle:o,side:n})}q.sort((e,t)=>e.side-t.side);let ae=(t,n)=>{let r=e.footLen*(n>0?1:.92),i=[];for(let n of[-e.toeSpread,0,e.toeSpread]){let e=A(n*.5),a={x:t.x+e.x*r*.55,y:t.y+e.y*r*.55+2},o={x:t.x+e.x*r,y:t.y+e.y*r};i.push(k([t,a,o]))}let a=A(178);return i.push(k([t,{x:t.x+a.x*r*.3,y:t.y+a.y*r*.3+1},{x:t.x+a.x*r*.5,y:t.y+a.y*r*.5}])),i},Y={x:t.x+e.bodyRX*.5,y:t.y+e.bodyRY*(e.chestDrop+.1)},oe={cx:Y.x+e.bodyRX*.16,cy:Y.y+e.bodyRY*.22,rx:e.bodyRX*.62*e.chestPuff,ry:e.bodyRY*.58*e.chestPuff},X={x:N(i.x,Y.x,.34),y:N(i.y,Y.y,.3)+e.headR*.3},se={cx:X.x,cy:X.y,rx:e.headR*.78,ry:e.headR*.56,rot:-28},ce=[];for(let t=0;t<3;t++){let n=[];for(let r=0;r<=10;r++){let i=r/10,a=(i-.5)*e.headR*1.3,o=(t-1)*e.headR*.24+Math.sin(i*Math.PI*2.2+t)*e.headR*.05;n.push({x:X.x+a*.88+o*.47,y:X.y+a*.47-o*.88})}ce.push(k(n))}let Z=[];for(let e=0;e<=10;e++){let n=A(N(-18,86,e/10)),r=C(d,t.x,t.y,n.x,n.y);r!==null&&Z.push({x:t.x+n.x*(r-6),y:t.y+n.y*(r-6)})}let le=Z.length>2?k(Z):``,Q=T(f.concat([U,{x:W.x,y:W.y}],q.flatMap(t=>[{x:t.ankle.x-e.footLen*.6,y:J+6},{x:t.ankle.x+e.footLen,y:J+6}]))),ue=Q.maxX-Q.minX+44,de=Q.maxY-Q.minY+44,$=Math.max(ue,de);return{bodyPath:p,outline:f,box:m,view:{x:Q.minX-22-($-ue)/2,y:Q.minY-22-($-de)/2,size:$},groundY:J,bodyC:t,wingPath:D,barPaths:F,checkers:L,checkerR:b*.16,tailLines:R,beakPath:te,gapePath:ne,cere:W,eyes:ie,legs:q,footPath:ae,chestPatch:oe,neckPatch:se,sheen:ce,seamPath:le,headC:i,u:o,n:s,beakDeg:a}}function L(e,t,n,r,i,a){let o=n.ink,s={x:-i.x,y:-i.y};if(t===`content`||t===`wink`&&!a){let t={x:e.x-r.x*e.r*1.5,y:e.y-r.y*e.r*1.5},n={x:e.x+r.x*e.r*1.5,y:e.y+r.y*e.r*1.5},i={x:e.x-s.x*e.r*1.5,y:e.y-s.y*e.r*1.5};return`<path d="M${P(t.x)} ${P(t.y)}Q${P(i.x)} ${P(i.y)} ${P(n.x)} ${P(n.y)}" fill="none" stroke="${o}" stroke-width="${P(e.r*.72)}" stroke-linecap="round"/>`}if(t===`sleepy`){let t={x:e.x-r.x*e.r*1.4,y:e.y-r.y*e.r*1.4},n={x:e.x+r.x*e.r*1.4,y:e.y+r.y*e.r*1.4},i={x:e.x+s.x*e.r*1.3,y:e.y+s.y*e.r*1.3};return`<path d="M${P(t.x)} ${P(t.y)}Q${P(i.x)} ${P(i.y)} ${P(n.x)} ${P(n.y)}" fill="none" stroke="${o}" stroke-width="${P(e.r*.66)}" stroke-linecap="round"/>`}return t===`derp`?`<g>
<circle cx="${P(e.x)}" cy="${P(e.y)}" r="${P(e.r*1.35)}" fill="#fff" stroke="${o}" stroke-width="${P(e.r*.34)}"/>
<circle cx="${P(e.x+r.x*e.r*.4)}" cy="${P(e.y+r.y*e.r*.4-e.r*.3)}" r="${P(e.r*.62)}" fill="${n.eye}"/>
</g>`:`<g>
<circle cx="${P(e.x)}" cy="${P(e.y)}" r="${P(e.r*1.28)}" fill="${n.chestDeep}" opacity="0.5"/>
<circle cx="${P(e.x)}" cy="${P(e.y)}" r="${P(e.r)}" fill="${n.eye}"/>
<circle cx="${P(e.x-e.r*.32)}" cy="${P(e.y-e.r*.36)}" r="${P(e.r*.36)}" fill="#fff" opacity="0.92"/>
<circle cx="${P(e.x+e.r*.34)}" cy="${P(e.y+e.r*.3)}" r="${P(e.r*.17)}" fill="#fff" opacity="0.6"/>
</g>`}function R(e,t={}){let{width:n=360,height:r=360,uid:i=`pigeon`,background:a=`none`}=t,o=e,s=o.palette,c=I(o),l=`pg-${i}`,u=Math.max(2.4,3.4*o.scale),d=c.checkers.map(e=>`<circle cx="${P(e.x)}" cy="${P(e.y)}" r="${P(c.checkerR)}" fill="${s.bar}" opacity="0.5"/>`).join(``),f=c.legs.map(e=>`<path d="M${P(e.hip.x)} ${P(e.hip.y)}L${P(e.ankle.x)} ${P(e.ankle.y)}" stroke="${e.side>0?s.foot:s.footShade}" stroke-width="${P(o.legThick)}" stroke-linecap="round" fill="none"/>`).join(``),p=c.legs.map(e=>{let t=e.side>0?s.foot:s.footShade;return c.footPath(e.ankle,e.side).map(e=>`<path d="${e}" fill="none" stroke="${t}" stroke-width="${P(o.legThick*.92)}" stroke-linecap="round"/>`).join(``)}).join(``);return`<svg id="${l}" viewBox="${P(c.view.x)} ${P(c.view.y)} ${P(c.view.size)} ${P(c.view.size)}" width="${n}" height="${r}" xmlns="http://www.w3.org/2000/svg" style="display:block;overflow:visible;background:${a}">
<defs>
<clipPath id="${l}-body"><path d="${c.bodyPath}"/></clipPath>
<clipPath id="${l}-wing"><path d="${c.wingPath}"/></clipPath>
<clipPath id="${l}-neck"><ellipse cx="${P(c.neckPatch.cx)}" cy="${P(c.neckPatch.cy)}" rx="${P(c.neckPatch.rx*.94)}" ry="${P(c.neckPatch.ry*.94)}" transform="rotate(${P(c.neckPatch.rot)} ${P(c.neckPatch.cx)} ${P(c.neckPatch.cy)})"/></clipPath>
<radialGradient id="${l}-irid" cx="0.42" cy="0.4" r="0.62">
<stop offset="0%" stop-color="${s.irid1}" stop-opacity="0.62"/>
<stop offset="58%" stop-color="${s.irid2}" stop-opacity="0.44"/>
<stop offset="100%" stop-color="${s.irid2}" stop-opacity="0"/>
</radialGradient>
<radialGradient id="${l}-chest" cx="0.5" cy="0.44" r="0.58">
<stop offset="0%" stop-color="${s.chest}" stop-opacity="0.98"/>
<stop offset="52%" stop-color="${s.chest}" stop-opacity="0.86"/>
<stop offset="100%" stop-color="${s.chestDeep}" stop-opacity="0"/>
</radialGradient>
<radialGradient id="${l}-lift" cx="0.34" cy="0.2" r="0.8">
<stop offset="0%" stop-color="#fff" stop-opacity="0.2"/>
<stop offset="100%" stop-color="#fff" stop-opacity="0"/>
</radialGradient>
<radialGradient id="${l}-ao" cx="0.5" cy="0.95" r="0.55">
<stop offset="0%" stop-color="${s.ink}" stop-opacity="0.30"/>
<stop offset="100%" stop-color="${s.ink}" stop-opacity="0"/>
</radialGradient>
</defs>
<ellipse cx="${P(c.bodyC.x+o.bodyRX*.1)}" cy="${P(c.groundY+o.legThick*.6)}" rx="${P(o.bodyRX*.78)}" ry="${P(Math.max(7,o.bodyRX*.11))}" fill="${s.ink}" opacity="0.16"/>
<g>${f}${p}</g>
<path d="${c.bodyPath}" fill="${s.body}"/>
<g clip-path="url(#${l}-body)">
<ellipse cx="${P(c.chestPatch.cx)}" cy="${P(c.chestPatch.cy)}" rx="${P(c.chestPatch.rx)}" ry="${P(c.chestPatch.ry)}" fill="url(#${l}-chest)" opacity="0.95"/>
${c.tailLines.map(e=>`<path d="${e}" fill="none" stroke="${s.wingEdge}" stroke-width="${P(u*.5)}" stroke-linecap="round" opacity="0.55"/>`).join(``)}
<g transform="rotate(${P(c.neckPatch.rot)} ${P(c.neckPatch.cx)} ${P(c.neckPatch.cy)})">
<ellipse cx="${P(c.neckPatch.cx)}" cy="${P(c.neckPatch.cy)}" rx="${P(c.neckPatch.rx)}" ry="${P(c.neckPatch.ry)}" fill="url(#${l}-irid)"/>
</g>
<g clip-path="url(#${l}-neck)">
${c.sheen.map((e,t)=>`<path d="${e}" fill="none" stroke="${t===1?`#fff`:s.irid1}" stroke-width="${P(u*.5)}" stroke-linecap="round" opacity="${t===1?.34:.26}"/>`).join(``)}
</g>
<path d="${c.wingPath}" fill="${s.wing}"/>
<g clip-path="url(#${l}-wing)">
${c.barPaths.map(e=>`<path d="${e}" fill="none" stroke="${s.bar}" stroke-width="${P(u*1.5)}" stroke-linecap="round" opacity="0.85"/>`).join(``)}
${d}
</g>
<path d="${c.wingPath}" fill="none" stroke="${s.ink}" stroke-width="${P(u*.86)}" stroke-linejoin="round" opacity="0.9"/>
<rect x="${P(c.view.x)}" y="${P(c.view.y)}" width="${P(c.view.size)}" height="${P(c.view.size)}" fill="url(#${l}-lift)"/>
<rect x="${P(c.view.x)}" y="${P(c.view.y)}" width="${P(c.view.size)}" height="${P(c.view.size)}" fill="url(#${l}-ao)"/>
${o.seam&&c.seamPath?`<path d="${c.seamPath}" fill="none" stroke="${s.ink}" stroke-width="${P(u*.3)}" stroke-dasharray="3 6" stroke-linecap="round" opacity="0.22"/>`:``}
</g>
<path d="${c.bodyPath}" fill="none" stroke="${s.ink}" stroke-width="${P(u)}" stroke-linejoin="round"/>
<path d="${c.beakPath}" fill="${s.beak}" stroke="${s.ink}" stroke-width="${P(u*.66)}" stroke-linejoin="round"/>
<path d="${c.gapePath}" fill="none" stroke="${s.ink}" stroke-width="${P(u*.36)}" stroke-linecap="round" opacity="0.7"/>
<ellipse cx="${P(c.cere.x)}" cy="${P(c.cere.y)}" rx="${P(c.cere.rx)}" ry="${P(c.cere.ry)}" transform="rotate(${P(c.beakDeg)} ${P(c.cere.x)} ${P(c.cere.y)})" fill="${s.cere}" stroke="${s.ink}" stroke-width="${P(u*.44)}"/>
${c.eyes.map((e,t)=>L(e,o.eyeStyle,s,c.u,c.n,t>0)).join(``)}
</svg>`}var z=[`Strutton`,`Barnaby`,`Pecky`,`Winston`,`Cooper`,`Archibald`,`Pip`,`Gulliver`,`Bumble`,`Percy`,`Ollie`,`Montgomery`,`Algernon`,`Chonky`,`Biscoff`,`Pudding`,`Crumbs`,`Toast`,`Fluffington`,`Professor Coo`,`Inspector`,`Captain`],B=[`Featherstone`,`McPeck`,`Strutton`,`Cooington`,`Bagelton`,`Crumbworth`,`Flufftail`,`Pigeonby`,`Skywalker`,`Waddles`,`VanderCoo`,`Pebbleford`,`Loafman`,`Glitterwing`],V=[`Litter Inspector`,`Bread Enthusiast`,`City Explorer`,`Park Commander`,`Plush Ambassador`,`Fashion Icon`,`Mail Pigeon`,`Roof Guardian`,`Coo Master`];function H(e){let t=e.choice(z),n=e.choice(B),r=e.choice(V);return{fullName:`${t} ${n}`,title:r}}var U={};(function e(t,n,r,i){var a=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),o=typeof Path2D==`function`&&typeof DOMMatrix==`function`,s=(function(){if(!t.OffscreenCanvas)return!1;try{var e=new OffscreenCanvas(1,1),n=e.getContext(`2d`);n.fillRect(0,0,1,1);var r=e.transferToImageBitmap();n.createPattern(r,`no-repeat`)}catch{return!1}return!0})();function c(){}function l(e){var r=n.exports.Promise,i=r===void 0?t.Promise:r;return typeof i==`function`?new i(e):(e(c,c),null)}var u=(function(e,t){return{transform:function(n){if(e)return n;if(t.has(n))return t.get(n);var r=new OffscreenCanvas(n.width,n.height);return r.getContext(`2d`).drawImage(n,0,0),t.set(n,r),r},clear:function(){t.clear()}}})(s,new Map),d=function(){var e,t,n={},r=0;return typeof requestAnimationFrame==`function`&&typeof cancelAnimationFrame==`function`?(e=function(e){var t=Math.random();return n[t]=requestAnimationFrame(function i(a){r===a||r+16-1<a?(r=a,delete n[t],e()):n[t]=requestAnimationFrame(i)}),t},t=function(e){n[e]&&cancelAnimationFrame(n[e])}):(e=function(e){return setTimeout(e,16)},t=function(e){return clearTimeout(e)}),{frame:e,cancel:t}}(),f=(function(){var t,n,i={};function o(e){function t(t,n){e.postMessage({options:t||{},callback:n})}e.init=function(t){var n=t.transferControlToOffscreen();e.postMessage({canvas:n},[n])},e.fire=function(r,a,o){if(n)return t(r,null),n;var s=Math.random().toString(36).slice(2);return n=l(function(a){function c(t){t.data.callback===s&&(delete i[s],e.removeEventListener(`message`,c),n=null,u.clear(),o(),a())}e.addEventListener(`message`,c),t(r,s),i[s]=c.bind(null,{data:{callback:s}})}),n},e.reset=function(){for(var t in e.postMessage({reset:!0}),i)i[t](),delete i[t]}}return function(){if(t)return t;if(!r&&a){var n=[`var CONFETTI, SIZE = {}, module = {};`,`(`+e.toString()+`)(this, module, true, SIZE);`,`onmessage = function(msg) {`,` if (msg.data.options) {`,` CONFETTI(msg.data.options).then(function () {`,` if (msg.data.callback) {`,` postMessage({ callback: msg.data.callback });`,` }`,` });`,` } else if (msg.data.reset) {`,` CONFETTI && CONFETTI.reset();`,` } else if (msg.data.resize) {`,` SIZE.width = msg.data.resize.width;`,` SIZE.height = msg.data.resize.height;`,` } else if (msg.data.canvas) {`,` SIZE.width = msg.data.canvas.width;`,` SIZE.height = msg.data.canvas.height;`,` CONFETTI = module.exports.create(msg.data.canvas);`,` }`,`}`].join(`
`);try{t=new Worker(URL.createObjectURL(new Blob([n])))}catch(e){return typeof console<`u`&&typeof console.warn==`function`&&console.warn(`馃帄 Could not load worker`,e),null}o(t)}return t}})(),p={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:[`square`,`circle`],zIndex:100,colors:[`#26ccff`,`#a25afd`,`#ff5e7e`,`#88ff5a`,`#fcff42`,`#ffa62d`,`#ff36ff`],disableForReducedMotion:!1,scalar:1};function m(e,t){return t?t(e):e}function h(e){return e!=null}function g(e,t,n){return m(e&&h(e[t])?e[t]:p[t],n)}function _(e){return e<0?0:Math.floor(e)}function v(e,t){return Math.floor(Math.random()*(t-e))+e}function y(e){return parseInt(e,16)}function b(e){return e.map(x)}function x(e){var t=String(e).replace(/[^0-9a-f]/gi,``);return t.length<6&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),{r:y(t.substring(0,2)),g:y(t.substring(2,4)),b:y(t.substring(4,6))}}function S(e){var t=g(e,`origin`,Object);return t.x=g(t,`x`,Number),t.y=g(t,`y`,Number),t}function C(e){e.width=document.documentElement.clientWidth,e.height=document.documentElement.clientHeight}function w(e){var t=e.getBoundingClientRect();e.width=t.width,e.height=t.height}function T(e){var t=document.createElement(`canvas`);return t.style.position=`fixed`,t.style.top=`0px`,t.style.left=`0px`,t.style.pointerEvents=`none`,t.style.zIndex=e,t}function E(e,t,n,r,i,a,o,s,c){e.save(),e.translate(t,n),e.rotate(a),e.scale(r,i),e.arc(0,0,1,o,s,c),e.restore()}function D(e){var t=e.angle*(Math.PI/180),n=e.spread*(Math.PI/180);return{x:e.x,y:e.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:e.startVelocity*.5+Math.random()*e.startVelocity,angle2D:-t+(.5*n-Math.random()*n),tiltAngle:(Math.random()*.5+.25)*Math.PI,color:e.color,shape:e.shape,tick:0,totalTicks:e.ticks,decay:e.decay,drift:e.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:e.gravity*3,ovalScalar:.6,scalar:e.scalar,flat:e.flat}}function O(e,t){t.x+=Math.cos(t.angle2D)*t.velocity+t.drift,t.y+=Math.sin(t.angle2D)*t.velocity+t.gravity,t.velocity*=t.decay,t.flat?(t.wobble=0,t.wobbleX=t.x+10*t.scalar,t.wobbleY=t.y+10*t.scalar,t.tiltSin=0,t.tiltCos=0,t.random=1):(t.wobble+=t.wobbleSpeed,t.wobbleX=t.x+10*t.scalar*Math.cos(t.wobble),t.wobbleY=t.y+10*t.scalar*Math.sin(t.wobble),t.tiltAngle+=.1,t.tiltSin=Math.sin(t.tiltAngle),t.tiltCos=Math.cos(t.tiltAngle),t.random=Math.random()+2);var n=t.tick++/t.totalTicks,r=t.x+t.random*t.tiltCos,i=t.y+t.random*t.tiltSin,a=t.wobbleX+t.random*t.tiltCos,s=t.wobbleY+t.random*t.tiltSin;if(e.fillStyle=`rgba(`+t.color.r+`, `+t.color.g+`, `+t.color.b+`, `+(1-n)+`)`,e.beginPath(),o&&t.shape.type===`path`&&typeof t.shape.path==`string`&&Array.isArray(t.shape.matrix))e.fill(N(t.shape.path,t.shape.matrix,t.x,t.y,Math.abs(a-r)*.1,Math.abs(s-i)*.1,Math.PI/10*t.wobble));else if(t.shape.type===`bitmap`){var c=Math.PI/10*t.wobble,l=Math.abs(a-r)*.1,d=Math.abs(s-i)*.1,f=t.shape.bitmap.width*t.scalar,p=t.shape.bitmap.height*t.scalar,m=new DOMMatrix([Math.cos(c)*l,Math.sin(c)*l,-Math.sin(c)*d,Math.cos(c)*d,t.x,t.y]);m.multiplySelf(new DOMMatrix(t.shape.matrix));var h=e.createPattern(u.transform(t.shape.bitmap),`no-repeat`);h.setTransform(m),e.globalAlpha=1-n,e.fillStyle=h,e.fillRect(t.x-f/2,t.y-p/2,f,p),e.globalAlpha=1}else if(t.shape===`circle`)e.ellipse?e.ellipse(t.x,t.y,Math.abs(a-r)*t.ovalScalar,Math.abs(s-i)*t.ovalScalar,Math.PI/10*t.wobble,0,2*Math.PI):E(e,t.x,t.y,Math.abs(a-r)*t.ovalScalar,Math.abs(s-i)*t.ovalScalar,Math.PI/10*t.wobble,0,2*Math.PI);else if(t.shape===`star`)for(var g=Math.PI/2*3,_=4*t.scalar,v=8*t.scalar,y=t.x,b=t.y,x=5,S=Math.PI/x;x--;)y=t.x+Math.cos(g)*v,b=t.y+Math.sin(g)*v,e.lineTo(y,b),g+=S,y=t.x+Math.cos(g)*_,b=t.y+Math.sin(g)*_,e.lineTo(y,b),g+=S;else e.moveTo(Math.floor(t.x),Math.floor(t.y)),e.lineTo(Math.floor(t.wobbleX),Math.floor(i)),e.lineTo(Math.floor(a),Math.floor(s)),e.lineTo(Math.floor(r),Math.floor(t.wobbleY));return e.closePath(),e.fill(),t.tick<t.totalTicks}function k(e,t,n,a,o){var s=t.slice(),c=e.getContext(`2d`),f,p,m=l(function(t){function l(){f=p=null,c.clearRect(0,0,a.width,a.height),u.clear(),o(),t()}function m(){r&&!(a.width===i.width&&a.height===i.height)&&(a.width=e.width=i.width,a.height=e.height=i.height),!a.width&&!a.height&&(n(e),a.width=e.width,a.height=e.height),c.clearRect(0,0,a.width,a.height),s=s.filter(function(e){return O(c,e)}),s.length?f=d.frame(m):l()}f=d.frame(m),p=l});return{addFettis:function(e){return s=s.concat(e),m},canvas:e,promise:m,reset:function(){f&&d.cancel(f),p&&p()}}}function A(e,n){var r=!e,i=!!g(n||{},`resize`),o=!1,s=g(n,`disableForReducedMotion`,Boolean),c=a&&g(n||{},`useWorker`)?f():null,u=r?C:w,d=e&&c?!!e.__confetti_initialized:!1,p=typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion)`).matches,m;function h(t,n,r){for(var i=g(t,`particleCount`,_),a=g(t,`angle`,Number),o=g(t,`spread`,Number),s=g(t,`startVelocity`,Number),c=g(t,`decay`,Number),l=g(t,`gravity`,Number),d=g(t,`drift`,Number),f=g(t,`colors`,b),p=g(t,`ticks`,Number),h=g(t,`shapes`),y=g(t,`scalar`),x=!!g(t,`flat`),C=S(t),w=i,T=[],E=e.width*C.x,O=e.height*C.y;w--;)T.push(D({x:E,y:O,angle:a,spread:o,startVelocity:s,color:f[w%f.length],shape:h[v(0,h.length)],ticks:p,decay:c,gravity:l,drift:d,scalar:y,flat:x}));return m?m.addFettis(T):(m=k(e,T,u,n,r),m.promise)}function y(n){var a=s||g(n,`disableForReducedMotion`,Boolean),f=g(n,`zIndex`,Number);if(a&&p)return l(function(e){e()});r&&m?e=m.canvas:r&&!e&&(e=T(f),document.body.appendChild(e)),i&&!d&&u(e);var _={width:e.width,height:e.height};c&&!d&&c.init(e),d=!0,c&&(e.__confetti_initialized=!0);function v(){if(c){var t={getBoundingClientRect:function(){if(!r)return e.getBoundingClientRect()}};u(t),c.postMessage({resize:{width:t.width,height:t.height}});return}_.width=_.height=null}function y(){m=null,i&&(o=!1,t.removeEventListener(`resize`,v)),r&&e&&(document.body.contains(e)&&document.body.removeChild(e),e=null,d=!1)}return i&&!o&&(o=!0,t.addEventListener(`resize`,v,!1)),c?c.fire(n,_,y):h(n,_,y)}return y.reset=function(){c&&c.reset(),m&&m.reset()},y}var j;function M(){return j||=A(null,{useWorker:!0,resize:!0}),j}function N(e,t,n,r,i,a,o){var s=new Path2D(e),c=new Path2D;c.addPath(s,new DOMMatrix(t));var l=new Path2D;return l.addPath(c,new DOMMatrix([Math.cos(o)*i,Math.sin(o)*i,-Math.sin(o)*a,Math.cos(o)*a,n,r])),l}function ee(e){if(!o)throw Error(`path confetti are not supported in this browser`);var t,n;typeof e==`string`?t=e:(t=e.path,n=e.matrix);var r=new Path2D(t),i=document.createElement(`canvas`).getContext(`2d`);if(!n){for(var a=1e3,s=a,c=a,l=0,u=0,d,f,p=0;p<a;p+=2)for(var m=0;m<a;m+=2)i.isPointInPath(r,p,m,`nonzero`)&&(s=Math.min(s,p),c=Math.min(c,m),l=Math.max(l,p),u=Math.max(u,m));d=l-s,f=u-c;var h=10,g=Math.min(h/d,h/f);n=[g,0,0,g,-Math.round(d/2+s)*g,-Math.round(f/2+c)*g]}return{type:`path`,path:t,matrix:n}}function P(e){var t,n=1,r=`#000000`,i=`"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif`;typeof e==`string`?t=e:(t=e.text,n=`scalar`in e?e.scalar:n,i=`fontFamily`in e?e.fontFamily:i,r=`color`in e?e.color:r);var a=10*n,o=``+a+`px `+i,s=new OffscreenCanvas(a,a),c=s.getContext(`2d`);c.font=o;var l=c.measureText(t),u=Math.ceil(l.actualBoundingBoxRight+l.actualBoundingBoxLeft),d=Math.ceil(l.actualBoundingBoxAscent+l.actualBoundingBoxDescent),f=2,p=l.actualBoundingBoxLeft+f,m=l.actualBoundingBoxAscent+f;u+=f+f,d+=f+f,s=new OffscreenCanvas(u,d),c=s.getContext(`2d`),c.font=o,c.fillStyle=r,c.fillText(t,p,m);var h=1/n;return{type:`bitmap`,bitmap:s.transferToImageBitmap(),matrix:[h,0,0,h,-u*h/2,-d*h/2]}}n.exports=function(){return M().apply(this,arguments)},n.exports.reset=function(){M().reset()},n.exports.create=A,n.exports.shapeFromPath=ee,n.exports.shapeFromText=P})((function(){return typeof window<`u`?window:typeof self<`u`?self:this||{}})(),U,!1);var te=U.exports;U.exports.create,new class{constructor(){this.appEl=document.querySelector(`#app`);let e=window.location.hash,t=h();e.includes(`seed=`)&&(t=decodeURIComponent(e.split(`seed=`)[1])),this.seed=t,this.params=F(this.seed),this.initLayout()}initLayout(){this.appEl.innerHTML=`
<main class="minimal-wrapper">
<div class="generator-card glass-panel">
<!-- Pigeon SVG Canvas -->
<div id="pigeon-stage" class="pigeon-stage">
<!-- SVG inserted here -->
</div>
<!-- Name & Tagline -->
<div class="pigeon-meta">
<h2 id="pigeon-name" class="pigeon-name">---</h2>
<p id="pigeon-title" class="pigeon-title">---</p>
<p id="pigeon-morph" class="pigeon-morph">---</p>
</div>
<!-- Actions -->
<div class="action-stack">
<button id="btn-next-pigeon" class="btn btn-hero glow-btn">
<span>馃惁</span> Next Pigeon
</button>
<div class="export-row">
<button id="btn-download-svg" class="btn btn-secondary">
<i data-lucide="code"></i> SVG
</button>
<button id="btn-download-png" class="btn btn-accent">
<i data-lucide="download"></i> PNG
</button>
<button id="btn-copy-link" class="btn btn-secondary">
<i data-lucide="share-2"></i> Share
</button>
</div>
</div>
</div>
</main>
`,p({icons:{Code:u,Download:d,Share2:f}}),this.stageEl=this.appEl.querySelector(`#pigeon-stage`),this.nameEl=this.appEl.querySelector(`#pigeon-name`),this.titleEl=this.appEl.querySelector(`#pigeon-title`),this.morphEl=this.appEl.querySelector(`#pigeon-morph`),this.bindEvents(),this.renderCurrentPigeon()}bindEvents(){this.appEl.querySelector(`#btn-next-pigeon`).addEventListener(`click`,()=>{this.randomize()}),this.stageEl.addEventListener(`click`,()=>{let e=this.stageEl.querySelector(`svg`);e&&(e.style.transform=`scale(1.18, 0.82)`,te({particleCount:15,spread:40,origin:{y:.5}}),setTimeout(()=>{e.style.transform=`scale(0.92, 1.1)`,setTimeout(()=>{e.style.transform=`scale(1, 1)`},120)},120))}),this.appEl.querySelector(`#btn-download-svg`).addEventListener(`click`,()=>this.exportPigeon(`svg`)),this.appEl.querySelector(`#btn-download-png`).addEventListener(`click`,()=>this.exportPigeon(`png`)),this.appEl.querySelector(`#btn-copy-link`).addEventListener(`click`,()=>{let e=new URL(window.location.href);e.hash=`seed=${encodeURIComponent(this.seed)}`,navigator.clipboard.writeText(e.toString()).then(()=>{alert(`Copied seed URL to clipboard!`)})})}randomize(){this.seed=h(),this.params=F(this.seed),window.location.hash=`seed=${encodeURIComponent(this.seed)}`,this.renderCurrentPigeon()}renderCurrentPigeon(){this.stageEl.innerHTML=R(this.params,{width:340,height:340,uid:`center`});let e=H(new m(this.seed));this.nameEl.textContent=e.fullName,this.titleEl.textContent=e.title;let{palette:t,threeQuarter:n,eyeStyle:r,checkered:i,hasCrest:a}=this.params,o=[`${t.name} morph`,n?`three-quarter`:`profile`,`${r} eyes`];i&&o.push(`checkered`),a&&o.push(`crested`),this.morphEl.textContent=o.join(` 路 `)}exportPigeon(e){let t=R(this.params,{width:800,height:800,uid:`export`});if(e===`svg`){let e=new Blob([t],{type:`image/svg+xml;charset=utf-8`}),n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=`pigeon-${this.seed}.svg`,r.click(),URL.revokeObjectURL(n)}else if(e===`png`){let e=new Image,n=new Blob([t],{type:`image/svg+xml;charset=utf-8`}),r=URL.createObjectURL(n);e.onload=()=>{let t=document.createElement(`canvas`);t.width=1200,t.height=1200;let n=t.getContext(`2d`),i=n.createRadialGradient(600,600,100,600,600,600);i.addColorStop(0,`#1e293b`),i.addColorStop(1,`#0f172a`),n.fillStyle=i,n.fillRect(0,0,1200,1200),n.drawImage(e,200,200,800,800),URL.revokeObjectURL(r);let a=t.toDataURL(`image/png`),o=document.createElement(`a`);o.href=a,o.download=`strutton-pigeon-${this.seed}.png`,o.click()},e.src=r}}};
</script>
<style>
:root{--bg-dark:#0b0f19;--bg-card:#1e293bb3;--glass-border:#ffffff1f;--accent-emerald:#00e676;--accent-blue:#38bdf8;--accent-purple:#ab47bc;--text-main:#f8fafc;--text-muted:#94a3b8;--radius-lg:28px;--font-family:"Outfit", "Inter", -apple-system, sans-serif}*{box-sizing:border-box;margin:0;padding:0}body{background-color:var(--bg-dark);color:var(--text-main);font-family:var(--font-family);background-image:radial-gradient(circle at 50% 30%,#38bdf81f 0%,#0000 60%),radial-gradient(circle at 80% 80%,#00e67614 0%,#0000 50%);justify-content:center;align-items:center;min-height:100vh;padding:1.5rem;display:flex}.minimal-wrapper{justify-content:center;width:100%;max-width:440px;display:flex}.glass-panel{background:var(--bg-card);-webkit-backdrop-filter:blur(20px);border:1px solid var(--glass-border);border-radius:var(--radius-lg);box-shadow:0 16px 40px #0006}.generator-card{text-align:center;flex-direction:column;align-items:center;gap:1.5rem;width:100%;padding:2.25rem;display:flex}.pigeon-stage{cursor:pointer;justify-content:center;align-items:center;width:320px;height:320px;display:flex}.pigeon-stage svg{transition:transform .15s cubic-bezier(.175,.885,.32,1.275)}.pigeon-stage:hover svg{transform:scale(1.06)translateY(-4px)}.pigeon-meta{flex-direction:column;gap:.25rem;display:flex}.pigeon-name{color:#fff;font-size:1.75rem;font-weight:800}.pigeon-title{color:var(--accent-blue);font-size:.9rem;font-weight:600}.pigeon-morph{color:var(--text-muted);letter-spacing:.04em;text-transform:lowercase;margin-top:.35rem;font-size:.72rem}.action-stack{flex-direction:column;gap:1rem;width:100%;display:flex}.btn-hero{background:linear-gradient(135deg, var(--accent-emerald) 0%, var(--accent-blue) 100%);color:#0b0f19;cursor:pointer;border:none;border-radius:50px;justify-content:center;align-items:center;gap:.5rem;width:100%;padding:1.1rem;font-size:1.2rem;font-weight:800;transition:all .2s cubic-bezier(.4,0,.2,1);display:flex;box-shadow:0 8px 24px #00e67659}.btn-hero:hover{transform:translateY(-2px)scale(1.02);box-shadow:0 12px 32px #00e67680}.btn-hero:active{transform:translateY(1px)scale(.98)}.export-row{gap:.6rem;width:100%;display:flex}.export-row .btn{flex:1}.btn{cursor:pointer;border:none;border-radius:12px;justify-content:center;align-items:center;gap:.4rem;padding:.65rem 1rem;font-family:inherit;font-size:.85rem;font-weight:600;transition:all .2s;display:inline-flex}.btn-secondary{color:#fff;border:1px solid var(--glass-border);background:#ffffff14}.btn-secondary:hover{background:#ffffff29}.btn-accent{background:linear-gradient(135deg, var(--accent-purple) 0%, #f48fb1 100%);color:#fff}.btn-accent:hover{box-shadow:0 6px 20px #ab47bc66}
</style>
</head>
<body>
<div id="app"></div>
</body>
</html>