2 lines
152 KiB
JavaScript
2 lines
152 KiB
JavaScript
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).F2={})}(this,(function(t){"use strict";var e=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},i={}.toString,n=function(t,e){return i.call(t)==="[object "+e+"]"},r=function(t){return n(t,"Function")},a=function(t){return null==t},s=function(t){return Array.isArray?Array.isArray(t):n(t,"Array")},o=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e};function h(t,e){if(t)if(s(t))for(var i=0,n=t.length;i<n&&!1!==e(t[i],i);i++);else if(o(t))for(var r in t)if(t.hasOwnProperty(r)&&!1===e(t[r],r))break}var l=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return h(t,(function(i,n){r(t)&&"prototype"===n||e.push(n)})),e};var u=function(t){return"object"==typeof t&&null!==t},c=function(t){if(!u(t)||!n(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e};var f=function(t){return n(t,"String")},g=function(t){var i=[];return h(t,(function(t){(function(t,i){return!!e(t)&&t.indexOf(i)>-1})(i,t)||i.push(t)})),i},p=function(t){return n(t,"Number")},d=function(t){return a(t)?"":t.toString()},v=function(t){var e=d(t);return e.charAt(0).toLowerCase()+e.substring(1)},y=function(t){var e=d(t);return e.charAt(0).toUpperCase()+e.substring(1)},m=function(t){return n(t,"Boolean")};function x(t,e){for(var i in e)e.hasOwnProperty(i)&&"constructor"!==i&&void 0!==e[i]&&(t[i]=e[i])}function _(t,e,i,n){return e&&x(t,e),i&&x(t,i),n&&x(t,n),t}function S(t,e,i,n){for(var r in i=i||0,n=n||5,e)if(e.hasOwnProperty(r)){var a=e[r];null!==a&&c(a)?(c(t[r])||(t[r]={}),i<n?S(t[r],a,i+1,n):t[r]=e[r]):s(a)?(t[r]=[],t[r]=t[r].concat(a)):void 0!==a&&(t[r]=a)}}var w=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];for(var n=0;n<e.length;n+=1)S(t,e[n]);return t},C=function(t,i){if(t===i)return!0;if(!t||!i)return!1;if(f(t)||f(i))return!1;if(e(t)||e(i)){if(t.length!==i.length)return!1;for(var n=!0,r=0;r<t.length&&(n=C(t[r],i[r]));r++);return n}if(u(t)||u(i)){var a=Object.keys(t),s=Object.keys(i);if(a.length!==s.length)return!1;for(n=!0,r=0;r<a.length&&(n=C(t[a[r]],i[a[r]]));r++);return n}return!1};function P(t){for(var e=[],i=0,n=t.length;i<n;i++)e=e.concat(t[i]);return e}function b(t,e){for(var i=[],n={},r=0,o=t.length;r<o;r++){var l=t[r][e];a(l)||(s(l)?h(l,(function(t){n[t]||(i.push(t),n[t]=!0)})):n[l]||(i.push(l),n[l]=!0))}return i}function M(t,e){for(var i=null,n=0,r=t.length;n<r;n++){var o=t[n][e];if(!a(o)){i=s(o)?o[0]:o;break}}return i}function k(t,e){if(!e)return{0:t};for(var i=function(t){for(var i="_",n=0,r=e.length;n<r;n++)i+=t[e[n]]&&t[e[n]].toString();return i},n={},r=0,a=t.length;r<a;r++){var s=t[r],o=i(s);n[o]?n[o].push(s):n[o]=[s]}return n}function T(t,e,i){if(void 0===i&&(i={}),!e)return[t];var n=k(t,e),r=[];if(1===e.length&&i[e[0]])h(i[e[0]],(function(t){t="_"+t,r.push(n[t])}));else for(var a in n)r.push(n[a]);return r}function A(t,e){if(t){var i=t.indexOf(e);-1!==i&&t.splice(i,1)}}function D(t){if(!t.length)return{min:0,max:0};var e=Math.max.apply(null,t);return{min:Math.min.apply(null,t),max:e}}var I=Object.freeze({__proto__:null,merge:P,values:b,firstValue:M,group:T,groupToMap:k,remove:A,getRange:D}),Y=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0},O="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync,F="object"==typeof my&&"function"==typeof my.getSystemInfoSync,E=typeof global&&!1,N="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.sessionStorage;function z(t){return!(!t||"object"!=typeof t)&&(!(1!==t.nodeType||!t.nodeName)||!!t.isCanvasElement)}function B(){return window&&window.devicePixelRatio||1}function X(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function L(t){var e=X(t,"width");ret
|