UNPKG

w-ui

Version:

A Vue.js 2.0 UI Toolkit for mobile

1 lines 20.3 kB
module.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=401)}({0:function(t,e){t.exports=function(t,e,n,r,i,s){var o,a=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(o=t,a=t.default);var l="function"==typeof a?a.options:a;e&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0),n&&(l.functional=!0),i&&(l._scopeId=i);var u;if(s?(u=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=u):r&&(u=r),u){var h=l.functional,d=h?l.render:l.beforeCreate;h?(l._injectStyles=u,l.render=function(t,e){return u.call(e),d(t,e)}):l.beforeCreate=d?[].concat(d,u):[u]}return{esModule:o,exports:a,options:l}}},1:function(t,e,n){"use strict";function r(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var s=i(r);return[n].concat(r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"})).concat([s]).join("\n")}return[n].join("\n")}function i(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=r(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var s=this[i][0];"number"==typeof s&&(r[s]=!0)}for(i=0;i<t.length;i++){var o=t[i];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),e.push(o))}},e}},2:function(t,e,n){function r(t){for(var e=0;e<t.length;e++){var n=t[e],r=u[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(s(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{for(var o=[],i=0;i<n.parts.length;i++)o.push(s(n.parts[i]));u[n.id]={id:n.id,refs:1,parts:o}}}}function i(){var t=document.createElement("style");return t.type="text/css",h.appendChild(t),t}function s(t){var e,n,r=document.querySelector("style["+w+'~="'+t.id+'"]');if(r){if(m)return p;r.parentNode.removeChild(r)}if(g){var s=f++;r=d||(d=i()),e=o.bind(null,r,s,!1),n=o.bind(null,r,s,!0)}else r=i(),e=a.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}function o(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=b(e,i);else{var s=document.createTextNode(i),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(s,o[e]):t.appendChild(s)}}function a(t,e){var n=e.css,r=e.media,i=e.sourceMap;if(r&&t.setAttribute("media",r),v.ssrId&&t.setAttribute(w,e.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var c="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!c)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var l=n(3),u={},h=c&&(document.head||document.getElementsByTagName("head")[0]),d=null,f=0,m=!1,p=function(){},v=null,w="data-vue-ssr-id",g="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,e,n,i){m=n,v=i||{};var s=l(t,e);return r(s),function(e){for(var n=[],i=0;i<s.length;i++){var o=s[i],a=u[o.id];a.refs--,n.push(a)}e?(s=l(t,e),r(s)):s=[];for(var i=0;i<n.length;i++){var a=n[i];if(0===a.refs){for(var c=0;c<a.parts.length;c++)a.parts[c]();delete u[a.id]}}}};var b=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},3:function(t,e,n){"use strict";t.exports=function(t,e){for(var n=[],r={},i=0;i<e.length;i++){var s=e[i],o=s[0],a=s[1],c=s[2],l=s[3],u={id:t+":"+i,css:a,media:c,sourceMap:l};r[o]?r[o].parts.push(u):n.push(r[o]={id:o,parts:[u]})}return n}},322:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),i=n(405),s=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default={name:"w-scroll-tree",components:{"w-tree-node":s.default},data:function(){return{drag:!1,startY:0,startTime:0,currentY:0,currentIndex:0,currentSubIndex:0,offsetH:0,lastTime:0,timer:null,total:0,ww:0}},props:{data:{type:Array},centerActivedItem:{type:Boolean,default:!0}},methods:{touchstart:function(t){this.drag=!0;var e=t.targetTouches||[t];e=e[0],this.startY=e.pageY,this.startTime=Date.now(),this.offsetH=0,this.currentY=this.getCurrentY();var n=this.$refs.box.offsetHeight;this.hh=this.$el.offsetHeight,this.maxsh=0,this.minsh=this.hh-n,this.minsh>0&&(this.minsh=0),t.preventDefault()},touchmove:function(t){this.drag&&(this.move(t),t.preventDefault())},touchend:function(t){if(this.drag){this.drag=!1;var e=this.getCurrentY();e>this.maxsh?this.bounceBack(0,this.maxsh):e<this.minsh?this.bounceBack(0,this.minsh):this.momentumMove(t)}},move:function(t){if(this.drag){var e=t.targetTouches||[t];e=e[0];var n=e.pageY-this.startY;this.offsetH=n;var r=this.currentY+n;r=this.getDamping(r),this.translateTo(0,r,0,!0)}},bounceBack:function(t,e,n){var r=n||500;this.translateTo(t,e,r)},getDamping:function(t){var e=this.minsw;return"v"==this.direction&&(e=this.minsh),t>0?Math.round(t/4):t<e?Math.round(e-(e-t)/4):t},momentumMove:function(t){var e=this,n=Date.now()-this.startTime,r=this.getCurrentY();if(n>500||Math.abs(this.offsetH)<10)return void this.slotClick(t);var i=Math.abs(this.offsetH)/n,s=i*i/4e-4*(this.offsetH<0?-1:1),o=Math.round(r+s),a=Math.round(s/i);o<this.minsh?o=Math.round(this.minsh-this.hh/2*(i/8)):o>0&&(o=Math.round(this.hh/2*(i/8))),a<300&&(a=300),a>1200&&(a=1200),this.translateTo(0,o,a),setTimeout(function(){r=e.getCurrentY(),r>e.maxsh?e.bounceBack(0,e.maxsh):r<e.minsh&&e.bounceBack(0,e.minsh)},a)},getCurrentY:function(){var t="0",e=this.$refs.box.style.transform;if(e){var n=e.replace(/\s/g,"").match(/translate3d\((?:.*?),(.*?),(?:.*?)\)/);n&&n.length>1&&(t=n[1].replace("px",""))}return Number.isNaN(t)?0:parseInt(t)},slotClick:function(t){var e=t.target,n=e;if(n){if(!(0,r.hasClass)(e,"w-tree-item"))for(;n&&!(0,r.hasClass)(n,"w-tree-item");)n=n.parentNode;n&&this.centerItem(n);var i=this.$refs.box.offsetHeight;this.hh=this.$el.offsetHeight,this.maxsh=0,this.minsh=this.hh-i,this.minsh>0&&(this.minsh=0);var s=this.getCurrentY();s>this.maxsh?this.bounceBack(0,this.maxsh):s<this.minsh&&this.bounceBack(0,this.minsh)}},centerItem:function(t,e){for(var n=this.$el.querySelectorAll(".w-tree-item"),i=0;i<n.length;i++){var s=n[i];if(s===t){if((0,r.addClass)(s,"active"),"root"===s.getAttribute("data-type"))this.currentIndex=parseInt(s.getAttribute("data-index"));else if("sub"===s.getAttribute("data-type"))for(var o=t;o&&o!==this.$el;)o=o.parentNode,(0,r.hasClass)(o,"w-tree-item")&&((0,r.addClass)(o,"active"),this.currentIndex=parseInt(o.getAttribute("data-index")),this.currentSubIndex=parseInt(s.getAttribute("data-index")))}else(0,r.removeClass)(s,"active")}if(!this.centerActivedItem)return void(e||this.$emit("change",this.currentIndex,this.currentSubIndex));var a=this.$el.getBoundingClientRect(),c=t.getBoundingClientRect(),l=c.top-a.top,u=this.getCurrentY(),h=0;l>this.hh/2?(h=u-(l-this.hh/2+c.height/2),h<this.minsh&&(h=this.minsh),h>this.maxsh&&(h=this.maxsh)):(h=u+(this.hh/2-l-c.height/2),h>this.maxsh&&(h=this.maxsh),h<this.minsh&&(h=this.minsh)),this.translateTo(0,h,600),e||this.$emit("change",this.currentIndex,this.currentSubIndex)},translateTo:function(t,e,n,r){var i=n||300;n<300&&(n=300),n>1200&&(n=1200),r?this.$refs.box.style.transition="none":(this.$refs.box.style.transition=i+"ms all cubic-bezier(0.1, 0.57, 0.1, 1)",this.$refs.box.style.webkitTransition=i+"ms all cubic-bezier(0.1, 0.57, 0.1, 1)"),this.$refs.box.style.transform="translate3d("+t+"px, "+e+"px, 0)",this.$refs.box.style.webkitTransform="translate3d("+t+"px, "+e+"px, 0)"},setCurrent:function(t,e){var n=this.$el.querySelectorAll(".wui-scroll-tree-container> div> .w-tree-item");if(t>=0&&t<this.total&&n){var r=n[t];if(void 0!==e){var i=r.querySelectorAll(".w-tree-item");e>=0&&e<this.data[t].children.length&&(this.currentX=t,this.centerItem(i[e],!0))}else this.currentX=t,this.centerItem(r,!0)}}},mounted:function(){this.total=this.data.length;var t=this.$refs.box.offsetHeight;this.hh=this.$el.offsetHeight,this.maxsh=0,this.minsh=this.hh-t,this.minsh>0&&(this.minsh=0),this.$refs.box.addEventListener("touchmove",this.touchmove,!1),this.$refs.box.addEventListener("mousemove",this.touchmove,!1),this.$refs.box.addEventListener("mouseup",this.touchend,!1),this.$refs.box.addEventListener("touchend",this.touchend,!1)},destroyed:function(){}}},323:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"w-tree-node",props:{change:Function,data:{type:Array},type:{type:String,default:"root"}},methods:{centerItem:function(t){var e=this;if(this.$slots.default.map(function(n,r){n.elm===t?(t.classList.add("active"),e.currentIndex=r):n.elm.classList.remove("active")}),this.centerActivedItem){var n=this.$el.getBoundingClientRect(),r=t.getBoundingClientRect();if("h"==this.direction){var i=r.left-n.left,s=this.getCurrentX(),o=0;i>this.ww/2?(o=s-(i-this.ww/2+r.width/2),o<this.minsw&&(o=this.minsw),o>this.maxsw&&(o=this.maxsw)):(o=s+(this.ww/2-i-r.width/2),o>this.maxsw&&(o=this.maxsw),o<this.minsw&&(o=this.minsw)),this.translateTo(o,0,600),this.$emit("change",this.currentIndex)}else{var a=r.top-n.top,c=this.getCurrentY(),l=0;a>this.hh/2?(l=c-(a-this.hh/2+r.height/2),l<this.minsh&&(l=this.minsh),l>this.maxsh&&(l=this.maxsh)):(l=c+(this.hh/2-a-r.height/2),l>this.maxsh&&(l=this.maxsh),l<this.minsh&&(l=this.minsh)),this.translateTo(0,l,600),this.$emit("change",this.currentIndex)}}},translateTo:function(t,e,n,r){var i=n||300;n<300&&(n=300),n>1200&&(n=1200),this.$refs.box.style.transition=r?"none":i+"ms all cubic-bezier(0.1, 0.57, 0.1, 1)",this.$refs.box.style.transform="translate3d("+t+"px, "+e+"px, 0)"},setCurrent:function(t){t>=0&&t<this.total&&(this.currentX=t,this.centerItem(this.$slots.default[t].elm))}}}},4:function(t,e){t.exports=require("vue")},401:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollTree=void 0;var r=n(402),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.ScrollTree=i.default},402:function(t,e,n){"use strict";function r(t){c||n(403)}Object.defineProperty(e,"__esModule",{value:!0});var i=n(322),s=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,function(){return i[t]})}(o);var a=n(407),c=!1,l=n(0),u=r,h=l(s.a,a.a,!1,u,null,null);h.options.__file="packages/scroll-tree/src/scrolltree.vue",e.default=h.exports},403:function(t,e,n){var r=n(404);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(2)("d9b4e52c",r,!1,{})},404:function(t,e,n){e=t.exports=n(1)(!1),e.push([t.i,"\n.wui-scroll-tree {\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n.wui-scroll-tree .wui-scroll-tree-nav {\n min-height: 5000%;\n overflow: hidden;\n}\n.wui-scroll-tree .wui-scroll-tree-nav .wui-scroll-tree-container {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-align-content: center;\n -ms-flex-line-pack: center;\n align-content: center;\n -webkit-box-pack: start;\n -webkit-justify-content: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-flex-wrap: wrap;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n}\n.wui-scroll-tree .wui-scroll-tree-nav .wui-scroll-tree-container .w-tree-item {\n background-color: #eee;\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.wui-scroll-tree .wui-scroll-tree-nav .wui-scroll-tree-container .w-tree-item .node-title {\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n padding: 10px;\n}\n.wui-scroll-tree .wui-scroll-tree-nav .wui-scroll-tree-container .w-tree-item .node-body {\n display: none;\n -webkit-transition: all 1s linear;\n transition: all 1s linear;\n opacity: 0;\n}\n.wui-scroll-tree .wui-scroll-tree-nav .wui-scroll-tree-container .w-tree-item .node-body .w-tree-item .node-title {\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n padding: 10px 10px 10px 20px;\n position: relative;\n}\n.wui-scroll-tree .wui-scroll-tree-nav .wui-scroll-tree-container .w-tree-item .node-body .w-tree-item .node-title:before {\n content: ' ';\n width: 6px;\n height: 6px;\n background-color: #666;\n border-radius: 100%;\n position: absolute;\n left: 5px;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n.wui-scroll-tree .wui-scroll-tree-nav .wui-scroll-tree-container .w-tree-item .node-body .w-tree-item.active .node-title {\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n background-color: #fff;\n color: dodgerblue;\n}\n.wui-scroll-tree .wui-scroll-tree-nav .wui-scroll-tree-container .w-tree-item .node-body .w-tree-item.active .node-title:before {\n background-color: dodgerblue;\n}\n.wui-scroll-tree .wui-scroll-tree-nav .wui-scroll-tree-container .w-tree-item.active .node-title {\n border-left: 2px dodgerblue solid;\n background-color: #fff;\n}\n.wui-scroll-tree .wui-scroll-tree-nav .wui-scroll-tree-container .w-tree-item.active .node-body {\n display: block;\n opacity: 1;\n}\n.wui-scroll-tree .wui-scroll-tree-nav .wui-scroll-tree-container .w-tree-item.active .node-body .w-tree-item .node-title {\n border: none;\n}\n",""])},405:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(323),i=n.n(r);for(var s in r)"default"!==s&&function(t){n.d(e,t,function(){return r[t]})}(s);var o=n(406),a=n(0),c=a(i.a,o.a,!1,null,null,null);c.options.__file="packages/scroll-tree/src/treenode.vue",e.default=c.exports},406:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",t._l(t.data,function(e,r){return n("div",{key:t.type+"_"+r,staticClass:"w-tree-item",attrs:{"data-type":t.type,"data-index":r}},[n("div",{staticClass:"node-title"},[t._v(t._s(e.name))]),t._v(" "),n("div",{staticClass:"node-body"},[n("w-tree-node",{attrs:{data:e.children,type:"sub"}})],1)])}))},i=[];r._withStripped=!0;var s={render:r,staticRenderFns:i};e.a=s},407:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"wui-scroll-tree"},[n("div",{ref:"nav",staticClass:"wui-scroll-tree-nav"},[n("div",{ref:"box",staticClass:"wui-scroll-tree-container",on:{touchstart:t.touchstart,mousedown:t.touchstart}},[n("w-tree-node",{attrs:{data:t.data}})],1)])])},i=[];r._withStripped=!0;var s={render:r,staticRenderFns:i};e.a=s},5:function(t,e,n){"use strict";function r(t,e){if(!t||!e)return!1;if(-1!==e.indexOf(" "))throw new Error("className should not contain space.");return t.classList?t.classList.contains(e):(" "+t.className+" ").indexOf(" "+e+" ")>-1}function i(t,e){if(t){for(var n=t.className,i=(e||"").split(" "),s=0,o=i.length;s<o;s++){var a=i[s];a&&(t.classList?t.classList.add(a):r(t,a)||(n+=" "+a))}t.classList||(t.className=n)}}function s(t,e){if(t&&e){for(var n=e.split(" "),i=" "+t.className+" ",s=0,o=n.length;s<o;s++){var a=n[s];a&&(t.classList?t.classList.remove(a):r(t,a)&&(i=i.replace(" "+a+" "," ")))}t.classList||(t.className=b(i))}}function o(t,e,n){if(t&&e)if("object"===(void 0===e?"undefined":h(e)))for(var r in e)e.hasOwnProperty(r)&&o(t,r,e[r]);else e=y(e),"opacity"===e&&w<9?t.style.filter=isNaN(n)?"":"alpha(opacity="+100*n+")":t.style[e]=n}function a(t){for(var e=t;e&&"HTML"!==e.tagName&&"BODY"!==e.tagName&&1===e.nodeType;){var n=document.defaultView.getComputedStyle(e).overflowY;if("scroll"===n||"auto"===n)return e;e=e.parentNode}return window}function c(t,e){var n=t==window?document.body.offsetHeight:t.offsetHeight,r=t===window?0:t.getBoundingClientRect().top,i=e.getBoundingClientRect().top-r,s=i+e.offsetHeight;return i>=0&&i<n||s>0&&s<=n}function l(t){function e(n,r,i){if(n!==r){var s=n+i>r?r:n+i;n>r&&(s=n-i<r?r:n-i),t===window?window.scrollTo(s,s):t.scrollTop=s,window.requestAnimationFrame(function(){return e(s,r,i)})}}var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500;window.requestAnimationFrame||(window.requestAnimationFrame=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)});var s=Math.abs(n-r);e(n,r,Math.ceil(s/i*50))}function u(){return++g}Object.defineProperty(e,"__esModule",{value:!0}),e.isObject=e.isArray=e.isDate=e.isFunction=e.isNumber=e.isString=e.isBoolean=e.pageScroll=e.isIOS=e.getStyle=e.once=e.off=e.on=void 0;var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.hasClass=r,e.addClass=i,e.removeClass=s,e.setStyle=o,e.getScrollview=a,e.checkInview=c,e.scrollTop=l,e.getZIndex=u;var d=n(4),f=function(t){return t&&t.__esModule?t:{default:t}}(d),m=f.default.prototype.$isServer,p=/([\:\-\_]+(.))/g,v=/^moz([A-Z])/,w=m?0:Number(document.documentMode),g=1e4,b=function(t){return(t||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},y=function(t){return t.replace(p,function(t,e,n,r){return r?n.toUpperCase():n}).replace(v,"Moz$1")},x=e.on=function(){return!m&&document.addEventListener?function(t,e,n){t&&e&&n&&t.addEventListener(e,n,!1)}:function(t,e,n){t&&e&&n&&t.attachEvent("on"+e,n)}}(),C=e.off=function(){return!m&&document.removeEventListener?function(t,e,n){t&&e&&t.removeEventListener(e,n,!1)}:function(t,e,n){t&&e&&t.detachEvent("on"+e,n)}}();e.once=function(t,e,n){x(t,e,function r(){n&&n.apply(this,arguments),C(t,e,r)})},e.getStyle=w<9?function(t,e){if(!m){if(!t||!e)return null;e=y(e),"float"===e&&(e="styleFloat");try{switch(e){case"opacity":try{return t.filters.item("alpha").opacity/100}catch(t){return 1}default:return t.style[e]||t.currentStyle?t.currentStyle[e]:null}}catch(n){return t.style[e]}}}:function(t,e){if(!m){if(!t||!e)return null;e=y(e),"float"===e&&(e="cssFloat");try{var n=document.defaultView.getComputedStyle(t,"");return t.style[e]||n?n[e]:null}catch(n){return t.style[e]}}},e.isIOS=!!(window.navigator&&window.navigator.userAgent||"").match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),e.pageScroll=function(){var t=function(t){t.preventDefault(),t.stopPropagation()},e=!1;return{lock:function(n){e||(e=!0,(n||document).addEventListener("touchmove",t))},unlock:function(n){e=!1,(n||document).removeEventListener("touchmove",t)}}}(),e.isBoolean=function(t){return"boolean"==typeof t},e.isString=function(t){return"string"==typeof t},e.isNumber=function(t){return"number"==typeof t},e.isFunction=function(t){return"function"==typeof t},e.isDate=function(t){return"date"===Object.prototype.toString.call(t).match(/^(\[object )(\w+)\]$/i)[2].toLowerCase()},e.isArray=Array.isArray,e.isObject=function(t){return"object"===(void 0===t?"undefined":h(t))}}});