Regenerate static files
This commit is contained in:
1 parent
455fae05c1
commit
d000460a99
7 files changed
+11
No files matched your search
@@ -0,0 +1,3 @@
|
||||
#social[data-v-1cbbc992]{position:fixed;right:5px;bottom:5px;padding:5px;margin:0;z-index:100}#social img[data-v-1cbbc992]{opacity:.3}#social img[data-v-1cbbc992]:hover{opacity:1}#tooltip{position:fixed;background-color:#fff;border:1px solid #d3d3d3;border-radius:4px;padding:6px;font-size:13px}#tooltip code{color:#212529;line-height:1}#tooltip .tooltip-title{font-weight:700;margin-bottom:0;display:block;margin-top:8px}#tooltip>.tooltip-title:first-child{margin-top:0}html{height:100%}body,html{background-color:#f7f9fb}#global,#results{max-width:1200px}
|
||||
|
||||
/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */:root{-moz-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}hr{height:0;color:inherit}abbr[title]{text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],button{-webkit-appearance:button}legend{padding:0}progress{vertical-align:baseline}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{font-family:inherit;line-height:inherit}*,:after,:before{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af}button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity:1;background-color:rgba(254,226,226,var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity:1;background-color:rgba(220,38,38,var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity:1;background-color:rgba(209,250,229,var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgba(209,213,219,var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity:1;border-color:rgba(107,114,128,var(--tw-border-opacity))}.border-red-500{--tw-border-opacity:1;border-color:rgba(239,68,68,var(--tw-border-opacity))}.border-green-600{--tw-border-opacity:1;border-color:rgba(5,150,105,var(--tw-border-opacity))}.rounded-none{border-radius:0}.rounded{border-radius:.25rem}.rounded-xl{border-radius:.75rem}.rounded-full{border-radius:9999px}.border-dashed{border-style:dashed}.border{border-width:1px}.border-t{border-top-width:1px}.border-r{border-right-width:1px}.border-l{border-left-width:1px}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.hidden{display:none}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.justify-end{justify-content:flex-end}.flex-1{flex:1 1 0%}.float-right{float:right}.font-light{font-weight:300}.font-medium{font-weight:500}.font-bold{font-weight:700}.text-sm{font-size:.875rem;line-height:1.25rem}.text-lg{font-size:1.125rem}.text-lg,.text-xl{line-height:1.75rem}.text-xl{font-size:1.25rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-auto{margin-top:auto;margin-bottom:auto}.mx-auto{margin-left:auto;margin-right:auto}.mt-1{margin-top:.25rem}.mr-2{margin-right:.5rem}.mb-2{margin-bottom:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mb-4{margin-bottom:1rem}.mt-6{margin-top:1.5rem}.mt-12{margin-top:3rem}.object-scale-down{object-fit:scale-down}.opacity-75{opacity:.75}.focus\:outline-none:focus{outline:2px solid trLine truncated
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>Health Dashboard | Gatus</title><link href="/css/app.css" rel="preload" as="style"><link href="/js/app.js" rel="preload" as="script"><link href="/js/chunk-vendors.js" rel="preload" as="script"><link href="/css/app.css" rel="stylesheet"></head><body><noscript><strong>Enable JavaScript to view this page.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.js"></script><script src="/js/app.js"></script></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
(function(e){function t(t){for(var s,c,i=t[0],o=t[1],l=t[2],h=0,d=[];h<i.length;h++)c=i[h],Object.prototype.hasOwnProperty.call(r,c)&&r[c]&&d.push(r[c][0]),r[c]=0;for(s in o)Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s]);u&&u(t);while(d.length)d.shift()();return a.push.apply(a,l||[]),n()}function n(){for(var e,t=0;t<a.length;t++){for(var n=a[t],s=!0,i=1;i<n.length;i++){var o=n[i];0!==r[o]&&(s=!1)}s&&(a.splice(t--,1),e=c(c.s=n[0]))}return e}var s={},r={app:0},a=[];function c(t){if(s[t])return s[t].exports;var n=s[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,c),n.l=!0,n.exports}c.m=e,c.c=s,c.d=function(e,t,n){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},c.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(c.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)c.d(n,s,function(t){return e[t]}.bind(null,s));return n},c.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="/";var i=window["webpackJsonp"]=window["webpackJsonp"]||[],o=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var u=o;a.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},"0300":function(e,t,n){},"1cb3":function(e,t,n){"use strict";n("e007")},"1dd9":function(e,t,n){"use strict";n("ae5b")},"22c8":function(e,t,n){},"32f1":function(e,t,n){"use strict";n("0300")},"359c":function(e,t,n){e.exports=n.p+"img/github.png"},"3d28":function(e,t,n){"use strict";n("afea")},"49d2":function(e,t,n){"use strict";n("bca1")},"508b":function(e,t,n){"use strict";n("22c8")},"56d7":function(e,t,n){"use strict";n.r(t),n.d(t,"SERVER_URL",(function(){return ht}));n("e260"),n("e6cf"),n("cca6"),n("a79d");var s=n("7a23"),r=n("cf05"),a=n.n(r),c={class:"container container-xs relative mx-auto xl:rounded xl:border xl:shadow-xl xl:my-5 p-5 pb-12 xl:pb-5 text-left",id:"global"},i=Object(s["h"])("div",{class:"mb-2"},[Object(s["h"])("div",{class:"flex flex-wrap"},[Object(s["h"])("div",{class:"w-3/4 text-left my-auto"},[Object(s["h"])("div",{class:"text-3xl xl:text-5xl lg:text-4xl font-light"},"Health Status")]),Object(s["h"])("div",{class:"w-1/4 flex justify-end"},[Object(s["h"])("img",{src:a.a,alt:"Gatus",class:"object-scale-down",style:{"max-width":"100px","min-width":"50px","min-height":"50px"}})])])],-1);function o(e,t,n,r,a,o){var l=Object(s["y"])("router-view"),u=Object(s["y"])("Tooltip"),h=Object(s["y"])("Social");return Object(s["q"])(),Object(s["d"])(s["a"],null,[Object(s["h"])("div",c,[i,Object(s["h"])(l,{onShowTooltip:o.showTooltip},null,8,["onShowTooltip"])]),Object(s["h"])(u,{result:a.tooltip.result,event:a.tooltip.event},null,8,["result","event"]),Object(s["h"])(h)],64)}var l=n("359c"),u=n.n(l),h=Object(s["E"])("data-v-1cbbc992");Object(s["t"])("data-v-1cbbc992");var d={id:"social"},f=Object(s["h"])("a",{href:"https://github.com/TwinProduction/gatus",target:"_blank",title:"Gatus on GitHub"},[Object(s["h"])("img",{src:u.a,alt:"GitHub",width:"32",height:"auto"})],-1);Object(s["r"])();var b=h((function(e,t,n,r,a,c){return Object(s["q"])(),Object(s["d"])("div",d,[f])})),g={name:"Social"};n("508b");g.render=b,g.__scopeId="data-v-1cbbc992";var p=g,A=(n("b680"),Object(s["h"])("div",{class:"tooltip-title"},"Timestamp:",-1)),O={id:"tooltip-timestamp"},v=Object(s["h"])("div",{class:"tooltip-title"},"Response time:",-1),j={id:"tooltip-response-time"},m=Object(s["h"])("div",{class:"tooltip-title"},"Conditions:",-1),x={id:"tooltip-conditions"},y=Object(s["h"])("br",null,null,-1),w={key:0,id:"tooltip-errors-container"},I=Object(s["h"])("div",{class:"tooltip-title"},"Errors:",-1),T={id:"tooltip-errors"},B=Object(s["h"])("br",null,null,-1);function C(e,t,n,r,a,c){return Object(s["q"])(),Object(s["d"])("div",{id:"tooltip",ref:"tooltip",class:a.hidden?"invisible":"",style:"top:"+a.top+"px; left:"+a.left+"px"},[n.result?Object(s["x"])(e.$slots,"default",{key:0},(function(){return[A,Object(s["h"])("code",O,Object(s["A"])(c.prettifyTimestamp(n.result.timestamp)),1),v,Object(s["h"])("code",j,Object(s["A"])((n.result.duration/1e6).toFixed(0))+"ms",1),m,Object(s["h"])("code",x,[(Object(s["q"])(!0),Object(s["d"])(s["a"],null,Object(s["w"])(n.result.conditionResults,(function(t){return Object(s["x"])(e.$slots,"default",{key:t},(function(){return[Object(s["g"])(Object(s["A"])(t.success?"✓":"X")+" ~ "+Object(s["A"])(t.condition),1),y]}))})),128))]),n.result.errors&&n.result.errors.length?(Object(s["q"])(),Object(s["d"])("div",w,[I,Object(s["h"])("code",T,[(Object(s["q"])(!0),Object(s["d"])(s["a"],null,Object(s["w"])(n.result.errors,(function(t){return Object(s["x"])(e.$slots,"defaLine truncated
|
||||
@@ -0,0 +1,6 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"00ee":function(e,t,n){var r=n("b622"),o=r("toStringTag"),c={};c[o]="z",e.exports="[object z]"===String(c)},"0366":function(e,t,n){var r=n("1c0b");e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},"06cf":function(e,t,n){var r=n("83ab"),o=n("d1e7"),c=n("5c6c"),i=n("fc6a"),s=n("c04e"),a=n("5135"),u=n("0cfb"),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=i(e),t=s(t,!0),u)try{return l(e,t)}catch(n){}if(a(e,t))return c(!o.f.call(e,t),e[t])}},"0cb2":function(e,t,n){var r=n("7b0b"),o=Math.floor,c="".replace,i=/\$([$&'`]|\d\d?|<[^>]*>)/g,s=/\$([$&'`]|\d\d?)/g;e.exports=function(e,t,n,a,u,l){var f=n+e.length,p=a.length,d=s;return void 0!==u&&(u=r(u),d=i),c.call(l,d,(function(r,c){var i;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(f);case"<":i=u[c.slice(1,-1)];break;default:var s=+c;if(0===s)return r;if(s>p){var l=o(s/10);return 0===l?r:l<=p?void 0===a[l-1]?c.charAt(1):a[l-1]+c.charAt(1):r}i=a[s-1]}return void 0===i?"":i}))}},"0cfb":function(e,t,n){var r=n("83ab"),o=n("d039"),c=n("cc12");e.exports=!r&&!o((function(){return 7!=Object.defineProperty(c("div"),"a",{get:function(){return 7}}).a}))},1148:function(e,t,n){"use strict";var r=n("a691"),o=n("1d80");e.exports="".repeat||function(e){var t=String(o(this)),n="",c=r(e);if(c<0||c==1/0)throw RangeError("Wrong number of repetitions");for(;c>0;(c>>>=1)&&(t+=t))1&c&&(n+=t);return n}},"14c3":function(e,t,n){var r=n("c6b6"),o=n("9263");e.exports=function(e,t){var n=e.exec;if("function"===typeof n){var c=n.call(e,t);if("object"!==typeof c)throw TypeError("RegExp exec method returned something other than an Object or null");return c}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},"19aa":function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},"1be4":function(e,t,n){var r=n("d066");e.exports=r("document","documentElement")},"1c0b":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},"1c7e":function(e,t,n){var r=n("b622"),o=r("iterator"),c=!1;try{var i=0,s={next:function(){return{done:!!i++}},return:function(){c=!0}};s[o]=function(){return this},Array.from(s,(function(){throw 2}))}catch(a){}e.exports=function(e,t){if(!t&&!c)return!1;var n=!1;try{var r={};r[o]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(a){}return n}},"1cdc":function(e,t,n){var r=n("342f");e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},"1d80":function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},"1dde":function(e,t,n){var r=n("d039"),o=n("b622"),c=n("2d00"),i=o("species");e.exports=function(e){return c>=51||!r((function(){var t=[],n=t.constructor={};return n[i]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},2266:function(e,t,n){var r=n("825a"),o=n("e95a"),c=n("50c4"),i=n("0366"),s=n("35a1"),a=n("2a62"),u=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var l,f,p,d,h,v,b,g=n&&n.that,m=!(!n||!n.AS_ENTRIES),y=!(!n||!n.IS_ITERATOR),O=!(!n||!n.INTERRUPTED),j=i(t,g,1+m+O),x=function(e){return l&&a(l),new u(!0,e)},w=function(e){return m?(r(e),O?j(e[0],e[1],x):j(e[0],e[1])):O?j(e,x):j(e)};if(y)l=e;else{if(f=s(e),"function"!=typeof f)throw TypeError("Target is not iterable");if(o(f)){for(p=0,d=c(e.length);d>p;p++)if(h=w(e[p]),h&&h instanceof u)return h;return new u(!1)}l=f.call(e)}v=l.next;while(!(b=v.call(l)).done){try{h=w(b.value)}catch(_){throw a(l),_}if("object"==typeof h&&h&&h instanceof u)return h}return new u(!1)}},"23cb":function(e,t,n){var r=n("a691"),o=Math.max,c=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):c(n,t)}},"23e7":function(e,t,n){var r=n("da84"),o=n("06cf").f,c=n("9112"),i=n("6eeb"),s=n("ce4e"),a=n("e893"),u=n("94ca");e.exports=function(e,t){var n,l,f,p,d,h,v=e.target,b=e.global,g=e.stat;if(l=b?r:g?r[v]||s(v,{}):(r[v]||{}).prototype,l)for(f in t){if(d=t[f],e.noTargetGet?(h=o(l,f),p=h&&h.value):p=l[f],n=u(b?f:v+(g?".":"#")+f,e.forced),!n&&void 0!==p){if(typeof d===typeof p)continue;a(d,p)}(e.sham||p&&p.sham)&&c(d,"sham",!0),i(l,f,d,e)}}},"241c":function(e,t,n){var r=n("ca84"),o=n("7839"),c=o.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,c)}},2626:function(e,t,n){"use strict";var r=n("d066"),o=n("9bf2"),c=n("b622"),i=n("83ab"),s=c("species");e.exports=function(e){var t=r(e),n=o.f;i&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},"2a62":function(e,t,n){var r=n("825a");e.exports=function(e){var t=e["return"];if(void 0!==t)return r(t.call(Line truncated
|
||||
/*!
|
||||
* vue-router v4.0.3
|
||||
* (c) 2021 Eduardo San Martin Morote
|
||||
* @license MIT
|
||||
*/const o="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag,c=e=>o?Symbol(e):"_vr_"+e,i=c("rvlm"),s=c("rvd"),a=c("r"),u=c("rl"),l=c("rvl"),f="undefined"!==typeof window;function p(e){return e.__esModule||o&&"Module"===e[Symbol.toStringTag]}const d=Object.assign;function h(e,t){const n={};for(const r in t){const o=t[r];n[r]=Array.isArray(o)?o.map(e):e(o)}return n}let v=()=>{};const b=/\/$/,g=e=>e.replace(b,"");function m(e,t,n="/"){let r,o={},c="",i="";const s=t.indexOf("?"),a=t.indexOf("#",s>-1?s:0);return s>-1&&(r=t.slice(0,s),c=t.slice(s+1,a>-1?a:t.length),o=e(c)),a>-1&&(r=r||t.slice(0,a),i=t.slice(a,t.length)),r=S(null!=r?r:t,n),{fullPath:r+(c&&"?")+c+i,path:r,query:o,hash:i}}function y(e,t){let n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function O(e,t){return!t||e.toLowerCase().indexOf(t.toLowerCase())?e:e.slice(t.length)||"/"}function j(e,t,n){let r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&x(t.matched[r],n.matched[o])&&w(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function x(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function w(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(!_(e[n],t[n]))return!1;return!0}function _(e,t){return Array.isArray(e)?E(e,t):Array.isArray(t)?E(t,e):e===t}function E(e,t){return Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):1===e.length&&e[0]===t}function S(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/");let o,c,i=n.length-1;for(o=0;o<r.length;o++)if(c=r[o],1!==i&&"."!==c){if(".."!==c)break;i--}return n.slice(0,i).join("/")+"/"+r.slice(o-(o===r.length?1:0)).join("/")}var k,C;(function(e){e["pop"]="pop",e["push"]="push"})(k||(k={})),function(e){e["back"]="back",e["forward"]="forward",e["unknown"]=""}(C||(C={}));function A(e){if(!e)if(f){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),g(e)}const R=/^[^#]+#/;function P(e,t){return e.replace(R,"#")+t}function T(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const F=()=>({left:window.pageXOffset,top:window.pageYOffset});function I(e){let t;if("el"in e){let n=e.el;const r="string"===typeof n&&n.startsWith("#");0;const o="string"===typeof n?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=T(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.pageXOffset,null!=t.top?t.top:window.pageYOffset)}function M(e,t){const n=history.state?history.state.position-t:-1;return n+e}const N=new Map;function L(e,t){N.set(e,t)}function B(e){const t=N.get(e);return N.delete(e),t}let $=()=>location.protocol+"//"+location.host;function U(e,t){const{pathname:n,search:r,hash:o}=t,c=e.indexOf("#");if(c>-1){let e=o.slice(1);return"/"!==e[0]&&(e="/"+e),O(e,"")}const i=O(n,e);return i+r+o}function D(e,t,n,r){let o=[],c=[],i=null;const s=({state:c})=>{const s=U(e,location),a=n.value,u=t.value;let l=0;if(c){if(n.value=s,t.value=c,i&&i===a)return void(i=null);l=u?c.position-u.position:0}else r(s);o.forEach(e=>{e(n.value,a,{delta:l,type:k.pop,direction:l?l>0?C.forward:C.back:C.unknown})})};function a(){i=n.value}function u(e){o.push(e);const t=()=>{const t=o.indexOf(e);t>-1&&o.splice(t,1)};return c.push(t),t}function l(){const{history:e}=window;e.state&&e.replaceState(d({},e.state,{scroll:F()}),"")}function f(){for(const e of c)e();c=[],window.removeEventListener("popstate",s),window.removeEventListener("beforeunload",l)}return window.addEventListener("popstate",s),window.addEventListener("beforeunload",l),{pauseListeners:a,listen:u,destroy:f}}function V(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?F():null}}function q(e){const{history:t,location:n}=window;let r={value:U(e,n)},o={value:t.state};function c(r,c,i){const s=e.indexOf("#"),a=s>-1?(n.host&&document.querySelector("base")?e:e.slice(s))+r:$()+e+r;try{t[i?"replaceState":"pushState"](c,"",a),o.value=c}catch(u){console.error(u),n[i?"replace":"assign"](a)}}function i(e,n){const i=d({},t.state,V(o.value.back,e,o.value.forward,!0),n,{position:o.value.position});c(e,i,!0),r.value=e}function s(e,n){const i=d({},o.value,t.state,{forward:e,scroll:F()});c(i.current,i,!0);const s=d({},V(r.value,e,null),{position:i.position+1},n);c(e,s,!1),r.value=e}return o.value||c(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:r,state:o,push:s,replace:i}}function G(e){e=A(e);const t=q(e),n=D(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}const o=d({location:"",base:e,go:r,createHref:P.bind(null,e)},t,n);return Object.defineProperty(o,"location",{get:()=>t.location.value}),Object.definLine truncated
|
||||
Reference in new issue
Block a user