index-legacy-ec204863.js 18 KB

12
  1. !function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n,i){return(n=function(t){var n=function(t,n){if("object"!==e(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,n||"default");if("object"!==e(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===e(n)?n:String(n)}(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,a,r,o,l=[],u=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(i=r.call(n)).done)&&(l.push(i.value),l.length!==t);u=!0);}catch(v){c=!0,a=v}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}System.register(["./index-legacy-64376843.js","./use-tab-status-legacy-b3d1a2e2.js"],(function(e,i){"use strict";var a,r,o,l,u,c,v,s,f,d,p,h,g,b,m,y,w,x,S,I,C,k,B,T,z,A,R,O,j,M,E,P,W,X,$,D,L,N,Y,Z,F,H,V,G,K,U,q,Q,_,J,ee,te,ne,ie,ae,re,oe,le,ue;return{setters:[function(e){a=e.aP,r=e.aF,o=e.aQ,l=e.i,u=e.a0,c=e.z,v=e.aR,s=e.l,f=e.aS,d=e.j,p=e.t,h=e.n,g=e.ao,b=e.d,m=e.aD,y=e.O,w=e.E,x=e.aN,S=e.A,I=e.aI,C=e.w,k=e.ak,B=e.g,T=e.aE,z=e.Y,A=e.D,R=e.v,O=e.ay,j=e.K,M=e.aj,E=e.ac,P=e.ap,W=e.aq,X=e.ar,$=e.aT,D=e.o,L=e.aU,N=e.aV,Y=e.y,Z=e.al,F=e.aW,H=e.am,V=e.ai,G=e.aG,K=e.G,U=e.aX,q=e.aY,Q=e.aZ,_=e.m,J=e.p,ee=e.at,te=e.a_,ne=e.ae,ie=e.aK,ae=e.x,re=e.az,oe=e.$,le=e.aA},function(e){ue=e.T}],execute:function(){function i(e,t){if(c&&window.IntersectionObserver){var n=new IntersectionObserver((function(e){t(e[0].intersectionRatio>0)}),{root:document.body}),i=function(){e.value&&n.unobserve(e.value)};v(i),s(i),f((function(){e.value&&n.observe(e.value)}))}}var ce=n(d("sticky"),2),ve=ce[0],se=ce[1],fe={zIndex:p,position:h("top"),container:Object,offsetTop:g(0),offsetBottom:g(0)},de=b({name:ve,props:fe,emits:["scroll","change"],setup:function(e,n){var a=n.emit,o=n.slots,u=l(),c=m(u),v=y({fixed:!1,width:0,height:0,transform:0}),s=w((function(){return x("top"===e.position?e.offsetTop:e.offsetBottom)})),f=w((function(){var e=v.fixed,t=v.height,n=v.width;if(e)return{width:"".concat(n,"px"),height:"".concat(t,"px")}})),d=w((function(){if(v.fixed){var n=S(I(e.zIndex),t({width:"".concat(v.width,"px"),height:"".concat(v.height,"px")},e.position,"".concat(s.value,"px")));return v.transform&&(n.transform="translate3d(0, ".concat(v.transform,"px, 0)")),n}})),p=function(){if(u.value&&!T(u)){var t=e.container,n=e.position,i=z(u),o=r(window);if(v.width=i.width,v.height=i.height,"top"===n)if(t){var l=z(t),c=l.bottom-s.value-v.height;v.fixed=s.value>i.top&&l.bottom>0,v.transform=c<0?c:0}else v.fixed=s.value>i.top;else{var f=document.documentElement.clientHeight;if(t){var d=z(t),p=f-d.top-s.value-v.height;v.fixed=f-s.value<i.bottom&&f>d.top,v.transform=p<0?-p:0}else v.fixed=f-s.value<i.bottom}!function(e){a("scroll",{scrollTop:e,isFixed:v.fixed})}(o)}};return C((function(){return v.fixed}),(function(e){return a("change",e)})),k("scroll",p,{target:c,passive:!0}),i(u,p),function(){var e;return B("div",{ref:u,style:f.value},[B("div",{class:se({fixed:v.fixed}),style:d.value},[null==(e=o.default)?void 0:e.call(o)])])}}}),pe=e("S",A(de)),he=n(d("tab"),2),ge=he[0],be=he[1],me=b({name:ge,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:p,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:R},setup:function(e,t){var n=t.slots,i=w((function(){var t={},n=e.type,i=e.color,a=e.disabled,r=e.isActive,o=e.activeColor,l=e.inactiveColor;i&&"card"===n&&(t.borderColor=i,a||(r?t.backgroundColor=i:t.color=i));var u=r?o:l;return u&&(t.color=u),t}));return function(){return B("div",{id:e.id,role:"tab",class:[be([e.type,{grow:e.scrollable&&!e.shrink,shrink:e.shrink,active:e.isActive,disabled:e.disabled}])],style:i.value,tabindex:e.disabled?void 0:e.isActive?0:-1,"aria-selected":e.isActive,"aria-disabled":e.disabled||void 0,"aria-controls":e.controls},[(t=B("span",{class:be("text",{ellipsis:!e.scrollable})},[n.title?n.title():e.title]),e.dot||O(e.badge)&&""!==e.badge?B(j,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:function(){return[t]}}):t)]);var t}}}),ye=n(d("swipe"),2),we=ye[0],xe=ye[1],Se={loop:R,width:p,height:p,vertical:Boolean,autoplay:g(0),duration:g(500),touchable:R,lazyRender:Boolean,initialSwipe:g(0),indicatorColor:String,showIndicators:R,stopPropagation:R},Ie=Symbol(we),Ce=b({name:we,props:Se,emits:["change","dragStart","dragEnd"],setup:function(e,t){var n,i,a=t.emit,r=t.slots,o=l(),u=l(),c=y({rect:null,width:0,height:0,offset:0,active:0,swiping:!1}),f=!1,d=M(),p=E(Ie),h=p.children,g=p.linkChildren,b=w((function(){return h.length})),m=w((function(){return c[e.vertical?"height":"width"]})),x=w((function(){return e.vertical?d.deltaY.value:d.deltaX.value})),S=w((function(){return c.rect?(e.vertical?c.rect.height:c.rect.width)-m.value*b.value:0})),I=w((function(){return m.value?Math.ceil(Math.abs(S.value)/m.value):b.value})),z=w((function(){return b.value*m.value})),A=w((function(){return(c.active+b.value)%b.value})),R=w((function(){var t=e.vertical?"vertical":"horizontal";return d.direction.value===t})),O=w((function(){var t={transitionDuration:"".concat(c.swiping?0:e.duration,"ms"),transform:"translate".concat(e.vertical?"Y":"X","(").concat(c.offset,"px)")};if(m.value){var n=e.vertical?"height":"width",i=e.vertical?"width":"height";t[n]="".concat(z.value,"px"),t[i]=e[i]?"".concat(e[i],"px"):""}return t})),j=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=t*m.value;e.loop||(i=Math.min(i,-S.value));var a=n-i;return e.loop||(a=H(a,S.value,0)),a},V=function(t){var n=t.pace,i=void 0===n?0:n,r=t.offset,o=void 0===r?0:r,l=t.emitChange;if(!(b.value<=1)){var u=c.active,v=function(t){var n=c.active;return t?e.loop?H(n+t,-1,b.value):H(n+t,0,I.value):n}(i),s=j(v,o);if(e.loop){if(h[0]&&s!==S.value){var f=s<S.value;h[0].setOffset(f?z.value:0)}if(h[b.value-1]&&0!==s){var d=s>0;h[b.value-1].setOffset(d?-z.value:0)}}c.active=v,c.offset=s,l&&v!==u&&a("change",A.value)}},G=function(){c.swiping=!0,c.active<=-1?V({pace:b.value}):c.active>=b.value&&V({pace:-b.value})},K=function(){G(),d.reset(),F((function(){c.swiping=!1,V({pace:1,emitChange:!0})}))},U=function(){return clearTimeout(n)},q=function t(){U(),+e.autoplay>0&&b.value>1&&(n=setTimeout((function(){K(),t()}),+e.autoplay))},Q=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:+e.initialSwipe;if(o.value){var n=function(){var n,i;if(!T(o)){var a={width:o.value.offsetWidth,height:o.value.offsetHeight};c.rect=a,c.width=+(null!=(n=e.width)?n:a.width),c.height=+(null!=(i=e.height)?i:a.height)}b.value&&-1===(t=Math.min(b.value-1,t))&&(t=b.value-1),c.active=t,c.swiping=!0,c.offset=j(t),h.forEach((function(e){e.setOffset(0)})),q()};T(o)?Y().then(n):n()}},_=function(){return Q(c.active)},J=function(t){!e.touchable||t.touches.length>1||(d.start(t),f=!1,i=Date.now(),U(),G())},ee=function(){if(e.touchable&&c.swiping){var t=Date.now()-i,n=x.value/t;if((Math.abs(n)>.25||Math.abs(x.value)>m.value/2)&&R.value){var r=e.vertical?d.offsetY.value:d.offsetX.value,o=0;o=e.loop?r>0?x.value>0?-1:1:0:-Math[x.value>0?"ceil":"floor"](x.value/m.value),V({pace:o,emitChange:!0})}else x.value&&V({pace:0});f=!1,c.swiping=!1,a("dragEnd",{index:A.value}),q()}},te=function(t,n){var i=n===A.value,a=i?{backgroundColor:e.indicatorColor}:void 0;return B("i",{style:a,class:xe("indicator",{active:i})},null)};return P({prev:function(){G(),d.reset(),F((function(){c.swiping=!1,V({pace:-1,emitChange:!0})}))},next:K,state:c,resize:_,swipeTo:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};G(),d.reset(),F((function(){var i;i=e.loop&&t===b.value?0===c.active?0:t:t%b.value,n.immediate?F((function(){c.swiping=!1})):c.swiping=!1,V({pace:i-c.active,emitChange:!0})}))}}),g({size:m,props:e,count:b,activeIndicator:A}),C((function(){return e.initialSwipe}),(function(e){return Q(+e)})),C(b,(function(){return Q(c.active)})),C((function(){return e.autoplay}),q),C([W,X,function(){return e.width},function(){return e.height}],_),C($(),(function(e){"visible"===e?q():U()})),D(Q),L((function(){return Q(c.active)})),N((function(){return Q(c.active)})),v(U),s(U),k("touchmove",(function(t){e.touchable&&c.swiping&&(d.move(t),R.value&&(!e.loop&&(0===c.active&&x.value>0||c.active===b.value-1&&x.value<0)||(Z(t,e.stopPropagation),V({offset:x.value}),f||(a("dragStart",{index:A.value}),f=!0))))}),{target:u}),function(){var t;return B("div",{ref:o,class:xe()},[B("div",{ref:u,style:O.value,class:xe("track",{vertical:e.vertical}),onTouchstartPassive:J,onTouchend:ee,onTouchcancel:ee},[null==(t=r.default)?void 0:t.call(r)]),r.indicator?r.indicator({active:A.value,total:b.value}):e.showIndicators&&b.value>1?B("div",{class:xe("indicators",{vertical:e.vertical})},[Array(b.value).fill("").map(te)]):void 0])}}}),ke=e("b",A(Ce)),Be=n(d("tabs"),2),Te=Be[0],ze=Be[1],Ae=b({name:Te,props:{count:V(Number),inited:Boolean,animated:Boolean,duration:V(p),swipeable:Boolean,lazyRender:Boolean,currentIndex:V(Number)},emits:["change"],setup:function(e,t){var n=t.emit,i=t.slots,a=l(),r=function(e){return n("change",e)},o=function(t){var n=a.value;n&&n.state.active!==t&&n.swipeTo(t,{immediate:!e.inited})};return C((function(){return e.currentIndex}),o),D((function(){o(e.currentIndex)})),P({swipeRef:a}),function(){return B("div",{class:ze("content",{animated:e.animated||e.swipeable})},[(n=null==(t=i.default)?void 0:t.call(i),e.animated||e.swipeable?B(ke,{ref:a,loop:!1,class:ze("track"),duration:1e3*+e.duration,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:r},{default:function(){return[n]}}):n)]);var t,n}}}),Re=n(d("tabs"),2),Oe=Re[0],je=Re[1],Me={type:h("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:g(0),duration:g(.3),animated:Boolean,ellipsis:R,swipeable:Boolean,scrollspy:Boolean,offsetTop:g(0),background:String,lazyRender:R,lineWidth:p,lineHeight:p,beforeChange:Function,swipeThreshold:g(5),titleActiveColor:String,titleInactiveColor:String},Ee=Symbol(Oe),Pe=b({name:Oe,props:Me,emits:["change","scroll","rendered","clickTab","update:active"],setup:function(e,c){var v,s,d,p,h,g=c.emit,b=c.slots,S=l(),I=l(),A=l(),R=l(),j=G(),M=m(S),X=n((p=l([]),h=[],u((function(){p.value=[]})),[p,function(e){return h[e]||(h[e]=function(t){p.value[e]=t}),h[e]}]),2),$=X[0],D=X[1],Z=E(Ee),F=Z.children,H=Z.linkChildren,V=y({inited:!1,position:"",lineStyle:{},currentIndex:-1}),ne=w((function(){return F.length>+e.swipeThreshold||!e.ellipsis||e.shrink})),ie=w((function(){return{borderColor:e.color,background:e.background}})),ae=function(e,t){var n;return null!=(n=e.name)?n:t},re=w((function(){var e=F[V.currentIndex];if(e)return ae(e,V.currentIndex)})),oe=w((function(){return x(e.offsetTop)})),le=w((function(){return e.sticky?oe.value+v:0})),ue=function(t){var n=I.value,i=$.value;if(ne.value&&n&&i&&i[V.currentIndex]){var r=i[V.currentIndex].$el;!function(e,t,n){var i=0,r=e.scrollLeft,o=0===n?1:Math.round(1e3*n/16);!function n(){e.scrollLeft+=(t-r)/o,++i<o&&a(n)}()}(n,r.offsetLeft-(n.offsetWidth-r.offsetWidth)/2,t?0:+e.duration)}},ce=function(){var t=V.inited;Y((function(){var n=$.value;if(n&&n[V.currentIndex]&&"line"===e.type&&!T(S.value)){var i=n[V.currentIndex].$el,a=e.lineWidth,r=e.lineHeight,o=i.offsetLeft+i.offsetWidth/2,l={width:K(a),backgroundColor:e.color,transform:"translateX(".concat(o,"px) translateX(-50%)")};if(t&&(l.transitionDuration="".concat(e.duration,"s")),O(r)){var u=K(r);l.height=u,l.borderRadius=u}V.lineStyle=l}}))},ve=function(t,n){var i=function(e){for(var t=e<V.currentIndex?-1:1;e>=0&&e<F.length;){if(!F[e].disabled)return e;e+=t}}(t);if(O(i)){var a=F[i],r=ae(a,i),o=null!==V.currentIndex;V.currentIndex!==i&&(V.currentIndex=i,n||ue(),ce()),r!==e.active&&(g("update:active",r),o&&g("change",r,a.title)),d&&!e.scrollspy&&q(Math.ceil(Q(S.value)-oe.value))}},se=function(e,t){var n=F.find((function(t,n){return ae(t,n)===e})),i=n?F.indexOf(n):0;ve(i,t)},fe=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e.scrollspy){var n=F[V.currentIndex].$el;if(n&&M.value){var i=Q(n,M.value)-le.value;s=!0,function(e,t,n,i){var l=r(e),u=l<t,c=0===n?1:Math.round(1e3*n/16),v=(t-l)/c;!function n(){l+=v,(u&&l>t||!u&&l<t)&&(l=t),o(e,l),u&&l<t||!u&&l>t?a(n):i&&a(i)}()}(M.value,i,t?0:+e.duration,(function(){s=!1}))}}},de=function(e){d=e.isFixed,g("scroll",e)},he=function(){return F.map((function(t,n){return B(me,_({key:t.id,id:"".concat(j,"-").concat(n),ref:D(n),type:e.type,color:e.color,style:t.titleStyle,class:t.titleClass,shrink:e.shrink,isActive:n===V.currentIndex,controls:t.id,scrollable:ne.value,activeColor:e.titleActiveColor,inactiveColor:e.titleInactiveColor,onClick:function(i){return function(t,n,i){var a=F[n],r=a.title,o=a.disabled,l=ae(F[n],n);o||(ee(e.beforeChange,{args:[l],done:function(){ve(n),fe()}}),te(t)),g("clickTab",{name:l,title:r,event:i,disabled:o})}(t,n,i)}},J(t,["dot","badge","title","disabled","showZeroBadge"])),{title:t.$slots.title})}))},ge=function(){if("line"===e.type&&F.length)return B("div",{class:je("line"),style:V.lineStyle},null)},be=function(){var n,i,a,r=e.type,o=e.border,l=e.sticky,u=[B("div",{ref:l?void 0:A,class:[je("wrap"),t({},U,"line"===r&&o)]},[B("div",{ref:I,role:"tablist",class:je("nav",[r,{shrink:e.shrink,complete:ne.value}]),style:ie.value,"aria-orientation":"horizontal"},[null==(n=b["nav-left"])?void 0:n.call(b),he(),ge(),null==(i=b["nav-right"])?void 0:i.call(b)])]),null==(a=b["nav-bottom"])?void 0:a.call(b)];return l?B("div",{ref:A},[u]):u};C([function(){return e.color},W],ce),C((function(){return e.active}),(function(e){e!==re.value&&se(e)})),C((function(){return F.length}),(function(){V.inited&&(se(e.active),ce(),Y((function(){ue(!0)})))}));return P({resize:function(){ce(),Y((function(){var e,t;return null==(t=null==(e=R.value)?void 0:e.swipeRef.value)?void 0:t.resize()}))},scrollTo:function(e){Y((function(){se(e),fe(!0)}))}}),L(ce),N(ce),f((function(){se(e.active,!0),Y((function(){V.inited=!0,A.value&&(v=z(A.value).height),ue(!0)}))})),i(S,ce),k("scroll",(function(){if(e.scrollspy&&!s){var t=function(){for(var e=0;e<F.length;e++)if(z(F[e].$el).top>le.value)return 0===e?0:e-1;return F.length-1}();ve(t)}}),{target:M,passive:!0}),H({id:j,props:e,setLine:ce,onRendered:function(e,t){return g("rendered",e,t)},currentName:re,scrollIntoView:ue}),function(){return B("div",{ref:S,class:je([e.type])},[e.sticky?B(pe,{container:S.value,offsetTop:oe.value,onScroll:de},{default:function(){return[be()]}}):be(),B(Ae,{ref:R,count:F.length,inited:V.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:V.currentIndex,onChange:ve},{default:function(){var e;return[null==(e=b.default)?void 0:e.call(b)]}})])}}}),We=n(d("swipe-item"),2),Xe=We[0],$e=We[1],De=b({name:Xe,setup:function(e,t){var n,i=t.slots,a=y({offset:0,inited:!1,mounted:!1}),r=ne(Ie),o=r.parent,l=r.index;if(o){var u=w((function(){var e={},t=o.props.vertical;return o.size.value&&(e[t?"height":"width"]="".concat(o.size.value,"px")),a.offset&&(e.transform="translate".concat(t?"Y":"X","(").concat(a.offset,"px)")),e})),c=w((function(){var e=o.props,t=e.loop;if(!e.lazyRender||n)return!0;if(!a.mounted)return!1;var i=o.activeIndicator.value,r=o.count.value-1,u=0===i&&t?r:i-1,c=i===r&&t?0:i+1;return n=l.value===i||l.value===u||l.value===c}));return D((function(){Y((function(){a.mounted=!0}))})),P({setOffset:function(e){a.offset=e}}),function(){var e;return B("div",{class:$e(),style:u.value},[c.value?null==(e=i.default)?void 0:e.call(i):null])}}}}),Le=e("c",A(De)),Ne=n(d("tab"),2),Ye=Ne[0],Ze=Ne[1],Fe=S({},ie,{dot:Boolean,name:p,badge:p,title:String,disabled:Boolean,titleClass:ae,titleStyle:[String,Object],showZeroBadge:R}),He=b({name:Ye,props:Fe,setup:function(e,t){var n=t.slots,i=G(),a=l(!1),r=ne(Ee),o=r.parent,u=r.index;if(o){var c=function(){var t;return null!=(t=e.name)?t:u.value},v=w((function(){var t=c()===o.currentName.value;return t&&!a.value&&(a.value=!0,o.props.lazyRender&&Y((function(){o.onRendered(c(),e.title)}))),t})),s=l(!v.value);return C(v,(function(e){e?s.value=!1:F((function(){s.value=!0}))})),C((function(){return e.title}),(function(){o.setLine(),o.scrollIntoView()})),oe(ue,v),function(){var e,t="".concat(o.id,"-").concat(u.value),r=o.props,l=r.animated,c=r.swipeable,f=r.scrollspy,d=r.lazyRender;if(n.default||l){var p=f||v.value;if(l||c)return B(Le,{id:i,role:"tabpanel",class:Ze("panel-wrapper",{inactive:s.value}),tabindex:v.value?0:-1,"aria-hidden":!v.value,"aria-labelledby":t},{default:function(){var e;return[B("div",{class:Ze("panel")},[null==(e=n.default)?void 0:e.call(n)])]}});var h=a.value||f||!d?null==(e=n.default)?void 0:e.call(n):null;return P({id:i}),re(B("div",{id:i,role:"tabpanel",class:Ze("panel"),tabindex:p?0:-1,"aria-labelledby":t},[h]),[[le,p]])}}}}});e("a",A(He)),e("T",A(Pe))}}}))}();