@doubao-dev/cli 0.0.34 → 0.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/1232.js +1 -0
  2. package/dist/1264.js +1 -0
  3. package/dist/1611.js +2 -0
  4. package/dist/2232.js +60 -0
  5. package/dist/2507.js +1 -0
  6. package/dist/275.js +5 -8
  7. package/dist/2932.js +1 -1
  8. package/dist/4525.js +1 -1
  9. package/dist/4880.js +1 -1
  10. package/dist/4931.js +1 -1
  11. package/dist/{3688.js → 5887.js} +3 -3
  12. package/dist/6438.js +140 -0
  13. package/dist/6976.js +280 -0
  14. package/dist/{8981.js.LICENSE.txt → 6976.js.LICENSE.txt} +108 -0
  15. package/dist/7410.js +1 -2
  16. package/dist/@byted-doubao-apps/create.js +1 -1
  17. package/dist/@byted-doubao-apps/kit.js +1 -1
  18. package/dist/@byted-doubao-apps/login.js +2 -2
  19. package/dist/@byted-doubao-apps/login~1.js +2 -2
  20. package/dist/@byted-doubao-apps/template-empty/package.json +3 -3
  21. package/dist/@byted-doubao-apps/template-starter/package.json +3 -3
  22. package/dist/@byted-hdt/cli.js +1 -1
  23. package/dist/@inquirer/select.js +1 -1
  24. package/dist/{assets/web-sdk-debugger/static/wasm/eaf690f2cd.module.wasm → @lynx-js/static/wasm/77fb77f77f.module.wasm} +0 -0
  25. package/dist/@lynx-js/{web-core-canary.js → web-core.js} +2 -2
  26. package/dist/app.js +1 -1
  27. package/dist/assets/web-sdk-debugger/__doubao_web_sdk_native_modules/applet-bridge-module-core.js +1 -1
  28. package/dist/assets/web-sdk-debugger/index.html +1 -1
  29. package/dist/assets/web-sdk-debugger/preact-devtools/index.js +4 -1
  30. package/dist/assets/web-sdk-debugger/static/css/index.ef5d8bc5ad.css +1 -0
  31. package/dist/assets/web-sdk-debugger/static/js/{682.de47e82f6b.js → 426.53c43a8594.js} +2 -2
  32. package/dist/assets/web-sdk-debugger/static/js/479.26e0b1d922.js +1829 -0
  33. package/dist/assets/web-sdk-debugger/static/js/async/503.259fed5610.js +1 -0
  34. package/dist/assets/web-sdk-debugger/static/js/async/{legacy-wasm-js.bacc8b5564.js → legacy-wasm-js.9b9367f818.js} +2 -2
  35. package/dist/assets/web-sdk-debugger/static/js/async/lynx-core-chunk.7f5e94dfae.js +5 -0
  36. package/dist/assets/web-sdk-debugger/static/js/async/web-core-main-chunk.f78260697f.js +1 -0
  37. package/dist/assets/web-sdk-debugger/static/js/async/web-core-markup-encoder.33c43c480e.js +4 -0
  38. package/dist/assets/web-sdk-debugger/static/js/async/web-core-template-loader-thread.ba290b32d7.js +4 -0
  39. package/dist/assets/web-sdk-debugger/static/js/async/web-core-worker-chunk.9a5989b104.js +1 -0
  40. package/dist/assets/web-sdk-debugger/static/js/async/web-elements.3fbd53918e.js +365 -0
  41. package/dist/assets/web-sdk-debugger/static/js/async/xmarkdown-deps.efd0ffb051.js +5 -0
  42. package/dist/assets/web-sdk-debugger/static/js/async/{xmarkdown-deps.3ea5672b2c.js.LICENSE.txt → xmarkdown-deps.efd0ffb051.js.LICENSE.txt} +1 -1
  43. package/dist/assets/web-sdk-debugger/static/js/index.b6e5c76345.js +44 -0
  44. package/dist/assets/web-sdk-debugger/static/js/lib-polyfill.c91181f230.js +1 -0
  45. package/dist/assets/web-sdk-debugger/static/wasm/{69a8ba8eb9.module.wasm → 4c402c7981.module.wasm} +0 -0
  46. package/dist/assets/web-sdk-debugger/static/wasm/{03b02f9e5a.module.wasm → 72aaf7d0aa.module.wasm} +0 -0
  47. package/dist/{@lynx-js/static/wasm/eaf690f2cd.module.wasm → assets/web-sdk-debugger/static/wasm/77fb77f77f.module.wasm} +0 -0
  48. package/dist/assets/web-sdk-debugger/wsd/doubao-apps-api.template.js +0 -0
  49. package/dist/assets/web-sdk-debugger/wsd/doubao-apps-framework.template.js +0 -0
  50. package/dist/assets/web-sdk-debugger/wsd/doubao-apps-react-dev.template.js +0 -0
  51. package/dist/assets/web-sdk-debugger/wsd/doubao-apps-react.template.js +0 -0
  52. package/dist/browser.js +1 -1
  53. package/dist/build.js +1 -1
  54. package/dist/build~1.js +10 -10
  55. package/dist/check.js +1 -1
  56. package/dist/client.js +1 -0
  57. package/dist/client~1.js +1 -0
  58. package/dist/components-loader.js +1 -1
  59. package/dist/demo-server.js +2 -2
  60. package/dist/demo.js +2 -2
  61. package/dist/dev-config.js +2 -2
  62. package/dist/dev-shell.js +1 -1
  63. package/dist/dev.js +19 -16
  64. package/dist/explore.js +10 -0
  65. package/dist/gen-explore.js +1 -1
  66. package/dist/gen-trajectory.js +1 -1
  67. package/dist/info.js +2 -2
  68. package/dist/init.js +4 -4
  69. package/dist/ink.js +1 -1
  70. package/dist/inquirer.js +1 -1
  71. package/dist/json-file.js +2 -2
  72. package/dist/legacy-status.js +1 -1
  73. package/dist/legacy-upload.js +1 -1
  74. package/dist/lepus.js +1 -1
  75. package/dist/login.js +2 -1
  76. package/dist/main.js +1 -1
  77. package/dist/{manifest-mcp-config.js → manifest-headers.js} +1 -1
  78. package/dist/ora.js +1 -1
  79. package/dist/portal.js +1 -1
  80. package/dist/project-layout.js +1 -1
  81. package/dist/project.js +1 -1
  82. package/dist/prompt.js +8 -8
  83. package/dist/prompts.js +1 -1
  84. package/dist/qrcode.js +1 -0
  85. package/dist/report.js +1 -1
  86. package/dist/run-registry.js +1 -1
  87. package/dist/run.js +321 -321
  88. package/dist/sandbox.js +1 -1
  89. package/dist/scan.js +1 -1
  90. package/dist/sdk.js +192 -59
  91. package/dist/sdk~1.js +66 -58
  92. package/dist/server.js +10 -10
  93. package/dist/skill.js +1 -1
  94. package/dist/skills.js +1 -1
  95. package/dist/skills~1.js +1 -1
  96. package/dist/status.js +1 -1
  97. package/dist/status~1.js +2 -2
  98. package/dist/stop.js +1 -1
  99. package/dist/sync.js +1 -1
  100. package/dist/trajectory.js +3 -0
  101. package/dist/update.js +1 -1
  102. package/dist/upgrade.js +1 -1
  103. package/dist/workspace.js +1 -1
  104. package/dist/yaml.js +1 -1
  105. package/package.json +7 -7
  106. package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/02-/347/263/273/347/273/237.md +2 -2
  107. package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/06-/350/267/257/347/224/261.md +4 -0
  108. package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/07-/347/225/214/351/235/242.md +8 -0
  109. package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/26-/345/237/272/347/241/200/344/277/241/346/201/257.md +2 -1
  110. package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/33-/345/261/217/345/271/225.md +124 -8
  111. package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/groups.md +1 -1
  112. package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/quick-reference.md +2 -1
  113. package/skills/doubao-agentic-service-development/references/frontend/examples/page-widget-basics.md +1 -0
  114. package/skills/doubao-agentic-service-development/references/frontend/guides/client-tools-and-events.md +209 -0
  115. package/skills/doubao-agentic-service-development/references/frontend/guides/component-development.md +7 -1
  116. package/skills/doubao-agentic-service-development/references/frontend/guides/debugger-mcp.md +1 -1
  117. package/skills/doubao-agentic-service-development/references/frontend/widget-templates/overview.md +13 -9
  118. package/skills/doubao-agentic-service-development/references/frontend/widget-templates/props.md +26 -1
  119. package/skills/doubao-agentic-service-development/references/frontend-dev.md +2 -0
  120. package/dist/2168.js +0 -60
  121. package/dist/318.js +0 -1
  122. package/dist/3974.js +0 -151
  123. package/dist/6427.js +0 -126
  124. package/dist/7417.js +0 -204
  125. package/dist/7417.js.LICENSE.txt +0 -107
  126. package/dist/7945.js +0 -1
  127. package/dist/8981.js +0 -78
  128. package/dist/assets/web-sdk-debugger/static/css/index.7c65607402.css +0 -1
  129. package/dist/assets/web-sdk-debugger/static/js/670.8a8f0f7d57.js +0 -1829
  130. package/dist/assets/web-sdk-debugger/static/js/async/503.cf61731bba.js +0 -1
  131. package/dist/assets/web-sdk-debugger/static/js/async/lynx-core-chunk.afc1ded023.js +0 -5
  132. package/dist/assets/web-sdk-debugger/static/js/async/web-core-main-chunk.7fe9af852c.js +0 -1
  133. package/dist/assets/web-sdk-debugger/static/js/async/web-core-markup-encoder.f81d6d2cae.js +0 -4
  134. package/dist/assets/web-sdk-debugger/static/js/async/web-core-template-loader-thread.4a49f8a286.js +0 -4
  135. package/dist/assets/web-sdk-debugger/static/js/async/web-core-worker-chunk.c315fd6753.js +0 -1
  136. package/dist/assets/web-sdk-debugger/static/js/async/web-elements.43d1e29387.js +0 -365
  137. package/dist/assets/web-sdk-debugger/static/js/async/xmarkdown-deps.3ea5672b2c.js +0 -5
  138. package/dist/assets/web-sdk-debugger/static/js/index.9f626ba3a2.js +0 -44
  139. package/dist/assets/web-sdk-debugger/static/js/lib-polyfill.9daa7c863e.js +0 -1
  140. package/dist/simulator-client.js +0 -1
  141. /package/dist/{7410.js.LICENSE.txt → 1611.js.LICENSE.txt} +0 -0
  142. /package/dist/assets/web-sdk-debugger/static/js/{670.8a8f0f7d57.js.LICENSE.txt → 479.26e0b1d922.js.LICENSE.txt} +0 -0
