@sheetxl/studio-vanilla 0.4.9 → 0.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/browser/cjs/B0rdyyttE2Aibsag.cjs +7 -0
- package/browser/cjs/B2e7dDI-zKoqXpIW.cjs +107 -0
- package/browser/cjs/BAyEOOtO-9sHQQRW.cjs +7 -0
- package/browser/cjs/BPTHTRDvNOVkUJGa.cjs +7 -0
- package/browser/cjs/BlSFY6zLlebuejdV.cjs +7 -0
- package/browser/cjs/BplA5pDzOJpfTZuA.cjs +7 -0
- package/browser/cjs/BshvMtUxTJHj3JQN.cjs +7 -0
- package/browser/cjs/BuWtGFX0HiBezGjw.cjs +7 -0
- package/browser/cjs/C5FXOMLhAu_KTjVe.cjs +7 -0
- package/browser/cjs/C7EZCTczsC-gkRcq.cjs +7 -0
- package/browser/cjs/CFcjX5-nVsgzdZ4F.cjs +7 -0
- package/browser/cjs/CjZbhk41S1qO_74G.cjs +7 -0
- package/browser/cjs/CuTW2Pt-L5n-hNxV.cjs +7 -0
- package/browser/cjs/D3iOk-Q2tRdUeTcn.cjs +7 -0
- package/browser/cjs/DFspSkki779xN-Ey.cjs +7 -0
- package/browser/cjs/DFtyXc7YFh9dIp74.cjs +7 -0
- package/browser/cjs/Db_Ew1r6yOMYylvA.cjs +7 -0
- package/browser/cjs/DgBn3aW39yjgm0X_.cjs +7 -0
- package/browser/cjs/DiBy6-IxLscyMW2y.cjs +7 -0
- package/browser/cjs/DrlS1oz9Nea8Pm3j.cjs +7 -0
- package/browser/cjs/Dx-jp_LJxWbAScyA.cjs +7 -0
- package/browser/cjs/SzxJv7OUs5ojl8gx.cjs +7 -0
- package/browser/cjs/T4SHYo66xDT3l9JN.cjs +7 -0
- package/browser/cjs/index.cjs +4 -3
- package/browser/cjs/vfUix5Di0Ro8tEID.cjs +7 -0
- package/browser/esm/B5kkStdEkTczERyM.mjs +7 -0
- package/browser/esm/B905wKzTtod-jbsD.mjs +7 -0
- package/browser/esm/BALnKy2Fp7fyk-lc.mjs +7 -0
- package/browser/esm/BDVJ7eOPpW5FnEAP.mjs +7 -0
- package/browser/esm/BGpv6Kq7eBlJy43T.mjs +7 -0
- package/browser/esm/BUSR_OK5Qi6hRPfw.mjs +7 -0
- package/browser/esm/BXUGsC1Mo3FP8vnW.mjs +7 -0
- package/browser/esm/BlGoi1_x9rUMpWMd.mjs +7 -0
- package/browser/esm/Bo_ZPRrOQrqOVHAF.mjs +7 -0
- package/browser/esm/BuURCm92KsyGHG9e.mjs +7 -0
- package/browser/esm/CFFC0SNc24a0Dxnh.mjs +7 -0
- package/browser/esm/CGZ5MX7afzMxDkCe.mjs +7 -0
- package/browser/esm/Cc_VWd0wF5-39LsI.mjs +7 -0
- package/browser/esm/Cq8D_M0jeHLcnRjg.mjs +7 -0
- package/browser/esm/CzmNwV9tfFYUp_gS.mjs +7 -0
- package/browser/esm/De6RPxc4p_jXLlT5.mjs +7 -0
- package/browser/esm/DlVZFM9ZR5jGyG0_.mjs +7 -0
- package/browser/esm/DqXxZP6yKF4U1YfY.mjs +7 -0
- package/browser/esm/DtmE60AvstK9u0Ta.mjs +107 -0
- package/browser/esm/Dz2OVgq3kxi1TkfX.mjs +7 -0
- package/browser/esm/PS0cqYnlMVEGOQpI.mjs +7 -0
- package/browser/esm/QBGUD1XS5_pysBLL.mjs +7 -0
- package/browser/esm/index.mjs +2 -8
- package/browser/esm/tFhROdVSw9KLQfUN.mjs +7 -0
- package/browser/esm/uGDCdtqxjqRCo4Xn.mjs +7 -0
- package/cdn/index.js +40 -44
- package/cdn/loader.js +1 -1
- package/package.json +5 -5
- package/types/index.d.ts +9 -9
- package/browser/cjs/3GhIDU8JK1oBJrCA.cjs +0 -6
- package/browser/cjs/5hPVyVAXmITQCRAG.cjs +0 -6
- package/browser/cjs/7PlrLPQx1lct0mdN.cjs +0 -6
- package/browser/cjs/B4K6KuggSdXj-V8g.cjs +0 -6
- package/browser/cjs/B5Qc3gXLEhscRsFm.cjs +0 -12
- package/browser/cjs/B7eW1GQgFvphlLGY.cjs +0 -6
- package/browser/cjs/BQPFxJ77OaD_sBIX.cjs +0 -6
- package/browser/cjs/Ba3O1f0NYbzEwNAd.cjs +0 -6
- package/browser/cjs/BoojmbbjqixMVu2H.cjs +0 -6
- package/browser/cjs/CSGVl8EBCRhxcFm1.cjs +0 -15
- package/browser/cjs/CalnqtYH48_x2rcI.cjs +0 -301
- package/browser/cjs/CjDsO4sQWUHbIX1N.cjs +0 -6
- package/browser/cjs/CsCaFaiySArzEfdH.cjs +0 -7
- package/browser/cjs/D6AUUY9awlTRjjqd.cjs +0 -11
- package/browser/cjs/D8lN5Mv3J4SwSpLP.cjs +0 -161
- package/browser/cjs/D9RQ5oYv7U38wSI7.cjs +0 -11
- package/browser/cjs/DCd2rPNFkSHDaRcM.cjs +0 -7
- package/browser/cjs/DGQrcBvjSGwwoZEv.cjs +0 -6
- package/browser/cjs/DIXyMJKaeCGuWxjZ.cjs +0 -12
- package/browser/cjs/Dmw7xaaV85s72QZe.cjs +0 -145
- package/browser/cjs/DzCXPcqV1oKbCcLO.cjs +0 -16
- package/browser/cjs/EoaX6dPoS-Mb-ITO.cjs +0 -42
- package/browser/cjs/Y6OgkWqbIB761o5q.cjs +0 -6
- package/browser/cjs/gbABnN2zW1kHo3_I.cjs +0 -19
- package/browser/cjs/kfV5Cli9oE9IsCtx.cjs +0 -6
- package/browser/cjs/nURb18uhj9rScsHa.cjs +0 -6
- package/browser/esm/2NQDbhor1Nuzndgq.mjs +0 -3756
- package/browser/esm/4aC35Q2XPOwifBRR.mjs +0 -1365
- package/browser/esm/5zFDFBAgT-aPgQQ0.mjs +0 -1665
- package/browser/esm/B3I_TrFN_pAK5Mdh.mjs +0 -2346
- package/browser/esm/BD9GKsR-k4aEK2tx.mjs +0 -421
- package/browser/esm/BQpsMTJvguy6LMIq.mjs +0 -43
- package/browser/esm/BfCWogOnq8R-c3dD.mjs +0 -21
- package/browser/esm/BkGQPKMRPIVUVTLO.mjs +0 -944
- package/browser/esm/C81J50HcankGTOIj.mjs +0 -390
- package/browser/esm/CO_s27056nua6qzN.mjs +0 -1346
- package/browser/esm/CPEjlDUTxckVS1rp.mjs +0 -50
- package/browser/esm/CY7astxzrfb7uZqy.mjs +0 -2178
- package/browser/esm/CZVzRhflTpwAAl1o.mjs +0 -22
- package/browser/esm/CaWZXQsmKl4hTNq5.mjs +0 -46
- package/browser/esm/CxcLNXXaxyFyUzyb.mjs +0 -633
- package/browser/esm/D0icxW0WVNoeVRLH.mjs +0 -58
- package/browser/esm/DFQvqk5r1uf_z0h_.mjs +0 -24994
- package/browser/esm/DRL5s4S0fIXi1aU7.mjs +0 -84
- package/browser/esm/DRmeb1VC4YCzKKWd.mjs +0 -13208
- package/browser/esm/DTwhl4v5YnZrUSgI.mjs +0 -24
- package/browser/esm/DmpPAs6w-XNWGTIN.mjs +0 -1703
- package/browser/esm/Dx-GS3XDBkRaMNG-.mjs +0 -151
- package/browser/esm/V5CA7xqGOB7-Qx4Y.mjs +0 -1467
- package/browser/esm/gsfI5CGYr7LCQxRx.mjs +0 -41
- package/browser/esm/tOBqasyBAnd7O4qE.mjs +0 -46
- package/browser/esm/tPrnEcHW_czJDZOT.mjs +0 -50
- package/cdn/assets/2NQDbhor1Nuzndgq.js +0 -3756
- package/cdn/assets/4aC35Q2XPOwifBRR.js +0 -1365
- package/cdn/assets/5zFDFBAgT-aPgQQ0.js +0 -1665
- package/cdn/assets/B0w_moB3pDJd-a6V.js +0 -24
- package/cdn/assets/BD9GKsR-k4aEK2tx.js +0 -421
- package/cdn/assets/BJVOhUH_XL03H6ZD.js +0 -22
- package/cdn/assets/BWJOkXXB6Tr-jYUS.js +0 -46
- package/cdn/assets/BapFqJyAb3cblvJM.js +0 -50
- package/cdn/assets/Bg88bG-JM9EHeyYX.js +0 -41
- package/cdn/assets/C81J50HcankGTOIj.js +0 -390
- package/cdn/assets/CO_s27056nua6qzN.js +0 -1346
- package/cdn/assets/CXa9u-7w14dyPYxk.js +0 -1703
- package/cdn/assets/CkcETdiKdTsZAzma.js +0 -1467
- package/cdn/assets/CxcLNXXaxyFyUzyb.js +0 -633
- package/cdn/assets/D0PaU6F-TNaTWj-a.js +0 -43
- package/cdn/assets/D4hoypx6_sZbvrC_.js +0 -2346
- package/cdn/assets/D5exf1RvCqvUoJ3X.js +0 -2178
- package/cdn/assets/DKLitAhDj5Ibh2cc.js +0 -24841
- package/cdn/assets/DRL5s4S0fIXi1aU7.js +0 -84
- package/cdn/assets/DRmeb1VC4YCzKKWd.js +0 -13208
- package/cdn/assets/DYkBvlMlZjOASUJs.js +0 -58
- package/cdn/assets/ON5--a75QdEU99y_.js +0 -151
- package/cdn/assets/PIZDjyqIbvmHXs1T.js +0 -46
- package/cdn/assets/TOkIJFYhNg78FdJa.js +0 -21
- package/cdn/assets/b9dlFmoFz8tJhV0Z.js +0 -50
- package/cdn/assets/d1PG-QPA1GcQ_RuH.js +0 -944
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.11
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import{_ as t}from"./DtmE60AvstK9u0Ta.mjs";import{c as e,b as s,r,t as o,a as i,p as n,d as l}from"./BALnKy2Fp7fyk-lc.mjs";import{IFont as a,IAutoFilter as c,Sort as u,IRange as h,AddressUtils as p,IFill as g,IStyle as d,ITextFrame as m,FormulaError as b,IBorder as f}from"@sheetxl/sdk";class A{constructor(t){this.list=t}get length(){return this.list.length}item(t){return this.list[t]}forEach(t,e){for(let e=0;e<this.list.length;e++)t(this.list[e],e,this)}}const y=t=>!0===t||"1"===t||"on"===t||"true"===t||!1!==t&&"0"!==t&&"off"!==t&&"false"!==t&&null,v=t=>{const e=parseInt(t);return isNaN(e)?null:e},F=t=>{const e=parseFloat(t);return isNaN(e)?null:e},C=new Map;class w{constructor(t,e,s,r,o,i=null,n){const l=(t,e,s)=>n?.getRef?.(t,e,s,n?.parsedRefs),a=t=>n?.getRefs?.(t,n?.parsedRefs);this._parent=t,this.sharedShared=e,this.currentPath=s,this.elemRoot=r,this.jsonRoot=o,t?(this._fileLocation=t._fileLocation,this._getRef=t._getRef,this._getRefs=t._getRefs):(i&&(this._fileLocation=i),l&&a&&(this._getRef=l),a&&(this._getRefs=a),this._onWarning=n?.onWarning,this._addPerson=n?.addPerson)}getRef(t,e=!1){return this._getRef?.(t,this._fileLocation,e)??null}getRelationships(){return this._getRefs(this._fileLocation)??C}getPath(){return this.currentPath}getElemRoot(){return this.elemRoot}getJsonRoot(){return this.jsonRoot}warn(t){this._onWarning?this._onWarning(t):this._parent?this._parent?.warn?.(t):console.warn(t)}addPerson(t){return this._addPerson?this._addPerson(t):this._parent?this._parent?._addPerson?.(t):null}getVisitorParamsState(){return this.sharedShared.getVisitorParamsState()}evaluate(t,e){if(!t)return e;let s=[e];const r=t.split("/");for(let t=0;t<r.length;t++){const e=r[t];if(""===e||"."===e)continue;let o=[];for(let t=0;t<s.length;t++){const r=s[t],i=r.childNodes;for(let t=0;i&&t<i.length;t++){const s=r.childNodes[t];s.localName!==e&&"*"!==e||o.push(s)}}s=o}return 1===s.length?s[0]:0===s.length?null:new A(s)}getFromPath(e,s){return t.getFromPath(e,s)}setToPath(e,s,r){return t.setToPath(e,s,r)}getValAttrAsString(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?s.getAttribute("val")??null:null}getValAttrAsBoolean(t,e,s=!1){let r=this.evaluate(t,e);if(!r)return null;const o=r.hasAttribute("val")?r.getAttribute("val"):void 0;return null==o?s:"1"===o||"on"===o||"true"===o||"0"!==o&&"off"!==o&&"false"!==o&&s}getValAttrAsInteger(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseInt(s.getAttribute("val"))??null:null}getValAttrAsFloat(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseFloat(s.getAttribute("val"))??null:null}get BOOLEAN_COPY(){return y}get INT_COPY(){return v}get FLOAT_COPY(){return F}copyFromAttribute(t,e,s,r=e,o=null){if(!t||!s||!t.hasAttribute(e))return;let i=t.getAttribute(e);if(o)if(Array.isArray(o))for(let t=0;t<o.length;t++){if(null==i)return;if(i=o[t](i),null==i)return}else{if(null==i)return;if(i=o(i),null==i)return}this.setToPath(s,r,i)}}class P{constructor(t){this.jsonKey=t}visit(t,e,s){const r={};return s[this.jsonKey]=r,r}}class N{visit(t,e,s){if(!e)return;const r=e.childNodes;for(let e=0;e<r.length;e++){const o=r.item(e);1===o.nodeType&&"Relationship"===o.localName&&this.processRelationship(t,o,s)}return s}processRelationship(t,e,s){const r={};t.copyFromAttribute(e,"Target",r,"target"),t.copyFromAttribute(e,"Type",r,"type"),t.copyFromAttribute(e,"TargetMode",r,"targetMode"),s[e.getAttribute("Id")]=r}}const O=(e,s)=>{if(e||!e.hasAttribute("rot"))return;const r=e.getAttribute("rot"),o=t.roundAccurately(n(r),2);-1e3!==o&&(s.rotation=o)},T=(t,e,s,r,o)=>{const i=t.getValAttrAsString(r,e);null!==i&&(s[o]=i)},V=(t,e,s,r,o=r,i=null)=>{const n=t.getValAttrAsBoolean(r,e,i);null!==n&&(s[o]=n)},S=(t,e,s,r,o)=>{const i=t.getValAttrAsInteger(r,e);null!==i&&(s[o]=i)},k=(t,e,s,r,o,i=1)=>{const n=t.getValAttrAsFloat(r,e);null!==n&&(s[o]=n*i)};class x{visit(t,e,s){return V(t,e,s,"roundedCorners","roundedCorners"),S(t,e,s,".//AlternateContent/Fallback/style","styleId"),s.range=null,s}afterVisit(t,e,s){let r={};s.types=r;let o={},i=0,n={},l=0,a=t.getVisitorParamsState().get("axes");const c=t.getVisitorParamsState().get("types");for(let t=0;t<c.length;t++){const e=c[t];if(e.xAxisId){const r=e.xAxisId,n=a.get(r);o[t+""]=n,e.offsetXAxis=t,delete e.xAxisId,s.xAxes=o,o.length=++i}if(e.yAxisId){const r=e.yAxisId,o=a.get(r);n[t+""]=o,e.offsetYAxis=t,delete e.yAxisId,s.yAxes=n,n.length=++l}r[t+""]=e}r.length=c.length;const u=t.getVisitorParamsState().get("series");if(!u||0===u.length)return;const h={};s.series=h;for(let t=0;t<u.length;t++)h[t+""]=u[t];h.length=u.length}}class L{visit(t,e,s){return V(t,e,s,"plotVisOnly","plotVisOnly"),T(t,e,s,"dispBlanksAs","dispBlanksAs"),V(t,e,s,".//extLst/ext/dataDisplayOptions16/dispNaAsBlank","dispNaAsBlank"),V(t,e,s,"showDLblsOverMax","showDLblsOverMax"),s}afterVisit(t,e,s){try{const r=t.getValAttrAsBoolean("autoTitleDeleted",e),o=t.evaluate("title",e);t.setToPath(s,"title.shown",!(!0===r||!o));const i=t.evaluate("legend",e);t.setToPath(s,"legend.shown",null!==i)}catch(t){throw new Error("Unexpected Error parsing Chart: "+t)}}}class I{visit(t,e,s){let r={};return s.plotArea=r,r}}class B{EnumMappings(){}static fromOoxmlGradientType(t){return"circle"===t?"radial":t}static fromOoxmlLineCap(t){if("rnd"===t)return"round";if("flat"===t)return"butt";if("sq"===t)return"square";throw new Error("Invalid lineCap type: "+t)}static fromOoxmlCompound(t){return"sng"===t?"single":t}static fromOoxmlAlignment(t){return"ctr"===t?"center":t}}class _{visit(t,e,s){}processStroke(t,e,s){const r={},n=t.evaluate("ln",e);if(n){n.hasAttribute("algn")&&(r.align=B.fromOoxmlAlignment(n.getAttribute("algn"))),n.hasAttribute("cap")&&(r.lineCap=B.fromOoxmlLineCap(n.getAttribute("cap"))),n.hasAttribute("cmpd")&&(r.compound=B.fromOoxmlCompound(n.getAttribute("cmpd"))),n.hasAttribute("w")&&(r.width=o(n.getAttribute("w")));const e=t.evaluate("miter",n);e&&(r.lineJoin="miter",e.hasAttribute("lim")&&(r.miter=parseFloat(e.getAttribute("lim")))),t.evaluate("bevel",n)&&(r.lineJoin="bevel"),t.evaluate("round",n)&&(r.lineJoin="round");const l=t.evaluate("custDash",n);if(l){const e=t.evaluate("ds",l);if(e&&e.length>0){let t="";for(let s=0;s<e.length;s++){const r=e.item(s);t+=i(r.getAttribute("d"))+","+i(r.getAttribute("sp"))}r.dash=t}}const a=t.evaluate("prstDash",n);a&&a.hasAttribute("val")&&(r.dash=a.getAttribute("val")),this.parseEndElement(t,n,r,"headEnd","head"),this.parseEndElement(t,n,r,"tailEnd","tail");const c=this.processFill(t,n,s);r.fill=c}return r}parseEndElement(t,e,s,r,o){const i=t.evaluate(r,e);if(i&&(i.hasAttribute("type")&&(s[o+"Type"]=i.getAttribute("type")),i.hasAttribute("len")||i.hasAttribute("w"))){const t=i.getAttribute("len")?i.getAttribute("len"):"med",e=i.getAttribute("w")?i.getAttribute("w"):"med";s[o+"Size"]=t+"-"+e}}processFill(t,e,r){const o={};if(t.evaluate("noFill",e))return o.none=!0,o;const i=t.evaluate("solidFill",e);if(i){const e=this.processAdjColor(t,i);return e&&(o.solid=e),o}const n=t.evaluate("gradFill",e);if(n){n.hasAttribute("rotWithShape")&&(o.isRotated="1"===n.getAttribute("rotWithShape"));const e=this.processGradFill(t,n);return o.gradient=e,o}const l=t.evaluate("pattFill",e);if(l){const e=this.processPatternFill(t,l);return o.pattern=e,o}const a=t.evaluate("blipFill",e);if(a){a.hasAttribute("rotWithShape")&&(o.isRotated=s(a.getAttribute("rotWithShape"))),a.hasAttribute("dpi")&&(o.dpi=a.getAttribute("dpi"));const e=this.processImageFill(t,a);return o.image=e,o}return o.none=!0,o}processGradFill(t,e){const r={},o=t.evaluate("lin",e);if(o){if(r.type="linear",o.hasAttribute("ang")){const t=n(o.getAttribute("ang"));r.angle=t}if(o.hasAttribute("scaled")){const t=s(o.getAttribute("scaled"));r.scaled=t}}const l={};e.hasAttribute("flip")&&(l.mirror=e.getAttribute("flip")),Object.keys(l).length>0&&(r.tile=l);const a=t.evaluate("path",e);if(a){a.hasAttribute("path")&&(r.type=B.fromOoxmlGradientType(a.getAttribute("path")));const e=t.evaluate("fillToRect",a);e&&(r.fillTo=this.getRect(e))}const c=t.evaluate("tileRect",e);c&&(r.tile.bounds=this.getRect(c));const u=[],h=t.evaluate("gsLst/gs",e);for(let e=0;h&&e<h.length;e++){const s=h.item(e),r={offset:i(s.getAttribute("pos")),color:this.processAdjColor(t,s)};u.push(r)}return u.length>0&&(r.stops=u),r}getRect(t){const e={};return t.hasAttribute("t")&&(e.t=i(t.getAttribute("t"))),t.hasAttribute("l")&&(e.l=i(t.getAttribute("l"))),t.hasAttribute("b")&&(e.b=i(t.getAttribute("b"))),t.hasAttribute("r")&&(e.r=i(t.getAttribute("r"))),0===Object.keys(e).length?null:e}processImageFill(t,e){return{ref:"https://www.sheetxl.com/logo-color-padded-white.jpg",tile:!1}}processPatternFill(t,e){const s={},r=e.getAttribute("prst");s.type=r;const o=t.evaluate("bgClr",e);if(o){const e=this.processAdjColor(t,o);e&&(s.background=e)}const i=t.evaluate("fgClr",e);if(i){let e=this.processAdjColor(t,i);e&&(s.foreground=e)}return s}processAdjColor(t,e){const s=t.evaluate("hslClr",e);if(s)return this.processHslClr(t,s);const r=t.evaluate("prstClr",e);if(r)return this.processClrWithValAttribute(t,r);const o=t.evaluate("schemeClr",e);if(o)return this.processClrWithValAttribute(t,o);const i=t.evaluate("sysClr",e);if(i)return this.processClrWithValAttribute(t,i);const n=t.evaluate("scrgbClr",e);if(n)return this.processScrgbClrElement(t,n);const l=t.evaluate("srgbClr",e);return l?this.processSrgbClrElement(t,l):null}processScrgbClrElement(t,e){let s="lrgba("+i(e.getAttribute("r"))+","+i(e.getAttribute("g"))+","+i(e.getAttribute("b"))+")";return s+=this.processAdjustments(t,e),s}processSrgbClrElement(t,e){let s=e.getAttribute("val");return s+=this.processAdjustments(t,e),s}processHslClr(t,e){let s="hsl("+n(e.getAttribute("hue"))+","+i(e.getAttribute("sat"))+","+i(e.getAttribute("lum"))+")";return s+=this.processAdjustments(t,e),s}processClrWithValAttribute(t,e){const s=e.getAttribute("val");if(!s)return;let r=s;return r+=this.processAdjustments(t,e),r}processAdjustments(t,e){let s="";const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(1===i.nodeType){let r=i.localName;s+="hue"===r||"hueOff"===r||"hueMod"===r?this.processAdjustmentElement(t,e,r,6e4):"gray"===r||"comp"===r||"inv"===r||"gamma"===r||"invGamma"===r?this.processAdjustmentElement(t,e,r,1):this.processAdjustmentElement(t,e,r)}}return s}processAdjustmentElement(t,e,s,r=1e3){const o=t.evaluate(s,e);if(!o)return"";const i=o.getAttribute("val");return i?` ${s} ${!i||parseFloat(i)/r}`:` ${s}`}}class j extends _{visit(t,s,r){try{const o=t.evaluate("xfrm",s);if(o){O(o,r);const s={x:0,y:0,width:0,height:0},i=t.evaluate("off",o);i&&(s.x=e(i.getAttribute("x"))??0,s.y=e(i.getAttribute("y"))??0);const n=t.evaluate("ext",o);i&&(s.width=e(n.getAttribute("cx"))??0,s.height=e(n.getAttribute("cy"))??0),r.bounds=s}const i=t.evaluate("prstGeom",s);i?.hasAttribute("prst")?r.geometry=i?.getAttribute("prst"):t.evaluate("customGeom",s)&&console.warn("customGeom not supported yet");const n=this.processFill(t,s,r);n&&Object.keys(n).length>0&&(r.fill=n);const l=this.processStroke(t,s,r);return l&&Object.keys(l).length>0&&(r.stroke=l),r}catch(t){throw console.warn(t),new Error("Unexpected Error parsing Shape Properties element")}}}class R{visit(t,e,s){let r={};if(T(t,e,r,"grouping","grouping"),V(t,e,r,"varyColors","varyColors"),k(t,e,r,"gapWidth","gapWidth",.01),k(t,e,r,"overlap","overlap",.01),this.parseType(t,e,r),S(t,e,r,"bubbleScale","bubbleScale"),V(t,e,r,"showNegBubbles","showNegativeBubbleValues"),V(t,e,r,"sizeRepresents","bubbleSizeRepresentsWidth"),S(t,e,r,"firstSliceAng","startAngle"),S(t,e,r,"holeSize","holeSize"),T(t,e,r,"scatterStyle","scatterStyle"),this.parseAxisIds(t,e,r),Object.keys(r).length>0){let e=t.getVisitorParamsState().get("types");e||(e=[],t.getVisitorParamsState().set("types",e)),e.push(r)}return r}parseType(t,e,s){switch(e.localName){case"areaChart":s.type="area";break;case"bubbleChart":s.type="bubble";break;case"doughnutChart":case"ofPieType":case"pieChart":s.type="pie";break;case"lineChart":s.type="line";break;case"scatterChart":s.type="scatter"}}parseAxisIds(t,e,s){const r=t.evaluate("axId",e);if(0===r.length)return;const o=r.item(0).getAttribute("val");s.xAxisId=o;const i=r.item(1).getAttribute("val");s.yAxisId=i}}class E extends R{parseType(t,e,s){const r=t.getValAttrAsString("barDir",e);r&&(s.type="col"===r?"column":"bar")}}class Y{constructor(t){this.jsonKey=t}visit(t,e,s){let r={},o=r,i=t.getValAttrAsString("idx",e);null!==i&&(o={},o[i]=r);const n=t.getValAttrAsBoolean("delete",e);this.parseNumFormat(t,e,r),!0===n?(r.showBubbleSize=!1,r.showCatName=!1,r.showLeaderLines=!1,r.showPercentage=!1,r.showSerName=!1,r.showVal=!1,r.showLegendKey=!1):(V(t,e,r,"showBubbleSize","showBubbleSize"),V(t,e,r,"showCatName","showCatName"),V(t,e,r,"showLeaderLines","showLeaderLines"),V(t,e,r,"showPercent","showPercentage"),V(t,e,r,"showSerName","showSerName"),V(t,e,r,"showVal","showVal"),V(t,e,r,"showLegendKey","showLegendKey"));const l=t.evaluate("separator",e);return null!==l&&(r.separator=l.textContent),T(t,e,r,"dLblPos","position"),s[this.jsonKey]=o,r}parseNumFormat(t,e,s){const r=t.evaluate("numFmt",e);if(r){const t=r.getAttribute("formatCode");s.formatCode=t,r.hasAttribute("sourceLinked")&&(s.sourceLinked="1"===r.getAttribute("sourceLinked"))}}}const D=(t,e,s)=>{if(!0===t.getValAttrAsBoolean("invertIfNegative",e))if(t.evaluate("extLst/ext/invertSolidFillFmt",e)){if(s.fill&&s.fillNegative){const e=t.getFromPath(s,"fill.solid.adjs");e&&t.setToPath(s,"fillNegative.solid.adjs",e)}}else{const t={val:"FFFFFF"},e={};e.solid=t,s.fillNegative=e;const r={val:"000000"},o={};o.solid=r;const i={};i.fill=o,s.strokeNegative=i}};class M{visit(t,e,s){const r={};S(t,e,r,"explosion","explosion");let o=t.evaluate("cat/*/f",e);o||(o=t.evaluate("xVal/*/f",e));let i=null;null!==o&&null!==o.firstChild&&(i=o.firstChild.nodeValue),o||(o=t.evaluate("cat/strLit",e),o||(o=t.evaluate("cat/numLit",e)),o&&(i=this.parsePointsAsString(t,o))),null!==i&&(r.xRange=i);let n=t.evaluate("val/*/f",e);n||(n=t.evaluate("yVal/*/f",e));let l=null;n&&n.firstChild&&(l=n.firstChild.nodeValue),n||(n=t.evaluate("val/numLit",e),null!==n&&(l=this.parsePointsAsString(t,n))),null!==l&&(r.valRange=l),this.parseTitleRangeOrValue(t,e,r),S(t,e,r,"idx","idx"),V(t,e,r,"smooth","smooth");const a=t.getVisitorParamsState().get("types").length-1;r.offsetChart=a;let c=t.getVisitorParamsState().get("series");return c||(c=[],t.getVisitorParamsState().set("series",c)),c.push(r),r}parseTitleRangeOrValue(t,e,s){const r=t.evaluate("tx/strRef/f",e);if(null!==r){const e=r.firstChild.nodeValue;t.setToPath(s,"title.range",e)}else{const r=t.evaluate("tx/v",e);null!==r&&t.setToPath(s,"title.text.simpleRun",r.firstChild.nodeValue)}}parsePointsAsString(t,e){let s="{";const r=t.getValAttrAsInteger("ptCount",e),o=t.evaluate("pt",e),i=[];for(let s=0;o&&r&&s<r;s++){let r=null,o=t.evaluate("pt[@idx='"+s+"']/v",e);o instanceof Node&&(r=o.textContent),i[s]=r}for(let t=0;t<i.length;t++)t>0&&(s+=","),void 0!==i[t]&&(s+=i[t]);return s+="}",s}afterVisit(t,e,s){D(t,e,s);let r=t.getFromPath(s,"points");if(r){const e=Object.keys(r);for(let o=0;o<e.length;o++){const i=e[o],n=t.getFromPath(r,i);if(!n)continue;let l=t.getFromPath(n,"markers");l&&(t.setToPath(s,"markers.points."+i,l),delete n.markers)}}}}class U{DataPointVisitor(){}visit(t,e,s){let r=t.getFromPath(s,"points"),o=null;r?o=r:(o={},t.setToPath(s,"points",o));let i={},n=t.getValAttrAsString("idx",e);return null!==n&&(o[n]=i),V(t,e,i,"bubble3D","bubble3D"),S(t,e,i,"explosion","explosion"),D(t,e,i),i}}class z{visit(t,e,s){const r=e.parentNode.localName;if("ser"===r||"dPt"===r){const r={},o=t.getValAttrAsString("size",e);null!==o&&(r.size=o);const i=t.getValAttrAsString("symbol",e);return i&&(r.type=i),s.markers=r,r}return null}}class G{visit(t,e,s){let r={};this.parseScaling(t,e,r),k(t,e,r,"majorUnit","majorUnits"),k(t,e,r,"minorUnit","minorUnits"),V(t,e,r,"delete","shown"),this.parseOrientation(t,e,r),this.parseNumFormat(t,e,r),T(t,e,r,"majorTickMark","majorTickMarks"),T(t,e,r,"minorTickMark","minorTickMarks"),T(t,e,r,"crosses","crosses"),k(t,e,r,"crossesAt","crosses"),T(t,e,r,"crossBetween","crossBetween"),this.parseLabelAlign(t,e,r),S(t,e,r,"lblOffset","labelOffset"),T(t,e,r,"tickLblPos","labelPosition");const o=t.getValAttrAsInteger("noMultiLvlLbl",e);r.labelMultiLevel=null!==o&&0===o,S(t,e,r,"tickMarkSkip","tickMarkSkip"),S(t,e,r,"tickLblSkip","labelInterval"),this.parseDisplayCustOrBuiltInUnit(e,t,r),this.parseTimeUnits(t,e,r,"majorUnitDates","majorTimeUnit","majorUnit"),this.parseTimeUnits(t,e,r,"minorUnitDates","minorTimeUnit","minorUnit"),T(t,e,r,"baseTimeUnit","baseUnitDates"),t.getVisitorParamsState().get("axes")||t.getVisitorParamsState().set("axes",new Map);const i=t.getValAttrAsString("axId",e);return t.getVisitorParamsState().get("axes").set(i,r),r}parseTimeUnits(t,e,s,r,o,i){const n={};let l=t.getValAttrAsString(o,e);if(null!==l){n.dem=l;let s=t.getValAttrAsString(i,e);n.amt=s}Object.keys(n).length>0&&(s[r]=n)}parseDisplayCustOrBuiltInUnit(t,e,s){let r=e.getValAttrAsString("dispUnits/builtInUnit",t);r||(r=e.getValAttrAsString("dispUnits/custUnit",t)),r&&(s.displayUnits=r)}parseLabelAlign(t,e,s){let r=t.getValAttrAsString("lblAlgn",e);null!==r&&("ctr"===r?s.labelAlign="center":"l"===r?s.labelAlign="left":"r"===r&&(s.labelAlign="right"))}parseOrientation(t,e,s){const r=t.getValAttrAsString("AxPos",e);null!==r&&("b"===r?s.orientation="bottom":"l"===r?s.orientation="left":"r"===r?s.orientation="right":"t"===r&&(s.orientation="top"))}parseNumFormat(t,e,s){const r={},o=t.evaluate("numFmt",e);null!==o&&(o.hasAttribute("formatCode")&&(r.formatCode=o.getAttribute("formatCode")),o.hasAttribute("sourceLinked")&&(r.sourceLinked="1"===o.getAttribute("sourceLinked"))),Object.keys(r).length>0&&(s.labels=r)}parseScaling(t,e,s){const r=t.getValAttrAsString("scaling/orientation",e);null!==r&&(s.inverted="minMax"!==r);const o=t.getValAttrAsFloat("scaling/logBase",e);null!==o&&(s.logBase=o,s.scaleType="log"),k(t,e,s,"scaling/max","max"),k(t,e,s,"scaling/min","min")}afterVisit(t,e,s){s.fill&&s.labels&&(s.labels.fill=s.fill,delete s.fill);let r=t.getValAttrAsBoolean("delete",e);null!==r&&(t.setToPath(s,"labels.shown",!0!==r),t.setToPath(s,"shown",!0!==r));const o=t.getFromPath(s,"dispUnits.displayUnitsLabel");o&&(t.setToPath(s,"displayUnitsLabel",o),delete s.dispUnits);const i=t.evaluate("title",e);t.setToPath(s,"title.shown",null!==i);const n=t.evaluate("minorGridlines",e);t.setToPath(s,"gridLinesMinor.shown",null!==n);const l=t.evaluate("majorGridlines",e);t.setToPath(s,"gridLinesMajor.shown",null!==l)}}class W{constructor(t="text"){this._jsonKey=t}getTextPath(){return this._jsonKey}visit(t,e,s){let r=t.getFromPath(s,this.getTextPath());return r||(r={}),this.parseTextElement(t,e,r,!1),Object.keys(r).length>0&&t.setToPath(s,this.getTextPath(),r),s}parseTextElement(t,e,s,r){const o=t.evaluate("p/pPr/defRPr",e)??t.evaluate("defRPr",e);o&&(this.parseTextProperties(t,o,s),(new j).visit(t,o,s));let i=[],n=t.evaluate("p/r",e)??t.evaluate("r",e);const l=e=>{const s={};let r=t.evaluate("t",e);const o=t.evaluate("rPr",e);o&&this.parseTextProperties(t,o,s),r?s.text=r.firstChild.textContent??"":e.textContent&&(s.text=e.textContent??""),i.push(s)};if(void 0!==n?.length)for(let t=0;n&&t<n.length;t++)l(n.item(t));else l(n||e);i.length>0&&(s.runs=i);const a=t.evaluate("bodyPr",e);a&&O(a,s)}parseTextProperties(t,e,s){if(!e)return;e.hasAttribute("sz")&&(s.size=parseFloat(e.getAttribute("sz"))/100),e.hasAttribute("b")&&(s.weight="1"===e.getAttribute("b")?700:400),e.hasAttribute("i")&&(s.italic="1"===e.getAttribute("i")),e.hasAttribute("u")&&(s.underline=e.getAttribute("u")),e.hasAttribute("strike")&&(s.strike=e.getAttribute("strike"));const r=t.evaluate("latin",e);if(r&&!r.getAttribute("typeface").startsWith("+")){const t=s.font??{};if(r.hasAttribute("typeface")&&(t.family=r.getAttribute("typeface")),r.hasAttribute("panose")){const e=r.getAttribute("panose");e&&(t.fallbacks=[a.getPanoseFallback(e)])}r.hasAttribute("pitchFamily")&&(t.pitch=r.getAttribute("pitchFamily")),r.hasAttribute("charset")&&(t.charset=r.getAttribute("charset")),Object.keys(t).length>0&&(s.font=t)}}}class X{visit(t,e,s){let r=t.getVisitorParamsState().get("series")[t.getValAttrAsInteger("idx",e)];if(r){let s=t.getFromPath(r,"title");s||(s={},t.setToPath(r,"title",s));let o=s,i=t.getValAttrAsBoolean("delete",e);return null!==i&&(o.shown=!i),o}return s}}class ${visit(t,e,s){const r={};return V(t,e,r,"overlay","overlay"),T(t,e,r,"legendPos","position"),s.legend=r,r}}class K extends j{visit(t,e,s){const r=this.processFill(t,e,s);Object.keys(r).length>0&&(s.fillNegative=r);const o=this.processStroke(t,e,s);return Object.keys(o).length>0&&(s.strokeNegative=o),s}}class H extends W{constructor(t="title"){super(t)}parseTitleRangeOrValue(t,e,s){let r=t.evaluate("tx/strRef/f",e)??null;if(r){const e=r.firstElementChild.nodeValue;t.setToPath(s,"range",e)}}visit(t,e,s){const r={};V(t,e,r,"overlay","overlay"),s[this._jsonKey]=r;let o=t.getFromPath(r,this.getTextPath());o||(o={}),this.parseTitleRangeOrValue(t,e,r);const i=t.evaluate("txPr",e);i&&this.parseTextElement(t,i,o,!1);const n=t.evaluate("tx/rich",e);return n&&this.parseTextElement(t,n,o,!0),Object.keys(o).length>0&&t.setToPath(r,this.getTextPath(),o),r}afterVisit(t,e,s){if(s?.text){const t=s.text?.rotation??null;null!==t&&(s.rotation=parseInt(t),delete s.title.rotation)}}}class J{visit(t,e,s){const r=t.evaluate("manualLayout",e);if(r){let e={};k(t,r,e,"x","x"),k(t,r,e,"y","y"),k(t,r,e,"w","w"),k(t,r,e,"h","h"),T(t,r,e,"xMode","xMode"),T(t,r,e,"yMode","yMode"),T(t,r,e,"wMode","wMode"),T(t,r,e,"hMode","hMode"),Object.keys(e).length>0&&(s.manualLayout=e)}return s}}class q{visit(t,e,s){return s.name=e.getAttribute("name"),s}}class Q extends _{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=e.childNodes;for(let s=0;s<o.length;s++){const i=o.item(s);if(1===i.nodeType){let s=i.localName;const o=t.evaluate(s,e),n=this.processAdjColor(t,o);r[s]=n}}return Object.keys(r).length>0&&(s.colors=r),r}}class Z{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=t.evaluate("majorFont",e),i=this.processFontElement(t,o,{});r.majorFont=i.family,i.fallbacks&&(r.majorFallbacks=i.fallbacks);const n=t.evaluate("minorFont",e),l=this.processFontElement(t,n,{});return r.minorFont=l.family,i.fallbacks&&(r.minorFallbacks=l.fallbacks),s.fonts=r,r}processFontElement(t,e,s){if(!e)return;const r=t.evaluate("latin",e);if(!r)return;const o=r.getAttribute("typeface");o&&(s.family=o);const i=r.getAttribute("panose");return i&&(s.fallbacks=[a.getPanoseFallback(i)]),s}}class tt{visit(t,e,s){if(!e)return;const r={},o=e.getAttribute("r:id");if(o){const e=t.getRef(o);"string"==typeof e&&(r.address=e)}return t.copyFromAttribute(e,"tooltip",r),t.copyFromAttribute(e,"history",r,"history",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tgtFrame",r,"target"),s.hyperlink=r,r}}class et{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),this.processFilterColumns(t,e,r),Object.keys(r).length>0&&(s.filter=r),r}processColorFilter(t,e){const s={type:c.Type.Color};return t.copyFromAttribute(e,"cellColor",s,"cellColor",t.BOOLEAN_COPY),t.copyFromAttribute(e,"dxfId",s,"styleId",t.INT_COPY),s}processCustomFilter(t,e){const s={};return t.copyFromAttribute(e,"operator",s,"operator",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val"),s}processCustomFilters(t,e){const s={type:c.Type.Custom};t.copyFromAttribute(e,"and",s,"and",t.BOOLEAN_COPY);const r=e.childNodes;s.filters=[];for(let e=0;e<r.length;e++){const o=r.item(e);if(1!==o.nodeType)continue;let i=null;"customFilter"===o.localName&&(i=this.processCustomFilter(t,o)),i&&s.filters.push(i)}return s}processDynamicFilter(t,e){const s={type:c.Type.Dynamic};return t.copyFromAttribute(e,"type",s,"dynamicType"),t.copyFromAttribute(e,"val",s,"val",t.INT_COPY),t.copyFromAttribute(e,"maxVal",s,"maxVal",t.INT_COPY),s}processDateGroupItem(t,e){const s={};return t.copyFromAttribute(e,"dateTimeGrouping",s,"group"),t.copyFromAttribute(e,"day",s,"day",t.INT_COPY),t.copyFromAttribute(e,"hour",s,"hour",t.INT_COPY),t.copyFromAttribute(e,"minute",s,"minute",t.INT_COPY),t.copyFromAttribute(e,"month",s,"month",t.INT_COPY),t.copyFromAttribute(e,"second",s,"second",t.INT_COPY),t.copyFromAttribute(e,"year",s,"year",t.INT_COPY),s}processFilterItem(t,e){if(e.hasAttribute("val"))return e.getAttribute("val")}processFilters(t,e){const s={type:c.Type.Items};t.copyFromAttribute(e,"blank",s,"blank",t.BOOLEAN_COPY),t.copyFromAttribute(e,"calendarType",s,"calendarType");let r=[],o=[];const i=e.childNodes;for(let e=0;e<i.length;e++){const s=i.item(e);if(1===s.nodeType)if("dateGroupItem"===s.localName){const e=this.processDateGroupItem(t,s);e&&r.push(e)}else if("filter"===s.localName){const e=this.processFilterItem(t,s);void 0!==e&&o.push(e)}}return r.length>0&&(s.dateGroups=r),o.length>0&&(s.items=o),s}processIcon(t,e){const s={type:c.Type.Icon};return t.copyFromAttribute(e,"iconId",s,"iconId",t.INT_COPY),t.copyFromAttribute(e,"iconSet",s),s}processTop10(t,e){const s={type:c.Type.Top10};return t.copyFromAttribute(e,"filterVal",s,"filterVal",t.FLOAT_COPY),t.copyFromAttribute(e,"percent",s,"percent",t.BOOLEAN_COPY),t.copyFromAttribute(e,"top",s,"top",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val",t.FLOAT_COPY),s}processFilterCriteria(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let e=0;e<r.length;e++){const s=r.item(e);if(1!==s.nodeType)continue;let i=null;"colorFilter"===s.localName?i=this.processColorFilter(t,s):"customFilters"===s.localName?i=this.processCustomFilters(t,s):"dynamicFilter"===s.localName?i=this.processDynamicFilter(t,s):"filters"===s.localName?i=this.processFilters(t,s):"iconFilter"===s.localName?i=this.processIcon(t,s):"top10"===s.localName&&(i=this.processTop10(t,s)),i&&o.push(i)}return o.length>0&&(s.criteria=o),o}processFilterColumn(t,e){if(!e)return null;const r={};if(!e.hasAttribute("colId"))return;r.offset=parseInt(e.getAttribute("colId"));let o=!1;return e.hasAttribute("hiddenButton")&&(o=s(e.getAttribute("hiddenButton"))),o&&(r.hiddenButton=!0),e.hasAttribute("showButton")&&(r.showButton=s(e.getAttribute("showButton"))),this.processFilterCriteria(t,e,r),r}processFilterColumns(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let e=0;e<r.length;e++){const s=r.item(e);if(1===s.nodeType&&"filterColumn"===s.localName){const e=this.processFilterColumn(t,s);e&&o.push(e)}}return o.length>0&&(s.fields=o),o}}class st{visit(t,e,r){if(!e)return;const o={};if(t.copyFromAttribute(e,"ref",o),e.hasAttribute("caseSensitive")){const t=s(e.getAttribute("caseSensitive"));o.collatorOptions=t?u.CaseSensitiveOptions:u.CaseInsensitiveOptions}const i=e.getAttribute("sortMethod");null!=i&&"none"!==i&&("stroke"===i?o.collatorOptions={...o.collatorOptions,collation:"stroke"}:"pinYin"===i&&(o.collatorOptions={...o.collatorOptions,collation:"pinyin"})),e.hasAttribute("columnSort")&&s(e.getAttribute("columnSort"))&&(o.orientation=h.Orientation.Column);const n=p.fastStringToRange(o.ref);return this.processSortConditions(t,e,o,n),Object.keys(o).length>0&&(r.sort=o),o}processSortCondition(t,e,r){if(!e)return null;const o={};if(e.hasAttribute("ref")){if(e.hasAttribute("ref")){const t=e.getAttribute("ref"),s=p.fastStringToRange(t);o.offset=r?s.colStart-r.colStart:s.colStart}return o.reverse=!1,e.hasAttribute("descending")&&(o.reverse=s(e.getAttribute("descending"))),t.copyFromAttribute(e,"sortBy",o,"sortOn"),t.copyFromAttribute(e,"dxfId",o),t.copyFromAttribute(e,"iconSet",o),t.copyFromAttribute(e,"customList",o),o}console.warn("no ref for sort conditional",t.getPath())}processSortConditions(t,e,s,r){if(!e)return;const o=e.childNodes,i=[];for(let e=0;e<o.length;e++){const s=o.item(e);if(1===s.nodeType&&"sortCondition"===s.localName){const e=this.processSortCondition(t,s,r);e&&i.push(e)}}return i.length>0&&(s.fields=i),i}}class rt{visit(t,e,s){}processDataBarColor(t,e,s,r,o="dk1"){if(!e)return;const i=l(t=>e.getAttribute(t),o);return i&&(s[r]=i),s}processFonts(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let e=0;e<r.length;e++){const i=r.item(e);if(1===i.nodeType&&"font"===i.localName){const e={};this.processFont(t,i,e),s[o++]=e}}return s}processFont(t,e,s){t.getValAttrAsBoolean("b",e,!0)&&(s.weight=700),t.getValAttrAsBoolean("i",e,!0)&&(s.style=a.Style.Italic),t.getValAttrAsBoolean("strike",e,!0)&&(s.strike=!0);const r=t.evaluate("u",e);if(r){const t=r.getAttribute("val");s.underline=t||a.UnderlineStyle.Single}T(t,e,s,"vertAlign","verticalAlign"),"superscript"===s.verticalAlign?s.verticalAlign=a.VerticalAlignment.Super:"subscript"===s.verticalAlign&&(s.verticalAlign=a.VerticalAlignment.Sub),k(t,e,s,"sz","size");const o=t.evaluate("color",e);this.processDataBarColor(t,o,s,"fill"),s.fill||(s.fill="dk1"),T(t,e,s,"name","family"),T(t,e,s,"rFont","family");const i=t.evaluate("family",e);if(i){const t=i.getAttribute("val");if(t)switch(t){case"1":s.fallbacks=["serif"];break;case"2":s.fallbacks=["sans-serif"];break;case"3":s.fallbacks=["monospace"];break;case"4":s.fallbacks=["cursive"];break;case"5":s.fallbacks=["fantasy"]}}return T(t,e,s,"scheme","scheme"),V(t,e,s,"shadow","shadow",!0),V(t,e,s,"outline","outline",!0),t.getValAttrAsBoolean("condense",e,!0)&&(s.letterSpacing=-1),t.getValAttrAsBoolean("extend",e,!0)&&(s.letterSpacing=1),T(t,e,s,"charset","charset"),s}processFills(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let e=0;e<r.length;e++){const i=r.item(e);1===i.nodeType&&"fill"===i.localName&&this.processFill(t,i,s,o++)}return s}processFill(t,e,s,r){const o={type:g.Type.None},i=e.childNodes;let n=!1;for(let e=0;!n&&e<i.length;e++){const s=i.item(e);1===s.nodeType&&("gradientFill"===s.localName?(this.processGradientFill(t,s,o),n=!0):"patternFill"===s.localName&&(this.processPatternFill(t,s,o),n=!0))}return s[r]=o,s}processGradientFill(t,e,s){if(!e)return;s.type=g.Type.Gradient;const r=[];s.stops=r,s.angle=90+(e.hasAttribute("degree")?parseFloat(e.getAttribute("degree")):0);const o=e.getAttribute("type");o&&(s.gradientType=o);const i=t=>{if(!t)return 0;const e=parseFloat(t);return isNaN(e)?0:e};(e.hasAttribute("left")||e.hasAttribute("top")||e.hasAttribute("right")||e.hasAttribute("bottom"))&&(s.fillTo={left:i(e.getAttribute("left")),top:i(e.getAttribute("top")),right:i(e.getAttribute("right")),bottom:i(e.getAttribute("bottom"))});const n=e.childNodes;for(let e=0;e<n.length;e++){const s=n.item(e);if(1===s.nodeType&&"stop"===s.localName){const e={};r.push(e);const o=parseFloat(s.getAttribute("position"));e.offset=o;const i=t.evaluate("color",s);this.processDataBarColor(t,i,e,"color")}}return s}processPatternFill(t,e,s){if(!e)return;const r=t.getVisitorParamsState().get("processingDXFs"),o=e.getAttribute("patternType")||(r?g.BuiltInSheetPattern.Solid:g.BuiltInSheetPattern.None);if(o===g.BuiltInSheetPattern.None)return{none:!0};s.type=g.Type.Pattern,o&&(s.patternType=o);let i,n="foreground",l="background";const a=s.patternType===g.BuiltInSheetPattern.Solid&&r;if(a){i="lt1";const t=n;n=l,l=t}const c=t.evaluate("fgColor",e);this.processDataBarColor(t,c,s,n,i);const u=t.evaluate("bgColor",e);return this.processDataBarColor(t,u,s,l,i),a&&!s.foreground&&(s.foreground=i),s}processBorders(t,e,s,r){if(!e)return;const o=e.childNodes;let i=0;for(let e=0;e<o.length;e++){const n=o.item(e);1===n.nodeType&&"border"===n.localName&&this.processBorder(t,n,s,i++,r)}return s}processBorder(t,e,s,r,o){if(!e)return;const i={};return this.processBorderStroke(t,e,i,f.Edge.Left),this.processBorderStroke(t,e,i,f.Edge.Right),o?(i.right||i.left)&&(i.right?i.vertical={...i.right}:i.vertical={...i.left}):this.processBorderStroke(t,e,i,f.Edge.Vertical),this.processBorderStroke(t,e,i,f.Edge.Top),this.processBorderStroke(t,e,i,f.Edge.Bottom),o?(i.bottom||i.top)&&(i.right?i.horizontal={...i.bottom}:i.horizontal={...i.top}):this.processBorderStroke(t,e,i,f.Edge.Horizontal),s[r]=i,s}processBorderStroke(t,e,s,r){if(!e)return;const o=t.evaluate(r,e);if(!o)return;const i={};o.hasAttribute("style")&&(i.style=o.getAttribute("style"));const n=t.evaluate("color",o);return n&&this.processDataBarColor(t,n,i,"color"),Object.keys(i).length>0?s[r]=i:null}}class ot extends rt{visit(t,e,s){this.processNumFmts(t,t.evaluate("numFmts",e),null),t.getVisitorParamsState().set("colorsToProcess",new Set);const r={fills:{},fonts:{},borders:{}};this.processFonts(t,t.evaluate("fonts",e),r.fonts),this.processFills(t,t.evaluate("fills",e),r.fills),this.processBorders(t,t.evaluate("borders",e),r.borders,!0),r.fills[0]={type:g.Type.None},r.fills[1]={type:g.Type.Pattern,patternType:g.BuiltInSheetPattern.Gray125},r.borders[0]={};const o=[];this.processXFs(t,t.evaluate("cellStyleXfs",e),o,r,null,!1);const i=new Map;if(o.length>0){const r=[];this.processCellStyles(t,t.evaluate("cellStyles",e),r,o,i),s.named=r}const n=[];this.processXFs(t,t.evaluate("cellXfs",e),n,r,i),Object.keys(n).length>0&&(s.direct=n);const l=[];return this.processDXFs(t,t.evaluate("dxfs",e),l),this.processTableStyles(t,t.evaluate("tableStyles",e),s,l),this.processIndexColors(t,t.evaluate("colors/indexedColors",e),s),this.processMruColors(t,t.evaluate("colors/mruColors",e),s),s}processIndexColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let e=0;e<o.length;e++){const s=o.item(e);if(1===s.nodeType&&"rgbColor"===s.localName){const e={color:null};this.processDataBarColor(t,s,e,"color"),e.color&&r.push(e.color)}}s.indexedColors=r}processMruColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let e=0;e<o.length;e++){const s=o.item(e);if(1===s.nodeType&&"color"===s.localName){const e={color:null};this.processDataBarColor(t,s,e,"color"),e.color&&r.push(e.color)}}r.length>0&&(s.mruColors=r)}processNumFmts(t,e,s){if(!e)return;const r=new Map;if(t.getVisitorParamsState().set("numFmts",r),!e)return;const o=e.childNodes;for(let t=0;t<o.length;t++){const e=o.item(t);if(1===e.nodeType&&"numFmt"===e.localName){const t=e.getAttribute("numFmtId"),s=e.getAttribute("formatCode");if(t&&s){const e=s.replace(/\\(.)/g,"$1");r.set(parseInt(t),e)}}}}processXFs(t,e,s,r,o=null,i=!0){if(!e)return;const n=e.childNodes;for(let e=0;e<n.length;e++){const l=n.item(e);if(1===l.nodeType&&"xf"===l.localName){const e={};this.processXF(t,l,e,r,o,i),s.push(e)}}}processXF(t,e,r,o,i,n){if(!e)return;const l=e.getAttribute("xfId");if(l&&i){const t=i.get(parseInt(l));t&&t!==d.BuiltInName.Normal&&(r.named=t)}const a=t=>!(!n&&e.hasAttribute(t))||s(e.getAttribute("applyFont"));if(a("applyFont")){const t=o.fonts[e.getAttribute("fontId")];t&&(r.font=t)}if(a("applyFill")){const t=o.fills[e.getAttribute("fillId")];t&&Object.keys(t).length>0&&(r.fill=t)}if(a("applyBorder")){const t=o.borders[e.getAttribute("borderId")];t&&Object.keys(t).length>0&&(r.border=t)}if(a("applyNumberFormat")){const s=e.getAttribute("numFmtId");if(s){const e=parseInt(s);let o;const i=t.getVisitorParamsState();if(i){const t=i.get("numFmts");t&&(o=t.get(e)),r.numberFormat=o??e}else console.warn("no visitor params state")}}a("applyAlignment")&&this.processAlignment(t,t.evaluate("alignment",e),r),a("applyProtection")&&this.processProtection(t,t.evaluate("protection",e),r);const c=s(e.getAttribute("quotePrefix"));c&&(r.quotePrefix=c)}processAlignment(t,e,r){const o={};if(e?.hasAttribute("horizontal")?o.horizontal=e.getAttribute("horizontal"):o.horizontal=m.HorizontalAlignment.General,e?.hasAttribute("vertical")?o.vertical=e.getAttribute("vertical"):o.vertical=m.VerticalAlignment.Bottom,e?.hasAttribute("indent")?o.indent=parseInt(e.getAttribute("indent")):o.indent=0,e?.hasAttribute("relativeIndent")?o.relativeIndent=parseInt(e.getAttribute("relativeIndent")):o.relativeIndent=0,s(e?.getAttribute("wrapText"))?o.overflow=m.Overflow.Wrap:o.overflow=m.Overflow.Visible,s(e?.getAttribute("shrinkToFit"))&&(o.overflow=m.Overflow.Shrink),e?.hasAttribute("textRotation")){let t=parseFloat(e.getAttribute("textRotation"));t>0&&t<=90?t=360-t:t>90&&t<=180?t-=90:255===t&&(t=0,o.stacked=!0),o.rotation=t}else o.rotation=0;e?.hasAttribute("justifyLastLine")&&(o.justifyLastLine=s(e.getAttribute("justifyLastLine")));const i=e?.getAttribute("readingOrder");return i&&("0"===i?o.readingDirection=m.ReadingDirection.Auto:"1"===i?o.readingDirection=m.ReadingDirection.LeftToRight:"2"===i?o.readingDirection=m.ReadingDirection.RightToLeft:console.warn(`invalid readingOrder: ${i}`)),Object.keys(o).length>0&&(r.alignment=o),r}processProtection(t,e,r){if(!e)return;const o={},i=e.getAttribute("locked");i&&!s(i)&&(o.edit=!0);const n=e.getAttribute("hidden");return n&&s(n)&&(o.formulaHidden=!0),Object.keys(o).length>0&&(r.protection=o),r}processDXF(t,e,s){if(!e)return;const r=e.childNodes;for(let e=0;e<r.length;e++){const o=r.item(e);if(1===o.nodeType&&"font"===o.localName){const e={};this.processFont(t,o,e),s.font=e}else if(1===o.nodeType&&"fill"===o.localName){const e=[];this.processFill(t,o,e,0),e.length>0&&e[0]&&(s.fill=e[0])}else if(1===o.nodeType&&"border"===o.localName){const e=[];this.processBorder(t,o,e,0,!1),e.length>0&&e[0]&&(s.border=e[0])}}}processDXFs(t,e,s){if(!e)return;t.getVisitorParamsState().set("processingDXFs",!0);const r=new Map;t.getVisitorParamsState().set("dxfs",r);const o=e.childNodes;for(let e=0;e<o.length;e++){const i=o.item(e);if(1===i.nodeType&&"dxf"===i.localName){const e={};this.processDXF(t,i,e);const o=s.length;r.set(o,e),s.push(e)}}t.getVisitorParamsState().delete("processingDXFs")}processTableStyle(t,e,r,o,i=!1){const n=e.getAttribute("name"),l={name:n};e.hasAttribute("table")&&(l.table=s(e.getAttribute("table"))),e.hasAttribute("pivot")&&(l.pivot=s(e.getAttribute("pivot"))),i&&!l.pivot&&o.unshift(null);const a=e.childNodes;for(let t=0;t<a.length;t++){const e=a.item(t);if(1===e.nodeType&&"tableStyleElement"===e.localName){const t=e.getAttribute("type"),s=e.getAttribute("dxfId");let r=o?.[s];r||(console.warn("invalid dfx id",s),r={}),l[t]=r;let i=null;e.hasAttribute("size")&&(i=parseInt(e.getAttribute("size"))),i&&!isNaN(i)&&(r.size=i)}}delete l.name,r[n]=l}processTableStyles(t,e,s,r,o){if(!e)return;const i={},n=e.getAttribute("defaultTableStyle");n&&(i.defaultTableStyle=n);const l=e.getAttribute("defaultPivotStyle");l&&(i.defaultPivotStyle=l);const a=e.childNodes,c={};for(let e=0;e<a.length;e++){const s=a.item(e);1===s.nodeType&&"tableStyle"===s.localName&&this.processTableStyle(t,s,c,r,o)}return Object.keys(c).length>0&&(i.styles=c),Object.keys(i).length>0&&(s.tables=i),s}processCellStyles(t,e,r,o,i){if(!e)return;const n=e.childNodes;for(let t=0;t<n.length;t++){const e=n.item(t);if(1===e.nodeType&&"cellStyle"===e.localName){const t=parseInt(e.getAttribute("xfId")),n=e.getAttribute("name");if(i.set(t,n),!o[t])continue;const l={name:n,style:o[t]};e.getAttribute("hidden")&&(l.hidden=s(e.getAttribute("hidden"))),e.getAttribute("iLevel")&&(l.iLevel=parseInt(e.getAttribute("iLevel"))),r.push(l)}}}afterVisit(t,e,s){}}class it extends rt{visit(t,e,s){return this.processSheetRefs(t,t.evaluate("sheets",e),s),this.processBookViews(t,t.evaluate("bookViews",e),s),this.processDefinedNames(t,t.evaluate("definedNames",e),s),this.processCalcPr(t,t.evaluate("calcPr",e),s),this.processWorkbookProtection(t,t.evaluate("workbookProtection",e),s),this.processWorkbookPr(t,t.evaluate("workbookPr",e),s),s}processPassword(t,e,s,r="password"){if(!e)return;const o={};t.copyFromAttribute(e,"algorithmName",o,"algorithmName"),t.copyFromAttribute(e,"hashValue",o,"hashValue"),t.copyFromAttribute(e,"saltValue",o,"saltValue",t.BOOLEAN_COPY),t.copyFromAttribute(e,"spinCount",o,"spinCount",t.INT_COPY),Object.keys(o).length>0&&(s[r]=o)}processWorkbookProtection(t,e,s){if(!e)return;const r={};this.processPassword(t,t.evaluate("workbookPassword",e),r),this.processPassword(t,t.evaluate("revisionsPassword",e),r,"revisionsPassword");const o=t=>!0!==t&&"1"!==t&&"on"!==t&&"true"!==t&&(!1===t||"0"===t||"off"===t||"false"===t||null);return t.copyFromAttribute(e,"lockStructure",r,"structure",o),t.copyFromAttribute(e,"lockWindows",r,"windows",o),t.copyFromAttribute(e,"lockRevision",r,"revision",o),s.protection=r,s}processCalcPr(t,e,s){e&&(s.calc={})}processSheetRefs(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let e=0;e<o.length;e++){const s=o.item(e);1===s.nodeType&&"sheet"===s.localName&&this.processSheetRef(t,s,r)}s.sheets=r}processSheetRef(t,e,s){const r={};t.copyFromAttribute(e,"name",r,"name"),t.copyFromAttribute(e,"state",r,"visibility");const o=e.getAttribute("r:id"),i=t.getRef(o);i&&(r.sheet=i),s.push(r)}processBookViews(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;o<1&&i<e.childNodes.length;i++){const e=r.item(i);1===e.nodeType&&"workbookView"===e.localName&&(this.processWorkbookView(t,e,s),o++)}}processWorkbookView(t,e,s){if(!e)return;const r={};t.copyFromAttribute(e,"activeTab",r,"activeSheetId",[t.INT_COPY,t=>t+1]),e.hasAttribute("activeTab")||(r.activeSheetId=1),t.copyFromAttribute(e,"showHorizontalScroll",r,"showHorizontalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showVerticalScroll",r,"showVerticalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showSheetTabs",r,"showTabs",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tabRatio",r,"tabRatio",[t.FLOAT_COPY,t=>t]),Object.keys(r).length>0&&(s.view=r)}processDefineName(t,e,s,r){if(!e)return;const o={},i=e.firstChild;if(i&&3===i.nodeType&&(o.ref=i.textContent),t.copyFromAttribute(e,"name",o),t.copyFromAttribute(e,"comment",o),t.copyFromAttribute(e,"hidden",o,"hidden",t.BOOLEAN_COPY),e.hasAttribute("localSheetId")){const t=e.getAttribute("localSheetId");if(!r[t]?.name)return void console.warn(`Defined name '${e.getAttribute("name")}' references a sheet with localSheetId '${t}' which does not exist.`);o.scope=r[t].name}t.copyFromAttribute(e,"customMenu",o),t.copyFromAttribute(e,"description",o),t.copyFromAttribute(e,"statusBar",o),t.copyFromAttribute(e,"help",o),t.copyFromAttribute(e,"shortcutKey",o),t.copyFromAttribute(e,"function",o,"function",t.BOOLEAN_COPY),t.copyFromAttribute(e,"functionGroupId",o,"functionGroupId",t.INT_COPY),t.copyFromAttribute(e,"publishToServer",o,"publishToServer",t.BOOLEAN_COPY),t.copyFromAttribute(e,"vbProcedure",o,"vbProcedure",t.BOOLEAN_COPY),t.copyFromAttribute(e,"xlm",o,"xlm",t.BOOLEAN_COPY),Object.keys(o).length>0&&s.push(o)}processDefinedNames(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let e=0;e<o.length;e++){const i=o.item(e);1===i.nodeType&&"definedName"===i.localName&&this.processDefineName(t,i,r,s.sheets)}r.length>0&&(s.names=r)}processWorkbookPr(t,e,s){e&&t.copyFromAttribute(e,"date1904",s,"date1904",t.BOOLEAN_COPY)}afterVisit(t,e,s){}}class nt{visit(t,e,s){return t.copyFromAttribute(e,"name",s),t.copyFromAttribute(e,"displayName",s),t.copyFromAttribute(e,"ref",s),t.copyFromAttribute(e,"headerRowCount",s,"headerRowCount",t.INT_COPY),t.copyFromAttribute(e,"totalsRowCount",s,"totalsRowCount",t.INT_COPY),this.processTableColumns(t,e,s),this.processTableStyleInfo(t,e,s),s}processTableStyleInfo(t,e,s){if(!e)return;const r=e.childNodes,o={};for(let e=0;e<r.length;e++){const s=r.item(e);1===s.nodeType&&"tableStyleInfo"===s.localName&&(t.copyFromAttribute(s,"name",o),t.copyFromAttribute(s,"showColumnStripes",o,"showColumnStripes",t.BOOLEAN_COPY),t.copyFromAttribute(s,"showFirstColumn",o,"showFirstColumn",t.BOOLEAN_COPY),t.copyFromAttribute(s,"showLastColumn",o,"showLastColumn",t.BOOLEAN_COPY),t.copyFromAttribute(s,"showRowStripes",o,"showRowStripes",t.BOOLEAN_COPY))}Object.keys(o).length>0&&(s.styleOptions=o)}processTableColumn(t,e,s){if(!e)return null;const r=e.childNodes;for(let e=0;e<r.length;e++){const o=r.item(e);if(1===o.nodeType&&"tableColumn"===o.localName){const e={};t.copyFromAttribute(o,"name",e),t.copyFromAttribute(o,"uniqueName",e),s.push(e)}}return s}processTableColumns(t,e,s){const r=e.childNodes,o=[];for(let e=0;e<r.length;e++){const s=r.item(e);1===s.nodeType&&"tableColumns"===s.localName&&this.processTableColumn(t,s,o)}o.length>0&&(s.columns=o)}}class lt{visit(t,e,s){return s}}class at{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"editAs",r,"anchorType"),r.anchor={},this.processOffsetCoord(t,t.evaluate("from",e),r.anchor,"from"),this.processOffsetCoord(t,t.evaluate("to",e),r.anchor,"to"),s.movables||(s.movables=[]),s.movables.push(r),r}processOffsetCoord(t,s,r,o){if(!s)return;const i={c:0,r:0,x:0,y:0};return t.evaluate("col",s)&&(i.c=parseInt(t.evaluate("col",s).textContent)),t.evaluate("row",s)&&(i.r=parseInt(t.evaluate("row",s).textContent)),t.evaluate("colOff",s)&&(i.x=e(t.evaluate("colOff",s).textContent)),t.evaluate("rowOff",s)&&(i.y=e(t.evaluate("rowOff",s).textContent)),"from"===o?r.tl=i:r.br=i,r}}class ct{visit(t,e,s){if(!e)return;const r=t.evaluate("*/cNvPr",e);return r&&(t.copyFromAttribute(r,"name",s),t.copyFromAttribute(r,"desc",s),t.copyFromAttribute(r,"hidden",s,"hidden",t.BOOLEAN_COPY),t.copyFromAttribute(r,"id",s)),s}}class ut extends ct{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGraphicFramePr/cNvGraphicFramePr",e);if(r){const e=t.evaluate("graphicFrameLocks",r);if(e){e.hasAttribute("noChangeAspect")&&(s.lockAspect="1"===e.getAttribute("noChangeAspect"));const t={};Object.keys(t).length>0&&(s.locks=t)}}let o={type:"graphicFrame",json:{}};const i=t.evaluate("graphic/graphicData",e).childNodes;for(let e=0;e<i.length;e++){const s=i.item(e);if(1===s.nodeType)try{let e=s.localName;"chart"===e&&(e="chart"),o.type=e;const r=s.getAttribute("r:id");r&&(o.json=t.getRef(r))}catch(t){console.warn("Unable to parse graphicFrame",t)}}return o&&(s.content=o),o}}class ht extends ct{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvSpPr/cNvSpPr",e);if(r){const e=t.evaluate("spLocks",r);if(e){e.hasAttribute("noChangeAspect")&&(s.lockAspect="1"===e.getAttribute("noChangeAspect"));const t={};Object.keys(t).length>0&&(s.locks=t)}}t.warn(`Unable to import '${s.name}', shapes are not supported.`);const o={};return s.content={type:"sp",json:o},o}}class pt extends ct{visit(t,e,s){if(!e)return;const r=super.visit(t,e,s),o=t.evaluate("nvPicPr/cNvPicPr",e);if(o){t.copyFromAttribute(e,"preferRelativeResize",r,"preferRelativeResize",t.BOOLEAN_COPY);const s=t.evaluate("picLocks",o);if(s){s.hasAttribute("noChangeAspect")&&(r.lockAspect="1"===s.getAttribute("noChangeAspect"));const e={};t.copyFromAttribute(s,"noChangeArrowheads",r,"noChangeArrowheads",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noChangeShapeType",r,"noChangeShapeType",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noEditPoints",r,"noEditPoints",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noAdjustHandles",r,"noAdjustHandles",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noCrop",r,"noCrop",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noGrp",r,"noGrp",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noMove",r,"noMove",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noResize",r,"noResize",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noRot",r,"noRot",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noSelect",r,"noSelect",t.BOOLEAN_COPY),Object.keys(e).length>0&&(r.locks=e)}}const i=t.evaluate("blipFill/blip",e);let n;if(i){const e=i.getAttribute("r:embed")??i.getAttribute("embed");if(!e)return void console.warn("no rId found for blip",i);n=t.getRef(e,!0)}const l={resId:n};return s.content={type:"picture",json:l},r}}class gt extends ht{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGrpSpPr/cNvGrpSpPr",e);if(r){const e=t.evaluate("grpSpLocks",r);if(e){e.hasAttribute("noChangeAspect")&&(s.lockAspect="1"===e.getAttribute("noChangeAspect"));const t={};Object.keys(t).length>0&&(s.locks=t)}}t.warn(`Unable to import '${s.name}', group shapes are not supported.`);const o={};return s.content={type:"grpSp",json:o},o}}class dt extends ht{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvCxnSpPr/cNvCxnSpPr",e);if(r){const e=t.evaluate("cxnSpLocks",r);if(e){e.hasAttribute("noChangeAspect")&&(s.lockAspect="1"===e.getAttribute("noChangeAspect"));const t={};Object.keys(t).length>0&&(s.locks=t)}}t.warn(`Unable to import '${s.name}', connection shapes are not supported.`);const o={};return s.content={type:"cxnSp",json:o},o}}const mt="richTypes";class bt{visit(t,e,s){let r=t.getVisitorParamsState().get(mt);r||(r=[],t.getVisitorParamsState().set(mt,r));const o=e.childNodes,i=o.length;for(let e=0;e<i;e++){const s=o.item(e);if(1===s.nodeType&&"s"===s.localName){const e={type:s.getAttribute("t")??"n",keys:[]};this.processKeys(t,s,e),r.push(e)}}return s.richTypes=r,r}processKeys(t,e,s){const r=e.childNodes,o=r.length,i=s.keys;for(let t=0;t<o;t++){const e=r.item(t);if(1===e.nodeType&&"k"===e.localName){const t=e.getAttribute("n"),s=e.getAttribute("t");i.push([t,s])}}}}const ft="richData";class At{visit(t,e,s){let r=t.getVisitorParamsState().get("richTypes");if(!r)return void t.warn("RichValueFound but not type.");let o=t.getVisitorParamsState().get(ft);o||(o=[],t.getVisitorParamsState().set(ft,o));const i=e.childNodes,n=i.length;for(let e=0;e<n;e++){const s=i.item(e);if(1===s.nodeType&&"rv"===s.localName){const e=r[s.getAttribute("s")],i={type:e.type};this.processValues(t,s,i,e);const n=this.mapType(t,i);o.push(n)}}return s.richData=o,o}mapType(t,e){if("_error"===e.type){const s=e.errorType;if(s)try{e=b.getBuiltInById(s+1)}catch(t){}}return e}processValues(t,e,s,r){const o=e.childNodes,i=o.length;r.type;const n=r.keys;for(let e=0;e<i;e++){const r=o.item(e);if(1===r.nodeType&&"v"===r.localName){const o=n[e];if(!o)return void t.warn("Invalid richData");const i=o[0],l=o[1];let a=r.textContent;"i"===l&&(a=Number(a)),s[i]=a}}}}class yt{visit(t,e,s){if(!e)return;const r=[];return this.processAuthors(t,t.evaluate("authors",e),r),r.length>0&&(s.authors=r),s.comments=[],s}processAuthors(t,e,s){if(!e)return;const r=e.childNodes;for(let t=0;t<r.length;t++){const e=r.item(t);if(1===e.nodeType&&"author"===e.localName){const t=e.firstChild;t&&3===t.nodeType&&s.push(t.textContent)}}}}class vt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"authorId",r,"authorId",t.INT_COPY),r.asNote=!0,s.comments||(s.comments=[]),s.comments.push(r),r}}class Ft{visit(t,e,s){if(!e)return;const r=[];return s.comments=r,r}}class Ct{visit(t,e,o){if(!e)return;const i={};return t.copyFromAttribute(e,"id",i,"id",r),t.copyFromAttribute(e,"personId",i,"personId",r),t.copyFromAttribute(e,"ref",i),t.copyFromAttribute(e,"parentId",i,"parentId",r),t.copyFromAttribute(e,"dT",i),e.hasAttribute("done")&&(i.done=s(e.getAttribute("done"))),o.push(i),i}}class wt{visit(t,e,s){const o=[],i=e.childNodes;for(let e=0;e<i.length;e++){const s=i.item(e);if(1===s.nodeType&&"person"===s.localName){const e={};t.copyFromAttribute(s,"id",e,"id",r),t.copyFromAttribute(s,"displayName",e),t.copyFromAttribute(s,"userId",e,"userId",r),t.copyFromAttribute(s,"providerId",e),o.push(e)}}return o.length>0&&(s.persons=o),o}}const Pt={};class Nt{constructor(t,e){this.path=t,this.visitor=e}}class Ot{constructor(){this.visitorsByXmlTagName=new Map,this.scopedVisitorsByXmlTagName=new Map,this.visitorParamsState=null,this.registerVisitor("Relationships",new N),this.registerVisitor("spPr",new j),this.registerVisitor("txBody",new W),this.registerVisitor("txPr",new W),this.registerVisitor("c:chartSpace",new x),this.registerVisitor("c:chartSpace",new L,"chart"),this.registerVisitor("c:plotArea",new I),this.registerVisitor("c:barChart",new E),this.registerVisitor("c:doughnutChart",new R),this.registerVisitor("c:lineChart",new R),this.registerVisitor("c:ofPieType",new R),this.registerVisitor("c:pieChart",new R),this.registerVisitor("c:scatterChart",new R),this.registerVisitor("c:barChart",new Y("dataLabels"),"dLbls"),this.registerVisitor("c:doughnutChart",new Y("dataLabels"),"dLbls"),this.registerVisitor("c:lineChart",new Y("dataLabels"),"dLbls"),this.registerVisitor("c:ofPieType",new Y("dataLabels"),"dLbls"),this.registerVisitor("c:pieChart",new Y("dataLabels"),"dLbls"),this.registerVisitor("c:scatterChart",new Y("dataLabels"),"dLbls"),this.registerVisitor("c:ser",new M),this.registerVisitor("c:dPt",new U),this.registerVisitor("c:marker",new z),this.registerVisitor("c:catAx",new G),this.registerVisitor("c:valAx",new G),this.registerVisitor("c:dateAx",new G),this.registerVisitor("c:majorGridlines",new P("gridLinesMajor")),this.registerVisitor("c:minorGridlines",new P("gridLinesMinor")),this.registerVisitor("c:chartSpace",null,"txPr"),this.registerVisitor("c:catAx",new W("labels.text"),"txPr"),this.registerVisitor("c:valAx",new W("labels.text"),"txPr"),this.registerVisitor("c:dateAx",new W("labels.text"),"txPr"),this.registerVisitor("c:legend",new $),this.registerVisitor("c:legend",new W("labels.text"),"txPr"),this.registerVisitor("c:legendEntry",new X),this.registerVisitor("c:ser",new K,"extLst/ext/invertSolidFillFmt/spPr"),this.registerVisitor("c:ser",new Y("labels"),"dLbls"),this.registerVisitor("c:dLbl",new Y("points")),this.registerVisitor("c:title",new H),this.registerVisitor("c:title",null,"tx/rich"),this.registerVisitor("c:title",null,"txPr"),this.registerVisitor("c:layout",new J),this.registerVisitor("c:dispUnits",new P("dispUnits")),this.registerVisitor("c:dispUnitsLbl",new H("displayUnitsLabel")),this.registerVisitor("c:dispUnitsLbl",new W,"tx/rich"),this.registerVisitor("a:theme",new q),this.registerVisitor("a:theme",new Q,"themeElements/clrScheme"),this.registerVisitor("a:theme",new Z,"themeElements/fontScheme"),this.registerVisitor("autoFilter",new et),this.registerVisitor("sortState",new st),this.registerVisitor("s:workbook",new it),this.registerVisitor("styleSheet",new ot),this.registerVisitor("table",new nt),this.registerVisitor("hlinkClick",new tt),this.registerVisitor("wsDr",new lt),this.registerVisitor("twoCellAnchor",new at),this.registerVisitor("oneCellAnchor",new at),this.registerVisitor("absoluteAnchor",new at),this.registerVisitor("graphicFrame",new ut),this.registerVisitor("sp",new ht),this.registerVisitor("grpSp",new gt),this.registerVisitor("cxnSp",new dt),this.registerVisitor("pic",new pt),this.registerVisitor("rvStructures",new bt),this.registerVisitor("rvData",new At),this.registerVisitor("comments",new yt),this.registerVisitor("commentList",new vt,"comment"),this.registerVisitor("comment",new W("content"),"text"),this.registerVisitor("ThreadedComments",new Ft),this.registerVisitor("threadedComment",new Ct),this.registerVisitor("threadedComment",new W("content"),"text"),this.registerVisitor("personList",new wt)}registerVisitor(t,e,s=null){-1===t.indexOf(":")&&(t="*:"+t);const r=t.split(":"),o=r.length>1?r[1]:r[0];if(!s)return this.visitorsByXmlTagName.set(o,e),void this.visitorsByXmlTagName.set(t,e);let i=this.scopedVisitorsByXmlTagName.get(o);i||(i=[],this.scopedVisitorsByXmlTagName.set(o,i),this.scopedVisitorsByXmlTagName.set(t,i)),i.push(new Nt(s,e))}getVisitorParamsState(){return this.visitorParamsState}convert(t,e,s=Pt){const r=t.documentElement;this.visitorParamsState&&!s?.paramMap||(this.visitorParamsState=s?.paramMap??new Map);const o={};let i=this.visitorsByXmlTagName.get(r.nodeName);if(i||(i=this.visitorsByXmlTagName.get(r.localName)),!i)throw new Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);const n="/"+r.localName,l=new w(null,this,n,r,o,e,s),a=[];this._doWalk(i,l,a,r,o,e,s);for(let e=0;e<a.length;e++){const s=a[e];try{s.visitor?.afterVisit?.(s.context,s.elemParent,s.jsonParent)}catch(t){console.warn(`Error in afterVisit: ${s.context.getPath()}`,t)}}return o}_walkScoped(t,e,s,r,o,i,n){const l=this.scopedVisitorsByXmlTagName.get(t);for(let a=0;l&&a<l.length;a++){const c=l[a];let u=null;try{u=e.evaluate(c.path,r)}catch(e){console.warn(`"Invalid path '${c.path}' for '${t}'.`)}if(!u)continue;const h=t=>{let l=t.localName,a=t.parentNode;for(;a&&a!==r;)l=a.localName+"/"+l,a=a.parentNode;const u=e.getPath()+"/"+l;if(c.visitor){const r=new w(e,this,u,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(c.visitor,r,s,t,o,i,n)}};if(u.length>0){const t=u;for(let e=0;e<t.length;e++)h(t.item(e))}else h(u)}}_doWalk(t,e,s,r,o,i,n){let l=null;t&&(s.push({visitor:t,context:e,elemParent:r,jsonParent:o}),l=t.visit(e,r,o)),l||(l=o);const a=r.localName;this._walkScoped(a,e,s,r,l,i,n);const c=r.childNodes;for(let t=0;t<c.length;t++){const r=c.item(t);if(1===r.nodeType){const t=r,a=t.localName,c=this.visitorsByXmlTagName.get(a),u=e.getPath()+"/"+a,h=new w(e,this,u,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(c,h,s,t,l??o,i,n)}}return l}}export{Ot as FromOOXMLConverter,Ot as default};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.11
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import{r as e,g as t,f as o,u as n,j as r,h as i,i as l,k as s,l as a,m as c,n as d,o as u,a as h,V as f,D as p,p as m,_ as g,B as v,T as _,I as S,v as y,w,x as C,y as x,C as R,A as b,Z as z,E as T,G as I,H as P,L as O,N as k,z as M,O as L,Y as G,P as A,Q as E,R as H,S as W,W as D,X as j}from"./DtmE60AvstK9u0Ta.mjs";const F=e.createContext(),N=e.createContext();function B(e){return o("MuiTableCell",e)}const U=t("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),V=i("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant],t[`size${s(o.size)}`],"normal"!==o.padding&&t[`padding${s(o.padding)}`],"inherit"!==o.align&&t[`align${s(o.align)}`],o.stickyHeader&&t.stickyHeader]}})(c(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid\n ${"light"===e.palette.mode?d(h(e.palette.divider,1),.88):u(h(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${U.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:e})=>e.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),$=e.forwardRef(function(t,o){const i=n({props:t,name:"MuiTableCell"}),{align:c="inherit",className:d,component:u,padding:h,scope:f,size:p,sortDirection:m,variant:g,...v}=i,_=e.useContext(F),S=e.useContext(N),y=S&&"head"===S.variant;let w;w=u||(y?"th":"td");let C=f;"td"===w?C=void 0:!C&&y&&(C="col");const x=g||S&&S.variant,R={...i,align:c,component:w,padding:h||(_&&_.padding?_.padding:"normal"),size:p||(_&&_.size?_.size:"medium"),sortDirection:m,stickyHeader:"head"===x&&_&&_.stickyHeader,variant:x},b=(e=>{const{classes:t,variant:o,align:n,padding:r,size:i,stickyHeader:l}=e,c={root:["root",o,l&&"stickyHeader","inherit"!==n&&`align${s(n)}`,"normal"!==r&&`padding${s(r)}`,`size${s(i)}`]};return a(c,B,t)})(R);let z=null;return m&&(z="asc"===m?"ascending":"descending"),r.jsx(V,{as:w,ref:o,className:l(b.root,d),"aria-sort":z,scope:C,ownerState:R,...v})}),K=z();function q(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function X(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Y(e){return e?(t,o)=>o[e]:null}function J(e,t,o){const n="function"==typeof t?t(e):t;if(Array.isArray(n))return n.flatMap(t=>J(e,t,o));if(Array.isArray(n?.variants)){let t;if(n.isProcessed)t=o?X(n.style,o):n.style;else{const{variants:e,...r}=n;t=o?X(E(r),o):r}return Z(e,n.variants,[t],o)}return n?.isProcessed?o?X(E(n.style),o):n.style:o?X(E(n),o):n}function Z(e,t,o=[],n=void 0){let r;e:for(let i=0;i<t.length;i+=1){const l=t[i];if("function"==typeof l.props){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!l.props(r))continue}else for(const t in l.props)if(e[t]!==l.props[t]&&e.ownerState?.[t]!==l.props[t])continue e;"function"==typeof l.style?(r??={...e,...e.ownerState,ownerState:e.ownerState},o.push(n?X(E(l.style(r)),n):l.style(r))):o.push(n?X(E(l.style),n):l.style)}return o}function Q(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}const ee=function(e={}){const{themeId:t,defaultTheme:o=K,rootShouldForwardProp:n=q,slotShouldForwardProp:r=q}=e;function i(e){!function(e,t,o){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?o:e.theme[t]||e.theme}(e,t,o)}return(e,t={})=>{T(e,e=>e.filter(e=>e!==I));const{name:o,slot:l,skipVariantsResolver:s,skipSx:a,overridesResolver:c=Y(Q(l)),...d}=t,u=o&&o.startsWith("Mui")||l?"components":"custom",h=void 0!==s?s:l&&"Root"!==l&&"root"!==l||!1,f=a||!1;let p=q;"Root"===l||"root"===l?p=n:l?p=r:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(p=void 0);const m=P(e,{shouldForwardProp:p,label:void 0,...d}),g=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return J(t,e,t.theme.modularCssLayers?u:void 0)};if(A(e)){const t=function(e){const{variants:t,...o}=e,n={variants:t,style:E(o),isProcessed:!0};return n.style===o||t&&t.forEach(e=>{"function"!=typeof e.style&&(e.style=E(e.style))}),n}(e);return function(e){return t.variants?J(e,t,e.theme.modularCssLayers?u:void 0):e.theme.modularCssLayers?X(t.style,u):t.style}}return e},v=(...t)=>{const n=[],r=t.map(g),l=[];if(n.push(i),o&&c&&l.push(function(e){const t=e.theme,n=t.components?.[o]?.styleOverrides;if(!n)return null;const r={};for(const t in n)r[t]=J(e,n[t],e.theme.modularCssLayers?"theme":void 0);return c(e,r)}),o&&!h&&l.push(function(e){const t=e.theme,n=t?.components?.[o]?.variants;return n?Z(e,n,[],e.theme.modularCssLayers?"theme":void 0):null}),f||l.push(I),Array.isArray(r[0])){const e=r.shift(),t=new Array(n.length).fill(""),o=new Array(l.length).fill("");let i;i=[...t,...e,...o],i.raw=[...t,...e.raw,...o],n.unshift(i)}const s=[...n,...r,...l],a=m(...s);return e.muiName&&(a.muiName=e.muiName),a};return m.withConfig&&(v.withConfig=m.withConfig),v}}({themeId:O,defaultTheme:k,rootShouldForwardProp:e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e});function te(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oe(e){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe(e)}function ne(e){var t=function(e){if("object"!=oe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=oe(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oe(t)?t:t+""}function re(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ne(n.key),n)}}function ie(e,t,o){return t&&re(e.prototype,t),o&&re(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function le(e,t){if(t&&("object"==oe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function se(e){return se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},se(e)}function ae(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&H(e,t)}function ce(e,t,o){return(t=ne(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function de(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function ue(e){this.setState(function(t){var o=this.constructor.getDerivedStateFromProps(e,t);return null!=o?o:null}.bind(this))}function he(e,t){try{var o=this.props,n=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(o,n)}finally{this.props=o,this.state=n}}function fe(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var o=null,n=null,r=null;if("function"==typeof t.componentWillMount?o="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(o="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?n="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(n="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?r="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(r="UNSAFE_componentWillUpdate"),null!==o||null!==n||null!==r){var i=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+i+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==o?"\n "+o:"")+(null!==n?"\n "+n:"")+(null!==r?"\n "+r:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=de,t.componentWillReceiveProps=ue),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=he;var s=t.componentDidUpdate;t.componentDidUpdate=function(e,t,o){var n=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:o;s.call(this,e,t,n)}}return e}function pe(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function me(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(o),!0).forEach(function(t){ce(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):pe(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function ge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ge=function(){return!!e})()}de.__suppressDeprecationWarning=!0,ue.__suppressDeprecationWarning=!0,he.__suppressDeprecationWarning=!0;var ve=function(){function t(){var e,o,n,r;te(this,t);for(var i=arguments.length,l=new Array(i),s=0;s<i;s++)l[s]=arguments[s];return o=this,n=t,r=[].concat(l),n=se(n),ce(e=le(o,ge()?Reflect.construct(n,r||[],se(o).constructor):n.apply(o,r)),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),ce(e,"_columnStartIndex",0),ce(e,"_columnStopIndex",0),ce(e,"_rowStartIndex",0),ce(e,"_rowStopIndex",0),ce(e,"_onKeyDown",function(t){var o=e.props,n=o.columnCount,r=o.disabled,i=o.mode,l=o.rowCount;if(!r){var s=e._getScrollState(),a=s.scrollToColumn,c=s.scrollToRow,d=e._getScrollState(),u=d.scrollToColumn,h=d.scrollToRow;switch(t.key){case"ArrowDown":h="cells"===i?Math.min(h+1,l-1):Math.min(e._rowStopIndex+1,l-1);break;case"ArrowLeft":u="cells"===i?Math.max(u-1,0):Math.max(e._columnStartIndex-1,0);break;case"ArrowRight":u="cells"===i?Math.min(u+1,n-1):Math.min(e._columnStopIndex+1,n-1);break;case"ArrowUp":h="cells"===i?Math.max(h-1,0):Math.max(e._rowStartIndex-1,0)}u===a&&h===c||(t.preventDefault(),e._updateScrollState({scrollToColumn:u,scrollToRow:h}))}}),ce(e,"_onSectionRendered",function(t){var o=t.columnStartIndex,n=t.columnStopIndex,r=t.rowStartIndex,i=t.rowStopIndex;e._columnStartIndex=o,e._columnStopIndex=n,e._rowStartIndex=r,e._rowStopIndex=i}),e}return ae(t,e.PureComponent),ie(t,[{key:"setScrollIndexes",value:function(e){var t=e.scrollToColumn,o=e.scrollToRow;this.setState({scrollToRow:o,scrollToColumn:t})}},{key:"render",value:function(){var t=this.props,o=t.className,n=t.children,r=this._getScrollState(),i=r.scrollToColumn,l=r.scrollToRow;return e.createElement("div",{className:o,onKeyDown:this._onKeyDown},n({onSectionRendered:this._onSectionRendered,scrollToColumn:i,scrollToRow:l}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(e){var t=e.scrollToColumn,o=e.scrollToRow,n=this.props,r=n.isControlled,i=n.onScrollToChange;"function"==typeof i&&i({scrollToColumn:t,scrollToRow:o}),r||this.setState({scrollToColumn:t,scrollToRow:o})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.isControlled?{}:e.scrollToColumn!==t.instanceProps.prevScrollToColumn||e.scrollToRow!==t.instanceProps.prevScrollToRow?me(me({},t),{},{scrollToColumn:e.scrollToColumn,scrollToRow:e.scrollToRow,instanceProps:{prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow}}):{}}}])}();function _e(e,t){var o,n=void 0!==(o=void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:global).document&&o.document.attachEvent;if(!n){var r=function(){var e=o.requestAnimationFrame||o.mozRequestAnimationFrame||o.webkitRequestAnimationFrame||function(e){return o.setTimeout(e,20)};return function(t){return e(t)}}(),i=function(){var e=o.cancelAnimationFrame||o.mozCancelAnimationFrame||o.webkitCancelAnimationFrame||o.clearTimeout;return function(t){return e(t)}}(),l=function(e){var t=e.__resizeTriggers__,o=t.firstElementChild,n=t.lastElementChild,r=o.firstElementChild;n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight,r.style.width=o.offsetWidth+1+"px",r.style.height=o.offsetHeight+1+"px",o.scrollLeft=o.scrollWidth,o.scrollTop=o.scrollHeight},s=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var t=this;l(this),this.__resizeRAF__&&i(this.__resizeRAF__),this.__resizeRAF__=r(function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach(function(o){o.call(t,e)}))})}},a=!1,c="",d="animationstart",u="Webkit Moz O ms".split(" "),h="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),f=o.document.createElement("fakeelement");if(void 0!==f.style.animationName&&(a=!0),!1===a)for(var p=0;p<u.length;p++)if(void 0!==f.style[u[p]+"AnimationName"]){c="-"+u[p].toLowerCase()+"-",d=h[p],a=!0;break}var m="resizeanim",g="@"+c+"keyframes "+m+" { from { opacity: 0; } to { opacity: 0; } } ",v=c+"animation: 1ms "+m+"; "}return{addResizeListener:function(t,r){if(n)t.attachEvent("onresize",r);else{if(!t.__resizeTriggers__){var i=t.ownerDocument,a=o.getComputedStyle(t);a&&"static"==a.position&&(t.style.position="relative"),function(t){if(!t.getElementById("detectElementResize")){var o=(g||"")+".resize-triggers { "+(v||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',n=t.head||t.getElementsByTagName("head")[0],r=t.createElement("style");r.id="detectElementResize",r.type="text/css",null!=e&&r.setAttribute("nonce",e),r.styleSheet?r.styleSheet.cssText=o:r.appendChild(t.createTextNode(o)),n.appendChild(r)}}(i),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=i.createElement("div")).className="resize-triggers";var c=i.createElement("div");c.className="expand-trigger",c.appendChild(i.createElement("div"));var u=i.createElement("div");u.className="contract-trigger",t.__resizeTriggers__.appendChild(c),t.__resizeTriggers__.appendChild(u),t.appendChild(t.__resizeTriggers__),l(t),t.addEventListener("scroll",s,!0),d&&(t.__resizeTriggers__.__animationListener__=function(e){e.animationName==m&&l(t)},t.__resizeTriggers__.addEventListener(d,t.__resizeTriggers__.__animationListener__))}t.__resizeListeners__.push(r)}},removeResizeListener:function(e,t){if(n)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(d,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}function Se(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function ye(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(o),!0).forEach(function(t){ce(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Se(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function we(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(we=function(){return!!e})()}ce(ve,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0}),fe(ve);var Ce=function(){function t(){var e,o,n,r;te(this,t);for(var i=arguments.length,l=new Array(i),s=0;s<i;s++)l[s]=arguments[s];return o=this,n=t,r=[].concat(l),n=se(n),ce(e=le(o,we()?Reflect.construct(n,r||[],se(o).constructor):n.apply(o,r)),"state",{height:e.props.defaultHeight||0,width:e.props.defaultWidth||0}),ce(e,"_parentNode",void 0),ce(e,"_autoSizer",void 0),ce(e,"_window",void 0),ce(e,"_detectElementResize",void 0),ce(e,"_onResize",function(){var t=e.props,o=t.disableHeight,n=t.disableWidth,r=t.onResize;if(e._parentNode){var i=e._parentNode.offsetHeight||0,l=e._parentNode.offsetWidth||0,s=(e._window||window).getComputedStyle(e._parentNode)||{},a=parseInt(s.paddingLeft,10)||0,c=parseInt(s.paddingRight,10)||0,d=parseInt(s.paddingTop,10)||0,u=parseInt(s.paddingBottom,10)||0,h=i-d-u,f=l-a-c;(!o&&e.state.height!==h||!n&&e.state.width!==f)&&(e.setState({height:i-d-u,width:l-a-c}),r({height:i,width:l}))}}),ce(e,"_setRef",function(t){e._autoSizer=t}),e}return ae(t,e.Component),ie(t,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._window=this._autoSizer.parentNode.ownerDocument.defaultView,this._detectElementResize=_e(e,this._window),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var t=this.props,o=t.children,n=t.className,r=t.disableHeight,i=t.disableWidth,l=t.style,s=this.state,a=s.height,c=s.width,d={overflow:"visible"},u={};return r||(d.height=0,u.height=a),i||(d.width=0,u.width=c),e.createElement("div",{className:n,ref:this._setRef,style:ye(ye({},d),l)},o(u))}}])}();function xe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xe=function(){return!!e})()}ce(Ce,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var Re=function(){function t(){var o,n,r,i;te(this,t);for(var l=arguments.length,s=new Array(l),a=0;a<l;a++)s[a]=arguments[a];return n=this,r=t,i=[].concat(s),r=se(r),ce(o=le(n,xe()?Reflect.construct(r,i||[],se(n).constructor):r.apply(n,i)),"_child",e.createRef()),ce(o,"_measure",function(){var e=o.props,t=e.cache,n=e.columnIndex,r=void 0===n?0:n,i=e.parent,l=e.rowIndex,s=void 0===l?o.props.index||0:l,a=o._getCellMeasurements(),c=a.height,d=a.width;c===t.getHeight(s,r)&&d===t.getWidth(s,r)||(t.set(s,r,d,c),i&&"function"==typeof i.recomputeGridSize&&i.recomputeGridSize({columnIndex:r,rowIndex:s}))}),ce(o,"_registerChild",function(e){!e||e instanceof Element||console.warn("CellMeasurer registerChild expects to be passed Element or null"),o._child.current=e,e&&o._maybeMeasureCell()}),o}return ae(t,e.PureComponent),ie(t,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var t=this,o=this.props.children,n="function"==typeof o?o({measure:this._measure,registerChild:this._registerChild}):o;return null===n?n:e.cloneElement(n,{ref:function(e){"function"==typeof n.ref?n.ref(e):n.ref&&(n.ref.current=e),t._child.current=e}})}},{key:"_getCellMeasurements",value:function(){var e=this.props.cache,t=this._child.current;if(t&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){var o=t.style.width,n=t.style.height;e.hasFixedWidth()||(t.style.width="auto"),e.hasFixedHeight()||(t.style.height="auto");var r=Math.ceil(t.offsetHeight),i=Math.ceil(t.offsetWidth);return o&&(t.style.width=o),n&&(t.style.height=n),{height:r,width:i}}return{height:0,width:0}}},{key:"_maybeMeasureCell",value:function(){var e=this.props,t=e.cache,o=e.columnIndex,n=void 0===o?0:o,r=e.parent,i=e.rowIndex,l=void 0===i?this.props.index||0:i;if(!t.has(l,n)){var s=this._getCellMeasurements(),a=s.height,c=s.width;t.set(l,n,c,a),r&&"function"==typeof r.invalidateCellSizeAfterRender&&r.invalidateCellSizeAfterRender({columnIndex:n,rowIndex:l})}}}])}();function be(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={};return function(o){var n=o.callback,r=o.indices,i=Object.keys(r),l=!e||i.every(function(e){var t=r[e];return Array.isArray(t)?t.length>0:t>=0}),s=i.length!==Object.keys(t).length||i.some(function(e){var o=t[e],n=r[e];return Array.isArray(n)?o.join(",")!==n.join(","):o!==n});t=r,l&&s&&n(r)}}ce(Re,"__internalCellMeasurerFlag",!1);const ze=!("undefined"==typeof window||!window.document||!window.document.createElement);var Te;function Ie(e){if((!Te&&0!==Te||e)&&ze){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),Te=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Te}function Pe(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Oe(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(o),!0).forEach(function(t){ce(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Pe(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function ke(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ke=function(){return!!e})()}var Me="requested",Le=function(){function t(){var e,o,n,r;te(this,t);for(var i=arguments.length,l=new Array(i),s=0;s<i;s++)l[s]=arguments[s];return o=this,n=t,r=[].concat(l),n=se(n),ce(e=le(o,ke()?Reflect.construct(n,r||[],se(o).constructor):n.apply(o,r)),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),ce(e,"_calculateSizeAndPositionDataOnNextUpdate",!1),ce(e,"_onSectionRenderedMemoizer",be()),ce(e,"_onScrollMemoizer",be(!1)),ce(e,"_invokeOnSectionRenderedHelper",function(){var t=e.props,o=t.cellLayoutManager,n=t.onSectionRendered;e._onSectionRenderedMemoizer({callback:n,indices:{indices:o.getLastRenderedIndices()}})}),ce(e,"_setScrollingContainerRef",function(t){e._scrollingContainer=t}),ce(e,"_updateScrollPositionForScrollToCell",function(){var t=e.props,o=t.cellLayoutManager,n=t.height,r=t.scrollToAlignment,i=t.scrollToCell,l=t.width,s=e.state,a=s.scrollLeft,c=s.scrollTop;if(i>=0){var d=o.getScrollPositionForCell({align:r,cellIndex:i,height:n,scrollLeft:a,scrollTop:c,width:l});d.scrollLeft===a&&d.scrollTop===c||e._setScrollPosition(d)}}),ce(e,"_onScroll",function(t){if(t.target===e._scrollingContainer){e._enablePointerEventsAfterDelay();var o=e.props,n=o.cellLayoutManager,r=o.height,i=o.isScrollingChange,l=o.width,s=e._scrollbarSize,a=n.getTotalSize(),c=a.height,d=a.width,u=Math.max(0,Math.min(d-l+s,t.target.scrollLeft)),h=Math.max(0,Math.min(c-r+s,t.target.scrollTop));if(e.state.scrollLeft!==u||e.state.scrollTop!==h){var f=t.cancelable?"observed":Me;e.state.isScrolling||i(!0),e.setState({isScrolling:!0,scrollLeft:u,scrollPositionChangeReason:f,scrollTop:h})}e._invokeOnScrollMemoizer({scrollLeft:u,scrollTop:h,totalWidth:d,totalHeight:c})}}),e._scrollbarSize=Ie(),void 0===e._scrollbarSize?(e._scrollbarSizeMeasured=!1,e._scrollbarSize=0):e._scrollbarSizeMeasured=!0,e}return ae(t,e.PureComponent),ie(t,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,o=e.scrollLeft,n=e.scrollToCell,r=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=Ie(),this._scrollbarSizeMeasured=!0,this.setState({})),n>=0?this._updateScrollPositionForScrollToCell():(o>=0||r>=0)&&this._setScrollPosition({scrollLeft:o,scrollTop:r}),this._invokeOnSectionRenderedHelper();var i=t.getTotalSize(),l=i.height,s=i.width;this._invokeOnScrollMemoizer({scrollLeft:o||0,scrollTop:r||0,totalHeight:l,totalWidth:s})}},{key:"componentDidUpdate",value:function(e,t){var o=this.props,n=o.height,r=o.scrollToAlignment,i=o.scrollToCell,l=o.width,s=this.state,a=s.scrollLeft,c=s.scrollPositionChangeReason,d=s.scrollTop;c===Me&&(a>=0&&a!==t.scrollLeft&&a!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=a),d>=0&&d!==t.scrollTop&&d!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=d)),n===e.height&&r===e.scrollToAlignment&&i===e.scrollToCell&&l===e.width||this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var t=this.props,o=t.autoHeight,n=t.cellCount,r=t.cellLayoutManager,i=t.className,l=t.height,s=t.horizontalOverscanSize,a=t.id,c=t.noContentRenderer,d=t.style,u=t.verticalOverscanSize,h=t.width,f=this.state,p=f.isScrolling,m=f.scrollLeft,g=f.scrollTop;(this._lastRenderedCellCount!==n||this._lastRenderedCellLayoutManager!==r||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=n,this._lastRenderedCellLayoutManager=r,this._calculateSizeAndPositionDataOnNextUpdate=!1,r.calculateSizeAndPositionData());var v=r.getTotalSize(),_=v.height,S=v.width,y=Math.max(0,m-s),w=Math.max(0,g-u),C=Math.min(S,m+h+s),x=Math.min(_,g+l+u),R=l>0&&h>0?r.cellRenderers({height:x-w,isScrolling:p,width:C-y,x:y,y:w}):[],b={boxSizing:"border-box",direction:"ltr",height:o?"auto":l,position:"relative",WebkitOverflowScrolling:"touch",width:h,willChange:"transform"},z=_>l?this._scrollbarSize:0,T=S>h?this._scrollbarSize:0;return b.overflowX=S+z<=h?"hidden":"auto",b.overflowY=_+T<=l?"hidden":"auto",e.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:W("ReactVirtualized__Collection",i),id:a,onScroll:this._onScroll,role:"grid",style:Oe(Oe({},b),d),tabIndex:0},n>0&&e.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:_,maxHeight:_,maxWidth:S,overflow:"hidden",pointerEvents:p?"none":"",width:S}},R),0===n&&c())}},{key:"_enablePointerEventsAfterDelay",value:function(){var e=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout(function(){(0,e.props.isScrollingChange)(!1),e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1})},150)}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,o=e.scrollLeft,n=e.scrollTop,r=e.totalHeight,i=e.totalWidth;this._onScrollMemoizer({callback:function(e){var o=e.scrollLeft,n=e.scrollTop,l=t.props,s=l.height;(0,l.onScroll)({clientHeight:s,clientWidth:l.width,scrollHeight:r,scrollLeft:o,scrollTop:n,scrollWidth:i})},indices:{scrollLeft:o,scrollTop:n}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,o=e.scrollTop,n={scrollPositionChangeReason:Me};t>=0&&(n.scrollLeft=t),o>=0&&(n.scrollTop=o),(t>=0&&t!==this.state.scrollLeft||o>=0&&o!==this.state.scrollTop)&&this.setState(n)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 0!==e.cellCount||0===t.scrollLeft&&0===t.scrollTop?e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop?e.scrollTop:t.scrollTop,scrollPositionChangeReason:Me}:null:{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:Me}}}])}();ce(Le,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0}),Le.propTypes={},fe(Le);var Ge=ie(function e(t){var o=t.height,n=t.width,r=t.x,i=t.y;te(this,e),this.height=o,this.width=n,this.x=r,this.y=i,this._indexMap={},this._indices=[]},[{key:"addCellIndex",value:function(e){var t=e.index;this._indexMap[t]||(this._indexMap[t]=!0,this._indices.push(t))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),Ae=ie(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;te(this,e),this._sectionSize=t,this._cellMetadata=[],this._sections={}},[{key:"getCellIndices",value:function(e){var t=e.height,o=e.width,n=e.x,r=e.y,i={};return this.getSections({height:t,width:o,x:n,y:r}).forEach(function(e){return e.getCellIndices().forEach(function(e){i[e]=e})}),Object.keys(i).map(function(e){return i[e]})}},{key:"getCellMetadata",value:function(e){var t=e.index;return this._cellMetadata[t]}},{key:"getSections",value:function(e){for(var t=e.height,o=e.width,n=e.x,r=e.y,i=Math.floor(n/this._sectionSize),l=Math.floor((n+o-1)/this._sectionSize),s=Math.floor(r/this._sectionSize),a=Math.floor((r+t-1)/this._sectionSize),c=[],d=i;d<=l;d++)for(var u=s;u<=a;u++){var h="".concat(d,".").concat(u);this._sections[h]||(this._sections[h]=new Ge({height:this._sectionSize,width:this._sectionSize,x:d*this._sectionSize,y:u*this._sectionSize})),c.push(this._sections[h])}return c}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var e=this;return Object.keys(this._sections).map(function(t){return e._sections[t].toString()})}},{key:"registerCell",value:function(e){var t=e.cellMetadatum,o=e.index;this._cellMetadata[o]=t,this.getSections(t).forEach(function(e){return e.addCellIndex({index:o})})}}]);function Ee(e){var t=e.align,o=void 0===t?"auto":t,n=e.cellOffset,r=e.cellSize,i=e.containerSize,l=e.currentOffset,s=n,a=s-i+r;switch(o){case"start":return s;case"end":return a;case"center":return s-(i-r)/2;default:return Math.max(a,Math.min(s,l))}}function He(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(He=function(){return!!e})()}var We=function(){function t(e,o){var n,r,i,l;return te(this,t),r=this,l=[e,o],i=se(i=t),(n=le(r,He()?Reflect.construct(i,l||[],se(r).constructor):i.apply(r,l)))._cellMetadata=[],n._lastRenderedCellIndices=[],n._cellCache=[],n._isScrollingChange=n._isScrollingChange.bind(n),n._setCollectionViewRef=n._setCollectionViewRef.bind(n),n}return ae(t,e.PureComponent),ie(t,[{key:"forceUpdate",value:function(){void 0!==this._collectionView&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var t=D({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(this.props),this.props));return e.createElement(Le,D({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},t))}},{key:"calculateSizeAndPositionData",value:function(){var e=this.props,t=function(e){for(var t=e.cellCount,o=e.cellSizeAndPositionGetter,n=[],r=new Ae(e.sectionSize),i=0,l=0,s=0;s<t;s++){var a=o({index:s});if(null==a.height||isNaN(a.height)||null==a.width||isNaN(a.width)||null==a.x||isNaN(a.x)||null==a.y||isNaN(a.y))throw Error("Invalid metadata returned for cell ".concat(s,":\n x:").concat(a.x,", y:").concat(a.y,", width:").concat(a.width,", height:").concat(a.height));i=Math.max(i,a.y+a.height),l=Math.max(l,a.x+a.width),n[s]=a,r.registerCell({cellMetadatum:a,index:s})}return{cellMetadata:n,height:i,sectionManager:r,width:l}}({cellCount:e.cellCount,cellSizeAndPositionGetter:e.cellSizeAndPositionGetter,sectionSize:e.sectionSize});this._cellMetadata=t.cellMetadata,this._sectionManager=t.sectionManager,this._height=t.height,this._width=t.width}},{key:"getLastRenderedIndices",value:function(){return this._lastRenderedCellIndices}},{key:"getScrollPositionForCell",value:function(e){var t=e.align,o=e.cellIndex,n=e.height,r=e.scrollLeft,i=e.scrollTop,l=e.width,s=this.props.cellCount;if(o>=0&&o<s){var a=this._cellMetadata[o];r=Ee({align:t,cellOffset:a.x,cellSize:a.width,containerSize:l,currentOffset:r}),i=Ee({align:t,cellOffset:a.y,cellSize:a.height,containerSize:n,currentOffset:i})}return{scrollLeft:r,scrollTop:i}}},{key:"getTotalSize",value:function(){return{height:this._height,width:this._width}}},{key:"cellRenderers",value:function(e){var t=this,o=e.height,n=e.isScrolling,r=e.width,i=e.x,l=e.y,s=this.props,a=s.cellGroupRenderer,c=s.cellRenderer;return this._lastRenderedCellIndices=this._sectionManager.getCellIndices({height:o,width:r,x:i,y:l}),a({cellCache:this._cellCache,cellRenderer:c,cellSizeAndPositionGetter:function(e){var o=e.index;return t._sectionManager.getCellMetadata({index:o})},indices:this._lastRenderedCellIndices,isScrolling:n})}},{key:"_isScrollingChange",value:function(e){e||(this._cellCache=[])}},{key:"_setCollectionViewRef",value:function(e){this._collectionView=e}}])}();function De(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(De=function(){return!!e})()}function je(e){var t=e.cellCount,o=e.cellSize,n=e.computeMetadataCallback,r=e.computeMetadataCallbackProps,i=e.nextCellsCount,l=e.nextCellSize,s=e.nextScrollToIndex,a=e.scrollToIndex,c=e.updateScrollOffsetForScrollToIndex;t===i&&("number"!=typeof o&&"number"!=typeof l||o===l)||(n(r),a>=0&&a===s&&c())}function Fe(e,t){if(null==e)return{};var o,n,r=j(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}ce(We,"defaultProps",{"aria-label":"grid",cellGroupRenderer:function(e){var t=e.cellCache,o=e.cellRenderer,n=e.cellSizeAndPositionGetter,r=e.indices,i=e.isScrolling;return r.map(function(e){var r=n({index:e}),l={index:e,isScrolling:i,key:e,style:{height:r.height,left:r.x,position:"absolute",top:r.y,width:r.width}};return i?(e in t||(t[e]=o(l)),t[e]):o(l)}).filter(function(e){return!!e})}}),We.propTypes={},(function(){function t(e,o){var n,r,i,l;return te(this,t),r=this,l=[e,o],i=se(i=t),(n=le(r,De()?Reflect.construct(i,l||[],se(r).constructor):i.apply(r,l)))._registerChild=n._registerChild.bind(n),n}return ae(t,e.PureComponent),ie(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,o=t.columnMaxWidth,n=t.columnMinWidth,r=t.columnCount,i=t.width;o===e.columnMaxWidth&&n===e.columnMinWidth&&r===e.columnCount&&i===e.width||this._registeredChild&&this._registeredChild.recomputeGridSize()}},{key:"render",value:function(){var e=this.props,t=e.children,o=e.columnMaxWidth,n=e.columnMinWidth,r=e.columnCount,i=e.width,l=n||1,s=o?Math.min(o,i):i,a=i/r;return a=Math.max(l,a),a=Math.min(s,a),a=Math.floor(a),t({adjustedWidth:Math.min(i,a*r),columnWidth:a,getColumnWidth:function(){return a},registerChild:this._registerChild})}},{key:"_registerChild",value:function(e){if(e&&"function"!=typeof e.recomputeGridSize)throw Error("Unexpected child type registered; only Grid/MultiGrid children are supported.");this._registeredChild=e,this._registeredChild&&this._registeredChild.recomputeGridSize()}}])}()).propTypes={};var Ne,Be=ie(function e(t){var o=t.cellCount,n=t.cellSizeGetter,r=t.estimatedCellSize;te(this,e),ce(this,"_cellSizeAndPositionData",{}),ce(this,"_lastMeasuredIndex",-1),ce(this,"_lastBatchedIndex",-1),ce(this,"_cellCount",void 0),ce(this,"_cellSizeGetter",void 0),ce(this,"_estimatedCellSize",void 0),this._cellSizeGetter=n,this._cellCount=o,this._estimatedCellSize=r},[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(e){var t=e.cellCount,o=e.estimatedCellSize,n=e.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=o,this._cellSizeGetter=n}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(e){if(e<0||e>=this._cellCount)throw Error("Requested index ".concat(e," is outside of range 0..").concat(this._cellCount));if(e>this._lastMeasuredIndex)for(var t=this.getSizeAndPositionOfLastMeasuredCell(),o=t.offset+t.size,n=this._lastMeasuredIndex+1;n<=e;n++){var r=this._cellSizeGetter({index:n});if(void 0===r||isNaN(r))throw Error("Invalid size returned for cell ".concat(n," of value ").concat(r));null===r?(this._cellSizeAndPositionData[n]={offset:o,size:0},this._lastBatchedIndex=e):(this._cellSizeAndPositionData[n]={offset:o,size:r},o+=r,this._lastMeasuredIndex=e)}return this._cellSizeAndPositionData[e]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,o=void 0===t?"auto":t,n=e.containerSize,r=e.currentOffset,i=e.targetIndex;if(n<=0)return 0;var l,s=this.getSizeAndPositionOfCell(i),a=s.offset,c=a-n+s.size;switch(o){case"start":l=a;break;case"end":l=c;break;case"center":l=a-(n-s.size)/2;break;default:l=Math.max(c,Math.min(a,r))}var d=this.getTotalSize();return Math.max(0,Math.min(d-n,l))}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,o=e.offset;if(0===this.getTotalSize())return{};var n=o+t,r=this._findNearestCell(o),i=this.getSizeAndPositionOfCell(r);o=i.offset+i.size;for(var l=r;o<n&&l<this._cellCount-1;)l++,o+=this.getSizeAndPositionOfCell(l).size;return{start:r,stop:l}}},{key:"resetCell",value:function(e){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,e-1)}},{key:"_binarySearch",value:function(e,t,o){for(;t<=e;){var n=t+Math.floor((e-t)/2),r=this.getSizeAndPositionOfCell(n).offset;if(r===o)return n;r<o?t=n+1:r>o&&(e=n-1)}return t>0?t-1:0}},{key:"_exponentialSearch",value:function(e,t){for(var o=1;e<this._cellCount&&this.getSizeAndPositionOfCell(e).offset<t;)e+=o,o*=2;return this._binarySearch(Math.min(e,this._cellCount-1),Math.floor(e/2),t)}},{key:"_findNearestCell",value:function(e){if(isNaN(e))throw Error("Invalid offset ".concat(e," specified"));e=Math.max(0,e);var t=this.getSizeAndPositionOfLastMeasuredCell(),o=Math.max(0,this._lastMeasuredIndex);return t.offset>=e?this._binarySearch(o,0,e):this._exponentialSearch(o,e)}}]),Ue=["maxScrollSize"],Ve=ie(function e(t){var o=t.maxScrollSize,n=void 0===o?"undefined"!=typeof window&&window.chrome?16777100:15e5:o,r=Fe(t,Ue);te(this,e),ce(this,"_cellSizeAndPositionManager",void 0),ce(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new Be(r),this._maxScrollSize=n},[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(e){var t=e.containerSize,o=e.offset,n=this._cellSizeAndPositionManager.getTotalSize(),r=this.getTotalSize(),i=this._getOffsetPercentage({containerSize:t,offset:o,totalSize:r});return Math.round(i*(r-n))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,o=void 0===t?"auto":t,n=e.containerSize,r=e.currentOffset,i=e.targetIndex;r=this._safeOffsetToOffset({containerSize:n,offset:r});var l=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:n,currentOffset:r,targetIndex:i});return this._offsetToSafeOffset({containerSize:n,offset:l})}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,o=e.offset;return o=this._safeOffsetToOffset({containerSize:t,offset:o}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:o})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var t=e.containerSize,o=e.offset,n=e.totalSize;return n<=t?0:o/(n-t)}},{key:"_offsetToSafeOffset",value:function(e){var t=e.containerSize,o=e.offset,n=this._cellSizeAndPositionManager.getTotalSize(),r=this.getTotalSize();if(n===r)return o;var i=this._getOffsetPercentage({containerSize:t,offset:o,totalSize:n});return Math.round(i*(r-t))}},{key:"_safeOffsetToOffset",value:function(e){var t=e.containerSize,o=e.offset,n=this._cellSizeAndPositionManager.getTotalSize(),r=this.getTotalSize();if(n===r)return o;var i=this._getOffsetPercentage({containerSize:t,offset:o,totalSize:r});return Math.round(i*(n-t))}}]);function $e(e){var t=e.cellSize,o=e.cellSizeAndPositionManager,n=e.previousCellsCount,r=e.previousCellSize,i=e.previousScrollToAlignment,l=e.previousScrollToIndex,s=e.previousSize,a=e.scrollOffset,c=e.scrollToAlignment,d=e.scrollToIndex,u=e.size,h=e.sizeJustIncreasedFromZero,f=e.updateScrollIndexCallback,p=o.getCellCount(),m=d>=0&&d<p;m&&(u!==s||h||!r||"number"==typeof t&&t!==r||c!==i||d!==l)?f(d):!m&&p>0&&(u<s||p<n)&&a>o.getTotalSize()-u&&f(p-1)}var Ke=(Ne="undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).requestAnimationFrame||Ne.webkitRequestAnimationFrame||Ne.mozRequestAnimationFrame||Ne.oRequestAnimationFrame||Ne.msRequestAnimationFrame||function(e){return Ne.setTimeout(e,1e3/60)},qe=Ne.cancelAnimationFrame||Ne.webkitCancelAnimationFrame||Ne.mozCancelAnimationFrame||Ne.oCancelAnimationFrame||Ne.msCancelAnimationFrame||function(e){Ne.clearTimeout(e)},Xe=Ke,Ye=qe,Je=function(e){return Ye(e.id)},Ze=function(e,t){var o;Promise.resolve().then(function(){o=Date.now()});var n=function(){Date.now()-o>=t?e.call():r.id=Xe(n)},r={id:Xe(n)};return r};function Qe(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function et(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(o),!0).forEach(function(t){ce(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Qe(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function tt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tt=function(){return!!e})()}var ot="requested",nt=function(){function t(e){var o,n,r,i;te(this,t),n=this,i=[e],r=se(r=t),ce(o=le(n,tt()?Reflect.construct(r,i||[],se(n).constructor):r.apply(n,i)),"_onGridRenderedMemoizer",be()),ce(o,"_onScrollMemoizer",be(!1)),ce(o,"_deferredInvalidateColumnIndex",null),ce(o,"_deferredInvalidateRowIndex",null),ce(o,"_recomputeScrollLeftFlag",!1),ce(o,"_recomputeScrollTopFlag",!1),ce(o,"_horizontalScrollBarSize",0),ce(o,"_verticalScrollBarSize",0),ce(o,"_scrollbarPresenceChanged",!1),ce(o,"_scrollingContainer",void 0),ce(o,"_childrenToDisplay",void 0),ce(o,"_columnStartIndex",void 0),ce(o,"_columnStopIndex",void 0),ce(o,"_rowStartIndex",void 0),ce(o,"_rowStopIndex",void 0),ce(o,"_renderedColumnStartIndex",0),ce(o,"_renderedColumnStopIndex",0),ce(o,"_renderedRowStartIndex",0),ce(o,"_renderedRowStopIndex",0),ce(o,"_initialScrollTop",void 0),ce(o,"_initialScrollLeft",void 0),ce(o,"_disablePointerEventsTimeoutId",void 0),ce(o,"_styleCache",{}),ce(o,"_cellCache",{}),ce(o,"_debounceScrollEndedCallback",function(){o._disablePointerEventsTimeoutId=null,o.setState({isScrolling:!1,needToResetStyleCache:!1})}),ce(o,"_invokeOnGridRenderedHelper",function(){var e=o.props.onSectionRendered;o._onGridRenderedMemoizer({callback:e,indices:{columnOverscanStartIndex:o._columnStartIndex,columnOverscanStopIndex:o._columnStopIndex,columnStartIndex:o._renderedColumnStartIndex,columnStopIndex:o._renderedColumnStopIndex,rowOverscanStartIndex:o._rowStartIndex,rowOverscanStopIndex:o._rowStopIndex,rowStartIndex:o._renderedRowStartIndex,rowStopIndex:o._renderedRowStopIndex}})}),ce(o,"_setScrollingContainerRef",function(e){o._scrollingContainer=e,"function"==typeof o.props.elementRef?o.props.elementRef(e):"object"===oe(o.props.elementRef)&&(o.props.elementRef.current=e)}),ce(o,"_onScroll",function(e){e.target===o._scrollingContainer&&o.handleScrollEvent(e.target)});var l=new Ve({cellCount:e.columnCount,cellSizeGetter:function(o){return t._wrapSizeGetter(e.columnWidth)(o)},estimatedCellSize:t._getEstimatedColumnSize(e)}),s=new Ve({cellCount:e.rowCount,cellSizeGetter:function(o){return t._wrapSizeGetter(e.rowHeight)(o)},estimatedCellSize:t._getEstimatedRowSize(e)});return o.state={instanceProps:{columnSizeAndPositionManager:l,rowSizeAndPositionManager:s,prevColumnWidth:e.columnWidth,prevRowHeight:e.rowHeight,prevColumnCount:e.columnCount,prevRowCount:e.rowCount,prevIsScrolling:!0===e.isScrolling,prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:1,scrollDirectionVertical:1,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},e.scrollToRow>0&&(o._initialScrollTop=o._getCalculatedScrollTop(e,o.state)),e.scrollToColumn>0&&(o._initialScrollLeft=o._getCalculatedScrollLeft(e,o.state)),o}return ae(t,e.PureComponent),ie(t,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,o=void 0===t?this.props.scrollToAlignment:t,n=e.columnIndex,r=void 0===n?this.props.scrollToColumn:n,i=e.rowIndex,l=void 0===i?this.props.scrollToRow:i,s=et(et({},this.props),{},{scrollToAlignment:o,scrollToColumn:r,scrollToRow:l});return{scrollLeft:this._getCalculatedScrollLeft(s),scrollTop:this._getCalculatedScrollTop(s)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,o=void 0===t?0:t,n=e.scrollTop,r=void 0===n?0:n;if(!(r<0)){this._debounceScrollEnded();var i=this.props,l=i.autoHeight,s=i.autoWidth,a=i.height,c=i.width,d=this.state.instanceProps,u=d.scrollbarSize,h=d.rowSizeAndPositionManager.getTotalSize(),f=d.columnSizeAndPositionManager.getTotalSize(),p=Math.min(Math.max(0,f-c+u),o),m=Math.min(Math.max(0,h-a+u),r);if(this.state.scrollLeft!==p||this.state.scrollTop!==m){var g={isScrolling:!0,scrollDirectionHorizontal:p!==this.state.scrollLeft?p>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:m!==this.state.scrollTop?m>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:"observed"};l||(g.scrollTop=m),s||(g.scrollLeft=p),g.needToResetStyleCache=!1,this.setState(g)}this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:m,totalColumnsWidth:f,totalRowsHeight:h})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,o):o}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,o=e.rowCount,n=this.state.instanceProps;n.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),n.rowSizeAndPositionManager.getSizeAndPositionOfCell(o-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,n=e.rowIndex,r=void 0===n?0:n,i=this.props,l=i.scrollToColumn,s=i.scrollToRow,a=this.state.instanceProps;a.columnSizeAndPositionManager.resetCell(o),a.rowSizeAndPositionManager.resetCell(r),this._recomputeScrollLeftFlag=l>=0&&(1===this.state.scrollDirectionHorizontal?o<=l:o>=l),this._recomputeScrollTopFlag=s>=0&&(1===this.state.scrollDirectionVertical?r<=s:r>=s),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,o=e.rowIndex,n=this.props.columnCount,r=this.props;n>1&&void 0!==t&&this._updateScrollLeftForScrollToColumn(et(et({},r),{},{scrollToColumn:t})),void 0!==o&&this._updateScrollTopForScrollToRow(et(et({},r),{},{scrollToRow:o}))}},{key:"componentDidMount",value:function(){var e=this.props,o=e.getScrollbarSize,n=e.height,r=e.scrollLeft,i=e.scrollToColumn,l=e.scrollTop,s=e.scrollToRow,a=e.width,c=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),c.scrollbarSizeMeasured||this.setState(function(e){var t=et(et({},e),{},{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=o(),t.instanceProps.scrollbarSizeMeasured=!0,t}),"number"==typeof r&&r>=0||"number"==typeof l&&l>=0){var d=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:r,scrollTop:l});d&&(d.needToResetStyleCache=!1,this.setState(d))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var u=n>0&&a>0;i>=0&&u&&this._updateScrollLeftForScrollToColumn(),s>=0&&u&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:r||0,scrollTop:l||0,totalColumnsWidth:c.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:c.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var o=this,n=this.props,r=n.autoHeight,i=n.autoWidth,l=n.columnCount,s=n.height,a=n.rowCount,c=n.scrollToAlignment,d=n.scrollToColumn,u=n.scrollToRow,h=n.width,f=this.state,p=f.scrollLeft,m=f.scrollPositionChangeReason,g=f.scrollTop,v=f.instanceProps;this._handleInvalidatedGridSize();var _=l>0&&0===e.columnCount||a>0&&0===e.rowCount;m===ot&&(!i&&p>=0&&(p!==this._scrollingContainer.scrollLeft||_)&&(this._scrollingContainer.scrollLeft=p),!r&&g>=0&&(g!==this._scrollingContainer.scrollTop||_)&&(this._scrollingContainer.scrollTop=g));var S=(0===e.width||0===e.height)&&s>0&&h>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):$e({cellSizeAndPositionManager:v.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:p,scrollToAlignment:c,scrollToIndex:d,size:h,sizeJustIncreasedFromZero:S,updateScrollIndexCallback:function(){return o._updateScrollLeftForScrollToColumn(o.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):$e({cellSizeAndPositionManager:v.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:g,scrollToAlignment:c,scrollToIndex:u,size:s,sizeJustIncreasedFromZero:S,updateScrollIndexCallback:function(){return o._updateScrollTopForScrollToRow(o.props)}}),this._invokeOnGridRenderedHelper(),p!==t.scrollLeft||g!==t.scrollTop){var y=v.rowSizeAndPositionManager.getTotalSize(),w=v.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:g,totalColumnsWidth:w,totalRowsHeight:y})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&Je(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var t=this.props,o=t.autoContainerWidth,n=t.autoHeight,r=t.autoWidth,i=t.className,l=t.containerProps,s=t.containerRole,a=t.containerStyle,c=t.height,d=t.id,u=t.noContentRenderer,h=t.role,f=t.style,p=t.tabIndex,m=t.width,g=this.state,v=g.instanceProps,_=g.needToResetStyleCache,S=this._isScrolling(),y={boxSizing:"border-box",direction:"ltr",height:n?"auto":c,position:"relative",width:r?"auto":m,WebkitOverflowScrolling:"touch",willChange:"transform"};_&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var w=v.columnSizeAndPositionManager.getTotalSize(),C=v.rowSizeAndPositionManager.getTotalSize(),x=C>c?v.scrollbarSize:0,R=w>m?v.scrollbarSize:0;R===this._horizontalScrollBarSize&&x===this._verticalScrollBarSize||(this._horizontalScrollBarSize=R,this._verticalScrollBarSize=x,this._scrollbarPresenceChanged=!0),y.overflowX=w+x<=m?"hidden":"auto",y.overflowY=C+R<=c?"hidden":"auto";var b=this._childrenToDisplay,z=0===b.length&&c>0&&m>0;return e.createElement("div",D({ref:this._setScrollingContainerRef},l,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:W("ReactVirtualized__Grid",i),id:d,onScroll:this._onScroll,role:h,style:et(et({},y),f),tabIndex:p}),b.length>0&&e.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:s,style:et({width:o?"auto":w,height:C,maxWidth:w,maxHeight:C,overflow:"hidden",pointerEvents:S?"none":"",position:"relative"},a)},b),z&&u())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,o=e.cellRenderer,n=e.cellRangeRenderer,r=e.columnCount,i=e.deferredMeasurementCache,l=e.height,s=e.overscanColumnCount,a=e.overscanIndicesGetter,c=e.overscanRowCount,d=e.rowCount,u=e.width,h=e.isScrollingOptOut,f=t.scrollDirectionHorizontal,p=t.scrollDirectionVertical,m=t.instanceProps,g=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,v=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,_=this._isScrolling(e,t);if(this._childrenToDisplay=[],l>0&&u>0){var S=m.columnSizeAndPositionManager.getVisibleCellRange({containerSize:u,offset:v}),y=m.rowSizeAndPositionManager.getVisibleCellRange({containerSize:l,offset:g}),w=m.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:u,offset:v}),C=m.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:l,offset:g});this._renderedColumnStartIndex=S.start,this._renderedColumnStopIndex=S.stop,this._renderedRowStartIndex=y.start,this._renderedRowStopIndex=y.stop;var x=a({direction:"horizontal",cellCount:r,overscanCellsCount:s,scrollDirection:f,startIndex:"number"==typeof S.start?S.start:0,stopIndex:"number"==typeof S.stop?S.stop:-1}),R=a({direction:"vertical",cellCount:d,overscanCellsCount:c,scrollDirection:p,startIndex:"number"==typeof y.start?y.start:0,stopIndex:"number"==typeof y.stop?y.stop:-1}),b=x.overscanStartIndex,z=x.overscanStopIndex,T=R.overscanStartIndex,I=R.overscanStopIndex;if(i){if(!i.hasFixedHeight())for(var P=T;P<=I;P++)if(!i.has(P,0)){b=0,z=r-1;break}if(!i.hasFixedWidth())for(var O=b;O<=z;O++)if(!i.has(0,O)){T=0,I=d-1;break}}this._childrenToDisplay=n({cellCache:this._cellCache,cellRenderer:o,columnSizeAndPositionManager:m.columnSizeAndPositionManager,columnStartIndex:b,columnStopIndex:z,deferredMeasurementCache:i,horizontalOffsetAdjustment:w,isScrolling:_,isScrollingOptOut:h,parent:this,rowSizeAndPositionManager:m.rowSizeAndPositionManager,rowStartIndex:T,rowStopIndex:I,scrollLeft:v,scrollTop:g,styleCache:this._styleCache,verticalOffsetAdjustment:C,visibleColumnIndices:S,visibleRowIndices:y}),this._columnStartIndex=b,this._columnStopIndex=z,this._rowStartIndex=T,this._rowStopIndex=I}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&Je(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=Ze(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex&&"number"==typeof this._deferredInvalidateRowIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,o=e.scrollLeft,n=e.scrollTop,r=e.totalColumnsWidth,i=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var o=e.scrollLeft,n=e.scrollTop,l=t.props,s=l.height;(0,l.onScroll)({clientHeight:s,clientWidth:l.width,scrollHeight:i,scrollLeft:o,scrollTop:n,scrollWidth:r})},indices:{scrollLeft:o,scrollTop:n}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?Boolean(e.isScrolling):Boolean(t.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var o=e.scrollLeft,n=e.scrollTop,r=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:o,scrollTop:n});r&&(r.needToResetStyleCache=!1,this.setState(r))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollLeft(e,o)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=t._getScrollLeftForScrollToColumnStateUpdate(e,o);n&&(n.needToResetStyleCache=!1,this.setState(n))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollTop(e,o)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,o=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var n=this._rowStartIndex;n<=this._rowStopIndex;n++)for(var r=this._columnStartIndex;r<=this._columnStopIndex;r++){var i="".concat(n,"-").concat(r);this._styleCache[i]=e[i],o&&(this._cellCache[i]=t[i])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=t._getScrollTopForScrollToRowStateUpdate(e,o);n&&(n.needToResetStyleCache=!1,this.setState(n))}}],[{key:"getDerivedStateFromProps",value:function(e,o){var n={};0===e.columnCount&&0!==o.scrollLeft||0===e.rowCount&&0!==o.scrollTop?(n.scrollLeft=0,n.scrollTop=0):(e.scrollLeft!==o.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==o.scrollTop&&e.scrollToRow<0)&&Object.assign(n,t._getScrollToPositionStateUpdate({prevState:o,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var r,i,l=o.instanceProps;return n.needToResetStyleCache=!1,e.columnWidth===l.prevColumnWidth&&e.rowHeight===l.prevRowHeight||(n.needToResetStyleCache=!0),l.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:t._getEstimatedColumnSize(e),cellSizeGetter:t._wrapSizeGetter(e.columnWidth)}),l.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:t._getEstimatedRowSize(e),cellSizeGetter:t._wrapSizeGetter(e.rowHeight)}),0!==l.prevColumnCount&&0!==l.prevRowCount||(l.prevColumnCount=0,l.prevRowCount=0),e.autoHeight&&!1===e.isScrolling&&!0===l.prevIsScrolling&&Object.assign(n,{isScrolling:!1}),je({cellCount:l.prevColumnCount,cellSize:"number"==typeof l.prevColumnWidth?l.prevColumnWidth:null,computeMetadataCallback:function(){return l.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"==typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:l.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){r=t._getScrollLeftForScrollToColumnStateUpdate(e,o)}}),je({cellCount:l.prevRowCount,cellSize:"number"==typeof l.prevRowHeight?l.prevRowHeight:null,computeMetadataCallback:function(){return l.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"==typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:l.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){i=t._getScrollTopForScrollToRowStateUpdate(e,o)}}),l.prevColumnCount=e.columnCount,l.prevColumnWidth=e.columnWidth,l.prevIsScrolling=!0===e.isScrolling,l.prevRowCount=e.rowCount,l.prevRowHeight=e.rowHeight,l.prevScrollToColumn=e.scrollToColumn,l.prevScrollToRow=e.scrollToRow,l.scrollbarSize=e.getScrollbarSize(),void 0===l.scrollbarSize?(l.scrollbarSizeMeasured=!1,l.scrollbarSize=0):l.scrollbarSizeMeasured=!0,n.instanceProps=l,et(et(et({},n),r),i)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"==typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"==typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,o=e.scrollLeft,n=e.scrollTop,r={scrollPositionChangeReason:ot};return"number"==typeof o&&o>=0&&(r.scrollDirectionHorizontal=o>t.scrollLeft?1:-1,r.scrollLeft=o),"number"==typeof n&&n>=0&&(r.scrollDirectionVertical=n>t.scrollTop?1:-1,r.scrollTop=n),"number"==typeof o&&o>=0&&o!==t.scrollLeft||"number"==typeof n&&n>=0&&n!==t.scrollTop?r:{}}},{key:"_wrapSizeGetter",value:function(e){return"function"==typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var o=e.columnCount,n=e.height,r=e.scrollToAlignment,i=e.scrollToColumn,l=e.width,s=t.scrollLeft,a=t.instanceProps;if(o>0){var c=o-1,d=i<0?c:Math.min(c,i),u=a.rowSizeAndPositionManager.getTotalSize(),h=a.scrollbarSizeMeasured&&u>n?a.scrollbarSize:0;return a.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:r,containerSize:l-h,currentOffset:s,targetIndex:d})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,o){var n=o.scrollLeft,r=t._getCalculatedScrollLeft(e,o);return"number"==typeof r&&r>=0&&n!==r?t._getScrollToPositionStateUpdate({prevState:o,scrollLeft:r,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var o=e.height,n=e.rowCount,r=e.scrollToAlignment,i=e.scrollToRow,l=e.width,s=t.scrollTop,a=t.instanceProps;if(n>0){var c=n-1,d=i<0?c:Math.min(c,i),u=a.columnSizeAndPositionManager.getTotalSize(),h=a.scrollbarSizeMeasured&&u>l?a.scrollbarSize:0;return a.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:r,containerSize:o-h,currentOffset:s,targetIndex:d})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,o){var n=o.scrollTop,r=t._getCalculatedScrollTop(e,o);return"number"==typeof r&&r>=0&&n!==r?t._getScrollToPositionStateUpdate({prevState:o,scrollLeft:-1,scrollTop:r}):{}}}])}();function rt(e){var t=e.cellCount,o=e.overscanCellsCount,n=e.scrollDirection,r=e.startIndex,i=e.stopIndex;return o=Math.max(1,o),1===n?{overscanStartIndex:Math.max(0,r-1),overscanStopIndex:Math.min(t-1,i+o)}:{overscanStartIndex:Math.max(0,r-o),overscanStopIndex:Math.min(t-1,i+1)}}function it(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function lt(e,t){if(e){if("string"==typeof e)return it(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?it(e,t):void 0}}function st(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(st=function(){return!!e})()}ce(nt,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var t=e.cellCache,o=e.cellRenderer,n=e.columnSizeAndPositionManager,r=e.columnStartIndex,i=e.columnStopIndex,l=e.deferredMeasurementCache,s=e.horizontalOffsetAdjustment,a=e.isScrolling,c=e.isScrollingOptOut,d=e.parent,u=e.rowSizeAndPositionManager,h=e.rowStartIndex,f=e.rowStopIndex,p=e.styleCache,m=e.verticalOffsetAdjustment,g=e.visibleColumnIndices,v=e.visibleRowIndices,_=[],S=n.areOffsetsAdjusted()||u.areOffsetsAdjusted(),y=!a&&!S,w=h;w<=f;w++)for(var C=u.getSizeAndPositionOfCell(w),x=r;x<=i;x++){var R=n.getSizeAndPositionOfCell(x),b=x>=g.start&&x<=g.stop&&w>=v.start&&w<=v.stop,z="".concat(w,"-").concat(x),T=void 0;y&&p[z]?T=p[z]:l&&!l.has(w,x)?T={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(T={height:C.size,left:R.offset+s,position:"absolute",top:C.offset+m,width:R.size},p[z]=T);var I={columnIndex:x,isScrolling:a,isVisible:b,key:z,parent:d,rowIndex:w,style:T},P=void 0;!c&&!a||s||m?P=o(I):(t[z]||(t[z]=o(I)),P=t[z]),null!=P&&!1!==P&&(P.props.role||(P=M.cloneElement(P,{role:"gridcell"})),_.push(P))}return _},containerRole:"row",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:Ie,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(e){var t=e.cellCount,o=e.overscanCellsCount,n=e.scrollDirection,r=e.startIndex,i=e.stopIndex;return 1===n?{overscanStartIndex:Math.max(0,r),overscanStopIndex:Math.min(t-1,i+o)}:{overscanStartIndex:Math.max(0,r-o),overscanStopIndex:Math.min(t-1,i)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),fe(nt);var at=function(){function t(e,o){var n,r,i,l;return te(this,t),r=this,l=[e,o],i=se(i=t),(n=le(r,st()?Reflect.construct(i,l||[],se(r).constructor):i.apply(r,l)))._loadMoreRowsMemoizer=be(),n._onRowsRendered=n._onRowsRendered.bind(n),n._registerChild=n._registerChild.bind(n),n}return ae(t,e.PureComponent),ie(t,[{key:"resetLoadMoreRowsCache",value:function(e){this._loadMoreRowsMemoizer=be(),e&&this._doStuff(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"render",value:function(){return(0,this.props.children)({onRowsRendered:this._onRowsRendered,registerChild:this._registerChild})}},{key:"_loadUnloadedRanges",value:function(e){var t=this,o=this.props.loadMoreRows;e.forEach(function(e){var n=o(e);n&&n.then(function(){var o;(o={lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:e.startIndex,stopIndex:e.stopIndex}).startIndex>o.lastRenderedStopIndex||o.stopIndex<o.lastRenderedStartIndex||t._registeredChild&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o="function"==typeof e.recomputeGridSize?e.recomputeGridSize:e.recomputeRowHeights;o?o.call(e,t):e.forceUpdate()}(t._registeredChild,t._lastRenderedStartIndex)})})}},{key:"_onRowsRendered",value:function(e){var t=e.startIndex,o=e.stopIndex;this._lastRenderedStartIndex=t,this._lastRenderedStopIndex=o,this._doStuff(t,o)}},{key:"_doStuff",value:function(e,t){var o,n=this,r=this.props,i=r.isRowLoaded,l=r.minimumBatchSize,s=r.rowCount,a=r.threshold,c=function(e){for(var t=e.isRowLoaded,o=e.minimumBatchSize,n=e.rowCount,r=e.stopIndex,i=[],l=null,s=null,a=e.startIndex;a<=r;a++)t({index:a})?null!==s&&(i.push({startIndex:l,stopIndex:s}),l=s=null):(s=a,null===l&&(l=a));if(null!==s){for(var c=Math.min(Math.max(s,l+o-1),n-1),d=s+1;d<=c&&!t({index:d});d++)s=d;i.push({startIndex:l,stopIndex:s})}if(i.length)for(var u=i[0];u.stopIndex-u.startIndex+1<o&&u.startIndex>0;){var h=u.startIndex-1;if(t({index:h}))break;u.startIndex=h}return i}({isRowLoaded:i,minimumBatchSize:l,rowCount:s,startIndex:Math.max(0,e-a),stopIndex:Math.min(s-1,t+a)}),d=(o=[]).concat.apply(o,function(e){return function(e){if(Array.isArray(e))return it(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||lt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(c.map(function(e){return[e.startIndex,e.stopIndex]})));this._loadMoreRowsMemoizer({callback:function(){n._loadUnloadedRanges(c)},indices:{squashedUnloadedRanges:d}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}])}();function ct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ct=function(){return!!e})()}ce(at,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),at.propTypes={};var dt=function(){function t(){var e,o,n,r;te(this,t);for(var i=arguments.length,l=new Array(i),s=0;s<i;s++)l[s]=arguments[s];return o=this,n=t,r=[].concat(l),n=se(n),ce(e=le(o,ct()?Reflect.construct(n,r||[],se(o).constructor):n.apply(o,r)),"Grid",void 0),ce(e,"_cellRenderer",function(t){var o=t.parent,n=t.rowIndex,r=t.style,i=t.isScrolling,l=t.isVisible,s=t.key,a=e.props.rowRenderer,c=Object.getOwnPropertyDescriptor(r,"width");return c&&c.writable&&(r.width="100%"),a({index:n,style:r,isScrolling:i,isVisible:l,key:s,parent:o})}),ce(e,"_setRef",function(t){e.Grid=t}),ce(e,"_onScroll",function(t){var o=t.clientHeight,n=t.scrollHeight,r=t.scrollTop;(0,e.props.onScroll)({clientHeight:o,scrollHeight:n,scrollTop:r})}),ce(e,"_onSectionRendered",function(t){var o=t.rowOverscanStartIndex,n=t.rowOverscanStopIndex,r=t.rowStartIndex,i=t.rowStopIndex;(0,e.props.onRowsRendered)({overscanStartIndex:o,overscanStopIndex:n,startIndex:r,stopIndex:i})}),e}return ae(t,e.PureComponent),ie(t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,o=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:o,columnIndex:0}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,n=e.rowIndex,r=void 0===n?0:n;this.Grid&&this.Grid.recomputeGridSize({rowIndex:r,columnIndex:o})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var t=this.props,o=t.className,n=t.noRowsRenderer,r=t.scrollToIndex,i=t.width,l=W("ReactVirtualized__List",o);return e.createElement(nt,D({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:l,columnWidth:i,columnCount:1,noContentRenderer:n,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:r}))}}])}();ce(dt,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:rt,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});const ut=function(e,t,o,n,r){return"function"==typeof o?function(e,t,o,n,r){for(var i=o+1;t<=o;){var l=t+o>>>1;r(e[l],n)>=0?(i=l,o=l-1):t=l+1}return i}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t,o):function(e,t,o,n){for(var r=o+1;t<=o;){var i=t+o>>>1;e[i]>=n?(r=i,o=i-1):t=i+1}return r}(e,void 0===o?0:0|o,void 0===n?e.length-1:0|n,t)};function ht(e,t,o,n,r){this.mid=e,this.left=t,this.right=o,this.leftPoints=n,this.rightPoints=r,this.count=(t?t.count:0)+(o?o.count:0)+n.length}var ft=ht.prototype;function pt(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function mt(e,t){var o=Rt(t);e.mid=o.mid,e.left=o.left,e.right=o.right,e.leftPoints=o.leftPoints,e.rightPoints=o.rightPoints,e.count=o.count}function gt(e,t){var o=e.intervals([]);o.push(t),mt(e,o)}function vt(e,t){var o=e.intervals([]),n=o.indexOf(t);return n<0?0:(o.splice(n,1),mt(e,o),1)}function _t(e,t,o){for(var n=0;n<e.length&&e[n][0]<=t;++n){var r=o(e[n]);if(r)return r}}function St(e,t,o){for(var n=e.length-1;n>=0&&e[n][1]>=t;--n){var r=o(e[n]);if(r)return r}}function yt(e,t){for(var o=0;o<e.length;++o){var n=t(e[o]);if(n)return n}}function wt(e,t){return e-t}function Ct(e,t){return e[0]-t[0]||e[1]-t[1]}function xt(e,t){return e[1]-t[1]||e[0]-t[0]}function Rt(e){if(0===e.length)return null;for(var t=[],o=0;o<e.length;++o)t.push(e[o][0],e[o][1]);t.sort(wt);var n=t[t.length>>1],r=[],i=[],l=[];for(o=0;o<e.length;++o){var s=e[o];s[1]<n?r.push(s):n<s[0]?i.push(s):l.push(s)}var a=l,c=l.slice();return a.sort(Ct),c.sort(xt),new ht(n,Rt(r),Rt(i),a,c)}function bt(e){this.root=e}ft.intervals=function(e){return e.push.apply(e,this.leftPoints),this.left&&this.left.intervals(e),this.right&&this.right.intervals(e),e},ft.insert=function(e){var t=this.count-this.leftPoints.length;if(this.count+=1,e[1]<this.mid)this.left?4*(this.left.count+1)>3*(t+1)?gt(this,e):this.left.insert(e):this.left=Rt([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?gt(this,e):this.right.insert(e):this.right=Rt([e]);else{var o=ut(this.leftPoints,e,Ct),n=ut(this.rightPoints,e,xt);this.leftPoints.splice(o,0,e),this.rightPoints.splice(n,0,e)}},ft.remove=function(e){var t=this.count-this.leftPoints;if(e[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(t-1)?vt(this,e):2===(i=this.left.remove(e))?(this.left=null,this.count-=1,1):(1===i&&(this.count-=1),i):0;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?vt(this,e):2===(i=this.right.remove(e))?(this.right=null,this.count-=1,1):(1===i&&(this.count-=1),i):0;if(1===this.count)return this.leftPoints[0]===e?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var o=this,n=this.left;n.right;)o=n,n=n.right;if(o===this)n.right=this.right;else{var r=this.left,i=this.right;o.count-=n.count,o.right=n.left,n.left=r,n.right=i}pt(this,n),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?pt(this,this.left):pt(this,this.right);return 1}for(r=ut(this.leftPoints,e,Ct);r<this.leftPoints.length&&this.leftPoints[r][0]===e[0];++r)if(this.leftPoints[r]===e)for(this.count-=1,this.leftPoints.splice(r,1),i=ut(this.rightPoints,e,xt);i<this.rightPoints.length&&this.rightPoints[i][1]===e[1];++i)if(this.rightPoints[i]===e)return this.rightPoints.splice(i,1),1;return 0},ft.queryPoint=function(e,t){return e<this.mid?this.left&&(o=this.left.queryPoint(e,t))?o:_t(this.leftPoints,e,t):e>this.mid?this.right&&(o=this.right.queryPoint(e,t))?o:St(this.rightPoints,e,t):yt(this.leftPoints,t);var o},ft.queryInterval=function(e,t,o){var n;return e<this.mid&&this.left&&(n=this.left.queryInterval(e,t,o))||t>this.mid&&this.right&&(n=this.right.queryInterval(e,t,o))?n:t<this.mid?_t(this.leftPoints,t,o):e>this.mid?St(this.rightPoints,e,o):yt(this.leftPoints,o)};var zt=bt.prototype;zt.insert=function(e){this.root?this.root.insert(e):this.root=new ht(e[0],null,null,[e],[e])},zt.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},zt.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},zt.queryInterval=function(e,t,o){if(e<=t&&this.root)return this.root.queryInterval(e,t,o)},Object.defineProperty(zt,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(zt,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var Tt=ie(function e(){te(this,e),ce(this,"_columnSizeMap",{}),ce(this,"_intervalTree",new bt(null)),ce(this,"_leftMap",{})},[{key:"estimateTotalHeight",value:function(e,t,o){var n=e-this.count;return this.tallestColumnSize+Math.ceil(n/t)*o}},{key:"range",value:function(e,t,o){var n=this;this._intervalTree.queryInterval(e,e+t,function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,i,l,s=[],a=!0,c=!1;try{if(i=(o=o.call(e)).next,0===t);else for(;!(a=(n=i.call(o)).done)&&(s.push(n.value),s.length!==t);a=!0);}catch(e){c=!0,r=e}finally{try{if(!a&&null!=o.return&&(l=o.return(),Object(l)!==l))return}finally{if(c)throw r}}return s}}(e,t)||lt(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,3),r=t[0];t[1];var i=t[2];return o(i,n._leftMap[i],r)})}},{key:"setPosition",value:function(e,t,o,n){this._intervalTree.insert([o,o+n,e]),this._leftMap[e]=t;var r=this._columnSizeMap,i=r[t];r[t]=void 0===i?o+n:Math.max(i,o+n)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var o in e){var n=e[o];t=0===t?n:Math.min(t,n)}return t}},{key:"tallestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var o in e){var n=e[o];t=Math.max(t,n)}return t}}]);function It(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Pt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?It(Object(o),!0).forEach(function(t){ce(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):It(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function Ot(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ot=function(){return!!e})()}var kt=function(){function t(){var e,o,n,r;te(this,t);for(var i=arguments.length,l=new Array(i),s=0;s<i;s++)l[s]=arguments[s];return o=this,n=t,r=[].concat(l),n=se(n),ce(e=le(o,Ot()?Reflect.construct(n,r||[],se(o).constructor):n.apply(o,r)),"state",{isScrolling:!1,scrollTop:0}),ce(e,"_debounceResetIsScrollingId",void 0),ce(e,"_invalidateOnUpdateStartIndex",null),ce(e,"_invalidateOnUpdateStopIndex",null),ce(e,"_positionCache",new Tt),ce(e,"_startIndex",null),ce(e,"_startIndexMemoized",null),ce(e,"_stopIndex",null),ce(e,"_stopIndexMemoized",null),ce(e,"_debounceResetIsScrollingCallback",function(){e.setState({isScrolling:!1})}),ce(e,"_setScrollingContainerRef",function(t){e._scrollingContainer=t}),ce(e,"_onScroll",function(t){var o=e.props.height,n=t.currentTarget.scrollTop,r=Math.min(Math.max(0,e._getEstimatedTotalHeight()-o),n);n===r&&(e._debounceResetIsScrolling(),e.state.scrollTop!==r&&e.setState({isScrolling:!0,scrollTop:r}))}),e}return ae(t,e.PureComponent),ie(t,[{key:"clearCellPositions",value:function(){this._positionCache=new Tt,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.rowIndex;null===this._invalidateOnUpdateStartIndex?(this._invalidateOnUpdateStartIndex=t,this._invalidateOnUpdateStopIndex=t):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,t),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,t))}},{key:"recomputeCellPositions",value:function(){var e=this._positionCache.count-1;this._positionCache=new Tt,this._populatePositionCache(0,e),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(e,t){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==e.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&Je(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var t,o=this,n=this.props,r=n.autoHeight,i=n.cellCount,l=n.cellMeasurerCache,s=n.cellRenderer,a=n.className,c=n.height,d=n.id,u=n.keyMapper,h=n.overscanByPixels,f=n.role,p=n.style,m=n.tabIndex,g=n.width,v=n.rowDirection,_=this.state,S=_.isScrolling,y=_.scrollTop,w=[],C=this._getEstimatedTotalHeight(),x=this._positionCache.shortestColumnSize,R=this._positionCache.count,b=0;if(this._positionCache.range(Math.max(0,y-h),c+2*h,function(e,n,r){void 0===t?(b=e,t=e):(b=Math.min(b,e),t=Math.max(t,e)),w.push(s({index:e,isScrolling:S,key:u(e),parent:o,style:ce(ce(ce(ce({height:l.getHeight(e)},"ltr"===v?"left":"right",n),"position","absolute"),"top",r),"width",l.getWidth(e))}))}),x<y+c+h&&R<i)for(var z=Math.min(i-R,Math.ceil((y+c+h-x)/l.defaultHeight*g/l.defaultWidth)),T=R;T<R+z;T++)t=T,w.push(s({index:T,isScrolling:S,key:u(T),parent:this,style:{width:l.getWidth(T)}}));return this._startIndex=b,this._stopIndex=t,e.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:W("ReactVirtualized__Masonry",a),id:d,onScroll:this._onScroll,role:f,style:Pt({boxSizing:"border-box",direction:"ltr",height:r?"auto":c,overflowX:"hidden",overflowY:C<c?"hidden":"auto",position:"relative",width:g,WebkitOverflowScrolling:"touch",willChange:"transform"},p),tabIndex:m},e.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:C,maxWidth:"100%",maxHeight:C,overflow:"hidden",pointerEvents:S?"none":"",position:"relative"}},w))}},{key:"_checkInvalidateOnUpdate",value:function(){if("number"==typeof this._invalidateOnUpdateStartIndex){var e=this._invalidateOnUpdateStartIndex,t=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(e,t),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var e=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&Je(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=Ze(this._debounceResetIsScrollingCallback,e)}},{key:"_getEstimatedTotalHeight",value:function(){var e=this.props,t=e.cellCount,o=e.cellMeasurerCache,n=e.width,r=Math.max(1,Math.floor(n/o.defaultWidth));return this._positionCache.estimateTotalHeight(t,r,o.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var e=this.props,t=e.height,o=e.onScroll,n=this.state.scrollTop;this._onScrollMemoized!==n&&(o({clientHeight:t,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:n}),this._onScrollMemoized=n)}},{key:"_invokeOnCellsRenderedCallback",value:function(){this._startIndexMemoized===this._startIndex&&this._stopIndexMemoized===this._stopIndex||((0,this.props.onCellsRendered)({startIndex:this._startIndex,stopIndex:this._stopIndex}),this._startIndexMemoized=this._startIndex,this._stopIndexMemoized=this._stopIndex)}},{key:"_populatePositionCache",value:function(e,t){for(var o=this.props,n=o.cellMeasurerCache,r=o.cellPositioner,i=e;i<=t;i++){var l=r(i),s=l.left,a=l.top;this._positionCache.setPosition(i,s,a,n.getHeight(i))}}}],[{key:"getDerivedStateFromProps",value:function(e,t){return void 0!==e.scrollTop&&t.scrollTop!==e.scrollTop?{isScrolling:!0,scrollTop:e.scrollTop}:null}}])}();function Mt(){}ce(kt,"defaultProps",{autoHeight:!1,keyMapper:function(e){return e},onCellsRendered:Mt,onScroll:Mt,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:150,style:{},tabIndex:0,rowDirection:"ltr"}),fe(kt);var Lt=ie(function e(){var t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};te(this,e),ce(this,"_cellMeasurerCache",void 0),ce(this,"_columnIndexOffset",void 0),ce(this,"_rowIndexOffset",void 0),ce(this,"columnWidth",function(e){var o=e.index;t._cellMeasurerCache.columnWidth({index:o+t._columnIndexOffset})}),ce(this,"rowHeight",function(e){var o=e.index;t._cellMeasurerCache.rowHeight({index:o+t._rowIndexOffset})});var n=o.cellMeasurerCache,r=o.columnIndexOffset,i=void 0===r?0:r,l=o.rowIndexOffset,s=void 0===l?0:l;this._cellMeasurerCache=n,this._columnIndexOffset=i,this._rowIndexOffset=s},[{key:"clear",value:function(e,t){this._cellMeasurerCache.clear(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getHeight(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getWidth(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.has(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"set",value:function(e,t,o,n){this._cellMeasurerCache.set(e+this._rowIndexOffset,t+this._columnIndexOffset,o,n)}}]),Gt=["rowIndex"],At=["columnIndex","rowIndex"],Et=["columnIndex"],Ht=["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"];function Wt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Dt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(o),!0).forEach(function(t){ce(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Wt(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function jt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jt=function(){return!!e})()}var Ft=function(){function t(o,n){var r,i,l,s;te(this,t),i=this,s=[o,n],l=se(l=t),ce(r=le(i,jt()?Reflect.construct(l,s||[],se(i).constructor):l.apply(i,s)),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),ce(r,"_deferredInvalidateColumnIndex",null),ce(r,"_deferredInvalidateRowIndex",null),ce(r,"_bottomLeftGridRef",function(e){r._bottomLeftGrid=e}),ce(r,"_bottomRightGridRef",function(e){r._bottomRightGrid=e}),ce(r,"_cellRendererBottomLeftGrid",function(t){var o=t.rowIndex,n=Fe(t,Gt),i=r.props,l=i.cellRenderer,s=i.fixedRowCount;return o===i.rowCount-s?e.createElement("div",{key:n.key,style:Dt(Dt({},n.style),{},{height:20})}):l(Dt(Dt({},n),{},{parent:r,rowIndex:o+s}))}),ce(r,"_cellRendererBottomRightGrid",function(e){var t=e.columnIndex,o=e.rowIndex,n=Fe(e,At),i=r.props,l=i.cellRenderer,s=i.fixedColumnCount,a=i.fixedRowCount;return l(Dt(Dt({},n),{},{columnIndex:t+s,parent:r,rowIndex:o+a}))}),ce(r,"_cellRendererTopRightGrid",function(t){var o=t.columnIndex,n=Fe(t,Et),i=r.props,l=i.cellRenderer,s=i.columnCount,a=i.fixedColumnCount;return o===s-a?e.createElement("div",{key:n.key,style:Dt(Dt({},n.style),{},{width:20})}):l(Dt(Dt({},n),{},{columnIndex:o+a,parent:r}))}),ce(r,"_columnWidthRightGrid",function(e){var t=e.index,o=r.props,n=o.columnCount,i=o.fixedColumnCount,l=o.columnWidth,s=r.state,a=s.scrollbarSize;return s.showHorizontalScrollbar&&t===n-i?a:"function"==typeof l?l({index:t+i}):l}),ce(r,"_onScroll",function(e){var t=e.scrollLeft,o=e.scrollTop;r.setState({scrollLeft:t,scrollTop:o});var n=r.props.onScroll;n&&n(e)}),ce(r,"_onScrollbarPresenceChange",function(e){var t=e.horizontal,o=e.size,n=e.vertical,i=r.state,l=i.showHorizontalScrollbar,s=i.showVerticalScrollbar;if(t!==l||n!==s){r.setState({scrollbarSize:o,showHorizontalScrollbar:t,showVerticalScrollbar:n});var a=r.props.onScrollbarPresenceChange;"function"==typeof a&&a({horizontal:t,size:o,vertical:n})}}),ce(r,"_onScrollLeft",function(e){var t=e.scrollLeft;r._onScroll({scrollLeft:t,scrollTop:r.state.scrollTop})}),ce(r,"_onScrollTop",function(e){var t=e.scrollTop;r._onScroll({scrollTop:t,scrollLeft:r.state.scrollLeft})}),ce(r,"_rowHeightBottomGrid",function(e){var t=e.index,o=r.props,n=o.fixedRowCount,i=o.rowCount,l=o.rowHeight,s=r.state,a=s.scrollbarSize;return s.showVerticalScrollbar&&t===i-n?a:"function"==typeof l?l({index:t+n}):l}),ce(r,"_topLeftGridRef",function(e){r._topLeftGrid=e}),ce(r,"_topRightGridRef",function(e){r._topRightGrid=e});var a=o.deferredMeasurementCache,c=o.fixedColumnCount,d=o.fixedRowCount;return r._maybeCalculateCachedStyles(!0),a&&(r._deferredMeasurementCacheBottomLeftGrid=d>0?new Lt({cellMeasurerCache:a,columnIndexOffset:0,rowIndexOffset:d}):a,r._deferredMeasurementCacheBottomRightGrid=c>0||d>0?new Lt({cellMeasurerCache:a,columnIndexOffset:c,rowIndexOffset:d}):a,r._deferredMeasurementCacheTopRightGrid=c>0?new Lt({cellMeasurerCache:a,columnIndexOffset:c,rowIndexOffset:0}):a),r}return ae(t,e.PureComponent),ie(t,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,n=e.rowIndex,r=void 0===n?0:n;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,o):o,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,r):r}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,n=e.rowIndex,r=void 0===n?0:n,i=this.props,l=i.fixedColumnCount,s=i.fixedRowCount,a=Math.max(0,o-l),c=Math.max(0,r-s);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:c}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:a,rowIndex:c}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:r}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:a,rowIndex:r}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,o=e.scrollTop;if(t>0||o>0){var n={};t>0&&(n.scrollLeft=t),o>0&&(n.scrollTop=o),this.setState(n)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var t=this.props,o=t.onScroll,n=t.onSectionRendered;t.onScrollbarPresenceChange,t.scrollLeft;var r=t.scrollToColumn;t.scrollTop;var i=t.scrollToRow,l=Fe(t,Ht);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var s=this.state,a=s.scrollLeft,c=s.scrollTop;return e.createElement("div",{style:this._containerOuterStyle},e.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(l),this._renderTopRightGrid(Dt(Dt({},l),{},{onScroll:o,scrollLeft:a}))),e.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(Dt(Dt({},l),{},{onScroll:o,scrollTop:c})),this._renderBottomRightGrid(Dt(Dt({},l),{},{onScroll:o,onSectionRendered:n,scrollLeft:a,scrollToColumn:r,scrollToRow:i,scrollTop:c}))))}},{key:"_getBottomGridHeight",value:function(e){return e.height-this._getTopGridHeight(e)}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,o=e.columnWidth;if(null==this._leftGridWidth)if("function"==typeof o){for(var n=0,r=0;r<t;r++)n+=o({index:r});this._leftGridWidth=n}else this._leftGridWidth=o*t;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(e){return e.width-this._getLeftGridWidth(e)}},{key:"_getTopGridHeight",value:function(e){var t=e.fixedRowCount,o=e.rowHeight;if(null==this._topGridHeight)if("function"==typeof o){for(var n=0,r=0;r<t;r++)n+=o({index:r});this._topGridHeight=n}else this._topGridHeight=o*t;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(e){var t=this.props,o=t.columnWidth,n=t.enableFixedColumnScroll,r=t.enableFixedRowScroll,i=t.height,l=t.fixedColumnCount,s=t.fixedRowCount,a=t.rowHeight,c=t.style,d=t.styleBottomLeftGrid,u=t.styleBottomRightGrid,h=t.styleTopLeftGrid,f=t.styleTopRightGrid,p=t.width,m=e||i!==this._lastRenderedHeight||p!==this._lastRenderedWidth,g=e||o!==this._lastRenderedColumnWidth||l!==this._lastRenderedFixedColumnCount,v=e||s!==this._lastRenderedFixedRowCount||a!==this._lastRenderedRowHeight;(e||m||c!==this._lastRenderedStyle)&&(this._containerOuterStyle=Dt({height:i,overflow:"visible",width:p},c)),(e||m||v)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:p},this._containerBottomStyle={height:i-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:p}),(e||d!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=Dt({left:0,overflowX:"hidden",overflowY:n?"auto":"hidden",position:"absolute"},d)),(e||g||u!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=Dt({left:this._getLeftGridWidth(this.props),position:"absolute"},u)),(e||h!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=Dt({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},h)),(e||g||f!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=Dt({left:this._getLeftGridWidth(this.props),overflowX:r?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},f)),this._lastRenderedColumnWidth=o,this._lastRenderedFixedColumnCount=l,this._lastRenderedFixedRowCount=s,this._lastRenderedHeight=i,this._lastRenderedRowHeight=a,this._lastRenderedStyle=c,this._lastRenderedStyleBottomLeftGrid=d,this._lastRenderedStyleBottomRightGrid=u,this._lastRenderedStyleTopLeftGrid=h,this._lastRenderedStyleTopRightGrid=f,this._lastRenderedWidth=p}},{key:"_prepareForRender",value:function(){this._lastRenderedColumnWidth===this.props.columnWidth&&this._lastRenderedFixedColumnCount===this.props.fixedColumnCount||(this._leftGridWidth=null),this._lastRenderedFixedRowCount===this.props.fixedRowCount&&this._lastRenderedRowHeight===this.props.rowHeight||(this._topGridHeight=null),this._maybeCalculateCachedStyles(),this._lastRenderedColumnWidth=this.props.columnWidth,this._lastRenderedFixedColumnCount=this.props.fixedColumnCount,this._lastRenderedFixedRowCount=this.props.fixedRowCount,this._lastRenderedRowHeight=this.props.rowHeight}},{key:"_renderBottomLeftGrid",value:function(t){var o=t.enableFixedColumnScroll,n=t.fixedColumnCount,r=t.fixedRowCount,i=t.rowCount,l=t.hideBottomLeftGridScrollbar,s=this.state.showVerticalScrollbar;if(!n)return null;var a=s?1:0,c=this._getBottomGridHeight(t),d=this._getLeftGridWidth(t),u=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,h=l?d+u:d,f=e.createElement(nt,D({},t,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:n,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:c,onScroll:o?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,i-r)+a,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:h}));return l?e.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:Dt(Dt({},this._bottomLeftGridStyle),{},{height:c,width:d,overflowY:"hidden"})},f):f}},{key:"_renderBottomRightGrid",value:function(t){var o=t.columnCount,n=t.fixedColumnCount,r=t.fixedRowCount,i=t.rowCount,l=t.scrollToColumn,s=t.scrollToRow;return e.createElement(nt,D({},t,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,o-n),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(t),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,i-r),rowHeight:this._rowHeightBottomGrid,scrollToColumn:l-n,scrollToRow:s-r,style:this._bottomRightGridStyle,width:this._getRightGridWidth(t)}))}},{key:"_renderTopLeftGrid",value:function(t){var o=t.fixedColumnCount,n=t.fixedRowCount;return o&&n?e.createElement(nt,D({},t,{className:this.props.classNameTopLeftGrid,columnCount:o,height:this._getTopGridHeight(t),ref:this._topLeftGridRef,rowCount:n,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(t)})):null}},{key:"_renderTopRightGrid",value:function(t){var o=t.columnCount,n=t.enableFixedRowScroll,r=t.fixedColumnCount,i=t.fixedRowCount,l=t.scrollLeft,s=t.hideTopRightGridScrollbar,a=this.state,c=a.showHorizontalScrollbar,d=a.scrollbarSize;if(!i)return null;var u=c?1:0,h=this._getTopGridHeight(t),f=this._getRightGridWidth(t),p=c?d:0,m=h,g=this._topRightGridStyle;s&&(m=h+p,g=Dt(Dt({},this._topRightGridStyle),{},{left:0}));var v=e.createElement(nt,D({},t,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,o-r)+u,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:m,onScroll:n?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:i,scrollLeft:l,style:g,tabIndex:null,width:f}));return s?e.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:Dt(Dt({},this._topRightGridStyle),{},{height:h,width:f,overflowX:"hidden"})},v):v}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft&&e.scrollLeft>=0?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}])}();function Nt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Nt=function(){return!!e})()}ce(Ft,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1}),Ft.propTypes={},fe(Ft),(function(){function t(e,o){var n,r,i,l;return te(this,t),r=this,l=[e,o],i=se(i=t),(n=le(r,Nt()?Reflect.construct(i,l||[],se(r).constructor):i.apply(r,l))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},n._onScroll=n._onScroll.bind(n),n}return ae(t,e.PureComponent),ie(t,[{key:"render",value:function(){var e=this.props.children,t=this.state,o=t.clientHeight,n=t.clientWidth,r=t.scrollHeight,i=t.scrollLeft,l=t.scrollTop,s=t.scrollWidth;return e({clientHeight:o,clientWidth:n,onScroll:this._onScroll,scrollHeight:r,scrollLeft:i,scrollTop:l,scrollWidth:s})}},{key:"_onScroll",value:function(e){var t=e.clientHeight,o=e.clientWidth,n=e.scrollHeight,r=e.scrollLeft,i=e.scrollTop,l=e.scrollWidth;this.setState({clientHeight:t,clientWidth:o,scrollHeight:n,scrollLeft:r,scrollTop:i,scrollWidth:l})}}])}()).propTypes={};var Bt="ASC",Ut="DESC";function Vt(t){var o=t.sortDirection,n=W("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":o===Bt,"ReactVirtualized__Table__sortableHeaderIcon--DESC":o===Ut});return e.createElement("svg",{className:n,width:18,height:18,viewBox:"0 0 24 24"},o===Bt?e.createElement("path",{d:"M7 14l5-5 5 5z"}):e.createElement("path",{d:"M7 10l5 5 5-5z"}),e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function $t(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($t=function(){return!!e})()}Vt.propTypes={};var Kt=function(){function t(){return te(this,t),e=this,n=arguments,o=se(o=t),le(e,$t()?Reflect.construct(o,n||[],se(e).constructor):o.apply(e,n));var e,o,n}return ae(t,e.Component),ie(t)}();function qt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Xt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(o),!0).forEach(function(t){ce(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):qt(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function Yt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yt=function(){return!!e})()}ce(Kt,"defaultProps",{cellDataGetter:function(e){var t=e.dataKey,o=e.rowData;return"function"==typeof o.get?o.get(t):o[t]},cellRenderer:function(e){var t=e.cellData;return null==t?"":String(t)},defaultSortDirection:Bt,flexGrow:0,flexShrink:1,headerRenderer:function(t){var o=t.dataKey,n=t.label,r=t.sortBy,i=t.sortDirection,l=r===o,s=[e.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"==typeof n?n:null},n)];return l&&s.push(e.createElement(Vt,{key:"SortIndicator",sortDirection:i})),s},style:{}}),Kt.propTypes={};var Jt=function(){function t(e){var o,n,r,i;return te(this,t),n=this,i=[e],r=se(r=t),(o=le(n,Yt()?Reflect.construct(r,i||[],se(n).constructor):r.apply(n,i))).state={scrollbarWidth:0},o._createColumn=o._createColumn.bind(o),o._createRow=o._createRow.bind(o),o._onScroll=o._onScroll.bind(o),o._onSectionRendered=o._onSectionRendered.bind(o),o._setRef=o._setRef.bind(o),o._setGridElementRef=o._setGridElementRef.bind(o),o}return ae(t,e.PureComponent),ie(t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,o=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:o}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,n=e.rowIndex,r=void 0===n?0:n;this.Grid&&this.Grid.recomputeGridSize({rowIndex:r,columnIndex:o})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.GridElement){var e=this.GridElement,t=e.clientWidth||0;return(e.offsetWidth||0)-t}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var t=this,o=this.props,n=o.children,r=o.className,i=o.disableHeader,l=o.gridClassName,s=o.gridStyle,a=o.headerHeight,c=o.headerRowRenderer,d=o.height,u=o.id,h=o.noRowsRenderer,f=o.rowClassName,p=o.rowStyle,m=o.scrollToIndex,g=o.style,v=o.width,_=this.state.scrollbarWidth,S=i?d:d-a,y="function"==typeof f?f({index:-1}):f,w="function"==typeof p?p({index:-1}):p;return this._cachedColumnStyles=[],e.Children.toArray(n).forEach(function(e,o){var n=t._getFlexStyleForColumn(e,e.props.style||Kt.defaultProps.style);t._cachedColumnStyles[o]=Xt({overflow:"hidden"},n)}),e.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":e.Children.toArray(n).length,"aria-rowcount":this.props.rowCount,className:W("ReactVirtualized__Table",r),id:u,role:"grid",style:g},!i&&c({className:W("ReactVirtualized__Table__headerRow",y),columns:this._getHeaderColumns(),style:Xt({height:a,overflow:"hidden",paddingRight:_,width:v},w)}),e.createElement(nt,D({},this.props,{elementRef:this._setGridElementRef,"aria-readonly":null,autoContainerWidth:!0,className:W("ReactVirtualized__Table__Grid",l),cellRenderer:this._createRow,columnWidth:v,columnCount:1,height:S,id:void 0,noContentRenderer:h,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:_,scrollToRow:m,style:Xt(Xt({},s),{},{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(t){var o=t.column,n=t.columnIndex,r=t.isScrolling,i=t.parent,l=t.rowData,s=t.rowIndex,a=this.props.onColumnClick,c=o.props,d=c.cellDataGetter,u=c.cellRenderer,h=c.className,f=c.columnData,p=c.dataKey,m=c.id,g=u({cellData:d({columnData:f,dataKey:p,rowData:l}),columnData:f,columnIndex:n,dataKey:p,isScrolling:r,parent:i,rowData:l,rowIndex:s}),v=this._cachedColumnStyles[n],_="string"==typeof g?g:null;return e.createElement("div",{"aria-colindex":n+1,"aria-describedby":m,className:W("ReactVirtualized__Table__rowColumn",h),key:"Row"+s+"-Col"+n,onClick:function(e){a&&a({columnData:f,dataKey:p,event:e})},role:"gridcell",style:v,title:_},g)}},{key:"_createHeader",value:function(t){var o,n,r,i,l,s=t.column,a=t.index,c=this.props,d=c.headerClassName,u=c.headerStyle,h=c.onHeaderClick,f=c.sort,p=c.sortBy,m=c.sortDirection,g=s.props,v=g.columnData,_=g.dataKey,S=g.defaultSortDirection,y=g.disableSort,w=g.headerRenderer,C=g.id,x=g.label,R=!y&&f,b=W("ReactVirtualized__Table__headerColumn",d,s.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:R}),z=this._getFlexStyleForColumn(s,Xt(Xt({},u),s.props.headerStyle)),T=w({columnData:v,dataKey:_,disableSort:y,label:x,sortBy:p,sortDirection:m});if(R||h){var I=p!==_?S:m===Ut?Bt:Ut,P=function(e){R&&f({defaultSortDirection:S,event:e,sortBy:_,sortDirection:I}),h&&h({columnData:v,dataKey:_,event:e})};l=s.props["aria-label"]||x||_,i="none",r=0,o=P,n=function(e){"Enter"!==e.key&&" "!==e.key||P(e)}}return p===_&&(i=m===Bt?"ascending":"descending"),e.createElement("div",{"aria-label":l,"aria-sort":i,className:b,id:C,key:"Header-Col"+a,onClick:o,onKeyDown:n,role:"columnheader",style:z,tabIndex:r},T)}},{key:"_createRow",value:function(t){var o=this,n=t.rowIndex,r=t.isScrolling,i=t.key,l=t.parent,s=t.style,a=this.props,c=a.children,d=a.onRowClick,u=a.onRowDoubleClick,h=a.onRowRightClick,f=a.onRowMouseOver,p=a.onRowMouseOut,m=a.rowClassName,g=a.rowGetter,v=a.rowRenderer,_=a.rowStyle,S=this.state.scrollbarWidth,y="function"==typeof m?m({index:n}):m,w="function"==typeof _?_({index:n}):_,C=g({index:n}),x=e.Children.toArray(c).map(function(e,t){return o._createColumn({column:e,columnIndex:t,isScrolling:r,parent:l,rowData:C,rowIndex:n,scrollbarWidth:S})}),R=W("ReactVirtualized__Table__row",y),b=Xt(Xt({},s),{},{height:this._getRowHeight(n),overflow:"hidden",paddingRight:S},w);return v({className:R,columns:x,index:n,isScrolling:r,key:i,onRowClick:d,onRowDoubleClick:u,onRowRightClick:h,onRowMouseOver:f,onRowMouseOut:p,rowData:C,style:b})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),n=Xt(Xt({},t),{},{flex:o,msFlex:o,WebkitFlex:o});return e.props.maxWidth&&(n.maxWidth=e.props.maxWidth),e.props.minWidth&&(n.minWidth=e.props.minWidth),n}},{key:"_getHeaderColumns",value:function(){var t=this,o=this.props,n=o.children;return(o.disableHeader?[]:e.Children.toArray(n)).map(function(e,o){return t._createHeader({column:e,index:o})})}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return"function"==typeof t?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,o=e.scrollHeight,n=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:o,scrollTop:n})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,o=e.rowOverscanStopIndex,n=e.rowStartIndex,r=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:o,startIndex:n,stopIndex:r})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setGridElementRef",value:function(e){this.GridElement=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}])}();ce(Jt,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:rt,overscanRowCount:10,rowRenderer:function(t){var o=t.className,n=t.columns,r=t.index,i=t.key,l=t.onRowClick,s=t.onRowDoubleClick,a=t.onRowMouseOut,c=t.onRowMouseOver,d=t.onRowRightClick,u=t.rowData,h=t.style,f={"aria-rowindex":r+1};return(l||s||a||c||d)&&(f["aria-label"]="row",f.tabIndex=0,l&&(f.onClick=function(e){return l({event:e,index:r,rowData:u})}),s&&(f.onDoubleClick=function(e){return s({event:e,index:r,rowData:u})}),a&&(f.onMouseOut=function(e){return a({event:e,index:r,rowData:u})}),c&&(f.onMouseOver=function(e){return c({event:e,index:r,rowData:u})}),d&&(f.onContextMenu=function(e){return d({event:e,index:r,rowData:u})})),e.createElement("div",D({},f,{className:o,key:i,role:"row",style:h}),n)},headerRowRenderer:function(t){var o=t.className,n=t.columns,r=t.style;return e.createElement("div",{className:o,role:"row",style:r},n)},rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),Jt.propTypes={};var Zt=[],Qt=null,eo=null;function to(){eo&&(eo=null,document.body&&null!=Qt&&(document.body.style.pointerEvents=Qt),Qt=null)}function oo(){to(),Zt.forEach(function(e){return e.__resetIsScrolling()})}function no(e){e.currentTarget===window&&null==Qt&&document.body&&(Qt=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),function(){eo&&Je(eo);var e=0;Zt.forEach(function(t){e=Math.max(e,t.props.scrollingResetTimeInterval)}),eo=Ze(oo,e)}(),Zt.forEach(function(t){t.props.scrollElement===e.currentTarget&&t.__handleWindowScrollEvent()})}function ro(e,t){Zt.some(function(e){return e.props.scrollElement===t})||t.addEventListener("scroll",no),Zt.push(e)}function io(e,t){(Zt=Zt.filter(function(t){return t!==e})).length||(t.removeEventListener("scroll",no),eo&&(Je(eo),to()))}var lo=function(e){return e===window},so=function(e){return e.getBoundingClientRect()};function ao(e,t){if(e){if(lo(e)){var o=window,n=o.innerHeight,r=o.innerWidth;return{height:"number"==typeof n?n:0,width:"number"==typeof r?r:0}}return so(e)}return{height:t.serverHeight,width:t.serverWidth}}function co(e){return lo(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}function uo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function ho(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?uo(Object(o),!0).forEach(function(t){ce(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):uo(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function fo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(fo=function(){return!!e})()}var po=function(){return"undefined"!=typeof window?window:void 0},mo=function(){function t(){var o,n,r,i;te(this,t);for(var l=arguments.length,s=new Array(l),a=0;a<l;a++)s[a]=arguments[a];return n=this,r=t,i=[].concat(s),r=se(r),ce(o=le(n,fo()?Reflect.construct(r,i||[],se(n).constructor):r.apply(n,i)),"_window",po()),ce(o,"_isMounted",!1),ce(o,"_positionFromTop",0),ce(o,"_positionFromLeft",0),ce(o,"_detectElementResize",void 0),ce(o,"_child",void 0),ce(o,"_windowScrollerRef",e.createRef()),ce(o,"state",ho(ho({},ao(o.props.scrollElement,o.props)),{},{isScrolling:!1,scrollLeft:0,scrollTop:0})),ce(o,"_registerChild",function(e){!e||e instanceof Element||console.warn("WindowScroller registerChild expects to be passed Element or null"),o._child=e,o.updatePosition()}),ce(o,"_onChildScroll",function(e){var t=e.scrollTop;if(o.state.scrollTop!==t){var n=o.props.scrollElement;n&&("function"==typeof n.scrollTo?n.scrollTo(0,t+o._positionFromTop):n.scrollTop=t+o._positionFromTop)}}),ce(o,"_registerResizeListener",function(e){e===window?window.addEventListener("resize",o._onResize,!1):o._detectElementResize.addResizeListener(e,o._onResize)}),ce(o,"_unregisterResizeListener",function(e){e===window?window.removeEventListener("resize",o._onResize,!1):e&&o._detectElementResize.removeResizeListener(e,o._onResize)}),ce(o,"_onResize",function(){o.updatePosition()}),ce(o,"__handleWindowScrollEvent",function(){if(o._isMounted){var e=o.props.onScroll,t=o.props.scrollElement;if(t){var n=co(t),r=Math.max(0,n.left-o._positionFromLeft),i=Math.max(0,n.top-o._positionFromTop);o.setState({isScrolling:!0,scrollLeft:r,scrollTop:i}),e({scrollLeft:r,scrollTop:i})}}}),ce(o,"__resetIsScrolling",function(){o.setState({isScrolling:!1})}),o}return ae(t,e.PureComponent),ie(t,[{key:"updatePosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,t=this.props.onResize,o=this.state,n=o.height,r=o.width,i=this._child||this._windowScrollerRef.current;if(i instanceof Element&&e){var l=function(e,t){if(lo(t)&&document.documentElement){var o=document.documentElement,n=so(e),r=so(o);return{top:n.top-r.top,left:n.left-r.left}}var i=co(t),l=so(e),s=so(t);return{top:l.top+i.top-s.top,left:l.left+i.left-s.left}}(i,e);this._positionFromTop=l.top,this._positionFromLeft=l.left}var s=ao(e,this.props);n===s.height&&r===s.width||(this.setState({height:s.height,width:s.width}),t({height:s.height,width:s.width})),!0===this.props.updateScrollTopOnUpdatePosition&&(this.__handleWindowScrollEvent(),this.__resetIsScrolling())}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=_e(),this.updatePosition(e),e&&(ro(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var o=this.props.scrollElement,n=e.scrollElement;n!==o&&null!=n&&null!=o&&(this.updatePosition(o),io(this,n),ro(this,o),this._unregisterResizeListener(n),this._registerResizeListener(o))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(io(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var t=this.props.children,o=this.state,n=o.isScrolling,r=o.scrollTop,i=o.scrollLeft,l=o.height,s=o.width;return e.createElement("div",{ref:this._windowScrollerRef},t({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:l,isScrolling:n,scrollLeft:i,scrollTop:r,width:s}))}}])}();ce(mo,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:po(),serverHeight:0,serverWidth:0});const go="ReactVirtualizedDemo-flexContainer",vo="ReactVirtualizedDemo-tableRow",_o="ReactVirtualizedDemo-tableRowHover",So="ReactVirtualizedDemo-tableCell",yo="ReactVirtualizedDemo-noClick";class wo extends M.PureComponent{constructor(){super(...arguments),this.getRowClassName=({index:e})=>{const{onRowClick:t}=this.props;return L(vo,go,{[_o]:-1!==e&&null!=t})},this.cellRenderer=({cellData:e,dataKey:t,columnIndex:o,width:n})=>{const{columns:i,rowHeight:l,onRowClick:s}=this.props;let a=e,c={height:l,paddingRight:"2px",paddingTop:"0px",paddingBottom:"0px",minWidth:`${n}px`,maxWidth:`${n}px`};return"shortcut"===t?a=G(e):"description"===t&&(c={...c,fontSize:".75rem",display:"block",paddingTop:"4px",whiteSpace:"pre-line"}),r.jsx($,{component:"div",className:L(So,go,{[yo]:null==s}),variant:"body",style:c,align:null!=o&&i[o].numeric?"right":"left",children:a})},this.headerRenderer=({label:e,columnIndex:t,width:o})=>{const{headerHeight:n,columns:i}=this.props,l=i[t];return r.jsx($,{component:"div",className:L(So,go,yo),variant:"head",sx:{width:o,height:n,backgroundColor:e=>e.palette.grey[300]},align:l.numeric?"right":"left",children:r.jsx("span",{children:l.label})})}}static{this.defaultProps={headerHeight:40,rowHeight:48}}render(){const{columns:e,rowHeight:t,headerHeight:o,...n}=this.props;return r.jsx(Ce,{children:({height:i,width:l})=>r.jsx(Jt,{height:i,width:l,rowHeight:t,gridStyle:{direction:"inherit"},headerHeight:o,...n,rowClassName:this.getRowClassName,children:e.map(({dataKey:e,width:t,widthLess:o,...n},i)=>{const s=o?l-o:t;return r.jsx(Kt,{style:{flex:`1 1 ${s}px`},headerRenderer:e=>this.headerRenderer({...e,width:s,columnIndex:i}),className:go,cellDataGetter:({rowData:e,columnData:t,dataKey:o})=>e[o],cellRenderer:e=>this.cellRenderer({...e,width:s,columnIndex:i}),dataKey:e,width:s,...n},e)})})})}}const Co=ee(wo)(({theme:e})=>({"& .ReactVirtualized__Table__headerRow":{..."rtl"===e.direction&&{paddingLeft:"0 !important"},..."rtl"!==e.direction&&{paddingRight:void 0}},"& .ReactVirtualized__Table__Grid":{outline:"none"},[`& .${go}`]:{display:"flex",alignItems:"center",boxSizing:"border-box"},[`& .${vo}`]:{cursor:"pointer"},[`& .${_o}`]:{"&:hover:not([disabled])":{backgroundColor:e.palette.grey[200]}},[`& .${So}`]:{flex:1},[`& .${yo}`]:{cursor:"initial"}}));function xo(t){const{commands:o,...n}=t,[i,l]=e.useState(!1),[s,a]=e.useState(""),c=e.useMemo(()=>{let e=o.getAllCommands();i||(e=e.filter(e=>e.command.shortcut())),e.sort((e,t)=>e.command.label().localeCompare(t.command.label()));const t=[],n=e=>e.replace(/\n\n/g,"\n");for(let o=0;o<e.length;o++){const r=e[o].command,i=r.shortcut();if(Array.isArray(i)){const e=i;for(let o=0;o<e.length;o++)t.push({label:r.label(),description:n(r.description()),shortcut:e[o]})}else t.push({label:r.label(),description:n(r.description()),shortcut:r.shortcut()})}return t},[i,o]),[d,u]=e.useState(null);e.useEffect(()=>{import("./Cq8D_M0jeHLcnRjg.mjs").then(e=>{u(new e.default(c,{threshold:0,ignoreLocation:!0,keys:["label","description"]}))})},[c]);const[f,p]=e.useState(c),z=s.length>0&&0===f.length;return e.useEffect(()=>{d&&g.debounce(()=>{if(0===s.trim().length)return void p(c);const e=d.search(s.trim()),t=new Array(e.length);for(let o=0;o<e.length;o++)t[o]=e[o].item;p(t)},90)()},[d,s]),r.jsxs(v,{style:{height:440,width:"100%",display:"flex",flexDirection:"column"},...n,children:[r.jsxs(v,{sx:{display:"flex",alignItems:"center",justifyContent:"end",marginBottom:e=>e.spacing(2),color:e=>e.palette.text.secondary},children:[r.jsx(_,{InputProps:{sx:{backgroundImage:`linear-gradient(${h("#fff",C(5))}, ${h("#fff",C(5))})`},inputProps:{className:"input",autoFocus:!0,spellCheck:!1,placeholder:"Type to search key bindings",autoComplete:"off",sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(1)}},endAdornment:r.jsx(S,{sx:{opacity:s.length>0?1:0,display:s.length>0?"flex":"none"},position:"end",children:r.jsx(y,{"aria-label":"clear search",onClick:()=>a(""),edge:"end",children:r.jsx(w,{})})})},sx:{flex:"1 1 40%",marginRight:e=>e.spacing(1),"& .MuiOutlinedInput-notchedOutline":{borderColor:e=>z?`${e.palette.error.main} !important`:void 0},"& .MuiInputLabel-outlined":{color:e=>z?`${e.palette.error.main} !important`:void 0}},value:s,onChange:e=>{a(e.target.value)},onKeyDown:e=>{e.which===m.Escape&&s.length>0&&(a(""),e.stopPropagation(),e.preventDefault())},onContextMenu:e=>{e.stopPropagation()}}),r.jsx(x,{sx:{flex:"1 1 60%"},control:r.jsx(R,{checked:i,onChange:()=>l(!i)}),label:"Show commands without key bindings",labelPlacement:"start"})]}),r.jsx(v,{sx:{flex:"1 1 100%",borderRadius:e=>`${e.shape.borderRadius}px`,border:e=>`solid ${e.palette.divider} 1px`,paddingRight:"1px",overflow:"hidden","* .MuiTableCell-head":{background:e=>e.palette.background.paper,backgroundImage:`linear-gradient(${h("#fff",C(5))}, ${h("#fff",C(5))})`}},children:r.jsx(Co,{rowCount:f.length,rowGetter:e=>f[e.index],columns:[{width:180,label:"Command",dataKey:"label"},{width:260,label:"Key Binding",dataKey:"shortcut"},{width:240,label:"Description",dataKey:"description",widthLess:440}]})}),r.jsx(v,{sx:{display:"flex",flexShrink:"0",paddingLeft:e=>e.spacing(1),paddingTop:e=>e.spacing(1),paddingRight:e=>e.spacing(1),userSelect:"none",justifyContent:"flex-end"},children:r.jsx(b,{noWrap:!0,component:"div",sx:{color:e=>z?e.palette.error.main:e.palette.text.secondary},children:`${0===f.length?"No":f.length} shortcut key${1===f.length?"":"s"}${s.length>0?" found":""}`})})]})}const Ro=e=>{const{title:t="Shortcut Keys",commands:o,sx:n,...i}=e;return r.jsx(f,{isModal:!0,onKeyDown:e=>{e.keyCode===m.F1&&e.preventDefault()},sx:{width:"780px",...n},title:t,autoFocusSel:".input",...i,children:r.jsx(p,{dividers:!0,children:r.jsx(xo,{commands:o,sx:{marginBottom:"8px"}})})})};export{Ro as default};
|