pi-outpost 0.45.0 → 0.47.0

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.
Files changed (103) hide show
  1. package/dist/contract/validate-structured-exchange.mjs +1 -1
  2. package/dist/pi-outpost-tools.mjs +1184 -470
  3. package/dist/pi-outpost.mjs +1719 -989
  4. package/dist/pi-outpost.sea.mjs +2 -2
  5. package/dist/sea-prep.blob +2 -2
  6. package/dist/skills/README.md +2 -2
  7. package/dist/skills/drawio/SKILL.md +12 -4
  8. package/dist/web/assets/{CodeEditor-DScL08xD.js → CodeEditor-BDtggYQl.js} +2 -2
  9. package/dist/web/assets/{PdfViewer-BCG92w49.js → PdfViewer-DhNNDuTB.js} +2 -2
  10. package/dist/web/assets/{abnfDiagram-WEYOIA3C-CDtRhqYU.js → abnfDiagram-WEYOIA3C-Dj3mV5cD.js} +1 -1
  11. package/dist/web/assets/{architecture-WOLXFQ4H-WBxUhvZg.js → architecture-WOLXFQ4H-DfIm6qJp.js} +1 -1
  12. package/dist/web/assets/{architectureDiagram-ZHVYKT53-D0dxQA-6.js → architectureDiagram-ZHVYKT53-DesvpuZO.js} +1 -1
  13. package/dist/web/assets/{blockDiagram-RJAE7QA3-BZwrQncg.js → blockDiagram-RJAE7QA3-DZKYWTVT.js} +1 -1
  14. package/dist/web/assets/{c4Diagram-XDPPPE54-BFNhLOS6.js → c4Diagram-XDPPPE54-BJ5QJyKU.js} +1 -1
  15. package/dist/web/assets/channel-CUIl51BP.js +1 -0
  16. package/dist/web/assets/{chunk-2E7WHVMD-CFMVvG35.js → chunk-2E7WHVMD-Ccal2EZV.js} +1 -1
  17. package/dist/web/assets/{chunk-4EMNKR2T-DNBJpWHa.js → chunk-4EMNKR2T-C1Ha7kZs.js} +1 -1
  18. package/dist/web/assets/{chunk-55XCU76K-m2_BGKXB.js → chunk-55XCU76K-D_RFo85h.js} +1 -1
  19. package/dist/web/assets/{chunk-7S6XSTFO-D5_WrDs1.js → chunk-7S6XSTFO-CbKG2whf.js} +1 -1
  20. package/dist/web/assets/{chunk-AQDTSKZB-ByVyf9Oz.js → chunk-AQDTSKZB-CV0pL9Ub.js} +1 -1
  21. package/dist/web/assets/{chunk-DSNLSHJZ-B3rs2TgX.js → chunk-DSNLSHJZ-jssKwfJs.js} +3 -3
  22. package/dist/web/assets/{chunk-HAGFOTED-Bguuewak.js → chunk-HAGFOTED-sbG-wLaw.js} +1 -1
  23. package/dist/web/assets/{chunk-HNE4Q36P-REv0b_Rl.js → chunk-HNE4Q36P-NQL5pc-1.js} +1 -1
  24. package/dist/web/assets/{chunk-NQOKRVIF-DlDs8eVX.js → chunk-NQOKRVIF-DS1Ro1wE.js} +1 -1
  25. package/dist/web/assets/{chunk-UHW7PFBP-QlYb9NYX.js → chunk-UHW7PFBP-DNdFaZ7_.js} +1 -1
  26. package/dist/web/assets/{chunk-VQ5W62QI-3wY_Pnz-.js → chunk-VQ5W62QI-Cp11Ry80.js} +1 -1
  27. package/dist/web/assets/{chunk-WQQL4CDK-D6vlPfqg.js → chunk-WQQL4CDK-4DgGrfra.js} +1 -1
  28. package/dist/web/assets/{chunk-YZO67HFG-ChAMbH2u.js → chunk-YZO67HFG-DHP_xcqn.js} +1 -1
  29. package/dist/web/assets/{chunk-ZAUX2LTX-DJYveMYE.js → chunk-ZAUX2LTX-BQhpR1qI.js} +1 -1
  30. package/dist/web/assets/{chunk-ZCHMQSOR-DBVZsxVg.js → chunk-ZCHMQSOR-B9AtuyJ5.js} +1 -1
  31. package/dist/web/assets/{classDiagram-v2-4MYWR3UA-Bof6Wqvc.js → classDiagram-v2-4MYWR3UA-npGdzbo2.js} +1 -1
  32. package/dist/web/assets/conversationExport-DEc6uAKc.js +71 -0
  33. package/dist/web/assets/{cynefin-EF2NZ3EQ-D0dmmCqE.js → cynefin-EF2NZ3EQ-CeID8gB9.js} +1 -1
  34. package/dist/web/assets/{cynefinDiagram-WF24UDRP-jndeFZAh.js → cynefinDiagram-WF24UDRP-CyVndM-S.js} +1 -1
  35. package/dist/web/assets/{dagre-NK4GIZVX-B46rWONw.js → dagre-NK4GIZVX-u5v6sCf_.js} +1 -1
  36. package/dist/web/assets/{diagram-CBK3MWTC-DQucq1rH.js → diagram-CBK3MWTC-BmhxD9xj.js} +1 -1
  37. package/dist/web/assets/{diagram-I5XIIV2D-DM6H3IeP.js → diagram-I5XIIV2D-UsxMIhbs.js} +1 -1
  38. package/dist/web/assets/{diagram-ODIL2UCW-DSizZptj.js → diagram-ODIL2UCW-CEfcCXCE.js} +1 -1
  39. package/dist/web/assets/{diagram-PFBEJUXE-fpzY_PMW.js → diagram-PFBEJUXE-MUYDhKrk.js} +1 -1
  40. package/dist/web/assets/{diagram-RJA3I4VV-BpBj2ZDY.js → diagram-RJA3I4VV-B71trYQk.js} +1 -1
  41. package/dist/web/assets/{diagram-TYUNFSNR-Dfx0us8Y.js → diagram-TYUNFSNR-DLmu4STH.js} +1 -1
  42. package/dist/web/assets/{dist-CdOp4qX1.js → dist-BEPahcQA.js} +1 -1
  43. package/dist/web/assets/{dist-Cm0YAQW3.js → dist-BkUWIcY9.js} +1 -1
  44. package/dist/web/assets/{dist-ek5oj5g6.js → dist-C1HBbT14.js} +1 -1
  45. package/dist/web/assets/{dist-C71gHEdU.js → dist-D3i5wAL2.js} +1 -1
  46. package/dist/web/assets/{dist-DuB-TAXo.js → dist-Ded9gHFg.js} +1 -1
  47. package/dist/web/assets/{dist-Dab98uwr.js → dist-DteV7VmN.js} +1 -1
  48. package/dist/web/assets/{dist-BRfLEvQs.js → dist-HCk5OgEt.js} +1 -1
  49. package/dist/web/assets/{docxExport-DZsmBVpG.js → docxExport-CV6kgsFt.js} +2 -2
  50. package/dist/web/assets/{ebnfDiagram-V4P3TTPT-CULqRtaP.js → ebnfDiagram-V4P3TTPT-B-6iPoQV.js} +1 -1
  51. package/dist/web/assets/{elk-QONTBCTQ-DDqQn-xG.js → elk-QONTBCTQ-CgqtV9Q_.js} +1 -1
  52. package/dist/web/assets/{erDiagram-KYQIGQAA-DE-crht8.js → erDiagram-KYQIGQAA-Cw9vK90c.js} +1 -1
  53. package/dist/web/assets/{eventmodeling-K75KTNOO-1SEWpiCE.js → eventmodeling-K75KTNOO-CHf1CFNW.js} +1 -1
  54. package/dist/web/assets/flowDiagram-IUGLLWBU-CH37AGFB.js +1 -0
  55. package/dist/web/assets/{ganttDiagram-R7GPNTJY-DSYOJbLs.js → ganttDiagram-R7GPNTJY-Dmj5wUxd.js} +1 -1
  56. package/dist/web/assets/{gitGraph-VSP46ZUC-DNWCkl3N.js → gitGraph-VSP46ZUC-CVvcUdjc.js} +1 -1
  57. package/dist/web/assets/{gitGraphDiagram-PDYL7XHY-CkBOylFC.js → gitGraphDiagram-PDYL7XHY-nVk22Ly7.js} +1 -1
  58. package/dist/web/assets/{index-DyhX4vzm.js → index-CeNyPy6Z.js} +310 -91
  59. package/dist/web/assets/index-m1s7LEHb.css +2 -0
  60. package/dist/web/assets/{info-OHQRW6UA-DZLo8j-J.js → info-OHQRW6UA-DwbjPahb.js} +1 -1
  61. package/dist/web/assets/{infoDiagram-MVDRKAX5-D-2ZSupm.js → infoDiagram-MVDRKAX5-lG6oGkFR.js} +1 -1
  62. package/dist/web/assets/{ishikawaDiagram-HPEHV2GE-CLrik0kB.js → ishikawaDiagram-HPEHV2GE-bhfMR94X.js} +1 -1
  63. package/dist/web/assets/{journeyDiagram-BOSHW7O7-CuyAWV-4.js → journeyDiagram-BOSHW7O7-C1-Ob4It.js} +1 -1
  64. package/dist/web/assets/{kanban-definition-FNSA4HC5-B2B1h8kE.js → kanban-definition-FNSA4HC5-DsXvcwK6.js} +1 -1
  65. package/dist/web/assets/{line-BQxlSu91.js → line-BqzYaALl.js} +1 -1
  66. package/dist/web/assets/{loadReferencedImage-C_UPJ3mE.js → loadReferencedImage-BVgIqRqX.js} +1 -1
  67. package/dist/web/assets/{mermaid-parser.core-DnjLN4bv.js → mermaid-parser.core-BzsUDPGk.js} +3 -3
  68. package/dist/web/assets/{mermaid.core-BKhoXFOd.js → mermaid.core-CIbJ01zL.js} +4 -4
  69. package/dist/web/assets/{mermaidToImage-B5d3JFJq.js → mermaidToImage-D72DvwWr.js} +4 -4
  70. package/dist/web/assets/{mindmap-definition-6OY57UG3-B0MUvVTB.js → mindmap-definition-6OY57UG3-CySroEda.js} +1 -1
  71. package/dist/web/assets/{packet-JDAUHWVQ-DAYWhrFA.js → packet-JDAUHWVQ-Djyhf31P.js} +1 -1
  72. package/dist/web/assets/{pdf-QxpddrQt.js → pdf-w-5-V5y9.js} +1 -1
  73. package/dist/web/assets/{pegDiagram-ECIUJNBX-BovEEioN.js → pegDiagram-ECIUJNBX-DjvY7oE9.js} +1 -1
  74. package/dist/web/assets/{pie-XZMESJXO-CXm4hROe.js → pie-XZMESJXO-CN90RHc2.js} +1 -1
  75. package/dist/web/assets/{pieDiagram-GNMPY74T-zAt-ronp.js → pieDiagram-GNMPY74T-Dpg4VK83.js} +1 -1
  76. package/dist/web/assets/{quadrantDiagram-D57K4MC3-DD6gVWLI.js → quadrantDiagram-D57K4MC3-B3QmHVxs.js} +1 -1
  77. package/dist/web/assets/{radar-ABXABTNO-CX9vnZE8.js → radar-ABXABTNO-Cx0tAsqB.js} +1 -1
  78. package/dist/web/assets/{railroad-I3PHUGI6-DkZJw3Kq.js → railroad-I3PHUGI6-CWKNhtID.js} +1 -1
  79. package/dist/web/assets/{railroad-abnf-LNEFI6M7-Df5H7zaX.js → railroad-abnf-LNEFI6M7-DKvcEeIf.js} +1 -1
  80. package/dist/web/assets/{railroad-ebnf-DWYD2UWJ-DtMyA7PD.js → railroad-ebnf-DWYD2UWJ-XYMXgt7o.js} +1 -1
  81. package/dist/web/assets/{railroad-peg-JR7BVNR7-EHQ8dXoM.js → railroad-peg-JR7BVNR7-DNyJRp4y.js} +1 -1
  82. package/dist/web/assets/{railroadDiagram-Y72NRBL7-CYwTGf8c.js → railroadDiagram-Y72NRBL7-D2P4MUSZ.js} +1 -1
  83. package/dist/web/assets/{requirementDiagram-EQYSW5RA-DYesZ7_S.js → requirementDiagram-EQYSW5RA-B4BtrrV8.js} +1 -1
  84. package/dist/web/assets/{sankeyDiagram-SY24JHO5-BNbhwAoN.js → sankeyDiagram-SY24JHO5-6LafRW7K.js} +1 -1
  85. package/dist/web/assets/{sequenceDiagram-BLEHNHQU-DZMV2BnR.js → sequenceDiagram-BLEHNHQU-ekEpnVsg.js} +1 -1
  86. package/dist/web/assets/{stateDiagram-v2-A6IESKWZ-DJV9fjKn.js → stateDiagram-v2-A6IESKWZ-DEYl0pAs.js} +1 -1
  87. package/dist/web/assets/{swimlanes-B3ENRKFQ-Cn0Xjw21.js → swimlanes-B3ENRKFQ-B2bjC8Zx.js} +1 -1
  88. package/dist/web/assets/swimlanesDiagram-AYQRV4AK-RoMCfGcC.js +8 -0
  89. package/dist/web/assets/{timeline-definition-JXYKGLGB-TKNDvdR3.js → timeline-definition-JXYKGLGB-9tQ1DYd2.js} +1 -1
  90. package/dist/web/assets/{treeView-D4JQ5SDB-D-kXzU-7.js → treeView-D4JQ5SDB-1uUVFCq3.js} +1 -1
  91. package/dist/web/assets/{treemap-SAJKECNS-kfOFBX69.js → treemap-SAJKECNS-BVofxWge.js} +1 -1
  92. package/dist/web/assets/{usecaseDiagram-WPOLBNNX-wr_RVErP.js → usecaseDiagram-WPOLBNNX-GtuqVg4S.js} +1 -1
  93. package/dist/web/assets/{vennDiagram-Q3Y3IDCW-DjYjzmE0.js → vennDiagram-Q3Y3IDCW-Be5IvYZC.js} +1 -1
  94. package/dist/web/assets/{wardley-7MLQ67FV-DXRVYxba.js → wardley-7MLQ67FV-yaELdUJI.js} +1 -1
  95. package/dist/web/assets/{wardleyDiagram-IVAIDKWA-CjkG_WGZ.js → wardleyDiagram-IVAIDKWA-DYKdokCV.js} +1 -1
  96. package/dist/web/assets/{xychartDiagram-4URNHDU4-BmqrPYKm.js → xychartDiagram-4URNHDU4-B7bvwXaN.js} +1 -1
  97. package/dist/web/index.html +2 -2
  98. package/package.json +1 -1
  99. package/dist/web/assets/channel-BTON_fFR.js +0 -1
  100. package/dist/web/assets/conversationExport-DHYmlLaN.js +0 -71
  101. package/dist/web/assets/flowDiagram-IUGLLWBU-DX1p0mjx.js +0 -1
  102. package/dist/web/assets/index-DqQ_v17r.css +0 -2
  103. package/dist/web/assets/swimlanesDiagram-AYQRV4AK-BDNJvcfp.js +0 -8
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-BKhoXFOd.js","assets/rolldown-runtime-COiEfhsA.js","assets/index-DyhX4vzm.js","assets/index-DqQ_v17r.css","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-BWF7jMDv.js","assets/chunk-DSNLSHJZ-B3rs2TgX.js","assets/chunk-7S6XSTFO-D5_WrDs1.js","assets/dist-CumnGVmJ.js","assets/chunk-YZO67HFG-ChAMbH2u.js","assets/chunk-AQDTSKZB-ByVyf9Oz.js","assets/chunk-DUW6YSOI-Dgx8z5s3.js","assets/chunk-UHW7PFBP-QlYb9NYX.js","assets/chunk-HAGFOTED-Bguuewak.js","assets/chunk-J5ZVWO5B-oDCd-gWO.js","assets/rough.esm-Dy-Kn_BL.js","assets/chunk-ZAUX2LTX-DJYveMYE.js","assets/chunk-WQQL4CDK-D6vlPfqg.js","assets/line-BQxlSu91.js","assets/path-fybaL0A-.js","assets/array-BifhSqXX.js","assets/chunk-HNE4Q36P-REv0b_Rl.js"])))=>i.map(i=>d[i]);
2
- import{n as e,r as t}from"./rolldown-runtime-COiEfhsA.js";import{E as n,T as r,_ as i,a,h as o,j as s,o as c,p as l}from"./index-DyhX4vzm.js";var u=Object.create,d=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,m=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,g=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},_=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),v=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=p(t),a=0,o=i.length,s;a<o;a++)s=i[a],!h.call(e,s)&&s!==n&&d(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=f(t,s))||r.enumerable});return e},y=(e,t,n)=>(n=e==null?{}:u(m(e)),v(t||!e||!e.__esModule||!h.call(e,`default`)?d(n,`default`,{value:e,enumerable:!0}):n,e)),b=(e=>t===void 0?typeof Proxy<`u`?new Proxy(e,{get:(e,n)=>(t===void 0?e:t)[n]}):e:t)(function(e){if(t!==void 0)return t.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});function x(e){"@babel/helpers - typeof";return x=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},x(e)}function S(e,t){if(x(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(x(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function C(e){var t=S(e,`string`);return x(t)==`symbol`?t:t+``}function w(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var T=class{constructor(e){w(this,`rootKey`,void 0),this.rootKey=e}get writtenAs(){}},E=Object.seal({}),D=class extends T{constructor(e){super(e),w(this,`root`,void 0),this.root=[]}prepForXml(e){e.stack.push(this);let t=this.root.flatMap(t=>{if(t instanceof T){let n=t.writtenAs;return n?n.map(t=>t.prepForXml(e)):t.prepForXml(e)}return t}).filter(e=>e!==void 0);return e.stack.pop(),{[this.rootKey]:t.length?t.length===1&&t[0]?._attr?t[0]:t:E}}addChildElement(e){return this.root.push(e),this}},O=class extends D{constructor(e,t){super(e),w(this,`includeIfEmpty`,void 0),this.includeIfEmpty=t}prepForXml(e){let t=super.prepForXml(e);return this.includeIfEmpty||t&&(typeof t[this.rootKey]!=`object`||Object.keys(t[this.rootKey]).length)?t:void 0}};function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?k(Object(n),!0).forEach(function(t){w(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var j=class extends T{constructor(e){super(`_attr`),w(this,`root`,void 0),w(this,`xmlKeys`,void 0),this.root=e}prepForXml(e){let t={};return Object.entries(this.root).forEach(([e,n])=>{if(n!==void 0){let r=this.xmlKeys&&this.xmlKeys[e]||e;t[r]=n}}),{_attr:t}}},M=class extends T{constructor(e){super(`_attr`),w(this,`root`,void 0),this.root=e}prepForXml(e){return{_attr:Object.values(this.root).filter(({value:e})=>e!==void 0).reduce((e,{key:t,value:n})=>A(A({},e),{},{[t]:n}),{})}}},N=class extends j{constructor(...e){super(...e),w(this,`xmlKeys`,{val:`w:val`,color:`w:color`,fill:`w:fill`,space:`w:space`,sz:`w:sz`,type:`w:type`,rsidR:`w:rsidR`,rsidRPr:`w:rsidRPr`,rsidSect:`w:rsidSect`,w:`w:w`,h:`w:h`,top:`w:top`,right:`w:right`,bottom:`w:bottom`,left:`w:left`,header:`w:header`,footer:`w:footer`,gutter:`w:gutter`,linePitch:`w:linePitch`,pos:`w:pos`})}},P=_(((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}t.exports=s,t.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else for(var l=c.length,u=g(c,l),n=0;n<l;++n)r(u[n],this,t);return!0};function d(e,t,n,r){var i,o,s;if(l(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),o=e._events),s=o[t]),s===void 0)s=o[t]=n,++e._eventsCount;else if(typeof s==`function`?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=u(e),i>0&&s.length>i&&!s.warned){s.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+s.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=s.length,a(c)}return e}s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():_(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(r=0;r<i.length;++r)a=i[r],a!==`removeListener`&&this.removeAllListeners(a);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?v(i):g(i,i.length)}s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h;function h(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function g(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function v(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function y(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}x(e,t,a,{once:!0}),t!==`error`&&b(e,i,{once:!0})})}function b(e,t,n){typeof e.on==`function`&&x(e,`error`,t,n)}function x(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener==`function`)e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e)}})),F=_(((e,t)=>{t.exports=typeof Object.create==`function`?function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),I,L=g((()=>{I=globalThis||self}));function R(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function z(){throw Error(`setTimeout has not been defined`)}function B(){throw Error(`clearTimeout has not been defined`)}function V(e){if(G===setTimeout)return setTimeout(e,0);if((G===z||!G)&&setTimeout)return G=setTimeout,setTimeout(e,0);try{return G(e,0)}catch{try{return G.call(null,e,0)}catch{return G.call(this,e,0)}}}function ee(e){if(ie===clearTimeout)return clearTimeout(e);if((ie===B||!ie)&&clearTimeout)return ie=clearTimeout,clearTimeout(e);try{return ie(e)}catch{try{return ie.call(null,e)}catch{return ie.call(this,e)}}}function H(){ae&&oe&&(ae=!1,oe.length?K=oe.concat(K):se=-1,K.length&&te())}function te(){if(!ae){var e=V(H);ae=!0;for(var t=K.length;t;){for(oe=K,K=[];++se<t;)oe&&oe[se].run();se=-1,t=K.length}oe=null,ae=!1,ee(e)}}function ne(e,t){this.fun=e,this.array=t}function U(){}var re,W,G,ie,K,ae,oe,se,ce,q,le=g((()=>{re={exports:{}},W=re.exports={},(function(){try{G=typeof setTimeout==`function`?setTimeout:z}catch{G=z}try{ie=typeof clearTimeout==`function`?clearTimeout:B}catch{ie=B}})(),K=[],ae=!1,se=-1,W.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];K.push(new ne(e,t)),K.length===1&&!ae&&V(te)},ne.prototype.run=function(){this.fun.apply(null,this.array)},W.title=`browser`,W.browser=!0,W.env={},W.argv=[],W.version=``,W.versions={},W.on=U,W.addListener=U,W.once=U,W.off=U,W.removeListener=U,W.removeAllListeners=U,W.emit=U,W.prependListener=U,W.prependOnceListener=U,W.listeners=function(e){return[]},W.binding=function(e){throw Error(`process.binding is not supported`)},W.cwd=function(){return`/`},W.chdir=function(e){throw Error(`process.chdir is not supported`)},W.umask=function(){return 0},ce=re.exports,q=R(ce)})),ue=_(((e,t)=>{t.exports=P().EventEmitter})),de=_((e=>{e.byteLength=c,e.toByteArray=u,e.fromByteArray=p;for(var t=[],n=[],r=typeof Uint8Array<`u`?Uint8Array:Array,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,a=0,o=i.length;a<o;++a)t[a]=i[a],n[i.charCodeAt(a)]=a;n[45]=62,n[95]=63;function s(e){var t=e.length;if(t%4>0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function c(e){var t=s(e),n=t[0],r=t[1];return(n+r)*3/4-r}function l(e,t,n){return(t+n)*3/4-n}function u(e){for(var t,i=s(e),a=i[0],o=i[1],c=new r(l(e,a,o)),u=0,d=o>0?a-4:a,f=0;f<d;f+=4)t=n[e.charCodeAt(f)]<<18|n[e.charCodeAt(f+1)]<<12|n[e.charCodeAt(f+2)]<<6|n[e.charCodeAt(f+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=n[e.charCodeAt(f)]<<2|n[e.charCodeAt(f+1)]>>4,c[u++]=t&255),o===1&&(t=n[e.charCodeAt(f)]<<10|n[e.charCodeAt(f+1)]<<4|n[e.charCodeAt(f+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function d(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[e&63]}function f(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(d(r));return i.join(``)}function p(e){for(var n,r=e.length,i=r%3,a=[],o=16383,s=0,c=r-i;s<c;s+=o)a.push(f(e,s,s+o>c?c:s+o));return i===1?(n=e[r-1],a.push(t[n>>2]+t[n<<4&63]+`==`)):i===2&&(n=(e[r-2]<<8)+e[r-1],a.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+`=`)),a.join(``)}})),fe=_((e=>{e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else if(a===c)return o?NaN:(p?-1:1)*(1/0);else o+=2**r,a-=l;return(p?-1:1)*o*2**(a-r)},e.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,d=u>>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=+(t<0||t===0&&1/t<0);for(t=Math.abs(t),isNaN(t)||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128}})),pe=_((e=>{var t=de(),n=fe(),r=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=s,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=a(),!s.TYPED_ARRAY_SUPPORT&&typeof console<`u`&&typeof console.error==`function`&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(e){if(e>i)throw RangeError(`The value "`+e+`" is invalid for option "size"`);var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return d(e)}return c(e,t,n)}s.poolSize=8192;function c(e,t,n){if(typeof e==`string`)return f(e,t);if(ArrayBuffer.isView(e))return m(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(G(e,ArrayBuffer)||e&&G(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<`u`&&(G(e,SharedArrayBuffer)||e&&G(e.buffer,SharedArrayBuffer)))return h(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);var r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return s.from(r,t,n);var i=g(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return s.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}s.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function u(e,t,n){return l(e),e<=0||t===void 0?o(e):typeof n==`string`?o(e).fill(t,n):o(e).fill(t)}s.alloc=function(e,t,n){return u(e,t,n)};function d(e){return l(e),o(e<0?0:_(e)|0)}s.allocUnsafe=function(e){return d(e)},s.allocUnsafeSlow=function(e){return d(e)};function f(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!s.isEncoding(t))throw TypeError(`Unknown encoding: `+t);var n=y(e,t)|0,r=o(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function p(e){for(var t=e.length<0?0:_(e.length)|0,n=o(t),r=0;r<t;r+=1)n[r]=e[r]&255;return n}function m(e){if(G(e,Uint8Array)){var t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(e)}function h(e,t,n){if(t<0||e.byteLength<t)throw RangeError(`"offset" is outside of buffer bounds`);if(e.byteLength<t+(n||0))throw RangeError(`"length" is outside of buffer bounds`);var r=t===void 0&&n===void 0?new Uint8Array(e):n===void 0?new Uint8Array(e,t):new Uint8Array(e,t,n);return Object.setPrototypeOf(r,s.prototype),r}function g(e){if(s.isBuffer(e)){var t=_(e.length)|0,n=o(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!=`number`||ie(e.length)?o(0):p(e);if(e.type===`Buffer`&&Array.isArray(e.data))return p(e.data)}function _(e){if(e>=i)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+i.toString(16)+` bytes`);return e|0}function v(e){return+e!=e&&(e=0),s.alloc(+e)}s.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==s.prototype},s.compare=function(e,t){if(G(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),G(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},s.isEncoding=function(e){switch(String(e).toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`latin1`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw TypeError(`"list" argument must be an Array of Buffers`);if(e.length===0)return s.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=s.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(G(a,Uint8Array))i+a.length>r.length?s.from(a).copy(r,i):Uint8Array.prototype.set.call(r,a,i);else if(s.isBuffer(a))a.copy(r,i);else throw TypeError(`"list" argument must be an Array of Buffers`);i+=a.length}return r};function y(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||G(e,ArrayBuffer))return e.byteLength;if(typeof e!=`string`)throw TypeError(`The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type `+typeof e);var n=e.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;for(var i=!1;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return te(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return re(e).length;default:if(i)return r?-1:te(e).length;t=(``+t).toLowerCase(),i=!0}}s.byteLength=y;function b(e,t,n){var r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return F(this,t,n);case`utf8`:case`utf-8`:return A(this,t,n);case`ascii`:return N(this,t,n);case`latin1`:case`binary`:return P(this,t,n);case`base64`:return k(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return I(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}s.prototype._isBuffer=!0;function x(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(var t=0;t<e;t+=2)x(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError(`Buffer size must be a multiple of 32-bits`);for(var t=0;t<e;t+=4)x(this,t,t+3),x(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError(`Buffer size must be a multiple of 64-bits`);for(var t=0;t<e;t+=8)x(this,t,t+7),x(this,t+1,t+6),x(this,t+2,t+5),x(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return e===0?``:arguments.length===0?A(this,0,e):b.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError(`Argument must be a Buffer`);return this===e||s.compare(this,e)===0},s.prototype.inspect=function(){var t=``,n=e.INSPECT_MAX_BYTES;return t=this.toString(`hex`,0,n).replace(/(.{2})/g,`$1 `).trim(),this.length>n&&(t+=` ... `),`<Buffer `+t+`>`},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(G(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,o=n-t,c=Math.min(a,o),l=this.slice(r,i),u=e.slice(t,n),d=0;d<c;++d)if(l[d]!==u[d]){a=l[d],o=u[d];break}return a<o?-1:+(o<a)};function S(e,t,n,r,i){if(e.length===0)return-1;if(typeof n==`string`?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,ie(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(i)n=0;else return-1}if(typeof t==`string`&&(t=s.from(t,r)),s.isBuffer(t))return t.length===0?-1:C(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof Uint8Array.prototype.indexOf==`function`?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):C(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function C(e,t,n,r,i){var a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}var l;if(i){var u=-1;for(l=n;l<o;l++)if(c(e,l)===c(t,u===-1?0:l-u)){if(u===-1&&(u=l),l-u+1===s)return u*a}else u!==-1&&(l-=l-u),u=-1}else for(n+s>o&&(n=o-s),l=n;l>=0;l--){for(var d=!0,f=0;f<s;f++)if(c(e,l+f)!==c(t,f)){d=!1;break}if(d)return l}return-1}s.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},s.prototype.indexOf=function(e,t,n){return S(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return S(this,e,t,n,!1)};function w(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var a=t.length;r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(o*2,2),16);if(ie(s))return o;e[n+o]=s}return o}function T(e,t,n,r){return W(te(t,e.length-n),e,n,r)}function E(e,t,n,r){return W(ne(t),e,n,r)}function D(e,t,n,r){return W(re(t),e,n,r)}function O(e,t,n,r){return W(U(t,e.length-n),e,n,r)}s.prototype.write=function(e,t,n,r){if(t===void 0)r=`utf8`,n=this.length,t=0;else if(n===void 0&&typeof t==`string`)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);var i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;for(var a=!1;;)switch(r){case`hex`:return w(this,e,t,n);case`utf8`:case`utf-8`:return T(this,e,t,n);case`ascii`:case`latin1`:case`binary`:return E(this,e,t,n);case`base64`:return D(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return O(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,n,r){return n===0&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=n){var c,l,u,d;switch(s){case 1:a<128&&(o=a);break;case 2:c=e[i+1],(c&192)==128&&(d=(a&31)<<6|c&63,d>127&&(o=d));break;case 3:c=e[i+1],l=e[i+2],(c&192)==128&&(l&192)==128&&(d=(a&15)<<12|(c&63)<<6|l&63,d>2047&&(d<55296||d>57343)&&(o=d));break;case 4:c=e[i+1],l=e[i+2],u=e[i+3],(c&192)==128&&(l&192)==128&&(u&192)==128&&(d=(a&15)<<18|(c&63)<<12|(l&63)<<6|u&63,d>65535&&d<1114112&&(o=d))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|o&1023),r.push(o),i+=s}return M(r)}var j=4096;function M(e){var t=e.length;if(t<=j)return String.fromCharCode.apply(String,e);for(var n=``,r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=j));return n}function N(e,t,n){var r=``;n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]&127);return r}function P(e,t,n){var r=``;n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function F(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i=``,a=t;a<n;++a)i+=K[e[a]];return i}function I(e,t,n){for(var r=e.slice(t,n),i=``,a=0;a<r.length-1;a+=2)i+=String.fromCharCode(r[a]+r[a+1]*256);return i}s.prototype.slice=function(e,t){var n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,s.prototype),r};function L(e,t,n){if(e%1!=0||e<0)throw RangeError(`offset is not uint`);if(e+t>n)throw RangeError(`Trying to access beyond buffer length`)}s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=2**(8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=2**(8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||L(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),n.read(this,e,!1,52,8)};function R(e,t,n,r,i,a){if(!s.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||t<a)throw RangeError(`"value" argument is out of bounds`);if(n+r>e.length)throw RangeError(`Index out of range`)}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){var i=2**(8*n)-1;R(this,e,t,n,i,0)}var a=1,o=0;for(this[t]=e&255;++o<n&&(a*=256);)this[t+o]=e/a&255;return t+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){var i=2**(8*n)-1;R(this,e,t,n,i,0)}var a=n-1,o=1;for(this[t+a]=e&255;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,255,0),this[t]=e&255,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=2**(8*n-1);R(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=e&255;++a<n&&(o*=256);)e<0&&s===0&&this[t+a-1]!==0&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=2**(8*n-1);R(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=e&255;--a>=0&&(o*=256);)e<0&&s===0&&this[t+a+1]!==0&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function z(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function B(e,t,r,i,a){return t=+t,r>>>=0,a||z(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,i,23,4),r+4}s.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)};function V(e,t,r,i,a){return t=+t,r>>>=0,a||z(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,i,52,8),r+8}s.prototype.writeDoubleLE=function(e,t,n){return V(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return V(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r<n&&(r=n),r===n||e.length===0||this.length===0)return 0;if(t<0)throw RangeError(`targetStart out of bounds`);if(n<0||n>=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;return this===e&&typeof Uint8Array.prototype.copyWithin==`function`?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},s.prototype.fill=function(e,t,n,r){if(typeof e==`string`){if(typeof t==`string`?(r=t,t=0,n=this.length):typeof n==`string`&&(r=n,n=this.length),r!==void 0&&typeof r!=`string`)throw TypeError(`encoding must be a string`);if(typeof r==`string`&&!s.isEncoding(r))throw TypeError(`Unknown encoding: `+r);if(e.length===1){var i=e.charCodeAt(0);(r===`utf8`&&i<128||r===`latin1`)&&(e=i)}}else typeof e==`number`?e&=255:typeof e==`boolean`&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError(`Out of range index`);if(n<=t)return this;t>>>=0,n=n===void 0?this.length:n>>>0,e||=0;var a;if(typeof e==`number`)for(a=t;a<n;++a)this[a]=e;else{var o=s.isBuffer(e)?e:s.from(e,r),c=o.length;if(c===0)throw TypeError(`The value "`+e+`" is invalid for argument "value"`);for(a=0;a<n-t;++a)this[a+t]=o[a%c]}return this};var ee=/[^+/0-9A-Za-z-_]/g;function H(e){if(e=e.split(`=`)[0],e=e.trim().replace(ee,``),e.length<2)return``;for(;e.length%4!=0;)e+=`=`;return e}function te(e,t){t||=1/0;for(var n,r=e.length,i=null,a=[],o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319||o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function ne(e){for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function U(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function re(e){return t.toByteArray(H(e))}function W(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function G(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function ie(e){return e!==e}var K=(function(){for(var e=`0123456789abcdef`,t=Array(256),n=0;n<16;++n)for(var r=n*16,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t})()})),me=_(((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}})),he=_(((e,t)=>{var n=me();t.exports=function(){return n()&&!!Symbol.toStringTag}})),ge=_(((e,t)=>{t.exports=Object})),_e=_(((e,t)=>{t.exports=Error})),ve=_(((e,t)=>{t.exports=EvalError})),ye=_(((e,t)=>{t.exports=RangeError})),be=_(((e,t)=>{t.exports=ReferenceError})),xe=_(((e,t)=>{t.exports=SyntaxError})),Se=_(((e,t)=>{t.exports=TypeError})),Ce=_(((e,t)=>{t.exports=URIError})),we=_(((e,t)=>{t.exports=Math.abs})),Te=_(((e,t)=>{t.exports=Math.floor})),Ee=_(((e,t)=>{t.exports=Math.max})),De=_(((e,t)=>{t.exports=Math.min})),Oe=_(((e,t)=>{t.exports=Math.pow})),ke=_(((e,t)=>{t.exports=Math.round})),Ae=_(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),je=_(((e,t)=>{var n=Ae();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),Me=_(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),Ne=_(((e,t)=>{var n=Me();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),Pe=_(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),Fe=_(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=me();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),Ie=_(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),Le=_(((e,t)=>{t.exports=ge().getPrototypeOf||null})),Re=_(((e,t)=>{var n=Object.prototype.toString,r=Math.max,i=`[object Function]`,a=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},o=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},s=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||n.apply(t)!==i)throw TypeError(`Function.prototype.bind called on incompatible `+t);for(var c=o(arguments,1),l,u=function(){if(this instanceof l){var n=t.apply(this,a(c,arguments));return Object(n)===n?n:this}return t.apply(e,a(c,arguments))},d=r(0,t.length-c.length),f=[],p=0;p<d;p++)f[p]=`$`+p;if(l=Function(`binder`,`return function (`+s(f,`,`)+`){ return binder.apply(this,arguments); }`)(u),t.prototype){var m=function(){};m.prototype=t.prototype,l.prototype=new m,m.prototype=null}return l}})),ze=_(((e,t)=>{var n=Re();t.exports=Function.prototype.bind||n})),Be=_(((e,t)=>{t.exports=Function.prototype.call})),Ve=_(((e,t)=>{t.exports=Function.prototype.apply})),He=_(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply})),Ue=_(((e,t)=>{var n=ze(),r=Ve(),i=Be();t.exports=He()||n.call(i,r)})),We=_(((e,t)=>{var n=ze(),r=Se(),i=Be(),a=Ue();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}})),Ge=_(((e,t)=>{var n=We(),r=Ne(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`&&function(e){return s(e==null?e:o(e))}})),Ke=_(((e,t)=>{var n=Ie(),r=Le(),i=Ge();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null})),qe=_(((e,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=ze().call(n,r)})),Je=_(((e,t)=>{var n,r=ge(),i=_e(),a=ve(),o=ye(),s=be(),c=xe(),l=Se(),u=Ce(),d=we(),f=Te(),p=Ee(),m=De(),h=Oe(),g=ke(),_=je(),v=Function,y=function(e){try{return v(`"use strict"; return (`+e+`).constructor;`)()}catch{}},b=Ne(),x=Pe(),S=function(){throw new l},C=b?function(){try{return arguments.callee,S}catch{try{return b(arguments,`callee`).get}catch{return S}}}():S,w=Fe()(),T=Ke(),E=Le(),D=Ie(),O=Ve(),k=Be(),A={},j=typeof Uint8Array>`u`||!T?n:T(Uint8Array),M={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":w&&T?T([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&T?T(T([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!w||!T?n:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!w||!T?n:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&T?T(``[Symbol.iterator]()):n,"%Symbol%":w?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":C,"%TypedArray%":j,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":E,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":D};if(T)try{null.error}catch(e){M[`%Error.prototype%`]=T(T(e))}var N=function e(t){var n;if(t===`%AsyncFunction%`)n=y(`async function () {}`);else if(t===`%GeneratorFunction%`)n=y(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=y(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&T&&(n=T(i.prototype))}return M[t]=n,n},P={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},F=ze(),I=qe(),L=F.call(k,Array.prototype.concat),R=F.call(O,Array.prototype.splice),z=F.call(k,String.prototype.replace),B=F.call(k,String.prototype.slice),V=F.call(k,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,te=function(e){var t=B(e,0,1),n=B(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return z(e,ee,function(e,t,n,i){r[r.length]=n?z(i,H,`$1`):t||e}),r},ne=function(e,t){var n=e,r;if(I(P,n)&&(r=P[n],n=`%`+r[0]+`%`),I(M,n)){var i=M[n];if(i===A&&(i=N(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(V(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=te(e),r=n.length>0?n[0]:``,i=ne(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],R(n,L([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=B(p,0,1),h=B(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,I(M,a))o=M[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(b&&d+1>=n.length){var g=b(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=I(o,p),o=o[p];f&&!s&&(M[a]=o)}}return o}})),Ye=_(((e,t)=>{var n=Je(),r=We(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}})),Xe=_(((e,t)=>{var n=he()(),r=Ye()(`Object.prototype.toString`),i=function(e){return n&&e&&typeof e==`object`&&Symbol.toStringTag in e?!1:r(e)===`[object Arguments]`},a=function(e){return i(e)?!0:typeof e==`object`&&!!e&&`length`in e&&typeof e.length==`number`&&e.length>=0&&r(e)!==`[object Array]`&&`callee`in e&&r(e.callee)===`[object Function]`},o=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=o?i:a})),Ze=_(((e,t)=>{var n=Object.prototype.toString,r=Function.prototype.toString,i=/^\s*(?:function)?\*/,a=he()(),o=Object.getPrototypeOf,s=function(){if(!a)return!1;try{return Function(`return function*() {}`)()}catch{}},c;t.exports=function(e){if(typeof e!=`function`)return!1;if(i.test(r.call(e)))return!0;if(!a)return n.call(e)===`[object GeneratorFunction]`;if(!o)return!1;if(c===void 0){var t=s();c=t?o(t):!1}return o(e)===c}})),Qe=_(((e,t)=>{var n=Function.prototype.toString,r=typeof Reflect==`object`&&Reflect!==null&&Reflect.apply,i,a;if(typeof r==`function`&&typeof Object.defineProperty==`function`)try{i=Object.defineProperty({},"length",{get:function(){throw a}}),a={},r(function(){throw 42},null,i)}catch(e){e!==a&&(r=null)}else r=null;var o=/^\s*class\b/,s=function(e){try{var t=n.call(e);return o.test(t)}catch{return!1}},c=function(e){try{return!s(e)&&(n.call(e),!0)}catch{return!1}},l=Object.prototype.toString,u=`[object Object]`,d=`[object Function]`,f=`[object GeneratorFunction]`,p=`[object HTMLAllCollection]`,m=`[object HTML document.all class]`,h=`[object HTMLCollection]`,g=typeof Symbol==`function`&&!!Symbol.toStringTag,_=!(0 in[,]),v=function(){return!1};if(typeof document==`object`){var y=document.all;l.call(y)===l.call(document.all)&&(v=function(e){if((_||!e)&&(e===void 0||typeof e==`object`))try{var t=l.call(e);return(t===p||t===m||t===h||t===u)&&e(``)==null}catch{}return!1})}t.exports=r?function(e){if(v(e))return!0;if(!e||typeof e!=`function`&&typeof e!=`object`)return!1;try{r(e,null,i)}catch(e){if(e!==a)return!1}return!s(e)&&c(e)}:function(e){if(v(e))return!0;if(!e||typeof e!=`function`&&typeof e!=`object`)return!1;if(g)return c(e);if(s(e))return!1;var t=l.call(e);return t!==d&&t!==f&&!/^\[object HTML/.test(t)?!1:c(e)}})),$e=_(((e,t)=>{var n=Qe(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,a=function(e,t,n){for(var r=0,a=e.length;r<a;r++)i.call(e,r)&&(n==null?t(e[r],r,e):t.call(n,e[r],r,e))},o=function(e,t,n){for(var r=0,i=e.length;r<i;r++)n==null?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},s=function(e,t,n){for(var r in e)i.call(e,r)&&(n==null?t(e[r],r,e):t.call(n,e[r],r,e))};function c(e){return r.call(e)===`[object Array]`}t.exports=function(e,t,r){if(!n(t))throw TypeError(`iterator must be a function`);var i;arguments.length>=3&&(i=r),c(e)?a(e,t,i):typeof e==`string`?o(e,t,i):s(e,t,i)}})),et=_(((e,t)=>{t.exports=[`Float32Array`,`Float64Array`,`Int8Array`,`Int16Array`,`Int32Array`,`Uint8Array`,`Uint8ClampedArray`,`Uint16Array`,`Uint32Array`,`BigInt64Array`,`BigUint64Array`]})),tt=_(((e,t)=>{L();var n=et(),r=typeof globalThis>`u`?I:globalThis;t.exports=function(){for(var e=[],t=0;t<n.length;t++)typeof r[n[t]]==`function`&&(e[e.length]=n[t]);return e}})),nt=_(((e,t)=>{var n=Pe(),r=xe(),i=Se(),a=Ne();t.exports=function(e,t,o){if(!e||typeof e!=`object`&&typeof e!=`function`)throw new i("`obj` must be an object or a function`");if(typeof t!=`string`&&typeof t!=`symbol`)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=`boolean`&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=`boolean`&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=`boolean`&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=`boolean`)throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!a&&a(e,t);if(n)n(e,t,{configurable:l===null&&d?d.configurable:!l,enumerable:s===null&&d?d.enumerable:!s,value:o,writable:c===null&&d?d.writable:!c});else if(u||!s&&!c&&!l)e[t]=o;else throw new r(`This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.`)}})),rt=_(((e,t)=>{var n=Pe(),r=function(){return!!n};r.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],`length`,{value:1}).length!==1}catch{return!0}},t.exports=r})),it=_(((e,t)=>{var n=Je(),r=nt(),i=rt()(),a=Ne(),o=Se(),s=n(`%Math.floor%`);t.exports=function(e,t){if(typeof e!=`function`)throw new o("`fn` is not a function");if(typeof t!=`number`||t<0||t>4294967295||s(t)!==t)throw new o("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],c=!0,l=!0;if(`length`in e&&a){var u=a(e,`length`);u&&!u.configurable&&(c=!1),u&&!u.writable&&(l=!1)}return(c||l||!n)&&(i?r(e,`length`,t,!0,!0):r(e,`length`,t)),e}})),at=_(((e,t)=>{var n=ze(),r=Ve(),i=Ue();t.exports=function(){return i(n,r,arguments)}})),ot=_(((e,t)=>{var n=it(),r=Pe(),i=We(),a=at();t.exports=function(e){var t=i(arguments),r=e.length-(arguments.length-1);return n(t,1+(r>0?r:0),!0)},r?r(t.exports,`apply`,{value:a}):t.exports.apply=a})),st=_(((e,t)=>{L();var n=$e(),r=tt(),i=ot(),a=Ye(),o=Ne(),s=Ke(),c=a(`Object.prototype.toString`),l=he()(),u=typeof globalThis>`u`?I:globalThis,d=r(),f=a(`String.prototype.slice`),p=a(`Array.prototype.indexOf`,!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},m={__proto__:null};l&&o&&s?n(d,function(e){var t=new u[e];if(Symbol.toStringTag in t&&s){var n=s(t),r=o(n,Symbol.toStringTag);!r&&n&&(r=o(s(n),Symbol.toStringTag)),m[`$`+e]=i(r.get)}}):n(d,function(e){var t=new u[e],n=t.slice||t.set;n&&(m[`$`+e]=i(n))});var h=function(e){var t=!1;return n(m,function(n,r){if(!t)try{`$`+n(e)===r&&(t=f(r,1))}catch{}}),t},g=function(e){var t=!1;return n(m,function(n,r){if(!t)try{n(e),t=f(r,1)}catch{}}),t};t.exports=function(e){if(!e||typeof e!=`object`)return!1;if(!l){var t=f(c(e),8,-1);return p(d,t)>-1?t:t===`Object`&&g(e)}return o?h(e):null}})),ct=_(((e,t)=>{var n=st();t.exports=function(e){return!!n(e)}})),lt=_((e=>{var t=Xe(),n=Ze(),r=st(),i=ct();function a(e){return e.call.bind(e)}var o=typeof BigInt<`u`,s=typeof Symbol<`u`,c=a(Object.prototype.toString),l=a(Number.prototype.valueOf),u=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(o)var f=a(BigInt.prototype.valueOf);if(s)var p=a(Symbol.prototype.valueOf);function m(e,t){if(typeof e!=`object`)return!1;try{return t(e),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=i;function h(e){return typeof Promise<`u`&&e instanceof Promise||typeof e==`object`&&!!e&&typeof e.then==`function`&&typeof e.catch==`function`}e.isPromise=h;function g(e){return typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):i(e)||z(e)}e.isArrayBufferView=g;function _(e){return r(e)===`Uint8Array`}e.isUint8Array=_;function v(e){return r(e)===`Uint8ClampedArray`}e.isUint8ClampedArray=v;function y(e){return r(e)===`Uint16Array`}e.isUint16Array=y;function b(e){return r(e)===`Uint32Array`}e.isUint32Array=b;function x(e){return r(e)===`Int8Array`}e.isInt8Array=x;function S(e){return r(e)===`Int16Array`}e.isInt16Array=S;function C(e){return r(e)===`Int32Array`}e.isInt32Array=C;function w(e){return r(e)===`Float32Array`}e.isFloat32Array=w;function T(e){return r(e)===`Float64Array`}e.isFloat64Array=T;function E(e){return r(e)===`BigInt64Array`}e.isBigInt64Array=E;function D(e){return r(e)===`BigUint64Array`}e.isBigUint64Array=D;function O(e){return c(e)===`[object Map]`}O.working=typeof Map<`u`&&O(new Map);function k(e){return typeof Map>`u`?!1:O.working?O(e):e instanceof Map}e.isMap=k;function A(e){return c(e)===`[object Set]`}A.working=typeof Set<`u`&&A(new Set);function j(e){return typeof Set>`u`?!1:A.working?A(e):e instanceof Set}e.isSet=j;function M(e){return c(e)===`[object WeakMap]`}M.working=typeof WeakMap<`u`&&M(new WeakMap);function N(e){return typeof WeakMap>`u`?!1:M.working?M(e):e instanceof WeakMap}e.isWeakMap=N;function P(e){return c(e)===`[object WeakSet]`}P.working=typeof WeakSet<`u`&&P(new WeakSet);function F(e){return P(e)}e.isWeakSet=F;function I(e){return c(e)===`[object ArrayBuffer]`}I.working=typeof ArrayBuffer<`u`&&I(new ArrayBuffer);function L(e){return typeof ArrayBuffer>`u`?!1:I.working?I(e):e instanceof ArrayBuffer}e.isArrayBuffer=L;function R(e){return c(e)===`[object DataView]`}R.working=typeof ArrayBuffer<`u`&&typeof DataView<`u`&&R(new DataView(new ArrayBuffer(1),0,1));function z(e){return typeof DataView>`u`?!1:R.working?R(e):e instanceof DataView}e.isDataView=z;var B=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:void 0;function V(e){return c(e)===`[object SharedArrayBuffer]`}function ee(e){return B!==void 0&&(V.working===void 0&&(V.working=V(new B)),V.working?V(e):e instanceof B)}e.isSharedArrayBuffer=ee;function H(e){return c(e)===`[object AsyncFunction]`}e.isAsyncFunction=H;function te(e){return c(e)===`[object Map Iterator]`}e.isMapIterator=te;function ne(e){return c(e)===`[object Set Iterator]`}e.isSetIterator=ne;function U(e){return c(e)===`[object Generator]`}e.isGeneratorObject=U;function re(e){return c(e)===`[object WebAssembly.Module]`}e.isWebAssemblyCompiledModule=re;function W(e){return m(e,l)}e.isNumberObject=W;function G(e){return m(e,u)}e.isStringObject=G;function ie(e){return m(e,d)}e.isBooleanObject=ie;function K(e){return o&&m(e,f)}e.isBigIntObject=K;function ae(e){return s&&m(e,p)}e.isSymbolObject=ae;function oe(e){return W(e)||G(e)||ie(e)||K(e)||ae(e)}e.isBoxedPrimitive=oe;function se(e){return typeof Uint8Array<`u`&&(L(e)||ee(e))}e.isAnyArrayBuffer=se,[`isProxy`,`isExternal`,`isModuleNamespaceObject`].forEach(function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw Error(t+` is not supported in userland`)}})})})),ut=_(((e,t)=>{t.exports=function(e){return e&&typeof e==`object`&&typeof e.copy==`function`&&typeof e.fill==`function`&&typeof e.readUInt8==`function`}})),dt=_((e=>{le();var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},n=/%[sdj%]/g;e.format=function(e){if(!x(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(o(arguments[r]));return t.join(` `)}for(var r=1,i=arguments,a=i.length,s=String(e).replace(n,function(e){if(e===`%%`)return`%`;if(r>=a)return e;switch(e){case`%s`:return String(i[r++]);case`%d`:return Number(i[r++]);case`%j`:try{return JSON.stringify(i[r++])}catch{return`[Circular]`}default:return e}}),c=i[r];r<a;c=i[++r])v(c)||!T(c)?s+=` `+c:s+=` `+o(c);return s},e.deprecate=function(t,n){if(q!==void 0&&q.noDeprecation===!0)return t;if(q===void 0)return function(){return e.deprecate(t,n).apply(this,arguments)};var r=!1;function i(){if(!r){if(q.throwDeprecation)throw Error(n);q.traceDeprecation?console.trace(n):console.error(n),r=!0}return t.apply(this,arguments)}return i};var r={},i=/^$/;if(q.env.NODE_DEBUG){var a=q.env.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,`\\$&`).replace(/\*/g,`.*`).replace(/,/g,`$|^`).toUpperCase(),i=RegExp(`^`+a+`$`,`i`)}e.debuglog=function(t){if(t=t.toUpperCase(),!r[t]){if(i.test(t)){var n=q.pid;r[t]=function(){var r=e.format.apply(e,arguments);console.error(`%s %d: %s`,t,n,r)}}else r[t]=function(){}}return r[t]};function o(t,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),_(n)?r.showHidden=n:n&&e._extend(r,n),C(r.showHidden)&&(r.showHidden=!1),C(r.depth)&&(r.depth=2),C(r.colors)&&(r.colors=!1),C(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),u(r,t,r.depth)}e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:`cyan`,number:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,date:`magenta`,regexp:`red`};function s(e,t){var n=o.styles[t];return n?`\x1B[`+o.colors[n][0]+`m`+e+`\x1B[`+o.colors[n][1]+`m`:e}function c(e,t){return e}function l(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(t,n,r){if(t.customInspect&&n&&O(n.inspect)&&n.inspect!==e.inspect&&!(n.constructor&&n.constructor.prototype===n)){var i=n.inspect(r,t);return x(i)||(i=u(t,i,r)),i}var a=d(t,n);if(a)return a;var o=Object.keys(n),s=l(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(n)),D(n)&&(o.indexOf(`message`)>=0||o.indexOf(`description`)>=0))return f(n);if(o.length===0){if(O(n)){var c=n.name?`: `+n.name:``;return t.stylize(`[Function`+c+`]`,`special`)}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),`regexp`);if(E(n))return t.stylize(Date.prototype.toString.call(n),`date`);if(D(n))return f(n)}var _=``,v=!1,y=[`{`,`}`];if(g(n)&&(v=!0,y=[`[`,`]`]),O(n)&&(_=` [Function`+(n.name?`: `+n.name:``)+`]`),w(n)&&(_=` `+RegExp.prototype.toString.call(n)),E(n)&&(_=` `+Date.prototype.toUTCString.call(n)),D(n)&&(_=` `+f(n)),o.length===0&&(!v||n.length==0))return y[0]+_+y[1];if(r<0)return w(n)?t.stylize(RegExp.prototype.toString.call(n),`regexp`):t.stylize(`[Object]`,`special`);t.seen.push(n);var b=v?p(t,n,r,s,o):o.map(function(e){return m(t,n,r,s,e,v)});return t.seen.pop(),h(b,_,y)}function d(e,t){if(C(t))return e.stylize(`undefined`,`undefined`);if(x(t)){var n=`'`+JSON.stringify(t).replace(/^"|"$/g,``).replace(/'/g,`\\'`).replace(/\\"/g,`"`)+`'`;return e.stylize(n,`string`)}if(b(t))return e.stylize(``+t,`number`);if(_(t))return e.stylize(``+t,`boolean`);if(v(t))return e.stylize(`null`,`null`)}function f(e){return`[`+Error.prototype.toString.call(e)+`]`}function p(e,t,n,r,i){for(var a=[],o=0,s=t.length;o<s;++o)P(t,String(o))?a.push(m(e,t,n,r,String(o),!0)):a.push(``);return i.forEach(function(i){i.match(/^\d+$/)||a.push(m(e,t,n,r,i,!0))}),a}function m(e,t,n,r,i,a){var o,s,c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]};if(c.get?s=c.set?e.stylize(`[Getter/Setter]`,`special`):e.stylize(`[Getter]`,`special`):c.set&&(s=e.stylize(`[Setter]`,`special`)),P(r,i)||(o=`[`+i+`]`),s||(e.seen.indexOf(c.value)<0?(s=v(n)?u(e,c.value,null):u(e,c.value,n-1),s.indexOf(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-CIbJ01zL.js","assets/rolldown-runtime-COiEfhsA.js","assets/index-CeNyPy6Z.js","assets/index-m1s7LEHb.css","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-BWF7jMDv.js","assets/chunk-DSNLSHJZ-jssKwfJs.js","assets/chunk-7S6XSTFO-CbKG2whf.js","assets/dist-CumnGVmJ.js","assets/chunk-YZO67HFG-DHP_xcqn.js","assets/chunk-AQDTSKZB-CV0pL9Ub.js","assets/chunk-DUW6YSOI-Dgx8z5s3.js","assets/chunk-UHW7PFBP-DNdFaZ7_.js","assets/chunk-HAGFOTED-sbG-wLaw.js","assets/chunk-J5ZVWO5B-oDCd-gWO.js","assets/rough.esm-Dy-Kn_BL.js","assets/chunk-ZAUX2LTX-BQhpR1qI.js","assets/chunk-WQQL4CDK-4DgGrfra.js","assets/line-BqzYaALl.js","assets/path-fybaL0A-.js","assets/array-BifhSqXX.js","assets/chunk-HNE4Q36P-NQL5pc-1.js"])))=>i.map(i=>d[i]);
2
+ import{n as e,r as t}from"./rolldown-runtime-COiEfhsA.js";import{E as n,T as r,_ as i,a,h as o,j as s,o as c,p as l}from"./index-CeNyPy6Z.js";var u=Object.create,d=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,m=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,g=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},_=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),v=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=p(t),a=0,o=i.length,s;a<o;a++)s=i[a],!h.call(e,s)&&s!==n&&d(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=f(t,s))||r.enumerable});return e},y=(e,t,n)=>(n=e==null?{}:u(m(e)),v(t||!e||!e.__esModule||!h.call(e,`default`)?d(n,`default`,{value:e,enumerable:!0}):n,e)),b=(e=>t===void 0?typeof Proxy<`u`?new Proxy(e,{get:(e,n)=>(t===void 0?e:t)[n]}):e:t)(function(e){if(t!==void 0)return t.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});function x(e){"@babel/helpers - typeof";return x=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},x(e)}function S(e,t){if(x(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(x(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function C(e){var t=S(e,`string`);return x(t)==`symbol`?t:t+``}function w(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var T=class{constructor(e){w(this,`rootKey`,void 0),this.rootKey=e}get writtenAs(){}},E=Object.seal({}),D=class extends T{constructor(e){super(e),w(this,`root`,void 0),this.root=[]}prepForXml(e){e.stack.push(this);let t=this.root.flatMap(t=>{if(t instanceof T){let n=t.writtenAs;return n?n.map(t=>t.prepForXml(e)):t.prepForXml(e)}return t}).filter(e=>e!==void 0);return e.stack.pop(),{[this.rootKey]:t.length?t.length===1&&t[0]?._attr?t[0]:t:E}}addChildElement(e){return this.root.push(e),this}},O=class extends D{constructor(e,t){super(e),w(this,`includeIfEmpty`,void 0),this.includeIfEmpty=t}prepForXml(e){let t=super.prepForXml(e);return this.includeIfEmpty||t&&(typeof t[this.rootKey]!=`object`||Object.keys(t[this.rootKey]).length)?t:void 0}};function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?k(Object(n),!0).forEach(function(t){w(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var j=class extends T{constructor(e){super(`_attr`),w(this,`root`,void 0),w(this,`xmlKeys`,void 0),this.root=e}prepForXml(e){let t={};return Object.entries(this.root).forEach(([e,n])=>{if(n!==void 0){let r=this.xmlKeys&&this.xmlKeys[e]||e;t[r]=n}}),{_attr:t}}},M=class extends T{constructor(e){super(`_attr`),w(this,`root`,void 0),this.root=e}prepForXml(e){return{_attr:Object.values(this.root).filter(({value:e})=>e!==void 0).reduce((e,{key:t,value:n})=>A(A({},e),{},{[t]:n}),{})}}},N=class extends j{constructor(...e){super(...e),w(this,`xmlKeys`,{val:`w:val`,color:`w:color`,fill:`w:fill`,space:`w:space`,sz:`w:sz`,type:`w:type`,rsidR:`w:rsidR`,rsidRPr:`w:rsidRPr`,rsidSect:`w:rsidSect`,w:`w:w`,h:`w:h`,top:`w:top`,right:`w:right`,bottom:`w:bottom`,left:`w:left`,header:`w:header`,footer:`w:footer`,gutter:`w:gutter`,linePitch:`w:linePitch`,pos:`w:pos`})}},P=_(((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}t.exports=s,t.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else for(var l=c.length,u=g(c,l),n=0;n<l;++n)r(u[n],this,t);return!0};function d(e,t,n,r){var i,o,s;if(l(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),o=e._events),s=o[t]),s===void 0)s=o[t]=n,++e._eventsCount;else if(typeof s==`function`?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=u(e),i>0&&s.length>i&&!s.warned){s.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+s.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=s.length,a(c)}return e}s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():_(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(r=0;r<i.length;++r)a=i[r],a!==`removeListener`&&this.removeAllListeners(a);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?v(i):g(i,i.length)}s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h;function h(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function g(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function v(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function y(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}x(e,t,a,{once:!0}),t!==`error`&&b(e,i,{once:!0})})}function b(e,t,n){typeof e.on==`function`&&x(e,`error`,t,n)}function x(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener==`function`)e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e)}})),F=_(((e,t)=>{t.exports=typeof Object.create==`function`?function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),I,L=g((()=>{I=globalThis||self}));function R(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function z(){throw Error(`setTimeout has not been defined`)}function B(){throw Error(`clearTimeout has not been defined`)}function V(e){if(G===setTimeout)return setTimeout(e,0);if((G===z||!G)&&setTimeout)return G=setTimeout,setTimeout(e,0);try{return G(e,0)}catch{try{return G.call(null,e,0)}catch{return G.call(this,e,0)}}}function ee(e){if(ie===clearTimeout)return clearTimeout(e);if((ie===B||!ie)&&clearTimeout)return ie=clearTimeout,clearTimeout(e);try{return ie(e)}catch{try{return ie.call(null,e)}catch{return ie.call(this,e)}}}function H(){ae&&oe&&(ae=!1,oe.length?K=oe.concat(K):se=-1,K.length&&te())}function te(){if(!ae){var e=V(H);ae=!0;for(var t=K.length;t;){for(oe=K,K=[];++se<t;)oe&&oe[se].run();se=-1,t=K.length}oe=null,ae=!1,ee(e)}}function ne(e,t){this.fun=e,this.array=t}function U(){}var re,W,G,ie,K,ae,oe,se,ce,q,le=g((()=>{re={exports:{}},W=re.exports={},(function(){try{G=typeof setTimeout==`function`?setTimeout:z}catch{G=z}try{ie=typeof clearTimeout==`function`?clearTimeout:B}catch{ie=B}})(),K=[],ae=!1,se=-1,W.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];K.push(new ne(e,t)),K.length===1&&!ae&&V(te)},ne.prototype.run=function(){this.fun.apply(null,this.array)},W.title=`browser`,W.browser=!0,W.env={},W.argv=[],W.version=``,W.versions={},W.on=U,W.addListener=U,W.once=U,W.off=U,W.removeListener=U,W.removeAllListeners=U,W.emit=U,W.prependListener=U,W.prependOnceListener=U,W.listeners=function(e){return[]},W.binding=function(e){throw Error(`process.binding is not supported`)},W.cwd=function(){return`/`},W.chdir=function(e){throw Error(`process.chdir is not supported`)},W.umask=function(){return 0},ce=re.exports,q=R(ce)})),ue=_(((e,t)=>{t.exports=P().EventEmitter})),de=_((e=>{e.byteLength=c,e.toByteArray=u,e.fromByteArray=p;for(var t=[],n=[],r=typeof Uint8Array<`u`?Uint8Array:Array,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,a=0,o=i.length;a<o;++a)t[a]=i[a],n[i.charCodeAt(a)]=a;n[45]=62,n[95]=63;function s(e){var t=e.length;if(t%4>0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function c(e){var t=s(e),n=t[0],r=t[1];return(n+r)*3/4-r}function l(e,t,n){return(t+n)*3/4-n}function u(e){for(var t,i=s(e),a=i[0],o=i[1],c=new r(l(e,a,o)),u=0,d=o>0?a-4:a,f=0;f<d;f+=4)t=n[e.charCodeAt(f)]<<18|n[e.charCodeAt(f+1)]<<12|n[e.charCodeAt(f+2)]<<6|n[e.charCodeAt(f+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=n[e.charCodeAt(f)]<<2|n[e.charCodeAt(f+1)]>>4,c[u++]=t&255),o===1&&(t=n[e.charCodeAt(f)]<<10|n[e.charCodeAt(f+1)]<<4|n[e.charCodeAt(f+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function d(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[e&63]}function f(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(d(r));return i.join(``)}function p(e){for(var n,r=e.length,i=r%3,a=[],o=16383,s=0,c=r-i;s<c;s+=o)a.push(f(e,s,s+o>c?c:s+o));return i===1?(n=e[r-1],a.push(t[n>>2]+t[n<<4&63]+`==`)):i===2&&(n=(e[r-2]<<8)+e[r-1],a.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+`=`)),a.join(``)}})),fe=_((e=>{e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else if(a===c)return o?NaN:(p?-1:1)*(1/0);else o+=2**r,a-=l;return(p?-1:1)*o*2**(a-r)},e.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,d=u>>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=+(t<0||t===0&&1/t<0);for(t=Math.abs(t),isNaN(t)||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128}})),pe=_((e=>{var t=de(),n=fe(),r=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=s,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=a(),!s.TYPED_ARRAY_SUPPORT&&typeof console<`u`&&typeof console.error==`function`&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(e){if(e>i)throw RangeError(`The value "`+e+`" is invalid for option "size"`);var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return d(e)}return c(e,t,n)}s.poolSize=8192;function c(e,t,n){if(typeof e==`string`)return f(e,t);if(ArrayBuffer.isView(e))return m(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(G(e,ArrayBuffer)||e&&G(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<`u`&&(G(e,SharedArrayBuffer)||e&&G(e.buffer,SharedArrayBuffer)))return h(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);var r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return s.from(r,t,n);var i=g(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return s.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}s.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function u(e,t,n){return l(e),e<=0||t===void 0?o(e):typeof n==`string`?o(e).fill(t,n):o(e).fill(t)}s.alloc=function(e,t,n){return u(e,t,n)};function d(e){return l(e),o(e<0?0:_(e)|0)}s.allocUnsafe=function(e){return d(e)},s.allocUnsafeSlow=function(e){return d(e)};function f(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!s.isEncoding(t))throw TypeError(`Unknown encoding: `+t);var n=y(e,t)|0,r=o(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function p(e){for(var t=e.length<0?0:_(e.length)|0,n=o(t),r=0;r<t;r+=1)n[r]=e[r]&255;return n}function m(e){if(G(e,Uint8Array)){var t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(e)}function h(e,t,n){if(t<0||e.byteLength<t)throw RangeError(`"offset" is outside of buffer bounds`);if(e.byteLength<t+(n||0))throw RangeError(`"length" is outside of buffer bounds`);var r=t===void 0&&n===void 0?new Uint8Array(e):n===void 0?new Uint8Array(e,t):new Uint8Array(e,t,n);return Object.setPrototypeOf(r,s.prototype),r}function g(e){if(s.isBuffer(e)){var t=_(e.length)|0,n=o(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!=`number`||ie(e.length)?o(0):p(e);if(e.type===`Buffer`&&Array.isArray(e.data))return p(e.data)}function _(e){if(e>=i)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+i.toString(16)+` bytes`);return e|0}function v(e){return+e!=e&&(e=0),s.alloc(+e)}s.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==s.prototype},s.compare=function(e,t){if(G(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),G(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},s.isEncoding=function(e){switch(String(e).toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`latin1`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw TypeError(`"list" argument must be an Array of Buffers`);if(e.length===0)return s.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=s.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(G(a,Uint8Array))i+a.length>r.length?s.from(a).copy(r,i):Uint8Array.prototype.set.call(r,a,i);else if(s.isBuffer(a))a.copy(r,i);else throw TypeError(`"list" argument must be an Array of Buffers`);i+=a.length}return r};function y(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||G(e,ArrayBuffer))return e.byteLength;if(typeof e!=`string`)throw TypeError(`The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type `+typeof e);var n=e.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;for(var i=!1;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return te(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return re(e).length;default:if(i)return r?-1:te(e).length;t=(``+t).toLowerCase(),i=!0}}s.byteLength=y;function b(e,t,n){var r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return F(this,t,n);case`utf8`:case`utf-8`:return A(this,t,n);case`ascii`:return N(this,t,n);case`latin1`:case`binary`:return P(this,t,n);case`base64`:return k(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return I(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}s.prototype._isBuffer=!0;function x(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(var t=0;t<e;t+=2)x(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError(`Buffer size must be a multiple of 32-bits`);for(var t=0;t<e;t+=4)x(this,t,t+3),x(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError(`Buffer size must be a multiple of 64-bits`);for(var t=0;t<e;t+=8)x(this,t,t+7),x(this,t+1,t+6),x(this,t+2,t+5),x(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return e===0?``:arguments.length===0?A(this,0,e):b.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError(`Argument must be a Buffer`);return this===e||s.compare(this,e)===0},s.prototype.inspect=function(){var t=``,n=e.INSPECT_MAX_BYTES;return t=this.toString(`hex`,0,n).replace(/(.{2})/g,`$1 `).trim(),this.length>n&&(t+=` ... `),`<Buffer `+t+`>`},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(G(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,o=n-t,c=Math.min(a,o),l=this.slice(r,i),u=e.slice(t,n),d=0;d<c;++d)if(l[d]!==u[d]){a=l[d],o=u[d];break}return a<o?-1:+(o<a)};function S(e,t,n,r,i){if(e.length===0)return-1;if(typeof n==`string`?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,ie(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(i)n=0;else return-1}if(typeof t==`string`&&(t=s.from(t,r)),s.isBuffer(t))return t.length===0?-1:C(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof Uint8Array.prototype.indexOf==`function`?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):C(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function C(e,t,n,r,i){var a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}var l;if(i){var u=-1;for(l=n;l<o;l++)if(c(e,l)===c(t,u===-1?0:l-u)){if(u===-1&&(u=l),l-u+1===s)return u*a}else u!==-1&&(l-=l-u),u=-1}else for(n+s>o&&(n=o-s),l=n;l>=0;l--){for(var d=!0,f=0;f<s;f++)if(c(e,l+f)!==c(t,f)){d=!1;break}if(d)return l}return-1}s.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},s.prototype.indexOf=function(e,t,n){return S(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return S(this,e,t,n,!1)};function w(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var a=t.length;r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(o*2,2),16);if(ie(s))return o;e[n+o]=s}return o}function T(e,t,n,r){return W(te(t,e.length-n),e,n,r)}function E(e,t,n,r){return W(ne(t),e,n,r)}function D(e,t,n,r){return W(re(t),e,n,r)}function O(e,t,n,r){return W(U(t,e.length-n),e,n,r)}s.prototype.write=function(e,t,n,r){if(t===void 0)r=`utf8`,n=this.length,t=0;else if(n===void 0&&typeof t==`string`)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);var i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;for(var a=!1;;)switch(r){case`hex`:return w(this,e,t,n);case`utf8`:case`utf-8`:return T(this,e,t,n);case`ascii`:case`latin1`:case`binary`:return E(this,e,t,n);case`base64`:return D(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return O(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,n,r){return n===0&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=n){var c,l,u,d;switch(s){case 1:a<128&&(o=a);break;case 2:c=e[i+1],(c&192)==128&&(d=(a&31)<<6|c&63,d>127&&(o=d));break;case 3:c=e[i+1],l=e[i+2],(c&192)==128&&(l&192)==128&&(d=(a&15)<<12|(c&63)<<6|l&63,d>2047&&(d<55296||d>57343)&&(o=d));break;case 4:c=e[i+1],l=e[i+2],u=e[i+3],(c&192)==128&&(l&192)==128&&(u&192)==128&&(d=(a&15)<<18|(c&63)<<12|(l&63)<<6|u&63,d>65535&&d<1114112&&(o=d))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|o&1023),r.push(o),i+=s}return M(r)}var j=4096;function M(e){var t=e.length;if(t<=j)return String.fromCharCode.apply(String,e);for(var n=``,r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=j));return n}function N(e,t,n){var r=``;n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]&127);return r}function P(e,t,n){var r=``;n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function F(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i=``,a=t;a<n;++a)i+=K[e[a]];return i}function I(e,t,n){for(var r=e.slice(t,n),i=``,a=0;a<r.length-1;a+=2)i+=String.fromCharCode(r[a]+r[a+1]*256);return i}s.prototype.slice=function(e,t){var n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,s.prototype),r};function L(e,t,n){if(e%1!=0||e<0)throw RangeError(`offset is not uint`);if(e+t>n)throw RangeError(`Trying to access beyond buffer length`)}s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=2**(8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=2**(8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||L(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),n.read(this,e,!1,52,8)};function R(e,t,n,r,i,a){if(!s.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||t<a)throw RangeError(`"value" argument is out of bounds`);if(n+r>e.length)throw RangeError(`Index out of range`)}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){var i=2**(8*n)-1;R(this,e,t,n,i,0)}var a=1,o=0;for(this[t]=e&255;++o<n&&(a*=256);)this[t+o]=e/a&255;return t+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){var i=2**(8*n)-1;R(this,e,t,n,i,0)}var a=n-1,o=1;for(this[t+a]=e&255;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,255,0),this[t]=e&255,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=2**(8*n-1);R(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=e&255;++a<n&&(o*=256);)e<0&&s===0&&this[t+a-1]!==0&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=2**(8*n-1);R(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=e&255;--a>=0&&(o*=256);)e<0&&s===0&&this[t+a+1]!==0&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function z(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function B(e,t,r,i,a){return t=+t,r>>>=0,a||z(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,i,23,4),r+4}s.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)};function V(e,t,r,i,a){return t=+t,r>>>=0,a||z(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,i,52,8),r+8}s.prototype.writeDoubleLE=function(e,t,n){return V(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return V(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r<n&&(r=n),r===n||e.length===0||this.length===0)return 0;if(t<0)throw RangeError(`targetStart out of bounds`);if(n<0||n>=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;return this===e&&typeof Uint8Array.prototype.copyWithin==`function`?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},s.prototype.fill=function(e,t,n,r){if(typeof e==`string`){if(typeof t==`string`?(r=t,t=0,n=this.length):typeof n==`string`&&(r=n,n=this.length),r!==void 0&&typeof r!=`string`)throw TypeError(`encoding must be a string`);if(typeof r==`string`&&!s.isEncoding(r))throw TypeError(`Unknown encoding: `+r);if(e.length===1){var i=e.charCodeAt(0);(r===`utf8`&&i<128||r===`latin1`)&&(e=i)}}else typeof e==`number`?e&=255:typeof e==`boolean`&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError(`Out of range index`);if(n<=t)return this;t>>>=0,n=n===void 0?this.length:n>>>0,e||=0;var a;if(typeof e==`number`)for(a=t;a<n;++a)this[a]=e;else{var o=s.isBuffer(e)?e:s.from(e,r),c=o.length;if(c===0)throw TypeError(`The value "`+e+`" is invalid for argument "value"`);for(a=0;a<n-t;++a)this[a+t]=o[a%c]}return this};var ee=/[^+/0-9A-Za-z-_]/g;function H(e){if(e=e.split(`=`)[0],e=e.trim().replace(ee,``),e.length<2)return``;for(;e.length%4!=0;)e+=`=`;return e}function te(e,t){t||=1/0;for(var n,r=e.length,i=null,a=[],o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319||o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function ne(e){for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function U(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function re(e){return t.toByteArray(H(e))}function W(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function G(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function ie(e){return e!==e}var K=(function(){for(var e=`0123456789abcdef`,t=Array(256),n=0;n<16;++n)for(var r=n*16,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t})()})),me=_(((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}})),he=_(((e,t)=>{var n=me();t.exports=function(){return n()&&!!Symbol.toStringTag}})),ge=_(((e,t)=>{t.exports=Object})),_e=_(((e,t)=>{t.exports=Error})),ve=_(((e,t)=>{t.exports=EvalError})),ye=_(((e,t)=>{t.exports=RangeError})),be=_(((e,t)=>{t.exports=ReferenceError})),xe=_(((e,t)=>{t.exports=SyntaxError})),Se=_(((e,t)=>{t.exports=TypeError})),Ce=_(((e,t)=>{t.exports=URIError})),we=_(((e,t)=>{t.exports=Math.abs})),Te=_(((e,t)=>{t.exports=Math.floor})),Ee=_(((e,t)=>{t.exports=Math.max})),De=_(((e,t)=>{t.exports=Math.min})),Oe=_(((e,t)=>{t.exports=Math.pow})),ke=_(((e,t)=>{t.exports=Math.round})),Ae=_(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),je=_(((e,t)=>{var n=Ae();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),Me=_(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),Ne=_(((e,t)=>{var n=Me();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),Pe=_(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),Fe=_(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=me();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),Ie=_(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),Le=_(((e,t)=>{t.exports=ge().getPrototypeOf||null})),Re=_(((e,t)=>{var n=Object.prototype.toString,r=Math.max,i=`[object Function]`,a=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},o=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},s=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||n.apply(t)!==i)throw TypeError(`Function.prototype.bind called on incompatible `+t);for(var c=o(arguments,1),l,u=function(){if(this instanceof l){var n=t.apply(this,a(c,arguments));return Object(n)===n?n:this}return t.apply(e,a(c,arguments))},d=r(0,t.length-c.length),f=[],p=0;p<d;p++)f[p]=`$`+p;if(l=Function(`binder`,`return function (`+s(f,`,`)+`){ return binder.apply(this,arguments); }`)(u),t.prototype){var m=function(){};m.prototype=t.prototype,l.prototype=new m,m.prototype=null}return l}})),ze=_(((e,t)=>{var n=Re();t.exports=Function.prototype.bind||n})),Be=_(((e,t)=>{t.exports=Function.prototype.call})),Ve=_(((e,t)=>{t.exports=Function.prototype.apply})),He=_(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply})),Ue=_(((e,t)=>{var n=ze(),r=Ve(),i=Be();t.exports=He()||n.call(i,r)})),We=_(((e,t)=>{var n=ze(),r=Se(),i=Be(),a=Ue();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}})),Ge=_(((e,t)=>{var n=We(),r=Ne(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`&&function(e){return s(e==null?e:o(e))}})),Ke=_(((e,t)=>{var n=Ie(),r=Le(),i=Ge();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null})),qe=_(((e,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=ze().call(n,r)})),Je=_(((e,t)=>{var n,r=ge(),i=_e(),a=ve(),o=ye(),s=be(),c=xe(),l=Se(),u=Ce(),d=we(),f=Te(),p=Ee(),m=De(),h=Oe(),g=ke(),_=je(),v=Function,y=function(e){try{return v(`"use strict"; return (`+e+`).constructor;`)()}catch{}},b=Ne(),x=Pe(),S=function(){throw new l},C=b?function(){try{return arguments.callee,S}catch{try{return b(arguments,`callee`).get}catch{return S}}}():S,w=Fe()(),T=Ke(),E=Le(),D=Ie(),O=Ve(),k=Be(),A={},j=typeof Uint8Array>`u`||!T?n:T(Uint8Array),M={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":w&&T?T([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&T?T(T([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!w||!T?n:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!w||!T?n:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&T?T(``[Symbol.iterator]()):n,"%Symbol%":w?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":C,"%TypedArray%":j,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":E,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":D};if(T)try{null.error}catch(e){M[`%Error.prototype%`]=T(T(e))}var N=function e(t){var n;if(t===`%AsyncFunction%`)n=y(`async function () {}`);else if(t===`%GeneratorFunction%`)n=y(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=y(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&T&&(n=T(i.prototype))}return M[t]=n,n},P={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},F=ze(),I=qe(),L=F.call(k,Array.prototype.concat),R=F.call(O,Array.prototype.splice),z=F.call(k,String.prototype.replace),B=F.call(k,String.prototype.slice),V=F.call(k,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,te=function(e){var t=B(e,0,1),n=B(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return z(e,ee,function(e,t,n,i){r[r.length]=n?z(i,H,`$1`):t||e}),r},ne=function(e,t){var n=e,r;if(I(P,n)&&(r=P[n],n=`%`+r[0]+`%`),I(M,n)){var i=M[n];if(i===A&&(i=N(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(V(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=te(e),r=n.length>0?n[0]:``,i=ne(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],R(n,L([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=B(p,0,1),h=B(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,I(M,a))o=M[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(b&&d+1>=n.length){var g=b(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=I(o,p),o=o[p];f&&!s&&(M[a]=o)}}return o}})),Ye=_(((e,t)=>{var n=Je(),r=We(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}})),Xe=_(((e,t)=>{var n=he()(),r=Ye()(`Object.prototype.toString`),i=function(e){return n&&e&&typeof e==`object`&&Symbol.toStringTag in e?!1:r(e)===`[object Arguments]`},a=function(e){return i(e)?!0:typeof e==`object`&&!!e&&`length`in e&&typeof e.length==`number`&&e.length>=0&&r(e)!==`[object Array]`&&`callee`in e&&r(e.callee)===`[object Function]`},o=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=o?i:a})),Ze=_(((e,t)=>{var n=Object.prototype.toString,r=Function.prototype.toString,i=/^\s*(?:function)?\*/,a=he()(),o=Object.getPrototypeOf,s=function(){if(!a)return!1;try{return Function(`return function*() {}`)()}catch{}},c;t.exports=function(e){if(typeof e!=`function`)return!1;if(i.test(r.call(e)))return!0;if(!a)return n.call(e)===`[object GeneratorFunction]`;if(!o)return!1;if(c===void 0){var t=s();c=t?o(t):!1}return o(e)===c}})),Qe=_(((e,t)=>{var n=Function.prototype.toString,r=typeof Reflect==`object`&&Reflect!==null&&Reflect.apply,i,a;if(typeof r==`function`&&typeof Object.defineProperty==`function`)try{i=Object.defineProperty({},"length",{get:function(){throw a}}),a={},r(function(){throw 42},null,i)}catch(e){e!==a&&(r=null)}else r=null;var o=/^\s*class\b/,s=function(e){try{var t=n.call(e);return o.test(t)}catch{return!1}},c=function(e){try{return!s(e)&&(n.call(e),!0)}catch{return!1}},l=Object.prototype.toString,u=`[object Object]`,d=`[object Function]`,f=`[object GeneratorFunction]`,p=`[object HTMLAllCollection]`,m=`[object HTML document.all class]`,h=`[object HTMLCollection]`,g=typeof Symbol==`function`&&!!Symbol.toStringTag,_=!(0 in[,]),v=function(){return!1};if(typeof document==`object`){var y=document.all;l.call(y)===l.call(document.all)&&(v=function(e){if((_||!e)&&(e===void 0||typeof e==`object`))try{var t=l.call(e);return(t===p||t===m||t===h||t===u)&&e(``)==null}catch{}return!1})}t.exports=r?function(e){if(v(e))return!0;if(!e||typeof e!=`function`&&typeof e!=`object`)return!1;try{r(e,null,i)}catch(e){if(e!==a)return!1}return!s(e)&&c(e)}:function(e){if(v(e))return!0;if(!e||typeof e!=`function`&&typeof e!=`object`)return!1;if(g)return c(e);if(s(e))return!1;var t=l.call(e);return t!==d&&t!==f&&!/^\[object HTML/.test(t)?!1:c(e)}})),$e=_(((e,t)=>{var n=Qe(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,a=function(e,t,n){for(var r=0,a=e.length;r<a;r++)i.call(e,r)&&(n==null?t(e[r],r,e):t.call(n,e[r],r,e))},o=function(e,t,n){for(var r=0,i=e.length;r<i;r++)n==null?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},s=function(e,t,n){for(var r in e)i.call(e,r)&&(n==null?t(e[r],r,e):t.call(n,e[r],r,e))};function c(e){return r.call(e)===`[object Array]`}t.exports=function(e,t,r){if(!n(t))throw TypeError(`iterator must be a function`);var i;arguments.length>=3&&(i=r),c(e)?a(e,t,i):typeof e==`string`?o(e,t,i):s(e,t,i)}})),et=_(((e,t)=>{t.exports=[`Float32Array`,`Float64Array`,`Int8Array`,`Int16Array`,`Int32Array`,`Uint8Array`,`Uint8ClampedArray`,`Uint16Array`,`Uint32Array`,`BigInt64Array`,`BigUint64Array`]})),tt=_(((e,t)=>{L();var n=et(),r=typeof globalThis>`u`?I:globalThis;t.exports=function(){for(var e=[],t=0;t<n.length;t++)typeof r[n[t]]==`function`&&(e[e.length]=n[t]);return e}})),nt=_(((e,t)=>{var n=Pe(),r=xe(),i=Se(),a=Ne();t.exports=function(e,t,o){if(!e||typeof e!=`object`&&typeof e!=`function`)throw new i("`obj` must be an object or a function`");if(typeof t!=`string`&&typeof t!=`symbol`)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=`boolean`&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=`boolean`&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=`boolean`&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=`boolean`)throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!a&&a(e,t);if(n)n(e,t,{configurable:l===null&&d?d.configurable:!l,enumerable:s===null&&d?d.enumerable:!s,value:o,writable:c===null&&d?d.writable:!c});else if(u||!s&&!c&&!l)e[t]=o;else throw new r(`This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.`)}})),rt=_(((e,t)=>{var n=Pe(),r=function(){return!!n};r.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],`length`,{value:1}).length!==1}catch{return!0}},t.exports=r})),it=_(((e,t)=>{var n=Je(),r=nt(),i=rt()(),a=Ne(),o=Se(),s=n(`%Math.floor%`);t.exports=function(e,t){if(typeof e!=`function`)throw new o("`fn` is not a function");if(typeof t!=`number`||t<0||t>4294967295||s(t)!==t)throw new o("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],c=!0,l=!0;if(`length`in e&&a){var u=a(e,`length`);u&&!u.configurable&&(c=!1),u&&!u.writable&&(l=!1)}return(c||l||!n)&&(i?r(e,`length`,t,!0,!0):r(e,`length`,t)),e}})),at=_(((e,t)=>{var n=ze(),r=Ve(),i=Ue();t.exports=function(){return i(n,r,arguments)}})),ot=_(((e,t)=>{var n=it(),r=Pe(),i=We(),a=at();t.exports=function(e){var t=i(arguments),r=e.length-(arguments.length-1);return n(t,1+(r>0?r:0),!0)},r?r(t.exports,`apply`,{value:a}):t.exports.apply=a})),st=_(((e,t)=>{L();var n=$e(),r=tt(),i=ot(),a=Ye(),o=Ne(),s=Ke(),c=a(`Object.prototype.toString`),l=he()(),u=typeof globalThis>`u`?I:globalThis,d=r(),f=a(`String.prototype.slice`),p=a(`Array.prototype.indexOf`,!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},m={__proto__:null};l&&o&&s?n(d,function(e){var t=new u[e];if(Symbol.toStringTag in t&&s){var n=s(t),r=o(n,Symbol.toStringTag);!r&&n&&(r=o(s(n),Symbol.toStringTag)),m[`$`+e]=i(r.get)}}):n(d,function(e){var t=new u[e],n=t.slice||t.set;n&&(m[`$`+e]=i(n))});var h=function(e){var t=!1;return n(m,function(n,r){if(!t)try{`$`+n(e)===r&&(t=f(r,1))}catch{}}),t},g=function(e){var t=!1;return n(m,function(n,r){if(!t)try{n(e),t=f(r,1)}catch{}}),t};t.exports=function(e){if(!e||typeof e!=`object`)return!1;if(!l){var t=f(c(e),8,-1);return p(d,t)>-1?t:t===`Object`&&g(e)}return o?h(e):null}})),ct=_(((e,t)=>{var n=st();t.exports=function(e){return!!n(e)}})),lt=_((e=>{var t=Xe(),n=Ze(),r=st(),i=ct();function a(e){return e.call.bind(e)}var o=typeof BigInt<`u`,s=typeof Symbol<`u`,c=a(Object.prototype.toString),l=a(Number.prototype.valueOf),u=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(o)var f=a(BigInt.prototype.valueOf);if(s)var p=a(Symbol.prototype.valueOf);function m(e,t){if(typeof e!=`object`)return!1;try{return t(e),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=i;function h(e){return typeof Promise<`u`&&e instanceof Promise||typeof e==`object`&&!!e&&typeof e.then==`function`&&typeof e.catch==`function`}e.isPromise=h;function g(e){return typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):i(e)||z(e)}e.isArrayBufferView=g;function _(e){return r(e)===`Uint8Array`}e.isUint8Array=_;function v(e){return r(e)===`Uint8ClampedArray`}e.isUint8ClampedArray=v;function y(e){return r(e)===`Uint16Array`}e.isUint16Array=y;function b(e){return r(e)===`Uint32Array`}e.isUint32Array=b;function x(e){return r(e)===`Int8Array`}e.isInt8Array=x;function S(e){return r(e)===`Int16Array`}e.isInt16Array=S;function C(e){return r(e)===`Int32Array`}e.isInt32Array=C;function w(e){return r(e)===`Float32Array`}e.isFloat32Array=w;function T(e){return r(e)===`Float64Array`}e.isFloat64Array=T;function E(e){return r(e)===`BigInt64Array`}e.isBigInt64Array=E;function D(e){return r(e)===`BigUint64Array`}e.isBigUint64Array=D;function O(e){return c(e)===`[object Map]`}O.working=typeof Map<`u`&&O(new Map);function k(e){return typeof Map>`u`?!1:O.working?O(e):e instanceof Map}e.isMap=k;function A(e){return c(e)===`[object Set]`}A.working=typeof Set<`u`&&A(new Set);function j(e){return typeof Set>`u`?!1:A.working?A(e):e instanceof Set}e.isSet=j;function M(e){return c(e)===`[object WeakMap]`}M.working=typeof WeakMap<`u`&&M(new WeakMap);function N(e){return typeof WeakMap>`u`?!1:M.working?M(e):e instanceof WeakMap}e.isWeakMap=N;function P(e){return c(e)===`[object WeakSet]`}P.working=typeof WeakSet<`u`&&P(new WeakSet);function F(e){return P(e)}e.isWeakSet=F;function I(e){return c(e)===`[object ArrayBuffer]`}I.working=typeof ArrayBuffer<`u`&&I(new ArrayBuffer);function L(e){return typeof ArrayBuffer>`u`?!1:I.working?I(e):e instanceof ArrayBuffer}e.isArrayBuffer=L;function R(e){return c(e)===`[object DataView]`}R.working=typeof ArrayBuffer<`u`&&typeof DataView<`u`&&R(new DataView(new ArrayBuffer(1),0,1));function z(e){return typeof DataView>`u`?!1:R.working?R(e):e instanceof DataView}e.isDataView=z;var B=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:void 0;function V(e){return c(e)===`[object SharedArrayBuffer]`}function ee(e){return B!==void 0&&(V.working===void 0&&(V.working=V(new B)),V.working?V(e):e instanceof B)}e.isSharedArrayBuffer=ee;function H(e){return c(e)===`[object AsyncFunction]`}e.isAsyncFunction=H;function te(e){return c(e)===`[object Map Iterator]`}e.isMapIterator=te;function ne(e){return c(e)===`[object Set Iterator]`}e.isSetIterator=ne;function U(e){return c(e)===`[object Generator]`}e.isGeneratorObject=U;function re(e){return c(e)===`[object WebAssembly.Module]`}e.isWebAssemblyCompiledModule=re;function W(e){return m(e,l)}e.isNumberObject=W;function G(e){return m(e,u)}e.isStringObject=G;function ie(e){return m(e,d)}e.isBooleanObject=ie;function K(e){return o&&m(e,f)}e.isBigIntObject=K;function ae(e){return s&&m(e,p)}e.isSymbolObject=ae;function oe(e){return W(e)||G(e)||ie(e)||K(e)||ae(e)}e.isBoxedPrimitive=oe;function se(e){return typeof Uint8Array<`u`&&(L(e)||ee(e))}e.isAnyArrayBuffer=se,[`isProxy`,`isExternal`,`isModuleNamespaceObject`].forEach(function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw Error(t+` is not supported in userland`)}})})})),ut=_(((e,t)=>{t.exports=function(e){return e&&typeof e==`object`&&typeof e.copy==`function`&&typeof e.fill==`function`&&typeof e.readUInt8==`function`}})),dt=_((e=>{le();var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},n=/%[sdj%]/g;e.format=function(e){if(!x(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(o(arguments[r]));return t.join(` `)}for(var r=1,i=arguments,a=i.length,s=String(e).replace(n,function(e){if(e===`%%`)return`%`;if(r>=a)return e;switch(e){case`%s`:return String(i[r++]);case`%d`:return Number(i[r++]);case`%j`:try{return JSON.stringify(i[r++])}catch{return`[Circular]`}default:return e}}),c=i[r];r<a;c=i[++r])v(c)||!T(c)?s+=` `+c:s+=` `+o(c);return s},e.deprecate=function(t,n){if(q!==void 0&&q.noDeprecation===!0)return t;if(q===void 0)return function(){return e.deprecate(t,n).apply(this,arguments)};var r=!1;function i(){if(!r){if(q.throwDeprecation)throw Error(n);q.traceDeprecation?console.trace(n):console.error(n),r=!0}return t.apply(this,arguments)}return i};var r={},i=/^$/;if(q.env.NODE_DEBUG){var a=q.env.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,`\\$&`).replace(/\*/g,`.*`).replace(/,/g,`$|^`).toUpperCase(),i=RegExp(`^`+a+`$`,`i`)}e.debuglog=function(t){if(t=t.toUpperCase(),!r[t]){if(i.test(t)){var n=q.pid;r[t]=function(){var r=e.format.apply(e,arguments);console.error(`%s %d: %s`,t,n,r)}}else r[t]=function(){}}return r[t]};function o(t,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),_(n)?r.showHidden=n:n&&e._extend(r,n),C(r.showHidden)&&(r.showHidden=!1),C(r.depth)&&(r.depth=2),C(r.colors)&&(r.colors=!1),C(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),u(r,t,r.depth)}e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:`cyan`,number:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,date:`magenta`,regexp:`red`};function s(e,t){var n=o.styles[t];return n?`\x1B[`+o.colors[n][0]+`m`+e+`\x1B[`+o.colors[n][1]+`m`:e}function c(e,t){return e}function l(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(t,n,r){if(t.customInspect&&n&&O(n.inspect)&&n.inspect!==e.inspect&&!(n.constructor&&n.constructor.prototype===n)){var i=n.inspect(r,t);return x(i)||(i=u(t,i,r)),i}var a=d(t,n);if(a)return a;var o=Object.keys(n),s=l(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(n)),D(n)&&(o.indexOf(`message`)>=0||o.indexOf(`description`)>=0))return f(n);if(o.length===0){if(O(n)){var c=n.name?`: `+n.name:``;return t.stylize(`[Function`+c+`]`,`special`)}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),`regexp`);if(E(n))return t.stylize(Date.prototype.toString.call(n),`date`);if(D(n))return f(n)}var _=``,v=!1,y=[`{`,`}`];if(g(n)&&(v=!0,y=[`[`,`]`]),O(n)&&(_=` [Function`+(n.name?`: `+n.name:``)+`]`),w(n)&&(_=` `+RegExp.prototype.toString.call(n)),E(n)&&(_=` `+Date.prototype.toUTCString.call(n)),D(n)&&(_=` `+f(n)),o.length===0&&(!v||n.length==0))return y[0]+_+y[1];if(r<0)return w(n)?t.stylize(RegExp.prototype.toString.call(n),`regexp`):t.stylize(`[Object]`,`special`);t.seen.push(n);var b=v?p(t,n,r,s,o):o.map(function(e){return m(t,n,r,s,e,v)});return t.seen.pop(),h(b,_,y)}function d(e,t){if(C(t))return e.stylize(`undefined`,`undefined`);if(x(t)){var n=`'`+JSON.stringify(t).replace(/^"|"$/g,``).replace(/'/g,`\\'`).replace(/\\"/g,`"`)+`'`;return e.stylize(n,`string`)}if(b(t))return e.stylize(``+t,`number`);if(_(t))return e.stylize(``+t,`boolean`);if(v(t))return e.stylize(`null`,`null`)}function f(e){return`[`+Error.prototype.toString.call(e)+`]`}function p(e,t,n,r,i){for(var a=[],o=0,s=t.length;o<s;++o)P(t,String(o))?a.push(m(e,t,n,r,String(o),!0)):a.push(``);return i.forEach(function(i){i.match(/^\d+$/)||a.push(m(e,t,n,r,i,!0))}),a}function m(e,t,n,r,i,a){var o,s,c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]};if(c.get?s=c.set?e.stylize(`[Getter/Setter]`,`special`):e.stylize(`[Getter]`,`special`):c.set&&(s=e.stylize(`[Setter]`,`special`)),P(r,i)||(o=`[`+i+`]`),s||(e.seen.indexOf(c.value)<0?(s=v(n)?u(e,c.value,null):u(e,c.value,n-1),s.indexOf(`
3
3
  `)>-1&&(s=a?s.split(`
4
4
  `).map(function(e){return` `+e}).join(`
5
5
  `).slice(2):`
@@ -25,5 +25,5 @@ Actual: `+e.attribValue);else{var i=e.tag,a=e.tags[e.tags.length-1]||e;i.ns===a.
25
25
  \0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\0\0\0\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n=this.bytesWritten-e,i=function(e,t,n,i,o){var s=a.transformTo(`string`,o(i));return l.CENTRAL_DIRECTORY_END+`\0\0\0\0`+r(e,2)+r(e,2)+r(t,4)+r(n,4)+r(s.length,2)+s}(this.dirRecords.length,n,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},u.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},u.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on(`data`,function(e){t.processChunk(e)}),e.on(`end`,function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on(`error`,function(e){t.error(e)}),this},u.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},u.prototype.error=function(e){var t=this._sources;if(!o.prototype.error.call(this,e))return!1;for(var n=0;n<t.length;n++)try{t[n].error(e)}catch{}return!0},u.prototype.lock=function(){o.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=u},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,n){var r=e(`../compressions`),i=e(`./ZipFileWorker`);n.generateWorker=function(e,t,n){var a=new i(t.streamFiles,n,t.platform,t.encodeFileName),o=0;try{e.forEach(function(e,n){o++;var i=function(e,t){var n=e||t,i=r[n];if(!i)throw Error(n+` is not a valid compression method !`);return i}(n.options.compression,t.compression),s=n.options.compressionOptions||t.compressionOptions||{},c=n.dir,l=n.date;n._compressWorker(i,s).withStreamInfo(`file`,{name:e,dir:c,date:l,comment:n.comment||``,unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(a)}),a.entriesCount=o}catch(e){a.error(e)}return a}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,n){function r(){if(!(this instanceof r))return new r;if(arguments.length)throw Error(`The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.`);this.files=Object.create(null),this.comment=null,this.root=``,this.clone=function(){var e=new r;for(var t in this)typeof this[t]!=`function`&&(e[t]=this[t]);return e}}(r.prototype=e(`./object`)).loadAsync=e(`./load`),r.support=e(`./support`),r.defaults=e(`./defaults`),r.version=`3.10.2`,r.loadAsync=function(e,t){return new r().loadAsync(e,t)},r.external=e(`./external`),t.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,n){var r=e(`./utils`),i=e(`./external`),a=e(`./utf8`),o=e(`./zipEntries`),s=e(`./stream/Crc32Probe`),c=e(`./nodejsUtils`);function l(e){return new i.Promise(function(t,n){var r=e.decompressed.getContentWorker().pipe(new s);r.on(`error`,function(e){n(e)}).on(`end`,function(){r.streamInfo.crc32===e.decompressed.crc32?t():n(Error(`Corrupted zip : CRC32 mismatch`))}).resume()})}t.exports=function(e,t){var n=this;return t=r.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),c.isNode&&c.isStream(e)?i.Promise.reject(Error(`JSZip can't accept a stream when loading a zip file.`)):r.prepareContent(`the loaded zip file`,e,!0,t.optimizedBinaryString,t.base64).then(function(e){var n=new o(t);return n.load(e),n}).then(function(e){var n=[i.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var a=0;a<r.length;a++)n.push(l(r[a]));return i.Promise.all(n)}).then(function(e){for(var i=e.shift(),a=i.files,o=0;o<a.length;o++){var s=a[o],c=s.fileNameStr,l=r.resolve(s.fileNameStr);n.file(l,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:t.createFolders}),s.dir||(n.file(l).unsafeOriginalName=c)}return i.zipComment.length&&(n.comment=i.zipComment),n})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,n){var r=e(`../utils`),i=e(`../stream/GenericWorker`);function a(e,t){i.call(this,`Nodejs stream input adapter for `+e),this._upstreamEnded=!1,this._bindStream(t)}r.inherits(a,i),a.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on(`data`,function(e){t.push({data:e,meta:{percent:0}})}).on(`error`,function(e){t.isPaused?this.generatedError=e:t.error(e)}).on(`end`,function(){t.isPaused?t._upstreamEnded=!0:t.end()})},a.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,n){var r=e(`readable-stream`).Readable;function i(e,t,n){r.call(this,t),this._helper=e;var i=this;e.on(`data`,function(e,t){i.push(e)||i._helper.pause(),n&&n(t)}).on(`error`,function(e){i.emit(`error`,e)}).on(`end`,function(){i.push(null)})}e(`../utils`).inherits(i,r),i.prototype._read=function(){this._helper.resume()},t.exports=i},{"../utils":32,"readable-stream":16}],14:[function(e,t,n){t.exports={isNode:typeof Buffer<`u`,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if(typeof e==`number`)throw Error(`The "data" argument must not be a number`);return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on==`function`&&typeof e.pause==`function`&&typeof e.resume==`function`}}},{}],15:[function(e,t,n){function r(e,t,n){var r,i=a.getTypeOf(t),s=a.extend(n||{},c);s.date=s.date||new Date,s.compression!==null&&(s.compression=s.compression.toUpperCase()),typeof s.unixPermissions==`string`&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=h(e)),s.createFolders&&(r=m(e))&&g.call(this,r,!0);var d=i===`string`&&!1===s.binary&&!1===s.base64;n&&n.binary!==void 0||(s.binary=!d),(t instanceof l&&t.uncompressedSize===0||s.dir||!t||t.length===0)&&(s.base64=!1,s.binary=!0,t=``,s.compression=`STORE`,i=`string`);var _=null;_=t instanceof l||t instanceof o?t:f.isNode&&f.isStream(t)?new p(e,t):a.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var v=new u(e,_,s);this.files[e]=v}var i=e(`./utf8`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=e(`./stream/StreamHelper`),c=e(`./defaults`),l=e(`./compressedObject`),u=e(`./zipObject`),d=e(`./generate`),f=e(`./nodejsUtils`),p=e(`./nodejs/NodejsStreamInputAdapter`),m=function(e){e.slice(-1)===`/`&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf(`/`);return 0<t?e.substring(0,t):``},h=function(e){return e.slice(-1)!==`/`&&(e+=`/`),e},g=function(e,t){return t=t===void 0?c.createFolders:t,e=h(e),this.files[e]||r.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function _(e){return Object.prototype.toString.call(e)===`[object RegExp]`}t.exports={load:function(){throw Error(`This method has been removed in JSZip 3.0, please check the upgrade guide.`)},forEach:function(e){var t,n,r;for(t in this.files)r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r)},filter:function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(r)}),t},file:function(e,t,n){if(arguments.length!==1)return e=this.root+e,r.call(this,e,t,n),this;if(_(e)){var i=e;return this.filter(function(e,t){return!t.dir&&i.test(e)})}var a=this.files[this.root+e];return a&&!a.dir?a:null},folder:function(e){if(!e)return this;if(_(e))return this.filter(function(t,n){return n.dir&&e.test(t)});var t=this.root+e,n=g.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||=(e.slice(-1)!==`/`&&(e+=`/`),this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter(function(t,n){return n.name.slice(0,e.length)===e}),r=0;r<n.length;r++)delete this.files[n[r].name];return this},generate:function(){throw Error(`This method has been removed in JSZip 3.0, please check the upgrade guide.`)},generateInternalStream:function(e){var t,n={};try{if((n=a.extend(e||{},{streamFiles:!1,compression:`STORE`,compressionOptions:null,type:``,platform:`DOS`,comment:null,mimeType:`application/zip`,encodeFileName:i.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),n.type===`binarystring`&&(n.type=`string`),!n.type)throw Error(`No output type specified.`);a.checkSupport(n.type),n.platform!==`darwin`&&n.platform!==`freebsd`&&n.platform!==`linux`&&n.platform!==`sunos`||(n.platform=`UNIX`),n.platform===`win32`&&(n.platform=`DOS`);var r=n.comment||this.comment||``;t=d.generateWorker(this,n,r)}catch(e){(t=new o(`error`)).error(e)}return new s(t,n.type||`string`,n.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e||={}).type||(e.type=`nodebuffer`),this.generateInternalStream(e).toNodejsStream(t)}}},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,n){t.exports=e(`stream`)},{stream:void 0}],17:[function(e,t,n){var r=e(`./DataReader`);function i(e){r.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),a=this.length-4;0<=a;--a)if(this.data[a]===t&&this.data[a+1]===n&&this.data[a+2]===r&&this.data[a+3]===i)return a-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&n===a[1]&&r===a[2]&&i===a[3]},i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(e,t,n){var r=e(`../utils`);function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw Error(`End of data reached (data length = `+this.length+`, asked index = `+e+`). Corrupted zip ?`)},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw Error(`The stream '`+this+`' has already been used.`);this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on(`data`,function(e){t.processChunk(e)}),e.on(`end`,function(){t.end()}),e.on(`error`,function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw Error(`The stream '`+this+`' has already been used.`);this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e=`Worker `+this.name;return this.previous?this.previous+` -> `+e:e}},t.exports=r},{}],29:[function(e,t,n){var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{n(function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n<t.length;n++)a+=t[n].length;switch(e){case`string`:return t.join(``);case`array`:return Array.prototype.concat.apply([],t);case`uint8array`:for(i=new Uint8Array(a),n=0;n<t.length;n++)i.set(t[n],r),r+=t[n].length;return i;case`nodebuffer`:return Buffer.concat(t);default:throw Error(`concat : unsupported type '`+e+`'`)}}(s,a),l))}catch(e){i(e)}a=[]}).resume()})}function d(e,t,n){var o=t;switch(t){case`blob`:case`arraybuffer`:o=`uint8array`;break;case`base64`:o=`string`}try{this._internalType=o,this._outputType=t,this._mimeType=n,r.checkSupport(o),this._worker=e.pipe(new i(o)),e.lock()}catch(e){this._worker=new a(`error`),this._worker.error(e)}}d.prototype={accumulate:function(e){return u(this,e)},on:function(e,t){var n=this;return e===`data`?this._worker.on(e,function(e){t.call(n,e.data,e.meta)}):this._worker.on(e,function(){r.delay(t,arguments,n)}),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(r.checkSupport(`nodestream`),this._outputType!==`nodebuffer`)throw Error(this._outputType+` is not supported by this method`);return new l(this,{objectMode:this._outputType!==`nodebuffer`},e)}},t.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer=typeof ArrayBuffer<`u`&&typeof Uint8Array<`u`,n.nodebuffer=typeof Buffer<`u`,n.uint8array=typeof Uint8Array<`u`,typeof ArrayBuffer>`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a<s;a++)(64512&(n=e.charCodeAt(a)))==55296&&a+1<s&&(64512&(r=e.charCodeAt(a+1)))==56320&&(n=65536+(n-55296<<10)+(r-56320),a++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=i.uint8array?new Uint8Array(c):Array(c),a=o=0;o<c;a++)(64512&(n=e.charCodeAt(a)))==55296&&a+1<s&&(64512&(r=e.charCodeAt(a+1)))==56320&&(n=65536+(n-55296<<10)+(r-56320),a++),n<128?t[o++]=n:(n<2048?t[o++]=192|n>>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t<o;)if((i=e[t++])<128)c[n++]=i;else if(4<(a=s[i]))c[n++]=65533,t+=a-1;else{for(i&=a===2?31:a===3?15:7;1<a&&t<o;)i=i<<6|63&e[t++],a--;1<a?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}e(`setimmediate`),n.newBlob=function(e,t){n.checkSupport(`blob`);try{return new Blob([e],{type:t})}catch{try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return r.append(e),r.getBlob(t)}catch{throw Error(`Bug : can't construct the Blob.`)}}};var l={stringifyByChunk:function(e,t,n){var r=[],i=0,a=e.length;if(a<=n)return String.fromCharCode.apply(null,e);for(;i<a;)t===`array`||t===`nodebuffer`?r.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+n,a)))):r.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+n,a)))),i+=n;return r.join(``)},stringifyByChar:function(e){for(var t=``,n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return r.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return r.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function u(e){var t=65536,r=n.getTypeOf(e),i=!0;if(r===`uint8array`?i=l.applyCanBeUsed.uint8array:r===`nodebuffer`&&(i=l.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return l.stringifyByChunk(e,r,t)}catch{t=Math.floor(t/2)}return l.stringifyByChar(e)}function d(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}n.applyFromCharCode=u;var f={};f.string={string:s,array:function(e){return c(e,Array(e.length))},arraybuffer:function(e){return f.string.uint8array(e).buffer},uint8array:function(e){return c(e,new Uint8Array(e.length))},nodebuffer:function(e){return c(e,a.allocBuffer(e.length))}},f.array={string:u,array:s,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return a.newBufferFrom(e)}},f.arraybuffer={string:function(e){return u(new Uint8Array(e))},array:function(e){return d(new Uint8Array(e),Array(e.byteLength))},arraybuffer:s,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return a.newBufferFrom(new Uint8Array(e))}},f.uint8array={string:u,array:function(e){return d(e,Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:s,nodebuffer:function(e){return a.newBufferFrom(e)}},f.nodebuffer={string:u,array:function(e){return d(e,Array(e.length))},arraybuffer:function(e){return f.nodebuffer.uint8array(e).buffer},uint8array:function(e){return d(e,new Uint8Array(e.length))},nodebuffer:s},n.transformTo=function(e,t){return t||=``,e?(n.checkSupport(e),f[n.getTypeOf(t)][e](t)):t},n.resolve=function(e){for(var t=e.split(`/`),n=[],r=0;r<t.length;r++){var i=t[r];i===`.`||i===``&&r!==0&&r!==t.length-1||(i===`..`?n.pop():n.push(i))}return n.join(`/`)},n.getTypeOf=function(e){if(typeof e==`string`)return`string`;var t=Object.prototype.toString.call(e);return t===`[object Array]`?`array`:r.nodebuffer&&a.isBuffer(e)?`nodebuffer`:r.uint8array&&t===`[object Uint8Array]`?`uint8array`:r.arraybuffer&&t===`[object ArrayBuffer]`?`arraybuffer`:void 0},n.checkSupport=function(e){if(!r[e.toLowerCase()])throw Error(e+` is not supported by this platform`)},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(e){var t,n,r=``;for(n=0;n<(e||``).length;n++)r+=`\\x`+((t=e.charCodeAt(n))<16?`0`:``)+t.toString(16).toUpperCase();return r},n.delay=function(e,t,n){setImmediate(function(){e.apply(n||null,t||[])})},n.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n},n.extend=function(){var e,t,n={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&n[t]===void 0&&(n[t]=arguments[e][t]);return n},n.prepareContent=function(e,t,a,s,l){return o.Promise.resolve(t).then(function(t){return r.blob&&(t instanceof Blob||[`[object File]`,`[object Blob]`].indexOf(Object.prototype.toString.call(t))!==-1)?Blob.prototype.arrayBuffer===void 0?typeof FileReader<`u`?new o.Promise(function(e,n){var r=new FileReader;r.onload=function(t){e(t.target.result)},r.onerror=function(e){n(e.target.error)},r.readAsArrayBuffer(t)}):o.Promise.reject(Error(e+` is a Blob, but we have no way of reading it.`)):t.arrayBuffer():t}).then(function(t){var u=n.getTypeOf(t);return u?(u===`arraybuffer`?t=n.transformTo(`uint8array`,t):u===`string`&&(l?t=i.decode(t):a&&!0!==s&&(t=function(e){return c(e,r.uint8array?new Uint8Array(e.length):Array(e.length))}(t))),t):o.Promise.reject(Error(`Can't read the data of '`+e+`'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?`))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,n){var r=e(`./reader/readerFor`),i=e(`./utils`),a=e(`./signature`),o=e(`./zipEntry`),s=e(`./support`);function c(e){this.files=[],this.loadOptions=e}c.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw Error(`Corrupted zip or bug: unexpected signature (`+i.pretty(t)+`, expected `+i.pretty(e)+`)`)}},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e);var r=this.reader.readString(4)===t;return this.reader.setIndex(n),r},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=s.uint8array?`uint8array`:`array`,n=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,n,r=this.zip64EndOfCentralSize-44;0<r;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw Error(`Multi-volumes zip are not supported`)},readLocalFiles:function(){for(var e=0,t;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(e=new o({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw Error(`Corrupted zip or bug: expected `+this.centralDirRecords+` records in central dir, got `+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?Error(`Corrupted zip: can't find end of central directory`):Error(`Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html`);this.reader.setIndex(e);var t=e;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw Error(`Corrupted zip: can't find the ZIP64 end of central directory locator`);if(this.reader.setIndex(e),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw Error(`Corrupted zip: can't find the ZIP64 end of central directory`);this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var r=t-n;if(0<r)this.isSignature(t,a.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw Error(`Corrupted zip: missing `+Math.abs(r)+` bytes.`)},prepareReader:function(e){this.reader=r(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=c},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,n){var r=e(`./reader/readerFor`),i=e(`./utils`),a=e(`./compressedObject`),o=e(`./crc32`),s=e(`./utf8`),c=e(`./compressions`),l=e(`./support`);function u(e,t){this.options=e,this.loadOptions=t}u.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),this.compressedSize===-1||this.uncompressedSize===-1)throw Error(`Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)`);if((t=function(e){for(var t in c)if(Object.prototype.hasOwnProperty.call(c,t)&&c[t].magic===e)return c[t];return null}(this.compressionMethod))===null)throw Error(`Corrupted zip : compression `+i.pretty(this.compressionMethod)+` unknown (inner file : `+i.transformTo(`string`,this.fileName)+`)`);this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw Error(`Encrypted zip are not supported`);e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4<i;)t=e.readInt(2),n=e.readInt(2),r=e.readData(n),this.extraFields[t]={id:t,length:n,value:r};e.setIndex(i)},handleUTF8:function(){var e=l.uint8array?`uint8array`:`array`;if(this.useUTF8())this.fileNameStr=s.utf8decode(this.fileName),this.fileCommentStr=s.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(t!==null)this.fileNameStr=t;else{var n=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var r=this.findExtraFieldUnicodeComment();if(r!==null)this.fileCommentStr=r;else{var a=i.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(a)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=r(e.value);return t.readInt(1)===1&&o(this.fileName)===t.readInt(4)?s.utf8decode(t.readData(e.length-5)):null}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=r(e.value);return t.readInt(1)===1&&o(this.fileComment)===t.readInt(4)?s.utf8decode(t.readData(e.length-5)):null}return null}},t.exports=u},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,n){function r(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}}var i=e(`./stream/StreamHelper`),a=e(`./stream/DataWorker`),o=e(`./utf8`),s=e(`./compressedObject`),c=e(`./stream/GenericWorker`);r.prototype={internalStream:function(e){var t=null,n=`string`;try{if(!e)throw Error(`No output type specified.`);var r=(n=e.toLowerCase())===`string`||n===`text`;n!==`binarystring`&&n!==`text`||(n=`string`),t=this._decompressWorker();var a=!this._dataBinary;a&&!r&&(t=t.pipe(new o.Utf8EncodeWorker)),!a&&r&&(t=t.pipe(new o.Utf8DecodeWorker))}catch(e){(t=new c(`error`)).error(e)}return new i(t,n,``)},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||`nodebuffer`).toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof s&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new o.Utf8EncodeWorker)),s.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof c?this._data:new a(this._data)}};for(var l=[`asText`,`asBinary`,`asNodeBuffer`,`asUint8Array`,`asArrayBuffer`],u=function(){throw Error(`This method has been removed in JSZip 3.0, please check the upgrade guide.`)},d=0;d<l.length;d++)r.prototype[l[d]]=u;t.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,n){(function(e){var n,r,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var a=0,o=new i(u),s=e.document.createTextNode(``);o.observe(s,{characterData:!0}),n=function(){s.data=a=++a%2}}else if(e.setImmediate||e.MessageChannel===void 0)n=`document`in e&&`onreadystatechange`in e.document.createElement(`script`)?function(){var t=e.document.createElement(`script`);t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var c=new e.MessageChannel;c.port1.onmessage=u,n=function(){c.port2.postMessage(0)}}var l=[];function u(){var e,t;r=!0;for(var n=l.length;n;){for(t=l,l=[],e=-1;++e<n;)t[e]();n=l.length}r=!1}t.exports=function(e){l.push(e)!==1||r||n()}}).call(this,I===void 0?typeof self<`u`?self:typeof window<`u`?window:{}:I)},{}],37:[function(e,t,n){var r=e(`immediate`);function i(){}var a={},o=[`REJECTED`],s=[`FULFILLED`],c=[`PENDING`];function l(e){if(typeof e!=`function`)throw TypeError(`resolver must be a function`);this.state=c,this.queue=[],this.outcome=void 0,e!==i&&p(this,e)}function u(e,t,n){this.promise=e,typeof t==`function`&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),typeof n==`function`&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function d(e,t,n){r(function(){var r;try{r=t(n)}catch(t){return a.reject(e,t)}r===e?a.reject(e,TypeError(`Cannot resolve promise with itself`)):a.resolve(e,r)})}function f(e){var t=e&&e.then;if(e&&(typeof e==`object`||typeof e==`function`)&&typeof t==`function`)return function(){t.apply(e,arguments)}}function p(e,t){var n=!1;function r(t){n||(n=!0,a.reject(e,t))}function i(t){n||(n=!0,a.resolve(e,t))}var o=m(function(){t(i,r)});o.status===`error`&&r(o.value)}function m(e,t){var n={};try{n.value=e(t),n.status=`success`}catch(e){n.status=`error`,n.value=e}return n}(t.exports=l).prototype.finally=function(e){if(typeof e!=`function`)return this;var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})},l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){if(typeof e!=`function`&&this.state===s||typeof t!=`function`&&this.state===o)return this;var n=new this.constructor(i);return this.state===c?this.queue.push(new u(n,e,t)):d(n,this.state===s?e:t,this.outcome),n},u.prototype.callFulfilled=function(e){a.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){a.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},a.resolve=function(e,t){var n=m(f,t);if(n.status===`error`)return a.reject(e,n.value);var r=n.value;if(r)p(e,r);else{e.state=s,e.outcome=t;for(var i=-1,o=e.queue.length;++i<o;)e.queue[i].callFulfilled(t)}return e},a.reject=function(e,t){e.state=o,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},l.resolve=function(e){return e instanceof this?e:a.resolve(new this(i),e)},l.reject=function(e){var t=new this(i);return a.reject(t,e)},l.all=function(e){var t=this;if(Object.prototype.toString.call(e)!==`[object Array]`)return this.reject(TypeError(`must be an array`));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var o=Array(n),s=0,c=-1,l=new this(i);++c<n;)u(e[c],c);return l;function u(e,i){t.resolve(e).then(function(e){o[i]=e,++s!==n||r||(r=!0,a.resolve(l,o))},function(e){r||(r=!0,a.reject(l,e))})}},l.race=function(e){var t=this;if(Object.prototype.toString.call(e)!==`[object Array]`)return this.reject(TypeError(`must be an array`));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var o=-1,s=new this(i);++o<n;)c=e[o],t.resolve(c).then(function(e){r||(r=!0,a.resolve(s,e))},function(e){r||(r=!0,a.reject(s,e))});var c;return s}},{immediate:36}],38:[function(e,t,n){var r={};(0,e(`./lib/utils/common`).assign)(r,e(`./lib/deflate`),e(`./lib/inflate`),e(`./lib/zlib/constants`)),t.exports=r},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,n){var r=e(`./zlib/deflate`),i=e(`./utils/common`),a=e(`./utils/strings`),o=e(`./zlib/messages`),s=e(`./zlib/zstream`),c=Object.prototype.toString,l=0,u=-1,d=0,f=8;function p(e){if(!(this instanceof p))return new p(e);this.options=i.assign({level:u,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:``},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==l)throw Error(o[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var m=typeof t.dictionary==`string`?a.string2buf(t.dictionary):c.call(t.dictionary)===`[object ArrayBuffer]`?new Uint8Array(t.dictionary):t.dictionary;if((n=r.deflateSetDictionary(this.strm,m))!==l)throw Error(o[n]);this._dict_set=!0}}function m(e,t){var n=new p(t);if(n.push(e,!0),n.err)throw n.msg||o[n.err];return n.result}p.prototype.push=function(e,t){var n,o,s=this.strm,u=this.options.chunkSize;if(this.ended)return!1;o=t===~~t?t:!0===t?4:0,s.input=typeof e==`string`?a.string2buf(e):c.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,s.next_in=0,s.avail_in=s.input.length;do{if(s.avail_out===0&&(s.output=new i.Buf8(u),s.next_out=0,s.avail_out=u),(n=r.deflate(s,o))!==1&&n!==l)return this.onEnd(n),!(this.ended=!0);s.avail_out!==0&&(s.avail_in!==0||o!==4&&o!==2)||(this.options.to===`string`?this.onData(a.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((0<s.avail_in||s.avail_out===0)&&n!==1);return o===4?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===l):o!==2||(this.onEnd(l),!(s.avail_out=0))},p.prototype.onData=function(e){this.chunks.push(e)},p.prototype.onEnd=function(e){e===l&&(this.result=this.options.to===`string`?this.chunks.join(``):i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Deflate=p,n.deflate=m,n.deflateRaw=function(e,t){return(t||={}).raw=!0,m(e,t)},n.gzip=function(e,t){return(t||={}).gzip=!0,m(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,n){var r=e(`./zlib/inflate`),i=e(`./utils/common`),a=e(`./utils/strings`),o=e(`./zlib/constants`),s=e(`./zlib/messages`),c=e(`./zlib/zstream`),l=e(`./zlib/gzheader`),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:``},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==o.Z_OK)throw Error(s[n]);this.header=new l,r.inflateGetHeader(this.strm,this.header)}function f(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}d.prototype.push=function(e,t){var n,s,c,l,d,f,p=this.strm,m=this.options.chunkSize,h=this.options.dictionary,g=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,p.input=typeof e==`string`?a.binstring2buf(e):u.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,p.next_in=0,p.avail_in=p.input.length;do{if(p.avail_out===0&&(p.output=new i.Buf8(m),p.next_out=0,p.avail_out=m),(n=r.inflate(p,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&h&&(f=typeof h==`string`?a.string2buf(h):u.call(h)===`[object ArrayBuffer]`?new Uint8Array(h):h,n=r.inflateSetDictionary(this.strm,f)),n===o.Z_BUF_ERROR&&!0===g&&(n=o.Z_OK,g=!1),n!==o.Z_STREAM_END&&n!==o.Z_OK)return this.onEnd(n),!(this.ended=!0);p.next_out&&(p.avail_out!==0&&n!==o.Z_STREAM_END&&(p.avail_in!==0||s!==o.Z_FINISH&&s!==o.Z_SYNC_FLUSH)||(this.options.to===`string`?(c=a.utf8border(p.output,p.next_out),l=p.next_out-c,d=a.buf2string(p.output,c),p.next_out=l,p.avail_out=m-l,l&&i.arraySet(p.output,p.output,c,l,0),this.onData(d)):this.onData(i.shrinkBuf(p.output,p.next_out)))),p.avail_in===0&&p.avail_out===0&&(g=!0)}while((0<p.avail_in||p.avail_out===0)&&n!==o.Z_STREAM_END);return n===o.Z_STREAM_END&&(s=o.Z_FINISH),s===o.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===o.Z_OK):s!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),!(p.avail_out=0))},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===o.Z_OK&&(this.result=this.options.to===`string`?this.chunks.join(``):i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=d,n.inflate=f,n.inflateRaw=function(e,t){return(t||={}).raw=!0,f(e,t)},n.ungzip=f},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,n){var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Int32Array<`u`;n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if(typeof n!=`object`)throw TypeError(n+`must be non-object`);for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){for(var t=r=0,n=e.length,r,i,a,o;t<n;t++)r+=e[t].length;for(o=new Uint8Array(r),t=i=0,n=e.length;t<n;t++)a=e[t],o.set(a,i),i+=a.length;return o}},a={arraySet:function(e,t,n,r,i){for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,a))},n.setTyped(r)},{}],42:[function(e,t,n){var r=e(`./common`),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var o=new r.Buf8(256),s=0;s<256;s++)o[s]=252<=s?6:248<=s?5:240<=s?4:224<=s?3:192<=s?2:1;function c(e,t){if(t<65537&&(e.subarray&&a||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n=``,o=0;o<t;o++)n+=String.fromCharCode(e[o]);return n}o[254]=o[254]=1,n.string2buf=function(e){var t,n,i,a,o,s=e.length,c=0;for(a=0;a<s;a++)(64512&(n=e.charCodeAt(a)))==55296&&a+1<s&&(64512&(i=e.charCodeAt(a+1)))==56320&&(n=65536+(n-55296<<10)+(i-56320),a++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(c),a=o=0;o<c;a++)(64512&(n=e.charCodeAt(a)))==55296&&a+1<s&&(64512&(i=e.charCodeAt(a+1)))==56320&&(n=65536+(n-55296<<10)+(i-56320),a++),n<128?t[o++]=n:(n<2048?t[o++]=192|n>>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,r,i,a,s=t||e.length,l=Array(2*s);for(n=r=0;n<s;)if((i=e[n++])<128)l[r++]=i;else if(4<(a=o[i]))l[r++]=65533,n+=a-1;else{for(i&=a===2?31:a===3?15:7;1<a&&n<s;)i=i<<6|63&e[n++],a--;1<a?l[r++]=65533:i<65536?l[r++]=i:(i-=65536,l[r++]=55296|i>>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,r){for(var i=65535&e,a=e>>>16&65535,o=0;n!==0;){for(n-=o=2e3<n?2e3:n;a=a+(i=i+t[r++]|0)|0,--o;);i%=65521,a%=65521}return i|a<<16}},{}],44:[function(e,t,n){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,n){var r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s<o;s++)e=e>>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function N(e){return(e<<1)-(4<e?9:0)}function P(e){for(var t=e.length;0<=--t;)e[t]=0}function F(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function I(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function z(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&a<f);if(r=w-(f-a),a=f-w,o<r){if(e.match_start=t,s<=(o=r))break;p=l[a+o-1],m=l[a+o]}}while((t=d[t&u])>c&&--i!=0);return o<=e.lookahead?o:e.lookahead}function B(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f<p&&(p=f),n=p===0?0:(l.avail_in-=p,i.arraySet(u,l.input,l.next_in,p,d),l.state.wrap===1?l.adler=o(l.adler,u,p,d):l.state.wrap===2&&(l.adler=s(l.adler,u,p,d)),l.next_in+=p,l.total_in+=p,p),e.lookahead+=n,e.lookahead+e.insert>=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+C-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<C)););}while(e.lookahead<T&&e.strm.avail_in!==0)}function V(e,t){for(var n,r;;){if(e.lookahead<T){if(B(e),e.lookahead<T&&t===l)return O;if(e.lookahead===0)break}if(n=0,e.lookahead>=C&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-T&&(e.match_length=z(e,n)),e.match_length>=C){if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,--e.match_length!=0;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask}else r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=e.strstart<C-1?e.strstart:C-1,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}function ee(e,t){for(var n,r,i;;){if(e.lookahead<T){if(B(e),e.lookahead<T&&t===l)return O;if(e.lookahead===0)break}if(n=0,e.lookahead>=C&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=C-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-T&&(e.match_length=z(e,n),e.match_length<=5&&(e.strategy===1||e.match_length===C&&4096<e.strstart-e.match_start)&&(e.match_length=C-1)),e.prev_length>=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+C-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),--e.prev_length!=0;);if(e.match_available=0,e.match_length=C-1,e.strstart++,r&&(I(e,!1),e.strm.avail_out===0))return O}else if(e.match_available){if((r=a._tr_tally(e,0,e.window[e.strstart-1]))&&I(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return O}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=a._tr_tally(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<C-1?e.strstart:C-1,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}function H(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function te(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=g,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*x),this.dyn_dtree=new i.Buf16(2*(2*y+1)),this.bl_tree=new i.Buf16(2*(2*b+1)),P(this.dyn_ltree),P(this.dyn_dtree),P(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(S+1),this.heap=new i.Buf16(2*v+1),P(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*v+1),P(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ne(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=h,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?E:D,e.adler=t.wrap===2?0:1,t.last_flush=l,a._tr_init(t),d):M(e,f)}function U(e){var t=ne(e);return t===d&&function(e){e.window_size=2*e.w_size,P(e.head),e.max_lazy_match=r[e.level].max_lazy,e.good_match=r[e.level].good_length,e.nice_match=r[e.level].nice_length,e.max_chain_length=r[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=C-1,e.match_available=0,e.ins_h=0}(e.state),t}function re(e,t,n,r,a,o){if(!e)return f;var s=1;if(t===p&&(t=6),r<0?(s=0,r=-r):15<r&&(s=2,r-=16),a<1||_<a||n!==g||r<8||15<r||t<0||9<t||o<0||m<o)return M(e,f);r===8&&(r=9);var c=new te;return(e.state=c).strm=e,c.wrap=s,c.gzhead=null,c.w_bits=r,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=a+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+C-1)/C),c.window=new i.Buf8(2*c.w_size),c.head=new i.Buf16(c.hash_size),c.prev=new i.Buf16(c.w_size),c.lit_bufsize=1<<a+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new i.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=o,c.method=n,U(e)}r=[new H(0,0,0,0,function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(B(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,I(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(I(e,!1),e.strm.avail_out),O)}),new H(4,4,8,4,V),new H(4,5,16,8,V),new H(4,6,32,32,V),new H(4,4,16,16,ee),new H(8,16,32,32,ee),new H(8,16,128,128,ee),new H(8,32,128,256,ee),new H(32,128,258,1024,ee),new H(32,258,258,4096,ee)],n.deflateInit=function(e,t){return re(e,t,g,15,8,0)},n.deflateInit2=re,n.deflateReset=U,n.deflateResetKeep=ne,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5<t||t<0)return e?M(e,f):f;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===666&&t!==u)return M(e,e.avail_out===0?-5:f);if(i.strm=e,n=i.last_flush,i.last_flush=t,i.status===E){if(i.wrap===2)e.adler=0,L(i,31),L(i,139),L(i,8),i.gzhead?(L(i,+!!i.gzhead.text+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),L(i,255&i.gzhead.time),L(i,i.gzhead.time>>8&255),L(i,i.gzhead.time>>16&255),L(i,i.gzhead.time>>24&255),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(L(i,255&i.gzhead.extra.length),L(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(L(i,0),L(i,0),L(i,0),L(i,0),L(i,0),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,R(i,p),i.strstart!==0&&(R(i,e.adler>>>16),R(i,65535&e.adler)),e.adler=1}}if(i.status===69){if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending!==i.pending_buf_size));)L(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73}if(i.status===73){if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,L(i,c)}while(c!==0);i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91}if(i.status===91){if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,L(i,c)}while(c!==0);i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103}if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(e),i.pending+2<=i.pending_buf_size&&(L(i,255&e.adler),L(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(F(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&N(t)<=N(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(B(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(B(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0<e.strstart&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){o=e.strstart+w;do;while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<o);e.match_length=w-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(P(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),F(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(L(i,255&e.adler),L(i,e.adler>>8&255),L(i,e.adler>>16&255),L(i,e.adler>>24&255),L(i,255&e.total_in),L(i,e.total_in>>8&255),L(i,e.total_in>>16&255),L(i,e.total_in>>24&255)):(R(i,e.adler>>>16),R(i,65535&e.adler)),F(e),0<i.wrap&&(i.wrap=-i.wrap),i.pending===0?1:d):d},n.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==E&&t!==69&&t!==73&&t!==91&&t!==103&&t!==D&&t!==666?M(e,f):(e.state=null,t===D?M(e,-3):d):f},n.deflateSetDictionary=function(e,t){var n,r,a,s,c,l,u,p,m=t.length;if(!e||!e.state||(s=(n=e.state).wrap)===2||s===1&&n.status!==E||n.lookahead)return f;for(s===1&&(e.adler=o(e.adler,t,m,0)),n.wrap=0,m>=n.w_size&&(s===0&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,B(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+C-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++,--a;);n.strstart=r,n.lookahead=C-1,B(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=C-1,n.match_available=0,e.next_in=l,e.input=u,e.avail_in=c,n.wrap=s,d},n.deflateInfo=`pako deflate (from Nodeca project)`},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,n){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=``,this.comment=``,this.hcrc=0,this.done=!1}},{}],48:[function(e,t,n){t.exports=function(e,t){var n=e.state,r=e.next_in,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=e.input,E;i=r+(e.avail_in-5),a=e.next_out,E=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),c=n.dmax,l=n.wsize,u=n.whave,d=n.wnext,f=n.window,p=n.hold,m=n.bits,h=n.lencode,g=n.distcode,_=(1<<n.lenbits)-1,v=(1<<n.distbits)-1;e:do{m<15&&(p+=T[r++]<<m,m+=8,p+=T[r++]<<m,m+=8),y=h[p&_];t:for(;;){if(p>>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<<b)-1)];continue t}if(32&b){n.mode=12;break e}e.msg=`invalid literal/length code`,n.mode=30;break e}x=65535&y,(b&=15)&&(m<b&&(p+=T[r++]<<m,m+=8),x+=p&(1<<b)-1,p>>>=b,m-=b),m<15&&(p+=T[r++]<<m,m+=8,p+=T[r++]<<m,m+=8),y=g[p&v];r:for(;;){if(p>>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<<b)-1)];continue r}e.msg=`invalid distance code`,n.mode=30;break e}if(S=65535&y,m<(b&=15)&&(p+=T[r++]<<m,(m+=8)<b&&(p+=T[r++]<<m,m+=8)),c<(S+=p&(1<<b)-1)){e.msg=`invalid distance too far back`,n.mode=30;break e}if(p>>>=b,m-=b,(b=a-o)<S){if(u<(b=S-b)&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break e}if(w=f,(C=0)===d){if(C+=l-b,b<x){for(x-=b;E[a++]=f[C++],--b;);C=a-S,w=E}}else if(d<b){if(C+=l+d-b,(b-=d)<x){for(x-=b;E[a++]=f[C++],--b;);if(C=0,d<x){for(x-=b=d;E[a++]=f[C++],--b;);C=a-S,w=E}}}else if(C+=d-b,b<x){for(x-=b;E[a++]=f[C++],--b;);C=a-S,w=E}for(;2<x;)E[a++]=w[C++],E[a++]=w[C++],E[a++]=w[C++],x-=3;x&&(E[a++]=w[C++],1<x&&(E[a++]=w[C++]))}else{for(C=a-S;E[a++]=E[C++],E[a++]=E[C++],E[a++]=E[C++],2<(x-=3););x&&(E[a++]=E[C++],1<x&&(E[a++]=E[C++]))}break}}break}}while(r<i&&a<s);r-=x=m>>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=a<s?s-a+257:257-(a-s),n.hold=p,n.bits=m}},{}],49:[function(e,t,n){var r=e(`../utils/common`),i=e(`./adler32`),a=e(`./crc32`),o=e(`./inffast`),s=e(`./inftrees`),c=1,l=2,u=0,d=-2,f=1,p=852,m=592;function h(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?d:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,v(e))):d}function b(e,t){var n,r;return e?(r=new g,(e.state=r).window=null,(n=y(e,t))!==u&&(e.state=null),n):d}var x,S,C=!0;function w(e){if(C){var t;for(x=new r.Buf32(512),S=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(c,e.lens,0,288,x,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(l,e.lens,0,32,S,0,e.work,{bits:5}),C=!1}e.lencode=x,e.lenbits=9,e.distcode=S,e.distbits=5}function T(e,t,n,i){var a,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new r.Buf8(o.wsize)),i>=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}n.inflateReset=v,n.inflateReset2=y,n.inflateResetKeep=_,n.inflateInit=function(e){return b(e,15)},n.inflateInit2=b,n.inflate=function(e,t){var n,p,m,g,_,v,y,b,x,S,C,E,D,O,k,A,j,M,N,P,F,I,L,R,z=0,B=new r.Buf8(4),V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return d;(n=e.state).mode===12&&(n.mode=13),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,S=v,C=y,I=u;e:for(;;)switch(n.mode){case f:if(n.wrap===0){n.mode=13;break}for(;x<16;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(2&n.wrap&&b===35615){B[n.check=0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,F=8+(15&(b>>>=4)),n.wbits===0)n.wbits=F;else if(F>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<<F,e.adler=n.check=1,n.mode=512&b?10:12,x=b=0;break;case 2:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(n.flags=b,(255&n.flags)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(57344&n.flags){e.msg=`unknown header flags set`,n.mode=30;break}n.head&&(n.head.text=b>>8&1),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.head&&(n.head.time=b),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,B[2]=b>>>16&255,B[3]=b>>>24&255,n.check=a(n.check,B,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.head&&(n.head.xflags=255&b,n.head.os=b>>8),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.length=b,n.head&&(n.head.extra_len=b),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,F)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;F=p[g+E++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F)),F&&E<v;);if(512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,F)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(v===0)break e;for(E=0;F=p[g+E++],n.head&&F&&n.length<65536&&(n.head.comment+=String.fromCharCode(F)),F&&E<v;);if(512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,F)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(b!==(65535&n.check)){e.msg=`header crc mismatch`,n.mode=30;break}x=b=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}e.adler=n.check=h(b),x=b=0,n.mode=11;case 11:if(n.havedict===0)return e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,2;e.adler=n.check=1,n.mode=12;case 12:if(t===5||t===6)break e;case 13:if(n.last){b>>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}switch(n.last=1&b,--x,3&(b>>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if((65535&b)!=(b>>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v<E&&(E=v),y<E&&(E=y),E===0)break e;r.arraySet(m,p,g,E,_),v-=E,g+=E,y-=E,_+=E,n.length-=E;break}n.mode=12;break;case 17:for(;x<14;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(n.nlen=257+(31&b),b>>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286<n.nlen||30<n.ndist){e.msg=`too many length or distance symbols`,n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;x<3;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.lens[V[n.have++]]=7&b,b>>>=3,x-=3}for(;n.have<19;)n.lens[V[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},I=s(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;A=(z=n.lencode[b&(1<<n.lenbits)-1])>>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(j<16)b>>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(R=k+2;x<R;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(b>>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}F=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(R=k+3;x<R;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}x-=k,F=0,E=3+(7&(b>>>=k)),b>>>=3,x-=3}else{for(R=k+7;x<R;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}x-=k,F=0,E=11+(127&(b>>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=F}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,L={bits:n.lenbits},I=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},I=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,I){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(z=n.lencode[b&(1<<n.lenbits)-1])>>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(A&&!(240&A)){for(M=k,N=A,P=j;A=(z=n.lencode[P+((b&(1<<M+N)-1)>>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}b>>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(R=n.extra;x<R;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.length+=b&(1<<n.extra)-1,b>>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(z=n.distcode[b&(1<<n.distbits)-1])>>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(!(240&A)){for(M=k,N=A,P=j;A=(z=n.distcode[P+((b&(1<<M+N)-1)>>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}b>>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(R=n.extra;x<R;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}n.offset+=b&(1<<n.extra)-1,b>>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(y<E&&(E=y),y-=E,n.length-=E;m[_++]=O[D++],--E;);n.length===0&&(n.mode=21);break;case 26:if(y===0)break e;m[_++]=n.length,y--,n.mode=21;break;case 27:if(n.wrap){for(;x<32;){if(v===0)break e;v--,b|=p[g++]<<x,x+=8}if(C-=y,e.total_out+=C,n.total+=C,C&&(e.adler=n.check=n.flags?a(n.check,m,C,_-C):i(n.check,m,C,_-C)),C=y,(n.flags?b:h(b))!==n.check){e.msg=`incorrect data check`,n.mode=30;break}x=b=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;x<32;){if(v===0)break e;v--,b+=p[g++]<<x,x+=8}if(b!==(0|n.total)){e.msg=`incorrect length check`,n.mode=30;break}x=b=0}n.mode=29;case 29:I=1;break e;case 30:I=-3;break e;case 31:return-4;default:return d}return e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,(n.wsize||C!==e.avail_out&&n.mode<30&&(n.mode<27||t!==4))&&T(e,e.output,e.next_out,C-e.avail_out)?(n.mode=31,-4):(S-=e.avail_in,C-=e.avail_out,e.total_in+=S,e.total_out+=C,n.total+=C,n.wrap&&C&&(e.adler=n.check=n.flags?a(n.check,m,C,e.next_out-C):i(n.check,m,C,e.next_out-C)),e.data_type=n.bits+(n.last?64:0)+(n.mode===12?128:0)+(n.mode===20||n.mode===15?256:0),(S==0&&C===0||t===4)&&I===u&&(I=-5),I)},n.inflateEnd=function(e){if(!e||!e.state)return d;var t=e.state;return t.window&&=null,e.state=null,u},n.inflateGetHeader=function(e,t){var n;return e&&e.state&&2&(n=e.state).wrap?((n.head=t).done=!1,u):d},n.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?(n=e.state).wrap!==0&&n.mode!==11?d:n.mode===11&&i(1,t,r,0)!==n.check?-3:T(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,u):d},n.inflateInfo=`pako inflate (from Nodeca project)`},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,n){var r=e(`../utils/common`),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,c,l,u,d,f){var p,m,h,g,_,v,y,b,x,S=f.bits,C=0,w=0,T=0,E=0,D=0,O=0,k=0,A=0,j=0,M=0,N=null,P=0,F=new r.Buf16(16),I=new r.Buf16(16),L=null,R=0;for(C=0;C<=15;C++)F[C]=0;for(w=0;w<c;w++)F[t[n+w]]++;for(D=S,E=15;1<=E&&F[E]===0;E--);if(E<D&&(D=E),E===0)return l[u++]=20971520,l[u++]=20971520,f.bits=1,0;for(T=1;T<E&&F[T]===0;T++);for(D<T&&(D=T),C=A=1;C<=15;C++)if(A<<=1,(A-=F[C])<0)return-1;if(0<A&&(e===0||E!==1))return-1;for(I[1]=0,C=1;C<15;C++)I[C+1]=I[C]+F[C];for(w=0;w<c;w++)t[n+w]!==0&&(d[I[t[n+w]]++]=w);if(v=e===0?(N=L=d,19):e===1?(N=i,P-=257,L=a,R-=257,256):(N=o,L=s,-1),C=T,_=u,k=w=M=0,h=-1,g=(j=1<<(O=D))-1,e===1&&852<j||e===2&&592<j)return 1;for(;;){for(y=C-k,x=d[w]<v?(b=0,d[w]):d[w]>v?(b=L[R+d[w]],N[P+d[w]]):(b=96,0),p=1<<C-k,T=m=1<<O;l[_+(M>>k)+(m-=p)]=y<<24|b<<16|x,m!==0;);for(p=1<<C-1;M&p;)p>>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--F[C]==0){if(C===E)break;C=t[n+d[w]]}if(D<C&&(M&g)!==h){for(k===0&&(k=D),_+=T,A=1<<(O=C-k);O+k<E&&!((A-=F[O+k])<=0);)O++,A<<=1;if(j+=1<<O,e===1&&852<j||e===2&&592<j)return 1;l[h=M&g]=D<<24|O<<16|_-u}}return M!==0&&(l[_+M]=C-k<<24|4194304),f.bits=D,0}},{"../utils/common":41}],51:[function(e,t,n){t.exports={2:`need dictionary`,1:`stream end`,0:``,"-1":`file error`,"-2":`stream error`,"-3":`data error`,"-4":`insufficient memory`,"-5":`buffer error`,"-6":`incompatible version`}},{}],52:[function(e,t,n){var r=e(`../utils/common`),i=0,a=1;function o(e){for(var t=e.length;0<=--t;)e[t]=0}var s=0,c=29,l=256,u=l+1+c,d=30,f=19,p=2*u+1,m=15,h=16,g=7,_=256,v=16,y=17,b=18,x=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],S=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],w=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(2*(u+2));o(T);var E=Array(2*d);o(E);var D=Array(512);o(D);var O=Array(256);o(O);var k=Array(c);o(k);var A,j,M,N=Array(d);function P(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function F(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function I(e){return e<256?D[e]:D[256+(e>>>7)]}function L(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function R(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<<e.bi_valid&65535,L(e,e.bi_buf),e.bi_buf=t>>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function z(e,t,n){R(e,n[2*t],n[2*t+1])}function B(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1}function V(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=B(a[s]++,s))}}function ee(e){for(var t=0;t<u;t++)e.dyn_ltree[2*t]=0;for(t=0;t<d;t++)e.dyn_dtree[2*t]=0;for(t=0;t<f;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*_]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function H(e){8<e.bi_valid?L(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function te(e,t,n,r){var i=2*t,a=2*n;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function ne(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&te(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!te(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function U(e,t,n){var r,i,a,o,s=0;if(e.last_lit!==0)for(;r=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],i=e.pending_buf[e.l_buf+s],s++,r===0?z(e,i,t):(z(e,(a=O[i])+l+1,t),(o=x[a])!==0&&R(e,i-=k[a],o),z(e,a=I(--r),n),(o=S[a])!==0&&R(e,r-=N[a],o)),s<e.last_lit;);z(e,_,t)}function re(e,t){var n,r,i,a=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,c=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=p,n=0;n<c;n++)a[2*n]===0?a[2*n+1]=0:(e.heap[++e.heap_len]=l=n,e.depth[n]=0);for(;e.heap_len<2;)a[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=o[2*i+1]);for(t.max_code=l,n=e.heap_len>>1;1<=n;n--)ne(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ne(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,ne(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<p;n++)g<(a=c[2*c[2*(r=e.heap[n])+1]+1]+1)&&(a=g,_++),c[2*r+1]=a,l<r||(e.bl_count[a]++,o=0,h<=r&&(o=f[r-h]),s=c[2*r],e.opt_len+=s*(a+o),d&&(e.static_len+=s*(u[2*r+1]+o)));if(_!==0){do{for(a=g-1;e.bl_count[a]===0;)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[g]--,_-=2}while(0<_);for(a=g;a!==0;a--)for(r=e.bl_count[a];r!==0;)l<(i=e.heap[--n])||(c[2*i+1]!==a&&(e.opt_len+=(a-c[2*i+1])*c[2*i],c[2*i+1]=a),r--)}}(e,t),V(a,l,e.bl_count)}function W(e,t,n){var r,i,a=-1,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=o,o=t[2*(r+1)+1],++s<c&&i===o||(s<l?e.bl_tree[2*i]+=s:i===0?s<=10?e.bl_tree[2*y]++:e.bl_tree[2*b]++:(i!==a&&e.bl_tree[2*i]++,e.bl_tree[2*v]++),a=i,l=(s=0)===o?(c=138,3):i===o?(c=6,3):(c=7,4))}function G(e,t,n){var r,i,a=-1,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(i=o,o=t[2*(r+1)+1],!(++s<c&&i===o)){if(s<l)for(;z(e,i,e.bl_tree),--s!=0;);else i===0?s<=10?(z(e,y,e.bl_tree),R(e,s-3,3)):(z(e,b,e.bl_tree),R(e,s-11,7)):(i!==a&&(z(e,i,e.bl_tree),s--),z(e,v,e.bl_tree),R(e,s-3,2));a=i,l=(s=0)===o?(c=138,3):i===o?(c=6,3):(c=7,4)}}o(N);var ie=!1;function K(e,t,n,i){R(e,(s<<1)+ +!!i,3),function(e,t,n,i){H(e),L(e,n),L(e,~n),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}n._tr_init=function(e){ie||=(function(){var e,t,n,r,i,a=Array(m+1);for(r=n=0;r<c-1;r++)for(k[r]=n,e=0;e<1<<x[r];e++)O[n++]=r;for(O[n-1]=r,r=i=0;r<16;r++)for(N[r]=i,e=0;e<1<<S[r];e++)D[i++]=r;for(i>>=7;r<d;r++)for(N[r]=i<<7,e=0;e<1<<S[r]-7;e++)D[256+i++]=r;for(t=0;t<=m;t++)a[t]=0;for(e=0;e<=143;)T[2*e+1]=8,e++,a[8]++;for(;e<=255;)T[2*e+1]=9,e++,a[9]++;for(;e<=279;)T[2*e+1]=7,e++,a[7]++;for(;e<=287;)T[2*e+1]=8,e++,a[8]++;for(V(T,u+1,a),e=0;e<d;e++)E[2*e+1]=5,E[2*e]=B(e,5);A=new P(T,x,l+1,u,m),j=new P(E,S,0,d,m),M=new P([],C,0,f,g)}(),!0),e.l_desc=new F(e.dyn_ltree,A),e.d_desc=new F(e.dyn_dtree,j),e.bl_desc=new F(e.bl_tree,M),e.bi_buf=0,e.bi_valid=0,ee(e)},n._tr_stored_block=K,n._tr_flush_block=function(e,t,n,r){var o,s,c=0;0<e.level?(e.strm.data_type===2&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t<l;t++)if(e.dyn_ltree[2*t]!==0)return a;return i}(e)),re(e,e.l_desc),re(e,e.d_desc),c=function(e){var t;for(W(e,e.dyn_ltree,e.l_desc.max_code),W(e,e.dyn_dtree,e.d_desc.max_code),re(e,e.bl_desc),t=f-1;3<=t&&e.bl_tree[2*w[t]+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?K(e,t,n,r):e.strategy===4||s===o?(R(e,2+ +!!r,3),U(e,T,E)):(R(e,4+ +!!r,3),function(e,t,n,r){var i;for(R(e,t-257,5),R(e,n-1,5),R(e,r-4,4),i=0;i<r;i++)R(e,e.bl_tree[2*w[i]+1],3);G(e,e.dyn_ltree,t-1),G(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,c+1),U(e,e.dyn_ltree,e.dyn_dtree)),ee(e),r&&H(e)},n._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*I(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){R(e,2,3),z(e,_,T),function(e){e.bi_valid===16?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){q.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];return s[o]={callback:e,args:t},n(o),o++},u.clearImmediate=d}function d(e){delete s[e]}function f(e){if(c)setTimeout(f,0,e);else{var n=s[e];if(n){c=!0;try{(function(e){var n=e.callback,r=e.args;switch(r.length){case 0:n();break;case 1:n(r[0]);break;case 2:n(r[0],r[1]);break;case 3:n(r[0],r[1],r[2]);break;default:n.apply(t,r)}})(n)}finally{d(e),c=!1}}}}function p(t){t.source===e&&typeof t.data==`string`&&t.data.indexOf(a)===0&&f(+t.data.slice(a.length))}})(typeof self>`u`?e===void 0?this:e:self)}).call(this,I===void 0?typeof self<`u`?self:typeof window<`u`?window:{}:I)},{}]},{},[10])(10)})})),xf=_(((e,t)=>{var n={"&":`&amp;`,'"':`&quot;`,"'":`&apos;`,"<":`&lt;`,">":`&gt;`};function r(e){return e&&e.replace?e.replace(/([&"<>'])/g,function(e,t){return n[t]}):e}t.exports=r})),Sf=_(((e,t)=>{le();var n=xf(),r=Ot().Stream,i=` `;function a(e,t){typeof t!=`object`&&(t={indent:t});var n=t.stream?new r:null,a=``,o=!1,s=t.indent?t.indent===!0?i:t.indent:``,u=!0;function d(e){u?q.nextTick(e):e()}function f(e,t){if(t!==void 0&&(a+=t),e&&!o&&(n||=new r,o=!0),e&&o){var i=a;d(function(){n.emit(`data`,i)}),a=``}}function p(e,t){l(f,c(e,s,+!!s),t)}function m(){if(n){var e=a;d(function(){n.emit(`data`,e),n.emit(`end`),n.readable=!1,n.emit(`close`)})}}function h(e){var t={version:`1.0`,encoding:e.encoding||`UTF-8`};e.standalone&&(t.standalone=e.standalone),p({"?xml":{_attr:t}}),a=a.replace(`/>`,`?>`)}return d(function(){u=!1}),t.declaration&&h(t.declaration),e&&e.forEach?e.forEach(function(t,n){var r;n+1===e.length&&(r=m),p(t,r)}):p(e,m),n?(n.readable=!0,n):a}function o(){var e={_elem:c(Array.prototype.slice.call(arguments))};return e.push=function(e){if(!this.append)throw Error(`not assigned to a parent!`);var t=this,n=this._elem.indent;l(this.append,c(e,n,this._elem.icount+ +!!n),function(){t.append(!0)})},e.close=function(e){e!==void 0&&this.push(e),this.end&&this.end()},e}function s(e,t){return Array(t||0).join(e||``)}function c(e,t,r){r||=0;var i=s(t,r),a,o=e,l=!1;if(typeof e==`object`&&(a=Object.keys(e)[0],o=e[a],o&&o._elem))return o._elem.name=a,o._elem.icount=r,o._elem.indent=t,o._elem.indents=i,o._elem.interrupt=o,o._elem;var d=[],f=[],p;function m(e){Object.keys(e).forEach(function(t){d.push(u(t,e[t]))})}switch(typeof o){case`object`:if(o===null)break;o._attr&&m(o._attr),o._cdata&&f.push((`<![CDATA[`+o._cdata).replace(/\]\]>/g,`]]]]><![CDATA[>`)+`]]>`),o.forEach&&(p=!1,f.push(``),o.forEach(function(e){typeof e==`object`?Object.keys(e)[0]==`_attr`?m(e._attr):f.push(c(e,t,r+1)):(f.pop(),p=!0,f.push(n(e)))}),p||f.push(``));break;default:f.push(n(o))}return{name:a,interrupt:l,attributes:d,content:f,icount:r,indents:i,indent:t}}function l(e,t,n){if(typeof t!=`object`)return e(!1,t);var r=t.interrupt?1:t.content.length;function i(){for(;t.content.length;){var i=t.content.shift();if(i!==void 0){if(a(i))return;l(e,i)}}e(!1,(r>1?t.indents:``)+(t.name?`</`+t.name+`>`:``)+(t.indent&&!n?`
26
26
  `:``)),n&&n()}function a(t){return t.interrupt?(t.interrupt.append=e,t.interrupt.end=i,t.interrupt=!1,e(!0),!0):!1}if(e(!1,t.indents+(t.name?`<`+t.name:``)+(t.attributes.length?` `+t.attributes.join(` `):``)+(r?t.name?`>`:``:t.name?`/>`:``)+(t.indent&&r>1?`
27
27
  `:``)),!r)return e(!1,t.indent?`
28
- `:``);a(t)||i()}function u(e,t){return e+`="`+n(t)+`"`}t.exports=a,t.exports.element=t.exports.Element=o})),Cf=Ot(),wf=y(bf(),1),$=y(Sf(),1),Tf=0,Ef=32,Df=32,Of=(e,t)=>{let n=t.replace(/-/g,``);if(n.length!==Df)throw Error(`Error: Cannot extract GUID from font filename: ${t}`);let r=n.replace(/(..)/g,`$1 `).trim().split(` `).map(e=>parseInt(e,16));r.reverse();let i=e.slice(Tf,Ef).map((e,t)=>e^r[t%r.length]),a=new Uint8Array(Tf+i.length+Math.max(0,e.length-Ef));return a.set(e.slice(0,Tf)),a.set(i,Tf),a.set(e.slice(Ef),Tf+i.length),a},kf=class{format(e,t={stack:[]}){let n=e.prepForXml(t);if(n)return n;throw Error(`XMLComponent did not format correctly`)}},Af=class{replace(e,t,n){let r=e;return t.forEach((e,t)=>{r=r.replace(RegExp(`{${e.fileName}}`,`g`),(n+t).toString())}),r}getMediaData(e,t){return t.Array.filter(t=>e.search(`{${t.fileName}}`)>0)}},jf=class{replace(e,t){let n=e;for(let e of t)n=n.replace(RegExp(`{${e.reference}-${e.instance}}`,`g`),e.numId.toString());return n}},Mf=new kf,Nf=(e,t,n,r,i=!0)=>(0,$.default)(Mf.format(t,{viewWrapper:{View:t,Relationships:r},file:e,stack:[]}),{indent:n,declaration:i?{standalone:`yes`,encoding:`UTF-8`}:{encoding:`UTF-8`}}),Pf=(e,t,n,r)=>{let{content:i}=t.options;if(i instanceof Uint8Array)return[{data:i,path:`word/${n}`}];if(`files`in i){let t=new wf.default;for(let{path:n,content:a}of i.files)t.file(n,a instanceof Uint8Array?a:Qr(Nf(e,a,r,new Qo)));return[{data:t.generateAsync({type:`uint8array`,compression:`DEFLATE`}),path:`word/${n}`}]}let a=e.PackageParts.createRelationships(n),o=Nf(e,i,r,a),s=n.slice(0,n.lastIndexOf(`/`)),c=n.slice(n.lastIndexOf(`/`)+1);return[{data:o,path:`word/${n}`},...a.RelationshipCount>0?[{data:Nf(e,a,r,a,!1),path:`word/${s}/_rels/${c}.rels`}]:[]]},Ff=(e,t,n=0)=>{let r=e.PackageParts.Array.slice(n);return r.length===0?[]:[...r.flatMap(({part:n,path:r})=>Pf(e,n,r,t)),...Ff(e,t,n+r.length)]},If=[`PackageParts`],Lf=class{constructor(){w(this,`formatter`,void 0),w(this,`imageReplacer`,void 0),w(this,`numberingReplacer`,void 0),this.formatter=new kf,this.imageReplacer=new Af,this.numberingReplacer=new jf}compile(e,t,n=[]){let r=new wf.default,i=this.xmlifyFile(e,t),{PackageParts:a}=i,o=ec(i,If),s=new Map(Object.entries(o));for(let[,e]of s)if(Array.isArray(e))for(let t of e)r.file(t.path,Qr(t.data));else r.file(e.path,Qr(e.data));for(let{path:e,data:t}of a)r.file(e,typeof t==`string`?Qr(t):t);for(let e of n)r.file(e.path,Qr(e.data));for(let t of e.Media.Array)t.type===`svg`?(r.file(`word/media/${t.fileName}`,t.data),r.file(`word/media/${t.fallback.fileName}`,t.fallback.data)):r.file(`word/media/${t.fileName}`,t.data);for(let[t,{data:n,fontKey:i}]of e.FontTable.files.entries())r.file(`word/fonts/font${t+1}.odttf`,Of(n,i));return r}xmlifyFile(e,t){let n=(0,$.default)(this.formatter.format(e.Document.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),r=(0,$.default)(this.formatter.format(e.Comments,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),i=(0,$.default)(this.formatter.format(e.FootNotes.View,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),a=(0,$.default)(this.formatter.format(e.Endnotes.View,{viewWrapper:e.Endnotes,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),o=e.Document.Relationships.RelationshipCount+1,s=e.Comments.Relationships.RelationshipCount+1,c=e.FootNotes.Relationships.RelationshipCount+1,l=e.Endnotes.Relationships.RelationshipCount+1,u=this.imageReplacer.getMediaData(n,e.Media),d=this.imageReplacer.getMediaData(r,e.Media),f=this.imageReplacer.getMediaData(i,e.Media),p=this.imageReplacer.getMediaData(a,e.Media);return A(A(A(A({Relationships:{data:(()=>{let n=Qo.copy(e.Document.Relationships);return u.forEach((e,t)=>{n.addRelationship(o+t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),n.addRelationship(n.RelationshipCount+1,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable`,`fontTable.xml`),(0,$.default)(this.formatter.format(n,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}})})(),path:`word/_rels/document.xml.rels`},Document:{data:(()=>{let t=this.imageReplacer.replace(n,u,o);return this.numberingReplacer.replace(t,e.Numbering.ConcreteNumbering)})(),path:`word/document.xml`},Styles:{data:(()=>{let n=(0,$.default)(this.formatter.format(e.Styles,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}});return this.numberingReplacer.replace(n,e.Numbering.ConcreteNumbering)})(),path:`word/styles.xml`},Properties:{data:(0,$.default)(this.formatter.format(e.CoreProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`docProps/core.xml`},FileRelationships:{data:(0,$.default)(this.formatter.format(e.FileRelationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),path:`_rels/.rels`},HeaderRelationships:e.Headers.map((n,r)=>{let i=(0,$.default)(this.formatter.format(n.View,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),a=this.imageReplacer.getMediaData(i,e.Media),o=Qo.copy(n.Relationships);return a.forEach((e,t)=>{o.addRelationship(t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),{data:(0,$.default)(this.formatter.format(o,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),path:`word/_rels/header${r+1}.xml.rels`}}),FooterRelationships:e.Footers.map((n,r)=>{let i=(0,$.default)(this.formatter.format(n.View,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),a=this.imageReplacer.getMediaData(i,e.Media),o=Qo.copy(n.Relationships);return a.forEach((e,t)=>{o.addRelationship(t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),{data:(0,$.default)(this.formatter.format(o,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),path:`word/_rels/footer${r+1}.xml.rels`}}),Headers:e.Headers.map((n,r)=>{let i=(0,$.default)(this.formatter.format(n.View,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),a=this.imageReplacer.getMediaData(i,e.Media),o=this.imageReplacer.replace(i,a,0);return{data:this.numberingReplacer.replace(o,e.Numbering.ConcreteNumbering),path:`word/header${r+1}.xml`}}),Footers:e.Footers.map((n,r)=>{let i=(0,$.default)(this.formatter.format(n.View,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),a=this.imageReplacer.getMediaData(i,e.Media),o=this.imageReplacer.replace(i,a,0);return{data:this.numberingReplacer.replace(o,e.Numbering.ConcreteNumbering),path:`word/footer${r+1}.xml`}}),CustomProperties:{data:(0,$.default)(this.formatter.format(e.CustomProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`docProps/custom.xml`},AppProperties:{data:(0,$.default)(this.formatter.format(e.AppProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`docProps/app.xml`},FootNotes:{data:(()=>{let t=this.imageReplacer.replace(i,f,c);return this.numberingReplacer.replace(t,e.Numbering.ConcreteNumbering)})(),path:`word/footnotes.xml`},FootNotesRelationships:{data:(()=>{let n=Qo.copy(e.FootNotes.Relationships);return f.forEach((e,t)=>{n.addRelationship(c+t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),(0,$.default)(this.formatter.format(n,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}})})(),path:`word/_rels/footnotes.xml.rels`},Endnotes:{data:(()=>{let t=this.imageReplacer.replace(a,p,l);return this.numberingReplacer.replace(t,e.Numbering.ConcreteNumbering)})(),path:`word/endnotes.xml`},EndnotesRelationships:{data:(()=>{let n=Qo.copy(e.Endnotes.Relationships);return p.forEach((e,t)=>{n.addRelationship(l+t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),(0,$.default)(this.formatter.format(n,{viewWrapper:e.Endnotes,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}})})(),path:`word/_rels/endnotes.xml.rels`},Settings:{data:(0,$.default)(this.formatter.format(e.Settings,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/settings.xml`}},e.Comments.IsEmpty?{}:{Comments:{data:(()=>{let t=this.imageReplacer.replace(r,d,s);return this.numberingReplacer.replace(t,e.Numbering.ConcreteNumbering)})(),path:`word/comments.xml`},CommentsRelationships:{data:(()=>{let n=Qo.copy(e.Comments.Relationships);return d.forEach((e,t)=>{n.addRelationship(s+t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),(0,$.default)(this.formatter.format(n,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}})})(),path:`word/_rels/comments.xml.rels`}}),e.CommentsExtended?{CommentsExtended:{data:(0,$.default)(this.formatter.format(e.CommentsExtended,{viewWrapper:{View:e.CommentsExtended,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/commentsExtended.xml`}}:{}),e.CommentsIds?{CommentsIds:{data:(0,$.default)(this.formatter.format(e.CommentsIds,{viewWrapper:{View:e.CommentsIds,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/commentsIds.xml`}}:{}),{},{FontTable:{data:(0,$.default)(this.formatter.format(e.FontTable.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/fontTable.xml`},FontTableRelationships:{data:(0,$.default)(this.formatter.format(e.FontTable.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),path:`word/_rels/fontTable.xml.rels`},Theme:{data:(0,$.default)(this.formatter.format(e.Theme,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/theme/theme1.xml`},PackageParts:Ff(e,t),Numbering:{data:(0,$.default)(this.formatter.format(e.Numbering,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/numbering.xml`},ContentTypes:{data:(0,$.default)(this.formatter.format(e.ContentTypes,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),path:`[Content_Types].xml`}})}};function Rf(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function zf(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Rf(a,r,i,o,s,`next`,e)}function s(e){Rf(a,r,i,o,s,`throw`,e)}o(void 0)})}}var Bf={NONE:``,WITH_2_BLANKS:` `,WITH_4_BLANKS:` `,WITH_TAB:` `},Vf=e=>e===!0?Bf.WITH_2_BLANKS:e===!1?void 0:e,Hf=class e{static pack(e,t,n){var r=this;return zf(function*(e,t,n,i=[]){return r.compiler.compile(e,Vf(n),i).generateAsync({type:t,mimeType:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,compression:`DEFLATE`})}).apply(this,arguments)}static toString(t,n,r=[]){return e.pack(t,`string`,n,r)}static toBuffer(t,n,r=[]){return e.pack(t,`nodebuffer`,n,r)}static toBase64String(t,n,r=[]){return e.pack(t,`base64`,n,r)}static toBlob(t,n,r=[]){return e.pack(t,`blob`,n,r)}static toArrayBuffer(t,n,r=[]){return e.pack(t,`arraybuffer`,n,r)}static toStream(e,t,n=[]){let r=new Cf.Stream;return this.compiler.compile(e,Vf(t),n).generateAsync({type:`nodebuffer`,mimeType:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,compression:`DEFLATE`}).then(e=>{r.emit(`data`,e),r.emit(`end`)}),r}};w(Hf,`compiler`,new Lf);var Uf=e=>{if(e.name!==`w:bookmarkStart`&&e.name!==`w:bookmarkEnd`)return;let t=Number(e.attributes?.[`w:id`]);return Number.isInteger(t)?t:void 0},Wf=e=>{let t=Uf(e);return[...t===void 0?[]:[t],...(e.elements??[]).flatMap(Wf)]},Gf=e=>{let t=new Set(e),n=new Map,r=e.reduce((e,t)=>Math.max(e,t),0),i=e=>{let i=n.get(e);if(i!==void 0)return i;let a=t.has(e)?r+1:e;return r=Math.max(r,a),t.add(a),n.set(e,a),a},a=e=>{let t=Uf(e);return A(A(A({},e),t===void 0?{}:{attributes:A(A({},e.attributes),{},{"w:id":String(i(t))})}),e.elements===void 0?{}:{elements:e.elements.map(a)})};return e=>e.map(a)},Kf=new kf,qf=e=>(0,It.xml2js)(e,{compact:!1,captureSpacesBetweenElements:!0}),Jf=e=>qf((0,$.default)(Kf.format(new Sr({text:e})))).elements[0].elements??[],Yf=e=>A(A({},e),{},{attributes:{"xml:space":`preserve`}}),Xf=(e,t)=>{let n=e.elements?.find(e=>e.name===t);return n===void 0?[]:(n.elements??=[],n.elements)},Zf=(e,t,n)=>{let r=Xf(e,`Types`);r.some(e=>{var r,i;return e.type===`element`&&e.name===`Default`&&(e==null||(r=e.attributes)==null?void 0:r.ContentType)===t&&(e==null||(i=e.attributes)==null?void 0:i.Extension)===n})||r.push({attributes:{ContentType:t,Extension:n},name:`Default`,type:`element`})},Qf=(e,t,n)=>{let r=Xf(e,`Types`);r.some(e=>e.type===`element`&&e.name===`Override`&&e.attributes?.PartName===n)||r.push({attributes:{ContentType:t,PartName:n},name:`Override`,type:`element`})},$f=(e,t)=>{let n=e.elements?.find(e=>e.name===`Types`);n?.elements!==void 0&&(n.elements=n.elements.filter(e=>e.name!==`Override`||String(e.attributes?.PartName??``).toLowerCase()!==t.toLowerCase()))},ep=new Set([`wp:inline`,`wp:anchor`]),tp=new Set([`wp:docPr`,`wps:cNvPr`,`wpg:cNvPr`]),np=new Set([`a:stCxn`,`a:endCxn`]),rp=(e,t)=>{if(!t.has(e.name??``))return;let n=Number(e.attributes?.id);return Number.isInteger(n)?n:void 0},ip=e=>{let t=rp(e,tp);return[...t===void 0?[]:[t],...(e.elements??[]).flatMap(ip)]},ap=e=>{let t=e=>{let n=rp(e,tp);return[...n===void 0?[]:[n],...(e.elements??[]).flatMap(e=>ep.has(e.name??``)?[]:t(e))]};return t(e)},op=e=>{let t=new Set(e),n=e.reduce((e,t)=>Math.max(e,t),0),r=e=>{let r=t.has(e)?n+1:e;return n=Math.max(n,r),t.add(r),r},i=e=>{let t=new Map([...new Set(ap(e))].map(e=>[e,r(e)])),n=r=>{if(r!==e&&ep.has(r.name??``))return i(r);let a=rp(r,tp)??rp(r,np),o=a===void 0?void 0:t.get(a);return A(A(A({},r),o===void 0?{}:{attributes:A(A({},r.attributes),{},{id:String(o)})}),r.elements===void 0?{}:{elements:r.elements.map(n)})};return n(e)},a=e=>ep.has(e.name??``)?i(e):A(A({},e),e.elements===void 0?{}:{elements:e.elements.map(a)});return e=>e.map(a)},sp={DOCUMENT:`file`,PARAGRAPH:`paragraph`,TABLE_ROWS:`tableRows`,DRAWING:`drawing`},cp=e=>{let t=parseInt(e.substring(3),10);return isNaN(t)?0:t},lp=e=>Xf(e,`Relationships`).map(e=>{var t;return cp(((t=e.attributes)==null||(t=t.Id)==null?void 0:t.toString())??``)}).reduce((e,t)=>Math.max(e,t),0)+1,up=(e,t,n,r,i)=>{let a=Xf(e,`Relationships`);return a.push({attributes:{Id:`rId${t}`,Type:n,Target:r,TargetMode:i},name:`Relationship`,type:`element`}),a},dp=()=>({declaration:{attributes:{version:`1.0`,encoding:`UTF-8`,standalone:`yes`}},elements:[{type:`element`,name:`Relationships`,attributes:{xmlns:`http://schemas.openxmlformats.org/package/2006/relationships`},elements:[]}]}),fp=new Map([[`wp:inline`,`wp:docPr`],[`wp:anchor`,`wp:docPr`],[`wpg:graphicFrame`,`wpg:cNvPr`],[`wpc:graphicFrame`,`wpg:cNvPr`]]),pp=e=>(e.elements??[]).flatMap(e=>{let t=e.name===void 0?void 0:fp.get(e.name),n=t===void 0?void 0:e.elements?.find(e=>e.name===t);return[...n?[{element:e,properties:n}]:[],...pp(e)]}),mp=e=>[e.attributes?.descr,e.attributes?.title].flatMap(e=>e===void 0?[]:[String(e)]),hp=e=>{let t=e.lastIndexOf(`/`);return`${e.slice(0,t+1)}_rels/${e.slice(t+1)}.rels`},gp=e=>e.replace(/(^|\/)_rels\/([^/]*)\.rels$/,`$1$2`),_p=e=>e.slice(0,e.lastIndexOf(`/`)+1),vp=(e,t)=>{let n=t.replace(/\\/g,`/`);return(n.startsWith(`/`)?n:`${_p(e)}${n}`).split(`/`).reduce((e,t)=>t===``||t===`.`?e:t===`..`?e.slice(0,-1):[...e,t],[]).join(`/`)},yp=(e,t)=>{let n=_p(e).split(`/`).filter(Boolean),r=t.split(`/`),i=n.findIndex((e,t)=>t>=r.length-1||r[t]!==e),a=i===-1?n.length:i;return[...n.slice(a).map(()=>`..`),...r.slice(a)].join(`/`)},bp=`[Content_Types].xml`,xp=e=>(e.elements?.some(e=>e.name===`Relationships`)||(e.elements=[...e.elements??[],...dp().elements]),Xf(e,`Relationships`)),Sp=(e,t,n,r)=>{let i=new kf,a=n=>e.has(n)||t.has(n),o=n=>{if(a(n))return n;let r=(()=>{try{return decodeURI(n)}catch{return}})();if(r!==void 0&&a(r))return r;let i=n.toLowerCase();return[...e.keys(),...t.keys()].find(e=>e.toLowerCase()===i)},s=(t,n)=>{let r=e.get(hp(t));return r===void 0?void 0:Xf(r,`Relationships`).find(e=>e.name===`Relationship`&&e.attributes?.Id===n)},c=(e,t)=>{let n=t.attributes?.Target;return t.attributes?.TargetMode===`External`||n===void 0?void 0:o(vp(e,String(n)))},l=t=>[...e].some(([e,n])=>e.endsWith(`.rels`)&&Xf(n,`Relationships`).some(n=>c(gp(e),n)===t)),u=n=>{e.delete(n),t.delete(n),e.delete(hp(n));let r=e.get(bp);r!==void 0&&$f(r,`/${n}`)};return{getRelatedPart:(t,n)=>{let r=s(t.path,n),i=r===void 0?void 0:c(t.path,r);return i===void 0?void 0:{path:i,xml:e.get(i)}},replaceRelatedPart:(t,r,i)=>{let a=`word/${n.PackageParts.add(i)}`,{relationshipType:o}=i.options,d=yp(t.path,a),f=r===void 0?void 0:s(t.path,r);if(f===void 0){let n=hp(t.path),i=e.get(n)??dp();e.set(n,i);let a=r??`rId${lp(i)}`;return xp(i).push({type:`element`,name:`Relationship`,attributes:{Id:a,Type:o,Target:d}}),a}let p=c(t.path,f);return f.attributes=A(A({},Object.fromEntries(Object.entries(f.attributes).filter(([e])=>e!==`TargetMode`))),{},{Type:o,Target:d}),p!==void 0&&p!==t.path&&p!==bp&&!p.endsWith(`.rels`)&&!l(p)&&u(p),String(f.attributes.Id)},format:e=>qf((0,$.default)(i.format(e,r))).elements[0]}},Cp=({parts:e,binaryParts:t,file:n,patches:r,delimiters:i},a)=>{let o=r.map(([e,t])=>({placeholder:`${i.start}${e}${i.end}`,patch:t})),s=[...e].filter(([e])=>e.startsWith(`word/`)&&!e.endsWith(`.rels`)).flatMap(([e,t])=>pp(t).flatMap(n=>{let r=mp(n.properties),i=o.filter(({placeholder:e})=>r.some(t=>t.includes(e)));if(i.length>1)throw Error(`The drawing "${n.properties.attributes?.name??``}" in ${e} has the placeholders ${i.map(({placeholder:e})=>e).join(` and `)} in its alt text. A drawing can only be patched once`);return i.map(({placeholder:r,patch:i})=>({drawing:A(A({placeholder:r},n),{},{part:{path:e,xml:t}}),patch:i}))}));for(let{drawing:r,patch:i}of s)i.patch(r,Sp(e,t,n,a(r.part.path)))},wp=new kf,Tp=`word/document.xml`,Ep={path:`word/footnotes.xml`,rootName:`w:footnotes`,noteName:`w:footnote`,referenceName:`w:footnoteReference`,contentType:`application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml`,relationshipType:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes`,create:{part:()=>new Uu,mark:()=>new zu,styles:()=>[new Rd({}),new Bd({}),new zd({})]}},Dp={path:`word/endnotes.xml`,rootName:`w:endnotes`,noteName:`w:endnote`,referenceName:`w:endnoteReference`,contentType:`application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml`,relationshipType:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes`,create:{part:()=>new Mu,mark:()=>new Tu,styles:()=>[new Vd({}),new Ud({}),new Hd({})]}},Op=(e,t)=>qf((0,$.default)(wp.format(e,t))).elements[0],kp=(e,t)=>{let n=t.includes(e.name??``)?Number(e.attributes?.[`w:id`]):NaN;return[...Number.isInteger(n)?[n]:[],...(e.elements??[]).flatMap(e=>kp(e,t))]},Ap=(e,t)=>{let n=e.elements??[],r=+(n[0]?.name===`w:pPr`);return A(A({},e),{},{elements:[...n.slice(0,r),t,...n.slice(r)]})},jp=(e,t,n,{createContext:r,addContentTypeOverride:i,renumberBookmarks:a,renumberDrawings:o,renumberLists:s,useStyles:c})=>{let l=new Map(Object.entries(t).map(([e,t])=>[Number(e),t])),u=new Map,d=[...l.keys()].filter(Number.isFinite).reduce((e,t)=>Math.max(e,Math.floor(t)),0),f=new Map,p,m=t=>{let r=t.name===e.referenceName?l.get(Number(t.attributes?.[`w:id`])):void 0;return r===void 0?t.elements===void 0?t:A(A({},t),{},{elements:t.elements.map(m)}):(p=(p??[...n.values()].flatMap(t=>kp(t,[e.noteName,e.referenceName])).reduce((e,t)=>Math.max(e,t),0))+1,f.set(p,r),A(A({},t),{},{attributes:A(A({},t.attributes),{},{"w:id":String(p)})}))},h=()=>{let t=Xf(n.get(hp(Tp))??{},`Relationships`).find(t=>t.attributes?.Type===e.relationshipType),a=t?vp(Tp,String(t.attributes.Target)):e.path;return n.has(a)||(n.set(a,{declaration:{attributes:{version:`1.0`,encoding:`UTF-8`,standalone:`yes`}},elements:[Op(e.create.part(),r(a))]}),i(e.contentType,`/${a}`)),t||r(Tp).viewWrapper.Relationships.addRelationship(Jr(),e.relationshipType,yp(Tp,a)),a};return{renumber:e=>e.map(m),write:()=>{if(f.size===0)return;let t=h(),i=r(t),l=new Map([...new Set(f.values())].map(t=>{let n=Op(e.create.mark(),i);return[t,c(s(a(t.children.map(e=>Op(e,i)).map((e,t)=>t===0?Ap(e,n):e))))]}));Xf(n.get(t),e.rootName).push(...[...f].map(([t,n])=>({type:`element`,name:e.noteName,attributes:{"w:id":String(t)},elements:[...o(l.get(n))]})));let u=n.get(`word/styles.xml`);if(u){let t=Xf(u,`w:styles`),n=new Set(t.map(e=>e.attributes?.[`w:styleId`]));t.push(...e.create.styles().map(e=>Op(e,i)).filter(e=>!n.has(e.attributes?.[`w:styleId`])))}},carry:(e,t)=>{let n=u.get(e);return n===void 0?(d++,l.set(d,t),u.set(e,d),d):n}}},Mp=({footnotes:e={},endnotes:t={}},n,r)=>{let i={footnotes:jp(Ep,e,n,r),endnotes:jp(Dp,t,n,r)};return{carry:(e,t,n)=>i[e].carry(t,n),renumber:e=>Object.values(i).reduce((e,t)=>t.renumber(e),e),write:()=>{for(let e of Object.values(i))e.write()}}},Np=new kf,Pp=`word/document.xml`,Fp=`word/numbering.xml`,Ip=`application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml`,Lp=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering`,Rp=`default-bullet-numbering`,zp=`1`,Bp=(e,t)=>qf((0,$.default)(Np.format(e,t))).elements[0],Vp=e=>e.reduce((e,t)=>Math.max(e,t),0),Hp=(e,t,{createContext:n,addContentTypeOverride:r})=>{let i=new Map,a,o=()=>Xf(t.get(hp(Pp))??{},`Relationships`).find(e=>e.attributes?.Type===Lp),s=(e=o())=>e?vp(Pp,String(e.attributes.Target)):Fp,c=(e,n)=>Xf(t.get(s())??{},`w:numbering`).filter(t=>t.name===e).map(e=>Number(e.attributes[n])),l=t=>{if(t===zp)return e.ConcreteNumbering.find(({reference:e})=>e===Rp);if(!t.startsWith(`{`))return;let n=e.ConcreteNumbering.find(({reference:e,instance:n})=>t===`{${e}-${n}}`);if(!n){let e=t.slice(1,-1).replace(/-\d+$/,``);throw Error(`A paragraph in a patch uses the numbering "${e}", which isn't in the numbering option of patchDocument. Add it there with its levels, as in a Document`)}return n},u=e=>{let t=i.get(e.numId);return t===void 0?(a=(a??Vp(c(`w:num`,`w:numId`)))+1,i.set(e.numId,a),a):t},d=e=>{let t=e.name===`w:numId`?l(String(e.attributes[`w:val`])):void 0;return t===void 0?e.elements===void 0?e:A(A({},e),{},{elements:e.elements.map(d)}):A(A({},e),{},{attributes:A(A({},e.attributes),{},{"w:val":String(u(t))})})},f=e=>{let i=o(),a=s(i);return t.has(a)||(t.set(a,{declaration:{attributes:{version:`1.0`,encoding:`UTF-8`,standalone:`yes`}},elements:[A(A({},e),{},{elements:[]})]}),r(Ip,`/${a}`)),i||n(Pp).viewWrapper.Relationships.addRelationship(Jr(),Lp,yp(Pp,a)),a};return{renumber:e=>e.map(d),write:()=>{if(i.size===0)return;let r=Bp(e,n(s())),a=e=>Number(e.elements.find(e=>e.name===`w:abstractNumId`).attributes[`w:val`]),o=r.elements.filter(e=>e.name===`w:num`&&i.has(Number(e.attributes[`w:numId`]))),l=Vp(c(`w:abstractNum`,`w:abstractNumId`)),u=new Map([...new Set(o.map(a))].map((e,t)=>[e,l+t+1])),d=r.elements.flatMap(e=>{let t=e.name===`w:abstractNum`?u.get(Number(e.attributes[`w:abstractNumId`])):void 0;return t===void 0?[]:[A(A({},e),{},{attributes:A(A({},e.attributes),{},{"w:abstractNumId":String(t)})})]}),p=f(r),m=t.get(p).elements.find(e=>e.name===`w:numbering`);m.attributes=A(A(A({},Object.fromEntries(Object.entries(r.attributes).filter(([e])=>e.startsWith(`xmlns:`)))),m.attributes),{},{"mc:Ignorable":[...new Set([...String(m.attributes?.[`mc:Ignorable`]??``).split(` `),...String(r.attributes[`mc:Ignorable`]).split(` `)])].filter(e=>e!==``).join(` `)});let h=Xf(t.get(p),`w:numbering`),g=e=>{let t=h.findIndex(t=>e.includes(t.name));return t===-1?h.length:t};h.splice(g([`w:num`,`w:numIdMacAtCleanup`]),0,...d),h.splice(g([`w:numIdMacAtCleanup`]),0,...o.map(e=>A(A({},e),{},{attributes:A(A({},e.attributes),{},{"w:numId":String(i.get(Number(e.attributes[`w:numId`])))}),elements:e.elements.map(t=>t.name===`w:abstractNumId`?A(A({},t),{},{attributes:{"w:val":String(u.get(a(e)))}}):t)})))}}},Up={nameOf:e=>e.type===`element`?e.name:void 0,contentOf:e=>e.elements,attributeOf:(e,t)=>e.attributes?.[t],textOf:e=>(e.elements??[]).filter(({type:e})=>e===`text`).map(({text:e})=>String(e)).join(``),textElement:e=>({type:`element`,name:`w:t`,attributes:{"xml:space":`preserve`},elements:[{type:`text`,text:e}]}),writeClean:(e,t)=>{/^\s*(PAGEREF|TOC)\b/i.test(t)&&e.attributes?.[`w:dirty`]!==void 0&&(e.attributes=Object.fromEntries(Object.entries(e.attributes).filter(([e])=>e!==`w:dirty`)))},setSimpleFieldResult:(e,t)=>{e.elements=[{type:`element`,name:`w:r`,elements:[Up.textElement(t)]}]}},Wp=`word/document.xml`,Gp=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk`,Kp=[80,75,3,4],qp=function(){var e=zf(function*(e){if(Kp.every((t,n)=>e[n]===t))try{let t=yield wf.default.loadAsync(e),n=new Map,r=new Map;for(let[e,i]of Object.entries(t.files))i.dir||(/\.(xml|rels)$/.test(e)?n.set(e,qf(yield i.async(`text`))):r.set(e,yield i.async(`uint8array`)));let i=yield Jp(n,r);return A({parts:n,binaryParts:r},i.size>0?{importedDocuments:i}:{})}catch{return}});return function(t){return e.apply(this,arguments)}}(),Jp=function(){var e=zf(function*(e,t){let n=new Map;for(let[r,i]of e)if(r.endsWith(`.rels`))for(let{attributes:e={}}of Yp(i)?.elements??[]){let i=vp(gp(r),String(e.Target)),a=t.get(i),o=e.Type===Gp&&e.TargetMode!==`External`&&a?yield qp(a):void 0;o&&n.set(i,o)}return n});return function(t,n){return e.apply(this,arguments)}}(),Yp=e=>{var t;return e==null||(t=e.elements)==null?void 0:t.find(({type:e})=>e===`element`)},Xp=function(){var e=zf(function*(e,t,n=new Map){let r=Yp(e.get(Wp));if(!r)return;let i=yield Jp(e,n),a=t(A({parts:e,binaryParts:n},i.size>0?{importedDocuments:i}:{})),o=no(Up,r,a,{blank:!0}),s=Yp(e.get(hp(Wp)))?.elements??[];for(let{attributes:t={}}of s){let n=/\/(header|footer)$/.test(String(t.Type))?Yp(e.get(vp(Wp,String(t.Target)))):void 0;n&&ro(Up,n,a,{blank:!0,sectionPageCount:o.get(String(t.Id))})}});return function(t,n){return e.apply(this,arguments)}}(),Zp=class extends Error{constructor(e){super(`Token ${e} not found`),this.name=`TokenNotFoundError`}},Qp=(e,t)=>{for(let n=0;n<(e.elements??[]).length;n++){let r=e.elements[n];if(r.type===`element`&&r.name===`w:r`){let e=(r.elements??[]).filter(e=>e.type===`element`&&e.name===`w:t`);for(let r of e)if(r.elements?.[0]&&r.elements[0].text?.includes(t))return n}}throw new Zp(t)},$p=(e,t)=>{let n=-1,r=e.elements?.map((e,r)=>{if(n!==-1)return e;if(e.type===`element`&&e.name===`w:t`){var i;let a=(((i=e.elements)==null||(i=i[0])==null?void 0:i.text)??``).split(t),o=a.map(t=>A(A(A({},e),Yf(e)),{},{elements:Jf(t)}));return a.length>1&&(n=r),o}return e}).flat()??[];return{left:A(A({},JSON.parse(JSON.stringify(e))),{},{elements:r.slice(0,n+1)}),right:A(A({},JSON.parse(JSON.stringify(e))),{},{elements:r.slice(n+1)})}},em={START:0,MIDDLE:1,END:2},tm=({paragraphElement:e,renderedParagraph:t,originalText:n,replacementText:r,fromIndex:i=0})=>{let a=t.text.indexOf(n,i),o=a+n.length-1,s=em.START;for(let n of t.runs)for(let{text:t,index:i,start:c,end:l}of n.parts)switch(s){case em.START:if(a>=c&&a<=l){let u=a-c,d=Math.min(o,l)-c;if(t.substring(u,d+1)===``)continue;let f=t.substring(0,u)+r+t.substring(d+1);nm(e.elements[n.index].elements[i],f),s=em.MIDDLE;continue}break;case em.MIDDLE:if(o<=l){let r=t.substring(o-c+1);nm(e.elements[n.index].elements[i],r);let a=e.elements[n.index].elements[i];e.elements[n.index].elements[i]=Yf(a),s=em.END}else nm(e.elements[n.index].elements[i],``)}return e},nm=(e,t)=>(e.elements=Jf(t),e),rm=e=>{if(e.element.name!==`w:p`)throw Error(`Invalid node type: ${e.element.name}`);if(!e.element.elements)return{text:``,runs:[],index:-1,pathToParagraph:[]};let t=0,n=e.element.elements.map((e,t)=>({element:e,i:t})).filter(({element:e})=>e.name===`w:r`).map(({element:e,i:n})=>{let r=im(e,n,t);return t+=r.text.length,r}).filter(e=>!!e);return{text:n.reduce((e,t)=>e+t.text,``),runs:n,index:e.index,pathToParagraph:am(e)}},im=(e,t,n)=>{if(!e.elements)return{text:``,parts:[],index:-1,start:n,end:n};let r=n,i=e.elements.map((e,t)=>{if(e.name!==`w:t`||!e.elements||e.elements.length===0)return;let n=e.elements[0].text?.toString()??``,i=r;return r+=n.length,{text:n,index:t,start:i,end:i+n.length-1}}).filter(e=>!!e).map(e=>e);return{text:i.reduce((e,t)=>e+t.text,``),parts:i,index:t,start:n,end:i.length>0?i[i.length-1].end:n}},am=e=>e.parent?[...am(e.parent),e.index]:[e.index],om=e=>e.element.elements?.map((t,n)=>({element:t,index:n,parent:e}))??[],sm=e=>{let t=[],n=[...om({element:e,index:0,parent:void 0})],r;for(;n.length>0;)r=n.shift(),r.element.name===`w:p`&&(t=[...t,rm(r)]),n.push(...om(r));return t},cm=(e,t)=>sm(e).filter(e=>e.text.includes(t)),lm=`￿`,um=({json:e,patch:t,patchText:n,context:r,keepOriginalStyles:i=!0,recursive:a=!0,renumberIds:o=e=>e})=>{let s=cm(e,n);if(s.length===0)return{element:e,didFindOccurrence:!1};let c=[...s].reverse(),l=t.type===sp.DOCUMENT?ym(c):c;for(let s of l)switch(t.type){case sp.DOCUMENT:{let n=xm(e,s.pathToParagraph),i=Sm(s.pathToParagraph),a=dm(t,r,o),c=n.name===`w:tc`&&i===n.elements.length-1&&a[a.length-1]?.name!==`w:p`?[{type:`element`,name:`w:p`}]:[];n.elements.splice(i,1,...a,...c);break}case sp.PARAGRAPH:default:{let c=bm(e,s.pathToParagraph),l=s,u=0;do{let e=fm({paragraphElement:c,renderedParagraph:l,patchText:n,fromIndex:u,children:dm(t,r,o),keepOriginalStyles:i});l=rm({element:c,index:s.index,parent:void 0}),u=l.runs.filter(t=>t.index<e).reduce((e,t)=>e+t.text.length,0)}while(a&&l.text.includes(n,u));break}}return{element:e,didFindOccurrence:!0}},dm=(e,t,n)=>n(e.children.flatMap(e=>e.writtenAs??e).flatMap(e=>{let n=e.prepForXml(t);return n?[qf((0,$.default)(n)).elements[0]]:[]})),fm=({paragraphElement:e,renderedParagraph:t,patchText:n,fromIndex:r,children:i,keepOriginalStyles:a})=>{tm({paragraphElement:e,renderedParagraph:t,originalText:n,replacementText:lm,fromIndex:r});let o=Qp(e,lm),s=e.elements[o],{left:c,right:l}=$p(s,lm),u=s.elements.find(e=>e.type===`element`&&e.name===`w:rPr`),d=a&&u?i.map(e=>pm(e,u)):i,f=u?A(A({},l),{},{elements:[u,...l.elements]}):l;return e.elements.splice(o,1,c,...d,f),o+1+d.length},pm=(e,t)=>e.name===`w:r`?mm(e,t):e.elements?A(A({},e),{},{elements:e.elements.map(e=>pm(e,t))}):e,mm=(e,t)=>{let n=_m(e).find(e=>e.type===`element`&&e.name===`w:rPr`);if(!n)return A(A({},e),{},{elements:[t,..._m(e)]});let r=new Set(_m(n).map(e=>e.name)),i=[..._m(t).filter(e=>!r.has(e.name)),..._m(n)],a=A(A({},n),{},{elements:[...i].sort((e,t)=>gm(e)-gm(t))});return A(A({},e),{},{elements:_m(e).map(e=>e===n?a:e)})},hm=`w:rStyle.w:rFonts.w:b.w:bCs.w:i.w:iCs.w:caps.w:smallCaps.w:strike.w:dstrike.w:outline.w:shadow.w:emboss.w:imprint.w:noProof.w:snapToGrid.w:vanish.w:webHidden.w:color.w:spacing.w:w.w:kern.w:position.w:sz.w:szCs.w:highlight.w:u.w:effect.w:bdr.w:shd.w:fitText.w:vertAlign.w:rtl.w:cs.w:em.w:lang.w:eastAsianLayout.w:specVanish.w:oMath.w14:glow.w14:shadow.w14:reflection.w14:textOutline.w14:textFill.w14:scene3d.w14:props3d.w14:ligatures.w14:numForm.w14:numSpacing.w14:stylisticSets.w14:cntxtAlts`.split(`.`),gm=e=>{if(e.name===`w:rPrChange`)return hm.length+1;let t=hm.indexOf(e.name??``);return t===-1?hm.length:t},_m=e=>e.elements??[],vm=(e,t)=>e.length>t.length&&t.every((t,n)=>e[n]===t),ym=e=>e.filter(t=>!e.some(e=>vm(t.pathToParagraph,e.pathToParagraph))),bm=(e,t)=>{let n=e;for(let e=1;e<t.length;e++){let r=t[e];n=n.elements[r]}return n},xm=(e,t)=>bm(e,t.slice(0,t.length-1)),Sm=e=>e[e.length-1],Cm=new kf,wm=`word/styles.xml`,Tm=new Set([`w:pStyle`,`w:rStyle`,`w:tblStyle`,`w:basedOn`,`w:next`,`w:link`]),Em=e=>String(e.attributes?.[`w:styleId`]),Dm=e=>{var t;let n=(t=e.elements)==null||(t=t.find(e=>e.name===`w:name`))==null||(t=t.attributes)==null?void 0:t[`w:val`];return n===void 0?void 0:String(n).toLowerCase()},Om=e=>new Map(Object.values(nf()).map(t=>qf((0,$.default)(Cm.format(t,e))).elements[0]).filter(e=>e.name===`w:style`).map(e=>[Em(e),e])),km=(e,t)=>{let n=Xf(e.get(wm)??{},`w:styles`).filter(e=>e.name===`w:style`),r=new Set(n.map(Em)),i,a=e=>(i??=Om(t(wm)),i.get(e)),o=new Set,s=new Map,c=e=>{let t=r.has(e)?void 0:a(e);if(t===void 0)return e;let i=n.find(e=>e.attributes?.[`w:type`]===t.attributes?.[`w:type`]&&Dm(e)===Dm(t));return i===void 0?(o.add(e),e):Em(i)},l=e=>(s.has(e)||s.set(e,c(e)),s.get(e)),u=e=>Tm.has(e.name??``)?A(A({},e),{},{attributes:A(A({},e.attributes),{},{"w:val":l(String(e.attributes[`w:val`]))})}):e.elements===void 0?e:A(A({},e),{},{elements:e.elements.map(u)});return{use:e=>e.map(u),write:()=>{let t=e.get(wm);if(!t)return;let n=Xf(t,`w:styles`),r=new Set(n.map(Em));for(let e of o)r.has(e)||(r.add(e),n.push(u(a(e))))}}},Am={type:sp.PARAGRAPH,children:[]},jm=({json:e,key:t,patch:n,delimiters:{start:r,end:i},patchPlaceholder:a,renumberDrawings:o})=>{let s=`${r}${t}.`;for(let r of Mm(e,s)){let e=Im(r.elements,s,i),c=n.rows.flatMap((n,i)=>{let s={type:`element`,name:`w:tbl`,elements:[...i===0?r.elements.map(Lm):o(Bm(r.elements))]},c=new Map(Object.entries(n).flatMap(([e,t])=>t===void 0?[]:[[e,t]]));for(let[e,n]of c)a(s,`${t}.${e}`,n);for(let n of e.filter(e=>!c.has(e)))a(s,`${t}.${n}`,Am);return s.elements});r.parent.elements.splice(r.parent.elements.indexOf(r.elements[0]),r.elements.length,...c),r.table&&!Fm(r.table.element)&&r.table.parent.elements.splice(r.table.parent.elements.indexOf(r.table.element),1)}},Mm=(e,t)=>{let n=cm(e,t).flatMap(t=>{let n=Nm(e,t.pathToParagraph);return n?[n]:[]}),r=n.filter(e=>!n.some(t=>Pm(e.path,t.path))).filter((e,t,n)=>n.findIndex(t=>t.row===e.row)===t);return[...new Set(r.map(e=>e.parent))].flatMap(e=>{let t=e.elements.filter(e=>e.name===`w:tr`),n=r.filter(t=>t.parent===e).map(e=>t.indexOf(e.row)).sort((e,t)=>e-t),{table:i}=r.find(t=>t.parent===e);return n.reduce((e,t)=>{let n=e[e.length-1];return n?.[n.length-1]===t-1?[...e.slice(0,-1),[...n,t]]:[...e,[t]]},[]).map(n=>{let r=e.elements.indexOf(t[n[0]]),a=e.elements.indexOf(t[n[n.length-1]]);return{parent:e,table:i,elements:e.elements.slice(r,a+1)}})})},Nm=(e,t)=>{let n=e,r,i;for(let e=1;e<t.length;e++){let a=n.elements[t[e]];a.name===`w:tbl`&&(i={element:a,parent:n}),a.name===`w:tr`&&(r={parent:n,table:i,row:a,path:t.slice(0,e+1)}),n=a}return r},Pm=(e,t)=>e.length>t.length&&t.every((t,n)=>e[n]===t),Fm=e=>(e.elements??[]).some(e=>e.name===`w:tr`||e.name!==`w:tblPr`&&e.name!==`w:tblGrid`&&Fm(e)),Im=(e,t,n)=>{let r=cm({elements:[...e]},t).flatMap(({text:e})=>e.split(t).slice(1).flatMap(e=>{let t=e.indexOf(n);return t>0?[e.slice(0,t)]:[]}));return[...new Set(r)]},Lm=e=>JSON.parse(JSON.stringify(e)),Rm=[`w14:paraId`,`w14:textId`],zm=[`w:bookmarkStart`,`w:bookmarkEnd`],Bm=(e,t)=>e.filter(e=>!zm.includes(e.name??``)&&(t?.name!==`w:sdtPr`||e.name!==`w:id`)).map(e=>A(A(A({},e),e.attributes===void 0?{}:{attributes:Object.fromEntries(Object.entries(e.attributes).filter(([e])=>!Rm.includes(e)))}),e.elements===void 0?{}:{elements:[...Bm(e.elements,e)]})),Vm=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme`,Hm=new Map([[`dk1`,`dark1`],[`lt1`,`light1`],[`dk2`,`dark2`],[`lt2`,`light2`],[`accent1`,`accent1`],[`accent2`,`accent2`],[`accent3`,`accent3`],[`accent4`,`accent4`],[`accent5`,`accent5`],[`accent6`,`accent6`],[`hlink`,`hyperlink`],[`folHlink`,`followedHyperlink`]]),Um=e=>e.name?.slice(e.name.indexOf(`:`)+1),Wm=(e,t)=>{var n;return e==null||(n=e.elements)==null?void 0:n.find(e=>Um(e)===t)},Gm=e=>{let t=e.elements?.map(e=>Um(e)===`srgbClr`?e.attributes?.val:Um(e)===`sysClr`?e.attributes?.lastClr:void 0).find(e=>e!==void 0);return typeof t==`string`&&/^[0-9A-Fa-f]{6}$/.test(t)?t.toUpperCase():void 0},Km=e=>e[0]===255&&e[1]===254||e[0]===254&&e[1]===255,qm=function(){var e=zf(function*(e,t){let n=e.file(t);if(n!==null)return Km(yield n.async(`uint8array`))?void 0:qf(yield n.async(`text`))});return function(t,n){return e.apply(this,arguments)}}(),Jm=function(){var e=zf(function*(e){var t,n;let r=(t=Wm(yield qm(e,`word/_rels/document.xml.rels`),`Relationships`))==null||(t=t.elements)==null?void 0:t.find(e=>e.attributes?.Type===Vm),i=r==null||(n=r.attributes)==null?void 0:n.Target;return typeof i==`string`?qm(e,vp(`word/document.xml`,i)):void 0});return function(t){return e.apply(this,arguments)}}(),Ym=function(){var e=zf(function*(e){let t=yield Jm(e);if(t===void 0)return;let n=(Wm(Wm(Wm(t,`theme`),`themeElements`),`clrScheme`)?.elements??[]).flatMap(e=>{let t=Hm.get(Um(e)??``),n=Gm(e);return t&&n?[[t,n]]:[]});return _n(Object.fromEntries(n))});return function(t){return e.apply(this,arguments)}}(),Xm=(e,t,{inTableRow:n})=>{if(t?.type===sp.TABLE_ROWS&&Array.isArray(t.rows))for(let n of t.rows){if(typeof n!=`object`||!n)throw Error(`Invalid patch "${e}". Expected each of its rows to be an object of patches, by the name of their field`);for(let[t,r]of Object.entries(n))r!==void 0&&Xm(`${e}.${t}`,r,{inTableRow:!0})}else if(!(t?.type===sp.DRAWING?!n&&typeof t.patch==`function`:t?.type!==sp.TABLE_ROWS&&Array.isArray(t?.children)))throw Error(`Invalid patch "${e}". Expected { type: PatchType.PARAGRAPH or PatchType.DOCUMENT, children: [...] }, ${n?`or { type: PatchType.TABLE_ROWS, rows: [...] }`:`{ type: PatchType.TABLE_ROWS, rows: [...] }, or a drawing patch such as ChartDataPatch from docx/charts`}`)},Zm=new Af,Qm=new Uint8Array([255,254]),$m=new Uint8Array([254,255]),eh=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0};(function(){var e=zf(function*({outputType:e,data:t,patches:n,keepOriginalStyles:r,placeholderDelimiters:i={start:`{{`,end:`}}`},recursive:a=!0,footnotes:o,endnotes:s,numbering:c={config:[]},pageNumbers:l}){let u=t instanceof wf.default?t:yield wf.default.loadAsync(t),d=new Map,f=yield Ym(u),p=[],m={Media:new Ju,Numbering:new hd(c),Theme:f&&{Colors:f},FootNotes:{View:{idOf:(e,t,n)=>M(`footnotes`,e,t,n)}},Endnotes:{View:{idOf:(e,t,n)=>M(`endnotes`,e,t,n)}},PackageParts:new gd({addOverride:(e,t)=>p.push({contentType:e,partName:t})},new Set(Object.keys(u.files).filter(e=>e.startsWith(`word/`)).map(e=>e.slice(5))))},h=new Map,g=[],_=[],v=!1,y=new Map;if(!i?.start.trim()||!i?.end.trim())throw Error(`Both start and end delimiters must be non-empty strings.`);let{start:b,end:x}=i;for(let[e,t]of Object.entries(n))Xm(e,t,{inTableRow:!1});for(let[e,t]of Object.entries(u.files)){let n=yield t.async(`uint8array`),r=n.slice(0,2);if(eh(r,Qm)||eh(r,$m)||!e.endsWith(`.xml`)&&!e.endsWith(`.rels`)){y.set(e,n);continue}let i=qf(yield t.async(`text`));if(e===`word/document.xml`){let e=i.elements?.find(e=>e.name===`w:document`);if(e&&e.attributes){for(let t of[`mc`,`wp`,`r`,`w15`,`m`])e.attributes[`xmlns:${t}`]=lu[t];e.attributes[`mc:Ignorable`]=`${e.attributes[`mc:Ignorable`]||``} w15`.trim()}}h.set(e,i)}let S=Gf([...h.values()].flatMap(Wf)),C=op([...h.values()].flatMap(ip)),w=new Map,T=e=>{let t=w.get(e);if(t)return t;let n={Relationships:{addRelationship:(t,n,r,i)=>{_.push({key:e,id:t,type:n,target:r,targetMode:i})}}};return w.set(e,n),n},E=e=>({file:m,viewWrapper:T(e),stack:[]}),D=(e,t)=>{p.push({contentType:e,partName:t})},O=km(h,E),k=Hp(m.Numbering,h,{createContext:E,addContentTypeOverride:D}),j=Mp({footnotes:o,endnotes:s},h,{createContext:E,addContentTypeOverride:D,renumberBookmarks:S,renumberDrawings:C,renumberLists:k.renumber,useStyles:O.use}),M=(e,t,n,r)=>r.viewWrapper===T(`word/document.xml`)?j.carry(e,t,n):void 0;Cp({parts:h,binaryParts:y,file:m,patches:Object.entries(n).flatMap(([e,t])=>t.type===sp.DRAWING?[[e,t]]:[]),delimiters:{start:b,end:x}},E);let N=Object.entries(n).flatMap(([e,t])=>t.type===sp.DRAWING?[]:[[e,t]]),P=[...N.filter(([,e])=>e.type===sp.TABLE_ROWS),...N.filter(([,e])=>e.type!==sp.TABLE_ROWS)];for(let[e,t]of[...h]){if(!e.startsWith(`word/`)||e.endsWith(`.xml.rels`))continue;let n=E(e);d.set(e,n);let i=(t,o,s)=>{if(s.type===sp.TABLE_ROWS){jm({json:t,key:o,patch:s,delimiters:{start:b,end:x},patchPlaceholder:i,renumberDrawings:C});return}let c=[],{didFindOccurrence:l}=um({json:t,patch:A(A({},s),{},{children:s.children.flatMap(e=>e instanceof Ms?e.writtenAs:[e]).map(t=>{if(t instanceof ks){let{target:n,anchor:r}=zs(t.options.link),i=new Ds(t.options.children,Jr(),r,t.options.link);return c.push({key:e,id:i.linkId,type:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink`,target:n,targetMode:fa.EXTERNAL}),i}return t})}),patchText:`${b}${o}${x}`,context:n,keepOriginalStyles:r,recursive:a,renumberIds:e=>O.use(k.renumber(j.renumber(S(C(e)))))});l&&_.push(...c)};for(let[e,n]of P)i(t,e,n)}j.write(),k.write(),O.write();for(let[e,t]of h){if(!e.startsWith(`word/`)||e.endsWith(`.xml.rels`))continue;let n=Zm.getMediaData(JSON.stringify(t),m.Media);n.length>0&&(v=!0,g.push({key:e,mediaDatas:n}))}for(let{key:e,mediaDatas:t}of g){let n=hp(e),r=h.get(n)??dp();h.set(n,r);let i=lp(r),a=Zm.replace(JSON.stringify(h.get(e)),t,i);h.set(e,JSON.parse(a));for(let e=0;e<t.length;e++){let{fileName:n}=t[e];up(r,i+e,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${n}`)}}for(let{key:e,id:t,type:n,target:r,targetMode:i}of _){let a=hp(e),o=h.get(a)??dp();h.set(a,o),up(o,t,n,r,i)}l&&(yield Xp(h,l,y));let F=Ff(m,void 0);if(v||p.length>0){let e=h.get(`[Content_Types].xml`);if(!e)throw Error(`Could not find content types file`);v&&(Zf(e,`image/png`,`png`),Zf(e,`image/jpeg`,`jpeg`),Zf(e,`image/jpeg`,`jpg`),Zf(e,`image/bmp`,`bmp`),Zf(e,`image/gif`,`gif`),Zf(e,`image/svg+xml`,`svg`));for(let{contentType:t,partName:n}of p)Qf(e,t,n)}let I=new wf.default;for(let[e,t]of h){let n=nh(t);I.file(e,Qr(n))}for(let[e,t]of y)I.file(e,t);for(let{data:e,fileName:t}of m.Media.Array)I.file(`word/media/${t}`,e);for(let{path:e,data:t}of F)I.file(e,typeof t==`string`?Qr(t):t);return I.generateAsync({type:e,mimeType:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,compression:`DEFLATE`})});return function(t){return e.apply(this,arguments)}})();var th=e=>A(A(A({},e),e.attributes===void 0?{}:{attributes:Object.fromEntries(Object.entries(e.attributes).map(([e,t])=>[e,t===void 0?t:String(t).replace(/&/g,`&amp;`)]))}),e.elements===void 0?{}:{elements:e.elements.map(e=>e.type===`text`?A(A({},e),{},{text:String(e.text).replace(/&/g,`&amp;`)}):th(e))}),nh=e=>(0,It.js2xml)(th(e),{attributeValueFn:e=>String(e).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/'/g,`&apos;`)});(function(){var e=zf(function*({data:e}){let t=e instanceof wf.default?e:yield wf.default.loadAsync(e),n=new Set;for(let[e,r]of Object.entries(t.files))if((e.endsWith(`.xml`)||e.endsWith(`.rels`))&&e.startsWith(`word/`)&&!e.endsWith(`.xml.rels`)){let e=qf(yield r.async(`text`));[...sm(e).map(e=>e.text),...pp(e).flatMap(({properties:e})=>mp(e))].forEach(e=>rh(e).forEach(e=>n.add(e)))}return Array.from(n)});return function(t){return e.apply(this,arguments)}})();var rh=e=>{let t=RegExp(`(?<=\\{\\{).+?(?=\\}\\})`,`gs`);return e.match(t)??[]},ih=class extends Error{constructor(e){super(e),this.name=`MathMarkupError`}},ah={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`};function oh(e){return e.replace(/&(#x[0-9a-fA-F]+|#[0-9]+|[a-zA-Z]+);/g,(e,t)=>t.startsWith(`#x`)?String.fromCodePoint(Number.parseInt(t.slice(2),16)):t.startsWith(`#`)?String.fromCodePoint(Number.parseInt(t.slice(1),10)):ah[t]??e)}function sh(e){let t=e.children.map(sh);return{tagName:e.tagName,attributes:e.attributes,children:t,get textContent(){return e.text.join(``)}}}var ch=/<(\/?)([A-Za-z][\w:.-]*)((?:\s+[\w:.-]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>/y,lh=/([\w:.-]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;function uh(e){let t={tagName:`#root`,attributes:new Map,children:[],text:[]},n=[t],r=0;for(;r<e.length;){let i=e.indexOf(`<`,r),a=i===-1?e.length:i;if(a>r){let t=oh(e.slice(r,a));for(let e of n)e.text.push(t)}if(i===-1)break;ch.lastIndex=i;let o=ch.exec(e);if(o===null)throw new ih(`unreadable markup at ${i}`);let[,s,c,l,u]=o;if(r=ch.lastIndex,s===`/`){let e=n.pop();if(e===void 0||e===t||e.tagName!==c)throw new ih(`unexpected </${c}>`);continue}let d=new Map;for(let e of l.matchAll(lh))d.set(e[1],oh(e[2]??e[3]??``));let f={tagName:c,attributes:d,children:[],text:[]};n[n.length-1].children.push(f),u!==`/`&&n.push(f)}if(n.length!==1)throw new ih(`unclosed <${n[n.length-1].tagName}>`);return t.children.map(sh)}function dh(e,t){for(let n of e){if(t(n))return n;let e=dh(n.children,t);if(e!==void 0)return e}}function fh(e,t){return(e.attributes.get(`class`)??``).split(/\s+/).includes(t)}var ph=class extends Error{element;constructor(e){super(`no OMML mapping for MathML element <${e}>`),this.name=`UnsupportedMathError`,this.element=e}},mh=new Set([`∑`]),hh=new Set([`∫`,`∬`,`∭`,`∮`]),gh=new Set([`(`,`(`]),_h=new Set([`)`,`)`]);function vh(e,t){let n=dh(uh(l.renderToString(e,{output:`mathml`,displayMode:t,throwOnError:!1})),e=>e.tagName.toLowerCase()===`math`);if(n===void 0)throw new ph(`math`);return n}function yh(e){return[...e.children]}function bh(e){return(e.textContent??``).replace(/[\u2061-\u2064]/g,``).trim()}function xh(e){return e.flatMap(Sh)}function Sh(e){let t=e.tagName.toLowerCase().replace(/^m:/,``);switch(t){case`math`:case`semantics`:case`mrow`:case`mstyle`:case`mpadded`:return Eh(yh(e));case`annotation`:case`annotation-xml`:case`mphantom`:return[];case`mspace`:return[new ac(` `)];case`mi`:case`mn`:case`mo`:case`mtext`:{let t=bh(e);return t===``?[]:[new ac(t)]}case`mfrac`:{let[t,n]=yh(e);if(t===void 0||n===void 0)throw new ph(`mfrac`);return[new lc({numerator:Sh(t),denominator:Sh(n)})]}case`msqrt`:return[new Mc({children:xh(yh(e))})];case`mroot`:{let[t,n]=yh(e);if(t===void 0||n===void 0)throw new ph(`mroot`);return[new Mc({children:Sh(t),degree:Sh(n)})]}case`msub`:case`munder`:{let[n,r]=yh(e);if(n===void 0||r===void 0)throw new ph(t);return[new Tc({children:Sh(n),subScript:Sh(r)})]}case`msup`:case`mover`:{let[n,r]=yh(e);if(n===void 0||r===void 0)throw new ph(t);return[new Cc({children:Sh(n),superScript:Sh(r)})]}case`msubsup`:case`munderover`:{let[n,r,i]=yh(e);if(n===void 0||r===void 0||i===void 0)throw new ph(t);return[new Dc({children:Sh(n),subScript:Sh(r),superScript:Sh(i)})]}default:throw new ph(t)}}var Ch=new Set([`msub`,`msup`,`msubsup`,`munder`,`mover`,`munderover`]);function wh(e,t){if(!Ch.has(e.tagName.toLowerCase()))return;let[n,r,i]=yh(e);if(n===void 0)return;let a=bh(n),o=mh.has(a),s=hh.has(a);if(!o&&!s)return;let c=e.tagName.toLowerCase(),l=c===`msub`||c===`munder`||c===`msubsup`||c===`munderover`?r:void 0,u=c===`msup`||c===`mover`?r:c===`msubsup`||c===`munderover`?i:void 0,d={children:xh(t),...l===void 0?{}:{subScript:Sh(l)},...u===void 0?{}:{superScript:Sh(u)}};return[o?new bc(d):new xc(d)]}function Th(e){let t=e[0],n=e[e.length-1];return e.length>=2&&t!==void 0&&n!==void 0&&t.tagName.toLowerCase()===`mo`&&n.tagName.toLowerCase()===`mo`&&gh.has(bh(t))&&_h.has(bh(n))?[new Ic({children:Eh(e.slice(1,-1))})]:Eh(e)}function Eh(e){let t=[];for(let n=0;n<e.length;n++){let r=wh(e[n],e.slice(n+1));if(r!==void 0)return t.push(...r),t;t.push(...Sh(e[n]))}return t}function Dh(e,t){let n=vh(e,t);if(dh([n],e=>fh(e,`katex-error`))!==void 0)throw new ph(`katex-error`);let r=dh(n.children,e=>e.tagName.toLowerCase()===`semantics`),i=yh(r===void 0?n:r),a=Th((i.length===1&&i[0].tagName.toLowerCase()===`mrow`?yh(i[0]):i).filter(e=>e.tagName.toLowerCase()!==`annotation`));if(a.length===0)throw new ph(`empty`);return a}var Oh=`�`,kh=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\uFFFE\uFFFF]/g,Ah=/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g;function jh(e){return e.replace(kh,Oh).replace(Ah,Oh)}var Mh=`Consolas, Courier New, monospace`,Nh=360,Ph=`md-ordered`;function Fh(e){return o().use(i).use(c).use(a).parse(s(e))}function Ih(e,t){return new Tr({text:jh(e),bold:t.bold,italics:t.italics,strike:t.strike,...t.code===!0?{font:Mh}:{}})}function Lh(e,t,n={}){let r=[];for(let i of e)switch(i.type){case`text`:r.push(Ih(i.value,n));break;case`strong`:r.push(...Lh(i.children,t,{...n,bold:!0}));break;case`emphasis`:r.push(...Lh(i.children,t,{...n,italics:!0}));break;case`delete`:r.push(...Lh(i.children,t,{...n,strike:!0}));break;case`inlineCode`:r.push(Ih(i.value,{...n,code:!0}));break;case`link`:r.push(new ks({children:Lh(i.children,t,n),link:i.url}));break;case`break`:r.push(new Tr({text:``,break:1}));break;case`image`:{let e=t.get(i);e===void 0?r.push(Ih(i.alt??i.url,n)):r.push(Xh(e,i.alt));break}case`inlineMath`:r.push(...Rh(i.value,!1,n));break;default:r.push(...Lh(zh(i),t,n))}return r}function Rh(e,t,n){try{return[new Zs({children:Dh(e,t)})]}catch{return[Ih(e,{...n,code:!0})]}}function zh(e){let t=e.children;return Array.isArray(t)?t:[]}var Bh=[_s.HEADING_1,_s.HEADING_2,_s.HEADING_3,_s.HEADING_4,_s.HEADING_5,_s.HEADING_6];function Vh(e,t){return new Q({heading:Bh[Math.min(e.depth,6)-1],children:Lh(e.children,t)})}function Hh(e){return e.value.split(`
29
- `).map(e=>new Q({children:[new Tr({text:jh(e===``?` `:e),font:Mh})],spacing:{before:0,after:0}}))}var Uh=624;function Wh(e,t){return e<=Uh?{width:Math.round(e),height:Math.round(t)}:{width:Uh,height:Math.round(t*Uh/e)}}function Gh(e){return(e.lang??``).toLowerCase()===`mermaid`}async function Kh(e,t){let n=new Map;if(t===void 0)return n;let r=[],i=e=>{e.type===`code`&&Gh(e)&&r.push(e);for(let t of e.children??[])i(t)};i(e);for(let[e,i]of r.entries())try{n.set(i,await t(i.value,`docx-export-${e}`))}catch{}return n}async function qh(e,t){let n=new Map,{imageKey:r,loadImage:i}=t;if(r===void 0||i===void 0)return n;let a=[],o=e=>{e.type===`image`&&a.push(e);for(let t of e.children??[])o(t)};o(e);let s=new Map;for(let e of a){let t=r(e.url);if(t===void 0)continue;s.has(t)||s.set(t,await i(e.url));let a=s.get(t);a!==void 0&&n.set(e,a)}return n}function Jh(e){return new Fa({type:`svg`,data:new TextEncoder().encode(e.svg),fallback:{type:`png`,data:e.png},transformation:Wh(e.width,e.height)})}function Yh(e){return new Q({alignment:dn.CENTER,children:[Jh(e)]})}function Xh(e,t){return e.kind===`vector`?Jh(e.image):new Fa({type:e.type,data:e.bytes,transformation:Wh(e.width,e.height),...Zh(t)})}function Zh(e){let t=e?.trim()??``;return t===``?{}:{altText:{name:`Picture`,description:t}}}function Qh(e){return e===0?{}:{indent:{left:Nh*e},border:{left:{style:In.SINGLE,size:12,color:`CCCCCC`,space:12}}}}function $h(e,t,n=0){let r=e.ordered===!0,i=r?t.instance++:0,a=[];for(let o of e.children){let e=!0;for(let s of o.children)s.type===`list`?a.push(...$h(s,t,n+1)):s.type===`paragraph`?(a.push(new Q({children:Lh(s.children,t.images),...e?r?{numbering:{reference:Ph,level:n,instance:i}}:{bullet:{level:n}}:{indent:{left:Nh*(n+1)}}})),e=!1):a.push(...ng([s],t))}return a}function eg(e,t){return new nu({rows:e.children.map((e,n)=>new tu({tableHeader:n===0,children:e.children.map(e=>new zl({children:[new Q({children:Lh(e.children,t)})]}))})),width:{size:100,type:cl.PERCENTAGE}})}function tg(){return new Q({children:[],border:{bottom:{style:In.SINGLE,size:6,color:`999999`,space:1}}})}function ng(e,t){let n=[];for(let r of e)switch(r.type){case`heading`:n.push(Vh(r,t.images));break;case`paragraph`:n.push(new Q({children:Lh(r.children,t.images),...Qh(t.quoteDepth)}));break;case`list`:n.push(...$h(r,t));break;case`table`:n.push(eg(r,t.images));break;case`code`:{let e=t.diagrams.get(r);e===void 0?n.push(...Hh(r)):n.push(Yh(e));break}case`blockquote`:n.push(...ng(r.children,{...t,quoteDepth:t.quoteDepth+1}));break;case`thematicBreak`:n.push(tg());break;case`math`:n.push(new Q({children:Rh(r.value,!0,{}),alignment:dn.CENTER}));break;default:{let e=Lh(zh(r),t.images);e.length>0&&n.push(new Q({children:e}));break}}return n}async function rg(e,t={}){let n=Fh(e),r=await Kh(n,t.renderDiagram),i=await qh(n,t);return ng(n.children,{instance:0,quoteDepth:0,diagrams:r,images:i})}function ig(e){return new yf({styles:{default:ag()},numbering:{config:[og()]},sections:[{children:e}]})}function ag(){let e=e=>({paragraph:{outlineLevel:e}});return{heading1:e(0),heading2:e(1),heading3:e(2),heading4:e(3),heading5:e(4),heading6:e(5)}}function og(){return{reference:Ph,levels:[Yu.DECIMAL,Yu.LOWER_LETTER,Yu.LOWER_ROMAN,Yu.DECIMAL,Yu.LOWER_LETTER].map((e,t)=>({level:t,format:e,text:`%${t+1}.`,alignment:dn.START,style:{paragraph:{indent:{left:720*(t+1),hanging:360}}}}))}}function sg(e){let t=/viewBox="\s*[\d.-]+[\s,]+[\d.-]+[\s,]+([\d.]+)[\s,]+([\d.]+)/.exec(e),n=t?Number(t[1]):NaN,r=t?Number(t[2]):NaN;return!Number.isFinite(n)||!Number.isFinite(r)||n<=0||r<=0?null:{width:n,height:r}}function cg(e,t,n){let r=/^[\s\S]*?<svg\b[^>]*>/.exec(e);return r===null?e:r[0].replace(/\swidth="[^"]*"/,``).replace(/\sheight="[^"]*"/,``).replace(/\sstyle="[^"]*"/,e=>{let t=e.replace(/max-width:[^;"]*;?/,``);return/style="\s*"/.test(t)?``:t}).replace(/>$/,` width="${t}" height="${n}">`)+e.slice(r[0].length)}var lg=e({DiagramError:()=>ug,inlineStyles:()=>pg,rasterise:()=>gg,renderDiagram:()=>mg,svgDimensions:()=>dg,withExplicitSize:()=>cg}),ug=class extends Error{constructor(e){super(e),this.name=`DiagramError`}};function dg(e){let t=sg(e);if(t===null)throw new ug(`diagram has no usable viewBox`);return t}var fg=[`fill`,`fill-opacity`,`stroke`,`stroke-width`,`stroke-opacity`,`stroke-dasharray`,`stroke-linecap`,`stroke-linejoin`,`opacity`,`font-family`,`font-size`,`font-weight`,`font-style`,`text-anchor`,`dominant-baseline`];function pg(e){let t=document.createElement(`div`);t.setAttribute(`style`,`position:absolute;left:-10000px;top:0;width:0;height:0;overflow:hidden`),t.innerHTML=e;let n=t.querySelector(`svg`);if(n===null)return e;document.body.append(t);try{let e=[n,...n.querySelectorAll(`*`)].filter(e=>e.tagName.toLowerCase()!==`style`).map(e=>{let t=window.getComputedStyle(e),n=[];for(let e of fg){let r=t.getPropertyValue(e);r!==``&&n.push([e,r])}return{element:e,painted:n}});for(let{element:t,painted:n}of e){for(let[e,r]of n)t.setAttribute(e,r);t.removeAttribute(`style`),t.removeAttribute(`class`)}for(let e of[...n.querySelectorAll(`style`)])e.remove();return n.outerHTML}finally{t.remove()}}async function mg(e,t){return r(async()=>{let r=(await n(async()=>{let{default:e}=await import(`./mermaid.core-BKhoXFOd.js`).then(e=>e.t);return{default:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))).default,i;try{r.initialize({startOnLoad:!1,theme:`default`,look:`classic`,securityLevel:`strict`,suppressErrorRendering:!0,flowchart:{htmlLabels:!1},htmlLabels:!1}),{svg:i}=await r.render(t,e)}catch(e){throw new ug(`mermaid could not render the diagram: ${String(e)}`)}finally{r.initialize({startOnLoad:!1,look:`classic`,securityLevel:`strict`,suppressErrorRendering:!0})}let{width:a,height:o}=dg(i),s=cg(i,a,o),c=await gg(s,a,o);return{svg:pg(s),png:c,width:a,height:o}})}var hg=2;async function gg(e,t,n){let r=document.createElement(`canvas`);r.width=Math.max(1,Math.round(t*hg)),r.height=Math.max(1,Math.round(n*hg));let i=r.getContext(`2d`);if(i===null)throw new ug(`no 2d canvas context for the fallback image`);let a=URL.createObjectURL(new Blob([e],{type:`image/svg+xml;charset=utf-8`}));try{let e=await _g(a);return i.fillStyle=`#ffffff`,i.fillRect(0,0,r.width,r.height),i.drawImage(e,0,0,r.width,r.height),await vg(r)}finally{URL.revokeObjectURL(a)}}function _g(e){return new Promise((t,n)=>{let r=new Image;r.onload=()=>t(r),r.onerror=()=>n(new ug(`the browser would not draw the diagram`)),r.src=e})}async function vg(e){let t=await new Promise(t=>e.toBlob(t,`image/png`));if(t===null)throw new ug(`the canvas produced no image`);return new Uint8Array(await t.arrayBuffer())}export{mg as a,ig as c,Hf as d,Q as f,gg as i,rg as l,pg as n,dg as o,Tr as p,lg as r,cg as s,ug as t,jh as u};
28
+ `:``);a(t)||i()}function u(e,t){return e+`="`+n(t)+`"`}t.exports=a,t.exports.element=t.exports.Element=o})),Cf=Ot(),wf=y(bf(),1),$=y(Sf(),1),Tf=0,Ef=32,Df=32,Of=(e,t)=>{let n=t.replace(/-/g,``);if(n.length!==Df)throw Error(`Error: Cannot extract GUID from font filename: ${t}`);let r=n.replace(/(..)/g,`$1 `).trim().split(` `).map(e=>parseInt(e,16));r.reverse();let i=e.slice(Tf,Ef).map((e,t)=>e^r[t%r.length]),a=new Uint8Array(Tf+i.length+Math.max(0,e.length-Ef));return a.set(e.slice(0,Tf)),a.set(i,Tf),a.set(e.slice(Ef),Tf+i.length),a},kf=class{format(e,t={stack:[]}){let n=e.prepForXml(t);if(n)return n;throw Error(`XMLComponent did not format correctly`)}},Af=class{replace(e,t,n){let r=e;return t.forEach((e,t)=>{r=r.replace(RegExp(`{${e.fileName}}`,`g`),(n+t).toString())}),r}getMediaData(e,t){return t.Array.filter(t=>e.search(`{${t.fileName}}`)>0)}},jf=class{replace(e,t){let n=e;for(let e of t)n=n.replace(RegExp(`{${e.reference}-${e.instance}}`,`g`),e.numId.toString());return n}},Mf=new kf,Nf=(e,t,n,r,i=!0)=>(0,$.default)(Mf.format(t,{viewWrapper:{View:t,Relationships:r},file:e,stack:[]}),{indent:n,declaration:i?{standalone:`yes`,encoding:`UTF-8`}:{encoding:`UTF-8`}}),Pf=(e,t,n,r)=>{let{content:i}=t.options;if(i instanceof Uint8Array)return[{data:i,path:`word/${n}`}];if(`files`in i){let t=new wf.default;for(let{path:n,content:a}of i.files)t.file(n,a instanceof Uint8Array?a:Qr(Nf(e,a,r,new Qo)));return[{data:t.generateAsync({type:`uint8array`,compression:`DEFLATE`}),path:`word/${n}`}]}let a=e.PackageParts.createRelationships(n),o=Nf(e,i,r,a),s=n.slice(0,n.lastIndexOf(`/`)),c=n.slice(n.lastIndexOf(`/`)+1);return[{data:o,path:`word/${n}`},...a.RelationshipCount>0?[{data:Nf(e,a,r,a,!1),path:`word/${s}/_rels/${c}.rels`}]:[]]},Ff=(e,t,n=0)=>{let r=e.PackageParts.Array.slice(n);return r.length===0?[]:[...r.flatMap(({part:n,path:r})=>Pf(e,n,r,t)),...Ff(e,t,n+r.length)]},If=[`PackageParts`],Lf=class{constructor(){w(this,`formatter`,void 0),w(this,`imageReplacer`,void 0),w(this,`numberingReplacer`,void 0),this.formatter=new kf,this.imageReplacer=new Af,this.numberingReplacer=new jf}compile(e,t,n=[]){let r=new wf.default,i=this.xmlifyFile(e,t),{PackageParts:a}=i,o=ec(i,If),s=new Map(Object.entries(o));for(let[,e]of s)if(Array.isArray(e))for(let t of e)r.file(t.path,Qr(t.data));else r.file(e.path,Qr(e.data));for(let{path:e,data:t}of a)r.file(e,typeof t==`string`?Qr(t):t);for(let e of n)r.file(e.path,Qr(e.data));for(let t of e.Media.Array)t.type===`svg`?(r.file(`word/media/${t.fileName}`,t.data),r.file(`word/media/${t.fallback.fileName}`,t.fallback.data)):r.file(`word/media/${t.fileName}`,t.data);for(let[t,{data:n,fontKey:i}]of e.FontTable.files.entries())r.file(`word/fonts/font${t+1}.odttf`,Of(n,i));return r}xmlifyFile(e,t){let n=(0,$.default)(this.formatter.format(e.Document.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),r=(0,$.default)(this.formatter.format(e.Comments,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),i=(0,$.default)(this.formatter.format(e.FootNotes.View,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),a=(0,$.default)(this.formatter.format(e.Endnotes.View,{viewWrapper:e.Endnotes,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),o=e.Document.Relationships.RelationshipCount+1,s=e.Comments.Relationships.RelationshipCount+1,c=e.FootNotes.Relationships.RelationshipCount+1,l=e.Endnotes.Relationships.RelationshipCount+1,u=this.imageReplacer.getMediaData(n,e.Media),d=this.imageReplacer.getMediaData(r,e.Media),f=this.imageReplacer.getMediaData(i,e.Media),p=this.imageReplacer.getMediaData(a,e.Media);return A(A(A(A({Relationships:{data:(()=>{let n=Qo.copy(e.Document.Relationships);return u.forEach((e,t)=>{n.addRelationship(o+t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),n.addRelationship(n.RelationshipCount+1,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable`,`fontTable.xml`),(0,$.default)(this.formatter.format(n,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}})})(),path:`word/_rels/document.xml.rels`},Document:{data:(()=>{let t=this.imageReplacer.replace(n,u,o);return this.numberingReplacer.replace(t,e.Numbering.ConcreteNumbering)})(),path:`word/document.xml`},Styles:{data:(()=>{let n=(0,$.default)(this.formatter.format(e.Styles,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}});return this.numberingReplacer.replace(n,e.Numbering.ConcreteNumbering)})(),path:`word/styles.xml`},Properties:{data:(0,$.default)(this.formatter.format(e.CoreProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`docProps/core.xml`},FileRelationships:{data:(0,$.default)(this.formatter.format(e.FileRelationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),path:`_rels/.rels`},HeaderRelationships:e.Headers.map((n,r)=>{let i=(0,$.default)(this.formatter.format(n.View,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),a=this.imageReplacer.getMediaData(i,e.Media),o=Qo.copy(n.Relationships);return a.forEach((e,t)=>{o.addRelationship(t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),{data:(0,$.default)(this.formatter.format(o,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),path:`word/_rels/header${r+1}.xml.rels`}}),FooterRelationships:e.Footers.map((n,r)=>{let i=(0,$.default)(this.formatter.format(n.View,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),a=this.imageReplacer.getMediaData(i,e.Media),o=Qo.copy(n.Relationships);return a.forEach((e,t)=>{o.addRelationship(t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),{data:(0,$.default)(this.formatter.format(o,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),path:`word/_rels/footer${r+1}.xml.rels`}}),Headers:e.Headers.map((n,r)=>{let i=(0,$.default)(this.formatter.format(n.View,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),a=this.imageReplacer.getMediaData(i,e.Media),o=this.imageReplacer.replace(i,a,0);return{data:this.numberingReplacer.replace(o,e.Numbering.ConcreteNumbering),path:`word/header${r+1}.xml`}}),Footers:e.Footers.map((n,r)=>{let i=(0,$.default)(this.formatter.format(n.View,{viewWrapper:n,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),a=this.imageReplacer.getMediaData(i,e.Media),o=this.imageReplacer.replace(i,a,0);return{data:this.numberingReplacer.replace(o,e.Numbering.ConcreteNumbering),path:`word/footer${r+1}.xml`}}),CustomProperties:{data:(0,$.default)(this.formatter.format(e.CustomProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`docProps/custom.xml`},AppProperties:{data:(0,$.default)(this.formatter.format(e.AppProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`docProps/app.xml`},FootNotes:{data:(()=>{let t=this.imageReplacer.replace(i,f,c);return this.numberingReplacer.replace(t,e.Numbering.ConcreteNumbering)})(),path:`word/footnotes.xml`},FootNotesRelationships:{data:(()=>{let n=Qo.copy(e.FootNotes.Relationships);return f.forEach((e,t)=>{n.addRelationship(c+t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),(0,$.default)(this.formatter.format(n,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}})})(),path:`word/_rels/footnotes.xml.rels`},Endnotes:{data:(()=>{let t=this.imageReplacer.replace(a,p,l);return this.numberingReplacer.replace(t,e.Numbering.ConcreteNumbering)})(),path:`word/endnotes.xml`},EndnotesRelationships:{data:(()=>{let n=Qo.copy(e.Endnotes.Relationships);return p.forEach((e,t)=>{n.addRelationship(l+t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),(0,$.default)(this.formatter.format(n,{viewWrapper:e.Endnotes,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}})})(),path:`word/_rels/endnotes.xml.rels`},Settings:{data:(0,$.default)(this.formatter.format(e.Settings,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/settings.xml`}},e.Comments.IsEmpty?{}:{Comments:{data:(()=>{let t=this.imageReplacer.replace(r,d,s);return this.numberingReplacer.replace(t,e.Numbering.ConcreteNumbering)})(),path:`word/comments.xml`},CommentsRelationships:{data:(()=>{let n=Qo.copy(e.Comments.Relationships);return d.forEach((e,t)=>{n.addRelationship(s+t,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${e.fileName}`)}),(0,$.default)(this.formatter.format(n,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}})})(),path:`word/_rels/comments.xml.rels`}}),e.CommentsExtended?{CommentsExtended:{data:(0,$.default)(this.formatter.format(e.CommentsExtended,{viewWrapper:{View:e.CommentsExtended,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/commentsExtended.xml`}}:{}),e.CommentsIds?{CommentsIds:{data:(0,$.default)(this.formatter.format(e.CommentsIds,{viewWrapper:{View:e.CommentsIds,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/commentsIds.xml`}}:{}),{},{FontTable:{data:(0,$.default)(this.formatter.format(e.FontTable.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/fontTable.xml`},FontTableRelationships:{data:(0,$.default)(this.formatter.format(e.FontTable.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),path:`word/_rels/fontTable.xml.rels`},Theme:{data:(0,$.default)(this.formatter.format(e.Theme,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/theme/theme1.xml`},PackageParts:Ff(e,t),Numbering:{data:(0,$.default)(this.formatter.format(e.Numbering,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:`yes`,encoding:`UTF-8`}}),path:`word/numbering.xml`},ContentTypes:{data:(0,$.default)(this.formatter.format(e.ContentTypes,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:`UTF-8`}}),path:`[Content_Types].xml`}})}};function Rf(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function zf(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Rf(a,r,i,o,s,`next`,e)}function s(e){Rf(a,r,i,o,s,`throw`,e)}o(void 0)})}}var Bf={NONE:``,WITH_2_BLANKS:` `,WITH_4_BLANKS:` `,WITH_TAB:` `},Vf=e=>e===!0?Bf.WITH_2_BLANKS:e===!1?void 0:e,Hf=class e{static pack(e,t,n){var r=this;return zf(function*(e,t,n,i=[]){return r.compiler.compile(e,Vf(n),i).generateAsync({type:t,mimeType:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,compression:`DEFLATE`})}).apply(this,arguments)}static toString(t,n,r=[]){return e.pack(t,`string`,n,r)}static toBuffer(t,n,r=[]){return e.pack(t,`nodebuffer`,n,r)}static toBase64String(t,n,r=[]){return e.pack(t,`base64`,n,r)}static toBlob(t,n,r=[]){return e.pack(t,`blob`,n,r)}static toArrayBuffer(t,n,r=[]){return e.pack(t,`arraybuffer`,n,r)}static toStream(e,t,n=[]){let r=new Cf.Stream;return this.compiler.compile(e,Vf(t),n).generateAsync({type:`nodebuffer`,mimeType:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,compression:`DEFLATE`}).then(e=>{r.emit(`data`,e),r.emit(`end`)}),r}};w(Hf,`compiler`,new Lf);var Uf=e=>{if(e.name!==`w:bookmarkStart`&&e.name!==`w:bookmarkEnd`)return;let t=Number(e.attributes?.[`w:id`]);return Number.isInteger(t)?t:void 0},Wf=e=>{let t=Uf(e);return[...t===void 0?[]:[t],...(e.elements??[]).flatMap(Wf)]},Gf=e=>{let t=new Set(e),n=new Map,r=e.reduce((e,t)=>Math.max(e,t),0),i=e=>{let i=n.get(e);if(i!==void 0)return i;let a=t.has(e)?r+1:e;return r=Math.max(r,a),t.add(a),n.set(e,a),a},a=e=>{let t=Uf(e);return A(A(A({},e),t===void 0?{}:{attributes:A(A({},e.attributes),{},{"w:id":String(i(t))})}),e.elements===void 0?{}:{elements:e.elements.map(a)})};return e=>e.map(a)},Kf=new kf,qf=e=>(0,It.xml2js)(e,{compact:!1,captureSpacesBetweenElements:!0}),Jf=e=>qf((0,$.default)(Kf.format(new Sr({text:e})))).elements[0].elements??[],Yf=e=>A(A({},e),{},{attributes:{"xml:space":`preserve`}}),Xf=(e,t)=>{let n=e.elements?.find(e=>e.name===t);return n===void 0?[]:(n.elements??=[],n.elements)},Zf=(e,t,n)=>{let r=Xf(e,`Types`);r.some(e=>{var r,i;return e.type===`element`&&e.name===`Default`&&(e==null||(r=e.attributes)==null?void 0:r.ContentType)===t&&(e==null||(i=e.attributes)==null?void 0:i.Extension)===n})||r.push({attributes:{ContentType:t,Extension:n},name:`Default`,type:`element`})},Qf=(e,t,n)=>{let r=Xf(e,`Types`);r.some(e=>e.type===`element`&&e.name===`Override`&&e.attributes?.PartName===n)||r.push({attributes:{ContentType:t,PartName:n},name:`Override`,type:`element`})},$f=(e,t)=>{let n=e.elements?.find(e=>e.name===`Types`);n?.elements!==void 0&&(n.elements=n.elements.filter(e=>e.name!==`Override`||String(e.attributes?.PartName??``).toLowerCase()!==t.toLowerCase()))},ep=new Set([`wp:inline`,`wp:anchor`]),tp=new Set([`wp:docPr`,`wps:cNvPr`,`wpg:cNvPr`]),np=new Set([`a:stCxn`,`a:endCxn`]),rp=(e,t)=>{if(!t.has(e.name??``))return;let n=Number(e.attributes?.id);return Number.isInteger(n)?n:void 0},ip=e=>{let t=rp(e,tp);return[...t===void 0?[]:[t],...(e.elements??[]).flatMap(ip)]},ap=e=>{let t=e=>{let n=rp(e,tp);return[...n===void 0?[]:[n],...(e.elements??[]).flatMap(e=>ep.has(e.name??``)?[]:t(e))]};return t(e)},op=e=>{let t=new Set(e),n=e.reduce((e,t)=>Math.max(e,t),0),r=e=>{let r=t.has(e)?n+1:e;return n=Math.max(n,r),t.add(r),r},i=e=>{let t=new Map([...new Set(ap(e))].map(e=>[e,r(e)])),n=r=>{if(r!==e&&ep.has(r.name??``))return i(r);let a=rp(r,tp)??rp(r,np),o=a===void 0?void 0:t.get(a);return A(A(A({},r),o===void 0?{}:{attributes:A(A({},r.attributes),{},{id:String(o)})}),r.elements===void 0?{}:{elements:r.elements.map(n)})};return n(e)},a=e=>ep.has(e.name??``)?i(e):A(A({},e),e.elements===void 0?{}:{elements:e.elements.map(a)});return e=>e.map(a)},sp={DOCUMENT:`file`,PARAGRAPH:`paragraph`,TABLE_ROWS:`tableRows`,DRAWING:`drawing`},cp=e=>{let t=parseInt(e.substring(3),10);return isNaN(t)?0:t},lp=e=>Xf(e,`Relationships`).map(e=>{var t;return cp(((t=e.attributes)==null||(t=t.Id)==null?void 0:t.toString())??``)}).reduce((e,t)=>Math.max(e,t),0)+1,up=(e,t,n,r,i)=>{let a=Xf(e,`Relationships`);return a.push({attributes:{Id:`rId${t}`,Type:n,Target:r,TargetMode:i},name:`Relationship`,type:`element`}),a},dp=()=>({declaration:{attributes:{version:`1.0`,encoding:`UTF-8`,standalone:`yes`}},elements:[{type:`element`,name:`Relationships`,attributes:{xmlns:`http://schemas.openxmlformats.org/package/2006/relationships`},elements:[]}]}),fp=new Map([[`wp:inline`,`wp:docPr`],[`wp:anchor`,`wp:docPr`],[`wpg:graphicFrame`,`wpg:cNvPr`],[`wpc:graphicFrame`,`wpg:cNvPr`]]),pp=e=>(e.elements??[]).flatMap(e=>{let t=e.name===void 0?void 0:fp.get(e.name),n=t===void 0?void 0:e.elements?.find(e=>e.name===t);return[...n?[{element:e,properties:n}]:[],...pp(e)]}),mp=e=>[e.attributes?.descr,e.attributes?.title].flatMap(e=>e===void 0?[]:[String(e)]),hp=e=>{let t=e.lastIndexOf(`/`);return`${e.slice(0,t+1)}_rels/${e.slice(t+1)}.rels`},gp=e=>e.replace(/(^|\/)_rels\/([^/]*)\.rels$/,`$1$2`),_p=e=>e.slice(0,e.lastIndexOf(`/`)+1),vp=(e,t)=>{let n=t.replace(/\\/g,`/`);return(n.startsWith(`/`)?n:`${_p(e)}${n}`).split(`/`).reduce((e,t)=>t===``||t===`.`?e:t===`..`?e.slice(0,-1):[...e,t],[]).join(`/`)},yp=(e,t)=>{let n=_p(e).split(`/`).filter(Boolean),r=t.split(`/`),i=n.findIndex((e,t)=>t>=r.length-1||r[t]!==e),a=i===-1?n.length:i;return[...n.slice(a).map(()=>`..`),...r.slice(a)].join(`/`)},bp=`[Content_Types].xml`,xp=e=>(e.elements?.some(e=>e.name===`Relationships`)||(e.elements=[...e.elements??[],...dp().elements]),Xf(e,`Relationships`)),Sp=(e,t,n,r)=>{let i=new kf,a=n=>e.has(n)||t.has(n),o=n=>{if(a(n))return n;let r=(()=>{try{return decodeURI(n)}catch{return}})();if(r!==void 0&&a(r))return r;let i=n.toLowerCase();return[...e.keys(),...t.keys()].find(e=>e.toLowerCase()===i)},s=(t,n)=>{let r=e.get(hp(t));return r===void 0?void 0:Xf(r,`Relationships`).find(e=>e.name===`Relationship`&&e.attributes?.Id===n)},c=(e,t)=>{let n=t.attributes?.Target;return t.attributes?.TargetMode===`External`||n===void 0?void 0:o(vp(e,String(n)))},l=t=>[...e].some(([e,n])=>e.endsWith(`.rels`)&&Xf(n,`Relationships`).some(n=>c(gp(e),n)===t)),u=n=>{e.delete(n),t.delete(n),e.delete(hp(n));let r=e.get(bp);r!==void 0&&$f(r,`/${n}`)};return{getRelatedPart:(t,n)=>{let r=s(t.path,n),i=r===void 0?void 0:c(t.path,r);return i===void 0?void 0:{path:i,xml:e.get(i)}},replaceRelatedPart:(t,r,i)=>{let a=`word/${n.PackageParts.add(i)}`,{relationshipType:o}=i.options,d=yp(t.path,a),f=r===void 0?void 0:s(t.path,r);if(f===void 0){let n=hp(t.path),i=e.get(n)??dp();e.set(n,i);let a=r??`rId${lp(i)}`;return xp(i).push({type:`element`,name:`Relationship`,attributes:{Id:a,Type:o,Target:d}}),a}let p=c(t.path,f);return f.attributes=A(A({},Object.fromEntries(Object.entries(f.attributes).filter(([e])=>e!==`TargetMode`))),{},{Type:o,Target:d}),p!==void 0&&p!==t.path&&p!==bp&&!p.endsWith(`.rels`)&&!l(p)&&u(p),String(f.attributes.Id)},format:e=>qf((0,$.default)(i.format(e,r))).elements[0]}},Cp=({parts:e,binaryParts:t,file:n,patches:r,delimiters:i},a)=>{let o=r.map(([e,t])=>({placeholder:`${i.start}${e}${i.end}`,patch:t})),s=[...e].filter(([e])=>e.startsWith(`word/`)&&!e.endsWith(`.rels`)).flatMap(([e,t])=>pp(t).flatMap(n=>{let r=mp(n.properties),i=o.filter(({placeholder:e})=>r.some(t=>t.includes(e)));if(i.length>1)throw Error(`The drawing "${n.properties.attributes?.name??``}" in ${e} has the placeholders ${i.map(({placeholder:e})=>e).join(` and `)} in its alt text. A drawing can only be patched once`);return i.map(({placeholder:r,patch:i})=>({drawing:A(A({placeholder:r},n),{},{part:{path:e,xml:t}}),patch:i}))}));for(let{drawing:r,patch:i}of s)i.patch(r,Sp(e,t,n,a(r.part.path)))},wp=new kf,Tp=`word/document.xml`,Ep={path:`word/footnotes.xml`,rootName:`w:footnotes`,noteName:`w:footnote`,referenceName:`w:footnoteReference`,contentType:`application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml`,relationshipType:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes`,create:{part:()=>new Uu,mark:()=>new zu,styles:()=>[new Rd({}),new Bd({}),new zd({})]}},Dp={path:`word/endnotes.xml`,rootName:`w:endnotes`,noteName:`w:endnote`,referenceName:`w:endnoteReference`,contentType:`application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml`,relationshipType:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes`,create:{part:()=>new Mu,mark:()=>new Tu,styles:()=>[new Vd({}),new Ud({}),new Hd({})]}},Op=(e,t)=>qf((0,$.default)(wp.format(e,t))).elements[0],kp=(e,t)=>{let n=t.includes(e.name??``)?Number(e.attributes?.[`w:id`]):NaN;return[...Number.isInteger(n)?[n]:[],...(e.elements??[]).flatMap(e=>kp(e,t))]},Ap=(e,t)=>{let n=e.elements??[],r=+(n[0]?.name===`w:pPr`);return A(A({},e),{},{elements:[...n.slice(0,r),t,...n.slice(r)]})},jp=(e,t,n,{createContext:r,addContentTypeOverride:i,renumberBookmarks:a,renumberDrawings:o,renumberLists:s,useStyles:c})=>{let l=new Map(Object.entries(t).map(([e,t])=>[Number(e),t])),u=new Map,d=[...l.keys()].filter(Number.isFinite).reduce((e,t)=>Math.max(e,Math.floor(t)),0),f=new Map,p,m=t=>{let r=t.name===e.referenceName?l.get(Number(t.attributes?.[`w:id`])):void 0;return r===void 0?t.elements===void 0?t:A(A({},t),{},{elements:t.elements.map(m)}):(p=(p??[...n.values()].flatMap(t=>kp(t,[e.noteName,e.referenceName])).reduce((e,t)=>Math.max(e,t),0))+1,f.set(p,r),A(A({},t),{},{attributes:A(A({},t.attributes),{},{"w:id":String(p)})}))},h=()=>{let t=Xf(n.get(hp(Tp))??{},`Relationships`).find(t=>t.attributes?.Type===e.relationshipType),a=t?vp(Tp,String(t.attributes.Target)):e.path;return n.has(a)||(n.set(a,{declaration:{attributes:{version:`1.0`,encoding:`UTF-8`,standalone:`yes`}},elements:[Op(e.create.part(),r(a))]}),i(e.contentType,`/${a}`)),t||r(Tp).viewWrapper.Relationships.addRelationship(Jr(),e.relationshipType,yp(Tp,a)),a};return{renumber:e=>e.map(m),write:()=>{if(f.size===0)return;let t=h(),i=r(t),l=new Map([...new Set(f.values())].map(t=>{let n=Op(e.create.mark(),i);return[t,c(s(a(t.children.map(e=>Op(e,i)).map((e,t)=>t===0?Ap(e,n):e))))]}));Xf(n.get(t),e.rootName).push(...[...f].map(([t,n])=>({type:`element`,name:e.noteName,attributes:{"w:id":String(t)},elements:[...o(l.get(n))]})));let u=n.get(`word/styles.xml`);if(u){let t=Xf(u,`w:styles`),n=new Set(t.map(e=>e.attributes?.[`w:styleId`]));t.push(...e.create.styles().map(e=>Op(e,i)).filter(e=>!n.has(e.attributes?.[`w:styleId`])))}},carry:(e,t)=>{let n=u.get(e);return n===void 0?(d++,l.set(d,t),u.set(e,d),d):n}}},Mp=({footnotes:e={},endnotes:t={}},n,r)=>{let i={footnotes:jp(Ep,e,n,r),endnotes:jp(Dp,t,n,r)};return{carry:(e,t,n)=>i[e].carry(t,n),renumber:e=>Object.values(i).reduce((e,t)=>t.renumber(e),e),write:()=>{for(let e of Object.values(i))e.write()}}},Np=new kf,Pp=`word/document.xml`,Fp=`word/numbering.xml`,Ip=`application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml`,Lp=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering`,Rp=`default-bullet-numbering`,zp=`1`,Bp=(e,t)=>qf((0,$.default)(Np.format(e,t))).elements[0],Vp=e=>e.reduce((e,t)=>Math.max(e,t),0),Hp=(e,t,{createContext:n,addContentTypeOverride:r})=>{let i=new Map,a,o=()=>Xf(t.get(hp(Pp))??{},`Relationships`).find(e=>e.attributes?.Type===Lp),s=(e=o())=>e?vp(Pp,String(e.attributes.Target)):Fp,c=(e,n)=>Xf(t.get(s())??{},`w:numbering`).filter(t=>t.name===e).map(e=>Number(e.attributes[n])),l=t=>{if(t===zp)return e.ConcreteNumbering.find(({reference:e})=>e===Rp);if(!t.startsWith(`{`))return;let n=e.ConcreteNumbering.find(({reference:e,instance:n})=>t===`{${e}-${n}}`);if(!n){let e=t.slice(1,-1).replace(/-\d+$/,``);throw Error(`A paragraph in a patch uses the numbering "${e}", which isn't in the numbering option of patchDocument. Add it there with its levels, as in a Document`)}return n},u=e=>{let t=i.get(e.numId);return t===void 0?(a=(a??Vp(c(`w:num`,`w:numId`)))+1,i.set(e.numId,a),a):t},d=e=>{let t=e.name===`w:numId`?l(String(e.attributes[`w:val`])):void 0;return t===void 0?e.elements===void 0?e:A(A({},e),{},{elements:e.elements.map(d)}):A(A({},e),{},{attributes:A(A({},e.attributes),{},{"w:val":String(u(t))})})},f=e=>{let i=o(),a=s(i);return t.has(a)||(t.set(a,{declaration:{attributes:{version:`1.0`,encoding:`UTF-8`,standalone:`yes`}},elements:[A(A({},e),{},{elements:[]})]}),r(Ip,`/${a}`)),i||n(Pp).viewWrapper.Relationships.addRelationship(Jr(),Lp,yp(Pp,a)),a};return{renumber:e=>e.map(d),write:()=>{if(i.size===0)return;let r=Bp(e,n(s())),a=e=>Number(e.elements.find(e=>e.name===`w:abstractNumId`).attributes[`w:val`]),o=r.elements.filter(e=>e.name===`w:num`&&i.has(Number(e.attributes[`w:numId`]))),l=Vp(c(`w:abstractNum`,`w:abstractNumId`)),u=new Map([...new Set(o.map(a))].map((e,t)=>[e,l+t+1])),d=r.elements.flatMap(e=>{let t=e.name===`w:abstractNum`?u.get(Number(e.attributes[`w:abstractNumId`])):void 0;return t===void 0?[]:[A(A({},e),{},{attributes:A(A({},e.attributes),{},{"w:abstractNumId":String(t)})})]}),p=f(r),m=t.get(p).elements.find(e=>e.name===`w:numbering`);m.attributes=A(A(A({},Object.fromEntries(Object.entries(r.attributes).filter(([e])=>e.startsWith(`xmlns:`)))),m.attributes),{},{"mc:Ignorable":[...new Set([...String(m.attributes?.[`mc:Ignorable`]??``).split(` `),...String(r.attributes[`mc:Ignorable`]).split(` `)])].filter(e=>e!==``).join(` `)});let h=Xf(t.get(p),`w:numbering`),g=e=>{let t=h.findIndex(t=>e.includes(t.name));return t===-1?h.length:t};h.splice(g([`w:num`,`w:numIdMacAtCleanup`]),0,...d),h.splice(g([`w:numIdMacAtCleanup`]),0,...o.map(e=>A(A({},e),{},{attributes:A(A({},e.attributes),{},{"w:numId":String(i.get(Number(e.attributes[`w:numId`])))}),elements:e.elements.map(t=>t.name===`w:abstractNumId`?A(A({},t),{},{attributes:{"w:val":String(u.get(a(e)))}}):t)})))}}},Up={nameOf:e=>e.type===`element`?e.name:void 0,contentOf:e=>e.elements,attributeOf:(e,t)=>e.attributes?.[t],textOf:e=>(e.elements??[]).filter(({type:e})=>e===`text`).map(({text:e})=>String(e)).join(``),textElement:e=>({type:`element`,name:`w:t`,attributes:{"xml:space":`preserve`},elements:[{type:`text`,text:e}]}),writeClean:(e,t)=>{/^\s*(PAGEREF|TOC)\b/i.test(t)&&e.attributes?.[`w:dirty`]!==void 0&&(e.attributes=Object.fromEntries(Object.entries(e.attributes).filter(([e])=>e!==`w:dirty`)))},setSimpleFieldResult:(e,t)=>{e.elements=[{type:`element`,name:`w:r`,elements:[Up.textElement(t)]}]}},Wp=`word/document.xml`,Gp=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk`,Kp=[80,75,3,4],qp=function(){var e=zf(function*(e){if(Kp.every((t,n)=>e[n]===t))try{let t=yield wf.default.loadAsync(e),n=new Map,r=new Map;for(let[e,i]of Object.entries(t.files))i.dir||(/\.(xml|rels)$/.test(e)?n.set(e,qf(yield i.async(`text`))):r.set(e,yield i.async(`uint8array`)));let i=yield Jp(n,r);return A({parts:n,binaryParts:r},i.size>0?{importedDocuments:i}:{})}catch{return}});return function(t){return e.apply(this,arguments)}}(),Jp=function(){var e=zf(function*(e,t){let n=new Map;for(let[r,i]of e)if(r.endsWith(`.rels`))for(let{attributes:e={}}of Yp(i)?.elements??[]){let i=vp(gp(r),String(e.Target)),a=t.get(i),o=e.Type===Gp&&e.TargetMode!==`External`&&a?yield qp(a):void 0;o&&n.set(i,o)}return n});return function(t,n){return e.apply(this,arguments)}}(),Yp=e=>{var t;return e==null||(t=e.elements)==null?void 0:t.find(({type:e})=>e===`element`)},Xp=function(){var e=zf(function*(e,t,n=new Map){let r=Yp(e.get(Wp));if(!r)return;let i=yield Jp(e,n),a=t(A({parts:e,binaryParts:n},i.size>0?{importedDocuments:i}:{})),o=no(Up,r,a,{blank:!0}),s=Yp(e.get(hp(Wp)))?.elements??[];for(let{attributes:t={}}of s){let n=/\/(header|footer)$/.test(String(t.Type))?Yp(e.get(vp(Wp,String(t.Target)))):void 0;n&&ro(Up,n,a,{blank:!0,sectionPageCount:o.get(String(t.Id))})}});return function(t,n){return e.apply(this,arguments)}}(),Zp=class extends Error{constructor(e){super(`Token ${e} not found`),this.name=`TokenNotFoundError`}},Qp=(e,t)=>{for(let n=0;n<(e.elements??[]).length;n++){let r=e.elements[n];if(r.type===`element`&&r.name===`w:r`){let e=(r.elements??[]).filter(e=>e.type===`element`&&e.name===`w:t`);for(let r of e)if(r.elements?.[0]&&r.elements[0].text?.includes(t))return n}}throw new Zp(t)},$p=(e,t)=>{let n=-1,r=e.elements?.map((e,r)=>{if(n!==-1)return e;if(e.type===`element`&&e.name===`w:t`){var i;let a=(((i=e.elements)==null||(i=i[0])==null?void 0:i.text)??``).split(t),o=a.map(t=>A(A(A({},e),Yf(e)),{},{elements:Jf(t)}));return a.length>1&&(n=r),o}return e}).flat()??[];return{left:A(A({},JSON.parse(JSON.stringify(e))),{},{elements:r.slice(0,n+1)}),right:A(A({},JSON.parse(JSON.stringify(e))),{},{elements:r.slice(n+1)})}},em={START:0,MIDDLE:1,END:2},tm=({paragraphElement:e,renderedParagraph:t,originalText:n,replacementText:r,fromIndex:i=0})=>{let a=t.text.indexOf(n,i),o=a+n.length-1,s=em.START;for(let n of t.runs)for(let{text:t,index:i,start:c,end:l}of n.parts)switch(s){case em.START:if(a>=c&&a<=l){let u=a-c,d=Math.min(o,l)-c;if(t.substring(u,d+1)===``)continue;let f=t.substring(0,u)+r+t.substring(d+1);nm(e.elements[n.index].elements[i],f),s=em.MIDDLE;continue}break;case em.MIDDLE:if(o<=l){let r=t.substring(o-c+1);nm(e.elements[n.index].elements[i],r);let a=e.elements[n.index].elements[i];e.elements[n.index].elements[i]=Yf(a),s=em.END}else nm(e.elements[n.index].elements[i],``)}return e},nm=(e,t)=>(e.elements=Jf(t),e),rm=e=>{if(e.element.name!==`w:p`)throw Error(`Invalid node type: ${e.element.name}`);if(!e.element.elements)return{text:``,runs:[],index:-1,pathToParagraph:[]};let t=0,n=e.element.elements.map((e,t)=>({element:e,i:t})).filter(({element:e})=>e.name===`w:r`).map(({element:e,i:n})=>{let r=im(e,n,t);return t+=r.text.length,r}).filter(e=>!!e);return{text:n.reduce((e,t)=>e+t.text,``),runs:n,index:e.index,pathToParagraph:am(e)}},im=(e,t,n)=>{if(!e.elements)return{text:``,parts:[],index:-1,start:n,end:n};let r=n,i=e.elements.map((e,t)=>{if(e.name!==`w:t`||!e.elements||e.elements.length===0)return;let n=e.elements[0].text?.toString()??``,i=r;return r+=n.length,{text:n,index:t,start:i,end:i+n.length-1}}).filter(e=>!!e).map(e=>e);return{text:i.reduce((e,t)=>e+t.text,``),parts:i,index:t,start:n,end:i.length>0?i[i.length-1].end:n}},am=e=>e.parent?[...am(e.parent),e.index]:[e.index],om=e=>e.element.elements?.map((t,n)=>({element:t,index:n,parent:e}))??[],sm=e=>{let t=[],n=[...om({element:e,index:0,parent:void 0})],r;for(;n.length>0;)r=n.shift(),r.element.name===`w:p`&&(t=[...t,rm(r)]),n.push(...om(r));return t},cm=(e,t)=>sm(e).filter(e=>e.text.includes(t)),lm=`￿`,um=({json:e,patch:t,patchText:n,context:r,keepOriginalStyles:i=!0,recursive:a=!0,renumberIds:o=e=>e})=>{let s=cm(e,n);if(s.length===0)return{element:e,didFindOccurrence:!1};let c=[...s].reverse(),l=t.type===sp.DOCUMENT?ym(c):c;for(let s of l)switch(t.type){case sp.DOCUMENT:{let n=xm(e,s.pathToParagraph),i=Sm(s.pathToParagraph),a=dm(t,r,o),c=n.name===`w:tc`&&i===n.elements.length-1&&a[a.length-1]?.name!==`w:p`?[{type:`element`,name:`w:p`}]:[];n.elements.splice(i,1,...a,...c);break}case sp.PARAGRAPH:default:{let c=bm(e,s.pathToParagraph),l=s,u=0;do{let e=fm({paragraphElement:c,renderedParagraph:l,patchText:n,fromIndex:u,children:dm(t,r,o),keepOriginalStyles:i});l=rm({element:c,index:s.index,parent:void 0}),u=l.runs.filter(t=>t.index<e).reduce((e,t)=>e+t.text.length,0)}while(a&&l.text.includes(n,u));break}}return{element:e,didFindOccurrence:!0}},dm=(e,t,n)=>n(e.children.flatMap(e=>e.writtenAs??e).flatMap(e=>{let n=e.prepForXml(t);return n?[qf((0,$.default)(n)).elements[0]]:[]})),fm=({paragraphElement:e,renderedParagraph:t,patchText:n,fromIndex:r,children:i,keepOriginalStyles:a})=>{tm({paragraphElement:e,renderedParagraph:t,originalText:n,replacementText:lm,fromIndex:r});let o=Qp(e,lm),s=e.elements[o],{left:c,right:l}=$p(s,lm),u=s.elements.find(e=>e.type===`element`&&e.name===`w:rPr`),d=a&&u?i.map(e=>pm(e,u)):i,f=u?A(A({},l),{},{elements:[u,...l.elements]}):l;return e.elements.splice(o,1,c,...d,f),o+1+d.length},pm=(e,t)=>e.name===`w:r`?mm(e,t):e.elements?A(A({},e),{},{elements:e.elements.map(e=>pm(e,t))}):e,mm=(e,t)=>{let n=_m(e).find(e=>e.type===`element`&&e.name===`w:rPr`);if(!n)return A(A({},e),{},{elements:[t,..._m(e)]});let r=new Set(_m(n).map(e=>e.name)),i=[..._m(t).filter(e=>!r.has(e.name)),..._m(n)],a=A(A({},n),{},{elements:[...i].sort((e,t)=>gm(e)-gm(t))});return A(A({},e),{},{elements:_m(e).map(e=>e===n?a:e)})},hm=`w:rStyle.w:rFonts.w:b.w:bCs.w:i.w:iCs.w:caps.w:smallCaps.w:strike.w:dstrike.w:outline.w:shadow.w:emboss.w:imprint.w:noProof.w:snapToGrid.w:vanish.w:webHidden.w:color.w:spacing.w:w.w:kern.w:position.w:sz.w:szCs.w:highlight.w:u.w:effect.w:bdr.w:shd.w:fitText.w:vertAlign.w:rtl.w:cs.w:em.w:lang.w:eastAsianLayout.w:specVanish.w:oMath.w14:glow.w14:shadow.w14:reflection.w14:textOutline.w14:textFill.w14:scene3d.w14:props3d.w14:ligatures.w14:numForm.w14:numSpacing.w14:stylisticSets.w14:cntxtAlts`.split(`.`),gm=e=>{if(e.name===`w:rPrChange`)return hm.length+1;let t=hm.indexOf(e.name??``);return t===-1?hm.length:t},_m=e=>e.elements??[],vm=(e,t)=>e.length>t.length&&t.every((t,n)=>e[n]===t),ym=e=>e.filter(t=>!e.some(e=>vm(t.pathToParagraph,e.pathToParagraph))),bm=(e,t)=>{let n=e;for(let e=1;e<t.length;e++){let r=t[e];n=n.elements[r]}return n},xm=(e,t)=>bm(e,t.slice(0,t.length-1)),Sm=e=>e[e.length-1],Cm=new kf,wm=`word/styles.xml`,Tm=new Set([`w:pStyle`,`w:rStyle`,`w:tblStyle`,`w:basedOn`,`w:next`,`w:link`]),Em=e=>String(e.attributes?.[`w:styleId`]),Dm=e=>{var t;let n=(t=e.elements)==null||(t=t.find(e=>e.name===`w:name`))==null||(t=t.attributes)==null?void 0:t[`w:val`];return n===void 0?void 0:String(n).toLowerCase()},Om=e=>new Map(Object.values(nf()).map(t=>qf((0,$.default)(Cm.format(t,e))).elements[0]).filter(e=>e.name===`w:style`).map(e=>[Em(e),e])),km=(e,t)=>{let n=Xf(e.get(wm)??{},`w:styles`).filter(e=>e.name===`w:style`),r=new Set(n.map(Em)),i,a=e=>(i??=Om(t(wm)),i.get(e)),o=new Set,s=new Map,c=e=>{let t=r.has(e)?void 0:a(e);if(t===void 0)return e;let i=n.find(e=>e.attributes?.[`w:type`]===t.attributes?.[`w:type`]&&Dm(e)===Dm(t));return i===void 0?(o.add(e),e):Em(i)},l=e=>(s.has(e)||s.set(e,c(e)),s.get(e)),u=e=>Tm.has(e.name??``)?A(A({},e),{},{attributes:A(A({},e.attributes),{},{"w:val":l(String(e.attributes[`w:val`]))})}):e.elements===void 0?e:A(A({},e),{},{elements:e.elements.map(u)});return{use:e=>e.map(u),write:()=>{let t=e.get(wm);if(!t)return;let n=Xf(t,`w:styles`),r=new Set(n.map(Em));for(let e of o)r.has(e)||(r.add(e),n.push(u(a(e))))}}},Am={type:sp.PARAGRAPH,children:[]},jm=({json:e,key:t,patch:n,delimiters:{start:r,end:i},patchPlaceholder:a,renumberDrawings:o})=>{let s=`${r}${t}.`;for(let r of Mm(e,s)){let e=Im(r.elements,s,i),c=n.rows.flatMap((n,i)=>{let s={type:`element`,name:`w:tbl`,elements:[...i===0?r.elements.map(Lm):o(Bm(r.elements))]},c=new Map(Object.entries(n).flatMap(([e,t])=>t===void 0?[]:[[e,t]]));for(let[e,n]of c)a(s,`${t}.${e}`,n);for(let n of e.filter(e=>!c.has(e)))a(s,`${t}.${n}`,Am);return s.elements});r.parent.elements.splice(r.parent.elements.indexOf(r.elements[0]),r.elements.length,...c),r.table&&!Fm(r.table.element)&&r.table.parent.elements.splice(r.table.parent.elements.indexOf(r.table.element),1)}},Mm=(e,t)=>{let n=cm(e,t).flatMap(t=>{let n=Nm(e,t.pathToParagraph);return n?[n]:[]}),r=n.filter(e=>!n.some(t=>Pm(e.path,t.path))).filter((e,t,n)=>n.findIndex(t=>t.row===e.row)===t);return[...new Set(r.map(e=>e.parent))].flatMap(e=>{let t=e.elements.filter(e=>e.name===`w:tr`),n=r.filter(t=>t.parent===e).map(e=>t.indexOf(e.row)).sort((e,t)=>e-t),{table:i}=r.find(t=>t.parent===e);return n.reduce((e,t)=>{let n=e[e.length-1];return n?.[n.length-1]===t-1?[...e.slice(0,-1),[...n,t]]:[...e,[t]]},[]).map(n=>{let r=e.elements.indexOf(t[n[0]]),a=e.elements.indexOf(t[n[n.length-1]]);return{parent:e,table:i,elements:e.elements.slice(r,a+1)}})})},Nm=(e,t)=>{let n=e,r,i;for(let e=1;e<t.length;e++){let a=n.elements[t[e]];a.name===`w:tbl`&&(i={element:a,parent:n}),a.name===`w:tr`&&(r={parent:n,table:i,row:a,path:t.slice(0,e+1)}),n=a}return r},Pm=(e,t)=>e.length>t.length&&t.every((t,n)=>e[n]===t),Fm=e=>(e.elements??[]).some(e=>e.name===`w:tr`||e.name!==`w:tblPr`&&e.name!==`w:tblGrid`&&Fm(e)),Im=(e,t,n)=>{let r=cm({elements:[...e]},t).flatMap(({text:e})=>e.split(t).slice(1).flatMap(e=>{let t=e.indexOf(n);return t>0?[e.slice(0,t)]:[]}));return[...new Set(r)]},Lm=e=>JSON.parse(JSON.stringify(e)),Rm=[`w14:paraId`,`w14:textId`],zm=[`w:bookmarkStart`,`w:bookmarkEnd`],Bm=(e,t)=>e.filter(e=>!zm.includes(e.name??``)&&(t?.name!==`w:sdtPr`||e.name!==`w:id`)).map(e=>A(A(A({},e),e.attributes===void 0?{}:{attributes:Object.fromEntries(Object.entries(e.attributes).filter(([e])=>!Rm.includes(e)))}),e.elements===void 0?{}:{elements:[...Bm(e.elements,e)]})),Vm=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme`,Hm=new Map([[`dk1`,`dark1`],[`lt1`,`light1`],[`dk2`,`dark2`],[`lt2`,`light2`],[`accent1`,`accent1`],[`accent2`,`accent2`],[`accent3`,`accent3`],[`accent4`,`accent4`],[`accent5`,`accent5`],[`accent6`,`accent6`],[`hlink`,`hyperlink`],[`folHlink`,`followedHyperlink`]]),Um=e=>e.name?.slice(e.name.indexOf(`:`)+1),Wm=(e,t)=>{var n;return e==null||(n=e.elements)==null?void 0:n.find(e=>Um(e)===t)},Gm=e=>{let t=e.elements?.map(e=>Um(e)===`srgbClr`?e.attributes?.val:Um(e)===`sysClr`?e.attributes?.lastClr:void 0).find(e=>e!==void 0);return typeof t==`string`&&/^[0-9A-Fa-f]{6}$/.test(t)?t.toUpperCase():void 0},Km=e=>e[0]===255&&e[1]===254||e[0]===254&&e[1]===255,qm=function(){var e=zf(function*(e,t){let n=e.file(t);if(n!==null)return Km(yield n.async(`uint8array`))?void 0:qf(yield n.async(`text`))});return function(t,n){return e.apply(this,arguments)}}(),Jm=function(){var e=zf(function*(e){var t,n;let r=(t=Wm(yield qm(e,`word/_rels/document.xml.rels`),`Relationships`))==null||(t=t.elements)==null?void 0:t.find(e=>e.attributes?.Type===Vm),i=r==null||(n=r.attributes)==null?void 0:n.Target;return typeof i==`string`?qm(e,vp(`word/document.xml`,i)):void 0});return function(t){return e.apply(this,arguments)}}(),Ym=function(){var e=zf(function*(e){let t=yield Jm(e);if(t===void 0)return;let n=(Wm(Wm(Wm(t,`theme`),`themeElements`),`clrScheme`)?.elements??[]).flatMap(e=>{let t=Hm.get(Um(e)??``),n=Gm(e);return t&&n?[[t,n]]:[]});return _n(Object.fromEntries(n))});return function(t){return e.apply(this,arguments)}}(),Xm=(e,t,{inTableRow:n})=>{if(t?.type===sp.TABLE_ROWS&&Array.isArray(t.rows))for(let n of t.rows){if(typeof n!=`object`||!n)throw Error(`Invalid patch "${e}". Expected each of its rows to be an object of patches, by the name of their field`);for(let[t,r]of Object.entries(n))r!==void 0&&Xm(`${e}.${t}`,r,{inTableRow:!0})}else if(!(t?.type===sp.DRAWING?!n&&typeof t.patch==`function`:t?.type!==sp.TABLE_ROWS&&Array.isArray(t?.children)))throw Error(`Invalid patch "${e}". Expected { type: PatchType.PARAGRAPH or PatchType.DOCUMENT, children: [...] }, ${n?`or { type: PatchType.TABLE_ROWS, rows: [...] }`:`{ type: PatchType.TABLE_ROWS, rows: [...] }, or a drawing patch such as ChartDataPatch from docx/charts`}`)},Zm=new Af,Qm=new Uint8Array([255,254]),$m=new Uint8Array([254,255]),eh=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0};(function(){var e=zf(function*({outputType:e,data:t,patches:n,keepOriginalStyles:r,placeholderDelimiters:i={start:`{{`,end:`}}`},recursive:a=!0,footnotes:o,endnotes:s,numbering:c={config:[]},pageNumbers:l}){let u=t instanceof wf.default?t:yield wf.default.loadAsync(t),d=new Map,f=yield Ym(u),p=[],m={Media:new Ju,Numbering:new hd(c),Theme:f&&{Colors:f},FootNotes:{View:{idOf:(e,t,n)=>M(`footnotes`,e,t,n)}},Endnotes:{View:{idOf:(e,t,n)=>M(`endnotes`,e,t,n)}},PackageParts:new gd({addOverride:(e,t)=>p.push({contentType:e,partName:t})},new Set(Object.keys(u.files).filter(e=>e.startsWith(`word/`)).map(e=>e.slice(5))))},h=new Map,g=[],_=[],v=!1,y=new Map;if(!i?.start.trim()||!i?.end.trim())throw Error(`Both start and end delimiters must be non-empty strings.`);let{start:b,end:x}=i;for(let[e,t]of Object.entries(n))Xm(e,t,{inTableRow:!1});for(let[e,t]of Object.entries(u.files)){let n=yield t.async(`uint8array`),r=n.slice(0,2);if(eh(r,Qm)||eh(r,$m)||!e.endsWith(`.xml`)&&!e.endsWith(`.rels`)){y.set(e,n);continue}let i=qf(yield t.async(`text`));if(e===`word/document.xml`){let e=i.elements?.find(e=>e.name===`w:document`);if(e&&e.attributes){for(let t of[`mc`,`wp`,`r`,`w15`,`m`])e.attributes[`xmlns:${t}`]=lu[t];e.attributes[`mc:Ignorable`]=`${e.attributes[`mc:Ignorable`]||``} w15`.trim()}}h.set(e,i)}let S=Gf([...h.values()].flatMap(Wf)),C=op([...h.values()].flatMap(ip)),w=new Map,T=e=>{let t=w.get(e);if(t)return t;let n={Relationships:{addRelationship:(t,n,r,i)=>{_.push({key:e,id:t,type:n,target:r,targetMode:i})}}};return w.set(e,n),n},E=e=>({file:m,viewWrapper:T(e),stack:[]}),D=(e,t)=>{p.push({contentType:e,partName:t})},O=km(h,E),k=Hp(m.Numbering,h,{createContext:E,addContentTypeOverride:D}),j=Mp({footnotes:o,endnotes:s},h,{createContext:E,addContentTypeOverride:D,renumberBookmarks:S,renumberDrawings:C,renumberLists:k.renumber,useStyles:O.use}),M=(e,t,n,r)=>r.viewWrapper===T(`word/document.xml`)?j.carry(e,t,n):void 0;Cp({parts:h,binaryParts:y,file:m,patches:Object.entries(n).flatMap(([e,t])=>t.type===sp.DRAWING?[[e,t]]:[]),delimiters:{start:b,end:x}},E);let N=Object.entries(n).flatMap(([e,t])=>t.type===sp.DRAWING?[]:[[e,t]]),P=[...N.filter(([,e])=>e.type===sp.TABLE_ROWS),...N.filter(([,e])=>e.type!==sp.TABLE_ROWS)];for(let[e,t]of[...h]){if(!e.startsWith(`word/`)||e.endsWith(`.xml.rels`))continue;let n=E(e);d.set(e,n);let i=(t,o,s)=>{if(s.type===sp.TABLE_ROWS){jm({json:t,key:o,patch:s,delimiters:{start:b,end:x},patchPlaceholder:i,renumberDrawings:C});return}let c=[],{didFindOccurrence:l}=um({json:t,patch:A(A({},s),{},{children:s.children.flatMap(e=>e instanceof Ms?e.writtenAs:[e]).map(t=>{if(t instanceof ks){let{target:n,anchor:r}=zs(t.options.link),i=new Ds(t.options.children,Jr(),r,t.options.link);return c.push({key:e,id:i.linkId,type:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink`,target:n,targetMode:fa.EXTERNAL}),i}return t})}),patchText:`${b}${o}${x}`,context:n,keepOriginalStyles:r,recursive:a,renumberIds:e=>O.use(k.renumber(j.renumber(S(C(e)))))});l&&_.push(...c)};for(let[e,n]of P)i(t,e,n)}j.write(),k.write(),O.write();for(let[e,t]of h){if(!e.startsWith(`word/`)||e.endsWith(`.xml.rels`))continue;let n=Zm.getMediaData(JSON.stringify(t),m.Media);n.length>0&&(v=!0,g.push({key:e,mediaDatas:n}))}for(let{key:e,mediaDatas:t}of g){let n=hp(e),r=h.get(n)??dp();h.set(n,r);let i=lp(r),a=Zm.replace(JSON.stringify(h.get(e)),t,i);h.set(e,JSON.parse(a));for(let e=0;e<t.length;e++){let{fileName:n}=t[e];up(r,i+e,`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,`media/${n}`)}}for(let{key:e,id:t,type:n,target:r,targetMode:i}of _){let a=hp(e),o=h.get(a)??dp();h.set(a,o),up(o,t,n,r,i)}l&&(yield Xp(h,l,y));let F=Ff(m,void 0);if(v||p.length>0){let e=h.get(`[Content_Types].xml`);if(!e)throw Error(`Could not find content types file`);v&&(Zf(e,`image/png`,`png`),Zf(e,`image/jpeg`,`jpeg`),Zf(e,`image/jpeg`,`jpg`),Zf(e,`image/bmp`,`bmp`),Zf(e,`image/gif`,`gif`),Zf(e,`image/svg+xml`,`svg`));for(let{contentType:t,partName:n}of p)Qf(e,t,n)}let I=new wf.default;for(let[e,t]of h){let n=nh(t);I.file(e,Qr(n))}for(let[e,t]of y)I.file(e,t);for(let{data:e,fileName:t}of m.Media.Array)I.file(`word/media/${t}`,e);for(let{path:e,data:t}of F)I.file(e,typeof t==`string`?Qr(t):t);return I.generateAsync({type:e,mimeType:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,compression:`DEFLATE`})});return function(t){return e.apply(this,arguments)}})();var th=e=>A(A(A({},e),e.attributes===void 0?{}:{attributes:Object.fromEntries(Object.entries(e.attributes).map(([e,t])=>[e,t===void 0?t:String(t).replace(/&/g,`&amp;`)]))}),e.elements===void 0?{}:{elements:e.elements.map(e=>e.type===`text`?A(A({},e),{},{text:String(e.text).replace(/&/g,`&amp;`)}):th(e))}),nh=e=>(0,It.js2xml)(th(e),{attributeValueFn:e=>String(e).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/'/g,`&apos;`)});(function(){var e=zf(function*({data:e}){let t=e instanceof wf.default?e:yield wf.default.loadAsync(e),n=new Set;for(let[e,r]of Object.entries(t.files))if((e.endsWith(`.xml`)||e.endsWith(`.rels`))&&e.startsWith(`word/`)&&!e.endsWith(`.xml.rels`)){let e=qf(yield r.async(`text`));[...sm(e).map(e=>e.text),...pp(e).flatMap(({properties:e})=>mp(e))].forEach(e=>rh(e).forEach(e=>n.add(e)))}return Array.from(n)});return function(t){return e.apply(this,arguments)}})();var rh=e=>{let t=RegExp(`(?<=\\{\\{).+?(?=\\}\\})`,`gs`);return e.match(t)??[]},ih=class extends Error{constructor(e){super(e),this.name=`MathMarkupError`}},ah={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`};function oh(e){return e.replace(/&(#x[0-9a-fA-F]+|#[0-9]+|[a-zA-Z]+);/g,(e,t)=>t.startsWith(`#x`)?String.fromCodePoint(Number.parseInt(t.slice(2),16)):t.startsWith(`#`)?String.fromCodePoint(Number.parseInt(t.slice(1),10)):ah[t]??e)}function sh(e){let t=e.children.map(sh);return{tagName:e.tagName,attributes:e.attributes,children:t,get textContent(){return e.text.join(``)}}}var ch=/<(\/?)([A-Za-z][\w:.-]*)((?:\s+[\w:.-]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>/y,lh=/([\w:.-]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;function uh(e){let t={tagName:`#root`,attributes:new Map,children:[],text:[]},n=[t],r=0;for(;r<e.length;){let i=e.indexOf(`<`,r),a=i===-1?e.length:i;if(a>r){let t=oh(e.slice(r,a));for(let e of n)e.text.push(t)}if(i===-1)break;ch.lastIndex=i;let o=ch.exec(e);if(o===null)throw new ih(`unreadable markup at ${i}`);let[,s,c,l,u]=o;if(r=ch.lastIndex,s===`/`){let e=n.pop();if(e===void 0||e===t||e.tagName!==c)throw new ih(`unexpected </${c}>`);continue}let d=new Map;for(let e of l.matchAll(lh))d.set(e[1],oh(e[2]??e[3]??``));let f={tagName:c,attributes:d,children:[],text:[]};n[n.length-1].children.push(f),u!==`/`&&n.push(f)}if(n.length!==1)throw new ih(`unclosed <${n[n.length-1].tagName}>`);return t.children.map(sh)}function dh(e,t){for(let n of e){if(t(n))return n;let e=dh(n.children,t);if(e!==void 0)return e}}function fh(e,t){return(e.attributes.get(`class`)??``).split(/\s+/).includes(t)}var ph=class extends Error{element;constructor(e){super(`no OMML mapping for MathML element <${e}>`),this.name=`UnsupportedMathError`,this.element=e}},mh=new Set([`∑`]),hh=new Set([`∫`,`∬`,`∭`,`∮`]),gh=new Set([`(`,`(`]),_h=new Set([`)`,`)`]);function vh(e,t){let n=dh(uh(l.renderToString(e,{output:`mathml`,displayMode:t,throwOnError:!1})),e=>e.tagName.toLowerCase()===`math`);if(n===void 0)throw new ph(`math`);return n}function yh(e){return[...e.children]}function bh(e){return(e.textContent??``).replace(/[\u2061-\u2064]/g,``).trim()}function xh(e){return e.flatMap(Sh)}function Sh(e){let t=e.tagName.toLowerCase().replace(/^m:/,``);switch(t){case`math`:case`semantics`:case`mrow`:case`mstyle`:case`mpadded`:return Eh(yh(e));case`annotation`:case`annotation-xml`:case`mphantom`:return[];case`mspace`:return[new ac(` `)];case`mi`:case`mn`:case`mo`:case`mtext`:{let t=bh(e);return t===``?[]:[new ac(t)]}case`mfrac`:{let[t,n]=yh(e);if(t===void 0||n===void 0)throw new ph(`mfrac`);return[new lc({numerator:Sh(t),denominator:Sh(n)})]}case`msqrt`:return[new Mc({children:xh(yh(e))})];case`mroot`:{let[t,n]=yh(e);if(t===void 0||n===void 0)throw new ph(`mroot`);return[new Mc({children:Sh(t),degree:Sh(n)})]}case`msub`:case`munder`:{let[n,r]=yh(e);if(n===void 0||r===void 0)throw new ph(t);return[new Tc({children:Sh(n),subScript:Sh(r)})]}case`msup`:case`mover`:{let[n,r]=yh(e);if(n===void 0||r===void 0)throw new ph(t);return[new Cc({children:Sh(n),superScript:Sh(r)})]}case`msubsup`:case`munderover`:{let[n,r,i]=yh(e);if(n===void 0||r===void 0||i===void 0)throw new ph(t);return[new Dc({children:Sh(n),subScript:Sh(r),superScript:Sh(i)})]}default:throw new ph(t)}}var Ch=new Set([`msub`,`msup`,`msubsup`,`munder`,`mover`,`munderover`]);function wh(e,t){if(!Ch.has(e.tagName.toLowerCase()))return;let[n,r,i]=yh(e);if(n===void 0)return;let a=bh(n),o=mh.has(a),s=hh.has(a);if(!o&&!s)return;let c=e.tagName.toLowerCase(),l=c===`msub`||c===`munder`||c===`msubsup`||c===`munderover`?r:void 0,u=c===`msup`||c===`mover`?r:c===`msubsup`||c===`munderover`?i:void 0,d={children:xh(t),...l===void 0?{}:{subScript:Sh(l)},...u===void 0?{}:{superScript:Sh(u)}};return[o?new bc(d):new xc(d)]}function Th(e){let t=e[0],n=e[e.length-1];return e.length>=2&&t!==void 0&&n!==void 0&&t.tagName.toLowerCase()===`mo`&&n.tagName.toLowerCase()===`mo`&&gh.has(bh(t))&&_h.has(bh(n))?[new Ic({children:Eh(e.slice(1,-1))})]:Eh(e)}function Eh(e){let t=[];for(let n=0;n<e.length;n++){let r=wh(e[n],e.slice(n+1));if(r!==void 0)return t.push(...r),t;t.push(...Sh(e[n]))}return t}function Dh(e,t){let n=vh(e,t);if(dh([n],e=>fh(e,`katex-error`))!==void 0)throw new ph(`katex-error`);let r=dh(n.children,e=>e.tagName.toLowerCase()===`semantics`),i=yh(r===void 0?n:r),a=Th((i.length===1&&i[0].tagName.toLowerCase()===`mrow`?yh(i[0]):i).filter(e=>e.tagName.toLowerCase()!==`annotation`));if(a.length===0)throw new ph(`empty`);return a}var Oh=`�`,kh=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\uFFFE\uFFFF]/g,Ah=/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g;function jh(e){return e.replace(kh,Oh).replace(Ah,Oh)}var Mh=`Consolas, Courier New, monospace`,Nh=360,Ph=`md-ordered`;function Fh(e){return o().use(i).use(c).use(a).parse(s(e))}function Ih(e,t){return new Tr({text:jh(e),bold:t.bold,italics:t.italics,strike:t.strike,...t.code===!0?{font:Mh}:{}})}function Lh(e,t,n={}){let r=[];for(let i of e)switch(i.type){case`text`:r.push(Ih(i.value,n));break;case`strong`:r.push(...Lh(i.children,t,{...n,bold:!0}));break;case`emphasis`:r.push(...Lh(i.children,t,{...n,italics:!0}));break;case`delete`:r.push(...Lh(i.children,t,{...n,strike:!0}));break;case`inlineCode`:r.push(Ih(i.value,{...n,code:!0}));break;case`link`:r.push(new ks({children:Lh(i.children,t,n),link:i.url}));break;case`break`:r.push(new Tr({text:``,break:1}));break;case`image`:{if(qh(i.url)){r.push(new ks({children:[Ih(Jh(i.url,i.alt),n)],link:i.url}));break}let e=t.get(i);e===void 0?r.push(Ih(i.alt??i.url,n)):r.push(Qh(e,i.alt));break}case`inlineMath`:r.push(...Rh(i.value,!1,n));break;default:r.push(...Lh(zh(i),t,n))}return r}function Rh(e,t,n){try{return[new Zs({children:Dh(e,t)})]}catch{return[Ih(e,{...n,code:!0})]}}function zh(e){let t=e.children;return Array.isArray(t)?t:[]}var Bh=[_s.HEADING_1,_s.HEADING_2,_s.HEADING_3,_s.HEADING_4,_s.HEADING_5,_s.HEADING_6];function Vh(e,t){return new Q({heading:Bh[Math.min(e.depth,6)-1],children:Lh(e.children,t)})}function Hh(e){return e.value.split(`
29
+ `).map(e=>new Q({children:[new Tr({text:jh(e===``?` `:e),font:Mh})],spacing:{before:0,after:0}}))}var Uh=624;function Wh(e,t){return e<=Uh?{width:Math.round(e),height:Math.round(t)}:{width:Uh,height:Math.round(t*Uh/e)}}function Gh(e){return(e.lang??``).toLowerCase()===`mermaid`}async function Kh(e,t){let n=new Map;if(t===void 0)return n;let r=[],i=e=>{e.type===`code`&&Gh(e)&&r.push(e);for(let t of e.children??[])i(t)};i(e);for(let[e,i]of r.entries())try{n.set(i,await t(i.value,`docx-export-${e}`))}catch{}return n}function qh(e){return!/^[a-z][a-z0-9+.-]*:|^\/\//i.test(e)&&/\.(drawio|dio)$/i.test(e.split(/[?#]/)[0])}function Jh(e,t){let n=e.split(/[?#]/)[0].replace(/^\.\//,``);try{n=decodeURIComponent(n)}catch{}return t&&t.trim()!==``?`${t.trim()} (draw.io diagram: ${n})`:`draw.io diagram: ${n}`}async function Yh(e,t){let n=new Map,{imageKey:r,loadImage:i}=t;if(r===void 0||i===void 0)return n;let a=[],o=e=>{e.type===`image`&&!qh(e.url)&&a.push(e);for(let t of e.children??[])o(t)};o(e);let s=new Map;for(let e of a){let t=r(e.url);if(t===void 0)continue;s.has(t)||s.set(t,await i(e.url));let a=s.get(t);a!==void 0&&n.set(e,a)}return n}function Xh(e){return new Fa({type:`svg`,data:new TextEncoder().encode(e.svg),fallback:{type:`png`,data:e.png},transformation:Wh(e.width,e.height)})}function Zh(e){return new Q({alignment:dn.CENTER,children:[Xh(e)]})}function Qh(e,t){return e.kind===`vector`?Xh(e.image):new Fa({type:e.type,data:e.bytes,transformation:Wh(e.width,e.height),...$h(t)})}function $h(e){let t=e?.trim()??``;return t===``?{}:{altText:{name:`Picture`,description:t}}}function eg(e){return e===0?{}:{indent:{left:Nh*e},border:{left:{style:In.SINGLE,size:12,color:`CCCCCC`,space:12}}}}function tg(e,t,n=0){let r=e.ordered===!0,i=r?t.instance++:0,a=[];for(let o of e.children){let e=!0;for(let s of o.children)s.type===`list`?a.push(...tg(s,t,n+1)):s.type===`paragraph`?(a.push(new Q({children:Lh(s.children,t.images),...e?r?{numbering:{reference:Ph,level:n,instance:i}}:{bullet:{level:n}}:{indent:{left:Nh*(n+1)}}})),e=!1):a.push(...ig([s],t))}return a}function ng(e,t){return new nu({rows:e.children.map((e,n)=>new tu({tableHeader:n===0,children:e.children.map(e=>new zl({children:[new Q({children:Lh(e.children,t)})]}))})),width:{size:100,type:cl.PERCENTAGE}})}function rg(){return new Q({children:[],border:{bottom:{style:In.SINGLE,size:6,color:`999999`,space:1}}})}function ig(e,t){let n=[];for(let r of e)switch(r.type){case`heading`:n.push(Vh(r,t.images));break;case`paragraph`:n.push(new Q({children:Lh(r.children,t.images),...eg(t.quoteDepth)}));break;case`list`:n.push(...tg(r,t));break;case`table`:n.push(ng(r,t.images));break;case`code`:{let e=t.diagrams.get(r);e===void 0?n.push(...Hh(r)):n.push(Zh(e));break}case`blockquote`:n.push(...ig(r.children,{...t,quoteDepth:t.quoteDepth+1}));break;case`thematicBreak`:n.push(rg());break;case`math`:n.push(new Q({children:Rh(r.value,!0,{}),alignment:dn.CENTER}));break;default:{let e=Lh(zh(r),t.images);e.length>0&&n.push(new Q({children:e}));break}}return n}async function ag(e,t={}){let n=Fh(e),r=await Kh(n,t.renderDiagram),i=await Yh(n,t);return ig(n.children,{instance:0,quoteDepth:0,diagrams:r,images:i})}function og(e){return new yf({styles:{default:sg()},numbering:{config:[cg()]},sections:[{children:e}]})}function sg(){let e=e=>({paragraph:{outlineLevel:e}});return{heading1:e(0),heading2:e(1),heading3:e(2),heading4:e(3),heading5:e(4),heading6:e(5)}}function cg(){return{reference:Ph,levels:[Yu.DECIMAL,Yu.LOWER_LETTER,Yu.LOWER_ROMAN,Yu.DECIMAL,Yu.LOWER_LETTER].map((e,t)=>({level:t,format:e,text:`%${t+1}.`,alignment:dn.START,style:{paragraph:{indent:{left:720*(t+1),hanging:360}}}}))}}function lg(e){let t=/viewBox="\s*[\d.-]+[\s,]+[\d.-]+[\s,]+([\d.]+)[\s,]+([\d.]+)/.exec(e),n=t?Number(t[1]):NaN,r=t?Number(t[2]):NaN;return!Number.isFinite(n)||!Number.isFinite(r)||n<=0||r<=0?null:{width:n,height:r}}function ug(e,t,n){let r=/^[\s\S]*?<svg\b[^>]*>/.exec(e);return r===null?e:r[0].replace(/\swidth="[^"]*"/,``).replace(/\sheight="[^"]*"/,``).replace(/\sstyle="[^"]*"/,e=>{let t=e.replace(/max-width:[^;"]*;?/,``);return/style="\s*"/.test(t)?``:t}).replace(/>$/,` width="${t}" height="${n}">`)+e.slice(r[0].length)}var dg=e({DiagramError:()=>fg,inlineStyles:()=>hg,rasterise:()=>vg,renderDiagram:()=>gg,svgDimensions:()=>pg,withExplicitSize:()=>ug}),fg=class extends Error{constructor(e){super(e),this.name=`DiagramError`}};function pg(e){let t=lg(e);if(t===null)throw new fg(`diagram has no usable viewBox`);return t}var mg=[`fill`,`fill-opacity`,`stroke`,`stroke-width`,`stroke-opacity`,`stroke-dasharray`,`stroke-linecap`,`stroke-linejoin`,`opacity`,`font-family`,`font-size`,`font-weight`,`font-style`,`text-anchor`,`dominant-baseline`];function hg(e){let t=document.createElement(`div`);t.setAttribute(`style`,`position:absolute;left:-10000px;top:0;width:0;height:0;overflow:hidden`),t.innerHTML=e;let n=t.querySelector(`svg`);if(n===null)return e;document.body.append(t);try{let e=[n,...n.querySelectorAll(`*`)].filter(e=>e.tagName.toLowerCase()!==`style`).map(e=>{let t=window.getComputedStyle(e),n=[];for(let e of mg){let r=t.getPropertyValue(e);r!==``&&n.push([e,r])}return{element:e,painted:n}});for(let{element:t,painted:n}of e){for(let[e,r]of n)t.setAttribute(e,r);t.removeAttribute(`style`),t.removeAttribute(`class`)}for(let e of[...n.querySelectorAll(`style`)])e.remove();return n.outerHTML}finally{t.remove()}}async function gg(e,t){return r(async()=>{let r=(await n(async()=>{let{default:e}=await import(`./mermaid.core-CIbJ01zL.js`).then(e=>e.t);return{default:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))).default,i;try{r.initialize({startOnLoad:!1,theme:`default`,look:`classic`,securityLevel:`strict`,suppressErrorRendering:!0,flowchart:{htmlLabels:!1},htmlLabels:!1}),{svg:i}=await r.render(t,e)}catch(e){throw new fg(`mermaid could not render the diagram: ${String(e)}`)}finally{r.initialize({startOnLoad:!1,look:`classic`,securityLevel:`strict`,suppressErrorRendering:!0})}let{width:a,height:o}=pg(i),s=ug(i,a,o),c=await vg(s,a,o);return{svg:hg(s),png:c,width:a,height:o}})}var _g=2;async function vg(e,t,n){let r=document.createElement(`canvas`);r.width=Math.max(1,Math.round(t*_g)),r.height=Math.max(1,Math.round(n*_g));let i=r.getContext(`2d`);if(i===null)throw new fg(`no 2d canvas context for the fallback image`);let a=URL.createObjectURL(new Blob([e],{type:`image/svg+xml;charset=utf-8`}));try{let e=await yg(a);return i.fillStyle=`#ffffff`,i.fillRect(0,0,r.width,r.height),i.drawImage(e,0,0,r.width,r.height),await bg(r)}finally{URL.revokeObjectURL(a)}}function yg(e){return new Promise((t,n)=>{let r=new Image;r.onload=()=>t(r),r.onerror=()=>n(new fg(`the browser would not draw the diagram`)),r.src=e})}async function bg(e){let t=await new Promise(t=>e.toBlob(t,`image/png`));if(t===null)throw new fg(`the canvas produced no image`);return new Uint8Array(await t.arrayBuffer())}export{gg as a,og as c,ag as d,jh as f,Tr as h,vg as i,Jh as l,Q as m,hg as n,pg as o,Hf as p,dg as r,ug as s,fg as t,qh as u};