mirror of https://github.com/FastGitORG/uptime
9 lines
70 KiB
JavaScript
9 lines
70 KiB
JavaScript
![]() |
import{S as e,i as r,s,e as o,K as t,c as n,a as i,L as a,d as p,f as c,r as l,g as u,h as d,n as m}from"./client.a82206ab.js";function g(e){let r,s,g,T,E,h,w;return{c(){r=o("div"),s=t("svg"),g=t("g"),T=t("g"),E=t("circle"),h=t("path"),w=t("animateTransform"),this.h()},l(e){r=n(e,"DIV",{class:!0});var o=i(r);s=a(o,"svg",{width:!0,height:!0,xmlns:!0,stroke:!0,title:!0,class:!0});var t=i(s);g=a(t,"g",{fill:!0,"fill-rule":!0});var c=i(g);T=a(c,"g",{transform:!0,"stroke-width":!0});var l=i(T);E=a(l,"circle",{"stroke-opacity":!0,cx:!0,cy:!0,r:!0}),i(E).forEach(p),h=a(l,"path",{d:!0});var u=i(h);w=a(u,"animateTransform",{attributeName:!0,type:!0,from:!0,to:!0,dur:!0,repeatCount:!0}),i(w).forEach(p),u.forEach(p),l.forEach(p),c.forEach(p),t.forEach(p),o.forEach(p),this.h()},h(){c(E,"stroke-opacity",".5"),c(E,"cx","18"),c(E,"cy","18"),c(E,"r","18"),c(w,"attributeName","transform"),c(w,"type","rotate"),c(w,"from","0 18 18"),c(w,"to","360 18 18"),c(w,"dur","1s"),c(w,"repeatCount","indefinite"),c(h,"d","M36 18c0-9.94-8.06-18-18-18"),c(T,"transform","translate(1 1)"),c(T,"stroke-width","2"),c(g,"fill","none"),c(g,"fill-rule","evenodd"),c(s,"width","38"),c(s,"height","38"),c(s,"xmlns","http://www.w3.org/2000/svg"),c(s,"stroke","#aaa"),c(s,"title",l.loading),c(s,"class","svelte-68jxue"),c(r,"class","loading svelte-68jxue")},m(e,o){u(e,r,o),d(r,s),d(s,g),d(g,T),d(T,E),d(T,h),d(h,w)},p:m,i:m,o:m,d(e){e&&p(r)}}}class T extends e{constructor(e){super(),r(this,e,null,g,s,{})}}function E(){return"object"==typeof navigator&&"userAgent"in navigator?navigator.userAgent:"object"==typeof process&&"version"in process?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:"<environment undetectable>"}var h=function e(r,s,o,t){if("function"!=typeof o)throw new Error("method for before hook must be a function");t||(t={});if(Array.isArray(s))return s.reverse().reduce((function(s,o){return e.bind(null,r,o,s,t)}),o)();return Promise.resolve().then((function(){return r.registry[s]?r.registry[s].reduce((function(e,r){return r.hook.bind(null,e,t)}),o)():o(t)}))};var w=function(e,r,s,o){var t=o;e.registry[s]||(e.registry[s]=[]);"before"===r&&(o=function(e,r){return Promise.resolve().then(t.bind(null,r)).then(e.bind(null,r))});"after"===r&&(o=function(e,r){var s;return Promise.resolve().then(e.bind(null,r)).then((function(e){return t(s=e,r)})).then((function(){return s}))});"error"===r&&(o=function(e,r){return Promise.resolve().then(e.bind(null,r)).catch((function(e){return t(e,r)}))});e.registry[s].push({hook:o,orig:t})};var b=function(e,r,s){if(!e.registry[r])return;var o=e.registry[r].map((function(e){return e.orig})).indexOf(s);if(-1===o)return;e.registry[r].splice(o,1)};var _=Function.bind,k=_.bind(_);function f(e,r,s){var o=k(b,null).apply(null,s?[r,s]:[r]);e.api={remove:o},e.remove=o,["before","error","after","wrap"].forEach((function(o){var t=s?[r,o,s]:[r,o];e[o]=e.api[o]=k(w,null).apply(null,t)}))}function v(){var e={registry:{}},r=h.bind(null,e);return f(r,e),r}var y=!1;function G(){return y||(console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4'),y=!0),v()}G.Singular=function(){var e={registry:{}},r=h.bind(null,e,"h");return f(r,e,"h"),r}.bind(),G.Collection=v.bind();var P=G,A=G,O=G.Singular,S=G.Collection;
|
||
![]() |
/*!
|
||
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||
|
*
|
||
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||
|
* Released under the MIT License.
|
||
|
*/
|
||
![]() |
function F(e){return"[object Object]"===Object.prototype.toString.call(e)}function R(e){var r,s;return!1!==F(e)&&(void 0===(r=e.constructor)||!1!==F(s=r.prototype)&&!1!==s.hasOwnProperty("isPrototypeOf"))}function U(e,r){const s=Object.assign({},e);return Object.keys(r).forEach((o=>{R(r[o])?o in e?s[o]=U(e[o],r[o]):Object.assign(s,{[o]:r[o]}):Object.assign(s,{[o]:r[o]})})),s}function C(e){for(const r in e)void 0===e[r]&&delete e[r];return e}function D(e,r,s){if("string"==typeof r){let[e,o]=r.split(" ");s=Object.assign(o?{method:e,url:o}:{url:e},s)}else s=Object.assign({},r);var o;s.headers=(o=s.headers)?Object.keys(o).reduce(((e,r)=>(e[r.toLowerCase()]=o[r],e)),{}):{},C(s),C(s.headers);const t=U(e||{},s);return e&&e.mediaType.previews.length&&(t.mediaType.previews=e.mediaType.previews.filter((e=>!t.mediaType.previews.includes(e))).concat(t.mediaType.previews)),t.mediaType.previews=t.mediaType.previews.map((e=>e.replace(/-preview/,""))),t}P.Hook=A,P.Singular=O,P.Collection=S;const j=/\{[^}]+\}/g;function L(e){return e.replace(/^\W+|\W+$/g,"").split(/,/)}function q(e,r){return Object.keys(e).filter((e=>!r.includes(e))).reduce(((r,s)=>(r[s]=e[s],r)),{})}function I(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map((function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e})).join("")}function H(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function W(e,r,s){return r="+"===e||"#"===e?I(r):H(r),s?H(s)+"="+r:r}function B(e){return null!=e}function x(e){return";"===e||"&"===e||"?"===e}function $(e,r){var s=["+","#",".","/",";","?","&"];return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,(function(e,o,t){if(o){let e="";const t=[];if(-1!==s.indexOf(o.charAt(0))&&(e=o.charAt(0),o=o.substr(1)),o.split(/,/g).forEach((function(s){var o=/([^:\*]*)(?::(\d+)|(\*))?/.exec(s);t.push(function(e,r,s,o){var t=e[s],n=[];if(B(t)&&""!==t)if("string"==typeof t||"number"==typeof t||"boolean"==typeof t)t=t.toString(),o&&"*"!==o&&(t=t.substring(0,parseInt(o,10))),n.push(W(r,t,x(r)?s:""));else if("*"===o)Array.isArray(t)?t.filter(B).forEach((function(e){n.push(W(r,e,x(r)?s:""))})):Object.keys(t).forEach((function(e){B(t[e])&&n.push(W(r,t[e],e))}));else{const e=[];Array.isArray(t)?t.filter(B).forEach((function(s){e.push(W(r,s))})):Object.keys(t).forEach((function(s){B(t[s])&&(e.push(H(s)),e.push(W(r,t[s].toString())))})),x(r)?n.push(H(s)+"="+e.join(",")):0!==e.length&&n.push(e.join(","))}else";"===r?B(t)&&n.push(H(s)):""!==t||"&"!==r&&"?"!==r?""===t&&n.push(""):n.push(H(s)+"=");return n}(r,e,o[1],o[2]||o[3]))})),e&&"+"!==e){var n=",";return"?"===e?n="&":"#"!==e&&(n=e),(0!==t.length?e:"")+t.join(n)}return t.join(",")}return I(t)}))}function z(e){let r,s=e.method.toUpperCase(),o=(e.url||"/").replace(/:([a-z]\w+)/g,"{$1}"),t=Object.assign({},e.headers),n=q(e,["method","baseUrl","url","headers","request","mediaType"]);const i=function(e){const r=e.match(j);return r?r.map(L).reduce(((e,r)=>e.concat(r)),[]):[]}(o);var a;o=(a=o,{expand:$.bind(null,a)}).expand(n),/^http/.test(o)||(o=e.baseUrl+o);const p=q(n,Object.keys(e).filter((e=>i.includes(e))).concat("baseUrl"));if(!/application\/octet-stream/i.test(t.accept)&&(e.mediaType.format&&(t.accept=t.accept.split(/,/).map((r=>r.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${e.mediaType.format}`))).join(",")),e.mediaType.previews.length)){const r=t.accept.match(/[\w-]+(?=-preview)/g)||[];t.accept=r.concat(e.mediaType.previews).map((r=>`application/vnd.github.${r}-preview${e.mediaType.format?`.${e.mediaType.format}`:"+json"}`)).join(",")}return["GET","HEAD"].includes(s)?o=function(e,r){const s=/\?/.test(e)?"&":"?",o=Object.keys(r);return 0===o.length?e:e+s+o.map((e=>"q"===e?"q="+r.q.split("+").map(encodeURIComponent).join("+"):`${e}=${encodeURIComponent(r[e])}`)).join("&")}(o,p):"data"in p?r=p.data:Object.keys(p).length?r=p:t["content-length"]=0,t["content-type"]||void 0===r||(t["content-type"]="application/json; charset=utf-8"),["PATCH","PUT"].includes(s)&&void 0===r&&(r="")
|