UNPKG

lity-ui

Version:

<p align="center"> <br> <a href="https://web-hxx.github.io/lity-ui"> <img width="200" src="https://cn.vuejs.org/images/logo.svg"> </a> <br> <span style="font-size:50px;font-weight:bold">一只基于Vue3.x的移动端UI。 -LITYUI Touch</

20 lines (18 loc) 87 kB
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue")):"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["lity-ui"]=e(require("vue")):t["lity-ui"]=e(t["Vue"])})("undefined"!==typeof self?self:this,(function(t){return function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s="fb15")}({"0289":function(t,e,o){},"037c":function(t,e,o){},"0b8c":function(t,e,o){"use strict";o("f6ed")},"0ddd":function(t,e,o){"use strict";o("037c")},"1cd2":function(t,e,o){"use strict";o("c4c0")},"2a0f":function(t,e,o){},"2ac7":function(t,e,o){"use strict";o("b6cd")},"2b31":function(t,e,o){"use strict";o("3159")},"30f8":function(t,e,o){},3159:function(t,e,o){},"4abf":function(t,e,o){"use strict";o("d180")},"55a1":function(t,e,o){"use strict";o("ddd7")},6077:function(t,e,o){"use strict";o("fbf6")},6716:function(t,e,o){"use strict";o("f035")},"70fe":function(t,e,o){"use strict";o("0289")},8875:function(t,e,o){var n,i,r;(function(o,s){i=[],n=s,r="function"===typeof n?n.apply(e,i):n,void 0===r||(t.exports=r)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(d){var o,n,i,r=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,s=/@([^@]*):(\d+):(\d+)\s*$/gi,a=r.exec(d.stack)||s.exec(d.stack),c=a&&a[1]||!1,l=a&&a[2]||!1,h=document.location.href.replace(document.location.hash,""),p=document.getElementsByTagName("script");c===h&&(o=document.documentElement.outerHTML,n=new RegExp("(?:[^\\n]+?\\n){0,"+(l-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=o.replace(n,"$1").trim());for(var u=0;u<p.length;u++){if("interactive"===p[u].readyState)return p[u];if(p[u].src===c)return p[u];if(c===h&&p[u].innerHTML&&p[u].innerHTML.trim()===i)return p[u]}return null}}return t}))},"8bbf":function(e,o){e.exports=t},9244:function(t,e,o){},"9e51":function(t,e,o){"use strict";o("f94e")},ac38:function(t,e,o){},adba:function(t,e,o){"use strict";o("b580")},b50d:function(t,e,o){},b580:function(t,e,o){},b6cd:function(t,e,o){},b735:function(t,e,o){"use strict";o("eb88")},c4c0:function(t,e,o){},cd72:function(t,e,o){"use strict";o("e6ac")},d180:function(t,e,o){},d3c0:function(t,e,o){"use strict";o("b50d")},d504:function(t,e,o){"use strict";o("ac38")},ddd7:function(t,e,o){},e6ac:function(t,e,o){},ea2f:function(t,e,o){"use strict";o("9244")},eb88:function(t,e,o){},f035:function(t,e,o){},f6ed:function(t,e,o){},f94e:function(t,e,o){},fb15:function(t,e,o){"use strict";if(o.r(e),o.d(e,"Base",(function(){return u.a})),o.d(e,"Button",(function(){return mn})),o.d(e,"CheckboxGroup",(function(){return bn})),o.d(e,"Checkbox",(function(){return kn})),o.d(e,"GridItem",(function(){return Tn})),o.d(e,"Icon",(function(){return On})),o.d(e,"Input",(function(){return Pn})),o.d(e,"Loading",(function(){return Sn})),o.d(e,"Radio",(function(){return xn})),o.d(e,"RadioGroup",(function(){return jn})),o.d(e,"Rate",(function(){return Bn})),o.d(e,"Slider",(function(){return wn})),o.d(e,"SliderItem",(function(){return Cn})),o.d(e,"Switch",(function(){return Mn})),o.d(e,"Tab",(function(){return Xn})),o.d(e,"TabPanel",(function(){return Yn})),o.d(e,"Tag",(function(){return En})),o.d(e,"Textarea",(function(){return Ln})),o.d(e,"Toast",(function(){return sn})),o.d(e,"Dialog",(function(){return vn})),"undefined"!==typeof window){var n=window.document.currentScript,i=o("8875");n=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var r=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(o.p=r[1])}o("2a0f");var s=o("8bbf");function a(t,e,o,n,i,r){return Object(s["openBlock"])(),Object(s["createBlock"])("button",{class:["lity-btn",n.btnClass],type:o.type,style:{},onClick:e[1]||(e[1]=(...t)=>n.handleClick&&n.handleClick(...t))},[o.icon?(Object(s["openBlock"])(),Object(s["createBlock"])("i",{key:0,class:o.icon},null,2)):Object(s["createCommentVNode"])("",!0),Object(s["renderSlot"])(t.$slots,"default")],10,["type"])}const c="lity-button";var l={name:c,emits:["click"],props:{icon:{type:String,default:""},disabled:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},primary:{type:Boolean,default:!1},success:{type:Boolean,default:!1},warning:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},outline:{type:Boolean,default:!1},square:{type:Boolean,default:!1},default:{type:Boolean,default:!1},type:{type:String,default:"button"}},setup(t,e){const o=Object(s["computed"])(()=>({"lity-btn_active":t.active,"lity-btn_disabled":t.disabled,"lity-btn-inline":t.inline,"lity-btn-primary":t.primary,"lity-btn-success":t.success,"lity-btn-warning":t.warning,"lity-btn-danger":t.danger,"lity-btn-outline":t.outline,"lity-btn-square":t.square,"lity-btn-default":t.default}));function n(o){if(t.disabled)return o.preventDefault(),void o.stopPropagation();e.emit("click",o)}return{handleClick:n,btnClass:o}}};o("9e51");l.render=a;var h=l,p=o("30f8"),u=o.n(p);const d={class:"lity-checkbox-group"};function f(t,e,o,n,i,r){return Object(s["openBlock"])(),Object(s["createBlock"])("div",d,[Object(s["renderSlot"])(t.$slots,"default")])}const g=function(t){const e=/^#([a-fA-F0-9]){3}(([a-fA-F0-9]){3})?$/,o=/^[rR][gG][bB][aA]\(\s*((25[0-5]|2[0-4]\d|1?\d{1,2})\s*,\s*){3}\s*(\.|\d+\.)?\d+\s*\)$/,n=/^[rR][gG][bB]\(\s*((25[0-5]|2[0-4]\d|1?\d{1,2})\s*,\s*){2}(25[0-5]|2[0-4]\d|1?\d{1,2})\s*\)$/;return e.test(t)||o.test(t)||n.test(t)},y=function(){const t=function(t){t.preventDefault(),t.stopPropagation()};let e=!1;return{lock(o){e||(e=!0,(o||document).addEventListener("touchmove",t))},unlock(o){e=!1,(o||document).removeEventListener("touchmove",t)}}}(),v="lity-checkbox-group";var m={name:v,emits:["change","update:modelValue"],props:{modelValue:{type:Array,default(){return[]}},color:{validator(t){return!t||g(t)},default:"#07c160"},size:{type:Number,default:20},shape:{validator(t){return["square","circle"].indexOf(t)>-1},default:"square"}},setup(t,e){Object(s["provide"])("groupCheckbox",{props:t,context:e})}};m.render=f;var b=m;const k={key:0,class:"lity-checkbox-text"},T={key:1,class:"lity-checkbox-text"};function O(t,e,o,n,i,r){return Object(s["openBlock"])(),Object(s["createBlock"])("label",{class:["lity-checkbox","circle"==n.shapeClass?"lity-checkbox-circle":""]},[Object(s["withDirectives"])(Object(s["createVNode"])("input",{type:"checkbox",onChange:e[1]||(e[1]=t=>n.changeHandler(n.checked)),"onUpdate:modelValue":e[2]||(e[2]=t=>n.checked=t),value:o.val,disabled:o.disabled},null,40,["value","disabled"]),[[s["vModelCheckbox"],n.checked]]),Object(s["createVNode"])("span",{class:"lity-checkbox-icon",style:n.iconStyles},[Object(s["createVNode"])("i",{style:n.checkIconStyles},null,4)],4),n.slots?(Object(s["openBlock"])(),Object(s["createBlock"])("span",T,[Object(s["renderSlot"])(t.$slots,"default")])):(Object(s["openBlock"])(),Object(s["createBlock"])("span",k,Object(s["toDisplayString"])(o.val),1))],2)}const P="lity-checkbox";var S={name:P,props:{modelValue:{type:[Boolean,String,Number],default:!1},val:{type:[Boolean,String,Number]},disabled:{type:Boolean,default:!1},color:{validator(t){return!t||g(t)},default:"#07c160"},size:{type:Number,default:20},shape:{validator(t){return["square","circle"].indexOf(t)>-1},default:"square"}},emits:["change","update:modelValue"],setup(t,e){const o=Object(s["inject"])("groupCheckbox",""),n=Object(s["ref"])(e.slots.default&&e.slots.default()),i=Object(s["computed"])(()=>o?o.props.shape:t.shape),r=Object(s["computed"])({get(){return o?o.props.modelValue:t.modelValue},set(t){o?o.context.emit("update:modelValue",t):e.emit("update:modelValue",t)}}),a=Object(s["computed"])(()=>{const e=(o?o.props.size:t.size)+"px",n=o?o.props.color:t.color;return{width:e,height:e,color:n}}),c=Object(s["computed"])(()=>{const e=o?o.props.size:t.size;return{width:Math.round(e/3.2)+"px",height:Math.round(e/1.7)+"px"}});function l(n){if(t.disabled)return!1;o?o.context.emit("change",n):e.emit("change",n)}return{changeHandler:l,iconStyles:a,slots:n,checked:r,shapeClass:i,checkIconStyles:c}}};o("0ddd");S.render=O;var x=S;function j(t,e,o,n,i,r){return Object(s["openBlock"])(),Object(s["createBlock"])("div",{class:n.classes},[Object(s["renderSlot"])(t.$slots,"default")],2)}const B="lity-grid";var w={name:B,props:{rows:{validator(t){return["2","3","4","5"].indexOf(t+"")>-1},default:"4"}},setup(t){const e=Object(s["computed"])(()=>"lity-grids-"+t.rows);return{classes:e}}};o("ea2f");w.render=j;var C=w;const M={key:0,class:"lity-grids-icon"},X={key:1,class:"lity-grids-txt"},Y={key:0,class:"lity-grids-icon"},E={key:1,class:"lity-grids-txt"};function L(t,e,o,n,i,r){const a=Object(s["resolveComponent"])("router-link");return"link"==o.type?(Object(s["openBlock"])(),Object(s["createBlock"])(a,{key:0,class:"lity-grids-item",to:o.link||"",style:n.styles},{default:Object(s["withCtx"])(()=>[n.checkIcon?(Object(s["openBlock"])(),Object(s["createBlock"])("div",M,[Object(s["renderSlot"])(t.$slots,"icon")])):Object(s["createCommentVNode"])("",!0),n.checkText?(Object(s["openBlock"])(),Object(s["createBlock"])("div",X,[Object(s["renderSlot"])(t.$slots,"text")])):Object(s["createCommentVNode"])("",!0),Object(s["renderSlot"])(t.$slots,"other")]),_:3},8,["to","style"])):(Object(s["openBlock"])(),Object(s["createBlock"])("a",{key:1,class:"lity-grids-item",href:o.link||"",style:n.styles},[n.checkIcon?(Object(s["openBlock"])(),Object(s["createBlock"])("div",Y,[Object(s["renderSlot"])(t.$slots,"icon")])):Object(s["createCommentVNode"])("",!0),n.checkText?(Object(s["openBlock"])(),Object(s["createBlock"])("div",E,[Object(s["renderSlot"])(t.$slots,"text")])):Object(s["createCommentVNode"])("",!0),Object(s["renderSlot"])(t.$slots,"other")],12,["href"]))}const D="lity-grid-item";var V={name:D,props:{type:{validator(t){return["link","a"].indexOf(t+"")>-1},default:"link"},link:[String,Object],style:{type:String}},setup(t,e){const o=Object(s["computed"])(()=>!!e.slots.icon),n=Object(s["computed"])(()=>!!e.slots.text),i=Object(s["computed"])(()=>e.style);return{checkIcon:o,checkText:n,styles:i}}};o("55a1");V.render=L;var H=V;function N(t,e,o,n,i,r){return Object(s["openBlock"])(),Object(s["createBlock"])("i",{class:o.name,style:{fontSize:o.size+"px",color:o.color}},null,6)}const z="lity-icon";var I={name:z,props:{name:{type:String,default:""},size:{type:Number,default:20},color:{validator(t){return!t||g(t)},default:"inherit"}}};I.render=N;var A=I;const F={key:0,class:"lity-input-prepend"},R={key:1,class:"lity-input-append"},W=Object(s["createVNode"])("i",{class:"lityic-close_fill"},null,-1);function $(t,e,o,n,i,r){return Object(s["openBlock"])(),Object(s["createBlock"])("div",{class:["lity-input",{"lity-input_active":n.isFocus}]},[t.$slots.prepend?(Object(s["openBlock"])(),Object(s["createBlock"])("div",F,[Object(s["renderSlot"])(t.$slots,"prepend")])):Object(s["createCommentVNode"])("",!0),Object(s["withDirectives"])(Object(s["createVNode"])("input",{class:"lity-input-field",ref:"input","onUpdate:modelValue":e[1]||(e[1]=t=>n.inputValue=t),name:o.name,placeholder:o.placeholder,minlength:o.minlength,maxlength:o.maxlength,type:o.type,disabled:o.disabled,readonly:o.readonly,autocomplete:o.autocomplete,autofocus:o.autofocus,onFocus:e[2]||(e[2]=(...t)=>n.handleFocus&&n.handleFocus(...t)),onBlur:e[3]||(e[3]=(...t)=>n.handleBlur&&n.handleBlur(...t)),onChange:e[4]||(e[4]=(...t)=>n.changeHander&&n.changeHander(...t))},null,40,["name","placeholder","minlength","maxlength","type","disabled","readonly","autocomplete","autofocus"]),[[s["vModelDynamic"],n.inputValue]]),t.$slots.append||n.showClear?(Object(s["openBlock"])(),Object(s["createBlock"])("div",R,[n.showClear?(Object(s["openBlock"])(),Object(s["createBlock"])("div",{key:0,class:"lity-input-clear",onClick:e[5]||(e[5]=(...t)=>n.handleClear&&n.handleClear(...t))},[W])):Object(s["createCommentVNode"])("",!0),Object(s["renderSlot"])(t.$slots,"append")])):Object(s["createCommentVNode"])("",!0)],2)}const _="lity-input";var K={name:_,emits:["change","blur","focus","clear","update:modelValue"],props:{modelValue:[String,Number],type:{type:String,default:"text"},disabled:{type:Boolean,default:!1},placeholder:String,readonly:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},autocomplete:{type:[Boolean,String],default:!1},name:String,minlength:Number,maxlength:Number,clearable:{type:Boolean,default:!1}},setup(t,e){const o=Object(s["ref"])(!1),n=Object(s["computed"])(()=>!!i.value),i=Object(s["computed"])({get(){return t.modelValue},set(t){e.emit("update:modelValue",t)}});function r(t){i.value="",n.value=!1,e.emit("clear",t)}function a(t){e.emit("focus",t),o.value=!0}function c(t){e.emit("blur",t),o.value=!1}function l(t){e.emit("change",i.value)}return{inputValue:i,isFocus:o,showClear:n,handleClear:r,handleFocus:a,handleBlur:c,changeHander:l}}};o("2ac7");K.render=$;var q=K;const U={class:"lity-loading"};function G(t,e,o,n,i,r){return Object(s["openBlock"])(),Object(s["createBlock"])("div",U,[Object(s["createVNode"])("span",{class:"lity-loading-spinners",style:n.sizeFont},[(Object(s["openBlock"])(!0),Object(s["createBlock"])(s["Fragment"],null,Object(s["renderList"])(n.balde,t=>(Object(s["openBlock"])(),Object(s["createBlock"])("i",{class:"lity-loading-spinner",style:n.bgColor,key:t},null,4))),128))],4)])}const Z="lity-loading";var J={name:Z,props:{size:{type:Number},color:{validator(t){return!t||g(t)},default:"#666"}},setup(t){const e=Object(s["ref"])(12),o=Object(s["computed"])(()=>{if(!t.size)return;const e=t.size+"px";return{width:e,height:e}}),n=Object(s["computed"])(()=>{if(!t.color)return;const e=""+t.color;return{backgroundColor:e}});return{balde:e,sizeFont:o,bgColor:n}}};o("d3c0");J.render=G;var Q=J;const tt={class:"lity-radio"},et={key:0,class:"lity-radio-text"},ot={key:1,class:"lity-radio-text"};function nt(t,e,o,n,i,r){return Object(s["openBlock"])(),Object(s["createBlock"])("label",tt,[Object(s["withDirectives"])(Object(s["createVNode"])("input",{type:"radio",onChange:e[1]||(e[1]=(...t)=>n.changeHandler&&n.changeHandler(...t)),"onUpdate:modelValue":e[2]||(e[2]=t=>n.checked=t),value:o.val,disabled:o.disabled},null,40,["value","disabled"]),[[s["vModelRadio"],n.checked]]),Object(s["createVNode"])("span",{class:"lity-radio-icon",style:[{color:n.iconColor},n.iconStyles(1)]},[Object(s["createVNode"])("i",{style:n.iconStyles(2)},null,4)],4),n.slots?(Object(s["openBlock"])(),Object(s["createBlock"])("span",ot,[Object(s["renderSlot"])(t.$slots,"default")])):(Object(s["openBlock"])(),Object(s["createBlock"])("span",et,Object(s["toDisplayString"])(o.val),1))])}const it="lity-radio";var rt={name:it,props:{val:{type:[Boolean,String,Number]},disabled:{type:Boolean,default:!1}},emits:["change"],setup(t,e){const o=Object(s["inject"])("groupRadio"),n=Object(s["ref"])(e.slots.default&&e.slots.default()),i=Object(s["computed"])(()=>o.props.color),r=Object(s["computed"])({get(){return o.props.modelValue},set(t){o.context.emit("update:modelValue",t)}});function a(t){const e=o.props.size/t+"px";return{width:e,height:e}}function c(e){if(t.disabled)return!1;o.context.emit("change",e.target.checked)}return{slots:n,checked:r,changeHandler:c,iconStyles:a,iconColor:i}}};o("cd72");rt.render=nt;var st=rt;const at={class:"lity-radio-group"};function ct(t,e,o,n,i,r){return Object(s["openBlock"])(),Object(s["createBlock"])("div",at,[Object(s["renderSlot"])(t.$slots,"default")])}const lt="lity-radio-group";var ht={name:lt,emits:["change"],props:{modelValue:{type:[String,Number]},color:{validator(t){return!t||g(t)},default:"#07c160"},size:{type:Number,default:20}},setup(t,e){Object(s["provide"])("groupRadio",{props:t,context:e})}};ht.render=ct;var pt=ht;function ut(t,e,o,n,i,r){return Object(s["openBlock"])(),Object(s["createBlock"])("span",{class:"lity-rate",style:{color:o.color}},[(Object(s["openBlock"])(!0),Object(s["createBlock"])(s["Fragment"],null,Object(s["renderList"])(~~o.count,(t,e)=>(Object(s["openBlock"])(),Object(s["createBlock"])("a",{href:"javascript:;",key:e,class:n.checkVal>=t?"lityic-collect_fill":"lityic-collect",style:{color:n.checkVal>=t?o.activeColor:o.color,fontSize:o.size+"px",paddingRight:o.justify+"px"},onClick:e=>!o.readonly&&n.choose(t)},null,14,["onClick"]))),128)),n.str?(Object(s["openBlock"])(),Object(s["createBlock"])("span",{key:0,class:"lity-rate-text",innerHTML:n.str},null,8,["innerHTML"])):Object(s["createCommentVNode"])("",!0)],4)}const dt="lity-rate";var ft={name:dt,emits:["update:modelValue"],props:{count:{validator(t){return/^(([1-9]\d*)|0)$/.test(t)},default:5},size:{type:Number,default:20},color:{validator(t){return!t||g(t)},default:"#EAEAEA"},activeColor:{validator(t){return!t||g(t)},default:"#FF5D50"},modelValue:{type:Number,default:0},showText:{type:Array,default(){return[]}},readonly:{type:Boolean,default:!1},justify:{type:Number,default:5}},setup(t,e){const o=Object(s["ref"])(""),n=Object(s["ref"])(t.modelValue);function i(i){n.value=i,e.emit("update:modelValue",i),t.showText&&(o.value=t.showText[i-1]||"")}return Object(s["onMounted"])(()=>{Object(s["nextTick"])(()=>i(t.modelValue))}),{checkVal:n,str:o,choose:i}}};o("4abf");ft.render=ut;var gt=ft;const yt={class:"lity-slider-group"};function vt(t,e,o,n,i,r){return Object(s["openBlock"])(),Object(s["createBlock"])("div",{class:["lity-slider","vertical"==o.direction?"lity-slider-vertical":""],ref:"rootRef",onChange:e[1]||(e[1]=(...e)=>t.changeHander&&t.changeHander(...e))},[Object(s["createVNode"])("div",yt,[Object(s["renderSlot"])(t.$slots,"default")]),o.showDot&&o.data.length>1?(Object(s["openBlock"])(),Object(s["createBlock"])("div",{key:0,class:"vertical"==o.direction?"lity-dots-vertical":"lity-dots-wrapper"},[(Object(s["openBlock"])(!0),Object(s["createBlock"])(s["Fragment"],null,Object(s["renderList"])(o.data,(t,e)=>(Object(s["openBlock"])(),Object(s["createBlock"])("span",{class:["lity-dot",{"lity-dot-active":n.currentPageIndex===e}],key:e},null,2))),128))],2)):Object(s["createCommentVNode"])("",!0)],34)} /*! * 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 mt=function(t,e){return mt=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])},mt(t,e)};function bt(t,e){function o(){this.constructor=t}mt(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}var kt=function(){return kt=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var i in e=arguments[o],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},kt.apply(this,arguments)};function Tt(){for(var t=0,e=0,o=arguments.length;e<o;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<o;e++)for(var r=arguments[e],s=0,a=r.length;s<a;s++,i++)n[i]=r[s];return n}var Ot=[{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 Pt(t){console.error("[BScroll warn]: "+t)}var St="undefined"!==typeof window,xt=St&&navigator.userAgent.toLowerCase(),jt=!(!xt||!/wechatdevtools/.test(xt)),Bt=xt&&xt.indexOf("android")>0,wt=function(){if("string"===typeof xt){var t=/os (\d\d?_\d(_\d)?)/,e=t.exec(xt);if(!e)return!1;var o=e[1].split("_").map((function(t){return parseInt(t,10)}));return!!(13===o[0]&&o[1]>=4)}return!1}(),Ct=!1;if(St){var Mt="test-passive";try{var Xt={};Object.defineProperty(Xt,"passive",{get:function(){Ct=!0}}),window.addEventListener(Mt,(function(){}),Xt)}catch(Nn){}}function Yt(){return window.performance&&window.performance.now&&window.performance.timing?window.performance.now()+window.performance.timing.navigationStart:+new Date}var Et=function(t,e){for(var o in e)t[o]=e[o];return t};function Lt(t){return void 0===t||null===t}function Dt(t,e,o){return t<e?e:t>o?o:t}var Vt=St&&document.createElement("div").style,Ht=function(){if(!St)return!1;for(var t=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}],e=0,o=t;e<o.length;e++){var n=o[e];if(void 0!==Vt[n.value])return n.key}return!1}();function Nt(t){return!1===Ht?t:"standard"===Ht?"transitionEnd"===t?"transitionend":t:Ht+t.charAt(0).toUpperCase()+t.substr(1)}function zt(t){return"string"===typeof t?document.querySelector(t):t}function It(t,e,o,n){var i=Ct?{passive:!1,capture:!!n}:!!n;t.addEventListener(e,o,i)}function At(t,e,o,n){t.removeEventListener(e,o,{capture:!!n})}function Ft(t){var e=0,o=0;while(t)e-=t.offsetLeft,o-=t.offsetTop,t=t.offsetParent;return{left:e,top:o}}Ht&&"standard"!==Ht&&Ht.toLowerCase();var Rt=Nt("transform"),Wt=Nt("transition"),$t=St&&Nt("perspective")in Vt,_t=St&&("ontouchstart"in window||jt),Kt=St&&Wt in Vt,qt={transform:Rt,transition:Wt,transitionTimingFunction:Nt("transitionTimingFunction"),transitionDuration:Nt("transitionDuration"),transitionDelay:Nt("transitionDelay"),transformOrigin:Nt("transformOrigin"),transitionEnd:Nt("transitionEnd"),transitionProperty:Nt("transitionProperty")},Ut={touchstart:1,touchmove:1,touchend:1,touchcancel:1,mousedown:2,mousemove:2,mouseup:2};function Gt(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 Zt(t,e){for(var o in e)if(e[o].test(t[o]))return!0;return!1}var Jt=Zt;function Qt(t,e){var o=document.createEvent("Event");o.initEvent(e,!0,!0),o.pageX=t.pageX,o.pageY=t.pageY,t.target.dispatchEvent(o)}function te(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,i={};o&&(i.screenX=o.screenX||0,i.screenY=o.screenY||0,i.clientX=o.clientX||0,i.clientY=o.clientY||0);var r=!0,s=!0,a=t.ctrlKey,c=t.shiftKey,l=t.altKey,h=t.metaKey,p={ctrlKey:a,shiftKey:c,altKey:l,metaKey:h};if("undefined"!==typeof MouseEvent)try{n=new MouseEvent(e,Et(kt({bubbles:r,cancelable:s},p),i))}catch(t){u()}else u();function u(){n=document.createEvent("Event"),n.initEvent(e,r,s),Et(n,i)}n.forwardedTouchEvent=!0,n._constructed=!0,t.target.dispatchEvent(n)}function ee(t){te(t,"dblclick")}var oe={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}}},ne=1e3/60,ie=St&&window;function re(){}var se=function(){return St?ie.requestAnimationFrame||ie.webkitRequestAnimationFrame||ie.mozRequestAnimationFrame||ie.oRequestAnimationFrame||function(t){return window.setTimeout(t,t.interval||ne)}:re}(),ae=function(){return St?ie.cancelAnimationFrame||ie.webkitCancelAnimationFrame||ie.mozCancelAnimationFrame||ie.oCancelAnimationFrame||function(t){window.clearTimeout(t)}:re}(),ce=function(t){},le={enumerable:!0,configurable:!0,get:ce,set:ce},he=function(t,e){for(var o=e.split("."),n=0;n<o.length-1;n++)if(t=t[o[n]],"object"!==typeof t||!t)return;var i=o.pop();return"function"===typeof t[i]?function(){return t[i].apply(t,arguments)}:t[i]},pe=function(t,e,o){for(var n,i=e.split("."),r=0;r<i.length-1;r++)n=i[r],t[n]||(t[n]={}),t=t[n];t[i.pop()]=o};function ue(t,e,o){le.get=function(){return he(this,e)},le.set=function(t){pe(this,e,t)},Object.defineProperty(t,o,le)}var de=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 n=this;void 0===o&&(o=this),this.hasType(t);var i=function(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];n.off(t,i);var a=e.apply(o,r);if(!0===a)return a};return i.fn=e,this.on(t,i),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;var n=o.length;while(n--)(o[n][0]===e||o[n][0]&&o[n][0].fn===e)&&o.splice(n,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 n=this.events[t];if(n)for(var i,r=n.length,s=Tt(n),a=0;a<r;a++){var c=s[a],l=c[0],h=c[1];if(l&&(i=l.apply(h,e),!0===i))return i}},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,o=e[t]===t;o||Pt('EventEmitter has used unknown event type: "'+t+'", should be oneof ['+Object.keys(e).map((function(t){return JSON.stringify(t)}))+"]")},t}(),fe=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(It)},t.prototype.removeDOMEvents=function(){this.handleDOMEvents(At)},t.prototype.handleDOMEvents=function(t){var e=this,o=this.wrapper;this.events.forEach((function(n){t(o,n.name,e,!!n.capture)}))},t.prototype.handleEvent=function(t){var e=t.type;this.events.some((function(o){return o.name===e&&(o.handler(t),!0)}))},t}(),ge=function(){function t(){}return t}(),ye=function(t){function e(){var e=t.call(this)||this;return e.startX=0,e.startY=0,e.scrollX=!1,e.scrollY=!0,e.freeScroll=!1,e.directionLockThreshold=0,e.eventPassthrough="",e.click=!1,e.dblclick=!1,e.tap="",e.bounce={top:!0,bottom:!0,left:!0,right:!0},e.bounceTime=800,e.momentum=!0,e.momentumLimitTime=300,e.momentumLimitDistance=15,e.swipeTime=2500,e.swipeBounceTime=500,e.deceleration=.0015,e.flickLimitTime=200,e.flickLimitDistance=100,e.resizePolling=60,e.probeType=0,e.stopPropagation=!1,e.preventDefault=!0,e.preventDefaultException={tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|AUDIO)$/},e.tagException={tagName:/^TEXTAREA$/},e.HWCompositing=!0,e.useTransition=!0,e.bindToWrapper=!1,e.bindToTarget=!1,e.disableMouse=_t,e.disableTouch=!_t,e.autoBlur=!0,e.autoEndDistance=5,e.outOfBoundaryDampingFactor=1/3,e.specifiedIndexAsContent=0,e.quadrant=1,e}return bt(e,t),e.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},e.prototype.process=function(){return this.translateZ=this.HWCompositing&&$t?" translateZ(1px)":"",this.useTransition=this.useTransition&&Kt,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},e.prototype.resolveBounce=function(t){var e,o={top:!0,right:!0,bottom:!0,left:!0},n={top:!1,right:!1,bottom:!1,left:!1};return e="object"===typeof t?Et(o,t):t?o:n,e},e}(ge),ve=function(){function t(t,e){this.wrapper=t,this.options=e,this.hooks=new de(["beforeStart","start","move","end","click"]),this.handleDOMEvents()}return t.prototype.handleDOMEvents=function(){var t=this.options,e=t.bindToWrapper,o=t.disableMouse,n=t.disableTouch,i=t.click,r=this.wrapper,s=e?r:window,a=[],c=[],l=!n,h=!o;i&&a.push({name:"click",handler:this.click.bind(this),capture:!0}),l&&(a.push({name:"touchstart",handler:this.start.bind(this)}),c.push({name:"touchmove",handler:this.move.bind(this)},{name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),h&&(a.push({name:"mousedown",handler:this.start.bind(this)}),c.push({name:"mousemove",handler:this.move.bind(this)},{name:"mouseup",handler:this.end.bind(this)})),this.wrapperEventRegister=new fe(r,a),this.targetEventRegister=new fe(s,c)},t.prototype.beforeHandler=function(t,e){var o=this.options,n=o.preventDefault,i=o.stopPropagation,r=o.preventDefaultException,s={start:function(){return n&&!Zt(t.target,r)},end:function(){return n&&!Zt(t.target,r)},move:function(){return n}};s[e]()&&t.preventDefault(),i&&t.stopPropagation()},t.prototype.setInitiated=function(t){void 0===t&&(t=0),this.initiated=t},t.prototype.start=function(t){var e=Ut[t.type];if(!this.initiated||this.initiated===e)if(this.setInitiated(e),Jt(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(Ut[t.type]===this.initiated){this.beforeHandler(t,"move");var e=t.touches?t.touches[0]:t,o=e.pageX-this.pointX,n=e.pageY-this.pointY;if(this.pointX=e.pageX,this.pointY=e.pageY,!this.hooks.trigger(this.hooks.eventTypes.move,{deltaX:o,deltaY:n,e:t})){var i=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,r=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,s=this.pointX-i,a=this.pointY-r,c=this.options.autoEndDistance;(s>document.documentElement.clientWidth-c||a>document.documentElement.clientHeight-c||s<c||a<c)&&this.end(t)}}},t.prototype.end=function(t){Ut[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}(),me={x:["translateX","px"],y:["translateY","px"]},be=function(){function t(t){this.setContent(t),this.hooks=new de(["beforeTranslate","translate"])}return t.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.content,null),e=t[qt.transform].split(")")[0].split(", "),o=+(e[12]||e[4])||0,n=+(e[13]||e[5])||0;return{x:o,y:n}},t.prototype.translate=function(t){var e=[];Object.keys(t).forEach((function(o){if(me[o]){var n=me[o][0];if(n){var i=me[o][1],r=t[o];e.push(n+"("+r+i+")")}}})),this.hooks.trigger(this.hooks.eventTypes.beforeTranslate,e,t),this.style[qt.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}(),ke=function(){function t(t,e,o){this.translater=e,this.options=o,this.timer=0,this.hooks=new de(["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&&(ae(this.timer),this.timer=0)},t.prototype.destroy=function(){this.hooks.destroy(),ae(this.timer)},t}(),Te=function(t,e,o,n){var i=function(t,e){var o=t-e,n=o>0?-1:o<0?1:0;return n},r=i(e.x,t.x),s=i(e.y,t.y),a=o.x-n.x,c=o.y-n.y;return r*a<=0&&s*c<=0},Oe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return bt(e,t),e.prototype.startProbe=function(t,e){var o=this,n=t,i=function(){var r=o.translater.getComputedPosition();Te(t,e,r,n)&&o.hooks.trigger(o.hooks.eventTypes.move,r),o.pending||(o.callStopWhenPending?o.callStopWhenPending=!1:o.hooks.trigger(o.hooks.eventTypes.end,r)),n=r,o.pending&&(o.timer=se(i))};this.callStopWhenPending&&this.setCallStop(!1),ae(this.timer),i()},e.prototype.transitionTime=function(t){void 0===t&&(t=0),this.style[qt.transitionDuration]=t+"ms",this.hooks.trigger(this.hooks.eventTypes.time,t)},e.prototype.transitionTimingFunction=function(t){this.style[qt.transitionTimingFunction]=t,this.hooks.trigger(this.hooks.eventTypes.timeFunction,t)},e.prototype.transitionProperty=function(){this.style[qt.transitionProperty]=qt.transform},e.prototype.move=function(t,e,o,n){this.setPending(o>0),this.transitionTimingFunction(n),this.transitionProperty(),this.transitionTime(o),this.translate(e);var i=3===this.options.probeType;o&&i&&this.startProbe(t,e),o||(this._reflow=this.content.offsetHeight,i&&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),ae(this.timer);var e=this.translater.getComputedPosition(),o=e.x,n=e.y;this.transitionTime(),this.translate({x:o,y:n}),this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,{x:o,y:n})}return t},e.prototype.stop=function(){var t=this.doStop();t&&this.hooks.trigger(this.hooks.eventTypes.callStop)},e}(ke),Pe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return bt(e,t),e.prototype.move=function(t,e,o,n){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,n)},e.prototype.animate=function(t,e,o,n){var i=this,r=Yt(),s=r+o,a=3===this.options.probeType,c=function(){var l=Yt();if(l>=s)return i.translate(e),a&&i.hooks.trigger(i.hooks.eventTypes.move,e),void i.hooks.trigger(i.hooks.eventTypes.end,e);l=(l-r)/o;var h=n(l),p={};Object.keys(e).forEach((function(o){var n=t[o],i=e[o];p[o]=(i-n)*h+n})),i.translate(p),a&&i.hooks.trigger(i.hooks.eventTypes.move,p),i.pending&&(i.timer=se(c)),i.pending||(i.callStopWhenPending?i.callStopWhenPending=!1:i.hooks.trigger(i.hooks.eventTypes.end,e))};this.setPending(!0),this.callStopWhenPending&&this.setCallStop(!1),ae(this.timer),c()},e.prototype.doStop=function(){var t=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),t){this.setPending(!1),ae(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(){var t=this.doStop();t&&this.hooks.trigger(this.hooks.eventTypes.callStop)},e}(ke);function Se(t,e,o){var n=o.useTransition,i={};return Object.defineProperty(i,"probeType",{enumerable:!0,configurable:!1,get:function(){return o.probeType}}),n?new Oe(t,e,i):new Pe(t,e,i)}var xe,je,Be,we,Ce=function(){function t(t,e,o){this.wrapper=t,this.options=o,this.hooks=new de(["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 n=-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,n,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,n,i,r,s){void 0===s&&(s=this.options);var a=t-e,c=Math.abs(a)/o,l=s.deceleration,h=s.swipeBounceTime,p=s.swipeTime,u=Math.min(p,2*c/l),d={destination:t+c*c/l*(a<0?-1:1),duration:u,rate:15};return this.hooks.trigger(this.hooks.eventTypes.momentum,d,a),d.destination<n?(d.destination=r?Math.max(n-r/4,n-r/d.rate*c):n,d.duration=h):d.destination>i&&(d.destination=r?Math.min(i+r/4,i+r/d.rate*c):i,d.duration=h),d.destination=Math.round(d.destination),d},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,n=e.position,i="static"===window.getComputedStyle(this.wrapper,null).position,r=Gt(this.wrapper);this.wrapperSize=this.wrapper["width"===o?"clientWidth":"clientHeight"],this.setContent(t);var s=Gt(this.content);this.contentSize=s[o],this.relativeOffset=s[n],i&&(this.relativeOffset-=r[n]),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),e=t===this.getCurrentPos();return{position:t,inBoundary:e}},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}(),Me=(xe={},xe["yes"]=function(t){return!0},xe["no"]=function(t){return t.preventDefault(),!1},xe),Xe=(je={},je["horizontal"]=(Be={},Be["yes"]="horizontal",Be["no"]="vertical",Be),je["vertical"]=(we={},we["yes"]="vertical",we["no"]="horizontal",we),je),Ye=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=Xe[this.directionLocked];if(e){if(this.eventPassthrough===e["yes"])return Me["yes"](t);if(this.eventPassthrough===e["no"])return Me["no"](t)}return!1},t}(),Ee=function(t,e,o){return 2===o?[e,-t]:3===o?[-t,-e]:4===o?[-e,t]:[t,e]},Le=function(){function t(t,e,o,n,i){this.hooks=new de(["start","beforeMove","scrollStart","scroll","beforeEnd","end","scrollEnd","contentNotMoved","detectMovingDirection","coordinateTransformation"]),this.scrollBehaviorX=t,this.scrollBehaviorY=e,this.actionsHandler=o,this.animater=n,this.options=i,this.directionLockAction=new Ye(i.directionLockThreshold,i.freeScroll,i.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,n=e.deltaY,i=e.e;if(!t.enabled)return!0;var r=Ee(o,n,t.options.quadrant),s=r[0],a=r[1],c={deltaX:s,deltaY:a};return t.hooks.trigger(t.hooks.eventTypes.coordinateTransformation,c),t.handleMove(c.deltaX,c.deltaY,i)})),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=Yt();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 n=this.scrollBehaviorX.getAbsDist(t),i=this.scrollBehaviorY.getAbsDist(e),r=Yt();if(this.checkMomentum(n,i,r))return!0;if(this.directionLockAction.checkMovingDirection(n,i,o))return this.actionsHandler.setInitiated(),!0;var s=this.directionLockAction.adjustDelta(t,e),a=this.scrollBehaviorX.getCurrentPos(),c=this.scrollBehaviorX.move(s.deltaX),l=this.scrollBehaviorY.getCurrentPos(),h=this.scrollBehaviorY.move(s.deltaY);if(!this.hooks.trigger(this.hooks.eventTypes.detectMovingDirection)){this.fingerMoved||(this.fingerMoved=!0);var p=c!==a||h!==l;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:c,y:h}),this.dispatchScroll(r))}}},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=Yt();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,n=this.scrollBehaviorX,i=n.minScrollPos,r=n.maxScrollPos,s=this.scrollBehaviorY,a=s.minScrollPos,c=s.maxScrollPos;return e=e>0?Math.ceil(e):Math.floor(e),o=o>0?Math.ceil(o):Math.floor(o),e=Dt(e,r,i),o=Dt(o,c,a),{x:e,y:o}},t.prototype.handleClick=function(t){Zt(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 De(t){var e=["click","bindToWrapper","disableMouse","disableTouch","preventDefault","stopPropagation","tagException","preventDefaultException","autoEndDistance"].reduce((function(e,o){return e[o]=t[o],e}),{});return e}function Ve(t,e,o,n){var i=["momentum","momentumLimitTime","momentumLimitDistance","deceleration","swipeBounceTime","swipeTime","outOfBoundaryDampingFactor","specifiedIndexAsContent"].reduce((function(e,o){return e[o]=t[o],e}),{});return i.scrollable=!!t[e],i.bounces=o,i.rect=n,i}function He(t,e,o){o.forEach((function(o){var n,i;"string"===typeof o?n=i=o:(n=o.source,i=o.target),t.on(n,(function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return e.trigger.apply(e,Tt([i],t))}))}))}function Ne(t,e){for(var o=Object.keys(t),n=0,i=o;n<i.length;n++){var r=i[n];if(t[r]!==e[r])return!1}return!0}var ze=1,Ie=function(){function t(t,e,o){this.wrapper=t,this.content=e,this.resizeTimeout=0,this.hooks=new de(["beforeStart","beforeMove","beforeScrollStart","scrollStart","scroll","beforeEnd","scrollEnd","resize","touchEnd","end","flick","scrollCancel","momentum","scrollTo","minDistanceScroll","scrollToElement","beforeRefresh"]),this.options=o;var n=this.options.bounce,i=n.left,r=n.right,s=n.top,a=n.bottom;this.scrollBehaviorX=new Ce(t,e,Ve(o,"scrollX",[i,r],{size:"width",position:"left"})),this.scrollBehaviorY=new Ce(t,e,Ve(o,"scrollY",[s,a],{size:"height",position:"top"})),this.translater=new be(this.content),this.animater=Se(this.content,this.translater,this.options),this.actionsHandler=new ve(this.options.bindToTarget?this.content:t,De(this.options)),this.actions=new Le(this.scrollBehaviorX,this.scrollBehaviorY,this.actionsHandler,this.animater,this.options);var c=this.resize.bind(this);this.resizeRegister=new fe(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 fe(this.content,[{name:qt.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))})),He(this.animater