446 lines
23 KiB
JavaScript
446 lines
23 KiB
JavaScript
/*!
|
|
* github-buttons v2.29.1
|
|
* (c) 2024 なつき
|
|
* @license BSD-2-Clause
|
|
*/ var C = window.document,
|
|
p = window.Math,
|
|
k = window.HTMLElement,
|
|
b = window.XMLHttpRequest,
|
|
F = function (e, t) {
|
|
for (var r = 0, o = e.length; r < o; r++) t(e[r]);
|
|
},
|
|
A = function (e) {
|
|
return function (t, r, o) {
|
|
var a = e.createElement(t);
|
|
if (r != null)
|
|
for (var n in r) {
|
|
var c = r[n];
|
|
c != null && (a[n] != null ? (a[n] = c) : a.setAttribute(n, c));
|
|
}
|
|
return (
|
|
o != null &&
|
|
F(o, function (l) {
|
|
a.appendChild(typeof l == 'string' ? e.createTextNode(l) : l);
|
|
}),
|
|
a
|
|
);
|
|
};
|
|
},
|
|
_ = A(C),
|
|
V = function (e) {
|
|
var t;
|
|
return function () {
|
|
t || ((t = 1), e.apply(this, arguments));
|
|
};
|
|
},
|
|
m = function (e, t) {
|
|
return {}.hasOwnProperty.call(e, t);
|
|
},
|
|
Z = function (e) {
|
|
return ('' + e).toLowerCase();
|
|
},
|
|
X = 'github-buttons',
|
|
O = '2.29.1',
|
|
N = 'https://' + ('unpkg.com/' + X + '@' + O + '/dist') + '/buttons.html',
|
|
u = 'github.com',
|
|
P = 'https://api.' + u,
|
|
H = b && 'prototype' in b && 'withCredentials' in b.prototype,
|
|
R =
|
|
H &&
|
|
k &&
|
|
'attachShadow' in k.prototype &&
|
|
!('prototype' in k.prototype.attachShadow),
|
|
f = function (e, t, r) {
|
|
e.addEventListener
|
|
? e.addEventListener(t, r, !1)
|
|
: e.attachEvent('on' + t, r);
|
|
},
|
|
E = function (e, t, r) {
|
|
e.removeEventListener
|
|
? e.removeEventListener(t, r, !1)
|
|
: e.detachEvent('on' + t, r);
|
|
},
|
|
I = function (e, t, r) {
|
|
var o = function () {
|
|
return E(e, t, o), r.apply(this, arguments);
|
|
};
|
|
f(e, t, o);
|
|
},
|
|
$ = function (e, t, r) {
|
|
if (e.readyState != null) {
|
|
var o = 'readystatechange',
|
|
a = function () {
|
|
if (t.test(e.readyState)) return E(e, o, a), r.apply(this, arguments);
|
|
};
|
|
f(e, o, a);
|
|
}
|
|
},
|
|
q = function (e) {
|
|
var t = {
|
|
href: e.href,
|
|
title: e.title,
|
|
'aria-label': e.getAttribute('aria-label'),
|
|
};
|
|
return (
|
|
F(['icon', 'color-scheme', 'text', 'size', 'show-count'], function (r) {
|
|
var o = 'data-' + r;
|
|
t[o] = e.getAttribute(o);
|
|
}),
|
|
t['data-text'] == null && (t['data-text'] = e.textContent || e.innerText),
|
|
t
|
|
);
|
|
},
|
|
J =
|
|
'body{margin:0}a{text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;font-size:0;line-height:0;white-space:nowrap}.btn,.social-count{position:relative;display:inline-block;display:inline-flex;height:14px;padding:2px 5px;font-size:11px;font-weight:600;line-height:14px;vertical-align:bottom;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-repeat:repeat-x;background-position:-1px -1px;background-size:110% 110%;border:1px solid}.btn{border-radius:.25em}.btn:not(:last-child){border-radius:.25em 0 0 .25em}.social-count{border-left:0;border-radius:0 .25em .25em 0}.widget-lg .btn,.widget-lg .social-count{height:16px;padding:5px 10px;font-size:12px;line-height:16px}.octicon{display:inline-block;vertical-align:text-top;fill:currentColor;overflow:visible}',
|
|
Q = `.btn:focus-visible,.social-count:focus-visible{outline:2px solid #0969da;outline-offset:-2px}.btn{color:#25292e;background-color:#ebf0f4;border-color:#d1d9e0;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3clinearGradient id='o' x2='0' y2='1'%3e%3cstop stop-color='%23f6f8fa'/%3e%3cstop offset='90%25' stop-color='%23ebf0f4'/%3e%3c/linearGradient%3e%3crect width='100%25' height='100%25' fill='url(%23o)'/%3e%3c/svg%3e");background-image:-moz-linear-gradient(top, #f6f8fa, #ebf0f4 90%);background-image:linear-gradient(180deg, #f6f8fa, #ebf0f4 90%);filter:progid:DXImageTransform.Microsoft.Gradient(startColorstr='#FFF6F8FA', endColorstr='#FFEAEFF3')}:root .btn{filter:none}.btn:hover,.btn:focus{background-color:#e5eaee;background-position:0 -0.5em;border-color:#d1d9e0;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3clinearGradient id='o' x2='0' y2='1'%3e%3cstop stop-color='%23eff2f5'/%3e%3cstop offset='90%25' stop-color='%23e5eaee'/%3e%3c/linearGradient%3e%3crect width='100%25' height='100%25' fill='url(%23o)'/%3e%3c/svg%3e");background-image:-moz-linear-gradient(top, #eff2f5, #e5eaee 90%);background-image:linear-gradient(180deg, #eff2f5, #e5eaee 90%);filter:progid:DXImageTransform.Microsoft.Gradient(startColorstr='#FFEFF2F5', endColorstr='#FFE4E9ED')}:root .btn:hover,:root .btn:focus{filter:none}.btn:active{background-color:#e6eaef;border-color:#d1d9e0;background-image:none;filter:none}.social-count{color:#25292e;background-color:#fff;border-color:#d1d9e0}.social-count:hover,.social-count:focus{color:#0969da}.octicon-heart{color:#bf3989}`,
|
|
j =
|
|
'.btn:focus-visible,.social-count:focus-visible{outline:2px solid #0349b4;outline-offset:-2px}.btn{color:#25292e;background-color:#e0e6eb;border-color:#454c54;background-image:none;filter:none}.btn:hover,.btn:focus{background-color:#d0d7e0;background-position:0 -0.5em;border-color:#454c54;background-image:none;filter:none}.btn:active{background-color:#d1d9e0;border-color:#454c54}.social-count{color:#25292e;background-color:#fff;border-color:#454c54}.social-count:hover,.social-count:focus{color:#023b95}.octicon-heart{color:#7d0c57}',
|
|
K = `.btn:focus-visible,.social-count:focus-visible{outline:2px solid #1f6feb;outline-offset:-2px}.btn{color:#f0f6fc;background-color:#1a2026;border-color:#3d444d;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3clinearGradient id='o' x2='0' y2='1'%3e%3cstop stop-color='%23212830'/%3e%3cstop offset='90%25' stop-color='%231a2026'/%3e%3c/linearGradient%3e%3crect width='100%25' height='100%25' fill='url(%23o)'/%3e%3c/svg%3e");background-image:-moz-linear-gradient(top, #212830, #1a2026 90%);background-image:linear-gradient(180deg, #212830, #1a2026 90%);filter:progid:DXImageTransform.Microsoft.Gradient(startColorstr='#FF212830', endColorstr='#FF191F25')}:root .btn{filter:none}.btn:hover,.btn:focus{background-color:#1f242c;background-position:0 -0.5em;border-color:#3d444d;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3clinearGradient id='o' x2='0' y2='1'%3e%3cstop stop-color='%23262c36'/%3e%3cstop offset='90%25' stop-color='%231f242c'/%3e%3c/linearGradient%3e%3crect width='100%25' height='100%25' fill='url(%23o)'/%3e%3c/svg%3e");background-image:-moz-linear-gradient(top, #262c36, #1f242c 90%);background-image:linear-gradient(180deg, #262c36, #1f242c 90%);filter:progid:DXImageTransform.Microsoft.Gradient(startColorstr='#FF262C36', endColorstr='#FF1E232B')}:root .btn:hover,:root .btn:focus{filter:none}.btn:active{background-color:#2a313c;border-color:#3d444d;background-image:none;filter:none}.social-count{color:#f0f6fc;background-color:#0d1117;border-color:#3d444d}.social-count:hover,.social-count:focus{color:#388bfd}.octicon-heart{color:#db61a2}`,
|
|
Y = `.btn:focus-visible,.social-count:focus-visible{outline:2px solid #316dca;outline-offset:-2px}.btn{color:#d1d7e0;background-color:#232932;border-color:#3d444d;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3clinearGradient id='o' x2='0' y2='1'%3e%3cstop stop-color='%232a313c'/%3e%3cstop offset='90%25' stop-color='%23232932'/%3e%3c/linearGradient%3e%3crect width='100%25' height='100%25' fill='url(%23o)'/%3e%3c/svg%3e");background-image:-moz-linear-gradient(top, #2a313c, #232932 90%);background-image:linear-gradient(180deg, #2a313c, #232932 90%);filter:progid:DXImageTransform.Microsoft.Gradient(startColorstr='#FF2A313C', endColorstr='#FF222831')}:root .btn{filter:none}.btn:hover,.btn:focus{background-color:#282f38;background-position:0 -0.5em;border-color:#3d444d;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3clinearGradient id='o' x2='0' y2='1'%3e%3cstop stop-color='%232f3742'/%3e%3cstop offset='90%25' stop-color='%23282f38'/%3e%3c/linearGradient%3e%3crect width='100%25' height='100%25' fill='url(%23o)'/%3e%3c/svg%3e");background-image:-moz-linear-gradient(top, #2f3742, #282f38 90%);background-image:linear-gradient(180deg, #2f3742, #282f38 90%);filter:progid:DXImageTransform.Microsoft.Gradient(startColorstr='#FF2F3742', endColorstr='#FF272E37')}:root .btn:hover,:root .btn:focus{filter:none}.btn:active{background-color:#3d444d;border-color:#3d444d;background-image:none;filter:none}.social-count{color:#d1d7e0;background-color:#212830;border-color:#3d444d}.social-count:hover,.social-count:focus{color:#4184e4}.octicon-heart{color:#c96198}`,
|
|
U =
|
|
'.btn:focus-visible,.social-count:focus-visible{outline:2px solid #409eff;outline-offset:-2px}.btn{color:#fff;background-color:#262c36;border-color:#b7bdc8;background-image:none;filter:none}.btn:hover,.btn:focus{background-color:#232932;background-position:0 -0.5em;border-color:#b7bdc8;background-image:none;filter:none}.btn:active{background-color:#2f3742;border-color:#b7bdc8}.social-count{color:#fff;background-color:#010409;border-color:#b7bdc8}.social-count:hover,.social-count:focus{color:#5cacff}.octicon-heart{color:#ff90c8}',
|
|
W = function (e, t, r, o) {
|
|
t == null && (t = '&'),
|
|
r == null && (r = '='),
|
|
o == null && (o = window.encodeURIComponent);
|
|
var a = [];
|
|
for (var n in e) {
|
|
var c = e[n];
|
|
c != null && a.push(o(n) + r + o(c));
|
|
}
|
|
return a.join(t);
|
|
},
|
|
ee = function (e, t, r, o) {
|
|
o == null && (o = window.decodeURIComponent);
|
|
var a = {};
|
|
return (
|
|
F(e.split(t), function (n) {
|
|
if (n !== '') {
|
|
var c = n.split(r);
|
|
a[o(c[0])] = c[1] != null ? o(c.slice(1).join(r)) : void 0;
|
|
}
|
|
}),
|
|
a
|
|
);
|
|
},
|
|
g = {
|
|
light: Q,
|
|
light_high_contrast: j,
|
|
dark: K,
|
|
dark_dimmed: Y,
|
|
dark_high_contrast: U,
|
|
},
|
|
G = function (e, t) {
|
|
return '@media(prefers-color-scheme:' + e + '){' + g[m(g, t) ? t : e] + '}';
|
|
},
|
|
te = function (e) {
|
|
if (e == null) return g.light;
|
|
if (m(g, e)) return g[e];
|
|
var t = ee(e, ';', ':', function (r) {
|
|
return r.replace(/^[ \t\n\f\r]+|[ \t\n\f\r]+$/g, '');
|
|
});
|
|
return (
|
|
g[m(g, t['no-preference']) ? t['no-preference'] : 'light'] +
|
|
G('light', t.light) +
|
|
G('dark', t.dark)
|
|
);
|
|
},
|
|
x = {
|
|
'comment-discussion': {
|
|
heights: {
|
|
16: {
|
|
width: 16,
|
|
path: '<path d="M1.75 1h8.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 10.25 10H7.061l-2.574 2.573A1.458 1.458 0 0 1 2 11.543V10h-.25A1.75 1.75 0 0 1 0 8.25v-5.5C0 1.784.784 1 1.75 1ZM1.5 2.75v5.5c0 .138.112.25.25.25h1a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h3.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm13 2a.25.25 0 0 0-.25-.25h-.5a.75.75 0 0 1 0-1.5h.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 14.25 12H14v1.543a1.458 1.458 0 0 1-2.487 1.03L9.22 12.28a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l2.22 2.22v-2.19a.75.75 0 0 1 .75-.75h1a.25.25 0 0 0 .25-.25Z"></path>',
|
|
},
|
|
},
|
|
},
|
|
download: {
|
|
heights: {
|
|
16: {
|
|
width: 16,
|
|
path: '<path d="M2.75 14A1.75 1.75 0 0 1 1 12.25v-2.5a.75.75 0 0 1 1.5 0v2.5c0 .138.112.25.25.25h10.5a.25.25 0 0 0 .25-.25v-2.5a.75.75 0 0 1 1.5 0v2.5A1.75 1.75 0 0 1 13.25 14Z"></path><path d="M7.25 7.689V2a.75.75 0 0 1 1.5 0v5.689l1.97-1.969a.749.749 0 1 1 1.06 1.06l-3.25 3.25a.749.749 0 0 1-1.06 0L4.22 6.78a.749.749 0 1 1 1.06-1.06l1.97 1.969Z"></path>',
|
|
},
|
|
},
|
|
},
|
|
eye: {
|
|
heights: {
|
|
16: {
|
|
width: 16,
|
|
path: '<path d="M8 2c1.981 0 3.671.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.62 1.62 0 0 1 0 1.798c-.45.678-1.367 1.932-2.637 3.023C11.67 13.008 9.981 14 8 14c-1.981 0-3.671-.992-4.933-2.078C1.797 10.83.88 9.576.43 8.898a1.62 1.62 0 0 1 0-1.798c.45-.677 1.367-1.931 2.637-3.022C4.33 2.992 6.019 2 8 2ZM1.679 7.932a.12.12 0 0 0 0 .136c.411.622 1.241 1.75 2.366 2.717C5.176 11.758 6.527 12.5 8 12.5c1.473 0 2.825-.742 3.955-1.715 1.124-.967 1.954-2.096 2.366-2.717a.12.12 0 0 0 0-.136c-.412-.621-1.242-1.75-2.366-2.717C10.824 4.242 9.473 3.5 8 3.5c-1.473 0-2.825.742-3.955 1.715-1.124.967-1.954 2.096-2.366 2.717ZM8 10a2 2 0 1 1-.001-3.999A2 2 0 0 1 8 10Z"></path>',
|
|
},
|
|
},
|
|
},
|
|
heart: {
|
|
heights: {
|
|
16: {
|
|
width: 16,
|
|
path: '<path d="m8 14.25.345.666a.75.75 0 0 1-.69 0l-.008-.004-.018-.01a7.152 7.152 0 0 1-.31-.17 22.055 22.055 0 0 1-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.066 22.066 0 0 1-3.744 2.584l-.018.01-.006.003h-.002ZM4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.58 20.58 0 0 0 8 13.393a20.58 20.58 0 0 0 3.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.749.749 0 0 1-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5Z"></path>',
|
|
},
|
|
},
|
|
},
|
|
'issue-opened': {
|
|
heights: {
|
|
16: {
|
|
width: 16,
|
|
path: '<path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path>',
|
|
},
|
|
},
|
|
},
|
|
'mark-github': {
|
|
heights: {
|
|
16: {
|
|
width: 16,
|
|
path: '<path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path>',
|
|
},
|
|
},
|
|
},
|
|
package: {
|
|
heights: {
|
|
16: {
|
|
width: 16,
|
|
path: '<path d="m8.878.392 5.25 3.045c.54.314.872.89.872 1.514v6.098a1.75 1.75 0 0 1-.872 1.514l-5.25 3.045a1.75 1.75 0 0 1-1.756 0l-5.25-3.045A1.75 1.75 0 0 1 1 11.049V4.951c0-.624.332-1.201.872-1.514L7.122.392a1.75 1.75 0 0 1 1.756 0ZM7.875 1.69l-4.63 2.685L8 7.133l4.755-2.758-4.63-2.685a.248.248 0 0 0-.25 0ZM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432Zm6.25 8.271 4.625-2.683a.25.25 0 0 0 .125-.216V5.677L8.75 8.432Z"></path>',
|
|
},
|
|
},
|
|
},
|
|
play: {
|
|
heights: {
|
|
16: {
|
|
width: 16,
|
|
path: '<path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path>',
|
|
},
|
|
},
|
|
},
|
|
'repo-forked': {
|
|
heights: {
|
|
16: {
|
|
width: 16,
|
|
path: '<path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path>',
|
|
},
|
|
},
|
|
},
|
|
'repo-template': {
|
|
heights: {
|
|
16: {
|
|
width: 16,
|
|
path: '<path d="M13.25 8a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-.75a.75.75 0 0 1 0-1.5h.75v-.25a.75.75 0 0 1 .75-.75ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2ZM2.75 8a.75.75 0 0 1 .75.75v.268c.083-.012.166-.018.25-.018h.5a.75.75 0 0 1 0 1.5h-.5a.25.25 0 0 0-.25.25v.75c0 .28.114.532.3.714a.75.75 0 1 1-1.05 1.072A2.495 2.495 0 0 1 2 11.5V8.75A.75.75 0 0 1 2.75 8ZM11 .75a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0V1.5h-.75A.75.75 0 0 1 11 .75Zm-5 0A.75.75 0 0 1 6.75 0h2.5a.75.75 0 0 1 0 1.5h-2.5A.75.75 0 0 1 6 .75Zm0 9A.75.75 0 0 1 6.75 9h2.5a.75.75 0 0 1 0 1.5h-2.5A.75.75 0 0 1 6 9.75ZM4.992.662a.75.75 0 0 1-.636.848c-.436.063-.783.41-.846.846a.751.751 0 0 1-1.485-.212A2.501 2.501 0 0 1 4.144.025a.75.75 0 0 1 .848.637ZM2.75 4a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 2.75 4Zm10.5 0a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5a.75.75 0 0 1 .75-.75Z"></path>',
|
|
},
|
|
},
|
|
},
|
|
star: {
|
|
heights: {
|
|
16: {
|
|
width: 16,
|
|
path: '<path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path>',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
oe = function (e, t) {
|
|
(e = Z(e).replace(/^octicon-/, '')), m(x, e) || (e = 'mark-github');
|
|
var r = t >= 24 && 24 in x[e].heights ? 24 : 16,
|
|
o = x[e].heights[r];
|
|
return (
|
|
'<svg viewBox="0 0 ' +
|
|
o.width +
|
|
' ' +
|
|
r +
|
|
'" width="' +
|
|
(t * o.width) / r +
|
|
'" height="' +
|
|
t +
|
|
'" class="octicon octicon-' +
|
|
e +
|
|
'" aria-hidden="true">' +
|
|
o.path +
|
|
'</svg>'
|
|
);
|
|
},
|
|
y = {},
|
|
re = function (e, t) {
|
|
var r = y[e] || (y[e] = []);
|
|
if (!(r.push(t) > 1)) {
|
|
var o = V(function () {
|
|
for (delete y[e]; (t = r.shift()); ) t.apply(null, arguments);
|
|
});
|
|
if (H) {
|
|
var a = new b();
|
|
f(a, 'abort', o),
|
|
f(a, 'error', o),
|
|
f(a, 'load', function () {
|
|
var s;
|
|
try {
|
|
s = JSON.parse(this.responseText);
|
|
} catch (d) {
|
|
o(d);
|
|
return;
|
|
}
|
|
o(this.status !== 200, s);
|
|
}),
|
|
a.open('GET', e),
|
|
a.send();
|
|
} else {
|
|
var n = this || window;
|
|
n._ = function (s) {
|
|
(n._ = null), o(s.meta.status !== 200, s.data);
|
|
};
|
|
var c = A(n.document)('script', {
|
|
async: !0,
|
|
src: e + (e.indexOf('?') !== -1 ? '&' : '?') + 'callback=_',
|
|
}),
|
|
l = function () {
|
|
n._ && n._({ meta: {} });
|
|
};
|
|
f(c, 'load', l),
|
|
f(c, 'error', l),
|
|
$(c, /de|m/, l),
|
|
n.document.getElementsByTagName('head')[0].appendChild(c);
|
|
}
|
|
}
|
|
},
|
|
T = function (e, t, r) {
|
|
var o = A(e.ownerDocument),
|
|
a = e.appendChild(o('style', { type: 'text/css' })),
|
|
n = J + te(t['data-color-scheme']);
|
|
a.styleSheet
|
|
? (a.styleSheet.cssText = n)
|
|
: a.appendChild(e.ownerDocument.createTextNode(n));
|
|
var c = Z(t['data-size']) === 'large',
|
|
l = o(
|
|
'a',
|
|
{
|
|
className: 'btn',
|
|
href: t.href,
|
|
rel: 'noopener',
|
|
target: '_blank',
|
|
title: t.title || void 0,
|
|
'aria-label': t['aria-label'] || void 0,
|
|
innerHTML: oe(t['data-icon'], c ? 16 : 14) + ' ',
|
|
},
|
|
[o('span', {}, [t['data-text'] || ''])],
|
|
),
|
|
s = e.appendChild(
|
|
o('div', { className: 'widget' + (c ? ' widget-lg' : '') }, [l]),
|
|
),
|
|
d = l.hostname.replace(/\.$/, '');
|
|
if (('.' + d).substring(d.length - u.length) !== '.' + u) {
|
|
l.removeAttribute('href'), r(s);
|
|
return;
|
|
}
|
|
var i = (' /' + l.pathname).split(/\/+/);
|
|
if (
|
|
((((d === u || d === 'gist.' + u) && i[3] === 'archive') ||
|
|
(d === u &&
|
|
i[3] === 'releases' &&
|
|
(i[4] === 'download' ||
|
|
(i[4] === 'latest' && i[5] === 'download'))) ||
|
|
d === 'codeload.' + u) &&
|
|
(l.target = '_top'),
|
|
Z(t['data-show-count']) !== 'true' ||
|
|
d !== u ||
|
|
i[1] === 'marketplace' ||
|
|
i[1] === 'sponsors' ||
|
|
i[1] === 'orgs' ||
|
|
i[1] === 'users' ||
|
|
i[1] === '-')
|
|
) {
|
|
r(s);
|
|
return;
|
|
}
|
|
var v, h;
|
|
if (!i[2] && i[1]) (h = 'followers'), (v = '?tab=followers');
|
|
else if (!i[3] && i[2]) (h = 'stargazers_count'), (v = '/stargazers');
|
|
else if (!i[4] && i[3] === 'subscription')
|
|
(h = 'subscribers_count'), (v = '/watchers');
|
|
else if (!i[4] && i[3] === 'fork') (h = 'forks_count'), (v = '/forks');
|
|
else if (i[3] === 'issues') (h = 'open_issues_count'), (v = '/issues');
|
|
else {
|
|
r(s);
|
|
return;
|
|
}
|
|
var D = i[2] ? '/repos/' + i[1] + '/' + i[2] : '/users/' + i[1];
|
|
re.call(this, P + D, function (B, L) {
|
|
if (!B) {
|
|
var w = L[h];
|
|
s.appendChild(
|
|
o(
|
|
'a',
|
|
{
|
|
className: 'social-count',
|
|
href: L.html_url + v,
|
|
rel: 'noopener',
|
|
target: '_blank',
|
|
'aria-label':
|
|
w +
|
|
' ' +
|
|
h
|
|
.replace(/_count$/, '')
|
|
.replace('_', ' ')
|
|
.slice(0, w < 2 ? -1 : void 0) +
|
|
' on GitHub',
|
|
},
|
|
[('' + w).replace(/\B(?=(\d{3})+(?!\d))/g, ',')],
|
|
),
|
|
);
|
|
}
|
|
r(s);
|
|
});
|
|
},
|
|
M = window.devicePixelRatio || 1,
|
|
z = function (e) {
|
|
return (M > 1 ? p.ceil((p.round(e * M) / M) * 2) / 2 : p.ceil(e)) || 0;
|
|
},
|
|
ae = function (e) {
|
|
var t = e.offsetWidth,
|
|
r = e.offsetHeight;
|
|
if (e.getBoundingClientRect) {
|
|
var o = e.getBoundingClientRect();
|
|
(t = p.max(t, z(o.width))), (r = p.max(r, z(o.height)));
|
|
}
|
|
return [t, r];
|
|
},
|
|
S = function (e, t) {
|
|
(e.style.width = t[0] + 'px'), (e.style.height = t[1] + 'px');
|
|
},
|
|
ne = function (e, t) {
|
|
if (!(e == null || t == null))
|
|
if ((e.getAttribute && (e = q(e)), R)) {
|
|
var r = _('span');
|
|
T(r.attachShadow({ mode: 'closed' }), e, function () {
|
|
t(r);
|
|
});
|
|
} else {
|
|
var o = _('iframe', {
|
|
src: 'javascript:0',
|
|
title: e.title || void 0,
|
|
allowtransparency: !0,
|
|
scrolling: 'no',
|
|
frameBorder: 0,
|
|
});
|
|
S(o, [0, 0]),
|
|
(o.style.border = 'none'),
|
|
(o.style.colorScheme = 'light');
|
|
var a = function () {
|
|
var n = o.contentWindow,
|
|
c;
|
|
try {
|
|
c = n.document.body;
|
|
} catch {
|
|
C.body.appendChild(o.parentNode.removeChild(o));
|
|
return;
|
|
}
|
|
E(o, 'load', a),
|
|
T.call(n, c, e, function (l) {
|
|
var s = ae(l);
|
|
o.parentNode.removeChild(o),
|
|
I(o, 'load', function () {
|
|
S(o, s);
|
|
}),
|
|
(o.src = N + '#' + (o.name = W(e))),
|
|
t(o);
|
|
});
|
|
};
|
|
f(o, 'load', a), C.body.appendChild(o);
|
|
}
|
|
};
|
|
export { ne as render };
|