package/dist/qrcode.js ADDED
@@ -0,0 +1 @@
1
+ import"node:module";import{__webpack_require__ as e}from"./rslib-runtime.js";import"./1264.js";import"./3551.js";e.add({"../../../node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js"(e){var t={single_source_shortest_paths:function(e,n,r){var o,i,s,l,d,a,u,h={},p={};p[n]=0;var c=t.PriorityQueue.make();for(c.push(n,0);!c.empty();)for(s in i=(o=c.pop()).value,l=o.cost,d=e[i]||{})d.hasOwnProperty(s)&&(a=l+d[s],u=p[s],(void 0===p[s]||u>a)&&(p[s]=a,c.push(s,a),h[s]=i));if(void 0!==r&&void 0===p[r])throw Error(["Could not find a path from ",n," to ",r,"."].join(""));return h},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,n,r){var o=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,o={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=e.sorter||r.default_sorter,o},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){this.queue.push({value:e,cost:t}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/bitmapper.js"(e,t,n){let r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/interlace.js"),o=[function(){},function(e,t,n,r){if(r===t.length)throw Error("Ran out of data");let o=t[r];e[n]=o,e[n+1]=o,e[n+2]=o,e[n+3]=255},function(e,t,n,r){if(r+1>=t.length)throw Error("Ran out of data");let o=t[r];e[n]=o,e[n+1]=o,e[n+2]=o,e[n+3]=t[r+1]},function(e,t,n,r){if(r+2>=t.length)throw Error("Ran out of data");e[n]=t[r],e[n+1]=t[r+1],e[n+2]=t[r+2],e[n+3]=255},function(e,t,n,r){if(r+3>=t.length)throw Error("Ran out of data");e[n]=t[r],e[n+1]=t[r+1],e[n+2]=t[r+2],e[n+3]=t[r+3]}],i=[function(){},function(e,t,n,r){let o=t[0];e[n]=o,e[n+1]=o,e[n+2]=o,e[n+3]=r},function(e,t,n){let r=t[0];e[n]=r,e[n+1]=r,e[n+2]=r,e[n+3]=t[1]},function(e,t,n,r){e[n]=t[0],e[n+1]=t[1],e[n+2]=t[2],e[n+3]=r},function(e,t,n){e[n]=t[0],e[n+1]=t[1],e[n+2]=t[2],e[n+3]=t[3]}];t.dataToBitMap=function(e,t){let n,s,l,d,a,u,h=t.width,p=t.height,c=t.depth,f=t.bpp,m=t.interlace;8!==c&&(n=[],s=0,l={get:function(t){for(;n.length<t;)!function(){let t,r,o,i;if(s===e.length)throw Error("Ran out of data");let l=e[s];switch(s++,c){default:throw Error("unrecognised depth");case 16:o=e[s],s++,n.push((l<<8)+o);break;case 4:o=15&l,i=l>>4,n.push(i,o);break;case 2:t=3&l,r=l>>2&3,o=l>>4&3,i=l>>6&3,n.push(i,o,r,t);break;case 1:t=l>>4&1,r=l>>5&1,o=l>>6&1,i=l>>7&1,n.push(i,o,r,t,l>>3&1,l>>2&1,l>>1&1,1&l)}}();let r=n.slice(0,t);return n=n.slice(t),r},resetAfterLine:function(){n.length=0},end:function(){if(s!==e.length)throw Error("extra data found")}}),d=c<=8?Buffer.alloc(h*p*4):new Uint16Array(h*p*4);let _=Math.pow(2,c)-1,g=0;if(m)a=r.getImagePasses(h,p),u=r.getInterlaceIterator(h,p);else{let e=0;u=function(){let t=e;return e+=4,t},a=[{width:h,height:p}]}for(let t=0;t<a.length;t++)8===c?g=function(e,t,n,r,i,s){let l=e.width,d=e.height,a=e.index;for(let e=0;e<d;e++)for(let d=0;d<l;d++){let l=n(d,e,a);o[r](t,i,l,s),s+=r}return s}(a[t],d,u,f,e,g):function(e,t,n,r,o,s){let l=e.width,d=e.height,a=e.index;for(let e=0;e<d;e++){for(let d=0;d<l;d++){let l=o.get(r),u=n(d,e,a);i[r](t,l,u,s)}o.resetAfterLine()}}(a[t],d,u,f,l,_);if(8===c){if(g!==e.length)throw Error("extra data found")}else l.end();return d}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/bitpacker.js"(e,t,n){let r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js");e.exports=function(e,t,n,o){let i=-1!==[r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(o.colorType);if(o.colorType===o.inputColorType){let t,n=(new DataView(t=new ArrayBuffer(2)).setInt16(0,256,!0),256!==new Int16Array(t)[0]);if(8===o.bitDepth||16===o.bitDepth&&n)return e}let s=16!==o.bitDepth?e:new Uint16Array(e.buffer),l=255,d=r.COLORTYPE_TO_BPP_MAP[o.inputColorType];4!==d||o.inputHasAlpha||(d=3);let a=r.COLORTYPE_TO_BPP_MAP[o.colorType];16===o.bitDepth&&(l=65535,a*=2);let u=Buffer.alloc(t*n*a),h=0,p=0,c=o.bgColor||{};void 0===c.red&&(c.red=l),void 0===c.green&&(c.green=l),void 0===c.blue&&(c.blue=l);for(let e=0;e<n;e++)for(let e=0;e<t;e++){let e=function(){let e,t,n,d=l;switch(o.inputColorType){case r.COLORTYPE_COLOR_ALPHA:d=s[h+3],e=s[h],t=s[h+1],n=s[h+2];break;case r.COLORTYPE_COLOR:e=s[h],t=s[h+1],n=s[h+2];break;case r.COLORTYPE_ALPHA:d=s[h+1],t=e=s[h],n=e;break;case r.COLORTYPE_GRAYSCALE:t=e=s[h],n=e;break;default:throw Error("input color type:"+o.inputColorType+" is not supported at present")}return o.inputHasAlpha&&!i&&(d/=l,e=Math.min(Math.max(Math.round((1-d)*c.red+d*e),0),l),t=Math.min(Math.max(Math.round((1-d)*c.green+d*t),0),l),n=Math.min(Math.max(Math.round((1-d)*c.blue+d*n),0),l)),{red:e,green:t,blue:n,alpha:d}}();switch(o.colorType){case r.COLORTYPE_COLOR_ALPHA:case r.COLORTYPE_COLOR:8===o.bitDepth?(u[p]=e.red,u[p+1]=e.green,u[p+2]=e.blue,i&&(u[p+3]=e.alpha)):(u.writeUInt16BE(e.red,p),u.writeUInt16BE(e.green,p+2),u.writeUInt16BE(e.blue,p+4),i&&u.writeUInt16BE(e.alpha,p+6));break;case r.COLORTYPE_ALPHA:case r.COLORTYPE_GRAYSCALE:{let t=(e.red+e.green+e.blue)/3;8===o.bitDepth?(u[p]=t,i&&(u[p+1]=e.alpha)):(u.writeUInt16BE(t,p),i&&u.writeUInt16BE(e.alpha,p+2));break}default:throw Error("unrecognised color Type "+o.colorType)}h+=d,p+=a}return u}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/chunkstream.js"(e,t,n){let r=n("util"),o=n("stream"),i=e.exports=function(){o.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};r.inherits(i,o),i.prototype.read=function(e,t){this._reads.push({length:Math.abs(e),allowLess:e<0,func:t}),process.nextTick((function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}).bind(this))},i.prototype.write=function(e,t){let n;return this.writable?(n=Buffer.isBuffer(e)?e:Buffer.from(e,t||this._encoding),this._buffers.push(n),this._buffered+=n.length,this._process(),this._reads&&0===this._reads.length&&(this._paused=!0),this.writable&&!this._paused):(this.emit("error",Error("Stream not writable")),!1)},i.prototype.end=function(e,t){e&&this.write(e,t),this.writable=!1,this._buffers&&(0===this._buffers.length?this._end():(this._buffers.push(null),this._process()))},i.prototype.destroySoon=i.prototype.end,i.prototype._end=function(){this._reads.length>0&&this.emit("error",Error("Unexpected end of input")),this.destroy()},i.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))},i.prototype._processReadAllowingLess=function(e){this._reads.shift();let t=this._buffers[0];t.length>e.length?(this._buffered-=e.length,this._buffers[0]=t.slice(e.length),e.func.call(this,t.slice(0,e.length))):(this._buffered-=t.length,this._buffers.shift(),e.func.call(this,t))},i.prototype._processRead=function(e){this._reads.shift();let t=0,n=0,r=Buffer.alloc(e.length);for(;t<e.length;){let o=this._buffers[n++],i=Math.min(o.length,e.length-t);o.copy(r,t,0,i),t+=i,i!==o.length&&(this._buffers[--n]=o.slice(i))}n>0&&this._buffers.splice(0,n),this._buffered-=e.length,e.func.call(this,r)},i.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let e=this._reads[0];if(e.allowLess)this._processReadAllowingLess(e);else if(this._buffered>=e.length)this._processRead(e);else break}this._buffers&&!this.writable&&this._end()}catch(e){this.emit("error",e)}}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js"(e){e.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:0x49484452,TYPE_IEND:0x49454e44,TYPE_IDAT:0x49444154,TYPE_PLTE:0x504c5445,TYPE_tRNS:0x74524e53,TYPE_gAMA:0x67414d41,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/crc.js"(e){let t=[];for(let e=0;e<256;e++){let n=e;for(let e=0;e<8;e++)1&n?n=0xedb88320^n>>>1:n>>>=1;t[e]=n}let n=e.exports=function(){this._crc=-1};n.prototype.write=function(e){for(let n=0;n<e.length;n++)this._crc=t[(this._crc^e[n])&255]^this._crc>>>8;return!0},n.prototype.crc32=function(){return -1^this._crc},n.crc32=function(e){let n=-1;for(let r=0;r<e.length;r++)n=t[(n^e[r])&255]^n>>>8;return -1^n}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-pack.js"(e,t,n){let r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/paeth-predictor.js"),o={0:function(e,t,n,r,o){for(let i=0;i<n;i++)r[o+i]=e[t+i]},1:function(e,t,n,r,o,i){for(let s=0;s<n;s++){let n=s>=i?e[t+s-i]:0,l=e[t+s]-n;r[o+s]=l}},2:function(e,t,n,r,o){for(let i=0;i<n;i++){let s=t>0?e[t+i-n]:0,l=e[t+i]-s;r[o+i]=l}},3:function(e,t,n,r,o,i){for(let s=0;s<n;s++){let l=s>=i?e[t+s-i]:0,d=t>0?e[t+s-n]:0,a=e[t+s]-(l+d>>1);r[o+s]=a}},4:function(e,t,n,o,i,s){for(let l=0;l<n;l++){let d=l>=s?e[t+l-s]:0,a=t>0?e[t+l-n]:0,u=t>0&&l>=s?e[t+l-(n+s)]:0,h=e[t+l]-r(d,a,u);o[i+l]=h}}},i={0:function(e,t,n){let r=0,o=t+n;for(let n=t;n<o;n++)r+=Math.abs(e[n]);return r},1:function(e,t,n,r){let o=0;for(let i=0;i<n;i++){let n=i>=r?e[t+i-r]:0;o+=Math.abs(e[t+i]-n)}return o},2:function(e,t,n){let r=0,o=t+n;for(let i=t;i<o;i++){let o=t>0?e[i-n]:0;r+=Math.abs(e[i]-o)}return r},3:function(e,t,n,r){let o=0;for(let i=0;i<n;i++){let s=i>=r?e[t+i-r]:0,l=t>0?e[t+i-n]:0;o+=Math.abs(e[t+i]-(s+l>>1))}return o},4:function(e,t,n,o){let i=0;for(let s=0;s<n;s++){let l=s>=o?e[t+s-o]:0,d=t>0?e[t+s-n]:0,a=t>0&&s>=o?e[t+s-(n+o)]:0;i+=Math.abs(e[t+s]-r(l,d,a))}return i}};e.exports=function(e,t,n,r,s){let l;if("filterType"in r&&-1!==r.filterType)if("number"==typeof r.filterType)l=[r.filterType];else throw Error("unrecognised filter types");else l=[0,1,2,3,4];16===r.bitDepth&&(s*=2);let d=t*s,a=0,u=0,h=Buffer.alloc((d+1)*n),p=l[0];for(let t=0;t<n;t++){if(l.length>1){let t=1/0;for(let n=0;n<l.length;n++){let r=i[l[n]](e,u,d,s);r<t&&(p=l[n],t=r)}}h[a]=p,a++,o[p](e,u,d,h,a,s),a+=d,u+=d}return h}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse-async.js"(e,t,n){let r=n("util"),o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/chunkstream.js"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse.js"),s=e.exports=function(e){o.call(this);let t=[],n=this;this._filter=new i(e,{read:this.read.bind(this),write:function(e){t.push(e)},complete:function(){n.emit("complete",Buffer.concat(t))}}),this._filter.start()};r.inherits(s,o)},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse-sync.js"(e,t,n){let r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/sync-reader.js"),o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse.js");t.process=function(e,t){let n=[],i=new r(e);return new o(t,{read:i.read.bind(i),write:function(e){n.push(e)},complete:function(){}}).start(),i.process(),Buffer.concat(n)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse.js"(e,t,n){let r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/interlace.js"),o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/paeth-predictor.js");function i(e,t,n){let r=e*t;return 8!==n&&(r=Math.ceil(r/(8/n))),r}let s=e.exports=function(e,t){let n=e.width,o=e.height,s=e.interlace,l=e.bpp,d=e.depth;if(this.read=t.read,this.write=t.write,this.complete=t.complete,this._imageIndex=0,this._images=[],s){let e=r.getImagePasses(n,o);for(let t=0;t<e.length;t++)this._images.push({byteWidth:i(e[t].width,l,d),height:e[t].height,lineIndex:0})}else this._images.push({byteWidth:i(n,l,d),height:o,lineIndex:0});8===d?this._xComparison=l:16===d?this._xComparison=2*l:this._xComparison=1};s.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))},s.prototype._unFilterType1=function(e,t,n){let r=this._xComparison,o=r-1;for(let i=0;i<n;i++){let n=e[1+i],s=i>o?t[i-r]:0;t[i]=n+s}},s.prototype._unFilterType2=function(e,t,n){let r=this._lastLine;for(let o=0;o<n;o++){let n=e[1+o],i=r?r[o]:0;t[o]=n+i}},s.prototype._unFilterType3=function(e,t,n){let r=this._xComparison,o=r-1,i=this._lastLine;for(let s=0;s<n;s++){let n=e[1+s],l=i?i[s]:0,d=Math.floor(((s>o?t[s-r]:0)+l)/2);t[s]=n+d}},s.prototype._unFilterType4=function(e,t,n){let r=this._xComparison,i=r-1,s=this._lastLine;for(let l=0;l<n;l++){let n=e[1+l],d=s?s[l]:0,a=o(l>i?t[l-r]:0,d,l>i&&s?s[l-r]:0);t[l]=n+a}},s.prototype._reverseFilterLine=function(e){let t,n=e[0],r=this._images[this._imageIndex],o=r.byteWidth;if(0===n)t=e.slice(1,o+1);else switch(t=Buffer.alloc(o),n){case 1:this._unFilterType1(e,t,o);break;case 2:this._unFilterType2(e,t,o);break;case 3:this._unFilterType3(e,t,o);break;case 4:this._unFilterType4(e,t,o);break;default:throw Error("Unrecognised filter type - "+n)}this.write(t),r.lineIndex++,r.lineIndex>=r.height?(this._lastLine=null,this._imageIndex++,r=this._images[this._imageIndex]):this._lastLine=t,r?this.read(r.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/format-normaliser.js"(e){e.exports=function(e,t){let n=t.depth,r=t.width,o=t.height,i=t.colorType,s=t.transColor,l=t.palette,d=e;return 3===i?!function(e,t,n,r,o){let i=0;for(let s=0;s<r;s++)for(let r=0;r<n;r++){let n=o[e[i]];if(!n)throw Error("index "+e[i]+" not in palette");for(let e=0;e<4;e++)t[i+e]=n[e];i+=4}}(e,d,r,o,l):(s&&function(e,t,n,r,o){let i=0;for(let s=0;s<r;s++)for(let r=0;r<n;r++){let n=!1;if(1===o.length?o[0]===e[i]&&(n=!0):o[0]===e[i]&&o[1]===e[i+1]&&o[2]===e[i+2]&&(n=!0),n)for(let e=0;e<4;e++)t[i+e]=0;i+=4}}(e,d,r,o,s),8!==n&&(16===n&&(d=Buffer.alloc(r*o*4)),!function(e,t,n,r,o){let i=Math.pow(2,o)-1,s=0;for(let o=0;o<r;o++)for(let r=0;r<n;r++){for(let n=0;n<4;n++)t[s+n]=Math.floor(255*e[s+n]/i+.5);s+=4}}(e,d,r,o,n))),d}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/interlace.js"(e,t){let n=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];t.getImagePasses=function(e,t){let r=[],o=e%8,i=t%8,s=(e-o)/8,l=(t-i)/8;for(let e=0;e<n.length;e++){let t=n[e],d=s*t.x.length,a=l*t.y.length;for(let e=0;e<t.x.length;e++)if(t.x[e]<o)d++;else break;for(let e=0;e<t.y.length;e++)if(t.y[e]<i)a++;else break;d>0&&a>0&&r.push({width:d,height:a,index:e})}return r},t.getInterlaceIterator=function(e){return function(t,r,o){let i=t%n[o].x.length,s=(t-i)/n[o].x.length*8+n[o].x[i],l=r%n[o].y.length;return 4*s+((r-l)/n[o].y.length*8+n[o].y[l])*e*4}}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer-async.js"(e,t,n){let r=n("util"),o=n("stream"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js"),s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer.js"),l=e.exports=function(e){o.call(this),this._packer=new s(e||{}),this._deflate=this._packer.createDeflate(),this.readable=!0};r.inherits(l,o),l.prototype.pack=function(e,t,n,r){this.emit("data",Buffer.from(i.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(t,n)),r&&this.emit("data",this._packer.packGAMA(r));let o=this._packer.filterData(e,t,n);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",(function(e){this.emit("data",this._packer.packIDAT(e))}).bind(this)),this._deflate.on("end",(function(){this.emit("data",this._packer.packIEND()),this.emit("end")}).bind(this)),this._deflate.end(o)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer-sync.js"(e,t,n){let r=!0,o=n("zlib");o.deflateSync||(r=!1);let i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js"),s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer.js");e.exports=function(e,t){if(!r)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let n=new s(t||{}),l=[];l.push(Buffer.from(i.PNG_SIGNATURE)),l.push(n.packIHDR(e.width,e.height)),e.gamma&&l.push(n.packGAMA(e.gamma));let d=n.filterData(e.data,e.width,e.height),a=o.deflateSync(d,n.getDeflateOptions());if(d=null,!a||!a.length)throw Error("bad png - invalid compressed data response");return l.push(n.packIDAT(a)),l.push(n.packIEND()),Buffer.concat(l)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer.js"(e,t,n){let r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js"),o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/crc.js"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/bitpacker.js"),s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-pack.js"),l=n("zlib"),d=e.exports=function(e){if(this._options=e,e.deflateChunkSize=e.deflateChunkSize||32768,e.deflateLevel=null!=e.deflateLevel?e.deflateLevel:9,e.deflateStrategy=null!=e.deflateStrategy?e.deflateStrategy:3,e.inputHasAlpha=null==e.inputHasAlpha||e.inputHasAlpha,e.deflateFactory=e.deflateFactory||l.createDeflate,e.bitDepth=e.bitDepth||8,e.colorType="number"==typeof e.colorType?e.colorType:r.COLORTYPE_COLOR_ALPHA,e.inputColorType="number"==typeof e.inputColorType?e.inputColorType:r.COLORTYPE_COLOR_ALPHA,-1===[r.COLORTYPE_GRAYSCALE,r.COLORTYPE_COLOR,r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(e.colorType))throw Error("option color type:"+e.colorType+" is not supported at present");if(-1===[r.COLORTYPE_GRAYSCALE,r.COLORTYPE_COLOR,r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(e.inputColorType))throw Error("option input color type:"+e.inputColorType+" is not supported at present");if(8!==e.bitDepth&&16!==e.bitDepth)throw Error("option bit depth:"+e.bitDepth+" is not supported at present")};d.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},d.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},d.prototype.filterData=function(e,t,n){let o=i(e,t,n,this._options),l=r.COLORTYPE_TO_BPP_MAP[this._options.colorType];return s(o,t,n,this._options,l)},d.prototype._packChunk=function(e,t){let n=t?t.length:0,r=Buffer.alloc(n+12);return r.writeUInt32BE(n,0),r.writeUInt32BE(e,4),t&&t.copy(r,8),r.writeInt32BE(o.crc32(r.slice(4,r.length-4)),r.length-4),r},d.prototype.packGAMA=function(e){let t=Buffer.alloc(4);return t.writeUInt32BE(Math.floor(e*r.GAMMA_DIVISION),0),this._packChunk(r.TYPE_gAMA,t)},d.prototype.packIHDR=function(e,t){let n=Buffer.alloc(13);return n.writeUInt32BE(e,0),n.writeUInt32BE(t,4),n[8]=this._options.bitDepth,n[9]=this._options.colorType,n[10]=0,n[11]=0,n[12]=0,this._packChunk(r.TYPE_IHDR,n)},d.prototype.packIDAT=function(e){return this._packChunk(r.TYPE_IDAT,e)},d.prototype.packIEND=function(){return this._packChunk(r.TYPE_IEND,null)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/paeth-predictor.js"(e){e.exports=function(e,t,n){let r=e+t-n,o=Math.abs(r-e),i=Math.abs(r-t),s=Math.abs(r-n);return o<=i&&o<=s?e:i<=s?t:n}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser-async.js"(e,t,n){let r=n("util"),o=n("zlib"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/chunkstream.js"),s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse-async.js"),l=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser.js"),d=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/bitmapper.js"),a=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/format-normaliser.js"),u=e.exports=function(e){i.call(this),this._parser=new l(e,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=e,this.writable=!0,this._parser.start()};r.inherits(u,i),u.prototype._handleError=function(e){this.emit("error",e),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0},u.prototype._inflateData=function(e){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=o.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let e=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,t=Math.max(e,o.Z_MIN_CHUNK);this._inflate=o.createInflate({chunkSize:t});let n=e,r=this.emit.bind(this,"error");this._inflate.on("error",function(e){n&&r(e)}),this._filter.on("complete",this._complete.bind(this));let i=this._filter.write.bind(this._filter);this._inflate.on("data",function(e){n&&(e.length>n&&(e=e.slice(0,n)),n-=e.length,i(e))}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(e)},u.prototype._handleMetaData=function(e){this._metaData=e,this._bitmapInfo=Object.create(e),this._filter=new s(this._bitmapInfo)},u.prototype._handleTransColor=function(e){this._bitmapInfo.transColor=e},u.prototype._handlePalette=function(e){this._bitmapInfo.palette=e},u.prototype._simpleTransparency=function(){this._metaData.alpha=!0},u.prototype._headersFinished=function(){this.emit("metadata",this._metaData)},u.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))},u.prototype._complete=function(e){let t;if(!this.errord){try{let n=d.dataToBitMap(e,this._bitmapInfo);t=a(n,this._bitmapInfo),n=null}catch(e){this._handleError(e);return}this.emit("parsed",t)}}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser-sync.js"(e,t,n){let r=!0,o=n("zlib"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/sync-inflate.js");o.deflateSync||(r=!1);let s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/sync-reader.js"),l=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/filter-parse-sync.js"),d=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser.js"),a=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/bitmapper.js"),u=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/format-normaliser.js");e.exports=function(e,t){let n,h,p,c;if(!r)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let f=[],m=new s(e);if(new d(t,{read:m.read.bind(m),error:function(e){n=e},metadata:function(e){h=e},gamma:function(e){p=e},palette:function(e){h.palette=e},transColor:function(e){h.transColor=e},inflateData:function(e){f.push(e)},simpleTransparency:function(){h.alpha=!0}}).start(),m.process(),n)throw n;let _=Buffer.concat(f);if(f.length=0,h.interlace)c=o.inflateSync(_);else{let e=((h.width*h.bpp*h.depth+7>>3)+1)*h.height;c=i(_,{chunkSize:e,maxLength:e})}if(_=null,!c||!c.length)throw Error("bad png - invalid inflate data response");let g=l.process(c,h);_=null;let b=a.dataToBitMap(g,h);g=null;let y=u(b,h);return h.data=y,h.gamma=p||0,h}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser.js"(e,t,n){let r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/constants.js"),o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/crc.js"),i=e.exports=function(e,t){this._options=e,e.checkCRC=!1!==e.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[r.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[r.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[r.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[r.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[r.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[r.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=t.read,this.error=t.error,this.metadata=t.metadata,this.gamma=t.gamma,this.transColor=t.transColor,this.palette=t.palette,this.parsed=t.parsed,this.inflateData=t.inflateData,this.finished=t.finished,this.simpleTransparency=t.simpleTransparency,this.headersFinished=t.headersFinished||function(){}};i.prototype.start=function(){this.read(r.PNG_SIGNATURE.length,this._parseSignature.bind(this))},i.prototype._parseSignature=function(e){let t=r.PNG_SIGNATURE;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return void this.error(Error("Invalid file signature"));this.read(8,this._parseChunkBegin.bind(this))},i.prototype._parseChunkBegin=function(e){let t=e.readUInt32BE(0),n=e.readUInt32BE(4),i="";for(let t=4;t<8;t++)i+=String.fromCharCode(e[t]);let s=!!(32&e[4]);return this._hasIHDR||n===r.TYPE_IHDR?(this._crc=new o,this._crc.write(Buffer.from(i)),this._chunks[n])?this._chunks[n](t):s?void this.read(t+4,this._skipChunk.bind(this)):void this.error(Error("Unsupported critical chunk type "+i)):void this.error(Error("Expected IHDR on beggining"))},i.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))},i.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))},i.prototype._parseChunkEnd=function(e){let t=e.readInt32BE(0),n=this._crc.crc32();this._options.checkCRC&&n!==t?this.error(Error("Crc error - "+t+" - "+n)):this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))},i.prototype._handleIHDR=function(e){this.read(e,this._parseIHDR.bind(this))},i.prototype._parseIHDR=function(e){this._crc.write(e);let t=e.readUInt32BE(0),n=e.readUInt32BE(4),o=e[8],i=e[9],s=e[10],l=e[11],d=e[12];if(8!==o&&4!==o&&2!==o&&1!==o&&16!==o)return void this.error(Error("Unsupported bit depth "+o));if(!(i in r.COLORTYPE_TO_BPP_MAP))return void this.error(Error("Unsupported color type"));if(0!==s)return void this.error(Error("Unsupported compression method"));if(0!==l)return void this.error(Error("Unsupported filter method"));if(0!==d&&1!==d)return void this.error(Error("Unsupported interlace method"));this._colorType=i;let a=r.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:t,height:n,depth:o,interlace:!!d,palette:!!(i&r.COLORTYPE_PALETTE),color:!!(i&r.COLORTYPE_COLOR),alpha:!!(i&r.COLORTYPE_ALPHA),bpp:a,colorType:i}),this._handleChunkEnd()},i.prototype._handlePLTE=function(e){this.read(e,this._parsePLTE.bind(this))},i.prototype._parsePLTE=function(e){this._crc.write(e);let t=Math.floor(e.length/3);for(let n=0;n<t;n++)this._palette.push([e[3*n],e[3*n+1],e[3*n+2],255]);this.palette(this._palette),this._handleChunkEnd()},i.prototype._handleTRNS=function(e){this.simpleTransparency(),this.read(e,this._parseTRNS.bind(this))},i.prototype._parseTRNS=function(e){if(this._crc.write(e),this._colorType===r.COLORTYPE_PALETTE_COLOR){if(0===this._palette.length)return void this.error(Error("Transparency chunk must be after palette"));if(e.length>this._palette.length)return void this.error(Error("More transparent colors than palette size"));for(let t=0;t<e.length;t++)this._palette[t][3]=e[t];this.palette(this._palette)}this._colorType===r.COLORTYPE_GRAYSCALE&&this.transColor([e.readUInt16BE(0)]),this._colorType===r.COLORTYPE_COLOR&&this.transColor([e.readUInt16BE(0),e.readUInt16BE(2),e.readUInt16BE(4)]),this._handleChunkEnd()},i.prototype._handleGAMA=function(e){this.read(e,this._parseGAMA.bind(this))},i.prototype._parseGAMA=function(e){this._crc.write(e),this.gamma(e.readUInt32BE(0)/r.GAMMA_DIVISION),this._handleChunkEnd()},i.prototype._handleIDAT=function(e){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-e,this._parseIDAT.bind(this,e))},i.prototype._parseIDAT=function(e,t){if(this._crc.write(t),this._colorType===r.COLORTYPE_PALETTE_COLOR&&0===this._palette.length)throw Error("Expected palette not found");this.inflateData(t);let n=e-t.length;n>0?this._handleIDAT(n):this._handleChunkEnd()},i.prototype._handleIEND=function(e){this.read(e,this._parseIEND.bind(this))},i.prototype._parseIEND=function(e){this._crc.write(e),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/png-sync.js"(e,t,n){let r=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser-sync.js"),o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer-sync.js");t.read=function(e,t){return r(e,t||{})},t.write=function(e,t){return o(e,t)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/png.js"(e,t,n){let r=n("util"),o=n("stream"),i=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/parser-async.js"),s=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/packer-async.js"),l=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/png-sync.js"),d=t.O=function(e){o.call(this),e=e||{},this.width=0|e.width,this.height=0|e.height,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,e.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new i(e),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",(function(e){this.data=e,this.emit("parsed",e)}).bind(this)),this._packer=new s(e),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};r.inherits(d,o),d.sync=l,d.prototype.pack=function(){return this.data&&this.data.length?process.nextTick((function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}).bind(this)):this.emit("error","No data provided"),this},d.prototype.parse=function(e,t){if(t){let e,n;e=(function(e){this.removeListener("error",n),this.data=e,t(null,this)}).bind(this),n=(function(n){this.removeListener("parsed",e),t(n,null)}).bind(this),this.once("parsed",e),this.once("error",n)}return this.end(e),this},d.prototype.write=function(e){return this._parser.write(e),!0},d.prototype.end=function(e){this._parser.end(e)},d.prototype._metadata=function(e){this.width=e.width,this.height=e.height,this.emit("metadata",e)},d.prototype._gamma=function(e){this.gamma=e},d.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},d.bitblt=function(e,t,n,r,o,i,s,l){if(r|=0,o|=0,i|=0,s|=0,l|=0,(n|=0)>e.width||r>e.height||n+o>e.width||r+i>e.height)throw Error("bitblt reading outside image");if(s>t.width||l>t.height||s+o>t.width||l+i>t.height)throw Error("bitblt writing outside image");for(let d=0;d<i;d++)e.data.copy(t.data,(l+d)*t.width+s<<2,(r+d)*e.width+n<<2,(r+d)*e.width+n+o<<2)},d.prototype.bitblt=function(e,t,n,r,o,i,s){return d.bitblt(this,e,t,n,r,o,i,s),this},d.adjustGamma=function(e){if(e.gamma){for(let t=0;t<e.height;t++)for(let n=0;n<e.width;n++){let r=e.width*t+n<<2;for(let t=0;t<3;t++){let n=e.data[r+t]/255;n=Math.pow(n,1/2.2/e.gamma),e.data[r+t]=Math.round(255*n)}}e.gamma=0}},d.prototype.adjustGamma=function(){d.adjustGamma(this)}},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/sync-inflate.js"(e,t,n){let r=n("assert").ok,o=n("zlib"),i=n("util"),s=n("buffer").kMaxLength;function l(e){if(!(this instanceof l))return new l(e);e&&e.chunkSize<o.Z_MIN_CHUNK&&(e.chunkSize=o.Z_MIN_CHUNK),o.Inflate.call(this,e),this._offset=void 0===this._offset?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,e&&null!=e.maxLength&&(this._maxLength=e.maxLength)}function d(e,t){t&&process.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function a(e,t){var n=new l(t),r=e;if("string"==typeof r&&(r=Buffer.from(r)),!(r instanceof Buffer))throw TypeError("Not a string or buffer");let i=n._finishFlushFlag;return null==i&&(i=o.Z_FINISH),n._processChunk(r,i)}l.prototype._processChunk=function(e,t,n){let i,l;if("function"==typeof n)return o.Inflate._processChunk.call(this,e,t,n);let a=this,u=e&&e.length,h=this._chunkSize-this._offset,p=this._maxLength,c=0,f=[],m=0;this.on("error",function(e){i=e}),r(this._handle,"zlib binding closed");do l=(l=this._handle.writeSync(t,e,c,u,this._buffer,this._offset,h))||this._writeState;while(!this._hadError&&function(e,t){if(a._hadError)return;let n=h-t;if(r(n>=0,"have should not go down"),n>0){let e=a._buffer.slice(a._offset,a._offset+n);if(a._offset+=n,e.length>p&&(e=e.slice(0,p)),f.push(e),m+=e.length,0==(p-=e.length))return!1}return(0===t||a._offset>=a._chunkSize)&&(h=a._chunkSize,a._offset=0,a._buffer=Buffer.allocUnsafe(a._chunkSize)),0===t&&(c+=u-e,u=e,!0)}(l[0],l[1]));if(this._hadError)throw i;if(m>=s)throw d(this),RangeError("Cannot create final Buffer. It would be larger than 0x"+s.toString(16)+" bytes");let _=Buffer.concat(f,m);return d(this),_},i.inherits(l,o.Inflate),e.exports=t=a,t.Inflate=l,t.createInflate=function(e){return new l(e)},t.inflateSync=a},"../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/sync-reader.js"(e){let t=e.exports=function(e){this._buffer=e,this._reads=[]};t.prototype.read=function(e,t){this._reads.push({length:Math.abs(e),allowLess:e<0,func:t})},t.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let e=this._reads[0];if(this._buffer.length&&(this._buffer.length>=e.length||e.allowLess)){this._reads.shift();let t=this._buffer;this._buffer=t.slice(e.length),e.func.call(this,t.slice(0,e.length))}else break}return this._reads.length>0?Error("There are some read requests waitng on finished stream"):this._buffer.length>0?Error("unrecognised content at end of stream"):void 0}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js"),o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js"),i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js"),s=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js");function l(e,t,n,i,s){let l=[].slice.call(arguments,1),d=l.length,a="function"==typeof l[d-1];if(!a&&!r())throw Error("Callback required as last argument");if(a){if(d<2)throw Error("Too few arguments provided");2===d?(s=n,n=t,t=i=void 0):3===d&&(t.getContext&&void 0===s?(s=i,i=void 0):(s=i,i=n,n=t,t=void 0))}else{if(d<1)throw Error("Too few arguments provided");return 1===d?(n=t,t=i=void 0):2!==d||t.getContext||(i=n,n=t,t=void 0),new Promise(function(r,s){try{let s=o.create(n,i);r(e(s,t,i))}catch(e){s(e)}})}try{let r=o.create(n,i);s(null,e(r,t,i))}catch(e){s(e)}}o.create,l.bind(null,i.render),l.bind(null,i.renderToDataURL),l.bind(null,function(e,t,n){return s.render(e,n)})},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js"(e){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js").getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];let t=Math.floor(e/7)+2,n=r(e),o=145===n?26:2*Math.ceil((n-13)/(2*t-2)),i=[n-7];for(let e=1;e<t-1;e++)i[e]=i[e-1]-o;return i.push(6),i.reverse()},t.getPositions=function(e){let n=[],r=t.getRowColCoords(e),o=r.length;for(let e=0;e<o;e++)for(let t=0;t<o;t++)(0!==e||0!==t)&&(0!==e||t!==o-1)&&(e!==o-1||0!==t)&&n.push([r[e],r[t]]);return n}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(e){this.mode=r.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*o.indexOf(this.data[t]);n+=o.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(o.indexOf(this.data[t]),6)},e.exports=i},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js"(e){function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js"(e){function t(e){if(!e||e<1)throw Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,n,r){let o=e*this.size+t;this.data[o]=n,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js");function o(e){this.mode=r.BYTE,"string"==typeof e?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}o.getBitsLength=function(e){return 8*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},e.exports=o},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js"),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case r.L:return o[(e-1)*4+0];case r.M:return o[(e-1)*4+1];case r.Q:return o[(e-1)*4+2];case r.H:return o[(e-1)*4+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return i[(e-1)*4+0];case r.M:return i[(e-1)*4+1];case r.Q:return i[(e-1)*4+2];case r.H:return i[(e-1)*4+3];default:return}}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js"(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw Error("Unknown EC Level: "+e)}}catch(e){return n}}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js").getSymbolSize;t.getPositions=function(e){let t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js"),o=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){let n=e.bit<<3|t,i=n<<10;for(;r.getBCHDigit(i)-o>=0;)i^=1335<<r.getBCHDigit(i)-o;return(n<<10|i)^21522}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js"(e,t){let n=new Uint8Array(512),r=new Uint8Array(256),o=1;for(let e=0;e<255;e++)n[e]=o,r[o]=e,256&(o<<=1)&&(o^=285);for(let e=255;e<512;e++)n[e]=n[e-255];t.exp=function(e){return n[e]},t.mul=function(e,t){return 0===e||0===t?0:n[r[e]+r[t]]}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"),o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js");function i(e){this.mode=r.KANJI,this.data=e}i.getBitsLength=function(e){return 13*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=o.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n=(n>>>8&255)*192+(255&n),e.put(n,13)}},e.exports=i},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js"(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){let t=e.size,n=0,r=0,o=0,i=null,s=null;for(let l=0;l<t;l++){r=o=0,i=s=null;for(let d=0;d<t;d++){let t=e.get(l,d);t===i?r++:(r>=5&&(n+=3+(r-5)),i=t,r=1),(t=e.get(d,l))===s?o++:(o>=5&&(n+=3+(o-5)),s=t,o=1)}r>=5&&(n+=3+(r-5)),o>=5&&(n+=3+(o-5))}return n},t.getPenaltyN2=function(e){let t=e.size,n=0;for(let r=0;r<t-1;r++)for(let o=0;o<t-1;o++){let t=e.get(r,o)+e.get(r,o+1)+e.get(r+1,o)+e.get(r+1,o+1);(4===t||0===t)&&n++}return 3*n},t.getPenaltyN3=function(e){let t=e.size,n=0,r=0,o=0;for(let i=0;i<t;i++){r=o=0;for(let s=0;s<t;s++)r=r<<1&2047|e.get(i,s),s>=10&&(1488===r||93===r)&&n++,o=o<<1&2047|e.get(s,i),s>=10&&(1488===o||93===o)&&n++}return 40*n},t.getPenaltyN4=function(e){let t=0,n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return 10*Math.abs(Math.ceil(100*t/n/5)-10)},t.applyMask=function(e,n){let r=n.size;for(let o=0;o<r;o++)for(let i=0;i<r;i++)n.isReserved(i,o)||n.xor(i,o,function(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error("bad maskPattern:"+e)}}(e,i,o))},t.getBestMask=function(e,n){let r=Object.keys(t.Patterns).length,o=0,i=1/0;for(let s=0;s<r;s++){n(s),t.applyMask(s,e);let r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(s,e),r<i&&(i=r,o=s)}return o}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js"),o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js");t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw Error("Invalid mode: "+e);if(!r.isValid(t))throw Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return o.testNumeric(e)?t.NUMERIC:o.testAlphanumeric(e)?t.ALPHANUMERIC:o.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw Error("Unknown mode: "+e)}}catch(e){return n}}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js");function o(e){this.mode=r.NUMERIC,this.data=e.toString()}o.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t,n;for(t=0;t+3<=this.data.length;t+=3)n=parseInt(this.data.substr(t,3),10),e.put(n,10);let r=this.data.length-t;r>0&&(n=parseInt(this.data.substr(t),10),e.put(n,3*r+1))},e.exports=o},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js");t.mul=function(e,t){let n=new Uint8Array(e.length+t.length-1);for(let o=0;o<e.length;o++)for(let i=0;i<t.length;i++)n[o+i]^=r.mul(e[o],t[i]);return n},t.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){let e=n[0];for(let o=0;o<t.length;o++)n[o]^=r.mul(t[o],e);let o=0;for(;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},t.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let o=0;o<e;o++)n=t.mul(n,new Uint8Array([1,r.exp(o)]));return n}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js"),o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js"),i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js"),s=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js"),l=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js"),d=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js"),a=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js"),u=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js"),h=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js"),p=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js"),c=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js"),f=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"),m=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js");function _(e,t,n){let r,o,i=e.size,s=c.getEncodedBits(t,n);for(r=0;r<15;r++)o=(s>>r&1)==1,r<6?e.set(r,8,o,!0):r<8?e.set(r+1,8,o,!0):e.set(i-15+r,8,o,!0),r<8?e.set(8,i-r-1,o,!0):r<9?e.set(8,15-r-1+1,o,!0):e.set(8,15-r-1,o,!0);e.set(i-8,8,1,!0)}t.create=function(e,t){let n,c;if(void 0===e||""===e)throw Error("No input text");let g=o.M;return void 0!==t&&(g=o.from(t.errorCorrectionLevel,o.M),n=p.from(t.version),c=a.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),function(e,t,n,o){let c;if(Array.isArray(e))c=m.fromArray(e);else if("string"==typeof e){let r=t;if(!r){let t=m.rawSplit(e);r=p.getBestVersionForData(t,n)}c=m.fromString(e,r||40)}else throw Error("Invalid data");let g=p.getBestVersionForData(c,n);if(!g)throw Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<g)throw Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+g+".\n")}else t=g;let b=function(e,t,n){let o=new i;n.forEach(function(t){o.put(t.mode.bit,4),o.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(o)});let s=(r.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t))*8;for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);let l=(s-o.getLengthInBits())/8;for(let e=0;e<l;e++)o.put(e%2?17:236,8);return function(e,t,n){let o,i,s=r.getSymbolTotalCodewords(t),l=s-u.getTotalCodewordsCount(t,n),d=u.getBlocksCount(t,n),a=s%d,p=d-a,c=Math.floor(s/d),f=Math.floor(l/d),m=f+1,_=c-f,g=new h(_),b=0,y=Array(d),j=Array(d),E=0,w=new Uint8Array(e.buffer);for(let e=0;e<d;e++){let t=e<p?f:m;y[e]=w.slice(b,b+t),j[e]=g.encode(y[e]),b+=t,E=Math.max(E,t)}let T=new Uint8Array(s),C=0;for(o=0;o<E;o++)for(i=0;i<d;i++)o<y[i].length&&(T[C++]=y[i][o]);for(o=0;o<_;o++)for(i=0;i<d;i++)T[C++]=j[i][o];return T}(o,e,t)}(t,n,c),y=new s(r.getSymbolSize(t));!function(e,t){let n=e.size,r=d.getPositions(t);for(let t=0;t<r.length;t++){let o=r[t][0],i=r[t][1];for(let t=-1;t<=7;t++)if(!(o+t<=-1)&&!(n<=o+t))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+r||(t>=0&&t<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===t||6===t)||t>=2&&t<=4&&r>=2&&r<=4?e.set(o+t,i+r,!0,!0):e.set(o+t,i+r,!1,!0))}}(y,t);let j=y.size;for(let e=8;e<j-8;e++){let t=e%2==0;y.set(e,6,t,!0),y.set(6,e,t,!0)}return!function(e,t){let n=l.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],o=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(r+t,o+n,!0,!0):e.set(r+t,o+n,!1,!0)}}(y,t),_(y,n,0),t>=7&&function(e,t){let n,r,o,i=e.size,s=p.getEncodedBits(t);for(let t=0;t<18;t++)n=Math.floor(t/3),r=t%3+i-8-3,o=(s>>t&1)==1,e.set(n,r,o,!0),e.set(r,n,o,!0)}(y,t),!function(e,t){let n=e.size,r=-1,o=n-1,i=7,s=0;for(let l=n-1;l>0;l-=2)for(6===l&&l--;;){for(let n=0;n<2;n++)if(!e.isReserved(o,l-n)){let r=!1;s<t.length&&(r=(t[s]>>>i&1)==1),e.set(o,l-n,r),-1==--i&&(s++,i=7)}if((o+=r)<0||n<=o){o-=r,r=-r;break}}}(y,b),isNaN(o)&&(o=a.getBestMask(y,_.bind(null,y,n))),a.applyMask(o,y),_(y,n,o),{modules:y,version:t,errorCorrectionLevel:n,maskPattern:o,segments:c}}(e,n,g,c)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js");function o(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(e){if(!this.genPoly)throw Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let n=r.mod(t,this.genPoly),o=this.degree-n.length;if(o>0){let e=new Uint8Array(this.degree);return e.set(n,o),e}return n},e.exports=o},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js"(e,t){let n="[0-9]+",r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",o="(?:(?![A-Z0-9 $%*+\\-./:]|"+(r=r.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=RegExp(r,"g"),t.BYTE_KANJI=RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=RegExp(o,"g"),t.NUMERIC=RegExp(n,"g"),t.ALPHANUMERIC=RegExp("[A-Z $%*+\\-./:]+","g");let i=RegExp("^"+r+"$"),s=RegExp("^"+n+"$"),l=RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return i.test(e)},t.testNumeric=function(e){return s.test(e)},t.testAlphanumeric=function(e){return l.test(e)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"),o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js"),i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js"),s=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js"),l=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js"),d=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js"),a=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js"),u=n("../../../node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js");function h(e){return unescape(encodeURIComponent(e)).length}function p(e,t,n){let r,o=[];for(;null!==(r=e.exec(n));)o.push({data:r[0],index:r.index,mode:t,length:r[0].length});return o}function c(e){let t,n,o=p(d.NUMERIC,r.NUMERIC,e),i=p(d.ALPHANUMERIC,r.ALPHANUMERIC,e);return a.isKanjiModeEnabled()?(t=p(d.BYTE,r.BYTE,e),n=p(d.KANJI,r.KANJI,e)):(t=p(d.BYTE_KANJI,r.BYTE,e),n=[]),o.concat(i,t,n).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,t){switch(t){case r.NUMERIC:return o.getBitsLength(e);case r.ALPHANUMERIC:return i.getBitsLength(e);case r.KANJI:return l.getBitsLength(e);case r.BYTE:return s.getBitsLength(e)}}function m(e,t){let n,d=r.getBestModeForData(e);if((n=r.from(t,d))!==r.BYTE&&n.bit<d.bit)throw Error('"'+e+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(d));switch(n===r.KANJI&&!a.isKanjiModeEnabled()&&(n=r.BYTE),n){case r.NUMERIC:return new o(e);case r.ALPHANUMERIC:return new i(e);case r.KANJI:return new l(e);case r.BYTE:return new s(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e},[])},t.fromString=function(e,n){let o=function(e,t){let n={},o={start:{}},i=["start"];for(let s=0;s<e.length;s++){let l=e[s],d=[];for(let e=0;e<l.length;e++){let a=l[e],u=""+s+e;d.push(u),n[u]={node:a,lastCount:0},o[u]={};for(let e=0;e<i.length;e++){let s=i[e];n[s]&&n[s].node.mode===a.mode?(o[s][u]=f(n[s].lastCount+a.length,a.mode)-f(n[s].lastCount,a.mode),n[s].lastCount+=a.length):(n[s]&&(n[s].lastCount=a.length),o[s][u]=f(a.length,a.mode)+4+r.getCharCountIndicator(a.mode,t))}}i=d}for(let e=0;e<i.length;e++)o[i[e]].end=0;return{map:o,table:n}}(function(e){let t=[];for(let n=0;n<e.length;n++){let o=e[n];switch(o.mode){case r.NUMERIC:t.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:t.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:t.push([o,{data:o.data,mode:r.BYTE,length:h(o.data)}]);break;case r.BYTE:t.push([{data:o.data,mode:r.BYTE,length:h(o.data)}])}}return t}(c(e,a.isKanjiModeEnabled())),n),i=u.find_path(o.map,"start","end"),s=[];for(let e=1;e<i.length-1;e++)s.push(o.table[i[e]].node);return t.fromArray(s.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?e[e.length-1].data+=t.data:e.push(t),e},[]))},t.rawSplit=function(e){return t.fromArray(c(e,a.isKanjiModeEnabled()))}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js"(e,t){let n,r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw Error('"version" cannot be null or undefined');if(e<1||e>40)throw Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return void 0!==n},t.toSJIS=function(e){return n(e)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js"(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js"),o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js"),i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js"),s=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js"),l=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js"),d=r.getBCHDigit(7973);function a(e,t){return s.getCharCountIndicator(e,t)+4}t.from=function(e,t){return l.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!l.isValid(e))throw Error("Invalid QR Code version");void 0===n&&(n=s.BYTE);let i=(r.getSymbolTotalCodewords(e)-o.getTotalCodewordsCount(e,t))*8;if(n===s.MIXED)return i;let d=i-a(n,e);switch(n){case s.NUMERIC:return Math.floor(d/10*3);case s.ALPHANUMERIC:return Math.floor(d/11*2);case s.KANJI:return Math.floor(d/13);case s.BYTE:default:return Math.floor(d/8)}},t.getBestVersionForData=function(e,n){let r,o=i.from(n,i.M);if(Array.isArray(e)){if(e.length>1){for(let n=1;n<=40;n++)if(function(e,t){let n=0;return e.forEach(function(e){let r=a(e.mode,t);n+=r+e.getBitsLength()}),n}(e,n)<=t.getCapacity(n,o,s.MIXED))return n;return}if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let o=1;o<=40;o++)if(n<=t.getCapacity(o,r,e))return o}(r.mode,r.getLength(),o)},t.getEncodedBits=function(e){if(!l.isValid(e)||e<7)throw Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-d>=0;)t^=7973<<r.getBCHDigit(t)-d;return e<<12|t}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/index.js"(e,t,n){e.exports=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/server.js")},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js");t.render=function(e,t,n){var o;let i=n,s=t;void 0!==i||t&&t.getContext||(i=t,t=void 0),t||(s=function(){try{return document.createElement("canvas")}catch(e){throw Error("You need to specify a canvas element")}}()),i=r.getOptions(i);let l=r.getImageWidth(e.modules.size,i),d=s.getContext("2d"),a=d.createImageData(l,l);return r.qrToImageData(a.data,e,i),o=s,d.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=l,o.width=l,o.style.height=l+"px",o.style.width=l+"px",d.putImageData(a,0,0),s},t.renderToDataURL=function(e,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});let i=t.render(e,n,o),s=o.type||"image/png",l=o.rendererOpts||{};return i.toDataURL(s,l.quality)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/png.js"(e,t,n){let r=n("fs"),o=n("../../../node_modules/.pnpm/pngjs@5.0.0/node_modules/pngjs/lib/png.js").O,i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js");t.render=function(e,t){let n=i.getOptions(t),r=n.rendererOpts,s=i.getImageWidth(e.modules.size,n);r.width=s,r.height=s;let l=new o(r);return i.qrToImageData(l.data,e,n),l},t.renderToDataURL=function(e,n,r){void 0===r&&(r=n,n=void 0),t.renderToBuffer(e,n,function(e,t){e&&r(e);let n="data:image/png;base64,";n+=t.toString("base64"),r(null,n)})},t.renderToBuffer=function(e,n,r){void 0===r&&(r=n,n=void 0);let o=t.render(e,n),i=[];o.on("error",r),o.on("data",function(e){i.push(e)}),o.on("end",function(){r(null,Buffer.concat(i))}),o.pack()},t.renderToFile=function(e,n,o,i){void 0===i&&(i=o,o=void 0);let s=!1,l=(...e)=>{s||(s=!0,i.apply(null,e))},d=r.createWriteStream(e);d.on("error",l),d.on("close",l),t.renderToFileStream(d,n,o)},t.renderToFileStream=function(e,n,r){t.render(n,r).pack().pipe(e)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js");function o(e,t){let n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(e,t,n){let r=e+t;return void 0!==n&&(r+=" "+n),r}t.render=function(e,t,n){let s=r.getOptions(t),l=e.modules.size,d=e.modules.data,a=l+2*s.margin,u=s.color.light.a?"<path "+o(s.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",h="<path "+o(s.color.dark,"stroke")+' d="'+function(e,t,n){let r="",o=0,s=!1,l=0;for(let d=0;d<e.length;d++){let a=Math.floor(d%t),u=Math.floor(d/t);a||s||(s=!0),e[d]?(l++,d>0&&a>0&&e[d-1]||(r+=s?i("M",a+n,.5+u+n):i("m",o,0),o=0,s=!1),a+1<t&&e[d+1]||(r+=i("h",l),l=0)):o++}return r}(d,l,s.margin)+'"/>',p='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+('viewBox="0 0 '+a+" ")+a+'" shape-rendering="crispEdges">'+u+h+"</svg>\n";return"function"==typeof n&&n(null,p),p}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg.js"(e,t,n){t.render=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js").render,t.renderToFile=function(e,r,o,i){void 0===i&&(i=o,o=void 0);let s=n("fs"),l=t.render(r,o);s.writeFile(e,'<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">'+l,i)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal/terminal.js"),o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal/terminal-small.js");t.render=function(e,t,n){return t&&t.small?o.render(e,t,n):r.render(e,t,n)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal/terminal-small.js"(e,t){let n="\x1b[37m",r="\x1b[30m",o="\x1b[0m",i="\x1b[47m"+r,s="\x1b[40m"+n,l=function(e,t,n,r){let o=t+1;return n>=o||r>=o||r<-1||n<-1?"0":n>=t||r>=t||r<0||n<0?"1":e[r*t+n]?"2":"1"},d=function(e,t,n,r){return l(e,t,n,r)+l(e,t,n,r+1)};t.render=function(e,t,l){var a,u;let h=e.modules.size,p=e.modules.data,c=!!(t&&t.inverse),f=t&&t.inverse?s:i,m={"00":o+" "+f,"01":o+(a=c?r:n)+"▄"+f,"02":o+(u=c?n:r)+"▄"+f,10:o+a+"▀"+f,11:" ",12:"▄",20:o+u+"▀"+f,21:"▀",22:"█"},_=o+"\n"+f,g=f;for(let e=-1;e<h+1;e+=2){for(let t=-1;t<h;t++)g+=m[d(p,h,t,e)];g+=m[d(p,h,h,e)]+_}return g+=o,"function"==typeof l&&l(null,g),g}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal/terminal.js"(e,t){t.render=function(e,t,n){let r=e.modules.size,o=e.modules.data,i="\x1b[47m \x1b[0m",s="",l=Array(r+3).join(i),d=[,,].join(i);s+=l+"\n";for(let e=0;e<r;++e){s+=i;for(let t=0;t<r;t++)s+=o[e*r+t]?"\x1b[40m \x1b[0m":i;s+=d+"\n"}return s+=l+"\n","function"==typeof n&&n(null,s),s}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utf8.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js"),o={WW:" ",WB:"▄",BB:"█",BW:"▀"},i={BB:" ",BW:"▄",WW:"█",WB:"▀"};t.render=function(e,t,n){let s=r.getOptions(t),l=o;("#ffffff"===s.color.dark.hex||"#000000"===s.color.light.hex)&&(l=i);let d=e.modules.size,a=e.modules.data,u="",h=Array(d+2*s.margin+1).join(l.WW);h=Array(s.margin/2+1).join(h+"\n");let p=Array(s.margin+1).join(l.WW);u+=h;for(let e=0;e<d;e+=2){u+=p;for(let t=0;t<d;t++){var c;let n=a[e*d+t],r=a[(e+1)*d+t];u+=(c=l,n&&r?c.BB:n&&!r?c.BW:!n&&r?c.WB:c.WW)}u+=p+"\n"}return u+=h.slice(0,-1),"function"==typeof n&&n(null,u),u},t.renderToFile=function(e,r,o,i){void 0===i&&(i=o,o=void 0);let s=n("fs"),l=t.render(r,o);s.writeFile(e,l,i)}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js"(e,t){function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw Error("Invalid hex color: "+e);(3===t.length||4===t.length)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");let n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});let t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,o=e.scale||4;return{width:r,scale:r?4:o,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){let r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){let o=n.modules.size,i=n.modules.data,s=t.getScale(o,r),l=Math.floor((o+2*r.margin)*s),d=r.margin*s,a=[r.color.light,r.color.dark];for(let t=0;t<l;t++)for(let n=0;n<l;n++){let u=(t*l+n)*4,h=r.color.light;t>=d&&n>=d&&t<l-d&&n<l-d&&(h=a[+!!i[Math.floor((t-d)/s)*o+Math.floor((n-d)/s)]]),e[u++]=h.r,e[u++]=h.g,e[u++]=h.b,e[u]=h.a}}},"../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/server.js"(e,t,n){let r=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js"),o=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js"),i=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/png.js"),s=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utf8.js"),l=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/terminal.js"),d=n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg.js");function a(e,t,n){if(void 0===e)throw Error("String required as first argument");if(void 0===n&&(n=t,t={}),"function"!=typeof n)if(r())t=n||{},n=null;else throw Error("Callback required as last argument");return{opts:t,cb:n}}function u(e){switch(e){case"svg":return d;case"txt":case"utf8":return s;default:return i}}function h(e,t,n){if(!n.cb)return new Promise(function(r,i){try{let s=o.create(t,n.opts);return e(s,n.opts,function(e,t){return e?i(e):r(t)})}catch(e){i(e)}});try{let r=o.create(t,n.opts);return e(r,n.opts,n.cb)}catch(e){n.cb(e)}}t.create=o.create,n("../../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js"),t.toString=function(e,t,n){let r=a(e,t,n);return h(function(e){switch(e){case"svg":return d;case"terminal":return l;default:return s}}(r.opts?r.opts.type:void 0).render,e,r)},t.toBuffer=function(e,t,n){let r=a(e,t,n);return h(u(r.opts.type).renderToBuffer,e,r)},t.toFile=function(e,t,n,o){if("string"!=typeof e||"string"!=typeof t&&"object"!=typeof t)throw Error("Invalid argument");if(arguments.length<3&&!r())throw Error("Too few arguments provided");let i=a(t,n,o);return h(u(i.opts.type||e.slice((e.lastIndexOf(".")-1>>>0)+2).toLowerCase()).renderToFile.bind(null,e),t,i)}}});
package/dist/report.js CHANGED
@@ -1 +1 @@
1
- import"node:module";import{__webpack_require__ as t}from"./rslib-runtime.js";import"./7945.js";import{readJsonIfExists as e}from"./json-file.js";import{listRuns as r,normalizeProjectPath as o}from"./run-registry.js";import{runCommand as n,command_Command as i,isRecord as a}from"./2168.js";import{dist as s}from"./@inquirer/select.js";import{openUrlInBrowser as u}from"./browser.js";var p={};t.r(p),t.d(p,{default:()=>R,executeEvalReport:()=>j,formatReportChoice:()=>K});let c=t("node:fs"),l=t("node:path");function d(t){let r=e(t);return a(r)?r:void 0}function f(t,e){let r=t?.[e];return a(r)?r:void 0}function m(t,e){let r=t?.[e];return"string"==typeof r?r:void 0}function _(t,e){let r=t?.[e];return"number"==typeof r?r:void 0}function v(t){return t?.trim()||void 0}function h(t){return void 0!==t&&Number.isInteger(t)&&t>=0?t:void 0}function C(t){return t&&Number.isFinite(Date.parse(t))?t:void 0}function S(t){let e=Date.parse(t);return Number.isFinite(e)?e:0}let g=t("node:url"),$={listReports:function(t,e=r()){let n=o(t),i=[];for(let t of e){var a,s;let e=(0,l.resolve)(t.outputDir),r=(0,l.join)(e,"report.html");if(!(0,c.existsSync)(r))continue;let u=d((0,l.join)(e,"state.json")),p=v(t.projectPath)??v(m(f(u,"config"),"projectPath"));if(!p||o(p)!==n)continue;let S=d((0,l.join)(e,"report.json")),g=f(S,"summary"),$=f(S,"metadata"),R=C(m(u,"createdAt"))??C(t.createdAt)??t.createdAt,j=v(m($,"skill_name"))??function(t){let e=f(t,"config");return v(m(f(e,"skill"),"name"))}(u),K=void 0!==(a=_(g,"total_duration_ms"))&&Number.isFinite(a)&&a>=0?a:void 0,N=void 0!==(s=_(g,"pass_rate"))&&Number.isFinite(s)&&s>=0&&s<=1?s:void 0,P=h(_(g,"passed_cases")),A=h(_(g,"total_cases"));i.push({runId:t.runId,outputDir:e,reportPath:r,createdAt:R,...j?{skillName:j}:{},...void 0===K?{}:{durationMs:K},...void 0===N?{}:{passRate:N},...void 0===P?{}:{passedCases:P},...void 0===A?{}:{totalCases:A}})}return i.sort((t,e)=>S(e.createdAt)-S(t.createdAt)||e.runId.localeCompare(t.runId))},chooseReport:t=>s(t,{output:process.stderr}),openBrowser:u,isInteractive:()=>!!process.stdin.isTTY&&!!process.stderr.isTTY};function R(){return new i("report").description("List and open evaluation reports for the current project").option("--project-path <path>","dbx project path",".").action(async(t,e)=>n(e,e=>j(t,e)))}async function j(t,e,r=$){let o,n=(0,l.resolve)(t.projectPath),i=r.listReports(n);if(e.json)return i;if(0===i.length)return void e.log("当前项目没有可用的评测报告");r.isInteractive()||e.error("dbx eval report requires an interactive terminal. Use --json to list reports without prompting.");try{o=await r.chooseReport({message:`Select an Eval report for ${n}`,choices:i.map(t=>({name:K(t),value:t.reportPath,short:t.runId})),pageSize:10,loop:!1})}catch(t){if(t instanceof Error&&"ExitPromptError"===t.name)return;throw t}let a=i.find(t=>t.reportPath===o);a||e.error("选中的评测报告已不可用"),e.log("正在打开评测报告");try{await r.openBrowser((0,g.pathToFileURL)(a.reportPath).href)}catch(t){e.warn("无法自动打开浏览器,请在评测输出目录中手动打开 report.html。")}}function K(t){var e;let r;return[Number.isFinite((r=new Date(e=t.createdAt)).getTime())?`${r.getFullYear()}-${N(r.getMonth()+1)}-${N(r.getDate())} ${N(r.getHours())}:${N(r.getMinutes())}`:e||"--",t.skillName||"--",function(t){if(void 0===t)return"--";if(t<1e3)return`${t}ms`;let e=Math.floor(t/1e3),r=Math.floor(e/3600),o=Math.floor(e%3600/60),n=e%60;return r>0?`${r}h ${o}m ${n}s`:o>0?`${o}m ${n}s`:`${e}s`}(t.durationMs),function(t){if(void 0===t.passRate)return"--";let e=`${(100*t.passRate).toFixed(1)}%`;return void 0===t.passedCases||void 0===t.totalCases?e:`${e} (${t.passedCases}/${t.totalCases})`}(t),t.runId].join(" | ")}function N(t){return String(t).padStart(2,"0")}export{p as report_namespaceObject};
1
+ import"node:module";import{__webpack_require__ as t}from"./rslib-runtime.js";import"./1264.js";import{readJsonIfExists as e}from"./json-file.js";import{listRuns as r,normalizeProjectPath as o}from"./run-registry.js";import{runCommand as n,command_Command as i,isRecord as a}from"./2232.js";import{dist as s}from"./@inquirer/select.js";import{openUrlInBrowser as u}from"./browser.js";var p={};t.r(p),t.d(p,{default:()=>R,executeEvalReport:()=>K,formatReportChoice:()=>N});let c=t("node:fs"),d=t("node:path");function l(t){let r=e(t);return a(r)?r:void 0}function f(t,e){let r=t?.[e];return a(r)?r:void 0}function m(t,e){let r=t?.[e];return"string"==typeof r?r:void 0}function _(t,e){let r=t?.[e];return"number"==typeof r?r:void 0}function v(t){return t?.trim()||void 0}function h(t){return void 0!==t&&Number.isInteger(t)&&t>=0?t:void 0}function C(t){return t&&Number.isFinite(Date.parse(t))?t:void 0}function S(t){let e=Date.parse(t);return Number.isFinite(e)?e:0}let $=t("node:url"),g={listReports:function(t,e=r()){let n=o(t),i=[];for(let t of e){var a,s;let e=(0,d.resolve)(t.outputDir),r=(0,d.join)(e,"report.html");if(!(0,c.existsSync)(r))continue;let u=l((0,d.join)(e,"state.json")),p=v(t.projectPath)??v(m(f(u,"config"),"projectPath"));if(!p||o(p)!==n)continue;let S=l((0,d.join)(e,"report.json")),$=f(S,"summary"),g=f(S,"metadata"),R=C(m(u,"createdAt"))??C(t.createdAt)??t.createdAt,K=v(m(g,"skill_name"))??function(t){let e=f(t,"config");return v(m(f(e,"skill"),"name"))}(u),N=void 0!==(a=_($,"total_duration_ms"))&&Number.isFinite(a)&&a>=0?a:void 0,P=void 0!==(s=_($,"pass_rate"))&&Number.isFinite(s)&&s>=0&&s<=1?s:void 0,j=h(_($,"passed_cases")),A=h(_($,"total_cases"));i.push({runId:t.runId,outputDir:e,reportPath:r,createdAt:R,...K?{skillName:K}:{},...void 0===N?{}:{durationMs:N},...void 0===P?{}:{passRate:P},...void 0===j?{}:{passedCases:j},...void 0===A?{}:{totalCases:A}})}return i.sort((t,e)=>S(e.createdAt)-S(t.createdAt)||e.runId.localeCompare(t.runId))},chooseReport:t=>s(t,{output:process.stderr}),openBrowser:u,isInteractive:()=>!!process.stdin.isTTY&&!!process.stderr.isTTY};function R(){return new i("report").description("列出并打开当前项目的评测报告").option("--project-path <path>","dbx 项目路径",".").action(async(t,e)=>n(e,e=>K(t,e)))}async function K(t,e,r=g){let o,n=(0,d.resolve)(t.projectPath),i=r.listReports(n);if(e.json)return i;if(0===i.length)return void e.log("当前项目没有可用的评测报告");r.isInteractive()||e.error("dbx eval report 需要交互式终端。可使用 --json 直接列出报告。");try{o=await r.chooseReport({message:`选择 ${n} 的评测报告`,choices:i.map(t=>({name:N(t),value:t.reportPath,short:t.runId})),pageSize:10,loop:!1})}catch(t){if(t instanceof Error&&"ExitPromptError"===t.name)return;throw t}let a=i.find(t=>t.reportPath===o);a||e.error("选中的评测报告已不可用"),e.log("正在打开评测报告");try{await r.openBrowser((0,$.pathToFileURL)(a.reportPath).href)}catch(t){e.warn("无法自动打开浏览器,请在评测输出目录中手动打开 report.html。")}}function N(t){var e;let r;return[Number.isFinite((r=new Date(e=t.createdAt)).getTime())?`${r.getFullYear()}-${P(r.getMonth()+1)}-${P(r.getDate())} ${P(r.getHours())}:${P(r.getMinutes())}`:e||"--",t.skillName||"--",function(t){if(void 0===t)return"--";if(t<1e3)return`${t}ms`;let e=Math.floor(t/1e3),r=Math.floor(e/3600),o=Math.floor(e%3600/60),n=e%60;return r>0?`${r}h ${o}m ${n}s`:o>0?`${o}m ${n}s`:`${e}s`}(t.durationMs),function(t){if(void 0===t.passRate)return"--";let e=`${(100*t.passRate).toFixed(1)}%`;return void 0===t.passedCases||void 0===t.totalCases?e:`${e} (${t.passedCases}/${t.totalCases})`}(t),t.runId].join(" | ")}function P(t){return String(t).padStart(2,"0")}export{p as report_namespaceObject};
@@ -1 +1 @@
1
- import"node:module";import{__webpack_require__ as r}from"./rslib-runtime.js";import"./7945.js";import{atomicWriteJson as t}from"./json-file.js";import{isRecord as e}from"./2168.js";let n=r("node:fs"),o=r("node:os"),i=r("node:path"),u=(0,i.join)((0,o.homedir)(),".dbx","eval-runs"),s=(0,i.join)(u,"index.json");function a(r={}){let t,o,i=r.registryFile??s;try{t=(0,n.readFileSync)(i,"utf8")}catch(r){if("ENOENT"===r.code)return{version:2,runs:{}};throw r}try{o=JSON.parse(t)}catch{throw l(i)}if(!e(o)||1!==o.version&&2!==o.version||!e(o.runs))throw l(i);let u={};for(let[r,t]of Object.entries(o.runs)){var c;if(!(e(c=t)&&"string"==typeof c.runId&&"string"==typeof c.outputDir&&(void 0===c.projectPath||"string"==typeof c.projectPath)&&"string"==typeof c.createdAt&&"string"==typeof c.updatedAt))throw l(i);u[r]=t}return{version:o.version,runs:u}}function c(r,e,n,o={}){let i=a(o),u=(o.now?.()??new Date).toISOString(),p=i.runs[r],d=n?.trim()?f(n):p?.projectPath;i.runs[r]={runId:r,outputDir:e,...d?{projectPath:d}:{},createdAt:p?.createdAt||u,updatedAt:u},function(r,e={}){t(e.registryFile??s,{version:2,runs:r.runs})}(i,o)}function p(r,t={}){return a(t).runs[r]}function d(r={}){return Object.values(a(r).runs).sort((r,t)=>t.updatedAt.localeCompare(r.updatedAt))}function f(r){let t=(0,i.resolve)(r);try{return n.realpathSync.native(t)}catch{return t}}function l(r){return Error(`Invalid DBX Eval run registry: ${r}`)}export{d as listRuns,p as lookupRun,f as normalizeProjectPath,c as registerRun};
1
+ import"node:module";import{__webpack_require__ as r}from"./rslib-runtime.js";import"./1264.js";import{atomicWriteJson as t}from"./json-file.js";import{isRecord as e}from"./2232.js";let n=r("node:fs"),o=r("node:os"),i=r("node:path"),u=(0,i.join)((0,o.homedir)(),".dbx","eval-runs"),s=(0,i.join)(u,"index.json");function a(r={}){let t,o,i=r.registryFile??s;try{t=(0,n.readFileSync)(i,"utf8")}catch(r){if("ENOENT"===r.code)return{version:2,runs:{}};throw r}try{o=JSON.parse(t)}catch{throw l(i)}if(!e(o)||1!==o.version&&2!==o.version||!e(o.runs))throw l(i);let u={};for(let[r,t]of Object.entries(o.runs)){var c;if(!(e(c=t)&&"string"==typeof c.runId&&"string"==typeof c.outputDir&&(void 0===c.projectPath||"string"==typeof c.projectPath)&&"string"==typeof c.createdAt&&"string"==typeof c.updatedAt))throw l(i);u[r]=t}return{version:o.version,runs:u}}function c(r,e,n,o={}){let i=a(o),u=(o.now?.()??new Date).toISOString(),p=i.runs[r],d=n?.trim()?f(n):p?.projectPath;i.runs[r]={runId:r,outputDir:e,...d?{projectPath:d}:{},createdAt:p?.createdAt||u,updatedAt:u},function(r,e={}){t(e.registryFile??s,{version:2,runs:r.runs})}(i,o)}function p(r,t={}){return a(t).runs[r]}function d(r={}){return Object.values(a(r).runs).sort((r,t)=>t.updatedAt.localeCompare(r.updatedAt))}function f(r){let t=(0,i.resolve)(r);try{return n.realpathSync.native(t)}catch{return t}}function l(r){return Error(`Invalid DBX Eval run registry: ${r}`)}export{d as listRuns,p as lookupRun,f as normalizeProjectPath,c as registerRun};