@rainmanhhh/pi-web 0.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +147 -0
- package/README.zh-CN.md +145 -0
- package/dist/server.mjs +403 -0
- package/dist/static/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/static/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/static/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/static/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/static/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/static/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/static/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/static/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/static/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/static/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/static/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/static/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/static/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/static/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/static/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/static/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/static/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/static/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/static/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/static/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/static/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/static/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/static/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/static/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/static/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/static/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/static/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/static/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/static/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/static/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/static/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/static/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/static/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/static/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/static/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/static/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/static/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/static/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/static/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/static/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/static/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/static/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/static/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/static/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/static/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/static/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/static/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/static/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/static/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/static/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/static/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/static/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/static/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/static/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/static/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/static/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/static/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/static/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/static/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/static/assets/_baseFor-D6HAxaEF.js +1 -0
- package/dist/static/assets/arc-Cev3HYkO.js +1 -0
- package/dist/static/assets/architecture-YZFGNWBL-DSVeA3Mc.js +1 -0
- package/dist/static/assets/architectureDiagram-Q4EWVU46-BUaFXLue.js +36 -0
- package/dist/static/assets/array-BifhSqXX.js +1 -0
- package/dist/static/assets/blockDiagram-DXYQGD6D-BD7crHZn.js +132 -0
- package/dist/static/assets/c4Diagram-AHTNJAMY-BTvR1Qix.js +10 -0
- package/dist/static/assets/channel-DSbgxqFl.js +1 -0
- package/dist/static/assets/chunk-4BX2VUAB-C9I87hfN.js +1 -0
- package/dist/static/assets/chunk-4TB4RGXK-CYXNKQNe.js +206 -0
- package/dist/static/assets/chunk-55IACEB6-DAYR8bYh.js +1 -0
- package/dist/static/assets/chunk-5FUZZQ4R-BghvyuR7.js +62 -0
- package/dist/static/assets/chunk-5PVQY5BW-CZT35iHI.js +2 -0
- package/dist/static/assets/chunk-BSJP7CBP-BclwT518.js +1 -0
- package/dist/static/assets/chunk-EDXVE4YY-C4TkNvln.js +1 -0
- package/dist/static/assets/chunk-ENJZ2VHE-BNRddB0h.js +10 -0
- package/dist/static/assets/chunk-FMBD7UC4-4iiTC4rp.js +15 -0
- package/dist/static/assets/chunk-ICPOFSXX-BIhiNjvk.js +122 -0
- package/dist/static/assets/chunk-K5T4RW27-FpH_VPgE.js +94 -0
- package/dist/static/assets/chunk-OYMX7WX6-Dg0dFe8H.js +231 -0
- package/dist/static/assets/chunk-QZHKN3VN-DnoLcr4T.js +1 -0
- package/dist/static/assets/chunk-U2HBQHQK-CJqSKuXA.js +70 -0
- package/dist/static/assets/chunk-X2U36JSP-DVXuKdYc.js +1 -0
- package/dist/static/assets/chunk-YZCP3GAM-D4t97aMk.js +1 -0
- package/dist/static/assets/chunk-ZZ45TVLE-D3ALxVxH.js +1 -0
- package/dist/static/assets/classDiagram-6PBFFD2Q-3fKgRhOi.js +1 -0
- package/dist/static/assets/classDiagram-v2-HSJHXN6E-3fKgRhOi.js +1 -0
- package/dist/static/assets/clone-Dgktwry5.js +1 -0
- package/dist/static/assets/cose-bilkent-S5V4N54A-CVHW-V1c.js +1 -0
- package/dist/static/assets/cytoscape.esm-KkXhEuBu.js +321 -0
- package/dist/static/assets/dagre-DANBRJgS.js +1 -0
- package/dist/static/assets/dagre-KV5264BT-RX495Ogs.js +4 -0
- package/dist/static/assets/defaultLocale-BFoDCU3G.js +1 -0
- package/dist/static/assets/diagram-5BDNPKRD-B3TQrwLp.js +10 -0
- package/dist/static/assets/diagram-G4DWMVQ6-DMTfV1fq.js +24 -0
- package/dist/static/assets/diagram-MMDJMWI5-BA8Bf6LU.js +43 -0
- package/dist/static/assets/diagram-TYMM5635-DZgWIMF2.js +24 -0
- package/dist/static/assets/dist-C_yfW-4f.js +1 -0
- package/dist/static/assets/erDiagram-SMLLAGMA-BPjiJgpM.js +85 -0
- package/dist/static/assets/flatten-DYA82rhy.js +1 -0
- package/dist/static/assets/flowDiagram-DWJPFMVM-C8itnDyk.js +162 -0
- package/dist/static/assets/ganttDiagram-T4ZO3ILL-QijQZ_7A.js +292 -0
- package/dist/static/assets/gitGraph-7Q5UKJZL-DUTBJasc.js +1 -0
- package/dist/static/assets/gitGraphDiagram-UUTBAWPF-B4SbXUo2.js +106 -0
- package/dist/static/assets/graphlib-CAZZWEle.js +1 -0
- package/dist/static/assets/highlighted-body-OFNGDK62-B6SZt-Xj.js +1 -0
- package/dist/static/assets/index-BSAN2ZmA.css +1 -0
- package/dist/static/assets/index-CtaBtFPm.js +492 -0
- package/dist/static/assets/info-OMHHGYJF-y8VVrvpT.js +1 -0
- package/dist/static/assets/infoDiagram-42DDH7IO-SEL8m7Hn.js +2 -0
- package/dist/static/assets/init-C-OQMol4.js +1 -0
- package/dist/static/assets/ishikawaDiagram-UXIWVN3A-BiGygTnl.js +70 -0
- package/dist/static/assets/journeyDiagram-VCZTEJTY-x16DmnC7.js +139 -0
- package/dist/static/assets/kanban-definition-6JOO6SKY-B_Vmy_se.js +89 -0
- package/dist/static/assets/katex-9tSoZCUs.js +257 -0
- package/dist/static/assets/line-BXZmYadU.js +1 -0
- package/dist/static/assets/linear-BDsPwGxk.js +1 -0
- package/dist/static/assets/mermaid-GHXKKRXX-CZfowopI.js +1 -0
- package/dist/static/assets/mermaid-parser.core-BdiNtuYK.js +4 -0
- package/dist/static/assets/mermaid.core-Cy3kC-2x.js +42 -0
- package/dist/static/assets/mindmap-definition-QFDTVHPH-DibAS34Z.js +96 -0
- package/dist/static/assets/ordinal-DtR4qwUh.js +1 -0
- package/dist/static/assets/packet-4T2RLAQJ-QWjI5ifX.js +1 -0
- package/dist/static/assets/path-fybaL0A-.js +1 -0
- package/dist/static/assets/pie-ZZUOXDRM-CCpZfmHW.js +1 -0
- package/dist/static/assets/pieDiagram-DEJITSTG-DE3IRdo2.js +30 -0
- package/dist/static/assets/quadrantDiagram-34T5L4WZ-BnFzq8uS.js +7 -0
- package/dist/static/assets/radar-PYXPWWZC-DJRfpCAG.js +1 -0
- package/dist/static/assets/reduce-D9Ymtwj-.js +1 -0
- package/dist/static/assets/requirementDiagram-MS252O5E-4JH5mfMt.js +84 -0
- package/dist/static/assets/rolldown-runtime-C_s2cVnS.js +1 -0
- package/dist/static/assets/rough.esm-Dy-Kn_BL.js +1 -0
- package/dist/static/assets/sankeyDiagram-XADWPNL6-BBM3bCVp.js +10 -0
- package/dist/static/assets/sequenceDiagram-FGHM5R23-Ngkhph4n.js +157 -0
- package/dist/static/assets/src-D3QavEJ4.js +1 -0
- package/dist/static/assets/stateDiagram-FHFEXIEX-B8QHUbFP.js +1 -0
- package/dist/static/assets/stateDiagram-v2-QKLJ7IA2-8s677m33.js +1 -0
- package/dist/static/assets/timeline-definition-GMOUNBTQ-Cj_jCa6v.js +120 -0
- package/dist/static/assets/treeView-SZITEDCU-BYIf12Kb.js +1 -0
- package/dist/static/assets/treemap-W4RFUUIX-ChTAE-ps.js +1 -0
- package/dist/static/assets/vennDiagram-DHZGUBPP-Nv73eNL-.js +34 -0
- package/dist/static/assets/wardley-RL74JXVD-D4JZq5aY.js +1 -0
- package/dist/static/assets/wardleyDiagram-NUSXRM2D-D4_-w6kd.js +20 -0
- package/dist/static/assets/xychartDiagram-5P7HB3ND-BWrW2XAn.js +7 -0
- package/dist/static/icons/apple-touch-icon.png +0 -0
- package/dist/static/icons/icon-192.png +0 -0
- package/dist/static/icons/icon-512.png +0 -0
- package/dist/static/index.html +46 -0
- package/dist/static/manifest.webmanifest +28 -0
- package/dist/static/offline.html +83 -0
- package/dist/static/sw.js +75 -0
- package/package.json +107 -0
- package/public/icons/apple-touch-icon.png +0 -0
- package/public/icons/icon-192.png +0 -0
- package/public/icons/icon-512.png +0 -0
- package/public/manifest.webmanifest +28 -0
- package/public/offline.html +83 -0
- package/public/sw.js +75 -0
package/dist/server.mjs
ADDED
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire as xz}from"node:module";var sb=Object.create;var{getPrototypeOf:nz,defineProperty:u3,getOwnPropertyNames:Uz}=Object;var Dz=Object.prototype.hasOwnProperty;function cz(n){return this[n]}var gz,fz,VW=(n,U,D)=>{var c=n!=null&&typeof n==="object";if(c){var g=U?gz??=new WeakMap:fz??=new WeakMap,f=g.get(n);if(f)return f}D=n!=null?sb(nz(n)):{};let h=U||!n||!n.__esModule?u3(D,"default",{value:n,enumerable:!0}):D;for(let W of Uz(n))if(!Dz.call(h,W))u3(h,W,{get:cz.bind(n,W),enumerable:!0});if(c)g.set(n,h);return h};var L=(n,U)=>()=>(U||n((U={exports:{}}).exports,U),U.exports);var hz=(n)=>n;function Wz(n,U){this[n]=hz.bind(null,U)}var U1=(n,U)=>{for(var D in U)u3(n,D,{get:U[D],enumerable:!0,configurable:!0,set:Wz.bind(U,D)})};var B1=xz(import.meta.url);var KT=L((JU1,GT)=>{var l2=B1("constants"),WM=process.cwd,c8=null,xM=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!c8)c8=WM.call(process);return c8};try{process.cwd()}catch(n){}if(typeof process.chdir==="function"){if(g8=process.chdir,process.chdir=function(n){c8=null,g8.call(process,n)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,g8)}var g8;GT.exports=TM;function TM(n){if(l2.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))U(n);if(!n.lutimes)D(n);if(n.chown=f(n.chown),n.fchown=f(n.fchown),n.lchown=f(n.lchown),n.chmod=c(n.chmod),n.fchmod=c(n.fchmod),n.lchmod=c(n.lchmod),n.chownSync=h(n.chownSync),n.fchownSync=h(n.fchownSync),n.lchownSync=h(n.lchownSync),n.chmodSync=g(n.chmodSync),n.fchmodSync=g(n.fchmodSync),n.lchmodSync=g(n.lchmodSync),n.stat=W(n.stat),n.fstat=W(n.fstat),n.lstat=W(n.lstat),n.statSync=T(n.statSync),n.fstatSync=T(n.fstatSync),n.lstatSync=T(n.lstatSync),n.chmod&&!n.lchmod)n.lchmod=function(y,F,i){if(i)process.nextTick(i)},n.lchmodSync=function(){};if(n.chown&&!n.lchown)n.lchown=function(y,F,i,X){if(X)process.nextTick(X)},n.lchownSync=function(){};if(xM==="win32")n.rename=typeof n.rename!=="function"?n.rename:function(y){function F(i,X,$){var Q=Date.now(),Y=0;y(i,X,function V(G){if(G&&(G.code==="EACCES"||G.code==="EPERM"||G.code==="EBUSY")&&Date.now()-Q<60000){if(setTimeout(function(){n.stat(X,function(J,B){if(J&&J.code==="ENOENT")y(i,X,V);else $(G)})},Y),Y<100)Y+=10;return}if($)$(G)})}if(Object.setPrototypeOf)Object.setPrototypeOf(F,y);return F}(n.rename);n.read=typeof n.read!=="function"?n.read:function(y){function F(i,X,$,Q,Y,V){var G;if(V&&typeof V==="function"){var J=0;G=function(B,z,q){if(B&&B.code==="EAGAIN"&&J<10)return J++,y.call(n,i,X,$,Q,Y,G);V.apply(this,arguments)}}return y.call(n,i,X,$,Q,Y,G)}if(Object.setPrototypeOf)Object.setPrototypeOf(F,y);return F}(n.read),n.readSync=typeof n.readSync!=="function"?n.readSync:function(y){return function(F,i,X,$,Q){var Y=0;while(!0)try{return y.call(n,F,i,X,$,Q)}catch(V){if(V.code==="EAGAIN"&&Y<10){Y++;continue}throw V}}}(n.readSync);function U(y){y.lchmod=function(F,i,X){y.open(F,l2.O_WRONLY|l2.O_SYMLINK,i,function($,Q){if($){if(X)X($);return}y.fchmod(Q,i,function(Y){y.close(Q,function(V){if(X)X(Y||V)})})})},y.lchmodSync=function(F,i){var X=y.openSync(F,l2.O_WRONLY|l2.O_SYMLINK,i),$=!0,Q;try{Q=y.fchmodSync(X,i),$=!1}finally{if($)try{y.closeSync(X)}catch(Y){}else y.closeSync(X)}return Q}}function D(y){if(l2.hasOwnProperty("O_SYMLINK")&&y.futimes)y.lutimes=function(F,i,X,$){y.open(F,l2.O_SYMLINK,function(Q,Y){if(Q){if($)$(Q);return}y.futimes(Y,i,X,function(V){y.close(Y,function(G){if($)$(V||G)})})})},y.lutimesSync=function(F,i,X){var $=y.openSync(F,l2.O_SYMLINK),Q,Y=!0;try{Q=y.futimesSync($,i,X),Y=!1}finally{if(Y)try{y.closeSync($)}catch(V){}else y.closeSync($)}return Q};else if(y.futimes)y.lutimes=function(F,i,X,$){if($)process.nextTick($)},y.lutimesSync=function(){}}function c(y){if(!y)return y;return function(F,i,X){return y.call(n,F,i,function($){if(x($))$=null;if(X)X.apply(this,arguments)})}}function g(y){if(!y)return y;return function(F,i){try{return y.call(n,F,i)}catch(X){if(!x(X))throw X}}}function f(y){if(!y)return y;return function(F,i,X,$){return y.call(n,F,i,X,function(Q){if(x(Q))Q=null;if($)$.apply(this,arguments)})}}function h(y){if(!y)return y;return function(F,i,X){try{return y.call(n,F,i,X)}catch($){if(!x($))throw $}}}function W(y){if(!y)return y;return function(F,i,X){if(typeof i==="function")X=i,i=null;function $(Q,Y){if(Y){if(Y.uid<0)Y.uid+=4294967296;if(Y.gid<0)Y.gid+=4294967296}if(X)X.apply(this,arguments)}return i?y.call(n,F,i,$):y.call(n,F,$)}}function T(y){if(!y)return y;return function(F,i){var X=i?y.call(n,F,i):y.call(n,F);if(X){if(X.uid<0)X.uid+=4294967296;if(X.gid<0)X.gid+=4294967296}return X}}function x(y){if(!y)return!0;if(y.code==="ENOSYS")return!0;var F=!process.getuid||process.getuid()!==0;if(F){if(y.code==="EINVAL"||y.code==="EPERM")return!0}return!1}}});var zT=L(($U1,bT)=>{var ZT=B1("stream").Stream;bT.exports=yM;function yM(n){return{ReadStream:U,WriteStream:D};function U(c,g){if(!(this instanceof U))return new U(c,g);ZT.call(this);var f=this;this.path=c,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,g=g||{};var h=Object.keys(g);for(var W=0,T=h.length;W<T;W++){var x=h[W];this[x]=g[x]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){f._read()});return}n.open(this.path,this.flags,this.mode,function(y,F){if(y){f.emit("error",y),f.readable=!1;return}f.fd=F,f.emit("open",F),f._read()})}function D(c,g){if(!(this instanceof D))return new D(c,g);ZT.call(this),this.path=c,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,g=g||{};var f=Object.keys(g);for(var h=0,W=f.length;h<W;h++){var T=f[h];this[T]=g[T]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=n.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var qT=L((VU1,OT)=>{OT.exports=iM;var FM=Object.getPrototypeOf||function(n){return n.__proto__};function iM(n){if(n===null||typeof n!=="object")return n;if(n instanceof Object)var U={__proto__:FM(n)};else var U=Object.create(null);return Object.getOwnPropertyNames(n).forEach(function(D){Object.defineProperty(U,D,Object.getOwnPropertyDescriptor(n,D))}),U}});var kf=L((QU1,df)=>{var H1=B1("fs"),XM=KT(),JM=zT(),$M=qT(),f8=B1("util"),r1,W8;if(typeof Symbol==="function"&&typeof Symbol.for==="function")r1=Symbol.for("graceful-fs.queue"),W8=Symbol.for("graceful-fs.previous");else r1="___graceful-fs.queue",W8="___graceful-fs.previous";function VM(){}function AT(n,U){Object.defineProperty(n,r1,{get:function(){return U}})}var AU=VM;if(f8.debuglog)AU=f8.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))AU=function(){var n=f8.format.apply(f8,arguments);n="GFS4: "+n.split(/\n/).join(`
|
|
3
|
+
GFS4: `),console.error(n)};if(!H1[r1]){if(Pf=global[r1]||[],AT(H1,Pf),H1.close=function(n){function U(D,c){return n.call(H1,D,function(g){if(!g)MT();if(typeof c==="function")c.apply(this,arguments)})}return Object.defineProperty(U,W8,{value:n}),U}(H1.close),H1.closeSync=function(n){function U(D){n.apply(H1,arguments),MT()}return Object.defineProperty(U,W8,{value:n}),U}(H1.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){AU(H1[r1]),B1("assert").equal(H1[r1].length,0)})}var Pf;if(!global[r1])AT(global,H1[r1]);df.exports=Rf($M(H1));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!H1.__patched)df.exports=Rf(H1),H1.__patched=!0;function Rf(n){XM(n),n.gracefulify=Rf,n.createReadStream=z,n.createWriteStream=q;var U=n.readFile;n.readFile=D;function D(O,_,w){if(typeof _==="function")w=_,_=null;return H(O,_,w);function H(v,P,p,b){return U(v,P,function(C){if(C&&(C.code==="EMFILE"||C.code==="ENFILE"))YD([H,[v,P,p],C,b||Date.now(),Date.now()]);else if(typeof p==="function")p.apply(this,arguments)})}}var c=n.writeFile;n.writeFile=g;function g(O,_,w,H){if(typeof w==="function")H=w,w=null;return v(O,_,w,H);function v(P,p,b,C,A){return c(P,p,b,function(E){if(E&&(E.code==="EMFILE"||E.code==="ENFILE"))YD([v,[P,p,b,C],E,A||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}var f=n.appendFile;if(f)n.appendFile=h;function h(O,_,w,H){if(typeof w==="function")H=w,w=null;return v(O,_,w,H);function v(P,p,b,C,A){return f(P,p,b,function(E){if(E&&(E.code==="EMFILE"||E.code==="ENFILE"))YD([v,[P,p,b,C],E,A||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}var W=n.copyFile;if(W)n.copyFile=T;function T(O,_,w,H){if(typeof w==="function")H=w,w=0;return v(O,_,w,H);function v(P,p,b,C,A){return W(P,p,b,function(E){if(E&&(E.code==="EMFILE"||E.code==="ENFILE"))YD([v,[P,p,b,C],E,A||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}var x=n.readdir;n.readdir=F;var y=/^v[0-5]\./;function F(O,_,w){if(typeof _==="function")w=_,_=null;var H=y.test(process.version)?function(p,b,C,A){return x(p,v(p,b,C,A))}:function(p,b,C,A){return x(p,b,v(p,b,C,A))};return H(O,_,w);function v(P,p,b,C){return function(A,E){if(A&&(A.code==="EMFILE"||A.code==="ENFILE"))YD([H,[P,p,b],A,C||Date.now(),Date.now()]);else{if(E&&E.sort)E.sort();if(typeof b==="function")b.call(this,A,E)}}}}if(process.version.substr(0,4)==="v0.8"){var i=JM(n);V=i.ReadStream,J=i.WriteStream}var X=n.ReadStream;if(X)V.prototype=Object.create(X.prototype),V.prototype.open=G;var $=n.WriteStream;if($)J.prototype=Object.create($.prototype),J.prototype.open=B;Object.defineProperty(n,"ReadStream",{get:function(){return V},set:function(O){V=O},enumerable:!0,configurable:!0}),Object.defineProperty(n,"WriteStream",{get:function(){return J},set:function(O){J=O},enumerable:!0,configurable:!0});var Q=V;Object.defineProperty(n,"FileReadStream",{get:function(){return Q},set:function(O){Q=O},enumerable:!0,configurable:!0});var Y=J;Object.defineProperty(n,"FileWriteStream",{get:function(){return Y},set:function(O){Y=O},enumerable:!0,configurable:!0});function V(O,_){if(this instanceof V)return X.apply(this,arguments),this;else return V.apply(Object.create(V.prototype),arguments)}function G(){var O=this;M(O.path,O.flags,O.mode,function(_,w){if(_){if(O.autoClose)O.destroy();O.emit("error",_)}else O.fd=w,O.emit("open",w),O.read()})}function J(O,_){if(this instanceof J)return $.apply(this,arguments),this;else return J.apply(Object.create(J.prototype),arguments)}function B(){var O=this;M(O.path,O.flags,O.mode,function(_,w){if(_)O.destroy(),O.emit("error",_);else O.fd=w,O.emit("open",w)})}function z(O,_){return new n.ReadStream(O,_)}function q(O,_){return new n.WriteStream(O,_)}var Z=n.open;n.open=M;function M(O,_,w,H){if(typeof w==="function")H=w,w=null;return v(O,_,w,H);function v(P,p,b,C,A){return Z(P,p,b,function(E,N){if(E&&(E.code==="EMFILE"||E.code==="ENFILE"))YD([v,[P,p,b,C],E,A||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}return n}function YD(n){AU("ENQUEUE",n[0].name,n[1]),H1[r1].push(n),uf()}var h8;function MT(){var n=Date.now();for(var U=0;U<H1[r1].length;++U)if(H1[r1][U].length>2)H1[r1][U][3]=n,H1[r1][U][4]=n;uf()}function uf(){if(clearTimeout(h8),h8=void 0,H1[r1].length===0)return;var n=H1[r1].shift(),U=n[0],D=n[1],c=n[2],g=n[3],f=n[4];if(g===void 0)AU("RETRY",U.name,D),U.apply(null,D);else if(Date.now()-g>=60000){AU("TIMEOUT",U.name,D);var h=D.pop();if(typeof h==="function")h.call(null,c)}else{var W=Date.now()-f,T=Math.max(f-g,1),x=Math.min(T*1.2,100);if(W>=x)AU("RETRY",U.name,D),U.apply(null,D.concat([g]));else H1[r1].push(n)}if(h8===void 0)h8=setTimeout(uf,0)}});var LT=L((YU1,HT)=>{function En(n,U){if(typeof U==="boolean")U={forever:U};if(this._originalTimeouts=JSON.parse(JSON.stringify(n)),this._timeouts=n,this._options=U||{},this._maxRetryTime=U&&U.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}HT.exports=En;En.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};En.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};En.prototype.retry=function(n){if(this._timeout)clearTimeout(this._timeout);if(!n)return!1;var U=new Date().getTime();if(n&&U-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(n);var D=this._timeouts.shift();if(D===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),D=this._timeouts.shift();else return!1;var c=this,g=setTimeout(function(){if(c._attempts++,c._operationTimeoutCb){if(c._timeout=setTimeout(function(){c._operationTimeoutCb(c._attempts)},c._operationTimeout),c._options.unref)c._timeout.unref()}c._fn(c._attempts)},D);if(this._options.unref)g.unref();return!0};En.prototype.attempt=function(n,U){if(this._fn=n,U){if(U.timeout)this._operationTimeout=U.timeout;if(U.cb)this._operationTimeoutCb=U.cb}var D=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){D._operationTimeoutCb()},D._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};En.prototype.try=function(n){console.log("Using RetryOperation.try() is deprecated"),this.attempt(n)};En.prototype.start=function(n){console.log("Using RetryOperation.start() is deprecated"),this.attempt(n)};En.prototype.start=En.prototype.try;En.prototype.errors=function(){return this._errors};En.prototype.attempts=function(){return this._attempts};En.prototype.mainError=function(){if(this._errors.length===0)return null;var n={},U=null,D=0;for(var c=0;c<this._errors.length;c++){var g=this._errors[c],f=g.message,h=(n[f]||0)+1;if(n[f]=h,h>=D)U=g,D=h}return U}});var ET=L((YM)=>{var QM=LT();YM.operation=function(n){var U=YM.timeouts(n);return new QM(U,{forever:n&&n.forever,unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})};YM.timeouts=function(n){if(n instanceof Array)return[].concat(n);var U={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var D in n)U[D]=n[D];if(U.minTimeout>U.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var c=[];for(var g=0;g<U.retries;g++)c.push(this.createTimeout(g,U));if(n&&n.forever&&!c.length)c.push(this.createTimeout(g,U));return c.sort(function(f,h){return f-h}),c};YM.createTimeout=function(n,U){var D=U.randomize?Math.random()+1:1,c=Math.round(D*U.minTimeout*Math.pow(U.factor,n));return c=Math.min(c,U.maxTimeout),c};YM.wrap=function(n,U,D){if(U instanceof Array)D=U,U=null;if(!D){D=[];for(var c in n)if(typeof n[c]==="function")D.push(c)}for(var g=0;g<D.length;g++){var f=D[g],h=n[f];n[f]=function(T){var x=YM.operation(U),y=Array.prototype.slice.call(arguments,1),F=y.pop();y.push(function(i){if(x.retry(i))return;if(i)arguments[0]=x.mainError();F.apply(this,arguments)}),x.attempt(function(){T.apply(n,y)})}.bind(n,h),n[f].options=U}}});var wT=L((GU1,x8)=>{x8.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")x8.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")x8.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var jT=L((KU1,GD)=>{var q1=global.process,HU=function(n){return n&&typeof n==="object"&&typeof n.removeListener==="function"&&typeof n.emit==="function"&&typeof n.reallyExit==="function"&&typeof n.listeners==="function"&&typeof n.kill==="function"&&typeof n.pid==="number"&&typeof n.on==="function"};if(!HU(q1))GD.exports=function(){return function(){}};else{if(pf=B1("assert"),LU=wT(),mf=/^win/i.test(q1.platform),BD=B1("events"),typeof BD!=="function")BD=BD.EventEmitter;if(q1.__signal_exit_emitter__)N1=q1.__signal_exit_emitter__;else N1=q1.__signal_exit_emitter__=new BD,N1.count=0,N1.emitted={};if(!N1.infinite)N1.setMaxListeners(1/0),N1.infinite=!0;GD.exports=function(n,U){if(!HU(global.process))return function(){};if(pf.equal(typeof n,"function","a callback must be provided for exit handler"),CU===!1)T8();var D="exit";if(U&&U.alwaysLast)D="afterexit";var c=function(){if(N1.removeListener(D,n),N1.listeners("exit").length===0&&N1.listeners("afterexit").length===0)Sc()};return N1.on(D,n),c},Sc=function(){if(!CU||!HU(global.process))return;CU=!1,LU.forEach(function(U){try{q1.removeListener(U,vc[U])}catch(D){}}),q1.emit=Nc,q1.reallyExit=y8,N1.count-=1},GD.exports.unload=Sc,t2=function(U,D,c){if(N1.emitted[U])return;N1.emitted[U]=!0,N1.emit(U,D,c)},vc={},LU.forEach(function(n){vc[n]=function(){if(!HU(global.process))return;var D=q1.listeners(n);if(D.length===N1.count){if(Sc(),t2("exit",null,n),t2("afterexit",null,n),mf&&n==="SIGHUP")n="SIGINT";q1.kill(q1.pid,n)}}}),GD.exports.signals=function(){return LU},CU=!1,T8=function(){if(CU||!HU(global.process))return;CU=!0,N1.count+=1,LU=LU.filter(function(U){try{return q1.on(U,vc[U]),!0}catch(D){return!1}}),q1.emit=of,q1.reallyExit=af},GD.exports.load=T8,y8=q1.reallyExit,af=function(U){if(!HU(global.process))return;q1.exitCode=U||0,t2("exit",q1.exitCode,null),t2("afterexit",q1.exitCode,null),y8.call(q1,q1.exitCode)},Nc=q1.emit,of=function(U,D){if(U==="exit"&&HU(global.process)){if(D!==void 0)q1.exitCode=D;var c=Nc.apply(this,arguments);return t2("exit",q1.exitCode,null),t2("afterexit",q1.exitCode,null),c}else return Nc.apply(this,arguments)}}var pf,LU,mf,BD,N1,Sc,t2,vc,CU,T8,y8,af,Nc,of});var _T=L((zM,rf)=>{var IT=Symbol();function ZM(n,U,D){let c=U[IT];if(c)return U.stat(n,(f,h)=>{if(f)return D(f);D(null,h.mtime,c)});let g=new Date(Math.ceil(Date.now()/1000)*1000+5);U.utimes(n,g,g,(f)=>{if(f)return D(f);U.stat(n,(h,W)=>{if(h)return D(h);let T=W.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(U,IT,{value:T}),D(null,W.mtime,T)})})}function bM(n){let U=Date.now();if(n==="s")U=Math.ceil(U/1000)*1000;return new Date(U)}zM.probe=ZM;zM.getMtime=bM});var RT=L((wM,Rc)=>{var MM=B1("path"),ef=kf(),AM=ET(),HM=jT(),ST=_T(),O2={};function Pc(n,U){return U.lockfilePath||`${n}.lock`}function sf(n,U,D){if(!U.realpath)return D(null,MM.resolve(n));U.fs.realpath(n,D)}function tf(n,U,D){let c=Pc(n,U);U.fs.mkdir(c,(g)=>{if(!g)return ST.probe(c,U.fs,(f,h,W)=>{if(f)return U.fs.rmdir(c,()=>{}),D(f);D(null,h,W)});if(g.code!=="EEXIST")return D(g);if(U.stale<=0)return D(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:n}));U.fs.stat(c,(f,h)=>{if(f){if(f.code==="ENOENT")return tf(n,{...U,stale:0},D);return D(f)}if(!vT(h,U))return D(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:n}));NT(n,U,(W)=>{if(W)return D(W);tf(n,{...U,stale:0},D)})})})}function vT(n,U){return n.mtime.getTime()<Date.now()-U.stale}function NT(n,U,D){U.fs.rmdir(Pc(n,U),(c)=>{if(c&&c.code!=="ENOENT")return D(c);D()})}function F8(n,U){let D=O2[n];if(D.updateTimeout)return;if(D.updateDelay=D.updateDelay||U.update,D.updateTimeout=setTimeout(()=>{D.updateTimeout=null,U.fs.stat(D.lockfilePath,(c,g)=>{let f=D.lastUpdate+U.stale<Date.now();if(c){if(c.code==="ENOENT"||f)return lf(n,D,Object.assign(c,{code:"ECOMPROMISED"}));return D.updateDelay=1000,F8(n,U)}if(D.mtime.getTime()!==g.mtime.getTime())return lf(n,D,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let W=ST.getMtime(D.mtimePrecision);U.fs.utimes(D.lockfilePath,W,W,(T)=>{let x=D.lastUpdate+U.stale<Date.now();if(D.released)return;if(T){if(T.code==="ENOENT"||x)return lf(n,D,Object.assign(T,{code:"ECOMPROMISED"}));return D.updateDelay=1000,F8(n,U)}D.mtime=W,D.lastUpdate=Date.now(),D.updateDelay=null,F8(n,U)})})},D.updateDelay),D.updateTimeout.unref)D.updateTimeout.unref()}function lf(n,U,D){if(U.released=!0,U.updateTimeout)clearTimeout(U.updateTimeout);if(O2[n]===U)delete O2[n];U.options.onCompromised(D)}function LM(n,U,D){U={stale:1e4,update:null,realpath:!0,retries:0,fs:ef,onCompromised:(c)=>{throw c},...U},U.retries=U.retries||0,U.retries=typeof U.retries==="number"?{retries:U.retries}:U.retries,U.stale=Math.max(U.stale||0,2000),U.update=U.update==null?U.stale/2:U.update||0,U.update=Math.max(Math.min(U.update,U.stale/2),1000),sf(n,U,(c,g)=>{if(c)return D(c);let f=AM.operation(U.retries);f.attempt(()=>{tf(g,U,(h,W,T)=>{if(f.retry(h))return;if(h)return D(f.mainError());let x=O2[g]={lockfilePath:Pc(g,U),mtime:W,mtimePrecision:T,options:U,lastUpdate:Date.now()};F8(g,U),D(null,(y)=>{if(x.released)return y&&y(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));PT(g,{...U,realpath:!1},y)})})})})}function PT(n,U,D){U={fs:ef,realpath:!0,...U},sf(n,U,(c,g)=>{if(c)return D(c);let f=O2[g];if(!f)return D(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));f.updateTimeout&&clearTimeout(f.updateTimeout),f.released=!0,delete O2[g],NT(g,U,D)})}function CM(n,U,D){U={stale:1e4,realpath:!0,fs:ef,...U},U.stale=Math.max(U.stale||0,2000),sf(n,U,(c,g)=>{if(c)return D(c);U.fs.stat(Pc(g,U),(f,h)=>{if(f)return f.code==="ENOENT"?D(null,!1):D(f);return D(null,!vT(h,U))})})}function EM(){return O2}HM(()=>{for(let n in O2){let U=O2[n].options;try{U.fs.rmdirSync(Pc(n,U))}catch(D){}}});wM.lock=LM;wM.unlock=PT;wM.check=CM;wM.getLocks=EM});var dT=L((ZU1,uT)=>{var vM=kf();function NM(n){let U=["mkdir","realpath","stat","rmdir","utimes"],D={...n};return U.forEach((c)=>{D[c]=(...g)=>{let f=g.pop(),h;try{h=n[`${c}Sync`](...g)}catch(W){return f(W)}f(null,h)}}),D}function PM(n){return(...U)=>new Promise((D,c)=>{U.push((g,f)=>{if(g)c(g);else D(f)}),n(...U)})}function RM(n){return(...U)=>{let D,c;if(U.push((g,f)=>{D=g,c=f}),n(...U),D)throw D;return c}}function uM(n){if(n={...n},n.fs=NM(n.fs||vM),typeof n.retries==="number"&&n.retries>0||n.retries&&typeof n.retries.retries==="number"&&n.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return n}uT.exports={toPromise:PM,toSync:RM,toSyncOptions:uM}});var pT=L((bU1,e2)=>{var KD=RT(),{toPromise:i8,toSync:X8,toSyncOptions:n5}=dT();async function kT(n,U){let D=await i8(KD.lock)(n,U);return i8(D)}function dM(n,U){let D=X8(KD.lock)(n,n5(U));return X8(D)}function kM(n,U){return i8(KD.unlock)(n,U)}function pM(n,U){return X8(KD.unlock)(n,n5(U))}function mM(n,U){return i8(KD.check)(n,U)}function aM(n,U){return X8(KD.check)(n,n5(U))}e2.exports=kT;e2.exports.lock=kT;e2.exports.unlock=kM;e2.exports.lockSync=dM;e2.exports.unlockSync=pM;e2.exports.check=mM;e2.exports.checkSync=aM});var xi=L((Wi)=>{Object.defineProperty(Wi,"__esModule",{value:!0});var Y5="1.13.8",Ay=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},M8=Array.prototype,B5=Object.prototype,Hy=typeof Symbol<"u"?Symbol.prototype:null,lA=M8.push,ac=M8.slice,kc=B5.toString,tA=B5.hasOwnProperty,_y=typeof ArrayBuffer<"u",eA=typeof DataView<"u",sA=Array.isArray,Ly=Object.keys,Cy=Object.create,Ey=_y&&ArrayBuffer.isView,nH=isNaN,UH=isFinite,Sy=!{toString:null}.propertyIsEnumerable("toString"),wy=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],DH=Math.pow(2,53)-1;function Fn(n,U){return U=U==null?n.length-1:+U,function(){var D=Math.max(arguments.length-U,0),c=Array(D),g=0;for(;g<D;g++)c[g]=arguments[g+U];switch(U){case 0:return n.call(this,c);case 1:return n.call(this,arguments[0],c);case 2:return n.call(this,arguments[0],arguments[1],c)}var f=Array(U+1);for(g=0;g<U;g++)f[g]=arguments[g];return f[U]=c,n.apply(this,f)}}function nU(n){var U=typeof n;return U==="function"||U==="object"&&!!n}function vy(n){return n===null}function G5(n){return n===void 0}function K5(n){return n===!0||n===!1||kc.call(n)==="[object Boolean]"}function Ny(n){return!!(n&&n.nodeType===1)}function fn(n){var U="[object "+n+"]";return function(D){return kc.call(D)===U}}var A8=fn("String"),Z5=fn("Number"),Py=fn("Date"),Ry=fn("RegExp"),uy=fn("Error"),b5=fn("Symbol"),z5=fn("ArrayBuffer"),dy=fn("Function"),cH=Ay.document&&Ay.document.childNodes;if(typeof Int8Array!="object"&&typeof cH!="function")dy=function(n){return typeof n=="function"||!1};var gn=dy,ky=fn("Object"),py=eA&&(!/\[native code\]/.test(String(DataView))||ky(new DataView(new ArrayBuffer(8)))),O5=typeof Map<"u"&&ky(new Map),gH=fn("DataView");function fH(n){return n!=null&&gn(n.getInt8)&&z5(n.buffer)}var pc=py?fH:gH,UU=sA||fn("Array");function DU(n,U){return n!=null&&tA.call(n,U)}var X5=fn("Arguments");(function(){if(!X5(arguments))X5=function(n){return DU(n,"callee")}})();var H8=X5;function my(n){return!b5(n)&&UH(n)&&!isNaN(parseFloat(n))}function q5(n){return Z5(n)&&nH(n)}function M5(n){return function(){return n}}function ay(n){return function(U){var D=n(U);return typeof D=="number"&&D>=0&&D<=DH}}function oy(n){return function(U){return U==null?void 0:U[n]}}var K8=oy("byteLength"),hH=ay(K8),WH=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function xH(n){return Ey?Ey(n)&&!pc(n):hH(n)&&WH.test(kc.call(n))}var A5=_y?xH:M5(!1),cn=oy("length");function TH(n){var U={};for(var D=n.length,c=0;c<D;++c)U[n[c]]=!0;return{contains:function(g){return U[g]===!0},push:function(g){return U[g]=!0,n.push(g)}}}function ry(n,U){U=TH(U);var D=wy.length,c=n.constructor,g=gn(c)&&c.prototype||B5,f="constructor";if(DU(n,f)&&!U.contains(f))U.push(f);while(D--)if(f=wy[D],f in n&&n[f]!==g[f]&&!U.contains(f))U.push(f)}function P1(n){if(!nU(n))return[];if(Ly)return Ly(n);var U=[];for(var D in n)if(DU(n,D))U.push(D);if(Sy)ry(n,U);return U}function ly(n){if(n==null)return!0;var U=cn(n);if(typeof U=="number"&&(UU(n)||A8(n)||H8(n)))return U===0;return cn(P1(n))===0}function H5(n,U){var D=P1(U),c=D.length;if(n==null)return!c;var g=Object(n);for(var f=0;f<c;f++){var h=D[f];if(U[h]!==g[h]||!(h in g))return!1}return!0}function X1(n){if(n instanceof X1)return n;if(!(this instanceof X1))return new X1(n);this._wrapped=n}X1.VERSION=Y5;X1.prototype.value=function(){return this._wrapped};X1.prototype.valueOf=X1.prototype.toJSON=X1.prototype.value;X1.prototype.toString=function(){return String(this._wrapped)};function jy(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,K8(n))}var Iy="[object DataView]";function ty(n,U){var D=[{a:n,b:U}],c=[],g=[];while(D.length){var f=D.pop();if(f===!0){c.pop(),g.pop();continue}if(n=f.a,U=f.b,n===U){if(n!==0||1/n===1/U)continue;return!1}if(n==null||U==null)return!1;if(n!==n){if(U!==U)continue;return!1}var h=typeof n;if(h!=="function"&&h!=="object"&&typeof U!="object")return!1;if(n instanceof X1)n=n._wrapped;if(U instanceof X1)U=U._wrapped;var W=kc.call(n);if(W!==kc.call(U))return!1;if(py&&W=="[object Object]"&&pc(n)){if(!pc(U))return!1;W=Iy}switch(W){case"[object RegExp]":case"[object String]":if(""+n===""+U)continue;return!1;case"[object Number]":D.push({a:+n,b:+U});continue;case"[object Date]":case"[object Boolean]":if(+n===+U)continue;return!1;case"[object Symbol]":if(Hy.valueOf.call(n)===Hy.valueOf.call(U))continue;return!1;case"[object ArrayBuffer]":case Iy:D.push({a:jy(n),b:jy(U)});continue}var T=W==="[object Array]";if(!T&&A5(n)){var x=K8(n);if(x!==K8(U))return!1;if(n.buffer===U.buffer&&n.byteOffset===U.byteOffset)continue;T=!0}if(!T){if(typeof n!="object"||typeof U!="object")return!1;var y=n.constructor,F=U.constructor;if(y!==F&&!(gn(y)&&y instanceof y&&gn(F)&&F instanceof F)&&(("constructor"in n)&&("constructor"in U)))return!1}var i=c.length;while(i--)if(c[i]===n){if(g[i]===U)break;return!1}if(i>=0)continue;if(c.push(n),g.push(U),D.push(!0),T){if(i=n.length,i!==U.length)return!1;while(i--)D.push({a:n[i],b:U[i]})}else{var X=P1(n),$;if(i=X.length,P1(U).length!==i)return!1;while(i--){if($=X[i],!DU(U,$))return!1;D.push({a:n[$],b:U[$]})}}}return!0}function qD(n){if(!nU(n))return[];var U=[];for(var D in n)U.push(D);if(Sy)ry(n,U);return U}function L5(n){var U=cn(n);return function(D){if(D==null)return!1;var c=qD(D);if(cn(c))return!1;for(var g=0;g<U;g++)if(!gn(D[n[g]]))return!1;return n!==nF||!gn(D[C5])}}var C5="forEach",ey="has",E5=["clear","delete"],sy=["get",ey,"set"],yH=E5.concat(C5,sy),nF=E5.concat(sy),FH=["add"].concat(E5,C5,ey),UF=O5?L5(yH):fn("Map"),DF=O5?L5(nF):fn("WeakMap"),cF=O5?L5(FH):fn("Set"),gF=fn("WeakSet");function jU(n){var U=P1(n),D=U.length,c=Array(D);for(var g=0;g<D;g++)c[g]=n[U[g]];return c}function fF(n){var U=P1(n),D=U.length,c=Array(D);for(var g=0;g<D;g++)c[g]=[U[g],n[U[g]]];return c}function w5(n){var U={},D=P1(n);for(var c=0,g=D.length;c<g;c++)U[n[D[c]]]=D[c];return U}function Z8(n){var U=[];for(var D in n)if(gn(n[D]))U.push(D);return U.sort()}function j5(n,U){return function(D){var c=arguments.length;if(U)D=Object(D);if(c<2||D==null)return D;for(var g=1;g<c;g++){var f=arguments[g],h=n(f),W=h.length;for(var T=0;T<W;T++){var x=h[T];if(!U||D[x]===void 0)D[x]=f[x]}}return D}}var I5=j5(qD),mc=j5(P1),_5=j5(qD,!0);function iH(){return function(){}}function hF(n){if(!nU(n))return{};if(Cy)return Cy(n);var U=iH();U.prototype=n;var D=new U;return U.prototype=null,D}function WF(n,U){var D=hF(n);if(U)mc(D,U);return D}function xF(n){if(!nU(n))return n;return UU(n)?n.slice():I5({},n)}function TF(n,U){return U(n),n}function S5(n){return UU(n)?n:[n]}X1.toPath=S5;function oc(n){return X1.toPath(n)}function v5(n,U){var D=U.length;for(var c=0;c<D;c++){if(n==null)return;n=n[U[c]]}return D?n:void 0}function N5(n,U,D){var c=v5(n,oc(U));return G5(c)?D:c}function yF(n,U){U=oc(U);var D=U.length;for(var c=0;c<D;c++){var g=U[c];if(!DU(n,g))return!1;n=n[g]}return!!D}function L8(n){return n}function zD(n){return n=mc({},n),function(U){return H5(U,n)}}function C8(n){return n=oc(n),function(U){return v5(U,n)}}function rc(n,U,D){if(U===void 0)return n;switch(D==null?3:D){case 1:return function(c){return n.call(U,c)};case 3:return function(c,g,f){return n.call(U,c,g,f)};case 4:return function(c,g,f,h){return n.call(U,c,g,f,h)}}return function(){return n.apply(U,arguments)}}function FF(n,U,D){if(n==null)return L8;if(gn(n))return rc(n,U,D);if(nU(n)&&!UU(n))return zD(n);return C8(n)}function E8(n,U){return FF(n,U,1/0)}X1.iteratee=E8;function Yn(n,U,D){if(X1.iteratee!==E8)return X1.iteratee(n,U);return FF(n,U,D)}function iF(n,U,D){U=Yn(U,D);var c=P1(n),g=c.length,f={};for(var h=0;h<g;h++){var W=c[h];f[W]=U(n[W],W,n)}return f}function P5(){}function XF(n){if(n==null)return P5;return function(U){return N5(n,U)}}function JF(n,U,D){var c=Array(Math.max(0,n));U=rc(U,D,1);for(var g=0;g<n;g++)c[g]=U(g);return c}function b8(n,U){if(U==null)U=n,n=0;return n+Math.floor(Math.random()*(U-n+1))}var OD=Date.now||function(){return new Date().getTime()};function $F(n){var U=function(f){return n[f]},D="(?:"+P1(n).join("|")+")",c=RegExp(D),g=RegExp(D,"g");return function(f){return f=f==null?"":""+f,c.test(f)?f.replace(g,U):f}}var VF={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},QF=$F(VF),XH=w5(VF),YF=$F(XH),BF=X1.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},i5=/(.)^/,JH={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},$H=/\\|'|\r|\n|\u2028|\u2029/g;function VH(n){return"\\"+JH[n]}var QH=/^\s*(\w|\$)+\s*$/;function GF(n,U,D){if(!U&&D)U=D;U=_5({},U,X1.templateSettings);var c=RegExp([(U.escape||i5).source,(U.interpolate||i5).source,(U.evaluate||i5).source].join("|")+"|$","g"),g=0,f="__p+='";n.replace(c,function(x,y,F,i,X){if(f+=n.slice(g,X).replace($H,VH),g=X+x.length,y)f+=`'+
|
|
4
|
+
((__t=(`+y+`))==null?'':_.escape(__t))+
|
|
5
|
+
'`;else if(F)f+=`'+
|
|
6
|
+
((__t=(`+F+`))==null?'':__t)+
|
|
7
|
+
'`;else if(i)f+=`';
|
|
8
|
+
`+i+`
|
|
9
|
+
__p+='`;return x}),f+=`';
|
|
10
|
+
`;var h=U.variable;if(h){if(!QH.test(h))throw Error("variable is not a bare identifier: "+h)}else f=`with(obj||{}){
|
|
11
|
+
`+f+`}
|
|
12
|
+
`,h="obj";f=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
|
|
13
|
+
`+f+`return __p;
|
|
14
|
+
`;var W;try{W=Function(h,"_",f)}catch(x){throw x.source=f,x}var T=function(x){return W.call(this,x,X1)};return T.source="function("+h+`){
|
|
15
|
+
`+f+"}",T}function KF(n,U,D){U=oc(U);var c=U.length;if(!c)return gn(D)?D.call(n):D;for(var g=0;g<c;g++){var f=n==null?void 0:n[U[g]];if(f===void 0)f=D,g=c;n=gn(f)?f.call(n):f}return n}var YH=0;function ZF(n){var U=++YH+"";return n?n+U:U}function bF(n){var U=X1(n);return U._chain=!0,U}function zF(n,U,D,c,g){if(!(c instanceof U))return n.apply(D,g);var f=hF(n.prototype),h=n.apply(f,g);if(nU(h))return h;return f}var IU=Fn(function(n,U){var D=IU.placeholder,c=function(){var g=0,f=U.length,h=Array(f);for(var W=0;W<f;W++)h[W]=U[W]===D?arguments[g++]:U[W];while(g<arguments.length)h.push(arguments[g++]);return zF(n,c,this,this,h)};return c});IU.placeholder=X1;var R5=Fn(function(n,U,D){if(!gn(n))throw TypeError("Bind must be called on a function");var c=Fn(function(g){return zF(n,c,U,this,D.concat(g))});return c}),qn=ay(cn);function MD(n,U,D){if(!U&&U!==0)U=1/0;var c=[],g=0,f=0,h=cn(n)||0,W=[];while(!0){if(f>=h){if(!W.length)break;var T=W.pop();f=T.i,n=T.v,h=cn(n);continue}var x=n[f++];if(W.length>=U)c[g++]=x;else if(qn(x)&&(UU(x)||H8(x)))W.push({i:f,v:n}),f=0,n=x,h=cn(n);else if(!D)c[g++]=x}return c}var OF=Fn(function(n,U){U=MD(U,!1,!1);var D=U.length;if(D<1)throw Error("bindAll must be passed function names");while(D--){var c=U[D];n[c]=R5(n[c],n)}return n});function qF(n,U){var D=function(c){var g=D.cache,f=""+(U?U.apply(this,arguments):c);if(!DU(g,f))g[f]=n.apply(this,arguments);return g[f]};return D.cache={},D}var u5=Fn(function(n,U,D){return setTimeout(function(){return n.apply(null,D)},U)}),MF=IU(u5,X1,1);function AF(n,U,D){var c,g,f,h,W=0;if(!D)D={};var T=function(){if(W=D.leading===!1?0:OD(),c=null,h=n.apply(g,f),!c)g=f=null},x=function(){var y=OD();if(!W&&D.leading===!1)W=y;var F=U-(y-W);if(g=this,f=arguments,F<=0||F>U){if(c)clearTimeout(c),c=null;if(W=y,h=n.apply(g,f),!c)g=f=null}else if(!c&&D.trailing!==!1)c=setTimeout(T,F);return h};return x.cancel=function(){clearTimeout(c),W=0,c=g=f=null},x}function HF(n,U,D){var c,g,f,h,W,T=function(){var y=OD()-g;if(U>y)c=setTimeout(T,U-y);else{if(c=null,!D)h=n.apply(W,f);if(!c)f=W=null}},x=Fn(function(y){if(W=this,f=y,g=OD(),!c){if(c=setTimeout(T,U),D)h=n.apply(W,f)}return h});return x.cancel=function(){clearTimeout(c),c=f=W=null},x}function LF(n,U){return IU(U,n)}function w8(n){return function(){return!n.apply(this,arguments)}}function CF(){var n=arguments,U=n.length-1;return function(){var D=U,c=n[U].apply(this,arguments);while(D--)c=n[D].call(this,c);return c}}function EF(n,U){return function(){if(--n<1)return U.apply(this,arguments)}}function d5(n,U){var D;return function(){if(--n>0)D=U.apply(this,arguments);if(n<=1)U=null;return D}}var wF=IU(d5,2);function k5(n,U,D){U=Yn(U,D);var c=P1(n),g;for(var f=0,h=c.length;f<h;f++)if(g=c[f],U(n[g],g,n))return g}function jF(n){return function(U,D,c){D=Yn(D,c);var g=cn(U),f=n>0?0:g-1;for(;f>=0&&f<g;f+=n)if(D(U[f],f,U))return f;return-1}}var j8=jF(1),p5=jF(-1);function m5(n,U,D,c){D=Yn(D,c,1);var g=D(U),f=0,h=cn(n);while(f<h){var W=Math.floor((f+h)/2);if(D(n[W])<g)f=W+1;else h=W}return f}function IF(n,U,D){return function(c,g,f){var h=0,W=cn(c);if(typeof f=="number")if(n>0)h=f>=0?f:Math.max(f+W,h);else W=f>=0?Math.min(f+1,W):f+W+1;else if(D&&f&&W)return f=D(c,g),c[f]===g?f:-1;if(g!==g)return f=U(ac.call(c,h,W),q5),f>=0?f+h:-1;for(f=n>0?h:W-1;f>=0&&f<W;f+=n)if(c[f]===g)return f;return-1}}var a5=IF(1,j8,m5),_F=IF(-1,p5);function z8(n,U,D){var c=qn(n)?j8:k5,g=c(n,U,D);if(g!==void 0&&g!==-1)return n[g]}function SF(n,U){return z8(n,zD(U))}function c2(n,U,D){U=rc(U,D);var c,g;if(qn(n))for(c=0,g=n.length;c<g;c++)U(n[c],c,n);else{var f=P1(n);for(c=0,g=f.length;c<g;c++)U(n[f[c]],f[c],n)}return n}function s2(n,U,D){U=Yn(U,D);var c=!qn(n)&&P1(n),g=(c||n).length,f=Array(g);for(var h=0;h<g;h++){var W=c?c[h]:h;f[h]=U(n[W],W,n)}return f}function vF(n){var U=function(D,c,g,f){var h=!qn(D)&&P1(D),W=(h||D).length,T=n>0?0:W-1;if(!f)g=D[h?h[T]:T],T+=n;for(;T>=0&&T<W;T+=n){var x=h?h[T]:T;g=c(g,D[x],x,D)}return g};return function(D,c,g,f){var h=arguments.length>=3;return U(D,rc(c,f,4),g,h)}}var B8=vF(1),J5=vF(-1);function wU(n,U,D){var c=[];return U=Yn(U,D),c2(n,function(g,f,h){if(U(g,f,h))c.push(g)}),c}function NF(n,U,D){return wU(n,w8(Yn(U)),D)}function $5(n,U,D){U=Yn(U,D);var c=!qn(n)&&P1(n),g=(c||n).length;for(var f=0;f<g;f++){var h=c?c[f]:f;if(!U(n[h],h,n))return!1}return!0}function V5(n,U,D){U=Yn(U,D);var c=!qn(n)&&P1(n),g=(c||n).length;for(var f=0;f<g;f++){var h=c?c[f]:f;if(U(n[h],h,n))return!0}return!1}function D2(n,U,D,c){if(!qn(n))n=jU(n);if(typeof D!="number"||c)D=0;return a5(n,U,D)>=0}var PF=Fn(function(n,U,D){var c,g;if(gn(U))g=U;else U=oc(U),c=U.slice(0,-1),U=U[U.length-1];return s2(n,function(f){var h=g;if(!h){if(c&&c.length)f=v5(f,c);if(f==null)return;h=f[U]}return h==null?h:h.apply(f,D)})});function I8(n,U){return s2(n,C8(U))}function RF(n,U){return wU(n,zD(U))}function o5(n,U,D){var c=-1/0,g=-1/0,f,h;if(U==null||typeof U=="number"&&typeof n[0]!="object"&&n!=null){n=qn(n)?n:jU(n);for(var W=0,T=n.length;W<T;W++)if(f=n[W],f!=null&&f>c)c=f}else U=Yn(U,D),c2(n,function(x,y,F){if(h=U(x,y,F),h>g||h===-1/0&&c===-1/0)c=x,g=h});return c}function uF(n,U,D){var c=1/0,g=1/0,f,h;if(U==null||typeof U=="number"&&typeof n[0]!="object"&&n!=null){n=qn(n)?n:jU(n);for(var W=0,T=n.length;W<T;W++)if(f=n[W],f!=null&&f<c)c=f}else U=Yn(U,D),c2(n,function(x,y,F){if(h=U(x,y,F),h<g||h===1/0&&c===1/0)c=x,g=h});return c}var BH=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function r5(n){if(!n)return[];if(UU(n))return ac.call(n);if(A8(n))return n.match(BH);if(qn(n))return s2(n,L8);return jU(n)}function l5(n,U,D){if(U==null||D){if(!qn(n))n=jU(n);return n[b8(n.length-1)]}var c=r5(n),g=cn(c);U=Math.max(Math.min(U,g),0);var f=g-1;for(var h=0;h<U;h++){var W=b8(h,f),T=c[h];c[h]=c[W],c[W]=T}return c.slice(0,U)}function dF(n){return l5(n,1/0)}function kF(n,U,D){var c=0;return U=Yn(U,D),I8(s2(n,function(g,f,h){return{value:g,index:c++,criteria:U(g,f,h)}}).sort(function(g,f){var h=g.criteria,W=f.criteria;if(h!==W){if(h>W||h===void 0)return 1;if(h<W||W===void 0)return-1}return g.index-f.index}),"value")}function _8(n,U){return function(D,c,g){var f=U?[[],[]]:{};return c=Yn(c,g),c2(D,function(h,W){var T=c(h,W,D);n(f,h,T)}),f}}var pF=_8(function(n,U,D){if(DU(n,D))n[D].push(U);else n[D]=[U]}),mF=_8(function(n,U,D){n[D]=U}),aF=_8(function(n,U,D){if(DU(n,D))n[D]++;else n[D]=1}),oF=_8(function(n,U,D){n[D?0:1].push(U)},!0);function rF(n){if(n==null)return 0;return qn(n)?n.length:P1(n).length}function GH(n,U,D){return U in D}var t5=Fn(function(n,U){var D={},c=U[0];if(n==null)return D;if(gn(c)){if(U.length>1)c=rc(c,U[1]);U=qD(n)}else c=GH,U=MD(U,!1,!1),n=Object(n);for(var g=0,f=U.length;g<f;g++){var h=U[g],W=n[h];if(c(W,h,n))D[h]=W}return D}),lF=Fn(function(n,U){var D=U[0],c;if(gn(D)){if(D=w8(D),U.length>1)c=U[1]}else U=s2(MD(U,!1,!1),String),D=function(g,f){return!D2(U,f)};return t5(n,D,c)});function e5(n,U,D){return ac.call(n,0,Math.max(0,n.length-(U==null||D?1:U)))}function G8(n,U,D){if(n==null||n.length<1)return U==null||D?void 0:[];if(U==null||D)return n[0];return e5(n,n.length-U)}function dc(n,U,D){return ac.call(n,U==null||D?1:U)}function tF(n,U,D){if(n==null||n.length<1)return U==null||D?void 0:[];if(U==null||D)return n[n.length-1];return dc(n,Math.max(0,n.length-U))}function eF(n){return wU(n,Boolean)}function sF(n,U){return MD(n,U,!1)}var s5=Fn(function(n,U){return U=MD(U,!0,!0),wU(n,function(D){return!D2(U,D)})}),ni=Fn(function(n,U){return s5(n,U)});function O8(n,U,D,c){if(!K5(U))c=D,D=U,U=!1;if(D!=null)D=Yn(D,c);var g=[],f=[];for(var h=0,W=cn(n);h<W;h++){var T=n[h],x=D?D(T,h,n):T;if(U&&!D){if(!h||f!==x)g.push(T);f=x}else if(D){if(!D2(f,x))f.push(x),g.push(T)}else if(!D2(g,T))g.push(T)}return g}var Ui=Fn(function(n){return O8(MD(n,!0,!0))});function Di(n){var U=[],D=arguments.length;for(var c=0,g=cn(n);c<g;c++){var f=n[c];if(D2(U,f))continue;var h;for(h=1;h<D;h++)if(!D2(arguments[h],f))break;if(h===D)U.push(f)}return U}function q8(n){var U=n&&o5(n,cn).length||0,D=Array(U);for(var c=0;c<U;c++)D[c]=I8(n,c);return D}var ci=Fn(q8);function gi(n,U){var D={};for(var c=0,g=cn(n);c<g;c++)if(U)D[n[c]]=U[c];else D[n[c][0]]=n[c][1];return D}function fi(n,U,D){if(U==null)U=n||0,n=0;if(!D)D=U<n?-1:1;var c=Math.max(Math.ceil((U-n)/D),0),g=Array(c);for(var f=0;f<c;f++,n+=D)g[f]=n;return g}function hi(n,U){if(U==null||U<1)return[];var D=[],c=0,g=n.length;while(c<g)D.push(ac.call(n,c,c+=U));return D}function n6(n,U){return n._chain?X1(U).chain():U}function U6(n){return c2(Z8(n),function(U){var D=X1[U]=n[U];X1.prototype[U]=function(){var c=[this._wrapped];return lA.apply(c,arguments),n6(this,D.apply(X1,c))}}),X1}c2(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var U=M8[n];X1.prototype[n]=function(){var D=this._wrapped;if(D!=null){if(U.apply(D,arguments),(n==="shift"||n==="splice")&&D.length===0)delete D[0]}return n6(this,D)}});c2(["concat","join","slice"],function(n){var U=M8[n];X1.prototype[n]=function(){var D=this._wrapped;if(D!=null)D=U.apply(D,arguments);return n6(this,D)}});var KH={__proto__:null,VERSION:Y5,restArguments:Fn,isObject:nU,isNull:vy,isUndefined:G5,isBoolean:K5,isElement:Ny,isString:A8,isNumber:Z5,isDate:Py,isRegExp:Ry,isError:uy,isSymbol:b5,isArrayBuffer:z5,isDataView:pc,isArray:UU,isFunction:gn,isArguments:H8,isFinite:my,isNaN:q5,isTypedArray:A5,isEmpty:ly,isMatch:H5,isEqual:ty,isMap:UF,isWeakMap:DF,isSet:cF,isWeakSet:gF,keys:P1,allKeys:qD,values:jU,pairs:fF,invert:w5,functions:Z8,methods:Z8,extend:I5,extendOwn:mc,assign:mc,defaults:_5,create:WF,clone:xF,tap:TF,get:N5,has:yF,mapObject:iF,identity:L8,constant:M5,noop:P5,toPath:S5,property:C8,propertyOf:XF,matcher:zD,matches:zD,times:JF,random:b8,now:OD,escape:QF,unescape:YF,templateSettings:BF,template:GF,result:KF,uniqueId:ZF,chain:bF,iteratee:E8,partial:IU,bind:R5,bindAll:OF,memoize:qF,delay:u5,defer:MF,throttle:AF,debounce:HF,wrap:LF,negate:w8,compose:CF,after:EF,before:d5,once:wF,findKey:k5,findIndex:j8,findLastIndex:p5,sortedIndex:m5,indexOf:a5,lastIndexOf:_F,find:z8,detect:z8,findWhere:SF,each:c2,forEach:c2,map:s2,collect:s2,reduce:B8,foldl:B8,inject:B8,reduceRight:J5,foldr:J5,filter:wU,select:wU,reject:NF,every:$5,all:$5,some:V5,any:V5,contains:D2,includes:D2,include:D2,invoke:PF,pluck:I8,where:RF,max:o5,min:uF,shuffle:dF,sample:l5,sortBy:kF,groupBy:pF,indexBy:mF,countBy:aF,partition:oF,toArray:r5,size:rF,pick:t5,omit:lF,first:G8,head:G8,take:G8,initial:e5,last:tF,rest:dc,tail:dc,drop:dc,compact:eF,flatten:sF,without:ni,uniq:O8,unique:O8,union:Ui,intersection:Di,difference:s5,unzip:q8,transpose:q8,zip:ci,object:gi,range:fi,chunk:hi,mixin:U6,default:X1},Q5=U6(KH);Q5._=Q5;Wi.VERSION=Y5;Wi._=Q5;Wi._escape=QF;Wi._unescape=YF;Wi.after=EF;Wi.allKeys=qD;Wi.before=d5;Wi.bind=R5;Wi.bindAll=OF;Wi.chain=bF;Wi.chunk=hi;Wi.clone=xF;Wi.compact=eF;Wi.compose=CF;Wi.constant=M5;Wi.contains=D2;Wi.countBy=aF;Wi.create=WF;Wi.debounce=HF;Wi.defaults=_5;Wi.defer=MF;Wi.delay=u5;Wi.difference=s5;Wi.each=c2;Wi.every=$5;Wi.extend=I5;Wi.extendOwn=mc;Wi.filter=wU;Wi.find=z8;Wi.findIndex=j8;Wi.findKey=k5;Wi.findLastIndex=p5;Wi.findWhere=SF;Wi.first=G8;Wi.flatten=sF;Wi.functions=Z8;Wi.get=N5;Wi.groupBy=pF;Wi.has=yF;Wi.identity=L8;Wi.indexBy=mF;Wi.indexOf=a5;Wi.initial=e5;Wi.intersection=Di;Wi.invert=w5;Wi.invoke=PF;Wi.isArguments=H8;Wi.isArray=UU;Wi.isArrayBuffer=z5;Wi.isBoolean=K5;Wi.isDataView=pc;Wi.isDate=Py;Wi.isElement=Ny;Wi.isEmpty=ly;Wi.isEqual=ty;Wi.isError=uy;Wi.isFinite=my;Wi.isFunction=gn;Wi.isMap=UF;Wi.isMatch=H5;Wi.isNaN=q5;Wi.isNull=vy;Wi.isNumber=Z5;Wi.isObject=nU;Wi.isRegExp=Ry;Wi.isSet=cF;Wi.isString=A8;Wi.isSymbol=b5;Wi.isTypedArray=A5;Wi.isUndefined=G5;Wi.isWeakMap=DF;Wi.isWeakSet=gF;Wi.iteratee=E8;Wi.keys=P1;Wi.last=tF;Wi.lastIndexOf=_F;Wi.map=s2;Wi.mapObject=iF;Wi.matcher=zD;Wi.max=o5;Wi.memoize=qF;Wi.min=uF;Wi.mixin=U6;Wi.negate=w8;Wi.noop=P5;Wi.now=OD;Wi.object=gi;Wi.omit=lF;Wi.once=wF;Wi.pairs=fF;Wi.partial=IU;Wi.partition=oF;Wi.pick=t5;Wi.pluck=I8;Wi.property=C8;Wi.propertyOf=XF;Wi.random=b8;Wi.range=fi;Wi.reduce=B8;Wi.reduceRight=J5;Wi.reject=NF;Wi.rest=dc;Wi.restArguments=Fn;Wi.result=KF;Wi.sample=l5;Wi.shuffle=dF;Wi.size=rF;Wi.some=V5;Wi.sortBy=kF;Wi.sortedIndex=m5;Wi.tap=TF;Wi.template=GF;Wi.templateSettings=BF;Wi.throttle=AF;Wi.times=JF;Wi.toArray=r5;Wi.toPath=S5;Wi.union=Ui;Wi.uniq=O8;Wi.uniqueId=ZF;Wi.unzip=q8;Wi.values=jU;Wi.where=RF;Wi.without=ni;Wi.wrap=LF;Wi.zip=ci});var w1=L((KD1,Ti)=>{var PC=xi();Ti.exports=PC._});var _U=L((ZD1,F6)=>{var D6=function(){return this===void 0}();if(D6)F6.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:D6,propertyIsWritable:function(n,U){var D=Object.getOwnPropertyDescriptor(n,U);return!!(!D||D.writable||D.set)}};else c6={}.hasOwnProperty,g6={}.toString,f6={}.constructor.prototype,S8=function(n){var U=[];for(var D in n)if(c6.call(n,D))U.push(D);return U},h6=function(n,U){return{value:n[U]}},W6=function(n,U,D){return n[U]=D.value,n},x6=function(n){return n},T6=function(n){try{return Object(n).constructor.prototype}catch(U){return f6}},y6=function(n){try{return g6.call(n)==="[object Array]"}catch(U){return!1}},F6.exports={isArray:y6,keys:S8,names:S8,defineProperty:W6,getDescriptor:h6,freeze:x6,getPrototypeOf:T6,isES5:D6,propertyIsWritable:function(){return!0}};var c6,g6,f6,S8,h6,W6,x6,T6,y6});var Q1=L((N8,Q6)=>{var Bn=_U(),RC=typeof navigator>"u",i6={e:{}},X6,uC=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:N8!==void 0?N8:null;function dC(){try{var n=X6;return X6=null,n.apply(this,arguments)}catch(U){return i6.e=U,i6}}function kC(n){return X6=n,dC}var pC=function(n,U){var D={}.hasOwnProperty;function c(){this.constructor=n,this.constructor$=U;for(var g in U.prototype)if(D.call(U.prototype,g)&&g.charAt(g.length-1)!=="$")this[g+"$"]=U.prototype[g]}return c.prototype=U.prototype,n.prototype=new c,n.prototype};function V6(n){return n==null||n===!0||n===!1||typeof n==="string"||typeof n==="number"}function mC(n){return typeof n==="function"||typeof n==="object"&&n!==null}function aC(n){if(!V6(n))return n;return Error(v8(n))}function oC(n,U){var D=n.length,c=Array(D+1),g;for(g=0;g<D;++g)c[g]=n[g];return c[g]=U,c}function rC(n,U,D){if(Bn.isES5){var c=Object.getOwnPropertyDescriptor(n,U);if(c!=null)return c.get==null&&c.set==null?c.value:D}else return{}.hasOwnProperty.call(n,U)?n[U]:void 0}function yi(n,U,D){if(V6(n))return n;var c={value:D,configurable:!0,enumerable:!1,writable:!0};return Bn.defineProperty(n,U,c),n}function lC(n){throw n}var tC=function(){var n=[Array.prototype,Object.prototype,Function.prototype],U=function(g){for(var f=0;f<n.length;++f)if(n[f]===g)return!0;return!1};if(Bn.isES5){var D=Object.getOwnPropertyNames;return function(g){var f=[],h=Object.create(null);while(g!=null&&!U(g)){var W;try{W=D(g)}catch(F){return f}for(var T=0;T<W.length;++T){var x=W[T];if(h[x])continue;h[x]=!0;var y=Object.getOwnPropertyDescriptor(g,x);if(y!=null&&y.get==null&&y.set==null)f.push(x)}g=Bn.getPrototypeOf(g)}return f}}else{var c={}.hasOwnProperty;return function(g){if(U(g))return[];var f=[];n:for(var h in g)if(c.call(g,h))f.push(h);else{for(var W=0;W<n.length;++W)if(c.call(n[W],h))continue n;f.push(h)}return f}}}(),eC=/this\s*\.\s*\S+\s*=/;function sC(n){try{if(typeof n==="function"){var U=Bn.names(n.prototype),D=Bn.isES5&&U.length>1,c=U.length>0&&!(U.length===1&&U[0]==="constructor"),g=eC.test(n+"")&&Bn.names(n).length>0;if(D||c||g)return!0}return!1}catch(f){return!1}}function nE(obj){function FakeConstructor(){}FakeConstructor.prototype=obj;var l=8;while(l--)new FakeConstructor;return obj}var UE=/^[a-z$_][a-z$_0-9]*$/i;function DE(n){return UE.test(n)}function cE(n,U,D){var c=Array(n);for(var g=0;g<n;++g)c[g]=U+g+D;return c}function v8(n){try{return n+""}catch(U){return"[no string representation]"}}function Fi(n){return n!==null&&typeof n==="object"&&typeof n.message==="string"&&typeof n.name==="string"}function gE(n){try{yi(n,"isOperational",!0)}catch(U){}}function fE(n){if(n==null)return!1;return n instanceof Error.__BluebirdErrorTypes__.OperationalError||n.isOperational===!0}function J6(n){return Fi(n)&&Bn.propertyIsWritable(n,"stack")}var hE=function(){if(!("stack"in Error()))return function(n){if(J6(n))return n;try{throw Error(v8(n))}catch(U){return U}};else return function(n){if(J6(n))return n;return Error(v8(n))}}();function ii(n){return{}.toString.call(n)}function WE(n,U,D){var c=Bn.names(n);for(var g=0;g<c.length;++g){var f=c[g];if(D(f))try{Bn.defineProperty(U,f,Bn.getDescriptor(n,f))}catch(h){}}}var Xi=function(n){if(Bn.isArray(n))return n;return null};if(typeof Symbol<"u"&&Symbol.iterator)$6=typeof Array.from==="function"?function(n){return Array.from(n)}:function(n){var U=[],D=n[Symbol.iterator](),c;while(!(c=D.next()).done)U.push(c.value);return U},Xi=function(n){if(Bn.isArray(n))return n;else if(n!=null&&typeof n[Symbol.iterator]==="function")return $6(n);return null};var $6,xE=typeof process<"u"&&ii(process).toLowerCase()==="[object process]",Ji=typeof process<"u"&&typeof process.env<"u";function TE(n){return Ji?process.env[n]:void 0}function yE(){if(typeof Promise==="function")try{var n=new Promise(function(){});if({}.toString.call(n)==="[object Promise]")return Promise}catch(U){}}function FE(n,U){return n.bind(U)}var AD={isClass:sC,isIdentifier:DE,inheritedDataKeys:tC,getDataPropertyOrDefault:rC,thrower:lC,isArray:Bn.isArray,asArray:Xi,notEnumerableProp:yi,isPrimitive:V6,isObject:mC,isError:Fi,canEvaluate:RC,errorObj:i6,tryCatch:kC,inherits:pC,withAppended:oC,maybeWrapAsError:aC,toFastProperties:nE,filledRange:cE,toString:v8,canAttachTrace:J6,ensureErrorObject:hE,originatesFromRejection:fE,markAsOriginatingFromRejection:gE,classString:ii,copyDescriptors:WE,hasDevTools:typeof chrome<"u"&&chrome&&typeof chrome.loadTimes==="function",isNode:xE,hasEnvVariables:Ji,env:TE,global:uC,getNativePromise:yE,domainBind:FE};AD.isRecentNode=AD.isNode&&function(){var n=process.versions.node.split(".").map(Number);return n[0]===0&&n[1]>10||n[0]>0}();if(AD.isNode)AD.toFastProperties(process);try{throw Error()}catch(n){AD.lastLineError=n}Q6.exports=AD});var Vi=L((bD1,$i)=>{var B6=Q1(),SU,iE=function(){throw Error(`No async scheduler available
|
|
16
|
+
|
|
17
|
+
See http://goo.gl/MqrFmX
|
|
18
|
+
`)},Y6=B6.getNativePromise();if(B6.isNode&&typeof MutationObserver>"u")G6=global.setImmediate,K6=process.nextTick,SU=B6.isRecentNode?function(n){G6.call(global,n)}:function(n){K6.call(process,n)};else if(typeof Y6==="function"&&typeof Y6.resolve==="function")Z6=Y6.resolve(),SU=function(n){Z6.then(n)};else if(typeof MutationObserver<"u"&&!(typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova)))SU=function(){var n=document.createElement("div"),U={attributes:!0},D=!1,c=document.createElement("div"),g=new MutationObserver(function(){n.classList.toggle("foo"),D=!1});g.observe(c,U);var f=function(){if(D)return;D=!0,c.classList.toggle("foo")};return function(W){var T=new MutationObserver(function(){T.disconnect(),W()});T.observe(n,U),f()}}();else if(typeof setImmediate<"u")SU=function(n){setImmediate(n)};else if(typeof setTimeout<"u")SU=function(n){setTimeout(n,0)};else SU=iE;var G6,K6,Z6;$i.exports=SU});var Yi=L((zD1,Qi)=>{function XE(n,U,D,c,g){for(var f=0;f<g;++f)D[f+c]=n[f+U],n[f+U]=void 0}function cU(n){this._capacity=n,this._length=0,this._front=0}cU.prototype._willBeOverCapacity=function(n){return this._capacity<n};cU.prototype._pushOne=function(n){var U=this.length();this._checkCapacity(U+1);var D=this._front+U&this._capacity-1;this[D]=n,this._length=U+1};cU.prototype.push=function(n,U,D){var c=this.length()+3;if(this._willBeOverCapacity(c)){this._pushOne(n),this._pushOne(U),this._pushOne(D);return}var g=this._front+c-3;this._checkCapacity(c);var f=this._capacity-1;this[g+0&f]=n,this[g+1&f]=U,this[g+2&f]=D,this._length=c};cU.prototype.shift=function(){var n=this._front,U=this[n];return this[n]=void 0,this._front=n+1&this._capacity-1,this._length--,U};cU.prototype.length=function(){return this._length};cU.prototype._checkCapacity=function(n){if(this._capacity<n)this._resizeTo(this._capacity<<1)};cU.prototype._resizeTo=function(n){var U=this._capacity;this._capacity=n;var D=this._front,c=this._length,g=D+c&U-1;XE(this,0,this,U,g)};Qi.exports=cU});var Oi=L((OD1,b6)=>{var bi;try{throw Error()}catch(n){bi=n}var JE=Vi(),Bi=Yi(),zi=Q1();function d1(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new Bi(16),this._normalQueue=new Bi(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var n=this;this.drainQueues=function(){n._drainQueues()},this._schedule=JE}d1.prototype.setScheduler=function(n){var U=this._schedule;return this._schedule=n,this._customScheduler=!0,U};d1.prototype.hasCustomScheduler=function(){return this._customScheduler};d1.prototype.enableTrampoline=function(){this._trampolineEnabled=!0};d1.prototype.disableTrampolineIfNecessary=function(){if(zi.hasDevTools)this._trampolineEnabled=!1};d1.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues};d1.prototype.fatalError=function(n,U){if(U)process.stderr.write("Fatal "+(n instanceof Error?n.stack:n)+`
|
|
19
|
+
`),process.exit(2);else this.throwLater(n)};d1.prototype.throwLater=function(n,U){if(arguments.length===1)U=n,n=function(){throw U};if(typeof setTimeout<"u")setTimeout(function(){n(U)},0);else try{this._schedule(function(){n(U)})}catch(D){throw Error(`No async scheduler available
|
|
20
|
+
|
|
21
|
+
See http://goo.gl/MqrFmX
|
|
22
|
+
`)}};function Gi(n,U,D){this._lateQueue.push(n,U,D),this._queueTick()}function Ki(n,U,D){this._normalQueue.push(n,U,D),this._queueTick()}function Zi(n){this._normalQueue._pushOne(n),this._queueTick()}if(!zi.hasDevTools)d1.prototype.invokeLater=Gi,d1.prototype.invoke=Ki,d1.prototype.settlePromises=Zi;else d1.prototype.invokeLater=function(n,U,D){if(this._trampolineEnabled)Gi.call(this,n,U,D);else this._schedule(function(){setTimeout(function(){n.call(U,D)},100)})},d1.prototype.invoke=function(n,U,D){if(this._trampolineEnabled)Ki.call(this,n,U,D);else this._schedule(function(){n.call(U,D)})},d1.prototype.settlePromises=function(n){if(this._trampolineEnabled)Zi.call(this,n);else this._schedule(function(){n._settlePromises()})};d1.prototype._drainQueue=function(n){while(n.length()>0){var U=n.shift();if(typeof U!=="function"){U._settlePromises();continue}var D=n.shift(),c=n.shift();U.call(D,c)}};d1.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)};d1.prototype._queueTick=function(){if(!this._isTickUsed)this._isTickUsed=!0,this._schedule(this.drainQueues)};d1.prototype._reset=function(){this._isTickUsed=!1};b6.exports=d1;b6.exports.firstLineError=bi});var q2=L((qD1,Ai)=>{var q6=_U(),$E=q6.freeze,qi=Q1(),Mi=qi.inherits,HD=qi.notEnumerableProp;function LD(n,U){function D(c){if(!(this instanceof D))return new D(c);if(HD(this,"message",typeof c==="string"?c:U),HD(this,"name",n),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else Error.call(this)}return Mi(D,Error),D}var z6,O6,VE=LD("Warning","warning"),QE=LD("CancellationError","cancellation error"),YE=LD("TimeoutError","timeout error"),tc=LD("AggregateError","aggregate error");try{z6=TypeError,O6=RangeError}catch(n){z6=LD("TypeError","type error"),O6=LD("RangeError","range error")}var P8="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" ");for(vU=0;vU<P8.length;++vU)if(typeof Array.prototype[P8[vU]]==="function")tc.prototype[P8[vU]]=Array.prototype[P8[vU]];var vU;q6.defineProperty(tc.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0});tc.prototype.isOperational=!0;var R8=0;tc.prototype.toString=function(){var n=Array(R8*4+1).join(" "),U=`
|
|
23
|
+
`+n+`AggregateError of:
|
|
24
|
+
`;R8++,n=Array(R8*4+1).join(" ");for(var D=0;D<this.length;++D){var c=this[D]===this?"[Circular AggregateError]":this[D]+"",g=c.split(`
|
|
25
|
+
`);for(var f=0;f<g.length;++f)g[f]=n+g[f];c=g.join(`
|
|
26
|
+
`),U+=c+`
|
|
27
|
+
`}return R8--,U};function lc(n){if(!(this instanceof lc))return new lc(n);if(HD(this,"name","OperationalError"),HD(this,"message",n),this.cause=n,this.isOperational=!0,n instanceof Error)HD(this,"message",n.message),HD(this,"stack",n.stack);else if(Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)}Mi(lc,Error);var NU=Error.__BluebirdErrorTypes__;if(!NU)NU=$E({CancellationError:QE,TimeoutError:YE,OperationalError:lc,RejectionError:lc,AggregateError:tc}),q6.defineProperty(Error,"__BluebirdErrorTypes__",{value:NU,writable:!1,enumerable:!1,configurable:!1});Ai.exports={Error,TypeError:z6,RangeError:O6,CancellationError:NU.CancellationError,OperationalError:NU.OperationalError,TimeoutError:NU.TimeoutError,AggregateError:NU.AggregateError,Warning:VE}});var Li=L((MD1,Hi)=>{Hi.exports=function(n,U){var D=Q1(),c=D.errorObj,g=D.isObject;function f(F,i){if(g(F)){if(F instanceof n)return F;var X=W(F);if(X===c){if(i)i._pushContext();var $=n.reject(X.e);if(i)i._popContext();return $}else if(typeof X==="function"){if(x(F)){var $=new n(U);return F._then($._fulfill,$._reject,void 0,$,null),$}return y(F,X,i)}}return F}function h(F){return F.then}function W(F){try{return h(F)}catch(i){return c.e=i,c}}var T={}.hasOwnProperty;function x(F){try{return T.call(F,"_promise0")}catch(i){return!1}}function y(F,i,X){var $=new n(U),Q=$;if(X)X._pushContext();if($._captureStackTrace(),X)X._popContext();var Y=!0,V=D.tryCatch(i).call(F,G,J);if(Y=!1,$&&V===c)$._rejectCallback(V.e,!0,!0),$=null;function G(B){if(!$)return;$._resolveCallback(B),$=null}function J(B){if(!$)return;$._rejectCallback(B,Y,!0),$=null}return Q}return f}});var Ei=L((AD1,Ci)=>{Ci.exports=function(n,U,D,c,g){var f=Q1(),h=f.isArray;function W(x){switch(x){case-2:return[];case-3:return{}}}function T(x){var y=this._promise=new n(U);if(x instanceof n)y._propagateFrom(x,3);y._setOnCancel(this),this._values=x,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return f.inherits(T,g),T.prototype.length=function(){return this._length},T.prototype.promise=function(){return this._promise},T.prototype._init=function x(y,F){var i=D(this._values,this._promise);if(i instanceof n){i=i._target();var X=i._bitField;if(this._values=i,(X&50397184)===0)return this._promise._setAsyncGuaranteed(),i._then(x,this._reject,void 0,this,F);else if((X&33554432)!==0)i=i._value();else if((X&16777216)!==0)return this._reject(i._reason());else return this._cancel()}if(i=f.asArray(i),i===null){var $=c("expecting an array or an iterable object but got "+f.classString(i)).reason();this._promise._rejectCallback($,!1);return}if(i.length===0){if(F===-5)this._resolveEmptyArray();else this._resolve(W(F));return}this._iterate(i)},T.prototype._iterate=function(x){var y=this.getActualLength(x.length);this._length=y,this._values=this.shouldCopyValues()?Array(y):this._values;var F=this._promise,i=!1,X=null;for(var $=0;$<y;++$){var Q=D(x[$],F);if(Q instanceof n)Q=Q._target(),X=Q._bitField;else X=null;if(i){if(X!==null)Q.suppressUnhandledRejections()}else if(X!==null)if((X&50397184)===0)Q._proxy(this,$),this._values[$]=Q;else if((X&33554432)!==0)i=this._promiseFulfilled(Q._value(),$);else if((X&16777216)!==0)i=this._promiseRejected(Q._reason(),$);else i=this._promiseCancelled($);else i=this._promiseFulfilled(Q,$)}if(!i)F._setAsyncGuaranteed()},T.prototype._isResolved=function(){return this._values===null},T.prototype._resolve=function(x){this._values=null,this._promise._fulfill(x)},T.prototype._cancel=function(){if(this._isResolved()||!this._promise._isCancellable())return;this._values=null,this._promise._cancel()},T.prototype._reject=function(x){this._values=null,this._promise._rejectCallback(x,!1)},T.prototype._promiseFulfilled=function(x,y){this._values[y]=x;var F=++this._totalResolved;if(F>=this._length)return this._resolve(this._values),!0;return!1},T.prototype._promiseCancelled=function(){return this._cancel(),!0},T.prototype._promiseRejected=function(x){return this._totalResolved++,this._reject(x),!0},T.prototype._resultCancelled=function(){if(this._isResolved())return;var x=this._values;if(this._cancel(),x instanceof n)x.cancel();else for(var y=0;y<x.length;++y)if(x[y]instanceof n)x[y].cancel()},T.prototype.shouldCopyValues=function(){return!0},T.prototype.getActualLength=function(x){return x},T}});var ji=L((HD1,wi)=>{wi.exports=function(n){var U=!1,D=[];n.prototype._promiseCreated=function(){},n.prototype._pushContext=function(){},n.prototype._popContext=function(){return null},n._peekContext=n.prototype._peekContext=function(){};function c(){this._trace=new c.CapturedTrace(f())}c.prototype._pushContext=function(){if(this._trace!==void 0)this._trace._promiseCreated=null,D.push(this._trace)},c.prototype._popContext=function(){if(this._trace!==void 0){var h=D.pop(),W=h._promiseCreated;return h._promiseCreated=null,W}return null};function g(){if(U)return new c}function f(){var h=D.length-1;if(h>=0)return D[h];return}return c.CapturedTrace=null,c.create=g,c.deactivateLongStackTraces=function(){},c.activateLongStackTraces=function(){var h=n.prototype._pushContext,W=n.prototype._popContext,T=n._peekContext,x=n.prototype._peekContext,y=n.prototype._promiseCreated;c.deactivateLongStackTraces=function(){n.prototype._pushContext=h,n.prototype._popContext=W,n._peekContext=T,n.prototype._peekContext=x,n.prototype._promiseCreated=y,U=!1},U=!0,n.prototype._pushContext=c.prototype._pushContext,n.prototype._popContext=c.prototype._popContext,n._peekContext=n.prototype._peekContext=f,n.prototype._promiseCreated=function(){var F=this._peekContext();if(F&&F._promiseCreated==null)F._promiseCreated=this}},c}});var _i=L((LD1,Ii)=>{Ii.exports=function(n,U){var{_getDomain:D,_async:c}=n,g=q2().Warning,f=Q1(),h=f.canAttachTrace,W,T,x=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,y=/\((?:timers\.js):\d+:\d+\)/,F=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,i=null,X=null,$=!1,Q,Y=!!(f.env("BLUEBIRD_DEBUG")!=0&&(f.env("BLUEBIRD_DEBUG")||f.env("NODE_ENV")==="development")),V=!!(f.env("BLUEBIRD_WARNINGS")!=0&&(Y||f.env("BLUEBIRD_WARNINGS"))),G=!!(f.env("BLUEBIRD_LONG_STACK_TRACES")!=0&&(Y||f.env("BLUEBIRD_LONG_STACK_TRACES"))),J=f.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(V||!!f.env("BLUEBIRD_W_FORGOTTEN_RETURN"));n.prototype.suppressUnhandledRejections=function(){var j=this._target();j._bitField=j._bitField&-1048577|524288},n.prototype._ensurePossibleRejectionHandled=function(){if((this._bitField&524288)!==0)return;this._setRejectionIsUnhandled(),c.invokeLater(this._notifyUnhandledRejection,this,void 0)},n.prototype._notifyUnhandledRejectionIsHandled=function(){I("rejectionHandled",W,void 0,this)},n.prototype._setReturnedNonUndefined=function(){this._bitField=this._bitField|268435456},n.prototype._returnedNonUndefined=function(){return(this._bitField&268435456)!==0},n.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var j=this._settledValue();this._setUnhandledRejectionIsNotified(),I("unhandledRejection",T,j,this)}},n.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=this._bitField|262144},n.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},n.prototype._isUnhandledRejectionNotified=function(){return(this._bitField&262144)>0},n.prototype._setRejectionIsUnhandled=function(){this._bitField=this._bitField|1048576},n.prototype._unsetRejectionIsUnhandled=function(){if(this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified())this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled()},n.prototype._isRejectionUnhandled=function(){return(this._bitField&1048576)>0},n.prototype._warn=function(j,S,k){return h1(j,S,k||this)},n.onPossiblyUnhandledRejection=function(j){var S=D();T=typeof j==="function"?S===null?j:f.domainBind(S,j):void 0},n.onUnhandledRejectionHandled=function(j){var S=D();W=typeof j==="function"?S===null?j:f.domainBind(S,j):void 0};var B=function(){};n.longStackTraces=function(){if(c.haveItemsQueued()&&!_1.longStackTraces)throw Error(`cannot enable long stack traces after promises have been created
|
|
28
|
+
|
|
29
|
+
See http://goo.gl/MqrFmX
|
|
30
|
+
`);if(!_1.longStackTraces&&t()){var j=n.prototype._captureStackTrace,S=n.prototype._attachExtraTrace;_1.longStackTraces=!0,B=function(){if(c.haveItemsQueued()&&!_1.longStackTraces)throw Error(`cannot enable long stack traces after promises have been created
|
|
31
|
+
|
|
32
|
+
See http://goo.gl/MqrFmX
|
|
33
|
+
`);n.prototype._captureStackTrace=j,n.prototype._attachExtraTrace=S,U.deactivateLongStackTraces(),c.enableTrampoline(),_1.longStackTraces=!1},n.prototype._captureStackTrace=N,n.prototype._attachExtraTrace=R,U.activateLongStackTraces(),c.disableTrampolineIfNecessary()}},n.hasLongStackTraces=function(){return _1.longStackTraces&&t()};var z=function(){try{if(typeof CustomEvent==="function"){var j=new CustomEvent("CustomEvent");return f.global.dispatchEvent(j),function(S,k){var m=new CustomEvent(S.toLowerCase(),{detail:k,cancelable:!0});return!f.global.dispatchEvent(m)}}else if(typeof Event==="function"){var j=new Event("CustomEvent");return f.global.dispatchEvent(j),function(k,m){var s=new Event(k.toLowerCase(),{cancelable:!0});return s.detail=m,!f.global.dispatchEvent(s)}}else{var j=document.createEvent("CustomEvent");return j.initCustomEvent("testingtheevent",!1,!0,{}),f.global.dispatchEvent(j),function(k,m){var s=document.createEvent("CustomEvent");return s.initCustomEvent(k.toLowerCase(),!1,!0,m),!f.global.dispatchEvent(s)}}}catch(S){}return function(){return!1}}(),q=function(){if(f.isNode)return function(){return process.emit.apply(process,arguments)};else{if(!f.global)return function(){return!1};return function(j){var S="on"+j.toLowerCase(),k=f.global[S];if(!k)return!1;return k.apply(f.global,[].slice.call(arguments,1)),!0}}}();function Z(j,S){return{promise:S}}var M={promiseCreated:Z,promiseFulfilled:Z,promiseRejected:Z,promiseResolved:Z,promiseCancelled:Z,promiseChained:function(j,S,k){return{promise:S,child:k}},warning:function(j,S){return{warning:S}},unhandledRejection:function(j,S,k){return{reason:S,promise:k}},rejectionHandled:Z},O=function(j){var S=!1;try{S=q.apply(null,arguments)}catch(m){c.throwLater(m),S=!0}var k=!1;try{k=z(j,M[j].apply(null,arguments))}catch(m){c.throwLater(m),k=!0}return k||S};n.config=function(j){if(j=Object(j),"longStackTraces"in j){if(j.longStackTraces)n.longStackTraces();else if(!j.longStackTraces&&n.hasLongStackTraces())B()}if("warnings"in j){var S=j.warnings;if(_1.warnings=!!S,J=_1.warnings,f.isObject(S)){if("wForgottenReturn"in S)J=!!S.wForgottenReturn}}if("cancellation"in j&&j.cancellation&&!_1.cancellation){if(c.haveItemsQueued())throw Error("cannot enable cancellation after promises are in use");n.prototype._clearCancellationData=p,n.prototype._propagateFrom=b,n.prototype._onCancel=v,n.prototype._setOnCancel=P,n.prototype._attachCancellationCallback=H,n.prototype._execute=w,A=b,_1.cancellation=!0}if("monitoring"in j){if(j.monitoring&&!_1.monitoring)_1.monitoring=!0,n.prototype._fireEvent=O;else if(!j.monitoring&&_1.monitoring)_1.monitoring=!1,n.prototype._fireEvent=_}return n};function _(){return!1}n.prototype._fireEvent=_,n.prototype._execute=function(j,S,k){try{j(S,k)}catch(m){return m}},n.prototype._onCancel=function(){},n.prototype._setOnCancel=function(j){},n.prototype._attachCancellationCallback=function(j){},n.prototype._captureStackTrace=function(){},n.prototype._attachExtraTrace=function(){},n.prototype._clearCancellationData=function(){},n.prototype._propagateFrom=function(j,S){};function w(j,S,k){var m=this;try{j(S,k,function(s){if(typeof s!=="function")throw TypeError("onCancel must be a function, got: "+f.toString(s));m._attachCancellationCallback(s)})}catch(s){return s}}function H(j){if(!this._isCancellable())return this;var S=this._onCancel();if(S!==void 0)if(f.isArray(S))S.push(j);else this._setOnCancel([S,j]);else this._setOnCancel(j)}function v(){return this._onCancelField}function P(j){this._onCancelField=j}function p(){this._cancellationParent=void 0,this._onCancelField=void 0}function b(j,S){if((S&1)!==0){this._cancellationParent=j;var k=j._branchesRemainingToCancel;if(k===void 0)k=0;j._branchesRemainingToCancel=k+1}if((S&2)!==0&&j._isBound())this._setBoundTo(j._boundTo)}function C(j,S){if((S&2)!==0&&j._isBound())this._setBoundTo(j._boundTo)}var A=C;function E(){var j=this._boundTo;if(j!==void 0){if(j instanceof n)if(j.isFulfilled())return j.value();else return}return j}function N(){this._trace=new m1(this._peekContext())}function R(j,S){if(h(j)){var k=this._trace;if(k!==void 0){if(S)k=k._parent}if(k!==void 0)k.attachExtraTrace(j);else if(!j.__stackCleaned__){var m=hD(j);f.notEnumerableProp(j,"stack",m.message+`
|
|
34
|
+
`+m.stack.join(`
|
|
35
|
+
`)),f.notEnumerableProp(j,"__stackCleaned__",!0)}}}function a(j,S,k,m,s){if(j===void 0&&S!==null&&J){if(s!==void 0&&s._returnedNonUndefined())return;if((m._bitField&65535)===0)return;if(k)k=k+" ";var E1="",Y1="";if(S._trace){var D1=S._trace.stack.split(`
|
|
36
|
+
`),O1=tn(D1);for(var S1=O1.length-1;S1>=0;--S1){var Y2=O1[S1];if(!y.test(Y2)){var B2=Y2.match(F);if(B2)E1="at "+B2[1]+":"+B2[2]+":"+B2[3]+" ";break}}if(O1.length>0){var tb=O1[0];for(var S1=0;S1<D1.length;++S1)if(D1[S1]===tb){if(S1>0)Y1=`
|
|
37
|
+
`+D1[S1-1];break}}}var eb="a promise was created in a "+k+"handler "+E1+"but was not returned from it, see http://goo.gl/rRqMUw"+Y1;m._warn(eb,!0,S)}}function r(j,S){var k=j+" is deprecated and will be removed in a future version.";if(S)k+=" Use "+S+" instead.";return h1(k)}function h1(j,S,k){if(!_1.warnings)return;var m=new g(j),s;if(S)k._attachExtraTrace(m);else if(_1.longStackTraces&&(s=n._peekContext()))s.attachExtraTrace(m);else{var E1=hD(m);m.stack=E1.message+`
|
|
38
|
+
`+E1.stack.join(`
|
|
39
|
+
`)}if(!O("warning",m))Kg(m,"",!0)}function z1(j,S){for(var k=0;k<S.length-1;++k)S[k].push("From previous event:"),S[k]=S[k].join(`
|
|
40
|
+
`);if(k<S.length)S[k]=S[k].join(`
|
|
41
|
+
`);return j+`
|
|
42
|
+
`+S.join(`
|
|
43
|
+
`)}function J1(j){for(var S=0;S<j.length;++S)if(j[S].length===0||S+1<j.length&&j[S][0]===j[S+1][0])j.splice(S,1),S--}function nn(j){var S=j[0];for(var k=1;k<j.length;++k){var m=j[k],s=S.length-1,E1=S[s],Y1=-1;for(var D1=m.length-1;D1>=0;--D1)if(m[D1]===E1){Y1=D1;break}for(var D1=Y1;D1>=0;--D1){var O1=m[D1];if(S[s]===O1)S.pop(),s--;else break}S=m}}function tn(j){var S=[];for(var k=0;k<j.length;++k){var m=j[k],s=m===" (No stack trace)"||i.test(m),E1=s&&c1(m);if(s&&!E1){if($&&m.charAt(0)!==" ")m=" "+m;S.push(m)}}return S}function d2(j){var S=j.stack.replace(/\s+$/g,"").split(`
|
|
44
|
+
`);for(var k=0;k<S.length;++k){var m=S[k];if(m===" (No stack trace)"||i.test(m))break}if(k>0&&j.name!="SyntaxError")S=S.slice(k);return S}function hD(j){var S=j.stack,k=j.toString();return S=typeof S==="string"&&S.length>0?d2(j):[" (No stack trace)"],{message:k,stack:j.name=="SyntaxError"?S:tn(S)}}function Kg(j,S,k){if(typeof console<"u"){var m;if(f.isObject(j)){var s=j.stack;m=S+X(s,j)}else m=S+String(j);if(typeof Q==="function")Q(m,k);else if(typeof console.log==="function"||typeof console.log==="object")console.log(m)}}function I(j,S,k,m){var s=!1;try{if(typeof S==="function")if(s=!0,j==="rejectionHandled")S(m);else S(k,m)}catch(E1){c.throwLater(E1)}if(j==="unhandledRejection"){if(!O(j,k,m)&&!s)Kg(k,"Unhandled rejection ")}else O(j,m)}function d(j){var S;if(typeof j==="function")S="[function "+(j.name||"anonymous")+"]";else{S=j&&typeof j.toString==="function"?j.toString():f.toString(j);var k=/\[object [a-zA-Z0-9$_]+\]/;if(k.test(S))try{var m=JSON.stringify(j);S=m}catch(s){}if(S.length===0)S="(empty array)"}return"(<"+o(S)+">, no stack trace)"}function o(j){var S=41;if(j.length<S)return j;return j.substr(0,S-3)+"..."}function t(){return typeof KU==="function"}var c1=function(){return!1},x1=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Z1(j){var S=j.match(x1);if(S)return{fileName:S[1],line:parseInt(S[2],10)}}function yn(j,S){if(!t())return;var k=j.stack.split(`
|
|
45
|
+
`),m=S.stack.split(`
|
|
46
|
+
`),s=-1,E1=-1,Y1,D1;for(var O1=0;O1<k.length;++O1){var S1=Z1(k[O1]);if(S1){Y1=S1.fileName,s=S1.line;break}}for(var O1=0;O1<m.length;++O1){var S1=Z1(m[O1]);if(S1){D1=S1.fileName,E1=S1.line;break}}if(s<0||E1<0||!Y1||!D1||Y1!==D1||s>=E1)return;c1=function(Y2){if(x.test(Y2))return!0;var B2=Z1(Y2);if(B2){if(B2.fileName===Y1&&(s<=B2.line&&B2.line<=E1))return!0}return!1}}function m1(j){this._parent=j,this._promisesCreated=0;var S=this._length=1+(j===void 0?0:j._length);if(KU(this,m1),S>32)this.uncycle()}f.inherits(m1,Error),U.CapturedTrace=m1,m1.prototype.uncycle=function(){var j=this._length;if(j<2)return;var S=[],k={};for(var m=0,s=this;s!==void 0;++m)S.push(s),s=s._parent;j=this._length=m;for(var m=j-1;m>=0;--m){var E1=S[m].stack;if(k[E1]===void 0)k[E1]=m}for(var m=0;m<j;++m){var Y1=S[m].stack,D1=k[Y1];if(D1!==void 0&&D1!==m){if(D1>0)S[D1-1]._parent=void 0,S[D1-1]._length=1;S[m]._parent=void 0,S[m]._length=1;var O1=m>0?S[m-1]:this;if(D1<j-1)O1._parent=S[D1+1],O1._parent.uncycle(),O1._length=O1._parent._length+1;else O1._parent=void 0,O1._length=1;var S1=O1._length+1;for(var Y2=m-2;Y2>=0;--Y2)S[Y2]._length=S1,S1++;return}}},m1.prototype.attachExtraTrace=function(j){if(j.__stackCleaned__)return;this.uncycle();var S=hD(j),k=S.message,m=[S.stack],s=this;while(s!==void 0)m.push(tn(s.stack.split(`
|
|
47
|
+
`))),s=s._parent;nn(m),J1(m),f.notEnumerableProp(j,"stack",z1(k,m)),f.notEnumerableProp(j,"__stackCleaned__",!0)};var KU=function(){var S=/^\s*at\s*/,k=function(Y1,D1){if(typeof Y1==="string")return Y1;if(D1.name!==void 0&&D1.message!==void 0)return D1.toString();return d(D1)};if(typeof Error.stackTraceLimit==="number"&&typeof Error.captureStackTrace==="function"){Error.stackTraceLimit+=6,i=S,X=k;var m=Error.captureStackTrace;return c1=function(Y1){return x.test(Y1)},function(Y1,D1){Error.stackTraceLimit+=6,m(Y1,D1),Error.stackTraceLimit-=6}}var s=Error();if(typeof s.stack==="string"&&s.stack.split(`
|
|
48
|
+
`)[0].indexOf("stackDetection@")>=0)return i=/@/,X=k,$=!0,function(D1){D1.stack=Error().stack};var E1;try{throw Error()}catch(Y1){E1="stack"in Y1}if(!("stack"in s)&&E1&&typeof Error.stackTraceLimit==="number")return i=S,X=k,function(D1){Error.stackTraceLimit+=6;try{throw Error()}catch(O1){D1.stack=O1.stack}Error.stackTraceLimit-=6};return X=function(Y1,D1){if(typeof Y1==="string")return Y1;if((typeof D1==="object"||typeof D1==="function")&&D1.name!==void 0&&D1.message!==void 0)return D1.toString();return d(D1)},null}([]);if(typeof console<"u"&&typeof console.warn<"u"){if(Q=function(j){console.warn(j)},f.isNode&&process.stderr.isTTY)Q=function(j,S){var k=S?"\x1B[33m":"\x1B[31m";console.warn(k+j+`\x1B[0m
|
|
49
|
+
`)};else if(!f.isNode&&typeof Error().stack==="string")Q=function(j,S){console.warn("%c"+j,S?"color: darkorange":"color: red")}}var _1={warnings:V,longStackTraces:!1,cancellation:!1,monitoring:!1};if(G)n.longStackTraces();return{longStackTraces:function(){return _1.longStackTraces},warnings:function(){return _1.warnings},cancellation:function(){return _1.cancellation},monitoring:function(){return _1.monitoring},propagateFromFunction:function(){return A},boundValueFunction:function(){return E},checkForgottenReturns:a,setBounds:yn,warn:h1,deprecated:r,CapturedTrace:m1,fireDomEvent:z,fireGlobalEvent:q}}});var vi=L((CD1,Si)=>{Si.exports=function(n,U){var D=Q1(),c=n.CancellationError,g=D.errorObj;function f(F,i,X){this.promise=F,this.type=i,this.handler=X,this.called=!1,this.cancelPromise=null}f.prototype.isFinallyHandler=function(){return this.type===0};function h(F){this.finallyHandler=F}h.prototype._resultCancelled=function(){W(this.finallyHandler)};function W(F,i){if(F.cancelPromise!=null){if(arguments.length>1)F.cancelPromise._reject(i);else F.cancelPromise._cancel();return F.cancelPromise=null,!0}return!1}function T(){return y.call(this,this.promise._target()._settledValue())}function x(F){if(W(this,F))return;return g.e=F,g}function y(F){var i=this.promise,X=this.handler;if(!this.called){this.called=!0;var $=this.isFinallyHandler()?X.call(i._boundValue()):X.call(i._boundValue(),F);if($!==void 0){i._setReturnedNonUndefined();var Q=U($,i);if(Q instanceof n){if(this.cancelPromise!=null){if(Q._isCancelled()){var Y=new c("late cancellation observer");return i._attachExtraTrace(Y),g.e=Y,g}else if(Q.isPending())Q._attachCancellationCallback(new h(this))}return Q._then(T,x,void 0,this,void 0)}}}if(i.isRejected())return W(this),g.e=F,g;else return W(this),F}return n.prototype._passThrough=function(F,i,X,$){if(typeof F!=="function")return this.then();return this._then(X,$,void 0,new f(this,i,F),void 0)},n.prototype.lastly=n.prototype.finally=function(F){return this._passThrough(F,0,y,y)},n.prototype.tap=function(F){return this._passThrough(F,1,y)},f}});var Pi=L((ED1,Ni)=>{Ni.exports=function(n){var U=Q1(),D=_U().keys,c=U.tryCatch,g=U.errorObj;function f(h,W,T){return function(x){var y=T._boundValue();n:for(var F=0;F<h.length;++F){var i=h[F];if(i===Error||i!=null&&i.prototype instanceof Error){if(x instanceof i)return c(W).call(y,x)}else if(typeof i==="function"){var X=c(i).call(y,x);if(X===g)return X;else if(X)return c(W).call(y,x)}else if(U.isObject(x)){var $=D(i);for(var Q=0;Q<$.length;++Q){var Y=$[Q];if(i[Y]!=x[Y])continue n}return c(W).call(y,x)}}return n}}return f}});var M6=L((wD1,di)=>{var Ri=Q1(),BE=Ri.maybeWrapAsError,GE=q2(),KE=GE.OperationalError,ui=_U();function ZE(n){return n instanceof Error&&ui.getPrototypeOf(n)===Error.prototype}var bE=/^(?:name|message|stack|cause)$/;function zE(n){var U;if(ZE(n)){U=new KE(n),U.name=n.name,U.message=n.message,U.stack=n.stack;var D=ui.keys(n);for(var c=0;c<D.length;++c){var g=D[c];if(!bE.test(g))U[g]=n[g]}return U}return Ri.markAsOriginatingFromRejection(n),n}function OE(n,U){return function(D,c){if(n===null)return;if(D){var g=zE(BE(D));n._attachExtraTrace(g),n._reject(g)}else if(!U)n._fulfill(c);else{var f=arguments.length,h=Array(Math.max(f-1,0));for(var W=1;W<f;++W)h[W-1]=arguments[W];n._fulfill(h)}n=null}}di.exports=OE});var pi=L((jD1,ki)=>{ki.exports=function(n,U,D,c,g){var f=Q1(),h=f.tryCatch;n.method=function(W){if(typeof W!=="function")throw new n.TypeError("expecting a function but got "+f.classString(W));return function(){var T=new n(U);T._captureStackTrace(),T._pushContext();var x=h(W).apply(this,arguments),y=T._popContext();return g.checkForgottenReturns(x,y,"Promise.method",T),T._resolveFromSyncValue(x),T}},n.attempt=n.try=function(W){if(typeof W!=="function")return c("expecting a function but got "+f.classString(W));var T=new n(U);T._captureStackTrace(),T._pushContext();var x;if(arguments.length>1){g.deprecated("calling Promise.try with more than 1 argument");var y=arguments[1],F=arguments[2];x=f.isArray(y)?h(W).apply(F,y):h(W).call(F,y)}else x=h(W)();var i=T._popContext();return g.checkForgottenReturns(x,i,"Promise.try",T),T._resolveFromSyncValue(x),T},n.prototype._resolveFromSyncValue=function(W){if(W===f.errorObj)this._rejectCallback(W.e,!1);else this._resolveCallback(W,!0)}}});var ai=L((ID1,mi)=>{mi.exports=function(n,U,D,c){var g=!1,f=function(x,y){this._reject(y)},h=function(x,y){y.promiseRejectionQueued=!0,y.bindingPromise._then(f,f,null,this,x)},W=function(x,y){if((this._bitField&50397184)===0)this._resolveCallback(y.target)},T=function(x,y){if(!y.promiseRejectionQueued)this._reject(x)};n.prototype.bind=function(x){if(!g)g=!0,n.prototype._propagateFrom=c.propagateFromFunction(),n.prototype._boundValue=c.boundValueFunction();var y=D(x),F=new n(U);F._propagateFrom(this,1);var i=this._target();if(F._setBoundTo(y),y instanceof n){var X={promiseRejectionQueued:!1,promise:F,target:i,bindingPromise:y};i._then(U,h,void 0,F,X),y._then(W,T,void 0,F,X),F._setOnCancel(y)}else F._resolveCallback(i);return F},n.prototype._setBoundTo=function(x){if(x!==void 0)this._bitField=this._bitField|2097152,this._boundTo=x;else this._bitField=this._bitField&-2097153},n.prototype._isBound=function(){return(this._bitField&2097152)===2097152},n.bind=function(x,y){return n.resolve(y).bind(x)}}});var ri=L((_D1,oi)=>{oi.exports=function(n,U,D,c){var g=Q1(),f=g.tryCatch,h=g.errorObj,W=n._async;n.prototype.break=n.prototype.cancel=function(){if(!c.cancellation())return this._warn("cancellation is disabled");var T=this,x=T;while(T._isCancellable()){if(!T._cancelBy(x)){if(x._isFollowing())x._followee().cancel();else x._cancelBranched();break}var y=T._cancellationParent;if(y==null||!y._isCancellable()){if(T._isFollowing())T._followee().cancel();else T._cancelBranched();break}else{if(T._isFollowing())T._followee().cancel();T._setWillBeCancelled(),x=T,T=y}}},n.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},n.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||this._branchesRemainingToCancel<=0},n.prototype._cancelBy=function(T){if(T===this)return this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0;else if(this._branchHasCancelled(),this._enoughBranchesHaveCancelled())return this._invokeOnCancel(),!0;return!1},n.prototype._cancelBranched=function(){if(this._enoughBranchesHaveCancelled())this._cancel()},n.prototype._cancel=function(){if(!this._isCancellable())return;this._setCancelled(),W.invoke(this._cancelPromises,this,void 0)},n.prototype._cancelPromises=function(){if(this._length()>0)this._settlePromises()},n.prototype._unsetOnCancel=function(){this._onCancelField=void 0},n.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},n.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},n.prototype._doInvokeOnCancel=function(T,x){if(g.isArray(T))for(var y=0;y<T.length;++y)this._doInvokeOnCancel(T[y],x);else if(T!==void 0)if(typeof T==="function"){if(!x){var F=f(T).call(this._boundValue());if(F===h)this._attachExtraTrace(F.e),W.throwLater(F.e)}}else T._resultCancelled(this)},n.prototype._invokeOnCancel=function(){var T=this._onCancel();this._unsetOnCancel(),W.invoke(this._doInvokeOnCancel,this,T)},n.prototype._invokeInternalOnCancel=function(){if(this._isCancellable())this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel()},n.prototype._resultCancelled=function(){this.cancel()}}});var ti=L((SD1,li)=>{li.exports=function(n){function U(){return this.value}function D(){throw this.reason}n.prototype.return=n.prototype.thenReturn=function(c){if(c instanceof n)c.suppressUnhandledRejections();return this._then(U,void 0,void 0,{value:c},void 0)},n.prototype.throw=n.prototype.thenThrow=function(c){return this._then(D,void 0,void 0,{reason:c},void 0)},n.prototype.catchThrow=function(c){if(arguments.length<=1)return this._then(void 0,D,void 0,{reason:c},void 0);else{var g=arguments[1],f=function(){throw g};return this.caught(c,f)}},n.prototype.catchReturn=function(c){if(arguments.length<=1){if(c instanceof n)c.suppressUnhandledRejections();return this._then(void 0,U,void 0,{value:c},void 0)}else{var g=arguments[1];if(g instanceof n)g.suppressUnhandledRejections();var f=function(){return g};return this.caught(c,f)}}}});var si=L((vD1,ei)=>{ei.exports=function(n){function U(T){if(T!==void 0)T=T._target(),this._bitField=T._bitField,this._settledValueField=T._isFateSealed()?T._settledValue():void 0;else this._bitField=0,this._settledValueField=void 0}U.prototype._settledValue=function(){return this._settledValueField};var D=U.prototype.value=function(){if(!this.isFulfilled())throw TypeError(`cannot get fulfillment value of a non-fulfilled promise
|
|
50
|
+
|
|
51
|
+
See http://goo.gl/MqrFmX
|
|
52
|
+
`);return this._settledValue()},c=U.prototype.error=U.prototype.reason=function(){if(!this.isRejected())throw TypeError(`cannot get rejection reason of a non-rejected promise
|
|
53
|
+
|
|
54
|
+
See http://goo.gl/MqrFmX
|
|
55
|
+
`);return this._settledValue()},g=U.prototype.isFulfilled=function(){return(this._bitField&33554432)!==0},f=U.prototype.isRejected=function(){return(this._bitField&16777216)!==0},h=U.prototype.isPending=function(){return(this._bitField&50397184)===0},W=U.prototype.isResolved=function(){return(this._bitField&50331648)!==0};U.prototype.isCancelled=function(){return(this._bitField&8454144)!==0},n.prototype.__isCancelled=function(){return(this._bitField&65536)===65536},n.prototype._isCancelled=function(){return this._target().__isCancelled()},n.prototype.isCancelled=function(){return(this._target()._bitField&8454144)!==0},n.prototype.isPending=function(){return h.call(this._target())},n.prototype.isRejected=function(){return f.call(this._target())},n.prototype.isFulfilled=function(){return g.call(this._target())},n.prototype.isResolved=function(){return W.call(this._target())},n.prototype.value=function(){return D.call(this._target())},n.prototype.reason=function(){var T=this._target();return T._unsetRejectionIsUnhandled(),c.call(T)},n.prototype._value=function(){return this._settledValue()},n.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},n.PromiseInspection=U}});var UX=L((ND1,nX)=>{nX.exports=function(n,U,D,c,g,f){var h=Q1(),W=h.canEvaluate,T=h.tryCatch,x=h.errorObj,y;if(W){var F=function(G){return Function("value","holder",`
|
|
56
|
+
'use strict';
|
|
57
|
+
holder.pIndex = value;
|
|
58
|
+
holder.checkFulfillment(this);
|
|
59
|
+
`.replace(/Index/g,G))},i=function(G){return Function("promise","holder",`
|
|
60
|
+
'use strict';
|
|
61
|
+
holder.pIndex = promise;
|
|
62
|
+
`.replace(/Index/g,G))},X=function(G){var J=Array(G);for(var B=0;B<J.length;++B)J[B]="this.p"+(B+1);var z=J.join(" = ")+" = null;",q=`var promise;
|
|
63
|
+
`+J.map(function(_){return`
|
|
64
|
+
promise = `+_+`;
|
|
65
|
+
if (promise instanceof Promise) {
|
|
66
|
+
promise.cancel();
|
|
67
|
+
}
|
|
68
|
+
`}).join(`
|
|
69
|
+
`),Z=J.join(", "),M="Holder$"+G,O=`return function(tryCatch, errorObj, Promise, async) {
|
|
70
|
+
'use strict';
|
|
71
|
+
function [TheName](fn) {
|
|
72
|
+
[TheProperties]
|
|
73
|
+
this.fn = fn;
|
|
74
|
+
this.asyncNeeded = true;
|
|
75
|
+
this.now = 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
[TheName].prototype._callFunction = function(promise) {
|
|
79
|
+
promise._pushContext();
|
|
80
|
+
var ret = tryCatch(this.fn)([ThePassedArguments]);
|
|
81
|
+
promise._popContext();
|
|
82
|
+
if (ret === errorObj) {
|
|
83
|
+
promise._rejectCallback(ret.e, false);
|
|
84
|
+
} else {
|
|
85
|
+
promise._resolveCallback(ret);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
[TheName].prototype.checkFulfillment = function(promise) {
|
|
90
|
+
var now = ++this.now;
|
|
91
|
+
if (now === [TheTotal]) {
|
|
92
|
+
if (this.asyncNeeded) {
|
|
93
|
+
async.invoke(this._callFunction, this, promise);
|
|
94
|
+
} else {
|
|
95
|
+
this._callFunction(promise);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
[TheName].prototype._resultCancelled = function() {
|
|
102
|
+
[CancellationCode]
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
return [TheName];
|
|
106
|
+
}(tryCatch, errorObj, Promise, async);
|
|
107
|
+
`;return O=O.replace(/\[TheName\]/g,M).replace(/\[TheTotal\]/g,G).replace(/\[ThePassedArguments\]/g,Z).replace(/\[TheProperties\]/g,z).replace(/\[CancellationCode\]/g,q),Function("tryCatch","errorObj","Promise","async",O)(T,x,n,g)},$=[],Q=[],Y=[];for(var V=0;V<8;++V)$.push(X(V+1)),Q.push(F(V+1)),Y.push(i(V+1));y=function(G){this._reject(G)}}n.join=function(){var G=arguments.length-1,J;if(G>0&&typeof arguments[G]==="function"){if(J=arguments[G],G<=8&&W){var P=new n(c);P._captureStackTrace();var B=$[G-1],z=new B(J),q=Q;for(var Z=0;Z<G;++Z){var M=D(arguments[Z],P);if(M instanceof n){M=M._target();var O=M._bitField;if((O&50397184)===0)M._then(q[Z],y,void 0,P,z),Y[Z](M,z),z.asyncNeeded=!1;else if((O&33554432)!==0)q[Z].call(P,M._value(),z);else if((O&16777216)!==0)P._reject(M._reason());else P._cancel()}else q[Z].call(P,M,z)}if(!P._isFateSealed()){if(z.asyncNeeded){var _=f();if(_!==null)z.fn=h.domainBind(_,z.fn)}P._setAsyncGuaranteed(),P._setOnCancel(z)}return P}}var w=arguments.length,H=Array(w);for(var v=0;v<w;++v)H[v]=arguments[v];if(J)H.pop();var P=new U(H).promise();return J!==void 0?P.spread(J):P}}});var cX=L((PD1,DX)=>{DX.exports=function(n,U,D,c,g,f){var h=n._getDomain,W=Q1(),T=W.tryCatch,x=W.errorObj,y=n._async;function F(X,$,Q,Y){this.constructor$(X),this._promise._captureStackTrace();var V=h();this._callback=V===null?$:W.domainBind(V,$),this._preservedValues=Y===g?Array(this.length()):null,this._limit=Q,this._inFlight=0,this._queue=[],y.invoke(this._asyncInit,this,void 0)}W.inherits(F,U),F.prototype._asyncInit=function(){this._init$(void 0,-2)},F.prototype._init=function(){},F.prototype._promiseFulfilled=function(X,$){var Q=this._values,Y=this.length(),V=this._preservedValues,G=this._limit;if($<0){if($=$*-1-1,Q[$]=X,G>=1){if(this._inFlight--,this._drainQueue(),this._isResolved())return!0}}else{if(G>=1&&this._inFlight>=G)return Q[$]=X,this._queue.push($),!1;if(V!==null)V[$]=X;var J=this._promise,B=this._callback,z=J._boundValue();J._pushContext();var q=T(B).call(z,X,$,Y),Z=J._popContext();if(f.checkForgottenReturns(q,Z,V!==null?"Promise.filter":"Promise.map",J),q===x)return this._reject(q.e),!0;var M=c(q,this._promise);if(M instanceof n){M=M._target();var O=M._bitField;if((O&50397184)===0){if(G>=1)this._inFlight++;return Q[$]=M,M._proxy(this,($+1)*-1),!1}else if((O&33554432)!==0)q=M._value();else if((O&16777216)!==0)return this._reject(M._reason()),!0;else return this._cancel(),!0}Q[$]=q}var _=++this._totalResolved;if(_>=Y){if(V!==null)this._filter(Q,V);else this._resolve(Q);return!0}return!1},F.prototype._drainQueue=function(){var X=this._queue,$=this._limit,Q=this._values;while(X.length>0&&this._inFlight<$){if(this._isResolved())return;var Y=X.pop();this._promiseFulfilled(Q[Y],Y)}},F.prototype._filter=function(X,$){var Q=$.length,Y=Array(Q),V=0;for(var G=0;G<Q;++G)if(X[G])Y[V++]=$[G];Y.length=V,this._resolve(Y)},F.prototype.preservedValues=function(){return this._preservedValues};function i(X,$,Q,Y){if(typeof $!=="function")return D("expecting a function but got "+W.classString($));var V=0;if(Q!==void 0)if(typeof Q==="object"&&Q!==null){if(typeof Q.concurrency!=="number")return n.reject(TypeError("'concurrency' must be a number but it is "+W.classString(Q.concurrency)));V=Q.concurrency}else return n.reject(TypeError("options argument must be an object but it is "+W.classString(Q)));return V=typeof V==="number"&&isFinite(V)&&V>=1?V:0,new F(X,$,V,Y).promise()}n.prototype.map=function(X,$){return i(this,X,$,null)},n.map=function(X,$,Q,Y){return i(X,$,Q,Y)}}});var fX=L((RD1,gX)=>{var A6=Object.create;if(A6)u8=A6(null),d8=A6(null),u8[" size"]=d8[" size"]=0;var u8,d8;gX.exports=function(n){var U=Q1(),D=U.canEvaluate,c=U.isIdentifier,g,f,h=function(X){return Function("ensureMethod",`
|
|
108
|
+
return function(obj) {
|
|
109
|
+
'use strict'
|
|
110
|
+
var len = this.length;
|
|
111
|
+
ensureMethod(obj, 'methodName');
|
|
112
|
+
switch(len) {
|
|
113
|
+
case 1: return obj.methodName(this[0]);
|
|
114
|
+
case 2: return obj.methodName(this[0], this[1]);
|
|
115
|
+
case 3: return obj.methodName(this[0], this[1], this[2]);
|
|
116
|
+
case 0: return obj.methodName();
|
|
117
|
+
default:
|
|
118
|
+
return obj.methodName.apply(obj, this);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
`.replace(/methodName/g,X))(x)},W=function(X){return Function("obj",`
|
|
122
|
+
'use strict';
|
|
123
|
+
return obj.propertyName;
|
|
124
|
+
`.replace("propertyName",X))},T=function(X,$,Q){var Y=Q[X];if(typeof Y!=="function"){if(!c(X))return null;if(Y=$(X),Q[X]=Y,Q[" size"]++,Q[" size"]>512){var V=Object.keys(Q);for(var G=0;G<256;++G)delete Q[V[G]];Q[" size"]=V.length-256}}return Y};g=function(X){return T(X,h,u8)},f=function(X){return T(X,W,d8)};function x(X,$){var Q;if(X!=null)Q=X[$];if(typeof Q!=="function"){var Y="Object "+U.classString(X)+" has no method '"+U.toString($)+"'";throw new n.TypeError(Y)}return Q}function y(X){var $=this.pop(),Q=x(X,$);return Q.apply(X,this)}n.prototype.call=function(X){var $=arguments.length,Q=Array(Math.max($-1,0));for(var Y=1;Y<$;++Y)Q[Y-1]=arguments[Y];if(D){var V=g(X);if(V!==null)return this._then(V,void 0,void 0,Q,void 0)}return Q.push(X),this._then(y,void 0,void 0,Q,void 0)};function F(X){return X[this]}function i(X){var $=+this;if($<0)$=Math.max(0,$+X.length);return X[$]}n.prototype.get=function(X){var $=typeof X==="number",Q;if(!$)if(D){var Y=f(X);Q=Y!==null?Y:F}else Q=F;else Q=i;return this._then(Q,void 0,void 0,X,void 0)}}});var WX=L((uD1,hX)=>{hX.exports=function(n,U,D,c,g,f){var h=Q1(),W=q2().TypeError,T=Q1().inherits,x=h.errorObj,y=h.tryCatch,F={};function i(J){setTimeout(function(){throw J},0)}function X(J){var B=D(J);if(B!==J&&typeof J._isDisposable==="function"&&typeof J._getDisposer==="function"&&J._isDisposable())B._setDisposable(J._getDisposer());return B}function $(J,B){var z=0,q=J.length,Z=new n(g);function M(){if(z>=q)return Z._fulfill();var O=X(J[z++]);if(O instanceof n&&O._isDisposable()){try{O=D(O._getDisposer().tryDispose(B),J.promise)}catch(_){return i(_)}if(O instanceof n)return O._then(M,i,null,null,null)}M()}return M(),Z}function Q(J,B,z){this._data=J,this._promise=B,this._context=z}Q.prototype.data=function(){return this._data},Q.prototype.promise=function(){return this._promise},Q.prototype.resource=function(){if(this.promise().isFulfilled())return this.promise().value();return F},Q.prototype.tryDispose=function(J){var B=this.resource(),z=this._context;if(z!==void 0)z._pushContext();var q=B!==F?this.doDispose(B,J):null;if(z!==void 0)z._popContext();return this._promise._unsetDisposable(),this._data=null,q},Q.isDisposer=function(J){return J!=null&&typeof J.resource==="function"&&typeof J.tryDispose==="function"};function Y(J,B,z){this.constructor$(J,B,z)}T(Y,Q),Y.prototype.doDispose=function(J,B){var z=this.data();return z.call(J,J,B)};function V(J){if(Q.isDisposer(J))return this.resources[this.index]._setDisposable(J),J.promise();return J}function G(J){this.length=J,this.promise=null,this[J-1]=null}G.prototype._resultCancelled=function(){var J=this.length;for(var B=0;B<J;++B){var z=this[B];if(z instanceof n)z.cancel()}},n.using=function(){var J=arguments.length;if(J<2)return U("you must pass at least 2 arguments to Promise.using");var B=arguments[J-1];if(typeof B!=="function")return U("expecting a function but got "+h.classString(B));var z,q=!0;if(J===2&&Array.isArray(arguments[0]))z=arguments[0],J=z.length,q=!1;else z=arguments,J--;var Z=new G(J);for(var M=0;M<J;++M){var O=z[M];if(Q.isDisposer(O)){var _=O;O=O.promise(),O._setDisposable(_)}else{var w=D(O);if(w instanceof n)O=w._then(V,null,null,{resources:Z,index:M},void 0)}Z[M]=O}var H=Array(Z.length);for(var M=0;M<H.length;++M)H[M]=n.resolve(Z[M]).reflect();var v=n.all(H).then(function(p){for(var b=0;b<p.length;++b){var C=p[b];if(C.isRejected())return x.e=C.error(),x;else if(!C.isFulfilled()){v.cancel();return}p[b]=C.value()}P._pushContext(),B=y(B);var A=q?B.apply(void 0,p):B(p),E=P._popContext();return f.checkForgottenReturns(A,E,"Promise.using",P),A}),P=v.lastly(function(){var p=new n.PromiseInspection(v);return $(Z,p)});return Z.promise=P,P._setOnCancel(Z),P},n.prototype._setDisposable=function(J){this._bitField=this._bitField|131072,this._disposer=J},n.prototype._isDisposable=function(){return(this._bitField&131072)>0},n.prototype._getDisposer=function(){return this._disposer},n.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},n.prototype.disposer=function(J){if(typeof J==="function")return new Y(J,this,c());throw new W}}});var TX=L((dD1,xX)=>{xX.exports=function(n,U,D){var c=Q1(),g=n.TimeoutError;function f(F){this.handle=F}f.prototype._resultCancelled=function(){clearTimeout(this.handle)};var h=function(F){return W(+this).thenReturn(F)},W=n.delay=function(F,i){var X,$;if(i!==void 0){if(X=n.resolve(i)._then(h,null,null,F,void 0),D.cancellation()&&i instanceof n)X._setOnCancel(i)}else{if(X=new n(U),$=setTimeout(function(){X._fulfill()},+F),D.cancellation())X._setOnCancel(new f($));X._captureStackTrace()}return X._setAsyncGuaranteed(),X};n.prototype.delay=function(F){return W(F,this)};var T=function(F,i,X){var $;if(typeof i!=="string")if(i instanceof Error)$=i;else $=new g("operation timed out");else $=new g(i);if(c.markAsOriginatingFromRejection($),F._attachExtraTrace($),F._reject($),X!=null)X.cancel()};function x(F){return clearTimeout(this.handle),F}function y(F){throw clearTimeout(this.handle),F}n.prototype.timeout=function(F,i){F=+F;var X,$,Q=new f(setTimeout(function(){if(X.isPending())T(X,i,$)},F));if(D.cancellation())$=this.then(),X=$._then(x,y,void 0,Q,void 0),X._setOnCancel(Q);else X=this._then(x,y,void 0,Q,void 0);return X}}});var FX=L((kD1,yX)=>{yX.exports=function(n,U,D,c,g,f){var h=q2(),W=h.TypeError,T=Q1(),x=T.errorObj,y=T.tryCatch,F=[];function i($,Q,Y){for(var V=0;V<Q.length;++V){Y._pushContext();var G=y(Q[V])($);if(Y._popContext(),G===x){Y._pushContext();var J=n.reject(x.e);return Y._popContext(),J}var B=c(G,Y);if(B instanceof n)return B}return null}function X($,Q,Y,V){if(f.cancellation()){var G=new n(D),J=this._finallyPromise=new n(D);this._promise=G.lastly(function(){return J}),G._captureStackTrace(),G._setOnCancel(this)}else{var B=this._promise=new n(D);B._captureStackTrace()}this._stack=V,this._generatorFunction=$,this._receiver=Q,this._generator=void 0,this._yieldHandlers=typeof Y==="function"?[Y].concat(F):F,this._yieldedPromise=null,this._cancellationPhase=!1}T.inherits(X,g),X.prototype._isResolved=function(){return this._promise===null},X.prototype._cleanup=function(){if(this._promise=this._generator=null,f.cancellation()&&this._finallyPromise!==null)this._finallyPromise._fulfill(),this._finallyPromise=null},X.prototype._promiseCancelled=function(){if(this._isResolved())return;var $=typeof this._generator.return<"u",Q;if(!$){var Y=new n.CancellationError("generator .return() sentinel");n.coroutine.returnSentinel=Y,this._promise._attachExtraTrace(Y),this._promise._pushContext(),Q=y(this._generator.throw).call(this._generator,Y),this._promise._popContext()}else this._promise._pushContext(),Q=y(this._generator.return).call(this._generator,void 0),this._promise._popContext();this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(Q)},X.prototype._promiseFulfilled=function($){this._yieldedPromise=null,this._promise._pushContext();var Q=y(this._generator.next).call(this._generator,$);this._promise._popContext(),this._continue(Q)},X.prototype._promiseRejected=function($){this._yieldedPromise=null,this._promise._attachExtraTrace($),this._promise._pushContext();var Q=y(this._generator.throw).call(this._generator,$);this._promise._popContext(),this._continue(Q)},X.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof n){var $=this._yieldedPromise;this._yieldedPromise=null,$.cancel()}},X.prototype.promise=function(){return this._promise},X.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},X.prototype._continue=function($){var Q=this._promise;if($===x)if(this._cleanup(),this._cancellationPhase)return Q.cancel();else return Q._rejectCallback($.e,!1);var Y=$.value;if($.done===!0)if(this._cleanup(),this._cancellationPhase)return Q.cancel();else return Q._resolveCallback(Y);else{var V=c(Y,this._promise);if(!(V instanceof n)){if(V=i(V,this._yieldHandlers,this._promise),V===null){this._promiseRejected(new W(`A value %s was yielded that could not be treated as a promise
|
|
125
|
+
|
|
126
|
+
See http://goo.gl/MqrFmX
|
|
127
|
+
|
|
128
|
+
`.replace("%s",Y)+`From coroutine:
|
|
129
|
+
`+this._stack.split(`
|
|
130
|
+
`).slice(1,-7).join(`
|
|
131
|
+
`)));return}}V=V._target();var G=V._bitField;if((G&50397184)===0)this._yieldedPromise=V,V._proxy(this,null);else if((G&33554432)!==0)n._async.invoke(this._promiseFulfilled,this,V._value());else if((G&16777216)!==0)n._async.invoke(this._promiseRejected,this,V._reason());else this._promiseCancelled()}},n.coroutine=function($,Q){if(typeof $!=="function")throw new W(`generatorFunction must be a function
|
|
132
|
+
|
|
133
|
+
See http://goo.gl/MqrFmX
|
|
134
|
+
`);var Y=Object(Q).yieldHandler,V=X,G=Error().stack;return function(){var J=$.apply(this,arguments),B=new V(void 0,void 0,Y,G),z=B.promise();return B._generator=J,B._promiseFulfilled(void 0),z}},n.coroutine.addYieldHandler=function($){if(typeof $!=="function")throw new W("expecting a function but got "+T.classString($));F.push($)},n.spawn=function($){if(f.deprecated("Promise.spawn()","Promise.coroutine()"),typeof $!=="function")return U(`generatorFunction must be a function
|
|
135
|
+
|
|
136
|
+
See http://goo.gl/MqrFmX
|
|
137
|
+
`);var Q=new X($,this),Y=Q.promise();return Q._run(n.spawn),Y}}});var XX=L((pD1,iX)=>{iX.exports=function(n){var U=Q1(),D=n._async,c=U.tryCatch,g=U.errorObj;function f(T,x){var y=this;if(!U.isArray(T))return h.call(y,T,x);var F=c(x).apply(y._boundValue(),[null].concat(T));if(F===g)D.throwLater(F.e)}function h(T,x){var y=this,F=y._boundValue(),i=T===void 0?c(x).call(F,null):c(x).call(F,null,T);if(i===g)D.throwLater(i.e)}function W(T,x){var y=this;if(!T){var F=Error(T+"");F.cause=T,T=F}var i=c(x).call(y._boundValue(),T);if(i===g)D.throwLater(i.e)}n.prototype.asCallback=n.prototype.nodeify=function(T,x){if(typeof T=="function"){var y=h;if(x!==void 0&&Object(x).spread)y=f;this._then(y,W,void 0,this,T)}return this}}});var $X=L((mD1,JX)=>{JX.exports=function(n,U){var D={},c=Q1(),g=M6(),f=c.withAppended,h=c.maybeWrapAsError,W=c.canEvaluate,T=q2().TypeError,x="Async",y={__isPromisified__:!0},F=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],i=new RegExp("^(?:"+F.join("|")+")$"),X=function(v){return c.isIdentifier(v)&&v.charAt(0)!=="_"&&v!=="constructor"};function $(v){return!i.test(v)}function Q(v){try{return v.__isPromisified__===!0}catch(P){return!1}}function Y(v,P,p){var b=c.getDataPropertyOrDefault(v,P+p,y);return b?Q(b):!1}function V(v,P,p){for(var b=0;b<v.length;b+=2){var C=v[b];if(p.test(C)){var A=C.replace(p,"");for(var E=0;E<v.length;E+=2)if(v[E]===A)throw new T(`Cannot promisify an API that has normal methods with '%s'-suffix
|
|
138
|
+
|
|
139
|
+
See http://goo.gl/MqrFmX
|
|
140
|
+
`.replace("%s",P))}}}function G(v,P,p,b){var C=c.inheritedDataKeys(v),A=[];for(var E=0;E<C.length;++E){var N=C[E],R=v[N],a=b===X?!0:X(N,R,v);if(typeof R==="function"&&!Q(R)&&!Y(v,N,P)&&b(N,R,v,a))A.push(N,R)}return V(A,P,p),A}var J=function(v){return v.replace(/([$])/,"\\$")},B,z=function(v){var P=[v],p=Math.max(0,v-1-3);for(var b=v-1;b>=p;--b)P.push(b);for(var b=v+1;b<=3;++b)P.push(b);return P},q=function(v){return c.filledRange(v,"_arg","")},Z=function(v){return c.filledRange(Math.max(v,3),"_arg","")},M=function(v){if(typeof v.length==="number")return Math.max(Math.min(v.length,1024),0);return 0};B=function(v,P,p,b,C,A){var E=Math.max(0,M(b)-1),N=z(E),R=typeof v==="string"||P===D;function a(J1){var nn=q(J1).join(", "),tn=J1>0?", ":"",d2;if(R)d2=`ret = callback.call(this, {{args}}, nodeback); break;
|
|
141
|
+
`;else d2=P===void 0?`ret = callback({{args}}, nodeback); break;
|
|
142
|
+
`:`ret = callback.call(receiver, {{args}}, nodeback); break;
|
|
143
|
+
`;return d2.replace("{{args}}",nn).replace(", ",tn)}function r(){var J1="";for(var nn=0;nn<N.length;++nn)J1+="case "+N[nn]+":"+a(N[nn]);return J1+=`
|
|
144
|
+
default:
|
|
145
|
+
var args = new Array(len + 1);
|
|
146
|
+
var i = 0;
|
|
147
|
+
for (var i = 0; i < len; ++i) {
|
|
148
|
+
args[i] = arguments[i];
|
|
149
|
+
}
|
|
150
|
+
args[i] = nodeback;
|
|
151
|
+
[CodeForCall]
|
|
152
|
+
break;
|
|
153
|
+
`.replace("[CodeForCall]",R?`ret = callback.apply(this, args);
|
|
154
|
+
`:`ret = callback.apply(receiver, args);
|
|
155
|
+
`),J1}var h1=typeof v==="string"?"this != null ? this['"+v+"'] : fn":"fn",z1=`'use strict';
|
|
156
|
+
var ret = function (Parameters) {
|
|
157
|
+
'use strict';
|
|
158
|
+
var len = arguments.length;
|
|
159
|
+
var promise = new Promise(INTERNAL);
|
|
160
|
+
promise._captureStackTrace();
|
|
161
|
+
var nodeback = nodebackForPromise(promise, `+A+`);
|
|
162
|
+
var ret;
|
|
163
|
+
var callback = tryCatch([GetFunctionCode]);
|
|
164
|
+
switch(len) {
|
|
165
|
+
[CodeForSwitchCase]
|
|
166
|
+
}
|
|
167
|
+
if (ret === errorObj) {
|
|
168
|
+
promise._rejectCallback(maybeWrapAsError(ret.e), true, true);
|
|
169
|
+
}
|
|
170
|
+
if (!promise._isFateSealed()) promise._setAsyncGuaranteed();
|
|
171
|
+
return promise;
|
|
172
|
+
};
|
|
173
|
+
notEnumerableProp(ret, '__isPromisified__', true);
|
|
174
|
+
return ret;
|
|
175
|
+
`.replace("[CodeForSwitchCase]",r()).replace("[GetFunctionCode]",h1);return z1=z1.replace("Parameters",Z(E)),Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",z1)(n,b,P,f,h,g,c.tryCatch,c.errorObj,c.notEnumerableProp,U)};function O(v,P,p,b,C,A){var E=function(){return this}(),N=v;if(typeof N==="string")v=b;function R(){var a=P;if(P===D)a=this;var r=new n(U);r._captureStackTrace();var h1=typeof N==="string"&&this!==E?this[N]:v,z1=g(r,A);try{h1.apply(a,f(arguments,z1))}catch(J1){r._rejectCallback(h(J1),!0,!0)}if(!r._isFateSealed())r._setAsyncGuaranteed();return r}return c.notEnumerableProp(R,"__isPromisified__",!0),R}var _=W?B:O;function w(v,P,p,b,C){var A=new RegExp(J(P)+"$"),E=G(v,P,A,p);for(var N=0,R=E.length;N<R;N+=2){var a=E[N],r=E[N+1],h1=a+P;if(b===_)v[h1]=_(a,D,a,r,P,C);else{var z1=b(r,function(){return _(a,D,a,r,P,C)});c.notEnumerableProp(z1,"__isPromisified__",!0),v[h1]=z1}}return c.toFastProperties(v),v}function H(v,P,p){return _(v,P,void 0,v,null,p)}n.promisify=function(v,P){if(typeof v!=="function")throw new T("expecting a function but got "+c.classString(v));if(Q(v))return v;P=Object(P);var p=P.context===void 0?D:P.context,b=!!P.multiArgs,C=H(v,p,b);return c.copyDescriptors(v,C,$),C},n.promisifyAll=function(v,P){if(typeof v!=="function"&&typeof v!=="object")throw new T(`the target of promisifyAll must be an object or a function
|
|
176
|
+
|
|
177
|
+
See http://goo.gl/MqrFmX
|
|
178
|
+
`);P=Object(P);var p=!!P.multiArgs,b=P.suffix;if(typeof b!=="string")b=x;var C=P.filter;if(typeof C!=="function")C=X;var A=P.promisifier;if(typeof A!=="function")A=_;if(!c.isIdentifier(b))throw RangeError(`suffix must be a valid identifier
|
|
179
|
+
|
|
180
|
+
See http://goo.gl/MqrFmX
|
|
181
|
+
`);var E=c.inheritedDataKeys(v);for(var N=0;N<E.length;++N){var R=v[E[N]];if(E[N]!=="constructor"&&c.isClass(R))w(R.prototype,b,C,A,p),w(R,b,C,A,p)}return w(v,b,C,A,p)}}});var QX=L((aD1,VX)=>{VX.exports=function(n,U,D,c){var g=Q1(),f=g.isObject,h=_U(),W;if(typeof Map==="function")W=Map;var T=function(){var i=0,X=0;function $(Q,Y){this[i]=Q,this[i+X]=Y,i++}return function(Y){X=Y.size,i=0;var V=Array(Y.size*2);return Y.forEach($,V),V}}(),x=function(i){var X=new W,$=i.length/2|0;for(var Q=0;Q<$;++Q){var Y=i[$+Q],V=i[Q];X.set(Y,V)}return X};function y(i){var X=!1,$;if(W!==void 0&&i instanceof W)$=T(i),X=!0;else{var Q=h.keys(i),Y=Q.length;$=Array(Y*2);for(var V=0;V<Y;++V){var G=Q[V];$[V]=i[G],$[V+Y]=G}}this.constructor$($),this._isMap=X,this._init$(void 0,-3)}g.inherits(y,U),y.prototype._init=function(){},y.prototype._promiseFulfilled=function(i,X){this._values[X]=i;var $=++this._totalResolved;if($>=this._length){var Q;if(this._isMap)Q=x(this._values);else{Q={};var Y=this.length();for(var V=0,G=this.length();V<G;++V)Q[this._values[V+Y]]=this._values[V]}return this._resolve(Q),!0}return!1},y.prototype.shouldCopyValues=function(){return!1},y.prototype.getActualLength=function(i){return i>>1};function F(i){var X,$=D(i);if(!f($))return c(`cannot await properties of a non-object
|
|
182
|
+
|
|
183
|
+
See http://goo.gl/MqrFmX
|
|
184
|
+
`);else if($ instanceof n)X=$._then(n.props,void 0,void 0,void 0,void 0);else X=new y($).promise();if($ instanceof n)X._propagateFrom($,2);return X}n.prototype.props=function(){return F(this)},n.props=function(i){return F(i)}}});var BX=L((oD1,YX)=>{YX.exports=function(n,U,D,c){var g=Q1(),f=function(W){return W.then(function(T){return h(T,W)})};function h(W,T){var x=D(W);if(x instanceof n)return f(x);else if(W=g.asArray(W),W===null)return c("expecting an array or an iterable object but got "+g.classString(W));var y=new n(U);if(T!==void 0)y._propagateFrom(T,3);var{_fulfill:F,_reject:i}=y;for(var X=0,$=W.length;X<$;++X){var Q=W[X];if(Q===void 0&&!(X in W))continue;n.cast(Q)._then(F,i,void 0,y,null)}return y}n.race=function(W){return h(W,void 0)},n.prototype.race=function(){return h(this,void 0)}}});var KX=L((rD1,GX)=>{GX.exports=function(n,U,D,c,g,f){var h=n._getDomain,W=Q1(),T=W.tryCatch;function x($,Q,Y,V){this.constructor$($);var G=h();if(this._fn=G===null?Q:W.domainBind(G,Q),Y!==void 0)Y=n.resolve(Y),Y._attachCancellationCallback(this);if(this._initialValue=Y,this._currentCancellable=null,V===g)this._eachValues=Array(this._length);else if(V===0)this._eachValues=null;else this._eachValues=void 0;this._promise._captureStackTrace(),this._init$(void 0,-5)}W.inherits(x,U),x.prototype._gotAccum=function($){if(this._eachValues!==void 0&&this._eachValues!==null&&$!==g)this._eachValues.push($)},x.prototype._eachComplete=function($){if(this._eachValues!==null)this._eachValues.push($);return this._eachValues},x.prototype._init=function(){},x.prototype._resolveEmptyArray=function(){this._resolve(this._eachValues!==void 0?this._eachValues:this._initialValue)},x.prototype.shouldCopyValues=function(){return!1},x.prototype._resolve=function($){this._promise._resolveCallback($),this._values=null},x.prototype._resultCancelled=function($){if($===this._initialValue)return this._cancel();if(this._isResolved())return;if(this._resultCancelled$(),this._currentCancellable instanceof n)this._currentCancellable.cancel();if(this._initialValue instanceof n)this._initialValue.cancel()},x.prototype._iterate=function($){this._values=$;var Q,Y,V=$.length;if(this._initialValue!==void 0)Q=this._initialValue,Y=0;else Q=n.resolve($[0]),Y=1;if(this._currentCancellable=Q,!Q.isRejected())for(;Y<V;++Y){var G={accum:null,value:$[Y],index:Y,length:V,array:this};Q=Q._then(i,void 0,void 0,G,void 0)}if(this._eachValues!==void 0)Q=Q._then(this._eachComplete,void 0,void 0,this,void 0);Q._then(y,y,void 0,Q,this)},n.prototype.reduce=function($,Q){return F(this,$,Q,null)},n.reduce=function($,Q,Y,V){return F($,Q,Y,V)};function y($,Q){if(this.isFulfilled())Q._resolve($);else Q._reject($)}function F($,Q,Y,V){if(typeof Q!=="function")return D("expecting a function but got "+W.classString(Q));var G=new x($,Q,Y,V);return G.promise()}function i($){this.accum=$,this.array._gotAccum($);var Q=c(this.value,this.array._promise);if(Q instanceof n)return this.array._currentCancellable=Q,Q._then(X,void 0,void 0,this,void 0);else return X.call(this,Q)}function X($){var Q=this.array,Y=Q._promise,V=T(Q._fn);Y._pushContext();var G;if(Q._eachValues!==void 0)G=V.call(Y._boundValue(),$,this.index,this.length);else G=V.call(Y._boundValue(),this.accum,$,this.index,this.length);if(G instanceof n)Q._currentCancellable=G;var J=Y._popContext();return f.checkForgottenReturns(G,J,Q._eachValues!==void 0?"Promise.each":"Promise.reduce",Y),G}}});var bX=L((lD1,ZX)=>{ZX.exports=function(n,U,D){var c=n.PromiseInspection,g=Q1();function f(h){this.constructor$(h)}g.inherits(f,U),f.prototype._promiseResolved=function(h,W){this._values[h]=W;var T=++this._totalResolved;if(T>=this._length)return this._resolve(this._values),!0;return!1},f.prototype._promiseFulfilled=function(h,W){var T=new c;return T._bitField=33554432,T._settledValueField=h,this._promiseResolved(W,T)},f.prototype._promiseRejected=function(h,W){var T=new c;return T._bitField=16777216,T._settledValueField=h,this._promiseResolved(W,T)},n.settle=function(h){return D.deprecated(".settle()",".reflect()"),new f(h).promise()},n.prototype.settle=function(){return n.settle(this)}}});var OX=L((tD1,zX)=>{zX.exports=function(n,U,D){var c=Q1(),g=q2().RangeError,f=q2().AggregateError,h=c.isArray,W={};function T(y){this.constructor$(y),this._howMany=0,this._unwrap=!1,this._initialized=!1}c.inherits(T,U),T.prototype._init=function(){if(!this._initialized)return;if(this._howMany===0){this._resolve([]);return}this._init$(void 0,-5);var y=h(this._values);if(!this._isResolved()&&y&&this._howMany>this._canPossiblyFulfill())this._reject(this._getRangeError(this.length()))},T.prototype.init=function(){this._initialized=!0,this._init()},T.prototype.setUnwrap=function(){this._unwrap=!0},T.prototype.howMany=function(){return this._howMany},T.prototype.setHowMany=function(y){this._howMany=y},T.prototype._promiseFulfilled=function(y){if(this._addFulfilled(y),this._fulfilled()===this.howMany()){if(this._values.length=this.howMany(),this.howMany()===1&&this._unwrap)this._resolve(this._values[0]);else this._resolve(this._values);return!0}return!1},T.prototype._promiseRejected=function(y){return this._addRejected(y),this._checkOutcome()},T.prototype._promiseCancelled=function(){if(this._values instanceof n||this._values==null)return this._cancel();return this._addRejected(W),this._checkOutcome()},T.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){var y=new f;for(var F=this.length();F<this._values.length;++F)if(this._values[F]!==W)y.push(this._values[F]);if(y.length>0)this._reject(y);else this._cancel();return!0}return!1},T.prototype._fulfilled=function(){return this._totalResolved},T.prototype._rejected=function(){return this._values.length-this.length()},T.prototype._addRejected=function(y){this._values.push(y)},T.prototype._addFulfilled=function(y){this._values[this._totalResolved++]=y},T.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},T.prototype._getRangeError=function(y){var F="Input array must contain at least "+this._howMany+" items but contains only "+y+" items";return new g(F)},T.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))};function x(y,F){if((F|0)!==F||F<0)return D(`expecting a positive integer
|
|
185
|
+
|
|
186
|
+
See http://goo.gl/MqrFmX
|
|
187
|
+
`);var i=new T(y),X=i.promise();return i.setHowMany(F),i.init(),X}n.some=function(y,F){return x(y,F)},n.prototype.some=function(y){return x(this,y)},n._SomePromiseArray=T}});var MX=L((eD1,qX)=>{qX.exports=function(n,U){var D=n.map;n.prototype.filter=function(c,g){return D(this,c,g,U)},n.filter=function(c,g,f){return D(c,g,f,U)}}});var HX=L((sD1,AX)=>{AX.exports=function(n,U){var{reduce:D,all:c}=n;function g(){return c(this)}function f(h,W){return D(h,W,U,U)}n.prototype.each=function(h){return D(this,h,U,0)._then(g,void 0,void 0,this,void 0)},n.prototype.mapSeries=function(h){return D(this,h,U,U)},n.each=function(h,W){return D(h,W,U,0)._then(g,void 0,void 0,h,void 0)},n.mapSeries=f}});var CX=L((nc1,LX)=>{LX.exports=function(n){var U=n._SomePromiseArray;function D(c){var g=new U(c),f=g.promise();return g.setHowMany(1),g.setUnwrap(),g.init(),f}n.any=function(c){return D(c)},n.prototype.any=function(){return D(this)}}});var EX=L((Uc1,H6)=>{H6.exports=function(){var n=function(){return new F(`circular promise resolution chain
|
|
188
|
+
|
|
189
|
+
See http://goo.gl/MqrFmX
|
|
190
|
+
`)},U=function(){return new H.PromiseInspection(this._target())},D=function(b){return H.reject(new F(b))};function c(){}var g={},f=Q1(),h;if(f.isNode)h=function(){var b=process.domain;if(b===void 0)b=null;return b};else h=function(){return null};f.notEnumerableProp(H,"_getDomain",h);var W=_U(),T=Oi(),x=new T;W.defineProperty(H,"_async",{value:x});var y=q2(),F=H.TypeError=y.TypeError;H.RangeError=y.RangeError;var i=H.CancellationError=y.CancellationError;H.TimeoutError=y.TimeoutError,H.OperationalError=y.OperationalError,H.RejectionError=y.OperationalError,H.AggregateError=y.AggregateError;var X=function(){},$={},Q={},Y=Li()(H,X),V=Ei()(H,X,Y,D,c),G=ji()(H),J=G.create,B=_i()(H,G),z=B.CapturedTrace,q=vi()(H,Y),Z=Pi()(Q),M=M6(),O=f.errorObj,_=f.tryCatch;function w(b,C){if(typeof C!=="function")throw new F("expecting a function but got "+f.classString(C));if(b.constructor!==H)throw new F(`the promise constructor cannot be invoked directly
|
|
191
|
+
|
|
192
|
+
See http://goo.gl/MqrFmX
|
|
193
|
+
`)}function H(b){if(this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,b!==X)w(this,b),this._resolveFromExecutor(b);this._promiseCreated(),this._fireEvent("promiseCreated",this)}H.prototype.toString=function(){return"[object Promise]"},H.prototype.caught=H.prototype.catch=function(b){var C=arguments.length;if(C>1){var A=Array(C-1),E=0,N;for(N=0;N<C-1;++N){var R=arguments[N];if(f.isObject(R))A[E++]=R;else return D("expecting an object but got A catch statement predicate "+f.classString(R))}return A.length=E,b=arguments[N],this.then(void 0,Z(A,b,this))}return this.then(void 0,b)},H.prototype.reflect=function(){return this._then(U,U,void 0,this,void 0)},H.prototype.then=function(b,C){if(B.warnings()&&arguments.length>0&&typeof b!=="function"&&typeof C!=="function"){var A=".then() only accepts functions but was passed: "+f.classString(b);if(arguments.length>1)A+=", "+f.classString(C);this._warn(A)}return this._then(b,C,void 0,void 0,void 0)},H.prototype.done=function(b,C){var A=this._then(b,C,void 0,void 0,void 0);A._setIsFinal()},H.prototype.spread=function(b){if(typeof b!=="function")return D("expecting a function but got "+f.classString(b));return this.all()._then(b,void 0,void 0,$,void 0)},H.prototype.toJSON=function(){var b={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};if(this.isFulfilled())b.fulfillmentValue=this.value(),b.isFulfilled=!0;else if(this.isRejected())b.rejectionReason=this.reason(),b.isRejected=!0;return b},H.prototype.all=function(){if(arguments.length>0)this._warn(".all() was passed arguments but it does not take any");return new V(this).promise()},H.prototype.error=function(b){return this.caught(f.originatesFromRejection,b)},H.getNewLibraryCopy=H6.exports,H.is=function(b){return b instanceof H},H.fromNode=H.fromCallback=function(b){var C=new H(X);C._captureStackTrace();var A=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,E=_(b)(M(C,A));if(E===O)C._rejectCallback(E.e,!0);if(!C._isFateSealed())C._setAsyncGuaranteed();return C},H.all=function(b){return new V(b).promise()},H.cast=function(b){var C=Y(b);if(!(C instanceof H))C=new H(X),C._captureStackTrace(),C._setFulfilled(),C._rejectionHandler0=b;return C},H.resolve=H.fulfilled=H.cast,H.reject=H.rejected=function(b){var C=new H(X);return C._captureStackTrace(),C._rejectCallback(b,!0),C},H.setScheduler=function(b){if(typeof b!=="function")throw new F("expecting a function but got "+f.classString(b));return x.setScheduler(b)},H.prototype._then=function(b,C,A,E,N){var R=N!==void 0,a=R?N:new H(X),r=this._target(),h1=r._bitField;if(!R){if(a._propagateFrom(this,3),a._captureStackTrace(),E===void 0&&(this._bitField&2097152)!==0)if((h1&50397184)!==0)E=this._boundValue();else E=r===this?void 0:this._boundTo;this._fireEvent("promiseChained",this,a)}var z1=h();if((h1&50397184)!==0){var J1,nn,tn=r._settlePromiseCtx;if((h1&33554432)!==0)nn=r._rejectionHandler0,J1=b;else if((h1&16777216)!==0)nn=r._fulfillmentHandler0,J1=C,r._unsetRejectionIsUnhandled();else tn=r._settlePromiseLateCancellationObserver,nn=new i("late cancellation observer"),r._attachExtraTrace(nn),J1=C;x.invoke(tn,r,{handler:z1===null?J1:typeof J1==="function"&&f.domainBind(z1,J1),promise:a,receiver:E,value:nn})}else r._addCallbacks(b,C,a,E,z1);return a},H.prototype._length=function(){return this._bitField&65535},H.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0},H.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864},H.prototype._setLength=function(b){this._bitField=this._bitField&-65536|b&65535},H.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432,this._fireEvent("promiseFulfilled",this)},H.prototype._setRejected=function(){this._bitField=this._bitField|16777216,this._fireEvent("promiseRejected",this)},H.prototype._setFollowing=function(){this._bitField=this._bitField|67108864,this._fireEvent("promiseResolved",this)},H.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304},H.prototype._isFinal=function(){return(this._bitField&4194304)>0},H.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},H.prototype._setCancelled=function(){this._bitField=this._bitField|65536,this._fireEvent("promiseCancelled",this)},H.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608},H.prototype._setAsyncGuaranteed=function(){if(x.hasCustomScheduler())return;this._bitField=this._bitField|134217728},H.prototype._receiverAt=function(b){var C=b===0?this._receiver0:this[b*4-4+3];if(C===g)return;else if(C===void 0&&this._isBound())return this._boundValue();return C},H.prototype._promiseAt=function(b){return this[b*4-4+2]},H.prototype._fulfillmentHandlerAt=function(b){return this[b*4-4+0]},H.prototype._rejectionHandlerAt=function(b){return this[b*4-4+1]},H.prototype._boundValue=function(){},H.prototype._migrateCallback0=function(b){var{_bitField:C,_fulfillmentHandler0:A,_rejectionHandler0:E,_promise0:N}=b,R=b._receiverAt(0);if(R===void 0)R=g;this._addCallbacks(A,E,N,R,null)},H.prototype._migrateCallbackAt=function(b,C){var A=b._fulfillmentHandlerAt(C),E=b._rejectionHandlerAt(C),N=b._promiseAt(C),R=b._receiverAt(C);if(R===void 0)R=g;this._addCallbacks(A,E,N,R,null)},H.prototype._addCallbacks=function(b,C,A,E,N){var R=this._length();if(R>=65531)R=0,this._setLength(0);if(R===0){if(this._promise0=A,this._receiver0=E,typeof b==="function")this._fulfillmentHandler0=N===null?b:f.domainBind(N,b);if(typeof C==="function")this._rejectionHandler0=N===null?C:f.domainBind(N,C)}else{var a=R*4-4;if(this[a+2]=A,this[a+3]=E,typeof b==="function")this[a+0]=N===null?b:f.domainBind(N,b);if(typeof C==="function")this[a+1]=N===null?C:f.domainBind(N,C)}return this._setLength(R+1),R},H.prototype._proxy=function(b,C){this._addCallbacks(void 0,void 0,C,b,null)},H.prototype._resolveCallback=function(b,C){if((this._bitField&117506048)!==0)return;if(b===this)return this._rejectCallback(n(),!1);var A=Y(b,this);if(!(A instanceof H))return this._fulfill(b);if(C)this._propagateFrom(A,2);var E=A._target();if(E===this){this._reject(n());return}var N=E._bitField;if((N&50397184)===0){var R=this._length();if(R>0)E._migrateCallback0(this);for(var a=1;a<R;++a)E._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(E)}else if((N&33554432)!==0)this._fulfill(E._value());else if((N&16777216)!==0)this._reject(E._reason());else{var r=new i("late cancellation observer");E._attachExtraTrace(r),this._reject(r)}},H.prototype._rejectCallback=function(b,C,A){var E=f.ensureErrorObject(b),N=E===b;if(!N&&!A&&B.warnings()){var R="a promise was rejected with a non-error: "+f.classString(b);this._warn(R,!0)}this._attachExtraTrace(E,C?N:!1),this._reject(b)},H.prototype._resolveFromExecutor=function(b){var C=this;this._captureStackTrace(),this._pushContext();var A=!0,E=this._execute(b,function(N){C._resolveCallback(N)},function(N){C._rejectCallback(N,A)});if(A=!1,this._popContext(),E!==void 0)C._rejectCallback(E,!0)},H.prototype._settlePromiseFromHandler=function(b,C,A,E){var N=E._bitField;if((N&65536)!==0)return;E._pushContext();var R;if(C===$)if(!A||typeof A.length!=="number")R=O,R.e=new F("cannot .spread() a non-array: "+f.classString(A));else R=_(b).apply(this._boundValue(),A);else R=_(b).call(C,A);var a=E._popContext();if(N=E._bitField,(N&65536)!==0)return;if(R===Q)E._reject(A);else if(R===O)E._rejectCallback(R.e,!1);else B.checkForgottenReturns(R,a,"",E,this),E._resolveCallback(R)},H.prototype._target=function(){var b=this;while(b._isFollowing())b=b._followee();return b},H.prototype._followee=function(){return this._rejectionHandler0},H.prototype._setFollowee=function(b){this._rejectionHandler0=b},H.prototype._settlePromise=function(b,C,A,E){var N=b instanceof H,R=this._bitField,a=(R&134217728)!==0;if((R&65536)!==0){if(N)b._invokeInternalOnCancel();if(A instanceof q&&A.isFinallyHandler()){if(A.cancelPromise=b,_(C).call(A,E)===O)b._reject(O.e)}else if(C===U)b._fulfill(U.call(A));else if(A instanceof c)A._promiseCancelled(b);else if(N||b instanceof V)b._cancel();else A.cancel()}else if(typeof C==="function")if(!N)C.call(A,E,b);else{if(a)b._setAsyncGuaranteed();this._settlePromiseFromHandler(C,A,E,b)}else if(A instanceof c){if(!A._isResolved())if((R&33554432)!==0)A._promiseFulfilled(E,b);else A._promiseRejected(E,b)}else if(N){if(a)b._setAsyncGuaranteed();if((R&33554432)!==0)b._fulfill(E);else b._reject(E)}},H.prototype._settlePromiseLateCancellationObserver=function(b){var{handler:C,promise:A,receiver:E,value:N}=b;if(typeof C==="function")if(!(A instanceof H))C.call(E,N,A);else this._settlePromiseFromHandler(C,E,N,A);else if(A instanceof H)A._reject(N)},H.prototype._settlePromiseCtx=function(b){this._settlePromise(b.promise,b.handler,b.receiver,b.value)},H.prototype._settlePromise0=function(b,C,A){var E=this._promise0,N=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(E,b,N,C)},H.prototype._clearCallbackDataAtIndex=function(b){var C=b*4-4;this[C+2]=this[C+3]=this[C+0]=this[C+1]=void 0},H.prototype._fulfill=function(b){var C=this._bitField;if((C&117506048)>>>16)return;if(b===this){var A=n();return this._attachExtraTrace(A),this._reject(A)}if(this._setFulfilled(),this._rejectionHandler0=b,(C&65535)>0)if((C&134217728)!==0)this._settlePromises();else x.settlePromises(this)},H.prototype._reject=function(b){var C=this._bitField;if((C&117506048)>>>16)return;if(this._setRejected(),this._fulfillmentHandler0=b,this._isFinal())return x.fatalError(b,f.isNode);if((C&65535)>0)x.settlePromises(this);else this._ensurePossibleRejectionHandled()},H.prototype._fulfillPromises=function(b,C){for(var A=1;A<b;A++){var E=this._fulfillmentHandlerAt(A),N=this._promiseAt(A),R=this._receiverAt(A);this._clearCallbackDataAtIndex(A),this._settlePromise(N,E,R,C)}},H.prototype._rejectPromises=function(b,C){for(var A=1;A<b;A++){var E=this._rejectionHandlerAt(A),N=this._promiseAt(A),R=this._receiverAt(A);this._clearCallbackDataAtIndex(A),this._settlePromise(N,E,R,C)}},H.prototype._settlePromises=function(){var b=this._bitField,C=b&65535;if(C>0){if((b&16842752)!==0){var A=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,A,b),this._rejectPromises(C,A)}else{var E=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,E,b),this._fulfillPromises(C,E)}this._setLength(0)}this._clearCancellationData()},H.prototype._settledValue=function(){var b=this._bitField;if((b&33554432)!==0)return this._rejectionHandler0;else if((b&16777216)!==0)return this._fulfillmentHandler0};function v(b){this.promise._resolveCallback(b)}function P(b){this.promise._rejectCallback(b,!1)}H.defer=H.pending=function(){B.deprecated("Promise.defer","new Promise");var b=new H(X);return{promise:b,resolve:v,reject:P}},f.notEnumerableProp(H,"_makeSelfResolutionError",n),pi()(H,X,Y,D,B),ai()(H,X,Y,B),ri()(H,V,D,B),ti()(H),si()(H),UX()(H,V,Y,X,x,h),H.Promise=H,H.version="3.4.7",cX()(H,V,D,Y,X,B),fX()(H),WX()(H,D,Y,J,X,B),TX()(H,X,B),FX()(H,D,X,Y,c,B),XX()(H),$X()(H,X),QX()(H,V,Y,D),BX()(H,X,Y,D),KX()(H,V,D,Y,X,B),bX()(H,V,B),OX()(H,V,D),MX()(H,X),HX()(H,X),CX()(H),f.toFastProperties(H),f.toFastProperties(H.prototype);function p(b){var C=new H(X);C._fulfillmentHandler0=b,C._rejectionHandler0=b,C._promise0=b,C._receiver0=b}return p({a:1}),p({b:2}),p({c:3}),p(1),p(function(){}),p(void 0),p(!1),p(new H(X)),B.setBounds(T.firstLineError,f.lastLineError),H}});var M2=L((AE)=>{var qE=w1(),Gn=EX()();AE.defer=ME;AE.when=Gn.resolve;AE.resolve=Gn.resolve;AE.all=Gn.all;AE.props=Gn.props;AE.reject=Gn.reject;AE.promisify=Gn.promisify;AE.mapSeries=Gn.mapSeries;AE.attempt=Gn.attempt;AE.nfcall=function(n){var U=Array.prototype.slice.call(arguments,1),D=Gn.promisify(n);return D.apply(null,U)};Gn.prototype.fail=Gn.prototype.caught;Gn.prototype.also=function(n){return this.then(function(U){var D=qE.extend({},U,n(U));return Gn.props(D)})};function ME(){var n,U,D=new Gn.Promise(function(c,g){n=c,U=g});return{resolve:n,reject:U,promise:D}}});var gU=L((Dw)=>{var NE=w1(),l1=Dw.types={document:"document",paragraph:"paragraph",run:"run",text:"text",tab:"tab",checkbox:"checkbox",hyperlink:"hyperlink",noteReference:"noteReference",image:"image",note:"note",commentReference:"commentReference",comment:"comment",table:"table",tableRow:"tableRow",tableCell:"tableCell",break:"break",bookmarkStart:"bookmarkStart"};function PE(n,U){return U=U||{},{type:l1.document,children:n,notes:U.notes||new k8({}),comments:U.comments||[]}}function RE(n,U){U=U||{};var D=U.indent||{};return{type:l1.paragraph,children:n,styleId:U.styleId||null,styleName:U.styleName||null,numbering:U.numbering||null,alignment:U.alignment||null,indent:{start:D.start||null,end:D.end||null,firstLine:D.firstLine||null,hanging:D.hanging||null}}}function uE(n,U){return U=U||{},{type:l1.run,children:n,styleId:U.styleId||null,styleName:U.styleName||null,isBold:!!U.isBold,isUnderline:!!U.isUnderline,isItalic:!!U.isItalic,isStrikethrough:!!U.isStrikethrough,isAllCaps:!!U.isAllCaps,isSmallCaps:!!U.isSmallCaps,verticalAlignment:U.verticalAlignment||wX.baseline,font:U.font||null,fontSize:U.fontSize||null,highlight:U.highlight||null}}var wX={baseline:"baseline",superscript:"superscript",subscript:"subscript"};function dE(n){return{type:l1.text,value:n}}function kE(){return{type:l1.tab}}function pE(n){return{type:l1.checkbox,checked:n.checked}}function mE(n,U){return{type:l1.hyperlink,children:n,href:U.href,anchor:U.anchor,targetFrame:U.targetFrame}}function aE(n){return{type:l1.noteReference,noteType:n.noteType,noteId:n.noteId}}function k8(n){this._notes=NE.indexBy(n,function(U){return jX(U.noteType,U.noteId)})}k8.prototype.resolve=function(n){return this.findNoteByKey(jX(n.noteType,n.noteId))};k8.prototype.findNoteByKey=function(n){return this._notes[n]||null};function oE(n){return{type:l1.note,noteType:n.noteType,noteId:n.noteId,body:n.body}}function rE(n){return{type:l1.commentReference,commentId:n.commentId}}function lE(n){return{type:l1.comment,commentId:n.commentId,body:n.body,authorName:n.authorName,authorInitials:n.authorInitials}}function jX(n,U){return n+"-"+U}function tE(n){return{type:l1.image,read:function(U){if(U)return n.readImage(U);else return n.readImage().then(function(D){return Buffer.from(D)})},readAsArrayBuffer:function(){return n.readImage()},readAsBase64String:function(){return n.readImage("base64")},readAsBuffer:function(){return n.readImage().then(function(U){return Buffer.from(U)})},altText:n.altText,contentType:n.contentType}}function eE(n,U){return U=U||{},{type:l1.table,children:n,styleId:U.styleId||null,styleName:U.styleName||null}}function sE(n,U){return U=U||{},{type:l1.tableRow,children:n,isHeader:U.isHeader||!1}}function nw(n,U){return U=U||{},{type:l1.tableCell,children:n,colSpan:U.colSpan==null?1:U.colSpan,rowSpan:U.rowSpan==null?1:U.rowSpan}}function L6(n){return{type:l1.break,breakType:n}}function Uw(n){return{type:l1.bookmarkStart,name:n.name}}Dw.document=Dw.Document=PE;Dw.paragraph=Dw.Paragraph=RE;Dw.run=Dw.Run=uE;Dw.text=Dw.Text=dE;Dw.tab=Dw.Tab=kE;Dw.checkbox=Dw.Checkbox=pE;Dw.Hyperlink=mE;Dw.noteReference=Dw.NoteReference=aE;Dw.Notes=k8;Dw.Note=oE;Dw.commentReference=rE;Dw.comment=lE;Dw.Image=tE;Dw.Table=eE;Dw.TableRow=sE;Dw.TableCell=nw;Dw.lineBreak=L6("line");Dw.pageBreak=L6("page");Dw.columnBreak=L6("column");Dw.BookmarkStart=Uw;Dw.verticalAlignment=wX});var f2=L((Hw)=>{var ec=w1();Hw.Result=g2;Hw.success=zw;Hw.warning=Ow;Hw.error=qw;function g2(n,U){this.value=n,this.messages=U||[]}g2.prototype.map=function(n){return new g2(n(this.value),this.messages)};g2.prototype.flatMap=function(n){var U=n(this.value);return new g2(U.value,C6([this,U]))};g2.prototype.flatMapThen=function(n){var U=this;return n(this.value).then(function(D){return new g2(D.value,C6([U,D]))})};g2.combine=function(n){var U=ec.flatten(ec.pluck(n,"value")),D=C6(n);return new g2(U,D)};function zw(n){return new g2(n,[])}function Ow(n){return{type:"warning",message:n}}function qw(n){return{type:"error",message:n.message,error:n}}function C6(n){var U=[];return ec.flatten(ec.pluck(n,"messages"),!0).forEach(function(D){if(!Mw(U,D))U.push(D)}),U}function Mw(n,U){return ec.find(n,Aw.bind(null,U))!==void 0}function Aw(n,U){return n.type===U.type&&n.message===U.message}});var _X=L((Rw)=>{Rw.byteLength=Iw;Rw.toByteArray=Sw;Rw.fromByteArray=Pw;var h2=[],wn=[],jw=typeof Uint8Array<"u"?Uint8Array:Array,E6="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(fU=0,w6=E6.length;fU<w6;++fU)h2[fU]=E6[fU],wn[E6.charCodeAt(fU)]=fU;var fU,w6;wn[45]=62;wn[95]=63;function IX(n){var U=n.length;if(U%4>0)throw Error("Invalid string. Length must be a multiple of 4");var D=n.indexOf("=");if(D===-1)D=U;var c=D===U?0:4-D%4;return[D,c]}function Iw(n){var U=IX(n),D=U[0],c=U[1];return(D+c)*3/4-c}function _w(n,U,D){return(U+D)*3/4-D}function Sw(n){var U,D=IX(n),c=D[0],g=D[1],f=new jw(_w(n,c,g)),h=0,W=g>0?c-4:c,T;for(T=0;T<W;T+=4)U=wn[n.charCodeAt(T)]<<18|wn[n.charCodeAt(T+1)]<<12|wn[n.charCodeAt(T+2)]<<6|wn[n.charCodeAt(T+3)],f[h++]=U>>16&255,f[h++]=U>>8&255,f[h++]=U&255;if(g===2)U=wn[n.charCodeAt(T)]<<2|wn[n.charCodeAt(T+1)]>>4,f[h++]=U&255;if(g===1)U=wn[n.charCodeAt(T)]<<10|wn[n.charCodeAt(T+1)]<<4|wn[n.charCodeAt(T+2)]>>2,f[h++]=U>>8&255,f[h++]=U&255;return f}function vw(n){return h2[n>>18&63]+h2[n>>12&63]+h2[n>>6&63]+h2[n&63]}function Nw(n,U,D){var c,g=[];for(var f=U;f<D;f+=3)c=(n[f]<<16&16711680)+(n[f+1]<<8&65280)+(n[f+2]&255),g.push(vw(c));return g.join("")}function Pw(n){var U,D=n.length,c=D%3,g=[],f=16383;for(var h=0,W=D-c;h<W;h+=f)g.push(Nw(n,h,h+f>W?W:h+f));if(c===1)U=n[D-1],g.push(h2[U>>2]+h2[U<<4&63]+"==");else if(c===2)U=(n[D-2]<<8)+n[D-1],g.push(h2[U>>10]+h2[U>>4&63]+h2[U<<2&63]+"=");return g.join("")}});var sc=L((Jc1,j6)=>{if(typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0)j6.exports={nextTick:pw};else j6.exports=process;function pw(n,U,D,c){if(typeof n!=="function")throw TypeError('"callback" argument must be a function');var g=arguments.length,f,h;switch(g){case 0:case 1:return process.nextTick(n);case 2:return process.nextTick(function(){n.call(null,U)});case 3:return process.nextTick(function(){n.call(null,U,D)});case 4:return process.nextTick(function(){n.call(null,U,D,c)});default:f=Array(g-1),h=0;while(h<f.length)f[h++]=arguments[h];return process.nextTick(function(){n.apply(null,f)})}}});var vX=L(($c1,SX)=>{var mw={}.toString;SX.exports=Array.isArray||function(n){return mw.call(n)=="[object Array]"}});var m8=L((I6,PX)=>{var p8=B1("buffer"),A2=p8.Buffer;function NX(n,U){for(var D in n)U[D]=n[D]}if(A2.from&&A2.alloc&&A2.allocUnsafe&&A2.allocUnsafeSlow)PX.exports=p8;else NX(p8,I6),I6.Buffer=CD;function CD(n,U,D){return A2(n,U,D)}NX(A2,CD);CD.from=function(n,U,D){if(typeof n==="number")throw TypeError("Argument must not be a number");return A2(n,U,D)};CD.alloc=function(n,U,D){if(typeof n!=="number")throw TypeError("Argument must be a number");var c=A2(n);if(U!==void 0)if(typeof D==="string")c.fill(U,D);else c.fill(U);else c.fill(0);return c};CD.allocUnsafe=function(n){if(typeof n!=="number")throw TypeError("Argument must be a number");return A2(n)};CD.allocUnsafeSlow=function(n){if(typeof n!=="number")throw TypeError("Argument must be a number");return p8.SlowBuffer(n)}});var ED=L((Wj)=>{function aw(n){if(Array.isArray)return Array.isArray(n);return a8(n)==="[object Array]"}Wj.isArray=aw;function ow(n){return typeof n==="boolean"}Wj.isBoolean=ow;function rw(n){return n===null}Wj.isNull=rw;function lw(n){return n==null}Wj.isNullOrUndefined=lw;function tw(n){return typeof n==="number"}Wj.isNumber=tw;function ew(n){return typeof n==="string"}Wj.isString=ew;function sw(n){return typeof n==="symbol"}Wj.isSymbol=sw;function nj(n){return n===void 0}Wj.isUndefined=nj;function Uj(n){return a8(n)==="[object RegExp]"}Wj.isRegExp=Uj;function Dj(n){return typeof n==="object"&&n!==null}Wj.isObject=Dj;function cj(n){return a8(n)==="[object Date]"}Wj.isDate=cj;function gj(n){return a8(n)==="[object Error]"||n instanceof Error}Wj.isError=gj;function fj(n){return typeof n==="function"}Wj.isFunction=fj;function hj(n){return n===null||typeof n==="boolean"||typeof n==="number"||typeof n==="string"||typeof n==="symbol"||typeof n>"u"}Wj.isPrimitive=hj;Wj.isBuffer=B1("buffer").Buffer.isBuffer;function a8(n){return Object.prototype.toString.call(n)}});var RX=L((Qc1,_6)=>{if(typeof Object.create==="function")_6.exports=function(U,D){if(D)U.super_=D,U.prototype=Object.create(D.prototype,{constructor:{value:U,enumerable:!1,writable:!0,configurable:!0}})};else _6.exports=function(U,D){if(D){U.super_=D;var c=function(){};c.prototype=D.prototype,U.prototype=new c,U.prototype.constructor=U}}});var wD=L((Yc1,S6)=>{try{if(o8=B1("util"),typeof o8.inherits!=="function")throw"";S6.exports=o8.inherits}catch(n){S6.exports=RX()}var o8});var dX=L((Bc1,v6)=>{function bj(n,U){if(!(n instanceof U))throw TypeError("Cannot call a class as a function")}var uX=m8().Buffer,n0=B1("util");function zj(n,U,D){n.copy(U,D)}v6.exports=function(){function n(){bj(this,n),this.head=null,this.tail=null,this.length=0}return n.prototype.push=function(D){var c={data:D,next:null};if(this.length>0)this.tail.next=c;else this.head=c;this.tail=c,++this.length},n.prototype.unshift=function(D){var c={data:D,next:this.head};if(this.length===0)this.tail=c;this.head=c,++this.length},n.prototype.shift=function(){if(this.length===0)return;var D=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,D},n.prototype.clear=function(){this.head=this.tail=null,this.length=0},n.prototype.join=function(D){if(this.length===0)return"";var c=this.head,g=""+c.data;while(c=c.next)g+=D+c.data;return g},n.prototype.concat=function(D){if(this.length===0)return uX.alloc(0);var c=uX.allocUnsafe(D>>>0),g=this.head,f=0;while(g)zj(g.data,c,f),f+=g.data.length,g=g.next;return c},n}();if(n0&&n0.inspect&&n0.inspect.custom)v6.exports.prototype[n0.inspect.custom]=function(){var n=n0.inspect({length:this.length});return this.constructor.name+" "+n}});var N6=L((Gc1,kX)=>{var r8=sc();function Oj(n,U){var D=this,c=this._readableState&&this._readableState.destroyed,g=this._writableState&&this._writableState.destroyed;if(c||g){if(U)U(n);else if(n){if(!this._writableState)r8.nextTick(l8,this,n);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,r8.nextTick(l8,this,n)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(n||null,function(f){if(!U&&f){if(!D._writableState)r8.nextTick(l8,D,f);else if(!D._writableState.errorEmitted)D._writableState.errorEmitted=!0,r8.nextTick(l8,D,f)}else if(U)U(f)}),this}function qj(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function l8(n,U){n.emit("error",U)}kX.exports={destroy:Oj,undestroy:qj}});var mX=L((Kc1,pX)=>{pX.exports=B1("util").deprecate});var R6=L((Zc1,nJ)=>{var PU=sc();nJ.exports=v1;function oX(n){var U=this;this.next=null,this.entry=null,this.finish=function(){kj(U,n)}}var Mj=["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:PU.nextTick,jD;v1.WritableState=D0;var rX=Object.create(ED());rX.inherits=wD();var Aj={deprecate:mX()},lX=B1("stream"),e8=m8().Buffer,Hj=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Lj(n){return e8.from(n)}function Cj(n){return e8.isBuffer(n)||n instanceof Hj}var tX=N6();rX.inherits(v1,lX);function Ej(){}function D0(n,U){jD=jD||RU(),n=n||{};var D=U instanceof jD;if(this.objectMode=!!n.objectMode,D)this.objectMode=this.objectMode||!!n.writableObjectMode;var{highWaterMark:c,writableHighWaterMark:g}=n,f=this.objectMode?16:16384;if(c||c===0)this.highWaterMark=c;else if(D&&(g||g===0))this.highWaterMark=g;else this.highWaterMark=f;this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=n.decodeStrings===!1;this.decodeStrings=!h,this.defaultEncoding=n.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(W){Nj(U,W)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new oX(this)}D0.prototype.getBuffer=function(){var U=this.bufferedRequest,D=[];while(U)D.push(U),U=U.next;return D};(function(){try{Object.defineProperty(D0.prototype,"buffer",{get:Aj.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(n){}})();var t8;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")t8=Function.prototype[Symbol.hasInstance],Object.defineProperty(v1,Symbol.hasInstance,{value:function(n){if(t8.call(this,n))return!0;if(this!==v1)return!1;return n&&n._writableState instanceof D0}});else t8=function(n){return n instanceof this};function v1(n){if(jD=jD||RU(),!t8.call(v1,this)&&!(this instanceof jD))return new v1(n);if(this._writableState=new D0(n,this),this.writable=!0,n){if(typeof n.write==="function")this._write=n.write;if(typeof n.writev==="function")this._writev=n.writev;if(typeof n.destroy==="function")this._destroy=n.destroy;if(typeof n.final==="function")this._final=n.final}lX.call(this)}v1.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))};function wj(n,U){var D=Error("write after end");n.emit("error",D),PU.nextTick(U,D)}function jj(n,U,D,c){var g=!0,f=!1;if(D===null)f=TypeError("May not write null values to stream");else if(typeof D!=="string"&&D!==void 0&&!U.objectMode)f=TypeError("Invalid non-string/buffer chunk");if(f)n.emit("error",f),PU.nextTick(c,f),g=!1;return g}v1.prototype.write=function(n,U,D){var c=this._writableState,g=!1,f=!c.objectMode&&Cj(n);if(f&&!e8.isBuffer(n))n=Lj(n);if(typeof U==="function")D=U,U=null;if(f)U="buffer";else if(!U)U=c.defaultEncoding;if(typeof D!=="function")D=Ej;if(c.ended)wj(this,D);else if(f||jj(this,c,n,D))c.pendingcb++,g=_j(this,c,f,n,U,D);return g};v1.prototype.cork=function(){var n=this._writableState;n.corked++};v1.prototype.uncork=function(){var n=this._writableState;if(n.corked){if(n.corked--,!n.writing&&!n.corked&&!n.bufferProcessing&&n.bufferedRequest)eX(this,n)}};v1.prototype.setDefaultEncoding=function(U){if(typeof U==="string")U=U.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((U+"").toLowerCase())>-1))throw TypeError("Unknown encoding: "+U);return this._writableState.defaultEncoding=U,this};function Ij(n,U,D){if(!n.objectMode&&n.decodeStrings!==!1&&typeof U==="string")U=e8.from(U,D);return U}Object.defineProperty(v1.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function _j(n,U,D,c,g,f){if(!D){var h=Ij(U,c,g);if(c!==h)D=!0,g="buffer",c=h}var W=U.objectMode?1:c.length;U.length+=W;var T=U.length<U.highWaterMark;if(!T)U.needDrain=!0;if(U.writing||U.corked){var x=U.lastBufferedRequest;if(U.lastBufferedRequest={chunk:c,encoding:g,isBuf:D,callback:f,next:null},x)x.next=U.lastBufferedRequest;else U.bufferedRequest=U.lastBufferedRequest;U.bufferedRequestCount+=1}else P6(n,U,!1,W,c,g,f);return T}function P6(n,U,D,c,g,f,h){if(U.writelen=c,U.writecb=h,U.writing=!0,U.sync=!0,D)n._writev(g,U.onwrite);else n._write(g,f,U.onwrite);U.sync=!1}function Sj(n,U,D,c,g){if(--U.pendingcb,D)PU.nextTick(g,c),PU.nextTick(U0,n,U),n._writableState.errorEmitted=!0,n.emit("error",c);else g(c),n._writableState.errorEmitted=!0,n.emit("error",c),U0(n,U)}function vj(n){n.writing=!1,n.writecb=null,n.length-=n.writelen,n.writelen=0}function Nj(n,U){var D=n._writableState,c=D.sync,g=D.writecb;if(vj(D),U)Sj(n,D,c,U,g);else{var f=sX(D);if(!f&&!D.corked&&!D.bufferProcessing&&D.bufferedRequest)eX(n,D);if(c)Mj(aX,n,D,f,g);else aX(n,D,f,g)}}function aX(n,U,D,c){if(!D)Pj(n,U);U.pendingcb--,c(),U0(n,U)}function Pj(n,U){if(U.length===0&&U.needDrain)U.needDrain=!1,n.emit("drain")}function eX(n,U){U.bufferProcessing=!0;var D=U.bufferedRequest;if(n._writev&&D&&D.next){var c=U.bufferedRequestCount,g=Array(c),f=U.corkedRequestsFree;f.entry=D;var h=0,W=!0;while(D){if(g[h]=D,!D.isBuf)W=!1;D=D.next,h+=1}if(g.allBuffers=W,P6(n,U,!0,U.length,g,"",f.finish),U.pendingcb++,U.lastBufferedRequest=null,f.next)U.corkedRequestsFree=f.next,f.next=null;else U.corkedRequestsFree=new oX(U);U.bufferedRequestCount=0}else{while(D){var{chunk:T,encoding:x,callback:y}=D,F=U.objectMode?1:T.length;if(P6(n,U,!1,F,T,x,y),D=D.next,U.bufferedRequestCount--,U.writing)break}if(D===null)U.lastBufferedRequest=null}U.bufferedRequest=D,U.bufferProcessing=!1}v1.prototype._write=function(n,U,D){D(Error("_write() is not implemented"))};v1.prototype._writev=null;v1.prototype.end=function(n,U,D){var c=this._writableState;if(typeof n==="function")D=n,n=null,U=null;else if(typeof U==="function")D=U,U=null;if(n!==null&&n!==void 0)this.write(n,U);if(c.corked)c.corked=1,this.uncork();if(!c.ending)dj(this,c,D)};function sX(n){return n.ending&&n.length===0&&n.bufferedRequest===null&&!n.finished&&!n.writing}function Rj(n,U){n._final(function(D){if(U.pendingcb--,D)n.emit("error",D);U.prefinished=!0,n.emit("prefinish"),U0(n,U)})}function uj(n,U){if(!U.prefinished&&!U.finalCalled)if(typeof n._final==="function")U.pendingcb++,U.finalCalled=!0,PU.nextTick(Rj,n,U);else U.prefinished=!0,n.emit("prefinish")}function U0(n,U){var D=sX(U);if(D){if(uj(n,U),U.pendingcb===0)U.finished=!0,n.emit("finish")}return D}function dj(n,U,D){if(U.ending=!0,U0(n,U),D)if(U.finished)PU.nextTick(D);else n.once("finish",D);U.ended=!0,n.writable=!1}function kj(n,U,D){var c=n.entry;n.entry=null;while(c){var g=c.callback;U.pendingcb--,g(D),c=c.next}U.corkedRequestsFree.next=n}Object.defineProperty(v1.prototype,"destroyed",{get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(n){if(!this._writableState)return;this._writableState.destroyed=n}});v1.prototype.destroy=tX.destroy;v1.prototype._undestroy=tX.undestroy;v1.prototype._destroy=function(n,U){this.end(),U(n)}});var RU=L((bc1,gJ)=>{var UJ=sc(),pj=Object.keys||function(n){var U=[];for(var D in n)U.push(D);return U};gJ.exports=H2;var DJ=Object.create(ED());DJ.inherits=wD();var cJ=d6(),u6=R6();DJ.inherits(H2,cJ);{s8=pj(u6.prototype);for(c0=0;c0<s8.length;c0++)if(g0=s8[c0],!H2.prototype[g0])H2.prototype[g0]=u6.prototype[g0]}var s8,g0,c0;function H2(n){if(!(this instanceof H2))return new H2(n);if(cJ.call(this,n),u6.call(this,n),n&&n.readable===!1)this.readable=!1;if(n&&n.writable===!1)this.writable=!1;if(this.allowHalfOpen=!0,n&&n.allowHalfOpen===!1)this.allowHalfOpen=!1;this.once("end",mj)}Object.defineProperty(H2.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function mj(){if(this.allowHalfOpen||this._writableState.ended)return;UJ.nextTick(aj,this)}function aj(n){n.end()}Object.defineProperty(H2.prototype,"destroyed",{get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(n){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=n,this._writableState.destroyed=n}});H2.prototype._destroy=function(n,U){this.push(null),this.end(),UJ.nextTick(U,n)}});var WJ=L((k6,hJ)=>{var n9=B1("buffer"),L2=n9.Buffer;function fJ(n,U){for(var D in n)U[D]=n[D]}if(L2.from&&L2.alloc&&L2.allocUnsafe&&L2.allocUnsafeSlow)hJ.exports=n9;else fJ(n9,k6),k6.Buffer=ID;function ID(n,U,D){return L2(n,U,D)}fJ(L2,ID);ID.from=function(n,U,D){if(typeof n==="number")throw TypeError("Argument must not be a number");return L2(n,U,D)};ID.alloc=function(n,U,D){if(typeof n!=="number")throw TypeError("Argument must be a number");var c=L2(n);if(U!==void 0)if(typeof D==="string")c.fill(U,D);else c.fill(U);else c.fill(0);return c};ID.allocUnsafe=function(n){if(typeof n!=="number")throw TypeError("Argument must be a number");return L2(n)};ID.allocUnsafeSlow=function(n){if(typeof n!=="number")throw TypeError("Argument must be a number");return n9.SlowBuffer(n)}});var a6=L((WI)=>{var m6=WJ().Buffer,xJ=m6.isEncoding||function(n){switch(n=""+n,n&&n.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function oj(n){if(!n)return"utf8";var U;while(!0)switch(n){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return n;default:if(U)return;n=(""+n).toLowerCase(),U=!0}}function rj(n){var U=oj(n);if(typeof U!=="string"&&(m6.isEncoding===xJ||!xJ(n)))throw Error("Unknown encoding: "+n);return U||n}WI.StringDecoder=f0;function f0(n){this.encoding=rj(n);var U;switch(this.encoding){case"utf16le":this.text=UI,this.end=DI,U=4;break;case"utf8":this.fillLast=ej,U=4;break;case"base64":this.text=cI,this.end=gI,U=3;break;default:this.write=fI,this.end=hI;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=m6.allocUnsafe(U)}f0.prototype.write=function(n){if(n.length===0)return"";var U,D;if(this.lastNeed){if(U=this.fillLast(n),U===void 0)return"";D=this.lastNeed,this.lastNeed=0}else D=0;if(D<n.length)return U?U+this.text(n,D):this.text(n,D);return U||""};f0.prototype.end=nI;f0.prototype.text=sj;f0.prototype.fillLast=function(n){if(this.lastNeed<=n.length)return n.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,this.lastTotal-this.lastNeed,0,n.length),this.lastNeed-=n.length};function p6(n){if(n<=127)return 0;else if(n>>5===6)return 2;else if(n>>4===14)return 3;else if(n>>3===30)return 4;return n>>6===2?-1:-2}function lj(n,U,D){var c=U.length-1;if(c<D)return 0;var g=p6(U[c]);if(g>=0){if(g>0)n.lastNeed=g-1;return g}if(--c<D||g===-2)return 0;if(g=p6(U[c]),g>=0){if(g>0)n.lastNeed=g-2;return g}if(--c<D||g===-2)return 0;if(g=p6(U[c]),g>=0){if(g>0)if(g===2)g=0;else n.lastNeed=g-3;return g}return 0}function tj(n,U,D){if((U[0]&192)!==128)return n.lastNeed=0,"�";if(n.lastNeed>1&&U.length>1){if((U[1]&192)!==128)return n.lastNeed=1,"�";if(n.lastNeed>2&&U.length>2){if((U[2]&192)!==128)return n.lastNeed=2,"�"}}}function ej(n){var U=this.lastTotal-this.lastNeed,D=tj(this,n,U);if(D!==void 0)return D;if(this.lastNeed<=n.length)return n.copy(this.lastChar,U,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,U,0,n.length),this.lastNeed-=n.length}function sj(n,U){var D=lj(this,n,U);if(!this.lastNeed)return n.toString("utf8",U);this.lastTotal=D;var c=n.length-(D-this.lastNeed);return n.copy(this.lastChar,0,c),n.toString("utf8",U,c)}function nI(n){var U=n&&n.length?this.write(n):"";if(this.lastNeed)return U+"�";return U}function UI(n,U){if((n.length-U)%2===0){var D=n.toString("utf16le",U);if(D){var c=D.charCodeAt(D.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1],D.slice(0,-1)}return D}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=n[n.length-1],n.toString("utf16le",U,n.length-1)}function DI(n){var U=n&&n.length?this.write(n):"";if(this.lastNeed){var D=this.lastTotal-this.lastNeed;return U+this.lastChar.toString("utf16le",0,D)}return U}function cI(n,U){var D=(n.length-U)%3;if(D===0)return n.toString("base64",U);if(this.lastNeed=3-D,this.lastTotal=3,D===1)this.lastChar[0]=n[n.length-1];else this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1];return n.toString("base64",U,n.length-D)}function gI(n){var U=n&&n.length?this.write(n):"";if(this.lastNeed)return U+this.lastChar.toString("base64",0,3-this.lastNeed);return U}function fI(n){return n.toString(this.encoding)}function hI(n){return n&&n.length?this.write(n):""}});var d6=L((qc1,GJ)=>{var SD=sc();GJ.exports=b1;var TI=vX(),h0;b1.ReadableState=$J;var Oc1=B1("events").EventEmitter,iJ=function(n,U){return n.listeners(U).length},e6=B1("stream"),W0=m8().Buffer,yI=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function FI(n){return W0.from(n)}function iI(n){return W0.isBuffer(n)||n instanceof yI}var XJ=Object.create(ED());XJ.inherits=wD();var o6=B1("util"),F1=void 0;if(o6&&o6.debuglog)F1=o6.debuglog("stream");else F1=function(){};var XI=dX(),JJ=N6(),_D;XJ.inherits(b1,e6);var r6=["error","close","destroy","pause","resume"];function JI(n,U,D){if(typeof n.prependListener==="function")return n.prependListener(U,D);if(!n._events||!n._events[U])n.on(U,D);else if(TI(n._events[U]))n._events[U].unshift(D);else n._events[U]=[D,n._events[U]]}function $J(n,U){h0=h0||RU(),n=n||{};var D=U instanceof h0;if(this.objectMode=!!n.objectMode,D)this.objectMode=this.objectMode||!!n.readableObjectMode;var{highWaterMark:c,readableHighWaterMark:g}=n,f=this.objectMode?16:16384;if(c||c===0)this.highWaterMark=c;else if(D&&(g||g===0))this.highWaterMark=g;else this.highWaterMark=f;if(this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new XI,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=n.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,n.encoding){if(!_D)_D=a6().StringDecoder;this.decoder=new _D(n.encoding),this.encoding=n.encoding}}function b1(n){if(h0=h0||RU(),!(this instanceof b1))return new b1(n);if(this._readableState=new $J(n,this),this.readable=!0,n){if(typeof n.read==="function")this._read=n.read;if(typeof n.destroy==="function")this._destroy=n.destroy}e6.call(this)}Object.defineProperty(b1.prototype,"destroyed",{get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(n){if(!this._readableState)return;this._readableState.destroyed=n}});b1.prototype.destroy=JJ.destroy;b1.prototype._undestroy=JJ.undestroy;b1.prototype._destroy=function(n,U){this.push(null),U(n)};b1.prototype.push=function(n,U){var D=this._readableState,c;if(!D.objectMode){if(typeof n==="string"){if(U=U||D.defaultEncoding,U!==D.encoding)n=W0.from(n,U),U="";c=!0}}else c=!0;return VJ(this,n,U,!1,c)};b1.prototype.unshift=function(n){return VJ(this,n,null,!0,!1)};function VJ(n,U,D,c,g){var f=n._readableState;if(U===null)f.reading=!1,YI(n,f);else{var h;if(!g)h=$I(f,U);if(h)n.emit("error",h);else if(f.objectMode||U&&U.length>0){if(typeof U!=="string"&&!f.objectMode&&Object.getPrototypeOf(U)!==W0.prototype)U=FI(U);if(c)if(f.endEmitted)n.emit("error",Error("stream.unshift() after end event"));else l6(n,f,U,!0);else if(f.ended)n.emit("error",Error("stream.push() after EOF"));else if(f.reading=!1,f.decoder&&!D)if(U=f.decoder.write(U),f.objectMode||U.length!==0)l6(n,f,U,!1);else QJ(n,f);else l6(n,f,U,!1)}else if(!c)f.reading=!1}return VI(f)}function l6(n,U,D,c){if(U.flowing&&U.length===0&&!U.sync)n.emit("data",D),n.read(0);else{if(U.length+=U.objectMode?1:D.length,c)U.buffer.unshift(D);else U.buffer.push(D);if(U.needReadable)U9(n)}QJ(n,U)}function $I(n,U){var D;if(!iI(U)&&typeof U!=="string"&&U!==void 0&&!n.objectMode)D=TypeError("Invalid non-string/buffer chunk");return D}function VI(n){return!n.ended&&(n.needReadable||n.length<n.highWaterMark||n.length===0)}b1.prototype.isPaused=function(){return this._readableState.flowing===!1};b1.prototype.setEncoding=function(n){if(!_D)_D=a6().StringDecoder;return this._readableState.decoder=new _D(n),this._readableState.encoding=n,this};var TJ=8388608;function QI(n){if(n>=TJ)n=TJ;else n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++;return n}function yJ(n,U){if(n<=0||U.length===0&&U.ended)return 0;if(U.objectMode)return 1;if(n!==n)if(U.flowing&&U.length)return U.buffer.head.data.length;else return U.length;if(n>U.highWaterMark)U.highWaterMark=QI(n);if(n<=U.length)return n;if(!U.ended)return U.needReadable=!0,0;return U.length}b1.prototype.read=function(n){F1("read",n),n=parseInt(n,10);var U=this._readableState,D=n;if(n!==0)U.emittedReadable=!1;if(n===0&&U.needReadable&&(U.length>=U.highWaterMark||U.ended)){if(F1("read: emitReadable",U.length,U.ended),U.length===0&&U.ended)t6(this);else U9(this);return null}if(n=yJ(n,U),n===0&&U.ended){if(U.length===0)t6(this);return null}var c=U.needReadable;if(F1("need readable",c),U.length===0||U.length-n<U.highWaterMark)c=!0,F1("length less than watermark",c);if(U.ended||U.reading)c=!1,F1("reading or ended",c);else if(c){if(F1("do read"),U.reading=!0,U.sync=!0,U.length===0)U.needReadable=!0;if(this._read(U.highWaterMark),U.sync=!1,!U.reading)n=yJ(D,U)}var g;if(n>0)g=YJ(n,U);else g=null;if(g===null)U.needReadable=!0,n=0;else U.length-=n;if(U.length===0){if(!U.ended)U.needReadable=!0;if(D!==n&&U.ended)t6(this)}if(g!==null)this.emit("data",g);return g};function YI(n,U){if(U.ended)return;if(U.decoder){var D=U.decoder.end();if(D&&D.length)U.buffer.push(D),U.length+=U.objectMode?1:D.length}U.ended=!0,U9(n)}function U9(n){var U=n._readableState;if(U.needReadable=!1,!U.emittedReadable)if(F1("emitReadable",U.flowing),U.emittedReadable=!0,U.sync)SD.nextTick(FJ,n);else FJ(n)}function FJ(n){F1("emit readable"),n.emit("readable"),s6(n)}function QJ(n,U){if(!U.readingMore)U.readingMore=!0,SD.nextTick(BI,n,U)}function BI(n,U){var D=U.length;while(!U.reading&&!U.flowing&&!U.ended&&U.length<U.highWaterMark)if(F1("maybeReadMore read 0"),n.read(0),D===U.length)break;else D=U.length;U.readingMore=!1}b1.prototype._read=function(n){this.emit("error",Error("_read() is not implemented"))};b1.prototype.pipe=function(n,U){var D=this,c=this._readableState;switch(c.pipesCount){case 0:c.pipes=n;break;case 1:c.pipes=[c.pipes,n];break;default:c.pipes.push(n);break}c.pipesCount+=1,F1("pipe count=%d opts=%j",c.pipesCount,U);var g=(!U||U.end!==!1)&&n!==process.stdout&&n!==process.stderr,f=g?W:Y;if(c.endEmitted)SD.nextTick(f);else D.once("end",f);n.on("unpipe",h);function h(V,G){if(F1("onunpipe"),V===D){if(G&&G.hasUnpiped===!1)G.hasUnpiped=!0,y()}}function W(){F1("onend"),n.end()}var T=GI(D);n.on("drain",T);var x=!1;function y(){if(F1("cleanup"),n.removeListener("close",$),n.removeListener("finish",Q),n.removeListener("drain",T),n.removeListener("error",X),n.removeListener("unpipe",h),D.removeListener("end",W),D.removeListener("end",Y),D.removeListener("data",i),x=!0,c.awaitDrain&&(!n._writableState||n._writableState.needDrain))T()}var F=!1;D.on("data",i);function i(V){F1("ondata"),F=!1;var G=n.write(V);if(G===!1&&!F){if((c.pipesCount===1&&c.pipes===n||c.pipesCount>1&&BJ(c.pipes,n)!==-1)&&!x)F1("false write response, pause",c.awaitDrain),c.awaitDrain++,F=!0;D.pause()}}function X(V){if(F1("onerror",V),Y(),n.removeListener("error",X),iJ(n,"error")===0)n.emit("error",V)}JI(n,"error",X);function $(){n.removeListener("finish",Q),Y()}n.once("close",$);function Q(){F1("onfinish"),n.removeListener("close",$),Y()}n.once("finish",Q);function Y(){F1("unpipe"),D.unpipe(n)}if(n.emit("pipe",D),!c.flowing)F1("pipe resume"),D.resume();return n};function GI(n){return function(){var U=n._readableState;if(F1("pipeOnDrain",U.awaitDrain),U.awaitDrain)U.awaitDrain--;if(U.awaitDrain===0&&iJ(n,"data"))U.flowing=!0,s6(n)}}b1.prototype.unpipe=function(n){var U=this._readableState,D={hasUnpiped:!1};if(U.pipesCount===0)return this;if(U.pipesCount===1){if(n&&n!==U.pipes)return this;if(!n)n=U.pipes;if(U.pipes=null,U.pipesCount=0,U.flowing=!1,n)n.emit("unpipe",this,D);return this}if(!n){var{pipes:c,pipesCount:g}=U;U.pipes=null,U.pipesCount=0,U.flowing=!1;for(var f=0;f<g;f++)c[f].emit("unpipe",this,{hasUnpiped:!1});return this}var h=BJ(U.pipes,n);if(h===-1)return this;if(U.pipes.splice(h,1),U.pipesCount-=1,U.pipesCount===1)U.pipes=U.pipes[0];return n.emit("unpipe",this,D),this};b1.prototype.on=function(n,U){var D=e6.prototype.on.call(this,n,U);if(n==="data"){if(this._readableState.flowing!==!1)this.resume()}else if(n==="readable"){var c=this._readableState;if(!c.endEmitted&&!c.readableListening){if(c.readableListening=c.needReadable=!0,c.emittedReadable=!1,!c.reading)SD.nextTick(KI,this);else if(c.length)U9(this)}}return D};b1.prototype.addListener=b1.prototype.on;function KI(n){F1("readable nexttick read 0"),n.read(0)}b1.prototype.resume=function(){var n=this._readableState;if(!n.flowing)F1("resume"),n.flowing=!0,ZI(this,n);return this};function ZI(n,U){if(!U.resumeScheduled)U.resumeScheduled=!0,SD.nextTick(bI,n,U)}function bI(n,U){if(!U.reading)F1("resume read 0"),n.read(0);if(U.resumeScheduled=!1,U.awaitDrain=0,n.emit("resume"),s6(n),U.flowing&&!U.reading)n.read(0)}b1.prototype.pause=function(){if(F1("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)F1("pause"),this._readableState.flowing=!1,this.emit("pause");return this};function s6(n){var U=n._readableState;F1("flow",U.flowing);while(U.flowing&&n.read()!==null);}b1.prototype.wrap=function(n){var U=this,D=this._readableState,c=!1;n.on("end",function(){if(F1("wrapped end"),D.decoder&&!D.ended){var h=D.decoder.end();if(h&&h.length)U.push(h)}U.push(null)}),n.on("data",function(h){if(F1("wrapped data"),D.decoder)h=D.decoder.write(h);if(D.objectMode&&(h===null||h===void 0))return;else if(!D.objectMode&&(!h||!h.length))return;var W=U.push(h);if(!W)c=!0,n.pause()});for(var g in n)if(this[g]===void 0&&typeof n[g]==="function")this[g]=function(h){return function(){return n[h].apply(n,arguments)}}(g);for(var f=0;f<r6.length;f++)n.on(r6[f],this.emit.bind(this,r6[f]));return this._read=function(h){if(F1("wrapped _read",h),c)c=!1,n.resume()},this};Object.defineProperty(b1.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});b1._fromList=YJ;function YJ(n,U){if(U.length===0)return null;var D;if(U.objectMode)D=U.buffer.shift();else if(!n||n>=U.length){if(U.decoder)D=U.buffer.join("");else if(U.buffer.length===1)D=U.buffer.head.data;else D=U.buffer.concat(U.length);U.buffer.clear()}else D=zI(n,U.buffer,U.decoder);return D}function zI(n,U,D){var c;if(n<U.head.data.length)c=U.head.data.slice(0,n),U.head.data=U.head.data.slice(n);else if(n===U.head.data.length)c=U.shift();else c=D?OI(n,U):qI(n,U);return c}function OI(n,U){var D=U.head,c=1,g=D.data;n-=g.length;while(D=D.next){var f=D.data,h=n>f.length?f.length:n;if(h===f.length)g+=f;else g+=f.slice(0,n);if(n-=h,n===0){if(h===f.length)if(++c,D.next)U.head=D.next;else U.head=U.tail=null;else U.head=D,D.data=f.slice(h);break}++c}return U.length-=c,g}function qI(n,U){var D=W0.allocUnsafe(n),c=U.head,g=1;c.data.copy(D),n-=c.data.length;while(c=c.next){var f=c.data,h=n>f.length?f.length:n;if(f.copy(D,D.length-n,0,h),n-=h,n===0){if(h===f.length)if(++g,c.next)U.head=c.next;else U.head=U.tail=null;else U.head=c,c.data=f.slice(h);break}++g}return U.length-=g,D}function t6(n){var U=n._readableState;if(U.length>0)throw Error('"endReadable()" called on non-empty stream');if(!U.endEmitted)U.ended=!0,SD.nextTick(MI,U,n)}function MI(n,U){if(!n.endEmitted&&n.length===0)n.endEmitted=!0,U.readable=!1,U.emit("end")}function BJ(n,U){for(var D=0,c=n.length;D<c;D++)if(n[D]===U)return D;return-1}});var n7=L((Mc1,bJ)=>{bJ.exports=C2;var D9=RU(),ZJ=Object.create(ED());ZJ.inherits=wD();ZJ.inherits(C2,D9);function AI(n,U){var D=this._transformState;D.transforming=!1;var c=D.writecb;if(!c)return this.emit("error",Error("write callback called multiple times"));if(D.writechunk=null,D.writecb=null,U!=null)this.push(U);c(n);var g=this._readableState;if(g.reading=!1,g.needReadable||g.length<g.highWaterMark)this._read(g.highWaterMark)}function C2(n){if(!(this instanceof C2))return new C2(n);if(D9.call(this,n),this._transformState={afterTransform:AI.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,n){if(typeof n.transform==="function")this._transform=n.transform;if(typeof n.flush==="function")this._flush=n.flush}this.on("prefinish",HI)}function HI(){var n=this;if(typeof this._flush==="function")this._flush(function(U,D){KJ(n,U,D)});else KJ(this,null,null)}C2.prototype.push=function(n,U){return this._transformState.needTransform=!1,D9.prototype.push.call(this,n,U)};C2.prototype._transform=function(n,U,D){throw Error("_transform() is not implemented")};C2.prototype._write=function(n,U,D){var c=this._transformState;if(c.writecb=D,c.writechunk=n,c.writeencoding=U,!c.transforming){var g=this._readableState;if(c.needTransform||g.needReadable||g.length<g.highWaterMark)this._read(g.highWaterMark)}};C2.prototype._read=function(n){var U=this._transformState;if(U.writechunk!==null&&U.writecb&&!U.transforming)U.transforming=!0,this._transform(U.writechunk,U.writeencoding,U.afterTransform);else U.needTransform=!0};C2.prototype._destroy=function(n,U){var D=this;D9.prototype._destroy.call(this,n,function(c){U(c),D.emit("close")})};function KJ(n,U,D){if(U)return n.emit("error",U);if(D!=null)n.push(D);if(n._writableState.length)throw Error("Calling transform done when ws.length != 0");if(n._transformState.transforming)throw Error("Calling transform done when still transforming");return n.push(null)}});var MJ=L((Ac1,qJ)=>{qJ.exports=x0;var zJ=n7(),OJ=Object.create(ED());OJ.inherits=wD();OJ.inherits(x0,zJ);function x0(n){if(!(this instanceof x0))return new x0(n);zJ.call(this,n)}x0.prototype._transform=function(n,U,D){D(null,n)}});var U7=L((t1,c9)=>{var W2=B1("stream");if(process.env.READABLE_STREAM==="disable"&&W2)c9.exports=W2,t1=c9.exports=W2.Readable,t1.Readable=W2.Readable,t1.Writable=W2.Writable,t1.Duplex=W2.Duplex,t1.Transform=W2.Transform,t1.PassThrough=W2.PassThrough,t1.Stream=W2;else t1=c9.exports=d6(),t1.Stream=W2||t1,t1.Readable=t1,t1.Writable=R6(),t1.Duplex=RU(),t1.Transform=n7(),t1.PassThrough=MJ()});var E2=L((CI)=>{CI.base64=!0;CI.array=!0;CI.string=!0;CI.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u";CI.nodebuffer=typeof Buffer<"u";CI.uint8array=typeof Uint8Array<"u";if(typeof ArrayBuffer>"u")CI.blob=!1;else{g9=new ArrayBuffer(0);try{CI.blob=new Blob([g9],{type:"application/zip"}).size===0}catch(n){try{c7=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,f9=new c7,f9.append(g9),CI.blob=f9.getBlob("application/zip").size===0}catch(U){CI.blob=!1}}}var g9,c7,f9;try{CI.nodestream=!!U7().Readable}catch(n){CI.nodestream=!1}});var g7=L((PI)=>{var vI=L1(),NI=E2(),x2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";PI.encode=function(n){var U=[],D,c,g,f,h,W,T,x=0,y=n.length,F=y,i=vI.getTypeOf(n)!=="string";while(x<n.length){if(F=y-x,!i)D=n.charCodeAt(x++),c=x<y?n.charCodeAt(x++):0,g=x<y?n.charCodeAt(x++):0;else D=n[x++],c=x<y?n[x++]:0,g=x<y?n[x++]:0;f=D>>2,h=(D&3)<<4|c>>4,W=F>1?(c&15)<<2|g>>6:64,T=F>2?g&63:64,U.push(x2.charAt(f)+x2.charAt(h)+x2.charAt(W)+x2.charAt(T))}return U.join("")};PI.decode=function(n){var U,D,c,g,f,h,W,T=0,x=0,y="data:";if(n.substr(0,y.length)===y)throw Error("Invalid base64 input, it looks like a data url.");n=n.replace(/[^A-Za-z0-9+/=]/g,"");var F=n.length*3/4;if(n.charAt(n.length-1)===x2.charAt(64))F--;if(n.charAt(n.length-2)===x2.charAt(64))F--;if(F%1!==0)throw Error("Invalid base64 input, bad content length.");var i;if(NI.uint8array)i=new Uint8Array(F|0);else i=Array(F|0);while(T<n.length){if(g=x2.indexOf(n.charAt(T++)),f=x2.indexOf(n.charAt(T++)),h=x2.indexOf(n.charAt(T++)),W=x2.indexOf(n.charAt(T++)),U=g<<2|f>>4,D=(f&15)<<4|h>>2,c=(h&3)<<6|W,i[x++]=U,h!==64)i[x++]=D;if(W!==64)i[x++]=c}return i}});var T0=L((Cc1,AJ)=>{AJ.exports={isNode:typeof Buffer<"u",newBufferFrom:function(n,U){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(n,U);else{if(typeof n==="number")throw Error('The "data" argument must not be a number');return new Buffer(n,U)}},allocBuffer:function(n){if(Buffer.alloc)return Buffer.alloc(n);else{var U=new Buffer(n);return U.fill(0),U}},isBuffer:function(n){return Buffer.isBuffer(n)},isStream:function(n){return n&&typeof n.on==="function"&&typeof n.pause==="function"&&typeof n.resume==="function"}}});var CJ=L((wc1,LJ)=>{var Ec1=global.MutationObserver||global.WebKitMutationObserver,HJ;HJ=function(){process.nextTick(aI)};var dI,kI,pI,mI,f7,y0=[];function aI(){f7=!0;var n,U,D=y0.length;while(D){U=y0,y0=[],n=-1;while(++n<D)U[n]();D=y0.length}f7=!1}LJ.exports=oI;function oI(n){if(y0.push(n)===1&&!f7)HJ()}});var vJ=L((jc1,SJ)=>{var EJ=CJ();function ND(){}var hn={},wJ=["REJECTED"],h7=["FULFILLED"],jJ=["PENDING"];vD=["UNHANDLED"];var vD;SJ.exports=hU;function hU(n){if(typeof n!=="function")throw TypeError("resolver must be a function");if(this.state=jJ,this.queue=[],this.outcome=void 0,this.handled=vD,n!==ND)IJ(this,n)}hU.prototype.finally=function(n){if(typeof n!=="function")return this;var U=this.constructor;return this.then(D,c);function D(g){function f(){return g}return U.resolve(n()).then(f)}function c(g){function f(){throw g}return U.resolve(n()).then(f)}};hU.prototype.catch=function(n){return this.then(null,n)};hU.prototype.then=function(n,U){if(typeof n!=="function"&&this.state===h7||typeof U!=="function"&&this.state===wJ)return this;var D=new this.constructor(ND);if(this.handled===vD)this.handled=null;if(this.state!==jJ){var c=this.state===h7?n:U;W7(D,c,this.outcome)}else this.queue.push(new F0(D,n,U));return D};function F0(n,U,D){if(this.promise=n,typeof U==="function")this.onFulfilled=U,this.callFulfilled=this.otherCallFulfilled;if(typeof D==="function")this.onRejected=D,this.callRejected=this.otherCallRejected}F0.prototype.callFulfilled=function(n){hn.resolve(this.promise,n)};F0.prototype.otherCallFulfilled=function(n){W7(this.promise,this.onFulfilled,n)};F0.prototype.callRejected=function(n){hn.reject(this.promise,n)};F0.prototype.otherCallRejected=function(n){W7(this.promise,this.onRejected,n)};function W7(n,U,D){EJ(function(){var c;try{c=U(D)}catch(g){return hn.reject(n,g)}if(c===n)hn.reject(n,TypeError("Cannot resolve promise with itself"));else hn.resolve(n,c)})}hn.resolve=function(n,U){var D=_J(rI,U);if(D.status==="error")return hn.reject(n,D.value);var c=D.value;if(c)IJ(n,c);else{n.state=h7,n.outcome=U;var g=-1,f=n.queue.length;while(++g<f)n.queue[g].callFulfilled(U)}return n};hn.reject=function(n,U){if(n.state=wJ,n.outcome=U,n.handled===vD)EJ(function(){if(n.handled===vD)process.emit("unhandledRejection",U,n)});var D=-1,c=n.queue.length;while(++D<c)n.queue[D].callRejected(U);return n};function rI(n){var U=n&&n.then;if(n&&(typeof n==="object"||typeof n==="function")&&typeof U==="function")return function(){U.apply(n,arguments)}}function IJ(n,U){var D=!1;function c(W){if(D)return;D=!0,hn.reject(n,W)}function g(W){if(D)return;D=!0,hn.resolve(n,W)}function f(){U(g,c)}var h=_J(f);if(h.status==="error")c(h.value)}function _J(n,U){var D={};try{D.value=n(U),D.status="success"}catch(c){D.status="error",D.value=c}return D}hU.resolve=lI;function lI(n){if(n instanceof this)return n;return hn.resolve(new this(ND),n)}hU.reject=tI;function tI(n){var U=new this(ND);return hn.reject(U,n)}hU.all=eI;function eI(n){var U=this;if(Object.prototype.toString.call(n)!=="[object Array]")return this.reject(TypeError("must be an array"));var D=n.length,c=!1;if(!D)return this.resolve([]);var g=Array(D),f=0,h=-1,W=new this(ND);while(++h<D)T(n[h],h);return W;function T(x,y){U.resolve(x).then(F,function(i){if(!c)c=!0,hn.reject(W,i)});function F(i){if(g[y]=i,++f===D&&!c)c=!0,hn.resolve(W,g)}}}hU.race=sI;function sI(n){var U=this;if(Object.prototype.toString.call(n)!=="[object Array]")return this.reject(TypeError("must be an array"));var D=n.length,c=!1;if(!D)return this.resolve([]);var g=-1,f=new this(ND);while(++g<D)h(n[g]);return f;function h(W){U.resolve(W).then(function(T){if(!c)c=!0,hn.resolve(f,T)},function(T){if(!c)c=!0,hn.reject(f,T)})}}});var PD=L((Ic1,NJ)=>{var x7=null;if(typeof Promise<"u")x7=Promise;else x7=vJ();NJ.exports={Promise:x7}});var RJ=L((PJ)=>{(function(n,U){if(n.setImmediate)return;var D=1,c={},g=!1,f=n.document,h;function W(G){if(typeof G!=="function")G=Function(""+G);var J=Array(arguments.length-1);for(var B=0;B<J.length;B++)J[B]=arguments[B+1];var z={callback:G,args:J};return c[D]=z,h(D),D++}function T(G){delete c[G]}function x(G){var{callback:J,args:B}=G;switch(B.length){case 0:J();break;case 1:J(B[0]);break;case 2:J(B[0],B[1]);break;case 3:J(B[0],B[1],B[2]);break;default:J.apply(U,B);break}}function y(G){if(g)setTimeout(y,0,G);else{var J=c[G];if(J){g=!0;try{x(J)}finally{T(G),g=!1}}}}function F(){h=function(G){process.nextTick(function(){y(G)})}}function i(){if(n.postMessage&&!n.importScripts){var G=!0,J=n.onmessage;return n.onmessage=function(){G=!1},n.postMessage("","*"),n.onmessage=J,G}}function X(){var G="setImmediate$"+Math.random()+"$",J=function(B){if(B.source===n&&typeof B.data==="string"&&B.data.indexOf(G)===0)y(+B.data.slice(G.length))};if(n.addEventListener)n.addEventListener("message",J,!1);else n.attachEvent("onmessage",J);h=function(B){n.postMessage(G+B,"*")}}function $(){var G=new MessageChannel;G.port1.onmessage=function(J){var B=J.data;y(B)},h=function(J){G.port2.postMessage(J)}}function Q(){var G=f.documentElement;h=function(J){var B=f.createElement("script");B.onreadystatechange=function(){y(J),B.onreadystatechange=null,G.removeChild(B),B=null},G.appendChild(B)}}function Y(){h=function(G){setTimeout(y,0,G)}}var V=Object.getPrototypeOf&&Object.getPrototypeOf(n);if(V=V&&V.setTimeout?V:n,{}.toString.call(n.process)==="[object process]")F();else if(i())X();else if(n.MessageChannel)$();else if(f&&"onreadystatechange"in f.createElement("script"))Q();else Y();V.setImmediate=W,V.clearImmediate=T})(typeof self>"u"?typeof global>"u"?PJ:global:self)});var L1=L((D_)=>{var WU=E2(),n_=g7(),RD=T0(),T7=PD();RJ();function U_(n){var U=null;if(WU.uint8array)U=new Uint8Array(n.length);else U=Array(n.length);return W9(n,U)}D_.newBlob=function(n,U){D_.checkSupport("blob");try{return new Blob([n],{type:U})}catch(g){try{var D=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,c=new D;return c.append(n),c.getBlob(U)}catch(f){throw Error("Bug : can't construct the Blob.")}}};function i0(n){return n}function W9(n,U){for(var D=0;D<n.length;++D)U[D]=n.charCodeAt(D)&255;return U}var h9={stringifyByChunk:function(n,U,D){var c=[],g=0,f=n.length;if(f<=D)return String.fromCharCode.apply(null,n);while(g<f){if(U==="array"||U==="nodebuffer")c.push(String.fromCharCode.apply(null,n.slice(g,Math.min(g+D,f))));else c.push(String.fromCharCode.apply(null,n.subarray(g,Math.min(g+D,f))));g+=D}return c.join("")},stringifyByChar:function(n){var U="";for(var D=0;D<n.length;D++)U+=String.fromCharCode(n[D]);return U},applyCanBeUsed:{uint8array:function(){try{return WU.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch(n){return!1}}(),nodebuffer:function(){try{return WU.nodebuffer&&String.fromCharCode.apply(null,RD.allocBuffer(1)).length===1}catch(n){return!1}}()}};function X0(n){var U=65536,D=D_.getTypeOf(n),c=!0;if(D==="uint8array")c=h9.applyCanBeUsed.uint8array;else if(D==="nodebuffer")c=h9.applyCanBeUsed.nodebuffer;if(c)while(U>1)try{return h9.stringifyByChunk(n,D,U)}catch(g){U=Math.floor(U/2)}return h9.stringifyByChar(n)}D_.applyFromCharCode=X0;function x9(n,U){for(var D=0;D<n.length;D++)U[D]=n[D];return U}var xU={};xU.string={string:i0,array:function(n){return W9(n,Array(n.length))},arraybuffer:function(n){return xU.string.uint8array(n).buffer},uint8array:function(n){return W9(n,new Uint8Array(n.length))},nodebuffer:function(n){return W9(n,RD.allocBuffer(n.length))}};xU.array={string:X0,array:i0,arraybuffer:function(n){return new Uint8Array(n).buffer},uint8array:function(n){return new Uint8Array(n)},nodebuffer:function(n){return RD.newBufferFrom(n)}};xU.arraybuffer={string:function(n){return X0(new Uint8Array(n))},array:function(n){return x9(new Uint8Array(n),Array(n.byteLength))},arraybuffer:i0,uint8array:function(n){return new Uint8Array(n)},nodebuffer:function(n){return RD.newBufferFrom(new Uint8Array(n))}};xU.uint8array={string:X0,array:function(n){return x9(n,Array(n.length))},arraybuffer:function(n){return n.buffer},uint8array:i0,nodebuffer:function(n){return RD.newBufferFrom(n)}};xU.nodebuffer={string:X0,array:function(n){return x9(n,Array(n.length))},arraybuffer:function(n){return xU.nodebuffer.uint8array(n).buffer},uint8array:function(n){return x9(n,new Uint8Array(n.length))},nodebuffer:i0};D_.transformTo=function(n,U){if(!U)U="";if(!n)return U;D_.checkSupport(n);var D=D_.getTypeOf(U),c=xU[D][n](U);return c};D_.resolve=function(n){var U=n.split("/"),D=[];for(var c=0;c<U.length;c++){var g=U[c];if(g==="."||g===""&&c!==0&&c!==U.length-1)continue;else if(g==="..")D.pop();else D.push(g)}return D.join("/")};D_.getTypeOf=function(n){if(typeof n==="string")return"string";if(Object.prototype.toString.call(n)==="[object Array]")return"array";if(WU.nodebuffer&&RD.isBuffer(n))return"nodebuffer";if(WU.uint8array&&n instanceof Uint8Array)return"uint8array";if(WU.arraybuffer&&n instanceof ArrayBuffer)return"arraybuffer"};D_.checkSupport=function(n){var U=WU[n.toLowerCase()];if(!U)throw Error(n+" is not supported by this platform")};D_.MAX_VALUE_16BITS=65535;D_.MAX_VALUE_32BITS=-1;D_.pretty=function(n){var U="",D,c;for(c=0;c<(n||"").length;c++)D=n.charCodeAt(c),U+="\\x"+(D<16?"0":"")+D.toString(16).toUpperCase();return U};D_.delay=function(n,U,D){setImmediate(function(){n.apply(D||null,U||[])})};D_.inherits=function(n,U){var D=function(){};D.prototype=U.prototype,n.prototype=new D};D_.extend=function(){var n={},U,D;for(U=0;U<arguments.length;U++)for(D in arguments[U])if(Object.prototype.hasOwnProperty.call(arguments[U],D)&&typeof n[D]>"u")n[D]=arguments[U][D];return n};D_.prepareContent=function(n,U,D,c,g){var f=T7.Promise.resolve(U).then(function(h){var W=WU.blob&&(h instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(h))!==-1);if(W&&typeof FileReader<"u")return new T7.Promise(function(T,x){var y=new FileReader;y.onload=function(F){T(F.target.result)},y.onerror=function(F){x(F.target.error)},y.readAsArrayBuffer(h)});else return h});return f.then(function(h){var W=D_.getTypeOf(h);if(!W)return T7.Promise.reject(Error("Can't read the data of '"+n+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));if(W==="arraybuffer")h=D_.transformTo("uint8array",h);else if(W==="string"){if(g)h=n_.decode(h);else if(D){if(c!==!0)h=U_(h)}}return h})}});var Mn=L((vc1,pJ)=>{function kJ(n){this.name=n||"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}kJ.prototype={push:function(n){this.emit("data",n)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(n){this.emit("error",n)}return!0},error:function(n){if(this.isFinished)return!1;if(this.isPaused)this.generatedError=n;else{if(this.isFinished=!0,this.emit("error",n),this.previous)this.previous.error(n);this.cleanUp()}return!0},on:function(n,U){return this._listeners[n].push(U),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(n,U){if(this._listeners[n])for(var D=0;D<this._listeners[n].length;D++)this._listeners[n][D].call(this,U)},pipe:function(n){return n.registerPrevious(this)},registerPrevious:function(n){if(this.isLocked)throw Error("The stream '"+this+"' has already been used.");this.streamInfo=n.streamInfo,this.mergeStreamInfo(),this.previous=n;var U=this;return n.on("data",function(D){U.processChunk(D)}),n.on("end",function(){U.end()}),n.on("error",function(D){U.error(D)}),this},pause:function(){if(this.isPaused||this.isFinished)return!1;if(this.isPaused=!0,this.previous)this.previous.pause();return!0},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var n=!1;if(this.generatedError)this.error(this.generatedError),n=!0;if(this.previous)this.previous.resume();return!n},flush:function(){},processChunk:function(n){this.push(n)},withStreamInfo:function(n,U){return this.extraStreamInfo[n]=U,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var n in this.extraStreamInfo){if(!Object.prototype.hasOwnProperty.call(this.extraStreamInfo,n))continue;this.streamInfo[n]=this.extraStreamInfo[n]}},lock:function(){if(this.isLocked)throw Error("The stream '"+this+"' has already been used.");if(this.isLocked=!0,this.previous)this.previous.lock()},toString:function(){var n="Worker "+this.name;if(this.previous)return this.previous+" -> "+n;else return n}};pJ.exports=kJ});var dD=L((Q_)=>{var uD=L1(),uU=E2(),X_=T0(),T9=Mn(),J0=Array(256);for(T2=0;T2<256;T2++)J0[T2]=T2>=252?6:T2>=248?5:T2>=240?4:T2>=224?3:T2>=192?2:1;var T2;J0[254]=J0[254]=1;var J_=function(n){var U,D,c,g,f,h=n.length,W=0;for(g=0;g<h;g++){if(D=n.charCodeAt(g),(D&64512)===55296&&g+1<h){if(c=n.charCodeAt(g+1),(c&64512)===56320)D=65536+(D-55296<<10)+(c-56320),g++}W+=D<128?1:D<2048?2:D<65536?3:4}if(uU.uint8array)U=new Uint8Array(W);else U=Array(W);for(f=0,g=0;f<W;g++){if(D=n.charCodeAt(g),(D&64512)===55296&&g+1<h){if(c=n.charCodeAt(g+1),(c&64512)===56320)D=65536+(D-55296<<10)+(c-56320),g++}if(D<128)U[f++]=D;else if(D<2048)U[f++]=192|D>>>6,U[f++]=128|D&63;else if(D<65536)U[f++]=224|D>>>12,U[f++]=128|D>>>6&63,U[f++]=128|D&63;else U[f++]=240|D>>>18,U[f++]=128|D>>>12&63,U[f++]=128|D>>>6&63,U[f++]=128|D&63}return U},$_=function(n,U){var D;if(U=U||n.length,U>n.length)U=n.length;D=U-1;while(D>=0&&(n[D]&192)===128)D--;if(D<0)return U;if(D===0)return U;return D+J0[n[D]]>U?D:U},V_=function(n){var U,D,c,g,f=n.length,h=Array(f*2);for(D=0,U=0;U<f;){if(c=n[U++],c<128){h[D++]=c;continue}if(g=J0[c],g>4){h[D++]=65533,U+=g-1;continue}c&=g===2?31:g===3?15:7;while(g>1&&U<f)c=c<<6|n[U++]&63,g--;if(g>1){h[D++]=65533;continue}if(c<65536)h[D++]=c;else c-=65536,h[D++]=55296|c>>10&1023,h[D++]=56320|c&1023}if(h.length!==D)if(h.subarray)h=h.subarray(0,D);else h.length=D;return uD.applyFromCharCode(h)};Q_.utf8encode=function(U){if(uU.nodebuffer)return X_.newBufferFrom(U,"utf-8");return J_(U)};Q_.utf8decode=function(U){if(uU.nodebuffer)return uD.transformTo("nodebuffer",U).toString("utf-8");return U=uD.transformTo(uU.uint8array?"uint8array":"array",U),V_(U)};function y9(){T9.call(this,"utf-8 decode"),this.leftOver=null}uD.inherits(y9,T9);y9.prototype.processChunk=function(n){var U=uD.transformTo(uU.uint8array?"uint8array":"array",n.data);if(this.leftOver&&this.leftOver.length){if(uU.uint8array){var D=U;U=new Uint8Array(D.length+this.leftOver.length),U.set(this.leftOver,0),U.set(D,this.leftOver.length)}else U=this.leftOver.concat(U);this.leftOver=null}var c=$_(U),g=U;if(c!==U.length)if(uU.uint8array)g=U.subarray(0,c),this.leftOver=U.subarray(c,U.length);else g=U.slice(0,c),this.leftOver=U.slice(c,U.length);this.push({data:Q_.utf8decode(g),meta:n.meta})};y9.prototype.flush=function(){if(this.leftOver&&this.leftOver.length)this.push({data:Q_.utf8decode(this.leftOver),meta:{}}),this.leftOver=null};Q_.Utf8DecodeWorker=y9;function F7(){T9.call(this,"utf-8 encode")}uD.inherits(F7,T9);F7.prototype.processChunk=function(n){this.push({data:Q_.utf8encode(n.data),meta:n.meta})};Q_.Utf8EncodeWorker=F7});var lJ=L((Pc1,rJ)=>{var aJ=Mn(),oJ=L1();function X7(n){aJ.call(this,"ConvertWorker to "+n),this.destType=n}oJ.inherits(X7,aJ);X7.prototype.processChunk=function(n){this.push({data:oJ.transformTo(this.destType,n.data),meta:n.meta})};rJ.exports=X7});var sJ=L((Rc1,eJ)=>{var tJ=U7().Readable,G_=L1();G_.inherits(J7,tJ);function J7(n,U,D){tJ.call(this,U),this._helper=n;var c=this;n.on("data",function(g,f){if(!c.push(g))c._helper.pause();if(D)D(f)}).on("error",function(g){c.emit("error",g)}).on("end",function(){c.push(null)})}J7.prototype._read=function(){this._helper.resume()};eJ.exports=J7});var $7=L((uc1,D$)=>{var dU=L1(),K_=lJ(),Z_=Mn(),b_=g7(),z_=E2(),O_=PD(),n$=null;if(z_.nodestream)try{n$=sJ()}catch(n){}function q_(n,U,D){switch(n){case"blob":return dU.newBlob(dU.transformTo("arraybuffer",U),D);case"base64":return b_.encode(U);default:return dU.transformTo(n,U)}}function M_(n,U){var D,c=0,g=null,f=0;for(D=0;D<U.length;D++)f+=U[D].length;switch(n){case"string":return U.join("");case"array":return Array.prototype.concat.apply([],U);case"uint8array":g=new Uint8Array(f);for(D=0;D<U.length;D++)g.set(U[D],c),c+=U[D].length;return g;case"nodebuffer":return Buffer.concat(U);default:throw Error("concat : unsupported type '"+n+"'")}}function A_(n,U){return new O_.Promise(function(D,c){var g=[],f=n._internalType,h=n._outputType,W=n._mimeType;n.on("data",function(T,x){if(g.push(T),U)U(x)}).on("error",function(T){g=[],c(T)}).on("end",function(){try{var T=q_(h,M_(f,g),W);D(T)}catch(x){c(x)}g=[]}).resume()})}function U$(n,U,D){var c=U;switch(U){case"blob":case"arraybuffer":c="uint8array";break;case"base64":c="string";break}try{this._internalType=c,this._outputType=U,this._mimeType=D,dU.checkSupport(c),this._worker=n.pipe(new K_(c)),n.lock()}catch(g){this._worker=new Z_("error"),this._worker.error(g)}}U$.prototype={accumulate:function(n){return A_(this,n)},on:function(n,U){var D=this;if(n==="data")this._worker.on(n,function(c){U.call(D,c.data,c.meta)});else this._worker.on(n,function(){dU.delay(U,arguments,D)});return this},resume:function(){return dU.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(n){if(dU.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw Error(this._outputType+" is not supported by this method");return new n$(this,{objectMode:this._outputType!=="nodebuffer"},n)}};D$.exports=U$});var V7=L((H_)=>{H_.base64=!1;H_.binary=!1;H_.dir=!1;H_.createFolders=!0;H_.date=null;H_.compression=null;H_.compressionOptions=null;H_.comment=null;H_.unixPermissions=null;H_.dosPermissions=null});var Q7=L((kc1,c$)=>{var F9=L1(),i9=Mn(),P_=16384;function kD(n){i9.call(this,"DataWorker");var U=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,n.then(function(D){if(U.dataIsReady=!0,U.data=D,U.max=D&&D.length||0,U.type=F9.getTypeOf(D),!U.isPaused)U._tickAndRepeat()},function(D){U.error(D)})}F9.inherits(kD,i9);kD.prototype.cleanUp=function(){i9.prototype.cleanUp.call(this),this.data=null};kD.prototype.resume=function(){if(!i9.prototype.resume.call(this))return!1;if(!this._tickScheduled&&this.dataIsReady)this._tickScheduled=!0,F9.delay(this._tickAndRepeat,[],this);return!0};kD.prototype._tickAndRepeat=function(){if(this._tickScheduled=!1,this.isPaused||this.isFinished)return;if(this._tick(),!this.isFinished)F9.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0};kD.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var n=P_,U=null,D=Math.min(this.max,this.index+n);if(this.index>=this.max)return this.end();else{switch(this.type){case"string":U=this.data.substring(this.index,D);break;case"uint8array":U=this.data.subarray(this.index,D);break;case"array":case"nodebuffer":U=this.data.slice(this.index,D);break}return this.index=D,this.push({data:U,meta:{percent:this.max?this.index/this.max*100:0}})}};c$.exports=kD});var X9=L((pc1,f$)=>{var R_=L1();function u_(){var n,U=[];for(var D=0;D<256;D++){n=D;for(var c=0;c<8;c++)n=n&1?3988292384^n>>>1:n>>>1;U[D]=n}return U}var g$=u_();function d_(n,U,D,c){var g=g$,f=c+D;n=n^-1;for(var h=c;h<f;h++)n=n>>>8^g[(n^U[h])&255];return n^-1}function k_(n,U,D,c){var g=g$,f=c+D;n=n^-1;for(var h=c;h<f;h++)n=n>>>8^g[(n^U.charCodeAt(h))&255];return n^-1}f$.exports=function(U,D){if(typeof U>"u"||!U.length)return 0;var c=R_.getTypeOf(U)!=="string";if(c)return d_(D|0,U,U.length,0);else return k_(D|0,U,U.length,0)}});var B7=L((mc1,W$)=>{var h$=Mn(),p_=X9(),m_=L1();function Y7(){h$.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}m_.inherits(Y7,h$);Y7.prototype.processChunk=function(n){this.streamInfo.crc32=p_(n.data,this.streamInfo.crc32||0),this.push(n)};W$.exports=Y7});var T$=L((ac1,x$)=>{var a_=L1(),G7=Mn();function K7(n){G7.call(this,"DataLengthProbe for "+n),this.propName=n,this.withStreamInfo(n,0)}a_.inherits(K7,G7);K7.prototype.processChunk=function(n){if(n){var U=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=U+n.data.length}G7.prototype.processChunk.call(this,n)};x$.exports=K7});var J9=L((oc1,i$)=>{var y$=PD(),F$=Q7(),o_=B7(),Z7=T$();function b7(n,U,D,c,g){this.compressedSize=n,this.uncompressedSize=U,this.crc32=D,this.compression=c,this.compressedContent=g}b7.prototype={getContentWorker:function(){var n=new F$(y$.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Z7("data_length")),U=this;return n.on("end",function(){if(this.streamInfo.data_length!==U.uncompressedSize)throw Error("Bug : uncompressed data size mismatch")}),n},getCompressedWorker:function(){return new F$(y$.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};b7.createWorkerFrom=function(n,U,D){return n.pipe(new o_).pipe(new Z7("uncompressedSize")).pipe(U.compressWorker(D)).pipe(new Z7("compressedSize")).withStreamInfo("compression",U)};i$.exports=b7});var V$=L((rc1,$$)=>{var r_=$7(),l_=Q7(),z7=dD(),O7=J9(),X$=Mn(),q7=function(n,U,D){this.name=n,this.dir=D.dir,this.date=D.date,this.comment=D.comment,this.unixPermissions=D.unixPermissions,this.dosPermissions=D.dosPermissions,this._data=U,this._dataBinary=D.binary,this.options={compression:D.compression,compressionOptions:D.compressionOptions}};q7.prototype={internalStream:function(n){var U=null,D="string";try{if(!n)throw Error("No output type specified.");D=n.toLowerCase();var c=D==="string"||D==="text";if(D==="binarystring"||D==="text")D="string";U=this._decompressWorker();var g=!this._dataBinary;if(g&&!c)U=U.pipe(new z7.Utf8EncodeWorker);if(!g&&c)U=U.pipe(new z7.Utf8DecodeWorker)}catch(f){U=new X$("error"),U.error(f)}return new r_(U,D,"")},async:function(n,U){return this.internalStream(n).accumulate(U)},nodeStream:function(n,U){return this.internalStream(n||"nodebuffer").toNodejsStream(U)},_compressWorker:function(n,U){if(this._data instanceof O7&&this._data.compression.magic===n.magic)return this._data.getCompressedWorker();else{var D=this._decompressWorker();if(!this._dataBinary)D=D.pipe(new z7.Utf8EncodeWorker);return O7.createWorkerFrom(D,n,U)}},_decompressWorker:function(){if(this._data instanceof O7)return this._data.getContentWorker();else if(this._data instanceof X$)return this._data;else return new l_(this._data)}};var J$=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],t_=function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for($0=0;$0<J$.length;$0++)q7.prototype[J$[$0]]=t_;var $0;$$.exports=q7});var w2=L((M7)=>{var US=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function DS(n,U){return Object.prototype.hasOwnProperty.call(n,U)}M7.assign=function(n){var U=Array.prototype.slice.call(arguments,1);while(U.length){var D=U.shift();if(!D)continue;if(typeof D!=="object")throw TypeError(D+"must be non-object");for(var c in D)if(DS(D,c))n[c]=D[c]}return n};M7.shrinkBuf=function(n,U){if(n.length===U)return n;if(n.subarray)return n.subarray(0,U);return n.length=U,n};var cS={arraySet:function(n,U,D,c,g){if(U.subarray&&n.subarray){n.set(U.subarray(D,D+c),g);return}for(var f=0;f<c;f++)n[g+f]=U[D+f]},flattenChunks:function(n){var U,D,c,g,f,h;c=0;for(U=0,D=n.length;U<D;U++)c+=n[U].length;h=new Uint8Array(c),g=0;for(U=0,D=n.length;U<D;U++)f=n[U],h.set(f,g),g+=f.length;return h}},gS={arraySet:function(n,U,D,c,g){for(var f=0;f<c;f++)n[g+f]=U[D+f]},flattenChunks:function(n){return[].concat.apply([],n)}};M7.setTyped=function(n){if(n)M7.Buf8=Uint8Array,M7.Buf16=Uint16Array,M7.Buf32=Int32Array,M7.assign(M7,cS);else M7.Buf8=Array,M7.Buf16=Array,M7.Buf32=Array,M7.assign(M7,gS)};M7.setTyped(US)});var P$=L((MS)=>{var hS=w2(),WS=4,Y$=0,B$=1,xS=2;function mD(n){var U=n.length;while(--U>=0)n[U]=0}var TS=0,O$=1,yS=2,FS=3,iS=258,I7=29,K0=256,Q0=K0+1+I7,pD=30,_7=19,q$=2*Q0+1,kU=15,H7=16,XS=7,S7=256,M$=16,A$=17,H$=18,w7=[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],$9=[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],JS=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L$=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],$S=512,j2=Array((Q0+2)*2);mD(j2);var V0=Array(pD*2);mD(V0);var Y0=Array($S);mD(Y0);var B0=Array(iS-FS+1);mD(B0);var v7=Array(I7);mD(v7);var V9=Array(pD);mD(V9);function L7(n,U,D,c,g){this.static_tree=n,this.extra_bits=U,this.extra_base=D,this.elems=c,this.max_length=g,this.has_stree=n&&n.length}var C$,E$,w$;function C7(n,U){this.dyn_tree=n,this.max_code=0,this.stat_desc=U}function j$(n){return n<256?Y0[n]:Y0[256+(n>>>7)]}function G0(n,U){n.pending_buf[n.pending++]=U&255,n.pending_buf[n.pending++]=U>>>8&255}function Kn(n,U,D){if(n.bi_valid>H7-D)n.bi_buf|=U<<n.bi_valid&65535,G0(n,n.bi_buf),n.bi_buf=U>>H7-n.bi_valid,n.bi_valid+=D-H7;else n.bi_buf|=U<<n.bi_valid&65535,n.bi_valid+=D}function y2(n,U,D){Kn(n,D[U*2],D[U*2+1])}function I$(n,U){var D=0;do D|=n&1,n>>>=1,D<<=1;while(--U>0);return D>>>1}function VS(n){if(n.bi_valid===16)G0(n,n.bi_buf),n.bi_buf=0,n.bi_valid=0;else if(n.bi_valid>=8)n.pending_buf[n.pending++]=n.bi_buf&255,n.bi_buf>>=8,n.bi_valid-=8}function QS(n,U){var{dyn_tree:D,max_code:c}=U,g=U.stat_desc.static_tree,f=U.stat_desc.has_stree,h=U.stat_desc.extra_bits,W=U.stat_desc.extra_base,T=U.stat_desc.max_length,x,y,F,i,X,$,Q=0;for(i=0;i<=kU;i++)n.bl_count[i]=0;D[n.heap[n.heap_max]*2+1]=0;for(x=n.heap_max+1;x<q$;x++){if(y=n.heap[x],i=D[D[y*2+1]*2+1]+1,i>T)i=T,Q++;if(D[y*2+1]=i,y>c)continue;if(n.bl_count[i]++,X=0,y>=W)X=h[y-W];if($=D[y*2],n.opt_len+=$*(i+X),f)n.static_len+=$*(g[y*2+1]+X)}if(Q===0)return;do{i=T-1;while(n.bl_count[i]===0)i--;n.bl_count[i]--,n.bl_count[i+1]+=2,n.bl_count[T]--,Q-=2}while(Q>0);for(i=T;i!==0;i--){y=n.bl_count[i];while(y!==0){if(F=n.heap[--x],F>c)continue;if(D[F*2+1]!==i)n.opt_len+=(i-D[F*2+1])*D[F*2],D[F*2+1]=i;y--}}}function _$(n,U,D){var c=Array(kU+1),g=0,f,h;for(f=1;f<=kU;f++)c[f]=g=g+D[f-1]<<1;for(h=0;h<=U;h++){var W=n[h*2+1];if(W===0)continue;n[h*2]=I$(c[W]++,W)}}function YS(){var n,U,D,c,g,f=Array(kU+1);D=0;for(c=0;c<I7-1;c++){v7[c]=D;for(n=0;n<1<<w7[c];n++)B0[D++]=c}B0[D-1]=c,g=0;for(c=0;c<16;c++){V9[c]=g;for(n=0;n<1<<$9[c];n++)Y0[g++]=c}g>>=7;for(;c<pD;c++){V9[c]=g<<7;for(n=0;n<1<<$9[c]-7;n++)Y0[256+g++]=c}for(U=0;U<=kU;U++)f[U]=0;n=0;while(n<=143)j2[n*2+1]=8,n++,f[8]++;while(n<=255)j2[n*2+1]=9,n++,f[9]++;while(n<=279)j2[n*2+1]=7,n++,f[7]++;while(n<=287)j2[n*2+1]=8,n++,f[8]++;_$(j2,Q0+1,f);for(n=0;n<pD;n++)V0[n*2+1]=5,V0[n*2]=I$(n,5);C$=new L7(j2,w7,K0+1,Q0,kU),E$=new L7(V0,$9,0,pD,kU),w$=new L7([],JS,0,_7,XS)}function S$(n){var U;for(U=0;U<Q0;U++)n.dyn_ltree[U*2]=0;for(U=0;U<pD;U++)n.dyn_dtree[U*2]=0;for(U=0;U<_7;U++)n.bl_tree[U*2]=0;n.dyn_ltree[S7*2]=1,n.opt_len=n.static_len=0,n.last_lit=n.matches=0}function v$(n){if(n.bi_valid>8)G0(n,n.bi_buf);else if(n.bi_valid>0)n.pending_buf[n.pending++]=n.bi_buf;n.bi_buf=0,n.bi_valid=0}function BS(n,U,D,c){if(v$(n),c)G0(n,D),G0(n,~D);hS.arraySet(n.pending_buf,n.window,U,D,n.pending),n.pending+=D}function G$(n,U,D,c){var g=U*2,f=D*2;return n[g]<n[f]||n[g]===n[f]&&c[U]<=c[D]}function E7(n,U,D){var c=n.heap[D],g=D<<1;while(g<=n.heap_len){if(g<n.heap_len&&G$(U,n.heap[g+1],n.heap[g],n.depth))g++;if(G$(U,c,n.heap[g],n.depth))break;n.heap[D]=n.heap[g],D=g,g<<=1}n.heap[D]=c}function K$(n,U,D){var c,g,f=0,h,W;if(n.last_lit!==0)do if(c=n.pending_buf[n.d_buf+f*2]<<8|n.pending_buf[n.d_buf+f*2+1],g=n.pending_buf[n.l_buf+f],f++,c===0)y2(n,g,U);else{if(h=B0[g],y2(n,h+K0+1,U),W=w7[h],W!==0)g-=v7[h],Kn(n,g,W);if(c--,h=j$(c),y2(n,h,D),W=$9[h],W!==0)c-=V9[h],Kn(n,c,W)}while(f<n.last_lit);y2(n,S7,U)}function j7(n,U){var D=U.dyn_tree,c=U.stat_desc.static_tree,g=U.stat_desc.has_stree,f=U.stat_desc.elems,h,W,T=-1,x;n.heap_len=0,n.heap_max=q$;for(h=0;h<f;h++)if(D[h*2]!==0)n.heap[++n.heap_len]=T=h,n.depth[h]=0;else D[h*2+1]=0;while(n.heap_len<2)if(x=n.heap[++n.heap_len]=T<2?++T:0,D[x*2]=1,n.depth[x]=0,n.opt_len--,g)n.static_len-=c[x*2+1];U.max_code=T;for(h=n.heap_len>>1;h>=1;h--)E7(n,D,h);x=f;do h=n.heap[1],n.heap[1]=n.heap[n.heap_len--],E7(n,D,1),W=n.heap[1],n.heap[--n.heap_max]=h,n.heap[--n.heap_max]=W,D[x*2]=D[h*2]+D[W*2],n.depth[x]=(n.depth[h]>=n.depth[W]?n.depth[h]:n.depth[W])+1,D[h*2+1]=D[W*2+1]=x,n.heap[1]=x++,E7(n,D,1);while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],QS(n,U),_$(D,T,n.bl_count)}function Z$(n,U,D){var c,g=-1,f,h=U[1],W=0,T=7,x=4;if(h===0)T=138,x=3;U[(D+1)*2+1]=65535;for(c=0;c<=D;c++){if(f=h,h=U[(c+1)*2+1],++W<T&&f===h)continue;else if(W<x)n.bl_tree[f*2]+=W;else if(f!==0){if(f!==g)n.bl_tree[f*2]++;n.bl_tree[M$*2]++}else if(W<=10)n.bl_tree[A$*2]++;else n.bl_tree[H$*2]++;if(W=0,g=f,h===0)T=138,x=3;else if(f===h)T=6,x=3;else T=7,x=4}}function b$(n,U,D){var c,g=-1,f,h=U[1],W=0,T=7,x=4;if(h===0)T=138,x=3;for(c=0;c<=D;c++){if(f=h,h=U[(c+1)*2+1],++W<T&&f===h)continue;else if(W<x)do y2(n,f,n.bl_tree);while(--W!==0);else if(f!==0){if(f!==g)y2(n,f,n.bl_tree),W--;y2(n,M$,n.bl_tree),Kn(n,W-3,2)}else if(W<=10)y2(n,A$,n.bl_tree),Kn(n,W-3,3);else y2(n,H$,n.bl_tree),Kn(n,W-11,7);if(W=0,g=f,h===0)T=138,x=3;else if(f===h)T=6,x=3;else T=7,x=4}}function GS(n){var U;Z$(n,n.dyn_ltree,n.l_desc.max_code),Z$(n,n.dyn_dtree,n.d_desc.max_code),j7(n,n.bl_desc);for(U=_7-1;U>=3;U--)if(n.bl_tree[L$[U]*2+1]!==0)break;return n.opt_len+=3*(U+1)+5+5+4,U}function KS(n,U,D,c){var g;Kn(n,U-257,5),Kn(n,D-1,5),Kn(n,c-4,4);for(g=0;g<c;g++)Kn(n,n.bl_tree[L$[g]*2+1],3);b$(n,n.dyn_ltree,U-1),b$(n,n.dyn_dtree,D-1)}function ZS(n){var U=4093624447,D;for(D=0;D<=31;D++,U>>>=1)if(U&1&&n.dyn_ltree[D*2]!==0)return Y$;if(n.dyn_ltree[18]!==0||n.dyn_ltree[20]!==0||n.dyn_ltree[26]!==0)return B$;for(D=32;D<K0;D++)if(n.dyn_ltree[D*2]!==0)return B$;return Y$}var z$=!1;function bS(n){if(!z$)YS(),z$=!0;n.l_desc=new C7(n.dyn_ltree,C$),n.d_desc=new C7(n.dyn_dtree,E$),n.bl_desc=new C7(n.bl_tree,w$),n.bi_buf=0,n.bi_valid=0,S$(n)}function N$(n,U,D,c){Kn(n,(TS<<1)+(c?1:0),3),BS(n,U,D,!0)}function zS(n){Kn(n,O$<<1,3),y2(n,S7,j2),VS(n)}function OS(n,U,D,c){var g,f,h=0;if(n.level>0){if(n.strm.data_type===xS)n.strm.data_type=ZS(n);if(j7(n,n.l_desc),j7(n,n.d_desc),h=GS(n),g=n.opt_len+3+7>>>3,f=n.static_len+3+7>>>3,f<=g)g=f}else g=f=D+5;if(D+4<=g&&U!==-1)N$(n,U,D,c);else if(n.strategy===WS||f===g)Kn(n,(O$<<1)+(c?1:0),3),K$(n,j2,V0);else Kn(n,(yS<<1)+(c?1:0),3),KS(n,n.l_desc.max_code+1,n.d_desc.max_code+1,h+1),K$(n,n.dyn_ltree,n.dyn_dtree);if(S$(n),c)v$(n)}function qS(n,U,D){if(n.pending_buf[n.d_buf+n.last_lit*2]=U>>>8&255,n.pending_buf[n.d_buf+n.last_lit*2+1]=U&255,n.pending_buf[n.l_buf+n.last_lit]=D&255,n.last_lit++,U===0)n.dyn_ltree[D*2]++;else n.matches++,U--,n.dyn_ltree[(B0[D]+K0+1)*2]++,n.dyn_dtree[j$(U)*2]++;return n.last_lit===n.lit_bufsize-1}MS._tr_init=bS;MS._tr_stored_block=N$;MS._tr_flush_block=OS;MS._tr_tally=qS;MS._tr_align=zS});var N7=L((ec1,R$)=>{function wS(n,U,D,c){var g=n&65535|0,f=n>>>16&65535|0,h=0;while(D!==0){h=D>2000?2000:D,D-=h;do g=g+U[c++]|0,f=f+g|0;while(--h);g%=65521,f%=65521}return g|f<<16|0}R$.exports=wS});var P7=L((sc1,u$)=>{function jS(){var n,U=[];for(var D=0;D<256;D++){n=D;for(var c=0;c<8;c++)n=n&1?3988292384^n>>>1:n>>>1;U[D]=n}return U}var IS=jS();function _S(n,U,D,c){var g=IS,f=c+D;n^=-1;for(var h=c;h<f;h++)n=n>>>8^g[(n^U[h])&255];return n^-1}u$.exports=_S});var Q9=L((n01,d$)=>{d$.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"}});var e$=L(($v)=>{var Xn=w2(),jn=P$(),a$=N7(),TU=P7(),SS=Q9(),oU=0,vS=1,NS=3,JU=4,k$=5,i2=0,p$=1,In=-2,PS=-3,R7=-5,RS=-1,uS=1,Y9=2,dS=3,kS=4,pS=0,mS=2,Z9=8,aS=9,oS=15,rS=8,lS=29,tS=256,d7=tS+1+lS,eS=30,sS=19,nv=2*d7+1,Uv=15,g1=3,iU=258,kn=iU+g1+1,Dv=32,b9=42,k7=69,B9=73,G9=91,K9=103,pU=113,b0=666,R1=1,z0=2,mU=3,rD=4,cv=3;function XU(n,U){return n.msg=SS[U],U}function m$(n){return(n<<1)-(n>4?9:0)}function FU(n){var U=n.length;while(--U>=0)n[U]=0}function yU(n){var U=n.state,D=U.pending;if(D>n.avail_out)D=n.avail_out;if(D===0)return;if(Xn.arraySet(n.output,U.pending_buf,U.pending_out,D,n.next_out),n.next_out+=D,U.pending_out+=D,n.total_out+=D,n.avail_out-=D,U.pending-=D,U.pending===0)U.pending_out=0}function e1(n,U){jn._tr_flush_block(n,n.block_start>=0?n.block_start:-1,n.strstart-n.block_start,U),n.block_start=n.strstart,yU(n.strm)}function W1(n,U){n.pending_buf[n.pending++]=U}function Z0(n,U){n.pending_buf[n.pending++]=U>>>8&255,n.pending_buf[n.pending++]=U&255}function gv(n,U,D,c){var g=n.avail_in;if(g>c)g=c;if(g===0)return 0;if(n.avail_in-=g,Xn.arraySet(U,n.input,n.next_in,g,D),n.state.wrap===1)n.adler=a$(n.adler,U,g,D);else if(n.state.wrap===2)n.adler=TU(n.adler,U,g,D);return n.next_in+=g,n.total_in+=g,g}function o$(n,U){var{max_chain_length:D,strstart:c}=n,g,f,h=n.prev_length,W=n.nice_match,T=n.strstart>n.w_size-kn?n.strstart-(n.w_size-kn):0,x=n.window,y=n.w_mask,F=n.prev,i=n.strstart+iU,X=x[c+h-1],$=x[c+h];if(n.prev_length>=n.good_match)D>>=2;if(W>n.lookahead)W=n.lookahead;do{if(g=U,x[g+h]!==$||x[g+h-1]!==X||x[g]!==x[c]||x[++g]!==x[c+1])continue;c+=2,g++;do;while(x[++c]===x[++g]&&x[++c]===x[++g]&&x[++c]===x[++g]&&x[++c]===x[++g]&&x[++c]===x[++g]&&x[++c]===x[++g]&&x[++c]===x[++g]&&x[++c]===x[++g]&&c<i);if(f=iU-(i-c),c=i-iU,f>h){if(n.match_start=U,h=f,f>=W)break;X=x[c+h-1],$=x[c+h]}}while((U=F[U&y])>T&&--D!==0);if(h<=n.lookahead)return h;return n.lookahead}function aU(n){var U=n.w_size,D,c,g,f,h;do{if(f=n.window_size-n.lookahead-n.strstart,n.strstart>=U+(U-kn)){Xn.arraySet(n.window,n.window,U,U,0),n.match_start-=U,n.strstart-=U,n.block_start-=U,c=n.hash_size,D=c;do g=n.head[--D],n.head[D]=g>=U?g-U:0;while(--c);c=U,D=c;do g=n.prev[--D],n.prev[D]=g>=U?g-U:0;while(--c);f+=U}if(n.strm.avail_in===0)break;if(c=gv(n.strm,n.window,n.strstart+n.lookahead,f),n.lookahead+=c,n.lookahead+n.insert>=g1){h=n.strstart-n.insert,n.ins_h=n.window[h],n.ins_h=(n.ins_h<<n.hash_shift^n.window[h+1])&n.hash_mask;while(n.insert)if(n.ins_h=(n.ins_h<<n.hash_shift^n.window[h+g1-1])&n.hash_mask,n.prev[h&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=h,h++,n.insert--,n.lookahead+n.insert<g1)break}}while(n.lookahead<kn&&n.strm.avail_in!==0)}function fv(n,U){var D=65535;if(D>n.pending_buf_size-5)D=n.pending_buf_size-5;for(;;){if(n.lookahead<=1){if(aU(n),n.lookahead===0&&U===oU)return R1;if(n.lookahead===0)break}n.strstart+=n.lookahead,n.lookahead=0;var c=n.block_start+D;if(n.strstart===0||n.strstart>=c){if(n.lookahead=n.strstart-c,n.strstart=c,e1(n,!1),n.strm.avail_out===0)return R1}if(n.strstart-n.block_start>=n.w_size-kn){if(e1(n,!1),n.strm.avail_out===0)return R1}}if(n.insert=0,U===JU){if(e1(n,!0),n.strm.avail_out===0)return mU;return rD}if(n.strstart>n.block_start){if(e1(n,!1),n.strm.avail_out===0)return R1}return R1}function u7(n,U){var D,c;for(;;){if(n.lookahead<kn){if(aU(n),n.lookahead<kn&&U===oU)return R1;if(n.lookahead===0)break}if(D=0,n.lookahead>=g1)n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+g1-1])&n.hash_mask,D=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart;if(D!==0&&n.strstart-D<=n.w_size-kn)n.match_length=o$(n,D);if(n.match_length>=g1)if(c=jn._tr_tally(n,n.strstart-n.match_start,n.match_length-g1),n.lookahead-=n.match_length,n.match_length<=n.max_lazy_match&&n.lookahead>=g1){n.match_length--;do n.strstart++,n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+g1-1])&n.hash_mask,D=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart;while(--n.match_length!==0);n.strstart++}else n.strstart+=n.match_length,n.match_length=0,n.ins_h=n.window[n.strstart],n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+1])&n.hash_mask;else c=jn._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++;if(c){if(e1(n,!1),n.strm.avail_out===0)return R1}}if(n.insert=n.strstart<g1-1?n.strstart:g1-1,U===JU){if(e1(n,!0),n.strm.avail_out===0)return mU;return rD}if(n.last_lit){if(e1(n,!1),n.strm.avail_out===0)return R1}return z0}function aD(n,U){var D,c,g;for(;;){if(n.lookahead<kn){if(aU(n),n.lookahead<kn&&U===oU)return R1;if(n.lookahead===0)break}if(D=0,n.lookahead>=g1)n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+g1-1])&n.hash_mask,D=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart;if(n.prev_length=n.match_length,n.prev_match=n.match_start,n.match_length=g1-1,D!==0&&n.prev_length<n.max_lazy_match&&n.strstart-D<=n.w_size-kn){if(n.match_length=o$(n,D),n.match_length<=5&&(n.strategy===uS||n.match_length===g1&&n.strstart-n.match_start>4096))n.match_length=g1-1}if(n.prev_length>=g1&&n.match_length<=n.prev_length){g=n.strstart+n.lookahead-g1,c=jn._tr_tally(n,n.strstart-1-n.prev_match,n.prev_length-g1),n.lookahead-=n.prev_length-1,n.prev_length-=2;do if(++n.strstart<=g)n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+g1-1])&n.hash_mask,D=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart;while(--n.prev_length!==0);if(n.match_available=0,n.match_length=g1-1,n.strstart++,c){if(e1(n,!1),n.strm.avail_out===0)return R1}}else if(n.match_available){if(c=jn._tr_tally(n,0,n.window[n.strstart-1]),c)e1(n,!1);if(n.strstart++,n.lookahead--,n.strm.avail_out===0)return R1}else n.match_available=1,n.strstart++,n.lookahead--}if(n.match_available)c=jn._tr_tally(n,0,n.window[n.strstart-1]),n.match_available=0;if(n.insert=n.strstart<g1-1?n.strstart:g1-1,U===JU){if(e1(n,!0),n.strm.avail_out===0)return mU;return rD}if(n.last_lit){if(e1(n,!1),n.strm.avail_out===0)return R1}return z0}function hv(n,U){var D,c,g,f,h=n.window;for(;;){if(n.lookahead<=iU){if(aU(n),n.lookahead<=iU&&U===oU)return R1;if(n.lookahead===0)break}if(n.match_length=0,n.lookahead>=g1&&n.strstart>0){if(g=n.strstart-1,c=h[g],c===h[++g]&&c===h[++g]&&c===h[++g]){f=n.strstart+iU;do;while(c===h[++g]&&c===h[++g]&&c===h[++g]&&c===h[++g]&&c===h[++g]&&c===h[++g]&&c===h[++g]&&c===h[++g]&&g<f);if(n.match_length=iU-(f-g),n.match_length>n.lookahead)n.match_length=n.lookahead}}if(n.match_length>=g1)D=jn._tr_tally(n,1,n.match_length-g1),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0;else D=jn._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++;if(D){if(e1(n,!1),n.strm.avail_out===0)return R1}}if(n.insert=0,U===JU){if(e1(n,!0),n.strm.avail_out===0)return mU;return rD}if(n.last_lit){if(e1(n,!1),n.strm.avail_out===0)return R1}return z0}function Wv(n,U){var D;for(;;){if(n.lookahead===0){if(aU(n),n.lookahead===0){if(U===oU)return R1;break}}if(n.match_length=0,D=jn._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,D){if(e1(n,!1),n.strm.avail_out===0)return R1}}if(n.insert=0,U===JU){if(e1(n,!0),n.strm.avail_out===0)return mU;return rD}if(n.last_lit){if(e1(n,!1),n.strm.avail_out===0)return R1}return z0}function F2(n,U,D,c,g){this.good_length=n,this.max_lazy=U,this.nice_length=D,this.max_chain=c,this.func=g}var oD;oD=[new F2(0,0,0,0,fv),new F2(4,4,8,4,u7),new F2(4,5,16,8,u7),new F2(4,6,32,32,u7),new F2(4,4,16,16,aD),new F2(8,16,32,32,aD),new F2(8,16,128,128,aD),new F2(8,32,128,256,aD),new F2(32,128,258,1024,aD),new F2(32,258,258,4096,aD)];function xv(n){n.window_size=2*n.w_size,FU(n.head),n.max_lazy_match=oD[n.level].max_lazy,n.good_match=oD[n.level].good_length,n.nice_match=oD[n.level].nice_length,n.max_chain_length=oD[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=g1-1,n.match_available=0,n.ins_h=0}function Tv(){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=Z9,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 Xn.Buf16(nv*2),this.dyn_dtree=new Xn.Buf16((2*eS+1)*2),this.bl_tree=new Xn.Buf16((2*sS+1)*2),FU(this.dyn_ltree),FU(this.dyn_dtree),FU(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Xn.Buf16(Uv+1),this.heap=new Xn.Buf16(2*d7+1),FU(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Xn.Buf16(2*d7+1),FU(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 r$(n){var U;if(!n||!n.state)return XU(n,In);if(n.total_in=n.total_out=0,n.data_type=mS,U=n.state,U.pending=0,U.pending_out=0,U.wrap<0)U.wrap=-U.wrap;return U.status=U.wrap?b9:pU,n.adler=U.wrap===2?0:1,U.last_flush=oU,jn._tr_init(U),i2}function l$(n){var U=r$(n);if(U===i2)xv(n.state);return U}function yv(n,U){if(!n||!n.state)return In;if(n.state.wrap!==2)return In;return n.state.gzhead=U,i2}function t$(n,U,D,c,g,f){if(!n)return In;var h=1;if(U===RS)U=6;if(c<0)h=0,c=-c;else if(c>15)h=2,c-=16;if(g<1||g>aS||D!==Z9||c<8||c>15||U<0||U>9||f<0||f>kS)return XU(n,In);if(c===8)c=9;var W=new Tv;return n.state=W,W.strm=n,W.wrap=h,W.gzhead=null,W.w_bits=c,W.w_size=1<<W.w_bits,W.w_mask=W.w_size-1,W.hash_bits=g+7,W.hash_size=1<<W.hash_bits,W.hash_mask=W.hash_size-1,W.hash_shift=~~((W.hash_bits+g1-1)/g1),W.window=new Xn.Buf8(W.w_size*2),W.head=new Xn.Buf16(W.hash_size),W.prev=new Xn.Buf16(W.w_size),W.lit_bufsize=1<<g+6,W.pending_buf_size=W.lit_bufsize*4,W.pending_buf=new Xn.Buf8(W.pending_buf_size),W.d_buf=1*W.lit_bufsize,W.l_buf=3*W.lit_bufsize,W.level=U,W.strategy=f,W.method=D,l$(n)}function Fv(n,U){return t$(n,U,Z9,oS,rS,pS)}function iv(n,U){var D,c,g,f;if(!n||!n.state||U>k$||U<0)return n?XU(n,In):In;if(c=n.state,!n.output||!n.input&&n.avail_in!==0||c.status===b0&&U!==JU)return XU(n,n.avail_out===0?R7:In);if(c.strm=n,D=c.last_flush,c.last_flush=U,c.status===b9)if(c.wrap===2)if(n.adler=0,W1(c,31),W1(c,139),W1(c,8),!c.gzhead)W1(c,0),W1(c,0),W1(c,0),W1(c,0),W1(c,0),W1(c,c.level===9?2:c.strategy>=Y9||c.level<2?4:0),W1(c,cv),c.status=pU;else{if(W1(c,(c.gzhead.text?1:0)+(c.gzhead.hcrc?2:0)+(!c.gzhead.extra?0:4)+(!c.gzhead.name?0:8)+(!c.gzhead.comment?0:16)),W1(c,c.gzhead.time&255),W1(c,c.gzhead.time>>8&255),W1(c,c.gzhead.time>>16&255),W1(c,c.gzhead.time>>24&255),W1(c,c.level===9?2:c.strategy>=Y9||c.level<2?4:0),W1(c,c.gzhead.os&255),c.gzhead.extra&&c.gzhead.extra.length)W1(c,c.gzhead.extra.length&255),W1(c,c.gzhead.extra.length>>8&255);if(c.gzhead.hcrc)n.adler=TU(n.adler,c.pending_buf,c.pending,0);c.gzindex=0,c.status=k7}else{var h=Z9+(c.w_bits-8<<4)<<8,W=-1;if(c.strategy>=Y9||c.level<2)W=0;else if(c.level<6)W=1;else if(c.level===6)W=2;else W=3;if(h|=W<<6,c.strstart!==0)h|=Dv;if(h+=31-h%31,c.status=pU,Z0(c,h),c.strstart!==0)Z0(c,n.adler>>>16),Z0(c,n.adler&65535);n.adler=1}if(c.status===k7)if(c.gzhead.extra){g=c.pending;while(c.gzindex<(c.gzhead.extra.length&65535)){if(c.pending===c.pending_buf_size){if(c.gzhead.hcrc&&c.pending>g)n.adler=TU(n.adler,c.pending_buf,c.pending-g,g);if(yU(n),g=c.pending,c.pending===c.pending_buf_size)break}W1(c,c.gzhead.extra[c.gzindex]&255),c.gzindex++}if(c.gzhead.hcrc&&c.pending>g)n.adler=TU(n.adler,c.pending_buf,c.pending-g,g);if(c.gzindex===c.gzhead.extra.length)c.gzindex=0,c.status=B9}else c.status=B9;if(c.status===B9)if(c.gzhead.name){g=c.pending;do{if(c.pending===c.pending_buf_size){if(c.gzhead.hcrc&&c.pending>g)n.adler=TU(n.adler,c.pending_buf,c.pending-g,g);if(yU(n),g=c.pending,c.pending===c.pending_buf_size){f=1;break}}if(c.gzindex<c.gzhead.name.length)f=c.gzhead.name.charCodeAt(c.gzindex++)&255;else f=0;W1(c,f)}while(f!==0);if(c.gzhead.hcrc&&c.pending>g)n.adler=TU(n.adler,c.pending_buf,c.pending-g,g);if(f===0)c.gzindex=0,c.status=G9}else c.status=G9;if(c.status===G9)if(c.gzhead.comment){g=c.pending;do{if(c.pending===c.pending_buf_size){if(c.gzhead.hcrc&&c.pending>g)n.adler=TU(n.adler,c.pending_buf,c.pending-g,g);if(yU(n),g=c.pending,c.pending===c.pending_buf_size){f=1;break}}if(c.gzindex<c.gzhead.comment.length)f=c.gzhead.comment.charCodeAt(c.gzindex++)&255;else f=0;W1(c,f)}while(f!==0);if(c.gzhead.hcrc&&c.pending>g)n.adler=TU(n.adler,c.pending_buf,c.pending-g,g);if(f===0)c.status=K9}else c.status=K9;if(c.status===K9)if(c.gzhead.hcrc){if(c.pending+2>c.pending_buf_size)yU(n);if(c.pending+2<=c.pending_buf_size)W1(c,n.adler&255),W1(c,n.adler>>8&255),n.adler=0,c.status=pU}else c.status=pU;if(c.pending!==0){if(yU(n),n.avail_out===0)return c.last_flush=-1,i2}else if(n.avail_in===0&&m$(U)<=m$(D)&&U!==JU)return XU(n,R7);if(c.status===b0&&n.avail_in!==0)return XU(n,R7);if(n.avail_in!==0||c.lookahead!==0||U!==oU&&c.status!==b0){var T=c.strategy===Y9?Wv(c,U):c.strategy===dS?hv(c,U):oD[c.level].func(c,U);if(T===mU||T===rD)c.status=b0;if(T===R1||T===mU){if(n.avail_out===0)c.last_flush=-1;return i2}if(T===z0){if(U===vS)jn._tr_align(c);else if(U!==k$){if(jn._tr_stored_block(c,0,0,!1),U===NS){if(FU(c.head),c.lookahead===0)c.strstart=0,c.block_start=0,c.insert=0}}if(yU(n),n.avail_out===0)return c.last_flush=-1,i2}}if(U!==JU)return i2;if(c.wrap<=0)return p$;if(c.wrap===2)W1(c,n.adler&255),W1(c,n.adler>>8&255),W1(c,n.adler>>16&255),W1(c,n.adler>>24&255),W1(c,n.total_in&255),W1(c,n.total_in>>8&255),W1(c,n.total_in>>16&255),W1(c,n.total_in>>24&255);else Z0(c,n.adler>>>16),Z0(c,n.adler&65535);if(yU(n),c.wrap>0)c.wrap=-c.wrap;return c.pending!==0?i2:p$}function Xv(n){var U;if(!n||!n.state)return In;if(U=n.state.status,U!==b9&&U!==k7&&U!==B9&&U!==G9&&U!==K9&&U!==pU&&U!==b0)return XU(n,In);return n.state=null,U===pU?XU(n,PS):i2}function Jv(n,U){var D=U.length,c,g,f,h,W,T,x,y;if(!n||!n.state)return In;if(c=n.state,h=c.wrap,h===2||h===1&&c.status!==b9||c.lookahead)return In;if(h===1)n.adler=a$(n.adler,U,D,0);if(c.wrap=0,D>=c.w_size){if(h===0)FU(c.head),c.strstart=0,c.block_start=0,c.insert=0;y=new Xn.Buf8(c.w_size),Xn.arraySet(y,U,D-c.w_size,c.w_size,0),U=y,D=c.w_size}W=n.avail_in,T=n.next_in,x=n.input,n.avail_in=D,n.next_in=0,n.input=U,aU(c);while(c.lookahead>=g1){g=c.strstart,f=c.lookahead-(g1-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[g+g1-1])&c.hash_mask,c.prev[g&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=g,g++;while(--f);c.strstart=g,c.lookahead=g1-1,aU(c)}return c.strstart+=c.lookahead,c.block_start=c.strstart,c.insert=c.lookahead,c.lookahead=0,c.match_length=c.prev_length=g1-1,c.match_available=0,n.next_in=T,n.input=x,n.avail_in=W,c.wrap=h,i2}$v.deflateInit=Fv;$v.deflateInit2=t$;$v.deflateReset=l$;$v.deflateResetKeep=r$;$v.deflateSetHeader=yv;$v.deflate=iv;$v.deflateEnd=Xv;$v.deflateSetDictionary=Jv;$v.deflateInfo="pako deflate (from Nodeca project)"});var p7=L((Ov)=>{var z9=w2(),s$=!0,nV=!0;try{String.fromCharCode.apply(null,[0])}catch(n){s$=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(n){nV=!1}var O0=new z9.Buf8(256);for(X2=0;X2<256;X2++)O0[X2]=X2>=252?6:X2>=248?5:X2>=240?4:X2>=224?3:X2>=192?2:1;var X2;O0[254]=O0[254]=1;Ov.string2buf=function(n){var U,D,c,g,f,h=n.length,W=0;for(g=0;g<h;g++){if(D=n.charCodeAt(g),(D&64512)===55296&&g+1<h){if(c=n.charCodeAt(g+1),(c&64512)===56320)D=65536+(D-55296<<10)+(c-56320),g++}W+=D<128?1:D<2048?2:D<65536?3:4}U=new z9.Buf8(W);for(f=0,g=0;f<W;g++){if(D=n.charCodeAt(g),(D&64512)===55296&&g+1<h){if(c=n.charCodeAt(g+1),(c&64512)===56320)D=65536+(D-55296<<10)+(c-56320),g++}if(D<128)U[f++]=D;else if(D<2048)U[f++]=192|D>>>6,U[f++]=128|D&63;else if(D<65536)U[f++]=224|D>>>12,U[f++]=128|D>>>6&63,U[f++]=128|D&63;else U[f++]=240|D>>>18,U[f++]=128|D>>>12&63,U[f++]=128|D>>>6&63,U[f++]=128|D&63}return U};function UV(n,U){if(U<65534){if(n.subarray&&nV||!n.subarray&&s$)return String.fromCharCode.apply(null,z9.shrinkBuf(n,U))}var D="";for(var c=0;c<U;c++)D+=String.fromCharCode(n[c]);return D}Ov.buf2binstring=function(n){return UV(n,n.length)};Ov.binstring2buf=function(n){var U=new z9.Buf8(n.length);for(var D=0,c=U.length;D<c;D++)U[D]=n.charCodeAt(D);return U};Ov.buf2string=function(n,U){var D,c,g,f,h=U||n.length,W=Array(h*2);for(c=0,D=0;D<h;){if(g=n[D++],g<128){W[c++]=g;continue}if(f=O0[g],f>4){W[c++]=65533,D+=f-1;continue}g&=f===2?31:f===3?15:7;while(f>1&&D<h)g=g<<6|n[D++]&63,f--;if(f>1){W[c++]=65533;continue}if(g<65536)W[c++]=g;else g-=65536,W[c++]=55296|g>>10&1023,W[c++]=56320|g&1023}return UV(W,c)};Ov.utf8border=function(n,U){var D;if(U=U||n.length,U>n.length)U=n.length;D=U-1;while(D>=0&&(n[D]&192)===128)D--;if(D<0)return U;if(D===0)return U;return D+O0[n[D]]>U?D:U}});var m7=L((c01,DV)=>{function Cv(){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}DV.exports=Cv});var hV=L((Nv)=>{var q0=e$(),M0=w2(),o7=p7(),r7=Q9(),Ev=m7(),fV=Object.prototype.toString,wv=0,a7=4,lD=0,cV=1,gV=2,jv=-1,Iv=0,_v=8;function rU(n){if(!(this instanceof rU))return new rU(n);this.options=M0.assign({level:jv,method:_v,chunkSize:16384,windowBits:15,memLevel:8,strategy:Iv,to:""},n||{});var U=this.options;if(U.raw&&U.windowBits>0)U.windowBits=-U.windowBits;else if(U.gzip&&U.windowBits>0&&U.windowBits<16)U.windowBits+=16;this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ev,this.strm.avail_out=0;var D=q0.deflateInit2(this.strm,U.level,U.method,U.windowBits,U.memLevel,U.strategy);if(D!==lD)throw Error(r7[D]);if(U.header)q0.deflateSetHeader(this.strm,U.header);if(U.dictionary){var c;if(typeof U.dictionary==="string")c=o7.string2buf(U.dictionary);else if(fV.call(U.dictionary)==="[object ArrayBuffer]")c=new Uint8Array(U.dictionary);else c=U.dictionary;if(D=q0.deflateSetDictionary(this.strm,c),D!==lD)throw Error(r7[D]);this._dict_set=!0}}rU.prototype.push=function(n,U){var D=this.strm,c=this.options.chunkSize,g,f;if(this.ended)return!1;if(f=U===~~U?U:U===!0?a7:wv,typeof n==="string")D.input=o7.string2buf(n);else if(fV.call(n)==="[object ArrayBuffer]")D.input=new Uint8Array(n);else D.input=n;D.next_in=0,D.avail_in=D.input.length;do{if(D.avail_out===0)D.output=new M0.Buf8(c),D.next_out=0,D.avail_out=c;if(g=q0.deflate(D,f),g!==cV&&g!==lD)return this.onEnd(g),this.ended=!0,!1;if(D.avail_out===0||D.avail_in===0&&(f===a7||f===gV))if(this.options.to==="string")this.onData(o7.buf2binstring(M0.shrinkBuf(D.output,D.next_out)));else this.onData(M0.shrinkBuf(D.output,D.next_out))}while((D.avail_in>0||D.avail_out===0)&&g!==cV);if(f===a7)return g=q0.deflateEnd(this.strm),this.onEnd(g),this.ended=!0,g===lD;if(f===gV)return this.onEnd(lD),D.avail_out=0,!0;return!0};rU.prototype.onData=function(n){this.chunks.push(n)};rU.prototype.onEnd=function(n){if(n===lD)if(this.options.to==="string")this.result=this.chunks.join("");else this.result=M0.flattenChunks(this.chunks);this.chunks=[],this.err=n,this.msg=this.strm.msg};function l7(n,U){var D=new rU(U);if(D.push(n,!0),D.err)throw D.msg||r7[D.err];return D.result}function Sv(n,U){return U=U||{},U.raw=!0,l7(n,U)}function vv(n,U){return U=U||{},U.gzip=!0,l7(n,U)}Nv.Deflate=rU;Nv.deflate=l7;Nv.deflateRaw=Sv;Nv.gzip=vv});var xV=L((f01,WV)=>{var O9=30,kv=12;WV.exports=function(U,D){var c,g,f,h,W,T,x,y,F,i,X,$,Q,Y,V,G,J,B,z,q,Z,M,O,_,w;c=U.state,g=U.next_in,_=U.input,f=g+(U.avail_in-5),h=U.next_out,w=U.output,W=h-(D-U.avail_out),T=h+(U.avail_out-257),x=c.dmax,y=c.wsize,F=c.whave,i=c.wnext,X=c.window,$=c.hold,Q=c.bits,Y=c.lencode,V=c.distcode,G=(1<<c.lenbits)-1,J=(1<<c.distbits)-1;n:do{if(Q<15)$+=_[g++]<<Q,Q+=8,$+=_[g++]<<Q,Q+=8;B=Y[$&G];U:for(;;){if(z=B>>>24,$>>>=z,Q-=z,z=B>>>16&255,z===0)w[h++]=B&65535;else if(z&16){if(q=B&65535,z&=15,z){if(Q<z)$+=_[g++]<<Q,Q+=8;q+=$&(1<<z)-1,$>>>=z,Q-=z}if(Q<15)$+=_[g++]<<Q,Q+=8,$+=_[g++]<<Q,Q+=8;B=V[$&J];D:for(;;){if(z=B>>>24,$>>>=z,Q-=z,z=B>>>16&255,z&16){if(Z=B&65535,z&=15,Q<z){if($+=_[g++]<<Q,Q+=8,Q<z)$+=_[g++]<<Q,Q+=8}if(Z+=$&(1<<z)-1,Z>x){U.msg="invalid distance too far back",c.mode=O9;break n}if($>>>=z,Q-=z,z=h-W,Z>z){if(z=Z-z,z>F){if(c.sane){U.msg="invalid distance too far back",c.mode=O9;break n}}if(M=0,O=X,i===0){if(M+=y-z,z<q){q-=z;do w[h++]=X[M++];while(--z);M=h-Z,O=w}}else if(i<z){if(M+=y+i-z,z-=i,z<q){q-=z;do w[h++]=X[M++];while(--z);if(M=0,i<q){z=i,q-=z;do w[h++]=X[M++];while(--z);M=h-Z,O=w}}}else if(M+=i-z,z<q){q-=z;do w[h++]=X[M++];while(--z);M=h-Z,O=w}while(q>2)w[h++]=O[M++],w[h++]=O[M++],w[h++]=O[M++],q-=3;if(q){if(w[h++]=O[M++],q>1)w[h++]=O[M++]}}else{M=h-Z;do w[h++]=w[M++],w[h++]=w[M++],w[h++]=w[M++],q-=3;while(q>2);if(q){if(w[h++]=w[M++],q>1)w[h++]=w[M++]}}}else if((z&64)===0){B=V[(B&65535)+($&(1<<z)-1)];continue D}else{U.msg="invalid distance code",c.mode=O9;break n}break}}else if((z&64)===0){B=Y[(B&65535)+($&(1<<z)-1)];continue U}else if(z&32){c.mode=kv;break n}else{U.msg="invalid literal/length code",c.mode=O9;break n}break}}while(g<f&&h<T);q=Q>>3,g-=q,Q-=q<<3,$&=(1<<Q)-1,U.next_in=g,U.next_out=h,U.avail_in=g<f?5+(f-g):5-(g-f),U.avail_out=h<T?257+(T-h):257-(h-T),c.hold=$,c.bits=Q;return}});var $V=L((h01,JV)=>{var TV=w2(),tD=15,yV=852,FV=592,iV=0,t7=1,XV=2,pv=[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],mv=[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],av=[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],ov=[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];JV.exports=function(U,D,c,g,f,h,W,T){var x=T.bits,y=0,F=0,i=0,X=0,$=0,Q=0,Y=0,V=0,G=0,J=0,B,z,q,Z,M,O=null,_=0,w,H=new TV.Buf16(tD+1),v=new TV.Buf16(tD+1),P=null,p=0,b,C,A;for(y=0;y<=tD;y++)H[y]=0;for(F=0;F<g;F++)H[D[c+F]]++;$=x;for(X=tD;X>=1;X--)if(H[X]!==0)break;if($>X)$=X;if(X===0)return f[h++]=20971520,f[h++]=20971520,T.bits=1,0;for(i=1;i<X;i++)if(H[i]!==0)break;if($<i)$=i;V=1;for(y=1;y<=tD;y++)if(V<<=1,V-=H[y],V<0)return-1;if(V>0&&(U===iV||X!==1))return-1;v[1]=0;for(y=1;y<tD;y++)v[y+1]=v[y]+H[y];for(F=0;F<g;F++)if(D[c+F]!==0)W[v[D[c+F]]++]=F;if(U===iV)O=P=W,w=19;else if(U===t7)O=pv,_-=257,P=mv,p-=257,w=256;else O=av,P=ov,w=-1;if(J=0,F=0,y=i,M=h,Q=$,Y=0,q=-1,G=1<<$,Z=G-1,U===t7&&G>yV||U===XV&&G>FV)return 1;for(;;){if(b=y-Y,W[F]<w)C=0,A=W[F];else if(W[F]>w)C=P[p+W[F]],A=O[_+W[F]];else C=96,A=0;B=1<<y-Y,z=1<<Q,i=z;do z-=B,f[M+(J>>Y)+z]=b<<24|C<<16|A|0;while(z!==0);B=1<<y-1;while(J&B)B>>=1;if(B!==0)J&=B-1,J+=B;else J=0;if(F++,--H[y]===0){if(y===X)break;y=D[c+W[F]]}if(y>$&&(J&Z)!==q){if(Y===0)Y=$;M+=i,Q=y-Y,V=1<<Q;while(Q+Y<X){if(V-=H[Q+Y],V<=0)break;Q++,V<<=1}if(G+=1<<Q,U===t7&&G>yV||U===XV&&G>FV)return 1;q=J&Z,f[q]=$<<24|Q<<16|M-h|0}}if(J!==0)f[M+J]=y-Y<<24|4194304|0;return T.bits=$,0}});var lV=L((XN)=>{var An=w2(),c4=N7(),J2=P7(),rv=xV(),A0=$V(),lv=0,RV=1,uV=2,VV=4,tv=5,q9=6,lU=0,ev=1,sv=2,_n=-2,dV=-3,g4=-4,nN=-5,QV=8,kV=1,YV=2,BV=3,GV=4,KV=5,ZV=6,bV=7,zV=8,OV=9,qV=10,H9=11,I2=12,e7=13,MV=14,s7=15,AV=16,HV=17,LV=18,CV=19,M9=20,A9=21,EV=22,wV=23,jV=24,IV=25,_V=26,n4=27,SV=28,vV=29,M1=30,f4=31,UN=32,DN=852,cN=592,gN=15,fN=gN;function NV(n){return(n>>>24&255)+(n>>>8&65280)+((n&65280)<<8)+((n&255)<<24)}function hN(){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 An.Buf16(320),this.work=new An.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function pV(n){var U;if(!n||!n.state)return _n;if(U=n.state,n.total_in=n.total_out=U.total=0,n.msg="",U.wrap)n.adler=U.wrap&1;return U.mode=kV,U.last=0,U.havedict=0,U.dmax=32768,U.head=null,U.hold=0,U.bits=0,U.lencode=U.lendyn=new An.Buf32(DN),U.distcode=U.distdyn=new An.Buf32(cN),U.sane=1,U.back=-1,lU}function mV(n){var U;if(!n||!n.state)return _n;return U=n.state,U.wsize=0,U.whave=0,U.wnext=0,pV(n)}function aV(n,U){var D,c;if(!n||!n.state)return _n;if(c=n.state,U<0)D=0,U=-U;else if(D=(U>>4)+1,U<48)U&=15;if(U&&(U<8||U>15))return _n;if(c.window!==null&&c.wbits!==U)c.window=null;return c.wrap=D,c.wbits=U,mV(n)}function oV(n,U){var D,c;if(!n)return _n;if(c=new hN,n.state=c,c.window=null,D=aV(n,U),D!==lU)n.state=null;return D}function WN(n){return oV(n,fN)}var PV=!0,U4,D4;function xN(n){if(PV){var U;U4=new An.Buf32(512),D4=new An.Buf32(32),U=0;while(U<144)n.lens[U++]=8;while(U<256)n.lens[U++]=9;while(U<280)n.lens[U++]=7;while(U<288)n.lens[U++]=8;A0(RV,n.lens,0,288,U4,0,n.work,{bits:9}),U=0;while(U<32)n.lens[U++]=5;A0(uV,n.lens,0,32,D4,0,n.work,{bits:5}),PV=!1}n.lencode=U4,n.lenbits=9,n.distcode=D4,n.distbits=5}function rV(n,U,D,c){var g,f=n.state;if(f.window===null)f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new An.Buf8(f.wsize);if(c>=f.wsize)An.arraySet(f.window,U,D-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize;else{if(g=f.wsize-f.wnext,g>c)g=c;if(An.arraySet(f.window,U,D-c,g,f.wnext),c-=g,c)An.arraySet(f.window,U,D-c,c,0),f.wnext=c,f.whave=f.wsize;else{if(f.wnext+=g,f.wnext===f.wsize)f.wnext=0;if(f.whave<f.wsize)f.whave+=g}}return 0}function TN(n,U){var D,c,g,f,h,W,T,x,y,F,i,X,$,Q,Y=0,V,G,J,B,z,q,Z,M,O=new An.Buf8(4),_,w,H=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!n||!n.state||!n.output||!n.input&&n.avail_in!==0)return _n;if(D=n.state,D.mode===I2)D.mode=e7;h=n.next_out,g=n.output,T=n.avail_out,f=n.next_in,c=n.input,W=n.avail_in,x=D.hold,y=D.bits,F=W,i=T,M=lU;n:for(;;)switch(D.mode){case kV:if(D.wrap===0){D.mode=e7;break}while(y<16){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}if(D.wrap&2&&x===35615){D.check=0,O[0]=x&255,O[1]=x>>>8&255,D.check=J2(D.check,O,2,0),x=0,y=0,D.mode=YV;break}if(D.flags=0,D.head)D.head.done=!1;if(!(D.wrap&1)||(((x&255)<<8)+(x>>8))%31){n.msg="incorrect header check",D.mode=M1;break}if((x&15)!==QV){n.msg="unknown compression method",D.mode=M1;break}if(x>>>=4,y-=4,Z=(x&15)+8,D.wbits===0)D.wbits=Z;else if(Z>D.wbits){n.msg="invalid window size",D.mode=M1;break}D.dmax=1<<Z,n.adler=D.check=1,D.mode=x&512?qV:I2,x=0,y=0;break;case YV:while(y<16){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}if(D.flags=x,(D.flags&255)!==QV){n.msg="unknown compression method",D.mode=M1;break}if(D.flags&57344){n.msg="unknown header flags set",D.mode=M1;break}if(D.head)D.head.text=x>>8&1;if(D.flags&512)O[0]=x&255,O[1]=x>>>8&255,D.check=J2(D.check,O,2,0);x=0,y=0,D.mode=BV;case BV:while(y<32){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}if(D.head)D.head.time=x;if(D.flags&512)O[0]=x&255,O[1]=x>>>8&255,O[2]=x>>>16&255,O[3]=x>>>24&255,D.check=J2(D.check,O,4,0);x=0,y=0,D.mode=GV;case GV:while(y<16){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}if(D.head)D.head.xflags=x&255,D.head.os=x>>8;if(D.flags&512)O[0]=x&255,O[1]=x>>>8&255,D.check=J2(D.check,O,2,0);x=0,y=0,D.mode=KV;case KV:if(D.flags&1024){while(y<16){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}if(D.length=x,D.head)D.head.extra_len=x;if(D.flags&512)O[0]=x&255,O[1]=x>>>8&255,D.check=J2(D.check,O,2,0);x=0,y=0}else if(D.head)D.head.extra=null;D.mode=ZV;case ZV:if(D.flags&1024){if(X=D.length,X>W)X=W;if(X){if(D.head){if(Z=D.head.extra_len-D.length,!D.head.extra)D.head.extra=Array(D.head.extra_len);An.arraySet(D.head.extra,c,f,X,Z)}if(D.flags&512)D.check=J2(D.check,c,X,f);W-=X,f+=X,D.length-=X}if(D.length)break n}D.length=0,D.mode=bV;case bV:if(D.flags&2048){if(W===0)break n;X=0;do if(Z=c[f+X++],D.head&&Z&&D.length<65536)D.head.name+=String.fromCharCode(Z);while(Z&&X<W);if(D.flags&512)D.check=J2(D.check,c,X,f);if(W-=X,f+=X,Z)break n}else if(D.head)D.head.name=null;D.length=0,D.mode=zV;case zV:if(D.flags&4096){if(W===0)break n;X=0;do if(Z=c[f+X++],D.head&&Z&&D.length<65536)D.head.comment+=String.fromCharCode(Z);while(Z&&X<W);if(D.flags&512)D.check=J2(D.check,c,X,f);if(W-=X,f+=X,Z)break n}else if(D.head)D.head.comment=null;D.mode=OV;case OV:if(D.flags&512){while(y<16){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}if(x!==(D.check&65535)){n.msg="header crc mismatch",D.mode=M1;break}x=0,y=0}if(D.head)D.head.hcrc=D.flags>>9&1,D.head.done=!0;n.adler=D.check=0,D.mode=I2;break;case qV:while(y<32){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}n.adler=D.check=NV(x),x=0,y=0,D.mode=H9;case H9:if(D.havedict===0)return n.next_out=h,n.avail_out=T,n.next_in=f,n.avail_in=W,D.hold=x,D.bits=y,sv;n.adler=D.check=1,D.mode=I2;case I2:if(U===tv||U===q9)break n;case e7:if(D.last){x>>>=y&7,y-=y&7,D.mode=n4;break}while(y<3){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}switch(D.last=x&1,x>>>=1,y-=1,x&3){case 0:D.mode=MV;break;case 1:if(xN(D),D.mode=M9,U===q9){x>>>=2,y-=2;break n}break;case 2:D.mode=HV;break;case 3:n.msg="invalid block type",D.mode=M1}x>>>=2,y-=2;break;case MV:x>>>=y&7,y-=y&7;while(y<32){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}if((x&65535)!==(x>>>16^65535)){n.msg="invalid stored block lengths",D.mode=M1;break}if(D.length=x&65535,x=0,y=0,D.mode=s7,U===q9)break n;case s7:D.mode=AV;case AV:if(X=D.length,X){if(X>W)X=W;if(X>T)X=T;if(X===0)break n;An.arraySet(g,c,f,X,h),W-=X,f+=X,T-=X,h+=X,D.length-=X;break}D.mode=I2;break;case HV:while(y<14){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}if(D.nlen=(x&31)+257,x>>>=5,y-=5,D.ndist=(x&31)+1,x>>>=5,y-=5,D.ncode=(x&15)+4,x>>>=4,y-=4,D.nlen>286||D.ndist>30){n.msg="too many length or distance symbols",D.mode=M1;break}D.have=0,D.mode=LV;case LV:while(D.have<D.ncode){while(y<3){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}D.lens[H[D.have++]]=x&7,x>>>=3,y-=3}while(D.have<19)D.lens[H[D.have++]]=0;if(D.lencode=D.lendyn,D.lenbits=7,_={bits:D.lenbits},M=A0(lv,D.lens,0,19,D.lencode,0,D.work,_),D.lenbits=_.bits,M){n.msg="invalid code lengths set",D.mode=M1;break}D.have=0,D.mode=CV;case CV:while(D.have<D.nlen+D.ndist){for(;;){if(Y=D.lencode[x&(1<<D.lenbits)-1],V=Y>>>24,G=Y>>>16&255,J=Y&65535,V<=y)break;if(W===0)break n;W--,x+=c[f++]<<y,y+=8}if(J<16)x>>>=V,y-=V,D.lens[D.have++]=J;else{if(J===16){w=V+2;while(y<w){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}if(x>>>=V,y-=V,D.have===0){n.msg="invalid bit length repeat",D.mode=M1;break}Z=D.lens[D.have-1],X=3+(x&3),x>>>=2,y-=2}else if(J===17){w=V+3;while(y<w){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}x>>>=V,y-=V,Z=0,X=3+(x&7),x>>>=3,y-=3}else{w=V+7;while(y<w){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}x>>>=V,y-=V,Z=0,X=11+(x&127),x>>>=7,y-=7}if(D.have+X>D.nlen+D.ndist){n.msg="invalid bit length repeat",D.mode=M1;break}while(X--)D.lens[D.have++]=Z}}if(D.mode===M1)break;if(D.lens[256]===0){n.msg="invalid code -- missing end-of-block",D.mode=M1;break}if(D.lenbits=9,_={bits:D.lenbits},M=A0(RV,D.lens,0,D.nlen,D.lencode,0,D.work,_),D.lenbits=_.bits,M){n.msg="invalid literal/lengths set",D.mode=M1;break}if(D.distbits=6,D.distcode=D.distdyn,_={bits:D.distbits},M=A0(uV,D.lens,D.nlen,D.ndist,D.distcode,0,D.work,_),D.distbits=_.bits,M){n.msg="invalid distances set",D.mode=M1;break}if(D.mode=M9,U===q9)break n;case M9:D.mode=A9;case A9:if(W>=6&&T>=258){if(n.next_out=h,n.avail_out=T,n.next_in=f,n.avail_in=W,D.hold=x,D.bits=y,rv(n,i),h=n.next_out,g=n.output,T=n.avail_out,f=n.next_in,c=n.input,W=n.avail_in,x=D.hold,y=D.bits,D.mode===I2)D.back=-1;break}D.back=0;for(;;){if(Y=D.lencode[x&(1<<D.lenbits)-1],V=Y>>>24,G=Y>>>16&255,J=Y&65535,V<=y)break;if(W===0)break n;W--,x+=c[f++]<<y,y+=8}if(G&&(G&240)===0){B=V,z=G,q=J;for(;;){if(Y=D.lencode[q+((x&(1<<B+z)-1)>>B)],V=Y>>>24,G=Y>>>16&255,J=Y&65535,B+V<=y)break;if(W===0)break n;W--,x+=c[f++]<<y,y+=8}x>>>=B,y-=B,D.back+=B}if(x>>>=V,y-=V,D.back+=V,D.length=J,G===0){D.mode=_V;break}if(G&32){D.back=-1,D.mode=I2;break}if(G&64){n.msg="invalid literal/length code",D.mode=M1;break}D.extra=G&15,D.mode=EV;case EV:if(D.extra){w=D.extra;while(y<w){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}D.length+=x&(1<<D.extra)-1,x>>>=D.extra,y-=D.extra,D.back+=D.extra}D.was=D.length,D.mode=wV;case wV:for(;;){if(Y=D.distcode[x&(1<<D.distbits)-1],V=Y>>>24,G=Y>>>16&255,J=Y&65535,V<=y)break;if(W===0)break n;W--,x+=c[f++]<<y,y+=8}if((G&240)===0){B=V,z=G,q=J;for(;;){if(Y=D.distcode[q+((x&(1<<B+z)-1)>>B)],V=Y>>>24,G=Y>>>16&255,J=Y&65535,B+V<=y)break;if(W===0)break n;W--,x+=c[f++]<<y,y+=8}x>>>=B,y-=B,D.back+=B}if(x>>>=V,y-=V,D.back+=V,G&64){n.msg="invalid distance code",D.mode=M1;break}D.offset=J,D.extra=G&15,D.mode=jV;case jV:if(D.extra){w=D.extra;while(y<w){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}D.offset+=x&(1<<D.extra)-1,x>>>=D.extra,y-=D.extra,D.back+=D.extra}if(D.offset>D.dmax){n.msg="invalid distance too far back",D.mode=M1;break}D.mode=IV;case IV:if(T===0)break n;if(X=i-T,D.offset>X){if(X=D.offset-X,X>D.whave){if(D.sane){n.msg="invalid distance too far back",D.mode=M1;break}}if(X>D.wnext)X-=D.wnext,$=D.wsize-X;else $=D.wnext-X;if(X>D.length)X=D.length;Q=D.window}else Q=g,$=h-D.offset,X=D.length;if(X>T)X=T;T-=X,D.length-=X;do g[h++]=Q[$++];while(--X);if(D.length===0)D.mode=A9;break;case _V:if(T===0)break n;g[h++]=D.length,T--,D.mode=A9;break;case n4:if(D.wrap){while(y<32){if(W===0)break n;W--,x|=c[f++]<<y,y+=8}if(i-=T,n.total_out+=i,D.total+=i,i)n.adler=D.check=D.flags?J2(D.check,g,i,h-i):c4(D.check,g,i,h-i);if(i=T,(D.flags?x:NV(x))!==D.check){n.msg="incorrect data check",D.mode=M1;break}x=0,y=0}D.mode=SV;case SV:if(D.wrap&&D.flags){while(y<32){if(W===0)break n;W--,x+=c[f++]<<y,y+=8}if(x!==(D.total&4294967295)){n.msg="incorrect length check",D.mode=M1;break}x=0,y=0}D.mode=vV;case vV:M=ev;break n;case M1:M=dV;break n;case f4:return g4;case UN:default:return _n}if(n.next_out=h,n.avail_out=T,n.next_in=f,n.avail_in=W,D.hold=x,D.bits=y,D.wsize||i!==n.avail_out&&D.mode<M1&&(D.mode<n4||U!==VV)){if(rV(n,n.output,n.next_out,i-n.avail_out))return D.mode=f4,g4}if(F-=n.avail_in,i-=n.avail_out,n.total_in+=F,n.total_out+=i,D.total+=i,D.wrap&&i)n.adler=D.check=D.flags?J2(D.check,g,i,n.next_out-i):c4(D.check,g,i,n.next_out-i);if(n.data_type=D.bits+(D.last?64:0)+(D.mode===I2?128:0)+(D.mode===M9||D.mode===s7?256:0),(F===0&&i===0||U===VV)&&M===lU)M=nN;return M}function yN(n){if(!n||!n.state)return _n;var U=n.state;if(U.window)U.window=null;return n.state=null,lU}function FN(n,U){var D;if(!n||!n.state)return _n;if(D=n.state,(D.wrap&2)===0)return _n;return D.head=U,U.done=!1,lU}function iN(n,U){var D=U.length,c,g,f;if(!n||!n.state)return _n;if(c=n.state,c.wrap!==0&&c.mode!==H9)return _n;if(c.mode===H9){if(g=1,g=c4(g,U,D,0),g!==c.check)return dV}if(f=rV(n,U,D,D),f)return c.mode=f4,g4;return c.havedict=1,lU}XN.inflateReset=mV;XN.inflateReset2=aV;XN.inflateResetKeep=pV;XN.inflateInit=WN;XN.inflateInit2=oV;XN.inflate=TN;XN.inflateEnd=yN;XN.inflateGetHeader=FN;XN.inflateSetDictionary=iN;XN.inflateInfo="pako inflate (from Nodeca project)"});var h4=L((x01,tV)=>{tV.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}});var sV=L((T01,eV)=>{function zN(){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}eV.exports=zN});var UQ=L((AN)=>{var eD=lV(),H0=w2(),L9=p7(),I1=h4(),W4=Q9(),ON=m7(),qN=sV(),nQ=Object.prototype.toString;function tU(n){if(!(this instanceof tU))return new tU(n);this.options=H0.assign({chunkSize:16384,windowBits:0,to:""},n||{});var U=this.options;if(U.raw&&U.windowBits>=0&&U.windowBits<16){if(U.windowBits=-U.windowBits,U.windowBits===0)U.windowBits=-15}if(U.windowBits>=0&&U.windowBits<16&&!(n&&n.windowBits))U.windowBits+=32;if(U.windowBits>15&&U.windowBits<48){if((U.windowBits&15)===0)U.windowBits|=15}this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ON,this.strm.avail_out=0;var D=eD.inflateInit2(this.strm,U.windowBits);if(D!==I1.Z_OK)throw Error(W4[D]);if(this.header=new qN,eD.inflateGetHeader(this.strm,this.header),U.dictionary){if(typeof U.dictionary==="string")U.dictionary=L9.string2buf(U.dictionary);else if(nQ.call(U.dictionary)==="[object ArrayBuffer]")U.dictionary=new Uint8Array(U.dictionary);if(U.raw){if(D=eD.inflateSetDictionary(this.strm,U.dictionary),D!==I1.Z_OK)throw Error(W4[D])}}}tU.prototype.push=function(n,U){var D=this.strm,c=this.options.chunkSize,g=this.options.dictionary,f,h,W,T,x,y=!1;if(this.ended)return!1;if(h=U===~~U?U:U===!0?I1.Z_FINISH:I1.Z_NO_FLUSH,typeof n==="string")D.input=L9.binstring2buf(n);else if(nQ.call(n)==="[object ArrayBuffer]")D.input=new Uint8Array(n);else D.input=n;D.next_in=0,D.avail_in=D.input.length;do{if(D.avail_out===0)D.output=new H0.Buf8(c),D.next_out=0,D.avail_out=c;if(f=eD.inflate(D,I1.Z_NO_FLUSH),f===I1.Z_NEED_DICT&&g)f=eD.inflateSetDictionary(this.strm,g);if(f===I1.Z_BUF_ERROR&&y===!0)f=I1.Z_OK,y=!1;if(f!==I1.Z_STREAM_END&&f!==I1.Z_OK)return this.onEnd(f),this.ended=!0,!1;if(D.next_out){if(D.avail_out===0||f===I1.Z_STREAM_END||D.avail_in===0&&(h===I1.Z_FINISH||h===I1.Z_SYNC_FLUSH))if(this.options.to==="string"){if(W=L9.utf8border(D.output,D.next_out),T=D.next_out-W,x=L9.buf2string(D.output,W),D.next_out=T,D.avail_out=c-T,T)H0.arraySet(D.output,D.output,W,T,0);this.onData(x)}else this.onData(H0.shrinkBuf(D.output,D.next_out))}if(D.avail_in===0&&D.avail_out===0)y=!0}while((D.avail_in>0||D.avail_out===0)&&f!==I1.Z_STREAM_END);if(f===I1.Z_STREAM_END)h=I1.Z_FINISH;if(h===I1.Z_FINISH)return f=eD.inflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===I1.Z_OK;if(h===I1.Z_SYNC_FLUSH)return this.onEnd(I1.Z_OK),D.avail_out=0,!0;return!0};tU.prototype.onData=function(n){this.chunks.push(n)};tU.prototype.onEnd=function(n){if(n===I1.Z_OK)if(this.options.to==="string")this.result=this.chunks.join("");else this.result=H0.flattenChunks(this.chunks);this.chunks=[],this.err=n,this.msg=this.strm.msg};function x4(n,U){var D=new tU(U);if(D.push(n,!0),D.err)throw D.msg||W4[D.err];return D.result}function MN(n,U){return U=U||{},U.raw=!0,x4(n,U)}AN.Inflate=tU;AN.inflate=x4;AN.inflateRaw=MN;AN.ungzip=x4});var gQ=L((F01,cQ)=>{var wN=w2().assign,jN=hV(),IN=UQ(),_N=h4(),DQ={};wN(DQ,jN,IN,_N);cQ.exports=DQ});var hQ=L((PN)=>{var SN=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",vN=gQ(),fQ=L1(),C9=Mn(),NN=SN?"uint8array":"array";PN.magic="\b\x00";function eU(n,U){C9.call(this,"FlateWorker/"+n),this._pako=null,this._pakoAction=n,this._pakoOptions=U,this.meta={}}fQ.inherits(eU,C9);eU.prototype.processChunk=function(n){if(this.meta=n.meta,this._pako===null)this._createPako();this._pako.push(fQ.transformTo(NN,n.data),!1)};eU.prototype.flush=function(){if(C9.prototype.flush.call(this),this._pako===null)this._createPako();this._pako.push([],!0)};eU.prototype.cleanUp=function(){C9.prototype.cleanUp.call(this),this._pako=null};eU.prototype._createPako=function(){this._pako=new vN[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var n=this;this._pako.onData=function(U){n.push({data:U,meta:n.meta})}};PN.compressWorker=function(n){return new eU("Deflate",n)};PN.uncompressWorker=function(){return new eU("Inflate",{})}});var T4=L((kN)=>{var WQ=Mn();kN.STORE={magic:"\x00\x00",compressWorker:function(){return new WQ("STORE compression")},uncompressWorker:function(){return new WQ("STORE decompression")}};kN.DEFLATE=hQ()});var y4=L((aN)=>{aN.LOCAL_FILE_HEADER="PK\x03\x04";aN.CENTRAL_FILE_HEADER="PK\x01\x02";aN.CENTRAL_DIRECTORY_END="PK\x05\x06";aN.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07";aN.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06";aN.DATA_DESCRIPTOR="PK\x07\b"});var FQ=L(($01,yQ)=>{var sD=L1(),nc=Mn(),F4=dD(),xQ=X9(),E9=y4(),G1=function(n,U){var D="",c;for(c=0;c<U;c++)D+=String.fromCharCode(n&255),n=n>>>8;return D},nP=function(n,U){var D=n;if(!n)D=U?16893:33204;return(D&65535)<<16},UP=function(n){return(n||0)&63},TQ=function(n,U,D,c,g,f){var{file:h,compression:W}=n,T=f!==F4.utf8encode,x=sD.transformTo("string",f(h.name)),y=sD.transformTo("string",F4.utf8encode(h.name)),F=h.comment,i=sD.transformTo("string",f(F)),X=sD.transformTo("string",F4.utf8encode(F)),$=y.length!==h.name.length,Q=X.length!==F.length,Y,V,G="",J="",B="",z=h.dir,q=h.date,Z={crc32:0,compressedSize:0,uncompressedSize:0};if(!U||D)Z.crc32=n.crc32,Z.compressedSize=n.compressedSize,Z.uncompressedSize=n.uncompressedSize;var M=0;if(U)M|=8;if(!T&&($||Q))M|=2048;var O=0,_=0;if(z)O|=16;if(g==="UNIX")_=798,O|=nP(h.unixPermissions,z);else _=20,O|=UP(h.dosPermissions,z);if(Y=q.getUTCHours(),Y=Y<<6,Y=Y|q.getUTCMinutes(),Y=Y<<5,Y=Y|q.getUTCSeconds()/2,V=q.getUTCFullYear()-1980,V=V<<4,V=V|q.getUTCMonth()+1,V=V<<5,V=V|q.getUTCDate(),$)J=G1(1,1)+G1(xQ(x),4)+y,G+="up"+G1(J.length,2)+J;if(Q)B=G1(1,1)+G1(xQ(i),4)+X,G+="uc"+G1(B.length,2)+B;var w="";w+=`
|
|
194
|
+
\x00`,w+=G1(M,2),w+=W.magic,w+=G1(Y,2),w+=G1(V,2),w+=G1(Z.crc32,4),w+=G1(Z.compressedSize,4),w+=G1(Z.uncompressedSize,4),w+=G1(x.length,2),w+=G1(G.length,2);var H=E9.LOCAL_FILE_HEADER+w+x+G,v=E9.CENTRAL_FILE_HEADER+G1(_,2)+w+G1(i.length,2)+"\x00\x00\x00\x00"+G1(O,4)+G1(c,4)+x+G+i;return{fileRecord:H,dirRecord:v}},DP=function(n,U,D,c,g){var f="",h=sD.transformTo("string",g(c));return f=E9.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+G1(n,2)+G1(n,2)+G1(U,4)+G1(D,4)+G1(h.length,2)+h,f},cP=function(n){var U="";return U=E9.DATA_DESCRIPTOR+G1(n.crc32,4)+G1(n.compressedSize,4)+G1(n.uncompressedSize,4),U};function pn(n,U,D,c){nc.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=U,this.zipPlatform=D,this.encodeFileName=c,this.streamFiles=n,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}sD.inherits(pn,nc);pn.prototype.push=function(n){var U=n.meta.percent||0,D=this.entriesCount,c=this._sources.length;if(this.accumulate)this.contentBuffer.push(n);else this.bytesWritten+=n.data.length,nc.prototype.push.call(this,{data:n.data,meta:{currentFile:this.currentFile,percent:D?(U+100*(D-c-1))/D:100}})};pn.prototype.openedSource=function(n){this.currentSourceOffset=this.bytesWritten,this.currentFile=n.file.name;var U=this.streamFiles&&!n.file.dir;if(U){var D=TQ(n,U,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:D.fileRecord,meta:{percent:0}})}else this.accumulate=!0};pn.prototype.closedSource=function(n){this.accumulate=!1;var U=this.streamFiles&&!n.file.dir,D=TQ(n,U,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(D.dirRecord),U)this.push({data:cP(n),meta:{percent:100}});else{this.push({data:D.fileRecord,meta:{percent:0}});while(this.contentBuffer.length)this.push(this.contentBuffer.shift())}this.currentFile=null};pn.prototype.flush=function(){var n=this.bytesWritten;for(var U=0;U<this.dirRecords.length;U++)this.push({data:this.dirRecords[U],meta:{percent:100}});var D=this.bytesWritten-n,c=DP(this.dirRecords.length,D,n,this.zipComment,this.encodeFileName);this.push({data:c,meta:{percent:100}})};pn.prototype.prepareNextSource=function(){if(this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused)this.previous.pause();else this.previous.resume()};pn.prototype.registerPrevious=function(n){this._sources.push(n);var U=this;return n.on("data",function(D){U.processChunk(D)}),n.on("end",function(){if(U.closedSource(U.previous.streamInfo),U._sources.length)U.prepareNextSource();else U.end()}),n.on("error",function(D){U.error(D)}),this};pn.prototype.resume=function(){if(!nc.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0};pn.prototype.error=function(n){var U=this._sources;if(!nc.prototype.error.call(this,n))return!1;for(var D=0;D<U.length;D++)try{U[D].error(n)}catch(c){}return!0};pn.prototype.lock=function(){nc.prototype.lock.call(this);var n=this._sources;for(var U=0;U<n.length;U++)n[U].lock()};yQ.exports=pn});var iQ=L((WP)=>{var gP=T4(),fP=FQ(),hP=function(n,U){var D=n||U,c=gP[D];if(!c)throw Error(D+" is not a valid compression method !");return c};WP.generateWorker=function(n,U,D){var c=new fP(U.streamFiles,D,U.platform,U.encodeFileName),g=0;try{n.forEach(function(f,h){g++;var W=hP(h.options.compression,U.compression),T=h.options.compressionOptions||U.compressionOptions||{},x=h.dir,y=h.date;h._compressWorker(W,T).withStreamInfo("file",{name:f,dir:x,date:y,comment:h.comment||"",unixPermissions:h.unixPermissions,dosPermissions:h.dosPermissions}).pipe(c)}),c.entriesCount=g}catch(f){c.error(f)}return c}});var JQ=L((Q01,XQ)=>{var TP=L1(),w9=Mn();function L0(n,U){w9.call(this,"Nodejs stream input adapter for "+n),this._upstreamEnded=!1,this._bindStream(U)}TP.inherits(L0,w9);L0.prototype._bindStream=function(n){var U=this;this._stream=n,n.pause(),n.on("data",function(D){U.push({data:D,meta:{percent:0}})}).on("error",function(D){if(U.isPaused)this.generatedError=D;else U.error(D)}).on("end",function(){if(U.isPaused)U._upstreamEnded=!0;else U.end()})};L0.prototype.pause=function(){if(!w9.prototype.pause.call(this))return!1;return this._stream.pause(),!0};L0.prototype.resume=function(){if(!w9.prototype.resume.call(this))return!1;if(this._upstreamEnded)this.end();else this._stream.resume();return!0};XQ.exports=L0});var zQ=L((Y01,bQ)=>{var yP=dD(),C0=L1(),YQ=Mn(),FP=$7(),BQ=V7(),$Q=J9(),iP=V$(),XP=iQ(),VQ=T0(),JP=JQ(),GQ=function(n,U,D){var c=C0.getTypeOf(U),g,f=C0.extend(D||{},BQ);if(f.date=f.date||new Date,f.compression!==null)f.compression=f.compression.toUpperCase();if(typeof f.unixPermissions==="string")f.unixPermissions=parseInt(f.unixPermissions,8);if(f.unixPermissions&&f.unixPermissions&16384)f.dir=!0;if(f.dosPermissions&&f.dosPermissions&16)f.dir=!0;if(f.dir)n=KQ(n);if(f.createFolders&&(g=$P(n)))ZQ.call(this,g,!0);var h=c==="string"&&f.binary===!1&&f.base64===!1;if(!D||typeof D.binary>"u")f.binary=!h;var W=U instanceof $Q&&U.uncompressedSize===0;if(W||f.dir||!U||U.length===0)f.base64=!1,f.binary=!0,U="",f.compression="STORE",c="string";var T=null;if(U instanceof $Q||U instanceof YQ)T=U;else if(VQ.isNode&&VQ.isStream(U))T=new JP(n,U);else T=C0.prepareContent(n,U,f.binary,f.optimizedBinaryString,f.base64);var x=new iP(n,T,f);this.files[n]=x},$P=function(n){if(n.slice(-1)==="/")n=n.substring(0,n.length-1);var U=n.lastIndexOf("/");return U>0?n.substring(0,U):""},KQ=function(n){if(n.slice(-1)!=="/")n+="/";return n},ZQ=function(n,U){if(U=typeof U<"u"?U:BQ.createFolders,n=KQ(n),!this.files[n])GQ.call(this,n,null,{dir:!0,createFolders:U});return this.files[n]};function QQ(n){return Object.prototype.toString.call(n)==="[object RegExp]"}var VP={load:function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(n){var U,D,c;for(U in this.files)if(c=this.files[U],D=U.slice(this.root.length,U.length),D&&U.slice(0,this.root.length)===this.root)n(D,c)},filter:function(n){var U=[];return this.forEach(function(D,c){if(n(D,c))U.push(c)}),U},file:function(n,U,D){if(arguments.length===1)if(QQ(n)){var c=n;return this.filter(function(f,h){return!h.dir&&c.test(f)})}else{var g=this.files[this.root+n];if(g&&!g.dir)return g;else return null}else n=this.root+n,GQ.call(this,n,U,D);return this},folder:function(n){if(!n)return this;if(QQ(n))return this.filter(function(g,f){return f.dir&&n.test(g)});var U=this.root+n,D=ZQ.call(this,U),c=this.clone();return c.root=D.name,c},remove:function(n){n=this.root+n;var U=this.files[n];if(!U){if(n.slice(-1)!=="/")n+="/";U=this.files[n]}if(U&&!U.dir)delete this.files[n];else{var D=this.filter(function(g,f){return f.name.slice(0,n.length)===n});for(var c=0;c<D.length;c++)delete this.files[D[c].name]}return this},generate:function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(n){var U,D={};try{if(D=C0.extend(n||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:yP.utf8encode}),D.type=D.type.toLowerCase(),D.compression=D.compression.toUpperCase(),D.type==="binarystring")D.type="string";if(!D.type)throw Error("No output type specified.");if(C0.checkSupport(D.type),D.platform==="darwin"||D.platform==="freebsd"||D.platform==="linux"||D.platform==="sunos")D.platform="UNIX";if(D.platform==="win32")D.platform="DOS";var c=D.comment||this.comment||"";U=XP.generateWorker(this,D,c)}catch(g){U=new YQ("error"),U.error(g)}return new FP(U,D.type||"string",D.mimeType)},generateAsync:function(n,U){return this.generateInternalStream(n).accumulate(U)},generateNodeStream:function(n,U){if(n=n||{},!n.type)n.type="nodebuffer";return this.generateInternalStream(n).toNodejsStream(U)}};bQ.exports=VP});var i4=L((B01,qQ)=>{var QP=L1();function OQ(n){this.data=n,this.length=n.length,this.index=0,this.zero=0}OQ.prototype={checkOffset:function(n){this.checkIndex(this.index+n)},checkIndex:function(n){if(this.length<this.zero+n||n<0)throw Error("End of data reached (data length = "+this.length+", asked index = "+n+"). Corrupted zip ?")},setIndex:function(n){this.checkIndex(n),this.index=n},skip:function(n){this.setIndex(this.index+n)},byteAt:function(){},readInt:function(n){var U=0,D;this.checkOffset(n);for(D=this.index+n-1;D>=this.index;D--)U=(U<<8)+this.byteAt(D);return this.index+=n,U},readString:function(n){return QP.transformTo("string",this.readData(n))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var n=this.readInt(4);return new Date(Date.UTC((n>>25&127)+1980,(n>>21&15)-1,n>>16&31,n>>11&31,n>>5&63,(n&31)<<1))}};qQ.exports=OQ});var X4=L((G01,AQ)=>{var MQ=i4(),YP=L1();function Uc(n){MQ.call(this,n);for(var U=0;U<this.data.length;U++)n[U]=n[U]&255}YP.inherits(Uc,MQ);Uc.prototype.byteAt=function(n){return this.data[this.zero+n]};Uc.prototype.lastIndexOfSignature=function(n){var U=n.charCodeAt(0),D=n.charCodeAt(1),c=n.charCodeAt(2),g=n.charCodeAt(3);for(var f=this.length-4;f>=0;--f)if(this.data[f]===U&&this.data[f+1]===D&&this.data[f+2]===c&&this.data[f+3]===g)return f-this.zero;return-1};Uc.prototype.readAndCheckSignature=function(n){var U=n.charCodeAt(0),D=n.charCodeAt(1),c=n.charCodeAt(2),g=n.charCodeAt(3),f=this.readData(4);return U===f[0]&&D===f[1]&&c===f[2]&&g===f[3]};Uc.prototype.readData=function(n){if(this.checkOffset(n),n===0)return[];var U=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,U};AQ.exports=Uc});var CQ=L((K01,LQ)=>{var HQ=i4(),BP=L1();function Dc(n){HQ.call(this,n)}BP.inherits(Dc,HQ);Dc.prototype.byteAt=function(n){return this.data.charCodeAt(this.zero+n)};Dc.prototype.lastIndexOfSignature=function(n){return this.data.lastIndexOf(n)-this.zero};Dc.prototype.readAndCheckSignature=function(n){var U=this.readData(4);return n===U};Dc.prototype.readData=function(n){this.checkOffset(n);var U=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,U};LQ.exports=Dc});var $4=L((Z01,wQ)=>{var EQ=X4(),GP=L1();function J4(n){EQ.call(this,n)}GP.inherits(J4,EQ);J4.prototype.readData=function(n){if(this.checkOffset(n),n===0)return new Uint8Array(0);var U=this.data.subarray(this.zero+this.index,this.zero+this.index+n);return this.index+=n,U};wQ.exports=J4});var _Q=L((b01,IQ)=>{var jQ=$4(),KP=L1();function V4(n){jQ.call(this,n)}KP.inherits(V4,jQ);V4.prototype.readData=function(n){this.checkOffset(n);var U=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,U};IQ.exports=V4});var Q4=L((z01,vQ)=>{var j9=L1(),SQ=E2(),ZP=X4(),bP=CQ(),zP=_Q(),OP=$4();vQ.exports=function(n){var U=j9.getTypeOf(n);if(j9.checkSupport(U),U==="string"&&!SQ.uint8array)return new bP(n);if(U==="nodebuffer")return new zP(n);if(SQ.uint8array)return new OP(j9.transformTo("uint8array",n));return new ZP(j9.transformTo("array",n))}});var uQ=L((O01,RQ)=>{var Y4=Q4(),$U=L1(),qP=J9(),NQ=X9(),I9=dD(),_9=T4(),MP=E2(),AP=0,HP=3,LP=function(n){for(var U in _9){if(!Object.prototype.hasOwnProperty.call(_9,U))continue;if(_9[U].magic===n)return _9[U]}return null};function PQ(n,U){this.options=n,this.loadOptions=U}PQ.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function(n){var U,D;if(n.skip(22),this.fileNameLength=n.readInt(2),D=n.readInt(2),this.fileName=n.readData(this.fileNameLength),n.skip(D),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(U=LP(this.compressionMethod),U===null)throw Error("Corrupted zip : compression "+$U.pretty(this.compressionMethod)+" unknown (inner file : "+$U.transformTo("string",this.fileName)+")");this.decompressed=new qP(this.compressedSize,this.uncompressedSize,this.crc32,U,n.readData(this.compressedSize))},readCentralPart:function(n){this.versionMadeBy=n.readInt(2),n.skip(2),this.bitFlag=n.readInt(2),this.compressionMethod=n.readString(2),this.date=n.readDate(),this.crc32=n.readInt(4),this.compressedSize=n.readInt(4),this.uncompressedSize=n.readInt(4);var U=n.readInt(2);if(this.extraFieldsLength=n.readInt(2),this.fileCommentLength=n.readInt(2),this.diskNumberStart=n.readInt(2),this.internalFileAttributes=n.readInt(2),this.externalFileAttributes=n.readInt(4),this.localHeaderOffset=n.readInt(4),this.isEncrypted())throw Error("Encrypted zip are not supported");n.skip(U),this.readExtraFields(n),this.parseZIP64ExtraField(n),this.fileComment=n.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var n=this.versionMadeBy>>8;if(this.dir=this.externalFileAttributes&16?!0:!1,n===AP)this.dosPermissions=this.externalFileAttributes&63;if(n===HP)this.unixPermissions=this.externalFileAttributes>>16&65535;if(!this.dir&&this.fileNameStr.slice(-1)==="/")this.dir=!0},parseZIP64ExtraField:function(){if(!this.extraFields[1])return;var n=Y4(this.extraFields[1].value);if(this.uncompressedSize===$U.MAX_VALUE_32BITS)this.uncompressedSize=n.readInt(8);if(this.compressedSize===$U.MAX_VALUE_32BITS)this.compressedSize=n.readInt(8);if(this.localHeaderOffset===$U.MAX_VALUE_32BITS)this.localHeaderOffset=n.readInt(8);if(this.diskNumberStart===$U.MAX_VALUE_32BITS)this.diskNumberStart=n.readInt(4)},readExtraFields:function(n){var U=n.index+this.extraFieldsLength,D,c,g;if(!this.extraFields)this.extraFields={};while(n.index+4<U)D=n.readInt(2),c=n.readInt(2),g=n.readData(c),this.extraFields[D]={id:D,length:c,value:g};n.setIndex(U)},handleUTF8:function(){var n=MP.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=I9.utf8decode(this.fileName),this.fileCommentStr=I9.utf8decode(this.fileComment);else{var U=this.findExtraFieldUnicodePath();if(U!==null)this.fileNameStr=U;else{var D=$U.transformTo(n,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(D)}var c=this.findExtraFieldUnicodeComment();if(c!==null)this.fileCommentStr=c;else{var g=$U.transformTo(n,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(g)}}},findExtraFieldUnicodePath:function(){var n=this.extraFields[28789];if(n){var U=Y4(n.value);if(U.readInt(1)!==1)return null;if(NQ(this.fileName)!==U.readInt(4))return null;return I9.utf8decode(U.readData(n.length-5))}return null},findExtraFieldUnicodeComment:function(){var n=this.extraFields[25461];if(n){var U=Y4(n.value);if(U.readInt(1)!==1)return null;if(NQ(this.fileComment)!==U.readInt(4))return null;return I9.utf8decode(U.readData(n.length-5))}return null}};RQ.exports=PQ});var pQ=L((q01,kQ)=>{var CP=Q4(),_2=L1(),mn=y4(),EP=uQ(),wP=E2();function dQ(n){this.files=[],this.loadOptions=n}dQ.prototype={checkSignature:function(n){if(!this.reader.readAndCheckSignature(n)){this.reader.index-=4;var U=this.reader.readString(4);throw Error("Corrupted zip or bug: unexpected signature ("+_2.pretty(U)+", expected "+_2.pretty(n)+")")}},isSignature:function(n,U){var D=this.reader.index;this.reader.setIndex(n);var c=this.reader.readString(4),g=c===U;return this.reader.setIndex(D),g},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 n=this.reader.readData(this.zipCommentLength),U=wP.uint8array?"uint8array":"array",D=_2.transformTo(U,n);this.zipComment=this.loadOptions.decodeFileName(D)},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={};var n=this.zip64EndOfCentralSize-44,U=0,D,c,g;while(U<n)D=this.reader.readInt(2),c=this.reader.readInt(4),g=this.reader.readData(c),this.zip64ExtensibleData[D]={id:D,length:c,value:g}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var n,U;for(n=0;n<this.files.length;n++)U=this.files[n],this.reader.setIndex(U.localHeaderOffset),this.checkSignature(mn.LOCAL_FILE_HEADER),U.readLocalPart(this.reader),U.handleUTF8(),U.processAttributes()},readCentralDir:function(){var n;this.reader.setIndex(this.centralDirOffset);while(this.reader.readAndCheckSignature(mn.CENTRAL_FILE_HEADER))n=new EP({zip64:this.zip64},this.loadOptions),n.readCentralPart(this.reader),this.files.push(n);if(this.centralDirRecords!==this.files.length){if(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 n=this.reader.lastIndexOfSignature(mn.CENTRAL_DIRECTORY_END);if(n<0){var U=!this.isSignature(0,mn.LOCAL_FILE_HEADER);if(U)throw 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");else throw Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(n);var D=n;if(this.checkSignature(mn.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===_2.MAX_VALUE_16BITS||this.diskWithCentralDirStart===_2.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===_2.MAX_VALUE_16BITS||this.centralDirRecords===_2.MAX_VALUE_16BITS||this.centralDirSize===_2.MAX_VALUE_32BITS||this.centralDirOffset===_2.MAX_VALUE_32BITS){if(this.zip64=!0,n=this.reader.lastIndexOfSignature(mn.ZIP64_CENTRAL_DIRECTORY_LOCATOR),n<0)throw Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(n),this.checkSignature(mn.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,mn.ZIP64_CENTRAL_DIRECTORY_END)){if(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(mn.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(mn.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var c=this.centralDirOffset+this.centralDirSize;if(this.zip64)c+=20,c+=12+this.zip64EndOfCentralSize;var g=D-c;if(g>0)if(this.isSignature(D,mn.CENTRAL_FILE_HEADER));else this.reader.zero=g;else if(g<0)throw Error("Corrupted zip: missing "+Math.abs(g)+" bytes.")},prepareReader:function(n){this.reader=CP(n)},load:function(n){this.prepareReader(n),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};kQ.exports=dQ});var oQ=L((M01,aQ)=>{var B4=L1(),S9=PD(),jP=dD(),IP=pQ(),_P=B7(),mQ=T0();function SP(n){return new S9.Promise(function(U,D){var c=n.decompressed.getContentWorker().pipe(new _P);c.on("error",function(g){D(g)}).on("end",function(){if(c.streamInfo.crc32!==n.decompressed.crc32)D(Error("Corrupted zip : CRC32 mismatch"));else U()}).resume()})}aQ.exports=function(n,U){var D=this;if(U=B4.extend(U||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:jP.utf8decode}),mQ.isNode&&mQ.isStream(n))return S9.Promise.reject(Error("JSZip can't accept a stream when loading a zip file."));return B4.prepareContent("the loaded zip file",n,!0,U.optimizedBinaryString,U.base64).then(function(c){var g=new IP(U);return g.load(c),g}).then(function(g){var f=[S9.Promise.resolve(g)],h=g.files;if(U.checkCRC32)for(var W=0;W<h.length;W++)f.push(SP(h[W]));return S9.Promise.all(f)}).then(function(g){var f=g.shift(),h=f.files;for(var W=0;W<h.length;W++){var T=h[W],x=T.fileNameStr,y=B4.resolve(T.fileNameStr);if(D.file(y,T.decompressed,{binary:!0,optimizedBinaryString:!0,date:T.date,dir:T.dir,comment:T.fileCommentStr.length?T.fileCommentStr:null,unixPermissions:T.unixPermissions,dosPermissions:T.dosPermissions,createFolders:U.createFolders}),!T.dir)D.file(y).unsafeOriginalName=x}if(f.zipComment.length)D.comment=f.zipComment;return D})}});var lQ=L((A01,rQ)=>{function Sn(){if(!(this instanceof Sn))return new Sn;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 n=new Sn;for(var U in this)if(typeof this[U]!=="function")n[U]=this[U];return n}}Sn.prototype=zQ();Sn.prototype.loadAsync=oQ();Sn.support=E2();Sn.defaults=V7();Sn.version="3.10.1";Sn.loadAsync=function(n,U){return new Sn().loadAsync(n,U)};Sn.external=PD();rQ.exports=Sn});var G4=L((dP)=>{var vP=_X(),NP=lQ();dP.openArrayBuffer=PP;dP.splitPath=RP;dP.joinPath=uP;function PP(n){return NP.loadAsync(n).then(function(U){function D(h){return U.file(h)!==null}function c(h,W){return U.file(h).async("uint8array").then(function(T){if(W==="base64")return vP.fromByteArray(T);else if(W){var x=new TextDecoder(W);return x.decode(T)}else return T})}function g(h,W){U.file(h,W)}function f(){return U.generateAsync({type:"arraybuffer"})}return{exists:D,read:c,write:g,toArrayBuffer:f}})}function RP(n){var U=n.lastIndexOf("/");if(U===-1)return{dirname:"",basename:n};else return{dirname:n.substring(0,U),basename:n.substring(U+1)}}function uP(){var n=Array.prototype.filter.call(arguments,function(D){return D}),U=[];return n.forEach(function(D){if(/^\//.test(D))U=[D];else U.push(D)}),U.join("/")}});var K4=L((oP)=>{var v9=w1();oP.Element=cc;oP.element=function(n,U,D){return new cc(n,U,D)};oP.text=function(n){return{type:"text",value:n}};var tQ=oP.emptyElement={first:function(){return null},firstOrEmpty:function(){return tQ},attributes:{},children:[]};function cc(n,U,D){this.type="element",this.name=n,this.attributes=U||{},this.children=D||[]}cc.prototype.first=function(n){return v9.find(this.children,function(U){return U.name===n})};cc.prototype.firstOrEmpty=function(n){return this.first(n)||tQ};cc.prototype.getElementsByTagName=function(n){var U=v9.filter(this.children,function(D){return D.name===n});return eQ(U)};cc.prototype.text=function(){if(this.children.length===0)return"";else if(this.children.length!==1||this.children[0].type!=="text")throw Error("Not implemented");return this.children[0].value};var aP={getElementsByTagName:function(n){return eQ(v9.flatten(this.map(function(U){return U.getElementsByTagName(n)},!0)))}};function eQ(n){return v9.extend(n,aP)}});var E0=L((nR)=>{function eP(n,U,D){if(D===void 0)D=Array.prototype;if(n&&typeof D.find==="function")return D.find.call(n,U);for(var c=0;c<n.length;c++)if(Object.prototype.hasOwnProperty.call(n,c)){var g=n[c];if(U.call(void 0,g,c,n))return g}}function Z4(n,U){if(U===void 0)U=Object;return U&&typeof U.freeze==="function"?U.freeze(n):n}function sP(n,U){if(n===null||typeof n!=="object")throw TypeError("target is not an object");for(var D in U)if(Object.prototype.hasOwnProperty.call(U,D))n[D]=U[D];return n}var sQ=Z4({HTML:"text/html",isHTML:function(n){return n===sQ.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),nY=Z4({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(n){return n===nY.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});nR.assign=sP;nR.find=eP;nR.freeze=Z4;nR.MIME_TYPE=sQ;nR.NAMESPACE=nY});var a9=L((GR)=>{var xY=E0(),$2=xY.find,w0=xY.NAMESPACE;function hR(n){return n!==""}function WR(n){return n?n.split(/[\t\n\f\r ]+/).filter(hR):[]}function xR(n,U){if(!n.hasOwnProperty(U))n[U]=!0;return n}function UY(n){if(!n)return[];var U=WR(n);return Object.keys(U.reduce(xR,{}))}function TR(n){return function(U){return n&&n.indexOf(U)!==-1}}function I0(n,U){for(var D in n)if(Object.prototype.hasOwnProperty.call(n,D))U[D]=n[D]}function bn(n,U){var D=n.prototype;if(!(D instanceof U)){let g=function(){};var c=g;g.prototype=U.prototype,g=new g,I0(D,g),n.prototype=D=g}if(D.constructor!=n){if(typeof n!="function")console.error("unknown Class:"+n);D.constructor=n}}var zn={},vn=zn.ELEMENT_NODE=1,fc=zn.ATTRIBUTE_NODE=2,P9=zn.TEXT_NODE=3,TY=zn.CDATA_SECTION_NODE=4,yY=zn.ENTITY_REFERENCE_NODE=5,yR=zn.ENTITY_NODE=6,b4=zn.PROCESSING_INSTRUCTION_NODE=7,z4=zn.COMMENT_NODE=8,FY=zn.DOCUMENT_NODE=9,iY=zn.DOCUMENT_TYPE_NODE=10,S2=zn.DOCUMENT_FRAGMENT_NODE=11,FR=zn.NOTATION_NODE=12,Wn={},p1={},w01=Wn.INDEX_SIZE_ERR=(p1[1]="Index size error",1),j01=Wn.DOMSTRING_SIZE_ERR=(p1[2]="DOMString size error",2),Zn=Wn.HIERARCHY_REQUEST_ERR=(p1[3]="Hierarchy request error",3),I01=Wn.WRONG_DOCUMENT_ERR=(p1[4]="Wrong document",4),iR=Wn.INVALID_CHARACTER_ERR=(p1[5]="Invalid character",5),_01=Wn.NO_DATA_ALLOWED_ERR=(p1[6]="No data allowed",6),S01=Wn.NO_MODIFICATION_ALLOWED_ERR=(p1[7]="No modification allowed",7),XY=Wn.NOT_FOUND_ERR=(p1[8]="Not found",8),v01=Wn.NOT_SUPPORTED_ERR=(p1[9]="Not supported",9),DY=Wn.INUSE_ATTRIBUTE_ERR=(p1[10]="Attribute in use",10),gc=Wn.INVALID_STATE_ERR=(p1[11]="Invalid state",11),N01=Wn.SYNTAX_ERR=(p1[12]="Syntax error",12),P01=Wn.INVALID_MODIFICATION_ERR=(p1[13]="Invalid modification",13),R01=Wn.NAMESPACE_ERR=(p1[14]="Invalid namespace",14),u01=Wn.INVALID_ACCESS_ERR=(p1[15]="Invalid access",15);function V1(n,U){if(U instanceof Error)var D=U;else if(D=this,Error.call(this,p1[n]),this.message=p1[n],Error.captureStackTrace)Error.captureStackTrace(this,V1);if(D.code=n,U)this.message=this.message+": "+U;return D}V1.prototype=Error.prototype;I0(Wn,V1);function v2(){}v2.prototype={length:0,item:function(n){return n>=0&&n<this.length?this[n]:null},toString:function(n,U,D){var c=!!D&&!!D.requireWellFormed;for(var g=[],f=0;f<this.length;f++)w4(this[f],g,n,U,null,c);return g.join("")},filter:function(n){return Array.prototype.filter.call(this,n)},indexOf:function(n){return Array.prototype.indexOf.call(this,n)}};function hc(n,U){this._node=n,this._refresh=U,O4(this)}function O4(n){var U=n._node._inc||n._node.ownerDocument._inc;if(n._inc!==U){var D=n._refresh(n._node);if(OY(n,"length",D.length),!n.$$length||D.length<n.$$length){for(var c=D.length;c in n;c++)if(Object.prototype.hasOwnProperty.call(n,c))delete n[c]}I0(D,n),n._inc=U}}hc.prototype.item=function(n){return O4(this),this[n]||null};bn(hc,v2);function R9(){}function JY(n,U){var D=n.length;while(D--)if(n[D]===U)return D}function cY(n,U,D,c){if(c)U[JY(U,c)]=D;else U[U.length++]=D;if(n){D.ownerElement=n;var g=n.ownerDocument;if(g)c&&QY(g,n,c),XR(g,n,D)}}function gY(n,U,D){var c=JY(U,D);if(c>=0){var g=U.length-1;while(c<g)U[c]=U[++c];if(U.length=g,n){var f=n.ownerDocument;if(f)QY(f,n,D),D.ownerElement=null}}else throw new V1(XY,Error(n.tagName+"@"+D))}R9.prototype={length:0,item:v2.prototype.item,getNamedItem:function(n){var U=this.length;while(U--){var D=this[U];if(D.nodeName==n)return D}},setNamedItem:function(n){var U=n.ownerElement;if(U&&U!=this._ownerElement)throw new V1(DY);var D=this.getNamedItem(n.nodeName);return cY(this._ownerElement,this,n,D),D},setNamedItemNS:function(n){var U=n.ownerElement,D;if(U&&U!=this._ownerElement)throw new V1(DY);return D=this.getNamedItemNS(n.namespaceURI,n.localName),cY(this._ownerElement,this,n,D),D},removeNamedItem:function(n){var U=this.getNamedItem(n);return gY(this._ownerElement,this,U),U},removeNamedItemNS:function(n,U){var D=this.getNamedItemNS(n,U);return gY(this._ownerElement,this,D),D},getNamedItemNS:function(n,U){var D=this.length;while(D--){var c=this[D];if(c.localName==U&&c.namespaceURI==n)return c}return null}};function $Y(){}$Y.prototype={hasFeature:function(n,U){return!0},createDocument:function(n,U,D){var c=new _0;if(c.implementation=this,c.childNodes=new v2,c.doctype=D||null,D)c.appendChild(D);if(U){var g=c.createElementNS(n,U);c.appendChild(g)}return c},createDocumentType:function(n,U,D){var c=new p9;return c.name=n,c.nodeName=n,c.publicId=U||"",c.systemId=D||"",c}};function $1(){}$1.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(n,U){return d9(this,n,U)},replaceChild:function(n,U){if(d9(this,n,U,BY),U)this.removeChild(U)},removeChild:function(n){return YY(this,n)},appendChild:function(n){return this.insertBefore(n,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(n){return zY(this.ownerDocument||this,this,n)},normalize:function(){k1(this,null,{enter:function(n){var U=n.firstChild;while(U){var D=U.nextSibling;if(D!==null&&D.nodeType===P9&&U.nodeType===P9)n.removeChild(D),U.appendData(D.data);else U=D}return!0}})},isSupported:function(n,U){return this.ownerDocument.implementation.hasFeature(n,U)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(n){var U=this;while(U){var D=U._nsMap;if(D){for(var c in D)if(Object.prototype.hasOwnProperty.call(D,c)&&D[c]===n)return c}U=U.nodeType==fc?U.ownerDocument:U.parentNode}return null},lookupNamespaceURI:function(n){var U=this;while(U){var D=U._nsMap;if(D){if(Object.prototype.hasOwnProperty.call(D,n))return D[n]}U=U.nodeType==fc?U.ownerDocument:U.parentNode}return null},isDefaultNamespace:function(n){var U=this.lookupPrefix(n);return U==null}};function VY(n){return n=="<"&&"<"||n==">"&&">"||n=="&"&&"&"||n=='"'&&"""||"&#"+n.charCodeAt()+";"}I0(zn,$1);I0(zn,$1.prototype);function u9(n,U){return k1(n,null,{enter:function(D){return U(D)?k1.STOP:!0}})===k1.STOP}function k1(n,U,D){var c=[{node:n,context:U,phase:k1.ENTER}];while(c.length>0){var g=c.pop();if(g.phase===k1.ENTER){var f=D.enter(g.node,g.context);if(f===k1.STOP)return k1.STOP;if(c.push({node:g.node,context:f,phase:k1.EXIT}),f===null||f===void 0)continue;var h=g.node.lastChild;while(h)c.push({node:h,context:f,phase:k1.ENTER}),h=h.previousSibling}else if(D.exit)D.exit(g.node,g.context)}}k1.STOP=Symbol("walkDOM.STOP");k1.ENTER=0;k1.EXIT=1;function _0(){this.ownerDocument=this}function XR(n,U,D){n&&n._inc++;var c=D.namespaceURI;if(c===w0.XMLNS)U._nsMap[D.prefix?D.localName:""]=D.value}function QY(n,U,D,c){n&&n._inc++;var g=D.namespaceURI;if(g===w0.XMLNS)delete U._nsMap[D.prefix?D.localName:""]}function q4(n,U,D){if(n&&n._inc){n._inc++;var c=U.childNodes;if(D)c[c.length++]=D;else{var g=U.firstChild,f=0;while(g)c[f++]=g,g=g.nextSibling;c.length=f,delete c[c.length]}}}function YY(n,U){var{previousSibling:D,nextSibling:c}=U;if(D)D.nextSibling=c;else n.firstChild=c;if(c)c.previousSibling=D;else n.lastChild=D;return U.parentNode=null,U.previousSibling=null,U.nextSibling=null,q4(n.ownerDocument,n),U}function JR(n){return n&&(n.nodeType===$1.DOCUMENT_NODE||n.nodeType===$1.DOCUMENT_FRAGMENT_NODE||n.nodeType===$1.ELEMENT_NODE)}function $R(n){return n&&(V2(n)||M4(n)||N2(n)||n.nodeType===$1.DOCUMENT_FRAGMENT_NODE||n.nodeType===$1.COMMENT_NODE||n.nodeType===$1.PROCESSING_INSTRUCTION_NODE)}function N2(n){return n&&n.nodeType===$1.DOCUMENT_TYPE_NODE}function V2(n){return n&&n.nodeType===$1.ELEMENT_NODE}function M4(n){return n&&n.nodeType===$1.TEXT_NODE}function fY(n,U){var D=n.childNodes||[];if($2(D,V2)||N2(U))return!1;var c=$2(D,N2);return!(U&&c&&D.indexOf(c)>D.indexOf(U))}function hY(n,U){var D=n.childNodes||[];function c(f){return V2(f)&&f!==U}if($2(D,c))return!1;var g=$2(D,N2);return!(U&&g&&D.indexOf(g)>D.indexOf(U))}function VR(n,U,D){if(!JR(n))throw new V1(Zn,"Unexpected parent node type "+n.nodeType);if(D&&D.parentNode!==n)throw new V1(XY,"child not in parent");if(!$R(U)||N2(U)&&n.nodeType!==$1.DOCUMENT_NODE)throw new V1(Zn,"Unexpected node type "+U.nodeType+" for parent node type "+n.nodeType)}function QR(n,U,D){var c=n.childNodes||[],g=U.childNodes||[];if(U.nodeType===$1.DOCUMENT_FRAGMENT_NODE){var f=g.filter(V2);if(f.length>1||$2(g,M4))throw new V1(Zn,"More than one element or text in fragment");if(f.length===1&&!fY(n,D))throw new V1(Zn,"Element in fragment can not be inserted before doctype")}if(V2(U)){if(!fY(n,D))throw new V1(Zn,"Only one element can be added and only after doctype")}if(N2(U)){if($2(c,N2))throw new V1(Zn,"Only one doctype is allowed");var h=$2(c,V2);if(D&&c.indexOf(h)<c.indexOf(D))throw new V1(Zn,"Doctype can only be inserted before an element");if(!D&&h)throw new V1(Zn,"Doctype can not be appended since element is present")}}function BY(n,U,D){var c=n.childNodes||[],g=U.childNodes||[];if(U.nodeType===$1.DOCUMENT_FRAGMENT_NODE){var f=g.filter(V2);if(f.length>1||$2(g,M4))throw new V1(Zn,"More than one element or text in fragment");if(f.length===1&&!hY(n,D))throw new V1(Zn,"Element in fragment can not be inserted before doctype")}if(V2(U)){if(!hY(n,D))throw new V1(Zn,"Only one element can be added and only after doctype")}if(N2(U)){let T=function(x){return N2(x)&&x!==D};var W=T;if($2(c,T))throw new V1(Zn,"Only one doctype is allowed");var h=$2(c,V2);if(D&&c.indexOf(h)<c.indexOf(D))throw new V1(Zn,"Doctype can only be inserted before an element")}}function d9(n,U,D,c){if(VR(n,U,D),n.nodeType===$1.DOCUMENT_NODE)(c||QR)(n,U,D);var g=U.parentNode;if(g)g.removeChild(U);if(U.nodeType===S2){var f=U.firstChild;if(f==null)return U;var h=U.lastChild}else f=h=U;var W=D?D.previousSibling:n.lastChild;if(f.previousSibling=W,h.nextSibling=D,W)W.nextSibling=f;else n.firstChild=f;if(D==null)n.lastChild=h;else D.previousSibling=h;do{f.parentNode=n;var T=n.ownerDocument||n;j0(f,T)}while(f!==h&&(f=f.nextSibling));if(q4(n.ownerDocument||n,n),U.nodeType==S2)U.firstChild=U.lastChild=null;return U}function j0(n,U){if(n.ownerDocument===U)return;if(n.ownerDocument=U,n.nodeType===vn&&n.attributes)for(var D=0;D<n.attributes.length;D++){var c=n.attributes.item(D);if(c)c.ownerDocument=U}var g=n.firstChild;while(g)j0(g,U),g=g.nextSibling}function YR(n,U){if(U.parentNode)U.parentNode.removeChild(U);if(U.parentNode=n,U.previousSibling=n.lastChild,U.nextSibling=null,U.previousSibling)U.previousSibling.nextSibling=U;else n.firstChild=U;n.lastChild=U,q4(n.ownerDocument,n,U);var D=n.ownerDocument||n;return j0(U,D),U}_0.prototype={nodeName:"#document",nodeType:FY,doctype:null,documentElement:null,_inc:1,insertBefore:function(n,U){if(n.nodeType==S2){var D=n.firstChild;while(D){var c=D.nextSibling;this.insertBefore(D,U),D=c}return n}if(d9(this,n,U),j0(n,this),this.documentElement===null&&n.nodeType===vn)this.documentElement=n;return n},removeChild:function(n){if(this.documentElement==n)this.documentElement=null;return YY(this,n)},replaceChild:function(n,U){if(d9(this,n,U,BY),j0(n,this),U)this.removeChild(U);if(V2(n))this.documentElement=n},importNode:function(n,U){return BR(this,n,U)},getElementById:function(n){var U=null;return u9(this.documentElement,function(D){if(D.nodeType==vn){if(D.getAttribute("id")==n)return U=D,!0}}),U},getElementsByClassName:function(n){var U=UY(n);return new hc(this,function(D){var c=[];if(U.length>0)u9(D.documentElement,function(g){if(g!==D&&g.nodeType===vn){var f=g.getAttribute("class");if(f){var h=n===f;if(!h){var W=UY(f);h=U.every(TR(W))}if(h)c.push(g)}}});return c})},createElement:function(n){var U=new sU;U.ownerDocument=this,U.nodeName=n,U.tagName=n,U.localName=n,U.childNodes=new v2;var D=U.attributes=new R9;return D._ownerElement=U,U},createDocumentFragment:function(){var n=new m9;return n.ownerDocument=this,n.childNodes=new v2,n},createTextNode:function(n){var U=new A4;return U.ownerDocument=this,U.appendData(n),U},createComment:function(n){var U=new H4;return U.ownerDocument=this,U.appendData(n),U},createCDATASection:function(n){if(n.indexOf("]]>")!==-1)throw new V1(iR,'data contains "]]>"');var U=new L4;return U.ownerDocument=this,U.appendData(n),U},createProcessingInstruction:function(n,U){var D=new E4;return D.ownerDocument=this,D.tagName=D.nodeName=D.target=n,D.nodeValue=D.data=U,D},createAttribute:function(n){var U=new k9;return U.ownerDocument=this,U.name=n,U.nodeName=n,U.localName=n,U.specified=!0,U},createEntityReference:function(n){var U=new C4;return U.ownerDocument=this,U.nodeName=n,U},createElementNS:function(n,U){var D=new sU,c=U.split(":"),g=D.attributes=new R9;if(D.childNodes=new v2,D.ownerDocument=this,D.nodeName=U,D.tagName=U,D.namespaceURI=n,c.length==2)D.prefix=c[0],D.localName=c[1];else D.localName=U;return g._ownerElement=D,D},createAttributeNS:function(n,U){var D=new k9,c=U.split(":");if(D.ownerDocument=this,D.nodeName=U,D.name=U,D.namespaceURI=n,D.specified=!0,c.length==2)D.prefix=c[0],D.localName=c[1];else D.localName=U;return D}};bn(_0,$1);function sU(){this._nsMap={}}sU.prototype={nodeType:vn,hasAttribute:function(n){return this.getAttributeNode(n)!=null},getAttribute:function(n){var U=this.getAttributeNode(n);return U&&U.value||""},getAttributeNode:function(n){return this.attributes.getNamedItem(n)},setAttribute:function(n,U){var D=this.ownerDocument.createAttribute(n);D.value=D.nodeValue=""+U,this.setAttributeNode(D)},removeAttribute:function(n){var U=this.getAttributeNode(n);U&&this.removeAttributeNode(U)},appendChild:function(n){if(n.nodeType===S2)return this.insertBefore(n,null);else return YR(this,n)},setAttributeNode:function(n){return this.attributes.setNamedItem(n)},setAttributeNodeNS:function(n){return this.attributes.setNamedItemNS(n)},removeAttributeNode:function(n){return this.attributes.removeNamedItem(n.nodeName)},removeAttributeNS:function(n,U){var D=this.getAttributeNodeNS(n,U);D&&this.removeAttributeNode(D)},hasAttributeNS:function(n,U){return this.getAttributeNodeNS(n,U)!=null},getAttributeNS:function(n,U){var D=this.getAttributeNodeNS(n,U);return D&&D.value||""},setAttributeNS:function(n,U,D){var c=this.ownerDocument.createAttributeNS(n,U);c.value=c.nodeValue=""+D,this.setAttributeNode(c)},getAttributeNodeNS:function(n,U){return this.attributes.getNamedItemNS(n,U)},getElementsByTagName:function(n){return new hc(this,function(U){var D=[];return u9(U,function(c){if(c!==U&&c.nodeType==vn&&(n==="*"||c.tagName==n))D.push(c)}),D})},getElementsByTagNameNS:function(n,U){return new hc(this,function(D){var c=[];return u9(D,function(g){if(g!==D&&g.nodeType===vn&&(n==="*"||g.namespaceURI===n)&&(U==="*"||g.localName==U))c.push(g)}),c})}};_0.prototype.getElementsByTagName=sU.prototype.getElementsByTagName;_0.prototype.getElementsByTagNameNS=sU.prototype.getElementsByTagNameNS;bn(sU,$1);function k9(){}k9.prototype.nodeType=fc;bn(k9,$1);function S0(){}S0.prototype={data:"",substringData:function(n,U){return this.data.substring(n,n+U)},appendData:function(n){n=this.data+n,this.nodeValue=this.data=n,this.length=n.length},insertData:function(n,U){this.replaceData(n,0,U)},appendChild:function(n){throw Error(p1[Zn])},deleteData:function(n,U){this.replaceData(n,U,"")},replaceData:function(n,U,D){var c=this.data.substring(0,n),g=this.data.substring(n+U);D=c+D+g,this.nodeValue=this.data=D,this.length=D.length}};bn(S0,$1);function A4(){}A4.prototype={nodeName:"#text",nodeType:P9,splitText:function(n){var U=this.data,D=U.substring(n);U=U.substring(0,n),this.data=this.nodeValue=U,this.length=U.length;var c=this.ownerDocument.createTextNode(D);if(this.parentNode)this.parentNode.insertBefore(c,this.nextSibling);return c}};bn(A4,S0);function H4(){}H4.prototype={nodeName:"#comment",nodeType:z4};bn(H4,S0);function L4(){}L4.prototype={nodeName:"#cdata-section",nodeType:TY};bn(L4,S0);function p9(){}p9.prototype.nodeType=iY;bn(p9,$1);function GY(){}GY.prototype.nodeType=FR;bn(GY,$1);function KY(){}KY.prototype.nodeType=yR;bn(KY,$1);function C4(){}C4.prototype.nodeType=yY;bn(C4,$1);function m9(){}m9.prototype.nodeName="#document-fragment";m9.prototype.nodeType=S2;bn(m9,$1);function E4(){}E4.prototype.nodeType=b4;bn(E4,$1);function ZY(){}ZY.prototype.serializeToString=function(n,U,D,c){return bY.call(n,U,D,c)};$1.prototype.toString=bY;function bY(n,U,D){var c=!!D&&!!D.requireWellFormed,g=[],f=this.nodeType==9&&this.documentElement||this,h=f.prefix,W=f.namespaceURI;if(W&&h==null){var h=f.lookupPrefix(W);if(h==null)var T=[{namespace:W,prefix:null}]}return w4(this,g,n,U,T,c),g.join("")}function WY(n,U,D){var c=n.prefix||"",g=n.namespaceURI;if(!g)return!1;if(c==="xml"&&g===w0.XML||g===w0.XMLNS)return!1;var f=D.length;while(f--){var h=D[f];if(h.prefix===c)return h.namespace!==g}return!0}function N9(n,U,D){n.push(" ",U,'="',D.replace(/[<>&"\t\n\r]/g,VY),'"')}function w4(n,U,D,c,g,f){if(!g)g=[];k1(n,{ns:g,isHTML:D},{enter:function(h,W){var{ns:T,isHTML:x}=W;if(c)if(h=c(h),h){if(typeof h=="string")return U.push(h),null}else return null;switch(h.nodeType){case vn:var y=h.attributes,F=y.length,i=h.tagName;x=w0.isHTML(h.namespaceURI)||x;var X=i;if(!x&&!h.prefix&&h.namespaceURI){var $;for(var Q=0;Q<y.length;Q++)if(y.item(Q).name==="xmlns"){$=y.item(Q).value;break}if(!$)for(var Y=T.length-1;Y>=0;Y--){var V=T[Y];if(V.prefix===""&&V.namespace===h.namespaceURI){$=V.namespace;break}}if($!==h.namespaceURI)for(var Y=T.length-1;Y>=0;Y--){var V=T[Y];if(V.namespace===h.namespaceURI){if(V.prefix)X=V.prefix+":"+i;break}}}U.push("<",X);var G=T.slice();for(var J=0;J<F;J++){var B=y.item(J);if(B.prefix=="xmlns")G.push({prefix:B.localName,namespace:B.value});else if(B.nodeName=="xmlns")G.push({prefix:"",namespace:B.value})}for(var J=0;J<F;J++){var B=y.item(J);if(WY(B,x,G)){var z=B.prefix||"",q=B.namespaceURI;N9(U,z?"xmlns:"+z:"xmlns",q),G.push({prefix:z,namespace:q})}var Z=c?c(B):B;if(Z)if(typeof Z==="string")U.push(Z);else N9(U,Z.name,Z.value)}if(i===X&&WY(h,x,G)){var M=h.prefix||"",q=h.namespaceURI;N9(U,M?"xmlns:"+M:"xmlns",q),G.push({prefix:M,namespace:q})}var O=h.firstChild;if(O||x&&!/^(?:meta|link|img|br|hr|input)$/i.test(i)){if(U.push(">"),x&&/^script$/i.test(i)){while(O){if(O.data)U.push(O.data);else w4(O,U,x,c,G.slice(),f);O=O.nextSibling}return U.push("</",i,">"),null}return{ns:G,isHTML:x,tag:X}}else return U.push("/>"),null;case FY:case S2:return{ns:T.slice(),isHTML:x,tag:null};case fc:return N9(U,h.name,h.value),null;case P9:return U.push(h.data.replace(/[<&>]/g,VY)),null;case TY:if(f&&h.data.indexOf("]]>")!==-1)throw new V1(gc,'The CDATASection data contains "]]>"');return U.push("<![CDATA[",h.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>"),null;case z4:if(f&&h.data.indexOf("-->")!==-1)throw new V1(gc,'The comment node data contains "-->"');return U.push("<!--",h.data,"-->"),null;case iY:if(f){if(h.publicId&&!/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(h.publicId))throw new V1(gc,"DocumentType publicId is not a valid PubidLiteral");if(h.systemId&&!/^("[^"]*"|'[^']*')$/.test(h.systemId))throw new V1(gc,"DocumentType systemId is not a valid SystemLiteral");if(h.internalSubset&&h.internalSubset.indexOf("]>")!==-1)throw new V1(gc,'DocumentType internalSubset contains "]>"')}var{publicId:_,systemId:w}=h;if(U.push("<!DOCTYPE ",h.name),_){if(U.push(" PUBLIC ",_),w&&w!=".")U.push(" ",w);U.push(">")}else if(w&&w!=".")U.push(" SYSTEM ",w,">");else{var H=h.internalSubset;if(H)U.push(" [",H,"]");U.push(">")}return null;case b4:if(f&&h.data.indexOf("?>")!==-1)throw new V1(gc,'The ProcessingInstruction data contains "?>"');return U.push("<?",h.target," ",h.data,"?>"),null;case yY:return U.push("&",h.nodeName,";"),null;default:return U.push("??",h.nodeName),null}},exit:function(h,W){if(W&&W.tag)U.push("</",W.tag,">")}})}function BR(n,U,D){var c;return k1(U,null,{enter:function(g,f){var h=g.cloneNode(!1);if(h.ownerDocument=n,h.parentNode=null,f===null)c=h;else f.appendChild(h);var W=g.nodeType===fc||D;return W?h:null}}),c}function zY(n,U,D){var c;return k1(U,null,{enter:function(g,f){var h=new g.constructor;for(var W in g)if(Object.prototype.hasOwnProperty.call(g,W)){var T=g[W];if(typeof T!="object"){if(T!=h[W])h[W]=T}}if(g.childNodes)h.childNodes=new v2;h.ownerDocument=n;var x=D;switch(h.nodeType){case vn:var y=g.attributes,F=h.attributes=new R9,i=y.length;F._ownerElement=h;for(var X=0;X<i;X++)h.setAttributeNode(zY(n,y.item(X),!0));break;case fc:x=!0}if(f!==null)f.appendChild(h);else c=h;return x?h:null}}),c}function OY(n,U,D){n[U]=D}try{if(Object.defineProperty)Object.defineProperty(hc.prototype,"length",{get:function(){return O4(this),this.$$length}}),Object.defineProperty($1.prototype,"textContent",{get:function(){if(this.nodeType===vn||this.nodeType===S2){var n=[];return k1(this,null,{enter:function(U){if(U.nodeType===vn||U.nodeType===S2)return!0;if(U.nodeType===b4||U.nodeType===z4)return null;n.push(U.nodeValue)}}),n.join("")}return this.nodeValue},set:function(n){switch(this.nodeType){case vn:case S2:while(this.firstChild)this.removeChild(this.firstChild);if(n||String(n))this.appendChild(this.ownerDocument.createTextNode(n));break;default:this.data=n,this.value=n,this.nodeValue=n}}}),OY=function(n,U,D){n["$$"+U]=D}}catch(n){}GR.DocumentType=p9;GR.DOMException=V1;GR.DOMImplementation=$Y;GR.Element=sU;GR.Node=$1;GR.NodeList=v2;GR.walkDOM=k1;GR.XMLSerializer=ZY});var AY=L((HR)=>{var qY=E0().freeze;HR.XML_ENTITIES=qY({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});HR.HTML_ENTITIES=qY({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"\uD835\uDD04",afr:"\uD835\uDD1E",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"\uD835\uDD38",aopf:"\uD835\uDD52",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"\uD835\uDC9C",ascr:"\uD835\uDCB6",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"\uD835\uDD05",bfr:"\uD835\uDD1F",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"\uD835\uDD39",bopf:"\uD835\uDD53",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"\uD835\uDCB7",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"\uD835\uDD20",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"\uD835\uDD54",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"\uD835\uDC9E",cscr:"\uD835\uDCB8",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"\uD835\uDD07",dfr:"\uD835\uDD21",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"\uD835\uDD3B",dopf:"\uD835\uDD55",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"\uD835\uDC9F",dscr:"\uD835\uDCB9",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"\uD835\uDD08",efr:"\uD835\uDD22",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"\uD835\uDD3C",eopf:"\uD835\uDD56",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"\uD835\uDD09",ffr:"\uD835\uDD23",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"\uD835\uDD3D",fopf:"\uD835\uDD57",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"\uD835\uDCBB",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"\uD835\uDD0A",gfr:"\uD835\uDD24",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"\uD835\uDD3E",gopf:"\uD835\uDD58",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"\uD835\uDCA2",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"\uD835\uDD25",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"\uD835\uDD59",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"\uD835\uDCBD",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"\uD835\uDD26",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"\uD835\uDD40",iopf:"\uD835\uDD5A",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"\uD835\uDCBE",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"\uD835\uDD0D",jfr:"\uD835\uDD27",jmath:"ȷ",Jopf:"\uD835\uDD41",jopf:"\uD835\uDD5B",Jscr:"\uD835\uDCA5",jscr:"\uD835\uDCBF",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"\uD835\uDD0E",kfr:"\uD835\uDD28",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"\uD835\uDD42",kopf:"\uD835\uDD5C",Kscr:"\uD835\uDCA6",kscr:"\uD835\uDCC0",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"\uD835\uDD0F",lfr:"\uD835\uDD29",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"\uD835\uDD43",lopf:"\uD835\uDD5D",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"\uD835\uDCC1",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"\uD835\uDD10",mfr:"\uD835\uDD2A",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"\uD835\uDD44",mopf:"\uD835\uDD5E",mp:"∓",Mscr:"ℳ",mscr:"\uD835\uDCC2",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
195
|
+
`,nexist:"∄",nexists:"∄",Nfr:"\uD835\uDD11",nfr:"\uD835\uDD2B",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"\uD835\uDD5F",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"\uD835\uDCA9",nscr:"\uD835\uDCC3",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"\uD835\uDD12",ofr:"\uD835\uDD2C",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"\uD835\uDD46",oopf:"\uD835\uDD60",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"\uD835\uDCAA",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"\uD835\uDD13",pfr:"\uD835\uDD2D",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"\uD835\uDD61",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"\uD835\uDCAB",pscr:"\uD835\uDCC5",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"\uD835\uDD14",qfr:"\uD835\uDD2E",qint:"⨌",Qopf:"ℚ",qopf:"\uD835\uDD62",qprime:"⁗",Qscr:"\uD835\uDCAC",qscr:"\uD835\uDCC6",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"\uD835\uDD2F",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"\uD835\uDD63",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"\uD835\uDCC7",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"\uD835\uDD16",sfr:"\uD835\uDD30",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"\uD835\uDD4A",sopf:"\uD835\uDD64",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"\uD835\uDCAE",sscr:"\uD835\uDCC8",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"\uD835\uDD17",tfr:"\uD835\uDD31",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"\uD835\uDD4B",topf:"\uD835\uDD65",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"\uD835\uDCAF",tscr:"\uD835\uDCC9",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"\uD835\uDD18",ufr:"\uD835\uDD32",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"\uD835\uDD4C",uopf:"\uD835\uDD66",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"\uD835\uDCB0",uscr:"\uD835\uDCCA",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"\uD835\uDD19",vfr:"\uD835\uDD33",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"\uD835\uDD4D",vopf:"\uD835\uDD67",vprop:"∝",vrtri:"⊳",Vscr:"\uD835\uDCB1",vscr:"\uD835\uDCCB",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"\uD835\uDD1A",wfr:"\uD835\uDD34",Wopf:"\uD835\uDD4E",wopf:"\uD835\uDD68",wp:"℘",wr:"≀",wreath:"≀",Wscr:"\uD835\uDCB2",wscr:"\uD835\uDCCC",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"\uD835\uDD1B",xfr:"\uD835\uDD35",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"\uD835\uDD4F",xopf:"\uD835\uDD69",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"\uD835\uDCB3",xscr:"\uD835\uDCCD",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"\uD835\uDD1C",yfr:"\uD835\uDD36",YIcy:"Ї",yicy:"ї",Yopf:"\uD835\uDD50",yopf:"\uD835\uDD6A",Yscr:"\uD835\uDCB4",yscr:"\uD835\uDCCE",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"\uD835\uDD37",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"\uD835\uDD6B",Zscr:"\uD835\uDCB5",zscr:"\uD835\uDCCF",zwj:"",zwnj:""});HR.entityMap=HR.HTML_ENTITIES});var _Y=L((NR)=>{var R0=E0().NAMESPACE,j4=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,HY=new RegExp("[\\-\\.0-9"+j4.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),LY=new RegExp("^"+j4.source+HY.source+"*(?::"+j4.source+HY.source+"*)?$"),v0=0,VU=1,Wc=2,N0=3,xc=4,Tc=5,P0=6,o9=7;function yc(n,U){if(this.message=n,this.locator=U,Error.captureStackTrace)Error.captureStackTrace(this,yc)}yc.prototype=Error();yc.prototype.name=yc.name;function wY(){}wY.prototype={parse:function(n,U,D){var c=this.domBuilder;c.startDocument(),jY(U,U={}),ER(n,U,D,c,this.errorHandler),c.endDocument()}};function ER(n,U,D,c,g){function f(b){if(b>65535){b-=65536;var C=55296+(b>>10),A=56320+(b&1023);return String.fromCharCode(C,A)}else return String.fromCharCode(b)}function h(b){var C=b.slice(1,-1);if(Object.hasOwnProperty.call(D,C))return D[C];else if(C.charAt(0)==="#")return f(parseInt(C.substr(1).replace("x","0x")));else return g.error("entity not found:"+b),b}function W(b){if(b>Q){var C=n.substring(Q,b).replace(/&#?\w+;/g,h);i&&T(Q),c.characters(C,0,b-Q),Q=b}}function T(b,C){while(b>=y&&(C=F.exec(n)))x=C.index,y=x+C[0].length,i.lineNumber++;i.columnNumber=b-x+1}var x=0,y=0,F=/.*(?:\r\n?|\n)|.*$/g,i=c.locator,X=[{currentNSMap:U}],$={},Q=0;while(!0){try{var Y=n.indexOf("<",Q);if(Y<0){if(!n.substr(Q).match(/^\s*$/)){var V=c.doc,G=V.createTextNode(n.substr(Q));V.appendChild(G),c.currentElement=G}return}if(Y>Q)W(Y);switch(n.charAt(Y+1)){case"/":var w=n.indexOf(">",Y+3),J=n.substring(Y+2,w).replace(/[ \t\n\r]+$/g,""),B=X.pop();if(w<0)J=n.substring(Y+2).replace(/[\s<].*/,""),g.error("end tag name: "+J+" is not complete:"+B.tagName),w=Y+1+J.length;else if(J.match(/\s</))J=J.replace(/[\s<].*/,""),g.error("end tag name: "+J+" maybe not complete"),w=Y+1+J.length;var z=B.localNSMap,q=B.tagName==J,Z=q||B.tagName&&B.tagName.toLowerCase()==J.toLowerCase();if(Z){if(c.endElement(B.uri,B.localName,J),z){for(var M in z)if(Object.prototype.hasOwnProperty.call(z,M))c.endPrefixMapping(M)}if(!q)g.fatalError("end tag name: "+J+" is not match the current start tagName:"+B.tagName)}else X.push(B);w++;break;case"?":i&&T(Y),w=SR(n,Y,c);break;case"!":i&&T(Y),w=_R(n,Y,c,g);break;default:i&&T(Y);var O=new IY,_=X[X.length-1].currentNSMap,w=wR(n,Y,O,_,h,g),H=O.length;if(!O.closed&&IR(n,w,O.tagName,$)){if(O.closed=!0,!D.nbsp)g.warning("unclosed xml attribute")}if(i&&H){var v=CY(i,{});for(var P=0;P<H;P++){var p=O[P];T(p.offset),p.locator=CY(i,{})}if(c.locator=v,EY(O,c,_))X.push(O);c.locator=i}else if(EY(O,c,_))X.push(O);if(R0.isHTML(O.uri)&&!O.closed)w=jR(n,w,O.tagName,h,c);else w++}}catch(b){if(b instanceof yc)throw b;g.error("element parse error: "+b),w=-1}if(w>Q)Q=w;else W(Math.max(Y,Q)+1)}}function CY(n,U){return U.lineNumber=n.lineNumber,U.columnNumber=n.columnNumber,U}function wR(n,U,D,c,g,f){function h(X,$,Q){if(D.attributeNames.hasOwnProperty(X))f.fatalError("Attribute "+X+" redefined");D.addValue(X,$.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,g),Q)}var W,T,x=++U,y=v0;while(!0){var F=n.charAt(x);switch(F){case"=":if(y===VU)W=n.slice(U,x),y=N0;else if(y===Wc)y=N0;else throw Error("attribute equal must after attrName");break;case"'":case'"':if(y===N0||y===VU){if(y===VU)f.warning('attribute value must after "="'),W=n.slice(U,x);if(U=x+1,x=n.indexOf(F,U),x>0)T=n.slice(U,x),h(W,T,U-1),y=Tc;else throw Error("attribute value no end '"+F+"' match")}else if(y==xc)T=n.slice(U,x),h(W,T,U),f.warning('attribute "'+W+'" missed start quot('+F+")!!"),U=x+1,y=Tc;else throw Error('attribute value must after "="');break;case"/":switch(y){case v0:D.setTagName(n.slice(U,x));case Tc:case P0:case o9:y=o9,D.closed=!0;case xc:case VU:break;case Wc:D.closed=!0;break;default:throw Error("attribute invalid close char('/')")}break;case"":if(f.error("unexpected end of input"),y==v0)D.setTagName(n.slice(U,x));return x;case">":switch(y){case v0:D.setTagName(n.slice(U,x));case Tc:case P0:case o9:break;case xc:case VU:if(T=n.slice(U,x),T.slice(-1)==="/")D.closed=!0,T=T.slice(0,-1);case Wc:if(y===Wc)T=W;if(y==xc)f.warning('attribute "'+T+'" missed quot(")!'),h(W,T,U);else{if(!R0.isHTML(c[""])||!T.match(/^(?:disabled|checked|selected)$/i))f.warning('attribute "'+T+'" missed value!! "'+T+'" instead!!');h(T,T,U)}break;case N0:throw Error("attribute value missed!!")}return x;case"":F=" ";default:if(F<=" ")switch(y){case v0:D.setTagName(n.slice(U,x)),y=P0;break;case VU:W=n.slice(U,x),y=Wc;break;case xc:var T=n.slice(U,x);f.warning('attribute "'+T+'" missed quot(")!!'),h(W,T,U);case Tc:y=P0;break}else switch(y){case Wc:var i=D.tagName;if(!R0.isHTML(c[""])||!W.match(/^(?:disabled|checked|selected)$/i))f.warning('attribute "'+W+'" missed value!! "'+W+'" instead2!!');h(W,W,U),U=x,y=VU;break;case Tc:f.warning('attribute space is required"'+W+'"!!');case P0:y=VU,U=x;break;case N0:y=xc,U=x;break;case o9:throw Error("elements closed character '/' and '>' must be connected to")}}x++}}function EY(n,U,D){var c=n.tagName,g=null,F=n.length;while(F--){var f=n[F],h=f.qName,W=f.value,i=h.indexOf(":");if(i>0)var T=f.prefix=h.slice(0,i),x=h.slice(i+1),y=T==="xmlns"&&x;else x=h,T=null,y=h==="xmlns"&&"";if(f.localName=x,y!==!1){if(g==null)g={},jY(D,D={});D[y]=g[y]=W,f.uri=R0.XMLNS,U.startPrefixMapping(y,W)}}var F=n.length;while(F--){f=n[F];var T=f.prefix;if(T){if(T==="xml")f.uri=R0.XML;if(T!=="xmlns")f.uri=D[T||""]}}var i=c.indexOf(":");if(i>0)T=n.prefix=c.slice(0,i),x=n.localName=c.slice(i+1);else T=null,x=n.localName=c;var X=n.uri=D[T||""];if(U.startElement(X,x,c,n),n.closed){if(U.endElement(X,x,c),g){for(T in g)if(Object.prototype.hasOwnProperty.call(g,T))U.endPrefixMapping(T)}}else return n.currentNSMap=D,n.localNSMap=g,!0}function jR(n,U,D,c,g){if(/^(?:script|textarea)$/i.test(D)){var f=n.indexOf("</"+D+">",U),h=n.substring(U+1,f);if(/[&<]/.test(h)){if(/^script$/i.test(D))return g.characters(h,0,h.length),f;return h=h.replace(/&#?\w+;/g,c),g.characters(h,0,h.length),f}}return U+1}function IR(n,U,D,c){var g=c[D];if(g==null){if(g=n.lastIndexOf("</"+D+">"),g<U)g=n.lastIndexOf("</"+D);c[D]=g}return g<U}function jY(n,U){for(var D in n)if(Object.prototype.hasOwnProperty.call(n,D))U[D]=n[D]}function _R(n,U,D,c){var g=n.charAt(U+2);switch(g){case"-":if(n.charAt(U+3)==="-"){var f=n.indexOf("-->",U+4);if(f>U)return D.comment(n,U+4,f-U-4),f+3;else return c.error("Unclosed comment"),-1}else return-1;default:if(n.substr(U+3,6)=="CDATA["){var f=n.indexOf("]]>",U+9);return D.startCDATA(),D.characters(n,U+9,f-U-9),D.endCDATA(),f+3}var h=vR(n,U),W=h.length;if(W>1&&/!doctype/i.test(h[0][0])){var T=h[1][0],x=!1,y=!1;if(W>3){if(/^public$/i.test(h[2][0]))x=h[3][0],y=W>4&&h[4][0];else if(/^system$/i.test(h[2][0]))y=h[3][0]}var F=h[W-1];return D.startDTD(T,x,y),D.endDTD(),F.index+F[0].length}}return-1}function SR(n,U,D){var c=n.indexOf("?>",U);if(c){var g=n.substring(U,c).match(/^<\?(\S*)\s*([\s\S]*?)$/);if(g){var f=g[0].length;return D.processingInstruction(g[1],g[2]),c+2}else return-1}return-1}function IY(){this.attributeNames={}}IY.prototype={setTagName:function(n){if(!LY.test(n))throw Error("invalid tagName:"+n);this.tagName=n},addValue:function(n,U,D){if(!LY.test(n))throw Error("invalid attribute:"+n);this.attributeNames[n]=this.length,this[this.length++]={qName:n,value:U,offset:D}},length:0,getLocalName:function(n){return this[n].localName},getLocator:function(n){return this[n].locator},getQName:function(n){return this[n].qName},getURI:function(n){return this[n].uri},getValue:function(n){return this[n].value}};function vR(n,U){var D,c=[],g=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;g.lastIndex=U,g.exec(n);while(D=g.exec(n))if(c.push(D),D[1])return c}NR.XMLReader=wY;NR.ParseError=yc});var dY=L((oR)=>{var uR=E0(),dR=a9(),SY=AY(),PY=_Y(),kR=dR.DOMImplementation,vY=uR.NAMESPACE,pR=PY.ParseError,mR=PY.XMLReader;function RY(n){return n.replace(/\r[\n\u0085]/g,`
|
|
196
|
+
`).replace(/[\r\u0085\u2028]/g,`
|
|
197
|
+
`)}function uY(n){this.options=n||{locator:{}}}uY.prototype.parseFromString=function(n,U){var D=this.options,c=new mR,g=D.domBuilder||new u0,f=D.errorHandler,h=D.locator,W=D.xmlns||{},T=/\/x?html?$/.test(U),x=T?SY.HTML_ENTITIES:SY.XML_ENTITIES;if(h)g.setDocumentLocator(h);if(c.errorHandler=aR(f,g,h),c.domBuilder=D.domBuilder||g,T)W[""]=vY.HTML;W.xml=W.xml||vY.XML;var y=D.normalizeLineEndings||RY;if(n&&typeof n==="string")c.parse(y(n),W,x);else c.errorHandler.error("invalid doc source");return g.doc};function aR(n,U,D){if(!n){if(U instanceof u0)return U;n=U}var c={},g=n instanceof Function;D=D||{};function f(h){var W=n[h];if(!W&&g)W=n.length==2?function(T){n(h,T)}:n;c[h]=W&&function(T){W("[xmldom "+h+"]\t"+T+I4(D))}||function(){}}return f("warning"),f("error"),f("fatalError"),c}function u0(){this.cdata=!1}function Fc(n,U){U.lineNumber=n.lineNumber,U.columnNumber=n.columnNumber}u0.prototype={startDocument:function(){if(this.doc=new kR().createDocument(null,null,null),this.locator)this.doc.documentURI=this.locator.systemId},startElement:function(n,U,D,c){var g=this.doc,f=g.createElementNS(n,D||U),h=c.length;r9(this,f),this.currentElement=f,this.locator&&Fc(this.locator,f);for(var W=0;W<h;W++){var n=c.getURI(W),T=c.getValue(W),D=c.getQName(W),x=g.createAttributeNS(n,D);this.locator&&Fc(c.getLocator(W),x),x.value=x.nodeValue=T,f.setAttributeNode(x)}},endElement:function(n,U,D){var c=this.currentElement,g=c.tagName;this.currentElement=c.parentNode},startPrefixMapping:function(n,U){},endPrefixMapping:function(n){},processingInstruction:function(n,U){var D=this.doc.createProcessingInstruction(n,U);this.locator&&Fc(this.locator,D),r9(this,D)},ignorableWhitespace:function(n,U,D){},characters:function(n,U,D){if(n=NY.apply(this,arguments),n){if(this.cdata)var c=this.doc.createCDATASection(n);else var c=this.doc.createTextNode(n);if(this.currentElement)this.currentElement.appendChild(c);else if(/^\s*$/.test(n))this.doc.appendChild(c);this.locator&&Fc(this.locator,c)}},skippedEntity:function(n){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(n){if(this.locator=n)n.lineNumber=0},comment:function(n,U,D){n=NY.apply(this,arguments);var c=this.doc.createComment(n);this.locator&&Fc(this.locator,c),r9(this,c)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(n,U,D){var c=this.doc.implementation;if(c&&c.createDocumentType){var g=c.createDocumentType(n,U,D);this.locator&&Fc(this.locator,g),r9(this,g),this.doc.doctype=g}},warning:function(n){console.warn("[xmldom warning]\t"+n,I4(this.locator))},error:function(n){console.error("[xmldom error]\t"+n,I4(this.locator))},fatalError:function(n){throw new pR(n,this.locator)}};function I4(n){if(n)return`
|
|
198
|
+
@`+(n.systemId||"")+"#[line:"+n.lineNumber+",col:"+n.columnNumber+"]"}function NY(n,U,D){if(typeof n=="string")return n.substr(U,D);else{if(n.length>=U+D||U)return new java.lang.String(n,U,D)+"";return n}}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(n){u0.prototype[n]=function(){return null}});function r9(n,U){if(!n.currentElement)n.doc.appendChild(U);else n.currentElement.appendChild(U)}oR.__DOMHandler=u0;oR.normalizeLineEndings=RY;oR.DOMParser=uY});var pY=L((eR)=>{var kY=a9();eR.DOMImplementation=kY.DOMImplementation;eR.XMLSerializer=kY.XMLSerializer;eR.DOMParser=dY().DOMParser});var mY=L((fu)=>{var Du=pY(),cu=a9();function gu(n){var U=null,D=new Du.DOMParser({errorHandler:function(g,f){U={level:g,message:f}}}),c=D.parseFromString(n);if(U===null)return c;else throw Error(U.level+": "+U.message)}fu.parseFromString=gu;fu.Node=cu.Node});var tY=L((yu)=>{var _4=M2(),aY=w1(),rY=mY(),lY=K4(),xu=lY.Element;yu.readString=Tu;var oY=rY.Node;function Tu(n,U){U=U||{};try{var D=rY.parseFromString(n,"text/xml")}catch(h){return _4.reject(h)}if(D.documentElement.tagName==="parsererror")return _4.resolve(Error(D.documentElement.textContent));function c(h){switch(h.nodeType){case oY.ELEMENT_NODE:return g(h);case oY.TEXT_NODE:return lY.text(h.nodeValue)}}function g(h){var W=f(h),T=[];aY.forEach(h.childNodes,function(y){var F=c(y);if(F)T.push(F)});var x={};return aY.forEach(h.attributes,function(y){x[f(y)]=y.value}),new xu(W,x,T)}function f(h){if(h.namespaceURI){var W=U[h.namespaceURI],T;if(W)T=W+":";else T="{"+h.namespaceURI+"}";return T+h.localName}else return h.localName}return _4.resolve(c(D.documentElement))}});var P2=L((eY,QU)=>{(function(){var n,U,D,c,g,f,h,W=[].slice,T={}.hasOwnProperty;n=function(){var x,y,F,i,X,$;if($=arguments[0],X=2<=arguments.length?W.call(arguments,1):[],g(Object.assign))Object.assign.apply(null,arguments);else for(x=0,F=X.length;x<F;x++)if(i=X[x],i!=null)for(y in i){if(!T.call(i,y))continue;$[y]=i[y]}return $},g=function(x){return!!x&&Object.prototype.toString.call(x)==="[object Function]"},f=function(x){var y;return!!x&&((y=typeof x)==="function"||y==="object")},D=function(x){if(g(Array.isArray))return Array.isArray(x);else return Object.prototype.toString.call(x)==="[object Array]"},c=function(x){var y;if(D(x))return!x.length;else{for(y in x){if(!T.call(x,y))continue;return!1}return!0}},h=function(x){var y,F;return f(x)&&(F=Object.getPrototypeOf(x))&&(y=F.constructor)&&typeof y==="function"&&y instanceof y&&Function.prototype.toString.call(y)===Function.prototype.toString.call(Object)},U=function(x){if(g(x.valueOf))return x.valueOf();else return x},eY.assign=n,eY.isFunction=g,eY.isObject=f,eY.isArray=D,eY.isEmpty=c,eY.isPlainObject=h,eY.getValue=U}).call(eY)});var S4=L((sY,nB)=>{(function(){var n;nB.exports=n=function(){function U(D,c,g){if(this.options=D.options,this.stringify=D.stringify,this.parent=D,c==null)throw Error("Missing attribute name. "+this.debugInfo(c));if(g==null)throw Error("Missing attribute value. "+this.debugInfo(c));this.name=this.stringify.attName(c),this.value=this.stringify.attValue(g)}return U.prototype.clone=function(){return Object.create(this)},U.prototype.toString=function(D){return this.options.writer.set(D).attribute(this)},U.prototype.debugInfo=function(D){if(D=D||this.name,D==null)return"parent: <"+this.parent.name+">";else return"attribute: {"+D+"}, parent: <"+this.parent.name+">"},U}()}).call(sY)});var d0=L((UB,DB)=>{(function(){var n,U,D,c,g,f,h,W=function(x,y){for(var F in y)if(T.call(y,F))x[F]=y[F];function i(){this.constructor=x}return i.prototype=y.prototype,x.prototype=new i,x.__super__=y.prototype,x},T={}.hasOwnProperty;h=P2(),f=h.isObject,g=h.isFunction,c=h.getValue,D=Jn(),n=S4(),DB.exports=U=function(x){W(y,x);function y(F,i,X){if(y.__super__.constructor.call(this,F),i==null)throw Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.eleName(i),this.attributes={},X!=null)this.attribute(X);if(F.isDocument)this.isRoot=!0,this.documentObject=F,F.rootObject=this}return y.prototype.clone=function(){var F,i,X,$;if(X=Object.create(this),X.isRoot)X.documentObject=null;X.attributes={},$=this.attributes;for(i in $){if(!T.call($,i))continue;F=$[i],X.attributes[i]=F.clone()}return X.children=[],this.children.forEach(function(Q){var Y=Q.clone();return Y.parent=X,X.children.push(Y)}),X},y.prototype.attribute=function(F,i){var X,$;if(F!=null)F=c(F);if(f(F))for(X in F){if(!T.call(F,X))continue;$=F[X],this.attribute(X,$)}else{if(g(i))i=i.apply();if(!this.options.skipNullAttributes||i!=null)this.attributes[F]=new n(this,F,i)}return this},y.prototype.removeAttribute=function(F){var i,X,$;if(F==null)throw Error("Missing attribute name. "+this.debugInfo());if(F=c(F),Array.isArray(F))for(X=0,$=F.length;X<$;X++)i=F[X],delete this.attributes[i];else delete this.attributes[F];return this},y.prototype.toString=function(F){return this.options.writer.set(F).element(this)},y.prototype.att=function(F,i){return this.attribute(F,i)},y.prototype.a=function(F,i){return this.attribute(F,i)},y}(D)}).call(UB)});var k0=L((cB,gB)=>{(function(){var n,U,D=function(g,f){for(var h in f)if(c.call(f,h))g[h]=f[h];function W(){this.constructor=g}return W.prototype=f.prototype,g.prototype=new W,g.__super__=f.prototype,g},c={}.hasOwnProperty;U=Jn(),gB.exports=n=function(g){D(f,g);function f(h,W){if(f.__super__.constructor.call(this,h),W==null)throw Error("Missing CDATA text. "+this.debugInfo());this.text=this.stringify.cdata(W)}return f.prototype.clone=function(){return Object.create(this)},f.prototype.toString=function(h){return this.options.writer.set(h).cdata(this)},f}(U)}).call(cB)});var p0=L((fB,hB)=>{(function(){var n,U,D=function(g,f){for(var h in f)if(c.call(f,h))g[h]=f[h];function W(){this.constructor=g}return W.prototype=f.prototype,g.prototype=new W,g.__super__=f.prototype,g},c={}.hasOwnProperty;U=Jn(),hB.exports=n=function(g){D(f,g);function f(h,W){if(f.__super__.constructor.call(this,h),W==null)throw Error("Missing comment text. "+this.debugInfo());this.text=this.stringify.comment(W)}return f.prototype.clone=function(){return Object.create(this)},f.prototype.toString=function(h){return this.options.writer.set(h).comment(this)},f}(U)}).call(fB)});var m0=L((WB,xB)=>{(function(){var n,U,D,c=function(f,h){for(var W in h)if(g.call(h,W))f[W]=h[W];function T(){this.constructor=f}return T.prototype=h.prototype,f.prototype=new T,f.__super__=h.prototype,f},g={}.hasOwnProperty;D=P2().isObject,U=Jn(),xB.exports=n=function(f){c(h,f);function h(W,T,x,y){var F;if(h.__super__.constructor.call(this,W),D(T))F=T,T=F.version,x=F.encoding,y=F.standalone;if(!T)T="1.0";if(this.version=this.stringify.xmlVersion(T),x!=null)this.encoding=this.stringify.xmlEncoding(x);if(y!=null)this.standalone=this.stringify.xmlStandalone(y)}return h.prototype.toString=function(W){return this.options.writer.set(W).declaration(this)},h}(U)}).call(WB)});var a0=L((TB,yB)=>{(function(){var n,U,D=function(g,f){for(var h in f)if(c.call(f,h))g[h]=f[h];function W(){this.constructor=g}return W.prototype=f.prototype,g.prototype=new W,g.__super__=f.prototype,g},c={}.hasOwnProperty;U=Jn(),yB.exports=n=function(g){D(f,g);function f(h,W,T,x,y,F){if(f.__super__.constructor.call(this,h),W==null)throw Error("Missing DTD element name. "+this.debugInfo());if(T==null)throw Error("Missing DTD attribute name. "+this.debugInfo(W));if(!x)throw Error("Missing DTD attribute type. "+this.debugInfo(W));if(!y)throw Error("Missing DTD attribute default. "+this.debugInfo(W));if(y.indexOf("#")!==0)y="#"+y;if(!y.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(W));if(F&&!y.match(/^(#FIXED|#DEFAULT)$/))throw Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(W));this.elementName=this.stringify.eleName(W),this.attributeName=this.stringify.attName(T),this.attributeType=this.stringify.dtdAttType(x),this.defaultValue=this.stringify.dtdAttDefault(F),this.defaultValueType=y}return f.prototype.toString=function(h){return this.options.writer.set(h).dtdAttList(this)},f}(U)}).call(TB)});var o0=L((FB,iB)=>{(function(){var n,U,D,c=function(f,h){for(var W in h)if(g.call(h,W))f[W]=h[W];function T(){this.constructor=f}return T.prototype=h.prototype,f.prototype=new T,f.__super__=h.prototype,f},g={}.hasOwnProperty;D=P2().isObject,U=Jn(),iB.exports=n=function(f){c(h,f);function h(W,T,x,y){if(h.__super__.constructor.call(this,W),x==null)throw Error("Missing DTD entity name. "+this.debugInfo(x));if(y==null)throw Error("Missing DTD entity value. "+this.debugInfo(x));if(this.pe=!!T,this.name=this.stringify.eleName(x),!D(y))this.value=this.stringify.dtdEntityValue(y);else{if(!y.pubID&&!y.sysID)throw Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(x));if(y.pubID&&!y.sysID)throw Error("System identifier is required for a public external entity. "+this.debugInfo(x));if(y.pubID!=null)this.pubID=this.stringify.dtdPubID(y.pubID);if(y.sysID!=null)this.sysID=this.stringify.dtdSysID(y.sysID);if(y.nData!=null)this.nData=this.stringify.dtdNData(y.nData);if(this.pe&&this.nData)throw Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(x))}}return h.prototype.toString=function(W){return this.options.writer.set(W).dtdEntity(this)},h}(U)}).call(FB)});var r0=L((XB,JB)=>{(function(){var n,U,D=function(g,f){for(var h in f)if(c.call(f,h))g[h]=f[h];function W(){this.constructor=g}return W.prototype=f.prototype,g.prototype=new W,g.__super__=f.prototype,g},c={}.hasOwnProperty;U=Jn(),JB.exports=n=function(g){D(f,g);function f(h,W,T){if(f.__super__.constructor.call(this,h),W==null)throw Error("Missing DTD element name. "+this.debugInfo());if(!T)T="(#PCDATA)";if(Array.isArray(T))T="("+T.join(",")+")";this.name=this.stringify.eleName(W),this.value=this.stringify.dtdElementValue(T)}return f.prototype.toString=function(h){return this.options.writer.set(h).dtdElement(this)},f}(U)}).call(XB)});var l0=L(($B,VB)=>{(function(){var n,U,D=function(g,f){for(var h in f)if(c.call(f,h))g[h]=f[h];function W(){this.constructor=g}return W.prototype=f.prototype,g.prototype=new W,g.__super__=f.prototype,g},c={}.hasOwnProperty;U=Jn(),VB.exports=n=function(g){D(f,g);function f(h,W,T){if(f.__super__.constructor.call(this,h),W==null)throw Error("Missing DTD notation name. "+this.debugInfo(W));if(!T.pubID&&!T.sysID)throw Error("Public or system identifiers are required for an external entity. "+this.debugInfo(W));if(this.name=this.stringify.eleName(W),T.pubID!=null)this.pubID=this.stringify.dtdPubID(T.pubID);if(T.sysID!=null)this.sysID=this.stringify.dtdSysID(T.sysID)}return f.prototype.toString=function(h){return this.options.writer.set(h).dtdNotation(this)},f}(U)}).call($B)});var t0=L((QB,YB)=>{(function(){var n,U,D,c,g,f,h,W=function(x,y){for(var F in y)if(T.call(y,F))x[F]=y[F];function i(){this.constructor=x}return i.prototype=y.prototype,x.prototype=new i,x.__super__=y.prototype,x},T={}.hasOwnProperty;h=P2().isObject,f=Jn(),n=a0(),D=o0(),U=r0(),c=l0(),YB.exports=g=function(x){W(y,x);function y(F,i,X){var $,Q;if(y.__super__.constructor.call(this,F),this.name="!DOCTYPE",this.documentObject=F,h(i))$=i,i=$.pubID,X=$.sysID;if(X==null)Q=[i,X],X=Q[0],i=Q[1];if(i!=null)this.pubID=this.stringify.dtdPubID(i);if(X!=null)this.sysID=this.stringify.dtdSysID(X)}return y.prototype.element=function(F,i){var X=new U(this,F,i);return this.children.push(X),this},y.prototype.attList=function(F,i,X,$,Q){var Y=new n(this,F,i,X,$,Q);return this.children.push(Y),this},y.prototype.entity=function(F,i){var X=new D(this,!1,F,i);return this.children.push(X),this},y.prototype.pEntity=function(F,i){var X=new D(this,!0,F,i);return this.children.push(X),this},y.prototype.notation=function(F,i){var X=new c(this,F,i);return this.children.push(X),this},y.prototype.toString=function(F){return this.options.writer.set(F).docType(this)},y.prototype.ele=function(F,i){return this.element(F,i)},y.prototype.att=function(F,i,X,$,Q){return this.attList(F,i,X,$,Q)},y.prototype.ent=function(F,i){return this.entity(F,i)},y.prototype.pent=function(F,i){return this.pEntity(F,i)},y.prototype.not=function(F,i){return this.notation(F,i)},y.prototype.up=function(){return this.root()||this.documentObject},y}(f)}).call(QB)});var e0=L((BB,GB)=>{(function(){var n,U,D=function(g,f){for(var h in f)if(c.call(f,h))g[h]=f[h];function W(){this.constructor=g}return W.prototype=f.prototype,g.prototype=new W,g.__super__=f.prototype,g},c={}.hasOwnProperty;n=Jn(),GB.exports=U=function(g){D(f,g);function f(h,W){if(f.__super__.constructor.call(this,h),W==null)throw Error("Missing raw text. "+this.debugInfo());this.value=this.stringify.raw(W)}return f.prototype.clone=function(){return Object.create(this)},f.prototype.toString=function(h){return this.options.writer.set(h).raw(this)},f}(n)}).call(BB)});var s0=L((KB,ZB)=>{(function(){var n,U,D=function(g,f){for(var h in f)if(c.call(f,h))g[h]=f[h];function W(){this.constructor=g}return W.prototype=f.prototype,g.prototype=new W,g.__super__=f.prototype,g},c={}.hasOwnProperty;n=Jn(),ZB.exports=U=function(g){D(f,g);function f(h,W){if(f.__super__.constructor.call(this,h),W==null)throw Error("Missing element text. "+this.debugInfo());this.value=this.stringify.eleText(W)}return f.prototype.clone=function(){return Object.create(this)},f.prototype.toString=function(h){return this.options.writer.set(h).text(this)},f}(n)}).call(KB)});var ng=L((bB,zB)=>{(function(){var n,U,D=function(g,f){for(var h in f)if(c.call(f,h))g[h]=f[h];function W(){this.constructor=g}return W.prototype=f.prototype,g.prototype=new W,g.__super__=f.prototype,g},c={}.hasOwnProperty;n=Jn(),zB.exports=U=function(g){D(f,g);function f(h,W,T){if(f.__super__.constructor.call(this,h),W==null)throw Error("Missing instruction target. "+this.debugInfo());if(this.target=this.stringify.insTarget(W),T)this.value=this.stringify.insValue(T)}return f.prototype.clone=function(){return Object.create(this)},f.prototype.toString=function(h){return this.options.writer.set(h).processingInstruction(this)},f}(n)}).call(bB)});var l9=L((OB,qB)=>{(function(){var n,U,D=function(g,f){for(var h in f)if(c.call(f,h))g[h]=f[h];function W(){this.constructor=g}return W.prototype=f.prototype,g.prototype=new W,g.__super__=f.prototype,g},c={}.hasOwnProperty;U=Jn(),qB.exports=n=function(g){D(f,g);function f(h){f.__super__.constructor.call(this,h),this.isDummy=!0}return f.prototype.clone=function(){return Object.create(this)},f.prototype.toString=function(h){return""},f}(U)}).call(OB)});var Jn=L((MB,AB)=>{(function(){var n,U,D,c,g,f,h,W,T,x,y,F,i,X,$,Q={}.hasOwnProperty;$=P2(),X=$.isObject,i=$.isFunction,F=$.isEmpty,y=$.getValue,f=null,n=null,U=null,D=null,c=null,T=null,x=null,W=null,g=null,AB.exports=h=function(){function Y(V){if(this.parent=V,this.parent)this.options=this.parent.options,this.stringify=this.parent.stringify;if(this.children=[],!f)f=d0(),n=k0(),U=p0(),D=m0(),c=t0(),T=e0(),x=s0(),W=ng(),g=l9()}return Y.prototype.element=function(V,G,J){var B,z,q,Z,M,O,_,w,H,v,P;if(O=null,G===null&&J==null)H=[{},null],G=H[0],J=H[1];if(G==null)G={};if(G=y(G),!X(G))v=[G,J],J=v[0],G=v[1];if(V!=null)V=y(V);if(Array.isArray(V))for(q=0,_=V.length;q<_;q++)z=V[q],O=this.element(z);else if(i(V))O=this.element(V.apply());else if(X(V))for(M in V){if(!Q.call(V,M))continue;if(P=V[M],i(P))P=P.apply();if(X(P)&&F(P))P=null;if(!this.options.ignoreDecorators&&this.stringify.convertAttKey&&M.indexOf(this.stringify.convertAttKey)===0)O=this.attribute(M.substr(this.stringify.convertAttKey.length),P);else if(!this.options.separateArrayItems&&Array.isArray(P))for(Z=0,w=P.length;Z<w;Z++)z=P[Z],B={},B[M]=z,O=this.element(B);else if(X(P))O=this.element(M),O.element(P);else O=this.element(M,P)}else if(this.options.skipNullNodes&&J===null)O=this.dummy();else if(!this.options.ignoreDecorators&&this.stringify.convertTextKey&&V.indexOf(this.stringify.convertTextKey)===0)O=this.text(J);else if(!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&V.indexOf(this.stringify.convertCDataKey)===0)O=this.cdata(J);else if(!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&V.indexOf(this.stringify.convertCommentKey)===0)O=this.comment(J);else if(!this.options.ignoreDecorators&&this.stringify.convertRawKey&&V.indexOf(this.stringify.convertRawKey)===0)O=this.raw(J);else if(!this.options.ignoreDecorators&&this.stringify.convertPIKey&&V.indexOf(this.stringify.convertPIKey)===0)O=this.instruction(V.substr(this.stringify.convertPIKey.length),J);else O=this.node(V,G,J);if(O==null)throw Error("Could not create any elements with: "+V+". "+this.debugInfo());return O},Y.prototype.insertBefore=function(V,G,J){var B,z,q;if(this.isRoot)throw Error("Cannot insert elements at root level. "+this.debugInfo(V));return z=this.parent.children.indexOf(this),q=this.parent.children.splice(z),B=this.parent.element(V,G,J),Array.prototype.push.apply(this.parent.children,q),B},Y.prototype.insertAfter=function(V,G,J){var B,z,q;if(this.isRoot)throw Error("Cannot insert elements at root level. "+this.debugInfo(V));return z=this.parent.children.indexOf(this),q=this.parent.children.splice(z+1),B=this.parent.element(V,G,J),Array.prototype.push.apply(this.parent.children,q),B},Y.prototype.remove=function(){var V,G;if(this.isRoot)throw Error("Cannot remove the root element. "+this.debugInfo());return V=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[V,V-V+1].concat(G=[])),this.parent},Y.prototype.node=function(V,G,J){var B,z;if(V!=null)V=y(V);if(G||(G={}),G=y(G),!X(G))z=[G,J],J=z[0],G=z[1];if(B=new f(this,V,G),J!=null)B.text(J);return this.children.push(B),B},Y.prototype.text=function(V){var G=new x(this,V);return this.children.push(G),this},Y.prototype.cdata=function(V){var G=new n(this,V);return this.children.push(G),this},Y.prototype.comment=function(V){var G=new U(this,V);return this.children.push(G),this},Y.prototype.commentBefore=function(V){var G,J,B;return J=this.parent.children.indexOf(this),B=this.parent.children.splice(J),G=this.parent.comment(V),Array.prototype.push.apply(this.parent.children,B),this},Y.prototype.commentAfter=function(V){var G,J,B;return J=this.parent.children.indexOf(this),B=this.parent.children.splice(J+1),G=this.parent.comment(V),Array.prototype.push.apply(this.parent.children,B),this},Y.prototype.raw=function(V){var G=new T(this,V);return this.children.push(G),this},Y.prototype.dummy=function(){var V=new g(this);return this.children.push(V),V},Y.prototype.instruction=function(V,G){var J,B,z,q,Z;if(V!=null)V=y(V);if(G!=null)G=y(G);if(Array.isArray(V))for(q=0,Z=V.length;q<Z;q++)J=V[q],this.instruction(J);else if(X(V))for(J in V){if(!Q.call(V,J))continue;B=V[J],this.instruction(J,B)}else{if(i(G))G=G.apply();z=new W(this,V,G),this.children.push(z)}return this},Y.prototype.instructionBefore=function(V,G){var J,B,z;return B=this.parent.children.indexOf(this),z=this.parent.children.splice(B),J=this.parent.instruction(V,G),Array.prototype.push.apply(this.parent.children,z),this},Y.prototype.instructionAfter=function(V,G){var J,B,z;return B=this.parent.children.indexOf(this),z=this.parent.children.splice(B+1),J=this.parent.instruction(V,G),Array.prototype.push.apply(this.parent.children,z),this},Y.prototype.declaration=function(V,G,J){var B,z;if(B=this.document(),z=new D(B,V,G,J),B.children[0]instanceof D)B.children[0]=z;else B.children.unshift(z);return B.root()||B},Y.prototype.doctype=function(V,G){var J,B,z,q,Z,M,O,_,w,H;B=this.document(),z=new c(B,V,G),w=B.children;for(q=Z=0,O=w.length;Z<O;q=++Z)if(J=w[q],J instanceof c)return B.children[q]=z,z;H=B.children;for(q=M=0,_=H.length;M<_;q=++M)if(J=H[q],J.isRoot)return B.children.splice(q,0,z),z;return B.children.push(z),z},Y.prototype.up=function(){if(this.isRoot)throw Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},Y.prototype.root=function(){var V=this;while(V)if(V.isDocument)return V.rootObject;else if(V.isRoot)return V;else V=V.parent},Y.prototype.document=function(){var V=this;while(V)if(V.isDocument)return V;else V=V.parent},Y.prototype.end=function(V){return this.document().end(V)},Y.prototype.prev=function(){var V=this.parent.children.indexOf(this);while(V>0&&this.parent.children[V-1].isDummy)V=V-1;if(V<1)throw Error("Already at the first node. "+this.debugInfo());return this.parent.children[V-1]},Y.prototype.next=function(){var V=this.parent.children.indexOf(this);while(V<this.parent.children.length-1&&this.parent.children[V+1].isDummy)V=V+1;if(V===-1||V===this.parent.children.length-1)throw Error("Already at the last node. "+this.debugInfo());return this.parent.children[V+1]},Y.prototype.importDocument=function(V){var G=V.root().clone();return G.parent=this,G.isRoot=!1,this.children.push(G),this},Y.prototype.debugInfo=function(V){var G,J;if(V=V||this.name,V==null&&!((G=this.parent)!=null?G.name:void 0))return"";else if(V==null)return"parent: <"+this.parent.name+">";else if(!((J=this.parent)!=null?J.name:void 0))return"node: <"+V+">";else return"node: <"+V+">, parent: <"+this.parent.name+">"},Y.prototype.ele=function(V,G,J){return this.element(V,G,J)},Y.prototype.nod=function(V,G,J){return this.node(V,G,J)},Y.prototype.txt=function(V){return this.text(V)},Y.prototype.dat=function(V){return this.cdata(V)},Y.prototype.com=function(V){return this.comment(V)},Y.prototype.ins=function(V,G){return this.instruction(V,G)},Y.prototype.doc=function(){return this.document()},Y.prototype.dec=function(V,G,J){return this.declaration(V,G,J)},Y.prototype.dtd=function(V,G){return this.doctype(V,G)},Y.prototype.e=function(V,G,J){return this.element(V,G,J)},Y.prototype.n=function(V,G,J){return this.node(V,G,J)},Y.prototype.t=function(V){return this.text(V)},Y.prototype.d=function(V){return this.cdata(V)},Y.prototype.c=function(V){return this.comment(V)},Y.prototype.r=function(V){return this.raw(V)},Y.prototype.i=function(V,G){return this.instruction(V,G)},Y.prototype.u=function(){return this.up()},Y.prototype.importXMLBuilder=function(V){return this.importDocument(V)},Y}()}).call(MB)});var v4=L((HB,LB)=>{(function(){var n,U=function(c,g){return function(){return c.apply(g,arguments)}},D={}.hasOwnProperty;LB.exports=n=function(){function c(g){this.assertLegalChar=U(this.assertLegalChar,this);var f,h,W;g||(g={}),this.noDoubleEncoding=g.noDoubleEncoding,h=g.stringify||{};for(f in h){if(!D.call(h,f))continue;W=h[f],this[f]=W}}return c.prototype.eleName=function(g){return g=""+g||"",this.assertLegalChar(g)},c.prototype.eleText=function(g){return g=""+g||"",this.assertLegalChar(this.elEscape(g))},c.prototype.cdata=function(g){return g=""+g||"",g=g.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(g)},c.prototype.comment=function(g){if(g=""+g||"",g.match(/--/))throw Error("Comment text cannot contain double-hypen: "+g);return this.assertLegalChar(g)},c.prototype.raw=function(g){return""+g||""},c.prototype.attName=function(g){return g=""+g||""},c.prototype.attValue=function(g){return g=""+g||"",this.attEscape(g)},c.prototype.insTarget=function(g){return""+g||""},c.prototype.insValue=function(g){if(g=""+g||"",g.match(/\?>/))throw Error("Invalid processing instruction value: "+g);return g},c.prototype.xmlVersion=function(g){if(g=""+g||"",!g.match(/1\.[0-9]+/))throw Error("Invalid version number: "+g);return g},c.prototype.xmlEncoding=function(g){if(g=""+g||"",!g.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw Error("Invalid encoding: "+g);return g},c.prototype.xmlStandalone=function(g){if(g)return"yes";else return"no"},c.prototype.dtdPubID=function(g){return""+g||""},c.prototype.dtdSysID=function(g){return""+g||""},c.prototype.dtdElementValue=function(g){return""+g||""},c.prototype.dtdAttType=function(g){return""+g||""},c.prototype.dtdAttDefault=function(g){if(g!=null)return""+g||"";else return g},c.prototype.dtdEntityValue=function(g){return""+g||""},c.prototype.dtdNData=function(g){return""+g||""},c.prototype.convertAttKey="@",c.prototype.convertPIKey="?",c.prototype.convertTextKey="#text",c.prototype.convertCDataKey="#cdata",c.prototype.convertCommentKey="#comment",c.prototype.convertRawKey="#raw",c.prototype.assertLegalChar=function(g){var f=g.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/);if(f)throw Error("Invalid character in string: "+g+" at index "+f.index);return g},c.prototype.elEscape=function(g){var f=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return g.replace(f,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")},c.prototype.attEscape=function(g){var f=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g;return g.replace(f,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")},c}()}).call(HB)});var N4=L((CB,EB)=>{(function(){var n,U={}.hasOwnProperty;EB.exports=n=function(){function D(c){var g,f,h,W,T,x,y,F,i;if(c||(c={}),this.pretty=c.pretty||!1,this.allowEmpty=(f=c.allowEmpty)!=null?f:!1,this.pretty)this.indent=(h=c.indent)!=null?h:" ",this.newline=(W=c.newline)!=null?W:`
|
|
199
|
+
`,this.offset=(T=c.offset)!=null?T:0,this.dontprettytextnodes=(x=c.dontprettytextnodes)!=null?x:0;else this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0;if(this.spacebeforeslash=(y=c.spacebeforeslash)!=null?y:"",this.spacebeforeslash===!0)this.spacebeforeslash=" ";this.newlinedefault=this.newline,this.prettydefault=this.pretty,F=c.writer||{};for(g in F){if(!U.call(F,g))continue;i=F[g],this[g]=i}}return D.prototype.set=function(c){var g,f,h;if(c||(c={}),"pretty"in c)this.pretty=c.pretty;if("allowEmpty"in c)this.allowEmpty=c.allowEmpty;if(this.pretty)this.indent="indent"in c?c.indent:" ",this.newline="newline"in c?c.newline:`
|
|
200
|
+
`,this.offset="offset"in c?c.offset:0,this.dontprettytextnodes="dontprettytextnodes"in c?c.dontprettytextnodes:0;else this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0;if(this.spacebeforeslash="spacebeforeslash"in c?c.spacebeforeslash:"",this.spacebeforeslash===!0)this.spacebeforeslash=" ";this.newlinedefault=this.newline,this.prettydefault=this.pretty,f=c.writer||{};for(g in f){if(!U.call(f,g))continue;h=f[g],this[g]=h}return this},D.prototype.space=function(c){var g;if(this.pretty)if(g=(c||0)+this.offset+1,g>0)return Array(g).join(this.indent);else return"";else return""},D}()}).call(CB)});var t9=L((wB,jB)=>{(function(){var n,U,D,c,g,f,h,W,T,x,y,F,i,X,$,Q=function(V,G){for(var J in G)if(Y.call(G,J))V[J]=G[J];function B(){this.constructor=V}return B.prototype=G.prototype,V.prototype=new B,V.__super__=G.prototype,V},Y={}.hasOwnProperty;h=m0(),W=t0(),n=k0(),U=p0(),x=d0(),F=e0(),X=s0(),y=ng(),T=l9(),D=a0(),c=r0(),g=o0(),f=l0(),$=N4(),jB.exports=i=function(V){Q(G,V);function G(J){G.__super__.constructor.call(this,J)}return G.prototype.document=function(J){var B,z,q,Z,M;this.textispresent=!1,Z="",M=J.children;for(z=0,q=M.length;z<q;z++){if(B=M[z],B instanceof T)continue;Z+=function(){switch(!1){case!(B instanceof h):return this.declaration(B);case!(B instanceof W):return this.docType(B);case!(B instanceof U):return this.comment(B);case!(B instanceof y):return this.processingInstruction(B);default:return this.element(B,0)}}.call(this)}if(this.pretty&&Z.slice(-this.newline.length)===this.newline)Z=Z.slice(0,-this.newline.length);return Z},G.prototype.attribute=function(J){return" "+J.name+'="'+J.value+'"'},G.prototype.cdata=function(J,B){return this.space(B)+"<![CDATA["+J.text+"]]>"+this.newline},G.prototype.comment=function(J,B){return this.space(B)+"<!-- "+J.text+" -->"+this.newline},G.prototype.declaration=function(J,B){var z=this.space(B);if(z+='<?xml version="'+J.version+'"',J.encoding!=null)z+=' encoding="'+J.encoding+'"';if(J.standalone!=null)z+=' standalone="'+J.standalone+'"';return z+=this.spacebeforeslash+"?>",z+=this.newline,z},G.prototype.docType=function(J,B){var z,q,Z,M,O;if(B||(B=0),M=this.space(B),M+="<!DOCTYPE "+J.root().name,J.pubID&&J.sysID)M+=' PUBLIC "'+J.pubID+'" "'+J.sysID+'"';else if(J.sysID)M+=' SYSTEM "'+J.sysID+'"';if(J.children.length>0){M+=" [",M+=this.newline,O=J.children;for(q=0,Z=O.length;q<Z;q++)z=O[q],M+=function(){switch(!1){case!(z instanceof D):return this.dtdAttList(z,B+1);case!(z instanceof c):return this.dtdElement(z,B+1);case!(z instanceof g):return this.dtdEntity(z,B+1);case!(z instanceof f):return this.dtdNotation(z,B+1);case!(z instanceof n):return this.cdata(z,B+1);case!(z instanceof U):return this.comment(z,B+1);case!(z instanceof y):return this.processingInstruction(z,B+1);default:throw Error("Unknown DTD node type: "+z.constructor.name)}}.call(this);M+="]"}return M+=this.spacebeforeslash+">",M+=this.newline,M},G.prototype.element=function(J,B){var z,q,Z,M,O,_,w,H,v,P,p,b,C;if(B||(B=0),C=!1,this.textispresent)this.newline="",this.pretty=!1;else this.newline=this.newlinedefault,this.pretty=this.prettydefault;b=this.space(B),H="",H+=b+"<"+J.name,v=J.attributes;for(w in v){if(!Y.call(v,w))continue;z=v[w],H+=this.attribute(z)}if(J.children.length===0||J.children.every(function(A){return A.value===""}))if(this.allowEmpty)H+="></"+J.name+">"+this.newline;else H+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&J.children.length===1&&J.children[0].value!=null)H+=">",H+=J.children[0].value,H+="</"+J.name+">"+this.newline;else{if(this.dontprettytextnodes){P=J.children;for(Z=0,O=P.length;Z<O;Z++)if(q=P[Z],q.value!=null){this.textispresent++,C=!0;break}}if(this.textispresent)this.newline="",this.pretty=!1,b=this.space(B);H+=">"+this.newline,p=J.children;for(M=0,_=p.length;M<_;M++)q=p[M],H+=function(){switch(!1){case!(q instanceof n):return this.cdata(q,B+1);case!(q instanceof U):return this.comment(q,B+1);case!(q instanceof x):return this.element(q,B+1);case!(q instanceof F):return this.raw(q,B+1);case!(q instanceof X):return this.text(q,B+1);case!(q instanceof y):return this.processingInstruction(q,B+1);case!(q instanceof T):return"";default:throw Error("Unknown XML node type: "+q.constructor.name)}}.call(this);if(C)this.textispresent--;if(!this.textispresent)this.newline=this.newlinedefault,this.pretty=this.prettydefault;H+=b+"</"+J.name+">"+this.newline}return H},G.prototype.processingInstruction=function(J,B){var z=this.space(B)+"<?"+J.target;if(J.value)z+=" "+J.value;return z+=this.spacebeforeslash+"?>"+this.newline,z},G.prototype.raw=function(J,B){return this.space(B)+J.value+this.newline},G.prototype.text=function(J,B){return this.space(B)+J.value+this.newline},G.prototype.dtdAttList=function(J,B){var z=this.space(B)+"<!ATTLIST "+J.elementName+" "+J.attributeName+" "+J.attributeType;if(J.defaultValueType!=="#DEFAULT")z+=" "+J.defaultValueType;if(J.defaultValue)z+=' "'+J.defaultValue+'"';return z+=this.spacebeforeslash+">"+this.newline,z},G.prototype.dtdElement=function(J,B){return this.space(B)+"<!ELEMENT "+J.name+" "+J.value+this.spacebeforeslash+">"+this.newline},G.prototype.dtdEntity=function(J,B){var z=this.space(B)+"<!ENTITY";if(J.pe)z+=" %";if(z+=" "+J.name,J.value)z+=' "'+J.value+'"';else{if(J.pubID&&J.sysID)z+=' PUBLIC "'+J.pubID+'" "'+J.sysID+'"';else if(J.sysID)z+=' SYSTEM "'+J.sysID+'"';if(J.nData)z+=" NDATA "+J.nData}return z+=this.spacebeforeslash+">"+this.newline,z},G.prototype.dtdNotation=function(J,B){var z=this.space(B)+"<!NOTATION "+J.name;if(J.pubID&&J.sysID)z+=' PUBLIC "'+J.pubID+'" "'+J.sysID+'"';else if(J.pubID)z+=' PUBLIC "'+J.pubID+'"';else if(J.sysID)z+=' SYSTEM "'+J.sysID+'"';return z+=this.spacebeforeslash+">"+this.newline,z},G.prototype.openNode=function(J,B){var z,q,Z,M;if(B||(B=0),J instanceof x){Z=this.space(B)+"<"+J.name,M=J.attributes;for(q in M){if(!Y.call(M,q))continue;z=M[q],Z+=this.attribute(z)}return Z+=(J.children?">":"/>")+this.newline,Z}else{if(Z=this.space(B)+"<!DOCTYPE "+J.rootNodeName,J.pubID&&J.sysID)Z+=' PUBLIC "'+J.pubID+'" "'+J.sysID+'"';else if(J.sysID)Z+=' SYSTEM "'+J.sysID+'"';return Z+=(J.children?" [":">")+this.newline,Z}},G.prototype.closeNode=function(J,B){switch(B||(B=0),!1){case!(J instanceof x):return this.space(B)+"</"+J.name+">"+this.newline;case!(J instanceof W):return this.space(B)+"]>"+this.newline}},G}($)}).call(wB)});var SB=L((IB,_B)=>{(function(){var n,U,D,c,g,f=function(W,T){for(var x in T)if(h.call(T,x))W[x]=T[x];function y(){this.constructor=W}return y.prototype=T.prototype,W.prototype=new y,W.__super__=T.prototype,W},h={}.hasOwnProperty;g=P2().isPlainObject,U=Jn(),c=v4(),D=t9(),_B.exports=n=function(W){f(T,W);function T(x){if(T.__super__.constructor.call(this,null),this.name="?xml",x||(x={}),!x.writer)x.writer=new D;this.options=x,this.stringify=new c(x),this.isDocument=!0}return T.prototype.end=function(x){var y;if(!x)x=this.options.writer;else if(g(x))y=x,x=this.options.writer.set(y);return x.document(this)},T.prototype.toString=function(x){return this.options.writer.set(x).document(this)},T}(U)}).call(IB)});var PB=L((vB,NB)=>{(function(){var n,U,D,c,g,f,h,W,T,x,y,F,i,X,$,Q,Y,V,G,J,B,z={}.hasOwnProperty;B=P2(),G=B.isObject,V=B.isFunction,J=B.isPlainObject,Y=B.getValue,y=d0(),U=k0(),D=p0(),i=e0(),Q=s0(),F=ng(),W=m0(),T=t0(),c=a0(),f=o0(),g=r0(),h=l0(),n=S4(),$=v4(),X=t9(),NB.exports=x=function(){function q(Z,M,O){var _;if(this.name="?xml",Z||(Z={}),!Z.writer)Z.writer=new X(Z);else if(J(Z.writer))_=Z.writer,Z.writer=new X(_);this.options=Z,this.writer=Z.writer,this.stringify=new $(Z),this.onDataCallback=M||function(){},this.onEndCallback=O||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return q.prototype.node=function(Z,M,O){var _,w;if(Z==null)throw Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw Error("Document can only have one root node. "+this.debugInfo(Z));if(this.openCurrent(),Z=Y(Z),M===null&&O==null)_=[{},null],M=_[0],O=_[1];if(M==null)M={};if(M=Y(M),!G(M))w=[M,O],O=w[0],M=w[1];if(this.currentNode=new y(this,Z,M),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,O!=null)this.text(O);return this},q.prototype.element=function(Z,M,O){if(this.currentNode&&this.currentNode instanceof T)return this.dtdElement.apply(this,arguments);else return this.node(Z,M,O)},q.prototype.attribute=function(Z,M){var O,_;if(!this.currentNode||this.currentNode.children)throw Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(Z));if(Z!=null)Z=Y(Z);if(G(Z))for(O in Z){if(!z.call(Z,O))continue;_=Z[O],this.attribute(O,_)}else{if(V(M))M=M.apply();if(!this.options.skipNullAttributes||M!=null)this.currentNode.attributes[Z]=new n(this,Z,M)}return this},q.prototype.text=function(Z){var M;return this.openCurrent(),M=new Q(this,Z),this.onData(this.writer.text(M,this.currentLevel+1),this.currentLevel+1),this},q.prototype.cdata=function(Z){var M;return this.openCurrent(),M=new U(this,Z),this.onData(this.writer.cdata(M,this.currentLevel+1),this.currentLevel+1),this},q.prototype.comment=function(Z){var M;return this.openCurrent(),M=new D(this,Z),this.onData(this.writer.comment(M,this.currentLevel+1),this.currentLevel+1),this},q.prototype.raw=function(Z){var M;return this.openCurrent(),M=new i(this,Z),this.onData(this.writer.raw(M,this.currentLevel+1),this.currentLevel+1),this},q.prototype.instruction=function(Z,M){var O,_,w,H,v;if(this.openCurrent(),Z!=null)Z=Y(Z);if(M!=null)M=Y(M);if(Array.isArray(Z))for(O=0,H=Z.length;O<H;O++)_=Z[O],this.instruction(_);else if(G(Z))for(_ in Z){if(!z.call(Z,_))continue;w=Z[_],this.instruction(_,w)}else{if(V(M))M=M.apply();v=new F(this,Z,M),this.onData(this.writer.processingInstruction(v,this.currentLevel+1),this.currentLevel+1)}return this},q.prototype.declaration=function(Z,M,O){var _;if(this.openCurrent(),this.documentStarted)throw Error("declaration() must be the first node.");return _=new W(this,Z,M,O),this.onData(this.writer.declaration(_,this.currentLevel+1),this.currentLevel+1),this},q.prototype.doctype=function(Z,M,O){if(this.openCurrent(),Z==null)throw Error("Missing root node name.");if(this.root)throw Error("dtd() must come before the root node.");return this.currentNode=new T(this,M,O),this.currentNode.rootNodeName=Z,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},q.prototype.dtdElement=function(Z,M){var O;return this.openCurrent(),O=new g(this,Z,M),this.onData(this.writer.dtdElement(O,this.currentLevel+1),this.currentLevel+1),this},q.prototype.attList=function(Z,M,O,_,w){var H;return this.openCurrent(),H=new c(this,Z,M,O,_,w),this.onData(this.writer.dtdAttList(H,this.currentLevel+1),this.currentLevel+1),this},q.prototype.entity=function(Z,M){var O;return this.openCurrent(),O=new f(this,!1,Z,M),this.onData(this.writer.dtdEntity(O,this.currentLevel+1),this.currentLevel+1),this},q.prototype.pEntity=function(Z,M){var O;return this.openCurrent(),O=new f(this,!0,Z,M),this.onData(this.writer.dtdEntity(O,this.currentLevel+1),this.currentLevel+1),this},q.prototype.notation=function(Z,M){var O;return this.openCurrent(),O=new h(this,Z,M),this.onData(this.writer.dtdNotation(O,this.currentLevel+1),this.currentLevel+1),this},q.prototype.up=function(){if(this.currentLevel<0)throw Error("The document node has no parent.");if(this.currentNode){if(this.currentNode.children)this.closeNode(this.currentNode);else this.openNode(this.currentNode);this.currentNode=null}else this.closeNode(this.openTags[this.currentLevel]);return delete this.openTags[this.currentLevel],this.currentLevel--,this},q.prototype.end=function(){while(this.currentLevel>=0)this.up();return this.onEnd()},q.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},q.prototype.openNode=function(Z){if(!Z.isOpen){if(!this.root&&this.currentLevel===0&&Z instanceof y)this.root=Z;return this.onData(this.writer.openNode(Z,this.currentLevel),this.currentLevel),Z.isOpen=!0}},q.prototype.closeNode=function(Z){if(!Z.isClosed)return this.onData(this.writer.closeNode(Z,this.currentLevel),this.currentLevel),Z.isClosed=!0},q.prototype.onData=function(Z,M){return this.documentStarted=!0,this.onDataCallback(Z,M+1)},q.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},q.prototype.debugInfo=function(Z){if(Z==null)return"";else return"node: <"+Z+">"},q.prototype.ele=function(){return this.element.apply(this,arguments)},q.prototype.nod=function(Z,M,O){return this.node(Z,M,O)},q.prototype.txt=function(Z){return this.text(Z)},q.prototype.dat=function(Z){return this.cdata(Z)},q.prototype.com=function(Z){return this.comment(Z)},q.prototype.ins=function(Z,M){return this.instruction(Z,M)},q.prototype.dec=function(Z,M,O){return this.declaration(Z,M,O)},q.prototype.dtd=function(Z,M,O){return this.doctype(Z,M,O)},q.prototype.e=function(Z,M,O){return this.element(Z,M,O)},q.prototype.n=function(Z,M,O){return this.node(Z,M,O)},q.prototype.t=function(Z){return this.text(Z)},q.prototype.d=function(Z){return this.cdata(Z)},q.prototype.c=function(Z){return this.comment(Z)},q.prototype.r=function(Z){return this.raw(Z)},q.prototype.i=function(Z,M){return this.instruction(Z,M)},q.prototype.att=function(){if(this.currentNode&&this.currentNode instanceof T)return this.attList.apply(this,arguments);else return this.attribute.apply(this,arguments)},q.prototype.a=function(){if(this.currentNode&&this.currentNode instanceof T)return this.attList.apply(this,arguments);else return this.attribute.apply(this,arguments)},q.prototype.ent=function(Z,M){return this.entity(Z,M)},q.prototype.pent=function(Z,M){return this.pEntity(Z,M)},q.prototype.not=function(Z,M){return this.notation(Z,M)},q}()}).call(vB)});var dB=L((RB,uB)=>{(function(){var n,U,D,c,g,f,h,W,T,x,y,F,i,X,$,Q=function(V,G){for(var J in G)if(Y.call(G,J))V[J]=G[J];function B(){this.constructor=V}return B.prototype=G.prototype,V.prototype=new B,V.__super__=G.prototype,V},Y={}.hasOwnProperty;h=m0(),W=t0(),n=k0(),U=p0(),x=d0(),F=e0(),X=s0(),y=ng(),T=l9(),D=a0(),c=r0(),g=o0(),f=l0(),$=N4(),uB.exports=i=function(V){Q(G,V);function G(J,B){G.__super__.constructor.call(this,B),this.stream=J}return G.prototype.document=function(J){var B,z,q,Z,M,O,_,w;O=J.children;for(z=0,Z=O.length;z<Z;z++)B=O[z],B.isLastRootNode=!1;J.children[J.children.length-1].isLastRootNode=!0,_=J.children,w=[];for(q=0,M=_.length;q<M;q++){if(B=_[q],B instanceof T)continue;switch(!1){case!(B instanceof h):w.push(this.declaration(B));break;case!(B instanceof W):w.push(this.docType(B));break;case!(B instanceof U):w.push(this.comment(B));break;case!(B instanceof y):w.push(this.processingInstruction(B));break;default:w.push(this.element(B))}}return w},G.prototype.attribute=function(J){return this.stream.write(" "+J.name+'="'+J.value+'"')},G.prototype.cdata=function(J,B){return this.stream.write(this.space(B)+"<![CDATA["+J.text+"]]>"+this.endline(J))},G.prototype.comment=function(J,B){return this.stream.write(this.space(B)+"<!-- "+J.text+" -->"+this.endline(J))},G.prototype.declaration=function(J,B){if(this.stream.write(this.space(B)),this.stream.write('<?xml version="'+J.version+'"'),J.encoding!=null)this.stream.write(' encoding="'+J.encoding+'"');if(J.standalone!=null)this.stream.write(' standalone="'+J.standalone+'"');return this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(J))},G.prototype.docType=function(J,B){var z,q,Z,M;if(B||(B=0),this.stream.write(this.space(B)),this.stream.write("<!DOCTYPE "+J.root().name),J.pubID&&J.sysID)this.stream.write(' PUBLIC "'+J.pubID+'" "'+J.sysID+'"');else if(J.sysID)this.stream.write(' SYSTEM "'+J.sysID+'"');if(J.children.length>0){this.stream.write(" ["),this.stream.write(this.endline(J)),M=J.children;for(q=0,Z=M.length;q<Z;q++)switch(z=M[q],!1){case!(z instanceof D):this.dtdAttList(z,B+1);break;case!(z instanceof c):this.dtdElement(z,B+1);break;case!(z instanceof g):this.dtdEntity(z,B+1);break;case!(z instanceof f):this.dtdNotation(z,B+1);break;case!(z instanceof n):this.cdata(z,B+1);break;case!(z instanceof U):this.comment(z,B+1);break;case!(z instanceof y):this.processingInstruction(z,B+1);break;default:throw Error("Unknown DTD node type: "+z.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(J))},G.prototype.element=function(J,B){var z,q,Z,M,O,_,w,H;B||(B=0),H=this.space(B),this.stream.write(H+"<"+J.name),_=J.attributes;for(O in _){if(!Y.call(_,O))continue;z=_[O],this.attribute(z)}if(J.children.length===0||J.children.every(function(v){return v.value===""}))if(this.allowEmpty)this.stream.write("></"+J.name+">");else this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&J.children.length===1&&J.children[0].value!=null)this.stream.write(">"),this.stream.write(J.children[0].value),this.stream.write("</"+J.name+">");else{this.stream.write(">"+this.newline),w=J.children;for(Z=0,M=w.length;Z<M;Z++)switch(q=w[Z],!1){case!(q instanceof n):this.cdata(q,B+1);break;case!(q instanceof U):this.comment(q,B+1);break;case!(q instanceof x):this.element(q,B+1);break;case!(q instanceof F):this.raw(q,B+1);break;case!(q instanceof X):this.text(q,B+1);break;case!(q instanceof y):this.processingInstruction(q,B+1);break;case!(q instanceof T):break;default:throw Error("Unknown XML node type: "+q.constructor.name)}this.stream.write(H+"</"+J.name+">")}return this.stream.write(this.endline(J))},G.prototype.processingInstruction=function(J,B){if(this.stream.write(this.space(B)+"<?"+J.target),J.value)this.stream.write(" "+J.value);return this.stream.write(this.spacebeforeslash+"?>"+this.endline(J))},G.prototype.raw=function(J,B){return this.stream.write(this.space(B)+J.value+this.endline(J))},G.prototype.text=function(J,B){return this.stream.write(this.space(B)+J.value+this.endline(J))},G.prototype.dtdAttList=function(J,B){if(this.stream.write(this.space(B)+"<!ATTLIST "+J.elementName+" "+J.attributeName+" "+J.attributeType),J.defaultValueType!=="#DEFAULT")this.stream.write(" "+J.defaultValueType);if(J.defaultValue)this.stream.write(' "'+J.defaultValue+'"');return this.stream.write(this.spacebeforeslash+">"+this.endline(J))},G.prototype.dtdElement=function(J,B){return this.stream.write(this.space(B)+"<!ELEMENT "+J.name+" "+J.value),this.stream.write(this.spacebeforeslash+">"+this.endline(J))},G.prototype.dtdEntity=function(J,B){if(this.stream.write(this.space(B)+"<!ENTITY"),J.pe)this.stream.write(" %");if(this.stream.write(" "+J.name),J.value)this.stream.write(' "'+J.value+'"');else{if(J.pubID&&J.sysID)this.stream.write(' PUBLIC "'+J.pubID+'" "'+J.sysID+'"');else if(J.sysID)this.stream.write(' SYSTEM "'+J.sysID+'"');if(J.nData)this.stream.write(" NDATA "+J.nData)}return this.stream.write(this.spacebeforeslash+">"+this.endline(J))},G.prototype.dtdNotation=function(J,B){if(this.stream.write(this.space(B)+"<!NOTATION "+J.name),J.pubID&&J.sysID)this.stream.write(' PUBLIC "'+J.pubID+'" "'+J.sysID+'"');else if(J.pubID)this.stream.write(' PUBLIC "'+J.pubID+'"');else if(J.sysID)this.stream.write(' SYSTEM "'+J.sysID+'"');return this.stream.write(this.spacebeforeslash+">"+this.endline(J))},G.prototype.endline=function(J){if(!J.isLastRootNode)return this.newline;else return""},G}($)}).call(RB)});var pB=L((kB,Ug)=>{(function(){var n,U,D,c,g,f,h;h=P2(),g=h.assign,f=h.isFunction,n=SB(),U=PB(),c=t9(),D=dB(),kB.create=function(W,T,x,y){var F,i;if(W==null)throw Error("Root element needs a name.");if(y=g({},T,x,y),F=new n(y),i=F.element(W),!y.headless){if(F.declaration(y),y.pubID!=null||y.sysID!=null)F.doctype(y)}return i},kB.begin=function(W,T,x){var y;if(f(W))y=[W,T],T=y[0],x=y[1],W={};if(T)return new U(W,T,x);else return new n(W)},kB.stringWriter=function(W){return new c(W)},kB.streamWriter=function(W,T){return new D(W,T)}}).call(kB)});var aB=L(($u)=>{var mB=w1(),iu=pB();$u.writeString=Xu;function Xu(n,U){var D=mB.invert(U),c={element:f,text:Ju};function g(T,x){return c[x.type](T,x)}function f(T,x){var y=T.element(h(x.name),x.attributes);x.children.forEach(function(F){g(y,F)})}function h(T){var x=/^\{(.*)\}(.*)$/.exec(T);if(x){var y=D[x[1]];return y+(y===""?"":":")+x[2]}else return T}function W(T){var x=iu.create(h(T.name),{version:"1.0",encoding:"UTF-8",standalone:!0});return mB.forEach(U,function(y,F){var i="xmlns"+(F===""?"":":"+F);x.attribute(i,y)}),T.children.forEach(function(y){g(x,y)}),x.end()}return W(n)}function Ju(n,U){n.text(U.value)}});var s9=L((Qu)=>{var e9=K4();Qu.Element=e9.Element;Qu.element=e9.element;Qu.emptyElement=e9.emptyElement;Qu.text=e9.text;Qu.readString=tY().readString;Qu.writeString=aB().writeString});var lB=L((Lu)=>{var zu=w1(),Ou=M2(),qu=s9();Lu.read=oB;Lu.readXmlFromZipFile=Au;var Mu={"http://schemas.openxmlformats.org/wordprocessingml/2006/main":"w","http://schemas.openxmlformats.org/officeDocument/2006/relationships":"r","http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing":"wp","http://schemas.openxmlformats.org/drawingml/2006/main":"a","http://schemas.openxmlformats.org/drawingml/2006/picture":"pic","http://purl.oclc.org/ooxml/wordprocessingml/main":"w","http://purl.oclc.org/ooxml/officeDocument/relationships":"r","http://purl.oclc.org/ooxml/drawingml/wordprocessingDrawing":"wp","http://purl.oclc.org/ooxml/drawingml/main":"a","http://purl.oclc.org/ooxml/drawingml/picture":"pic","http://schemas.openxmlformats.org/package/2006/content-types":"content-types","http://schemas.openxmlformats.org/package/2006/relationships":"relationships","http://schemas.openxmlformats.org/markup-compatibility/2006":"mc","urn:schemas-microsoft-com:vml":"v","urn:schemas-microsoft-com:office:word":"office-word","http://schemas.microsoft.com/office/word/2010/wordml":"wordml"};function oB(n){return qu.readString(n,Mu).then(function(U){return rB(U)[0]})}function Au(n,U){if(n.exists(U))return n.read(U,"utf-8").then(Hu).then(oB);else return Ou.resolve(null)}function Hu(n){return n.replace(/^\uFEFF/g,"")}function rB(n){if(n.type==="element")if(n.name==="mc:AlternateContent")return n.firstOrEmpty("mc:Fallback").children;else return n.children=zu.flatten(n.children.map(rB,!0)),[n];else return[n]}});var eB=L((tB)=>{Object.defineProperty(tB,"__esModule",{value:!0});var wu=[{"Typeface name":"Symbol","Dingbat dec":"32","Dingbat hex":"20","Unicode dec":"32","Unicode hex":"20"},{"Typeface name":"Symbol","Dingbat dec":"33","Dingbat hex":"21","Unicode dec":"33","Unicode hex":"21"},{"Typeface name":"Symbol","Dingbat dec":"34","Dingbat hex":"22","Unicode dec":"8704","Unicode hex":"2200"},{"Typeface name":"Symbol","Dingbat dec":"35","Dingbat hex":"23","Unicode dec":"35","Unicode hex":"23"},{"Typeface name":"Symbol","Dingbat dec":"36","Dingbat hex":"24","Unicode dec":"8707","Unicode hex":"2203"},{"Typeface name":"Symbol","Dingbat dec":"37","Dingbat hex":"25","Unicode dec":"37","Unicode hex":"25"},{"Typeface name":"Symbol","Dingbat dec":"38","Dingbat hex":"26","Unicode dec":"38","Unicode hex":"26"},{"Typeface name":"Symbol","Dingbat dec":"39","Dingbat hex":"27","Unicode dec":"8717","Unicode hex":"220D"},{"Typeface name":"Symbol","Dingbat dec":"40","Dingbat hex":"28","Unicode dec":"40","Unicode hex":"28"},{"Typeface name":"Symbol","Dingbat dec":"41","Dingbat hex":"29","Unicode dec":"41","Unicode hex":"29"},{"Typeface name":"Symbol","Dingbat dec":"42","Dingbat hex":"2A","Unicode dec":"42","Unicode hex":"2A"},{"Typeface name":"Symbol","Dingbat dec":"43","Dingbat hex":"2B","Unicode dec":"43","Unicode hex":"2B"},{"Typeface name":"Symbol","Dingbat dec":"44","Dingbat hex":"2C","Unicode dec":"44","Unicode hex":"2C"},{"Typeface name":"Symbol","Dingbat dec":"45","Dingbat hex":"2D","Unicode dec":"8722","Unicode hex":"2212"},{"Typeface name":"Symbol","Dingbat dec":"46","Dingbat hex":"2E","Unicode dec":"46","Unicode hex":"2E"},{"Typeface name":"Symbol","Dingbat dec":"47","Dingbat hex":"2F","Unicode dec":"47","Unicode hex":"2F"},{"Typeface name":"Symbol","Dingbat dec":"48","Dingbat hex":"30","Unicode dec":"48","Unicode hex":"30"},{"Typeface name":"Symbol","Dingbat dec":"49","Dingbat hex":"31","Unicode dec":"49","Unicode hex":"31"},{"Typeface name":"Symbol","Dingbat dec":"50","Dingbat hex":"32","Unicode dec":"50","Unicode hex":"32"},{"Typeface name":"Symbol","Dingbat dec":"51","Dingbat hex":"33","Unicode dec":"51","Unicode hex":"33"},{"Typeface name":"Symbol","Dingbat dec":"52","Dingbat hex":"34","Unicode dec":"52","Unicode hex":"34"},{"Typeface name":"Symbol","Dingbat dec":"53","Dingbat hex":"35","Unicode dec":"53","Unicode hex":"35"},{"Typeface name":"Symbol","Dingbat dec":"54","Dingbat hex":"36","Unicode dec":"54","Unicode hex":"36"},{"Typeface name":"Symbol","Dingbat dec":"55","Dingbat hex":"37","Unicode dec":"55","Unicode hex":"37"},{"Typeface name":"Symbol","Dingbat dec":"56","Dingbat hex":"38","Unicode dec":"56","Unicode hex":"38"},{"Typeface name":"Symbol","Dingbat dec":"57","Dingbat hex":"39","Unicode dec":"57","Unicode hex":"39"},{"Typeface name":"Symbol","Dingbat dec":"58","Dingbat hex":"3A","Unicode dec":"58","Unicode hex":"3A"},{"Typeface name":"Symbol","Dingbat dec":"59","Dingbat hex":"3B","Unicode dec":"59","Unicode hex":"3B"},{"Typeface name":"Symbol","Dingbat dec":"60","Dingbat hex":"3C","Unicode dec":"60","Unicode hex":"3C"},{"Typeface name":"Symbol","Dingbat dec":"61","Dingbat hex":"3D","Unicode dec":"61","Unicode hex":"3D"},{"Typeface name":"Symbol","Dingbat dec":"62","Dingbat hex":"3E","Unicode dec":"62","Unicode hex":"3E"},{"Typeface name":"Symbol","Dingbat dec":"63","Dingbat hex":"3F","Unicode dec":"63","Unicode hex":"3F"},{"Typeface name":"Symbol","Dingbat dec":"64","Dingbat hex":"40","Unicode dec":"8773","Unicode hex":"2245"},{"Typeface name":"Symbol","Dingbat dec":"65","Dingbat hex":"41","Unicode dec":"913","Unicode hex":"391"},{"Typeface name":"Symbol","Dingbat dec":"66","Dingbat hex":"42","Unicode dec":"914","Unicode hex":"392"},{"Typeface name":"Symbol","Dingbat dec":"67","Dingbat hex":"43","Unicode dec":"935","Unicode hex":"3A7"},{"Typeface name":"Symbol","Dingbat dec":"68","Dingbat hex":"44","Unicode dec":"916","Unicode hex":"394"},{"Typeface name":"Symbol","Dingbat dec":"69","Dingbat hex":"45","Unicode dec":"917","Unicode hex":"395"},{"Typeface name":"Symbol","Dingbat dec":"70","Dingbat hex":"46","Unicode dec":"934","Unicode hex":"3A6"},{"Typeface name":"Symbol","Dingbat dec":"71","Dingbat hex":"47","Unicode dec":"915","Unicode hex":"393"},{"Typeface name":"Symbol","Dingbat dec":"72","Dingbat hex":"48","Unicode dec":"919","Unicode hex":"397"},{"Typeface name":"Symbol","Dingbat dec":"73","Dingbat hex":"49","Unicode dec":"921","Unicode hex":"399"},{"Typeface name":"Symbol","Dingbat dec":"74","Dingbat hex":"4A","Unicode dec":"977","Unicode hex":"3D1"},{"Typeface name":"Symbol","Dingbat dec":"75","Dingbat hex":"4B","Unicode dec":"922","Unicode hex":"39A"},{"Typeface name":"Symbol","Dingbat dec":"76","Dingbat hex":"4C","Unicode dec":"923","Unicode hex":"39B"},{"Typeface name":"Symbol","Dingbat dec":"77","Dingbat hex":"4D","Unicode dec":"924","Unicode hex":"39C"},{"Typeface name":"Symbol","Dingbat dec":"78","Dingbat hex":"4E","Unicode dec":"925","Unicode hex":"39D"},{"Typeface name":"Symbol","Dingbat dec":"79","Dingbat hex":"4F","Unicode dec":"927","Unicode hex":"39F"},{"Typeface name":"Symbol","Dingbat dec":"80","Dingbat hex":"50","Unicode dec":"928","Unicode hex":"3A0"},{"Typeface name":"Symbol","Dingbat dec":"81","Dingbat hex":"51","Unicode dec":"920","Unicode hex":"398"},{"Typeface name":"Symbol","Dingbat dec":"82","Dingbat hex":"52","Unicode dec":"929","Unicode hex":"3A1"},{"Typeface name":"Symbol","Dingbat dec":"83","Dingbat hex":"53","Unicode dec":"931","Unicode hex":"3A3"},{"Typeface name":"Symbol","Dingbat dec":"84","Dingbat hex":"54","Unicode dec":"932","Unicode hex":"3A4"},{"Typeface name":"Symbol","Dingbat dec":"85","Dingbat hex":"55","Unicode dec":"933","Unicode hex":"3A5"},{"Typeface name":"Symbol","Dingbat dec":"86","Dingbat hex":"56","Unicode dec":"962","Unicode hex":"3C2"},{"Typeface name":"Symbol","Dingbat dec":"87","Dingbat hex":"57","Unicode dec":"937","Unicode hex":"3A9"},{"Typeface name":"Symbol","Dingbat dec":"88","Dingbat hex":"58","Unicode dec":"926","Unicode hex":"39E"},{"Typeface name":"Symbol","Dingbat dec":"89","Dingbat hex":"59","Unicode dec":"936","Unicode hex":"3A8"},{"Typeface name":"Symbol","Dingbat dec":"90","Dingbat hex":"5A","Unicode dec":"918","Unicode hex":"396"},{"Typeface name":"Symbol","Dingbat dec":"91","Dingbat hex":"5B","Unicode dec":"91","Unicode hex":"5B"},{"Typeface name":"Symbol","Dingbat dec":"92","Dingbat hex":"5C","Unicode dec":"8756","Unicode hex":"2234"},{"Typeface name":"Symbol","Dingbat dec":"93","Dingbat hex":"5D","Unicode dec":"93","Unicode hex":"5D"},{"Typeface name":"Symbol","Dingbat dec":"94","Dingbat hex":"5E","Unicode dec":"8869","Unicode hex":"22A5"},{"Typeface name":"Symbol","Dingbat dec":"95","Dingbat hex":"5F","Unicode dec":"95","Unicode hex":"5F"},{"Typeface name":"Symbol","Dingbat dec":"96","Dingbat hex":"60","Unicode dec":"8254","Unicode hex":"203E"},{"Typeface name":"Symbol","Dingbat dec":"97","Dingbat hex":"61","Unicode dec":"945","Unicode hex":"3B1"},{"Typeface name":"Symbol","Dingbat dec":"98","Dingbat hex":"62","Unicode dec":"946","Unicode hex":"3B2"},{"Typeface name":"Symbol","Dingbat dec":"99","Dingbat hex":"63","Unicode dec":"967","Unicode hex":"3C7"},{"Typeface name":"Symbol","Dingbat dec":"100","Dingbat hex":"64","Unicode dec":"948","Unicode hex":"3B4"},{"Typeface name":"Symbol","Dingbat dec":"101","Dingbat hex":"65","Unicode dec":"949","Unicode hex":"3B5"},{"Typeface name":"Symbol","Dingbat dec":"102","Dingbat hex":"66","Unicode dec":"966","Unicode hex":"3C6"},{"Typeface name":"Symbol","Dingbat dec":"103","Dingbat hex":"67","Unicode dec":"947","Unicode hex":"3B3"},{"Typeface name":"Symbol","Dingbat dec":"104","Dingbat hex":"68","Unicode dec":"951","Unicode hex":"3B7"},{"Typeface name":"Symbol","Dingbat dec":"105","Dingbat hex":"69","Unicode dec":"953","Unicode hex":"3B9"},{"Typeface name":"Symbol","Dingbat dec":"106","Dingbat hex":"6A","Unicode dec":"981","Unicode hex":"3D5"},{"Typeface name":"Symbol","Dingbat dec":"107","Dingbat hex":"6B","Unicode dec":"954","Unicode hex":"3BA"},{"Typeface name":"Symbol","Dingbat dec":"108","Dingbat hex":"6C","Unicode dec":"955","Unicode hex":"3BB"},{"Typeface name":"Symbol","Dingbat dec":"109","Dingbat hex":"6D","Unicode dec":"956","Unicode hex":"3BC"},{"Typeface name":"Symbol","Dingbat dec":"110","Dingbat hex":"6E","Unicode dec":"957","Unicode hex":"3BD"},{"Typeface name":"Symbol","Dingbat dec":"111","Dingbat hex":"6F","Unicode dec":"959","Unicode hex":"3BF"},{"Typeface name":"Symbol","Dingbat dec":"112","Dingbat hex":"70","Unicode dec":"960","Unicode hex":"3C0"},{"Typeface name":"Symbol","Dingbat dec":"113","Dingbat hex":"71","Unicode dec":"952","Unicode hex":"3B8"},{"Typeface name":"Symbol","Dingbat dec":"114","Dingbat hex":"72","Unicode dec":"961","Unicode hex":"3C1"},{"Typeface name":"Symbol","Dingbat dec":"115","Dingbat hex":"73","Unicode dec":"963","Unicode hex":"3C3"},{"Typeface name":"Symbol","Dingbat dec":"116","Dingbat hex":"74","Unicode dec":"964","Unicode hex":"3C4"},{"Typeface name":"Symbol","Dingbat dec":"117","Dingbat hex":"75","Unicode dec":"965","Unicode hex":"3C5"},{"Typeface name":"Symbol","Dingbat dec":"118","Dingbat hex":"76","Unicode dec":"982","Unicode hex":"3D6"},{"Typeface name":"Symbol","Dingbat dec":"119","Dingbat hex":"77","Unicode dec":"969","Unicode hex":"3C9"},{"Typeface name":"Symbol","Dingbat dec":"120","Dingbat hex":"78","Unicode dec":"958","Unicode hex":"3BE"},{"Typeface name":"Symbol","Dingbat dec":"121","Dingbat hex":"79","Unicode dec":"968","Unicode hex":"3C8"},{"Typeface name":"Symbol","Dingbat dec":"122","Dingbat hex":"7A","Unicode dec":"950","Unicode hex":"3B6"},{"Typeface name":"Symbol","Dingbat dec":"123","Dingbat hex":"7B","Unicode dec":"123","Unicode hex":"7B"},{"Typeface name":"Symbol","Dingbat dec":"124","Dingbat hex":"7C","Unicode dec":"124","Unicode hex":"7C"},{"Typeface name":"Symbol","Dingbat dec":"125","Dingbat hex":"7D","Unicode dec":"125","Unicode hex":"7D"},{"Typeface name":"Symbol","Dingbat dec":"126","Dingbat hex":"7E","Unicode dec":"126","Unicode hex":"7E"},{"Typeface name":"Symbol","Dingbat dec":"160","Dingbat hex":"A0","Unicode dec":"8364","Unicode hex":"20AC"},{"Typeface name":"Symbol","Dingbat dec":"161","Dingbat hex":"A1","Unicode dec":"978","Unicode hex":"3D2"},{"Typeface name":"Symbol","Dingbat dec":"162","Dingbat hex":"A2","Unicode dec":"8242","Unicode hex":"2032"},{"Typeface name":"Symbol","Dingbat dec":"163","Dingbat hex":"A3","Unicode dec":"8804","Unicode hex":"2264"},{"Typeface name":"Symbol","Dingbat dec":"164","Dingbat hex":"A4","Unicode dec":"8260","Unicode hex":"2044"},{"Typeface name":"Symbol","Dingbat dec":"165","Dingbat hex":"A5","Unicode dec":"8734","Unicode hex":"221E"},{"Typeface name":"Symbol","Dingbat dec":"166","Dingbat hex":"A6","Unicode dec":"402","Unicode hex":"192"},{"Typeface name":"Symbol","Dingbat dec":"167","Dingbat hex":"A7","Unicode dec":"9827","Unicode hex":"2663"},{"Typeface name":"Symbol","Dingbat dec":"168","Dingbat hex":"A8","Unicode dec":"9830","Unicode hex":"2666"},{"Typeface name":"Symbol","Dingbat dec":"169","Dingbat hex":"A9","Unicode dec":"9829","Unicode hex":"2665"},{"Typeface name":"Symbol","Dingbat dec":"170","Dingbat hex":"AA","Unicode dec":"9824","Unicode hex":"2660"},{"Typeface name":"Symbol","Dingbat dec":"171","Dingbat hex":"AB","Unicode dec":"8596","Unicode hex":"2194"},{"Typeface name":"Symbol","Dingbat dec":"172","Dingbat hex":"AC","Unicode dec":"8592","Unicode hex":"2190"},{"Typeface name":"Symbol","Dingbat dec":"173","Dingbat hex":"AD","Unicode dec":"8593","Unicode hex":"2191"},{"Typeface name":"Symbol","Dingbat dec":"174","Dingbat hex":"AE","Unicode dec":"8594","Unicode hex":"2192"},{"Typeface name":"Symbol","Dingbat dec":"175","Dingbat hex":"AF","Unicode dec":"8595","Unicode hex":"2193"},{"Typeface name":"Symbol","Dingbat dec":"176","Dingbat hex":"B0","Unicode dec":"176","Unicode hex":"B0"},{"Typeface name":"Symbol","Dingbat dec":"177","Dingbat hex":"B1","Unicode dec":"177","Unicode hex":"B1"},{"Typeface name":"Symbol","Dingbat dec":"178","Dingbat hex":"B2","Unicode dec":"8243","Unicode hex":"2033"},{"Typeface name":"Symbol","Dingbat dec":"179","Dingbat hex":"B3","Unicode dec":"8805","Unicode hex":"2265"},{"Typeface name":"Symbol","Dingbat dec":"180","Dingbat hex":"B4","Unicode dec":"215","Unicode hex":"D7"},{"Typeface name":"Symbol","Dingbat dec":"181","Dingbat hex":"B5","Unicode dec":"8733","Unicode hex":"221D"},{"Typeface name":"Symbol","Dingbat dec":"182","Dingbat hex":"B6","Unicode dec":"8706","Unicode hex":"2202"},{"Typeface name":"Symbol","Dingbat dec":"183","Dingbat hex":"B7","Unicode dec":"8226","Unicode hex":"2022"},{"Typeface name":"Symbol","Dingbat dec":"184","Dingbat hex":"B8","Unicode dec":"247","Unicode hex":"F7"},{"Typeface name":"Symbol","Dingbat dec":"185","Dingbat hex":"B9","Unicode dec":"8800","Unicode hex":"2260"},{"Typeface name":"Symbol","Dingbat dec":"186","Dingbat hex":"BA","Unicode dec":"8801","Unicode hex":"2261"},{"Typeface name":"Symbol","Dingbat dec":"187","Dingbat hex":"BB","Unicode dec":"8776","Unicode hex":"2248"},{"Typeface name":"Symbol","Dingbat dec":"188","Dingbat hex":"BC","Unicode dec":"8230","Unicode hex":"2026"},{"Typeface name":"Symbol","Dingbat dec":"189","Dingbat hex":"BD","Unicode dec":"9168","Unicode hex":"23D0"},{"Typeface name":"Symbol","Dingbat dec":"190","Dingbat hex":"BE","Unicode dec":"9135","Unicode hex":"23AF"},{"Typeface name":"Symbol","Dingbat dec":"191","Dingbat hex":"BF","Unicode dec":"8629","Unicode hex":"21B5"},{"Typeface name":"Symbol","Dingbat dec":"192","Dingbat hex":"C0","Unicode dec":"8501","Unicode hex":"2135"},{"Typeface name":"Symbol","Dingbat dec":"193","Dingbat hex":"C1","Unicode dec":"8465","Unicode hex":"2111"},{"Typeface name":"Symbol","Dingbat dec":"194","Dingbat hex":"C2","Unicode dec":"8476","Unicode hex":"211C"},{"Typeface name":"Symbol","Dingbat dec":"195","Dingbat hex":"C3","Unicode dec":"8472","Unicode hex":"2118"},{"Typeface name":"Symbol","Dingbat dec":"196","Dingbat hex":"C4","Unicode dec":"8855","Unicode hex":"2297"},{"Typeface name":"Symbol","Dingbat dec":"197","Dingbat hex":"C5","Unicode dec":"8853","Unicode hex":"2295"},{"Typeface name":"Symbol","Dingbat dec":"198","Dingbat hex":"C6","Unicode dec":"8709","Unicode hex":"2205"},{"Typeface name":"Symbol","Dingbat dec":"199","Dingbat hex":"C7","Unicode dec":"8745","Unicode hex":"2229"},{"Typeface name":"Symbol","Dingbat dec":"200","Dingbat hex":"C8","Unicode dec":"8746","Unicode hex":"222A"},{"Typeface name":"Symbol","Dingbat dec":"201","Dingbat hex":"C9","Unicode dec":"8835","Unicode hex":"2283"},{"Typeface name":"Symbol","Dingbat dec":"202","Dingbat hex":"CA","Unicode dec":"8839","Unicode hex":"2287"},{"Typeface name":"Symbol","Dingbat dec":"203","Dingbat hex":"CB","Unicode dec":"8836","Unicode hex":"2284"},{"Typeface name":"Symbol","Dingbat dec":"204","Dingbat hex":"CC","Unicode dec":"8834","Unicode hex":"2282"},{"Typeface name":"Symbol","Dingbat dec":"205","Dingbat hex":"CD","Unicode dec":"8838","Unicode hex":"2286"},{"Typeface name":"Symbol","Dingbat dec":"206","Dingbat hex":"CE","Unicode dec":"8712","Unicode hex":"2208"},{"Typeface name":"Symbol","Dingbat dec":"207","Dingbat hex":"CF","Unicode dec":"8713","Unicode hex":"2209"},{"Typeface name":"Symbol","Dingbat dec":"208","Dingbat hex":"D0","Unicode dec":"8736","Unicode hex":"2220"},{"Typeface name":"Symbol","Dingbat dec":"209","Dingbat hex":"D1","Unicode dec":"8711","Unicode hex":"2207"},{"Typeface name":"Symbol","Dingbat dec":"210","Dingbat hex":"D2","Unicode dec":"174","Unicode hex":"AE"},{"Typeface name":"Symbol","Dingbat dec":"211","Dingbat hex":"D3","Unicode dec":"169","Unicode hex":"A9"},{"Typeface name":"Symbol","Dingbat dec":"212","Dingbat hex":"D4","Unicode dec":"8482","Unicode hex":"2122"},{"Typeface name":"Symbol","Dingbat dec":"213","Dingbat hex":"D5","Unicode dec":"8719","Unicode hex":"220F"},{"Typeface name":"Symbol","Dingbat dec":"214","Dingbat hex":"D6","Unicode dec":"8730","Unicode hex":"221A"},{"Typeface name":"Symbol","Dingbat dec":"215","Dingbat hex":"D7","Unicode dec":"8901","Unicode hex":"22C5"},{"Typeface name":"Symbol","Dingbat dec":"216","Dingbat hex":"D8","Unicode dec":"172","Unicode hex":"AC"},{"Typeface name":"Symbol","Dingbat dec":"217","Dingbat hex":"D9","Unicode dec":"8743","Unicode hex":"2227"},{"Typeface name":"Symbol","Dingbat dec":"218","Dingbat hex":"DA","Unicode dec":"8744","Unicode hex":"2228"},{"Typeface name":"Symbol","Dingbat dec":"219","Dingbat hex":"DB","Unicode dec":"8660","Unicode hex":"21D4"},{"Typeface name":"Symbol","Dingbat dec":"220","Dingbat hex":"DC","Unicode dec":"8656","Unicode hex":"21D0"},{"Typeface name":"Symbol","Dingbat dec":"221","Dingbat hex":"DD","Unicode dec":"8657","Unicode hex":"21D1"},{"Typeface name":"Symbol","Dingbat dec":"222","Dingbat hex":"DE","Unicode dec":"8658","Unicode hex":"21D2"},{"Typeface name":"Symbol","Dingbat dec":"223","Dingbat hex":"DF","Unicode dec":"8659","Unicode hex":"21D3"},{"Typeface name":"Symbol","Dingbat dec":"224","Dingbat hex":"E0","Unicode dec":"9674","Unicode hex":"25CA"},{"Typeface name":"Symbol","Dingbat dec":"225","Dingbat hex":"E1","Unicode dec":"12296","Unicode hex":"3008"},{"Typeface name":"Symbol","Dingbat dec":"226","Dingbat hex":"E2","Unicode dec":"174","Unicode hex":"AE"},{"Typeface name":"Symbol","Dingbat dec":"227","Dingbat hex":"E3","Unicode dec":"169","Unicode hex":"A9"},{"Typeface name":"Symbol","Dingbat dec":"228","Dingbat hex":"E4","Unicode dec":"8482","Unicode hex":"2122"},{"Typeface name":"Symbol","Dingbat dec":"229","Dingbat hex":"E5","Unicode dec":"8721","Unicode hex":"2211"},{"Typeface name":"Symbol","Dingbat dec":"230","Dingbat hex":"E6","Unicode dec":"9115","Unicode hex":"239B"},{"Typeface name":"Symbol","Dingbat dec":"231","Dingbat hex":"E7","Unicode dec":"9116","Unicode hex":"239C"},{"Typeface name":"Symbol","Dingbat dec":"232","Dingbat hex":"E8","Unicode dec":"9117","Unicode hex":"239D"},{"Typeface name":"Symbol","Dingbat dec":"233","Dingbat hex":"E9","Unicode dec":"9121","Unicode hex":"23A1"},{"Typeface name":"Symbol","Dingbat dec":"234","Dingbat hex":"EA","Unicode dec":"9122","Unicode hex":"23A2"},{"Typeface name":"Symbol","Dingbat dec":"235","Dingbat hex":"EB","Unicode dec":"9123","Unicode hex":"23A3"},{"Typeface name":"Symbol","Dingbat dec":"236","Dingbat hex":"EC","Unicode dec":"9127","Unicode hex":"23A7"},{"Typeface name":"Symbol","Dingbat dec":"237","Dingbat hex":"ED","Unicode dec":"9128","Unicode hex":"23A8"},{"Typeface name":"Symbol","Dingbat dec":"238","Dingbat hex":"EE","Unicode dec":"9129","Unicode hex":"23A9"},{"Typeface name":"Symbol","Dingbat dec":"239","Dingbat hex":"EF","Unicode dec":"9130","Unicode hex":"23AA"},{"Typeface name":"Symbol","Dingbat dec":"240","Dingbat hex":"F0","Unicode dec":"63743","Unicode hex":"F8FF"},{"Typeface name":"Symbol","Dingbat dec":"241","Dingbat hex":"F1","Unicode dec":"12297","Unicode hex":"3009"},{"Typeface name":"Symbol","Dingbat dec":"242","Dingbat hex":"F2","Unicode dec":"8747","Unicode hex":"222B"},{"Typeface name":"Symbol","Dingbat dec":"243","Dingbat hex":"F3","Unicode dec":"8992","Unicode hex":"2320"},{"Typeface name":"Symbol","Dingbat dec":"244","Dingbat hex":"F4","Unicode dec":"9134","Unicode hex":"23AE"},{"Typeface name":"Symbol","Dingbat dec":"245","Dingbat hex":"F5","Unicode dec":"8993","Unicode hex":"2321"},{"Typeface name":"Symbol","Dingbat dec":"246","Dingbat hex":"F6","Unicode dec":"9118","Unicode hex":"239E"},{"Typeface name":"Symbol","Dingbat dec":"247","Dingbat hex":"F7","Unicode dec":"9119","Unicode hex":"239F"},{"Typeface name":"Symbol","Dingbat dec":"248","Dingbat hex":"F8","Unicode dec":"9120","Unicode hex":"23A0"},{"Typeface name":"Symbol","Dingbat dec":"249","Dingbat hex":"F9","Unicode dec":"9124","Unicode hex":"23A4"},{"Typeface name":"Symbol","Dingbat dec":"250","Dingbat hex":"FA","Unicode dec":"9125","Unicode hex":"23A5"},{"Typeface name":"Symbol","Dingbat dec":"251","Dingbat hex":"FB","Unicode dec":"9126","Unicode hex":"23A6"},{"Typeface name":"Symbol","Dingbat dec":"252","Dingbat hex":"FC","Unicode dec":"9131","Unicode hex":"23AB"},{"Typeface name":"Symbol","Dingbat dec":"253","Dingbat hex":"FD","Unicode dec":"9132","Unicode hex":"23AC"},{"Typeface name":"Symbol","Dingbat dec":"254","Dingbat hex":"FE","Unicode dec":"9133","Unicode hex":"23AD"},{"Typeface name":"Webdings","Dingbat dec":"32","Dingbat hex":"20","Unicode dec":"32","Unicode hex":"20"},{"Typeface name":"Webdings","Dingbat dec":"33","Dingbat hex":"21","Unicode dec":"128375","Unicode hex":"1F577"},{"Typeface name":"Webdings","Dingbat dec":"34","Dingbat hex":"22","Unicode dec":"128376","Unicode hex":"1F578"},{"Typeface name":"Webdings","Dingbat dec":"35","Dingbat hex":"23","Unicode dec":"128370","Unicode hex":"1F572"},{"Typeface name":"Webdings","Dingbat dec":"36","Dingbat hex":"24","Unicode dec":"128374","Unicode hex":"1F576"},{"Typeface name":"Webdings","Dingbat dec":"37","Dingbat hex":"25","Unicode dec":"127942","Unicode hex":"1F3C6"},{"Typeface name":"Webdings","Dingbat dec":"38","Dingbat hex":"26","Unicode dec":"127894","Unicode hex":"1F396"},{"Typeface name":"Webdings","Dingbat dec":"39","Dingbat hex":"27","Unicode dec":"128391","Unicode hex":"1F587"},{"Typeface name":"Webdings","Dingbat dec":"40","Dingbat hex":"28","Unicode dec":"128488","Unicode hex":"1F5E8"},{"Typeface name":"Webdings","Dingbat dec":"41","Dingbat hex":"29","Unicode dec":"128489","Unicode hex":"1F5E9"},{"Typeface name":"Webdings","Dingbat dec":"42","Dingbat hex":"2A","Unicode dec":"128496","Unicode hex":"1F5F0"},{"Typeface name":"Webdings","Dingbat dec":"43","Dingbat hex":"2B","Unicode dec":"128497","Unicode hex":"1F5F1"},{"Typeface name":"Webdings","Dingbat dec":"44","Dingbat hex":"2C","Unicode dec":"127798","Unicode hex":"1F336"},{"Typeface name":"Webdings","Dingbat dec":"45","Dingbat hex":"2D","Unicode dec":"127895","Unicode hex":"1F397"},{"Typeface name":"Webdings","Dingbat dec":"46","Dingbat hex":"2E","Unicode dec":"128638","Unicode hex":"1F67E"},{"Typeface name":"Webdings","Dingbat dec":"47","Dingbat hex":"2F","Unicode dec":"128636","Unicode hex":"1F67C"},{"Typeface name":"Webdings","Dingbat dec":"48","Dingbat hex":"30","Unicode dec":"128469","Unicode hex":"1F5D5"},{"Typeface name":"Webdings","Dingbat dec":"49","Dingbat hex":"31","Unicode dec":"128470","Unicode hex":"1F5D6"},{"Typeface name":"Webdings","Dingbat dec":"50","Dingbat hex":"32","Unicode dec":"128471","Unicode hex":"1F5D7"},{"Typeface name":"Webdings","Dingbat dec":"51","Dingbat hex":"33","Unicode dec":"9204","Unicode hex":"23F4"},{"Typeface name":"Webdings","Dingbat dec":"52","Dingbat hex":"34","Unicode dec":"9205","Unicode hex":"23F5"},{"Typeface name":"Webdings","Dingbat dec":"53","Dingbat hex":"35","Unicode dec":"9206","Unicode hex":"23F6"},{"Typeface name":"Webdings","Dingbat dec":"54","Dingbat hex":"36","Unicode dec":"9207","Unicode hex":"23F7"},{"Typeface name":"Webdings","Dingbat dec":"55","Dingbat hex":"37","Unicode dec":"9194","Unicode hex":"23EA"},{"Typeface name":"Webdings","Dingbat dec":"56","Dingbat hex":"38","Unicode dec":"9193","Unicode hex":"23E9"},{"Typeface name":"Webdings","Dingbat dec":"57","Dingbat hex":"39","Unicode dec":"9198","Unicode hex":"23EE"},{"Typeface name":"Webdings","Dingbat dec":"58","Dingbat hex":"3A","Unicode dec":"9197","Unicode hex":"23ED"},{"Typeface name":"Webdings","Dingbat dec":"59","Dingbat hex":"3B","Unicode dec":"9208","Unicode hex":"23F8"},{"Typeface name":"Webdings","Dingbat dec":"60","Dingbat hex":"3C","Unicode dec":"9209","Unicode hex":"23F9"},{"Typeface name":"Webdings","Dingbat dec":"61","Dingbat hex":"3D","Unicode dec":"9210","Unicode hex":"23FA"},{"Typeface name":"Webdings","Dingbat dec":"62","Dingbat hex":"3E","Unicode dec":"128474","Unicode hex":"1F5DA"},{"Typeface name":"Webdings","Dingbat dec":"63","Dingbat hex":"3F","Unicode dec":"128499","Unicode hex":"1F5F3"},{"Typeface name":"Webdings","Dingbat dec":"64","Dingbat hex":"40","Unicode dec":"128736","Unicode hex":"1F6E0"},{"Typeface name":"Webdings","Dingbat dec":"65","Dingbat hex":"41","Unicode dec":"127959","Unicode hex":"1F3D7"},{"Typeface name":"Webdings","Dingbat dec":"66","Dingbat hex":"42","Unicode dec":"127960","Unicode hex":"1F3D8"},{"Typeface name":"Webdings","Dingbat dec":"67","Dingbat hex":"43","Unicode dec":"127961","Unicode hex":"1F3D9"},{"Typeface name":"Webdings","Dingbat dec":"68","Dingbat hex":"44","Unicode dec":"127962","Unicode hex":"1F3DA"},{"Typeface name":"Webdings","Dingbat dec":"69","Dingbat hex":"45","Unicode dec":"127964","Unicode hex":"1F3DC"},{"Typeface name":"Webdings","Dingbat dec":"70","Dingbat hex":"46","Unicode dec":"127981","Unicode hex":"1F3ED"},{"Typeface name":"Webdings","Dingbat dec":"71","Dingbat hex":"47","Unicode dec":"127963","Unicode hex":"1F3DB"},{"Typeface name":"Webdings","Dingbat dec":"72","Dingbat hex":"48","Unicode dec":"127968","Unicode hex":"1F3E0"},{"Typeface name":"Webdings","Dingbat dec":"73","Dingbat hex":"49","Unicode dec":"127958","Unicode hex":"1F3D6"},{"Typeface name":"Webdings","Dingbat dec":"74","Dingbat hex":"4A","Unicode dec":"127965","Unicode hex":"1F3DD"},{"Typeface name":"Webdings","Dingbat dec":"75","Dingbat hex":"4B","Unicode dec":"128739","Unicode hex":"1F6E3"},{"Typeface name":"Webdings","Dingbat dec":"76","Dingbat hex":"4C","Unicode dec":"128269","Unicode hex":"1F50D"},{"Typeface name":"Webdings","Dingbat dec":"77","Dingbat hex":"4D","Unicode dec":"127956","Unicode hex":"1F3D4"},{"Typeface name":"Webdings","Dingbat dec":"78","Dingbat hex":"4E","Unicode dec":"128065","Unicode hex":"1F441"},{"Typeface name":"Webdings","Dingbat dec":"79","Dingbat hex":"4F","Unicode dec":"128066","Unicode hex":"1F442"},{"Typeface name":"Webdings","Dingbat dec":"80","Dingbat hex":"50","Unicode dec":"127966","Unicode hex":"1F3DE"},{"Typeface name":"Webdings","Dingbat dec":"81","Dingbat hex":"51","Unicode dec":"127957","Unicode hex":"1F3D5"},{"Typeface name":"Webdings","Dingbat dec":"82","Dingbat hex":"52","Unicode dec":"128740","Unicode hex":"1F6E4"},{"Typeface name":"Webdings","Dingbat dec":"83","Dingbat hex":"53","Unicode dec":"127967","Unicode hex":"1F3DF"},{"Typeface name":"Webdings","Dingbat dec":"84","Dingbat hex":"54","Unicode dec":"128755","Unicode hex":"1F6F3"},{"Typeface name":"Webdings","Dingbat dec":"85","Dingbat hex":"55","Unicode dec":"128364","Unicode hex":"1F56C"},{"Typeface name":"Webdings","Dingbat dec":"86","Dingbat hex":"56","Unicode dec":"128363","Unicode hex":"1F56B"},{"Typeface name":"Webdings","Dingbat dec":"87","Dingbat hex":"57","Unicode dec":"128360","Unicode hex":"1F568"},{"Typeface name":"Webdings","Dingbat dec":"88","Dingbat hex":"58","Unicode dec":"128264","Unicode hex":"1F508"},{"Typeface name":"Webdings","Dingbat dec":"89","Dingbat hex":"59","Unicode dec":"127892","Unicode hex":"1F394"},{"Typeface name":"Webdings","Dingbat dec":"90","Dingbat hex":"5A","Unicode dec":"127893","Unicode hex":"1F395"},{"Typeface name":"Webdings","Dingbat dec":"91","Dingbat hex":"5B","Unicode dec":"128492","Unicode hex":"1F5EC"},{"Typeface name":"Webdings","Dingbat dec":"92","Dingbat hex":"5C","Unicode dec":"128637","Unicode hex":"1F67D"},{"Typeface name":"Webdings","Dingbat dec":"93","Dingbat hex":"5D","Unicode dec":"128493","Unicode hex":"1F5ED"},{"Typeface name":"Webdings","Dingbat dec":"94","Dingbat hex":"5E","Unicode dec":"128490","Unicode hex":"1F5EA"},{"Typeface name":"Webdings","Dingbat dec":"95","Dingbat hex":"5F","Unicode dec":"128491","Unicode hex":"1F5EB"},{"Typeface name":"Webdings","Dingbat dec":"96","Dingbat hex":"60","Unicode dec":"11156","Unicode hex":"2B94"},{"Typeface name":"Webdings","Dingbat dec":"97","Dingbat hex":"61","Unicode dec":"10004","Unicode hex":"2714"},{"Typeface name":"Webdings","Dingbat dec":"98","Dingbat hex":"62","Unicode dec":"128690","Unicode hex":"1F6B2"},{"Typeface name":"Webdings","Dingbat dec":"99","Dingbat hex":"63","Unicode dec":"11036","Unicode hex":"2B1C"},{"Typeface name":"Webdings","Dingbat dec":"100","Dingbat hex":"64","Unicode dec":"128737","Unicode hex":"1F6E1"},{"Typeface name":"Webdings","Dingbat dec":"101","Dingbat hex":"65","Unicode dec":"128230","Unicode hex":"1F4E6"},{"Typeface name":"Webdings","Dingbat dec":"102","Dingbat hex":"66","Unicode dec":"128753","Unicode hex":"1F6F1"},{"Typeface name":"Webdings","Dingbat dec":"103","Dingbat hex":"67","Unicode dec":"11035","Unicode hex":"2B1B"},{"Typeface name":"Webdings","Dingbat dec":"104","Dingbat hex":"68","Unicode dec":"128657","Unicode hex":"1F691"},{"Typeface name":"Webdings","Dingbat dec":"105","Dingbat hex":"69","Unicode dec":"128712","Unicode hex":"1F6C8"},{"Typeface name":"Webdings","Dingbat dec":"106","Dingbat hex":"6A","Unicode dec":"128745","Unicode hex":"1F6E9"},{"Typeface name":"Webdings","Dingbat dec":"107","Dingbat hex":"6B","Unicode dec":"128752","Unicode hex":"1F6F0"},{"Typeface name":"Webdings","Dingbat dec":"108","Dingbat hex":"6C","Unicode dec":"128968","Unicode hex":"1F7C8"},{"Typeface name":"Webdings","Dingbat dec":"109","Dingbat hex":"6D","Unicode dec":"128372","Unicode hex":"1F574"},{"Typeface name":"Webdings","Dingbat dec":"110","Dingbat hex":"6E","Unicode dec":"11044","Unicode hex":"2B24"},{"Typeface name":"Webdings","Dingbat dec":"111","Dingbat hex":"6F","Unicode dec":"128741","Unicode hex":"1F6E5"},{"Typeface name":"Webdings","Dingbat dec":"112","Dingbat hex":"70","Unicode dec":"128660","Unicode hex":"1F694"},{"Typeface name":"Webdings","Dingbat dec":"113","Dingbat hex":"71","Unicode dec":"128472","Unicode hex":"1F5D8"},{"Typeface name":"Webdings","Dingbat dec":"114","Dingbat hex":"72","Unicode dec":"128473","Unicode hex":"1F5D9"},{"Typeface name":"Webdings","Dingbat dec":"115","Dingbat hex":"73","Unicode dec":"10067","Unicode hex":"2753"},{"Typeface name":"Webdings","Dingbat dec":"116","Dingbat hex":"74","Unicode dec":"128754","Unicode hex":"1F6F2"},{"Typeface name":"Webdings","Dingbat dec":"117","Dingbat hex":"75","Unicode dec":"128647","Unicode hex":"1F687"},{"Typeface name":"Webdings","Dingbat dec":"118","Dingbat hex":"76","Unicode dec":"128653","Unicode hex":"1F68D"},{"Typeface name":"Webdings","Dingbat dec":"119","Dingbat hex":"77","Unicode dec":"9971","Unicode hex":"26F3"},{"Typeface name":"Webdings","Dingbat dec":"120","Dingbat hex":"78","Unicode dec":"10680","Unicode hex":"29B8"},{"Typeface name":"Webdings","Dingbat dec":"121","Dingbat hex":"79","Unicode dec":"8854","Unicode hex":"2296"},{"Typeface name":"Webdings","Dingbat dec":"122","Dingbat hex":"7A","Unicode dec":"128685","Unicode hex":"1F6AD"},{"Typeface name":"Webdings","Dingbat dec":"123","Dingbat hex":"7B","Unicode dec":"128494","Unicode hex":"1F5EE"},{"Typeface name":"Webdings","Dingbat dec":"124","Dingbat hex":"7C","Unicode dec":"9168","Unicode hex":"23D0"},{"Typeface name":"Webdings","Dingbat dec":"125","Dingbat hex":"7D","Unicode dec":"128495","Unicode hex":"1F5EF"},{"Typeface name":"Webdings","Dingbat dec":"126","Dingbat hex":"7E","Unicode dec":"128498","Unicode hex":"1F5F2"},{"Typeface name":"Webdings","Dingbat dec":"128","Dingbat hex":"80","Unicode dec":"128697","Unicode hex":"1F6B9"},{"Typeface name":"Webdings","Dingbat dec":"129","Dingbat hex":"81","Unicode dec":"128698","Unicode hex":"1F6BA"},{"Typeface name":"Webdings","Dingbat dec":"130","Dingbat hex":"82","Unicode dec":"128713","Unicode hex":"1F6C9"},{"Typeface name":"Webdings","Dingbat dec":"131","Dingbat hex":"83","Unicode dec":"128714","Unicode hex":"1F6CA"},{"Typeface name":"Webdings","Dingbat dec":"132","Dingbat hex":"84","Unicode dec":"128700","Unicode hex":"1F6BC"},{"Typeface name":"Webdings","Dingbat dec":"133","Dingbat hex":"85","Unicode dec":"128125","Unicode hex":"1F47D"},{"Typeface name":"Webdings","Dingbat dec":"134","Dingbat hex":"86","Unicode dec":"127947","Unicode hex":"1F3CB"},{"Typeface name":"Webdings","Dingbat dec":"135","Dingbat hex":"87","Unicode dec":"9975","Unicode hex":"26F7"},{"Typeface name":"Webdings","Dingbat dec":"136","Dingbat hex":"88","Unicode dec":"127938","Unicode hex":"1F3C2"},{"Typeface name":"Webdings","Dingbat dec":"137","Dingbat hex":"89","Unicode dec":"127948","Unicode hex":"1F3CC"},{"Typeface name":"Webdings","Dingbat dec":"138","Dingbat hex":"8A","Unicode dec":"127946","Unicode hex":"1F3CA"},{"Typeface name":"Webdings","Dingbat dec":"139","Dingbat hex":"8B","Unicode dec":"127940","Unicode hex":"1F3C4"},{"Typeface name":"Webdings","Dingbat dec":"140","Dingbat hex":"8C","Unicode dec":"127949","Unicode hex":"1F3CD"},{"Typeface name":"Webdings","Dingbat dec":"141","Dingbat hex":"8D","Unicode dec":"127950","Unicode hex":"1F3CE"},{"Typeface name":"Webdings","Dingbat dec":"142","Dingbat hex":"8E","Unicode dec":"128664","Unicode hex":"1F698"},{"Typeface name":"Webdings","Dingbat dec":"143","Dingbat hex":"8F","Unicode dec":"128480","Unicode hex":"1F5E0"},{"Typeface name":"Webdings","Dingbat dec":"144","Dingbat hex":"90","Unicode dec":"128738","Unicode hex":"1F6E2"},{"Typeface name":"Webdings","Dingbat dec":"145","Dingbat hex":"91","Unicode dec":"128176","Unicode hex":"1F4B0"},{"Typeface name":"Webdings","Dingbat dec":"146","Dingbat hex":"92","Unicode dec":"127991","Unicode hex":"1F3F7"},{"Typeface name":"Webdings","Dingbat dec":"147","Dingbat hex":"93","Unicode dec":"128179","Unicode hex":"1F4B3"},{"Typeface name":"Webdings","Dingbat dec":"148","Dingbat hex":"94","Unicode dec":"128106","Unicode hex":"1F46A"},{"Typeface name":"Webdings","Dingbat dec":"149","Dingbat hex":"95","Unicode dec":"128481","Unicode hex":"1F5E1"},{"Typeface name":"Webdings","Dingbat dec":"150","Dingbat hex":"96","Unicode dec":"128482","Unicode hex":"1F5E2"},{"Typeface name":"Webdings","Dingbat dec":"151","Dingbat hex":"97","Unicode dec":"128483","Unicode hex":"1F5E3"},{"Typeface name":"Webdings","Dingbat dec":"152","Dingbat hex":"98","Unicode dec":"10031","Unicode hex":"272F"},{"Typeface name":"Webdings","Dingbat dec":"153","Dingbat hex":"99","Unicode dec":"128388","Unicode hex":"1F584"},{"Typeface name":"Webdings","Dingbat dec":"154","Dingbat hex":"9A","Unicode dec":"128389","Unicode hex":"1F585"},{"Typeface name":"Webdings","Dingbat dec":"155","Dingbat hex":"9B","Unicode dec":"128387","Unicode hex":"1F583"},{"Typeface name":"Webdings","Dingbat dec":"156","Dingbat hex":"9C","Unicode dec":"128390","Unicode hex":"1F586"},{"Typeface name":"Webdings","Dingbat dec":"157","Dingbat hex":"9D","Unicode dec":"128441","Unicode hex":"1F5B9"},{"Typeface name":"Webdings","Dingbat dec":"158","Dingbat hex":"9E","Unicode dec":"128442","Unicode hex":"1F5BA"},{"Typeface name":"Webdings","Dingbat dec":"159","Dingbat hex":"9F","Unicode dec":"128443","Unicode hex":"1F5BB"},{"Typeface name":"Webdings","Dingbat dec":"160","Dingbat hex":"A0","Unicode dec":"128373","Unicode hex":"1F575"},{"Typeface name":"Webdings","Dingbat dec":"161","Dingbat hex":"A1","Unicode dec":"128368","Unicode hex":"1F570"},{"Typeface name":"Webdings","Dingbat dec":"162","Dingbat hex":"A2","Unicode dec":"128445","Unicode hex":"1F5BD"},{"Typeface name":"Webdings","Dingbat dec":"163","Dingbat hex":"A3","Unicode dec":"128446","Unicode hex":"1F5BE"},{"Typeface name":"Webdings","Dingbat dec":"164","Dingbat hex":"A4","Unicode dec":"128203","Unicode hex":"1F4CB"},{"Typeface name":"Webdings","Dingbat dec":"165","Dingbat hex":"A5","Unicode dec":"128466","Unicode hex":"1F5D2"},{"Typeface name":"Webdings","Dingbat dec":"166","Dingbat hex":"A6","Unicode dec":"128467","Unicode hex":"1F5D3"},{"Typeface name":"Webdings","Dingbat dec":"167","Dingbat hex":"A7","Unicode dec":"128366","Unicode hex":"1F56E"},{"Typeface name":"Webdings","Dingbat dec":"168","Dingbat hex":"A8","Unicode dec":"128218","Unicode hex":"1F4DA"},{"Typeface name":"Webdings","Dingbat dec":"169","Dingbat hex":"A9","Unicode dec":"128478","Unicode hex":"1F5DE"},{"Typeface name":"Webdings","Dingbat dec":"170","Dingbat hex":"AA","Unicode dec":"128479","Unicode hex":"1F5DF"},{"Typeface name":"Webdings","Dingbat dec":"171","Dingbat hex":"AB","Unicode dec":"128451","Unicode hex":"1F5C3"},{"Typeface name":"Webdings","Dingbat dec":"172","Dingbat hex":"AC","Unicode dec":"128450","Unicode hex":"1F5C2"},{"Typeface name":"Webdings","Dingbat dec":"173","Dingbat hex":"AD","Unicode dec":"128444","Unicode hex":"1F5BC"},{"Typeface name":"Webdings","Dingbat dec":"174","Dingbat hex":"AE","Unicode dec":"127917","Unicode hex":"1F3AD"},{"Typeface name":"Webdings","Dingbat dec":"175","Dingbat hex":"AF","Unicode dec":"127900","Unicode hex":"1F39C"},{"Typeface name":"Webdings","Dingbat dec":"176","Dingbat hex":"B0","Unicode dec":"127896","Unicode hex":"1F398"},{"Typeface name":"Webdings","Dingbat dec":"177","Dingbat hex":"B1","Unicode dec":"127897","Unicode hex":"1F399"},{"Typeface name":"Webdings","Dingbat dec":"178","Dingbat hex":"B2","Unicode dec":"127911","Unicode hex":"1F3A7"},{"Typeface name":"Webdings","Dingbat dec":"179","Dingbat hex":"B3","Unicode dec":"128191","Unicode hex":"1F4BF"},{"Typeface name":"Webdings","Dingbat dec":"180","Dingbat hex":"B4","Unicode dec":"127902","Unicode hex":"1F39E"},{"Typeface name":"Webdings","Dingbat dec":"181","Dingbat hex":"B5","Unicode dec":"128247","Unicode hex":"1F4F7"},{"Typeface name":"Webdings","Dingbat dec":"182","Dingbat hex":"B6","Unicode dec":"127903","Unicode hex":"1F39F"},{"Typeface name":"Webdings","Dingbat dec":"183","Dingbat hex":"B7","Unicode dec":"127916","Unicode hex":"1F3AC"},{"Typeface name":"Webdings","Dingbat dec":"184","Dingbat hex":"B8","Unicode dec":"128253","Unicode hex":"1F4FD"},{"Typeface name":"Webdings","Dingbat dec":"185","Dingbat hex":"B9","Unicode dec":"128249","Unicode hex":"1F4F9"},{"Typeface name":"Webdings","Dingbat dec":"186","Dingbat hex":"BA","Unicode dec":"128254","Unicode hex":"1F4FE"},{"Typeface name":"Webdings","Dingbat dec":"187","Dingbat hex":"BB","Unicode dec":"128251","Unicode hex":"1F4FB"},{"Typeface name":"Webdings","Dingbat dec":"188","Dingbat hex":"BC","Unicode dec":"127898","Unicode hex":"1F39A"},{"Typeface name":"Webdings","Dingbat dec":"189","Dingbat hex":"BD","Unicode dec":"127899","Unicode hex":"1F39B"},{"Typeface name":"Webdings","Dingbat dec":"190","Dingbat hex":"BE","Unicode dec":"128250","Unicode hex":"1F4FA"},{"Typeface name":"Webdings","Dingbat dec":"191","Dingbat hex":"BF","Unicode dec":"128187","Unicode hex":"1F4BB"},{"Typeface name":"Webdings","Dingbat dec":"192","Dingbat hex":"C0","Unicode dec":"128421","Unicode hex":"1F5A5"},{"Typeface name":"Webdings","Dingbat dec":"193","Dingbat hex":"C1","Unicode dec":"128422","Unicode hex":"1F5A6"},{"Typeface name":"Webdings","Dingbat dec":"194","Dingbat hex":"C2","Unicode dec":"128423","Unicode hex":"1F5A7"},{"Typeface name":"Webdings","Dingbat dec":"195","Dingbat hex":"C3","Unicode dec":"128377","Unicode hex":"1F579"},{"Typeface name":"Webdings","Dingbat dec":"196","Dingbat hex":"C4","Unicode dec":"127918","Unicode hex":"1F3AE"},{"Typeface name":"Webdings","Dingbat dec":"197","Dingbat hex":"C5","Unicode dec":"128379","Unicode hex":"1F57B"},{"Typeface name":"Webdings","Dingbat dec":"198","Dingbat hex":"C6","Unicode dec":"128380","Unicode hex":"1F57C"},{"Typeface name":"Webdings","Dingbat dec":"199","Dingbat hex":"C7","Unicode dec":"128223","Unicode hex":"1F4DF"},{"Typeface name":"Webdings","Dingbat dec":"200","Dingbat hex":"C8","Unicode dec":"128385","Unicode hex":"1F581"},{"Typeface name":"Webdings","Dingbat dec":"201","Dingbat hex":"C9","Unicode dec":"128384","Unicode hex":"1F580"},{"Typeface name":"Webdings","Dingbat dec":"202","Dingbat hex":"CA","Unicode dec":"128424","Unicode hex":"1F5A8"},{"Typeface name":"Webdings","Dingbat dec":"203","Dingbat hex":"CB","Unicode dec":"128425","Unicode hex":"1F5A9"},{"Typeface name":"Webdings","Dingbat dec":"204","Dingbat hex":"CC","Unicode dec":"128447","Unicode hex":"1F5BF"},{"Typeface name":"Webdings","Dingbat dec":"205","Dingbat hex":"CD","Unicode dec":"128426","Unicode hex":"1F5AA"},{"Typeface name":"Webdings","Dingbat dec":"206","Dingbat hex":"CE","Unicode dec":"128476","Unicode hex":"1F5DC"},{"Typeface name":"Webdings","Dingbat dec":"207","Dingbat hex":"CF","Unicode dec":"128274","Unicode hex":"1F512"},{"Typeface name":"Webdings","Dingbat dec":"208","Dingbat hex":"D0","Unicode dec":"128275","Unicode hex":"1F513"},{"Typeface name":"Webdings","Dingbat dec":"209","Dingbat hex":"D1","Unicode dec":"128477","Unicode hex":"1F5DD"},{"Typeface name":"Webdings","Dingbat dec":"210","Dingbat hex":"D2","Unicode dec":"128229","Unicode hex":"1F4E5"},{"Typeface name":"Webdings","Dingbat dec":"211","Dingbat hex":"D3","Unicode dec":"128228","Unicode hex":"1F4E4"},{"Typeface name":"Webdings","Dingbat dec":"212","Dingbat hex":"D4","Unicode dec":"128371","Unicode hex":"1F573"},{"Typeface name":"Webdings","Dingbat dec":"213","Dingbat hex":"D5","Unicode dec":"127779","Unicode hex":"1F323"},{"Typeface name":"Webdings","Dingbat dec":"214","Dingbat hex":"D6","Unicode dec":"127780","Unicode hex":"1F324"},{"Typeface name":"Webdings","Dingbat dec":"215","Dingbat hex":"D7","Unicode dec":"127781","Unicode hex":"1F325"},{"Typeface name":"Webdings","Dingbat dec":"216","Dingbat hex":"D8","Unicode dec":"127782","Unicode hex":"1F326"},{"Typeface name":"Webdings","Dingbat dec":"217","Dingbat hex":"D9","Unicode dec":"9729","Unicode hex":"2601"},{"Typeface name":"Webdings","Dingbat dec":"218","Dingbat hex":"DA","Unicode dec":"127784","Unicode hex":"1F328"},{"Typeface name":"Webdings","Dingbat dec":"219","Dingbat hex":"DB","Unicode dec":"127783","Unicode hex":"1F327"},{"Typeface name":"Webdings","Dingbat dec":"220","Dingbat hex":"DC","Unicode dec":"127785","Unicode hex":"1F329"},{"Typeface name":"Webdings","Dingbat dec":"221","Dingbat hex":"DD","Unicode dec":"127786","Unicode hex":"1F32A"},{"Typeface name":"Webdings","Dingbat dec":"222","Dingbat hex":"DE","Unicode dec":"127788","Unicode hex":"1F32C"},{"Typeface name":"Webdings","Dingbat dec":"223","Dingbat hex":"DF","Unicode dec":"127787","Unicode hex":"1F32B"},{"Typeface name":"Webdings","Dingbat dec":"224","Dingbat hex":"E0","Unicode dec":"127772","Unicode hex":"1F31C"},{"Typeface name":"Webdings","Dingbat dec":"225","Dingbat hex":"E1","Unicode dec":"127777","Unicode hex":"1F321"},{"Typeface name":"Webdings","Dingbat dec":"226","Dingbat hex":"E2","Unicode dec":"128715","Unicode hex":"1F6CB"},{"Typeface name":"Webdings","Dingbat dec":"227","Dingbat hex":"E3","Unicode dec":"128719","Unicode hex":"1F6CF"},{"Typeface name":"Webdings","Dingbat dec":"228","Dingbat hex":"E4","Unicode dec":"127869","Unicode hex":"1F37D"},{"Typeface name":"Webdings","Dingbat dec":"229","Dingbat hex":"E5","Unicode dec":"127864","Unicode hex":"1F378"},{"Typeface name":"Webdings","Dingbat dec":"230","Dingbat hex":"E6","Unicode dec":"128718","Unicode hex":"1F6CE"},{"Typeface name":"Webdings","Dingbat dec":"231","Dingbat hex":"E7","Unicode dec":"128717","Unicode hex":"1F6CD"},{"Typeface name":"Webdings","Dingbat dec":"232","Dingbat hex":"E8","Unicode dec":"9413","Unicode hex":"24C5"},{"Typeface name":"Webdings","Dingbat dec":"233","Dingbat hex":"E9","Unicode dec":"9855","Unicode hex":"267F"},{"Typeface name":"Webdings","Dingbat dec":"234","Dingbat hex":"EA","Unicode dec":"128710","Unicode hex":"1F6C6"},{"Typeface name":"Webdings","Dingbat dec":"235","Dingbat hex":"EB","Unicode dec":"128392","Unicode hex":"1F588"},{"Typeface name":"Webdings","Dingbat dec":"236","Dingbat hex":"EC","Unicode dec":"127891","Unicode hex":"1F393"},{"Typeface name":"Webdings","Dingbat dec":"237","Dingbat hex":"ED","Unicode dec":"128484","Unicode hex":"1F5E4"},{"Typeface name":"Webdings","Dingbat dec":"238","Dingbat hex":"EE","Unicode dec":"128485","Unicode hex":"1F5E5"},{"Typeface name":"Webdings","Dingbat dec":"239","Dingbat hex":"EF","Unicode dec":"128486","Unicode hex":"1F5E6"},{"Typeface name":"Webdings","Dingbat dec":"240","Dingbat hex":"F0","Unicode dec":"128487","Unicode hex":"1F5E7"},{"Typeface name":"Webdings","Dingbat dec":"241","Dingbat hex":"F1","Unicode dec":"128746","Unicode hex":"1F6EA"},{"Typeface name":"Webdings","Dingbat dec":"242","Dingbat hex":"F2","Unicode dec":"128063","Unicode hex":"1F43F"},{"Typeface name":"Webdings","Dingbat dec":"243","Dingbat hex":"F3","Unicode dec":"128038","Unicode hex":"1F426"},{"Typeface name":"Webdings","Dingbat dec":"244","Dingbat hex":"F4","Unicode dec":"128031","Unicode hex":"1F41F"},{"Typeface name":"Webdings","Dingbat dec":"245","Dingbat hex":"F5","Unicode dec":"128021","Unicode hex":"1F415"},{"Typeface name":"Webdings","Dingbat dec":"246","Dingbat hex":"F6","Unicode dec":"128008","Unicode hex":"1F408"},{"Typeface name":"Webdings","Dingbat dec":"247","Dingbat hex":"F7","Unicode dec":"128620","Unicode hex":"1F66C"},{"Typeface name":"Webdings","Dingbat dec":"248","Dingbat hex":"F8","Unicode dec":"128622","Unicode hex":"1F66E"},{"Typeface name":"Webdings","Dingbat dec":"249","Dingbat hex":"F9","Unicode dec":"128621","Unicode hex":"1F66D"},{"Typeface name":"Webdings","Dingbat dec":"250","Dingbat hex":"FA","Unicode dec":"128623","Unicode hex":"1F66F"},{"Typeface name":"Webdings","Dingbat dec":"251","Dingbat hex":"FB","Unicode dec":"128506","Unicode hex":"1F5FA"},{"Typeface name":"Webdings","Dingbat dec":"252","Dingbat hex":"FC","Unicode dec":"127757","Unicode hex":"1F30D"},{"Typeface name":"Webdings","Dingbat dec":"253","Dingbat hex":"FD","Unicode dec":"127759","Unicode hex":"1F30F"},{"Typeface name":"Webdings","Dingbat dec":"254","Dingbat hex":"FE","Unicode dec":"127758","Unicode hex":"1F30E"},{"Typeface name":"Webdings","Dingbat dec":"255","Dingbat hex":"FF","Unicode dec":"128330","Unicode hex":"1F54A"},{"Typeface name":"Wingdings","Dingbat dec":"32","Dingbat hex":"20","Unicode dec":"32","Unicode hex":"20"},{"Typeface name":"Wingdings","Dingbat dec":"33","Dingbat hex":"21","Unicode dec":"128393","Unicode hex":"1F589"},{"Typeface name":"Wingdings","Dingbat dec":"34","Dingbat hex":"22","Unicode dec":"9986","Unicode hex":"2702"},{"Typeface name":"Wingdings","Dingbat dec":"35","Dingbat hex":"23","Unicode dec":"9985","Unicode hex":"2701"},{"Typeface name":"Wingdings","Dingbat dec":"36","Dingbat hex":"24","Unicode dec":"128083","Unicode hex":"1F453"},{"Typeface name":"Wingdings","Dingbat dec":"37","Dingbat hex":"25","Unicode dec":"128365","Unicode hex":"1F56D"},{"Typeface name":"Wingdings","Dingbat dec":"38","Dingbat hex":"26","Unicode dec":"128366","Unicode hex":"1F56E"},{"Typeface name":"Wingdings","Dingbat dec":"39","Dingbat hex":"27","Unicode dec":"128367","Unicode hex":"1F56F"},{"Typeface name":"Wingdings","Dingbat dec":"40","Dingbat hex":"28","Unicode dec":"128383","Unicode hex":"1F57F"},{"Typeface name":"Wingdings","Dingbat dec":"41","Dingbat hex":"29","Unicode dec":"9990","Unicode hex":"2706"},{"Typeface name":"Wingdings","Dingbat dec":"42","Dingbat hex":"2A","Unicode dec":"128386","Unicode hex":"1F582"},{"Typeface name":"Wingdings","Dingbat dec":"43","Dingbat hex":"2B","Unicode dec":"128387","Unicode hex":"1F583"},{"Typeface name":"Wingdings","Dingbat dec":"44","Dingbat hex":"2C","Unicode dec":"128234","Unicode hex":"1F4EA"},{"Typeface name":"Wingdings","Dingbat dec":"45","Dingbat hex":"2D","Unicode dec":"128235","Unicode hex":"1F4EB"},{"Typeface name":"Wingdings","Dingbat dec":"46","Dingbat hex":"2E","Unicode dec":"128236","Unicode hex":"1F4EC"},{"Typeface name":"Wingdings","Dingbat dec":"47","Dingbat hex":"2F","Unicode dec":"128237","Unicode hex":"1F4ED"},{"Typeface name":"Wingdings","Dingbat dec":"48","Dingbat hex":"30","Unicode dec":"128448","Unicode hex":"1F5C0"},{"Typeface name":"Wingdings","Dingbat dec":"49","Dingbat hex":"31","Unicode dec":"128449","Unicode hex":"1F5C1"},{"Typeface name":"Wingdings","Dingbat dec":"50","Dingbat hex":"32","Unicode dec":"128462","Unicode hex":"1F5CE"},{"Typeface name":"Wingdings","Dingbat dec":"51","Dingbat hex":"33","Unicode dec":"128463","Unicode hex":"1F5CF"},{"Typeface name":"Wingdings","Dingbat dec":"52","Dingbat hex":"34","Unicode dec":"128464","Unicode hex":"1F5D0"},{"Typeface name":"Wingdings","Dingbat dec":"53","Dingbat hex":"35","Unicode dec":"128452","Unicode hex":"1F5C4"},{"Typeface name":"Wingdings","Dingbat dec":"54","Dingbat hex":"36","Unicode dec":"8987","Unicode hex":"231B"},{"Typeface name":"Wingdings","Dingbat dec":"55","Dingbat hex":"37","Unicode dec":"128430","Unicode hex":"1F5AE"},{"Typeface name":"Wingdings","Dingbat dec":"56","Dingbat hex":"38","Unicode dec":"128432","Unicode hex":"1F5B0"},{"Typeface name":"Wingdings","Dingbat dec":"57","Dingbat hex":"39","Unicode dec":"128434","Unicode hex":"1F5B2"},{"Typeface name":"Wingdings","Dingbat dec":"58","Dingbat hex":"3A","Unicode dec":"128435","Unicode hex":"1F5B3"},{"Typeface name":"Wingdings","Dingbat dec":"59","Dingbat hex":"3B","Unicode dec":"128436","Unicode hex":"1F5B4"},{"Typeface name":"Wingdings","Dingbat dec":"60","Dingbat hex":"3C","Unicode dec":"128427","Unicode hex":"1F5AB"},{"Typeface name":"Wingdings","Dingbat dec":"61","Dingbat hex":"3D","Unicode dec":"128428","Unicode hex":"1F5AC"},{"Typeface name":"Wingdings","Dingbat dec":"62","Dingbat hex":"3E","Unicode dec":"9991","Unicode hex":"2707"},{"Typeface name":"Wingdings","Dingbat dec":"63","Dingbat hex":"3F","Unicode dec":"9997","Unicode hex":"270D"},{"Typeface name":"Wingdings","Dingbat dec":"64","Dingbat hex":"40","Unicode dec":"128398","Unicode hex":"1F58E"},{"Typeface name":"Wingdings","Dingbat dec":"65","Dingbat hex":"41","Unicode dec":"9996","Unicode hex":"270C"},{"Typeface name":"Wingdings","Dingbat dec":"66","Dingbat hex":"42","Unicode dec":"128399","Unicode hex":"1F58F"},{"Typeface name":"Wingdings","Dingbat dec":"67","Dingbat hex":"43","Unicode dec":"128077","Unicode hex":"1F44D"},{"Typeface name":"Wingdings","Dingbat dec":"68","Dingbat hex":"44","Unicode dec":"128078","Unicode hex":"1F44E"},{"Typeface name":"Wingdings","Dingbat dec":"69","Dingbat hex":"45","Unicode dec":"9756","Unicode hex":"261C"},{"Typeface name":"Wingdings","Dingbat dec":"70","Dingbat hex":"46","Unicode dec":"9758","Unicode hex":"261E"},{"Typeface name":"Wingdings","Dingbat dec":"71","Dingbat hex":"47","Unicode dec":"9757","Unicode hex":"261D"},{"Typeface name":"Wingdings","Dingbat dec":"72","Dingbat hex":"48","Unicode dec":"9759","Unicode hex":"261F"},{"Typeface name":"Wingdings","Dingbat dec":"73","Dingbat hex":"49","Unicode dec":"128400","Unicode hex":"1F590"},{"Typeface name":"Wingdings","Dingbat dec":"74","Dingbat hex":"4A","Unicode dec":"9786","Unicode hex":"263A"},{"Typeface name":"Wingdings","Dingbat dec":"75","Dingbat hex":"4B","Unicode dec":"128528","Unicode hex":"1F610"},{"Typeface name":"Wingdings","Dingbat dec":"76","Dingbat hex":"4C","Unicode dec":"9785","Unicode hex":"2639"},{"Typeface name":"Wingdings","Dingbat dec":"77","Dingbat hex":"4D","Unicode dec":"128163","Unicode hex":"1F4A3"},{"Typeface name":"Wingdings","Dingbat dec":"78","Dingbat hex":"4E","Unicode dec":"128369","Unicode hex":"1F571"},{"Typeface name":"Wingdings","Dingbat dec":"79","Dingbat hex":"4F","Unicode dec":"127987","Unicode hex":"1F3F3"},{"Typeface name":"Wingdings","Dingbat dec":"80","Dingbat hex":"50","Unicode dec":"127985","Unicode hex":"1F3F1"},{"Typeface name":"Wingdings","Dingbat dec":"81","Dingbat hex":"51","Unicode dec":"9992","Unicode hex":"2708"},{"Typeface name":"Wingdings","Dingbat dec":"82","Dingbat hex":"52","Unicode dec":"9788","Unicode hex":"263C"},{"Typeface name":"Wingdings","Dingbat dec":"83","Dingbat hex":"53","Unicode dec":"127778","Unicode hex":"1F322"},{"Typeface name":"Wingdings","Dingbat dec":"84","Dingbat hex":"54","Unicode dec":"10052","Unicode hex":"2744"},{"Typeface name":"Wingdings","Dingbat dec":"85","Dingbat hex":"55","Unicode dec":"128326","Unicode hex":"1F546"},{"Typeface name":"Wingdings","Dingbat dec":"86","Dingbat hex":"56","Unicode dec":"10014","Unicode hex":"271E"},{"Typeface name":"Wingdings","Dingbat dec":"87","Dingbat hex":"57","Unicode dec":"128328","Unicode hex":"1F548"},{"Typeface name":"Wingdings","Dingbat dec":"88","Dingbat hex":"58","Unicode dec":"10016","Unicode hex":"2720"},{"Typeface name":"Wingdings","Dingbat dec":"89","Dingbat hex":"59","Unicode dec":"10017","Unicode hex":"2721"},{"Typeface name":"Wingdings","Dingbat dec":"90","Dingbat hex":"5A","Unicode dec":"9770","Unicode hex":"262A"},{"Typeface name":"Wingdings","Dingbat dec":"91","Dingbat hex":"5B","Unicode dec":"9775","Unicode hex":"262F"},{"Typeface name":"Wingdings","Dingbat dec":"92","Dingbat hex":"5C","Unicode dec":"128329","Unicode hex":"1F549"},{"Typeface name":"Wingdings","Dingbat dec":"93","Dingbat hex":"5D","Unicode dec":"9784","Unicode hex":"2638"},{"Typeface name":"Wingdings","Dingbat dec":"94","Dingbat hex":"5E","Unicode dec":"9800","Unicode hex":"2648"},{"Typeface name":"Wingdings","Dingbat dec":"95","Dingbat hex":"5F","Unicode dec":"9801","Unicode hex":"2649"},{"Typeface name":"Wingdings","Dingbat dec":"96","Dingbat hex":"60","Unicode dec":"9802","Unicode hex":"264A"},{"Typeface name":"Wingdings","Dingbat dec":"97","Dingbat hex":"61","Unicode dec":"9803","Unicode hex":"264B"},{"Typeface name":"Wingdings","Dingbat dec":"98","Dingbat hex":"62","Unicode dec":"9804","Unicode hex":"264C"},{"Typeface name":"Wingdings","Dingbat dec":"99","Dingbat hex":"63","Unicode dec":"9805","Unicode hex":"264D"},{"Typeface name":"Wingdings","Dingbat dec":"100","Dingbat hex":"64","Unicode dec":"9806","Unicode hex":"264E"},{"Typeface name":"Wingdings","Dingbat dec":"101","Dingbat hex":"65","Unicode dec":"9807","Unicode hex":"264F"},{"Typeface name":"Wingdings","Dingbat dec":"102","Dingbat hex":"66","Unicode dec":"9808","Unicode hex":"2650"},{"Typeface name":"Wingdings","Dingbat dec":"103","Dingbat hex":"67","Unicode dec":"9809","Unicode hex":"2651"},{"Typeface name":"Wingdings","Dingbat dec":"104","Dingbat hex":"68","Unicode dec":"9810","Unicode hex":"2652"},{"Typeface name":"Wingdings","Dingbat dec":"105","Dingbat hex":"69","Unicode dec":"9811","Unicode hex":"2653"},{"Typeface name":"Wingdings","Dingbat dec":"106","Dingbat hex":"6A","Unicode dec":"128624","Unicode hex":"1F670"},{"Typeface name":"Wingdings","Dingbat dec":"107","Dingbat hex":"6B","Unicode dec":"128629","Unicode hex":"1F675"},{"Typeface name":"Wingdings","Dingbat dec":"108","Dingbat hex":"6C","Unicode dec":"9899","Unicode hex":"26AB"},{"Typeface name":"Wingdings","Dingbat dec":"109","Dingbat hex":"6D","Unicode dec":"128318","Unicode hex":"1F53E"},{"Typeface name":"Wingdings","Dingbat dec":"110","Dingbat hex":"6E","Unicode dec":"9724","Unicode hex":"25FC"},{"Typeface name":"Wingdings","Dingbat dec":"111","Dingbat hex":"6F","Unicode dec":"128911","Unicode hex":"1F78F"},{"Typeface name":"Wingdings","Dingbat dec":"112","Dingbat hex":"70","Unicode dec":"128912","Unicode hex":"1F790"},{"Typeface name":"Wingdings","Dingbat dec":"113","Dingbat hex":"71","Unicode dec":"10065","Unicode hex":"2751"},{"Typeface name":"Wingdings","Dingbat dec":"114","Dingbat hex":"72","Unicode dec":"10066","Unicode hex":"2752"},{"Typeface name":"Wingdings","Dingbat dec":"115","Dingbat hex":"73","Unicode dec":"128927","Unicode hex":"1F79F"},{"Typeface name":"Wingdings","Dingbat dec":"116","Dingbat hex":"74","Unicode dec":"10731","Unicode hex":"29EB"},{"Typeface name":"Wingdings","Dingbat dec":"117","Dingbat hex":"75","Unicode dec":"9670","Unicode hex":"25C6"},{"Typeface name":"Wingdings","Dingbat dec":"118","Dingbat hex":"76","Unicode dec":"10070","Unicode hex":"2756"},{"Typeface name":"Wingdings","Dingbat dec":"119","Dingbat hex":"77","Unicode dec":"11049","Unicode hex":"2B29"},{"Typeface name":"Wingdings","Dingbat dec":"120","Dingbat hex":"78","Unicode dec":"8999","Unicode hex":"2327"},{"Typeface name":"Wingdings","Dingbat dec":"121","Dingbat hex":"79","Unicode dec":"11193","Unicode hex":"2BB9"},{"Typeface name":"Wingdings","Dingbat dec":"122","Dingbat hex":"7A","Unicode dec":"8984","Unicode hex":"2318"},{"Typeface name":"Wingdings","Dingbat dec":"123","Dingbat hex":"7B","Unicode dec":"127989","Unicode hex":"1F3F5"},{"Typeface name":"Wingdings","Dingbat dec":"124","Dingbat hex":"7C","Unicode dec":"127990","Unicode hex":"1F3F6"},{"Typeface name":"Wingdings","Dingbat dec":"125","Dingbat hex":"7D","Unicode dec":"128630","Unicode hex":"1F676"},{"Typeface name":"Wingdings","Dingbat dec":"126","Dingbat hex":"7E","Unicode dec":"128631","Unicode hex":"1F677"},{"Typeface name":"Wingdings","Dingbat dec":"127","Dingbat hex":"7F","Unicode dec":"9647","Unicode hex":"25AF"},{"Typeface name":"Wingdings","Dingbat dec":"128","Dingbat hex":"80","Unicode dec":"127243","Unicode hex":"1F10B"},{"Typeface name":"Wingdings","Dingbat dec":"129","Dingbat hex":"81","Unicode dec":"10112","Unicode hex":"2780"},{"Typeface name":"Wingdings","Dingbat dec":"130","Dingbat hex":"82","Unicode dec":"10113","Unicode hex":"2781"},{"Typeface name":"Wingdings","Dingbat dec":"131","Dingbat hex":"83","Unicode dec":"10114","Unicode hex":"2782"},{"Typeface name":"Wingdings","Dingbat dec":"132","Dingbat hex":"84","Unicode dec":"10115","Unicode hex":"2783"},{"Typeface name":"Wingdings","Dingbat dec":"133","Dingbat hex":"85","Unicode dec":"10116","Unicode hex":"2784"},{"Typeface name":"Wingdings","Dingbat dec":"134","Dingbat hex":"86","Unicode dec":"10117","Unicode hex":"2785"},{"Typeface name":"Wingdings","Dingbat dec":"135","Dingbat hex":"87","Unicode dec":"10118","Unicode hex":"2786"},{"Typeface name":"Wingdings","Dingbat dec":"136","Dingbat hex":"88","Unicode dec":"10119","Unicode hex":"2787"},{"Typeface name":"Wingdings","Dingbat dec":"137","Dingbat hex":"89","Unicode dec":"10120","Unicode hex":"2788"},{"Typeface name":"Wingdings","Dingbat dec":"138","Dingbat hex":"8A","Unicode dec":"10121","Unicode hex":"2789"},{"Typeface name":"Wingdings","Dingbat dec":"139","Dingbat hex":"8B","Unicode dec":"127244","Unicode hex":"1F10C"},{"Typeface name":"Wingdings","Dingbat dec":"140","Dingbat hex":"8C","Unicode dec":"10122","Unicode hex":"278A"},{"Typeface name":"Wingdings","Dingbat dec":"141","Dingbat hex":"8D","Unicode dec":"10123","Unicode hex":"278B"},{"Typeface name":"Wingdings","Dingbat dec":"142","Dingbat hex":"8E","Unicode dec":"10124","Unicode hex":"278C"},{"Typeface name":"Wingdings","Dingbat dec":"143","Dingbat hex":"8F","Unicode dec":"10125","Unicode hex":"278D"},{"Typeface name":"Wingdings","Dingbat dec":"144","Dingbat hex":"90","Unicode dec":"10126","Unicode hex":"278E"},{"Typeface name":"Wingdings","Dingbat dec":"145","Dingbat hex":"91","Unicode dec":"10127","Unicode hex":"278F"},{"Typeface name":"Wingdings","Dingbat dec":"146","Dingbat hex":"92","Unicode dec":"10128","Unicode hex":"2790"},{"Typeface name":"Wingdings","Dingbat dec":"147","Dingbat hex":"93","Unicode dec":"10129","Unicode hex":"2791"},{"Typeface name":"Wingdings","Dingbat dec":"148","Dingbat hex":"94","Unicode dec":"10130","Unicode hex":"2792"},{"Typeface name":"Wingdings","Dingbat dec":"149","Dingbat hex":"95","Unicode dec":"10131","Unicode hex":"2793"},{"Typeface name":"Wingdings","Dingbat dec":"150","Dingbat hex":"96","Unicode dec":"128610","Unicode hex":"1F662"},{"Typeface name":"Wingdings","Dingbat dec":"151","Dingbat hex":"97","Unicode dec":"128608","Unicode hex":"1F660"},{"Typeface name":"Wingdings","Dingbat dec":"152","Dingbat hex":"98","Unicode dec":"128609","Unicode hex":"1F661"},{"Typeface name":"Wingdings","Dingbat dec":"153","Dingbat hex":"99","Unicode dec":"128611","Unicode hex":"1F663"},{"Typeface name":"Wingdings","Dingbat dec":"154","Dingbat hex":"9A","Unicode dec":"128606","Unicode hex":"1F65E"},{"Typeface name":"Wingdings","Dingbat dec":"155","Dingbat hex":"9B","Unicode dec":"128604","Unicode hex":"1F65C"},{"Typeface name":"Wingdings","Dingbat dec":"156","Dingbat hex":"9C","Unicode dec":"128605","Unicode hex":"1F65D"},{"Typeface name":"Wingdings","Dingbat dec":"157","Dingbat hex":"9D","Unicode dec":"128607","Unicode hex":"1F65F"},{"Typeface name":"Wingdings","Dingbat dec":"158","Dingbat hex":"9E","Unicode dec":"8729","Unicode hex":"2219"},{"Typeface name":"Wingdings","Dingbat dec":"159","Dingbat hex":"9F","Unicode dec":"8226","Unicode hex":"2022"},{"Typeface name":"Wingdings","Dingbat dec":"160","Dingbat hex":"A0","Unicode dec":"11037","Unicode hex":"2B1D"},{"Typeface name":"Wingdings","Dingbat dec":"161","Dingbat hex":"A1","Unicode dec":"11096","Unicode hex":"2B58"},{"Typeface name":"Wingdings","Dingbat dec":"162","Dingbat hex":"A2","Unicode dec":"128902","Unicode hex":"1F786"},{"Typeface name":"Wingdings","Dingbat dec":"163","Dingbat hex":"A3","Unicode dec":"128904","Unicode hex":"1F788"},{"Typeface name":"Wingdings","Dingbat dec":"164","Dingbat hex":"A4","Unicode dec":"128906","Unicode hex":"1F78A"},{"Typeface name":"Wingdings","Dingbat dec":"165","Dingbat hex":"A5","Unicode dec":"128907","Unicode hex":"1F78B"},{"Typeface name":"Wingdings","Dingbat dec":"166","Dingbat hex":"A6","Unicode dec":"128319","Unicode hex":"1F53F"},{"Typeface name":"Wingdings","Dingbat dec":"167","Dingbat hex":"A7","Unicode dec":"9642","Unicode hex":"25AA"},{"Typeface name":"Wingdings","Dingbat dec":"168","Dingbat hex":"A8","Unicode dec":"128910","Unicode hex":"1F78E"},{"Typeface name":"Wingdings","Dingbat dec":"169","Dingbat hex":"A9","Unicode dec":"128961","Unicode hex":"1F7C1"},{"Typeface name":"Wingdings","Dingbat dec":"170","Dingbat hex":"AA","Unicode dec":"128965","Unicode hex":"1F7C5"},{"Typeface name":"Wingdings","Dingbat dec":"171","Dingbat hex":"AB","Unicode dec":"9733","Unicode hex":"2605"},{"Typeface name":"Wingdings","Dingbat dec":"172","Dingbat hex":"AC","Unicode dec":"128971","Unicode hex":"1F7CB"},{"Typeface name":"Wingdings","Dingbat dec":"173","Dingbat hex":"AD","Unicode dec":"128975","Unicode hex":"1F7CF"},{"Typeface name":"Wingdings","Dingbat dec":"174","Dingbat hex":"AE","Unicode dec":"128979","Unicode hex":"1F7D3"},{"Typeface name":"Wingdings","Dingbat dec":"175","Dingbat hex":"AF","Unicode dec":"128977","Unicode hex":"1F7D1"},{"Typeface name":"Wingdings","Dingbat dec":"176","Dingbat hex":"B0","Unicode dec":"11216","Unicode hex":"2BD0"},{"Typeface name":"Wingdings","Dingbat dec":"177","Dingbat hex":"B1","Unicode dec":"8982","Unicode hex":"2316"},{"Typeface name":"Wingdings","Dingbat dec":"178","Dingbat hex":"B2","Unicode dec":"11214","Unicode hex":"2BCE"},{"Typeface name":"Wingdings","Dingbat dec":"179","Dingbat hex":"B3","Unicode dec":"11215","Unicode hex":"2BCF"},{"Typeface name":"Wingdings","Dingbat dec":"180","Dingbat hex":"B4","Unicode dec":"11217","Unicode hex":"2BD1"},{"Typeface name":"Wingdings","Dingbat dec":"181","Dingbat hex":"B5","Unicode dec":"10026","Unicode hex":"272A"},{"Typeface name":"Wingdings","Dingbat dec":"182","Dingbat hex":"B6","Unicode dec":"10032","Unicode hex":"2730"},{"Typeface name":"Wingdings","Dingbat dec":"183","Dingbat hex":"B7","Unicode dec":"128336","Unicode hex":"1F550"},{"Typeface name":"Wingdings","Dingbat dec":"184","Dingbat hex":"B8","Unicode dec":"128337","Unicode hex":"1F551"},{"Typeface name":"Wingdings","Dingbat dec":"185","Dingbat hex":"B9","Unicode dec":"128338","Unicode hex":"1F552"},{"Typeface name":"Wingdings","Dingbat dec":"186","Dingbat hex":"BA","Unicode dec":"128339","Unicode hex":"1F553"},{"Typeface name":"Wingdings","Dingbat dec":"187","Dingbat hex":"BB","Unicode dec":"128340","Unicode hex":"1F554"},{"Typeface name":"Wingdings","Dingbat dec":"188","Dingbat hex":"BC","Unicode dec":"128341","Unicode hex":"1F555"},{"Typeface name":"Wingdings","Dingbat dec":"189","Dingbat hex":"BD","Unicode dec":"128342","Unicode hex":"1F556"},{"Typeface name":"Wingdings","Dingbat dec":"190","Dingbat hex":"BE","Unicode dec":"128343","Unicode hex":"1F557"},{"Typeface name":"Wingdings","Dingbat dec":"191","Dingbat hex":"BF","Unicode dec":"128344","Unicode hex":"1F558"},{"Typeface name":"Wingdings","Dingbat dec":"192","Dingbat hex":"C0","Unicode dec":"128345","Unicode hex":"1F559"},{"Typeface name":"Wingdings","Dingbat dec":"193","Dingbat hex":"C1","Unicode dec":"128346","Unicode hex":"1F55A"},{"Typeface name":"Wingdings","Dingbat dec":"194","Dingbat hex":"C2","Unicode dec":"128347","Unicode hex":"1F55B"},{"Typeface name":"Wingdings","Dingbat dec":"195","Dingbat hex":"C3","Unicode dec":"11184","Unicode hex":"2BB0"},{"Typeface name":"Wingdings","Dingbat dec":"196","Dingbat hex":"C4","Unicode dec":"11185","Unicode hex":"2BB1"},{"Typeface name":"Wingdings","Dingbat dec":"197","Dingbat hex":"C5","Unicode dec":"11186","Unicode hex":"2BB2"},{"Typeface name":"Wingdings","Dingbat dec":"198","Dingbat hex":"C6","Unicode dec":"11187","Unicode hex":"2BB3"},{"Typeface name":"Wingdings","Dingbat dec":"199","Dingbat hex":"C7","Unicode dec":"11188","Unicode hex":"2BB4"},{"Typeface name":"Wingdings","Dingbat dec":"200","Dingbat hex":"C8","Unicode dec":"11189","Unicode hex":"2BB5"},{"Typeface name":"Wingdings","Dingbat dec":"201","Dingbat hex":"C9","Unicode dec":"11190","Unicode hex":"2BB6"},{"Typeface name":"Wingdings","Dingbat dec":"202","Dingbat hex":"CA","Unicode dec":"11191","Unicode hex":"2BB7"},{"Typeface name":"Wingdings","Dingbat dec":"203","Dingbat hex":"CB","Unicode dec":"128618","Unicode hex":"1F66A"},{"Typeface name":"Wingdings","Dingbat dec":"204","Dingbat hex":"CC","Unicode dec":"128619","Unicode hex":"1F66B"},{"Typeface name":"Wingdings","Dingbat dec":"205","Dingbat hex":"CD","Unicode dec":"128597","Unicode hex":"1F655"},{"Typeface name":"Wingdings","Dingbat dec":"206","Dingbat hex":"CE","Unicode dec":"128596","Unicode hex":"1F654"},{"Typeface name":"Wingdings","Dingbat dec":"207","Dingbat hex":"CF","Unicode dec":"128599","Unicode hex":"1F657"},{"Typeface name":"Wingdings","Dingbat dec":"208","Dingbat hex":"D0","Unicode dec":"128598","Unicode hex":"1F656"},{"Typeface name":"Wingdings","Dingbat dec":"209","Dingbat hex":"D1","Unicode dec":"128592","Unicode hex":"1F650"},{"Typeface name":"Wingdings","Dingbat dec":"210","Dingbat hex":"D2","Unicode dec":"128593","Unicode hex":"1F651"},{"Typeface name":"Wingdings","Dingbat dec":"211","Dingbat hex":"D3","Unicode dec":"128594","Unicode hex":"1F652"},{"Typeface name":"Wingdings","Dingbat dec":"212","Dingbat hex":"D4","Unicode dec":"128595","Unicode hex":"1F653"},{"Typeface name":"Wingdings","Dingbat dec":"213","Dingbat hex":"D5","Unicode dec":"9003","Unicode hex":"232B"},{"Typeface name":"Wingdings","Dingbat dec":"214","Dingbat hex":"D6","Unicode dec":"8998","Unicode hex":"2326"},{"Typeface name":"Wingdings","Dingbat dec":"215","Dingbat hex":"D7","Unicode dec":"11160","Unicode hex":"2B98"},{"Typeface name":"Wingdings","Dingbat dec":"216","Dingbat hex":"D8","Unicode dec":"11162","Unicode hex":"2B9A"},{"Typeface name":"Wingdings","Dingbat dec":"217","Dingbat hex":"D9","Unicode dec":"11161","Unicode hex":"2B99"},{"Typeface name":"Wingdings","Dingbat dec":"218","Dingbat hex":"DA","Unicode dec":"11163","Unicode hex":"2B9B"},{"Typeface name":"Wingdings","Dingbat dec":"219","Dingbat hex":"DB","Unicode dec":"11144","Unicode hex":"2B88"},{"Typeface name":"Wingdings","Dingbat dec":"220","Dingbat hex":"DC","Unicode dec":"11146","Unicode hex":"2B8A"},{"Typeface name":"Wingdings","Dingbat dec":"221","Dingbat hex":"DD","Unicode dec":"11145","Unicode hex":"2B89"},{"Typeface name":"Wingdings","Dingbat dec":"222","Dingbat hex":"DE","Unicode dec":"11147","Unicode hex":"2B8B"},{"Typeface name":"Wingdings","Dingbat dec":"223","Dingbat hex":"DF","Unicode dec":"129128","Unicode hex":"1F868"},{"Typeface name":"Wingdings","Dingbat dec":"224","Dingbat hex":"E0","Unicode dec":"129130","Unicode hex":"1F86A"},{"Typeface name":"Wingdings","Dingbat dec":"225","Dingbat hex":"E1","Unicode dec":"129129","Unicode hex":"1F869"},{"Typeface name":"Wingdings","Dingbat dec":"226","Dingbat hex":"E2","Unicode dec":"129131","Unicode hex":"1F86B"},{"Typeface name":"Wingdings","Dingbat dec":"227","Dingbat hex":"E3","Unicode dec":"129132","Unicode hex":"1F86C"},{"Typeface name":"Wingdings","Dingbat dec":"228","Dingbat hex":"E4","Unicode dec":"129133","Unicode hex":"1F86D"},{"Typeface name":"Wingdings","Dingbat dec":"229","Dingbat hex":"E5","Unicode dec":"129135","Unicode hex":"1F86F"},{"Typeface name":"Wingdings","Dingbat dec":"230","Dingbat hex":"E6","Unicode dec":"129134","Unicode hex":"1F86E"},{"Typeface name":"Wingdings","Dingbat dec":"231","Dingbat hex":"E7","Unicode dec":"129144","Unicode hex":"1F878"},{"Typeface name":"Wingdings","Dingbat dec":"232","Dingbat hex":"E8","Unicode dec":"129146","Unicode hex":"1F87A"},{"Typeface name":"Wingdings","Dingbat dec":"233","Dingbat hex":"E9","Unicode dec":"129145","Unicode hex":"1F879"},{"Typeface name":"Wingdings","Dingbat dec":"234","Dingbat hex":"EA","Unicode dec":"129147","Unicode hex":"1F87B"},{"Typeface name":"Wingdings","Dingbat dec":"235","Dingbat hex":"EB","Unicode dec":"129148","Unicode hex":"1F87C"},{"Typeface name":"Wingdings","Dingbat dec":"236","Dingbat hex":"EC","Unicode dec":"129149","Unicode hex":"1F87D"},{"Typeface name":"Wingdings","Dingbat dec":"237","Dingbat hex":"ED","Unicode dec":"129151","Unicode hex":"1F87F"},{"Typeface name":"Wingdings","Dingbat dec":"238","Dingbat hex":"EE","Unicode dec":"129150","Unicode hex":"1F87E"},{"Typeface name":"Wingdings","Dingbat dec":"239","Dingbat hex":"EF","Unicode dec":"8678","Unicode hex":"21E6"},{"Typeface name":"Wingdings","Dingbat dec":"240","Dingbat hex":"F0","Unicode dec":"8680","Unicode hex":"21E8"},{"Typeface name":"Wingdings","Dingbat dec":"241","Dingbat hex":"F1","Unicode dec":"8679","Unicode hex":"21E7"},{"Typeface name":"Wingdings","Dingbat dec":"242","Dingbat hex":"F2","Unicode dec":"8681","Unicode hex":"21E9"},{"Typeface name":"Wingdings","Dingbat dec":"243","Dingbat hex":"F3","Unicode dec":"11012","Unicode hex":"2B04"},{"Typeface name":"Wingdings","Dingbat dec":"244","Dingbat hex":"F4","Unicode dec":"8691","Unicode hex":"21F3"},{"Typeface name":"Wingdings","Dingbat dec":"245","Dingbat hex":"F5","Unicode dec":"11009","Unicode hex":"2B01"},{"Typeface name":"Wingdings","Dingbat dec":"246","Dingbat hex":"F6","Unicode dec":"11008","Unicode hex":"2B00"},{"Typeface name":"Wingdings","Dingbat dec":"247","Dingbat hex":"F7","Unicode dec":"11011","Unicode hex":"2B03"},{"Typeface name":"Wingdings","Dingbat dec":"248","Dingbat hex":"F8","Unicode dec":"11010","Unicode hex":"2B02"},{"Typeface name":"Wingdings","Dingbat dec":"249","Dingbat hex":"F9","Unicode dec":"129196","Unicode hex":"1F8AC"},{"Typeface name":"Wingdings","Dingbat dec":"250","Dingbat hex":"FA","Unicode dec":"129197","Unicode hex":"1F8AD"},{"Typeface name":"Wingdings","Dingbat dec":"251","Dingbat hex":"FB","Unicode dec":"128502","Unicode hex":"1F5F6"},{"Typeface name":"Wingdings","Dingbat dec":"252","Dingbat hex":"FC","Unicode dec":"10003","Unicode hex":"2713"},{"Typeface name":"Wingdings","Dingbat dec":"253","Dingbat hex":"FD","Unicode dec":"128503","Unicode hex":"1F5F7"},{"Typeface name":"Wingdings","Dingbat dec":"254","Dingbat hex":"FE","Unicode dec":"128505","Unicode hex":"1F5F9"},{"Typeface name":"Wingdings 2","Dingbat dec":"32","Dingbat hex":"20","Unicode dec":"32","Unicode hex":"20"},{"Typeface name":"Wingdings 2","Dingbat dec":"33","Dingbat hex":"21","Unicode dec":"128394","Unicode hex":"1F58A"},{"Typeface name":"Wingdings 2","Dingbat dec":"34","Dingbat hex":"22","Unicode dec":"128395","Unicode hex":"1F58B"},{"Typeface name":"Wingdings 2","Dingbat dec":"35","Dingbat hex":"23","Unicode dec":"128396","Unicode hex":"1F58C"},{"Typeface name":"Wingdings 2","Dingbat dec":"36","Dingbat hex":"24","Unicode dec":"128397","Unicode hex":"1F58D"},{"Typeface name":"Wingdings 2","Dingbat dec":"37","Dingbat hex":"25","Unicode dec":"9988","Unicode hex":"2704"},{"Typeface name":"Wingdings 2","Dingbat dec":"38","Dingbat hex":"26","Unicode dec":"9984","Unicode hex":"2700"},{"Typeface name":"Wingdings 2","Dingbat dec":"39","Dingbat hex":"27","Unicode dec":"128382","Unicode hex":"1F57E"},{"Typeface name":"Wingdings 2","Dingbat dec":"40","Dingbat hex":"28","Unicode dec":"128381","Unicode hex":"1F57D"},{"Typeface name":"Wingdings 2","Dingbat dec":"41","Dingbat hex":"29","Unicode dec":"128453","Unicode hex":"1F5C5"},{"Typeface name":"Wingdings 2","Dingbat dec":"42","Dingbat hex":"2A","Unicode dec":"128454","Unicode hex":"1F5C6"},{"Typeface name":"Wingdings 2","Dingbat dec":"43","Dingbat hex":"2B","Unicode dec":"128455","Unicode hex":"1F5C7"},{"Typeface name":"Wingdings 2","Dingbat dec":"44","Dingbat hex":"2C","Unicode dec":"128456","Unicode hex":"1F5C8"},{"Typeface name":"Wingdings 2","Dingbat dec":"45","Dingbat hex":"2D","Unicode dec":"128457","Unicode hex":"1F5C9"},{"Typeface name":"Wingdings 2","Dingbat dec":"46","Dingbat hex":"2E","Unicode dec":"128458","Unicode hex":"1F5CA"},{"Typeface name":"Wingdings 2","Dingbat dec":"47","Dingbat hex":"2F","Unicode dec":"128459","Unicode hex":"1F5CB"},{"Typeface name":"Wingdings 2","Dingbat dec":"48","Dingbat hex":"30","Unicode dec":"128460","Unicode hex":"1F5CC"},{"Typeface name":"Wingdings 2","Dingbat dec":"49","Dingbat hex":"31","Unicode dec":"128461","Unicode hex":"1F5CD"},{"Typeface name":"Wingdings 2","Dingbat dec":"50","Dingbat hex":"32","Unicode dec":"128203","Unicode hex":"1F4CB"},{"Typeface name":"Wingdings 2","Dingbat dec":"51","Dingbat hex":"33","Unicode dec":"128465","Unicode hex":"1F5D1"},{"Typeface name":"Wingdings 2","Dingbat dec":"52","Dingbat hex":"34","Unicode dec":"128468","Unicode hex":"1F5D4"},{"Typeface name":"Wingdings 2","Dingbat dec":"53","Dingbat hex":"35","Unicode dec":"128437","Unicode hex":"1F5B5"},{"Typeface name":"Wingdings 2","Dingbat dec":"54","Dingbat hex":"36","Unicode dec":"128438","Unicode hex":"1F5B6"},{"Typeface name":"Wingdings 2","Dingbat dec":"55","Dingbat hex":"37","Unicode dec":"128439","Unicode hex":"1F5B7"},{"Typeface name":"Wingdings 2","Dingbat dec":"56","Dingbat hex":"38","Unicode dec":"128440","Unicode hex":"1F5B8"},{"Typeface name":"Wingdings 2","Dingbat dec":"57","Dingbat hex":"39","Unicode dec":"128429","Unicode hex":"1F5AD"},{"Typeface name":"Wingdings 2","Dingbat dec":"58","Dingbat hex":"3A","Unicode dec":"128431","Unicode hex":"1F5AF"},{"Typeface name":"Wingdings 2","Dingbat dec":"59","Dingbat hex":"3B","Unicode dec":"128433","Unicode hex":"1F5B1"},{"Typeface name":"Wingdings 2","Dingbat dec":"60","Dingbat hex":"3C","Unicode dec":"128402","Unicode hex":"1F592"},{"Typeface name":"Wingdings 2","Dingbat dec":"61","Dingbat hex":"3D","Unicode dec":"128403","Unicode hex":"1F593"},{"Typeface name":"Wingdings 2","Dingbat dec":"62","Dingbat hex":"3E","Unicode dec":"128408","Unicode hex":"1F598"},{"Typeface name":"Wingdings 2","Dingbat dec":"63","Dingbat hex":"3F","Unicode dec":"128409","Unicode hex":"1F599"},{"Typeface name":"Wingdings 2","Dingbat dec":"64","Dingbat hex":"40","Unicode dec":"128410","Unicode hex":"1F59A"},{"Typeface name":"Wingdings 2","Dingbat dec":"65","Dingbat hex":"41","Unicode dec":"128411","Unicode hex":"1F59B"},{"Typeface name":"Wingdings 2","Dingbat dec":"66","Dingbat hex":"42","Unicode dec":"128072","Unicode hex":"1F448"},{"Typeface name":"Wingdings 2","Dingbat dec":"67","Dingbat hex":"43","Unicode dec":"128073","Unicode hex":"1F449"},{"Typeface name":"Wingdings 2","Dingbat dec":"68","Dingbat hex":"44","Unicode dec":"128412","Unicode hex":"1F59C"},{"Typeface name":"Wingdings 2","Dingbat dec":"69","Dingbat hex":"45","Unicode dec":"128413","Unicode hex":"1F59D"},{"Typeface name":"Wingdings 2","Dingbat dec":"70","Dingbat hex":"46","Unicode dec":"128414","Unicode hex":"1F59E"},{"Typeface name":"Wingdings 2","Dingbat dec":"71","Dingbat hex":"47","Unicode dec":"128415","Unicode hex":"1F59F"},{"Typeface name":"Wingdings 2","Dingbat dec":"72","Dingbat hex":"48","Unicode dec":"128416","Unicode hex":"1F5A0"},{"Typeface name":"Wingdings 2","Dingbat dec":"73","Dingbat hex":"49","Unicode dec":"128417","Unicode hex":"1F5A1"},{"Typeface name":"Wingdings 2","Dingbat dec":"74","Dingbat hex":"4A","Unicode dec":"128070","Unicode hex":"1F446"},{"Typeface name":"Wingdings 2","Dingbat dec":"75","Dingbat hex":"4B","Unicode dec":"128071","Unicode hex":"1F447"},{"Typeface name":"Wingdings 2","Dingbat dec":"76","Dingbat hex":"4C","Unicode dec":"128418","Unicode hex":"1F5A2"},{"Typeface name":"Wingdings 2","Dingbat dec":"77","Dingbat hex":"4D","Unicode dec":"128419","Unicode hex":"1F5A3"},{"Typeface name":"Wingdings 2","Dingbat dec":"78","Dingbat hex":"4E","Unicode dec":"128401","Unicode hex":"1F591"},{"Typeface name":"Wingdings 2","Dingbat dec":"79","Dingbat hex":"4F","Unicode dec":"128500","Unicode hex":"1F5F4"},{"Typeface name":"Wingdings 2","Dingbat dec":"80","Dingbat hex":"50","Unicode dec":"128504","Unicode hex":"1F5F8"},{"Typeface name":"Wingdings 2","Dingbat dec":"81","Dingbat hex":"51","Unicode dec":"128501","Unicode hex":"1F5F5"},{"Typeface name":"Wingdings 2","Dingbat dec":"82","Dingbat hex":"52","Unicode dec":"9745","Unicode hex":"2611"},{"Typeface name":"Wingdings 2","Dingbat dec":"83","Dingbat hex":"53","Unicode dec":"11197","Unicode hex":"2BBD"},{"Typeface name":"Wingdings 2","Dingbat dec":"84","Dingbat hex":"54","Unicode dec":"9746","Unicode hex":"2612"},{"Typeface name":"Wingdings 2","Dingbat dec":"85","Dingbat hex":"55","Unicode dec":"11198","Unicode hex":"2BBE"},{"Typeface name":"Wingdings 2","Dingbat dec":"86","Dingbat hex":"56","Unicode dec":"11199","Unicode hex":"2BBF"},{"Typeface name":"Wingdings 2","Dingbat dec":"87","Dingbat hex":"57","Unicode dec":"128711","Unicode hex":"1F6C7"},{"Typeface name":"Wingdings 2","Dingbat dec":"88","Dingbat hex":"58","Unicode dec":"10680","Unicode hex":"29B8"},{"Typeface name":"Wingdings 2","Dingbat dec":"89","Dingbat hex":"59","Unicode dec":"128625","Unicode hex":"1F671"},{"Typeface name":"Wingdings 2","Dingbat dec":"90","Dingbat hex":"5A","Unicode dec":"128628","Unicode hex":"1F674"},{"Typeface name":"Wingdings 2","Dingbat dec":"91","Dingbat hex":"5B","Unicode dec":"128626","Unicode hex":"1F672"},{"Typeface name":"Wingdings 2","Dingbat dec":"92","Dingbat hex":"5C","Unicode dec":"128627","Unicode hex":"1F673"},{"Typeface name":"Wingdings 2","Dingbat dec":"93","Dingbat hex":"5D","Unicode dec":"8253","Unicode hex":"203D"},{"Typeface name":"Wingdings 2","Dingbat dec":"94","Dingbat hex":"5E","Unicode dec":"128633","Unicode hex":"1F679"},{"Typeface name":"Wingdings 2","Dingbat dec":"95","Dingbat hex":"5F","Unicode dec":"128634","Unicode hex":"1F67A"},{"Typeface name":"Wingdings 2","Dingbat dec":"96","Dingbat hex":"60","Unicode dec":"128635","Unicode hex":"1F67B"},{"Typeface name":"Wingdings 2","Dingbat dec":"97","Dingbat hex":"61","Unicode dec":"128614","Unicode hex":"1F666"},{"Typeface name":"Wingdings 2","Dingbat dec":"98","Dingbat hex":"62","Unicode dec":"128612","Unicode hex":"1F664"},{"Typeface name":"Wingdings 2","Dingbat dec":"99","Dingbat hex":"63","Unicode dec":"128613","Unicode hex":"1F665"},{"Typeface name":"Wingdings 2","Dingbat dec":"100","Dingbat hex":"64","Unicode dec":"128615","Unicode hex":"1F667"},{"Typeface name":"Wingdings 2","Dingbat dec":"101","Dingbat hex":"65","Unicode dec":"128602","Unicode hex":"1F65A"},{"Typeface name":"Wingdings 2","Dingbat dec":"102","Dingbat hex":"66","Unicode dec":"128600","Unicode hex":"1F658"},{"Typeface name":"Wingdings 2","Dingbat dec":"103","Dingbat hex":"67","Unicode dec":"128601","Unicode hex":"1F659"},{"Typeface name":"Wingdings 2","Dingbat dec":"104","Dingbat hex":"68","Unicode dec":"128603","Unicode hex":"1F65B"},{"Typeface name":"Wingdings 2","Dingbat dec":"105","Dingbat hex":"69","Unicode dec":"9450","Unicode hex":"24EA"},{"Typeface name":"Wingdings 2","Dingbat dec":"106","Dingbat hex":"6A","Unicode dec":"9312","Unicode hex":"2460"},{"Typeface name":"Wingdings 2","Dingbat dec":"107","Dingbat hex":"6B","Unicode dec":"9313","Unicode hex":"2461"},{"Typeface name":"Wingdings 2","Dingbat dec":"108","Dingbat hex":"6C","Unicode dec":"9314","Unicode hex":"2462"},{"Typeface name":"Wingdings 2","Dingbat dec":"109","Dingbat hex":"6D","Unicode dec":"9315","Unicode hex":"2463"},{"Typeface name":"Wingdings 2","Dingbat dec":"110","Dingbat hex":"6E","Unicode dec":"9316","Unicode hex":"2464"},{"Typeface name":"Wingdings 2","Dingbat dec":"111","Dingbat hex":"6F","Unicode dec":"9317","Unicode hex":"2465"},{"Typeface name":"Wingdings 2","Dingbat dec":"112","Dingbat hex":"70","Unicode dec":"9318","Unicode hex":"2466"},{"Typeface name":"Wingdings 2","Dingbat dec":"113","Dingbat hex":"71","Unicode dec":"9319","Unicode hex":"2467"},{"Typeface name":"Wingdings 2","Dingbat dec":"114","Dingbat hex":"72","Unicode dec":"9320","Unicode hex":"2468"},{"Typeface name":"Wingdings 2","Dingbat dec":"115","Dingbat hex":"73","Unicode dec":"9321","Unicode hex":"2469"},{"Typeface name":"Wingdings 2","Dingbat dec":"116","Dingbat hex":"74","Unicode dec":"9471","Unicode hex":"24FF"},{"Typeface name":"Wingdings 2","Dingbat dec":"117","Dingbat hex":"75","Unicode dec":"10102","Unicode hex":"2776"},{"Typeface name":"Wingdings 2","Dingbat dec":"118","Dingbat hex":"76","Unicode dec":"10103","Unicode hex":"2777"},{"Typeface name":"Wingdings 2","Dingbat dec":"119","Dingbat hex":"77","Unicode dec":"10104","Unicode hex":"2778"},{"Typeface name":"Wingdings 2","Dingbat dec":"120","Dingbat hex":"78","Unicode dec":"10105","Unicode hex":"2779"},{"Typeface name":"Wingdings 2","Dingbat dec":"121","Dingbat hex":"79","Unicode dec":"10106","Unicode hex":"277A"},{"Typeface name":"Wingdings 2","Dingbat dec":"122","Dingbat hex":"7A","Unicode dec":"10107","Unicode hex":"277B"},{"Typeface name":"Wingdings 2","Dingbat dec":"123","Dingbat hex":"7B","Unicode dec":"10108","Unicode hex":"277C"},{"Typeface name":"Wingdings 2","Dingbat dec":"124","Dingbat hex":"7C","Unicode dec":"10109","Unicode hex":"277D"},{"Typeface name":"Wingdings 2","Dingbat dec":"125","Dingbat hex":"7D","Unicode dec":"10110","Unicode hex":"277E"},{"Typeface name":"Wingdings 2","Dingbat dec":"126","Dingbat hex":"7E","Unicode dec":"10111","Unicode hex":"277F"},{"Typeface name":"Wingdings 2","Dingbat dec":"128","Dingbat hex":"80","Unicode dec":"9737","Unicode hex":"2609"},{"Typeface name":"Wingdings 2","Dingbat dec":"129","Dingbat hex":"81","Unicode dec":"127765","Unicode hex":"1F315"},{"Typeface name":"Wingdings 2","Dingbat dec":"130","Dingbat hex":"82","Unicode dec":"9789","Unicode hex":"263D"},{"Typeface name":"Wingdings 2","Dingbat dec":"131","Dingbat hex":"83","Unicode dec":"9790","Unicode hex":"263E"},{"Typeface name":"Wingdings 2","Dingbat dec":"132","Dingbat hex":"84","Unicode dec":"11839","Unicode hex":"2E3F"},{"Typeface name":"Wingdings 2","Dingbat dec":"133","Dingbat hex":"85","Unicode dec":"10013","Unicode hex":"271D"},{"Typeface name":"Wingdings 2","Dingbat dec":"134","Dingbat hex":"86","Unicode dec":"128327","Unicode hex":"1F547"},{"Typeface name":"Wingdings 2","Dingbat dec":"135","Dingbat hex":"87","Unicode dec":"128348","Unicode hex":"1F55C"},{"Typeface name":"Wingdings 2","Dingbat dec":"136","Dingbat hex":"88","Unicode dec":"128349","Unicode hex":"1F55D"},{"Typeface name":"Wingdings 2","Dingbat dec":"137","Dingbat hex":"89","Unicode dec":"128350","Unicode hex":"1F55E"},{"Typeface name":"Wingdings 2","Dingbat dec":"138","Dingbat hex":"8A","Unicode dec":"128351","Unicode hex":"1F55F"},{"Typeface name":"Wingdings 2","Dingbat dec":"139","Dingbat hex":"8B","Unicode dec":"128352","Unicode hex":"1F560"},{"Typeface name":"Wingdings 2","Dingbat dec":"140","Dingbat hex":"8C","Unicode dec":"128353","Unicode hex":"1F561"},{"Typeface name":"Wingdings 2","Dingbat dec":"141","Dingbat hex":"8D","Unicode dec":"128354","Unicode hex":"1F562"},{"Typeface name":"Wingdings 2","Dingbat dec":"142","Dingbat hex":"8E","Unicode dec":"128355","Unicode hex":"1F563"},{"Typeface name":"Wingdings 2","Dingbat dec":"143","Dingbat hex":"8F","Unicode dec":"128356","Unicode hex":"1F564"},{"Typeface name":"Wingdings 2","Dingbat dec":"144","Dingbat hex":"90","Unicode dec":"128357","Unicode hex":"1F565"},{"Typeface name":"Wingdings 2","Dingbat dec":"145","Dingbat hex":"91","Unicode dec":"128358","Unicode hex":"1F566"},{"Typeface name":"Wingdings 2","Dingbat dec":"146","Dingbat hex":"92","Unicode dec":"128359","Unicode hex":"1F567"},{"Typeface name":"Wingdings 2","Dingbat dec":"147","Dingbat hex":"93","Unicode dec":"128616","Unicode hex":"1F668"},{"Typeface name":"Wingdings 2","Dingbat dec":"148","Dingbat hex":"94","Unicode dec":"128617","Unicode hex":"1F669"},{"Typeface name":"Wingdings 2","Dingbat dec":"149","Dingbat hex":"95","Unicode dec":"8901","Unicode hex":"22C5"},{"Typeface name":"Wingdings 2","Dingbat dec":"150","Dingbat hex":"96","Unicode dec":"128900","Unicode hex":"1F784"},{"Typeface name":"Wingdings 2","Dingbat dec":"151","Dingbat hex":"97","Unicode dec":"10625","Unicode hex":"2981"},{"Typeface name":"Wingdings 2","Dingbat dec":"152","Dingbat hex":"98","Unicode dec":"9679","Unicode hex":"25CF"},{"Typeface name":"Wingdings 2","Dingbat dec":"153","Dingbat hex":"99","Unicode dec":"9675","Unicode hex":"25CB"},{"Typeface name":"Wingdings 2","Dingbat dec":"154","Dingbat hex":"9A","Unicode dec":"128901","Unicode hex":"1F785"},{"Typeface name":"Wingdings 2","Dingbat dec":"155","Dingbat hex":"9B","Unicode dec":"128903","Unicode hex":"1F787"},{"Typeface name":"Wingdings 2","Dingbat dec":"156","Dingbat hex":"9C","Unicode dec":"128905","Unicode hex":"1F789"},{"Typeface name":"Wingdings 2","Dingbat dec":"157","Dingbat hex":"9D","Unicode dec":"8857","Unicode hex":"2299"},{"Typeface name":"Wingdings 2","Dingbat dec":"158","Dingbat hex":"9E","Unicode dec":"10687","Unicode hex":"29BF"},{"Typeface name":"Wingdings 2","Dingbat dec":"159","Dingbat hex":"9F","Unicode dec":"128908","Unicode hex":"1F78C"},{"Typeface name":"Wingdings 2","Dingbat dec":"160","Dingbat hex":"A0","Unicode dec":"128909","Unicode hex":"1F78D"},{"Typeface name":"Wingdings 2","Dingbat dec":"161","Dingbat hex":"A1","Unicode dec":"9726","Unicode hex":"25FE"},{"Typeface name":"Wingdings 2","Dingbat dec":"162","Dingbat hex":"A2","Unicode dec":"9632","Unicode hex":"25A0"},{"Typeface name":"Wingdings 2","Dingbat dec":"163","Dingbat hex":"A3","Unicode dec":"9633","Unicode hex":"25A1"},{"Typeface name":"Wingdings 2","Dingbat dec":"164","Dingbat hex":"A4","Unicode dec":"128913","Unicode hex":"1F791"},{"Typeface name":"Wingdings 2","Dingbat dec":"165","Dingbat hex":"A5","Unicode dec":"128914","Unicode hex":"1F792"},{"Typeface name":"Wingdings 2","Dingbat dec":"166","Dingbat hex":"A6","Unicode dec":"128915","Unicode hex":"1F793"},{"Typeface name":"Wingdings 2","Dingbat dec":"167","Dingbat hex":"A7","Unicode dec":"128916","Unicode hex":"1F794"},{"Typeface name":"Wingdings 2","Dingbat dec":"168","Dingbat hex":"A8","Unicode dec":"9635","Unicode hex":"25A3"},{"Typeface name":"Wingdings 2","Dingbat dec":"169","Dingbat hex":"A9","Unicode dec":"128917","Unicode hex":"1F795"},{"Typeface name":"Wingdings 2","Dingbat dec":"170","Dingbat hex":"AA","Unicode dec":"128918","Unicode hex":"1F796"},{"Typeface name":"Wingdings 2","Dingbat dec":"171","Dingbat hex":"AB","Unicode dec":"128919","Unicode hex":"1F797"},{"Typeface name":"Wingdings 2","Dingbat dec":"172","Dingbat hex":"AC","Unicode dec":"128920","Unicode hex":"1F798"},{"Typeface name":"Wingdings 2","Dingbat dec":"173","Dingbat hex":"AD","Unicode dec":"11049","Unicode hex":"2B29"},{"Typeface name":"Wingdings 2","Dingbat dec":"174","Dingbat hex":"AE","Unicode dec":"11045","Unicode hex":"2B25"},{"Typeface name":"Wingdings 2","Dingbat dec":"175","Dingbat hex":"AF","Unicode dec":"9671","Unicode hex":"25C7"},{"Typeface name":"Wingdings 2","Dingbat dec":"176","Dingbat hex":"B0","Unicode dec":"128922","Unicode hex":"1F79A"},{"Typeface name":"Wingdings 2","Dingbat dec":"177","Dingbat hex":"B1","Unicode dec":"9672","Unicode hex":"25C8"},{"Typeface name":"Wingdings 2","Dingbat dec":"178","Dingbat hex":"B2","Unicode dec":"128923","Unicode hex":"1F79B"},{"Typeface name":"Wingdings 2","Dingbat dec":"179","Dingbat hex":"B3","Unicode dec":"128924","Unicode hex":"1F79C"},{"Typeface name":"Wingdings 2","Dingbat dec":"180","Dingbat hex":"B4","Unicode dec":"128925","Unicode hex":"1F79D"},{"Typeface name":"Wingdings 2","Dingbat dec":"181","Dingbat hex":"B5","Unicode dec":"128926","Unicode hex":"1F79E"},{"Typeface name":"Wingdings 2","Dingbat dec":"182","Dingbat hex":"B6","Unicode dec":"11050","Unicode hex":"2B2A"},{"Typeface name":"Wingdings 2","Dingbat dec":"183","Dingbat hex":"B7","Unicode dec":"11047","Unicode hex":"2B27"},{"Typeface name":"Wingdings 2","Dingbat dec":"184","Dingbat hex":"B8","Unicode dec":"9674","Unicode hex":"25CA"},{"Typeface name":"Wingdings 2","Dingbat dec":"185","Dingbat hex":"B9","Unicode dec":"128928","Unicode hex":"1F7A0"},{"Typeface name":"Wingdings 2","Dingbat dec":"186","Dingbat hex":"BA","Unicode dec":"9686","Unicode hex":"25D6"},{"Typeface name":"Wingdings 2","Dingbat dec":"187","Dingbat hex":"BB","Unicode dec":"9687","Unicode hex":"25D7"},{"Typeface name":"Wingdings 2","Dingbat dec":"188","Dingbat hex":"BC","Unicode dec":"11210","Unicode hex":"2BCA"},{"Typeface name":"Wingdings 2","Dingbat dec":"189","Dingbat hex":"BD","Unicode dec":"11211","Unicode hex":"2BCB"},{"Typeface name":"Wingdings 2","Dingbat dec":"190","Dingbat hex":"BE","Unicode dec":"11200","Unicode hex":"2BC0"},{"Typeface name":"Wingdings 2","Dingbat dec":"191","Dingbat hex":"BF","Unicode dec":"11201","Unicode hex":"2BC1"},{"Typeface name":"Wingdings 2","Dingbat dec":"192","Dingbat hex":"C0","Unicode dec":"11039","Unicode hex":"2B1F"},{"Typeface name":"Wingdings 2","Dingbat dec":"193","Dingbat hex":"C1","Unicode dec":"11202","Unicode hex":"2BC2"},{"Typeface name":"Wingdings 2","Dingbat dec":"194","Dingbat hex":"C2","Unicode dec":"11043","Unicode hex":"2B23"},{"Typeface name":"Wingdings 2","Dingbat dec":"195","Dingbat hex":"C3","Unicode dec":"11042","Unicode hex":"2B22"},{"Typeface name":"Wingdings 2","Dingbat dec":"196","Dingbat hex":"C4","Unicode dec":"11203","Unicode hex":"2BC3"},{"Typeface name":"Wingdings 2","Dingbat dec":"197","Dingbat hex":"C5","Unicode dec":"11204","Unicode hex":"2BC4"},{"Typeface name":"Wingdings 2","Dingbat dec":"198","Dingbat hex":"C6","Unicode dec":"128929","Unicode hex":"1F7A1"},{"Typeface name":"Wingdings 2","Dingbat dec":"199","Dingbat hex":"C7","Unicode dec":"128930","Unicode hex":"1F7A2"},{"Typeface name":"Wingdings 2","Dingbat dec":"200","Dingbat hex":"C8","Unicode dec":"128931","Unicode hex":"1F7A3"},{"Typeface name":"Wingdings 2","Dingbat dec":"201","Dingbat hex":"C9","Unicode dec":"128932","Unicode hex":"1F7A4"},{"Typeface name":"Wingdings 2","Dingbat dec":"202","Dingbat hex":"CA","Unicode dec":"128933","Unicode hex":"1F7A5"},{"Typeface name":"Wingdings 2","Dingbat dec":"203","Dingbat hex":"CB","Unicode dec":"128934","Unicode hex":"1F7A6"},{"Typeface name":"Wingdings 2","Dingbat dec":"204","Dingbat hex":"CC","Unicode dec":"128935","Unicode hex":"1F7A7"},{"Typeface name":"Wingdings 2","Dingbat dec":"205","Dingbat hex":"CD","Unicode dec":"128936","Unicode hex":"1F7A8"},{"Typeface name":"Wingdings 2","Dingbat dec":"206","Dingbat hex":"CE","Unicode dec":"128937","Unicode hex":"1F7A9"},{"Typeface name":"Wingdings 2","Dingbat dec":"207","Dingbat hex":"CF","Unicode dec":"128938","Unicode hex":"1F7AA"},{"Typeface name":"Wingdings 2","Dingbat dec":"208","Dingbat hex":"D0","Unicode dec":"128939","Unicode hex":"1F7AB"},{"Typeface name":"Wingdings 2","Dingbat dec":"209","Dingbat hex":"D1","Unicode dec":"128940","Unicode hex":"1F7AC"},{"Typeface name":"Wingdings 2","Dingbat dec":"210","Dingbat hex":"D2","Unicode dec":"128941","Unicode hex":"1F7AD"},{"Typeface name":"Wingdings 2","Dingbat dec":"211","Dingbat hex":"D3","Unicode dec":"128942","Unicode hex":"1F7AE"},{"Typeface name":"Wingdings 2","Dingbat dec":"212","Dingbat hex":"D4","Unicode dec":"128943","Unicode hex":"1F7AF"},{"Typeface name":"Wingdings 2","Dingbat dec":"213","Dingbat hex":"D5","Unicode dec":"128944","Unicode hex":"1F7B0"},{"Typeface name":"Wingdings 2","Dingbat dec":"214","Dingbat hex":"D6","Unicode dec":"128945","Unicode hex":"1F7B1"},{"Typeface name":"Wingdings 2","Dingbat dec":"215","Dingbat hex":"D7","Unicode dec":"128946","Unicode hex":"1F7B2"},{"Typeface name":"Wingdings 2","Dingbat dec":"216","Dingbat hex":"D8","Unicode dec":"128947","Unicode hex":"1F7B3"},{"Typeface name":"Wingdings 2","Dingbat dec":"217","Dingbat hex":"D9","Unicode dec":"128948","Unicode hex":"1F7B4"},{"Typeface name":"Wingdings 2","Dingbat dec":"218","Dingbat hex":"DA","Unicode dec":"128949","Unicode hex":"1F7B5"},{"Typeface name":"Wingdings 2","Dingbat dec":"219","Dingbat hex":"DB","Unicode dec":"128950","Unicode hex":"1F7B6"},{"Typeface name":"Wingdings 2","Dingbat dec":"220","Dingbat hex":"DC","Unicode dec":"128951","Unicode hex":"1F7B7"},{"Typeface name":"Wingdings 2","Dingbat dec":"221","Dingbat hex":"DD","Unicode dec":"128952","Unicode hex":"1F7B8"},{"Typeface name":"Wingdings 2","Dingbat dec":"222","Dingbat hex":"DE","Unicode dec":"128953","Unicode hex":"1F7B9"},{"Typeface name":"Wingdings 2","Dingbat dec":"223","Dingbat hex":"DF","Unicode dec":"128954","Unicode hex":"1F7BA"},{"Typeface name":"Wingdings 2","Dingbat dec":"224","Dingbat hex":"E0","Unicode dec":"128955","Unicode hex":"1F7BB"},{"Typeface name":"Wingdings 2","Dingbat dec":"225","Dingbat hex":"E1","Unicode dec":"128956","Unicode hex":"1F7BC"},{"Typeface name":"Wingdings 2","Dingbat dec":"226","Dingbat hex":"E2","Unicode dec":"128957","Unicode hex":"1F7BD"},{"Typeface name":"Wingdings 2","Dingbat dec":"227","Dingbat hex":"E3","Unicode dec":"128958","Unicode hex":"1F7BE"},{"Typeface name":"Wingdings 2","Dingbat dec":"228","Dingbat hex":"E4","Unicode dec":"128959","Unicode hex":"1F7BF"},{"Typeface name":"Wingdings 2","Dingbat dec":"229","Dingbat hex":"E5","Unicode dec":"128960","Unicode hex":"1F7C0"},{"Typeface name":"Wingdings 2","Dingbat dec":"230","Dingbat hex":"E6","Unicode dec":"128962","Unicode hex":"1F7C2"},{"Typeface name":"Wingdings 2","Dingbat dec":"231","Dingbat hex":"E7","Unicode dec":"128964","Unicode hex":"1F7C4"},{"Typeface name":"Wingdings 2","Dingbat dec":"232","Dingbat hex":"E8","Unicode dec":"128966","Unicode hex":"1F7C6"},{"Typeface name":"Wingdings 2","Dingbat dec":"233","Dingbat hex":"E9","Unicode dec":"128969","Unicode hex":"1F7C9"},{"Typeface name":"Wingdings 2","Dingbat dec":"234","Dingbat hex":"EA","Unicode dec":"128970","Unicode hex":"1F7CA"},{"Typeface name":"Wingdings 2","Dingbat dec":"235","Dingbat hex":"EB","Unicode dec":"10038","Unicode hex":"2736"},{"Typeface name":"Wingdings 2","Dingbat dec":"236","Dingbat hex":"EC","Unicode dec":"128972","Unicode hex":"1F7CC"},{"Typeface name":"Wingdings 2","Dingbat dec":"237","Dingbat hex":"ED","Unicode dec":"128974","Unicode hex":"1F7CE"},{"Typeface name":"Wingdings 2","Dingbat dec":"238","Dingbat hex":"EE","Unicode dec":"128976","Unicode hex":"1F7D0"},{"Typeface name":"Wingdings 2","Dingbat dec":"239","Dingbat hex":"EF","Unicode dec":"128978","Unicode hex":"1F7D2"},{"Typeface name":"Wingdings 2","Dingbat dec":"240","Dingbat hex":"F0","Unicode dec":"10041","Unicode hex":"2739"},{"Typeface name":"Wingdings 2","Dingbat dec":"241","Dingbat hex":"F1","Unicode dec":"128963","Unicode hex":"1F7C3"},{"Typeface name":"Wingdings 2","Dingbat dec":"242","Dingbat hex":"F2","Unicode dec":"128967","Unicode hex":"1F7C7"},{"Typeface name":"Wingdings 2","Dingbat dec":"243","Dingbat hex":"F3","Unicode dec":"10031","Unicode hex":"272F"},{"Typeface name":"Wingdings 2","Dingbat dec":"244","Dingbat hex":"F4","Unicode dec":"128973","Unicode hex":"1F7CD"},{"Typeface name":"Wingdings 2","Dingbat dec":"245","Dingbat hex":"F5","Unicode dec":"128980","Unicode hex":"1F7D4"},{"Typeface name":"Wingdings 2","Dingbat dec":"246","Dingbat hex":"F6","Unicode dec":"11212","Unicode hex":"2BCC"},{"Typeface name":"Wingdings 2","Dingbat dec":"247","Dingbat hex":"F7","Unicode dec":"11213","Unicode hex":"2BCD"},{"Typeface name":"Wingdings 2","Dingbat dec":"248","Dingbat hex":"F8","Unicode dec":"8251","Unicode hex":"203B"},{"Typeface name":"Wingdings 2","Dingbat dec":"249","Dingbat hex":"F9","Unicode dec":"8258","Unicode hex":"2042"},{"Typeface name":"Wingdings 3","Dingbat dec":"32","Dingbat hex":"20","Unicode dec":"32","Unicode hex":"20"},{"Typeface name":"Wingdings 3","Dingbat dec":"33","Dingbat hex":"21","Unicode dec":"11104","Unicode hex":"2B60"},{"Typeface name":"Wingdings 3","Dingbat dec":"34","Dingbat hex":"22","Unicode dec":"11106","Unicode hex":"2B62"},{"Typeface name":"Wingdings 3","Dingbat dec":"35","Dingbat hex":"23","Unicode dec":"11105","Unicode hex":"2B61"},{"Typeface name":"Wingdings 3","Dingbat dec":"36","Dingbat hex":"24","Unicode dec":"11107","Unicode hex":"2B63"},{"Typeface name":"Wingdings 3","Dingbat dec":"37","Dingbat hex":"25","Unicode dec":"11110","Unicode hex":"2B66"},{"Typeface name":"Wingdings 3","Dingbat dec":"38","Dingbat hex":"26","Unicode dec":"11111","Unicode hex":"2B67"},{"Typeface name":"Wingdings 3","Dingbat dec":"39","Dingbat hex":"27","Unicode dec":"11113","Unicode hex":"2B69"},{"Typeface name":"Wingdings 3","Dingbat dec":"40","Dingbat hex":"28","Unicode dec":"11112","Unicode hex":"2B68"},{"Typeface name":"Wingdings 3","Dingbat dec":"41","Dingbat hex":"29","Unicode dec":"11120","Unicode hex":"2B70"},{"Typeface name":"Wingdings 3","Dingbat dec":"42","Dingbat hex":"2A","Unicode dec":"11122","Unicode hex":"2B72"},{"Typeface name":"Wingdings 3","Dingbat dec":"43","Dingbat hex":"2B","Unicode dec":"11121","Unicode hex":"2B71"},{"Typeface name":"Wingdings 3","Dingbat dec":"44","Dingbat hex":"2C","Unicode dec":"11123","Unicode hex":"2B73"},{"Typeface name":"Wingdings 3","Dingbat dec":"45","Dingbat hex":"2D","Unicode dec":"11126","Unicode hex":"2B76"},{"Typeface name":"Wingdings 3","Dingbat dec":"46","Dingbat hex":"2E","Unicode dec":"11128","Unicode hex":"2B78"},{"Typeface name":"Wingdings 3","Dingbat dec":"47","Dingbat hex":"2F","Unicode dec":"11131","Unicode hex":"2B7B"},{"Typeface name":"Wingdings 3","Dingbat dec":"48","Dingbat hex":"30","Unicode dec":"11133","Unicode hex":"2B7D"},{"Typeface name":"Wingdings 3","Dingbat dec":"49","Dingbat hex":"31","Unicode dec":"11108","Unicode hex":"2B64"},{"Typeface name":"Wingdings 3","Dingbat dec":"50","Dingbat hex":"32","Unicode dec":"11109","Unicode hex":"2B65"},{"Typeface name":"Wingdings 3","Dingbat dec":"51","Dingbat hex":"33","Unicode dec":"11114","Unicode hex":"2B6A"},{"Typeface name":"Wingdings 3","Dingbat dec":"52","Dingbat hex":"34","Unicode dec":"11116","Unicode hex":"2B6C"},{"Typeface name":"Wingdings 3","Dingbat dec":"53","Dingbat hex":"35","Unicode dec":"11115","Unicode hex":"2B6B"},{"Typeface name":"Wingdings 3","Dingbat dec":"54","Dingbat hex":"36","Unicode dec":"11117","Unicode hex":"2B6D"},{"Typeface name":"Wingdings 3","Dingbat dec":"55","Dingbat hex":"37","Unicode dec":"11085","Unicode hex":"2B4D"},{"Typeface name":"Wingdings 3","Dingbat dec":"56","Dingbat hex":"38","Unicode dec":"11168","Unicode hex":"2BA0"},{"Typeface name":"Wingdings 3","Dingbat dec":"57","Dingbat hex":"39","Unicode dec":"11169","Unicode hex":"2BA1"},{"Typeface name":"Wingdings 3","Dingbat dec":"58","Dingbat hex":"3A","Unicode dec":"11170","Unicode hex":"2BA2"},{"Typeface name":"Wingdings 3","Dingbat dec":"59","Dingbat hex":"3B","Unicode dec":"11171","Unicode hex":"2BA3"},{"Typeface name":"Wingdings 3","Dingbat dec":"60","Dingbat hex":"3C","Unicode dec":"11172","Unicode hex":"2BA4"},{"Typeface name":"Wingdings 3","Dingbat dec":"61","Dingbat hex":"3D","Unicode dec":"11173","Unicode hex":"2BA5"},{"Typeface name":"Wingdings 3","Dingbat dec":"62","Dingbat hex":"3E","Unicode dec":"11174","Unicode hex":"2BA6"},{"Typeface name":"Wingdings 3","Dingbat dec":"63","Dingbat hex":"3F","Unicode dec":"11175","Unicode hex":"2BA7"},{"Typeface name":"Wingdings 3","Dingbat dec":"64","Dingbat hex":"40","Unicode dec":"11152","Unicode hex":"2B90"},{"Typeface name":"Wingdings 3","Dingbat dec":"65","Dingbat hex":"41","Unicode dec":"11153","Unicode hex":"2B91"},{"Typeface name":"Wingdings 3","Dingbat dec":"66","Dingbat hex":"42","Unicode dec":"11154","Unicode hex":"2B92"},{"Typeface name":"Wingdings 3","Dingbat dec":"67","Dingbat hex":"43","Unicode dec":"11155","Unicode hex":"2B93"},{"Typeface name":"Wingdings 3","Dingbat dec":"68","Dingbat hex":"44","Unicode dec":"11136","Unicode hex":"2B80"},{"Typeface name":"Wingdings 3","Dingbat dec":"69","Dingbat hex":"45","Unicode dec":"11139","Unicode hex":"2B83"},{"Typeface name":"Wingdings 3","Dingbat dec":"70","Dingbat hex":"46","Unicode dec":"11134","Unicode hex":"2B7E"},{"Typeface name":"Wingdings 3","Dingbat dec":"71","Dingbat hex":"47","Unicode dec":"11135","Unicode hex":"2B7F"},{"Typeface name":"Wingdings 3","Dingbat dec":"72","Dingbat hex":"48","Unicode dec":"11140","Unicode hex":"2B84"},{"Typeface name":"Wingdings 3","Dingbat dec":"73","Dingbat hex":"49","Unicode dec":"11142","Unicode hex":"2B86"},{"Typeface name":"Wingdings 3","Dingbat dec":"74","Dingbat hex":"4A","Unicode dec":"11141","Unicode hex":"2B85"},{"Typeface name":"Wingdings 3","Dingbat dec":"75","Dingbat hex":"4B","Unicode dec":"11143","Unicode hex":"2B87"},{"Typeface name":"Wingdings 3","Dingbat dec":"76","Dingbat hex":"4C","Unicode dec":"11151","Unicode hex":"2B8F"},{"Typeface name":"Wingdings 3","Dingbat dec":"77","Dingbat hex":"4D","Unicode dec":"11149","Unicode hex":"2B8D"},{"Typeface name":"Wingdings 3","Dingbat dec":"78","Dingbat hex":"4E","Unicode dec":"11150","Unicode hex":"2B8E"},{"Typeface name":"Wingdings 3","Dingbat dec":"79","Dingbat hex":"4F","Unicode dec":"11148","Unicode hex":"2B8C"},{"Typeface name":"Wingdings 3","Dingbat dec":"80","Dingbat hex":"50","Unicode dec":"11118","Unicode hex":"2B6E"},{"Typeface name":"Wingdings 3","Dingbat dec":"81","Dingbat hex":"51","Unicode dec":"11119","Unicode hex":"2B6F"},{"Typeface name":"Wingdings 3","Dingbat dec":"82","Dingbat hex":"52","Unicode dec":"9099","Unicode hex":"238B"},{"Typeface name":"Wingdings 3","Dingbat dec":"83","Dingbat hex":"53","Unicode dec":"8996","Unicode hex":"2324"},{"Typeface name":"Wingdings 3","Dingbat dec":"84","Dingbat hex":"54","Unicode dec":"8963","Unicode hex":"2303"},{"Typeface name":"Wingdings 3","Dingbat dec":"85","Dingbat hex":"55","Unicode dec":"8997","Unicode hex":"2325"},{"Typeface name":"Wingdings 3","Dingbat dec":"86","Dingbat hex":"56","Unicode dec":"9251","Unicode hex":"2423"},{"Typeface name":"Wingdings 3","Dingbat dec":"87","Dingbat hex":"57","Unicode dec":"9085","Unicode hex":"237D"},{"Typeface name":"Wingdings 3","Dingbat dec":"88","Dingbat hex":"58","Unicode dec":"8682","Unicode hex":"21EA"},{"Typeface name":"Wingdings 3","Dingbat dec":"89","Dingbat hex":"59","Unicode dec":"11192","Unicode hex":"2BB8"},{"Typeface name":"Wingdings 3","Dingbat dec":"90","Dingbat hex":"5A","Unicode dec":"129184","Unicode hex":"1F8A0"},{"Typeface name":"Wingdings 3","Dingbat dec":"91","Dingbat hex":"5B","Unicode dec":"129185","Unicode hex":"1F8A1"},{"Typeface name":"Wingdings 3","Dingbat dec":"92","Dingbat hex":"5C","Unicode dec":"129186","Unicode hex":"1F8A2"},{"Typeface name":"Wingdings 3","Dingbat dec":"93","Dingbat hex":"5D","Unicode dec":"129187","Unicode hex":"1F8A3"},{"Typeface name":"Wingdings 3","Dingbat dec":"94","Dingbat hex":"5E","Unicode dec":"129188","Unicode hex":"1F8A4"},{"Typeface name":"Wingdings 3","Dingbat dec":"95","Dingbat hex":"5F","Unicode dec":"129189","Unicode hex":"1F8A5"},{"Typeface name":"Wingdings 3","Dingbat dec":"96","Dingbat hex":"60","Unicode dec":"129190","Unicode hex":"1F8A6"},{"Typeface name":"Wingdings 3","Dingbat dec":"97","Dingbat hex":"61","Unicode dec":"129191","Unicode hex":"1F8A7"},{"Typeface name":"Wingdings 3","Dingbat dec":"98","Dingbat hex":"62","Unicode dec":"129192","Unicode hex":"1F8A8"},{"Typeface name":"Wingdings 3","Dingbat dec":"99","Dingbat hex":"63","Unicode dec":"129193","Unicode hex":"1F8A9"},{"Typeface name":"Wingdings 3","Dingbat dec":"100","Dingbat hex":"64","Unicode dec":"129194","Unicode hex":"1F8AA"},{"Typeface name":"Wingdings 3","Dingbat dec":"101","Dingbat hex":"65","Unicode dec":"129195","Unicode hex":"1F8AB"},{"Typeface name":"Wingdings 3","Dingbat dec":"102","Dingbat hex":"66","Unicode dec":"129104","Unicode hex":"1F850"},{"Typeface name":"Wingdings 3","Dingbat dec":"103","Dingbat hex":"67","Unicode dec":"129106","Unicode hex":"1F852"},{"Typeface name":"Wingdings 3","Dingbat dec":"104","Dingbat hex":"68","Unicode dec":"129105","Unicode hex":"1F851"},{"Typeface name":"Wingdings 3","Dingbat dec":"105","Dingbat hex":"69","Unicode dec":"129107","Unicode hex":"1F853"},{"Typeface name":"Wingdings 3","Dingbat dec":"106","Dingbat hex":"6A","Unicode dec":"129108","Unicode hex":"1F854"},{"Typeface name":"Wingdings 3","Dingbat dec":"107","Dingbat hex":"6B","Unicode dec":"129109","Unicode hex":"1F855"},{"Typeface name":"Wingdings 3","Dingbat dec":"108","Dingbat hex":"6C","Unicode dec":"129111","Unicode hex":"1F857"},{"Typeface name":"Wingdings 3","Dingbat dec":"109","Dingbat hex":"6D","Unicode dec":"129110","Unicode hex":"1F856"},{"Typeface name":"Wingdings 3","Dingbat dec":"110","Dingbat hex":"6E","Unicode dec":"129112","Unicode hex":"1F858"},{"Typeface name":"Wingdings 3","Dingbat dec":"111","Dingbat hex":"6F","Unicode dec":"129113","Unicode hex":"1F859"},{"Typeface name":"Wingdings 3","Dingbat dec":"112","Dingbat hex":"70","Unicode dec":"9650","Unicode hex":"25B2"},{"Typeface name":"Wingdings 3","Dingbat dec":"113","Dingbat hex":"71","Unicode dec":"9660","Unicode hex":"25BC"},{"Typeface name":"Wingdings 3","Dingbat dec":"114","Dingbat hex":"72","Unicode dec":"9651","Unicode hex":"25B3"},{"Typeface name":"Wingdings 3","Dingbat dec":"115","Dingbat hex":"73","Unicode dec":"9661","Unicode hex":"25BD"},{"Typeface name":"Wingdings 3","Dingbat dec":"116","Dingbat hex":"74","Unicode dec":"9664","Unicode hex":"25C0"},{"Typeface name":"Wingdings 3","Dingbat dec":"117","Dingbat hex":"75","Unicode dec":"9654","Unicode hex":"25B6"},{"Typeface name":"Wingdings 3","Dingbat dec":"118","Dingbat hex":"76","Unicode dec":"9665","Unicode hex":"25C1"},{"Typeface name":"Wingdings 3","Dingbat dec":"119","Dingbat hex":"77","Unicode dec":"9655","Unicode hex":"25B7"},{"Typeface name":"Wingdings 3","Dingbat dec":"120","Dingbat hex":"78","Unicode dec":"9699","Unicode hex":"25E3"},{"Typeface name":"Wingdings 3","Dingbat dec":"121","Dingbat hex":"79","Unicode dec":"9698","Unicode hex":"25E2"},{"Typeface name":"Wingdings 3","Dingbat dec":"122","Dingbat hex":"7A","Unicode dec":"9700","Unicode hex":"25E4"},{"Typeface name":"Wingdings 3","Dingbat dec":"123","Dingbat hex":"7B","Unicode dec":"9701","Unicode hex":"25E5"},{"Typeface name":"Wingdings 3","Dingbat dec":"124","Dingbat hex":"7C","Unicode dec":"128896","Unicode hex":"1F780"},{"Typeface name":"Wingdings 3","Dingbat dec":"125","Dingbat hex":"7D","Unicode dec":"128898","Unicode hex":"1F782"},{"Typeface name":"Wingdings 3","Dingbat dec":"126","Dingbat hex":"7E","Unicode dec":"128897","Unicode hex":"1F781"},{"Typeface name":"Wingdings 3","Dingbat dec":"128","Dingbat hex":"80","Unicode dec":"128899","Unicode hex":"1F783"},{"Typeface name":"Wingdings 3","Dingbat dec":"129","Dingbat hex":"81","Unicode dec":"11205","Unicode hex":"2BC5"},{"Typeface name":"Wingdings 3","Dingbat dec":"130","Dingbat hex":"82","Unicode dec":"11206","Unicode hex":"2BC6"},{"Typeface name":"Wingdings 3","Dingbat dec":"131","Dingbat hex":"83","Unicode dec":"11207","Unicode hex":"2BC7"},{"Typeface name":"Wingdings 3","Dingbat dec":"132","Dingbat hex":"84","Unicode dec":"11208","Unicode hex":"2BC8"},{"Typeface name":"Wingdings 3","Dingbat dec":"133","Dingbat hex":"85","Unicode dec":"11164","Unicode hex":"2B9C"},{"Typeface name":"Wingdings 3","Dingbat dec":"134","Dingbat hex":"86","Unicode dec":"11166","Unicode hex":"2B9E"},{"Typeface name":"Wingdings 3","Dingbat dec":"135","Dingbat hex":"87","Unicode dec":"11165","Unicode hex":"2B9D"},{"Typeface name":"Wingdings 3","Dingbat dec":"136","Dingbat hex":"88","Unicode dec":"11167","Unicode hex":"2B9F"},{"Typeface name":"Wingdings 3","Dingbat dec":"137","Dingbat hex":"89","Unicode dec":"129040","Unicode hex":"1F810"},{"Typeface name":"Wingdings 3","Dingbat dec":"138","Dingbat hex":"8A","Unicode dec":"129042","Unicode hex":"1F812"},{"Typeface name":"Wingdings 3","Dingbat dec":"139","Dingbat hex":"8B","Unicode dec":"129041","Unicode hex":"1F811"},{"Typeface name":"Wingdings 3","Dingbat dec":"140","Dingbat hex":"8C","Unicode dec":"129043","Unicode hex":"1F813"},{"Typeface name":"Wingdings 3","Dingbat dec":"141","Dingbat hex":"8D","Unicode dec":"129044","Unicode hex":"1F814"},{"Typeface name":"Wingdings 3","Dingbat dec":"142","Dingbat hex":"8E","Unicode dec":"129046","Unicode hex":"1F816"},{"Typeface name":"Wingdings 3","Dingbat dec":"143","Dingbat hex":"8F","Unicode dec":"129045","Unicode hex":"1F815"},{"Typeface name":"Wingdings 3","Dingbat dec":"144","Dingbat hex":"90","Unicode dec":"129047","Unicode hex":"1F817"},{"Typeface name":"Wingdings 3","Dingbat dec":"145","Dingbat hex":"91","Unicode dec":"129048","Unicode hex":"1F818"},{"Typeface name":"Wingdings 3","Dingbat dec":"146","Dingbat hex":"92","Unicode dec":"129050","Unicode hex":"1F81A"},{"Typeface name":"Wingdings 3","Dingbat dec":"147","Dingbat hex":"93","Unicode dec":"129049","Unicode hex":"1F819"},{"Typeface name":"Wingdings 3","Dingbat dec":"148","Dingbat hex":"94","Unicode dec":"129051","Unicode hex":"1F81B"},{"Typeface name":"Wingdings 3","Dingbat dec":"149","Dingbat hex":"95","Unicode dec":"129052","Unicode hex":"1F81C"},{"Typeface name":"Wingdings 3","Dingbat dec":"150","Dingbat hex":"96","Unicode dec":"129054","Unicode hex":"1F81E"},{"Typeface name":"Wingdings 3","Dingbat dec":"151","Dingbat hex":"97","Unicode dec":"129053","Unicode hex":"1F81D"},{"Typeface name":"Wingdings 3","Dingbat dec":"152","Dingbat hex":"98","Unicode dec":"129055","Unicode hex":"1F81F"},{"Typeface name":"Wingdings 3","Dingbat dec":"153","Dingbat hex":"99","Unicode dec":"129024","Unicode hex":"1F800"},{"Typeface name":"Wingdings 3","Dingbat dec":"154","Dingbat hex":"9A","Unicode dec":"129026","Unicode hex":"1F802"},{"Typeface name":"Wingdings 3","Dingbat dec":"155","Dingbat hex":"9B","Unicode dec":"129025","Unicode hex":"1F801"},{"Typeface name":"Wingdings 3","Dingbat dec":"156","Dingbat hex":"9C","Unicode dec":"129027","Unicode hex":"1F803"},{"Typeface name":"Wingdings 3","Dingbat dec":"157","Dingbat hex":"9D","Unicode dec":"129028","Unicode hex":"1F804"},{"Typeface name":"Wingdings 3","Dingbat dec":"158","Dingbat hex":"9E","Unicode dec":"129030","Unicode hex":"1F806"},{"Typeface name":"Wingdings 3","Dingbat dec":"159","Dingbat hex":"9F","Unicode dec":"129029","Unicode hex":"1F805"},{"Typeface name":"Wingdings 3","Dingbat dec":"160","Dingbat hex":"A0","Unicode dec":"129031","Unicode hex":"1F807"},{"Typeface name":"Wingdings 3","Dingbat dec":"161","Dingbat hex":"A1","Unicode dec":"129032","Unicode hex":"1F808"},{"Typeface name":"Wingdings 3","Dingbat dec":"162","Dingbat hex":"A2","Unicode dec":"129034","Unicode hex":"1F80A"},{"Typeface name":"Wingdings 3","Dingbat dec":"163","Dingbat hex":"A3","Unicode dec":"129033","Unicode hex":"1F809"},{"Typeface name":"Wingdings 3","Dingbat dec":"164","Dingbat hex":"A4","Unicode dec":"129035","Unicode hex":"1F80B"},{"Typeface name":"Wingdings 3","Dingbat dec":"165","Dingbat hex":"A5","Unicode dec":"129056","Unicode hex":"1F820"},{"Typeface name":"Wingdings 3","Dingbat dec":"166","Dingbat hex":"A6","Unicode dec":"129058","Unicode hex":"1F822"},{"Typeface name":"Wingdings 3","Dingbat dec":"167","Dingbat hex":"A7","Unicode dec":"129060","Unicode hex":"1F824"},{"Typeface name":"Wingdings 3","Dingbat dec":"168","Dingbat hex":"A8","Unicode dec":"129062","Unicode hex":"1F826"},{"Typeface name":"Wingdings 3","Dingbat dec":"169","Dingbat hex":"A9","Unicode dec":"129064","Unicode hex":"1F828"},{"Typeface name":"Wingdings 3","Dingbat dec":"170","Dingbat hex":"AA","Unicode dec":"129066","Unicode hex":"1F82A"},{"Typeface name":"Wingdings 3","Dingbat dec":"171","Dingbat hex":"AB","Unicode dec":"129068","Unicode hex":"1F82C"},{"Typeface name":"Wingdings 3","Dingbat dec":"172","Dingbat hex":"AC","Unicode dec":"129180","Unicode hex":"1F89C"},{"Typeface name":"Wingdings 3","Dingbat dec":"173","Dingbat hex":"AD","Unicode dec":"129181","Unicode hex":"1F89D"},{"Typeface name":"Wingdings 3","Dingbat dec":"174","Dingbat hex":"AE","Unicode dec":"129182","Unicode hex":"1F89E"},{"Typeface name":"Wingdings 3","Dingbat dec":"175","Dingbat hex":"AF","Unicode dec":"129183","Unicode hex":"1F89F"},{"Typeface name":"Wingdings 3","Dingbat dec":"176","Dingbat hex":"B0","Unicode dec":"129070","Unicode hex":"1F82E"},{"Typeface name":"Wingdings 3","Dingbat dec":"177","Dingbat hex":"B1","Unicode dec":"129072","Unicode hex":"1F830"},{"Typeface name":"Wingdings 3","Dingbat dec":"178","Dingbat hex":"B2","Unicode dec":"129074","Unicode hex":"1F832"},{"Typeface name":"Wingdings 3","Dingbat dec":"179","Dingbat hex":"B3","Unicode dec":"129076","Unicode hex":"1F834"},{"Typeface name":"Wingdings 3","Dingbat dec":"180","Dingbat hex":"B4","Unicode dec":"129078","Unicode hex":"1F836"},{"Typeface name":"Wingdings 3","Dingbat dec":"181","Dingbat hex":"B5","Unicode dec":"129080","Unicode hex":"1F838"},{"Typeface name":"Wingdings 3","Dingbat dec":"182","Dingbat hex":"B6","Unicode dec":"129082","Unicode hex":"1F83A"},{"Typeface name":"Wingdings 3","Dingbat dec":"183","Dingbat hex":"B7","Unicode dec":"129081","Unicode hex":"1F839"},{"Typeface name":"Wingdings 3","Dingbat dec":"184","Dingbat hex":"B8","Unicode dec":"129083","Unicode hex":"1F83B"},{"Typeface name":"Wingdings 3","Dingbat dec":"185","Dingbat hex":"B9","Unicode dec":"129176","Unicode hex":"1F898"},{"Typeface name":"Wingdings 3","Dingbat dec":"186","Dingbat hex":"BA","Unicode dec":"129178","Unicode hex":"1F89A"},{"Typeface name":"Wingdings 3","Dingbat dec":"187","Dingbat hex":"BB","Unicode dec":"129177","Unicode hex":"1F899"},{"Typeface name":"Wingdings 3","Dingbat dec":"188","Dingbat hex":"BC","Unicode dec":"129179","Unicode hex":"1F89B"},{"Typeface name":"Wingdings 3","Dingbat dec":"189","Dingbat hex":"BD","Unicode dec":"129084","Unicode hex":"1F83C"},{"Typeface name":"Wingdings 3","Dingbat dec":"190","Dingbat hex":"BE","Unicode dec":"129086","Unicode hex":"1F83E"},{"Typeface name":"Wingdings 3","Dingbat dec":"191","Dingbat hex":"BF","Unicode dec":"129085","Unicode hex":"1F83D"},{"Typeface name":"Wingdings 3","Dingbat dec":"192","Dingbat hex":"C0","Unicode dec":"129087","Unicode hex":"1F83F"},{"Typeface name":"Wingdings 3","Dingbat dec":"193","Dingbat hex":"C1","Unicode dec":"129088","Unicode hex":"1F840"},{"Typeface name":"Wingdings 3","Dingbat dec":"194","Dingbat hex":"C2","Unicode dec":"129090","Unicode hex":"1F842"},{"Typeface name":"Wingdings 3","Dingbat dec":"195","Dingbat hex":"C3","Unicode dec":"129089","Unicode hex":"1F841"},{"Typeface name":"Wingdings 3","Dingbat dec":"196","Dingbat hex":"C4","Unicode dec":"129091","Unicode hex":"1F843"},{"Typeface name":"Wingdings 3","Dingbat dec":"197","Dingbat hex":"C5","Unicode dec":"129092","Unicode hex":"1F844"},{"Typeface name":"Wingdings 3","Dingbat dec":"198","Dingbat hex":"C6","Unicode dec":"129094","Unicode hex":"1F846"},{"Typeface name":"Wingdings 3","Dingbat dec":"199","Dingbat hex":"C7","Unicode dec":"129093","Unicode hex":"1F845"},{"Typeface name":"Wingdings 3","Dingbat dec":"200","Dingbat hex":"C8","Unicode dec":"129095","Unicode hex":"1F847"},{"Typeface name":"Wingdings 3","Dingbat dec":"201","Dingbat hex":"C9","Unicode dec":"11176","Unicode hex":"2BA8"},{"Typeface name":"Wingdings 3","Dingbat dec":"202","Dingbat hex":"CA","Unicode dec":"11177","Unicode hex":"2BA9"},{"Typeface name":"Wingdings 3","Dingbat dec":"203","Dingbat hex":"CB","Unicode dec":"11178","Unicode hex":"2BAA"},{"Typeface name":"Wingdings 3","Dingbat dec":"204","Dingbat hex":"CC","Unicode dec":"11179","Unicode hex":"2BAB"},{"Typeface name":"Wingdings 3","Dingbat dec":"205","Dingbat hex":"CD","Unicode dec":"11180","Unicode hex":"2BAC"},{"Typeface name":"Wingdings 3","Dingbat dec":"206","Dingbat hex":"CE","Unicode dec":"11181","Unicode hex":"2BAD"},{"Typeface name":"Wingdings 3","Dingbat dec":"207","Dingbat hex":"CF","Unicode dec":"11182","Unicode hex":"2BAE"},{"Typeface name":"Wingdings 3","Dingbat dec":"208","Dingbat hex":"D0","Unicode dec":"11183","Unicode hex":"2BAF"},{"Typeface name":"Wingdings 3","Dingbat dec":"209","Dingbat hex":"D1","Unicode dec":"129120","Unicode hex":"1F860"},{"Typeface name":"Wingdings 3","Dingbat dec":"210","Dingbat hex":"D2","Unicode dec":"129122","Unicode hex":"1F862"},{"Typeface name":"Wingdings 3","Dingbat dec":"211","Dingbat hex":"D3","Unicode dec":"129121","Unicode hex":"1F861"},{"Typeface name":"Wingdings 3","Dingbat dec":"212","Dingbat hex":"D4","Unicode dec":"129123","Unicode hex":"1F863"},{"Typeface name":"Wingdings 3","Dingbat dec":"213","Dingbat hex":"D5","Unicode dec":"129124","Unicode hex":"1F864"},{"Typeface name":"Wingdings 3","Dingbat dec":"214","Dingbat hex":"D6","Unicode dec":"129125","Unicode hex":"1F865"},{"Typeface name":"Wingdings 3","Dingbat dec":"215","Dingbat hex":"D7","Unicode dec":"129127","Unicode hex":"1F867"},{"Typeface name":"Wingdings 3","Dingbat dec":"216","Dingbat hex":"D8","Unicode dec":"129126","Unicode hex":"1F866"},{"Typeface name":"Wingdings 3","Dingbat dec":"217","Dingbat hex":"D9","Unicode dec":"129136","Unicode hex":"1F870"},{"Typeface name":"Wingdings 3","Dingbat dec":"218","Dingbat hex":"DA","Unicode dec":"129138","Unicode hex":"1F872"},{"Typeface name":"Wingdings 3","Dingbat dec":"219","Dingbat hex":"DB","Unicode dec":"129137","Unicode hex":"1F871"},{"Typeface name":"Wingdings 3","Dingbat dec":"220","Dingbat hex":"DC","Unicode dec":"129139","Unicode hex":"1F873"},{"Typeface name":"Wingdings 3","Dingbat dec":"221","Dingbat hex":"DD","Unicode dec":"129140","Unicode hex":"1F874"},{"Typeface name":"Wingdings 3","Dingbat dec":"222","Dingbat hex":"DE","Unicode dec":"129141","Unicode hex":"1F875"},{"Typeface name":"Wingdings 3","Dingbat dec":"223","Dingbat hex":"DF","Unicode dec":"129143","Unicode hex":"1F877"},{"Typeface name":"Wingdings 3","Dingbat dec":"224","Dingbat hex":"E0","Unicode dec":"129142","Unicode hex":"1F876"},{"Typeface name":"Wingdings 3","Dingbat dec":"225","Dingbat hex":"E1","Unicode dec":"129152","Unicode hex":"1F880"},{"Typeface name":"Wingdings 3","Dingbat dec":"226","Dingbat hex":"E2","Unicode dec":"129154","Unicode hex":"1F882"},{"Typeface name":"Wingdings 3","Dingbat dec":"227","Dingbat hex":"E3","Unicode dec":"129153","Unicode hex":"1F881"},{"Typeface name":"Wingdings 3","Dingbat dec":"228","Dingbat hex":"E4","Unicode dec":"129155","Unicode hex":"1F883"},{"Typeface name":"Wingdings 3","Dingbat dec":"229","Dingbat hex":"E5","Unicode dec":"129156","Unicode hex":"1F884"},{"Typeface name":"Wingdings 3","Dingbat dec":"230","Dingbat hex":"E6","Unicode dec":"129157","Unicode hex":"1F885"},{"Typeface name":"Wingdings 3","Dingbat dec":"231","Dingbat hex":"E7","Unicode dec":"129159","Unicode hex":"1F887"},{"Typeface name":"Wingdings 3","Dingbat dec":"232","Dingbat hex":"E8","Unicode dec":"129158","Unicode hex":"1F886"},{"Typeface name":"Wingdings 3","Dingbat dec":"233","Dingbat hex":"E9","Unicode dec":"129168","Unicode hex":"1F890"},{"Typeface name":"Wingdings 3","Dingbat dec":"234","Dingbat hex":"EA","Unicode dec":"129170","Unicode hex":"1F892"},{"Typeface name":"Wingdings 3","Dingbat dec":"235","Dingbat hex":"EB","Unicode dec":"129169","Unicode hex":"1F891"},{"Typeface name":"Wingdings 3","Dingbat dec":"236","Dingbat hex":"EC","Unicode dec":"129171","Unicode hex":"1F893"},{"Typeface name":"Wingdings 3","Dingbat dec":"237","Dingbat hex":"ED","Unicode dec":"129172","Unicode hex":"1F894"},{"Typeface name":"Wingdings 3","Dingbat dec":"238","Dingbat hex":"EE","Unicode dec":"129174","Unicode hex":"1F896"},{"Typeface name":"Wingdings 3","Dingbat dec":"239","Dingbat hex":"EF","Unicode dec":"129173","Unicode hex":"1F895"},{"Typeface name":"Wingdings 3","Dingbat dec":"240","Dingbat hex":"F0","Unicode dec":"129175","Unicode hex":"1F897"}];tB.default=wu});var nG=L((Q2)=>{var Iu=Q2&&Q2.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Q2,"__esModule",{value:!0});Q2.hex=Q2.dec=Q2.codePoint=void 0;var _u=Iu(eB()),sB={},Su=String.fromCodePoint?String.fromCodePoint:Pu;for(Dg=0,n3=_u.default;Dg<n3.length;Dg++)cg=n3[Dg],U3=parseInt(cg["Unicode dec"],10),P4={codePoint:U3,string:Su(U3)},sB[cg["Typeface name"].toUpperCase()+"_"+cg["Dingbat dec"]]=P4;var cg,U3,P4,Dg,n3;function R4(n,U){return sB[n.toUpperCase()+"_"+U]}Q2.codePoint=R4;function vu(n,U){return R4(n,parseInt(U,10))}Q2.dec=vu;function Nu(n,U){return R4(n,parseInt(U,16))}Q2.hex=Nu;function Pu(n){if(n<=65535)return String.fromCharCode(n);else{var U=Math.floor((n-65536)/1024)+55296,D=(n-65536)%1024+56320;return String.fromCharCode(U,D)}}});var d4=L((ku)=>{var UG=w1();ku.paragraph=Ru;ku.run=uu;ku._elements=DG;ku._elementsOfType=u4;ku.getDescendantsOfType=du;ku.getDescendants=cG;function Ru(n){return u4("paragraph",n)}function uu(n){return u4("run",n)}function u4(n,U){return DG(function(D){if(D.type===n)return U(D);else return D})}function DG(n){return function U(D){if(D.children){var c=UG.map(D.children,U);D=UG.extend(D,{children:c})}return n(D)}}function du(n,U){return cG(n).filter(function(D){return D.type===U})}function cG(n){var U=[];return gG(n,function(D){U.push(D)}),U}function gG(n,U){if(n.children)n.children.forEach(function(D){gG(D,U),U(D)})}});var fG=L((su)=>{su.uriToZipEntryName=tu;su.replaceFragment=eu;function tu(n,U){if(U.charAt(0)==="/")return U.substr(1);else return n+"/"+U}function eu(n,U){var D=n.indexOf("#");if(D!==-1)n=n.substring(0,D);return n+"#"+U}});var XG=L((Wd)=>{Wd.createBodyReader=cd;Wd._readNumberingProperties=iG;var hG=nG(),Nn=w1(),K1=gU(),FG=f2().Result,R2=f2().warning,Dd=s9(),WG=d4(),xG=fG();function cd(n){return{readXmlElement:function(U){return new TG(n).readXmlElement(U)},readXmlElements:function(U){return new TG(n).readXmlElements(U)}}}function TG(n){var U=[],D=[],c=[],g=n.relationships,f=n.contentTypes,h=n.docxFile,W=n.files,T=n.numbering,x=n.styles;function y(I){var d=I.map(F);return yG(d)}function F(I){if(I.type==="element"){var d=b[I.name];if(d)return d(I);else if(!Object.prototype.hasOwnProperty.call(fd,I.name)){var o=R2("An unrecognised element was ignored: "+I.name);return gg([o])}}return ic()}function i(I){return J(I).map(function(d){return{type:"paragraphProperties",styleId:d.styleId,styleName:d.name,alignment:I.firstOrEmpty("w:jc").attributes["w:val"],numbering:iG(d.styleId,I.firstOrEmpty("w:numPr"),T),indent:X(I.firstOrEmpty("w:ind"))}})}function X(I){return{start:I.attributes["w:start"]||I.attributes["w:left"],end:I.attributes["w:end"]||I.attributes["w:right"],firstLine:I.attributes["w:firstLine"],hanging:I.attributes["w:hanging"]}}function $(I){return B(I).map(function(d){var o=I.firstOrEmpty("w:sz").attributes["w:val"],t=/^[0-9]+$/.test(o)?parseInt(o,10)/2:null;return{type:"runProperties",styleId:d.styleId,styleName:d.name,verticalAlignment:I.firstOrEmpty("w:vertAlign").attributes["w:val"],font:I.firstOrEmpty("w:rFonts").attributes["w:ascii"],fontSize:t,isBold:Y(I.first("w:b")),isUnderline:Q(I.first("w:u")),isItalic:Y(I.first("w:i")),isStrikethrough:Y(I.first("w:strike")),isAllCaps:Y(I.first("w:caps")),isSmallCaps:Y(I.first("w:smallCaps")),highlight:G(I.firstOrEmpty("w:highlight").attributes["w:val"])}})}function Q(I){if(I){var d=I.attributes["w:val"];return d!==void 0&&d!=="false"&&d!=="0"&&d!=="none"}else return!1}function Y(I){if(I){var d=I.attributes["w:val"];return d!=="false"&&d!=="0"}else return!1}function V(I){return I!=="false"&&I!=="0"}function G(I){if(!I||I==="none")return null;else return I}function J(I){return q(I,"w:pStyle","Paragraph",x.findParagraphStyleById)}function B(I){return q(I,"w:rStyle","Run",x.findCharacterStyleById)}function z(I){return q(I,"w:tblStyle","Table",x.findTableStyleById)}function q(I,d,o,t){var c1=[],x1=I.first(d),Z1=null,yn=null;if(x1){if(Z1=x1.attributes["w:val"],Z1){var m1=t(Z1);if(m1)yn=m1.name;else c1.push(Kg(o,Z1))}}return D3({styleId:Z1,name:yn},c1)}function Z(I){var d=I.attributes["w:fldCharType"];if(d==="begin")U.push({type:"begin",fldChar:I}),D=[];else if(d==="end"){var o=U.pop();if(o.type==="begin")o=O(o);if(o.type==="checkbox")return Hn(K1.checkbox({checked:o.checked}))}else if(d==="separate"){var t=U.pop(),c1=O(t);U.push(c1)}return ic()}function M(){var I=Nn.last(U.filter(function(d){return d.type==="hyperlink"}));return I?I.options:null}function O(I){return _(D.join(""),I.type==="begin"?I.fldChar:Dd.emptyElement)}function _(I,d){var o=/^\s*HYPERLINK\s+(\\l\s+)?(?:"(.*)"|([^\\]\S*))/.exec(I);if(o){var t=o[2]===void 0?o[3]:o[2],c1=o[1]===void 0?{href:t}:{anchor:t};return{type:"hyperlink",options:c1}}var x1=/\s*FORMCHECKBOX\s*/.exec(I);if(x1){var Z1=d.firstOrEmpty("w:ffData").firstOrEmpty("w:checkBox"),yn=Z1.first("w:checked"),m1=yn==null?Y(Z1.first("w:default")):Y(yn);return{type:"checkbox",checked:m1}}return{type:"unknown"}}function w(I){return D.push(I.text()),ic()}function H(I){var d=I.attributes["w:font"],o=I.attributes["w:char"],t=hG.hex(d,o);if(t==null&&/^F0..$/.test(o))t=hG.hex(d,o.substring(2));if(t==null)return gg([R2("A w:sym element with an unsupported character was ignored: char "+o+" in font "+d)]);else return Hn(new K1.Text(t.string))}function v(I){return function(d){var o=d.attributes["w:id"];return Hn(new K1.NoteReference({noteType:I,noteId:o}))}}function P(I){return Hn(K1.commentReference({commentId:I.attributes["w:id"]}))}function p(I){return y(I.children)}var b={"w:p":function(I){var d=I.firstOrEmpty("w:pPr"),o=!!d.firstOrEmpty("w:rPr").first("w:del");if(o)return I.children.forEach(function(c1){c.push(c1)}),ic();else{var t=I.children;if(c.length>0)t=c.concat(t),c=[];return s1.map(i(d),y(t),function(c1,x1){return new K1.Paragraph(x1,c1)}).insertExtra()}},"w:r":function(I){return s1.map($(I.firstOrEmpty("w:rPr")),y(I.children),function(d,o){var t=M();if(t!==null)o=[new K1.Hyperlink(o,t)];return new K1.Run(o,d)})},"w:fldChar":Z,"w:instrText":w,"w:t":function(I){return Hn(new K1.Text(I.text()))},"w:tab":function(I){return Hn(new K1.Tab)},"w:noBreakHyphen":function(){return Hn(new K1.Text("‑"))},"w:softHyphen":function(I){return Hn(new K1.Text(""))},"w:sym":H,"w:hyperlink":function(I){var d=I.attributes["r:id"],o=I.attributes["w:anchor"];return y(I.children).map(function(t){function c1(Z1){var yn=I.attributes["w:tgtFrame"]||null;return new K1.Hyperlink(t,Nn.extend({targetFrame:yn},Z1))}if(d){var x1=g.findTargetByRelationshipId(d);if(o)x1=xG.replaceFragment(x1,o);return c1({href:x1})}else if(o)return c1({anchor:o});else return t})},"w:tbl":C,"w:tr":E,"w:tc":N,"w:footnoteReference":v("footnote"),"w:endnoteReference":v("endnote"),"w:commentReference":P,"w:br":function(I){var d=I.attributes["w:type"];if(d==null||d==="textWrapping")return Hn(K1.lineBreak);else if(d==="page")return Hn(K1.pageBreak);else if(d==="column")return Hn(K1.columnBreak);else return gg([R2("Unsupported break type: "+d)])},"w:bookmarkStart":function(I){var d=I.attributes["w:name"];if(d==="_GoBack")return ic();else return Hn(new K1.BookmarkStart({name:d}))},"mc:AlternateContent":function(I){return p(I.firstOrEmpty("mc:Fallback"))},"w:sdt":function(I){var d=y(I.firstOrEmpty("w:sdtContent").children);return d.map(function(o){var t=I.firstOrEmpty("w:sdtPr").first("wordml:checkbox");if(t){var c1=t.first("wordml:checked"),x1=!!c1&&V(c1.attributes["wordml:val"]),Z1=K1.checkbox({checked:x1}),yn=!1,m1=o.map(WG._elementsOfType(K1.types.text,function(KU){if(KU.value.length>0&&!yn)return yn=!0,Z1;else return KU}));if(yn)return m1;else return Z1}else return o})},"w:ins":p,"w:object":p,"w:smartTag":p,"w:drawing":p,"w:pict":function(I){return p(I).toExtra()},"v:roundrect":p,"v:shape":p,"v:textbox":p,"w:txbxContent":p,"wp:inline":h1,"wp:anchor":h1,"v:imagedata":tn,"v:group":p,"v:rect":p};return{readXmlElement:F,readXmlElements:y};function C(I){var d=A(I.firstOrEmpty("w:tblPr"));return y(I.children).flatMap(a).flatMap(function(o){return d.map(function(t){return K1.Table(o,t)})})}function A(I){return z(I).map(function(d){return{styleId:d.styleId,styleName:d.name}})}function E(I){var d=I.firstOrEmpty("w:trPr"),o=!!d.first("w:del");if(o)return ic();var t=!!d.first("w:tblHeader");return y(I.children).map(function(c1){return K1.TableRow(c1,{isHeader:t})})}function N(I){return y(I.children).map(function(d){var o=I.firstOrEmpty("w:tcPr"),t=o.firstOrEmpty("w:gridSpan").attributes["w:val"],c1=t?parseInt(t,10):1,x1=K1.TableCell(d,{colSpan:c1});return x1._vMerge=R(o),x1})}function R(I){var d=I.first("w:vMerge");if(d){var o=d.attributes["w:val"];return o==="continue"||!o}else return null}function a(I){var d=Nn.any(I,function(c1){return c1.type!==K1.types.tableRow});if(d)return r(I),D3(I,[R2("unexpected non-row element in table, cell merging may be incorrect")]);var o=Nn.any(I,function(c1){return Nn.any(c1.children,function(x1){return x1.type!==K1.types.tableCell})});if(o)return r(I),D3(I,[R2("unexpected non-cell element in table row, cell merging may be incorrect")]);var t={};return I.forEach(function(c1){var x1=0;c1.children.forEach(function(Z1){if(Z1._vMerge&&t[x1])t[x1].rowSpan++;else t[x1]=Z1,Z1._vMerge=!1;x1+=Z1.colSpan})}),I.forEach(function(c1){c1.children=c1.children.filter(function(x1){return!x1._vMerge}),c1.children.forEach(function(x1){delete x1._vMerge})}),Hn(I)}function r(I){I.forEach(function(d){var o=WG.getDescendantsOfType(d,K1.types.tableCell);o.forEach(function(t){delete t._vMerge})})}function h1(I){var d=I.getElementsByTagName("a:graphic").getElementsByTagName("a:graphicData").getElementsByTagName("pic:pic").getElementsByTagName("pic:blipFill").getElementsByTagName("a:blip");return yG(d.map(z1.bind(null,I)))}function z1(I,d){var o=I.firstOrEmpty("wp:docPr"),t=o.attributes,c1=J1(t.descr)?t.title:t.descr,x1=nn(d);if(x1===null)return gg([R2("Could not find image file for a:blip element")]);return hD(x1,c1).map(function(Z1){var yn=o.firstOrEmpty("a:hlinkClick"),m1=yn.attributes["r:id"];if(m1){var KU=g.findTargetByRelationshipId(m1);return new K1.Hyperlink([Z1],{href:KU})}else return Z1})}function J1(I){return I==null||/^\s*$/.test(I)}function nn(I){var d=I.attributes["r:embed"],o=I.attributes["r:link"];if(d)return d2(d);else if(o){var t=g.findTargetByRelationshipId(o);return{path:t,read:W.read.bind(W,t)}}else return null}function tn(I){var d=I.attributes["r:id"];if(d)return hD(d2(d),I.attributes["o:title"]);else return gg([R2("A v:imagedata element without a relationship ID was ignored")])}function d2(I){var d=xG.uriToZipEntryName("word",g.findTargetByRelationshipId(I));return{path:d,read:h.read.bind(h,d)}}function hD(I,d){var o=f.findContentType(I.path),t=K1.Image({readImage:I.read,altText:d,contentType:o}),c1=gd[o]?[]:R2("Image of type "+o+" is unlikely to display in web browsers");return D3(t,c1)}function Kg(I,d){return R2(I+" style with ID "+d+" was referenced but not defined in the document")}}function iG(n,U,D){var c=U.firstOrEmpty("w:ilvl").attributes["w:val"],g=U.firstOrEmpty("w:numId").attributes["w:val"];if(c!==void 0&&g!==void 0)return D.findLevel(g,c);if(n!=null){var f=D.findLevelByParagraphStyleId(n);if(f!=null)return f}if(g!==void 0)return D.findLevel(g,"0");return null}var gd={"image/png":!0,"image/gif":!0,"image/jpeg":!0,"image/svg+xml":!0,"image/tiff":!0},fd={"office-word:wrap":!0,"v:shadow":!0,"v:shapetype":!0,"w:annotationRef":!0,"w:bookmarkEnd":!0,"w:sectPr":!0,"w:proofErr":!0,"w:lastRenderedPageBreak":!0,"w:commentRangeStart":!0,"w:commentRangeEnd":!0,"w:del":!0,"w:footnoteRef":!0,"w:endnoteRef":!0,"w:pPr":!0,"w:rPr":!0,"w:tblPr":!0,"w:tblGrid":!0,"w:trPr":!0,"w:tcPr":!0};function gg(n){return new s1(null,null,n)}function ic(){return new s1(null)}function Hn(n){return new s1(n)}function D3(n,U){return new s1(n,null,U)}function s1(n,U,D){this.value=n||[],this.extra=U||[],this._result=new FG({element:this.value,extra:U},D),this.messages=this._result.messages}s1.prototype.toExtra=function(){return new s1(null,c3(this.extra,this.value),this.messages)};s1.prototype.insertExtra=function(){var n=this.extra;if(n&&n.length)return new s1(c3(this.value,n),null,this.messages);else return this};s1.prototype.map=function(n){var U=this._result.map(function(D){return n(D.element)});return new s1(U.value,this.extra,U.messages)};s1.prototype.flatMap=function(n){var U=this._result.flatMap(function(D){return n(D.element)._result});return new s1(U.value.element,c3(this.extra,U.value.extra),U.messages)};s1.map=function(n,U,D){return new s1(D(n.value,U.value),c3(n.extra,U.extra),n.messages.concat(U.messages))};function yG(n){var U=FG.combine(Nn.pluck(n,"_result"));return new s1(Nn.flatten(Nn.pluck(U.value,"element")),Nn.filter(Nn.flatten(Nn.pluck(U.value,"extra")),hd),U.messages)}function c3(n,U){return Nn.flatten([n,U])}function hd(n){return n}});var JG=L((Xd)=>{Xd.DocumentXmlReader=id;var yd=gU(),Fd=f2().Result;function id(n){var U=n.bodyReader;function D(c){var g=c.first("w:body");if(g==null)throw Error("Could not find the body element: are you sure this is a docx file?");var f=U.readXmlElements(g.children).map(function(h){return new yd.Document(h,{notes:n.notes,comments:n.comments})});return new Fd(f.value,f.messages)}return{convertXmlToDocument:D}}});var $G=L((Vd)=>{Vd.readRelationships=$d;Vd.defaultValue=new k4([]);Vd.Relationships=k4;function $d(n){var U=[];return n.children.forEach(function(D){if(D.name==="relationships:Relationship"){var c={relationshipId:D.attributes.Id,target:D.attributes.Target,type:D.attributes.Type};U.push(c)}}),new k4(U)}function k4(n){var U={};n.forEach(function(c){U[c.relationshipId]=c.target});var D={};return n.forEach(function(c){if(!D[c.type])D[c.type]=[];D[c.type].push(c.target)}),{findTargetByRelationshipId:function(c){return U[c]},findTargetsByType:function(c){return D[c]||[]}}}});var QG=L((Zd)=>{Zd.readContentTypesFromXml=Kd;var Gd={png:"png",gif:"gif",jpeg:"jpeg",jpg:"jpeg",tif:"tiff",tiff:"tiff",bmp:"bmp"};Zd.defaultContentTypes=VG({},{});function Kd(n){var U={},D={};return n.children.forEach(function(c){if(c.name==="content-types:Default")U[c.attributes.Extension]=c.attributes.ContentType;if(c.name==="content-types:Override"){var g=c.attributes.PartName;if(g.charAt(0)==="/")g=g.substring(1);D[g]=c.attributes.ContentType}}),VG(D,U)}function VG(n,U){return{findContentType:function(D){var c=n[D];if(c)return c;else{var g=D.split("."),f=g[g.length-1];if(U.hasOwnProperty(f))return U[f];else{var h=Gd[f.toLowerCase()];if(h)return"image/"+h;else return null}}}}}});var YG=L((Hd)=>{var g3=w1();Hd.readNumberingXml=Od;Hd.Numbering=p4;Hd.defaultNumbering=new p4({},{});function p4(n,U,D){var c=g3.flatten(g3.values(U).map(function(W){return g3.values(W.levels)})),g=g3.indexBy(c.filter(function(W){return W.paragraphStyleId!=null}),"paragraphStyleId");function f(W,T){var x=n[W];if(x){var y=U[x.abstractNumId];if(!y)return null;else if(y.numStyleLink==null)return U[x.abstractNumId].levels[T];else{var F=D.findNumberingStyleById(y.numStyleLink);return f(F.numId,T)}}else return null}function h(W){return g[W]||null}return{findLevel:f,findLevelByParagraphStyleId:h}}function Od(n,U){if(!U||!U.styles)throw Error("styles is missing");var D=qd(n),c=Ad(n,D);return new p4(c,D,U.styles)}function qd(n){var U={};return n.getElementsByTagName("w:abstractNum").forEach(function(D){var c=D.attributes["w:abstractNumId"];U[c]=Md(D)}),U}function Md(n){var U={},D=null;if(n.getElementsByTagName("w:lvl").forEach(function(g){var f=g.attributes["w:ilvl"],h=g.firstOrEmpty("w:numFmt").attributes["w:val"],W=h!=="bullet",T=g.firstOrEmpty("w:pStyle").attributes["w:val"];if(f===void 0)D={isOrdered:W,level:"0",paragraphStyleId:T};else U[f]={isOrdered:W,level:f,paragraphStyleId:T}}),D!==null&&U[D.level]===void 0)U[D.level]=D;var c=n.firstOrEmpty("w:numStyleLink").attributes["w:val"];return{levels:U,numStyleLink:c}}function Ad(n){var U={};return n.getElementsByTagName("w:num").forEach(function(D){var c=D.attributes["w:numId"],g=D.first("w:abstractNumId").attributes["w:val"];U[c]={abstractNumId:g}}),U}});var GG=L((Sd)=>{Sd.readStylesXml=wd;Sd.Styles=fg;Sd.defaultStyles=new fg({},{});function fg(n,U,D,c){return{findParagraphStyleById:function(g){return n[g]},findCharacterStyleById:function(g){return U[g]},findTableStyleById:function(g){return D[g]},findNumberingStyleById:function(g){return c[g]}}}fg.EMPTY=new fg({},{},{},{});function wd(n){var U={},D={},c={},g={},f={paragraph:U,character:D,table:c,numbering:g};return n.getElementsByTagName("w:style").forEach(function(h){var W=jd(h),T=f[W.type];if(T&&T[W.styleId]===void 0)T[W.styleId]=W}),new fg(U,D,c,g)}function jd(n){var U=n.attributes["w:type"];if(U==="numbering")return _d(U,n);else{var D=BG(n),c=Id(n);return{type:U,styleId:D,name:c}}}function Id(n){var U=n.first("w:name");return U?U.attributes["w:val"]:null}function _d(n,U){var D=BG(U),c=U.firstOrEmpty("w:pPr").firstOrEmpty("w:numPr").firstOrEmpty("w:numId").attributes["w:val"];return{type:n,numId:c,styleId:D}}function BG(n){return n.attributes["w:styleId"]}});var ZG=L((f3)=>{var Rd=gU(),ud=f2().Result;f3.createFootnotesReader=KG.bind(f3,"footnote");f3.createEndnotesReader=KG.bind(f3,"endnote");function KG(n,U){function D(f){return ud.combine(f.getElementsByTagName("w:"+n).filter(c).map(g))}function c(f){var h=f.attributes["w:type"];return h!=="continuationSeparator"&&h!=="separator"}function g(f){var h=f.attributes["w:id"];return U.readXmlElements(f.children).map(function(W){return Rd.Note({noteType:n,noteId:h,body:W})})}return D}});var bG=L((ad)=>{var kd=gU(),pd=f2().Result;function md(n){function U(c){return pd.combine(c.getElementsByTagName("w:comment").map(D))}function D(c){var g=c.attributes["w:id"];function f(h){return(c.attributes[h]||"").trim()||null}return n.readXmlElements(c.children).map(function(h){return kd.comment({commentId:g,body:h,authorName:f("w:author"),authorInitials:f("w:initials")})})}return U}ad.createCommentsReader=md});var qG=L((Zg1,h3)=>{function zG(n){return n.charAt(0)==="/"}function OG(n){var U=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,D=U.exec(n),c=D[1]||"",g=Boolean(c&&c.charAt(1)!==":");return Boolean(D[2]||g)}h3.exports=process.platform==="win32"?OG:zG;h3.exports.posix=zG;h3.exports.win32=OG});var HG=L((gk)=>{var MG=B1("fs"),rd=B1("url"),ld=B1("os"),td=B1("path").dirname,ed=B1("path").resolve,sd=qG(),Xc=M2();gk.Files=nk;gk.uriToPath=AG;function nk(n){if(n=n||{},!n.externalFileAccess)return{read:function(g){return Xc.reject(Error("could not read external image '"+g+"', external file access is disabled"))}};var U=n.relativeToFile?td(n.relativeToFile):null;function D(g,f){return c(g).then(function(h){return Uk(h,f).caught(function(W){var T="could not open external image: '"+g+"' (document directory: '"+U+`')
|
|
201
|
+
`+W.message;return Xc.reject(Error(T))})})}function c(g){var f=AG(g);if(sd(f))return Xc.resolve(f);else if(U)return Xc.resolve(ed(U,f));else return Xc.reject(Error("could not find external image '"+g+"', path of input document is unknown"))}return{read:D}}var Uk=Xc.promisify(MG.readFile.bind(MG));function AG(n,U){if(!U)U=ld.platform();var D=rd.parse(n);if(Dk(D)||ck(D)){var c=decodeURIComponent(D.path);if(U==="win32"&&/^\/[a-z]:/i.test(c))return c.slice(1);else return c}else throw Error("Could not convert URI to path: "+n)}function Dk(n){return n.protocol==="file:"&&(!n.host||n.host==="localhost")}function ck(n){return!n.protocol&&!n.host}});var vG=L((Bk)=>{Bk.read=Xk;Bk._findPartPaths=_G;var Wk=M2(),xk=gU(),m4=f2().Result,x3=G4(),IG=lB().readXmlFromZipFile,Tk=XG().createBodyReader,yk=JG().DocumentXmlReader,Jc=$G(),LG=QG(),CG=YG(),EG=GG(),wG=ZG(),Fk=bG(),ik=HG().Files;function Xk(n,U,D){U=U||{},D=D||{};var c=new ik({externalFileAccess:D.externalFileAccess,relativeToFile:U.path});return Wk.props({contentTypes:$k(n),partPaths:_G(n),docxFile:n,files:c}).also(function(g){return{styles:Qk(n,g.partPaths.styles)}}).also(function(g){return{numbering:Vk(n,g.partPaths.numbering,g.styles)}}).also(function(g){return{footnotes:W3(g.partPaths.footnotes,g,function(f,h){if(h)return wG.createFootnotesReader(f)(h);else return new m4([])}),endnotes:W3(g.partPaths.endnotes,g,function(f,h){if(h)return wG.createEndnotesReader(f)(h);else return new m4([])}),comments:W3(g.partPaths.comments,g,function(f,h){if(h)return Fk.createCommentsReader(f)(h);else return new m4([])})}}).also(function(g){return{notes:g.footnotes.flatMap(function(f){return g.endnotes.map(function(h){return new xk.Notes(f.concat(h))})})}}).then(function(g){return W3(g.partPaths.mainDocument,g,function(f,h){return g.notes.flatMap(function(W){return g.comments.flatMap(function(T){var x=new yk({bodyReader:f,notes:W,comments:T});return x.convertXmlToDocument(h)})})})})}function _G(n){return Yk(n).then(function(U){var D=jG({docxFile:n,relationships:U,relationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",basePath:"",fallbackPath:"word/document.xml"});if(!n.exists(D))throw Error("Could not find main document part. Are you sure this is a valid .docx file?");return $c({filename:SG(D),readElement:Jc.readRelationships,defaultValue:Jc.defaultValue})(n).then(function(c){function g(f){return jG({docxFile:n,relationships:c,relationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/"+f,basePath:x3.splitPath(D).dirname,fallbackPath:"word/"+f+".xml"})}return{mainDocument:D,comments:g("comments"),endnotes:g("endnotes"),footnotes:g("footnotes"),numbering:g("numbering"),styles:g("styles")}})})}function jG(n){var{docxFile:U,relationships:D,relationshipType:c,basePath:g,fallbackPath:f}=n,h=D.findTargetsByType(c),W=h.map(function(x){return Jk(x3.joinPath(g,x),"/")}),T=W.filter(function(x){return U.exists(x)});if(T.length===0)return f;else return T[0]}function Jk(n,U){if(n.substring(0,U.length)===U)return n.substring(U.length);else return n}function $c(n){return function(U){return IG(U,n.filename).then(function(D){return D?n.readElement(D):n.defaultValue})}}function W3(n,U,D){var c=$c({filename:SG(n),readElement:Jc.readRelationships,defaultValue:Jc.defaultValue});return c(U.docxFile).then(function(g){var f=new Tk({relationships:g,contentTypes:U.contentTypes,docxFile:U.docxFile,numbering:U.numbering,styles:U.styles,files:U.files});return IG(U.docxFile,n).then(function(h){return D(f,h)})})}function SG(n){var U=x3.splitPath(n);return x3.joinPath(U.dirname,"_rels",U.basename+".rels")}var $k=$c({filename:"[Content_Types].xml",readElement:LG.readContentTypesFromXml,defaultValue:LG.defaultContentTypes});function Vk(n,U,D){return $c({filename:U,readElement:function(c){return CG.readNumberingXml(c,{styles:D})},defaultValue:CG.defaultNumbering})(n)}function Qk(n,U){return $c({filename:U,readElement:EG.readStylesXml,defaultValue:EG.defaultStyles})(n)}var Yk=$c({filename:"_rels/.rels",readElement:Jc.readRelationships,defaultValue:Jc.defaultValue})});var RG=L((Hk)=>{var Zk=w1(),bk=M2(),hg=s9();Hk.writeStyleMap=Ok;Hk.readStyleMap=Ak;var zk="http://schemas.zwobble.org/mammoth/style-map",T3="mammoth/style-map",NG="/"+T3;function Ok(n,U){return n.write(T3,U),qk(n).then(function(){return Mk(n)})}function qk(n){var U="word/_rels/document.xml.rels",D="http://schemas.openxmlformats.org/package/2006/relationships",c="{"+D+"}Relationship";return n.read(U,"utf8").then(hg.readString).then(function(g){var f=g.children;PG(f,c,"Id",{Id:"rMammothStyleMap",Type:zk,Target:NG});var h={"":D};return n.write(U,hg.writeString(g,h))})}function Mk(n){var U="[Content_Types].xml",D="http://schemas.openxmlformats.org/package/2006/content-types",c="{"+D+"}Override";return n.read(U,"utf8").then(hg.readString).then(function(g){var f=g.children;PG(f,c,"PartName",{PartName:NG,ContentType:"text/prs.mammoth.style-map"});var h={"":D};return n.write(U,hg.writeString(g,h))})}function PG(n,U,D,c){var g=Zk.find(n,function(f){return f.name===U&&f.attributes[D]===c[D]});if(g)g.attributes=c;else n.push(hg.element(U,c))}function Ak(n){if(n.exists(T3))return n.read(T3,"utf8");else return bk.resolve(null)}});var o4=L((vk)=>{var uG=Wg();function Ek(n,U,D){return a4(uG.element(n,U,{fresh:!1}),D)}function wk(n,U,D){var c=uG.element(n,U,{fresh:!0});return a4(c,D)}function a4(n,U){return{type:"element",tag:n,children:U||[]}}function jk(n){return{type:"text",value:n}}var Ik={type:"forceWrite"};vk.freshElement=wk;vk.nonFreshElement=Ek;vk.elementWithTag=a4;vk.text=jk;vk.forceWrite=Ik;var _k={br:!0,hr:!0,img:!0,input:!0};function Sk(n){return n.children.length===0&&_k[n.tag.tagName]}vk.isVoidElement=Sk});var oG=L((Mg1,aG)=>{var dG=w1(),y3=o4();function pk(n){return pG(mG(n))}function pG(n){var U=[];return n.map(mk).forEach(function(D){r4(U,D)}),U}function mk(n){return ak[n.type](n)}var ak={element:ok,text:kG,forceWrite:kG};function ok(n){return y3.elementWithTag(n.tag,pG(n.children))}function kG(n){return n}function r4(n,U){var D=n[n.length-1];if(U.type==="element"&&!U.tag.fresh&&D&&D.type==="element"&&U.tag.matchesElement(D.tag)){if(U.tag.separator)r4(D.children,y3.text(U.tag.separator));U.children.forEach(function(c){r4(D.children,c)})}else n.push(U)}function mG(n){return rk(n,function(U){return lk[U.type](U)})}function rk(n,U){return dG.flatten(dG.map(n,U),!0)}var lk={element:ek,text:sk,forceWrite:tk};function tk(n){return[n]}function ek(n){var U=mG(n.children);if(U.length===0&&!y3.isVoidElement(n))return[];else return[y3.elementWithTag(n.tag,U)]}function sk(n){if(n.value.length===0)return[];else return[n]}aG.exports=pk});var xg=L((gp)=>{var Vc=o4();gp.freshElement=Vc.freshElement;gp.nonFreshElement=Vc.nonFreshElement;gp.elementWithTag=Vc.elementWithTag;gp.text=Vc.text;gp.forceWrite=Vc.forceWrite;gp.simplify=oG();function rG(n,U){U.forEach(function(D){np(n,D)})}function np(n,U){Up[U.type](n,U)}var Up={element:Dp,text:cp,forceWrite:function(){}};function Dp(n,U){if(Vc.isVoidElement(U))n.selfClosing(U.tag.tagName,U.tag.attributes);else n.open(U.tag.tagName,U.tag.attributes),rG(n,U.children),n.close(U.tag.tagName)}function cp(n,U){n.text(U.value)}gp.write=rG});var Wg=L((Jp)=>{var l4=w1(),ip=xg();Jp.topLevelElement=Xp;Jp.elements=t4;Jp.element=e4;function Xp(n,U){return t4([e4(n,U,{fresh:!0})])}function t4(n){return new lG(n.map(function(U){if(l4.isString(U))return e4(U);else return U}))}function lG(n){this._elements=n}lG.prototype.wrap=function(U){var D=U();for(var c=this._elements.length-1;c>=0;c--)D=this._elements[c].wrapNodes(D);return D};function e4(n,U,D){return D=D||{},new F3(n,U,D)}function F3(n,U,D){var c={};if(l4.isArray(n))n.forEach(function(g){c[g]=!0}),n=n[0];else c[n]=!0;this.tagName=n,this.tagNames=c,this.attributes=U||{},this.fresh=D.fresh,this.separator=D.separator}F3.prototype.matchesElement=function(n){return this.tagNames[n.tagName]&&l4.isEqual(this.attributes||{},n.attributes||{})};F3.prototype.wrap=function(U){return this.wrapNodes(U())};F3.prototype.wrapNodes=function(U){return[ip.elementWithTag(this,U)]};Jp.empty=t4([]);Jp.ignore={wrap:function(){return[]}}});var s4=L((bp)=>{var Gp=w1(),Kp=M2(),Zp=xg();bp.imgElement=tG;function tG(n){return function(U,D){return Kp.when(n(U)).then(function(c){var g={};if(U.altText)g.alt=U.altText;return Gp.extend(g,c),[Zp.freshElement("img",g)]})}}bp.inline=bp.imgElement;bp.dataUri=tG(function(n){return n.readAsBase64String().then(function(U){return{src:"data:"+n.contentType+";base64,"+U}})})});var UK=L((Lp)=>{var sG=w1();Lp.writer=qp;function qp(n){if(n=n||{},n.prettyPrint)return Mp();else return nK()}var i3={div:!0,p:!0,ul:!0,li:!0};function Mp(){var n=0,U=" ",D=[],c=!0,g=!1,f=nK();function h($,Q){if(i3[$])i();if(D.push($),f.open($,Q),i3[$])n++;c=!1}function W($){if(i3[$])n--,i();D.pop(),f.close($)}function T($){F();var Q=X()?$:$.replace(`
|
|
202
|
+
`,`
|
|
203
|
+
`+U);f.text(Q)}function x($,Q){i(),f.selfClosing($,Q)}function y(){return D.length===0||i3[D[D.length-1]]}function F(){if(!g)i(),g=!0}function i(){if(g=!1,!c&&y()&&!X()){f._append(`
|
|
204
|
+
`);for(var $=0;$<n;$++)f._append(U)}}function X(){return sG.some(D,function($){return $==="pre"})}return{asString:f.asString,open:h,close:W,text:T,selfClosing:x}}function nK(){var n=[];function U(T,x){var y=g(x);n.push("<"+T+y+">")}function D(T){n.push("</"+T+">")}function c(T,x){var y=g(x);n.push("<"+T+y+" />")}function g(T){return sG.map(T,function(x,y){return" "+y+'="'+Hp(x)+'"'}).join("")}function f(T){n.push(Ap(T))}function h(T){n.push(T)}function W(){return n.join("")}return{asString:W,open:U,close:D,text:f,selfClosing:c,_append:h}}function Ap(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Hp(n){return n.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}});var hK=L((vp)=>{var Ep=w1();function DK(n){return X3(n,n)}function X3(n,U){return function(){return{start:n,end:U}}}function wp(n){var U=n.href||"";if(U)return{start:"[",end:"]("+U+")",anchorPosition:"before"};else return{}}function jp(n){var U=n.src||"",D=n.alt||"";if(U||D)return{start:""};else return{}}function cK(n){return function(U,D){return{start:D?`
|
|
205
|
+
`:"",end:D?"":`
|
|
206
|
+
`,list:{isOrdered:n.isOrdered,indent:D?D.indent+1:0,count:0}}}}function Ip(n,U,D){U=U||{indent:0,isOrdered:!1,count:0},U.count++,D.hasClosed=!1;var c=U.isOrdered?U.count+".":"-",g=fK("\t",U.indent)+c+" ";return{start:g,end:function(){if(!D.hasClosed)return D.hasClosed=!0,`
|
|
207
|
+
`}}}var gK={p:X3("",`
|
|
208
|
+
|
|
209
|
+
`),br:X3("",`
|
|
210
|
+
`),ul:cK({isOrdered:!1}),ol:cK({isOrdered:!0}),li:Ip,strong:DK("__"),em:DK("*"),a:wp,img:jp};(function(){for(var n=1;n<=6;n++)gK["h"+n]=X3(fK("#",n)+" ",`
|
|
211
|
+
|
|
212
|
+
`)})();function fK(n,U){return Array(U+1).join(n)}function _p(){var n=[],U=[],D=null,c={};function g(y,F){F=F||{};var i=gK[y]||function(){return{}},X=i(F,D,c);if(U.push({end:X.end,list:D}),X.list)D=X.list;var $=X.anchorPosition==="before";if($)f(F);if(n.push(X.start||""),!$)f(F)}function f(y){if(y.id)n.push('<a id="'+y.id+'"></a>')}function h(y){var F=U.pop();D=F.list;var i=Ep.isFunction(F.end)?F.end():F.end;n.push(i||"")}function W(y,F){g(y,F),h(y)}function T(y){n.push(Sp(y))}function x(){return n.join("")}return{asString:x,open:g,close:h,text:T,selfClosing:W}}vp.writer=_p;function Sp(n){return n.replace(/\\/g,"\\\\").replace(/([\`\*_\{\}\[\]\(\)\#\+\-\.\!])/g,"\\$1")}});var WK=L((dp)=>{var Pp=UK(),Rp=hK();dp.writer=up;function up(n){if(n=n||{},n.outputFormat==="markdown")return Rp.writer();else return Pp.writer(n)}});var FK=L((ep)=>{var YU=w1(),xK=M2(),J3=gU(),Pn=Wg(),Uh=f2(),pp=s4(),f1=xg(),mp=WK();ep.DocumentConverter=ap;function ap(n){return{convertToHtml:function(U){var D=YU.indexBy(U.type===J3.types.document?U.comments:[],"commentId"),c=new op(n,D);return c.convertToHtml(U)}}}function op(n,U){var D=1,c=[],g=[];n=YU.extend({ignoreEmptyParagraphs:!0},n);var f=n.idPrefix===void 0?"":n.idPrefix,h=n.ignoreEmptyParagraphs,W=Pn.topLevelElement("p"),T=n.styleMap||[];function x(A){var E=[],N=F(A,E,{}),R=[];yK(N,function(r){if(r.type==="deferred")R.push(r)});var a={};return xK.mapSeries(R,function(r){return r.value().then(function(h1){a[r.id]=h1})}).then(function(){function r(z1){return nh(z1,function(J1){if(J1.type==="deferred")return a[J1.id];else if(J1.children)return[YU.extend({},J1,{children:r(J1.children)})];else return[J1]})}var h1=mp.writer({prettyPrint:n.prettyPrint,outputFormat:n.outputFormat});return f1.write(h1,f1.simplify(r(N))),new Uh.Result(h1.asString(),E)})}function y(A,E,N){return nh(A,function(R){return F(R,E,N)})}function F(A,E,N){if(!N)throw Error("options not set");var R=C[A.type];if(R)return R(A,E,N);else return[]}function i(A,E,N){return X(A,E).wrap(function(){var R=y(A.children,E,N);if(h)return R;else return[f1.forceWrite].concat(R)})}function X(A,E){var N=V(A);if(N)return N.to;else{if(A.styleId)E.push(TK("paragraph",A));return W}}function $(A,E,N){var R=function(){return y(A.children,E,N)},a=[];if(A.highlight!==null){var r=Y({type:"highlight",color:A.highlight});if(r)a.push(r)}if(A.isSmallCaps)a.push(Q("smallCaps"));if(A.isAllCaps)a.push(Q("allCaps"));if(A.isStrikethrough)a.push(Q("strikethrough","s"));if(A.isUnderline)a.push(Q("underline"));if(A.verticalAlignment===J3.verticalAlignment.subscript)a.push(Pn.element("sub",{},{fresh:!1}));if(A.verticalAlignment===J3.verticalAlignment.superscript)a.push(Pn.element("sup",{},{fresh:!1}));if(A.isItalic)a.push(Q("italic","em"));if(A.isBold)a.push(Q("bold","strong"));var h1=Pn.empty,z1=V(A);if(z1)h1=z1.to;else if(A.styleId)E.push(TK("run",A));return a.push(h1),a.forEach(function(J1){R=J1.wrap.bind(J1,R)}),R()}function Q(A,E){var N=Y({type:A});if(N)return N;else if(E)return Pn.element(E,{},{fresh:!1});else return Pn.empty}function Y(A,E){var N=V(A);return N?N.to:E}function V(A){for(var E=0;E<T.length;E++)if(T[E].from.matches(A))return T[E]}function G(A){return function(E,N){return xK.attempt(function(){return A(E,N)}).caught(function(R){return N.push(Uh.error(R)),[]})}}function J(A){return z(A.noteType,A.noteId)}function B(A){return q(A.noteType,A.noteId)}function z(A,E){return Z(A+"-"+E)}function q(A,E){return Z(A+"-ref-"+E)}function Z(A){return f+A}var M=Pn.elements([Pn.element("table",{},{fresh:!0})]);function O(A,E,N){return Y(A,M).wrap(function(){return _(A,E,N)})}function _(A,E,N){var R=YU.findIndex(A.children,function(z1){return!z1.type===J3.types.tableRow||!z1.isHeader});if(R===-1)R=A.children.length;var a;if(R===0)a=y(A.children,E,YU.extend({},N,{isTableHeader:!1}));else{var r=y(A.children.slice(0,R),E,YU.extend({},N,{isTableHeader:!0})),h1=y(A.children.slice(R),E,YU.extend({},N,{isTableHeader:!1}));a=[f1.freshElement("thead",{},r),f1.freshElement("tbody",{},h1)]}return[f1.forceWrite].concat(a)}function w(A,E,N){var R=y(A.children,E,N);return[f1.freshElement("tr",{},[f1.forceWrite].concat(R))]}function H(A,E,N){var R=N.isTableHeader?"th":"td",a=y(A.children,E,N),r={};if(A.colSpan!==1)r.colspan=A.colSpan.toString();if(A.rowSpan!==1)r.rowspan=A.rowSpan.toString();return[f1.freshElement(R,r,[f1.forceWrite].concat(a))]}function v(A,E,N){return Y(A,Pn.ignore).wrap(function(){var R=U[A.commentId],a=g.length+1,r="["+tp(R)+a+"]";return g.push({label:r,comment:R}),[f1.freshElement("a",{href:"#"+z("comment",A.commentId),id:q("comment",A.commentId)},[f1.text(r)])]})}function P(A,E,N){var{label:R,comment:a}=A,r=y(a.body,E,N).concat([f1.nonFreshElement("p",{},[f1.text(" "),f1.freshElement("a",{href:"#"+q("comment",a.commentId)},[f1.text("↑")])])]);return[f1.freshElement("dt",{id:z("comment",a.commentId)},[f1.text("Comment "+R)]),f1.freshElement("dd",{},r)]}function p(A,E,N){return b(A).wrap(function(){return[]})}function b(A){var E=V(A);if(E)return E.to;else if(A.breakType==="line")return Pn.topLevelElement("br");else return Pn.empty}var C={document:function(A,E,N){var R=y(A.children,E,N),a=c.map(function(h1){return A.notes.resolve(h1)}),r=y(a,E,N);return R.concat([f1.freshElement("ol",{},r),f1.freshElement("dl",{},nh(g,function(h1){return P(h1,E,N)}))])},paragraph:i,run:$,text:function(A,E,N){return[f1.text(A.value)]},tab:function(A,E,N){return[f1.text("\t")]},hyperlink:function(A,E,N){var R=A.anchor?"#"+Z(A.anchor):A.href,a={href:R};if(A.targetFrame!=null)a.target=A.targetFrame;var r=y(A.children,E,N);return[f1.nonFreshElement("a",a,r)]},checkbox:function(A){var E={type:"checkbox"};if(A.checked)E.checked="checked";return[f1.freshElement("input",E)]},bookmarkStart:function(A,E,N){var R=f1.freshElement("a",{id:Z(A.name)},[f1.forceWrite]);return[R]},noteReference:function(A,E,N){c.push(A);var R=f1.freshElement("a",{href:"#"+J(A),id:B(A)},[f1.text("["+D+++"]")]);return[f1.freshElement("sup",{},[R])]},note:function(A,E,N){var R=y(A.body,E,N),a=f1.elementWithTag(Pn.element("p",{},{fresh:!1}),[f1.text(" "),f1.freshElement("a",{href:"#"+B(A)},[f1.text("↑")])]),r=R.concat([a]);return f1.freshElement("li",{id:J(A)},r)},commentReference:v,comment:P,image:lp(G(n.convertImage||pp.dataUri)),table:O,tableRow:w,tableCell:H,break:p};return{convertToHtml:x}}var rp=1;function lp(n){return function(U,D,c){return[{type:"deferred",id:rp++,value:function(){return n(U,D,c)}}]}}function TK(n,U){return Uh.warning("Unrecognised "+n+" style: '"+U.styleName+"' (Style ID: "+U.styleId+")")}function nh(n,U){return YU.flatten(n.map(U),!0)}function yK(n,U){n.forEach(function(D){if(U(D),D.children)yK(D.children,U)})}var tp=ep.commentAuthorLabel=function(U){return U.authorInitials||""}});var XK=L((Um)=>{var nm=gU();function iK(n){if(n.type==="text")return n.value;else if(n.type===nm.types.tab)return"\t";else{var U=n.type==="paragraph"?`
|
|
213
|
+
|
|
214
|
+
`:"";return(n.children||[]).map(iK).join("")+U}}Um.convertElementToRawText=iK});var $K=L((Sg1,JK)=>{var Qc=JK.exports=function(n,U){this._tokens=n,this._startIndex=U||0};Qc.prototype.head=function(){return this._tokens[this._startIndex]};Qc.prototype.tail=function(n){return new Qc(this._tokens,this._startIndex+1)};Qc.prototype.toArray=function(){return this._tokens.slice(this._startIndex)};Qc.prototype.end=function(){return this._tokens[this._tokens.length-1]};Qc.prototype.to=function(n){var U=this.head().source,D=n.head()||n.end();return U.to(D.source)}});var VK=L((gm)=>{var cm=$K();gm.Parser=function(n){var U=function(D,c){return D(new cm(c))};return{parseTokens:U}}});var YK=L((hm)=>{hm.none=Object.create({value:function(){throw Error("Called value on none")},isNone:function(){return!0},isSome:function(){return!1},map:function(){return hm.none},flatMap:function(){return hm.none},filter:function(){return hm.none},toArray:function(){return[]},orElse:QK,valueOrElse:QK});function QK(n){if(typeof n=="function")return n();else return n}hm.some=function(n){return new Ln(n)};var Ln=function(n){this._value=n};Ln.prototype.value=function(){return this._value};Ln.prototype.isNone=function(){return!1};Ln.prototype.isSome=function(){return!0};Ln.prototype.map=function(n){return new Ln(n(this._value))};Ln.prototype.flatMap=function(n){return n(this._value)};Ln.prototype.filter=function(n){return n(this._value)?this:hm.none};Ln.prototype.toArray=function(){return[this._value]};Ln.prototype.orElse=function(n){return this};Ln.prototype.valueOrElse=function(n){return this._value};hm.isOption=function(n){return n===hm.none||n instanceof Ln};hm.fromNullable=function(n){if(n==null)return hm.none;return new Ln(n)}});var $3=L((Pg1,BK)=>{BK.exports={failure:function(n,U){if(n.length<1)throw Error("Failure must have errors");return new xn({status:"failure",remaining:U,errors:n})},error:function(n,U){if(n.length<1)throw Error("Failure must have errors");return new xn({status:"error",remaining:U,errors:n})},success:function(n,U,D){return new xn({status:"success",value:n,source:D,remaining:U,errors:[]})},cut:function(n){return new xn({status:"cut",remaining:n,errors:[]})}};var xn=function(n){this._value=n.value,this._status=n.status,this._hasValue=n.value!==void 0,this._remaining=n.remaining,this._source=n.source,this._errors=n.errors};xn.prototype.map=function(n){if(this._hasValue)return new xn({value:n(this._value,this._source),status:this._status,remaining:this._remaining,source:this._source,errors:this._errors});else return this};xn.prototype.changeRemaining=function(n){return new xn({value:this._value,status:this._status,remaining:n,source:this._source,errors:this._errors})};xn.prototype.isSuccess=function(){return this._status==="success"||this._status==="cut"};xn.prototype.isFailure=function(){return this._status==="failure"};xn.prototype.isError=function(){return this._status==="error"};xn.prototype.isCut=function(){return this._status==="cut"};xn.prototype.value=function(){return this._value};xn.prototype.remaining=function(){return this._remaining};xn.prototype.source=function(){return this._source};xn.prototype.errors=function(){return this._errors}});var Dh=L((ym)=>{ym.error=function(n){return new V3(n)};var V3=function(n){this.expected=n.expected,this.actual=n.actual,this._location=n.location};V3.prototype.describe=function(){var n=this._location?this._location.describe()+`:
|
|
215
|
+
`:"";return n+"Expected "+this.expected+`
|
|
216
|
+
but got `+this.actual};V3.prototype.lineNumber=function(){return this._location.lineNumber()};V3.prototype.characterNumber=function(){return this._location.characterNumber()}});var GK=L((im)=>{var ug1=im.fromArray=function(n){var U=0,D=function(){return U<n.length};return new UD({hasNext:D,next:function(){if(!D())throw Error("No more elements");else return n[U++]}})},UD=function(n){this._iterator=n};UD.prototype.map=function(n){var U=this._iterator;return new UD({hasNext:function(){return U.hasNext()},next:function(){return n(U.next())}})};UD.prototype.filter=function(n){var U=this._iterator,D=!1,c=!1,g,f=function(){if(D)return;D=!0,c=!1;while(U.hasNext()&&!c)g=U.next(),c=n(g)};return new UD({hasNext:function(){return f(),c},next:function(){f();var h=g;return D=!1,h}})};UD.prototype.first=function(){var n=this._iterator;if(this._iterator.hasNext())return n.next();else return null};UD.prototype.toArray=function(){var n=[];while(this._iterator.hasNext())n.push(this._iterator.next());return n}});var ch=L((Vm)=>{var Q3=w1(),KK=YK(),Rn=$3(),ZK=Dh(),Xm=GK();Vm.token=function(n,U){var D=U!==void 0;return function(c){var g=c.head();if(g&&g.name===n&&(!D||g.value===U))return Rn.success(g.value,c.tail(),g.source);else{var f=zK({name:n,value:U});return OK(c,f)}}};Vm.tokenOfType=function(n){return Vm.token(n)};Vm.firstOf=function(n,U){if(!Q3.isArray(U))U=Array.prototype.slice.call(arguments,1);return function(D){return Xm.fromArray(U).map(function(c){return c(D)}).filter(function(c){return c.isSuccess()||c.isError()}).first()||OK(D,n)}};Vm.then=function(n,U){return function(D){var c=n(D);if(!c.map)console.log(c);return c.map(U)}};Vm.sequence=function(){var n=Array.prototype.slice.call(arguments,0),U=function(c){var g=Q3.foldl(n,function(h,W){var{result:T,hasCut:x}=h;if(!T.isSuccess())return{result:T,hasCut:x};var y=W(T.remaining());if(y.isCut())return{result:T,hasCut:!0};else if(y.isSuccess()){var F;if(W.isCaptured)F=T.value().withValue(W,y.value());else F=T.value();var i=y.remaining(),X=c.to(i);return{result:Rn.success(F,i,X),hasCut:x}}else if(x)return{result:Rn.error(y.errors(),y.remaining()),hasCut:x};else return{result:y,hasCut:x}},{result:Rn.success(new Tg,c),hasCut:!1}).result,f=c.to(g.remaining());return g.map(function(h){return h.withValue(Vm.sequence.source,f)})};U.head=function(){var c=Q3.find(n,D);return Vm.then(U,Vm.sequence.extract(c))},U.map=function(c){return Vm.then(U,function(g){return c.apply(this,g.toArray())})};function D(c){return c.isCaptured}return U};var Tg=function(n,U){this._values=n||{},this._valuesArray=U||[]};Tg.prototype.withValue=function(n,U){if(n.captureName&&n.captureName in this._values)throw Error('Cannot add second value for capture "'+n.captureName+'"');else{var D=Q3.clone(this._values);D[n.captureName]=U;var c=this._valuesArray.concat([U]);return new Tg(D,c)}};Tg.prototype.get=function(n){if(n.captureName in this._values)return this._values[n.captureName];else throw Error('No value for capture "'+n.captureName+'"')};Tg.prototype.toArray=function(){return this._valuesArray};Vm.sequence.capture=function(n,U){var D=function(){return n.apply(this,arguments)};return D.captureName=U,D.isCaptured=!0,D};Vm.sequence.extract=function(n){return function(U){return U.get(n)}};Vm.sequence.applyValues=function(n){var U=Array.prototype.slice.call(arguments,1);return function(D){var c=U.map(function(g){return D.get(g)});return n.apply(this,c)}};Vm.sequence.source={captureName:"☃source☃"};Vm.sequence.cut=function(){return function(n){return Rn.cut(n)}};Vm.optional=function(n){return function(U){var D=n(U);if(D.isSuccess())return D.map(KK.some);else if(D.isFailure())return Rn.success(KK.none,U);else return D}};Vm.zeroOrMoreWithSeparator=function(n,U){return bK(n,U,!1)};Vm.oneOrMoreWithSeparator=function(n,U){return bK(n,U,!0)};var Jm=Vm.zeroOrMore=function(n){return function(U){var D=[],c;while((c=n(U))&&c.isSuccess())U=c.remaining(),D.push(c.value());if(c.isError())return c;else return Rn.success(D,U)}};Vm.oneOrMore=function(n){return Vm.oneOrMoreWithSeparator(n,$m)};function $m(n){return Rn.success(null,n)}var bK=function(n,U,D){return function(c){var g=n(c);if(g.isSuccess()){var f=Vm.sequence.capture(n,"main"),h=Jm(Vm.then(Vm.sequence(U,f),Vm.sequence.extract(f))),W=h(g.remaining());return Rn.success([g.value()].concat(W.value()),W.remaining())}else if(D||g.isError())return g;else return Rn.success([],c)}};Vm.leftAssociative=function(n,U,D){var c;if(D)c=[{func:D,rule:U}];else c=U;c=c.map(function(f){return Vm.then(f.rule,function(h){return function(W,T){return f.func(W,h,T)}})});var g=Vm.firstOf.apply(null,["rules"].concat(c));return function(f){var h=f,W=n(f);if(!W.isSuccess())return W;var T=g(W.remaining());while(T.isSuccess()){var x=T.remaining(),y=h.to(T.remaining()),F=T.value();W=Rn.success(F(W.value(),y),x,y),T=g(W.remaining())}if(T.isError())return T;return W}};Vm.leftAssociative.firstOf=function(){return Array.prototype.slice.call(arguments,0)};Vm.nonConsuming=function(n){return function(U){return n(U).changeRemaining(U)}};var zK=function(n){if(n.value)return n.name+' "'+n.value+'"';else return n.name};function OK(n,U){var D,c=n.head();if(c)D=ZK.error({expected:U,actual:zK(c),location:c.source});else D=ZK.error({expected:U,actual:"end of tokens"});return Rn.failure([D],n)}});var gh=L((og1,LK)=>{var ag1=LK.exports=function(n,U){var D={asString:function(){return n},range:function(c,g){return new DD(n,U,c,g)}};return D},DD=function(n,U,D,c){this._string=n,this._description=U,this._startIndex=D,this._endIndex=c};DD.prototype.to=function(n){return new DD(this._string,this._description,this._startIndex,n._endIndex)};DD.prototype.describe=function(){var n=this._position(),U=this._description?this._description+`
|
|
217
|
+
`:"";return U+"Line number: "+n.lineNumber+`
|
|
218
|
+
Character number: `+n.characterNumber};DD.prototype.lineNumber=function(){return this._position().lineNumber};DD.prototype.characterNumber=function(){return this._position().characterNumber};DD.prototype._position=function(){var n=this,U=0,D=function(){return n._string.indexOf(`
|
|
219
|
+
`,U)},c=1;while(D()!==-1&&D()<this._startIndex)U=D()+1,c+=1;var g=this._startIndex-U+1;return{lineNumber:c,characterNumber:g}}});var fh=L((rg1,CK)=>{CK.exports=function(n,U,D){if(this.name=n,this.value=U,D)this.source=D}});var jK=L((zm)=>{var wK=ch(),Zm=$3();zm.parser=function(n,U,D){var c={rule:W,leftAssociative:T,rightAssociative:x},g=new hh(D.map(h)),f=wK.firstOf(n,U);function h(i){return{name:i.name,rule:bm(i.ruleBuilder.bind(null,c))}}function W(){return y(g)}function T(i){return y(g.untilExclusive(i))}function x(i){return y(g.untilInclusive(i))}function y(i){return F.bind(null,i)}function F(i,X){var $=f(X);if($.isSuccess())return i.apply($);else return $}return c};function hh(n){function U(h){return new hh(n.slice(0,c().indexOf(h)))}function D(h){return new hh(n.slice(0,c().indexOf(h)+1))}function c(){return n.map(function(h){return h.name})}function g(h){var W,T;while(!0)if(W=f(h.remaining()),W.isSuccess())T=h.source().to(W.source()),h=Zm.success(W.value()(h.value(),T),W.remaining(),T);else if(W.isFailure())return h;else return W}function f(h){return wK.firstOf("infix",n.map(function(W){return W.rule}))(h)}return{apply:g,untilExclusive:U,untilInclusive:D}}zm.infix=function(n,U){function D(c){return zm.infix(n,function(g){var f=U(g);return function(h){var W=f(h);return W.map(function(T){return function(x,y){return c(x,T,y)}})}})}return{name:n,ruleBuilder:U,map:D}};var bm=function(n){var U;return function(D){if(!U)U=n();return U(D)}}});var IK=L((Am)=>{var Wh=fh(),qm=gh();Am.RegexTokeniser=Mm;function Mm(n){n=n.map(function(g){return{name:g.name,regex:new RegExp(g.regex.source,"g")}});function U(g,f){var h=new qm(g,f),W=0,T=[];while(W<g.length){var x=D(g,W,h);W=x.endIndex,T.push(x.token)}return T.push(c(g,h)),T}function D(g,f,h){for(var W=0;W<n.length;W++){var T=n[W].regex;T.lastIndex=f;var x=T.exec(g);if(x){var F=f+x[0].length;if(x.index===f&&F>f){var y=x[1],i=new Wh(n[W].name,y,h.range(f,F));return{token:i,endIndex:F}}}}var F=f+1,i=new Wh("unrecognisedCharacter",g.substring(f,F),h.range(f,F));return{token:i,endIndex:F}}function c(g,f){return new Wh("end",null,f.range(g.length,g.length))}return{tokenise:U}}});var xh=L((Lm)=>{Lm.Parser=VK().Parser;Lm.rules=ch();Lm.errors=Dh();Lm.results=$3();Lm.StringSource=gh();Lm.Token=fh();Lm.bottomUp=jK();Lm.RegexTokeniser=IK().RegexTokeniser;Lm.rule=function(n){var U;return function(D){if(!U)U=n();return U(D)}}});var SK=L((rm)=>{rm.paragraph=Pm;rm.run=Rm;rm.table=um;rm.bold=new on("bold");rm.italic=new on("italic");rm.underline=new on("underline");rm.strikethrough=new on("strikethrough");rm.allCaps=new on("allCaps");rm.smallCaps=new on("smallCaps");rm.highlight=dm;rm.commentReference=new on("commentReference");rm.lineBreak=new Y3({breakType:"line"});rm.pageBreak=new Y3({breakType:"page"});rm.columnBreak=new Y3({breakType:"column"});rm.equalTo=pm;rm.startsWith=mm;function Pm(n){return new on("paragraph",n)}function Rm(n){return new on("run",n)}function um(n){return new on("table",n)}function dm(n){return new _K(n)}function on(n,U){if(U=U||{},this._elementType=n,this._styleId=U.styleId,this._styleName=U.styleName,U.list)this._listIndex=U.list.levelIndex,this._listIsOrdered=U.list.isOrdered}on.prototype.matches=function(n){return n.type===this._elementType&&(this._styleId===void 0||n.styleId===this._styleId)&&(this._styleName===void 0||n.styleName&&this._styleName.operator(this._styleName.operand,n.styleName))&&(this._listIndex===void 0||km(n,this._listIndex,this._listIsOrdered))&&(this._breakType===void 0||this._breakType===n.breakType)};function _K(n){n=n||{},this._color=n.color}_K.prototype.matches=function(n){return n.type==="highlight"&&(this._color===void 0||n.color===this._color)};function Y3(n){n=n||{},this._breakType=n.breakType}Y3.prototype.matches=function(n){return n.type==="break"&&(this._breakType===void 0||n.breakType===this._breakType)};function km(n,U,D){return n.numbering&&n.numbering.level==U&&n.numbering.isOrdered==D}function pm(n){return{operator:am,operand:n}}function mm(n){return{operator:om,operand:n}}function am(n,U){return n.toUpperCase()===U.toUpperCase()}function om(n,U){return U.toUpperCase().indexOf(n.toUpperCase())===0}});var NK=L(($a)=>{var ia=xh(),Xa=ia.RegexTokeniser;$a.tokenise=Ja;var vK="'((?:\\\\.|[^'])*)";function Ja(n){var U="(?:[a-zA-Z\\-_]|\\\\.)",D=new Xa([{name:"identifier",regex:new RegExp("("+U+"(?:"+U+"|[0-9])*)")},{name:"dot",regex:/\./},{name:"colon",regex:/:/},{name:"gt",regex:/>/},{name:"whitespace",regex:/\s+/},{name:"arrow",regex:/=>/},{name:"equals",regex:/=/},{name:"startsWith",regex:/\^=/},{name:"open-paren",regex:/\(/},{name:"close-paren",regex:/\)/},{name:"open-square-bracket",regex:/\[/},{name:"close-square-bracket",regex:/\]/},{name:"string",regex:new RegExp(vK+"'")},{name:"unterminated-string",regex:new RegExp(vK)},{name:"integer",regex:/([0-9]+)/},{name:"choice",regex:/\|/},{name:"bang",regex:/(!)/}]);return D.tokenise(n)}});var dK=L((Ca)=>{var Qa=w1(),u=xh(),Tn=SK(),B3=Wg(),Ya=NK().tokenise,Th=f2();Ca.readHtmlPath=Za;Ca.readDocumentMatcher=Ka;Ca.readStyle=Ba;function Ba(n){return yh(La,n)}function Ga(){return u.rules.sequence(u.rules.sequence.capture(PK()),u.rules.tokenOfType("whitespace"),u.rules.tokenOfType("arrow"),u.rules.sequence.capture(u.rules.optional(u.rules.sequence(u.rules.tokenOfType("whitespace"),u.rules.sequence.capture(RK())).head())),u.rules.tokenOfType("end")).map(function(n,U){return{from:n,to:U.valueOrElse(B3.empty)}})}function Ka(n){return yh(PK(),n)}function PK(){var n=u.rules.sequence,U=function(q,Z){return u.rules.then(u.rules.token("identifier",q),function(){return Z})},D=U("p",Tn.paragraph),c=U("r",Tn.run),g=u.rules.firstOf("p or r or table",D,c),f=u.rules.sequence(u.rules.tokenOfType("dot"),u.rules.sequence.cut(),u.rules.sequence.capture(G3)).map(function(q){return{styleId:q}}),h=u.rules.firstOf("style name matcher",u.rules.then(u.rules.sequence(u.rules.tokenOfType("equals"),u.rules.sequence.cut(),u.rules.sequence.capture(Yc)).head(),function(q){return{styleName:Tn.equalTo(q)}}),u.rules.then(u.rules.sequence(u.rules.tokenOfType("startsWith"),u.rules.sequence.cut(),u.rules.sequence.capture(Yc)).head(),function(q){return{styleName:Tn.startsWith(q)}})),W=u.rules.sequence(u.rules.tokenOfType("open-square-bracket"),u.rules.sequence.cut(),u.rules.token("identifier","style-name"),u.rules.sequence.capture(h),u.rules.tokenOfType("close-square-bracket")).head(),T=u.rules.firstOf("list type",U("ordered-list",{isOrdered:!0}),U("unordered-list",{isOrdered:!1})),x=n(u.rules.tokenOfType("colon"),n.capture(T),n.cut(),u.rules.tokenOfType("open-paren"),n.capture(ba),u.rules.tokenOfType("close-paren")).map(function(q,Z){return{list:{isOrdered:q.isOrdered,levelIndex:Z-1}}});function y(q){var Z=u.rules.firstOf.apply(u.rules.firstOf,["matcher suffix"].concat(q)),M=u.rules.zeroOrMore(Z);return u.rules.then(M,function(O){var _={};return O.forEach(function(w){Qa.extend(_,w)}),_})}var F=n(n.capture(g),n.capture(y([f,W,x]))).map(function(q,Z){return q(Z)}),i=n(u.rules.token("identifier","table"),n.capture(y([f,W]))).map(function(q){return Tn.table(q)}),X=U("b",Tn.bold),$=U("i",Tn.italic),Q=U("u",Tn.underline),Y=U("strike",Tn.strikethrough),V=U("all-caps",Tn.allCaps),G=U("small-caps",Tn.smallCaps),J=n(u.rules.token("identifier","highlight"),u.rules.sequence.capture(u.rules.optional(u.rules.sequence(u.rules.tokenOfType("open-square-bracket"),u.rules.sequence.cut(),u.rules.token("identifier","color"),u.rules.tokenOfType("equals"),u.rules.sequence.capture(Yc),u.rules.tokenOfType("close-square-bracket")).head()))).map(function(q){return Tn.highlight({color:q.valueOrElse(void 0)})}),B=U("comment-reference",Tn.commentReference),z=n(u.rules.token("identifier","br"),n.cut(),u.rules.tokenOfType("open-square-bracket"),u.rules.token("identifier","type"),u.rules.tokenOfType("equals"),n.capture(Yc),u.rules.tokenOfType("close-square-bracket")).map(function(q){switch(q){case"line":return Tn.lineBreak;case"page":return Tn.pageBreak;case"column":return Tn.columnBreak;default:}});return u.rules.firstOf("element type",F,i,X,$,Q,Y,V,G,J,B,z)}function Za(n){return yh(RK(),n)}function RK(){var n=u.rules.sequence.capture,U=u.rules.tokenOfType("whitespace"),D=u.rules.then(u.rules.optional(u.rules.sequence(u.rules.tokenOfType("colon"),u.rules.token("identifier","fresh"))),function(h){return h.map(function(){return!0}).valueOrElse(!1)}),c=u.rules.then(u.rules.optional(u.rules.sequence(u.rules.tokenOfType("colon"),u.rules.token("identifier","separator"),u.rules.tokenOfType("open-paren"),n(Yc),u.rules.tokenOfType("close-paren")).head()),function(h){return h.valueOrElse("")}),g=u.rules.oneOrMoreWithSeparator(G3,u.rules.tokenOfType("choice")),f=u.rules.sequence(n(g),n(u.rules.zeroOrMore(Ma)),n(D),n(c)).map(function(h,W,T,x){var y={},F={};if(W.forEach(function(i){if(i.append&&y[i.name])y[i.name]+=" "+i.value;else y[i.name]=i.value}),T)F.fresh=!0;if(x)F.separator=x;return B3.element(h,y,F)});return u.rules.firstOf("html path",u.rules.then(u.rules.tokenOfType("bang"),function(){return B3.ignore}),u.rules.then(u.rules.zeroOrMoreWithSeparator(f,u.rules.sequence(U,u.rules.tokenOfType("gt"),U)),B3.elements))}var G3=u.rules.then(u.rules.tokenOfType("identifier"),uK),ba=u.rules.tokenOfType("integer"),Yc=u.rules.then(u.rules.tokenOfType("string"),uK),za={n:`
|
|
220
|
+
`,r:"\r",t:"\t"};function uK(n){return n.replace(/\\(.)/g,function(U,D){return za[D]||D})}var Oa=u.rules.sequence(u.rules.tokenOfType("open-square-bracket"),u.rules.sequence.cut(),u.rules.sequence.capture(G3),u.rules.tokenOfType("equals"),u.rules.sequence.capture(Yc),u.rules.tokenOfType("close-square-bracket")).map(function(n,U){return{name:n,value:U,append:!1}}),qa=u.rules.sequence(u.rules.tokenOfType("dot"),u.rules.sequence.cut(),u.rules.sequence.capture(G3)).map(function(n){return{name:"class",value:n,append:!0}}),Ma=u.rules.firstOf("attribute or class",Oa,qa);function yh(n,U){var D=Ya(U),c=u.Parser(),g=c.parseTokens(n,D);if(g.isSuccess())return Th.success(g.value());else return new Th.Result(null,[Th.warning(Aa(U,g))])}function Aa(n,U){return"Did not understand this style mapping, so ignored it: "+n+`
|
|
221
|
+
`+U.errors().map(Ha).join(`
|
|
222
|
+
`)}function Ha(n){return"Error was at character number "+n.characterNumber()+": Expected "+n.expected+" but got "+n.actual}var La=Ga()});var mK=L((Na)=>{Na.readOptions=Sa;var pK=w1(),Ia=Na._defaultStyleMap=["p.Heading1 => h1:fresh","p.Heading2 => h2:fresh","p.Heading3 => h3:fresh","p.Heading4 => h4:fresh","p.Heading5 => h5:fresh","p.Heading6 => h6:fresh","p[style-name='Heading 1'] => h1:fresh","p[style-name='Heading 2'] => h2:fresh","p[style-name='Heading 3'] => h3:fresh","p[style-name='Heading 4'] => h4:fresh","p[style-name='Heading 5'] => h5:fresh","p[style-name='Heading 6'] => h6:fresh","p[style-name='heading 1'] => h1:fresh","p[style-name='heading 2'] => h2:fresh","p[style-name='heading 3'] => h3:fresh","p[style-name='heading 4'] => h4:fresh","p[style-name='heading 5'] => h5:fresh","p[style-name='heading 6'] => h6:fresh","p.Heading => h1:fresh","p[style-name='Heading'] => h1:fresh","r[style-name='Strong'] => strong","p[style-name='footnote text'] => p:fresh","r[style-name='footnote reference'] =>","p[style-name='endnote text'] => p:fresh","r[style-name='endnote reference'] =>","p[style-name='annotation text'] => p:fresh","r[style-name='annotation reference'] =>","p[style-name='Footnote'] => p:fresh","r[style-name='Footnote anchor'] =>","p[style-name='Endnote'] => p:fresh","r[style-name='Endnote anchor'] =>","p:unordered-list(1) => ul > li:fresh","p:unordered-list(2) => ul|ol > li > ul > li:fresh","p:unordered-list(3) => ul|ol > li > ul|ol > li > ul > li:fresh","p:unordered-list(4) => ul|ol > li > ul|ol > li > ul|ol > li > ul > li:fresh","p:unordered-list(5) => ul|ol > li > ul|ol > li > ul|ol > li > ul|ol > li > ul > li:fresh","p:ordered-list(1) => ol > li:fresh","p:ordered-list(2) => ul|ol > li > ol > li:fresh","p:ordered-list(3) => ul|ol > li > ul|ol > li > ol > li:fresh","p:ordered-list(4) => ul|ol > li > ul|ol > li > ul|ol > li > ol > li:fresh","p:ordered-list(5) => ul|ol > li > ul|ol > li > ul|ol > li > ul|ol > li > ol > li:fresh","r[style-name='Hyperlink'] =>","p[style-name='Normal'] => p:fresh","p.Body => p:fresh","p[style-name='Body'] => p:fresh"],_a=Na._standardOptions={externalFileAccess:!1,transformDocument:va,includeDefaultStyleMap:!0,includeEmbeddedStyleMap:!0};function Sa(n){return n=n||{},pK.extend({},_a,n,{customStyleMap:kK(n.styleMap),readStyleMap:function(){var U=this.customStyleMap;if(this.includeEmbeddedStyleMap)U=U.concat(kK(this.embeddedStyleMap));if(this.includeDefaultStyleMap)U=U.concat(Ia);return U}})}function kK(n){if(!n)return[];else if(pK.isString(n))return n.split(`
|
|
223
|
+
`).map(function(U){return U.trim()}).filter(function(U){return U!==""&&U.charAt(0)!=="#"});else return n}function va(n){return n}});var oK=L((ka)=>{var Ra=B1("fs"),K3=M2(),aK=G4();ka.openZip=da;var ua=K3.promisify(Ra.readFile);function da(n){if(n.path)return ua(n.path).then(aK.openArrayBuffer);else if(n.buffer)return K3.resolve(aK.openArrayBuffer(n.buffer));else if(n.file)return K3.resolve(n.file);else return K3.reject(Error("Could not find file in options"))}});var rK=L((ra)=>{var ma=Wg(),aa=xg();ra.element=oa;function oa(n){return function(U){return aa.elementWithTag(ma.element(n),[U])}}});var tK=L((yo)=>{var ta=w1(),lK=vG(),Fh=RG(),ea=FK().DocumentConverter,sa=XK().convertElementToRawText,no=dK().readStyle,Uo=mK().readOptions,Z3=oK(),Do=f2().Result;yo.convertToHtml=co;yo.convertToMarkdown=go;yo.convert=ih;yo.extractRawText=xo;yo.images=s4();yo.transforms=d4();yo.underline=rK();yo.embedStyleMap=To;yo.readEmbeddedStyleMap=fo;function co(n,U){return ih(n,U)}function go(n,U){var D=Object.create(U||{});return D.outputFormat="markdown",ih(n,D)}function ih(n,U){return U=Uo(U),Z3.openZip(n).tap(function(D){return Fh.readStyleMap(D).then(function(c){U.embeddedStyleMap=c})}).then(function(D){return lK.read(D,n,U).then(function(c){return c.map(U.transformDocument)}).then(function(c){return ho(c,U)})})}function fo(n){return Z3.openZip(n).then(Fh.readStyleMap)}function ho(n,U){var D=Wo(U.readStyleMap()),c=ta.extend({},U,{styleMap:D.value}),g=new ea(c);return n.flatMapThen(function(f){return D.flatMapThen(function(h){return g.convertToHtml(f)})})}function Wo(n){return Do.combine((n||[]).map(no)).map(function(U){return U.filter(function(D){return!!D})})}function xo(n){return Z3.openZip(n).then(lK.read).then(function(U){return U.map(sa)})}function To(n,U){return Z3.openZip(n).tap(function(D){return Fh.writeStyleMap(D,U)}).then(function(D){return D.toArrayBuffer()}).then(function(D){return{toArrayBuffer:function(){return D},toBuffer:function(){return Buffer.from(D)}}})}yo.styleMapping=function(){throw Error(`Use a raw string instead of mammoth.styleMapping e.g. "p[style-name='Title'] => h1" instead of mammoth.styleMapping("p[style-name='Title'] => h1")`)}});import{spawn as Fs}from"node:child_process";import{createConnection as is}from"node:net";var QW="x-hono-already-sent";import{STATUS_CODES as Tz,createServer as yz}from"node:http";import{Http2ServerRequest as xD,constants as Fz}from"node:http2";import{Readable as BW}from"node:stream";var Gs=class{#n;constructor(n){this.#n=n,this.raw=n.raw,this.url=n.url?new URL(n.url):null,this.protocol=n.protocol??null}send(n,U){this.#n.send(n,U??{})}raw;binaryType="arraybuffer";get readyState(){return this.#n.readyState}url;protocol;close(n,U){this.#n.close(n,U)}};var YW=(n)=>{return(...U)=>{if(typeof U[0]==="function"){let[D,c]=U;return async function(f,h){let W=await D(f),T=await n(f,W,c);if(T)return T;await h()}}else{let[D,c,g]=U;return(async()=>{let f=await n(D,c,g);if(!f)throw Error("Failed to upgrade WebSocket");return f})()}}};var en=class extends Error{constructor(n,U){super(n,U);this.name="RequestError"}},iz=/^\/[!#$&-;=?-\[\]_a-z~]*$/,Xz=/\/\.\.?(?:[/?#]|$)/,Jz=/^[a-z0-9._-]+(?::(?:[1-5]\d{3,4}|[6-9]\d{3}))?$/,$z=(n,U,D)=>{let c=`${n}://${U}${D}`;if(!Jz.test(U)){let g=new URL(c);if(g.hostname.length!==U.length&&g.hostname!==(U.includes(":")?U.replace(/:\d+$/,""):U).toLowerCase())throw new en("Invalid host header");return g.href}else if(D.length===0)return c+"/";else{if(D.charCodeAt(0)!==47)throw new en("Invalid URL");if(!iz.test(D)||Xz.test(D))return new URL(c).href;return c}},Vz=(n)=>{if(n instanceof en)return n;return new en(n.message,{cause:n})},Qz=global.Request,TD=class extends Qz{constructor(n,U){if(typeof n==="object"&&m2 in n){let D=U!==void 0&&"body"in U&&U.body!=null;if(n[Z2]&&!D)throw TypeError("Cannot construct a Request with a Request object that has already been used.");n=n[m2]()}if(typeof U?.body?.getReader<"u")U.duplex??="half";super(n,U)}},MW=(n)=>{let U=[],D=n.rawHeaders;for(let c=0,g=D.length;c<g;c+=2){let f=D[c];if(f.charCodeAt(0)!==58)U.push([f,D[c+1]])}return new Headers(U)},AW=Symbol("wrapBodyStream"),Yz=new Set(["latin1","binary","hex","base64","base64url"]),Bz=(n)=>n===null||Yz.has(n),d3=Symbol("bodyBufferedBeforeDisconnect"),k3=Symbol("bodyBufferedLengthBeforeDisconnect"),HW=(n,U)=>Buffer.isBuffer(n)?n:Buffer.from(n,U??"utf8"),l3=(n)=>!(n instanceof xD)&&!!n.complete&&!!n.readableAborted&&typeof n.read==="function"&&Bz(n.readableEncoding),GW=(n)=>{if(n.readableDidRead||!l3(n))return;let U=n;U[k3]??=n.readableLength},bg=(n,U)=>{if(n.readableDidRead&&!U||!l3(n))return;let D=n;if(D[d3]!==void 0)return D[d3];let c,g=n.errored;if(g&&g.code!=="ECONNRESET")c=g;else if(D[k3]!==void 0&&n.readableLength!==D[k3])c=zg();else{let f=U??[],h=n.read();if(h!==null)f.push(HW(h,n.readableEncoding));let W=f.length===1?f[0]:Buffer.concat(f);c=W;let T=n.headers["content-length"];if(typeof T==="string"&&/^\d+$/.test(T)){let x=Number(T);if(Number.isSafeInteger(x)&&W.length!==x)c=zg()}}return D[d3]=c,c},KW=(n,U)=>{if(U instanceof Error){n.error(U);return}if(U.length>0)n.enqueue(U);n.close()},Gz=(n,U,D,c,g)=>{let f={method:n,headers:D,signal:g.signal};if(n==="TRACE"){f.method="GET";let h=new TD(U,f);return Object.defineProperty(h,"method",{get(){return"TRACE"}}),h}if(!(n==="GET"||n==="HEAD"))if("rawBody"in c&&c.rawBody instanceof Buffer)f.body=new ReadableStream({start(h){h.enqueue(c.rawBody),h.close()}});else if(c[AW]){let h;f.body=new ReadableStream({async pull(W){try{if(!h){let y=bg(c);if(y!==void 0){KW(W,y);return}}h||=BW.toWeb(c).getReader();let{done:T,value:x}=await h.read();if(T)W.close();else W.enqueue(x)}catch(T){W.error(T)}}})}else{let h=bg(c);if(h!==void 0)f.body=new ReadableStream({start(W){KW(W,h)}});else f.body=BW.toWeb(c)}return new TD(U,f)},m2=Symbol("getRequestCache"),G2=Symbol("requestCache"),yD=Symbol("incomingKey"),Mc=Symbol("urlKey"),LW=Symbol("methodKey"),CW=Symbol("headersKey"),Oc=Symbol("abortControllerKey"),p3=Symbol("getAbortController"),m3=Symbol("abortRequest"),p2=Symbol("bodyBuffer"),Zg=Symbol("bodyReadPromise"),Z2=Symbol("bodyConsumedDirectly"),ZW=Symbol("bodyLockReader"),qc=Symbol("abortReason"),zg=()=>{return TypeError("Body is unusable")},Ac=()=>{return Promise.reject(zg())},Kz=new TextDecoder,Zz=(n)=>{if(n[Z2])return Ac();n[Z2]=!0},bz=(n)=>{return n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)},zz=(n)=>{return(n[CW]||=MW(n[yD])).get("content-type")||""},Oz=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,qz=(n)=>{if(typeof n!=="string"||n.length===0)return"GET";switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"PATCH":case"POST":case"PUT":case"QUERY":return n}let U=n.toUpperCase();switch(U){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"POST":case"PUT":return U;default:return n}},Mz=(n)=>{if(!Oz.test(n))return TypeError(`'${n}' is not a valid HTTP method.`);let U=n.toUpperCase();if(U==="CONNECT"||U==="TRACK"||U==="TRACE"&&n!=="TRACE")return TypeError(`'${n}' HTTP method is unsupported.`)},t3=(n,U,D)=>{if(n[Z2])return Ac();let c=n.method;if(c==="GET"||c==="HEAD")return n[m2]()[U]();let g=Mz(c);if(g)return Promise.reject(g);if(n[G2]){if(c!=="TRACE")return n[G2][U]()}let f=Zz(n);if(f)return f;let h=Az(n);if(h){let W=Promise.resolve(D(h,n));return n[p2]=void 0,W}return Hz(n).then((W)=>{let T=D(W,n);return n[p2]=void 0,T})},Az=(n)=>{let U=n[yD];if("rawBody"in U&&U.rawBody instanceof Buffer)return U.rawBody},bW=(n,U)=>{if(U.errored)return U.errored;let D=n[qc];if(D!==void 0)return D instanceof Error?D:Error(String(D));return Error("Client connection prematurely closed.")},Hz=(n)=>{if(n[p2])return Promise.resolve(n[p2]);if(n[Zg])return n[Zg];let U=n[yD];if(U.readableDidRead)return Ac();let D=bg(U);if(D!==void 0){if(D instanceof Error)return Promise.reject(D);return n[p2]=D,Promise.resolve(D)}let c=new Promise((g,f)=>{let h=[],W=!1,T=(Q)=>{if(W)return;W=!0,$(),Q()},x=(Q)=>{let Y=U.errored??Q;if(!l3(U)||Y&&Y.code!=="ECONNRESET")return!1;return T(()=>{let V=bg(U,h);if(V instanceof Error)f(V);else if(V===void 0)f(Q??bW(n,U));else n[p2]=V,g(V)}),!0},y=(Q)=>{h.push(HW(Q,U.readableEncoding))},F=()=>{T(()=>{let Q=h.length===1?h[0]:Buffer.concat(h);n[p2]=Q,g(Q)})},i=(Q)=>{if(x(Q))return;T(()=>{f(Q)})},X=()=>{if(U.readableEnded){F();return}if(x())return;T(()=>{f(bW(n,U))})},$=()=>{U.off("data",y),U.off("end",F),U.off("error",i),U.off("close",X),n[Zg]=void 0};U.on("data",y),U.on("end",F),U.on("error",i),U.on("close",X),queueMicrotask(()=>{if(W)return;if(U.readableEnded)F();else if(U.errored)i(U.errored);else if(U.destroyed)X()})});return n[Zg]=c,c},n2={get method(){return this[LW]},get url(){return this[Mc]},get headers(){return this[CW]||=MW(this[yD])},[m3](n){if(this[qc]===void 0)this[qc]=n;let U=this[Oc];if(U&&!U.signal.aborted)U.abort(n)},[p3](){if(this[Oc]||=new AbortController,this[qc]!==void 0&&!this[Oc].signal.aborted)this[Oc].abort(this[qc]);return this[Oc]},[m2](){let n=this[p3]();if(this[G2])return this[G2];let U=this.method;if(this[Z2]&&!(U==="GET"||U==="HEAD")){this[p2]=void 0;let D={method:U==="TRACE"?"GET":U,headers:this.headers,signal:n.signal};if(U!=="TRACE")D.body=new ReadableStream({start(g){g.close()}}),D.duplex="half";let c=new TD(this[Mc],D);if(U==="TRACE")Object.defineProperty(c,"method",{get(){return"TRACE"}});return this[G2]=c}return this[G2]=Gz(this.method,this[Mc],this.headers,this[yD],n)},get body(){if(!this[Z2])return this[m2]().body;let n=this[m2]();if(!this[ZW]&&n.body)this[ZW]=n.body.getReader();return n.body},get bodyUsed(){if(this[Z2])return!0;if(this[G2])return this[G2].bodyUsed;return!1}};Object.defineProperty(n2,"signal",{get(){return this[p3]().signal}});["cache","credentials","destination","integrity","mode","redirect","referrer","referrerPolicy","keepalive"].forEach((n)=>{Object.defineProperty(n2,n,{get(){return this[m2]()[n]}})});["clone","formData"].forEach((n)=>{Object.defineProperty(n2,n,{value:function(){if(this[Z2]){if(n==="clone")throw zg();return Ac()}return this[m2]()[n]()}})});Object.defineProperty(n2,"text",{value:function(){return t3(this,"text",(n)=>Kz.decode(n))}});Object.defineProperty(n2,"arrayBuffer",{value:function(){return t3(this,"arrayBuffer",(n)=>bz(n))}});Object.defineProperty(n2,"blob",{value:function(){return t3(this,"blob",(n,U)=>{let D=zz(U);return new Response(n,D?{headers:{"content-type":D}}:void 0).blob()})}});Object.defineProperty(n2,"json",{value:function(){if(this[Z2])return Ac();return this.text().then(JSON.parse)}});Object.defineProperty(n2,Symbol.for("nodejs.util.inspect.custom"),{value:function(n,U,D){return`Request (lightweight) ${D({method:this.method,url:this.url,headers:this.headers,nativeRequest:this[G2]},{...U,depth:n==null?null:n-1})}`}});Object.setPrototypeOf(n2,TD.prototype);var Lz=(n,U)=>{let D=Object.create(n2);D[yD]=n,D[LW]=qz(n.method);let c=n.url||"";if(c[0]!=="/"&&(c.startsWith("http://")||c.startsWith("https://"))){if(n instanceof xD)throw new en("Absolute URL for :path is not allowed in HTTP/2");try{D[Mc]=new URL(c).href}catch(h){throw new en("Invalid absolute URL",{cause:h})}return D}let g=(n instanceof xD?n.authority:n.headers.host)||U;if(!g)throw new en("Missing host header");let f;if(n instanceof xD){if(f=n.scheme,!(f==="http"||f==="https"))throw new en("Unsupported scheme")}else f=n.socket&&n.socket.encrypted?"https":"http";try{D[Mc]=$z(f,g,c)}catch(h){if(h instanceof en)throw h;else throw new en("Invalid URL",{cause:h})}return D},k2="text/plain; charset=UTF-8",a3=Symbol("responseCache"),WD=Symbol("getResponseCache"),K2=Symbol("cache"),Og=global.Response,sn=class n{#n;#U;[WD](){let U=this[K2],D=U&&U[2]instanceof Headers?U[2]:void 0;return delete this[K2],this[a3]||=new Og(this.#n,D?{status:this.#U?.status,statusText:this.#U?.statusText,headers:D}:this.#U)}constructor(U,D){let c;if(this.#n=U,D instanceof Og){let g=D[a3];if(g){this.#U=g,this[WD]();return}this.#U=D instanceof n?D.#U:D,c=new Headers(D.headers)}else this.#U=D;if(U==null||typeof U==="string"||typeof U?.getReader<"u"||U instanceof Blob||U instanceof Uint8Array)this[K2]=[D?.status||200,U??null,c||D?.headers]}get headers(){let U=this[K2];if(U){if(!(U[2]instanceof Headers))U[2]=new Headers(U[2]||(U[1]===null?void 0:{"content-type":k2}));return U[2]}return this[WD]().headers}get status(){return this[K2]?.[0]??this[WD]().status}get ok(){let U=this.status;return U>=200&&U<300}};["body","bodyUsed","redirected","statusText","trailers","type","url"].forEach((n)=>{Object.defineProperty(sn.prototype,n,{get(){return this[WD]()[n]}})});["arrayBuffer","blob","clone","formData","json","text"].forEach((n)=>{Object.defineProperty(sn.prototype,n,{value:function(){return this[WD]()[n]()}})});Object.defineProperty(sn.prototype,Symbol.for("nodejs.util.inspect.custom"),{value:function(n,U,D){return`Response (lightweight) ${D({status:this.status,headers:this.headers,ok:this.ok,nativeResponse:this[a3]},{...U,depth:n==null?null:n-1})}`}});Object.setPrototypeOf(sn,Og);Object.setPrototypeOf(sn.prototype,Og.prototype);var Cz=/^https?:\/\/[!#-;=?-[\]_a-z~A-Z]+$/,Ez=(n)=>{if(n instanceof URL)return n.href;if(Cz.test(n))return n;return new URL(n).href},wz=new Set([301,302,303,307,308]);Object.defineProperty(sn,"redirect",{value:function(U,D=302){if(!wz.has(D))throw RangeError("Invalid status code");return new sn(null,{status:D,headers:{location:Ez(U)}})},writable:!0,configurable:!0});Object.defineProperty(sn,"json",{value:function(U,D){let c=JSON.stringify(U);if(c===void 0)throw TypeError("The data is not JSON serializable");let g=D?.headers,f;if(g){if(f=new Headers(g),!f.has("content-type"))f.set("content-type","application/json")}else f={"content-type":"application/json"};return new sn(c,{status:D?.status??200,statusText:D?.statusText,headers:f})},writable:!0,configurable:!0});async function jz(n){return Promise.race([n,Promise.resolve().then(()=>Promise.resolve(void 0))])}function EW(n,U,D){let c=(W)=>{n.cancel(W).catch(()=>{})};return U.on("close",c),U.on("error",c),(D??n.read()).then(h,g),n.closed.finally(()=>{U.off("close",c),U.off("error",c)});function g(W){if(W)U.destroy(W)}function f(){n.read().then(h,g)}function h({done:W,value:T}){try{if(W)U.end();else if(!U.write(T))U.once("drain",f);else return n.read().then(h,g)}catch(x){g(x)}}}function zW(n,U){if(n.locked)throw TypeError("ReadableStream is locked.");else if(U.destroyed)return;return EW(n.getReader(),U)}var o3=(n,U)=>{let D={};if(!(n instanceof Headers))n=new Headers(n??void 0);if(n.has("set-cookie")){let c=[];for(let[g,f]of n)if(g==="set-cookie")c.push(f);else D[g]=f;if(c.length>0)D["set-cookie"]=c}else for(let[c,g]of n)D[c]=g;if(U)D["content-type"]??=U;return D},qg=Symbol("outgoingEnded"),OW=Symbol("incomingDraining"),Iz=500,_z=67108864,wW=(n)=>{let U=n;if(n.destroyed||U[OW])return;if(U[OW]=!0,n instanceof xD){try{n.stream?.close?.(Fz.NGHTTP2_NO_ERROR)}catch{}return}let D=0,c=()=>{clearTimeout(f),n.off("data",h),n.off("end",c),n.off("error",c)},g=()=>{c();let W=n.socket;if(W&&!W.destroyed){if(typeof W.destroySoon==="function")W.destroySoon();else if(typeof W.destroy==="function")W.destroy()}},f=setTimeout(g,Iz);f.unref?.();let h=(W)=>{if(D+=W.length,D>_z)g()};n.on("data",h),n.on("end",c),n.on("error",c),n.resume()},Sz=(n,U,D,c)=>()=>{if(U.errored)GW(U),n[m3](U.errored.toString());else if(!D.writableFinished)GW(U),n[m3]("Client connection prematurely closed.");if(c&&!U.readableEnded)setTimeout(()=>{if(!U.readableEnded)setTimeout(()=>{wW(U)})})},vz=(n)=>{if(!(K2 in n))return!1;let U=n[K2][1];return U===null||typeof U==="string"||U instanceof Uint8Array},Nz=()=>new Response(null,{status:400}),jW=(n)=>new Response(null,{status:n instanceof Error&&(n.name==="TimeoutError"||n.constructor.name==="TimeoutError")?504:500}),Mg=(n,U)=>{let D=n instanceof Error?n:Error("unknown error",{cause:n});if(D.code==="ERR_STREAM_PREMATURE_CLOSE")console.info("The user aborted a request.");else{if(console.error(n),!U.headersSent)U.writeHead(500,{"Content-Type":"text/plain"});U.end(`Error: ${D.message}`),U.destroy(D)}},r3=(n)=>{if("flushHeaders"in n&&n.writable)n.flushHeaders()},IW=async(n,U)=>{let[D,c,g]=n[K2];if(!g){if(c===null)U.writeHead(D),U.end();else if(typeof c==="string")U.writeHead(D,{"Content-Type":k2,"Content-Length":Buffer.byteLength(c)}),U.end(c);else if(c instanceof Uint8Array)U.writeHead(D,{"Content-Type":k2,"Content-Length":c.byteLength}),U.end(c);else if(c instanceof Blob)U.writeHead(D,{"Content-Type":k2,"Content-Length":c.size}),U.end(new Uint8Array(await c.arrayBuffer()));else U.writeHead(D,{"Content-Type":k2}),r3(U),await zW(c,U)?.catch((h)=>Mg(h,U));U[qg]?.();return}let f=!1;if(g instanceof Headers)f=g.has("content-length"),g=o3(g,c===null?void 0:k2);else if(Array.isArray(g)){let h=new Headers(g);f=h.has("content-length"),g=o3(h,c===null?void 0:k2)}else for(let h in g)if(h.length===14&&h.toLowerCase()==="content-length"){f=!0;break}if(!f){if(typeof c==="string")g["Content-Length"]=Buffer.byteLength(c);else if(c instanceof Uint8Array)g["Content-Length"]=c.byteLength;else if(c instanceof Blob)g["Content-Length"]=c.size}if(U.writeHead(D,g),c==null)U.end();else if(typeof c==="string"||c instanceof Uint8Array)U.end(c);else if(c instanceof Blob)U.end(new Uint8Array(await c.arrayBuffer()));else r3(U),await zW(c,U)?.catch((h)=>Mg(h,U));U[qg]?.()},_W=(n)=>typeof n.then==="function",Pz=async(n,U,D={})=>{if(_W(n))if(D.errorHandler)try{n=await n}catch(g){let f=await D.errorHandler(g);if(!f)return;n=f}else n=await n.catch(jW);if(K2 in n)return IW(n,U);let c=o3(n.headers,n.body===null?void 0:k2);if(n.body){let g=n.body.getReader(),f=[],h=!1,W=void 0;if(c["transfer-encoding"]!=="chunked"){let T=2;for(let x=0;x<T;x++){W||=g.read();let y=await jz(W).catch((F)=>{console.error(F),h=!0});if(!y){if(x===1){await new Promise((F)=>setTimeout(F)),T=3;continue}break}if(W=void 0,y.value)f.push(y.value);if(y.done){h=!0;break}}if(h&&!("content-length"in c))c["content-length"]=f.reduce((x,y)=>x+y.length,0)}if(U.writeHead(n.status,c),f.forEach((T)=>{U.write(T)}),h)U.end();else{if(f.length===0)r3(U);await EW(g,U,W)}}else if(c[QW]);else U.writeHead(n.status,c),U.end();U[qg]?.()},Rz=(n,U={})=>{let D=U.autoCleanupIncoming??!0;if(U.overrideGlobalObjects!==!1&&global.Request!==TD)Object.defineProperty(global,"Request",{value:TD}),Object.defineProperty(global,"Response",{value:sn});return async(c,g)=>{let f,h,W=!1,T=!1,x=()=>{if(!h||T)return;T=!0,g.on("close",Sz(h,c,g,W))};try{if(h=Lz(c,U.hostname),W=D&&!(c.method==="GET"||c.method==="HEAD"),W){if(c[AW]=!0,c instanceof xD)g[qg]=()=>{if(!c.readableEnded)setTimeout(()=>{if(!c.readableEnded)setTimeout(()=>{c.destroy(),g.destroy()})})}}if(f=n(h,{incoming:c,outgoing:g}),!_W(f)&&vz(f)){if(W&&!c.readableEnded)g.once("finish",()=>{if(!c.readableEnded)wW(c)});return IW(f,g)}x()}catch(y){if(!f)if(U.errorHandler){if(x(),f=await U.errorHandler(h?y:Vz(y)),!f)return}else if(!h)f=Nz();else f=jW(y);else return Mg(y,g)}try{return await Pz(f,g,U)}catch(y){return Mg(y,g)}}},uz=globalThis.CloseEvent??class extends Event{#n;constructor(n,U={}){super(n,U);this.#n=U}get wasClean(){return this.#n.wasClean??!1}get code(){return this.#n.code??0}get reason(){return this.#n.reason??""}},dz=globalThis.ErrorEvent??class extends Event{#n;constructor(n,U={}){super(n,U);this.#n=U}get message(){return this.#n.message??""}get filename(){return this.#n.filename??""}get lineno(){return this.#n.lineno??0}get colno(){return this.#n.colno??0}get error(){return this.#n.error??null}},kz=()=>Symbol("connection"),SW=Symbol("CONNECTION_SYMBOL_KEY"),vW=Symbol("WAIT_FOR_WEBSOCKET_SYMBOL"),pz=new Set(["connection","content-length","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade","sec-websocket-accept","sec-websocket-extensions","sec-websocket-protocol"]),NW=(n,U)=>{if(!U)return;U.forEach((D,c)=>{if(pz.has(c.toLowerCase()))return;n.push(`${c}: ${D}`)})},qW=(n,U,D)=>{let c=["Connection: close","Content-Length: 0"];NW(c,D),n.end(`HTTP/1.1 ${U.toString()} ${Tz[U]??""}\r
|
|
224
|
+
${c.join(`\r
|
|
225
|
+
`)}\r
|
|
226
|
+
\r
|
|
227
|
+
`)},mz=(n)=>{let U=n.socket.encrypted?"https":"http",D=new URL(n.url??"/",`${U}://${n.headers.host??"localhost"}`),c=new Headers;for(let g in n.headers){let f=n.headers[g];if(!f)continue;c.append(g,Array.isArray(f)?f[0]:f)}return new Request(D,{headers:c})},az=(n)=>{let{server:U,fetchCallback:D,wss:c}=n,g=new Map;c.on("connection",(W,T)=>{let x=g.get(T);if(x)x.resolve(W),g.delete(T)});let f=(W)=>{let T=g.get(W);if(T)g.delete(W),T.reject(Error("WebSocket handshake aborted"))},h=(W,T)=>{return new Promise((x,y)=>{g.set(W,{resolve:x,reject:y,connectionSymbol:T})})};U.on("upgrade",async(W,T,x)=>{if(W.headers.upgrade?.toLowerCase()!=="websocket")return;let y={incoming:W,outgoing:void 0,wss:c,[vW]:h},F=400,i;try{let Y=await D(mz(W),y);if(Y instanceof Response)F=Y.status,i=Y.headers}catch{if(U.listenerCount("upgrade")===1)qW(T,500);return}let X=g.get(W);if(!X||X.connectionSymbol!==y[SW]){if(f(W),U.listenerCount("upgrade")===1)qW(T,F,i);return}let $=(Y)=>{NW(Y,i)},Q=()=>f(W);T.once("close",Q),c.on("headers",$);try{c.handleUpgrade(W,T,x,(Y)=>{T.off("close",Q),c.emit("connection",Y,W)})}finally{c.off("headers",$)}}),U.on("close",()=>{c.close()})},As=YW(async(n,U,D)=>{if(n.req.header("upgrade")?.toLowerCase()!=="websocket")return;let c=n.env,g=c[vW];if(!g||!c.incoming)return new Response(null,{status:500});let f=kz();return c[SW]=f,(async()=>{let h;try{h=await g(c.incoming,f)}catch{return}let W=[],T=(F,i)=>{W.push([F,i])};h.on("message",T);let x={binaryType:"arraybuffer",close(F,i){h.close(F,i)},protocol:h.protocol,raw:h,get readyState(){return h.readyState},send(F,i){h.send(F,{compress:i?.compress})},url:new URL(n.req.url)};try{U?.onOpen?.(new Event("open"),x)}catch(F){(D?.onError??console.error)(F)}let y=(F,i)=>{let X=Array.isArray(F)?F:[F];for(let $ of X)try{U?.onMessage?.(new MessageEvent("message",{data:i?$ instanceof ArrayBuffer?$:$.buffer.slice($.byteOffset,$.byteOffset+$.byteLength):typeof $==="string"?$:Buffer.from($).toString("utf-8")}),x)}catch(Q){(D?.onError??console.error)(Q)}};h.off("message",T);for(let F of W)y(...F);h.on("message",(F,i)=>{y(F,i)}),h.on("close",(F,i)=>{try{U?.onClose?.(new uz("close",{code:F,reason:i.toString()}),x)}catch(X){(D?.onError??console.error)(X)}}),h.on("error",(F)=>{try{U?.onError?.(new dz("error",{error:F}),x)}catch(i){(D?.onError??console.error)(i)}})})(),new Response}),oz=(n)=>{let U=n.fetch,D=Rz(U,{hostname:n.hostname,overrideGlobalObjects:n.overrideGlobalObjects,autoCleanupIncoming:n.autoCleanupIncoming}),c=(n.createServer||yz)(n.serverOptions||{},D);if(n.websocket&&n.websocket.server){if(n.websocket.server.options.noServer!==!0)throw Error("WebSocket server must be created with { noServer: true } option");az({server:c,fetchCallback:U,wss:n.websocket.server})}return c},PW=(n,U)=>{let D=oz(n);return D.listen(n?.port??3000,n.hostname,()=>{let c=D.address();U&&U(c)}),D};class ZU extends Error{constructor(n,U,D){super(D);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=U,this.exitCode=n,this.nestedError=void 0}}class FD extends ZU{constructor(n){super(1,"commander.invalidArgument",n);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}class Ag{constructor(n,U){switch(this.description=U||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,n[0]){case"<":this.required=!0,this._name=n.slice(1,-1);break;case"[":this.required=!1,this._name=n.slice(1,-1);break;default:this.required=!0,this._name=n;break}if(this._name.endsWith("..."))this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_collectValue(n,U){if(U===this.defaultValue||!Array.isArray(U))return[n];return U.push(n),U}default(n,U){return this.defaultValue=n,this.defaultValueDescription=U,this}argParser(n){return this.parseArg=n,this}choices(n){return this.argChoices=n.slice(),this.parseArg=(U,D)=>{if(!this.argChoices.includes(U))throw new FD(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(U,D);return U},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function Hg(n){let U=n.name()+(n.variadic===!0?"...":"");return n.required?"<"+U+">":"["+U+"]"}import{EventEmitter as ez}from"node:events";import nf from"node:child_process";import b2 from"node:path";import Cg from"node:fs";import T1 from"node:process";import{stripVTControlCharacters as sz}from"node:util";import{stripVTControlCharacters as rz}from"node:util";class Lg{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(n){this.helpWidth=this.helpWidth??n.helpWidth??80}visibleCommands(n){let U=n.commands.filter((c)=>!c._hidden),D=n._getHelpCommand();if(D&&!D._hidden)U.push(D);if(this.sortSubcommands)U.sort((c,g)=>{return c.name().localeCompare(g.name())});return U}compareOptions(n,U){let D=(c)=>{return c.short?c.short.replace(/^-/,""):c.long.replace(/^--/,"")};return D(n).localeCompare(D(U))}visibleOptions(n){let U=n.options.filter((c)=>!c.hidden),D=n._getHelpOption();if(D&&!D.hidden){let c=D.short&&n._findOption(D.short),g=D.long&&n._findOption(D.long);if(!c&&!g)U.push(D);else if(D.long&&!g)U.push(n.createOption(D.long,D.description));else if(D.short&&!c)U.push(n.createOption(D.short,D.description))}if(this.sortOptions)U.sort(this.compareOptions);return U}visibleGlobalOptions(n){if(!this.showGlobalOptions)return[];let U=[];for(let D=n.parent;D;D=D.parent){let c=D.options.filter((g)=>!g.hidden);U.push(...c)}if(this.sortOptions)U.sort(this.compareOptions);return U}visibleArguments(n){if(n._argsDescription)n.registeredArguments.forEach((U)=>{U.description=U.description||n._argsDescription[U.name()]||""});if(n.registeredArguments.find((U)=>U.description))return n.registeredArguments;return[]}subcommandTerm(n){let U=n.registeredArguments.map((D)=>Hg(D)).join(" ");return n._name+(n._aliases[0]?"|"+n._aliases[0]:"")+(n.options.length?" [options]":"")+(U?" "+U:"")}optionTerm(n){return n.flags}argumentTerm(n){return n.name()}longestSubcommandTermLength(n,U){return U.visibleCommands(n).reduce((D,c)=>{return Math.max(D,this.displayWidth(U.styleSubcommandTerm(U.subcommandTerm(c))))},0)}longestOptionTermLength(n,U){return U.visibleOptions(n).reduce((D,c)=>{return Math.max(D,this.displayWidth(U.styleOptionTerm(U.optionTerm(c))))},0)}longestGlobalOptionTermLength(n,U){return U.visibleGlobalOptions(n).reduce((D,c)=>{return Math.max(D,this.displayWidth(U.styleOptionTerm(U.optionTerm(c))))},0)}longestArgumentTermLength(n,U){return U.visibleArguments(n).reduce((D,c)=>{return Math.max(D,this.displayWidth(U.styleArgumentTerm(U.argumentTerm(c))))},0)}commandUsage(n){let U=n._name;if(n._aliases[0])U=U+"|"+n._aliases[0];let D="";for(let c=n.parent;c;c=c.parent)D=c.name()+" "+D;return D+U+" "+n.usage()}commandDescription(n){return n.description()}subcommandDescription(n){return n.summary()||n.description()}optionDescription(n){let U=[];if(n.argChoices)U.push(`choices: ${n.argChoices.map((D)=>JSON.stringify(D)).join(", ")}`);if(n.defaultValue!==void 0){if(n.required||n.optional||n.isBoolean()&&typeof n.defaultValue==="boolean")U.push(`default: ${n.defaultValueDescription||JSON.stringify(n.defaultValue)}`)}if(n.presetArg!==void 0&&n.optional)U.push(`preset: ${JSON.stringify(n.presetArg)}`);if(n.envVar!==void 0)U.push(`env: ${n.envVar}`);if(U.length>0){let D=`(${U.join(", ")})`;if(n.description)return`${n.description} ${D}`;return D}return n.description}argumentDescription(n){let U=[];if(n.argChoices)U.push(`choices: ${n.argChoices.map((D)=>JSON.stringify(D)).join(", ")}`);if(n.defaultValue!==void 0)U.push(`default: ${n.defaultValueDescription||JSON.stringify(n.defaultValue)}`);if(U.length>0){let D=`(${U.join(", ")})`;if(n.description)return`${n.description} ${D}`;return D}return n.description}formatItemList(n,U,D){if(U.length===0)return[];return[D.styleTitle(n),...U,""]}groupItems(n,U,D){let c=new Map;return n.forEach((g)=>{let f=D(g);if(!c.has(f))c.set(f,[])}),U.forEach((g)=>{let f=D(g);if(!c.has(f))c.set(f,[]);c.get(f).push(g)}),c}formatHelp(n,U){let D=U.padWidth(n,U),c=U.helpWidth??80;function g(y,F){return U.formatItem(y,D,F,U)}let f=[`${U.styleTitle("Usage:")} ${U.styleUsage(U.commandUsage(n))}`,""],h=U.commandDescription(n);if(h.length>0)f=f.concat([U.boxWrap(U.styleCommandDescription(h),c),""]);let W=U.visibleArguments(n).map((y)=>{return g(U.styleArgumentTerm(U.argumentTerm(y)),U.styleArgumentDescription(U.argumentDescription(y)))});if(f=f.concat(this.formatItemList("Arguments:",W,U)),this.groupItems(n.options,U.visibleOptions(n),(y)=>y.helpGroupHeading??"Options:").forEach((y,F)=>{let i=y.map((X)=>{return g(U.styleOptionTerm(U.optionTerm(X)),U.styleOptionDescription(U.optionDescription(X)))});f=f.concat(this.formatItemList(F,i,U))}),U.showGlobalOptions){let y=U.visibleGlobalOptions(n).map((F)=>{return g(U.styleOptionTerm(U.optionTerm(F)),U.styleOptionDescription(U.optionDescription(F)))});f=f.concat(this.formatItemList("Global Options:",y,U))}return this.groupItems(n.commands,U.visibleCommands(n),(y)=>y.helpGroup()||"Commands:").forEach((y,F)=>{let i=y.map((X)=>{return g(U.styleSubcommandTerm(U.subcommandTerm(X)),U.styleSubcommandDescription(U.subcommandDescription(X)))});f=f.concat(this.formatItemList(F,i,U))}),f.join(`
|
|
228
|
+
`)}displayWidth(n){return rz(n).length}styleTitle(n){return n}styleUsage(n){return n.split(" ").map((U)=>{if(U==="[options]")return this.styleOptionText(U);if(U==="[command]")return this.styleSubcommandText(U);if(U[0]==="["||U[0]==="<")return this.styleArgumentText(U);return this.styleCommandText(U)}).join(" ")}styleCommandDescription(n){return this.styleDescriptionText(n)}styleOptionDescription(n){return this.styleDescriptionText(n)}styleSubcommandDescription(n){return this.styleDescriptionText(n)}styleArgumentDescription(n){return this.styleDescriptionText(n)}styleDescriptionText(n){return n}styleOptionTerm(n){return this.styleOptionText(n)}styleSubcommandTerm(n){return n.split(" ").map((U)=>{if(U==="[options]")return this.styleOptionText(U);if(U[0]==="["||U[0]==="<")return this.styleArgumentText(U);return this.styleSubcommandText(U)}).join(" ")}styleArgumentTerm(n){return this.styleArgumentText(n)}styleOptionText(n){return n}styleArgumentText(n){return n}styleSubcommandText(n){return n}styleCommandText(n){return n}padWidth(n,U){return Math.max(U.longestOptionTermLength(n,U),U.longestGlobalOptionTermLength(n,U),U.longestSubcommandTermLength(n,U),U.longestArgumentTermLength(n,U))}preformatted(n){return/\n[^\S\r\n]/.test(n)}formatItem(n,U,D,c){let f=" ".repeat(2);if(!D)return f+n;let h=n.padEnd(U+n.length-c.displayWidth(n)),W=2,x=(this.helpWidth??80)-U-W-2,y;if(x<this.minWidthToWrap||c.preformatted(D))y=D;else y=c.boxWrap(D,x).replace(/\n/g,`
|
|
229
|
+
`+" ".repeat(U+W));return f+h+" ".repeat(W)+y.replace(/\n/g,`
|
|
230
|
+
${f}`)}boxWrap(n,U){if(U<this.minWidthToWrap)return n;let D=n.split(/\r\n|\n/),c=/[\s]*[^\s]+/g,g=[];return D.forEach((f)=>{let h=f.match(c);if(h===null){g.push("");return}let W=[h.shift()],T=this.displayWidth(W[0]);h.forEach((x)=>{let y=this.displayWidth(x);if(T+y<=U){W.push(x),T+=y;return}g.push(W.join(""));let F=x.trimStart();W=[F],T=this.displayWidth(F)}),g.push(W.join(""))}),g.join(`
|
|
231
|
+
`)}}class Hc{constructor(n,U){this.flags=n,this.description=U||"",this.required=n.includes("<"),this.optional=n.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(n),this.mandatory=!1;let D=lz(n);if(this.short=D.shortFlag,this.long=D.longFlag,this.negate=!1,this.long)this.negate=this.long.startsWith("--no-");this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(n,U){return this.defaultValue=n,this.defaultValueDescription=U,this}preset(n){return this.presetArg=n,this}conflicts(n){return this.conflictsWith=this.conflictsWith.concat(n),this}implies(n){let U=n;if(typeof n==="string")U={[n]:!0};return this.implied=Object.assign(this.implied||{},U),this}env(n){return this.envVar=n,this}argParser(n){return this.parseArg=n,this}makeOptionMandatory(n=!0){return this.mandatory=!!n,this}hideHelp(n=!0){return this.hidden=!!n,this}_collectValue(n,U){if(U===this.defaultValue||!Array.isArray(U))return[n];return U.push(n),U}choices(n){return this.argChoices=n.slice(),this.parseArg=(U,D)=>{if(!this.argChoices.includes(U))throw new FD(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(U,D);return U},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){if(this.negate)return RW(this.name().replace(/^no-/,""));return RW(this.name())}helpGroup(n){return this.helpGroupHeading=n,this}is(n){return this.short===n||this.long===n}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class e3{constructor(n){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,n.forEach((U)=>{if(U.negate)this.negativeOptions.set(U.attributeName(),U);else this.positiveOptions.set(U.attributeName(),U)}),this.negativeOptions.forEach((U,D)=>{if(this.positiveOptions.has(D))this.dualOptions.add(D)})}valueFromOption(n,U){let D=U.attributeName();if(!this.dualOptions.has(D))return!0;let c=this.negativeOptions.get(D).presetArg,g=c!==void 0?c:!1;return U.negate===(g===n)}}function RW(n){return n.split("-").reduce((U,D)=>{return U+D[0].toUpperCase()+D.slice(1)})}function lz(n){let U,D,c=/^-[^-]$/,g=/^--[^-]/,f=n.split(/[ |,]+/).concat("guard");if(c.test(f[0]))U=f.shift();if(g.test(f[0]))D=f.shift();if(!U&&c.test(f[0]))U=f.shift();if(!U&&g.test(f[0]))U=D,D=f.shift();if(f[0].startsWith("-")){let h=f[0],W=`option creation failed due to '${h}' in option flags '${n}'`;if(/^-[^-][^-]/.test(h))throw Error(`${W}
|
|
232
|
+
- a short flag is a single dash and a single character
|
|
233
|
+
- either use a single dash and a single character (for a short flag)
|
|
234
|
+
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(c.test(h))throw Error(`${W}
|
|
235
|
+
- too many short flags`);if(g.test(h))throw Error(`${W}
|
|
236
|
+
- too many long flags`);throw Error(`${W}
|
|
237
|
+
- unrecognised flag format`)}if(U===void 0&&D===void 0)throw Error(`option creation failed due to no flags found in '${n}'.`);return{shortFlag:U,longFlag:D}}function tz(n,U){if(Math.abs(n.length-U.length)>3)return Math.max(n.length,U.length);let D=[];for(let c=0;c<=n.length;c++)D[c]=[c];for(let c=0;c<=U.length;c++)D[0][c]=c;for(let c=1;c<=U.length;c++)for(let g=1;g<=n.length;g++){let f;if(n[g-1]===U[c-1])f=0;else f=1;if(D[g][c]=Math.min(D[g-1][c]+1,D[g][c-1]+1,D[g-1][c-1]+f),g>1&&c>1&&n[g-1]===U[c-2]&&n[g-2]===U[c-1])D[g][c]=Math.min(D[g][c],D[g-2][c-2]+1)}return D[n.length][U.length]}function s3(n,U){if(!U||U.length===0)return"";U=Array.from(new Set(U));let D=n.startsWith("--");if(D)n=n.slice(2),U=U.map((h)=>h.slice(2));let c=[],g=3,f=0.4;if(U.forEach((h)=>{if(h.length<=1)return;let W=tz(n,h),T=Math.max(n.length,h.length);if((T-W)/T>f){if(W<g)g=W,c=[h];else if(W===g)c.push(h)}}),c.sort((h,W)=>h.localeCompare(W)),D)c=c.map((h)=>`--${h}`);if(c.length>1)return`
|
|
238
|
+
(Did you mean one of ${c.join(", ")}?)`;if(c.length===1)return`
|
|
239
|
+
(Did you mean ${c[0]}?)`;return""}class iD extends ez{constructor(n){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=n||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:(U)=>T1.stdout.write(U),writeErr:(U)=>T1.stderr.write(U),outputError:(U,D)=>D(U),getOutHelpWidth:()=>T1.stdout.isTTY?T1.stdout.columns:void 0,getErrHelpWidth:()=>T1.stderr.isTTY?T1.stderr.columns:void 0,getOutHasColors:()=>dW()??(T1.stdout.isTTY&&T1.stdout.hasColors?.()),getErrHasColors:()=>dW()??(T1.stderr.isTTY&&T1.stderr.hasColors?.()),stripColor:(U)=>sz(U)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(n){return this._outputConfiguration=n._outputConfiguration,this._helpOption=n._helpOption,this._helpCommand=n._helpCommand,this._helpConfiguration=n._helpConfiguration,this._exitCallback=n._exitCallback,this._storeOptionsAsProperties=n._storeOptionsAsProperties,this._combineFlagAndOptionalValue=n._combineFlagAndOptionalValue,this._allowExcessArguments=n._allowExcessArguments,this._enablePositionalOptions=n._enablePositionalOptions,this._showHelpAfterError=n._showHelpAfterError,this._showSuggestionAfterError=n._showSuggestionAfterError,this}_getCommandAndAncestors(){let n=[];for(let U=this;U;U=U.parent)n.push(U);return n}command(n,U,D){let c=U,g=D;if(typeof c==="object"&&c!==null)g=c,c=null;g=g||{};let[,f,h]=n.match(/([^ ]+) *(.*)/),W=this.createCommand(f);if(c)W.description(c),W._executableHandler=!0;if(g.isDefault)this._defaultCommandName=W._name;if(W._hidden=!!(g.noHelp||g.hidden),W._executableFile=g.executableFile||null,h)W.arguments(h);if(this._registerCommand(W),W.parent=this,W.copyInheritedSettings(this),c)return this;return W}createCommand(n){return new iD(n)}createHelp(){return Object.assign(new Lg,this.configureHelp())}configureHelp(n){if(n===void 0)return this._helpConfiguration;return this._helpConfiguration=n,this}configureOutput(n){if(n===void 0)return this._outputConfiguration;return this._outputConfiguration={...this._outputConfiguration,...n},this}showHelpAfterError(n=!0){if(typeof n!=="string")n=!!n;return this._showHelpAfterError=n,this}showSuggestionAfterError(n=!0){return this._showSuggestionAfterError=!!n,this}addCommand(n,U){if(!n._name)throw Error(`Command passed to .addCommand() must have a name
|
|
240
|
+
- specify the name in Command constructor or using .name()`);if(U=U||{},U.isDefault)this._defaultCommandName=n._name;if(U.noHelp||U.hidden)n._hidden=!0;return this._registerCommand(n),n.parent=this,n._checkForBrokenPassThrough(),this}createArgument(n,U){return new Ag(n,U)}argument(n,U,D,c){let g=this.createArgument(n,U);if(typeof D==="function")g.default(c).argParser(D);else g.default(D);return this.addArgument(g),this}arguments(n){return n.trim().split(/ +/).forEach((U)=>{this.argument(U)}),this}addArgument(n){let U=this.registeredArguments.slice(-1)[0];if(U?.variadic)throw Error(`only the last argument can be variadic '${U.name()}'`);if(n.required&&n.defaultValue!==void 0&&n.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${n.name()}'`);return this.registeredArguments.push(n),this}helpCommand(n,U){if(typeof n==="boolean"){if(this._addImplicitHelpCommand=n,n&&this._defaultCommandGroup)this._initCommandGroup(this._getHelpCommand());return this}let D=n??"help [command]",[,c,g]=D.match(/([^ ]+) *(.*)/),f=U??"display help for command",h=this.createCommand(c);if(h.helpOption(!1),g)h.arguments(g);if(f)h.description(f);if(this._addImplicitHelpCommand=!0,this._helpCommand=h,n||U)this._initCommandGroup(h);return this}addHelpCommand(n,U){if(typeof n!=="object")return this.helpCommand(n,U),this;return this._addImplicitHelpCommand=!0,this._helpCommand=n,this._initCommandGroup(n),this}_getHelpCommand(){if(this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))){if(this._helpCommand===void 0)this.helpCommand(void 0,void 0);return this._helpCommand}return null}hook(n,U){let D=["preSubcommand","preAction","postAction"];if(!D.includes(n))throw Error(`Unexpected value for event passed to hook : '${n}'.
|
|
241
|
+
Expecting one of '${D.join("', '")}'`);if(this._lifeCycleHooks[n])this._lifeCycleHooks[n].push(U);else this._lifeCycleHooks[n]=[U];return this}exitOverride(n){if(n)this._exitCallback=n;else this._exitCallback=(U)=>{if(U.code!=="commander.executeSubCommandAsync")throw U};return this}_exit(n,U,D){if(this._exitCallback)this._exitCallback(new ZU(n,U,D));T1.exit(n)}action(n){let U=(D)=>{let c=this.registeredArguments.length,g=D.slice(0,c);if(this._storeOptionsAsProperties)g[c]=this;else g[c]=this.opts();return g.push(this),n.apply(this,g)};return this._actionHandler=U,this}createOption(n,U){return new Hc(n,U)}_callParseArg(n,U,D,c){try{return n.parseArg(U,D)}catch(g){if(g.code==="commander.invalidArgument"){let f=`${c} ${g.message}`;this.error(f,{exitCode:g.exitCode,code:g.code})}throw g}}_registerOption(n){let U=n.short&&this._findOption(n.short)||n.long&&this._findOption(n.long);if(U){let D=n.long&&this._findOption(n.long)?n.long:n.short;throw Error(`Cannot add option '${n.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${D}'
|
|
242
|
+
- already used by option '${U.flags}'`)}this._initOptionGroup(n),this.options.push(n)}_registerCommand(n){let U=(c)=>{return[c.name()].concat(c.aliases())},D=U(n).find((c)=>this._findCommand(c));if(D){let c=U(this._findCommand(D)).join("|"),g=U(n).join("|");throw Error(`cannot add command '${g}' as already have command '${c}'`)}this._initCommandGroup(n),this.commands.push(n)}addOption(n){this._registerOption(n);let U=n.name(),D=n.attributeName();if(n.defaultValue!==void 0)this.setOptionValueWithSource(D,n.defaultValue,"default");let c=(g,f,h)=>{if(g==null&&n.presetArg!==void 0)g=n.presetArg;let W=this.getOptionValue(D);if(g!==null&&n.parseArg)g=this._callParseArg(n,g,W,f);else if(g!==null&&n.variadic)g=n._collectValue(g,W);if(g==null)if(n.negate)g=!1;else if(n.isBoolean()||n.optional)g=!0;else g="";this.setOptionValueWithSource(D,g,h)};if(this.on("option:"+U,(g)=>{let f=`error: option '${n.flags}' argument '${g}' is invalid.`;c(g,f,"cli")}),n.envVar)this.on("optionEnv:"+U,(g)=>{let f=`error: option '${n.flags}' value '${g}' from env '${n.envVar}' is invalid.`;c(g,f,"env")});return this}_optionEx(n,U,D,c,g){if(typeof U==="object"&&U instanceof Hc)throw Error("To add an Option object use addOption() instead of option() or requiredOption()");let f=this.createOption(U,D);if(f.makeOptionMandatory(!!n.mandatory),typeof c==="function")f.default(g).argParser(c);else if(c instanceof RegExp){let h=c;c=(W,T)=>{let x=h.exec(W);return x?x[0]:T},f.default(g).argParser(c)}else f.default(c);return this.addOption(f)}option(n,U,D,c){return this._optionEx({},n,U,D,c)}requiredOption(n,U,D,c){return this._optionEx({mandatory:!0},n,U,D,c)}combineFlagAndOptionalValue(n=!0){return this._combineFlagAndOptionalValue=!!n,this}allowUnknownOption(n=!0){return this._allowUnknownOption=!!n,this}allowExcessArguments(n=!0){return this._allowExcessArguments=!!n,this}enablePositionalOptions(n=!0){return this._enablePositionalOptions=!!n,this}passThroughOptions(n=!0){return this._passThroughOptions=!!n,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(n=!0){if(this.options.length)throw Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!n,this}getOptionValue(n){if(this._storeOptionsAsProperties)return this[n];return this._optionValues[n]}setOptionValue(n,U){return this.setOptionValueWithSource(n,U,void 0)}setOptionValueWithSource(n,U,D){if(this._storeOptionsAsProperties)this[n]=U;else this._optionValues[n]=U;return this._optionValueSources[n]=D,this}getOptionValueSource(n){return this._optionValueSources[n]}getOptionValueSourceWithGlobals(n){let U;return this._getCommandAndAncestors().forEach((D)=>{if(D.getOptionValueSource(n)!==void 0)U=D.getOptionValueSource(n)}),U}_prepareUserArgs(n,U){if(n!==void 0&&!Array.isArray(n))throw Error("first parameter to parse must be array or undefined");if(U=U||{},n===void 0&&U.from===void 0){if(T1.versions?.electron)U.from="electron";let c=T1.execArgv??[];if(c.includes("-e")||c.includes("--eval")||c.includes("-p")||c.includes("--print"))U.from="eval"}if(n===void 0)n=T1.argv;this.rawArgs=n.slice();let D;switch(U.from){case void 0:case"node":this._scriptPath=n[1],D=n.slice(2);break;case"electron":if(T1.defaultApp)this._scriptPath=n[1],D=n.slice(2);else D=n.slice(1);break;case"user":D=n.slice(0);break;case"eval":D=n.slice(1);break;default:throw Error(`unexpected parse option { from: '${U.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",D}parse(n,U){this._prepareForParse();let D=this._prepareUserArgs(n,U);return this._parseCommand([],D),this}async parseAsync(n,U){this._prepareForParse();let D=this._prepareUserArgs(n,U);return await this._parseCommand([],D),this}_prepareForParse(){if(this._savedState===null)this.options.filter((n)=>n.negate&&n.defaultValue===void 0&&this.getOptionValue(n.attributeName())===void 0).forEach((n)=>{let U=n.long.replace(/^--no-/,"--");if(!this._findOption(U))this.setOptionValueWithSource(n.attributeName(),!0,"default")}),this.saveStateBeforeParse();else this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
243
|
+
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(n,U,D){if(Cg.existsSync(n))return;let c=U?`searched for local subcommand relative to directory '${U}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",g=`'${n}' does not exist
|
|
244
|
+
- if '${D}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
245
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
246
|
+
- ${c}`;throw Error(g)}_executeSubCommand(n,U){U=U.slice();let D=[".js",".ts",".tsx",".mjs",".cjs"];function c(x,y){let F=b2.resolve(x,y);if(Cg.existsSync(F))return F;if(D.includes(b2.extname(y)))return;let i=D.find((X)=>Cg.existsSync(`${F}${X}`));if(i)return`${F}${i}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let g=n._executableFile||`${this._name}-${n._name}`,f=this._executableDir||"";if(this._scriptPath){let x;try{x=Cg.realpathSync(this._scriptPath)}catch{x=this._scriptPath}f=b2.resolve(b2.dirname(x),f)}if(f){let x=c(f,g);if(!x&&!n._executableFile&&this._scriptPath){let y=b2.basename(this._scriptPath,b2.extname(this._scriptPath));if(y!==this._name)x=c(f,`${y}-${n._name}`)}g=x||g}let h=D.includes(b2.extname(g)),W;if(T1.platform!=="win32")if(h)U.unshift(g),U=uW(T1.execArgv).concat(U),W=nf.spawn(T1.argv[0],U,{stdio:"inherit"});else W=nf.spawn(g,U,{stdio:"inherit"});else this._checkForMissingExecutable(g,f,n._name),U.unshift(g),U=uW(T1.execArgv).concat(U),W=nf.spawn(T1.execPath,U,{stdio:"inherit"});if(!W.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((y)=>{T1.on(y,()=>{if(W.killed===!1&&W.exitCode===null)W.kill(y)})});let T=this._exitCallback;W.on("close",(x)=>{if(x=x??1,!T)T1.exit(x);else T(new ZU(x,"commander.executeSubCommandAsync","(close)"))}),W.on("error",(x)=>{if(x.code==="ENOENT")this._checkForMissingExecutable(g,f,n._name);else if(x.code==="EACCES")throw Error(`'${g}' not executable`);if(!T)T1.exit(1);else{let y=new ZU(1,"commander.executeSubCommandAsync","(error)");y.nestedError=x,T(y)}}),this.runningCommand=W}_dispatchSubcommand(n,U,D){let c=this._findCommand(n);if(!c)this.help({error:!0});c._prepareForParse();let g;return g=this._chainOrCallSubCommandHook(g,c,"preSubcommand"),g=this._chainOrCall(g,()=>{if(c._executableHandler)this._executeSubCommand(c,U.concat(D));else return c._parseCommand(U,D)}),g}_dispatchHelpCommand(n){if(!n)this.help();let U=this._findCommand(n);if(U&&!U._executableHandler)U.help();return this._dispatchSubcommand(n,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){if(this.registeredArguments.forEach((n,U)=>{if(n.required&&this.args[U]==null)this.missingArgument(n.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)return;if(this.args.length>this.registeredArguments.length)this._excessArguments(this.args)}_processArguments(){let n=(D,c,g)=>{let f=c;if(c!==null&&D.parseArg){let h=`error: command-argument value '${c}' is invalid for argument '${D.name()}'.`;f=this._callParseArg(D,c,g,h)}return f};this._checkNumberOfArguments();let U=[];this.registeredArguments.forEach((D,c)=>{let g=D.defaultValue;if(D.variadic){if(c<this.args.length){if(g=this.args.slice(c),D.parseArg)g=g.reduce((f,h)=>{return n(D,h,f)},D.defaultValue)}else if(g===void 0)g=[]}else if(c<this.args.length){if(g=this.args[c],D.parseArg)g=n(D,g,D.defaultValue)}U[c]=g}),this.processedArgs=U}_chainOrCall(n,U){if(n?.then&&typeof n.then==="function")return n.then(()=>U());return U()}_chainOrCallHooks(n,U){let D=n,c=[];if(this._getCommandAndAncestors().reverse().filter((g)=>g._lifeCycleHooks[U]!==void 0).forEach((g)=>{g._lifeCycleHooks[U].forEach((f)=>{c.push({hookedCommand:g,callback:f})})}),U==="postAction")c.reverse();return c.forEach((g)=>{D=this._chainOrCall(D,()=>{return g.callback(g.hookedCommand,this)})}),D}_chainOrCallSubCommandHook(n,U,D){let c=n;if(this._lifeCycleHooks[D]!==void 0)this._lifeCycleHooks[D].forEach((g)=>{c=this._chainOrCall(c,()=>{return g(this,U)})});return c}_parseCommand(n,U){let D=this.parseOptions(U);if(this._parseOptionsEnv(),this._parseOptionsImplied(),n=n.concat(D.operands),U=D.unknown,this.args=n.concat(U),n&&this._findCommand(n[0]))return this._dispatchSubcommand(n[0],n.slice(1),U);if(this._getHelpCommand()&&n[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(n[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(U),this._dispatchSubcommand(this._defaultCommandName,n,U);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});this._outputHelpIfRequested(D.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let c=()=>{if(D.unknown.length>0)this.unknownOption(D.unknown[0])},g=`command:${this.name()}`;if(this._actionHandler){c(),this._processArguments();let f;if(f=this._chainOrCallHooks(f,"preAction"),f=this._chainOrCall(f,()=>this._actionHandler(this.processedArgs)),this.parent)f=this._chainOrCall(f,()=>{this.parent.emit(g,n,U)});return f=this._chainOrCallHooks(f,"postAction"),f}if(this.parent?.listenerCount(g))c(),this._processArguments(),this.parent.emit(g,n,U);else if(n.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",n,U);if(this.listenerCount("command:*"))this.emit("command:*",n,U);else if(this.commands.length)this.unknownCommand();else c(),this._processArguments()}else if(this.commands.length)c(),this.help({error:!0});else c(),this._processArguments()}_findCommand(n){if(!n)return;return this.commands.find((U)=>U._name===n||U._aliases.includes(n))}_findOption(n){return this.options.find((U)=>U.is(n))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((n)=>{n.options.forEach((U)=>{if(U.mandatory&&n.getOptionValue(U.attributeName())===void 0)n.missingMandatoryOptionValue(U)})})}_checkForConflictingLocalOptions(){let n=this.options.filter((D)=>{let c=D.attributeName();if(this.getOptionValue(c)===void 0)return!1;return this.getOptionValueSource(c)!=="default"});n.filter((D)=>D.conflictsWith.length>0).forEach((D)=>{let c=n.find((g)=>D.conflictsWith.includes(g.attributeName()));if(c)this._conflictingOption(D,c)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((n)=>{n._checkForConflictingLocalOptions()})}parseOptions(n){let U=[],D=[],c=U;function g(x){return x.length>1&&x[0]==="-"}let f=(x)=>{if(!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(x))return!1;return!this._getCommandAndAncestors().some((y)=>y.options.map((F)=>F.short).some((F)=>/^-\d$/.test(F)))},h=null,W=null,T=0;while(T<n.length||W){let x=W??n[T++];if(W=null,x==="--"){if(c===D)c.push(x);c.push(...n.slice(T));break}if(h&&(!g(x)||f(x))){this.emit(`option:${h.name()}`,x);continue}if(h=null,g(x)){let y=this._findOption(x);if(y){if(y.required){let F=n[T++];if(F===void 0)this.optionMissingArgument(y);this.emit(`option:${y.name()}`,F)}else if(y.optional){let F=null;if(T<n.length&&(!g(n[T])||f(n[T])))F=n[T++];this.emit(`option:${y.name()}`,F)}else this.emit(`option:${y.name()}`);h=y.variadic?y:null;continue}}if(x.length>2&&x[0]==="-"&&x[1]!=="-"){let y=this._findOption(`-${x[1]}`);if(y){if(y.required||y.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${y.name()}`,x.slice(2));else this.emit(`option:${y.name()}`),W=`-${x.slice(2)}`;continue}}if(/^--[^=]+=/.test(x)){let y=x.indexOf("="),F=this._findOption(x.slice(0,y));if(F&&(F.required||F.optional)){this.emit(`option:${F.name()}`,x.slice(y+1));continue}}if(c===U&&g(x)&&!(this.commands.length===0&&f(x)))c=D;if((this._enablePositionalOptions||this._passThroughOptions)&&U.length===0&&D.length===0){if(this._findCommand(x)){U.push(x),D.push(...n.slice(T));break}else if(this._getHelpCommand()&&x===this._getHelpCommand().name()){U.push(x,...n.slice(T));break}else if(this._defaultCommandName){D.push(x,...n.slice(T));break}}if(this._passThroughOptions){c.push(x,...n.slice(T));break}c.push(x)}return{operands:U,unknown:D}}opts(){if(this._storeOptionsAsProperties){let n={},U=this.options.length;for(let D=0;D<U;D++){let c=this.options[D].attributeName();n[c]=c===this._versionOptionName?this._version:this[c]}return n}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((n,U)=>Object.assign(n,U.opts()),{})}error(n,U){if(this._outputConfiguration.outputError(`${n}
|
|
247
|
+
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
248
|
+
`);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
|
|
249
|
+
`),this.outputHelp({error:!0});let D=U||{},c=D.exitCode||1,g=D.code||"commander.error";this._exit(c,g,n)}_parseOptionsEnv(){this.options.forEach((n)=>{if(n.envVar&&n.envVar in T1.env){let U=n.attributeName();if(this.getOptionValue(U)===void 0||["default","config","env"].includes(this.getOptionValueSource(U)))if(n.required||n.optional)this.emit(`optionEnv:${n.name()}`,T1.env[n.envVar]);else this.emit(`optionEnv:${n.name()}`)}})}_parseOptionsImplied(){let n=new e3(this.options),U=(D)=>{return this.getOptionValue(D)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(D))};this.options.filter((D)=>D.implied!==void 0&&U(D.attributeName())&&n.valueFromOption(this.getOptionValue(D.attributeName()),D)).forEach((D)=>{Object.keys(D.implied).filter((c)=>!U(c)).forEach((c)=>{this.setOptionValueWithSource(c,D.implied[c],"implied")})})}missingArgument(n){let U=`error: missing required argument '${n}'`;this.error(U,{code:"commander.missingArgument"})}optionMissingArgument(n){let U=`error: option '${n.flags}' argument missing`;this.error(U,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(n){let U=`error: required option '${n.flags}' not specified`;this.error(U,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(n,U){let D=(f)=>{let h=f.attributeName(),W=this.getOptionValue(h),T=this.options.find((y)=>y.negate&&h===y.attributeName()),x=this.options.find((y)=>!y.negate&&h===y.attributeName());if(T&&(T.presetArg===void 0&&W===!1||T.presetArg!==void 0&&W===T.presetArg))return T;return x||f},c=(f)=>{let h=D(f),W=h.attributeName();if(this.getOptionValueSource(W)==="env")return`environment variable '${h.envVar}'`;return`option '${h.flags}'`},g=`error: ${c(n)} cannot be used with ${c(U)}`;this.error(g,{code:"commander.conflictingOption"})}unknownOption(n){if(this._allowUnknownOption)return;let U="";if(n.startsWith("--")&&this._showSuggestionAfterError){let c=[],g=this;do{let f=g.createHelp().visibleOptions(g).filter((h)=>h.long).map((h)=>h.long);c=c.concat(f),g=g.parent}while(g&&!g._enablePositionalOptions);U=s3(n,c)}let D=`error: unknown option '${n}'${U}`;this.error(D,{code:"commander.unknownOption"})}_excessArguments(n){if(this._allowExcessArguments)return;let U=this.registeredArguments.length,D=U===1?"":"s",c=n.length,g=this.parent?` for '${this.name()}'`:"",f=n.join(", "),h=`error: too many arguments${g}. Expected ${U} argument${D} but got ${c}: ${f}.`;this.error(h,{code:"commander.excessArguments"})}unknownCommand(){let n=this.args[0],U="";if(this._showSuggestionAfterError){let c=[];this.createHelp().visibleCommands(this).forEach((g)=>{if(c.push(g.name()),g.alias())c.push(g.alias())}),U=s3(n,c)}let D=`error: unknown command '${n}'${U}`;this.error(D,{code:"commander.unknownCommand"})}version(n,U,D){if(n===void 0)return this._version;this._version=n,U=U||"-V, --version",D=D||"output the version number";let c=this.createOption(U,D);return this._versionOptionName=c.attributeName(),this._registerOption(c),this.on("option:"+c.name(),()=>{this._outputConfiguration.writeOut(`${n}
|
|
250
|
+
`),this._exit(0,"commander.version",n)}),this}description(n,U){if(n===void 0&&U===void 0)return this._description;if(this._description=n,U)this._argsDescription=U;return this}summary(n){if(n===void 0)return this._summary;return this._summary=n,this}alias(n){if(n===void 0)return this._aliases[0];let U=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)U=this.commands[this.commands.length-1];if(n===U._name)throw Error("Command alias can't be the same as its name");let D=this.parent?._findCommand(n);if(D){let c=[D.name()].concat(D.aliases()).join("|");throw Error(`cannot add alias '${n}' to command '${this.name()}' as already have command '${c}'`)}return U._aliases.push(n),this}aliases(n){if(n===void 0)return this._aliases;return n.forEach((U)=>this.alias(U)),this}usage(n){if(n===void 0){if(this._usage)return this._usage;let U=this.registeredArguments.map((D)=>{return Hg(D)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?U:[]).join(" ")}return this._usage=n,this}name(n){if(n===void 0)return this._name;return this._name=n,this}helpGroup(n){if(n===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=n,this}commandsGroup(n){if(n===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=n,this}optionsGroup(n){if(n===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=n,this}_initOptionGroup(n){if(this._defaultOptionGroup&&!n.helpGroupHeading)n.helpGroup(this._defaultOptionGroup)}_initCommandGroup(n){if(this._defaultCommandGroup&&!n.helpGroup())n.helpGroup(this._defaultCommandGroup)}nameFromFilename(n){return this._name=b2.basename(n,b2.extname(n)),this}executableDir(n){if(n===void 0)return this._executableDir;return this._executableDir=n,this}helpInformation(n){let U=this.createHelp(),D=this._getOutputContext(n);U.prepareContext({error:D.error,helpWidth:D.helpWidth,outputHasColors:D.hasColors});let c=U.formatHelp(this,U);if(D.hasColors)return c;return this._outputConfiguration.stripColor(c)}_getOutputContext(n){n=n||{};let U=!!n.error,D,c,g;if(U)D=(h)=>this._outputConfiguration.writeErr(h),c=this._outputConfiguration.getErrHasColors(),g=this._outputConfiguration.getErrHelpWidth();else D=(h)=>this._outputConfiguration.writeOut(h),c=this._outputConfiguration.getOutHasColors(),g=this._outputConfiguration.getOutHelpWidth();return{error:U,write:(h)=>{if(!c)h=this._outputConfiguration.stripColor(h);return D(h)},hasColors:c,helpWidth:g}}outputHelp(n){let U;if(typeof n==="function")U=n,n=void 0;let D=this._getOutputContext(n),c={error:D.error,write:D.write,command:this};this._getCommandAndAncestors().reverse().forEach((f)=>f.emit("beforeAllHelp",c)),this.emit("beforeHelp",c);let g=this.helpInformation({error:D.error});if(U){if(g=U(g),typeof g!=="string"&&!Buffer.isBuffer(g))throw Error("outputHelp callback must return a string or a Buffer")}if(D.write(g),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",c),this._getCommandAndAncestors().forEach((f)=>f.emit("afterAllHelp",c))}helpOption(n,U){if(typeof n==="boolean"){if(n){if(this._helpOption===null)this._helpOption=void 0;if(this._defaultOptionGroup)this._initOptionGroup(this._getHelpOption())}else this._helpOption=null;return this}if(this._helpOption=this.createOption(n??"-h, --help",U??"display help for command"),n||U)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(n){return this._helpOption=n,this._initOptionGroup(n),this}help(n){this.outputHelp(n);let U=Number(T1.exitCode??0);if(U===0&&n&&typeof n!=="function"&&n.error)U=1;this._exit(U,"commander.help","(outputHelp)")}addHelpText(n,U){let D=["beforeAll","before","after","afterAll"];if(!D.includes(n))throw Error(`Unexpected value for position to addHelpText.
|
|
251
|
+
Expecting one of '${D.join("', '")}'`);let c=`${n}Help`;return this.on(c,(g)=>{let f;if(typeof U==="function")f=U({error:g.error,command:g.command});else f=U;if(f)g.write(`${f}
|
|
252
|
+
`)}),this}_outputHelpIfRequested(n){let U=this._getHelpOption();if(U&&n.find((c)=>U.is(c)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function uW(n){return n.map((U)=>{if(!U.startsWith("--inspect"))return U;let D,c="127.0.0.1",g="9229",f;if((f=U.match(/^(--inspect(-brk)?)$/))!==null)D=f[1];else if((f=U.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(D=f[1],/^\d+$/.test(f[3]))g=f[3];else c=f[3];else if((f=U.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)D=f[1],c=f[3],g=f[4];if(D&&g!=="0")return`${D}=${c}:${parseInt(g)+1}`;return U})}function dW(){if(T1.env.NO_COLOR||T1.env.FORCE_COLOR==="0"||T1.env.FORCE_COLOR==="false")return!1;if(T1.env.FORCE_COLOR||T1.env.CLICOLOR_FORCE!==void 0)return!0;return}var h11=new iD;var kW={name:"@rainmanhhh/pi-web",version:"0.8.7",description:"Web UI for the pi coding agent (fork of @agegr/pi-web)",homepage:"https://gitee.com/dsxbygzzl/pi-web#readme",repository:{type:"git",url:"git+https://gitee.com/dsxbygzzl/pi-web.git"},bugs:{url:"https://gitee.com/dsxbygzzl/pi-web/issues"},author:"rainmanhhh",license:"MIT",publishConfig:{access:"public",registry:"https://registry.npmjs.org"},engines:{node:">=22.19.0"},files:["dist","public","package.json"],bin:{"pi-web":"dist/server.mjs"},scripts:{dev:"vite","dev:lan":"vite --host 0.0.0.0",mb:"bun run --env-file=.env.manual api",mf:"bun run --env-file=.env.manual dev -- --port 3001",api:"bun run server/main.ts","api:node":"bun run build:server && node dist/server.mjs","build:server":'bun build server/main.ts --target node --outfile dist/server.mjs --minify --external "@earendil-works/*" --define "process.env.PI_WEB_PACKAGED=1"',"e2e:stop":"bun run scripts/e2e-stop.mjs",build:"vite build",lint:"oxlint --fix",jscpd:"jscpd --config .jscpd.json",check:"tsc --noEmit",format:"biome check --write .",prepublishOnly:"bun run check && bun run build && bun run build:server","test:e2e":"playwright test","test:unit":"vitest run",prepare:"husky || true"},dependencies:{"@earendil-works/pi-agent-core":"0.84.1","@earendil-works/pi-ai":"0.84.1","@earendil-works/pi-coding-agent":"0.84.1","@earendil-works/pi-tui":"0.84.1","@hono/node-server":"^2.1.0","class-variance-authority":"^0.7.1",clsx:"^2.1.1",hono:"^4.13.1","lucide-react":"^1.31.0","proper-lockfile":"4.1.2","radix-ui":"^1.6.7",react:"^19.2.4","react-dom":"^19.2.4",shadcn:"^4.17.0",streamdown:"2.5.0","tailwind-merge":"^3.6.0","tw-animate-css":"^1.4.0",undici:"8.9.0"},devDependencies:{"@lobehub/icons":"^5.6.0","@playwright/test":"^1.62.1","@tailwindcss/postcss":"^4.2.2","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@types/node":"^25","@types/node-notifier":"^8.0.5","@types/proper-lockfile":"4.1.4","@types/react":"^19","@types/react-dom":"^19","@types/react-syntax-highlighter":"^15.5.13","@vitejs/plugin-react":"^6.0.5",biome:"^0.3.3",commander:"^15.0.0",husky:"^9.1.7",jiti:"^2.7.0",jscpd:"^5.0.14",jsdom:"^30.0.1",katex:"^0.16.47","lint-staged":"^17.3.0",mammoth:"^1.12.0",mermaid:"^11.14.0","node-notifier":"^10.0.1",oxlint:"^1.78.0",postcss:"^8","react-markdown":"^10.1.0","react-syntax-highlighter":"^16.1.1","rehype-katex":"^7.0.1","rehype-raw":"^7.0.0","rehype-sanitize":"^6.0.0","remark-gfm":"^4.0.1","remark-math":"^6.0.0",tailwindcss:"^4.2.2",typescript:"^7.0.2",vite:"^8.2.1","vite-plugin-svgr":"^5.2.0",vitest:"^4.1.10"},type:"module"};import{getAgentDir as lb}from"@earendil-works/pi-coding-agent";var pW={port:3142};var Uf=(n,U,D)=>{return(c,g)=>{let f=-1;return h(0);async function h(W){if(W<=f)throw Error("next() called multiple times");f=W;let T,x=!1,y;if(n[W])y=n[W][0][0],c.req.routeIndex=W;else y=W===n.length&&g||void 0;if(y)try{T=await y(c,()=>h(W+1))}catch(F){if(F instanceof Error&&U)c.error=F,T=await U(F,c),x=!0;else throw F}else if(c.finalized===!1&&D)T=await D(c);if(T&&(c.finalized===!1||x))c.res=T;return c}}};var mW=Symbol();var aW=(n,U)=>{return new Response(n,{headers:{"Content-Type":U.replace(/^[^;]+/,(c)=>c.toLowerCase())}}).formData()};var Eg=(n)=>("headers"in n),rW=async(n,U=Object.create(null))=>{let{all:D=!1,dot:c=!1}=U,h=(Eg(n)?n.headers:n.raw.headers).get("Content-Type")?.split(";")[0].trim().toLowerCase();if(h==="multipart/form-data"||h==="application/x-www-form-urlencoded")return UO(n,{all:D,dot:c});return{}};async function UO(n,U){if(!Eg(n)&&n.bodyCache.formData)return oW(await n.bodyCache.formData,U);let D=Eg(n)?n.headers:n.raw.headers,c=await n.arrayBuffer(),g=aW(c,D.get("Content-Type")||"");if(!Eg(n))n.bodyCache.formData=g;let f=await g;if(f)return oW(f,U);return{}}function oW(n,U){let D=Object.create(null);if(n.forEach((c,g)=>{if(!(U.all||g.endsWith("[]")))D[g]=c;else DO(D,g,c)}),U.dot)Object.entries(D).forEach(([c,g])=>{if(c.includes("."))cO(D,c,g),delete D[c]});return D}var DO=(n,U,D)=>{if(n[U]!==void 0)if(Array.isArray(n[U]))n[U].push(D);else n[U]=[n[U],D];else if(!U.endsWith("[]"))n[U]=D;else n[U]=[D]},cO=(n,U,D)=>{if(/(?:^|\.)__proto__\./.test(U))return;let c=n,g=U.split(".");g.forEach((f,h)=>{if(h===g.length-1)c[f]=D;else{if(!c[f]||typeof c[f]!=="object"||Array.isArray(c[f])||c[f]instanceof File)c[f]=Object.create(null);c=c[f]}})};var cf=(n)=>{let U=n.split("/");if(U[0]==="")U.shift();return U},lW=(n)=>{let{groups:U,path:D}=gO(n),c=cf(D);return fO(c,U)},gO=(n)=>{let U=[];return n=n.replace(/\{[^}]+\}/g,(D,c)=>{let g=`@${c}`;return U.push([g,D]),g}),{groups:U,path:n}},fO=(n,U)=>{for(let D=U.length-1;D>=0;D--){let[c]=U[D];for(let g=n.length-1;g>=0;g--)if(n[g].includes(c)){n[g]=n[g].replace(c,U[D][1]);break}}return n},wg={},tW=(n,U)=>{if(n==="*")return"*";let D=n.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/);if(D){let c=`${n}#${U}`;if(!wg[c])if(D[2])wg[c]=U&&U[0]!==":"&&U[0]!=="*"?[c,D[1],new RegExp(`^${D[2]}(?=/${U})`)]:[n,D[1],new RegExp(`^${D[2]}$`)];else wg[c]=[n,D[1],!0];return wg[c]}return null},eW=(n,U)=>{try{return U(n)}catch{return n.replace(/(?:%[0-9A-Fa-f]{2})+/g,(D)=>{try{return U(D)}catch{return D}})}},hO=(n)=>eW(n,decodeURI),gf=(n)=>{let U=n.url,D=U.indexOf("/",U.indexOf(":")+4),c=D;for(;c<U.length;c++){let g=U.charCodeAt(c);if(g===37){let f=U.indexOf("?",c),h=U.indexOf("#",c),W=f===-1?h===-1?void 0:h:h===-1?f:Math.min(f,h),T=U.slice(D,W);return hO(T.includes("%25")?T.replace(/%25/g,"%2525"):T)}else if(g===63||g===35)break}return U.slice(D,c)};var sW=(n)=>{let U=gf(n);return U.length>1&&U.at(-1)==="/"?U.slice(0,-1):U},a2=(n,U,...D)=>{if(D.length)U=a2(U,...D);return`${n?.[0]==="/"?"":"/"}${n}${U==="/"?"":`${n?.at(-1)==="/"?"":"/"}${U?.[0]==="/"?U.slice(1):U}`}`},jg=(n)=>{if(n.charCodeAt(n.length-1)!==63||!n.includes(":"))return null;let U=n.split("/"),D=[],c="";return U.forEach((g)=>{if(g!==""&&!/\:/.test(g))c+="/"+g;else if(/\:/.test(g))if(/\?/.test(g)){if(D.length===0&&c==="")D.push("/");else D.push(c);let f=g.replace("?","");c+="/"+f,D.push(c)}else c+="/"+g}),D.filter((g,f,h)=>h.indexOf(g)===f)},Ig=(n)=>n.indexOf("%")!==-1?eW(n,WO):n,Df=(n)=>{if(n.indexOf("+")!==-1)n=n.replace(/\+/g," ");return Ig(n)},nx=(n,U,D)=>{let c;if(!D&&U&&U.indexOf("%")===-1&&U.indexOf("+")===-1){let h=n.indexOf("?",8);if(h===-1)return;if(!n.startsWith(U,h+1))h=n.indexOf(`&${U}`,h+1);while(h!==-1){let W=n.charCodeAt(h+U.length+1);if(W===61){let T=h+U.length+2,x=n.indexOf("&",T);return Df(n.slice(T,x===-1?void 0:x))}else if(W==38||isNaN(W))return"";h=n.indexOf(`&${U}`,h+1)}if(c=/[%+]/.test(n),!c)return}let g=Object.create(null);c??=/[%+]/.test(n);let f=n.indexOf("?",8);while(f!==-1){let h=n.indexOf("&",f+1),W=n.indexOf("=",f);if(W>h&&h!==-1)W=-1;let T=n.slice(f+1,W===-1?h===-1?void 0:h:W);if(c)T=Df(T);if(f=h,T==="")continue;let x;if(W===-1)x="";else if(x=n.slice(W+1,h===-1?void 0:h),c)x=Df(x);if(D){if(!(g[T]&&Array.isArray(g[T])))g[T]=[];g[T].push(x)}else g[T]??=x}return U?g[U]:g},Ux=nx,Dx=(n,U)=>{return nx(n,U,!0)},WO=decodeURIComponent;var cx=class{raw;#n;#U;routeIndex=0;path;bodyCache={};constructor(n,U="/",D=[[]]){this.raw=n,this.path=U,this.#U=D}param(n){return n?this.#D(n):this.#f()}#D(n){let U=this.#U[0][this.routeIndex][1][n],D=this.#c(U);return D&&Ig(D)}#f(){let n={},U=Object.keys(this.#U[0][this.routeIndex][1]);for(let D of U){let c=this.#c(this.#U[0][this.routeIndex][1][D]);if(c!==void 0)n[D]=Ig(c)}return n}#c(n){return this.#U[1]?this.#U[1][n]:n}query(n){return Ux(this.url,n)}queries(n){return Dx(this.url,n)}header(n){if(n)return this.raw.headers.get(n)??void 0;let U=Object.create(null);return this.raw.headers.forEach((D,c)=>{U[c]=D}),U}async parseBody(n){return rW(this,n)}#g=(n)=>{let{bodyCache:U,raw:D}=this,c=U[n];if(c)return c;for(let g in U)return U[g].then((f)=>{if(g==="json")f=JSON.stringify(f);return new Response(f)[n]()});return U[n]=D[n]()};json(){return this.#g("text").then((n)=>JSON.parse(n))}text(){return this.#g("text")}arrayBuffer(){return this.#g("arrayBuffer")}bytes(){return this.#g("arrayBuffer").then((n)=>new Uint8Array(n))}blob(){return this.#g("blob")}formData(){return this.#g("formData")}addValidatedData(n,U){(this.#n??={})[n]=U}valid(n){return this.#n?.[n]}get url(){return this.raw.url}get method(){return this.raw.method}get[mW](){return this.#U}get matchedRoutes(){return this.#U[0].map(([[,n]])=>n)}get routePath(){return this.#U[0].map(([[,n]])=>n)[this.routeIndex].path}};var gx={Stringify:1,BeforeStream:2,Stream:3},xO=(n,U)=>{let D=new String(n);return D.isEscaped=!0,D.callbacks=U,D};var ff=async(n,U,D,c,g)=>{if(typeof n==="object"&&!(n instanceof String)){if(!(n instanceof Promise))n=n.toString();if(n instanceof Promise)n=await n}let f=n.callbacks;if(!f?.length)return Promise.resolve(n);if(g)g[0]+=n;else g=[n];let h=Promise.all(f.map((W)=>W({phase:U,buffer:g,context:c}))).then((W)=>Promise.all(W.filter(Boolean).map((T)=>ff(T,U,!1,c,g))).then(()=>g[0]));if(D)return xO(await h,f);else return h};var TO="text/plain; charset=UTF-8",hf=(n,U)=>{return{"Content-Type":n,...U}},Lc=(n,U)=>new Response(n,U),Wf=class{#n;#U;env={};#D;finalized=!1;error;#f;#c;#g;#y;#x;#T;#W;#F;#i;constructor(n,U){if(this.#n=n,U)this.#c=U.executionCtx,this.env=U.env,this.#T=U.notFoundHandler,this.#i=U.path,this.#F=U.matchResult}get req(){return this.#U??=new cx(this.#n,this.#i,this.#F),this.#U}get event(){if(this.#c&&"respondWith"in this.#c)return this.#c;else throw Error("This context has no FetchEvent")}get executionCtx(){if(this.#c)return this.#c;else throw Error("This context has no ExecutionContext")}get res(){return this.#g||=Lc(null,{headers:this.#W??=new Headers})}set res(n){if(this.#g&&n){n=Lc(n.body,n);for(let[U,D]of this.#g.headers.entries()){if(U==="content-type")continue;if(U==="set-cookie"){let c=this.#g.headers.getSetCookie();n.headers.delete("set-cookie");for(let g of c)n.headers.append("set-cookie",g)}else n.headers.set(U,D)}}this.#g=n,this.finalized=!0}render=(...n)=>{return this.#x??=(U)=>this.html(U),this.#x(...n)};setLayout=(n)=>this.#y=n;getLayout=()=>this.#y;setRenderer=(n)=>{this.#x=n};header=(n,U,D)=>{if(this.finalized)this.#g=Lc(this.#g.body,this.#g);let c=this.#g?this.#g.headers:this.#W??=new Headers;if(U===void 0)c.delete(n);else if(D?.append)c.append(n,U);else c.set(n,U)};status=(n)=>{this.#f=n};set=(n,U)=>{this.#D??=new Map,this.#D.set(n,U)};get=(n)=>{return this.#D?this.#D.get(n):void 0};get var(){if(!this.#D)return{};return Object.fromEntries(this.#D)}#h(n,U,D){let c=this.#g?new Headers(this.#g.headers):this.#W;if(typeof U==="object"&&U.headers){c??=new Headers;for(let[f,h]of new Headers(U.headers))if(f==="set-cookie")c.append(f,h);else c.set(f,h)}if(D){if(!c){let f=0;for(let h in D)if(++f>1||typeof D[h]!=="string"){c=new Headers;break}}if(c)for(let f in D){let h=D[f];if(typeof h==="string")c.set(f,h);else{c.delete(f);for(let W of h)c.append(f,W)}}}let g=typeof U==="number"?U:U?.status??this.#f;return Lc(n,{status:g,headers:c??D})}newResponse=(...n)=>this.#h(...n);body=(n,U,D)=>this.#h(n,U,D);text=(n,U,D)=>{return!this.#W&&!this.#f&&!U&&!D&&!this.finalized?new Response(n):this.#h(n,U,hf(TO,D))};json=(n,U,D)=>{return this.#h(JSON.stringify(n),U,hf("application/json",D))};html=(n,U,D)=>{let c=(g)=>this.#h(g,U,hf("text/html; charset=UTF-8",D));return typeof n==="object"?ff(n,gx.Stringify,!1,{}).then(c):c(n)};redirect=(n,U)=>{let D=String(n);return this.header("Location",!/[^\x00-\xFF]/.test(D)?D:encodeURI(D)),this.newResponse(null,U??302)};notFound=()=>{return this.#T??=()=>Lc(),this.#T(this)}};var A1="ALL",fx="all",hx=["get","post","put","delete","options","patch","query"],_g="Can not add a route since the matcher is already built.",Sg=class extends Error{};var Wx="__COMPOSED_HANDLER";var yO=(n)=>{return n.text("404 Not Found",404)},xx=(n,U)=>{if("getResponse"in n){let D=n.getResponse();return U.newResponse(D.body,D)}return console.error(n),U.text("Internal Server Error",500)},Tx=class n{get;post;put;delete;options;patch;query;all;on;use;router;getPath;_basePath="/";#n="/";routes=[];constructor(U={}){[...hx,fx].forEach((f)=>{this[f]=(h,...W)=>{if(typeof h==="string")this.#n=h;else this.#f(f,this.#n,h);return W.forEach((T)=>{this.#f(f,this.#n,T)}),this}}),this.on=(f,h,...W)=>{for(let T of[h].flat()){this.#n=T;for(let x of[f].flat())W.map((y)=>{this.#f(x.toUpperCase(),this.#n,y)})}return this},this.use=(f,...h)=>{if(typeof f==="string")this.#n=f;else this.#n="*",h.unshift(f);return h.forEach((W)=>{this.#f(A1,this.#n,W)}),this};let{strict:c,...g}=U;Object.assign(this,g),this.getPath=c??!0?U.getPath??gf:sW}#U(){let U=new n({router:this.router,getPath:this.getPath});return U.errorHandler=this.errorHandler,U.#D=this.#D,U.routes=this.routes,U}#D=yO;errorHandler=xx;route(U,D){let c=this.basePath(U);return D.routes.map((g)=>{let f;if(D.errorHandler===xx)f=g.handler;else f=async(h,W)=>(await Uf([],D.errorHandler)(h,()=>g.handler(h,W))).res,f[Wx]=g.handler;c.#f(g.method,g.path,f,g.basePath)}),this}basePath(U){let D=this.#U();return D._basePath=a2(this._basePath,U),D}onError=(U)=>{return this.errorHandler=U,this};notFound=(U)=>{return this.#D=U,this};mount(U,D,c){let g,f;if(c)if(typeof c==="function")f=c;else if(f=c.optionHandler,c.replaceRequest===!1)g=(T)=>T;else g=c.replaceRequest;let h=f?(T)=>{let x=f(T);return Array.isArray(x)?x:[x]}:(T)=>{let x=void 0;try{x=T.executionCtx}catch{}return[T.env,x]};g||=(()=>{let T=a2(this._basePath,U),x=T==="/"?0:T.length;return(y)=>{let F=new URL(y.url);return F.pathname=this.getPath(y).slice(x)||"/",new Request(F,y)}})();let W=async(T,x)=>{let y=await D(g(T.req.raw),...h(T));if(y)return y;await x()};return this.#f(A1,a2(U,"*"),W),this}#f(U,D,c,g){U=U.toUpperCase(),D=a2(this._basePath,D);let f={basePath:g!==void 0?a2(this._basePath,g):this._basePath,path:D,method:U,handler:c};this.router.add(U,D,[c,f]),this.routes.push(f)}#c(U,D){if(U instanceof Error)return this.errorHandler(U,D);throw U}#g(U,D,c,g){if(g==="HEAD")return(async()=>new Response(null,await this.#g(U,D,c,"GET")))();let f=this.getPath(U,{env:c}),h=this.router.match(g,f),W=new Wf(U,{path:f,matchResult:h,env:c,executionCtx:D,notFoundHandler:this.#D});if(h[0].length===1){let x;try{x=h[0][0][0][0](W,async()=>{W.res=await this.#D(W)})}catch(y){return this.#c(y,W)}return x instanceof Promise?x.then((y)=>y||(W.finalized?W.res:this.#D(W))).catch((y)=>this.#c(y,W)):x??this.#D(W)}let T=Uf(h[0],this.errorHandler,this.#D);return(async()=>{try{let x=await T(W);if(!x.finalized)throw Error("Context is not finalized. Did you forget to return a Response object or `await next()`?");return x.res}catch(x){return this.#c(x,W)}})()}fetch=(U,...D)=>{return this.#g(U,D[1],D[0],U.method)};request=(U,D,c,g)=>{if(U instanceof Request)return this.fetch(D?new Request(U,D):U,c,g);return U=U.toString(),this.fetch(new Request(/^https?:\/\//.test(U)?U:`http://localhost${a2("/",U)}`,D),c,g)};fire=()=>{addEventListener("fetch",(U)=>{U.respondWith(this.#g(U.request,U,void 0,U.request.method))})}};var Cc=[];function vg(n,U){let D=this.buildAllMatchers(),c=(g,f)=>{let h=D[g]||D[A1],W=h[2][f];if(W)return W;let T=f.match(h[0]);if(!T)return[[],Cc];let x=T.indexOf("",1);return[h[1][x],T]};return this.match=c,c(n,U)}var Ng="[^/]+",XD=".*",bU="(?:|/.*)",o2=Symbol(),yx=new Set(".\\+*[^]$()");function FO(n,U){if(n.length===1)return U.length===1?n<U?-1:1:-1;if(U.length===1)return 1;if(n===XD||n===bU)return U===bU?-1:1;else if(U===XD||U===bU)return-1;if(n===Ng)return 1;else if(U===Ng)return-1;return n.length===U.length?n<U?-1:1:U.length-n.length}var Fx=class n{#n;#U;#D=Object.create(null);insert(U,D,c,g,f){let h=this;for(let W=0,T=U.length;W<T;W++){let x=U[W],y=x.length===1?x==="*"?W===T-1?["","",XD]:["","",Ng]:null:x==="/*"?["","",bU]:x.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/),F;if(y){let i=y[1],X=y[2]||Ng;if(i&&y[2]){if(X===".*")throw o2;if(X=X.replace(/^\((?!\?:)(?=[^)]+\)$)/,"(?:"),/\((?!\?:)/.test(X))throw o2;if(X.length===1&&yx.has(X))throw o2}if(F=h.#D[X],!F){if(X!==XD&&X!==bU){for(let $ in h.#D)if((X.length>1||$.length>1)&&$!==XD&&$!==bU)throw o2}F=h.#D[X]=new n}if(i!=="")F.#U??=g.varIndex++,c.push([i,F.#U])}else if(F=h.#D[x],!F){for(let i in h.#D)if(i.length>1&&i!==XD&&i!==bU)throw o2;F=h.#D[x]=new n}h=F}if(h.#n!==void 0)throw o2;h.#n=f?-1:D}buildRegExpStr(){let D=Object.keys(this.#D).sort(FO).map((c)=>{let g=this.#D[c],f=g.buildRegExpStr();return f===""?"":(typeof g.#U==="number"?`(${c})@${g.#U}`:yx.has(c)?`\\${c}`:c)+f}).filter(Boolean);if(typeof this.#n==="number"&&this.#n!==-1)D.unshift(`#${this.#n}`);if(D.length===0)return"";if(D.length===1)return D[0];return"(?:"+D.join("|")+")"}};var xf=class{#n={varIndex:0};#U=new Fx;#D=0;paths=Object.create(null);insert(n,U){if(U){this.#U.insert(n.split(""),0,[],this.#n,!0);return}let D=[],c=[],g=n;for(let h=0;;){let W=!1;if(g=g.replace(/\{[^}]+\}/g,(T)=>{let x=`@\\${h}`;return c[h]=[x,T],h++,W=!0,x}),!W)break}let f=g.match(/(?::[^\/]+)|(?:\/\*$)|./g)||[];for(let h=c.length-1;h>=0;h--){let[W]=c[h];for(let T=f.length-1;T>=0;T--)if(f[T].indexOf(W)!==-1){f[T]=f[T].replace(W,c[h][1]);break}}this.#U.insert(f,this.#D,D,this.#n,!1),this.paths[n]=[this.#D++,D]}buildRegExp(){let n=this.#U.buildRegExpStr();if(n==="")return[/^$/,[],[]];let U=0,D=[],c=[];return n=n.replace(/#(\d+)|@(\d+)|\.\*\$/g,(g,f,h)=>{if(f!==void 0)return D[++U]=Number(f),"$()";if(h!==void 0)return c[Number(h)]=++U,"";return""}),[new RegExp(`^${n}`),D,c]}};var ix=Object.create(null);function Xx(n){return ix[n]??=new RegExp(n==="*"?"":`^${n.replace(/\/\*$|([.\\+*[^\]$()])/g,(U,D)=>D?`\\${D}`:"(?:|/.*)")}$`)}function iO(){ix=Object.create(null)}function Pg(n,U){if(!n)return;for(let D of Object.keys(n).sort((c,g)=>g.length-c.length))if(Xx(D).test(U))return[...n[D]];return}var Rg=class{name="RegExpRouter";#n;#U;#D;constructor(){this.#n={[A1]:Object.create(null)},this.#U={[A1]:Object.create(null)},this.#D={[A1]:new xf}}#f(n,U){try{this.#D[n].insert(U,!/\*|\/:/.test(U))}catch(D){throw D===o2?new Sg(U):D}}add(n,U,D){let c=this.#n,g=this.#U;if(!c||!g)throw Error(_g);if(!c[n])this.#D[n]=new xf,[c,g].forEach((W)=>{W[n]=Object.create(null),Object.keys(W[A1]).forEach((T)=>{W[n][T]=[...W[A1][T]],this.#f(n,T)})});if(U==="/*")U="*";let f=(U.match(/\/:/g)||[]).length;if(/\*$/.test(U)){let W=Xx(U);Object.keys(c).forEach((T)=>{if((n===A1||n===T)&&!c[T][U])this.#f(T,U),c[T][U]=Pg(c[T],U)||Pg(c[A1],U)||[]}),Object.keys(c).forEach((T)=>{if(n===A1||n===T)Object.keys(c[T]).forEach((x)=>{W.test(x)&&c[T][x].push([D,f])})}),Object.keys(g).forEach((T)=>{if(n===A1||n===T)Object.keys(g[T]).forEach((x)=>W.test(x)&&g[T][x].push([D,f]))});return}let h=jg(U)||[U];for(let W=0,T=h.length;W<T;W++){let x=h[W];Object.keys(g).forEach((y)=>{if(n===A1||n===y){if(!g[y][x])this.#f(y,x),g[y][x]=[...Pg(c[y],x)||Pg(c[A1],x)||[]];g[y][x].push([D,f-T+W+1])}})}}match=vg;buildAllMatchers(){let n=Object.create(null);return Object.keys(this.#U).concat(Object.keys(this.#n)).forEach((U)=>{n[U]||=this.#c(U)}),this.#n=this.#U=this.#D=void 0,iO(),n}#c(n){let U=this.#n[n],D=this.#U[n],c=this.#D[n],g=Object.create(null),f=[];[U,D].forEach((y)=>{for(let F in y){let i=y[F],X=c.paths[F];if(!X){g[F]=[i.map(([Q])=>[Q,Object.create(null)]),Cc];continue}let $=X[1];f[X[0]]=i.map(([Q,Y])=>{let V=Object.create(null);Y-=1;for(;Y>=0;Y--){let[G,J]=$[Y];V[G]=J}return[Q,V]})}});let[h,W,T]=c.buildRegExp();for(let y=0,F=f.length;y<F;y++)for(let i=0,X=f[y].length;i<X;i++){let $=f[y][i]?.[1];if(!$)continue;let Q=Object.keys($);for(let Y=0,V=Q.length;Y<V;Y++)$[Q[Y]]=T[$[Q[Y]]]}let x=[];for(let y in W)x[y]=f[W[y]];return[h,x,g]}};var XO=class{name="PreparedRegExpRouter";#n;#U;constructor(n,U){this.#n=n,this.#U=U}#D(n,U){let D=this.#n[n];D[1].forEach((c)=>c&&c.push(U)),Object.values(D[2]).forEach((c)=>c[0].push(U))}#f(n,U,D,c,g){let f=this.#n[n];if(!g)f[2][U][0].push([D,{}]);else c.forEach((h)=>{if(typeof h==="number")f[1][h].push([D,g]);else f[2][h||U][0].push([D,g])})}add(n,U,D){if(!this.#n[n]){let g=this.#n[A1],f={};for(let h in g[2])f[h]=[g[2][h][0].slice(),Cc];this.#n[n]=[g[0],g[1].map((h)=>Array.isArray(h)?h.slice():0),f]}if(U==="/*"||U==="*"){let g=[D,{}];if(n===A1)for(let f in this.#n)this.#D(f,g);else this.#D(n,g);return}let c=this.#U[U];if(!c)throw Error(`Path ${U} is not registered`);for(let[g,f]of c)if(n===A1)for(let h in this.#n)this.#f(h,U,D,g,f);else this.#f(n,U,D,g,f)}buildAllMatchers(){return this.#n}match=vg};var Tf=class{name="SmartRouter";#n=[];#U=[];constructor(n){this.#n=n.routers}add(n,U,D){if(!this.#U)throw Error(_g);this.#U.push([n,U,D])}match(n,U){if(!this.#U)throw Error("Fatal error");let D=this.#n,c=this.#U,g=D.length,f=0,h;for(;f<g;f++){let W=D[f];try{for(let T=0,x=c.length;T<x;T++)W.add(...c[T]);h=W.match(n,U)}catch(T){if(T instanceof Sg)continue;throw T}this.match=W.match.bind(W),this.#n=[W],this.#U=void 0;break}if(f===g)throw Error("Fatal error");return this.name=`SmartRouter + ${this.activeRouter.name}`,h}get activeRouter(){if(this.#U||this.#n.length!==1)throw Error("No active router has been determined yet.");return this.#n[0]}};var Ec=Object.create(null),JO=(n)=>{for(let U in n)return!0;return!1},Jx=class n{#n;#U;#D;#f=0;#c=Ec;constructor(U,D,c){if(this.#U=c||Object.create(null),this.#n=[],U&&D){let g=Object.create(null);g[U]={handler:D,possibleKeys:[],score:0},this.#n=[g]}this.#D=[]}insert(U,D,c){this.#f=++this.#f;let g=this,f=lW(D),h=[];for(let W=0,T=f.length;W<T;W++){let x=f[W],y=f[W+1],F=tW(x,y),i=Array.isArray(F)?F[0]:x;if(i in g.#U){if(g=g.#U[i],F)h.push(F[1]);continue}if(g.#U[i]=new n,F)g.#D.push(F),h.push(F[1]);g=g.#U[i]}return g.#n.push({[U]:{handler:c,possibleKeys:h.filter((W,T,x)=>x.indexOf(W)===T),score:this.#f}}),g}#g(U,D,c,g,f){for(let h=0,W=D.#n.length;h<W;h++){let T=D.#n[h],x=T[c]||T[A1],y={};if(x!==void 0){if(x.params=Object.create(null),U.push(x),g!==Ec||f&&f!==Ec)for(let F=0,i=x.possibleKeys.length;F<i;F++){let X=x.possibleKeys[F],$=y[x.score];x.params[X]=f?.[X]&&!$?f[X]:g[X]??f?.[X],y[x.score]=!0}}}}search(U,D){let c=[];this.#c=Ec;let f=[this],h=cf(D),W=[],T=h.length,x=null;for(let y=0;y<T;y++){let F=h[y],i=y===T-1,X=[];for(let Q=0,Y=f.length;Q<Y;Q++){let V=f[Q],G=V.#U[F];if(G)if(G.#c=V.#c,i){if(G.#U["*"])this.#g(c,G.#U["*"],U,V.#c);this.#g(c,G,U,V.#c)}else X.push(G);for(let J=0,B=V.#D.length;J<B;J++){let z=V.#D[J],q=V.#c===Ec?{}:{...V.#c};if(z==="*"){let w=V.#U["*"];if(w)this.#g(c,w,U,V.#c),w.#c=q,X.push(w);continue}let[Z,M,O]=z;if(!F&&!(O instanceof RegExp))continue;let _=V.#U[Z];if(O instanceof RegExp){if(x===null){x=Array(T);let v=D[0]==="/"?1:0;for(let P=0;P<T;P++)x[P]=v,v+=h[P].length+1}let w=D.substring(x[y]),H=O.exec(w);if(H){if(q[M]=H[0],this.#g(c,_,U,V.#c,q),H[0].length===w.length&&_.#U["*"])this.#g(c,_.#U["*"],U,V.#c,q);if(JO(_.#U)){_.#c=q;let v=H[0].match(/\//g)?.length??0;(W[v]||=[]).push(_)}continue}}if(O===!0||O.test(F))if(q[M]=F,i){if(this.#g(c,_,U,q,V.#c),_.#U["*"])this.#g(c,_.#U["*"],U,q,V.#c)}else _.#c=q,X.push(_)}}let $=W.shift();f=$?X.concat($):X}if(c.length>1)c.sort((y,F)=>{return y.score-F.score});return[c.map(({handler:y,params:F})=>[y,F])]}};var yf=class{name="TrieRouter";#n;constructor(){this.#n=new Jx}add(n,U,D){let c=jg(U);if(c){for(let g=0,f=c.length;g<f;g++)this.#n.insert(n,c[g],D);return}this.#n.insert(n,U,D)}match(n,U){return this.#n.search(n,U)}};var Ff=class extends Tx{constructor(n={}){super(n);this.router=n.router??new Tf({routers:[new Rg,new yf]})}};import{getAgentDir as ys}from"@earendil-works/pi-coding-agent";import{isIP as $x}from"node:net";function Vx(n){return(n.startsWith("[")&&n.endsWith("]")?n.slice(1,-1):n).toLowerCase().replace(/\.$/,"")}function Qx(n){if(!n||/[\s/@\\]/.test(n))return null;try{let U=new URL(`http://${n}`);if(U.username||U.password||U.pathname!=="/"||U.search||U.hash)return null;return Vx(U.hostname)}catch{return null}}function $O(n){let U=n?.trim();if(!U)return null;return $x(U)?Vx(U):Qx(U)}function VO(n){return n==="localhost"||n.endsWith(".localhost")}function Yx(){return[process.env.PI_WEB_HOSTNAME,...process.env.PI_WEB_ALLOWED_HOSTS?.split(",")??[]].filter((n)=>Boolean(n?.trim()))}function Bx(n){try{return new URL(n).origin}catch{return null}}function QO(n){let U=new URL(n.url),D=n.headers.get("host");return D?Bx(`${U.protocol}//${D}`):null}function YO(n){if(n.method!=="GET"||n.headers.get("sec-fetch-mode")!=="navigate"||n.headers.get("sec-fetch-dest")!=="document"||n.headers.get("sec-fetch-user")!=="?1")return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(n.url).pathname)}catch{return!1}}function Xf(n,U=Yx()){let D=n.headers.get("host"),c=D?Qx(D):null;if(!c)return!1;if(VO(c)||$x(c))return!0;return U.some((g)=>$O(g)===c)}function BO(n){let U=n.headers.get("origin");if(n.headers.get("sec-fetch-site")==="cross-site")return!1;if(!U)return!0;let c=QO(n);return c!==null&&Bx(U)===c}function GO(n){return n.headers.has("origin")||n.headers.has("sec-fetch-site")}function U2(n,U=Yx()){if(!Xf(n,U))return!1;if(YO(n))return!0;return!GO(n)||BO(n)}function JD(n){let U=n.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return U==="application/json"||Boolean(U?.startsWith("application/")&&U.endsWith("+json"))}import{createHash as KO,timingSafeEqual as ZO}from"node:crypto";var bO="pi";function Gx(n){return KO("sha256").update(n,"utf8").digest()}function Kx(n,U){return ZO(Gx(n),Gx(U))}function Jf(n=process.env.PI_WEB_PASSWORD){return typeof n==="string"&&n.length>0}function Zx(n,U=process.env.PI_WEB_PASSWORD){if(!Jf(U)||!n)return!1;let D=/^Basic\s+(\S+)$/i.exec(n);if(!D)return!1;let c;try{let x=Buffer.from(D[1],"base64");if(x.toString("base64")!==D[1])return!1;c=new TextDecoder("utf-8",{fatal:!0}).decode(x)}catch{return!1}let g=c.indexOf(":");if(g===-1)return!1;let f=c.slice(0,g),h=c.slice(g+1),W=Kx(f,bO),T=Kx(h,U);return W&&T}class $f extends Request{nextUrl;constructor(n){let U=n.method!=="GET"&&n.method!=="HEAD";super(n.url,{method:n.method,headers:n.headers,body:U?n.body:void 0,duplex:U?"half":void 0,signal:n.signal});this.nextUrl=new URL(n.url)}}class K extends Response{static json(n,U){let D=new Headers(U?.headers);return D.set("content-type","application/json; charset=utf-8"),new K(JSON.stringify(n),{status:U?.status??200,statusText:U?.statusText,headers:D})}}var Vf=!1,bx=performance.now();function zx(n){if(Vf=n,bx=performance.now(),Vf)Ox("boot","debug log enabled")}function $D(n){return(U,D)=>Ox(n,U,D)}function Ox(n,U,D){if(!Vf)return;let c=performance.now()-bx,g=new Date,f=(W,T=2)=>String(W).padStart(T,"0"),h=`${f(g.getHours())}:${f(g.getMinutes())}:${f(g.getSeconds())}.${f(g.getMilliseconds(),3)}`;console.debug(`[debug][${n}][${h}][+${c.toFixed(1)}ms] ${U}${D?` — ${D}`:""}`)}var zO=$D("mount"),OO=["GET","POST","PUT","PATCH","DELETE"];function n1(n,U,D){let c=U.split("/").filter(Boolean),g=[],f=new Map;for(let W of c){let T=W.match(/^\[\.\.\.(.+)\]$/),x=W.match(/^\[(.+)\]$/);if(T)g.push(`:${T[1]}{.+}`),f.set(T[1],{hono:T[1],catchAll:!0});else if(x)g.push(`:${x[1]}`),f.set(x[1],{hono:x[1],catchAll:!1});else g.push(W)}let h=`/${g.join("/")}`;for(let W of OO){let T=D[W];if(typeof T!=="function")continue;let x=T;n.on(W,h,async(y)=>{let F=performance.now(),i={};for(let[$,{hono:Q,catchAll:Y}]of f)if(Y){let V=y.req.param(Q)??"";i[$]=V===""?[]:V.split("/")}else i[$]=y.req.param(Q)??"";let X=await x(new $f(y.req.raw),{params:Promise.resolve(i)});return zO(`${W} ${y.req.path}`,`${X.status} ${Math.round(performance.now()-F)}ms`),X})}}var Lf={};U1(Lf,{GET:()=>Xq});import{tmpdir as Fq}from"node:os";import{Readable as iq}from"node:stream";import{constants as Qf}from"node:fs";import{lstat as qO,open as MO}from"node:fs/promises";import{basename as AO,dirname as HO,resolve as qx}from"node:path";var ug=5242880;function Mx(n,U){let D=qx(n);if(HO(D)!==qx(U))return null;if(!/^pi-bash-[A-Za-z0-9_-]+\.log$/.test(AO(D)))return null;return D}async function Yf(n){if(!(await qO(n)).isFile())throw Error("Bash output path is not a regular file");let D=typeof Qf.O_NOFOLLOW==="number"?Qf.O_NOFOLLOW:0,c=await MO(n,Qf.O_RDONLY|D);try{let g=await c.stat();if(!g.isFile())throw Error("Bash output path is not a regular file");return{handle:c,fileInfo:g}}catch(g){throw await c.close(),g}}async function Ax(n,U=ug){let{handle:D,fileInfo:c}=await Yf(n);try{if(c.size>U)return{tooLarge:!0,size:c.size};let g=Buffer.alloc(c.size),f=0;while(f<g.length){let h=await D.read(g,f,g.length-f,f);if(h.bytesRead===0)break;f+=h.bytesRead}return{tooLarge:!1,content:g.subarray(0,f).toString("utf8"),size:f}}finally{await D.close()}}import{open as Sx,readFile as dO,readdir as kO}from"node:fs/promises";import{existsSync as pO,readdirSync as mO}from"node:fs";import{join as pg,normalize as zf}from"node:path";import{getAgentDir as aO,buildContextEntries as oO,buildSessionContext as rO,SessionManager as vx}from"@earendil-works/pi-coding-agent";function LO(n){return typeof n==="object"&&n!==null&&!Array.isArray(n)}function CO(n){if(!LO(n)||n.type!=="toolCall")return null;return{type:"toolCall",toolCallId:typeof n.toolCallId==="string"?n.toolCallId:typeof n.id==="string"?n.id:"",toolName:typeof n.toolName==="string"?n.toolName:typeof n.name==="string"?n.name:"",input:typeof n.input==="object"&&n.input!==null&&!Array.isArray(n.input)?n.input:typeof n.arguments==="object"&&n.arguments!==null&&!Array.isArray(n.arguments)?n.arguments:{}}}function Bf(n){if(n.role!=="assistant")return n;let U=n.content;if(!Array.isArray(U))return n;let D=U.map((c)=>{return CO(c)??c});return{...n,content:D}}import Hx from"node:path";function Cn(n,U=process.platform){let D=U==="win32"?Hx.win32.normalize(n):Hx.posix.normalize(n);return U==="win32"?D.toLowerCase():D}import{execFile as EO}from"node:child_process";import{existsSync as dg,mkdirSync as wO,realpathSync as jO}from"node:fs";import{basename as IO,dirname as Kf,join as Cx,resolve as _O}from"node:path";import{promisify as SO}from"node:util";function u1(n){let U=n.replace(/\\/g,"/");return/^[a-zA-Z]:$/.test(U)?`${U}/`:U}function Gf(){if(!globalThis.__piAdditionalAllowedRoots)globalThis.__piAdditionalAllowedRoots=new Set;return globalThis.__piAdditionalAllowedRoots}function On(n){if(!n)return;let U=u1(n);Gf().add(U),globalThis.__piAllowedRootsCache?.roots.add(U)}var vO=SO(EO),Lx=60000;function NO(){if(!globalThis.__piProjectCache)globalThis.__piProjectCache=new Map;return globalThis.__piProjectCache}function Ex(){globalThis.__piProjectCache?.clear()}async function zU(n,U){let{stdout:D}=await vO("git",["-C",n,...U],{timeout:1e4,maxBuffer:1048576,env:{...process.env,LC_ALL:"C"}});return D.trim()}function PO(n){let U=Kf(n);if(!U.endsWith("-worktrees"))return null;let D=U.slice(0,-10);if(!D||!dg(Cx(D,".git")))return null;return{projectRoot:D,branch:IO(n),isWorktree:!0,isTopLevel:!0}}async function kg(n){let U=NO(),D=U.get(n);if(D&&D.expiresAt>Date.now())return D.info;let c;try{if(!dg(n))return c=PO(n)??{projectRoot:n,branch:null,isWorktree:!1,isTopLevel:!1},U.set(n,{info:c,expiresAt:Date.now()+Lx}),c;let g=await zU(n,["rev-parse","--path-format=absolute","--git-common-dir","--git-dir","--show-toplevel","--abbrev-ref","HEAD"]),[f,h,W,T]=g.split(`
|
|
253
|
+
`).map((i)=>i.trim()),x=n;try{x=jO(n)}catch{}let y=W===x,F=h!==f&&y;c={projectRoot:F?Kf(f):n,branch:T&&T!=="HEAD"?T:null,isWorktree:F,isTopLevel:y}}catch{c={projectRoot:n,branch:null,isWorktree:!1,isTopLevel:!1}}return U.set(n,{info:c,expiresAt:Date.now()+Lx}),c}async function RO(n){let U=await zU(n,["rev-parse","--path-format=absolute","--git-common-dir"]);return Kf(U)}async function Zf(n){let U=await zU(n,["worktree","list","--porcelain"]),D=[],c=null,g=()=>{if(c?.path){if(!c.prunable&&dg(c.path))D.push({path:c.path,branch:c.branch??null,isMain:D.length===0})}c=null};for(let f of U.split(`
|
|
254
|
+
`))if(f.startsWith("worktree "))g(),c={path:f.slice(9).trim()};else if(f.startsWith("branch ")&&c)c.branch=f.slice(7).trim().replace(/^refs\/heads\//,"");else if(f.startsWith("prunable")&&c)c.prunable=!0;else if(f.trim()==="")g();return g(),D}function uO(n){return n.replace(/[/\\:*?"<>|\s]+/g,"-").replace(/^-+|-+$/g,"")}async function wx(n,U){let D=U.trim();if(!D)throw Error("Branch name is required");let c=uO(D);if(!c)throw Error(`Invalid branch name: ${U}`);let g=await RO(n),f=`${_O(g)}-worktrees`,h=Cx(f,c);if(dg(h))throw Error(`Directory already exists: ${h}`);wO(f,{recursive:!0});let W=!1;try{await zU(g,["rev-parse","--verify","--quiet",`refs/heads/${D}`]),W=!0}catch{W=!1}try{if(W)await zU(g,["worktree","add","--",h,D]);else await zU(g,["worktree","add","-b",D,"--",h])}catch(T){throw Error(Ix(T),{cause:T})}return On(h),Ex(),{path:h,branch:D}}async function jx(n,U,D=!1){let g=(await Zf(n)).find((f)=>f.path===U);if(!g)throw Error(`Not a worktree of this repository: ${U}`);if(g.isMain)throw Error("Cannot remove the main worktree");try{await zU(n,["worktree","remove",...D?["--force"]:[],U])}catch(f){throw Error(Ix(f),{cause:f})}Ex()}function Ix(n){let U=n.stderr;if(typeof U==="string"&&U.trim())return U.trim();return n instanceof Error?n.message:String(n)}async function lO(n,U){let D=new Map;for(let f of n)D.set(Cn(f.path),f.id);let c=[...new Set(n.map((f)=>f.cwd).filter(Boolean))],g=new Map;return await Promise.all(c.map(async(f)=>{g.set(f,await kg(f))})),n.map((f)=>{r2(f.id,f.path,U);let h=f.cwd?g.get(f.cwd):void 0;return{path:f.path,id:f.id,cwd:f.cwd,name:f.name,created:f.created instanceof Date?f.created.toISOString():String(f.created),modified:f.modified instanceof Date?f.modified.toISOString():String(f.modified),messageCount:f.messageCount,firstMessage:f.firstMessage||"(no messages)",parentSessionId:f.parentSessionPath?D.get(Cn(f.parentSessionPath)):void 0,projectRoot:h?.projectRoot??f.cwd,...h?.isWorktree&&h.branch?{worktreeBranch:h.branch}:{}}})}async function tO(){let n=await Nx(pg(aO(),"sessions"));for(let U of n)r2(U.id,U.path);return n}async function eO(n){let U=[],D=async(c)=>{let g;try{g=await kO(c,{withFileTypes:!0})}catch{return}for(let f of g){let h=pg(c,f.name);if(f.isDirectory())await D(h);else if(f.name.endsWith(".jsonl"))U.push(h)}};try{await D(n)}catch{}return U}function sO(n){if(!Array.isArray(n.content))return"";return n.content.filter((U)=>!!U&&typeof U==="object"&&U.type==="text"&&typeof U.text==="string").map((U)=>U.text).join(" ")}async function nq(n){let U=await dO(n,"utf8"),D=[];for(let x of U.split(`
|
|
255
|
+
`)){let y=x.trim();if(!y)continue;try{let F=JSON.parse(y);if(F&&typeof F==="object")D.push(F)}catch{}}if(D.length===0)throw Error("file contains no session entries");let c=D[0];if(c?.type!=="session"||typeof c.id!=="string")throw Error("missing session header (first line must be a session entry)");let g=new Date(c.timestamp);if(Number.isNaN(g.getTime()))throw Error(`invalid session header timestamp: ${JSON.stringify(c.timestamp)}`);let f=0,h="",W,T;for(let x of D){let y=x;if(y.type==="session_info"){let $=y.name;if(typeof $==="string"&&$.trim())W=$.trim();continue}if(y.type!=="message")continue;f++;let F=y.message;if(!F||F.role!=="user"&&F.role!=="assistant")continue;let i=typeof F.timestamp==="number"?F.timestamp:new Date(y.timestamp).getTime();if(typeof i==="number"&&!Number.isNaN(i))T=Math.max(T??0,i);if(F.role==="user"&&!h){let $=sO(F);if($)h=$}}return{path:n,id:c.id,cwd:typeof c.cwd==="string"?c.cwd:"",name:W,parentSessionPath:typeof c.parentSession==="string"?c.parentSession:void 0,created:g,modified:typeof T==="number"&&T>0?new Date(T):g,messageCount:f,firstMessage:h||"(no messages)",allMessagesText:""}}function Uq(n,U){if(n.error)return U.error?0:1;if(U.error)return-1;return n.modified<U.modified?1:n.modified>U.modified?-1:0}async function Dq(n){try{let U=await Sx(n,"r");try{let D=Buffer.alloc(8192),{bytesRead:c}=await U.read(D,0,D.length,null),g=D.subarray(0,c).toString("utf8").split(`
|
|
256
|
+
`)[0],f=JSON.parse(g);return typeof f?.cwd==="string"?f.cwd:""}finally{await U.close()}}catch{return""}}async function Nx(n){let U=await eO(n),D=await Promise.all(U.map(async(f)=>{try{return{info:await nq(f)}}catch(h){return console.error(`[session-reader] failed to parse session file ${f}:`,h),{error:String(h),file:f,cwd:await Dq(f)}}})),c=D.filter((f)=>f.info).map((f)=>f.info),g=await lO(c,n);g.sort(Uq);for(let f of D.filter((h)=>!h.info))r2(f.file,f.file,n),g.push({path:f.file,id:f.file,cwd:f.cwd,created:"",modified:"",messageCount:0,firstMessage:"",error:f.error});return g}async function og(n){return Nx(n)}function Px(n,U){let D=rg();for(let c of n)D.set(c,U);delete globalThis.__piAllowedRootsCache}function Rx(n){let U=rg().get(n);if(!U)return[];let D=pg(U,"plugins");try{return mO(D).filter((c)=>c.endsWith(".ts")||c.endsWith(".mjs")||c.endsWith(".js")).map((c)=>pg(D,c))}catch{return[]}}function ux(){globalThis.__piFixtureMode=!0,delete globalThis.__piAllowedRootsCache}function dx(){return globalThis.__piFixtureMode===!0}function Of(){return[...new Set(rg().values())]}function rg(){if(!globalThis.__piSessionDirRegistry)globalThis.__piSessionDirRegistry=new Map;return globalThis.__piSessionDirRegistry}function OU(){if(!globalThis.__piSessionPathCacheByDir)globalThis.__piSessionPathCacheByDir=new Map;return globalThis.__piSessionPathCacheByDir}async function VD(n){if(dx())return(await Promise.all(Of().map((f)=>og(f)))).flat().sort((f,h)=>f.modified<h.modified?1:f.modified>h.modified?-1:0);let U=globalThis.__piSessionListGeneration??0;if(n!=="fresh"&&globalThis.__piSessionListCache&&Date.now()-globalThis.__piSessionListCache.ts<cq)return globalThis.__piSessionListCache.data;if(globalThis.__piSessionListPromise&&globalThis.__piSessionListPromiseGeneration===U)return globalThis.__piSessionListPromise;let c=tO().then((g)=>{if(n!=="fresh"&&(globalThis.__piSessionListGeneration??0)===U)globalThis.__piSessionListCache={data:g,ts:Date.now()};return g}).finally(()=>{if(globalThis.__piSessionListPromise===c)globalThis.__piSessionListPromise=void 0,globalThis.__piSessionListPromiseGeneration=void 0});return globalThis.__piSessionListPromise=c,globalThis.__piSessionListPromiseGeneration=U,c}var cq=30000;function Un(){globalThis.__piSessionListGeneration=(globalThis.__piSessionListGeneration??0)+1,globalThis.__piSessionListCache=void 0}function mg(){if(!globalThis.__piSessionPathCache)globalThis.__piSessionPathCache=new Map;return globalThis.__piSessionPathCache}function ag(){if(!globalThis.__piPathToSessionIdCache)globalThis.__piPathToSessionIdCache=new Map;return globalThis.__piPathToSessionIdCache}async function j1(n){if(pO(n))return zf(n);let U=rg().get(n);if(U){let h=OU().get(U)?.get(n);if(h)return h;let T=(await vx.listAll(U)).find((x)=>x.id===n);if(T){let x=zf(T.path),y=OU().get(U);if(!y)y=new Map,OU().set(U,y);return y.set(n,x),x}return null}if(dx()){for(let W of Of()){let T=OU().get(W)?.get(n);if(T)return T}let h=(await Promise.all(Of().map((W)=>og(W)))).flat().find((W)=>W.id===n);return h?h.path:null}let D=mg().get(n);if(D)return D;let g=globalThis.__piSessionListCache?.data?.find((f)=>f.id===n);if(g)return r2(n,g.path),g.path;return await VD(),mg().get(n)??null}async function kx(n){let U=Cn(n),D=ag().get(U);if(D)return D;return await VD(),ag().get(U)}function r2(n,U,D){let c=zf(U),g=Cn(c);if(D){let F=OU().get(D);if(!F)F=new Map,OU().set(D,F);F.set(n,c);return}let f=mg(),h=ag(),W=f.get(n),T=W?Cn(W):void 0,x=h.get(g),y=x?f.get(x):void 0;if(T&&T!==g&&h.get(T)===n)h.delete(T);if(x&&x!==n&&y&&Cn(y)===g)f.delete(x);f.set(n,c),h.set(g,n)}function px(n,U){if(U){OU().get(U)?.delete(n);return}let D=mg(),c=ag(),g=D.get(n);D.delete(n);let f=g?Cn(g):void 0;if(f&&c.get(f)===n)c.delete(f)}async function mx(n){let U=await Sx(n,"r");try{let D=[],c=65536,g=0,f=!1;while(g<65536&&!f){let W=Buffer.allocUnsafe(Math.min(4096,65536-g)),{bytesRead:T}=await U.read(W,0,W.length,g);if(T===0)break;let x=W.subarray(0,T),y=x.indexOf(10);D.push(y===-1?x:x.subarray(0,y)),g+=T,f=y!==-1}if(!f&&g>=65536)return null;let h=Buffer.concat(D).toString("utf8").trimEnd();if(!h)return null;try{let W=JSON.parse(h);return W.type==="session"?W:null}catch{return null}}finally{await U.close()}}function wc(n){return vx.open(n).getEntries()}function lg(n,U,D={}){let c=new Map;for(let x of n)c.set(x.id,x);let g=n,f=rO(g,U,c),h=oO(g,U,c),W=[],T=[];for(let x of h){let y=x,F=hq(y,D);if(F)W.push(F),T.push(y.id)}return{messages:W,entryIds:T,thinkingLevel:f.thinkingLevel,model:f.model}}function bf(n){let U=Date.parse(n);return Number.isNaN(U)?void 0:U}function _x(n){return typeof n==="object"&&n!==null&&!Array.isArray(n)}function gq(n){if(!_x(n)||n.type!=="image")return null;let U,D;if(typeof n.data==="string")U=n.data,D=typeof n.mimeType==="string"?n.mimeType:void 0;else if(_x(n.source)&&n.source.type==="base64"&&typeof n.source.data==="string")U=n.source.data,D=typeof n.source.media_type==="string"?n.source.media_type:void 0;if(!U)return null;let c=U.endsWith("==")?2:U.endsWith("=")?1:0;return{bytes:Math.max(0,Math.floor(U.length*3/4)-c),mime:D}}function fq(n){if(n.role!=="toolResult")return n;let U=0,D=0,c=new Set,g=n.content.filter((h)=>{let W=gq(h);if(!W)return!0;if(U+=1,D+=W.bytes,W.mime)c.add(W.mime);return!1});if(U===0)return n;let f=c.size>0?`: ${[...c].join(", ")}`:"";return g.push({type:"text",text:`[${U} tool result image${U===1?"":"s"} omitted from initial history payload${f}, ~${D} bytes]`}),{...n,content:g}}function hq(n,U){switch(n.type){case"message":{let D=U.deferToolResultImages?fq(Bf(n.message)):Bf(n.message);if(!U.deferThinking||D.role!=="assistant")return D;return{...D,content:D.content.map((c)=>c.type==="thinking"&&c.thinking.trim()!==""?{...c,thinking:"",deferred:!0}:c)}}case"compaction":return{role:"custom",customType:"compaction",content:n.summary,display:!0,details:{tokensBefore:n.tokensBefore,firstKeptEntryId:n.firstKeptEntryId},timestamp:bf(n.timestamp)};case"branch_summary":if(!n.summary)return null;return{role:"user",content:`*The conversation briefly explored another branch and returned with this summary:*
|
|
257
|
+
|
|
258
|
+
${n.summary}`,timestamp:bf(n.timestamp)};case"custom_message":return{role:"custom",customType:n.customType,content:n.content,display:n.display,details:n.details,timestamp:bf(n.timestamp)};default:return null}}var Wq=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Af(n){return!!n&&Wq.test(n)}function xq(n){try{return decodeURIComponent(n)}catch{return n}}function qf(n){return n.replace(/\\/g,"/")}function ax(n){return/[A-Za-z0-9._~+%@/\\:-]/.test(n)}function Tq(n,U){if(U>=n.length)return!0;let D=n[U];if(D===":")return/\d/.test(n[U+1]??"");return!ax(D)}function yq(n,U){let D=qf(U),c=D.startsWith("/")?[D,`file://${D}`]:[D],g=new Set([qf(n),qf(xq(n))]);for(let f of g)for(let h of c){let W=f.indexOf(h);while(W!==-1){let T=W===0?"":f[W-1],x=W+h.length;if((W===0||!ax(T))&&Tq(f,x))return!0;W=f.indexOf(h,W+1)}}return!1}function Mf(n,U){if(typeof n==="string"){U.push(n);return}if(!n||typeof n!=="object")return;if(Array.isArray(n)){for(let D of n)Mf(D,U);return}for(let D of Object.values(n))Mf(D,U)}function Hf(n,U){for(let D of U){let c=[];if(Mf(D,c),c.some((g)=>yq(g,n)))return!0}return!1}function ox(n,U){return U.some((D)=>D.type==="message"&&D.message.role==="bashExecution"&&D.message.fullOutputPath===n)}async function rx(n,U){if(!Af(U))return!1;try{let D=await j1(U);if(!D)return!1;return Hf(n,wc(D))}catch{return!1}}async function lx(n,U){if(!Af(U))return!1;try{let D=await j1(U);if(!D)return!1;return ox(n,wc(D))}catch{return!1}}async function Xq(n,{params:U}){let{id:D}=await U,c=null,g=!1;try{let h=new URL(n.url);c=h.searchParams.get("path"),g=h.searchParams.get("download")==="1"}catch{return K.json({error:"invalid url"},{status:400})}if(!c)return K.json({error:"path required"},{status:400});let f=Mx(c,Fq());if(!f)return K.json({error:"invalid path"},{status:400});if(!await lx(f,D))return K.json({error:"forbidden"},{status:403});try{if(g){let{handle:W}=await Yf(f),T=iq.toWeb(W.createReadStream());return new Response(T,{headers:{"Content-Type":"text/plain; charset=utf-8","Content-Disposition":'attachment; filename="bash-output.log"',"Cache-Control":"no-store"}})}let h=await Ax(f);if(h.tooLarge)return K.json({error:`Full output is too large to display (limit ${ug} bytes)`,data:{size:h.size,maxBytes:ug}},{status:413});return K.json({success:!0,data:{output:h.content}})}catch{return K.json({error:"full output unavailable"},{status:404})}}var jf={};U1(jf,{dynamic:()=>_q,GET:()=>Nq});import{randomUUID as un}from"node:crypto";import{existsSync as Bq,realpathSync as Gq,writeFileSync as Kq}from"node:fs";import{resolve as Zq}from"node:path";import{createAgentSessionFromServices as bq,createAgentSessionServices as zq,getAgentDir as gT,initTheme as Oq,SessionManager as jc,Theme as qq}from"@earendil-works/pi-coding-agent";import{TUI_KEYBINDINGS as Mq,KeybindingsManager as Aq}from"@earendil-works/pi-tui";var Cf=92;function tx(n,U=92,D=40){let c=Object.freeze({columns:U,rows:D,kittyProtocolActive:!1});return Object.freeze({terminal:c,requestRender:n})}function Jq(n){return n>=65&&n<=90||n>=97&&n<=122||n>=48&&n<=57||n===43||n===47}function $q(n){if(!n||n.length%4!==0)return null;let U=n.endsWith("==")?2:n.endsWith("=")?1:0,D=n.length-U;for(let c=0;c<D;c+=1)if(!Jq(n.charCodeAt(c)))return null;for(let c=D;c<n.length;c+=1)if(n[c]!=="=")return null;return n.length/4*3-U}function Vq(n){if(!n||typeof n!=="object")return!1;let U=n;if(typeof U.data!=="string"||typeof U.mimeType!=="string"||!U.mimeType.startsWith("image/"))return!1;let D=$q(U.data);return D!==null&&D<=10485760}function ex(n){if(n===void 0)return null;if(!Array.isArray(n))return"images must be an array";if(n.length>10)return"A message can include at most 10 images";for(let U of n){if(!U||typeof U!=="object"||U.type!=="image")return"Each attachment must be an image";if(!Vq(U))return"Each image must be valid base64 image data of 10MB or smaller"}return null}import{resolveModelScopeWithDiagnostics as Qq}from"@earendil-works/pi-coding-agent";function tg(n,U){return n.provider===U.provider&&n.id===U.modelId}async function eg(n,U){let D=(U??[]).map((W)=>W.trim()).filter(Boolean);if(D.length===0)return{visible:await n.getAvailable(),scopedModels:[],thinkingLevelPins:{},warnings:[]};let{scopedModels:c,diagnostics:g}=await Qq(D,n),f=g.map((W)=>W.message);if(c.length===0)return{visible:await n.getAvailable(),scopedModels:[],thinkingLevelPins:{},warnings:f};let h={};for(let W of c)if(W.thinkingLevel)h[`${W.model.provider}/${W.model.id}`]=W.thinkingLevel;return{visible:c.map((W)=>W.model),scopedModels:c,thinkingLevelPins:h,warnings:f}}function sg(n,U={}){let{requestedModel:D,defaultModel:c}=U,g=D?n.visible.find((i)=>tg(i,D)):void 0;if(D&&!g)throw Error(`Model is not available in the enabled scope: ${D.provider}/${D.modelId}`);let f=g?n.scopedModels.find((i)=>i.model===g||tg(i.model,{provider:g.provider,modelId:g.id})):void 0,h=!g&&c?n.scopedModels.find((i)=>tg(i.model,c)):void 0,W=!g?h??n.scopedModels[0]:void 0,T=!g&&!W&&c?n.visible.find((i)=>tg(i,c)):void 0,x=g??W?.model??T,y=f??W,F=U.thinkingLevel??y?.thinkingLevel;return{...x?{model:x}:{},...F?{thinkingLevel:F}:{},scopedModels:[...n.scopedModels]}}function sx(){if(!globalThis.__piModelsCacheState)globalThis.__piModelsCacheState={entries:new Map,inFlight:new Map,generation:0};return globalThis.__piModelsCacheState}function a1(){let n=sx();n.generation+=1,n.entries.clear(),n.inFlight.clear()}function nT(n,U){return U?{...n,modelError:U}:n}function n8(n,U){let D=sx(),c=D.entries.get(n);if(c){if(c.expiresAt>Date.now())return Promise.resolve(c.data);D.entries.delete(n)}let g=D.inFlight.get(n);if(g)return g;let f=D.generation,h=Promise.resolve().then(U).then((W)=>{if(D.generation===f&&D.inFlight.get(n)===h){let T=Date.now();for(let[x,y]of D.entries)if(y.expiresAt<=T)D.entries.delete(x);while(D.entries.size>=32){let x=D.entries.keys().next().value;if(x===void 0)break;D.entries.delete(x)}D.entries.set(n,{data:W,expiresAt:T+60000})}return W}).finally(()=>{if(D.inFlight.get(n)===h)D.inFlight.delete(n)});return D.inFlight.set(n,h),h}import{hasTrustRequiringProjectResources as Yq,ProjectTrustStore as Ef}from"@earendil-works/pi-coding-agent";function Qn(n,U){if(!(Boolean(n)&&Yq(n)))return{requiresTrust:!1,trusted:!0};return{requiresTrust:!0,trusted:new Ef(U).get(n)===!0}}function UT(n,U){let D=Qn(n,U);if(!D.requiresTrust)return D;return new Ef(U).set(n,!0),{requiresTrust:!0,trusted:!0}}function QD(n,U){if(!Qn(n,U).requiresTrust)return;let c=new Ef(U);return{resolveProjectTrust:async()=>c.get(n)===!0}}async function DT(n,U,D){if(!U.model&&!U.thinkingLevel)return{modelDefaultChanged:!1};let c=!1;if(U.model&&D.model&&U.model.provider===D.model.provider&&U.model.modelId===D.model.modelId)n.setDefaultModelAndProvider(D.model.provider,D.model.modelId),c=!0;if(U.thinkingLevel&&(D.supportsThinking||D.thinkingLevel!=="off"))n.setDefaultThinkingLevel(D.thinkingLevel);return await n.flush(),{modelDefaultChanged:c}}var Hq=1000,Lq=new Set(["agent_start","agent_end","agent_settled","auto_compaction_start","auto_compaction_end","compaction_start","compaction_end"]),Cq=new Set(["agent_end","agent_settled","auto_compaction_end","compaction_end"]),Eq=["read","bash","edit","write","grep","find","ls"];class fT extends qq{constructor(){super({thinkingXhigh:""},{selectedBg:""},"truecolor")}fg(...[,n]){return n}bg(...[,n]){return n}bold(n){return n}italic(n){return n}underline(n){return n}inverse(n){return n}strikethrough(n){return n}getFgAnsi(){return""}getBgAnsi(){return""}getThinkingBorderColor(){return(n)=>n}getBashModeBorderColor(){return(n)=>n}}var cT=new fT,wq=new Aq(Mq);function hT(n,U){if(U.length===0)return[];let D=new Set(Eq),c=n.getAllTools().map((g)=>g.name).filter((g)=>!D.has(g));return[...new Set([...U,...c])]}class WT{inner;listeners=[];pendingUiResponses=new Map;pendingUiRequests=new Map;activeCustomUis=new Map;extensionStatuses=new Map;extensionWidgets=new Map;promptRunning=!1;extensionsBound=!1;extensionBindingPromise=null;extensionBindingError=null;forceEmptySystemPrompt=!1;unsubscribe=null;idleTimer=null;onDestroyCallback=null;bufferedEvents=[];_alive=!0;constructor(n){this.inner=n}get sessionId(){return this.inner.sessionId}get sessionFile(){return this.inner.sessionFile??""}get cwd(){return this.inner.sessionManager.getCwd()}isAlive(){return this._alive}isRunning(){return this._alive&&(this.promptRunning||this.inner.isStreaming||this.inner.isCompacting||this.inner.isBashRunning)}start(){this.unsubscribe=this.inner.subscribe((n)=>{if(n.type==="agent_end")Un();if(Cq.has(n.type))this.resetIdleTimer();if(this.emit(n),Lq.has(n.type))z2()}),this.resetIdleTimer(),z2()}setForceEmptySystemPrompt(n){this.forceEmptySystemPrompt=n,this.applyForcedEmptySystemPrompt()}beginExtensionBinding(n={}){this.ensureExtensionsBound(n).catch((U)=>{console.error("[pi-web] failed to dispatch session_start to extensions:",U instanceof Error?U.message:U)})}async waitUntilReady(){await this.waitForExtensionsBound()}ensureExtensionsBound(n={}){if(n.forceEmptySystemPrompt)this.forceEmptySystemPrompt=!0;if(this.extensionsBound)return this.applyForcedEmptySystemPrompt(),Promise.resolve();if(this.extensionBindingPromise)return this.extensionBindingPromise;return this.extensionBindingError=null,this.extensionBindingPromise=(async()=>{if(!this._alive)return;let U=this.createExtensionUiContext();if(typeof this.inner.bindExtensions==="function")await this.inner.bindExtensions.call(this.inner,{uiContext:U,mode:"rpc",commandContextActions:this.createExtensionCommandContextActions(),shutdownHandler:()=>this.emit({type:"extension_ui_request",id:un(),method:"notify",notifyType:"warning",message:"Extension requested shutdown, but shutdown is not supported in Pi Web."}),onError:(c)=>this.emit({type:"extension_error",extensionPath:c.extensionPath,event:c.event,error:c.error})});else this.inner.extensionRunner.setUIContext?.(U,"rpc");this.extensionsBound=!0,this.applyForcedEmptySystemPrompt(),console.log(`[pi-web] session_start dispatched to extensions for session ${this.inner.sessionId}`)})().catch((U)=>{throw this.extensionBindingError=U,U}),this.extensionBindingPromise}async waitForExtensionsBound(){try{if(this.extensionBindingPromise)await this.extensionBindingPromise}catch(n){throw n instanceof Error?n:Error(String(n))}if(this.extensionBindingError)throw this.extensionBindingError instanceof Error?this.extensionBindingError:Error(String(this.extensionBindingError))}shouldWaitForExtensions(n){return n==="prompt"||n==="steer"||n==="follow_up"||n==="get_commands"}async withFinalRunningNotification(n){try{return await n()}finally{this.resetIdleTimer(),z2()}}applyForcedEmptySystemPrompt(){if(this.forceEmptySystemPrompt&&this.inner.agent.state)this.inner.agent.state.systemPrompt=""}emit(n){if(this.listeners.length===0){if(this.bufferedEvents.push(n),this.bufferedEvents.length>Hq)this.bufferedEvents.shift();return}for(let U of this.listeners)U(n)}resetIdleTimer(){if(this.idleTimer)clearTimeout(this.idleTimer);this.idleTimer=setTimeout(()=>{if(this.isRunning()){this.resetIdleTimer();return}this.destroy()},600000)}persistBashOnlySession(){let n=this.inner.sessionManager,U=n.getSessionFile();if(!U||Bq(U))return;let D=n.getHeader();if(!D)return;let c=`${[D,...n.getEntries()].map((g)=>JSON.stringify(g)).join(`
|
|
259
|
+
`)}
|
|
260
|
+
`;Kq(U,c,{encoding:"utf8",flag:"wx"}),n.flushed=!0,r2(this.inner.sessionId,U)}onEvent(n){let U=this.bufferedEvents;this.bufferedEvents=[];for(let D of U)n(D);this.listeners.push(n);for(let D of this.pendingUiRequests.values())n(D);for(let D of this.extensionWidgets.values())n({type:"extension_ui_request",id:un(),method:"setWidget",widgetKey:D.key,widgetLines:D.lines,widgetPlacement:D.placement});for(let[D,c]of this.extensionStatuses)n({type:"extension_ui_request",id:un(),method:"setStatus",statusKey:D,statusText:c});return()=>{let D=this.listeners.indexOf(n);if(D!==-1)this.listeners.splice(D,1)}}onDestroy(n){this.onDestroyCallback=n}async send(n){this.resetIdleTimer();let U=n.type;if(this.shouldWaitForExtensions(U))await this.waitForExtensionsBound();if(U==="prompt"||U==="steer"||U==="follow_up"){let D=ex(n.images);if(D)throw Error(D)}switch(U){case"prompt":{if(this.inner.isBashRunning)throw Error("Cannot send a prompt while a shell command is running");let{images:D,streamingBehavior:c}=n;return this.promptRunning=!0,z2(),this.inner.prompt(n.message,{...D?.length?{images:D}:{},...c?{streamingBehavior:c}:{},source:"rpc"}).then(()=>{if(this.promptRunning=!1,this.resetIdleTimer(),!c)this.emit({type:"prompt_done"});z2()}).catch((g)=>{if(this.promptRunning=!1,this.resetIdleTimer(),Un(),this.emit({type:"prompt_error",errorMessage:g instanceof Error?g.message:String(g)}),!c)this.emit({type:"prompt_done"});z2()}),null}case"abort":return await this.withFinalRunningNotification(()=>this.inner.abort()),null;case"get_state":{let D=this.inner.model,c=this.inner.getContextUsage();return{sessionId:this.inner.sessionId,sessionFile:this.inner.sessionFile??"",isStreaming:this.inner.isStreaming,isPromptRunning:this.promptRunning,isBashRunning:this.inner.isBashRunning,isCompacting:this.inner.isCompacting,autoCompactionEnabled:this.inner.autoCompactionEnabled,autoRetryEnabled:this.inner.autoRetryEnabled,model:D?{id:D.id,provider:D.provider}:void 0,messageCount:0,pendingMessageCount:this.inner.pendingMessageCount,queuedMessages:{steering:[...this.inner.getSteeringMessages()],followUp:[...this.inner.getFollowUpMessages()]},contextUsage:c?{percent:c.percent,contextWindow:c.contextWindow,tokens:c.tokens}:null,systemPrompt:this.inner.agent.state?.systemPrompt??"",thinkingLevel:this.inner.agent.state?.thinkingLevel??"off",extensionStatuses:this.getExtensionStatuses(),extensionWidgets:this.getExtensionWidgets()}}case"set_model":{let{provider:D,modelId:c}=n,g=this.inner.modelRuntime.getModel(D,c);if(!g)await this.inner.modelRuntime.refresh({allowNetwork:!1}),g=this.inner.modelRuntime.getModel(D,c);if(!g)throw Error(`Model not found: ${D}/${c}`);return await this.inner.setModel(g),a1(),Un(),{id:g.id,provider:g.provider}}case"fork":{if(this.inner.isBashRunning)throw Error("Cannot fork while a shell command is running");let D=n.entryId,c=this.inner.sessionManager,g=this.inner.sessionFile;if(!c.isPersisted())return{cancelled:!0};if(!g)throw Error("Persisted session is missing a session file");let f=c.getEntry(D);if(!f)throw Error("Invalid entry ID for forking");let h=c.getSessionDir(),W;if(!f.parentId){let x=jc.create(c.getCwd(),h);x.newSession({parentSession:g}),W=x.getSessionFile()}else{let y=jc.open(g,h).createBranchedSession(f.parentId);if(!y)throw Error("Failed to create forked session");W=y}let T=jc.open(W,h).getSessionId();return r2(T,W),Un(),this.destroy(),{cancelled:!1,newSessionId:T}}case"navigate_tree":{if(this.inner.isBashRunning)throw Error("Cannot navigate while a shell command is running");return{cancelled:(await this.inner.navigateTree(n.targetId,{})).cancelled}}case"set_thinking_level":{let D=n.level;if(this.inner.setThinkingLevel(D),D==="xhigh"&&this.inner.model?.compat?.thinkingFormat==="deepseek"&&this.inner.agent?.state)this.inner.agent.state.thinkingLevel="xhigh";return Un(),null}case"compact":try{return await this.withFinalRunningNotification(()=>this.inner.compact(n.customInstructions))}finally{Un()}case"set_session_name":{let D=n.name?.trim();if(!D)throw Error("Session name cannot be empty");return this.inner.setSessionName(D),Un(),null}case"get_session_stats":return{...this.inner.getSessionStats(),sessionName:this.inner.sessionManager.getSessionName()};case"get_last_assistant_text":return{text:this.inner.getLastAssistantText()??""};case"set_auto_compaction":return this.inner.setAutoCompactionEnabled(n.enabled),null;case"clear_queue":return this.inner.clearQueue();case"steer":{let D=n.images;return await this.inner.steer(n.message,D?.length?D:void 0),null}case"follow_up":{let D=n.images;return await this.inner.followUp(n.message,D?.length?D:void 0),null}case"get_tools":{let D=this.inner.getAllTools(),c=new Set(this.inner.getActiveToolNames());return D.map((g)=>({name:g.name,description:g.description,active:c.has(g.name)}))}case"get_commands":{let D=[];for(let c of this.inner.extensionRunner.getRegisteredCommands())D.push({name:c.invocationName,description:c.description,source:"extension",sourceInfo:c.sourceInfo});for(let c of this.inner.promptTemplates)D.push({name:c.name,description:c.description,source:"prompt",sourceInfo:c.sourceInfo});for(let c of this.inner.resourceLoader.getSkills().skills)D.push({name:`skill:${c.name}`,description:c.description,source:"skill",sourceInfo:c.sourceInfo});return{commands:D}}case"set_tools":{let D=n.toolNames;return this.setForceEmptySystemPrompt(D.length===0),this.inner.setActiveToolsByName(hT(this.inner,D)),this.applyForcedEmptySystemPrompt(),null}case"reload":{if(await this.waitForExtensionsBound(),this.extensionStatuses.clear(),this.extensionWidgets.clear(),this.syncProjectTrust(),await this.inner.reload(),typeof this.inner.bindExtensions!=="function")this.inner.extensionRunner.setUIContext?.(this.createExtensionUiContext(),"rpc");return this.applyForcedEmptySystemPrompt(),a1(),{success:!0}}case"abort_compaction":return this.inner.abortCompaction(),null;case"extension_ui_response":return this.resolveExtensionUiResponse(n),null;case"extension_ui_input":return this.handleExtensionUiInput(n.id,n.data),null;case"set_auto_retry":return this.inner.setAutoRetryEnabled(n.enabled),null;case"bash":{if(this.promptRunning||this.inner.isStreaming||this.inner.isCompacting||this.inner.isBashRunning)throw Error("Cannot run a shell command while the session is busy");let D=this.inner.executeBash(n.command,void 0,{excludeFromContext:n.excludeFromContext});z2();try{let c=await D;return this.persistBashOnlySession(),c}finally{this.resetIdleTimer(),Un(),z2()}}case"abort_bash":return this.inner.abortBash(),null;default:throw Error(`Unsupported command: ${U}`)}}destroy(){if(!this._alive)return;if(this._alive=!1,this.idleTimer)clearTimeout(this.idleTimer);if(this.inner.isBashRunning)this.inner.abortBash();this.unsubscribe?.();for(let n of this.pendingUiResponses.values())n.cancel();for(let n of Array.from(this.activeCustomUis.keys()))this.closeCustomUi(n,void 0);this.pendingUiResponses.clear(),this.pendingUiRequests.clear(),this.onDestroyCallback?.(),z2()}resolveExtensionUiResponse(n){let U=this.pendingUiResponses.get(n.id);if(!U)return;U.resolve(n)}getExtensionStatuses(){return Array.from(this.extensionStatuses,([n,U])=>({key:n,text:U}))}getExtensionWidgets(){return Array.from(this.extensionWidgets.values())}getCustomUiWidth(n){if(!n||typeof n!=="object")return Cf;let U=n.overlayOptions,D=typeof U==="function"?U():U;if(!D||typeof D!=="object")return Cf;let c=D.width;return typeof c==="number"&&Number.isFinite(c)?Math.max(40,Math.min(140,Math.round(c))):92}emitCustomUiRender(n,U){let D;try{D=U.component.render(U.width)}catch(g){D=[`Extension custom UI render failed: ${g instanceof Error?g.message:String(g)}`]}let c={type:"extension_ui_request",id:n,method:"custom",lines:D};this.pendingUiRequests.set(n,c),this.emit(c)}closeCustomUi(n,U){let D=this.activeCustomUis.get(n);if(!D||D.settled)return;D.settled=!0,this.activeCustomUis.delete(n),this.pendingUiRequests.delete(n);try{D.component.dispose?.()}catch{}this.emit({type:"extension_ui_request",id:n,method:"custom",lines:[],closed:!0}),D.resolve(U)}handleExtensionUiInput(n,U){let D=this.activeCustomUis.get(n);if(!D||typeof U!=="string")return;try{if(D.component.handleInput?.(U),this.activeCustomUis.has(n))this.emitCustomUiRender(n,D)}catch(c){this.closeCustomUi(n,void 0),this.emit({type:"extension_error",extensionPath:`custom-ui:${n}`,event:"custom_ui_input",error:c instanceof Error?c.message:String(c)})}}requestExtensionCustomUi(n,U){if(typeof n!=="function")return Promise.resolve(void 0);let D=un(),c=this.getCustomUiWidth(U);return new Promise((g)=>{let f=!1,h=tx(()=>{let x=this.activeCustomUis.get(D);if(x)this.emitCustomUiRender(D,x)},c),W=(x)=>{if(f)return;f=!0,g(x)},T=(x)=>{if(this.activeCustomUis.has(D))this.closeCustomUi(D,x);else W(x)};Promise.resolve().then(()=>n(h,cT,wq,T)).then((x)=>{if(f){try{x?.dispose?.()}catch{}return}if(!x||typeof x!=="object"||typeof x.render!=="function"){W(void 0);return}let y={component:x,width:c,resolve:(F)=>W(F),settled:!1};this.activeCustomUis.set(D,y),this.emitCustomUiRender(D,y)}).catch((x)=>{if(f)return;this.emit({type:"extension_error",extensionPath:`custom-ui:${D}`,event:"custom_ui",error:x instanceof Error?x.message:String(x)}),W(void 0)})})}requestExtensionUi(n,U,D,c,g){if(g?.aborted)return Promise.resolve(U);let f=un(),h={type:"extension_ui_request",id:f,...n,...c?{timeout:c,expiresAt:Date.now()+c}:{}};return new Promise((W)=>{let T,x=()=>{if(T)clearTimeout(T);g?.removeEventListener("abort",F),this.pendingUiRequests.delete(f),this.pendingUiResponses.delete(f)},y=(i)=>{x(),W(i)},F=()=>y(U);if(c)T=setTimeout(()=>y(U),c);g?.addEventListener("abort",F,{once:!0}),this.pendingUiRequests.set(f,h),this.pendingUiResponses.set(f,{resolve:(i)=>y(D(i)),cancel:()=>y(U)}),this.emit(h)})}createExtensionUiContext(){return{select:(n,U,D)=>this.requestExtensionUi({method:"select",title:n,options:U,...D?.timeout?{timeout:D.timeout}:{}},void 0,(c)=>("value"in c)?c.value:void 0,D?.timeout,D?.signal),confirm:(n,U,D)=>this.requestExtensionUi({method:"confirm",title:n,message:U,...D?.timeout?{timeout:D.timeout}:{}},!1,(c)=>("confirmed"in c)?c.confirmed:!1,D?.timeout,D?.signal),input:(n,U,D)=>this.requestExtensionUi({method:"input",title:n,...U!==void 0?{placeholder:U}:{},...D?.timeout?{timeout:D.timeout}:{}},void 0,(c)=>("value"in c)?c.value:void 0,D?.timeout,D?.signal),editor:(n,U,D)=>this.requestExtensionUi({method:"editor",title:n,...U!==void 0?{prefill:U}:{},...D?.timeout?{timeout:D.timeout}:{}},void 0,(c)=>("value"in c)?c.value:void 0,D?.timeout,D?.signal),notify:(n,U)=>{this.emit({type:"extension_ui_request",id:un(),method:"notify",message:n,notifyType:U})},onTerminalInput:()=>()=>{},setStatus:(n,U)=>{if(U===void 0)this.extensionStatuses.delete(n);else this.extensionStatuses.set(n,U);this.emit({type:"extension_ui_request",id:un(),method:"setStatus",statusKey:n,statusText:U})},setWorkingMessage:()=>{},setWorkingVisible:()=>{},setWorkingIndicator:()=>{},setHiddenThinkingLabel:()=>{},setWidget:(n,U,D)=>{if(U!==void 0&&!Array.isArray(U))return;if(U===void 0)this.extensionWidgets.delete(n);else this.extensionWidgets.set(n,{key:n,lines:U,placement:D?.placement??"aboveEditor"});this.emit({type:"extension_ui_request",id:un(),method:"setWidget",widgetKey:n,widgetLines:U,widgetPlacement:D?.placement})},setFooter:()=>{},setHeader:()=>{},setTitle:(n)=>{this.emit({type:"extension_ui_request",id:un(),method:"setTitle",title:n})},custom:(n,U)=>this.requestExtensionCustomUi(n,U),pasteToEditor:(n)=>{this.emit({type:"extension_ui_request",id:un(),method:"set_editor_text",text:n})},setEditorText:(n)=>{this.emit({type:"extension_ui_request",id:un(),method:"set_editor_text",text:n})},getEditorText:()=>"",addAutocompleteProvider:()=>{},setEditorComponent:()=>{},getEditorComponent:()=>{return},get theme(){return cT},getAllThemes:()=>[],getTheme:()=>{return},setTheme:()=>({success:!1,error:"Theme switching is not supported in Pi Web extension UI yet"}),getToolsExpanded:()=>!1,setToolsExpanded:()=>{}}}createExtensionCommandContextActions(){return{waitForIdle:async()=>{await this.inner.agent.waitForIdle?.()},newSession:async()=>({cancelled:!0}),fork:async()=>({cancelled:!0}),navigateTree:async(n,U)=>{return{cancelled:(await this.inner.navigateTree(n,{summarize:U?.summarize})).cancelled}},switchSession:async()=>({cancelled:!0}),reload:async()=>{this.extensionStatuses.clear(),this.extensionWidgets.clear(),this.syncProjectTrust(),await this.inner.reload({beforeSessionStart:()=>{this.inner.extensionRunner.setUIContext?.(this.createExtensionUiContext(),"rpc")}}),this.applyForcedEmptySystemPrompt()}}}syncProjectTrust(){let n=Qn(this.cwd,gT());this.inner.settingsManager.setProjectTrusted(n.trusted)}}function _c(){if(!globalThis.__piSessions){globalThis.__piSessions=new Map;let n=()=>globalThis.__piSessions?.forEach((U)=>U.destroy());process.once("exit",n),process.once("SIGINT",n),process.once("SIGTERM",n)}return globalThis.__piSessions}function jq(){if(!globalThis.__piStartLocks)globalThis.__piStartLocks=new Map;return globalThis.__piStartLocks}function Ic(n){let U=Zq(n);try{return Gq(U)}catch{return U}}function xT(){if(!globalThis.__piStartingSessionCwds)globalThis.__piStartingSessionCwds=new Map;return globalThis.__piStartingSessionCwds}function Iq(n){let U=xT(),D=Ic(n);return U.set(D,(U.get(D)??0)+1),()=>{let c=(U.get(D)??1)-1;if(c>0)U.set(D,c);else U.delete(D)}}function dn(n){return _c().get(n)}function TT(n){let U=Ic(n);if(xT().has(U))return!0;return Array.from(_c().values()).some((D)=>Ic(D.cwd)===U&&D.isRunning())}function yT(n){let U=Ic(n),D=Array.from(_c().values()).filter((c)=>Ic(c.cwd)===U);for(let c of D)c.destroy();return D.length}function qU(){let n=new Set;for(let[U,D]of _c())if(D.isRunning())n.add(D.sessionId||U);return[...n]}function FT(){if(!globalThis.__piRunningListeners)globalThis.__piRunningListeners=new Set;return globalThis.__piRunningListeners}function iT(n){let U=FT();return U.add(n),()=>{U.delete(n)}}var wf="";function z2(){let n=FT();if(n.size===0){wf="";return}let U=qU(),D=JSON.stringify([...U].sort());if(D===wf)return;wf=D;for(let c of n)try{c(U)}catch{}}async function MU(n,U,D,c={}){let{toolNames:g,initialModel:f,thinkingLevel:h}=c,W=_c(),T=jq(),x=W.get(n);if(x?.isAlive())return{session:x,realSessionId:n};let y=T.get(n);if(y)return y;let F;if(U)F=jc.open(U,void 0);else{if(!D)throw Error("cwd is required for a new session");F=jc.create(D,void 0)}let i=F.getCwd(),X=Iq(i),$=(async()=>{Oq();let Q=gT(),Y;if(g!==void 0)Y=g.length===0?[]:void 0;let V=QD(i,Q),G=Rx(n),J=await zq({cwd:i,agentDir:Q,...V?{resourceLoaderReloadOptions:V}:{},...G.length>0?{resourceLoaderOptions:{additionalExtensionPaths:G}}:{}}),B=await eg(J.modelRuntime,J.settingsManager.getEnabledModels()),z=J.settingsManager.getDefaultProvider(),q=J.settingsManager.getDefaultModel(),M=F.getBranch().some((P)=>P.type==="message")?{scopedModels:[...B.scopedModels]}:sg(B,{...f?{requestedModel:f}:{},...z&&q?{defaultModel:{provider:z,modelId:q}}:{},...h?{thinkingLevel:h}:{}}),{session:O}=await bq({services:J,sessionManager:F,...M.model?{model:M.model}:{},...M.thinkingLevel?{thinkingLevel:M.thinkingLevel}:{},...M.scopedModels.length>0?{scopedModels:M.scopedModels}:{},...Y!==void 0?{tools:Y}:{}});if((await DT(J.settingsManager,{...f?{model:f}:{},...h?{thinkingLevel:h}:{}},{...O.model?{model:{provider:O.model.provider,modelId:O.model.id}}:{},thinkingLevel:O.thinkingLevel,supportsThinking:O.supportsThinking()})).modelDefaultChanged)a1();if(g&&g.length>0)O.setActiveToolsByName(hT(O,g));let w=new WT(O);if(g?.length===0)w.setForceEmptySystemPrompt(!0);w.start();let{sessionId:H,sessionFile:v}=O;if(v)r2(H,v);return w.onDestroy(()=>W.delete(H)),W.set(H,w),w.beginExtensionBinding({forceEmptySystemPrompt:g?.length===0}),{session:w,realSessionId:H}})().finally(()=>{T.delete(n),X()});return T.set(n,$),$}var _q="force-dynamic",Sq=new Set(["turn_start","turn_end"]);function vq(n){if(Sq.has(n.type))return null;if(n.type==="message_update"){let U={...n};return delete U.assistantMessageEvent,U}if(n.type==="agent_end")return{type:"agent_end"};return n}async function Nq(n,{params:U}){let{id:D}=await U,c=dn(D);if(!c?.isAlive()){let f=await j1(D);if(!f)return new Response("Session not found",{status:404});try{({session:c}=await MU(D,f,void 0))}catch(h){return console.error(`[api] ${new URL(n.url).pathname} failed:`,h),new Response(`Failed to start agent: ${h}`,{status:500})}}let g=new ReadableStream({start(f){let h=new TextEncoder,W=(F)=>{let i=`data: ${JSON.stringify(F)}
|
|
261
|
+
|
|
262
|
+
`;f.enqueue(h.encode(i))};W({type:"connected",sessionId:D});let T=c.onEvent((F)=>{let i=vq(F);if(i)W(i)}),x=setInterval(()=>{try{f.enqueue(h.encode(`:
|
|
263
|
+
|
|
264
|
+
`))}catch{}},30000),y=()=>{clearInterval(x),T(),f.close()};n.signal?.addEventListener("abort",y)}});return new Response(g,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}var _f={};U1(_f,{POST:()=>rq,GET:()=>tq});import{randomUUID as pq}from"node:crypto";import{existsSync as mq}from"node:fs";import{readdirSync as uq}from"node:fs";import{homedir as VT}from"node:os";import U8 from"node:path";import{realpathSync as XT}from"node:fs";import If from"node:path";var Pq=/^[a-zA-Z]:[\\/]/;function JT(n){return Pq.test(n)||n.startsWith("\\\\")||n.startsWith("//")}function Rq(n,U){for(let D of U){let c=JT(n)||JT(D),g=c?If.win32:If,f=c?"\\":If.sep,h=g.resolve(n),W=g.resolve(D),T=c?h.toLowerCase():h,x=c?W.toLowerCase():W,y=x.endsWith(f)?x:x+f;if(T===x||T.startsWith(y))return!0}return!1}function $T(n,U){let D;try{D=XT(n)}catch{return!1}let c=new Set;for(let g of U)try{c.add(XT(g))}catch{}return Rq(D,c)}var dq=5000,kq=/^[a-zA-Z]:[\\/]/;function Dn(n){return kq.test(n)||n.startsWith("\\\\")||n.startsWith("//")}async function y1(){let n=Date.now(),U=globalThis.__piAllowedRootsCache;if(U&&U.expiresAt>n)return U.roots;let D=await VD(),c=new Set;for(let g of D){if(g.cwd)c.add(u1(g.cwd));if(g.projectRoot)c.add(u1(g.projectRoot))}try{for(let g of uq(VT()))if(/^pi-cwd-\d{8}$/.test(g))c.add(u1(U8.join(VT(),g)))}catch{}for(let g of Gf())c.add(g);return globalThis.__piAllowedRootsCache={roots:c,expiresAt:n+dq},c}function o1(n,U){for(let D of U){let c=Dn(n)||Dn(D),g=c?U8.win32:U8,f=c?"\\":U8.sep,h=g.resolve(n),W=g.resolve(D),T=c?h.toLowerCase():h,x=c?W.toLowerCase():W,y=x.endsWith(f)?x:x+f;if(T===x||T.startsWith(y))return!0}return!1}function i1(n,U){return $T(n,U)}var aq=new Set(["off","minimal","low","medium","high","xhigh","max"]);function oq(n){if(n===void 0)return;if(typeof n==="string"&&aq.has(n))return n;throw Error(`Invalid thinking level: ${String(n)}`)}async function rq(n,{params:U}){let{id:D}=await U;try{let c=await n.json();if(D==="new")return lq(c);let g=dn(D);if(g?.isAlive()){let T=await g.send(c);return K.json({success:!0,data:T})}let f=await j1(D);if(!f)return K.json({error:"Session not found"},{status:404});let{session:h}=await MU(D,f,void 0),W=await h.send(c);return K.json({success:!0,data:W})}catch(c){return console.error(`[api] ${new URL(n.url).pathname} failed:`,c),K.json({error:String(c)},{status:500})}}async function lq(n){let{cwd:U,...D}=n;if(!U||typeof U!=="string")return K.json({error:"cwd is required"},{status:400});if(!mq(U))return K.json({error:`Directory does not exist: ${U}`},{status:400});let{provider:c,modelId:g,toolNames:f,thinkingLevel:h,...W}=D;if(c&&!g||!c&&g)throw Error("provider and modelId must be provided together");let T=oq(h),x=`__new__${pq()}`,{session:y,realSessionId:F}=await MU(x,"",U,{...f?{toolNames:f}:{},...c&&g?{initialModel:{provider:c,modelId:g}}:{},...T?{thinkingLevel:T}:{}});On(U),Un();let i=await y.send({type:"get_state"});if(W.type==="ensure_session")return K.json({success:!0,sessionId:F,data:null,model:i.model?{provider:i.model.provider,modelId:i.model.id}:null,thinkingLevel:i.thinkingLevel});let X=await y.send(W);return K.json({success:!0,sessionId:F,data:X,model:i.model?{provider:i.model.provider,modelId:i.model.id}:null,thinkingLevel:i.thinkingLevel})}async function tq(n,{params:U}){let{id:D}=await U;try{let c=dn(D);if(!c?.isAlive())return K.json({running:!1});let g=await c.send({type:"get_state"});return K.json({running:!0,state:g})}catch(c){return console.error(`[api] ${new URL(n.url).pathname} failed:`,c),K.json({error:String(c)},{status:500})}}var Sf={};U1(Sf,{dynamic:()=>eq,GET:()=>sq});var eq="force-dynamic";async function sq(n){let U=new ReadableStream({start(D){let c=new TextEncoder,g=(T)=>{let x=`data: ${JSON.stringify(T)}
|
|
265
|
+
|
|
266
|
+
`;D.enqueue(c.encode(x))},f=iT((T)=>{try{g({type:"running",runningSessionIds:T})}catch{}});g({type:"running",runningSessionIds:qU()});let h=setInterval(()=>{try{D.enqueue(c.encode(`:
|
|
267
|
+
|
|
268
|
+
`))}catch{}},30000),W=()=>{clearInterval(h),f();try{D.close()}catch{}};n.signal?.addEventListener("abort",W)}});return new Response(U,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}var vf={};U1(vf,{dynamic:()=>nM,GET:()=>UM});var nM="force-dynamic";async function UM(){return K.json({runningSessionIds:qU()},{headers:{"Cache-Control":"no-store"}})}var Nf={};U1(Nf,{dynamic:()=>fM,GET:()=>hM});import{ModelRuntime as gM}from"@earendil-works/pi-coding-agent";var DM=new Set(["models_json_key","models_json_command"]),cM={"openai-codex":"ChatGPT Plus/Pro","github-copilot":"GitHub Copilot"};function QT(n){let U=new Set,D=[];for(let c of n){if(U.has(c.id))continue;U.add(c.id),D.push(c)}return D}function YT(n){let U=[];for(let D of QT(n)){if(!D.hasApiKeyLogin)continue;if(D.status.source&&DM.has(D.status.source))continue;let c=D.status.configured&&D.credentialType!=="oauth";U.push({id:D.id,displayName:D.name,configured:c,...c&&D.status.source?{source:D.status.source}:{},modelCount:D.modelCount,supportsOAuth:D.hasOAuth})}return U}function BT(n){let U=[];for(let D of QT(n)){if(!D.hasOAuth)continue;U.push({id:D.id,name:cM[D.id]??D.oauthName??D.name,usesCallbackServer:!1,loggedIn:D.credentialType==="oauth",supportsApiKey:D.hasApiKeyLogin})}return U}async function D8(n){let U=n.getModels(),D=new Map;try{for(let c of await n.listCredentials())if(c.type==="api_key"||c.type==="oauth")D.set(c.providerId,c.type)}catch{}return n.getProviders().map((c)=>({id:c.id,name:c.name,hasApiKeyLogin:Boolean(c.auth.apiKey?.login),hasOAuth:Boolean(c.auth.oauth),...c.auth.oauth?.name?{oauthName:c.auth.oauth.name}:{},status:n.getProviderAuthStatus(c.id),...D.has(c.id)?{credentialType:D.get(c.id)}:{},modelCount:U.filter((g)=>g.provider===c.id).length}))}var fM="force-dynamic";async function hM(){let n=await gM.create(),U=YT(await D8(n));return Response.json({providers:U})}var U5={};U1(U5,{dynamic:()=>eM,POST:()=>nA,GET:()=>sM,DELETE:()=>UA});import{ModelRuntime as Dy}from"@earendil-works/pi-coding-agent";var tT=VW(pT(),1);import{chmodSync as aT,existsSync as mT,mkdirSync as oM,readFileSync as rM,writeFileSync as oT}from"node:fs";import{dirname as lM,join as rT}from"node:path";import{getAgentDir as lT}from"@earendil-works/pi-coding-agent";var eT={encoding:"utf-8",mode:384};function tM(n){let U=lM(n);if(!mT(U))oM(U,{recursive:!0,mode:448});if(!mT(n))oT(n,"{}",eT),aT(n,384)}function sT(n){return typeof n==="object"&&n!==null&&!Array.isArray(n)}async function ny(n,U){tM(n);let D,c=await tT.default.lock(n,{retries:{retries:10,factor:2,minTimeout:100,maxTimeout:1e4,randomize:!0},stale:30000,onCompromised:(f)=>{D=f}}),g=()=>{if(D)throw D};try{g();let f=JSON.parse(rM(n,"utf-8"));if(!sT(f))throw Error("Invalid auth.json: expected an object");let{result:h,changed:W}=U(f);if(W)g(),oT(n,JSON.stringify(f,null,2),eT),aT(n,384),g();return h}finally{try{await c()}catch{}}}function Uy(n,U,D=rT(lT(),"auth.json")){return ny(D,(c)=>{return c[n]=U,{result:void 0,changed:!0}})}async function J8(n,U,D=rT(lT(),"auth.json")){return ny(D,(c)=>{if(!Object.hasOwn(c,n))return{result:{status:"not_found"},changed:!1};let g=c[n],f=sT(g)&&typeof g.type==="string"?g.type:"unknown";if(f!==U)return{result:{status:"type_mismatch",storedType:f},changed:!1};return delete c[n],{result:{status:"removed"},changed:!0}})}var eM="force-dynamic";async function sM(n,{params:U}){let{provider:D}=await U,c=await Dy.create(),g=c.getProviderAuthStatus(D),f=c.getProvider(D)?.name??D,h=c.getModels(D).length;return K.json({provider:D,displayName:f,configured:g.configured,source:g.source,models:h})}async function nA(n,{params:U}){let{provider:D}=await U;try{let{apiKey:c}=await n.json();if(!c||typeof c!=="string"||!c.trim())return K.json({error:"apiKey is required"},{status:400});let f=(await Dy.create()).getProvider(D)?.auth.apiKey;if(!f?.login)throw Error(`${D} does not support API key login`);let h=!1,W=await f.login({signal:n.signal,notify:()=>{},prompt:async(T)=>{if(T.type==="select"){let x=T.options.find((y)=>y.id==="api-key"||y.id==="bearer-token");if(x)return x.id;throw Error(`${D} requires interactive authentication setup`)}if(!h&&T.type==="secret")return h=!0,c.trim();throw Error(`${D} requires additional authentication settings`)}});return await Uy(D,W),a1(),K.json({success:!0})}catch(c){return K.json({error:String(c)},{status:500})}}async function UA(n,{params:U}){let{provider:D}=await U;try{if((await J8(D,"api_key")).status==="type_mismatch")return K.json({error:`${D} is authenticated with OAuth, not an API key`},{status:409});return a1(),K.json({success:!0})}catch(c){return K.json({error:String(c)},{status:500})}}var D5={};U1(D5,{dynamic:()=>cA,POST:()=>gA,GET:()=>fA});import{ModelRuntime as DA}from"@earendil-works/pi-coding-agent";var cA="force-dynamic";function cy(){if(!globalThis.__piLoginCallbacks)globalThis.__piLoginCallbacks=new Map;return globalThis.__piLoginCallbacks}async function gA(n,{params:U}){let{provider:D}=await U,{token:c,code:g}=await n.json();if(!c||!g)return Response.json({error:"token and code required"},{status:400});let f=cy(),h=f.get(c);if(!h)return Response.json({error:"No pending login for token"},{status:404});if(!c.startsWith(`${D}-`))return Response.json({error:"Token does not match provider"},{status:400});return h.resolve(g),f.delete(c),Response.json({ok:!0,provider:D})}async function fA(n,{params:U}){let{provider:D}=await U,c=new TextEncoder,g=(W,T)=>{W.enqueue(c.encode(`data: ${JSON.stringify(T)}
|
|
269
|
+
|
|
270
|
+
`))},f=new AbortController;n.signal.addEventListener("abort",()=>f.abort());let h=new ReadableStream({async start(W){let T=await DA.create();if(!T.getProvider(D)?.auth.oauth){g(W,{type:"error",message:`Unknown provider: ${D}`}),W.close();return}let x=cy(),y=new Set,F,i=()=>{let Q=`${D}-${Date.now()}-${Math.random().toString(36).slice(2)}`;y.add(Q);let Y=new Promise((V,G)=>{x.set(Q,{resolve:(J)=>{y.delete(Q),x.delete(Q),V(J)},reject:(J)=>{y.delete(Q),x.delete(Q),G(J)}})});return{token:Q,promise:Y}},X=()=>{if(!F)F=i(),F.promise.finally(()=>{F=void 0}).catch(()=>{});return F},$=()=>{for(let Q of y)x.get(Q)?.reject(Error("Login cancelled")),x.delete(Q);y.clear()};f.signal.addEventListener("abort",$);try{await T.login(D,"oauth",{prompt:async(Q)=>{let Y=Q.type==="manual_code"?X():i();if(Q.type==="select")g(W,{type:"select_request",message:Q.message,options:Q.options,token:Y.token});else g(W,{type:"prompt_request",message:Q.message,placeholder:Q.placeholder??null,token:Y.token});return Y.promise},notify:(Q)=>{if(Q.type==="auth_url"){let Y=X();g(W,{type:"auth",url:Q.url,instructions:Q.instructions??null,token:Y.token})}else if(Q.type==="device_code")g(W,{type:"device_code",userCode:Q.userCode,verificationUri:Q.verificationUri,intervalSeconds:Q.intervalSeconds??null,expiresInSeconds:Q.expiresInSeconds??null});else g(W,{type:"progress",message:Q.message})},signal:f.signal}),a1(),g(W,{type:"success"})}catch(Q){let Y=Q instanceof Error?Q.message:String(Q);if(Y!=="Login cancelled")g(W,{type:"error",message:Y});else g(W,{type:"cancelled"})}finally{$(),W.close()}},cancel(){f.abort()}});return new Response(h,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}var c5={};U1(c5,{dynamic:()=>hA,POST:()=>WA});import{ModelRuntime as gy}from"@earendil-works/pi-coding-agent";var hA="force-dynamic";async function WA(n,{params:U}){let{provider:D}=await U;if(!(await gy.create()).getProvider(D)?.auth.oauth)return Response.json({error:`Unknown provider: ${D}`},{status:400});if((await J8(D,"oauth")).status==="type_mismatch")return Response.json({error:`${D} is authenticated with an API key, not OAuth`},{status:409});return a1(),Response.json({ok:!0})}var g5={};U1(g5,{dynamic:()=>TA,GET:()=>yA});import{ModelRuntime as xA}from"@earendil-works/pi-coding-agent";var TA="force-dynamic";async function yA(){let n=await xA.create(),U=BT(await D8(n));return Response.json({providers:U})}var h5={};U1(h5,{GET:()=>$A});import{stat as JA}from"node:fs/promises";import{readdir as FA,realpath as fy,stat as hy}from"node:fs/promises";import{homedir as f5}from"node:os";import EU from"node:path";function Wy(n,U=process.platform){return U==="win32"&&!n}function xy(n){return n||f5()}function iA(){return"ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map((n)=>({name:`${n}:`,path:`${n}:\\`}))}async function Ty(){return(await Promise.all(iA().map(async(U)=>{try{return(await hy(U.path)).isDirectory()?U:null}catch{return null}}))).filter((U)=>U!==null).map((U)=>({...U,path:u1(U.path)}))}function XA(n){let U=u1(n);if(U==="~")return f5();if(U.startsWith("~/"))return EU.resolve(f5(),U.slice(2));return EU.resolve(U)}function yy(n){let U=/^[a-zA-Z]:[\\/]/.test(n)||n.startsWith("\\\\")?EU.win32:n.startsWith("/")?EU.posix:EU,D=U.normalize(n),c=U.dirname(D);return c===D?null:u1(c)}async function Fy(n){let U=await fy(XA(n));return/^[a-zA-Z]:$/.test(U)?`${U}/`:U}async function iy(n){let U=await FA(n,{withFileTypes:!0});return(await Promise.all(U.map(async(c)=>{if(c.isDirectory())return{name:c.name,path:u1(EU.join(n,c.name))};if(!c.isSymbolicLink())return null;try{let g=EU.join(n,c.name),f=await fy(g);if(!(await hy(f)).isDirectory())return null;return{name:c.name,path:u1(g)}}catch{return null}}))).filter((c)=>c!==null).sort((c,g)=>c.name.localeCompare(g.name))}async function $A(n){try{let U=n.nextUrl.searchParams.get("path")?.trim();if(Wy(U))return K.json({path:"",parentPath:null,drives:await Ty(),directories:[]});let D=xy(U),c;try{c=await Fy(D)}catch{return K.json({error:"Directory does not exist"},{status:404})}if(!(await JA(c)).isDirectory())return K.json({error:"Path is not a directory"},{status:400});let f=await iy(c);return K.json({path:c,parentPath:yy(c),directories:f})}catch(U){return K.json({error:String(U)},{status:500})}}var W5={};U1(W5,{POST:()=>BA});import{statSync as VA}from"node:fs";import{homedir as Xy}from"node:os";import{isAbsolute as QA,resolve as Jy}from"node:path";function YA(n){let U=u1(n);if(U==="~")return Xy();if(U.startsWith("~/"))return Jy(Xy(),U.slice(2));return QA(U)?U:Jy(U)}async function BA(n){try{let U=await n.json(),D=typeof U.cwd==="string"?U.cwd.trim():"";if(!D)return K.json({error:"Path is required"},{status:400});let c=YA(D),g;try{g=VA(c)}catch{return K.json({error:`Directory does not exist: ${D}`},{status:400})}if(!g.isDirectory())return K.json({error:`Path is not a directory: ${D}`},{status:400});return On(c),K.json({success:!0,cwd:c})}catch(U){return K.json({error:String(U)},{status:500})}}var x5={};U1(x5,{POST:()=>bA});import{mkdirSync as GA}from"node:fs";import{homedir as KA}from"node:os";import{join as ZA}from"node:path";async function bA(){try{let n=new Date().toISOString().slice(0,10).replace(/-/g,""),U=ZA(KA(),`pi-cwd-${n}`);return GA(U,{recursive:!0}),On(U),K.json({cwd:U})}catch(n){return K.json({error:String(n)},{status:500})}}var T5={};U1(T5,{GET:()=>PA});import{execFile as qA}from"node:child_process";import Gy from"node:fs";import MA from"node:path";import{promisify as AA}from"node:util";function $8(n){let U=0;for(let D=0;D<n.length;D++)if(n[D]==="/")U++;return U}function Vy(n){let U=new Set;for(let c of n){let g=c.indexOf("/");while(g!==-1)U.add(c.slice(0,g)),g=c.indexOf("/",g+1)}let D=[];for(let c of U)D.push({path:c,isDir:!0});for(let c of n){if(!c)continue;D.push({path:c,isDir:!1})}return D.sort((c,g)=>$8(c.path)-$8(g.path)||c.path.localeCompare(g.path)),D}function $y(n,U){if(!n)return!0;let D=0;for(let c=0;c<U.length&&D<n.length;c++)if(U[c]===n[D])D++;return D===n.length}function zA(n,U){let D=n.path.toLowerCase(),c=0;if(U.includes("/")){if(D===U)c=100;else if(D.startsWith(U))c=80;else if(D.includes(U))c=50;else if($y(U,D))c=10}else{let g=D.lastIndexOf("/"),f=g===-1?D:D.slice(g+1);if(f===U)c=100;else if(f.startsWith(U))c=80;else if(f.includes(U))c=50;else if(D.includes(U))c=30;else if($y(U,D))c=10}if(n.isDir&&c>0)c+=10;return c}var OA=20;function Qy(n,U,D=OA){let c=U.toLowerCase();if(!c)return n.slice(0,D);let g=[];for(let f of n){let h=zA(f,c);if(h>0)g.push({entry:f,score:h})}return g.sort((f,h)=>h.score-f.score||$8(f.entry.path)-$8(h.entry.path)||f.entry.path.localeCompare(h.entry.path)),g.slice(0,D).map((f)=>f.entry)}var HA=AA(qA),LA=new Set(["node_modules",".git",".next","dist","build","__pycache__",".turbo",".cache","coverage",".pytest_cache",".mypy_cache","target","vendor",".DS_Store"]),CA=[".pyc"],Yy=5000,By=200000,EA=50000,wA=8,jA=500,IA=1e4,_A=20;function SA(){if(!globalThis.__piFileIndexCache)globalThis.__piFileIndexCache=new Map;return globalThis.__piFileIndexCache}async function vA(n){try{let{stdout:U}=await HA("git",["-C",n,"ls-files","--cached","--others","--exclude-standard","-z"],{timeout:1e4,maxBuffer:67108864,env:{...process.env,LC_ALL:"C"}}),D=U.split("\x00").filter(Boolean);if(D.length>By)return{files:D.slice(0,By),hardTruncated:!0};return{files:D,hardTruncated:!1}}catch{return null}}function NA(n){let U=[],D=[{abs:n,rel:"",depth:0}];while(D.length>0){let{abs:c,rel:g,depth:f}=D.shift(),h;try{h=Gy.readdirSync(c,{withFileTypes:!0})}catch{continue}for(let W of h){if(LA.has(W.name)||CA.some((x)=>W.name.endsWith(x)))continue;let T=g?`${g}/${W.name}`:W.name;if(W.isDirectory()){if(f+1<=wA)D.push({abs:MA.join(c,W.name),rel:T,depth:f+1})}else if(W.isFile()){if(U.length>=EA)return{files:U,hardTruncated:!0};U.push(T)}}}return{files:U,hardTruncated:!1}}async function PA(n){try{let U=n.nextUrl.searchParams.get("cwd")?.trim()??"";if(!U||!U.startsWith("/")&&!Dn(U))return K.json({error:"cwd must be an absolute path"},{status:400});let D=n.nextUrl.searchParams.get("q")?.slice(0,jA)??"",c=await y1();if(!o1(U,c))return K.json({error:"Access denied"},{status:403});let g;try{g=Gy.statSync(U)}catch{return K.json({error:"Directory not found"},{status:404})}if(!g.isDirectory())return K.json({error:"Not a directory"},{status:400});if(!i1(U,c))return K.json({error:"Access denied"},{status:403});let f=SA(),h=Date.now(),W=f.get(U);if(!W||W.expiresAt<=h){let y=await vA(U)??NA(U);for(let[F,i]of f)if(i.expiresAt<=h)f.delete(F);if(f.size>=_A)f.clear();W={listing:y,expiresAt:h+IA},f.set(U,W)}if(D)return W.entries??=Vy(W.listing.files),K.json({matches:Qy(W.entries,D)});let{files:T,hardTruncated:x}=W.listing;return K.json({files:T.slice(0,Yy),truncated:x||T.length>Yy})}catch(U){return K.json({error:String(U)},{status:500})}}var Xh={};U1(Xh,{POST:()=>Co,GET:()=>_o});import rn from"node:fs";import Fg from"node:path";class uc extends Error{constructor(){super("Request body exceeds the allowed size")}}function RA(n){let U=n.headers.get("content-length");if(!U||!/^\d+$/.test(U))return null;let D=Number(U);return Number.isSafeInteger(D)?D:null}async function Ky(n,U){let D=RA(n);if(D!==null&&D>U)throw new uc;let c=n.body?.getReader();if(!c)return n.formData();let g=[],f=0;try{while(!0){let{done:T,value:x}=await c.read();if(T)break;if(f+x.byteLength>U)throw await c.cancel().catch(()=>{}),new uc;f+=x.byteLength;let y=new Uint8Array(x.byteLength);y.set(x),g.push(y)}}finally{c.releaseLock()}let h=n.headers.get("content-type"),W=h?{"content-type":h}:void 0;return new Response(new Blob(g),{headers:W}).formData()}import uA from"node:fs";function Zy(n,U){if(n.isDirectory())return!0;if(n.isFile())return!1;try{return uA.statSync(U).isDirectory()}catch{return null}}var ZD=262144,by=10485760,zy=10485760,dA={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif"},kA={mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",oga:"audio/ogg",opus:"audio/ogg",m4a:"audio/mp4",aac:"audio/aac",flac:"audio/flac",weba:"audio/webm",webm:"audio/webm"},pA={pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};function mA(n){return n.replace(/\\/g,"/").split("/").pop()??""}function bD(n){return mA(n).toLowerCase().split(".").pop()??""}function V8(n){return dA[bD(n)]??null}function Q8(n){return kA[bD(n)]??null}function Y8(n){return pA[bD(n)]??null}function Oy(n){let U=bD(n);if(U==="pdf"||U==="docx")return U;return null}import aA from"node:fs";import qy from"node:path";var oA=["error","overwrite","skip"],rA=new Set(oA);function My(n){let U=n??"error";return rA.has(U)?U:null}function y5(n){if(n.length===0)return"No files selected";let U=new Set;for(let D of n){if(!D||D==="."||D===".."||D.includes("\x00"))return`Invalid file name: ${D||"(empty)"}`;if(D.includes("/")||D.includes("\\")||qy.basename(D)!==D)return`File names must not contain a path: ${D}`;if(U.has(D))return`Duplicate file name in upload: ${D}`;U.add(D)}return null}function F5(n,U){let D=[],c=[];for(let g of U){let f=qy.join(n,g),h;try{h=aA.lstatSync(f)}catch(W){if(W.code==="ENOENT")continue;throw W}if(D.push(g),!h.isFile()||h.isSymbolicLink())c.push(g)}return{conflicts:D,nonReplaceable:c}}var Ko=new Set(["node_modules",".git",".next","dist","build","__pycache__",".turbo",".cache","coverage",".pytest_cache",".mypy_cache","target","vendor",".DS_Store",".git"]),Zo=[".pyc"],bo=["list","read","download","meta","preview","watch"],zo=new Set(bo),Oo=26214400,nZ=104857600,qo=nZ+1048576,Mo={ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",cpp:"cpp",h:"c",hpp:"cpp",cs:"csharp",html:"html",htm:"html",css:"css",scss:"css",less:"css",json:"json",jsonl:"json",yaml:"yaml",yml:"yaml",toml:"toml",xml:"xml",md:"markdown",mdx:"markdown",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",sql:"sql",graphql:"graphql",gql:"graphql",dockerfile:"dockerfile",tf:"hcl",hcl:"hcl",env:"bash",gitignore:"bash",txt:"text",pdf:"pdf",docx:"word"};function eK(n){let U=Fg.basename(n).toLowerCase();if(U==="dockerfile"||U.startsWith("dockerfile."))return"dockerfile";if(U===".env"||U.startsWith(".env."))return"bash";if(U==="makefile"||U==="gnumakefile")return"makefile";let D=U.split(".").pop()??"";return Mo[D]??"text"}function UZ(n){let U=n.join("/"),D=u1(U);if(Dn(D))return D;return`/${U.replace(/^\/+/,"")}`}function Ao(n){return zo.has(n)?n:null}async function Ho(n){let U=UZ(n),D=await y1();if(!o1(U,D))return{response:K.json({error:"Access denied"},{status:403})};let c;try{c=rn.statSync(U)}catch{return{response:K.json({error:"Upload directory not found"},{status:404})}}if(!c.isDirectory())return{response:K.json({error:"Upload target is not a directory"},{status:400})};let g=rn.realpathSync(U),f=new Set;for(let h of D)try{f.add(rn.realpathSync(h))}catch{}if(!o1(g,f))return{response:K.json({error:"Access denied"},{status:403})};return{directory:g}}function Lo(n){if(!Array.isArray(n)||!n.every((U)=>typeof U==="string"))return null;return n}async function Co(n,{params:U}){if(!U2(n))return K.json({error:"Untrusted API request"},{status:403});try{let{path:D}=await U,c=await Ho(D);if("response"in c)return c.response;let{directory:g}=c,f=n.nextUrl.searchParams.get("type")??"upload";if(f==="upload-check"){let V=await n.json().catch(()=>null),G=Lo(V?.fileNames);if(!G)return K.json({error:"fileNames must be an array of strings"},{status:400});let J=y5(G);if(J)return K.json({error:J},{status:400});return K.json(F5(g,G))}if(f!=="upload")return K.json({error:"Invalid upload request type"},{status:400});let h=My(n.nextUrl.searchParams.get("conflict"));if(!h)return K.json({error:"Invalid conflict strategy"},{status:400});let W;try{W=await Ky(n,qo)}catch(V){if(V instanceof uc)return K.json({error:"Uploads must total 100MB or less"},{status:413});throw V}let T=W.getAll("files").filter((V)=>typeof V!=="string");if(T.some((V)=>V.size>Oo))return K.json({error:"Each upload must be 25MB or smaller"},{status:413});if(T.reduce((V,G)=>V+G.size,0)>nZ)return K.json({error:"Uploads must total 100MB or less"},{status:413});let x=T.map((V)=>V.name),y=y5(x);if(y)return K.json({error:y},{status:400});let F=F5(g,x);if(h==="error"&&F.conflicts.length>0)return K.json({error:"One or more files already exist",conflicts:F.conflicts,nonReplaceable:F.nonReplaceable},{status:409});let i=new Set(F.conflicts),X=new Set(F.nonReplaceable),$=[],Q=[],Y=[];for(let V of T){let G=Fg.join(g,V.name);if(i.has(V.name)&&h==="skip"){Q.push(V.name);continue}if(i.has(V.name)&&X.has(V.name)){Y.push({name:V.name,error:"Cannot replace a directory or symbolic link"});continue}let J;try{J=Buffer.from(await V.arrayBuffer())}catch(B){Y.push({name:V.name,error:B instanceof Error?B.message:String(B)});continue}if(i.has(V.name))try{rn.unlinkSync(G)}catch(B){Y.push({name:V.name,error:B instanceof Error?B.message:String(B)});continue}try{rn.writeFileSync(G,J,{flag:"wx"}),$.push(V.name)}catch(B){Y.push({name:V.name,error:B instanceof Error?B.message:String(B)})}}return K.json({uploaded:$,skipped:Q,errors:Y},{status:Y.length>0?207:200})}catch(D){return K.json({error:D instanceof Error?D.message:String(D)},{status:500})}}function sK(n,U){let D=rn.createReadStream(n,U),c=!1;return new ReadableStream({start(g){D.on("data",(f)=>{if(c)return;try{g.enqueue(new Uint8Array(f))}catch{c=!0,D.destroy()}}),D.once("end",()=>{if(c)return;c=!0;try{g.close()}catch{}}),D.once("error",(f)=>{if(c)return;c=!0;try{g.error(f)}catch{}})},cancel(){c=!0,D.destroy()}})}function Eo(n){return encodeURIComponent(n).replace(/[!'()*]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`)}function wo(n,U=!1){let D=U?"attachment":"inline",c=Fg.basename(n),g=c.replace(/[^\x20-\x7E]|["\\;\r\n]/g,"_")||"download";return`${D}; filename="${g}"; filename*=UTF-8''${Eo(c)}`}function b3(n,U,D,c,g=!1){let f={"Content-Type":D,"Cache-Control":"no-cache","Accept-Ranges":"bytes","Content-Disposition":wo(n,g)};if(!c)return new Response(sK(n),{headers:{...f,"Content-Length":String(U.size)}});let h=/^bytes=(\d*)-(\d*)$/.exec(c);if(!h)return new Response(null,{status:416,headers:{...f,"Content-Range":`bytes */${U.size}`}});let W=h[1]?Number(h[1]):0,T=h[2]?Number(h[2]):U.size-1;if(!h[1]&&h[2]){let y=Number(h[2]);W=Math.max(U.size-y,0),T=U.size-1}if(!Number.isFinite(W)||!Number.isFinite(T)||W<0||T<W||W>=U.size)return new Response(null,{status:416,headers:{...f,"Content-Range":`bytes */${U.size}`}});T=Math.min(T,U.size-1);let x=T-W+1;return new Response(sK(n,{start:W,end:T}),{status:206,headers:{...f,"Content-Length":String(x),"Content-Range":`bytes ${W}-${T}/${U.size}`}})}function jo(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Io(n,U){return`<!doctype html>
|
|
271
|
+
<html>
|
|
272
|
+
<head>
|
|
273
|
+
<meta charset="utf-8">
|
|
274
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
275
|
+
<style>
|
|
276
|
+
:root { color-scheme: light; }
|
|
277
|
+
html, body { margin: 0; min-height: 100%; background: #eef1f5; color: #171717; }
|
|
278
|
+
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; padding: 28px; }
|
|
279
|
+
main {
|
|
280
|
+
box-sizing: border-box;
|
|
281
|
+
max-width: 840px;
|
|
282
|
+
min-height: calc(100vh - 56px);
|
|
283
|
+
margin: 0 auto;
|
|
284
|
+
padding: 56px 64px;
|
|
285
|
+
background: #fff;
|
|
286
|
+
box-shadow: 0 8px 28px rgba(15, 23, 42, 0.14);
|
|
287
|
+
}
|
|
288
|
+
.file-title {
|
|
289
|
+
margin: 0 0 28px;
|
|
290
|
+
padding-bottom: 10px;
|
|
291
|
+
border-bottom: 1px solid #e5e7eb;
|
|
292
|
+
color: #6b7280;
|
|
293
|
+
font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
294
|
+
word-break: break-word;
|
|
295
|
+
}
|
|
296
|
+
h1, h2, h3, h4, h5, h6 { line-height: 1.3; margin: 1.1em 0 0.45em; color: #111827; }
|
|
297
|
+
p { margin: 0.65em 0; line-height: 1.7; }
|
|
298
|
+
table { border-collapse: collapse; max-width: 100%; margin: 1em 0; }
|
|
299
|
+
th, td { border: 1px solid #d1d5db; padding: 6px 9px; vertical-align: top; }
|
|
300
|
+
img { max-width: 100%; height: auto; }
|
|
301
|
+
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
302
|
+
a { color: #2563eb; }
|
|
303
|
+
@media (max-width: 720px) {
|
|
304
|
+
body { padding: 0; background: #fff; }
|
|
305
|
+
main { min-height: 100vh; padding: 28px 22px; box-shadow: none; }
|
|
306
|
+
}
|
|
307
|
+
</style>
|
|
308
|
+
</head>
|
|
309
|
+
<body>
|
|
310
|
+
<main>
|
|
311
|
+
<div class="file-title">${jo(U)}</div>
|
|
312
|
+
${n}
|
|
313
|
+
</main>
|
|
314
|
+
</body>
|
|
315
|
+
</html>`}async function _o(n,{params:U}){try{let{path:D}=await U,c=UZ(D),g=n.nextUrl.searchParams.get("type")??"list",f=Ao(g);if(!f)return K.json({error:"Invalid file request type"},{status:400});let h=n.nextUrl.searchParams.get("sessionId"),W=await y1(),T=o1(c,W),x=!T&&f!=="list"&&await rx(c,h);if(!T&&!x)return K.json({error:"Access denied"},{status:403});let y;try{y=rn.statSync(c)}catch{return K.json({error:"Not found"},{status:404})}if(!x&&!i1(c,W))return K.json({error:"Access denied"},{status:403});if(f==="read"){if(!y.isFile())return K.json({error:"Not a file"},{status:400});let X=V8(c);if(X){if(y.size>by)return K.json({error:"Image too large (>10MB)"},{status:413});return b3(c,y,X,n.headers.get("range"))}let $=Q8(c);if($)return b3(c,y,$,n.headers.get("range"));let Q=Y8(c);if(Q)return b3(c,y,Q,n.headers.get("range"));if(y.size>ZD)return K.json({error:"File too large for preview (>256KB)"},{status:413});let Y=rn.readFileSync(c,"utf-8"),V=eK(c);return K.json({content:Y,language:V,size:y.size})}if(f==="download"){if(!y.isFile())return K.json({error:"Not a file"},{status:400});let X=V8(c)||Q8(c)||Y8(c)||"application/octet-stream";return b3(c,y,X,n.headers.get("range"),!0)}if(f==="meta"){if(!y.isFile())return K.json({error:"Not a file"},{status:400});let X=V8(c),$=Q8(c),Q=Y8(c);return K.json({size:y.size,language:eK(c),mime:X||$||Q||"text/plain",previewKind:Oy(c)})}if(f==="preview"){if(!y.isFile())return K.json({error:"Not a file"},{status:400});if(bD(c)!=="docx")return K.json({error:"Preview not available for this file type"},{status:400});if(y.size>zy)return K.json({error:"DOCX too large for preview (>10MB)"},{status:413});let X=await Promise.resolve().then(() => VW(tK(),1)),$=await X.convertToHtml({path:c},{externalFileAccess:!1,convertImage:X.images.dataUri}),Q=Io($.value,Fg.basename(c));return new Response(Q,{headers:{"Content-Type":"text/html; charset=utf-8","Cache-Control":"no-cache","Content-Security-Policy":"default-src 'none'; img-src data:; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'; frame-ancestors 'self'","Referrer-Policy":"no-referrer","X-Content-Type-Options":"nosniff"}})}if(f==="watch"){if(!y.isFile())return K.json({error:"Not a file"},{status:400});let X=null,$=y.mtimeMs,Q=y.size,Y=new ReadableStream({start(V){let G=(J,B)=>{let z=`event: ${J}
|
|
316
|
+
data: ${JSON.stringify(B)}
|
|
317
|
+
|
|
318
|
+
`;try{V.enqueue(new TextEncoder().encode(z))}catch{}};G("connected",{filePath:c});try{X=rn.watch(c,()=>{try{let J=rn.statSync(c);if(J.mtimeMs===$&&J.size===Q)return;$=J.mtimeMs,Q=J.size,G("change",{mtime:J.mtime.toISOString(),size:J.size})}catch{G("change",{mtime:new Date().toISOString(),size:0})}}),X.on("error",()=>{try{V.close()}catch{}})}catch{G("error",{message:"Failed to watch file"}),V.close()}},cancel(){try{X?.close()}catch{}}});return new Response(Y,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}})}if(!y.isDirectory())return K.json({error:"Not a directory"},{status:400});let i=rn.readdirSync(c,{withFileTypes:!0}).filter((X)=>!Ko.has(X.name)&&!Zo.some(($)=>X.name.endsWith($))).flatMap((X)=>{let $=Zy(X,Fg.join(c,X.name));return $===null?[]:[{name:X.name,isDir:$,size:0,modified:""}]}).sort((X,$)=>{if(X.isDir!==$.isDir)return X.isDir?-1:1;return X.name.localeCompare($.name)});return K.json({entries:i,path:c})}catch(D){return K.json({error:String(D)},{status:500})}}var $h={};U1($h,{POST:()=>mo});import{execFile as No}from"node:child_process";import{lstat as hZ,readFile as WZ}from"node:fs/promises";import $n from"node:path";import{promisify as Po}from"node:util";function So(n,U){return n==="R"||n==="C"||U==="R"||U==="C"}function DZ(n){let U=n.split("\x00"),D=[];for(let c=0;c<U.length;c++){let g=U[c];if(!g||g.length<4||g[2]!==" ")continue;let f=g[0],h=g[1],W={path:g.slice(3),indexStatus:f,worktreeStatus:h};if(So(f,h))W.originalPath=U[++c]||void 0;D.push(W)}return D}var vo=new Set(["DD","AU","UD","UA","DU","AA","UU"]);function Jh(n){let U=`${n.indexStatus}${n.worktreeStatus}`;if(U==="??")return{status:"untracked",code:"U"};if(vo.has(U)||U.includes("U"))return{status:"conflict",code:"C"};if(U.includes("D"))return{status:"deleted",code:"D"};if(U.includes("R")||U.includes("C"))return{status:"renamed",code:"R"};if(U.includes("A"))return{status:"added",code:"A"};return{status:"modified",code:"M"}}var xZ=Po(No),Ro=1e4,TZ=8388608;async function BU(n,U,D=TZ){let{stdout:c}=await xZ("git",["-C",n,...U],{timeout:Ro,maxBuffer:D,env:{...process.env,LC_ALL:"C"}});return c}async function Bc(n){try{return(await BU(n,["rev-parse","--show-toplevel"])).trim()||null}catch{return null}}function z3(n,U){let D=$n.relative($n.resolve(n),$n.resolve(U));return D===""||!D.startsWith(`..${$n.sep}`)&&D!==".."&&!$n.isAbsolute(D)}function ig(n){return n.split($n.sep).join("/")}async function yZ(n){let U=await BU(n,["status","--porcelain=v1","-z","--untracked-files=all"]);return DZ(U)}async function cZ(n,U,D){let g=ig($n.relative(n,U))||".";try{let f=await BU(n,["diff","--no-color","--no-ext-diff","--numstat",...D,"--",g]),h=new Map;for(let W of f.split(/\r?\n/)){if(!W)continue;let[T,x,...y]=W.split("\t");if(y.length===0)continue;let F=Number(T),i=Number(x);if(!Number.isInteger(F)||!Number.isInteger(i))continue;let X=y.join("\t"),$=X.indexOf(" => ");if($!==-1)X=X.slice($+4);h.set(ig(X.trim()),{additions:F,deletions:i})}return h}catch{return new Map}}async function uo(n){try{let U=await hZ(n);if(!U.isFile()||U.size>ZD)return 0;let D=await WZ(n);if(VZ(D)||D.length===0)return 0;let c=D.toString("utf8");return c.endsWith(`
|
|
319
|
+
`)?c.split(`
|
|
320
|
+
`).length-1:c.split(`
|
|
321
|
+
`).length}catch{return 0}}async function FZ(n){let U=await Bc(n);if(!U)return{isGitRepository:!1,repositoryRoot:null,files:[],additions:0,deletions:0,stagedFiles:[],stagedAdditions:0,stagedDeletions:0};let[D,c,g]=await Promise.all([yZ(U),cZ(U,n,[]),cZ(U,n,["--cached"])]),f=[],h=[];for(let X of D){let $=$n.resolve(U,X.path);if(!z3(n,$))continue;let Q=Jh(X),Y={filePath:$,...Q,indexStatus:X.indexStatus,worktreeStatus:X.worktreeStatus},V=X.indexStatus!==" "&&X.indexStatus!=="?",G=X.worktreeStatus!==" "&&X.worktreeStatus!=="?";if(V)h.push({...Y,lineStats:g.get(X.path)});if(G)f.push({...Y,lineStats:c.get(X.path)})}let W=await Promise.all(f.map(async(X)=>X.status==="untracked"?{filePath:X.filePath,additions:await uo(X.filePath)}:{filePath:X.filePath,additions:0})),T=new Map(W.map((X)=>[X.filePath,X.additions])),x=[...T.values()].reduce((X,$)=>X+$,0);for(let X of f){if(X.status!=="untracked")continue;let $=T.get(X.filePath)??0;if($>0)X.lineStats={additions:$,deletions:0}}let y=(X)=>{let $=0,Q=0;for(let Y of X.values())$+=Y.additions,Q+=Y.deletions;return{additions:$,deletions:Q}},F=y(c),i=y(g);return{isGitRepository:!0,repositoryRoot:U,files:f,additions:F.additions+x,deletions:F.deletions,stagedFiles:h,stagedAdditions:i.additions,stagedDeletions:i.deletions}}async function iZ(n,U){let D=await Bc(n);if(!D)return{ok:!1,error:"Not a git repository"};let c=$n.resolve(U);if(!z3(D,c))return{ok:!1,error:"File is outside the repository"};let g=ig($n.relative(D,c));try{return await BU(D,["add","--",g]),{ok:!0}}catch(f){return{ok:!1,error:f instanceof Error?f.message:String(f)}}}async function XZ(n,U){let D=await Bc(n);if(!D)return{ok:!1,error:"Not a git repository"};let c=$n.resolve(U);if(!z3(D,c))return{ok:!1,error:"File is outside the repository"};let g=ig($n.relative(D,c));try{return await BU(D,["restore","--staged","--",g]),{ok:!0}}catch(f){return{ok:!1,error:f instanceof Error?f.message:String(f)}}}async function JZ(n,U,D=!1){let c=await Bc(n);if(!c)return{ok:!1,error:"Not a git repository"};let g=U.trim();if(!g)return{ok:!1,error:"Commit message is empty"};try{if(D)await BU(c,["add","-A"]);return await BU(c,["commit","-m",g]),{ok:!0}}catch(f){return{ok:!1,error:f instanceof Error?f.message:String(f)}}}var ko=60000;async function $Z(n){let U=await Bc(n);if(!U)return{ok:!1,error:"Not a git repository"};try{let{stdout:D,stderr:c}=await xZ("git",["-C",U,"push","--tags"],{timeout:ko,maxBuffer:TZ,env:{...process.env,LC_ALL:"C"}});return{ok:!0,output:[D,c].filter(Boolean).join(`
|
|
322
|
+
`).trim()}}catch(D){let c=D;return{ok:!1,error:[c.stdout,c.stderr].filter(Boolean).join(`
|
|
323
|
+
`).trim()||(D instanceof Error?D.message:String(D))}}}function VZ(n){return n.includes(0)}function gZ(n,U){let D=U.endsWith(`
|
|
324
|
+
`),c=U.split(`
|
|
325
|
+
`);if(D)c.pop();let g=c.map((h)=>`+${h}`).join(`
|
|
326
|
+
`),f=!D&&c.length>0?`
|
|
327
|
+
\`:"";return[`diff --git a/${n} b/${n}`,"new file mode 100644","--- /dev/null",`+++ b/${n}`,`@@ -0,0 +1,${c.length} @@`,`${g}${f}`].join(`
|
|
328
|
+
`)}async function fZ(n,U,D){let c=D&&D!==U?[D,U]:[U];try{return await BU(n,["diff","--no-color","--no-ext-diff","--unified=3","HEAD","--",...c],ZD*4)}catch{return null}}async function QZ(n,U){let D=await Bc(n);if(!D||!z3(D,U))return{supported:!1};let c=$n.resolve(U),g=ig($n.relative(D,c)),h=(await yZ(D)).find((i)=>i.path===g);if(!h)return{supported:!1};let{status:W}=Jh(h);if(W==="deleted"){let i=await fZ(D,g,h.originalPath);if(!i?.includes(`
|
|
329
|
+
@@ `))return{supported:!1};return{supported:!0,status:W,patch:i}}let T;try{T=await hZ(c)}catch{return{supported:!1}}if(!T.isFile()||T.size>ZD)return{supported:!1};let x=await WZ(c);if(VZ(x))return{supported:!1};let y=x.toString("utf8"),F;if(W==="untracked")F=gZ(g,y);else{let i=await fZ(D,g,h.originalPath);if(i===null){if(W!=="added")return{supported:!1};F=gZ(g,y)}else F=i}if(!F.includes(`
|
|
330
|
+
@@ `))return{supported:!1};return{supported:!0,status:W,patch:F}}import po from"node:fs";async function O3(n){let U=n?.trim()??"";if(!U||!U.startsWith("/")&&!Dn(U))return{ok:!1,error:"cwd must be an absolute path",status:400};let D=await y1();if(!o1(U,D))return{ok:!1,error:"Access denied",status:403};let c;try{c=po.statSync(U)}catch{return{ok:!1,error:"Directory not found",status:404}}if(!c.isDirectory())return{ok:!1,error:"Not a directory",status:400};if(!i1(U,D))return{ok:!1,error:"Access denied",status:403};return{ok:!0,cwd:U}}async function mo(n){try{let U=await n.json(),D=await O3(U.cwd);if(!D.ok)return K.json({error:D.error},{status:D.status});let c=U.message?.trim()??"";if(!c)return K.json({error:"Commit message is empty"},{status:400});let g=await JZ(D.cwd,c,U.stageAll===!0);if(!g.ok)return K.json({error:g.error},{status:400});return K.json({ok:!0})}catch(U){return K.json({error:U instanceof Error?U.message:String(U)},{status:500})}}var Vh={};U1(Vh,{GET:()=>ao});async function ao(n){try{let U=n.nextUrl.searchParams.get("cwd")?.trim()??"",D=n.nextUrl.searchParams.get("path")?.trim()??"";if(!U||!U.startsWith("/")&&!Dn(U))return K.json({error:"cwd must be an absolute path"},{status:400});if(!D||!D.startsWith("/")&&!Dn(D))return K.json({error:"path must be an absolute path"},{status:400});let c=await y1();if(!o1(U,c)||!o1(D,c))return K.json({error:"Access denied"},{status:403});if(!i1(U,c))return K.json({error:"Access denied"},{status:403});return K.json(await QZ(U,D))}catch(U){return K.json({error:U instanceof Error?U.message:String(U)},{status:500})}}var Qh={};U1(Qh,{POST:()=>oo});async function oo(n){try{let U=await n.json(),D=await O3(U.cwd);if(!D.ok)return K.json({error:D.error},{status:D.status});let c=await $Z(D.cwd);if(!c.ok)return K.json({error:c.error},{status:400});return K.json({ok:!0,output:c.output})}catch(U){return K.json({error:U instanceof Error?U.message:String(U)},{status:500})}}var Yh={};U1(Yh,{POST:()=>lo});import ro from"node:fs";async function lo(n){try{let U=await n.json(),D=U.cwd?.trim()??"",c=U.filePath?.trim()??"",g=U.action==="unstage"?"unstage":"stage";if(!D||!D.startsWith("/")&&!Dn(D))return K.json({error:"cwd must be an absolute path"},{status:400});if(!c||!c.startsWith("/")&&!Dn(c))return K.json({error:"filePath must be an absolute path"},{status:400});let f=await y1();if(!o1(D,f))return K.json({error:"Access denied"},{status:403});let h;try{h=ro.statSync(D)}catch{return K.json({error:"Directory not found"},{status:404})}if(!h.isDirectory())return K.json({error:"Not a directory"},{status:400});if(!i1(D,f))return K.json({error:"Access denied"},{status:403});let W=g==="unstage"?await XZ(D,c):await iZ(D,c);if(!W.ok)return K.json({error:W.error},{status:400});return K.json({ok:!0})}catch(U){return K.json({error:U instanceof Error?U.message:String(U)},{status:500})}}var Bh={};U1(Bh,{GET:()=>eo});import to from"node:fs";async function eo(n){try{let U=n.nextUrl.searchParams.get("cwd")?.trim()??"";if(!U||!U.startsWith("/")&&!Dn(U))return K.json({error:"cwd must be an absolute path"},{status:400});let D=await y1();if(!o1(U,D))return K.json({error:"Access denied"},{status:403});let c;try{c=to.statSync(U)}catch{return K.json({error:"Directory not found"},{status:404})}if(!c.isDirectory())return K.json({error:"Not a directory"},{status:400});if(!i1(U,D))return K.json({error:"Access denied"},{status:403});return K.json(await FZ(U))}catch(U){return K.json({error:U instanceof Error?U.message:String(U)},{status:500})}}var Gh={};U1(Gh,{GET:()=>nr});import{homedir as so}from"node:os";async function nr(){return K.json({home:so()})}var Zh={};U1(Zh,{loadModels:()=>A3,dynamic:()=>fr,GET:()=>Wr});import{stat as Ur}from"node:fs/promises";import{resolve as Dr}from"node:path";import{getSupportedThinkingLevels as cr}from"@earendil-works/pi-ai";import{createAgentSessionServices as gr,getAgentDir as BZ}from"@earendil-works/pi-coding-agent";var q3=null;function YZ(n){if(q3)return;let U=(async()=>{for(let D of n)await Promise.allSettled([D()])})();q3=U,U.then(()=>{q3=null})}function M3(){return q3??Promise.resolve()}var fr="force-dynamic",Kh=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function hr(n,U){return Kh.compare(n.name||n.id,U.name||U.id)||Kh.compare(n.provider,U.provider)||Kh.compare(n.id,U.id)}async function A3(n){let U=new Map,D=[],c=null,g={},f={},h=BZ(),W=QD(n,h),T=await gr({cwd:n,agentDir:h,...W?{resourceLoaderReloadOptions:W}:{}}),x=T.modelRuntime.getError(),y=T.settingsManager,F=await eg(T.modelRuntime,y.getEnabledModels()),{visible:i,thinkingLevelPins:X,warnings:$}=F;D=i.map((G)=>({id:G.id,name:G.name,provider:G.provider})).sort(hr);for(let G of i){let J=`${G.provider}:${G.id}`;if(U.set(J,G.name),g[J]=cr(G),G.thinkingLevelMap)f[J]=G.thinkingLevelMap}let Q=y.getDefaultProvider(),Y=y.getDefaultModel(),V=sg(F,{...Q&&Y?{defaultModel:{provider:Q,modelId:Y}}:{}});if(V.model)c={provider:V.model.provider,modelId:V.model.id};return nT({models:Object.fromEntries(U),modelList:D,defaultModel:c,thinkingLevels:g,thinkingLevelMaps:f,thinkingLevelPins:X,...$.length>0?{modelScopeWarnings:$}:{}},x)}async function Wr(n){await M3();let U=new URL(n.url),D=U.searchParams.has("cwd"),c=D?U.searchParams.get("cwd"):BZ(),g=Dr(c),f;try{f=await Ur(g)}catch{return Response.json({error:`Directory does not exist: ${g}`},{status:400})}if(!f.isDirectory())return Response.json({error:`Not a directory: ${g}`},{status:400});if(D){let h=await y1();if(!i1(g,h))return Response.json({error:"Access denied"},{status:403})}try{return Response.json(await n8(g,()=>A3(g)))}catch(h){return console.error("[api/models] failed to build model list:",h),Response.json({error:h instanceof Error?h.message:String(h)},{status:500})}}var zh={};U1(zh,{dynamic:()=>Gr,GET:()=>qr});var xr={anthropic:["api.anthropic.com"],google:["generativelanguage.googleapis.com"],openai:["api.openai.com"],openrouter:["openrouter.ai"]},Tr=new Set(["text","image"]);function cD(n){return typeof n==="object"&&n!==null&&!Array.isArray(n)}function H3(n){return typeof n==="string"&&n.trim()?n.trim():void 0}function L3(n){return typeof n==="number"&&Number.isFinite(n)&&n>=0?n:void 0}function GZ(n){return typeof n==="number"&&Number.isFinite(n)&&n>0?n:void 0}function yr(n){if(!cD(n))return{};return{input:L3(n.input),output:L3(n.output),cacheRead:L3(n.cache_read),cacheWrite:L3(n.cache_write)}}function Fr(n){if(!cD(n)||!Array.isArray(n.input))return;let U=Array.from(new Set(n.input.filter((D)=>typeof D==="string").map((D)=>D.trim().toLocaleLowerCase()).filter((D)=>Tr.has(D))));return U.length?U:void 0}function C3(n){return n.trim().toLocaleLowerCase().replace(/[^a-z0-9]/g,"")}function KZ(n){return n.trim().toLocaleLowerCase().replace(/^models\//,"")}function ZZ(n){if(!n)return;try{return new URL(n).hostname.toLocaleLowerCase().replace(/\.$/,"")}catch{return}}function ir(n,U){return n===U||n.endsWith(`.${U}`)}function Xr(n,U){let D=C3(U);if(!D)return!1;return C3(n.providerId)===D||C3(n.providerName)===D}function Jr(n,U){let D=ZZ(U);if(!D)return!1;let c=xr[C3(n.providerId)]??[],g=ZZ(n.providerBaseUrl);return[...c,...g?[g]:[]].some((f)=>ir(D,f))}function $r(n,U){let D=KZ(U);if(!D)return!1;let c=KZ(n.id),g=`${n.providerId.toLocaleLowerCase()}/${c}`;return c===D||g===D}function bh(n){return n.cost.input!==void 0&&n.cost.output!==void 0}function Xg(n,U,D){if(n.length===0||U<=0)return;let c=new Map;for(let h of n){let W=D(h),T=c.get(W);if(T)T.count+=1;else c.set(W,{value:h,count:1})}let g=[...c.values()].sort((h,W)=>W.count-h.count),f=g[0];if(!f||f.count/U<0.6)return;if(g[1]?.count===f.count)return;return f.value}function bZ(n){if(n.length===0)return;let U=new Map;for(let c of n)U.set(c,(U.get(c)??0)+1);let D=[...U.entries()].sort((c,g)=>g[1]-c[1]);if(!D[0]||D[1]?.[1]===D[0][1])return;return D[0][0]}function Vr(n){return{name:n.name,reasoning:n.reasoning,input:n.input,contextWindow:n.contextWindow,maxTokens:n.maxTokens}}function Qr(n){let U=n.length;return{name:Xg(n.map((D)=>D.name),U,(D)=>D.toLocaleLowerCase()),reasoning:Xg(n.flatMap((D)=>D.reasoning===void 0?[]:[D.reasoning]),U,String),input:Xg(n.flatMap((D)=>D.input?[D.input]:[]),U,(D)=>[...D].sort().join(",")),contextWindow:Xg(n.flatMap((D)=>D.contextWindow===void 0?[]:[D.contextWindow]),U,String),maxTokens:Xg(n.flatMap((D)=>D.maxTokens===void 0?[]:[D.maxTokens]),U,String)}}function zZ(n,U){return{status:"reliable",method:U,cost:n.cost,providerId:n.providerId,providerName:n.providerName,support:1,total:1}}function Yr(n){let U=n.filter(bh);if(U.length===0)return{status:"unreliable",reason:"no-valid-price",support:0,total:0};if(U.length===1)return{status:"unreliable",reason:"insufficient-support",support:1,total:1};let D=new Map;for(let W of U){let T=JSON.stringify([W.cost.input,W.cost.output]),x=D.get(T);if(x)x.push(W);else D.set(T,[W])}let c=[...D.values()].sort((W,T)=>T.length-W.length),g=c[0];if(!g)return{status:"unreliable",reason:"no-valid-price",support:0,total:U.length};if(c[1]?.length===g.length||g.length/U.length<0.6)return{status:"unreliable",reason:"conflict",support:g.length,total:U.length};let f=bZ(g.flatMap((W)=>W.cost.cacheRead===void 0?[]:[W.cost.cacheRead])),h=bZ(g.flatMap((W)=>W.cost.cacheWrite===void 0?[]:[W.cost.cacheWrite]));return{status:"reliable",method:"consensus",cost:{input:g[0].cost.input,output:g[0].cost.output,cacheRead:f,cacheWrite:h},support:g.length,total:U.length}}function OZ(n){if(!cD(n))return[];let U=[];for(let[D,c]of Object.entries(n)){if(!cD(c)||!cD(c.models))continue;let g=H3(c.name)??D,f=H3(c.api);for(let[h,W]of Object.entries(c.models)){if(!cD(W))continue;let T=H3(W.id)??h;if(!T)continue;let x=H3(W.name)??T,y={key:`${D}/${T}`,providerId:D,providerName:g,id:T,name:x,cost:yr(W.cost)};if(f)y.providerBaseUrl=f;if(typeof W.reasoning==="boolean")y.reasoning=W.reasoning;let F=Fr(W.modalities);if(F)y.input=F;if(cD(W.limit)){let i=GZ(W.limit.context),X=GZ(W.limit.output);if(i!==void 0)y.contextWindow=i;if(X!==void 0)y.maxTokens=X}U.push(y)}}return U}function qZ(n,U,D="",c=""){let g=n.filter((X)=>$r(X,U));if(g.length===0)return{exactMatches:0,metadataMethod:"none",preset:{},price:{status:"unreliable",reason:"no-exact-match",support:0,total:0}};let f=g.filter((X)=>Xr(X,D)),h=g.filter((X)=>Jr(X,c)),W=f[0]??h[0],T=f.length?"provider":h.length?"base-url":"consensus",x=W?Vr(W):Qr(g),y=f.find(bh),F=h.find(bh),i=y?zZ(y,"provider"):F?zZ(F,"base-url"):Yr(g);if(i.status==="reliable")x.cost=i.cost;return{exactMatches:g.length,metadataMethod:T,matchedProviderId:W?.providerId,matchedProviderName:W?.providerName,preset:x,price:i}}function Br(n,U,D){let c=n.id.toLocaleLowerCase(),g=n.name.toLocaleLowerCase(),f=n.providerId.toLocaleLowerCase(),h=n.providerName.toLocaleLowerCase(),W=`${f}/${c}`,T=20;if(!U)T=10;else if(c===U||W===U)T=0;else if(g===U)T=1;else if(c.startsWith(U)||g.startsWith(U))T=2;else if(W.startsWith(U)||f===U||h===U)T=3;else if(c.includes(U)||g.includes(U))T=4;else if(W.includes(U)||h.includes(U))T=5;if(T<20&&D&&(f===D||h===D))T-=0.5;return T}function MZ(n,U,D="",c=50){let g=U.trim().toLocaleLowerCase(),f=D.trim().toLocaleLowerCase(),h=Math.max(1,Math.min(100,Math.floor(c)||50));return n.map((W)=>({entry:W,rank:Br(W,g,f)})).filter(({rank:W})=>!g||W<20).sort((W,T)=>W.rank-T.rank||W.entry.providerName.localeCompare(T.entry.providerName,void 0,{sensitivity:"base"})||W.entry.name.localeCompare(T.entry.name,void 0,{numeric:!0,sensitivity:"base"})||W.entry.id.localeCompare(T.entry.id,void 0,{numeric:!0,sensitivity:"base"})).slice(0,h).map(({entry:W})=>W)}var Gr="force-dynamic",AZ="https://models.dev/api.json",Kr=3600000,Zr=15000;function br(){return globalThis.__piModelsDevCatalogCache??={entries:[],expiresAt:0}}async function zr(){let n=await fetch(AZ,{cache:"no-store",headers:{Accept:"application/json"},signal:AbortSignal.timeout(Zr)});if(!n.ok)throw Error(`models.dev returned HTTP ${n.status}`);let U=OZ(await n.json());if(U.length===0)throw Error("models.dev returned an empty catalog");return U}async function Or(){let n=br();if(n.entries.length>0&&n.expiresAt>Date.now())return n.entries;if(!n.inFlight)n.inFlight=zr().then((U)=>{return n.entries=U,n.expiresAt=Date.now()+Kr,U}).finally(()=>{n.inFlight=void 0});try{return await n.inFlight}catch(U){if(n.entries.length>0)return n.entries;throw U}}async function qr(n){let{searchParams:U}=new URL(n.url),D=(U.get("q")??"").slice(0,120),c=(U.get("provider")??"").slice(0,120),g=(U.get("baseUrl")??"").slice(0,500),f=Number.parseInt(U.get("limit")??"50",10),h=Number.isFinite(f)?f:50;try{let W=await Or(),T=MZ(W,D,c,h),x=qZ(W,D,c,g);return K.json({models:T,recommendation:x,source:AZ})}catch(W){return K.json({error:W instanceof Error?W.message:String(W)},{status:502})}}var Mh={};U1(Mh,{dynamic:()=>dr,GET:()=>kr});import{existsSync as Oh,readFileSync as jr,readdirSync as Ir,renameSync as _r,statSync as Sr,unlinkSync as vr}from"node:fs";import{dirname as HZ,join as E3}from"node:path";import{getAgentDir as Nr}from"@earendil-works/pi-coding-agent";import{randomUUID as Mr}from"node:crypto";import{renameSync as Ar,unlinkSync as Hr,writeFileSync as Lr}from"node:fs";import{basename as Cr,dirname as Er,join as wr}from"node:path";function Jg(n,U){let D=Er(n),c=wr(D,`.${Cr(n)}-${Mr()}.tmp`),g=!1,f=null;try{Lr(c,U,{encoding:"utf8",flag:"wx",mode:384,flush:!0}),Ar(c,n)}catch(h){throw g=!0,h}finally{try{Hr(c)}catch(h){if(h.code!=="ENOENT"&&!g)f=h}}if(f)throw f}var Pr=10,LZ=[{name:"models.json",description:"pi 模型/供应商配置(providers 与模型列表)",onWrite:()=>a1()}],CZ=new Map(LZ.map((n)=>[n.name,n]));function qh(n){return/^[A-Za-z0-9][A-Za-z0-9._-]*\.json$/.test(n)&&CZ.has(n)}function gD(n,U){return E3(U??Nr(),n)}function u2(n,U){if(!U)return;return Oh(E3(U,n))?U:void 0}function EZ(n){return LZ.map((U)=>{let D=gD(U.name,u2(U.name,n)),c=!1,g=0,f=null;try{let h=Sr(D);c=h.isFile(),g=c?h.size:0,f=c?h.mtime.toISOString():null}catch{}return{...U,exists:c,sizeBytes:g,modifiedAt:f}})}function wZ(n,U){let D=gD(n,u2(n,U));if(!Oh(D))return"{}";return jr(D,"utf8")}function jZ(n,U,D){let c;try{c=JSON.parse(U)}catch(h){throw Error(`invalid JSON: ${h instanceof Error?h.message:String(h)}`,{cause:h})}if(typeof c!=="object"||c===null||Array.isArray(c))throw Error("config file root must be a JSON object");let g=`${JSON.stringify(c,null,2)}
|
|
331
|
+
`,f=gD(n,u2(n,D));if(Oh(f)){let h=`${n}.bak-${new Date().toISOString().replace(/[:.]/g,"-")}`;_r(f,E3(HZ(f),h)),Rr(n,u2(n,D))}return Jg(f,g),CZ.get(n)?.onWrite?.(),g}function Rr(n,U){let D=HZ(gD(n,U)),c=`${n}.bak-`,g=[];try{g=Ir(D).filter((h)=>h.startsWith(c)).sort()}catch{return}let f=g.slice(0,Math.max(0,g.length-Pr));for(let h of f)try{vr(E3(D,h))}catch{}}function ur(n){if(!n)return{};let U={};for(let D of n.split(";")){let c=D.indexOf("=");if(c===-1)continue;U[D.slice(0,c).trim()]=D.slice(c+1).trim()}return U}function C1(n){let U=ur(n.headers.get("cookie")).piE2eFixtureDir;if(U)try{return decodeURIComponent(U)}catch{return U}return new URL(n.url).searchParams.get("piE2eFixtureDir")??void 0}var dr="force-dynamic";async function kr(n){return K.json({files:EZ(C1(n))})}var Ah={};U1(Ah,{dynamic:()=>pr,PUT:()=>or,GET:()=>ar});var pr="force-dynamic",mr=2097152;async function ar(n,{params:U}){let{name:D}=await U;if(!qh(D))return K.json({error:`not an editable config file: ${D}`},{status:404});return K.json({name:D,content:wZ(D,C1(n))})}async function or(n,{params:U}){let{name:D}=await U;if(!qh(D))return K.json({error:`not an editable config file: ${D}`},{status:404});let c;try{c=await n.json()}catch{return K.json({error:"invalid body: expected JSON"},{status:400})}if(typeof c.content!=="string")return K.json({error:"invalid body: content must be a string"},{status:400});if(Buffer.byteLength(c.content,"utf8")>mr)return K.json({error:"content too large"},{status:413});try{let g=jZ(D,c.content,C1(n));return K.json({ok:!0,name:D,content:g})}catch(g){let f=g instanceof Error?g.message:String(g);return K.json({error:f},{status:400})}}var Lh={};U1(Lh,{dynamic:()=>cl,POST:()=>Wl});function Hh(n){return typeof n==="object"&&n!==null&&!Array.isArray(n)}function GU(n){return typeof n==="string"&&n.trim()?n.trim():void 0}function rr(n){if(typeof n==="string"){let g=n.trim();return g?{id:g}:null}if(!Hh(n))return null;let U=GU(n.id)??GU(n.model)??GU(n.name);if(!U)return null;let D=U.startsWith("models/")?U.slice(7):U;if(!D)return null;let c=GU(n.display_name)??GU(n.displayName)??(GU(n.id)||GU(n.model)?GU(n.name):void 0);return c&&c!==D?{id:D,name:c}:{id:D}}function lr(n){if(Array.isArray(n))return n;if(!Hh(n))return[];for(let U of["data","models","results","items"]){let D=n[U];if(Array.isArray(D))return D;if(Hh(D))return Object.values(D)}return[]}function IZ(n){let U=new Set,D=[];for(let c of lr(n)){let g=rr(c);if(!g||U.has(g.id))continue;U.add(g.id),D.push(g)}return D.sort((c,g)=>(c.name??c.id).localeCompare(g.name??g.id,void 0,{numeric:!0,sensitivity:"base"}))}function _Z(n,U){let D=new URL(n.trim()),c=D.pathname.replace(/\/+$/,"");if(!/\/models$/i.test(c)){let g=c;if(U==="anthropic-messages"&&!/\/v\d+(?:beta)?$/i.test(g))g+="/v1";if(U==="google-generative-ai"&&!/\/v\d+(?:beta)?$/i.test(g))g+="/v1beta";D.pathname=`${g}/models`.replace(/\/+/g,"/")}if(U==="anthropic-messages"&&!D.searchParams.has("limit"))D.searchParams.set("limit","1000");if(U==="google-generative-ai"&&!D.searchParams.has("pageSize"))D.searchParams.set("pageSize","1000");return D}import{mkdtempSync as tr,rmSync as er,writeFileSync as sr}from"node:fs";import{tmpdir as nl}from"node:os";import{join as SZ}from"node:path";import{ModelRuntime as Ul}from"@earendil-works/pi-coding-agent";function Dl(n){return typeof n==="object"&&n!==null&&!Array.isArray(n)}function vZ(n){if(!Dl(n))return{};return Object.fromEntries(Object.entries(n).filter((U)=>typeof U[1]==="string"))}async function NZ(n,U){let D;try{D=tr(SZ(nl(),"pi-web-model-discovery-"));let c=SZ(D,"models.json"),g="__pi_web_model_discovery__";sr(c,JSON.stringify({providers:{[n]:{...U,models:[{id:g}]}}},null,2),"utf8");let f=await Ul.create({modelsPath:c}),h=f.getError();if(h)throw Error(h);let W=f.getModel(n,g);if(!W)throw Error(`Unable to load provider "${n}"`);let T=await f.getAuth(W);if(T)return{apiKey:T.auth.apiKey,headers:vZ(T.auth.headers)};return{headers:vZ(f.getCompatibilityRequestConfig(W).headers)}}finally{if(D)er(D,{recursive:!0,force:!0})}}var cl="force-dynamic",gl=20000;function fl(n){return typeof n==="object"&&n!==null&&!Array.isArray(n)}function $g(n,U){return n.has(U)}function hl(n,U,D){let c=new Headers(D);if(!$g(c,"accept"))c.set("Accept","application/json");if(!U)return c;if(n==="anthropic-messages"){if(!$g(c,"x-api-key"))c.set("x-api-key",U);if(!$g(c,"anthropic-version"))c.set("anthropic-version","2023-06-01")}else if(n==="google-generative-ai"){if(!$g(c,"x-goog-api-key"))c.set("x-goog-api-key",U)}else if(!$g(c,"authorization"))c.set("Authorization",`Bearer ${U}`);return c}async function Wl(n){try{let U=await n.json(),D=typeof U.providerName==="string"?U.providerName.trim():"";if(!D)return K.json({error:"providerName is required"},{status:400});if(!fl(U.provider))return K.json({error:"provider is required"},{status:400});let c=typeof U.provider.baseUrl==="string"?U.provider.baseUrl.trim():"";if(!c)return K.json({error:"Base URL is required"},{status:400});let g=typeof U.provider.api==="string"&&U.provider.api?U.provider.api:"openai-completions",f;try{f=_Z(c,g)}catch{return K.json({error:"Base URL is invalid"},{status:400})}let h=await NZ(D,U.provider);if(typeof U.provider.apiKey==="string"&&U.provider.apiKey.trim()&&!h.apiKey)return K.json({error:`No API key found for "${D}"`},{status:400});let W=await fetch(f,{cache:"no-store",headers:hl(g,h.apiKey,h.headers),signal:AbortSignal.timeout(gl)}),T=await W.text();if(!W.ok)return K.json({error:T.slice(0,500)||`Upstream returned HTTP ${W.status}`,status:W.status},{status:502});let x;try{x=JSON.parse(T)}catch{return K.json({error:"Upstream model list was not valid JSON"},{status:502})}let y=IZ(x);if(y.length===0)return K.json({error:"No models found in the upstream response"},{status:502});return K.json({models:y,endpoint:f.toString()})}catch(U){let D=U instanceof Error?U.message:String(U),c=U instanceof DOMException&&U.name==="TimeoutError"?504:500;return K.json({error:D},{status:c})}}var Ch={};U1(Ch,{dynamic:()=>xl,PUT:()=>Jl,GET:()=>Xl});import{existsSync as j3,mkdirSync as RZ,readFileSync as uZ}from"node:fs";import{dirname as dZ}from"node:path";var xl="force-dynamic";function kZ(n){return gD("models.json",u2("models.json",n))}function Tl(n){let U=kZ(n);if(!j3(U))return{providers:{}};try{return JSON.parse(uZ(U,"utf8"))}catch{return{providers:{}}}}function yl(n,U){let D=kZ(U),c=dZ(D);if(!j3(c))RZ(c,{recursive:!0});Jg(D,JSON.stringify(n,null,2))}function pZ(n){return gD("settings.json",u2("settings.json",n))}function w3(n){let U=pZ(n);if(!j3(U))return{};try{return JSON.parse(uZ(U,"utf8"))}catch{return{}}}function PZ(n,U){let D=pZ(U),c=dZ(D);if(!j3(c))RZ(c,{recursive:!0});Jg(D,JSON.stringify(n,null,2))}function Fl(n){let U=w3(n),D=U.defaultProvider,c=U.defaultModel;if(typeof D==="string"&&typeof c==="string"&&D&&c)return{provider:D,modelId:c};return null}function il(n){let U=w3(n);return Array.isArray(U.enabledModels)?U.enabledModels.filter((D)=>typeof D==="string"):[]}async function Xl(n){let U=C1(n);return K.json({...Tl(U),defaultModel:Fl(U),enabledModels:il(U)})}async function Jl(n){try{let U=await n.json(),{models:D,defaultModel:c,enabledModels:g}=U;if(yl(D??U,C1(n)),c&&typeof c.provider==="string"&&typeof c.modelId==="string"){let f=w3(C1(n));f.defaultProvider=c.provider,f.defaultModel=c.modelId,PZ(f,C1(n))}if(Array.isArray(g)){let f=w3(C1(n));f.enabledModels=g.filter((h)=>typeof h==="string"),PZ(f,C1(n))}return a1(),K.json({success:!0})}catch(U){return K.json({error:String(U)},{status:500})}}var Eh={};U1(Eh,{dynamic:()=>Kl,POST:()=>zl});import{mkdtempSync as $l,rmSync as Vl,writeFileSync as Ql}from"node:fs";import{tmpdir as Yl}from"node:os";import{join as mZ}from"node:path";import{completeSimple as Bl}from"@earendil-works/pi-ai/compat";import{ModelRuntime as Gl}from"@earendil-works/pi-coding-agent";var Kl="force-dynamic",aZ=20000;function oZ(n){return typeof n==="object"&&n!==null&&!Array.isArray(n)}function Zl(n){return n instanceof Error?n.message:String(n)}function bl(n){return n.content.filter((U)=>U.type==="text").map((U)=>U.text).join("")}async function zl(n){if(!U2(n))return K.json({ok:!1,error:"Untrusted API request"},{status:403});if(!JD(n))return K.json({ok:!1,error:"Content-Type must be application/json"},{status:415});let U;try{let D=await n.json(),c=typeof D.providerName==="string"?D.providerName.trim():"";if(!c)return K.json({ok:!1,error:"providerName is required"},{status:400});if(!oZ(D.provider))return K.json({ok:!1,error:"provider is required"},{status:400});if(!oZ(D.model))return K.json({ok:!1,error:"model is required"},{status:400});let g=typeof D.model.id==="string"?D.model.id.trim():"";if(!g)return K.json({ok:!1,error:"Model ID is required"},{status:400});U=$l(mZ(Yl(),"pi-web-model-test-"));let f=mZ(U,"models.json");Ql(f,JSON.stringify({providers:{[c]:{...D.provider,models:[{...D.model,id:g}]}}},null,2),"utf8");let h=await Gl.create({modelsPath:f}),W=h.getError();if(W)return K.json({ok:!1,error:W});let T=h.getModel(c,g);if(!T)return K.json({ok:!1,error:`Model not found: ${c}/${g}`});let x=await h.getAuth(T);if(!x?.auth.apiKey)return K.json({ok:!1,error:`No API key found for "${c}"`});let y=new AbortController,F=setTimeout(()=>y.abort(),aZ),i,X=Date.now();try{let $=await Bl(T,{messages:[{role:"user",content:"Reply with OK only.",timestamp:Date.now()}]},{apiKey:x.auth.apiKey,headers:x.auth.headers,maxTokens:16,timeoutMs:aZ,maxRetries:0,cacheRetention:"none",signal:y.signal,onResponse:(Y)=>{i=Y.status}}),Q=Date.now()-X;if($.stopReason==="error"||$.stopReason==="aborted")return K.json({ok:!1,error:$.errorMessage??(y.signal.aborted?"Test timed out":"Model returned an error"),latencyMs:Q,status:i});return K.json({ok:!0,latencyMs:Q,status:i,responseText:bl($).slice(0,300)})}finally{clearTimeout(F)}}catch(D){return K.json({ok:!1,error:Zl(D)},{status:500})}finally{if(U)Vl(U,{recursive:!0,force:!0})}}var Ih={};U1(Ih,{readPlugins:()=>Vg,fixtureDirFrom:()=>C1,dynamic:()=>Ll,POST:()=>Pl,GET:()=>Nl});import{existsSync as Ol,readFileSync as ql,statSync as Ml}from"node:fs";import{basename as wh,dirname as jh,extname as Al,join as lZ,relative as Hl}from"node:path";import{DefaultPackageManager as cb,getAgentDir as tZ,SettingsManager as gb}from"@earendil-works/pi-coding-agent";function rZ(n){return/^[!+-].+/.test(n.trim())}var Ll="force-dynamic";function _3(){return{extensions:0,skills:0,prompts:0,themes:0}}function fb(n){return n==="project"?"project":"global"}function S3(n,U){return`${U}\x00${n}`}function v3(n){return typeof n==="string"?n:n.source}function eZ(n){if(typeof n==="string")return!1;return Array.isArray(n.extensions)&&n.extensions.length===0&&Array.isArray(n.skills)&&n.skills.length===0&&Array.isArray(n.prompts)&&n.prompts.length===0&&Array.isArray(n.themes)&&n.themes.length===0}function Cl(n){let U=new Map;for(let D of n.getGlobalSettings().packages??[])U.set(S3(v3(D),"global"),eZ(D));for(let D of n.getProjectSettings().packages??[])U.set(S3(v3(D),"project"),eZ(D));return U}function sZ(n,U,D,c){let g=D==="project"?n.getProjectSettings().packages??[]:n.getGlobalSettings().packages??[],f=!1,h=g.map((W)=>{if(v3(W)!==U)return W;if(f=!0,c)return{...typeof W==="string"?{source:W}:W,extensions:[],skills:[],prompts:[],themes:[]};return v3(W)});if(!f)return!1;if(D==="project")n.setProjectPackages(h);else n.setPackages(h);return!0}function nb(n,U){n[U]+=1}function El(n,U){let D=wh(n),c=Al(D);if(U==="skill"&&D.toLowerCase()==="skill.md")return wh(jh(n));if((U==="extension"||U==="theme"||U==="prompt")&&c){if(U==="extension"&&/^index\.(ts|js)$/.test(D))return wh(jh(n));return D.slice(0,-c.length)}return D}function wl(n){let U=n.metadata.baseDir;if(!U)return n.path;let D=Hl(U,n.path);return D&&!D.startsWith("..")?D:n.path}function jl(n){let U=n.startsWith("npm:")?n.slice(4):void 0;if(U){let D=U.lastIndexOf("@"),c=U.startsWith("@")?U.indexOf("/",1):0;if(D>c)return U.slice(D+1)||void 0;return}if(n.startsWith("git:")||/^[a-z]+:\/\//.test(n)){let D=n.lastIndexOf("@"),c=n.lastIndexOf("/"),g=n.lastIndexOf(":");if(D>Math.max(c,g))return n.slice(D+1)||void 0}return}function Il(n){if(!n)return{};try{let D=Ml(n).isDirectory()?lZ(n,"package.json"):lZ(jh(n),"package.json");if(!Ol(D))return{};let c=JSON.parse(ql(D,"utf8"));return{packageName:typeof c.name==="string"?c.name:void 0,version:typeof c.version==="string"?c.version:void 0}}catch{return{}}}function I3(n,U,D,c,g){if(!n.enabled||n.metadata.origin!=="package")return;let f=n.metadata.source,h=fb(n.metadata.scope),W=S3(f,h),T=D.get(W)??_3();nb(T,U),nb(g,U),D.set(W,T);let x=c.get(W)??[],y=U==="extensions"?"extension":U==="skills"?"skill":U==="prompts"?"prompt":"theme";x.push({kind:y,name:El(n.path,y),path:n.path,relativePath:wl(n)}),c.set(W,x)}function _l(n){let U=new Map,D=new Map,c=_3();for(let g of n.extensions)I3(g,"extensions",U,D,c);for(let g of n.skills)I3(g,"skills",U,D,c);for(let g of n.prompts)I3(g,"prompts",U,D,c);for(let g of n.themes)I3(g,"themes",U,D,c);return{countsByPackage:U,resourcesByPackage:D,totals:c}}function hb(n){return n?u2("settings.json",n)??tZ():tZ()}function Sl(n){let U=(n.getGlobalSettings().extensions??[]).map((c)=>({pattern:c,scope:"global"})),D=(n.getProjectSettings().extensions??[]).map((c)=>({pattern:c,scope:"project"}));return[...U,...D]}function Ub(n,U,D){if(U==="project")n.setProjectExtensionPaths(D);else n.setExtensionPaths(D)}function Db(n,U){return(U==="project"?n.getProjectSettings():n.getGlobalSettings()).extensions??[]}async function Vg(n,U){let D=hb(U),c=Qn(n,D),g=gb.create(n,D,{projectTrusted:c.trusted}),f=new cb({cwd:n,agentDir:D,settingsManager:g}),h=[],W=new Map,T=new Map,x=_3(),y=Cl(g);try{let i=await f.resolve(async(X)=>{return h.push({type:"warning",source:X,message:"Package is configured but not installed yet."}),"skip"});({countsByPackage:W,resourcesByPackage:T,totals:x}=_l(i))}catch(i){h.push({type:"error",message:i instanceof Error?i.message:String(i)})}return{packages:f.listConfiguredPackages().map((i)=>{let X=fb(i.scope),$=S3(i.source,X),Q=y.get($)??!1,Y=W.get($)??_3(),V=T.get($)??[],G=Y.extensions+Y.skills+Y.prompts+Y.themes,J=Il(i.installedPath);if(!i.installedPath)h.push({type:"warning",source:i.source,message:"Configured package path was not found."});return{source:i.source,scope:X,filtered:i.filtered,disabled:Q,installedPath:i.installedPath,packageName:J.packageName,version:J.version,configuredVersion:jl(i.source),counts:Y,resources:V,status:Q?"disabled":G>0?"loaded":i.installedPath?"installed":"missing"}}),extensionFilters:Sl(g),totals:x,diagnostics:h,projectResourcesLoaded:c.trusted}}function vl(n){return n==="project"?"project":"global"}async function Nl(n){let{searchParams:U}=new URL(n.url),D=U.get("cwd");if(!D)return K.json({error:"cwd required"},{status:400});try{let c=await y1();if(!i1(D,c))return K.json({error:"Access denied"},{status:403});let g=await Vg(D,C1(n)),f=g.packages.filter((h)=>h.scope==="project");return K.json({...g,packages:f,extensionFilters:g.extensionFilters.filter((h)=>h.scope==="project"),totals:f.reduce((h,W)=>({extensions:h.extensions+W.counts.extensions,skills:h.skills+W.counts.skills,prompts:h.prompts+W.counts.prompts,themes:h.themes+W.counts.themes}),{extensions:0,skills:0,prompts:0,themes:0})})}catch(c){return K.json({error:String(c)},{status:500})}}async function Pl(n){if(!U2(n))return K.json({error:"Untrusted API request"},{status:403});if(!JD(n))return K.json({error:"Content-Type must be application/json"},{status:415});try{let U=await n.json();if(!U.cwd)return K.json({error:"cwd required"},{status:400});if(!U.action)return K.json({error:"action required"},{status:400});let D=await y1();if(!i1(U.cwd,D))return K.json({error:"Access denied"},{status:403});let c=C1(n),g=hb(c),f=Qn(U.cwd,g),h=gb.create(U.cwd,g,{projectTrusted:f.trusted}),W=vl(U.scope);if(W==="project"&&!f.trusted)return K.json({error:"Project resources must be trusted before modifying project plugins"},{status:403});let T=new cb({cwd:U.cwd,agentDir:g,settingsManager:h}),x=U.source?.trim(),y=W==="project";if(U.action==="install"){if(!x)return K.json({error:"source required"},{status:400});await T.installAndPersist(x,{local:y})}else if(U.action==="remove"){if(!x)return K.json({error:"source required"},{status:400});await T.removeAndPersist(x,{local:y})}else if(U.action==="update")await T.update(x);else if(U.action==="disable"){if(!x)return K.json({error:"source required"},{status:400});sZ(h,x,W,!0),await h.flush()}else if(U.action==="enable"){if(!x)return K.json({error:"source required"},{status:400});sZ(h,x,W,!1),await h.flush()}else if(U.action==="addExtensionFilter"){if(!x)return K.json({error:"pattern required"},{status:400});if(!rZ(x))return K.json({error:`Invalid extension filter "${x}": must start with !, +, or - (plain paths have no effect in the extensions field)`},{status:400});let F=Db(h,W);if(F.includes(x))return K.json({error:`Extension filter already exists: ${x}`},{status:400});Ub(h,W,[...F,x]),await h.flush()}else if(U.action==="removeExtensionFilter"){if(!x)return K.json({error:"pattern required"},{status:400});let F=Db(h,W),i=F.filter((X)=>X!==x);if(i.length===F.length)return K.json({error:`Extension filter not found: ${x}`},{status:400});Ub(h,W,i),await h.flush()}else return K.json({error:`Unsupported action: ${U.action}`},{status:400});return K.json(await Vg(U.cwd,c))}catch(U){return K.json({error:U instanceof Error?U.message:String(U)},{status:500})}}var _h={};U1(_h,{dynamic:()=>ul,GET:()=>dl});import{getAgentDir as Rl}from"@earendil-works/pi-coding-agent";var ul="force-dynamic";async function dl(n){let U=C1(n);try{return K.json(await Vg(U??Rl(),U))}catch(D){return K.json({error:String(D)},{status:500})}}var kh={};U1(kh,{PUT:()=>tl,GET:()=>ll});import{mkdirSync as kl,readFileSync as Ph,writeFileSync as xb}from"node:fs";import{dirname as pl,join as Tb}from"node:path";import{getAgentDir as yb}from"@earendil-works/pi-coding-agent";var Wb=["off","minimal","low","medium","high","xhigh","max"];var N3=new Map;function Fb(n){return Tb(n??yb(),"pi-web-preferences.json")}function Qg(n){let U=n??"",D=N3.get(U);if(D===void 0||D===null)try{let T=Ph(Fb(n),"utf8"),x=JSON.parse(T);D={firstPaint:{locale:$b(x.firstPaint?.locale),fontScale:Kb(x.firstPaint?.fontScale)},preferences:x.preferences??{},theme:P3(n)},N3.set(U,D)}catch{D={firstPaint:{},preferences:{},theme:P3(n)},N3.set(U,D)}let c=Rh(Gc("defaultThinkingLevel",n)),g=uh(n),f=dh(n),h=Sh(Gc("defaultProjectTrust",n)),W=Bb(n);return{...D,theme:P3(n),...c!==void 0?{defaultThinkingLevel:c}:{},...g!==void 0?{compaction:g}:{},...f!==void 0?{retry:f}:{},...h!==void 0?{defaultProjectTrust:h}:{},...W!==void 0?{subagents:W}:{}}}function ib(n,U){try{let D=Fb(U);kl(pl(D),{recursive:!0});let c={firstPaint:n.firstPaint,preferences:n.preferences};xb(D,JSON.stringify(c,null,2),"utf8"),N3.set(U??"",n)}catch{}}function Xb(n,U){let D=Qg(U),c={...D.firstPaint,...n.locale!==void 0?{locale:$b(n.locale)??D.firstPaint.locale}:{},...n.fontScale!==void 0?{fontScale:Kb(n.fontScale)??D.firstPaint.fontScale}:{}},g=D.theme;if(n.theme!==void 0)g=rl(n.theme,U);let f=n.defaultThinkingLevel===void 0?Gc("defaultThinkingLevel",U):Nh("defaultThinkingLevel",Rh(n.defaultThinkingLevel),U),h=n.compaction===void 0?uh(U):ml(n.compaction,U),W=n.retry===void 0?dh(U):al(n.retry,U),T=n.defaultProjectTrust===void 0?Sh(Gc("defaultProjectTrust",U)):(()=>{let F=Sh(n.defaultProjectTrust);if(F===void 0)return;return Nh("defaultProjectTrust",F,U),F})(),x=n.subagents===void 0?Bb(U):ol(n.subagents,U),y={firstPaint:c,preferences:D.preferences,theme:g,defaultThinkingLevel:f,...h!==void 0?{compaction:h}:{},...W!==void 0?{retry:W}:{},...T!==void 0?{defaultProjectTrust:T}:{},...x!==void 0?{subagents:x}:{}};return ib(y,U),y}function Jb(n,U){let D=Qg(U),c={firstPaint:D.firstPaint,preferences:{...D.preferences,...n},theme:D.theme};return ib(c,U),c}function $b(n){return n==="en"||n==="zh-CN"?n:void 0}function Vb(n){return n==="dark"||n==="light"?n:void 0}function Rh(n){return typeof n==="string"&&Wb.includes(n)?n:void 0}function Qb(n){if(typeof n!=="object"||n===null)return;let U=n;if(typeof U.enabled!=="boolean")return;if(typeof U.reserveTokens!=="number"||!Number.isInteger(U.reserveTokens)||U.reserveTokens<=0)return;if(typeof U.keepRecentTokens!=="number"||!Number.isInteger(U.keepRecentTokens)||U.keepRecentTokens<=0)return;return{enabled:U.enabled,reserveTokens:U.reserveTokens,keepRecentTokens:U.keepRecentTokens}}function uh(n){return Qb(Yg("compaction",n))}function ml(n,U){let D=Qb(n);if(!D)return uh(U);return R3("compaction",D,U),D}function Yb(n){if(typeof n!=="object"||n===null)return;let U=n;if(typeof U.maxRetries!=="number"||!Number.isInteger(U.maxRetries)||U.maxRetries<=0)return;if(typeof U.baseDelayMs!=="number"||!Number.isInteger(U.baseDelayMs)||U.baseDelayMs<=0)return;return{maxRetries:U.maxRetries,baseDelayMs:U.baseDelayMs}}function dh(n){return Yb(Yg("retry",n))}function al(n,U){let D=Yb(n);if(!D)return dh(U);return R3("retry",D,U),D}function Sh(n){return n==="ask"||n==="trust"||n==="deny"?n:void 0}function vh(n){if(typeof n!=="object"||n===null)return;let U=n,D={};if(typeof U.defaultModel==="string"&&U.defaultModel.trim()!=="")D.defaultModel=U.defaultModel;let c=Rh(U.defaultThinking);if(c!==void 0)D.defaultThinking=c;return Object.keys(D).length>0?D:void 0}function Bb(n){return vh(Yg("subagents",n))}function ol(n,U){let D=vh(n);if(D===void 0)return;let c=Yg("subagents",U),g=typeof c==="object"&&c!==null?{...c}:{};if(D.defaultModel!==void 0)g.defaultModel=D.defaultModel;else delete g.defaultModel;if(D.defaultThinking!==void 0)g.defaultThinking=D.defaultThinking;else delete g.defaultThinking;return R3("subagents",g,U),vh(g)}function Yg(n,U){try{return JSON.parse(Ph(Gb(U),"utf8"))[n]}catch{return}}function R3(n,U,D){try{let c=Gb(D),g={};try{g=JSON.parse(Ph(c,"utf8"))}catch{g={}}g[n]=U,xb(c,JSON.stringify(g,null,2),"utf8")}catch{}}function Gc(n,U){let D=Yg(n,U);return typeof D==="string"?D:void 0}function Nh(n,U,D){if(U===void 0)return Gc(n,D);return R3(n,U,D),U}function Gb(n){return Tb(n??yb(),"settings.json")}function P3(n){return Vb(Gc("theme",n))??"light"}function rl(n,U){let D=Vb(n);if(!D)return P3(U);return Nh("theme",D,U),D}function Kb(n){return typeof n==="number"&&Number.isFinite(n)&&n>=0.85&&n<=1.3?n:void 0}async function ll(n){return K.json(Qg(C1(n)))}async function tl(n){try{let U=await n.json(),D=C1(n);if(U.firstPaint&&typeof U.firstPaint==="object")Xb(U.firstPaint,D);if(U.preferences&&typeof U.preferences==="object")Jb(U.preferences,D);return K.json(Qg(D))}catch{return K.json({error:"invalid body"},{status:400})}}var ph={};U1(ph,{dynamic:()=>nt,POST:()=>Dt,GET:()=>Ut});import{stat as el}from"node:fs/promises";import{resolve as sl}from"node:path";import{getAgentDir as Zb}from"@earendil-works/pi-coding-agent";var nt="force-dynamic";async function bb(n){if(typeof n!=="string"||!n.trim())return{response:K.json({error:"cwd required"},{status:400})};let U=sl(u1(n));try{if(!(await el(U)).isDirectory())return{response:K.json({error:"cwd must be a directory"},{status:400})}}catch{return{response:K.json({error:"Directory does not exist"},{status:400})}}let D=await y1();if(!i1(U,D))return{response:K.json({error:"Access denied"},{status:403})};return{cwd:U}}async function Ut(n){let U=new URL(n.url),D=U.searchParams.get("piE2eTrustCwd");if(D){for(let g of D.split(","))if(g.trim())On(g.trim())}let c=await bb(U.searchParams.get("cwd"));if("response"in c)return c.response;return K.json(Qn(c.cwd,Zb()))}async function Dt(n){try{let U=await n.json(),D=await bb(U.cwd);if("response"in D)return D.response;let c=Zb();if(!Qn(D.cwd,c).requiresTrust)return K.json({error:"This project has no resources that require trust"},{status:409});if(TT(D.cwd))return K.json({error:"Wait for the active session to finish before trusting this project"},{status:409});let f=UT(D.cwd,c);return a1(),yT(D.cwd),K.json(f)}catch(U){return K.json({error:U instanceof Error?U.message:String(U)},{status:500})}}var ah={};U1(ah,{POST:()=>it});import{Agent as ct}from"@earendil-works/pi-agent-core";var gt=90000,zb=80,mh=`Create a concise title for this session based on the conversation above.
|
|
332
|
+
|
|
333
|
+
Requirements:
|
|
334
|
+
- Match the primary language used by the user.
|
|
335
|
+
- Describe the user's concrete goal or the outcome, not the act of chatting.
|
|
336
|
+
- Use 4-12 words for space-separated languages, or 8-24 characters for CJK text when practical.
|
|
337
|
+
- Do not call any tools.
|
|
338
|
+
- Return only the title as plain text, with no quotes, label, markdown, or explanation.`;function ft(n){return n.map((U)=>({...U,execute:async()=>{throw Error("Tools cannot be executed while generating a session title")}}))}function ht(n){let U=n.state;return{initialState:{systemPrompt:U.systemPrompt,model:U.model,thinkingLevel:U.thinkingLevel,tools:ft(U.tools),messages:U.messages},convertToLlm:n.convertToLlm,transformContext:n.transformContext,streamFn:n.streamFunction,getApiKey:n.getApiKey,onPayload:n.onPayload,onResponse:n.onResponse,steeringMode:n.steeringMode,followUpMode:n.followUpMode,sessionId:n.sessionId,thinkingBudgets:n.thinkingBudgets,transport:n.transport,maxRetryDelayMs:n.maxRetryDelayMs,toolExecution:n.toolExecution}}function Wt(n){let U=n.at(-1);if(U?.role!=="user")return n;let D=typeof U.content==="string"?`${U.content}
|
|
339
|
+
|
|
340
|
+
${mh}`:[...U.content,{type:"text",text:mh}];return[...n.slice(0,-1),{...U,content:D}]}function xt(n){let U=[['"','"'],["'","'"],["`","`"],["“","”"],["「","」"],["『","』"]];for(let[D,c]of U)if(n.startsWith(D)&&n.endsWith(c)&&n.length>D.length+c.length)return n.slice(D.length,-c.length).trim();return n}function Tt(n){let U=n.trim(),D=U.match(/^```(?:json|text)?\s*([\s\S]*?)\s*```$/i);if(D)U=D[1].trim();if(U.startsWith("{"))try{let g=JSON.parse(U);if(typeof g.title==="string")U=g.title.trim()}catch{}if(U=U.split(/\r?\n/,1)[0]??"",U=U.replace(/^(?:session\s+title|title|标题)\s*[::-]\s*/i,""),U=xt(U).replace(/\s+/g," ").trim(),U=U.replace(/[。.!]+$/u,"").trim(),!/[\p{L}\p{N}]/u.test(U))throw Error("The model did not return a usable session title");let c=Array.from(U);if(c.length>zb)U=c.slice(0,zb).join("").trim();return U}function yt(n,U){let D=n.state.messages.slice(U);for(let c=D.length-1;c>=0;c--){let g=D[c];if(g.role!=="assistant")continue;if(g.stopReason==="error")throw Error(g.errorMessage||"The title model request failed");let f=g.content.filter((h)=>h.type==="text").map((h)=>h.text).join(`
|
|
341
|
+
`).trim();if(!f)continue;return{title:Tt(f),...g.usage?{usage:{input:g.usage.input,output:g.usage.output,cacheRead:g.usage.cacheRead,cacheWrite:g.usage.cacheWrite,total:g.usage.totalTokens}}:{}}}throw Error("The model did not return a session title")}function Ft(n){let U=[],D;for(let c=0;c<n.length;c++){let g=n[c];if(g.role==="assistant"){let f=new Set;for(let W=c+1;W<n.length;W++){let T=n[W];if(T.role!=="toolResult")break;f.add(T.toolCallId)}D=new Set;let h=g.content.filter((W)=>{if(W.type!=="toolCall")return!0;if(!f.has(W.id))return!1;return D.add(W.id),!0});if(h.length>0)U.push({...g,content:h});continue}if(g.role==="toolResult"){if(D?.delete(g.toolCallId))U.push(g);continue}D=void 0,U.push(g)}return U}async function Ob(n){let U=n.agent;await U.waitForIdle();let D=Ft(U.state.messages),c=D.length;if(!D.some((x)=>x.role==="user"))throw Error("The session has no user messages to name");let g=ht(U);g.initialState.messages=D;let f=D.at(-1)?.role==="user";if(f)g.initialState.messages=Wt(D);let h=new ct(g),W=f?h.continue():h.prompt(mh),T;try{await Promise.race([W,new Promise((x,y)=>{T=setTimeout(()=>{h.abort(),y(Error("Session title generation timed out"))},gt)})])}catch(x){throw h.abort(),await W.catch(()=>{}),x}finally{if(T)clearTimeout(T)}return yt(h,c)}async function it(n,{params:U}){let{id:D}=await U;try{let c=await j1(D);if(!c)return K.json({error:"Session not found"},{status:404});let g=dn(D),{session:f}=g?.isAlive()?{session:g}:await MU(D,c,void 0);await f.waitUntilReady?.();let h=await Ob(f.inner);if(!f.isAlive())return K.json({error:"The session was closed while its title was being generated. Please try again."},{status:409});return f.inner.setSessionName(h.title),Un(),K.json({title:h.title,usage:h.usage??null})}catch(c){return console.error(`[api] ${new URL(n.url).pathname} failed:`,c),K.json({error:c instanceof Error?c.message:String(c)},{status:500})}}var oh={};U1(oh,{GET:()=>Jt});import{SessionManager as Xt}from"@earendil-works/pi-coding-agent";async function Jt(n,{params:U}){let{id:D}=await U,c=new URL(n.url),g=c.searchParams.get("leafId")??void 0,f=c.searchParams.has("deferThinking"),h=c.searchParams.has("deferMedia");try{let W=await j1(D);if(!W)return K.json({error:"Session not found"},{status:404});let T=Xt.open(W),x=lg(T.getEntries(),g,{deferThinking:f,deferToolResultImages:h});return K.json({context:x})}catch(W){return console.error(`[api] ${new URL(n.url).pathname} failed:`,W),K.json({error:String(W)},{status:500})}}var rh={};U1(rh,{GET:()=>$t});async function $t(n,{params:U}){let{id:D,entryId:c}=await U,g=new URL(n.url).searchParams.get("blockIndex"),f=g===null?Number.NaN:Number(g);if(!Number.isSafeInteger(f)||f<0)return K.json({error:"Valid blockIndex is required"},{status:400});try{let h=await j1(D);if(!h)return K.json({error:"Session not found"},{status:404});let W=wc(h).find((x)=>x.id===c);if(W?.type!=="message"||W.message.role!=="assistant")return K.json({error:"Assistant message not found"},{status:404});let T=W.message.content[f];if(T?.type!=="thinking")return K.json({error:"Thinking block not found"},{status:404});return K.json({thinking:T.thinking})}catch(h){return K.json({error:String(h)},{status:500})}}var lh={};U1(lh,{runtime:()=>Ht,GET:()=>It});import{execFile as Vt}from"node:child_process";import{randomUUID as Qt}from"node:crypto";import{existsSync as Yt,mkdirSync as Bt,readFileSync as Gt,rmSync as Kt}from"node:fs";import{tmpdir as Zt}from"node:os";import{basename as bt,dirname as zt,join as Kc}from"node:path";import{fileURLToPath as Ot,pathToFileURL as qt}from"node:url";import{promisify as Mt}from"node:util";var At=Mt(Vt),Ht="nodejs";async function qb(){try{let{getPackageDir:n}=await import("@earendil-works/pi-coding-agent");return n()}catch{return null}}function Lt(n){return encodeURIComponent(n).replace(/[!'()*]/g,(U)=>`%${U.charCodeAt(0).toString(16).toUpperCase()}`)}function Ct(n,U){let D=n.replace(/[^\x20-\x7E]|["\\;\r\n]/g,"_")||"session.html";return`${U?"inline":"attachment"}; filename="${D}"; filename*=UTF-8''${Lt(n)}`}async function Et(){let n=new Set,U=await qb();if(U)n.add(Kc(U,"dist","cli.js"));try{let D=import.meta.resolve;if(typeof D==="function"){let c=await D("@earendil-works/pi-coding-agent");n.add(Kc(zt(Ot(c)),"cli.js"))}}catch{}n.add(Kc(process.cwd(),"node_modules","@earendil-works","pi-coding-agent","dist","cli.js"));for(let D of n)if(Yt(D))return D;return null}function wt(n){let U=(c)=>c.replace(/\r\n/g,`
|
|
342
|
+
`);n=U(n);let D=(c,g,f,h)=>{let W=U(f),T=U(h),x=c.split(W).length-1;if(x!==1)throw Error(`Failed to patch exported HTML: ${g} expected 1 match, found ${x}`);return c.replace(W,T)};return n=D(n,"sortChildren",` function sortChildren(node) {
|
|
343
|
+
node.children.sort((a, b) =>
|
|
344
|
+
new Date(a.entry.timestamp).getTime() - new Date(b.entry.timestamp).getTime()
|
|
345
|
+
);
|
|
346
|
+
node.children.forEach(sortChildren);
|
|
347
|
+
}`,` function sortChildren(root) {
|
|
348
|
+
const stack = [root];
|
|
349
|
+
while (stack.length) {
|
|
350
|
+
const node = stack.pop();
|
|
351
|
+
node.children.sort((a, b) =>
|
|
352
|
+
new Date(a.entry.timestamp).getTime() - new Date(b.entry.timestamp).getTime()
|
|
353
|
+
);
|
|
354
|
+
for (let i = node.children.length - 1; i >= 0; i--) {
|
|
355
|
+
stack.push(node.children[i]);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}`),n=D(n,"mapNodes",` function mapNodes(node) {
|
|
359
|
+
treeNodeMap.set(node.entry.id, node);
|
|
360
|
+
node.children.forEach(mapNodes);
|
|
361
|
+
}
|
|
362
|
+
tree.forEach(mapNodes);`,` const stack = [...tree].reverse();
|
|
363
|
+
while (stack.length) {
|
|
364
|
+
const node = stack.pop();
|
|
365
|
+
treeNodeMap.set(node.entry.id, node);
|
|
366
|
+
for (let i = node.children.length - 1; i >= 0; i--) {
|
|
367
|
+
stack.push(node.children[i]);
|
|
368
|
+
}
|
|
369
|
+
}`),n=D(n,"markActive",` function markActive(node) {
|
|
370
|
+
let has = activePathIds.has(node.entry.id);
|
|
371
|
+
for (const child of node.children) {
|
|
372
|
+
if (markActive(child)) has = true;
|
|
373
|
+
}
|
|
374
|
+
containsActive.set(node, has);
|
|
375
|
+
return has;
|
|
376
|
+
}`,` function markActive(root) {
|
|
377
|
+
// Post-order traversal using two stacks
|
|
378
|
+
const stack1 = [root];
|
|
379
|
+
const stack2 = [];
|
|
380
|
+
while (stack1.length) {
|
|
381
|
+
const node = stack1.pop();
|
|
382
|
+
stack2.push(node);
|
|
383
|
+
for (const child of node.children) {
|
|
384
|
+
stack1.push(child);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
while (stack2.length) {
|
|
388
|
+
const node = stack2.pop();
|
|
389
|
+
let has = activePathIds.has(node.entry.id);
|
|
390
|
+
for (const child of node.children) {
|
|
391
|
+
if (containsActive.get(child)) has = true;
|
|
392
|
+
}
|
|
393
|
+
containsActive.set(node, has);
|
|
394
|
+
}
|
|
395
|
+
}`),n}async function jt(n,U){let D=await Et();if(D){await At(process.execPath,[D,"--export",n,U],{cwd:process.cwd(),timeout:30000,env:{...process.env,PI_OFFLINE:"1",PI_SKIP_VERSION_CHECK:"1"},maxBuffer:1048576});return}let c=await qb();if(!c)throw Error("pi CLI not found");let g=qt(Kc(c,"dist","core","export-html","index.js")).href,{exportFromFile:f}=await import(g);await f(n,U)}async function It(n,{params:U}){let{id:D}=await U,c=new URL(n.url).searchParams.get("inline")==="1";try{let g=await j1(D);if(!g)return K.json({error:"Session not found"},{status:404});let f=Kc(Zt(),"pi-web-export");Bt(f,{recursive:!0});let W=`pi-session-${bt(g,".jsonl")}.html`,T=Kc(f,`${Qt()}.html`);try{await jt(g,T);let x=Gt(T,"utf8"),y=wt(x);return new Response(y,{headers:{"Content-Type":"text/html; charset=utf-8","Content-Disposition":Ct(W,c),"Cache-Control":"no-cache","Content-Security-Policy":"frame-ancestors 'none'","X-Content-Type-Options":"nosniff","X-Frame-Options":"DENY"}})}finally{Kt(T,{force:!0})}}catch(g){return K.json({error:String(g)},{status:500})}}var th={};U1(th,{PATCH:()=>pt,GET:()=>kt,DELETE:()=>mt});import{readdirSync as _t,readFileSync as St,statSync as vt,unlinkSync as Nt,writeFileSync as Pt}from"node:fs";import{dirname as Rt,join as Mb}from"node:path";import{SessionManager as Ab}from"@earendil-works/pi-coding-agent";var ut=200;function dt(n){let U=new Set,D=new Set(n),c=new Set,g=[...n];while(g.length>0){let x=g.pop();if(c.has(x))continue;if(c.add(x),D.has(x)||x.children.length!==1)U.add(x);for(let y of x.children)g.push(y)}let f=(x,y)=>({...x,children:[],...y?.length?{compressedEntryIds:y}:{}}),h=n.map((x)=>f(x)),W=n.map((x,y)=>({source:x,projected:h[y],depth:1})),T=(x,y)=>{let F=[{node:x,compressedEntryIds:[]}],i=new Set;while(F.length>0){let{node:X,compressedEntryIds:$}=F.pop();if(i.has(X))continue;if(i.add(X),U.has(X))y.children.push(f(X,$));for(let Q=X.children.length-1;Q>=0;Q--)F.push({node:X.children[Q],compressedEntryIds:U.has(X)?[]:[...$,X.entry.id]})}};while(W.length>0){let{source:x,projected:y,depth:F}=W.pop();for(let i of x.children){let X=i;if(F>=ut){T(X,y);continue}let $=[];while(!U.has(X)&&X.children.length===1)$.push(X.entry.id),X=X.children[0];if(!U.has(X))continue;let Q=f(X,$);y.children.push(Q),W.push({source:X,projected:Q,depth:F+1})}}return h}async function kt(n,{params:U}){let{id:D}=await U;try{let c=await j1(D);if(!c)return K.json({error:"Session not found"},{status:404});let g=Ab.open(c),f=g.getEntries(),h=g.getLeafId(),W=dt(g.getTree()),T=new URL(n.url).searchParams,x=T.has("deferThinking"),y=T.has("deferMedia"),F=lg(f,h,{deferThinking:x,deferToolResultImages:y}),i=g.getHeader(),X=i?.timestamp??new Date().toISOString();try{X=vt(c).mtime.toISOString()}catch{}let $=i?.parentSession?await kx(i.parentSession):void 0,Q=i?{path:c,id:i.id,cwd:i.cwd??"",name:g.getSessionName(),created:i.timestamp,modified:X,messageCount:F.messages.length,firstMessage:F.messages.find((Y)=>Y.role==="user")?(()=>{let V=F.messages.find((G)=>G.role==="user").content;return typeof V==="string"?V:(Array.isArray(V)?V.find((G)=>G.type==="text")?.text??"":"")||"(no messages)"})():"(no messages)",parentSessionId:$}:null;return K.json({sessionId:D,filePath:c,info:Q,leafId:h,tree:W,context:F})}catch(c){return K.json({error:String(c)},{status:500})}}async function pt(n,{params:U}){let{id:D}=await U;try{let{name:c}=await n.json();if(typeof c!=="string")return K.json({error:"name is required"},{status:400});let g=await j1(D);if(!g)return K.json({error:"Session not found"},{status:404});return Ab.open(g).appendSessionInfo(c.trim()),Un(),K.json({ok:!0})}catch(c){return K.json({error:String(c)},{status:500})}}async function mt(n,{params:U}){let{id:D}=await U;try{let c=await j1(D);if(!c)return K.json({error:"Session not found"},{status:404});let g=(await mx(c))?.parentSession,f=Cn(c),h=Rt(c);try{let W=_t(h).filter((T)=>T.endsWith(".jsonl")&&Cn(Mb(h,T))!==f);for(let T of W){let x=Mb(h,T);try{let F=St(x,"utf8").split(`
|
|
396
|
+
`),i=JSON.parse(F[0]);if(i.type==="session"&&i.parentSession&&Cn(i.parentSession)===f)i.parentSession=g,F[0]=JSON.stringify(i),Pt(x,F.join(`
|
|
397
|
+
`))}catch{}}}catch{}return dn(D)?.destroy(),Nt(c),px(D),Un(),K.json({ok:!0})}catch(c){return K.json({error:String(c)},{status:500})}}var eh={};U1(eh,{GET:()=>at});async function at(n,{params:U}){let{id:D}=await U;try{if(!await j1(D))return K.json({error:"Session not found"},{status:404});let c=dn(D);if(!c?.isAlive())return K.json({running:!1});let g=await c.send({type:"get_state"});return K.json({running:!0,state:g})}catch(c){return K.json({error:String(c)},{status:500})}}var sh={};U1(sh,{GET:()=>ot});async function ot(n){try{let U=n.headers.get("cache-control")?.includes("no-store"),D=C1(n),c;if(D)ux(),c=await og(D),Px(c.map((g)=>g.id),D);else c=await VD(U?"fresh":void 0);return K.json({sessions:c,runningSessionIds:qU()})}catch(U){return console.error(`[api] ${new URL(n.url).pathname} failed:`,U),K.json({error:String(U)},{status:500})}}var fW={};U1(fW,{dynamic:()=>Ze,POST:()=>be});import{execFile as rt}from"node:child_process";import{mkdtemp as lt,rm as tt}from"node:fs/promises";import{tmpdir as et}from"node:os";import{join as st}from"node:path";import{promisify as ne}from"node:util";var Ue=15000,nW=30000,De=process.env.SKILLS_API_URL||"https://skills.sh",UW=ne(rt);class DW extends Error{status;constructor(n){super(`HTTP ${n}`);this.status=n}}function Hb(n){let U=cW(n.skillPath??""),D=U?`${n.source}/${U}`:n.source,c=n.ref?`#${encodeURIComponent(n.ref)}`:"",g=["skills","add",`${D}${c}`,"--skill",Lb(n.package),"-y","--agent","pi"];if(n.scope==="global")g.push("-g");return g}function ce(n){return n.toLowerCase().replace(/[\s_]+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")}function Lb(n){let U=n.lastIndexOf("@");return U>=0?n.slice(U+1):n}function cW(n){let U=n.replace(/\\/g,"/");if(U.toLowerCase().endsWith("/skill.md"))U=U.slice(0,-9);else if(U.toLowerCase().endsWith("skill.md"))U=U.slice(0,-8);return U.replace(/\/$/,"")}function Zc(n,U,D,c){return{package:n.package,scope:n.scope,state:U,currentVersion:n.versionHash,latestVersion:D,message:c}}async function Cb(n,U,D){let c=await U(n,{cache:"no-store",headers:D,signal:AbortSignal.timeout(Ue)});if(!c.ok)throw new DW(c.status);return c.json()}async function ge(n){let U=`https://github.com/${n.source}.git`,D=n.ref||"HEAD",c=cW(n.skillPath),g=await lt(st(et(),"pi-web-skill-check-"));try{await UW("git",["init","--bare",g],{timeout:nW}),await UW("git",[`--git-dir=${g}`,"fetch","--depth=1","--filter=blob:none","--no-tags",U,D],{timeout:nW});let f=c?`FETCH_HEAD:${c}`:"FETCH_HEAD^{tree}",{stdout:h}=await UW("git",[`--git-dir=${g}`,"rev-parse",f],{timeout:nW}),W=h.trim();if(!/^[0-9a-f]{40}$/i.test(W))throw Error("Invalid Git tree hash");return W}finally{await tt(g,{recursive:!0,force:!0})}}async function fe(n,U){let D=n.ref||"HEAD",c=`https://api.github.com/repos/${n.source}/git/trees/${encodeURIComponent(D)}?recursive=1`,g={Accept:"application/vnd.github.v3+json","User-Agent":"pi-web"};if(U.githubToken)g.Authorization=`Bearer ${U.githubToken}`;let f=cW(n.skillPath),h;try{let W=await Cb(c,U.fetcher,g);if(h=typeof W.sha==="string"&&!f?W.sha:void 0,f&&Array.isArray(W.tree)){let T=W.tree.find((x)=>x.type==="tree"&&x.path===f);if(T&&typeof T.sha==="string")h=T.sha}}catch(W){if(!(W instanceof DW)||![401,403,429].includes(W.status))throw W;h=await U.resolveGitTreeHash(n)}if(!h)return Zc(n,"error",void 0,"Remote skill path was not found.");return Zc(n,h===n.versionHash?"up-to-date":"update-available",h)}async function he(n,U){let[D,c]=n.source.split("/"),g=ce(Lb(n.package)),f=`${U.skillsApiBase}/api/download/${encodeURIComponent(D)}/${encodeURIComponent(c)}/${encodeURIComponent(g)}`,h=await Cb(f,U.fetcher),W=typeof h.hash==="string"?h.hash:void 0;if(!W)return Zc(n,"error",void 0,"skills.sh did not return a version hash.");return Zc(n,W===n.versionHash?"up-to-date":"update-available",W)}async function We(n,U={}){if(!n.canCheckForUpdates||!n.versionHash||!n.skillPath)return Zc(n,"unsupported",void 0,"This lock entry cannot be checked automatically.");let D={...U,fetcher:U.fetcher??fetch,skillsApiBase:U.skillsApiBase??De,resolveGitTreeHash:U.resolveGitTreeHash??ge};try{return n.scope==="global"?await fe(n,D):await he(n,D)}catch(c){return Zc(n,"error",void 0,c instanceof Error?c.message:String(c))}}async function Eb(n,U={}){let D=U.fetcher??fetch,c=new Map,g=async(f,h)=>{let W=c.get(f);if(!W)W=D(f,h),c.set(f,W);return(await W).clone()};return Promise.all(n.map((f)=>We(f,{...U,fetcher:g})))}import{DefaultResourceLoader as Ye,getAgentDir as vb}from"@earendil-works/pi-coding-agent";import{existsSync as xe,readFileSync as Te}from"node:fs";import{homedir as ye}from"node:os";import{isAbsolute as Fe,join as Bg,relative as ie,resolve as wb,sep as Xe}from"node:path";function Je({homeDir:n=ye(),xdgStateHome:U=process.env.XDG_STATE_HOME}={}){return U?Bg(U,"skills",".skill-lock.json"):Bg(n,".agents",".skill-lock.json")}function jb(n){try{let U=JSON.parse(Te(n,"utf8"));return U.skills&&typeof U.skills==="object"?U.skills:{}}catch{return{}}}function Ib(n,U){let D=ie(wb(U),wb(n));return D!==""&&D!==".."&&!D.startsWith(`..${Xe}`)&&!Fe(D)}function $e(n,U){if(n[U])return n[U];let D=U.toLowerCase(),c=Object.keys(n).find((g)=>g.toLowerCase()===D);return c?n[c]:void 0}function Ve(n,U){if(U!=="github")return n.replace(/\/$/,"");return n.replace(/^git\+/,"").replace(/^https?:\/\/github\.com\//,"").replace(/^git@github\.com:/,"").replace(/\.git$/,"").replace(/\/$/,"")}function Qe(n,U){if(!n||n.includes("://")||n.startsWith("git@"))return;let D=n.split("/").filter(Boolean).map(encodeURIComponent).join("/");if(!D)return;return`https://skills.sh/${D}/${encodeURIComponent(U)}`}function _b(n,U,D){let c=$e(n,U);if(!c||typeof c.source!=="string"||!c.source.trim())return;let g=typeof c.sourceType==="string"?c.sourceType:void 0,f=Ve(c.source.trim(),g);if(!f)return;let h=typeof c.skillPath==="string"?c.skillPath:void 0,W=typeof c.ref==="string"?c.ref:void 0,T=D==="global"?c.skillFolderHash:c.computedHash,x=typeof T==="string"&&T?T:void 0,y=g==="github"&&/^[\w.-]+\/[\w.-]+$/.test(f),F=D==="global"||!W;return{package:`${f}@${U}`,scope:D,source:f,sourceType:g,skillsShUrl:g==="local"?void 0:Qe(f,U),...h&&{skillPath:h},...W&&{ref:W},...x&&{versionHash:x},canCheckForUpdates:Boolean(y&&h&&x&&F)}}function Sb(n,{cwd:U,agentDir:D,globalLockPath:c=Je(),projectLockPath:g=Bg(U,"skills-lock.json")}){let f=jb(c),h=jb(g),W=Bg(D,"skills"),T=Bg(U,".pi","skills");return n.map((x)=>{if(!xe(x.filePath))return x;let y=Ib(x.filePath,W)?_b(f,x.name,"global"):Ib(x.filePath,T)?_b(h,x.name,"project"):void 0;return y?{...x,install:y}:x})}var Be=32,fD=new Map,gW=new Map;async function ln(n,U){let D=U?.forceFresh??!1,c=n===""?vb():n;if(!D){let h=fD.get(n);if(h)return{skills:[...h.skills.values()],diagnostics:h.diagnostics,projectResourcesLoaded:h.projectResourcesLoaded}}let g=gW.get(n);if(g)return g;let f=Ge(c,n);gW.set(n,f);try{return await f}finally{gW.delete(n)}}async function Ge(n,U){let D=vb(),c=new Ye({cwd:n,agentDir:D});await c.reload(QD(n,D));let{skills:g,diagnostics:f}=c.getSkills(),h={skills:Sb(g,{cwd:n,agentDir:D}),diagnostics:f,projectResourcesLoaded:Qn(n,D).trusted},W=new Map;for(let T of h.skills)W.set(T.filePath,T);return fD.set(U,{skills:W,diagnostics:h.diagnostics,projectResourcesLoaded:h.projectResourcesLoaded,loadedAt:Date.now()}),Ke(),h}function Ke(){while(fD.size>Be){let n=null,U=1/0;for(let[D,c]of fD){if(D==="")continue;if(c.loadedAt<U)U=c.loadedAt,n=D}if(n===null)break;fD.delete(n)}}function Nb(n,U,D){let c=fD.get(n);if(!c)return;let g=c.skills.get(U);if(!g){fD.delete(n);return}if(D.disableModelInvocation!==void 0)g.disableModelInvocation=D.disableModelInvocation}var Ze="force-dynamic";async function be(n){try{let U=await n.json(),D=typeof U.cwd==="string"?U.cwd:"";if(!D)return K.json({error:"cwd required"},{status:400});let c=await y1();if(!i1(D,c))return K.json({error:"Access denied"},{status:403});let g=typeof U.package==="string"?U.package:void 0,f=U.scope==="global"||U.scope==="project"?U.scope:void 0;if(g&&!f||!g&&f)return K.json({error:"package and scope must be provided together"},{status:400});let{skills:h}=await ln(D),W=h.map((x)=>x.install).filter((x)=>Boolean(x)).filter((x)=>!g||x.package===g&&x.scope===f);if(g&&W.length===0)return K.json({error:"Installed skill not found"},{status:404});let T=await Eb(W,{githubToken:process.env.GITHUB_TOKEN||process.env.GH_TOKEN});return K.json({updates:T})}catch(U){return K.json({error:U instanceof Error?U.message:String(U)},{status:500})}}var hW={};U1(hW,{dynamic:()=>Ce,POST:()=>Ee});import{getAgentDir as Le}from"@earendil-works/pi-coding-agent";import{execFile as ze}from"node:child_process";import{existsSync as Oe}from"node:fs";import{dirname as qe,join as Pb}from"node:path";import{execPath as Rb}from"node:process";import{promisify as Me}from"node:util";var Ae=Me(ze);function He(){let n=qe(Rb),U=[Pb(n,"node_modules","npm","bin","npx-cli.js"),Pb(n,"..","lib","node_modules","npm","bin","npx-cli.js")];for(let D of U)try{if(Oe(D))return D}catch{}return null}async function bc(n,U={}){let D=He(),{command:c,commandArgs:g}=D?{command:Rb,commandArgs:[D,...n]}:{command:"npx",commandArgs:n};return Ae(c,g,{timeout:U.timeout,cwd:U.cwd,env:U.env})}var Ce="force-dynamic",ub=/\x1B\[[0-9;]*m/g;async function Ee(n){if(!U2(n))return K.json({error:"Untrusted API request"},{status:403});if(!JD(n))return K.json({error:"Content-Type must be application/json"},{status:415});try{let{package:U,scope:D,cwd:c}=await n.json();if(!U?.trim())return K.json({error:"package required"},{status:400});let g=D!=="project";if(!g){if(!c)return K.json({error:"cwd required for project install"},{status:400});let y=await y1();if(!i1(c,y))return K.json({error:"Access denied"},{status:403});if(!Qn(c,Le()).trusted)return K.json({error:"Project resources must be trusted before installing project skills"},{status:403})}let f=["skills","add",U.trim(),"-y","--agent","pi"];if(g)f.push("-g");console.log(`[skills/install] running: npx ${f.join(" ")}`);let{stdout:h,stderr:W}=await bc(f,{timeout:60000,cwd:!g&&c?c:void 0,env:{...process.env,FORCE_COLOR:"0"}}),T=(h+W).replace(ub,"");if(!/Installation complete|Installed \d+ skill/.test(T))return K.json({error:T.slice(-300)||"Install failed"},{status:500});return K.json({success:!0,output:T})}catch(U){let D=U,c=((D.stdout??"")+(D.stderr??"")).replace(ub,"");return K.json({error:c||(D.message??String(U))},{status:500})}}var WW={};U1(WW,{dynamic:()=>Ne,PATCH:()=>Re,GET:()=>Pe});import{existsSync as db,readFileSync as we,writeFileSync as je}from"node:fs";import{homedir as Ie}from"node:os";import _e from"node:path";import{getAgentDir as Se,parseFrontmatter as ve}from"@earendil-works/pi-coding-agent";var Ne="force-dynamic";async function Pe(n){let{searchParams:U}=new URL(n.url),D=U.get("cwd");if(!D)return K.json({error:"cwd required"},{status:400});try{let c=await y1();if(!i1(D,c))return K.json({error:"Access denied"},{status:403});let g=await ln(D,{forceFresh:(n.headers.get("cache-control")??"").includes("no-store")});return K.json({...g,skills:g.skills.filter((f)=>f.sourceInfo?.scope==="project")})}catch(c){return K.json({error:String(c)},{status:500})}}async function Re(n){try{let U=await n.json(),{filePath:D,disableModelInvocation:c,cwd:g}=U;if(!D)return K.json({error:"filePath required"},{status:400});if(!db(D))return K.json({error:"file not found"},{status:404});let f=new Set(await y1());f.add(Se());let h=_e.join(Ie(),".agents","skills");if(db(h))f.add(h);if(!i1(D,f))return K.json({error:"Access denied"},{status:403});let W=we(D,"utf8"),T="disable-model-invocation",{frontmatter:x}=ve(W),y=Boolean(x[T]),F=W;if(c&&!y){if(F=W.replace(/^---\r?\n/,`---
|
|
398
|
+
${T}: true
|
|
399
|
+
`),F===W)F=`---
|
|
400
|
+
${T}: true
|
|
401
|
+
---
|
|
402
|
+
${W}`}else if(!c&&y)F=W.replace(new RegExp(`^${T}\\s*:.*\\r?\\n`,"m"),"");if(je(D,F,"utf8"),g)Nb(g==="global"?"":g,D,{disableModelInvocation:c});return K.json({success:!0})}catch(U){return K.json({error:String(U)},{status:500})}}var xW={};U1(xW,{dynamic:()=>ue,GET:()=>de});var ue="force-dynamic";async function de(n){await M3();try{let U=(n.headers.get("cache-control")??"").includes("no-store");return K.json(await ln("",{forceFresh:U}))}catch(U){return K.json({error:String(U)},{status:500})}}var TW={};U1(TW,{dynamic:()=>ke,POST:()=>ee});var ke="force-dynamic",pe=/\x1B\[[0-9;]*m/g,me=50,ae=1,oe=50,kb=process.env.SKILLS_API_URL||"https://skills.sh";function re(n){let U=typeof n==="number"?n:Number(n);if(!Number.isFinite(U))return me;return Math.min(oe,Math.max(ae,Math.floor(U)))}function le(n){if(!n||n<=0)return"";if(n>=1e6)return`${(n/1e6).toFixed(1).replace(/\.0$/,"")}M installs`;if(n>=1000)return`${(n/1000).toFixed(1).replace(/\.0$/,"")}K installs`;return`${n} install${n===1?"":"s"}`}function pb(n){let U=n.replace(pe,""),D=[],c=U.split(`
|
|
403
|
+
`);for(let g=0;g<c.length;g++){let h=c[g].trim().match(/^([\w.-]+\/[\w.\-@:]+)\s+([\d.,]+[KMB]?\s+installs)$/);if(h){let W=c[g+1]?.trim().replace(/^└\s*/,"");D.push({package:h[1],installs:h[2],url:W?.startsWith("https://")?W:""})}}return D}async function te(n,U){let D=`${kb}/api/search?q=${encodeURIComponent(n)}&limit=${U}`,c=await fetch(D,{cache:"no-store"});if(!c.ok)throw Error(`skills.sh search failed: HTTP ${c.status}`);return((await c.json()).skills??[]).map((f)=>{let h=f.name?.trim(),W=f.source?.trim(),T=f.id?.trim();if(!h||!W&&!T)return null;return{package:`${W||T}@${h}`,installs:le(f.installs),url:T?`${kb}/${T}`:""}}).filter((f)=>f!==null).sort((f,h)=>mb(h.installs)-mb(f.installs))}function mb(n){let U=n.match(/^([\d.]+)([KMB])?\s+installs?$/);if(!U)return 0;let D=Number(U[1]);if(!Number.isFinite(D))return 0;let c=U[2]==="B"?1e9:U[2]==="M"?1e6:U[2]==="K"?1000:1;return D*c}async function ee(n){try{let{query:U,limit:D}=await n.json();if(!U?.trim())return K.json({error:"query required"},{status:400});let c=re(D);try{let g=await te(U.trim(),c);return K.json({results:g})}catch{let{stdout:g,stderr:f}=await bc(["skills","find",U.trim()],{timeout:20000,env:{...process.env,FORCE_COLOR:"0"}}),h=pb(g+f).slice(0,c);return K.json({results:h})}}catch(U){let D=U,c=(D.stdout??"")+(D.stderr??""),g=c?pb(c):[];if(g.length>0)return K.json({results:g});return K.json({error:D.message??String(U)},{status:500})}}var yW={};U1(yW,{dynamic:()=>se,POST:()=>ns});var se="force-dynamic";async function ns(n){try{let U=await n.json(),D=typeof U.cwd==="string"?U.cwd:"",c=typeof U.package==="string"?U.package:"",g=U.scope==="global"||U.scope==="project"?U.scope:void 0;if(!D||!c||!g)return K.json({error:"cwd, package, and scope are required"},{status:400});let f=await y1();if(!i1(D,f))return K.json({error:"Access denied"},{status:403});let{skills:h}=await ln(D),W=h.find((i)=>i.install?.package===c&&i.install.scope===g);if(!W?.install)return K.json({error:"Installed skill not found"},{status:404});if(!W.install.canCheckForUpdates)return K.json({error:"This skill cannot be updated automatically"},{status:400});let{stdout:T,stderr:x}=await bc(Hb(W.install),{timeout:60000,cwd:g==="project"?D:void 0,env:{...process.env,FORCE_COLOR:"0"}}),F=(await ln(D)).skills.find((i)=>i.install?.package===c&&i.install.scope===g);return K.json({success:!0,skill:F,output:`${T}${x}`.slice(-500)})}catch(U){let D=U,c=`${D.stdout??""}${D.stderr??""}`;return K.json({error:c||D.message||String(U)},{status:500})}}var iW={};U1(iW,{POST:()=>Ds,GET:()=>Us,DELETE:()=>cs});import{existsSync as ab}from"node:fs";async function FW(n){let U=await y1();if(!o1(n,U)||!i1(n,U))return K.json({error:"Access denied"},{status:403});return null}async function Us(n){try{let U=new URL(n.url).searchParams.get("cwd");if(!U)return K.json({error:"cwd is required"},{status:400});let D=await FW(U);if(D)return D;let c=await kg(U),g=[],f=!0;try{g=await Zf(ab(U)?U:c.projectRoot)}catch{f=!1}for(let h of g)On(h.path);return K.json({projectRoot:c.projectRoot,isGit:f,isTopLevel:c.isTopLevel,worktrees:g})}catch(U){return K.json({error:String(U)},{status:500})}}async function Ds(n){try{let U=await n.json();if(!U.cwd||typeof U.cwd!=="string")return K.json({error:"cwd is required"},{status:400});if(!U.branch||typeof U.branch!=="string")return K.json({error:"branch is required"},{status:400});let D=await FW(U.cwd);if(D)return D;if(!ab(U.cwd))return K.json({error:`Directory does not exist: ${U.cwd}`},{status:400});let c=await wx(U.cwd,U.branch);return K.json(c)}catch(U){let D=U instanceof Error?U.message:String(U);return K.json({error:D},{status:400})}}async function cs(n){try{let U=await n.json();if(!U.cwd||typeof U.cwd!=="string")return K.json({error:"cwd is required"},{status:400});if(!U.path||typeof U.path!=="string")return K.json({error:"path is required"},{status:400});let D=await FW(U.cwd);if(D)return D;return await jx(U.cwd,U.path,U.force===!0),K.json({success:!0})}catch(U){let D=U instanceof Error?U.message:String(U),c=/contains modified or untracked files|is dirty/i.test(D);return K.json({error:D,dirty:c},{status:c?409:400})}}import{createReadStream as gs}from"node:fs";import{stat as ob}from"node:fs/promises";import{extname as fs,join as JW,normalize as hs}from"node:path";import{Readable as Ws}from"node:stream";var xs=$D("static"),XW=JW(import.meta.dirname,"..","dist","static"),Ts={".html":"text/html; charset=utf-8",".css":"text/css; charset=utf-8",".js":"text/javascript; charset=utf-8",".mjs":"text/javascript; charset=utf-8",".json":"application/json; charset=utf-8",".svg":"image/svg+xml",".png":"image/png",".ico":"image/x-icon",".webmanifest":"application/manifest+json",".woff2":"font/woff2",".txt":"text/plain; charset=utf-8"};async function rb(n){let U=performance.now(),D=new URL(n.req.url).pathname;if(D.startsWith("/api/"))return n.json({error:"Not found"},404);let c=D==="/"?"/index.html":decodeURIComponent(D),g=hs(JW(XW,c));if(!g.startsWith(XW))return n.text("Forbidden",403);let f=g;try{if(!(await ob(g)).isFile())return n.text("Not found",404)}catch{f=JW(XW,"index.html");try{await ob(f)}catch{return n.text("Not found",404)}}return xs(n.req.path,`${Math.round(performance.now()-U)}ms`),new Response(Ws.toWeb(gs(f)),{headers:{"content-type":Ts[fs(f).toLowerCase()]??"application/octet-stream"}})}var e=new Ff;e.use("/api/*",async(n,U)=>{let D=n.req.raw,c=D.url.includes("/api/");if(!(c?U2(D):Xf(D))){if(!c)return new Response("Untrusted request",{status:403});return new Response(JSON.stringify({error:"Untrusted API request"}),{status:403,headers:{"content-type":"application/json"}})}let f=process.env.PI_WEB_PASSWORD;if(Jf(f)&&!Zx(D.headers.get("authorization"),f))return new Response("Authentication required",{status:401,headers:{"Cache-Control":"no-store","WWW-Authenticate":'Basic realm="Pi Web", charset="UTF-8"'}});await U()});n1(e,"/api/agent/[id]/bash-output",Lf);n1(e,"/api/agent/[id]/events",jf);n1(e,"/api/agent/[id]",_f);n1(e,"/api/agent/running/events",Sf);n1(e,"/api/agent/running",vf);n1(e,"/api/auth/all-providers",Nf);n1(e,"/api/auth/api-key/[provider]",U5);n1(e,"/api/auth/login/[provider]",D5);n1(e,"/api/auth/logout/[provider]",c5);n1(e,"/api/auth/providers",g5);n1(e,"/api/config/files/[name]",Ah);n1(e,"/api/config/files",Mh);n1(e,"/api/cwd/browse",h5);n1(e,"/api/cwd/validate",W5);n1(e,"/api/default-cwd",x5);n1(e,"/api/file-index",T5);n1(e,"/api/files/[...path]",Xh);n1(e,"/api/git/commit",$h);n1(e,"/api/git/diff",Vh);n1(e,"/api/git/push",Qh);n1(e,"/api/git/stage",Yh);n1(e,"/api/git/status",Bh);n1(e,"/api/home",Gh);n1(e,"/api/models-config/catalog",zh);n1(e,"/api/models-config/discover",Lh);n1(e,"/api/models-config",Ch);n1(e,"/api/models-config/test",Eh);n1(e,"/api/models",Zh);n1(e,"/api/plugins/global",_h);n1(e,"/api/plugins",Ih);n1(e,"/api/preferences",kh);n1(e,"/api/project-trust",ph);n1(e,"/api/sessions/[id]/auto-name",ah);n1(e,"/api/sessions/[id]/context",oh);n1(e,"/api/sessions/[id]/entries/[entryId]/thinking",rh);n1(e,"/api/sessions/[id]/export",lh);n1(e,"/api/sessions/[id]",th);n1(e,"/api/sessions/[id]/state",eh);n1(e,"/api/sessions",sh);n1(e,"/api/skills/check",fW);n1(e,"/api/skills/install",hW);n1(e,"/api/skills/global",xW);n1(e,"/api/skills",WW);n1(e,"/api/skills/search",TW);n1(e,"/api/skills/update",yW);n1(e,"/api/worktrees",iW);if(process.env.PI_WEB_E2E==="1")e.get("/api/__e2e/probe",(n)=>n.json({agentDir:ys()}));e.get("*",rb);var $W=new iD().name("pi-web").description("Local web UI for the pi coding agent (API + static frontend)").version(kW.version).option("-p, --port <number>","server port",(n)=>Number.parseInt(n,10),Number(process.env.PORT??pW.port)).option("-H, --hostname <host>","bind address",process.env.HOST??"127.0.0.1").option("--open","open the browser once the server is ready").option("--agent-dir <dir>","pi agent directory (default: $PI_CODING_AGENT_DIR)",process.env.PI_CODING_AGENT_DIR).option("--debug","enable debug timing logs").showHelpAfterError();$W.parse();var zc=$W.opts();zx(zc.debug??!1);var{port:Vn,hostname:Gg}=zc;if(!Number.isInteger(Vn)||Vn<=0||Vn>65535)$W.error(`invalid port: ${Vn}`);if(zc.agentDir)process.env.PI_CODING_AGENT_DIR=zc.agentDir;function Xs(n){return new Promise((U)=>{let D=is({port:n,host:"127.0.0.1"});D.once("connect",()=>{D.destroy(),U(!0)}),D.once("error",()=>U(!1))})}function Js(n){let U=process.platform,D=U==="win32"?["cmd","/c","start","",n]:U==="darwin"?["open",n]:["xdg-open",n];try{Fs(D[0],D.slice(1),{detached:!0,stdio:"ignore"}).unref()}catch{}}async function $s(n,U){let D=Date.now()+U;while(Date.now()<D){try{if((await fetch(n)).ok)return!0}catch{}await new Promise((c)=>setTimeout(c,250))}return!1}async function Vs(){let n=$D("boot");if(n("cli parsed",`port=${Vn} host=${Gg}`),n("port probe",`checking port ${Vn}`),await Xs(Vn))console.error(`[server] error: port ${Vn} is already in use — is another API server running?`),console.error(`[server] stop the process holding ${Vn} (e.g. bun run e2e:stop) and retry.`),process.exit(1);if(n("port probe",`${Vn} free`),typeof Bun>"u")PW({port:Vn,hostname:Gg,fetch:e.fetch});else Bun.serve({port:Vn,hostname:Gg,fetch:e.fetch,idleTimeout:255});if(n("server listening",`http://${Gg}:${Vn}`),console.log(`[server] api server listening on http://${Gg}:${Vn}`),setTimeout(()=>{YZ([()=>ln(""),()=>n8(lb(),()=>A3(lb()))])},0),zc.open){let U=`http://127.0.0.1:${Vn}`;if(await $s(`${U}/api/preferences`,30000))Js(U);else console.error(`[server] server did not become ready within 30s; open ${U} manually.`)}}Vs();
|