index.42cbb984.js 11 KB

1
  1. var ue=Object.defineProperty,re=Object.defineProperties;var ce=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var de=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable;var O=(e,o,t)=>o in e?ue(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,v=(e,o)=>{for(var t in o||(o={}))de.call(o,t)&&O(e,t,o[t]);if(j)for(var t of j(o))ve.call(o,t)&&O(e,t,o[t]);return e},F=(e,o)=>re(e,ce(o));import{bc as N,q as R,ap as Q,aR as J,aS as fe,x as W,aT as he,b1 as me,bd as be,be as ge,r as I,C as y,ar as L,A as ye,bf as xe,b as d,Q as M,E as H,ab as K,bg as Ce,bh as Te,bi as Se,bj as Ve,bk as _e,bl as ke,bm as we,at as z,B as Be,ac as Pe,bn as $e,b0 as Ee,bo as Ie,bp as Xe,F as Ye,a0 as D,D as E,bq as Me,br as Re,bs as We,bt as He,y as Ae,bu as Le,aU as ze,aV as _,b2 as De,bv as Ge,bw as U,d as je,o as k,X as Y,w as $,Y as q,c as A,n as Oe,t as Fe,b9 as Ue,k as qe,a1 as Ne,T as Qe,bx as Je,_ as Ke}from"./index.6c36cb53.js";const Ze=e=>{const{touchstartX:o,touchendX:t,touchstartY:n,touchendY:l}=e,s=.5,a=16;e.offsetX=t-o,e.offsetY=l-n,Math.abs(e.offsetY)<s*Math.abs(e.offsetX)&&(e.left&&t<o-a&&e.left(e),e.right&&t>o+a&&e.right(e)),Math.abs(e.offsetX)<s*Math.abs(e.offsetY)&&(e.up&&l<n-a&&e.up(e),e.down&&l>n+a&&e.down(e))};function pe(e,o){var n;const t=e.changedTouches[0];o.touchstartX=t.clientX,o.touchstartY=t.clientY,(n=o.start)==null||n.call(o,v({originalEvent:e},o))}function et(e,o){var n;const t=e.changedTouches[0];o.touchendX=t.clientX,o.touchendY=t.clientY,(n=o.end)==null||n.call(o,v({originalEvent:e},o)),Ze(o)}function tt(e,o){var n;const t=e.changedTouches[0];o.touchmoveX=t.clientX,o.touchmoveY=t.clientY,(n=o.move)==null||n.call(o,v({originalEvent:e},o))}function ot(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const o={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:e.left,right:e.right,up:e.up,down:e.down,start:e.start,move:e.move,end:e.end};return{touchstart:t=>pe(t,o),touchend:t=>et(t,o),touchmove:t=>tt(t,o)}}function nt(e,o){var f,i,u;const t=o.value,n=t!=null&&t.parent?e.parentElement:e,l=(f=t==null?void 0:t.options)!=null?f:{passive:!0},s=(i=o.instance)==null?void 0:i.$.uid;if(!n||!s)return;const a=ot(o.value);n._touchHandlers=(u=n._touchHandlers)!=null?u:Object.create(null),n._touchHandlers[s]=a,N(a).forEach(C=>{n.addEventListener(C,a[C],l)})}function at(e,o){var s,a;const t=(s=o.value)!=null&&s.parent?e.parentElement:e,n=(a=o.instance)==null?void 0:a.$.uid;if(!(t!=null&&t._touchHandlers)||!n)return;const l=t._touchHandlers[n];N(l).forEach(f=>{t.removeEventListener(f,l[f])}),delete t._touchHandlers[n]}const Z={mounted:nt,unmounted:at},st=Z,p=Symbol.for("vuetify:v-window"),ee=Symbol.for("vuetify:v-window-group"),lt=R(v(v(v({continuous:Boolean,nextIcon:{type:[Boolean,String,Function,Object],default:"$next"},prevIcon:{type:[Boolean,String,Function,Object],default:"$prev"},reverse:Boolean,showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||e==="hover"},touch:{type:[Object,Boolean],default:void 0},direction:{type:String,default:"horizontal"},modelValue:null,disabled:Boolean,selectedClass:{type:String,default:"v-window-item--active"},mandatory:{type:[Boolean,String],default:"force"}},Q()),J()),fe()),"VWindow"),it=W()({name:"VWindow",directives:{Touch:Z},props:lt(),emits:{"update:modelValue":e=>!0},setup(e,o){let{slots:t}=o;const{themeClasses:n}=he(e),{isRtl:l}=me(),{t:s}=be(),a=ge(e,ee),f=I(),i=y(()=>l.value?!e.reverse:e.reverse),u=L(!1),C=y(()=>{const r=e.direction==="vertical"?"y":"x",g=(i.value?!u.value:u.value)?"-reverse":"";return`v-window-${r}${g}-transition`}),x=L(0),b=I(void 0),m=y(()=>a.items.value.findIndex(r=>a.selected.value.includes(r.id)));ye(m,(r,c)=>{const g=a.items.value.length,T=g-1;g<=2?u.value=r<c:r===T&&c===0?u.value=!0:r===0&&c===T?u.value=!1:u.value=r<c}),xe(p,{transition:C,isReversed:u,transitionCount:x,transitionHeight:b,rootRef:f});const h=y(()=>e.continuous||m.value!==0),w=y(()=>e.continuous||m.value!==a.items.value.length-1);function B(){h.value&&a.prev()}function X(){w.value&&a.next()}const S=y(()=>{const r=[],c={icon:l.value?e.nextIcon:e.prevIcon,class:`v-window__${i.value?"right":"left"}`,onClick:a.prev,"aria-label":s("$vuetify.carousel.prev")};r.push(h.value?t.prev?t.prev({props:c}):d(M,c,null):d("div",null,null));const g={icon:l.value?e.prevIcon:e.nextIcon,class:`v-window__${i.value?"left":"right"}`,onClick:a.next,"aria-label":s("$vuetify.carousel.next")};return r.push(w.value?t.next?t.next({props:g}):d(M,g,null):d("div",null,null)),r}),V=y(()=>e.touch===!1?e.touch:v(v({},{left:()=>{i.value?B():X()},right:()=>{i.value?X():B()},start:c=>{let{originalEvent:g}=c;g.stopPropagation()}}),e.touch===!0?{}:e.touch));return H(()=>K(d(e.tag,{ref:f,class:["v-window",{"v-window--show-arrows-on-hover":e.showArrows==="hover"},n.value,e.class],style:e.style},{default:()=>{var r,c;return[d("div",{class:"v-window__container",style:{height:b.value}},[(r=t.default)==null?void 0:r.call(t,{group:a}),e.showArrows!==!1&&d("div",{class:"v-window__controls"},[S.value])]),(c=t.additional)==null?void 0:c.call(t,{group:a})]}}),[[Ce("touch"),V.value]])),{group:a}}}),ut=R(v(v(v({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0}},Q()),Te()),Se()),"VWindowItem"),rt=W()({name:"VWindowItem",directives:{Touch:st},props:ut(),emits:{"group:selected":e=>!0},setup(e,o){let{slots:t}=o;const n=Ve(p),l=_e(e,ee),{isBooted:s}=ke();if(!n||!l)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const a=L(!1),f=y(()=>s.value&&(n.isReversed.value?e.reverseTransition!==!1:e.transition!==!1));function i(){!a.value||!n||(a.value=!1,n.transitionCount.value>0&&(n.transitionCount.value-=1,n.transitionCount.value===0&&(n.transitionHeight.value=void 0)))}function u(){var h;a.value||!n||(a.value=!0,n.transitionCount.value===0&&(n.transitionHeight.value=z((h=n.rootRef.value)==null?void 0:h.clientHeight)),n.transitionCount.value+=1)}function C(){i()}function x(h){!a.value||Be(()=>{!f.value||!a.value||!n||(n.transitionHeight.value=z(h.clientHeight))})}const b=y(()=>{const h=n.isReversed.value?e.reverseTransition:e.transition;return f.value?{name:typeof h!="string"?n.transition.value:h,onBeforeEnter:u,onAfterEnter:i,onEnterCancelled:C,onBeforeLeave:u,onAfterLeave:i,onLeaveCancelled:C,onEnter:x}:!1}),{hasContent:m}=we(e,l.isSelected);return H(()=>d($e,{transition:b.value,disabled:!s.value},{default:()=>{var h;return[K(d("div",{class:["v-window-item",l.selectedClass.value,e.class],style:e.style},[m.value&&((h=t.default)==null?void 0:h.call(t))]),[[Pe,l.isSelected.value]])]}})),{groupItem:l}}});const te=Symbol.for("vuetify:v-tabs"),ct=R(v({fixed:Boolean,sliderColor:String,hideSlider:Boolean,direction:{type:String,default:"horizontal"}},Ee(Ie({selectedClass:"v-tab--selected",variant:"text"}),["active","block","flat","location","position","symbol"])),"VTab"),oe=W()({name:"VTab",props:ct(),setup(e,o){let{slots:t,attrs:n}=o;const{textColorClasses:l,textColorStyles:s}=Xe(e,"sliderColor"),a=I(),f=I(),i=y(()=>e.direction==="horizontal"),u=y(()=>{var x,b,m;return(m=(b=(x=a.value)==null?void 0:x.group)==null?void 0:b.isSelected.value)!=null?m:!1});function C(x){var m,h;let{value:b}=x;if(b){const w=(h=(m=a.value)==null?void 0:m.$el.parentElement)==null?void 0:h.querySelector(".v-tab--selected .v-tab__slider"),B=f.value;if(!w||!B)return;const X=getComputedStyle(w).color,S=w.getBoundingClientRect(),V=B.getBoundingClientRect(),r=i.value?"x":"y",c=i.value?"X":"Y",g=i.value?"right":"bottom",T=i.value?"width":"height",ne=S[r],ae=V[r],P=ne>ae?S[g]-V[g]:S[r]-V[r],se=Math.sign(P)>0?i.value?"right":"bottom":Math.sign(P)<0?i.value?"left":"top":"center",le=(Math.abs(P)+(Math.sign(P)<0?S[T]:V[T]))/Math.max(S[T],V[T])||0,ie=S[T]/V[T]||0,G=1.5;Me(B,{backgroundColor:[X,"currentcolor"],transform:[`translate${c}(${P}px) scale${c}(${ie})`,`translate${c}(${P/G}px) scale${c}(${(le-1)/G+1})`,"none"],transformOrigin:Array(3).fill(se)},{duration:225,easing:Re})}}return H(()=>{const x=M.filterProps(e);return d(M,E({symbol:te,ref:a,class:["v-tab",e.class],style:e.style,tabindex:u.value?0:-1,role:"tab","aria-selected":String(u.value),active:!1},x,n,{block:e.fixed,maxWidth:e.fixed?300:void 0,"onGroup:selected":C}),F(v({},t),{default:()=>{var b,m;return d(D,null,[(m=(b=t.default)==null?void 0:b.call(t))!=null?m:e.text,!e.hideSlider&&d("div",{ref:f,class:["v-tab__slider",l.value],style:s.value},null)])}}))}),Ye({},a)}});function dt(e){return e?e.map(o=>Ge(o)?o:{text:o,value:o}):[]}const vt=R(v(v(v({alignTabs:{type:String,default:"start"},color:String,fixedTabs:Boolean,items:{type:Array,default:()=>[]},stacked:Boolean,bgColor:String,grow:Boolean,height:{type:[Number,String],default:void 0},hideSlider:Boolean,sliderColor:String},We({mandatory:"force"})),He()),J()),"VTabs"),ft=W()({name:"VTabs",props:vt(),emits:{"update:modelValue":e=>!0},setup(e,o){let{slots:t}=o;const n=Ae(e,"modelValue"),l=y(()=>dt(e.items)),{densityClasses:s}=Le(e),{backgroundColorClasses:a,backgroundColorStyles:f}=ze(_(e,"bgColor"));return De({VTab:{color:_(e,"color"),direction:_(e,"direction"),stacked:_(e,"stacked"),fixed:_(e,"fixedTabs"),sliderColor:_(e,"sliderColor"),hideSlider:_(e,"hideSlider")}}),H(()=>{const i=U.filterProps(e);return d(U,E(i,{modelValue:n.value,"onUpdate:modelValue":u=>n.value=u,class:["v-tabs",`v-tabs--${e.direction}`,`v-tabs--align-tabs-${e.alignTabs}`,{"v-tabs--fixed-tabs":e.fixedTabs,"v-tabs--grow":e.grow,"v-tabs--stacked":e.stacked},s.value,a.value,e.class],style:[{"--v-tabs-height":z(e.height)},f.value,e.style],role:"tablist",symbol:te}),{default:()=>[t.default?t.default():l.value.map(u=>d(oe,E(u,{key:u.text}),null))]})}),{}}}),ht={class:"mx-border mt-2"},mt={key:0,class:"w-100 h-100 border-bottom"},bt=je({__name:"index",props:{modelValue:{default:()=>I(0)},items:{},height:{default:340},tabsProps:{},windowProps:{},windowItemProps:{},isTabMinWidthAuto:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:o}){const t=n=>{o("update:modelValue",n)};return(n,l)=>(k(),Y("div",ht,[d(ft,E({"model-value":n.modelValue,"onUpdate:modelValue":t},n.tabsProps),{default:$(()=>[(k(!0),Y(D,null,q(n.items,s=>(k(),A(oe,{key:s.tab,class:"mx-tab","selected-class":"tab-selected",style:Ue(n.isTabMinWidthAuto?"min-width: auto;":"")},{default:$(()=>[Oe(Fe(n.$t(s.tab)),1)]),_:2},1032,["style"]))),128)),!n.tabsProps||!n.tabsProps.grow?(k(),Y("div",mt)):qe("",!0)]),_:1},16,["model-value"]),d(it,E({"model-value":n.modelValue,"onUpdate:modelValue":t},n.windowProps),{default:$(()=>[(k(!0),Y(D,null,q(n.items,s=>(k(),A(rt,E({key:s.tab},n.windowItemProps),{default:$(()=>[d(Ne,{height:n.height},{default:$(()=>[d(Qe,{class:"px-3 py-0"},{default:$(()=>[(k(),A(Je(s.component)))]),_:2},1024)]),_:2},1032,["height"])]),_:2},1040))),128))]),_:1},16,["model-value"])]))}});const Ct=Ke(bt,[["__scopeId","data-v-91e27fd9"]]);export{Ct as M};