/** * xe-utils.js v2.8.3 * 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";var n="yyyy-MM-dd HH:mm:ss",b={treeOptions:{parentKey:"parentId",key:"id",children:"children"},formatDate:n+".SSSZ",formatString:n,dateDiffRules:[["yyyy",31536e6],["MM",2592e6],["dd",864e5],["HH",36e5],["mm",6e4],["ss",1e3],["S",0]]};function r(){}r.v="v2",r.mixin=function(){J(arguments,function(n){Ln(n,function(t,n){r[n]=fn(t)?function(){var n=t.apply(r.$context,arguments);return r.$context=null,n}:t})})},r.setup=function(n){return D(b,n)};var i="undefined",u="last",o="first",a=864e5,f=7*a,c=typeof location===i?0:location,l=typeof window===i?0:window,s=typeof document===i?0:document,h=encodeURIComponent,p=decodeURIComponent,g=Object.prototype.toString,v=parseInt,e={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},d=/(.+)?\[(\d+)\]$/,m=Object.assign;function y(t,n,r){for(var e,u=n.length,i=1;i>=0)+Math.round(Math.random()*((t||9)-n))}var ft=St(function(n,t){return t>=0;var e=vt(r).split("."),u=e[0],i=e[1]||"";if(r=u+"."+i.substring(0,t+1),t>=i.length)return gt(r);if(0>=0,r=un(r)?" ":""+r,e.padStart?e.padStart(t,r):t>e.length?((t-=e.length)>r.length&&(r+=ur(r,t/r.length)),r.slice(0,t)+e):e}function nr(n,r,t){return tr(n).replace((t||b).tmplRE||/\{{2}([.\w[\]\s]+)\}{2}/g,function(n,t){return Pn(r,qt(t))})}function tr(n){return sn(n)?vt(n):""+(en(n)?"":n)}function rr(t){var r=new RegExp("(?:"+Cn(t).join("|")+")","g");return function(n){return tr(n).replace(r,function(n){return t[n]})}}function er(n){return n.toLowerCase()}function ur(n,t){if(n.repeat)return n.repeat(t);var r=isNaN(t)?[]:new Array(v(t));return r.join(n)+(0>0,a=r>>0,f=n.length,c=3>0:f;if(o>0||1;if(on(n))if(0<=u&&n.length>u)for(r=0;r>0,(e=n>>0)>0||1;e=(i=a[c])[1]?c===f-1?l[i[0]]=o||0:(l[i[0]]=Math.floor(o/i[1]),o-=l[i[0]]*i[1]):l[i[0]]=0;return l},trim:qt,trimLeft:Bt,trimRight:_t,escape:Jt,unescape:Qt,camelCase:function(n){if(n=tr(n),Vt[n])return Vt[n];var u=n.length,t=n.replace(/([-]+)/g,function(n,t,r){return r&&r+t.length>=0,r=un(r)?" ":""+r,e.padEnd?e.padEnd(t,r):t>e.length?((t-=e.length)>r.length&&(r+=ur(r,t/r.length)),e+r.slice(0,t)):e},startsWith:function(n,t,r){var e=tr(n);return 0===(1===arguments.length?e:e.substring(r)).indexOf(t)},endsWith:function(n,t,r){var e=tr(n),u=arguments.length;return 1