@famibee/skynovel 1.65.0 → 2.0.1

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 (176) hide show
  1. package/README.md +3 -3
  2. package/dist/Button.js +131 -163
  3. package/dist/Button.js.map +1 -1
  4. package/dist/CallStack.js +19 -22
  5. package/dist/CallStack.js.map +1 -1
  6. package/dist/CmnInterface.js +91 -0
  7. package/dist/CmnInterface.js.map +1 -0
  8. package/dist/CmnLib.js +94 -0
  9. package/dist/CmnLib.js.map +1 -0
  10. package/dist/Config.js +26 -0
  11. package/dist/Config.js.map +1 -0
  12. package/dist/ConfigBase.js +152 -0
  13. package/dist/ConfigBase.js.map +1 -0
  14. package/dist/DebugMng.js +89 -102
  15. package/dist/DebugMng.js.map +1 -1
  16. package/dist/EventListenerCtn.js +21 -0
  17. package/dist/EventListenerCtn.js.map +1 -0
  18. package/dist/EventMng.js +1435 -1577
  19. package/dist/EventMng.js.map +1 -1
  20. package/dist/Grammar.js +194 -0
  21. package/dist/Grammar.js.map +1 -0
  22. package/dist/GrpLayer.js +163 -195
  23. package/dist/GrpLayer.js.map +1 -1
  24. package/dist/Layer.js +260 -0
  25. package/dist/Layer.js.map +1 -0
  26. package/dist/LayerMng.js +810 -991
  27. package/dist/LayerMng.js.map +1 -1
  28. package/dist/Main.js +144 -393
  29. package/dist/Main.js.map +1 -1
  30. package/dist/PropParser.js +936 -834
  31. package/dist/PropParser.js.map +1 -1
  32. package/dist/Reading.js +917 -786
  33. package/dist/Reading.js.map +1 -1
  34. package/dist/RubySpliter.js +59 -92
  35. package/dist/RubySpliter.js.map +1 -1
  36. package/dist/ScriptIterator.js +805 -1034
  37. package/dist/ScriptIterator.js.map +1 -1
  38. package/dist/SndBuf.js +1097 -1332
  39. package/dist/SndBuf.js.map +1 -1
  40. package/dist/SoundMng.js +124 -135
  41. package/dist/SoundMng.js.map +1 -1
  42. package/dist/SpritesMng.js +220 -232
  43. package/dist/SpritesMng.js.map +1 -1
  44. package/dist/SysBase.js +1729 -0
  45. package/dist/SysBase.js.map +1 -0
  46. package/dist/TxtLayer.js +1212 -1397
  47. package/dist/TxtLayer.js.map +1 -1
  48. package/dist/Variable.js +398 -466
  49. package/dist/Variable.js.map +1 -1
  50. package/dist/chunk.js +18 -0
  51. package/dist/gamepad.js +723 -511
  52. package/dist/gamepad.js.map +1 -1
  53. package/dist/pixi.js +13422 -0
  54. package/dist/pixi.js.map +1 -0
  55. package/dist/platform.js +424 -369
  56. package/dist/platform.js.map +1 -1
  57. package/dist/sn/AnalyzeTagArg.d.ts +1 -1
  58. package/dist/sn/AnalyzeTagArg.d.ts.map +1 -1
  59. package/dist/sn/CmnInterface.d.ts +3 -1
  60. package/dist/sn/CmnInterface.d.ts.map +1 -1
  61. package/dist/sn/CmnLib.d.ts.map +1 -1
  62. package/dist/sn/CmnTween.d.ts +3 -3
  63. package/dist/sn/CmnTween.d.ts.map +1 -1
  64. package/dist/sn/EventMng.d.ts.map +1 -1
  65. package/dist/sn/Grammar.d.ts +1 -1
  66. package/dist/sn/Grammar.d.ts.map +1 -1
  67. package/dist/sn/PropParser.d.ts +2 -2
  68. package/dist/sn/PropParser.d.ts.map +1 -1
  69. package/dist/sn/Reading.d.ts +6 -0
  70. package/dist/sn/Reading.d.ts.map +1 -1
  71. package/dist/sn/ScriptIterator.d.ts.map +1 -1
  72. package/dist/sn/SndBuf.d.ts +27 -16
  73. package/dist/sn/SndBuf.d.ts.map +1 -1
  74. package/dist/sn/SoundMng.d.ts +4 -1
  75. package/dist/sn/SoundMng.d.ts.map +1 -1
  76. package/dist/sn/SysBase.d.ts.map +1 -1
  77. package/dist/sn/TxtStage.d.ts +2 -1
  78. package/dist/sn/TxtStage.d.ts.map +1 -1
  79. package/dist/test/ValTest.d.ts +1 -1
  80. package/dist/test/ValTest.d.ts.map +1 -1
  81. package/dist/web.js +653 -8
  82. package/dist/web.js.map +1 -1
  83. package/dist_app/Button.js +131 -163
  84. package/dist_app/Button.js.map +1 -1
  85. package/dist_app/CallStack.js +19 -22
  86. package/dist_app/CallStack.js.map +1 -1
  87. package/dist_app/CmnInterface.js +91 -0
  88. package/dist_app/CmnInterface.js.map +1 -0
  89. package/dist_app/CmnLib.js +94 -0
  90. package/dist_app/CmnLib.js.map +1 -0
  91. package/dist_app/Config.js +26 -0
  92. package/dist_app/Config.js.map +1 -0
  93. package/dist_app/ConfigBase.js +152 -0
  94. package/dist_app/ConfigBase.js.map +1 -0
  95. package/dist_app/DebugMng.js +92 -0
  96. package/dist_app/DebugMng.js.map +1 -0
  97. package/dist_app/EventListenerCtn.js +21 -0
  98. package/dist_app/EventListenerCtn.js.map +1 -0
  99. package/dist_app/EventMng.js +1435 -1577
  100. package/dist_app/EventMng.js.map +1 -1
  101. package/dist_app/Grammar.js +194 -0
  102. package/dist_app/Grammar.js.map +1 -0
  103. package/dist_app/GrpLayer.js +163 -195
  104. package/dist_app/GrpLayer.js.map +1 -1
  105. package/dist_app/Layer.js +260 -0
  106. package/dist_app/Layer.js.map +1 -0
  107. package/dist_app/LayerMng.js +810 -991
  108. package/dist_app/LayerMng.js.map +1 -1
  109. package/dist_app/Main.js +144 -392
  110. package/dist_app/Main.js.map +1 -1
  111. package/dist_app/PropParser.js +936 -834
  112. package/dist_app/PropParser.js.map +1 -1
  113. package/dist_app/Reading.js +917 -786
  114. package/dist_app/Reading.js.map +1 -1
  115. package/dist_app/RubySpliter.js +59 -92
  116. package/dist_app/RubySpliter.js.map +1 -1
  117. package/dist_app/ScriptIterator.js +805 -1033
  118. package/dist_app/ScriptIterator.js.map +1 -1
  119. package/dist_app/SndBuf.js +1097 -1332
  120. package/dist_app/SndBuf.js.map +1 -1
  121. package/dist_app/SoundMng.js +124 -135
  122. package/dist_app/SoundMng.js.map +1 -1
  123. package/dist_app/SpritesMng.js +220 -231
  124. package/dist_app/SpritesMng.js.map +1 -1
  125. package/dist_app/SysBase.js +1729 -0
  126. package/dist_app/SysBase.js.map +1 -0
  127. package/dist_app/TxtLayer.js +1212 -1396
  128. package/dist_app/TxtLayer.js.map +1 -1
  129. package/dist_app/Variable.js +398 -466
  130. package/dist_app/Variable.js.map +1 -1
  131. package/dist_app/app.js +211 -8
  132. package/dist_app/app.js.map +1 -1
  133. package/dist_app/appMain.js +20 -21
  134. package/dist_app/appMain.js.map +1 -1
  135. package/dist_app/chunk.js +18 -0
  136. package/dist_app/gamepad.js +723 -511
  137. package/dist_app/gamepad.js.map +1 -1
  138. package/dist_app/pixi.js +11181 -0
  139. package/dist_app/pixi.js.map +1 -0
  140. package/dist_app/platform.js +424 -369
  141. package/dist_app/platform.js.map +1 -1
  142. package/dist_app/preload.js +2 -2
  143. package/dist_app/preload.js.map +1 -1
  144. package/dist_app/sn/AnalyzeTagArg.d.ts +1 -1
  145. package/dist_app/sn/AnalyzeTagArg.d.ts.map +1 -1
  146. package/dist_app/sn/CmnInterface.d.ts +3 -1
  147. package/dist_app/sn/CmnInterface.d.ts.map +1 -1
  148. package/dist_app/sn/CmnLib.d.ts.map +1 -1
  149. package/dist_app/sn/CmnTween.d.ts +3 -3
  150. package/dist_app/sn/CmnTween.d.ts.map +1 -1
  151. package/dist_app/sn/EventMng.d.ts.map +1 -1
  152. package/dist_app/sn/Grammar.d.ts +1 -1
  153. package/dist_app/sn/Grammar.d.ts.map +1 -1
  154. package/dist_app/sn/PropParser.d.ts +2 -2
  155. package/dist_app/sn/PropParser.d.ts.map +1 -1
  156. package/dist_app/sn/Reading.d.ts +6 -0
  157. package/dist_app/sn/Reading.d.ts.map +1 -1
  158. package/dist_app/sn/ScriptIterator.d.ts.map +1 -1
  159. package/dist_app/sn/SndBuf.d.ts +27 -16
  160. package/dist_app/sn/SndBuf.d.ts.map +1 -1
  161. package/dist_app/sn/SoundMng.d.ts +4 -1
  162. package/dist_app/sn/SoundMng.d.ts.map +1 -1
  163. package/dist_app/sn/SysBase.d.ts.map +1 -1
  164. package/dist_app/sn/TxtStage.d.ts +2 -1
  165. package/dist_app/sn/TxtStage.d.ts.map +1 -1
  166. package/dist_app/test/ValTest.d.ts +1 -1
  167. package/dist_app/test/ValTest.d.ts.map +1 -1
  168. package/package.json +23 -13
  169. package/dist/CmnTween.js +0 -1005
  170. package/dist/CmnTween.js.map +0 -1
  171. package/dist/web2.js +0 -21644
  172. package/dist/web2.js.map +0 -1
  173. package/dist_app/CmnTween.js +0 -1005
  174. package/dist_app/CmnTween.js.map +0 -1
  175. package/dist_app/app2.js +0 -18547
  176. package/dist_app/app2.js.map +0 -1
@@ -1,23 +1,22 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pe=require("electron"),ut=require("fs"),Sf=require("constants"),Rf=require("stream"),xi=require("util"),Yl=require("assert"),me=require("path"),Ql=require("crypto"),bf=require("events"),Pf=require("os"),ef=require("zlib");var Fn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mn={},Nt={},uo;function ve(){return uo||(uo=1,Nt.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")e.apply(this,t);else return new Promise((f,s)=>{t.push((d,i)=>d!=null?s(d):f(i)),e.apply(this,t)})},"name",{value:e.name})},Nt.fromPromise=function(e){return Object.defineProperty(function(...t){const f=t[t.length-1];if(typeof f!="function")return e.apply(this,t);t.pop(),e.apply(this,t).then(s=>f(null,s),f)},"name",{value:e.name})}),Nt}var Un,lo;function Nf(){if(lo)return Un;lo=1;var e=Sf,t=process.cwd,f=null,s=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return f||(f=t.call(process)),f};try{process.cwd()}catch{}if(typeof process.chdir=="function"){var d=process.chdir;process.chdir=function(r){f=null,d.call(process,r)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,d)}Un=i;function i(r){e.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&a(r),r.lutimes||o(r),r.chown=g(r.chown),r.fchown=g(r.fchown),r.lchown=g(r.lchown),r.chmod=l(r.chmod),r.fchmod=l(r.fchmod),r.lchmod=l(r.lchmod),r.chownSync=E(r.chownSync),r.fchownSync=E(r.fchownSync),r.lchownSync=E(r.lchownSync),r.chmodSync=c(r.chmodSync),r.fchmodSync=c(r.fchmodSync),r.lchmodSync=c(r.lchmodSync),r.stat=_(r.stat),r.fstat=_(r.fstat),r.lstat=_(r.lstat),r.statSync=w(r.statSync),r.fstatSync=w(r.fstatSync),r.lstatSync=w(r.lstatSync),r.chmod&&!r.lchmod&&(r.lchmod=function(u,h,n){n&&process.nextTick(n)},r.lchmodSync=function(){}),r.chown&&!r.lchown&&(r.lchown=function(u,h,n,m){m&&process.nextTick(m)},r.lchownSync=function(){}),s==="win32"&&(r.rename=typeof r.rename!="function"?r.rename:function(u){function h(n,m,v){var p=Date.now(),y=0;u(n,m,function $(b){if(b&&(b.code==="EACCES"||b.code==="EPERM"||b.code==="EBUSY")&&Date.now()-p<6e4){setTimeout(function(){r.stat(m,function(N,L){N&&N.code==="ENOENT"?u(n,m,$):v(b)})},y),y<100&&(y+=10);return}v&&v(b)})}return Object.setPrototypeOf&&Object.setPrototypeOf(h,u),h}(r.rename)),r.read=typeof r.read!="function"?r.read:function(u){function h(n,m,v,p,y,$){var b;if($&&typeof $=="function"){var N=0;b=function(L,F,H){if(L&&L.code==="EAGAIN"&&N<10)return N++,u.call(r,n,m,v,p,y,b);$.apply(this,arguments)}}return u.call(r,n,m,v,p,y,b)}return Object.setPrototypeOf&&Object.setPrototypeOf(h,u),h}(r.read),r.readSync=typeof r.readSync!="function"?r.readSync:function(u){return function(h,n,m,v,p){for(var y=0;;)try{return u.call(r,h,n,m,v,p)}catch($){if($.code==="EAGAIN"&&y<10){y++;continue}throw $}}}(r.readSync);function a(u){u.lchmod=function(h,n,m){u.open(h,e.O_WRONLY|e.O_SYMLINK,n,function(v,p){if(v){m&&m(v);return}u.fchmod(p,n,function(y){u.close(p,function($){m&&m(y||$)})})})},u.lchmodSync=function(h,n){var m=u.openSync(h,e.O_WRONLY|e.O_SYMLINK,n),v=!0,p;try{p=u.fchmodSync(m,n),v=!1}finally{if(v)try{u.closeSync(m)}catch{}else u.closeSync(m)}return p}}function o(u){e.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(h,n,m,v){u.open(h,e.O_SYMLINK,function(p,y){if(p){v&&v(p);return}u.futimes(y,n,m,function($){u.close(y,function(b){v&&v($||b)})})})},u.lutimesSync=function(h,n,m){var v=u.openSync(h,e.O_SYMLINK),p,y=!0;try{p=u.futimesSync(v,n,m),y=!1}finally{if(y)try{u.closeSync(v)}catch{}else u.closeSync(v)}return p}):u.futimes&&(u.lutimes=function(h,n,m,v){v&&process.nextTick(v)},u.lutimesSync=function(){})}function l(u){return u&&function(h,n,m){return u.call(r,h,n,function(v){R(v)&&(v=null),m&&m.apply(this,arguments)})}}function c(u){return u&&function(h,n){try{return u.call(r,h,n)}catch(m){if(!R(m))throw m}}}function g(u){return u&&function(h,n,m,v){return u.call(r,h,n,m,function(p){R(p)&&(p=null),v&&v.apply(this,arguments)})}}function E(u){return u&&function(h,n,m){try{return u.call(r,h,n,m)}catch(v){if(!R(v))throw v}}}function _(u){return u&&function(h,n,m){typeof n=="function"&&(m=n,n=null);function v(p,y){y&&(y.uid<0&&(y.uid+=4294967296),y.gid<0&&(y.gid+=4294967296)),m&&m.apply(this,arguments)}return n?u.call(r,h,n,v):u.call(r,h,v)}}function w(u){return u&&function(h,n){var m=n?u.call(r,h,n):u.call(r,h);return m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),m}}function R(u){if(!u||u.code==="ENOSYS")return!0;var h=!process.getuid||process.getuid()!==0;return!!(h&&(u.code==="EINVAL"||u.code==="EPERM"))}}return Un}var Vn,fo;function Of(){if(fo)return Vn;fo=1;var e=Rf.Stream;Vn=t;function t(f){return{ReadStream:s,WriteStream:d};function s(i,r){if(!(this instanceof s))return new s(i,r);e.call(this);var a=this;this.path=i,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,r=r||{};for(var o=Object.keys(r),l=0,c=o.length;l<c;l++){var g=o[l];this[g]=r[g]}if(this.encoding&&this.setEncoding(this.encoding),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 new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}f.open(this.path,this.flags,this.mode,function(E,_){if(E){a.emit("error",E),a.readable=!1;return}a.fd=_,a.emit("open",_),a._read()})}function d(i,r){if(!(this instanceof d))return new d(i,r);e.call(this),this.path=i,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var a=Object.keys(r),o=0,l=a.length;o<l;o++){var c=a[o];this[c]=r[c]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=f.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}return Vn}var zn,ho;function If(){if(ho)return zn;ho=1,zn=t;var e=Object.getPrototypeOf||function(f){return f.__proto__};function t(f){if(f===null||typeof f!="object")return f;if(f instanceof Object)var s={__proto__:e(f)};else var s=Object.create(null);return Object.getOwnPropertyNames(f).forEach(function(d){Object.defineProperty(s,d,Object.getOwnPropertyDescriptor(f,d))}),s}return zn}var Ot,mo;function St(){if(mo)return Ot;mo=1;var e=ut,t=Nf(),f=Of(),s=If(),d=xi,i,r;typeof Symbol=="function"&&typeof Symbol.for=="function"?(i=Symbol.for("graceful-fs.queue"),r=Symbol.for("graceful-fs.previous")):(i="___graceful-fs.queue",r="___graceful-fs.previous");function a(){}function o(u,h){Object.defineProperty(u,i,{get:function(){return h}})}var l=a;if(d.debuglog?l=d.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(l=function(){var u=d.format.apply(d,arguments);u="GFS4: "+u.split(/\n/).join(`
2
- GFS4: `),console.error(u)}),!e[i]){var c=Fn[i]||[];o(e,c),e.close=function(u){function h(n,m){return u.call(e,n,function(v){v||w(),typeof m=="function"&&m.apply(this,arguments)})}return Object.defineProperty(h,r,{value:u}),h}(e.close),e.closeSync=function(u){function h(n){u.apply(e,arguments),w()}return Object.defineProperty(h,r,{value:u}),h}(e.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){l(e[i]),Yl.equal(e[i].length,0)})}Fn[i]||o(Fn,e[i]),Ot=g(s(e)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!e.__patched&&(Ot=g(e),e.__patched=!0);function g(u){t(u),u.gracefulify=g,u.createReadStream=O,u.createWriteStream=q;var h=u.readFile;u.readFile=n;function n(P,A,K){return typeof A=="function"&&(K=A,A=null),B(P,A,K);function B(X,Z,I,C){return h(X,Z,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?E([B,[X,Z,I],k,C||Date.now(),Date.now()]):typeof I=="function"&&I.apply(this,arguments)})}}var m=u.writeFile;u.writeFile=v;function v(P,A,K,B){return typeof K=="function"&&(B=K,K=null),X(P,A,K,B);function X(Z,I,C,k,V){return m(Z,I,C,function(x){x&&(x.code==="EMFILE"||x.code==="ENFILE")?E([X,[Z,I,C,k],x,V||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}var p=u.appendFile;p&&(u.appendFile=y);function y(P,A,K,B){return typeof K=="function"&&(B=K,K=null),X(P,A,K,B);function X(Z,I,C,k,V){return p(Z,I,C,function(x){x&&(x.code==="EMFILE"||x.code==="ENFILE")?E([X,[Z,I,C,k],x,V||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}var $=u.copyFile;$&&(u.copyFile=b);function b(P,A,K,B){return typeof K=="function"&&(B=K,K=0),X(P,A,K,B);function X(Z,I,C,k,V){return $(Z,I,C,function(x){x&&(x.code==="EMFILE"||x.code==="ENFILE")?E([X,[Z,I,C,k],x,V||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}var N=u.readdir;u.readdir=F;var L=/^v[0-5]\./;function F(P,A,K){typeof A=="function"&&(K=A,A=null);var B=L.test(process.version)?function(I,C,k,V){return N(I,X(I,C,k,V))}:function(I,C,k,V){return N(I,C,X(I,C,k,V))};return B(P,A,K);function X(Z,I,C,k){return function(V,x){V&&(V.code==="EMFILE"||V.code==="ENFILE")?E([B,[Z,I,C],V,k||Date.now(),Date.now()]):(x&&x.sort&&x.sort(),typeof C=="function"&&C.call(this,V,x))}}}if(process.version.substr(0,4)==="v0.8"){var H=f(u);W=H.ReadStream,G=H.WriteStream}var M=u.ReadStream;M&&(W.prototype=Object.create(M.prototype),W.prototype.open=j);var U=u.WriteStream;U&&(G.prototype=Object.create(U.prototype),G.prototype.open=D),Object.defineProperty(u,"ReadStream",{get:function(){return W},set:function(P){W=P},enumerable:!0,configurable:!0}),Object.defineProperty(u,"WriteStream",{get:function(){return G},set:function(P){G=P},enumerable:!0,configurable:!0});var z=W;Object.defineProperty(u,"FileReadStream",{get:function(){return z},set:function(P){z=P},enumerable:!0,configurable:!0});var J=G;Object.defineProperty(u,"FileWriteStream",{get:function(){return J},set:function(P){J=P},enumerable:!0,configurable:!0});function W(P,A){return this instanceof W?(M.apply(this,arguments),this):W.apply(Object.create(W.prototype),arguments)}function j(){var P=this;S(P.path,P.flags,P.mode,function(A,K){A?(P.autoClose&&P.destroy(),P.emit("error",A)):(P.fd=K,P.emit("open",K),P.read())})}function G(P,A){return this instanceof G?(U.apply(this,arguments),this):G.apply(Object.create(G.prototype),arguments)}function D(){var P=this;S(P.path,P.flags,P.mode,function(A,K){A?(P.destroy(),P.emit("error",A)):(P.fd=K,P.emit("open",K))})}function O(P,A){return new u.ReadStream(P,A)}function q(P,A){return new u.WriteStream(P,A)}var T=u.open;u.open=S;function S(P,A,K,B){return typeof K=="function"&&(B=K,K=null),X(P,A,K,B);function X(Z,I,C,k,V){return T(Z,I,C,function(x,Y){x&&(x.code==="EMFILE"||x.code==="ENFILE")?E([X,[Z,I,C,k],x,V||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}return u}function E(u){l("ENQUEUE",u[0].name,u[1]),e[i].push(u),R()}var _;function w(){for(var u=Date.now(),h=0;h<e[i].length;++h)e[i][h].length>2&&(e[i][h][3]=u,e[i][h][4]=u);R()}function R(){if(clearTimeout(_),_=void 0,e[i].length!==0){var u=e[i].shift(),h=u[0],n=u[1],m=u[2],v=u[3],p=u[4];if(v===void 0)l("RETRY",h.name,n),h.apply(null,n);else if(Date.now()-v>=6e4){l("TIMEOUT",h.name,n);var y=n.pop();typeof y=="function"&&y.call(null,m)}else{var $=Date.now()-p,b=Math.max(p-v,1),N=Math.min(b*1.2,100);$>=N?(l("RETRY",h.name,n),h.apply(null,n.concat([v]))):e[i].push(u)}_===void 0&&(_=setTimeout(R,0))}}return Ot}var po;function Ee(){return po||(po=1,function(e){const t=ve().fromCallback,f=St(),s=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter(d=>typeof f[d]=="function");Object.assign(e,f),s.forEach(d=>{e[d]=t(f[d])}),e.exists=function(d,i){return typeof i=="function"?f.exists(d,i):new Promise(r=>f.exists(d,r))},e.read=function(d,i,r,a,o,l){return typeof l=="function"?f.read(d,i,r,a,o,l):new Promise((c,g)=>{f.read(d,i,r,a,o,(E,_,w)=>{if(E)return g(E);c({bytesRead:_,buffer:w})})})},e.write=function(d,i,...r){return typeof r[r.length-1]=="function"?f.write(d,i,...r):new Promise((a,o)=>{f.write(d,i,...r,(l,c,g)=>{if(l)return o(l);a({bytesWritten:c,buffer:g})})})},e.readv=function(d,i,...r){return typeof r[r.length-1]=="function"?f.readv(d,i,...r):new Promise((a,o)=>{f.readv(d,i,...r,(l,c,g)=>{if(l)return o(l);a({bytesRead:c,buffers:g})})})},e.writev=function(d,i,...r){return typeof r[r.length-1]=="function"?f.writev(d,i,...r):new Promise((a,o)=>{f.writev(d,i,...r,(l,c,g)=>{if(l)return o(l);a({bytesWritten:c,buffers:g})})})},typeof f.realpath.native=="function"?e.realpath.native=t(f.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")}(Mn)),Mn}var It={},Gn={},yo;function Tf(){if(yo)return Gn;yo=1;const e=me;return Gn.checkPath=function(f){if(process.platform==="win32"&&/[<>:"|?*]/.test(f.replace(e.parse(f).root,""))){const d=new Error(`Path contains invalid characters: ${f}`);throw d.code="EINVAL",d}},Gn}var vo;function Cf(){if(vo)return It;vo=1;const e=Ee(),{checkPath:t}=Tf(),f=s=>{const d={mode:511};return typeof s=="number"?s:{...d,...s}.mode};return It.makeDir=async(s,d)=>(t(s),e.mkdir(s,{mode:f(d),recursive:!0})),It.makeDirSync=(s,d)=>(t(s),e.mkdirSync(s,{mode:f(d),recursive:!0})),It}var Kn,_o;function qe(){if(_o)return Kn;_o=1;const e=ve().fromPromise,{makeDir:t,makeDirSync:f}=Cf(),s=e(t);return Kn={mkdirs:s,mkdirsSync:f,mkdirp:s,mkdirpSync:f,ensureDir:s,ensureDirSync:f},Kn}var Hn,go;function st(){if(go)return Hn;go=1;const e=ve().fromPromise,t=Ee();function f(s){return t.access(s).then(()=>!0).catch(()=>!1)}return Hn={pathExists:e(f),pathExistsSync:t.existsSync},Hn}var xn,$o;function rf(){if($o)return xn;$o=1;const e=Ee(),t=ve().fromPromise;async function f(d,i,r){const a=await e.open(d,"r+");let o=null;try{await e.futimes(a,i,r)}finally{try{await e.close(a)}catch(l){o=l}}if(o)throw o}function s(d,i,r){const a=e.openSync(d,"r+");return e.futimesSync(a,i,r),e.closeSync(a)}return xn={utimesMillis:t(f),utimesMillisSync:s},xn}var Bn,Eo;function lt(){if(Eo)return Bn;Eo=1;const e=Ee(),t=me,f=ve().fromPromise;function s(E,_,w){const R=w.dereference?u=>e.stat(u,{bigint:!0}):u=>e.lstat(u,{bigint:!0});return Promise.all([R(E),R(_).catch(u=>{if(u.code==="ENOENT")return null;throw u})]).then(([u,h])=>({srcStat:u,destStat:h}))}function d(E,_,w){let R;const u=w.dereference?n=>e.statSync(n,{bigint:!0}):n=>e.lstatSync(n,{bigint:!0}),h=u(E);try{R=u(_)}catch(n){if(n.code==="ENOENT")return{srcStat:h,destStat:null};throw n}return{srcStat:h,destStat:R}}async function i(E,_,w,R){const{srcStat:u,destStat:h}=await s(E,_,R);if(h){if(l(u,h)){const n=t.basename(E),m=t.basename(_);if(w==="move"&&n!==m&&n.toLowerCase()===m.toLowerCase())return{srcStat:u,destStat:h,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(u.isDirectory()&&!h.isDirectory())throw new Error(`Cannot overwrite non-directory '${_}' with directory '${E}'.`);if(!u.isDirectory()&&h.isDirectory())throw new Error(`Cannot overwrite directory '${_}' with non-directory '${E}'.`)}if(u.isDirectory()&&c(E,_))throw new Error(g(E,_,w));return{srcStat:u,destStat:h}}function r(E,_,w,R){const{srcStat:u,destStat:h}=d(E,_,R);if(h){if(l(u,h)){const n=t.basename(E),m=t.basename(_);if(w==="move"&&n!==m&&n.toLowerCase()===m.toLowerCase())return{srcStat:u,destStat:h,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(u.isDirectory()&&!h.isDirectory())throw new Error(`Cannot overwrite non-directory '${_}' with directory '${E}'.`);if(!u.isDirectory()&&h.isDirectory())throw new Error(`Cannot overwrite directory '${_}' with non-directory '${E}'.`)}if(u.isDirectory()&&c(E,_))throw new Error(g(E,_,w));return{srcStat:u,destStat:h}}async function a(E,_,w,R){const u=t.resolve(t.dirname(E)),h=t.resolve(t.dirname(w));if(h===u||h===t.parse(h).root)return;let n;try{n=await e.stat(h,{bigint:!0})}catch(m){if(m.code==="ENOENT")return;throw m}if(l(_,n))throw new Error(g(E,w,R));return a(E,_,h,R)}function o(E,_,w,R){const u=t.resolve(t.dirname(E)),h=t.resolve(t.dirname(w));if(h===u||h===t.parse(h).root)return;let n;try{n=e.statSync(h,{bigint:!0})}catch(m){if(m.code==="ENOENT")return;throw m}if(l(_,n))throw new Error(g(E,w,R));return o(E,_,h,R)}function l(E,_){return _.ino!==void 0&&_.dev!==void 0&&_.ino===E.ino&&_.dev===E.dev}function c(E,_){const w=t.resolve(E).split(t.sep).filter(u=>u),R=t.resolve(_).split(t.sep).filter(u=>u);return w.every((u,h)=>R[h]===u)}function g(E,_,w){return`Cannot ${w} '${E}' to a subdirectory of itself, '${_}'.`}return Bn={checkPaths:f(i),checkPathsSync:r,checkParentPaths:f(a),checkParentPathsSync:o,isSrcSubdir:c,areIdentical:l},Bn}var Wn,wo;function Df(){if(wo)return Wn;wo=1;async function e(t,f){const s=[];for await(const d of t)s.push(f(d).then(()=>null,i=>i??new Error("unknown error")));await Promise.all(s.map(d=>d.then(i=>{if(i!==null)throw i})))}return Wn={asyncIteratorConcurrentProcess:e},Wn}var Jn,So;function Af(){if(So)return Jn;So=1;const e=Ee(),t=me,{mkdirs:f}=qe(),{pathExists:s}=st(),{utimesMillis:d}=rf(),i=lt(),{asyncIteratorConcurrentProcess:r}=Df();async function a(u,h,n={}){typeof n=="function"&&(n={filter:n}),n.clobber="clobber"in n?!!n.clobber:!0,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n&&t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);let f=require(`electron`);f=u(f);let p=require(`node:process`);p=u(p);let m=require(`node:path`);m=u(m);let h=require(`node:util`),g=require(`node:fs`);g=u(g);let _=require(`node:crypto`);_=u(_);let v=require(`node:assert`);v=u(v);let y=require(`node:os`);y=u(y),require(`node:events`),require(`node:stream`);var b=s((e=>{e.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]==`function`)e.apply(this,t);else return new Promise((n,r)=>{t.push((e,t)=>e==null?n(t):r(e)),e.apply(this,t)})},`name`,{value:e.name})},e.fromPromise=function(e){return Object.defineProperty(function(...t){let n=t[t.length-1];if(typeof n!=`function`)return e.apply(this,t);t.pop(),e.apply(this,t).then(e=>n(null,e),n)},`name`,{value:e.name})}})),x=s(((e,t)=>{var n=require(`constants`),r=process.cwd,i=null,a=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return i||=r.call(process),i};try{process.cwd()}catch{}if(typeof process.chdir==`function`){var o=process.chdir;process.chdir=function(e){i=null,o.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,o)}t.exports=s;function s(e){n.hasOwnProperty(`O_SYMLINK`)&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=c(e.chownSync),e.fchownSync=c(e.fchownSync),e.lchownSync=c(e.lchownSync),e.chmodSync=o(e.chmodSync),e.fchmodSync=o(e.fchmodSync),e.lchmodSync=o(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),a===`win32`&&(e.rename=typeof e.rename==`function`?(function(t){function n(n,r,i){var a=Date.now(),o=0;t(n,r,function s(c){if(c&&(c.code===`EACCES`||c.code===`EPERM`||c.code===`EBUSY`)&&Date.now()-a<6e4){setTimeout(function(){e.stat(r,function(e,a){e&&e.code===`ENOENT`?t(n,r,s):i(c)})},o),o<100&&(o+=10);return}i&&i(c)})}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.rename):e.rename),e.read=typeof e.read==`function`?(function(t){function n(n,r,i,a,o,s){var c;if(s&&typeof s==`function`){var l=0;c=function(u,d,f){if(u&&u.code===`EAGAIN`&&l<10)return l++,t.call(e,n,r,i,a,o,c);s.apply(this,arguments)}}return t.call(e,n,r,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.read):e.read,e.readSync=typeof e.readSync==`function`?(function(t){return function(n,r,i,a,o){for(var s=0;;)try{return t.call(e,n,r,i,a,o)}catch(e){if(e.code===`EAGAIN`&&s<10){s++;continue}throw e}}})(e.readSync):e.readSync;function t(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,function(t,n){if(t){i&&i(t);return}e.fchmod(n,r,function(t){e.close(n,function(e){i&&i(t||e)})})})},e.lchmodSync=function(t,r){var i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r),a=!0,o;try{o=e.fchmodSync(i,r),a=!1}finally{if(a)try{e.closeSync(i)}catch{}else e.closeSync(i)}return o}}function r(e){n.hasOwnProperty(`O_SYMLINK`)&&e.futimes?(e.lutimes=function(t,r,i,a){e.open(t,n.O_SYMLINK,function(t,n){if(t){a&&a(t);return}e.futimes(n,r,i,function(t){e.close(n,function(e){a&&a(t||e)})})})},e.lutimesSync=function(t,r,i){var a=e.openSync(t,n.O_SYMLINK),o,s=!0;try{o=e.futimesSync(a,r,i),s=!1}finally{if(s)try{e.closeSync(a)}catch{}else e.closeSync(a)}return o}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}function i(t){return t&&function(n,r,i){return t.call(e,n,r,function(e){d(e)&&(e=null),i&&i.apply(this,arguments)})}}function o(t){return t&&function(n,r){try{return t.call(e,n,r)}catch(e){if(!d(e))throw e}}}function s(t){return t&&function(n,r,i,a){return t.call(e,n,r,i,function(e){d(e)&&(e=null),a&&a.apply(this,arguments)})}}function c(t){return t&&function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!d(e))throw e}}}function l(t){return t&&function(n,r,i){typeof r==`function`&&(i=r,r=null);function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return r?t.call(e,n,r,a):t.call(e,n,a)}}function u(t){return t&&function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}}function d(e){return!e||e.code===`ENOSYS`||(!process.getuid||process.getuid()!==0)&&(e.code===`EINVAL`||e.code===`EPERM`)}}})),S=s(((e,t)=>{var n=require(`stream`).Stream;t.exports=r;function r(e){return{ReadStream:t,WriteStream:r};function t(r,i){if(!(this instanceof t))return new t(r,i);n.call(this);var a=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags=`r`,this.mode=438,this.bufferSize=64*1024,i||={};for(var o=Object.keys(i),s=0,c=o.length;s<c;s++){var l=o[s];this[l]=i[l]}if(this.encoding&&this.setEncoding(this.encoding),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(){a._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){a.emit(`error`,e),a.readable=!1;return}a.fd=t,a.emit(`open`,t),a._read()})}function r(t,i){if(!(this instanceof r))return new r(t,i);n.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags=`w`,this.encoding=`binary`,this.mode=438,this.bytesWritten=0,i||={};for(var a=Object.keys(i),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=i[c]}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}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}})),C=s(((e,t)=>{t.exports=r;var n=Object.getPrototypeOf||function(e){return e.__proto__};function r(e){if(typeof e!=`object`||!e)return e;if(e instanceof Object)var t={__proto__:n(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}})),w=s(((e,t)=>{var n=require(`fs`),r=x(),i=S(),a=C(),o=require(`util`),s,c;typeof Symbol==`function`&&typeof Symbol.for==`function`?(s=Symbol.for(`graceful-fs.queue`),c=Symbol.for(`graceful-fs.previous`)):(s=`___graceful-fs.queue`,c=`___graceful-fs.previous`);function l(){}function u(e,t){Object.defineProperty(e,s,{get:function(){return t}})}var d=l;o.debuglog?d=o.debuglog(`gfs4`):/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&(d=function(){var e=o.format.apply(o,arguments);e=`GFS4: `+e.split(/\n/).join(`
2
+ GFS4: `),console.error(e)}),n[s]||(u(n,global[s]||[]),n.close=(function(e){function t(t,r){return e.call(n,t,function(e){e||h(),typeof r==`function`&&r.apply(this,arguments)})}return Object.defineProperty(t,c,{value:e}),t})(n.close),n.closeSync=(function(e){function t(t){e.apply(n,arguments),h()}return Object.defineProperty(t,c,{value:e}),t})(n.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&process.on(`exit`,function(){d(n[s]),require(`assert`).equal(n[s].length,0)})),global[s]||u(global,n[s]),t.exports=f(a(n)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!n.__patched&&(t.exports=f(n),n.__patched=!0);function f(e){r(e),e.gracefulify=f,e.createReadStream=T,e.createWriteStream=E;var t=e.readFile;e.readFile=n;function n(e,n,r){return typeof n==`function`&&(r=n,n=null),i(e,n,r);function i(e,n,r,a){return t(e,n,function(t){t&&(t.code===`EMFILE`||t.code===`ENFILE`)?p([i,[e,n,r],t,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var a=e.writeFile;e.writeFile=o;function o(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,o){return a(e,t,n,function(a){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?p([i,[e,t,n,r],a,o||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=c);function c(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return s(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?p([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var l=e.copyFile;l&&(e.copyFile=u);function u(e,t,n,r){return typeof n==`function`&&(r=n,n=0),i(e,t,n,r);function i(e,t,n,r,a){return l(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?p([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var d=e.readdir;e.readdir=h;var m=/^v[0-5]\./;function h(e,t,n){typeof t==`function`&&(n=t,t=null);var r=m.test(process.version)?function(e,t,n,r){return d(e,i(e,t,n,r))}:function(e,t,n,r){return d(e,t,i(e,t,n,r))};return r(e,t,n);function i(e,t,n,i){return function(a,o){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?p([r,[e,t,n],a,i||Date.now(),Date.now()]):(o&&o.sort&&o.sort(),typeof n==`function`&&n.call(this,a,o))}}}if(process.version.substr(0,4)===`v0.8`){var g=i(e);x=g.ReadStream,C=g.WriteStream}var _=e.ReadStream;_&&(x.prototype=Object.create(_.prototype),x.prototype.open=S);var v=e.WriteStream;v&&(C.prototype=Object.create(v.prototype),C.prototype.open=w),Object.defineProperty(e,`ReadStream`,{get:function(){return x},set:function(e){x=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,`WriteStream`,{get:function(){return C},set:function(e){C=e},enumerable:!0,configurable:!0});var y=x;Object.defineProperty(e,`FileReadStream`,{get:function(){return y},set:function(e){y=e},enumerable:!0,configurable:!0});var b=C;Object.defineProperty(e,`FileWriteStream`,{get:function(){return b},set:function(e){b=e},enumerable:!0,configurable:!0});function x(e,t){return this instanceof x?(_.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function S(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.autoClose&&e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n),e.read())})}function C(e,t){return this instanceof C?(v.apply(this,arguments),this):C.apply(Object.create(C.prototype),arguments)}function w(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function T(t,n){return new e.ReadStream(t,n)}function E(t,n){return new e.WriteStream(t,n)}var D=e.open;e.open=O;function O(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return D(e,t,n,function(o,s){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?p([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}return e}function p(e){d(`ENQUEUE`,e[0].name,e[1]),n[s].push(e),g()}var m;function h(){for(var e=Date.now(),t=0;t<n[s].length;++t)n[s][t].length>2&&(n[s][t][3]=e,n[s][t][4]=e);g()}function g(){if(clearTimeout(m),m=void 0,n[s].length!==0){var e=n[s].shift(),t=e[0],r=e[1],i=e[2],a=e[3],o=e[4];if(a===void 0)d(`RETRY`,t.name,r),t.apply(null,r);else if(Date.now()-a>=6e4){d(`TIMEOUT`,t.name,r);var c=r.pop();typeof c==`function`&&c.call(null,i)}else{var l=Date.now()-o,u=Math.max(o-a,1);l>=Math.min(u*1.2,100)?(d(`RETRY`,t.name,r),t.apply(null,r.concat([a]))):n[s].push(e)}m===void 0&&(m=setTimeout(g,0))}}})),T=s((e=>{var t=b().fromCallback,n=w(),r=`access.appendFile.chmod.chown.close.copyFile.cp.fchmod.fchown.fdatasync.fstat.fsync.ftruncate.futimes.glob.lchmod.lchown.lutimes.link.lstat.mkdir.mkdtemp.open.opendir.readdir.readFile.readlink.realpath.rename.rm.rmdir.stat.statfs.symlink.truncate.unlink.utimes.writeFile`.split(`.`).filter(e=>typeof n[e]==`function`);Object.assign(e,n),r.forEach(r=>{e[r]=t(n[r])}),e.exists=function(e,t){return typeof t==`function`?n.exists(e,t):new Promise(t=>n.exists(e,t))},e.read=function(e,t,r,i,a,o){return typeof o==`function`?n.read(e,t,r,i,a,o):new Promise((o,s)=>{n.read(e,t,r,i,a,(e,t,n)=>{if(e)return s(e);o({bytesRead:t,buffer:n})})})},e.write=function(e,t,...r){return typeof r[r.length-1]==`function`?n.write(e,t,...r):new Promise((i,a)=>{n.write(e,t,...r,(e,t,n)=>{if(e)return a(e);i({bytesWritten:t,buffer:n})})})},e.readv=function(e,t,...r){return typeof r[r.length-1]==`function`?n.readv(e,t,...r):new Promise((i,a)=>{n.readv(e,t,...r,(e,t,n)=>{if(e)return a(e);i({bytesRead:t,buffers:n})})})},e.writev=function(e,t,...r){return typeof r[r.length-1]==`function`?n.writev(e,t,...r):new Promise((i,a)=>{n.writev(e,t,...r,(e,t,n)=>{if(e)return a(e);i({bytesWritten:t,buffers:n})})})},typeof n.realpath.native==`function`?e.realpath.native=t(n.realpath.native):process.emitWarning(`fs.realpath.native is not a function. Is fs being monkey-patched?`,`Warning`,`fs-extra-WARN0003`)})),E=s(((e,t)=>{var n=require(`path`);t.exports.checkPath=function(e){if(process.platform===`win32`&&/[<>:"|?*]/.test(e.replace(n.parse(e).root,``))){let t=Error(`Path contains invalid characters: ${e}`);throw t.code=`EINVAL`,t}}})),D=s(((e,t)=>{var n=T(),{checkPath:r}=E(),i=e=>typeof e==`number`?e:{mode:511,...e}.mode;t.exports.makeDir=async(e,t)=>(r(e),n.mkdir(e,{mode:i(t),recursive:!0})),t.exports.makeDirSync=(e,t)=>(r(e),n.mkdirSync(e,{mode:i(t),recursive:!0}))})),O=s(((e,t)=>{var n=b().fromPromise,{makeDir:r,makeDirSync:i}=D(),a=n(r);t.exports={mkdirs:a,mkdirsSync:i,mkdirp:a,mkdirpSync:i,ensureDir:a,ensureDirSync:i}})),k=s(((e,t)=>{var n=b().fromPromise,r=T();function i(e){return r.access(e).then(()=>!0).catch(()=>!1)}t.exports={pathExists:n(i),pathExistsSync:r.existsSync}})),A=s(((e,t)=>{var n=T(),r=b().fromPromise;async function i(e,t,r){let i=await n.open(e,`r+`),a=null;try{await n.futimes(i,t,r)}finally{try{await n.close(i)}catch(e){a=e}}if(a)throw a}function a(e,t,r){let i=n.openSync(e,`r+`);return n.futimesSync(i,t,r),n.closeSync(i)}t.exports={utimesMillis:r(i),utimesMillisSync:a}})),j=s(((e,t)=>{var n=T(),r=require(`path`),i=b().fromPromise;function a(e,t,r){let i=r.dereference?e=>n.stat(e,{bigint:!0}):e=>n.lstat(e,{bigint:!0});return Promise.all([i(e),i(t).catch(e=>{if(e.code===`ENOENT`)return null;throw e})]).then(([e,t])=>({srcStat:e,destStat:t}))}function o(e,t,r){let i,a=r.dereference?e=>n.statSync(e,{bigint:!0}):e=>n.lstatSync(e,{bigint:!0}),o=a(e);try{i=a(t)}catch(e){if(e.code===`ENOENT`)return{srcStat:o,destStat:null};throw e}return{srcStat:o,destStat:i}}async function s(e,t,n,i){let{srcStat:o,destStat:s}=await a(e,t,i);if(s){if(d(o,s)){let i=r.basename(e),a=r.basename(t);if(n===`move`&&i!==a&&i.toLowerCase()===a.toLowerCase())return{srcStat:o,destStat:s,isChangingCase:!0};throw Error(`Source and destination must not be the same.`)}if(o.isDirectory()&&!s.isDirectory())throw Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!o.isDirectory()&&s.isDirectory())throw Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(o.isDirectory()&&f(e,t))throw Error(p(e,t,n));return{srcStat:o,destStat:s}}function c(e,t,n,i){let{srcStat:a,destStat:s}=o(e,t,i);if(s){if(d(a,s)){let i=r.basename(e),o=r.basename(t);if(n===`move`&&i!==o&&i.toLowerCase()===o.toLowerCase())return{srcStat:a,destStat:s,isChangingCase:!0};throw Error(`Source and destination must not be the same.`)}if(a.isDirectory()&&!s.isDirectory())throw Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!a.isDirectory()&&s.isDirectory())throw Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(a.isDirectory()&&f(e,t))throw Error(p(e,t,n));return{srcStat:a,destStat:s}}async function l(e,t,i,a){let o=r.resolve(r.dirname(e)),s=r.resolve(r.dirname(i));if(s===o||s===r.parse(s).root)return;let c;try{c=await n.stat(s,{bigint:!0})}catch(e){if(e.code===`ENOENT`)return;throw e}if(d(t,c))throw Error(p(e,i,a));return l(e,t,s,a)}function u(e,t,i,a){let o=r.resolve(r.dirname(e)),s=r.resolve(r.dirname(i));if(s===o||s===r.parse(s).root)return;let c;try{c=n.statSync(s,{bigint:!0})}catch(e){if(e.code===`ENOENT`)return;throw e}if(d(t,c))throw Error(p(e,i,a));return u(e,t,s,a)}function d(e,t){return t.ino!==void 0&&t.dev!==void 0&&t.ino===e.ino&&t.dev===e.dev}function f(e,t){let n=r.resolve(e).split(r.sep).filter(e=>e),i=r.resolve(t).split(r.sep).filter(e=>e);return n.every((e,t)=>i[t]===e)}function p(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}t.exports={checkPaths:i(s),checkPathsSync:c,checkParentPaths:i(l),checkParentPathsSync:u,isSrcSubdir:f,areIdentical:d}})),M=s(((e,t)=>{async function n(e,t){let n=[];for await(let r of e)n.push(t(r).then(()=>null,e=>e??Error(`unknown error`)));await Promise.all(n.map(e=>e.then(e=>{if(e!==null)throw e})))}t.exports={asyncIteratorConcurrentProcess:n}})),N=s(((e,t)=>{var n=T(),r=require(`path`),{mkdirs:i}=O(),{pathExists:a}=k(),{utimesMillis:o}=A(),s=j(),{asyncIteratorConcurrentProcess:c}=M();async function l(e,t,n={}){typeof n==`function`&&(n={filter:n}),n.clobber=`clobber`in n?!!n.clobber:!0,n.overwrite=`overwrite`in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch===`ia32`&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
3
3
 
4
- see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");const{srcStat:m,destStat:v}=await i.checkPaths(u,h,"copy",n);if(await i.checkParentPaths(u,m,h,"copy"),!await o(u,h,n))return;const y=t.dirname(h);await s(y)||await f(y),await l(v,u,h,n)}async function o(u,h,n){return n.filter?n.filter(u,h):!0}async function l(u,h,n,m){const p=await(m.dereference?e.stat:e.lstat)(h);if(p.isDirectory())return w(p,u,h,n,m);if(p.isFile()||p.isCharacterDevice()||p.isBlockDevice())return c(p,u,h,n,m);if(p.isSymbolicLink())return R(u,h,n,m);throw p.isSocket()?new Error(`Cannot copy a socket file: ${h}`):p.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${h}`):new Error(`Unknown file: ${h}`)}async function c(u,h,n,m,v){if(!h)return g(u,n,m,v);if(v.overwrite)return await e.unlink(m),g(u,n,m,v);if(v.errorOnExist)throw new Error(`'${m}' already exists`)}async function g(u,h,n,m){if(await e.copyFile(h,n),m.preserveTimestamps){E(u.mode)&&await _(n,u.mode);const v=await e.stat(h);await d(n,v.atime,v.mtime)}return e.chmod(n,u.mode)}function E(u){return(u&128)===0}function _(u,h){return e.chmod(u,h|128)}async function w(u,h,n,m,v){h||await e.mkdir(m),await r(await e.opendir(n),async p=>{const y=t.join(n,p.name),$=t.join(m,p.name);if(await o(y,$,v)){const{destStat:N}=await i.checkPaths(y,$,"copy",v);await l(N,y,$,v)}}),h||await e.chmod(m,u.mode)}async function R(u,h,n,m){let v=await e.readlink(h);if(m.dereference&&(v=t.resolve(process.cwd(),v)),!u)return e.symlink(v,n);let p=null;try{p=await e.readlink(n)}catch(y){if(y.code==="EINVAL"||y.code==="UNKNOWN")return e.symlink(v,n);throw y}if(m.dereference&&(p=t.resolve(process.cwd(),p)),i.isSrcSubdir(v,p))throw new Error(`Cannot copy '${v}' to a subdirectory of itself, '${p}'.`);if(i.isSrcSubdir(p,v))throw new Error(`Cannot overwrite '${p}' with '${v}'.`);return await e.unlink(n),e.symlink(v,n)}return Jn=a,Jn}var Zn,Ro;function Lf(){if(Ro)return Zn;Ro=1;const e=St(),t=me,f=qe().mkdirsSync,s=rf().utimesMillisSync,d=lt();function i(p,y,$){typeof $=="function"&&($={filter:$}),$=$||{},$.clobber="clobber"in $?!!$.clobber:!0,$.overwrite="overwrite"in $?!!$.overwrite:$.clobber,$.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
4
+ see https://github.com/jprichardson/node-fs-extra/issues/269`,`Warning`,`fs-extra-WARN0001`);let{srcStat:o,destStat:c}=await s.checkPaths(e,t,`copy`,n);if(await s.checkParentPaths(e,o,t,`copy`),!await u(e,t,n))return;let l=r.dirname(t);await a(l)||await i(l),await d(c,e,t,n)}async function u(e,t,n){return n.filter?n.filter(e,t):!0}async function d(e,t,r,i){let a=await(i.dereference?n.stat:n.lstat)(t);if(a.isDirectory())return g(a,e,t,r,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return f(a,e,t,r,i);if(a.isSymbolicLink())return _(e,t,r,i);throw a.isSocket()?Error(`Cannot copy a socket file: ${t}`):a.isFIFO()?Error(`Cannot copy a FIFO pipe: ${t}`):Error(`Unknown file: ${t}`)}async function f(e,t,r,i,a){if(!t)return p(e,r,i,a);if(a.overwrite)return await n.unlink(i),p(e,r,i,a);if(a.errorOnExist)throw Error(`'${i}' already exists`)}async function p(e,t,r,i){if(await n.copyFile(t,r),i.preserveTimestamps){m(e.mode)&&await h(r,e.mode);let i=await n.stat(t);await o(r,i.atime,i.mtime)}return n.chmod(r,e.mode)}function m(e){return(e&128)==0}function h(e,t){return n.chmod(e,t|128)}async function g(e,t,i,a,o){t||await n.mkdir(a),await c(await n.opendir(i),async e=>{let t=r.join(i,e.name),n=r.join(a,e.name);if(await u(t,n,o)){let{destStat:e}=await s.checkPaths(t,n,`copy`,o);await d(e,t,n,o)}}),t||await n.chmod(a,e.mode)}async function _(e,t,i,a){let o=await n.readlink(t);if(a.dereference&&(o=r.resolve(process.cwd(),o)),!e)return n.symlink(o,i);let c=null;try{c=await n.readlink(i)}catch(e){if(e.code===`EINVAL`||e.code===`UNKNOWN`)return n.symlink(o,i);throw e}if(a.dereference&&(c=r.resolve(process.cwd(),c)),s.isSrcSubdir(o,c))throw Error(`Cannot copy '${o}' to a subdirectory of itself, '${c}'.`);if(s.isSrcSubdir(c,o))throw Error(`Cannot overwrite '${c}' with '${o}'.`);return await n.unlink(i),n.symlink(o,i)}t.exports=l})),P=s(((e,t)=>{var n=w(),r=require(`path`),i=O().mkdirsSync,a=A().utimesMillisSync,o=j();function s(e,t,a){typeof a==`function`&&(a={filter:a}),a||={},a.clobber=`clobber`in a?!!a.clobber:!0,a.overwrite=`overwrite`in a?!!a.overwrite:a.clobber,a.preserveTimestamps&&process.arch===`ia32`&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
5
5
 
6
- see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");const{srcStat:b,destStat:N}=d.checkPathsSync(p,y,"copy",$);if(d.checkParentPathsSync(p,b,y,"copy"),$.filter&&!$.filter(p,y))return;const L=t.dirname(y);return e.existsSync(L)||f(L),r(N,p,y,$)}function r(p,y,$,b){const L=(b.dereference?e.statSync:e.lstatSync)(y);if(L.isDirectory())return R(L,p,y,$,b);if(L.isFile()||L.isCharacterDevice()||L.isBlockDevice())return a(L,p,y,$,b);if(L.isSymbolicLink())return m(p,y,$,b);throw L.isSocket()?new Error(`Cannot copy a socket file: ${y}`):L.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${y}`):new Error(`Unknown file: ${y}`)}function a(p,y,$,b,N){return y?o(p,$,b,N):l(p,$,b,N)}function o(p,y,$,b){if(b.overwrite)return e.unlinkSync($),l(p,y,$,b);if(b.errorOnExist)throw new Error(`'${$}' already exists`)}function l(p,y,$,b){return e.copyFileSync(y,$),b.preserveTimestamps&&c(p.mode,y,$),_($,p.mode)}function c(p,y,$){return g(p)&&E($,p),w(y,$)}function g(p){return(p&128)===0}function E(p,y){return _(p,y|128)}function _(p,y){return e.chmodSync(p,y)}function w(p,y){const $=e.statSync(p);return s(y,$.atime,$.mtime)}function R(p,y,$,b,N){return y?h($,b,N):u(p.mode,$,b,N)}function u(p,y,$,b){return e.mkdirSync($),h(y,$,b),_($,p)}function h(p,y,$){const b=e.opendirSync(p);try{let N;for(;(N=b.readSync())!==null;)n(N.name,p,y,$)}finally{b.closeSync()}}function n(p,y,$,b){const N=t.join(y,p),L=t.join($,p);if(b.filter&&!b.filter(N,L))return;const{destStat:F}=d.checkPathsSync(N,L,"copy",b);return r(F,N,L,b)}function m(p,y,$,b){let N=e.readlinkSync(y);if(b.dereference&&(N=t.resolve(process.cwd(),N)),p){let L;try{L=e.readlinkSync($)}catch(F){if(F.code==="EINVAL"||F.code==="UNKNOWN")return e.symlinkSync(N,$);throw F}if(b.dereference&&(L=t.resolve(process.cwd(),L)),d.isSrcSubdir(N,L))throw new Error(`Cannot copy '${N}' to a subdirectory of itself, '${L}'.`);if(d.isSrcSubdir(L,N))throw new Error(`Cannot overwrite '${L}' with '${N}'.`);return v(N,$)}else return e.symlinkSync(N,$)}function v(p,y){return e.unlinkSync(y),e.symlinkSync(p,y)}return Zn=i,Zn}var Xn,bo;function Bi(){if(bo)return Xn;bo=1;const e=ve().fromPromise;return Xn={copy:e(Af()),copySync:Lf()},Xn}var Yn,Po;function En(){if(Po)return Yn;Po=1;const e=St(),t=ve().fromCallback;function f(d,i){e.rm(d,{recursive:!0,force:!0},i)}function s(d){e.rmSync(d,{recursive:!0,force:!0})}return Yn={remove:t(f),removeSync:s},Yn}var Qn,No;function qf(){if(No)return Qn;No=1;const e=ve().fromPromise,t=Ee(),f=me,s=qe(),d=En(),i=e(async function(o){let l;try{l=await t.readdir(o)}catch{return s.mkdirs(o)}return Promise.all(l.map(c=>d.remove(f.join(o,c))))});function r(a){let o;try{o=t.readdirSync(a)}catch{return s.mkdirsSync(a)}o.forEach(l=>{l=f.join(a,l),d.removeSync(l)})}return Qn={emptyDirSync:r,emptydirSync:r,emptyDir:i,emptydir:i},Qn}var es,Oo;function kf(){if(Oo)return es;Oo=1;const e=ve().fromPromise,t=me,f=Ee(),s=qe();async function d(r){let a;try{a=await f.stat(r)}catch{}if(a&&a.isFile())return;const o=t.dirname(r);let l=null;try{l=await f.stat(o)}catch(c){if(c.code==="ENOENT"){await s.mkdirs(o),await f.writeFile(r,"");return}else throw c}l.isDirectory()?await f.writeFile(r,""):await f.readdir(o)}function i(r){let a;try{a=f.statSync(r)}catch{}if(a&&a.isFile())return;const o=t.dirname(r);try{f.statSync(o).isDirectory()||f.readdirSync(o)}catch(l){if(l&&l.code==="ENOENT")s.mkdirsSync(o);else throw l}f.writeFileSync(r,"")}return es={createFile:e(d),createFileSync:i},es}var ts,Io;function jf(){if(Io)return ts;Io=1;const e=ve().fromPromise,t=me,f=Ee(),s=qe(),{pathExists:d}=st(),{areIdentical:i}=lt();async function r(o,l){let c;try{c=await f.lstat(l)}catch{}let g;try{g=await f.lstat(o)}catch(w){throw w.message=w.message.replace("lstat","ensureLink"),w}if(c&&i(g,c))return;const E=t.dirname(l);await d(E)||await s.mkdirs(E),await f.link(o,l)}function a(o,l){let c;try{c=f.lstatSync(l)}catch{}try{const _=f.lstatSync(o);if(c&&i(_,c))return}catch(_){throw _.message=_.message.replace("lstat","ensureLink"),_}const g=t.dirname(l);return f.existsSync(g)||s.mkdirsSync(g),f.linkSync(o,l)}return ts={createLink:e(r),createLinkSync:a},ts}var rs,To;function Ff(){if(To)return rs;To=1;const e=me,t=Ee(),{pathExists:f}=st(),s=ve().fromPromise;async function d(r,a){if(e.isAbsolute(r)){try{await t.lstat(r)}catch(g){throw g.message=g.message.replace("lstat","ensureSymlink"),g}return{toCwd:r,toDst:r}}const o=e.dirname(a),l=e.join(o,r);if(await f(l))return{toCwd:l,toDst:r};try{await t.lstat(r)}catch(g){throw g.message=g.message.replace("lstat","ensureSymlink"),g}return{toCwd:r,toDst:e.relative(o,r)}}function i(r,a){if(e.isAbsolute(r)){if(!t.existsSync(r))throw new Error("absolute srcpath does not exist");return{toCwd:r,toDst:r}}const o=e.dirname(a),l=e.join(o,r);if(t.existsSync(l))return{toCwd:l,toDst:r};if(!t.existsSync(r))throw new Error("relative srcpath does not exist");return{toCwd:r,toDst:e.relative(o,r)}}return rs={symlinkPaths:s(d),symlinkPathsSync:i},rs}var ns,Co;function Mf(){if(Co)return ns;Co=1;const e=Ee(),t=ve().fromPromise;async function f(d,i){if(i)return i;let r;try{r=await e.lstat(d)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}function s(d,i){if(i)return i;let r;try{r=e.lstatSync(d)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}return ns={symlinkType:t(f),symlinkTypeSync:s},ns}var ss,Do;function Uf(){if(Do)return ss;Do=1;const e=ve().fromPromise,t=me,f=Ee(),{mkdirs:s,mkdirsSync:d}=qe(),{symlinkPaths:i,symlinkPathsSync:r}=Ff(),{symlinkType:a,symlinkTypeSync:o}=Mf(),{pathExists:l}=st(),{areIdentical:c}=lt();async function g(_,w,R){let u;try{u=await f.lstat(w)}catch{}if(u&&u.isSymbolicLink()){const[v,p]=await Promise.all([f.stat(_),f.stat(w)]);if(c(v,p))return}const h=await i(_,w);_=h.toDst;const n=await a(h.toCwd,R),m=t.dirname(w);return await l(m)||await s(m),f.symlink(_,w,n)}function E(_,w,R){let u;try{u=f.lstatSync(w)}catch{}if(u&&u.isSymbolicLink()){const v=f.statSync(_),p=f.statSync(w);if(c(v,p))return}const h=r(_,w);_=h.toDst,R=o(h.toCwd,R);const n=t.dirname(w);return f.existsSync(n)||d(n),f.symlinkSync(_,w,R)}return ss={createSymlink:e(g),createSymlinkSync:E},ss}var is,Ao;function Vf(){if(Ao)return is;Ao=1;const{createFile:e,createFileSync:t}=kf(),{createLink:f,createLinkSync:s}=jf(),{createSymlink:d,createSymlinkSync:i}=Uf();return is={createFile:e,createFileSync:t,ensureFile:e,ensureFileSync:t,createLink:f,createLinkSync:s,ensureLink:f,ensureLinkSync:s,createSymlink:d,createSymlinkSync:i,ensureSymlink:d,ensureSymlinkSync:i},is}var os,Lo;function Wi(){if(Lo)return os;Lo=1;function e(f,{EOL:s=`
7
- `,finalEOL:d=!0,replacer:i=null,spaces:r}={}){const a=d?s:"";return JSON.stringify(f,i,r).replace(/\n/g,s)+a}function t(f){return Buffer.isBuffer(f)&&(f=f.toString("utf8")),f.replace(/^\uFEFF/,"")}return os={stringify:e,stripBom:t},os}var as,qo;function zf(){if(qo)return as;qo=1;let e;try{e=St()}catch{e=ut}const t=ve(),{stringify:f,stripBom:s}=Wi();async function d(g,E={}){typeof E=="string"&&(E={encoding:E});const _=E.fs||e,w="throws"in E?E.throws:!0;let R=await t.fromCallback(_.readFile)(g,E);R=s(R);let u;try{u=JSON.parse(R,E?E.reviver:null)}catch(h){if(w)throw h.message=`${g}: ${h.message}`,h;return null}return u}const i=t.fromPromise(d);function r(g,E={}){typeof E=="string"&&(E={encoding:E});const _=E.fs||e,w="throws"in E?E.throws:!0;try{let R=_.readFileSync(g,E);return R=s(R),JSON.parse(R,E.reviver)}catch(R){if(w)throw R.message=`${g}: ${R.message}`,R;return null}}async function a(g,E,_={}){const w=_.fs||e,R=f(E,_);await t.fromCallback(w.writeFile)(g,R,_)}const o=t.fromPromise(a);function l(g,E,_={}){const w=_.fs||e,R=f(E,_);return w.writeFileSync(g,R,_)}return as={readFile:i,readFileSync:r,writeFile:o,writeFileSync:l},as}var cs,ko;function Gf(){if(ko)return cs;ko=1;const e=zf();return cs={readJson:e.readFile,readJsonSync:e.readFileSync,writeJson:e.writeFile,writeJsonSync:e.writeFileSync},cs}var us,jo;function Ji(){if(jo)return us;jo=1;const e=ve().fromPromise,t=Ee(),f=me,s=qe(),d=st().pathExists;async function i(a,o,l="utf-8"){const c=f.dirname(a);return await d(c)||await s.mkdirs(c),t.writeFile(a,o,l)}function r(a,...o){const l=f.dirname(a);t.existsSync(l)||s.mkdirsSync(l),t.writeFileSync(a,...o)}return us={outputFile:e(i),outputFileSync:r},us}var ls,Fo;function Kf(){if(Fo)return ls;Fo=1;const{stringify:e}=Wi(),{outputFile:t}=Ji();async function f(s,d,i={}){const r=e(d,i);await t(s,r,i)}return ls=f,ls}var fs,Mo;function Hf(){if(Mo)return fs;Mo=1;const{stringify:e}=Wi(),{outputFileSync:t}=Ji();function f(s,d,i){const r=e(d,i);t(s,r,i)}return fs=f,fs}var ds,Uo;function xf(){if(Uo)return ds;Uo=1;const e=ve().fromPromise,t=Gf();return t.outputJson=e(Kf()),t.outputJsonSync=Hf(),t.outputJSON=t.outputJson,t.outputJSONSync=t.outputJsonSync,t.writeJSON=t.writeJson,t.writeJSONSync=t.writeJsonSync,t.readJSON=t.readJson,t.readJSONSync=t.readJsonSync,ds=t,ds}var hs,Vo;function Bf(){if(Vo)return hs;Vo=1;const e=Ee(),t=me,{copy:f}=Bi(),{remove:s}=En(),{mkdirp:d}=qe(),{pathExists:i}=st(),r=lt();async function a(c,g,E={}){const _=E.overwrite||E.clobber||!1,{srcStat:w,isChangingCase:R=!1}=await r.checkPaths(c,g,"move",E);await r.checkParentPaths(c,w,g,"move");const u=t.dirname(g);return t.parse(u).root!==u&&await d(u),o(c,g,_,R)}async function o(c,g,E,_){if(!_){if(E)await s(g);else if(await i(g))throw new Error("dest already exists.")}try{await e.rename(c,g)}catch(w){if(w.code!=="EXDEV")throw w;await l(c,g,E)}}async function l(c,g,E){return await f(c,g,{overwrite:E,errorOnExist:!0,preserveTimestamps:!0}),s(c)}return hs=a,hs}var ms,zo;function Wf(){if(zo)return ms;zo=1;const e=St(),t=me,f=Bi().copySync,s=En().removeSync,d=qe().mkdirpSync,i=lt();function r(g,E,_){_=_||{};const w=_.overwrite||_.clobber||!1,{srcStat:R,isChangingCase:u=!1}=i.checkPathsSync(g,E,"move",_);return i.checkParentPathsSync(g,R,E,"move"),a(E)||d(t.dirname(E)),o(g,E,w,u)}function a(g){const E=t.dirname(g);return t.parse(E).root===E}function o(g,E,_,w){if(w)return l(g,E,_);if(_)return s(E),l(g,E,_);if(e.existsSync(E))throw new Error("dest already exists.");return l(g,E,_)}function l(g,E,_){try{e.renameSync(g,E)}catch(w){if(w.code!=="EXDEV")throw w;return c(g,E,_)}}function c(g,E,_){return f(g,E,{overwrite:_,errorOnExist:!0,preserveTimestamps:!0}),s(g)}return ms=r,ms}var ps,Go;function Jf(){if(Go)return ps;Go=1;const e=ve().fromPromise;return ps={move:e(Bf()),moveSync:Wf()},ps}var ys,Ko;function Zf(){return Ko||(Ko=1,ys={...Ee(),...Bi(),...qf(),...Vf(),...xf(),...qe(),...Jf(),...Ji(),...st(),...En()}),ys}var be=Zf(),Et={exports:{}},vs,Ho;function Xf(){return Ho||(Ho=1,vs=e=>{const t=typeof e;return e!==null&&(t==="object"||t==="function")}),vs}var _s,xo;function Yf(){if(xo)return _s;xo=1;const e=Xf(),t=new Set(["__proto__","prototype","constructor"]),f=d=>!d.some(i=>t.has(i));function s(d){const i=d.split("."),r=[];for(let a=0;a<i.length;a++){let o=i[a];for(;o[o.length-1]==="\\"&&i[a+1]!==void 0;)o=o.slice(0,-1)+".",o+=i[++a];r.push(o)}return f(r)?r:[]}return _s={get(d,i,r){if(!e(d)||typeof i!="string")return r===void 0?d:r;const a=s(i);if(a.length!==0){for(let o=0;o<a.length;o++)if(d=d[a[o]],d==null){if(o!==a.length-1)return r;break}return d===void 0?r:d}},set(d,i,r){if(!e(d)||typeof i!="string")return d;const a=d,o=s(i);for(let l=0;l<o.length;l++){const c=o[l];e(d[c])||(d[c]={}),l===o.length-1&&(d[c]=r),d=d[c]}return a},delete(d,i){if(!e(d)||typeof i!="string")return!1;const r=s(i);for(let a=0;a<r.length;a++){const o=r[a];if(a===r.length-1)return delete d[o],!0;if(d=d[o],!e(d))return!1}},has(d,i){if(!e(d)||typeof i!="string")return!1;const r=s(i);if(r.length===0)return!1;for(let a=0;a<r.length;a++)if(e(d)){if(!(r[a]in d))return!1;d=d[r[a]]}else return!1;return!0}},_s}var Tt={exports:{}},Ct={exports:{}},Dt={exports:{}},At={exports:{}},Bo;function Qf(){if(Bo)return At.exports;Bo=1;const e=ut;return At.exports=t=>new Promise(f=>{e.access(t,s=>{f(!s)})}),At.exports.sync=t=>{try{return e.accessSync(t),!0}catch{return!1}},At.exports}var Lt={exports:{}},qt={exports:{}},Wo;function ed(){if(Wo)return qt.exports;Wo=1;const e=(t,...f)=>new Promise(s=>{s(t(...f))});return qt.exports=e,qt.exports.default=e,qt.exports}var Jo;function td(){if(Jo)return Lt.exports;Jo=1;const e=ed(),t=f=>{if(!((Number.isInteger(f)||f===1/0)&&f>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));const s=[];let d=0;const i=()=>{d--,s.length>0&&s.shift()()},r=(l,c,...g)=>{d++;const E=e(l,...g);c(E),E.then(i,i)},a=(l,c,...g)=>{d<f?r(l,c,...g):s.push(r.bind(null,l,c,...g))},o=(l,...c)=>new Promise(g=>a(l,g,...c));return Object.defineProperties(o,{activeCount:{get:()=>d},pendingCount:{get:()=>s.length},clearQueue:{value:()=>{s.length=0}}}),o};return Lt.exports=t,Lt.exports.default=t,Lt.exports}var gs,Zo;function rd(){if(Zo)return gs;Zo=1;const e=td();class t extends Error{constructor(i){super(),this.value=i}}const f=(d,i)=>Promise.resolve(d).then(i),s=d=>Promise.all(d).then(i=>i[1]===!0&&Promise.reject(new t(i[0])));return gs=(d,i,r)=>{r=Object.assign({concurrency:1/0,preserveOrder:!0},r);const a=e(r.concurrency),o=[...d].map(c=>[c,a(f,c,i)]),l=e(r.preserveOrder?1:1/0);return Promise.all(o.map(c=>l(s,c))).then(()=>{}).catch(c=>c instanceof t?c.value:Promise.reject(c))},gs}var Xo;function nd(){if(Xo)return Dt.exports;Xo=1;const e=me,t=Qf(),f=rd();return Dt.exports=(s,d)=>(d=Object.assign({cwd:process.cwd()},d),f(s,i=>t(e.resolve(d.cwd,i)),d)),Dt.exports.sync=(s,d)=>{d=Object.assign({cwd:process.cwd()},d);for(const i of s)if(t.sync(e.resolve(d.cwd,i)))return i},Dt.exports}var Yo;function sd(){if(Yo)return Ct.exports;Yo=1;const e=me,t=nd();return Ct.exports=(f,s={})=>{const d=e.resolve(s.cwd||""),{root:i}=e.parse(d),r=[].concat(f);return new Promise(a=>{(function o(l){t(r,{cwd:l}).then(c=>{c?a(e.join(l,c)):l===i?a(null):o(e.dirname(l))})})(d)})},Ct.exports.sync=(f,s={})=>{let d=e.resolve(s.cwd||"");const{root:i}=e.parse(d),r=[].concat(f);for(;;){const a=t.sync(r,{cwd:d});if(a)return e.join(d,a);if(d===i)return null;d=e.dirname(d)}},Ct.exports}var Qo;function id(){if(Qo)return Tt.exports;Qo=1;const e=sd();return Tt.exports=async({cwd:t}={})=>e("package.json",{cwd:t}),Tt.exports.sync=({cwd:t}={})=>e.sync("package.json",{cwd:t}),Tt.exports}var kt={exports:{}},ea;function od(){if(ea)return kt.exports;ea=1;const e=me,t=Pf,f=t.homedir(),s=t.tmpdir(),{env:d}=process,i=l=>{const c=e.join(f,"Library");return{data:e.join(c,"Application Support",l),config:e.join(c,"Preferences",l),cache:e.join(c,"Caches",l),log:e.join(c,"Logs",l),temp:e.join(s,l)}},r=l=>{const c=d.APPDATA||e.join(f,"AppData","Roaming"),g=d.LOCALAPPDATA||e.join(f,"AppData","Local");return{data:e.join(g,l,"Data"),config:e.join(c,l,"Config"),cache:e.join(g,l,"Cache"),log:e.join(g,l,"Log"),temp:e.join(s,l)}},a=l=>{const c=e.basename(f);return{data:e.join(d.XDG_DATA_HOME||e.join(f,".local","share"),l),config:e.join(d.XDG_CONFIG_HOME||e.join(f,".config"),l),cache:e.join(d.XDG_CACHE_HOME||e.join(f,".cache"),l),log:e.join(d.XDG_STATE_HOME||e.join(f,".local","state"),l),temp:e.join(s,c,l)}},o=(l,c)=>{if(typeof l!="string")throw new TypeError(`Expected string, got ${typeof l}`);return c=Object.assign({suffix:"nodejs"},c),c.suffix&&(l+=`-${c.suffix}`),process.platform==="darwin"?i(l):process.platform==="win32"?r(l):a(l)};return kt.exports=o,kt.exports.default=o,kt.exports}var Oe={},fe={},ta;function Rt(){if(ta)return fe;ta=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.NOOP=fe.LIMIT_FILES_DESCRIPTORS=fe.LIMIT_BASENAME_LENGTH=fe.IS_USER_ROOT=fe.IS_POSIX=fe.DEFAULT_TIMEOUT_SYNC=fe.DEFAULT_TIMEOUT_ASYNC=fe.DEFAULT_WRITE_OPTIONS=fe.DEFAULT_READ_OPTIONS=fe.DEFAULT_FOLDER_MODE=fe.DEFAULT_FILE_MODE=fe.DEFAULT_ENCODING=void 0;const e="utf8";fe.DEFAULT_ENCODING=e;const t=438;fe.DEFAULT_FILE_MODE=t;const f=511;fe.DEFAULT_FOLDER_MODE=f;const s={};fe.DEFAULT_READ_OPTIONS=s;const d={};fe.DEFAULT_WRITE_OPTIONS=d;const i=5e3;fe.DEFAULT_TIMEOUT_ASYNC=i;const r=100;fe.DEFAULT_TIMEOUT_SYNC=r;const a=!!process.getuid;fe.IS_POSIX=a;const o=process.getuid?!process.getuid():!1;fe.IS_USER_ROOT=o;const l=128;fe.LIMIT_BASENAME_LENGTH=l;const c=1e4;fe.LIMIT_FILES_DESCRIPTORS=c;const g=()=>{};return fe.NOOP=g,fe}var jt={},Je={},ra;function ad(){if(ra)return Je;ra=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.attemptifySync=Je.attemptifyAsync=void 0;const e=Rt(),t=(s,d=e.NOOP)=>function(){return s.apply(void 0,arguments).catch(d)};Je.attemptifyAsync=t;const f=(s,d=e.NOOP)=>function(){try{return s.apply(void 0,arguments)}catch(i){return d(i)}};return Je.attemptifySync=f,Je}var Ft={},na;function cd(){if(na)return Ft;na=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Rt(),t={isChangeErrorOk:f=>{const{code:s}=f;return s==="ENOSYS"||!e.IS_USER_ROOT&&(s==="EINVAL"||s==="EPERM")},isRetriableError:f=>{const{code:s}=f;return s==="EMFILE"||s==="ENFILE"||s==="EAGAIN"||s==="EBUSY"||s==="EACCESS"||s==="EACCS"||s==="EPERM"},onChangeError:f=>{if(!t.isChangeErrorOk(f))throw f}};return Ft.default=t,Ft}var Ze={},Mt={},sa;function ud(){if(sa)return Mt;sa=1,Object.defineProperty(Mt,"__esModule",{value:!0});const t={interval:25,intervalId:void 0,limit:Rt().LIMIT_FILES_DESCRIPTORS,queueActive:new Set,queueWaiting:new Set,init:()=>{t.intervalId||(t.intervalId=setInterval(t.tick,t.interval))},reset:()=>{t.intervalId&&(clearInterval(t.intervalId),delete t.intervalId)},add:f=>{t.queueWaiting.add(f),t.queueActive.size<t.limit/2?t.tick():t.init()},remove:f=>{t.queueWaiting.delete(f),t.queueActive.delete(f)},schedule:()=>new Promise(f=>{const s=()=>t.remove(d),d=()=>f(s);t.add(d)}),tick:()=>{if(!(t.queueActive.size>=t.limit)){if(!t.queueWaiting.size)return t.reset();for(const f of t.queueWaiting){if(t.queueActive.size>=t.limit)break;t.queueWaiting.delete(f),t.queueActive.add(f),f()}}}};return Mt.default=t,Mt}var ia;function ld(){if(ia)return Ze;ia=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.retryifySync=Ze.retryifyAsync=void 0;const e=ud(),t=(s,d)=>function(i){return function r(){return e.default.schedule().then(a=>s.apply(void 0,arguments).then(o=>(a(),o),o=>{if(a(),Date.now()>=i)throw o;if(d(o)){const l=Math.round(100+400*Math.random());return new Promise(g=>setTimeout(g,l)).then(()=>r.apply(void 0,arguments))}throw o}))}};Ze.retryifyAsync=t;const f=(s,d)=>function(i){return function r(){try{return s.apply(void 0,arguments)}catch(a){if(Date.now()>i)throw a;if(d(a))return r.apply(void 0,arguments);throw a}}};return Ze.retryifySync=f,Ze}var oa;function nf(){if(oa)return jt;oa=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=ut,t=xi,f=ad(),s=cd(),d=ld(),i={chmodAttempt:f.attemptifyAsync(t.promisify(e.chmod),s.default.onChangeError),chownAttempt:f.attemptifyAsync(t.promisify(e.chown),s.default.onChangeError),closeAttempt:f.attemptifyAsync(t.promisify(e.close)),fsyncAttempt:f.attemptifyAsync(t.promisify(e.fsync)),mkdirAttempt:f.attemptifyAsync(t.promisify(e.mkdir)),realpathAttempt:f.attemptifyAsync(t.promisify(e.realpath)),statAttempt:f.attemptifyAsync(t.promisify(e.stat)),unlinkAttempt:f.attemptifyAsync(t.promisify(e.unlink)),closeRetry:d.retryifyAsync(t.promisify(e.close),s.default.isRetriableError),fsyncRetry:d.retryifyAsync(t.promisify(e.fsync),s.default.isRetriableError),openRetry:d.retryifyAsync(t.promisify(e.open),s.default.isRetriableError),readFileRetry:d.retryifyAsync(t.promisify(e.readFile),s.default.isRetriableError),renameRetry:d.retryifyAsync(t.promisify(e.rename),s.default.isRetriableError),statRetry:d.retryifyAsync(t.promisify(e.stat),s.default.isRetriableError),writeRetry:d.retryifyAsync(t.promisify(e.write),s.default.isRetriableError),chmodSyncAttempt:f.attemptifySync(e.chmodSync,s.default.onChangeError),chownSyncAttempt:f.attemptifySync(e.chownSync,s.default.onChangeError),closeSyncAttempt:f.attemptifySync(e.closeSync),mkdirSyncAttempt:f.attemptifySync(e.mkdirSync),realpathSyncAttempt:f.attemptifySync(e.realpathSync),statSyncAttempt:f.attemptifySync(e.statSync),unlinkSyncAttempt:f.attemptifySync(e.unlinkSync),closeSyncRetry:d.retryifySync(e.closeSync,s.default.isRetriableError),fsyncSyncRetry:d.retryifySync(e.fsyncSync,s.default.isRetriableError),openSyncRetry:d.retryifySync(e.openSync,s.default.isRetriableError),readFileSyncRetry:d.retryifySync(e.readFileSync,s.default.isRetriableError),renameSyncRetry:d.retryifySync(e.renameSync,s.default.isRetriableError),statSyncRetry:d.retryifySync(e.statSync,s.default.isRetriableError),writeSyncRetry:d.retryifySync(e.writeSync,s.default.isRetriableError)};return jt.default=i,jt}var Ut={},aa;function fd(){if(aa)return Ut;aa=1,Object.defineProperty(Ut,"__esModule",{value:!0});const e={isFunction:t=>typeof t=="function",isString:t=>typeof t=="string",isUndefined:t=>typeof t>"u"};return Ut.default=e,Ut}var Vt={},ca;function dd(){if(ca)return Vt;ca=1,Object.defineProperty(Vt,"__esModule",{value:!0});const e={},t={next:f=>{const s=e[f];if(!s)return;s.shift();const d=s[0];d?d(()=>t.next(f)):delete e[f]},schedule:f=>new Promise(s=>{let d=e[f];d||(d=e[f]=[]),d.push(s),!(d.length>1)&&s(()=>t.next(f))})};return Vt.default=t,Vt}var zt={},ua;function hd(){if(ua)return zt;ua=1,Object.defineProperty(zt,"__esModule",{value:!0});const e=me,t=Rt(),f=nf(),s={store:{},create:d=>{const i=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),r=Date.now().toString().slice(-10),a="tmp-",o=`.${a}${r}${i}`;return`${d}${o}`},get:(d,i,r=!0)=>{const a=s.truncate(i(d));return a in s.store?s.get(d,i,r):(s.store[a]=r,[a,()=>delete s.store[a]])},purge:d=>{s.store[d]&&(delete s.store[d],f.default.unlinkAttempt(d))},purgeSync:d=>{s.store[d]&&(delete s.store[d],f.default.unlinkSyncAttempt(d))},purgeSyncAll:()=>{for(const d in s.store)s.purgeSync(d)},truncate:d=>{const i=e.basename(d);if(i.length<=t.LIMIT_BASENAME_LENGTH)return d;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(i);if(!r)return d;const a=i.length-t.LIMIT_BASENAME_LENGTH;return`${d.slice(0,-i.length)}${r[1]}${r[2].slice(0,-a)}${r[3]}`}};return process.on("exit",s.purgeSyncAll),zt.default=s,zt}var la;function md(){if(la)return Oe;la=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.writeFileSync=Oe.writeFile=Oe.readFileSync=Oe.readFile=void 0;const e=me,t=Rt(),f=nf(),s=fd(),d=dd(),i=hd();function r(g,E=t.DEFAULT_READ_OPTIONS){var _;if(s.default.isString(E))return r(g,{encoding:E});const w=Date.now()+((_=E.timeout)!==null&&_!==void 0?_:t.DEFAULT_TIMEOUT_ASYNC);return f.default.readFileRetry(w)(g,E)}Oe.readFile=r;function a(g,E=t.DEFAULT_READ_OPTIONS){var _;if(s.default.isString(E))return a(g,{encoding:E});const w=Date.now()+((_=E.timeout)!==null&&_!==void 0?_:t.DEFAULT_TIMEOUT_SYNC);return f.default.readFileSyncRetry(w)(g,E)}Oe.readFileSync=a;const o=(g,E,_,w)=>{if(s.default.isFunction(_))return o(g,E,t.DEFAULT_WRITE_OPTIONS,_);const R=l(g,E,_);return w&&R.then(w,w),R};Oe.writeFile=o;const l=async(g,E,_=t.DEFAULT_WRITE_OPTIONS)=>{var w;if(s.default.isString(_))return l(g,E,{encoding:_});const R=Date.now()+((w=_.timeout)!==null&&w!==void 0?w:t.DEFAULT_TIMEOUT_ASYNC);let u=null,h=null,n=null,m=null,v=null;try{_.schedule&&(u=await _.schedule(g)),h=await d.default.schedule(g),g=await f.default.realpathAttempt(g)||g,[m,n]=i.default.get(g,_.tmpCreate||i.default.create,_.tmpPurge!==!1);const p=t.IS_POSIX&&s.default.isUndefined(_.chown),y=s.default.isUndefined(_.mode);if(p||y){const b=await f.default.statAttempt(g);b&&(_={..._},p&&(_.chown={uid:b.uid,gid:b.gid}),y&&(_.mode=b.mode))}const $=e.dirname(g);await f.default.mkdirAttempt($,{mode:t.DEFAULT_FOLDER_MODE,recursive:!0}),v=await f.default.openRetry(R)(m,"w",_.mode||t.DEFAULT_FILE_MODE),_.tmpCreated&&_.tmpCreated(m),s.default.isString(E)?await f.default.writeRetry(R)(v,E,0,_.encoding||t.DEFAULT_ENCODING):s.default.isUndefined(E)||await f.default.writeRetry(R)(v,E,0,E.length,0),_.fsync!==!1&&(_.fsyncWait!==!1?await f.default.fsyncRetry(R)(v):f.default.fsyncAttempt(v)),await f.default.closeRetry(R)(v),v=null,_.chown&&await f.default.chownAttempt(m,_.chown.uid,_.chown.gid),_.mode&&await f.default.chmodAttempt(m,_.mode);try{await f.default.renameRetry(R)(m,g)}catch(b){if(b.code!=="ENAMETOOLONG")throw b;await f.default.renameRetry(R)(m,i.default.truncate(g))}n(),m=null}finally{v&&await f.default.closeAttempt(v),m&&i.default.purge(m),u&&u(),h&&h()}},c=(g,E,_=t.DEFAULT_WRITE_OPTIONS)=>{var w;if(s.default.isString(_))return c(g,E,{encoding:_});const R=Date.now()+((w=_.timeout)!==null&&w!==void 0?w:t.DEFAULT_TIMEOUT_SYNC);let u=null,h=null,n=null;try{g=f.default.realpathSyncAttempt(g)||g,[h,u]=i.default.get(g,_.tmpCreate||i.default.create,_.tmpPurge!==!1);const m=t.IS_POSIX&&s.default.isUndefined(_.chown),v=s.default.isUndefined(_.mode);if(m||v){const y=f.default.statSyncAttempt(g);y&&(_={..._},m&&(_.chown={uid:y.uid,gid:y.gid}),v&&(_.mode=y.mode))}const p=e.dirname(g);f.default.mkdirSyncAttempt(p,{mode:t.DEFAULT_FOLDER_MODE,recursive:!0}),n=f.default.openSyncRetry(R)(h,"w",_.mode||t.DEFAULT_FILE_MODE),_.tmpCreated&&_.tmpCreated(h),s.default.isString(E)?f.default.writeSyncRetry(R)(n,E,0,_.encoding||t.DEFAULT_ENCODING):s.default.isUndefined(E)||f.default.writeSyncRetry(R)(n,E,0,E.length,0),_.fsync!==!1&&(_.fsyncWait!==!1?f.default.fsyncSyncRetry(R)(n):f.default.fsyncAttempt(n)),f.default.closeSyncRetry(R)(n),n=null,_.chown&&f.default.chownSyncAttempt(h,_.chown.uid,_.chown.gid),_.mode&&f.default.chmodSyncAttempt(h,_.mode);try{f.default.renameSyncRetry(R)(h,g)}catch(y){if(y.code!=="ENAMETOOLONG")throw y;f.default.renameSyncRetry(R)(h,i.default.truncate(g))}u(),h=null}finally{n&&f.default.closeSyncAttempt(n),h&&i.default.purge(h)}};return Oe.writeFileSync=c,Oe}var Gt={exports:{}},$s={},ke={},Xe={},Es={},ws={},Ss={},fa;function vn(){return fa||(fa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class f extends t{constructor(n){if(super(),!e.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=f;class s extends t{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((m,v)=>`${m}${v}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((m,v)=>(v instanceof f&&(m[v.str]=(m[v.str]||0)+1),m),{})}}e._Code=s,e.nil=new s("");function d(h,...n){const m=[h[0]];let v=0;for(;v<n.length;)a(m,n[v]),m.push(h[++v]);return new s(m)}e._=d;const i=new s("+");function r(h,...n){const m=[_(h[0])];let v=0;for(;v<n.length;)m.push(i),a(m,n[v]),m.push(i,_(h[++v]));return o(m),new s(m)}e.str=r;function a(h,n){n instanceof s?h.push(...n._items):n instanceof f?h.push(n):h.push(g(n))}e.addCodeArg=a;function o(h){let n=1;for(;n<h.length-1;){if(h[n]===i){const m=l(h[n-1],h[n+1]);if(m!==void 0){h.splice(n-1,3,m);continue}h[n++]="+"}n++}}function l(h,n){if(n==='""')return h;if(h==='""')return n;if(typeof h=="string")return n instanceof f||h[h.length-1]!=='"'?void 0:typeof n!="string"?`${h.slice(0,-1)}${n}"`:n[0]==='"'?h.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(h instanceof f))return`"${h}${n.slice(1)}`}function c(h,n){return n.emptyStr()?h:h.emptyStr()?n:r`${h}${n}`}e.strConcat=c;function g(h){return typeof h=="number"||typeof h=="boolean"||h===null?h:_(Array.isArray(h)?h.join(","):h)}function E(h){return new s(_(h))}e.stringify=E;function _(h){return JSON.stringify(h).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function w(h){return typeof h=="string"&&e.IDENTIFIER.test(h)?new s(`.${h}`):d`[${h}]`}e.getProperty=w;function R(h){if(typeof h=="string"&&e.IDENTIFIER.test(h))return new s(`${h}`);throw new Error(`CodeGen: invalid export name: ${h}, use explicit $id name mapping`)}e.getEsmExportName=R;function u(h){return new s(h.toString())}e.regexpCode=u}(Ss)),Ss}var Rs={},da;function ha(){return da||(da=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=vn();class f extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var s;(function(o){o[o.Started=0]="Started",o[o.Completed=1]="Completed"})(s||(e.UsedValueState=s={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class d{constructor({prefixes:l,parent:c}={}){this._names={},this._prefixes=l,this._parent=c}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const c=this._names[l]||this._nameGroup(l);return`${l}${c.index++}`}_nameGroup(l){var c,g;if(!((g=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||g===void 0)&&g.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=d;class i extends t.Name{constructor(l,c){super(c),this.prefix=l}setValue(l,{property:c,itemIndex:g}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(c)}[${g}]`}}e.ValueScopeName=i;const r=(0,t._)`\n`;class a extends d{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?r:t.nil}}get(){return this._scope}name(l){return new i(l,this._newName(l))}value(l,c){var g;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const E=this.toName(l),{prefix:_}=E,w=(g=c.key)!==null&&g!==void 0?g:c.ref;let R=this._values[_];if(R){const n=R.get(w);if(n)return n}else R=this._values[_]=new Map;R.set(w,E);const u=this._scope[_]||(this._scope[_]=[]),h=u.length;return u[h]=c.ref,E.setValue(c,{property:_,itemIndex:h}),E}getValue(l,c){const g=this._values[l];if(g)return g.get(c)}scopeRefs(l,c=this._values){return this._reduceValues(c,g=>{if(g.scopePath===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return(0,t._)`${l}${g.scopePath}`})}scopeCode(l=this._values,c,g){return this._reduceValues(l,E=>{if(E.value===void 0)throw new Error(`CodeGen: name "${E}" has no value`);return E.value.code},c,g)}_reduceValues(l,c,g={},E){let _=t.nil;for(const w in l){const R=l[w];if(!R)continue;const u=g[w]=g[w]||new Map;R.forEach(h=>{if(u.has(h))return;u.set(h,s.Started);let n=c(h);if(n){const m=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,t._)`${_}${m} ${h} = ${n};${this.opts._n}`}else if(n=E?.(h))_=(0,t._)`${_}${n}${this.opts._n}`;else throw new f(h);u.set(h,s.Completed)})}return _}}e.ValueScope=a}(Rs)),Rs}var ma;function re(){return ma||(ma=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=vn(),f=ha();var s=vn();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return s.Name}});var d=ha();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return d.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return d.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return d.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return d.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class i{optimizeNodes(){return this}optimizeNames(S,P){return this}}class r extends i{constructor(S,P,A){super(),this.varKind=S,this.name=P,this.rhs=A}render({es5:S,_n:P}){const A=S?f.varKinds.var:this.varKind,K=this.rhs===void 0?"":` = ${this.rhs}`;return`${A} ${this.name}${K};`+P}optimizeNames(S,P){if(S[this.name.str])return this.rhs&&(this.rhs=U(this.rhs,S,P)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends i{constructor(S,P,A){super(),this.lhs=S,this.rhs=P,this.sideEffects=A}render({_n:S}){return`${this.lhs} = ${this.rhs};`+S}optimizeNames(S,P){if(!(this.lhs instanceof t.Name&&!S[this.lhs.str]&&!this.sideEffects))return this.rhs=U(this.rhs,S,P),this}get names(){const S=this.lhs instanceof t.Name?{}:{...this.lhs.names};return M(S,this.rhs)}}class o extends a{constructor(S,P,A,K){super(S,A,K),this.op=P}render({_n:S}){return`${this.lhs} ${this.op}= ${this.rhs};`+S}}class l extends i{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`${this.label}:`+S}}class c extends i{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`break${this.label?` ${this.label}`:""};`+S}}class g extends i{constructor(S){super(),this.error=S}render({_n:S}){return`throw ${this.error};`+S}get names(){return this.error.names}}class E extends i{constructor(S){super(),this.code=S}render({_n:S}){return`${this.code};`+S}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(S,P){return this.code=U(this.code,S,P),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class _ extends i{constructor(S=[]){super(),this.nodes=S}render(S){return this.nodes.reduce((P,A)=>P+A.render(S),"")}optimizeNodes(){const{nodes:S}=this;let P=S.length;for(;P--;){const A=S[P].optimizeNodes();Array.isArray(A)?S.splice(P,1,...A):A?S[P]=A:S.splice(P,1)}return S.length>0?this:void 0}optimizeNames(S,P){const{nodes:A}=this;let K=A.length;for(;K--;){const B=A[K];B.optimizeNames(S,P)||(z(S,B.names),A.splice(K,1))}return A.length>0?this:void 0}get names(){return this.nodes.reduce((S,P)=>H(S,P.names),{})}}class w extends _{render(S){return"{"+S._n+super.render(S)+"}"+S._n}}class R extends _{}class u extends w{}u.kind="else";class h extends w{constructor(S,P){super(P),this.condition=S}render(S){let P=`if(${this.condition})`+super.render(S);return this.else&&(P+="else "+this.else.render(S)),P}optimizeNodes(){super.optimizeNodes();const S=this.condition;if(S===!0)return this.nodes;let P=this.else;if(P){const A=P.optimizeNodes();P=this.else=Array.isArray(A)?new u(A):A}if(P)return S===!1?P instanceof h?P:P.nodes:this.nodes.length?this:new h(J(S),P instanceof h?[P]:P.nodes);if(!(S===!1||!this.nodes.length))return this}optimizeNames(S,P){var A;if(this.else=(A=this.else)===null||A===void 0?void 0:A.optimizeNames(S,P),!!(super.optimizeNames(S,P)||this.else))return this.condition=U(this.condition,S,P),this}get names(){const S=super.names;return M(S,this.condition),this.else&&H(S,this.else.names),S}}h.kind="if";class n extends w{}n.kind="for";class m extends n{constructor(S){super(),this.iteration=S}render(S){return`for(${this.iteration})`+super.render(S)}optimizeNames(S,P){if(super.optimizeNames(S,P))return this.iteration=U(this.iteration,S,P),this}get names(){return H(super.names,this.iteration.names)}}class v extends n{constructor(S,P,A,K){super(),this.varKind=S,this.name=P,this.from=A,this.to=K}render(S){const P=S.es5?f.varKinds.var:this.varKind,{name:A,from:K,to:B}=this;return`for(${P} ${A}=${K}; ${A}<${B}; ${A}++)`+super.render(S)}get names(){const S=M(super.names,this.from);return M(S,this.to)}}class p extends n{constructor(S,P,A,K){super(),this.loop=S,this.varKind=P,this.name=A,this.iterable=K}render(S){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(S)}optimizeNames(S,P){if(super.optimizeNames(S,P))return this.iterable=U(this.iterable,S,P),this}get names(){return H(super.names,this.iterable.names)}}class y extends w{constructor(S,P,A){super(),this.name=S,this.args=P,this.async=A}render(S){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(S)}}y.kind="func";class $ extends _{render(S){return"return "+super.render(S)}}$.kind="return";class b extends w{render(S){let P="try"+super.render(S);return this.catch&&(P+=this.catch.render(S)),this.finally&&(P+=this.finally.render(S)),P}optimizeNodes(){var S,P;return super.optimizeNodes(),(S=this.catch)===null||S===void 0||S.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(S,P){var A,K;return super.optimizeNames(S,P),(A=this.catch)===null||A===void 0||A.optimizeNames(S,P),(K=this.finally)===null||K===void 0||K.optimizeNames(S,P),this}get names(){const S=super.names;return this.catch&&H(S,this.catch.names),this.finally&&H(S,this.finally.names),S}}class N extends w{constructor(S){super(),this.error=S}render(S){return`catch(${this.error})`+super.render(S)}}N.kind="catch";class L extends w{render(S){return"finally"+super.render(S)}}L.kind="finally";class F{constructor(S,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
8
- `:""},this._extScope=S,this._scope=new f.Scope({parent:S}),this._nodes=[new R]}toString(){return this._root.render(this.opts)}name(S){return this._scope.name(S)}scopeName(S){return this._extScope.name(S)}scopeValue(S,P){const A=this._extScope.value(S,P);return(this._values[A.prefix]||(this._values[A.prefix]=new Set)).add(A),A}getScopeValue(S,P){return this._extScope.getValue(S,P)}scopeRefs(S){return this._extScope.scopeRefs(S,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(S,P,A,K){const B=this._scope.toName(P);return A!==void 0&&K&&(this._constants[B.str]=A),this._leafNode(new r(S,B,A)),B}const(S,P,A){return this._def(f.varKinds.const,S,P,A)}let(S,P,A){return this._def(f.varKinds.let,S,P,A)}var(S,P,A){return this._def(f.varKinds.var,S,P,A)}assign(S,P,A){return this._leafNode(new a(S,P,A))}add(S,P){return this._leafNode(new o(S,e.operators.ADD,P))}code(S){return typeof S=="function"?S():S!==t.nil&&this._leafNode(new E(S)),this}object(...S){const P=["{"];for(const[A,K]of S)P.length>1&&P.push(","),P.push(A),(A!==K||this.opts.es5)&&(P.push(":"),(0,t.addCodeArg)(P,K));return P.push("}"),new t._Code(P)}if(S,P,A){if(this._blockNode(new h(S)),P&&A)this.code(P).else().code(A).endIf();else if(P)this.code(P).endIf();else if(A)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(S){return this._elseNode(new h(S))}else(){return this._elseNode(new u)}endIf(){return this._endBlockNode(h,u)}_for(S,P){return this._blockNode(S),P&&this.code(P).endFor(),this}for(S,P){return this._for(new m(S),P)}forRange(S,P,A,K,B=this.opts.es5?f.varKinds.var:f.varKinds.let){const X=this._scope.toName(S);return this._for(new v(B,X,P,A),()=>K(X))}forOf(S,P,A,K=f.varKinds.const){const B=this._scope.toName(S);if(this.opts.es5){const X=P instanceof t.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,t._)`${X}.length`,Z=>{this.var(B,(0,t._)`${X}[${Z}]`),A(B)})}return this._for(new p("of",K,B,P),()=>A(B))}forIn(S,P,A,K=this.opts.es5?f.varKinds.var:f.varKinds.const){if(this.opts.ownProperties)return this.forOf(S,(0,t._)`Object.keys(${P})`,A);const B=this._scope.toName(S);return this._for(new p("in",K,B,P),()=>A(B))}endFor(){return this._endBlockNode(n)}label(S){return this._leafNode(new l(S))}break(S){return this._leafNode(new c(S))}return(S){const P=new $;if(this._blockNode(P),this.code(S),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}try(S,P,A){if(!P&&!A)throw new Error('CodeGen: "try" without "catch" and "finally"');const K=new b;if(this._blockNode(K),this.code(S),P){const B=this.name("e");this._currNode=K.catch=new N(B),P(B)}return A&&(this._currNode=K.finally=new L,this.code(A)),this._endBlockNode(N,L)}throw(S){return this._leafNode(new g(S))}block(S,P){return this._blockStarts.push(this._nodes.length),S&&this.code(S).endBlock(P),this}endBlock(S){const P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");const A=this._nodes.length-P;if(A<0||S!==void 0&&A!==S)throw new Error(`CodeGen: wrong number of nodes: ${A} vs ${S} expected`);return this._nodes.length=P,this}func(S,P=t.nil,A,K){return this._blockNode(new y(S,P,A)),K&&this.code(K).endFunc(),this}endFunc(){return this._endBlockNode(y)}optimize(S=1){for(;S-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(S){return this._currNode.nodes.push(S),this}_blockNode(S){this._currNode.nodes.push(S),this._nodes.push(S)}_endBlockNode(S,P){const A=this._currNode;if(A instanceof S||P&&A instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${S.kind}/${P.kind}`:S.kind}"`)}_elseNode(S){const P=this._currNode;if(!(P instanceof h))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=S,this}get _root(){return this._nodes[0]}get _currNode(){const S=this._nodes;return S[S.length-1]}set _currNode(S){const P=this._nodes;P[P.length-1]=S}}e.CodeGen=F;function H(T,S){for(const P in S)T[P]=(T[P]||0)+(S[P]||0);return T}function M(T,S){return S instanceof t._CodeOrName?H(T,S.names):T}function U(T,S,P){if(T instanceof t.Name)return A(T);if(!K(T))return T;return new t._Code(T._items.reduce((B,X)=>(X instanceof t.Name&&(X=A(X)),X instanceof t._Code?B.push(...X._items):B.push(X),B),[]));function A(B){const X=P[B.str];return X===void 0||S[B.str]!==1?B:(delete S[B.str],X)}function K(B){return B instanceof t._Code&&B._items.some(X=>X instanceof t.Name&&S[X.str]===1&&P[X.str]!==void 0)}}function z(T,S){for(const P in S)T[P]=(T[P]||0)-(S[P]||0)}function J(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${q(T)}`}e.not=J;const W=O(e.operators.AND);function j(...T){return T.reduce(W)}e.and=j;const G=O(e.operators.OR);function D(...T){return T.reduce(G)}e.or=D;function O(T){return(S,P)=>S===t.nil?P:P===t.nil?S:(0,t._)`${q(S)} ${T} ${q(P)}`}function q(T){return T instanceof t.Name?T:(0,t._)`(${T})`}}(ws)),ws}var Q={},pa;function ie(){if(pa)return Q;pa=1,Object.defineProperty(Q,"__esModule",{value:!0}),Q.checkStrictMode=Q.getErrorPath=Q.Type=Q.useFunc=Q.setEvaluated=Q.evaluatedPropsToName=Q.mergeEvaluated=Q.eachItem=Q.unescapeJsonPointer=Q.escapeJsonPointer=Q.escapeFragment=Q.unescapeFragment=Q.schemaRefOrVal=Q.schemaHasRulesButRef=Q.schemaHasRules=Q.checkUnknownRules=Q.alwaysValidSchema=Q.toHash=void 0;const e=re(),t=vn();function f(p){const y={};for(const $ of p)y[$]=!0;return y}Q.toHash=f;function s(p,y){return typeof y=="boolean"?y:Object.keys(y).length===0?!0:(d(p,y),!i(y,p.self.RULES.all))}Q.alwaysValidSchema=s;function d(p,y=p.schema){const{opts:$,self:b}=p;if(!$.strictSchema||typeof y=="boolean")return;const N=b.RULES.keywords;for(const L in y)N[L]||v(p,`unknown keyword: "${L}"`)}Q.checkUnknownRules=d;function i(p,y){if(typeof p=="boolean")return!p;for(const $ in p)if(y[$])return!0;return!1}Q.schemaHasRules=i;function r(p,y){if(typeof p=="boolean")return!p;for(const $ in p)if($!=="$ref"&&y.all[$])return!0;return!1}Q.schemaHasRulesButRef=r;function a({topSchemaRef:p,schemaPath:y},$,b,N){if(!N){if(typeof $=="number"||typeof $=="boolean")return $;if(typeof $=="string")return(0,e._)`${$}`}return(0,e._)`${p}${y}${(0,e.getProperty)(b)}`}Q.schemaRefOrVal=a;function o(p){return g(decodeURIComponent(p))}Q.unescapeFragment=o;function l(p){return encodeURIComponent(c(p))}Q.escapeFragment=l;function c(p){return typeof p=="number"?`${p}`:p.replace(/~/g,"~0").replace(/\//g,"~1")}Q.escapeJsonPointer=c;function g(p){return p.replace(/~1/g,"/").replace(/~0/g,"~")}Q.unescapeJsonPointer=g;function E(p,y){if(Array.isArray(p))for(const $ of p)y($);else y(p)}Q.eachItem=E;function _({mergeNames:p,mergeToName:y,mergeValues:$,resultToName:b}){return(N,L,F,H)=>{const M=F===void 0?L:F instanceof e.Name?(L instanceof e.Name?p(N,L,F):y(N,L,F),F):L instanceof e.Name?(y(N,F,L),L):$(L,F);return H===e.Name&&!(M instanceof e.Name)?b(N,M):M}}Q.mergeEvaluated={props:_({mergeNames:(p,y,$)=>p.if((0,e._)`${$} !== true && ${y} !== undefined`,()=>{p.if((0,e._)`${y} === true`,()=>p.assign($,!0),()=>p.assign($,(0,e._)`${$} || {}`).code((0,e._)`Object.assign(${$}, ${y})`))}),mergeToName:(p,y,$)=>p.if((0,e._)`${$} !== true`,()=>{y===!0?p.assign($,!0):(p.assign($,(0,e._)`${$} || {}`),R(p,$,y))}),mergeValues:(p,y)=>p===!0?!0:{...p,...y},resultToName:w}),items:_({mergeNames:(p,y,$)=>p.if((0,e._)`${$} !== true && ${y} !== undefined`,()=>p.assign($,(0,e._)`${y} === true ? true : ${$} > ${y} ? ${$} : ${y}`)),mergeToName:(p,y,$)=>p.if((0,e._)`${$} !== true`,()=>p.assign($,y===!0?!0:(0,e._)`${$} > ${y} ? ${$} : ${y}`)),mergeValues:(p,y)=>p===!0?!0:Math.max(p,y),resultToName:(p,y)=>p.var("items",y)})};function w(p,y){if(y===!0)return p.var("props",!0);const $=p.var("props",(0,e._)`{}`);return y!==void 0&&R(p,$,y),$}Q.evaluatedPropsToName=w;function R(p,y,$){Object.keys($).forEach(b=>p.assign((0,e._)`${y}${(0,e.getProperty)(b)}`,!0))}Q.setEvaluated=R;const u={};function h(p,y){return p.scopeValue("func",{ref:y,code:u[y.code]||(u[y.code]=new t._Code(y.code))})}Q.useFunc=h;var n;(function(p){p[p.Num=0]="Num",p[p.Str=1]="Str"})(n||(Q.Type=n={}));function m(p,y,$){if(p instanceof e.Name){const b=y===n.Num;return $?b?(0,e._)`"[" + ${p} + "]"`:(0,e._)`"['" + ${p} + "']"`:b?(0,e._)`"/" + ${p}`:(0,e._)`"/" + ${p}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return $?(0,e.getProperty)(p).toString():"/"+c(p)}Q.getErrorPath=m;function v(p,y,$=p.opts.strictSchema){if($){if(y=`strict mode: ${y}`,$===!0)throw new Error(y);p.self.logger.warn(y)}}return Q.checkStrictMode=v,Q}var Kt={},ya;function Ke(){if(ya)return Kt;ya=1,Object.defineProperty(Kt,"__esModule",{value:!0});const e=re(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Kt.default=t,Kt}var va;function wn(){return va||(va=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=re(),f=ie(),s=Ke();e.keywordError={message:({keyword:u})=>(0,t.str)`must pass "${u}" keyword validation`},e.keyword$DataError={message:({keyword:u,schemaType:h})=>h?(0,t.str)`"${u}" keyword must be ${h} ($data)`:(0,t.str)`"${u}" keyword is invalid ($data)`};function d(u,h=e.keywordError,n,m){const{it:v}=u,{gen:p,compositeRule:y,allErrors:$}=v,b=g(u,h,n);m??(y||$)?o(p,b):l(v,(0,t._)`[${b}]`)}e.reportError=d;function i(u,h=e.keywordError,n){const{it:m}=u,{gen:v,compositeRule:p,allErrors:y}=m,$=g(u,h,n);o(v,$),p||y||l(m,s.default.vErrors)}e.reportExtraError=i;function r(u,h){u.assign(s.default.errors,h),u.if((0,t._)`${s.default.vErrors} !== null`,()=>u.if(h,()=>u.assign((0,t._)`${s.default.vErrors}.length`,h),()=>u.assign(s.default.vErrors,null)))}e.resetErrorsCount=r;function a({gen:u,keyword:h,schemaValue:n,data:m,errsCount:v,it:p}){if(v===void 0)throw new Error("ajv implementation error");const y=u.name("err");u.forRange("i",v,s.default.errors,$=>{u.const(y,(0,t._)`${s.default.vErrors}[${$}]`),u.if((0,t._)`${y}.instancePath === undefined`,()=>u.assign((0,t._)`${y}.instancePath`,(0,t.strConcat)(s.default.instancePath,p.errorPath))),u.assign((0,t._)`${y}.schemaPath`,(0,t.str)`${p.errSchemaPath}/${h}`),p.opts.verbose&&(u.assign((0,t._)`${y}.schema`,n),u.assign((0,t._)`${y}.data`,m))})}e.extendErrors=a;function o(u,h){const n=u.const("err",h);u.if((0,t._)`${s.default.vErrors} === null`,()=>u.assign(s.default.vErrors,(0,t._)`[${n}]`),(0,t._)`${s.default.vErrors}.push(${n})`),u.code((0,t._)`${s.default.errors}++`)}function l(u,h){const{gen:n,validateName:m,schemaEnv:v}=u;v.$async?n.throw((0,t._)`new ${u.ValidationError}(${h})`):(n.assign((0,t._)`${m}.errors`,h),n.return(!1))}const c={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function g(u,h,n){const{createErrors:m}=u.it;return m===!1?(0,t._)`{}`:E(u,h,n)}function E(u,h,n={}){const{gen:m,it:v}=u,p=[_(v,n),w(u,n)];return R(u,h,p),m.object(...p)}function _({errorPath:u},{instancePath:h}){const n=h?(0,t.str)`${u}${(0,f.getErrorPath)(h,f.Type.Str)}`:u;return[s.default.instancePath,(0,t.strConcat)(s.default.instancePath,n)]}function w({keyword:u,it:{errSchemaPath:h}},{schemaPath:n,parentSchema:m}){let v=m?h:(0,t.str)`${h}/${u}`;return n&&(v=(0,t.str)`${v}${(0,f.getErrorPath)(n,f.Type.Str)}`),[c.schemaPath,v]}function R(u,{params:h,message:n},m){const{keyword:v,data:p,schemaValue:y,it:$}=u,{opts:b,propertyName:N,topSchemaRef:L,schemaPath:F}=$;m.push([c.keyword,v],[c.params,typeof h=="function"?h(u):h||(0,t._)`{}`]),b.messages&&m.push([c.message,typeof n=="function"?n(u):n]),b.verbose&&m.push([c.schema,y],[c.parentSchema,(0,t._)`${L}${F}`],[s.default.data,p]),N&&m.push([c.propertyName,N])}}(Es)),Es}var _a;function pd(){if(_a)return Xe;_a=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.boolOrEmptySchema=Xe.topBoolOrEmptySchema=void 0;const e=wn(),t=re(),f=Ke(),s={message:"boolean schema is false"};function d(a){const{gen:o,schema:l,validateName:c}=a;l===!1?r(a,!1):typeof l=="object"&&l.$async===!0?o.return(f.default.data):(o.assign((0,t._)`${c}.errors`,null),o.return(!0))}Xe.topBoolOrEmptySchema=d;function i(a,o){const{gen:l,schema:c}=a;c===!1?(l.var(o,!1),r(a)):l.var(o,!0)}Xe.boolOrEmptySchema=i;function r(a,o){const{gen:l,data:c}=a,g={gen:l,keyword:"false schema",data:c,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(g,s,void 0,o)}return Xe}var pe={},Ye={},ga;function sf(){if(ga)return Ye;ga=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.getRules=Ye.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function f(d){return typeof d=="string"&&t.has(d)}Ye.isJSONType=f;function s(){const d={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...d,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},d.number,d.string,d.array,d.object],post:{rules:[]},all:{},keywords:{}}}return Ye.getRules=s,Ye}var je={},$a;function of(){if($a)return je;$a=1,Object.defineProperty(je,"__esModule",{value:!0}),je.shouldUseRule=je.shouldUseGroup=je.schemaHasRulesForType=void 0;function e({schema:s,self:d},i){const r=d.RULES.types[i];return r&&r!==!0&&t(s,r)}je.schemaHasRulesForType=e;function t(s,d){return d.rules.some(i=>f(s,i))}je.shouldUseGroup=t;function f(s,d){var i;return s[d.keyword]!==void 0||((i=d.definition.implements)===null||i===void 0?void 0:i.some(r=>s[r]!==void 0))}return je.shouldUseRule=f,je}var Ea;function _n(){if(Ea)return pe;Ea=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.reportTypeError=pe.checkDataTypes=pe.checkDataType=pe.coerceAndCheckDataType=pe.getJSONTypes=pe.getSchemaTypes=pe.DataType=void 0;const e=sf(),t=of(),f=wn(),s=re(),d=ie();var i;(function(n){n[n.Correct=0]="Correct",n[n.Wrong=1]="Wrong"})(i||(pe.DataType=i={}));function r(n){const m=a(n.type);if(m.includes("null")){if(n.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!m.length&&n.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');n.nullable===!0&&m.push("null")}return m}pe.getSchemaTypes=r;function a(n){const m=Array.isArray(n)?n:n?[n]:[];if(m.every(e.isJSONType))return m;throw new Error("type must be JSONType or JSONType[]: "+m.join(","))}pe.getJSONTypes=a;function o(n,m){const{gen:v,data:p,opts:y}=n,$=c(m,y.coerceTypes),b=m.length>0&&!($.length===0&&m.length===1&&(0,t.schemaHasRulesForType)(n,m[0]));if(b){const N=w(m,p,y.strictNumbers,i.Wrong);v.if(N,()=>{$.length?g(n,m,$):u(n)})}return b}pe.coerceAndCheckDataType=o;const l=new Set(["string","number","integer","boolean","null"]);function c(n,m){return m?n.filter(v=>l.has(v)||m==="array"&&v==="array"):[]}function g(n,m,v){const{gen:p,data:y,opts:$}=n,b=p.let("dataType",(0,s._)`typeof ${y}`),N=p.let("coerced",(0,s._)`undefined`);$.coerceTypes==="array"&&p.if((0,s._)`${b} == 'object' && Array.isArray(${y}) && ${y}.length == 1`,()=>p.assign(y,(0,s._)`${y}[0]`).assign(b,(0,s._)`typeof ${y}`).if(w(m,y,$.strictNumbers),()=>p.assign(N,y))),p.if((0,s._)`${N} !== undefined`);for(const F of v)(l.has(F)||F==="array"&&$.coerceTypes==="array")&&L(F);p.else(),u(n),p.endIf(),p.if((0,s._)`${N} !== undefined`,()=>{p.assign(y,N),E(n,N)});function L(F){switch(F){case"string":p.elseIf((0,s._)`${b} == "number" || ${b} == "boolean"`).assign(N,(0,s._)`"" + ${y}`).elseIf((0,s._)`${y} === null`).assign(N,(0,s._)`""`);return;case"number":p.elseIf((0,s._)`${b} == "boolean" || ${y} === null
9
- || (${b} == "string" && ${y} && ${y} == +${y})`).assign(N,(0,s._)`+${y}`);return;case"integer":p.elseIf((0,s._)`${b} === "boolean" || ${y} === null
10
- || (${b} === "string" && ${y} && ${y} == +${y} && !(${y} % 1))`).assign(N,(0,s._)`+${y}`);return;case"boolean":p.elseIf((0,s._)`${y} === "false" || ${y} === 0 || ${y} === null`).assign(N,!1).elseIf((0,s._)`${y} === "true" || ${y} === 1`).assign(N,!0);return;case"null":p.elseIf((0,s._)`${y} === "" || ${y} === 0 || ${y} === false`),p.assign(N,null);return;case"array":p.elseIf((0,s._)`${b} === "string" || ${b} === "number"
11
- || ${b} === "boolean" || ${y} === null`).assign(N,(0,s._)`[${y}]`)}}}function E({gen:n,parentData:m,parentDataProperty:v},p){n.if((0,s._)`${m} !== undefined`,()=>n.assign((0,s._)`${m}[${v}]`,p))}function _(n,m,v,p=i.Correct){const y=p===i.Correct?s.operators.EQ:s.operators.NEQ;let $;switch(n){case"null":return(0,s._)`${m} ${y} null`;case"array":$=(0,s._)`Array.isArray(${m})`;break;case"object":$=(0,s._)`${m} && typeof ${m} == "object" && !Array.isArray(${m})`;break;case"integer":$=b((0,s._)`!(${m} % 1) && !isNaN(${m})`);break;case"number":$=b();break;default:return(0,s._)`typeof ${m} ${y} ${n}`}return p===i.Correct?$:(0,s.not)($);function b(N=s.nil){return(0,s.and)((0,s._)`typeof ${m} == "number"`,N,v?(0,s._)`isFinite(${m})`:s.nil)}}pe.checkDataType=_;function w(n,m,v,p){if(n.length===1)return _(n[0],m,v,p);let y;const $=(0,d.toHash)(n);if($.array&&$.object){const b=(0,s._)`typeof ${m} != "object"`;y=$.null?b:(0,s._)`!${m} || ${b}`,delete $.null,delete $.array,delete $.object}else y=s.nil;$.number&&delete $.integer;for(const b in $)y=(0,s.and)(y,_(b,m,v,p));return y}pe.checkDataTypes=w;const R={message:({schema:n})=>`must be ${n}`,params:({schema:n,schemaValue:m})=>typeof n=="string"?(0,s._)`{type: ${n}}`:(0,s._)`{type: ${m}}`};function u(n){const m=h(n);(0,f.reportError)(m,R)}pe.reportTypeError=u;function h(n){const{gen:m,data:v,schema:p}=n,y=(0,d.schemaRefOrVal)(n,p,"type");return{gen:m,keyword:"type",data:v,schema:p.type,schemaCode:y,schemaValue:y,parentSchema:p,params:{},it:n}}return pe}var mt={},wa;function yd(){if(wa)return mt;wa=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.assignDefaults=void 0;const e=re(),t=ie();function f(d,i){const{properties:r,items:a}=d.schema;if(i==="object"&&r)for(const o in r)s(d,o,r[o].default);else i==="array"&&Array.isArray(a)&&a.forEach((o,l)=>s(d,l,o.default))}mt.assignDefaults=f;function s(d,i,r){const{gen:a,compositeRule:o,data:l,opts:c}=d;if(r===void 0)return;const g=(0,e._)`${l}${(0,e.getProperty)(i)}`;if(o){(0,t.checkStrictMode)(d,`default is ignored for: ${g}`);return}let E=(0,e._)`${g} === undefined`;c.useDefaults==="empty"&&(E=(0,e._)`${E} || ${g} === null || ${g} === ""`),a.if(E,(0,e._)`${g} = ${(0,e.stringify)(r)}`)}return mt}var Ie={},ue={},Sa;function Ce(){if(Sa)return ue;Sa=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.validateUnion=ue.validateArray=ue.usePattern=ue.callValidateCode=ue.schemaProperties=ue.allSchemaProperties=ue.noPropertyInData=ue.propertyInData=ue.isOwnProperty=ue.hasPropFunc=ue.reportMissingProp=ue.checkMissingProp=ue.checkReportMissingProp=void 0;const e=re(),t=ie(),f=Ke(),s=ie();function d(n,m){const{gen:v,data:p,it:y}=n;v.if(c(v,p,m,y.opts.ownProperties),()=>{n.setParams({missingProperty:(0,e._)`${m}`},!0),n.error()})}ue.checkReportMissingProp=d;function i({gen:n,data:m,it:{opts:v}},p,y){return(0,e.or)(...p.map($=>(0,e.and)(c(n,m,$,v.ownProperties),(0,e._)`${y} = ${$}`)))}ue.checkMissingProp=i;function r(n,m){n.setParams({missingProperty:m},!0),n.error()}ue.reportMissingProp=r;function a(n){return n.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}ue.hasPropFunc=a;function o(n,m,v){return(0,e._)`${a(n)}.call(${m}, ${v})`}ue.isOwnProperty=o;function l(n,m,v,p){const y=(0,e._)`${m}${(0,e.getProperty)(v)} !== undefined`;return p?(0,e._)`${y} && ${o(n,m,v)}`:y}ue.propertyInData=l;function c(n,m,v,p){const y=(0,e._)`${m}${(0,e.getProperty)(v)} === undefined`;return p?(0,e.or)(y,(0,e.not)(o(n,m,v))):y}ue.noPropertyInData=c;function g(n){return n?Object.keys(n).filter(m=>m!=="__proto__"):[]}ue.allSchemaProperties=g;function E(n,m){return g(m).filter(v=>!(0,t.alwaysValidSchema)(n,m[v]))}ue.schemaProperties=E;function _({schemaCode:n,data:m,it:{gen:v,topSchemaRef:p,schemaPath:y,errorPath:$},it:b},N,L,F){const H=F?(0,e._)`${n}, ${m}, ${p}${y}`:m,M=[[f.default.instancePath,(0,e.strConcat)(f.default.instancePath,$)],[f.default.parentData,b.parentData],[f.default.parentDataProperty,b.parentDataProperty],[f.default.rootData,f.default.rootData]];b.opts.dynamicRef&&M.push([f.default.dynamicAnchors,f.default.dynamicAnchors]);const U=(0,e._)`${H}, ${v.object(...M)}`;return L!==e.nil?(0,e._)`${N}.call(${L}, ${U})`:(0,e._)`${N}(${U})`}ue.callValidateCode=_;const w=(0,e._)`new RegExp`;function R({gen:n,it:{opts:m}},v){const p=m.unicodeRegExp?"u":"",{regExp:y}=m.code,$=y(v,p);return n.scopeValue("pattern",{key:$.toString(),ref:$,code:(0,e._)`${y.code==="new RegExp"?w:(0,s.useFunc)(n,y)}(${v}, ${p})`})}ue.usePattern=R;function u(n){const{gen:m,data:v,keyword:p,it:y}=n,$=m.name("valid");if(y.allErrors){const N=m.let("valid",!0);return b(()=>m.assign(N,!1)),N}return m.var($,!0),b(()=>m.break()),$;function b(N){const L=m.const("len",(0,e._)`${v}.length`);m.forRange("i",0,L,F=>{n.subschema({keyword:p,dataProp:F,dataPropType:t.Type.Num},$),m.if((0,e.not)($),N)})}}ue.validateArray=u;function h(n){const{gen:m,schema:v,keyword:p,it:y}=n;if(!Array.isArray(v))throw new Error("ajv implementation error");if(v.some(L=>(0,t.alwaysValidSchema)(y,L))&&!y.opts.unevaluated)return;const b=m.let("valid",!1),N=m.name("_valid");m.block(()=>v.forEach((L,F)=>{const H=n.subschema({keyword:p,schemaProp:F,compositeRule:!0},N);m.assign(b,(0,e._)`${b} || ${N}`),n.mergeValidEvaluated(H,N)||m.if((0,e.not)(b))})),n.result(b,()=>n.reset(),()=>n.error(!0))}return ue.validateUnion=h,ue}var Ra;function vd(){if(Ra)return Ie;Ra=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.validateKeywordUsage=Ie.validSchemaType=Ie.funcKeywordCode=Ie.macroKeywordCode=void 0;const e=re(),t=Ke(),f=Ce(),s=wn();function d(E,_){const{gen:w,keyword:R,schema:u,parentSchema:h,it:n}=E,m=_.macro.call(n.self,u,h,n),v=l(w,R,m);n.opts.validateSchema!==!1&&n.self.validateSchema(m,!0);const p=w.name("valid");E.subschema({schema:m,schemaPath:e.nil,errSchemaPath:`${n.errSchemaPath}/${R}`,topSchemaRef:v,compositeRule:!0},p),E.pass(p,()=>E.error(!0))}Ie.macroKeywordCode=d;function i(E,_){var w;const{gen:R,keyword:u,schema:h,parentSchema:n,$data:m,it:v}=E;o(v,_);const p=!m&&_.compile?_.compile.call(v.self,h,n,v):_.validate,y=l(R,u,p),$=R.let("valid");E.block$data($,b),E.ok((w=_.valid)!==null&&w!==void 0?w:$);function b(){if(_.errors===!1)F(),_.modifying&&r(E),H(()=>E.error());else{const M=_.async?N():L();_.modifying&&r(E),H(()=>a(E,M))}}function N(){const M=R.let("ruleErrs",null);return R.try(()=>F((0,e._)`await `),U=>R.assign($,!1).if((0,e._)`${U} instanceof ${v.ValidationError}`,()=>R.assign(M,(0,e._)`${U}.errors`),()=>R.throw(U))),M}function L(){const M=(0,e._)`${y}.errors`;return R.assign(M,null),F(e.nil),M}function F(M=_.async?(0,e._)`await `:e.nil){const U=v.opts.passContext?t.default.this:t.default.self,z=!("compile"in _&&!m||_.schema===!1);R.assign($,(0,e._)`${M}${(0,f.callValidateCode)(E,y,U,z)}`,_.modifying)}function H(M){var U;R.if((0,e.not)((U=_.valid)!==null&&U!==void 0?U:$),M)}}Ie.funcKeywordCode=i;function r(E){const{gen:_,data:w,it:R}=E;_.if(R.parentData,()=>_.assign(w,(0,e._)`${R.parentData}[${R.parentDataProperty}]`))}function a(E,_){const{gen:w}=E;w.if((0,e._)`Array.isArray(${_})`,()=>{w.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${_} : ${t.default.vErrors}.concat(${_})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,s.extendErrors)(E)},()=>E.error())}function o({schemaEnv:E},_){if(_.async&&!E.$async)throw new Error("async keyword in sync schema")}function l(E,_,w){if(w===void 0)throw new Error(`keyword "${_}" failed to compile`);return E.scopeValue("keyword",typeof w=="function"?{ref:w}:{ref:w,code:(0,e.stringify)(w)})}function c(E,_,w=!1){return!_.length||_.some(R=>R==="array"?Array.isArray(E):R==="object"?E&&typeof E=="object"&&!Array.isArray(E):typeof E==R||w&&typeof E>"u")}Ie.validSchemaType=c;function g({schema:E,opts:_,self:w,errSchemaPath:R},u,h){if(Array.isArray(u.keyword)?!u.keyword.includes(h):u.keyword!==h)throw new Error("ajv implementation error");const n=u.dependencies;if(n?.some(m=>!Object.prototype.hasOwnProperty.call(E,m)))throw new Error(`parent schema must have dependencies of ${h}: ${n.join(",")}`);if(u.validateSchema&&!u.validateSchema(E[h])){const v=`keyword "${h}" value is invalid at path "${R}": `+w.errorsText(u.validateSchema.errors);if(_.validateSchema==="log")w.logger.error(v);else throw new Error(v)}}return Ie.validateKeywordUsage=g,Ie}var Fe={},ba;function _d(){if(ba)return Fe;ba=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.extendSubschemaMode=Fe.extendSubschemaData=Fe.getSubschema=void 0;const e=re(),t=ie();function f(i,{keyword:r,schemaProp:a,schema:o,schemaPath:l,errSchemaPath:c,topSchemaRef:g}){if(r!==void 0&&o!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(r!==void 0){const E=i.schema[r];return a===void 0?{schema:E,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(r)}`,errSchemaPath:`${i.errSchemaPath}/${r}`}:{schema:E[a],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(r)}${(0,e.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${r}/${(0,t.escapeFragment)(a)}`}}if(o!==void 0){if(l===void 0||c===void 0||g===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:l,topSchemaRef:g,errSchemaPath:c}}throw new Error('either "keyword" or "schema" must be passed')}Fe.getSubschema=f;function s(i,r,{dataProp:a,dataPropType:o,data:l,dataTypes:c,propertyName:g}){if(l!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:E}=r;if(a!==void 0){const{errorPath:w,dataPathArr:R,opts:u}=r,h=E.let("data",(0,e._)`${r.data}${(0,e.getProperty)(a)}`,!0);_(h),i.errorPath=(0,e.str)`${w}${(0,t.getErrorPath)(a,o,u.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${a}`,i.dataPathArr=[...R,i.parentDataProperty]}if(l!==void 0){const w=l instanceof e.Name?l:E.let("data",l,!0);_(w),g!==void 0&&(i.propertyName=g)}c&&(i.dataTypes=c);function _(w){i.data=w,i.dataLevel=r.dataLevel+1,i.dataTypes=[],r.definedProperties=new Set,i.parentData=r.data,i.dataNames=[...r.dataNames,w]}}Fe.extendSubschemaData=s;function d(i,{jtdDiscriminator:r,jtdMetadata:a,compositeRule:o,createErrors:l,allErrors:c}){o!==void 0&&(i.compositeRule=o),l!==void 0&&(i.createErrors=l),c!==void 0&&(i.allErrors=c),i.jtdDiscriminator=r,i.jtdMetadata=a}return Fe.extendSubschemaMode=d,Fe}var _e={},bs,Pa;function Sn(){return Pa||(Pa=1,bs=function e(t,f){if(t===f)return!0;if(t&&f&&typeof t=="object"&&typeof f=="object"){if(t.constructor!==f.constructor)return!1;var s,d,i;if(Array.isArray(t)){if(s=t.length,s!=f.length)return!1;for(d=s;d--!==0;)if(!e(t[d],f[d]))return!1;return!0}if(t.constructor===RegExp)return t.source===f.source&&t.flags===f.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===f.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===f.toString();if(i=Object.keys(t),s=i.length,s!==Object.keys(f).length)return!1;for(d=s;d--!==0;)if(!Object.prototype.hasOwnProperty.call(f,i[d]))return!1;for(d=s;d--!==0;){var r=i[d];if(!e(t[r],f[r]))return!1}return!0}return t!==t&&f!==f}),bs}var Ps={exports:{}},Na;function gd(){if(Na)return Ps.exports;Na=1;var e=Ps.exports=function(s,d,i){typeof d=="function"&&(i=d,d={}),i=d.cb||i;var r=typeof i=="function"?i:i.pre||function(){},a=i.post||function(){};t(d,r,a,s,"",s)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(s,d,i,r,a,o,l,c,g,E){if(r&&typeof r=="object"&&!Array.isArray(r)){d(r,a,o,l,c,g,E);for(var _ in r){var w=r[_];if(Array.isArray(w)){if(_ in e.arrayKeywords)for(var R=0;R<w.length;R++)t(s,d,i,w[R],a+"/"+_+"/"+R,o,a,_,r,R)}else if(_ in e.propsKeywords){if(w&&typeof w=="object")for(var u in w)t(s,d,i,w[u],a+"/"+_+"/"+f(u),o,a,_,r,u)}else(_ in e.keywords||s.allKeys&&!(_ in e.skipKeywords))&&t(s,d,i,w,a+"/"+_,o,a,_,r)}i(r,a,o,l,c,g,E)}}function f(s){return s.replace(/~/g,"~0").replace(/\//g,"~1")}return Ps.exports}var Oa;function Rn(){if(Oa)return _e;Oa=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.getSchemaRefs=_e.resolveUrl=_e.normalizeId=_e._getFullPath=_e.getFullPath=_e.inlineRef=void 0;const e=ie(),t=Sn(),f=gd(),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function d(R,u=!0){return typeof R=="boolean"?!0:u===!0?!r(R):u?a(R)<=u:!1}_e.inlineRef=d;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function r(R){for(const u in R){if(i.has(u))return!0;const h=R[u];if(Array.isArray(h)&&h.some(r)||typeof h=="object"&&r(h))return!0}return!1}function a(R){let u=0;for(const h in R){if(h==="$ref")return 1/0;if(u++,!s.has(h)&&(typeof R[h]=="object"&&(0,e.eachItem)(R[h],n=>u+=a(n)),u===1/0))return 1/0}return u}function o(R,u="",h){h!==!1&&(u=g(u));const n=R.parse(u);return l(R,n)}_e.getFullPath=o;function l(R,u){return R.serialize(u).split("#")[0]+"#"}_e._getFullPath=l;const c=/#\/?$/;function g(R){return R?R.replace(c,""):""}_e.normalizeId=g;function E(R,u,h){return h=g(h),R.resolve(u,h)}_e.resolveUrl=E;const _=/^[a-z_][-a-z0-9._]*$/i;function w(R,u){if(typeof R=="boolean")return{};const{schemaId:h,uriResolver:n}=this.opts,m=g(R[h]||u),v={"":m},p=o(n,m,!1),y={},$=new Set;return f(R,{allKeys:!0},(L,F,H,M)=>{if(M===void 0)return;const U=p+F;let z=v[M];typeof L[h]=="string"&&(z=J.call(this,L[h])),W.call(this,L.$anchor),W.call(this,L.$dynamicAnchor),v[F]=z;function J(j){const G=this.opts.uriResolver.resolve;if(j=g(z?G(z,j):j),$.has(j))throw N(j);$.add(j);let D=this.refs[j];return typeof D=="string"&&(D=this.refs[D]),typeof D=="object"?b(L,D.schema,j):j!==g(U)&&(j[0]==="#"?(b(L,y[j],j),y[j]=L):this.refs[j]=U),j}function W(j){if(typeof j=="string"){if(!_.test(j))throw new Error(`invalid anchor "${j}"`);J.call(this,`#${j}`)}}}),y;function b(L,F,H){if(F!==void 0&&!t(L,F))throw N(H)}function N(L){return new Error(`reference "${L}" resolves to more than one schema`)}}return _e.getSchemaRefs=w,_e}var Ia;function bn(){if(Ia)return ke;Ia=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.getData=ke.KeywordCxt=ke.validateFunctionCode=void 0;const e=pd(),t=_n(),f=of(),s=_n(),d=yd(),i=vd(),r=_d(),a=re(),o=Ke(),l=Rn(),c=ie(),g=wn();function E(I){if(p(I)&&($(I),v(I))){u(I);return}_(I,()=>(0,e.topBoolOrEmptySchema)(I))}ke.validateFunctionCode=E;function _({gen:I,validateName:C,schema:k,schemaEnv:V,opts:x},Y){x.code.es5?I.func(C,(0,a._)`${o.default.data}, ${o.default.valCxt}`,V.$async,()=>{I.code((0,a._)`"use strict"; ${n(k,x)}`),R(I,x),I.code(Y)}):I.func(C,(0,a._)`${o.default.data}, ${w(x)}`,V.$async,()=>I.code(n(k,x)).code(Y))}function w(I){return(0,a._)`{${o.default.instancePath}="", ${o.default.parentData}, ${o.default.parentDataProperty}, ${o.default.rootData}=${o.default.data}${I.dynamicRef?(0,a._)`, ${o.default.dynamicAnchors}={}`:a.nil}}={}`}function R(I,C){I.if(o.default.valCxt,()=>{I.var(o.default.instancePath,(0,a._)`${o.default.valCxt}.${o.default.instancePath}`),I.var(o.default.parentData,(0,a._)`${o.default.valCxt}.${o.default.parentData}`),I.var(o.default.parentDataProperty,(0,a._)`${o.default.valCxt}.${o.default.parentDataProperty}`),I.var(o.default.rootData,(0,a._)`${o.default.valCxt}.${o.default.rootData}`),C.dynamicRef&&I.var(o.default.dynamicAnchors,(0,a._)`${o.default.valCxt}.${o.default.dynamicAnchors}`)},()=>{I.var(o.default.instancePath,(0,a._)`""`),I.var(o.default.parentData,(0,a._)`undefined`),I.var(o.default.parentDataProperty,(0,a._)`undefined`),I.var(o.default.rootData,o.default.data),C.dynamicRef&&I.var(o.default.dynamicAnchors,(0,a._)`{}`)})}function u(I){const{schema:C,opts:k,gen:V}=I;_(I,()=>{k.$comment&&C.$comment&&M(I),L(I),V.let(o.default.vErrors,null),V.let(o.default.errors,0),k.unevaluated&&h(I),b(I),U(I)})}function h(I){const{gen:C,validateName:k}=I;I.evaluated=C.const("evaluated",(0,a._)`${k}.evaluated`),C.if((0,a._)`${I.evaluated}.dynamicProps`,()=>C.assign((0,a._)`${I.evaluated}.props`,(0,a._)`undefined`)),C.if((0,a._)`${I.evaluated}.dynamicItems`,()=>C.assign((0,a._)`${I.evaluated}.items`,(0,a._)`undefined`))}function n(I,C){const k=typeof I=="object"&&I[C.schemaId];return k&&(C.code.source||C.code.process)?(0,a._)`/*# sourceURL=${k} */`:a.nil}function m(I,C){if(p(I)&&($(I),v(I))){y(I,C);return}(0,e.boolOrEmptySchema)(I,C)}function v({schema:I,self:C}){if(typeof I=="boolean")return!I;for(const k in I)if(C.RULES.all[k])return!0;return!1}function p(I){return typeof I.schema!="boolean"}function y(I,C){const{schema:k,gen:V,opts:x}=I;x.$comment&&k.$comment&&M(I),F(I),H(I);const Y=V.const("_errs",o.default.errors);b(I,Y),V.var(C,(0,a._)`${Y} === ${o.default.errors}`)}function $(I){(0,c.checkUnknownRules)(I),N(I)}function b(I,C){if(I.opts.jtd)return J(I,[],!1,C);const k=(0,t.getSchemaTypes)(I.schema),V=(0,t.coerceAndCheckDataType)(I,k);J(I,k,!V,C)}function N(I){const{schema:C,errSchemaPath:k,opts:V,self:x}=I;C.$ref&&V.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(C,x.RULES)&&x.logger.warn(`$ref: keywords ignored in schema at path "${k}"`)}function L(I){const{schema:C,opts:k}=I;C.default!==void 0&&k.useDefaults&&k.strictSchema&&(0,c.checkStrictMode)(I,"default is ignored in the schema root")}function F(I){const C=I.schema[I.opts.schemaId];C&&(I.baseId=(0,l.resolveUrl)(I.opts.uriResolver,I.baseId,C))}function H(I){if(I.schema.$async&&!I.schemaEnv.$async)throw new Error("async schema in sync schema")}function M({gen:I,schemaEnv:C,schema:k,errSchemaPath:V,opts:x}){const Y=k.$comment;if(x.$comment===!0)I.code((0,a._)`${o.default.self}.logger.log(${Y})`);else if(typeof x.$comment=="function"){const ne=(0,a.str)`${V}/$comment`,he=I.scopeValue("root",{ref:C.root});I.code((0,a._)`${o.default.self}.opts.$comment(${Y}, ${ne}, ${he}.schema)`)}}function U(I){const{gen:C,schemaEnv:k,validateName:V,ValidationError:x,opts:Y}=I;k.$async?C.if((0,a._)`${o.default.errors} === 0`,()=>C.return(o.default.data),()=>C.throw((0,a._)`new ${x}(${o.default.vErrors})`)):(C.assign((0,a._)`${V}.errors`,o.default.vErrors),Y.unevaluated&&z(I),C.return((0,a._)`${o.default.errors} === 0`))}function z({gen:I,evaluated:C,props:k,items:V}){k instanceof a.Name&&I.assign((0,a._)`${C}.props`,k),V instanceof a.Name&&I.assign((0,a._)`${C}.items`,V)}function J(I,C,k,V){const{gen:x,schema:Y,data:ne,allErrors:he,opts:ae,self:ce}=I,{RULES:se}=ce;if(Y.$ref&&(ae.ignoreKeywordsWithRef||!(0,c.schemaHasRulesButRef)(Y,se))){x.block(()=>K(I,"$ref",se.all.$ref.definition));return}ae.jtd||j(I,C),x.block(()=>{for(const de of se.rules)we(de);we(se.post)});function we(de){(0,f.shouldUseGroup)(Y,de)&&(de.type?(x.if((0,s.checkDataType)(de.type,ne,ae.strictNumbers)),W(I,de),C.length===1&&C[0]===de.type&&k&&(x.else(),(0,s.reportTypeError)(I)),x.endIf()):W(I,de),he||x.if((0,a._)`${o.default.errors} === ${V||0}`))}}function W(I,C){const{gen:k,schema:V,opts:{useDefaults:x}}=I;x&&(0,d.assignDefaults)(I,C.type),k.block(()=>{for(const Y of C.rules)(0,f.shouldUseRule)(V,Y)&&K(I,Y.keyword,Y.definition,C.type)})}function j(I,C){I.schemaEnv.meta||!I.opts.strictTypes||(G(I,C),I.opts.allowUnionTypes||D(I,C),O(I,I.dataTypes))}function G(I,C){if(C.length){if(!I.dataTypes.length){I.dataTypes=C;return}C.forEach(k=>{T(I.dataTypes,k)||P(I,`type "${k}" not allowed by context "${I.dataTypes.join(",")}"`)}),S(I,C)}}function D(I,C){C.length>1&&!(C.length===2&&C.includes("null"))&&P(I,"use allowUnionTypes to allow union type keyword")}function O(I,C){const k=I.self.RULES.all;for(const V in k){const x=k[V];if(typeof x=="object"&&(0,f.shouldUseRule)(I.schema,x)){const{type:Y}=x.definition;Y.length&&!Y.some(ne=>q(C,ne))&&P(I,`missing type "${Y.join(",")}" for keyword "${V}"`)}}}function q(I,C){return I.includes(C)||C==="number"&&I.includes("integer")}function T(I,C){return I.includes(C)||C==="integer"&&I.includes("number")}function S(I,C){const k=[];for(const V of I.dataTypes)T(C,V)?k.push(V):C.includes("integer")&&V==="number"&&k.push("integer");I.dataTypes=k}function P(I,C){const k=I.schemaEnv.baseId+I.errSchemaPath;C+=` at "${k}" (strictTypes)`,(0,c.checkStrictMode)(I,C,I.opts.strictTypes)}class A{constructor(C,k,V){if((0,i.validateKeywordUsage)(C,k,V),this.gen=C.gen,this.allErrors=C.allErrors,this.keyword=V,this.data=C.data,this.schema=C.schema[V],this.$data=k.$data&&C.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c.schemaRefOrVal)(C,this.schema,V,this.$data),this.schemaType=k.schemaType,this.parentSchema=C.schema,this.params={},this.it=C,this.def=k,this.$data)this.schemaCode=C.gen.const("vSchema",Z(this.$data,C));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,k.schemaType,k.allowUndefined))throw new Error(`${V} value must be ${JSON.stringify(k.schemaType)}`);("code"in k?k.trackErrors:k.errors!==!1)&&(this.errsCount=C.gen.const("_errs",o.default.errors))}result(C,k,V){this.failResult((0,a.not)(C),k,V)}failResult(C,k,V){this.gen.if(C),V?V():this.error(),k?(this.gen.else(),k(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(C,k){this.failResult((0,a.not)(C),void 0,k)}fail(C){if(C===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(C),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(C){if(!this.$data)return this.fail(C);const{schemaCode:k}=this;this.fail((0,a._)`${k} !== undefined && (${(0,a.or)(this.invalid$data(),C)})`)}error(C,k,V){if(k){this.setParams(k),this._error(C,V),this.setParams({});return}this._error(C,V)}_error(C,k){(C?g.reportExtraError:g.reportError)(this,this.def.error,k)}$dataError(){(0,g.reportError)(this,this.def.$dataError||g.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,g.resetErrorsCount)(this.gen,this.errsCount)}ok(C){this.allErrors||this.gen.if(C)}setParams(C,k){k?Object.assign(this.params,C):this.params=C}block$data(C,k,V=a.nil){this.gen.block(()=>{this.check$data(C,V),k()})}check$data(C=a.nil,k=a.nil){if(!this.$data)return;const{gen:V,schemaCode:x,schemaType:Y,def:ne}=this;V.if((0,a.or)((0,a._)`${x} === undefined`,k)),C!==a.nil&&V.assign(C,!0),(Y.length||ne.validateSchema)&&(V.elseIf(this.invalid$data()),this.$dataError(),C!==a.nil&&V.assign(C,!1)),V.else()}invalid$data(){const{gen:C,schemaCode:k,schemaType:V,def:x,it:Y}=this;return(0,a.or)(ne(),he());function ne(){if(V.length){if(!(k instanceof a.Name))throw new Error("ajv implementation error");const ae=Array.isArray(V)?V:[V];return(0,a._)`${(0,s.checkDataTypes)(ae,k,Y.opts.strictNumbers,s.DataType.Wrong)}`}return a.nil}function he(){if(x.validateSchema){const ae=C.scopeValue("validate$data",{ref:x.validateSchema});return(0,a._)`!${ae}(${k})`}return a.nil}}subschema(C,k){const V=(0,r.getSubschema)(this.it,C);(0,r.extendSubschemaData)(V,this.it,C),(0,r.extendSubschemaMode)(V,C);const x={...this.it,...V,items:void 0,props:void 0};return m(x,k),x}mergeEvaluated(C,k){const{it:V,gen:x}=this;V.opts.unevaluated&&(V.props!==!0&&C.props!==void 0&&(V.props=c.mergeEvaluated.props(x,C.props,V.props,k)),V.items!==!0&&C.items!==void 0&&(V.items=c.mergeEvaluated.items(x,C.items,V.items,k)))}mergeValidEvaluated(C,k){const{it:V,gen:x}=this;if(V.opts.unevaluated&&(V.props!==!0||V.items!==!0))return x.if(k,()=>this.mergeEvaluated(C,a.Name)),!0}}ke.KeywordCxt=A;function K(I,C,k,V){const x=new A(I,k,C);"code"in k?k.code(x,V):x.$data&&k.validate?(0,i.funcKeywordCode)(x,k):"macro"in k?(0,i.macroKeywordCode)(x,k):(k.compile||k.validate)&&(0,i.funcKeywordCode)(x,k)}const B=/^\/(?:[^~]|~0|~1)*$/,X=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Z(I,{dataLevel:C,dataNames:k,dataPathArr:V}){let x,Y;if(I==="")return o.default.rootData;if(I[0]==="/"){if(!B.test(I))throw new Error(`Invalid JSON-pointer: ${I}`);x=I,Y=o.default.rootData}else{const ce=X.exec(I);if(!ce)throw new Error(`Invalid JSON-pointer: ${I}`);const se=+ce[1];if(x=ce[2],x==="#"){if(se>=C)throw new Error(ae("property/index",se));return V[C-se]}if(se>C)throw new Error(ae("data",se));if(Y=k[C-se],!x)return Y}let ne=Y;const he=x.split("/");for(const ce of he)ce&&(Y=(0,a._)`${Y}${(0,a.getProperty)((0,c.unescapeJsonPointer)(ce))}`,ne=(0,a._)`${ne} && ${Y}`);return ne;function ae(ce,se){return`Cannot access ${ce} ${se} levels up, current level is ${C}`}}return ke.getData=Z,ke}var Ht={},Ta;function Zi(){if(Ta)return Ht;Ta=1,Object.defineProperty(Ht,"__esModule",{value:!0});class e extends Error{constructor(f){super("validation failed"),this.errors=f,this.ajv=this.validation=!0}}return Ht.default=e,Ht}var xt={},Ca;function Pn(){if(Ca)return xt;Ca=1,Object.defineProperty(xt,"__esModule",{value:!0});const e=Rn();class t extends Error{constructor(s,d,i,r){super(r||`can't resolve reference ${i} from id ${d}`),this.missingRef=(0,e.resolveUrl)(s,d,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(s,this.missingRef))}}return xt.default=t,xt}var Se={},Da;function Xi(){if(Da)return Se;Da=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.resolveSchema=Se.getCompilingSchema=Se.resolveRef=Se.compileSchema=Se.SchemaEnv=void 0;const e=re(),t=Zi(),f=Ke(),s=Rn(),d=ie(),i=bn();class r{constructor(h){var n;this.refs={},this.dynamicAnchors={};let m;typeof h.schema=="object"&&(m=h.schema),this.schema=h.schema,this.schemaId=h.schemaId,this.root=h.root||this,this.baseId=(n=h.baseId)!==null&&n!==void 0?n:(0,s.normalizeId)(m?.[h.schemaId||"$id"]),this.schemaPath=h.schemaPath,this.localRefs=h.localRefs,this.meta=h.meta,this.$async=m?.$async,this.refs={}}}Se.SchemaEnv=r;function a(u){const h=c.call(this,u);if(h)return h;const n=(0,s.getFullPath)(this.opts.uriResolver,u.root.baseId),{es5:m,lines:v}=this.opts.code,{ownProperties:p}=this.opts,y=new e.CodeGen(this.scope,{es5:m,lines:v,ownProperties:p});let $;u.$async&&($=y.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const b=y.scopeName("validate");u.validateName=b;const N={gen:y,allErrors:this.opts.allErrors,data:f.default.data,parentData:f.default.parentData,parentDataProperty:f.default.parentDataProperty,dataNames:[f.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:y.scopeValue("schema",this.opts.code.source===!0?{ref:u.schema,code:(0,e.stringify)(u.schema)}:{ref:u.schema}),validateName:b,ValidationError:$,schema:u.schema,schemaEnv:u,rootId:n,baseId:u.baseId||n,schemaPath:e.nil,errSchemaPath:u.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let L;try{this._compilations.add(u),(0,i.validateFunctionCode)(N),y.optimize(this.opts.code.optimize);const F=y.toString();L=`${y.scopeRefs(f.default.scope)}return ${F}`,this.opts.code.process&&(L=this.opts.code.process(L,u));const M=new Function(`${f.default.self}`,`${f.default.scope}`,L)(this,this.scope.get());if(this.scope.value(b,{ref:M}),M.errors=null,M.schema=u.schema,M.schemaEnv=u,u.$async&&(M.$async=!0),this.opts.code.source===!0&&(M.source={validateName:b,validateCode:F,scopeValues:y._values}),this.opts.unevaluated){const{props:U,items:z}=N;M.evaluated={props:U instanceof e.Name?void 0:U,items:z instanceof e.Name?void 0:z,dynamicProps:U instanceof e.Name,dynamicItems:z instanceof e.Name},M.source&&(M.source.evaluated=(0,e.stringify)(M.evaluated))}return u.validate=M,u}catch(F){throw delete u.validate,delete u.validateName,L&&this.logger.error("Error compiling schema, function code:",L),F}finally{this._compilations.delete(u)}}Se.compileSchema=a;function o(u,h,n){var m;n=(0,s.resolveUrl)(this.opts.uriResolver,h,n);const v=u.refs[n];if(v)return v;let p=E.call(this,u,n);if(p===void 0){const y=(m=u.localRefs)===null||m===void 0?void 0:m[n],{schemaId:$}=this.opts;y&&(p=new r({schema:y,schemaId:$,root:u,baseId:h}))}if(p!==void 0)return u.refs[n]=l.call(this,p)}Se.resolveRef=o;function l(u){return(0,s.inlineRef)(u.schema,this.opts.inlineRefs)?u.schema:u.validate?u:a.call(this,u)}function c(u){for(const h of this._compilations)if(g(h,u))return h}Se.getCompilingSchema=c;function g(u,h){return u.schema===h.schema&&u.root===h.root&&u.baseId===h.baseId}function E(u,h){let n;for(;typeof(n=this.refs[h])=="string";)h=n;return n||this.schemas[h]||_.call(this,u,h)}function _(u,h){const n=this.opts.uriResolver.parse(h),m=(0,s._getFullPath)(this.opts.uriResolver,n);let v=(0,s.getFullPath)(this.opts.uriResolver,u.baseId,void 0);if(Object.keys(u.schema).length>0&&m===v)return R.call(this,n,u);const p=(0,s.normalizeId)(m),y=this.refs[p]||this.schemas[p];if(typeof y=="string"){const $=_.call(this,u,y);return typeof $?.schema!="object"?void 0:R.call(this,n,$)}if(typeof y?.schema=="object"){if(y.validate||a.call(this,y),p===(0,s.normalizeId)(h)){const{schema:$}=y,{schemaId:b}=this.opts,N=$[b];return N&&(v=(0,s.resolveUrl)(this.opts.uriResolver,v,N)),new r({schema:$,schemaId:b,root:u,baseId:v})}return R.call(this,n,y)}}Se.resolveSchema=_;const w=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function R(u,{baseId:h,schema:n,root:m}){var v;if(((v=u.fragment)===null||v===void 0?void 0:v[0])!=="/")return;for(const $ of u.fragment.slice(1).split("/")){if(typeof n=="boolean")return;const b=n[(0,d.unescapeFragment)($)];if(b===void 0)return;n=b;const N=typeof n=="object"&&n[this.opts.schemaId];!w.has($)&&N&&(h=(0,s.resolveUrl)(this.opts.uriResolver,h,N))}let p;if(typeof n!="boolean"&&n.$ref&&!(0,d.schemaHasRulesButRef)(n,this.RULES)){const $=(0,s.resolveUrl)(this.opts.uriResolver,h,n.$ref);p=_.call(this,m,$)}const{schemaId:y}=this.opts;if(p=p||new r({schema:n,schemaId:y,root:m,baseId:h}),p.schema!==p.root.schema)return p}return Se}const $d="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Ed="Meta-schema for $data reference (JSON AnySchema extension proposal)",wd="object",Sd=["$data"],Rd={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},bd=!1,Pd={$id:$d,description:Ed,type:wd,required:Sd,properties:Rd,additionalProperties:bd};var Bt={},pt={exports:{}},Ns,Aa;function Nd(){return Aa||(Aa=1,Ns={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),Ns}var Os,La;function Od(){if(La)return Os;La=1;const{HEX:e}=Nd();function t(w){if(r(w,".")<3)return{host:w,isIPV4:!1};const R=w.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[u]=R;return u?{host:i(u,"."),isIPV4:!0}:{host:w,isIPV4:!1}}function f(w,R=!1){let u="",h=!0;for(const n of w){if(e[n]===void 0)return;n!=="0"&&h===!0&&(h=!1),h||(u+=n)}return R&&u.length===0&&(u="0"),u}function s(w){let R=0;const u={error:!1,address:"",zone:""},h=[],n=[];let m=!1,v=!1,p=!1;function y(){if(n.length){if(m===!1){const $=f(n);if($!==void 0)h.push($);else return u.error=!0,!1}n.length=0}return!0}for(let $=0;$<w.length;$++){const b=w[$];if(!(b==="["||b==="]"))if(b===":"){if(v===!0&&(p=!0),!y())break;if(R++,h.push(":"),R>7){u.error=!0;break}$-1>=0&&w[$-1]===":"&&(v=!0);continue}else if(b==="%"){if(!y())break;m=!0}else{n.push(b);continue}}return n.length&&(m?u.zone=n.join(""):p?h.push(n.join("")):h.push(f(n))),u.address=h.join(""),u}function d(w,R={}){if(r(w,":")<2)return{host:w,isIPV6:!1};const u=s(w);if(u.error)return{host:w,isIPV6:!1};{let h=u.address,n=u.address;return u.zone&&(h+="%"+u.zone,n+="%25"+u.zone),{host:h,escapedHost:n,isIPV6:!0}}}function i(w,R){let u="",h=!0;const n=w.length;for(let m=0;m<n;m++){const v=w[m];v==="0"&&h?(m+1<=n&&w[m+1]===R||m+1===n)&&(u+=v,h=!1):(v===R?h=!0:h=!1,u+=v)}return u}function r(w,R){let u=0;for(let h=0;h<w.length;h++)w[h]===R&&u++;return u}const a=/^\.\.?\//u,o=/^\/\.(?:\/|$)/u,l=/^\/\.\.(?:\/|$)/u,c=/^\/?(?:.|\n)*?(?=\/|$)/u;function g(w){const R=[];for(;w.length;)if(w.match(a))w=w.replace(a,"");else if(w.match(o))w=w.replace(o,"/");else if(w.match(l))w=w.replace(l,"/"),R.pop();else if(w==="."||w==="..")w="";else{const u=w.match(c);if(u){const h=u[0];w=w.slice(h.length),R.push(h)}else throw new Error("Unexpected dot segment condition")}return R.join("")}function E(w,R){const u=R!==!0?escape:unescape;return w.scheme!==void 0&&(w.scheme=u(w.scheme)),w.userinfo!==void 0&&(w.userinfo=u(w.userinfo)),w.host!==void 0&&(w.host=u(w.host)),w.path!==void 0&&(w.path=u(w.path)),w.query!==void 0&&(w.query=u(w.query)),w.fragment!==void 0&&(w.fragment=u(w.fragment)),w}function _(w,R){const u=[];if(w.userinfo!==void 0&&(u.push(w.userinfo),u.push("@")),w.host!==void 0){let h=unescape(w.host);const n=t(h);if(n.isIPV4)h=n.host;else{const m=d(n.host,{});m.isIPV6===!0?h=`[${m.escapedHost}]`:h=w.host}u.push(h)}return(typeof w.port=="number"||typeof w.port=="string")&&(u.push(":"),u.push(String(w.port))),u.length?u.join(""):void 0}return Os={recomposeAuthority:_,normalizeComponentEncoding:E,removeDotSegments:g,normalizeIPv4:t,normalizeIPv6:d,stringArrayToHexStripped:f},Os}var Is,qa;function Id(){if(qa)return Is;qa=1;const e=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function f(n){return typeof n.secure=="boolean"?n.secure:String(n.scheme).toLowerCase()==="wss"}function s(n){return n.host||(n.error=n.error||"HTTP URIs must have a host."),n}function d(n){const m=String(n.scheme).toLowerCase()==="https";return(n.port===(m?443:80)||n.port==="")&&(n.port=void 0),n.path||(n.path="/"),n}function i(n){return n.secure=f(n),n.resourceName=(n.path||"/")+(n.query?"?"+n.query:""),n.path=void 0,n.query=void 0,n}function r(n){if((n.port===(f(n)?443:80)||n.port==="")&&(n.port=void 0),typeof n.secure=="boolean"&&(n.scheme=n.secure?"wss":"ws",n.secure=void 0),n.resourceName){const[m,v]=n.resourceName.split("?");n.path=m&&m!=="/"?m:void 0,n.query=v,n.resourceName=void 0}return n.fragment=void 0,n}function a(n,m){if(!n.path)return n.error="URN can not be parsed",n;const v=n.path.match(t);if(v){const p=m.scheme||n.scheme||"urn";n.nid=v[1].toLowerCase(),n.nss=v[2];const y=`${p}:${m.nid||n.nid}`,$=h[y];n.path=void 0,$&&(n=$.parse(n,m))}else n.error=n.error||"URN can not be parsed.";return n}function o(n,m){const v=m.scheme||n.scheme||"urn",p=n.nid.toLowerCase(),y=`${v}:${m.nid||p}`,$=h[y];$&&(n=$.serialize(n,m));const b=n,N=n.nss;return b.path=`${p||m.nid}:${N}`,m.skipEscape=!0,b}function l(n,m){const v=n;return v.uuid=v.nss,v.nss=void 0,!m.tolerant&&(!v.uuid||!e.test(v.uuid))&&(v.error=v.error||"UUID is not valid."),v}function c(n){const m=n;return m.nss=(n.uuid||"").toLowerCase(),m}const g={scheme:"http",domainHost:!0,parse:s,serialize:d},E={scheme:"https",domainHost:g.domainHost,parse:s,serialize:d},_={scheme:"ws",domainHost:!0,parse:i,serialize:r},w={scheme:"wss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},h={http:g,https:E,ws:_,wss:w,urn:{scheme:"urn",parse:a,serialize:o,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:l,serialize:c,skipNormalize:!0}};return Is=h,Is}var ka;function af(){if(ka)return pt.exports;ka=1;const{normalizeIPv6:e,normalizeIPv4:t,removeDotSegments:f,recomposeAuthority:s,normalizeComponentEncoding:d}=Od(),i=Id();function r(u,h){return typeof u=="string"?u=c(w(u,h),h):typeof u=="object"&&(u=w(c(u,h),h)),u}function a(u,h,n){const m=Object.assign({scheme:"null"},n),v=o(w(u,m),w(h,m),m,!0);return c(v,{...m,skipEscape:!0})}function o(u,h,n,m){const v={};return m||(u=w(c(u,n),n),h=w(c(h,n),n)),n=n||{},!n.tolerant&&h.scheme?(v.scheme=h.scheme,v.userinfo=h.userinfo,v.host=h.host,v.port=h.port,v.path=f(h.path||""),v.query=h.query):(h.userinfo!==void 0||h.host!==void 0||h.port!==void 0?(v.userinfo=h.userinfo,v.host=h.host,v.port=h.port,v.path=f(h.path||""),v.query=h.query):(h.path?(h.path.charAt(0)==="/"?v.path=f(h.path):((u.userinfo!==void 0||u.host!==void 0||u.port!==void 0)&&!u.path?v.path="/"+h.path:u.path?v.path=u.path.slice(0,u.path.lastIndexOf("/")+1)+h.path:v.path=h.path,v.path=f(v.path)),v.query=h.query):(v.path=u.path,h.query!==void 0?v.query=h.query:v.query=u.query),v.userinfo=u.userinfo,v.host=u.host,v.port=u.port),v.scheme=u.scheme),v.fragment=h.fragment,v}function l(u,h,n){return typeof u=="string"?(u=unescape(u),u=c(d(w(u,n),!0),{...n,skipEscape:!0})):typeof u=="object"&&(u=c(d(u,!0),{...n,skipEscape:!0})),typeof h=="string"?(h=unescape(h),h=c(d(w(h,n),!0),{...n,skipEscape:!0})):typeof h=="object"&&(h=c(d(h,!0),{...n,skipEscape:!0})),u.toLowerCase()===h.toLowerCase()}function c(u,h){const n={host:u.host,scheme:u.scheme,userinfo:u.userinfo,port:u.port,path:u.path,query:u.query,nid:u.nid,nss:u.nss,uuid:u.uuid,fragment:u.fragment,reference:u.reference,resourceName:u.resourceName,secure:u.secure,error:""},m=Object.assign({},h),v=[],p=i[(m.scheme||n.scheme||"").toLowerCase()];p&&p.serialize&&p.serialize(n,m),n.path!==void 0&&(m.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),m.reference!=="suffix"&&n.scheme&&v.push(n.scheme,":");const y=s(n,m);if(y!==void 0&&(m.reference!=="suffix"&&v.push("//"),v.push(y),n.path&&n.path.charAt(0)!=="/"&&v.push("/")),n.path!==void 0){let $=n.path;!m.absolutePath&&(!p||!p.absolutePath)&&($=f($)),y===void 0&&($=$.replace(/^\/\//u,"/%2F")),v.push($)}return n.query!==void 0&&v.push("?",n.query),n.fragment!==void 0&&v.push("#",n.fragment),v.join("")}const g=Array.from({length:127},(u,h)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(h)));function E(u){let h=0;for(let n=0,m=u.length;n<m;++n)if(h=u.charCodeAt(n),h>126||g[h])return!0;return!1}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function w(u,h){const n=Object.assign({},h),m={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},v=u.indexOf("%")!==-1;let p=!1;n.reference==="suffix"&&(u=(n.scheme?n.scheme+":":"")+"//"+u);const y=u.match(_);if(y){if(m.scheme=y[1],m.userinfo=y[3],m.host=y[4],m.port=parseInt(y[5],10),m.path=y[6]||"",m.query=y[7],m.fragment=y[8],isNaN(m.port)&&(m.port=y[5]),m.host){const b=t(m.host);if(b.isIPV4===!1){const N=e(b.host,{isIPV4:!1});m.host=N.host.toLowerCase(),p=N.isIPV6}else m.host=b.host,p=!0}m.scheme===void 0&&m.userinfo===void 0&&m.host===void 0&&m.port===void 0&&!m.path&&m.query===void 0?m.reference="same-document":m.scheme===void 0?m.reference="relative":m.fragment===void 0?m.reference="absolute":m.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==m.reference&&(m.error=m.error||"URI is not a "+n.reference+" reference.");const $=i[(n.scheme||m.scheme||"").toLowerCase()];if(!n.unicodeSupport&&(!$||!$.unicodeSupport)&&m.host&&(n.domainHost||$&&$.domainHost)&&p===!1&&E(m.host))try{m.host=URL.domainToASCII(m.host.toLowerCase())}catch(b){m.error=m.error||"Host's domain name can not be converted to ASCII: "+b}(!$||$&&!$.skipNormalize)&&(v&&m.scheme!==void 0&&(m.scheme=unescape(m.scheme)),v&&m.host!==void 0&&(m.host=unescape(m.host)),m.path!==void 0&&m.path.length&&(m.path=escape(unescape(m.path))),m.fragment!==void 0&&m.fragment.length&&(m.fragment=encodeURI(decodeURIComponent(m.fragment)))),$&&$.parse&&$.parse(m,n)}else m.error=m.error||"URI can not be parsed.";return m}const R={SCHEMES:i,normalize:r,resolve:a,resolveComponents:o,equal:l,serialize:c,parse:w};return pt.exports=R,pt.exports.default=R,pt.exports.fastUri=R,pt.exports}var ja;function Td(){if(ja)return Bt;ja=1,Object.defineProperty(Bt,"__esModule",{value:!0});const e=af();return e.code='require("ajv/dist/runtime/uri").default',Bt.default=e,Bt}var Fa;function Cd(){return Fa||(Fa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=bn();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var f=re();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});const s=Zi(),d=Pn(),i=sf(),r=Xi(),a=re(),o=Rn(),l=_n(),c=ie(),g=Pd,E=Td(),_=(D,O)=>new RegExp(D,O);_.code="new RegExp";const w=["removeAdditional","useDefaults","coerceTypes"],R=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),u={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},h={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},n=200;function m(D){var O,q,T,S,P,A,K,B,X,Z,I,C,k,V,x,Y,ne,he,ae,ce,se,we,de,xe,Be;const Ne=D.strict,We=(O=D.code)===null||O===void 0?void 0:O.optimize,dt=We===!0||We===void 0?1:We||0,ht=(T=(q=D.code)===null||q===void 0?void 0:q.regExp)!==null&&T!==void 0?T:_,jn=(S=D.uriResolver)!==null&&S!==void 0?S:E.default;return{strictSchema:(A=(P=D.strictSchema)!==null&&P!==void 0?P:Ne)!==null&&A!==void 0?A:!0,strictNumbers:(B=(K=D.strictNumbers)!==null&&K!==void 0?K:Ne)!==null&&B!==void 0?B:!0,strictTypes:(Z=(X=D.strictTypes)!==null&&X!==void 0?X:Ne)!==null&&Z!==void 0?Z:"log",strictTuples:(C=(I=D.strictTuples)!==null&&I!==void 0?I:Ne)!==null&&C!==void 0?C:"log",strictRequired:(V=(k=D.strictRequired)!==null&&k!==void 0?k:Ne)!==null&&V!==void 0?V:!1,code:D.code?{...D.code,optimize:dt,regExp:ht}:{optimize:dt,regExp:ht},loopRequired:(x=D.loopRequired)!==null&&x!==void 0?x:n,loopEnum:(Y=D.loopEnum)!==null&&Y!==void 0?Y:n,meta:(ne=D.meta)!==null&&ne!==void 0?ne:!0,messages:(he=D.messages)!==null&&he!==void 0?he:!0,inlineRefs:(ae=D.inlineRefs)!==null&&ae!==void 0?ae:!0,schemaId:(ce=D.schemaId)!==null&&ce!==void 0?ce:"$id",addUsedSchema:(se=D.addUsedSchema)!==null&&se!==void 0?se:!0,validateSchema:(we=D.validateSchema)!==null&&we!==void 0?we:!0,validateFormats:(de=D.validateFormats)!==null&&de!==void 0?de:!0,unicodeRegExp:(xe=D.unicodeRegExp)!==null&&xe!==void 0?xe:!0,int32range:(Be=D.int32range)!==null&&Be!==void 0?Be:!0,uriResolver:jn}}class v{constructor(O={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,O=this.opts={...O,...m(O)};const{es5:q,lines:T}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:R,es5:q,lines:T}),this.logger=H(O.logger);const S=O.validateFormats;O.validateFormats=!1,this.RULES=(0,i.getRules)(),p.call(this,u,O,"NOT SUPPORTED"),p.call(this,h,O,"DEPRECATED","warn"),this._metaOpts=L.call(this),O.formats&&b.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),O.keywords&&N.call(this,O.keywords),typeof O.meta=="object"&&this.addMetaSchema(O.meta),$.call(this),O.validateFormats=S}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:O,meta:q,schemaId:T}=this.opts;let S=g;T==="id"&&(S={...g},S.id=S.$id,delete S.$id),q&&O&&this.addMetaSchema(S,S[T],!1)}defaultMeta(){const{meta:O,schemaId:q}=this.opts;return this.opts.defaultMeta=typeof O=="object"?O[q]||O:void 0}validate(O,q){let T;if(typeof O=="string"){if(T=this.getSchema(O),!T)throw new Error(`no schema with key or ref "${O}"`)}else T=this.compile(O);const S=T(q);return"$async"in T||(this.errors=T.errors),S}compile(O,q){const T=this._addSchema(O,q);return T.validate||this._compileSchemaEnv(T)}compileAsync(O,q){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:T}=this.opts;return S.call(this,O,q);async function S(Z,I){await P.call(this,Z.$schema);const C=this._addSchema(Z,I);return C.validate||A.call(this,C)}async function P(Z){Z&&!this.getSchema(Z)&&await S.call(this,{$ref:Z},!0)}async function A(Z){try{return this._compileSchemaEnv(Z)}catch(I){if(!(I instanceof d.default))throw I;return K.call(this,I),await B.call(this,I.missingSchema),A.call(this,Z)}}function K({missingSchema:Z,missingRef:I}){if(this.refs[Z])throw new Error(`AnySchema ${Z} is loaded but ${I} cannot be resolved`)}async function B(Z){const I=await X.call(this,Z);this.refs[Z]||await P.call(this,I.$schema),this.refs[Z]||this.addSchema(I,Z,q)}async function X(Z){const I=this._loading[Z];if(I)return I;try{return await(this._loading[Z]=T(Z))}finally{delete this._loading[Z]}}}addSchema(O,q,T,S=this.opts.validateSchema){if(Array.isArray(O)){for(const A of O)this.addSchema(A,void 0,T,S);return this}let P;if(typeof O=="object"){const{schemaId:A}=this.opts;if(P=O[A],P!==void 0&&typeof P!="string")throw new Error(`schema ${A} must be string`)}return q=(0,o.normalizeId)(q||P),this._checkUnique(q),this.schemas[q]=this._addSchema(O,T,q,S,!0),this}addMetaSchema(O,q,T=this.opts.validateSchema){return this.addSchema(O,q,!0,T),this}validateSchema(O,q){if(typeof O=="boolean")return!0;let T;if(T=O.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const S=this.validate(T,O);if(!S&&q){const P="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(P);else throw new Error(P)}return S}getSchema(O){let q;for(;typeof(q=y.call(this,O))=="string";)O=q;if(q===void 0){const{schemaId:T}=this.opts,S=new r.SchemaEnv({schema:{},schemaId:T});if(q=r.resolveSchema.call(this,S,O),!q)return;this.refs[O]=q}return q.validate||this._compileSchemaEnv(q)}removeSchema(O){if(O instanceof RegExp)return this._removeAllSchemas(this.schemas,O),this._removeAllSchemas(this.refs,O),this;switch(typeof O){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const q=y.call(this,O);return typeof q=="object"&&this._cache.delete(q.schema),delete this.schemas[O],delete this.refs[O],this}case"object":{const q=O;this._cache.delete(q);let T=O[this.opts.schemaId];return T&&(T=(0,o.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(O){for(const q of O)this.addKeyword(q);return this}addKeyword(O,q){let T;if(typeof O=="string")T=O,typeof q=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),q.keyword=T);else if(typeof O=="object"&&q===void 0){if(q=O,T=q.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(U.call(this,T,q),!q)return(0,c.eachItem)(T,P=>z.call(this,P)),this;W.call(this,q);const S={...q,type:(0,l.getJSONTypes)(q.type),schemaType:(0,l.getJSONTypes)(q.schemaType)};return(0,c.eachItem)(T,S.type.length===0?P=>z.call(this,P,S):P=>S.type.forEach(A=>z.call(this,P,S,A))),this}getKeyword(O){const q=this.RULES.all[O];return typeof q=="object"?q.definition:!!q}removeKeyword(O){const{RULES:q}=this;delete q.keywords[O],delete q.all[O];for(const T of q.rules){const S=T.rules.findIndex(P=>P.keyword===O);S>=0&&T.rules.splice(S,1)}return this}addFormat(O,q){return typeof q=="string"&&(q=new RegExp(q)),this.formats[O]=q,this}errorsText(O=this.errors,{separator:q=", ",dataVar:T="data"}={}){return!O||O.length===0?"No errors":O.map(S=>`${T}${S.instancePath} ${S.message}`).reduce((S,P)=>S+q+P)}$dataMetaSchema(O,q){const T=this.RULES.all;O=JSON.parse(JSON.stringify(O));for(const S of q){const P=S.split("/").slice(1);let A=O;for(const K of P)A=A[K];for(const K in T){const B=T[K];if(typeof B!="object")continue;const{$data:X}=B.definition,Z=A[K];X&&Z&&(A[K]=G(Z))}}return O}_removeAllSchemas(O,q){for(const T in O){const S=O[T];(!q||q.test(T))&&(typeof S=="string"?delete O[T]:S&&!S.meta&&(this._cache.delete(S.schema),delete O[T]))}}_addSchema(O,q,T,S=this.opts.validateSchema,P=this.opts.addUsedSchema){let A;const{schemaId:K}=this.opts;if(typeof O=="object")A=O[K];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof O!="boolean")throw new Error("schema must be object or boolean")}let B=this._cache.get(O);if(B!==void 0)return B;T=(0,o.normalizeId)(A||T);const X=o.getSchemaRefs.call(this,O,T);return B=new r.SchemaEnv({schema:O,schemaId:K,meta:q,baseId:T,localRefs:X}),this._cache.set(B.schema,B),P&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=B),S&&this.validateSchema(O,!0),B}_checkUnique(O){if(this.schemas[O]||this.refs[O])throw new Error(`schema with key or id "${O}" already exists`)}_compileSchemaEnv(O){if(O.meta?this._compileMetaSchema(O):r.compileSchema.call(this,O),!O.validate)throw new Error("ajv implementation error");return O.validate}_compileMetaSchema(O){const q=this.opts;this.opts=this._metaOpts;try{r.compileSchema.call(this,O)}finally{this.opts=q}}}v.ValidationError=s.default,v.MissingRefError=d.default,e.default=v;function p(D,O,q,T="error"){for(const S in D){const P=S;P in O&&this.logger[T](`${q}: option ${S}. ${D[P]}`)}}function y(D){return D=(0,o.normalizeId)(D),this.schemas[D]||this.refs[D]}function $(){const D=this.opts.schemas;if(D)if(Array.isArray(D))this.addSchema(D);else for(const O in D)this.addSchema(D[O],O)}function b(){for(const D in this.opts.formats){const O=this.opts.formats[D];O&&this.addFormat(D,O)}}function N(D){if(Array.isArray(D)){this.addVocabulary(D);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const O in D){const q=D[O];q.keyword||(q.keyword=O),this.addKeyword(q)}}function L(){const D={...this.opts};for(const O of w)delete D[O];return D}const F={log(){},warn(){},error(){}};function H(D){if(D===!1)return F;if(D===void 0)return console;if(D.log&&D.warn&&D.error)return D;throw new Error("logger must implement log, warn and error methods")}const M=/^[a-z_$][a-z0-9_$:-]*$/i;function U(D,O){const{RULES:q}=this;if((0,c.eachItem)(D,T=>{if(q.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!M.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!O&&O.$data&&!("code"in O||"validate"in O))throw new Error('$data keyword must have "code" or "validate" function')}function z(D,O,q){var T;const S=O?.post;if(q&&S)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:P}=this;let A=S?P.post:P.rules.find(({type:B})=>B===q);if(A||(A={type:q,rules:[]},P.rules.push(A)),P.keywords[D]=!0,!O)return;const K={keyword:D,definition:{...O,type:(0,l.getJSONTypes)(O.type),schemaType:(0,l.getJSONTypes)(O.schemaType)}};O.before?J.call(this,A,K,O.before):A.rules.push(K),P.all[D]=K,(T=O.implements)===null||T===void 0||T.forEach(B=>this.addKeyword(B))}function J(D,O,q){const T=D.rules.findIndex(S=>S.keyword===q);T>=0?D.rules.splice(T,0,O):(D.rules.push(O),this.logger.warn(`rule ${q} is not defined`))}function W(D){let{metaSchema:O}=D;O!==void 0&&(D.$data&&this.opts.$data&&(O=G(O)),D.validateSchema=this.compile(O,!0))}const j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function G(D){return{anyOf:[D,j]}}}($s)),$s}var Wt={},Jt={},Zt={},Ma;function Dd(){if(Ma)return Zt;Ma=1,Object.defineProperty(Zt,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Zt.default=e,Zt}var ze={},Ua;function Ad(){if(Ua)return ze;Ua=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.callRef=ze.getValidate=void 0;const e=Pn(),t=Ce(),f=re(),s=Ke(),d=Xi(),i=ie(),r={keyword:"$ref",schemaType:"string",code(l){const{gen:c,schema:g,it:E}=l,{baseId:_,schemaEnv:w,validateName:R,opts:u,self:h}=E,{root:n}=w;if((g==="#"||g==="#/")&&_===n.baseId)return v();const m=d.resolveRef.call(h,n,_,g);if(m===void 0)throw new e.default(E.opts.uriResolver,_,g);if(m instanceof d.SchemaEnv)return p(m);return y(m);function v(){if(w===n)return o(l,R,w,w.$async);const $=c.scopeValue("root",{ref:n});return o(l,(0,f._)`${$}.validate`,n,n.$async)}function p($){const b=a(l,$);o(l,b,$,$.$async)}function y($){const b=c.scopeValue("schema",u.code.source===!0?{ref:$,code:(0,f.stringify)($)}:{ref:$}),N=c.name("valid"),L=l.subschema({schema:$,dataTypes:[],schemaPath:f.nil,topSchemaRef:b,errSchemaPath:g},N);l.mergeEvaluated(L),l.ok(N)}}};function a(l,c){const{gen:g}=l;return c.validate?g.scopeValue("validate",{ref:c.validate}):(0,f._)`${g.scopeValue("wrapper",{ref:c})}.validate`}ze.getValidate=a;function o(l,c,g,E){const{gen:_,it:w}=l,{allErrors:R,schemaEnv:u,opts:h}=w,n=h.passContext?s.default.this:f.nil;E?m():v();function m(){if(!u.$async)throw new Error("async schema referenced by sync schema");const $=_.let("valid");_.try(()=>{_.code((0,f._)`await ${(0,t.callValidateCode)(l,c,n)}`),y(c),R||_.assign($,!0)},b=>{_.if((0,f._)`!(${b} instanceof ${w.ValidationError})`,()=>_.throw(b)),p(b),R||_.assign($,!1)}),l.ok($)}function v(){l.result((0,t.callValidateCode)(l,c,n),()=>y(c),()=>p(c))}function p($){const b=(0,f._)`${$}.errors`;_.assign(s.default.vErrors,(0,f._)`${s.default.vErrors} === null ? ${b} : ${s.default.vErrors}.concat(${b})`),_.assign(s.default.errors,(0,f._)`${s.default.vErrors}.length`)}function y($){var b;if(!w.opts.unevaluated)return;const N=(b=g?.validate)===null||b===void 0?void 0:b.evaluated;if(w.props!==!0)if(N&&!N.dynamicProps)N.props!==void 0&&(w.props=i.mergeEvaluated.props(_,N.props,w.props));else{const L=_.var("props",(0,f._)`${$}.evaluated.props`);w.props=i.mergeEvaluated.props(_,L,w.props,f.Name)}if(w.items!==!0)if(N&&!N.dynamicItems)N.items!==void 0&&(w.items=i.mergeEvaluated.items(_,N.items,w.items));else{const L=_.var("items",(0,f._)`${$}.evaluated.items`);w.items=i.mergeEvaluated.items(_,L,w.items,f.Name)}}}return ze.callRef=o,ze.default=r,ze}var Va;function Ld(){if(Va)return Jt;Va=1,Object.defineProperty(Jt,"__esModule",{value:!0});const e=Dd(),t=Ad(),f=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Jt.default=f,Jt}var Xt={},Yt={},za;function qd(){if(za)return Yt;za=1,Object.defineProperty(Yt,"__esModule",{value:!0});const e=re(),t=e.operators,f={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},s={message:({keyword:i,schemaCode:r})=>(0,e.str)`must be ${f[i].okStr} ${r}`,params:({keyword:i,schemaCode:r})=>(0,e._)`{comparison: ${f[i].okStr}, limit: ${r}}`},d={keyword:Object.keys(f),type:"number",schemaType:"number",$data:!0,error:s,code(i){const{keyword:r,data:a,schemaCode:o}=i;i.fail$data((0,e._)`${a} ${f[r].fail} ${o} || isNaN(${a})`)}};return Yt.default=d,Yt}var Qt={},Ga;function kd(){if(Ga)return Qt;Ga=1,Object.defineProperty(Qt,"__esModule",{value:!0});const e=re(),f={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:s})=>(0,e.str)`must be multiple of ${s}`,params:({schemaCode:s})=>(0,e._)`{multipleOf: ${s}}`},code(s){const{gen:d,data:i,schemaCode:r,it:a}=s,o=a.opts.multipleOfPrecision,l=d.let("res"),c=o?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${o}`:(0,e._)`${l} !== parseInt(${l})`;s.fail$data((0,e._)`(${r} === 0 || (${l} = ${i}/${r}, ${c}))`)}};return Qt.default=f,Qt}var er={},tr={},Ka;function jd(){if(Ka)return tr;Ka=1,Object.defineProperty(tr,"__esModule",{value:!0});function e(t){const f=t.length;let s=0,d=0,i;for(;d<f;)s++,i=t.charCodeAt(d++),i>=55296&&i<=56319&&d<f&&(i=t.charCodeAt(d),(i&64512)===56320&&d++);return s}return tr.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',tr}var Ha;function Fd(){if(Ha)return er;Ha=1,Object.defineProperty(er,"__esModule",{value:!0});const e=re(),t=ie(),f=jd(),d={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:r}){const a=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${r} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:r,data:a,schemaCode:o,it:l}=i,c=r==="maxLength"?e.operators.GT:e.operators.LT,g=l.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(i.gen,f.default)}(${a})`;i.fail$data((0,e._)`${g} ${c} ${o}`)}};return er.default=d,er}var rr={},xa;function Md(){if(xa)return rr;xa=1,Object.defineProperty(rr,"__esModule",{value:!0});const e=Ce(),t=re(),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:d})=>(0,t.str)`must match pattern "${d}"`,params:({schemaCode:d})=>(0,t._)`{pattern: ${d}}`},code(d){const{data:i,$data:r,schema:a,schemaCode:o,it:l}=d,c=l.opts.unicodeRegExp?"u":"",g=r?(0,t._)`(new RegExp(${o}, ${c}))`:(0,e.usePattern)(d,a);d.fail$data((0,t._)`!${g}.test(${i})`)}};return rr.default=s,rr}var nr={},Ba;function Ud(){if(Ba)return nr;Ba=1,Object.defineProperty(nr,"__esModule",{value:!0});const e=re(),f={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:d}){const i=s==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${d} properties`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:d,data:i,schemaCode:r}=s,a=d==="maxProperties"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`Object.keys(${i}).length ${a} ${r}`)}};return nr.default=f,nr}var sr={},Wa;function Vd(){if(Wa)return sr;Wa=1,Object.defineProperty(sr,"__esModule",{value:!0});const e=Ce(),t=re(),f=ie(),d={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,t.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,t._)`{missingProperty: ${i}}`},code(i){const{gen:r,schema:a,schemaCode:o,data:l,$data:c,it:g}=i,{opts:E}=g;if(!c&&a.length===0)return;const _=a.length>=E.loopRequired;if(g.allErrors?w():R(),E.strictRequired){const n=i.parentSchema.properties,{definedProperties:m}=i.it;for(const v of a)if(n?.[v]===void 0&&!m.has(v)){const p=g.schemaEnv.baseId+g.errSchemaPath,y=`required property "${v}" is not defined at "${p}" (strictRequired)`;(0,f.checkStrictMode)(g,y,g.opts.strictRequired)}}function w(){if(_||c)i.block$data(t.nil,u);else for(const n of a)(0,e.checkReportMissingProp)(i,n)}function R(){const n=r.let("missing");if(_||c){const m=r.let("valid",!0);i.block$data(m,()=>h(n,m)),i.ok(m)}else r.if((0,e.checkMissingProp)(i,a,n)),(0,e.reportMissingProp)(i,n),r.else()}function u(){r.forOf("prop",o,n=>{i.setParams({missingProperty:n}),r.if((0,e.noPropertyInData)(r,l,n,E.ownProperties),()=>i.error())})}function h(n,m){i.setParams({missingProperty:n}),r.forOf(n,o,()=>{r.assign(m,(0,e.propertyInData)(r,l,n,E.ownProperties)),r.if((0,t.not)(m),()=>{i.error(),r.break()})},t.nil)}}};return sr.default=d,sr}var ir={},Ja;function zd(){if(Ja)return ir;Ja=1,Object.defineProperty(ir,"__esModule",{value:!0});const e=re(),f={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:d}){const i=s==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${d} items`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:d,data:i,schemaCode:r}=s,a=d==="maxItems"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`${i}.length ${a} ${r}`)}};return ir.default=f,ir}var or={},ar={},Za;function Yi(){if(Za)return ar;Za=1,Object.defineProperty(ar,"__esModule",{value:!0});const e=Sn();return e.code='require("ajv/dist/runtime/equal").default',ar.default=e,ar}var Xa;function Gd(){if(Xa)return or;Xa=1,Object.defineProperty(or,"__esModule",{value:!0});const e=_n(),t=re(),f=ie(),s=Yi(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:r,j:a}})=>(0,t.str)`must NOT have duplicate items (items ## ${a} and ${r} are identical)`,params:({params:{i:r,j:a}})=>(0,t._)`{i: ${r}, j: ${a}}`},code(r){const{gen:a,data:o,$data:l,schema:c,parentSchema:g,schemaCode:E,it:_}=r;if(!l&&!c)return;const w=a.let("valid"),R=g.items?(0,e.getSchemaTypes)(g.items):[];r.block$data(w,u,(0,t._)`${E} === false`),r.ok(w);function u(){const v=a.let("i",(0,t._)`${o}.length`),p=a.let("j");r.setParams({i:v,j:p}),a.assign(w,!0),a.if((0,t._)`${v} > 1`,()=>(h()?n:m)(v,p))}function h(){return R.length>0&&!R.some(v=>v==="object"||v==="array")}function n(v,p){const y=a.name("item"),$=(0,e.checkDataTypes)(R,y,_.opts.strictNumbers,e.DataType.Wrong),b=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${v}--;`,()=>{a.let(y,(0,t._)`${o}[${v}]`),a.if($,(0,t._)`continue`),R.length>1&&a.if((0,t._)`typeof ${y} == "string"`,(0,t._)`${y} += "_"`),a.if((0,t._)`typeof ${b}[${y}] == "number"`,()=>{a.assign(p,(0,t._)`${b}[${y}]`),r.error(),a.assign(w,!1).break()}).code((0,t._)`${b}[${y}] = ${v}`)})}function m(v,p){const y=(0,f.useFunc)(a,s.default),$=a.name("outer");a.label($).for((0,t._)`;${v}--;`,()=>a.for((0,t._)`${p} = ${v}; ${p}--;`,()=>a.if((0,t._)`${y}(${o}[${v}], ${o}[${p}])`,()=>{r.error(),a.assign(w,!1).break($)})))}}};return or.default=i,or}var cr={},Ya;function Kd(){if(Ya)return cr;Ya=1,Object.defineProperty(cr,"__esModule",{value:!0});const e=re(),t=ie(),f=Yi(),d={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},code(i){const{gen:r,data:a,$data:o,schemaCode:l,schema:c}=i;o||c&&typeof c=="object"?i.fail$data((0,e._)`!${(0,t.useFunc)(r,f.default)}(${a}, ${l})`):i.fail((0,e._)`${c} !== ${a}`)}};return cr.default=d,cr}var ur={},Qa;function Hd(){if(Qa)return ur;Qa=1,Object.defineProperty(ur,"__esModule",{value:!0});const e=re(),t=ie(),f=Yi(),d={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},code(i){const{gen:r,data:a,$data:o,schema:l,schemaCode:c,it:g}=i;if(!o&&l.length===0)throw new Error("enum must have non-empty array");const E=l.length>=g.opts.loopEnum;let _;const w=()=>_??(_=(0,t.useFunc)(r,f.default));let R;if(E||o)R=r.let("valid"),i.block$data(R,u);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const n=r.const("vSchema",c);R=(0,e.or)(...l.map((m,v)=>h(n,v)))}i.pass(R);function u(){r.assign(R,!1),r.forOf("v",c,n=>r.if((0,e._)`${w()}(${a}, ${n})`,()=>r.assign(R,!0).break()))}function h(n,m){const v=l[m];return typeof v=="object"&&v!==null?(0,e._)`${w()}(${a}, ${n}[${m}])`:(0,e._)`${a} === ${v}`}}};return ur.default=d,ur}var ec;function xd(){if(ec)return Xt;ec=1,Object.defineProperty(Xt,"__esModule",{value:!0});const e=qd(),t=kd(),f=Fd(),s=Md(),d=Ud(),i=Vd(),r=zd(),a=Gd(),o=Kd(),l=Hd(),c=[e.default,t.default,f.default,s.default,d.default,i.default,r.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},o.default,l.default];return Xt.default=c,Xt}var lr={},it={},tc;function cf(){if(tc)return it;tc=1,Object.defineProperty(it,"__esModule",{value:!0}),it.validateAdditionalItems=void 0;const e=re(),t=ie(),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{parentSchema:r,it:a}=i,{items:o}=r;if(!Array.isArray(o)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}d(i,o)}};function d(i,r){const{gen:a,schema:o,data:l,keyword:c,it:g}=i;g.items=!0;const E=a.const("len",(0,e._)`${l}.length`);if(o===!1)i.setParams({len:r.length}),i.pass((0,e._)`${E} <= ${r.length}`);else if(typeof o=="object"&&!(0,t.alwaysValidSchema)(g,o)){const w=a.var("valid",(0,e._)`${E} <= ${r.length}`);a.if((0,e.not)(w),()=>_(w)),i.ok(w)}function _(w){a.forRange("i",r.length,E,R=>{i.subschema({keyword:c,dataProp:R,dataPropType:t.Type.Num},w),g.allErrors||a.if((0,e.not)(w),()=>a.break())})}}return it.validateAdditionalItems=d,it.default=s,it}var fr={},ot={},rc;function uf(){if(rc)return ot;rc=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.validateTuple=void 0;const e=re(),t=ie(),f=Ce(),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:r,it:a}=i;if(Array.isArray(r))return d(i,"additionalItems",r);a.items=!0,!(0,t.alwaysValidSchema)(a,r)&&i.ok((0,f.validateArray)(i))}};function d(i,r,a=i.schema){const{gen:o,parentSchema:l,data:c,keyword:g,it:E}=i;R(l),E.opts.unevaluated&&a.length&&E.items!==!0&&(E.items=t.mergeEvaluated.items(o,a.length,E.items));const _=o.name("valid"),w=o.const("len",(0,e._)`${c}.length`);a.forEach((u,h)=>{(0,t.alwaysValidSchema)(E,u)||(o.if((0,e._)`${w} > ${h}`,()=>i.subschema({keyword:g,schemaProp:h,dataProp:h},_)),i.ok(_))});function R(u){const{opts:h,errSchemaPath:n}=E,m=a.length,v=m===u.minItems&&(m===u.maxItems||u[r]===!1);if(h.strictTuples&&!v){const p=`"${g}" is ${m}-tuple, but minItems or maxItems/${r} are not specified or different at path "${n}"`;(0,t.checkStrictMode)(E,p,h.strictTuples)}}}return ot.validateTuple=d,ot.default=s,ot}var nc;function Bd(){if(nc)return fr;nc=1,Object.defineProperty(fr,"__esModule",{value:!0});const e=uf(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:f=>(0,e.validateTuple)(f,"items")};return fr.default=t,fr}var dr={},sc;function Wd(){if(sc)return dr;sc=1,Object.defineProperty(dr,"__esModule",{value:!0});const e=re(),t=ie(),f=Ce(),s=cf(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:r}})=>(0,e.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,e._)`{limit: ${r}}`},code(r){const{schema:a,parentSchema:o,it:l}=r,{prefixItems:c}=o;l.items=!0,!(0,t.alwaysValidSchema)(l,a)&&(c?(0,s.validateAdditionalItems)(r,c):r.ok((0,f.validateArray)(r)))}};return dr.default=i,dr}var hr={},ic;function Jd(){if(ic)return hr;ic=1,Object.defineProperty(hr,"__esModule",{value:!0});const e=re(),t=ie(),s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:d,max:i}})=>i===void 0?(0,e.str)`must contain at least ${d} valid item(s)`:(0,e.str)`must contain at least ${d} and no more than ${i} valid item(s)`,params:({params:{min:d,max:i}})=>i===void 0?(0,e._)`{minContains: ${d}}`:(0,e._)`{minContains: ${d}, maxContains: ${i}}`},code(d){const{gen:i,schema:r,parentSchema:a,data:o,it:l}=d;let c,g;const{minContains:E,maxContains:_}=a;l.opts.next?(c=E===void 0?1:E,g=_):c=1;const w=i.const("len",(0,e._)`${o}.length`);if(d.setParams({min:c,max:g}),g===void 0&&c===0){(0,t.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(g!==void 0&&c>g){(0,t.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),d.fail();return}if((0,t.alwaysValidSchema)(l,r)){let m=(0,e._)`${w} >= ${c}`;g!==void 0&&(m=(0,e._)`${m} && ${w} <= ${g}`),d.pass(m);return}l.items=!0;const R=i.name("valid");g===void 0&&c===1?h(R,()=>i.if(R,()=>i.break())):c===0?(i.let(R,!0),g!==void 0&&i.if((0,e._)`${o}.length > 0`,u)):(i.let(R,!1),u()),d.result(R,()=>d.reset());function u(){const m=i.name("_valid"),v=i.let("count",0);h(m,()=>i.if(m,()=>n(v)))}function h(m,v){i.forRange("i",0,w,p=>{d.subschema({keyword:"contains",dataProp:p,dataPropType:t.Type.Num,compositeRule:!0},m),v()})}function n(m){i.code((0,e._)`${m}++`),g===void 0?i.if((0,e._)`${m} >= ${c}`,()=>i.assign(R,!0).break()):(i.if((0,e._)`${m} > ${g}`,()=>i.assign(R,!1).break()),c===1?i.assign(R,!0):i.if((0,e._)`${m} >= ${c}`,()=>i.assign(R,!0)))}}};return hr.default=s,hr}var Ts={},oc;function Zd(){return oc||(oc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=re(),f=ie(),s=Ce();e.error={message:({params:{property:o,depsCount:l,deps:c}})=>{const g=l===1?"property":"properties";return(0,t.str)`must have ${g} ${c} when property ${o} is present`},params:({params:{property:o,depsCount:l,deps:c,missingProperty:g}})=>(0,t._)`{property: ${o},
12
- missingProperty: ${g},
13
- depsCount: ${l},
14
- deps: ${c}}`};const d={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(o){const[l,c]=i(o);r(o,l),a(o,c)}};function i({schema:o}){const l={},c={};for(const g in o){if(g==="__proto__")continue;const E=Array.isArray(o[g])?l:c;E[g]=o[g]}return[l,c]}function r(o,l=o.schema){const{gen:c,data:g,it:E}=o;if(Object.keys(l).length===0)return;const _=c.let("missing");for(const w in l){const R=l[w];if(R.length===0)continue;const u=(0,s.propertyInData)(c,g,w,E.opts.ownProperties);o.setParams({property:w,depsCount:R.length,deps:R.join(", ")}),E.allErrors?c.if(u,()=>{for(const h of R)(0,s.checkReportMissingProp)(o,h)}):(c.if((0,t._)`${u} && (${(0,s.checkMissingProp)(o,R,_)})`),(0,s.reportMissingProp)(o,_),c.else())}}e.validatePropertyDeps=r;function a(o,l=o.schema){const{gen:c,data:g,keyword:E,it:_}=o,w=c.name("valid");for(const R in l)(0,f.alwaysValidSchema)(_,l[R])||(c.if((0,s.propertyInData)(c,g,R,_.opts.ownProperties),()=>{const u=o.subschema({keyword:E,schemaProp:R},w);o.mergeValidEvaluated(u,w)},()=>c.var(w,!0)),o.ok(w))}e.validateSchemaDeps=a,e.default=d}(Ts)),Ts}var mr={},ac;function Xd(){if(ac)return mr;ac=1,Object.defineProperty(mr,"__esModule",{value:!0});const e=re(),t=ie(),s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:d})=>(0,e._)`{propertyName: ${d.propertyName}}`},code(d){const{gen:i,schema:r,data:a,it:o}=d;if((0,t.alwaysValidSchema)(o,r))return;const l=i.name("valid");i.forIn("key",a,c=>{d.setParams({propertyName:c}),d.subschema({keyword:"propertyNames",data:c,dataTypes:["string"],propertyName:c,compositeRule:!0},l),i.if((0,e.not)(l),()=>{d.error(!0),o.allErrors||i.break()})}),d.ok(l)}};return mr.default=s,mr}var pr={},cc;function lf(){if(cc)return pr;cc=1,Object.defineProperty(pr,"__esModule",{value:!0});const e=Ce(),t=re(),f=Ke(),s=ie(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:r})=>(0,t._)`{additionalProperty: ${r.additionalProperty}}`},code(r){const{gen:a,schema:o,parentSchema:l,data:c,errsCount:g,it:E}=r;if(!g)throw new Error("ajv implementation error");const{allErrors:_,opts:w}=E;if(E.props=!0,w.removeAdditional!=="all"&&(0,s.alwaysValidSchema)(E,o))return;const R=(0,e.allSchemaProperties)(l.properties),u=(0,e.allSchemaProperties)(l.patternProperties);h(),r.ok((0,t._)`${g} === ${f.default.errors}`);function h(){a.forIn("key",c,y=>{!R.length&&!u.length?v(y):a.if(n(y),()=>v(y))})}function n(y){let $;if(R.length>8){const b=(0,s.schemaRefOrVal)(E,l.properties,"properties");$=(0,e.isOwnProperty)(a,b,y)}else R.length?$=(0,t.or)(...R.map(b=>(0,t._)`${y} === ${b}`)):$=t.nil;return u.length&&($=(0,t.or)($,...u.map(b=>(0,t._)`${(0,e.usePattern)(r,b)}.test(${y})`))),(0,t.not)($)}function m(y){a.code((0,t._)`delete ${c}[${y}]`)}function v(y){if(w.removeAdditional==="all"||w.removeAdditional&&o===!1){m(y);return}if(o===!1){r.setParams({additionalProperty:y}),r.error(),_||a.break();return}if(typeof o=="object"&&!(0,s.alwaysValidSchema)(E,o)){const $=a.name("valid");w.removeAdditional==="failing"?(p(y,$,!1),a.if((0,t.not)($),()=>{r.reset(),m(y)})):(p(y,$),_||a.if((0,t.not)($),()=>a.break()))}}function p(y,$,b){const N={keyword:"additionalProperties",dataProp:y,dataPropType:s.Type.Str};b===!1&&Object.assign(N,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(N,$)}}};return pr.default=i,pr}var yr={},uc;function Yd(){if(uc)return yr;uc=1,Object.defineProperty(yr,"__esModule",{value:!0});const e=bn(),t=Ce(),f=ie(),s=lf(),d={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:r,schema:a,parentSchema:o,data:l,it:c}=i;c.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&s.default.code(new e.KeywordCxt(c,s.default,"additionalProperties"));const g=(0,t.allSchemaProperties)(a);for(const u of g)c.definedProperties.add(u);c.opts.unevaluated&&g.length&&c.props!==!0&&(c.props=f.mergeEvaluated.props(r,(0,f.toHash)(g),c.props));const E=g.filter(u=>!(0,f.alwaysValidSchema)(c,a[u]));if(E.length===0)return;const _=r.name("valid");for(const u of E)w(u)?R(u):(r.if((0,t.propertyInData)(r,l,u,c.opts.ownProperties)),R(u),c.allErrors||r.else().var(_,!0),r.endIf()),i.it.definedProperties.add(u),i.ok(_);function w(u){return c.opts.useDefaults&&!c.compositeRule&&a[u].default!==void 0}function R(u){i.subschema({keyword:"properties",schemaProp:u,dataProp:u},_)}}};return yr.default=d,yr}var vr={},lc;function Qd(){if(lc)return vr;lc=1,Object.defineProperty(vr,"__esModule",{value:!0});const e=Ce(),t=re(),f=ie(),s=ie(),d={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:r,schema:a,data:o,parentSchema:l,it:c}=i,{opts:g}=c,E=(0,e.allSchemaProperties)(a),_=E.filter(v=>(0,f.alwaysValidSchema)(c,a[v]));if(E.length===0||_.length===E.length&&(!c.opts.unevaluated||c.props===!0))return;const w=g.strictSchema&&!g.allowMatchingProperties&&l.properties,R=r.name("valid");c.props!==!0&&!(c.props instanceof t.Name)&&(c.props=(0,s.evaluatedPropsToName)(r,c.props));const{props:u}=c;h();function h(){for(const v of E)w&&n(v),c.allErrors?m(v):(r.var(R,!0),m(v),r.if(R))}function n(v){for(const p in w)new RegExp(v).test(p)&&(0,f.checkStrictMode)(c,`property ${p} matches pattern ${v} (use allowMatchingProperties)`)}function m(v){r.forIn("key",o,p=>{r.if((0,t._)`${(0,e.usePattern)(i,v)}.test(${p})`,()=>{const y=_.includes(v);y||i.subschema({keyword:"patternProperties",schemaProp:v,dataProp:p,dataPropType:s.Type.Str},R),c.opts.unevaluated&&u!==!0?r.assign((0,t._)`${u}[${p}]`,!0):!y&&!c.allErrors&&r.if((0,t.not)(R),()=>r.break())})})}}};return vr.default=d,vr}var _r={},fc;function eh(){if(fc)return _r;fc=1,Object.defineProperty(_r,"__esModule",{value:!0});const e=ie(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(f){const{gen:s,schema:d,it:i}=f;if((0,e.alwaysValidSchema)(i,d)){f.fail();return}const r=s.name("valid");f.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),f.failResult(r,()=>f.reset(),()=>f.error())},error:{message:"must NOT be valid"}};return _r.default=t,_r}var gr={},dc;function th(){if(dc)return gr;dc=1,Object.defineProperty(gr,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ce().validateUnion,error:{message:"must match a schema in anyOf"}};return gr.default=t,gr}var $r={},hc;function rh(){if(hc)return $r;hc=1,Object.defineProperty($r,"__esModule",{value:!0});const e=re(),t=ie(),s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:d})=>(0,e._)`{passingSchemas: ${d.passing}}`},code(d){const{gen:i,schema:r,parentSchema:a,it:o}=d;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&a.discriminator)return;const l=r,c=i.let("valid",!1),g=i.let("passing",null),E=i.name("_valid");d.setParams({passing:g}),i.block(_),d.result(c,()=>d.reset(),()=>d.error(!0));function _(){l.forEach((w,R)=>{let u;(0,t.alwaysValidSchema)(o,w)?i.var(E,!0):u=d.subschema({keyword:"oneOf",schemaProp:R,compositeRule:!0},E),R>0&&i.if((0,e._)`${E} && ${c}`).assign(c,!1).assign(g,(0,e._)`[${g}, ${R}]`).else(),i.if(E,()=>{i.assign(c,!0),i.assign(g,R),u&&d.mergeEvaluated(u,e.Name)})})}}};return $r.default=s,$r}var Er={},mc;function nh(){if(mc)return Er;mc=1,Object.defineProperty(Er,"__esModule",{value:!0});const e=ie(),t={keyword:"allOf",schemaType:"array",code(f){const{gen:s,schema:d,it:i}=f;if(!Array.isArray(d))throw new Error("ajv implementation error");const r=s.name("valid");d.forEach((a,o)=>{if((0,e.alwaysValidSchema)(i,a))return;const l=f.subschema({keyword:"allOf",schemaProp:o},r);f.ok(r),f.mergeEvaluated(l)})}};return Er.default=t,Er}var wr={},pc;function sh(){if(pc)return wr;pc=1,Object.defineProperty(wr,"__esModule",{value:!0});const e=re(),t=ie(),s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:r,parentSchema:a,it:o}=i;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const l=d(o,"then"),c=d(o,"else");if(!l&&!c)return;const g=r.let("valid",!0),E=r.name("_valid");if(_(),i.reset(),l&&c){const R=r.let("ifClause");i.setParams({ifClause:R}),r.if(E,w("then",R),w("else",R))}else l?r.if(E,w("then")):r.if((0,e.not)(E),w("else"));i.pass(g,()=>i.error(!0));function _(){const R=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},E);i.mergeEvaluated(R)}function w(R,u){return()=>{const h=i.subschema({keyword:R},E);r.assign(g,E),i.mergeValidEvaluated(h,g),u?r.assign(u,(0,e._)`${R}`):i.setParams({ifClause:R})}}}};function d(i,r){const a=i.schema[r];return a!==void 0&&!(0,t.alwaysValidSchema)(i,a)}return wr.default=s,wr}var Sr={},yc;function ih(){if(yc)return Sr;yc=1,Object.defineProperty(Sr,"__esModule",{value:!0});const e=ie(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:f,parentSchema:s,it:d}){s.if===void 0&&(0,e.checkStrictMode)(d,`"${f}" without "if" is ignored`)}};return Sr.default=t,Sr}var vc;function oh(){if(vc)return lr;vc=1,Object.defineProperty(lr,"__esModule",{value:!0});const e=cf(),t=Bd(),f=uf(),s=Wd(),d=Jd(),i=Zd(),r=Xd(),a=lf(),o=Yd(),l=Qd(),c=eh(),g=th(),E=rh(),_=nh(),w=sh(),R=ih();function u(h=!1){const n=[c.default,g.default,E.default,_.default,w.default,R.default,r.default,a.default,i.default,o.default,l.default];return h?n.push(t.default,s.default):n.push(e.default,f.default),n.push(d.default),n}return lr.default=u,lr}var Rr={},br={},_c;function ah(){if(_c)return br;_c=1,Object.defineProperty(br,"__esModule",{value:!0});const e=re(),f={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,e.str)`must match format "${s}"`,params:({schemaCode:s})=>(0,e._)`{format: ${s}}`},code(s,d){const{gen:i,data:r,$data:a,schema:o,schemaCode:l,it:c}=s,{opts:g,errSchemaPath:E,schemaEnv:_,self:w}=c;if(!g.validateFormats)return;a?R():u();function R(){const h=i.scopeValue("formats",{ref:w.formats,code:g.code.formats}),n=i.const("fDef",(0,e._)`${h}[${l}]`),m=i.let("fType"),v=i.let("format");i.if((0,e._)`typeof ${n} == "object" && !(${n} instanceof RegExp)`,()=>i.assign(m,(0,e._)`${n}.type || "string"`).assign(v,(0,e._)`${n}.validate`),()=>i.assign(m,(0,e._)`"string"`).assign(v,n)),s.fail$data((0,e.or)(p(),y()));function p(){return g.strictSchema===!1?e.nil:(0,e._)`${l} && !${v}`}function y(){const $=_.$async?(0,e._)`(${n}.async ? await ${v}(${r}) : ${v}(${r}))`:(0,e._)`${v}(${r})`,b=(0,e._)`(typeof ${v} == "function" ? ${$} : ${v}.test(${r}))`;return(0,e._)`${v} && ${v} !== true && ${m} === ${d} && !${b}`}}function u(){const h=w.formats[o];if(!h){p();return}if(h===!0)return;const[n,m,v]=y(h);n===d&&s.pass($());function p(){if(g.strictSchema===!1){w.logger.warn(b());return}throw new Error(b());function b(){return`unknown format "${o}" ignored in schema at path "${E}"`}}function y(b){const N=b instanceof RegExp?(0,e.regexpCode)(b):g.code.formats?(0,e._)`${g.code.formats}${(0,e.getProperty)(o)}`:void 0,L=i.scopeValue("formats",{key:o,ref:b,code:N});return typeof b=="object"&&!(b instanceof RegExp)?[b.type||"string",b.validate,(0,e._)`${L}.validate`]:["string",b,L]}function $(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${v}(${r})`}return typeof m=="function"?(0,e._)`${v}(${r})`:(0,e._)`${v}.test(${r})`}}}};return br.default=f,br}var gc;function ch(){if(gc)return Rr;gc=1,Object.defineProperty(Rr,"__esModule",{value:!0});const t=[ah().default];return Rr.default=t,Rr}var Qe={},$c;function uh(){return $c||($c=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.contentVocabulary=Qe.metadataVocabulary=void 0,Qe.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Qe.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Qe}var Ec;function lh(){if(Ec)return Wt;Ec=1,Object.defineProperty(Wt,"__esModule",{value:!0});const e=Ld(),t=xd(),f=oh(),s=ch(),d=uh(),i=[e.default,t.default,(0,f.default)(),s.default,d.metadataVocabulary,d.contentVocabulary];return Wt.default=i,Wt}var Pr={},yt={},wc;function fh(){if(wc)return yt;wc=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.DiscrError=void 0;var e;return function(t){t.Tag="tag",t.Mapping="mapping"}(e||(yt.DiscrError=e={})),yt}var Sc;function dh(){if(Sc)return Pr;Sc=1,Object.defineProperty(Pr,"__esModule",{value:!0});const e=re(),t=fh(),f=Xi(),s=Pn(),d=ie(),r={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:o}})=>a===t.DiscrError.Tag?`tag "${o}" must be string`:`value of tag "${o}" must be in oneOf`,params:({params:{discrError:a,tag:o,tagName:l}})=>(0,e._)`{error: ${a}, tag: ${l}, tagValue: ${o}}`},code(a){const{gen:o,data:l,schema:c,parentSchema:g,it:E}=a,{oneOf:_}=g;if(!E.opts.discriminator)throw new Error("discriminator: requires discriminator option");const w=c.propertyName;if(typeof w!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const R=o.let("valid",!1),u=o.const("tag",(0,e._)`${l}${(0,e.getProperty)(w)}`);o.if((0,e._)`typeof ${u} == "string"`,()=>h(),()=>a.error(!1,{discrError:t.DiscrError.Tag,tag:u,tagName:w})),a.ok(R);function h(){const v=m();o.if(!1);for(const p in v)o.elseIf((0,e._)`${u} === ${p}`),o.assign(R,n(v[p]));o.else(),a.error(!1,{discrError:t.DiscrError.Mapping,tag:u,tagName:w}),o.endIf()}function n(v){const p=o.name("valid"),y=a.subschema({keyword:"oneOf",schemaProp:v},p);return a.mergeEvaluated(y,e.Name),p}function m(){var v;const p={},y=b(g);let $=!0;for(let F=0;F<_.length;F++){let H=_[F];if(H?.$ref&&!(0,d.schemaHasRulesButRef)(H,E.self.RULES)){const U=H.$ref;if(H=f.resolveRef.call(E.self,E.schemaEnv.root,E.baseId,U),H instanceof f.SchemaEnv&&(H=H.schema),H===void 0)throw new s.default(E.opts.uriResolver,E.baseId,U)}const M=(v=H?.properties)===null||v===void 0?void 0:v[w];if(typeof M!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${w}"`);$=$&&(y||b(H)),N(M,F)}if(!$)throw new Error(`discriminator: "${w}" must be required`);return p;function b({required:F}){return Array.isArray(F)&&F.includes(w)}function N(F,H){if(F.const)L(F.const,H);else if(F.enum)for(const M of F.enum)L(M,H);else throw new Error(`discriminator: "properties/${w}" must have "const" or "enum"`)}function L(F,H){if(typeof F!="string"||F in p)throw new Error(`discriminator: "${w}" values must be unique strings`);p[F]=H}}}};return Pr.default=r,Pr}const hh="http://json-schema.org/draft-07/schema#",mh="http://json-schema.org/draft-07/schema#",ph="Core schema meta-schema",yh={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},vh=["object","boolean"],_h={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},gh={$schema:hh,$id:mh,title:ph,definitions:yh,type:vh,properties:_h,default:!0};var Rc;function $h(){return Rc||(Rc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const f=Cd(),s=lh(),d=dh(),i=gh,r=["/properties"],a="http://json-schema.org/draft-07/schema";class o extends f.default{_addVocabularies(){super._addVocabularies(),s.default.forEach(w=>this.addVocabulary(w)),this.opts.discriminator&&this.addKeyword(d.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const w=this.opts.$data?this.$dataMetaSchema(i,r):i;this.addMetaSchema(w,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv=o,e.exports=t=o,e.exports.Ajv=o,Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var l=bn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=re();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var g=Zi();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return g.default}});var E=Pn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return E.default}})}(Gt,Gt.exports)),Gt.exports}var Nr={exports:{}},Cs={},bc;function Eh(){return bc||(bc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(N,L){return{validate:N,compare:L}}e.fullFormats={date:t(i,r),time:t(o,l),"date-time":t(g,E),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:R,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:b,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:h,int32:{type:"number",validate:v},int64:{type:"number",validate:p},float:{type:"number",validate:y},double:{type:"number",validate:y},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,r),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,E),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function f(N){return N%4===0&&(N%100!==0||N%400===0)}const s=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,d=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(N){const L=s.exec(N);if(!L)return!1;const F=+L[1],H=+L[2],M=+L[3];return H>=1&&H<=12&&M>=1&&M<=(H===2&&f(F)?29:d[H])}function r(N,L){if(N&&L)return N>L?1:N<L?-1:0}const a=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function o(N,L){const F=a.exec(N);if(!F)return!1;const H=+F[1],M=+F[2],U=+F[3],z=F[5];return(H<=23&&M<=59&&U<=59||H===23&&M===59&&U===60)&&(!L||z!=="")}function l(N,L){if(!(N&&L))return;const F=a.exec(N),H=a.exec(L);if(F&&H)return N=F[1]+F[2]+F[3]+(F[4]||""),L=H[1]+H[2]+H[3]+(H[4]||""),N>L?1:N<L?-1:0}const c=/t|\s/i;function g(N){const L=N.split(c);return L.length===2&&i(L[0])&&o(L[1],!0)}function E(N,L){if(!(N&&L))return;const[F,H]=N.split(c),[M,U]=L.split(c),z=r(F,M);if(z!==void 0)return z||l(H,U)}const _=/\/|:/,w=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function R(N){return _.test(N)&&w.test(N)}const u=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function h(N){return u.lastIndex=0,u.test(N)}const n=-2147483648,m=2**31-1;function v(N){return Number.isInteger(N)&&N<=m&&N>=n}function p(N){return Number.isInteger(N)}function y(){return!0}const $=/[^\\]\\Z/;function b(N){if($.test(N))return!1;try{return new RegExp(N),!0}catch{return!1}}}(Cs)),Cs}var Ds={},Or={exports:{}},As={},Me={},et={},Ls={},qs={},ks={},Pc;function gn(){return Pc||(Pc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class f extends t{constructor(n){if(super(),!e.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=f;class s extends t{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((m,v)=>`${m}${v}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((m,v)=>(v instanceof f&&(m[v.str]=(m[v.str]||0)+1),m),{})}}e._Code=s,e.nil=new s("");function d(h,...n){const m=[h[0]];let v=0;for(;v<n.length;)a(m,n[v]),m.push(h[++v]);return new s(m)}e._=d;const i=new s("+");function r(h,...n){const m=[_(h[0])];let v=0;for(;v<n.length;)m.push(i),a(m,n[v]),m.push(i,_(h[++v]));return o(m),new s(m)}e.str=r;function a(h,n){n instanceof s?h.push(...n._items):n instanceof f?h.push(n):h.push(g(n))}e.addCodeArg=a;function o(h){let n=1;for(;n<h.length-1;){if(h[n]===i){const m=l(h[n-1],h[n+1]);if(m!==void 0){h.splice(n-1,3,m);continue}h[n++]="+"}n++}}function l(h,n){if(n==='""')return h;if(h==='""')return n;if(typeof h=="string")return n instanceof f||h[h.length-1]!=='"'?void 0:typeof n!="string"?`${h.slice(0,-1)}${n}"`:n[0]==='"'?h.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(h instanceof f))return`"${h}${n.slice(1)}`}function c(h,n){return n.emptyStr()?h:h.emptyStr()?n:r`${h}${n}`}e.strConcat=c;function g(h){return typeof h=="number"||typeof h=="boolean"||h===null?h:_(Array.isArray(h)?h.join(","):h)}function E(h){return new s(_(h))}e.stringify=E;function _(h){return JSON.stringify(h).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function w(h){return typeof h=="string"&&e.IDENTIFIER.test(h)?new s(`.${h}`):d`[${h}]`}e.getProperty=w;function R(h){if(typeof h=="string"&&e.IDENTIFIER.test(h))return new s(`${h}`);throw new Error(`CodeGen: invalid export name: ${h}, use explicit $id name mapping`)}e.getEsmExportName=R;function u(h){return new s(h.toString())}e.regexpCode=u}(ks)),ks}var js={},Nc;function Oc(){return Nc||(Nc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=gn();class f extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var s;(function(o){o[o.Started=0]="Started",o[o.Completed=1]="Completed"})(s||(e.UsedValueState=s={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class d{constructor({prefixes:l,parent:c}={}){this._names={},this._prefixes=l,this._parent=c}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const c=this._names[l]||this._nameGroup(l);return`${l}${c.index++}`}_nameGroup(l){var c,g;if(!((g=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||g===void 0)&&g.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=d;class i extends t.Name{constructor(l,c){super(c),this.prefix=l}setValue(l,{property:c,itemIndex:g}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(c)}[${g}]`}}e.ValueScopeName=i;const r=(0,t._)`\n`;class a extends d{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?r:t.nil}}get(){return this._scope}name(l){return new i(l,this._newName(l))}value(l,c){var g;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const E=this.toName(l),{prefix:_}=E,w=(g=c.key)!==null&&g!==void 0?g:c.ref;let R=this._values[_];if(R){const n=R.get(w);if(n)return n}else R=this._values[_]=new Map;R.set(w,E);const u=this._scope[_]||(this._scope[_]=[]),h=u.length;return u[h]=c.ref,E.setValue(c,{property:_,itemIndex:h}),E}getValue(l,c){const g=this._values[l];if(g)return g.get(c)}scopeRefs(l,c=this._values){return this._reduceValues(c,g=>{if(g.scopePath===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return(0,t._)`${l}${g.scopePath}`})}scopeCode(l=this._values,c,g){return this._reduceValues(l,E=>{if(E.value===void 0)throw new Error(`CodeGen: name "${E}" has no value`);return E.value.code},c,g)}_reduceValues(l,c,g={},E){let _=t.nil;for(const w in l){const R=l[w];if(!R)continue;const u=g[w]=g[w]||new Map;R.forEach(h=>{if(u.has(h))return;u.set(h,s.Started);let n=c(h);if(n){const m=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,t._)`${_}${m} ${h} = ${n};${this.opts._n}`}else if(n=E?.(h))_=(0,t._)`${_}${n}${this.opts._n}`;else throw new f(h);u.set(h,s.Completed)})}return _}}e.ValueScope=a}(js)),js}var Ic;function te(){return Ic||(Ic=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=gn(),f=Oc();var s=gn();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return s.Name}});var d=Oc();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return d.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return d.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return d.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return d.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class i{optimizeNodes(){return this}optimizeNames(S,P){return this}}class r extends i{constructor(S,P,A){super(),this.varKind=S,this.name=P,this.rhs=A}render({es5:S,_n:P}){const A=S?f.varKinds.var:this.varKind,K=this.rhs===void 0?"":` = ${this.rhs}`;return`${A} ${this.name}${K};`+P}optimizeNames(S,P){if(S[this.name.str])return this.rhs&&(this.rhs=U(this.rhs,S,P)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends i{constructor(S,P,A){super(),this.lhs=S,this.rhs=P,this.sideEffects=A}render({_n:S}){return`${this.lhs} = ${this.rhs};`+S}optimizeNames(S,P){if(!(this.lhs instanceof t.Name&&!S[this.lhs.str]&&!this.sideEffects))return this.rhs=U(this.rhs,S,P),this}get names(){const S=this.lhs instanceof t.Name?{}:{...this.lhs.names};return M(S,this.rhs)}}class o extends a{constructor(S,P,A,K){super(S,A,K),this.op=P}render({_n:S}){return`${this.lhs} ${this.op}= ${this.rhs};`+S}}class l extends i{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`${this.label}:`+S}}class c extends i{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`break${this.label?` ${this.label}`:""};`+S}}class g extends i{constructor(S){super(),this.error=S}render({_n:S}){return`throw ${this.error};`+S}get names(){return this.error.names}}class E extends i{constructor(S){super(),this.code=S}render({_n:S}){return`${this.code};`+S}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(S,P){return this.code=U(this.code,S,P),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class _ extends i{constructor(S=[]){super(),this.nodes=S}render(S){return this.nodes.reduce((P,A)=>P+A.render(S),"")}optimizeNodes(){const{nodes:S}=this;let P=S.length;for(;P--;){const A=S[P].optimizeNodes();Array.isArray(A)?S.splice(P,1,...A):A?S[P]=A:S.splice(P,1)}return S.length>0?this:void 0}optimizeNames(S,P){const{nodes:A}=this;let K=A.length;for(;K--;){const B=A[K];B.optimizeNames(S,P)||(z(S,B.names),A.splice(K,1))}return A.length>0?this:void 0}get names(){return this.nodes.reduce((S,P)=>H(S,P.names),{})}}class w extends _{render(S){return"{"+S._n+super.render(S)+"}"+S._n}}class R extends _{}class u extends w{}u.kind="else";class h extends w{constructor(S,P){super(P),this.condition=S}render(S){let P=`if(${this.condition})`+super.render(S);return this.else&&(P+="else "+this.else.render(S)),P}optimizeNodes(){super.optimizeNodes();const S=this.condition;if(S===!0)return this.nodes;let P=this.else;if(P){const A=P.optimizeNodes();P=this.else=Array.isArray(A)?new u(A):A}if(P)return S===!1?P instanceof h?P:P.nodes:this.nodes.length?this:new h(J(S),P instanceof h?[P]:P.nodes);if(!(S===!1||!this.nodes.length))return this}optimizeNames(S,P){var A;if(this.else=(A=this.else)===null||A===void 0?void 0:A.optimizeNames(S,P),!!(super.optimizeNames(S,P)||this.else))return this.condition=U(this.condition,S,P),this}get names(){const S=super.names;return M(S,this.condition),this.else&&H(S,this.else.names),S}}h.kind="if";class n extends w{}n.kind="for";class m extends n{constructor(S){super(),this.iteration=S}render(S){return`for(${this.iteration})`+super.render(S)}optimizeNames(S,P){if(super.optimizeNames(S,P))return this.iteration=U(this.iteration,S,P),this}get names(){return H(super.names,this.iteration.names)}}class v extends n{constructor(S,P,A,K){super(),this.varKind=S,this.name=P,this.from=A,this.to=K}render(S){const P=S.es5?f.varKinds.var:this.varKind,{name:A,from:K,to:B}=this;return`for(${P} ${A}=${K}; ${A}<${B}; ${A}++)`+super.render(S)}get names(){const S=M(super.names,this.from);return M(S,this.to)}}class p extends n{constructor(S,P,A,K){super(),this.loop=S,this.varKind=P,this.name=A,this.iterable=K}render(S){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(S)}optimizeNames(S,P){if(super.optimizeNames(S,P))return this.iterable=U(this.iterable,S,P),this}get names(){return H(super.names,this.iterable.names)}}class y extends w{constructor(S,P,A){super(),this.name=S,this.args=P,this.async=A}render(S){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(S)}}y.kind="func";class $ extends _{render(S){return"return "+super.render(S)}}$.kind="return";class b extends w{render(S){let P="try"+super.render(S);return this.catch&&(P+=this.catch.render(S)),this.finally&&(P+=this.finally.render(S)),P}optimizeNodes(){var S,P;return super.optimizeNodes(),(S=this.catch)===null||S===void 0||S.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(S,P){var A,K;return super.optimizeNames(S,P),(A=this.catch)===null||A===void 0||A.optimizeNames(S,P),(K=this.finally)===null||K===void 0||K.optimizeNames(S,P),this}get names(){const S=super.names;return this.catch&&H(S,this.catch.names),this.finally&&H(S,this.finally.names),S}}class N extends w{constructor(S){super(),this.error=S}render(S){return`catch(${this.error})`+super.render(S)}}N.kind="catch";class L extends w{render(S){return"finally"+super.render(S)}}L.kind="finally";class F{constructor(S,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
15
- `:""},this._extScope=S,this._scope=new f.Scope({parent:S}),this._nodes=[new R]}toString(){return this._root.render(this.opts)}name(S){return this._scope.name(S)}scopeName(S){return this._extScope.name(S)}scopeValue(S,P){const A=this._extScope.value(S,P);return(this._values[A.prefix]||(this._values[A.prefix]=new Set)).add(A),A}getScopeValue(S,P){return this._extScope.getValue(S,P)}scopeRefs(S){return this._extScope.scopeRefs(S,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(S,P,A,K){const B=this._scope.toName(P);return A!==void 0&&K&&(this._constants[B.str]=A),this._leafNode(new r(S,B,A)),B}const(S,P,A){return this._def(f.varKinds.const,S,P,A)}let(S,P,A){return this._def(f.varKinds.let,S,P,A)}var(S,P,A){return this._def(f.varKinds.var,S,P,A)}assign(S,P,A){return this._leafNode(new a(S,P,A))}add(S,P){return this._leafNode(new o(S,e.operators.ADD,P))}code(S){return typeof S=="function"?S():S!==t.nil&&this._leafNode(new E(S)),this}object(...S){const P=["{"];for(const[A,K]of S)P.length>1&&P.push(","),P.push(A),(A!==K||this.opts.es5)&&(P.push(":"),(0,t.addCodeArg)(P,K));return P.push("}"),new t._Code(P)}if(S,P,A){if(this._blockNode(new h(S)),P&&A)this.code(P).else().code(A).endIf();else if(P)this.code(P).endIf();else if(A)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(S){return this._elseNode(new h(S))}else(){return this._elseNode(new u)}endIf(){return this._endBlockNode(h,u)}_for(S,P){return this._blockNode(S),P&&this.code(P).endFor(),this}for(S,P){return this._for(new m(S),P)}forRange(S,P,A,K,B=this.opts.es5?f.varKinds.var:f.varKinds.let){const X=this._scope.toName(S);return this._for(new v(B,X,P,A),()=>K(X))}forOf(S,P,A,K=f.varKinds.const){const B=this._scope.toName(S);if(this.opts.es5){const X=P instanceof t.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,t._)`${X}.length`,Z=>{this.var(B,(0,t._)`${X}[${Z}]`),A(B)})}return this._for(new p("of",K,B,P),()=>A(B))}forIn(S,P,A,K=this.opts.es5?f.varKinds.var:f.varKinds.const){if(this.opts.ownProperties)return this.forOf(S,(0,t._)`Object.keys(${P})`,A);const B=this._scope.toName(S);return this._for(new p("in",K,B,P),()=>A(B))}endFor(){return this._endBlockNode(n)}label(S){return this._leafNode(new l(S))}break(S){return this._leafNode(new c(S))}return(S){const P=new $;if(this._blockNode(P),this.code(S),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}try(S,P,A){if(!P&&!A)throw new Error('CodeGen: "try" without "catch" and "finally"');const K=new b;if(this._blockNode(K),this.code(S),P){const B=this.name("e");this._currNode=K.catch=new N(B),P(B)}return A&&(this._currNode=K.finally=new L,this.code(A)),this._endBlockNode(N,L)}throw(S){return this._leafNode(new g(S))}block(S,P){return this._blockStarts.push(this._nodes.length),S&&this.code(S).endBlock(P),this}endBlock(S){const P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");const A=this._nodes.length-P;if(A<0||S!==void 0&&A!==S)throw new Error(`CodeGen: wrong number of nodes: ${A} vs ${S} expected`);return this._nodes.length=P,this}func(S,P=t.nil,A,K){return this._blockNode(new y(S,P,A)),K&&this.code(K).endFunc(),this}endFunc(){return this._endBlockNode(y)}optimize(S=1){for(;S-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(S){return this._currNode.nodes.push(S),this}_blockNode(S){this._currNode.nodes.push(S),this._nodes.push(S)}_endBlockNode(S,P){const A=this._currNode;if(A instanceof S||P&&A instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${S.kind}/${P.kind}`:S.kind}"`)}_elseNode(S){const P=this._currNode;if(!(P instanceof h))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=S,this}get _root(){return this._nodes[0]}get _currNode(){const S=this._nodes;return S[S.length-1]}set _currNode(S){const P=this._nodes;P[P.length-1]=S}}e.CodeGen=F;function H(T,S){for(const P in S)T[P]=(T[P]||0)+(S[P]||0);return T}function M(T,S){return S instanceof t._CodeOrName?H(T,S.names):T}function U(T,S,P){if(T instanceof t.Name)return A(T);if(!K(T))return T;return new t._Code(T._items.reduce((B,X)=>(X instanceof t.Name&&(X=A(X)),X instanceof t._Code?B.push(...X._items):B.push(X),B),[]));function A(B){const X=P[B.str];return X===void 0||S[B.str]!==1?B:(delete S[B.str],X)}function K(B){return B instanceof t._Code&&B._items.some(X=>X instanceof t.Name&&S[X.str]===1&&P[X.str]!==void 0)}}function z(T,S){for(const P in S)T[P]=(T[P]||0)-(S[P]||0)}function J(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${q(T)}`}e.not=J;const W=O(e.operators.AND);function j(...T){return T.reduce(W)}e.and=j;const G=O(e.operators.OR);function D(...T){return T.reduce(G)}e.or=D;function O(T){return(S,P)=>S===t.nil?P:P===t.nil?S:(0,t._)`${q(S)} ${T} ${q(P)}`}function q(T){return T instanceof t.Name?T:(0,t._)`(${T})`}}(qs)),qs}var ee={},Tc;function oe(){if(Tc)return ee;Tc=1,Object.defineProperty(ee,"__esModule",{value:!0}),ee.checkStrictMode=ee.getErrorPath=ee.Type=ee.useFunc=ee.setEvaluated=ee.evaluatedPropsToName=ee.mergeEvaluated=ee.eachItem=ee.unescapeJsonPointer=ee.escapeJsonPointer=ee.escapeFragment=ee.unescapeFragment=ee.schemaRefOrVal=ee.schemaHasRulesButRef=ee.schemaHasRules=ee.checkUnknownRules=ee.alwaysValidSchema=ee.toHash=void 0;const e=te(),t=gn();function f(p){const y={};for(const $ of p)y[$]=!0;return y}ee.toHash=f;function s(p,y){return typeof y=="boolean"?y:Object.keys(y).length===0?!0:(d(p,y),!i(y,p.self.RULES.all))}ee.alwaysValidSchema=s;function d(p,y=p.schema){const{opts:$,self:b}=p;if(!$.strictSchema||typeof y=="boolean")return;const N=b.RULES.keywords;for(const L in y)N[L]||v(p,`unknown keyword: "${L}"`)}ee.checkUnknownRules=d;function i(p,y){if(typeof p=="boolean")return!p;for(const $ in p)if(y[$])return!0;return!1}ee.schemaHasRules=i;function r(p,y){if(typeof p=="boolean")return!p;for(const $ in p)if($!=="$ref"&&y.all[$])return!0;return!1}ee.schemaHasRulesButRef=r;function a({topSchemaRef:p,schemaPath:y},$,b,N){if(!N){if(typeof $=="number"||typeof $=="boolean")return $;if(typeof $=="string")return(0,e._)`${$}`}return(0,e._)`${p}${y}${(0,e.getProperty)(b)}`}ee.schemaRefOrVal=a;function o(p){return g(decodeURIComponent(p))}ee.unescapeFragment=o;function l(p){return encodeURIComponent(c(p))}ee.escapeFragment=l;function c(p){return typeof p=="number"?`${p}`:p.replace(/~/g,"~0").replace(/\//g,"~1")}ee.escapeJsonPointer=c;function g(p){return p.replace(/~1/g,"/").replace(/~0/g,"~")}ee.unescapeJsonPointer=g;function E(p,y){if(Array.isArray(p))for(const $ of p)y($);else y(p)}ee.eachItem=E;function _({mergeNames:p,mergeToName:y,mergeValues:$,resultToName:b}){return(N,L,F,H)=>{const M=F===void 0?L:F instanceof e.Name?(L instanceof e.Name?p(N,L,F):y(N,L,F),F):L instanceof e.Name?(y(N,F,L),L):$(L,F);return H===e.Name&&!(M instanceof e.Name)?b(N,M):M}}ee.mergeEvaluated={props:_({mergeNames:(p,y,$)=>p.if((0,e._)`${$} !== true && ${y} !== undefined`,()=>{p.if((0,e._)`${y} === true`,()=>p.assign($,!0),()=>p.assign($,(0,e._)`${$} || {}`).code((0,e._)`Object.assign(${$}, ${y})`))}),mergeToName:(p,y,$)=>p.if((0,e._)`${$} !== true`,()=>{y===!0?p.assign($,!0):(p.assign($,(0,e._)`${$} || {}`),R(p,$,y))}),mergeValues:(p,y)=>p===!0?!0:{...p,...y},resultToName:w}),items:_({mergeNames:(p,y,$)=>p.if((0,e._)`${$} !== true && ${y} !== undefined`,()=>p.assign($,(0,e._)`${y} === true ? true : ${$} > ${y} ? ${$} : ${y}`)),mergeToName:(p,y,$)=>p.if((0,e._)`${$} !== true`,()=>p.assign($,y===!0?!0:(0,e._)`${$} > ${y} ? ${$} : ${y}`)),mergeValues:(p,y)=>p===!0?!0:Math.max(p,y),resultToName:(p,y)=>p.var("items",y)})};function w(p,y){if(y===!0)return p.var("props",!0);const $=p.var("props",(0,e._)`{}`);return y!==void 0&&R(p,$,y),$}ee.evaluatedPropsToName=w;function R(p,y,$){Object.keys($).forEach(b=>p.assign((0,e._)`${y}${(0,e.getProperty)(b)}`,!0))}ee.setEvaluated=R;const u={};function h(p,y){return p.scopeValue("func",{ref:y,code:u[y.code]||(u[y.code]=new t._Code(y.code))})}ee.useFunc=h;var n;(function(p){p[p.Num=0]="Num",p[p.Str=1]="Str"})(n||(ee.Type=n={}));function m(p,y,$){if(p instanceof e.Name){const b=y===n.Num;return $?b?(0,e._)`"[" + ${p} + "]"`:(0,e._)`"['" + ${p} + "']"`:b?(0,e._)`"/" + ${p}`:(0,e._)`"/" + ${p}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return $?(0,e.getProperty)(p).toString():"/"+c(p)}ee.getErrorPath=m;function v(p,y,$=p.opts.strictSchema){if($){if(y=`strict mode: ${y}`,$===!0)throw new Error(y);p.self.logger.warn(y)}}return ee.checkStrictMode=v,ee}var Ir={},Cc;function He(){if(Cc)return Ir;Cc=1,Object.defineProperty(Ir,"__esModule",{value:!0});const e=te(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Ir.default=t,Ir}var Dc;function Nn(){return Dc||(Dc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=te(),f=oe(),s=He();e.keywordError={message:({keyword:u})=>(0,t.str)`must pass "${u}" keyword validation`},e.keyword$DataError={message:({keyword:u,schemaType:h})=>h?(0,t.str)`"${u}" keyword must be ${h} ($data)`:(0,t.str)`"${u}" keyword is invalid ($data)`};function d(u,h=e.keywordError,n,m){const{it:v}=u,{gen:p,compositeRule:y,allErrors:$}=v,b=g(u,h,n);m??(y||$)?o(p,b):l(v,(0,t._)`[${b}]`)}e.reportError=d;function i(u,h=e.keywordError,n){const{it:m}=u,{gen:v,compositeRule:p,allErrors:y}=m,$=g(u,h,n);o(v,$),p||y||l(m,s.default.vErrors)}e.reportExtraError=i;function r(u,h){u.assign(s.default.errors,h),u.if((0,t._)`${s.default.vErrors} !== null`,()=>u.if(h,()=>u.assign((0,t._)`${s.default.vErrors}.length`,h),()=>u.assign(s.default.vErrors,null)))}e.resetErrorsCount=r;function a({gen:u,keyword:h,schemaValue:n,data:m,errsCount:v,it:p}){if(v===void 0)throw new Error("ajv implementation error");const y=u.name("err");u.forRange("i",v,s.default.errors,$=>{u.const(y,(0,t._)`${s.default.vErrors}[${$}]`),u.if((0,t._)`${y}.instancePath === undefined`,()=>u.assign((0,t._)`${y}.instancePath`,(0,t.strConcat)(s.default.instancePath,p.errorPath))),u.assign((0,t._)`${y}.schemaPath`,(0,t.str)`${p.errSchemaPath}/${h}`),p.opts.verbose&&(u.assign((0,t._)`${y}.schema`,n),u.assign((0,t._)`${y}.data`,m))})}e.extendErrors=a;function o(u,h){const n=u.const("err",h);u.if((0,t._)`${s.default.vErrors} === null`,()=>u.assign(s.default.vErrors,(0,t._)`[${n}]`),(0,t._)`${s.default.vErrors}.push(${n})`),u.code((0,t._)`${s.default.errors}++`)}function l(u,h){const{gen:n,validateName:m,schemaEnv:v}=u;v.$async?n.throw((0,t._)`new ${u.ValidationError}(${h})`):(n.assign((0,t._)`${m}.errors`,h),n.return(!1))}const c={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function g(u,h,n){const{createErrors:m}=u.it;return m===!1?(0,t._)`{}`:E(u,h,n)}function E(u,h,n={}){const{gen:m,it:v}=u,p=[_(v,n),w(u,n)];return R(u,h,p),m.object(...p)}function _({errorPath:u},{instancePath:h}){const n=h?(0,t.str)`${u}${(0,f.getErrorPath)(h,f.Type.Str)}`:u;return[s.default.instancePath,(0,t.strConcat)(s.default.instancePath,n)]}function w({keyword:u,it:{errSchemaPath:h}},{schemaPath:n,parentSchema:m}){let v=m?h:(0,t.str)`${h}/${u}`;return n&&(v=(0,t.str)`${v}${(0,f.getErrorPath)(n,f.Type.Str)}`),[c.schemaPath,v]}function R(u,{params:h,message:n},m){const{keyword:v,data:p,schemaValue:y,it:$}=u,{opts:b,propertyName:N,topSchemaRef:L,schemaPath:F}=$;m.push([c.keyword,v],[c.params,typeof h=="function"?h(u):h||(0,t._)`{}`]),b.messages&&m.push([c.message,typeof n=="function"?n(u):n]),b.verbose&&m.push([c.schema,y],[c.parentSchema,(0,t._)`${L}${F}`],[s.default.data,p]),N&&m.push([c.propertyName,N])}}(Ls)),Ls}var Ac;function wh(){if(Ac)return et;Ac=1,Object.defineProperty(et,"__esModule",{value:!0}),et.boolOrEmptySchema=et.topBoolOrEmptySchema=void 0;const e=Nn(),t=te(),f=He(),s={message:"boolean schema is false"};function d(a){const{gen:o,schema:l,validateName:c}=a;l===!1?r(a,!1):typeof l=="object"&&l.$async===!0?o.return(f.default.data):(o.assign((0,t._)`${c}.errors`,null),o.return(!0))}et.topBoolOrEmptySchema=d;function i(a,o){const{gen:l,schema:c}=a;c===!1?(l.var(o,!1),r(a)):l.var(o,!0)}et.boolOrEmptySchema=i;function r(a,o){const{gen:l,data:c}=a,g={gen:l,keyword:"false schema",data:c,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(g,s,void 0,o)}return et}var ye={},tt={},Lc;function ff(){if(Lc)return tt;Lc=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.getRules=tt.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function f(d){return typeof d=="string"&&t.has(d)}tt.isJSONType=f;function s(){const d={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...d,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},d.number,d.string,d.array,d.object],post:{rules:[]},all:{},keywords:{}}}return tt.getRules=s,tt}var Ue={},qc;function df(){if(qc)return Ue;qc=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.shouldUseRule=Ue.shouldUseGroup=Ue.schemaHasRulesForType=void 0;function e({schema:s,self:d},i){const r=d.RULES.types[i];return r&&r!==!0&&t(s,r)}Ue.schemaHasRulesForType=e;function t(s,d){return d.rules.some(i=>f(s,i))}Ue.shouldUseGroup=t;function f(s,d){var i;return s[d.keyword]!==void 0||((i=d.definition.implements)===null||i===void 0?void 0:i.some(r=>s[r]!==void 0))}return Ue.shouldUseRule=f,Ue}var kc;function $n(){if(kc)return ye;kc=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.reportTypeError=ye.checkDataTypes=ye.checkDataType=ye.coerceAndCheckDataType=ye.getJSONTypes=ye.getSchemaTypes=ye.DataType=void 0;const e=ff(),t=df(),f=Nn(),s=te(),d=oe();var i;(function(n){n[n.Correct=0]="Correct",n[n.Wrong=1]="Wrong"})(i||(ye.DataType=i={}));function r(n){const m=a(n.type);if(m.includes("null")){if(n.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!m.length&&n.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');n.nullable===!0&&m.push("null")}return m}ye.getSchemaTypes=r;function a(n){const m=Array.isArray(n)?n:n?[n]:[];if(m.every(e.isJSONType))return m;throw new Error("type must be JSONType or JSONType[]: "+m.join(","))}ye.getJSONTypes=a;function o(n,m){const{gen:v,data:p,opts:y}=n,$=c(m,y.coerceTypes),b=m.length>0&&!($.length===0&&m.length===1&&(0,t.schemaHasRulesForType)(n,m[0]));if(b){const N=w(m,p,y.strictNumbers,i.Wrong);v.if(N,()=>{$.length?g(n,m,$):u(n)})}return b}ye.coerceAndCheckDataType=o;const l=new Set(["string","number","integer","boolean","null"]);function c(n,m){return m?n.filter(v=>l.has(v)||m==="array"&&v==="array"):[]}function g(n,m,v){const{gen:p,data:y,opts:$}=n,b=p.let("dataType",(0,s._)`typeof ${y}`),N=p.let("coerced",(0,s._)`undefined`);$.coerceTypes==="array"&&p.if((0,s._)`${b} == 'object' && Array.isArray(${y}) && ${y}.length == 1`,()=>p.assign(y,(0,s._)`${y}[0]`).assign(b,(0,s._)`typeof ${y}`).if(w(m,y,$.strictNumbers),()=>p.assign(N,y))),p.if((0,s._)`${N} !== undefined`);for(const F of v)(l.has(F)||F==="array"&&$.coerceTypes==="array")&&L(F);p.else(),u(n),p.endIf(),p.if((0,s._)`${N} !== undefined`,()=>{p.assign(y,N),E(n,N)});function L(F){switch(F){case"string":p.elseIf((0,s._)`${b} == "number" || ${b} == "boolean"`).assign(N,(0,s._)`"" + ${y}`).elseIf((0,s._)`${y} === null`).assign(N,(0,s._)`""`);return;case"number":p.elseIf((0,s._)`${b} == "boolean" || ${y} === null
16
- || (${b} == "string" && ${y} && ${y} == +${y})`).assign(N,(0,s._)`+${y}`);return;case"integer":p.elseIf((0,s._)`${b} === "boolean" || ${y} === null
17
- || (${b} === "string" && ${y} && ${y} == +${y} && !(${y} % 1))`).assign(N,(0,s._)`+${y}`);return;case"boolean":p.elseIf((0,s._)`${y} === "false" || ${y} === 0 || ${y} === null`).assign(N,!1).elseIf((0,s._)`${y} === "true" || ${y} === 1`).assign(N,!0);return;case"null":p.elseIf((0,s._)`${y} === "" || ${y} === 0 || ${y} === false`),p.assign(N,null);return;case"array":p.elseIf((0,s._)`${b} === "string" || ${b} === "number"
18
- || ${b} === "boolean" || ${y} === null`).assign(N,(0,s._)`[${y}]`)}}}function E({gen:n,parentData:m,parentDataProperty:v},p){n.if((0,s._)`${m} !== undefined`,()=>n.assign((0,s._)`${m}[${v}]`,p))}function _(n,m,v,p=i.Correct){const y=p===i.Correct?s.operators.EQ:s.operators.NEQ;let $;switch(n){case"null":return(0,s._)`${m} ${y} null`;case"array":$=(0,s._)`Array.isArray(${m})`;break;case"object":$=(0,s._)`${m} && typeof ${m} == "object" && !Array.isArray(${m})`;break;case"integer":$=b((0,s._)`!(${m} % 1) && !isNaN(${m})`);break;case"number":$=b();break;default:return(0,s._)`typeof ${m} ${y} ${n}`}return p===i.Correct?$:(0,s.not)($);function b(N=s.nil){return(0,s.and)((0,s._)`typeof ${m} == "number"`,N,v?(0,s._)`isFinite(${m})`:s.nil)}}ye.checkDataType=_;function w(n,m,v,p){if(n.length===1)return _(n[0],m,v,p);let y;const $=(0,d.toHash)(n);if($.array&&$.object){const b=(0,s._)`typeof ${m} != "object"`;y=$.null?b:(0,s._)`!${m} || ${b}`,delete $.null,delete $.array,delete $.object}else y=s.nil;$.number&&delete $.integer;for(const b in $)y=(0,s.and)(y,_(b,m,v,p));return y}ye.checkDataTypes=w;const R={message:({schema:n})=>`must be ${n}`,params:({schema:n,schemaValue:m})=>typeof n=="string"?(0,s._)`{type: ${n}}`:(0,s._)`{type: ${m}}`};function u(n){const m=h(n);(0,f.reportError)(m,R)}ye.reportTypeError=u;function h(n){const{gen:m,data:v,schema:p}=n,y=(0,d.schemaRefOrVal)(n,p,"type");return{gen:m,keyword:"type",data:v,schema:p.type,schemaCode:y,schemaValue:y,parentSchema:p,params:{},it:n}}return ye}var vt={},jc;function Sh(){if(jc)return vt;jc=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.assignDefaults=void 0;const e=te(),t=oe();function f(d,i){const{properties:r,items:a}=d.schema;if(i==="object"&&r)for(const o in r)s(d,o,r[o].default);else i==="array"&&Array.isArray(a)&&a.forEach((o,l)=>s(d,l,o.default))}vt.assignDefaults=f;function s(d,i,r){const{gen:a,compositeRule:o,data:l,opts:c}=d;if(r===void 0)return;const g=(0,e._)`${l}${(0,e.getProperty)(i)}`;if(o){(0,t.checkStrictMode)(d,`default is ignored for: ${g}`);return}let E=(0,e._)`${g} === undefined`;c.useDefaults==="empty"&&(E=(0,e._)`${E} || ${g} === null || ${g} === ""`),a.if(E,(0,e._)`${g} = ${(0,e.stringify)(r)}`)}return vt}var Te={},le={},Fc;function De(){if(Fc)return le;Fc=1,Object.defineProperty(le,"__esModule",{value:!0}),le.validateUnion=le.validateArray=le.usePattern=le.callValidateCode=le.schemaProperties=le.allSchemaProperties=le.noPropertyInData=le.propertyInData=le.isOwnProperty=le.hasPropFunc=le.reportMissingProp=le.checkMissingProp=le.checkReportMissingProp=void 0;const e=te(),t=oe(),f=He(),s=oe();function d(n,m){const{gen:v,data:p,it:y}=n;v.if(c(v,p,m,y.opts.ownProperties),()=>{n.setParams({missingProperty:(0,e._)`${m}`},!0),n.error()})}le.checkReportMissingProp=d;function i({gen:n,data:m,it:{opts:v}},p,y){return(0,e.or)(...p.map($=>(0,e.and)(c(n,m,$,v.ownProperties),(0,e._)`${y} = ${$}`)))}le.checkMissingProp=i;function r(n,m){n.setParams({missingProperty:m},!0),n.error()}le.reportMissingProp=r;function a(n){return n.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}le.hasPropFunc=a;function o(n,m,v){return(0,e._)`${a(n)}.call(${m}, ${v})`}le.isOwnProperty=o;function l(n,m,v,p){const y=(0,e._)`${m}${(0,e.getProperty)(v)} !== undefined`;return p?(0,e._)`${y} && ${o(n,m,v)}`:y}le.propertyInData=l;function c(n,m,v,p){const y=(0,e._)`${m}${(0,e.getProperty)(v)} === undefined`;return p?(0,e.or)(y,(0,e.not)(o(n,m,v))):y}le.noPropertyInData=c;function g(n){return n?Object.keys(n).filter(m=>m!=="__proto__"):[]}le.allSchemaProperties=g;function E(n,m){return g(m).filter(v=>!(0,t.alwaysValidSchema)(n,m[v]))}le.schemaProperties=E;function _({schemaCode:n,data:m,it:{gen:v,topSchemaRef:p,schemaPath:y,errorPath:$},it:b},N,L,F){const H=F?(0,e._)`${n}, ${m}, ${p}${y}`:m,M=[[f.default.instancePath,(0,e.strConcat)(f.default.instancePath,$)],[f.default.parentData,b.parentData],[f.default.parentDataProperty,b.parentDataProperty],[f.default.rootData,f.default.rootData]];b.opts.dynamicRef&&M.push([f.default.dynamicAnchors,f.default.dynamicAnchors]);const U=(0,e._)`${H}, ${v.object(...M)}`;return L!==e.nil?(0,e._)`${N}.call(${L}, ${U})`:(0,e._)`${N}(${U})`}le.callValidateCode=_;const w=(0,e._)`new RegExp`;function R({gen:n,it:{opts:m}},v){const p=m.unicodeRegExp?"u":"",{regExp:y}=m.code,$=y(v,p);return n.scopeValue("pattern",{key:$.toString(),ref:$,code:(0,e._)`${y.code==="new RegExp"?w:(0,s.useFunc)(n,y)}(${v}, ${p})`})}le.usePattern=R;function u(n){const{gen:m,data:v,keyword:p,it:y}=n,$=m.name("valid");if(y.allErrors){const N=m.let("valid",!0);return b(()=>m.assign(N,!1)),N}return m.var($,!0),b(()=>m.break()),$;function b(N){const L=m.const("len",(0,e._)`${v}.length`);m.forRange("i",0,L,F=>{n.subschema({keyword:p,dataProp:F,dataPropType:t.Type.Num},$),m.if((0,e.not)($),N)})}}le.validateArray=u;function h(n){const{gen:m,schema:v,keyword:p,it:y}=n;if(!Array.isArray(v))throw new Error("ajv implementation error");if(v.some(L=>(0,t.alwaysValidSchema)(y,L))&&!y.opts.unevaluated)return;const b=m.let("valid",!1),N=m.name("_valid");m.block(()=>v.forEach((L,F)=>{const H=n.subschema({keyword:p,schemaProp:F,compositeRule:!0},N);m.assign(b,(0,e._)`${b} || ${N}`),n.mergeValidEvaluated(H,N)||m.if((0,e.not)(b))})),n.result(b,()=>n.reset(),()=>n.error(!0))}return le.validateUnion=h,le}var Mc;function Rh(){if(Mc)return Te;Mc=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.validateKeywordUsage=Te.validSchemaType=Te.funcKeywordCode=Te.macroKeywordCode=void 0;const e=te(),t=He(),f=De(),s=Nn();function d(E,_){const{gen:w,keyword:R,schema:u,parentSchema:h,it:n}=E,m=_.macro.call(n.self,u,h,n),v=l(w,R,m);n.opts.validateSchema!==!1&&n.self.validateSchema(m,!0);const p=w.name("valid");E.subschema({schema:m,schemaPath:e.nil,errSchemaPath:`${n.errSchemaPath}/${R}`,topSchemaRef:v,compositeRule:!0},p),E.pass(p,()=>E.error(!0))}Te.macroKeywordCode=d;function i(E,_){var w;const{gen:R,keyword:u,schema:h,parentSchema:n,$data:m,it:v}=E;o(v,_);const p=!m&&_.compile?_.compile.call(v.self,h,n,v):_.validate,y=l(R,u,p),$=R.let("valid");E.block$data($,b),E.ok((w=_.valid)!==null&&w!==void 0?w:$);function b(){if(_.errors===!1)F(),_.modifying&&r(E),H(()=>E.error());else{const M=_.async?N():L();_.modifying&&r(E),H(()=>a(E,M))}}function N(){const M=R.let("ruleErrs",null);return R.try(()=>F((0,e._)`await `),U=>R.assign($,!1).if((0,e._)`${U} instanceof ${v.ValidationError}`,()=>R.assign(M,(0,e._)`${U}.errors`),()=>R.throw(U))),M}function L(){const M=(0,e._)`${y}.errors`;return R.assign(M,null),F(e.nil),M}function F(M=_.async?(0,e._)`await `:e.nil){const U=v.opts.passContext?t.default.this:t.default.self,z=!("compile"in _&&!m||_.schema===!1);R.assign($,(0,e._)`${M}${(0,f.callValidateCode)(E,y,U,z)}`,_.modifying)}function H(M){var U;R.if((0,e.not)((U=_.valid)!==null&&U!==void 0?U:$),M)}}Te.funcKeywordCode=i;function r(E){const{gen:_,data:w,it:R}=E;_.if(R.parentData,()=>_.assign(w,(0,e._)`${R.parentData}[${R.parentDataProperty}]`))}function a(E,_){const{gen:w}=E;w.if((0,e._)`Array.isArray(${_})`,()=>{w.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${_} : ${t.default.vErrors}.concat(${_})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,s.extendErrors)(E)},()=>E.error())}function o({schemaEnv:E},_){if(_.async&&!E.$async)throw new Error("async keyword in sync schema")}function l(E,_,w){if(w===void 0)throw new Error(`keyword "${_}" failed to compile`);return E.scopeValue("keyword",typeof w=="function"?{ref:w}:{ref:w,code:(0,e.stringify)(w)})}function c(E,_,w=!1){return!_.length||_.some(R=>R==="array"?Array.isArray(E):R==="object"?E&&typeof E=="object"&&!Array.isArray(E):typeof E==R||w&&typeof E>"u")}Te.validSchemaType=c;function g({schema:E,opts:_,self:w,errSchemaPath:R},u,h){if(Array.isArray(u.keyword)?!u.keyword.includes(h):u.keyword!==h)throw new Error("ajv implementation error");const n=u.dependencies;if(n?.some(m=>!Object.prototype.hasOwnProperty.call(E,m)))throw new Error(`parent schema must have dependencies of ${h}: ${n.join(",")}`);if(u.validateSchema&&!u.validateSchema(E[h])){const v=`keyword "${h}" value is invalid at path "${R}": `+w.errorsText(u.validateSchema.errors);if(_.validateSchema==="log")w.logger.error(v);else throw new Error(v)}}return Te.validateKeywordUsage=g,Te}var Ve={},Uc;function bh(){if(Uc)return Ve;Uc=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.extendSubschemaMode=Ve.extendSubschemaData=Ve.getSubschema=void 0;const e=te(),t=oe();function f(i,{keyword:r,schemaProp:a,schema:o,schemaPath:l,errSchemaPath:c,topSchemaRef:g}){if(r!==void 0&&o!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(r!==void 0){const E=i.schema[r];return a===void 0?{schema:E,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(r)}`,errSchemaPath:`${i.errSchemaPath}/${r}`}:{schema:E[a],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(r)}${(0,e.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${r}/${(0,t.escapeFragment)(a)}`}}if(o!==void 0){if(l===void 0||c===void 0||g===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:l,topSchemaRef:g,errSchemaPath:c}}throw new Error('either "keyword" or "schema" must be passed')}Ve.getSubschema=f;function s(i,r,{dataProp:a,dataPropType:o,data:l,dataTypes:c,propertyName:g}){if(l!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:E}=r;if(a!==void 0){const{errorPath:w,dataPathArr:R,opts:u}=r,h=E.let("data",(0,e._)`${r.data}${(0,e.getProperty)(a)}`,!0);_(h),i.errorPath=(0,e.str)`${w}${(0,t.getErrorPath)(a,o,u.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${a}`,i.dataPathArr=[...R,i.parentDataProperty]}if(l!==void 0){const w=l instanceof e.Name?l:E.let("data",l,!0);_(w),g!==void 0&&(i.propertyName=g)}c&&(i.dataTypes=c);function _(w){i.data=w,i.dataLevel=r.dataLevel+1,i.dataTypes=[],r.definedProperties=new Set,i.parentData=r.data,i.dataNames=[...r.dataNames,w]}}Ve.extendSubschemaData=s;function d(i,{jtdDiscriminator:r,jtdMetadata:a,compositeRule:o,createErrors:l,allErrors:c}){o!==void 0&&(i.compositeRule=o),l!==void 0&&(i.createErrors=l),c!==void 0&&(i.allErrors=c),i.jtdDiscriminator=r,i.jtdMetadata=a}return Ve.extendSubschemaMode=d,Ve}var ge={},Fs={exports:{}},Vc;function Ph(){if(Vc)return Fs.exports;Vc=1;var e=Fs.exports=function(s,d,i){typeof d=="function"&&(i=d,d={}),i=d.cb||i;var r=typeof i=="function"?i:i.pre||function(){},a=i.post||function(){};t(d,r,a,s,"",s)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(s,d,i,r,a,o,l,c,g,E){if(r&&typeof r=="object"&&!Array.isArray(r)){d(r,a,o,l,c,g,E);for(var _ in r){var w=r[_];if(Array.isArray(w)){if(_ in e.arrayKeywords)for(var R=0;R<w.length;R++)t(s,d,i,w[R],a+"/"+_+"/"+R,o,a,_,r,R)}else if(_ in e.propsKeywords){if(w&&typeof w=="object")for(var u in w)t(s,d,i,w[u],a+"/"+_+"/"+f(u),o,a,_,r,u)}else(_ in e.keywords||s.allKeys&&!(_ in e.skipKeywords))&&t(s,d,i,w,a+"/"+_,o,a,_,r)}i(r,a,o,l,c,g,E)}}function f(s){return s.replace(/~/g,"~0").replace(/\//g,"~1")}return Fs.exports}var zc;function On(){if(zc)return ge;zc=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.getSchemaRefs=ge.resolveUrl=ge.normalizeId=ge._getFullPath=ge.getFullPath=ge.inlineRef=void 0;const e=oe(),t=Sn(),f=Ph(),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function d(R,u=!0){return typeof R=="boolean"?!0:u===!0?!r(R):u?a(R)<=u:!1}ge.inlineRef=d;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function r(R){for(const u in R){if(i.has(u))return!0;const h=R[u];if(Array.isArray(h)&&h.some(r)||typeof h=="object"&&r(h))return!0}return!1}function a(R){let u=0;for(const h in R){if(h==="$ref")return 1/0;if(u++,!s.has(h)&&(typeof R[h]=="object"&&(0,e.eachItem)(R[h],n=>u+=a(n)),u===1/0))return 1/0}return u}function o(R,u="",h){h!==!1&&(u=g(u));const n=R.parse(u);return l(R,n)}ge.getFullPath=o;function l(R,u){return R.serialize(u).split("#")[0]+"#"}ge._getFullPath=l;const c=/#\/?$/;function g(R){return R?R.replace(c,""):""}ge.normalizeId=g;function E(R,u,h){return h=g(h),R.resolve(u,h)}ge.resolveUrl=E;const _=/^[a-z_][-a-z0-9._]*$/i;function w(R,u){if(typeof R=="boolean")return{};const{schemaId:h,uriResolver:n}=this.opts,m=g(R[h]||u),v={"":m},p=o(n,m,!1),y={},$=new Set;return f(R,{allKeys:!0},(L,F,H,M)=>{if(M===void 0)return;const U=p+F;let z=v[M];typeof L[h]=="string"&&(z=J.call(this,L[h])),W.call(this,L.$anchor),W.call(this,L.$dynamicAnchor),v[F]=z;function J(j){const G=this.opts.uriResolver.resolve;if(j=g(z?G(z,j):j),$.has(j))throw N(j);$.add(j);let D=this.refs[j];return typeof D=="string"&&(D=this.refs[D]),typeof D=="object"?b(L,D.schema,j):j!==g(U)&&(j[0]==="#"?(b(L,y[j],j),y[j]=L):this.refs[j]=U),j}function W(j){if(typeof j=="string"){if(!_.test(j))throw new Error(`invalid anchor "${j}"`);J.call(this,`#${j}`)}}}),y;function b(L,F,H){if(F!==void 0&&!t(L,F))throw N(H)}function N(L){return new Error(`reference "${L}" resolves to more than one schema`)}}return ge.getSchemaRefs=w,ge}var Gc;function In(){if(Gc)return Me;Gc=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.getData=Me.KeywordCxt=Me.validateFunctionCode=void 0;const e=wh(),t=$n(),f=df(),s=$n(),d=Sh(),i=Rh(),r=bh(),a=te(),o=He(),l=On(),c=oe(),g=Nn();function E(I){if(p(I)&&($(I),v(I))){u(I);return}_(I,()=>(0,e.topBoolOrEmptySchema)(I))}Me.validateFunctionCode=E;function _({gen:I,validateName:C,schema:k,schemaEnv:V,opts:x},Y){x.code.es5?I.func(C,(0,a._)`${o.default.data}, ${o.default.valCxt}`,V.$async,()=>{I.code((0,a._)`"use strict"; ${n(k,x)}`),R(I,x),I.code(Y)}):I.func(C,(0,a._)`${o.default.data}, ${w(x)}`,V.$async,()=>I.code(n(k,x)).code(Y))}function w(I){return(0,a._)`{${o.default.instancePath}="", ${o.default.parentData}, ${o.default.parentDataProperty}, ${o.default.rootData}=${o.default.data}${I.dynamicRef?(0,a._)`, ${o.default.dynamicAnchors}={}`:a.nil}}={}`}function R(I,C){I.if(o.default.valCxt,()=>{I.var(o.default.instancePath,(0,a._)`${o.default.valCxt}.${o.default.instancePath}`),I.var(o.default.parentData,(0,a._)`${o.default.valCxt}.${o.default.parentData}`),I.var(o.default.parentDataProperty,(0,a._)`${o.default.valCxt}.${o.default.parentDataProperty}`),I.var(o.default.rootData,(0,a._)`${o.default.valCxt}.${o.default.rootData}`),C.dynamicRef&&I.var(o.default.dynamicAnchors,(0,a._)`${o.default.valCxt}.${o.default.dynamicAnchors}`)},()=>{I.var(o.default.instancePath,(0,a._)`""`),I.var(o.default.parentData,(0,a._)`undefined`),I.var(o.default.parentDataProperty,(0,a._)`undefined`),I.var(o.default.rootData,o.default.data),C.dynamicRef&&I.var(o.default.dynamicAnchors,(0,a._)`{}`)})}function u(I){const{schema:C,opts:k,gen:V}=I;_(I,()=>{k.$comment&&C.$comment&&M(I),L(I),V.let(o.default.vErrors,null),V.let(o.default.errors,0),k.unevaluated&&h(I),b(I),U(I)})}function h(I){const{gen:C,validateName:k}=I;I.evaluated=C.const("evaluated",(0,a._)`${k}.evaluated`),C.if((0,a._)`${I.evaluated}.dynamicProps`,()=>C.assign((0,a._)`${I.evaluated}.props`,(0,a._)`undefined`)),C.if((0,a._)`${I.evaluated}.dynamicItems`,()=>C.assign((0,a._)`${I.evaluated}.items`,(0,a._)`undefined`))}function n(I,C){const k=typeof I=="object"&&I[C.schemaId];return k&&(C.code.source||C.code.process)?(0,a._)`/*# sourceURL=${k} */`:a.nil}function m(I,C){if(p(I)&&($(I),v(I))){y(I,C);return}(0,e.boolOrEmptySchema)(I,C)}function v({schema:I,self:C}){if(typeof I=="boolean")return!I;for(const k in I)if(C.RULES.all[k])return!0;return!1}function p(I){return typeof I.schema!="boolean"}function y(I,C){const{schema:k,gen:V,opts:x}=I;x.$comment&&k.$comment&&M(I),F(I),H(I);const Y=V.const("_errs",o.default.errors);b(I,Y),V.var(C,(0,a._)`${Y} === ${o.default.errors}`)}function $(I){(0,c.checkUnknownRules)(I),N(I)}function b(I,C){if(I.opts.jtd)return J(I,[],!1,C);const k=(0,t.getSchemaTypes)(I.schema),V=(0,t.coerceAndCheckDataType)(I,k);J(I,k,!V,C)}function N(I){const{schema:C,errSchemaPath:k,opts:V,self:x}=I;C.$ref&&V.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(C,x.RULES)&&x.logger.warn(`$ref: keywords ignored in schema at path "${k}"`)}function L(I){const{schema:C,opts:k}=I;C.default!==void 0&&k.useDefaults&&k.strictSchema&&(0,c.checkStrictMode)(I,"default is ignored in the schema root")}function F(I){const C=I.schema[I.opts.schemaId];C&&(I.baseId=(0,l.resolveUrl)(I.opts.uriResolver,I.baseId,C))}function H(I){if(I.schema.$async&&!I.schemaEnv.$async)throw new Error("async schema in sync schema")}function M({gen:I,schemaEnv:C,schema:k,errSchemaPath:V,opts:x}){const Y=k.$comment;if(x.$comment===!0)I.code((0,a._)`${o.default.self}.logger.log(${Y})`);else if(typeof x.$comment=="function"){const ne=(0,a.str)`${V}/$comment`,he=I.scopeValue("root",{ref:C.root});I.code((0,a._)`${o.default.self}.opts.$comment(${Y}, ${ne}, ${he}.schema)`)}}function U(I){const{gen:C,schemaEnv:k,validateName:V,ValidationError:x,opts:Y}=I;k.$async?C.if((0,a._)`${o.default.errors} === 0`,()=>C.return(o.default.data),()=>C.throw((0,a._)`new ${x}(${o.default.vErrors})`)):(C.assign((0,a._)`${V}.errors`,o.default.vErrors),Y.unevaluated&&z(I),C.return((0,a._)`${o.default.errors} === 0`))}function z({gen:I,evaluated:C,props:k,items:V}){k instanceof a.Name&&I.assign((0,a._)`${C}.props`,k),V instanceof a.Name&&I.assign((0,a._)`${C}.items`,V)}function J(I,C,k,V){const{gen:x,schema:Y,data:ne,allErrors:he,opts:ae,self:ce}=I,{RULES:se}=ce;if(Y.$ref&&(ae.ignoreKeywordsWithRef||!(0,c.schemaHasRulesButRef)(Y,se))){x.block(()=>K(I,"$ref",se.all.$ref.definition));return}ae.jtd||j(I,C),x.block(()=>{for(const de of se.rules)we(de);we(se.post)});function we(de){(0,f.shouldUseGroup)(Y,de)&&(de.type?(x.if((0,s.checkDataType)(de.type,ne,ae.strictNumbers)),W(I,de),C.length===1&&C[0]===de.type&&k&&(x.else(),(0,s.reportTypeError)(I)),x.endIf()):W(I,de),he||x.if((0,a._)`${o.default.errors} === ${V||0}`))}}function W(I,C){const{gen:k,schema:V,opts:{useDefaults:x}}=I;x&&(0,d.assignDefaults)(I,C.type),k.block(()=>{for(const Y of C.rules)(0,f.shouldUseRule)(V,Y)&&K(I,Y.keyword,Y.definition,C.type)})}function j(I,C){I.schemaEnv.meta||!I.opts.strictTypes||(G(I,C),I.opts.allowUnionTypes||D(I,C),O(I,I.dataTypes))}function G(I,C){if(C.length){if(!I.dataTypes.length){I.dataTypes=C;return}C.forEach(k=>{T(I.dataTypes,k)||P(I,`type "${k}" not allowed by context "${I.dataTypes.join(",")}"`)}),S(I,C)}}function D(I,C){C.length>1&&!(C.length===2&&C.includes("null"))&&P(I,"use allowUnionTypes to allow union type keyword")}function O(I,C){const k=I.self.RULES.all;for(const V in k){const x=k[V];if(typeof x=="object"&&(0,f.shouldUseRule)(I.schema,x)){const{type:Y}=x.definition;Y.length&&!Y.some(ne=>q(C,ne))&&P(I,`missing type "${Y.join(",")}" for keyword "${V}"`)}}}function q(I,C){return I.includes(C)||C==="number"&&I.includes("integer")}function T(I,C){return I.includes(C)||C==="integer"&&I.includes("number")}function S(I,C){const k=[];for(const V of I.dataTypes)T(C,V)?k.push(V):C.includes("integer")&&V==="number"&&k.push("integer");I.dataTypes=k}function P(I,C){const k=I.schemaEnv.baseId+I.errSchemaPath;C+=` at "${k}" (strictTypes)`,(0,c.checkStrictMode)(I,C,I.opts.strictTypes)}class A{constructor(C,k,V){if((0,i.validateKeywordUsage)(C,k,V),this.gen=C.gen,this.allErrors=C.allErrors,this.keyword=V,this.data=C.data,this.schema=C.schema[V],this.$data=k.$data&&C.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c.schemaRefOrVal)(C,this.schema,V,this.$data),this.schemaType=k.schemaType,this.parentSchema=C.schema,this.params={},this.it=C,this.def=k,this.$data)this.schemaCode=C.gen.const("vSchema",Z(this.$data,C));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,k.schemaType,k.allowUndefined))throw new Error(`${V} value must be ${JSON.stringify(k.schemaType)}`);("code"in k?k.trackErrors:k.errors!==!1)&&(this.errsCount=C.gen.const("_errs",o.default.errors))}result(C,k,V){this.failResult((0,a.not)(C),k,V)}failResult(C,k,V){this.gen.if(C),V?V():this.error(),k?(this.gen.else(),k(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(C,k){this.failResult((0,a.not)(C),void 0,k)}fail(C){if(C===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(C),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(C){if(!this.$data)return this.fail(C);const{schemaCode:k}=this;this.fail((0,a._)`${k} !== undefined && (${(0,a.or)(this.invalid$data(),C)})`)}error(C,k,V){if(k){this.setParams(k),this._error(C,V),this.setParams({});return}this._error(C,V)}_error(C,k){(C?g.reportExtraError:g.reportError)(this,this.def.error,k)}$dataError(){(0,g.reportError)(this,this.def.$dataError||g.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,g.resetErrorsCount)(this.gen,this.errsCount)}ok(C){this.allErrors||this.gen.if(C)}setParams(C,k){k?Object.assign(this.params,C):this.params=C}block$data(C,k,V=a.nil){this.gen.block(()=>{this.check$data(C,V),k()})}check$data(C=a.nil,k=a.nil){if(!this.$data)return;const{gen:V,schemaCode:x,schemaType:Y,def:ne}=this;V.if((0,a.or)((0,a._)`${x} === undefined`,k)),C!==a.nil&&V.assign(C,!0),(Y.length||ne.validateSchema)&&(V.elseIf(this.invalid$data()),this.$dataError(),C!==a.nil&&V.assign(C,!1)),V.else()}invalid$data(){const{gen:C,schemaCode:k,schemaType:V,def:x,it:Y}=this;return(0,a.or)(ne(),he());function ne(){if(V.length){if(!(k instanceof a.Name))throw new Error("ajv implementation error");const ae=Array.isArray(V)?V:[V];return(0,a._)`${(0,s.checkDataTypes)(ae,k,Y.opts.strictNumbers,s.DataType.Wrong)}`}return a.nil}function he(){if(x.validateSchema){const ae=C.scopeValue("validate$data",{ref:x.validateSchema});return(0,a._)`!${ae}(${k})`}return a.nil}}subschema(C,k){const V=(0,r.getSubschema)(this.it,C);(0,r.extendSubschemaData)(V,this.it,C),(0,r.extendSubschemaMode)(V,C);const x={...this.it,...V,items:void 0,props:void 0};return m(x,k),x}mergeEvaluated(C,k){const{it:V,gen:x}=this;V.opts.unevaluated&&(V.props!==!0&&C.props!==void 0&&(V.props=c.mergeEvaluated.props(x,C.props,V.props,k)),V.items!==!0&&C.items!==void 0&&(V.items=c.mergeEvaluated.items(x,C.items,V.items,k)))}mergeValidEvaluated(C,k){const{it:V,gen:x}=this;if(V.opts.unevaluated&&(V.props!==!0||V.items!==!0))return x.if(k,()=>this.mergeEvaluated(C,a.Name)),!0}}Me.KeywordCxt=A;function K(I,C,k,V){const x=new A(I,k,C);"code"in k?k.code(x,V):x.$data&&k.validate?(0,i.funcKeywordCode)(x,k):"macro"in k?(0,i.macroKeywordCode)(x,k):(k.compile||k.validate)&&(0,i.funcKeywordCode)(x,k)}const B=/^\/(?:[^~]|~0|~1)*$/,X=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Z(I,{dataLevel:C,dataNames:k,dataPathArr:V}){let x,Y;if(I==="")return o.default.rootData;if(I[0]==="/"){if(!B.test(I))throw new Error(`Invalid JSON-pointer: ${I}`);x=I,Y=o.default.rootData}else{const ce=X.exec(I);if(!ce)throw new Error(`Invalid JSON-pointer: ${I}`);const se=+ce[1];if(x=ce[2],x==="#"){if(se>=C)throw new Error(ae("property/index",se));return V[C-se]}if(se>C)throw new Error(ae("data",se));if(Y=k[C-se],!x)return Y}let ne=Y;const he=x.split("/");for(const ce of he)ce&&(Y=(0,a._)`${Y}${(0,a.getProperty)((0,c.unescapeJsonPointer)(ce))}`,ne=(0,a._)`${ne} && ${Y}`);return ne;function ae(ce,se){return`Cannot access ${ce} ${se} levels up, current level is ${C}`}}return Me.getData=Z,Me}var Tr={},Kc;function Qi(){if(Kc)return Tr;Kc=1,Object.defineProperty(Tr,"__esModule",{value:!0});class e extends Error{constructor(f){super("validation failed"),this.errors=f,this.ajv=this.validation=!0}}return Tr.default=e,Tr}var Cr={},Hc;function Tn(){if(Hc)return Cr;Hc=1,Object.defineProperty(Cr,"__esModule",{value:!0});const e=On();class t extends Error{constructor(s,d,i,r){super(r||`can't resolve reference ${i} from id ${d}`),this.missingRef=(0,e.resolveUrl)(s,d,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(s,this.missingRef))}}return Cr.default=t,Cr}var Re={},xc;function eo(){if(xc)return Re;xc=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.resolveSchema=Re.getCompilingSchema=Re.resolveRef=Re.compileSchema=Re.SchemaEnv=void 0;const e=te(),t=Qi(),f=He(),s=On(),d=oe(),i=In();class r{constructor(h){var n;this.refs={},this.dynamicAnchors={};let m;typeof h.schema=="object"&&(m=h.schema),this.schema=h.schema,this.schemaId=h.schemaId,this.root=h.root||this,this.baseId=(n=h.baseId)!==null&&n!==void 0?n:(0,s.normalizeId)(m?.[h.schemaId||"$id"]),this.schemaPath=h.schemaPath,this.localRefs=h.localRefs,this.meta=h.meta,this.$async=m?.$async,this.refs={}}}Re.SchemaEnv=r;function a(u){const h=c.call(this,u);if(h)return h;const n=(0,s.getFullPath)(this.opts.uriResolver,u.root.baseId),{es5:m,lines:v}=this.opts.code,{ownProperties:p}=this.opts,y=new e.CodeGen(this.scope,{es5:m,lines:v,ownProperties:p});let $;u.$async&&($=y.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const b=y.scopeName("validate");u.validateName=b;const N={gen:y,allErrors:this.opts.allErrors,data:f.default.data,parentData:f.default.parentData,parentDataProperty:f.default.parentDataProperty,dataNames:[f.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:y.scopeValue("schema",this.opts.code.source===!0?{ref:u.schema,code:(0,e.stringify)(u.schema)}:{ref:u.schema}),validateName:b,ValidationError:$,schema:u.schema,schemaEnv:u,rootId:n,baseId:u.baseId||n,schemaPath:e.nil,errSchemaPath:u.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let L;try{this._compilations.add(u),(0,i.validateFunctionCode)(N),y.optimize(this.opts.code.optimize);const F=y.toString();L=`${y.scopeRefs(f.default.scope)}return ${F}`,this.opts.code.process&&(L=this.opts.code.process(L,u));const M=new Function(`${f.default.self}`,`${f.default.scope}`,L)(this,this.scope.get());if(this.scope.value(b,{ref:M}),M.errors=null,M.schema=u.schema,M.schemaEnv=u,u.$async&&(M.$async=!0),this.opts.code.source===!0&&(M.source={validateName:b,validateCode:F,scopeValues:y._values}),this.opts.unevaluated){const{props:U,items:z}=N;M.evaluated={props:U instanceof e.Name?void 0:U,items:z instanceof e.Name?void 0:z,dynamicProps:U instanceof e.Name,dynamicItems:z instanceof e.Name},M.source&&(M.source.evaluated=(0,e.stringify)(M.evaluated))}return u.validate=M,u}catch(F){throw delete u.validate,delete u.validateName,L&&this.logger.error("Error compiling schema, function code:",L),F}finally{this._compilations.delete(u)}}Re.compileSchema=a;function o(u,h,n){var m;n=(0,s.resolveUrl)(this.opts.uriResolver,h,n);const v=u.refs[n];if(v)return v;let p=E.call(this,u,n);if(p===void 0){const y=(m=u.localRefs)===null||m===void 0?void 0:m[n],{schemaId:$}=this.opts;y&&(p=new r({schema:y,schemaId:$,root:u,baseId:h}))}if(p!==void 0)return u.refs[n]=l.call(this,p)}Re.resolveRef=o;function l(u){return(0,s.inlineRef)(u.schema,this.opts.inlineRefs)?u.schema:u.validate?u:a.call(this,u)}function c(u){for(const h of this._compilations)if(g(h,u))return h}Re.getCompilingSchema=c;function g(u,h){return u.schema===h.schema&&u.root===h.root&&u.baseId===h.baseId}function E(u,h){let n;for(;typeof(n=this.refs[h])=="string";)h=n;return n||this.schemas[h]||_.call(this,u,h)}function _(u,h){const n=this.opts.uriResolver.parse(h),m=(0,s._getFullPath)(this.opts.uriResolver,n);let v=(0,s.getFullPath)(this.opts.uriResolver,u.baseId,void 0);if(Object.keys(u.schema).length>0&&m===v)return R.call(this,n,u);const p=(0,s.normalizeId)(m),y=this.refs[p]||this.schemas[p];if(typeof y=="string"){const $=_.call(this,u,y);return typeof $?.schema!="object"?void 0:R.call(this,n,$)}if(typeof y?.schema=="object"){if(y.validate||a.call(this,y),p===(0,s.normalizeId)(h)){const{schema:$}=y,{schemaId:b}=this.opts,N=$[b];return N&&(v=(0,s.resolveUrl)(this.opts.uriResolver,v,N)),new r({schema:$,schemaId:b,root:u,baseId:v})}return R.call(this,n,y)}}Re.resolveSchema=_;const w=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function R(u,{baseId:h,schema:n,root:m}){var v;if(((v=u.fragment)===null||v===void 0?void 0:v[0])!=="/")return;for(const $ of u.fragment.slice(1).split("/")){if(typeof n=="boolean")return;const b=n[(0,d.unescapeFragment)($)];if(b===void 0)return;n=b;const N=typeof n=="object"&&n[this.opts.schemaId];!w.has($)&&N&&(h=(0,s.resolveUrl)(this.opts.uriResolver,h,N))}let p;if(typeof n!="boolean"&&n.$ref&&!(0,d.schemaHasRulesButRef)(n,this.RULES)){const $=(0,s.resolveUrl)(this.opts.uriResolver,h,n.$ref);p=_.call(this,m,$)}const{schemaId:y}=this.opts;if(p=p||new r({schema:n,schemaId:y,root:m,baseId:h}),p.schema!==p.root.schema)return p}return Re}const Nh="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Oh="Meta-schema for $data reference (JSON AnySchema extension proposal)",Ih="object",Th=["$data"],Ch={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Dh=!1,Ah={$id:Nh,description:Oh,type:Ih,required:Th,properties:Ch,additionalProperties:Dh};var Dr={},Bc;function Lh(){if(Bc)return Dr;Bc=1,Object.defineProperty(Dr,"__esModule",{value:!0});const e=af();return e.code='require("ajv/dist/runtime/uri").default',Dr.default=e,Dr}var Wc;function qh(){return Wc||(Wc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=In();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var f=te();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});const s=Qi(),d=Tn(),i=ff(),r=eo(),a=te(),o=On(),l=$n(),c=oe(),g=Ah,E=Lh(),_=(D,O)=>new RegExp(D,O);_.code="new RegExp";const w=["removeAdditional","useDefaults","coerceTypes"],R=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),u={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},h={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},n=200;function m(D){var O,q,T,S,P,A,K,B,X,Z,I,C,k,V,x,Y,ne,he,ae,ce,se,we,de,xe,Be;const Ne=D.strict,We=(O=D.code)===null||O===void 0?void 0:O.optimize,dt=We===!0||We===void 0?1:We||0,ht=(T=(q=D.code)===null||q===void 0?void 0:q.regExp)!==null&&T!==void 0?T:_,jn=(S=D.uriResolver)!==null&&S!==void 0?S:E.default;return{strictSchema:(A=(P=D.strictSchema)!==null&&P!==void 0?P:Ne)!==null&&A!==void 0?A:!0,strictNumbers:(B=(K=D.strictNumbers)!==null&&K!==void 0?K:Ne)!==null&&B!==void 0?B:!0,strictTypes:(Z=(X=D.strictTypes)!==null&&X!==void 0?X:Ne)!==null&&Z!==void 0?Z:"log",strictTuples:(C=(I=D.strictTuples)!==null&&I!==void 0?I:Ne)!==null&&C!==void 0?C:"log",strictRequired:(V=(k=D.strictRequired)!==null&&k!==void 0?k:Ne)!==null&&V!==void 0?V:!1,code:D.code?{...D.code,optimize:dt,regExp:ht}:{optimize:dt,regExp:ht},loopRequired:(x=D.loopRequired)!==null&&x!==void 0?x:n,loopEnum:(Y=D.loopEnum)!==null&&Y!==void 0?Y:n,meta:(ne=D.meta)!==null&&ne!==void 0?ne:!0,messages:(he=D.messages)!==null&&he!==void 0?he:!0,inlineRefs:(ae=D.inlineRefs)!==null&&ae!==void 0?ae:!0,schemaId:(ce=D.schemaId)!==null&&ce!==void 0?ce:"$id",addUsedSchema:(se=D.addUsedSchema)!==null&&se!==void 0?se:!0,validateSchema:(we=D.validateSchema)!==null&&we!==void 0?we:!0,validateFormats:(de=D.validateFormats)!==null&&de!==void 0?de:!0,unicodeRegExp:(xe=D.unicodeRegExp)!==null&&xe!==void 0?xe:!0,int32range:(Be=D.int32range)!==null&&Be!==void 0?Be:!0,uriResolver:jn}}class v{constructor(O={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,O=this.opts={...O,...m(O)};const{es5:q,lines:T}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:R,es5:q,lines:T}),this.logger=H(O.logger);const S=O.validateFormats;O.validateFormats=!1,this.RULES=(0,i.getRules)(),p.call(this,u,O,"NOT SUPPORTED"),p.call(this,h,O,"DEPRECATED","warn"),this._metaOpts=L.call(this),O.formats&&b.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),O.keywords&&N.call(this,O.keywords),typeof O.meta=="object"&&this.addMetaSchema(O.meta),$.call(this),O.validateFormats=S}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:O,meta:q,schemaId:T}=this.opts;let S=g;T==="id"&&(S={...g},S.id=S.$id,delete S.$id),q&&O&&this.addMetaSchema(S,S[T],!1)}defaultMeta(){const{meta:O,schemaId:q}=this.opts;return this.opts.defaultMeta=typeof O=="object"?O[q]||O:void 0}validate(O,q){let T;if(typeof O=="string"){if(T=this.getSchema(O),!T)throw new Error(`no schema with key or ref "${O}"`)}else T=this.compile(O);const S=T(q);return"$async"in T||(this.errors=T.errors),S}compile(O,q){const T=this._addSchema(O,q);return T.validate||this._compileSchemaEnv(T)}compileAsync(O,q){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:T}=this.opts;return S.call(this,O,q);async function S(Z,I){await P.call(this,Z.$schema);const C=this._addSchema(Z,I);return C.validate||A.call(this,C)}async function P(Z){Z&&!this.getSchema(Z)&&await S.call(this,{$ref:Z},!0)}async function A(Z){try{return this._compileSchemaEnv(Z)}catch(I){if(!(I instanceof d.default))throw I;return K.call(this,I),await B.call(this,I.missingSchema),A.call(this,Z)}}function K({missingSchema:Z,missingRef:I}){if(this.refs[Z])throw new Error(`AnySchema ${Z} is loaded but ${I} cannot be resolved`)}async function B(Z){const I=await X.call(this,Z);this.refs[Z]||await P.call(this,I.$schema),this.refs[Z]||this.addSchema(I,Z,q)}async function X(Z){const I=this._loading[Z];if(I)return I;try{return await(this._loading[Z]=T(Z))}finally{delete this._loading[Z]}}}addSchema(O,q,T,S=this.opts.validateSchema){if(Array.isArray(O)){for(const A of O)this.addSchema(A,void 0,T,S);return this}let P;if(typeof O=="object"){const{schemaId:A}=this.opts;if(P=O[A],P!==void 0&&typeof P!="string")throw new Error(`schema ${A} must be string`)}return q=(0,o.normalizeId)(q||P),this._checkUnique(q),this.schemas[q]=this._addSchema(O,T,q,S,!0),this}addMetaSchema(O,q,T=this.opts.validateSchema){return this.addSchema(O,q,!0,T),this}validateSchema(O,q){if(typeof O=="boolean")return!0;let T;if(T=O.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const S=this.validate(T,O);if(!S&&q){const P="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(P);else throw new Error(P)}return S}getSchema(O){let q;for(;typeof(q=y.call(this,O))=="string";)O=q;if(q===void 0){const{schemaId:T}=this.opts,S=new r.SchemaEnv({schema:{},schemaId:T});if(q=r.resolveSchema.call(this,S,O),!q)return;this.refs[O]=q}return q.validate||this._compileSchemaEnv(q)}removeSchema(O){if(O instanceof RegExp)return this._removeAllSchemas(this.schemas,O),this._removeAllSchemas(this.refs,O),this;switch(typeof O){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const q=y.call(this,O);return typeof q=="object"&&this._cache.delete(q.schema),delete this.schemas[O],delete this.refs[O],this}case"object":{const q=O;this._cache.delete(q);let T=O[this.opts.schemaId];return T&&(T=(0,o.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(O){for(const q of O)this.addKeyword(q);return this}addKeyword(O,q){let T;if(typeof O=="string")T=O,typeof q=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),q.keyword=T);else if(typeof O=="object"&&q===void 0){if(q=O,T=q.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(U.call(this,T,q),!q)return(0,c.eachItem)(T,P=>z.call(this,P)),this;W.call(this,q);const S={...q,type:(0,l.getJSONTypes)(q.type),schemaType:(0,l.getJSONTypes)(q.schemaType)};return(0,c.eachItem)(T,S.type.length===0?P=>z.call(this,P,S):P=>S.type.forEach(A=>z.call(this,P,S,A))),this}getKeyword(O){const q=this.RULES.all[O];return typeof q=="object"?q.definition:!!q}removeKeyword(O){const{RULES:q}=this;delete q.keywords[O],delete q.all[O];for(const T of q.rules){const S=T.rules.findIndex(P=>P.keyword===O);S>=0&&T.rules.splice(S,1)}return this}addFormat(O,q){return typeof q=="string"&&(q=new RegExp(q)),this.formats[O]=q,this}errorsText(O=this.errors,{separator:q=", ",dataVar:T="data"}={}){return!O||O.length===0?"No errors":O.map(S=>`${T}${S.instancePath} ${S.message}`).reduce((S,P)=>S+q+P)}$dataMetaSchema(O,q){const T=this.RULES.all;O=JSON.parse(JSON.stringify(O));for(const S of q){const P=S.split("/").slice(1);let A=O;for(const K of P)A=A[K];for(const K in T){const B=T[K];if(typeof B!="object")continue;const{$data:X}=B.definition,Z=A[K];X&&Z&&(A[K]=G(Z))}}return O}_removeAllSchemas(O,q){for(const T in O){const S=O[T];(!q||q.test(T))&&(typeof S=="string"?delete O[T]:S&&!S.meta&&(this._cache.delete(S.schema),delete O[T]))}}_addSchema(O,q,T,S=this.opts.validateSchema,P=this.opts.addUsedSchema){let A;const{schemaId:K}=this.opts;if(typeof O=="object")A=O[K];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof O!="boolean")throw new Error("schema must be object or boolean")}let B=this._cache.get(O);if(B!==void 0)return B;T=(0,o.normalizeId)(A||T);const X=o.getSchemaRefs.call(this,O,T);return B=new r.SchemaEnv({schema:O,schemaId:K,meta:q,baseId:T,localRefs:X}),this._cache.set(B.schema,B),P&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=B),S&&this.validateSchema(O,!0),B}_checkUnique(O){if(this.schemas[O]||this.refs[O])throw new Error(`schema with key or id "${O}" already exists`)}_compileSchemaEnv(O){if(O.meta?this._compileMetaSchema(O):r.compileSchema.call(this,O),!O.validate)throw new Error("ajv implementation error");return O.validate}_compileMetaSchema(O){const q=this.opts;this.opts=this._metaOpts;try{r.compileSchema.call(this,O)}finally{this.opts=q}}}v.ValidationError=s.default,v.MissingRefError=d.default,e.default=v;function p(D,O,q,T="error"){for(const S in D){const P=S;P in O&&this.logger[T](`${q}: option ${S}. ${D[P]}`)}}function y(D){return D=(0,o.normalizeId)(D),this.schemas[D]||this.refs[D]}function $(){const D=this.opts.schemas;if(D)if(Array.isArray(D))this.addSchema(D);else for(const O in D)this.addSchema(D[O],O)}function b(){for(const D in this.opts.formats){const O=this.opts.formats[D];O&&this.addFormat(D,O)}}function N(D){if(Array.isArray(D)){this.addVocabulary(D);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const O in D){const q=D[O];q.keyword||(q.keyword=O),this.addKeyword(q)}}function L(){const D={...this.opts};for(const O of w)delete D[O];return D}const F={log(){},warn(){},error(){}};function H(D){if(D===!1)return F;if(D===void 0)return console;if(D.log&&D.warn&&D.error)return D;throw new Error("logger must implement log, warn and error methods")}const M=/^[a-z_$][a-z0-9_$:-]*$/i;function U(D,O){const{RULES:q}=this;if((0,c.eachItem)(D,T=>{if(q.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!M.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!O&&O.$data&&!("code"in O||"validate"in O))throw new Error('$data keyword must have "code" or "validate" function')}function z(D,O,q){var T;const S=O?.post;if(q&&S)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:P}=this;let A=S?P.post:P.rules.find(({type:B})=>B===q);if(A||(A={type:q,rules:[]},P.rules.push(A)),P.keywords[D]=!0,!O)return;const K={keyword:D,definition:{...O,type:(0,l.getJSONTypes)(O.type),schemaType:(0,l.getJSONTypes)(O.schemaType)}};O.before?J.call(this,A,K,O.before):A.rules.push(K),P.all[D]=K,(T=O.implements)===null||T===void 0||T.forEach(B=>this.addKeyword(B))}function J(D,O,q){const T=D.rules.findIndex(S=>S.keyword===q);T>=0?D.rules.splice(T,0,O):(D.rules.push(O),this.logger.warn(`rule ${q} is not defined`))}function W(D){let{metaSchema:O}=D;O!==void 0&&(D.$data&&this.opts.$data&&(O=G(O)),D.validateSchema=this.compile(O,!0))}const j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function G(D){return{anyOf:[D,j]}}}(As)),As}var Ar={},Lr={},qr={},Jc;function kh(){if(Jc)return qr;Jc=1,Object.defineProperty(qr,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return qr.default=e,qr}var Ge={},Zc;function jh(){if(Zc)return Ge;Zc=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.callRef=Ge.getValidate=void 0;const e=Tn(),t=De(),f=te(),s=He(),d=eo(),i=oe(),r={keyword:"$ref",schemaType:"string",code(l){const{gen:c,schema:g,it:E}=l,{baseId:_,schemaEnv:w,validateName:R,opts:u,self:h}=E,{root:n}=w;if((g==="#"||g==="#/")&&_===n.baseId)return v();const m=d.resolveRef.call(h,n,_,g);if(m===void 0)throw new e.default(E.opts.uriResolver,_,g);if(m instanceof d.SchemaEnv)return p(m);return y(m);function v(){if(w===n)return o(l,R,w,w.$async);const $=c.scopeValue("root",{ref:n});return o(l,(0,f._)`${$}.validate`,n,n.$async)}function p($){const b=a(l,$);o(l,b,$,$.$async)}function y($){const b=c.scopeValue("schema",u.code.source===!0?{ref:$,code:(0,f.stringify)($)}:{ref:$}),N=c.name("valid"),L=l.subschema({schema:$,dataTypes:[],schemaPath:f.nil,topSchemaRef:b,errSchemaPath:g},N);l.mergeEvaluated(L),l.ok(N)}}};function a(l,c){const{gen:g}=l;return c.validate?g.scopeValue("validate",{ref:c.validate}):(0,f._)`${g.scopeValue("wrapper",{ref:c})}.validate`}Ge.getValidate=a;function o(l,c,g,E){const{gen:_,it:w}=l,{allErrors:R,schemaEnv:u,opts:h}=w,n=h.passContext?s.default.this:f.nil;E?m():v();function m(){if(!u.$async)throw new Error("async schema referenced by sync schema");const $=_.let("valid");_.try(()=>{_.code((0,f._)`await ${(0,t.callValidateCode)(l,c,n)}`),y(c),R||_.assign($,!0)},b=>{_.if((0,f._)`!(${b} instanceof ${w.ValidationError})`,()=>_.throw(b)),p(b),R||_.assign($,!1)}),l.ok($)}function v(){l.result((0,t.callValidateCode)(l,c,n),()=>y(c),()=>p(c))}function p($){const b=(0,f._)`${$}.errors`;_.assign(s.default.vErrors,(0,f._)`${s.default.vErrors} === null ? ${b} : ${s.default.vErrors}.concat(${b})`),_.assign(s.default.errors,(0,f._)`${s.default.vErrors}.length`)}function y($){var b;if(!w.opts.unevaluated)return;const N=(b=g?.validate)===null||b===void 0?void 0:b.evaluated;if(w.props!==!0)if(N&&!N.dynamicProps)N.props!==void 0&&(w.props=i.mergeEvaluated.props(_,N.props,w.props));else{const L=_.var("props",(0,f._)`${$}.evaluated.props`);w.props=i.mergeEvaluated.props(_,L,w.props,f.Name)}if(w.items!==!0)if(N&&!N.dynamicItems)N.items!==void 0&&(w.items=i.mergeEvaluated.items(_,N.items,w.items));else{const L=_.var("items",(0,f._)`${$}.evaluated.items`);w.items=i.mergeEvaluated.items(_,L,w.items,f.Name)}}}return Ge.callRef=o,Ge.default=r,Ge}var Xc;function Fh(){if(Xc)return Lr;Xc=1,Object.defineProperty(Lr,"__esModule",{value:!0});const e=kh(),t=jh(),f=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Lr.default=f,Lr}var kr={},jr={},Yc;function Mh(){if(Yc)return jr;Yc=1,Object.defineProperty(jr,"__esModule",{value:!0});const e=te(),t=e.operators,f={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},s={message:({keyword:i,schemaCode:r})=>(0,e.str)`must be ${f[i].okStr} ${r}`,params:({keyword:i,schemaCode:r})=>(0,e._)`{comparison: ${f[i].okStr}, limit: ${r}}`},d={keyword:Object.keys(f),type:"number",schemaType:"number",$data:!0,error:s,code(i){const{keyword:r,data:a,schemaCode:o}=i;i.fail$data((0,e._)`${a} ${f[r].fail} ${o} || isNaN(${a})`)}};return jr.default=d,jr}var Fr={},Qc;function Uh(){if(Qc)return Fr;Qc=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=te(),f={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:s})=>(0,e.str)`must be multiple of ${s}`,params:({schemaCode:s})=>(0,e._)`{multipleOf: ${s}}`},code(s){const{gen:d,data:i,schemaCode:r,it:a}=s,o=a.opts.multipleOfPrecision,l=d.let("res"),c=o?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${o}`:(0,e._)`${l} !== parseInt(${l})`;s.fail$data((0,e._)`(${r} === 0 || (${l} = ${i}/${r}, ${c}))`)}};return Fr.default=f,Fr}var Mr={},Ur={},eu;function Vh(){if(eu)return Ur;eu=1,Object.defineProperty(Ur,"__esModule",{value:!0});function e(t){const f=t.length;let s=0,d=0,i;for(;d<f;)s++,i=t.charCodeAt(d++),i>=55296&&i<=56319&&d<f&&(i=t.charCodeAt(d),(i&64512)===56320&&d++);return s}return Ur.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ur}var tu;function zh(){if(tu)return Mr;tu=1,Object.defineProperty(Mr,"__esModule",{value:!0});const e=te(),t=oe(),f=Vh(),d={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:r}){const a=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${r} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:r,data:a,schemaCode:o,it:l}=i,c=r==="maxLength"?e.operators.GT:e.operators.LT,g=l.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(i.gen,f.default)}(${a})`;i.fail$data((0,e._)`${g} ${c} ${o}`)}};return Mr.default=d,Mr}var Vr={},ru;function Gh(){if(ru)return Vr;ru=1,Object.defineProperty(Vr,"__esModule",{value:!0});const e=De(),t=te(),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:d})=>(0,t.str)`must match pattern "${d}"`,params:({schemaCode:d})=>(0,t._)`{pattern: ${d}}`},code(d){const{data:i,$data:r,schema:a,schemaCode:o,it:l}=d,c=l.opts.unicodeRegExp?"u":"",g=r?(0,t._)`(new RegExp(${o}, ${c}))`:(0,e.usePattern)(d,a);d.fail$data((0,t._)`!${g}.test(${i})`)}};return Vr.default=s,Vr}var zr={},nu;function Kh(){if(nu)return zr;nu=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=te(),f={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:d}){const i=s==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${d} properties`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:d,data:i,schemaCode:r}=s,a=d==="maxProperties"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`Object.keys(${i}).length ${a} ${r}`)}};return zr.default=f,zr}var Gr={},su;function Hh(){if(su)return Gr;su=1,Object.defineProperty(Gr,"__esModule",{value:!0});const e=De(),t=te(),f=oe(),d={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,t.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,t._)`{missingProperty: ${i}}`},code(i){const{gen:r,schema:a,schemaCode:o,data:l,$data:c,it:g}=i,{opts:E}=g;if(!c&&a.length===0)return;const _=a.length>=E.loopRequired;if(g.allErrors?w():R(),E.strictRequired){const n=i.parentSchema.properties,{definedProperties:m}=i.it;for(const v of a)if(n?.[v]===void 0&&!m.has(v)){const p=g.schemaEnv.baseId+g.errSchemaPath,y=`required property "${v}" is not defined at "${p}" (strictRequired)`;(0,f.checkStrictMode)(g,y,g.opts.strictRequired)}}function w(){if(_||c)i.block$data(t.nil,u);else for(const n of a)(0,e.checkReportMissingProp)(i,n)}function R(){const n=r.let("missing");if(_||c){const m=r.let("valid",!0);i.block$data(m,()=>h(n,m)),i.ok(m)}else r.if((0,e.checkMissingProp)(i,a,n)),(0,e.reportMissingProp)(i,n),r.else()}function u(){r.forOf("prop",o,n=>{i.setParams({missingProperty:n}),r.if((0,e.noPropertyInData)(r,l,n,E.ownProperties),()=>i.error())})}function h(n,m){i.setParams({missingProperty:n}),r.forOf(n,o,()=>{r.assign(m,(0,e.propertyInData)(r,l,n,E.ownProperties)),r.if((0,t.not)(m),()=>{i.error(),r.break()})},t.nil)}}};return Gr.default=d,Gr}var Kr={},iu;function xh(){if(iu)return Kr;iu=1,Object.defineProperty(Kr,"__esModule",{value:!0});const e=te(),f={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:d}){const i=s==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${d} items`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:d,data:i,schemaCode:r}=s,a=d==="maxItems"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`${i}.length ${a} ${r}`)}};return Kr.default=f,Kr}var Hr={},xr={},ou;function to(){if(ou)return xr;ou=1,Object.defineProperty(xr,"__esModule",{value:!0});const e=Sn();return e.code='require("ajv/dist/runtime/equal").default',xr.default=e,xr}var au;function Bh(){if(au)return Hr;au=1,Object.defineProperty(Hr,"__esModule",{value:!0});const e=$n(),t=te(),f=oe(),s=to(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:r,j:a}})=>(0,t.str)`must NOT have duplicate items (items ## ${a} and ${r} are identical)`,params:({params:{i:r,j:a}})=>(0,t._)`{i: ${r}, j: ${a}}`},code(r){const{gen:a,data:o,$data:l,schema:c,parentSchema:g,schemaCode:E,it:_}=r;if(!l&&!c)return;const w=a.let("valid"),R=g.items?(0,e.getSchemaTypes)(g.items):[];r.block$data(w,u,(0,t._)`${E} === false`),r.ok(w);function u(){const v=a.let("i",(0,t._)`${o}.length`),p=a.let("j");r.setParams({i:v,j:p}),a.assign(w,!0),a.if((0,t._)`${v} > 1`,()=>(h()?n:m)(v,p))}function h(){return R.length>0&&!R.some(v=>v==="object"||v==="array")}function n(v,p){const y=a.name("item"),$=(0,e.checkDataTypes)(R,y,_.opts.strictNumbers,e.DataType.Wrong),b=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${v}--;`,()=>{a.let(y,(0,t._)`${o}[${v}]`),a.if($,(0,t._)`continue`),R.length>1&&a.if((0,t._)`typeof ${y} == "string"`,(0,t._)`${y} += "_"`),a.if((0,t._)`typeof ${b}[${y}] == "number"`,()=>{a.assign(p,(0,t._)`${b}[${y}]`),r.error(),a.assign(w,!1).break()}).code((0,t._)`${b}[${y}] = ${v}`)})}function m(v,p){const y=(0,f.useFunc)(a,s.default),$=a.name("outer");a.label($).for((0,t._)`;${v}--;`,()=>a.for((0,t._)`${p} = ${v}; ${p}--;`,()=>a.if((0,t._)`${y}(${o}[${v}], ${o}[${p}])`,()=>{r.error(),a.assign(w,!1).break($)})))}}};return Hr.default=i,Hr}var Br={},cu;function Wh(){if(cu)return Br;cu=1,Object.defineProperty(Br,"__esModule",{value:!0});const e=te(),t=oe(),f=to(),d={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},code(i){const{gen:r,data:a,$data:o,schemaCode:l,schema:c}=i;o||c&&typeof c=="object"?i.fail$data((0,e._)`!${(0,t.useFunc)(r,f.default)}(${a}, ${l})`):i.fail((0,e._)`${c} !== ${a}`)}};return Br.default=d,Br}var Wr={},uu;function Jh(){if(uu)return Wr;uu=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=te(),t=oe(),f=to(),d={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},code(i){const{gen:r,data:a,$data:o,schema:l,schemaCode:c,it:g}=i;if(!o&&l.length===0)throw new Error("enum must have non-empty array");const E=l.length>=g.opts.loopEnum;let _;const w=()=>_??(_=(0,t.useFunc)(r,f.default));let R;if(E||o)R=r.let("valid"),i.block$data(R,u);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const n=r.const("vSchema",c);R=(0,e.or)(...l.map((m,v)=>h(n,v)))}i.pass(R);function u(){r.assign(R,!1),r.forOf("v",c,n=>r.if((0,e._)`${w()}(${a}, ${n})`,()=>r.assign(R,!0).break()))}function h(n,m){const v=l[m];return typeof v=="object"&&v!==null?(0,e._)`${w()}(${a}, ${n}[${m}])`:(0,e._)`${a} === ${v}`}}};return Wr.default=d,Wr}var lu;function Zh(){if(lu)return kr;lu=1,Object.defineProperty(kr,"__esModule",{value:!0});const e=Mh(),t=Uh(),f=zh(),s=Gh(),d=Kh(),i=Hh(),r=xh(),a=Bh(),o=Wh(),l=Jh(),c=[e.default,t.default,f.default,s.default,d.default,i.default,r.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},o.default,l.default];return kr.default=c,kr}var Jr={},at={},fu;function hf(){if(fu)return at;fu=1,Object.defineProperty(at,"__esModule",{value:!0}),at.validateAdditionalItems=void 0;const e=te(),t=oe(),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{parentSchema:r,it:a}=i,{items:o}=r;if(!Array.isArray(o)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}d(i,o)}};function d(i,r){const{gen:a,schema:o,data:l,keyword:c,it:g}=i;g.items=!0;const E=a.const("len",(0,e._)`${l}.length`);if(o===!1)i.setParams({len:r.length}),i.pass((0,e._)`${E} <= ${r.length}`);else if(typeof o=="object"&&!(0,t.alwaysValidSchema)(g,o)){const w=a.var("valid",(0,e._)`${E} <= ${r.length}`);a.if((0,e.not)(w),()=>_(w)),i.ok(w)}function _(w){a.forRange("i",r.length,E,R=>{i.subschema({keyword:c,dataProp:R,dataPropType:t.Type.Num},w),g.allErrors||a.if((0,e.not)(w),()=>a.break())})}}return at.validateAdditionalItems=d,at.default=s,at}var Zr={},ct={},du;function mf(){if(du)return ct;du=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.validateTuple=void 0;const e=te(),t=oe(),f=De(),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:r,it:a}=i;if(Array.isArray(r))return d(i,"additionalItems",r);a.items=!0,!(0,t.alwaysValidSchema)(a,r)&&i.ok((0,f.validateArray)(i))}};function d(i,r,a=i.schema){const{gen:o,parentSchema:l,data:c,keyword:g,it:E}=i;R(l),E.opts.unevaluated&&a.length&&E.items!==!0&&(E.items=t.mergeEvaluated.items(o,a.length,E.items));const _=o.name("valid"),w=o.const("len",(0,e._)`${c}.length`);a.forEach((u,h)=>{(0,t.alwaysValidSchema)(E,u)||(o.if((0,e._)`${w} > ${h}`,()=>i.subschema({keyword:g,schemaProp:h,dataProp:h},_)),i.ok(_))});function R(u){const{opts:h,errSchemaPath:n}=E,m=a.length,v=m===u.minItems&&(m===u.maxItems||u[r]===!1);if(h.strictTuples&&!v){const p=`"${g}" is ${m}-tuple, but minItems or maxItems/${r} are not specified or different at path "${n}"`;(0,t.checkStrictMode)(E,p,h.strictTuples)}}}return ct.validateTuple=d,ct.default=s,ct}var hu;function Xh(){if(hu)return Zr;hu=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=mf(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:f=>(0,e.validateTuple)(f,"items")};return Zr.default=t,Zr}var Xr={},mu;function Yh(){if(mu)return Xr;mu=1,Object.defineProperty(Xr,"__esModule",{value:!0});const e=te(),t=oe(),f=De(),s=hf(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:r}})=>(0,e.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,e._)`{limit: ${r}}`},code(r){const{schema:a,parentSchema:o,it:l}=r,{prefixItems:c}=o;l.items=!0,!(0,t.alwaysValidSchema)(l,a)&&(c?(0,s.validateAdditionalItems)(r,c):r.ok((0,f.validateArray)(r)))}};return Xr.default=i,Xr}var Yr={},pu;function Qh(){if(pu)return Yr;pu=1,Object.defineProperty(Yr,"__esModule",{value:!0});const e=te(),t=oe(),s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:d,max:i}})=>i===void 0?(0,e.str)`must contain at least ${d} valid item(s)`:(0,e.str)`must contain at least ${d} and no more than ${i} valid item(s)`,params:({params:{min:d,max:i}})=>i===void 0?(0,e._)`{minContains: ${d}}`:(0,e._)`{minContains: ${d}, maxContains: ${i}}`},code(d){const{gen:i,schema:r,parentSchema:a,data:o,it:l}=d;let c,g;const{minContains:E,maxContains:_}=a;l.opts.next?(c=E===void 0?1:E,g=_):c=1;const w=i.const("len",(0,e._)`${o}.length`);if(d.setParams({min:c,max:g}),g===void 0&&c===0){(0,t.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(g!==void 0&&c>g){(0,t.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),d.fail();return}if((0,t.alwaysValidSchema)(l,r)){let m=(0,e._)`${w} >= ${c}`;g!==void 0&&(m=(0,e._)`${m} && ${w} <= ${g}`),d.pass(m);return}l.items=!0;const R=i.name("valid");g===void 0&&c===1?h(R,()=>i.if(R,()=>i.break())):c===0?(i.let(R,!0),g!==void 0&&i.if((0,e._)`${o}.length > 0`,u)):(i.let(R,!1),u()),d.result(R,()=>d.reset());function u(){const m=i.name("_valid"),v=i.let("count",0);h(m,()=>i.if(m,()=>n(v)))}function h(m,v){i.forRange("i",0,w,p=>{d.subschema({keyword:"contains",dataProp:p,dataPropType:t.Type.Num,compositeRule:!0},m),v()})}function n(m){i.code((0,e._)`${m}++`),g===void 0?i.if((0,e._)`${m} >= ${c}`,()=>i.assign(R,!0).break()):(i.if((0,e._)`${m} > ${g}`,()=>i.assign(R,!1).break()),c===1?i.assign(R,!0):i.if((0,e._)`${m} >= ${c}`,()=>i.assign(R,!0)))}}};return Yr.default=s,Yr}var Ms={},yu;function em(){return yu||(yu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=te(),f=oe(),s=De();e.error={message:({params:{property:o,depsCount:l,deps:c}})=>{const g=l===1?"property":"properties";return(0,t.str)`must have ${g} ${c} when property ${o} is present`},params:({params:{property:o,depsCount:l,deps:c,missingProperty:g}})=>(0,t._)`{property: ${o},
19
- missingProperty: ${g},
20
- depsCount: ${l},
21
- deps: ${c}}`};const d={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(o){const[l,c]=i(o);r(o,l),a(o,c)}};function i({schema:o}){const l={},c={};for(const g in o){if(g==="__proto__")continue;const E=Array.isArray(o[g])?l:c;E[g]=o[g]}return[l,c]}function r(o,l=o.schema){const{gen:c,data:g,it:E}=o;if(Object.keys(l).length===0)return;const _=c.let("missing");for(const w in l){const R=l[w];if(R.length===0)continue;const u=(0,s.propertyInData)(c,g,w,E.opts.ownProperties);o.setParams({property:w,depsCount:R.length,deps:R.join(", ")}),E.allErrors?c.if(u,()=>{for(const h of R)(0,s.checkReportMissingProp)(o,h)}):(c.if((0,t._)`${u} && (${(0,s.checkMissingProp)(o,R,_)})`),(0,s.reportMissingProp)(o,_),c.else())}}e.validatePropertyDeps=r;function a(o,l=o.schema){const{gen:c,data:g,keyword:E,it:_}=o,w=c.name("valid");for(const R in l)(0,f.alwaysValidSchema)(_,l[R])||(c.if((0,s.propertyInData)(c,g,R,_.opts.ownProperties),()=>{const u=o.subschema({keyword:E,schemaProp:R},w);o.mergeValidEvaluated(u,w)},()=>c.var(w,!0)),o.ok(w))}e.validateSchemaDeps=a,e.default=d}(Ms)),Ms}var Qr={},vu;function tm(){if(vu)return Qr;vu=1,Object.defineProperty(Qr,"__esModule",{value:!0});const e=te(),t=oe(),s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:d})=>(0,e._)`{propertyName: ${d.propertyName}}`},code(d){const{gen:i,schema:r,data:a,it:o}=d;if((0,t.alwaysValidSchema)(o,r))return;const l=i.name("valid");i.forIn("key",a,c=>{d.setParams({propertyName:c}),d.subschema({keyword:"propertyNames",data:c,dataTypes:["string"],propertyName:c,compositeRule:!0},l),i.if((0,e.not)(l),()=>{d.error(!0),o.allErrors||i.break()})}),d.ok(l)}};return Qr.default=s,Qr}var en={},_u;function pf(){if(_u)return en;_u=1,Object.defineProperty(en,"__esModule",{value:!0});const e=De(),t=te(),f=He(),s=oe(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:r})=>(0,t._)`{additionalProperty: ${r.additionalProperty}}`},code(r){const{gen:a,schema:o,parentSchema:l,data:c,errsCount:g,it:E}=r;if(!g)throw new Error("ajv implementation error");const{allErrors:_,opts:w}=E;if(E.props=!0,w.removeAdditional!=="all"&&(0,s.alwaysValidSchema)(E,o))return;const R=(0,e.allSchemaProperties)(l.properties),u=(0,e.allSchemaProperties)(l.patternProperties);h(),r.ok((0,t._)`${g} === ${f.default.errors}`);function h(){a.forIn("key",c,y=>{!R.length&&!u.length?v(y):a.if(n(y),()=>v(y))})}function n(y){let $;if(R.length>8){const b=(0,s.schemaRefOrVal)(E,l.properties,"properties");$=(0,e.isOwnProperty)(a,b,y)}else R.length?$=(0,t.or)(...R.map(b=>(0,t._)`${y} === ${b}`)):$=t.nil;return u.length&&($=(0,t.or)($,...u.map(b=>(0,t._)`${(0,e.usePattern)(r,b)}.test(${y})`))),(0,t.not)($)}function m(y){a.code((0,t._)`delete ${c}[${y}]`)}function v(y){if(w.removeAdditional==="all"||w.removeAdditional&&o===!1){m(y);return}if(o===!1){r.setParams({additionalProperty:y}),r.error(),_||a.break();return}if(typeof o=="object"&&!(0,s.alwaysValidSchema)(E,o)){const $=a.name("valid");w.removeAdditional==="failing"?(p(y,$,!1),a.if((0,t.not)($),()=>{r.reset(),m(y)})):(p(y,$),_||a.if((0,t.not)($),()=>a.break()))}}function p(y,$,b){const N={keyword:"additionalProperties",dataProp:y,dataPropType:s.Type.Str};b===!1&&Object.assign(N,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(N,$)}}};return en.default=i,en}var tn={},gu;function rm(){if(gu)return tn;gu=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=In(),t=De(),f=oe(),s=pf(),d={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:r,schema:a,parentSchema:o,data:l,it:c}=i;c.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&s.default.code(new e.KeywordCxt(c,s.default,"additionalProperties"));const g=(0,t.allSchemaProperties)(a);for(const u of g)c.definedProperties.add(u);c.opts.unevaluated&&g.length&&c.props!==!0&&(c.props=f.mergeEvaluated.props(r,(0,f.toHash)(g),c.props));const E=g.filter(u=>!(0,f.alwaysValidSchema)(c,a[u]));if(E.length===0)return;const _=r.name("valid");for(const u of E)w(u)?R(u):(r.if((0,t.propertyInData)(r,l,u,c.opts.ownProperties)),R(u),c.allErrors||r.else().var(_,!0),r.endIf()),i.it.definedProperties.add(u),i.ok(_);function w(u){return c.opts.useDefaults&&!c.compositeRule&&a[u].default!==void 0}function R(u){i.subschema({keyword:"properties",schemaProp:u,dataProp:u},_)}}};return tn.default=d,tn}var rn={},$u;function nm(){if($u)return rn;$u=1,Object.defineProperty(rn,"__esModule",{value:!0});const e=De(),t=te(),f=oe(),s=oe(),d={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:r,schema:a,data:o,parentSchema:l,it:c}=i,{opts:g}=c,E=(0,e.allSchemaProperties)(a),_=E.filter(v=>(0,f.alwaysValidSchema)(c,a[v]));if(E.length===0||_.length===E.length&&(!c.opts.unevaluated||c.props===!0))return;const w=g.strictSchema&&!g.allowMatchingProperties&&l.properties,R=r.name("valid");c.props!==!0&&!(c.props instanceof t.Name)&&(c.props=(0,s.evaluatedPropsToName)(r,c.props));const{props:u}=c;h();function h(){for(const v of E)w&&n(v),c.allErrors?m(v):(r.var(R,!0),m(v),r.if(R))}function n(v){for(const p in w)new RegExp(v).test(p)&&(0,f.checkStrictMode)(c,`property ${p} matches pattern ${v} (use allowMatchingProperties)`)}function m(v){r.forIn("key",o,p=>{r.if((0,t._)`${(0,e.usePattern)(i,v)}.test(${p})`,()=>{const y=_.includes(v);y||i.subschema({keyword:"patternProperties",schemaProp:v,dataProp:p,dataPropType:s.Type.Str},R),c.opts.unevaluated&&u!==!0?r.assign((0,t._)`${u}[${p}]`,!0):!y&&!c.allErrors&&r.if((0,t.not)(R),()=>r.break())})})}}};return rn.default=d,rn}var nn={},Eu;function sm(){if(Eu)return nn;Eu=1,Object.defineProperty(nn,"__esModule",{value:!0});const e=oe(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(f){const{gen:s,schema:d,it:i}=f;if((0,e.alwaysValidSchema)(i,d)){f.fail();return}const r=s.name("valid");f.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),f.failResult(r,()=>f.reset(),()=>f.error())},error:{message:"must NOT be valid"}};return nn.default=t,nn}var sn={},wu;function im(){if(wu)return sn;wu=1,Object.defineProperty(sn,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:De().validateUnion,error:{message:"must match a schema in anyOf"}};return sn.default=t,sn}var on={},Su;function om(){if(Su)return on;Su=1,Object.defineProperty(on,"__esModule",{value:!0});const e=te(),t=oe(),s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:d})=>(0,e._)`{passingSchemas: ${d.passing}}`},code(d){const{gen:i,schema:r,parentSchema:a,it:o}=d;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&a.discriminator)return;const l=r,c=i.let("valid",!1),g=i.let("passing",null),E=i.name("_valid");d.setParams({passing:g}),i.block(_),d.result(c,()=>d.reset(),()=>d.error(!0));function _(){l.forEach((w,R)=>{let u;(0,t.alwaysValidSchema)(o,w)?i.var(E,!0):u=d.subschema({keyword:"oneOf",schemaProp:R,compositeRule:!0},E),R>0&&i.if((0,e._)`${E} && ${c}`).assign(c,!1).assign(g,(0,e._)`[${g}, ${R}]`).else(),i.if(E,()=>{i.assign(c,!0),i.assign(g,R),u&&d.mergeEvaluated(u,e.Name)})})}}};return on.default=s,on}var an={},Ru;function am(){if(Ru)return an;Ru=1,Object.defineProperty(an,"__esModule",{value:!0});const e=oe(),t={keyword:"allOf",schemaType:"array",code(f){const{gen:s,schema:d,it:i}=f;if(!Array.isArray(d))throw new Error("ajv implementation error");const r=s.name("valid");d.forEach((a,o)=>{if((0,e.alwaysValidSchema)(i,a))return;const l=f.subschema({keyword:"allOf",schemaProp:o},r);f.ok(r),f.mergeEvaluated(l)})}};return an.default=t,an}var cn={},bu;function cm(){if(bu)return cn;bu=1,Object.defineProperty(cn,"__esModule",{value:!0});const e=te(),t=oe(),s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:r,parentSchema:a,it:o}=i;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const l=d(o,"then"),c=d(o,"else");if(!l&&!c)return;const g=r.let("valid",!0),E=r.name("_valid");if(_(),i.reset(),l&&c){const R=r.let("ifClause");i.setParams({ifClause:R}),r.if(E,w("then",R),w("else",R))}else l?r.if(E,w("then")):r.if((0,e.not)(E),w("else"));i.pass(g,()=>i.error(!0));function _(){const R=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},E);i.mergeEvaluated(R)}function w(R,u){return()=>{const h=i.subschema({keyword:R},E);r.assign(g,E),i.mergeValidEvaluated(h,g),u?r.assign(u,(0,e._)`${R}`):i.setParams({ifClause:R})}}}};function d(i,r){const a=i.schema[r];return a!==void 0&&!(0,t.alwaysValidSchema)(i,a)}return cn.default=s,cn}var un={},Pu;function um(){if(Pu)return un;Pu=1,Object.defineProperty(un,"__esModule",{value:!0});const e=oe(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:f,parentSchema:s,it:d}){s.if===void 0&&(0,e.checkStrictMode)(d,`"${f}" without "if" is ignored`)}};return un.default=t,un}var Nu;function lm(){if(Nu)return Jr;Nu=1,Object.defineProperty(Jr,"__esModule",{value:!0});const e=hf(),t=Xh(),f=mf(),s=Yh(),d=Qh(),i=em(),r=tm(),a=pf(),o=rm(),l=nm(),c=sm(),g=im(),E=om(),_=am(),w=cm(),R=um();function u(h=!1){const n=[c.default,g.default,E.default,_.default,w.default,R.default,r.default,a.default,i.default,o.default,l.default];return h?n.push(t.default,s.default):n.push(e.default,f.default),n.push(d.default),n}return Jr.default=u,Jr}var ln={},fn={},Ou;function fm(){if(Ou)return fn;Ou=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=te(),f={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,e.str)`must match format "${s}"`,params:({schemaCode:s})=>(0,e._)`{format: ${s}}`},code(s,d){const{gen:i,data:r,$data:a,schema:o,schemaCode:l,it:c}=s,{opts:g,errSchemaPath:E,schemaEnv:_,self:w}=c;if(!g.validateFormats)return;a?R():u();function R(){const h=i.scopeValue("formats",{ref:w.formats,code:g.code.formats}),n=i.const("fDef",(0,e._)`${h}[${l}]`),m=i.let("fType"),v=i.let("format");i.if((0,e._)`typeof ${n} == "object" && !(${n} instanceof RegExp)`,()=>i.assign(m,(0,e._)`${n}.type || "string"`).assign(v,(0,e._)`${n}.validate`),()=>i.assign(m,(0,e._)`"string"`).assign(v,n)),s.fail$data((0,e.or)(p(),y()));function p(){return g.strictSchema===!1?e.nil:(0,e._)`${l} && !${v}`}function y(){const $=_.$async?(0,e._)`(${n}.async ? await ${v}(${r}) : ${v}(${r}))`:(0,e._)`${v}(${r})`,b=(0,e._)`(typeof ${v} == "function" ? ${$} : ${v}.test(${r}))`;return(0,e._)`${v} && ${v} !== true && ${m} === ${d} && !${b}`}}function u(){const h=w.formats[o];if(!h){p();return}if(h===!0)return;const[n,m,v]=y(h);n===d&&s.pass($());function p(){if(g.strictSchema===!1){w.logger.warn(b());return}throw new Error(b());function b(){return`unknown format "${o}" ignored in schema at path "${E}"`}}function y(b){const N=b instanceof RegExp?(0,e.regexpCode)(b):g.code.formats?(0,e._)`${g.code.formats}${(0,e.getProperty)(o)}`:void 0,L=i.scopeValue("formats",{key:o,ref:b,code:N});return typeof b=="object"&&!(b instanceof RegExp)?[b.type||"string",b.validate,(0,e._)`${L}.validate`]:["string",b,L]}function $(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${v}(${r})`}return typeof m=="function"?(0,e._)`${v}(${r})`:(0,e._)`${v}.test(${r})`}}}};return fn.default=f,fn}var Iu;function dm(){if(Iu)return ln;Iu=1,Object.defineProperty(ln,"__esModule",{value:!0});const t=[fm().default];return ln.default=t,ln}var rt={},Tu;function hm(){return Tu||(Tu=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.contentVocabulary=rt.metadataVocabulary=void 0,rt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],rt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),rt}var Cu;function mm(){if(Cu)return Ar;Cu=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=Fh(),t=Zh(),f=lm(),s=dm(),d=hm(),i=[e.default,t.default,(0,f.default)(),s.default,d.metadataVocabulary,d.contentVocabulary];return Ar.default=i,Ar}var dn={},_t={},Du;function pm(){if(Du)return _t;Du=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.DiscrError=void 0;var e;return function(t){t.Tag="tag",t.Mapping="mapping"}(e||(_t.DiscrError=e={})),_t}var Au;function ym(){if(Au)return dn;Au=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=te(),t=pm(),f=eo(),s=Tn(),d=oe(),r={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:o}})=>a===t.DiscrError.Tag?`tag "${o}" must be string`:`value of tag "${o}" must be in oneOf`,params:({params:{discrError:a,tag:o,tagName:l}})=>(0,e._)`{error: ${a}, tag: ${l}, tagValue: ${o}}`},code(a){const{gen:o,data:l,schema:c,parentSchema:g,it:E}=a,{oneOf:_}=g;if(!E.opts.discriminator)throw new Error("discriminator: requires discriminator option");const w=c.propertyName;if(typeof w!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const R=o.let("valid",!1),u=o.const("tag",(0,e._)`${l}${(0,e.getProperty)(w)}`);o.if((0,e._)`typeof ${u} == "string"`,()=>h(),()=>a.error(!1,{discrError:t.DiscrError.Tag,tag:u,tagName:w})),a.ok(R);function h(){const v=m();o.if(!1);for(const p in v)o.elseIf((0,e._)`${u} === ${p}`),o.assign(R,n(v[p]));o.else(),a.error(!1,{discrError:t.DiscrError.Mapping,tag:u,tagName:w}),o.endIf()}function n(v){const p=o.name("valid"),y=a.subschema({keyword:"oneOf",schemaProp:v},p);return a.mergeEvaluated(y,e.Name),p}function m(){var v;const p={},y=b(g);let $=!0;for(let F=0;F<_.length;F++){let H=_[F];if(H?.$ref&&!(0,d.schemaHasRulesButRef)(H,E.self.RULES)){const U=H.$ref;if(H=f.resolveRef.call(E.self,E.schemaEnv.root,E.baseId,U),H instanceof f.SchemaEnv&&(H=H.schema),H===void 0)throw new s.default(E.opts.uriResolver,E.baseId,U)}const M=(v=H?.properties)===null||v===void 0?void 0:v[w];if(typeof M!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${w}"`);$=$&&(y||b(H)),N(M,F)}if(!$)throw new Error(`discriminator: "${w}" must be required`);return p;function b({required:F}){return Array.isArray(F)&&F.includes(w)}function N(F,H){if(F.const)L(F.const,H);else if(F.enum)for(const M of F.enum)L(M,H);else throw new Error(`discriminator: "properties/${w}" must have "const" or "enum"`)}function L(F,H){if(typeof F!="string"||F in p)throw new Error(`discriminator: "${w}" values must be unique strings`);p[F]=H}}}};return dn.default=r,dn}const vm="http://json-schema.org/draft-07/schema#",_m="http://json-schema.org/draft-07/schema#",gm="Core schema meta-schema",$m={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Em=["object","boolean"],wm={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},Sm={$schema:vm,$id:_m,title:gm,definitions:$m,type:Em,properties:wm,default:!0};var Lu;function Rm(){return Lu||(Lu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const f=qh(),s=mm(),d=ym(),i=Sm,r=["/properties"],a="http://json-schema.org/draft-07/schema";class o extends f.default{_addVocabularies(){super._addVocabularies(),s.default.forEach(w=>this.addVocabulary(w)),this.opts.discriminator&&this.addKeyword(d.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const w=this.opts.$data?this.$dataMetaSchema(i,r):i;this.addMetaSchema(w,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv=o,e.exports=t=o,e.exports.Ajv=o,Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var l=In();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=te();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var g=Qi();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return g.default}});var E=Tn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return E.default}})}(Or,Or.exports)),Or.exports}var qu;function bm(){return qu||(qu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=Rm(),f=te(),s=f.operators,d={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},i={message:({keyword:a,schemaCode:o})=>f.str`should be ${d[a].okStr} ${o}`,params:({keyword:a,schemaCode:o})=>f._`{comparison: ${d[a].okStr}, limit: ${o}}`};e.formatLimitDefinition={keyword:Object.keys(d),type:"string",schemaType:"string",$data:!0,error:i,code(a){const{gen:o,data:l,schemaCode:c,keyword:g,it:E}=a,{opts:_,self:w}=E;if(!_.validateFormats)return;const R=new t.KeywordCxt(E,w.RULES.all.format.definition,"format");R.$data?u():h();function u(){const m=o.scopeValue("formats",{ref:w.formats,code:_.code.formats}),v=o.const("fmt",f._`${m}[${R.schemaCode}]`);a.fail$data(f.or(f._`typeof ${v} != "object"`,f._`${v} instanceof RegExp`,f._`typeof ${v}.compare != "function"`,n(v)))}function h(){const m=R.schema,v=w.formats[m];if(!v||v===!0)return;if(typeof v!="object"||v instanceof RegExp||typeof v.compare!="function")throw new Error(`"${g}": format "${m}" does not define "compare" function`);const p=o.scopeValue("formats",{key:m,ref:v,code:_.code.formats?f._`${_.code.formats}${f.getProperty(m)}`:void 0});a.fail$data(n(p))}function n(m){return f._`${m}.compare(${l}, ${c}) ${d[g].fail} 0`}},dependencies:["format"]};const r=a=>(a.addKeyword(e.formatLimitDefinition),a);e.default=r}(Ds)),Ds}var ku;function Pm(){return ku||(ku=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const f=Eh(),s=bm(),d=te(),i=new d.Name("fullFormats"),r=new d.Name("fastFormats"),a=(l,c={keywords:!0})=>{if(Array.isArray(c))return o(l,c,f.fullFormats,i),l;const[g,E]=c.mode==="fast"?[f.fastFormats,r]:[f.fullFormats,i],_=c.formats||f.formatNames;return o(l,_,g,E),c.keywords&&s.default(l),l};a.get=(l,c="full")=>{const E=(c==="fast"?f.fastFormats:f.fullFormats)[l];if(!E)throw new Error(`Unknown format "${l}"`);return E};function o(l,c,g,E){var _,w;(_=(w=l.opts.code).formats)!==null&&_!==void 0||(w.formats=d._`require("ajv-formats/dist/formats").${E}`);for(const R of c)l.addFormat(R,g[R])}e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a}(Nr,Nr.exports)),Nr.exports}var Us,ju;function Nm(){if(ju)return Us;ju=1;const e=(o,l,c,g)=>{if(c==="length"||c==="prototype"||c==="arguments"||c==="caller")return;const E=Object.getOwnPropertyDescriptor(o,c),_=Object.getOwnPropertyDescriptor(l,c);!t(E,_)&&g||Object.defineProperty(o,c,_)},t=function(o,l){return o===void 0||o.configurable||o.writable===l.writable&&o.enumerable===l.enumerable&&o.configurable===l.configurable&&(o.writable||o.value===l.value)},f=(o,l)=>{const c=Object.getPrototypeOf(l);c!==Object.getPrototypeOf(o)&&Object.setPrototypeOf(o,c)},s=(o,l)=>`/* Wrapped ${o}*/
22
- ${l}`,d=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),i=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),r=(o,l,c)=>{const g=c===""?"":`with ${c.trim()}() `,E=s.bind(null,g,l.toString());Object.defineProperty(E,"name",i),Object.defineProperty(o,"toString",{...d,value:E})};return Us=(o,l,{ignoreNonConfigurable:c=!1}={})=>{const{name:g}=o;for(const E of Reflect.ownKeys(l))e(o,l,E,c);return f(o,l),r(o,l,g),o},Us}var Vs,Fu;function Om(){if(Fu)return Vs;Fu=1;const e=Nm();return Vs=(t,f={})=>{if(typeof t!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof t}\``);const{wait:s=0,before:d=!1,after:i=!0}=f;if(!d&&!i)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let r,a;const o=function(...l){const c=this,g=()=>{r=void 0,i&&(a=t.apply(c,l))},E=d&&!r;return clearTimeout(r),r=setTimeout(g,s),E&&(a=t.apply(c,l)),a};return e(o,t),o.cancel=()=>{r&&(clearTimeout(r),r=void 0)},o},Vs}var hn={exports:{}},zs,Mu;function Cn(){if(Mu)return zs;Mu=1;const e="2.0.0",t=256,f=Number.MAX_SAFE_INTEGER||9007199254740991,s=16,d=t-6;return zs={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:d,MAX_SAFE_INTEGER:f,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},zs}var Gs,Uu;function Dn(){return Uu||(Uu=1,Gs=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{}),Gs}var Vu;function bt(){return Vu||(Vu=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:f,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:d}=Cn(),i=Dn();t=e.exports={};const r=t.re=[],a=t.safeRe=[],o=t.src=[],l=t.safeSrc=[],c=t.t={};let g=0;const E="[a-zA-Z0-9-]",_=[["\\s",1],["\\d",d],[E,s]],w=u=>{for(const[h,n]of _)u=u.split(`${h}*`).join(`${h}{0,${n}}`).split(`${h}+`).join(`${h}{1,${n}}`);return u},R=(u,h,n)=>{const m=w(h),v=g++;i(u,v,h),c[u]=v,o[v]=h,l[v]=m,r[v]=new RegExp(h,n?"g":void 0),a[v]=new RegExp(m,n?"g":void 0)};R("NUMERICIDENTIFIER","0|[1-9]\\d*"),R("NUMERICIDENTIFIERLOOSE","\\d+"),R("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${E}*`),R("MAINVERSION",`(${o[c.NUMERICIDENTIFIER]})\\.(${o[c.NUMERICIDENTIFIER]})\\.(${o[c.NUMERICIDENTIFIER]})`),R("MAINVERSIONLOOSE",`(${o[c.NUMERICIDENTIFIERLOOSE]})\\.(${o[c.NUMERICIDENTIFIERLOOSE]})\\.(${o[c.NUMERICIDENTIFIERLOOSE]})`),R("PRERELEASEIDENTIFIER",`(?:${o[c.NONNUMERICIDENTIFIER]}|${o[c.NUMERICIDENTIFIER]})`),R("PRERELEASEIDENTIFIERLOOSE",`(?:${o[c.NONNUMERICIDENTIFIER]}|${o[c.NUMERICIDENTIFIERLOOSE]})`),R("PRERELEASE",`(?:-(${o[c.PRERELEASEIDENTIFIER]}(?:\\.${o[c.PRERELEASEIDENTIFIER]})*))`),R("PRERELEASELOOSE",`(?:-?(${o[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[c.PRERELEASEIDENTIFIERLOOSE]})*))`),R("BUILDIDENTIFIER",`${E}+`),R("BUILD",`(?:\\+(${o[c.BUILDIDENTIFIER]}(?:\\.${o[c.BUILDIDENTIFIER]})*))`),R("FULLPLAIN",`v?${o[c.MAINVERSION]}${o[c.PRERELEASE]}?${o[c.BUILD]}?`),R("FULL",`^${o[c.FULLPLAIN]}$`),R("LOOSEPLAIN",`[v=\\s]*${o[c.MAINVERSIONLOOSE]}${o[c.PRERELEASELOOSE]}?${o[c.BUILD]}?`),R("LOOSE",`^${o[c.LOOSEPLAIN]}$`),R("GTLT","((?:<|>)?=?)"),R("XRANGEIDENTIFIERLOOSE",`${o[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),R("XRANGEIDENTIFIER",`${o[c.NUMERICIDENTIFIER]}|x|X|\\*`),R("XRANGEPLAIN",`[v=\\s]*(${o[c.XRANGEIDENTIFIER]})(?:\\.(${o[c.XRANGEIDENTIFIER]})(?:\\.(${o[c.XRANGEIDENTIFIER]})(?:${o[c.PRERELEASE]})?${o[c.BUILD]}?)?)?`),R("XRANGEPLAINLOOSE",`[v=\\s]*(${o[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[c.XRANGEIDENTIFIERLOOSE]})(?:${o[c.PRERELEASELOOSE]})?${o[c.BUILD]}?)?)?`),R("XRANGE",`^${o[c.GTLT]}\\s*${o[c.XRANGEPLAIN]}$`),R("XRANGELOOSE",`^${o[c.GTLT]}\\s*${o[c.XRANGEPLAINLOOSE]}$`),R("COERCEPLAIN",`(^|[^\\d])(\\d{1,${f}})(?:\\.(\\d{1,${f}}))?(?:\\.(\\d{1,${f}}))?`),R("COERCE",`${o[c.COERCEPLAIN]}(?:$|[^\\d])`),R("COERCEFULL",o[c.COERCEPLAIN]+`(?:${o[c.PRERELEASE]})?(?:${o[c.BUILD]})?(?:$|[^\\d])`),R("COERCERTL",o[c.COERCE],!0),R("COERCERTLFULL",o[c.COERCEFULL],!0),R("LONETILDE","(?:~>?)"),R("TILDETRIM",`(\\s*)${o[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",R("TILDE",`^${o[c.LONETILDE]}${o[c.XRANGEPLAIN]}$`),R("TILDELOOSE",`^${o[c.LONETILDE]}${o[c.XRANGEPLAINLOOSE]}$`),R("LONECARET","(?:\\^)"),R("CARETTRIM",`(\\s*)${o[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",R("CARET",`^${o[c.LONECARET]}${o[c.XRANGEPLAIN]}$`),R("CARETLOOSE",`^${o[c.LONECARET]}${o[c.XRANGEPLAINLOOSE]}$`),R("COMPARATORLOOSE",`^${o[c.GTLT]}\\s*(${o[c.LOOSEPLAIN]})$|^$`),R("COMPARATOR",`^${o[c.GTLT]}\\s*(${o[c.FULLPLAIN]})$|^$`),R("COMPARATORTRIM",`(\\s*)${o[c.GTLT]}\\s*(${o[c.LOOSEPLAIN]}|${o[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",R("HYPHENRANGE",`^\\s*(${o[c.XRANGEPLAIN]})\\s+-\\s+(${o[c.XRANGEPLAIN]})\\s*$`),R("HYPHENRANGELOOSE",`^\\s*(${o[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[c.XRANGEPLAINLOOSE]})\\s*$`),R("STAR","(<|>)?=?\\s*\\*"),R("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),R("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(hn,hn.exports)),hn.exports}var Ks,zu;function ro(){if(zu)return Ks;zu=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Ks=s=>s?typeof s!="object"?e:s:t,Ks}var Hs,Gu;function yf(){if(Gu)return Hs;Gu=1;const e=/^[0-9]+$/,t=(s,d)=>{if(typeof s=="number"&&typeof d=="number")return s===d?0:s<d?-1:1;const i=e.test(s),r=e.test(d);return i&&r&&(s=+s,d=+d),s===d?0:i&&!r?-1:r&&!i?1:s<d?-1:1};return Hs={compareIdentifiers:t,rcompareIdentifiers:(s,d)=>t(d,s)},Hs}var xs,Ku;function $e(){if(Ku)return xs;Ku=1;const e=Dn(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:f}=Cn(),{safeRe:s,t:d}=bt(),i=ro(),{compareIdentifiers:r}=yf();class a{constructor(l,c){if(c=i(c),l instanceof a){if(l.loose===!!c.loose&&l.includePrerelease===!!c.includePrerelease)return l;l=l.version}else if(typeof l!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof l}".`);if(l.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",l,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;const g=l.trim().match(c.loose?s[d.LOOSE]:s[d.FULL]);if(!g)throw new TypeError(`Invalid Version: ${l}`);if(this.raw=l,this.major=+g[1],this.minor=+g[2],this.patch=+g[3],this.major>f||this.major<0)throw new TypeError("Invalid major version");if(this.minor>f||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>f||this.patch<0)throw new TypeError("Invalid patch version");g[4]?this.prerelease=g[4].split(".").map(E=>{if(/^[0-9]+$/.test(E)){const _=+E;if(_>=0&&_<f)return _}return E}):this.prerelease=[],this.build=g[5]?g[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(l){if(e("SemVer.compare",this.version,this.options,l),!(l instanceof a)){if(typeof l=="string"&&l===this.version)return 0;l=new a(l,this.options)}return l.version===this.version?0:this.compareMain(l)||this.comparePre(l)}compareMain(l){return l instanceof a||(l=new a(l,this.options)),this.major<l.major?-1:this.major>l.major?1:this.minor<l.minor?-1:this.minor>l.minor?1:this.patch<l.patch?-1:this.patch>l.patch?1:0}comparePre(l){if(l instanceof a||(l=new a(l,this.options)),this.prerelease.length&&!l.prerelease.length)return-1;if(!this.prerelease.length&&l.prerelease.length)return 1;if(!this.prerelease.length&&!l.prerelease.length)return 0;let c=0;do{const g=this.prerelease[c],E=l.prerelease[c];if(e("prerelease compare",c,g,E),g===void 0&&E===void 0)return 0;if(E===void 0)return 1;if(g===void 0)return-1;if(g===E)continue;return r(g,E)}while(++c)}compareBuild(l){l instanceof a||(l=new a(l,this.options));let c=0;do{const g=this.build[c],E=l.build[c];if(e("build compare",c,g,E),g===void 0&&E===void 0)return 0;if(E===void 0)return 1;if(g===void 0)return-1;if(g===E)continue;return r(g,E)}while(++c)}inc(l,c,g){if(l.startsWith("pre")){if(!c&&g===!1)throw new Error("invalid increment argument: identifier is empty");if(c){const E=`-${c}`.match(this.options.loose?s[d.PRERELEASELOOSE]:s[d.PRERELEASE]);if(!E||E[1]!==c)throw new Error(`invalid identifier: ${c}`)}}switch(l){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",c,g);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",c,g);break;case"prepatch":this.prerelease.length=0,this.inc("patch",c,g),this.inc("pre",c,g);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",c,g),this.inc("pre",c,g);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const E=Number(g)?1:0;if(this.prerelease.length===0)this.prerelease=[E];else{let _=this.prerelease.length;for(;--_>=0;)typeof this.prerelease[_]=="number"&&(this.prerelease[_]++,_=-2);if(_===-1){if(c===this.prerelease.join(".")&&g===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(E)}}if(c){let _=[c,E];g===!1&&(_=[c]),r(this.prerelease[0],c)===0?isNaN(this.prerelease[1])&&(this.prerelease=_):this.prerelease=_}break}default:throw new Error(`invalid increment argument: ${l}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return xs=a,xs}var Bs,Hu;function ft(){if(Hu)return Bs;Hu=1;const e=$e();return Bs=(f,s,d=!1)=>{if(f instanceof e)return f;try{return new e(f,s)}catch(i){if(!d)return null;throw i}},Bs}var Ws,xu;function Im(){if(xu)return Ws;xu=1;const e=ft();return Ws=(f,s)=>{const d=e(f,s);return d?d.version:null},Ws}var Js,Bu;function Tm(){if(Bu)return Js;Bu=1;const e=ft();return Js=(f,s)=>{const d=e(f.trim().replace(/^[=v]+/,""),s);return d?d.version:null},Js}var Zs,Wu;function Cm(){if(Wu)return Zs;Wu=1;const e=$e();return Zs=(f,s,d,i,r)=>{typeof d=="string"&&(r=i,i=d,d=void 0);try{return new e(f instanceof e?f.version:f,d).inc(s,i,r).version}catch{return null}},Zs}var Xs,Ju;function Dm(){if(Ju)return Xs;Ju=1;const e=ft();return Xs=(f,s)=>{const d=e(f,null,!0),i=e(s,null,!0),r=d.compare(i);if(r===0)return null;const a=r>0,o=a?d:i,l=a?i:d,c=!!o.prerelease.length;if(!!l.prerelease.length&&!c){if(!l.patch&&!l.minor)return"major";if(l.compareMain(o)===0)return l.minor&&!l.patch?"minor":"patch"}const E=c?"pre":"";return d.major!==i.major?E+"major":d.minor!==i.minor?E+"minor":d.patch!==i.patch?E+"patch":"prerelease"},Xs}var Ys,Zu;function Am(){if(Zu)return Ys;Zu=1;const e=$e();return Ys=(f,s)=>new e(f,s).major,Ys}var Qs,Xu;function Lm(){if(Xu)return Qs;Xu=1;const e=$e();return Qs=(f,s)=>new e(f,s).minor,Qs}var ei,Yu;function qm(){if(Yu)return ei;Yu=1;const e=$e();return ei=(f,s)=>new e(f,s).patch,ei}var ti,Qu;function km(){if(Qu)return ti;Qu=1;const e=ft();return ti=(f,s)=>{const d=e(f,s);return d&&d.prerelease.length?d.prerelease:null},ti}var ri,el;function Ae(){if(el)return ri;el=1;const e=$e();return ri=(f,s,d)=>new e(f,d).compare(new e(s,d)),ri}var ni,tl;function jm(){if(tl)return ni;tl=1;const e=Ae();return ni=(f,s,d)=>e(s,f,d),ni}var si,rl;function Fm(){if(rl)return si;rl=1;const e=Ae();return si=(f,s)=>e(f,s,!0),si}var ii,nl;function no(){if(nl)return ii;nl=1;const e=$e();return ii=(f,s,d)=>{const i=new e(f,d),r=new e(s,d);return i.compare(r)||i.compareBuild(r)},ii}var oi,sl;function Mm(){if(sl)return oi;sl=1;const e=no();return oi=(f,s)=>f.sort((d,i)=>e(d,i,s)),oi}var ai,il;function Um(){if(il)return ai;il=1;const e=no();return ai=(f,s)=>f.sort((d,i)=>e(i,d,s)),ai}var ci,ol;function An(){if(ol)return ci;ol=1;const e=Ae();return ci=(f,s,d)=>e(f,s,d)>0,ci}var ui,al;function so(){if(al)return ui;al=1;const e=Ae();return ui=(f,s,d)=>e(f,s,d)<0,ui}var li,cl;function vf(){if(cl)return li;cl=1;const e=Ae();return li=(f,s,d)=>e(f,s,d)===0,li}var fi,ul;function _f(){if(ul)return fi;ul=1;const e=Ae();return fi=(f,s,d)=>e(f,s,d)!==0,fi}var di,ll;function io(){if(ll)return di;ll=1;const e=Ae();return di=(f,s,d)=>e(f,s,d)>=0,di}var hi,fl;function oo(){if(fl)return hi;fl=1;const e=Ae();return hi=(f,s,d)=>e(f,s,d)<=0,hi}var mi,dl;function gf(){if(dl)return mi;dl=1;const e=vf(),t=_f(),f=An(),s=io(),d=so(),i=oo();return mi=(a,o,l,c)=>{switch(o){case"===":return typeof a=="object"&&(a=a.version),typeof l=="object"&&(l=l.version),a===l;case"!==":return typeof a=="object"&&(a=a.version),typeof l=="object"&&(l=l.version),a!==l;case"":case"=":case"==":return e(a,l,c);case"!=":return t(a,l,c);case">":return f(a,l,c);case">=":return s(a,l,c);case"<":return d(a,l,c);case"<=":return i(a,l,c);default:throw new TypeError(`Invalid operator: ${o}`)}},mi}var pi,hl;function Vm(){if(hl)return pi;hl=1;const e=$e(),t=ft(),{safeRe:f,t:s}=bt();return pi=(i,r)=>{if(i instanceof e)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;r=r||{};let a=null;if(!r.rtl)a=i.match(r.includePrerelease?f[s.COERCEFULL]:f[s.COERCE]);else{const _=r.includePrerelease?f[s.COERCERTLFULL]:f[s.COERCERTL];let w;for(;(w=_.exec(i))&&(!a||a.index+a[0].length!==i.length);)(!a||w.index+w[0].length!==a.index+a[0].length)&&(a=w),_.lastIndex=w.index+w[1].length+w[2].length;_.lastIndex=-1}if(a===null)return null;const o=a[2],l=a[3]||"0",c=a[4]||"0",g=r.includePrerelease&&a[5]?`-${a[5]}`:"",E=r.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${o}.${l}.${c}${g}${E}`,r)},pi}var yi,ml;function zm(){if(ml)return yi;ml=1;class e{constructor(){this.max=1e3,this.map=new Map}get(f){const s=this.map.get(f);if(s!==void 0)return this.map.delete(f),this.map.set(f,s),s}delete(f){return this.map.delete(f)}set(f,s){if(!this.delete(f)&&s!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(f,s)}return this}}return yi=e,yi}var vi,pl;function Le(){if(pl)return vi;pl=1;const e=/\s+/g;class t{constructor(z,J){if(J=d(J),z instanceof t)return z.loose===!!J.loose&&z.includePrerelease===!!J.includePrerelease?z:new t(z.raw,J);if(z instanceof i)return this.raw=z.value,this.set=[[z]],this.formatted=void 0,this;if(this.options=J,this.loose=!!J.loose,this.includePrerelease=!!J.includePrerelease,this.raw=z.trim().replace(e," "),this.set=this.raw.split("||").map(W=>this.parseRange(W.trim())).filter(W=>W.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const W=this.set[0];if(this.set=this.set.filter(j=>!R(j[0])),this.set.length===0)this.set=[W];else if(this.set.length>1){for(const j of this.set)if(j.length===1&&u(j[0])){this.set=[j];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let z=0;z<this.set.length;z++){z>0&&(this.formatted+="||");const J=this.set[z];for(let W=0;W<J.length;W++)W>0&&(this.formatted+=" "),this.formatted+=J[W].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(z){const W=((this.options.includePrerelease&&_)|(this.options.loose&&w))+":"+z,j=s.get(W);if(j)return j;const G=this.options.loose,D=G?o[l.HYPHENRANGELOOSE]:o[l.HYPHENRANGE];z=z.replace(D,H(this.options.includePrerelease)),r("hyphen replace",z),z=z.replace(o[l.COMPARATORTRIM],c),r("comparator trim",z),z=z.replace(o[l.TILDETRIM],g),r("tilde trim",z),z=z.replace(o[l.CARETTRIM],E),r("caret trim",z);let O=z.split(" ").map(P=>n(P,this.options)).join(" ").split(/\s+/).map(P=>F(P,this.options));G&&(O=O.filter(P=>(r("loose invalid filter",P,this.options),!!P.match(o[l.COMPARATORLOOSE])))),r("range list",O);const q=new Map,T=O.map(P=>new i(P,this.options));for(const P of T){if(R(P))return[P];q.set(P.value,P)}q.size>1&&q.has("")&&q.delete("");const S=[...q.values()];return s.set(W,S),S}intersects(z,J){if(!(z instanceof t))throw new TypeError("a Range is required");return this.set.some(W=>h(W,J)&&z.set.some(j=>h(j,J)&&W.every(G=>j.every(D=>G.intersects(D,J)))))}test(z){if(!z)return!1;if(typeof z=="string")try{z=new a(z,this.options)}catch{return!1}for(let J=0;J<this.set.length;J++)if(M(this.set[J],z,this.options))return!0;return!1}}vi=t;const f=zm(),s=new f,d=ro(),i=Ln(),r=Dn(),a=$e(),{safeRe:o,t:l,comparatorTrimReplace:c,tildeTrimReplace:g,caretTrimReplace:E}=bt(),{FLAG_INCLUDE_PRERELEASE:_,FLAG_LOOSE:w}=Cn(),R=U=>U.value==="<0.0.0-0",u=U=>U.value==="",h=(U,z)=>{let J=!0;const W=U.slice();let j=W.pop();for(;J&&W.length;)J=W.every(G=>j.intersects(G,z)),j=W.pop();return J},n=(U,z)=>(U=U.replace(o[l.BUILD],""),r("comp",U,z),U=y(U,z),r("caret",U),U=v(U,z),r("tildes",U),U=b(U,z),r("xrange",U),U=L(U,z),r("stars",U),U),m=U=>!U||U.toLowerCase()==="x"||U==="*",v=(U,z)=>U.trim().split(/\s+/).map(J=>p(J,z)).join(" "),p=(U,z)=>{const J=z.loose?o[l.TILDELOOSE]:o[l.TILDE];return U.replace(J,(W,j,G,D,O)=>{r("tilde",U,W,j,G,D,O);let q;return m(j)?q="":m(G)?q=`>=${j}.0.0 <${+j+1}.0.0-0`:m(D)?q=`>=${j}.${G}.0 <${j}.${+G+1}.0-0`:O?(r("replaceTilde pr",O),q=`>=${j}.${G}.${D}-${O} <${j}.${+G+1}.0-0`):q=`>=${j}.${G}.${D} <${j}.${+G+1}.0-0`,r("tilde return",q),q})},y=(U,z)=>U.trim().split(/\s+/).map(J=>$(J,z)).join(" "),$=(U,z)=>{r("caret",U,z);const J=z.loose?o[l.CARETLOOSE]:o[l.CARET],W=z.includePrerelease?"-0":"";return U.replace(J,(j,G,D,O,q)=>{r("caret",U,j,G,D,O,q);let T;return m(G)?T="":m(D)?T=`>=${G}.0.0${W} <${+G+1}.0.0-0`:m(O)?G==="0"?T=`>=${G}.${D}.0${W} <${G}.${+D+1}.0-0`:T=`>=${G}.${D}.0${W} <${+G+1}.0.0-0`:q?(r("replaceCaret pr",q),G==="0"?D==="0"?T=`>=${G}.${D}.${O}-${q} <${G}.${D}.${+O+1}-0`:T=`>=${G}.${D}.${O}-${q} <${G}.${+D+1}.0-0`:T=`>=${G}.${D}.${O}-${q} <${+G+1}.0.0-0`):(r("no pr"),G==="0"?D==="0"?T=`>=${G}.${D}.${O}${W} <${G}.${D}.${+O+1}-0`:T=`>=${G}.${D}.${O}${W} <${G}.${+D+1}.0-0`:T=`>=${G}.${D}.${O} <${+G+1}.0.0-0`),r("caret return",T),T})},b=(U,z)=>(r("replaceXRanges",U,z),U.split(/\s+/).map(J=>N(J,z)).join(" ")),N=(U,z)=>{U=U.trim();const J=z.loose?o[l.XRANGELOOSE]:o[l.XRANGE];return U.replace(J,(W,j,G,D,O,q)=>{r("xRange",U,W,j,G,D,O,q);const T=m(G),S=T||m(D),P=S||m(O),A=P;return j==="="&&A&&(j=""),q=z.includePrerelease?"-0":"",T?j===">"||j==="<"?W="<0.0.0-0":W="*":j&&A?(S&&(D=0),O=0,j===">"?(j=">=",S?(G=+G+1,D=0,O=0):(D=+D+1,O=0)):j==="<="&&(j="<",S?G=+G+1:D=+D+1),j==="<"&&(q="-0"),W=`${j+G}.${D}.${O}${q}`):S?W=`>=${G}.0.0${q} <${+G+1}.0.0-0`:P&&(W=`>=${G}.${D}.0${q} <${G}.${+D+1}.0-0`),r("xRange return",W),W})},L=(U,z)=>(r("replaceStars",U,z),U.trim().replace(o[l.STAR],"")),F=(U,z)=>(r("replaceGTE0",U,z),U.trim().replace(o[z.includePrerelease?l.GTE0PRE:l.GTE0],"")),H=U=>(z,J,W,j,G,D,O,q,T,S,P,A)=>(m(W)?J="":m(j)?J=`>=${W}.0.0${U?"-0":""}`:m(G)?J=`>=${W}.${j}.0${U?"-0":""}`:D?J=`>=${J}`:J=`>=${J}${U?"-0":""}`,m(T)?q="":m(S)?q=`<${+T+1}.0.0-0`:m(P)?q=`<${T}.${+S+1}.0-0`:A?q=`<=${T}.${S}.${P}-${A}`:U?q=`<${T}.${S}.${+P+1}-0`:q=`<=${q}`,`${J} ${q}`.trim()),M=(U,z,J)=>{for(let W=0;W<U.length;W++)if(!U[W].test(z))return!1;if(z.prerelease.length&&!J.includePrerelease){for(let W=0;W<U.length;W++)if(r(U[W].semver),U[W].semver!==i.ANY&&U[W].semver.prerelease.length>0){const j=U[W].semver;if(j.major===z.major&&j.minor===z.minor&&j.patch===z.patch)return!0}return!1}return!0};return vi}var _i,yl;function Ln(){if(yl)return _i;yl=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(c,g){if(g=f(g),c instanceof t){if(c.loose===!!g.loose)return c;c=c.value}c=c.trim().split(/\s+/).join(" "),r("comparator",c,g),this.options=g,this.loose=!!g.loose,this.parse(c),this.semver===e?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}parse(c){const g=this.options.loose?s[d.COMPARATORLOOSE]:s[d.COMPARATOR],E=c.match(g);if(!E)throw new TypeError(`Invalid comparator: ${c}`);this.operator=E[1]!==void 0?E[1]:"",this.operator==="="&&(this.operator=""),E[2]?this.semver=new a(E[2],this.options.loose):this.semver=e}toString(){return this.value}test(c){if(r("Comparator.test",c,this.options.loose),this.semver===e||c===e)return!0;if(typeof c=="string")try{c=new a(c,this.options)}catch{return!1}return i(c,this.operator,this.semver,this.options)}intersects(c,g){if(!(c instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new o(c.value,g).test(this.value):c.operator===""?c.value===""?!0:new o(this.value,g).test(c.semver):(g=f(g),g.includePrerelease&&(this.value==="<0.0.0-0"||c.value==="<0.0.0-0")||!g.includePrerelease&&(this.value.startsWith("<0.0.0")||c.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&c.operator.startsWith(">")||this.operator.startsWith("<")&&c.operator.startsWith("<")||this.semver.version===c.semver.version&&this.operator.includes("=")&&c.operator.includes("=")||i(this.semver,"<",c.semver,g)&&this.operator.startsWith(">")&&c.operator.startsWith("<")||i(this.semver,">",c.semver,g)&&this.operator.startsWith("<")&&c.operator.startsWith(">")))}}_i=t;const f=ro(),{safeRe:s,t:d}=bt(),i=gf(),r=Dn(),a=$e(),o=Le();return _i}var gi,vl;function qn(){if(vl)return gi;vl=1;const e=Le();return gi=(f,s,d)=>{try{s=new e(s,d)}catch{return!1}return s.test(f)},gi}var $i,_l;function Gm(){if(_l)return $i;_l=1;const e=Le();return $i=(f,s)=>new e(f,s).set.map(d=>d.map(i=>i.value).join(" ").trim().split(" ")),$i}var Ei,gl;function Km(){if(gl)return Ei;gl=1;const e=$e(),t=Le();return Ei=(s,d,i)=>{let r=null,a=null,o=null;try{o=new t(d,i)}catch{return null}return s.forEach(l=>{o.test(l)&&(!r||a.compare(l)===-1)&&(r=l,a=new e(r,i))}),r},Ei}var wi,$l;function Hm(){if($l)return wi;$l=1;const e=$e(),t=Le();return wi=(s,d,i)=>{let r=null,a=null,o=null;try{o=new t(d,i)}catch{return null}return s.forEach(l=>{o.test(l)&&(!r||a.compare(l)===1)&&(r=l,a=new e(r,i))}),r},wi}var Si,El;function xm(){if(El)return Si;El=1;const e=$e(),t=Le(),f=An();return Si=(d,i)=>{d=new t(d,i);let r=new e("0.0.0");if(d.test(r)||(r=new e("0.0.0-0"),d.test(r)))return r;r=null;for(let a=0;a<d.set.length;++a){const o=d.set[a];let l=null;o.forEach(c=>{const g=new e(c.semver.version);switch(c.operator){case">":g.prerelease.length===0?g.patch++:g.prerelease.push(0),g.raw=g.format();case"":case">=":(!l||f(g,l))&&(l=g);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),l&&(!r||f(r,l))&&(r=l)}return r&&d.test(r)?r:null},Si}var Ri,wl;function Bm(){if(wl)return Ri;wl=1;const e=Le();return Ri=(f,s)=>{try{return new e(f,s).range||"*"}catch{return null}},Ri}var bi,Sl;function ao(){if(Sl)return bi;Sl=1;const e=$e(),t=Ln(),{ANY:f}=t,s=Le(),d=qn(),i=An(),r=so(),a=oo(),o=io();return bi=(c,g,E,_)=>{c=new e(c,_),g=new s(g,_);let w,R,u,h,n;switch(E){case">":w=i,R=a,u=r,h=">",n=">=";break;case"<":w=r,R=o,u=i,h="<",n="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(d(c,g,_))return!1;for(let m=0;m<g.set.length;++m){const v=g.set[m];let p=null,y=null;if(v.forEach($=>{$.semver===f&&($=new t(">=0.0.0")),p=p||$,y=y||$,w($.semver,p.semver,_)?p=$:u($.semver,y.semver,_)&&(y=$)}),p.operator===h||p.operator===n||(!y.operator||y.operator===h)&&R(c,y.semver))return!1;if(y.operator===n&&u(c,y.semver))return!1}return!0},bi}var Pi,Rl;function Wm(){if(Rl)return Pi;Rl=1;const e=ao();return Pi=(f,s,d)=>e(f,s,">",d),Pi}var Ni,bl;function Jm(){if(bl)return Ni;bl=1;const e=ao();return Ni=(f,s,d)=>e(f,s,"<",d),Ni}var Oi,Pl;function Zm(){if(Pl)return Oi;Pl=1;const e=Le();return Oi=(f,s,d)=>(f=new e(f,d),s=new e(s,d),f.intersects(s,d)),Oi}var Ii,Nl;function Xm(){if(Nl)return Ii;Nl=1;const e=qn(),t=Ae();return Ii=(f,s,d)=>{const i=[];let r=null,a=null;const o=f.sort((E,_)=>t(E,_,d));for(const E of o)e(E,s,d)?(a=E,r||(r=E)):(a&&i.push([r,a]),a=null,r=null);r&&i.push([r,null]);const l=[];for(const[E,_]of i)E===_?l.push(E):!_&&E===o[0]?l.push("*"):_?E===o[0]?l.push(`<=${_}`):l.push(`${E} - ${_}`):l.push(`>=${E}`);const c=l.join(" || "),g=typeof s.raw=="string"?s.raw:String(s);return c.length<g.length?c:s},Ii}var Ti,Ol;function Ym(){if(Ol)return Ti;Ol=1;const e=Le(),t=Ln(),{ANY:f}=t,s=qn(),d=Ae(),i=(g,E,_={})=>{if(g===E)return!0;g=new e(g,_),E=new e(E,_);let w=!1;e:for(const R of g.set){for(const u of E.set){const h=o(R,u,_);if(w=w||h!==null,h)continue e}if(w)return!1}return!0},r=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],o=(g,E,_)=>{if(g===E)return!0;if(g.length===1&&g[0].semver===f){if(E.length===1&&E[0].semver===f)return!0;_.includePrerelease?g=r:g=a}if(E.length===1&&E[0].semver===f){if(_.includePrerelease)return!0;E=a}const w=new Set;let R,u;for(const b of g)b.operator===">"||b.operator===">="?R=l(R,b,_):b.operator==="<"||b.operator==="<="?u=c(u,b,_):w.add(b.semver);if(w.size>1)return null;let h;if(R&&u){if(h=d(R.semver,u.semver,_),h>0)return null;if(h===0&&(R.operator!==">="||u.operator!=="<="))return null}for(const b of w){if(R&&!s(b,String(R),_)||u&&!s(b,String(u),_))return null;for(const N of E)if(!s(b,String(N),_))return!1;return!0}let n,m,v,p,y=u&&!_.includePrerelease&&u.semver.prerelease.length?u.semver:!1,$=R&&!_.includePrerelease&&R.semver.prerelease.length?R.semver:!1;y&&y.prerelease.length===1&&u.operator==="<"&&y.prerelease[0]===0&&(y=!1);for(const b of E){if(p=p||b.operator===">"||b.operator===">=",v=v||b.operator==="<"||b.operator==="<=",R){if($&&b.semver.prerelease&&b.semver.prerelease.length&&b.semver.major===$.major&&b.semver.minor===$.minor&&b.semver.patch===$.patch&&($=!1),b.operator===">"||b.operator===">="){if(n=l(R,b,_),n===b&&n!==R)return!1}else if(R.operator===">="&&!s(R.semver,String(b),_))return!1}if(u){if(y&&b.semver.prerelease&&b.semver.prerelease.length&&b.semver.major===y.major&&b.semver.minor===y.minor&&b.semver.patch===y.patch&&(y=!1),b.operator==="<"||b.operator==="<="){if(m=c(u,b,_),m===b&&m!==u)return!1}else if(u.operator==="<="&&!s(u.semver,String(b),_))return!1}if(!b.operator&&(u||R)&&h!==0)return!1}return!(R&&v&&!u&&h!==0||u&&p&&!R&&h!==0||$||y)},l=(g,E,_)=>{if(!g)return E;const w=d(g.semver,E.semver,_);return w>0?g:w<0||E.operator===">"&&g.operator===">="?E:g},c=(g,E,_)=>{if(!g)return E;const w=d(g.semver,E.semver,_);return w<0?g:w>0||E.operator==="<"&&g.operator==="<="?E:g};return Ti=i,Ti}var Ci,Il;function Qm(){if(Il)return Ci;Il=1;const e=bt(),t=Cn(),f=$e(),s=yf(),d=ft(),i=Im(),r=Tm(),a=Cm(),o=Dm(),l=Am(),c=Lm(),g=qm(),E=km(),_=Ae(),w=jm(),R=Fm(),u=no(),h=Mm(),n=Um(),m=An(),v=so(),p=vf(),y=_f(),$=io(),b=oo(),N=gf(),L=Vm(),F=Ln(),H=Le(),M=qn(),U=Gm(),z=Km(),J=Hm(),W=xm(),j=Bm(),G=ao(),D=Wm(),O=Jm(),q=Zm(),T=Xm(),S=Ym();return Ci={parse:d,valid:i,clean:r,inc:a,diff:o,major:l,minor:c,patch:g,prerelease:E,compare:_,rcompare:w,compareLoose:R,compareBuild:u,sort:h,rsort:n,gt:m,lt:v,eq:p,neq:y,gte:$,lte:b,cmp:N,coerce:L,Comparator:F,Range:H,satisfies:M,toComparators:U,maxSatisfying:z,minSatisfying:J,minVersion:W,validRange:j,outside:G,gtr:D,ltr:O,intersects:q,simplifyRange:T,subset:S,SemVer:f,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers},Ci}var gt={exports:{}},mn={exports:{}},Tl;function ep(){if(Tl)return mn.exports;Tl=1;const e=(t,f)=>{for(const s of Reflect.ownKeys(f))Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(f,s));return t};return mn.exports=e,mn.exports.default=e,mn.exports}var Cl;function tp(){if(Cl)return gt.exports;Cl=1;const e=ep(),t=new WeakMap,f=(s,d={})=>{if(typeof s!="function")throw new TypeError("Expected a function");let i,r=0;const a=s.displayName||s.name||"<anonymous>",o=function(...l){if(t.set(o,++r),r===1)i=s.apply(this,l),s=null;else if(d.throw===!0)throw new Error(`Function \`${a}\` can only be called once`);return i};return e(o,s),t.set(o,r),o};return gt.exports=f,gt.exports.default=f,gt.exports.callCount=s=>{if(!t.has(s))throw new Error(`The given function \`${s.name}\` is not wrapped by the \`onetime\` package`);return t.get(s)},gt.exports}var pn=Et.exports,Dl;function rp(){return Dl||(Dl=1,function(e,t){var f=pn&&pn.__classPrivateFieldSet||function(W,j,G,D,O){if(D==="m")throw new TypeError("Private method is not writable");if(D==="a"&&!O)throw new TypeError("Private accessor was defined without a setter");if(typeof j=="function"?W!==j||!O:!j.has(W))throw new TypeError("Cannot write private member to an object whose class did not declare it");return D==="a"?O.call(W,G):O?O.value=G:j.set(W,G),G},s=pn&&pn.__classPrivateFieldGet||function(W,j,G,D){if(G==="a"&&!D)throw new TypeError("Private accessor was defined without a getter");if(typeof j=="function"?W!==j||!D:!j.has(W))throw new TypeError("Cannot read private member from an object whose class did not declare it");return G==="m"?D:G==="a"?D.call(W):D?D.value:j.get(W)},d,i,r,a,o,l;Object.defineProperty(t,"__esModule",{value:!0});const c=xi,g=ut,E=me,_=Ql,w=Yl,R=bf,u=Yf(),h=id(),n=od(),m=md(),v=$h(),p=Pm(),y=Om(),$=Qm(),b=tp(),N="aes-256-cbc",L=()=>Object.create(null),F=W=>W!=null;let H="";try{delete require.cache[__filename],H=E.dirname((i=(d=e.parent)===null||d===void 0?void 0:d.filename)!==null&&i!==void 0?i:".")}catch{}const M=(W,j)=>{const G=new Set(["undefined","symbol","function"]),D=typeof j;if(G.has(D))throw new TypeError(`Setting a value of type \`${D}\` for key \`${W}\` is not allowed as it's not supported by JSON`)},U="__internal__",z=`${U}.migrations.version`;class J{constructor(j={}){var G;r.set(this,void 0),a.set(this,void 0),o.set(this,void 0),l.set(this,{}),this._deserialize=P=>JSON.parse(P),this._serialize=P=>JSON.stringify(P,void 0," ");const D={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...j},O=b(()=>{const P=h.sync({cwd:H}),A=P&&JSON.parse(g.readFileSync(P,"utf8"));return A??{}});if(!D.cwd){if(D.projectName||(D.projectName=O().name),!D.projectName)throw new Error("Project name could not be inferred. Please specify the `projectName` option.");D.cwd=n(D.projectName,{suffix:D.projectSuffix}).config}if(f(this,o,D,"f"),D.schema){if(typeof D.schema!="object")throw new TypeError("The `schema` option must be an object.");const P=new v.default({allErrors:!0,useDefaults:!0});(0,p.default)(P);const A={type:"object",properties:D.schema};f(this,r,P.compile(A),"f");for(const[K,B]of Object.entries(D.schema))B?.default&&(s(this,l,"f")[K]=B.default)}D.defaults&&f(this,l,{...s(this,l,"f"),...D.defaults},"f"),D.serialize&&(this._serialize=D.serialize),D.deserialize&&(this._deserialize=D.deserialize),this.events=new R.EventEmitter,f(this,a,D.encryptionKey,"f");const q=D.fileExtension?`.${D.fileExtension}`:"";this.path=E.resolve(D.cwd,`${(G=D.configName)!==null&&G!==void 0?G:"config"}${q}`);const T=this.store,S=Object.assign(L(),D.defaults,T);this._validate(S);try{w.deepEqual(T,S)}catch{this.store=S}if(D.watch&&this._watch(),D.migrations){if(D.projectVersion||(D.projectVersion=O().version),!D.projectVersion)throw new Error("Project version could not be inferred. Please specify the `projectVersion` option.");this._migrate(D.migrations,D.projectVersion,D.beforeEachMigration)}}get(j,G){if(s(this,o,"f").accessPropertiesByDotNotation)return this._get(j,G);const{store:D}=this;return j in D?D[j]:G}set(j,G){if(typeof j!="string"&&typeof j!="object")throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof j}`);if(typeof j!="object"&&G===void 0)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(j))throw new TypeError(`Please don't use the ${U} key, as it's used to manage this module internal operations.`);const{store:D}=this,O=(q,T)=>{M(q,T),s(this,o,"f").accessPropertiesByDotNotation?u.set(D,q,T):D[q]=T};if(typeof j=="object"){const q=j;for(const[T,S]of Object.entries(q))O(T,S)}else O(j,G);this.store=D}has(j){return s(this,o,"f").accessPropertiesByDotNotation?u.has(this.store,j):j in this.store}reset(...j){for(const G of j)F(s(this,l,"f")[G])&&this.set(G,s(this,l,"f")[G])}delete(j){const{store:G}=this;s(this,o,"f").accessPropertiesByDotNotation?u.delete(G,j):delete G[j],this.store=G}clear(){this.store=L();for(const j of Object.keys(s(this,l,"f")))this.reset(j)}onDidChange(j,G){if(typeof j!="string")throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof j}`);if(typeof G!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof G}`);return this._handleChange(()=>this.get(j),G)}onDidAnyChange(j){if(typeof j!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof j}`);return this._handleChange(()=>this.store,j)}get size(){return Object.keys(this.store).length}get store(){try{const j=g.readFileSync(this.path,s(this,a,"f")?null:"utf8"),G=this._encryptData(j),D=this._deserialize(G);return this._validate(D),Object.assign(L(),D)}catch(j){if(j?.code==="ENOENT")return this._ensureDirectory(),L();if(s(this,o,"f").clearInvalidConfig&&j.name==="SyntaxError")return L();throw j}}set store(j){this._ensureDirectory(),this._validate(j),this._write(j),this.events.emit("change")}*[(r=new WeakMap,a=new WeakMap,o=new WeakMap,l=new WeakMap,Symbol.iterator)](){for(const[j,G]of Object.entries(this.store))yield[j,G]}_encryptData(j){if(!s(this,a,"f"))return j.toString();try{if(s(this,a,"f"))try{if(j.slice(16,17).toString()===":"){const G=j.slice(0,16),D=_.pbkdf2Sync(s(this,a,"f"),G.toString(),1e4,32,"sha512"),O=_.createDecipheriv(N,D,G);j=Buffer.concat([O.update(Buffer.from(j.slice(17))),O.final()]).toString("utf8")}else{const G=_.createDecipher(N,s(this,a,"f"));j=Buffer.concat([G.update(Buffer.from(j)),G.final()]).toString("utf8")}}catch{}}catch{}return j.toString()}_handleChange(j,G){let D=j();const O=()=>{const q=D,T=j();(0,c.isDeepStrictEqual)(T,q)||(D=T,G.call(this,T,q))};return this.events.on("change",O),()=>this.events.removeListener("change",O)}_validate(j){if(!s(this,r,"f")||s(this,r,"f").call(this,j)||!s(this,r,"f").errors)return;const D=s(this,r,"f").errors.map(({instancePath:O,message:q=""})=>`\`${O.slice(1)}\` ${q}`);throw new Error("Config schema violation: "+D.join("; "))}_ensureDirectory(){g.mkdirSync(E.dirname(this.path),{recursive:!0})}_write(j){let G=this._serialize(j);if(s(this,a,"f")){const D=_.randomBytes(16),O=_.pbkdf2Sync(s(this,a,"f"),D.toString(),1e4,32,"sha512"),q=_.createCipheriv(N,O,D);G=Buffer.concat([D,Buffer.from(":"),q.update(Buffer.from(G)),q.final()])}if(process.env.SNAP)g.writeFileSync(this.path,G,{mode:s(this,o,"f").configFileMode});else try{m.writeFileSync(this.path,G,{mode:s(this,o,"f").configFileMode})}catch(D){if(D?.code==="EXDEV"){g.writeFileSync(this.path,G,{mode:s(this,o,"f").configFileMode});return}throw D}}_watch(){this._ensureDirectory(),g.existsSync(this.path)||this._write(L()),process.platform==="win32"?g.watch(this.path,{persistent:!1},y(()=>{this.events.emit("change")},{wait:100})):g.watchFile(this.path,{persistent:!1},y(()=>{this.events.emit("change")},{wait:5e3}))}_migrate(j,G,D){let O=this._get(z,"0.0.0");const q=Object.keys(j).filter(S=>this._shouldPerformMigration(S,O,G));let T={...this.store};for(const S of q)try{D&&D(this,{fromVersion:O,toVersion:S,finalVersion:G,versions:q});const P=j[S];P(this),this._set(z,S),O=S,T={...this.store}}catch(P){throw this.store=T,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${P}`)}(this._isVersionInRangeFormat(O)||!$.eq(O,G))&&this._set(z,G)}_containsReservedKey(j){return typeof j=="object"&&Object.keys(j)[0]===U?!0:typeof j!="string"?!1:s(this,o,"f").accessPropertiesByDotNotation?!!j.startsWith(`${U}.`):!1}_isVersionInRangeFormat(j){return $.clean(j)===null}_shouldPerformMigration(j,G,D){return this._isVersionInRangeFormat(j)?G!=="0.0.0"&&$.satisfies(G,j)?!1:$.satisfies(D,j):!($.lte(j,G)||$.gt(j,D))}_get(j,G){return u.get(this.store,j,G)}_set(j,G){const{store:D}=this;u.set(D,j,G),this.store=D}}t.default=J,e.exports=J,e.exports.default=J}(Et,Et.exports)),Et.exports}var Di,Al;function np(){if(Al)return Di;Al=1;const e=me,{app:t,ipcMain:f,ipcRenderer:s,shell:d}=Pe,i=rp();let r=!1;const a=()=>{if(!f||!t)throw new Error("Electron Store: You need to call `.initRenderer()` from the main process.");const l={defaultCwd:t.getPath("userData"),appVersion:t.getVersion()};return r||(f.on("electron-store-get-data",c=>{c.returnValue=l}),r=!0),l};class o extends i{constructor(c){let g,E;if(s){const _=s.sendSync("electron-store-get-data");if(!_)throw new Error("Electron Store: You need to call `.initRenderer()` from the main process.");({defaultCwd:g,appVersion:E}=_)}else f&&t&&({defaultCwd:g,appVersion:E}=a());c={name:"config",...c},c.projectVersion||(c.projectVersion=E),c.cwd?c.cwd=e.isAbsolute(c.cwd)?c.cwd:e.join(g,c.cwd):c.cwd=g,c.configName=c.name,delete c.name,super(c)}static initRenderer(){a()}async openInEditor(){const c=await d.openPath(this.path);if(c)throw new Error(c)}}return Di=o,Di}var sp=np();const Ll=tf(sp);var nt={exports:{}},Ai,ql;function $f(){return ql||(ql=1,Ai={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}),Ai}var Li={},kl;function co(){return kl||(kl=1,function(e){const t={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",DESCRIPTOR_NOT_EXIST:"No descriptor present",DESCRIPTOR_UNKNOWN:"Unknown descriptor format",DESCRIPTOR_FAULTY:"Descriptor data is malformed",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed {0}",FILE_IN_THE_WAY:"There is a file in the way: {0}",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",DISK_ENTRY_TOO_LARGE:"Number of disk entries is too large",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:'File not found: "{0}"',NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found",INVALID_PASS_PARAM:"Incompatible password parameter",WRONG_PASSWORD:"Wrong Password",COMMENT_TOO_LONG:"Comment is too long",EXTRA_FIELD_PARSE_ERROR:"Extra field parsing error"};function f(s){return function(...d){return d.length&&(s=s.replace(/\{(\d)\}/g,(i,r)=>d[r]||"")),new Error("ADM-ZIP: "+s)}}for(const s of Object.keys(t))e[s]=f(t[s])}(Li)),Li}var qi,jl;function ip(){if(jl)return qi;jl=1;const e=ut,t=me,f=$f(),s=co(),d=typeof process=="object"&&process.platform==="win32",i=o=>typeof o=="object"&&o!==null,r=new Uint32Array(256).map((o,l)=>{for(let c=0;c<8;c++)(l&1)!==0?l=3988292384^l>>>1:l>>>=1;return l>>>0});function a(o){this.sep=t.sep,this.fs=e,i(o)&&i(o.fs)&&typeof o.fs.statSync=="function"&&(this.fs=o.fs)}return qi=a,a.prototype.makeDir=function(o){const l=this;function c(g){let E=g.split(l.sep)[0];g.split(l.sep).forEach(function(_){if(!(!_||_.substr(-1,1)===":")){E+=l.sep+_;var w;try{w=l.fs.statSync(E)}catch{l.fs.mkdirSync(E)}if(w&&w.isFile())throw s.FILE_IN_THE_WAY(`"${E}"`)}})}c(o)},a.prototype.writeFileTo=function(o,l,c,g){const E=this;if(E.fs.existsSync(o)){if(!c)return!1;var _=E.fs.statSync(o);if(_.isDirectory())return!1}var w=t.dirname(o);E.fs.existsSync(w)||E.makeDir(w);var R;try{R=E.fs.openSync(o,"w",438)}catch{E.fs.chmodSync(o,438),R=E.fs.openSync(o,"w",438)}if(R)try{E.fs.writeSync(R,l,0,l.length,0)}finally{E.fs.closeSync(R)}return E.fs.chmodSync(o,g||438),!0},a.prototype.writeFileToAsync=function(o,l,c,g,E){typeof g=="function"&&(E=g,g=void 0);const _=this;_.fs.exists(o,function(w){if(w&&!c)return E(!1);_.fs.stat(o,function(R,u){if(w&&u.isDirectory())return E(!1);var h=t.dirname(o);_.fs.exists(h,function(n){n||_.makeDir(h),_.fs.open(o,"w",438,function(m,v){m?_.fs.chmod(o,438,function(){_.fs.open(o,"w",438,function(p,y){_.fs.write(y,l,0,l.length,0,function(){_.fs.close(y,function(){_.fs.chmod(o,g||438,function(){E(!0)})})})})}):v?_.fs.write(v,l,0,l.length,0,function(){_.fs.close(v,function(){_.fs.chmod(o,g||438,function(){E(!0)})})}):_.fs.chmod(o,g||438,function(){E(!0)})})})})})},a.prototype.findFiles=function(o){const l=this;function c(g,E,_){let w=[];return l.fs.readdirSync(g).forEach(function(R){const u=t.join(g,R),h=l.fs.statSync(u);w.push(t.normalize(u)+(h.isDirectory()?l.sep:"")),h.isDirectory()&&_&&(w=w.concat(c(u,E,_)))}),w}return c(o,void 0,!0)},a.prototype.findFilesAsync=function(o,l){const c=this;let g=[];c.fs.readdir(o,function(E,_){if(E)return l(E);let w=_.length;if(!w)return l(null,g);_.forEach(function(R){R=t.join(o,R),c.fs.stat(R,function(u,h){if(u)return l(u);h&&(g.push(t.normalize(R)+(h.isDirectory()?c.sep:"")),h.isDirectory()?c.findFilesAsync(R,function(n,m){if(n)return l(n);g=g.concat(m),--w||l(null,g)}):--w||l(null,g))})})})},a.prototype.getAttributes=function(){},a.prototype.setAttributes=function(){},a.crc32update=function(o,l){return r[(o^l)&255]^o>>>8},a.crc32=function(o){typeof o=="string"&&(o=Buffer.from(o,"utf8"));let l=o.length,c=-1;for(let g=0;g<l;)c=a.crc32update(c,o[g++]);return~c>>>0},a.methodToString=function(o){switch(o){case f.STORED:return"STORED ("+o+")";case f.DEFLATED:return"DEFLATED ("+o+")";default:return"UNSUPPORTED ("+o+")"}},a.canonical=function(o){if(!o)return"";const l=t.posix.normalize("/"+o.split("\\").join("/"));return t.join(".",l)},a.zipnamefix=function(o){if(!o)return"";const l=t.posix.normalize("/"+o.split("\\").join("/"));return t.posix.join(".",l)},a.findLast=function(o,l){if(!Array.isArray(o))throw new TypeError("arr is not array");const c=o.length>>>0;for(let g=c-1;g>=0;g--)if(l(o[g],g,o))return o[g]},a.sanitize=function(o,l){o=t.resolve(t.normalize(o));for(var c=l.split("/"),g=0,E=c.length;g<E;g++){var _=t.normalize(t.join(o,c.slice(g,E).join(t.sep)));if(_.indexOf(o)===0)return _}return t.normalize(t.join(o,t.basename(l)))},a.toBuffer=function(l,c){return Buffer.isBuffer(l)?l:l instanceof Uint8Array?Buffer.from(l):typeof l=="string"?c(l):Buffer.alloc(0)},a.readBigUInt64LE=function(o,l){var c=Buffer.from(o.slice(l,l+8));return c.swap64(),parseInt(`0x${c.toString("hex")}`)},a.fromDOS2Date=function(o){return new Date((o>>25&127)+1980,Math.max((o>>21&15)-1,0),Math.max(o>>16&31,1),o>>11&31,o>>5&63,(o&31)<<1)},a.fromDate2DOS=function(o){let l=0,c=0;return o.getFullYear()>1979&&(l=(o.getFullYear()-1980&127)<<9|o.getMonth()+1<<5|o.getDate(),c=o.getHours()<<11|o.getMinutes()<<5|o.getSeconds()>>1),l<<16|c},a.isWin=d,a.crcTable=r,qi}var ki,Fl;function op(){if(Fl)return ki;Fl=1;const e=me;return ki=function(t,{fs:f}){var s=t||"",d=r(),i=null;function r(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return s&&f.existsSync(s)?(i=f.statSync(s),d.directory=i.isDirectory(),d.mtime=i.mtime,d.atime=i.atime,d.executable=(73&i.mode)!==0,d.readonly=(128&i.mode)===0,d.hidden=e.basename(s)[0]==="."):console.warn("Invalid path: "+s),{get directory(){return d.directory},get readOnly(){return d.readonly},get hidden(){return d.hidden},get mtime(){return d.mtime},get atime(){return d.atime},get executable(){return d.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:s,isDirectory:d.directory,isReadOnly:d.readonly,isHidden:d.hidden,isExecutable:d.executable,mTime:d.mtime,aTime:d.atime}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},ki}var ji,Ml;function ap(){return Ml||(Ml=1,ji={efs:!0,encode:e=>Buffer.from(e,"utf8"),decode:e=>e.toString("utf8")}),ji}var Ul;function Pt(){return Ul||(Ul=1,nt.exports=ip(),nt.exports.Constants=$f(),nt.exports.Errors=co(),nt.exports.FileAttr=op(),nt.exports.decoder=ap()),nt.exports}var yn={},Fi,Vl;function cp(){if(Vl)return Fi;Vl=1;var e=Pt(),t=e.Constants;return Fi=function(){var f=20,s=10,d=0,i=0,r=0,a=0,o=0,l=0,c=0,g=0,E=0,_=0,w=0,R=0,u=0;f|=e.isWin?2560:768,d|=t.FLG_EFS;const h={extraLen:0},n=v=>Math.max(0,v)>>>0,m=v=>Math.max(0,v)&255;return r=e.fromDate2DOS(new Date),{get made(){return f},set made(v){f=v},get version(){return s},set version(v){s=v},get flags(){return d},set flags(v){d=v},get flags_efs(){return(d&t.FLG_EFS)>0},set flags_efs(v){v?d|=t.FLG_EFS:d&=~t.FLG_EFS},get flags_desc(){return(d&t.FLG_DESC)>0},set flags_desc(v){v?d|=t.FLG_DESC:d&=~t.FLG_DESC},get method(){return i},set method(v){switch(v){case t.STORED:this.version=10;case t.DEFLATED:default:this.version=20}i=v},get time(){return e.fromDOS2Date(this.timeval)},set time(v){this.timeval=e.fromDate2DOS(v)},get timeval(){return r},set timeval(v){r=n(v)},get timeHighByte(){return m(r>>>8)},get crc(){return a},set crc(v){a=n(v)},get compressedSize(){return o},set compressedSize(v){o=n(v)},get size(){return l},set size(v){l=n(v)},get fileNameLength(){return c},set fileNameLength(v){c=v},get extraLength(){return g},set extraLength(v){g=v},get extraLocalLength(){return h.extraLen},set extraLocalLength(v){h.extraLen=v},get commentLength(){return E},set commentLength(v){E=v},get diskNumStart(){return _},set diskNumStart(v){_=n(v)},get inAttr(){return w},set inAttr(v){w=n(v)},get attr(){return R},set attr(v){R=n(v)},get fileAttr(){return(R||0)>>16&4095},get offset(){return u},set offset(v){u=n(v)},get encrypted(){return(d&t.FLG_ENC)===t.FLG_ENC},get centralHeaderSize(){return t.CENHDR+c+g+E},get realDataOffset(){return u+t.LOCHDR+h.fnameLen+h.extraLen},get localHeader(){return h},loadLocalHeaderFromBinary:function(v){var p=v.slice(u,u+t.LOCHDR);if(p.readUInt32LE(0)!==t.LOCSIG)throw e.Errors.INVALID_LOC();h.version=p.readUInt16LE(t.LOCVER),h.flags=p.readUInt16LE(t.LOCFLG),h.method=p.readUInt16LE(t.LOCHOW),h.time=p.readUInt32LE(t.LOCTIM),h.crc=p.readUInt32LE(t.LOCCRC),h.compressedSize=p.readUInt32LE(t.LOCSIZ),h.size=p.readUInt32LE(t.LOCLEN),h.fnameLen=p.readUInt16LE(t.LOCNAM),h.extraLen=p.readUInt16LE(t.LOCEXT);const y=u+t.LOCHDR+h.fnameLen,$=y+h.extraLen;return v.slice(y,$)},loadFromBinary:function(v){if(v.length!==t.CENHDR||v.readUInt32LE(0)!==t.CENSIG)throw e.Errors.INVALID_CEN();f=v.readUInt16LE(t.CENVEM),s=v.readUInt16LE(t.CENVER),d=v.readUInt16LE(t.CENFLG),i=v.readUInt16LE(t.CENHOW),r=v.readUInt32LE(t.CENTIM),a=v.readUInt32LE(t.CENCRC),o=v.readUInt32LE(t.CENSIZ),l=v.readUInt32LE(t.CENLEN),c=v.readUInt16LE(t.CENNAM),g=v.readUInt16LE(t.CENEXT),E=v.readUInt16LE(t.CENCOM),_=v.readUInt16LE(t.CENDSK),w=v.readUInt16LE(t.CENATT),R=v.readUInt32LE(t.CENATX),u=v.readUInt32LE(t.CENOFF)},localHeaderToBinary:function(){var v=Buffer.alloc(t.LOCHDR);return v.writeUInt32LE(t.LOCSIG,0),v.writeUInt16LE(s,t.LOCVER),v.writeUInt16LE(d,t.LOCFLG),v.writeUInt16LE(i,t.LOCHOW),v.writeUInt32LE(r,t.LOCTIM),v.writeUInt32LE(a,t.LOCCRC),v.writeUInt32LE(o,t.LOCSIZ),v.writeUInt32LE(l,t.LOCLEN),v.writeUInt16LE(c,t.LOCNAM),v.writeUInt16LE(h.extraLen,t.LOCEXT),v},centralHeaderToBinary:function(){var v=Buffer.alloc(t.CENHDR+c+g+E);return v.writeUInt32LE(t.CENSIG,0),v.writeUInt16LE(f,t.CENVEM),v.writeUInt16LE(s,t.CENVER),v.writeUInt16LE(d,t.CENFLG),v.writeUInt16LE(i,t.CENHOW),v.writeUInt32LE(r,t.CENTIM),v.writeUInt32LE(a,t.CENCRC),v.writeUInt32LE(o,t.CENSIZ),v.writeUInt32LE(l,t.CENLEN),v.writeUInt16LE(c,t.CENNAM),v.writeUInt16LE(g,t.CENEXT),v.writeUInt16LE(E,t.CENCOM),v.writeUInt16LE(_,t.CENDSK),v.writeUInt16LE(w,t.CENATT),v.writeUInt32LE(R,t.CENATX),v.writeUInt32LE(u,t.CENOFF),v},toJSON:function(){const v=function(p){return p+" bytes"};return{made:f,version:s,flags:d,method:e.methodToString(i),time:this.time,crc:"0x"+a.toString(16).toUpperCase(),compressedSize:v(o),size:v(l),fileNameLength:v(c),extraLength:v(g),commentLength:v(E),diskNumStart:_,inAttr:w,attr:R,offset:u,centralHeaderSize:v(t.CENHDR+c+g+E)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},Fi}var Mi,zl;function up(){if(zl)return Mi;zl=1;var e=Pt(),t=e.Constants;return Mi=function(){var f=0,s=0,d=0,i=0,r=0;return{get diskEntries(){return f},set diskEntries(a){f=s=a},get totalEntries(){return s},set totalEntries(a){s=f=a},get size(){return d},set size(a){d=a},get offset(){return i},set offset(a){i=a},get commentLength(){return r},set commentLength(a){r=a},get mainHeaderSize(){return t.ENDHDR+r},loadFromBinary:function(a){if((a.length!==t.ENDHDR||a.readUInt32LE(0)!==t.ENDSIG)&&(a.length<t.ZIP64HDR||a.readUInt32LE(0)!==t.ZIP64SIG))throw e.Errors.INVALID_END();a.readUInt32LE(0)===t.ENDSIG?(f=a.readUInt16LE(t.ENDSUB),s=a.readUInt16LE(t.ENDTOT),d=a.readUInt32LE(t.ENDSIZ),i=a.readUInt32LE(t.ENDOFF),r=a.readUInt16LE(t.ENDCOM)):(f=e.readBigUInt64LE(a,t.ZIP64SUB),s=e.readBigUInt64LE(a,t.ZIP64TOT),d=e.readBigUInt64LE(a,t.ZIP64SIZE),i=e.readBigUInt64LE(a,t.ZIP64OFF),r=0)},toBinary:function(){var a=Buffer.alloc(t.ENDHDR+r);return a.writeUInt32LE(t.ENDSIG,0),a.writeUInt32LE(0,4),a.writeUInt16LE(f,t.ENDSUB),a.writeUInt16LE(s,t.ENDTOT),a.writeUInt32LE(d,t.ENDSIZ),a.writeUInt32LE(i,t.ENDOFF),a.writeUInt16LE(r,t.ENDCOM),a.fill(" ",t.ENDHDR),a},toJSON:function(){const a=function(o,l){let c=o.toString(16).toUpperCase();for(;c.length<l;)c="0"+c;return"0x"+c};return{diskEntries:f,totalEntries:s,size:d+" bytes",offset:a(i,4),commentLength:r}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},Mi}var Gl;function Ef(){return Gl||(Gl=1,yn.EntryHeader=cp(),yn.MainHeader=up()),yn}var $t={},Ui,Kl;function lp(){return Kl||(Kl=1,Ui=function(e){var t=ef,f={chunkSize:(parseInt(e.length/1024)+1)*1024};return{deflate:function(){return t.deflateRawSync(e,f)},deflateAsync:function(s){var d=t.createDeflateRaw(f),i=[],r=0;d.on("data",function(a){i.push(a),r+=a.length}),d.on("end",function(){var a=Buffer.alloc(r),o=0;a.fill(0);for(var l=0;l<i.length;l++){var c=i[l];c.copy(a,o),o+=c.length}s&&s(a)}),d.end(e)}}}),Ui}var Vi,Hl;function fp(){if(Hl)return Vi;Hl=1;const e=+(process.versions?process.versions.node:"").split(".")[0]||0;return Vi=function(t,f){var s=ef;const d=e>=15&&f>0?{maxOutputLength:f}:{};return{inflate:function(){return s.inflateRawSync(t,d)},inflateAsync:function(i){var r=s.createInflateRaw(d),a=[],o=0;r.on("data",function(l){a.push(l),o+=l.length}),r.on("end",function(){var l=Buffer.alloc(o),c=0;l.fill(0);for(var g=0;g<a.length;g++){var E=a[g];E.copy(l,c),c+=E.length}i&&i(l)}),r.end(t)}}},Vi}var zi,xl;function dp(){if(xl)return zi;xl=1;const{randomFillSync:e}=Ql,t=co(),f=new Uint32Array(256).map((_,w)=>{for(let R=0;R<8;R++)(w&1)!==0?w=w>>>1^3988292384:w>>>=1;return w>>>0}),s=(_,w)=>Math.imul(_,w)>>>0,d=(_,w)=>f[(_^w)&255]^_>>>8,i=()=>typeof e=="function"?e(Buffer.alloc(12)):i.node();i.node=()=>{const _=Buffer.alloc(12),w=_.length;for(let R=0;R<w;R++)_[R]=Math.random()*256&255;return _};const r={genSalt:i};function a(_){const w=Buffer.isBuffer(_)?_:Buffer.from(_);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let R=0;R<w.length;R++)this.updateKeys(w[R])}a.prototype.updateKeys=function(_){const w=this.keys;return w[0]=d(w[0],_),w[1]+=w[0]&255,w[1]=s(w[1],134775813)+1,w[2]=d(w[2],w[1]>>>24),_},a.prototype.next=function(){const _=(this.keys[2]|2)>>>0;return s(_,_^1)>>8&255};function o(_){const w=new a(_);return function(R){const u=Buffer.alloc(R.length);let h=0;for(let n of R)u[h++]=w.updateKeys(n^w.next());return u}}function l(_){const w=new a(_);return function(R,u,h=0){u||(u=Buffer.alloc(R.length));for(let n of R){const m=w.next();u[h++]=n^m,w.updateKeys(n)}return u}}function c(_,w,R){if(!_||!Buffer.isBuffer(_)||_.length<12)return Buffer.alloc(0);const u=o(R),h=u(_.slice(0,12)),n=(w.flags&8)===8?w.timeHighByte:w.crc>>>24;if(h[11]!==n)throw t.WRONG_PASSWORD();return u(_.slice(12))}function g(_){Buffer.isBuffer(_)&&_.length>=12?r.genSalt=function(){return _.slice(0,12)}:_==="node"?r.genSalt=i.node:r.genSalt=i}function E(_,w,R,u=!1){_==null&&(_=Buffer.alloc(0)),Buffer.isBuffer(_)||(_=Buffer.from(_.toString()));const h=l(R),n=r.genSalt();n[11]=w.crc>>>24&255,u&&(n[10]=w.crc>>>16&255);const m=Buffer.alloc(_.length+12);return h(n,m),h(_,m,12)}return zi={decrypt:c,encrypt:E,_salter:g},zi}var Bl;function hp(){return Bl||(Bl=1,$t.Deflater=lp(),$t.Inflater=fp(),$t.ZipCrypto=dp()),$t}var Gi,Wl;function wf(){if(Wl)return Gi;Wl=1;var e=Pt(),t=Ef(),f=e.Constants,s=hp();return Gi=function(d,i){var r=new t.EntryHeader,a=Buffer.alloc(0),o=Buffer.alloc(0),l=!1,c=null,g=Buffer.alloc(0),E=Buffer.alloc(0),_=!0;const w=d,R=typeof w.decoder=="object"?w.decoder:e.decoder;_=R.hasOwnProperty("efs")?R.efs:!1;function u(){return!i||!(i instanceof Uint8Array)?Buffer.alloc(0):(E=r.loadLocalHeaderFromBinary(i),i.slice(r.realDataOffset,r.realDataOffset+r.compressedSize))}function h($){if(r.flags_desc){const b={},N=r.realDataOffset+r.compressedSize;if(i.readUInt32LE(N)==f.LOCSIG||i.readUInt32LE(N)==f.CENSIG)throw e.Errors.DESCRIPTOR_NOT_EXIST();if(i.readUInt32LE(N)==f.EXTSIG)b.crc=i.readUInt32LE(N+f.EXTCRC),b.compressedSize=i.readUInt32LE(N+f.EXTSIZ),b.size=i.readUInt32LE(N+f.EXTLEN);else if(i.readUInt16LE(N+12)===19280)b.crc=i.readUInt32LE(N+f.EXTCRC-4),b.compressedSize=i.readUInt32LE(N+f.EXTSIZ-4),b.size=i.readUInt32LE(N+f.EXTLEN-4);else throw e.Errors.DESCRIPTOR_UNKNOWN();if(b.compressedSize!==r.compressedSize||b.size!==r.size||b.crc!==r.crc)throw e.Errors.DESCRIPTOR_FAULTY();if(e.crc32($)!==b.crc)return!1}else if(e.crc32($)!==r.localHeader.crc)return!1;return!0}function n($,b,N){if(typeof b>"u"&&typeof $=="string"&&(N=$,$=void 0),l)return $&&b&&b(Buffer.alloc(0),e.Errors.DIRECTORY_CONTENT_ERROR()),Buffer.alloc(0);var L=u();if(L.length===0)return $&&b&&b(L),L;if(r.encrypted){if(typeof N!="string"&&!Buffer.isBuffer(N))throw e.Errors.INVALID_PASS_PARAM();L=s.ZipCrypto.decrypt(L,r,N)}var F=Buffer.alloc(r.size);switch(r.method){case e.Constants.STORED:if(L.copy(F),h(F))return $&&b&&b(F),F;throw $&&b&&b(F,e.Errors.BAD_CRC()),e.Errors.BAD_CRC();case e.Constants.DEFLATED:var H=new s.Inflater(L,r.size);if($)H.inflateAsync(function(M){M.copy(M,0),b&&(h(M)?b(M):b(M,e.Errors.BAD_CRC()))});else{if(H.inflate(F).copy(F,0),!h(F))throw e.Errors.BAD_CRC(`"${R.decode(a)}"`);return F}break;default:throw $&&b&&b(Buffer.alloc(0),e.Errors.UNKNOWN_METHOD()),e.Errors.UNKNOWN_METHOD()}}function m($,b){if((!c||!c.length)&&Buffer.isBuffer(i))return $&&b&&b(u()),u();if(c.length&&!l){var N;switch(r.method){case e.Constants.STORED:return r.compressedSize=r.size,N=Buffer.alloc(c.length),c.copy(N),$&&b&&b(N),N;default:case e.Constants.DEFLATED:var L=new s.Deflater(c);if($)L.deflateAsync(function(H){N=Buffer.alloc(H.length),r.compressedSize=H.length,H.copy(N),b&&b(N)});else{var F=L.deflate();return r.compressedSize=F.length,F}L=null;break}}else if($&&b)b(Buffer.alloc(0));else return Buffer.alloc(0)}function v($,b){return($.readUInt32LE(b+4)<<4)+$.readUInt32LE(b)}function p($){try{for(var b=0,N,L,F;b+4<$.length;)N=$.readUInt16LE(b),b+=2,L=$.readUInt16LE(b),b+=2,F=$.slice(b,b+L),b+=L,f.ID_ZIP64===N&&y(F)}catch{throw e.Errors.EXTRA_FIELD_PARSE_ERROR()}}function y($){var b,N,L,F;$.length>=f.EF_ZIP64_SCOMP&&(b=v($,f.EF_ZIP64_SUNCOMP),r.size===f.EF_ZIP64_OR_32&&(r.size=b)),$.length>=f.EF_ZIP64_RHO&&(N=v($,f.EF_ZIP64_SCOMP),r.compressedSize===f.EF_ZIP64_OR_32&&(r.compressedSize=N)),$.length>=f.EF_ZIP64_DSN&&(L=v($,f.EF_ZIP64_RHO),r.offset===f.EF_ZIP64_OR_32&&(r.offset=L)),$.length>=f.EF_ZIP64_DSN+4&&(F=$.readUInt32LE(f.EF_ZIP64_DSN),r.diskNumStart===f.EF_ZIP64_OR_16&&(r.diskNumStart=F))}return{get entryName(){return R.decode(a)},get rawEntryName(){return a},set entryName($){a=e.toBuffer($,R.encode);var b=a[a.length-1];l=b===47||b===92,r.fileNameLength=a.length},get efs(){return typeof _=="function"?_(this.entryName):_},get extra(){return g},set extra($){g=$,r.extraLength=$.length,p($)},get comment(){return R.decode(o)},set comment($){if(o=e.toBuffer($,R.encode),r.commentLength=o.length,o.length>65535)throw e.Errors.COMMENT_TOO_LONG()},get name(){var $=R.decode(a);return l?$.substr($.length-1).split("/").pop():$.split("/").pop()},get isDirectory(){return l},getCompressedData:function(){return m(!1,null)},getCompressedDataAsync:function($){m(!0,$)},setData:function($){c=e.toBuffer($,e.decoder.encode),!l&&c.length?(r.size=c.length,r.method=e.Constants.DEFLATED,r.crc=e.crc32($),r.changed=!0):r.method=e.Constants.STORED},getData:function($){return r.changed?c:n(!1,null,$)},getDataAsync:function($,b){r.changed?$(c):n(!0,$,b)},set attr($){r.attr=$},get attr(){return r.attr},set header($){r.loadFromBinary($)},get header(){return r},packCentralHeader:function(){r.flags_efs=this.efs,r.extraLength=g.length;var $=r.centralHeaderToBinary(),b=e.Constants.CENHDR;return a.copy($,b),b+=a.length,g.copy($,b),b+=r.extraLength,o.copy($,b),$},packLocalHeader:function(){let $=0;r.flags_efs=this.efs,r.extraLocalLength=E.length;const b=r.localHeaderToBinary(),N=Buffer.alloc(b.length+a.length+r.extraLocalLength);return b.copy(N,$),$+=b.length,a.copy(N,$),$+=a.length,E.copy(N,$),$+=E.length,N},toJSON:function(){const $=function(b){return"<"+(b&&b.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:r.toJSON(),compressedData:$(i),data:$(c)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},Gi}var Ki,Jl;function mp(){if(Jl)return Ki;Jl=1;const e=wf(),t=Ef(),f=Pt();return Ki=function(s,d){var i=[],r={},a=Buffer.alloc(0),o=new t.MainHeader,l=!1;const c=new Set,g=d,{noSort:E,decoder:_}=g;s?u(g.readEntries):l=!0;function w(){const n=new Set;for(const m of Object.keys(r)){const v=m.split("/");if(v.pop(),!!v.length)for(let p=0;p<v.length;p++){const y=v.slice(0,p+1).join("/")+"/";n.add(y)}}for(const m of n)if(!(m in r)){const v=new e(g);v.entryName=m,v.attr=16,v.temporary=!0,i.push(v),r[v.entryName]=v,c.add(v)}}function R(){if(l=!0,r={},o.diskEntries>(s.length-o.offset)/f.Constants.CENHDR)throw f.Errors.DISK_ENTRY_TOO_LARGE();i=new Array(o.diskEntries);for(var n=o.offset,m=0;m<i.length;m++){var v=n,p=new e(g,s);p.header=s.slice(v,v+=f.Constants.CENHDR),p.entryName=s.slice(v,v+=p.header.fileNameLength),p.header.extraLength&&(p.extra=s.slice(v,v+=p.header.extraLength)),p.header.commentLength&&(p.comment=s.slice(v,v+p.header.commentLength)),n+=p.header.centralHeaderSize,i[m]=p,r[p.entryName]=p}c.clear(),w()}function u(n){var m=s.length-f.Constants.ENDHDR,v=Math.max(0,m-65535),p=v,y=s.length,$=-1,b=0;for((typeof g.trailingSpace=="boolean"?g.trailingSpace:!1)&&(v=0),m;m>=p;m--)if(s[m]===80){if(s.readUInt32LE(m)===f.Constants.ENDSIG){$=m,b=m,y=m+f.Constants.ENDHDR,p=m-f.Constants.END64HDR;continue}if(s.readUInt32LE(m)===f.Constants.END64SIG){p=v;continue}if(s.readUInt32LE(m)===f.Constants.ZIP64SIG){$=m,y=m+f.readBigUInt64LE(s,m+f.Constants.ZIP64SIZE)+f.Constants.ZIP64LEAD;break}}if($==-1)throw f.Errors.INVALID_FORMAT();o.loadFromBinary(s.slice($,y)),o.commentLength&&(a=s.slice(b+f.Constants.ENDHDR)),n&&R()}function h(){i.length>1&&!E&&i.sort((n,m)=>n.entryName.toLowerCase().localeCompare(m.entryName.toLowerCase()))}return{get entries(){return l||R(),i.filter(n=>!c.has(n))},get comment(){return _.decode(a)},set comment(n){a=f.toBuffer(n,_.encode),o.commentLength=a.length},getEntryCount:function(){return l?i.length:o.diskEntries},forEach:function(n){this.entries.forEach(n)},getEntry:function(n){return l||R(),r[n]||null},setEntry:function(n){l||R(),i.push(n),r[n.entryName]=n,o.totalEntries=i.length},deleteFile:function(n,m=!0){l||R();const v=r[n];this.getEntryChildren(v,m).map(y=>y.entryName).forEach(this.deleteEntry)},deleteEntry:function(n){l||R();const m=r[n],v=i.indexOf(m);v>=0&&(i.splice(v,1),delete r[n],o.totalEntries=i.length)},getEntryChildren:function(n,m=!0){if(l||R(),typeof n=="object")if(n.isDirectory&&m){const v=[],p=n.entryName;for(const y of i)y.entryName.startsWith(p)&&v.push(y);return v}else return[n];return[]},getChildCount:function(n){if(n&&n.isDirectory){const m=this.getEntryChildren(n);return m.includes(n)?m.length-1:m.length}return 0},compressToBuffer:function(){l||R(),h();const n=[],m=[];let v=0,p=0;o.size=0,o.offset=0;let y=0;for(const N of this.entries){const L=N.getCompressedData();N.header.offset=p;const F=N.packLocalHeader(),H=F.length+L.length;p+=H,n.push(F),n.push(L);const M=N.packCentralHeader();m.push(M),o.size+=M.length,v+=H+M.length,y++}v+=o.mainHeaderSize,o.offset=p,o.totalEntries=y,p=0;const $=Buffer.alloc(v);for(const N of n)N.copy($,p),p+=N.length;for(const N of m)N.copy($,p),p+=N.length;const b=o.toBinary();return a&&a.copy(b,f.Constants.ENDHDR),b.copy($,p),s=$,l=!1,$},toAsyncBuffer:function(n,m,v,p){try{l||R(),h();const y=[],$=[];let b=0,N=0,L=0;o.size=0,o.offset=0;const F=function(H){if(H.length>0){const M=H.shift(),U=M.entryName+M.extra.toString();v&&v(U),M.getCompressedDataAsync(function(z){p&&p(U),M.header.offset=N;const J=M.packLocalHeader(),W=J.length+z.length;N+=W,y.push(J),y.push(z);const j=M.packCentralHeader();$.push(j),o.size+=j.length,b+=W+j.length,L++,F(H)})}else{b+=o.mainHeaderSize,o.offset=N,o.totalEntries=L,N=0;const M=Buffer.alloc(b);y.forEach(function(z){z.copy(M,N),N+=z.length}),$.forEach(function(z){z.copy(M,N),N+=z.length});const U=o.toBinary();a&&a.copy(U,f.Constants.ENDHDR),U.copy(M,N),s=M,l=!1,n(M)}};F(Array.from(this.entries))}catch(y){m(y)}}}},Ki}var Hi,Zl;function pp(){if(Zl)return Hi;Zl=1;const e=Pt(),t=me,f=wf(),s=mp(),d=(...o)=>e.findLast(o,l=>typeof l=="boolean"),i=(...o)=>e.findLast(o,l=>typeof l=="string"),r=(...o)=>e.findLast(o,l=>typeof l=="function"),a={noSort:!1,readEntries:!1,method:e.Constants.NONE,fs:null};return Hi=function(o,l){let c=null;const g=Object.assign(Object.create(null),a);o&&typeof o=="object"&&(o instanceof Uint8Array||(Object.assign(g,o),o=g.input?g.input:void 0,g.input&&delete g.input),Buffer.isBuffer(o)&&(c=o,g.method=e.Constants.BUFFER,o=void 0)),Object.assign(g,l);const E=new e(g);if((typeof g.decoder!="object"||typeof g.decoder.encode!="function"||typeof g.decoder.decode!="function")&&(g.decoder=e.decoder),o&&typeof o=="string")if(E.fs.existsSync(o))g.method=e.Constants.FILE,g.filename=o,c=E.fs.readFileSync(o);else throw e.Errors.INVALID_FILENAME();const _=new s(c,g),{canonical:w,sanitize:R,zipnamefix:u}=e;function h(p){if(p&&_){var y;if(typeof p=="string"&&(y=_.getEntry(t.posix.normalize(p))),typeof p=="object"&&typeof p.entryName<"u"&&typeof p.header<"u"&&(y=_.getEntry(p.entryName)),y)return y}return null}function n(p){const{join:y,normalize:$,sep:b}=t.posix;return y(".",$(b+p.split("\\").join(b)+b))}function m(p){return p instanceof RegExp?function(y){return function($){return y.test($)}}(p):typeof p!="function"?()=>!0:p}const v=(p,y)=>{let $=y.slice(-1);return $=$===E.sep?E.sep:"",t.relative(p,y)+$};return{readFile:function(p,y){var $=h(p);return $&&$.getData(y)||null},childCount:function(p){const y=h(p);if(y)return _.getChildCount(y)},readFileAsync:function(p,y){var $=h(p);$?$.getDataAsync(y):y(null,"getEntry failed for:"+p)},readAsText:function(p,y){var $=h(p);if($){var b=$.getData();if(b&&b.length)return b.toString(y||"utf8")}return""},readAsTextAsync:function(p,y,$){var b=h(p);b?b.getDataAsync(function(N,L){if(L){y(N,L);return}N&&N.length?y(N.toString($||"utf8")):y("")}):y("")},deleteFile:function(p,y=!0){var $=h(p);$&&_.deleteFile($.entryName,y)},deleteEntry:function(p){var y=h(p);y&&_.deleteEntry(y.entryName)},addZipComment:function(p){_.comment=p},getZipComment:function(){return _.comment||""},addZipEntryComment:function(p,y){var $=h(p);$&&($.comment=y)},getZipEntryComment:function(p){var y=h(p);return y&&y.comment||""},updateFile:function(p,y){var $=h(p);$&&$.setData(y)},addLocalFile:function(p,y,$,b){if(E.fs.existsSync(p)){y=y?n(y):"";const N=t.win32.basename(t.win32.normalize(p));y+=$||N;const L=E.fs.statSync(p),F=L.isFile()?E.fs.readFileSync(p):Buffer.alloc(0);L.isDirectory()&&(y+=E.sep),this.addFile(y,F,b,L)}else throw e.Errors.FILE_NOT_FOUND(p)},addLocalFileAsync:function(p,y){p=typeof p=="object"?p:{localPath:p};const $=t.resolve(p.localPath),{comment:b}=p;let{zipPath:N,zipName:L}=p;const F=this;E.fs.stat($,function(H,M){if(H)return y(H,!1);N=N?n(N):"";const U=t.win32.basename(t.win32.normalize($));if(N+=L||U,M.isFile())E.fs.readFile($,function(z,J){return z?y(z,!1):(F.addFile(N,J,b,M),setImmediate(y,void 0,!0))});else if(M.isDirectory())return N+=E.sep,F.addFile(N,Buffer.alloc(0),b,M),setImmediate(y,void 0,!0)})},addLocalFolder:function(p,y,$){if($=m($),y=y?n(y):"",p=t.normalize(p),E.fs.existsSync(p)){const b=E.findFiles(p),N=this;if(b.length)for(const L of b){const F=t.join(y,v(p,L));$(F)&&N.addLocalFile(L,t.dirname(F))}}else throw e.Errors.FILE_NOT_FOUND(p)},addLocalFolderAsync:function(p,y,$,b){b=m(b),$=$?n($):"",p=t.normalize(p);var N=this;E.fs.open(p,"r",function(L){if(L&&L.code==="ENOENT")y(void 0,e.Errors.FILE_NOT_FOUND(p));else if(L)y(void 0,L);else{var F=E.findFiles(p),H=-1,M=function(){if(H+=1,H<F.length){var U=F[H],z=v(p,U).split("\\").join("/");z=z.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),b(z)?E.fs.stat(U,function(J,W){J&&y(void 0,J),W.isFile()?E.fs.readFile(U,function(j,G){j?y(void 0,j):(N.addFile($+z,G,"",W),M())}):(N.addFile($+z+"/",Buffer.alloc(0),"",W),M())}):process.nextTick(()=>{M()})}else y(!0,void 0)};M()}})},addLocalFolderAsync2:function(p,y){const $=this;p=typeof p=="object"?p:{localPath:p},localPath=t.resolve(n(p.localPath));let{zipPath:b,filter:N,namefix:L}=p;N instanceof RegExp?N=function(M){return function(U){return M.test(U)}}(N):typeof N!="function"&&(N=function(){return!0}),b=b?n(b):"",L=="latin1"&&(L=M=>M.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"")),typeof L!="function"&&(L=M=>M);const F=M=>t.join(b,L(v(localPath,M))),H=M=>t.win32.basename(t.win32.normalize(L(M)));E.fs.open(localPath,"r",function(M){M&&M.code==="ENOENT"?y(void 0,e.Errors.FILE_NOT_FOUND(localPath)):M?y(void 0,M):E.findFilesAsync(localPath,function(U,z){if(U)return y(U);z=z.filter(J=>N(F(J))),z.length||y(void 0,!1),setImmediate(z.reverse().reduce(function(J,W){return function(j,G){if(j||G===!1)return setImmediate(J,j,!1);$.addLocalFileAsync({localPath:W,zipPath:t.dirname(F(W)),zipName:H(W)},J)}},y))})})},addLocalFolderPromise:function(p,y){return new Promise(($,b)=>{this.addLocalFolderAsync2(Object.assign({localPath:p},y),(N,L)=>{N&&b(N),L&&$(this)})})},addFile:function(p,y,$,b){p=u(p);let N=h(p);const L=N!=null;L||(N=new f(g),N.entryName=p),N.comment=$||"";const F=typeof b=="object"&&b instanceof E.fs.Stats;F&&(N.header.time=b.mtime);var H=N.isDirectory?16:0;let M=N.isDirectory?16384:32768;return F?M|=4095&b.mode:typeof b=="number"?M|=4095&b:M|=N.isDirectory?493:420,H=(H|M<<16)>>>0,N.attr=H,N.setData(y),L||_.setEntry(N),N},getEntries:function(p){return _.password=p,_?_.entries:[]},getEntry:function(p){return h(p)},getEntryCount:function(){return _.getEntryCount()},forEach:function(p){return _.forEach(p)},extractEntryTo:function(p,y,$,b,N,L){b=d(!1,b),N=d(!1,N),$=d(!0,$),L=i(N,L);var F=h(p);if(!F)throw e.Errors.NO_ENTRY();var H=w(F.entryName),M=R(y,L&&!F.isDirectory?L:$?H:t.basename(H));if(F.isDirectory){var U=_.getEntryChildren(F);return U.forEach(function(W){if(W.isDirectory)return;var j=W.getData();if(!j)throw e.Errors.CANT_EXTRACT_FILE();var G=w(W.entryName),D=R(y,$?G:t.basename(G));const O=N?W.header.fileAttr:void 0;E.writeFileTo(D,j,b,O)}),!0}var z=F.getData(_.password);if(!z)throw e.Errors.CANT_EXTRACT_FILE();if(E.fs.existsSync(M)&&!b)throw e.Errors.CANT_OVERRIDE();const J=N?p.header.fileAttr:void 0;return E.writeFileTo(M,z,b,J),!0},test:function(p){if(!_)return!1;for(var y in _.entries)try{if(y.isDirectory)continue;var $=_.entries[y].getData(p);if(!$)return!1}catch{return!1}return!0},extractAllTo:function(p,y,$,b){if($=d(!1,$),b=i($,b),y=d(!1,y),!_)throw e.Errors.NO_ZIP();_.entries.forEach(function(N){var L=R(p,w(N.entryName));if(N.isDirectory){E.makeDir(L);return}var F=N.getData(b);if(!F)throw e.Errors.CANT_EXTRACT_FILE();const H=$?N.header.fileAttr:void 0;E.writeFileTo(L,F,y,H);try{E.fs.utimesSync(L,N.header.time,N.header.time)}catch{throw e.Errors.CANT_EXTRACT_FILE()}})},extractAllToAsync:function(p,y,$,b){if(b=r(y,$,b),$=d(!1,$),y=d(!1,y),!b)return new Promise((M,U)=>{this.extractAllToAsync(p,y,$,function(z){z?U(z):M(this)})});if(!_){b(e.Errors.NO_ZIP());return}p=t.resolve(p);const N=M=>R(p,t.normalize(w(M.entryName))),L=(M,U)=>new Error(M+': "'+U+'"'),F=[],H=[];_.entries.forEach(M=>{M.isDirectory?F.push(M):H.push(M)});for(const M of F){const U=N(M),z=$?M.header.fileAttr:void 0;try{E.makeDir(U),z&&E.fs.chmodSync(U,z),E.fs.utimesSync(U,M.header.time,M.header.time)}catch{b(L("Unable to create folder",U))}}H.reverse().reduce(function(M,U){return function(z){if(z)M(z);else{const J=t.normalize(w(U.entryName)),W=R(p,J);U.getDataAsync(function(j,G){if(G)M(G);else if(!j)M(e.Errors.CANT_EXTRACT_FILE());else{const D=$?U.header.fileAttr:void 0;E.writeFileToAsync(W,j,y,D,function(O){O||M(L("Unable to write file",W)),E.fs.utimes(W,U.header.time,U.header.time,function(q){q?M(L("Unable to set times",W)):M()})})}})}}},b)()},writeZip:function(p,y){if(arguments.length===1&&typeof p=="function"&&(y=p,p=""),!p&&g.filename&&(p=g.filename),!!p){var $=_.compressToBuffer();if($){var b=E.writeFileTo(p,$,!0);typeof y=="function"&&y(b?null:new Error("failed"),"")}}},writeZipPromise:function(p,y){const{overwrite:$,perm:b}=Object.assign({overwrite:!0},y);return new Promise((N,L)=>{!p&&g.filename&&(p=g.filename),p||L("ADM-ZIP: ZIP File Name Missing"),this.toBufferPromise().then(F=>{const H=M=>M?N(M):L("ADM-ZIP: Wasn't able to write zip file");E.writeFileToAsync(p,F,$,b,H)},L)})},toBufferPromise:function(){return new Promise((p,y)=>{_.toAsyncBuffer(p,y)})},toBuffer:function(p,y,$,b){return typeof p=="function"?(_.toAsyncBuffer(p,y,$,b),null):_.compressToBuffer()}}},Hi}var yp=pp();const Xl=tf(yp);class wt{constructor(t,f){this.bw=t,this.version=f;const s=wt.#d;this.#s=process.platform==="win32",t.webContents.on("devtools-opened",()=>this.#l()),s.handle("openDevTools",()=>t.webContents.openDevTools()),this.#h.getVersion=f,s.handle("getInfo",()=>this.#h),s.handle("inited",(i,r,a)=>this.#p(r,a)),s.handle("fetch",async(i,r)=>{const a=await fetch(r,{cache:"no-store"});return{ok:a.ok,txt:await a.text()}}),s.handle("fetchAb",async(i,r)=>{const a=await fetch(r,{cache:"no-store"});return{ok:a.ok,ab:await a.arrayBuffer()}}),s.handle("existsSync",(i,r)=>be.existsSync(r)),s.handle("copy",(i,r,a)=>be.copy(r,a)),s.handle("remove",(i,r)=>be.remove(r)),s.handle("ensureFile",(i,r)=>be.ensureFile(r)),s.handle("readFile",(i,r,a)=>be.readFile(r,a)),s.handle("writeFile",(i,r,a,o)=>be.writeFile(r,a,o)),s.handle("appendFile",(i,r,a)=>be.appendFile(r,a).catch(o=>console.error(o))),s.handle("outputFile",(i,r,a)=>be.outputFile(r,a).catch(o=>console.error(o))),s.handle("win_close",()=>t.close()),s.handle("win_setTitle",(i,r)=>t.setTitle(r)),s.handle("showMessageBox",(i,r)=>Pe.dialog.showMessageBox(t,r)),s.handle("showOpenDialog",(i,r)=>Pe.dialog.showOpenDialog(t,r)),s.handle("capturePage",(i,r,a,o)=>t.webContents.capturePage().then(async l=>{await be.ensureFile(r);const c=l.resize({width:a,height:o,quality:"best"}),g=r.endsWith(".png")?c.toPNG():c.toJPEG(80);await be.writeFile(r,g)})),s.handle("navigate_to",(i,r)=>Pe.shell.openExternal(r));let d;s.handle("Store",(i,r)=>{d=new Ll(r)}),s.handle("flush",(i,r)=>{d.store=r}),s.handle("Store_isEmpty",()=>d.size===0),s.handle("Store_get",()=>d.store),s.handle("zip",async(i,r,a)=>{const o=new Xl;o.addLocalFolder(r),await o.writeZipPromise(a)}),s.handle("unzip",async(i,r,a)=>{await be.remove(a),await be.ensureDir(a),new Xl(r).extractAllTo(a,!0)}),s.handle("isSimpleFullScreen",()=>t.simpleFullScreen),this.#s?(s.handle("setSimpleFullScreen",(i,r)=>{this.#e=()=>{},t.setSimpleFullScreen(r),r||(t.setPosition(this.#c,this.#u),t.setContentSize(this.#i,this.#o)),this.#e=()=>this.#r()}),t.on("enter-full-screen",()=>{this.#e=()=>{},t.setContentSize(this.#t.width,this.#t.height),this.#e=()=>this.#r()}),t.on("leave-full-screen",()=>{this.#a(!1,this.#c,this.#u,this.#i,this.#o)})):s.handle("setSimpleFullScreen",(i,r)=>{t.setSimpleFullScreen(r),!r&&t.setContentSize(this.#i,this.#o)}),s.handle("window",(i,r,a,o,l,c)=>this.#a(r,a,o,l,c)),t.on("move",()=>this.#e()),t.on("resize",()=>this.#e()),this.#m()}static init(t){wt.#d=t,Ll.initRenderer()}static#d;#s;#h={getAppPath:Pe.app.getAppPath(),isPackaged:Pe.app.isPackaged,downloads:Pe.app.getPath("downloads"),userData:Pe.app.getPath("userData"),getVersion:"",env:{...process.env},platform:process.platform,arch:process.arch};#c=0;#u=0;#i=0;#o=0;#p(t,f){const{width:s,height:d}=t.window,{c:i,x:r,y:a,w:o}=f;this.#n=s/d;const l=o===s?d:o/this.#n;if(this.#s||this.bw.setAspectRatio(this.#n),this.#a(i,r,a,o,l),this.bw.show(),this.#e=()=>this.#r(),t.debug.devtool){this.#l=()=>{},this.openDevTools=()=>this.bw.webContents.openDevTools({mode:"detach"}),this.openDevTools();return}this.#l=()=>{this.bw.webContents.closeDevTools(),this.bw.setTitle("DevToolは禁止されています。許可する場合は【プロジェクト設定】の【devtool】をONに。"),this.sendShutdown()}}#n=0;#l=()=>this.bw.webContents.closeDevTools();#m(){const t=Pe.screen.getCursorScreenPoint(),f=Pe.screen.getDisplayNearestPoint(t);this.#t=f.workAreaSize}#t;#e=()=>{};#r(){if(this.#f)return;this.#e=()=>{};const[t,f]=this.bw.getPosition(),[s,d]=this.bw.getContentSize();this.#f=setTimeout(()=>{this.#f=void 0;const[i=0,r=0]=this.bw.getPosition(),[a=0,o=0]=this.bw.getContentSize();if(t!==i||f!==r||s!==a||d!==o){this.#r();return}this.#e=()=>this.#r();let l=a,c=o;this.#s&&(s===a?c=a/this.#n:l=o*this.#n),this.#a(!1,i,r,l,c)},1e3/60*10)}#f=void 0;#a(t,f,s,d,i){if(this.bw.simpleFullScreen)return;console.log(`fn:appMain.ts window c:${String(t)} (${String(f)},${String(s)},${String(d)},${String(i)}) scr(${String(this.#t.width)},${String(this.#t.height)})`),this.#e=()=>{};const r=this.#c=Math.round(t?(this.#t.width-d)*.5:f),a=this.#u=Math.round(t?(this.#t.height-i)*.5:s);this.bw.setPosition(r,a);const o=this.#i=Math.round(d),l=this.#o=Math.round(i);this.bw.setContentSize(o,l),t||this.#m(),this.sendSaveWinInf({x:r,y:a,w:o,h:l}),this.#e=()=>this.#r()}sendShutdown(){}sendSaveWinInf(t){}openDevTools=()=>{}}class kn extends wt{static initRenderer(t,f,s){let d,i=()=>{};try{wt.init(Pe.ipcMain),d=new Pe.BrowserWindow({show:!1,minWidth:300,minHeight:300,acceptFirstMouse:!0,maximizable:!1,webPreferences:{nodeIntegration:!1,contextIsolation:!0,preload:`${__dirname}/preload.js`}}),console.log=a=>d.webContents.send("log",a);const r=new kn(d,f);i=()=>r.openDevTools(),d.loadFile(t)}catch(r){throw console.error(`early err:${String(r)}`),i(),"initRenderer error"}return d}sendShutdown(){this.bw.webContents.send("shutdown")}sendSaveWinInf(t){this.bw.webContents.send("save_win_inf",t)}}module.exports=kn;exports.appMain=kn;
23
- //# sourceMappingURL=appMain.js.map
6
+ see https://github.com/jprichardson/node-fs-extra/issues/269`,`Warning`,`fs-extra-WARN0002`);let{srcStat:s,destStat:l}=o.checkPathsSync(e,t,`copy`,a);if(o.checkParentPathsSync(e,s,t,`copy`),a.filter&&!a.filter(e,t))return;let u=r.dirname(t);return n.existsSync(u)||i(u),c(l,e,t,a)}function c(e,t,r,i){let a=(i.dereference?n.statSync:n.lstatSync)(t);if(a.isDirectory())return _(a,e,t,r,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return l(a,e,t,r,i);if(a.isSymbolicLink())return x(e,t,r,i);throw a.isSocket()?Error(`Cannot copy a socket file: ${t}`):a.isFIFO()?Error(`Cannot copy a FIFO pipe: ${t}`):Error(`Unknown file: ${t}`)}function l(e,t,n,r,i){return t?u(e,n,r,i):d(e,n,r,i)}function u(e,t,r,i){if(i.overwrite)return n.unlinkSync(r),d(e,t,r,i);if(i.errorOnExist)throw Error(`'${r}' already exists`)}function d(e,t,r,i){return n.copyFileSync(t,r),i.preserveTimestamps&&f(e.mode,t,r),h(r,e.mode)}function f(e,t,n){return p(e)&&m(n,e),g(t,n)}function p(e){return(e&128)==0}function m(e,t){return h(e,t|128)}function h(e,t){return n.chmodSync(e,t)}function g(e,t){let r=n.statSync(e);return a(t,r.atime,r.mtime)}function _(e,t,n,r,i){return t?y(n,r,i):v(e.mode,n,r,i)}function v(e,t,r,i){return n.mkdirSync(r),y(t,r,i),h(r,e)}function y(e,t,r){let i=n.opendirSync(e);try{let n;for(;(n=i.readSync())!==null;)b(n.name,e,t,r)}finally{i.closeSync()}}function b(e,t,n,i){let a=r.join(t,e),s=r.join(n,e);if(i.filter&&!i.filter(a,s))return;let{destStat:l}=o.checkPathsSync(a,s,`copy`,i);return c(l,a,s,i)}function x(e,t,i,a){let s=n.readlinkSync(t);if(a.dereference&&(s=r.resolve(process.cwd(),s)),e){let e;try{e=n.readlinkSync(i)}catch(e){if(e.code===`EINVAL`||e.code===`UNKNOWN`)return n.symlinkSync(s,i);throw e}if(a.dereference&&(e=r.resolve(process.cwd(),e)),o.isSrcSubdir(s,e))throw Error(`Cannot copy '${s}' to a subdirectory of itself, '${e}'.`);if(o.isSrcSubdir(e,s))throw Error(`Cannot overwrite '${e}' with '${s}'.`);return S(s,i)}else return n.symlinkSync(s,i)}function S(e,t){return n.unlinkSync(t),n.symlinkSync(e,t)}t.exports=s})),F=s(((e,t)=>{var n=b().fromPromise;t.exports={copy:n(N()),copySync:P()}})),I=s(((e,t)=>{var n=w(),r=b().fromCallback;function i(e,t){n.rm(e,{recursive:!0,force:!0},t)}function a(e){n.rmSync(e,{recursive:!0,force:!0})}t.exports={remove:r(i),removeSync:a}})),L=s(((e,t)=>{var n=b().fromPromise,r=T(),i=require(`path`),a=O(),o=I(),s=n(async function(e){let t;try{t=await r.readdir(e)}catch{return a.mkdirs(e)}return Promise.all(t.map(t=>o.remove(i.join(e,t))))});function c(e){let t;try{t=r.readdirSync(e)}catch{return a.mkdirsSync(e)}t.forEach(t=>{t=i.join(e,t),o.removeSync(t)})}t.exports={emptyDirSync:c,emptydirSync:c,emptyDir:s,emptydir:s}})),ee=s(((e,t)=>{var n=b().fromPromise,r=require(`path`),i=T(),a=O();async function o(e){let t;try{t=await i.stat(e)}catch{}if(t&&t.isFile())return;let n=r.dirname(e),o=null;try{o=await i.stat(n)}catch(t){if(t.code===`ENOENT`){await a.mkdirs(n),await i.writeFile(e,``);return}else throw t}o.isDirectory()?await i.writeFile(e,``):await i.readdir(n)}function s(e){let t;try{t=i.statSync(e)}catch{}if(t&&t.isFile())return;let n=r.dirname(e);try{i.statSync(n).isDirectory()||i.readdirSync(n)}catch(e){if(e&&e.code===`ENOENT`)a.mkdirsSync(n);else throw e}i.writeFileSync(e,``)}t.exports={createFile:n(o),createFileSync:s}})),te=s(((e,t)=>{var n=b().fromPromise,r=require(`path`),i=T(),a=O(),{pathExists:o}=k(),{areIdentical:s}=j();async function c(e,t){let n;try{n=await i.lstat(t)}catch{}let c;try{c=await i.lstat(e)}catch(e){throw e.message=e.message.replace(`lstat`,`ensureLink`),e}if(n&&s(c,n))return;let l=r.dirname(t);await o(l)||await a.mkdirs(l),await i.link(e,t)}function l(e,t){let n;try{n=i.lstatSync(t)}catch{}try{let t=i.lstatSync(e);if(n&&s(t,n))return}catch(e){throw e.message=e.message.replace(`lstat`,`ensureLink`),e}let o=r.dirname(t);return i.existsSync(o)||a.mkdirsSync(o),i.linkSync(e,t)}t.exports={createLink:n(c),createLinkSync:l}})),ne=s(((e,t)=>{var n=require(`path`),r=T(),{pathExists:i}=k(),a=b().fromPromise;async function o(e,t){if(n.isAbsolute(e)){try{await r.lstat(e)}catch(e){throw e.message=e.message.replace(`lstat`,`ensureSymlink`),e}return{toCwd:e,toDst:e}}let a=n.dirname(t),o=n.join(a,e);if(await i(o))return{toCwd:o,toDst:e};try{await r.lstat(e)}catch(e){throw e.message=e.message.replace(`lstat`,`ensureSymlink`),e}return{toCwd:e,toDst:n.relative(a,e)}}function s(e,t){if(n.isAbsolute(e)){if(!r.existsSync(e))throw Error(`absolute srcpath does not exist`);return{toCwd:e,toDst:e}}let i=n.dirname(t),a=n.join(i,e);if(r.existsSync(a))return{toCwd:a,toDst:e};if(!r.existsSync(e))throw Error(`relative srcpath does not exist`);return{toCwd:e,toDst:n.relative(i,e)}}t.exports={symlinkPaths:a(o),symlinkPathsSync:s}})),re=s(((e,t)=>{var n=T(),r=b().fromPromise;async function i(e,t){if(t)return t;let r;try{r=await n.lstat(e)}catch{return`file`}return r&&r.isDirectory()?`dir`:`file`}function a(e,t){if(t)return t;let r;try{r=n.lstatSync(e)}catch{return`file`}return r&&r.isDirectory()?`dir`:`file`}t.exports={symlinkType:r(i),symlinkTypeSync:a}})),ie=s(((e,t)=>{var n=b().fromPromise,r=require(`path`),i=T(),{mkdirs:a,mkdirsSync:o}=O(),{symlinkPaths:s,symlinkPathsSync:c}=ne(),{symlinkType:l,symlinkTypeSync:u}=re(),{pathExists:d}=k(),{areIdentical:f}=j();async function p(e,t,n){let o;try{o=await i.lstat(t)}catch{}if(o&&o.isSymbolicLink()){let[n,r]=await Promise.all([i.stat(e),i.stat(t)]);if(f(n,r))return}let c=await s(e,t);e=c.toDst;let u=await l(c.toCwd,n),p=r.dirname(t);return await d(p)||await a(p),i.symlink(e,t,u)}function m(e,t,n){let a;try{a=i.lstatSync(t)}catch{}if(a&&a.isSymbolicLink()&&f(i.statSync(e),i.statSync(t)))return;let s=c(e,t);e=s.toDst,n=u(s.toCwd,n);let l=r.dirname(t);return i.existsSync(l)||o(l),i.symlinkSync(e,t,n)}t.exports={createSymlink:n(p),createSymlinkSync:m}})),ae=s(((e,t)=>{var{createFile:n,createFileSync:r}=ee(),{createLink:i,createLinkSync:a}=te(),{createSymlink:o,createSymlinkSync:s}=ie();t.exports={createFile:n,createFileSync:r,ensureFile:n,ensureFileSync:r,createLink:i,createLinkSync:a,ensureLink:i,ensureLinkSync:a,createSymlink:o,createSymlinkSync:s,ensureSymlink:o,ensureSymlinkSync:s}})),oe=s(((e,t)=>{function n(e,{EOL:t=`
7
+ `,finalEOL:n=!0,replacer:r=null,spaces:i}={}){let a=n?t:``;return JSON.stringify(e,r,i).replace(/\n/g,t)+a}function r(e){return Buffer.isBuffer(e)&&(e=e.toString(`utf8`)),e.replace(/^\uFEFF/,``)}t.exports={stringify:n,stripBom:r}})),se=s(((e,t)=>{var n;try{n=w()}catch{n=require(`fs`)}var r=b(),{stringify:i,stripBom:a}=oe();async function o(e,t={}){typeof t==`string`&&(t={encoding:t});let i=t.fs||n,o=`throws`in t?t.throws:!0,s=await r.fromCallback(i.readFile)(e,t);s=a(s);let c;try{c=JSON.parse(s,t?t.reviver:null)}catch(t){if(o)throw t.message=`${e}: ${t.message}`,t;return null}return c}var s=r.fromPromise(o);function c(e,t={}){typeof t==`string`&&(t={encoding:t});let r=t.fs||n,i=`throws`in t?t.throws:!0;try{let n=r.readFileSync(e,t);return n=a(n),JSON.parse(n,t.reviver)}catch(t){if(i)throw t.message=`${e}: ${t.message}`,t;return null}}async function l(e,t,a={}){let o=a.fs||n,s=i(t,a);await r.fromCallback(o.writeFile)(e,s,a)}var u=r.fromPromise(l);function d(e,t,r={}){let a=r.fs||n,o=i(t,r);return a.writeFileSync(e,o,r)}t.exports={readFile:s,readFileSync:c,writeFile:u,writeFileSync:d}})),ce=s(((e,t)=>{var n=se();t.exports={readJson:n.readFile,readJsonSync:n.readFileSync,writeJson:n.writeFile,writeJsonSync:n.writeFileSync}})),le=s(((e,t)=>{var n=b().fromPromise,r=T(),i=require(`path`),a=O(),o=k().pathExists;async function s(e,t,n=`utf-8`){let s=i.dirname(e);return await o(s)||await a.mkdirs(s),r.writeFile(e,t,n)}function c(e,...t){let n=i.dirname(e);r.existsSync(n)||a.mkdirsSync(n),r.writeFileSync(e,...t)}t.exports={outputFile:n(s),outputFileSync:c}})),ue=s(((e,t)=>{var{stringify:n}=oe(),{outputFile:r}=le();async function i(e,t,i={}){await r(e,n(t,i),i)}t.exports=i})),de=s(((e,t)=>{var{stringify:n}=oe(),{outputFileSync:r}=le();function i(e,t,i){r(e,n(t,i),i)}t.exports=i})),fe=s(((e,t)=>{var n=b().fromPromise,r=ce();r.outputJson=n(ue()),r.outputJsonSync=de(),r.outputJSON=r.outputJson,r.outputJSONSync=r.outputJsonSync,r.writeJSON=r.writeJson,r.writeJSONSync=r.writeJsonSync,r.readJSON=r.readJson,r.readJSONSync=r.readJsonSync,t.exports=r})),pe=s(((e,t)=>{var n=T(),r=require(`path`),{copy:i}=F(),{remove:a}=I(),{mkdirp:o}=O(),{pathExists:s}=k(),c=j();async function l(e,t,n={}){let i=n.overwrite||n.clobber||!1,{srcStat:a,isChangingCase:s=!1}=await c.checkPaths(e,t,`move`,n);await c.checkParentPaths(e,a,t,`move`);let l=r.dirname(t);return r.parse(l).root!==l&&await o(l),u(e,t,i,s)}async function u(e,t,r,i){if(!i){if(r)await a(t);else if(await s(t))throw Error(`dest already exists.`)}try{await n.rename(e,t)}catch(n){if(n.code!==`EXDEV`)throw n;await d(e,t,r)}}async function d(e,t,n){return await i(e,t,{overwrite:n,errorOnExist:!0,preserveTimestamps:!0}),a(e)}t.exports=l})),me=s(((e,t)=>{var n=w(),r=require(`path`),i=F().copySync,a=I().removeSync,o=O().mkdirpSync,s=j();function c(e,t,n){n||={};let i=n.overwrite||n.clobber||!1,{srcStat:a,isChangingCase:c=!1}=s.checkPathsSync(e,t,`move`,n);return s.checkParentPathsSync(e,a,t,`move`),l(t)||o(r.dirname(t)),u(e,t,i,c)}function l(e){let t=r.dirname(e);return r.parse(t).root===t}function u(e,t,r,i){if(i)return d(e,t,r);if(r)return a(t),d(e,t,r);if(n.existsSync(t))throw Error(`dest already exists.`);return d(e,t,r)}function d(e,t,r){try{n.renameSync(e,t)}catch(n){if(n.code!==`EXDEV`)throw n;return f(e,t,r)}}function f(e,t,n){return i(e,t,{overwrite:n,errorOnExist:!0,preserveTimestamps:!0}),a(e)}t.exports=c})),he=s(((e,t)=>{var n=b().fromPromise;t.exports={move:n(pe()),moveSync:me()}})),ge=s(((e,t)=>{t.exports={...T(),...F(),...L(),...ae(),...fe(),...O(),...he(),...le(),...k(),...I()}})),R=ge(),_e=e=>{let t=typeof e;return e!==null&&(t===`object`||t===`function`)},ve=new Set([`__proto__`,`prototype`,`constructor`]),ye=1e6,be=e=>e>=`0`&&e<=`9`;function xe(e){if(e===`0`)return!0;if(/^[1-9]\d*$/.test(e)){let t=Number.parseInt(e,10);return t<=2**53-1&&t<=ye}return!1}function Se(e,t){return ve.has(e)?!1:(e&&xe(e)?t.push(Number.parseInt(e,10)):t.push(e),!0)}function Ce(e){if(typeof e!=`string`)throw TypeError(`Expected a string, got ${typeof e}`);let t=[],n=``,r=`start`,i=!1,a=0;for(let o of e){if(a++,i){n+=o,i=!1;continue}if(o===`\\`){if(r===`index`)throw Error(`Invalid character '${o}' in an index at position ${a}`);if(r===`indexEnd`)throw Error(`Invalid character '${o}' after an index at position ${a}`);i=!0,r=r===`start`?`property`:r;continue}switch(o){case`.`:if(r===`index`)throw Error(`Invalid character '${o}' in an index at position ${a}`);if(r===`indexEnd`){r=`property`;break}if(!Se(n,t))return[];n=``,r=`property`;break;case`[`:if(r===`index`)throw Error(`Invalid character '${o}' in an index at position ${a}`);if(r===`indexEnd`){r=`index`;break}if(r===`property`||r===`start`){if((n||r===`property`)&&!Se(n,t))return[];n=``}r=`index`;break;case`]`:if(r===`index`){if(n===``)n=(t.pop()||``)+`[]`,r=`property`;else{let e=Number.parseInt(n,10);!Number.isNaN(e)&&Number.isFinite(e)&&e>=0&&e<=2**53-1&&e<=ye&&n===String(e)?t.push(e):t.push(n),n=``,r=`indexEnd`}break}if(r===`indexEnd`)throw Error(`Invalid character '${o}' after an index at position ${a}`);n+=o;break;default:if(r===`index`&&!be(o))throw Error(`Invalid character '${o}' in an index at position ${a}`);if(r===`indexEnd`)throw Error(`Invalid character '${o}' after an index at position ${a}`);r===`start`&&(r=`property`),n+=o}}switch(i&&(n+=`\\`),r){case`property`:if(!Se(n,t))return[];break;case`index`:throw Error(`Index was not closed`);case`start`:t.push(``);break}return t}function we(e){if(typeof e==`string`)return Ce(e);if(Array.isArray(e)){let t=[];for(let[n,r]of e.entries()){if(typeof r!=`string`&&typeof r!=`number`)throw TypeError(`Expected a string or number for path segment at index ${n}, got ${typeof r}`);if(typeof r==`number`&&!Number.isFinite(r))throw TypeError(`Path segment at index ${n} must be a finite number, got ${r}`);if(ve.has(r))return[];typeof r==`string`&&xe(r)?t.push(Number.parseInt(r,10)):t.push(r)}return t}return[]}function Te(e,t,n){if(!_e(e)||typeof t!=`string`&&!Array.isArray(t))return n===void 0?e:n;let r=we(t);if(r.length===0)return n;for(let t=0;t<r.length;t++){let i=r[t];if(e=e[i],e==null){if(t!==r.length-1)return n;break}}return e===void 0?n:e}function Ee(e,t,n){if(!_e(e)||typeof t!=`string`&&!Array.isArray(t))return e;let r=e,i=we(t);if(i.length===0)return e;for(let t=0;t<i.length;t++){let r=i[t];if(t===i.length-1)e[r]=n;else if(!_e(e[r])){let n=typeof i[t+1]==`number`;e[r]=n?[]:{}}e=e[r]}return r}function De(e,t){if(!_e(e)||typeof t!=`string`&&!Array.isArray(t))return!1;let n=we(t);if(n.length===0)return!1;for(let t=0;t<n.length;t++){let r=n[t];if(t===n.length-1)return Object.hasOwn(e,r)?(delete e[r],!0):!1;if(e=e[r],!_e(e))return!1}}function Oe(e,t){if(!_e(e)||typeof t!=`string`&&!Array.isArray(t))return!1;let n=we(t);if(n.length===0)return!1;for(let t of n){if(!_e(e)||!(t in e))return!1;e=e[t]}return!0}var ke=y.default.homedir(),Ae=y.default.tmpdir(),{env:je}=p.default,Me=e=>{let t=m.default.join(ke,`Library`);return{data:m.default.join(t,`Application Support`,e),config:m.default.join(t,`Preferences`,e),cache:m.default.join(t,`Caches`,e),log:m.default.join(t,`Logs`,e),temp:m.default.join(Ae,e)}},Ne=e=>{let t=je.APPDATA||m.default.join(ke,`AppData`,`Roaming`),n=je.LOCALAPPDATA||m.default.join(ke,`AppData`,`Local`);return{data:m.default.join(n,e,`Data`),config:m.default.join(t,e,`Config`),cache:m.default.join(n,e,`Cache`),log:m.default.join(n,e,`Log`),temp:m.default.join(Ae,e)}},Pe=e=>{let t=m.default.basename(ke);return{data:m.default.join(je.XDG_DATA_HOME||m.default.join(ke,`.local`,`share`),e),config:m.default.join(je.XDG_CONFIG_HOME||m.default.join(ke,`.config`),e),cache:m.default.join(je.XDG_CACHE_HOME||m.default.join(ke,`.cache`),e),log:m.default.join(je.XDG_STATE_HOME||m.default.join(ke,`.local`,`state`),e),temp:m.default.join(Ae,t,e)}};function Fe(e,{suffix:t=`nodejs`}={}){if(typeof e!=`string`)throw TypeError(`Expected a string, got ${typeof e}`);return t&&(e+=`-${t}`),p.default.platform===`darwin`?Me(e):p.default.platform===`win32`?Ne(e):Pe(e)}var Ie=(e,t)=>{let{onError:n}=t;return function(...t){return e.apply(void 0,t).catch(n)}},Le=Ie,Re=(e,t)=>{let{onError:n}=t;return function(...t){try{return e.apply(void 0,t)}catch(e){return n(e)}}},z=Re,ze=250,Be=(e,t)=>{let{isRetriable:n}=t;return function(t){let{timeout:r}=t,i=t.interval??250,a=Date.now()+r;return function t(...r){return e.apply(void 0,r).catch(e=>{if(!n(e)||Date.now()>=a)throw e;let o=Math.round(i*Math.random());return o>0?new Promise(e=>setTimeout(e,o)).then(()=>t.apply(void 0,r)):t.apply(void 0,r)})}}},Ve=Be,He=(e,t)=>{let{isRetriable:n}=t;return function(t){let{timeout:r}=t,i=Date.now()+r;return function(...t){for(;;)try{return e.apply(void 0,t)}catch(e){if(!n(e)||Date.now()>=i)throw e;continue}}}},Ue=He,We={isChangeErrorOk:e=>{if(!We.isNodeError(e))return!1;let{code:t}=e;return t===`ENOSYS`||!qe&&(t===`EINVAL`||t===`EPERM`)},isNodeError:e=>e instanceof Error,isRetriableError:e=>{if(!We.isNodeError(e))return!1;let{code:t}=e;return t===`EMFILE`||t===`ENFILE`||t===`EAGAIN`||t===`EBUSY`||t===`EACCESS`||t===`EACCES`||t===`EACCS`||t===`EPERM`},onChangeError:e=>{if(!We.isNodeError(e)||!We.isChangeErrorOk(e))throw e}},Ge=We,Ke={onError:Ge.onChangeError},B={onError:()=>void 0},qe=p.default.getuid?!p.default.getuid():!1,V={isRetriable:Ge.isRetriableError},Je={attempt:{chmod:Le((0,h.promisify)(g.default.chmod),Ke),chown:Le((0,h.promisify)(g.default.chown),Ke),close:Le((0,h.promisify)(g.default.close),B),fsync:Le((0,h.promisify)(g.default.fsync),B),mkdir:Le((0,h.promisify)(g.default.mkdir),B),realpath:Le((0,h.promisify)(g.default.realpath),B),stat:Le((0,h.promisify)(g.default.stat),B),unlink:Le((0,h.promisify)(g.default.unlink),B),chmodSync:z(g.default.chmodSync,Ke),chownSync:z(g.default.chownSync,Ke),closeSync:z(g.default.closeSync,B),existsSync:z(g.default.existsSync,B),fsyncSync:z(g.default.fsync,B),mkdirSync:z(g.default.mkdirSync,B),realpathSync:z(g.default.realpathSync,B),statSync:z(g.default.statSync,B),unlinkSync:z(g.default.unlinkSync,B)},retry:{close:Ve((0,h.promisify)(g.default.close),V),fsync:Ve((0,h.promisify)(g.default.fsync),V),open:Ve((0,h.promisify)(g.default.open),V),readFile:Ve((0,h.promisify)(g.default.readFile),V),rename:Ve((0,h.promisify)(g.default.rename),V),stat:Ve((0,h.promisify)(g.default.stat),V),write:Ve((0,h.promisify)(g.default.write),V),writeFile:Ve((0,h.promisify)(g.default.writeFile),V),closeSync:Ue(g.default.closeSync,V),fsyncSync:Ue(g.default.fsyncSync,V),openSync:Ue(g.default.openSync,V),readFileSync:Ue(g.default.readFileSync,V),renameSync:Ue(g.default.renameSync,V),statSync:Ue(g.default.statSync,V),writeSync:Ue(g.default.writeSync,V),writeFileSync:Ue(g.default.writeFileSync,V)}},H=Je,Ye=`utf8`,Xe=438,Ze=511,Qe={},$e=p.default.geteuid?p.default.geteuid():-1,et=p.default.getegid?p.default.getegid():-1,tt=1e3,nt=!!p.default.getuid,rt=p.default.getuid?!p.default.getuid():!1,it=128,at=e=>e instanceof Error&&`code`in e,ot=e=>typeof e==`string`,st=e=>e===void 0,ct=class{constructor(){this.callbacks=new Set,this.exit=()=>{for(let e of this.callbacks)e()},this.hook=()=>{window.addEventListener(`beforeunload`,this.exit)},this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}},lt=new ct,ut=lt.register,dt=ut,U={store:{},create:e=>{let t=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6);return`${e}${`.tmp-${Date.now().toString().slice(-10)}${t}`}`},get:(e,t,n=!0)=>{let r=U.truncate(t(e));return r in U.store?U.get(e,t,n):(U.store[r]=n,[r,()=>delete U.store[r]])},purge:e=>{U.store[e]&&(delete U.store[e],H.attempt.unlink(e))},purgeSync:e=>{U.store[e]&&(delete U.store[e],H.attempt.unlinkSync(e))},purgeSyncAll:()=>{for(let e in U.store)U.purgeSync(e)},truncate:e=>{let t=m.default.basename(e);if(t.length<=128)return e;let n=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(t);if(!n)return e;let r=t.length-128;return`${e.slice(0,-t.length)}${n[1]}${n[2].slice(0,-r)}${n[3]}`}};dt(U.purgeSyncAll);var ft=U;function pt(e,t,n=Qe){if(ot(n))return pt(e,t,{encoding:n});let r={timeout:n.timeout??1e3},i=null,a=null,o=null;try{let s=H.attempt.realpathSync(e),c=!!s;e=s||e,[a,i]=ft.get(e,n.tmpCreate||ft.create,n.tmpPurge!==!1);let l=nt&&st(n.chown),u=st(n.mode);if(c&&(l||u)){let t=H.attempt.statSync(e);t&&(n={...n},l&&(n.chown={uid:t.uid,gid:t.gid}),u&&(n.mode=t.mode))}if(!c){let t=m.default.dirname(e);H.attempt.mkdirSync(t,{mode:511,recursive:!0})}o=H.retry.openSync(r)(a,`w`,n.mode||438),n.tmpCreated&&n.tmpCreated(a),ot(t)?H.retry.writeSync(r)(o,t,0,n.encoding||`utf8`):st(t)||H.retry.writeSync(r)(o,t,0,t.length,0),n.fsync!==!1&&(n.fsyncWait===!1?H.attempt.fsync(o):H.retry.fsyncSync(r)(o)),H.retry.closeSync(r)(o),o=null,n.chown&&(n.chown.uid!==$e||n.chown.gid!==et)&&H.attempt.chownSync(a,n.chown.uid,n.chown.gid),n.mode&&n.mode!==438&&H.attempt.chmodSync(a,n.mode);try{H.retry.renameSync(r)(a,e)}catch(t){if(!at(t)||t.code!==`ENAMETOOLONG`)throw t;H.retry.renameSync(r)(a,ft.truncate(e))}i(),a=null}finally{o&&H.attempt.closeSync(o),a&&ft.purge(a)}}var mt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),ht=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=mt(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),W=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=mt(),n=ht(),r=mt();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,`strConcat`,{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,`getProperty`,{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,`regexpCode`,{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return r.Name}});var i=ht();Object.defineProperty(e,`Scope`,{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,`ValueScope`,{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,`ValueScopeName`,{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,`varKinds`,{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=k(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=k(this.rhs,e,n),this}get names(){return O(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=k(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(A(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>D(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(j(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=k(this.condition,e,t),this}get names(){let e=super.names;return O(e,this.condition),this.else&&D(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=k(this.iteration,e,t),this}get names(){return D(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return O(O(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=k(this.iterable,e,t),this}get names(){return D(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&D(e,this.catch.names),this.finally&&D(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var E=class extends m{render(e){return`finally`+super.render(e)}};E.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
8
+ `:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new w;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new T(e),t(e)}return n&&(this._currNode=r.finally=new E,this.code(n)),this._endBlockNode(T,E)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function D(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function O(e,n){return n instanceof t._CodeOrName?D(e,n.names):e}function k(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function A(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function j(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${L(e)}`}e.not=j;var M=I(e.operators.AND);function N(...e){return e.reduce(M)}e.and=N;var P=I(e.operators.OR);function F(...e){return e.reduce(P)}e.or=F;function I(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${L(n)} ${e} ${L(r)}`}function L(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),G=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=W(),n=mt();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0?!0:(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0?!0:(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;var _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),K=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),gt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=W(),n=G(),r=K();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var u={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),_t=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=gt(),n=W(),r=K(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),vt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),yt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),bt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=vt(),n=yt(),r=gt(),i=W(),a=G(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;var u=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
9
+ || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
10
+ || (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
11
+ || ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function p({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function m(e,t,n,r=o.Correct){let a=r===o.Correct?i.operators.EQ:i.operators.NEQ,s;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:s=(0,i._)`Array.isArray(${t})`;break;case`object`:s=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:s=c((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:s=c();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===o.Correct?s:(0,i.not)(s);function c(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=m;function h(e,t,n,r){if(e.length===1)return m(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;for(let e in s.number&&delete s.integer,s)o=(0,i.and)(o,m(e,t,n,r));return o}e.checkDataTypes=h;var g={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function _(e){let t=v(e);(0,r.reportError)(t,g)}e.reportTypeError=_;function v(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),xt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.assignDefaults=void 0;var t=W(),n=G();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),q=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;var t=W(),n=G(),r=K(),i=G();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(d(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function o({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(d(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=o;function s(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=s;function c(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function l(e,n,r){return(0,t._)`${c(e)}.call(${n}, ${r})`}e.isOwnProperty=l;function u(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${l(e,n,r)}`:a}e.propertyInData=u;function d(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(l(e,n,r))):a}e.noPropertyInData=d;function f(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=f;function p(e,t){return f(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=p;function m({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=m;var h=(0,t._)`new RegExp`;function g({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?h:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=g;function _(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=_;function v(e){let{gen:r,schema:i,keyword:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=v})),St=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=W(),n=K(),r=q(),i=gt();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=u(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let d=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}e.macroKeywordCode=a;function o(e,i){let{gen:a,keyword:o,schema:d,parentSchema:f,$data:p,it:m}=e;l(m,i);let h=u(a,o,!p&&i.compile?i.compile.call(m.self,d,f,m):i.validate),g=a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&s(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&s(e),x(()=>c(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!p||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=o;function s(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function c(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function l({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function u(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function d(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=d;function f({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=f})),Ct=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=W(),n=G();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),wt=s(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),Tt=s(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h<m.length;h++)r(e,t,a,m[h],s+`/`+p+`/`+h,c,s,p,o,h)}else if(p in n.propsKeywords){if(m&&typeof m==`object`)for(var g in m)r(e,t,a,m[g],s+`/`+p+`/`+i(g),c,s,p,o,g)}else (p in n.keywords||e.allKeys&&!(p in n.skipKeywords))&&r(e,t,a,m,s+`/`+p,c,s,p,o)}a(o,s,c,l,u,d,f)}}function i(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}})),Et=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=G(),n=wt(),r=Tt(),i=new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function a(e,t=!0){return typeof e==`boolean`?!0:t===!0?!s(e):t?c(e)<=t:!1}e.inlineRef=a;var o=new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function s(e){for(let t in e){if(o.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(s)||typeof n==`object`&&s(n))return!0}return!1}function c(e){let n=0;for(let r in e)if(r===`$ref`||(n++,!i.has(r)&&(typeof e[r]==`object`&&(0,t.eachItem)(e[r],e=>n+=c(e)),n===1/0)))return 1/0;return n}function l(e,t=``,n){return n!==!1&&(t=f(t)),u(e,e.parse(t))}e.getFullPath=l;function u(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=u;var d=/#\/?$/;function f(e){return e?e.replace(d,``):``}e.normalizeId=f;function p(e,t,n){return n=f(n),e.resolve(t,n)}e.resolveUrl=p;var m=/^[a-z_][-a-z0-9._]*$/i;function h(e,t){if(typeof e==`boolean`)return{};let{schemaId:i,uriResolver:a}=this.opts,o=f(e[i]||t),s={"":o},c=l(a,o,!1),u={},d=new Set;return r(e,{allKeys:!0},(e,t,n,r)=>{if(r===void 0)return;let a=c+t,o=s[r];typeof e[i]==`string`&&(o=l.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=o;function l(t){let n=this.opts.uriResolver.resolve;if(t=f(o?n(o,t):t),d.has(t))throw h(t);d.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?p(e,r.schema,t):t!==f(a)&&(t[0]===`#`?(p(e,u[t],t),u[t]=e):this.refs[t]=a),t}function g(e){if(typeof e==`string`){if(!m.test(e))throw Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}}),u;function p(e,t,r){if(t!==void 0&&!n(e,t))throw h(r)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=h})),Dt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=_t(),n=bt(),r=yt(),i=bt(),a=xt(),o=St(),s=Ct(),c=W(),l=K(),u=Et(),d=G(),f=gt();function p(e){if(S(e)&&(w(e),x(e))){_(e);return}m(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=p;function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,c._)`${l.default.data}, ${l.default.valCxt}`,r.$async,()=>{e.code((0,c._)`"use strict"; ${y(n,i)}`),g(e,i),e.code(a)}):e.func(t,(0,c._)`${l.default.data}, ${h(i)}`,r.$async,()=>e.code(y(n,i)).code(a))}function h(e){return(0,c._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?(0,c._)`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function g(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,(0,c._)`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,(0,c._)`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,(0,c._)`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,(0,c._)`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,(0,c._)`""`),e.var(l.default.parentData,(0,c._)`undefined`),e.var(l.default.parentDataProperty,(0,c._)`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`{}`)})}function _(e){let{schema:t,opts:n,gen:r}=e;m(e,()=>{n.$comment&&t.$comment&&A(e),D(e),r.let(l.default.vErrors,null),r.let(l.default.errors,0),n.unevaluated&&v(e),T(e),j(e)})}function v(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,c._)`${n}.evaluated`),t.if((0,c._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,c._)`${e.evaluated}.props`,(0,c._)`undefined`)),t.if((0,c._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,c._)`${e.evaluated}.items`,(0,c._)`undefined`))}function y(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,c._)`/*# sourceURL=${n} */`:c.nil}function b(e,n){if(S(e)&&(w(e),x(e))){C(e,n);return}(0,t.boolOrEmptySchema)(e,n)}function x({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function S(e){return typeof e.schema!=`boolean`}function C(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&A(e),O(e),k(e);let a=r.const(`_errs`,l.default.errors);T(e,a),r.var(t,(0,c._)`${a} === ${l.default.errors}`)}function w(e){(0,d.checkUnknownRules)(e),E(e)}function T(e,t){if(e.opts.jtd)return N(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);N(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function E(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function D(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,d.checkStrictMode)(e,`default is ignored in the schema root`)}function O(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function k(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function A({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,c._)`${l.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,c.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,c._)`${l.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function j(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,c._)`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw((0,c._)`new ${i}(${l.default.vErrors})`)):(t.assign((0,c._)`${r}.errors`,l.default.vErrors),a.unevaluated&&M(e),t.return((0,c._)`${l.default.errors} === 0`))}function M({gen:e,evaluated:t,props:n,items:r}){n instanceof c.Name&&e.assign((0,c._)`${t}.props`,n),r instanceof c.Name&&e.assign((0,c._)`${t}.items`,r)}function N(e,t,n,a){let{gen:o,schema:s,data:u,allErrors:f,opts:p,self:m}=e,{RULES:h}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(s,h))){o.block(()=>oe(e,`$ref`,h.all.$ref.definition));return}p.jtd||F(e,t),o.block(()=>{for(let e of h.rules)g(e);g(h.post)});function g(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,u,p.strictNumbers)),P(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):P(e,d),f||o.if((0,c._)`${l.default.errors} === ${a||0}`))}}function P(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&oe(e,n.keyword,n.definition,t.type)})}function F(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(I(e,t),e.opts.allowUnionTypes||L(e,t),ee(e,e.dataTypes))}function I(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{ne(e.dataTypes,t)||ie(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),re(e,t)}}function L(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&ie(e,`use allowUnionTypes to allow union type keyword`)}function ee(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>te(t,e))&&ie(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function te(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function ne(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function re(e,t){let n=[];for(let r of e.dataTypes)ne(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function ie(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var ae=class{constructor(e,t,n){if((0,o.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,le(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,l.default.errors))}result(e,t,n){this.failResult((0,c.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,c.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,c._)`${t} !== undefined && (${(0,c.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=c.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,c.or)((0,c._)`${r} === undefined`,t)),e!==c.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,c.or)(o(),s());function o(){if(n.length){if(!(t instanceof c.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,c._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,c._)`!${n}(${t})`}return c.nil}}subschema(e,t){let n=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(n,this.it,e),(0,s.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return b(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=d.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=d.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}};e.KeywordCxt=ae;function oe(e,t,n,r){let i=new ae(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,o.funcKeywordCode)(i,n):`macro`in n?(0,o.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,o.funcKeywordCode)(i,n)}var se=/^\/(?:[^~]|~0|~1)*$/,ce=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function le(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!se.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=ce.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(u(`property/index`,s));return r[t-s]}if(s>t)throw Error(u(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,c._)`${a}${(0,c.getProperty)((0,d.unescapeJsonPointer)(e))}`,o=(0,c._)`${o} && ${a}`);return o;function u(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=le})),Ot=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),kt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Et();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),At=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=W(),n=Ot(),r=K(),i=Et(),a=G(),o=Dt(),s=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=s;function c(e){let a=d.call(this,e);if(a)return a;let s=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:u}=this.opts,f=new t.CodeGen(this.scope,{es5:c,lines:l,ownProperties:u}),p;e.$async&&(p=f.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let m=f.scopeName(`validate`);e.validateName=m;let h={gen:f,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:s,baseId:e.baseId||s,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,o.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);let n=f.toString();g=`${f.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:m,validateCode:n,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=c;function l(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=p.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new s({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=u.call(this,a)}e.resolveRef=l;function u(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:c.call(this,e)}function d(e){for(let t of this._compilations)if(f(t,e))return t}e.getCompilingSchema=d;function f(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||m.call(this,e,t)}function m(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return g.call(this,n,e);let o=(0,i.normalizeId)(r),l=this.refs[o]||this.schemas[o];if(typeof l==`string`){let t=m.call(this,e,l);return typeof t?.schema==`object`?g.call(this,n,t):void 0}if(typeof l?.schema==`object`){if(l.validate||c.call(this,l),o===(0,i.normalizeId)(t)){let{schema:t}=l,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new s({schema:t,schemaId:n,root:e,baseId:a})}return g.call(this,n,l)}}e.resolveSchema=m;var h=new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function g(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!h.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=m.call(this,r,e)}let{schemaId:c}=this.opts;if(o||=new s({schema:n,schemaId:c,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),jt=c({$id:()=>Mt,additionalProperties:()=>!1,default:()=>Rt,description:()=>Nt,properties:()=>It,required:()=>Ft,type:()=>Pt},1),Mt,Nt,Pt,Ft,It,Lt,Rt,zt=o((()=>{Mt=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,Nt=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,Pt=`object`,Ft=[`$data`],It={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},Rt={$id:Mt,description:Nt,type:Pt,required:Ft,properties:It,additionalProperties:!1}})),Bt=s(((e,t)=>{t.exports={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}})),Vt=s(((e,t)=>{var{HEX:n}=Bt();function r(e){if(c(e,`.`)<3)return{host:e,isIPV4:!1};let[t]=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[];return t?{host:s(t,`.`),isIPV4:!0}:{host:e,isIPV4:!1}}function i(e,t=!1){let r=``,i=!0;for(let t of e){if(n[t]===void 0)return;t!==`0`&&i===!0&&(i=!1),i||(r+=t)}return t&&r.length===0&&(r=`0`),r}function a(e){let t=0,n={error:!1,address:``,zone:``},r=[],a=[],o=!1,s=!1,c=!1;function l(){if(a.length){if(o===!1){let e=i(a);if(e!==void 0)r.push(e);else return n.error=!0,!1}a.length=0}return!0}for(let i=0;i<e.length;i++){let u=e[i];if(!(u===`[`||u===`]`))if(u===`:`){if(s===!0&&(c=!0),!l())break;if(t++,r.push(`:`),t>7){n.error=!0;break}i-1>=0&&e[i-1]===`:`&&(s=!0);continue}else if(u===`%`){if(!l())break;o=!0}else{a.push(u);continue}}return a.length&&(o?n.zone=a.join(``):c?r.push(a.join(``)):r.push(i(a))),n.address=r.join(``),n}function o(e,t={}){if(c(e,`:`)<2)return{host:e,isIPV6:!1};let n=a(e);if(n.error)return{host:e,isIPV6:!1};{let e=n.address,t=n.address;return n.zone&&(e+=`%`+n.zone,t+=`%25`+n.zone),{host:e,escapedHost:t,isIPV6:!0}}}function s(e,t){let n=``,r=!0,i=e.length;for(let a=0;a<i;a++){let o=e[a];o===`0`&&r?(a+1<=i&&e[a+1]===t||a+1===i)&&(n+=o,r=!1):(r=o===t,n+=o)}return n}function c(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}var l=/^\.\.?\//u,u=/^\/\.(?:\/|$)/u,d=/^\/\.\.(?:\/|$)/u,f=/^\/?(?:.|\n)*?(?=\/|$)/u;function p(e){let t=[];for(;e.length;)if(e.match(l))e=e.replace(l,``);else if(e.match(u))e=e.replace(u,`/`);else if(e.match(d))e=e.replace(d,`/`),t.pop();else if(e===`.`||e===`..`)e=``;else{let n=e.match(f);if(n){let r=n[0];e=e.slice(r.length),t.push(r)}else throw Error(`Unexpected dot segment condition`)}return t.join(``)}function m(e,t){let n=t===!0?unescape:escape;return e.scheme!==void 0&&(e.scheme=n(e.scheme)),e.userinfo!==void 0&&(e.userinfo=n(e.userinfo)),e.host!==void 0&&(e.host=n(e.host)),e.path!==void 0&&(e.path=n(e.path)),e.query!==void 0&&(e.query=n(e.query)),e.fragment!==void 0&&(e.fragment=n(e.fragment)),e}function h(e,t){let n=[];if(e.userinfo!==void 0&&(n.push(e.userinfo),n.push(`@`)),e.host!==void 0){let t=unescape(e.host),i=r(t);if(i.isIPV4)t=i.host;else{let n=o(i.host,{isIPV4:!1});t=n.isIPV6===!0?`[${n.escapedHost}]`:e.host}n.push(t)}return(typeof e.port==`number`||typeof e.port==`string`)&&(n.push(`:`),n.push(String(e.port))),n.length?n.join(``):void 0}t.exports={recomposeAuthority:h,normalizeComponentEncoding:m,removeDotSegments:p,normalizeIPv4:r,normalizeIPv6:o,stringArrayToHexStripped:i}})),Ht=s(((e,t)=>{var n=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function i(e){return typeof e.secure==`boolean`?e.secure:String(e.scheme).toLowerCase()===`wss`}function a(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function o(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function s(e){return e.secure=i(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function c(e){if((e.port===(i(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split(`?`);e.path=t&&t!==`/`?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function l(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=y[`${r}:${t.nid||e.nid}`];e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function u(e,t){let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=y[`${n}:${t.nid||r}`];i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function d(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n.test(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function f(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var p={scheme:`http`,domainHost:!0,parse:a,serialize:o},m={scheme:`https`,domainHost:p.domainHost,parse:a,serialize:o},h={scheme:`ws`,domainHost:!0,parse:s,serialize:c},g={scheme:`wss`,domainHost:h.domainHost,parse:h.parse,serialize:h.serialize},_={scheme:`urn`,parse:l,serialize:u,skipNormalize:!0},v={scheme:`urn:uuid`,parse:d,serialize:f,skipNormalize:!0},y={http:p,https:m,ws:h,wss:g,urn:_,"urn:uuid":v};t.exports=y})),Ut=s(((e,t)=>{var{normalizeIPv6:n,normalizeIPv4:r,removeDotSegments:i,recomposeAuthority:a,normalizeComponentEncoding:o}=Vt(),s=Ht();function c(e,t){return typeof e==`string`?e=f(g(e,t),t):typeof e==`object`&&(e=g(f(e,t),t)),e}function l(e,t,n){let r=Object.assign({scheme:`null`},n);return f(u(g(e,r),g(t,r),r,!0),{...r,skipEscape:!0})}function u(e,t,n,r){let a={};return r||(e=g(f(e,n),n),t=g(f(t,n),n)),n||={},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=i(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=i(t.path||``),a.query=t.query):(t.path?(t.path.charAt(0)===`/`?a.path=i(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path=`/`+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:a.path=t.path,a.path=i(a.path)),a.query=t.query):(a.path=e.path,t.query===void 0?a.query=e.query:a.query=t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function d(e,t,n){return typeof e==`string`?(e=unescape(e),e=f(o(g(e,n),!0),{...n,skipEscape:!0})):typeof e==`object`&&(e=f(o(e,!0),{...n,skipEscape:!0})),typeof t==`string`?(t=unescape(t),t=f(o(g(t,n),!0),{...n,skipEscape:!0})):typeof t==`object`&&(t=f(o(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function f(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},r=Object.assign({},t),o=[],c=s[(r.scheme||n.scheme||``).toLowerCase()];c&&c.serialize&&c.serialize(n,r),n.path!==void 0&&(r.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),r.reference!==`suffix`&&n.scheme&&o.push(n.scheme,`:`);let l=a(n,r);if(l!==void 0&&(r.reference!==`suffix`&&o.push(`//`),o.push(l),n.path&&n.path.charAt(0)!==`/`&&o.push(`/`)),n.path!==void 0){let e=n.path;!r.absolutePath&&(!c||!c.absolutePath)&&(e=i(e)),l===void 0&&(e=e.replace(/^\/\//u,`/%2F`)),o.push(e)}return n.query!==void 0&&o.push(`?`,n.query),n.fragment!==void 0&&o.push(`#`,n.fragment),o.join(``)}var p=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function m(e){let t=0;for(let n=0,r=e.length;n<r;++n)if(t=e.charCodeAt(n),t>126||p[t])return!0;return!1}var h=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(e,t){let i=Object.assign({},t),a={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},o=e.indexOf(`%`)!==-1,c=!1;i.reference===`suffix`&&(e=(i.scheme?i.scheme+`:`:``)+`//`+e);let l=e.match(h);if(l){if(a.scheme=l[1],a.userinfo=l[3],a.host=l[4],a.port=parseInt(l[5],10),a.path=l[6]||``,a.query=l[7],a.fragment=l[8],isNaN(a.port)&&(a.port=l[5]),a.host){let e=r(a.host);if(e.isIPV4===!1){let t=n(e.host,{isIPV4:!1});a.host=t.host.toLowerCase(),c=t.isIPV6}else a.host=e.host,c=!0}a.scheme===void 0&&a.userinfo===void 0&&a.host===void 0&&a.port===void 0&&!a.path&&a.query===void 0?a.reference=`same-document`:a.scheme===void 0?a.reference=`relative`:a.fragment===void 0?a.reference=`absolute`:a.reference=`uri`,i.reference&&i.reference!==`suffix`&&i.reference!==a.reference&&(a.error=a.error||`URI is not a `+i.reference+` reference.`);let e=s[(i.scheme||a.scheme||``).toLowerCase()];if(!i.unicodeSupport&&(!e||!e.unicodeSupport)&&a.host&&(i.domainHost||e&&e.domainHost)&&c===!1&&m(a.host))try{a.host=URL.domainToASCII(a.host.toLowerCase())}catch(e){a.error=a.error||`Host's domain name can not be converted to ASCII: `+e}(!e||e&&!e.skipNormalize)&&(o&&a.scheme!==void 0&&(a.scheme=unescape(a.scheme)),o&&a.host!==void 0&&(a.host=unescape(a.host)),a.path!==void 0&&a.path.length&&(a.path=escape(unescape(a.path))),a.fragment!==void 0&&a.fragment.length&&(a.fragment=encodeURI(decodeURIComponent(a.fragment)))),e&&e.parse&&e.parse(a,i)}else a.error=a.error||`URI can not be parsed.`;return a}var _={SCHEMES:s,normalize:c,resolve:l,resolveComponents:u,equal:d,serialize:f,parse:g};t.exports=_,t.exports.default=_,t.exports.fastUri=_})),Wt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Ut();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),Gt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Dt();Object.defineProperty(e,`KeywordCxt`,{enumerable:!0,get:function(){return t.KeywordCxt}});var n=W();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,`CodeGen`,{enumerable:!0,get:function(){return n.CodeGen}});var r=Ot(),i=kt(),a=vt(),o=At(),s=W(),c=Et(),l=bt(),u=G(),f=(zt(),d(jt).default),p=Wt(),m=(e,t)=>new RegExp(e,t);m.code=`new RegExp`;var h=[`removeAdditional`,`useDefaults`,`coerceTypes`],g=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),_={errorDataPath:``,format:"`validateFormats: false` can be used instead.",nullable:`"nullable" keyword is supported by default.`,jsonPointers:`Deprecated jsPropertySyntax can be used instead.`,extendRefs:`Deprecated ignoreKeywordsWithRef can be used instead.`,missingRefs:`Pass empty schema with $id that should be ignored to ajv.addSchema.`,processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:`"uniqueItems" keyword is always validated.`,unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:`Map is used as cache, schema object as key.`,serialize:`Map is used as cache, schema object as key.`,ajvErrors:`It is default now.`},v={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`},y=200;function b(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??m,a=e.uriResolver??p.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??y,loopEnum:e.loopEnum??y,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var x=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:t,lines:n}),this.logger=k(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),S.call(this,_,e,`NOT SUPPORTED`),S.call(this,v,e,`DEPRECATED`,`warn`),this._metaOpts=D.call(this),e.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&E.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=f;n===`id`&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await a.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function a(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await a.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=C.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:n});if(t=o.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=C.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,c.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(j.call(this,n,t),!t)return(0,u.eachItem)(n,e=>M.call(this,e)),this;P.call(this,t);let r={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(n,r.type.length===0?e=>M.call(this,e,r):e=>r.type.forEach(t=>M.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=I(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e==`object`)a=e[s];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let l=this._cache.get(e);if(l!==void 0)return l;n=(0,c.normalizeId)(a||n);let u=c.getSchemaRefs.call(this,e,n);return l=new o.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=l),r&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):o.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,e)}finally{this.opts=t}}};x.ValidationError=r.default,x.MissingRefError=i.default,e.default=x;function S(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function C(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function T(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function E(e){if(Array.isArray(e)){this.addVocabulary(e);return}for(let t in this.logger.warn(`keywords option as map is deprecated, pass array`),e){let n=e[t];n.keyword||=t,this.addKeyword(n)}}function D(){let e={...this.opts};for(let t of h)delete e[t];return e}var O={log(){},warn(){},error(){}};function k(e){if(e===!1)return O;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}var A=/^[a-z_$][a-z0-9_$:-]*$/i;function j(e,t){let{RULES:n}=this;if((0,u.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!A.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function M(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?N.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function N(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function P(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=I(t)),e.validateSchema=this.compile(t,!0))}var F={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function I(e){return{anyOf:[e,F]}}})),Kt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),qt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.callRef=e.getValidate=void 0;var t=kt(),n=q(),r=W(),i=K(),a=At(),o=G(),s={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:u,validateName:d,opts:f,self:p}=o,{root:m}=u;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);if(h instanceof a.SchemaEnv)return _(h);return v(h);function g(){if(u===m)return l(e,d,u,u.$async);let t=n.scopeValue(`root`,{ref:m});return l(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){l(e,c(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,f.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function c(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=c;function l(e,t,a,s){let{gen:c,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,p=f.passContext?i.default.this:r.nil;s?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=c.let(`valid`);c.try(()=>{c.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||c.assign(i,!0)},e=>{c.if((0,r._)`!(${e} instanceof ${l.ValidationError})`,()=>c.throw(e)),g(e),u||c.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;c.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),c.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!l.opts.unevaluated)return;let t=a?.validate?.evaluated;if(l.props!==!0)if(t&&!t.dynamicProps)t.props!==void 0&&(l.props=o.mergeEvaluated.props(c,t.props,l.props));else{let t=c.var(`props`,(0,r._)`${e}.evaluated.props`);l.props=o.mergeEvaluated.props(c,t,l.props,r.Name)}if(l.items!==!0)if(t&&!t.dynamicItems)t.items!==void 0&&(l.items=o.mergeEvaluated.items(c,t.items,l.items));else{let t=c.var(`items`,(0,r._)`${e}.evaluated.items`);l.items=o.mergeEvaluated.items(c,t,l.items,r.Name)}}}e.callRef=l,e.default=s})),Jt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Kt(),n=qt();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),Yt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}})),Xt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),Zt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}e.default=t,t.code=`require("ajv/dist/runtime/ucs2length").default`})),Qt=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W(),n=G(),r=Zt();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),$t=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=q(),n=W();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,n.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,n._)`{pattern: ${e}}`},code(e){let{data:r,$data:i,schema:a,schemaCode:o,it:s}=e,c=s.opts.unicodeRegExp?`u`:``,l=i?(0,n._)`(new RegExp(${o}, ${c}))`:(0,t.usePattern)(e,a);e.fail$data((0,n._)`!${l}.test(${r})`)}}})),en=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),tn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=q(),n=W(),r=G();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),nn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),rn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=wt();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),an=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=bt(),n=W(),r=G(),i=rn();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),on=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W(),n=G(),r=rn();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),sn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W(),n=G(),r=rn();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??=(0,n.useFunc)(i,r.default),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),cn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Yt(),n=Xt(),r=Qt(),i=$t(),a=en(),o=tn(),s=nn(),c=an(),l=on(),u=sn();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),ln=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateAdditionalItems=void 0;var t=W(),n=G(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`);return}i(e,a)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),un=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateTuple=void 0;var t=W(),n=G(),r=q(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,!(0,n.alwaysValidSchema)(i,t)&&e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),dn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=un();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),fn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W(),n=G(),r=q(),i=ln();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,!(0,n.alwaysValidSchema)(o,t)&&(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),pn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W(),n=G();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),mn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=W(),n=G(),r=q();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e},
12
+ missingProperty: ${i},
13
+ depsCount: ${n},
14
+ deps: ${r}}`};var i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);o(e,t),s(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function o(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=o;function s(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=s,e.default=i})),hn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W(),n=G();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),gn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=q(),n=W(),r=K(),i=G();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1){_(t);return}if(o===!1){e.setParams({additionalProperty:t}),e.error(),d||a.break();return}if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),_n=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Dt(),n=q(),r=G(),i=gn();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),vn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=q(),n=W(),r=G(),i=G();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),yn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=G();e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),bn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:q().validateUnion,error:{message:`must match a schema in anyOf`}}})),xn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W(),n=G();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),Sn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=G();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),Cn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W(),n=G(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),wn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=G();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),Tn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=ln(),n=dn(),r=un(),i=fn(),a=pn(),o=mn(),s=hn(),c=gn(),l=_n(),u=vn(),d=yn(),f=bn(),p=xn(),m=Sn(),h=Cn(),g=wn();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),En=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.dynamicAnchor=void 0;var t=W(),n=K(),r=At(),i=qt(),a={keyword:`$dynamicAnchor`,schemaType:`string`,code:e=>o(e,e.schema)};function o(e,r){let{gen:i,it:a}=e;a.schemaEnv.root.dynamicAnchors[r]=!0;let o=(0,t._)`${n.default.dynamicAnchors}${(0,t.getProperty)(r)}`,c=a.errSchemaPath===`#`?a.validateName:s(e);i.if((0,t._)`!${o}`,()=>i.assign(o,c))}e.dynamicAnchor=o;function s(e){let{schemaEnv:t,schema:n,self:a}=e.it,{root:o,baseId:s,localRefs:c,meta:l}=t.root,{schemaId:u}=a.opts,d=new r.SchemaEnv({schema:n,schemaId:u,root:o,baseId:s,localRefs:c,meta:l});return r.compileSchema.call(a,d),(0,i.getValidate)(e,d)}e.default=a})),Dn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.dynamicRef=void 0;var t=W(),n=K(),r=qt(),i={keyword:`$dynamicRef`,schemaType:`string`,code:e=>a(e,e.schema)};function a(e,i){let{gen:a,keyword:o,it:s}=e;if(i[0]!==`#`)throw Error(`"${o}" only supports hash fragment reference`);let c=i.slice(1);if(s.allErrors)l();else{let t=a.let(`valid`,!1);l(t),e.ok(t)}function l(e){if(s.schemaEnv.root.dynamicAnchors[c]){let r=a.let(`_v`,(0,t._)`${n.default.dynamicAnchors}${(0,t.getProperty)(c)}`);a.if(r,u(r,e),u(s.validateName,e))}else u(s.validateName,e)()}function u(t,n){return n?()=>a.block(()=>{(0,r.callRef)(e,t),a.let(n,!0)}):()=>(0,r.callRef)(e,t)}}e.dynamicRef=a,e.default=i})),On=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=En(),n=G();e.default={keyword:`$recursiveAnchor`,schemaType:`boolean`,code(e){e.schema?(0,t.dynamicAnchor)(e,``):(0,n.checkStrictMode)(e.it,`$recursiveAnchor: false is ignored`)}}})),kn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Dn();e.default={keyword:`$recursiveRef`,schemaType:`string`,code:e=>(0,t.dynamicRef)(e,e.schema)}})),An=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=En(),n=Dn(),r=On(),i=kn();e.default=[t.default,n.default,r.default,i.default]})),jn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=mn();e.default={keyword:`dependentRequired`,type:`object`,schemaType:`object`,error:t.error,code:e=>(0,t.validatePropertyDeps)(e)}})),Mn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=mn();e.default={keyword:`dependentSchemas`,type:`object`,schemaType:`object`,code:e=>(0,t.validateSchemaDeps)(e)}})),Nn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=G();e.default={keyword:[`maxContains`,`minContains`],type:`array`,schemaType:`number`,code({keyword:e,parentSchema:n,it:r}){n.contains===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}}})),Pn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=jn(),n=Mn(),r=Nn();e.default=[t.default,n.default,r.default]})),Fn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W(),n=G(),r=K();e.default={keyword:`unevaluatedProperties`,type:`object`,schemaType:[`boolean`,`object`],trackErrors:!0,error:{message:`must NOT have unevaluated properties`,params:({params:e})=>(0,t._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){let{gen:i,schema:a,data:o,errsCount:s,it:c}=e;if(!s)throw Error(`ajv implementation error`);let{allErrors:l,props:u}=c;u instanceof t.Name?i.if((0,t._)`${u} !== true`,()=>i.forIn(`key`,o,e=>i.if(f(u,e),()=>d(e)))):u!==!0&&i.forIn(`key`,o,e=>u===void 0?d(e):i.if(p(u,e),()=>d(e))),c.props=!0,e.ok((0,t._)`${s} === ${r.default.errors}`);function d(r){if(a===!1){e.setParams({unevaluatedProperty:r}),e.error(),l||i.break();return}if(!(0,n.alwaysValidSchema)(c,a)){let a=i.name(`valid`);e.subschema({keyword:`unevaluatedProperties`,dataProp:r,dataPropType:n.Type.Str},a),l||i.if((0,t.not)(a),()=>i.break())}}function f(e,n){return(0,t._)`!${e} || !${e}[${n}]`}function p(e,n){let r=[];for(let i in e)e[i]===!0&&r.push((0,t._)`${n} !== ${i}`);return(0,t.and)(...r)}}}})),In=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W(),n=G();e.default={keyword:`unevaluatedItems`,type:`array`,schemaType:[`boolean`,`object`],error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e,s=o.items||0;if(s===!0)return;let c=r.const(`len`,(0,t._)`${a}.length`);if(i===!1)e.setParams({len:s}),e.fail((0,t._)`${c} > ${s}`);else if(typeof i==`object`&&!(0,n.alwaysValidSchema)(o,i)){let n=r.var(`valid`,(0,t._)`${c} <= ${s}`);r.if((0,t.not)(n),()=>l(n,s)),e.ok(n)}o.items=!0;function l(i,a){r.forRange(`i`,a,c,a=>{e.subschema({keyword:`unevaluatedItems`,dataProp:a,dataPropType:n.Type.Num},i),o.allErrors||r.if((0,t.not)(i),()=>r.break())})}}}})),Ln=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Fn(),n=In();e.default=[t.default,n.default]})),Rn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),zn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=[Rn().default]})),Bn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),Vn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Jt(),n=cn(),r=Tn(),i=An(),a=Pn(),o=Ln(),s=zn(),c=Bn();e.default=[i.default,t.default,n.default,(0,r.default)(!0),s.default,c.metadataVocabulary,c.contentVocabulary,a.default,o.default]})),Hn=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),Un=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=W(),n=Hn(),r=At(),i=kt(),a=G();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();for(let e in o.if(!1),r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;e<d.length;e++){let c=d[e];if(c?.$ref&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)){let e=c.$ref;if(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),c instanceof r.SchemaEnv&&(c=c.schema),c===void 0)throw new i.default(u.opts.uriResolver,u.baseId,e)}let l=c?.properties?.[f];if(typeof l!=`object`)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n&&=t||o(c),s(l,e)}if(!n)throw Error(`discriminator: "${f}" must be required`);return e;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)c(e.const,t);else if(e.enum)for(let n of e.enum)c(n,t);else throw Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function c(t,n){if(typeof t!=`string`||t in e)throw Error(`discriminator: "${f}" values must be unique strings`);e[t]=n}}}}})),Wn=c({$comment:()=>Qn,$dynamicAnchor:()=>Jn,$id:()=>Kn,$schema:()=>Gn,$vocabulary:()=>qn,allOf:()=>Xn,default:()=>er,properties:()=>$n,title:()=>Yn,type:()=>Zn},1),Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr=o((()=>{Gn=`https://json-schema.org/draft/2020-12/schema`,Kn=`https://json-schema.org/draft/2020-12/schema`,qn={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},Jn=`meta`,Yn=`Core and Validation specifications meta-schema`,Xn=[{$ref:`meta/core`},{$ref:`meta/applicator`},{$ref:`meta/unevaluated`},{$ref:`meta/validation`},{$ref:`meta/meta-data`},{$ref:`meta/format-annotation`},{$ref:`meta/content`}],Zn=[`object`,`boolean`],Qn=`This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.`,$n={definitions:{$comment:`"definitions" has been replaced by "$defs".`,type:`object`,additionalProperties:{$dynamicRef:`#meta`},deprecated:!0,default:{}},dependencies:{$comment:`"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.`,type:`object`,additionalProperties:{anyOf:[{$dynamicRef:`#meta`},{$ref:`meta/validation#/$defs/stringArray`}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:`"$recursiveAnchor" has been replaced by "$dynamicAnchor".`,$ref:`meta/core#/$defs/anchorString`,deprecated:!0},$recursiveRef:{$comment:`"$recursiveRef" has been replaced by "$dynamicRef".`,$ref:`meta/core#/$defs/uriReferenceString`,deprecated:!0}},er={$schema:Gn,$id:Kn,$vocabulary:qn,$dynamicAnchor:Jn,title:Yn,allOf:Xn,type:Zn,$comment:Qn,properties:$n}})),nr=c({$defs:()=>ur,$dynamicAnchor:()=>or,$id:()=>ir,$schema:()=>rr,$vocabulary:()=>ar,default:()=>dr,properties:()=>lr,title:()=>sr,type:()=>cr},1),rr,ir,ar,or,sr,cr,lr,ur,dr,fr=o((()=>{rr=`https://json-schema.org/draft/2020-12/schema`,ir=`https://json-schema.org/draft/2020-12/meta/applicator`,ar={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},or=`meta`,sr=`Applicator vocabulary meta-schema`,cr=[`object`,`boolean`],lr={prefixItems:{$ref:`#/$defs/schemaArray`},items:{$dynamicRef:`#meta`},contains:{$dynamicRef:`#meta`},additionalProperties:{$dynamicRef:`#meta`},properties:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},default:{}},patternProperties:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},propertyNames:{format:`regex`},default:{}},dependentSchemas:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},default:{}},propertyNames:{$dynamicRef:`#meta`},if:{$dynamicRef:`#meta`},then:{$dynamicRef:`#meta`},else:{$dynamicRef:`#meta`},allOf:{$ref:`#/$defs/schemaArray`},anyOf:{$ref:`#/$defs/schemaArray`},oneOf:{$ref:`#/$defs/schemaArray`},not:{$dynamicRef:`#meta`}},ur={schemaArray:{type:`array`,minItems:1,items:{$dynamicRef:`#meta`}}},dr={$schema:rr,$id:ir,$vocabulary:ar,$dynamicAnchor:or,title:sr,type:cr,properties:lr,$defs:ur}})),pr=c({$dynamicAnchor:()=>_r,$id:()=>hr,$schema:()=>mr,$vocabulary:()=>gr,default:()=>xr,properties:()=>br,title:()=>vr,type:()=>yr},1),mr,hr,gr,_r,vr,yr,br,xr,Sr=o((()=>{mr=`https://json-schema.org/draft/2020-12/schema`,hr=`https://json-schema.org/draft/2020-12/meta/unevaluated`,gr={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},_r=`meta`,vr=`Unevaluated applicator vocabulary meta-schema`,yr=[`object`,`boolean`],br={unevaluatedItems:{$dynamicRef:`#meta`},unevaluatedProperties:{$dynamicRef:`#meta`}},xr={$schema:mr,$id:hr,$vocabulary:gr,$dynamicAnchor:_r,title:vr,type:yr,properties:br}})),Cr=c({$dynamicAnchor:()=>Dr,$id:()=>Tr,$schema:()=>wr,$vocabulary:()=>Er,default:()=>jr,properties:()=>Ar,title:()=>Or,type:()=>kr},1),wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr=o((()=>{wr=`https://json-schema.org/draft/2020-12/schema`,Tr=`https://json-schema.org/draft/2020-12/meta/content`,Er={"https://json-schema.org/draft/2020-12/vocab/content":!0},Dr=`meta`,Or=`Content vocabulary meta-schema`,kr=[`object`,`boolean`],Ar={contentEncoding:{type:`string`},contentMediaType:{type:`string`},contentSchema:{$dynamicRef:`#meta`}},jr={$schema:wr,$id:Tr,$vocabulary:Er,$dynamicAnchor:Dr,title:Or,type:kr,properties:Ar}})),Nr=c({$defs:()=>Vr,$dynamicAnchor:()=>Lr,$id:()=>Fr,$schema:()=>Pr,$vocabulary:()=>Ir,default:()=>Hr,properties:()=>Br,title:()=>Rr,type:()=>zr},1),Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur=o((()=>{Pr=`https://json-schema.org/draft/2020-12/schema`,Fr=`https://json-schema.org/draft/2020-12/meta/core`,Ir={"https://json-schema.org/draft/2020-12/vocab/core":!0},Lr=`meta`,Rr=`Core vocabulary meta-schema`,zr=[`object`,`boolean`],Br={$id:{$ref:`#/$defs/uriReferenceString`,$comment:`Non-empty fragments not allowed.`,pattern:`^[^#]*#?$`},$schema:{$ref:`#/$defs/uriString`},$ref:{$ref:`#/$defs/uriReferenceString`},$anchor:{$ref:`#/$defs/anchorString`},$dynamicRef:{$ref:`#/$defs/uriReferenceString`},$dynamicAnchor:{$ref:`#/$defs/anchorString`},$vocabulary:{type:`object`,propertyNames:{$ref:`#/$defs/uriString`},additionalProperties:{type:`boolean`}},$comment:{type:`string`},$defs:{type:`object`,additionalProperties:{$dynamicRef:`#meta`}}},Vr={anchorString:{type:`string`,pattern:`^[A-Za-z_][-A-Za-z0-9._]*$`},uriString:{type:`string`,format:`uri`},uriReferenceString:{type:`string`,format:`uri-reference`}},Hr={$schema:Pr,$id:Fr,$vocabulary:Ir,$dynamicAnchor:Lr,title:Rr,type:zr,properties:Br,$defs:Vr}})),Wr=c({$dynamicAnchor:()=>Jr,$id:()=>Kr,$schema:()=>Gr,$vocabulary:()=>qr,default:()=>Qr,properties:()=>Zr,title:()=>Yr,type:()=>Xr},1),Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r=o((()=>{Gr=`https://json-schema.org/draft/2020-12/schema`,Kr=`https://json-schema.org/draft/2020-12/meta/format-annotation`,qr={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},Jr=`meta`,Yr=`Format vocabulary meta-schema for annotation results`,Xr=[`object`,`boolean`],Zr={format:{type:`string`}},Qr={$schema:Gr,$id:Kr,$vocabulary:qr,$dynamicAnchor:Jr,title:Yr,type:Xr,properties:Zr}})),ei=c({$dynamicAnchor:()=>ii,$id:()=>ni,$schema:()=>ti,$vocabulary:()=>ri,default:()=>ci,properties:()=>si,title:()=>ai,type:()=>oi},1),ti,ni,ri,ii,ai,oi,si,ci,li=o((()=>{ti=`https://json-schema.org/draft/2020-12/schema`,ni=`https://json-schema.org/draft/2020-12/meta/meta-data`,ri={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},ii=`meta`,ai=`Meta-data vocabulary meta-schema`,oi=[`object`,`boolean`],si={title:{type:`string`},description:{type:`string`},default:!0,deprecated:{type:`boolean`,default:!1},readOnly:{type:`boolean`,default:!1},writeOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0}},ci={$schema:ti,$id:ni,$vocabulary:ri,$dynamicAnchor:ii,title:ai,type:oi,properties:si}})),ui=c({$defs:()=>vi,$dynamicAnchor:()=>mi,$id:()=>fi,$schema:()=>di,$vocabulary:()=>pi,default:()=>yi,properties:()=>_i,title:()=>hi,type:()=>gi},1),di,fi,pi,mi,hi,gi,_i,vi,yi,bi=o((()=>{di=`https://json-schema.org/draft/2020-12/schema`,fi=`https://json-schema.org/draft/2020-12/meta/validation`,pi={"https://json-schema.org/draft/2020-12/vocab/validation":!0},mi=`meta`,hi=`Validation vocabulary meta-schema`,gi=[`object`,`boolean`],_i={type:{anyOf:[{$ref:`#/$defs/simpleTypes`},{type:`array`,items:{$ref:`#/$defs/simpleTypes`},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/$defs/nonNegativeInteger`},minLength:{$ref:`#/$defs/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},maxItems:{$ref:`#/$defs/nonNegativeInteger`},minItems:{$ref:`#/$defs/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},maxContains:{$ref:`#/$defs/nonNegativeInteger`},minContains:{$ref:`#/$defs/nonNegativeInteger`,default:1},maxProperties:{$ref:`#/$defs/nonNegativeInteger`},minProperties:{$ref:`#/$defs/nonNegativeIntegerDefault0`},required:{$ref:`#/$defs/stringArray`},dependentRequired:{type:`object`,additionalProperties:{$ref:`#/$defs/stringArray`}}},vi={nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{$ref:`#/$defs/nonNegativeInteger`,default:0},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},yi={$schema:di,$id:fi,$vocabulary:pi,$dynamicAnchor:mi,title:hi,type:gi,properties:_i,$defs:vi}})),xi=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=(tr(),d(Wn).default),n=(fr(),d(nr).default),r=(Sr(),d(pr).default),i=(Mr(),d(Cr).default),a=(Ur(),d(Nr).default),o=($r(),d(Wr).default),s=(li(),d(ei).default),c=(bi(),d(ui).default),l=[`/properties`];function u(e){return[t,n,r,i,a,u(this,o),s,u(this,c)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function u(t,n){return e?t.$dataMetaSchema(n,l):n}}e.default=u})),Si=s(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;var n=Gt(),r=Vn(),i=Un(),a=xi(),o=`https://json-schema.org/draft/2020-12/schema`,s=class extends n.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(a.default.call(this,e),this.refs[`http://json-schema.org/schema`]=o)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}};e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,`__esModule`,{value:!0}),e.default=s;var c=Dt();Object.defineProperty(e,`KeywordCxt`,{enumerable:!0,get:function(){return c.KeywordCxt}});var l=W();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,`CodeGen`,{enumerable:!0,get:function(){return l.CodeGen}});var u=Ot();Object.defineProperty(e,`ValidationError`,{enumerable:!0,get:function(){return u.default}});var d=kt();Object.defineProperty(e,`MissingRefError`,{enumerable:!0,get:function(){return d.default}})})),Ci=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(e,t){return{validate:e,compare:t}}e.fullFormats={date:t(a,o),time:t(c(!0),l),"date-time":t(f(!0),p),"iso-time":t(c(),u),"iso-date-time":t(f(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:_,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:E,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:y,int32:{type:`number`,validate:S},int64:{type:`number`,validate:C},float:{type:`number`,validate:w},double:{type:`number`,validate:w},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,p),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(e){return e%4==0&&(e%100!=0||e%400==0)}var r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(e){let t=r.exec(e);if(!t)return!1;let a=+t[1],o=+t[2],s=+t[3];return o>=1&&o<=12&&s>=1&&s<=(o===2&&n(a)?29:i[o])}function o(e,t){if(e&&t)return e>t?1:e<t?-1:0}var s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(e){return function(t){let n=s.exec(t);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=n[4],c=n[5]===`-`?-1:1,l=+(n[6]||0),u=+(n[7]||0);if(l>23||u>59||e&&!o)return!1;if(r<=23&&i<=59&&a<60)return!0;let d=i-u*c,f=r-l*c-(d<0?1:0);return(f===23||f===-1)&&(d===59||d===-1)&&a<61}}function l(e,t){if(!(e&&t))return;let n=new Date(`2020-01-01T`+e).valueOf(),r=new Date(`2020-01-01T`+t).valueOf();if(n&&r)return n-r}function u(e,t){if(!(e&&t))return;let n=s.exec(e),r=s.exec(t);if(n&&r)return e=n[1]+n[2]+n[3],t=r[1]+r[2]+r[3],e>t?1:e<t?-1:0}var d=/t|\s/i;function f(e){let t=c(e);return function(e){let n=e.split(d);return n.length===2&&a(n[0])&&t(n[1])}}function p(e,t){if(!(e&&t))return;let n=new Date(e).valueOf(),r=new Date(t).valueOf();if(n&&r)return n-r}function m(e,t){if(!(e&&t))return;let[n,r]=e.split(d),[i,a]=t.split(d),s=o(n,i);if(s!==void 0)return s||l(r,a)}var h=/\/|:/,g=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function _(e){return h.test(e)&&g.test(e)}var v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function y(e){return v.lastIndex=0,v.test(e)}var b=-(2**31),x=2**31-1;function S(e){return Number.isInteger(e)&&e<=x&&e>=b}function C(e){return Number.isInteger(e)}function w(){return!0}var T=/[^\\]\\Z/;function E(e){if(T.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}})),wi=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),Ti=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=wi(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),J=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=wi(),n=Ti(),r=wi();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,`strConcat`,{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,`getProperty`,{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,`regexpCode`,{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return r.Name}});var i=Ti();Object.defineProperty(e,`Scope`,{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,`ValueScope`,{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,`ValueScopeName`,{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,`varKinds`,{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=k(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=k(this.rhs,e,n),this}get names(){return O(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=k(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(A(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>D(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(j(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=k(this.condition,e,t),this}get names(){let e=super.names;return O(e,this.condition),this.else&&D(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=k(this.iteration,e,t),this}get names(){return D(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return O(O(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=k(this.iterable,e,t),this}get names(){return D(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&D(e,this.catch.names),this.finally&&D(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var E=class extends m{render(e){return`finally`+super.render(e)}};E.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
15
+ `:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new w;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new T(e),t(e)}return n&&(this._currNode=r.finally=new E,this.code(n)),this._endBlockNode(T,E)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function D(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function O(e,n){return n instanceof t._CodeOrName?D(e,n.names):e}function k(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function A(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function j(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${L(e)}`}e.not=j;var M=I(e.operators.AND);function N(...e){return e.reduce(M)}e.and=N;var P=I(e.operators.OR);function F(...e){return e.reduce(P)}e.or=F;function I(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${L(n)} ${e} ${L(r)}`}function L(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),Y=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=J(),n=wi();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0?!0:(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0?!0:(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;var _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),Ei=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=J();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),Di=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=J(),n=Y(),r=Ei();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var u={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),Oi=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=Di(),n=J(),r=Ei(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),ki=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),Ai=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),ji=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=ki(),n=Ai(),r=Di(),i=J(),a=Y(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;var u=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
16
+ || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
17
+ || (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
18
+ || ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function p({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function m(e,t,n,r=o.Correct){let a=r===o.Correct?i.operators.EQ:i.operators.NEQ,s;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:s=(0,i._)`Array.isArray(${t})`;break;case`object`:s=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:s=c((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:s=c();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===o.Correct?s:(0,i.not)(s);function c(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=m;function h(e,t,n,r){if(e.length===1)return m(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;for(let e in s.number&&delete s.integer,s)o=(0,i.and)(o,m(e,t,n,r));return o}e.checkDataTypes=h;var g={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function _(e){let t=v(e);(0,r.reportError)(t,g)}e.reportTypeError=_;function v(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),Mi=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.assignDefaults=void 0;var t=J(),n=Y();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),X=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;var t=J(),n=Y(),r=Ei(),i=Y();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(d(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function o({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(d(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=o;function s(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=s;function c(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function l(e,n,r){return(0,t._)`${c(e)}.call(${n}, ${r})`}e.isOwnProperty=l;function u(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${l(e,n,r)}`:a}e.propertyInData=u;function d(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(l(e,n,r))):a}e.noPropertyInData=d;function f(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=f;function p(e,t){return f(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=p;function m({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=m;var h=(0,t._)`new RegExp`;function g({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?h:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=g;function _(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=_;function v(e){let{gen:r,schema:i,keyword:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=v})),Ni=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=J(),n=Ei(),r=X(),i=Di();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=u(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let d=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}e.macroKeywordCode=a;function o(e,i){let{gen:a,keyword:o,schema:d,parentSchema:f,$data:p,it:m}=e;l(m,i);let h=u(a,o,!p&&i.compile?i.compile.call(m.self,d,f,m):i.validate),g=a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&s(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&s(e),x(()=>c(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!p||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=o;function s(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function c(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function l({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function u(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function d(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=d;function f({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=f})),Pi=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=J(),n=Y();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),Fi=s(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h<m.length;h++)r(e,t,a,m[h],s+`/`+p+`/`+h,c,s,p,o,h)}else if(p in n.propsKeywords){if(m&&typeof m==`object`)for(var g in m)r(e,t,a,m[g],s+`/`+p+`/`+i(g),c,s,p,o,g)}else (p in n.keywords||e.allKeys&&!(p in n.skipKeywords))&&r(e,t,a,m,s+`/`+p,c,s,p,o)}a(o,s,c,l,u,d,f)}}function i(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}})),Ii=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=Y(),n=wt(),r=Fi(),i=new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function a(e,t=!0){return typeof e==`boolean`?!0:t===!0?!s(e):t?c(e)<=t:!1}e.inlineRef=a;var o=new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function s(e){for(let t in e){if(o.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(s)||typeof n==`object`&&s(n))return!0}return!1}function c(e){let n=0;for(let r in e)if(r===`$ref`||(n++,!i.has(r)&&(typeof e[r]==`object`&&(0,t.eachItem)(e[r],e=>n+=c(e)),n===1/0)))return 1/0;return n}function l(e,t=``,n){return n!==!1&&(t=f(t)),u(e,e.parse(t))}e.getFullPath=l;function u(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=u;var d=/#\/?$/;function f(e){return e?e.replace(d,``):``}e.normalizeId=f;function p(e,t,n){return n=f(n),e.resolve(t,n)}e.resolveUrl=p;var m=/^[a-z_][-a-z0-9._]*$/i;function h(e,t){if(typeof e==`boolean`)return{};let{schemaId:i,uriResolver:a}=this.opts,o=f(e[i]||t),s={"":o},c=l(a,o,!1),u={},d=new Set;return r(e,{allKeys:!0},(e,t,n,r)=>{if(r===void 0)return;let a=c+t,o=s[r];typeof e[i]==`string`&&(o=l.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=o;function l(t){let n=this.opts.uriResolver.resolve;if(t=f(o?n(o,t):t),d.has(t))throw h(t);d.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?p(e,r.schema,t):t!==f(a)&&(t[0]===`#`?(p(e,u[t],t),u[t]=e):this.refs[t]=a),t}function g(e){if(typeof e==`string`){if(!m.test(e))throw Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}}),u;function p(e,t,r){if(t!==void 0&&!n(e,t))throw h(r)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=h})),Li=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=Oi(),n=ji(),r=Ai(),i=ji(),a=Mi(),o=Ni(),s=Pi(),c=J(),l=Ei(),u=Ii(),d=Y(),f=Di();function p(e){if(S(e)&&(w(e),x(e))){_(e);return}m(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=p;function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,c._)`${l.default.data}, ${l.default.valCxt}`,r.$async,()=>{e.code((0,c._)`"use strict"; ${y(n,i)}`),g(e,i),e.code(a)}):e.func(t,(0,c._)`${l.default.data}, ${h(i)}`,r.$async,()=>e.code(y(n,i)).code(a))}function h(e){return(0,c._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?(0,c._)`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function g(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,(0,c._)`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,(0,c._)`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,(0,c._)`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,(0,c._)`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,(0,c._)`""`),e.var(l.default.parentData,(0,c._)`undefined`),e.var(l.default.parentDataProperty,(0,c._)`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`{}`)})}function _(e){let{schema:t,opts:n,gen:r}=e;m(e,()=>{n.$comment&&t.$comment&&A(e),D(e),r.let(l.default.vErrors,null),r.let(l.default.errors,0),n.unevaluated&&v(e),T(e),j(e)})}function v(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,c._)`${n}.evaluated`),t.if((0,c._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,c._)`${e.evaluated}.props`,(0,c._)`undefined`)),t.if((0,c._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,c._)`${e.evaluated}.items`,(0,c._)`undefined`))}function y(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,c._)`/*# sourceURL=${n} */`:c.nil}function b(e,n){if(S(e)&&(w(e),x(e))){C(e,n);return}(0,t.boolOrEmptySchema)(e,n)}function x({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function S(e){return typeof e.schema!=`boolean`}function C(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&A(e),O(e),k(e);let a=r.const(`_errs`,l.default.errors);T(e,a),r.var(t,(0,c._)`${a} === ${l.default.errors}`)}function w(e){(0,d.checkUnknownRules)(e),E(e)}function T(e,t){if(e.opts.jtd)return N(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);N(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function E(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function D(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,d.checkStrictMode)(e,`default is ignored in the schema root`)}function O(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function k(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function A({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,c._)`${l.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,c.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,c._)`${l.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function j(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,c._)`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw((0,c._)`new ${i}(${l.default.vErrors})`)):(t.assign((0,c._)`${r}.errors`,l.default.vErrors),a.unevaluated&&M(e),t.return((0,c._)`${l.default.errors} === 0`))}function M({gen:e,evaluated:t,props:n,items:r}){n instanceof c.Name&&e.assign((0,c._)`${t}.props`,n),r instanceof c.Name&&e.assign((0,c._)`${t}.items`,r)}function N(e,t,n,a){let{gen:o,schema:s,data:u,allErrors:f,opts:p,self:m}=e,{RULES:h}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(s,h))){o.block(()=>oe(e,`$ref`,h.all.$ref.definition));return}p.jtd||F(e,t),o.block(()=>{for(let e of h.rules)g(e);g(h.post)});function g(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,u,p.strictNumbers)),P(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):P(e,d),f||o.if((0,c._)`${l.default.errors} === ${a||0}`))}}function P(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&oe(e,n.keyword,n.definition,t.type)})}function F(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(I(e,t),e.opts.allowUnionTypes||L(e,t),ee(e,e.dataTypes))}function I(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{ne(e.dataTypes,t)||ie(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),re(e,t)}}function L(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&ie(e,`use allowUnionTypes to allow union type keyword`)}function ee(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>te(t,e))&&ie(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function te(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function ne(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function re(e,t){let n=[];for(let r of e.dataTypes)ne(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function ie(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var ae=class{constructor(e,t,n){if((0,o.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,le(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,l.default.errors))}result(e,t,n){this.failResult((0,c.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,c.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,c._)`${t} !== undefined && (${(0,c.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=c.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,c.or)((0,c._)`${r} === undefined`,t)),e!==c.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,c.or)(o(),s());function o(){if(n.length){if(!(t instanceof c.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,c._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,c._)`!${n}(${t})`}return c.nil}}subschema(e,t){let n=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(n,this.it,e),(0,s.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return b(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=d.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=d.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}};e.KeywordCxt=ae;function oe(e,t,n,r){let i=new ae(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,o.funcKeywordCode)(i,n):`macro`in n?(0,o.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,o.funcKeywordCode)(i,n)}var se=/^\/(?:[^~]|~0|~1)*$/,ce=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function le(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!se.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=ce.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(u(`property/index`,s));return r[t-s]}if(s>t)throw Error(u(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,c._)`${a}${(0,c.getProperty)((0,d.unescapeJsonPointer)(e))}`,o=(0,c._)`${o} && ${a}`);return o;function u(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=le})),Ri=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),zi=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Ii();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),Bi=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=J(),n=Ri(),r=Ei(),i=Ii(),a=Y(),o=Li(),s=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=s;function c(e){let a=d.call(this,e);if(a)return a;let s=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:u}=this.opts,f=new t.CodeGen(this.scope,{es5:c,lines:l,ownProperties:u}),p;e.$async&&(p=f.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let m=f.scopeName(`validate`);e.validateName=m;let h={gen:f,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:s,baseId:e.baseId||s,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,o.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);let n=f.toString();g=`${f.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:m,validateCode:n,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=c;function l(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=p.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new s({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=u.call(this,a)}e.resolveRef=l;function u(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:c.call(this,e)}function d(e){for(let t of this._compilations)if(f(t,e))return t}e.getCompilingSchema=d;function f(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||m.call(this,e,t)}function m(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return g.call(this,n,e);let o=(0,i.normalizeId)(r),l=this.refs[o]||this.schemas[o];if(typeof l==`string`){let t=m.call(this,e,l);return typeof t?.schema==`object`?g.call(this,n,t):void 0}if(typeof l?.schema==`object`){if(l.validate||c.call(this,l),o===(0,i.normalizeId)(t)){let{schema:t}=l,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new s({schema:t,schemaId:n,root:e,baseId:a})}return g.call(this,n,l)}}e.resolveSchema=m;var h=new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function g(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!h.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=m.call(this,r,e)}let{schemaId:c}=this.opts;if(o||=new s({schema:n,schemaId:c,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),Vi=c({$id:()=>Hi,additionalProperties:()=>!1,default:()=>Ji,description:()=>Ui,properties:()=>Ki,required:()=>Gi,type:()=>Wi},1),Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi=o((()=>{Hi=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,Ui=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,Wi=`object`,Gi=[`$data`],Ki={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},Ji={$id:Hi,description:Ui,type:Wi,required:Gi,properties:Ki,additionalProperties:!1}})),Xi=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Ut();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),Zi=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Li();Object.defineProperty(e,`KeywordCxt`,{enumerable:!0,get:function(){return t.KeywordCxt}});var n=J();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,`CodeGen`,{enumerable:!0,get:function(){return n.CodeGen}});var r=Ri(),i=zi(),a=ki(),o=Bi(),s=J(),c=Ii(),l=ji(),u=Y(),f=(Yi(),d(Vi).default),p=Xi(),m=(e,t)=>new RegExp(e,t);m.code=`new RegExp`;var h=[`removeAdditional`,`useDefaults`,`coerceTypes`],g=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),_={errorDataPath:``,format:"`validateFormats: false` can be used instead.",nullable:`"nullable" keyword is supported by default.`,jsonPointers:`Deprecated jsPropertySyntax can be used instead.`,extendRefs:`Deprecated ignoreKeywordsWithRef can be used instead.`,missingRefs:`Pass empty schema with $id that should be ignored to ajv.addSchema.`,processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:`"uniqueItems" keyword is always validated.`,unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:`Map is used as cache, schema object as key.`,serialize:`Map is used as cache, schema object as key.`,ajvErrors:`It is default now.`},v={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`},y=200;function b(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??m,a=e.uriResolver??p.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??y,loopEnum:e.loopEnum??y,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var x=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:t,lines:n}),this.logger=k(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),S.call(this,_,e,`NOT SUPPORTED`),S.call(this,v,e,`DEPRECATED`,`warn`),this._metaOpts=D.call(this),e.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&E.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=f;n===`id`&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await a.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function a(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await a.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=C.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:n});if(t=o.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=C.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,c.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(j.call(this,n,t),!t)return(0,u.eachItem)(n,e=>M.call(this,e)),this;P.call(this,t);let r={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(n,r.type.length===0?e=>M.call(this,e,r):e=>r.type.forEach(t=>M.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=I(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e==`object`)a=e[s];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let l=this._cache.get(e);if(l!==void 0)return l;n=(0,c.normalizeId)(a||n);let u=c.getSchemaRefs.call(this,e,n);return l=new o.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=l),r&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):o.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,e)}finally{this.opts=t}}};x.ValidationError=r.default,x.MissingRefError=i.default,e.default=x;function S(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function C(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function T(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function E(e){if(Array.isArray(e)){this.addVocabulary(e);return}for(let t in this.logger.warn(`keywords option as map is deprecated, pass array`),e){let n=e[t];n.keyword||=t,this.addKeyword(n)}}function D(){let e={...this.opts};for(let t of h)delete e[t];return e}var O={log(){},warn(){},error(){}};function k(e){if(e===!1)return O;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}var A=/^[a-z_$][a-z0-9_$:-]*$/i;function j(e,t){let{RULES:n}=this;if((0,u.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!A.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function M(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?N.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function N(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function P(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=I(t)),e.validateSchema=this.compile(t,!0))}var F={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function I(e){return{anyOf:[e,F]}}})),Qi=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),$i=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.callRef=e.getValidate=void 0;var t=zi(),n=X(),r=J(),i=Ei(),a=Bi(),o=Y(),s={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:u,validateName:d,opts:f,self:p}=o,{root:m}=u;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);if(h instanceof a.SchemaEnv)return _(h);return v(h);function g(){if(u===m)return l(e,d,u,u.$async);let t=n.scopeValue(`root`,{ref:m});return l(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){l(e,c(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,f.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function c(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=c;function l(e,t,a,s){let{gen:c,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,p=f.passContext?i.default.this:r.nil;s?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=c.let(`valid`);c.try(()=>{c.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||c.assign(i,!0)},e=>{c.if((0,r._)`!(${e} instanceof ${l.ValidationError})`,()=>c.throw(e)),g(e),u||c.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;c.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),c.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!l.opts.unevaluated)return;let t=a?.validate?.evaluated;if(l.props!==!0)if(t&&!t.dynamicProps)t.props!==void 0&&(l.props=o.mergeEvaluated.props(c,t.props,l.props));else{let t=c.var(`props`,(0,r._)`${e}.evaluated.props`);l.props=o.mergeEvaluated.props(c,t,l.props,r.Name)}if(l.items!==!0)if(t&&!t.dynamicItems)t.items!==void 0&&(l.items=o.mergeEvaluated.items(c,t.items,l.items));else{let t=c.var(`items`,(0,r._)`${e}.evaluated.items`);l.items=o.mergeEvaluated.items(c,t,l.items,r.Name)}}}e.callRef=l,e.default=s})),ea=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Qi(),n=$i();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),ta=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=J(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}})),na=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=J();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),ra=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}e.default=t,t.code=`require("ajv/dist/runtime/ucs2length").default`})),ia=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=J(),n=Y(),r=ra();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),aa=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=X(),n=J();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,n.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,n._)`{pattern: ${e}}`},code(e){let{data:r,$data:i,schema:a,schemaCode:o,it:s}=e,c=s.opts.unicodeRegExp?`u`:``,l=i?(0,n._)`(new RegExp(${o}, ${c}))`:(0,t.usePattern)(e,a);e.fail$data((0,n._)`!${l}.test(${r})`)}}})),oa=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=J();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),sa=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=X(),n=J(),r=Y();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),ca=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=J();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),la=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=wt();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),ua=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=ji(),n=J(),r=Y(),i=la();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),da=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=J(),n=Y(),r=la();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),fa=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=J(),n=Y(),r=la();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??=(0,n.useFunc)(i,r.default),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),pa=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=ta(),n=na(),r=ia(),i=aa(),a=oa(),o=sa(),s=ca(),c=ua(),l=da(),u=fa();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),ma=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateAdditionalItems=void 0;var t=J(),n=Y(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`);return}i(e,a)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),ha=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateTuple=void 0;var t=J(),n=Y(),r=X(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,!(0,n.alwaysValidSchema)(i,t)&&e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),ga=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=ha();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),_a=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=J(),n=Y(),r=X(),i=ma();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,!(0,n.alwaysValidSchema)(o,t)&&(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),va=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=J(),n=Y();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),ya=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=J(),n=Y(),r=X();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e},
19
+ missingProperty: ${i},
20
+ depsCount: ${n},
21
+ deps: ${r}}`};var i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);o(e,t),s(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function o(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=o;function s(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=s,e.default=i})),ba=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=J(),n=Y();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),xa=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=X(),n=J(),r=Ei(),i=Y();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1){_(t);return}if(o===!1){e.setParams({additionalProperty:t}),e.error(),d||a.break();return}if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),Sa=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Li(),n=X(),r=Y(),i=xa();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),Ca=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=X(),n=J(),r=Y(),i=Y();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),wa=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Y();e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),Ta=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:X().validateUnion,error:{message:`must match a schema in anyOf`}}})),Ea=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=J(),n=Y();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),Da=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Y();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),Oa=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=J(),n=Y(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),ka=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Y();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),Aa=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=ma(),n=ga(),r=ha(),i=_a(),a=va(),o=ya(),s=ba(),c=xa(),l=Sa(),u=Ca(),d=wa(),f=Ta(),p=Ea(),m=Da(),h=Oa(),g=ka();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),ja=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=J();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),Ma=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=[ja().default]})),Na=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),Pa=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=ea(),n=pa(),r=Aa(),i=Ma(),a=Na();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),Fa=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),Ia=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=J(),n=Fa(),r=Bi(),i=zi(),a=Y();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();for(let e in o.if(!1),r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;e<d.length;e++){let c=d[e];if(c?.$ref&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)){let e=c.$ref;if(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),c instanceof r.SchemaEnv&&(c=c.schema),c===void 0)throw new i.default(u.opts.uriResolver,u.baseId,e)}let l=c?.properties?.[f];if(typeof l!=`object`)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n&&=t||o(c),s(l,e)}if(!n)throw Error(`discriminator: "${f}" must be required`);return e;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)c(e.const,t);else if(e.enum)for(let n of e.enum)c(n,t);else throw Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function c(t,n){if(typeof t!=`string`||t in e)throw Error(`discriminator: "${f}" values must be unique strings`);e[t]=n}}}}})),La=c({$id:()=>za,$schema:()=>Ra,default:()=>Wa,definitions:()=>Va,properties:()=>Ua,title:()=>Ba,type:()=>Ha},1),Ra,za,Ba,Va,Ha,Ua,Wa,Ga=o((()=>{Ra=`http://json-schema.org/draft-07/schema#`,za=`http://json-schema.org/draft-07/schema#`,Ba=`Core schema meta-schema`,Va={schemaArray:{type:`array`,minItems:1,items:{$ref:`#`}},nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:`#/definitions/nonNegativeInteger`},{default:0}]},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},Ha=[`object`,`boolean`],Ua={$id:{type:`string`,format:`uri-reference`},$schema:{type:`string`,format:`uri`},$ref:{type:`string`,format:`uri-reference`},$comment:{type:`string`},title:{type:`string`},description:{type:`string`},default:!0,readOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/definitions/nonNegativeInteger`},minLength:{$ref:`#/definitions/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},additionalItems:{$ref:`#`},items:{anyOf:[{$ref:`#`},{$ref:`#/definitions/schemaArray`}],default:!0},maxItems:{$ref:`#/definitions/nonNegativeInteger`},minItems:{$ref:`#/definitions/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},contains:{$ref:`#`},maxProperties:{$ref:`#/definitions/nonNegativeInteger`},minProperties:{$ref:`#/definitions/nonNegativeIntegerDefault0`},required:{$ref:`#/definitions/stringArray`},additionalProperties:{$ref:`#`},definitions:{type:`object`,additionalProperties:{$ref:`#`},default:{}},properties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$ref:`#`},propertyNames:{format:`regex`},default:{}},dependencies:{type:`object`,additionalProperties:{anyOf:[{$ref:`#`},{$ref:`#/definitions/stringArray`}]}},propertyNames:{$ref:`#`},const:!0,enum:{type:`array`,items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:`#/definitions/simpleTypes`},{type:`array`,items:{$ref:`#/definitions/simpleTypes`},minItems:1,uniqueItems:!0}]},format:{type:`string`},contentMediaType:{type:`string`},contentEncoding:{type:`string`},if:{$ref:`#`},then:{$ref:`#`},else:{$ref:`#`},allOf:{$ref:`#/definitions/schemaArray`},anyOf:{$ref:`#/definitions/schemaArray`},oneOf:{$ref:`#/definitions/schemaArray`},not:{$ref:`#`}},Wa={$schema:Ra,$id:za,title:Ba,definitions:Va,type:Ha,properties:Ua,default:!0}})),Ka=s(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;var n=Zi(),r=Pa(),i=Ia(),a=(Ga(),d(La).default),o=[`/properties`],s=`http://json-schema.org/draft-07/schema`,c=class extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(e,s,!1),this.refs[`http://json-schema.org/schema`]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,`__esModule`,{value:!0}),e.default=c;var l=Li();Object.defineProperty(e,`KeywordCxt`,{enumerable:!0,get:function(){return l.KeywordCxt}});var u=J();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,`CodeGen`,{enumerable:!0,get:function(){return u.CodeGen}});var f=Ri();Object.defineProperty(e,`ValidationError`,{enumerable:!0,get:function(){return f.default}});var p=zi();Object.defineProperty(e,`MissingRefError`,{enumerable:!0,get:function(){return p.default}})})),qa=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.formatLimitDefinition=void 0;var t=Ka(),n=J(),r=n.operators,i={formatMaximum:{okStr:`<=`,ok:r.LTE,fail:r.GT},formatMinimum:{okStr:`>=`,ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:`<`,ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:`>`,ok:r.GT,fail:r.LTE}};e.formatLimitDefinition={keyword:Object.keys(i),type:`string`,schemaType:`string`,$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,n.str)`should be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,n._)`{comparison: ${i[e].okStr}, limit: ${t}}`},code(e){let{gen:r,data:a,schemaCode:o,keyword:s,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;let d=new t.KeywordCxt(c,u.RULES.all.format.definition,`format`);d.$data?f():p();function f(){let t=r.scopeValue(`formats`,{ref:u.formats,code:l.code.formats}),i=r.const(`fmt`,(0,n._)`${t}[${d.schemaCode}]`);e.fail$data((0,n.or)((0,n._)`typeof ${i} != "object"`,(0,n._)`${i} instanceof RegExp`,(0,n._)`typeof ${i}.compare != "function"`,m(i)))}function p(){let t=d.schema,i=u.formats[t];if(!i||i===!0)return;if(typeof i!=`object`||i instanceof RegExp||typeof i.compare!=`function`)throw Error(`"${s}": format "${t}" does not define "compare" function`);let a=r.scopeValue(`formats`,{key:t,ref:i,code:l.code.formats?(0,n._)`${l.code.formats}${(0,n.getProperty)(t)}`:void 0});e.fail$data(m(a))}function m(e){return(0,n._)`${e}.compare(${a}, ${o}) ${i[s].fail} 0`}},dependencies:[`format`]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)})),Ja=s(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=Ci(),r=qa(),i=J(),a=new i.Name(`fullFormats`),o=new i.Name(`fastFormats`),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,n.fullFormats,a),e;let[i,s]=t.mode===`fast`?[n.fastFormats,o]:[n.fullFormats,a];return c(e,t.formats||n.formatNames,i,s),t.keywords&&(0,r.default)(e),e};s.get=(e,t=`full`)=>{let r=(t===`fast`?n.fastFormats:n.fullFormats)[e];if(!r)throw Error(`Unknown format "${e}"`);return r};function c(e,t,n,r){var a;(a=e.opts.code).formats??(a.formats=(0,i._)`require("ajv-formats/dist/formats").${r}`);for(let r of t)e.addFormat(r,n[r])}t.exports=e=s,Object.defineProperty(e,`__esModule`,{value:!0}),e.default=s})),Ya=u(Ja(),1),Xa=Si(),Za=(e,t,n,r)=>{if(n===`length`||n===`prototype`||n===`arguments`||n===`caller`)return;let i=Object.getOwnPropertyDescriptor(e,n),a=Object.getOwnPropertyDescriptor(t,n);!Qa(i,a)&&r||Object.defineProperty(e,n,a)},Qa=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},$a=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},eo=(e,t)=>`/* Wrapped ${e}*/\n${t}`,to=Object.getOwnPropertyDescriptor(Function.prototype,`toString`),no=Object.getOwnPropertyDescriptor(Function.prototype.toString,`name`),ro=(e,t,n)=>{let r=n===``?``:`with ${n.trim()}() `,i=eo.bind(null,r,t.toString());Object.defineProperty(i,`name`,no);let{writable:a,enumerable:o,configurable:s}=to;Object.defineProperty(e,`toString`,{value:i,writable:a,enumerable:o,configurable:s})};function io(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let r of Reflect.ownKeys(t))Za(e,t,r,n);return $a(e,t),ro(e,t,r),e}var ao=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected the first argument to be a function, got \`${typeof e}\``);let{wait:n=0,maxWait:r=1/0,before:i=!1,after:a=!0}=t;if(n<0||r<0)throw RangeError("`wait` and `maxWait` must not be negative.");if(!i&&!a)throw Error("Both `before` and `after` are false, function wouldn't be called.");let o,s,c,l=function(...t){let l=this,u=()=>{o=void 0,s&&=(clearTimeout(s),void 0),a&&(c=e.apply(l,t))},d=()=>{s=void 0,o&&=(clearTimeout(o),void 0),a&&(c=e.apply(l,t))},f=i&&!o;return clearTimeout(o),o=setTimeout(u,n),r>0&&r!==1/0&&!s&&(s=setTimeout(d,r)),f&&(c=e.apply(l,t)),c};return io(l,e),l.cancel=()=>{o&&=(clearTimeout(o),void 0),s&&=(clearTimeout(s),void 0)},l},oo=ao,so=s(((e,t)=>{var n=`2.0.0`,r=256;t.exports={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:r-6,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:n,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),co=s(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),lo=s(((e,t)=>{var{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=so(),a=co();e=t.exports={};var o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),uo=s(((e,t)=>{var n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),fo=s(((e,t)=>{var n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),Z=s(((e,t)=>{var n=co(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=so(),{safeRe:a,t:o}=lo(),s=uo(),{compareIdentifiers:c}=fo();t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),c(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),po=s(((e,t)=>{var n=Z();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),mo=s(((e,t)=>{var n=po();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),ho=s(((e,t)=>{var n=po();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),go=s(((e,t)=>{var n=Z();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),_o=s(((e,t)=>{var n=po();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),vo=s(((e,t)=>{var n=Z();t.exports=(e,t)=>new n(e,t).major})),yo=s(((e,t)=>{var n=Z();t.exports=(e,t)=>new n(e,t).minor})),bo=s(((e,t)=>{var n=Z();t.exports=(e,t)=>new n(e,t).patch})),xo=s(((e,t)=>{var n=po();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),Q=s(((e,t)=>{var n=Z();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),So=s(((e,t)=>{var n=Q();t.exports=(e,t,r)=>n(t,e,r)})),Co=s(((e,t)=>{var n=Q();t.exports=(e,t)=>n(e,t,!0)})),wo=s(((e,t)=>{var n=Z();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),To=s(((e,t)=>{var n=wo();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),Eo=s(((e,t)=>{var n=wo();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),Do=s(((e,t)=>{var n=Q();t.exports=(e,t,r)=>n(e,t,r)>0})),Oo=s(((e,t)=>{var n=Q();t.exports=(e,t,r)=>n(e,t,r)<0})),ko=s(((e,t)=>{var n=Q();t.exports=(e,t,r)=>n(e,t,r)===0})),Ao=s(((e,t)=>{var n=Q();t.exports=(e,t,r)=>n(e,t,r)!==0})),jo=s(((e,t)=>{var n=Q();t.exports=(e,t,r)=>n(e,t,r)>=0})),Mo=s(((e,t)=>{var n=Q();t.exports=(e,t,r)=>n(e,t,r)<=0})),No=s(((e,t)=>{var n=ko(),r=Ao(),i=Do(),a=jo(),o=Oo(),s=Mo();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),Po=s(((e,t)=>{var n=Z(),r=po(),{safeRe:i,t:a}=lo();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)}})),Fo=s(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),$=s(((e,t)=>{var n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!h(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&g(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,O(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[l.COMPARATORTRIM],u),o(`comparator trim`,e),e=e.replace(c[l.TILDETRIM],d),o(`tilde trim`,e),e=e.replace(c[l.CARETTRIM],f),o(`caret trim`,e);let g=e.split(` `).map(e=>v(e,this.options)).join(` `).split(/\s+/).map(e=>D(e,this.options));i&&(g=g.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),o(`range list`,g);let _=new Map,y=g.map(e=>new a(e,this.options));for(let e of y){if(h(e))return[e];_.set(e.value,e)}_.size>1&&_.has(``)&&_.delete(``);let b=[..._.values()];return r.set(t,b),b}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>_(e,n)&&t.set.some(t=>_(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(k(this.set[t],e,this.options))return!0;return!1}};var r=new(Fo()),i=uo(),a=Io(),o=co(),s=Z(),{safeRe:c,t:l,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=lo(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=so(),h=e=>e.value===`<0.0.0-0`,g=e=>e.value===``,_=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},v=(e,t)=>(e=e.replace(c[l.BUILD],``),o(`comp`,e,t),e=S(e,t),o(`caret`,e),e=b(e,t),o(`tildes`,e),e=w(e,t),o(`xrange`,e),e=E(e,t),o(`stars`,e),e),y=e=>!e||e.toLowerCase()===`x`||e===`*`,b=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(` `),x=(e,t)=>{let n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(t,n,r,i,a)=>{o(`tilde`,e,t,n,r,i,a);let s;return y(n)?s=``:y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o(`replaceTilde pr`,a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o(`tilde return`,s),s})},S=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(` `),C=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return y(n)?c=``:y(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},w=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>T(e,t)).join(` `)),T=(e,t)=>{e=e.trim();let n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{o(`xRange`,e,n,r,i,a,s,c);let l=y(i),u=l||y(a),d=u||y(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},E=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[l.STAR],``)),D=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],``)),O=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=y(r)?``:y(i)?`>=${r}.0.0${e?`-0`:``}`:y(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=y(l)?``:y(u)?`<${+l+1}.0.0-0`:y(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),k=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),Io=s(((e,t)=>{var n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new l(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};var r=uo(),{safeRe:i,t:a}=lo(),o=No(),s=co(),c=Z(),l=$()})),Lo=s(((e,t)=>{var n=$();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),Ro=s(((e,t)=>{var n=$();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),zo=s(((e,t)=>{var n=Z(),r=$();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),Bo=s(((e,t)=>{var n=Z(),r=$();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),Vo=s(((e,t)=>{var n=Z(),r=$(),i=Do();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),Ho=s(((e,t)=>{var n=$();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),Uo=s(((e,t)=>{var n=Z(),r=Io(),{ANY:i}=r,a=$(),o=Lo(),s=Do(),c=Oo(),l=Mo(),u=jo();t.exports=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(d){case`>`:p=s,m=l,h=c,g=`>`,_=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0}})),Wo=s(((e,t)=>{var n=Uo();t.exports=(e,t,r)=>n(e,t,`>`,r)})),Go=s(((e,t)=>{var n=Uo();t.exports=(e,t,r)=>n(e,t,`<`,r)})),Ko=s(((e,t)=>{var n=$();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),qo=s(((e,t)=>{var n=Lo(),r=Q();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),Jo=s(((e,t)=>{var n=$(),r=Io(),{ANY:i}=r,a=Lo(),o=Q(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!a(s.semver,String(e),n))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),Yo=s(((e,t)=>{var n=lo(),r=so(),i=Z(),a=fo();t.exports={parse:po(),valid:mo(),clean:ho(),inc:go(),diff:_o(),major:vo(),minor:yo(),patch:bo(),prerelease:xo(),compare:Q(),rcompare:So(),compareLoose:Co(),compareBuild:wo(),sort:To(),rsort:Eo(),gt:Do(),lt:Oo(),eq:ko(),neq:Ao(),gte:jo(),lte:Mo(),cmp:No(),coerce:Po(),Comparator:Io(),Range:$(),satisfies:Lo(),toComparators:Ro(),maxSatisfying:zo(),minSatisfying:Bo(),minVersion:Vo(),validRange:Ho(),outside:Uo(),gtr:Wo(),ltr:Go(),intersects:Ko(),simplifyRange:qo(),subset:Jo(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}})),Xo=u(Yo(),1),Zo=Object.prototype.toString,Qo=`[object Uint8Array]`,$o=`[object ArrayBuffer]`;function es(e,t,n){return e?e.constructor===t?!0:Zo.call(e)===n:!1}function ts(e){return es(e,Uint8Array,Qo)}function ns(e){return es(e,ArrayBuffer,$o)}function rs(e){return ts(e)||ns(e)}function is(e){if(!ts(e))throw TypeError(`Expected \`Uint8Array\`, got \`${typeof e}\``)}function as(e){if(!rs(e))throw TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``)}function os(e,t){if(e.length===0)return new Uint8Array;t??=e.reduce((e,t)=>e+t.length,0);let n=new Uint8Array(t),r=0;for(let t of e)is(t),n.set(t,r),r+=t.length;return n}var ss={utf8:new globalThis.TextDecoder(`utf8`)};function cs(e,t=`utf8`){return as(e),ss[t]??=new globalThis.TextDecoder(t),ss[t].decode(e)}function ls(e){if(typeof e!=`string`)throw TypeError(`Expected \`string\`, got \`${typeof e}\``)}var us=new globalThis.TextEncoder;function ds(e){return ls(e),us.encode(e)}var fs=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`)),ps=`aes-256-cbc`,ms=()=>Object.create(null),hs=e=>e!==void 0,gs=(e,t)=>{let n=new Set([`undefined`,`symbol`,`function`]),r=typeof t;if(n.has(r))throw TypeError(`Setting a value of type \`${r}\` for key \`${e}\` is not allowed as it's not supported by JSON`)},_s=`__internal__`,vs=`${_s}.migrations.version`,ys=class{path;events;#e;#t;#n;#r={};#i=!1;#a;#o;#s;constructor(e={}){let t=this.#c(e);this.#n=t,this.#l(t),this.#d(t),this.#f(t),this.events=new EventTarget,this.#t=t.encryptionKey,this.path=this.#p(t),this.#m(t),t.watch&&this._watch()}get(e,t){if(this.#n.accessPropertiesByDotNotation)return this._get(e,t);let{store:n}=this;return e in n?n[e]:t}set(e,t){if(typeof e!=`string`&&typeof e!=`object`)throw TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof e}`);if(typeof e!=`object`&&t===void 0)throw TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw TypeError(`Please don't use the ${_s} key, as it's used to manage this module internal operations.`);let{store:n}=this,r=(e,t)=>{if(gs(e,t),this.#n.accessPropertiesByDotNotation)Ee(n,e,t);else{if(e===`__proto__`||e===`constructor`||e===`prototype`)return;n[e]=t}};if(typeof e==`object`){let t=e;for(let[e,n]of Object.entries(t))r(e,n)}else r(e,t);this.store=n}has(e){return this.#n.accessPropertiesByDotNotation?Oe(this.store,e):e in this.store}appendToArray(e,t){gs(e,t);let n=this.#n.accessPropertiesByDotNotation?this._get(e,[]):e in this.store?this.store[e]:[];if(!Array.isArray(n))throw TypeError(`The key \`${e}\` is already set to a non-array value`);this.set(e,[...n,t])}reset(...e){for(let t of e)hs(this.#r[t])&&this.set(t,this.#r[t])}delete(e){let{store:t}=this;this.#n.accessPropertiesByDotNotation?De(t,e):delete t[e],this.store=t}clear(){let e=ms();for(let t of Object.keys(this.#r))hs(this.#r[t])&&(gs(t,this.#r[t]),this.#n.accessPropertiesByDotNotation?Ee(e,t,this.#r[t]):e[t]=this.#r[t]);this.store=e}onDidChange(e,t){if(typeof e!=`string`)throw TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof e}`);if(typeof t!=`function`)throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof t}`);return this._handleValueChange(()=>this.get(e),t)}onDidAnyChange(e){if(typeof e!=`function`)throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof e}`);return this._handleStoreChange(e)}get size(){return Object.keys(this.store).filter(e=>!this._isReservedKeyPath(e)).length}get store(){try{let e=g.default.readFileSync(this.path,this.#t?null:`utf8`),t=this._decryptData(e),n=this._deserialize(t);return this.#i||this._validate(n),Object.assign(ms(),n)}catch(e){if(e?.code===`ENOENT`)return this._ensureDirectory(),ms();if(this.#n.clearInvalidConfig){let t=e;if(t.name===`SyntaxError`||t.message?.startsWith(`Config schema violation:`))return ms()}throw e}}set store(e){if(this._ensureDirectory(),!Oe(e,_s))try{let t=g.default.readFileSync(this.path,this.#t?null:`utf8`),n=this._decryptData(t),r=this._deserialize(n);Oe(r,_s)&&Ee(e,_s,Te(r,_s))}catch{}this.#i||this._validate(e),this._write(e),this.events.dispatchEvent(new Event(`change`))}*[Symbol.iterator](){for(let[e,t]of Object.entries(this.store))this._isReservedKeyPath(e)||(yield[e,t])}_closeWatcher(){this.#a&&=(this.#a.close(),void 0),this.#o&&=(g.default.unwatchFile(this.path),!1),this.#s=void 0}_decryptData(e){if(!this.#t)return typeof e==`string`?e:cs(e);try{let t=e.slice(0,16),n=_.default.pbkdf2Sync(this.#t,t,1e4,32,`sha512`),r=_.default.createDecipheriv(ps,n,t),i=e.slice(17),a=typeof i==`string`?ds(i):i;return cs(os([r.update(a),r.final()]))}catch{try{let t=e.slice(0,16),n=_.default.pbkdf2Sync(this.#t,t.toString(),1e4,32,`sha512`),r=_.default.createDecipheriv(ps,n,t),i=e.slice(17),a=typeof i==`string`?ds(i):i;return cs(os([r.update(a),r.final()]))}catch{}}return typeof e==`string`?e:cs(e)}_handleStoreChange(e){let t=this.store,n=()=>{let n=t,r=this.store;(0,h.isDeepStrictEqual)(r,n)||(t=r,e.call(this,r,n))};return this.events.addEventListener(`change`,n),()=>{this.events.removeEventListener(`change`,n)}}_handleValueChange(e,t){let n=e(),r=()=>{let r=n,i=e();(0,h.isDeepStrictEqual)(i,r)||(n=i,t.call(this,i,r))};return this.events.addEventListener(`change`,r),()=>{this.events.removeEventListener(`change`,r)}}_deserialize=e=>JSON.parse(e);_serialize=e=>JSON.stringify(e,void 0,` `);_validate(e){if(!this.#e||this.#e(e)||!this.#e.errors)return;let t=this.#e.errors.map(({instancePath:e,message:t=``})=>`\`${e.slice(1)}\` ${t}`);throw Error(`Config schema violation: `+t.join(`; `))}_ensureDirectory(){g.default.mkdirSync(m.default.dirname(this.path),{recursive:!0})}_write(e){let t=this._serialize(e);if(this.#t){let e=_.default.randomBytes(16),n=_.default.pbkdf2Sync(this.#t,e,1e4,32,`sha512`),r=_.default.createCipheriv(ps,n,e);t=os([e,ds(`:`),r.update(ds(t)),r.final()])}if(p.default.env.SNAP)g.default.writeFileSync(this.path,t,{mode:this.#n.configFileMode});else try{pt(this.path,t,{mode:this.#n.configFileMode})}catch(e){if(e?.code===`EXDEV`){g.default.writeFileSync(this.path,t,{mode:this.#n.configFileMode});return}throw e}}_watch(){if(this._ensureDirectory(),g.default.existsSync(this.path)||this._write(ms()),p.default.platform===`win32`||p.default.platform===`darwin`){this.#s??=oo(()=>{this.events.dispatchEvent(new Event(`change`))},{wait:100});let e=m.default.dirname(this.path),t=m.default.basename(this.path);this.#a=g.default.watch(e,{persistent:!1,encoding:`utf8`},(e,n)=>{n&&n!==t||typeof this.#s==`function`&&this.#s()})}else this.#s??=oo(()=>{this.events.dispatchEvent(new Event(`change`))},{wait:1e3}),g.default.watchFile(this.path,{persistent:!1},(e,t)=>{typeof this.#s==`function`&&this.#s()}),this.#o=!0}_migrate(e,t,n){let r=this._get(vs,`0.0.0`),i=Object.keys(e).filter(e=>this._shouldPerformMigration(e,r,t)),a=structuredClone(this.store);for(let o of i)try{n&&n(this,{fromVersion:r,toVersion:o,finalVersion:t,versions:i});let s=e[o];s?.(this),this._set(vs,o),r=o,a=structuredClone(this.store)}catch(e){this.store=a;try{this._write(a)}catch{}let t=e instanceof Error?e.message:String(e);throw Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${t}`)}(this._isVersionInRangeFormat(r)||!Xo.default.eq(r,t))&&this._set(vs,t)}_containsReservedKey(e){return typeof e==`string`?this._isReservedKeyPath(e):!e||typeof e!=`object`?!1:this._objectContainsReservedKey(e)}_objectContainsReservedKey(e){if(!e||typeof e!=`object`)return!1;for(let[t,n]of Object.entries(e))if(this._isReservedKeyPath(t)||this._objectContainsReservedKey(n))return!0;return!1}_isReservedKeyPath(e){return e===_s||e.startsWith(`${_s}.`)}_isVersionInRangeFormat(e){return Xo.default.clean(e)===null}_shouldPerformMigration(e,t,n){return this._isVersionInRangeFormat(e)?t!==`0.0.0`&&Xo.default.satisfies(t,e)?!1:Xo.default.satisfies(n,e):!(Xo.default.lte(e,t)||Xo.default.gt(e,n))}_get(e,t){return Te(this.store,e,t)}_set(e,t){let{store:n}=this;Ee(n,e,t),this.store=n}#c(e){let t={configName:`config`,fileExtension:`json`,projectSuffix:`nodejs`,clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...e};if(!t.cwd){if(!t.projectName)throw Error("Please specify the `projectName` option.");t.cwd=Fe(t.projectName,{suffix:t.projectSuffix}).config}return typeof t.fileExtension==`string`&&(t.fileExtension=t.fileExtension.replace(/^\.+/,``)),t}#l(e){if(!(e.schema??e.ajvOptions??e.rootSchema))return;if(e.schema&&typeof e.schema!=`object`)throw TypeError("The `schema` option must be an object.");let t=Ya.default.default,n=new Xa.Ajv2020({allErrors:!0,useDefaults:!0,...e.ajvOptions});t(n);let r={...e.rootSchema,type:`object`,properties:e.schema};this.#e=n.compile(r),this.#u(e.schema)}#u(e){let t=Object.entries(e??{});for(let[e,n]of t){if(!n||typeof n!=`object`||!Object.hasOwn(n,`default`))continue;let{default:t}=n;t!==void 0&&(this.#r[e]=t)}}#d(e){e.defaults&&Object.assign(this.#r,e.defaults)}#f(e){e.serialize&&(this._serialize=e.serialize),e.deserialize&&(this._deserialize=e.deserialize)}#p(e){let t=typeof e.fileExtension==`string`?e.fileExtension:void 0,n=t?`.${t}`:``;return m.default.resolve(e.cwd,`${e.configName??`config`}${n}`)}#m(e){if(e.migrations){this.#h(e),this._validate(this.store);return}let t=this.store,n=Object.assign(ms(),e.defaults??{},t);this._validate(n);try{v.default.deepEqual(t,n)}catch{this.store=n}}#h(e){let{migrations:t,projectVersion:n}=e;if(t){if(!n)throw Error("Please specify the `projectVersion` option.");this.#i=!0;try{let r=this.store,i=Object.assign(ms(),e.defaults??{},r);try{v.default.deepEqual(r,i)}catch{this._write(i)}this._migrate(t,n,e.beforeEachMigration)}finally{this.#i=!1}}}},{app:bs,ipcMain:xs,shell:Ss}=f.default,Cs=!1,ws=()=>{if(!xs||!bs)throw Error("Electron Store: You need to call `.initRenderer()` from the main process.");let e={defaultCwd:bs.getPath(`userData`),appVersion:bs.getVersion()};return Cs?e:(xs.on(`electron-store-get-data`,t=>{t.returnValue=e}),Cs=!0,e)},Ts=class extends ys{constructor(e){let t,n;if(p.default.type===`renderer`){let e=f.default.ipcRenderer.sendSync(`electron-store-get-data`);if(!e)throw Error("Electron Store: You need to call `.initRenderer()` from the main process.");({defaultCwd:t,appVersion:n}=e)}else xs&&bs&&({defaultCwd:t,appVersion:n}=ws());e={name:`config`,...e},e.projectVersion||=n,e.cwd?e.cwd=m.default.isAbsolute(e.cwd)?e.cwd:m.default.join(t,e.cwd):e.cwd=t,e.configName=e.name,delete e.name,super(e)}static initRenderer(){ws()}async openInEditor(){let e=await Ss.openPath(this.path);if(e)throw Error(e)}},Es=s(((e,t)=>{t.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}})),Ds=s((e=>{var t={INVALID_LOC:`Invalid LOC header (bad signature)`,INVALID_CEN:`Invalid CEN header (bad signature)`,INVALID_END:`Invalid END header (bad signature)`,DESCRIPTOR_NOT_EXIST:`No descriptor present`,DESCRIPTOR_UNKNOWN:`Unknown descriptor format`,DESCRIPTOR_FAULTY:`Descriptor data is malformed`,NO_DATA:`Nothing to decompress`,BAD_CRC:`CRC32 checksum failed {0}`,FILE_IN_THE_WAY:`There is a file in the way: {0}`,UNKNOWN_METHOD:`Invalid/unsupported compression method`,AVAIL_DATA:`inflate::Available inflate data did not terminate`,INVALID_DISTANCE:`inflate::Invalid literal/length or distance code in fixed or dynamic block`,TO_MANY_CODES:`inflate::Dynamic block code description: too many length or distance codes`,INVALID_REPEAT_LEN:`inflate::Dynamic block code description: repeat more than specified lengths`,INVALID_REPEAT_FIRST:`inflate::Dynamic block code description: repeat lengths with no first length`,INCOMPLETE_CODES:`inflate::Dynamic block code description: code lengths codes incomplete`,INVALID_DYN_DISTANCE:`inflate::Dynamic block code description: invalid distance code lengths`,INVALID_CODES_LEN:`inflate::Dynamic block code description: invalid literal/length code lengths`,INVALID_STORE_BLOCK:`inflate::Stored block length did not match one's complement`,INVALID_BLOCK_TYPE:`inflate::Invalid block type (type == 3)`,CANT_EXTRACT_FILE:`Could not extract the file`,CANT_OVERRIDE:`Target file already exists`,DISK_ENTRY_TOO_LARGE:`Number of disk entries is too large`,NO_ZIP:`No zip file was loaded`,NO_ENTRY:`Entry doesn't exist`,DIRECTORY_CONTENT_ERROR:`A directory cannot have content`,FILE_NOT_FOUND:`File not found: "{0}"`,NOT_IMPLEMENTED:`Not implemented`,INVALID_FILENAME:`Invalid filename`,INVALID_FORMAT:`Invalid or unsupported zip format. No END header found`,INVALID_PASS_PARAM:`Incompatible password parameter`,WRONG_PASSWORD:`Wrong Password`,COMMENT_TOO_LONG:`Comment is too long`,EXTRA_FIELD_PARSE_ERROR:`Extra field parsing error`};function n(e){return function(...t){return t.length&&(e=e.replace(/\{(\d)\}/g,(e,n)=>t[n]||``)),Error(`ADM-ZIP: `+e)}}for(let r of Object.keys(t))e[r]=n(t[r])})),Os=s(((e,t)=>{var n=require(`fs`),r=require(`path`),i=Es(),a=Ds(),o=typeof process==`object`&&process.platform===`win32`,s=e=>typeof e==`object`&&!!e,c=new Uint32Array(256).map((e,t)=>{for(let e=0;e<8;e++)t&1?t=3988292384^t>>>1:t>>>=1;return t>>>0});function l(e){this.sep=r.sep,this.fs=n,s(e)&&s(e.fs)&&typeof e.fs.statSync==`function`&&(this.fs=e.fs)}t.exports=l,l.prototype.makeDir=function(e){let t=this;function n(e){let n=e.split(t.sep)[0];e.split(t.sep).forEach(function(e){if(!(!e||e.substr(-1,1)===`:`)){n+=t.sep+e;var r;try{r=t.fs.statSync(n)}catch{t.fs.mkdirSync(n)}if(r&&r.isFile())throw a.FILE_IN_THE_WAY(`"${n}"`)}})}n(e)},l.prototype.writeFileTo=function(e,t,n,i){let a=this;if(a.fs.existsSync(e)&&(!n||a.fs.statSync(e).isDirectory()))return!1;var o=r.dirname(e);a.fs.existsSync(o)||a.makeDir(o);var s;try{s=a.fs.openSync(e,`w`,438)}catch{a.fs.chmodSync(e,438),s=a.fs.openSync(e,`w`,438)}if(s)try{a.fs.writeSync(s,t,0,t.length,0)}finally{a.fs.closeSync(s)}return a.fs.chmodSync(e,i||438),!0},l.prototype.writeFileToAsync=function(e,t,n,i,a){typeof i==`function`&&(a=i,i=void 0);let o=this;o.fs.exists(e,function(s){if(s&&!n)return a(!1);o.fs.stat(e,function(n,c){if(s&&c.isDirectory())return a(!1);var l=r.dirname(e);o.fs.exists(l,function(n){n||o.makeDir(l),o.fs.open(e,`w`,438,function(n,r){n?o.fs.chmod(e,438,function(){o.fs.open(e,`w`,438,function(n,r){o.fs.write(r,t,0,t.length,0,function(){o.fs.close(r,function(){o.fs.chmod(e,i||438,function(){a(!0)})})})})}):r?o.fs.write(r,t,0,t.length,0,function(){o.fs.close(r,function(){o.fs.chmod(e,i||438,function(){a(!0)})})}):o.fs.chmod(e,i||438,function(){a(!0)})})})})})},l.prototype.findFiles=function(e){let t=this;function n(e,i,a){typeof i==`boolean`&&(a=i,i=void 0);let o=[];return t.fs.readdirSync(e).forEach(function(s){let c=r.join(e,s),l=t.fs.statSync(c);(!i||i.test(c))&&o.push(r.normalize(c)+(l.isDirectory()?t.sep:``)),l.isDirectory()&&a&&(o=o.concat(n(c,i,a)))}),o}return n(e,void 0,!0)},l.prototype.findFilesAsync=function(e,t){let n=this,i=[];n.fs.readdir(e,function(a,o){if(a)return t(a);let s=o.length;if(!s)return t(null,i);o.forEach(function(a){a=r.join(e,a),n.fs.stat(a,function(e,o){if(e)return t(e);o&&(i.push(r.normalize(a)+(o.isDirectory()?n.sep:``)),o.isDirectory()?n.findFilesAsync(a,function(e,n){if(e)return t(e);i=i.concat(n),--s||t(null,i)}):--s||t(null,i))})})})},l.prototype.getAttributes=function(){},l.prototype.setAttributes=function(){},l.crc32update=function(e,t){return c[(e^t)&255]^e>>>8},l.crc32=function(e){typeof e==`string`&&(e=Buffer.from(e,`utf8`));let t=e.length,n=-1;for(let r=0;r<t;)n=l.crc32update(n,e[r++]);return~n>>>0},l.methodToString=function(e){switch(e){case i.STORED:return`STORED (`+e+`)`;case i.DEFLATED:return`DEFLATED (`+e+`)`;default:return`UNSUPPORTED (`+e+`)`}},l.canonical=function(e){if(!e)return``;let t=r.posix.normalize(`/`+e.split(`\\`).join(`/`));return r.join(`.`,t)},l.zipnamefix=function(e){if(!e)return``;let t=r.posix.normalize(`/`+e.split(`\\`).join(`/`));return r.posix.join(`.`,t)},l.findLast=function(e,t){if(!Array.isArray(e))throw TypeError(`arr is not array`);let n=e.length>>>0;for(let r=n-1;r>=0;r--)if(t(e[r],r,e))return e[r]},l.sanitize=function(e,t){e=r.resolve(r.normalize(e));for(var n=t.split(`/`),i=0,a=n.length;i<a;i++){var o=r.normalize(r.join(e,n.slice(i,a).join(r.sep)));if(o.indexOf(e)===0)return o}return r.normalize(r.join(e,r.basename(t)))},l.toBuffer=function(e,t){return Buffer.isBuffer(e)?e:e instanceof Uint8Array?Buffer.from(e):typeof e==`string`?t(e):Buffer.alloc(0)},l.readBigUInt64LE=function(e,t){var n=Buffer.from(e.slice(t,t+8));return n.swap64(),parseInt(`0x${n.toString(`hex`)}`)},l.fromDOS2Date=function(e){return new Date((e>>25&127)+1980,Math.max((e>>21&15)-1,0),Math.max(e>>16&31,1),e>>11&31,e>>5&63,(e&31)<<1)},l.fromDate2DOS=function(e){let t=0,n=0;return e.getFullYear()>1979&&(t=(e.getFullYear()-1980&127)<<9|e.getMonth()+1<<5|e.getDate(),n=e.getHours()<<11|e.getMinutes()<<5|e.getSeconds()>>1),t<<16|n},l.isWin=o,l.crcTable=c})),ks=s(((e,t)=>{var n=require(`path`);t.exports=function(e,{fs:t}){var r=e||``,i=o(),a=null;function o(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return r&&t.existsSync(r)?(a=t.statSync(r),i.directory=a.isDirectory(),i.mtime=a.mtime,i.atime=a.atime,i.executable=(73&a.mode)!=0,i.readonly=(128&a.mode)==0,i.hidden=n.basename(r)[0]===`.`):console.warn(`Invalid path: `+r),{get directory(){return i.directory},get readOnly(){return i.readonly},get hidden(){return i.hidden},get mtime(){return i.mtime},get atime(){return i.atime},get executable(){return i.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:r,isDirectory:i.directory,isReadOnly:i.readonly,isHidden:i.hidden,isExecutable:i.executable,mTime:i.mtime,aTime:i.atime}},toString:function(){return JSON.stringify(this.toJSON(),null,` `)}}}})),As=s(((e,t)=>{t.exports={efs:!0,encode:e=>Buffer.from(e,`utf8`),decode:e=>e.toString(`utf8`)}})),js=s(((e,t)=>{t.exports=Os(),t.exports.Constants=Es(),t.exports.Errors=Ds(),t.exports.FileAttr=ks(),t.exports.decoder=As()})),Ms=s(((e,t)=>{var n=js(),r=n.Constants;t.exports=function(){var e=20,t=10,i=0,a=0,o=0,s=0,c=0,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0;e|=n.isWin?2560:768,i|=r.FLG_EFS;let _={extraLen:0},v=e=>Math.max(0,e)>>>0,y=e=>Math.max(0,e)&255;return o=n.fromDate2DOS(new Date),{get made(){return e},set made(t){e=t},get version(){return t},set version(e){t=e},get flags(){return i},set flags(e){i=e},get flags_efs(){return(i&r.FLG_EFS)>0},set flags_efs(e){e?i|=r.FLG_EFS:i&=~r.FLG_EFS},get flags_desc(){return(i&r.FLG_DESC)>0},set flags_desc(e){e?i|=r.FLG_DESC:i&=~r.FLG_DESC},get method(){return a},set method(e){switch(e){case r.STORED:this.version=10;case r.DEFLATED:default:this.version=20}a=e},get time(){return n.fromDOS2Date(this.timeval)},set time(e){this.timeval=n.fromDate2DOS(e)},get timeval(){return o},set timeval(e){o=v(e)},get timeHighByte(){return y(o>>>8)},get crc(){return s},set crc(e){s=v(e)},get compressedSize(){return c},set compressedSize(e){c=v(e)},get size(){return l},set size(e){l=v(e)},get fileNameLength(){return u},set fileNameLength(e){u=e},get extraLength(){return d},set extraLength(e){d=e},get extraLocalLength(){return _.extraLen},set extraLocalLength(e){_.extraLen=e},get commentLength(){return f},set commentLength(e){f=e},get diskNumStart(){return p},set diskNumStart(e){p=v(e)},get inAttr(){return m},set inAttr(e){m=v(e)},get attr(){return h},set attr(e){h=v(e)},get fileAttr(){return(h||0)>>16&4095},get offset(){return g},set offset(e){g=v(e)},get encrypted(){return(i&r.FLG_ENC)===r.FLG_ENC},get centralHeaderSize(){return r.CENHDR+u+d+f},get realDataOffset(){return g+r.LOCHDR+_.fnameLen+_.extraLen},get localHeader(){return _},loadLocalHeaderFromBinary:function(e){var t=e.slice(g,g+r.LOCHDR);if(t.readUInt32LE(0)!==r.LOCSIG)throw n.Errors.INVALID_LOC();_.version=t.readUInt16LE(r.LOCVER),_.flags=t.readUInt16LE(r.LOCFLG),_.method=t.readUInt16LE(r.LOCHOW),_.time=t.readUInt32LE(r.LOCTIM),_.crc=t.readUInt32LE(r.LOCCRC),_.compressedSize=t.readUInt32LE(r.LOCSIZ),_.size=t.readUInt32LE(r.LOCLEN),_.fnameLen=t.readUInt16LE(r.LOCNAM),_.extraLen=t.readUInt16LE(r.LOCEXT);let i=g+r.LOCHDR+_.fnameLen,a=i+_.extraLen;return e.slice(i,a)},loadFromBinary:function(_){if(_.length!==r.CENHDR||_.readUInt32LE(0)!==r.CENSIG)throw n.Errors.INVALID_CEN();e=_.readUInt16LE(r.CENVEM),t=_.readUInt16LE(r.CENVER),i=_.readUInt16LE(r.CENFLG),a=_.readUInt16LE(r.CENHOW),o=_.readUInt32LE(r.CENTIM),s=_.readUInt32LE(r.CENCRC),c=_.readUInt32LE(r.CENSIZ),l=_.readUInt32LE(r.CENLEN),u=_.readUInt16LE(r.CENNAM),d=_.readUInt16LE(r.CENEXT),f=_.readUInt16LE(r.CENCOM),p=_.readUInt16LE(r.CENDSK),m=_.readUInt16LE(r.CENATT),h=_.readUInt32LE(r.CENATX),g=_.readUInt32LE(r.CENOFF)},localHeaderToBinary:function(){var e=Buffer.alloc(r.LOCHDR);return e.writeUInt32LE(r.LOCSIG,0),e.writeUInt16LE(t,r.LOCVER),e.writeUInt16LE(i,r.LOCFLG),e.writeUInt16LE(a,r.LOCHOW),e.writeUInt32LE(o,r.LOCTIM),e.writeUInt32LE(s,r.LOCCRC),e.writeUInt32LE(c,r.LOCSIZ),e.writeUInt32LE(l,r.LOCLEN),e.writeUInt16LE(u,r.LOCNAM),e.writeUInt16LE(_.extraLen,r.LOCEXT),e},centralHeaderToBinary:function(){var n=Buffer.alloc(r.CENHDR+u+d+f);return n.writeUInt32LE(r.CENSIG,0),n.writeUInt16LE(e,r.CENVEM),n.writeUInt16LE(t,r.CENVER),n.writeUInt16LE(i,r.CENFLG),n.writeUInt16LE(a,r.CENHOW),n.writeUInt32LE(o,r.CENTIM),n.writeUInt32LE(s,r.CENCRC),n.writeUInt32LE(c,r.CENSIZ),n.writeUInt32LE(l,r.CENLEN),n.writeUInt16LE(u,r.CENNAM),n.writeUInt16LE(d,r.CENEXT),n.writeUInt16LE(f,r.CENCOM),n.writeUInt16LE(p,r.CENDSK),n.writeUInt16LE(m,r.CENATT),n.writeUInt32LE(h,r.CENATX),n.writeUInt32LE(g,r.CENOFF),n},toJSON:function(){let o=function(e){return e+` bytes`};return{made:e,version:t,flags:i,method:n.methodToString(a),time:this.time,crc:`0x`+s.toString(16).toUpperCase(),compressedSize:o(c),size:o(l),fileNameLength:o(u),extraLength:o(d),commentLength:o(f),diskNumStart:p,inAttr:m,attr:h,offset:g,centralHeaderSize:o(r.CENHDR+u+d+f)}},toString:function(){return JSON.stringify(this.toJSON(),null,` `)}}}})),Ns=s(((e,t)=>{var n=js(),r=n.Constants;t.exports=function(){var e=0,t=0,i=0,a=0,o=0;return{get diskEntries(){return e},set diskEntries(n){e=t=n},get totalEntries(){return t},set totalEntries(n){t=e=n},get size(){return i},set size(e){i=e},get offset(){return a},set offset(e){a=e},get commentLength(){return o},set commentLength(e){o=e},get mainHeaderSize(){return r.ENDHDR+o},loadFromBinary:function(s){if((s.length!==r.ENDHDR||s.readUInt32LE(0)!==r.ENDSIG)&&(s.length<r.ZIP64HDR||s.readUInt32LE(0)!==r.ZIP64SIG))throw n.Errors.INVALID_END();s.readUInt32LE(0)===r.ENDSIG?(e=s.readUInt16LE(r.ENDSUB),t=s.readUInt16LE(r.ENDTOT),i=s.readUInt32LE(r.ENDSIZ),a=s.readUInt32LE(r.ENDOFF),o=s.readUInt16LE(r.ENDCOM)):(e=n.readBigUInt64LE(s,r.ZIP64SUB),t=n.readBigUInt64LE(s,r.ZIP64TOT),i=n.readBigUInt64LE(s,r.ZIP64SIZE),a=n.readBigUInt64LE(s,r.ZIP64OFF),o=0)},toBinary:function(){var n=Buffer.alloc(r.ENDHDR+o);return n.writeUInt32LE(r.ENDSIG,0),n.writeUInt32LE(0,4),n.writeUInt16LE(e,r.ENDSUB),n.writeUInt16LE(t,r.ENDTOT),n.writeUInt32LE(i,r.ENDSIZ),n.writeUInt32LE(a,r.ENDOFF),n.writeUInt16LE(o,r.ENDCOM),n.fill(` `,r.ENDHDR),n},toJSON:function(){return{diskEntries:e,totalEntries:t,size:i+` bytes`,offset:function(e,t){let n=e.toString(16).toUpperCase();for(;n.length<t;)n=`0`+n;return`0x`+n}(a,4),commentLength:o}},toString:function(){return JSON.stringify(this.toJSON(),null,` `)}}}})),Ps=s((e=>{e.EntryHeader=Ms(),e.MainHeader=Ns()})),Fs=s(((e,t)=>{t.exports=function(e){var t=require(`zlib`),n={chunkSize:(parseInt(e.length/1024)+1)*1024};return{deflate:function(){return t.deflateRawSync(e,n)},deflateAsync:function(r){var i=t.createDeflateRaw(n),a=[],o=0;i.on(`data`,function(e){a.push(e),o+=e.length}),i.on(`end`,function(){var e=Buffer.alloc(o),t=0;e.fill(0);for(var n=0;n<a.length;n++){var i=a[n];i.copy(e,t),t+=i.length}r&&r(e)}),i.end(e)}}}})),Is=s(((e,t)=>{var n=+(process.versions?process.versions.node:``).split(`.`)[0]||0;t.exports=function(e,t){var r=require(`zlib`);let i=n>=15&&t>0?{maxOutputLength:t}:{};return{inflate:function(){return r.inflateRawSync(e,i)},inflateAsync:function(t){var n=r.createInflateRaw(i),a=[],o=0;n.on(`data`,function(e){a.push(e),o+=e.length}),n.on(`end`,function(){var e=Buffer.alloc(o),n=0;e.fill(0);for(var r=0;r<a.length;r++){var i=a[r];i.copy(e,n),n+=i.length}t&&t(e)}),n.end(e)}}}})),Ls=s(((e,t)=>{var{randomFillSync:n}=require(`crypto`),r=Ds(),i=new Uint32Array(256).map((e,t)=>{for(let e=0;e<8;e++)t&1?t=t>>>1^3988292384:t>>>=1;return t>>>0}),a=(e,t)=>Math.imul(e,t)>>>0,o=(e,t)=>i[(e^t)&255]^e>>>8,s=()=>typeof n==`function`?n(Buffer.alloc(12)):s.node();s.node=()=>{let e=Buffer.alloc(12),t=e.length;for(let n=0;n<t;n++)e[n]=Math.random()*256&255;return e};var c={genSalt:s};function l(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let e=0;e<t.length;e++)this.updateKeys(t[e])}l.prototype.updateKeys=function(e){let t=this.keys;return t[0]=o(t[0],e),t[1]+=t[0]&255,t[1]=a(t[1],134775813)+1,t[2]=o(t[2],t[1]>>>24),e},l.prototype.next=function(){let e=(this.keys[2]|2)>>>0;return a(e,e^1)>>8&255};function u(e){let t=new l(e);return function(e){let n=Buffer.alloc(e.length),r=0;for(let i of e)n[r++]=t.updateKeys(i^t.next());return n}}function d(e){let t=new l(e);return function(e,n,r=0){n||=Buffer.alloc(e.length);for(let i of e){let e=t.next();n[r++]=i^e,t.updateKeys(i)}return n}}function f(e,t,n){if(!e||!Buffer.isBuffer(e)||e.length<12)return Buffer.alloc(0);let i=u(n),a=i(e.slice(0,12)),o=(t.flags&8)==8?t.timeHighByte:t.crc>>>24;if(a[11]!==o)throw r.WRONG_PASSWORD();return i(e.slice(12))}function p(e){Buffer.isBuffer(e)&&e.length>=12?c.genSalt=function(){return e.slice(0,12)}:e===`node`?c.genSalt=s.node:c.genSalt=s}function m(e,t,n,r=!1){e??=Buffer.alloc(0),Buffer.isBuffer(e)||(e=Buffer.from(e.toString()));let i=d(n),a=c.genSalt();a[11]=t.crc>>>24&255,r&&(a[10]=t.crc>>>16&255);let o=Buffer.alloc(e.length+12);return i(a,o),i(e,o,12)}t.exports={decrypt:f,encrypt:m,_salter:p}})),Rs=s((e=>{e.Deflater=Fs(),e.Inflater=Is(),e.ZipCrypto=Ls()})),zs=s(((e,t)=>{var n=js(),r=Ps(),i=n.Constants,a=Rs();t.exports=function(e,t){var o=new r.EntryHeader,s=Buffer.alloc(0),c=Buffer.alloc(0),l=!1,u=null,d=Buffer.alloc(0),f=Buffer.alloc(0),p=!0;let m=e,h=typeof m.decoder==`object`?m.decoder:n.decoder;p=h.hasOwnProperty(`efs`)?h.efs:!1;function g(){return!t||!(t instanceof Uint8Array)?Buffer.alloc(0):(f=o.loadLocalHeaderFromBinary(t),t.slice(o.realDataOffset,o.realDataOffset+o.compressedSize))}function _(e){if(o.flags_desc){let r={},a=o.realDataOffset+o.compressedSize;if(t.readUInt32LE(a)==i.LOCSIG||t.readUInt32LE(a)==i.CENSIG)throw n.Errors.DESCRIPTOR_NOT_EXIST();if(t.readUInt32LE(a)==i.EXTSIG)r.crc=t.readUInt32LE(a+i.EXTCRC),r.compressedSize=t.readUInt32LE(a+i.EXTSIZ),r.size=t.readUInt32LE(a+i.EXTLEN);else if(t.readUInt16LE(a+12)===19280)r.crc=t.readUInt32LE(a+i.EXTCRC-4),r.compressedSize=t.readUInt32LE(a+i.EXTSIZ-4),r.size=t.readUInt32LE(a+i.EXTLEN-4);else throw n.Errors.DESCRIPTOR_UNKNOWN();if(r.compressedSize!==o.compressedSize||r.size!==o.size||r.crc!==o.crc)throw n.Errors.DESCRIPTOR_FAULTY();if(n.crc32(e)!==r.crc)return!1}else if(n.crc32(e)!==o.localHeader.crc)return!1;return!0}function v(e,t,r){if(t===void 0&&typeof e==`string`&&(r=e,e=void 0),l)return e&&t&&t(Buffer.alloc(0),n.Errors.DIRECTORY_CONTENT_ERROR()),Buffer.alloc(0);var i=g();if(i.length===0)return e&&t&&t(i),i;if(o.encrypted){if(typeof r!=`string`&&!Buffer.isBuffer(r))throw n.Errors.INVALID_PASS_PARAM();i=a.ZipCrypto.decrypt(i,o,r)}var c=Buffer.alloc(o.size);switch(o.method){case n.Constants.STORED:if(i.copy(c),_(c))return e&&t&&t(c),c;throw e&&t&&t(c,n.Errors.BAD_CRC()),n.Errors.BAD_CRC();case n.Constants.DEFLATED:var u=new a.Inflater(i,o.size);if(e)u.inflateAsync(function(e){e.copy(e,0),t&&(_(e)?t(e):t(e,n.Errors.BAD_CRC()))});else{if(u.inflate(c).copy(c,0),!_(c))throw n.Errors.BAD_CRC(`"${h.decode(s)}"`);return c}break;default:throw e&&t&&t(Buffer.alloc(0),n.Errors.UNKNOWN_METHOD()),n.Errors.UNKNOWN_METHOD()}}function y(e,r){if((!u||!u.length)&&Buffer.isBuffer(t))return e&&r&&r(g()),g();if(u.length&&!l){var i;switch(o.method){case n.Constants.STORED:return o.compressedSize=o.size,i=Buffer.alloc(u.length),u.copy(i),e&&r&&r(i),i;default:case n.Constants.DEFLATED:var s=new a.Deflater(u);if(e)s.deflateAsync(function(e){i=Buffer.alloc(e.length),o.compressedSize=e.length,e.copy(i),r&&r(i)});else{var c=s.deflate();return o.compressedSize=c.length,c}s=null;break}}else if(e&&r)r(Buffer.alloc(0));else return Buffer.alloc(0)}function b(e,t){return(e.readUInt32LE(t+4)<<4)+e.readUInt32LE(t)}function x(e){try{for(var t=0,r,a,o;t+4<e.length;)r=e.readUInt16LE(t),t+=2,a=e.readUInt16LE(t),t+=2,o=e.slice(t,t+a),t+=a,i.ID_ZIP64===r&&S(o)}catch{throw n.Errors.EXTRA_FIELD_PARSE_ERROR()}}function S(e){var t,n,r,a;e.length>=i.EF_ZIP64_SCOMP&&(t=b(e,i.EF_ZIP64_SUNCOMP),o.size===i.EF_ZIP64_OR_32&&(o.size=t)),e.length>=i.EF_ZIP64_RHO&&(n=b(e,i.EF_ZIP64_SCOMP),o.compressedSize===i.EF_ZIP64_OR_32&&(o.compressedSize=n)),e.length>=i.EF_ZIP64_DSN&&(r=b(e,i.EF_ZIP64_RHO),o.offset===i.EF_ZIP64_OR_32&&(o.offset=r)),e.length>=i.EF_ZIP64_DSN+4&&(a=e.readUInt32LE(i.EF_ZIP64_DSN),o.diskNumStart===i.EF_ZIP64_OR_16&&(o.diskNumStart=a))}return{get entryName(){return h.decode(s)},get rawEntryName(){return s},set entryName(e){s=n.toBuffer(e,h.encode);var t=s[s.length-1];l=t===47||t===92,o.fileNameLength=s.length},get efs(){return typeof p==`function`?p(this.entryName):p},get extra(){return d},set extra(e){d=e,o.extraLength=e.length,x(e)},get comment(){return h.decode(c)},set comment(e){if(c=n.toBuffer(e,h.encode),o.commentLength=c.length,c.length>65535)throw n.Errors.COMMENT_TOO_LONG()},get name(){var e=h.decode(s);return l?e.substr(e.length-1).split(`/`).pop():e.split(`/`).pop()},get isDirectory(){return l},getCompressedData:function(){return y(!1,null)},getCompressedDataAsync:function(e){y(!0,e)},setData:function(e){u=n.toBuffer(e,n.decoder.encode),!l&&u.length?(o.size=u.length,o.method=n.Constants.DEFLATED,o.crc=n.crc32(e),o.changed=!0):o.method=n.Constants.STORED},getData:function(e){return o.changed?u:v(!1,null,e)},getDataAsync:function(e,t){o.changed?e(u):v(!0,e,t)},set attr(e){o.attr=e},get attr(){return o.attr},set header(e){o.loadFromBinary(e)},get header(){return o},packCentralHeader:function(){o.flags_efs=this.efs,o.extraLength=d.length;var e=o.centralHeaderToBinary(),t=n.Constants.CENHDR;return s.copy(e,t),t+=s.length,d.copy(e,t),t+=o.extraLength,c.copy(e,t),e},packLocalHeader:function(){let e=0;o.flags_efs=this.efs,o.extraLocalLength=f.length;let t=o.localHeaderToBinary(),n=Buffer.alloc(t.length+s.length+o.extraLocalLength);return t.copy(n,e),e+=t.length,s.copy(n,e),e+=s.length,f.copy(n,e),e+=f.length,n},toJSON:function(){let e=function(e){return`<`+(e&&e.length+` bytes buffer`||`null`)+`>`};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:o.toJSON(),compressedData:e(t),data:e(u)}},toString:function(){return JSON.stringify(this.toJSON(),null,` `)}}}})),Bs=s(((e,t)=>{var n=zs(),r=Ps(),i=js();t.exports=function(e,t){var a=[],o={},s=Buffer.alloc(0),c=new r.MainHeader,l=!1;let u=new Set,d=t,{noSort:f,decoder:p}=d;e?g(d.readEntries):l=!0;function m(){let e=new Set;for(let t of Object.keys(o)){let n=t.split(`/`);if(n.pop(),n.length)for(let t=0;t<n.length;t++){let r=n.slice(0,t+1).join(`/`)+`/`;e.add(r)}}for(let t of e)if(!(t in o)){let e=new n(d);e.entryName=t,e.attr=16,e.temporary=!0,a.push(e),o[e.entryName]=e,u.add(e)}}function h(){if(l=!0,o={},c.diskEntries>(e.length-c.offset)/i.Constants.CENHDR)throw i.Errors.DISK_ENTRY_TOO_LARGE();a=Array(c.diskEntries);for(var t=c.offset,r=0;r<a.length;r++){var s=t,f=new n(d,e);f.header=e.slice(s,s+=i.Constants.CENHDR),f.entryName=e.slice(s,s+=f.header.fileNameLength),f.header.extraLength&&(f.extra=e.slice(s,s+=f.header.extraLength)),f.header.commentLength&&(f.comment=e.slice(s,s+f.header.commentLength)),t+=f.header.centralHeaderSize,a[r]=f,o[f.entryName]=f}u.clear(),m()}function g(t){var n=e.length-i.Constants.ENDHDR,r=Math.max(0,n-65535),a=r,o=e.length,l=-1,u=0;for(typeof d.trailingSpace==`boolean`&&d.trailingSpace&&(r=0);n>=a;n--)if(e[n]===80){if(e.readUInt32LE(n)===i.Constants.ENDSIG){l=n,u=n,o=n+i.Constants.ENDHDR,a=n-i.Constants.END64HDR;continue}if(e.readUInt32LE(n)===i.Constants.END64SIG){a=r;continue}if(e.readUInt32LE(n)===i.Constants.ZIP64SIG){l=n,o=n+i.readBigUInt64LE(e,n+i.Constants.ZIP64SIZE)+i.Constants.ZIP64LEAD;break}}if(l==-1)throw i.Errors.INVALID_FORMAT();c.loadFromBinary(e.slice(l,o)),c.commentLength&&(s=e.slice(u+i.Constants.ENDHDR)),t&&h()}function _(){a.length>1&&!f&&a.sort((e,t)=>e.entryName.toLowerCase().localeCompare(t.entryName.toLowerCase()))}return{get entries(){return l||h(),a.filter(e=>!u.has(e))},get comment(){return p.decode(s)},set comment(e){s=i.toBuffer(e,p.encode),c.commentLength=s.length},getEntryCount:function(){return l?a.length:c.diskEntries},forEach:function(e){this.entries.forEach(e)},getEntry:function(e){return l||h(),o[e]||null},setEntry:function(e){l||h(),a.push(e),o[e.entryName]=e,c.totalEntries=a.length},deleteFile:function(e,t=!0){l||h();let n=o[e];this.getEntryChildren(n,t).map(e=>e.entryName).forEach(this.deleteEntry)},deleteEntry:function(e){l||h();let t=o[e],n=a.indexOf(t);n>=0&&(a.splice(n,1),delete o[e],c.totalEntries=a.length)},getEntryChildren:function(e,t=!0){if(l||h(),typeof e==`object`)if(e.isDirectory&&t){let t=[],n=e.entryName;for(let e of a)e.entryName.startsWith(n)&&t.push(e);return t}else return[e];return[]},getChildCount:function(e){if(e&&e.isDirectory){let t=this.getEntryChildren(e);return t.includes(e)?t.length-1:t.length}return 0},compressToBuffer:function(){l||h(),_();let t=[],n=[],r=0,a=0;c.size=0,c.offset=0;let o=0;for(let e of this.entries){let i=e.getCompressedData();e.header.offset=a;let s=e.packLocalHeader(),l=s.length+i.length;a+=l,t.push(s),t.push(i);let u=e.packCentralHeader();n.push(u),c.size+=u.length,r+=l+u.length,o++}r+=c.mainHeaderSize,c.offset=a,c.totalEntries=o,a=0;let u=Buffer.alloc(r);for(let e of t)e.copy(u,a),a+=e.length;for(let e of n)e.copy(u,a),a+=e.length;let d=c.toBinary();return s&&s.copy(d,i.Constants.ENDHDR),d.copy(u,a),e=u,l=!1,u},toAsyncBuffer:function(t,n,r,a){try{l||h(),_();let n=[],o=[],u=0,d=0,f=0;c.size=0,c.offset=0;let p=function(m){if(m.length>0){let e=m.shift(),t=e.entryName+e.extra.toString();r&&r(t),e.getCompressedDataAsync(function(r){a&&a(t),e.header.offset=d;let i=e.packLocalHeader(),s=i.length+r.length;d+=s,n.push(i),n.push(r);let l=e.packCentralHeader();o.push(l),c.size+=l.length,u+=s+l.length,f++,p(m)})}else{u+=c.mainHeaderSize,c.offset=d,c.totalEntries=f,d=0;let r=Buffer.alloc(u);n.forEach(function(e){e.copy(r,d),d+=e.length}),o.forEach(function(e){e.copy(r,d),d+=e.length});let a=c.toBinary();s&&s.copy(a,i.Constants.ENDHDR),a.copy(r,d),e=r,l=!1,t(r)}};p(Array.from(this.entries))}catch(e){n(e)}}}}})),Vs=s(((e,t)=>{var n=js(),r=require(`path`),i=zs(),a=Bs(),o=(...e)=>n.findLast(e,e=>typeof e==`boolean`),s=(...e)=>n.findLast(e,e=>typeof e==`string`),c=(...e)=>n.findLast(e,e=>typeof e==`function`),l={noSort:!1,readEntries:!1,method:n.Constants.NONE,fs:null};t.exports=function(e,t){let u=null,d=Object.assign(Object.create(null),l);e&&typeof e==`object`&&(e instanceof Uint8Array||(Object.assign(d,e),e=d.input?d.input:void 0,d.input&&delete d.input),Buffer.isBuffer(e)&&(u=e,d.method=n.Constants.BUFFER,e=void 0)),Object.assign(d,t);let f=new n(d);if((typeof d.decoder!=`object`||typeof d.decoder.encode!=`function`||typeof d.decoder.decode!=`function`)&&(d.decoder=n.decoder),e&&typeof e==`string`)if(f.fs.existsSync(e))d.method=n.Constants.FILE,d.filename=e,u=f.fs.readFileSync(e);else throw n.Errors.INVALID_FILENAME();let p=new a(u,d),{canonical:m,sanitize:h,zipnamefix:g}=n;function _(e){if(e&&p){var t;if(typeof e==`string`&&(t=p.getEntry(r.posix.normalize(e))),typeof e==`object`&&e.entryName!==void 0&&e.header!==void 0&&(t=p.getEntry(e.entryName)),t)return t}return null}function v(e){let{join:t,normalize:n,sep:i}=r.posix;return t(`.`,n(i+e.split(`\\`).join(i)+i))}function y(e){return e instanceof RegExp?(function(e){return function(t){return e.test(t)}})(e):typeof e==`function`?e:()=>!0}let b=(e,t)=>{let n=t.slice(-1);return n=n===f.sep?f.sep:``,r.relative(e,t)+n};return{readFile:function(e,t){var n=_(e);return n&&n.getData(t)||null},childCount:function(e){let t=_(e);if(t)return p.getChildCount(t)},readFileAsync:function(e,t){var n=_(e);n?n.getDataAsync(t):t(null,`getEntry failed for:`+e)},readAsText:function(e,t){var n=_(e);if(n){var r=n.getData();if(r&&r.length)return r.toString(t||`utf8`)}return``},readAsTextAsync:function(e,t,n){var r=_(e);r?r.getDataAsync(function(e,r){if(r){t(e,r);return}e&&e.length?t(e.toString(n||`utf8`)):t(``)}):t(``)},deleteFile:function(e,t=!0){var n=_(e);n&&p.deleteFile(n.entryName,t)},deleteEntry:function(e){var t=_(e);t&&p.deleteEntry(t.entryName)},addZipComment:function(e){p.comment=e},getZipComment:function(){return p.comment||``},addZipEntryComment:function(e,t){var n=_(e);n&&(n.comment=t)},getZipEntryComment:function(e){var t=_(e);return t&&t.comment||``},updateFile:function(e,t){var n=_(e);n&&n.setData(t)},addLocalFile:function(e,t,i,a){if(f.fs.existsSync(e)){t=t?v(t):``;let n=r.win32.basename(r.win32.normalize(e));t+=i||n;let o=f.fs.statSync(e),s=o.isFile()?f.fs.readFileSync(e):Buffer.alloc(0);o.isDirectory()&&(t+=f.sep),this.addFile(t,s,a,o)}else throw n.Errors.FILE_NOT_FOUND(e)},addLocalFileAsync:function(e,t){e=typeof e==`object`?e:{localPath:e};let n=r.resolve(e.localPath),{comment:i}=e,{zipPath:a,zipName:o}=e,s=this;f.fs.stat(n,function(e,c){if(e)return t(e,!1);a=a?v(a):``;let l=r.win32.basename(r.win32.normalize(n));if(a+=o||l,c.isFile())f.fs.readFile(n,function(e,n){return e?t(e,!1):(s.addFile(a,n,i,c),setImmediate(t,void 0,!0))});else if(c.isDirectory())return a+=f.sep,s.addFile(a,Buffer.alloc(0),i,c),setImmediate(t,void 0,!0)})},addLocalFolder:function(e,t,i){if(i=y(i),t=t?v(t):``,e=r.normalize(e),f.fs.existsSync(e)){let n=f.findFiles(e),a=this;if(n.length)for(let o of n){let n=r.join(t,b(e,o));i(n)&&a.addLocalFile(o,r.dirname(n))}}else throw n.Errors.FILE_NOT_FOUND(e)},addLocalFolderAsync:function(e,t,i,a){a=y(a),i=i?v(i):``,e=r.normalize(e);var o=this;f.fs.open(e,`r`,function(r){if(r&&r.code===`ENOENT`)t(void 0,n.Errors.FILE_NOT_FOUND(e));else if(r)t(void 0,r);else{var s=f.findFiles(e),c=-1,l=function(){if(c+=1,c<s.length){var n=s[c],r=b(e,n).split(`\\`).join(`/`);r=r.normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/[^\x20-\x7E]/g,``),a(r)?f.fs.stat(n,function(e,a){e&&t(void 0,e),a.isFile()?f.fs.readFile(n,function(e,n){e?t(void 0,e):(o.addFile(i+r,n,``,a),l())}):(o.addFile(i+r+`/`,Buffer.alloc(0),``,a),l())}):process.nextTick(()=>{l()})}else t(!0,void 0)};l()}})},addLocalFolderAsync2:function(e,t){let i=this;e=typeof e==`object`?e:{localPath:e},localPath=r.resolve(v(e.localPath));let{zipPath:a,filter:o,namefix:s}=e;o instanceof RegExp?o=(function(e){return function(t){return e.test(t)}})(o):typeof o!=`function`&&(o=function(){return!0}),a=a?v(a):``,s==`latin1`&&(s=e=>e.normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/[^\x20-\x7E]/g,``)),typeof s!=`function`&&(s=e=>e);let c=e=>r.join(a,s(b(localPath,e))),l=e=>r.win32.basename(r.win32.normalize(s(e)));f.fs.open(localPath,`r`,function(e){e&&e.code===`ENOENT`?t(void 0,n.Errors.FILE_NOT_FOUND(localPath)):e?t(void 0,e):f.findFilesAsync(localPath,function(e,n){if(e)return t(e);n=n.filter(e=>o(c(e))),n.length||t(void 0,!1),setImmediate(n.reverse().reduce(function(e,t){return function(n,a){if(n||a===!1)return setImmediate(e,n,!1);i.addLocalFileAsync({localPath:t,zipPath:r.dirname(c(t)),zipName:l(t)},e)}},t))})})},addLocalFolderPromise:function(e,t){return new Promise((n,r)=>{this.addLocalFolderAsync2(Object.assign({localPath:e},t),(e,t)=>{e&&r(e),t&&n(this)})})},addFile:function(e,t,n,r){e=g(e);let a=_(e),o=a!=null;o||(a=new i(d),a.entryName=e),a.comment=n||``;let s=typeof r==`object`&&r instanceof f.fs.Stats;s&&(a.header.time=r.mtime);var c=a.isDirectory?16:0;let l=a.isDirectory?16384:32768;return s?l|=4095&r.mode:typeof r==`number`?l|=4095&r:l|=a.isDirectory?493:420,c=(c|l<<16)>>>0,a.attr=c,a.setData(t),o||p.setEntry(a),a},getEntries:function(e){return p.password=e,p?p.entries:[]},getEntry:function(e){return _(e)},getEntryCount:function(){return p.getEntryCount()},forEach:function(e){return p.forEach(e)},extractEntryTo:function(e,t,i,a,c,l){a=o(!1,a),c=o(!1,c),i=o(!0,i),l=s(c,l);var u=_(e);if(!u)throw n.Errors.NO_ENTRY();var d=m(u.entryName),g=h(t,l&&!u.isDirectory?l:i?d:r.basename(d));if(u.isDirectory)return p.getEntryChildren(u).forEach(function(e){if(e.isDirectory)return;var o=e.getData();if(!o)throw n.Errors.CANT_EXTRACT_FILE();var s=m(e.entryName),l=h(t,i?s:r.basename(s));let u=c?e.header.fileAttr:void 0;f.writeFileTo(l,o,a,u)}),!0;var v=u.getData(p.password);if(!v)throw n.Errors.CANT_EXTRACT_FILE();if(f.fs.existsSync(g)&&!a)throw n.Errors.CANT_OVERRIDE();let y=c?e.header.fileAttr:void 0;return f.writeFileTo(g,v,a,y),!0},test:function(e){if(!p)return!1;for(var t in p.entries)try{if(t.isDirectory)continue;if(!p.entries[t].getData(e))return!1}catch{return!1}return!0},extractAllTo:function(e,t,r,i){if(r=o(!1,r),i=s(r,i),t=o(!1,t),!p)throw n.Errors.NO_ZIP();p.entries.forEach(function(a){var o=h(e,m(a.entryName));if(a.isDirectory){f.makeDir(o);return}var s=a.getData(i);if(!s)throw n.Errors.CANT_EXTRACT_FILE();let c=r?a.header.fileAttr:void 0;f.writeFileTo(o,s,t,c);try{f.fs.utimesSync(o,a.header.time,a.header.time)}catch{throw n.Errors.CANT_EXTRACT_FILE()}})},extractAllToAsync:function(e,t,i,a){if(a=c(t,i,a),i=o(!1,i),t=o(!1,t),!a)return new Promise((n,r)=>{this.extractAllToAsync(e,t,i,function(e){e?r(e):n(this)})});if(!p){a(n.Errors.NO_ZIP());return}e=r.resolve(e);let s=t=>h(e,r.normalize(m(t.entryName))),l=(e,t)=>Error(e+`: "`+t+`"`),u=[],d=[];p.entries.forEach(e=>{e.isDirectory?u.push(e):d.push(e)});for(let e of u){let t=s(e),n=i?e.header.fileAttr:void 0;try{f.makeDir(t),n&&f.fs.chmodSync(t,n),f.fs.utimesSync(t,e.header.time,e.header.time)}catch{a(l(`Unable to create folder`,t))}}d.reverse().reduce(function(a,o){return function(s){if(s)a(s);else{let s=r.normalize(m(o.entryName)),c=h(e,s);o.getDataAsync(function(e,r){if(r)a(r);else if(!e)a(n.Errors.CANT_EXTRACT_FILE());else{let n=i?o.header.fileAttr:void 0;f.writeFileToAsync(c,e,t,n,function(e){e||a(l(`Unable to write file`,c)),f.fs.utimes(c,o.header.time,o.header.time,function(e){e?a(l(`Unable to set times`,c)):a()})})}})}}},a)()},writeZip:function(e,t){if(arguments.length===1&&typeof e==`function`&&(t=e,e=``),!e&&d.filename&&(e=d.filename),e){var n=p.compressToBuffer();if(n){var r=f.writeFileTo(e,n,!0);typeof t==`function`&&t(r?null:Error(`failed`),``)}}},writeZipPromise:function(e,t){let{overwrite:n,perm:r}=Object.assign({overwrite:!0},t);return new Promise((t,i)=>{!e&&d.filename&&(e=d.filename),e||i(`ADM-ZIP: ZIP File Name Missing`),this.toBufferPromise().then(a=>{f.writeFileToAsync(e,a,n,r,e=>e?t(e):i(`ADM-ZIP: Wasn't able to write zip file`))},i)})},toBufferPromise:function(){return new Promise((e,t)=>{p.toAsyncBuffer(e,t)})},toBuffer:function(e,t,n,r){return typeof e==`function`?(p.toAsyncBuffer(e,t,n,r),null):p.compressToBuffer()}}}})),Hs=u(Vs()),Us=class e{static init(t){e.#e=t,Ts.initRenderer()}static#e;#t;#n={getAppPath:f.app.getAppPath(),isPackaged:f.app.isPackaged,downloads:f.app.getPath(`downloads`),userData:f.app.getPath(`userData`),getVersion:``,env:{...process.env},platform:process.platform,arch:process.arch};#r=0;#i=0;#a=0;#o=0;constructor(t,n){this.bw=t,this.version=n;let r=e.#e;this.#t=process.platform===`win32`,t.webContents.on(`devtools-opened`,()=>this.#l()),r.handle(`openDevTools`,()=>t.webContents.openDevTools()),this.#n.getVersion=n,r.handle(`getInfo`,()=>this.#n),r.handle(`inited`,(e,t,n)=>this.#s(t,n)),r.handle(`fetch`,async(e,t)=>{let n=await fetch(t,{cache:`no-store`});return{ok:n.ok,txt:await n.text()}}),r.handle(`fetchAb`,async(e,t)=>{let n=await fetch(t,{cache:`no-store`});return{ok:n.ok,ab:await n.arrayBuffer()}}),r.handle(`existsSync`,(e,t)=>(0,R.existsSync)(t)),r.handle(`copy`,(e,t,n)=>(0,R.copy)(t,n)),r.handle(`remove`,(e,t)=>(0,R.remove)(t)),r.handle(`ensureFile`,(e,t)=>(0,R.ensureFile)(t)),r.handle(`readFile`,(e,t,n)=>(0,R.readFile)(t,n)),r.handle(`writeFile`,(e,t,n,r)=>(0,R.writeFile)(t,n,r)),r.handle(`appendFile`,(e,t,n)=>(0,R.appendFile)(t,n).catch(e=>console.error(e))),r.handle(`outputFile`,(e,t,n)=>(0,R.outputFile)(t,n).catch(e=>console.error(e))),r.handle(`win_close`,()=>t.close()),r.handle(`win_setTitle`,(e,n)=>t.setTitle(n)),r.handle(`showMessageBox`,(e,n)=>f.dialog.showMessageBox(t,n)),r.handle(`showOpenDialog`,(e,n)=>f.dialog.showOpenDialog(t,n)),r.handle(`capturePage`,(e,n,r,i)=>t.webContents.capturePage().then(async e=>{await(0,R.ensureFile)(n);let t=e.resize({width:r,height:i,quality:`best`});await(0,R.writeFile)(n,n.endsWith(`.png`)?t.toPNG():t.toJPEG(80))})),r.handle(`navigate_to`,(e,t)=>f.shell.openExternal(t));let i;r.handle(`Store`,(e,t)=>{i=new Ts(t)}),r.handle(`flush`,(e,t)=>{i.store=t}),r.handle(`Store_isEmpty`,()=>i.size===0),r.handle(`Store_get`,()=>i.store),r.handle(`zip`,async(e,t,n)=>{let r=new Hs.default;r.addLocalFolder(t),await r.writeZipPromise(n)}),r.handle(`unzip`,async(e,t,n)=>{await(0,R.remove)(n),await(0,R.ensureDir)(n),new Hs.default(t).extractAllTo(n,!0)}),r.handle(`isSimpleFullScreen`,()=>t.simpleFullScreen),this.#t?(r.handle(`setSimpleFullScreen`,(e,n)=>{this.#f=()=>{},t.setSimpleFullScreen(n),n||(t.setPosition(this.#r,this.#i),t.setContentSize(this.#a,this.#o)),this.#f=()=>this.#p()}),t.on(`enter-full-screen`,()=>{this.#f=()=>{},t.setContentSize(this.#d.width,this.#d.height),this.#f=()=>this.#p()}),t.on(`leave-full-screen`,()=>{this.#h(!1,this.#r,this.#i,this.#a,this.#o)})):r.handle(`setSimpleFullScreen`,(e,n)=>{t.setSimpleFullScreen(n),!n&&t.setContentSize(this.#a,this.#o)}),r.handle(`window`,(e,t,n,r,i,a)=>this.#h(t,n,r,i,a)),t.on(`move`,()=>this.#f()),t.on(`resize`,()=>this.#f()),this.#u()}#s(e,t){let{width:n,height:r}=e.window,{c:i,x:a,y:o,w:s}=t;this.#c=n/r;let c=s===n?r:s/this.#c;if(this.#t||this.bw.setAspectRatio(this.#c),this.#h(i,a,o,s,c),this.bw.show(),this.#f=()=>this.#p(),e.debug.devtool){this.#l=()=>{},this.openDevTools=()=>this.bw.webContents.openDevTools({mode:`detach`}),this.openDevTools();return}this.#l=()=>{this.bw.webContents.closeDevTools(),this.bw.setTitle(`DevToolは禁止されています。許可する場合は【プロジェクト設定】の【devtool】をONに。`),this.sendShutdown()}}#c=0;#l=()=>this.bw.webContents.closeDevTools();#u(){let e=f.screen.getCursorScreenPoint();this.#d=f.screen.getDisplayNearestPoint(e).workAreaSize}#d;#f=()=>{};#p(){if(this.#m)return;this.#f=()=>{};let[e,t]=this.bw.getPosition(),[n,r]=this.bw.getContentSize();this.#m=setTimeout(()=>{this.#m=void 0;let[i=0,a=0]=this.bw.getPosition(),[o=0,s=0]=this.bw.getContentSize();if(e!==i||t!==a||n!==o||r!==s){this.#p();return}this.#f=()=>this.#p();let c=o,l=s;this.#t&&(n===o?l=o/this.#c:c=s*this.#c),this.#h(!1,i,a,c,l)},1e3/60*10)}#m=void 0;#h(e,t,n,r,i){if(this.bw.simpleFullScreen)return;console.log(`fn:appMain.ts window c:${String(e)} (${String(t)},${String(n)},${String(r)},${String(i)}) scr(${String(this.#d.width)},${String(this.#d.height)})`),this.#f=()=>{};let a=this.#r=Math.round(e?(this.#d.width-r)*.5:t),o=this.#i=Math.round(e?(this.#d.height-i)*.5:n);this.bw.setPosition(a,o);let s=this.#a=Math.round(r),c=this.#o=Math.round(i);this.bw.setContentSize(s,c),e||this.#u(),this.sendSaveWinInf({x:a,y:o,w:s,h:c}),this.#f=()=>this.#p()}sendShutdown(){}sendSaveWinInf(e){}openDevTools=()=>{}},Ws=class e extends Us{static initRenderer(t,n,r){let i,a=()=>{};try{Us.init(f.ipcMain),i=new f.BrowserWindow({show:!1,minWidth:300,minHeight:300,acceptFirstMouse:!0,maximizable:!1,webPreferences:{nodeIntegration:!1,contextIsolation:!0,preload:`${__dirname}/preload.js`}}),console.log=e=>i.webContents.send(`log`,e);let r=new e(i,n);a=()=>r.openDevTools(),i.loadFile(t)}catch(e){throw console.error(`early err:${String(e)}`),a(),`initRenderer error`}return i}sendShutdown(){this.bw.webContents.send(`shutdown`)}sendSaveWinInf(e){this.bw.webContents.send(`save_win_inf`,e)}};module.exports=Ws,exports.appMain=Ws;
22
+ //# sourceMappingURL=appMain.js.map