@indfnd/utils 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.11](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.10...v0.1.11) (2024-06-16)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **number:** 修改保留小数位数消除了两位数据的问题 ([52c6e5a](http://git.inspur.com/imp-ec/ind-front/ind-utils/commit/52c6e5a641314e274c5e6f99832f3a284f33ac7a))
11
+
5
12
  ### [0.1.10](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.9...v0.1.10) (2024-05-27)
6
13
 
7
14
 
@@ -10539,9 +10539,9 @@ function round(number, precision = 2) {
10539
10539
  if (result.length > 2) {
10540
10540
  const num = result[1];
10541
10541
  const e = result[2];
10542
- return Math.round(parseInt(+num + "e" + (+e + precision))) / Math.pow(10, precision);
10542
+ return Math.round(parseFloat(+num + "e" + (+e + precision))) / Math.pow(10, precision);
10543
10543
  }
10544
- return Math.round(parseInt(+number + "e" + precision)) / Math.pow(10, precision);
10544
+ return Math.round(parseFloat(+number + "e" + precision)) / Math.pow(10, precision);
10545
10545
  }
10546
10546
  return number;
10547
10547
  }
@@ -33,4 +33,4 @@ __p += '`),ce&&(D+=`' +
33
33
  function print() { __p += __j.call(arguments, '') }
34
34
  `:`;
35
35
  `)+D+`return __p
36
- }`;var re=Xc(function(){return pe(p,q+"return "+D).apply(u,v)});if(re.source=D,ga(re))throw re;return re}function WS(e){return ge(e).toLowerCase()}function HS(e){return ge(e).toUpperCase()}function YS(e,t,i){if(e=ge(e),e&&(i||t===u))return ol(e);if(!e||!(t=ft(t)))return e;var o=It(e),s=It(t),p=al(o,s),v=fl(o,s)+1;return vn(o,p,v).join("")}function kS(e,t,i){if(e=ge(e),e&&(i||t===u))return e.slice(0,ll(e)+1);if(!e||!(t=ft(t)))return e;var o=It(e),s=fl(o,It(t))+1;return vn(o,0,s).join("")}function GS(e,t,i){if(e=ge(e),e&&(i||t===u))return e.replace(ho,"");if(!e||!(t=ft(t)))return e;var o=It(e),s=al(o,It(t));return vn(o,s).join("")}function qS(e,t){var i=de,o=oe;if(Oe(t)){var s="separator"in t?t.separator:s;i="length"in t?ne(t.length):i,o="omission"in t?ft(t.omission):o}e=ge(e);var p=e.length;if(jn(e)){var v=It(e);p=v.length}if(i>=p)return e;var m=i-er(o);if(m<1)return o;var b=v?vn(v,0,m).join(""):e.slice(0,m);if(s===u)return b+o;if(v&&(m+=b.length-m),da(s)){if(e.slice(m).search(s)){var T,I=b;for(s.global||(s=Do(s.source,ge(Ts.exec(s))+"g")),s.lastIndex=0;T=s.exec(I);)var D=T.index;b=b.slice(0,D===u?m:D)}}else if(e.indexOf(ft(s),m)!=m){var W=b.lastIndexOf(s);W>-1&&(b=b.slice(0,W))}return b+o}function zS(e){return e=ge(e),e&&r1.test(e)?e.replace(Cs,Ey):e}var KS=ar(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),ma=Zl("toUpperCase");function Qc(e,t,i){return e=ge(e),t=i?u:t,t===u?vy(e)?by(e):ay(e):e.match(t)||[]}var Xc=ie(function(e,t){try{return ot(e,u,t)}catch(i){return ga(i)?i:new j(i)}}),JS=jt(function(e,t){return dt(t,function(i){i=Yt(i),Xt(e,i,pa(e[i],e))}),e});function VS(e){var t=e==null?0:e.length,i=J();return e=t?Ae(e,function(o){if(typeof o[1]!="function")throw new vt(g);return[i(o[0]),o[1]]}):[],ie(function(o){for(var s=-1;++s<t;){var p=e[s];if(ot(p[0],this,o))return ot(p[1],this,o)}})}function QS(e){return Em(mt(e,_))}function _a(e){return function(){return e}}function XS(e,t){return e==null||e!==e?t:e}var ZS=ec(),jS=ec(!0);function nt(e){return e}function wa(e){return $l(typeof e=="function"?e:mt(e,_))}function eA(e){return Fl(mt(e,_))}function tA(e,t){return Pl(e,mt(t,_))}var nA=ie(function(e,t){return function(i){return Br(i,e,t)}}),rA=ie(function(e,t){return function(i){return Br(e,i,t)}});function Ea(e,t,i){var o=Be(t),s=Ni(t,o);i==null&&!(Oe(t)&&(s.length||!o.length))&&(i=t,t=e,e=this,s=Ni(t,Be(t)));var p=!(Oe(i)&&"chain"in i)||!!i.chain,v=tn(e);return dt(s,function(m){var b=t[m];e[m]=b,v&&(e.prototype[m]=function(){var T=this.__chain__;if(p||T){var I=e(this.__wrapped__),D=I.__actions__=je(this.__actions__);return D.push({func:b,args:arguments,thisArg:e}),I.__chain__=T,I}return b.apply(e,ln([this.value()],arguments))})}),e}function iA(){return We._===this&&(We._=$y),this}function Sa(){}function uA(e){return e=ne(e),ie(function(t){return Ml(t,e)})}var oA=jo(Ae),aA=jo(tl),fA=jo(bo);function Zc(e){return oa(e)?Co(Yt(e)):Bm(e)}function sA(e){return function(t){return e==null?u:Dn(e,t)}}var lA=nc(),cA=nc(!0);function Aa(){return[]}function ba(){return!1}function pA(){return{}}function hA(){return""}function gA(){return!0}function dA(e,t){if(e=ne(e),e<1||e>U)return[];var i=ae,o=Ke(e,ae);t=J(t),e-=ae;for(var s=To(o,t);++i<e;)t(i);return s}function vA(e){return te(e)?Ae(e,Yt):st(e)?[e]:je(mc(ge(e)))}function yA(e){var t=++Ty;return ge(e)+t}var mA=ki(function(e,t){return e+t},0),_A=ea("ceil"),wA=ki(function(e,t){return e/t},1),EA=ea("floor");function SA(e){return e&&e.length?Li(e,nt,Uo):u}function AA(e,t){return e&&e.length?Li(e,J(t,2),Uo):u}function bA(e){return il(e,nt)}function CA(e,t){return il(e,J(t,2))}function OA(e){return e&&e.length?Li(e,nt,ko):u}function xA(e,t){return e&&e.length?Li(e,J(t,2),ko):u}var TA=ki(function(e,t){return e*t},1),IA=ea("round"),$A=ki(function(e,t){return e-t},0);function DA(e){return e&&e.length?xo(e,nt):0}function FA(e,t){return e&&e.length?xo(e,J(t,2)):0}return c.after=eE,c.ary=Ic,c.assign=HE,c.assignIn=kc,c.assignInWith=nu,c.assignWith=YE,c.at=kE,c.before=$c,c.bind=pa,c.bindAll=JS,c.bindKey=Dc,c.castArray=pE,c.chain=Oc,c.chunk=E_,c.compact=S_,c.concat=A_,c.cond=VS,c.conforms=QS,c.constant=_a,c.countBy=Dw,c.create=GE,c.curry=Fc,c.curryRight=Pc,c.debounce=Mc,c.defaults=qE,c.defaultsDeep=zE,c.defer=tE,c.delay=nE,c.difference=b_,c.differenceBy=C_,c.differenceWith=O_,c.drop=x_,c.dropRight=T_,c.dropRightWhile=I_,c.dropWhile=$_,c.fill=D_,c.filter=Pw,c.flatMap=Lw,c.flatMapDeep=Nw,c.flatMapDepth=Bw,c.flatten=Sc,c.flattenDeep=F_,c.flattenDepth=P_,c.flip=rE,c.flow=ZS,c.flowRight=jS,c.fromPairs=M_,c.functions=jE,c.functionsIn=eS,c.groupBy=Uw,c.initial=L_,c.intersection=N_,c.intersectionBy=B_,c.intersectionWith=U_,c.invert=nS,c.invertBy=rS,c.invokeMap=Hw,c.iteratee=wa,c.keyBy=Yw,c.keys=Be,c.keysIn=tt,c.map=Qi,c.mapKeys=uS,c.mapValues=oS,c.matches=eA,c.matchesProperty=tA,c.memoize=Zi,c.merge=aS,c.mergeWith=Gc,c.method=nA,c.methodOf=rA,c.mixin=Ea,c.negate=ji,c.nthArg=uA,c.omit=fS,c.omitBy=sS,c.once=iE,c.orderBy=kw,c.over=oA,c.overArgs=uE,c.overEvery=aA,c.overSome=fA,c.partial=ha,c.partialRight=Rc,c.partition=Gw,c.pick=lS,c.pickBy=qc,c.property=Zc,c.propertyOf=sA,c.pull=k_,c.pullAll=bc,c.pullAllBy=G_,c.pullAllWith=q_,c.pullAt=z_,c.range=lA,c.rangeRight=cA,c.rearg=oE,c.reject=Kw,c.remove=K_,c.rest=aE,c.reverse=la,c.sampleSize=Vw,c.set=pS,c.setWith=hS,c.shuffle=Qw,c.slice=J_,c.sortBy=jw,c.sortedUniq=tw,c.sortedUniqBy=nw,c.split=LS,c.spread=fE,c.tail=rw,c.take=iw,c.takeRight=uw,c.takeRightWhile=ow,c.takeWhile=aw,c.tap=Sw,c.throttle=sE,c.thru=Vi,c.toArray=Wc,c.toPairs=zc,c.toPairsIn=Kc,c.toPath=vA,c.toPlainObject=Yc,c.transform=gS,c.unary=lE,c.union=fw,c.unionBy=sw,c.unionWith=lw,c.uniq=cw,c.uniqBy=pw,c.uniqWith=hw,c.unset=dS,c.unzip=ca,c.unzipWith=Cc,c.update=vS,c.updateWith=yS,c.values=lr,c.valuesIn=mS,c.without=gw,c.words=Qc,c.wrap=cE,c.xor=dw,c.xorBy=vw,c.xorWith=yw,c.zip=mw,c.zipObject=_w,c.zipObjectDeep=ww,c.zipWith=Ew,c.entries=zc,c.entriesIn=Kc,c.extend=kc,c.extendWith=nu,Ea(c,c),c.add=mA,c.attempt=Xc,c.camelCase=SS,c.capitalize=Jc,c.ceil=_A,c.clamp=_S,c.clone=hE,c.cloneDeep=dE,c.cloneDeepWith=vE,c.cloneWith=gE,c.conformsTo=yE,c.deburr=Vc,c.defaultTo=XS,c.divide=wA,c.endsWith=AS,c.eq=Dt,c.escape=bS,c.escapeRegExp=CS,c.every=Fw,c.find=Mw,c.findIndex=wc,c.findKey=KE,c.findLast=Rw,c.findLastIndex=Ec,c.findLastKey=JE,c.floor=EA,c.forEach=xc,c.forEachRight=Tc,c.forIn=VE,c.forInRight=QE,c.forOwn=XE,c.forOwnRight=ZE,c.get=va,c.gt=mE,c.gte=_E,c.has=tS,c.hasIn=ya,c.head=Ac,c.identity=nt,c.includes=Ww,c.indexOf=R_,c.inRange=wS,c.invoke=iS,c.isArguments=Mn,c.isArray=te,c.isArrayBuffer=wE,c.isArrayLike=et,c.isArrayLikeObject=Te,c.isBoolean=EE,c.isBuffer=yn,c.isDate=SE,c.isElement=AE,c.isEmpty=bE,c.isEqual=CE,c.isEqualWith=OE,c.isError=ga,c.isFinite=xE,c.isFunction=tn,c.isInteger=Lc,c.isLength=eu,c.isMap=Nc,c.isMatch=TE,c.isMatchWith=IE,c.isNaN=$E,c.isNative=DE,c.isNil=PE,c.isNull=FE,c.isNumber=Bc,c.isObject=Oe,c.isObjectLike=xe,c.isPlainObject=Gr,c.isRegExp=da,c.isSafeInteger=ME,c.isSet=Uc,c.isString=tu,c.isSymbol=st,c.isTypedArray=sr,c.isUndefined=RE,c.isWeakMap=LE,c.isWeakSet=NE,c.join=W_,c.kebabCase=OS,c.last=wt,c.lastIndexOf=H_,c.lowerCase=xS,c.lowerFirst=TS,c.lt=BE,c.lte=UE,c.max=SA,c.maxBy=AA,c.mean=bA,c.meanBy=CA,c.min=OA,c.minBy=xA,c.stubArray=Aa,c.stubFalse=ba,c.stubObject=pA,c.stubString=hA,c.stubTrue=gA,c.multiply=TA,c.nth=Y_,c.noConflict=iA,c.noop=Sa,c.now=Xi,c.pad=IS,c.padEnd=$S,c.padStart=DS,c.parseInt=FS,c.random=ES,c.reduce=qw,c.reduceRight=zw,c.repeat=PS,c.replace=MS,c.result=cS,c.round=IA,c.runInContext=A,c.sample=Jw,c.size=Xw,c.snakeCase=RS,c.some=Zw,c.sortedIndex=V_,c.sortedIndexBy=Q_,c.sortedIndexOf=X_,c.sortedLastIndex=Z_,c.sortedLastIndexBy=j_,c.sortedLastIndexOf=ew,c.startCase=NS,c.startsWith=BS,c.subtract=$A,c.sum=DA,c.sumBy=FA,c.template=US,c.times=dA,c.toFinite=nn,c.toInteger=ne,c.toLength=Hc,c.toLower=WS,c.toNumber=Et,c.toSafeInteger=WE,c.toString=ge,c.toUpper=HS,c.trim=YS,c.trimEnd=kS,c.trimStart=GS,c.truncate=qS,c.unescape=zS,c.uniqueId=yA,c.upperCase=KS,c.upperFirst=ma,c.each=xc,c.eachRight=Tc,c.first=Ac,Ea(c,function(){var e={};return Wt(c,function(t,i){ve.call(c.prototype,i)||(e[i]=t)}),e}(),{chain:!1}),c.VERSION=a,dt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){c[e].placeholder=c}),dt(["drop","take"],function(e,t){le.prototype[e]=function(i){i=i===u?1:Me(ne(i),0);var o=this.__filtered__&&!t?new le(this):this.clone();return o.__filtered__?o.__takeCount__=Ke(i,o.__takeCount__):o.__views__.push({size:Ke(i,ae),type:e+(o.__dir__<0?"Right":"")}),o},le.prototype[e+"Right"]=function(i){return this.reverse()[e](i).reverse()}}),dt(["filter","map","takeWhile"],function(e,t){var i=t+1,o=i==K||i==R;le.prototype[e]=function(s){var p=this.clone();return p.__iteratees__.push({iteratee:J(s,3),type:i}),p.__filtered__=p.__filtered__||o,p}}),dt(["head","last"],function(e,t){var i="take"+(t?"Right":"");le.prototype[e]=function(){return this[i](1).value()[0]}}),dt(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");le.prototype[e]=function(){return this.__filtered__?new le(this):this[i](1)}}),le.prototype.compact=function(){return this.filter(nt)},le.prototype.find=function(e){return this.filter(e).head()},le.prototype.findLast=function(e){return this.reverse().find(e)},le.prototype.invokeMap=ie(function(e,t){return typeof e=="function"?new le(this):this.map(function(i){return Br(i,e,t)})}),le.prototype.reject=function(e){return this.filter(ji(J(e)))},le.prototype.slice=function(e,t){e=ne(e);var i=this;return i.__filtered__&&(e>0||t<0)?new le(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==u&&(t=ne(t),i=t<0?i.dropRight(-t):i.take(t-e)),i)},le.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},le.prototype.toArray=function(){return this.take(ae)},Wt(le.prototype,function(e,t){var i=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),s=c[o?"take"+(t=="last"?"Right":""):t],p=o||/^find/.test(t);!s||(c.prototype[t]=function(){var v=this.__wrapped__,m=o?[1]:arguments,b=v instanceof le,T=m[0],I=b||te(v),D=function(fe){var ce=s.apply(c,ln([fe],m));return o&&W?ce[0]:ce};I&&i&&typeof T=="function"&&T.length!=1&&(b=I=!1);var W=this.__chain__,q=!!this.__actions__.length,V=p&&!W,re=b&&!q;if(!p&&I){v=re?v:new le(this);var Q=e.apply(v,m);return Q.__actions__.push({func:Vi,args:[D],thisArg:u}),new yt(Q,W)}return V&&re?e.apply(this,m):(Q=this.thru(D),V?o?Q.value()[0]:Q.value():Q)})}),dt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ei[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);c.prototype[e]=function(){var s=arguments;if(o&&!this.__chain__){var p=this.value();return t.apply(te(p)?p:[],s)}return this[i](function(v){return t.apply(te(v)?v:[],s)})}}),Wt(le.prototype,function(e,t){var i=c[t];if(i){var o=i.name+"";ve.call(ir,o)||(ir[o]=[]),ir[o].push({name:t,func:i})}}),ir[Yi(u,P).name]=[{name:"wrapper",func:u}],le.prototype.clone=zy,le.prototype.reverse=Ky,le.prototype.value=Jy,c.prototype.at=Aw,c.prototype.chain=bw,c.prototype.commit=Cw,c.prototype.next=Ow,c.prototype.plant=Tw,c.prototype.reverse=Iw,c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=$w,c.prototype.first=c.prototype.head,Dr&&(c.prototype[Dr]=xw),c},tr=Cy();On?((On.exports=tr)._=tr,wo._=tr):We._=tr}).call(_n)})(Zu,Zu.exports);var we=Zu.exports;const is="IS_ENUM",S0={1:"\u662F",0:"\u5426"},us=[{K:"1",V:"\u662F"},{K:"0",V:"\u5426"}],A0={MANAGE_UNIT_ID:"00000000000000000000000020370001",ORG_CODE_ADMIN:"default",ORG_CODE_MKT:"08",ORG_CODE_LOG:"08",ORG_CODE_ACTIVITY:"08",ADMIN_LEVEL_IND:"01",ADMIN_LEVEL_CENTER:"02",ADMIN_LEVEL_FAC:"03",ADMIN_LEVEL_DIST:"04",ADMIN_LEVEL_COMMON_DEPT:"08",ADMIN_LEVEL_COMMON_POST:"80",LEVEL_IND:"01",LEVEL_CENTER:"02",LEVEL_FAC:"02",LEVEL_DIST:"04",LEVEL_CIGAR_DIST:"05",LEVEL_COMMON_DEPT:"03",LEVEL_COMMON_POST:"80",LEVEL_DIST_MANAGE_POST:"81",LEVEL_CUST_MANAGE_POST:"82",LEVEL_CIGAR_DIST_MANAGE_POST:"83",LEVEL_CIGAR_CUST_MANAGE_POST:"84",LEVEL_INTERNAL_POST:"85"};function b0(n=[],r="K",u="V"){return n.map(a=>({K:a[r],V:a[u]}))}function C0(n=[],r="K",u="V"){return n.reduce(a=>Pt(pt({},a),{[a[r]]:a[u]}),{})}function os(n=[],r={}){const u=we.cloneDeep(n),a=Object.keys(r);return u.forEach(f=>{const l=f.field||f.key,g=["enum","select"].includes(f.type);if(a.includes(l)&&g){f.cellRendererParams||(f.cellRendererParams={});const h=r[l];f.type==="enum"?Qu(h)?f.cellRendererParams.enumList=h:f.cellRendererParams.enumData=h:f.type==="select"&&(f.cellRendererParams.datas=h)}f.children&&f.children.length&&(f.children=os(f.children,r))}),u}function O0(n=[],r={}){const u=we.cloneDeep(n),a=Object.keys(r);return u.forEach(f=>{const l=f.formKey;if(a.includes(l)){const g=r[l];Qu(g)?f.enumList=g:f.enumData=g}}),u}const x0={bold:!0,fontSize:"14",horizontalAlignment:"center",verticalAlignment:"center"},T0={fontSize:"10",horizontalAlignment:"left",verticalAlignment:"center",topBorder:!0,bottomBorder:!0},I0={fontSize:"10",horizontalAlignment:"right",verticalAlignment:"center",topBorder:!0,bottomBorder:!0},$0={bold:!0,fontSize:"10",horizontalAlignment:"center",verticalAlignment:"center",fill:"bdc3c7",topBorder:!0,bottomBorder:!0,leftBorder:!0,rightBorder:!0},br={fontSize:"10",horizontalAlignment:"center",verticalAlignment:"center",topBorder:!0,bottomBorder:!0,leftBorder:!0,rightBorder:!0},D0=27,F0=18,P0=18,M0=18;function as({columns:n,datas:r}){var u=we.cloneDeep(n),a=we.cloneDeep(r);we.remove(u,F=>{var L;return F.cellClass&&((L=F==null?void 0:F.cellClass)==null?void 0:L.indexOf("button"))!=-1}),a.forEach((F,L)=>{F.__seq=L+1}),we.forEach(u,F=>{var L;F.cellClass&&((L=F==null?void 0:F.cellClass)==null?void 0:L.indexOf("enum"))!=-1&&a.forEach(N=>{N[F.field]=F.cellRendererParams.datas[N[F.field]]})});const f=F=>{if(F.children){var L=1+Math.max(...F.children.map(N=>f(N)));return F.deepth=L,L}else return 1};var l=Math.max(...u.map(F=>{var L=f(F);return F.deepth=L,L}));console.log("calc deepth = ",l);const g=F=>{if(F.children){var L=we.sum(F.children.map(N=>g(N)));return F.width=L,L}else return 1};var h=we.sum(u.map(F=>{var L=g(F);return F.width=L,L}));console.log("calc width = ",h),console.log("now columnsClo is ",u);var d=[],y=1,E=0;function _(F,L){E+=1,F.reduce((N,X,z)=>(X.children?(N.push({text:X.excelName||X.headerName||X.title,srow:E,scol:y,erow:E,ecol:y+X.width-1}),_(X.children,N)):(N.push({text:X.excelName||X.headerName||X.title,srow:E,scol:y,erow:l,ecol:y}),y+=1),N),L),E-=1}_(u,d);var w=[];function S(F,L){F.reduce((N,X)=>(X.children?S(X.children,N):N.push(X),N),L)}S(u,w);var $=w.map(F=>F.align||"left"),M=w.map(F=>F.align=="right"||F.align=="rightNum"?"n":"s"),B=w.map(F=>F.excelWidth?F.excelWidth:F.width?Math.floor(F.width/10):10),P=w.map(F=>F.numberFormat===void 0?F.align=="rightNum"?"#,##0.0000":F.align=="right"?"#,##0.00":"":F.numberFormat);w.map((F,L)=>{F.field=F.field?F.field:F.key;var N=F.excelName||F.headerName||F.title;N=N.replace(/<br\/>/g,""),F.columnWidth!==void 0?B[L]=F.columnWidth:N&&B[L]<N.length*2&&(B[L]=N.length*2)});var k=a.map(F=>w.map((L,N)=>{L.columnWidth!==void 0?B[N]=L.columnWidth:F[L.field]&&B[N]<(""+F[L.field]).length*2&&(B[N]=(""+F[L.field]).length*2);let X=null;L.cellStyle&&(L.cellStyle instanceof Function?X=L.cellStyle(F[L.field],F,a):X=L.cellStyle);let z=null;return L.formula&&(L.formula instanceof Function?z=L.formula(F[L.field],F,a):z=L.formula),{cellStyle:X,formula:z,value:F[L.field]}}));return{deepth:l,columnAlign:$,columnType:M,columnWidth:B,exportData:k,numberFormat:P,columnTitle:d,columnsCalc:w}}var fs=[];function R0(n){if(n.rowSpanColumns){let a=function(f,l){var g=we.findIndex(n.columns,{field:f});if(!r[f]){var h=[],d="CUR_VAL",y={};we.forEach(n.datas,function(E,_){var w=l?E[f]!=d||_==(u[""+_]||{}).first:E[f]!=d;if(w){if(!l&&y.first!==void 0)for(var S=y.first;S<=y.last;S++)u[""+S]={first:y.first,last:y.last};d=E[f],y={col:f,val:d,first:_,last:_,rowSpan:1},h.push(y)}else if(y.last=_,y.rowSpan=y.last-y.first+1,h.push({rowSpan:0}),!l&&_==n.datas.length-1)for(var S=y.first;S<=y.last;S++)u[""+S]={first:y.first,last:y.last}}),r[f]=h,we.forEach(h,function(E,_){E.rowSpan>1&&fs.push({mergeRowS:_,mergeRowE:_+E.rowSpan-1,megerColS:g,megerColE:g})})}};n.rowSpanIndexCol&&(n.rowSpanIndexCol=n.rowSpanColumns[0]);var r={},u={};a(n.rowSpanIndexCol),we.forEach(n.rowSpanColumns,function(f){a(f,!0)})}}function L0(n){var r=as(n);console.log("calcExportDatas",r);var u=n.title,a=r.deepth,f=n.columnAlign||r.columnAlign,l=n.columnType||r.columnType,g=r.columnTitle,h=n.columnWidth||r.columnWidth,d=f.length,y=n.paramLeft,E=n.paramRight,_=r.exportData,w=n.numberFormat||r.numberFormat;XlsxPopulate.fromBlankAsync().then(S=>{var $=S.sheet("Sheet1");$.name(u);for(var M=0;M<d;M++)$.column(M+1).width(h[M]==0?10:h[M]);var B=$.range(1,1,1,d);B.merged(!0),B.style(x0),B.cell(0,0).value(u),$.row(1).height(D0);var P=2;if(!!n.paramLeft||!!n.paramRight){var k=$.range(2,1,2,Math.round(d/2));k.cell(0,0).value(y||""),k.merged(!0),k.style(T0);var F=$.range(2,Math.round(d/2)+1,2,d);F.cell(0,0).value(E||""),F.merged(!0),F.style(I0),$.row(2).height(F0),P+=1}g.forEach(z=>{var ue=$.range(z.srow+P-1,z.scol,z.erow+P-1,z.ecol);ue.merged(!0),ue.style($0),ue.cell(0,0).value(z.text.replace(/<br\/>/g,""))});for(let z=0;z<a;z++)$.row(P+z).height(P0);P+=a;for(var M=0;M<_.length;M++){for(var L=_[M],N=0;N<L.length;N++)if(l[N]==="s"&&L[N]?($.cell(P+M,N+1).value(L[N].value),br.numberFormat=""):l[N]==="n"&&L[N]?($.cell(P+M,N+1).value(L[N].value?parseFloat(L[N].value):L[N].value),br.numberFormat=w[N]):$.cell(P+M,N+1).value(""),L[N].formula&&$.cell(P+M,N+1).formula(L[N].formula),br.horizontalAlignment=f[N],L[N].cellStyle){let ue=we.merge({},br,L[N].cellStyle);$.cell(P+M,N+1).style(ue)}else $.cell(P+M,N+1).style(br);if(n.rowColor&&M%2!=0){var X=$.range(P+M,1,P+M,d);X.style({fill:"f8f8f9"})}$.row(P+M).height(M0)}n.rowSpanColumns&&(R0(Pt(pt({},n),{columns:r.columnsCalc})),we.forEach(fs,function(z){var ue=$.range(z.mergeRowS+P,z.megerColS+1,z.mergeRowE+P,z.megerColE+1);ue.merged(!0)})),$.freezePanes(n.leftColumns||0,(n.topRows||0)+P-1),S.outputAsync().then(function(z){if(window.navigator&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(z,u+".xlsx");else{var ue=window.URL.createObjectURL(z),ye=document.createElement("a");document.body.appendChild(ye),ye.href=ue,ye.download=u+".xlsx",ye.click(),window.URL.revokeObjectURL(ue),document.body.removeChild(ye)}})}).catch(S=>console.log(S))}function N0(n){return new Promise((r,u)=>{var a=as(n),f=a.deepth;a.exportData;const l=new FileReader;l.onload=g=>iu(this,null,function*(){XlsxPopulate.fromDataAsync(g.target.result).then(h=>{var w;var d=h.sheet(0),y=2;(!!n.paramLeft||!!n.paramRight)&&(y+=1),y+=f;let E=[];for(let S=y;S<d._rows.length;S++){var _=d.row(S);let $={};E.push($);for(let M=1;M<_._cells.length;M++){let B=(w=_._cells[M])==null?void 0:w._value;if(M>a.columnsCalc.length)continue;let P=a.columnsCalc[M-1];$[P.field]=B}}r(E)}).catch(h=>console.log(h))}),l.readAsArrayBuffer(n.file)})}const ss=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function B0(n){if(!n)return"";let r="";const u=ss.length;for(;n>=0;){const a=n%u;r=ss[a]+r,n=parseInt((n-a)/u)-1}return r}function U0(){return document.addEventListener?function(n,r,u){n&&r&&u&&n.addEventListener(r,u,!1)}:function(n,r,u){n&&r&&u&&n.attachEvent("on"+r,u)}}function W0(){return window.document.removeEventListener?function(n,r,u){n&&r&&n.removeEventListener(r,u,!1)}:function(n,r,u){n&&r&&n.detachEvent("on"+r,u)}}function H0(n,r,u){const a=U0();return a(n,r,u),a}function Y0(n,r,u){const a=W0();return a(n,r,u),a}const ls=n=>n.stopPropagation();function k0(n,r){(typeof n.cancelable!="boolean"||n.cancelable)&&n.preventDefault(),r&&ls(n)}function G0(n){if(!n||n.length<4)return"";const r=n.substring(0,4),u=n.substring(4,6),a=cs(parseInt(u));return u?`${r}H${a}`:`${r}`}function cs(n){if(typeof n=="string"){if(isNaN(parseInt(n)))return 0;n=parseInt(n)}return n<=6?1:2}function q0(n){if(!n||n.length<4)return n;const r=n.substring(0,4);if(!n.substring(4,6))return`${r}\u5168\u5E74`;const f=parseInt(n.substring(5))===1?"\u4E0A\u534A\u5E74":"\u4E0B\u534A\u5E74";return`${r}${f}`}function z0(n){if(!n||n.length<4)return n;const r=n.substring(0,4);if(!n.substring(4,6))return`${r}01`;const f=parseInt(n.substring(5))*6-5,l=f<10?`0${f}`:`${f}`;return`${r}${l}`}function K0(n){if(!n||n.length<4)return n;const r=n.substring(0,4);if(!n.substring(4,6))return`${r}12`;const f=parseInt(n.substring(5))*2,l=f<10?`0${f}`:`${f}`;return`${r}${l}`}const J0={aac:"audio/aac",abw:"application/x-abiword",arc:"application/x-freearc",avi:"video/x-msvideo",azw:"application/vnd.amazon.ebook",bin:"application/octet-stream",bmp:"image/bmp",bz:"application/x-bzip",bz2:"application/x-bzip2",csh:"application/x-csh",css:"text/css",csv:"text/csv",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",eot:"application/vnd.ms-fontobject",epub:"application/epub+zip",gif:"image/gif",html:"text/html",ico:"image/vnd.microsoft.icon",ics:"text/calendar",jar:"application/java-archive",jpg:"image/jpeg",jpeg:"image/jpeg",js:"text/javascript",json:"application/json",jsonld:"application/ld+json",mid:"audio/midi",midi:"audio/x-midi",mjs:"text/javascript",mp3:"audio/mpeg",mpeg:"video/mpeg",mpkg:"application/vnd.apple.installer+xml",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",oga:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",otf:"font/otf",png:"image/png",pdf:"application/pdf",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",rar:"application/x-rar-compressed",rtf:"application/rtf",sh:"application/x-sh",svg:"image/svg+xml",swf:"application/x-shockwave-flash",tar:"application/x-tar",tiff:"image/tiff",ttf:"font/ttf",txt:"text/plain",vsd:"application/vnd.visio",wav:"audio/wav",weba:"audio/webm",webm:"video/webm",webp:"image/webp",woff:"font/woff",woff2:"font/woff2",xhtml:"application/xhtml+xml",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xul:"application/vnd.mozilla.xul+xml",zip:"application/zip","7z":"application/x-7z-compressed"};function V0(n){let r="";for(n=(n||0).toString();n.length>3;)r=","+n.slice(-3)+r,n=n.slice(0,n.length-3);return n&&(r=n+r),r}function Q0(n){const r=n.length,u=["\u96F6","\u58F9","\u8D30","\u53C1","\u8086","\u4F0D","\u9646","\u67D2","\u634C","\u7396"],a=["\u4EDF","\u4F70","\u62FE","\u4EBF","\u4EDF","\u4F70","\u62FE","\u4E07","\u4EDF","\u4F70","\u62FE"];let f=[],l=[],g="";for(let h=0;h<r;h++)f.push(parseInt(n[h])),l[h]=u[f[h]];for(let h=r-1,d=1;h>0;h--)l.splice(h,0,a[a.length-d++]);return g=l.join(""),r>=1&&(g+="\u5143\u6574"),g}function X0(n){if(!/^(0|[1-9]\d*)(\.\d+)?$/.test(n))return"\u6570\u636E\u975E\u6CD5";let r="\u5343\u767E\u62FE\u4EBF\u5343\u767E\u62FE\u4E07\u5343\u767E\u62FE\u5143\u89D2\u5206",u="";n+="00";let a=n.indexOf(".");a>=0&&(n=n.substring(0,a)+n.substr(a+1,2)),r=r.substr(r.length-n.length);for(let f=0;f<n.length;f++)u+="\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396".charAt(parseInt(n.charAt(f)))+r.charAt(f);return u.replace(/零(千|百|拾|角)/g,"\u96F6").replace(/(零)+/g,"\u96F6").replace(/零(万|亿|元)/g,"$1").replace(/(亿)万|壹(拾)/g,"$1$2").replace(/^元零?|零分/g,"").replace(/元$/g,"\u5143\u6574")}function Z0(n,r=2){n=n.toString();let u=n.indexOf(".");return u!==-1?n=n.substring(0,r+u+1):n=n.substring(0),parseFloat(n).toFixed(r)}function ps(n,r=2){if(typeof n=="number"){const a=/([0-9])+e([-0-9]+)/.exec(n+"")||[];if(a.length>2){const f=a[1],l=a[2];return Math.round(parseInt(+f+"e"+(+l+r)))/Math.pow(10,r)}return Math.round(parseInt(+n+"e"+r))/Math.pow(10,r)}return n}function j0(n,r=2){const u=parseFloat(n+"");return!isNaN(u)&&(u||u===0)?ps(u,r).toFixed(r):n}const ev=n=>{if(isNaN(n))throw"numToChineseNumerals: \u6570\u636E\u975E\u6CD5";return n=Number(n),hs(n).replace(/^零/,"").replace(/^一十/,"\u5341")},tv=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],nv=["","\u5341","\u767E","\u5343"];function hs(n){if(n===0)return"";const r=Math.floor(Math.log10(n)),u=Math.floor(r/8),a=Math.floor(r%8/4);let f=Math.floor(n/Math.pow(10,4*a+8*u)),l=n%Math.pow(10,4*a+8*u),g=we(String(f).padStart(4,"0")).split("").map((h,d)=>tv[h]+(h==="0"?"":nv[3-d])).uniq().value().join("").replace(/零$/,"");for(let h=0;h<a;h++)g+="\u4E07";for(let h=0;h<u;h++)g+="\u4EBF";return g+hs(l)}function gs(n){return n?["\u4E00","\u4E8C","\u4E09","\u56DB"][n-1]:""}function rv(n){if(!n||n.length<6)return"";const r=n.substring(0,4),u=n.substring(4,6),a=ds(parseInt(u));return`${r}Q${a}`}function ds(n){if(typeof n=="string"){if(isNaN(parseInt(n)))return 0;n=parseInt(n)}return Math.ceil(n/3)}function iv(n){if(!n||n.length<6)return n;const r=n.substring(0,4),u=parseInt(n.substring(5));return`${r}\u7B2C${gs(u)}\u5B63\u5EA6`}function uv(n){if(!n||n.length<6)return n;const r=n.substring(0,4),a=parseInt(n.substring(5))*3-2,f=a<10?`0${a}`:`${a}`;return`${r}${f}`}function ov(n){if(!n||n.length<6)return n;const r=n.substring(0,4),a=parseInt(n.substring(5))*3,f=a<10?`0${a}`:`${a}`;return`${r}${f}`}const zt="__",Jn="--";function ju({tooltip:n,item:r,parents:u,title:a}){let f=null;return n&&(Xu(n)?f=n(r,u):n===!0?f=a:f=n),f}function eo(n,r,u={}){var N;const L=r,{key:a,keyProp:f,title:l,titleProp:g,titleFormatter:h,sortProp:d,sortOrder:y="asc",keyLastSuffix:E,isLimitChildren:_,headerTooltip:w,children:S}=L,$=rp(L,["key","keyProp","title","titleProp","titleFormatter","sortProp","sortOrder","keyLastSuffix","isLimitChildren","headerTooltip","children"]),{keyPropName:M="key",titlePropName:B="title",keyPrefix:P="",parents:k=[]}=u;if(f){let X=((N=we.uniqBy(n,r.keyProp))==null?void 0:N.filter(z=>!Kn(z[r.keyProp])))||[];if(d){const z=X.filter(ye=>Kn(ye[d])),ue=X.filter(ye=>!Kn(ye[d]));X=we.orderBy(ue,[d],[y]).concat(z)}return X.map(z=>{const ue=h?h(z[g]):z[g];if(S&&S.length){const de=`${P}${f}${Jn}${z[f]}${zt}`,oe=S.map($e=>{let qe=_?n.filter(K=>K[f]===z[f]):n;return eo(qe,$e,Pt(pt({},u),{keyPrefix:de,parents:[...k,z]}))});return Pt(pt({},$),{[B]:ue,headerTooltip:ju({tooltip:w,item:z,parents:k,title:ue}),children:we.flatten(oe)})}const ye=E?`${zt}${E}`:"";return Pt(pt({},$),{[M]:`${P}${f}${Jn}${z[f]}${ye}`,[B]:ue,headerTooltip:ju({tooltip:w,item:z,parents:k,title:ue})})})}const F=ju({tooltip:w,item:{},parents:k,title:l});if(S&&S.length){const X=`${P}${a||""}`,z=S.map(ue=>eo(n,ue,Pt(pt({},u),{keyPrefix:X})));return Pt(pt({},$),{[B]:l,headerTooltip:F,children:we.flatten(z)})}return Pt(pt({},$),{[M]:`${P}${a||""}`,[B]:l,headerTooltip:F})}function to(n=[]){return!n||!n.length?[]:n.reduce((r,u)=>u.children?[...r,...to(u.children)]:[...r,u],[])}function vs(n,r){var f;if(!r.length)return;const u=r[0];if(r=r.slice(1),u.includes(Jn)&&r.length){const[l,g]=u.split(Jn),h=we.filter(n,{[l]:g});return vs(h,r)}return r.length&&console.error("\u600E\u4E48\u4F1A\u4E0D\u662F\u6700\u540E\u4E00\u5C42\u5206\u7EC4\u5462\uFF0C\u8BF7\u8054\u7CFB\u5F00\u53D1\u4EBA\u5458\u67E5\u770B\uFF01"),(f=n==null?void 0:n[0])==null?void 0:f[u]}function hi(n,r){if(!n)return"";if(si(r))return n[r]||"";for(const u of r)if(n[u])return n[u];return""}function ys(n,r,u,a,f){if(u>=n.length)return;const l=n[u];let g=we.find(a,{key:l});if(!g&&(g={key:l,title:r[u],children:[]},a.push(g),u===n.length-1)){Object.assign(g,f,{title:r[u]});return}ys(n,r,u+1,g.children,f)}function av({sumColumnDefs:n}){const r=[];for(const u of n){const{key:a,title:f}=u,l=a.split(zt),g=f.split(zt);ys(l,g,0,r,u)}return r}function fv(n=[],r=[],u,a={}){var E;const f=[];a.sumColumnDefs&&a.sumColumnDefs.length&&f.push(...av(a));const l=we.flatten(r.map(_=>eo(n,_,a)))||[];f.push(...l);const g=to(f),h=((E=we.uniqBy(n,_=>hi(_,u)))==null?void 0:E.filter(_=>!Kn(hi(_,u))))||[],d=we.groupBy(n,_=>hi(_,u));return{data:h.map(_=>{const w=hi(_,u),S=d[w]||[],$=pt({},_);return a.sumColumnDefs&&a.sumColumnDefs.length&&a.sumColumnDefs.forEach(M=>{const{key:B}=M,P=B.split(zt)||[],k=(P==null?void 0:P[0])||"",F=(P==null?void 0:P[P.length-1])||"",{sumColKeyProp:L="sumColCode"}=a,N=we.find(S,{[L]:k})||{};$[B]=N[F]}),g.forEach(M=>{const B=M[a.keyPropName||"key"]||"",P=B.split(zt)||[],k=vs(S,P);$[B]=k,delete $[P[P.length-1]]}),$}),columns:f}}function sv(n={},r=[],u={}){const a=[],f={};return Object.keys(n).forEach(g=>{g.includes(zt)||(f[g]=n[g])}),r.forEach(g=>{const h={},d=g[u.keyPropName||"key"]||"";if(d.includes(zt)){const y=d.split(zt);y.forEach((E,_)=>{if(E.includes(Jn)&&y.length){const[w,S]=E.split(Jn);h[w]=S}else if(y.length!==_+1)console.error("columns\u6709\u95EE\u9898\uFF0C\u8BF7\u68C0\u67E5\uFF01");else{const w=we.find(a,h);w?w[E]=n[d]:a.push(Pt(pt(pt({},f),h),{[E]:n[d]}))}})}}),a}function lv(n=[],r=[],u={}){const a=to(r);return n.reduce((f,l)=>[...f,...sv(l,a,u)],[])}let cv=n=>crypto.getRandomValues(new Uint8Array(n)),pv=(n,r,u)=>{let a=(2<<Math.log(n.length-1)/Math.LN2)-1,f=-~(1.6*a*r/n.length);return(l=r)=>{let g="";for(;;){let h=u(f),d=f;for(;d--;)if(g+=n[h[d]&a]||"",g.length===l)return g}}};const hv=((n,r=21)=>pv(n,r,cv))("0123456789abcdef",32);function gv(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var r=Math.random()*16|0,u=n==="x"?r:r&3|8;return u.toString(16)})}function dv(n){var r=new Array("\u9A8C\u8BC1\u901A\u8FC7!","\u8EAB\u4EFD\u8BC1\u53F7\u7801\u4F4D\u6570\u4E0D\u5BF9!","\u8EAB\u4EFD\u8BC1\u53F7\u7801\u51FA\u751F\u65E5\u671F\u8D85\u51FA\u8303\u56F4\u6216\u542B\u6709\u975E\u6CD5\u5B57\u7B26!","\u8EAB\u4EFD\u8BC1\u53F7\u7801\u6821\u9A8C\u9519\u8BEF!","\u8EAB\u4EFD\u8BC1\u5730\u533A\u975E\u6CD5!"),u={11:"\u5317\u4EAC",12:"\u5929\u6D25",13:"\u6CB3\u5317",14:"\u5C71\u897F",15:"\u5185\u8499\u53E4",21:"\u8FBD\u5B81",22:"\u5409\u6797",23:"\u9ED1\u9F99\u6C5F",31:"\u4E0A\u6D77",32:"\u6C5F\u82CF",33:"\u6D59\u6C5F",34:"\u5B89\u5FBD",35:"\u798F\u5EFA",36:"\u6C5F\u897F",37:"\u5C71\u4E1C",41:"\u6CB3\u5357",42:"\u6E56\u5317",43:"\u6E56\u5357",44:"\u5E7F\u4E1C",45:"\u5E7F\u897F",46:"\u6D77\u5357",50:"\u91CD\u5E86",51:"\u56DB\u5DDD",52:"\u8D35\u5DDE",53:"\u4E91\u5357",54:"\u897F\u85CF",61:"\u9655\u897F",62:"\u7518\u8083",63:"\u9752\u6D77",64:"\u5B81\u590F",65:"\u65B0\u7586",71:"\u53F0\u6E7E",81:"\u9999\u6E2F",82:"\u6FB3\u95E8",91:"\u56FD\u5916"},a,f,l,g,h,d=new Array;if(d=n.split(""),u[parseInt(n.substr(0,2))]==null)return r[4];switch(n.length){case 15:return(parseInt(n.substr(6,2))+1900)%4==0||(parseInt(n.substr(6,2))+1900)%100==0&&(parseInt(n.substr(6,2))+1900)%4==0?h=/^[1-9][0-9]{5}19[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}$/:h=/^[1-9][0-9]{5}19[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))[0-9]{3}$/,h.test(n)?r[0]:r[2];case 18:return parseInt(n.substr(6,4))%4==0||parseInt(n.substr(6,4))%100==0&&parseInt(n.substr(6,4))%4==0?h=/^[1-9][0-9]{5}(19|20)[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}[0-9Xx]$/:h=/^[1-9][0-9]{5}(19|20)[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))[0-9]{3}[0-9Xx]$/,h.test(n)?(l=(parseInt(d[0])+parseInt(d[10]))*7+(parseInt(d[1])+parseInt(d[11]))*9+(parseInt(d[2])+parseInt(d[12]))*10+(parseInt(d[3])+parseInt(d[13]))*5+(parseInt(d[4])+parseInt(d[14]))*8+(parseInt(d[5])+parseInt(d[15]))*4+(parseInt(d[6])+parseInt(d[16]))*2+parseInt(d[7])*1+parseInt(d[8])*6+parseInt(d[9])*3,a=l%11,g="F",f="10X98765432",g=f.substr(a,1),g==d[17]?r[0]:r[3]):r[2];default:return r[1]}}function vv(n){var r=/^1[3456789]\d{9}$/;return!!r.test(n)}function yv(n){var r=/^([0-9]{3,4}-)?[0-9]{7,8}$/,u=/^((\+?86)|(\(\+86\)))?(13[0123456789][0-9]{8}|15[012356789][0-9]{8}|18[0123456789][0-9]{8}|14[57][0-9]{8}|17[678][0-9]{8})$/;return!!(u.test(n)||r.test(n))}function mv(n){return/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z](-)?(([DF]((?![IO])[a-zA-Z0-9](?![IO]))[0-9]{4})|([0-9]{5}[DF]))$/.test(n)?!0:/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z](-)?[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]$/.test(n)}const ms="ind-dict_";function _v(n){return _e(`${ms}${n}`)}function wv(n,r){be(`${ms}${n}`,r)}const _s=Lt.authServerContext;function Ev(n){return he.get(`${_s}/anon/dict/getDictsMap`,{params:{dictId:n}})}function ws(n){return iu(this,null,function*(){if(n===is)return us;const r=_v(n);if(r)return r;try{const{data:u}=yield he.get(`${_s}/dict/getDicts`,{params:{dictId:n}});return wv(n,u),u}catch(u){console.error(`getDict error dictId=${n}`,u)}})}function Sv(n){return iu(this,null,function*(){const r={},u=yield Promise.all(n.map(a=>ws(a)));return n.forEach((a,f)=>{if(u[f]){const l={};u[f].forEach(g=>{l[g.K]=g.V}),r[a]={data:l,renderData:u[f]}}}),r})}const Bt=Lt.authServerContext;function Av(){return he.get(`${Bt}/manage/menu/getAllPermission`)}function bv(){return he.get(`${Bt}/manage/upmsMenuHistory/list`)}function Cv(n){return he.post(`${Bt}/manage/upmsMenuHistory/add`,null,{params:n})}function Ov(n){return he.get(`${Bt}/manage/upmsMenuHistory/delete/`+n)}function xv(){return he.get(`${Bt}/manage/upmsMenuCollect/list`)}function Tv(n){return he.post(`${Bt}/manage/upmsMenuCollect/add`,null,{params:n})}function Iv(n){return he.get(`${Bt}/manage/upmsMenuCollect/delete/`+n)}function $v(n){return he.post(`${Bt}/manage/upmsMenuCollect/remove`,null,{params:n})}function Dv(){return he.get(`${Bt}/manage/app/list`)}function Fv(){return he.get(`${Bt}/ipm/bc/basic/item/getMaxTabNum`)}const Es=Lt.ossServerContext;function Ss(n=""){return`${Es}/oss/file/get/${n}`}function As(){return`${Es}/oss/file/put`}function Pv(n,r){const u={};return r&&(u.responseType=r),he.get(Ss(n),u)}function Mv(n,r){let u=new FormData;return u.append("file",r,n),he({method:"post",url:As(),headers:{"Content-Type":_r.multiForm},data:u})}const Vn=Lt.authServerContext;function Rv({userName:n,password:r,validCodeId:u,validCodeInput:a}){let f="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDD2iolFHi+6bUh+V6JPr2gFJQsC0QNsq2EwI0MAPlI5AaizBHRVMjX1H73ptuDSiT3QZh4kk74w+eDLyYj4JXo1SvvDw5w378SLhUIDzH0zrlt3oleT3kiPQxC17yM3Os/wrtHO7IC+KGo9qrg+LJFyR/fYYHcyH9i+JAejBEnJQIDAQAB",g=new window.NodeRSA(f,"pkcs8-public").encrypt(r,"base64"),h=window.Base64.encode(g);const d={usn:n,upw:h,validCodeId:u,validCodeInput:a};return he.formPost(Vn+"/sso/auth/login",d)}function Lv(){return he.get(`${Vn}/manage/user/getCurrentInfo`)}function Nv(){return he.get(`${Vn}/anon/user/getGlobalPolicy`)}function Bv(n){return he.post(`${Vn}/manage/user/updatePassword`,n)}function Uv(n){return`${Vn}/anon/user/getCaptcha/`+n}function Wv(){return he.get(`${Vn}/sso/logout`)}const Hv=Lt.ismAmServerContext;function Yv(n){return he.get(`${Hv}/tree/com/listComTree`,{params:n})}const kv=Lt.ucExtServerContext;function Gv(n){return he.get(`${kv}/index-desc/list`,{params:n})}const no=Lt.ismAmServerContext;function qv(n){return he.get(`${no}/tree/item/listItemTree`,{params:n})}function zv(){return he.get(`${no}/basic/getPriceInfo`,{})}function Kv(n){return he.get(`${no}/basic/getItem`,{params:n})}const Jv=Lt.ucExtServerContext;function Vv(n){return he.get(`${Jv}/tree/uc-user/listUserTree`,{params:n})}C.Base64ForLogin=Jd,C.CONTENT_TYPE=_r,C.IS_OR_NOT_ENUM=S0,C.IS_OR_NOT_ENUM_KEY=is,C.IS_OR_NOT_ENUM_LIST=us,C.MIME_TYPE=J0,C.UC_ENUM=A0,C.addMenuCollectApi=Tv,C.axios=he,C.base64ToBlob=Vd,C.blobToBase64=Qd,C.checkIdCard=dv,C.checkPhone=vv,C.checkTel=yv,C.checkVehicleNo=mv,C.clearIndexDescCache=up,C.clearPermissionCache=fp,C.clearSessionStorage=qr,C.clearUserInfoCache=cp,C.config=Lt,C.cryptor=Kd,C.deleteMenuCollectApi=Iv,C.deleteMenuHistoryApi=Ov,C.exportJsonToExcel=L0,C.flattenRow2ColumnData=lv,C.formatDate=Zd,C.formatDateChinese=jd,C.formatDecimal=Z0,C.formatHalfYear=q0,C.formatQuarter=iv,C.getAppListApi=Dv,C.getCaptchaURL=Uv,C.getContentType=Gu,C.getDictApi=ws,C.getDictMapApi=Sv,C.getDictsMapApi=Ev,C.getExcelColumnIdx=B0,C.getGlobalPolicyApi=Nv,C.getHalfYear=G0,C.getHalfYearBeginMonth=z0,C.getHalfYearEndMonth=K0,C.getHalfYearNum=cs,C.getIndexDescCache=cr,C.getItem=Kv,C.getLocalStorage=Rn,C.getMaxTabNumValueApi=Fv,C.getMenuCollectApi=xv,C.getMenuHistoryApi=bv,C.getOssFileApi=Pv,C.getOssFileUrl=Ss,C.getPermissionApi=Av,C.getPermissionCache=op,C.getPriceInfo=zv,C.getQuarter=rv,C.getQuarterBeginMonth=uv,C.getQuarterEndMonth=ov,C.getQuarterNum=ds,C.getSessionStorage=_e,C.getToken=Hf,C.getType=ns,C.getUrlParams=Nf,C.getUserInfoApi=Lv,C.getUserInfoCache=sp,C.guid=gv,C.importJsonFromExcel=N0,C.isArguments=f0,C.isArray=Qu,C.isArrayLike=li,C.isBoolean=r0,C.isDate=a0,C.isDecimal=y0,C.isElement=c0,C.isEmpty=p0,C.isEqual=pi,C.isEqualWith=E0,C.isError=l0,C.isEven=h0,C.isFinite=d0,C.isFunction=Xu,C.isInteger=v0,C.isNegative=m0,C.isNil=Kn,C.isNull=es,C.isNumber=fn,C.isNumberEqual=w0,C.isObject=i0,C.isObjectLike=ci,C.isOdd=g0,C.isPlainObject=u0,C.isPositive=_0,C.isPromise=o0,C.isPrototype=rs,C.isRegExp=s0,C.isString=si,C.isType=bt,C.isUndefined=ts,C.listComTreeApi=Yv,C.listIndexDescApi=Gv,C.listItemTreeApi=qv,C.listUserTreeApi=Vv,C.loginApi=Rv,C.logoutApi=Wv,C.menuHistoryApi=Cv,C.numToChineseNumerals=ev,C.numToDX=X0,C.off=Y0,C.on=H0,C.preventDefault=k0,C.putOssFileApi=Mv,C.putOssFileUrl=As,C.quarter2Chinese=gs,C.removeLocalStorage=mn,C.removeMenuCollectApi=$v,C.removeSessionStorage=Ze,C.renderColumnEnums=os,C.renderEnumData=C0,C.renderEnumList=b0,C.renderFieldEnums=O0,C.responseInterceptors=Gf,C.round=ps,C.row2column=fv,C.setContentType=Uf,C.setIndexDescCache=ip,C.setLocalStorage=Ln,C.setPermissionCache=ap,C.setSessionStorage=be,C.setToken=Id,C.setUserInfoCache=lp,C.stopPropagation=ls,C.str2Date=Xd,C.toChies=Q0,C.toFixed=j0,C.toThousands=V0,C.updatePasswordApi=Bv,C.useConfig=kf,C.uuid=hv,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
36
+ }`;var re=Xc(function(){return pe(p,q+"return "+D).apply(u,v)});if(re.source=D,ga(re))throw re;return re}function WS(e){return ge(e).toLowerCase()}function HS(e){return ge(e).toUpperCase()}function YS(e,t,i){if(e=ge(e),e&&(i||t===u))return ol(e);if(!e||!(t=ft(t)))return e;var o=It(e),s=It(t),p=al(o,s),v=fl(o,s)+1;return vn(o,p,v).join("")}function kS(e,t,i){if(e=ge(e),e&&(i||t===u))return e.slice(0,ll(e)+1);if(!e||!(t=ft(t)))return e;var o=It(e),s=fl(o,It(t))+1;return vn(o,0,s).join("")}function GS(e,t,i){if(e=ge(e),e&&(i||t===u))return e.replace(ho,"");if(!e||!(t=ft(t)))return e;var o=It(e),s=al(o,It(t));return vn(o,s).join("")}function qS(e,t){var i=de,o=oe;if(Oe(t)){var s="separator"in t?t.separator:s;i="length"in t?ne(t.length):i,o="omission"in t?ft(t.omission):o}e=ge(e);var p=e.length;if(jn(e)){var v=It(e);p=v.length}if(i>=p)return e;var m=i-er(o);if(m<1)return o;var b=v?vn(v,0,m).join(""):e.slice(0,m);if(s===u)return b+o;if(v&&(m+=b.length-m),da(s)){if(e.slice(m).search(s)){var T,I=b;for(s.global||(s=Do(s.source,ge(Ts.exec(s))+"g")),s.lastIndex=0;T=s.exec(I);)var D=T.index;b=b.slice(0,D===u?m:D)}}else if(e.indexOf(ft(s),m)!=m){var W=b.lastIndexOf(s);W>-1&&(b=b.slice(0,W))}return b+o}function zS(e){return e=ge(e),e&&r1.test(e)?e.replace(Cs,Ey):e}var KS=ar(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),ma=Zl("toUpperCase");function Qc(e,t,i){return e=ge(e),t=i?u:t,t===u?vy(e)?by(e):ay(e):e.match(t)||[]}var Xc=ie(function(e,t){try{return ot(e,u,t)}catch(i){return ga(i)?i:new j(i)}}),JS=jt(function(e,t){return dt(t,function(i){i=Yt(i),Xt(e,i,pa(e[i],e))}),e});function VS(e){var t=e==null?0:e.length,i=J();return e=t?Ae(e,function(o){if(typeof o[1]!="function")throw new vt(g);return[i(o[0]),o[1]]}):[],ie(function(o){for(var s=-1;++s<t;){var p=e[s];if(ot(p[0],this,o))return ot(p[1],this,o)}})}function QS(e){return Em(mt(e,_))}function _a(e){return function(){return e}}function XS(e,t){return e==null||e!==e?t:e}var ZS=ec(),jS=ec(!0);function nt(e){return e}function wa(e){return $l(typeof e=="function"?e:mt(e,_))}function eA(e){return Fl(mt(e,_))}function tA(e,t){return Pl(e,mt(t,_))}var nA=ie(function(e,t){return function(i){return Br(i,e,t)}}),rA=ie(function(e,t){return function(i){return Br(e,i,t)}});function Ea(e,t,i){var o=Be(t),s=Ni(t,o);i==null&&!(Oe(t)&&(s.length||!o.length))&&(i=t,t=e,e=this,s=Ni(t,Be(t)));var p=!(Oe(i)&&"chain"in i)||!!i.chain,v=tn(e);return dt(s,function(m){var b=t[m];e[m]=b,v&&(e.prototype[m]=function(){var T=this.__chain__;if(p||T){var I=e(this.__wrapped__),D=I.__actions__=je(this.__actions__);return D.push({func:b,args:arguments,thisArg:e}),I.__chain__=T,I}return b.apply(e,ln([this.value()],arguments))})}),e}function iA(){return We._===this&&(We._=$y),this}function Sa(){}function uA(e){return e=ne(e),ie(function(t){return Ml(t,e)})}var oA=jo(Ae),aA=jo(tl),fA=jo(bo);function Zc(e){return oa(e)?Co(Yt(e)):Bm(e)}function sA(e){return function(t){return e==null?u:Dn(e,t)}}var lA=nc(),cA=nc(!0);function Aa(){return[]}function ba(){return!1}function pA(){return{}}function hA(){return""}function gA(){return!0}function dA(e,t){if(e=ne(e),e<1||e>U)return[];var i=ae,o=Ke(e,ae);t=J(t),e-=ae;for(var s=To(o,t);++i<e;)t(i);return s}function vA(e){return te(e)?Ae(e,Yt):st(e)?[e]:je(mc(ge(e)))}function yA(e){var t=++Ty;return ge(e)+t}var mA=ki(function(e,t){return e+t},0),_A=ea("ceil"),wA=ki(function(e,t){return e/t},1),EA=ea("floor");function SA(e){return e&&e.length?Li(e,nt,Uo):u}function AA(e,t){return e&&e.length?Li(e,J(t,2),Uo):u}function bA(e){return il(e,nt)}function CA(e,t){return il(e,J(t,2))}function OA(e){return e&&e.length?Li(e,nt,ko):u}function xA(e,t){return e&&e.length?Li(e,J(t,2),ko):u}var TA=ki(function(e,t){return e*t},1),IA=ea("round"),$A=ki(function(e,t){return e-t},0);function DA(e){return e&&e.length?xo(e,nt):0}function FA(e,t){return e&&e.length?xo(e,J(t,2)):0}return c.after=eE,c.ary=Ic,c.assign=HE,c.assignIn=kc,c.assignInWith=nu,c.assignWith=YE,c.at=kE,c.before=$c,c.bind=pa,c.bindAll=JS,c.bindKey=Dc,c.castArray=pE,c.chain=Oc,c.chunk=E_,c.compact=S_,c.concat=A_,c.cond=VS,c.conforms=QS,c.constant=_a,c.countBy=Dw,c.create=GE,c.curry=Fc,c.curryRight=Pc,c.debounce=Mc,c.defaults=qE,c.defaultsDeep=zE,c.defer=tE,c.delay=nE,c.difference=b_,c.differenceBy=C_,c.differenceWith=O_,c.drop=x_,c.dropRight=T_,c.dropRightWhile=I_,c.dropWhile=$_,c.fill=D_,c.filter=Pw,c.flatMap=Lw,c.flatMapDeep=Nw,c.flatMapDepth=Bw,c.flatten=Sc,c.flattenDeep=F_,c.flattenDepth=P_,c.flip=rE,c.flow=ZS,c.flowRight=jS,c.fromPairs=M_,c.functions=jE,c.functionsIn=eS,c.groupBy=Uw,c.initial=L_,c.intersection=N_,c.intersectionBy=B_,c.intersectionWith=U_,c.invert=nS,c.invertBy=rS,c.invokeMap=Hw,c.iteratee=wa,c.keyBy=Yw,c.keys=Be,c.keysIn=tt,c.map=Qi,c.mapKeys=uS,c.mapValues=oS,c.matches=eA,c.matchesProperty=tA,c.memoize=Zi,c.merge=aS,c.mergeWith=Gc,c.method=nA,c.methodOf=rA,c.mixin=Ea,c.negate=ji,c.nthArg=uA,c.omit=fS,c.omitBy=sS,c.once=iE,c.orderBy=kw,c.over=oA,c.overArgs=uE,c.overEvery=aA,c.overSome=fA,c.partial=ha,c.partialRight=Rc,c.partition=Gw,c.pick=lS,c.pickBy=qc,c.property=Zc,c.propertyOf=sA,c.pull=k_,c.pullAll=bc,c.pullAllBy=G_,c.pullAllWith=q_,c.pullAt=z_,c.range=lA,c.rangeRight=cA,c.rearg=oE,c.reject=Kw,c.remove=K_,c.rest=aE,c.reverse=la,c.sampleSize=Vw,c.set=pS,c.setWith=hS,c.shuffle=Qw,c.slice=J_,c.sortBy=jw,c.sortedUniq=tw,c.sortedUniqBy=nw,c.split=LS,c.spread=fE,c.tail=rw,c.take=iw,c.takeRight=uw,c.takeRightWhile=ow,c.takeWhile=aw,c.tap=Sw,c.throttle=sE,c.thru=Vi,c.toArray=Wc,c.toPairs=zc,c.toPairsIn=Kc,c.toPath=vA,c.toPlainObject=Yc,c.transform=gS,c.unary=lE,c.union=fw,c.unionBy=sw,c.unionWith=lw,c.uniq=cw,c.uniqBy=pw,c.uniqWith=hw,c.unset=dS,c.unzip=ca,c.unzipWith=Cc,c.update=vS,c.updateWith=yS,c.values=lr,c.valuesIn=mS,c.without=gw,c.words=Qc,c.wrap=cE,c.xor=dw,c.xorBy=vw,c.xorWith=yw,c.zip=mw,c.zipObject=_w,c.zipObjectDeep=ww,c.zipWith=Ew,c.entries=zc,c.entriesIn=Kc,c.extend=kc,c.extendWith=nu,Ea(c,c),c.add=mA,c.attempt=Xc,c.camelCase=SS,c.capitalize=Jc,c.ceil=_A,c.clamp=_S,c.clone=hE,c.cloneDeep=dE,c.cloneDeepWith=vE,c.cloneWith=gE,c.conformsTo=yE,c.deburr=Vc,c.defaultTo=XS,c.divide=wA,c.endsWith=AS,c.eq=Dt,c.escape=bS,c.escapeRegExp=CS,c.every=Fw,c.find=Mw,c.findIndex=wc,c.findKey=KE,c.findLast=Rw,c.findLastIndex=Ec,c.findLastKey=JE,c.floor=EA,c.forEach=xc,c.forEachRight=Tc,c.forIn=VE,c.forInRight=QE,c.forOwn=XE,c.forOwnRight=ZE,c.get=va,c.gt=mE,c.gte=_E,c.has=tS,c.hasIn=ya,c.head=Ac,c.identity=nt,c.includes=Ww,c.indexOf=R_,c.inRange=wS,c.invoke=iS,c.isArguments=Mn,c.isArray=te,c.isArrayBuffer=wE,c.isArrayLike=et,c.isArrayLikeObject=Te,c.isBoolean=EE,c.isBuffer=yn,c.isDate=SE,c.isElement=AE,c.isEmpty=bE,c.isEqual=CE,c.isEqualWith=OE,c.isError=ga,c.isFinite=xE,c.isFunction=tn,c.isInteger=Lc,c.isLength=eu,c.isMap=Nc,c.isMatch=TE,c.isMatchWith=IE,c.isNaN=$E,c.isNative=DE,c.isNil=PE,c.isNull=FE,c.isNumber=Bc,c.isObject=Oe,c.isObjectLike=xe,c.isPlainObject=Gr,c.isRegExp=da,c.isSafeInteger=ME,c.isSet=Uc,c.isString=tu,c.isSymbol=st,c.isTypedArray=sr,c.isUndefined=RE,c.isWeakMap=LE,c.isWeakSet=NE,c.join=W_,c.kebabCase=OS,c.last=wt,c.lastIndexOf=H_,c.lowerCase=xS,c.lowerFirst=TS,c.lt=BE,c.lte=UE,c.max=SA,c.maxBy=AA,c.mean=bA,c.meanBy=CA,c.min=OA,c.minBy=xA,c.stubArray=Aa,c.stubFalse=ba,c.stubObject=pA,c.stubString=hA,c.stubTrue=gA,c.multiply=TA,c.nth=Y_,c.noConflict=iA,c.noop=Sa,c.now=Xi,c.pad=IS,c.padEnd=$S,c.padStart=DS,c.parseInt=FS,c.random=ES,c.reduce=qw,c.reduceRight=zw,c.repeat=PS,c.replace=MS,c.result=cS,c.round=IA,c.runInContext=A,c.sample=Jw,c.size=Xw,c.snakeCase=RS,c.some=Zw,c.sortedIndex=V_,c.sortedIndexBy=Q_,c.sortedIndexOf=X_,c.sortedLastIndex=Z_,c.sortedLastIndexBy=j_,c.sortedLastIndexOf=ew,c.startCase=NS,c.startsWith=BS,c.subtract=$A,c.sum=DA,c.sumBy=FA,c.template=US,c.times=dA,c.toFinite=nn,c.toInteger=ne,c.toLength=Hc,c.toLower=WS,c.toNumber=Et,c.toSafeInteger=WE,c.toString=ge,c.toUpper=HS,c.trim=YS,c.trimEnd=kS,c.trimStart=GS,c.truncate=qS,c.unescape=zS,c.uniqueId=yA,c.upperCase=KS,c.upperFirst=ma,c.each=xc,c.eachRight=Tc,c.first=Ac,Ea(c,function(){var e={};return Wt(c,function(t,i){ve.call(c.prototype,i)||(e[i]=t)}),e}(),{chain:!1}),c.VERSION=a,dt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){c[e].placeholder=c}),dt(["drop","take"],function(e,t){le.prototype[e]=function(i){i=i===u?1:Me(ne(i),0);var o=this.__filtered__&&!t?new le(this):this.clone();return o.__filtered__?o.__takeCount__=Ke(i,o.__takeCount__):o.__views__.push({size:Ke(i,ae),type:e+(o.__dir__<0?"Right":"")}),o},le.prototype[e+"Right"]=function(i){return this.reverse()[e](i).reverse()}}),dt(["filter","map","takeWhile"],function(e,t){var i=t+1,o=i==K||i==R;le.prototype[e]=function(s){var p=this.clone();return p.__iteratees__.push({iteratee:J(s,3),type:i}),p.__filtered__=p.__filtered__||o,p}}),dt(["head","last"],function(e,t){var i="take"+(t?"Right":"");le.prototype[e]=function(){return this[i](1).value()[0]}}),dt(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");le.prototype[e]=function(){return this.__filtered__?new le(this):this[i](1)}}),le.prototype.compact=function(){return this.filter(nt)},le.prototype.find=function(e){return this.filter(e).head()},le.prototype.findLast=function(e){return this.reverse().find(e)},le.prototype.invokeMap=ie(function(e,t){return typeof e=="function"?new le(this):this.map(function(i){return Br(i,e,t)})}),le.prototype.reject=function(e){return this.filter(ji(J(e)))},le.prototype.slice=function(e,t){e=ne(e);var i=this;return i.__filtered__&&(e>0||t<0)?new le(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==u&&(t=ne(t),i=t<0?i.dropRight(-t):i.take(t-e)),i)},le.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},le.prototype.toArray=function(){return this.take(ae)},Wt(le.prototype,function(e,t){var i=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),s=c[o?"take"+(t=="last"?"Right":""):t],p=o||/^find/.test(t);!s||(c.prototype[t]=function(){var v=this.__wrapped__,m=o?[1]:arguments,b=v instanceof le,T=m[0],I=b||te(v),D=function(fe){var ce=s.apply(c,ln([fe],m));return o&&W?ce[0]:ce};I&&i&&typeof T=="function"&&T.length!=1&&(b=I=!1);var W=this.__chain__,q=!!this.__actions__.length,V=p&&!W,re=b&&!q;if(!p&&I){v=re?v:new le(this);var Q=e.apply(v,m);return Q.__actions__.push({func:Vi,args:[D],thisArg:u}),new yt(Q,W)}return V&&re?e.apply(this,m):(Q=this.thru(D),V?o?Q.value()[0]:Q.value():Q)})}),dt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ei[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);c.prototype[e]=function(){var s=arguments;if(o&&!this.__chain__){var p=this.value();return t.apply(te(p)?p:[],s)}return this[i](function(v){return t.apply(te(v)?v:[],s)})}}),Wt(le.prototype,function(e,t){var i=c[t];if(i){var o=i.name+"";ve.call(ir,o)||(ir[o]=[]),ir[o].push({name:t,func:i})}}),ir[Yi(u,P).name]=[{name:"wrapper",func:u}],le.prototype.clone=zy,le.prototype.reverse=Ky,le.prototype.value=Jy,c.prototype.at=Aw,c.prototype.chain=bw,c.prototype.commit=Cw,c.prototype.next=Ow,c.prototype.plant=Tw,c.prototype.reverse=Iw,c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=$w,c.prototype.first=c.prototype.head,Dr&&(c.prototype[Dr]=xw),c},tr=Cy();On?((On.exports=tr)._=tr,wo._=tr):We._=tr}).call(_n)})(Zu,Zu.exports);var we=Zu.exports;const is="IS_ENUM",S0={1:"\u662F",0:"\u5426"},us=[{K:"1",V:"\u662F"},{K:"0",V:"\u5426"}],A0={MANAGE_UNIT_ID:"00000000000000000000000020370001",ORG_CODE_ADMIN:"default",ORG_CODE_MKT:"08",ORG_CODE_LOG:"08",ORG_CODE_ACTIVITY:"08",ADMIN_LEVEL_IND:"01",ADMIN_LEVEL_CENTER:"02",ADMIN_LEVEL_FAC:"03",ADMIN_LEVEL_DIST:"04",ADMIN_LEVEL_COMMON_DEPT:"08",ADMIN_LEVEL_COMMON_POST:"80",LEVEL_IND:"01",LEVEL_CENTER:"02",LEVEL_FAC:"02",LEVEL_DIST:"04",LEVEL_CIGAR_DIST:"05",LEVEL_COMMON_DEPT:"03",LEVEL_COMMON_POST:"80",LEVEL_DIST_MANAGE_POST:"81",LEVEL_CUST_MANAGE_POST:"82",LEVEL_CIGAR_DIST_MANAGE_POST:"83",LEVEL_CIGAR_CUST_MANAGE_POST:"84",LEVEL_INTERNAL_POST:"85"};function b0(n=[],r="K",u="V"){return n.map(a=>({K:a[r],V:a[u]}))}function C0(n=[],r="K",u="V"){return n.reduce(a=>Pt(pt({},a),{[a[r]]:a[u]}),{})}function os(n=[],r={}){const u=we.cloneDeep(n),a=Object.keys(r);return u.forEach(f=>{const l=f.field||f.key,g=["enum","select"].includes(f.type);if(a.includes(l)&&g){f.cellRendererParams||(f.cellRendererParams={});const h=r[l];f.type==="enum"?Qu(h)?f.cellRendererParams.enumList=h:f.cellRendererParams.enumData=h:f.type==="select"&&(f.cellRendererParams.datas=h)}f.children&&f.children.length&&(f.children=os(f.children,r))}),u}function O0(n=[],r={}){const u=we.cloneDeep(n),a=Object.keys(r);return u.forEach(f=>{const l=f.formKey;if(a.includes(l)){const g=r[l];Qu(g)?f.enumList=g:f.enumData=g}}),u}const x0={bold:!0,fontSize:"14",horizontalAlignment:"center",verticalAlignment:"center"},T0={fontSize:"10",horizontalAlignment:"left",verticalAlignment:"center",topBorder:!0,bottomBorder:!0},I0={fontSize:"10",horizontalAlignment:"right",verticalAlignment:"center",topBorder:!0,bottomBorder:!0},$0={bold:!0,fontSize:"10",horizontalAlignment:"center",verticalAlignment:"center",fill:"bdc3c7",topBorder:!0,bottomBorder:!0,leftBorder:!0,rightBorder:!0},br={fontSize:"10",horizontalAlignment:"center",verticalAlignment:"center",topBorder:!0,bottomBorder:!0,leftBorder:!0,rightBorder:!0},D0=27,F0=18,P0=18,M0=18;function as({columns:n,datas:r}){var u=we.cloneDeep(n),a=we.cloneDeep(r);we.remove(u,F=>{var L;return F.cellClass&&((L=F==null?void 0:F.cellClass)==null?void 0:L.indexOf("button"))!=-1}),a.forEach((F,L)=>{F.__seq=L+1}),we.forEach(u,F=>{var L;F.cellClass&&((L=F==null?void 0:F.cellClass)==null?void 0:L.indexOf("enum"))!=-1&&a.forEach(N=>{N[F.field]=F.cellRendererParams.datas[N[F.field]]})});const f=F=>{if(F.children){var L=1+Math.max(...F.children.map(N=>f(N)));return F.deepth=L,L}else return 1};var l=Math.max(...u.map(F=>{var L=f(F);return F.deepth=L,L}));console.log("calc deepth = ",l);const g=F=>{if(F.children){var L=we.sum(F.children.map(N=>g(N)));return F.width=L,L}else return 1};var h=we.sum(u.map(F=>{var L=g(F);return F.width=L,L}));console.log("calc width = ",h),console.log("now columnsClo is ",u);var d=[],y=1,E=0;function _(F,L){E+=1,F.reduce((N,X,z)=>(X.children?(N.push({text:X.excelName||X.headerName||X.title,srow:E,scol:y,erow:E,ecol:y+X.width-1}),_(X.children,N)):(N.push({text:X.excelName||X.headerName||X.title,srow:E,scol:y,erow:l,ecol:y}),y+=1),N),L),E-=1}_(u,d);var w=[];function S(F,L){F.reduce((N,X)=>(X.children?S(X.children,N):N.push(X),N),L)}S(u,w);var $=w.map(F=>F.align||"left"),M=w.map(F=>F.align=="right"||F.align=="rightNum"?"n":"s"),B=w.map(F=>F.excelWidth?F.excelWidth:F.width?Math.floor(F.width/10):10),P=w.map(F=>F.numberFormat===void 0?F.align=="rightNum"?"#,##0.0000":F.align=="right"?"#,##0.00":"":F.numberFormat);w.map((F,L)=>{F.field=F.field?F.field:F.key;var N=F.excelName||F.headerName||F.title;N=N.replace(/<br\/>/g,""),F.columnWidth!==void 0?B[L]=F.columnWidth:N&&B[L]<N.length*2&&(B[L]=N.length*2)});var k=a.map(F=>w.map((L,N)=>{L.columnWidth!==void 0?B[N]=L.columnWidth:F[L.field]&&B[N]<(""+F[L.field]).length*2&&(B[N]=(""+F[L.field]).length*2);let X=null;L.cellStyle&&(L.cellStyle instanceof Function?X=L.cellStyle(F[L.field],F,a):X=L.cellStyle);let z=null;return L.formula&&(L.formula instanceof Function?z=L.formula(F[L.field],F,a):z=L.formula),{cellStyle:X,formula:z,value:F[L.field]}}));return{deepth:l,columnAlign:$,columnType:M,columnWidth:B,exportData:k,numberFormat:P,columnTitle:d,columnsCalc:w}}var fs=[];function R0(n){if(n.rowSpanColumns){let a=function(f,l){var g=we.findIndex(n.columns,{field:f});if(!r[f]){var h=[],d="CUR_VAL",y={};we.forEach(n.datas,function(E,_){var w=l?E[f]!=d||_==(u[""+_]||{}).first:E[f]!=d;if(w){if(!l&&y.first!==void 0)for(var S=y.first;S<=y.last;S++)u[""+S]={first:y.first,last:y.last};d=E[f],y={col:f,val:d,first:_,last:_,rowSpan:1},h.push(y)}else if(y.last=_,y.rowSpan=y.last-y.first+1,h.push({rowSpan:0}),!l&&_==n.datas.length-1)for(var S=y.first;S<=y.last;S++)u[""+S]={first:y.first,last:y.last}}),r[f]=h,we.forEach(h,function(E,_){E.rowSpan>1&&fs.push({mergeRowS:_,mergeRowE:_+E.rowSpan-1,megerColS:g,megerColE:g})})}};n.rowSpanIndexCol&&(n.rowSpanIndexCol=n.rowSpanColumns[0]);var r={},u={};a(n.rowSpanIndexCol),we.forEach(n.rowSpanColumns,function(f){a(f,!0)})}}function L0(n){var r=as(n);console.log("calcExportDatas",r);var u=n.title,a=r.deepth,f=n.columnAlign||r.columnAlign,l=n.columnType||r.columnType,g=r.columnTitle,h=n.columnWidth||r.columnWidth,d=f.length,y=n.paramLeft,E=n.paramRight,_=r.exportData,w=n.numberFormat||r.numberFormat;XlsxPopulate.fromBlankAsync().then(S=>{var $=S.sheet("Sheet1");$.name(u);for(var M=0;M<d;M++)$.column(M+1).width(h[M]==0?10:h[M]);var B=$.range(1,1,1,d);B.merged(!0),B.style(x0),B.cell(0,0).value(u),$.row(1).height(D0);var P=2;if(!!n.paramLeft||!!n.paramRight){var k=$.range(2,1,2,Math.round(d/2));k.cell(0,0).value(y||""),k.merged(!0),k.style(T0);var F=$.range(2,Math.round(d/2)+1,2,d);F.cell(0,0).value(E||""),F.merged(!0),F.style(I0),$.row(2).height(F0),P+=1}g.forEach(z=>{var ue=$.range(z.srow+P-1,z.scol,z.erow+P-1,z.ecol);ue.merged(!0),ue.style($0),ue.cell(0,0).value(z.text.replace(/<br\/>/g,""))});for(let z=0;z<a;z++)$.row(P+z).height(P0);P+=a;for(var M=0;M<_.length;M++){for(var L=_[M],N=0;N<L.length;N++)if(l[N]==="s"&&L[N]?($.cell(P+M,N+1).value(L[N].value),br.numberFormat=""):l[N]==="n"&&L[N]?($.cell(P+M,N+1).value(L[N].value?parseFloat(L[N].value):L[N].value),br.numberFormat=w[N]):$.cell(P+M,N+1).value(""),L[N].formula&&$.cell(P+M,N+1).formula(L[N].formula),br.horizontalAlignment=f[N],L[N].cellStyle){let ue=we.merge({},br,L[N].cellStyle);$.cell(P+M,N+1).style(ue)}else $.cell(P+M,N+1).style(br);if(n.rowColor&&M%2!=0){var X=$.range(P+M,1,P+M,d);X.style({fill:"f8f8f9"})}$.row(P+M).height(M0)}n.rowSpanColumns&&(R0(Pt(pt({},n),{columns:r.columnsCalc})),we.forEach(fs,function(z){var ue=$.range(z.mergeRowS+P,z.megerColS+1,z.mergeRowE+P,z.megerColE+1);ue.merged(!0)})),$.freezePanes(n.leftColumns||0,(n.topRows||0)+P-1),S.outputAsync().then(function(z){if(window.navigator&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(z,u+".xlsx");else{var ue=window.URL.createObjectURL(z),ye=document.createElement("a");document.body.appendChild(ye),ye.href=ue,ye.download=u+".xlsx",ye.click(),window.URL.revokeObjectURL(ue),document.body.removeChild(ye)}})}).catch(S=>console.log(S))}function N0(n){return new Promise((r,u)=>{var a=as(n),f=a.deepth;a.exportData;const l=new FileReader;l.onload=g=>iu(this,null,function*(){XlsxPopulate.fromDataAsync(g.target.result).then(h=>{var w;var d=h.sheet(0),y=2;(!!n.paramLeft||!!n.paramRight)&&(y+=1),y+=f;let E=[];for(let S=y;S<d._rows.length;S++){var _=d.row(S);let $={};E.push($);for(let M=1;M<_._cells.length;M++){let B=(w=_._cells[M])==null?void 0:w._value;if(M>a.columnsCalc.length)continue;let P=a.columnsCalc[M-1];$[P.field]=B}}r(E)}).catch(h=>console.log(h))}),l.readAsArrayBuffer(n.file)})}const ss=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function B0(n){if(!n)return"";let r="";const u=ss.length;for(;n>=0;){const a=n%u;r=ss[a]+r,n=parseInt((n-a)/u)-1}return r}function U0(){return document.addEventListener?function(n,r,u){n&&r&&u&&n.addEventListener(r,u,!1)}:function(n,r,u){n&&r&&u&&n.attachEvent("on"+r,u)}}function W0(){return window.document.removeEventListener?function(n,r,u){n&&r&&n.removeEventListener(r,u,!1)}:function(n,r,u){n&&r&&n.detachEvent("on"+r,u)}}function H0(n,r,u){const a=U0();return a(n,r,u),a}function Y0(n,r,u){const a=W0();return a(n,r,u),a}const ls=n=>n.stopPropagation();function k0(n,r){(typeof n.cancelable!="boolean"||n.cancelable)&&n.preventDefault(),r&&ls(n)}function G0(n){if(!n||n.length<4)return"";const r=n.substring(0,4),u=n.substring(4,6),a=cs(parseInt(u));return u?`${r}H${a}`:`${r}`}function cs(n){if(typeof n=="string"){if(isNaN(parseInt(n)))return 0;n=parseInt(n)}return n<=6?1:2}function q0(n){if(!n||n.length<4)return n;const r=n.substring(0,4);if(!n.substring(4,6))return`${r}\u5168\u5E74`;const f=parseInt(n.substring(5))===1?"\u4E0A\u534A\u5E74":"\u4E0B\u534A\u5E74";return`${r}${f}`}function z0(n){if(!n||n.length<4)return n;const r=n.substring(0,4);if(!n.substring(4,6))return`${r}01`;const f=parseInt(n.substring(5))*6-5,l=f<10?`0${f}`:`${f}`;return`${r}${l}`}function K0(n){if(!n||n.length<4)return n;const r=n.substring(0,4);if(!n.substring(4,6))return`${r}12`;const f=parseInt(n.substring(5))*2,l=f<10?`0${f}`:`${f}`;return`${r}${l}`}const J0={aac:"audio/aac",abw:"application/x-abiword",arc:"application/x-freearc",avi:"video/x-msvideo",azw:"application/vnd.amazon.ebook",bin:"application/octet-stream",bmp:"image/bmp",bz:"application/x-bzip",bz2:"application/x-bzip2",csh:"application/x-csh",css:"text/css",csv:"text/csv",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",eot:"application/vnd.ms-fontobject",epub:"application/epub+zip",gif:"image/gif",html:"text/html",ico:"image/vnd.microsoft.icon",ics:"text/calendar",jar:"application/java-archive",jpg:"image/jpeg",jpeg:"image/jpeg",js:"text/javascript",json:"application/json",jsonld:"application/ld+json",mid:"audio/midi",midi:"audio/x-midi",mjs:"text/javascript",mp3:"audio/mpeg",mpeg:"video/mpeg",mpkg:"application/vnd.apple.installer+xml",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",oga:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",otf:"font/otf",png:"image/png",pdf:"application/pdf",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",rar:"application/x-rar-compressed",rtf:"application/rtf",sh:"application/x-sh",svg:"image/svg+xml",swf:"application/x-shockwave-flash",tar:"application/x-tar",tiff:"image/tiff",ttf:"font/ttf",txt:"text/plain",vsd:"application/vnd.visio",wav:"audio/wav",weba:"audio/webm",webm:"video/webm",webp:"image/webp",woff:"font/woff",woff2:"font/woff2",xhtml:"application/xhtml+xml",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xul:"application/vnd.mozilla.xul+xml",zip:"application/zip","7z":"application/x-7z-compressed"};function V0(n){let r="";for(n=(n||0).toString();n.length>3;)r=","+n.slice(-3)+r,n=n.slice(0,n.length-3);return n&&(r=n+r),r}function Q0(n){const r=n.length,u=["\u96F6","\u58F9","\u8D30","\u53C1","\u8086","\u4F0D","\u9646","\u67D2","\u634C","\u7396"],a=["\u4EDF","\u4F70","\u62FE","\u4EBF","\u4EDF","\u4F70","\u62FE","\u4E07","\u4EDF","\u4F70","\u62FE"];let f=[],l=[],g="";for(let h=0;h<r;h++)f.push(parseInt(n[h])),l[h]=u[f[h]];for(let h=r-1,d=1;h>0;h--)l.splice(h,0,a[a.length-d++]);return g=l.join(""),r>=1&&(g+="\u5143\u6574"),g}function X0(n){if(!/^(0|[1-9]\d*)(\.\d+)?$/.test(n))return"\u6570\u636E\u975E\u6CD5";let r="\u5343\u767E\u62FE\u4EBF\u5343\u767E\u62FE\u4E07\u5343\u767E\u62FE\u5143\u89D2\u5206",u="";n+="00";let a=n.indexOf(".");a>=0&&(n=n.substring(0,a)+n.substr(a+1,2)),r=r.substr(r.length-n.length);for(let f=0;f<n.length;f++)u+="\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396".charAt(parseInt(n.charAt(f)))+r.charAt(f);return u.replace(/零(千|百|拾|角)/g,"\u96F6").replace(/(零)+/g,"\u96F6").replace(/零(万|亿|元)/g,"$1").replace(/(亿)万|壹(拾)/g,"$1$2").replace(/^元零?|零分/g,"").replace(/元$/g,"\u5143\u6574")}function Z0(n,r=2){n=n.toString();let u=n.indexOf(".");return u!==-1?n=n.substring(0,r+u+1):n=n.substring(0),parseFloat(n).toFixed(r)}function ps(n,r=2){if(typeof n=="number"){const a=/([0-9])+e([-0-9]+)/.exec(n+"")||[];if(a.length>2){const f=a[1],l=a[2];return Math.round(parseFloat(+f+"e"+(+l+r)))/Math.pow(10,r)}return Math.round(parseFloat(+n+"e"+r))/Math.pow(10,r)}return n}function j0(n,r=2){const u=parseFloat(n+"");return!isNaN(u)&&(u||u===0)?ps(u,r).toFixed(r):n}const ev=n=>{if(isNaN(n))throw"numToChineseNumerals: \u6570\u636E\u975E\u6CD5";return n=Number(n),hs(n).replace(/^零/,"").replace(/^一十/,"\u5341")},tv=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],nv=["","\u5341","\u767E","\u5343"];function hs(n){if(n===0)return"";const r=Math.floor(Math.log10(n)),u=Math.floor(r/8),a=Math.floor(r%8/4);let f=Math.floor(n/Math.pow(10,4*a+8*u)),l=n%Math.pow(10,4*a+8*u),g=we(String(f).padStart(4,"0")).split("").map((h,d)=>tv[h]+(h==="0"?"":nv[3-d])).uniq().value().join("").replace(/零$/,"");for(let h=0;h<a;h++)g+="\u4E07";for(let h=0;h<u;h++)g+="\u4EBF";return g+hs(l)}function gs(n){return n?["\u4E00","\u4E8C","\u4E09","\u56DB"][n-1]:""}function rv(n){if(!n||n.length<6)return"";const r=n.substring(0,4),u=n.substring(4,6),a=ds(parseInt(u));return`${r}Q${a}`}function ds(n){if(typeof n=="string"){if(isNaN(parseInt(n)))return 0;n=parseInt(n)}return Math.ceil(n/3)}function iv(n){if(!n||n.length<6)return n;const r=n.substring(0,4),u=parseInt(n.substring(5));return`${r}\u7B2C${gs(u)}\u5B63\u5EA6`}function uv(n){if(!n||n.length<6)return n;const r=n.substring(0,4),a=parseInt(n.substring(5))*3-2,f=a<10?`0${a}`:`${a}`;return`${r}${f}`}function ov(n){if(!n||n.length<6)return n;const r=n.substring(0,4),a=parseInt(n.substring(5))*3,f=a<10?`0${a}`:`${a}`;return`${r}${f}`}const zt="__",Jn="--";function ju({tooltip:n,item:r,parents:u,title:a}){let f=null;return n&&(Xu(n)?f=n(r,u):n===!0?f=a:f=n),f}function eo(n,r,u={}){var N;const L=r,{key:a,keyProp:f,title:l,titleProp:g,titleFormatter:h,sortProp:d,sortOrder:y="asc",keyLastSuffix:E,isLimitChildren:_,headerTooltip:w,children:S}=L,$=rp(L,["key","keyProp","title","titleProp","titleFormatter","sortProp","sortOrder","keyLastSuffix","isLimitChildren","headerTooltip","children"]),{keyPropName:M="key",titlePropName:B="title",keyPrefix:P="",parents:k=[]}=u;if(f){let X=((N=we.uniqBy(n,r.keyProp))==null?void 0:N.filter(z=>!Kn(z[r.keyProp])))||[];if(d){const z=X.filter(ye=>Kn(ye[d])),ue=X.filter(ye=>!Kn(ye[d]));X=we.orderBy(ue,[d],[y]).concat(z)}return X.map(z=>{const ue=h?h(z[g]):z[g];if(S&&S.length){const de=`${P}${f}${Jn}${z[f]}${zt}`,oe=S.map($e=>{let qe=_?n.filter(K=>K[f]===z[f]):n;return eo(qe,$e,Pt(pt({},u),{keyPrefix:de,parents:[...k,z]}))});return Pt(pt({},$),{[B]:ue,headerTooltip:ju({tooltip:w,item:z,parents:k,title:ue}),children:we.flatten(oe)})}const ye=E?`${zt}${E}`:"";return Pt(pt({},$),{[M]:`${P}${f}${Jn}${z[f]}${ye}`,[B]:ue,headerTooltip:ju({tooltip:w,item:z,parents:k,title:ue})})})}const F=ju({tooltip:w,item:{},parents:k,title:l});if(S&&S.length){const X=`${P}${a||""}`,z=S.map(ue=>eo(n,ue,Pt(pt({},u),{keyPrefix:X})));return Pt(pt({},$),{[B]:l,headerTooltip:F,children:we.flatten(z)})}return Pt(pt({},$),{[M]:`${P}${a||""}`,[B]:l,headerTooltip:F})}function to(n=[]){return!n||!n.length?[]:n.reduce((r,u)=>u.children?[...r,...to(u.children)]:[...r,u],[])}function vs(n,r){var f;if(!r.length)return;const u=r[0];if(r=r.slice(1),u.includes(Jn)&&r.length){const[l,g]=u.split(Jn),h=we.filter(n,{[l]:g});return vs(h,r)}return r.length&&console.error("\u600E\u4E48\u4F1A\u4E0D\u662F\u6700\u540E\u4E00\u5C42\u5206\u7EC4\u5462\uFF0C\u8BF7\u8054\u7CFB\u5F00\u53D1\u4EBA\u5458\u67E5\u770B\uFF01"),(f=n==null?void 0:n[0])==null?void 0:f[u]}function hi(n,r){if(!n)return"";if(si(r))return n[r]||"";for(const u of r)if(n[u])return n[u];return""}function ys(n,r,u,a,f){if(u>=n.length)return;const l=n[u];let g=we.find(a,{key:l});if(!g&&(g={key:l,title:r[u],children:[]},a.push(g),u===n.length-1)){Object.assign(g,f,{title:r[u]});return}ys(n,r,u+1,g.children,f)}function av({sumColumnDefs:n}){const r=[];for(const u of n){const{key:a,title:f}=u,l=a.split(zt),g=f.split(zt);ys(l,g,0,r,u)}return r}function fv(n=[],r=[],u,a={}){var E;const f=[];a.sumColumnDefs&&a.sumColumnDefs.length&&f.push(...av(a));const l=we.flatten(r.map(_=>eo(n,_,a)))||[];f.push(...l);const g=to(f),h=((E=we.uniqBy(n,_=>hi(_,u)))==null?void 0:E.filter(_=>!Kn(hi(_,u))))||[],d=we.groupBy(n,_=>hi(_,u));return{data:h.map(_=>{const w=hi(_,u),S=d[w]||[],$=pt({},_);return a.sumColumnDefs&&a.sumColumnDefs.length&&a.sumColumnDefs.forEach(M=>{const{key:B}=M,P=B.split(zt)||[],k=(P==null?void 0:P[0])||"",F=(P==null?void 0:P[P.length-1])||"",{sumColKeyProp:L="sumColCode"}=a,N=we.find(S,{[L]:k})||{};$[B]=N[F]}),g.forEach(M=>{const B=M[a.keyPropName||"key"]||"",P=B.split(zt)||[],k=vs(S,P);$[B]=k,delete $[P[P.length-1]]}),$}),columns:f}}function sv(n={},r=[],u={}){const a=[],f={};return Object.keys(n).forEach(g=>{g.includes(zt)||(f[g]=n[g])}),r.forEach(g=>{const h={},d=g[u.keyPropName||"key"]||"";if(d.includes(zt)){const y=d.split(zt);y.forEach((E,_)=>{if(E.includes(Jn)&&y.length){const[w,S]=E.split(Jn);h[w]=S}else if(y.length!==_+1)console.error("columns\u6709\u95EE\u9898\uFF0C\u8BF7\u68C0\u67E5\uFF01");else{const w=we.find(a,h);w?w[E]=n[d]:a.push(Pt(pt(pt({},f),h),{[E]:n[d]}))}})}}),a}function lv(n=[],r=[],u={}){const a=to(r);return n.reduce((f,l)=>[...f,...sv(l,a,u)],[])}let cv=n=>crypto.getRandomValues(new Uint8Array(n)),pv=(n,r,u)=>{let a=(2<<Math.log(n.length-1)/Math.LN2)-1,f=-~(1.6*a*r/n.length);return(l=r)=>{let g="";for(;;){let h=u(f),d=f;for(;d--;)if(g+=n[h[d]&a]||"",g.length===l)return g}}};const hv=((n,r=21)=>pv(n,r,cv))("0123456789abcdef",32);function gv(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var r=Math.random()*16|0,u=n==="x"?r:r&3|8;return u.toString(16)})}function dv(n){var r=new Array("\u9A8C\u8BC1\u901A\u8FC7!","\u8EAB\u4EFD\u8BC1\u53F7\u7801\u4F4D\u6570\u4E0D\u5BF9!","\u8EAB\u4EFD\u8BC1\u53F7\u7801\u51FA\u751F\u65E5\u671F\u8D85\u51FA\u8303\u56F4\u6216\u542B\u6709\u975E\u6CD5\u5B57\u7B26!","\u8EAB\u4EFD\u8BC1\u53F7\u7801\u6821\u9A8C\u9519\u8BEF!","\u8EAB\u4EFD\u8BC1\u5730\u533A\u975E\u6CD5!"),u={11:"\u5317\u4EAC",12:"\u5929\u6D25",13:"\u6CB3\u5317",14:"\u5C71\u897F",15:"\u5185\u8499\u53E4",21:"\u8FBD\u5B81",22:"\u5409\u6797",23:"\u9ED1\u9F99\u6C5F",31:"\u4E0A\u6D77",32:"\u6C5F\u82CF",33:"\u6D59\u6C5F",34:"\u5B89\u5FBD",35:"\u798F\u5EFA",36:"\u6C5F\u897F",37:"\u5C71\u4E1C",41:"\u6CB3\u5357",42:"\u6E56\u5317",43:"\u6E56\u5357",44:"\u5E7F\u4E1C",45:"\u5E7F\u897F",46:"\u6D77\u5357",50:"\u91CD\u5E86",51:"\u56DB\u5DDD",52:"\u8D35\u5DDE",53:"\u4E91\u5357",54:"\u897F\u85CF",61:"\u9655\u897F",62:"\u7518\u8083",63:"\u9752\u6D77",64:"\u5B81\u590F",65:"\u65B0\u7586",71:"\u53F0\u6E7E",81:"\u9999\u6E2F",82:"\u6FB3\u95E8",91:"\u56FD\u5916"},a,f,l,g,h,d=new Array;if(d=n.split(""),u[parseInt(n.substr(0,2))]==null)return r[4];switch(n.length){case 15:return(parseInt(n.substr(6,2))+1900)%4==0||(parseInt(n.substr(6,2))+1900)%100==0&&(parseInt(n.substr(6,2))+1900)%4==0?h=/^[1-9][0-9]{5}19[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}$/:h=/^[1-9][0-9]{5}19[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))[0-9]{3}$/,h.test(n)?r[0]:r[2];case 18:return parseInt(n.substr(6,4))%4==0||parseInt(n.substr(6,4))%100==0&&parseInt(n.substr(6,4))%4==0?h=/^[1-9][0-9]{5}(19|20)[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}[0-9Xx]$/:h=/^[1-9][0-9]{5}(19|20)[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))[0-9]{3}[0-9Xx]$/,h.test(n)?(l=(parseInt(d[0])+parseInt(d[10]))*7+(parseInt(d[1])+parseInt(d[11]))*9+(parseInt(d[2])+parseInt(d[12]))*10+(parseInt(d[3])+parseInt(d[13]))*5+(parseInt(d[4])+parseInt(d[14]))*8+(parseInt(d[5])+parseInt(d[15]))*4+(parseInt(d[6])+parseInt(d[16]))*2+parseInt(d[7])*1+parseInt(d[8])*6+parseInt(d[9])*3,a=l%11,g="F",f="10X98765432",g=f.substr(a,1),g==d[17]?r[0]:r[3]):r[2];default:return r[1]}}function vv(n){var r=/^1[3456789]\d{9}$/;return!!r.test(n)}function yv(n){var r=/^([0-9]{3,4}-)?[0-9]{7,8}$/,u=/^((\+?86)|(\(\+86\)))?(13[0123456789][0-9]{8}|15[012356789][0-9]{8}|18[0123456789][0-9]{8}|14[57][0-9]{8}|17[678][0-9]{8})$/;return!!(u.test(n)||r.test(n))}function mv(n){return/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z](-)?(([DF]((?![IO])[a-zA-Z0-9](?![IO]))[0-9]{4})|([0-9]{5}[DF]))$/.test(n)?!0:/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z](-)?[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]$/.test(n)}const ms="ind-dict_";function _v(n){return _e(`${ms}${n}`)}function wv(n,r){be(`${ms}${n}`,r)}const _s=Lt.authServerContext;function Ev(n){return he.get(`${_s}/anon/dict/getDictsMap`,{params:{dictId:n}})}function ws(n){return iu(this,null,function*(){if(n===is)return us;const r=_v(n);if(r)return r;try{const{data:u}=yield he.get(`${_s}/dict/getDicts`,{params:{dictId:n}});return wv(n,u),u}catch(u){console.error(`getDict error dictId=${n}`,u)}})}function Sv(n){return iu(this,null,function*(){const r={},u=yield Promise.all(n.map(a=>ws(a)));return n.forEach((a,f)=>{if(u[f]){const l={};u[f].forEach(g=>{l[g.K]=g.V}),r[a]={data:l,renderData:u[f]}}}),r})}const Bt=Lt.authServerContext;function Av(){return he.get(`${Bt}/manage/menu/getAllPermission`)}function bv(){return he.get(`${Bt}/manage/upmsMenuHistory/list`)}function Cv(n){return he.post(`${Bt}/manage/upmsMenuHistory/add`,null,{params:n})}function Ov(n){return he.get(`${Bt}/manage/upmsMenuHistory/delete/`+n)}function xv(){return he.get(`${Bt}/manage/upmsMenuCollect/list`)}function Tv(n){return he.post(`${Bt}/manage/upmsMenuCollect/add`,null,{params:n})}function Iv(n){return he.get(`${Bt}/manage/upmsMenuCollect/delete/`+n)}function $v(n){return he.post(`${Bt}/manage/upmsMenuCollect/remove`,null,{params:n})}function Dv(){return he.get(`${Bt}/manage/app/list`)}function Fv(){return he.get(`${Bt}/ipm/bc/basic/item/getMaxTabNum`)}const Es=Lt.ossServerContext;function Ss(n=""){return`${Es}/oss/file/get/${n}`}function As(){return`${Es}/oss/file/put`}function Pv(n,r){const u={};return r&&(u.responseType=r),he.get(Ss(n),u)}function Mv(n,r){let u=new FormData;return u.append("file",r,n),he({method:"post",url:As(),headers:{"Content-Type":_r.multiForm},data:u})}const Vn=Lt.authServerContext;function Rv({userName:n,password:r,validCodeId:u,validCodeInput:a}){let f="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDD2iolFHi+6bUh+V6JPr2gFJQsC0QNsq2EwI0MAPlI5AaizBHRVMjX1H73ptuDSiT3QZh4kk74w+eDLyYj4JXo1SvvDw5w378SLhUIDzH0zrlt3oleT3kiPQxC17yM3Os/wrtHO7IC+KGo9qrg+LJFyR/fYYHcyH9i+JAejBEnJQIDAQAB",g=new window.NodeRSA(f,"pkcs8-public").encrypt(r,"base64"),h=window.Base64.encode(g);const d={usn:n,upw:h,validCodeId:u,validCodeInput:a};return he.formPost(Vn+"/sso/auth/login",d)}function Lv(){return he.get(`${Vn}/manage/user/getCurrentInfo`)}function Nv(){return he.get(`${Vn}/anon/user/getGlobalPolicy`)}function Bv(n){return he.post(`${Vn}/manage/user/updatePassword`,n)}function Uv(n){return`${Vn}/anon/user/getCaptcha/`+n}function Wv(){return he.get(`${Vn}/sso/logout`)}const Hv=Lt.ismAmServerContext;function Yv(n){return he.get(`${Hv}/tree/com/listComTree`,{params:n})}const kv=Lt.ucExtServerContext;function Gv(n){return he.get(`${kv}/index-desc/list`,{params:n})}const no=Lt.ismAmServerContext;function qv(n){return he.get(`${no}/tree/item/listItemTree`,{params:n})}function zv(){return he.get(`${no}/basic/getPriceInfo`,{})}function Kv(n){return he.get(`${no}/basic/getItem`,{params:n})}const Jv=Lt.ucExtServerContext;function Vv(n){return he.get(`${Jv}/tree/uc-user/listUserTree`,{params:n})}C.Base64ForLogin=Jd,C.CONTENT_TYPE=_r,C.IS_OR_NOT_ENUM=S0,C.IS_OR_NOT_ENUM_KEY=is,C.IS_OR_NOT_ENUM_LIST=us,C.MIME_TYPE=J0,C.UC_ENUM=A0,C.addMenuCollectApi=Tv,C.axios=he,C.base64ToBlob=Vd,C.blobToBase64=Qd,C.checkIdCard=dv,C.checkPhone=vv,C.checkTel=yv,C.checkVehicleNo=mv,C.clearIndexDescCache=up,C.clearPermissionCache=fp,C.clearSessionStorage=qr,C.clearUserInfoCache=cp,C.config=Lt,C.cryptor=Kd,C.deleteMenuCollectApi=Iv,C.deleteMenuHistoryApi=Ov,C.exportJsonToExcel=L0,C.flattenRow2ColumnData=lv,C.formatDate=Zd,C.formatDateChinese=jd,C.formatDecimal=Z0,C.formatHalfYear=q0,C.formatQuarter=iv,C.getAppListApi=Dv,C.getCaptchaURL=Uv,C.getContentType=Gu,C.getDictApi=ws,C.getDictMapApi=Sv,C.getDictsMapApi=Ev,C.getExcelColumnIdx=B0,C.getGlobalPolicyApi=Nv,C.getHalfYear=G0,C.getHalfYearBeginMonth=z0,C.getHalfYearEndMonth=K0,C.getHalfYearNum=cs,C.getIndexDescCache=cr,C.getItem=Kv,C.getLocalStorage=Rn,C.getMaxTabNumValueApi=Fv,C.getMenuCollectApi=xv,C.getMenuHistoryApi=bv,C.getOssFileApi=Pv,C.getOssFileUrl=Ss,C.getPermissionApi=Av,C.getPermissionCache=op,C.getPriceInfo=zv,C.getQuarter=rv,C.getQuarterBeginMonth=uv,C.getQuarterEndMonth=ov,C.getQuarterNum=ds,C.getSessionStorage=_e,C.getToken=Hf,C.getType=ns,C.getUrlParams=Nf,C.getUserInfoApi=Lv,C.getUserInfoCache=sp,C.guid=gv,C.importJsonFromExcel=N0,C.isArguments=f0,C.isArray=Qu,C.isArrayLike=li,C.isBoolean=r0,C.isDate=a0,C.isDecimal=y0,C.isElement=c0,C.isEmpty=p0,C.isEqual=pi,C.isEqualWith=E0,C.isError=l0,C.isEven=h0,C.isFinite=d0,C.isFunction=Xu,C.isInteger=v0,C.isNegative=m0,C.isNil=Kn,C.isNull=es,C.isNumber=fn,C.isNumberEqual=w0,C.isObject=i0,C.isObjectLike=ci,C.isOdd=g0,C.isPlainObject=u0,C.isPositive=_0,C.isPromise=o0,C.isPrototype=rs,C.isRegExp=s0,C.isString=si,C.isType=bt,C.isUndefined=ts,C.listComTreeApi=Yv,C.listIndexDescApi=Gv,C.listItemTreeApi=qv,C.listUserTreeApi=Vv,C.loginApi=Rv,C.logoutApi=Wv,C.menuHistoryApi=Cv,C.numToChineseNumerals=ev,C.numToDX=X0,C.off=Y0,C.on=H0,C.preventDefault=k0,C.putOssFileApi=Mv,C.putOssFileUrl=As,C.quarter2Chinese=gs,C.removeLocalStorage=mn,C.removeMenuCollectApi=$v,C.removeSessionStorage=Ze,C.renderColumnEnums=os,C.renderEnumData=C0,C.renderEnumList=b0,C.renderFieldEnums=O0,C.responseInterceptors=Gf,C.round=ps,C.row2column=fv,C.setContentType=Uf,C.setIndexDescCache=ip,C.setLocalStorage=Ln,C.setPermissionCache=ap,C.setSessionStorage=be,C.setToken=Id,C.setUserInfoCache=lp,C.stopPropagation=ls,C.str2Date=Xd,C.toChies=Q0,C.toFixed=j0,C.toThousands=V0,C.updatePasswordApi=Bv,C.useConfig=kf,C.uuid=hv,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indfnd/utils",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "author": "huxuetong",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -84,9 +84,9 @@ export function round(number: number, precision = 2): number {
84
84
  if (result.length > 2) {
85
85
  const num = result[1]
86
86
  const e = result[2]
87
- return Math.round(parseInt(+num + 'e' + (+e + precision))) / Math.pow(10, precision)
87
+ return Math.round(parseFloat(+num + 'e' + (+e + precision))) / Math.pow(10, precision)
88
88
  }
89
- return Math.round(parseInt(+number + 'e' + precision)) / Math.pow(10, precision)
89
+ return Math.round(parseFloat(+number + 'e' + precision)) / Math.pow(10, precision)
90
90
  }
91
91
  return number
92
92
  }