UNPKG

p3x-redis-ui-material

Version:

💿 P3X Redis UI triple frontend — Angular + React/MUI + Vue/Vuetify with 54 languages, 7 themes, Socket.IO, desktop notifications, and full feature parity

1 lines • 2.02 kB
import{I as e,yt as t}from"./i18n.store-Bbsc3Bab.js";import{$n as n,hn as r,ir as i,kt as a,lr as o,mt as s,qn as c}from"./_plugin-vue_export-helper-D1H5elb2.js";var l=Symbol.for(`vuetify:goto`);function u(){return{container:void 0,duration:300,layout:!1,offset:0,easing:`easeInOutCubic`,patterns:a}}function d(e){return f(e)??(document.scrollingElement||document.body)}function f(e){return typeof e==`string`?document.querySelector(e):n(e)}function p(e,t,n){if(typeof e==`number`)return t&&n?-e:e;let r=f(e),i=0;for(;r;)i+=t?r.offsetLeft:r.offsetTop,r=r.offsetParent;return i}function m(e,t){return{rtl:t.isRtl,options:c(u(),e)}}async function h(e,t,n,a){let s=n?`scrollLeft`:`scrollTop`,l=c(a?.options??u(),t),m=a?.rtl.value,h=(typeof e==`number`?e:f(e))??0,g=l.container===`parent`&&h instanceof HTMLElement?h.parentElement:d(l.container),v=i()?l.patterns.instant:typeof l.easing==`function`?l.easing:l.patterns[l.easing];if(!v)throw TypeError(`Easing function "${l.easing}" not found.`);let y;if(typeof h==`number`)y=p(h,n,m);else if(y=p(h,n,m)-p(g,n,m),l.layout){let e=window.getComputedStyle(h).getPropertyValue(`--v-layout-top`);e&&(y-=parseInt(e,10))}y+=l.offset,y=_(g,y,!!m,!!n);let b=g[s]??0;if(y===b)return Promise.resolve(y);let x=performance.now();return new Promise(e=>requestAnimationFrame(function t(n){let i=(n-x)/l.duration,a=Math.floor(b+(y-b)*v(r(i,0,1)));if(g[s]=a,i>=1&&Math.abs(a-g[s])<10)return e(y);if(i>2)return o(`Scroll target is not reachable`),e(g[s]);requestAnimationFrame(t)}))}function g(n={}){let r=e(l),{isRtl:i}=s();if(!r)throw Error(`[Vuetify] Could not find injected goto instance`);let a={...r,rtl:t(()=>r.rtl.value||i.value)};async function o(e,t){return h(e,c(n,t),!1,a)}return o.horizontal=async(e,t)=>h(e,c(n,t),!0,a),o}function _(e,t,n,i){let{scrollWidth:a,scrollHeight:o}=e,[s,c]=e===document.scrollingElement?[window.innerWidth,window.innerHeight]:[e.offsetWidth,e.offsetHeight],l,u;return i?n?(l=-(a-s),u=0):(l=0,u=a-s):(l=0,u=o+-c),r(t,l,u)}export{m as n,g as r,l as t};