@mescius/spread-sheets-io
Version:
SpreadJS IO plugin
12 lines • 636 kB
JavaScript
/*!
*
* SpreadJS Library 19.1.4
*
* Copyright(c) MESCIUS inc. All rights reserved.
*
* Licensed under the SpreadJS Commercial License.
* us.sales@mescius.com
* https://developer.mescius.com/spreadjs
*
*/
!function(t){"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("@mescius/spread-sheets")):"function"==typeof define&&define.amd?define(["@mescius/spread-sheets"],t):"object"==typeof exports?exports.Spread=t(require("@mescius/spread-sheets")):t(GC)}((function(t){!function(){var e,n={121:function(t,e,n){"use strict";var r,i,o,a,s,c,f;Object.defineProperty(e,"__esModule",{value:!0}),e.p2e=e.v2e=e.m2e=void 0,r=n(376),i=n(132),o=n(155),a=n(344),function(t){t[t.UnsupportedAlgorithm=0]="UnsupportedAlgorithm",t[t.WrongPassword=1]="WrongPassword",t[t.EmptyPassword=2]="EmptyPassword",t[t.UnsupportedFile=3]="UnsupportedFile",t[t.DamagedFiles=4]="DamagedFiles"}(s=e.m2e||(e.m2e={})),c=function(t,e){var n,c,f,u,l,d,h;try{n=(0,i.f2e)(t)}catch(t){return{success:!1,data:s.UnsupportedFile}}if(!n)return{success:!1,data:s.UnsupportedFile};if(!n.EncryptionInfo||!n.EncryptedPackage)return{success:!1,data:s.UnsupportedFile};if(!e)return{success:!1,data:s.EmptyPassword};if(c=n.EncryptionInfo,f=r.Qoe.Xle(c,2,0),u=r.Qoe.Xle(c,2,2),d=n.EncryptedPackage,2!==u||3!==f&&4!==f){if(4===u&&4===f){if(!(h=(0,o.h2e)(c))||!d)return{success:!1,data:s.DamagedFiles};l=(0,o.l2e)(h,d,e)}}else{if(!(h=(0,a.readStandardEncryptionInfoStream)(c))||!d)return{success:!1,data:s.DamagedFiles};l=(0,a.standardDecrypt)(h,d,e)}return l},e.v2e=c,f=function(t,e){var n;if(e)return function(t){var n=(0,o.u2e)(t,e);if(n)return(0,i.c2e)(n.encryptionInfoStream,n.encryptionPackage)}(t)},e.p2e=f},132:function(t,e,n){"use strict";var r,i,o,a,s,c,f,u,l,d,h,p,m,v,b,y,w,g,x,k,I,F,C,A,S,E,_,D,T,j,O,B,z,M,N,U,L,P,R=this&&this.yJr||function(t,e,n){if(n||2===arguments.length)for(var r=0,i=e.length,o;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};function G(t){var e,n,r,i;if(j(t)&&(e=h(t)))return n=w(e,t),r=g(e,n,t),i=k(e,r,t),T(e,t,r,i)}Object.defineProperty(e,"__esModule",{value:!0}),e.c2e=e.f2e=void 0,r=n(376),i=r.Qoe.qoe,o=8,a=4294967290,s=4294967293,c=4294967294,f=4294967295,u=[208,207,17,224,161,177,26,225],l=function(){function t(){this.headerSignature=[208,207,17,224,161,177,26,225],this.headerCLSID=0,this.minorVersion=62,this.majorVersion=3,this.byteOrder=65534,this.sectorShift=9,this.miniSectorShift=6,this.reserved=0,this.numberOfDirectorySectors=0,this.numberOfFATSectors=-1,this.firstDirectorySectorLocation=-1,this.transactionSignatureNumber=0,this.miniStreamCutoffSize=4096,this.firstMiniFATSectorLocation=-1,this.numberOfMiniFATSectors=-1,this.firstDIFATSectorLocation=c,this.numberOfDIFATSectors=0}return t}(),d={headerSignature:8,headerCLSID:16,minorVersion:2,majorVersion:2,byteOrder:2,sectorShift:2,miniSectorShift:2,reserved:6,numberOfDirectorySectors:4,numberOfFATSectors:4,firstDirectorySectorLocation:4,transactionSignatureNumber:4,miniStreamCutoffSize:4,firstMiniFATSectorLocation:4,numberOfMiniFATSectors:4,firstDIFATSectorLocation:4,numberOfDIFATSectors:4,DIFAT:436},h=function(t){var e,n,r,i,a=new Uint16Array(t),s={},c=0;for(e in d)d.hasOwnProperty(e)&&(n=d[e]/2,r=a.slice(c,c+n),n>2?s[e]=r:(i=function(t,e,n){return t+e*(1<<2*o*n)},s[e]=r.reduce(i,0)),c+=n);return s},p=function(t){return Math.pow(2,t.sectorShift)},m=function(t){return Math.pow(2,t.miniSectorShift)},v=512,b=function(t,e){return v+p(t)*e},y=function(t,e,n){var r=m(t),i=p(t)/r,o=Math.floor(e/i),a=b(t,n[o]);return a+e%i*r},w=function(t,e){var n,r,i,a,s,c,f,u=new Uint32Array(e),l=109,d=32/o,h=R([],Array.from(new Uint32Array(t.DIFAT.buffer)),!0);if(t.numberOfFATSectors>l)for(n=t.numberOfFATSectors-l,r=p(t)/d-1,i=t.firstDIFATSectorLocation,a=0;a<n;){for(s=b(t,i)/d,c=0,f=Math.min(r,n-a);c<f;c++)h.push(u[s+c]),a++;i=u[s+c]}return h.slice(0,t.numberOfFATSectors)},g=function(t,e,n){var r,i,a,s=new Uint32Array(n),c=32/o,f=[];for(r=0;r<e.length;r++)for(i=b(t,e[r])/c,a=0;a<p(t)/c;a++)f.push(s[i+a]);return f},x=function(t,e){for(var n=[],r=e;r<=a&&r!==f&&r!==c;)n.push(r),r=t[r];return n},k=function(t,e,n){var r,i,a,s=new Uint32Array(n),c=32/o,f=[],u=x(e,t.firstMiniFATSectorLocation);for(r=0;r<u.length;r++)for(i=b(t,u[r])/c,a=0;a<p(t)/c;a++)f.push(s[i+a]);return f},I=0,F=1,C=2,A=5,S=function(){function t(){this.directoryEntryName=-1,this.directoryEntryNameLength=-1,this.objectType=0,this.colorFlag=0,this.leftSiblingID=f,this.rightSiblingID=f,this.childID=f,this.CLSID=0,this.stateBits=0,this.creationTime=0,this.modifiedTime=0,this.startingSectorLocation=0,this.streamSize=0}return t}(),E={directoryEntryName:64,directoryEntryNameLength:2,objectType:1,colorFlag:1,leftSiblingID:4,rightSiblingID:4,childID:4,CLSID:16,stateBits:4,creationTime:8,modifiedTime:8,startingSectorLocation:4,streamSize:8},_=function(t,e,n,r,i,o){var a,s,c,f,u,l=new Uint8Array(n.streamSize),d=new Uint8Array(e),h=m(t);if(n.streamSize<t.miniStreamCutoffSize)for(a=x(i,n.startingSectorLocation),s=0,c=0;c<a.length;c++)f=y(t,a[c],x(r,o[0].startingSectorLocation)),s+h>n.streamSize?l.set(d.slice(f,f+n.streamSize-s),s):(l.set(d.slice(f,f+h),s),s+=h);else for(u=x(r,n.startingSectorLocation),s=0,c=0;c<u.length;c++)f=b(t,u[c]),s+p(t)>n.streamSize?l.set(d.slice(f,f+n.streamSize-s),s):(l.set(d.slice(f,f+p(t)),s),s+=p(t));return l},D=function(t,e,n){var r=new S,i=new Uint16Array(e),a=n/2,s=function(t,e,n){return t+e*(1<<2*o*n)};return Object.keys(E).forEach((function(t){var e=Math.ceil(E[t]/2),n=i.slice(a,a+e);if(e>2)r[t]=n;else if("objectType"===t)r[t]=255&n[0],r.colorFlag=(65280&n[0])>>8;else{if("colorFlag"===t)return;r[t]=n.reduce(s,0)}a+=e})),r.directoryEntryName=Array.from(r.directoryEntryName).map((function(t){return String.fromCharCode(t)})).join(""),r.streamSize=r.streamSize.reduce(s,0),r},T=function(t,e,n,r){var i,o,a,s,c,f,u=[],l=x(n,t.firstDirectorySectorLocation);for(i=0;i<l.length;i++)for(o=b(t,l[i]),a=0;a<p(t)/128;a++)u.push(D(t,e,o+128*a));for(i=0;i<u.length;i++)(s=u[i]).objectType===C&&(s.mne=_(t,e,s,n,r,u));for(c={},i=0;i<u.length;i++)(s=u[i]).mne&&(c[f=s.directoryEntryName.substring(0,s.directoryEntryNameLength/2-1)]=s.mne);return c},j=function(t){var e,n=new Uint8Array(t);for(e=0;e<8;e++)if(n[e]!==u[e])return!1;return!0},e.f2e=G,O={rootEntry:{directoryEntryName:"Root Entry",objectType:5,childID:10,colorFlag:1},encryptedPackage:{directoryEntryName:"EncryptedPackage",objectType:2,colorFlag:1,rightSiblingID:2},dataSpaces:{directoryEntryName:"\x06DataSpaces",objectType:1,childID:4,colorFlag:1},version:{directoryEntryName:"Version",objectType:2,colorFlag:1,streamSize:76,mne:[60,0,0,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,46,0,67,0,111,0,110,0,116,0,97,0,105,0,110,0,101,0,114,0,46,0,68,0,97,0,116,0,97,0,83,0,112,0,97,0,99,0,101,0,115,0,1,0,0,0,1,0,0,0,1,0,0,0]},dataSpaceMap:{directoryEntryName:"DataSpaceMap",objectType:2,colorFlag:1,leftSiblingID:3,rightSiblingID:5,streamSize:112,mne:[8,0,0,0,1,0,0,0,104,0,0,0,1,0,0,0,0,0,0,0,32,0,0,0,69,0,110,0,99,0,114,0,121,0,112,0,116,0,101,0,100,0,80,0,97,0,99,0,107,0,97,0,103,0,101,0,50,0,0,0,83,0,116,0,114,0,111,0,110,0,103,0,69,0,110,0,99,0,114,0,121,0,112,0,116,0,105,0,111,0,110,0,68,0,97,0,116,0,97,0,83,0,112,0,97,0,99,0,101,0,0,0]},dataSpaceInfo:{directoryEntryName:"DataSpaceInfo",objectType:1,colorFlag:1,rightSiblingID:7,childID:6},strongEncryptionDataSpace:{directoryEntryName:"StrongEncryptionDataSpace",objectType:2,colorFlag:1,streamSize:64,mne:[8,0,0,0,1,0,0,0,50,0,0,0,83,0,116,0,114,0,111,0,110,0,103,0,69,0,110,0,99,0,114,0,121,0,112,0,116,0,105,0,111,0,110,0,84,0,114,0,97,0,110,0,115,0,102,0,111,0,114,0,109,0,0,0]},transformInfo:{directoryEntryName:"TransformInfo",objectType:1,childID:8,colorFlag:1},strongEncryptionTransform:{directoryEntryName:"StrongEncryptionTransform",objectType:1,colorFlag:1,childID:9},primary:{directoryEntryName:"\x06Primary",objectType:2,colorFlag:1,streamSize:200,mne:[88,0,0,0,1,0,0,0,76,0,0,0,123,0,70,0,70,0,57,0,65,0,51,0,70,0,48,0,51,0,45,0,53,0,54,0,69,0,70,0,45,0,52,0,54,0,49,0,51,0,45,0,66,0,68,0,68,0,53,0,45,0,53,0,65,0,52,0,49,0,67,0,49,0,68,0,48,0,55,0,50,0,52,0,54,0,125,0,78,0,0,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,46,0,67,0,111,0,110,0,116,0,97,0,105,0,110,0,101,0,114,0,46,0,69,0,110,0,99,0,114,0,121,0,112,0,116,0,105,0,111,0,110,0,84,0,114,0,97,0,110,0,115,0,102,0,111,0,114,0,109,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0]},encryptionInfo:{directoryEntryName:"EncryptionInfo",objectType:2,colorFlag:1,leftSiblingID:2,rightSiblingID:1}},B=function(){var t={};return Object.keys(O).forEach((function(e){t[e]=Object.assign(new S,O[e]),t[e].directoryEntryNameLength=2*(t[e].directoryEntryName.length+1)})),t},z=function(t,e,n){var r,i=t.length;for(r=0;r<e;r++)r!==e-1?t.push(n?s:t.length+1):t.push(n?s:c);return i},M=function(t){var e,n,r,i,o,a,s,c,f=new l,u=[],d=[],h=[],v=p(f);for(Object.keys(t).forEach((function(e){var n=t[e].streamSize;n<=0||(n<f.miniStreamCutoffSize?t[e].startingSectorLocation=z(h,Math.ceil(n/m(f))):t[e].startingSectorLocation=z(d,Math.ceil(n/v)))})),e=Math.ceil(Object.keys(t).length/4),f.firstDirectorySectorLocation=z(d,e),n=Math.ceil(4*h.length/v),f.firstMiniFATSectorLocation=z(d,n),f.numberOfMiniFATSectors=n,r=Math.ceil(64*h.length/v),t.rootEntry.startingSectorLocation=z(d,r),t.rootEntry.streamSize=64*h.length,i=d.length,o=Math.ceil(4*d.length/v),a=z(d,o,!0),s=0;s<o;s++)u.push(a+s);return f.numberOfFATSectors=o,o>109&&(c=Math.ceil(4*(o-109)/(v-4)),f.numberOfDIFATSectors=c,f.firstDIFATSectorLocation=z(d,c)),{headerInfo:f,DIFATList:u,FATList:d,miniFATList:h,needWriteFATListLength:i}},N=function(t,e){var n,r=[];for(n=0;n<Math.min(e,4);n++)r.push(t>>8*n&255);for(;r.length<e;)r.push(0);return r},U=function(t){var e=new Uint8Array(128),n=0;return Object.keys(E).forEach((function(r){var o,a=E[r];"number"==typeof t[r]?e.set(N(t[r],a),n):"string"==typeof t[r]&&(o=i(t[r]),e.set(o,n)),n+=a})),e},L=function(t){var e=[];return Object.keys(d).forEach((function(n){if("number"==typeof t[n]){var r=d[n];e.push.apply(e,N(t[n],r))}else t[n]instanceof Array&&e.push.apply(e,t[n])})),e},P=function(t,e){var n,r,i,o,a,s,u,l,h,m,v,w,g,k,I,F,C,A,S=B();for(S.encryptionInfo.streamSize=t.length,S.encryptionInfo.mne=t,S.encryptedPackage.streamSize=e.length,S.encryptedPackage.mne=e,n=M(S),r=n.headerInfo,i=n.DIFATList,o=n.FATList,a=n.miniFATList,s=n.needWriteFATListLength,u=p(r),l=512+o.length*u,h=new ArrayBuffer(l),m=new Uint8Array(h),v=new Uint32Array(h),Object.keys(S).forEach((function(t){var e,n,i=S[t];2===i.objectType&&(e=i.startingSectorLocation,n=b(r,e),i.streamSize<r.miniStreamCutoffSize&&(n=y(r,e,x(o,S.rootEntry.startingSectorLocation))),m.set(i.mne,n))})),w=r.firstDirectorySectorLocation,Object.keys(S).forEach((function(t,e){var n=S[t],i=b(r,w+Math.floor(e/4))+e%4*128;m.set(U(n),i)})),v.set(a,b(r,r.firstMiniFATSectorLocation)/4),v.set(o.slice(0,s),b(r,i[0])/4),m.set(L(r)),g=512-d.DIFAT;i.length<109;)i.push(f);if(v.set(i.slice(0,109),g/4),i.length>109)for(I=4*(k=i.slice(109)).length/(u-4),F=0;F<I;F++)A=(C=127*F)+127,v.set(k.slice(C,A),b(r,r.firstDIFATSectorLocation+F)/4),F!==I-1?v.set([r.firstDIFATSectorLocation+F+1],b(r,r.firstDIFATSectorLocation+F)/4+127):v.set([c],b(r,r.firstDIFATSectorLocation+F)/4+127);return m},e.c2e=P},135:function(t,e,n){"use strict";var r,i,o,a,s,c;function f(t){t&&(t.c_||[]).forEach((function(t){var e=t.n_;"extLst"===e?u(t):e===o&&w(t)}))}function u(t){(t.c_||[]).forEach((function(t){var e;"ext"===t.n_&&l(t)}))}function l(t){(t.c_||[]).forEach((function(t){var e=t.n_;"sparklineGroups"===e?d(t):"dataValidations"===e?v(t):"slicerList"===e?(0,i.addNameSpace)(t,i.NameSpaces.X14):"timelineRefs"===e&&(0,i.addNameSpace)(t,i.NameSpaces.X15)}))}function d(t){(0,i.addNameSpace)(t,i.NameSpaces.X14),(t.c_||[]).forEach((function(t){var e;"sparklineGroup"===t.n_&&h(t)}))}function h(t){(t.c_||[]).forEach((function(t){var e;switch(t.n_){case"sparklines":p(t);break;case"f":(0,i.addNameSpace)(t,i.NameSpaces.XM)}}))}function p(t){(t.c_||[]).forEach((function(t){var e;"sparkline"===t.n_&&m(t)}))}function m(t){(t.c_||[]).forEach((function(t){var e;switch(t.n_){case"f":case"sqref":(0,i.addNameSpace)(t,i.NameSpaces.XM)}}))}function v(t){(0,i.addNameSpace)(t,i.NameSpaces.X14),(t.c_||[]).forEach((function(t){var e;"dataValidation"===t.n_&&b(t)}))}function b(t){(t.c_||[]).forEach((function(t){var e=t.n_;"formula1"===e||"formula2"===e?y(t):"sqref"===e&&(0,i.addNameSpace)(t,i.NameSpaces.XM)}))}function y(t){(t.c_||[]).forEach((function(t){var e;"f"===t.n_&&(0,i.addNameSpace)(t,i.NameSpaces.XM)}))}function w(t){(0,i.addNameSpace)(t,i.NameSpaces.MC),(t.c_||[]).forEach((function(t){var e;t.n_===a&&g(t)}))}function g(t){(t.c_||[]).forEach((function(t){var e=t.n_;e===s?x(t):e===c&&k(t)}))}function x(t){(0,i.addNameSpace)(t,i.NameSpaces.EMPTY),(t.c_||[]).forEach((function(t){var e=t.n_;e===o?w(t):e===c&&g(t)}))}function k(t){(0,i.addNameSpace)(t,i.NameSpaces.EMPTY),(t.c_||[]).forEach((function(t){var e;"controlPr"===t.n_&&I(t)}))}function I(t){(t.c_||[]).forEach((function(t){var e;"anchor"===t.n_&&F(t)}))}function F(t){(t.c_||[]).forEach((function(t){var e=t.n_;"from"!==e&&"to"!==e||C(t)}))}function C(t){(t.c_||[]).forEach((function(t){var e=t.n_;"col"!==e&&"colOff"!==e&&"row"!==e&&"rowOff"!==e||(0,i.addNameSpace)(t,i.NameSpaces.XDR)}))}Object.defineProperty(e,"__esModule",{value:!0}),e.addNameSpaceForSheetFile=void 0,r=n(376),i=n(787),o=r.XFileConstants.Bo,a=r.XFileConstants.Lo,s=r.XFileConstants.Fo,c=r.XFileConstants.Po,e.addNameSpaceForSheetFile=f},137:function(t,e,n){"use strict";var r,i,o,a,s,c,f,u,l,d,h,p,m,v,b,y,w,g,x,k,I,F,C,A,S,E,_,D,T,j,O,B,z,M,N,U,L,P,R,G,q,W,V,H,X,Z,K=this&&this.mJr||function(){return K=Object.assign||function(t){var e,n,r,i;for(n=1,r=arguments.length;n<r;n++)for(i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},K.apply(this,arguments)},J=this&&this.yJr||function(t,e,n){if(n||2===arguments.length)for(var r=0,i=e.length,o;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};function Y(t){var e=!!t.rowInputCell,n=!!t.columnInputCell,r=e&&n,i={t:"dataTable",ref:t.range,dt2D:r?"1":"0",dtr:e?"1":"0",ca:"1"};return r?(i.r1=t.rowInputCell,i.r2=t.columnInputCell):e?i.r1=t.rowInputCell:n&&(i.r1=t.columnInputCell),i}function $(t,e,n,r,i){return t.row>=e&&t.row<=r&&t.col>=n&&t.col<=i}function Q(t,e,n,r,i){return t.row===e&&t.col===n&&t.rowCount===r&&t.colCount===i}function tt(t,e){var n,r,i="'",o=i.length;if(t.substring(e,e+o)!==i)return null;for(n="",r=e+o;r<t.length;)if(t.substring(r,r+o)===i){if(t.substring(r+o,r+2*o)!==i)return"!"===t[r+o]?{endIndex:r,sheetName:n}:null;n+=i,r+=2*o}else n+=t[r],r++;return null}function et(t,e){var n,r,i,o,a="'",s=a.length,c=[],f="";for(r=0;r<t.length;r++)if(i=t[r],t.substring(r,r+s)===a){if(f.length>0)return null;if(!(o=tt(t,r)))return null;f=o.sheetName,r=o.endIndex+s-1}else if("!"===i){if(n||e!==f)return null;f="",n=!0}else","===i?(c.push(f.trim()),f="",n=!1):f+=i;return f&&c.push(f.trim()),c}function nt(t,e,n){var r,o,a,s,c,f,u,l,d,h,p,m,v,b,y,w,g,x,k,I,F=t.match(/^SJS\.TABLE\((.*)\)$/);if(!F)return null;if(!(r=et(F[1],n)))return null;if(!(o=i.range_parser.Dc(e)[0]))return null;if(a=o.row-1,s=o.col-1,c=o.row+o.rowCount-1,f=o.col+o.colCount-1,5===r.length)return u=i.range_parser.Dc(r[0])[0],l=i.range_parser.Dc(r[1])[0],d=i.range_parser.Dc(r[3])[0],h=void 0,p=void 0,m=void 0,v=void 0,b=void 0,y=void 0,l&&1===l.rowCount&&l.colCount>1?(h=l,p=d,m=i.range_parser.Dc(r[2])[0],v=i.range_parser.Dc(r[4])[0],b=r[2],y=r[4]):(h=d,p=l,m=i.range_parser.Dc(r[4])[0],v=i.range_parser.Dc(r[2])[0],b=r[4],y=r[2]),u&&h&&p&&m&&v&&Q(u,a,s,1,1)&&Q(h,a,o.col,1,o.colCount)&&Q(p,o.row,s,o.rowCount,1)?$(m,a,s,c,f)||$(v,a,s,c,f)?null:{range:e,rowInputCell:b,columnInputCell:y}:null;if(3===r.length){if(w=i.range_parser.Dc(r[0])[0],g=i.range_parser.Dc(r[1])[0],x=i.range_parser.Dc(r[2])[0],!w||!g||!x)return null;if(k=x.row===a&&x.col===s,(I=$(x,a,s,c,f))&&!k)return null;if(Q(w,o.row,s,o.rowCount,1)&&Q(g,a,o.col,1,o.colCount))return{range:e,rowInputCell:r[2],columnInputCell:null};if(Q(w,a,o.col,1,o.colCount)&&Q(g,o.row,s,o.rowCount,1))return{range:e,rowInputCell:null,columnInputCell:r[2]}}return null}function rt(t){return"function"!=typeof t}function it(t,e,n){return t+"/"+T+"/"+e+"."+(n=n||z)+"."+B}function ot(t){var e=new a.XmlWriter;return e.writeDocument(),e.writeElement("cp:coreProperties",(function(){e.writeAttributeString("xmlns:cp",i.XFileConstants.ks),e.writeAttributeString("xmlns:dc",i.XFileConstants.Ds),e.writeAttributeString("xmlns:dcterms",i.XFileConstants._s),e.writeAttributeString("xmlns:dcmitype",i.XFileConstants.Es),e.writeAttributeString("xmlns:xsi",i.XFileConstants.js)}),(function(){var n,r=t.docProps.docPropsCore,i=function(t){if(r.hasOwnProperty(t))switch(t){case"title":e.writeElement("dc:title",(function(){}),(function(){e.writeValue(r[t])}));break;case"subject":e.writeElement("dc:subject",(function(){}),(function(){e.writeValue(r[t])}));break;case"creator":e.writeElement("dc:creator",(function(){}),(function(){e.writeValue(r[t])}));break;case"keywords":e.writeElement("cp:keywords",(function(){}),(function(){e.writeValue(r[t])}));break;case"description":e.writeElement("dc:description",(function(){}),(function(){e.writeValue(r[t])}));break;case"lastModifiedBy":e.writeElement("cp:lastModifiedBy",(function(){}),(function(){e.writeValue(r[t])}));break;case"created":e.writeElement("dcterms:created",(function(){e.writeAttributeString("xsi:type","dcterms:W3CDTF")}),(function(){e.writeValue(r[t])}));break;case"modified":e.writeElement("dcterms:modified",(function(){e.writeAttributeString("xsi:type","dcterms:W3CDTF")}),(function(){e.writeValue(r[t])}));break;case"lastPrinted":e.writeElement("cp:lastPrinted",(function(){}),(function(){e.writeValue(r[t])}));break;case"category":e.writeElement("cp:category",(function(){}),(function(){e.writeValue(r[t])}));break;case"contentStatus":e.writeElement("cp:contentStatus",(function(){}),(function(){e.writeValue(r[t])}));break;case"language":e.writeElement("dc:language",(function(){}),(function(){e.writeValue(r[t])}));break;case"version":e.writeElement("cp:version",(function(){}),(function(){e.writeValue(r[t])}));break;case"revision":e.writeElement("cp:revision",(function(){}),(function(){e.writeValue(r[t])}))}};for(n in r)i(n)})),e.jle()}function at(t,e){t.writeElement("HeadingPairs",(function(){}),(function(){t.writeElement("vt:vector",(function(){t.writeAttributeString("size",e.HeadingPairs.size),t.writeAttributeString("baseType",e.HeadingPairs.baseType)}),(function(){var n,r=e.HeadingPairs.workbookInfoArray,i=function(e){t.writeElement("vt:variant",(function(){}),(function(){t.writeElement(r[e].elementType,(function(){}),(function(){t.writeValue(r[e].value)}))}))};for(n=0;n<r.length;n++)i(n)}))}))}function st(t,e){t.writeElement("TitlesOfParts",(function(){}),(function(){t.writeElement("vt:vector",(function(){t.writeAttributeString("size",e.TitlesOfParts.size),t.writeAttributeString("baseType",e.TitlesOfParts.baseType)}),(function(){var n,r=e.TitlesOfParts.sheetsNameArray,i=function(e){t.writeElement("vt:lpstr",(function(){}),(function(){t.writeValue(r[e])}))};for(n=0;n<r.length;n++)i(n)}))}))}function ct(t,e,n){var r=t.slice(0,1).toUpperCase()+t.slice(1);e.writeElement(r,(function(){}),(function(){e.writeValue(n[t])}))}function ft(t){var e=new a.XmlWriter;return e.writeDocument(),e.writeElement("Properties",(function(){e.writeAttributeString("xmlns",i.XFileConstants.Ls),e.writeAttributeString("xmlns:vt",i.XFileConstants.Fs)}),(function(){var n,r=t.docProps.docPropsApp;for(n in r)if(r.hasOwnProperty(n)&&rt(r[n]))switch(n){case"HeadingPairs":at(e,r);break;case"TitlesOfParts":st(e,r);break;default:ct(n,e,r)}})),e.jle()}function ut(t){var e=new a.XmlWriter;return e.writeDocument(),e.writeElement("Properties",(function(){e.writeAttributeString("xmlns",i.XFileConstants.Gs),e.writeAttributeString("xmlns:vt",i.XFileConstants.Us)}),(function(){var n,r=t.docProps.docPropsCustom,i=function(t){var n=r[t];e.writeElement("property",(function(){for(var t in n)"propertyItemChildElement"!==t&&rt(n[t])&&e.writeAttributeString(t,n[t])}),(function(){var t,r=n.propertyItemChildElement,i=function(t){r.hasOwnProperty(t)&&rt(r[t])&&e.writeElement(t,(function(){}),(function(){e.writeValue(r[t])}))};for(t in r)i(t)}))};for(n=0;n<r.length;n++)i(n)})),e.jle()}function lt(t,e){var n,r,i,o=function(e){t.writeLeafElement("a:font",(function(){t.writeAttributeString("script",e.script),t.writeAttributeString("typeface",e.typeface)}))};for(n=0,r=e;n<r.length;n++)o(i=r[n])}function dt(t){t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Jpan"),t.writeAttributeString("typeface","\uff2d\uff33 \uff30\u30b4\u30b7\u30c3\u30af")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Hang"),t.writeAttributeString("typeface","\ub9d1\uc740 \uace0\ub515")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Hans"),t.writeAttributeString("typeface","\u5b8b\u4f53")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Hant"),t.writeAttributeString("typeface","\u65b0\u7d30\u660e\u9ad4")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Arab"),t.writeAttributeString("typeface","Times New Roman")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Hebr"),t.writeAttributeString("typeface","Times New Roman")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Thai"),t.writeAttributeString("typeface","Tahoma")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Ethi"),t.writeAttributeString("typeface","Nyala")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Beng"),t.writeAttributeString("typeface","Vrinda")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Gujr"),t.writeAttributeString("typeface","Shruti")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Khmr"),t.writeAttributeString("typeface","MoolBoran")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Knda"),t.writeAttributeString("typeface","Tunga")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Guru"),t.writeAttributeString("typeface","Raavi")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Cans"),t.writeAttributeString("typeface","Euphemia")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Cher"),t.writeAttributeString("typeface","Plantagenet Cherokee")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Yiii"),t.writeAttributeString("typeface","Microsoft Yi Baiti")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Tibt"),t.writeAttributeString("typeface","Microsoft Himalaya")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Thaa"),t.writeAttributeString("typeface","MV Boli")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Deva"),t.writeAttributeString("typeface","Mangal")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Telu"),t.writeAttributeString("typeface","Gautami")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Taml"),t.writeAttributeString("typeface","Latha")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Syrc"),t.writeAttributeString("typeface","Estrangelo Edessa")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Orya"),t.writeAttributeString("typeface","Kalinga")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Mlym"),t.writeAttributeString("typeface","Kartika")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Laoo"),t.writeAttributeString("typeface","DokChampa")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Sinh"),t.writeAttributeString("typeface","Iskoola Pota")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Mong"),t.writeAttributeString("typeface","Mongolian Baiti")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Viet"),t.writeAttributeString("typeface","Times New Roman")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Uigh"),t.writeAttributeString("typeface","Microsoft Uighur")}))}function ht(t){t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Jpan"),t.writeAttributeString("typeface","\uff2d\uff33 \uff30\u30b4\u30b7\u30c3\u30af")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Hang"),t.writeAttributeString("typeface","\ub9d1\uc740 \uace0\ub515")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Hans"),t.writeAttributeString("typeface","\u5b8b\u4f53")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Hant"),t.writeAttributeString("typeface","\u65b0\u7d30\u660e\u9ad4")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Arab"),t.writeAttributeString("typeface","Arial")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Hebr"),t.writeAttributeString("typeface","Arial")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Thai"),t.writeAttributeString("typeface","Tahoma")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Ethi"),t.writeAttributeString("typeface","Nyala")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Beng"),t.writeAttributeString("typeface","Vrinda")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Gujr"),t.writeAttributeString("typeface","Shruti")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Khmr"),t.writeAttributeString("typeface","DaunPenh")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Knda"),t.writeAttributeString("typeface","Tunga")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Guru"),t.writeAttributeString("typeface","Raavi")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Cans"),t.writeAttributeString("typeface","Euphemia")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Cher"),t.writeAttributeString("typeface","Plantagenet Cherokee")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Yiii"),t.writeAttributeString("typeface","Microsoft Yi Baiti")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Tibt"),t.writeAttributeString("typeface","Microsoft Himalaya")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Thaa"),t.writeAttributeString("typeface","MV Boli")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Deva"),t.writeAttributeString("typeface","Mangal")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Telu"),t.writeAttributeString("typeface","Gautami")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Taml"),t.writeAttributeString("typeface","Latha")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Syrc"),t.writeAttributeString("typeface","Estrangelo Edessa")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Orya"),t.writeAttributeString("typeface","Kalinga")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Mlym"),t.writeAttributeString("typeface","Kartika")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Laoo"),t.writeAttributeString("typeface","DokChampa")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Sinh"),t.writeAttributeString("typeface","Iskoola Pota")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Mong"),t.writeAttributeString("typeface","Mongolian Baiti")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Viet"),t.writeAttributeString("typeface","Arial")})),t.writeLeafElement("a:font",(function(){t.writeAttributeString("script","Uigh"),t.writeAttributeString("typeface","Microsoft Uighur")}))}function pt(t){var e,n,o=t.theme;return o||(o="Office"),e="string"==typeof o?o:o.name,i.StringEx.Xi(e)&&(o="Office"),e&&"OFFICE"===e.toUpperCase()&&(e="Office Theme"),(n=new a._le).writeDocument(),n.writeElement("a:theme",(function(){n.writeAttributeString("xmlns:a",i.XFileConstants.ls),o&&o.name?n.writeAttributeString("name",e):"Office"===o?n.writeAttributeString("name","Office Theme"):n.writeAttributeString("name",o)}),(function(){n.writeElement("a:themeElements",x,(function(){var t,e,i,a,c,f,u,l,h,p,m,v,b;o&&o.c_?(t=k(o,"themeElements&clrScheme"))?n.Dle(t,d.NameSpaces.A):n.xml.addString(s.ThemeClrSchemes.Office):s.ThemeClrSchemes[o]?n.xml.addString(s.ThemeClrSchemes[o]):n.xml.addString(s.ThemeClrSchemes.Office),o&&o.c_?(e=k(o,"themeElements&fontScheme"),i="Calibri Light",a="Calibri",c="",f="",e&&((p=k(e,"majorFont&latin"))&&(i=p.typeface),(m=k(e,"minorFont&latin"))&&(a=m.typeface),(v=k(e,"majorFont&ea"))&&(c=v.typeface),(b=k(e,"minorFont&ea"))&&(f=b.typeface),h=c||f,u=F(k(e,"majorFont"),"font"),l=F(k(e,"minorFont"),"font")),n.writeElement("a:fontScheme",(function(){n.writeAttributeString("name",e.name||"Office")}),(function(){n.writeElement("a:majorFont",x,(function(){n.writeLeafElement("a:"+r.FontLanguage[0],(function(){n.writeAttributeString("typeface",i)})),n.writeLeafElement("a:"+r.FontLanguage[2],(function(){n.writeAttributeString("typeface",c)})),n.writeLeafElement("a:"+r.FontLanguage[1],(function(){n.writeAttributeString("typeface","")})),h||(u&&u.length>0?lt(n,u):dt(n))})),n.writeElement("a:minorFont",x,(function(){n.writeLeafElement("a:"+r.FontLanguage[0],(function(){n.writeAttributeString("typeface",a)})),n.writeLeafElement("a:"+r.FontLanguage[2],(function(){n.writeAttributeString("typeface",f)})),n.writeLeafElement("a:"+r.FontLanguage[1],(function(){n.writeAttributeString("typeface","")})),h||(l&&l.length>0?lt(n,l):ht(n))}))}))):s.ThemeFontSchemes[o]?n.xml.addString(s.ThemeFontSchemes[o]):n.xml.addString(s.ThemeFontSchemes.Office),s.ThemeFmtSchemes[o]?n.xml.addString(s.ThemeFmtSchemes[o]):n.xml.addString(s.ThemeFmtSchemes.Office)})),n.writeLeafElement("a:objectDefaults"),n.writeLeafElement("a:extraClrSchemeLst")})),n.jle()}function mt(){return o.Common.UUIDGenerator.secureUpperCaseUUID()}function vt(t){return"object"==typeof t}function bt(t,e,n,r){var i="";return t!==x&&(i+=' s="'+t+'"'),n!==x&&(i+=' cm="'+n+'"'),e!==x&&(i+=' vm="'+e+'"'),r!==x&&(i+=' t="'+r+'"'),i}function yt(t,e,n,r,o,a,s,c,f){var u,l,d,h;if((t===x||null===t||vt(t))&&i.StringEx.Ji(e)&&y(c)&&!f)return bt(n,r,o,a)+"/>";if(u=bt(n,r,o,a)+">",f){for(h in d=[],l=Y(f))l.hasOwnProperty(h)&&d.push(h+'="'+l[h]+'"');u+="<f "+d.join(" ")+"/>"}else y(c)?i.StringEx.Ji(e)||(u+=s?'<f t="array" ref="'+s+'">'+e+"</f>":"<f>"+e+"</f>"):u+=e?'<f t="shared" si="'+c+'" ref="'+s+'">'+e+"</f>":'<f t="shared" si="'+c+'"/>';return t===x||null===t||vt(t)||(u+=""===t?"<v></v>":"<v>"+t+"</v>"),u+"</c>"}function wt(t,e,n){n!==x&&t.writeLeafElement(e,(function(){if(null===n||n.isAutoColor())t.writeAttributeString("auto","1");else if(n.isIndexedColor())t.writeAttributeString("indexed",n.value().toString());else if(n.isThemeColor())t.writeAttributeString("theme",n.value().toString()),0!==n.tint()&&t.writeAttributeString("tint",n.tint().toString());else if(n.isRGBColor()){var e=n.value().toString(16);t.writeAttributeString("rgb",e.toUpperCase()),0!==n.tint()&&t.writeAttributeString("tint",n.tint().toString())}}))}function gt(t,e){e&&t.writeElement("rPr",x,(function(){if(e.isBold&&t.writeLeafElement("b"),e.charSetIndex>0&&t.writeLeafElement("charset",(function(){t.writeAttributeString("val",e.charSetIndex.toString())})),e.foreColor&&e.foreColor!==r.ExcelColor.EmptyColor&&wt(t,"color",e.foreColor),e.isCondense&&t.writeLeafElement("condense"),e.isExtend&&t.writeLeafElement("extend"),y(e.fontFamilySet)||0===e.fontFamilySet||t.writeLeafElement("family",(function(){t.writeAttributeString("val",e.fontFamilySet.toString())})),e.isItalic&&t.writeLeafElement("i"),e.isOutlineStyle&&t.writeLeafElement("outline",(function(){t.writeAttributeString("val","1")})),i.StringEx.Xi(e.fontFamily)||t.writeLeafElement("rFont",(function(){t.writeAttributeString("val",e.fontFamily)})),e.fontScheme&&0!==e.fontScheme&&t.writeLeafElement("scheme",(function(){t.writeAttributeString("val",r.FontSchemeCategory[e.fontScheme])})),e.isShadowStyle&&t.writeLeafElement("shadow",(function(){t.writeAttributeString("val","1")})),e.isStrikeOut&&t.writeLeafElement("strike"),e.fontSize&&0!==e.fontSize||-1!==e.fontSize){var n=e.fontSize;n>0&&t.writeLeafElement("sz",(function(){t.writeAttributeString("val",n.toString())}))}e.underLineStyle&&0!==e.underLineStyle&&(1===e.underLineStyle?t.writeLeafElement("u"):t.writeLeafElement("u",(function(){t.writeAttributeString("val",r.UnderLineStyle[e.underLineStyle])}))),e.vertAlign&&0!==e.vertAlign&&t.writeLeafElement("vertAlign",(function(){t.writeAttributeString("val",r.VertAlign[e.vertAlign])}))}))}function xt(t){var e=/(^\s+)|(\s+$)/,n=new a.XmlWriter;return n.writeDocument(),n.writeElement("sst",(function(){n.writeAttributeString("xmlns",i.XFileConstants.Qu),n.writeAttributeString("count",""+t.length),n.writeAttributeString("uniqueCount",""+t.length)}),(function(){var o,a,s=function(o,a){var s,c=t[o];n.writeElement("si",x,(function(){var t,o,a;if(c.richText)for(i.util.g0(c),t=c.converted,o=function(i){var o=t[i].text;o!==x&&n.writeElement("r",x,(function(){gt(n,r.ConverterHelper.fromRichTextStyle(t[i].style)),o&&o.length>32767&&(o=o.slice(0,32767)),o&&(s=e.test(o)),n.writeElement("t",(function(){s&&n.writeAttributeString("xml:space","preserve")}),(function(){n.writeValue(w(g(o,!0)))}))}))},a=0;a<t.length;a++)o(a);else c&&c.length>32767&&(c=c.slice(0,32767)),n.writeElement("t",(function(){(s=e.test(c))&&n.writeAttributeString("xml:space","preserve")}),(function(){n.writeValue(w(g(c,!0)))}))}))};for(o=0,a=t.length;o<a;o++)s(o,a)})),n.jle()}function kt(t,e){var n,r,o;return t.xmlns=i.XFileConstants.Qu,t["xmlns:r"]=i.XFileConstants.ss,n=I(t,E),r=F(n,S),e&&r&&r.forEach((function(t,n){e[n]&&(t[_]=e[n].rID)})),(o=new a._le).writeDocument(),o.Dle(t),o.jle()}function It(t){var e=new a._le;return e.writeDocument(),(0,p.addPivotCacheDefinitionNameSpace)(t),e.Dle(t),e.jle()}function Ft(t){var e=new a._le;return e.writeDocument(),e.Dle(t),e.jle()}function Ct(t){var e=new a._le;return e.writeDocument(),e.Dle(t),e.jle()}function At(t,e){if(i.StringEx.Ji(t))return"";switch(t){case i.RelationshipConstants.Xs:return i.XFileConstants.Vo;case i.RelationshipConstants.Ks:return i.XFileConstants.Yo;case i.RelationshipConstants.$s:return i.XFileConstants.Zo;case i.RelationshipConstants.Ws:return"XLSM"===e?i.XFileConstants.mKr:"XLTM"===e?i.XFileConstants.bKr:"XLTX"===e?i.XFileConstants.aMo:i.XFileConstants.Wo;case i.RelationshipConstants.fo:return i.XFileConstants.Qo;case i.RelationshipConstants.uc:return i.XFileConstants.Ko;case i.RelationshipConstants.zKr:return i.XFileConstants.RKr;case i.RelationshipConstants.lc:return i.XFileConstants.Jo;case i.RelationshipConstants.ZKr:return i.XFileConstants.LKr;case i.RelationshipConstants.hc:return i.XFileConstants.ca;case i.RelationshipConstants.Gfo:return i.XFileConstants.fa;case i.RelationshipConstants.Pfo:return i.XFileConstants.la;case i.RelationshipConstants.Fr:return i.XFileConstants.Xo;case i.RelationshipConstants.dc:return i.XFileConstants.Ma;case i.RelationshipConstants.yc:return i.XFileConstants.ma;case i.RelationshipConstants.wc:return i.XFileConstants.ga;case i.RelationshipConstants.Mc:return i.XFileConstants.qo;case i.RelationshipConstants.Cc:return i.XFileConstants.$o;case i.RelationshipConstants.Ac:return i.XFileConstants.na;case i.RelationshipConstants.Ic:return i.XFileConstants.ta;case i.RelationshipConstants.Tc:return i.XFileConstants.ia;case i.RelationshipConstants.xc:return i.XFileConstants.Ss;case i.RelationshipConstants.Vs:return i.XFileConstants.Os;case i.RelationshipConstants.Ys:return i.XFileConstants.Ps;case i.RelationshipConstants.Zs:return i.XFileConstants.Hs;case i.RelationshipConstants.ec:return i.XFileConstants.ha;case i.RelationshipConstants.ic:return i.XFileConstants.da;case i.RelationshipConstants.KAo:return i.XFileConstants.LAo;case i.RelationshipConstants.oc:return i.XFileConstants.va;case i.RelationshipConstants.Nc:return i.XFileConstants.pa;case i.RelationshipConstants.kc:return i.XFileConstants.ba;case i.RelationshipConstants.SrV:return i.XFileConstants.SrV;case i.RelationshipConstants.v3e:return i.XFileConstants.v3e;case i.RelationshipConstants.g3e:return i.XFileConstants.g3e;case i.RelationshipConstants.A3e:return i.XFileConstants.p3e;case i.RelationshipConstants.b3e:return i.XFileConstants.b3e;case i.RelationshipConstants.FAo:return i.XFileConstants.FAo;case i.RelationshipConstants.JAo:return i.XFileConstants.BAo;case i.RelationshipConstants.ITo:return i.XFileConstants.STo;default:return""}}function St(t,e,n){var r,o,a,s,c,f,u,l;if(!t||!e)return!1;if(r=!0,!i.StringEx.Ji(e.fileName)&&(o=At(e.fileType,n),!i.StringEx.Ji(o))){for((a=new V).partName=e.fileName,a.contentType=o,s=!1,c=0,f=t.length;c<f;c++)if((u=t[c])instanceof V&&u.contentType===a.contentType&&u.partName===a.partName){s=!0;break}s||t.push(a)}if(e.relationFiles&&e.relationFiles.count>0)for(l in e.relationFiles)e.relationFiles.hasOwnProperty(l)&&"count"!==l&&(r=r&&St(t,e.relationFiles[l],n));return r}function Et(t,e,n,i,o,a,s,c,f){e.forEach((function(e){e&&r.SJSStyleHelper.writeDxf(t,e,n,i,o,a,s,c,x,f)}))}function _t(t,e,n,o){var a=e.dxfsRecords,s=e.slicerCommonSharedStrings,c=e.slicerSharedColors,f=e.slicerStyleNodes,u=e.x15dxfsRecords,l=e.timelineCommonSharedStrings,d=e.timelineSharedColors,h=e.timelineStyleNodes;t.writeElement("extLst",(function(){y(a)||t.writeElement("ext",(function(){t.writeAttributeString("uri","{46F421CA-312F-682f-3DD2-61675219B42D}"),t.writeAttributeString("xmlns:x14",i.XFileConstants.ms)}),(function(){var e,n,i,o,f,u,l,d,h=a.cellXfs;h.length>0?(e=r.SJSStyleHelper.convertColors(c),n=r.SJSStyleHelper.getNumFmts(a).numberFormats,i=r.SJSStyleHelper.getFills(a,e,!0),o=a&&r.SJSStyleHelper.getFonts(a,e,s),f=r.SJSStyleHelper.getBorders(a,e),u=r.SJSStyleHelper.getAlignments(a),l=r.SJSStyleHelper.getProtections(a),d=null==a?void 0:a.sharedObjects,t.writeElement("x14:dxfs",(function(){t.writeAttributeString("count",h.length)}),(function(){Et(t,h,n,i,o,f,u,l,d)}))):t.writeLeafElement("x14:dxfs",(function(){t.writeAttributeString("count","0")}))})),y(f)||t.writeElement("ext",(function(){t.writeAttributeString("uri","{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}"),t.writeAttributeString("xmlns:x14",i.XFileConstants.ms)}),(function(){f.length>0?t.writeElement("x14:slicerStyles",(function(){t.writeAttributeString("defaultSlicerStyle",n)}),(function(){f.forEach((function(e){t.writeElement("x14:slicerStyle",(function(){t.writeAttributeString("name",e.name)}),(function(){var n;(null===(n=e.styleElements)||void 0===n?void 0:n.length)>0&&t.writeElement("x14:slicerStyleElements",(function(){e.styleElements.forEach((function(e){t.writeLeafElement("x14:slicerStyleElement",(function(){t.writeAttributeString("type",e.type),t.writeAttributeString("dxfId",e.dxfId)}))}))}))}))}))})):t.writeLeafElement("x14:slicerStyles",(function(){t.writeAttributeString("defaultSlicerStyle",n)}))})),y(u)||t.writeElement("ext",(function(){t.writeAttributeString("uri","{A0A4C193-F2C1-4fcb-8827-314CF55A85BB}"),t.writeAttributeString("xmlns:x15",i.XFileConstants.Ms)}),(function(){var e,n,i,o,a,s,c,f,h=u.cellXfs;h.length>0?(e=r.SJSStyleHelper.convertColors(d),n=r.SJSStyleHelper.getNumFmts(u).numberFormats,i=r.SJSStyleHelper.getFills(u,e,!0),o=u&&r.SJSStyleHelper.getFonts(u,e,l),a=r.SJSStyleHelper.getBorders(u,e),s=r.SJSStyleHelper.getAlignments(u),c=r.SJSStyleHelper.getProtections(u),f=null==u?void 0:u.sharedObjects,t.writeElement("x15:dxfs",(function(){t.writeAttributeString("count",h.length)}),(function(){Et(t,h,n,i,o,a,s,c,f)}))):t.writeLeafElement("x15:dxfs",(function(){t.writeAttributeString("count","0")}))})),y(h)||t.writeElement("ext",(function(){t.writeAttributeString("uri","{9260A510-F301-46a8-8635-F512D64BE5F5}"),t.writeAttributeString("xmlns:x15",i.XFileConstants.Ms)}),(function(){h.length>0?t.writeElement("x15:timelineStyles",(function(){t.writeAttributeString("defaultTimelineStyle",o)}),(function(){h.forEach((function(e){t.writeElement("x15:timelineStyle",(function(){t.writeAttributeString("name",e.name)}),(function(){var n;(null===(n=e.styleElements)||void 0===n?void 0:n.length)>0&&t.writeElement("x15:timelineStyleElements",(function(){e.styleElements.forEach((function(e){t.writeLeafElement("x15:timelineStyleElement",(function(){t.writeAttributeString("type",e.type),t.writeAttributeString("dxfId",e.dxfId)}))}))}))}))}))})):t.writeLeafElement("x15:timelineStyles",(function(){t.writeAttributeString("defaultTimelineStyle",o)}))}))}))}function Dt(t,e,n,r){t.writeLeafElement(A,(function(){t.writeAttributeString("Id",e),t.writeAttributeString("Type",n),t.writeAttributeString("Target",r)}))}Object.defineProperty(e,"__esModule",{value:!0}),e.zle=void 0,r=n(271),i=n(376),o=n(234),a=n(166),s=n(328),c=n(518),f=n(976),u=n(961),l=n(135),d=n(787),h=n(458),p=n(908),m=n(121),v=n(946),b=n(317),y=o.Common.lt.ht,w=i.util.vo,g=i.Util.pr,x=void 0,k=i.util.o1,I=i.util.xr,F=i.util.go,C="../charts/",A=i.XFileConstants.Lr,S=i.XFileConstants.ru,E=i.XFileConstants.mo,_=i.XFileConstants.Ki,D=i.XFileConstants.Dr,T=i.XFileConstants.Eo,j=i.XFileConstants.za,O=i.XFileConstants.zr,B=i.XFileConstants.Ho,z=i.XFileConstants.Cr,M=i.XFileConstants.Yr,N=o.Common.zf.fJ,U=".",L="tmp",P="application/octet-stream",R=20,G=40,q=62,W=20,V=function(){function t(){}return t}(),H=function(){function t(t,e){t&&(this.extension=t),e&&(this.contentType=e)}return t}(),X=function(){function t(){}return t}(),Z=function(){function t(t,e){this.Lee=t,this.LEt={},this.Uee=0,this.LEt=e,this.Pee=[],this.definedNames=[]}return t.prototype.Ole=function(t,e,n){var o,a,s,c=this;c.qee=t,c.Wee=t.workbook.lossless&&t.workbook.lossless.allowDynamicArray?1:0,o=[],a=new r.XFile("",""),s=new r.XFile(i.XFileConstants.Gu,i.RelationshipConstants.Ws),a.Vee(s),c.Hee(a),c.uJr(s),c.lJr(s),c.Zee(s),c.Kee(s),c.Xee(s),c.txo(s),c.Jee(s),c.Yee(s),c.$ee(s),c.Qee(s,t.sharedStrings),c.ete(s),c.E3e(s),c.nmo(s),c.tte(),c.nte(s),c.rte(t,a),c.ate(t,o),c.ite(a,c.Uee>0,o),c.kKr(),c.Lee.generateAsync({type:"arraybuffer",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",compression:"DEFLATE"}).then((function(t){c.LEt.password&&"string"==typeof c.LEt.password&&(t=(0,m.p2e)(t,c.LEt.password)),c.LEt.useArrayBuffer||(t=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})),e(t),c.L0()})).catch((function(t){n(t),c.L0()}))},t.prototype.nte=function(t){var e,n=this,o=this,s=o.qee,c=s.pivotCache;c&&(e=Object.keys(c)).forEach((function(e){var o,s,f,u,l,d,h,p=c[e],m=i.XFileConstants.eu+"/"+e+"."+i.XFileConstants.Cr;"pivotCacheDefinition"===p.n_?(s=p.rels,delete p.rels,f=new r.XFile(m,i.RelationshipConstants.ec),t.Vee(f),s&&s.c_&&s.c_[0]&&s.c_[0].Target&&(u=i.XFileConstants.eu+"/"+i.XFileConstants.Eo+"/"+e+"."+i.XFileConstants.Cr+"."+i.XFileConstants.Ho,(l=new a._le).writeDocument(),l.Dle(s),n.Lee.file(u.substring(1),l.jle()),d=i.XFileConstants.eu+"/"+s.c_[0].Target,h=new r.XFile(d,i.RelationshipConstants.ic),f.Vee(h)),o=It(p)):"pivotCacheRecords"!==p.n_&&"richPivotRecords"!==p.n_||(o=Ft(p)),o&&n.Lee.file(m.substring(1),o)}))},t.prototype.rko=function(t){var e=this,n=e.qee.richdata,o=e.qee.workbook.rels&&e.qee.workbook.rels.c_,a=(0,b.serializeRdArrayToXml)(null==n?void 0:n.rdarray),s=i.XFileConstants.w3e+"/"+i.XFileConstants.GAo,c=new r.XFile(s,i.RelationshipConstants.JAo);c.target="richData/"+i.XFileConstants.GAo,t.Vee(c),e.Lee.file(s.substring(1),a),null==o||o.push({n_:i.XFileConstants.Lr,Id:"rId"+(o.length+1),Type:i.RelationshipConstants.JAo,Target:"richData/"+i.XFileConstants.GAo})},t.prototype.Kee=function(t){var e,n,o,s=this,c=s.qee.externalLinks,f=0;if(c)for(o in e=function(e){var o,s,u,l,d,h,p,m,v,b;Object.prototype.hasOwnProperty.call(c,e)&&(f++,o=c[e],s=i.XFileConstants.nu+"/"+i.XFileConstants.tu+f+"."+i.XFileConstants.Cr,u=new r.XFile(s,i.RelationshipConstants.uc),t.Vee(u),l=o.option.name,(d=o.option.path)&&d.length>0&&(h=d.substr(-1),l="/"===h||"\\"===h?d+l:d+"/"+l),l=i.mt.Nfe(l,!0),(p=new a._le).writeDocument(),p.writeElement(D,(function(){p.writeAttributeString("xmlns",i.XFileConstants._r)}),(function(){p.writeLeafElement(A,(function(){p.writeAttributeString("Id","rId1"),p.writeAttributeString("Type",i.RelationshipConstants.fc),p.writeAttributeString("Target",l),p.writeAttributeString("TargetMode",i.XFileConstants.Cu)}))})),m=i.XFileConstants.nu+"/"+i.XFileConstants.Eo+"/"+i.XFileConstants.tu+f+"."+i.XFileConstants.Cr+"."+i.XFileConstants.Ho,n.Lee.file(m.substring(1),p.jle()),delete o.option,(v=new a._le).writeDocument(),v.Dle(o),b=v.jle(),n.Lee.file(s.substring(1),b))},n=this,c)e(o)},t.prototype.IKr=function(){var t,e=null===(t=this.LEt)||void 0===t?void 0:t.excelFileType;return!!e&&("XLSM"===(e=e.toUpperCase())||"XLTM"===e)},t.prototype.FKr=function(){var t=this;return!(!t.qee.workbook.lossless||!t.qee.workbook.lossless[i.XFileConstants.guo])},t.prototype.AKr=function(t,e,n){var r,o,a,s=this,c=[];return s.IKr()&&s.FKr()&&((o=new H).extension=i.XFileConstants.Go,o.contentType=i.XFileConstants.ya,c.push(o)),s.IKr()||((o=new H).extension=i.XFileConstants.Go,o.contentType=i.XFileConstants.Uo,c.push(o)),(o=new H).extension=i.XFileConstants.Ho,o.contentType=i.XFileConstants.zo,c.push(o),(o=new H).extension=i.XFileConstants.Cr,o.contentType=i.XFileConstants.Ca,c.push(o),e&&((o=new H).extension=i.XFileConstants.Yr,o.contentType=i.XFileConstants.wa,c.push(o)),(o=new H).extension=i.XFileConstants.Sa,o.contentType=i.XFileConstants.Ta,c.push(o),(o=new H).extension=i.XFileConstants.Aa,o.contentType=i.XFileConstants.Ia,c.push(o),(o=new H).extension=i.XFileConstants.xa,o.contentType=i.XFileConstants.Na,c.push(o),(o=new H).extension=i.XFileConstants._a,o.contentType=i.XFileConstants.Ea,c.push(o),(o=new H).extension=i.XFileConstants.ja,o.contentType=i.XFileConstants.Oa,c.push(o),(o=new H).extension=i.XFileConstants.Ra,o.contentType=i.XFileConstants.Ba,c.push(o),(o=new H).extension=i.XFileConstants.ka,o.contentType=i.XFileConstants.Da,c.push(o),(o=new H).extension=i.XFileConstants.La,o.contentType=i.XFileConstants.Fa,c.push(o),(o=new H).extension=i.XFileConstants.Pa,o.contentType=i.XFileConstants.Ga,c.push(o),(a=St(c=c.concat(n),t,null===(r=s.LEt)||void 0===r?void 0:r.excelFileType))?c:null},t.prototype.ite=function(t,e,n){var r=this,o=r.AKr(t,e,n),s=new a.XmlWriter;s.writeDocument(),s.writeElement("Types",(function(){s.writeAttributeString("xmlns",i.XFileConstants.fs)}),(function(){var t,e,n=function(t,e){var n=o[t];n instanceof H?s.writeLeafElement("Default",(function(){s.writeAttributeString("Extension",n.extension),s.writeAttributeString("ContentType",n.contentType)})):n instanceof V&&s.writeLeafElement("Override",(function(){s.writeAttributeString("PartName",n.partName),s.writeAttributeString("ContentType",n.contentType)}))};for(t=0,e=o.length;t<e;t++)n(t,e)})),this.Lee.file(i.XFileConstants.Oo,s.jle())},t.prototype.rte=function(t,e){var n,r,o,s,c,f,u,l,d,h,p,m,v,b,y,w,g,x,k,I,F,C,A,S,E,_,T,B,U,L,P,R,G=new a._le;for(G.writeDocument(),G.writeElement(D,(function(){G.writeAttributeString("xmlns",i.XFileConstants._r)}),(function(){var t,n,r=e.relationFiles;if(r&&r.count>0)for(t in r)r.hasOwnProperty(t)&&"count"!==t&&(n=r[t],Dt(G,t,n.fileType,n.fileName));else Dt(G,"rId1",i.RelationshipConstants.Ws,"xl/workbook.xml")})),n=i.XFileConstants.Eo+"/."+i.XFileConstants.Ho,this.Lee.file(n,G.jle()),r=t.workbook.rels,(G=new a._le).writeDocument(),G.Dle(r),n="/xl/"+i.XFileConstants.Eo+"/workbook.xml."+i.XFileConstants.Ho,this.Lee.file(n.substring(1),G.jle()),o=t.sheets,s=Object.keys(o),c=function(t){var e,r=o[t],s=r.rels;s&&s.c_&&s.c_.length>0&&(e=s.c_,(G=new a._le).writeDocument(),G.writeElement(D,(function(){G.writeAttributeString("xmlns",i.XFileConstants._r)}),(function(){e.forEach((function(t){G.Dle(t)}))})),n=it(i.XFileConstants.Wa,t),f.Lee.file(n.substring(1),G.jle()))},f=this,u=0,l=s;u<l.length;u++)c(d=l[u]);if(h=t.drawings)for(m=0,v=p=Object.keys(h);m<v.length;m++)(w=(y=h[b=v[m]]).rels)&&((G=new a._le).writeDocument(),G.Dle(w),g=N(b,O),n=it(j,b,x=g?M:z),this.Lee.file(n.substring(1),G.jle()));if(k=t.charts)for(F=0,C=I=Object.keys(k);F<C.length;F++)(E=(S=k[A=C[F]]).rels)&&((G=new a._le).writeDocument(),G.Dle(E),n=it(i.XFileConstants.Ha,A),this.Lee.file(n.substring(1),G.jle()));if(_=t.pivotTables)for(B=0,U=T=Object.keys(_);B<U.length;B++)(R=(P=_[L=U[B]]).rels)&&((G=new a._le).writeDocument(),G.Dle(R),n=it(i.XFileConstants.iu,L),this.Lee.file(n.substring(1),G.jle()))},t.prototype.tte=function(){var t,e,n=this,r=n.definedNames,o=n.qee.workbook,a=k(o,"definedNames");r.length>0&&(a||(a={n_:"definedNames",c_:[]},o.c_.push(a)),a.c_=a.c_.concat(r)),a&&a.c_.length<=0&&(t=[],o.c_.forEach((function(e){"object"==typeof e&&"definedNames"!==e.n_&&t.push(e)})),o.c_=t),i.util.Pr(o,i.WorkbookNodeOrder),e=kt(n.qee.workbook,n.Pee),n.Lee.file(i.XFileConstants.Gu.substring(1),e)},t.prototype.kKr=function(){var t,e=this,n=e.qee.workbook.lossless&&e.qee.workbook.lossless[i.XFileConstants.guo];!1!==(null===(t=e.LEt)||void 0===t?void 0:t.losslessEditing)&&e.IKr()&&n&&e.Lee.file(i.XFileConstants.yKr,n)},t.prototype.ete=function(t){var e,n,o,a,s,c,f,u,l,d,h,p,m=this,v=m.qee.metadata,y=m.Wee;(v||y)&&(y>0&&((e=(v={metadataTypes:J([],v&&v.metadataTy