UNPKG

@xysfe/actui

Version:

A fantastic mobile ui lib implement by Vue

1 lines 138 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.GoldCost=e():t.GoldCost=e()}("undefined"!=typeof self?self:this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="../lib",e(e.s=1742)}({0:function(t,e){var i=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=i)},1:function(t,e,i){"use strict";function n(t,e,i,n,r,o,s,a){t=t||{};var c=typeof t.default;"object"!==c&&"function"!==c||(t=t.default);var l="function"==typeof t?t.options:t;e&&(l.render=e,l.staticRenderFns=i,l._compiled=!0),n&&(l.functional=!0),o&&(l._scopeId=o);var h;if(s?(h=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},l._ssrRegister=h):r&&(h=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),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 p=l.beforeCreate;l.beforeCreate=p?[].concat(p,h):[h]}return{exports:t,options:l}}e.a=n},10:function(t,e,i){var n=i(7),r=i(22);t.exports=i(4)?function(t,e,i){return n.f(t,e,r(1,i))}:function(t,e,i){return t[e]=i,t}},100:function(t,e,i){t.exports={default:i(101),__esModule:!0}},101:function(t,e,i){i(59),i(52),i(102),i(103),t.exports=i(0).Symbol},102:function(t,e,i){i(41)("asyncIterator")},103:function(t,e,i){i(41)("observable")},104:function(t,e,i){"use strict";function n(t){a||i(136)}var r=i(73),o=i(137),s=i(1),a=!1,c=n,l=Object(s.a)(r.a,o.a,o.b,!1,c,null,null);l.options.__file="src\\components\\common\\popup.vue",e.a=l.exports},105:function(t,e,i){t.exports={default:i(177),__esModule:!0}},106:function(t,e,i){i(107),t.exports=i(0).Object.keys},107:function(t,e,i){var n=i(17),r=i(16);i(60)("keys",function(){return function(t){return r(n(t))}})},1071:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(15),r=i(1072);r.a.install=function(t){t.component(r.a.name,r.a),t.prototype.$createPicker=Object(n.a)(r.a,t)},e.default=r.a},1072:function(t,e,i){"use strict";function n(t){a||i(1073)}var r=i(965),o=i(1074),s=i(1),a=!1,c=n,l=Object(s.a)(r.a,o.a,o.b,!1,c,"data-v-65cf9f1c",null);l.options.__file="src\\components\\Picker\\src\\index.vue",e.a=l.exports},1073:function(t,e){},1074:function(t,e,i){"use strict";i.d(e,"a",function(){return n}),i.d(e,"b",function(){return r});var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"act-picker-fade"}},[i("act-popup",{directives:[{name:"show",rawName:"v-show",value:t.isVisible,expression:"isVisible"}],attrs:{type:"picker",mask:!0,center:!1,topBorderRadius:!0,zIndex:t.zIndex},on:{touchmove:function(t){t.preventDefault()},"mask-click":t.maskClick}},[i("transition",{attrs:{name:"act-picker-move"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.isVisible,expression:"isVisible"}],staticClass:"act-picker-panel",on:{click:function(t){t.stopPropagation()}}},[i("div",{staticClass:"act-picker-choose"},[i("span",{staticClass:"act-picker-cancel",style:{color:t.cancelColor},on:{click:t.cancel}},[t._v(t._s(t._cancelTxt))]),t._v(" "),i("span",{staticClass:"act-picker-confirm",style:{color:t.confirmColor},on:{click:t.confirm}},[t._v(t._s(t._confirmTxt))]),t._v(" "),i("div",{staticClass:"act-picker-title-group"},[i("h1",{staticClass:"act-picker-title",domProps:{innerHTML:t._s(t.title)}}),t._v(" "),t.subtitle?i("h2",{staticClass:"act-picker-subtitle",domProps:{innerHTML:t._s(t.subtitle)}}):t._e()])]),t._v(" "),i("div",{staticClass:"act-picker-content"},[i("i",{staticClass:"border-bottom-1px"}),t._v(" "),i("i",{staticClass:"border-top-1px"}),t._v(" "),i("div",{ref:"wheelWrapper",staticClass:"act-picker-wheel-wrapper"},t._l(t.finalData,function(e,n){return i("div",{key:n,style:{order:t._getFlexOrder(e)}},[i("ul",{staticClass:"act-picker-wheel-scroll"},t._l(e,function(e,n){return i("li",{key:n,staticClass:"act-picker-wheel-item",domProps:{innerHTML:t._s(e[t.textKey])}})}),0)])}),0)]),t._v(" "),i("div",{staticClass:"act-picker-footer"})])])],1)],1)},r=[];n._withStripped=!0},109:function(t,e,i){t.exports={default:i(110),__esModule:!0}},11:function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},110:function(t,e,i){i(111);var n=i(0).Object;t.exports=function(t){return n.getOwnPropertyNames(t)}},111:function(t,e,i){i(60)("getOwnPropertyNames",function(){return i(58).f})},112:function(t,e,i){t.exports={default:i(113),__esModule:!0}},113:function(t,e,i){i(59),t.exports=i(0).Object.getOwnPropertySymbols},116:function(t,e,i){var n=i(9);t.exports=function(t,e,i,r){try{return r?e(n(i)[0],i[1]):e(i)}catch(e){var o=t.return;throw void 0!==o&&n(o.call(t)),e}}},117:function(t,e,i){var n=i(21),r=i(3)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||o[r]===t)}},118:function(t,e,i){"use strict";function n(t){var e={},i={},n={};for(var c in t)if(t.hasOwnProperty(c))if(-1!==a.indexOf(c))e[c]=t[c];else if(s.test(c)){var l=s.exec(c)[1];l=Object(o.a)(l),n[l]=t[c]}else i[c]=t[c];return e.on=Object(r.a)(n,e.on),e.props=Object(r.a)(i,e.props),e}e.a=n;var r=i(68),o=i(119),s=new RegExp(/^on(.+)/),a=["class","style","attrs","props","domProps","on","nativeOn","directives","scopedSlots","slot","key","ref","refInFor"]},119:function(t,e,i){"use strict";function n(t,e){var i=c(t,e);return i.charAt(0).toLowerCase()+i.slice(1)}e.a=n;var r=i(29),o=i.n(r),s=i(5),a=function(t){for(var e=!1,i=!1,n=!1,r=0;r<t.length;r++){var o=t[r];e&&/[a-zA-Z]/.test(o)&&o.toUpperCase()===o?(t=t.slice(0,r)+"-"+t.slice(r),e=!1,n=i,i=!0,r++):i&&n&&/[a-zA-Z]/.test(o)&&o.toLowerCase()===o?(t=t.slice(0,r-1)+"-"+t.slice(r-1),n=i,i=!1,e=!0):(e=o.toLowerCase()===o&&o.toUpperCase()!==o,n=i,i=o.toUpperCase()===o&&o.toLowerCase()!==o)}return t},c=function(t,e){if("string"!=typeof t&&!Object(s.p)(t))throw new TypeError("Expected the input to be `string | string[]`");e=o()({pascalCase:!1},e);return t=Array.isArray(t)?t.map(function(t){return t.trim()}).filter(function(t){return t.length}).join("-"):t.trim(),0===t.length?"":1===t.length?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=a(t)),t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,function(t,e){return e.toUpperCase()}).replace(/\d+(\w|$)/g,function(t){return t.toUpperCase()}),function(t){return e.pascalCase?t.charAt(0).toUpperCase()+t.slice(1):t}(t))}},120:function(t,e,i){"use strict";function n(t,e,i,n){var o=void 0,s=void 0,a=new t({render:function(t){var i=s&&s(t);return i&&!Object(r.p)(i)&&(i=[i]),t(e,o,i||[])},methods:{init:function(){document.body.appendChild(this.$el)},destroy:function(){this.$destroy(),document.body.removeChild(this.$el)}}});return a.updateRenderData=function(t,e){o=t,s=e},a.updateRenderData(i,n),a.$mount(),a.init(),a.$children[0]}e.a=n;var r=i(5)},121:function(t,e,i){var n=i(3)("iterator"),r=!1;try{var o=[7][n]();o.return=function(){r=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var i=!1;try{var o=[7],s=o[n]();s.next=function(){return{done:i=!0}},o[n]=function(){return s},t(o)}catch(t){}return i}},122:function(t,e,i){"use strict";var n=i(2),r=i(0),o=i(7),s=i(4),a=i(3)("species");t.exports=function(t){var e="function"==typeof r[t]?r[t]:n[t];s&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},123:function(t,e,i){"use strict";e.__esModule=!0;var n=i(29),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}},1230:function(t,e,i){"use strict";var n=i(1071),r=i(64),o=i(318),s=i(317),a=i(18);e.a={name:"ActCascadePicker",mixins:[a.a,r.a,o.a,s.a],props:{async:{type:Boolean,default:!1}},data:function(){return{cascadeData:this.data.slice(),pickerSelectedIndex:this.selectedIndex.slice(),pickerData:[],pending:!1}},created:function(){this._updatePickerData()},methods:{setData:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.pending=!1,this.cascadeData=t.slice(),this.pickerSelectedIndex=e.slice(),this._updatePickerData()},_pickerSelect:function(t,e,i){this.$emit("select",t,e,i)},_pickerCancel:function(){this.$emit("cancel")},_pickerChange:function(t,e){e!==this.pickerSelectedIndex[t]&&(this.pickerSelectedIndex.splice(t,1,e),this.async?this.pending=t!==this.pickerData.length-1:this._updatePickerData(t+1)),this.$emit("change",t,e)},_updatePickerData:function(){for(var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=this.cascadeData,n=0;i;)n>=e&&function(){var r=[];i.forEach(function(e){r.push({value:e[t.valueKey],text:e[t.textKey],order:e[t.orderKey]})}),t.pickerData[n]=r,t.pickerSelectedIndex[n]=0===e?t.pickerSelectedIndex[n]<i.length?t.pickerSelectedIndex[n]||0:0:t.$refs.picker.refillColumn(n,r)}(),i=i.length&&i[this.pickerSelectedIndex[n]]?i[this.pickerSelectedIndex[n]][this.childrenKey]:null,n++;n<this.pickerData.length&&this.pickerData.splice(n,this.pickerData.length-n),this.pickerData=this.pickerData.slice()}},components:{ActPicker:n.default}}},124:function(t,e,i){"use strict";function n(t){t.preventDefault()}var r={watch:{isVisible:function(t){t?document.body.addEventListener("touchmove",n,{passive:!1}):document.body.removeEventListener("touchmove",n,{passive:!1})}},beforeDestroy:function(){document.body.removeEventListener("touchmove",n,{passive:!1})}};e.a=r},1241:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(15),r=i(1255);r.a.install=function(t){t.component(r.a.name,r.a),t.prototype.$createCascadePicker=Object(n.a)(r.a,t)},e.default=r.a},125:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(150);e.default=n.a},1255:function(t,e,i){"use strict";var n=i(1230),r=i(1256),o=i(1),s=Object(o.a)(n.a,r.a,r.b,!1,null,null,null);s.options.__file="src\\components\\CascadePicker\\src\\index.vue",e.a=s.exports},1256:function(t,e,i){"use strict";i.d(e,"a",function(){return n}),i.d(e,"b",function(){return r});var n=function(){var t=this,e=t.$createElement;return(t._self._c||e)("act-picker",{ref:"picker",attrs:{data:t.pickerData,selectedIndex:t.pickerSelectedIndex,pending:t.pending,title:t.title,subtitle:t.subtitle,zIndex:t.zIndex,cancelTxt:t._cancelTxt,confirmTxt:t._confirmTxt,swipeTime:t.swipeTime,maskClosable:t.maskClosable,confirmColor:t.confirmColor,cancelColor:t.cancelColor},on:{select:t._pickerSelect,cancel:t._pickerCancel,change:t._pickerChange},model:{value:t.isVisible,callback:function(e){t.isVisible=e},expression:"isVisible"}})},r=[];n._withStripped=!0},13:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},1308:function(t,e,i){"use strict";var n=i(138);e.a={name:"ActCostTable",data:function(){return{moreToggle:!1}},components:{ActScroll:n.a},props:{tableData:{type:Object,default:function(){return null}},fakerTableData:{type:Object,default:function(){return null}},togglable:{type:Boolean,default:!0},scrollable:{type:Boolean,default:!1},brandColor:{type:String,default:"#8c7fee"}},computed:{renderData:function(){return this.togglable?this.moreToggle?this.tableData:this.fakerTableData:this.tableData},showToggle:function(){return!!this.togglable&&(this.renderData&&this.renderData.rows&&this.renderData.rows.length&&this.fakerTableData.rows.length<this.tableData.rows.length)}},methods:{toggleMore:function(){this.moreToggle=!this.moreToggle},scrollSuc:function(t){this.scroll=t},refreshScroll:function(){var t=this;this.$nextTick(function(){t.scroll&&t.scroll.refresh()})}},watch:{tableData:function(t){t&&this.refreshScroll()}}}},136:function(t,e){},137:function(t,e,i){"use strict";i.d(e,"a",function(){return n}),i.d(e,"b",function(){return r});var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"show",rawName:"v-show",value:t.isVisible,expression:"isVisible"}],staticClass:"act-popup",class:t.typeClass,style:{pointerEvents:t.pointerEvent,zIndex:t.zIndex}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.mask,expression:"mask"}],staticClass:"act-popup-mask act-row act-middle",style:{backgroundColor:t.maskBgColor},on:{click:t.maskClick}},[t._t("mask")],2),t._v(" "),i("div",{staticClass:"act-popup-container",class:{"act-popup-center":t.center}},[t.$slots.default?i("div",{class:{"act-popup-content":!0,"act-popup-top-radius":t.topBorderRadius}},[t._t("default")],2):i("div",{class:{"act-popup-content":!0,"act-popup-top-radius":t.topBorderRadius},domProps:{innerHTML:t._s(t.content)}})])])},r=[];n._withStripped=!0},1370:function(t,e,i){"use strict";function n(t){a||i(1371)}var r=i(1308),o=i(1372),s=i(1),a=!1,c=n,l=Object(s.a)(r.a,o.a,o.b,!1,c,"data-v-530770d2",null);l.options.__file="src\\components\\GoldCost\\src\\table.vue",e.a=l.exports},1371:function(t,e){},1372:function(t,e,i){"use strict";i.d(e,"a",function(){return n}),i.d(e,"b",function(){return r});var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"act-cost-table"},[t.renderData&&t.renderData.rows&&t.renderData.rows.length>0?[t.scrollable?i("act-scroll",{ref:t.scroll,staticClass:"act-cost-table-scrollable",attrs:{listenScrollInit:!0},on:{scrollSuc:t.scrollSuc}},[i("table",{staticClass:"act-cost-table-body"},[i("thead",[i("tr",t._l(t.renderData.head,function(e,n){return i("td",{key:"head-"+n,style:{"background-color":t.brandColor||"#8c7fee"}},[t._v("\n "+t._s(e)+"\n ")])}),0)]),t._v(" "),i("tbody",t._l(t.renderData.rows,function(e,n){return i("tr",{key:"tr-"+n},t._l(e,function(e,r){return i("td",{key:"td-"+n+"-"+r,class:{sw:e.type}},[t._v("\n "+t._s(e.value)+"\n ")])}),0)}),0)])]):i("table",{staticClass:"act-cost-table-body"},[i("thead",[i("tr",t._l(t.renderData.head,function(e,n){return i("td",{key:"head-"+n,style:{"background-color":t.brandColor||"#8c7fee"}},[t._v("\n "+t._s(e)+"\n ")])}),0)]),t._v(" "),i("tbody",t._l(t.renderData.rows,function(e,n){return i("tr",{key:"tr-"+n},t._l(e,function(e,r){return i("td",{key:"td-"+n+"-"+r,class:{sw:e.type}},[t._v("\n "+t._s(e.value)+"\n ")])}),0)}),0)])]:i("div",{staticClass:"act-cost-empty",class:{"act-cost-table-scrollable-empty":t.scrollable}},[t._v("\n 暂无相关数据\n ")]),t._v(" "),t.showToggle?i("a",{staticClass:"act-cost-toggle",class:{"act-cost-toggle-hide":t.moreToggle},style:{color:t.brandColor},attrs:{href:"javascript:;"},on:{click:function(e){return e.stopPropagation(),t.toggleMore.apply(null,arguments)}}},[t._v(t._s(t.moreToggle?"收起":"查看全部")),i("span",{style:{"border-color":t.brandColor}})]):t._e()],2)},r=[];n._withStripped=!0},138:function(t,e,i){"use strict";function n(t){a||i(191)}var r=i(142),o=i(192),s=i(1),a=!1,c=n,l=Object(s.a)(r.a,o.a,o.b,!1,c,"data-v-3349a91e",null);l.options.__file="src\\components\\common\\scroll.vue",e.a=l.exports},139:function(t,e,i){"use strict";i.d(e,"a",function(){return r});var n=i(5),r=function(){var t=!0;if(n.K.isIOS){var e=Object(n.l)(navigator.userAgent.toLowerCase());if(!e)return t;Number(""+e.major+e.minor)>=133&&(t=!1)}return t}()},14:function(t,e,i){var n=i(48),r=i(31);t.exports=function(t){return n(r(t))}},142:function(t,e,i){"use strict";var n=i(125),r=i(139);e.a={name:"ActScroll",props:{probeType:{type:Number,default:2},click:{type:Boolean,default:!0},listenScrollInit:{type:Boolean,default:!1},listenScroll:{type:Boolean,default:!1},listenBeforeScroll:{type:Boolean,default:!1},listenScrollEnd:{type:Boolean,default:!1},listenZoomEnd:{type:Boolean,default:!1},listenPullingUp:{type:Boolean,default:!1},direction:{type:String,default:"vertical"},scrollbar:{type:null,default:!1},startY:{type:Number,default:0},refreshDelay:{type:Number,default:20},freeScroll:{type:Boolean,default:!1},mouseWheel:{type:Boolean,default:!1},bounce:{type:[Boolean,Object],default:!0},zoom:{type:Boolean,default:!1},useTransition:{type:Boolean,default:!0}},data:function(){return{beforePullDown:!0,isRebounding:!1,pullUpDirty:!0,pullDownStyle:"",bubbleY:0,lastTouchStart:null,fingers:0,tapTarget:null,isDouble:!1,startXd:0,startYd:0,endXd:0,endYd:0}},mounted:function(){var t=this;this.$nextTick(function(){t.initScroll()})},destroyed:function(){this.scroll&&this.scroll.destroy(),this.$emit("destroyed",this.scroll)},methods:{initScroll:function(){var t=this;if(this.$refs.wrapper){var e={probeType:this.probeType,click:this.click,scrollY:this.freeScroll||"vertical"===this.direction,scrollX:this.freeScroll||"horizontal"===this.direction,scrollbar:this.scrollbar,startY:this.startY,freeScroll:this.freeScroll,mouseWheel:this.mouseWheel,bounce:this.bounce,zoom:this.zoom,bounceTime:300,useTransition:r.a&&this.useTransition,pullUpLoad:{threshold:50}};this.scroll=new n.default(this.$refs.wrapper,e),this.listenScroll&&this.scroll.on("scroll",function(e){t.$emit("scroll",e)}),this.listenScrollEnd&&this.scroll.on("scrollEnd",function(e){t.$emit("scroll-end",e)}),this.listenBeforeScroll&&(this.scroll.on("beforeScrollStart",function(){t.$emit("beforeScrollStart")}),this.scroll.on("scrollStart",function(){t.$emit("scroll-start")})),this.listenZoomEnd&&this.scroll.on("zoomEnd",function(){t.$emit("zoomEnd",t.scroll)}),this.zoom&&(this.isDouble=!0),this.listenScrollInit&&this.$emit("scrollSuc",this.scroll),this.listenPullingUp&&this.scroll.on("pullingUp",function(){t.$emit("pullingUp")})}},disable:function(){this.scroll&&this.scroll.disable()},enable:function(){this.scroll&&this.scroll.enable()},refresh:function(){this.scroll&&this.scroll.refresh()},scrollTo:function(){this.scroll&&this.scroll.scrollTo.apply(this.scroll,arguments)},scrollToElement:function(){this.scroll&&this.scroll.scrollToElement.apply(this.scroll,arguments)},clickItem:function(t,e){this.$emit("click",e)},destroy:function(){this.scroll.destroy()},forceUpdate:function(t){this.refresh()}}}},143:function(t,e,i){i(52),i(38),i(44),i(144),i(148),i(149),t.exports=i(0).Promise},144:function(t,e,i){"use strict";var n,r,o,s,a=i(19),c=i(2),l=i(20),h=i(66),u=i(6),p=i(8),f=i(30),d=i(74),v=i(57),m=i(86),g=i(87).set,y=i(146)(),b=i(63),_=i(88),x=i(147),w=i(89),S=c.TypeError,T=c.process,k=T&&T.versions,C=k&&k.v8||"",P=c.Promise,D="process"==h(T),M=function(){},E=r=b.f,O=!!function(){try{var t=P.resolve(1),e=(t.constructor={})[i(3)("species")]=function(t){t(M,M)};return(D||"function"==typeof PromiseRejectionEvent)&&t.then(M)instanceof e&&0!==C.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),I=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},Y=function(t,e){if(!t._n){t._n=!0;var i=t._c;y(function(){for(var n=t._v,r=1==t._s,o=0;i.length>o;)!function(e){var i,o,s,a=r?e.ok:e.fail,c=e.resolve,l=e.reject,h=e.domain;try{a?(r||(2==t._h&&j(t),t._h=1),!0===a?i=n:(h&&h.enter(),i=a(n),h&&(h.exit(),s=!0)),i===e.promise?l(S("Promise-chain cycle")):(o=I(i))?o.call(i,c,l):c(i)):l(n)}catch(t){h&&!s&&h.exit(),l(t)}}(i[o++]);t._c=[],t._n=!1,e&&!t._h&&X(t)})}},X=function(t){g.call(c,function(){var e,i,n,r=t._v,o=A(t);if(o&&(e=_(function(){D?T.emit("unhandledRejection",r,t):(i=c.onunhandledrejection)?i({promise:t,reason:r}):(n=c.console)&&n.error&&n.error("Unhandled promise rejection",r)}),t._h=D||A(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},A=function(t){return 1!==t._h&&0===(t._a||t._c).length},j=function(t){g.call(c,function(){var e;D?T.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},B=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),Y(e,!0))},z=function(t){var e,i=this;if(!i._d){i._d=!0,i=i._w||i;try{if(i===t)throw S("Promise can't be resolved itself");(e=I(t))?y(function(){var n={_w:i,_d:!1};try{e.call(t,l(z,n,1),l(B,n,1))}catch(t){B.call(n,t)}}):(i._v=t,i._s=1,Y(i,!1))}catch(t){B.call({_w:i,_d:!1},t)}}};O||(P=function(t){d(this,P,"Promise","_h"),f(t),n.call(this);try{t(l(z,this,1),l(B,this,1))}catch(t){B.call(this,t)}},n=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},n.prototype=i(75)(P.prototype,{then:function(t,e){var i=E(m(this,P));return i.ok="function"!=typeof t||t,i.fail="function"==typeof e&&e,i.domain=D?T.domain:void 0,this._c.push(i),this._a&&this._a.push(i),this._s&&Y(this,!1),i.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new n;this.promise=t,this.resolve=l(z,t,1),this.reject=l(B,t,1)},b.f=E=function(t){return t===P||t===s?new o(t):r(t)}),u(u.G+u.W+u.F*!O,{Promise:P}),i(24)(P,"Promise"),i(122)("Promise"),s=i(0).Promise,u(u.S+u.F*!O,"Promise",{reject:function(t){var e=E(this);return(0,e.reject)(t),e.promise}}),u(u.S+u.F*(a||!O),"Promise",{resolve:function(t){return w(a&&this===s?P:this,t)}}),u(u.S+u.F*!(O&&i(121)(function(t){P.all(t).catch(M)})),"Promise",{all:function(t){var e=this,i=E(e),n=i.resolve,r=i.reject,o=_(function(){var i=[],o=0,s=1;v(t,!1,function(t){var a=o++,c=!1;i.push(void 0),s++,e.resolve(t).then(function(t){c||(c=!0,i[a]=t,--s||n(i))},r)}),--s||n(i)});return o.e&&r(o.v),i.promise},race:function(t){var e=this,i=E(e),n=i.reject,r=_(function(){v(t,!1,function(t){e.resolve(t).then(i.resolve,n)})});return r.e&&n(r.v),i.promise}})},145:function(t,e){t.exports=function(t,e,i){var n=void 0===i;switch(e.length){case 0:return n?t():t.call(i);case 1:return n?t(e[0]):t.call(i,e[0]);case 2:return n?t(e[0],e[1]):t.call(i,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(i,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(i,e[0],e[1],e[2],e[3])}return t.apply(i,e)}},146:function(t,e,i){var n=i(2),r=i(87).set,o=n.MutationObserver||n.WebKitMutationObserver,s=n.process,a=n.Promise,c="process"==i(23)(s);t.exports=function(){var t,e,i,l=function(){var n,r;for(c&&(n=s.domain)&&n.exit();t;){r=t.fn,t=t.next;try{r()}catch(n){throw t?i():e=void 0,n}}e=void 0,n&&n.enter()};if(c)i=function(){s.nextTick(l)};else if(!o||n.navigator&&n.navigator.standalone)if(a&&a.resolve){var h=a.resolve(void 0);i=function(){h.then(l)}}else i=function(){r.call(n,l)};else{var u=!0,p=document.createTextNode("");new o(l).observe(p,{characterData:!0}),i=function(){p.data=u=!u}}return function(n){var r={fn:n,next:void 0};e&&(e.next=r),t||(t=r,i()),e=r}}},147:function(t,e,i){var n=i(2),r=n.navigator;t.exports=r&&r.userAgent||""},148:function(t,e,i){"use strict";var n=i(6),r=i(0),o=i(2),s=i(86),a=i(89);n(n.P+n.R,"Promise",{finally:function(t){var e=s(this,r.Promise||o.Promise),i="function"==typeof t;return this.then(i?function(i){return a(e,t()).then(function(){return i})}:t,i?function(i){return a(e,t()).then(function(){throw i})}:t)}})},149:function(t,e,i){"use strict";var n=i(6),r=i(63),o=i(88);n(n.S,"Promise",{try:function(t){var e=r.f(this),i=o(t);return(i.e?e.reject:e.resolve)(i.v),e.promise}})},1494:function(t,e,i){"use strict";var n=i(105),r=i.n(n),o=i(65),s=i.n(o),a=i(123),c=i.n(a),l=i(36),h=i.n(l),u=i(43),p=i(1370),f=i(1745),d=i(1241),v=i(517),m=i(5);e.a={name:"ActGoldCost",mixins:[u.a],data:function(){return{pickerType:0,costCount:0,title:"",subTitle:"",tableData:null,fakerTableData:null,costInsured:0,costTableId:0}},props:{costTables:{type:Array,default:function(){return[]}},applicant:{type:Object,default:function(){return{}}},insureds:{type:Array,default:function(){return[]}},paramExt:{type:Object,default:function(){return{}}},brandColor:{type:String,default:"#8c7fee"},btnColor:{type:String,default:""},isNewCostTable:{type:Boolean,default:!0}},computed:{isShowNewCostTable:function(){return!(this.tableData&&this.tableData.head&&this.tableData.head.length<5)&&this.isNewCostTable}},components:{ActCascadePicker:d.default,ActCostTable:p.a,ActCostTableNew:f.a},methods:{calculate:function(){var t=this;this.$nextTick(function(){t.genTableList()})},showPicker:function(){1===this.pickerType||2===this.pickerType?this.$refs.singlePicker.show():this.$refs.multiPicker.show()},select:function(t,e,i){if(1===t.length){if(1===this.pickerType&&t[0]===this.costInsured)return;if(2===this.pickerType&&t[0]===this.costTableId)return;1===this.pickerType&&(this.costInsured=t[0]),2===this.pickerType&&(this.costTableId=t[0])}else if(2===t.length){if(t[0]===this.costTableId&&t[1]===this.costInsured)return;this.costTableId=t[0],this.costInsured=t[1]}this.getCost()},genTableList:function(){if(this.costTables&&this.costTables.length){var t=[],e=0,i=[];this.setCostTableIdType();var n=this.isAllCalcType();if(0===this.costTableId&&(this.costTableId=this.costTables[0].id),1===this.costTables.length){if(this.pickerType=1,this.costTableId!==this.costTables[0].id&&(this.costTableId=this.costTables[0].id),1===Number(this.costTables[0].calc_type))t.push({value:0,text:"全部被保险人"}),e++;else for(var r=0,o=this.insureds.length;r<o;r++)t.push({value:r,text:"被保险人"+(r+1)}),e++;this.costInsured>0&&this.costInsured>=this.insureds.length?(this.costInsured=0,i=[0]):i=[this.costInsured],this.$refs.singlePicker.setData(t,i)}else if(1===this.insureds.length||n){this.pickerType=2,this.costInsured>0&&(this.costInsured=0);for(var s=0,a=this.costTables.length;s<a;s++)t.push({value:this.costTables[s].id,text:this.costTables[s].name}),e++;i=[0];for(var c=0,l=t.length;c<l;c++)if(t[c].value===this.costTableId){i=[c];break}this.$refs.singlePicker.setData(t,i)}else if(this.costTables.length>1&&this.insureds.length>1){this.pickerType=3;var h=void 0;i[0]=0;for(var u=0,p=this.costTables.length;u<p;u++){if(this.costTables[u].id===this.costTableId&&(i[0]=u),h={value:this.costTables[u].id,text:this.costTables[u].name,children:[]},"1"===this.costTables[u].calc_type)h.children.push({value:0,text:"全部被保险人"}),e++;else for(var f=0,d=this.insureds.length;f<d;f++)h.children.push({value:f,text:"被保险人"+(f+1)}),e++;t.push(h)}this.costInsured>0&&this.costInsured>=this.insureds.length?(this.updateState({key:"costInsured",value:0}),i[1]=0):i[1]=this.costInsured,this.$refs.multiPicker.setData(t,i)}this.costCount=e,this.getCost()}},getCost:function(){var t=this;new h.a(function(e,i){var n=void 0,r=c()({},t.paramExt),o={genes:r};if(t.applicant&&(r.applicant=t.applicant),t.insureds.length<=t.costInsured)return i({errmsg:"表格不存在"});if(1===t.costTablesCalcType[t.costTableId])n="/buy/getCostTableComplex",r.tableId=t.costTableId,r.insureds=t.insureds;else{n="/buy/getCostTable",o.tableId=t.costTableId;var a=t.insureds[t.costInsured];r.plan=a.plan,r.insured=a.insured}var l=Object(v.d)(s()(o));t.costTableCache=t.costTableCache||{},t.costTableCache[l]?e(t.costTableCache[l]):t.$fetch(n,o).then(function(i){t.costTableCache[l]=i,e(i)})}).then(function(e){0===e.ret&&e.data?t.genTableData(e.data):t.genTableData(null)}).catch(function(e){t.genTableData(null)})},setCostTableIdType:function(){for(var t={},e=0,i=this.costTables.length;e<i;e++){t[this.costTables[e].id]=~~this.costTables[e].calc_type}this.costTablesCalcType=t},isAllCalcType:function(){for(var t=0,e=this.costTables.length;t<e;t++){if(1!==~~this.costTables[t].calc_type)return!1}return!0},genTableData:function(t){if(!t)return this.title="",this.subTitle="",this.tableData=null,void(this.fakerTableData=null);for(var e=[],i=[],n=void 0,o=void 0,s=void 0,a=void 0,c=this.costTables,l=Array.isArray(c),h=0,c=l?c:r()(c);;){var u;if(l){if(h>=c.length)break;u=c[h++]}else{if(h=c.next(),h.done)break;u=h.value}var p=u;if(p.id===this.costTableId){a=p.type;break}}for(var f=0,d=t.rows.length;f<d;f++){o=t.rows[f],s=(1===a||2===a)&&+o[3]>+o[2],n=[];for(var v=0,g=t.cols.length;v<g;v++)n.push({value:v===t.cols.length-1?parseFloat(Math.round(100*o[v])/100).toFixed(2):o[v]||0,type:!s||1!==a&&2!==a||3!==v?0:1});e.push(n),f<5||(f+1)%10==0||f===d-1?i.push(n):(1===a||2===a)&&s&&+t.rows[f-1][3]<=+t.rows[f-1][2]?i.push(n):(1===a||2===a)&&s&&+t.rows[f+1][3]<=+t.rows[f+1][2]&&i.push(n)}this.title=t.name,this.subTitle=t.planText;var y=function(e,i){if(!Object(m.p)(e))return[];e=Object(m.d)(e);var n=t.display||[],r={head:function(){return e.filter(function(t,e){return"1"===String(n[e])})||[]},rows:function(){return e.map(function(t){return t&&t.filter(function(t,e){return"1"===String(n[e])})||[]})||[]}};return r[i]?r[i]():[]};this.tableData={head:y(t.cols,"head"),rows:y(e,"rows")},this.fakerTableData={head:y(t.cols,"head"),rows:y(i,"rows")}}}}},1495:function(t,e,i){"use strict";var n=i(125),r=i(5);e.a={props:{tableData:{type:Object,default:function(){}},brandColor:{type:String,default:"#8c7fee"}},data:function(){return{tableScroller:null,rightTitleScroller:null,rightTableScroller:null,moreToggle:!0}},computed:{renderData:function(){return this.tableData},leftTitleArr:function(){return this.renderData&&this.renderData.head&&this.renderData.head.length?this.renderData.head.slice(0,2):[]},styleOption:function(){return this.brandColor?{backgroundColor:this.brandColor}:{}},rightTitleArr:function(){if(this.renderData&&this.renderData.head&&this.renderData.head.length){var t=this.renderData.head.length;return this.renderData.head.slice(2,t)}return[]},leftTable:function(){if(this.renderData){var t=[];return this.renderData.rows&&this.renderData.rows.forEach(function(e){var i=[];e.forEach(function(t,e){e<2&&i.push(t)}),t.push(i)}),t}return[]},rightTable:function(){if(this.renderData){var t=[];return this.renderData.rows&&this.renderData.rows.forEach(function(e){var i=[];e.forEach(function(t,e){e>1&&i.push(t)}),t.push(i)}),t}return[[]]}},watch:{renderData:{handler:function(t){var e=this;t&&t.rows&&t.head&&this.$nextTick(function(){var t=e.$refs.rightTitle,i=e.$refs.tableWrapper,o=e.$refs.rightTable;t&&e.$nextTick(function(){e.rightTitleScroller?e.rightTitleScroller.refresh():(e.rightTitleScroller=new n.default(t,{scrollX:!0,bounce:!1,probeType:3,momentum:!1}),e.rightTitleScroller.on("scroll",function(t){var i=t.x,n=t.y;Object(r.J)(e.rightTableScroller.scrollTo(i,n,0))}))}),i&&e.$nextTick(function(){e.tableScroller?e.tableScroller.refresh():e.tableScroller=new n.default(i,{scrollY:!0,scrollX:!1})}),o&&e.$nextTick(function(){e.rightTableScroller?e.rightTableScroller.refresh():(e.rightTableScroller=new n.default(o,{scrollY:!0,scrollX:!0,bounce:!1,probeType:2,momentum:!1}),e.rightTableScroller.on("scroll",function(t){var i=t.x,n=t.y;e.rightTitleScroller.scrollTo(i,n,0)}))})})},deep:!0}}}},15:function(t,e,i){"use strict";function n(t,e){return function(i,n){var s=this,a=Object(r.a)(i),c=Object(o.a)(e,t,a,n),l=c.$parent,h=c.remove,u=c.show,p=c.hide;return c.remove=function(){c.$removed=!0,h&&h.call(this),l.destroy()},c.show=function(){return u&&u.call.apply(u,[this].concat(Array.prototype.slice.call(arguments))),this},c.hide=function(){return p&&p.call.apply(p,[this].concat(Array.prototype.slice.call(arguments))),this},s&&s._isVue&&s.$once("hook:beforeDestroy",function(){c.$removed||c.remove()}),c}}e.a=n;var r=i(118),o=i(120)},150:function(t,e,i){"use strict";function n(){return window.performance&&window.performance.now?window.performance.now()+window.performance.timing.navigationStart:+new Date}function r(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];for(var r=0;r<i.length;r++){var o=i[r];for(var s in o)t[s]=o[s]}return t}function o(t){return void 0===t||null===t}function s(t,e){return Math.sqrt(t*t+e*e)}function a(t){return!1!==j&&("standard"===j?"transitionEnd"===t?"transitionend":t:j+t.charAt(0).toUpperCase()+t.substr(1))}function c(t,e,i,n){t.addEventListener(e,i,{passive:!1,capture:!!n})}function l(t,e,i,n){t.removeEventListener(e,i,{passive:!1,capture:!!n})}function h(t){for(var e=0,i=0;t;)e-=t.offsetLeft,i-=t.offsetTop,t=t.offsetParent;return{left:e,top:i}}function u(t){var e=t.getBoundingClientRect();return{left:-(e.left+window.pageXOffset),top:-(e.top+window.pageYOffset)}}function p(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 f(t,e){for(var i in e)if(e[i].test(t[i]))return!0;return!1}function d(t,e){var i=document.createEvent("Event");i.initEvent(e,!0,!0),i.pageX=t.pageX,i.pageY=t.pageY,t.target.dispatchEvent(i)}function v(t){function e(){s=document.createEvent("Event"),s.initEvent(i,a,c),r(s,o)}var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"click",n=void 0;"mouseup"===t.type||"mousecancel"===t.type?n=t:"touchend"!==t.type&&"touchcancel"!==t.type||(n=t.changedTouches[0]);var o={};n&&(o.screenX=n.screenX||0,o.screenY=n.screenY||0,o.clientX=n.clientX||0,o.clientY=n.clientY||0);var s=void 0,a=!0,c=!0;if("undefined"!=typeof MouseEvent)try{s=new MouseEvent(i,r({bubbles:a,cancelable:c},o))}catch(t){e()}else e();s.forwardedTouchEvent=!0,s._constructed=!0,t.target.dispatchEvent(s)}function m(t){v(t,"dblclick")}function g(t,e){e.firstChild?y(t,e.firstChild):e.appendChild(t)}function y(t,e){e.parentNode.insertBefore(t,e)}function b(t,e){t.removeChild(e)}function _(t,e,i,n,r,o,s){var a=t-e,c=Math.abs(a)/i,l=s.deceleration,h=s.itemHeight,u=s.swipeBounceTime,p=s.wheel,f=s.swipeTime,d=f,v=p?4:15,m=t+c/l*(a<0?-1:1);return p&&h&&(m=Math.round(m/h)*h),m<n?(m=o?Math.max(n-o/4,n-o/v*c):n,d=u):m>r&&(m=o?Math.min(r+o/4,r+o/v*c):r,d=u),{destination:Math.round(m),duration:d}}function x(){}function w(t){console.error("[BScroll warn]: "+t)}function S(t,e){if(!t)throw new Error("[BScroll] "+e)}function T(t){var e=document.createElement("div"),i=document.createElement("div");return e.style.cssText="position:absolute;z-index:9999;pointerEvents:none",i.style.cssText="box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px;",i.className="bscroll-indicator","horizontal"===t?(e.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",i.style.height="100%",e.className="bscroll-horizontal-scrollbar"):(e.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",i.style.width="100%",e.className="bscroll-vertical-scrollbar"),e.style.cssText+=";overflow:hidden",e.appendChild(i),e}function k(t,e){this.wrapper=e.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=t,this.direction=e.direction,e.fade?(this.visible=0,this.wrapperStyle.opacity="0"):this.visible=1,this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.x=0,this.y=0,e.interactive&&this._addDOMEvents()}function C(t){if(t&&t.classList)return t.classList.contains("tombstone")}function P(t,e){var i=this;this.options=e,S("function"==typeof this.options.createTombstone,"Infinite scroll need createTombstone Function to create tombstone"),S("function"==typeof this.options.fetch,"Infinite scroll need fetch Function to fetch new data."),S("function"==typeof this.options.render,"Infinite scroll need render Function to render each item."),this.firstAttachedItem=0,this.lastAttachedItem=0,this.anchorScrollTop=0,this.anchorItem={index:0,offset:0},this.tombstoneHeight=0,this.tombstoneWidth=0,this.tombstones=[],this.items=[],this.loadedItems=0,this.requestInProgress=!1,this.hasMore=!0,this.scroller=t,this.wrapperEl=this.scroller.wrapper,this.scrollerEl=this.scroller.scroller,this.scroller.on("scroll",function(){i.onScroll()}),this.scroller.on("resize",function(){i.onResize()}),this.onResize()}function D(t,e){this.wrapper="string"==typeof t?document.querySelector(t):t,this.wrapper||w("Can not resolve the wrapper DOM."),this.scroller=this.wrapper.children[0],this.scroller||w("The wrapper need at least one child element to be scroller."),this.scrollerStyle=this.scroller.style,this._init(t,e)}var M=function(){function t(t,e){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),E=function(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)},O="undefined"!=typeof window,I=O&&navigator.userAgent.toLowerCase(),Y=I&&/wechatdevtools/.test(I),X=I&&I.indexOf("android")>0,A=O&&document.createElement("div").style,j=function(){if(!O)return!1;var t={webkit:"webkitTransform",Moz:"MozTransform",O:"OTransform",ms:"msTransform",standard:"transform"};for(var e in t)if(void 0!==A[t[e]])return e;return!1}(),B=a("transform"),z=O&&a("perspective")in A,L=O&&("ontouchstart"in window||Y),W=!1!==B,H=O&&a("transition")in A,R={transform:B,transitionTimingFunction:a("transitionTimingFunction"),transitionDuration:a("transitionDuration"),transitionDelay:a("transitionDelay"),transformOrigin:a("transformOrigin"),transitionEnd:a("transitionEnd")},$=1,N={touchstart:$,touchmove:$,touchend:$,mousedown:2,mousemove:2,mouseup:2},F={startX:0,startY:0,scrollX:!1,scrollY:!0,freeScroll:!1,directionLockThreshold:5,eventPassthrough:"",click:!1,tap:!1,bounce:!0,bounceTime:800,momentum:!0,momentumLimitTime:300,momentumLimitDistance:15,swipeTime:2500,swipeBounceTime:500,deceleration:.0015,flickLimitTime:200,flickLimitDistance:100,resizePolling:60,probeType:0,preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:!1,disableMouse:L,disableTouch:!L,observeDOM:!0,autoBlur:!0,wheel:!1,snap:!1,scrollbar:!1,pullDownRefresh:!1,pullUpLoad:!1,mouseWheel:!1,stopPropagation:!1,zoom:!1,infinity:!1,dblclick:!1},U={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}}},V=function(){return O?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,(t.interval||100/60)/2)}:x}(),K=function(){return O?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||function(t){window.clearTimeout(t)}:x}(),q=1,G=-1,Z=1,J=-1,Q=1,tt=3;k.prototype.handleEvent=function(t){switch(t.type){case"touchstart":case"mousedown":this._start(t);break;case"touchmove":case"mousemove":this._move(t);break;case"touchend":case"mouseup":case"touchcancel":case"mousecancel":this._end(t)}},k.prototype.refresh=function(){this._shouldShow()&&(this.transitionTime(),this._calculate(),this.updatePosition())},k.prototype.fade=function(t,e){var i=this;if(!e||this.visible){var n=t?250:500;t=t?"1":"0",this.wrapperStyle[R.transitionDuration]=n+"ms",clearTimeout(this.fadeTimeout),this.fadeTimeout=setTimeout(function(){i.wrapperStyle.opacity=t,i.visible=+t},0)}},k.prototype.updatePosition=function(){if("vertical"===this.direction){var t=Math.round(this.sizeRatioY*this.scroller.y);if(t<0){this.transitionTime(500);var e=Math.max(this.indicatorHeight+3*t,8);this.indicatorStyle.height=e+"px",t=0}else if(t>this.maxPosY){this.transitionTime(500);var i=Math.max(this.indicatorHeight-3*(t-this.maxPosY),8);this.indicatorStyle.height=i+"px",t=this.maxPosY+this.indicatorHeight-i}else this.indicatorStyle.height=this.indicatorHeight+"px";this.y=t,this.scroller.options.useTransform?this.indicatorStyle[R.transform]="translateY("+t+"px)"+this.scroller.translateZ:this.indicatorStyle.top=t+"px"}else{var n=Math.round(this.sizeRatioX*this.scroller.x);if(n<0){this.transitionTime(500);var r=Math.max(this.indicatorWidth+3*n,8);this.indicatorStyle.width=r+"px",n=0}else if(n>this.maxPosX){this.transitionTime(500);var o=Math.max(this.indicatorWidth-3*(n-this.maxPosX),8);this.indicatorStyle.width=o+"px",n=this.maxPosX+this.indicatorWidth-o}else this.indicatorStyle.width=this.indicatorWidth+"px";this.x=n,this.scroller.options.useTransform?this.indicatorStyle[R.transform]="translateX("+n+"px)"+this.scroller.translateZ:this.indicatorStyle.left=n+"px"}},k.prototype.transitionTime=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.indicatorStyle[R.transitionDuration]=t+"ms"},k.prototype.transitionTimingFunction=function(t){this.indicatorStyle[R.transitionTimingFunction]=t},k.prototype.destroy=function(){this._removeDOMEvents(),this.wrapper.parentNode.removeChild(this.wrapper)},k.prototype._start=function(t){var e=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=e.pageX,this.lastPointY=e.pageY,this.startTime=n(),this._handleMoveEvents(c),this.scroller.trigger("beforeScrollStart")},k.prototype._move=function(t){var e=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.moved||this.scroller.trigger("scrollStart"),this.moved=!0;var i=e.pageX-this.lastPointX;this.lastPointX=e.pageX;var n=e.pageY-this.lastPointY;this.lastPointY=e.pageY;var r=this.x+i,o=this.y+n;this._pos(r,o)},k.prototype._end=function(t){if(this.initiated){this.initiated=!1,t.preventDefault(),t.stopPropagation(),this._handleMoveEvents(l);var e=this.scroller.options.snap;if(e){var i=e.speed,n=e.easing,r=void 0===n?U.bounce:n,o=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),s=i||Math.max(Math.max(Math.min(Math.abs(this.scroller.x-o.x),1e3),Math.min(Math.abs(this.scroller.y-o.y),1e3)),300);this.scroller.x===o.x&&this.scroller.y===o.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=o,this.scroller.scrollTo(o.x,o.y,s,r))}this.moved&&this.scroller.trigger("scrollEnd",{x:this.scroller.x,y:this.scroller.y})}},k.prototype._pos=function(t,e){t<0?t=0:t>this.maxPosX&&(t=this.maxPosX),e<0?e=0:e>this.maxPosY&&(e=this.maxPosY),t=Math.round(t/this.sizeRatioX),e=Math.round(e/this.sizeRatioY),this.scroller.scrollTo(t,e),this.scroller.trigger("scroll",{x:this.scroller.x,y:this.scroller.y})},k.prototype._shouldShow=function(){return"vertical"===this.direction&&this.scroller.hasVerticalScroll||"horizontal"===this.direction&&this.scroller.hasHorizontalScroll?(this.wrapper.style.display="",!0):(this.wrapper.style.display="none",!1)},k.prototype._calculate=function(){if("vertical"===this.direction){var t=this.wrapper.clientHeight;this.indicatorHeight=Math.max(Math.round(t*t/(this.scroller.scrollerHeight||t||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px",this.maxPosY=t-this.indicatorHeight,this.sizeRatioY=this.maxPosY/this.scroller.maxScrollY}else{var e=this.wrapper.clientWidth;this.indicatorWidth=Math.max(Math.round(e*e/(this.scroller.scrollerWidth||e||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px",this.maxPosX=e-this.indicatorWidth,this.sizeRatioX=this.maxPosX/this.scroller.maxScrollX}},k.prototype._addDOMEvents=function(){var t=c;this._handleDOMEvents(t)},k.prototype._removeDOMEvents=function(){var t=l;this._handleDOMEvents(t),this._handleMoveEvents(t)},k.prototype._handleMoveEvents=function(t){this.scroller.options.disableTouch||t(window,"touchmove",this),this.scroller.options.disableMouse||t(window,"mousemove",this)},k.prototype._handleDOMEvents=function(t){this.scroller.options.disableTouch||(t(this.indicator,"touchstart",this),t(window,"touchend",this)),this.scroller.options.disableMouse||(t(this.indicator,"mousedown",this),t(window,"mouseup",this))};var et=2e3;P.prototype.onScroll=function(){var t=-this.scroller.y,e=t-this.anchorScrollTop;this.anchorItem=0===t?{index:0,offset:0}:this._calculateAnchoredItem(this.anchorItem,e),this.anchorScrollTop=t;var i=this._calculateAnchoredItem(this.anchorItem,this.wrapperEl.offsetHeight),n=this.anchorItem.index,r=i.index;e<0?(n-=30,r+=10):(n-=10,r+=30),this.fill(n,r),this.maybeRequestContent()},P.prototype.onResize=function(){var t=this.options.createTombstone();t.style.position="absolute",this.scrollerEl.appendChild(t),t.style.display="",this.tombstoneHeight=t.offsetHeight,this.tombstoneWidth=t.offsetWidth,this.scrollerEl.removeChild(t);for(var e=0;e<this.items.length;e++)this.items[e].height=this.items[e].width=0;this.onScroll()},P.prototype.fill=function(t,e){this.firstAttachedItem=Math.max(0,t),this.hasMore||(e=Math.min(e,this.items.length)),this.lastAttachedItem=e,this.attachContent()},P.prototype.maybeRequestContent=function(){var t=this;if(!this.requestInProgress&&this.hasMore){var e=this.lastAttachedItem-this.loadedItems;e<=0||(this.requestInProgress=!0,this.options.fetch(e).then(function(e){if(t.requestInProgress=!1,e)t.addContent(e);else{t.hasMore=!1;var i=t._removeTombstones(),n=0;t.anchorItem.index<=t.items.length?(n=t._fixScrollPosition(),t._setupAnimations({},n),t.scroller.resetPosition(t.scroller.options.bounceTime)):(t.anchorItem.index-=i,n=t._fixScrollPosition(),t._setupAnimations({},n),t.scroller.stop(),t.scroller.resetPosition(),t.onScroll())}}))}},P.prototype.addContent=function(t){for(var e=0;e<t.length;e++)this.items.length<=this.loadedItems&&this._addItem(),this.items[this.loadedItems++].data=t[e];this.attachContent(),this.maybeRequestContent()},P.prototype.attachContent=function(){var t=this._collectUnusedNodes(),e=this._createDOMNodes(t);this._cleanupUnusedNodes(t),this._cacheNodeSize();var i=this._fixScrollPosition();this._setupAnimations(e,i)},P.prototype.resetMore=function(){this.hasMore=!0},P.prototype._removeTombstones=function(){for(var t=void 0,e=0,i=this.items.length,n=0;n<i;n++){var r=this.items[n].node,o=this.items[n].data;r&&!C(r)||o||(t||(t=n),r&&this.scrollerEl.removeChild(r))}return e=i-t,this.items.splice(t),this.lastAttachedItem=Math.min(this.lastAttachedItem,this.items.length),e},P.prototype._collectUnusedNodes=function(){for(var t=[],e=0;e<this.items.length;e++)if(e!==this.firstAttachedItem){var i=this.items[e].node;i&&(C(i)?(this.tombstones.push(i),this.tombstones[this.tombstones.length-1].style.display="none"):t.push(i)),this.items[e].node=null}else e=this.lastAttachedItem-1;return t},P.prototype._createDOMNodes=function(t){for(var e={},i=this.firstAttachedItem;i<this.lastAttachedItem;i++){for(;this.items.length<=i;)this._addItem();var n=this.items[i].node,r=this.items[i].data;if(n){if(!C(n)||!r)continue;n.style.zIndex=1,e[i]=[n,this.items[i].top-this.anchorScrollTop],this.items[i].node=null}var o=r?this.options.render(r,t.pop()):this._getTombStone();o.style.position="absolute",this.items[i].top=-1,this.scrollerEl.appendChild(o),this.items[i].node=o}return e},P.prototype._cleanupUnusedNodes=function(t){for(;t.length;)this.scrollerEl.removeChild(t.pop())},P.prototype._cacheNodeSize=function(){for(var t=this.firstAttachedItem;t<this.lastAttachedItem;t++)this.items[t].data&&!this.items[t].height&&(this.items[t].height=this.items[t].node.offsetHeight,this.items[t].width=this.items[t].node.offsetWidth)},P.prototype._fixScrollPosition=function(){this.anchorScrollTop=0;for(var t=0;t<this.anchorItem.index;t++)this.anchorScrollTop+=this.items[t].height||this.tombstoneHeight;this.anchorScrollTop+=this.anchorItem.offset;for(var e=this.anchorScrollTop-this.anchorItem.offset,i=this.anchorItem.index;i>this.firstAttachedItem;)e-=this.items[i-1].height||this.tombstoneHeight,i--;return e},P.prototype._setupAnimations=function(t,e){var i=this;for(var n in t){var r=t[n];this.items[n].node.style.transform="translateY("+(this.anchorScrollTop+r[1])+"px) scale("+this.tombstoneWidth/this.items[n].width+", "+this.tombstoneHeight/this.items[n].height+")",this.items[n].node.offsetTop,r[0].offsetTop,this.items[n].node.style.transition="transform 200ms"}for(var o=this.firstAttachedItem;o<this.lastAttachedItem;o++){var s=t[o];if(s){var a=s[0];a.style.transition="transform 200ms, opacity 200ms",a.style.transform="translateY("+e+"px) scale("+this.items[o].width/this.tombstoneWidth+", "+this.items[o].height/this.tombstoneHeight+")",a.style.opacity=0}e!==this.items[o].top&&(s||(this.items[o].node.style.transition=""),this.items[o].node.style.transform="translateY("+e+"px)"),this.items[o].top=e,e+=this.items[o].height||this.tombstoneHeight}this.scroller.maxScrollY=-(e-this.wrapperEl.offsetHeight+(this.hasMore?et:0)),setTimeout(function(){for(var e in t){var n=t[e];n[0].style.display="none",i.tombstones.push(n[0])}},200)},P.prototype._getTombStone=function(){var t=this.tombstones.pop();return t?(t.style.display="",t.style.opacity=1,t.style.transform="",t.style.transition="",t):this.options.createTombstone()},P.prototype._addItem=function(){this.items.push({data:null,node:null,height:0,width:0,top:0})},P.prototype._calculateAnchoredItem=function(t,e){if(0===e)return t;var i=t.index,n=0;if((e+=t.offset)<0){for(;e<0&&i>0&&this.items[i-1].height;)e+=this.items[i-1].height,i--;n=Math.max(-i,Math.ceil(Math.min(e,0)/this.tombstoneHeight))}else{for(;e>0&&i<this.items.length&&this.items[i].height&&this.items[i].height<e;)e-=this.items[i].height,i++;(i>=this.items.length||!this.items[i].height)&&(n=Math.floor(Math.max(e,0)/this.tombstoneHeight))}return i+=n,e-=n*this.tombstoneHeight,{index:i,offset:e}},function(t){t.prototype._init=function(t,e){this._handleOptions(e),this._events={},this.x=0,this.y=0,this.directionX=0,this.directionY=0,this.setScale(1),this._addDOMEvents(),this._initExtFeatures(),this._watchTransition(),this.options.observeDOM&&this._initDOMObserver(),this.options.autoBlur&&this._handleAutoBlur(),this.refresh(),this.options.snap||this.scrollTo(this.options.startX,this.options.startY),this.enable()},t.prototype.setScale=function(t){this.lastScale=o(this.scale)?t:this.scale,this.scale=t},t.prototype._handleOptions=function(t){this.options=r({},F,t),this.translateZ=this.options.HWCompositing&&z?" translateZ(0)":"",this.options.useTransition=this.