@calibur/sakura
Advanced tools
Comparing version 2.5.0 to 2.5.1
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):"object"==typeof exports?exports["@calibur/sakura"]=t(require("vue")):e["@calibur/sakura"]=t(e.Vue)}(this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=30)}({30:function(e,t,n){"use strict";n.r(t);var r=n(8),o=n.n(r);n(59);t.default={name:"VLink",extends:o.a.component("RouterLink"),props:{prefetch:{type:Boolean,default:!0},noPrefetch:{type:Boolean,default:!1}},computed:{observer:function(){return"undefined"==typeof window?null:window.IntersectionObserver&&new window.IntersectionObserver((function(e){e.forEach((function(e){var t=e.intersectionRatio,n=e.target;t<=0||n.__prefetch()}))}))}},mounted:function(){this.prefetch&&!this.noPrefetch&&window.requestIdleCallback&&(this.handleId=window.requestIdleCallback(this.observe,{timeout:2e3}))},beforeDestroy:function(){window.cancelIdleCallback&&(window.cancelIdleCallback(this.handleId),this.__observed&&(this.observer.unobserve(this.$el),delete this.$el.__prefetch))},methods:{observe:function(){this.observer&&this.shouldPrefetch()&&(this.$el.__prefetch=this.prefetchLink.bind(this),this.observer.observe(this.$el),this.__observed=!0)},shouldPrefetch:function(){return this.getPrefetchComponents().length>0},canPrefetch:function(){var e=window.navigator.connection;return!(!window.navigator.onLine||e&&((e.effectiveType||"").includes("2g")||e.saveData))},getPrefetchComponents:function(){return this.$router.resolve(this.to,this.$route,this.append).resolved.matched.map((function(e){return e.components.default})).filter((function(e){return"function"==typeof e&&!e.options&&!e.__prefetched}))},prefetchLink:function(){if(this.canPrefetch()){this.observer.unobserve(this.$el);var e=this.getPrefetchComponents(),t=!0,n=!1,r=void 0;try{for(var o,i=e[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var u=o.value,c=u();c instanceof Promise&&c.catch((function(){})),u.__prefetched=!0}}catch(f){n=!0,r=f}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}}}}},59:function(e,t,n){},8:function(t,n){t.exports=e}})})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):"object"==typeof exports?exports["@calibur/sakura"]=t(require("vue")):e["@calibur/sakura"]=t(e.Vue)}(this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=30)}({30:function(e,t,n){"use strict";n.r(t);var r=n(8),o=n.n(r);n(59);function i(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return u(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,i=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw o}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.default={name:"VLink",extends:o.a.component("RouterLink"),props:{prefetch:{type:Boolean,default:!0},noPrefetch:{type:Boolean,default:!1}},computed:{observer:function(){return"undefined"==typeof window?null:window.IntersectionObserver&&new window.IntersectionObserver((function(e){e.forEach((function(e){var t=e.intersectionRatio,n=e.target;t<=0||n.__prefetch()}))}))}},mounted:function(){this.prefetch&&!this.noPrefetch&&window.requestIdleCallback&&(this.handleId=window.requestIdleCallback(this.observe,{timeout:2e3}))},beforeDestroy:function(){window.cancelIdleCallback&&(window.cancelIdleCallback(this.handleId),this.__observed&&(this.observer.unobserve(this.$el),delete this.$el.__prefetch))},methods:{observe:function(){this.observer&&this.shouldPrefetch()&&(this.$el.__prefetch=this.prefetchLink.bind(this),this.observer.observe(this.$el),this.__observed=!0)},shouldPrefetch:function(){return this.getPrefetchComponents().length>0},canPrefetch:function(){var e=window.navigator.connection;return!(!window.navigator.onLine||e&&((e.effectiveType||"").includes("2g")||e.saveData))},getPrefetchComponents:function(){return this.$router.resolve(this.to,this.$route,this.append).resolved.matched.map((function(e){return e.components.default})).filter((function(e){return"function"==typeof e&&!e.options&&!e.__prefetched}))},prefetchLink:function(){if(this.canPrefetch()){this.observer.unobserve(this.$el);var e,t=i(this.getPrefetchComponents());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=n();r instanceof Promise&&r.catch((function(){})),n.__prefetched=!0}}catch(o){t.e(o)}finally{t.f()}}}}}},59:function(e,t,n){},8:function(t,n){t.exports=e}})})); |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=47)}({0:function(t,e,i){"use strict";function n(t,e,i,n,s,a,o,r){var h,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=i,l._compiled=!0),n&&(l.functional=!0),a&&(l._scopeId="data-v-"+a),o?(h=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=h):s&&(h=r?function(){s.call(this,this.$root.$options.shadowRoot)}:s),h)if(l.functional){l._injectStyles=h;var u=l.render;l.render=function(t,e){return h.call(e),u(t,e)}}else{var c=l.beforeCreate;l.beforeCreate=c?[].concat(c,h):[h]}return{exports:t,options:l}}i.d(e,"a",(function(){return n}))},12:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i(4);function s(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function o(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var r=function(){function t(e){var i=this;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.wrap=e.wrap,this.loop=e.loop,this.index=e.index,this.animated=e.animated,this.duration=e.duration,this.callback=e.callback,this._calcCssPrefix(),this._setupConst(),this.loop?setTimeout((function(){i._useAnimate(),i._cloneShadow(),i._bindEvents()}),0):(this._useAnimate(),this._cloneShadow(),this._bindEvents()),this}var e,i,a;return e=t,(i=[{key:"slide",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t===this.index||this.move||(this._lockEvent(1.2),this._animateSlide(t,this.index,e))}},{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.slides.length;1===e||this.touching||this.move||this.index===e-1&&!this.loop||t&&Date.now()-this.lastNextAt<t||this.slide(this.index+1,!0)}},{key:"destroy",value:function(){var t=this.el,e=this.events;t&&(t.removeEventListener("touchstart",e.touchstart,{passive:!0}),t.removeEventListener("touchmove",e.touchmove,{passive:!0}),t.removeEventListener("touchend",e.touchend,{passive:!0}))}},{key:"_updateEvents",value:function(t){this.destroy(),this.el=this.slides[t],this.index=t,this.events={},this._bindEvents()}},{key:"_setupConst",value:function(){this.slides=s(this.wrap.children),this.startAt=0,this.lastNextAt=0,this.move=!1,this.touching=!1,this.isMoveSlide=!1,this.maxDeltaPoint={x:0,y:0},this.deltaPoint={x:0,y:0},this.el=this.slides[this.index],this.events={}}},{key:"_cloneShadow",value:function(){var t=this.slides,e=this.index,i=this.offsetWidth;if(this.loop&&1!==t.length){var n=t[t.length-1].cloneNode(!0),s=t[0].cloneNode(!0);this.wrap.appendChild(n),this.wrap.appendChild(s),n.style.transform="translateX(".concat((-1-e)*i,"px)"),s.style.transform="translateX(".concat((t.length-e)*i,"px)"),this.beforeShadow=n,this.afterShadow=s}}},{key:"_useAnimate",value:function(){var t=this,e=this.wrap,i=e.offsetWidth;if(i||setTimeout((function(){t._useAnimate()}),100),this.offsetWidth=i,this.animated){var n=this.slides,s=this.index,a=n.length;e.style.width="".concat(100*a,"%");var o="".concat(100/a,"%");[].forEach.call(n,(function(t,e){t.style.width=o,t.style.transform="translateX(".concat((e-s)*i,"px)")})),e.style.visibility="visible"}else e.style.visibility="visible"}},{key:"_bindEvents",value:function(){if(1!==this.slides.length){var t=this.el,e=this.events;t&&(e.touchstart=this._start.bind(this),e.touchmove=this._move.bind(this),e.touchend=this._end.bind(this),t.addEventListener("touchstart",e.touchstart,{passive:!0}),t.addEventListener("touchmove",e.touchmove,{passive:!0}),t.addEventListener("touchend",e.touchend,{passive:!0}))}}},{key:"_start",value:function(t){this.touching=!0;var e=t.touches[0];this.startPoint={x:e.pageX,y:e.pageY},this.startAt=+new Date}},{key:"_move",value:function(t){var e=t.touches[0],i=this.startPoint,n=this.maxDeltaPoint,s={x:e.pageX-i.x,y:e.pageY-i.y};if(this.maxDeltaPoint={x:Math.max(n.x,Math.abs(s.x)),y:Math.max(n.y,Math.abs(s.y))},this.deltaPoint=s,this.isMoveSlide=!0,this._lockedSwipeEvents(),!this._isVerticalScroll(this.maxDeltaPoint)&&this.animated&&!this._isEnded(s)){var a=s.x,o=a>0,r=this.slides,h=this.index,l=this.offsetWidth;this._translate(r[h],a),o?this._translate(r[h-1],a-l):this._translate(r[h+1],l+a),this._loopAdjust(o,h,a)}}},{key:"_end",value:function(){if(this.touching=!1,this.startAt&&this.isMoveSlide){this.isMoveSlide=!1,this._unlockSwipeEvents();var t=this.maxDeltaPoint,e=this.deltaPoint,i=this.offsetWidth,n=e.x>0;if(this.maxDeltaPoint={x:0,y:0},this._isVerticalScroll(t)||this._isEnded(e)||!this._isValidSlide(e)){if(!this.animated)return;var s=this.slides,a=this.index,o=this.duration;return this._translate(s[a],0,o),n?(this._translate(s[a-1],-i,o),this._translate(s[a+1],i)):(this._translate(s[a+1],i,o),this._translate(s[a-1],-i)),this.loop&&(n&&0===a?this._translate(this.beforeShadow,-i,o):n||a!==s.length-1||this._translate(this.afterShadow,i,o)),void this._lockEvent()}var r=n?this.index-1:this.index+1;if(this.animated){var h=this.slides,l=this.index,u=this.duration;this._translate(h[l],n?i:-i,u),this._translate(h[l-1],n?0:-i,n?u:0),this._translate(h[l+1],n?i:0,n?0:u),this.loop&&(r=this._loopJump(n,l,r))}this.callback&&this.callback(r),this._updateEvents(r),this._lockEvent()}}},{key:"_animateSlide",value:function(t,e,i){var n=this;if(this.animated){var s=this.offsetWidth,a=this.slides,o=this.duration,r=t<e;this._loopAdjust(r,t),this._translate(a[t],r?-s:s);var h=t;setTimeout((function(){n._translate(a[t],0,o),n._translate(a[e],r?s:-s,o),e!==t+1&&n._translate(a[t+1],s),e!==t-1&&n._translate(a[t-1],-s),n.loop&&(h=n._loopJump(r,e,t)),n._updateEvents(h),i&&setTimeout((function(){n.callback&&n.callback(h)}),n.duration)}),0)}}},{key:"_loopJump",value:function(t,e,i){var n,s=this.slides,a=this.duration,o=this.offsetWidth;return t&&0===e?(n=s.length-1,this._translate(this.beforeShadow,0,a),this._translate(this.afterShadow,o),this._loopReset(!0)):t||e!==s.length-1?n=i:(n=0,this._translate(this.afterShadow,0,a),this._translate(this.beforeShadow,-o),this._loopReset(!1)),n}},{key:"_loopAdjust",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this.loop){var n=this.offsetWidth,s=this.slides;t&&0===e?this._translate(this.beforeShadow,i-n):t||e!==s.length-1||this._translate(this.afterShadow,n+i)}}},{key:"_loopReset",value:function(t){var e=this,i=this.offsetWidth,n=this.slides;setTimeout((function(){t?(e._translate(n[n.length-1],0,0),e._translate(n[n.length-2],-i,0),e._translate(e.beforeShadow,i,0)):(e._translate(n[0],0,0),e._translate(n[1],i,0),e._translate(e.afterShadow,-i,0))}),this.duration)}},{key:"_lockEvent",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.lastNextAt=Date.now(),this.move=!0,setTimeout((function(){t.move=!1}),this.duration*e)}},{key:"_lockedSwipeEvents",value:function(){this.animated&&(this.el.style["touch-action"]="none")}},{key:"_unlockSwipeEvents",value:function(){this.animated&&(this.el.style["touch-action"]="auto")}},{key:"_isVerticalScroll",value:function(t){return Math.abs(t.x)<1.5*Math.abs(t.y)}},{key:"_isValidSlide",value:function(t){var e=Math.abs(t.x),i=Number(+new Date-this.startAt)<250&&e>20||e>this.offsetWidth/2;return this.startAt=0,i}},{key:"_translate",value:function(t,e){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t&&(t.style["".concat(this.cssPrefix,"transition-duration")]=n?"".concat(n,"ms"):"",requestAnimationFrame((function(){t.style["".concat(i.cssPrefix,"transform")]="translateX(".concat(e,"px)")})))}},{key:"_isEnded",value:function(t){if(this.loop)return!1;var e=t.x>0;return e&&0===this.index||!e&&this.index===this.slides.length-1}},{key:"_calcCssPrefix",value:function(){this.animated&&(this.cssPrefix=Object(n.c)())}}])&&o(e.prototype,i),a&&o(e,a),t}()},4:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"a",(function(){return s})),i.d(e,"c",(function(){return a}));var n=function(){if("undefined"!=typeof window)return document.addEventListener?function(t,e,i){t&&e&&i&&t.addEventListener(e,i,!1)}:function(t,e,i){t&&e&&i&&t.attachEvent("on"+e,i)}}(),s=function(){if("undefined"!=typeof window)return document.removeEventListener?function(t,e,i){t&&e&&t.removeEventListener(e,i,!1)}:function(t,e,i){t&&e&&t.detachEvent("on"+e,i)}}(),a=function(){var t="",e=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/,i=document.getElementsByTagName("script")[0].style;for(var n in i)e.test(n)&&(t="-"+n.match(e)[0].toLowerCase()+"-");return!t&&"WebkitOpacity"in i&&(t="-webkit-"),!t&&"KhtmlOpacity"in i&&(t="-khtml-"),t}},47:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.length?i("div",{staticClass:"v-swipe",on:{touchstart:function(t){t.stopPropagation()},touchmove:function(t){t.stopPropagation()},touchend:function(t){t.stopPropagation()}}},[i("div",{ref:"wrap",staticClass:"v-swipe__wrap"},t._l(t.length,(function(e,n){return i("div",{key:e,staticClass:"v-swipe__item"},[t._t(""+n)],2)})),0),t._v(" "),t.length>1&&t.indicator?i("div",{staticClass:"v-swipe__indicator"},t._l(t.length,(function(e,n){return i("div",{key:e,staticClass:"v-swipe__indicator__item",class:{"is-active":n===t.active}})})),0):t._e()]):t._e()};n._withStripped=!0;i(67);var s=i(12),a={name:"VSwipe",props:{duration:{type:Number,default:500},autoplay:{type:Number,default:2e3},index:{type:Number,default:0},length:{type:Number,default:0},indicator:{type:Boolean,default:!0}},data:function(){return{active:this.index,timer:0,slider:null,stats:[this.index]}},mounted:function(){this.init()},beforeDestroy:function(){clearInterval(this.timer),this.slider&&this.slider.destroy()},methods:{init:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=this.$refs.wrap;if(i&&i.children)this.slider=new s.a({wrap:i,loop:!0,index:this.active,animated:!0,duration:this.duration,callback:function(e){t.active=e,t.$emit("change",e),~t.stats.indexOf(e)||(t.stats.push(e),t.$emit("report",e))}}),this.play(),this.$emit("change",this.active),this.$emit("report",this.active);else{if(e>20)return;setTimeout((function(){t.init(e+1)}),100)}},play:function(){var t=this;this.autoplay&&(this.timer=setInterval((function(){t.slider.offsetWidth&&t.slider.next(t.autoplay)}),this.autoplay))}}},o=i(0),r=Object(o.a)(a,n,[],!1,null,null,null);r.options.__file="src/components/swipe/swipe.vue";var h=r.exports;e.default=h},67:function(t,e,i){}})})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=47)}({0:function(t,e,i){"use strict";function n(t,e,i,n,s,a,o,r){var h,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=i,l._compiled=!0),n&&(l.functional=!0),a&&(l._scopeId="data-v-"+a),o?(h=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=h):s&&(h=r?function(){s.call(this,this.$root.$options.shadowRoot)}:s),h)if(l.functional){l._injectStyles=h;var u=l.render;l.render=function(t,e){return h.call(e),u(t,e)}}else{var c=l.beforeCreate;l.beforeCreate=c?[].concat(c,h):[h]}return{exports:t,options:l}}i.d(e,"a",(function(){return n}))},12:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i(4);function s(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function o(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var r=function(){function t(e){var i=this;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.wrap=e.wrap,this.loop=e.loop,this.index=e.index,this.animated=e.animated,this.duration=e.duration,this.callback=e.callback,this._calcCssPrefix(),this._setupConst(),this.loop?setTimeout((function(){i._useAnimate(),i._cloneShadow(),i._bindEvents()}),0):(this._useAnimate(),this._cloneShadow(),this._bindEvents()),this}var e,i,a;return e=t,(i=[{key:"slide",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t===this.index||this.move||(this._lockEvent(1.2),this._animateSlide(t,this.index,e))}},{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.slides.length;1===e||this.touching||this.move||this.index===e-1&&!this.loop||t&&Date.now()-this.lastNextAt<t||this.slide(this.index+1,!0)}},{key:"destroy",value:function(){var t=this.el,e=this.events;t&&(t.removeEventListener("touchstart",e.touchstart,{passive:!0}),t.removeEventListener("touchmove",e.touchmove,{passive:!0}),t.removeEventListener("touchend",e.touchend,{passive:!0}))}},{key:"_updateEvents",value:function(t){this.destroy(),this.el=this.slides[t],this.index=t,this.events={},this._bindEvents()}},{key:"_setupConst",value:function(){this.slides=s(this.wrap.children),this.startAt=0,this.lastNextAt=0,this.move=!1,this.touching=!1,this.isMoveSlide=!1,this.maxDeltaPoint={x:0,y:0},this.deltaPoint={x:0,y:0},this.el=this.slides[this.index],this.events={}}},{key:"_cloneShadow",value:function(){var t=this.slides,e=this.index,i=this.offsetWidth;if(this.loop&&1!==t.length){var n=t[t.length-1].cloneNode(!0),s=t[0].cloneNode(!0);this.wrap.appendChild(n),this.wrap.appendChild(s),n.style.transform="translateX(".concat((-1-e)*i,"px)"),s.style.transform="translateX(".concat((t.length-e)*i,"px)"),this.beforeShadow=n,this.afterShadow=s}}},{key:"_useAnimate",value:function(){var t=this,e=this.wrap,i=e.offsetWidth;if(i||setTimeout((function(){t._useAnimate()}),100),this.offsetWidth=i,this.animated){var n=this.slides,s=this.index;[].forEach.call(n,(function(t,e){t.style.transform="translateX(".concat((e-s)*i,"px)")})),e.style.visibility="visible"}else e.style.visibility="visible"}},{key:"_bindEvents",value:function(){if(1!==this.slides.length){var t=this.el,e=this.events;t&&(e.touchstart=this._start.bind(this),e.touchmove=this._move.bind(this),e.touchend=this._end.bind(this),t.addEventListener("touchstart",e.touchstart,{passive:!0}),t.addEventListener("touchmove",e.touchmove,{passive:!0}),t.addEventListener("touchend",e.touchend,{passive:!0}))}}},{key:"_start",value:function(t){this.touching=!0;var e=t.touches[0];this.startPoint={x:e.pageX,y:e.pageY},this.startAt=+new Date}},{key:"_move",value:function(t){var e=t.touches[0],i=this.startPoint,n=this.maxDeltaPoint,s={x:e.pageX-i.x,y:e.pageY-i.y};if(this.maxDeltaPoint={x:Math.max(n.x,Math.abs(s.x)),y:Math.max(n.y,Math.abs(s.y))},this.deltaPoint=s,this.isMoveSlide=!0,this._lockedSwipeEvents(),!this._isVerticalScroll(this.maxDeltaPoint)&&this.animated&&!this._isEnded(s)){var a=s.x,o=a>0,r=this.slides,h=this.index,l=this.offsetWidth;this._translate(r[h],a),o?this._translate(r[h-1],a-l):this._translate(r[h+1],l+a),this._loopAdjust(o,h,a)}}},{key:"_end",value:function(){if(this.touching=!1,this.startAt&&this.isMoveSlide){this.isMoveSlide=!1,this._unlockSwipeEvents();var t=this.maxDeltaPoint,e=this.deltaPoint,i=this.offsetWidth,n=e.x>0;if(this.maxDeltaPoint={x:0,y:0},this._isVerticalScroll(t)||this._isEnded(e)||!this._isValidSlide(e)){if(!this.animated)return;var s=this.slides,a=this.index,o=this.duration;return this._translate(s[a],0,o),n?(this._translate(s[a-1],-i,o),this._translate(s[a+1],i)):(this._translate(s[a+1],i,o),this._translate(s[a-1],-i)),this.loop&&(n&&0===a?this._translate(this.beforeShadow,-i,o):n||a!==s.length-1||this._translate(this.afterShadow,i,o)),void this._lockEvent()}var r=n?this.index-1:this.index+1;if(this.animated){var h=this.slides,l=this.index,u=this.duration;this._translate(h[l],n?i:-i,u),this._translate(h[l-1],n?0:-i,n?u:0),this._translate(h[l+1],n?i:0,n?0:u),this.loop&&(r=this._loopJump(n,l,r))}this.callback&&this.callback(r),this._updateEvents(r),this._lockEvent()}}},{key:"_animateSlide",value:function(t,e,i){var n=this;if(this.animated){var s=this.offsetWidth,a=this.slides,o=this.duration,r=t<e;this._loopAdjust(r,t),this._translate(a[t],r?-s:s);var h=t;setTimeout((function(){n._translate(a[t],0,o),n._translate(a[e],r?s:-s,o),e!==t+1&&n._translate(a[t+1],s),e!==t-1&&n._translate(a[t-1],-s),n.loop&&(h=n._loopJump(r,e,t)),n._updateEvents(h),i&&setTimeout((function(){n.callback&&n.callback(h)}),n.duration)}),0)}}},{key:"_loopJump",value:function(t,e,i){var n,s=this.slides,a=this.duration,o=this.offsetWidth;return t&&0===e?(n=s.length-1,this._translate(this.beforeShadow,0,a),this._translate(this.afterShadow,o),this._loopReset(!0)):t||e!==s.length-1?n=i:(n=0,this._translate(this.afterShadow,0,a),this._translate(this.beforeShadow,-o),this._loopReset(!1)),n}},{key:"_loopAdjust",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this.loop){var n=this.offsetWidth,s=this.slides;t&&0===e?this._translate(this.beforeShadow,i-n):t||e!==s.length-1||this._translate(this.afterShadow,n+i)}}},{key:"_loopReset",value:function(t){var e=this,i=this.offsetWidth,n=this.slides;setTimeout((function(){t?(e._translate(n[n.length-1],0,0),e._translate(n[n.length-2],-i,0),e._translate(e.beforeShadow,i,0)):(e._translate(n[0],0,0),e._translate(n[1],i,0),e._translate(e.afterShadow,-i,0))}),this.duration)}},{key:"_lockEvent",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.lastNextAt=Date.now(),this.move=!0,setTimeout((function(){t.move=!1}),this.duration*e)}},{key:"_lockedSwipeEvents",value:function(){this.animated&&(this.el.style["touch-action"]="none")}},{key:"_unlockSwipeEvents",value:function(){this.animated&&(this.el.style["touch-action"]="auto")}},{key:"_isVerticalScroll",value:function(t){return Math.abs(t.x)<1.5*Math.abs(t.y)}},{key:"_isValidSlide",value:function(t){var e=Math.abs(t.x),i=Number(+new Date-this.startAt)<250&&e>20||e>this.offsetWidth/2;return this.startAt=0,i}},{key:"_translate",value:function(t,e){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t&&(t.style["".concat(this.cssPrefix,"transition-duration")]=n?"".concat(n,"ms"):"",requestAnimationFrame((function(){t.style["".concat(i.cssPrefix,"transform")]="translateX(".concat(e,"px)")})))}},{key:"_isEnded",value:function(t){if(this.loop)return!1;var e=t.x>0;return e&&0===this.index||!e&&this.index===this.slides.length-1}},{key:"_calcCssPrefix",value:function(){this.animated&&(this.cssPrefix=Object(n.c)())}}])&&o(e.prototype,i),a&&o(e,a),t}()},4:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"a",(function(){return s})),i.d(e,"c",(function(){return a}));var n=function(){if("undefined"!=typeof window)return document.addEventListener?function(t,e,i){t&&e&&i&&t.addEventListener(e,i,!1)}:function(t,e,i){t&&e&&i&&t.attachEvent("on"+e,i)}}(),s=function(){if("undefined"!=typeof window)return document.removeEventListener?function(t,e,i){t&&e&&t.removeEventListener(e,i,!1)}:function(t,e,i){t&&e&&t.detachEvent("on"+e,i)}}(),a=function(){var t="",e=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/,i=document.getElementsByTagName("script")[0].style;for(var n in i)e.test(n)&&(t="-"+n.match(e)[0].toLowerCase()+"-");return!t&&"WebkitOpacity"in i&&(t="-webkit-"),!t&&"KhtmlOpacity"in i&&(t="-khtml-"),t}},47:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.length?i("div",{staticClass:"v-swipe",on:{touchstart:function(t){t.stopPropagation()},touchmove:function(t){t.stopPropagation()},touchend:function(t){t.stopPropagation()}}},[i("div",{ref:"wrap",staticClass:"v-swipe__wrap"},t._l(t.length,(function(e,n){return i("div",{key:e,staticClass:"v-swipe__item"},[t._t(""+n)],2)})),0),t._v(" "),t.length>1&&t.indicator?i("div",{staticClass:"v-swipe__indicator"},t._l(t.length,(function(e,n){return i("div",{key:e,staticClass:"v-swipe__indicator__item",class:{"is-active":n===t.active}})})),0):t._e()]):t._e()};n._withStripped=!0;i(67);var s=i(12),a={name:"VSwipe",props:{duration:{type:Number,default:500},autoplay:{type:Number,default:2e3},index:{type:Number,default:0},length:{type:Number,default:0},indicator:{type:Boolean,default:!0}},data:function(){return{active:this.index,timer:0,slider:null,stats:[this.index]}},mounted:function(){this.init()},beforeDestroy:function(){clearInterval(this.timer),this.slider&&this.slider.destroy()},methods:{init:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=this.$refs.wrap;if(i&&i.children)this.slider=new s.a({wrap:i,loop:!0,index:this.active,animated:!0,duration:this.duration,callback:function(e){t.active=e,t.$emit("change",e),~t.stats.indexOf(e)||(t.stats.push(e),t.$emit("report",e))}}),this.play(),this.$emit("change",this.active),this.$emit("report",this.active);else{if(e>20)return;setTimeout((function(){t.init(e+1)}),100)}},play:function(){var t=this;this.autoplay&&(this.timer=setInterval((function(){t.slider.offsetWidth&&t.slider.next(t.autoplay)}),this.autoplay))}}},o=i(0),r=Object(o.a)(a,n,[],!1,null,null,null);r.options.__file="src/components/swipe/swipe.vue";var h=r.exports;e.default=h},67:function(t,e,i){}})})); |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=48)}({0:function(t,e,i){"use strict";function n(t,e,i,n,s,a,o,r){var h,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),o?(h=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=h):s&&(h=r?function(){s.call(this,this.$root.$options.shadowRoot)}:s),h)if(c.functional){c._injectStyles=h;var l=c.render;c.render=function(t,e){return h.call(e),l(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,h):[h]}return{exports:t,options:c}}i.d(e,"a",(function(){return n}))},1:function(t,e,i){"use strict";i.d(e,"a",(function(){return n})),i.d(e,"g",(function(){return s})),i.d(e,"c",(function(){return r})),i.d(e,"e",(function(){return h})),i.d(e,"d",(function(){return c})),i.d(e,"f",(function(){return l})),i.d(e,"b",(function(){return u}));var n=function(t,e){if(t){for(var i=t.className,n=(e||"").split(" "),s=0,a=n.length;s<a;s++){var r=n[s];r&&(t.classList?t.classList.add(r):o(t,r)||(i+=" "+r))}t.classList||(t.className=i)}},s=function(t,e){if(t&&e){for(var i=e.split(" "),n=" "+t.className+" ",s=0,r=i.length;s<r;s++){var h=i[s];h&&(t.classList?t.classList.remove(h):o(t,h)&&(n=n.replace(" "+h+" "," ")))}t.classList||(t.className=a(n))}},a=function(t){return(t||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},o=function(t,e){if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList?t.classList.contains(e):(" "+t.className+" ").includes(" "+e+" ")},r=function t(e,i){var n=-1;if(!i)return n;var s=i.endsWith("/")?i:"".concat(i,"/");if(e.map((function(t){return t.route})).forEach((function(t,e){if(t){var i=t.endsWith("/")?t:"".concat(t,"/");s===i&&(n=e)}})),-1!==n)return n;var a=s.split("/").filter((function(t){return t}));return a.length?(a.pop(),t(e,"/".concat(a.join("/"),"/"))):-1},h=function(t,e){var i=e?"scrollTop":"scrollLeft",n=t[e?"pageYOffset":"pageXOffset"];return"number"!=typeof n&&(n=window.document.documentElement[i]),n},c=function(t){var e=t.getBoundingClientRect(),i=h(window,!0),n=h(window),s=window.document.body,a=s.clientTop||0,o=s.clientLeft||0;return{top:e.top+i-a,left:e.left+n-o}},l=function(t){var e=t;if(!e)return null;for(;e&&"HTML"!==e.tagName&&"BOYD"!==e.tagName&&1===e.nodeType;){var i=window.getComputedStyle(e).overflowY;if("scroll"===i||"auto"===i)return"HTML"===e.tagName||"BODY"===e.tagName?document:e;e=e.parentNode}return document},u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!t)return!1;var i=t.getBoundingClientRect();return i.top<window.innerHeight+e&&i.bottom+e>0&&i.left<window.innerWidth+e&&i.right+e>0}},11:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i(4);function s(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var a=function(){function t(e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e.el,this.vertical=e.vertical||!1,this.disabled=e.disabled||!1,this.maxOffset=Math.abs(e.maxOffset||0),this.minOffset=-Math.abs(e.minOffset||0),this.startCallback=e.startCallback||null,this.moveCallback=e.moveCallback||null,this.endCallback=e.endCallback||null,this.lastOffset=0,this.offset=0,this.delta=0,this.prefix=Object(n.c)(),this.events={},this._bind(),this}var e,i,a;return e=t,(i=[{key:"disable",value:function(t){this.disabled=t}},{key:"scroll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=t;t>this.maxOffset?i=this.maxOffset:t<this.minOffset&&(i=this.minOffset),this.el.style["".concat(this.prefix,"transition-duration")]=e?"".concat(e,"ms"):"",this.el.style["".concat(this.prefix,"transform")]=this.vertical?"translateY(".concat(i,"px)"):"translateX(".concat(i,"px)"),this.offset=i,e&&(this.lastOffset=i)}},{key:"destroy",value:function(){var t=this.el,e=this.events;t&&(t.removeEventListener("touchstart",e.touchstart),t.removeEventListener("touchmove",e.touchmove),t.removeEventListener("touchend",e.touchend))}},{key:"_bind",value:function(){var t=this.el,e=this.events;t&&(e.touchstart=this._start.bind(this),e.touchmove=this._move.bind(this),e.touchend=this._end.bind(this),t.addEventListener("touchstart",e.touchstart),t.addEventListener("touchmove",e.touchmove),t.addEventListener("touchend",e.touchend))}},{key:"_start",value:function(t){if(t.stopPropagation(),!this.disabled){var e=t.touches[0];this.delta=this.vertical?e.pageY:e.pageX,this.startCallback&&this.startCallback()}}},{key:"_move",value:function(t){if(t.stopPropagation(),!this.disabled){var e=t.touches[0],i=(this.vertical?e.pageY:e.pageX)-this.delta,n=this.lastOffset+i;this.scroll(n),this.moveCallback&&this.moveCallback(this.offset)}}},{key:"_end",value:function(t){t.stopPropagation(),this.disabled||(this.lastOffset=this.offset,this.endCallback&&this.endCallback(this.offset))}}])&&s(e.prototype,i),a&&s(e,a),t}()},12:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i(4);function s(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function o(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var r=function(){function t(e){var i=this;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.wrap=e.wrap,this.loop=e.loop,this.index=e.index,this.animated=e.animated,this.duration=e.duration,this.callback=e.callback,this._calcCssPrefix(),this._setupConst(),this.loop?setTimeout((function(){i._useAnimate(),i._cloneShadow(),i._bindEvents()}),0):(this._useAnimate(),this._cloneShadow(),this._bindEvents()),this}var e,i,a;return e=t,(i=[{key:"slide",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t===this.index||this.move||(this._lockEvent(1.2),this._animateSlide(t,this.index,e))}},{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.slides.length;1===e||this.touching||this.move||this.index===e-1&&!this.loop||t&&Date.now()-this.lastNextAt<t||this.slide(this.index+1,!0)}},{key:"destroy",value:function(){var t=this.el,e=this.events;t&&(t.removeEventListener("touchstart",e.touchstart,{passive:!0}),t.removeEventListener("touchmove",e.touchmove,{passive:!0}),t.removeEventListener("touchend",e.touchend,{passive:!0}))}},{key:"_updateEvents",value:function(t){this.destroy(),this.el=this.slides[t],this.index=t,this.events={},this._bindEvents()}},{key:"_setupConst",value:function(){this.slides=s(this.wrap.children),this.startAt=0,this.lastNextAt=0,this.move=!1,this.touching=!1,this.isMoveSlide=!1,this.maxDeltaPoint={x:0,y:0},this.deltaPoint={x:0,y:0},this.el=this.slides[this.index],this.events={}}},{key:"_cloneShadow",value:function(){var t=this.slides,e=this.index,i=this.offsetWidth;if(this.loop&&1!==t.length){var n=t[t.length-1].cloneNode(!0),s=t[0].cloneNode(!0);this.wrap.appendChild(n),this.wrap.appendChild(s),n.style.transform="translateX(".concat((-1-e)*i,"px)"),s.style.transform="translateX(".concat((t.length-e)*i,"px)"),this.beforeShadow=n,this.afterShadow=s}}},{key:"_useAnimate",value:function(){var t=this,e=this.wrap,i=e.offsetWidth;if(i||setTimeout((function(){t._useAnimate()}),100),this.offsetWidth=i,this.animated){var n=this.slides,s=this.index,a=n.length;e.style.width="".concat(100*a,"%");var o="".concat(100/a,"%");[].forEach.call(n,(function(t,e){t.style.width=o,t.style.transform="translateX(".concat((e-s)*i,"px)")})),e.style.visibility="visible"}else e.style.visibility="visible"}},{key:"_bindEvents",value:function(){if(1!==this.slides.length){var t=this.el,e=this.events;t&&(e.touchstart=this._start.bind(this),e.touchmove=this._move.bind(this),e.touchend=this._end.bind(this),t.addEventListener("touchstart",e.touchstart,{passive:!0}),t.addEventListener("touchmove",e.touchmove,{passive:!0}),t.addEventListener("touchend",e.touchend,{passive:!0}))}}},{key:"_start",value:function(t){this.touching=!0;var e=t.touches[0];this.startPoint={x:e.pageX,y:e.pageY},this.startAt=+new Date}},{key:"_move",value:function(t){var e=t.touches[0],i=this.startPoint,n=this.maxDeltaPoint,s={x:e.pageX-i.x,y:e.pageY-i.y};if(this.maxDeltaPoint={x:Math.max(n.x,Math.abs(s.x)),y:Math.max(n.y,Math.abs(s.y))},this.deltaPoint=s,this.isMoveSlide=!0,this._lockedSwipeEvents(),!this._isVerticalScroll(this.maxDeltaPoint)&&this.animated&&!this._isEnded(s)){var a=s.x,o=a>0,r=this.slides,h=this.index,c=this.offsetWidth;this._translate(r[h],a),o?this._translate(r[h-1],a-c):this._translate(r[h+1],c+a),this._loopAdjust(o,h,a)}}},{key:"_end",value:function(){if(this.touching=!1,this.startAt&&this.isMoveSlide){this.isMoveSlide=!1,this._unlockSwipeEvents();var t=this.maxDeltaPoint,e=this.deltaPoint,i=this.offsetWidth,n=e.x>0;if(this.maxDeltaPoint={x:0,y:0},this._isVerticalScroll(t)||this._isEnded(e)||!this._isValidSlide(e)){if(!this.animated)return;var s=this.slides,a=this.index,o=this.duration;return this._translate(s[a],0,o),n?(this._translate(s[a-1],-i,o),this._translate(s[a+1],i)):(this._translate(s[a+1],i,o),this._translate(s[a-1],-i)),this.loop&&(n&&0===a?this._translate(this.beforeShadow,-i,o):n||a!==s.length-1||this._translate(this.afterShadow,i,o)),void this._lockEvent()}var r=n?this.index-1:this.index+1;if(this.animated){var h=this.slides,c=this.index,l=this.duration;this._translate(h[c],n?i:-i,l),this._translate(h[c-1],n?0:-i,n?l:0),this._translate(h[c+1],n?i:0,n?0:l),this.loop&&(r=this._loopJump(n,c,r))}this.callback&&this.callback(r),this._updateEvents(r),this._lockEvent()}}},{key:"_animateSlide",value:function(t,e,i){var n=this;if(this.animated){var s=this.offsetWidth,a=this.slides,o=this.duration,r=t<e;this._loopAdjust(r,t),this._translate(a[t],r?-s:s);var h=t;setTimeout((function(){n._translate(a[t],0,o),n._translate(a[e],r?s:-s,o),e!==t+1&&n._translate(a[t+1],s),e!==t-1&&n._translate(a[t-1],-s),n.loop&&(h=n._loopJump(r,e,t)),n._updateEvents(h),i&&setTimeout((function(){n.callback&&n.callback(h)}),n.duration)}),0)}}},{key:"_loopJump",value:function(t,e,i){var n,s=this.slides,a=this.duration,o=this.offsetWidth;return t&&0===e?(n=s.length-1,this._translate(this.beforeShadow,0,a),this._translate(this.afterShadow,o),this._loopReset(!0)):t||e!==s.length-1?n=i:(n=0,this._translate(this.afterShadow,0,a),this._translate(this.beforeShadow,-o),this._loopReset(!1)),n}},{key:"_loopAdjust",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this.loop){var n=this.offsetWidth,s=this.slides;t&&0===e?this._translate(this.beforeShadow,i-n):t||e!==s.length-1||this._translate(this.afterShadow,n+i)}}},{key:"_loopReset",value:function(t){var e=this,i=this.offsetWidth,n=this.slides;setTimeout((function(){t?(e._translate(n[n.length-1],0,0),e._translate(n[n.length-2],-i,0),e._translate(e.beforeShadow,i,0)):(e._translate(n[0],0,0),e._translate(n[1],i,0),e._translate(e.afterShadow,-i,0))}),this.duration)}},{key:"_lockEvent",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.lastNextAt=Date.now(),this.move=!0,setTimeout((function(){t.move=!1}),this.duration*e)}},{key:"_lockedSwipeEvents",value:function(){this.animated&&(this.el.style["touch-action"]="none")}},{key:"_unlockSwipeEvents",value:function(){this.animated&&(this.el.style["touch-action"]="auto")}},{key:"_isVerticalScroll",value:function(t){return Math.abs(t.x)<1.5*Math.abs(t.y)}},{key:"_isValidSlide",value:function(t){var e=Math.abs(t.x),i=Number(+new Date-this.startAt)<250&&e>20||e>this.offsetWidth/2;return this.startAt=0,i}},{key:"_translate",value:function(t,e){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t&&(t.style["".concat(this.cssPrefix,"transition-duration")]=n?"".concat(n,"ms"):"",requestAnimationFrame((function(){t.style["".concat(i.cssPrefix,"transform")]="translateX(".concat(e,"px)")})))}},{key:"_isEnded",value:function(t){if(this.loop)return!1;var e=t.x>0;return e&&0===this.index||!e&&this.index===this.slides.length-1}},{key:"_calcCssPrefix",value:function(){this.animated&&(this.cssPrefix=Object(n.c)())}}])&&o(e.prototype,i),a&&o(e,a),t}()},13:function(t,e,i){"use strict";var n=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"v-affix"},[e("div",{directives:[{name:"show",rawName:"v-show",value:this.showFixedShim,expression:"showFixedShim"}],style:this.fixedShimStyle}),this._v(" "),e("div",{ref:"wrap",class:{"v-affix--fixed":!this.disabled&&this.isFixed},style:this.fixedSlotStyle},[this._t("default")],2)])};n._withStripped=!0;i(20);var s=i(4),a=i(1),o={name:"VAffix",props:{fixedTop:{type:Number},disabled:{type:Boolean,default:!1}},data:function(){return{isFixed:!1,showFixedShim:!1,fixedShimStyle:{},fixedSlotStyle:{}}},mounted:function(){var t=this;if(void 0!==this.fixedTop){var e=Object(a.f)(this.$el);Object(s.b)(e,"scroll",this.handleScroll),Object(s.b)(e,"resize",this.handleScroll),this.$nextTick((function(){t.handleScroll()}))}},beforeDestroy:function(){if(void 0!==this.fixedTop){var t=Object(a.f)(this.$el);Object(s.a)(t,"scroll",this.handleScroll),Object(s.a)(t,"resize",this.handleScroll)}},methods:{handleScroll:function(){var t=this.isFixed,e=Object(a.e)(window,!0),i=Object(a.d)(this.$el);if(i.top-this.fixedTop<=e&&!t){this.isFixed=!0;var n=this.$refs.wrap;this.fixedShimStyle={width:"".concat(n.clientWidth,"px"),height:"".concat(n.clientHeight,"px")},this.showFixedShim=!0,this.fixedSlotStyle={top:"".concat(this.fixedTop,"px"),left:"".concat(i.left,"px"),width:"".concat(this.$el.offsetWidth,"px")},this.$emit("on-fixed",!0)}else i.top-this.fixedTop>e&&t&&(this.showFixedShim=!1,this.fixedShimStyle={},this.isFixed=!1,this.fixedSlotStyle=null,this.$emit("on-fixed",!1))}}},r=i(0),h=Object(r.a)(o,n,[],!1,null,null,null);h.options.__file="src/components/affix/affix.vue";e.a=h.exports},20:function(t,e,i){},4:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"a",(function(){return s})),i.d(e,"c",(function(){return a}));var n=function(){if("undefined"!=typeof window)return document.addEventListener?function(t,e,i){t&&e&&i&&t.addEventListener(e,i,!1)}:function(t,e,i){t&&e&&i&&t.attachEvent("on"+e,i)}}(),s=function(){if("undefined"!=typeof window)return document.removeEventListener?function(t,e,i){t&&e&&t.removeEventListener(e,i,!1)}:function(t,e,i){t&&e&&t.detachEvent("on"+e,i)}}(),a=function(){var t="",e=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/,i=document.getElementsByTagName("script")[0].style;for(var n in i)e.test(n)&&(t="-"+n.match(e)[0].toLowerCase()+"-");return!t&&"WebkitOpacity"in i&&(t="-webkit-"),!t&&"KhtmlOpacity"in i&&(t="-khtml-"),t}},48:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"v-switcher"},[i("VAffix",{directives:[{name:"show",rawName:"v-show",value:t.headerCount>1,expression:"headerCount > 1"}],attrs:{"fixed-top":t.fixedTop,disabled:void 0===t.fixedTop||t.headerCount<=1}},[i("div",{ref:"headerWrap",staticClass:"v-switcher__header"},[i("div",{staticClass:"v-switcher__header__before"},[t._t("header-before")],2),t._v(" "),i("div",{staticClass:"v-switcher__header__after"},[t._t("header-after")],2),t._v(" "),i("div",{ref:"tabWrap",staticClass:"v-switcher__header__tabs__wrap"},[i("ul",{ref:"header",staticClass:"v-switcher__header__tabs__list",class:"v-switcher__header--"+t.align},[t._l(t.formatHeaders,(function(e,n){return i(t._computeItemName(e),t._b({key:n,ref:"tab",refInFor:!0,tag:"component",staticClass:"v-switcher__header__tabs__item",class:{"is-active":n===t.focusIndex},on:{click:function(e){return t._handleTabSwitch(n)}}},"component",t.routeName?"a"===t._computeItemName(e)?{href:e.path}:{to:e.path}:"",!1),[t._t("tab-"+n,[e.icon?i("i",{class:e.icon}):t._e(),t._v(" "),i("span",{domProps:{textContent:t._s(e.text)}})])],2)})),t._v(" "),i("div",{staticClass:"v-switcher__header__anchor",style:t.anchorStyle},[t._t("anchor")],2)],2)])])]),t._v(" "),!t.routeName&&t.headerCount>0?i("div",{ref:"content",staticClass:"v-switcher__content",class:["v-switcher__content--"+t.contentMode,{"v-switcher__content--multi":t.headerCount>1}]},[i("div",{ref:"contentWrap",staticClass:"v-switcher__content__wrap"},t._l(t.headers,(function(e,n){return i("div",{key:n,staticClass:"v-switcher__content__item",class:{"is-active":~t.displayContent.indexOf(n)}},[t._t(n)],2)})),0)]):t._e()],1)};n._withStripped=!0;i(68);var s=i(4),a=i(1),o=i(13),r=i(12),h=i(11),c={name:"VSwitcher",components:{VAffix:o.a},props:{headers:{type:Array,required:!0},defaultIndex:{type:Number,default:0},routeName:{type:String,default:""},align:{type:String,default:"start",validator:function(t){return~["around","start","center","end"].indexOf(t)}},anchorPadding:{type:Number,default:16,validator:function(t){return t>=0}},fixedTop:{type:Number},swipe:{type:Boolean,default:!0},sticky:{type:Boolean,default:!0},duration:{type:Number,default:300,validator:function(t){return t>=0}}},data:function(){return{focusIndex:this.routeName?Object(a.c)(this.headers,this.$route.path):this.defaultIndex,oldFocusIndex:-1,anchorStyle:{},slider:null,scroller:null,sizeCache:{tabs:[],header:null,tabsWrapWidth:0,headerWrapWidth:0,headerScrollMaxSize:0}}},computed:{displayContent:function(){var t=this.focusIndex;return"swipe"===this.contentMode?[this.oldFocusIndex,t-1,t,t+1]:[t]},formatHeaders:function(){var t=this,e=[];return this.headers.forEach((function(i,n){e.push({text:t._computeItemText(i,n),icon:t._computeItemIcon(i,n),path:t._computeItemPath(i)})})),e},headerCount:function(){return this.headers.length},contentMode:function(){return this.routeName?"click":this.sticky&&this.duration&&this.swipe?"swipe":!this.swipe||this.sticky&&this.duration?"click":"slide"}},mounted:function(){var t=this;this.$nextTick((function(){t._setComponentSize(),t._initSwipe(),t._initScroller(),t._computeAnchorStyle(t.focusIndex),t._computeHeaderStyle(0),t.$watch("headers",(function(e){t.$nextTick((function(){var i=t.focusIndex;t._setComponentSize(),t.routeName&&t._handleTabSwitch(Object(a.c)(e,t.$route.path)),i!==t.focusIndex&&(t._computeAnchorStyle(t.focusIndex),t._computeHeaderStyle(i))}))})),t.$watch("focusIndex",(function(e,i){t._computeAnchorStyle(e),t._computeHeaderStyle(i),t.$emit("change",e)})),t.routeName&&t.$watch("$route",(function(e){t._handleTabSwitch(Object(a.c)(t.headers,e.path))})),t.$emit("change",t.focusIndex),Object(s.b)(window,"resize",t._setComponentSize)}))},beforeDestroy:function(){Object(s.a)(window,"resize",this._setComponentSize),this.slider&&this.slider.destroy(),this.scroller&&this.scroller.destroy()},methods:{slide:function(t){t<0||t>this.headerCount-1||this._handleTabSwitch(t)},_initSwipe:function(){var t=this;"click"!==this.contentMode&&(this.slider=new r.a({wrap:this.$refs.contentWrap,loop:!1,index:this.focusIndex,animated:"swipe"===this.contentMode,duration:this.duration,callback:function(e){t.focusIndex=e}}))},_initScroller:function(){"start"===this.align&&(this.scroller=new h.a({el:this.$refs.header,minOffset:this.sizeCache.headerScrollMaxSize}))},_computeItemName:function(t){return this.routeName?t.path&&t.path.startsWith("http")?"a":this.routeName||"li":"li"},_handleTabSwitch:function(t){if(this.slider){if(this.slider.move)return;this.oldFocusIndex=this.focusIndex,this.slider.slide(t)}this.focusIndex=t,t<0&&(this.anchorStyle.transform="translateX(-100%)")},_computeHeaderStyle:function(t){var e=this;if(0!==this.sizeCache.headerScrollMaxSize){var i=this.focusIndex;if(!(i<0)){var n=this.scroller?this.scroller.offset:0,s=this.sizeCache.headerScrollMaxSize;if(i)if(i===this.headerCount-1)n=s;else{var a=this._getComponentSize("tabs",0).left,o=this._getComponentSize("tabs",i),r=function(){var t=e._getComponentSize("tabs",i+1).right-a-e.sizeCache.tabsWrapWidth;t>0&&(n=-t);var s=o.left-a;n+s<0&&(n=-s)};if(t>i){var h=this._getComponentSize("tabs",i-1);if(h.left+n<a){n=a-h.left;var c=o.right-a-this.sizeCache.tabsWrapWidth;c>n>0&&(n=-c)}else r()}else r()}else n=0;n<s?n=s:n>0&&(n=0),this.scroller&&this.scroller.scroll(n,this.duration)}}},_computeAnchorStyle:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(t<0)){var n=this._getComponentSize("tabs",t);if(n){var s=+this.anchorPadding,a=this._getComponentSize("header"),o="around"===this.align;this.anchorStyle={width:"".concat(o?n.width:n.width-2*s,"px"),transform:"translateX(".concat(o?n.left-a.left:n.left-a.left+s,"px)"),transitionDuration:"".concat(this.duration,"ms")}}else i<5&&setTimeout((function(){e._computeAnchorStyle(e.focusIndex,i+1)}),200)}},_computeItemText:function(t,e){var i;if("string"==typeof t||"number"==typeof t)i=t;else if(i=t.label||t.name||t.text,this.focusIndex===e){var n=t["label-active"]||t["name-active"]||t["text-active"];n&&(i=n)}return i},_computeItemIcon:function(t,e){var i;return"string"!=typeof t&&"number"!=typeof t&&t.icon?(i=t.icon,this.focusIndex===e&&t["icon-active"]&&(i=t["icon-active"])):i="",i},_computeItemPath:function(t){return"string"==typeof t||"number"==typeof t?"":t.route||""},_setComponentSize:function(){var t=this.$refs.tab;if(t){var e=[];t.forEach((function(t){var i=t instanceof Element?t.getBoundingClientRect():t.$el.getBoundingClientRect();e.push({top:i.top,left:i.left,right:i.right,bottom:i.bottom,width:i.width,height:i.height})})),this.sizeCache.tabs=e}var i=this.$refs.headerWrap;i&&(this.sizeCache.headerWrapWidth=i.clientWidth);var n=this.$refs.tabWrap;n&&(this.sizeCache.tabsWrapWidth=n.clientWidth);var s=this.$refs.header;if(s){var a=s.getBoundingClientRect();this.sizeCache.header={top:a.top,left:a.left,right:a.right,bottom:a.bottom}}var o=this.sizeCache.tabs[this.headerCount-1].right-this.sizeCache.tabs[0].left;this.sizeCache.headerScrollMaxSize=o<this.sizeCache.tabsWrapWidth?0:this.sizeCache.tabsWrapWidth-o},_getComponentSize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=this.sizeCache[t];return i?e>=0?i[e]?i[e]:null:i:null}}},l=i(0),u=Object(l.a)(c,n,[],!1,null,null,null);u.options.__file="src/components/switcher/switcher.vue";var d=u.exports;e.default=d},68:function(t,e,i){}})})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=48)}({0:function(t,e,i){"use strict";function n(t,e,i,n,s,a,o,r){var h,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),o?(h=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=h):s&&(h=r?function(){s.call(this,this.$root.$options.shadowRoot)}:s),h)if(c.functional){c._injectStyles=h;var l=c.render;c.render=function(t,e){return h.call(e),l(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,h):[h]}return{exports:t,options:c}}i.d(e,"a",(function(){return n}))},1:function(t,e,i){"use strict";i.d(e,"a",(function(){return n})),i.d(e,"g",(function(){return s})),i.d(e,"c",(function(){return r})),i.d(e,"e",(function(){return h})),i.d(e,"d",(function(){return c})),i.d(e,"f",(function(){return l})),i.d(e,"b",(function(){return u}));var n=function(t,e){if(t){for(var i=t.className,n=(e||"").split(" "),s=0,a=n.length;s<a;s++){var r=n[s];r&&(t.classList?t.classList.add(r):o(t,r)||(i+=" "+r))}t.classList||(t.className=i)}},s=function(t,e){if(t&&e){for(var i=e.split(" "),n=" "+t.className+" ",s=0,r=i.length;s<r;s++){var h=i[s];h&&(t.classList?t.classList.remove(h):o(t,h)&&(n=n.replace(" "+h+" "," ")))}t.classList||(t.className=a(n))}},a=function(t){return(t||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},o=function(t,e){if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList?t.classList.contains(e):(" "+t.className+" ").includes(" "+e+" ")},r=function t(e,i){var n=-1;if(!i)return n;var s=i.endsWith("/")?i:"".concat(i,"/");if(e.map((function(t){return t.route})).forEach((function(t,e){if(t){var i=t.endsWith("/")?t:"".concat(t,"/");s===i&&(n=e)}})),-1!==n)return n;var a=s.split("/").filter((function(t){return t}));return a.length?(a.pop(),t(e,"/".concat(a.join("/"),"/"))):-1},h=function(t,e){var i=e?"scrollTop":"scrollLeft",n=t[e?"pageYOffset":"pageXOffset"];return"number"!=typeof n&&(n=window.document.documentElement[i]),n},c=function(t){var e=t.getBoundingClientRect(),i=h(window,!0),n=h(window),s=window.document.body,a=s.clientTop||0,o=s.clientLeft||0;return{top:e.top+i-a,left:e.left+n-o}},l=function(t){var e=t;if(!e)return null;for(;e&&"HTML"!==e.tagName&&"BOYD"!==e.tagName&&1===e.nodeType;){var i=window.getComputedStyle(e).overflowY;if("scroll"===i||"auto"===i)return"HTML"===e.tagName||"BODY"===e.tagName?document:e;e=e.parentNode}return document},u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!t)return!1;var i=t.getBoundingClientRect();return i.top<window.innerHeight+e&&i.bottom+e>0&&i.left<window.innerWidth+e&&i.right+e>0}},11:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i(4);function s(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var a=function(){function t(e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e.el,this.vertical=e.vertical||!1,this.disabled=e.disabled||!1,this.maxOffset=Math.abs(e.maxOffset||0),this.minOffset=-Math.abs(e.minOffset||0),this.startCallback=e.startCallback||null,this.moveCallback=e.moveCallback||null,this.endCallback=e.endCallback||null,this.lastOffset=0,this.offset=0,this.delta=0,this.prefix=Object(n.c)(),this.events={},this._bind(),this}var e,i,a;return e=t,(i=[{key:"disable",value:function(t){this.disabled=t}},{key:"scroll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=t;t>this.maxOffset?i=this.maxOffset:t<this.minOffset&&(i=this.minOffset),this.el.style["".concat(this.prefix,"transition-duration")]=e?"".concat(e,"ms"):"",this.el.style["".concat(this.prefix,"transform")]=this.vertical?"translateY(".concat(i,"px)"):"translateX(".concat(i,"px)"),this.offset=i,e&&(this.lastOffset=i)}},{key:"destroy",value:function(){var t=this.el,e=this.events;t&&(t.removeEventListener("touchstart",e.touchstart),t.removeEventListener("touchmove",e.touchmove),t.removeEventListener("touchend",e.touchend))}},{key:"_bind",value:function(){var t=this.el,e=this.events;t&&(e.touchstart=this._start.bind(this),e.touchmove=this._move.bind(this),e.touchend=this._end.bind(this),t.addEventListener("touchstart",e.touchstart),t.addEventListener("touchmove",e.touchmove),t.addEventListener("touchend",e.touchend))}},{key:"_start",value:function(t){if(t.stopPropagation(),!this.disabled){var e=t.touches[0];this.delta=this.vertical?e.pageY:e.pageX,this.startCallback&&this.startCallback()}}},{key:"_move",value:function(t){if(t.stopPropagation(),!this.disabled){var e=t.touches[0],i=(this.vertical?e.pageY:e.pageX)-this.delta,n=this.lastOffset+i;this.scroll(n),this.moveCallback&&this.moveCallback(this.offset)}}},{key:"_end",value:function(t){t.stopPropagation(),this.disabled||(this.lastOffset=this.offset,this.endCallback&&this.endCallback(this.offset))}}])&&s(e.prototype,i),a&&s(e,a),t}()},12:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i(4);function s(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function o(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var r=function(){function t(e){var i=this;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.wrap=e.wrap,this.loop=e.loop,this.index=e.index,this.animated=e.animated,this.duration=e.duration,this.callback=e.callback,this._calcCssPrefix(),this._setupConst(),this.loop?setTimeout((function(){i._useAnimate(),i._cloneShadow(),i._bindEvents()}),0):(this._useAnimate(),this._cloneShadow(),this._bindEvents()),this}var e,i,a;return e=t,(i=[{key:"slide",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t===this.index||this.move||(this._lockEvent(1.2),this._animateSlide(t,this.index,e))}},{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.slides.length;1===e||this.touching||this.move||this.index===e-1&&!this.loop||t&&Date.now()-this.lastNextAt<t||this.slide(this.index+1,!0)}},{key:"destroy",value:function(){var t=this.el,e=this.events;t&&(t.removeEventListener("touchstart",e.touchstart,{passive:!0}),t.removeEventListener("touchmove",e.touchmove,{passive:!0}),t.removeEventListener("touchend",e.touchend,{passive:!0}))}},{key:"_updateEvents",value:function(t){this.destroy(),this.el=this.slides[t],this.index=t,this.events={},this._bindEvents()}},{key:"_setupConst",value:function(){this.slides=s(this.wrap.children),this.startAt=0,this.lastNextAt=0,this.move=!1,this.touching=!1,this.isMoveSlide=!1,this.maxDeltaPoint={x:0,y:0},this.deltaPoint={x:0,y:0},this.el=this.slides[this.index],this.events={}}},{key:"_cloneShadow",value:function(){var t=this.slides,e=this.index,i=this.offsetWidth;if(this.loop&&1!==t.length){var n=t[t.length-1].cloneNode(!0),s=t[0].cloneNode(!0);this.wrap.appendChild(n),this.wrap.appendChild(s),n.style.transform="translateX(".concat((-1-e)*i,"px)"),s.style.transform="translateX(".concat((t.length-e)*i,"px)"),this.beforeShadow=n,this.afterShadow=s}}},{key:"_useAnimate",value:function(){var t=this,e=this.wrap,i=e.offsetWidth;if(i||setTimeout((function(){t._useAnimate()}),100),this.offsetWidth=i,this.animated){var n=this.slides,s=this.index;[].forEach.call(n,(function(t,e){t.style.transform="translateX(".concat((e-s)*i,"px)")})),e.style.visibility="visible"}else e.style.visibility="visible"}},{key:"_bindEvents",value:function(){if(1!==this.slides.length){var t=this.el,e=this.events;t&&(e.touchstart=this._start.bind(this),e.touchmove=this._move.bind(this),e.touchend=this._end.bind(this),t.addEventListener("touchstart",e.touchstart,{passive:!0}),t.addEventListener("touchmove",e.touchmove,{passive:!0}),t.addEventListener("touchend",e.touchend,{passive:!0}))}}},{key:"_start",value:function(t){this.touching=!0;var e=t.touches[0];this.startPoint={x:e.pageX,y:e.pageY},this.startAt=+new Date}},{key:"_move",value:function(t){var e=t.touches[0],i=this.startPoint,n=this.maxDeltaPoint,s={x:e.pageX-i.x,y:e.pageY-i.y};if(this.maxDeltaPoint={x:Math.max(n.x,Math.abs(s.x)),y:Math.max(n.y,Math.abs(s.y))},this.deltaPoint=s,this.isMoveSlide=!0,this._lockedSwipeEvents(),!this._isVerticalScroll(this.maxDeltaPoint)&&this.animated&&!this._isEnded(s)){var a=s.x,o=a>0,r=this.slides,h=this.index,c=this.offsetWidth;this._translate(r[h],a),o?this._translate(r[h-1],a-c):this._translate(r[h+1],c+a),this._loopAdjust(o,h,a)}}},{key:"_end",value:function(){if(this.touching=!1,this.startAt&&this.isMoveSlide){this.isMoveSlide=!1,this._unlockSwipeEvents();var t=this.maxDeltaPoint,e=this.deltaPoint,i=this.offsetWidth,n=e.x>0;if(this.maxDeltaPoint={x:0,y:0},this._isVerticalScroll(t)||this._isEnded(e)||!this._isValidSlide(e)){if(!this.animated)return;var s=this.slides,a=this.index,o=this.duration;return this._translate(s[a],0,o),n?(this._translate(s[a-1],-i,o),this._translate(s[a+1],i)):(this._translate(s[a+1],i,o),this._translate(s[a-1],-i)),this.loop&&(n&&0===a?this._translate(this.beforeShadow,-i,o):n||a!==s.length-1||this._translate(this.afterShadow,i,o)),void this._lockEvent()}var r=n?this.index-1:this.index+1;if(this.animated){var h=this.slides,c=this.index,l=this.duration;this._translate(h[c],n?i:-i,l),this._translate(h[c-1],n?0:-i,n?l:0),this._translate(h[c+1],n?i:0,n?0:l),this.loop&&(r=this._loopJump(n,c,r))}this.callback&&this.callback(r),this._updateEvents(r),this._lockEvent()}}},{key:"_animateSlide",value:function(t,e,i){var n=this;if(this.animated){var s=this.offsetWidth,a=this.slides,o=this.duration,r=t<e;this._loopAdjust(r,t),this._translate(a[t],r?-s:s);var h=t;setTimeout((function(){n._translate(a[t],0,o),n._translate(a[e],r?s:-s,o),e!==t+1&&n._translate(a[t+1],s),e!==t-1&&n._translate(a[t-1],-s),n.loop&&(h=n._loopJump(r,e,t)),n._updateEvents(h),i&&setTimeout((function(){n.callback&&n.callback(h)}),n.duration)}),0)}}},{key:"_loopJump",value:function(t,e,i){var n,s=this.slides,a=this.duration,o=this.offsetWidth;return t&&0===e?(n=s.length-1,this._translate(this.beforeShadow,0,a),this._translate(this.afterShadow,o),this._loopReset(!0)):t||e!==s.length-1?n=i:(n=0,this._translate(this.afterShadow,0,a),this._translate(this.beforeShadow,-o),this._loopReset(!1)),n}},{key:"_loopAdjust",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this.loop){var n=this.offsetWidth,s=this.slides;t&&0===e?this._translate(this.beforeShadow,i-n):t||e!==s.length-1||this._translate(this.afterShadow,n+i)}}},{key:"_loopReset",value:function(t){var e=this,i=this.offsetWidth,n=this.slides;setTimeout((function(){t?(e._translate(n[n.length-1],0,0),e._translate(n[n.length-2],-i,0),e._translate(e.beforeShadow,i,0)):(e._translate(n[0],0,0),e._translate(n[1],i,0),e._translate(e.afterShadow,-i,0))}),this.duration)}},{key:"_lockEvent",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.lastNextAt=Date.now(),this.move=!0,setTimeout((function(){t.move=!1}),this.duration*e)}},{key:"_lockedSwipeEvents",value:function(){this.animated&&(this.el.style["touch-action"]="none")}},{key:"_unlockSwipeEvents",value:function(){this.animated&&(this.el.style["touch-action"]="auto")}},{key:"_isVerticalScroll",value:function(t){return Math.abs(t.x)<1.5*Math.abs(t.y)}},{key:"_isValidSlide",value:function(t){var e=Math.abs(t.x),i=Number(+new Date-this.startAt)<250&&e>20||e>this.offsetWidth/2;return this.startAt=0,i}},{key:"_translate",value:function(t,e){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t&&(t.style["".concat(this.cssPrefix,"transition-duration")]=n?"".concat(n,"ms"):"",requestAnimationFrame((function(){t.style["".concat(i.cssPrefix,"transform")]="translateX(".concat(e,"px)")})))}},{key:"_isEnded",value:function(t){if(this.loop)return!1;var e=t.x>0;return e&&0===this.index||!e&&this.index===this.slides.length-1}},{key:"_calcCssPrefix",value:function(){this.animated&&(this.cssPrefix=Object(n.c)())}}])&&o(e.prototype,i),a&&o(e,a),t}()},13:function(t,e,i){"use strict";var n=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"v-affix"},[e("div",{directives:[{name:"show",rawName:"v-show",value:this.showFixedShim,expression:"showFixedShim"}],style:this.fixedShimStyle}),this._v(" "),e("div",{ref:"wrap",class:{"v-affix--fixed":!this.disabled&&this.isFixed},style:this.fixedSlotStyle},[this._t("default")],2)])};n._withStripped=!0;i(20);var s=i(4),a=i(1),o={name:"VAffix",props:{fixedTop:{type:Number},disabled:{type:Boolean,default:!1}},data:function(){return{isFixed:!1,showFixedShim:!1,fixedShimStyle:{},fixedSlotStyle:{}}},mounted:function(){var t=this;if(void 0!==this.fixedTop){var e=Object(a.f)(this.$el);Object(s.b)(e,"scroll",this.handleScroll),Object(s.b)(e,"resize",this.handleScroll),this.$nextTick((function(){t.handleScroll()}))}},beforeDestroy:function(){if(void 0!==this.fixedTop){var t=Object(a.f)(this.$el);Object(s.a)(t,"scroll",this.handleScroll),Object(s.a)(t,"resize",this.handleScroll)}},methods:{handleScroll:function(){var t=this.isFixed,e=Object(a.e)(window,!0),i=Object(a.d)(this.$el);if(i.top-this.fixedTop<=e&&!t){this.isFixed=!0;var n=this.$refs.wrap;this.fixedShimStyle={width:"".concat(n.clientWidth,"px"),height:"".concat(n.clientHeight,"px")},this.showFixedShim=!0,this.fixedSlotStyle={top:"".concat(this.fixedTop,"px"),left:"".concat(i.left,"px"),width:"".concat(this.$el.offsetWidth,"px")},this.$emit("on-fixed",!0)}else i.top-this.fixedTop>e&&t&&(this.showFixedShim=!1,this.fixedShimStyle={},this.isFixed=!1,this.fixedSlotStyle=null,this.$emit("on-fixed",!1))}}},r=i(0),h=Object(r.a)(o,n,[],!1,null,null,null);h.options.__file="src/components/affix/affix.vue";e.a=h.exports},20:function(t,e,i){},4:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"a",(function(){return s})),i.d(e,"c",(function(){return a}));var n=function(){if("undefined"!=typeof window)return document.addEventListener?function(t,e,i){t&&e&&i&&t.addEventListener(e,i,!1)}:function(t,e,i){t&&e&&i&&t.attachEvent("on"+e,i)}}(),s=function(){if("undefined"!=typeof window)return document.removeEventListener?function(t,e,i){t&&e&&t.removeEventListener(e,i,!1)}:function(t,e,i){t&&e&&t.detachEvent("on"+e,i)}}(),a=function(){var t="",e=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/,i=document.getElementsByTagName("script")[0].style;for(var n in i)e.test(n)&&(t="-"+n.match(e)[0].toLowerCase()+"-");return!t&&"WebkitOpacity"in i&&(t="-webkit-"),!t&&"KhtmlOpacity"in i&&(t="-khtml-"),t}},48:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"v-switcher",class:{"v-switcher--fluid":t.fluid}},[i("VAffix",{directives:[{name:"show",rawName:"v-show",value:t.headerCount>1,expression:"headerCount > 1"}],attrs:{"fixed-top":t.fixedTop,disabled:void 0===t.fixedTop||t.headerCount<=1}},[i("div",{ref:"headerWrap",staticClass:"v-switcher__header"},[i("div",{staticClass:"v-switcher__header__before"},[t._t("header-before")],2),t._v(" "),i("div",{staticClass:"v-switcher__header__after"},[t._t("header-after")],2),t._v(" "),i("div",{ref:"tabWrap",staticClass:"v-switcher__header__tabs__wrap"},[i("ul",{ref:"header",staticClass:"v-switcher__header__tabs__list",class:"v-switcher__header--"+t.align},[t._l(t.formatHeaders,(function(e,n){return i(t._computeItemName(e),t._b({key:n,ref:"tab",refInFor:!0,tag:"component",staticClass:"v-switcher__header__tabs__item",class:{"is-active":n===t.focusIndex},on:{click:function(e){return t._handleTabSwitch(n)}}},"component",t.routeName?"a"===t._computeItemName(e)?{href:e.path}:{to:e.path}:"",!1),[t._t("tab-"+n,[e.icon?i("i",{class:e.icon}):t._e(),t._v(" "),i("span",{domProps:{textContent:t._s(e.text)}})])],2)})),t._v(" "),i("div",{staticClass:"v-switcher__header__anchor",style:t.anchorStyle},[t._t("anchor")],2)],2)])])]),t._v(" "),!t.routeName&&t.headerCount>0?i("div",{ref:"content",staticClass:"v-switcher__content",class:["v-switcher__content--"+t.contentMode,{"v-switcher__content--multi":t.headerCount>1}]},[i("div",{ref:"contentWrap",staticClass:"v-switcher__content__wrap"},t._l(t.headers,(function(e,n){return i("div",{key:n,staticClass:"v-switcher__content__item",class:[{"is-active":~t.displayContent.indexOf(n)},{"is-current":n===t.focusIndex}]},[t._t(n)],2)})),0)]):t._e()],1)};n._withStripped=!0;i(68);var s=i(4),a=i(1),o=i(13),r=i(12),h=i(11),c={name:"VSwitcher",components:{VAffix:o.a},props:{headers:{type:Array,required:!0},defaultIndex:{type:Number,default:0},routeName:{type:String,default:""},align:{type:String,default:"start",validator:function(t){return~["around","start","center","end"].indexOf(t)}},anchorPadding:{type:Number,default:16,validator:function(t){return t>=0}},fixedTop:{type:Number},swipe:{type:Boolean,default:!0},sticky:{type:Boolean,default:!0},fluid:{type:Boolean,default:!1},duration:{type:Number,default:300,validator:function(t){return t>=0}}},data:function(){return{focusIndex:this.routeName?Object(a.c)(this.headers,this.$route.path):this.defaultIndex,oldFocusIndex:-1,anchorStyle:{},slider:null,scroller:null,sizeCache:{tabs:[],header:null,tabsWrapWidth:0,headerWrapWidth:0,headerScrollMaxSize:0}}},computed:{displayContent:function(){var t=this.focusIndex;return"swipe"===this.contentMode?[this.oldFocusIndex,t-1,t,t+1]:[t]},formatHeaders:function(){var t=this,e=[];return this.headers.forEach((function(i,n){e.push({text:t._computeItemText(i,n),icon:t._computeItemIcon(i,n),path:t._computeItemPath(i)})})),e},headerCount:function(){return this.headers.length},contentMode:function(){return this.routeName?"click":this.sticky&&this.duration&&this.swipe?"swipe":!this.swipe||this.sticky&&this.duration?"click":"slide"}},mounted:function(){var t=this;this.$nextTick((function(){t._setComponentSize(),t._initSwipe(),t._initScroller(),t._computeAnchorStyle(t.focusIndex),t._computeHeaderStyle(0),t.$watch("headers",(function(e){t.$nextTick((function(){var i=t.focusIndex;t._setComponentSize(),t.routeName&&t._handleTabSwitch(Object(a.c)(e,t.$route.path)),i!==t.focusIndex&&(t._computeAnchorStyle(t.focusIndex),t._computeHeaderStyle(i))}))})),t.$watch("focusIndex",(function(e,i){t._computeAnchorStyle(e),t._computeHeaderStyle(i),t.$emit("change",e)})),t.routeName&&t.$watch("$route",(function(e){t._handleTabSwitch(Object(a.c)(t.headers,e.path))})),t.$emit("change",t.focusIndex),Object(s.b)(window,"resize",t._setComponentSize)}))},beforeDestroy:function(){Object(s.a)(window,"resize",this._setComponentSize),this.slider&&this.slider.destroy(),this.scroller&&this.scroller.destroy()},methods:{slide:function(t){t<0||t>this.headerCount-1||this._handleTabSwitch(t)},_initSwipe:function(){var t=this;"click"!==this.contentMode&&(this.slider=new r.a({wrap:this.$refs.contentWrap,loop:!1,index:this.focusIndex,animated:"swipe"===this.contentMode,duration:this.duration,callback:function(e){t.focusIndex=e}}))},_initScroller:function(){"start"===this.align&&(this.scroller=new h.a({el:this.$refs.header,minOffset:this.sizeCache.headerScrollMaxSize}))},_computeItemName:function(t){return this.routeName?t.path&&t.path.startsWith("http")?"a":this.routeName||"li":"li"},_handleTabSwitch:function(t){if(this.slider){if(this.slider.move)return;this.oldFocusIndex=this.focusIndex,this.slider.slide(t)}this.focusIndex=t,t<0&&(this.anchorStyle.transform="translateX(-100%)")},_computeHeaderStyle:function(t){var e=this;if(0!==this.sizeCache.headerScrollMaxSize){var i=this.focusIndex;if(!(i<0)){var n=this.scroller?this.scroller.offset:0,s=this.sizeCache.headerScrollMaxSize;if(i)if(i===this.headerCount-1)n=s;else{var a=this._getComponentSize("tabs",0).left,o=this._getComponentSize("tabs",i),r=function(){var t=e._getComponentSize("tabs",i+1).right-a-e.sizeCache.tabsWrapWidth;t>0&&(n=-t);var s=o.left-a;n+s<0&&(n=-s)};if(t>i){var h=this._getComponentSize("tabs",i-1);if(h.left+n<a){n=a-h.left;var c=o.right-a-this.sizeCache.tabsWrapWidth;c>n>0&&(n=-c)}else r()}else r()}else n=0;n<s?n=s:n>0&&(n=0),this.scroller&&this.scroller.scroll(n,this.duration)}}},_computeAnchorStyle:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(t<0)){var n=this._getComponentSize("tabs",t);if(n){var s=+this.anchorPadding,a=this._getComponentSize("header"),o="around"===this.align;this.anchorStyle={width:"".concat(o?n.width:n.width-2*s,"px"),transform:"translateX(".concat(o?n.left-a.left:n.left-a.left+s,"px)"),transitionDuration:"".concat(this.duration,"ms")}}else i<5&&setTimeout((function(){e._computeAnchorStyle(e.focusIndex,i+1)}),200)}},_computeItemText:function(t,e){var i;if("string"==typeof t||"number"==typeof t)i=t;else if(i=t.label||t.name||t.text,this.focusIndex===e){var n=t["label-active"]||t["name-active"]||t["text-active"];n&&(i=n)}return i},_computeItemIcon:function(t,e){var i;return"string"!=typeof t&&"number"!=typeof t&&t.icon?(i=t.icon,this.focusIndex===e&&t["icon-active"]&&(i=t["icon-active"])):i="",i},_computeItemPath:function(t){return"string"==typeof t||"number"==typeof t?"":t.route||""},_setComponentSize:function(){var t=this.$refs.tab;if(t){var e=[];t.forEach((function(t){var i=t instanceof Element?t.getBoundingClientRect():t.$el.getBoundingClientRect();e.push({top:i.top,left:i.left,right:i.right,bottom:i.bottom,width:i.width,height:i.height})})),this.sizeCache.tabs=e}var i=this.$refs.headerWrap;i&&(this.sizeCache.headerWrapWidth=i.clientWidth);var n=this.$refs.tabWrap;n&&(this.sizeCache.tabsWrapWidth=n.clientWidth);var s=this.$refs.header;if(s){var a=s.getBoundingClientRect();this.sizeCache.header={top:a.top,left:a.left,right:a.right,bottom:a.bottom}}var o=this.sizeCache.tabs[this.headerCount-1].right-this.sizeCache.tabs[0].left;this.sizeCache.headerScrollMaxSize=o<this.sizeCache.tabsWrapWidth?0:this.sizeCache.tabsWrapWidth-o},_getComponentSize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=this.sizeCache[t];return i?e>=0?i[e]?i[e]:null:i:null}}},l=i(0),u=Object(l.a)(c,n,[],!1,null,null,null);u.options.__file="src/components/switcher/switcher.vue";var d=u.exports;e.default=d},68:function(t,e,i){}})})); |
{ | ||
"name": "@calibur/sakura", | ||
"version": "2.5.0", | ||
"version": "2.5.1", | ||
"description": "bilibili h5 vue components", | ||
@@ -38,3 +38,3 @@ "main": "lib/index.js", | ||
"@babel/core": "^7.9.0", | ||
"@babel/preset-env": "^7.9.0", | ||
"@babel/preset-env": "^7.9.5", | ||
"@nuxtjs/eslint-config": "^2.0.2", | ||
@@ -44,11 +44,11 @@ "@nuxtjs/eslint-module": "^1.1.0", | ||
"@vant/touch-emulator": "^1.2.0", | ||
"@vue/cli-plugin-babel": "^4.2.3", | ||
"@vue/test-utils": "^1.0.0-beta.32", | ||
"@vue/cli-plugin-babel": "^4.3.1", | ||
"@vue/test-utils": "^1.0.0-beta.33", | ||
"@vuepress/plugin-register-components": "^1.4.0", | ||
"babel-eslint": "^10.1.0", | ||
"babel-jest": "^25.2.4", | ||
"babel-jest": "^25.3.0", | ||
"babel-loader": "^8.1.0", | ||
"core-js": "^3.6.4", | ||
"core-js": "^3.6.5", | ||
"cross-env": "7.0.2", | ||
"css-loader": "3.4.2", | ||
"css-loader": "3.5.2", | ||
"eslint": "^6.8.0", | ||
@@ -60,3 +60,3 @@ "eslint-config-prettier": "^6.10.1", | ||
"file-loader": "^6.0.0", | ||
"jest": "^25.2.4", | ||
"jest": "^25.3.0", | ||
"json-templater": "^1.2.0", | ||
@@ -67,3 +67,3 @@ "koa": "2.11.0", | ||
"node-sass": "^4.13.1", | ||
"nodemon": "^2.0.1", | ||
"nodemon": "^2.0.3", | ||
"nuxt": "2.12.2", | ||
@@ -73,3 +73,3 @@ "optimize-css-assets-webpack-plugin": "^5.0.3", | ||
"postcss-loader": "^3.0.0", | ||
"prettier": "^2.0.2", | ||
"prettier": "^2.0.4", | ||
"qrcode": "^1.4.4", | ||
@@ -82,3 +82,3 @@ "rimraf": "^3.0.2", | ||
"uppercamelcase": "^3.0.0", | ||
"url-loader": "^4.0.0", | ||
"url-loader": "^4.1.0", | ||
"vue-jest": "^4.0.0-0", | ||
@@ -85,0 +85,0 @@ "vue-loader": "^15.9.1", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
737091