You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
30 KiB
6 lines
30 KiB
5 months ago
|
/**
|
||
|
* xe-utils.js v3.5.30
|
||
|
* MIT License.
|
||
|
* @preserve
|
||
|
*/
|
||
|
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.XEUtils=t()}(this,function(){"use strict";function r(){}var m={cookies:{path:"/"},treeOptions:{parentKey:"parentId",key:"id",children:"children"},parseDateFormat:"yyyy-MM-dd HH:mm:ss",firstDayOfWeek:1};function n(u){return function(n,t){var r,e,t=N(t)?t:m.firstDayOfWeek,n=lr(n,0,t,t);return I(n)?(r=new Date(n.getFullYear(),n.getMonth(),n.getDate()),t<(e=(n=u(n)).getDay())&&n.setDate(7-e+t+1),e<t&&n.setDate(t-e+1),Math.floor((f(r)-f(n))/hn+1)):NaN}}function t(n,e){var u=Object[n];return function(t){var r=[];if(t){if(u)return u(t);A(t,1<e?function(n){r.push([""+n,t[n]])}:function(){r.push(arguments[e])})}return r}}function _(e,u){return function(n,t){if(n){if(n[e])return n[e](t);if(w(n)||D(n))return u(n,t);for(var r in n)if(d(n,r)&&t===n[r])return r}return-1}}function H(t){return function(n){return"[object "+t+"]"===dn.call(n)}}function Z(t){return function(n){return typeof n===t}}function C(o,a,c,f,l){return function(n,t,r){if(n&&t){if(o&&n[o])return n[o](t,r);if(a&&D(n)){for(var e=0,u=n.length;e<u;e++)if(!!t.call(r,n[e],e,n)===f)return[!0,!1,e,n[e]][c]}else for(var i in n)if(d(n,i)&&!!t.call(r,n[i],i,n)===f)return[!0,!1,i,n[i]][c]}return l}}function L(u){return function(n,t,r){if(n&&M(t)){if(D(n)||w(n))return u(n,t,r);for(var e in n)if(d(n,e)&&t.call(r,n[e],e,n))return e}return-1}}function P(o){return function(n,t){var n=W(n),r=n;if(n){t>>=0;var e=F(n).split("."),u=e[0],e=e[1]||"",i=e.substring(0,t+1),u=u+(i?"."+i:"");if(t>=e.length)return W(u);u=n,r=0<t?(i=Math.pow(10,t),Math[o](un(u,i))/i):Math[o](u)}return r}}function Y(o){return function(r,e){var u,i;return r&&r.length?(O(r,function(n,t){y(n=e?M(e)?e(n,t,r):Dt(n,e):n)||!y(u)&&!o(u,n)||(i=t,u=n)}),r[i]):u}}function U(f,l){return function(r,e){var n,t,u={},i=[],o=this,a=arguments,c=a.length;if(!M(e)){for(t=1;t<c;t++)i.push.apply(i,D(n=a[t])?n:[n]);e=0}return A(r,function(n,t){((e?e.call(o,n,t,r):-1<pt(i,function(n){return n===t}))?f:l)&&(u[t]=n)}),u}}function q(t){return function(n){if(n){n=t(n&&n.replace?n.replace(/,/g,""):n);if(!isNaN(n))return n}return 0}}function B(i){return function(n,t,r,e){var r=r||{},u=r.children||"children";return i(null,n,t,e,[],[],u,r)}}function J(n,t){return n===t}function K(t,r){try{delete t[r]}catch(n){t[r]=void 0}}function Q(r,e,u,i,n,t,o){if(r===e)return!0;if(r&&e&&!N(r)&&!N(e)&&!w(r)&&!w(e)){if(Kn(r))return u(""+r,""+e,n,t,o);if(E(r)||Jn(r))return u(+r,+e,n,t,o);var a,c,f,l=D(r),s=D(e);if(l||s?l&&s:r.constructor===e.constructor)return c=j(r),f=j(e),i&&(a=i(r,e,n)),c.length===f.length&&(b(a)?Wn(c,function(n,t){return n===f[t]&&Q(r[n],e[f[t]],u,i,l||s?t:n,r,e)}):!!a)}return u(r,e,n,t,o)}function V(t){var r=new RegExp("(?:"+j(t).join("|")+")","g");return function(n){return $(n).replace(r,function(n){return t[n]})}}function X(n){return n.getFullYear()}function G(n){return n.getMonth()}function f(n){return n.getTime()}function nn(n){return n?n.splice&&n.join?n:(""+n).replace(/(\[\d+\])\.?/g,"$1.").replace(/\.$/,"").split("."):[]}function tn(){return h?h.origin||h.protocol+"//"+h.host:""}function rn(n){return Date.UTC(n.y,n.M||0,n.d||1,n.H||0,n.m||0,n.s||0,n.S||0)}function en(n){return f((n=n,new Date(X(n),G(n),n.getDate())))}function un(n,t){n=F(n),t=F(t);return parseInt(n.replace(".",""))*parseInt(t.replace(".",""))/Math.pow(10,i(n)+i(t))}function on(){return new Date}function an(n,t){var r=F(n),e=F(t),r=Math.pow(10,Math.max(i(r),i(e)));return(_t(n,r)+_t(t,r))/r}function i(n){return(n.split(".")[1]||"").length}function cn(n,t){var n=F(n),t=F(t),r=i(n),r=i(t)-r,e=r<0,r=Math.pow(10,e?Math.abs(r):r);return _t(n.replace(".","")/t.replace(".",""),e?1/r:r)}function fn(n,t){return n.substring(0,t)+"."+n.substring(t,n.length)}function o(n){return n.toLowerCase()}function l(n,t){return n.repeat?n.repeat(t):(t=isNaN(t)?[]:new Array(g(t))).join(n)+(0<t.length?n:"")}function a(n,t,r){return n.substring(t,r)}function ln(n){return n.toUpperCase()}r.VERSION="3.5.30",r.mixin=function(){O(arguments,function(n){A(n,functi
|