UNPKG

quarkd

Version:

Mobile UI Components built on Web Components.

21 lines (18 loc) 40.2 kB
import{b as t}from"./typeof.js"; /*! * better-scroll / core * (c) 2016-2021 ustbhuangyi * Released under the MIT License. */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},e(t,o)};function o(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}var i=function(){return i=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},i.apply(this,arguments)};function n(){for(var t=0,e=0,o=arguments.length;e<o;e++)t+=arguments[e].length;var i=Array(t),n=0;for(e=0;e<o;e++)for(var s=arguments[e],r=0,h=s.length;r<h;r++,n++)i[n]=s[r];return i}var s=[{sourceKey:"scroller.scrollBehaviorX.currentPos",key:"x"},{sourceKey:"scroller.scrollBehaviorY.currentPos",key:"y"},{sourceKey:"scroller.scrollBehaviorX.hasScroll",key:"hasHorizontalScroll"},{sourceKey:"scroller.scrollBehaviorY.hasScroll",key:"hasVerticalScroll"},{sourceKey:"scroller.scrollBehaviorX.contentSize",key:"scrollerWidth"},{sourceKey:"scroller.scrollBehaviorY.contentSize",key:"scrollerHeight"},{sourceKey:"scroller.scrollBehaviorX.maxScrollPos",key:"maxScrollX"},{sourceKey:"scroller.scrollBehaviorY.maxScrollPos",key:"maxScrollY"},{sourceKey:"scroller.scrollBehaviorX.minScrollPos",key:"minScrollX"},{sourceKey:"scroller.scrollBehaviorY.minScrollPos",key:"minScrollY"},{sourceKey:"scroller.scrollBehaviorX.movingDirection",key:"movingDirectionX"},{sourceKey:"scroller.scrollBehaviorY.movingDirection",key:"movingDirectionY"},{sourceKey:"scroller.scrollBehaviorX.direction",key:"directionX"},{sourceKey:"scroller.scrollBehaviorY.direction",key:"directionY"},{sourceKey:"scroller.actions.enabled",key:"enabled"},{sourceKey:"scroller.animater.pending",key:"pending"},{sourceKey:"scroller.animater.stop",key:"stop"},{sourceKey:"scroller.scrollTo",key:"scrollTo"},{sourceKey:"scroller.scrollBy",key:"scrollBy"},{sourceKey:"scroller.scrollToElement",key:"scrollToElement"},{sourceKey:"scroller.resetPosition",key:"resetPosition"}];function r(t){console.error("[BScroll warn]: "+t)}var h="undefined"!=typeof window,a=h&&navigator.userAgent.toLowerCase(),c=!(!a||!/wechatdevtools/.test(a)),l=a&&a.indexOf("android")>0,p=function(){if("string"==typeof a){var t=/os (\d\d?_\d(_\d)?)/.exec(a);if(!t)return!1;var e=t[1].split("_").map((function(t){return parseInt(t,10)}));return!!(13===e[0]&&e[1]>=4)}return!1}(),u=!1;if(h){try{var f={};Object.defineProperty(f,"passive",{get:function(){u=!0}}),window.addEventListener("test-passive",(function(){}),f)}catch(t){}}function d(){return window.performance&&window.performance.now&&window.performance.timing?window.performance.now()+window.performance.timing.navigationStart:+new Date}var v=function(t,e){for(var o in e)t[o]=e[o];return t};function y(t){return null==t}function m(t,e,o){return t<e?e:t>o?o:t}var g=h&&document.createElement("div").style,k=function(){if(!h)return!1;for(var t=0,e=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}];t<e.length;t++){var o=e[t];if(void 0!==g[o.value])return o.key}return!1}();function T(t){return!1===k?t:"standard"===k?"transitionEnd"===t?"transitionend":t:k+t.charAt(0).toUpperCase()+t.substr(1)}function b(t){return"string"==typeof t?document.querySelector(t):t}function S(t,e,o,i){var n=u?{passive:!1,capture:!!i}:!!i;t.addEventListener(e,o,n)}function P(t,e,o,i){t.removeEventListener(e,o,{capture:!!i})}function w(t){for(var e=0,o=0;t;)e-=t.offsetLeft,o-=t.offsetTop,t=t.offsetParent;return{left:e,top:o}}k&&"standard"!==k&&k.toLowerCase();var E=T("transform"),B=T("transition"),C=h&&T("perspective")in g,D=h&&("ontouchstart"in window||c),x=h&&B in g,X={transform:E,transition:B,transitionTimingFunction:T("transitionTimingFunction"),transitionDuration:T("transitionDuration"),transitionDelay:T("transitionDelay"),transformOrigin:T("transformOrigin"),transitionEnd:T("transitionEnd"),transitionProperty:T("transitionProperty")},M={touchstart:1,touchmove:1,touchend:1,touchcancel:1,mousedown:2,mousemove:2,mouseup:2};function Y(t){if(t instanceof window.SVGElement){var e=t.getBoundingClientRect();return{top:e.top,left:e.left,width:e.width,height:e.height}}return{top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}}function O(t,e){for(var o in e)if(e[o].test(t[o]))return!0;return!1}var L=O;function A(t,e){var o;void 0===e&&(e="click"),"mouseup"===t.type?o=t:"touchend"!==t.type&&"touchcancel"!==t.type||(o=t.changedTouches[0]);var n,s={};o&&(s.screenX=o.screenX||0,s.screenY=o.screenY||0,s.clientX=o.clientX||0,s.clientY=o.clientY||0);var r={ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey};if("undefined"!=typeof MouseEvent)try{n=new MouseEvent(e,v(i({bubbles:true,cancelable:true},r),s))}catch(t){h()}else h();function h(){(n=document.createEvent("Event")).initEvent(e,true,true),v(n,s)}n.forwardedTouchEvent=!0,n._constructed=!0,t.target.dispatchEvent(n)}var z={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(t){return 1+--t*t*t*t*t}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(t){return 1- --t*t*t*t}}},H=h&&window;function F(){}var K=h?H.requestAnimationFrame||H.webkitRequestAnimationFrame||H.mozRequestAnimationFrame||H.oRequestAnimationFrame||function(t){return window.setTimeout(t,t.interval||16.666666666666668)}:F,R=h?H.cancelAnimationFrame||H.webkitCancelAnimationFrame||H.mozCancelAnimationFrame||H.oCancelAnimationFrame||function(t){window.clearTimeout(t)}:F,I=function(t){},j={enumerable:!0,configurable:!0,get:I,set:I};function W(e,o,i){j.get=function(){return function(e,o){for(var i=o.split("."),n=0;n<i.length-1;n++)if(e=e[i[n]],"object"!==t(e)||!e)return;var s=i.pop();return"function"==typeof e[s]?function(){return e[s].apply(e,arguments)}:e[s]}(this,o)},j.set=function(t){!function(t,e,o){for(var i,n=e.split("."),s=0;s<n.length-1;s++)t[i=n[s]]||(t[i]={}),t=t[i];t[n.pop()]=o}(this,o,t)},Object.defineProperty(e,i,j)}var _=function(){function t(t){this.events={},this.eventTypes={},this.registerType(t)}return t.prototype.on=function(t,e,o){return void 0===o&&(o=this),this.hasType(t),this.events[t]||(this.events[t]=[]),this.events[t].push([e,o]),this},t.prototype.once=function(t,e,o){var i=this;void 0===o&&(o=this),this.hasType(t);var n=function n(){for(var s=[],r=0;r<arguments.length;r++)s[r]=arguments[r];i.off(t,n);var h=e.apply(o,s);if(!0===h)return h};return n.fn=e,this.on(t,n),this},t.prototype.off=function(t,e){if(!t&&!e)return this.events={},this;if(t){if(this.hasType(t),!e)return this.events[t]=[],this;var o=this.events[t];if(!o)return this;for(var i=o.length;i--;)(o[i][0]===e||o[i][0]&&o[i][0].fn===e)&&o.splice(i,1);return this}},t.prototype.trigger=function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];this.hasType(t);var i=this.events[t];if(i)for(var s,r=i.length,h=n(i),a=0;a<r;a++){var c=h[a],l=c[0],p=c[1];if(l&&!0===(s=l.apply(p,e)))return s}},t.prototype.registerType=function(t){var e=this;t.forEach((function(t){e.eventTypes[t]=t}))},t.prototype.destroy=function(){this.events={},this.eventTypes={}},t.prototype.hasType=function(t){var e=this.eventTypes;e[t]===t||r('EventEmitter has used unknown event type: "'+t+'", should be oneof ['+Object.keys(e).map((function(t){return JSON.stringify(t)}))+"]")},t}(),N=function(){function t(t,e){this.wrapper=t,this.events=e,this.addDOMEvents()}return t.prototype.destroy=function(){this.removeDOMEvents(),this.events=[]},t.prototype.addDOMEvents=function(){this.handleDOMEvents(S)},t.prototype.removeDOMEvents=function(){this.handleDOMEvents(P)},t.prototype.handleDOMEvents=function(t){var e=this,o=this.wrapper;this.events.forEach((function(i){t(o,i.name,e,!!i.capture)}))},t.prototype.handleEvent=function(t){var e=t.type;this.events.some((function(o){return o.name===e&&(o.handler(t),!0)}))},t}(),q=function(e){function i(){var t=e.call(this)||this;return t.startX=0,t.startY=0,t.scrollX=!1,t.scrollY=!0,t.freeScroll=!1,t.directionLockThreshold=0,t.eventPassthrough="",t.click=!1,t.dblclick=!1,t.tap="",t.bounce={top:!0,bottom:!0,left:!0,right:!0},t.bounceTime=800,t.momentum=!0,t.momentumLimitTime=300,t.momentumLimitDistance=15,t.swipeTime=2500,t.swipeBounceTime=500,t.deceleration=.0015,t.flickLimitTime=200,t.flickLimitDistance=100,t.resizePolling=60,t.probeType=0,t.stopPropagation=!1,t.preventDefault=!0,t.preventDefaultException={tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|AUDIO)$/},t.tagException={tagName:/^TEXTAREA$/},t.HWCompositing=!0,t.useTransition=!0,t.bindToWrapper=!1,t.bindToTarget=!1,t.disableMouse=D,t.disableTouch=!D,t.autoBlur=!0,t.autoEndDistance=5,t.outOfBoundaryDampingFactor=1/3,t.specifiedIndexAsContent=0,t.quadrant=1,t}return o(i,e),i.prototype.merge=function(t){if(!t)return this;for(var e in t)"bounce"!==e?this[e]=t[e]:this.bounce=this.resolveBounce(t[e]);return this},i.prototype.process=function(){return this.translateZ=this.HWCompositing&&C?" translateZ(1px)":"",this.useTransition=this.useTransition&&x,this.preventDefault=!this.eventPassthrough&&this.preventDefault,this.scrollX="horizontal"!==this.eventPassthrough&&this.scrollX,this.scrollY="vertical"!==this.eventPassthrough&&this.scrollY,this.freeScroll=this.freeScroll&&!this.eventPassthrough,this.scrollX=!!this.freeScroll||this.scrollX,this.scrollY=!!this.freeScroll||this.scrollY,this.directionLockThreshold=this.eventPassthrough?0:this.directionLockThreshold,this},i.prototype.resolveBounce=function(e){var o={top:!0,right:!0,bottom:!0,left:!0};return"object"===t(e)?v(o,e):e?o:{top:!1,right:!1,bottom:!1,left:!1}},i}((function(){})),U=function(){function t(t,e){this.wrapper=t,this.options=e,this.hooks=new _(["beforeStart","start","move","end","click"]),this.handleDOMEvents()}return t.prototype.handleDOMEvents=function(){var t=this.options,e=t.bindToWrapper,o=t.disableMouse,i=t.disableTouch,n=t.click,s=this.wrapper,r=e?s:window,h=[],a=[],c=!i,l=!o;n&&h.push({name:"click",handler:this.click.bind(this),capture:!0}),c&&(h.push({name:"touchstart",handler:this.start.bind(this)}),a.push({name:"touchmove",handler:this.move.bind(this)},{name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),l&&(h.push({name:"mousedown",handler:this.start.bind(this)}),a.push({name:"mousemove",handler:this.move.bind(this)},{name:"mouseup",handler:this.end.bind(this)})),this.wrapperEventRegister=new N(s,h),this.targetEventRegister=new N(r,a)},t.prototype.beforeHandler=function(t,e){var o=this.options,i=o.preventDefault,n=o.stopPropagation,s=o.preventDefaultException;({start:function(){return i&&!O(t.target,s)},end:function(){return i&&!O(t.target,s)},move:function(){return i}})[e]()&&t.preventDefault(),n&&t.stopPropagation()},t.prototype.setInitiated=function(t){void 0===t&&(t=0),this.initiated=t},t.prototype.start=function(t){var e=M[t.type];if(!this.initiated||this.initiated===e)if(this.setInitiated(e),L(t.target,this.options.tagException))this.setInitiated();else if((2!==e||0===t.button)&&!this.hooks.trigger(this.hooks.eventTypes.beforeStart,t)){this.beforeHandler(t,"start");var o=t.touches?t.touches[0]:t;this.pointX=o.pageX,this.pointY=o.pageY,this.hooks.trigger(this.hooks.eventTypes.start,t)}},t.prototype.move=function(t){if(M[t.type]===this.initiated){this.beforeHandler(t,"move");var e=t.touches?t.touches[0]:t,o=e.pageX-this.pointX,i=e.pageY-this.pointY;if(this.pointX=e.pageX,this.pointY=e.pageY,!this.hooks.trigger(this.hooks.eventTypes.move,{deltaX:o,deltaY:i,e:t})){var n=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,s=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,r=this.pointX-n,h=this.pointY-s,a=this.options.autoEndDistance;(r>document.documentElement.clientWidth-a||h>document.documentElement.clientHeight-a||r<a||h<a)&&this.end(t)}}},t.prototype.end=function(t){M[t.type]===this.initiated&&(this.setInitiated(),this.beforeHandler(t,"end"),this.hooks.trigger(this.hooks.eventTypes.end,t))},t.prototype.click=function(t){this.hooks.trigger(this.hooks.eventTypes.click,t)},t.prototype.setContent=function(t){t!==this.wrapper&&(this.wrapper=t,this.rebindDOMEvents())},t.prototype.rebindDOMEvents=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.handleDOMEvents()},t.prototype.destroy=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.hooks.destroy()},t}(),Z={x:["translateX","px"],y:["translateY","px"]},V=function(){function t(t){this.setContent(t),this.hooks=new _(["beforeTranslate","translate"])}return t.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.content,null)[X.transform].split(")")[0].split(", ");return{x:+(t[12]||t[4])||0,y:+(t[13]||t[5])||0}},t.prototype.translate=function(t){var e=[];Object.keys(t).forEach((function(o){if(Z[o]){var i=Z[o][0];if(i){var n=Z[o][1],s=t[o];e.push(i+"("+s+n+")")}}})),this.hooks.trigger(this.hooks.eventTypes.beforeTranslate,e,t),this.style[X.transform]=e.join(" "),this.hooks.trigger(this.hooks.eventTypes.translate,t)},t.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style)},t.prototype.destroy=function(){this.hooks.destroy()},t}(),$=function(){function t(t,e,o){this.translater=e,this.options=o,this.timer=0,this.hooks=new _(["move","end","beforeForceStop","forceStop","callStop","time","timeFunction"]),this.setContent(t)}return t.prototype.translate=function(t){this.translater.translate(t)},t.prototype.setPending=function(t){this.pending=t},t.prototype.setForceStopped=function(t){this.forceStopped=t},t.prototype.setCallStop=function(t){this.callStopWhenPending=t},t.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style,this.stop())},t.prototype.clearTimer=function(){this.timer&&(R(this.timer),this.timer=0)},t.prototype.destroy=function(){this.hooks.destroy(),R(this.timer)},t}(),G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.startProbe=function(t,e){var o=this,i=t;this.callStopWhenPending&&this.setCallStop(!1),R(this.timer),function n(){var s=o.translater.getComputedPosition();(function(t,e,o,i){var n=function(t,e){var o=t-e;return o>0?-1:o<0?1:0},s=n(e.x,t.x),r=n(e.y,t.y),h=o.x-i.x,a=o.y-i.y;return s*h<=0&&r*a<=0})(t,e,s,i)&&o.hooks.trigger(o.hooks.eventTypes.move,s),o.pending||(o.callStopWhenPending?o.callStopWhenPending=!1:o.hooks.trigger(o.hooks.eventTypes.end,s)),i=s,o.pending&&(o.timer=K(n))}()},e.prototype.transitionTime=function(t){void 0===t&&(t=0),this.style[X.transitionDuration]=t+"ms",this.hooks.trigger(this.hooks.eventTypes.time,t)},e.prototype.transitionTimingFunction=function(t){this.style[X.transitionTimingFunction]=t,this.hooks.trigger(this.hooks.eventTypes.timeFunction,t)},e.prototype.transitionProperty=function(){this.style[X.transitionProperty]=X.transform},e.prototype.move=function(t,e,o,i){this.setPending(o>0),this.transitionTimingFunction(i),this.transitionProperty(),this.transitionTime(o),this.translate(e);var n=3===this.options.probeType;o&&n&&this.startProbe(t,e),o||(this._reflow=this.content.offsetHeight,n&&this.hooks.trigger(this.hooks.eventTypes.move,e),this.hooks.trigger(this.hooks.eventTypes.end,e))},e.prototype.doStop=function(){var t=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),t){this.setPending(!1),R(this.timer);var e=this.translater.getComputedPosition(),o=e.x,i=e.y;this.transitionTime(),this.translate({x:o,y:i}),this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,{x:o,y:i})}return t},e.prototype.stop=function(){this.doStop()&&this.hooks.trigger(this.hooks.eventTypes.callStop)},e}($),J=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.move=function(t,e,o,i){if(!o)return this.translate(e),3===this.options.probeType&&this.hooks.trigger(this.hooks.eventTypes.move,e),void this.hooks.trigger(this.hooks.eventTypes.end,e);this.animate(t,e,o,i)},e.prototype.animate=function(t,e,o,i){var n=this,s=d(),r=s+o,h=3===this.options.probeType;this.setPending(!0),this.callStopWhenPending&&this.setCallStop(!1),R(this.timer),function a(){var c=d();if(c>=r)return n.translate(e),h&&n.hooks.trigger(n.hooks.eventTypes.move,e),void n.hooks.trigger(n.hooks.eventTypes.end,e);var l=i(c=(c-s)/o),p={};Object.keys(e).forEach((function(o){var i=t[o],n=e[o];p[o]=(n-i)*l+i})),n.translate(p),h&&n.hooks.trigger(n.hooks.eventTypes.move,p),n.pending&&(n.timer=K(a)),n.pending||(n.callStopWhenPending?n.callStopWhenPending=!1:n.hooks.trigger(n.hooks.eventTypes.end,e))}()},e.prototype.doStop=function(){var t=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),t){this.setPending(!1),R(this.timer);var e=this.translater.getComputedPosition();this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,e)}return t},e.prototype.stop=function(){this.doStop()&&this.hooks.trigger(this.hooks.eventTypes.callStop)},e}($);var Q,tt,et,ot,it=function(){function t(t,e,o){this.wrapper=t,this.options=o,this.hooks=new _(["beforeComputeBoundary","computeBoundary","momentum","end","ignoreHasScroll"]),this.refresh(e)}return t.prototype.start=function(){this.dist=0,this.setMovingDirection(0),this.setDirection(0)},t.prototype.move=function(t){return t=this.hasScroll?t:0,this.setMovingDirection(t),this.performDampingAlgorithm(t,this.options.outOfBoundaryDampingFactor)},t.prototype.setMovingDirection=function(t){this.movingDirection=t>0?-1:t<0?1:0},t.prototype.setDirection=function(t){this.direction=t>0?-1:t<0?1:0},t.prototype.performDampingAlgorithm=function(t,e){var o=this.currentPos+t;return(o>this.minScrollPos||o<this.maxScrollPos)&&(o=o>this.minScrollPos&&this.options.bounces[0]||o<this.maxScrollPos&&this.options.bounces[1]?this.currentPos+t*e:o>this.minScrollPos?this.minScrollPos:this.maxScrollPos),o},t.prototype.end=function(t){var e={duration:0},o=Math.abs(this.currentPos-this.startPos);if(this.options.momentum&&t<this.options.momentumLimitTime&&o>this.options.momentumLimitDistance){var i=-1===this.direction&&this.options.bounces[0]||1===this.direction&&this.options.bounces[1]?this.wrapperSize:0;e=this.hasScroll?this.momentum(this.currentPos,this.startPos,t,this.maxScrollPos,this.minScrollPos,i,this.options):{destination:this.currentPos,duration:0}}else this.hooks.trigger(this.hooks.eventTypes.end,e);return e},t.prototype.momentum=function(t,e,o,i,n,s,r){void 0===r&&(r=this.options);var h=t-e,a=Math.abs(h)/o,c=r.deceleration,l=r.swipeBounceTime,p=r.swipeTime,u={destination:t+a*a/c*(h<0?-1:1),duration:Math.min(p,2*a/c),rate:15};return this.hooks.trigger(this.hooks.eventTypes.momentum,u,h),u.destination<i?(u.destination=s?Math.max(i-s/4,i-s/u.rate*a):i,u.duration=l):u.destination>n&&(u.destination=s?Math.min(n+s/4,n+s/u.rate*a):n,u.duration=l),u.destination=Math.round(u.destination),u},t.prototype.updateDirection=function(){var t=this.currentPos-this.absStartPos;this.setDirection(t)},t.prototype.refresh=function(t){var e=this.options.rect,o=e.size,i=e.position,n="static"===window.getComputedStyle(this.wrapper,null).position,s=Y(this.wrapper);this.wrapperSize=this.wrapper["width"===o?"clientWidth":"clientHeight"],this.setContent(t);var r=Y(this.content);this.contentSize=r[o],this.relativeOffset=r[i],n&&(this.relativeOffset-=s[i]),this.computeBoundary(),this.setDirection(0)},t.prototype.setContent=function(t){t!==this.content&&(this.content=t,this.resetState())},t.prototype.resetState=function(){this.currentPos=0,this.startPos=0,this.dist=0,this.setDirection(0),this.setMovingDirection(0),this.resetStartPos()},t.prototype.computeBoundary=function(){this.hooks.trigger(this.hooks.eventTypes.beforeComputeBoundary);var t={minScrollPos:0,maxScrollPos:this.wrapperSize-this.contentSize};t.maxScrollPos<0&&(t.maxScrollPos-=this.relativeOffset,0===this.options.specifiedIndexAsContent&&(t.minScrollPos=-this.relativeOffset)),this.hooks.trigger(this.hooks.eventTypes.computeBoundary,t),this.minScrollPos=t.minScrollPos,this.maxScrollPos=t.maxScrollPos,this.hasScroll=this.options.scrollable&&this.maxScrollPos<this.minScrollPos,!this.hasScroll&&this.minScrollPos<this.maxScrollPos&&(this.maxScrollPos=this.minScrollPos,this.contentSize=this.wrapperSize)},t.prototype.updatePosition=function(t){this.currentPos=t},t.prototype.getCurrentPos=function(){return this.currentPos},t.prototype.checkInBoundary=function(){var t=this.adjustPosition(this.currentPos);return{position:t,inBoundary:t===this.getCurrentPos()}},t.prototype.adjustPosition=function(t){return this.hasScroll||this.hooks.trigger(this.hooks.eventTypes.ignoreHasScroll)?t>this.minScrollPos?t=this.minScrollPos:t<this.maxScrollPos&&(t=this.maxScrollPos):t=this.minScrollPos,t},t.prototype.updateStartPos=function(){this.startPos=this.currentPos},t.prototype.updateAbsStartPos=function(){this.absStartPos=this.currentPos},t.prototype.resetStartPos=function(){this.updateStartPos(),this.updateAbsStartPos()},t.prototype.getAbsDist=function(t){return this.dist+=t,Math.abs(this.dist)},t.prototype.destroy=function(){this.hooks.destroy()},t}(),nt=((Q={}).yes=function(t){return!0},Q.no=function(t){return t.preventDefault(),!1},Q),st=((tt={}).horizontal=((et={}).yes="horizontal",et.no="vertical",et),tt.vertical=((ot={}).yes="vertical",ot.no="horizontal",ot),tt),rt=function(){function t(t,e,o){this.directionLockThreshold=t,this.freeScroll=e,this.eventPassthrough=o,this.reset()}return t.prototype.reset=function(){this.directionLocked=""},t.prototype.checkMovingDirection=function(t,e,o){return this.computeDirectionLock(t,e),this.handleEventPassthrough(o)},t.prototype.adjustDelta=function(t,e){return"horizontal"===this.directionLocked?e=0:"vertical"===this.directionLocked&&(t=0),{deltaX:t,deltaY:e}},t.prototype.computeDirectionLock=function(t,e){""!==this.directionLocked||this.freeScroll||(t>e+this.directionLockThreshold?this.directionLocked="horizontal":e>=t+this.directionLockThreshold?this.directionLocked="vertical":this.directionLocked="none")},t.prototype.handleEventPassthrough=function(t){var e=st[this.directionLocked];if(e){if(this.eventPassthrough===e.yes)return nt.yes(t);if(this.eventPassthrough===e.no)return nt.no(t)}return!1},t}(),ht=function(){function t(t,e,o,i,n){this.hooks=new _(["start","beforeMove","scrollStart","scroll","beforeEnd","end","scrollEnd","contentNotMoved","detectMovingDirection","coordinateTransformation"]),this.scrollBehaviorX=t,this.scrollBehaviorY=e,this.actionsHandler=o,this.animater=i,this.options=n,this.directionLockAction=new rt(n.directionLockThreshold,n.freeScroll,n.eventPassthrough),this.enabled=!0,this.bindActionsHandler()}return t.prototype.bindActionsHandler=function(){var t=this;this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.start,(function(e){return!t.enabled||t.handleStart(e)})),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.move,(function(e){var o=e.deltaX,i=e.deltaY,n=e.e;if(!t.enabled)return!0;var s=function(t,e,o){return 2===o?[e,-t]:3===o?[-t,-e]:4===o?[-e,t]:[t,e]}(o,i,t.options.quadrant),r={deltaX:s[0],deltaY:s[1]};return t.hooks.trigger(t.hooks.eventTypes.coordinateTransformation,r),t.handleMove(r.deltaX,r.deltaY,n)})),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.end,(function(e){return!t.enabled||t.handleEnd(e)})),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.click,(function(e){t.enabled&&!e._constructed&&t.handleClick(e)}))},t.prototype.handleStart=function(t){var e=d();this.fingerMoved=!1,this.contentMoved=!1,this.startTime=e,this.directionLockAction.reset(),this.scrollBehaviorX.start(),this.scrollBehaviorY.start(),this.animater.doStop(),this.scrollBehaviorX.resetStartPos(),this.scrollBehaviorY.resetStartPos(),this.hooks.trigger(this.hooks.eventTypes.start,t)},t.prototype.handleMove=function(t,e,o){if(!this.hooks.trigger(this.hooks.eventTypes.beforeMove,o)){var i=this.scrollBehaviorX.getAbsDist(t),n=this.scrollBehaviorY.getAbsDist(e),s=d();if(this.checkMomentum(i,n,s))return!0;if(this.directionLockAction.checkMovingDirection(i,n,o))return this.actionsHandler.setInitiated(),!0;var r=this.directionLockAction.adjustDelta(t,e),h=this.scrollBehaviorX.getCurrentPos(),a=this.scrollBehaviorX.move(r.deltaX),c=this.scrollBehaviorY.getCurrentPos(),l=this.scrollBehaviorY.move(r.deltaY);if(!this.hooks.trigger(this.hooks.eventTypes.detectMovingDirection)){this.fingerMoved||(this.fingerMoved=!0);var p=a!==h||l!==c;this.contentMoved||p||this.hooks.trigger(this.hooks.eventTypes.contentNotMoved),!this.contentMoved&&p&&(this.contentMoved=!0,this.hooks.trigger(this.hooks.eventTypes.scrollStart)),this.contentMoved&&p&&(this.animater.translate({x:a,y:l}),this.dispatchScroll(s))}}},t.prototype.dispatchScroll=function(t){t-this.startTime>this.options.momentumLimitTime&&(this.startTime=t,this.scrollBehaviorX.updateStartPos(),this.scrollBehaviorY.updateStartPos(),1===this.options.probeType&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())),this.options.probeType>1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())},t.prototype.checkMomentum=function(t,e,o){return o-this.endTime>this.options.momentumLimitTime&&e<this.options.momentumLimitDistance&&t<this.options.momentumLimitDistance},t.prototype.handleEnd=function(t){if(!this.hooks.trigger(this.hooks.eventTypes.beforeEnd,t)){var e=this.getCurrentPos();if(this.scrollBehaviorX.updateDirection(),this.scrollBehaviorY.updateDirection(),this.hooks.trigger(this.hooks.eventTypes.end,t,e))return!0;e=this.ensureIntegerPos(e),this.animater.translate(e),this.endTime=d();var o=this.endTime-this.startTime;this.hooks.trigger(this.hooks.eventTypes.scrollEnd,e,o)}},t.prototype.ensureIntegerPos=function(t){this.ensuringInteger=!0;var e=t.x,o=t.y,i=this.scrollBehaviorX,n=i.minScrollPos,s=i.maxScrollPos,r=this.scrollBehaviorY,h=r.minScrollPos,a=r.maxScrollPos;return e=e>0?Math.ceil(e):Math.floor(e),o=o>0?Math.ceil(o):Math.floor(o),{x:e=m(e,s,n),y:o=m(o,a,h)}},t.prototype.handleClick=function(t){O(t.target,this.options.preventDefaultException)||(t.preventDefault(),t.stopPropagation())},t.prototype.getCurrentPos=function(){return{x:this.scrollBehaviorX.getCurrentPos(),y:this.scrollBehaviorY.getCurrentPos()}},t.prototype.refresh=function(){this.endTime=0},t.prototype.destroy=function(){this.hooks.destroy()},t}();function at(t,e,o,i){var n=["momentum","momentumLimitTime","momentumLimitDistance","deceleration","swipeBounceTime","swipeTime","outOfBoundaryDampingFactor","specifiedIndexAsContent"].reduce((function(e,o){return e[o]=t[o],e}),{});return n.scrollable=!!t[e],n.bounces=o,n.rect=i,n}function ct(t,e,o){o.forEach((function(o){var i,s;"string"==typeof o?i=s=o:(i=o.source,s=o.target),t.on(i,(function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return e.trigger.apply(e,n([s],t))}))}))}var lt=function(){function t(t,e,o){this.wrapper=t,this.content=e,this.resizeTimeout=0,this.hooks=new _(["beforeStart","beforeMove","beforeScrollStart","scrollStart","scroll","beforeEnd","scrollEnd","resize","touchEnd","end","flick","scrollCancel","momentum","scrollTo","minDistanceScroll","scrollToElement","beforeRefresh"]),this.options=o;var i,n=this.options.bounce,s=n.left,r=n.right,h=n.top,a=n.bottom;this.scrollBehaviorX=new it(t,e,at(o,"scrollX",[s,r],{size:"width",position:"left"})),this.scrollBehaviorY=new it(t,e,at(o,"scrollY",[h,a],{size:"height",position:"top"})),this.translater=new V(this.content),this.animater=function(t,e,o){var i=o.useTransition,n={};return Object.defineProperty(n,"probeType",{enumerable:!0,configurable:!1,get:function(){return o.probeType}}),i?new G(t,e,n):new J(t,e,n)}(this.content,this.translater,this.options),this.actionsHandler=new U(this.options.bindToTarget?this.content:t,(i=this.options,["click","bindToWrapper","disableMouse","disableTouch","preventDefault","stopPropagation","tagException","preventDefaultException","autoEndDistance"].reduce((function(t,e){return t[e]=i[e],t}),{}))),this.actions=new ht(this.scrollBehaviorX,this.scrollBehaviorY,this.actionsHandler,this.animater,this.options);var c=this.resize.bind(this);this.resizeRegister=new N(window,[{name:"orientationchange",handler:c},{name:"resize",handler:c}]),this.registerTransitionEnd(),this.init()}return t.prototype.init=function(){var t=this;this.bindTranslater(),this.bindAnimater(),this.bindActions(),this.hooks.on(this.hooks.eventTypes.scrollEnd,(function(){t.togglePointerEvents(!0)}))},t.prototype.registerTransitionEnd=function(){this.transitionEndRegister=new N(this.content,[{name:X.transitionEnd,handler:this.transitionEnd.bind(this)}])},t.prototype.bindTranslater=function(){var t=this,e=this.translater.hooks;e.on(e.eventTypes.beforeTranslate,(function(e){t.options.translateZ&&e.push(t.options.translateZ)})),e.on(e.eventTypes.translate,(function(e){var o=t.getCurrentPos();t.updatePositions(e),!0!==t.actions.ensuringInteger?e.x===o.x&&e.y===o.y||t.togglePointerEvents(!1):t.actions.ensuringInteger=!1}))},t.prototype.bindAnimater=function(){var t=this;this.animater.hooks.on(this.animater.hooks.eventTypes.end,(function(e){t.resetPosition(t.options.bounceTime)||(t.animater.setPending(!1),t.hooks.trigger(t.hooks.eventTypes.scrollEnd,e))})),ct(this.animater.hooks,this.hooks,[{source:this.animater.hooks.eventTypes.move,target:this.hooks.eventTypes.scroll},{source:this.animater.hooks.eventTypes.forceStop,target:this.hooks.eventTypes.scrollEnd}])},t.prototype.bindActions=function(){var t=this,e=this.actions;ct(e.hooks,this.hooks,[{source:e.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeStart},{source:e.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeScrollStart},{source:e.hooks.eventTypes.beforeMove,target:this.hooks.eventTypes.beforeMove},{source:e.hooks.eventTypes.scrollStart,target:this.hooks.eventTypes.scrollStart},{source:e.hooks.eventTypes.scroll,target:this.hooks.eventTypes.scroll},{source:e.hooks.eventTypes.beforeEnd,target:this.hooks.eventTypes.beforeEnd}]),e.hooks.on(e.hooks.eventTypes.end,(function(o,i){return t.hooks.trigger(t.hooks.eventTypes.touchEnd,i),!!t.hooks.trigger(t.hooks.eventTypes.end,i)||(!(e.fingerMoved||(t.hooks.trigger(t.hooks.eventTypes.scrollCancel),!t.checkClick(o)))||(t.resetPosition(t.options.bounceTime,z.bounce)?(t.animater.setForceStopped(!1),!0):void 0))})),e.hooks.on(e.hooks.eventTypes.scrollEnd,(function(o,i){var n=Math.abs(o.x-t.scrollBehaviorX.startPos),s=Math.abs(o.y-t.scrollBehaviorY.startPos);if(t.checkFlick(i,n,s))return t.animater.setForceStopped(!1),void t.hooks.trigger(t.hooks.eventTypes.flick);t.momentum(o,i)?t.animater.setForceStopped(!1):(e.contentMoved&&t.hooks.trigger(t.hooks.eventTypes.scrollEnd,o),t.animater.forceStopped&&t.animater.setForceStopped(!1))}))},t.prototype.checkFlick=function(t,e,o){if(this.hooks.events.flick.length>1&&t<this.options.flickLimitTime&&e<this.options.flickLimitDistance&&o<this.options.flickLimitDistance&&(o>1||e>1))return!0},t.prototype.momentum=function(t,e){var o={time:0,easing:z.swiper,newX:t.x,newY:t.y},i=this.scrollBehaviorX.end(e),n=this.scrollBehaviorY.end(e);if(o.newX=y(i.destination)?o.newX:i.destination,o.newY=y(n.destination)?o.newY:n.destination,o.time=Math.max(i.duration,n.duration),this.hooks.trigger(this.hooks.eventTypes.momentum,o,this),o.newX!==t.x||o.newY!==t.y)return(o.newX>this.scrollBehaviorX.minScrollPos||o.newX<this.scrollBehaviorX.maxScrollPos||o.newY>this.scrollBehaviorY.minScrollPos||o.newY<this.scrollBehaviorY.maxScrollPos)&&(o.easing=z.swipeBounce),this.scrollTo(o.newX,o.newY,o.time,o.easing),!0},t.prototype.checkClick=function(t){var e=this.animater.forceStopped;if(this.hooks.trigger(this.hooks.eventTypes.checkClick))return this.animater.setForceStopped(!1),!0;if(!e){var o=this.options.dblclick,i=!1;if(o&&this.lastClickTime){var n=o.delay,s=void 0===n?300:n;d()-this.lastClickTime<s&&(i=!0,function(t){A(t,"dblclick")}(t))}return this.options.tap&&function(t,e){var o=document.createEvent("Event");o.initEvent(e,!0,!0),o.pageX=t.pageX,o.pageY=t.pageY,t.target.dispatchEvent(o)}(t,this.options.tap),this.options.click&&!O(t.target,this.options.preventDefaultException)&&A(t),this.lastClickTime=i?null:d(),!0}return!1},t.prototype.resize=function(){var t=this;this.actions.enabled&&(l&&(this.wrapper.scrollTop=0),clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout((function(){t.hooks.trigger(t.hooks.eventTypes.resize)}),this.options.resizePolling))},t.prototype.transitionEnd=function(t){t.target===this.content&&this.animater.pending&&(this.animater.transitionTime(),this.resetPosition(this.options.bounceTime,z.bounce)||(this.animater.setPending(!1),3!==this.options.probeType&&this.hooks.trigger(this.hooks.eventTypes.scrollEnd,this.getCurrentPos())))},t.prototype.togglePointerEvents=function(t){void 0===t&&(t=!0);for(var e=this.content.children.length?this.content.children:[this.content],o=t?"auto":"none",i=0;i<e.length;i++){var n=e[i];n.isBScrollContainer||(n.style.pointerEvents=o)}},t.prototype.refresh=function(t){var e=this.setContent(t);this.hooks.trigger(this.hooks.eventTypes.beforeRefresh),this.scrollBehaviorX.refresh(t),this.scrollBehaviorY.refresh(t),e&&(this.translater.setContent(t),this.animater.setContent(t),this.transitionEndRegister.destroy(),this.registerTransitionEnd(),this.options.bindToTarget&&this.actionsHandler.setContent(t)),this.actions.refresh(),this.wrapperOffset=w(this.wrapper)},t.prototype.setContent=function(t){var e=t!==this.content;return e&&(this.content=t),e},t.prototype.scrollBy=function(t,e,o,i){void 0===o&&(o=0);var n=this.getCurrentPos(),s=n.x,r=n.y;i=i||z.bounce,t+=s,e+=r,this.scrollTo(t,e,o,i)},t.prototype.scrollTo=function(t,e,o,n,s){void 0===o&&(o=0),void 0===n&&(n=z.bounce),void 0===s&&(s={start:{},end:{}});var r=this.options.useTransition?n.style:n.fn,h=this.getCurrentPos(),a=i({x:h.x,y:h.y},s.start),c=i({x:t,y:e},s.end);if(this.hooks.trigger(this.hooks.eventTypes.scrollTo,c),!function(t,e){for(var o=0,i=Object.keys(t);o<i.length;o++){var n=i[o];if(t[n]!==e[n])return!1}return!0}(a,c)){var l=Math.abs(c.x-a.x),p=Math.abs(c.y-a.y);l<1&&p<1&&(o=0,this.hooks.trigger(this.hooks.eventTypes.minDistanceScroll)),this.animater.move(a,c,o,r)}},t.prototype.scrollToElement=function(t,e,o,i,n){var s=b(t),r=w(s),h=function(t,e,o){return"number"==typeof t?t:t?Math.round(e/2-o/2):0};o=h(o,s.offsetWidth,this.wrapper.offsetWidth),i=h(i,s.offsetHeight,this.wrapper.offsetHeight);var a=function(t,e,o,i){return t-=e,t=i.adjustPosition(t-o)};r.left=a(r.left,this.wrapperOffset.left,o,this.scrollBehaviorX),r.top=a(r.top,this.wrapperOffset.top,i,this.scrollBehaviorY),this.hooks.trigger(this.hooks.eventTypes.scrollToElement,s,r)||this.scrollTo(r.left,r.top,e,n)},t.prototype.resetPosition=function(t,e){void 0===t&&(t=0),void 0===e&&(e=z.bounce);var o=this.scrollBehaviorX.checkInBoundary(),i=o.position,n=o.inBoundary,s=this.scrollBehaviorY.checkInBoundary(),r=s.position,h=s.inBoundary;return(!n||!h)&&(p&&this.reflow(),this.scrollTo(i,r,t,e),!0)},t.prototype.reflow=function(){this._reflow=this.content.offsetHeight},t.prototype.updatePositions=function(t){this.scrollBehaviorX.updatePosition(t.x),this.scrollBehaviorY.updatePosition(t.y)},t.prototype.getCurrentPos=function(){return this.actions.getCurrentPos()},t.prototype.enable=function(){this.actions.enabled=!0},t.prototype.disable=function(){R(this.animater.timer),this.actions.enabled=!1},t.prototype.destroy=function(){var t=this;["resizeRegister","transitionEndRegister","actionsHandler","actions","hooks","animater","translater","scrollBehaviorX","scrollBehaviorY"].forEach((function(e){return t[e].destroy()}))},t}(),pt=function(t){function e(e,o){var i=t.call(this,["refresh","contentChanged","enable","disable","beforeScrollStart","scrollStart","scroll","scrollEnd","scrollCancel","touchEnd","flick","destroy"])||this,n=b(e);return n?(i.plugins={},i.options=(new q).merge(o).process(),i.setContent(n).valid?(i.hooks=new _(["refresh","enable","disable","destroy","beforeInitialScrollTo","contentChanged"]),i.init(n),i):i):(r("Can not resolve the wrapper DOM."),i)}return o(e,t),e.use=function(t){var o=t.pluginName;return e.plugins.some((function(e){return t===e.ctor}))?e:y(o)?(r("Plugin Class must specify plugin's name in static property by 'pluginName' field."),e):(e.pluginsMap[o]=!0,e.plugins.push({name:o,applyOrder:t.applyOrder,ctor:t}),e)},e.prototype.setContent=function(t){var e=!1,o=!0,i=t.children[this.options.specifiedIndexAsContent];return i?(e=this.content!==i)&&(this.content=i):(r("The wrapper need at least one child element to be content element to scroll."),o=!1),{valid:o,contentChanged:e}},e.prototype.init=function(t){var e=this;this.wrapper=t,t.isBScrollContainer=!0,this.scroller=new lt(t,this.content,this.options),this.scroller.hooks.on(this.scroller.hooks.eventTypes.resize,(function(){e.refresh()})),this.eventBubbling(),this.handleAutoBlur(),this.enable(),this.proxy(s),this.applyPlugins(),this.refreshWithoutReset(this.content);var o=this.options,i={x:o.startX,y:o.startY};this.hooks.trigger(this.hooks.eventTypes.beforeInitialScrollTo,i)||this.scroller.scrollTo(i.x,i.y)},e.prototype.applyPlugins=function(){var t=this,o=this.options;e.plugins.sort((function(t,e){var o,i=((o={}).pre=-1,o.post=1,o);return(t.applyOrder?i[t.applyOrder]:0)-(e.applyOrder?i[e.applyOrder]:0)})).forEach((function(e){var i=e.ctor;o[e.name]&&"function"==typeof i&&(t.plugins[e.name]=new i(t))}))},e.prototype.handleAutoBlur=function(){this.options.autoBlur&&this.on(this.eventTypes.beforeScrollStart,(function(){var t=document.activeElement;!t||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName||t.blur()}))},e.prototype.eventBubbling=function(){ct(this.scroller.hooks,this,[this.eventTypes.beforeScrollStart,this.eventTypes.scrollStart,this.eventTypes.scroll,this.eventTypes.scrollEnd,this.eventTypes.scrollCancel,this.eventTypes.touchEnd,this.eventTypes.flick])},e.prototype.refreshWithoutReset=function(t){this.scroller.refresh(t),this.hooks.trigger(this.hooks.eventTypes.refresh,t),this.trigger(this.eventTypes.refresh,t)},e.prototype.proxy=function(t){var e=this;t.forEach((function(t){var o=t.key,i=t.sourceKey;W(e,i,o)}))},e.prototype.refresh=function(){var t=this.setContent(this.wrapper),e=t.contentChanged;if(t.valid){var o=this.content;this.refreshWithoutReset(o),e&&(this.hooks.trigger(this.hooks.eventTypes.contentChanged,o),this.trigger(this.eventTypes.contentChanged,o)),this.scroller.resetPosition()}},e.prototype.enable=function(){this.scroller.enable(),this.hooks.trigger(this.hooks.eventTypes.enable),this.trigger(this.eventTypes.enable)},e.prototype.disable=function(){this.scroller.disable(),this.hooks.trigger(this.hooks.eventTypes.disable),this.trigger(this.eventTypes.disable)},e.prototype.destroy=function(){this.hooks.trigger(this.hooks.eventTypes.destroy),this.trigger(this.eventTypes.destroy),this.scroller.destroy()},e.prototype.eventRegister=function(t){this.registerType(t)},e.plugins=[],e.pluginsMap={},e}(_);function ut(t,e){return new pt(t,e)}ut.use=pt.use,ut.plugins=pt.plugins,ut.pluginsMap=pt.pluginsMap;var ft=ut;export{ft as B};