Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-agile-scrollbar

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-agile-scrollbar - npm Package Compare versions

Comparing version 1.0.19 to 2.0.0

dist/vue-agile-scrollbar.mjs

6

dist/vue-agile-scrollbar.umd.js

@@ -1,1 +0,5 @@

(function(n,a){typeof exports=="object"&&typeof module!="undefined"?module.exports=a():typeof define=="function"&&define.amd?define(a):(n=typeof globalThis!="undefined"?globalThis:n||self,n["vue-agile-scrollbar"]=a())})(this,function(){"use strict";var n={minBarSize:{type:Number,default:50},scrollTop:{type:Number,default:0},scrollLeft:{type:Number,default:0},displayType:{type:String,default:"hover"},offsetLeft:{type:Number,default:0},offsetRight:{type:Number,default:10},offsetTop:{type:Number,default:0},offsetBottom:{type:Number,default:10},isAutoUpdate:{type:Boolean,default:!0},dragSpeedX:{type:Number,default:1},dragSpeedY:{type:Number,default:1}},a=function(){var t=this,l=t.$createElement,s=t._self._c||l;return s("div",{ref:"scrollBox",staticClass:"vue-agile-scrollbar",class:{"not-user-select":t.scrollBarX.clientX||t.scrollBarY.clientY,"scrollbar-hover":t.displayType==="hover","scrollbar-hide":t.displayType==="hide"}},[s("div",{ref:"scroll",staticClass:"agile-scroll-content",on:{scroll:t.onScroll}},[s("div",{ref:"scrollContent",staticClass:"agile-scroll-wrapper"},[t._t("default")],2)]),t.scrollBarX.show?s("div",{staticClass:"agile-scroll-bar-x",class:{act:t.scrollBarX.clientX},style:{left:t.scrollBarX.left+"px",width:t.scrollBarX.width+"px",bottom:t.scrollBarX.bottom},on:{mousedown:function(e){return t.scrollBarDown(e,"scrollBarX")}}}):t._e(),t.scrollBarY.show?s("div",{staticClass:"agile-scroll-bar-y",class:{act:t.scrollBarY.clientY},style:{top:t.scrollBarY.top+"px",height:t.scrollBarY.height+"px"},on:{mousedown:function(e){return t.scrollBarDown(e,"scrollBarY")}}}):t._e()])},B=[],w="";function g(t,l,s,e,i,h,d,X){var o=typeof t=="function"?t.options:t;l&&(o.render=l,o.staticRenderFns=s,o._compiled=!0),e&&(o.functional=!0),h&&(o._scopeId="data-v-"+h);var c;if(d?(c=function(r){r=r||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!r&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(r=__VUE_SSR_CONTEXT__),i&&i.call(this,r),r&&r._registeredComponents&&r._registeredComponents.add(d)},o._ssrRegister=c):i&&(c=X?function(){i.call(this,(o.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(o.functional){o._injectStyles=c;var Y=o.render;o.render=function(S,p){return c.call(p),Y(S,p)}}else{var u=o.beforeCreate;o.beforeCreate=u?[].concat(u,c):[c]}return{exports:t,options:o}}const m={name:"vueAgileScrollBar",props:n,data(){return{scrollBarY:{show:!0,clientY:null,height:0,top:this.offsetTop,multiple:1},scrollBarX:{show:!0,clientX:null,width:0,bottom:0,left:this.offsetLeft,multiple:1},scrollWidth:0,scrollHeight:0,scrollContentWidth:0,scrollContentHeight:0}},watch:{offsetLeft(){this.setScrollBarLeft(),this.initScrollBar()},offsetRight(){this.initScrollBar()},offsetTop(){this.setScrollBarTop(),this.initScrollBar()},offsetBottom(){this.initScrollBar()}},mounted(){this.$scrollBox=this.$refs.scrollBox,this.$scroll=this.$refs.scroll,this.$scrollContent=this.$refs.scrollContent,this.setScrollLeft(),this.setScrollTop(),this.updated(),this.isAutoUpdate&&(this.observer=new MutationObserver(this.updated),this.observer.observe(this.$refs.scrollContent,{attributes:!0,childList:!0,subtree:!0})),this.addDragEvent()},methods:{initContainer(){this.scrollWidth=this.$scrollBox.offsetWidth,this.scrollHeight=this.$scrollBox.offsetHeight,this.scrollContentWidth=this.$scrollContent.offsetWidth,this.scrollContentHeight=this.$scrollContent.offsetHeight},initScrollBar(){if(this.scrollContentWidth>this.scrollWidth){const t=this.scrollWidth-(this.scrollContentWidth-this.scrollWidth)-this.offsetLeft-this.offsetRight;this.scrollBarX.show=!0,this.scrollBarX.width=t<this.minBarSize?this.minBarSize:t,this.scrollBarX.multiple=(this.scrollContentWidth-this.scrollWidth)/(this.scrollWidth-this.scrollBarX.width-this.offsetLeft-this.offsetRight)}else this.scrollBarX.show=!1;if(this.scrollContentHeight>this.scrollHeight){const t=this.scrollHeight-(this.scrollContentHeight-this.scrollHeight)-this.offsetTop-this.offsetBottom;this.scrollBarY.show=!0,this.scrollBarY.height=t<this.minBarSize?this.minBarSize:t,this.scrollBarY.multiple=(this.scrollContentHeight-this.scrollHeight)/(this.scrollHeight-this.scrollBarY.height-this.offsetTop-this.offsetBottom),this.scrollBarX.bottom=0}else this.scrollBarY.show=!1,this.scrollBarX.bottom=this.scrollHeight-this.scrollContentHeight+"px"},updated(){this.initContainer(),this.initScrollBar(),this.$emit("updated",{scrollBarY:this.scrollBarY.show,scrollBarX:this.scrollBarX.show,top:this.$scroll.scrollTop,left:this.$scroll.scrollLeft,scrollWidth:this.scrollWidth,scrollHeight:this.scrollHeight,scrollContentWidth:this.scrollContentWidth,scrollContentHeight:this.scrollContentHeight})},setScrollBarLeft(){const t=this.$scroll.scrollLeft,l=this.offsetLeft+Math.floor(t/this.scrollBarX.multiple);return l!==this.scrollBarX.left&&(this.scrollBarX.left=l),t},setScrollBarTop(){const t=this.$scroll.scrollTop,l=this.offsetTop+Math.floor(t/this.scrollBarY.multiple);return l!==this.scrollBarY.top&&(this.scrollBarY.top=l),t},onScroll(t){const l=this.setScrollBarTop(),s=this.setScrollBarLeft();this.$emit("scroll",{top:l,left:s,scrollWidth:this.scrollWidth,scrollHeight:this.scrollHeight,scrollContentWidth:this.scrollContentWidth,scrollContentHeight:this.scrollContentHeight},t),this._events["scroll-hit"]&&this.onScrollHit(l,s)},onScrollHit(t,l){let s="top",e=t-this.initTop,i=l-this.initLeft;this.initTop=t,this.initLeft=l;const h=()=>{this.$emit("scroll-hit",s,{top:t,left:l,scrollWidth:this.scrollWidth,scrollHeight:this.scrollHeight,scrollContentWidth:this.scrollContentWidth,scrollContentHeight:this.scrollContentHeight})};e!==0&&this.scrollBarY.height&&(e<0?s="top":s="bottom",this.scrollContentHeight-this.scrollHeight-t==0&&h(),t===0&&s==="top"&&h()),i!==0&&this.scrollBarX.width&&(i<0?s="left":s="right",l===0&&s==="left"||this.scrollContentWidth-this.scrollWidth-l==0||(s="xMiddle"),h())},scrollBarDown(t,l){l==="scrollBarX"&&(this.scrollBarX.clientX=t.clientX,this.scrollBarX.scrollLeft=this.$scroll.scrollLeft),l==="scrollBarY"&&(this.scrollBarY.clientY=t.clientY,this.scrollBarY.scrollTop=this.$scroll.scrollTop),window.addEventListener("mousemove",this.scrollBarDrag)},scrollBarDrag(t){const l=this.scrollBarX.clientX,s=this.scrollBarY.clientY;if(l){let e=t.clientX-l;this.$scroll.scrollLeft=this.scrollBarX.scrollLeft+e*(this.scrollBarX.multiple*this.dragSpeedX)}if(s){let e=t.clientY-s;this.$scroll.scrollTop=this.scrollBarY.scrollTop+e*this.scrollBarY.multiple*this.dragSpeedY}},scrollBarUp(){this.scrollBarX.clientX=null,this.scrollBarY.clientY=null,window.removeEventListener("mousemove",this.scrollBarDrag)},addDragEvent(){window.addEventListener("mouseup",this.scrollBarUp)},removeDragEvent(){window.removeEventListener("mouseup",this.addDragEvent)},setScrollLeft(t){(t>=0||this.scrollLeft>=0)&&(this.$scroll.scrollLeft=t||this.scrollLeft)},setScrollTop(t){(t>=0||this.scrollTop>=0)&&(this.$scroll.scrollTop=t||this.scrollTop)}},beforeDestroy(){this.isAutoUpdate&&this.observer&&this.observer.disconnect(),this.removeDragEvent()}},f={};var v=g(m,a,B,!1,C,null,null,null);function C(t){for(let l in f)this[l]=f[l]}var _=function(){return v.exports}();return _});
(function(Z,k){typeof exports=="object"&&typeof module<"u"?module.exports=k():typeof define=="function"&&define.amd?define(k):(Z=typeof globalThis<"u"?globalThis:Z||self,Z["vue-agile-scrollbar"]=k())})(this,function(){"use strict";const Z={minBarSize:{type:Number,default:50},scrollTop:{type:Number,default:0},scrollLeft:{type:Number,default:0},displayType:{type:String,default:"hover"},offsetLeft:{type:Number,default:0},offsetRight:{type:Number,default:10},offsetTop:{type:Number,default:0},offsetBottom:{type:Number,default:10},isAutoUpdate:{type:Boolean,default:!0},dragSpeedX:{type:Number,default:1},dragSpeedY:{type:Number,default:1}};function k(t,e){const n=Object.create(null),s=t.split(",");for(let r=0;r<s.length;r++)n[s[r]]=!0;return e?r=>!!n[r.toLowerCase()]:r=>!!n[r]}function tt(t){if(d(t)){const e={};for(let n=0;n<t.length;n++){const s=t[n],r=T(s)?Ze(s):tt(s);if(r)for(const o in r)e[o]=r[o]}return e}else{if(T(t))return t;if(S(t))return t}}const qe=/;(?![^(]*\))/g,Ge=/:([^]+)/,Qe=/\/\*.*?\*\//gs;function Ze(t){const e={};return t.replace(Qe,"").split(qe).forEach(n=>{if(n){const s=n.split(Ge);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function J(t){let e="";if(T(t))e=t;else if(d(t))for(let n=0;n<t.length;n++){const s=J(t[n]);s&&(e+=s+" ")}else if(S(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}const R=process.env.NODE_ENV!=="production"?Object.freeze({}):{},ke=process.env.NODE_ENV!=="production"?Object.freeze([]):[],kt=()=>{},tn=/^on[^a-z]/,en=t=>tn.test(t),V=Object.assign,nn=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},rn=Object.prototype.hasOwnProperty,m=(t,e)=>rn.call(t,e),d=Array.isArray,q=t=>lt(t)==="[object Map]",sn=t=>lt(t)==="[object Set]",N=t=>typeof t=="function",T=t=>typeof t=="string",Vt=t=>typeof t=="symbol",S=t=>t!==null&&typeof t=="object",on=t=>S(t)&&N(t.then)&&N(t.catch),ln=Object.prototype.toString,lt=t=>ln.call(t),te=t=>lt(t).slice(8,-1),cn=t=>lt(t)==="[object Object]",Tt=t=>T(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,an=(t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))})(t=>t.charAt(0).toUpperCase()+t.slice(1)),ct=(t,e)=>!Object.is(t,e),un=(t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})};let ee;const fn=()=>ee||(ee=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ne(t,...e){console.warn(`[Vue warn] ${t}`,...e)}let re;function hn(t,e=re){e&&e.active&&e.effects.push(t)}function pn(){return re}const Dt=t=>{const e=new Set(t);return e.w=0,e.n=0,e},se=t=>(t.w&M)>0,oe=t=>(t.n&M)>0,dn=({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=M},gn=t=>{const{deps:e}=t;if(e.length){let n=0;for(let s=0;s<e.length;s++){const r=e[s];se(r)&&!oe(r)?r.delete(t):e[n++]=r,r.w&=~M,r.n&=~M}e.length=n}},$t=new WeakMap;let et=0,M=1;const Rt=30;let O;const F=Symbol(process.env.NODE_ENV!=="production"?"iterate":""),It=Symbol(process.env.NODE_ENV!=="production"?"Map key iterate":"");class mn{constructor(e,n=null,s){this.fn=e,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,hn(this,s)}run(){if(!this.active)return this.fn();let e=O,n=X;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=O,O=this,X=!0,M=1<<++et,et<=Rt?dn(this):ie(this),this.fn()}finally{et<=Rt&&gn(this),M=1<<--et,O=this.parent,X=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){O===this?this.deferStop=!0:this.active&&(ie(this),this.onStop&&this.onStop(),this.active=!1)}}function ie(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let X=!0;const le=[];function ce(){le.push(X),X=!1}function ae(){const t=le.pop();X=t===void 0?!0:t}function y(t,e,n){if(X&&O){let s=$t.get(t);s||$t.set(t,s=new Map);let r=s.get(n);r||s.set(n,r=Dt());const o=process.env.NODE_ENV!=="production"?{effect:O,target:t,type:e,key:n}:void 0;_n(r,o)}}function _n(t,e){let n=!1;et<=Rt?oe(t)||(t.n|=M,n=!se(t)):n=!t.has(O),n&&(t.add(O),O.deps.push(t),process.env.NODE_ENV!=="production"&&O.onTrack&&O.onTrack(Object.assign({effect:O},e)))}function H(t,e,n,s,r,o){const i=$t.get(t);if(!i)return;let l=[];if(e==="clear")l=[...i.values()];else if(n==="length"&&d(t)){const f=Number(s);i.forEach((p,c)=>{(c==="length"||c>=f)&&l.push(p)})}else switch(n!==void 0&&l.push(i.get(n)),e){case"add":d(t)?Tt(n)&&l.push(i.get("length")):(l.push(i.get(F)),q(t)&&l.push(i.get(It)));break;case"delete":d(t)||(l.push(i.get(F)),q(t)&&l.push(i.get(It)));break;case"set":q(t)&&l.push(i.get(F));break}const a=process.env.NODE_ENV!=="production"?{target:t,type:e,key:n,newValue:s,oldValue:r,oldTarget:o}:void 0;if(l.length===1)l[0]&&(process.env.NODE_ENV!=="production"?at(l[0],a):at(l[0]));else{const f=[];for(const p of l)p&&f.push(...p);process.env.NODE_ENV!=="production"?at(Dt(f),a):at(Dt(f))}}function at(t,e){const n=d(t)?t:[...t];for(const s of n)s.computed&&ue(s,e);for(const s of n)s.computed||ue(s,e)}function ue(t,e){(t!==O||t.allowRecurse)&&(process.env.NODE_ENV!=="production"&&t.onTrigger&&t.onTrigger(V({effect:t},e)),t.scheduler?t.scheduler():t.run())}const wn=k("__proto__,__v_isRef,__isVue"),fe=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Vt)),En=Pt(),Nn=Pt(!0),bn=Pt(!0,!0),he=Sn();function Sn(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const s=h(this);for(let o=0,i=this.length;o<i;o++)y(s,"get",o+"");const r=s[e](...n);return r===-1||r===!1?s[e](...n.map(h)):r}}),["push","pop","shift","unshift","splice"].forEach(e=>{t[e]=function(...n){ce();const s=h(this)[e].apply(this,n);return ae(),s}}),t}function On(t){const e=h(this);return y(e,"has",t),e.hasOwnProperty(t)}function Pt(t=!1,e=!1){return function(s,r,o){if(r==="__v_isReactive")return!t;if(r==="__v_isReadonly")return t;if(r==="__v_isShallow")return e;if(r==="__v_raw"&&o===(t?e?be:Ne:e?Yn:Ee).get(s))return s;const i=d(s);if(!t){if(i&&m(he,r))return Reflect.get(he,r,o);if(r==="hasOwnProperty")return On}const l=Reflect.get(s,r,o);return(Vt(r)?fe.has(r):wn(r))||(t||y(s,"get",r),e)?l:v(l)?i&&Tt(r)?l:l.value:S(l)?t?Oe(l):Se(l):l}}const vn=yn();function yn(t=!1){return function(n,s,r,o){let i=n[s];if(j(i)&&v(i)&&!v(r))return!1;if(!t&&(!Yt(r)&&!j(r)&&(i=h(i),r=h(r)),!d(n)&&v(i)&&!v(r)))return i.value=r,!0;const l=d(n)&&Tt(s)?Number(s)<n.length:m(n,s),a=Reflect.set(n,s,r,o);return n===h(o)&&(l?ct(r,i)&&H(n,"set",s,r,i):H(n,"add",s,r)),a}}function Bn(t,e){const n=m(t,e),s=t[e],r=Reflect.deleteProperty(t,e);return r&&n&&H(t,"delete",e,void 0,s),r}function Cn(t,e){const n=Reflect.has(t,e);return(!Vt(e)||!fe.has(e))&&y(t,"has",e),n}function xn(t){return y(t,"iterate",d(t)?"length":F),Reflect.ownKeys(t)}const Vn={get:En,set:vn,deleteProperty:Bn,has:Cn,ownKeys:xn},pe={get:Nn,set(t,e){return process.env.NODE_ENV!=="production"&&ne(`Set operation on key "${String(e)}" failed: target is readonly.`,t),!0},deleteProperty(t,e){return process.env.NODE_ENV!=="production"&&ne(`Delete operation on key "${String(e)}" failed: target is readonly.`,t),!0}},Tn=V({},pe,{get:bn}),Mt=t=>t,ut=t=>Reflect.getPrototypeOf(t);function ft(t,e,n=!1,s=!1){t=t.__v_raw;const r=h(t),o=h(e);n||(e!==o&&y(r,"get",e),y(r,"get",o));const{has:i}=ut(r),l=s?Mt:n?Xt:Ft;if(i.call(r,e))return l(t.get(e));if(i.call(r,o))return l(t.get(o));t!==r&&t.get(e)}function ht(t,e=!1){const n=this.__v_raw,s=h(n),r=h(t);return e||(t!==r&&y(s,"has",t),y(s,"has",r)),t===r?n.has(t):n.has(t)||n.has(r)}function pt(t,e=!1){return t=t.__v_raw,!e&&y(h(t),"iterate",F),Reflect.get(t,"size",t)}function de(t){t=h(t);const e=h(this);return ut(e).has.call(e,t)||(e.add(t),H(e,"add",t,t)),this}function ge(t,e){e=h(e);const n=h(this),{has:s,get:r}=ut(n);let o=s.call(n,t);o?process.env.NODE_ENV!=="production"&&we(n,s,t):(t=h(t),o=s.call(n,t));const i=r.call(n,t);return n.set(t,e),o?ct(e,i)&&H(n,"set",t,e,i):H(n,"add",t,e),this}function me(t){const e=h(this),{has:n,get:s}=ut(e);let r=n.call(e,t);r?process.env.NODE_ENV!=="production"&&we(e,n,t):(t=h(t),r=n.call(e,t));const o=s?s.call(e,t):void 0,i=e.delete(t);return r&&H(e,"delete",t,void 0,o),i}function _e(){const t=h(this),e=t.size!==0,n=process.env.NODE_ENV!=="production"?q(t)?new Map(t):new Set(t):void 0,s=t.clear();return e&&H(t,"clear",void 0,void 0,n),s}function dt(t,e){return function(s,r){const o=this,i=o.__v_raw,l=h(i),a=e?Mt:t?Xt:Ft;return!t&&y(l,"iterate",F),i.forEach((f,p)=>s.call(r,a(f),a(p),o))}}function gt(t,e,n){return function(...s){const r=this.__v_raw,o=h(r),i=q(o),l=t==="entries"||t===Symbol.iterator&&i,a=t==="keys"&&i,f=r[t](...s),p=n?Mt:e?Xt:Ft;return!e&&y(o,"iterate",a?It:F),{next(){const{value:c,done:u}=f.next();return u?{value:c,done:u}:{value:l?[p(c[0]),p(c[1])]:p(c),done:u}},[Symbol.iterator](){return this}}}}function W(t){return function(...e){if(process.env.NODE_ENV!=="production"){const n=e[0]?`on key "${e[0]}" `:"";console.warn(`${an(t)} operation ${n}failed: target is readonly.`,h(this))}return t==="delete"?!1:this}}function Dn(){const t={get(o){return ft(this,o)},get size(){return pt(this)},has:ht,add:de,set:ge,delete:me,clear:_e,forEach:dt(!1,!1)},e={get(o){return ft(this,o,!1,!0)},get size(){return pt(this)},has:ht,add:de,set:ge,delete:me,clear:_e,forEach:dt(!1,!0)},n={get(o){return ft(this,o,!0)},get size(){return pt(this,!0)},has(o){return ht.call(this,o,!0)},add:W("add"),set:W("set"),delete:W("delete"),clear:W("clear"),forEach:dt(!0,!1)},s={get(o){return ft(this,o,!0,!0)},get size(){return pt(this,!0)},has(o){return ht.call(this,o,!0)},add:W("add"),set:W("set"),delete:W("delete"),clear:W("clear"),forEach:dt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{t[o]=gt(o,!1,!1),n[o]=gt(o,!0,!1),e[o]=gt(o,!1,!0),s[o]=gt(o,!0,!0)}),[t,n,e,s]}const[$n,Rn,In,Pn]=Dn();function Ht(t,e){const n=e?t?Pn:In:t?Rn:$n;return(s,r,o)=>r==="__v_isReactive"?!t:r==="__v_isReadonly"?t:r==="__v_raw"?s:Reflect.get(m(n,r)&&r in s?n:s,r,o)}const Mn={get:Ht(!1,!1)},Hn={get:Ht(!0,!1)},Wn={get:Ht(!0,!0)};function we(t,e,n){const s=h(n);if(s!==n&&e.call(t,s)){const r=te(t);console.warn(`Reactive ${r} contains both the raw and reactive versions of the same object${r==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Ee=new WeakMap,Yn=new WeakMap,Ne=new WeakMap,be=new WeakMap;function An(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Fn(t){return t.__v_skip||!Object.isExtensible(t)?0:An(te(t))}function Se(t){return j(t)?t:Wt(t,!1,Vn,Mn,Ee)}function Oe(t){return Wt(t,!0,pe,Hn,Ne)}function mt(t){return Wt(t,!0,Tn,Wn,be)}function Wt(t,e,n,s,r){if(!S(t))return process.env.NODE_ENV!=="production"&&console.warn(`value cannot be made reactive: ${String(t)}`),t;if(t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=r.get(t);if(o)return o;const i=Fn(t);if(i===0)return t;const l=new Proxy(t,i===2?s:n);return r.set(t,l),l}function L(t){return j(t)?L(t.__v_raw):!!(t&&t.__v_isReactive)}function j(t){return!!(t&&t.__v_isReadonly)}function Yt(t){return!!(t&&t.__v_isShallow)}function At(t){return L(t)||j(t)}function h(t){const e=t&&t.__v_raw;return e?h(e):t}function Xn(t){return un(t,"__v_skip",!0),t}const Ft=t=>S(t)?Se(t):t,Xt=t=>S(t)?Oe(t):t;function v(t){return!!(t&&t.__v_isRef===!0)}function Ln(t){return v(t)?t.value:t}const jn={get:(t,e,n)=>Ln(Reflect.get(t,e,n)),set:(t,e,n,s)=>{const r=t[e];return v(r)&&!v(n)?(r.value=n,!0):Reflect.set(t,e,n,s)}};function zn(t){return L(t)?t:new Proxy(t,jn)}const z=[];function Kn(t){z.push(t)}function Un(){z.pop()}function E(t,...e){if(process.env.NODE_ENV==="production")return;ce();const n=z.length?z[z.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=Jn();if(s)K(s,n,11,[t+e.join(""),n&&n.proxy,r.map(({vnode:o})=>`at <${Ue(n,o.type)}>`).join(`
`),r]);else{const o=[`[Vue warn]: ${t}`,...e];r.length&&o.push(`
`,...qn(r)),console.warn(...o)}ae()}function Jn(){let t=z[z.length-1];if(!t)return[];const e=[];for(;t;){const n=e[0];n&&n.vnode===t?n.recurseCount++:e.push({vnode:t,recurseCount:0});const s=t.component&&t.component.parent;t=s&&s.vnode}return e}function qn(t){const e=[];return t.forEach((n,s)=>{e.push(...s===0?[]:[`
`],...Gn(n))}),e}function Gn({vnode:t,recurseCount:e}){const n=e>0?`... (${e} recursive calls)`:"",s=t.component?t.component.parent==null:!1,r=` at <${Ue(t.component,t.type,s)}`,o=">"+n;return t.props?[r,...Qn(t.props),o]:[r+o]}function Qn(t){const e=[],n=Object.keys(t);return n.slice(0,3).forEach(s=>{e.push(...ve(s,t[s]))}),n.length>3&&e.push(" ..."),e}function ve(t,e,n){return T(e)?(e=JSON.stringify(e),n?e:[`${t}=${e}`]):typeof e=="number"||typeof e=="boolean"||e==null?n?e:[`${t}=${e}`]:v(e)?(e=ve(t,h(e.value),!0),n?e:[`${t}=Ref<`,e,">"]):N(e)?[`${t}=fn${e.name?`<${e.name}>`:""}`]:(e=h(e),n?e:[`${t}=`,e])}const ye={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",[0]:"setup function",[1]:"render function",[2]:"watcher getter",[3]:"watcher callback",[4]:"watcher cleanup function",[5]:"native event handler",[6]:"component event handler",[7]:"vnode hook",[8]:"directive hook",[9]:"transition hook",[10]:"app errorHandler",[11]:"app warnHandler",[12]:"ref function",[13]:"async component loader",[14]:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"};function K(t,e,n,s){let r;try{r=s?t(...s):t()}catch(o){Be(o,e,n)}return r}function Lt(t,e,n,s){if(N(t)){const o=K(t,e,n,s);return o&&on(o)&&o.catch(i=>{Be(i,e,n)}),o}const r=[];for(let o=0;o<t.length;o++)r.push(Lt(t[o],e,n,s));return r}function Be(t,e,n,s=!0){const r=e?e.vnode:null;if(e){let o=e.parent;const i=e.proxy,l=process.env.NODE_ENV!=="production"?ye[n]:n;for(;o;){const f=o.ec;if(f){for(let p=0;p<f.length;p++)if(f[p](t,i,l)===!1)return}o=o.parent}const a=e.appContext.config.errorHandler;if(a){K(a,null,10,[t,i,l]);return}}Zn(t,n,r,s)}function Zn(t,e,n,s=!0){if(process.env.NODE_ENV!=="production"){const r=ye[e];if(n&&Kn(n),E(`Unhandled error${r?` during execution of ${r}`:""}`),n&&Un(),s)throw t;console.error(t)}else console.error(t)}let _t=!1,jt=!1;const D=[];let Y=0;const G=[];let I=null,A=0;const Ce=Promise.resolve();let zt=null;const kn=100;function tr(t){const e=zt||Ce;return t?e.then(this?t.bind(this):t):e}function er(t){let e=Y+1,n=D.length;for(;e<n;){const s=e+n>>>1;nt(D[s])<t?e=s+1:n=s}return e}function Kt(t){(!D.length||!D.includes(t,_t&&t.allowRecurse?Y+1:Y))&&(t.id==null?D.push(t):D.splice(er(t.id),0,t),xe())}function xe(){!_t&&!jt&&(jt=!0,zt=Ce.then(Te))}function Ve(t){d(t)?G.push(...t):(!I||!I.includes(t,t.allowRecurse?A+1:A))&&G.push(t),xe()}function nr(t){if(G.length){const e=[...new Set(G)];if(G.length=0,I){I.push(...e);return}for(I=e,process.env.NODE_ENV!=="production"&&(t=t||new Map),I.sort((n,s)=>nt(n)-nt(s)),A=0;A<I.length;A++)process.env.NODE_ENV!=="production"&&De(t,I[A])||I[A]();I=null,A=0}}const nt=t=>t.id==null?1/0:t.id,rr=(t,e)=>{const n=nt(t)-nt(e);if(n===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return n};function Te(t){jt=!1,_t=!0,process.env.NODE_ENV!=="production"&&(t=t||new Map),D.sort(rr);const e=process.env.NODE_ENV!=="production"?n=>De(t,n):kt;try{for(Y=0;Y<D.length;Y++){const n=D[Y];if(n&&n.active!==!1){if(process.env.NODE_ENV!=="production"&&e(n))continue;K(n,null,14)}}}finally{Y=0,D.length=0,nr(t),_t=!1,zt=null,(D.length||G.length)&&Te(t)}}function De(t,e){if(!t.has(e))t.set(e,1);else{const n=t.get(e);if(n>kn){const s=e.ownerInstance,r=s&&Ke(s.type);return E(`Maximum recursive updates exceeded${r?` in component <${r}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`),!0}else t.set(e,n+1)}}const rt=new Set;process.env.NODE_ENV!=="production"&&(fn().__VUE_HMR_RUNTIME__={createRecord:Ut(sr),rerender:Ut(or),reload:Ut(ir)});const wt=new Map;function sr(t,e){return wt.has(t)?!1:(wt.set(t,{initialDef:st(e),instances:new Set}),!0)}function st(t){return Je(t)?t.__vccOpts:t}function or(t,e){const n=wt.get(t);n&&(n.initialDef.render=e,[...n.instances].forEach(s=>{e&&(s.render=e,st(s.type).render=e),s.renderCache=[],s.update()}))}function ir(t,e){const n=wt.get(t);if(!n)return;e=st(e),$e(n.initialDef,e);const s=[...n.instances];for(const r of s){const o=st(r.type);rt.has(o)||(o!==n.initialDef&&$e(o,e),rt.add(o)),r.appContext.optionsCache.delete(r.type),r.ceReload?(rt.add(o),r.ceReload(e.styles),rt.delete(o)):r.parent?Kt(r.parent.update):r.appContext.reload?r.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}Ve(()=>{for(const r of s)rt.delete(st(r.type))})}function $e(t,e){V(t,e);for(const n in t)n!=="__file"&&!(n in e)&&delete t[n]}function Ut(t){return(e,n)=>{try{return t(e,n)}catch(s){console.error(s),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let C=null,lr=null;function Lr(){}const cr=t=>t.__isSuspense;function ar(t,e){e&&e.pendingBranch?d(t)?e.effects.push(...t):e.effects.push(t):Ve(t)}const Et={};function ur(t,e,{immediate:n,deep:s,flush:r,onTrack:o,onTrigger:i}=R){process.env.NODE_ENV!=="production"&&!e&&(n!==void 0&&E('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&E('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'));const l=g=>{E("Invalid watch source: ",g,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},a=pn()===(P==null?void 0:P.scope)?P:null;let f,p=!1,c=!1;if(v(t)?(f=()=>t.value,p=Yt(t)):L(t)?(f=()=>t,s=!0):d(t)?(c=!0,p=t.some(g=>L(g)||Yt(g)),f=()=>t.map(g=>{if(v(g))return g.value;if(L(g))return Q(g);if(N(g))return K(g,a,2);process.env.NODE_ENV!=="production"&&l(g)})):N(t)?e?f=()=>K(t,a,2):f=()=>{if(!(a&&a.isUnmounted))return u&&u(),Lt(t,a,3,[_])}:(f=kt,process.env.NODE_ENV!=="production"&&l(t)),e&&s){const g=f;f=()=>Q(g())}let u,_=g=>{u=x.onStop=()=>{K(g,a,4)}},w=c?new Array(t.length).fill(Et):Et;const B=()=>{if(x.active)if(e){const g=x.run();(s||p||(c?g.some((Ar,Fr)=>ct(Ar,w[Fr])):ct(g,w)))&&(u&&u(),Lt(e,a,3,[g,w===Et?void 0:c&&w[0]===Et?[]:w,_]),w=g)}else x.run()};B.allowRecurse=!!e;let xt;r==="sync"?xt=B:r==="post"?xt=()=>Me(B,a&&a.suspense):(B.pre=!0,a&&(B.id=a.uid),xt=()=>Kt(B));const x=new mn(f,xt);return process.env.NODE_ENV!=="production"&&(x.onTrack=o,x.onTrigger=i),e?n?B():w=x.run():r==="post"?Me(x.run.bind(x),a&&a.suspense):x.run(),()=>{x.stop(),a&&a.scope&&nn(a.scope.effects,x)}}function fr(t,e,n){const s=this.proxy,r=T(t)?t.includes(".")?hr(s,t):()=>s[t]:t.bind(s,s);let o;N(e)?o=e:(o=e.handler,n=e);const i=P;ze(this);const l=ur(r,o.bind(s),n);return i?ze(i):Vr(),l}function hr(t,e){const n=e.split(".");return()=>{let s=t;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}function Q(t,e){if(!S(t)||t.__v_skip||(e=e||new Set,e.has(t)))return t;if(e.add(t),v(t))Q(t.value,e);else if(d(t))for(let n=0;n<t.length;n++)Q(t[n],e);else if(sn(t)||q(t))t.forEach(n=>{Q(n,e)});else if(cn(t))for(const n in t)Q(t[n],e);return t}const pr=t=>!!t.type.__asyncLoader,dr=Symbol();function gr(t,e,n={},s,r){if(C.isCE||C.parent&&pr(C.parent)&&C.parent.isCE)return e!=="default"&&(n.name=e),Bt("slot",n,s&&s());let o=t[e];process.env.NODE_ENV!=="production"&&o&&o.length>1&&(E("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),o=()=>[]),o&&o._c&&(o._d=!1),it();const i=o&&Re(o(n)),l=We(bt,{key:n.key||i&&i.key||`_${e}`},i||(s?s():[]),i&&t._===1?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}function Re(t){return t.some(e=>Ye(e)?!(e.type===St||e.type===bt&&!Re(e.children)):!0)?t:null}const Jt=t=>t?Tr(t)?Dr(t)||t.proxy:Jt(t.parent):null,ot=V(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>process.env.NODE_ENV!=="production"?mt(t.props):t.props,$attrs:t=>process.env.NODE_ENV!=="production"?mt(t.attrs):t.attrs,$slots:t=>process.env.NODE_ENV!=="production"?mt(t.slots):t.slots,$refs:t=>process.env.NODE_ENV!=="production"?mt(t.refs):t.refs,$parent:t=>Jt(t.parent),$root:t=>Jt(t.root),$emit:t=>t.emit,$options:t=>wr(t),$forceUpdate:t=>t.f||(t.f=()=>Kt(t.update)),$nextTick:t=>t.n||(t.n=tr.bind(t.proxy)),$watch:t=>fr.bind(t)}),mr=t=>t==="_"||t==="$",qt=(t,e)=>t!==R&&!t.__isScriptSetup&&m(t,e),_r={get({_:t},e){const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:a}=t;if(process.env.NODE_ENV!=="production"&&e==="__isVue")return!0;let f;if(e[0]!=="$"){const _=i[e];if(_!==void 0)switch(_){case 1:return s[e];case 2:return r[e];case 4:return n[e];case 3:return o[e]}else{if(qt(s,e))return i[e]=1,s[e];if(r!==R&&m(r,e))return i[e]=2,r[e];if((f=t.propsOptions[0])&&m(f,e))return i[e]=3,o[e];if(n!==R&&m(n,e))return i[e]=4,n[e];i[e]=0}}const p=ot[e];let c,u;if(p)return e==="$attrs"&&(y(t,"get",e),process.env.NODE_ENV!=="production"&&void 0),p(t);if((c=l.__cssModules)&&(c=c[e]))return c;if(n!==R&&m(n,e))return i[e]=4,n[e];if(u=a.config.globalProperties,m(u,e))return u[e];process.env.NODE_ENV!=="production"&&C&&(!T(e)||e.indexOf("__v")!==0)&&(r!==R&&mr(e[0])&&m(r,e)?E(`Property ${JSON.stringify(e)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):t===C&&E(`Property ${JSON.stringify(e)} was accessed during render but is not defined on instance.`))},set({_:t},e,n){const{data:s,setupState:r,ctx:o}=t;return qt(r,e)?(r[e]=n,!0):process.env.NODE_ENV!=="production"&&r.__isScriptSetup&&m(r,e)?(E(`Cannot mutate <script setup> binding "${e}" from Options API.`),!1):s!==R&&m(s,e)?(s[e]=n,!0):m(t.props,e)?(process.env.NODE_ENV!=="production"&&E(`Attempting to mutate prop "${e}". Props are readonly.`),!1):e[0]==="$"&&e.slice(1)in t?(process.env.NODE_ENV!=="production"&&E(`Attempting to mutate public property "${e}". Properties starting with $ are reserved and readonly.`),!1):(process.env.NODE_ENV!=="production"&&e in t.appContext.config.globalProperties?Object.defineProperty(o,e,{enumerable:!0,configurable:!0,value:n}):o[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:s,appContext:r,propsOptions:o}},i){let l;return!!n[i]||t!==R&&m(t,i)||qt(e,i)||(l=o[0])&&m(l,i)||m(s,i)||m(ot,i)||m(r.config.globalProperties,i)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:m(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};process.env.NODE_ENV!=="production"&&(_r.ownKeys=t=>(E("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(t)));function wr(t){const e=t.type,{mixins:n,extends:s}=e,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=t.appContext,l=o.get(e);let a;return l?a=l:!r.length&&!n&&!s?a=e:(a={},r.length&&r.forEach(f=>Nt(a,f,i,!0)),Nt(a,e,i)),S(e)&&o.set(e,a),a}function Nt(t,e,n,s=!1){const{mixins:r,extends:o}=e;o&&Nt(t,o,n,!0),r&&r.forEach(i=>Nt(t,i,n,!0));for(const i in e)if(s&&i==="expose")process.env.NODE_ENV!=="production"&&E('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const l=Er[i]||n&&n[i];t[i]=l?l(t[i],e[i]):e[i]}return t}const Er={data:Ie,props:U,emits:U,methods:U,computed:U,beforeCreate:b,created:b,beforeMount:b,mounted:b,beforeUpdate:b,updated:b,beforeDestroy:b,beforeUnmount:b,destroyed:b,unmounted:b,activated:b,deactivated:b,errorCaptured:b,serverPrefetch:b,components:U,directives:U,watch:br,provide:Ie,inject:Nr};function Ie(t,e){return e?t?function(){return V(N(t)?t.call(this,this):t,N(e)?e.call(this,this):e)}:e:t}function Nr(t,e){return U(Pe(t),Pe(e))}function Pe(t){if(d(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function b(t,e){return t?[...new Set([].concat(t,e))]:e}function U(t,e){return t?V(V(Object.create(null),t),e):e}function br(t,e){if(!t)return e;if(!e)return t;const n=V(Object.create(null),t);for(const s in e)n[s]=b(t[s],e[s]);return n}const Me=ar,Sr=t=>t.__isTeleport,bt=Symbol(process.env.NODE_ENV!=="production"?"Fragment":void 0),Or=Symbol(process.env.NODE_ENV!=="production"?"Text":void 0),St=Symbol(process.env.NODE_ENV!=="production"?"Comment":void 0);Symbol(process.env.NODE_ENV!=="production"?"Static":void 0);const Ot=[];let $=null;function it(t=!1){Ot.push($=t?null:[])}function vr(){Ot.pop(),$=Ot[Ot.length-1]||null}function He(t){return t.dynamicChildren=$||ke,vr(),$&&$.push(t),t}function Gt(t,e,n,s,r,o){return He(yt(t,e,n,s,r,o,!0))}function We(t,e,n,s,r){return He(Bt(t,e,n,s,r,!0))}function Ye(t){return t?t.__v_isVNode===!0:!1}const yr=(...t)=>Xe(...t),Ae="__vInternal",Fe=({key:t})=>t??null,vt=({ref:t,ref_key:e,ref_for:n})=>t!=null?T(t)||v(t)||N(t)?{i:C,r:t,k:e,f:!!n}:t:null;function yt(t,e=null,n=null,s=0,r=null,o=t===bt?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Fe(e),ref:e&&vt(e),scopeId:lr,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:C};return l?(Qt(a,n),o&128&&t.normalize(a)):n&&(a.shapeFlag|=T(n)?8:16),process.env.NODE_ENV!=="production"&&a.key!==a.key&&E("VNode created with invalid key (NaN). VNode type:",a.type),!i&&$&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&$.push(a),a}const Bt=process.env.NODE_ENV!=="production"?yr:Xe;function Xe(t,e=null,n=null,s=0,r=null,o=!1){if((!t||t===dr)&&(process.env.NODE_ENV!=="production"&&!t&&E(`Invalid vnode type when creating vnode: ${t}.`),t=St),Ye(t)){const l=Ct(t,e,!0);return n&&Qt(l,n),!o&&$&&(l.shapeFlag&6?$[$.indexOf(t)]=l:$.push(l)),l.patchFlag|=-2,l}if(Je(t)&&(t=t.__vccOpts),e){e=Br(e);let{class:l,style:a}=e;l&&!T(l)&&(e.class=J(l)),S(a)&&(At(a)&&!d(a)&&(a=V({},a)),e.style=tt(a))}const i=T(t)?1:cr(t)?128:Sr(t)?64:S(t)?4:N(t)?2:0;return process.env.NODE_ENV!=="production"&&i&4&&At(t)&&(t=h(t),E("Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
Component that was made reactive: `,t)),yt(t,e,n,s,r,i,o,!0)}function Br(t){return t?At(t)||Ae in t?V({},t):t:null}function Ct(t,e,n=!1){const{props:s,ref:r,patchFlag:o,children:i}=t,l=e?xr(s||{},e):s;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:l,key:l&&Fe(l),ref:e&&e.ref?n&&r?d(r)?r.concat(vt(e)):[r,vt(e)]:vt(e):r,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:process.env.NODE_ENV!=="production"&&o===-1&&d(i)?i.map(Le):i,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==bt?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Ct(t.ssContent),ssFallback:t.ssFallback&&Ct(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function Le(t){const e=Ct(t);return d(t.children)&&(e.children=t.children.map(Le)),e}function Cr(t=" ",e=0){return Bt(Or,null,t,e)}function je(t="",e=!1){return e?(it(),We(St,null,t)):Bt(St,null,t)}function Qt(t,e){let n=0;const{shapeFlag:s}=t;if(e==null)e=null;else if(d(e))n=16;else if(typeof e=="object")if(s&65){const r=e.default;r&&(r._c&&(r._d=!1),Qt(t,r()),r._c&&(r._d=!0));return}else{n=32;const r=e._;!r&&!(Ae in e)?e._ctx=C:r===3&&C&&(C.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else N(e)?(e={default:e,_ctx:C},n=32):(e=String(e),s&64?(n=16,e=[Cr(e)]):n=8);t.children=e,t.shapeFlag|=n}function xr(...t){const e={};for(let n=0;n<t.length;n++){const s=t[n];for(const r in s)if(r==="class")e.class!==s.class&&(e.class=J([e.class,s.class]));else if(r==="style")e.style=tt([e.style,s.style]);else if(en(r)){const o=e[r],i=s[r];i&&o!==i&&!(d(o)&&o.includes(i))&&(e[r]=o?[].concat(o,i):i)}else r!==""&&(e[r]=s[r])}return e}let P=null;const ze=t=>{P=t,t.scope.on()},Vr=()=>{P&&P.scope.off(),P=null};function Tr(t){return t.vnode.shapeFlag&4}function Dr(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(zn(Xn(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in ot)return ot[n](t)},has(e,n){return n in e||n in ot}}))}const $r=/(?:^|[-_])(\w)/g,Rr=t=>t.replace($r,e=>e.toUpperCase()).replace(/[-_]/g,"");function Ke(t,e=!0){return N(t)?t.displayName||t.name:t.name||e&&t.__name}function Ue(t,e,n=!1){let s=Ke(e);if(!s&&e.__file){const r=e.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&t&&t.parent){const r=o=>{for(const i in o)if(o[i]===e)return i};s=r(t.components||t.parent.type.components)||r(t.appContext.components)}return s?Rr(s):n?"App":"Anonymous"}function Je(t){return N(t)&&"__vccOpts"in t}Symbol(process.env.NODE_ENV!=="production"?"ssrContext":"");function Zt(t){return!!(t&&t.__v_isShallow)}function Ir(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const t={style:"color:#3ba776"},e={style:"color:#0b1bc9"},n={style:"color:#b62e24"},s={style:"color:#9d288c"},r={header(c){return S(c)?c.__isVue?["div",t,"VueInstance"]:v(c)?["div",{},["span",t,p(c)],"<",l(c.value),">"]:L(c)?["div",{},["span",t,Zt(c)?"ShallowReactive":"Reactive"],"<",l(c),`>${j(c)?" (readonly)":""}`]:j(c)?["div",{},["span",t,Zt(c)?"ShallowReadonly":"Readonly"],"<",l(c),">"]:null:null},hasBody(c){return c&&c.__isVue},body(c){if(c&&c.__isVue)return["div",{},...o(c.$)]}};function o(c){const u=[];c.type.props&&c.props&&u.push(i("props",h(c.props))),c.setupState!==R&&u.push(i("setup",c.setupState)),c.data!==R&&u.push(i("data",h(c.data)));const _=a(c,"computed");_&&u.push(i("computed",_));const w=a(c,"inject");return w&&u.push(i("injected",w)),u.push(["div",{},["span",{style:s.style+";opacity:0.66"},"$ (internal): "],["object",{object:c}]]),u}function i(c,u){return u=V({},u),Object.keys(u).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},c],["div",{style:"padding-left:1.25em"},...Object.keys(u).map(_=>["div",{},["span",s,_+": "],l(u[_],!1)])]]:["span",{}]}function l(c,u=!0){return typeof c=="number"?["span",e,c]:typeof c=="string"?["span",n,JSON.stringify(c)]:typeof c=="boolean"?["span",s,c]:S(c)?["object",{object:u?h(c):c}]:["span",n,String(c)]}function a(c,u){const _=c.type;if(N(_))return;const w={};for(const B in c.ctx)f(_,B,u)&&(w[B]=c.ctx[B]);return w}function f(c,u,_){const w=c[_];if(d(w)&&w.includes(u)||S(w)&&u in w||c.extends&&f(c.extends,u,_)||c.mixins&&c.mixins.some(B=>f(B,u,_)))return!0}function p(c){return Zt(c)?"ShallowRef":c.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(r):window.devtoolsFormatters=[r]}function Pr(){Ir()}process.env.NODE_ENV!=="production"&&Pr();const jr="",Mr=(t,e)=>{const n=t.__vccOpts||t;for(const[s,r]of e)n[s]=r;return n},Hr={name:"vueAgileScrollBar",props:Z,data(){return{scrollBarY:{show:!0,clientY:null,height:0,top:this.offsetTop,multiple:1},scrollBarX:{show:!0,clientX:null,width:0,bottom:0,left:this.offsetLeft,multiple:1},scrollWidth:0,scrollHeight:0,scrollContentWidth:0,scrollContentHeight:0}},watch:{offsetLeft(){this.setScrollBarLeft(),this.initScrollBar()},offsetRight(){this.initScrollBar()},offsetTop(){this.setScrollBarTop(),this.initScrollBar()},offsetBottom(){this.initScrollBar()}},mounted(){this.$scrollBox=this.$refs.scrollBox,this.$scroll=this.$refs.scroll,this.$scrollContent=this.$refs.scrollContent,this.setScrollLeft(),this.setScrollTop(),this.updated(),this.isAutoUpdate&&(this.observer=new MutationObserver(this.updated),this.observer.observe(this.$refs.scrollContent,{attributes:!0,childList:!0,subtree:!0})),this.addDragEvent()},methods:{initContainer(){this.scrollWidth=this.$scrollBox.offsetWidth,this.scrollHeight=this.$scrollBox.offsetHeight,this.scrollContentWidth=this.$scrollContent.offsetWidth,this.scrollContentHeight=this.$scrollContent.offsetHeight},initScrollBar(){if(this.scrollContentWidth>this.scrollWidth){const t=this.scrollWidth-(this.scrollContentWidth-this.scrollWidth)-this.offsetLeft-this.offsetRight;this.scrollBarX.show=!0,this.scrollBarX.width=t<this.minBarSize?this.minBarSize:t,this.scrollBarX.multiple=(this.scrollContentWidth-this.scrollWidth)/(this.scrollWidth-this.scrollBarX.width-this.offsetLeft-this.offsetRight)}else this.scrollBarX.show=!1;if(this.scrollContentHeight>this.scrollHeight){const t=this.scrollHeight-(this.scrollContentHeight-this.scrollHeight)-this.offsetTop-this.offsetBottom;this.scrollBarY.show=!0,this.scrollBarY.height=t<this.minBarSize?this.minBarSize:t,this.scrollBarY.multiple=(this.scrollContentHeight-this.scrollHeight)/(this.scrollHeight-this.scrollBarY.height-this.offsetTop-this.offsetBottom),this.scrollBarX.bottom=0}else this.scrollBarY.show=!1,this.scrollBarX.bottom=this.scrollHeight-this.scrollContentHeight+"px"},updated(){this.initContainer(),this.initScrollBar(),this.$emit("updated",{scrollBarY:this.scrollBarY.show,scrollBarX:this.scrollBarX.show,top:this.$scroll.scrollTop,left:this.$scroll.scrollLeft,scrollWidth:this.scrollWidth,scrollHeight:this.scrollHeight,scrollContentWidth:this.scrollContentWidth,scrollContentHeight:this.scrollContentHeight})},setScrollBarLeft(){const t=this.$scroll.scrollLeft,e=this.offsetLeft+Math.floor(t/this.scrollBarX.multiple);return e!==this.scrollBarX.left&&(this.scrollBarX.left=e),t},setScrollBarTop(){const t=this.$scroll.scrollTop,e=this.offsetTop+Math.floor(t/this.scrollBarY.multiple);return e!==this.scrollBarY.top&&(this.scrollBarY.top=e),t},onScroll(t){const e=this.setScrollBarTop(),n=this.setScrollBarLeft();this.$emit("scroll",{top:e,left:n,scrollWidth:this.scrollWidth,scrollHeight:this.scrollHeight,scrollContentWidth:this.scrollContentWidth,scrollContentHeight:this.scrollContentHeight},t),this.$attrs.onScrollHit&&this.onScrollHit(e,n)},onScrollHit(t,e){let n="top",s=t-this.initTop,r=e-this.initLeft;this.initTop=t,this.initLeft=e;const o=()=>{this.$emit("scroll-hit",n,{top:t,left:e,scrollWidth:this.scrollWidth,scrollHeight:this.scrollHeight,scrollContentWidth:this.scrollContentWidth,scrollContentHeight:this.scrollContentHeight})};s!==0&&this.scrollBarY.height&&(s<0?n="top":n="bottom",this.scrollContentHeight-this.scrollHeight-t===0&&o(),t===0&&n==="top"&&o()),r!==0&&this.scrollBarX.width&&(r<0?n="left":n="right",e===0&&n==="left"||this.scrollContentWidth-this.scrollWidth-e===0||(n="xMiddle"),o())},scrollBarDown(t,e){e==="scrollBarX"&&(this.scrollBarX.clientX=t.clientX,this.scrollBarX.scrollLeft=this.$scroll.scrollLeft),e==="scrollBarY"&&(this.scrollBarY.clientY=t.clientY,this.scrollBarY.scrollTop=this.$scroll.scrollTop),window.addEventListener("mousemove",this.scrollBarDrag)},scrollBarDrag(t){const e=this.scrollBarX.clientX,n=this.scrollBarY.clientY;if(e){let s=t.clientX-e;this.$scroll.scrollLeft=this.scrollBarX.scrollLeft+s*(this.scrollBarX.multiple*this.dragSpeedX)}if(n){let s=t.clientY-n;this.$scroll.scrollTop=this.scrollBarY.scrollTop+s*this.scrollBarY.multiple*this.dragSpeedY}},scrollBarUp(){this.scrollBarX.clientX=null,this.scrollBarY.clientY=null,window.removeEventListener("mousemove",this.scrollBarDrag)},addDragEvent(){window.addEventListener("mouseup",this.scrollBarUp)},removeDragEvent(){window.removeEventListener("mouseup",this.addDragEvent)},setScrollLeft(t){(t>=0||this.scrollLeft>=0)&&(this.$scroll.scrollLeft=t||this.scrollLeft)},setScrollTop(t){(t>=0||this.scrollTop>=0)&&(this.$scroll.scrollTop=t||this.scrollTop)}},beforeUnmount(){this.isAutoUpdate&&this.observer&&this.observer.disconnect(),this.removeDragEvent()}},Wr={class:"agile-scroll-wrapper",ref:"scrollContent"};function Yr(t,e,n,s,r,o){return it(),Gt("div",{class:J(["vue-agile-scrollbar",{"not-user-select":r.scrollBarX.clientX||r.scrollBarY.clientY,"scrollbar-hover":t.displayType==="hover","scrollbar-hide":t.displayType==="hide"}]),ref:"scrollBox"},[yt("div",{class:"agile-scroll-content",ref:"scroll",onScroll:e[0]||(e[0]=(...i)=>o.onScroll&&o.onScroll(...i))},[yt("div",Wr,[gr(t.$slots,"default")],512)],544),r.scrollBarX.show?(it(),Gt("div",{key:0,class:J(["agile-scroll-bar-x",{act:r.scrollBarX.clientX}]),style:tt({left:r.scrollBarX.left+"px",width:r.scrollBarX.width+"px",bottom:r.scrollBarX.bottom}),onMousedown:e[1]||(e[1]=i=>o.scrollBarDown(i,"scrollBarX"))},null,38)):je("",!0),r.scrollBarY.show?(it(),Gt("div",{key:1,class:J(["agile-scroll-bar-y",{act:r.scrollBarY.clientY}]),style:tt({top:r.scrollBarY.top+"px",height:r.scrollBarY.height+"px"}),onMousedown:e[2]||(e[2]=i=>o.scrollBarDown(i,"scrollBarY"))},null,38)):je("",!0)],2)}return Mr(Hr,[["render",Yr]])});

8

package.json
{
"name": "vue-agile-scrollbar",
"version": "1.0.19",
"version": "2.0.0",
"description": "Custom agile scroll bar",

@@ -29,6 +29,4 @@ "author": {

"less": "^4.1.2",
"vite": "^2.7.0",
"vite-plugin-vue2": "^1.9.0",
"vue": "^2.6.14",
"vue-template-compiler": "^2.6.14",
"vite": "~4.0.1",
"vue": "~3.2.45",
"vue-agile-scrollbar": "^1.0.2"

@@ -35,0 +33,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc