n8n-editor-ui 1.67.0 → 1.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-RSY0bJ42.js +57 -0
- package/dist/assets/{AuthView-DmC24d7S.js → AuthView-CrxWnr-e.js} +1 -1
- package/dist/assets/CanvasChat-D1ZEiEqI.js +4167 -0
- package/dist/assets/CanvasChat-DKeWqqZz.css +730 -0
- package/dist/assets/{CanvasControls-BPXQqeeO.js → CanvasControls-C-GYIweg.js} +6 -5
- package/dist/assets/{ChangePasswordView-SC3n2vJc.js → ChangePasswordView-BcJsOCsw.js} +2 -2
- package/dist/assets/CollectionParameter-BCa4NW-h.js +4 -0
- package/dist/assets/{CredentialsView-B3m9CpEC.js → CredentialsView-C0lKel2q.js} +12 -28
- package/dist/assets/{ErrorView-D6M8WlVP.js → ErrorView-4g2OU1Dw.js} +5 -4
- package/dist/assets/{ExecutionsFilter-DlZH8tDW.js → ExecutionsTime.vue_vue_type_script_setup_true_lang-Ce7AgzqR.js} +41 -41
- package/dist/assets/{ExecutionsView-DaHtYmF4.js → ExecutionsView-BjrC38YB.js} +28 -37
- package/dist/assets/{ExecutionsView-Dfy6JMwb.css → ExecutionsView-DlxsqdiC.css} +44 -38
- package/dist/assets/{FileSaver.min-DNytcjKT.js → FileSaver.min-Kzijnshy.js} +1 -1
- package/dist/assets/{FixedCollectionParameter-CypxYAFK.js → FixedCollectionParameter-BlCn1bdn.js} +1 -1
- package/dist/assets/{ForgotMyPasswordView-BJ6gd5CS.js → ForgotMyPasswordView-DM0y4hNn.js} +2 -2
- package/dist/assets/{MainHeader-D56WYRMG.css → MainHeader-CgL_r4xK.css} +78 -24
- package/dist/assets/{MainHeader-DniXcGMK.js → MainHeader-D1PkO9vp.js} +154 -45
- package/dist/assets/{MainSidebar-NwOfijmV.js → MainSidebar-CGlOacQQ.js} +63 -134
- package/dist/assets/{MainSidebar-BRYJRpOA.css → MainSidebar-DL53w2zU.css} +37 -21
- package/dist/assets/{NodeCreation-Ce1ct2i3.js → NodeCreation-yT3JgYis.js} +15 -11
- package/dist/assets/{NodeCreator-DMLTbzAt.js → NodeCreator-CeYHZgYz.js} +66 -64
- package/dist/assets/{NodeViewSwitcher-B9JUn3eY.js → NodeViewSwitcher-DJ9GWTwy.js} +2913 -2815
- package/dist/assets/{NodeViewSwitcher-CnP5aYyg.css → NodeViewSwitcher-s2TUlOvE.css} +136 -115
- package/dist/assets/{ProjectCardBadge-C3QU-WmO.js → ProjectCardBadge-dGORr1ye.js} +1 -1
- package/dist/assets/ProjectHeader-CFoxyI0_.js +216 -0
- package/dist/assets/ProjectHeader-CTK_rV3h.css +28 -0
- package/dist/assets/{ProjectSettings-BvcEg3hx.js → ProjectSettings-Bgl_JGoT.js} +27 -55
- package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-DlJOpf7N.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-BabWwsdK.js} +1 -1
- package/dist/assets/{ResourcesListLayout-Bc4__nvw.js → ResourcesListLayout-B1KB8fTB.js} +3 -46
- package/dist/assets/{ResourcesListLayout-Ci-K1bH3.css → ResourcesListLayout-BuxiQpsj.css} +8 -8
- package/dist/assets/{RunDataJson-ea5u1EeD.js → RunDataJson-BQRWHoEA.js} +12 -12
- package/dist/assets/{RunDataJsonActions-Dflnt8gK.js → RunDataJsonActions-BrABJ_1T.js} +3 -1
- package/dist/assets/{RunDataSearch-DKNVmEqa.js → RunDataSearch-kYhI-gst.js} +2 -2
- package/dist/assets/RunDataTable-BUXF-nH1.js +673 -0
- package/dist/assets/{RunDataTable-ZwoYenSI.css → RunDataTable-enskmmU4.css} +41 -35
- package/dist/assets/{SamlOnboarding-CPvGRYUg.js → SamlOnboarding-DI1aQpmq.js} +2 -2
- package/dist/assets/{SettingsApiView-BFj9fDL9.js → SettingsApiView-DfdFSKxW.js} +1 -1
- package/dist/assets/{SettingsCommunityNodesView-nJFDrtIR.js → SettingsCommunityNodesView-CFGZW601.js} +3 -3
- package/dist/assets/{SettingsExternalSecrets-0-mj45K-.js → SettingsExternalSecrets-CzMuyldc.js} +1 -1
- package/dist/assets/{SettingsLdapView-BhBxX72w.js → SettingsLdapView-B_aMpNa8.js} +1 -1
- package/dist/assets/{SettingsLogStreamingView-CmEJrEOv.js → SettingsLogStreamingView-ByHGVzc1.js} +1 -1
- package/dist/assets/{SettingsPersonalView-C__lC8Vv.js → SettingsPersonalView-BpmD5Kqd.js} +1 -1
- package/dist/assets/{SettingsSourceControl-CMoS5B5P.js → SettingsSourceControl-DeYPQUBX.js} +1 -1
- package/dist/assets/{SettingsSso-DJfrl1Rl.js → SettingsSso-1JSXMGCZ.js} +1 -1
- package/dist/assets/{SettingsUsageAndPlan-CWQ5uVrG.js → SettingsUsageAndPlan-CsUyzTgS.js} +1 -1
- package/dist/assets/{SettingsUsersView-Cvr6Digb.js → SettingsUsersView-iOvCX1d1.js} +1 -1
- package/dist/assets/{SettingsView-DtGga45F.js → SettingsView-WL2khukL.js} +1 -1
- package/dist/assets/{SetupView-DkJH96By.js → SetupView-CeWIEjRa.js} +2 -2
- package/dist/assets/{SetupWorkflowCredentialsButton-C1Jv_-V5.js → SetupWorkflowCredentialsButton-CqzxyhWQ.js} +1 -1
- package/dist/assets/{SetupWorkflowFromTemplateView-WSzVMgC4.js → SetupWorkflowFromTemplateView-HpPUcyfA.js} +3 -3
- package/dist/assets/{SigninView-xej8y-Vu.js → SigninView-DuDYUyp-.js} +2 -2
- package/dist/assets/{SignoutView-Dc8fBBIm.js → SignoutView-4gm8WRHv.js} +1 -1
- package/dist/assets/{SignupView-CKA28Xc8.js → SignupView-DjY8EclM.js} +2 -2
- package/dist/assets/{TemplateDetails-Pi49rFlS.js → TemplateDetails-CbfdJ3Zu.js} +2 -2
- package/dist/assets/{TemplateList-BncQL783.js → TemplateList-Cc_F6A58.js} +3 -2
- package/dist/assets/{TemplatesCollectionView-C9PKPo5y.js → TemplatesCollectionView-BcZLoIe4.js} +7 -7
- package/dist/assets/{TemplatesSearchView-65taIL-M.js → TemplatesSearchView-BMfAKWhL.js} +3 -3
- package/dist/assets/{TemplatesView-DkP9JWHk.js → TemplatesView-BP0ATqW_.js} +3 -2
- package/dist/assets/{TemplatesWorkflowView-B5uc0BtL.js → TemplatesWorkflowView-CPkYdvfj.js} +5 -5
- package/dist/assets/{VariablesView-DV1-KgmN.js → VariablesView-Bxnz2qAN.js} +12 -13
- package/dist/assets/{VariablesView-BPKo50HJ.css → VariablesView-meR15bnW.css} +18 -18
- package/dist/assets/{WorkerView-5P9lg6ew.js → WorkerView-DReO6N8w.js} +11 -10
- package/dist/assets/{WorkflowActivator-Dc_Un-Af.js → WorkflowActivator-B0RYBWDC.js} +2 -2
- package/dist/assets/{WorkflowExecutionsInfoAccordion-BLyC6lr5.js → WorkflowExecutionsInfoAccordion-DQl3QT6U.js} +7 -6
- package/dist/assets/{WorkflowExecutionsLandingPage-Dsa6Bgkn.js → WorkflowExecutionsLandingPage-B47g0omt.js} +2 -2
- package/dist/assets/{WorkflowExecutionsPreview-B_X-enUV.js → WorkflowExecutionsPreview-3ZPhGB00.js} +12 -11
- package/dist/assets/{WorkflowExecutionsView-Bkz3Sig-.js → WorkflowExecutionsView-C2F5tFjz.js} +18 -9
- package/dist/assets/{WorkflowExecutionsView-B8x2-iOd.css → WorkflowExecutionsView-CepgQyRt.css} +9 -1
- package/dist/assets/{WorkflowHistory-BiPMooAv.js → WorkflowHistory-tThywxbZ.js} +3 -3
- package/dist/assets/{WorkflowOnboardingView-XHuS6lCs.js → WorkflowOnboardingView-DJv_JU2k.js} +32 -1
- package/dist/assets/{WorkflowPreview-DxZKd23H.js → WorkflowPreview-DawY1Fi4.js} +1 -1
- package/dist/assets/{WorkflowsView-BBaLVqJs.js → WorkflowsView-DA1gqPuM.js} +16 -58
- package/dist/assets/buttons.esm-BOkmSohe.js +477 -0
- package/dist/assets/{index-7YFQEQmt.js → index-BcRlEQdt.js} +96643 -102180
- package/dist/assets/{index-BFH_KxyA.css → index-CSJeF569.css} +259 -726
- package/dist/assets/{pushConnection.store-DbprXL-x.js → pushConnection.store-C9cp1cmF.js} +1 -1
- package/dist/assets/{templateActions-QFQD8amJ.js → templateActions-BM1BlED1.js} +1 -1
- package/dist/assets/{useBugReporting-IgwBNdXI.js → useBugReporting-D4ibEI2f.js} +1 -1
- package/dist/assets/{useExecutionDebugging-CLORI_Ma.js → useExecutionDebugging-B9k8m7iG.js} +1 -1
- package/dist/assets/useExecutionHelpers-DYE5_K78.js +113 -0
- package/dist/assets/useGlobalEntityCreation-DtWHHZf8.js +168 -0
- package/dist/assets/{useNodeViewVersionSwitcher-CJLQ5lju.js → useNodeViewVersionSwitcher-CSLoLUvW.js} +1 -1
- package/dist/assets/{usePushConnection-DjPgTuLw.js → usePushConnection-BLi9GBVo.js} +63 -111
- package/dist/assets/{RunDataAi-x30tU8-0.css → useRunWorkflow-DH7ZzA8t.css} +97 -57
- package/dist/assets/useRunWorkflow-DOJBXbbW.js +3631 -0
- package/dist/assets/{useWorkflowActivate-D_gK841h.js → useWorkflowActivate-DmBELETa.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-DbabN_I2.js +0 -115
- package/dist/assets/CollectionParameter-Odk28FRT.js +0 -4
- package/dist/assets/ProjectTabs-DjoIePoM.css +0 -3
- package/dist/assets/ProjectTabs-Dve3xFj9.js +0 -88
- package/dist/assets/ResourceListHeader-B2sxe6HT.js +0 -66
- package/dist/assets/ResourceListHeader-DgE1VPUF.css +0 -19
- package/dist/assets/RunDataAi-BKu1beM6.js +0 -1539
- package/dist/assets/RunDataTable-DISLWxMc.js +0 -608
- package/dist/assets/dateFormatter-C53K7zEn.js +0 -21
- /package/dist/assets/{ExecutionsFilter-DVxRt-Pz.css → ExecutionsTime-DVxRt-Pz.css} +0 -0
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* github-buttons v2.29.1
|
|
3
|
+
* (c) 2024 なつき
|
|
4
|
+
* @license BSD-2-Clause
|
|
5
|
+
*/
|
|
6
|
+
var document = window.document;
|
|
7
|
+
var Math = window.Math;
|
|
8
|
+
var HTMLElement = window.HTMLElement;
|
|
9
|
+
var XMLHttpRequest = window.XMLHttpRequest;
|
|
10
|
+
var forEach = function(obj, func) {
|
|
11
|
+
for (var i = 0, len = obj.length; i < len; i++) {
|
|
12
|
+
func(obj[i]);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
var createElementInDocument = function(document2) {
|
|
16
|
+
return function(tag, props, children) {
|
|
17
|
+
var el = document2.createElement(tag);
|
|
18
|
+
if (props != null) {
|
|
19
|
+
for (var prop in props) {
|
|
20
|
+
var val = props[prop];
|
|
21
|
+
if (val != null) {
|
|
22
|
+
if (el[prop] != null) {
|
|
23
|
+
el[prop] = val;
|
|
24
|
+
} else {
|
|
25
|
+
el.setAttribute(prop, val);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (children != null) {
|
|
31
|
+
forEach(children, function(child) {
|
|
32
|
+
el.appendChild(typeof child === "string" ? document2.createTextNode(child) : child);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return el;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
var createElement = createElementInDocument(document);
|
|
39
|
+
var dispatchOnce = function(func) {
|
|
40
|
+
var onceToken;
|
|
41
|
+
return function() {
|
|
42
|
+
if (!onceToken) {
|
|
43
|
+
onceToken = 1;
|
|
44
|
+
func.apply(this, arguments);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
var hasOwnProperty = function(obj, prop) {
|
|
49
|
+
return {}.hasOwnProperty.call(obj, prop);
|
|
50
|
+
};
|
|
51
|
+
var toLowerCase = function(obj) {
|
|
52
|
+
return ("" + obj).toLowerCase();
|
|
53
|
+
};
|
|
54
|
+
var name = "github-buttons";
|
|
55
|
+
var version = "2.29.1";
|
|
56
|
+
var iframeURL = "https://" + /* istanbul ignore next */
|
|
57
|
+
("unpkg.com/" + name + "@" + version + "/dist") + "/buttons.html";
|
|
58
|
+
var domain = "github.com";
|
|
59
|
+
var apiBaseURL = "https://api." + domain;
|
|
60
|
+
var useXHR = XMLHttpRequest && "prototype" in XMLHttpRequest && "withCredentials" in XMLHttpRequest.prototype;
|
|
61
|
+
var useShadowDOM = useXHR && HTMLElement && "attachShadow" in HTMLElement.prototype && !("prototype" in HTMLElement.prototype.attachShadow);
|
|
62
|
+
var onEvent = function(target, eventName, func) {
|
|
63
|
+
if (target.addEventListener) {
|
|
64
|
+
target.addEventListener(eventName, func, false);
|
|
65
|
+
} else {
|
|
66
|
+
target.attachEvent("on" + eventName, func);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
var offEvent = function(target, eventName, func) {
|
|
70
|
+
if (target.removeEventListener) {
|
|
71
|
+
target.removeEventListener(eventName, func, false);
|
|
72
|
+
} else {
|
|
73
|
+
target.detachEvent("on" + eventName, func);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
var onceEvent = function(target, eventName, func) {
|
|
77
|
+
var callback = function() {
|
|
78
|
+
offEvent(target, eventName, callback);
|
|
79
|
+
return func.apply(this, arguments);
|
|
80
|
+
};
|
|
81
|
+
onEvent(target, eventName, callback);
|
|
82
|
+
};
|
|
83
|
+
var onceReadyStateChange = (
|
|
84
|
+
/* istanbul ignore next: IE lt 9 */
|
|
85
|
+
function(target, regex, func) {
|
|
86
|
+
if (target.readyState != null) {
|
|
87
|
+
var eventName = "readystatechange";
|
|
88
|
+
var callback = function() {
|
|
89
|
+
if (regex.test(target.readyState)) {
|
|
90
|
+
offEvent(target, eventName, callback);
|
|
91
|
+
return func.apply(this, arguments);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
onEvent(target, eventName, callback);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
var parseOptions = function(anchor) {
|
|
99
|
+
var options = {
|
|
100
|
+
href: anchor.href,
|
|
101
|
+
title: anchor.title,
|
|
102
|
+
"aria-label": anchor.getAttribute("aria-label")
|
|
103
|
+
};
|
|
104
|
+
forEach(["icon", "color-scheme", "text", "size", "show-count"], function(option) {
|
|
105
|
+
var attribute = "data-" + option;
|
|
106
|
+
options[attribute] = anchor.getAttribute(attribute);
|
|
107
|
+
});
|
|
108
|
+
if (options["data-text"] == null) {
|
|
109
|
+
options["data-text"] = anchor.textContent || anchor.innerText;
|
|
110
|
+
}
|
|
111
|
+
return options;
|
|
112
|
+
};
|
|
113
|
+
var buttonsCssText = "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}";
|
|
114
|
+
var light = `.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}`;
|
|
115
|
+
var lightHighContrast = ".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}";
|
|
116
|
+
var dark = `.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}`;
|
|
117
|
+
var darkDimmed = `.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}`;
|
|
118
|
+
var darkHighContrast = ".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}";
|
|
119
|
+
var stringify = function(obj, sep, eq, encodeURIComponent) {
|
|
120
|
+
if (sep == null) {
|
|
121
|
+
sep = "&";
|
|
122
|
+
}
|
|
123
|
+
if (eq == null) {
|
|
124
|
+
eq = "=";
|
|
125
|
+
}
|
|
126
|
+
if (encodeURIComponent == null) {
|
|
127
|
+
encodeURIComponent = window.encodeURIComponent;
|
|
128
|
+
}
|
|
129
|
+
var params = [];
|
|
130
|
+
for (var name2 in obj) {
|
|
131
|
+
var value = obj[name2];
|
|
132
|
+
if (value != null) {
|
|
133
|
+
params.push(encodeURIComponent(name2) + eq + encodeURIComponent(value));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return params.join(sep);
|
|
137
|
+
};
|
|
138
|
+
var parse = function(str, sep, eq, decodeURIComponent) {
|
|
139
|
+
if (decodeURIComponent == null) {
|
|
140
|
+
decodeURIComponent = window.decodeURIComponent;
|
|
141
|
+
}
|
|
142
|
+
var obj = {};
|
|
143
|
+
forEach(str.split(sep), function(entry) {
|
|
144
|
+
if (entry !== "") {
|
|
145
|
+
var ref = entry.split(eq);
|
|
146
|
+
obj[decodeURIComponent(ref[0])] = ref[1] != null ? decodeURIComponent(ref.slice(1).join(eq)) : void 0;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
return obj;
|
|
150
|
+
};
|
|
151
|
+
var widgetColorSchemes = {
|
|
152
|
+
light,
|
|
153
|
+
light_high_contrast: lightHighContrast,
|
|
154
|
+
dark,
|
|
155
|
+
dark_dimmed: darkDimmed,
|
|
156
|
+
dark_high_contrast: darkHighContrast
|
|
157
|
+
};
|
|
158
|
+
var getColorSchemeMediaQuery = function(systemColorScheme, widgetColorScheme) {
|
|
159
|
+
return "@media(prefers-color-scheme:" + systemColorScheme + "){" + widgetColorSchemes[hasOwnProperty(widgetColorSchemes, widgetColorScheme) ? widgetColorScheme : systemColorScheme] + "}";
|
|
160
|
+
};
|
|
161
|
+
var getColorScheme = function(declarations) {
|
|
162
|
+
if (declarations == null) {
|
|
163
|
+
return widgetColorSchemes.light;
|
|
164
|
+
}
|
|
165
|
+
if (hasOwnProperty(widgetColorSchemes, declarations)) {
|
|
166
|
+
return widgetColorSchemes[declarations];
|
|
167
|
+
}
|
|
168
|
+
var colorSchemes = parse(declarations, ";", ":", function(str) {
|
|
169
|
+
return str.replace(/^[ \t\n\f\r]+|[ \t\n\f\r]+$/g, "");
|
|
170
|
+
});
|
|
171
|
+
return widgetColorSchemes[hasOwnProperty(widgetColorSchemes, colorSchemes["no-preference"]) ? colorSchemes["no-preference"] : "light"] + getColorSchemeMediaQuery("light", colorSchemes.light) + getColorSchemeMediaQuery("dark", colorSchemes.dark);
|
|
172
|
+
};
|
|
173
|
+
var data = {
|
|
174
|
+
"comment-discussion": {
|
|
175
|
+
heights: {
|
|
176
|
+
"16": {
|
|
177
|
+
width: 16,
|
|
178
|
+
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>'
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
download: {
|
|
183
|
+
heights: {
|
|
184
|
+
"16": {
|
|
185
|
+
width: 16,
|
|
186
|
+
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>'
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
eye: {
|
|
191
|
+
heights: {
|
|
192
|
+
"16": {
|
|
193
|
+
width: 16,
|
|
194
|
+
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>'
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
heart: {
|
|
199
|
+
heights: {
|
|
200
|
+
"16": {
|
|
201
|
+
width: 16,
|
|
202
|
+
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>'
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"issue-opened": {
|
|
207
|
+
heights: {
|
|
208
|
+
"16": {
|
|
209
|
+
width: 16,
|
|
210
|
+
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>'
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"mark-github": {
|
|
215
|
+
heights: {
|
|
216
|
+
"16": {
|
|
217
|
+
width: 16,
|
|
218
|
+
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>'
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"package": {
|
|
223
|
+
heights: {
|
|
224
|
+
"16": {
|
|
225
|
+
width: 16,
|
|
226
|
+
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>'
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
play: {
|
|
231
|
+
heights: {
|
|
232
|
+
"16": {
|
|
233
|
+
width: 16,
|
|
234
|
+
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>'
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"repo-forked": {
|
|
239
|
+
heights: {
|
|
240
|
+
"16": {
|
|
241
|
+
width: 16,
|
|
242
|
+
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>'
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"repo-template": {
|
|
247
|
+
heights: {
|
|
248
|
+
"16": {
|
|
249
|
+
width: 16,
|
|
250
|
+
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>'
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
star: {
|
|
255
|
+
heights: {
|
|
256
|
+
"16": {
|
|
257
|
+
width: 16,
|
|
258
|
+
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>'
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
var octicon = function(icon, height) {
|
|
264
|
+
icon = toLowerCase(icon).replace(/^octicon-/, "");
|
|
265
|
+
if (!hasOwnProperty(data, icon)) {
|
|
266
|
+
icon = "mark-github";
|
|
267
|
+
}
|
|
268
|
+
var defaultHeight = height >= 24 && /* istanbul ignore next */
|
|
269
|
+
24 in data[icon].heights ? (
|
|
270
|
+
/* istanbul ignore next */
|
|
271
|
+
24
|
|
272
|
+
) : 16;
|
|
273
|
+
var svg = data[icon].heights[defaultHeight];
|
|
274
|
+
return '<svg viewBox="0 0 ' + svg.width + " " + defaultHeight + '" width="' + height * svg.width / defaultHeight + '" height="' + height + '" class="octicon octicon-' + icon + '" aria-hidden="true">' + svg.path + "</svg>";
|
|
275
|
+
};
|
|
276
|
+
var queues = {};
|
|
277
|
+
var fetch = function(url, func) {
|
|
278
|
+
var queue = queues[url] || (queues[url] = []);
|
|
279
|
+
if (queue.push(func) > 1) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
var callback = dispatchOnce(function() {
|
|
283
|
+
delete queues[url];
|
|
284
|
+
while (func = queue.shift()) {
|
|
285
|
+
func.apply(null, arguments);
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
if (useXHR) {
|
|
289
|
+
var xhr = new XMLHttpRequest();
|
|
290
|
+
onEvent(xhr, "abort", callback);
|
|
291
|
+
onEvent(xhr, "error", callback);
|
|
292
|
+
onEvent(xhr, "load", function() {
|
|
293
|
+
var data2;
|
|
294
|
+
try {
|
|
295
|
+
data2 = JSON.parse(this.responseText);
|
|
296
|
+
} catch (error) {
|
|
297
|
+
callback(error);
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
callback(this.status !== 200, data2);
|
|
301
|
+
});
|
|
302
|
+
xhr.open("GET", url);
|
|
303
|
+
xhr.send();
|
|
304
|
+
} else {
|
|
305
|
+
var contentWindow = this || window;
|
|
306
|
+
contentWindow._ = function(json) {
|
|
307
|
+
contentWindow._ = null;
|
|
308
|
+
callback(json.meta.status !== 200, json.data);
|
|
309
|
+
};
|
|
310
|
+
var script = createElementInDocument(contentWindow.document)("script", {
|
|
311
|
+
async: true,
|
|
312
|
+
src: url + (url.indexOf("?") !== -1 ? "&" : "?") + "callback=_"
|
|
313
|
+
});
|
|
314
|
+
var onloadend = (
|
|
315
|
+
/* istanbul ignore next: IE lt 9 */
|
|
316
|
+
function() {
|
|
317
|
+
if (contentWindow._) {
|
|
318
|
+
contentWindow._({
|
|
319
|
+
meta: {}
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
);
|
|
324
|
+
onEvent(script, "load", onloadend);
|
|
325
|
+
onEvent(script, "error", onloadend);
|
|
326
|
+
onceReadyStateChange(script, /de|m/, onloadend);
|
|
327
|
+
contentWindow.document.getElementsByTagName("head")[0].appendChild(script);
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
var render$1 = function(root, options, func) {
|
|
331
|
+
var createElement2 = createElementInDocument(root.ownerDocument);
|
|
332
|
+
var style = root.appendChild(createElement2("style", {
|
|
333
|
+
type: "text/css"
|
|
334
|
+
}));
|
|
335
|
+
var cssText = buttonsCssText + getColorScheme(options["data-color-scheme"]);
|
|
336
|
+
if (style.styleSheet) {
|
|
337
|
+
style.styleSheet.cssText = cssText;
|
|
338
|
+
} else {
|
|
339
|
+
style.appendChild(root.ownerDocument.createTextNode(cssText));
|
|
340
|
+
}
|
|
341
|
+
var isLarge = toLowerCase(options["data-size"]) === "large";
|
|
342
|
+
var btn = createElement2("a", {
|
|
343
|
+
className: "btn",
|
|
344
|
+
href: options.href,
|
|
345
|
+
rel: "noopener",
|
|
346
|
+
target: "_blank",
|
|
347
|
+
title: options.title || void 0,
|
|
348
|
+
"aria-label": options["aria-label"] || void 0,
|
|
349
|
+
innerHTML: octicon(options["data-icon"], isLarge ? 16 : 14) + " "
|
|
350
|
+
}, [
|
|
351
|
+
createElement2("span", {}, [options["data-text"] || ""])
|
|
352
|
+
]);
|
|
353
|
+
var widget = root.appendChild(createElement2("div", {
|
|
354
|
+
className: "widget" + (isLarge ? " widget-lg" : "")
|
|
355
|
+
}, [
|
|
356
|
+
btn
|
|
357
|
+
]));
|
|
358
|
+
var hostname = btn.hostname.replace(/\.$/, "");
|
|
359
|
+
if (("." + hostname).substring(hostname.length - domain.length) !== "." + domain) {
|
|
360
|
+
btn.removeAttribute("href");
|
|
361
|
+
func(widget);
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
var path = (" /" + btn.pathname).split(/\/+/);
|
|
365
|
+
if ((hostname === domain || hostname === "gist." + domain) && path[3] === "archive" || hostname === domain && path[3] === "releases" && (path[4] === "download" || path[4] === "latest" && path[5] === "download") || hostname === "codeload." + domain) {
|
|
366
|
+
btn.target = "_top";
|
|
367
|
+
}
|
|
368
|
+
if (toLowerCase(options["data-show-count"]) !== "true" || hostname !== domain || path[1] === "marketplace" || path[1] === "sponsors" || path[1] === "orgs" || path[1] === "users" || path[1] === "-") {
|
|
369
|
+
func(widget);
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
var href, property;
|
|
373
|
+
if (!path[2] && path[1]) {
|
|
374
|
+
property = "followers";
|
|
375
|
+
href = "?tab=followers";
|
|
376
|
+
} else if (!path[3] && path[2]) {
|
|
377
|
+
property = "stargazers_count";
|
|
378
|
+
href = "/stargazers";
|
|
379
|
+
} else if (!path[4] && path[3] === "subscription") {
|
|
380
|
+
property = "subscribers_count";
|
|
381
|
+
href = "/watchers";
|
|
382
|
+
} else if (!path[4] && path[3] === "fork") {
|
|
383
|
+
property = "forks_count";
|
|
384
|
+
href = "/forks";
|
|
385
|
+
} else if (path[3] === "issues") {
|
|
386
|
+
property = "open_issues_count";
|
|
387
|
+
href = "/issues";
|
|
388
|
+
} else {
|
|
389
|
+
func(widget);
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
var api = path[2] ? "/repos/" + path[1] + "/" + path[2] : "/users/" + path[1];
|
|
393
|
+
fetch.call(this, apiBaseURL + api, function(error, json) {
|
|
394
|
+
if (!error) {
|
|
395
|
+
var data2 = json[property];
|
|
396
|
+
widget.appendChild(createElement2("a", {
|
|
397
|
+
className: "social-count",
|
|
398
|
+
href: json.html_url + href,
|
|
399
|
+
rel: "noopener",
|
|
400
|
+
target: "_blank",
|
|
401
|
+
"aria-label": data2 + " " + property.replace(/_count$/, "").replace("_", " ").slice(0, data2 < 2 ? -1 : void 0) + " on GitHub"
|
|
402
|
+
}, [
|
|
403
|
+
("" + data2).replace(/\B(?=(\d{3})+(?!\d))/g, ",")
|
|
404
|
+
]));
|
|
405
|
+
}
|
|
406
|
+
func(widget);
|
|
407
|
+
});
|
|
408
|
+
};
|
|
409
|
+
var devicePixelRatio = window.devicePixelRatio || /* istanbul ignore next */
|
|
410
|
+
1;
|
|
411
|
+
var ceilPixel = function(px) {
|
|
412
|
+
return (devicePixelRatio > 1 ? Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 : Math.ceil(px)) || 0;
|
|
413
|
+
};
|
|
414
|
+
var get = function(el) {
|
|
415
|
+
var width = el.offsetWidth;
|
|
416
|
+
var height = el.offsetHeight;
|
|
417
|
+
if (el.getBoundingClientRect) {
|
|
418
|
+
var boundingClientRect = el.getBoundingClientRect();
|
|
419
|
+
width = Math.max(width, ceilPixel(boundingClientRect.width));
|
|
420
|
+
height = Math.max(height, ceilPixel(boundingClientRect.height));
|
|
421
|
+
}
|
|
422
|
+
return [width, height];
|
|
423
|
+
};
|
|
424
|
+
var set = function(el, size) {
|
|
425
|
+
el.style.width = size[0] + "px";
|
|
426
|
+
el.style.height = size[1] + "px";
|
|
427
|
+
};
|
|
428
|
+
var render = function(options, func) {
|
|
429
|
+
if (options == null || func == null) {
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
if (options.getAttribute) {
|
|
433
|
+
options = parseOptions(options);
|
|
434
|
+
}
|
|
435
|
+
if (useShadowDOM) {
|
|
436
|
+
var host = createElement("span");
|
|
437
|
+
render$1(host.attachShadow({ mode: "closed" }), options, function() {
|
|
438
|
+
func(host);
|
|
439
|
+
});
|
|
440
|
+
} else {
|
|
441
|
+
var iframe = createElement("iframe", {
|
|
442
|
+
src: "javascript:0",
|
|
443
|
+
title: options.title || void 0,
|
|
444
|
+
allowtransparency: true,
|
|
445
|
+
scrolling: "no",
|
|
446
|
+
frameBorder: 0
|
|
447
|
+
});
|
|
448
|
+
set(iframe, [0, 0]);
|
|
449
|
+
iframe.style.border = "none";
|
|
450
|
+
iframe.style.colorScheme = "light";
|
|
451
|
+
var callback = function() {
|
|
452
|
+
var contentWindow = iframe.contentWindow;
|
|
453
|
+
var body;
|
|
454
|
+
try {
|
|
455
|
+
body = contentWindow.document.body;
|
|
456
|
+
} catch (_) {
|
|
457
|
+
document.body.appendChild(iframe.parentNode.removeChild(iframe));
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
offEvent(iframe, "load", callback);
|
|
461
|
+
render$1.call(contentWindow, body, options, function(widget) {
|
|
462
|
+
var size = get(widget);
|
|
463
|
+
iframe.parentNode.removeChild(iframe);
|
|
464
|
+
onceEvent(iframe, "load", function() {
|
|
465
|
+
set(iframe, size);
|
|
466
|
+
});
|
|
467
|
+
iframe.src = iframeURL + "#" + (iframe.name = stringify(options));
|
|
468
|
+
func(iframe);
|
|
469
|
+
});
|
|
470
|
+
};
|
|
471
|
+
onEvent(iframe, "load", callback);
|
|
472
|
+
document.body.appendChild(iframe);
|
|
473
|
+
}
|
|
474
|
+
};
|
|
475
|
+
export {
|
|
476
|
+
render
|
|
477
|
+
};
|