chore: Update frontend dependencies
This commit is contained in:
1 parent
9ede992e4e
commit
08b31ba263
7 files changed
+1117
-1885
No files matched your search
@@ -1,7 +1,7 @@
|
||||
(self["webpackChunkgatus"]=self["webpackChunkgatus"]||[]).push([[998],{2931:function(t,e,n){"use strict";function r(t,e){const n=Object.create(null),r=t.split(",");for(let o=0;o<r.length;o++)n[r[o]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}n.d(e,{Bj:function(){return k},qq:function(){return D},Fl:function(){return fe},X3:function(){return Kt},PG:function(){return Ht},dq:function(){return ne},Xl:function(){return Yt},Jd:function(){return V},WL:function(){return ae},qj:function(){return Jt},iH:function(){return re},lk:function(){return H},Um:function(){return qt},XI:function(){return oe},IU:function(){return Xt},j:function(){return z},X$:function(){return Y},SU:function(){return se}});const o=()=>{},i=Object.assign,c=Object.prototype.hasOwnProperty,s=(t,e)=>c.call(t,e),u=Array.isArray,a=t=>"[object Map]"===v(t),l=t=>"function"===typeof t,f=t=>"string"===typeof t,p=t=>"symbol"===typeof t,d=t=>null!==t&&"object"===typeof t,h=Object.prototype.toString,v=t=>h.call(t),g=t=>v(t).slice(8,-1),m=t=>f(t)&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,y=t=>{const e=Object.create(null);return n=>{const r=e[n];return r||(e[n]=t(n))}},b=/-(\w)/g,x=(y((t=>t.replace(b,((t,e)=>e?e.toUpperCase():"")))),/\B([A-Z])/g),w=(y((t=>t.replace(x,"-$1").toLowerCase())),y((t=>t.charAt(0).toUpperCase()+t.slice(1)))),_=(y((t=>t?`on${w(t)}`:"")),(t,e)=>!Object.is(t,e)),E=(t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})};let S;const O=[];class k{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&S&&(this.parent=S,this.index=(S.scopes||(S.scopes=[])).push(this)-1)}run(t){if(this.active)try{return this.on(),t()}finally{this.off()}else 0}on(){this.active&&(O.push(this),S=this)}off(){this.active&&(O.pop(),S=O[O.length-1])}stop(t){if(this.active){if(this.effects.forEach((t=>t.stop())),this.cleanups.forEach((t=>t())),this.scopes&&this.scopes.forEach((t=>t.stop(!0))),this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.active=!1}}}function C(t,e){e=e||S,e&&e.active&&e.effects.push(t)}const A=t=>{const e=new Set(t);return e.w=0,e.n=0,e},j=t=>(t.w&$)>0,R=t=>(t.n&$)>0,I=({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=$},T=t=>{const{deps:e}=t;if(e.length){let n=0;for(let r=0;r<e.length;r++){const o=e[r];j(o)&&!R(o)?o.delete(t):e[n++]=o,o.w&=~$,o.n&=~$}e.length=n}},P=new WeakMap;let F=0,$=1;const M=30,N=[];let L;const U=Symbol(""),B=Symbol("");class D{constructor(t,e=null,n){this.fn=t,this.scheduler=e,this.active=!0,this.deps=[],C(this,n)}run(){if(!this.active)return this.fn();if(!N.includes(this))try{return N.push(L=this),W(),$=1<<++F,F<=M?I(this):G(this),this.fn()}finally{F<=M&&T(this),$=1<<--F,H(),N.pop();const t=N.length;L=t>0?N[t-1]:void 0}}stop(){this.active&&(G(this),this.onStop&&this.onStop(),this.active=!1)}}function G(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let J=!0;const q=[];function V(){q.push(J),J=!1}function W(){q.push(J),J=!0}function H(){const t=q.pop();J=void 0===t||t}function z(t,e,n){if(!K())return;let r=P.get(t);r||P.set(t,r=new Map);let o=r.get(n);o||r.set(n,o=A());const i=void 0;X(o,i)}function K(){return J&&void 0!==L}function X(t,e){let n=!1;F<=M?R(t)||(t.n|=$,n=!j(t)):n=!t.has(L),n&&(t.add(L),L.deps.push(t))}function Y(t,e,n,r,o,i){const c=P.get(t);if(!c)return;let s=[];if("clear"===e)s=[...c.values()];else if("length"===n&&u(t))c.forEach(((t,e)=>{("length"===e||e>=r)&&s.push(t)}));else switch(void 0!==n&&s.push(c.get(n)),e){case"add":u(t)?m(n)&&s.push(c.get("length")):(s.push(c.get(U)),a(t)&&s.push(c.get(B)));break;case"delete":u(t)||(s.push(c.get(U)),a(t)&&s.push(c.get(B)));break;case"set":a(t)&&s.push(c.get(U));break}if(1===s.length)s[0]&&Z(s[0]);else{const t=[];for(const e of s)e&&t.push(...e);Z(A(t))}}function Z(t,e){for(const n of u(t)?t:[...t])(n!==L||n.allowRecurse)&&(n.scheduler?n.scheduler():n.run())}const Q=r("__proto__,__v_isRef,__isVue"),tt=new Set(Object.getOwnPropertyNames(Symbol).map((t=>Symbol[t])).filter(p)),et=ct(),nt=ct(!1,!0),rt=ct(!0),ot=it();function it(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const n=Xt(this);for(let e=0,o=this.length;e<o;e++)z(n,"get",e+"");const r=n[e](...t);return-1===r||!1===r?n[e](...t.map(Xt)):r}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){V();const n=Xt(this)[e].apply(this,t);return H(),n}})),t}function ct(t=!1,e=!1){return function(n,r,o){if("__v_isReactive"===r)return!t;if("__v_isReadonly"===r)return t;if("__v_raw"===r&&o===(t?e?Bt:Ut:e?Lt:Nt).get(n))return n;const i=u(n);if(!t&&i&&s(ot,r))return Reflect.get(ot,r,o);const c=Reflect.get(n,r,o);if(p(r)?tt.has(r):Q(r))return c;if(t||z(n,"get",r),e)return c;if(ne(c)){const t=!i||!m(r);return t?c.value:c}return d(c)?t?Vt(c):Jt(c):c}}const st=at(),ut=at(!0);function at(t=!1){return function(e,n,r,o){let i=e[n];if(!t&&(r=Xt(r),i=Xt(i),!u(e)&&ne(i)&&!ne(r)))return i.value=r,!0;conLine truncated
|
||||
(self["webpackChunkgatus"]=self["webpackChunkgatus"]||[]).push([[998],{2262:function(t,e,n){"use strict";n.d(e,{Bj:function(){return i},qq:function(){return b},Fl:function(){return Bt},X3:function(){return Ot},PG:function(){return kt},dq:function(){return Pt},yT:function(){return Et},Xl:function(){return Rt},Jd:function(){return k},WL:function(){return Dt},qj:function(){return bt},iH:function(){return Ft},lk:function(){return S},Um:function(){return xt},XI:function(){return Nt},IU:function(){return Ct},j:function(){return E},X$:function(){return C},SU:function(){return Ut}});var r=n(3577);let o;class i{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&o&&(this.parent=o,this.index=(o.scopes||(o.scopes=[])).push(this)-1)}run(t){if(this.active){const e=o;try{return o=this,t()}finally{o=e}}else 0}on(){o=this}off(){o=this.parent}stop(t){if(this.active){let e,n;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].stop();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.active=!1}}}function c(t,e=o){e&&e.active&&e.effects.push(t)}const s=t=>{const e=new Set(t);return e.w=0,e.n=0,e},u=t=>(t.w&h)>0,a=t=>(t.n&h)>0,l=({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=h},f=t=>{const{deps:e}=t;if(e.length){let n=0;for(let r=0;r<e.length;r++){const o=e[r];u(o)&&!a(o)?o.delete(t):e[n++]=o,o.w&=~h,o.n&=~h}e.length=n}},p=new WeakMap;let d=0,h=1;const v=30;let g;const m=Symbol(""),y=Symbol("");class b{constructor(t,e=null,n){this.fn=t,this.scheduler=e,this.active=!0,this.deps=[],this.parent=void 0,c(this,n)}run(){if(!this.active)return this.fn();let t=g,e=w;while(t){if(t===this)return;t=t.parent}try{return this.parent=g,g=this,w=!0,h=1<<++d,d<=v?l(this):x(this),this.fn()}finally{d<=v&&f(this),h=1<<--d,g=this.parent,w=e,this.parent=void 0,this.deferStop&&this.stop()}}stop(){g===this?this.deferStop=!0:this.active&&(x(this),this.onStop&&this.onStop(),this.active=!1)}}function x(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let w=!0;const _=[];function k(){_.push(w),w=!1}function S(){const t=_.pop();w=void 0===t||t}function E(t,e,n){if(w&&g){let e=p.get(t);e||p.set(t,e=new Map);let r=e.get(n);r||e.set(n,r=s());const o=void 0;O(r,o)}}function O(t,e){let n=!1;d<=v?a(t)||(t.n|=h,n=!u(t)):n=!t.has(g),n&&(t.add(g),g.deps.push(t))}function C(t,e,n,o,i,c){const u=p.get(t);if(!u)return;let a=[];if("clear"===e)a=[...u.values()];else if("length"===n&&(0,r.kJ)(t))u.forEach(((t,e)=>{("length"===e||e>=o)&&a.push(t)}));else switch(void 0!==n&&a.push(u.get(n)),e){case"add":(0,r.kJ)(t)?(0,r.S0)(n)&&a.push(u.get("length")):(a.push(u.get(m)),(0,r._N)(t)&&a.push(u.get(y)));break;case"delete":(0,r.kJ)(t)||(a.push(u.get(m)),(0,r._N)(t)&&a.push(u.get(y)));break;case"set":(0,r._N)(t)&&a.push(u.get(m));break}if(1===a.length)a[0]&&R(a[0]);else{const t=[];for(const e of a)e&&t.push(...e);R(s(t))}}function R(t,e){for(const n of(0,r.kJ)(t)?t:[...t])(n!==g||n.allowRecurse)&&(n.scheduler?n.scheduler():n.run())}const A=(0,r.fY)("__proto__,__v_isRef,__isVue"),I=new Set(Object.getOwnPropertyNames(Symbol).map((t=>Symbol[t])).filter(r.yk)),j=M(),T=M(!1,!0),P=M(!0),F=N();function N(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const n=Ct(this);for(let e=0,o=this.length;e<o;e++)E(n,"get",e+"");const r=n[e](...t);return-1===r||!1===r?n[e](...t.map(Ct)):r}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){k();const n=Ct(this)[e].apply(this,t);return S(),n}})),t}function M(t=!1,e=!1){return function(n,o,i){if("__v_isReactive"===o)return!t;if("__v_isReadonly"===o)return t;if("__v_isShallow"===o)return e;if("__v_raw"===o&&i===(t?e?gt:vt:e?ht:dt).get(n))return n;const c=(0,r.kJ)(n);if(!t&&c&&(0,r.RI)(F,o))return Reflect.get(F,o,i);const s=Reflect.get(n,o,i);if((0,r.yk)(o)?I.has(o):A(o))return s;if(t||E(n,"get",o),e)return s;if(Pt(s)){const t=!c||!(0,r.S0)(o);return t?s.value:s}return(0,r.Kn)(s)?t?wt(s):bt(s):s}}const $=L(),U=L(!0);function L(t=!1){return function(e,n,o,i){let c=e[n];if(St(c)&&Pt(c)&&!Pt(o))return!1;if(!t&&!St(o)&&(Et(o)||(o=Ct(o),c=Ct(c)),!(0,r.kJ)(e)&&Pt(c)&&!Pt(o)))return c.value=o,!0;const s=(0,r.kJ)(e)&&(0,r.S0)(n)?Number(n)<e.length:(0,r.RI)(e,n),u=Reflect.set(e,n,o,i);return e===Ct(i)&&(s?(0,r.aU)(o,c)&&C(e,"set",n,o,c):C(e,"add",n,o)),u}}function D(t,e){const n=(0,r.RI)(t,e),o=t[e],i=Reflect.deleteProperty(t,e);return i&&n&&C(t,"delete",e,void 0,o),i}function J(t,e){const n=Reflect.has(t,e);return(0,r.yk)(e)&&I.has(e)||E(t,"has",e),n}function B(t){return E(t,"iterate",(0,r.kJ)(t)?"length":m),Reflect.ownKeys(t)}const G={get:j,set:$,deleteProperty:D,has:J,ownKeys:B},q={get:P,set(t,e){return!0},deleteProperty(t,e){return!0}},V=(0,r.l7)({},G,{get:T,set:U}),W=t=>t,H=t=>Reflect.getPrototypeOf(t);function K(t,Line truncated
|
||||
/*!
|
||||
* vue-router v4.0.12
|
||||
* (c) 2021 Eduardo San Martin Morote
|
||||
* vue-router v4.0.14
|
||||
* (c) 2022 Eduardo San Martin Morote
|
||||
* @license MIT
|
||||
*/
|
||||
const i="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag,c=t=>i?Symbol(t):"_vr_"+t,s=c("rvlm"),u=c("rvd"),a=c("r"),l=c("rl"),f=c("rvl"),p="undefined"!==typeof window;function d(t){return t.__esModule||i&&"Module"===t[Symbol.toStringTag]}const h=Object.assign;function v(t,e){const n={};for(const r in e){const o=e[r];n[r]=Array.isArray(o)?o.map(t):t(o)}return n}const g=()=>{};const m=/\/$/,y=t=>t.replace(m,"");function b(t,e,n="/"){let r,o={},i="",c="";const s=e.indexOf("?"),u=e.indexOf("#",s>-1?s:0);return s>-1&&(r=e.slice(0,s),i=e.slice(s+1,u>-1?u:e.length),o=t(i)),u>-1&&(r=r||e.slice(0,u),c=e.slice(u,e.length)),r=C(null!=r?r:e,n),{fullPath:r+(i&&"?")+i+c,path:r,query:o,hash:c}}function x(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function w(t,e){return e&&t.toLowerCase().startsWith(e.toLowerCase())?t.slice(e.length)||"/":t}function _(t,e,n){const r=e.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&E(e.matched[r],n.matched[o])&&S(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function E(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function S(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!O(t[n],e[n]))return!1;return!0}function O(t,e){return Array.isArray(t)?k(t,e):Array.isArray(e)?k(e,t):t===e}function k(t,e){return Array.isArray(e)?t.length===e.length&&t.every(((t,n)=>t===e[n])):1===t.length&&t[0]===e}function C(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),r=t.split("/");let o,i,c=n.length-1;for(o=0;o<r.length;o++)if(i=r[o],1!==c&&"."!==i){if(".."!==i)break;c--}return n.slice(0,c).join("/")+"/"+r.slice(o-(o===r.length?1:0)).join("/")}var A,j;(function(t){t["pop"]="pop",t["push"]="push"})(A||(A={})),function(t){t["back"]="back",t["forward"]="forward",t["unknown"]=""}(j||(j={}));function R(t){if(!t)if(p){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return"/"!==t[0]&&"#"!==t[0]&&(t="/"+t),y(t)}const I=/^[^#]+#/;function T(t,e){return t.replace(I,"#")+e}function P(t,e){const n=document.documentElement.getBoundingClientRect(),r=t.getBoundingClientRect();return{behavior:e.behavior,left:r.left-n.left-(e.left||0),top:r.top-n.top-(e.top||0)}}const F=()=>({left:window.pageXOffset,top:window.pageYOffset});function $(t){let e;if("el"in t){const n=t.el,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;e=P(o,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(null!=e.left?e.left:window.pageXOffset,null!=e.top?e.top:window.pageYOffset)}function M(t,e){const n=history.state?history.state.position-e:-1;return n+t}const N=new Map;function L(t,e){N.set(t,e)}function U(t){const e=N.get(t);return N.delete(t),e}let B=()=>location.protocol+"//"+location.host;function D(t,e){const{pathname:n,search:r,hash:o}=e,i=t.indexOf("#");if(i>-1){let e=o.includes(t.slice(i))?t.slice(i).length:1,n=o.slice(e);return"/"!==n[0]&&(n="/"+n),w(n,"")}const c=w(n,t);return c+r+o}function G(t,e,n,r){let o=[],i=[],c=null;const s=({state:i})=>{const s=D(t,location),u=n.value,a=e.value;let l=0;if(i){if(n.value=s,e.value=i,c&&c===u)return void(c=null);l=a?i.position-a.position:0}else r(s);o.forEach((t=>{t(n.value,u,{delta:l,type:A.pop,direction:l?l>0?j.forward:j.back:j.unknown})}))};function u(){c=n.value}function a(t){o.push(t);const e=()=>{const e=o.indexOf(t);e>-1&&o.splice(e,1)};return i.push(e),e}function l(){const{history:t}=window;t.state&&t.replaceState(h({},t.state,{scroll:F()}),"")}function f(){for(const t of i)t();i=[],window.removeEventListener("popstate",s),window.removeEventListener("beforeunload",l)}return window.addEventListener("popstate",s),window.addEventListener("beforeunload",l),{pauseListeners:u,listen:a,destroy:f}}function J(t,e,n,r=!1,o=!1){return{back:t,current:e,forward:n,replaced:r,position:window.history.length,scroll:o?F():null}}function q(t){const{history:e,location:n}=window,r={value:D(t,n)},o={value:e.state};function i(r,i,c){const s=t.indexOf("#"),u=s>-1?(n.host&&document.querySelector("base")?t:t.slice(s))+r:B()+t+r;try{e[c?"replaceState":"pushState"](i,"",u),o.value=i}catch(a){console.error(a),n[c?"replace":"assign"](u)}}function c(t,n){const c=h({},e.state,J(o.value.back,t,o.value.forward,!0),n,{position:o.value.position});i(t,c,!0),r.value=t}function s(t,n){const c=h({},o.value,e.state,{forward:t,scroll:F()});i(c.current,c,!0);const s=h({},J(r.value,t,null),{position:c.position+1},n);i(t,s,!1),r.value=t}return o.value||i(r.value,{back:null,current:r.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0),{location:r,state:o,push:s,replace:c}}function V(t){t=R(t);const e=q(t),n=G(t,e.state,e.location,e.replace);function r(t,e=!0){e||n.pauseListeners(),history.go(t)}const o=h({location:"",base:t,go:r,createHref:T.bind(null,t)},e,n);return Object.defineProperty(o,"loLine truncated
|
||||
const i="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag,c=t=>i?Symbol(t):"_vr_"+t,s=c("rvlm"),u=c("rvd"),a=c("r"),l=c("rl"),f=c("rvl"),p="undefined"!==typeof window;function d(t){return t.__esModule||i&&"Module"===t[Symbol.toStringTag]}const h=Object.assign;function v(t,e){const n={};for(const r in e){const o=e[r];n[r]=Array.isArray(o)?o.map(t):t(o)}return n}const g=()=>{};const m=/\/$/,y=t=>t.replace(m,"");function b(t,e,n="/"){let r,o={},i="",c="";const s=e.indexOf("?"),u=e.indexOf("#",s>-1?s:0);return s>-1&&(r=e.slice(0,s),i=e.slice(s+1,u>-1?u:e.length),o=t(i)),u>-1&&(r=r||e.slice(0,u),c=e.slice(u,e.length)),r=C(null!=r?r:e,n),{fullPath:r+(i&&"?")+i+c,path:r,query:o,hash:c}}function x(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function w(t,e){return e&&t.toLowerCase().startsWith(e.toLowerCase())?t.slice(e.length)||"/":t}function _(t,e,n){const r=e.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&k(e.matched[r],n.matched[o])&&S(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function k(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function S(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!E(t[n],e[n]))return!1;return!0}function E(t,e){return Array.isArray(t)?O(t,e):Array.isArray(e)?O(e,t):t===e}function O(t,e){return Array.isArray(e)?t.length===e.length&&t.every(((t,n)=>t===e[n])):1===t.length&&t[0]===e}function C(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),r=t.split("/");let o,i,c=n.length-1;for(o=0;o<r.length;o++)if(i=r[o],1!==c&&"."!==i){if(".."!==i)break;c--}return n.slice(0,c).join("/")+"/"+r.slice(o-(o===r.length?1:0)).join("/")}var R,A;(function(t){t["pop"]="pop",t["push"]="push"})(R||(R={})),function(t){t["back"]="back",t["forward"]="forward",t["unknown"]=""}(A||(A={}));function I(t){if(!t)if(p){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return"/"!==t[0]&&"#"!==t[0]&&(t="/"+t),y(t)}const j=/^[^#]+#/;function T(t,e){return t.replace(j,"#")+e}function P(t,e){const n=document.documentElement.getBoundingClientRect(),r=t.getBoundingClientRect();return{behavior:e.behavior,left:r.left-n.left-(e.left||0),top:r.top-n.top-(e.top||0)}}const F=()=>({left:window.pageXOffset,top:window.pageYOffset});function N(t){let e;if("el"in t){const n=t.el,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;e=P(o,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(null!=e.left?e.left:window.pageXOffset,null!=e.top?e.top:window.pageYOffset)}function M(t,e){const n=history.state?history.state.position-e:-1;return n+t}const $=new Map;function U(t,e){$.set(t,e)}function L(t){const e=$.get(t);return $.delete(t),e}let D=()=>location.protocol+"//"+location.host;function J(t,e){const{pathname:n,search:r,hash:o}=e,i=t.indexOf("#");if(i>-1){let e=o.includes(t.slice(i))?t.slice(i).length:1,n=o.slice(e);return"/"!==n[0]&&(n="/"+n),w(n,"")}const c=w(n,t);return c+r+o}function B(t,e,n,r){let o=[],i=[],c=null;const s=({state:i})=>{const s=J(t,location),u=n.value,a=e.value;let l=0;if(i){if(n.value=s,e.value=i,c&&c===u)return void(c=null);l=a?i.position-a.position:0}else r(s);o.forEach((t=>{t(n.value,u,{delta:l,type:R.pop,direction:l?l>0?A.forward:A.back:A.unknown})}))};function u(){c=n.value}function a(t){o.push(t);const e=()=>{const e=o.indexOf(t);e>-1&&o.splice(e,1)};return i.push(e),e}function l(){const{history:t}=window;t.state&&t.replaceState(h({},t.state,{scroll:F()}),"")}function f(){for(const t of i)t();i=[],window.removeEventListener("popstate",s),window.removeEventListener("beforeunload",l)}return window.addEventListener("popstate",s),window.addEventListener("beforeunload",l),{pauseListeners:u,listen:a,destroy:f}}function G(t,e,n,r=!1,o=!1){return{back:t,current:e,forward:n,replaced:r,position:window.history.length,scroll:o?F():null}}function q(t){const{history:e,location:n}=window,r={value:J(t,n)},o={value:e.state};function i(r,i,c){const s=t.indexOf("#"),u=s>-1?(n.host&&document.querySelector("base")?t:t.slice(s))+r:D()+t+r;try{e[c?"replaceState":"pushState"](i,"",u),o.value=i}catch(a){console.error(a),n[c?"replace":"assign"](u)}}function c(t,n){const c=h({},e.state,G(o.value.back,t,o.value.forward,!0),n,{position:o.value.position});i(t,c,!0),r.value=t}function s(t,n){const c=h({},o.value,e.state,{forward:t,scroll:F()});i(c.current,c,!0);const s=h({},G(r.value,t,null),{position:c.position+1},n);i(t,s,!1),r.value=t}return o.value||i(r.value,{back:null,current:r.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0),{location:r,state:o,push:s,replace:c}}function V(t){t=I(t);const e=q(t),n=B(t,e.state,e.location,e.replace);function r(t,e=!0){e||n.pauseListeners(),history.go(t)}const o=h({location:"",base:t,go:r,createHref:T.bind(null,t)},e,n);return Object.defineProperty(o,"loLine truncated
|
||||
Reference in new issue
Block a user