qsyx-element 1.0.25 → 1.0.26
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.
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ref as l, onMounted as g, onUnmounted as m, createElementBlock as d, openBlock as p, createElementVNode as _ } from "vue";
|
|
2
|
+
import { y as o } from "./vendor-Dm-zbZAk.js";
|
|
3
|
+
import { w as u } from "./utils-Dl1GcTAW.js";
|
|
4
|
+
const x = { id: "app" }, f = ["src"], w = /* @__PURE__ */ Object.assign({
|
|
5
|
+
name: "QsyxImgToText"
|
|
6
|
+
}, {
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
src: String
|
|
10
|
+
},
|
|
11
|
+
emits: ["getText"],
|
|
12
|
+
setup(s, { emit: c }) {
|
|
13
|
+
const i = c, t = s, n = l(null), e = o.createWorker({
|
|
14
|
+
// logger: m => console.log(m),
|
|
15
|
+
}), r = async () => {
|
|
16
|
+
if (console.log("props.src.includes('http://')", t.src.includes("http://")), await e.load(), console.log(1), await e.loadLanguage("chi_sim+eng"), console.log(2), await e.initialize("chi_sim+eng", o.OEM.LSTM_ONLY), console.log(3), await e.setParameters({
|
|
17
|
+
tessedit_pageseg_mode: o.PSM.SINGLE_BLOCK
|
|
18
|
+
}), console.log(4), t.src.includes("http://")) {
|
|
19
|
+
const { data: { text: a } } = await e.recognize(t.src);
|
|
20
|
+
} else {
|
|
21
|
+
const { data: { text: a } } = await e.recognize(n.value);
|
|
22
|
+
}
|
|
23
|
+
i("getText", text), console.log("识别结果:", text);
|
|
24
|
+
};
|
|
25
|
+
return g(() => {
|
|
26
|
+
r();
|
|
27
|
+
}), m(async () => {
|
|
28
|
+
await e.terminate();
|
|
29
|
+
}), (a, h) => (p(), d("div", x, [
|
|
30
|
+
_("img", {
|
|
31
|
+
ref_key: "imageRef",
|
|
32
|
+
ref: n,
|
|
33
|
+
alt: "Vue logo",
|
|
34
|
+
src: s.src
|
|
35
|
+
}, null, 8, f)
|
|
36
|
+
]));
|
|
37
|
+
}
|
|
38
|
+
}), L = u(w);
|
|
39
|
+
export {
|
|
40
|
+
L as Q
|
|
41
|
+
};
|
package/dist/es/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { Q as B, a as C } from "./insertExcel-BXMzqiXR.js";
|
|
|
11
11
|
import { defineComponent as L, ref as R, computed as U, createElementBlock as W, openBlock as F, createElementVNode as n, withDirectives as N, vModelText as H } from "vue";
|
|
12
12
|
import { N as O } from "./vendor-Dm-zbZAk.js";
|
|
13
13
|
import { Q as P } from "./exportExcel-UNp4O7PX.js";
|
|
14
|
-
import { Q as S } from "./imToText-
|
|
14
|
+
import { Q as S } from "./imToText-BmYJcsAL.js";
|
|
15
15
|
import { Q as V } from "./onlineExcel-BaKanh8m.js";
|
|
16
16
|
const pe = o(d), de = o(Q), Qe = o(f), fe = o(y), ye = o(_), _e = o(u), ue = o(k), ke = o(w), j = { class: "markdown-app" }, A = ["innerHTML"], q = /* @__PURE__ */ L({
|
|
17
17
|
name: "QsyxMarkDownText",
|
package/dist/umd/index.umd.cjs
CHANGED
|
@@ -595,7 +595,7 @@ Please report this to https://github.com/markedjs/marked.`,r){const V="<p>An err
|
|
|
595
595
|
|
|
596
596
|
Use Save As... to download, then click back to return to this page.`)&&(location.href=fg),!0;var pg=document.createElement("iframe");document.body.appendChild(pg),!mg&&/^data:/.test(fg)&&(fg="data:"+fg.replace(/^data:([\w\/\-\+]+)/,eg)),pg.src=fg,setTimeout(function(){document.body.removeChild(pg)},333)}if(navigator.msSaveBlob)return navigator.msSaveBlob(Ag,ng);if(gg.URL)hg(gg.URL.createObjectURL(Ag),!0);else{if(typeof Ag=="string"||Ag.constructor===ag)try{return hg("data:"+Ig+";base64,"+gg.btoa(Ag))}catch{return hg("data:"+Ig+","+encodeURIComponent(Ag))}sg=new FileReader,sg.onload=function(fg){hg(this.result)},sg.readAsDataURL(Ag)}return!0}})})(download$1);var downloadExports=download$1.exports;const download=getDefaultExportFromCjs(downloadExports),_sfc_main$3={props:{type:{type:String,default:"xls"},data:{type:Array,required:!1,default:null},fields:{type:Object,default:()=>null},exportFields:{type:Object,default:()=>null},defaultValue:{type:String,required:!1,default:""},header:{default:null},footer:{default:null},name:{type:String,default:"data.xls"},fetch:{type:Function},meta:{type:Array,default:()=>[]},worksheet:{type:String,default:"Sheet1"},beforeGenerate:{type:Function},beforeFinish:{type:Function},escapeCsv:{type:Boolean,default:!0},stringifyLongNum:{type:Boolean,default:!1}},computed:{idName(){var r=new Date().getTime();return"export_"+r},downloadFields(){if(this.fields)return this.fields;if(this.exportFields)return this.exportFields}},methods:{async generate(){typeof this.beforeGenerate=="function"&&await this.beforeGenerate();let r=this.data;if((typeof this.fetch=="function"||!r)&&(r=await this.fetch()),!r||!r.length)return;let y=this.getProcessedJson(r,this.downloadFields);return this.type==="html"?this.export(this.jsonToXLS(y),this.name.replace(".xls",".html"),"text/html"):this.type==="csv"?this.export(this.jsonToCSV(y),this.name.replace(".xls",".csv"),"application/csv"):this.export(this.jsonToXLS(y),this.name,"application/vnd.ms-excel")},export:async function(r,y,n){let V=this.base64ToBlob(r,n);typeof this.beforeFinish=="function"&&await this.beforeFinish(),download(V,y,n)},jsonToXLS(r){let y='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=ProgId content=Excel.Sheet> <meta name=Generator content="Microsoft Excel 11"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>${worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--><style>br {mso-data-placement: same-cell;}</style></head><body><table>${table}</table></body></html>',n="<thead>";const V=Object.keys(r[0]).length;let L=this;const z=this.header||this.$attrs.title;z&&(n+=this.parseExtraData(z,'<tr><th colspan="'+V+'">${data}</th></tr>')),n+="<tr>";for(let gg in r[0])n+="<th>"+gg+"</th>";return n+="</tr>",n+="</thead>",n+="<tbody>",r.map(function(gg,eg){n+="<tr>";for(let Ig in gg)n+="<td>"+L.preprocessLongNum(L.valueReformattedForMultilines(gg[Ig]))+"</td>";n+="</tr>"}),n+="</tbody>",this.footer!=null&&(n+="<tfoot>",n+=this.parseExtraData(this.footer,'<tr><td colspan="'+V+'">${data}</td></tr>'),n+="</tfoot>"),y.replace("${table}",n).replace("${worksheet}",this.worksheet)},jsonToCSV(r){let y=this;var n=[];const V=this.header||this.$attrs.title;V&&n.push(this.parseExtraData(V,"${data}\r\n"));for(let L in r[0])n.push(L),n.push(",");return n.pop(),n.push(`\r
|
|
597
597
|
`),r.map(function(L){for(let z in L){let gg=L[z]+"";y.escapeCsv&&(gg='="'+gg+'"',gg.match(/[,"\n]/)&&(gg='"'+gg.replace(/\"/g,'""')+'"')),n.push(gg),n.push(",")}n.pop(),n.push(`\r
|
|
598
|
-
`)}),this.footer!=null&&n.push(this.parseExtraData(this.footer,"${data}\r\n")),n.join("")},getProcessedJson(r,y){let n=this.getKeys(r,y),V=[],L=this;return r.map(function(z,gg){let eg={};for(let Ig in n){let tg=n[Ig];eg[Ig]=L.getValue(tg,z)}V.push(eg)}),V},getKeys(r,y){if(y)return y;let n={};for(let V in r[0])n[V]=V;return n},parseExtraData(r,y){let n="";if(Array.isArray(r))for(var V=0;V<r.length;V++)r[V]&&(n+=y.replace("${data}",r[V]));else n+=y.replace("${data}",r);return n},getValue(r,y){const n=typeof r!="object"?r:r.field;let V=typeof n!="string"?[]:n.split("."),L=this.defaultValue;return n?V.length>1?L=this.getValueFromNestedItem(y,V):L=this.parseValue(y[n]):L=y,r.hasOwnProperty("callback")&&(L=this.getValueFromCallback(L,r.callback)),L},valueReformattedForMultilines(r){return typeof r=="string"?r.replace(/\n/gi,"<br/>"):r},preprocessLongNum(r){if(this.stringifyLongNum){if(String(r).startsWith("0x"))return r;if(!isNaN(r)&&r!=""&&(r>99999999999||r<1e-13))return'="'+r+'"'}return r},getValueFromNestedItem(r,y){let n=r;for(let V of y)n&&(n=n[V]);return this.parseValue(n)},getValueFromCallback(r,y){if(typeof y!="function")return this.defaultValue;const n=y(r);return this.parseValue(n)},parseValue(r){return r||r===0||typeof r=="boolean"?r:this.defaultValue},base64ToBlob(r,y){let n=window.btoa(window.unescape(encodeURIComponent(r))),V=atob(n),L=V.length,z=new Uint8ClampedArray(L);for(;L--;)z[L]=V.charCodeAt(L);return new Blob([z],{type:y})}}},_hoisted_1$2=["id"];function _sfc_render(r,y,n,V,L,z){return vue.openBlock(),vue.createElementBlock("div",{id:z.idName,onClick:y[0]||(y[0]=(...gg)=>z.generate&&z.generate(...gg))},[vue.renderSlot(r.$slots,"default",{},()=>[vue.createTextVNode(" Download "+vue.toDisplayString(n.name),1)])],8,_hoisted_1$2)}const JsonExcel=_export_sfc(_sfc_main$3,[["render",_sfc_render]]),_sfc_main$2=vue.defineComponent({name:"QsyxExportExcel",__name:"index",props:{json_fields:{required:!0},details_form:{required:!0},header:{type:String}},setup(r){const y=r;return vue.ref(""),vue.reactive({排查日期:"date",整改隐患内容:"details",整改措施:"measure",整改时限:"timeLimit",应急措施和预案:"plan",整改责任人:"personInCharge",填表人:"preparer",整改资金:"fund",整改完成情况:"complete",备注:"remark"}),vue.reactive([{date:"2022-3-10",details:"卸油区过路灯损坏",measure:"更换灯泡",timeLimit:"2022-3-21",plan:"先使用充电灯代替,贴好安全提醒告示",personInCharge:"王xx",preparer:"王xx",fund:"20元",complete:"已完成整改",remark:"重新更换了灯泡"}]),(n,V)=>{const L=vue.resolveComponent("el-button");return vue.openBlock(),vue.createBlock(JsonExcel,{class:"export-excel-wrapper",data:y.details_form,fields:y.json_fields,header:y.header,name:"aaa.xls"},{default:vue.withCtx(()=>[vue.createVNode(L,{type:"success"},{default:vue.withCtx(()=>V[0]||(V[0]=[vue.createTextVNode("导出")])),_:1,__:[0]})]),_:1},8,["data","fields","header"])}}}),exportExcel$1=_export_sfc(_sfc_main$2,[["__scopeId","data-v-f6ee5aa4"]]),QsyxExportExcel=withInstall$1(exportExcel$1);var runtime={exports:{}};(function(r){var y=function(n){var V=Object.prototype,L=V.hasOwnProperty,z=Object.defineProperty||function(Rg,Xg,Sg){Rg[Xg]=Sg.value},gg,eg=typeof Symbol=="function"?Symbol:{},Ig=eg.iterator||"@@iterator",tg=eg.asyncIterator||"@@asyncIterator",Cg=eg.toStringTag||"@@toStringTag";function rg(Rg,Xg,Sg){return Object.defineProperty(Rg,Xg,{value:Sg,enumerable:!0,configurable:!0,writable:!0}),Rg[Xg]}try{rg({},"")}catch{rg=function(Xg,Sg,Ng){return Xg[Sg]=Ng}}function ag(Rg,Xg,Sg,Ng){var Hg=Xg&&Xg.prototype instanceof lg?Xg:lg,Yg=Object.create(Hg.prototype),Mg=new Wg(Ng||[]);return z(Yg,"_invoke",{value:Vg(Rg,Sg,Mg)}),Yg}n.wrap=ag;function ig(Rg,Xg,Sg){try{return{type:"normal",arg:Rg.call(Xg,Sg)}}catch(Ng){return{type:"throw",arg:Ng}}}var ng="suspendedStart",Ag="suspendedYield",sg="executing",cg="completed",og={};function lg(){}function ug(){}function dg(){}var hg={};rg(hg,Ig,function(){return this});var fg=Object.getPrototypeOf,mg=fg&&fg(fg(Bg([])));mg&&mg!==V&&L.call(mg,Ig)&&(hg=mg);var pg=dg.prototype=lg.prototype=Object.create(hg);ug.prototype=dg,z(pg,"constructor",{value:dg,configurable:!0}),z(dg,"constructor",{value:ug,configurable:!0}),ug.displayName=rg(dg,Cg,"GeneratorFunction");function bg(Rg){["next","throw","return"].forEach(function(Xg){rg(Rg,Xg,function(Sg){return this._invoke(Xg,Sg)})})}n.isGeneratorFunction=function(Rg){var Xg=typeof Rg=="function"&&Rg.constructor;return Xg?Xg===ug||(Xg.displayName||Xg.name)==="GeneratorFunction":!1},n.mark=function(Rg){return Object.setPrototypeOf?Object.setPrototypeOf(Rg,dg):(Rg.__proto__=dg,rg(Rg,Cg,"GeneratorFunction")),Rg.prototype=Object.create(pg),Rg},n.awrap=function(Rg){return{__await:Rg}};function vg(Rg,Xg){function Sg(Yg,Mg,Fg,zg){var xg=ig(Rg[Yg],Rg,Mg);if(xg.type==="throw")zg(xg.arg);else{var Dg=xg.arg,Tg=Dg.value;return Tg&&typeof Tg=="object"&&L.call(Tg,"__await")?Xg.resolve(Tg.__await).then(function(Ug){Sg("next",Ug,Fg,zg)},function(Ug){Sg("throw",Ug,Fg,zg)}):Xg.resolve(Tg).then(function(Ug){Dg.value=Ug,Fg(Dg)},function(Ug){return Sg("throw",Ug,Fg,zg)})}}var Ng;function Hg(Yg,Mg){function Fg(){return new Xg(function(zg,xg){Sg(Yg,Mg,zg,xg)})}return Ng=Ng?Ng.then(Fg,Fg):Fg()}z(this,"_invoke",{value:Hg})}bg(vg.prototype),rg(vg.prototype,tg,function(){return this}),n.AsyncIterator=vg,n.async=function(Rg,Xg,Sg,Ng,Hg){Hg===void 0&&(Hg=Promise);var Yg=new vg(ag(Rg,Xg,Sg,Ng),Hg);return n.isGeneratorFunction(Xg)?Yg:Yg.next().then(function(Mg){return Mg.done?Mg.value:Yg.next()})};function Vg(Rg,Xg,Sg){var Ng=ng;return function(Yg,Mg){if(Ng===sg)throw new Error("Generator is already running");if(Ng===cg){if(Yg==="throw")throw Mg;return Gg()}for(Sg.method=Yg,Sg.arg=Mg;;){var Fg=Sg.delegate;if(Fg){var zg=wg(Fg,Sg);if(zg){if(zg===og)continue;return zg}}if(Sg.method==="next")Sg.sent=Sg._sent=Sg.arg;else if(Sg.method==="throw"){if(Ng===ng)throw Ng=cg,Sg.arg;Sg.dispatchException(Sg.arg)}else Sg.method==="return"&&Sg.abrupt("return",Sg.arg);Ng=sg;var xg=ig(Rg,Xg,Sg);if(xg.type==="normal"){if(Ng=Sg.done?cg:Ag,xg.arg===og)continue;return{value:xg.arg,done:Sg.done}}else xg.type==="throw"&&(Ng=cg,Sg.method="throw",Sg.arg=xg.arg)}}}function wg(Rg,Xg){var Sg=Xg.method,Ng=Rg.iterator[Sg];if(Ng===gg)return Xg.delegate=null,Sg==="throw"&&Rg.iterator.return&&(Xg.method="return",Xg.arg=gg,wg(Rg,Xg),Xg.method==="throw")||Sg!=="return"&&(Xg.method="throw",Xg.arg=new TypeError("The iterator does not provide a '"+Sg+"' method")),og;var Hg=ig(Ng,Rg.iterator,Xg.arg);if(Hg.type==="throw")return Xg.method="throw",Xg.arg=Hg.arg,Xg.delegate=null,og;var Yg=Hg.arg;if(!Yg)return Xg.method="throw",Xg.arg=new TypeError("iterator result is not an object"),Xg.delegate=null,og;if(Yg.done)Xg[Rg.resultName]=Yg.value,Xg.next=Rg.nextLoc,Xg.method!=="return"&&(Xg.method="next",Xg.arg=gg);else return Yg;return Xg.delegate=null,og}bg(pg),rg(pg,Cg,"Generator"),rg(pg,Ig,function(){return this}),rg(pg,"toString",function(){return"[object Generator]"});function yg(Rg){var Xg={tryLoc:Rg[0]};1 in Rg&&(Xg.catchLoc=Rg[1]),2 in Rg&&(Xg.finallyLoc=Rg[2],Xg.afterLoc=Rg[3]),this.tryEntries.push(Xg)}function Zg(Rg){var Xg=Rg.completion||{};Xg.type="normal",delete Xg.arg,Rg.completion=Xg}function Wg(Rg){this.tryEntries=[{tryLoc:"root"}],Rg.forEach(yg,this),this.reset(!0)}n.keys=function(Rg){var Xg=Object(Rg),Sg=[];for(var Ng in Xg)Sg.push(Ng);return Sg.reverse(),function Hg(){for(;Sg.length;){var Yg=Sg.pop();if(Yg in Xg)return Hg.value=Yg,Hg.done=!1,Hg}return Hg.done=!0,Hg}};function Bg(Rg){if(Rg){var Xg=Rg[Ig];if(Xg)return Xg.call(Rg);if(typeof Rg.next=="function")return Rg;if(!isNaN(Rg.length)){var Sg=-1,Ng=function Hg(){for(;++Sg<Rg.length;)if(L.call(Rg,Sg))return Hg.value=Rg[Sg],Hg.done=!1,Hg;return Hg.value=gg,Hg.done=!0,Hg};return Ng.next=Ng}}return{next:Gg}}n.values=Bg;function Gg(){return{value:gg,done:!0}}return Wg.prototype={constructor:Wg,reset:function(Rg){if(this.prev=0,this.next=0,this.sent=this._sent=gg,this.done=!1,this.delegate=null,this.method="next",this.arg=gg,this.tryEntries.forEach(Zg),!Rg)for(var Xg in this)Xg.charAt(0)==="t"&&L.call(this,Xg)&&!isNaN(+Xg.slice(1))&&(this[Xg]=gg)},stop:function(){this.done=!0;var Rg=this.tryEntries[0],Xg=Rg.completion;if(Xg.type==="throw")throw Xg.arg;return this.rval},dispatchException:function(Rg){if(this.done)throw Rg;var Xg=this;function Sg(zg,xg){return Yg.type="throw",Yg.arg=Rg,Xg.next=zg,xg&&(Xg.method="next",Xg.arg=gg),!!xg}for(var Ng=this.tryEntries.length-1;Ng>=0;--Ng){var Hg=this.tryEntries[Ng],Yg=Hg.completion;if(Hg.tryLoc==="root")return Sg("end");if(Hg.tryLoc<=this.prev){var Mg=L.call(Hg,"catchLoc"),Fg=L.call(Hg,"finallyLoc");if(Mg&&Fg){if(this.prev<Hg.catchLoc)return Sg(Hg.catchLoc,!0);if(this.prev<Hg.finallyLoc)return Sg(Hg.finallyLoc)}else if(Mg){if(this.prev<Hg.catchLoc)return Sg(Hg.catchLoc,!0)}else if(Fg){if(this.prev<Hg.finallyLoc)return Sg(Hg.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(Rg,Xg){for(var Sg=this.tryEntries.length-1;Sg>=0;--Sg){var Ng=this.tryEntries[Sg];if(Ng.tryLoc<=this.prev&&L.call(Ng,"finallyLoc")&&this.prev<Ng.finallyLoc){var Hg=Ng;break}}Hg&&(Rg==="break"||Rg==="continue")&&Hg.tryLoc<=Xg&&Xg<=Hg.finallyLoc&&(Hg=null);var Yg=Hg?Hg.completion:{};return Yg.type=Rg,Yg.arg=Xg,Hg?(this.method="next",this.next=Hg.finallyLoc,og):this.complete(Yg)},complete:function(Rg,Xg){if(Rg.type==="throw")throw Rg.arg;return Rg.type==="break"||Rg.type==="continue"?this.next=Rg.arg:Rg.type==="return"?(this.rval=this.arg=Rg.arg,this.method="return",this.next="end"):Rg.type==="normal"&&Xg&&(this.next=Xg),og},finish:function(Rg){for(var Xg=this.tryEntries.length-1;Xg>=0;--Xg){var Sg=this.tryEntries[Xg];if(Sg.finallyLoc===Rg)return this.complete(Sg.completion,Sg.afterLoc),Zg(Sg),og}},catch:function(Rg){for(var Xg=this.tryEntries.length-1;Xg>=0;--Xg){var Sg=this.tryEntries[Xg];if(Sg.tryLoc===Rg){var Ng=Sg.completion;if(Ng.type==="throw"){var Hg=Ng.arg;Zg(Sg)}return Hg}}throw new Error("illegal catch attempt")},delegateYield:function(Rg,Xg,Sg){return this.delegate={iterator:Bg(Rg),resultName:Xg,nextLoc:Sg},this.method==="next"&&(this.arg=gg),og}},n}(r.exports);try{regeneratorRuntime=y}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=y:Function("r","regeneratorRuntime = r")(y)}})(runtime);var getId$3=(r,y)=>`${r}-${y}-${Math.random().toString(16).slice(3,8)}`;const getId$2=getId$3;let jobCounter=0;var createJob$2=({id:r,action:y,payload:n={}})=>{let V=r;return typeof V>"u"&&(V=getId$2("Job",jobCounter),jobCounter+=1),{id:V,action:y,payload:n}},log$2={};let logging=!1;log$2.logging=logging,log$2.setLogging=r=>{logging=r},log$2.log=(...r)=>logging?console.log.apply(void 0,r):null;const createJob$1=createJob$2,{log:log$1}=log$2,getId$1=getId$3;let schedulerCounter=0;var createScheduler$1=()=>{const r=getId$1("Scheduler",schedulerCounter),y={},n={};let V=[];schedulerCounter+=1;const L=()=>V.length,z=()=>Object.keys(y).length,gg=()=>{if(V.length!==0){const rg=Object.keys(y);for(let ag=0;ag<rg.length;ag+=1)if(typeof n[rg[ag]]>"u"){V[0](y[rg[ag]]);break}}},eg=(rg,ag)=>new Promise((ig,ng)=>{const Ag=createJob$1({action:rg,payload:ag});V.push(async sg=>{V.shift(),n[sg.id]=Ag;try{ig(await sg[rg].apply(void 0,[...ag,Ag.id]))}catch(cg){ng(cg)}finally{delete n[sg.id],gg()}}),log$1(`[${r}]: Add ${Ag.id} to JobQueue`),log$1(`[${r}]: JobQueue length=${V.length}`),gg()});return{addWorker:rg=>(y[rg.id]=rg,log$1(`[${r}]: Add ${rg.id}`),log$1(`[${r}]: Number of workers=${z()}`),gg(),rg.id),addJob:async(rg,...ag)=>{if(z()===0)throw Error(`[${r}]: You need to have at least one worker before adding jobs`);return eg(rg,ag)},terminate:async()=>{Object.keys(y).forEach(async rg=>{await y[rg].terminate()}),V=[]},getQueueLen:L,getNumWorkers:z}};function isElectron$1(){return!!(typeof window<"u"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process<"u"&&typeof process.versions=="object"&&process.versions.electron||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0)}var isElectron_1=isElectron$1;const isElectron=isElectron_1;var getEnvironment=r=>{const y={};return typeof WorkerGlobalScope<"u"?y.type="webworker":isElectron()?y.type="electron":typeof window=="object"?y.type="browser":typeof process=="object"&&typeof commonjsRequire=="function"&&(y.type="node"),typeof r>"u"?y:y[r]},resolveUrl={exports:{}};(function(r,y){(function(n,V){r.exports=V()})(commonjsGlobal,function(){function n(){var V=arguments.length;if(V===0)throw new Error("resolveUrl requires at least one argument; got none.");var L=document.createElement("base");if(L.href=arguments[0],V===1)return L.href;var z=document.getElementsByTagName("head")[0];z.insertBefore(L,z.firstChild);for(var gg=document.createElement("a"),eg,Ig=1;Ig<V;Ig++)gg.href=arguments[Ig],eg=gg.href,L.href=eg;return z.removeChild(L),eg}return n})})(resolveUrl);var resolveUrlExports=resolveUrl.exports;const isBrowser=getEnvironment("type")==="browser",resolveURL$2=isBrowser?resolveUrlExports:r=>r;var resolvePaths$1=r=>{const y={...r};return["corePath","workerPath","langPath"].forEach(n=>{typeof r[n]<"u"&&(y[n]=resolveURL$2(y[n]))}),y},circularize$1=r=>{const y=[],n=[],V=[],L=[],z=[];return r.blocks.forEach(gg=>{gg.paragraphs.forEach(eg=>{eg.lines.forEach(Ig=>{Ig.words.forEach(tg=>{tg.symbols.forEach(Cg=>{z.push({...Cg,page:r,block:gg,paragraph:eg,line:Ig,word:tg})}),L.push({...tg,page:r,block:gg,paragraph:eg,line:Ig})}),V.push({...Ig,page:r,block:gg,paragraph:eg})}),n.push({...eg,page:r,block:gg})}),y.push({...gg,page:r})}),{...r,blocks:y,paragraphs:n,lines:V,words:L,symbols:z}},OEM$2={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3};const OEM$1=OEM$2;var config={defaultOEM:OEM$1.DEFAULT};const version$1="2.1.5",dependencies$1={"tesseract.js-core":"^2.2.0"},require$$1={version:version$1,dependencies:dependencies$1};var defaultOptions$3={langPath:"https://tessdata.projectnaptha.com/4.0.0",workerBlobURL:!0,logger:()=>{}};const resolveURL$1=resolveUrlExports,{version,dependencies}=require$$1,defaultOptions$2=defaultOptions$3;var defaultOptions_1={...defaultOptions$2,workerPath:typeof process<"u"&&process.env.TESS_ENV==="development"?resolveURL$1(`/dist/worker.dev.js?nocache=${Math.random().toString(36).slice(3)}`):`https://unpkg.com/tesseract.js@v${version}/dist/worker.min.js`,corePath:`https://unpkg.com/tesseract.js-core@v${dependencies["tesseract.js-core"].substring(1)}/tesseract-core.${typeof WebAssembly=="object"?"wasm":"asm"}.js`},spawnWorker$2=({workerPath:r,workerBlobURL:y})=>{let n;if(Blob&&URL&&y){const V=new Blob([`importScripts("${r}");`],{type:"application/javascript"});n=new Worker(URL.createObjectURL(V))}else n=new Worker(r);return n},terminateWorker$2=r=>{r.terminate()},onMessage$2=(r,y)=>{r.onmessage=({data:n})=>{y(n)}},send$2=async(r,y)=>{r.postMessage(y)},loadImage$3={exports:{}};(function(r){(function(y){function n(z,gg,eg){var Ig=document.createElement("img"),tg;function Cg(rg,ag){ag&&console.log(ag),rg&&n.isInstanceOf("Blob",rg)?(z=rg,tg=n.createObjectURL(z)):(tg=z,eg&&eg.crossOrigin&&(Ig.crossOrigin=eg.crossOrigin)),Ig.src=tg}if(Ig.onerror=function(rg){return n.onerror(Ig,rg,z,tg,gg,eg)},Ig.onload=function(rg){return n.onload(Ig,rg,z,tg,gg,eg)},typeof z=="string")return n.hasMetaOption(eg)?n.fetchBlob(z,Cg,eg):Cg(),Ig;if(n.isInstanceOf("Blob",z)||n.isInstanceOf("File",z))return tg=n.createObjectURL(z),tg?(Ig.src=tg,Ig):n.readFile(z,function(rg){var ag=rg.target;ag&&ag.result?Ig.src=ag.result:gg&&gg(rg)})}var V=y.createObjectURL&&y||y.URL&&URL.revokeObjectURL&&URL||y.webkitURL&&webkitURL;function L(z,gg){z&&z.slice(0,5)==="blob:"&&!(gg&&gg.noRevoke)&&n.revokeObjectURL(z)}n.hasMetaOption=function(z){return z&&z.meta},n.fetchBlob=function(z,gg){gg()},n.isInstanceOf=function(z,gg){return Object.prototype.toString.call(gg)==="[object "+z+"]"},n.transform=function(z,gg,eg,Ig,tg){eg(z,tg)},n.onerror=function(z,gg,eg,Ig,tg,Cg){L(Ig,Cg),tg&&tg.call(z,gg)},n.onload=function(z,gg,eg,Ig,tg,Cg){L(Ig,Cg),tg&&n.transform(z,Cg,tg,eg,{originalWidth:z.naturalWidth||z.width,originalHeight:z.naturalHeight||z.height})},n.createObjectURL=function(z){return V?V.createObjectURL(z):!1},n.revokeObjectURL=function(z){return V?V.revokeObjectURL(z):!1},n.readFile=function(z,gg,eg){if(y.FileReader){var Ig=new FileReader;if(Ig.onload=Ig.onerror=gg,eg=eg||"readAsDataURL",Ig[eg])return Ig[eg](z),Ig}return!1},r.exports?r.exports=n:y.loadImage=n})(typeof window<"u"&&window||commonjsGlobal)})(loadImage$3);var loadImageExports=loadImage$3.exports,loadImageScale={exports:{}};(function(r){(function(y){r.exports?y(loadImageExports):y(window.loadImage)})(function(y){var n=y.transform;y.transform=function(V,L,z,gg,eg){n.call(y,y.scale(V,L,eg),L,z,gg,eg)},y.transformCoordinates=function(){},y.getTransformedOptions=function(V,L){var z=L.aspectRatio,gg,eg,Ig,tg;if(!z)return L;gg={};for(eg in L)Object.prototype.hasOwnProperty.call(L,eg)&&(gg[eg]=L[eg]);return gg.crop=!0,Ig=V.naturalWidth||V.width,tg=V.naturalHeight||V.height,Ig/tg>z?(gg.maxWidth=tg*z,gg.maxHeight=tg):(gg.maxWidth=Ig,gg.maxHeight=Ig/z),gg},y.renderImageToCanvas=function(V,L,z,gg,eg,Ig,tg,Cg,rg,ag,ig){var ng=V.getContext("2d");return ig.imageSmoothingEnabled===!1?ng.imageSmoothingEnabled=!1:ig.imageSmoothingQuality&&(ng.imageSmoothingQuality=ig.imageSmoothingQuality),ng.drawImage(L,z,gg,eg,Ig,tg,Cg,rg,ag),V},y.hasCanvasOption=function(V){return V.canvas||V.crop||!!V.aspectRatio},y.scale=function(V,L,z){L=L||{};var gg=document.createElement("canvas"),eg=V.getContext||y.hasCanvasOption(L)&&gg.getContext,Ig=V.naturalWidth||V.width,tg=V.naturalHeight||V.height,Cg=Ig,rg=tg,ag,ig,ng,Ag,sg,cg,og,lg,ug,dg,hg;function fg(){var pg=Math.max((ng||Cg)/Cg,(Ag||rg)/rg);pg>1&&(Cg*=pg,rg*=pg)}function mg(){var pg=Math.min((ag||Cg)/Cg,(ig||rg)/rg);pg<1&&(Cg*=pg,rg*=pg)}if(eg&&(L=y.getTransformedOptions(V,L,z),og=L.left||0,lg=L.top||0,L.sourceWidth?(sg=L.sourceWidth,L.right!==void 0&&L.left===void 0&&(og=Ig-sg-L.right)):sg=Ig-og-(L.right||0),L.sourceHeight?(cg=L.sourceHeight,L.bottom!==void 0&&L.top===void 0&&(lg=tg-cg-L.bottom)):cg=tg-lg-(L.bottom||0),Cg=sg,rg=cg),ag=L.maxWidth,ig=L.maxHeight,ng=L.minWidth,Ag=L.minHeight,eg&&ag&&ig&&L.crop?(Cg=ag,rg=ig,hg=sg/cg-ag/ig,hg<0?(cg=ig*sg/ag,L.top===void 0&&L.bottom===void 0&&(lg=(tg-cg)/2)):hg>0&&(sg=ag*cg/ig,L.left===void 0&&L.right===void 0&&(og=(Ig-sg)/2))):((L.contain||L.cover)&&(ng=ag=ag||ng,Ag=ig=ig||Ag),L.cover?(mg(),fg()):(fg(),mg())),eg){if(ug=L.pixelRatio,ug>1&&(gg.style.width=Cg+"px",gg.style.height=rg+"px",Cg*=ug,rg*=ug,gg.getContext("2d").scale(ug,ug)),dg=L.downsamplingRatio,dg>0&&dg<1&&Cg<sg&&rg<cg)for(;sg*dg>Cg;)gg.width=sg*dg,gg.height=cg*dg,y.renderImageToCanvas(gg,V,og,lg,sg,cg,0,0,gg.width,gg.height,L),og=0,lg=0,sg=gg.width,cg=gg.height,V=document.createElement("canvas"),V.width=sg,V.height=cg,y.renderImageToCanvas(V,gg,0,0,sg,cg,0,0,sg,cg,L);return gg.width=Cg,gg.height=rg,y.transformCoordinates(gg,L),y.renderImageToCanvas(gg,V,og,lg,sg,cg,0,0,Cg,rg,L)}return V.width=Cg,V.height=rg,V}})})(loadImageScale);var loadImageScaleExports=loadImageScale.exports,loadImageMeta={exports:{}};(function(r){(function(y){r.exports?y(loadImageExports):y(window.loadImage)})(function(y){var n=typeof Blob<"u"&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice);y.blobSlice=n&&function(){var L=this.slice||this.webkitSlice||this.mozSlice;return L.apply(this,arguments)},y.metaDataParsers={jpeg:{65505:[],65517:[]}},y.parseMetaData=function(L,z,gg,eg){gg=gg||{},eg=eg||{};var Ig=this,tg=gg.maxMetaDataSize||262144,Cg=!(typeof DataView<"u"&&L&&L.size>=12&&L.type==="image/jpeg"&&y.blobSlice);(Cg||!y.readFile(y.blobSlice.call(L,0,tg),function(rg){if(rg.target.error){console.log(rg.target.error),z(eg);return}var ag=rg.target.result,ig=new DataView(ag),ng=2,Ag=ig.byteLength-4,sg=ng,cg,og,lg,ug;if(ig.getUint16(0)===65496){for(;ng<Ag&&(cg=ig.getUint16(ng),cg>=65504&&cg<=65519||cg===65534);){if(og=ig.getUint16(ng+2)+2,ng+og>ig.byteLength){console.log("Invalid meta data: Invalid segment size.");break}if(lg=y.metaDataParsers.jpeg[cg],lg&&!gg.disableMetaDataParsers)for(ug=0;ug<lg.length;ug+=1)lg[ug].call(Ig,ig,ng,og,eg,gg);ng+=og,sg=ng}!gg.disableImageHead&&sg>6&&(ag.slice?eg.imageHead=ag.slice(0,sg):eg.imageHead=new Uint8Array(ag).subarray(0,sg))}else console.log("Invalid JPEG file: Missing JPEG marker.");z(eg)},"readAsArrayBuffer"))&&z(eg)},y.replaceHead=function(L,z,gg){y.parseMetaData(L,function(eg){gg(new Blob([z,y.blobSlice.call(L,eg.imageHead.byteLength)],{type:"image/jpeg"}))},{maxMetaDataSize:256,disableMetaDataParsers:!0})};var V=y.transform;y.transform=function(L,z,gg,eg,Ig){y.hasMetaOption(z)?y.parseMetaData(eg,function(tg){V.call(y,L,z,gg,eg,tg)},z,Ig):V.apply(y,arguments)}})})(loadImageMeta);var loadImageMetaExports=loadImageMeta.exports,loadImageFetch={exports:{}};(function(r){(function(y){r.exports?y(loadImageExports):y(window.loadImage)})(function(y){typeof fetch<"u"&&typeof Request<"u"?y.fetchBlob=function(n,V,L){fetch(new Request(n,L)).then(function(z){return z.blob()}).then(V).catch(function(z){V(null,z)})}:typeof XMLHttpRequest<"u"&&typeof ProgressEvent<"u"&&(y.fetchBlob=function(n,V,L){L=L||{};var z=new XMLHttpRequest;z.open(L.method||"GET",n),L.headers&&Object.keys(L.headers).forEach(function(gg){z.setRequestHeader(gg,L.headers[gg])}),z.withCredentials=L.credentials==="include",z.responseType="blob",z.onload=function(){V(z.response)},z.onerror=z.onabort=z.ontimeout=function(gg){V(null,gg)},z.send(L.body)})})})(loadImageFetch);var loadImageExif={exports:{}};(function(r){(function(y){r.exports?y(loadImageExports,loadImageMetaExports):y(window.loadImage)})(function(y){function n(Ig){Ig&&(Object.defineProperty(this,"map",{value:this.privateIFDs[Ig].map}),Object.defineProperty(this,"tags",{value:this.tags&&this.tags[Ig]||{}}))}n.prototype.map={Orientation:274,Thumbnail:513,Exif:34665,GPSInfo:34853,Interoperability:40965},n.prototype.privateIFDs={34665:{name:"Exif",map:{}},34853:{name:"GPSInfo",map:{}},40965:{name:"Interoperability",map:{}}},n.prototype.get=function(Ig){return this[Ig]||this[this.map[Ig]]};function V(Ig,tg,Cg){if(!Cg||tg+Cg>Ig.byteLength){console.log("Invalid Exif data: Invalid thumbnail data.");return}return new Blob([Ig.buffer.slice(tg,tg+Cg)],{type:"image/jpeg"})}var L={1:{getValue:function(Ig,tg){return Ig.getUint8(tg)},size:1},2:{getValue:function(Ig,tg){return String.fromCharCode(Ig.getUint8(tg))},size:1,ascii:!0},3:{getValue:function(Ig,tg,Cg){return Ig.getUint16(tg,Cg)},size:2},4:{getValue:function(Ig,tg,Cg){return Ig.getUint32(tg,Cg)},size:4},5:{getValue:function(Ig,tg,Cg){return Ig.getUint32(tg,Cg)/Ig.getUint32(tg+4,Cg)},size:8},9:{getValue:function(Ig,tg,Cg){return Ig.getInt32(tg,Cg)},size:4},10:{getValue:function(Ig,tg,Cg){return Ig.getInt32(tg,Cg)/Ig.getInt32(tg+4,Cg)},size:8}};L[7]=L[1];function z(Ig,tg,Cg,rg,ag,ig){var ng=L[rg],Ag,sg,cg,og,lg,ug;if(!ng){console.log("Invalid Exif data: Invalid tag type.");return}if(Ag=ng.size*ag,sg=Ag>4?tg+Ig.getUint32(Cg+8,ig):Cg+8,sg+Ag>Ig.byteLength){console.log("Invalid Exif data: Invalid data offset.");return}if(ag===1)return ng.getValue(Ig,sg,ig);for(cg=[],og=0;og<ag;og+=1)cg[og]=ng.getValue(Ig,sg+og*ng.size,ig);if(ng.ascii){for(lg="",og=0;og<cg.length&&(ug=cg[og],ug!=="\0");og+=1)lg+=ug;return lg}return cg}function gg(Ig,tg,Cg,rg,ag,ig,ng,Ag){var sg,cg,og,lg,ug,dg;if(Cg+6>Ig.byteLength){console.log("Invalid Exif data: Invalid directory offset.");return}if(sg=Ig.getUint16(Cg,rg),cg=Cg+2+12*sg,cg+4>Ig.byteLength){console.log("Invalid Exif data: Invalid directory size.");return}for(og=0;og<sg;og+=1)lg=Cg+2+12*og,ug=Ig.getUint16(lg,rg),!(ng&&!ng[ug])&&(Ag&&Ag[ug]===!0||(dg=z(Ig,tg,lg,Ig.getUint16(lg+2,rg),Ig.getUint32(lg+4,rg),rg),ag[ug]=dg,ig&&(ig[ug]=lg)));return Ig.getUint32(cg,rg)}function eg(Ig,tg,Cg,rg,ag,ig,ng){var Ag=Ig.exif[tg];Ag&&(Ig.exif[tg]=new n(tg),Ig.exifOffsets&&(Ig.exifOffsets[tg]=new n(tg)),gg(Cg,rg,rg+Ag,ag,Ig.exif[tg],Ig.exifOffsets&&Ig.exifOffsets[tg],ig&&ig[tg],ng&&ng[tg]))}y.parseExifData=function(Ig,tg,Cg,rg,ag){if(!ag.disableExif){var ig=ag.includeExifTags,ng=ag.excludeExifTags||{34665:{37500:!0}},Ag=tg+10,sg,cg,og;if(Ig.getUint32(tg+4)===1165519206){if(Ag+8>Ig.byteLength){console.log("Invalid Exif data: Invalid segment size.");return}if(Ig.getUint16(tg+8)!==0){console.log("Invalid Exif data: Missing byte alignment offset.");return}switch(Ig.getUint16(Ag)){case 18761:sg=!0;break;case 19789:sg=!1;break;default:console.log("Invalid Exif data: Invalid byte alignment marker.");return}if(Ig.getUint16(Ag+2,sg)!==42){console.log("Invalid Exif data: Missing TIFF marker.");return}cg=Ig.getUint32(Ag+4,sg),rg.exif=new n,ag.disableExifOffsets||(rg.exifOffsets=new n,rg.exifTiffOffset=Ag,rg.exifLittleEndian=sg),cg=gg(Ig,Ag,Ag+cg,sg,rg.exif,rg.exifOffsets,ig,ng),cg&&!ag.disableExifThumbnail&&(cg=gg(Ig,Ag,Ag+cg,sg,rg.exif,rg.exifOffsets,ig,ng),rg.exif[513]&&rg.exif[514]&&(rg.exif[513]=V(Ig,Ag+rg.exif[513],rg.exif[514]))),og=Object.keys(rg.exif.privateIFDs),og.forEach(function(lg){eg(rg,lg,Ig,Ag,sg,ig,ng)})}}},y.metaDataParsers.jpeg[65505].push(y.parseExifData),y.exifWriters={274:function(Ig,tg,Cg){var rg=new DataView(Ig,tg.exifOffsets[274]+8,2);return rg.setUint16(0,Cg,tg.exifLittleEndian),Ig}},y.writeExifData=function(Ig,tg,Cg,rg){y.exifWriters[tg.exif.map[Cg]](Ig,tg,rg)},y.ExifMap=n})})(loadImageExif);var loadImageExifExports=loadImageExif.exports,loadImageExifMap={exports:{}};(function(r){(function(y){r.exports?y(loadImageExports,loadImageExifExports):y(window.loadImage)})(function(y){var n=y.ExifMap.prototype;n.tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright",34665:{36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",42240:"Gamma",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"PhotographicSensitivity",34856:"OECF",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:"LensSpecification",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber"},34853:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"},40965:{1:"InteroperabilityIndex"}},n.stringValues={ExposureProgram:{0:"Undefined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Undefined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},ComponentsConfiguration:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"},Orientation:{1:"top-left",2:"top-right",3:"bottom-right",4:"bottom-left",5:"left-top",6:"right-top",7:"right-bottom",8:"left-bottom"}},n.getText=function(V){var L=this.get(V);switch(V){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":case"Orientation":return this.stringValues[V][L];case"ExifVersion":case"FlashpixVersion":return L?String.fromCharCode(L[0],L[1],L[2],L[3]):void 0;case"ComponentsConfiguration":return L?this.stringValues[V][L[0]]+this.stringValues[V][L[1]]+this.stringValues[V][L[2]]+this.stringValues[V][L[3]]:void 0;case"GPSVersionID":return L?L[0]+"."+L[1]+"."+L[2]+"."+L[3]:void 0}return String(L)},n.getAll=function(){var V={},L,z,gg;for(L in this)Object.prototype.hasOwnProperty.call(this,L)&&(z=this[L],z&&z.getAll?V[this.privateIFDs[L].name]=z.getAll():(gg=this.tags[L],gg&&(V[gg]=this.getText(gg))));return V},n.getName=function(V){var L=this.tags[V];return typeof L=="object"?this.privateIFDs[V].name:L},function(){var V=n.tags,L,z,gg;for(L in V)if(Object.prototype.hasOwnProperty.call(V,L))if(z=n.privateIFDs[L],z){gg=V[L];for(L in gg)Object.prototype.hasOwnProperty.call(gg,L)&&(z.map[gg[L]]=Number(L))}else n.map[V[L]]=Number(L)}()})})(loadImageExifMap);var loadImageIptc={exports:{}};(function(r){(function(y){r.exports?y(loadImageExports,loadImageMetaExports):y(window.loadImage)})(function(y){function n(){}n.prototype.map={ObjectName:5},n.prototype.types={0:"Uint16",200:"Uint16",201:"Uint16",202:"binary"},n.prototype.get=function(tg){return this[tg]||this[this.map[tg]]};function V(tg,Cg,rg){for(var ag="",ig=Cg+rg,ng=Cg;ng<ig;ng+=1)ag+=String.fromCharCode(tg.getUint8(ng));return ag}function L(tg,Cg,rg,ag,ig){return Cg.types[tg]==="binary"?new Blob([rg.buffer.slice(ag,ag+ig)]):Cg.types[tg]==="Uint16"?rg.getUint16(ag):V(rg,ag,ig)}function z(tg,Cg){return tg===void 0?Cg:tg instanceof Array?(tg.push(Cg),tg):[tg,Cg]}function gg(tg,Cg,rg,ag,ig,ng){for(var Ag,sg,cg,og=Cg+rg,lg=Cg;lg<og;)tg.getUint8(lg)===28&&tg.getUint8(lg+1)===2&&(cg=tg.getUint8(lg+2),(!ig||ig[cg])&&(!ng||!ng[cg])&&(sg=tg.getInt16(lg+3),Ag=L(cg,ag.iptc,tg,lg+5,sg),ag.iptc[cg]=z(ag.iptc[cg],Ag),ag.iptcOffsets&&(ag.iptcOffsets[cg]=lg))),lg+=1}function eg(tg,Cg){return tg.getUint32(Cg)===943868237&&tg.getUint16(Cg+4)===1028}function Ig(tg,Cg){var rg=tg.getUint8(Cg+7);return rg%2!==0&&(rg+=1),rg===0&&(rg=4),rg}y.parseIptcData=function(tg,Cg,rg,ag,ig){if(!ig.disableIptc)for(var ng=Cg+rg;Cg+8<ng;){if(eg(tg,Cg)){var Ag=Ig(tg,Cg),sg=Cg+8+Ag;if(sg>ng){console.log("Invalid IPTC data: Invalid segment offset.");break}var cg=tg.getUint16(Cg+6+Ag);if(Cg+cg>ng){console.log("Invalid IPTC data: Invalid segment size.");break}ag.iptc=new n,ig.disableIptcOffsets||(ag.iptcOffsets=new n),gg(tg,sg,cg,ag,ig.includeIptcTags,ig.excludeIptcTags||{202:!0});return}Cg+=1}},y.metaDataParsers.jpeg[65517].push(y.parseIptcData),y.IptcMap=n})})(loadImageIptc);var loadImageIptcExports=loadImageIptc.exports,loadImageIptcMap={exports:{}};(function(r){(function(y){r.exports?y(loadImageExports,loadImageIptcExports):y(window.loadImage)})(function(y){var n=y.IptcMap.prototype;n.tags={0:"ApplicationRecordVersion",3:"ObjectTypeReference",4:"ObjectAttributeReference",5:"ObjectName",7:"EditStatus",8:"EditorialUpdate",10:"Urgency",12:"SubjectReference",15:"Category",20:"SupplementalCategories",22:"FixtureIdentifier",25:"Keywords",26:"ContentLocationCode",27:"ContentLocationName",30:"ReleaseDate",35:"ReleaseTime",37:"ExpirationDate",38:"ExpirationTime",40:"SpecialInstructions",42:"ActionAdvised",45:"ReferenceService",47:"ReferenceDate",50:"ReferenceNumber",55:"DateCreated",60:"TimeCreated",62:"DigitalCreationDate",63:"DigitalCreationTime",65:"OriginatingProgram",70:"ProgramVersion",75:"ObjectCycle",80:"Byline",85:"BylineTitle",90:"City",92:"Sublocation",95:"State",100:"CountryCode",101:"Country",103:"OriginalTransmissionReference",105:"Headline",110:"Credit",115:"Source",116:"CopyrightNotice",118:"Contact",120:"Caption",121:"LocalCaption",122:"Writer",125:"RasterizedCaption",130:"ImageType",131:"ImageOrientation",135:"LanguageIdentifier",150:"AudioType",151:"AudioSamplingRate",152:"AudioSamplingResolution",153:"AudioDuration",154:"AudioOutcue",184:"JobID",185:"MasterDocumentID",186:"ShortDocumentID",187:"UniqueDocumentID",188:"OwnerID",200:"ObjectPreviewFileFormat",201:"ObjectPreviewFileVersion",202:"ObjectPreviewData",221:"Prefs",225:"ClassifyState",228:"SimilarityIndex",230:"DocumentNotes",231:"DocumentHistory",232:"ExifCameraInfo",255:"CatalogSets"},n.stringValues={10:{0:"0 (reserved)",1:"1 (most urgent)",2:"2",3:"3",4:"4",5:"5 (normal urgency)",6:"6",7:"7",8:"8 (least urgent)",9:"9 (user-defined priority)"},75:{a:"Morning",b:"Both Morning and Evening",p:"Evening"},131:{L:"Landscape",P:"Portrait",S:"Square"}},n.getText=function(V){var L=this.get(V),z=this.map[V],gg=this.stringValues[z];return gg?gg[L]:String(L)},n.getAll=function(){var V={},L,z;for(L in this)Object.prototype.hasOwnProperty.call(this,L)&&(z=this.tags[L],z&&(V[z]=this.getText(z)));return V},n.getName=function(V){return this.tags[V]},function(){var V=n.tags,L=n.map||{},z;for(z in V)Object.prototype.hasOwnProperty.call(V,z)&&(L[V[z]]=Number(z))}()})})(loadImageIptcMap);var loadImageOrientation={exports:{}};(function(r){(function(y){r.exports?y(loadImageExports,loadImageScaleExports,loadImageMetaExports):y(window.loadImage)})(function(y){var n=y.hasCanvasOption,V=y.hasMetaOption,L=y.transformCoordinates,z=y.getTransformedOptions;(function(){var gg="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==",eg=document.createElement("img");eg.onload=function(){y.orientation=eg.width===1&&eg.height===2},eg.src=gg})(),y.hasCanvasOption=function(gg){return!!gg.orientation&&!y.orientation||gg.orientation>1&&gg.orientation<9||n.call(y,gg)},y.hasMetaOption=function(gg){return gg&&gg.orientation===!0&&!y.orientation||V.call(y,gg)},y.transformCoordinates=function(gg,eg){L.call(y,gg,eg);var Ig=gg.getContext("2d"),tg=gg.width,Cg=gg.height,rg=gg.style.width,ag=gg.style.height,ig=eg.orientation;if(ig>1&&ig<9)switch(ig>4&&(gg.width=Cg,gg.height=tg,gg.style.width=ag,gg.style.height=rg),ig){case 2:Ig.translate(tg,0),Ig.scale(-1,1);break;case 3:Ig.translate(tg,Cg),Ig.rotate(Math.PI);break;case 4:Ig.translate(0,Cg),Ig.scale(1,-1);break;case 5:Ig.rotate(.5*Math.PI),Ig.scale(1,-1);break;case 6:Ig.rotate(.5*Math.PI),Ig.translate(0,-Cg);break;case 7:Ig.rotate(.5*Math.PI),Ig.translate(tg,-Cg),Ig.scale(-1,1);break;case 8:Ig.rotate(-.5*Math.PI),Ig.translate(-tg,0);break}},y.getTransformedOptions=function(gg,eg,Ig){var tg=z.call(y,gg,eg),Cg=tg.orientation,rg,ag;if(Cg===!0){if(y.orientation)return tg;Cg=Ig&&Ig.exif&&Ig.exif.get("Orientation")}if(!(Cg>1&&Cg<9))return tg;rg={};for(ag in tg)Object.prototype.hasOwnProperty.call(tg,ag)&&(rg[ag]=tg[ag]);switch(rg.orientation=Cg,Cg){case 2:rg.left=tg.right,rg.right=tg.left;break;case 3:rg.left=tg.right,rg.top=tg.bottom,rg.right=tg.left,rg.bottom=tg.top;break;case 4:rg.top=tg.bottom,rg.bottom=tg.top;break;case 5:rg.left=tg.top,rg.top=tg.left,rg.right=tg.bottom,rg.bottom=tg.right;break;case 6:rg.left=tg.top,rg.top=tg.right,rg.right=tg.bottom,rg.bottom=tg.left;break;case 7:rg.left=tg.bottom,rg.top=tg.right,rg.right=tg.top,rg.bottom=tg.left;break;case 8:rg.left=tg.bottom,rg.top=tg.left,rg.right=tg.top,rg.bottom=tg.right;break}return rg.orientation>4&&(rg.maxWidth=tg.maxHeight,rg.maxHeight=tg.maxWidth,rg.minWidth=tg.minHeight,rg.minHeight=tg.minWidth,rg.sourceWidth=tg.sourceHeight,rg.sourceHeight=tg.sourceWidth),rg}})})(loadImageOrientation);var js=loadImageExports;const resolveURL=resolveUrlExports,blueimpLoadImage=js,readFromBlobOrFile=r=>new Promise((y,n)=>{const V=new FileReader;V.onload=()=>{y(V.result)},V.onerror=({target:{error:{code:L}}})=>{n(Error(`File could not be read! Code=${L}`))},V.readAsArrayBuffer(r)}),fixOrientationFromUrlOrBlobOrFile=r=>new Promise(y=>{blueimpLoadImage(r,n=>n.toBlob(y),{orientation:!0,canvas:!0})}),loadImage$2=async r=>{let y=r;if(typeof r>"u")return"undefined";if(typeof r=="string")if(r.endsWith(".pbm"))y=await(await fetch(resolveURL(r))).arrayBuffer();else{let n=r;/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(r)||(n=resolveURL(r)),y=await readFromBlobOrFile(await fixOrientationFromUrlOrBlobOrFile(n))}else if(r instanceof HTMLElement)r.tagName==="IMG"&&(y=await loadImage$2(r.src)),r.tagName==="VIDEO"&&(y=await loadImage$2(r.poster)),r.tagName==="CANVAS"&&await new Promise(n=>{r.toBlob(async V=>{y=await readFromBlobOrFile(V),n()})});else if(r instanceof File||r instanceof Blob){let n=r;r.name.endsWith(".pbm")||(n=await fixOrientationFromUrlOrBlobOrFile(n)),y=await readFromBlobOrFile(n)}return new Uint8Array(y)};var loadImage_1=loadImage$2;const defaultOptions$1=defaultOptions_1,spawnWorker$1=spawnWorker$2,terminateWorker$1=terminateWorker$2,onMessage$1=onMessage$2,send$1=send$2,loadImage$1=loadImage_1;var browser={defaultOptions:defaultOptions$1,spawnWorker:spawnWorker$1,terminateWorker:terminateWorker$1,onMessage:onMessage$1,send:send$1,loadImage:loadImage$1};const resolvePaths=resolvePaths$1,circularize=circularize$1,createJob=createJob$2,{log}=log$2,getId=getId$3,{defaultOEM}=config,{defaultOptions,spawnWorker,terminateWorker,onMessage,loadImage,send}=browser;let workerCounter=0;var createWorker$2=(r={})=>{const y=getId("Worker",workerCounter),{logger:n,errorHandler:V,...L}=resolvePaths({...defaultOptions,...r}),z={},gg={};let eg=spawnWorker(L);workerCounter+=1;const Ig=(fg,mg)=>{z[fg]=mg},tg=(fg,mg)=>{gg[fg]=mg},Cg=({id:fg,action:mg,payload:pg})=>new Promise((bg,vg)=>{log(`[${y}]: Start ${fg}, action=${mg}`),Ig(mg,bg),tg(mg,vg),send(eg,{workerId:y,jobId:fg,action:mg,payload:pg})}),rg=fg=>Cg(createJob({id:fg,action:"load",payload:{options:L}})),ag=(fg,mg,pg)=>Cg(createJob({id:pg,action:"FS",payload:{method:"writeFile",args:[fg,mg]}})),ig=(fg,mg)=>Cg(createJob({id:mg,action:"FS",payload:{method:"readFile",args:[fg,{encoding:"utf8"}]}})),ng=(fg,mg)=>Cg(createJob({id:mg,action:"FS",payload:{method:"unlink",args:[fg]}})),Ag=(fg,mg,pg)=>Cg(createJob({id:pg,action:"FS",payload:{method:fg,args:mg}})),sg=(fg="eng",mg)=>Cg(createJob({id:mg,action:"loadLanguage",payload:{langs:fg,options:L}})),cg=(fg="eng",mg=defaultOEM,pg)=>Cg(createJob({id:pg,action:"initialize",payload:{langs:fg,oem:mg}})),og=(fg={},mg)=>Cg(createJob({id:mg,action:"setParameters",payload:{params:fg}})),lg=async(fg,mg={},pg)=>Cg(createJob({id:pg,action:"recognize",payload:{image:await loadImage(fg),options:mg}})),ug=(fg="Tesseract OCR Result",mg=!1,pg)=>Cg(createJob({id:pg,action:"getPDF",payload:{title:fg,textonly:mg}})),dg=async(fg,mg)=>Cg(createJob({id:mg,action:"detect",payload:{image:await loadImage(fg)}})),hg=async()=>(eg!==null&&(terminateWorker(eg),eg=null),Promise.resolve());return onMessage(eg,({workerId:fg,jobId:mg,status:pg,action:bg,data:vg})=>{if(pg==="resolve"){log(`[${fg}]: Complete ${mg}`);let Vg=vg;bg==="recognize"?Vg=circularize(vg):bg==="getPDF"&&(Vg=Array.from({...vg,length:Object.keys(vg).length})),z[bg]({jobId:mg,data:Vg})}else if(pg==="reject")if(gg[bg](vg),V)V(vg);else throw Error(vg);else pg==="progress"&&n({...vg,userJobId:mg})}),{id:y,worker:eg,setResolve:Ig,setReject:tg,load:rg,writeText:ag,readText:ig,removeFile:ng,FS:Ag,loadLanguage:sg,initialize:cg,setParameters:og,recognize:lg,getPDF:ug,detect:dg,terminate:hg}};const createWorker$1=createWorker$2,recognize=async(r,y,n)=>{const V=createWorker$1(n);return await V.load(),await V.loadLanguage(y),await V.initialize(y),V.recognize(r).finally(async()=>{await V.terminate()})},detect=async(r,y)=>{const n=createWorker$1(y);return await n.load(),await n.loadLanguage("osd"),await n.initialize("osd"),n.detect(r).finally(async()=>{await n.terminate()})};var Tesseract$1={recognize,detect},languages$1={AFR:"afr",AMH:"amh",ARA:"ara",ASM:"asm",AZE:"aze",AZE_CYRL:"aze_cyrl",BEL:"bel",BEN:"ben",BOD:"bod",BOS:"bos",BUL:"bul",CAT:"cat",CEB:"ceb",CES:"ces",CHI_SIM:"chi_sim",CHI_TRA:"chi_tra",CHR:"chr",CYM:"cym",DAN:"dan",DEU:"deu",DZO:"dzo",ELL:"ell",ENG:"eng",ENM:"enm",EPO:"epo",EST:"est",EUS:"eus",FAS:"fas",FIN:"fin",FRA:"fra",FRK:"frk",FRM:"frm",GLE:"gle",GLG:"glg",GRC:"grc",GUJ:"guj",HAT:"hat",HEB:"heb",HIN:"hin",HRV:"hrv",HUN:"hun",IKU:"iku",IND:"ind",ISL:"isl",ITA:"ita",ITA_OLD:"ita_old",JAV:"jav",JPN:"jpn",KAN:"kan",KAT:"kat",KAT_OLD:"kat_old",KAZ:"kaz",KHM:"khm",KIR:"kir",KOR:"kor",KUR:"kur",LAO:"lao",LAT:"lat",LAV:"lav",LIT:"lit",MAL:"mal",MAR:"mar",MKD:"mkd",MLT:"mlt",MSA:"msa",MYA:"mya",NEP:"nep",NLD:"nld",NOR:"nor",ORI:"ori",PAN:"pan",POL:"pol",POR:"por",PUS:"pus",RON:"ron",RUS:"rus",SAN:"san",SIN:"sin",SLK:"slk",SLV:"slv",SPA:"spa",SPA_OLD:"spa_old",SQI:"sqi",SRP:"srp",SRP_LATN:"srp_latn",SWA:"swa",SWE:"swe",SYR:"syr",TAM:"tam",TEL:"tel",TGK:"tgk",TGL:"tgl",THA:"tha",TIR:"tir",TUR:"tur",UIG:"uig",UKR:"ukr",URD:"urd",UZB:"uzb",UZB_CYRL:"uzb_cyrl",VIE:"vie",YID:"yid"},PSM$1={OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",CIRCLE_WORD:"9",SINGLE_CHAR:"10",SPARSE_TEXT:"11",SPARSE_TEXT_OSD:"12"};const createScheduler=createScheduler$1,createWorker=createWorker$2,Tesseract=Tesseract$1,languages=languages$1,OEM=OEM$2,PSM=PSM$1,{setLogging}=log$2;var src={languages,OEM,PSM,createScheduler,createWorker,setLogging,...Tesseract};const _hoisted_1$1={id:"app"},_hoisted_2$1=["src"],_sfc_main$1=Object.assign({name:"QsyxImgToText"},{__name:"index",props:{src:String},emits:["getText"],setup(r,{emit:y}){const n=y,V=r,L=vue.ref(null),z=src.createWorker({}),gg=async()=>{if(L.value){if(await z.load(),await z.loadLanguage("chi_sim+eng"),await z.initialize("chi_sim+eng",src.OEM.LSTM_ONLY),await z.setParameters({tessedit_pageseg_mode:src.PSM.SINGLE_BLOCK}),V.src.includes("http://")){const{data:{text:eg}}=await z.recognize(V.src)}else{const{data:{text:eg}}=await z.recognize(L.value)}n("getText",text),console.log("识别结果:",text)}};return vue.onMounted(()=>{gg()}),vue.onUnmounted(async()=>{await z.terminate()}),(eg,Ig)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$1,[vue.createElementVNode("img",{ref_key:"imageRef",ref:L,alt:"Vue logo",src:r.src},null,8,_hoisted_2$1)]))}}),QsyxImgToText=withInstall$1(_sfc_main$1);var exceljs_min={exports:{}};/*! ExcelJS 21-08-2021 */(function(r,y){(function(n){r.exports=n()})(function(){return function n(V,L,z){function gg(tg,Cg){if(!L[tg]){if(!V[tg]){var rg=typeof commonjsRequire=="function"&&commonjsRequire;if(!Cg&&rg)return rg(tg,!0);if(eg)return eg(tg,!0);var ag=new Error("Cannot find module '"+tg+"'");throw ag.code="MODULE_NOT_FOUND",ag}var ig=L[tg]={exports:{}};V[tg][0].call(ig.exports,function(ng){return gg(V[tg][1][ng]||ng)},ig,ig.exports,n,V,L,z)}return L[tg].exports}for(var eg=typeof commonjsRequire=="function"&&commonjsRequire,Ig=0;Ig<z.length;Ig++)gg(z[Ig]);return gg}({1:[function(n,V,L){function z(og){return(z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lg){return typeof lg}:function(lg){return lg&&typeof Symbol=="function"&&lg.constructor===Symbol&&lg!==Symbol.prototype?"symbol":typeof lg})(og)}function gg(og,lg,ug,dg,hg,fg,mg){try{var pg=og[fg](mg),bg=pg.value}catch(vg){return void ug(vg)}pg.done?lg(bg):Promise.resolve(bg).then(dg,hg)}function eg(og){return function(){var lg=this,ug=arguments;return new Promise(function(dg,hg){var fg=og.apply(lg,ug);function mg(bg){gg(fg,dg,hg,mg,pg,"next",bg)}function pg(bg){gg(fg,dg,hg,mg,pg,"throw",bg)}mg(void 0)})}}function Ig(og,lg){for(var ug=0;ug<lg.length;ug++){var dg=lg[ug];dg.enumerable=dg.enumerable||!1,dg.configurable=!0,"value"in dg&&(dg.writable=!0),Object.defineProperty(og,dg.key,dg)}}var tg=n("fs"),Cg=n("fast-csv"),rg=n("dayjs/plugin/customParseFormat"),ag=n("dayjs/plugin/utc"),ig=n("dayjs").extend(rg).extend(ag),ng=n("../utils/stream-buf"),Ag=n("../utils/utils").fs.exists,sg={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}},cg=function(){function og(fg){(function(mg,pg){if(!(mg instanceof pg))throw new TypeError("Cannot call a class as a function")})(this,og),this.workbook=fg,this.worksheet=null}var lg,ug,dg,hg;return lg=og,(ug=[{key:"readFile",value:(hg=eg(regeneratorRuntime.mark(function fg(mg,pg){var bg,vg;return regeneratorRuntime.wrap(function(Vg){for(;;)switch(Vg.prev=Vg.next){case 0:return pg=pg||{},Vg.next=3,Ag(mg);case 3:if(Vg.sent){Vg.next=5;break}throw new Error("File not found: ".concat(mg));case 5:return bg=tg.createReadStream(mg),Vg.next=8,this.read(bg,pg);case 8:return vg=Vg.sent,bg.close(),Vg.abrupt("return",vg);case 11:case"end":return Vg.stop()}},fg,this)})),function(fg,mg){return hg.apply(this,arguments)})},{key:"read",value:function(fg,mg){var pg=this;return mg=mg||{},new Promise(function(bg,vg){var Vg=pg.workbook.addWorksheet(mg.sheetName),wg=mg.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],yg=mg.map||function(Wg){if(Wg==="")return null;var Bg=Number(Wg);if(!Number.isNaN(Bg)&&Bg!==1/0)return Bg;var Gg=wg.reduce(function(Xg,Sg){if(Xg)return Xg;var Ng=ig(Wg,Sg,!0);return Ng.isValid()?Ng:null},null);if(Gg)return new Date(Gg.valueOf());var Rg=sg[Wg];return Rg!==void 0?Rg:Wg},Zg=Cg.parse(mg.parserOptions).on("data",function(Wg){Vg.addRow(Wg.map(yg))}).on("end",function(){Zg.emit("worksheet",Vg)});Zg.on("worksheet",bg).on("error",vg),fg.pipe(Zg)})}},{key:"createInputStream",value:function(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}},{key:"write",value:function(fg,mg){var pg=this;return new Promise(function(bg,vg){mg=mg||{};var Vg=pg.workbook.getWorksheet(mg.sheetName||mg.sheetId),wg=Cg.format(mg.formatterOptions);fg.on("finish",function(){bg()}),wg.on("error",vg),wg.pipe(fg);var yg=mg,Zg=yg.dateFormat,Wg=yg.dateUTC,Bg=mg.map||function(Xg){if(Xg){if(Xg.text||Xg.hyperlink)return Xg.hyperlink||Xg.text||"";if(Xg.formula||Xg.result)return Xg.result||"";if(Xg instanceof Date)return Zg?Wg?ig.utc(Xg).format(Zg):ig(Xg).format(Zg):Wg?ig.utc(Xg).format():ig(Xg).format();if(Xg.error)return Xg.error;if(z(Xg)==="object")return JSON.stringify(Xg)}return Xg},Gg=mg.includeEmptyRows===void 0||mg.includeEmptyRows,Rg=1;Vg&&Vg.eachRow(function(Xg,Sg){if(Gg)for(;Rg++<Sg-1;)wg.write([]);var Ng=Xg.values;Ng.shift(),wg.write(Ng.map(Bg)),Rg=Sg}),wg.end()})}},{key:"writeFile",value:function(fg,mg){var pg={encoding:(mg=mg||{}).encoding||"utf8"},bg=tg.createWriteStream(fg,pg);return this.write(bg,mg)}},{key:"writeBuffer",value:(dg=eg(regeneratorRuntime.mark(function fg(mg){var pg;return regeneratorRuntime.wrap(function(bg){for(;;)switch(bg.prev=bg.next){case 0:return pg=new ng,bg.next=3,this.write(pg,mg);case 3:return bg.abrupt("return",pg.read());case 4:case"end":return bg.stop()}},fg,this)})),function(fg){return dg.apply(this,arguments)})}])&&Ig(lg.prototype,ug),og}();V.exports=cg},{"../utils/stream-buf":23,"../utils/utils":26,dayjs:336,"dayjs/plugin/customParseFormat":337,"dayjs/plugin/utc":338,"fast-csv":369,fs:215}],2:[function(n,V,L){function z(tg,Cg){if(!(tg instanceof Cg))throw new TypeError("Cannot call a class as a function")}function gg(tg,Cg){for(var rg=0;rg<Cg.length;rg++){var ag=Cg[rg];ag.enumerable=ag.enumerable||!1,ag.configurable=!0,"value"in ag&&(ag.writable=!0),Object.defineProperty(tg,ag.key,ag)}}var eg=n("../utils/col-cache"),Ig=function(){function tg(ig,ng){var Ag=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(z(this,tg),ng)if(typeof ng=="string"){var sg=eg.decodeAddress(ng);this.nativeCol=sg.col+Ag,this.nativeColOff=0,this.nativeRow=sg.row+Ag,this.nativeRowOff=0}else ng.nativeCol!==void 0?(this.nativeCol=ng.nativeCol||0,this.nativeColOff=ng.nativeColOff||0,this.nativeRow=ng.nativeRow||0,this.nativeRowOff=ng.nativeRowOff||0):ng.col!==void 0?(this.col=ng.col+Ag,this.row=ng.row+Ag):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0;this.worksheet=ig}var Cg,rg,ag;return Cg=tg,ag=[{key:"asInstance",value:function(ig){return ig instanceof tg||ig==null?ig:new tg(ig)}}],(rg=[{key:"col",get:function(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth},set:function(ig){this.nativeCol=Math.floor(ig),this.nativeColOff=Math.floor((ig-this.nativeCol)*this.colWidth)}},{key:"row",get:function(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight},set:function(ig){this.nativeRow=Math.floor(ig),this.nativeRowOff=Math.floor((ig-this.nativeRow)*this.rowHeight)}},{key:"colWidth",get:function(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}},{key:"rowHeight",get:function(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}},{key:"model",get:function(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}},set:function(ig){this.nativeCol=ig.nativeCol,this.nativeColOff=ig.nativeColOff,this.nativeRow=ig.nativeRow,this.nativeRowOff=ig.nativeRowOff}}])&&gg(Cg.prototype,rg),ag&&gg(Cg,ag),tg}();V.exports=Ig},{"../utils/col-cache":19}],3:[function(n,V,L){function z(vg,Vg){if(!(vg instanceof Vg))throw new TypeError("Cannot call a class as a function")}function gg(vg,Vg){for(var wg=0;wg<Vg.length;wg++){var yg=Vg[wg];yg.enumerable=yg.enumerable||!1,yg.configurable=!0,"value"in yg&&(yg.writable=!0),Object.defineProperty(vg,yg.key,yg)}}function eg(vg,Vg,wg){return Vg&&gg(vg.prototype,Vg),vg}var Ig=n("../utils/col-cache"),tg=n("../utils/under-dash"),Cg=n("./enums"),rg=n("../utils/shared-formula").slideFormula,ag=n("./note"),ig=function(){function vg(Vg,wg,yg){if(z(this,vg),!Vg||!wg)throw new Error("A Cell needs a Row");this._row=Vg,this._column=wg,Ig.validateAddress(yg),this._address=yg,this._value=bg.create(vg.Types.Null,this),this.style=this._mergeStyle(Vg.style,wg.style,{}),this._mergeCount=0}return eg(vg,[{key:"destroy",value:function(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}},{key:"_mergeStyle",value:function(Vg,wg,yg){var Zg=Vg&&Vg.numFmt||wg&&wg.numFmt;Zg&&(yg.numFmt=Zg);var Wg=Vg&&Vg.font||wg&&wg.font;Wg&&(yg.font=Wg);var Bg=Vg&&Vg.alignment||wg&&wg.alignment;Bg&&(yg.alignment=Bg);var Gg=Vg&&Vg.border||wg&&wg.border;Gg&&(yg.border=Gg);var Rg=Vg&&Vg.fill||wg&&wg.fill;Rg&&(yg.fill=Rg);var Xg=Vg&&Vg.protection||wg&&wg.protection;return Xg&&(yg.protection=Xg),yg}},{key:"toCsvString",value:function(){return this._value.toCsvString()}},{key:"addMergeRef",value:function(){this._mergeCount++}},{key:"releaseMergeRef",value:function(){this._mergeCount--}},{key:"merge",value:function(Vg,wg){this._value.release(),this._value=bg.create(vg.Types.Merge,this,Vg),wg||(this.style=Vg.style)}},{key:"unmerge",value:function(){this.type===vg.Types.Merge&&(this._value.release(),this._value=bg.create(vg.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}},{key:"isMergedTo",value:function(Vg){return this._value.type===vg.Types.Merge&&this._value.isMergedTo(Vg)}},{key:"toString",value:function(){return this.text}},{key:"_upgradeToHyperlink",value:function(Vg){this.type===vg.Types.String&&(this._value=bg.create(vg.Types.Hyperlink,this,{text:this._value.value,hyperlink:Vg}))}},{key:"addName",value:function(Vg){this.workbook.definedNames.addEx(this.fullAddress,Vg)}},{key:"removeName",value:function(Vg){this.workbook.definedNames.removeEx(this.fullAddress,Vg)}},{key:"removeAllNames",value:function(){this.workbook.definedNames.removeAllNames(this.fullAddress)}},{key:"worksheet",get:function(){return this._row.worksheet}},{key:"workbook",get:function(){return this._row.worksheet.workbook}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(Vg){this.style.numFmt=Vg}},{key:"font",get:function(){return this.style.font},set:function(Vg){this.style.font=Vg}},{key:"alignment",get:function(){return this.style.alignment},set:function(Vg){this.style.alignment=Vg}},{key:"border",get:function(){return this.style.border},set:function(Vg){this.style.border=Vg}},{key:"fill",get:function(){return this.style.fill},set:function(Vg){this.style.fill=Vg}},{key:"protection",get:function(){return this.style.protection},set:function(Vg){this.style.protection=Vg}},{key:"address",get:function(){return this._address}},{key:"row",get:function(){return this._row.number}},{key:"col",get:function(){return this._column.number}},{key:"$col$row",get:function(){return"$".concat(this._column.letter,"$").concat(this.row)}},{key:"type",get:function(){return this._value.type}},{key:"effectiveType",get:function(){return this._value.effectiveType}},{key:"isMerged",get:function(){return this._mergeCount>0||this.type===vg.Types.Merge}},{key:"master",get:function(){return this.type===vg.Types.Merge?this._value.master:this}},{key:"isHyperlink",get:function(){return this._value.type===vg.Types.Hyperlink}},{key:"hyperlink",get:function(){return this._value.hyperlink}},{key:"value",get:function(){return this._value.value},set:function(Vg){this.type!==vg.Types.Merge?(this._value.release(),this._value=bg.create(bg.getType(Vg),this,Vg)):this._value.master.value=Vg}},{key:"note",get:function(){return this._comment&&this._comment.note},set:function(Vg){this._comment=new ag(Vg)}},{key:"text",get:function(){return this._value.toString()}},{key:"html",get:function(){return tg.escapeHtml(this.text)}},{key:"formula",get:function(){return this._value.formula}},{key:"result",get:function(){return this._value.result}},{key:"formulaType",get:function(){return this._value.formulaType}},{key:"fullAddress",get:function(){return{sheetName:this._row.worksheet.name,address:this.address,row:this.row,col:this.col}}},{key:"name",get:function(){return this.names[0]},set:function(Vg){this.names=[Vg]}},{key:"names",get:function(){return this.workbook.definedNames.getNamesEx(this.fullAddress)},set:function(Vg){var wg=this,yg=this.workbook.definedNames;yg.removeAllNames(this.fullAddress),Vg.forEach(function(Zg){yg.addEx(wg.fullAddress,Zg)})}},{key:"_dataValidations",get:function(){return this.worksheet.dataValidations}},{key:"dataValidation",get:function(){return this._dataValidations.find(this.address)},set:function(Vg){this._dataValidations.add(this.address,Vg)}},{key:"model",get:function(){var Vg=this._value.model;return Vg.style=this.style,this._comment&&(Vg.comment=this._comment.model),Vg},set:function(Vg){if(this._value.release(),this._value=bg.create(Vg.type,this),this._value.model=Vg,Vg.comment)switch(Vg.comment.type){case"note":this._comment=ag.fromModel(Vg.comment)}Vg.style?this.style=Vg.style:this.style={}}}]),vg}();ig.Types=Cg.ValueType;var ng=function(){function vg(Vg){z(this,vg),this.model={address:Vg.address,type:ig.Types.Null}}return eg(vg,[{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){}},{key:"toString",value:function(){return""}},{key:"value",get:function(){return null},set:function(Vg){}},{key:"type",get:function(){return ig.Types.Null}},{key:"effectiveType",get:function(){return ig.Types.Null}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),Ag=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.Number,value:wg}}return eg(vg,[{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(Vg){this.model.value=Vg}},{key:"type",get:function(){return ig.Types.Number}},{key:"effectiveType",get:function(){return ig.Types.Number}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),sg=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.String,value:wg}}return eg(vg,[{key:"toCsvString",value:function(){return'"'.concat(this.model.value.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}},{key:"value",get:function(){return this.model.value},set:function(Vg){this.model.value=Vg}},{key:"type",get:function(){return ig.Types.String}},{key:"effectiveType",get:function(){return ig.Types.String}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),cg=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.String,value:wg}}return eg(vg,[{key:"toString",value:function(){return this.model.value.richText.map(function(Vg){return Vg.text}).join("")}},{key:"toCsvString",value:function(){return'"'.concat(this.text.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"value",get:function(){return this.model.value},set:function(Vg){this.model.value=Vg}},{key:"type",get:function(){return ig.Types.RichText}},{key:"effectiveType",get:function(){return ig.Types.RichText}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),og=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.Date,value:wg}}return eg(vg,[{key:"toCsvString",value:function(){return this.model.value.toISOString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(Vg){this.model.value=Vg}},{key:"type",get:function(){return ig.Types.Date}},{key:"effectiveType",get:function(){return ig.Types.Date}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),lg=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.Hyperlink,text:wg?wg.text:void 0,hyperlink:wg?wg.hyperlink:void 0},wg&&wg.tooltip&&(this.model.tooltip=wg.tooltip)}return eg(vg,[{key:"toCsvString",value:function(){return this.model.hyperlink}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.text}},{key:"value",get:function(){var Vg={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(Vg.tooltip=this.model.tooltip),Vg},set:function(Vg){this.model={text:Vg.text,hyperlink:Vg.hyperlink},Vg.tooltip&&(this.model.tooltip=Vg.tooltip)}},{key:"text",get:function(){return this.model.text},set:function(Vg){this.model.text=Vg}},{key:"hyperlink",get:function(){return this.model.hyperlink},set:function(Vg){this.model.hyperlink=Vg}},{key:"type",get:function(){return ig.Types.Hyperlink}},{key:"effectiveType",get:function(){return ig.Types.Hyperlink}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),ug=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.Merge,master:wg?wg.address:void 0},this._master=wg,wg&&wg.addMergeRef()}return eg(vg,[{key:"isMergedTo",value:function(Vg){return Vg===this._master}},{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){this._master.releaseMergeRef()}},{key:"toString",value:function(){return this.value.toString()}},{key:"value",get:function(){return this._master.value},set:function(Vg){Vg instanceof ig?(this._master&&this._master.releaseMergeRef(),Vg.addMergeRef(),this._master=Vg):this._master.value=Vg}},{key:"master",get:function(){return this._master}},{key:"type",get:function(){return ig.Types.Merge}},{key:"effectiveType",get:function(){return this._master.effectiveType}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),dg=function(){function vg(Vg,wg){z(this,vg),this.cell=Vg,this.model={address:Vg.address,type:ig.Types.Formula,shareType:wg?wg.shareType:void 0,ref:wg?wg.ref:void 0,formula:wg?wg.formula:void 0,sharedFormula:wg?wg.sharedFormula:void 0,result:wg?wg.result:void 0}}return eg(vg,[{key:"_copyModel",value:function(Vg){var wg={},yg=function(Zg){var Wg=Vg[Zg];Wg&&(wg[Zg]=Wg)};return yg("formula"),yg("result"),yg("ref"),yg("shareType"),yg("sharedFormula"),wg}},{key:"validate",value:function(Vg){switch(bg.getType(Vg)){case ig.Types.Null:case ig.Types.String:case ig.Types.Number:case ig.Types.Date:break;case ig.Types.Hyperlink:case ig.Types.Formula:default:throw new Error("Cannot process that type of result value")}}},{key:"_getTranslatedFormula",value:function(){if(!this._translatedFormula&&this.model.sharedFormula){var Vg=this.cell.worksheet.findCell(this.model.sharedFormula);this._translatedFormula=Vg&&rg(Vg.formula,Vg.address,this.model.address)}return this._translatedFormula}},{key:"toCsvString",value:function(){return"".concat(this.model.result||"")}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.result?this.model.result.toString():""}},{key:"value",get:function(){return this._copyModel(this.model)},set:function(Vg){this.model=this._copyModel(Vg)}},{key:"dependencies",get:function(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}},{key:"formula",get:function(){return this.model.formula||this._getTranslatedFormula()},set:function(Vg){this.model.formula=Vg}},{key:"formulaType",get:function(){return this.model.formula?Cg.FormulaType.Master:this.model.sharedFormula?Cg.FormulaType.Shared:Cg.FormulaType.None}},{key:"result",get:function(){return this.model.result},set:function(Vg){this.model.result=Vg}},{key:"type",get:function(){return ig.Types.Formula}},{key:"effectiveType",get:function(){var Vg=this.model.result;return Vg==null?Cg.ValueType.Null:Vg instanceof String||typeof Vg=="string"?Cg.ValueType.String:typeof Vg=="number"?Cg.ValueType.Number:Vg instanceof Date?Cg.ValueType.Date:Vg.text&&Vg.hyperlink?Cg.ValueType.Hyperlink:Vg.formula?Cg.ValueType.Formula:Cg.ValueType.Null}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),hg=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.SharedString,value:wg}}return eg(vg,[{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(Vg){this.model.value=Vg}},{key:"type",get:function(){return ig.Types.SharedString}},{key:"effectiveType",get:function(){return ig.Types.SharedString}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),fg=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.Boolean,value:wg}}return eg(vg,[{key:"toCsvString",value:function(){return this.model.value?1:0}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(Vg){this.model.value=Vg}},{key:"type",get:function(){return ig.Types.Boolean}},{key:"effectiveType",get:function(){return ig.Types.Boolean}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),mg=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.Error,value:wg}}return eg(vg,[{key:"toCsvString",value:function(){return this.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.error.toString()}},{key:"value",get:function(){return this.model.value},set:function(Vg){this.model.value=Vg}},{key:"type",get:function(){return ig.Types.Error}},{key:"effectiveType",get:function(){return ig.Types.Error}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),pg=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.String,value:JSON.stringify(wg),rawValue:wg}}return eg(vg,[{key:"toCsvString",value:function(){return this.model.value}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}},{key:"value",get:function(){return this.model.rawValue},set:function(Vg){this.model.rawValue=Vg,this.model.value=JSON.stringify(Vg)}},{key:"type",get:function(){return ig.Types.String}},{key:"effectiveType",get:function(){return ig.Types.String}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),bg={getType:function(vg){return vg==null?ig.Types.Null:vg instanceof String||typeof vg=="string"?ig.Types.String:typeof vg=="number"?ig.Types.Number:typeof vg=="boolean"?ig.Types.Boolean:vg instanceof Date?ig.Types.Date:vg.text&&vg.hyperlink?ig.Types.Hyperlink:vg.formula||vg.sharedFormula?ig.Types.Formula:vg.richText?ig.Types.RichText:vg.sharedString?ig.Types.SharedString:vg.error?ig.Types.Error:ig.Types.JSON},types:[{t:ig.Types.Null,f:ng},{t:ig.Types.Number,f:Ag},{t:ig.Types.String,f:sg},{t:ig.Types.Date,f:og},{t:ig.Types.Hyperlink,f:lg},{t:ig.Types.Formula,f:dg},{t:ig.Types.Merge,f:ug},{t:ig.Types.JSON,f:pg},{t:ig.Types.SharedString,f:hg},{t:ig.Types.RichText,f:cg},{t:ig.Types.Boolean,f:fg},{t:ig.Types.Error,f:mg}].reduce(function(vg,Vg){return vg[Vg.t]=Vg.f,vg},[]),create:function(vg,Vg,wg){var yg=this.types[vg];if(!yg)throw new Error("Could not create Value of type ".concat(vg));return new yg(Vg,wg)}};V.exports=ig},{"../utils/col-cache":19,"../utils/shared-formula":22,"../utils/under-dash":25,"./enums":7,"./note":9}],4:[function(n,V,L){function z(Cg,rg){for(var ag=0;ag<rg.length;ag++){var ig=rg[ag];ig.enumerable=ig.enumerable||!1,ig.configurable=!0,"value"in ig&&(ig.writable=!0),Object.defineProperty(Cg,ig.key,ig)}}var gg=n("../utils/under-dash"),eg=n("./enums"),Ig=n("../utils/col-cache"),tg=function(){function Cg(ng,Ag,sg){(function(cg,og){if(!(cg instanceof og))throw new TypeError("Cannot call a class as a function")})(this,Cg),this._worksheet=ng,this._number=Ag,sg!==!1&&(this.defn=sg)}var rg,ag,ig;return rg=Cg,ig=[{key:"toModel",value:function(ng){var Ag=[],sg=null;return ng&&ng.forEach(function(cg,og){cg.isDefault?sg&&(sg=null):sg&&cg.equivalentTo(sg)?sg.max=og+1:(sg={min:og+1,max:og+1,width:cg.width!==void 0?cg.width:9,style:cg.style,isCustomWidth:cg.isCustomWidth,hidden:cg.hidden,outlineLevel:cg.outlineLevel,collapsed:cg.collapsed},Ag.push(sg))}),Ag.length?Ag:void 0}},{key:"fromModel",value:function(ng,Ag){Ag=Ag||[];for(var sg=[],cg=1,og=0;og<Ag.length;){for(var lg=Ag[og++];cg<lg.min;)sg.push(new Cg(ng,cg++));for(;cg<=lg.max;)sg.push(new Cg(ng,cg++,lg))}return sg.length?sg:null}}],(ag=[{key:"toString",value:function(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}},{key:"equivalentTo",value:function(ng){return this.width===ng.width&&this.hidden===ng.hidden&&this.outlineLevel===ng.outlineLevel&&gg.isEqual(this.style,ng.style)}},{key:"eachCell",value:function(ng,Ag){var sg=this.number;Ag||(Ag=ng,ng=null),this._worksheet.eachRow(ng,function(cg,og){Ag(cg.getCell(sg),og)})}},{key:"_applyStyle",value:function(ng,Ag){return this.style[ng]=Ag,this.eachCell(function(sg){sg[ng]=Ag}),Ag}},{key:"number",get:function(){return this._number}},{key:"worksheet",get:function(){return this._worksheet}},{key:"letter",get:function(){return Ig.n2l(this._number)}},{key:"isCustomWidth",get:function(){return this.width!==void 0&&this.width!==9}},{key:"defn",get:function(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}},set:function(ng){ng?(this.key=ng.key,this.width=ng.width!==void 0?ng.width:9,this.outlineLevel=ng.outlineLevel,ng.style?this.style=ng.style:this.style={},this.header=ng.header,this._hidden=!!ng.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}},{key:"headers",get:function(){return this._header&&this._header instanceof Array?this._header:[this._header]}},{key:"header",get:function(){return this._header},set:function(ng){var Ag=this;ng!==void 0?(this._header=ng,this.headers.forEach(function(sg,cg){Ag._worksheet.getCell(cg+1,Ag.number).value=sg})):this._header=void 0}},{key:"key",get:function(){return this._key},set:function(ng){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=ng,ng&&this._worksheet.setColumnKey(this._key,this)}},{key:"hidden",get:function(){return!!this._hidden},set:function(ng){this._hidden=ng}},{key:"outlineLevel",get:function(){return this._outlineLevel||0},set:function(ng){this._outlineLevel=ng}},{key:"collapsed",get:function(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}},{key:"isDefault",get:function(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;var ng=this.style;return!ng||!(ng.font||ng.numFmt||ng.alignment||ng.border||ng.fill||ng.protection)}},{key:"headerCount",get:function(){return this.headers.length}},{key:"values",get:function(){var ng=[];return this.eachCell(function(Ag,sg){Ag&&Ag.type!==eg.ValueType.Null&&(ng[sg]=Ag.value)}),ng},set:function(ng){var Ag=this;if(ng){var sg=this.number,cg=0;ng.hasOwnProperty("0")&&(cg=1),ng.forEach(function(og,lg){Ag._worksheet.getCell(lg+cg,sg).value=og})}}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(ng){this._applyStyle("numFmt",ng)}},{key:"font",get:function(){return this.style.font},set:function(ng){this._applyStyle("font",ng)}},{key:"alignment",get:function(){return this.style.alignment},set:function(ng){this._applyStyle("alignment",ng)}},{key:"protection",get:function(){return this.style.protection},set:function(ng){this._applyStyle("protection",ng)}},{key:"border",get:function(){return this.style.border},set:function(ng){this._applyStyle("border",ng)}},{key:"fill",get:function(){return this.style.fill},set:function(ng){this._applyStyle("fill",ng)}}])&&z(rg.prototype,ag),ig&&z(rg,ig),Cg}();V.exports=tg},{"../utils/col-cache":19,"../utils/under-dash":25,"./enums":7}],5:[function(n,V,L){function z(eg,Ig){for(var tg=0;tg<Ig.length;tg++){var Cg=Ig[tg];Cg.enumerable=Cg.enumerable||!1,Cg.configurable=!0,"value"in Cg&&(Cg.writable=!0),Object.defineProperty(eg,Cg.key,Cg)}}var gg=function(){function eg(Cg){(function(rg,ag){if(!(rg instanceof ag))throw new TypeError("Cannot call a class as a function")})(this,eg),this.model=Cg||{}}var Ig,tg;return Ig=eg,(tg=[{key:"add",value:function(Cg,rg){return this.model[Cg]=rg}},{key:"find",value:function(Cg){return this.model[Cg]}},{key:"remove",value:function(Cg){this.model[Cg]=void 0}}])&&z(Ig.prototype,tg),eg}();V.exports=gg},{}],6:[function(n,V,L){function z(ag,ig){for(var ng=0;ng<ig.length;ng++){var Ag=ig[ng];Ag.enumerable=Ag.enumerable||!1,Ag.configurable=!0,"value"in Ag&&(Ag.writable=!0),Object.defineProperty(ag,Ag.key,Ag)}}var gg=n("../utils/under-dash"),eg=n("../utils/col-cache"),Ig=n("../utils/cell-matrix"),tg=n("./range"),Cg=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/,rg=function(){function ag(){(function(Ag,sg){if(!(Ag instanceof sg))throw new TypeError("Cannot call a class as a function")})(this,ag),this.matrixMap={}}var ig,ng;return ig=ag,(ng=[{key:"getMatrix",value:function(Ag){return this.matrixMap[Ag]||(this.matrixMap[Ag]=new Ig)}},{key:"add",value:function(Ag,sg){var cg=eg.decodeEx(Ag);this.addEx(cg,sg)}},{key:"addEx",value:function(Ag,sg){var cg=this.getMatrix(sg);if(Ag.top)for(var og=Ag.left;og<=Ag.right;og++)for(var lg=Ag.top;lg<=Ag.bottom;lg++){var ug={sheetName:Ag.sheetName,address:eg.n2l(og)+lg,row:lg,col:og};cg.addCellEx(ug)}else cg.addCellEx(Ag)}},{key:"remove",value:function(Ag,sg){var cg=eg.decodeEx(Ag);this.removeEx(cg,sg)}},{key:"removeEx",value:function(Ag,sg){this.getMatrix(sg).removeCellEx(Ag)}},{key:"removeAllNames",value:function(Ag){gg.each(this.matrixMap,function(sg){sg.removeCellEx(Ag)})}},{key:"forEach",value:function(Ag){gg.each(this.matrixMap,function(sg,cg){sg.forEach(function(og){Ag(cg,og)})})}},{key:"getNames",value:function(Ag){return this.getNamesEx(eg.decodeEx(Ag))}},{key:"getNamesEx",value:function(Ag){return gg.map(this.matrixMap,function(sg,cg){return sg.findCellEx(Ag)&&cg}).filter(Boolean)}},{key:"_explore",value:function(Ag,sg){sg.mark=!1;var cg,og,lg=sg.sheetName,ug=new tg(sg.row,sg.col,sg.row,sg.col,lg);function dg(fg,mg){var pg=Ag.findCellAt(lg,fg,sg.col);return!(!pg||!pg.mark||(ug[mg]=fg,pg.mark=!1,0))}for(og=sg.row-1;dg(og,"top");og--);for(og=sg.row+1;dg(og,"bottom");og++);function hg(fg,mg){var pg=[];for(og=ug.top;og<=ug.bottom;og++){var bg=Ag.findCellAt(lg,og,fg);if(!bg||!bg.mark)return!1;pg.push(bg)}ug[mg]=fg;for(var vg=0;vg<pg.length;vg++)pg[vg].mark=!1;return!0}for(cg=sg.col-1;hg(cg,"left");cg--);for(cg=sg.col+1;hg(cg,"right");cg++);return ug}},{key:"getRanges",value:function(Ag,sg){var cg=this;return(sg=sg||this.matrixMap[Ag])?(sg.forEach(function(og){og.mark=!0}),{name:Ag,ranges:sg.map(function(og){return og.mark&&cg._explore(sg,og)}).filter(Boolean).map(function(og){return og.$shortRange})}):{name:Ag,ranges:[]}}},{key:"normaliseMatrix",value:function(Ag,sg){Ag.forEachInSheet(sg,function(cg,og,lg){cg&&(cg.row===og&&cg.col===lg||(cg.row=og,cg.col=lg,cg.address=eg.n2l(lg)+og))})}},{key:"spliceRows",value:function(Ag,sg,cg,og){var lg=this;gg.each(this.matrixMap,function(ug){ug.spliceRows(Ag,sg,cg,og),lg.normaliseMatrix(ug,Ag)})}},{key:"spliceColumns",value:function(Ag,sg,cg,og){var lg=this;gg.each(this.matrixMap,function(ug){ug.spliceColumns(Ag,sg,cg,og),lg.normaliseMatrix(ug,Ag)})}},{key:"model",get:function(){var Ag=this;return gg.map(this.matrixMap,function(sg,cg){return Ag.getRanges(cg,sg)}).filter(function(sg){return sg.ranges.length})},set:function(Ag){var sg=this.matrixMap={};Ag.forEach(function(cg){var og=sg[cg.name]=new Ig;cg.ranges.forEach(function(lg){Cg.test(lg.split("!").pop()||"")&&og.addCell(lg)})})}}])&&z(ig.prototype,ng),ag}();V.exports=rg},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":25,"./range":10}],7:[function(n,V,L){V.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(n,V,L){function z(tg,Cg){for(var rg=0;rg<Cg.length;rg++){var ag=Cg[rg];ag.enumerable=ag.enumerable||!1,ag.configurable=!0,"value"in ag&&(ag.writable=!0),Object.defineProperty(tg,ag.key,ag)}}var gg=n("../utils/col-cache"),eg=n("./anchor"),Ig=function(){function tg(ag,ig){(function(ng,Ag){if(!(ng instanceof Ag))throw new TypeError("Cannot call a class as a function")})(this,tg),this.worksheet=ag,this.model=ig}var Cg,rg;return Cg=tg,(rg=[{key:"model",get:function(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}},set:function(ag){var ig=ag.type,ng=ag.imageId,Ag=ag.range,sg=ag.hyperlinks;if(this.type=ig,this.imageId=ng,ig==="image")if(typeof Ag=="string"){var cg=gg.decode(Ag);this.range={tl:new eg(this.worksheet,{col:cg.left,row:cg.top},-1),br:new eg(this.worksheet,{col:cg.right,row:cg.bottom},0),editAs:"oneCell"}}else this.range={tl:new eg(this.worksheet,Ag.tl,0),br:Ag.br&&new eg(this.worksheet,Ag.br,0),ext:Ag.ext,editAs:Ag.editAs,hyperlinks:sg||Ag.hyperlinks}}}])&&z(Cg.prototype,rg),tg}();V.exports=Ig},{"../utils/col-cache":19,"./anchor":2}],9:[function(n,V,L){function z(tg){return(z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Cg){return typeof Cg}:function(Cg){return Cg&&typeof Symbol=="function"&&Cg.constructor===Symbol&&Cg!==Symbol.prototype?"symbol":typeof Cg})(tg)}function gg(tg,Cg){for(var rg=0;rg<Cg.length;rg++){var ag=Cg[rg];ag.enumerable=ag.enumerable||!1,ag.configurable=!0,"value"in ag&&(ag.writable=!0),Object.defineProperty(tg,ag.key,ag)}}var eg=n("../utils/under-dash"),Ig=function(){function tg(ig){(function(ng,Ag){if(!(ng instanceof Ag))throw new TypeError("Cannot call a class as a function")})(this,tg),this.note=ig}var Cg,rg,ag;return Cg=tg,ag=[{key:"fromModel",value:function(ig){var ng=new tg;return ng.model=ig,ng}}],(rg=[{key:"model",get:function(){var ig=null;switch(z(this.note)){case"string":ig={type:"note",note:{texts:[{text:this.note}]}};break;default:ig={type:"note",note:this.note}}return eg.deepMerge({},tg.DEFAULT_CONFIGS,ig)},set:function(ig){var ng=ig.note,Ag=ng.texts;Ag.length===1&&Object.keys(Ag[0]).length===1?this.note=Ag[0].text:this.note=ng}}])&&gg(Cg.prototype,rg),ag&&gg(Cg,ag),tg}();Ig.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},V.exports=Ig},{"../utils/under-dash":25}],10:[function(n,V,L){function z(tg,Cg){if(!(tg instanceof Cg))throw new TypeError("Cannot call a class as a function")}function gg(tg,Cg){for(var rg=0;rg<Cg.length;rg++){var ag=Cg[rg];ag.enumerable=ag.enumerable||!1,ag.configurable=!0,"value"in ag&&(ag.writable=!0),Object.defineProperty(tg,ag.key,ag)}}var eg=n("../utils/col-cache"),Ig=function(){function tg(){z(this,tg),this.decode(arguments)}var Cg,rg;return Cg=tg,(rg=[{key:"setTLBR",value:function(ag,ig,ng,Ag,sg){if(arguments.length<4){var cg=eg.decodeAddress(ag),og=eg.decodeAddress(ig);this.model={top:Math.min(cg.row,og.row),left:Math.min(cg.col,og.col),bottom:Math.max(cg.row,og.row),right:Math.max(cg.col,og.col),sheetName:ng},this.setTLBR(cg.row,cg.col,og.row,og.col,sg)}else this.model={top:Math.min(ag,ng),left:Math.min(ig,Ag),bottom:Math.max(ag,ng),right:Math.max(ig,Ag),sheetName:sg}}},{key:"decode",value:function(ag){switch(ag.length){case 5:this.setTLBR(ag[0],ag[1],ag[2],ag[3],ag[4]);break;case 4:this.setTLBR(ag[0],ag[1],ag[2],ag[3]);break;case 3:this.setTLBR(ag[0],ag[1],ag[2]);break;case 2:this.setTLBR(ag[0],ag[1]);break;case 1:var ig=ag[0];if(ig instanceof tg)this.model={top:ig.model.top,left:ig.model.left,bottom:ig.model.bottom,right:ig.model.right,sheetName:ig.sheetName};else if(ig instanceof Array)this.decode(ig);else if(ig.top&&ig.left&&ig.bottom&&ig.right)this.model={top:ig.top,left:ig.left,bottom:ig.bottom,right:ig.right,sheetName:ig.sheetName};else{var ng=eg.decodeEx(ig);ng.top?this.model={top:ng.top,left:ng.left,bottom:ng.bottom,right:ng.right,sheetName:ng.sheetName}:this.model={top:ng.row,left:ng.col,bottom:ng.row,right:ng.col,sheetName:ng.sheetName}}break;case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - ".concat(ag.length))}}},{key:"expand",value:function(ag,ig,ng,Ag){(!this.model.top||ag<this.top)&&(this.top=ag),(!this.model.left||ig<this.left)&&(this.left=ig),(!this.model.bottom||ng>this.bottom)&&(this.bottom=ng),(!this.model.right||Ag>this.right)&&(this.right=Ag)}},{key:"expandRow",value:function(ag){if(ag){var ig=ag.dimensions,ng=ag.number;ig&&this.expand(ng,ig.min,ng,ig.max)}}},{key:"expandToAddress",value:function(ag){var ig=eg.decodeEx(ag);this.expand(ig.row,ig.col,ig.row,ig.col)}},{key:"toString",value:function(){return this.range}},{key:"intersects",value:function(ag){return!(ag.sheetName&&this.sheetName&&ag.sheetName!==this.sheetName||ag.bottom<this.top||ag.top>this.bottom||ag.right<this.left||ag.left>this.right)}},{key:"contains",value:function(ag){var ig=eg.decodeEx(ag);return this.containsEx(ig)}},{key:"containsEx",value:function(ag){return(!ag.sheetName||!this.sheetName||ag.sheetName===this.sheetName)&&ag.row>=this.top&&ag.row<=this.bottom&&ag.col>=this.left&&ag.col<=this.right}},{key:"forEachAddress",value:function(ag){for(var ig=this.left;ig<=this.right;ig++)for(var ng=this.top;ng<=this.bottom;ng++)ag(eg.encodeAddress(ng,ig),ng,ig)}},{key:"top",get:function(){return this.model.top||1},set:function(ag){this.model.top=ag}},{key:"left",get:function(){return this.model.left||1},set:function(ag){this.model.left=ag}},{key:"bottom",get:function(){return this.model.bottom||1},set:function(ag){this.model.bottom=ag}},{key:"right",get:function(){return this.model.right||1},set:function(ag){this.model.right=ag}},{key:"sheetName",get:function(){return this.model.sheetName},set:function(ag){this.model.sheetName=ag}},{key:"_serialisedSheetName",get:function(){var ag=this.model.sheetName;return ag?/^[a-zA-Z0-9]*$/.test(ag)?"".concat(ag,"!"):"'".concat(ag,"'!"):""}},{key:"tl",get:function(){return eg.n2l(this.left)+this.top}},{key:"$t$l",get:function(){return"$".concat(eg.n2l(this.left),"$").concat(this.top)}},{key:"br",get:function(){return eg.n2l(this.right)+this.bottom}},{key:"$b$r",get:function(){return"$".concat(eg.n2l(this.right),"$").concat(this.bottom)}},{key:"range",get:function(){return"".concat(this._serialisedSheetName+this.tl,":").concat(this.br)}},{key:"$range",get:function(){return"".concat(this._serialisedSheetName+this.$t$l,":").concat(this.$b$r)}},{key:"shortRange",get:function(){return this.count>1?this.range:this._serialisedSheetName+this.tl}},{key:"$shortRange",get:function(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}},{key:"count",get:function(){return(1+this.bottom-this.top)*(1+this.right-this.left)}}])&&gg(Cg.prototype,rg),tg}();V.exports=Ig},{"../utils/col-cache":19}],11:[function(n,V,L){function z(rg,ag){for(var ig=0;ig<ag.length;ig++){var ng=ag[ig];ng.enumerable=ng.enumerable||!1,ng.configurable=!0,"value"in ng&&(ng.writable=!0),Object.defineProperty(rg,ng.key,ng)}}var gg=n("../utils/under-dash"),eg=n("./enums"),Ig=n("../utils/col-cache"),tg=n("./cell"),Cg=function(){function rg(ng,Ag){(function(sg,cg){if(!(sg instanceof cg))throw new TypeError("Cannot call a class as a function")})(this,rg),this._worksheet=ng,this._number=Ag,this._cells=[],this.style={},this.outlineLevel=0}var ag,ig;return ag=rg,(ig=[{key:"commit",value:function(){this._worksheet._commitRow(this)}},{key:"destroy",value:function(){delete this._worksheet,delete this._cells,delete this.style}},{key:"findCell",value:function(ng){return this._cells[ng-1]}},{key:"getCellEx",value:function(ng){var Ag=this._cells[ng.col-1];if(!Ag){var sg=this._worksheet.getColumn(ng.col);Ag=new tg(this,sg,ng.address),this._cells[ng.col-1]=Ag}return Ag}},{key:"getCell",value:function(ng){if(typeof ng=="string"){var Ag=this._worksheet.getColumnKey(ng);ng=Ag?Ag.number:Ig.l2n(ng)}return this._cells[ng-1]||this.getCellEx({address:Ig.encodeAddress(this._number,ng),row:this._number,col:ng})}},{key:"splice",value:function(ng,Ag){for(var sg=ng+Ag,cg=arguments.length,og=new Array(cg>2?cg-2:0),lg=2;lg<cg;lg++)og[lg-2]=arguments[lg];var ug,dg,hg,fg=og.length-Ag,mg=this._cells.length;if(fg<0)for(ug=ng+og.length;ug<=mg;ug++)hg=this._cells[ug-1],(dg=this._cells[ug-fg-1])?((hg=this.getCell(ug)).value=dg.value,hg.style=dg.style,hg._comment=dg._comment):hg&&(hg.value=null,hg.style={},hg._comment=void 0);else if(fg>0)for(ug=mg;ug>=sg;ug--)(dg=this._cells[ug-1])?((hg=this.getCell(ug+fg)).value=dg.value,hg.style=dg.style,hg._comment=dg._comment):this._cells[ug+fg-1]=void 0;for(ug=0;ug<og.length;ug++)(hg=this.getCell(ng+ug)).value=og[ug],hg.style={},hg._comment=void 0}},{key:"eachCell",value:function(ng,Ag){if(Ag||(Ag=ng,ng=null),ng&&ng.includeEmpty)for(var sg=this._cells.length,cg=1;cg<=sg;cg++)Ag(this.getCell(cg),cg);else this._cells.forEach(function(og,lg){og&&og.type!==eg.ValueType.Null&&Ag(og,lg+1)})}},{key:"addPageBreak",value:function(ng,Ag){var sg=this._worksheet,cg=Math.max(0,ng-1)||0,og=Math.max(0,Ag-1)||16838,lg={id:this._number,max:og,man:1};cg&&(lg.min=cg),sg.rowBreaks.push(lg)}},{key:"_applyStyle",value:function(ng,Ag){return this.style[ng]=Ag,this._cells.forEach(function(sg){sg&&(sg[ng]=Ag)}),Ag}},{key:"number",get:function(){return this._number}},{key:"worksheet",get:function(){return this._worksheet}},{key:"values",get:function(){var ng=[];return this._cells.forEach(function(Ag){Ag&&Ag.type!==eg.ValueType.Null&&(ng[Ag.col]=Ag.value)}),ng},set:function(ng){var Ag=this;if(this._cells=[],ng)if(ng instanceof Array){var sg=0;ng.hasOwnProperty("0")&&(sg=1),ng.forEach(function(cg,og){cg!==void 0&&(Ag.getCellEx({address:Ig.encodeAddress(Ag._number,og+sg),row:Ag._number,col:og+sg}).value=cg)})}else this._worksheet.eachColumnKey(function(cg,og){ng[og]!==void 0&&(Ag.getCellEx({address:Ig.encodeAddress(Ag._number,cg.number),row:Ag._number,col:cg.number}).value=ng[og])})}},{key:"hasValues",get:function(){return gg.some(this._cells,function(ng){return ng&&ng.type!==eg.ValueType.Null})}},{key:"cellCount",get:function(){return this._cells.length}},{key:"actualCellCount",get:function(){var ng=0;return this.eachCell(function(){ng++}),ng}},{key:"dimensions",get:function(){var ng=0,Ag=0;return this._cells.forEach(function(sg){sg&&sg.type!==eg.ValueType.Null&&((!ng||ng>sg.col)&&(ng=sg.col),Ag<sg.col&&(Ag=sg.col))}),ng>0?{min:ng,max:Ag}:null}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(ng){this._applyStyle("numFmt",ng)}},{key:"font",get:function(){return this.style.font},set:function(ng){this._applyStyle("font",ng)}},{key:"alignment",get:function(){return this.style.alignment},set:function(ng){this._applyStyle("alignment",ng)}},{key:"protection",get:function(){return this.style.protection},set:function(ng){this._applyStyle("protection",ng)}},{key:"border",get:function(){return this.style.border},set:function(ng){this._applyStyle("border",ng)}},{key:"fill",get:function(){return this.style.fill},set:function(ng){this._applyStyle("fill",ng)}},{key:"hidden",get:function(){return!!this._hidden},set:function(ng){this._hidden=ng}},{key:"outlineLevel",get:function(){return this._outlineLevel||0},set:function(ng){this._outlineLevel=ng}},{key:"collapsed",get:function(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}},{key:"model",get:function(){var ng=[],Ag=0,sg=0;return this._cells.forEach(function(cg){if(cg){var og=cg.model;og&&((!Ag||Ag>cg.col)&&(Ag=cg.col),sg<cg.col&&(sg=cg.col),ng.push(og))}}),this.height||ng.length?{cells:ng,number:this.number,min:Ag,max:sg,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null},set:function(ng){var Ag,sg=this;if(ng.number!==this._number)throw new Error("Invalid row number in model");this._cells=[],ng.cells.forEach(function(cg){switch(cg.type){case tg.Types.Merge:break;default:var og;if(cg.address)og=Ig.decodeAddress(cg.address);else if(Ag){var lg=Ag.row,ug=Ag.col+1;og={row:lg,col:ug,address:Ig.encodeAddress(lg,ug),$col$row:"$".concat(Ig.n2l(ug),"$").concat(lg)}}Ag=og,sg.getCellEx(og).model=cg}}),ng.height?this.height=ng.height:delete this.height,this.hidden=ng.hidden,this.outlineLevel=ng.outlineLevel||0,this.style=ng.style&&JSON.parse(JSON.stringify(ng.style))||{}}}])&&z(ag.prototype,ig),rg}();V.exports=Cg},{"../utils/col-cache":19,"../utils/under-dash":25,"./cell":3,"./enums":7}],12:[function(n,V,L){function z(rg,ag){if(!(rg instanceof ag))throw new TypeError("Cannot call a class as a function")}function gg(rg,ag){for(var ig=0;ig<ag.length;ig++){var ng=ag[ig];ng.enumerable=ng.enumerable||!1,ng.configurable=!0,"value"in ng&&(ng.writable=!0),Object.defineProperty(rg,ng.key,ng)}}function eg(rg,ag,ig){return ag&&gg(rg.prototype,ag),rg}var Ig=n("../utils/col-cache"),tg=function(){function rg(ag,ig,ng){z(this,rg),this.table=ag,this.column=ig,this.index=ng}return eg(rg,[{key:"_set",value:function(ag,ig){this.table.cacheState(),this.column[ag]=ig}},{key:"name",get:function(){return this.column.name},set:function(ag){this._set("name",ag)}},{key:"filterButton",get:function(){return this.column.filterButton},set:function(ag){this.column.filterButton=ag}},{key:"style",get:function(){return this.column.style},set:function(ag){this.column.style=ag}},{key:"totalsRowLabel",get:function(){return this.column.totalsRowLabel},set:function(ag){this._set("totalsRowLabel",ag)}},{key:"totalsRowFunction",get:function(){return this.column.totalsRowFunction},set:function(ag){this._set("totalsRowFunction",ag)}},{key:"totalsRowResult",get:function(){return this.column.totalsRowResult},set:function(ag){this._set("totalsRowResult",ag)}},{key:"totalsRowFormula",get:function(){return this.column.totalsRowFormula},set:function(ag){this._set("totalsRowFormula",ag)}}]),rg}(),Cg=function(){function rg(ag,ig){z(this,rg),this.worksheet=ag,ig&&(this.table=ig,this.validate(),this.store())}return eg(rg,[{key:"getFormula",value:function(ag){switch(ag.totalsRowFunction){case"none":return null;case"average":return"SUBTOTAL(101,".concat(this.table.name,"[").concat(ag.name,"])");case"countNums":return"SUBTOTAL(102,".concat(this.table.name,"[").concat(ag.name,"])");case"count":return"SUBTOTAL(103,".concat(this.table.name,"[").concat(ag.name,"])");case"max":return"SUBTOTAL(104,".concat(this.table.name,"[").concat(ag.name,"])");case"min":return"SUBTOTAL(105,".concat(this.table.name,"[").concat(ag.name,"])");case"stdDev":return"SUBTOTAL(106,".concat(this.table.name,"[").concat(ag.name,"])");case"var":return"SUBTOTAL(107,".concat(this.table.name,"[").concat(ag.name,"])");case"sum":return"SUBTOTAL(109,".concat(this.table.name,"[").concat(ag.name,"])");case"custom":return ag.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: ".concat(ag.totalsRowFunction))}}},{key:"validate",value:function(){var ag=this,ig=this.table,ng=function(hg,fg,mg){hg[fg]===void 0&&(hg[fg]=mg)};ng(ig,"headerRow",!0),ng(ig,"totalsRow",!1),ng(ig,"style",{}),ng(ig.style,"theme","TableStyleMedium2"),ng(ig.style,"showFirstColumn",!1),ng(ig.style,"showLastColumn",!1),ng(ig.style,"showRowStripes",!1),ng(ig.style,"showColumnStripes",!1);var Ag=function(hg,fg){if(!hg)throw new Error(fg)};Ag(ig.ref,"Table must have ref"),Ag(ig.columns,"Table must have column definitions"),Ag(ig.rows,"Table must have row definitions"),ig.tl=Ig.decodeAddress(ig.ref);var sg=ig.tl,cg=sg.row,og=sg.col;Ag(cg>0,"Table must be on valid row"),Ag(og>0,"Table must be on valid col");var lg=this.width,ug=this.filterHeight,dg=this.tableHeight;ig.autoFilterRef=Ig.encode(cg,og,cg+ug-1,og+lg-1),ig.tableRef=Ig.encode(cg,og,cg+dg-1,og+lg-1),ig.columns.forEach(function(hg,fg){Ag(hg.name,"Column ".concat(fg," must have a name")),fg===0?ng(hg,"totalsRowLabel","Total"):(ng(hg,"totalsRowFunction","none"),hg.totalsRowFormula=ag.getFormula(hg))})}},{key:"store",value:function(){var ag=this,ig=function(hg,fg){fg&&Object.keys(fg).forEach(function(mg){hg[mg]=fg[mg]})},ng=this.worksheet,Ag=this.table,sg=Ag.tl,cg=sg.row,og=sg.col,lg=0;if(Ag.headerRow){var ug=ng.getRow(cg+lg++);Ag.columns.forEach(function(hg,fg){var mg=hg.style,pg=hg.name,bg=ug.getCell(og+fg);bg.value=pg,ig(bg,mg)})}if(Ag.rows.forEach(function(hg){var fg=ng.getRow(cg+lg++);hg.forEach(function(mg,pg){var bg=fg.getCell(og+pg);bg.value=mg,ig(bg,Ag.columns[pg].style)})}),Ag.totalsRow){var dg=ng.getRow(cg+lg++);Ag.columns.forEach(function(hg,fg){var mg=dg.getCell(og+fg);if(fg===0)mg.value=hg.totalsRowLabel;else{var pg=ag.getFormula(hg);mg.value=pg?{formula:hg.totalsRowFormula,result:hg.totalsRowResult}:null}ig(mg,hg.style)})}}},{key:"load",value:function(ag){var ig=this,ng=this.table,Ag=ng.tl,sg=Ag.row,cg=Ag.col,og=0;if(ng.headerRow){var lg=ag.getRow(sg+og++);ng.columns.forEach(function(dg,hg){lg.getCell(cg+hg).value=dg.name})}if(ng.rows.forEach(function(dg){var hg=ag.getRow(sg+og++);dg.forEach(function(fg,mg){hg.getCell(cg+mg).value=fg})}),ng.totalsRow){var ug=ag.getRow(sg+og++);ng.columns.forEach(function(dg,hg){var fg=ug.getCell(cg+hg);hg===0?fg.value=dg.totalsRowLabel:ig.getFormula(dg)&&(fg.value={formula:dg.totalsRowFormula,result:dg.totalsRowResult})})}}},{key:"cacheState",value:function(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}},{key:"commit",value:function(){if(this._cache){this.validate();var ag=Ig.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(var ig=0;ig<this._cache.tableHeight;ig++)for(var ng=this.worksheet.getRow(ag.row+ig),Ag=0;Ag<this._cache.width;Ag++)ng.getCell(ag.col+Ag).value=null;else{for(var sg=this.tableHeight;sg<this._cache.tableHeight;sg++)for(var cg=this.worksheet.getRow(ag.row+sg),og=0;og<this._cache.width;og++)cg.getCell(ag.col+og).value=null;for(var lg=0;lg<this.tableHeight;lg++)for(var ug=this.worksheet.getRow(ag.row+lg),dg=this.width;dg<this._cache.width;dg++)ug.getCell(ag.col+dg).value=null}this.store()}}},{key:"addRow",value:function(ag,ig){this.cacheState(),ig===void 0?this.table.rows.push(ag):this.table.rows.splice(ig,0,ag)}},{key:"removeRows",value:function(ag){var ig=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(ag,ig)}},{key:"getColumn",value:function(ag){var ig=this.table.columns[ag];return new tg(this,ig,ag)}},{key:"addColumn",value:function(ag,ig,ng){this.cacheState(),ng===void 0?(this.table.columns.push(ag),this.table.rows.forEach(function(Ag,sg){Ag.push(ig[sg])})):(this.table.columns.splice(ng,0,ag),this.table.rows.forEach(function(Ag,sg){Ag.splice(ng,0,ig[sg])}))}},{key:"removeColumns",value:function(ag){var ig=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(ag,ig),this.table.rows.forEach(function(ng){ng.splice(ag,ig)})}},{key:"_assign",value:function(ag,ig,ng){this.cacheState(),ag[ig]=ng}},{key:"width",get:function(){return this.table.columns.length}},{key:"height",get:function(){return this.table.rows.length}},{key:"filterHeight",get:function(){return this.height+(this.table.headerRow?1:0)}},{key:"tableHeight",get:function(){return this.filterHeight+(this.table.totalsRow?1:0)}},{key:"model",get:function(){return this.table},set:function(ag){this.table=ag}},{key:"ref",get:function(){return this.table.ref},set:function(ag){this._assign(this.table,"ref",ag)}},{key:"name",get:function(){return this.table.name},set:function(ag){this.table.name=ag}},{key:"displayName",get:function(){return this.table.displyName||this.table.name}},{key:"displayNamename",set:function(ag){this.table.displayName=ag}},{key:"headerRow",get:function(){return this.table.headerRow},set:function(ag){this._assign(this.table,"headerRow",ag)}},{key:"totalsRow",get:function(){return this.table.totalsRow},set:function(ag){this._assign(this.table,"totalsRow",ag)}},{key:"theme",get:function(){return this.table.style.name},set:function(ag){this.table.style.name=ag}},{key:"showFirstColumn",get:function(){return this.table.style.showFirstColumn},set:function(ag){this.table.style.showFirstColumn=ag}},{key:"showLastColumn",get:function(){return this.table.style.showLastColumn},set:function(ag){this.table.style.showLastColumn=ag}},{key:"showRowStripes",get:function(){return this.table.style.showRowStripes},set:function(ag){this.table.style.showRowStripes=ag}},{key:"showColumnStripes",get:function(){return this.table.style.showColumnStripes},set:function(ag){this.table.style.showColumnStripes=ag}}]),rg}();V.exports=Cg},{"../utils/col-cache":19}],13:[function(n,V,L){function z(rg,ag){for(var ig=0;ig<ag.length;ig++){var ng=ag[ig];ng.enumerable=ng.enumerable||!1,ng.configurable=!0,"value"in ng&&(ng.writable=!0),Object.defineProperty(rg,ng.key,ng)}}var gg=n("./worksheet"),eg=n("./defined-names"),Ig=n("../xlsx/xlsx"),tg=n("../csv/csv"),Cg=function(){function rg(){(function(ng,Ag){if(!(ng instanceof Ag))throw new TypeError("Cannot call a class as a function")})(this,rg),this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new eg}var ag,ig;return ag=rg,(ig=[{key:"addWorksheet",value:function(ng,Ag){var sg=this.nextId;if(ng&&ng.length>31&&console.warn("Worksheet name ".concat(ng," exceeds 31 chars. This will be truncated")),/[*?:/\\[\]]/.test(ng))throw new Error("Worksheet name ".concat(ng," cannot include any of the following characters: * ? : \\ / [ ]"));if(/(^')|('$)/.test(ng))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: ".concat(ng));if(ng=(ng||"sheet".concat(sg)).substring(0,31),this._worksheets.find(function(ug){return ug&&ug.name.toLowerCase()===ng.toLowerCase()}))throw new Error("Worksheet name already exists: ".concat(ng));Ag&&(typeof Ag=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),Ag={properties:{tabColor:{argb:Ag}}}):(Ag.argb||Ag.theme||Ag.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),Ag={properties:{tabColor:Ag}}));var cg=this._worksheets.reduce(function(ug,dg){return(dg&&dg.orderNo)>ug?dg.orderNo:ug},0),og=Object.assign({},Ag,{id:sg,name:ng,orderNo:cg+1,workbook:this}),lg=new gg(og);return this._worksheets[sg]=lg,lg}},{key:"removeWorksheetEx",value:function(ng){delete this._worksheets[ng.id]}},{key:"removeWorksheet",value:function(ng){var Ag=this.getWorksheet(ng);Ag&&Ag.destroy()}},{key:"getWorksheet",value:function(ng){return ng===void 0?this._worksheets.find(Boolean):typeof ng=="number"?this._worksheets[ng]:typeof ng=="string"?this._worksheets.find(function(Ag){return Ag&&Ag.name===ng}):void 0}},{key:"eachSheet",value:function(ng){this.worksheets.forEach(function(Ag){ng(Ag,Ag.id)})}},{key:"clearThemes",value:function(){this._themes=void 0}},{key:"addImage",value:function(ng){var Ag=this.media.length;return this.media.push(Object.assign({},ng,{type:"image"})),Ag}},{key:"getImage",value:function(ng){return this.media[ng]}},{key:"xlsx",get:function(){return this._xlsx||(this._xlsx=new Ig(this)),this._xlsx}},{key:"csv",get:function(){return this._csv||(this._csv=new tg(this)),this._csv}},{key:"nextId",get:function(){for(var ng=1;ng<this._worksheets.length;ng++)if(!this._worksheets[ng])return ng;return this._worksheets.length||1}},{key:"worksheets",get:function(){return this._worksheets.slice(1).sort(function(ng,Ag){return ng.orderNo-Ag.orderNo}).filter(Boolean)}},{key:"definedNames",get:function(){return this._definedNames}},{key:"model",get:function(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(function(ng){return ng.model}),sheets:this.worksheets.map(function(ng){return ng.model}).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}},set:function(ng){var Ag=this;this.creator=ng.creator,this.lastModifiedBy=ng.lastModifiedBy,this.lastPrinted=ng.lastPrinted,this.created=ng.created,this.modified=ng.modified,this.company=ng.company,this.manager=ng.manager,this.title=ng.title,this.subject=ng.subject,this.keywords=ng.keywords,this.category=ng.category,this.description=ng.description,this.language=ng.language,this.revision=ng.revision,this.contentStatus=ng.contentStatus,this.properties=ng.properties,this.calcProperties=ng.calcProperties,this._worksheets=[],ng.worksheets.forEach(function(sg){var cg=sg.id,og=sg.name,lg=sg.state,ug=ng.sheets&&ng.sheets.findIndex(function(dg){return dg.id===cg});(Ag._worksheets[cg]=new gg({id:cg,name:og,orderNo:ug,state:lg,workbook:Ag})).model=sg}),this._definedNames.model=ng.definedNames,this.views=ng.views,this._themes=ng.themes,this.media=ng.media||[]}}])&&z(ag.prototype,ig),rg}();V.exports=Cg},{"../csv/csv":1,"../xlsx/xlsx":141,"./defined-names":6,"./worksheet":14}],14:[function(n,V,L){function z(hg,fg){var mg=Object.keys(hg);if(Object.getOwnPropertySymbols){var pg=Object.getOwnPropertySymbols(hg);fg&&(pg=pg.filter(function(bg){return Object.getOwnPropertyDescriptor(hg,bg).enumerable})),mg.push.apply(mg,pg)}return mg}function gg(hg){for(var fg=1;fg<arguments.length;fg++){var mg=arguments[fg]!=null?arguments[fg]:{};fg%2?z(Object(mg),!0).forEach(function(pg){eg(hg,pg,mg[pg])}):Object.getOwnPropertyDescriptors?Object.defineProperties(hg,Object.getOwnPropertyDescriptors(mg)):z(Object(mg)).forEach(function(pg){Object.defineProperty(hg,pg,Object.getOwnPropertyDescriptor(mg,pg))})}return hg}function eg(hg,fg,mg){return fg in hg?Object.defineProperty(hg,fg,{value:mg,enumerable:!0,configurable:!0,writable:!0}):hg[fg]=mg,hg}function Ig(hg){return function(fg){if(Array.isArray(fg))return tg(fg)}(hg)||function(fg){if(typeof Symbol<"u"&&Symbol.iterator in Object(fg))return Array.from(fg)}(hg)||function(fg,mg){if(fg){if(typeof fg=="string")return tg(fg,mg);var pg=Object.prototype.toString.call(fg).slice(8,-1);if(pg==="Object"&&fg.constructor&&(pg=fg.constructor.name),pg==="Map"||pg==="Set")return Array.from(fg);if(pg==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pg))return tg(fg,mg)}}(hg)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
598
|
+
`)}),this.footer!=null&&n.push(this.parseExtraData(this.footer,"${data}\r\n")),n.join("")},getProcessedJson(r,y){let n=this.getKeys(r,y),V=[],L=this;return r.map(function(z,gg){let eg={};for(let Ig in n){let tg=n[Ig];eg[Ig]=L.getValue(tg,z)}V.push(eg)}),V},getKeys(r,y){if(y)return y;let n={};for(let V in r[0])n[V]=V;return n},parseExtraData(r,y){let n="";if(Array.isArray(r))for(var V=0;V<r.length;V++)r[V]&&(n+=y.replace("${data}",r[V]));else n+=y.replace("${data}",r);return n},getValue(r,y){const n=typeof r!="object"?r:r.field;let V=typeof n!="string"?[]:n.split("."),L=this.defaultValue;return n?V.length>1?L=this.getValueFromNestedItem(y,V):L=this.parseValue(y[n]):L=y,r.hasOwnProperty("callback")&&(L=this.getValueFromCallback(L,r.callback)),L},valueReformattedForMultilines(r){return typeof r=="string"?r.replace(/\n/gi,"<br/>"):r},preprocessLongNum(r){if(this.stringifyLongNum){if(String(r).startsWith("0x"))return r;if(!isNaN(r)&&r!=""&&(r>99999999999||r<1e-13))return'="'+r+'"'}return r},getValueFromNestedItem(r,y){let n=r;for(let V of y)n&&(n=n[V]);return this.parseValue(n)},getValueFromCallback(r,y){if(typeof y!="function")return this.defaultValue;const n=y(r);return this.parseValue(n)},parseValue(r){return r||r===0||typeof r=="boolean"?r:this.defaultValue},base64ToBlob(r,y){let n=window.btoa(window.unescape(encodeURIComponent(r))),V=atob(n),L=V.length,z=new Uint8ClampedArray(L);for(;L--;)z[L]=V.charCodeAt(L);return new Blob([z],{type:y})}}},_hoisted_1$2=["id"];function _sfc_render(r,y,n,V,L,z){return vue.openBlock(),vue.createElementBlock("div",{id:z.idName,onClick:y[0]||(y[0]=(...gg)=>z.generate&&z.generate(...gg))},[vue.renderSlot(r.$slots,"default",{},()=>[vue.createTextVNode(" Download "+vue.toDisplayString(n.name),1)])],8,_hoisted_1$2)}const JsonExcel=_export_sfc(_sfc_main$3,[["render",_sfc_render]]),_sfc_main$2=vue.defineComponent({name:"QsyxExportExcel",__name:"index",props:{json_fields:{required:!0},details_form:{required:!0},header:{type:String}},setup(r){const y=r;return vue.ref(""),vue.reactive({排查日期:"date",整改隐患内容:"details",整改措施:"measure",整改时限:"timeLimit",应急措施和预案:"plan",整改责任人:"personInCharge",填表人:"preparer",整改资金:"fund",整改完成情况:"complete",备注:"remark"}),vue.reactive([{date:"2022-3-10",details:"卸油区过路灯损坏",measure:"更换灯泡",timeLimit:"2022-3-21",plan:"先使用充电灯代替,贴好安全提醒告示",personInCharge:"王xx",preparer:"王xx",fund:"20元",complete:"已完成整改",remark:"重新更换了灯泡"}]),(n,V)=>{const L=vue.resolveComponent("el-button");return vue.openBlock(),vue.createBlock(JsonExcel,{class:"export-excel-wrapper",data:y.details_form,fields:y.json_fields,header:y.header,name:"aaa.xls"},{default:vue.withCtx(()=>[vue.createVNode(L,{type:"success"},{default:vue.withCtx(()=>V[0]||(V[0]=[vue.createTextVNode("导出")])),_:1,__:[0]})]),_:1},8,["data","fields","header"])}}}),exportExcel$1=_export_sfc(_sfc_main$2,[["__scopeId","data-v-f6ee5aa4"]]),QsyxExportExcel=withInstall$1(exportExcel$1);var runtime={exports:{}};(function(r){var y=function(n){var V=Object.prototype,L=V.hasOwnProperty,z=Object.defineProperty||function(Rg,Xg,Sg){Rg[Xg]=Sg.value},gg,eg=typeof Symbol=="function"?Symbol:{},Ig=eg.iterator||"@@iterator",tg=eg.asyncIterator||"@@asyncIterator",Cg=eg.toStringTag||"@@toStringTag";function rg(Rg,Xg,Sg){return Object.defineProperty(Rg,Xg,{value:Sg,enumerable:!0,configurable:!0,writable:!0}),Rg[Xg]}try{rg({},"")}catch{rg=function(Xg,Sg,Ng){return Xg[Sg]=Ng}}function ag(Rg,Xg,Sg,Ng){var Hg=Xg&&Xg.prototype instanceof lg?Xg:lg,Yg=Object.create(Hg.prototype),Mg=new Wg(Ng||[]);return z(Yg,"_invoke",{value:Vg(Rg,Sg,Mg)}),Yg}n.wrap=ag;function ig(Rg,Xg,Sg){try{return{type:"normal",arg:Rg.call(Xg,Sg)}}catch(Ng){return{type:"throw",arg:Ng}}}var ng="suspendedStart",Ag="suspendedYield",sg="executing",cg="completed",og={};function lg(){}function ug(){}function dg(){}var hg={};rg(hg,Ig,function(){return this});var fg=Object.getPrototypeOf,mg=fg&&fg(fg(Bg([])));mg&&mg!==V&&L.call(mg,Ig)&&(hg=mg);var pg=dg.prototype=lg.prototype=Object.create(hg);ug.prototype=dg,z(pg,"constructor",{value:dg,configurable:!0}),z(dg,"constructor",{value:ug,configurable:!0}),ug.displayName=rg(dg,Cg,"GeneratorFunction");function bg(Rg){["next","throw","return"].forEach(function(Xg){rg(Rg,Xg,function(Sg){return this._invoke(Xg,Sg)})})}n.isGeneratorFunction=function(Rg){var Xg=typeof Rg=="function"&&Rg.constructor;return Xg?Xg===ug||(Xg.displayName||Xg.name)==="GeneratorFunction":!1},n.mark=function(Rg){return Object.setPrototypeOf?Object.setPrototypeOf(Rg,dg):(Rg.__proto__=dg,rg(Rg,Cg,"GeneratorFunction")),Rg.prototype=Object.create(pg),Rg},n.awrap=function(Rg){return{__await:Rg}};function vg(Rg,Xg){function Sg(Yg,Mg,Fg,zg){var xg=ig(Rg[Yg],Rg,Mg);if(xg.type==="throw")zg(xg.arg);else{var Dg=xg.arg,Tg=Dg.value;return Tg&&typeof Tg=="object"&&L.call(Tg,"__await")?Xg.resolve(Tg.__await).then(function(Ug){Sg("next",Ug,Fg,zg)},function(Ug){Sg("throw",Ug,Fg,zg)}):Xg.resolve(Tg).then(function(Ug){Dg.value=Ug,Fg(Dg)},function(Ug){return Sg("throw",Ug,Fg,zg)})}}var Ng;function Hg(Yg,Mg){function Fg(){return new Xg(function(zg,xg){Sg(Yg,Mg,zg,xg)})}return Ng=Ng?Ng.then(Fg,Fg):Fg()}z(this,"_invoke",{value:Hg})}bg(vg.prototype),rg(vg.prototype,tg,function(){return this}),n.AsyncIterator=vg,n.async=function(Rg,Xg,Sg,Ng,Hg){Hg===void 0&&(Hg=Promise);var Yg=new vg(ag(Rg,Xg,Sg,Ng),Hg);return n.isGeneratorFunction(Xg)?Yg:Yg.next().then(function(Mg){return Mg.done?Mg.value:Yg.next()})};function Vg(Rg,Xg,Sg){var Ng=ng;return function(Yg,Mg){if(Ng===sg)throw new Error("Generator is already running");if(Ng===cg){if(Yg==="throw")throw Mg;return Gg()}for(Sg.method=Yg,Sg.arg=Mg;;){var Fg=Sg.delegate;if(Fg){var zg=wg(Fg,Sg);if(zg){if(zg===og)continue;return zg}}if(Sg.method==="next")Sg.sent=Sg._sent=Sg.arg;else if(Sg.method==="throw"){if(Ng===ng)throw Ng=cg,Sg.arg;Sg.dispatchException(Sg.arg)}else Sg.method==="return"&&Sg.abrupt("return",Sg.arg);Ng=sg;var xg=ig(Rg,Xg,Sg);if(xg.type==="normal"){if(Ng=Sg.done?cg:Ag,xg.arg===og)continue;return{value:xg.arg,done:Sg.done}}else xg.type==="throw"&&(Ng=cg,Sg.method="throw",Sg.arg=xg.arg)}}}function wg(Rg,Xg){var Sg=Xg.method,Ng=Rg.iterator[Sg];if(Ng===gg)return Xg.delegate=null,Sg==="throw"&&Rg.iterator.return&&(Xg.method="return",Xg.arg=gg,wg(Rg,Xg),Xg.method==="throw")||Sg!=="return"&&(Xg.method="throw",Xg.arg=new TypeError("The iterator does not provide a '"+Sg+"' method")),og;var Hg=ig(Ng,Rg.iterator,Xg.arg);if(Hg.type==="throw")return Xg.method="throw",Xg.arg=Hg.arg,Xg.delegate=null,og;var Yg=Hg.arg;if(!Yg)return Xg.method="throw",Xg.arg=new TypeError("iterator result is not an object"),Xg.delegate=null,og;if(Yg.done)Xg[Rg.resultName]=Yg.value,Xg.next=Rg.nextLoc,Xg.method!=="return"&&(Xg.method="next",Xg.arg=gg);else return Yg;return Xg.delegate=null,og}bg(pg),rg(pg,Cg,"Generator"),rg(pg,Ig,function(){return this}),rg(pg,"toString",function(){return"[object Generator]"});function yg(Rg){var Xg={tryLoc:Rg[0]};1 in Rg&&(Xg.catchLoc=Rg[1]),2 in Rg&&(Xg.finallyLoc=Rg[2],Xg.afterLoc=Rg[3]),this.tryEntries.push(Xg)}function Zg(Rg){var Xg=Rg.completion||{};Xg.type="normal",delete Xg.arg,Rg.completion=Xg}function Wg(Rg){this.tryEntries=[{tryLoc:"root"}],Rg.forEach(yg,this),this.reset(!0)}n.keys=function(Rg){var Xg=Object(Rg),Sg=[];for(var Ng in Xg)Sg.push(Ng);return Sg.reverse(),function Hg(){for(;Sg.length;){var Yg=Sg.pop();if(Yg in Xg)return Hg.value=Yg,Hg.done=!1,Hg}return Hg.done=!0,Hg}};function Bg(Rg){if(Rg){var Xg=Rg[Ig];if(Xg)return Xg.call(Rg);if(typeof Rg.next=="function")return Rg;if(!isNaN(Rg.length)){var Sg=-1,Ng=function Hg(){for(;++Sg<Rg.length;)if(L.call(Rg,Sg))return Hg.value=Rg[Sg],Hg.done=!1,Hg;return Hg.value=gg,Hg.done=!0,Hg};return Ng.next=Ng}}return{next:Gg}}n.values=Bg;function Gg(){return{value:gg,done:!0}}return Wg.prototype={constructor:Wg,reset:function(Rg){if(this.prev=0,this.next=0,this.sent=this._sent=gg,this.done=!1,this.delegate=null,this.method="next",this.arg=gg,this.tryEntries.forEach(Zg),!Rg)for(var Xg in this)Xg.charAt(0)==="t"&&L.call(this,Xg)&&!isNaN(+Xg.slice(1))&&(this[Xg]=gg)},stop:function(){this.done=!0;var Rg=this.tryEntries[0],Xg=Rg.completion;if(Xg.type==="throw")throw Xg.arg;return this.rval},dispatchException:function(Rg){if(this.done)throw Rg;var Xg=this;function Sg(zg,xg){return Yg.type="throw",Yg.arg=Rg,Xg.next=zg,xg&&(Xg.method="next",Xg.arg=gg),!!xg}for(var Ng=this.tryEntries.length-1;Ng>=0;--Ng){var Hg=this.tryEntries[Ng],Yg=Hg.completion;if(Hg.tryLoc==="root")return Sg("end");if(Hg.tryLoc<=this.prev){var Mg=L.call(Hg,"catchLoc"),Fg=L.call(Hg,"finallyLoc");if(Mg&&Fg){if(this.prev<Hg.catchLoc)return Sg(Hg.catchLoc,!0);if(this.prev<Hg.finallyLoc)return Sg(Hg.finallyLoc)}else if(Mg){if(this.prev<Hg.catchLoc)return Sg(Hg.catchLoc,!0)}else if(Fg){if(this.prev<Hg.finallyLoc)return Sg(Hg.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(Rg,Xg){for(var Sg=this.tryEntries.length-1;Sg>=0;--Sg){var Ng=this.tryEntries[Sg];if(Ng.tryLoc<=this.prev&&L.call(Ng,"finallyLoc")&&this.prev<Ng.finallyLoc){var Hg=Ng;break}}Hg&&(Rg==="break"||Rg==="continue")&&Hg.tryLoc<=Xg&&Xg<=Hg.finallyLoc&&(Hg=null);var Yg=Hg?Hg.completion:{};return Yg.type=Rg,Yg.arg=Xg,Hg?(this.method="next",this.next=Hg.finallyLoc,og):this.complete(Yg)},complete:function(Rg,Xg){if(Rg.type==="throw")throw Rg.arg;return Rg.type==="break"||Rg.type==="continue"?this.next=Rg.arg:Rg.type==="return"?(this.rval=this.arg=Rg.arg,this.method="return",this.next="end"):Rg.type==="normal"&&Xg&&(this.next=Xg),og},finish:function(Rg){for(var Xg=this.tryEntries.length-1;Xg>=0;--Xg){var Sg=this.tryEntries[Xg];if(Sg.finallyLoc===Rg)return this.complete(Sg.completion,Sg.afterLoc),Zg(Sg),og}},catch:function(Rg){for(var Xg=this.tryEntries.length-1;Xg>=0;--Xg){var Sg=this.tryEntries[Xg];if(Sg.tryLoc===Rg){var Ng=Sg.completion;if(Ng.type==="throw"){var Hg=Ng.arg;Zg(Sg)}return Hg}}throw new Error("illegal catch attempt")},delegateYield:function(Rg,Xg,Sg){return this.delegate={iterator:Bg(Rg),resultName:Xg,nextLoc:Sg},this.method==="next"&&(this.arg=gg),og}},n}(r.exports);try{regeneratorRuntime=y}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=y:Function("r","regeneratorRuntime = r")(y)}})(runtime);var getId$3=(r,y)=>`${r}-${y}-${Math.random().toString(16).slice(3,8)}`;const getId$2=getId$3;let jobCounter=0;var createJob$2=({id:r,action:y,payload:n={}})=>{let V=r;return typeof V>"u"&&(V=getId$2("Job",jobCounter),jobCounter+=1),{id:V,action:y,payload:n}},log$2={};let logging=!1;log$2.logging=logging,log$2.setLogging=r=>{logging=r},log$2.log=(...r)=>logging?console.log.apply(void 0,r):null;const createJob$1=createJob$2,{log:log$1}=log$2,getId$1=getId$3;let schedulerCounter=0;var createScheduler$1=()=>{const r=getId$1("Scheduler",schedulerCounter),y={},n={};let V=[];schedulerCounter+=1;const L=()=>V.length,z=()=>Object.keys(y).length,gg=()=>{if(V.length!==0){const rg=Object.keys(y);for(let ag=0;ag<rg.length;ag+=1)if(typeof n[rg[ag]]>"u"){V[0](y[rg[ag]]);break}}},eg=(rg,ag)=>new Promise((ig,ng)=>{const Ag=createJob$1({action:rg,payload:ag});V.push(async sg=>{V.shift(),n[sg.id]=Ag;try{ig(await sg[rg].apply(void 0,[...ag,Ag.id]))}catch(cg){ng(cg)}finally{delete n[sg.id],gg()}}),log$1(`[${r}]: Add ${Ag.id} to JobQueue`),log$1(`[${r}]: JobQueue length=${V.length}`),gg()});return{addWorker:rg=>(y[rg.id]=rg,log$1(`[${r}]: Add ${rg.id}`),log$1(`[${r}]: Number of workers=${z()}`),gg(),rg.id),addJob:async(rg,...ag)=>{if(z()===0)throw Error(`[${r}]: You need to have at least one worker before adding jobs`);return eg(rg,ag)},terminate:async()=>{Object.keys(y).forEach(async rg=>{await y[rg].terminate()}),V=[]},getQueueLen:L,getNumWorkers:z}};function isElectron$1(){return!!(typeof window<"u"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process<"u"&&typeof process.versions=="object"&&process.versions.electron||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0)}var isElectron_1=isElectron$1;const isElectron=isElectron_1;var getEnvironment=r=>{const y={};return typeof WorkerGlobalScope<"u"?y.type="webworker":isElectron()?y.type="electron":typeof window=="object"?y.type="browser":typeof process=="object"&&typeof commonjsRequire=="function"&&(y.type="node"),typeof r>"u"?y:y[r]},resolveUrl={exports:{}},hasRequiredResolveUrl;function requireResolveUrl(){return hasRequiredResolveUrl||(hasRequiredResolveUrl=1,function(r,y){(function(n,V){r.exports=V()})(commonjsGlobal,function(){function n(){var V=arguments.length;if(V===0)throw new Error("resolveUrl requires at least one argument; got none.");var L=document.createElement("base");if(L.href=arguments[0],V===1)return L.href;var z=document.getElementsByTagName("head")[0];z.insertBefore(L,z.firstChild);for(var gg=document.createElement("a"),eg,Ig=1;Ig<V;Ig++)gg.href=arguments[Ig],eg=gg.href,L.href=eg;return z.removeChild(L),eg}return n})}(resolveUrl)),resolveUrl.exports}const isBrowser=getEnvironment("type")==="browser",resolveURL$2=isBrowser?requireResolveUrl():r=>r;var resolvePaths$1=r=>{const y={...r};return["corePath","workerPath","langPath"].forEach(n=>{typeof r[n]<"u"&&(y[n]=resolveURL$2(y[n]))}),y},circularize$1=r=>{const y=[],n=[],V=[],L=[],z=[];return r.blocks.forEach(gg=>{gg.paragraphs.forEach(eg=>{eg.lines.forEach(Ig=>{Ig.words.forEach(tg=>{tg.symbols.forEach(Cg=>{z.push({...Cg,page:r,block:gg,paragraph:eg,line:Ig,word:tg})}),L.push({...tg,page:r,block:gg,paragraph:eg,line:Ig})}),V.push({...Ig,page:r,block:gg,paragraph:eg})}),n.push({...eg,page:r,block:gg})}),y.push({...gg,page:r})}),{...r,blocks:y,paragraphs:n,lines:V,words:L,symbols:z}},OEM$2={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3};const OEM$1=OEM$2;var config={defaultOEM:OEM$1.DEFAULT};const version$1="2.1.5",dependencies$1={"tesseract.js-core":"^2.2.0"},require$$1={version:version$1,dependencies:dependencies$1};var defaultOptions$3={langPath:"https://tessdata.projectnaptha.com/4.0.0",workerBlobURL:!0,logger:()=>{}};const resolveURL$1=requireResolveUrl(),{version,dependencies}=require$$1,defaultOptions$2=defaultOptions$3;var defaultOptions_1={...defaultOptions$2,workerPath:typeof process<"u"&&process.env.TESS_ENV==="development"?resolveURL$1(`/dist/worker.dev.js?nocache=${Math.random().toString(36).slice(3)}`):`https://unpkg.com/tesseract.js@v${version}/dist/worker.min.js`,corePath:`https://unpkg.com/tesseract.js-core@v${dependencies["tesseract.js-core"].substring(1)}/tesseract-core.${typeof WebAssembly=="object"?"wasm":"asm"}.js`},spawnWorker$2=({workerPath:r,workerBlobURL:y})=>{let n;if(Blob&&URL&&y){const V=new Blob([`importScripts("${r}");`],{type:"application/javascript"});n=new Worker(URL.createObjectURL(V))}else n=new Worker(r);return n},terminateWorker$2=r=>{r.terminate()},onMessage$2=(r,y)=>{r.onmessage=({data:n})=>{y(n)}},send$2=async(r,y)=>{r.postMessage(y)},loadImage$3={exports:{}};(function(r){(function(y){function n(z,gg,eg){var Ig=document.createElement("img"),tg;function Cg(rg,ag){ag&&console.log(ag),rg&&n.isInstanceOf("Blob",rg)?(z=rg,tg=n.createObjectURL(z)):(tg=z,eg&&eg.crossOrigin&&(Ig.crossOrigin=eg.crossOrigin)),Ig.src=tg}if(Ig.onerror=function(rg){return n.onerror(Ig,rg,z,tg,gg,eg)},Ig.onload=function(rg){return n.onload(Ig,rg,z,tg,gg,eg)},typeof z=="string")return n.hasMetaOption(eg)?n.fetchBlob(z,Cg,eg):Cg(),Ig;if(n.isInstanceOf("Blob",z)||n.isInstanceOf("File",z))return tg=n.createObjectURL(z),tg?(Ig.src=tg,Ig):n.readFile(z,function(rg){var ag=rg.target;ag&&ag.result?Ig.src=ag.result:gg&&gg(rg)})}var V=y.createObjectURL&&y||y.URL&&URL.revokeObjectURL&&URL||y.webkitURL&&webkitURL;function L(z,gg){z&&z.slice(0,5)==="blob:"&&!(gg&&gg.noRevoke)&&n.revokeObjectURL(z)}n.hasMetaOption=function(z){return z&&z.meta},n.fetchBlob=function(z,gg){gg()},n.isInstanceOf=function(z,gg){return Object.prototype.toString.call(gg)==="[object "+z+"]"},n.transform=function(z,gg,eg,Ig,tg){eg(z,tg)},n.onerror=function(z,gg,eg,Ig,tg,Cg){L(Ig,Cg),tg&&tg.call(z,gg)},n.onload=function(z,gg,eg,Ig,tg,Cg){L(Ig,Cg),tg&&n.transform(z,Cg,tg,eg,{originalWidth:z.naturalWidth||z.width,originalHeight:z.naturalHeight||z.height})},n.createObjectURL=function(z){return V?V.createObjectURL(z):!1},n.revokeObjectURL=function(z){return V?V.revokeObjectURL(z):!1},n.readFile=function(z,gg,eg){if(y.FileReader){var Ig=new FileReader;if(Ig.onload=Ig.onerror=gg,eg=eg||"readAsDataURL",Ig[eg])return Ig[eg](z),Ig}return!1},r.exports?r.exports=n:y.loadImage=n})(typeof window<"u"&&window||commonjsGlobal)})(loadImage$3);var loadImageExports=loadImage$3.exports,loadImageScale={exports:{}};(function(r){(function(y){r.exports?y(loadImageExports):y(window.loadImage)})(function(y){var n=y.transform;y.transform=function(V,L,z,gg,eg){n.call(y,y.scale(V,L,eg),L,z,gg,eg)},y.transformCoordinates=function(){},y.getTransformedOptions=function(V,L){var z=L.aspectRatio,gg,eg,Ig,tg;if(!z)return L;gg={};for(eg in L)Object.prototype.hasOwnProperty.call(L,eg)&&(gg[eg]=L[eg]);return gg.crop=!0,Ig=V.naturalWidth||V.width,tg=V.naturalHeight||V.height,Ig/tg>z?(gg.maxWidth=tg*z,gg.maxHeight=tg):(gg.maxWidth=Ig,gg.maxHeight=Ig/z),gg},y.renderImageToCanvas=function(V,L,z,gg,eg,Ig,tg,Cg,rg,ag,ig){var ng=V.getContext("2d");return ig.imageSmoothingEnabled===!1?ng.imageSmoothingEnabled=!1:ig.imageSmoothingQuality&&(ng.imageSmoothingQuality=ig.imageSmoothingQuality),ng.drawImage(L,z,gg,eg,Ig,tg,Cg,rg,ag),V},y.hasCanvasOption=function(V){return V.canvas||V.crop||!!V.aspectRatio},y.scale=function(V,L,z){L=L||{};var gg=document.createElement("canvas"),eg=V.getContext||y.hasCanvasOption(L)&&gg.getContext,Ig=V.naturalWidth||V.width,tg=V.naturalHeight||V.height,Cg=Ig,rg=tg,ag,ig,ng,Ag,sg,cg,og,lg,ug,dg,hg;function fg(){var pg=Math.max((ng||Cg)/Cg,(Ag||rg)/rg);pg>1&&(Cg*=pg,rg*=pg)}function mg(){var pg=Math.min((ag||Cg)/Cg,(ig||rg)/rg);pg<1&&(Cg*=pg,rg*=pg)}if(eg&&(L=y.getTransformedOptions(V,L,z),og=L.left||0,lg=L.top||0,L.sourceWidth?(sg=L.sourceWidth,L.right!==void 0&&L.left===void 0&&(og=Ig-sg-L.right)):sg=Ig-og-(L.right||0),L.sourceHeight?(cg=L.sourceHeight,L.bottom!==void 0&&L.top===void 0&&(lg=tg-cg-L.bottom)):cg=tg-lg-(L.bottom||0),Cg=sg,rg=cg),ag=L.maxWidth,ig=L.maxHeight,ng=L.minWidth,Ag=L.minHeight,eg&&ag&&ig&&L.crop?(Cg=ag,rg=ig,hg=sg/cg-ag/ig,hg<0?(cg=ig*sg/ag,L.top===void 0&&L.bottom===void 0&&(lg=(tg-cg)/2)):hg>0&&(sg=ag*cg/ig,L.left===void 0&&L.right===void 0&&(og=(Ig-sg)/2))):((L.contain||L.cover)&&(ng=ag=ag||ng,Ag=ig=ig||Ag),L.cover?(mg(),fg()):(fg(),mg())),eg){if(ug=L.pixelRatio,ug>1&&(gg.style.width=Cg+"px",gg.style.height=rg+"px",Cg*=ug,rg*=ug,gg.getContext("2d").scale(ug,ug)),dg=L.downsamplingRatio,dg>0&&dg<1&&Cg<sg&&rg<cg)for(;sg*dg>Cg;)gg.width=sg*dg,gg.height=cg*dg,y.renderImageToCanvas(gg,V,og,lg,sg,cg,0,0,gg.width,gg.height,L),og=0,lg=0,sg=gg.width,cg=gg.height,V=document.createElement("canvas"),V.width=sg,V.height=cg,y.renderImageToCanvas(V,gg,0,0,sg,cg,0,0,sg,cg,L);return gg.width=Cg,gg.height=rg,y.transformCoordinates(gg,L),y.renderImageToCanvas(gg,V,og,lg,sg,cg,0,0,Cg,rg,L)}return V.width=Cg,V.height=rg,V}})})(loadImageScale);var loadImageScaleExports=loadImageScale.exports,loadImageMeta={exports:{}};(function(r){(function(y){r.exports?y(loadImageExports):y(window.loadImage)})(function(y){var n=typeof Blob<"u"&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice);y.blobSlice=n&&function(){var L=this.slice||this.webkitSlice||this.mozSlice;return L.apply(this,arguments)},y.metaDataParsers={jpeg:{65505:[],65517:[]}},y.parseMetaData=function(L,z,gg,eg){gg=gg||{},eg=eg||{};var Ig=this,tg=gg.maxMetaDataSize||262144,Cg=!(typeof DataView<"u"&&L&&L.size>=12&&L.type==="image/jpeg"&&y.blobSlice);(Cg||!y.readFile(y.blobSlice.call(L,0,tg),function(rg){if(rg.target.error){console.log(rg.target.error),z(eg);return}var ag=rg.target.result,ig=new DataView(ag),ng=2,Ag=ig.byteLength-4,sg=ng,cg,og,lg,ug;if(ig.getUint16(0)===65496){for(;ng<Ag&&(cg=ig.getUint16(ng),cg>=65504&&cg<=65519||cg===65534);){if(og=ig.getUint16(ng+2)+2,ng+og>ig.byteLength){console.log("Invalid meta data: Invalid segment size.");break}if(lg=y.metaDataParsers.jpeg[cg],lg&&!gg.disableMetaDataParsers)for(ug=0;ug<lg.length;ug+=1)lg[ug].call(Ig,ig,ng,og,eg,gg);ng+=og,sg=ng}!gg.disableImageHead&&sg>6&&(ag.slice?eg.imageHead=ag.slice(0,sg):eg.imageHead=new Uint8Array(ag).subarray(0,sg))}else console.log("Invalid JPEG file: Missing JPEG marker.");z(eg)},"readAsArrayBuffer"))&&z(eg)},y.replaceHead=function(L,z,gg){y.parseMetaData(L,function(eg){gg(new Blob([z,y.blobSlice.call(L,eg.imageHead.byteLength)],{type:"image/jpeg"}))},{maxMetaDataSize:256,disableMetaDataParsers:!0})};var V=y.transform;y.transform=function(L,z,gg,eg,Ig){y.hasMetaOption(z)?y.parseMetaData(eg,function(tg){V.call(y,L,z,gg,eg,tg)},z,Ig):V.apply(y,arguments)}})})(loadImageMeta);var loadImageMetaExports=loadImageMeta.exports,loadImageFetch={exports:{}};(function(r){(function(y){r.exports?y(loadImageExports):y(window.loadImage)})(function(y){typeof fetch<"u"&&typeof Request<"u"?y.fetchBlob=function(n,V,L){fetch(new Request(n,L)).then(function(z){return z.blob()}).then(V).catch(function(z){V(null,z)})}:typeof XMLHttpRequest<"u"&&typeof ProgressEvent<"u"&&(y.fetchBlob=function(n,V,L){L=L||{};var z=new XMLHttpRequest;z.open(L.method||"GET",n),L.headers&&Object.keys(L.headers).forEach(function(gg){z.setRequestHeader(gg,L.headers[gg])}),z.withCredentials=L.credentials==="include",z.responseType="blob",z.onload=function(){V(z.response)},z.onerror=z.onabort=z.ontimeout=function(gg){V(null,gg)},z.send(L.body)})})})(loadImageFetch);var loadImageExif={exports:{}};(function(r){(function(y){r.exports?y(loadImageExports,loadImageMetaExports):y(window.loadImage)})(function(y){function n(Ig){Ig&&(Object.defineProperty(this,"map",{value:this.privateIFDs[Ig].map}),Object.defineProperty(this,"tags",{value:this.tags&&this.tags[Ig]||{}}))}n.prototype.map={Orientation:274,Thumbnail:513,Exif:34665,GPSInfo:34853,Interoperability:40965},n.prototype.privateIFDs={34665:{name:"Exif",map:{}},34853:{name:"GPSInfo",map:{}},40965:{name:"Interoperability",map:{}}},n.prototype.get=function(Ig){return this[Ig]||this[this.map[Ig]]};function V(Ig,tg,Cg){if(!Cg||tg+Cg>Ig.byteLength){console.log("Invalid Exif data: Invalid thumbnail data.");return}return new Blob([Ig.buffer.slice(tg,tg+Cg)],{type:"image/jpeg"})}var L={1:{getValue:function(Ig,tg){return Ig.getUint8(tg)},size:1},2:{getValue:function(Ig,tg){return String.fromCharCode(Ig.getUint8(tg))},size:1,ascii:!0},3:{getValue:function(Ig,tg,Cg){return Ig.getUint16(tg,Cg)},size:2},4:{getValue:function(Ig,tg,Cg){return Ig.getUint32(tg,Cg)},size:4},5:{getValue:function(Ig,tg,Cg){return Ig.getUint32(tg,Cg)/Ig.getUint32(tg+4,Cg)},size:8},9:{getValue:function(Ig,tg,Cg){return Ig.getInt32(tg,Cg)},size:4},10:{getValue:function(Ig,tg,Cg){return Ig.getInt32(tg,Cg)/Ig.getInt32(tg+4,Cg)},size:8}};L[7]=L[1];function z(Ig,tg,Cg,rg,ag,ig){var ng=L[rg],Ag,sg,cg,og,lg,ug;if(!ng){console.log("Invalid Exif data: Invalid tag type.");return}if(Ag=ng.size*ag,sg=Ag>4?tg+Ig.getUint32(Cg+8,ig):Cg+8,sg+Ag>Ig.byteLength){console.log("Invalid Exif data: Invalid data offset.");return}if(ag===1)return ng.getValue(Ig,sg,ig);for(cg=[],og=0;og<ag;og+=1)cg[og]=ng.getValue(Ig,sg+og*ng.size,ig);if(ng.ascii){for(lg="",og=0;og<cg.length&&(ug=cg[og],ug!=="\0");og+=1)lg+=ug;return lg}return cg}function gg(Ig,tg,Cg,rg,ag,ig,ng,Ag){var sg,cg,og,lg,ug,dg;if(Cg+6>Ig.byteLength){console.log("Invalid Exif data: Invalid directory offset.");return}if(sg=Ig.getUint16(Cg,rg),cg=Cg+2+12*sg,cg+4>Ig.byteLength){console.log("Invalid Exif data: Invalid directory size.");return}for(og=0;og<sg;og+=1)lg=Cg+2+12*og,ug=Ig.getUint16(lg,rg),!(ng&&!ng[ug])&&(Ag&&Ag[ug]===!0||(dg=z(Ig,tg,lg,Ig.getUint16(lg+2,rg),Ig.getUint32(lg+4,rg),rg),ag[ug]=dg,ig&&(ig[ug]=lg)));return Ig.getUint32(cg,rg)}function eg(Ig,tg,Cg,rg,ag,ig,ng){var Ag=Ig.exif[tg];Ag&&(Ig.exif[tg]=new n(tg),Ig.exifOffsets&&(Ig.exifOffsets[tg]=new n(tg)),gg(Cg,rg,rg+Ag,ag,Ig.exif[tg],Ig.exifOffsets&&Ig.exifOffsets[tg],ig&&ig[tg],ng&&ng[tg]))}y.parseExifData=function(Ig,tg,Cg,rg,ag){if(!ag.disableExif){var ig=ag.includeExifTags,ng=ag.excludeExifTags||{34665:{37500:!0}},Ag=tg+10,sg,cg,og;if(Ig.getUint32(tg+4)===1165519206){if(Ag+8>Ig.byteLength){console.log("Invalid Exif data: Invalid segment size.");return}if(Ig.getUint16(tg+8)!==0){console.log("Invalid Exif data: Missing byte alignment offset.");return}switch(Ig.getUint16(Ag)){case 18761:sg=!0;break;case 19789:sg=!1;break;default:console.log("Invalid Exif data: Invalid byte alignment marker.");return}if(Ig.getUint16(Ag+2,sg)!==42){console.log("Invalid Exif data: Missing TIFF marker.");return}cg=Ig.getUint32(Ag+4,sg),rg.exif=new n,ag.disableExifOffsets||(rg.exifOffsets=new n,rg.exifTiffOffset=Ag,rg.exifLittleEndian=sg),cg=gg(Ig,Ag,Ag+cg,sg,rg.exif,rg.exifOffsets,ig,ng),cg&&!ag.disableExifThumbnail&&(cg=gg(Ig,Ag,Ag+cg,sg,rg.exif,rg.exifOffsets,ig,ng),rg.exif[513]&&rg.exif[514]&&(rg.exif[513]=V(Ig,Ag+rg.exif[513],rg.exif[514]))),og=Object.keys(rg.exif.privateIFDs),og.forEach(function(lg){eg(rg,lg,Ig,Ag,sg,ig,ng)})}}},y.metaDataParsers.jpeg[65505].push(y.parseExifData),y.exifWriters={274:function(Ig,tg,Cg){var rg=new DataView(Ig,tg.exifOffsets[274]+8,2);return rg.setUint16(0,Cg,tg.exifLittleEndian),Ig}},y.writeExifData=function(Ig,tg,Cg,rg){y.exifWriters[tg.exif.map[Cg]](Ig,tg,rg)},y.ExifMap=n})})(loadImageExif);var loadImageExifExports=loadImageExif.exports,loadImageExifMap={exports:{}};(function(r){(function(y){r.exports?y(loadImageExports,loadImageExifExports):y(window.loadImage)})(function(y){var n=y.ExifMap.prototype;n.tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright",34665:{36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",42240:"Gamma",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"PhotographicSensitivity",34856:"OECF",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:"LensSpecification",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber"},34853:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"},40965:{1:"InteroperabilityIndex"}},n.stringValues={ExposureProgram:{0:"Undefined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Undefined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},ComponentsConfiguration:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"},Orientation:{1:"top-left",2:"top-right",3:"bottom-right",4:"bottom-left",5:"left-top",6:"right-top",7:"right-bottom",8:"left-bottom"}},n.getText=function(V){var L=this.get(V);switch(V){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":case"Orientation":return this.stringValues[V][L];case"ExifVersion":case"FlashpixVersion":return L?String.fromCharCode(L[0],L[1],L[2],L[3]):void 0;case"ComponentsConfiguration":return L?this.stringValues[V][L[0]]+this.stringValues[V][L[1]]+this.stringValues[V][L[2]]+this.stringValues[V][L[3]]:void 0;case"GPSVersionID":return L?L[0]+"."+L[1]+"."+L[2]+"."+L[3]:void 0}return String(L)},n.getAll=function(){var V={},L,z,gg;for(L in this)Object.prototype.hasOwnProperty.call(this,L)&&(z=this[L],z&&z.getAll?V[this.privateIFDs[L].name]=z.getAll():(gg=this.tags[L],gg&&(V[gg]=this.getText(gg))));return V},n.getName=function(V){var L=this.tags[V];return typeof L=="object"?this.privateIFDs[V].name:L},function(){var V=n.tags,L,z,gg;for(L in V)if(Object.prototype.hasOwnProperty.call(V,L))if(z=n.privateIFDs[L],z){gg=V[L];for(L in gg)Object.prototype.hasOwnProperty.call(gg,L)&&(z.map[gg[L]]=Number(L))}else n.map[V[L]]=Number(L)}()})})(loadImageExifMap);var loadImageIptc={exports:{}};(function(r){(function(y){r.exports?y(loadImageExports,loadImageMetaExports):y(window.loadImage)})(function(y){function n(){}n.prototype.map={ObjectName:5},n.prototype.types={0:"Uint16",200:"Uint16",201:"Uint16",202:"binary"},n.prototype.get=function(tg){return this[tg]||this[this.map[tg]]};function V(tg,Cg,rg){for(var ag="",ig=Cg+rg,ng=Cg;ng<ig;ng+=1)ag+=String.fromCharCode(tg.getUint8(ng));return ag}function L(tg,Cg,rg,ag,ig){return Cg.types[tg]==="binary"?new Blob([rg.buffer.slice(ag,ag+ig)]):Cg.types[tg]==="Uint16"?rg.getUint16(ag):V(rg,ag,ig)}function z(tg,Cg){return tg===void 0?Cg:tg instanceof Array?(tg.push(Cg),tg):[tg,Cg]}function gg(tg,Cg,rg,ag,ig,ng){for(var Ag,sg,cg,og=Cg+rg,lg=Cg;lg<og;)tg.getUint8(lg)===28&&tg.getUint8(lg+1)===2&&(cg=tg.getUint8(lg+2),(!ig||ig[cg])&&(!ng||!ng[cg])&&(sg=tg.getInt16(lg+3),Ag=L(cg,ag.iptc,tg,lg+5,sg),ag.iptc[cg]=z(ag.iptc[cg],Ag),ag.iptcOffsets&&(ag.iptcOffsets[cg]=lg))),lg+=1}function eg(tg,Cg){return tg.getUint32(Cg)===943868237&&tg.getUint16(Cg+4)===1028}function Ig(tg,Cg){var rg=tg.getUint8(Cg+7);return rg%2!==0&&(rg+=1),rg===0&&(rg=4),rg}y.parseIptcData=function(tg,Cg,rg,ag,ig){if(!ig.disableIptc)for(var ng=Cg+rg;Cg+8<ng;){if(eg(tg,Cg)){var Ag=Ig(tg,Cg),sg=Cg+8+Ag;if(sg>ng){console.log("Invalid IPTC data: Invalid segment offset.");break}var cg=tg.getUint16(Cg+6+Ag);if(Cg+cg>ng){console.log("Invalid IPTC data: Invalid segment size.");break}ag.iptc=new n,ig.disableIptcOffsets||(ag.iptcOffsets=new n),gg(tg,sg,cg,ag,ig.includeIptcTags,ig.excludeIptcTags||{202:!0});return}Cg+=1}},y.metaDataParsers.jpeg[65517].push(y.parseIptcData),y.IptcMap=n})})(loadImageIptc);var loadImageIptcExports=loadImageIptc.exports,loadImageIptcMap={exports:{}};(function(r){(function(y){r.exports?y(loadImageExports,loadImageIptcExports):y(window.loadImage)})(function(y){var n=y.IptcMap.prototype;n.tags={0:"ApplicationRecordVersion",3:"ObjectTypeReference",4:"ObjectAttributeReference",5:"ObjectName",7:"EditStatus",8:"EditorialUpdate",10:"Urgency",12:"SubjectReference",15:"Category",20:"SupplementalCategories",22:"FixtureIdentifier",25:"Keywords",26:"ContentLocationCode",27:"ContentLocationName",30:"ReleaseDate",35:"ReleaseTime",37:"ExpirationDate",38:"ExpirationTime",40:"SpecialInstructions",42:"ActionAdvised",45:"ReferenceService",47:"ReferenceDate",50:"ReferenceNumber",55:"DateCreated",60:"TimeCreated",62:"DigitalCreationDate",63:"DigitalCreationTime",65:"OriginatingProgram",70:"ProgramVersion",75:"ObjectCycle",80:"Byline",85:"BylineTitle",90:"City",92:"Sublocation",95:"State",100:"CountryCode",101:"Country",103:"OriginalTransmissionReference",105:"Headline",110:"Credit",115:"Source",116:"CopyrightNotice",118:"Contact",120:"Caption",121:"LocalCaption",122:"Writer",125:"RasterizedCaption",130:"ImageType",131:"ImageOrientation",135:"LanguageIdentifier",150:"AudioType",151:"AudioSamplingRate",152:"AudioSamplingResolution",153:"AudioDuration",154:"AudioOutcue",184:"JobID",185:"MasterDocumentID",186:"ShortDocumentID",187:"UniqueDocumentID",188:"OwnerID",200:"ObjectPreviewFileFormat",201:"ObjectPreviewFileVersion",202:"ObjectPreviewData",221:"Prefs",225:"ClassifyState",228:"SimilarityIndex",230:"DocumentNotes",231:"DocumentHistory",232:"ExifCameraInfo",255:"CatalogSets"},n.stringValues={10:{0:"0 (reserved)",1:"1 (most urgent)",2:"2",3:"3",4:"4",5:"5 (normal urgency)",6:"6",7:"7",8:"8 (least urgent)",9:"9 (user-defined priority)"},75:{a:"Morning",b:"Both Morning and Evening",p:"Evening"},131:{L:"Landscape",P:"Portrait",S:"Square"}},n.getText=function(V){var L=this.get(V),z=this.map[V],gg=this.stringValues[z];return gg?gg[L]:String(L)},n.getAll=function(){var V={},L,z;for(L in this)Object.prototype.hasOwnProperty.call(this,L)&&(z=this.tags[L],z&&(V[z]=this.getText(z)));return V},n.getName=function(V){return this.tags[V]},function(){var V=n.tags,L=n.map||{},z;for(z in V)Object.prototype.hasOwnProperty.call(V,z)&&(L[V[z]]=Number(z))}()})})(loadImageIptcMap);var loadImageOrientation={exports:{}};(function(r){(function(y){r.exports?y(loadImageExports,loadImageScaleExports,loadImageMetaExports):y(window.loadImage)})(function(y){var n=y.hasCanvasOption,V=y.hasMetaOption,L=y.transformCoordinates,z=y.getTransformedOptions;(function(){var gg="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==",eg=document.createElement("img");eg.onload=function(){y.orientation=eg.width===1&&eg.height===2},eg.src=gg})(),y.hasCanvasOption=function(gg){return!!gg.orientation&&!y.orientation||gg.orientation>1&&gg.orientation<9||n.call(y,gg)},y.hasMetaOption=function(gg){return gg&&gg.orientation===!0&&!y.orientation||V.call(y,gg)},y.transformCoordinates=function(gg,eg){L.call(y,gg,eg);var Ig=gg.getContext("2d"),tg=gg.width,Cg=gg.height,rg=gg.style.width,ag=gg.style.height,ig=eg.orientation;if(ig>1&&ig<9)switch(ig>4&&(gg.width=Cg,gg.height=tg,gg.style.width=ag,gg.style.height=rg),ig){case 2:Ig.translate(tg,0),Ig.scale(-1,1);break;case 3:Ig.translate(tg,Cg),Ig.rotate(Math.PI);break;case 4:Ig.translate(0,Cg),Ig.scale(1,-1);break;case 5:Ig.rotate(.5*Math.PI),Ig.scale(1,-1);break;case 6:Ig.rotate(.5*Math.PI),Ig.translate(0,-Cg);break;case 7:Ig.rotate(.5*Math.PI),Ig.translate(tg,-Cg),Ig.scale(-1,1);break;case 8:Ig.rotate(-.5*Math.PI),Ig.translate(-tg,0);break}},y.getTransformedOptions=function(gg,eg,Ig){var tg=z.call(y,gg,eg),Cg=tg.orientation,rg,ag;if(Cg===!0){if(y.orientation)return tg;Cg=Ig&&Ig.exif&&Ig.exif.get("Orientation")}if(!(Cg>1&&Cg<9))return tg;rg={};for(ag in tg)Object.prototype.hasOwnProperty.call(tg,ag)&&(rg[ag]=tg[ag]);switch(rg.orientation=Cg,Cg){case 2:rg.left=tg.right,rg.right=tg.left;break;case 3:rg.left=tg.right,rg.top=tg.bottom,rg.right=tg.left,rg.bottom=tg.top;break;case 4:rg.top=tg.bottom,rg.bottom=tg.top;break;case 5:rg.left=tg.top,rg.top=tg.left,rg.right=tg.bottom,rg.bottom=tg.right;break;case 6:rg.left=tg.top,rg.top=tg.right,rg.right=tg.bottom,rg.bottom=tg.left;break;case 7:rg.left=tg.bottom,rg.top=tg.right,rg.right=tg.top,rg.bottom=tg.left;break;case 8:rg.left=tg.bottom,rg.top=tg.left,rg.right=tg.top,rg.bottom=tg.right;break}return rg.orientation>4&&(rg.maxWidth=tg.maxHeight,rg.maxHeight=tg.maxWidth,rg.minWidth=tg.minHeight,rg.minHeight=tg.minWidth,rg.sourceWidth=tg.sourceHeight,rg.sourceHeight=tg.sourceWidth),rg}})})(loadImageOrientation);var js=loadImageExports;const resolveURL=requireResolveUrl(),blueimpLoadImage=js,readFromBlobOrFile=r=>new Promise((y,n)=>{const V=new FileReader;V.onload=()=>{y(V.result)},V.onerror=({target:{error:{code:L}}})=>{n(Error(`File could not be read! Code=${L}`))},V.readAsArrayBuffer(r)}),fixOrientationFromUrlOrBlobOrFile=r=>new Promise(y=>{blueimpLoadImage(r,n=>n.toBlob(y),{orientation:!0,canvas:!0})}),loadImage$2=async r=>{let y=r;if(typeof r>"u")return"undefined";if(typeof r=="string")if(r.endsWith(".pbm"))y=await(await fetch(resolveURL(r))).arrayBuffer();else{let n=r;/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(r)||(n=resolveURL(r)),y=await readFromBlobOrFile(await fixOrientationFromUrlOrBlobOrFile(n))}else if(r instanceof HTMLElement)r.tagName==="IMG"&&(y=await loadImage$2(r.src)),r.tagName==="VIDEO"&&(y=await loadImage$2(r.poster)),r.tagName==="CANVAS"&&await new Promise(n=>{r.toBlob(async V=>{y=await readFromBlobOrFile(V),n()})});else if(r instanceof File||r instanceof Blob){let n=r;r.name.endsWith(".pbm")||(n=await fixOrientationFromUrlOrBlobOrFile(n)),y=await readFromBlobOrFile(n)}return new Uint8Array(y)};var loadImage_1=loadImage$2;const defaultOptions$1=defaultOptions_1,spawnWorker$1=spawnWorker$2,terminateWorker$1=terminateWorker$2,onMessage$1=onMessage$2,send$1=send$2,loadImage$1=loadImage_1;var browser={defaultOptions:defaultOptions$1,spawnWorker:spawnWorker$1,terminateWorker:terminateWorker$1,onMessage:onMessage$1,send:send$1,loadImage:loadImage$1};const resolvePaths=resolvePaths$1,circularize=circularize$1,createJob=createJob$2,{log}=log$2,getId=getId$3,{defaultOEM}=config,{defaultOptions,spawnWorker,terminateWorker,onMessage,loadImage,send}=browser;let workerCounter=0;var createWorker$2=(r={})=>{const y=getId("Worker",workerCounter),{logger:n,errorHandler:V,...L}=resolvePaths({...defaultOptions,...r}),z={},gg={};let eg=spawnWorker(L);workerCounter+=1;const Ig=(fg,mg)=>{z[fg]=mg},tg=(fg,mg)=>{gg[fg]=mg},Cg=({id:fg,action:mg,payload:pg})=>new Promise((bg,vg)=>{log(`[${y}]: Start ${fg}, action=${mg}`),Ig(mg,bg),tg(mg,vg),send(eg,{workerId:y,jobId:fg,action:mg,payload:pg})}),rg=fg=>Cg(createJob({id:fg,action:"load",payload:{options:L}})),ag=(fg,mg,pg)=>Cg(createJob({id:pg,action:"FS",payload:{method:"writeFile",args:[fg,mg]}})),ig=(fg,mg)=>Cg(createJob({id:mg,action:"FS",payload:{method:"readFile",args:[fg,{encoding:"utf8"}]}})),ng=(fg,mg)=>Cg(createJob({id:mg,action:"FS",payload:{method:"unlink",args:[fg]}})),Ag=(fg,mg,pg)=>Cg(createJob({id:pg,action:"FS",payload:{method:fg,args:mg}})),sg=(fg="eng",mg)=>Cg(createJob({id:mg,action:"loadLanguage",payload:{langs:fg,options:L}})),cg=(fg="eng",mg=defaultOEM,pg)=>Cg(createJob({id:pg,action:"initialize",payload:{langs:fg,oem:mg}})),og=(fg={},mg)=>Cg(createJob({id:mg,action:"setParameters",payload:{params:fg}})),lg=async(fg,mg={},pg)=>Cg(createJob({id:pg,action:"recognize",payload:{image:await loadImage(fg),options:mg}})),ug=(fg="Tesseract OCR Result",mg=!1,pg)=>Cg(createJob({id:pg,action:"getPDF",payload:{title:fg,textonly:mg}})),dg=async(fg,mg)=>Cg(createJob({id:mg,action:"detect",payload:{image:await loadImage(fg)}})),hg=async()=>(eg!==null&&(terminateWorker(eg),eg=null),Promise.resolve());return onMessage(eg,({workerId:fg,jobId:mg,status:pg,action:bg,data:vg})=>{if(pg==="resolve"){log(`[${fg}]: Complete ${mg}`);let Vg=vg;bg==="recognize"?Vg=circularize(vg):bg==="getPDF"&&(Vg=Array.from({...vg,length:Object.keys(vg).length})),z[bg]({jobId:mg,data:Vg})}else if(pg==="reject")if(gg[bg](vg),V)V(vg);else throw Error(vg);else pg==="progress"&&n({...vg,userJobId:mg})}),{id:y,worker:eg,setResolve:Ig,setReject:tg,load:rg,writeText:ag,readText:ig,removeFile:ng,FS:Ag,loadLanguage:sg,initialize:cg,setParameters:og,recognize:lg,getPDF:ug,detect:dg,terminate:hg}};const createWorker$1=createWorker$2,recognize=async(r,y,n)=>{const V=createWorker$1(n);return await V.load(),await V.loadLanguage(y),await V.initialize(y),V.recognize(r).finally(async()=>{await V.terminate()})},detect=async(r,y)=>{const n=createWorker$1(y);return await n.load(),await n.loadLanguage("osd"),await n.initialize("osd"),n.detect(r).finally(async()=>{await n.terminate()})};var Tesseract$1={recognize,detect},languages$1={AFR:"afr",AMH:"amh",ARA:"ara",ASM:"asm",AZE:"aze",AZE_CYRL:"aze_cyrl",BEL:"bel",BEN:"ben",BOD:"bod",BOS:"bos",BUL:"bul",CAT:"cat",CEB:"ceb",CES:"ces",CHI_SIM:"chi_sim",CHI_TRA:"chi_tra",CHR:"chr",CYM:"cym",DAN:"dan",DEU:"deu",DZO:"dzo",ELL:"ell",ENG:"eng",ENM:"enm",EPO:"epo",EST:"est",EUS:"eus",FAS:"fas",FIN:"fin",FRA:"fra",FRK:"frk",FRM:"frm",GLE:"gle",GLG:"glg",GRC:"grc",GUJ:"guj",HAT:"hat",HEB:"heb",HIN:"hin",HRV:"hrv",HUN:"hun",IKU:"iku",IND:"ind",ISL:"isl",ITA:"ita",ITA_OLD:"ita_old",JAV:"jav",JPN:"jpn",KAN:"kan",KAT:"kat",KAT_OLD:"kat_old",KAZ:"kaz",KHM:"khm",KIR:"kir",KOR:"kor",KUR:"kur",LAO:"lao",LAT:"lat",LAV:"lav",LIT:"lit",MAL:"mal",MAR:"mar",MKD:"mkd",MLT:"mlt",MSA:"msa",MYA:"mya",NEP:"nep",NLD:"nld",NOR:"nor",ORI:"ori",PAN:"pan",POL:"pol",POR:"por",PUS:"pus",RON:"ron",RUS:"rus",SAN:"san",SIN:"sin",SLK:"slk",SLV:"slv",SPA:"spa",SPA_OLD:"spa_old",SQI:"sqi",SRP:"srp",SRP_LATN:"srp_latn",SWA:"swa",SWE:"swe",SYR:"syr",TAM:"tam",TEL:"tel",TGK:"tgk",TGL:"tgl",THA:"tha",TIR:"tir",TUR:"tur",UIG:"uig",UKR:"ukr",URD:"urd",UZB:"uzb",UZB_CYRL:"uzb_cyrl",VIE:"vie",YID:"yid"},PSM$1={OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",CIRCLE_WORD:"9",SINGLE_CHAR:"10",SPARSE_TEXT:"11",SPARSE_TEXT_OSD:"12"};const createScheduler=createScheduler$1,createWorker=createWorker$2,Tesseract=Tesseract$1,languages=languages$1,OEM=OEM$2,PSM=PSM$1,{setLogging}=log$2;var src={languages,OEM,PSM,createScheduler,createWorker,setLogging,...Tesseract};const _hoisted_1$1={id:"app"},_hoisted_2$1=["src"],_sfc_main$1=Object.assign({name:"QsyxImgToText"},{__name:"index",props:{src:String},emits:["getText"],setup(r,{emit:y}){const n=y,V=r,L=vue.ref(null),z=src.createWorker({}),gg=async()=>{if(console.log("props.src.includes('http://')",V.src.includes("http://")),await z.load(),console.log(1),await z.loadLanguage("chi_sim+eng"),console.log(2),await z.initialize("chi_sim+eng",src.OEM.LSTM_ONLY),console.log(3),await z.setParameters({tessedit_pageseg_mode:src.PSM.SINGLE_BLOCK}),console.log(4),V.src.includes("http://")){const{data:{text:eg}}=await z.recognize(V.src)}else{const{data:{text:eg}}=await z.recognize(L.value)}n("getText",text),console.log("识别结果:",text)};return vue.onMounted(()=>{gg()}),vue.onUnmounted(async()=>{await z.terminate()}),(eg,Ig)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$1,[vue.createElementVNode("img",{ref_key:"imageRef",ref:L,alt:"Vue logo",src:r.src},null,8,_hoisted_2$1)]))}}),QsyxImgToText=withInstall$1(_sfc_main$1);var exceljs_min={exports:{}};/*! ExcelJS 21-08-2021 */(function(r,y){(function(n){r.exports=n()})(function(){return function n(V,L,z){function gg(tg,Cg){if(!L[tg]){if(!V[tg]){var rg=typeof commonjsRequire=="function"&&commonjsRequire;if(!Cg&&rg)return rg(tg,!0);if(eg)return eg(tg,!0);var ag=new Error("Cannot find module '"+tg+"'");throw ag.code="MODULE_NOT_FOUND",ag}var ig=L[tg]={exports:{}};V[tg][0].call(ig.exports,function(ng){return gg(V[tg][1][ng]||ng)},ig,ig.exports,n,V,L,z)}return L[tg].exports}for(var eg=typeof commonjsRequire=="function"&&commonjsRequire,Ig=0;Ig<z.length;Ig++)gg(z[Ig]);return gg}({1:[function(n,V,L){function z(og){return(z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lg){return typeof lg}:function(lg){return lg&&typeof Symbol=="function"&&lg.constructor===Symbol&&lg!==Symbol.prototype?"symbol":typeof lg})(og)}function gg(og,lg,ug,dg,hg,fg,mg){try{var pg=og[fg](mg),bg=pg.value}catch(vg){return void ug(vg)}pg.done?lg(bg):Promise.resolve(bg).then(dg,hg)}function eg(og){return function(){var lg=this,ug=arguments;return new Promise(function(dg,hg){var fg=og.apply(lg,ug);function mg(bg){gg(fg,dg,hg,mg,pg,"next",bg)}function pg(bg){gg(fg,dg,hg,mg,pg,"throw",bg)}mg(void 0)})}}function Ig(og,lg){for(var ug=0;ug<lg.length;ug++){var dg=lg[ug];dg.enumerable=dg.enumerable||!1,dg.configurable=!0,"value"in dg&&(dg.writable=!0),Object.defineProperty(og,dg.key,dg)}}var tg=n("fs"),Cg=n("fast-csv"),rg=n("dayjs/plugin/customParseFormat"),ag=n("dayjs/plugin/utc"),ig=n("dayjs").extend(rg).extend(ag),ng=n("../utils/stream-buf"),Ag=n("../utils/utils").fs.exists,sg={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}},cg=function(){function og(fg){(function(mg,pg){if(!(mg instanceof pg))throw new TypeError("Cannot call a class as a function")})(this,og),this.workbook=fg,this.worksheet=null}var lg,ug,dg,hg;return lg=og,(ug=[{key:"readFile",value:(hg=eg(regeneratorRuntime.mark(function fg(mg,pg){var bg,vg;return regeneratorRuntime.wrap(function(Vg){for(;;)switch(Vg.prev=Vg.next){case 0:return pg=pg||{},Vg.next=3,Ag(mg);case 3:if(Vg.sent){Vg.next=5;break}throw new Error("File not found: ".concat(mg));case 5:return bg=tg.createReadStream(mg),Vg.next=8,this.read(bg,pg);case 8:return vg=Vg.sent,bg.close(),Vg.abrupt("return",vg);case 11:case"end":return Vg.stop()}},fg,this)})),function(fg,mg){return hg.apply(this,arguments)})},{key:"read",value:function(fg,mg){var pg=this;return mg=mg||{},new Promise(function(bg,vg){var Vg=pg.workbook.addWorksheet(mg.sheetName),wg=mg.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],yg=mg.map||function(Wg){if(Wg==="")return null;var Bg=Number(Wg);if(!Number.isNaN(Bg)&&Bg!==1/0)return Bg;var Gg=wg.reduce(function(Xg,Sg){if(Xg)return Xg;var Ng=ig(Wg,Sg,!0);return Ng.isValid()?Ng:null},null);if(Gg)return new Date(Gg.valueOf());var Rg=sg[Wg];return Rg!==void 0?Rg:Wg},Zg=Cg.parse(mg.parserOptions).on("data",function(Wg){Vg.addRow(Wg.map(yg))}).on("end",function(){Zg.emit("worksheet",Vg)});Zg.on("worksheet",bg).on("error",vg),fg.pipe(Zg)})}},{key:"createInputStream",value:function(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}},{key:"write",value:function(fg,mg){var pg=this;return new Promise(function(bg,vg){mg=mg||{};var Vg=pg.workbook.getWorksheet(mg.sheetName||mg.sheetId),wg=Cg.format(mg.formatterOptions);fg.on("finish",function(){bg()}),wg.on("error",vg),wg.pipe(fg);var yg=mg,Zg=yg.dateFormat,Wg=yg.dateUTC,Bg=mg.map||function(Xg){if(Xg){if(Xg.text||Xg.hyperlink)return Xg.hyperlink||Xg.text||"";if(Xg.formula||Xg.result)return Xg.result||"";if(Xg instanceof Date)return Zg?Wg?ig.utc(Xg).format(Zg):ig(Xg).format(Zg):Wg?ig.utc(Xg).format():ig(Xg).format();if(Xg.error)return Xg.error;if(z(Xg)==="object")return JSON.stringify(Xg)}return Xg},Gg=mg.includeEmptyRows===void 0||mg.includeEmptyRows,Rg=1;Vg&&Vg.eachRow(function(Xg,Sg){if(Gg)for(;Rg++<Sg-1;)wg.write([]);var Ng=Xg.values;Ng.shift(),wg.write(Ng.map(Bg)),Rg=Sg}),wg.end()})}},{key:"writeFile",value:function(fg,mg){var pg={encoding:(mg=mg||{}).encoding||"utf8"},bg=tg.createWriteStream(fg,pg);return this.write(bg,mg)}},{key:"writeBuffer",value:(dg=eg(regeneratorRuntime.mark(function fg(mg){var pg;return regeneratorRuntime.wrap(function(bg){for(;;)switch(bg.prev=bg.next){case 0:return pg=new ng,bg.next=3,this.write(pg,mg);case 3:return bg.abrupt("return",pg.read());case 4:case"end":return bg.stop()}},fg,this)})),function(fg){return dg.apply(this,arguments)})}])&&Ig(lg.prototype,ug),og}();V.exports=cg},{"../utils/stream-buf":23,"../utils/utils":26,dayjs:336,"dayjs/plugin/customParseFormat":337,"dayjs/plugin/utc":338,"fast-csv":369,fs:215}],2:[function(n,V,L){function z(tg,Cg){if(!(tg instanceof Cg))throw new TypeError("Cannot call a class as a function")}function gg(tg,Cg){for(var rg=0;rg<Cg.length;rg++){var ag=Cg[rg];ag.enumerable=ag.enumerable||!1,ag.configurable=!0,"value"in ag&&(ag.writable=!0),Object.defineProperty(tg,ag.key,ag)}}var eg=n("../utils/col-cache"),Ig=function(){function tg(ig,ng){var Ag=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(z(this,tg),ng)if(typeof ng=="string"){var sg=eg.decodeAddress(ng);this.nativeCol=sg.col+Ag,this.nativeColOff=0,this.nativeRow=sg.row+Ag,this.nativeRowOff=0}else ng.nativeCol!==void 0?(this.nativeCol=ng.nativeCol||0,this.nativeColOff=ng.nativeColOff||0,this.nativeRow=ng.nativeRow||0,this.nativeRowOff=ng.nativeRowOff||0):ng.col!==void 0?(this.col=ng.col+Ag,this.row=ng.row+Ag):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0;this.worksheet=ig}var Cg,rg,ag;return Cg=tg,ag=[{key:"asInstance",value:function(ig){return ig instanceof tg||ig==null?ig:new tg(ig)}}],(rg=[{key:"col",get:function(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth},set:function(ig){this.nativeCol=Math.floor(ig),this.nativeColOff=Math.floor((ig-this.nativeCol)*this.colWidth)}},{key:"row",get:function(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight},set:function(ig){this.nativeRow=Math.floor(ig),this.nativeRowOff=Math.floor((ig-this.nativeRow)*this.rowHeight)}},{key:"colWidth",get:function(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}},{key:"rowHeight",get:function(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}},{key:"model",get:function(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}},set:function(ig){this.nativeCol=ig.nativeCol,this.nativeColOff=ig.nativeColOff,this.nativeRow=ig.nativeRow,this.nativeRowOff=ig.nativeRowOff}}])&&gg(Cg.prototype,rg),ag&&gg(Cg,ag),tg}();V.exports=Ig},{"../utils/col-cache":19}],3:[function(n,V,L){function z(vg,Vg){if(!(vg instanceof Vg))throw new TypeError("Cannot call a class as a function")}function gg(vg,Vg){for(var wg=0;wg<Vg.length;wg++){var yg=Vg[wg];yg.enumerable=yg.enumerable||!1,yg.configurable=!0,"value"in yg&&(yg.writable=!0),Object.defineProperty(vg,yg.key,yg)}}function eg(vg,Vg,wg){return Vg&&gg(vg.prototype,Vg),vg}var Ig=n("../utils/col-cache"),tg=n("../utils/under-dash"),Cg=n("./enums"),rg=n("../utils/shared-formula").slideFormula,ag=n("./note"),ig=function(){function vg(Vg,wg,yg){if(z(this,vg),!Vg||!wg)throw new Error("A Cell needs a Row");this._row=Vg,this._column=wg,Ig.validateAddress(yg),this._address=yg,this._value=bg.create(vg.Types.Null,this),this.style=this._mergeStyle(Vg.style,wg.style,{}),this._mergeCount=0}return eg(vg,[{key:"destroy",value:function(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}},{key:"_mergeStyle",value:function(Vg,wg,yg){var Zg=Vg&&Vg.numFmt||wg&&wg.numFmt;Zg&&(yg.numFmt=Zg);var Wg=Vg&&Vg.font||wg&&wg.font;Wg&&(yg.font=Wg);var Bg=Vg&&Vg.alignment||wg&&wg.alignment;Bg&&(yg.alignment=Bg);var Gg=Vg&&Vg.border||wg&&wg.border;Gg&&(yg.border=Gg);var Rg=Vg&&Vg.fill||wg&&wg.fill;Rg&&(yg.fill=Rg);var Xg=Vg&&Vg.protection||wg&&wg.protection;return Xg&&(yg.protection=Xg),yg}},{key:"toCsvString",value:function(){return this._value.toCsvString()}},{key:"addMergeRef",value:function(){this._mergeCount++}},{key:"releaseMergeRef",value:function(){this._mergeCount--}},{key:"merge",value:function(Vg,wg){this._value.release(),this._value=bg.create(vg.Types.Merge,this,Vg),wg||(this.style=Vg.style)}},{key:"unmerge",value:function(){this.type===vg.Types.Merge&&(this._value.release(),this._value=bg.create(vg.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}},{key:"isMergedTo",value:function(Vg){return this._value.type===vg.Types.Merge&&this._value.isMergedTo(Vg)}},{key:"toString",value:function(){return this.text}},{key:"_upgradeToHyperlink",value:function(Vg){this.type===vg.Types.String&&(this._value=bg.create(vg.Types.Hyperlink,this,{text:this._value.value,hyperlink:Vg}))}},{key:"addName",value:function(Vg){this.workbook.definedNames.addEx(this.fullAddress,Vg)}},{key:"removeName",value:function(Vg){this.workbook.definedNames.removeEx(this.fullAddress,Vg)}},{key:"removeAllNames",value:function(){this.workbook.definedNames.removeAllNames(this.fullAddress)}},{key:"worksheet",get:function(){return this._row.worksheet}},{key:"workbook",get:function(){return this._row.worksheet.workbook}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(Vg){this.style.numFmt=Vg}},{key:"font",get:function(){return this.style.font},set:function(Vg){this.style.font=Vg}},{key:"alignment",get:function(){return this.style.alignment},set:function(Vg){this.style.alignment=Vg}},{key:"border",get:function(){return this.style.border},set:function(Vg){this.style.border=Vg}},{key:"fill",get:function(){return this.style.fill},set:function(Vg){this.style.fill=Vg}},{key:"protection",get:function(){return this.style.protection},set:function(Vg){this.style.protection=Vg}},{key:"address",get:function(){return this._address}},{key:"row",get:function(){return this._row.number}},{key:"col",get:function(){return this._column.number}},{key:"$col$row",get:function(){return"$".concat(this._column.letter,"$").concat(this.row)}},{key:"type",get:function(){return this._value.type}},{key:"effectiveType",get:function(){return this._value.effectiveType}},{key:"isMerged",get:function(){return this._mergeCount>0||this.type===vg.Types.Merge}},{key:"master",get:function(){return this.type===vg.Types.Merge?this._value.master:this}},{key:"isHyperlink",get:function(){return this._value.type===vg.Types.Hyperlink}},{key:"hyperlink",get:function(){return this._value.hyperlink}},{key:"value",get:function(){return this._value.value},set:function(Vg){this.type!==vg.Types.Merge?(this._value.release(),this._value=bg.create(bg.getType(Vg),this,Vg)):this._value.master.value=Vg}},{key:"note",get:function(){return this._comment&&this._comment.note},set:function(Vg){this._comment=new ag(Vg)}},{key:"text",get:function(){return this._value.toString()}},{key:"html",get:function(){return tg.escapeHtml(this.text)}},{key:"formula",get:function(){return this._value.formula}},{key:"result",get:function(){return this._value.result}},{key:"formulaType",get:function(){return this._value.formulaType}},{key:"fullAddress",get:function(){return{sheetName:this._row.worksheet.name,address:this.address,row:this.row,col:this.col}}},{key:"name",get:function(){return this.names[0]},set:function(Vg){this.names=[Vg]}},{key:"names",get:function(){return this.workbook.definedNames.getNamesEx(this.fullAddress)},set:function(Vg){var wg=this,yg=this.workbook.definedNames;yg.removeAllNames(this.fullAddress),Vg.forEach(function(Zg){yg.addEx(wg.fullAddress,Zg)})}},{key:"_dataValidations",get:function(){return this.worksheet.dataValidations}},{key:"dataValidation",get:function(){return this._dataValidations.find(this.address)},set:function(Vg){this._dataValidations.add(this.address,Vg)}},{key:"model",get:function(){var Vg=this._value.model;return Vg.style=this.style,this._comment&&(Vg.comment=this._comment.model),Vg},set:function(Vg){if(this._value.release(),this._value=bg.create(Vg.type,this),this._value.model=Vg,Vg.comment)switch(Vg.comment.type){case"note":this._comment=ag.fromModel(Vg.comment)}Vg.style?this.style=Vg.style:this.style={}}}]),vg}();ig.Types=Cg.ValueType;var ng=function(){function vg(Vg){z(this,vg),this.model={address:Vg.address,type:ig.Types.Null}}return eg(vg,[{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){}},{key:"toString",value:function(){return""}},{key:"value",get:function(){return null},set:function(Vg){}},{key:"type",get:function(){return ig.Types.Null}},{key:"effectiveType",get:function(){return ig.Types.Null}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),Ag=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.Number,value:wg}}return eg(vg,[{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(Vg){this.model.value=Vg}},{key:"type",get:function(){return ig.Types.Number}},{key:"effectiveType",get:function(){return ig.Types.Number}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),sg=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.String,value:wg}}return eg(vg,[{key:"toCsvString",value:function(){return'"'.concat(this.model.value.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}},{key:"value",get:function(){return this.model.value},set:function(Vg){this.model.value=Vg}},{key:"type",get:function(){return ig.Types.String}},{key:"effectiveType",get:function(){return ig.Types.String}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),cg=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.String,value:wg}}return eg(vg,[{key:"toString",value:function(){return this.model.value.richText.map(function(Vg){return Vg.text}).join("")}},{key:"toCsvString",value:function(){return'"'.concat(this.text.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"value",get:function(){return this.model.value},set:function(Vg){this.model.value=Vg}},{key:"type",get:function(){return ig.Types.RichText}},{key:"effectiveType",get:function(){return ig.Types.RichText}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),og=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.Date,value:wg}}return eg(vg,[{key:"toCsvString",value:function(){return this.model.value.toISOString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(Vg){this.model.value=Vg}},{key:"type",get:function(){return ig.Types.Date}},{key:"effectiveType",get:function(){return ig.Types.Date}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),lg=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.Hyperlink,text:wg?wg.text:void 0,hyperlink:wg?wg.hyperlink:void 0},wg&&wg.tooltip&&(this.model.tooltip=wg.tooltip)}return eg(vg,[{key:"toCsvString",value:function(){return this.model.hyperlink}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.text}},{key:"value",get:function(){var Vg={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(Vg.tooltip=this.model.tooltip),Vg},set:function(Vg){this.model={text:Vg.text,hyperlink:Vg.hyperlink},Vg.tooltip&&(this.model.tooltip=Vg.tooltip)}},{key:"text",get:function(){return this.model.text},set:function(Vg){this.model.text=Vg}},{key:"hyperlink",get:function(){return this.model.hyperlink},set:function(Vg){this.model.hyperlink=Vg}},{key:"type",get:function(){return ig.Types.Hyperlink}},{key:"effectiveType",get:function(){return ig.Types.Hyperlink}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),ug=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.Merge,master:wg?wg.address:void 0},this._master=wg,wg&&wg.addMergeRef()}return eg(vg,[{key:"isMergedTo",value:function(Vg){return Vg===this._master}},{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){this._master.releaseMergeRef()}},{key:"toString",value:function(){return this.value.toString()}},{key:"value",get:function(){return this._master.value},set:function(Vg){Vg instanceof ig?(this._master&&this._master.releaseMergeRef(),Vg.addMergeRef(),this._master=Vg):this._master.value=Vg}},{key:"master",get:function(){return this._master}},{key:"type",get:function(){return ig.Types.Merge}},{key:"effectiveType",get:function(){return this._master.effectiveType}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),dg=function(){function vg(Vg,wg){z(this,vg),this.cell=Vg,this.model={address:Vg.address,type:ig.Types.Formula,shareType:wg?wg.shareType:void 0,ref:wg?wg.ref:void 0,formula:wg?wg.formula:void 0,sharedFormula:wg?wg.sharedFormula:void 0,result:wg?wg.result:void 0}}return eg(vg,[{key:"_copyModel",value:function(Vg){var wg={},yg=function(Zg){var Wg=Vg[Zg];Wg&&(wg[Zg]=Wg)};return yg("formula"),yg("result"),yg("ref"),yg("shareType"),yg("sharedFormula"),wg}},{key:"validate",value:function(Vg){switch(bg.getType(Vg)){case ig.Types.Null:case ig.Types.String:case ig.Types.Number:case ig.Types.Date:break;case ig.Types.Hyperlink:case ig.Types.Formula:default:throw new Error("Cannot process that type of result value")}}},{key:"_getTranslatedFormula",value:function(){if(!this._translatedFormula&&this.model.sharedFormula){var Vg=this.cell.worksheet.findCell(this.model.sharedFormula);this._translatedFormula=Vg&&rg(Vg.formula,Vg.address,this.model.address)}return this._translatedFormula}},{key:"toCsvString",value:function(){return"".concat(this.model.result||"")}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.result?this.model.result.toString():""}},{key:"value",get:function(){return this._copyModel(this.model)},set:function(Vg){this.model=this._copyModel(Vg)}},{key:"dependencies",get:function(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}},{key:"formula",get:function(){return this.model.formula||this._getTranslatedFormula()},set:function(Vg){this.model.formula=Vg}},{key:"formulaType",get:function(){return this.model.formula?Cg.FormulaType.Master:this.model.sharedFormula?Cg.FormulaType.Shared:Cg.FormulaType.None}},{key:"result",get:function(){return this.model.result},set:function(Vg){this.model.result=Vg}},{key:"type",get:function(){return ig.Types.Formula}},{key:"effectiveType",get:function(){var Vg=this.model.result;return Vg==null?Cg.ValueType.Null:Vg instanceof String||typeof Vg=="string"?Cg.ValueType.String:typeof Vg=="number"?Cg.ValueType.Number:Vg instanceof Date?Cg.ValueType.Date:Vg.text&&Vg.hyperlink?Cg.ValueType.Hyperlink:Vg.formula?Cg.ValueType.Formula:Cg.ValueType.Null}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),hg=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.SharedString,value:wg}}return eg(vg,[{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(Vg){this.model.value=Vg}},{key:"type",get:function(){return ig.Types.SharedString}},{key:"effectiveType",get:function(){return ig.Types.SharedString}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),fg=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.Boolean,value:wg}}return eg(vg,[{key:"toCsvString",value:function(){return this.model.value?1:0}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(Vg){this.model.value=Vg}},{key:"type",get:function(){return ig.Types.Boolean}},{key:"effectiveType",get:function(){return ig.Types.Boolean}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),mg=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.Error,value:wg}}return eg(vg,[{key:"toCsvString",value:function(){return this.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.error.toString()}},{key:"value",get:function(){return this.model.value},set:function(Vg){this.model.value=Vg}},{key:"type",get:function(){return ig.Types.Error}},{key:"effectiveType",get:function(){return ig.Types.Error}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),pg=function(){function vg(Vg,wg){z(this,vg),this.model={address:Vg.address,type:ig.Types.String,value:JSON.stringify(wg),rawValue:wg}}return eg(vg,[{key:"toCsvString",value:function(){return this.model.value}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}},{key:"value",get:function(){return this.model.rawValue},set:function(Vg){this.model.rawValue=Vg,this.model.value=JSON.stringify(Vg)}},{key:"type",get:function(){return ig.Types.String}},{key:"effectiveType",get:function(){return ig.Types.String}},{key:"address",get:function(){return this.model.address},set:function(Vg){this.model.address=Vg}}]),vg}(),bg={getType:function(vg){return vg==null?ig.Types.Null:vg instanceof String||typeof vg=="string"?ig.Types.String:typeof vg=="number"?ig.Types.Number:typeof vg=="boolean"?ig.Types.Boolean:vg instanceof Date?ig.Types.Date:vg.text&&vg.hyperlink?ig.Types.Hyperlink:vg.formula||vg.sharedFormula?ig.Types.Formula:vg.richText?ig.Types.RichText:vg.sharedString?ig.Types.SharedString:vg.error?ig.Types.Error:ig.Types.JSON},types:[{t:ig.Types.Null,f:ng},{t:ig.Types.Number,f:Ag},{t:ig.Types.String,f:sg},{t:ig.Types.Date,f:og},{t:ig.Types.Hyperlink,f:lg},{t:ig.Types.Formula,f:dg},{t:ig.Types.Merge,f:ug},{t:ig.Types.JSON,f:pg},{t:ig.Types.SharedString,f:hg},{t:ig.Types.RichText,f:cg},{t:ig.Types.Boolean,f:fg},{t:ig.Types.Error,f:mg}].reduce(function(vg,Vg){return vg[Vg.t]=Vg.f,vg},[]),create:function(vg,Vg,wg){var yg=this.types[vg];if(!yg)throw new Error("Could not create Value of type ".concat(vg));return new yg(Vg,wg)}};V.exports=ig},{"../utils/col-cache":19,"../utils/shared-formula":22,"../utils/under-dash":25,"./enums":7,"./note":9}],4:[function(n,V,L){function z(Cg,rg){for(var ag=0;ag<rg.length;ag++){var ig=rg[ag];ig.enumerable=ig.enumerable||!1,ig.configurable=!0,"value"in ig&&(ig.writable=!0),Object.defineProperty(Cg,ig.key,ig)}}var gg=n("../utils/under-dash"),eg=n("./enums"),Ig=n("../utils/col-cache"),tg=function(){function Cg(ng,Ag,sg){(function(cg,og){if(!(cg instanceof og))throw new TypeError("Cannot call a class as a function")})(this,Cg),this._worksheet=ng,this._number=Ag,sg!==!1&&(this.defn=sg)}var rg,ag,ig;return rg=Cg,ig=[{key:"toModel",value:function(ng){var Ag=[],sg=null;return ng&&ng.forEach(function(cg,og){cg.isDefault?sg&&(sg=null):sg&&cg.equivalentTo(sg)?sg.max=og+1:(sg={min:og+1,max:og+1,width:cg.width!==void 0?cg.width:9,style:cg.style,isCustomWidth:cg.isCustomWidth,hidden:cg.hidden,outlineLevel:cg.outlineLevel,collapsed:cg.collapsed},Ag.push(sg))}),Ag.length?Ag:void 0}},{key:"fromModel",value:function(ng,Ag){Ag=Ag||[];for(var sg=[],cg=1,og=0;og<Ag.length;){for(var lg=Ag[og++];cg<lg.min;)sg.push(new Cg(ng,cg++));for(;cg<=lg.max;)sg.push(new Cg(ng,cg++,lg))}return sg.length?sg:null}}],(ag=[{key:"toString",value:function(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}},{key:"equivalentTo",value:function(ng){return this.width===ng.width&&this.hidden===ng.hidden&&this.outlineLevel===ng.outlineLevel&&gg.isEqual(this.style,ng.style)}},{key:"eachCell",value:function(ng,Ag){var sg=this.number;Ag||(Ag=ng,ng=null),this._worksheet.eachRow(ng,function(cg,og){Ag(cg.getCell(sg),og)})}},{key:"_applyStyle",value:function(ng,Ag){return this.style[ng]=Ag,this.eachCell(function(sg){sg[ng]=Ag}),Ag}},{key:"number",get:function(){return this._number}},{key:"worksheet",get:function(){return this._worksheet}},{key:"letter",get:function(){return Ig.n2l(this._number)}},{key:"isCustomWidth",get:function(){return this.width!==void 0&&this.width!==9}},{key:"defn",get:function(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}},set:function(ng){ng?(this.key=ng.key,this.width=ng.width!==void 0?ng.width:9,this.outlineLevel=ng.outlineLevel,ng.style?this.style=ng.style:this.style={},this.header=ng.header,this._hidden=!!ng.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}},{key:"headers",get:function(){return this._header&&this._header instanceof Array?this._header:[this._header]}},{key:"header",get:function(){return this._header},set:function(ng){var Ag=this;ng!==void 0?(this._header=ng,this.headers.forEach(function(sg,cg){Ag._worksheet.getCell(cg+1,Ag.number).value=sg})):this._header=void 0}},{key:"key",get:function(){return this._key},set:function(ng){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=ng,ng&&this._worksheet.setColumnKey(this._key,this)}},{key:"hidden",get:function(){return!!this._hidden},set:function(ng){this._hidden=ng}},{key:"outlineLevel",get:function(){return this._outlineLevel||0},set:function(ng){this._outlineLevel=ng}},{key:"collapsed",get:function(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}},{key:"isDefault",get:function(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;var ng=this.style;return!ng||!(ng.font||ng.numFmt||ng.alignment||ng.border||ng.fill||ng.protection)}},{key:"headerCount",get:function(){return this.headers.length}},{key:"values",get:function(){var ng=[];return this.eachCell(function(Ag,sg){Ag&&Ag.type!==eg.ValueType.Null&&(ng[sg]=Ag.value)}),ng},set:function(ng){var Ag=this;if(ng){var sg=this.number,cg=0;ng.hasOwnProperty("0")&&(cg=1),ng.forEach(function(og,lg){Ag._worksheet.getCell(lg+cg,sg).value=og})}}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(ng){this._applyStyle("numFmt",ng)}},{key:"font",get:function(){return this.style.font},set:function(ng){this._applyStyle("font",ng)}},{key:"alignment",get:function(){return this.style.alignment},set:function(ng){this._applyStyle("alignment",ng)}},{key:"protection",get:function(){return this.style.protection},set:function(ng){this._applyStyle("protection",ng)}},{key:"border",get:function(){return this.style.border},set:function(ng){this._applyStyle("border",ng)}},{key:"fill",get:function(){return this.style.fill},set:function(ng){this._applyStyle("fill",ng)}}])&&z(rg.prototype,ag),ig&&z(rg,ig),Cg}();V.exports=tg},{"../utils/col-cache":19,"../utils/under-dash":25,"./enums":7}],5:[function(n,V,L){function z(eg,Ig){for(var tg=0;tg<Ig.length;tg++){var Cg=Ig[tg];Cg.enumerable=Cg.enumerable||!1,Cg.configurable=!0,"value"in Cg&&(Cg.writable=!0),Object.defineProperty(eg,Cg.key,Cg)}}var gg=function(){function eg(Cg){(function(rg,ag){if(!(rg instanceof ag))throw new TypeError("Cannot call a class as a function")})(this,eg),this.model=Cg||{}}var Ig,tg;return Ig=eg,(tg=[{key:"add",value:function(Cg,rg){return this.model[Cg]=rg}},{key:"find",value:function(Cg){return this.model[Cg]}},{key:"remove",value:function(Cg){this.model[Cg]=void 0}}])&&z(Ig.prototype,tg),eg}();V.exports=gg},{}],6:[function(n,V,L){function z(ag,ig){for(var ng=0;ng<ig.length;ng++){var Ag=ig[ng];Ag.enumerable=Ag.enumerable||!1,Ag.configurable=!0,"value"in Ag&&(Ag.writable=!0),Object.defineProperty(ag,Ag.key,Ag)}}var gg=n("../utils/under-dash"),eg=n("../utils/col-cache"),Ig=n("../utils/cell-matrix"),tg=n("./range"),Cg=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/,rg=function(){function ag(){(function(Ag,sg){if(!(Ag instanceof sg))throw new TypeError("Cannot call a class as a function")})(this,ag),this.matrixMap={}}var ig,ng;return ig=ag,(ng=[{key:"getMatrix",value:function(Ag){return this.matrixMap[Ag]||(this.matrixMap[Ag]=new Ig)}},{key:"add",value:function(Ag,sg){var cg=eg.decodeEx(Ag);this.addEx(cg,sg)}},{key:"addEx",value:function(Ag,sg){var cg=this.getMatrix(sg);if(Ag.top)for(var og=Ag.left;og<=Ag.right;og++)for(var lg=Ag.top;lg<=Ag.bottom;lg++){var ug={sheetName:Ag.sheetName,address:eg.n2l(og)+lg,row:lg,col:og};cg.addCellEx(ug)}else cg.addCellEx(Ag)}},{key:"remove",value:function(Ag,sg){var cg=eg.decodeEx(Ag);this.removeEx(cg,sg)}},{key:"removeEx",value:function(Ag,sg){this.getMatrix(sg).removeCellEx(Ag)}},{key:"removeAllNames",value:function(Ag){gg.each(this.matrixMap,function(sg){sg.removeCellEx(Ag)})}},{key:"forEach",value:function(Ag){gg.each(this.matrixMap,function(sg,cg){sg.forEach(function(og){Ag(cg,og)})})}},{key:"getNames",value:function(Ag){return this.getNamesEx(eg.decodeEx(Ag))}},{key:"getNamesEx",value:function(Ag){return gg.map(this.matrixMap,function(sg,cg){return sg.findCellEx(Ag)&&cg}).filter(Boolean)}},{key:"_explore",value:function(Ag,sg){sg.mark=!1;var cg,og,lg=sg.sheetName,ug=new tg(sg.row,sg.col,sg.row,sg.col,lg);function dg(fg,mg){var pg=Ag.findCellAt(lg,fg,sg.col);return!(!pg||!pg.mark||(ug[mg]=fg,pg.mark=!1,0))}for(og=sg.row-1;dg(og,"top");og--);for(og=sg.row+1;dg(og,"bottom");og++);function hg(fg,mg){var pg=[];for(og=ug.top;og<=ug.bottom;og++){var bg=Ag.findCellAt(lg,og,fg);if(!bg||!bg.mark)return!1;pg.push(bg)}ug[mg]=fg;for(var vg=0;vg<pg.length;vg++)pg[vg].mark=!1;return!0}for(cg=sg.col-1;hg(cg,"left");cg--);for(cg=sg.col+1;hg(cg,"right");cg++);return ug}},{key:"getRanges",value:function(Ag,sg){var cg=this;return(sg=sg||this.matrixMap[Ag])?(sg.forEach(function(og){og.mark=!0}),{name:Ag,ranges:sg.map(function(og){return og.mark&&cg._explore(sg,og)}).filter(Boolean).map(function(og){return og.$shortRange})}):{name:Ag,ranges:[]}}},{key:"normaliseMatrix",value:function(Ag,sg){Ag.forEachInSheet(sg,function(cg,og,lg){cg&&(cg.row===og&&cg.col===lg||(cg.row=og,cg.col=lg,cg.address=eg.n2l(lg)+og))})}},{key:"spliceRows",value:function(Ag,sg,cg,og){var lg=this;gg.each(this.matrixMap,function(ug){ug.spliceRows(Ag,sg,cg,og),lg.normaliseMatrix(ug,Ag)})}},{key:"spliceColumns",value:function(Ag,sg,cg,og){var lg=this;gg.each(this.matrixMap,function(ug){ug.spliceColumns(Ag,sg,cg,og),lg.normaliseMatrix(ug,Ag)})}},{key:"model",get:function(){var Ag=this;return gg.map(this.matrixMap,function(sg,cg){return Ag.getRanges(cg,sg)}).filter(function(sg){return sg.ranges.length})},set:function(Ag){var sg=this.matrixMap={};Ag.forEach(function(cg){var og=sg[cg.name]=new Ig;cg.ranges.forEach(function(lg){Cg.test(lg.split("!").pop()||"")&&og.addCell(lg)})})}}])&&z(ig.prototype,ng),ag}();V.exports=rg},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":25,"./range":10}],7:[function(n,V,L){V.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(n,V,L){function z(tg,Cg){for(var rg=0;rg<Cg.length;rg++){var ag=Cg[rg];ag.enumerable=ag.enumerable||!1,ag.configurable=!0,"value"in ag&&(ag.writable=!0),Object.defineProperty(tg,ag.key,ag)}}var gg=n("../utils/col-cache"),eg=n("./anchor"),Ig=function(){function tg(ag,ig){(function(ng,Ag){if(!(ng instanceof Ag))throw new TypeError("Cannot call a class as a function")})(this,tg),this.worksheet=ag,this.model=ig}var Cg,rg;return Cg=tg,(rg=[{key:"model",get:function(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}},set:function(ag){var ig=ag.type,ng=ag.imageId,Ag=ag.range,sg=ag.hyperlinks;if(this.type=ig,this.imageId=ng,ig==="image")if(typeof Ag=="string"){var cg=gg.decode(Ag);this.range={tl:new eg(this.worksheet,{col:cg.left,row:cg.top},-1),br:new eg(this.worksheet,{col:cg.right,row:cg.bottom},0),editAs:"oneCell"}}else this.range={tl:new eg(this.worksheet,Ag.tl,0),br:Ag.br&&new eg(this.worksheet,Ag.br,0),ext:Ag.ext,editAs:Ag.editAs,hyperlinks:sg||Ag.hyperlinks}}}])&&z(Cg.prototype,rg),tg}();V.exports=Ig},{"../utils/col-cache":19,"./anchor":2}],9:[function(n,V,L){function z(tg){return(z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Cg){return typeof Cg}:function(Cg){return Cg&&typeof Symbol=="function"&&Cg.constructor===Symbol&&Cg!==Symbol.prototype?"symbol":typeof Cg})(tg)}function gg(tg,Cg){for(var rg=0;rg<Cg.length;rg++){var ag=Cg[rg];ag.enumerable=ag.enumerable||!1,ag.configurable=!0,"value"in ag&&(ag.writable=!0),Object.defineProperty(tg,ag.key,ag)}}var eg=n("../utils/under-dash"),Ig=function(){function tg(ig){(function(ng,Ag){if(!(ng instanceof Ag))throw new TypeError("Cannot call a class as a function")})(this,tg),this.note=ig}var Cg,rg,ag;return Cg=tg,ag=[{key:"fromModel",value:function(ig){var ng=new tg;return ng.model=ig,ng}}],(rg=[{key:"model",get:function(){var ig=null;switch(z(this.note)){case"string":ig={type:"note",note:{texts:[{text:this.note}]}};break;default:ig={type:"note",note:this.note}}return eg.deepMerge({},tg.DEFAULT_CONFIGS,ig)},set:function(ig){var ng=ig.note,Ag=ng.texts;Ag.length===1&&Object.keys(Ag[0]).length===1?this.note=Ag[0].text:this.note=ng}}])&&gg(Cg.prototype,rg),ag&&gg(Cg,ag),tg}();Ig.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},V.exports=Ig},{"../utils/under-dash":25}],10:[function(n,V,L){function z(tg,Cg){if(!(tg instanceof Cg))throw new TypeError("Cannot call a class as a function")}function gg(tg,Cg){for(var rg=0;rg<Cg.length;rg++){var ag=Cg[rg];ag.enumerable=ag.enumerable||!1,ag.configurable=!0,"value"in ag&&(ag.writable=!0),Object.defineProperty(tg,ag.key,ag)}}var eg=n("../utils/col-cache"),Ig=function(){function tg(){z(this,tg),this.decode(arguments)}var Cg,rg;return Cg=tg,(rg=[{key:"setTLBR",value:function(ag,ig,ng,Ag,sg){if(arguments.length<4){var cg=eg.decodeAddress(ag),og=eg.decodeAddress(ig);this.model={top:Math.min(cg.row,og.row),left:Math.min(cg.col,og.col),bottom:Math.max(cg.row,og.row),right:Math.max(cg.col,og.col),sheetName:ng},this.setTLBR(cg.row,cg.col,og.row,og.col,sg)}else this.model={top:Math.min(ag,ng),left:Math.min(ig,Ag),bottom:Math.max(ag,ng),right:Math.max(ig,Ag),sheetName:sg}}},{key:"decode",value:function(ag){switch(ag.length){case 5:this.setTLBR(ag[0],ag[1],ag[2],ag[3],ag[4]);break;case 4:this.setTLBR(ag[0],ag[1],ag[2],ag[3]);break;case 3:this.setTLBR(ag[0],ag[1],ag[2]);break;case 2:this.setTLBR(ag[0],ag[1]);break;case 1:var ig=ag[0];if(ig instanceof tg)this.model={top:ig.model.top,left:ig.model.left,bottom:ig.model.bottom,right:ig.model.right,sheetName:ig.sheetName};else if(ig instanceof Array)this.decode(ig);else if(ig.top&&ig.left&&ig.bottom&&ig.right)this.model={top:ig.top,left:ig.left,bottom:ig.bottom,right:ig.right,sheetName:ig.sheetName};else{var ng=eg.decodeEx(ig);ng.top?this.model={top:ng.top,left:ng.left,bottom:ng.bottom,right:ng.right,sheetName:ng.sheetName}:this.model={top:ng.row,left:ng.col,bottom:ng.row,right:ng.col,sheetName:ng.sheetName}}break;case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - ".concat(ag.length))}}},{key:"expand",value:function(ag,ig,ng,Ag){(!this.model.top||ag<this.top)&&(this.top=ag),(!this.model.left||ig<this.left)&&(this.left=ig),(!this.model.bottom||ng>this.bottom)&&(this.bottom=ng),(!this.model.right||Ag>this.right)&&(this.right=Ag)}},{key:"expandRow",value:function(ag){if(ag){var ig=ag.dimensions,ng=ag.number;ig&&this.expand(ng,ig.min,ng,ig.max)}}},{key:"expandToAddress",value:function(ag){var ig=eg.decodeEx(ag);this.expand(ig.row,ig.col,ig.row,ig.col)}},{key:"toString",value:function(){return this.range}},{key:"intersects",value:function(ag){return!(ag.sheetName&&this.sheetName&&ag.sheetName!==this.sheetName||ag.bottom<this.top||ag.top>this.bottom||ag.right<this.left||ag.left>this.right)}},{key:"contains",value:function(ag){var ig=eg.decodeEx(ag);return this.containsEx(ig)}},{key:"containsEx",value:function(ag){return(!ag.sheetName||!this.sheetName||ag.sheetName===this.sheetName)&&ag.row>=this.top&&ag.row<=this.bottom&&ag.col>=this.left&&ag.col<=this.right}},{key:"forEachAddress",value:function(ag){for(var ig=this.left;ig<=this.right;ig++)for(var ng=this.top;ng<=this.bottom;ng++)ag(eg.encodeAddress(ng,ig),ng,ig)}},{key:"top",get:function(){return this.model.top||1},set:function(ag){this.model.top=ag}},{key:"left",get:function(){return this.model.left||1},set:function(ag){this.model.left=ag}},{key:"bottom",get:function(){return this.model.bottom||1},set:function(ag){this.model.bottom=ag}},{key:"right",get:function(){return this.model.right||1},set:function(ag){this.model.right=ag}},{key:"sheetName",get:function(){return this.model.sheetName},set:function(ag){this.model.sheetName=ag}},{key:"_serialisedSheetName",get:function(){var ag=this.model.sheetName;return ag?/^[a-zA-Z0-9]*$/.test(ag)?"".concat(ag,"!"):"'".concat(ag,"'!"):""}},{key:"tl",get:function(){return eg.n2l(this.left)+this.top}},{key:"$t$l",get:function(){return"$".concat(eg.n2l(this.left),"$").concat(this.top)}},{key:"br",get:function(){return eg.n2l(this.right)+this.bottom}},{key:"$b$r",get:function(){return"$".concat(eg.n2l(this.right),"$").concat(this.bottom)}},{key:"range",get:function(){return"".concat(this._serialisedSheetName+this.tl,":").concat(this.br)}},{key:"$range",get:function(){return"".concat(this._serialisedSheetName+this.$t$l,":").concat(this.$b$r)}},{key:"shortRange",get:function(){return this.count>1?this.range:this._serialisedSheetName+this.tl}},{key:"$shortRange",get:function(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}},{key:"count",get:function(){return(1+this.bottom-this.top)*(1+this.right-this.left)}}])&&gg(Cg.prototype,rg),tg}();V.exports=Ig},{"../utils/col-cache":19}],11:[function(n,V,L){function z(rg,ag){for(var ig=0;ig<ag.length;ig++){var ng=ag[ig];ng.enumerable=ng.enumerable||!1,ng.configurable=!0,"value"in ng&&(ng.writable=!0),Object.defineProperty(rg,ng.key,ng)}}var gg=n("../utils/under-dash"),eg=n("./enums"),Ig=n("../utils/col-cache"),tg=n("./cell"),Cg=function(){function rg(ng,Ag){(function(sg,cg){if(!(sg instanceof cg))throw new TypeError("Cannot call a class as a function")})(this,rg),this._worksheet=ng,this._number=Ag,this._cells=[],this.style={},this.outlineLevel=0}var ag,ig;return ag=rg,(ig=[{key:"commit",value:function(){this._worksheet._commitRow(this)}},{key:"destroy",value:function(){delete this._worksheet,delete this._cells,delete this.style}},{key:"findCell",value:function(ng){return this._cells[ng-1]}},{key:"getCellEx",value:function(ng){var Ag=this._cells[ng.col-1];if(!Ag){var sg=this._worksheet.getColumn(ng.col);Ag=new tg(this,sg,ng.address),this._cells[ng.col-1]=Ag}return Ag}},{key:"getCell",value:function(ng){if(typeof ng=="string"){var Ag=this._worksheet.getColumnKey(ng);ng=Ag?Ag.number:Ig.l2n(ng)}return this._cells[ng-1]||this.getCellEx({address:Ig.encodeAddress(this._number,ng),row:this._number,col:ng})}},{key:"splice",value:function(ng,Ag){for(var sg=ng+Ag,cg=arguments.length,og=new Array(cg>2?cg-2:0),lg=2;lg<cg;lg++)og[lg-2]=arguments[lg];var ug,dg,hg,fg=og.length-Ag,mg=this._cells.length;if(fg<0)for(ug=ng+og.length;ug<=mg;ug++)hg=this._cells[ug-1],(dg=this._cells[ug-fg-1])?((hg=this.getCell(ug)).value=dg.value,hg.style=dg.style,hg._comment=dg._comment):hg&&(hg.value=null,hg.style={},hg._comment=void 0);else if(fg>0)for(ug=mg;ug>=sg;ug--)(dg=this._cells[ug-1])?((hg=this.getCell(ug+fg)).value=dg.value,hg.style=dg.style,hg._comment=dg._comment):this._cells[ug+fg-1]=void 0;for(ug=0;ug<og.length;ug++)(hg=this.getCell(ng+ug)).value=og[ug],hg.style={},hg._comment=void 0}},{key:"eachCell",value:function(ng,Ag){if(Ag||(Ag=ng,ng=null),ng&&ng.includeEmpty)for(var sg=this._cells.length,cg=1;cg<=sg;cg++)Ag(this.getCell(cg),cg);else this._cells.forEach(function(og,lg){og&&og.type!==eg.ValueType.Null&&Ag(og,lg+1)})}},{key:"addPageBreak",value:function(ng,Ag){var sg=this._worksheet,cg=Math.max(0,ng-1)||0,og=Math.max(0,Ag-1)||16838,lg={id:this._number,max:og,man:1};cg&&(lg.min=cg),sg.rowBreaks.push(lg)}},{key:"_applyStyle",value:function(ng,Ag){return this.style[ng]=Ag,this._cells.forEach(function(sg){sg&&(sg[ng]=Ag)}),Ag}},{key:"number",get:function(){return this._number}},{key:"worksheet",get:function(){return this._worksheet}},{key:"values",get:function(){var ng=[];return this._cells.forEach(function(Ag){Ag&&Ag.type!==eg.ValueType.Null&&(ng[Ag.col]=Ag.value)}),ng},set:function(ng){var Ag=this;if(this._cells=[],ng)if(ng instanceof Array){var sg=0;ng.hasOwnProperty("0")&&(sg=1),ng.forEach(function(cg,og){cg!==void 0&&(Ag.getCellEx({address:Ig.encodeAddress(Ag._number,og+sg),row:Ag._number,col:og+sg}).value=cg)})}else this._worksheet.eachColumnKey(function(cg,og){ng[og]!==void 0&&(Ag.getCellEx({address:Ig.encodeAddress(Ag._number,cg.number),row:Ag._number,col:cg.number}).value=ng[og])})}},{key:"hasValues",get:function(){return gg.some(this._cells,function(ng){return ng&&ng.type!==eg.ValueType.Null})}},{key:"cellCount",get:function(){return this._cells.length}},{key:"actualCellCount",get:function(){var ng=0;return this.eachCell(function(){ng++}),ng}},{key:"dimensions",get:function(){var ng=0,Ag=0;return this._cells.forEach(function(sg){sg&&sg.type!==eg.ValueType.Null&&((!ng||ng>sg.col)&&(ng=sg.col),Ag<sg.col&&(Ag=sg.col))}),ng>0?{min:ng,max:Ag}:null}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(ng){this._applyStyle("numFmt",ng)}},{key:"font",get:function(){return this.style.font},set:function(ng){this._applyStyle("font",ng)}},{key:"alignment",get:function(){return this.style.alignment},set:function(ng){this._applyStyle("alignment",ng)}},{key:"protection",get:function(){return this.style.protection},set:function(ng){this._applyStyle("protection",ng)}},{key:"border",get:function(){return this.style.border},set:function(ng){this._applyStyle("border",ng)}},{key:"fill",get:function(){return this.style.fill},set:function(ng){this._applyStyle("fill",ng)}},{key:"hidden",get:function(){return!!this._hidden},set:function(ng){this._hidden=ng}},{key:"outlineLevel",get:function(){return this._outlineLevel||0},set:function(ng){this._outlineLevel=ng}},{key:"collapsed",get:function(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}},{key:"model",get:function(){var ng=[],Ag=0,sg=0;return this._cells.forEach(function(cg){if(cg){var og=cg.model;og&&((!Ag||Ag>cg.col)&&(Ag=cg.col),sg<cg.col&&(sg=cg.col),ng.push(og))}}),this.height||ng.length?{cells:ng,number:this.number,min:Ag,max:sg,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null},set:function(ng){var Ag,sg=this;if(ng.number!==this._number)throw new Error("Invalid row number in model");this._cells=[],ng.cells.forEach(function(cg){switch(cg.type){case tg.Types.Merge:break;default:var og;if(cg.address)og=Ig.decodeAddress(cg.address);else if(Ag){var lg=Ag.row,ug=Ag.col+1;og={row:lg,col:ug,address:Ig.encodeAddress(lg,ug),$col$row:"$".concat(Ig.n2l(ug),"$").concat(lg)}}Ag=og,sg.getCellEx(og).model=cg}}),ng.height?this.height=ng.height:delete this.height,this.hidden=ng.hidden,this.outlineLevel=ng.outlineLevel||0,this.style=ng.style&&JSON.parse(JSON.stringify(ng.style))||{}}}])&&z(ag.prototype,ig),rg}();V.exports=Cg},{"../utils/col-cache":19,"../utils/under-dash":25,"./cell":3,"./enums":7}],12:[function(n,V,L){function z(rg,ag){if(!(rg instanceof ag))throw new TypeError("Cannot call a class as a function")}function gg(rg,ag){for(var ig=0;ig<ag.length;ig++){var ng=ag[ig];ng.enumerable=ng.enumerable||!1,ng.configurable=!0,"value"in ng&&(ng.writable=!0),Object.defineProperty(rg,ng.key,ng)}}function eg(rg,ag,ig){return ag&&gg(rg.prototype,ag),rg}var Ig=n("../utils/col-cache"),tg=function(){function rg(ag,ig,ng){z(this,rg),this.table=ag,this.column=ig,this.index=ng}return eg(rg,[{key:"_set",value:function(ag,ig){this.table.cacheState(),this.column[ag]=ig}},{key:"name",get:function(){return this.column.name},set:function(ag){this._set("name",ag)}},{key:"filterButton",get:function(){return this.column.filterButton},set:function(ag){this.column.filterButton=ag}},{key:"style",get:function(){return this.column.style},set:function(ag){this.column.style=ag}},{key:"totalsRowLabel",get:function(){return this.column.totalsRowLabel},set:function(ag){this._set("totalsRowLabel",ag)}},{key:"totalsRowFunction",get:function(){return this.column.totalsRowFunction},set:function(ag){this._set("totalsRowFunction",ag)}},{key:"totalsRowResult",get:function(){return this.column.totalsRowResult},set:function(ag){this._set("totalsRowResult",ag)}},{key:"totalsRowFormula",get:function(){return this.column.totalsRowFormula},set:function(ag){this._set("totalsRowFormula",ag)}}]),rg}(),Cg=function(){function rg(ag,ig){z(this,rg),this.worksheet=ag,ig&&(this.table=ig,this.validate(),this.store())}return eg(rg,[{key:"getFormula",value:function(ag){switch(ag.totalsRowFunction){case"none":return null;case"average":return"SUBTOTAL(101,".concat(this.table.name,"[").concat(ag.name,"])");case"countNums":return"SUBTOTAL(102,".concat(this.table.name,"[").concat(ag.name,"])");case"count":return"SUBTOTAL(103,".concat(this.table.name,"[").concat(ag.name,"])");case"max":return"SUBTOTAL(104,".concat(this.table.name,"[").concat(ag.name,"])");case"min":return"SUBTOTAL(105,".concat(this.table.name,"[").concat(ag.name,"])");case"stdDev":return"SUBTOTAL(106,".concat(this.table.name,"[").concat(ag.name,"])");case"var":return"SUBTOTAL(107,".concat(this.table.name,"[").concat(ag.name,"])");case"sum":return"SUBTOTAL(109,".concat(this.table.name,"[").concat(ag.name,"])");case"custom":return ag.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: ".concat(ag.totalsRowFunction))}}},{key:"validate",value:function(){var ag=this,ig=this.table,ng=function(hg,fg,mg){hg[fg]===void 0&&(hg[fg]=mg)};ng(ig,"headerRow",!0),ng(ig,"totalsRow",!1),ng(ig,"style",{}),ng(ig.style,"theme","TableStyleMedium2"),ng(ig.style,"showFirstColumn",!1),ng(ig.style,"showLastColumn",!1),ng(ig.style,"showRowStripes",!1),ng(ig.style,"showColumnStripes",!1);var Ag=function(hg,fg){if(!hg)throw new Error(fg)};Ag(ig.ref,"Table must have ref"),Ag(ig.columns,"Table must have column definitions"),Ag(ig.rows,"Table must have row definitions"),ig.tl=Ig.decodeAddress(ig.ref);var sg=ig.tl,cg=sg.row,og=sg.col;Ag(cg>0,"Table must be on valid row"),Ag(og>0,"Table must be on valid col");var lg=this.width,ug=this.filterHeight,dg=this.tableHeight;ig.autoFilterRef=Ig.encode(cg,og,cg+ug-1,og+lg-1),ig.tableRef=Ig.encode(cg,og,cg+dg-1,og+lg-1),ig.columns.forEach(function(hg,fg){Ag(hg.name,"Column ".concat(fg," must have a name")),fg===0?ng(hg,"totalsRowLabel","Total"):(ng(hg,"totalsRowFunction","none"),hg.totalsRowFormula=ag.getFormula(hg))})}},{key:"store",value:function(){var ag=this,ig=function(hg,fg){fg&&Object.keys(fg).forEach(function(mg){hg[mg]=fg[mg]})},ng=this.worksheet,Ag=this.table,sg=Ag.tl,cg=sg.row,og=sg.col,lg=0;if(Ag.headerRow){var ug=ng.getRow(cg+lg++);Ag.columns.forEach(function(hg,fg){var mg=hg.style,pg=hg.name,bg=ug.getCell(og+fg);bg.value=pg,ig(bg,mg)})}if(Ag.rows.forEach(function(hg){var fg=ng.getRow(cg+lg++);hg.forEach(function(mg,pg){var bg=fg.getCell(og+pg);bg.value=mg,ig(bg,Ag.columns[pg].style)})}),Ag.totalsRow){var dg=ng.getRow(cg+lg++);Ag.columns.forEach(function(hg,fg){var mg=dg.getCell(og+fg);if(fg===0)mg.value=hg.totalsRowLabel;else{var pg=ag.getFormula(hg);mg.value=pg?{formula:hg.totalsRowFormula,result:hg.totalsRowResult}:null}ig(mg,hg.style)})}}},{key:"load",value:function(ag){var ig=this,ng=this.table,Ag=ng.tl,sg=Ag.row,cg=Ag.col,og=0;if(ng.headerRow){var lg=ag.getRow(sg+og++);ng.columns.forEach(function(dg,hg){lg.getCell(cg+hg).value=dg.name})}if(ng.rows.forEach(function(dg){var hg=ag.getRow(sg+og++);dg.forEach(function(fg,mg){hg.getCell(cg+mg).value=fg})}),ng.totalsRow){var ug=ag.getRow(sg+og++);ng.columns.forEach(function(dg,hg){var fg=ug.getCell(cg+hg);hg===0?fg.value=dg.totalsRowLabel:ig.getFormula(dg)&&(fg.value={formula:dg.totalsRowFormula,result:dg.totalsRowResult})})}}},{key:"cacheState",value:function(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}},{key:"commit",value:function(){if(this._cache){this.validate();var ag=Ig.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(var ig=0;ig<this._cache.tableHeight;ig++)for(var ng=this.worksheet.getRow(ag.row+ig),Ag=0;Ag<this._cache.width;Ag++)ng.getCell(ag.col+Ag).value=null;else{for(var sg=this.tableHeight;sg<this._cache.tableHeight;sg++)for(var cg=this.worksheet.getRow(ag.row+sg),og=0;og<this._cache.width;og++)cg.getCell(ag.col+og).value=null;for(var lg=0;lg<this.tableHeight;lg++)for(var ug=this.worksheet.getRow(ag.row+lg),dg=this.width;dg<this._cache.width;dg++)ug.getCell(ag.col+dg).value=null}this.store()}}},{key:"addRow",value:function(ag,ig){this.cacheState(),ig===void 0?this.table.rows.push(ag):this.table.rows.splice(ig,0,ag)}},{key:"removeRows",value:function(ag){var ig=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(ag,ig)}},{key:"getColumn",value:function(ag){var ig=this.table.columns[ag];return new tg(this,ig,ag)}},{key:"addColumn",value:function(ag,ig,ng){this.cacheState(),ng===void 0?(this.table.columns.push(ag),this.table.rows.forEach(function(Ag,sg){Ag.push(ig[sg])})):(this.table.columns.splice(ng,0,ag),this.table.rows.forEach(function(Ag,sg){Ag.splice(ng,0,ig[sg])}))}},{key:"removeColumns",value:function(ag){var ig=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(ag,ig),this.table.rows.forEach(function(ng){ng.splice(ag,ig)})}},{key:"_assign",value:function(ag,ig,ng){this.cacheState(),ag[ig]=ng}},{key:"width",get:function(){return this.table.columns.length}},{key:"height",get:function(){return this.table.rows.length}},{key:"filterHeight",get:function(){return this.height+(this.table.headerRow?1:0)}},{key:"tableHeight",get:function(){return this.filterHeight+(this.table.totalsRow?1:0)}},{key:"model",get:function(){return this.table},set:function(ag){this.table=ag}},{key:"ref",get:function(){return this.table.ref},set:function(ag){this._assign(this.table,"ref",ag)}},{key:"name",get:function(){return this.table.name},set:function(ag){this.table.name=ag}},{key:"displayName",get:function(){return this.table.displyName||this.table.name}},{key:"displayNamename",set:function(ag){this.table.displayName=ag}},{key:"headerRow",get:function(){return this.table.headerRow},set:function(ag){this._assign(this.table,"headerRow",ag)}},{key:"totalsRow",get:function(){return this.table.totalsRow},set:function(ag){this._assign(this.table,"totalsRow",ag)}},{key:"theme",get:function(){return this.table.style.name},set:function(ag){this.table.style.name=ag}},{key:"showFirstColumn",get:function(){return this.table.style.showFirstColumn},set:function(ag){this.table.style.showFirstColumn=ag}},{key:"showLastColumn",get:function(){return this.table.style.showLastColumn},set:function(ag){this.table.style.showLastColumn=ag}},{key:"showRowStripes",get:function(){return this.table.style.showRowStripes},set:function(ag){this.table.style.showRowStripes=ag}},{key:"showColumnStripes",get:function(){return this.table.style.showColumnStripes},set:function(ag){this.table.style.showColumnStripes=ag}}]),rg}();V.exports=Cg},{"../utils/col-cache":19}],13:[function(n,V,L){function z(rg,ag){for(var ig=0;ig<ag.length;ig++){var ng=ag[ig];ng.enumerable=ng.enumerable||!1,ng.configurable=!0,"value"in ng&&(ng.writable=!0),Object.defineProperty(rg,ng.key,ng)}}var gg=n("./worksheet"),eg=n("./defined-names"),Ig=n("../xlsx/xlsx"),tg=n("../csv/csv"),Cg=function(){function rg(){(function(ng,Ag){if(!(ng instanceof Ag))throw new TypeError("Cannot call a class as a function")})(this,rg),this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new eg}var ag,ig;return ag=rg,(ig=[{key:"addWorksheet",value:function(ng,Ag){var sg=this.nextId;if(ng&&ng.length>31&&console.warn("Worksheet name ".concat(ng," exceeds 31 chars. This will be truncated")),/[*?:/\\[\]]/.test(ng))throw new Error("Worksheet name ".concat(ng," cannot include any of the following characters: * ? : \\ / [ ]"));if(/(^')|('$)/.test(ng))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: ".concat(ng));if(ng=(ng||"sheet".concat(sg)).substring(0,31),this._worksheets.find(function(ug){return ug&&ug.name.toLowerCase()===ng.toLowerCase()}))throw new Error("Worksheet name already exists: ".concat(ng));Ag&&(typeof Ag=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),Ag={properties:{tabColor:{argb:Ag}}}):(Ag.argb||Ag.theme||Ag.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),Ag={properties:{tabColor:Ag}}));var cg=this._worksheets.reduce(function(ug,dg){return(dg&&dg.orderNo)>ug?dg.orderNo:ug},0),og=Object.assign({},Ag,{id:sg,name:ng,orderNo:cg+1,workbook:this}),lg=new gg(og);return this._worksheets[sg]=lg,lg}},{key:"removeWorksheetEx",value:function(ng){delete this._worksheets[ng.id]}},{key:"removeWorksheet",value:function(ng){var Ag=this.getWorksheet(ng);Ag&&Ag.destroy()}},{key:"getWorksheet",value:function(ng){return ng===void 0?this._worksheets.find(Boolean):typeof ng=="number"?this._worksheets[ng]:typeof ng=="string"?this._worksheets.find(function(Ag){return Ag&&Ag.name===ng}):void 0}},{key:"eachSheet",value:function(ng){this.worksheets.forEach(function(Ag){ng(Ag,Ag.id)})}},{key:"clearThemes",value:function(){this._themes=void 0}},{key:"addImage",value:function(ng){var Ag=this.media.length;return this.media.push(Object.assign({},ng,{type:"image"})),Ag}},{key:"getImage",value:function(ng){return this.media[ng]}},{key:"xlsx",get:function(){return this._xlsx||(this._xlsx=new Ig(this)),this._xlsx}},{key:"csv",get:function(){return this._csv||(this._csv=new tg(this)),this._csv}},{key:"nextId",get:function(){for(var ng=1;ng<this._worksheets.length;ng++)if(!this._worksheets[ng])return ng;return this._worksheets.length||1}},{key:"worksheets",get:function(){return this._worksheets.slice(1).sort(function(ng,Ag){return ng.orderNo-Ag.orderNo}).filter(Boolean)}},{key:"definedNames",get:function(){return this._definedNames}},{key:"model",get:function(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(function(ng){return ng.model}),sheets:this.worksheets.map(function(ng){return ng.model}).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}},set:function(ng){var Ag=this;this.creator=ng.creator,this.lastModifiedBy=ng.lastModifiedBy,this.lastPrinted=ng.lastPrinted,this.created=ng.created,this.modified=ng.modified,this.company=ng.company,this.manager=ng.manager,this.title=ng.title,this.subject=ng.subject,this.keywords=ng.keywords,this.category=ng.category,this.description=ng.description,this.language=ng.language,this.revision=ng.revision,this.contentStatus=ng.contentStatus,this.properties=ng.properties,this.calcProperties=ng.calcProperties,this._worksheets=[],ng.worksheets.forEach(function(sg){var cg=sg.id,og=sg.name,lg=sg.state,ug=ng.sheets&&ng.sheets.findIndex(function(dg){return dg.id===cg});(Ag._worksheets[cg]=new gg({id:cg,name:og,orderNo:ug,state:lg,workbook:Ag})).model=sg}),this._definedNames.model=ng.definedNames,this.views=ng.views,this._themes=ng.themes,this.media=ng.media||[]}}])&&z(ag.prototype,ig),rg}();V.exports=Cg},{"../csv/csv":1,"../xlsx/xlsx":141,"./defined-names":6,"./worksheet":14}],14:[function(n,V,L){function z(hg,fg){var mg=Object.keys(hg);if(Object.getOwnPropertySymbols){var pg=Object.getOwnPropertySymbols(hg);fg&&(pg=pg.filter(function(bg){return Object.getOwnPropertyDescriptor(hg,bg).enumerable})),mg.push.apply(mg,pg)}return mg}function gg(hg){for(var fg=1;fg<arguments.length;fg++){var mg=arguments[fg]!=null?arguments[fg]:{};fg%2?z(Object(mg),!0).forEach(function(pg){eg(hg,pg,mg[pg])}):Object.getOwnPropertyDescriptors?Object.defineProperties(hg,Object.getOwnPropertyDescriptors(mg)):z(Object(mg)).forEach(function(pg){Object.defineProperty(hg,pg,Object.getOwnPropertyDescriptor(mg,pg))})}return hg}function eg(hg,fg,mg){return fg in hg?Object.defineProperty(hg,fg,{value:mg,enumerable:!0,configurable:!0,writable:!0}):hg[fg]=mg,hg}function Ig(hg){return function(fg){if(Array.isArray(fg))return tg(fg)}(hg)||function(fg){if(typeof Symbol<"u"&&Symbol.iterator in Object(fg))return Array.from(fg)}(hg)||function(fg,mg){if(fg){if(typeof fg=="string")return tg(fg,mg);var pg=Object.prototype.toString.call(fg).slice(8,-1);if(pg==="Object"&&fg.constructor&&(pg=fg.constructor.name),pg==="Map"||pg==="Set")return Array.from(fg);if(pg==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pg))return tg(fg,mg)}}(hg)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
599
599
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function tg(hg,fg){(fg==null||fg>hg.length)&&(fg=hg.length);for(var mg=0,pg=new Array(fg);mg<fg;mg++)pg[mg]=hg[mg];return pg}function Cg(hg,fg){for(var mg=0;mg<fg.length;mg++){var pg=fg[mg];pg.enumerable=pg.enumerable||!1,pg.configurable=!0,"value"in pg&&(pg.writable=!0),Object.defineProperty(hg,pg.key,pg)}}var rg=n("../utils/under-dash"),ag=n("../utils/col-cache"),ig=n("./range"),ng=n("./row"),Ag=n("./column"),sg=n("./enums"),cg=n("./image"),og=n("./table"),lg=n("./data-validations"),ug=n("../utils/encryptor"),dg=function(){function hg(pg){(function(bg,vg){if(!(bg instanceof vg))throw new TypeError("Cannot call a class as a function")})(this,hg),pg=pg||{},this.id=pg.id,this.orderNo=pg.orderNo,this.name=pg.name||"Sheet".concat(this.id),this.state=pg.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this._workbook=pg.workbook,this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},pg.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!pg.pageSetup||!pg.pageSetup.fitToWidth&&!pg.pageSetup.fitToHeight||pg.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},pg.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},pg.headerFooter),this.dataValidations=new lg,this.views=pg.views||[],this.autoFilter=pg.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}var fg,mg;return fg=hg,(mg=[{key:"destroy",value:function(){this._workbook.removeWorksheetEx(this)}},{key:"getColumnKey",value:function(pg){return this._keys[pg]}},{key:"setColumnKey",value:function(pg,bg){this._keys[pg]=bg}},{key:"deleteColumnKey",value:function(pg){delete this._keys[pg]}},{key:"eachColumnKey",value:function(pg){rg.each(this._keys,pg)}},{key:"getColumn",value:function(pg){if(typeof pg=="string"){var bg=this._keys[pg];if(bg)return bg;pg=ag.l2n(pg)}if(this._columns||(this._columns=[]),pg>this._columns.length)for(var vg=this._columns.length+1;vg<=pg;)this._columns.push(new Ag(this,vg++));return this._columns[pg-1]}},{key:"spliceColumns",value:function(pg,bg){for(var vg=this,Vg=this._rows,wg=Vg.length,yg=arguments.length,Zg=new Array(yg>2?yg-2:0),Wg=2;Wg<yg;Wg++)Zg[Wg-2]=arguments[Wg];if(Zg.length>0)for(var Bg=function(Mg){var Fg=[pg,bg];Zg.forEach(function(xg){Fg.push(xg[Mg]||null)});var zg=vg.getRow(Mg+1);zg.splice.apply(zg,Fg)},Gg=0;Gg<wg;Gg++)Bg(Gg);else this._rows.forEach(function(Mg){Mg&&Mg.splice(pg,bg)});var Rg=Zg.length-bg,Xg=pg+bg,Sg=this._columns.length;if(Rg<0)for(var Ng=pg+Zg.length;Ng<=Sg;Ng++)this.getColumn(Ng).defn=this.getColumn(Ng-Rg).defn;else if(Rg>0)for(var Hg=Sg;Hg>=Xg;Hg--)this.getColumn(Hg+Rg).defn=this.getColumn(Hg).defn;for(var Yg=pg;Yg<pg+Zg.length;Yg++)this.getColumn(Yg).defn=null;this.workbook.definedNames.spliceColumns(this.name,pg,bg,Zg.length)}},{key:"_commitRow",value:function(){}},{key:"findRow",value:function(pg){return this._rows[pg-1]}},{key:"findRows",value:function(pg,bg){return this._rows.slice(pg-1,pg-1+bg)}},{key:"getRow",value:function(pg){var bg=this._rows[pg-1];return bg||(bg=this._rows[pg-1]=new ng(this,pg)),bg}},{key:"getRows",value:function(pg,bg){if(!(bg<1)){for(var vg=[],Vg=pg;Vg<pg+bg;Vg++)vg.push(this.getRow(Vg));return vg}}},{key:"addRow",value:function(pg){var bg=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",vg=this._nextRow,Vg=this.getRow(vg);return Vg.values=pg,this._setStyleOption(vg,bg[0]==="i"?bg:"n"),Vg}},{key:"addRows",value:function(pg){var bg=this,vg=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",Vg=[];return pg.forEach(function(wg){Vg.push(bg.addRow(wg,vg))}),Vg}},{key:"insertRow",value:function(pg,bg){var vg=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(pg,0,bg),this._setStyleOption(pg,vg),this.getRow(pg)}},{key:"insertRows",value:function(pg,bg){var vg=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows.apply(this,[pg,0].concat(Ig(bg))),vg!=="n")for(var Vg=0;Vg<bg.length;Vg++)vg[0]==="o"&&this.findRow(bg.length+pg+Vg)!==void 0?this._copyStyle(bg.length+pg+Vg,pg+Vg,vg[1]==="+"):vg[0]==="i"&&this.findRow(pg-1)!==void 0&&this._copyStyle(pg-1,pg+Vg,vg[1]==="+");return this.getRows(pg,bg.length)}},{key:"_setStyleOption",value:function(pg){var bg=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";bg[0]==="o"&&this.findRow(pg+1)!==void 0?this._copyStyle(pg+1,pg,bg[1]==="+"):bg[0]==="i"&&this.findRow(pg-1)!==void 0&&this._copyStyle(pg-1,pg,bg[1]==="+")}},{key:"_copyStyle",value:function(pg,bg){var vg=arguments.length>2&&arguments[2]!==void 0&&arguments[2],Vg=this.getRow(pg),wg=this.getRow(bg);wg.style=Object.freeze(gg({},Vg.style)),Vg.eachCell({includeEmpty:vg},function(yg,Zg){wg.getCell(Zg).style=Object.freeze(gg({},yg.style))}),wg.height=Vg.height}},{key:"duplicateRow",value:function(pg,bg){var vg=this,Vg=arguments.length>2&&arguments[2]!==void 0&&arguments[2],wg=this._rows[pg-1],yg=new Array(bg).fill(wg.values);this.spliceRows.apply(this,[pg+1,Vg?0:bg].concat(Ig(yg)));for(var Zg=function(Bg){var Gg=vg._rows[pg+Bg];Gg.style=wg.style,Gg.height=wg.height,wg.eachCell({includeEmpty:!0},function(Rg,Xg){Gg.getCell(Xg).style=Rg.style})},Wg=0;Wg<bg;Wg++)Zg(Wg)}},{key:"spliceRows",value:function(pg,bg){for(var vg=this,Vg=pg+bg,wg=arguments.length,yg=new Array(wg>2?wg-2:0),Zg=2;Zg<wg;Zg++)yg[Zg-2]=arguments[Zg];var Wg,Bg,Gg=yg.length,Rg=Gg-bg,Xg=this._rows.length;if(Rg<0)for(Wg=Vg;Wg<=Xg;Wg++)(Bg=this._rows[Wg-1])?function(){var Ng=vg.getRow(Wg+Rg);Ng.values=Bg.values,Ng.style=Bg.style,Ng.height=Bg.height,Bg.eachCell({includeEmpty:!0},function(Hg,Yg){Ng.getCell(Yg).style=Hg.style}),vg._rows[Wg-1]=void 0}():this._rows[Wg+Rg-1]=void 0;else if(Rg>0)for(Wg=Xg;Wg>=Vg;Wg--)(Bg=this._rows[Wg-1])?function(){var Ng=vg.getRow(Wg+Rg);Ng.values=Bg.values,Ng.style=Bg.style,Ng.height=Bg.height,Bg.eachCell({includeEmpty:!0},function(Hg,Yg){if(Ng.getCell(Yg).style=Hg.style,Hg._value.constructor.name==="MergeValue"){var Mg=vg.getRow(Hg._row._number+Gg).getCell(Yg),Fg=Hg._value._master,zg=vg.getRow(Fg._row._number+Gg).getCell(Fg._column._number);Mg.merge(zg)}})}():this._rows[Wg+Rg-1]=void 0;for(Wg=0;Wg<Gg;Wg++){var Sg=this.getRow(pg+Wg);Sg.style={},Sg.values=yg[Wg]}this.workbook.definedNames.spliceRows(this.name,pg,bg,Gg)}},{key:"eachRow",value:function(pg,bg){if(bg||(bg=pg,pg=void 0),pg&&pg.includeEmpty)for(var vg=this._rows.length,Vg=1;Vg<=vg;Vg++)bg(this.getRow(Vg),Vg);else this._rows.forEach(function(wg){wg&&wg.hasValues&&bg(wg,wg.number)})}},{key:"getSheetValues",value:function(){var pg=[];return this._rows.forEach(function(bg){bg&&(pg[bg.number]=bg.values)}),pg}},{key:"findCell",value:function(pg,bg){var vg=ag.getAddress(pg,bg),Vg=this._rows[vg.row-1];return Vg?Vg.findCell(vg.col):void 0}},{key:"getCell",value:function(pg,bg){var vg=ag.getAddress(pg,bg);return this.getRow(vg.row).getCellEx(vg)}},{key:"mergeCells",value:function(){for(var pg=arguments.length,bg=new Array(pg),vg=0;vg<pg;vg++)bg[vg]=arguments[vg];var Vg=new ig(bg);this._mergeCellsInternal(Vg)}},{key:"mergeCellsWithoutStyle",value:function(){for(var pg=arguments.length,bg=new Array(pg),vg=0;vg<pg;vg++)bg[vg]=arguments[vg];var Vg=new ig(bg);this._mergeCellsInternal(Vg,!0)}},{key:"_mergeCellsInternal",value:function(pg,bg){rg.each(this._merges,function(yg){if(yg.intersects(pg))throw new Error("Cannot merge already merged cells")});for(var vg=this.getCell(pg.top,pg.left),Vg=pg.top;Vg<=pg.bottom;Vg++)for(var wg=pg.left;wg<=pg.right;wg++)(Vg>pg.top||wg>pg.left)&&this.getCell(Vg,wg).merge(vg,bg);this._merges[vg.address]=pg}},{key:"_unMergeMaster",value:function(pg){var bg=this._merges[pg.address];if(bg){for(var vg=bg.top;vg<=bg.bottom;vg++)for(var Vg=bg.left;Vg<=bg.right;Vg++)this.getCell(vg,Vg).unmerge();delete this._merges[pg.address]}}},{key:"unMergeCells",value:function(){for(var pg=arguments.length,bg=new Array(pg),vg=0;vg<pg;vg++)bg[vg]=arguments[vg];for(var Vg=new ig(bg),wg=Vg.top;wg<=Vg.bottom;wg++)for(var yg=Vg.left;yg<=Vg.right;yg++){var Zg=this.findCell(wg,yg);Zg&&(Zg.type===sg.ValueType.Merge?this._unMergeMaster(Zg.master):this._merges[Zg.address]&&this._unMergeMaster(Zg))}}},{key:"fillFormula",value:function(pg,bg,vg){var Vg,wg=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared",yg=ag.decode(pg),Zg=yg.top,Wg=yg.left,Bg=yg.bottom,Gg=yg.right,Rg=Gg-Wg+1,Xg=ag.encodeAddress(Zg,Wg),Sg=wg==="shared";Vg=typeof vg=="function"?vg:Array.isArray(vg)?Array.isArray(vg[0])?function(Mg,Fg){return vg[Mg-Zg][Fg-Wg]}:function(Mg,Fg){return vg[(Mg-Zg)*Rg+(Fg-Wg)]}:function(){};for(var Ng=!0,Hg=Zg;Hg<=Bg;Hg++)for(var Yg=Wg;Yg<=Gg;Yg++)Ng?(this.getCell(Hg,Yg).value={shareType:wg,formula:bg,ref:pg,result:Vg(Hg,Yg)},Ng=!1):this.getCell(Hg,Yg).value=Sg?{sharedFormula:Xg,result:Vg(Hg,Yg)}:Vg(Hg,Yg)}},{key:"addImage",value:function(pg,bg){var vg={type:"image",imageId:pg,range:bg};this._media.push(new cg(this,vg))}},{key:"getImages",value:function(){return this._media.filter(function(pg){return pg.type==="image"})}},{key:"addBackgroundImage",value:function(pg){var bg={type:"background",imageId:pg};this._media.push(new cg(this,bg))}},{key:"getBackgroundImageId",value:function(){var pg=this._media.find(function(bg){return bg.type==="background"});return pg&&pg.imageId}},{key:"protect",value:function(pg,bg){var vg=this;return new Promise(function(Vg){vg.sheetProtection={sheet:!0},bg&&"spinCount"in bg&&(bg.spinCount=Number.isFinite(bg.spinCount)?Math.round(Math.max(0,bg.spinCount)):1e5),pg&&(vg.sheetProtection.algorithmName="SHA-512",vg.sheetProtection.saltValue=ug.randomBytes(16).toString("base64"),vg.sheetProtection.spinCount=bg&&"spinCount"in bg?bg.spinCount:1e5,vg.sheetProtection.hashValue=ug.convertPasswordToHash(pg,"SHA512",vg.sheetProtection.saltValue,vg.sheetProtection.spinCount)),bg&&(vg.sheetProtection=Object.assign(vg.sheetProtection,bg),!pg&&"spinCount"in bg&&delete vg.sheetProtection.spinCount),Vg()})}},{key:"unprotect",value:function(){this.sheetProtection=null}},{key:"addTable",value:function(pg){var bg=new og(this,pg);return this.tables[pg.name]=bg,bg}},{key:"getTable",value:function(pg){return this.tables[pg]}},{key:"removeTable",value:function(pg){delete this.tables[pg]}},{key:"getTables",value:function(){return Object.values(this.tables)}},{key:"addConditionalFormatting",value:function(pg){this.conditionalFormattings.push(pg)}},{key:"removeConditionalFormatting",value:function(pg){typeof pg=="number"?this.conditionalFormattings.splice(pg,1):this.conditionalFormattings=pg instanceof Function?this.conditionalFormattings.filter(pg):[]}},{key:"_parseRows",value:function(pg){var bg=this;this._rows=[],pg.rows.forEach(function(vg){var Vg=new ng(bg,vg.number);bg._rows[Vg.number-1]=Vg,Vg.model=vg})}},{key:"_parseMergeCells",value:function(pg){var bg=this;rg.each(pg.mergeCells,function(vg){bg.mergeCellsWithoutStyle(vg)})}},{key:"workbook",get:function(){return this._workbook}},{key:"dimensions",get:function(){var pg=new ig;return this._rows.forEach(function(bg){if(bg){var vg=bg.dimensions;vg&&pg.expand(bg.number,vg.min,bg.number,vg.max)}}),pg}},{key:"columns",get:function(){return this._columns},set:function(pg){var bg=this;this._headerRowCount=pg.reduce(function(wg,yg){var Zg=(yg.header?1:yg.headers&&yg.headers.length)||0;return Math.max(wg,Zg)},0);var vg=1,Vg=this._columns=[];pg.forEach(function(wg){var yg=new Ag(bg,vg++,!1);Vg.push(yg),yg.defn=wg})}},{key:"lastColumn",get:function(){return this.getColumn(this.columnCount)}},{key:"columnCount",get:function(){var pg=0;return this.eachRow(function(bg){pg=Math.max(pg,bg.cellCount)}),pg}},{key:"actualColumnCount",get:function(){var pg=[],bg=0;return this.eachRow(function(vg){vg.eachCell(function(Vg){var wg=Vg.col;pg[wg]||(pg[wg]=!0,bg++)})}),bg}},{key:"_lastRowNumber",get:function(){for(var pg=this._rows,bg=pg.length;bg>0&&pg[bg-1]===void 0;)bg--;return bg}},{key:"_nextRow",get:function(){return this._lastRowNumber+1}},{key:"lastRow",get:function(){if(this._rows.length)return this._rows[this._rows.length-1]}},{key:"rowCount",get:function(){return this._lastRowNumber}},{key:"actualRowCount",get:function(){var pg=0;return this.eachRow(function(){pg++}),pg}},{key:"hasMerges",get:function(){return rg.some(this._merges,Boolean)}},{key:"tabColor",get:function(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor},set:function(pg){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=pg}},{key:"model",get:function(){var pg={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(function(Vg){return Vg.model}),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(function(Vg){return Vg.model}),conditionalFormattings:this.conditionalFormattings};pg.cols=Ag.toModel(this.columns);var bg=pg.rows=[],vg=pg.dimensions=new ig;return this._rows.forEach(function(Vg){var wg=Vg&&Vg.model;wg&&(vg.expand(wg.number,wg.min,wg.number,wg.max),bg.push(wg))}),pg.merges=[],rg.each(this._merges,function(Vg){pg.merges.push(Vg.range)}),pg},set:function(pg){var bg=this;this.name=pg.name,this._columns=Ag.fromModel(this,pg.cols),this._parseRows(pg),this._parseMergeCells(pg),this.dataValidations=new lg(pg.dataValidations),this.properties=pg.properties,this.pageSetup=pg.pageSetup,this.headerFooter=pg.headerFooter,this.views=pg.views,this.autoFilter=pg.autoFilter,this._media=pg.media.map(function(vg){return new cg(bg,vg)}),this.sheetProtection=pg.sheetProtection,this.tables=pg.tables.reduce(function(vg,Vg){var wg=new og;return wg.model=Vg,vg[Vg.name]=wg,vg},{}),this.conditionalFormattings=pg.conditionalFormattings}}])&&Cg(fg.prototype,mg),hg}();V.exports=dg},{"../utils/col-cache":19,"../utils/encryptor":20,"../utils/under-dash":25,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(n,V,L){n("core-js/modules/es.promise"),n("core-js/modules/es.object.assign"),n("core-js/modules/es.object.keys"),n("core-js/modules/es.object.values"),n("core-js/modules/es.symbol"),n("core-js/modules/es.symbol.async-iterator"),n("core-js/modules/es.array.iterator"),n("core-js/modules/es.array.includes"),n("core-js/modules/es.array.find-index"),n("core-js/modules/es.array.find"),n("core-js/modules/es.string.from-code-point"),n("core-js/modules/es.string.includes"),n("core-js/modules/es.number.is-nan"),n("regenerator-runtime/runtime");var z={Workbook:n("./doc/workbook")},gg=n("./doc/enums");Object.keys(gg).forEach(function(eg){z[eg]=gg[eg]}),V.exports=z},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":316,"core-js/modules/es.array.find-index":315,"core-js/modules/es.array.includes":317,"core-js/modules/es.array.iterator":318,"core-js/modules/es.number.is-nan":319,"core-js/modules/es.object.assign":320,"core-js/modules/es.object.keys":321,"core-js/modules/es.object.values":322,"core-js/modules/es.promise":323,"core-js/modules/es.string.from-code-point":324,"core-js/modules/es.string.includes":325,"core-js/modules/es.symbol":327,"core-js/modules/es.symbol.async-iterator":326,"regenerator-runtime/runtime":492}],16:[function(n,V,L){var z=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");L.bufferToString=function(gg){return typeof gg=="string"?gg:z?z.decode(gg):gg.toString()}},{}],17:[function(n,V,L){var z=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),gg=n("buffer").Buffer;L.stringToBuffer=function(eg){return typeof eg!="string"?eg:z?gg.from(z.encode(eg).buffer):gg.from(eg)}},{buffer:216}],18:[function(n,V,L){function z(tg,Cg){for(var rg=0;rg<Cg.length;rg++){var ag=Cg[rg];ag.enumerable=ag.enumerable||!1,ag.configurable=!0,"value"in ag&&(ag.writable=!0),Object.defineProperty(tg,ag.key,ag)}}var gg=n("./under-dash"),eg=n("./col-cache"),Ig=function(){function tg(ag){(function(ig,ng){if(!(ig instanceof ng))throw new TypeError("Cannot call a class as a function")})(this,tg),this.template=ag,this.sheets={}}var Cg,rg;return Cg=tg,(rg=[{key:"addCell",value:function(ag){this.addCellEx(eg.decodeEx(ag))}},{key:"getCell",value:function(ag){return this.findCellEx(eg.decodeEx(ag),!0)}},{key:"findCell",value:function(ag){return this.findCellEx(eg.decodeEx(ag),!1)}},{key:"findCellAt",value:function(ag,ig,ng){var Ag=this.sheets[ag],sg=Ag&&Ag[ig];return sg&&sg[ng]}},{key:"addCellEx",value:function(ag){if(ag.top)for(var ig=ag.top;ig<=ag.bottom;ig++)for(var ng=ag.left;ng<=ag.right;ng++)this.getCellAt(ag.sheetName,ig,ng);else this.findCellEx(ag,!0)}},{key:"getCellEx",value:function(ag){return this.findCellEx(ag,!0)}},{key:"findCellEx",value:function(ag,ig){var ng=this.findSheet(ag,ig),Ag=this.findSheetRow(ng,ag,ig);return this.findRowCell(Ag,ag,ig)}},{key:"getCellAt",value:function(ag,ig,ng){var Ag=this.sheets[ag]||(this.sheets[ag]=[]),sg=Ag[ig]||(Ag[ig]=[]);return sg[ng]||(sg[ng]={sheetName:ag,address:eg.n2l(ng)+ig,row:ig,col:ng})}},{key:"removeCellEx",value:function(ag){var ig=this.findSheet(ag);if(ig){var ng=this.findSheetRow(ig,ag);ng&&delete ng[ag.col]}}},{key:"forEachInSheet",value:function(ag,ig){var ng=this.sheets[ag];ng&&ng.forEach(function(Ag,sg){Ag&&Ag.forEach(function(cg,og){cg&&ig(cg,sg,og)})})}},{key:"forEach",value:function(ag){var ig=this;gg.each(this.sheets,function(ng,Ag){ig.forEachInSheet(Ag,ag)})}},{key:"map",value:function(ag){var ig=[];return this.forEach(function(ng){ig.push(ag(ng))}),ig}},{key:"findSheet",value:function(ag,ig){var ng=ag.sheetName;return this.sheets[ng]?this.sheets[ng]:ig?this.sheets[ng]=[]:void 0}},{key:"findSheetRow",value:function(ag,ig,ng){var Ag=ig.row;return ag&&ag[Ag]?ag[Ag]:ng?ag[Ag]=[]:void 0}},{key:"findRowCell",value:function(ag,ig,ng){var Ag=ig.col;return ag&&ag[Ag]?ag[Ag]:ng?ag[Ag]=this.template?Object.assign(ig,JSON.parse(JSON.stringify(this.template))):ig:void 0}},{key:"spliceRows",value:function(ag,ig,ng,Ag){var sg=this.sheets[ag];if(sg){for(var cg=[],og=0;og<Ag;og++)cg.push([]);sg.splice.apply(sg,[ig,ng].concat(cg))}}},{key:"spliceColumns",value:function(ag,ig,ng,Ag){var sg=this.sheets[ag];if(sg){for(var cg=[],og=0;og<Ag;og++)cg.push(null);gg.each(sg,function(lg){lg.splice.apply(lg,[ig,ng].concat(cg))})}}}])&&z(Cg.prototype,rg),tg}();V.exports=Ig},{"./col-cache":19,"./under-dash":25}],19:[function(n,V,L){function z(rg,ag){return function(ig){if(Array.isArray(ig))return ig}(rg)||function(ig,ng){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(ig)))){var Ag=[],sg=!0,cg=!1,og=void 0;try{for(var lg,ug=ig[Symbol.iterator]();!(sg=(lg=ug.next()).done)&&(Ag.push(lg.value),!ng||Ag.length!==ng);sg=!0);}catch(dg){cg=!0,og=dg}finally{try{sg||ug.return==null||ug.return()}finally{if(cg)throw og}}return Ag}}(rg,ag)||function(ig,ng){if(ig){if(typeof ig=="string")return gg(ig,ng);var Ag=Object.prototype.toString.call(ig).slice(8,-1);if(Ag==="Object"&&ig.constructor&&(Ag=ig.constructor.name),Ag==="Map"||Ag==="Set")return Array.from(ig);if(Ag==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ag))return gg(ig,ng)}}(rg,ag)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
600
600
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function gg(rg,ag){(ag==null||ag>rg.length)&&(ag=rg.length);for(var ig=0,ng=new Array(ag);ig<ag;ig++)ng[ig]=rg[ig];return ng}function eg(rg,ag){var ig=Object.keys(rg);if(Object.getOwnPropertySymbols){var ng=Object.getOwnPropertySymbols(rg);ag&&(ng=ng.filter(function(Ag){return Object.getOwnPropertyDescriptor(rg,Ag).enumerable})),ig.push.apply(ig,ng)}return ig}function Ig(rg,ag,ig){return ag in rg?Object.defineProperty(rg,ag,{value:ig,enumerable:!0,configurable:!0,writable:!0}):rg[ag]=ig,rg}var tg=/^[A-Z]+\d+$/,Cg={_dictionary:["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"],_l2nFill:0,_l2n:{},_n2l:[],_level:function(rg){return rg<=26?1:rg<=676?2:3},_fill:function(rg){var ag,ig,ng,Ag,sg,cg=1;if(rg>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&rg>=1){for(;cg<=26;)ag=this._dictionary[cg-1],this._n2l[cg]=ag,this._l2n[ag]=cg,cg++;this._l2nFill=1}if(this._l2nFill<2&&rg>=2){for(cg=27;cg<=702;)ng=(ig=cg-27)%26,Ag=Math.floor(ig/26),ag=this._dictionary[Ag]+this._dictionary[ng],this._n2l[cg]=ag,this._l2n[ag]=cg,cg++;this._l2nFill=2}if(this._l2nFill<3&&rg>=3){for(cg=703;cg<=16384;)ng=(ig=cg-703)%26,Ag=Math.floor(ig/26)%26,sg=Math.floor(ig/676),ag=this._dictionary[sg]+this._dictionary[Ag]+this._dictionary[ng],this._n2l[cg]=ag,this._l2n[ag]=cg,cg++;this._l2nFill=3}},l2n:function(rg){if(this._l2n[rg]||this._fill(rg.length),!this._l2n[rg])throw new Error("Out of bounds. Invalid column letter: ".concat(rg));return this._l2n[rg]},n2l:function(rg){if(rg<1||rg>16384)throw new Error("".concat(rg," is out of bounds. Excel supports columns from 1 to 16384"));return this._n2l[rg]||this._fill(this._level(rg)),this._n2l[rg]},_hash:{},validateAddress:function(rg){if(!tg.test(rg))throw new Error("Invalid Address: ".concat(rg));return!0},decodeAddress:function(rg){var ag=rg.length<5&&this._hash[rg];if(ag)return ag;for(var ig,ng=!1,Ag="",sg=0,cg=!1,og="",lg=0,ug=0;ug<rg.length;ug++)if(ig=rg.charCodeAt(ug),!cg&&ig>=65&&ig<=90)ng=!0,Ag+=rg[ug],sg=26*sg+ig-64;else if(ig>=48&&ig<=57)cg=!0,og+=rg[ug],lg=10*lg+ig-48;else if(cg&&ng&&ig!==36)break;if(ng){if(sg>16384)throw new Error("Out of bounds. Invalid column letter: ".concat(Ag))}else sg=void 0;cg||(lg=void 0);var dg={address:rg=Ag+og,col:sg,row:lg,$col$row:"$".concat(Ag,"$").concat(og)};return sg<=100&&lg<=100&&(this._hash[rg]=dg,this._hash[dg.$col$row]=dg),dg},getAddress:function(rg,ag){if(ag){var ig=this.n2l(ag)+rg;return this.decodeAddress(ig)}return this.decodeAddress(rg)},decode:function(rg){var ag=rg.split(":");if(ag.length===2){var ig=this.decodeAddress(ag[0]),ng=this.decodeAddress(ag[1]),Ag={top:Math.min(ig.row,ng.row),left:Math.min(ig.col,ng.col),bottom:Math.max(ig.row,ng.row),right:Math.max(ig.col,ng.col)};return Ag.tl=this.n2l(Ag.left)+Ag.top,Ag.br=this.n2l(Ag.right)+Ag.bottom,Ag.dimensions="".concat(Ag.tl,":").concat(Ag.br),Ag}return this.decodeAddress(rg)},decodeEx:function(rg){var ag=rg.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),ig=ag[1]||ag[2],ng=ag[3],Ag=ng.split(":");if(Ag.length>1){var sg=this.decodeAddress(Ag[0]),cg=this.decodeAddress(Ag[1]),og=Math.min(sg.row,cg.row),lg=Math.min(sg.col,cg.col),ug=Math.max(sg.row,cg.row),dg=Math.max(sg.col,cg.col);return sg=this.n2l(lg)+og,cg=this.n2l(dg)+ug,{top:og,left:lg,bottom:ug,right:dg,sheetName:ig,tl:{address:sg,col:lg,row:og,$col$row:"$".concat(this.n2l(lg),"$").concat(og),sheetName:ig},br:{address:cg,col:dg,row:ug,$col$row:"$".concat(this.n2l(dg),"$").concat(ug),sheetName:ig},dimensions:"".concat(sg,":").concat(cg)}}if(ng.startsWith("#"))return ig?{sheetName:ig,error:ng}:{error:ng};var hg=this.decodeAddress(ng);return ig?function(fg){for(var mg=1;mg<arguments.length;mg++){var pg=arguments[mg]!=null?arguments[mg]:{};mg%2?eg(Object(pg),!0).forEach(function(bg){Ig(fg,bg,pg[bg])}):Object.getOwnPropertyDescriptors?Object.defineProperties(fg,Object.getOwnPropertyDescriptors(pg)):eg(Object(pg)).forEach(function(bg){Object.defineProperty(fg,bg,Object.getOwnPropertyDescriptor(pg,bg))})}return fg}({sheetName:ig},hg):hg},encodeAddress:function(rg,ag){return Cg.n2l(ag)+rg},encode:function(){switch(arguments.length){case 2:return Cg.encodeAddress(arguments[0],arguments[1]);case 4:return"".concat(Cg.encodeAddress(arguments[0],arguments[1]),":").concat(Cg.encodeAddress(arguments[2],arguments[3]));default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange:function(rg,ag){var ig=z(rg,5),ng=ig[0],Ag=ig[1],sg=ig[3],cg=ig[4],og=z(ag,2),lg=og[0],ug=og[1];return lg>=ng&&lg<=sg&&ug>=Ag&&ug<=cg}};V.exports=Cg},{}],20:[function(n,V,L){(function(z){var gg=n("crypto"),eg={hash:function(Ig){for(var tg=gg.createHash(Ig),Cg=arguments.length,rg=new Array(Cg>1?Cg-1:0),ag=1;ag<Cg;ag++)rg[ag-1]=arguments[ag];return tg.update(z.concat(rg)),tg.digest()},convertPasswordToHash:function(Ig,tg,Cg,rg){if(tg=tg.toLowerCase(),gg.getHashes().indexOf(tg)<0)throw new Error("Hash algorithm '".concat(tg,"' not supported!"));for(var ag=z.from(Ig,"utf16le"),ig=this.hash(tg,z.from(Cg,"base64"),ag),ng=0;ng<rg;ng++){var Ag=z.alloc(4);Ag.writeUInt32LE(ng,0),ig=this.hash(tg,ig,Ag)}return ig.toString("base64")},randomBytes:function(Ig){return gg.randomBytes(Ig)}};V.exports=eg}).call(this,n("buffer").Buffer)},{buffer:216,crypto:335}],21:[function(n,V,L){function z(ag){return new eg(ag)}function gg(ag){var ig,ng;function Ag(cg,og){try{var lg=ag[cg](og),ug=lg.value,dg=ug instanceof eg;Promise.resolve(dg?ug.wrapped:ug).then(function(hg){dg?Ag(cg==="return"?"return":"next",hg):sg(lg.done?"return":"normal",hg)},function(hg){Ag("throw",hg)})}catch(hg){sg("throw",hg)}}function sg(cg,og){switch(cg){case"return":ig.resolve({value:og,done:!0});break;case"throw":ig.reject(og);break;default:ig.resolve({value:og,done:!1})}(ig=ig.next)?Ag(ig.key,ig.arg):ng=null}this._invoke=function(cg,og){return new Promise(function(lg,ug){var dg={key:cg,arg:og,resolve:lg,reject:ug,next:null};ng?ng=ng.next=dg:(ig=ng=dg,Ag(cg,og))})},typeof ag.return!="function"&&(this.return=void 0)}function eg(ag){this.wrapped=ag}function Ig(ag){var ig;if(typeof Symbol<"u"&&(Symbol.asyncIterator&&(ig=ag[Symbol.asyncIterator])!=null||Symbol.iterator&&(ig=ag[Symbol.iterator])!=null))return ig.call(ag);throw new TypeError("Object is not async iterable")}typeof Symbol=="function"&&Symbol.asyncIterator&&(gg.prototype[Symbol.asyncIterator]=function(){return this}),gg.prototype.next=function(ag){return this._invoke("next",ag)},gg.prototype.throw=function(ag){return this._invoke("throw",ag)},gg.prototype.return=function(ag){return this._invoke("return",ag)};var tg=n("saxes").SaxesParser,Cg=n("readable-stream").PassThrough,rg=n("./browser-buffer-decode").bufferToString;V.exports=function(){var ag,ig=(ag=regeneratorRuntime.mark(function ng(Ag){var sg,cg,og,lg,ug,dg,hg,fg,mg,pg;return regeneratorRuntime.wrap(function(bg){for(;;)switch(bg.prev=bg.next){case 0:Ag.pipe&&!Ag[Symbol.asyncIterator]&&(Ag=Ag.pipe(new Cg)),(sg=new tg).on("error",function(vg){cg=vg}),og=[],sg.on("opentag",function(vg){return og.push({eventType:"opentag",value:vg})}),sg.on("text",function(vg){return og.push({eventType:"text",value:vg})}),sg.on("closetag",function(vg){return og.push({eventType:"closetag",value:vg})}),lg=!0,ug=!1,bg.prev=9,hg=Ig(Ag);case 11:return bg.next=13,z(hg.next());case 13:return fg=bg.sent,lg=fg.done,bg.next=17,z(fg.value);case 17:if(mg=bg.sent,lg){bg.next=29;break}if(pg=mg,sg.write(rg(pg)),!cg){bg.next=23;break}throw cg;case 23:return bg.next=25,og;case 25:og=[];case 26:lg=!0,bg.next=11;break;case 29:bg.next=35;break;case 31:bg.prev=31,bg.t0=bg.catch(9),ug=!0,dg=bg.t0;case 35:if(bg.prev=35,bg.prev=36,lg||hg.return==null){bg.next=40;break}return bg.next=40,z(hg.return());case 40:if(bg.prev=40,!ug){bg.next=43;break}throw dg;case 43:return bg.finish(40);case 44:return bg.finish(35);case 45:case"end":return bg.stop()}},ng,null,[[9,31,35,45],[36,,40,44]])}),function(){return new gg(ag.apply(this,arguments))});return function(ng){return ig.apply(this,arguments)}}()},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],22:[function(n,V,L){var z=n("./col-cache"),gg=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,eg=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;V.exports={slideFormula:function(Ig,tg,Cg){var rg=z.decode(tg),ag=z.decode(Cg);return Ig.replace(gg,function(ig,ng,Ag,sg,cg){if(cg)return ig;var og=eg.exec(sg);if(og){var lg=og[1],ug=og[2].toUpperCase(),dg=og[3],hg=og[4];if(ug.length>3||ug.length===3&&ug>"XFD")return ig;var fg=z.l2n(ug),mg=parseInt(hg,10);return lg||(fg+=ag.col-rg.col),dg||(mg+=ag.row-rg.row),(ng||"")+(lg||"")+z.n2l(fg)+(dg||"")+mg}return ig})}}},{"./col-cache":19}],23:[function(n,V,L){(function(z,gg){function eg(ug,dg,hg,fg,mg,pg,bg){try{var vg=ug[pg](bg),Vg=vg.value}catch(wg){return void hg(wg)}vg.done?dg(Vg):Promise.resolve(Vg).then(fg,mg)}function Ig(ug){return function(){var dg=this,hg=arguments;return new Promise(function(fg,mg){var pg=ug.apply(dg,hg);function bg(Vg){eg(pg,fg,mg,bg,vg,"next",Vg)}function vg(Vg){eg(pg,fg,mg,bg,vg,"throw",Vg)}bg(void 0)})}}function tg(ug,dg){if(!(ug instanceof dg))throw new TypeError("Cannot call a class as a function")}function Cg(ug,dg){for(var hg=0;hg<dg.length;hg++){var fg=dg[hg];fg.enumerable=fg.enumerable||!1,fg.configurable=!0,"value"in fg&&(fg.writable=!0),Object.defineProperty(ug,fg.key,fg)}}function rg(ug,dg,hg){return dg&&Cg(ug.prototype,dg),ug}var ag=n("readable-stream"),ig=n("./utils"),ng=n("./string-buf"),Ag=function(){function ug(dg,hg){tg(this,ug),this._data=dg,this._encoding=hg}return rg(ug,[{key:"copy",value:function(dg,hg,fg,mg){return this.toBuffer().copy(dg,hg,fg,mg)}},{key:"toBuffer",value:function(){return this._buffer||(this._buffer=gg.from(this._data,this._encoding)),this._buffer}},{key:"length",get:function(){return this.toBuffer().length}}]),ug}(),sg=function(){function ug(dg){tg(this,ug),this._data=dg}return rg(ug,[{key:"copy",value:function(dg,hg,fg,mg){return this._data._buf.copy(dg,hg,fg,mg)}},{key:"toBuffer",value:function(){return this._data.toBuffer()}},{key:"length",get:function(){return this._data.length}}]),ug}(),cg=function(){function ug(dg){tg(this,ug),this._data=dg}return rg(ug,[{key:"copy",value:function(dg,hg,fg,mg){this._data.copy(dg,hg,fg,mg)}},{key:"toBuffer",value:function(){return this._data}},{key:"length",get:function(){return this._data.length}}]),ug}(),og=function(){function ug(dg){tg(this,ug),this.size=dg,this.buffer=gg.alloc(dg),this.iRead=0,this.iWrite=0}return rg(ug,[{key:"toBuffer",value:function(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;var dg=gg.alloc(this.iWrite-this.iRead);return this.buffer.copy(dg,0,this.iRead,this.iWrite),dg}},{key:"read",value:function(dg){var hg;return dg===0?null:dg===void 0||dg>=this.length?(hg=this.toBuffer(),this.iRead=this.iWrite,hg):(hg=gg.alloc(dg),this.buffer.copy(hg,0,this.iRead,dg),this.iRead+=dg,hg)}},{key:"write",value:function(dg,hg,fg){var mg=Math.min(fg,this.size-this.iWrite);return dg.copy(this.buffer,this.iWrite,hg,hg+mg),this.iWrite+=mg,mg}},{key:"length",get:function(){return this.iWrite-this.iRead}},{key:"eod",get:function(){return this.iRead===this.iWrite}},{key:"full",get:function(){return this.iWrite===this.size}}]),ug}(),lg=function(ug){ug=ug||{},this.bufSize=ug.bufSize||1048576,this.buffers=[],this.batch=ug.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};ig.inherits(lg,ag.Duplex,{toBuffer:function(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return gg.concat(this.buffers.map(function(ug){return ug.toBuffer()}))}},_getWritableBuffer:function(){if(this.buffers.length){var ug=this.buffers[this.buffers.length-1];if(!ug.full)return ug}var dg=new og(this.bufSize);return this.buffers.push(dg),dg},_pipe:function(ug){var dg=this;return Ig(regeneratorRuntime.mark(function hg(){var fg;return regeneratorRuntime.wrap(function(mg){for(;;)switch(mg.prev=mg.next){case 0:return fg=function(pg){return new Promise(function(bg){pg.write(ug.toBuffer(),function(){bg()})})},mg.next=3,Promise.all(dg.pipes.map(fg));case 3:case"end":return mg.stop()}},hg)}))()},_writeToBuffers:function(ug){for(var dg=0,hg=ug.length;dg<hg;)dg+=this._getWritableBuffer().write(ug,dg,hg-dg)},write:function(ug,dg,hg){var fg=this;return Ig(regeneratorRuntime.mark(function mg(){var pg;return regeneratorRuntime.wrap(function(bg){for(;;)switch(bg.prev=bg.next){case 0:if(dg instanceof Function&&(hg=dg,dg="utf8"),hg=hg||ig.nop,!(ug instanceof ng)){bg.next=6;break}pg=new sg(ug),bg.next=15;break;case 6:if(!(ug instanceof gg)){bg.next=10;break}pg=new cg(ug),bg.next=15;break;case 10:if(!(typeof ug=="string"||ug instanceof String||ug instanceof ArrayBuffer)){bg.next=14;break}pg=new Ag(ug,dg),bg.next=15;break;case 14:throw new Error("Chunk must be one of type String, Buffer or StringBuf.");case 15:if(!fg.pipes.length){bg.next=31;break}if(!fg.batch){bg.next=21;break}for(fg._writeToBuffers(pg);!fg.corked&&fg.buffers.length>1;)fg._pipe(fg.buffers.shift());bg.next=29;break;case 21:if(fg.corked){bg.next=27;break}return bg.next=24,fg._pipe(pg);case 24:hg(),bg.next=29;break;case 27:fg._writeToBuffers(pg),z.nextTick(hg);case 29:bg.next=34;break;case 31:fg.paused||fg.emit("data",pg.toBuffer()),fg._writeToBuffers(pg),fg.emit("readable");case 34:return bg.abrupt("return",!0);case 35:case"end":return bg.stop()}},mg)}))()},cork:function(){this.corked=!0},_flush:function(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork:function(){this.corked=!1,this._flush()},end:function(ug,dg,hg){var fg=this,mg=function(pg){pg?hg(pg):(fg._flush(),fg.pipes.forEach(function(bg){bg.end()}),fg.emit("finish"))};ug?this.write(ug,dg,mg):mg()},read:function(ug){var dg;if(ug){for(dg=[];ug&&this.buffers.length&&!this.buffers[0].eod;){var hg=this.buffers[0],fg=hg.read(ug);ug-=fg.length,dg.push(fg),hg.eod&&hg.full&&this.buffers.shift()}return gg.concat(dg)}return dg=this.buffers.map(function(mg){return mg.toBuffer()}).filter(Boolean),this.buffers=[],gg.concat(dg)},setEncoding:function(ug){this.encoding=ug},pause:function(){this.paused=!0},resume:function(){this.paused=!1},isPaused:function(){return!!this.paused},pipe:function(ug){this.pipes.push(ug),!this.paused&&this.buffers.length&&this.end()},unpipe:function(ug){this.pipes=this.pipes.filter(function(dg){return dg!==ug})},unshift:function(){throw new Error("Not Implemented")},wrap:function(){throw new Error("Not Implemented")}}),V.exports=lg}).call(this,n("_process"),n("buffer").Buffer)},{"./string-buf":24,"./utils":26,_process:467,buffer:216,"readable-stream":491}],24:[function(n,V,L){(function(z){function gg(Ig,tg){for(var Cg=0;Cg<tg.length;Cg++){var rg=tg[Cg];rg.enumerable=rg.enumerable||!1,rg.configurable=!0,"value"in rg&&(rg.writable=!0),Object.defineProperty(Ig,rg.key,rg)}}var eg=function(){function Ig(rg){(function(ag,ig){if(!(ag instanceof ig))throw new TypeError("Cannot call a class as a function")})(this,Ig),this._buf=z.alloc(rg&&rg.size||16384),this._encoding=rg&&rg.encoding||"utf8",this._inPos=0,this._buffer=void 0}var tg,Cg;return tg=Ig,(Cg=[{key:"toBuffer",value:function(){return this._buffer||(this._buffer=z.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}},{key:"reset",value:function(rg){rg=rg||0,this._buffer=void 0,this._inPos=rg}},{key:"_grow",value:function(rg){for(var ag=2*this._buf.length;ag<rg;)ag*=2;var ig=z.alloc(ag);this._buf.copy(ig,0),this._buf=ig}},{key:"addText",value:function(rg){this._buffer=void 0;for(var ag=this._inPos+this._buf.write(rg,this._inPos,this._encoding);ag>=this._buf.length-4;)this._grow(this._inPos+rg.length),ag=this._inPos+this._buf.write(rg,this._inPos,this._encoding);this._inPos=ag}},{key:"addStringBuf",value:function(rg){rg.length&&(this._buffer=void 0,this.length+rg.length>this.capacity&&this._grow(this.length+rg.length),rg._buf.copy(this._buf,this._inPos,0,rg.length),this._inPos+=rg.length)}},{key:"length",get:function(){return this._inPos}},{key:"capacity",get:function(){return this._buf.length}},{key:"buffer",get:function(){return this._buf}}])&&gg(tg.prototype,Cg),Ig}();V.exports=eg}).call(this,n("buffer").Buffer)},{buffer:216}],25:[function(n,V,L){function z(tg){return(z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Cg){return typeof Cg}:function(Cg){return Cg&&typeof Symbol=="function"&&Cg.constructor===Symbol&&Cg!==Symbol.prototype?"symbol":typeof Cg})(tg)}var gg=Object.prototype.toString,eg=/["&<>]/,Ig={each:function(tg,Cg){tg&&(Array.isArray(tg)?tg.forEach(Cg):Object.keys(tg).forEach(function(rg){Cg(tg[rg],rg)}))},some:function(tg,Cg){return!!tg&&(Array.isArray(tg)?tg.some(Cg):Object.keys(tg).some(function(rg){return Cg(tg[rg],rg)}))},every:function(tg,Cg){return!tg||(Array.isArray(tg)?tg.every(Cg):Object.keys(tg).every(function(rg){return Cg(tg[rg],rg)}))},map:function(tg,Cg){return tg?Array.isArray(tg)?tg.map(Cg):Object.keys(tg).map(function(rg){return Cg(tg[rg],rg)}):[]},keyBy:function(tg,Cg){return tg.reduce(function(rg,ag){return rg[ag[Cg]]=ag,rg},{})},isEqual:function(tg,Cg){var rg=z(tg),ag=z(Cg),ig=Array.isArray(tg),ng=Array.isArray(Cg);if(rg!==ag)return!1;switch(z(tg)){case"object":return ig||ng?!(!ig||!ng)&&tg.length===Cg.length&&tg.every(function(Ag,sg){var cg=Cg[sg];return Ig.isEqual(Ag,cg)}):Ig.every(tg,function(Ag,sg){var cg=Cg[sg];return Ig.isEqual(Ag,cg)});default:return tg===Cg}},escapeHtml:function(tg){var Cg=eg.exec(tg);if(!Cg)return tg;for(var rg="",ag="",ig=0,ng=Cg.index;ng<tg.length;ng++){switch(tg.charAt(ng)){case'"':ag=""";break;case"&":ag="&";break;case"'":ag="'";break;case"<":ag="<";break;case">":ag=">";break;default:continue}ig!==ng&&(rg+=tg.substring(ig,ng)),ig=ng+1,rg+=ag}return ig!==ng?rg+tg.substring(ig,ng):rg},strcmp:function(tg,Cg){return tg<Cg?-1:tg>Cg?1:0},isUndefined:function(tg){return gg.call(tg)==="[object Undefined]"},isObject:function(tg){return gg.call(tg)==="[object Object]"},deepMerge:function(){var tg,Cg,rg,ag=arguments[0]||{},ig=arguments.length;function ng(sg,cg){tg=ag[cg],rg=Array.isArray(sg),Ig.isObject(sg)||rg?(rg?(rg=!1,Cg=tg&&Array.isArray(tg)?tg:[]):Cg=tg&&Ig.isObject(tg)?tg:{},ag[cg]=Ig.deepMerge(Cg,sg)):Ig.isUndefined(sg)||(ag[cg]=sg)}for(var Ag=0;Ag<ig;Ag++)Ig.each(arguments[Ag],ng);return ag}};V.exports=Ig},{}],26:[function(n,V,L){(function(z,gg){var eg=n("fs"),Ig=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,tg={nop:function(){},promiseImmediate:function(Cg){return new Promise(function(rg){z.setImmediate?gg(function(){rg(Cg)}):setTimeout(function(){rg(Cg)},1)})},inherits:function(Cg,rg,ag,ig){Cg.super_=rg,ig||(ig=ag,ag=null),ag&&Object.keys(ag).forEach(function(Ag){Object.defineProperty(Cg,Ag,Object.getOwnPropertyDescriptor(ag,Ag))});var ng={constructor:{value:Cg,enumerable:!1,writable:!1,configurable:!0}};ig&&Object.keys(ig).forEach(function(Ag){ng[Ag]=Object.getOwnPropertyDescriptor(ig,Ag)}),Cg.prototype=Object.create(rg.prototype,ng)},dateToExcel:function(Cg,rg){return 25569+Cg.getTime()/864e5-(rg?1462:0)},excelToDate:function(Cg,rg){var ag=Math.round(24*(Cg-25569+(rg?1462:0))*3600*1e3);return new Date(ag)},parsePath:function(Cg){var rg=Cg.lastIndexOf("/");return{path:Cg.substring(0,rg),name:Cg.substring(rg+1)}},getRelsPath:function(Cg){var rg=tg.parsePath(Cg);return"".concat(rg.path,"/_rels/").concat(rg.name,".rels")},xmlEncode:function(Cg){var rg=Ig.exec(Cg);if(!rg)return Cg;for(var ag="",ig="",ng=0,Ag=rg.index;Ag<Cg.length;Ag++){var sg=Cg.charCodeAt(Ag);switch(sg){case 34:ig=""";break;case 38:ig="&";break;case 39:ig="'";break;case 60:ig="<";break;case 62:ig=">";break;case 127:ig="";break;default:if(sg<=31&&(sg<=8||sg>=11&&sg!==13)){ig="";break}continue}ng!==Ag&&(ag+=Cg.substring(ng,Ag)),ng=Ag+1,ig&&(ag+=ig)}return ng!==Ag?ag+Cg.substring(ng,Ag):ag},xmlDecode:function(Cg){return Cg.replace(/&([a-z]*);/g,function(rg){switch(rg){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return rg}})},validInt:function(Cg){var rg=parseInt(Cg,10);return Number.isNaN(rg)?0:rg},isDateFmt:function(Cg){return!!Cg&&(Cg=(Cg=Cg.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null},fs:{exists:function(Cg){return new Promise(function(rg){eg.access(Cg,eg.constants.F_OK,function(ag){rg(!ag)})})}},toIsoDateString:function(Cg){return Cg.toIsoString().subsstr(0,10)}};V.exports=tg}).call(this,typeof commonjsGlobal<"u"?commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{},n("timers").setImmediate)},{fs:215,timers:521}],27:[function(n,V,L){function z(rg,ag){for(var ig=0;ig<ag.length;ig++){var ng=ag[ig];ng.enumerable=ng.enumerable||!1,ng.configurable=!0,"value"in ng&&(ng.writable=!0),Object.defineProperty(rg,ng.key,ng)}}var gg=n("./under-dash"),eg=n("./utils");function Ig(rg,ag,ig){rg.push(" "),rg.push(ag),rg.push('="'),rg.push(eg.xmlEncode(ig.toString())),rg.push('"')}function tg(rg,ag){ag&&gg.each(ag,function(ig,ng){ig!==void 0&&Ig(rg,ng,ig)})}var Cg=function(){function rg(){(function(ng,Ag){if(!(ng instanceof Ag))throw new TypeError("Cannot call a class as a function")})(this,rg),this._xml=[],this._stack=[],this._rollbacks=[]}var ag,ig;return ag=rg,(ig=[{key:"openXml",value:function(ng){var Ag=this._xml;Ag.push("<?xml"),tg(Ag,ng),Ag.push(`?>
|
|
601
601
|
`)}},{key:"openNode",value:function(ng,Ag){var sg=this.tos,cg=this._xml;sg&&this.open&&cg.push(">"),this._stack.push(ng),cg.push("<"),cg.push(ng),tg(cg,Ag),this.leaf=!0,this.open=!0}},{key:"addAttribute",value:function(ng,Ag){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");Ag!==void 0&&Ig(this._xml,ng,Ag)}},{key:"addAttributes",value:function(ng){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");tg(this._xml,ng)}},{key:"writeText",value:function(ng){var Ag=this._xml;this.open&&(Ag.push(">"),this.open=!1),this.leaf=!1,Ag.push(eg.xmlEncode(ng.toString()))}},{key:"writeXml",value:function(ng){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(ng)}},{key:"closeNode",value:function(){var ng=this._stack.pop(),Ag=this._xml;this.leaf?Ag.push("/>"):(Ag.push("</"),Ag.push(ng),Ag.push(">")),this.open=!1,this.leaf=!1}},{key:"leafNode",value:function(ng,Ag,sg){this.openNode(ng,Ag),sg!==void 0&&this.writeText(sg),this.closeNode()}},{key:"closeAll",value:function(){for(;this._stack.length;)this.closeNode()}},{key:"addRollback",value:function(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}},{key:"commit",value:function(){this._rollbacks.pop()}},{key:"rollback",value:function(){var ng=this._rollbacks.pop();this._xml.length>ng.xml&&this._xml.splice(ng.xml,this._xml.length-ng.xml),this._stack.length>ng.stack&&this._stack.splice(ng.stack,this._stack.length-ng.stack),this.leaf=ng.leaf,this.open=ng.open}},{key:"tos",get:function(){return this._stack.length?this._stack[this._stack.length-1]:void 0}},{key:"cursor",get:function(){return this._xml.length}},{key:"xml",get:function(){return this.closeAll(),this._xml.join("")}}])&&z(ag.prototype,ig),rg}();Cg.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},V.exports=Cg},{"./under-dash":25,"./utils":26}],28:[function(n,V,L){(function(z){function gg(og){return(gg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(lg){return typeof lg}:function(lg){return lg&&typeof Symbol=="function"&&lg.constructor===Symbol&&lg!==Symbol.prototype?"symbol":typeof lg})(og)}function eg(og,lg,ug,dg,hg,fg,mg){try{var pg=og[fg](mg),bg=pg.value}catch(vg){return void ug(vg)}pg.done?lg(bg):Promise.resolve(bg).then(dg,hg)}function Ig(og,lg){for(var ug=0;ug<lg.length;ug++){var dg=lg[ug];dg.enumerable=dg.enumerable||!1,dg.configurable=!0,"value"in dg&&(dg.writable=!0),Object.defineProperty(og,dg.key,dg)}}function tg(og,lg){return(tg=Object.setPrototypeOf||function(ug,dg){return ug.__proto__=dg,ug})(og,lg)}function Cg(og){var lg=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var ug,dg=ag(og);if(lg){var hg=ag(this).constructor;ug=Reflect.construct(dg,arguments,hg)}else ug=dg.apply(this,arguments);return rg(this,ug)}}function rg(og,lg){return!lg||gg(lg)!=="object"&&typeof lg!="function"?function(ug){if(ug===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ug}(og):lg}function ag(og){return(ag=Object.setPrototypeOf?Object.getPrototypeOf:function(lg){return lg.__proto__||Object.getPrototypeOf(lg)})(og)}var ig=n("events"),ng=n("jszip"),Ag=n("./stream-buf"),sg=n("./browser-buffer-encode").stringToBuffer,cg=function(og){(function(pg,bg){if(typeof bg!="function"&&bg!==null)throw new TypeError("Super expression must either be null or a function");pg.prototype=Object.create(bg&&bg.prototype,{constructor:{value:pg,writable:!0,configurable:!0}}),bg&&tg(pg,bg)})(mg,og);var lg,ug,dg,hg,fg=Cg(mg);function mg(pg){var bg;return function(vg,Vg){if(!(vg instanceof Vg))throw new TypeError("Cannot call a class as a function")}(this,mg),(bg=fg.call(this)).options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},pg),bg.zip=new ng,bg.stream=new Ag,bg}return lg=mg,(ug=[{key:"append",value:function(pg,bg){bg.hasOwnProperty("base64")&&bg.base64?this.zip.file(bg.name,pg,{base64:!0}):(z.browser&&typeof pg=="string"&&(pg=sg(pg)),this.zip.file(bg.name,pg))}},{key:"finalize",value:(dg=regeneratorRuntime.mark(function pg(){var bg;return regeneratorRuntime.wrap(function(vg){for(;;)switch(vg.prev=vg.next){case 0:return vg.next=2,this.zip.generateAsync(this.options);case 2:bg=vg.sent,this.stream.end(bg),this.emit("finish");case 5:case"end":return vg.stop()}},pg,this)}),hg=function(){var pg=this,bg=arguments;return new Promise(function(vg,Vg){var wg=dg.apply(pg,bg);function yg(Wg){eg(wg,vg,Vg,yg,Zg,"next",Wg)}function Zg(Wg){eg(wg,vg,Vg,yg,Zg,"throw",Wg)}yg(void 0)})},function(){return hg.apply(this,arguments)})},{key:"read",value:function(pg){return this.stream.read(pg)}},{key:"setEncoding",value:function(pg){return this.stream.setEncoding(pg)}},{key:"pause",value:function(){return this.stream.pause()}},{key:"resume",value:function(){return this.stream.resume()}},{key:"isPaused",value:function(){return this.stream.isPaused()}},{key:"pipe",value:function(pg,bg){return this.stream.pipe(pg,bg)}},{key:"unpipe",value:function(pg){return this.stream.unpipe(pg)}},{key:"unshift",value:function(pg){return this.stream.unshift(pg)}},{key:"wrap",value:function(pg){return this.stream.wrap(pg)}}])&&Ig(lg.prototype,ug),mg}(ig.EventEmitter);V.exports={ZipWriter:cg}}).call(this,n("_process"))},{"./browser-buffer-encode":17,"./stream-buf":23,_process:467,events:367,jszip:399}],29:[function(n,V,L){V.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},28:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"年"m"月"d"日"',"zh-cn":'yyyy"年"m"月"d"日"',"ja-jp":'yyyy"年"m"月"d"日"',"ko-kr":'yyyy"년" mm"월" dd"일"'},32:{"zh-tw":'hh"時"mm"分"',"zh-cn":'h"时"mm"分"',"ja-jp":'h"時"mm"分"',"ko-kr":'h"시" mm"분"'},33:{"zh-tw":'hh"時"mm"分"ss"秒"',"zh-cn":'h"时"mm"分"ss"秒"',"ja-jp":'h"時"mm"分"ss"秒"',"ko-kr":'h"시" mm"분" ss"초"'},34:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},51:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},52:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'yyyy"年"m"月"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'m"月"d"日"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},55:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},58:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],30:[function(n,V,L){V.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],31:[function(n,V,L){function z(ng,Ag){var sg;if(typeof Symbol>"u"||ng[Symbol.iterator]==null){if(Array.isArray(ng)||(sg=function(hg,fg){if(hg){if(typeof hg=="string")return gg(hg,fg);var mg=Object.prototype.toString.call(hg).slice(8,-1);if(mg==="Object"&&hg.constructor&&(mg=hg.constructor.name),mg==="Map"||mg==="Set")return Array.from(hg);if(mg==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(mg))return gg(hg,fg)}}(ng))||Ag){sg&&(ng=sg);var cg=0,og=function(){};return{s:og,n:function(){return cg>=ng.length?{done:!0}:{done:!1,value:ng[cg++]}},e:function(hg){throw hg},f:og}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
package/package.json
CHANGED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { ref as m, onMounted as l, onUnmounted as g, createElementBlock as d, openBlock as _, createElementVNode as u } from "vue";
|
|
2
|
-
import { y as a } from "./vendor-Dm-zbZAk.js";
|
|
3
|
-
import { w as x } from "./utils-Dl1GcTAW.js";
|
|
4
|
-
const p = { id: "app" }, f = ["src"], w = /* @__PURE__ */ Object.assign({
|
|
5
|
-
name: "QsyxImgToText"
|
|
6
|
-
}, {
|
|
7
|
-
__name: "index",
|
|
8
|
-
props: {
|
|
9
|
-
src: String
|
|
10
|
-
},
|
|
11
|
-
emits: ["getText"],
|
|
12
|
-
setup(s, { emit: i }) {
|
|
13
|
-
const r = i, o = s, t = m(null), e = a.createWorker({
|
|
14
|
-
// logger: m => console.log(m),
|
|
15
|
-
}), c = async () => {
|
|
16
|
-
if (t.value) {
|
|
17
|
-
if (await e.load(), await e.loadLanguage("chi_sim+eng"), await e.initialize("chi_sim+eng", a.OEM.LSTM_ONLY), await e.setParameters({
|
|
18
|
-
tessedit_pageseg_mode: a.PSM.SINGLE_BLOCK
|
|
19
|
-
}), o.src.includes("http://")) {
|
|
20
|
-
const { data: { text: n } } = await e.recognize(o.src);
|
|
21
|
-
} else {
|
|
22
|
-
const { data: { text: n } } = await e.recognize(t.value);
|
|
23
|
-
}
|
|
24
|
-
r("getText", text), console.log("识别结果:", text);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
return l(() => {
|
|
28
|
-
c();
|
|
29
|
-
}), g(async () => {
|
|
30
|
-
await e.terminate();
|
|
31
|
-
}), (n, h) => (_(), d("div", p, [
|
|
32
|
-
u("img", {
|
|
33
|
-
ref_key: "imageRef",
|
|
34
|
-
ref: t,
|
|
35
|
-
alt: "Vue logo",
|
|
36
|
-
src: s.src
|
|
37
|
-
}, null, 8, f)
|
|
38
|
-
]));
|
|
39
|
-
}
|
|
40
|
-
}), L = x(w);
|
|
41
|
-
export {
|
|
42
|
-
L as Q
|
|
43
|
-
};
|