vbapm 0.6.14 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +46 -0
  2. package/addins/build/vbapm.xlam +0 -0
  3. package/lib/_commonjsHelpers-Bjf42z7h.js +1 -0
  4. package/lib/actions/add-source.d.ts +11 -0
  5. package/lib/add-source-_Z4tr2ea.js +17 -0
  6. package/lib/bin/vbapm-add.d.ts +2 -0
  7. package/lib/build-project-CIZanDh1.js +3 -0
  8. package/lib/build-target-B03OPzeI.js +9 -0
  9. package/lib/crc32-Cc3OMFYk.js +1 -0
  10. package/lib/create-project-CTAlegO8.js +10 -0
  11. package/lib/debug.js +1 -1
  12. package/lib/errors.d.ts +4 -0
  13. package/lib/export-project-DdTYRyAw.js +4 -0
  14. package/lib/export-target-CEupP86g.js +4 -0
  15. package/lib/{get-target-e760a439.js → get-target-Ba_ZoGUl.js} +1 -1
  16. package/lib/index-BlteXxjY.js +1 -0
  17. package/lib/index-CB6KQLC7.js +13 -0
  18. package/lib/index-CEojr58e.js +2 -0
  19. package/lib/index-Cwtynogk.js +54 -0
  20. package/lib/index-DSgWshzu.js +2 -0
  21. package/lib/index-_8uEunjn.js +6 -0
  22. package/lib/index-mBZsirl0.js +14 -0
  23. package/lib/index.d.ts +1 -0
  24. package/lib/index.js +1 -1
  25. package/lib/init-project-BY-a8CIk.js +15 -0
  26. package/lib/installer-C0iBwEpK.js +9 -0
  27. package/lib/{load-from-project-acf7400a.js → load-from-project-wNJg8fme.js} +1 -1
  28. package/lib/once-fkpTAKD3.js +1 -0
  29. package/lib/one_ini_bg.wasm +0 -0
  30. package/lib/project-DFh-2QTw.js +20 -0
  31. package/lib/run-macro-Ck_8Iku3.js +1 -0
  32. package/lib/sat-solver-CqS8Vf6C.js +1 -0
  33. package/lib/string_decoder-CW-j4E6X.js +1 -0
  34. package/lib/test-project-CM-XUOdH.js +1 -0
  35. package/lib/tmp-C7yJT4iq.js +8 -0
  36. package/lib/toml-patch-r8oqFm0h.js +3 -0
  37. package/lib/transform-target-DJmqMjY0.js +2 -0
  38. package/lib/vbapm-add-QPN5uEGK.js +16 -0
  39. package/lib/vbapm-build-BKtQ6OeP.js +9 -0
  40. package/lib/vbapm-export-4H_qDinP.js +7 -0
  41. package/lib/{vbapm-init-5c8eb026.js → vbapm-init-BMY4x_xq.js} +2 -2
  42. package/lib/vbapm-new-DLW9SdvJ.js +17 -0
  43. package/lib/vbapm-run-DzRxAhlD.js +10 -0
  44. package/lib/{vbapm-test-a7b30592.js → vbapm-test-DInh0MDC.js} +1 -1
  45. package/lib/vbapm-version-3Xv7JjGv.js +8 -0
  46. package/lib/vbapm.js +11 -10
  47. package/package.json +124 -137
  48. package/lib/_commonjsHelpers-553b27b3.js +0 -1
  49. package/lib/build-project-eb8454f0.js +0 -3
  50. package/lib/build-target-dbcc69c7.js +0 -9
  51. package/lib/create-project-3154aace.js +0 -10
  52. package/lib/export-project-bc13c1ae.js +0 -4
  53. package/lib/export-target-5d28d188.js +0 -4
  54. package/lib/index-4ce3d28b.js +0 -6
  55. package/lib/index-72c1a91d.js +0 -3
  56. package/lib/index-c5b5f6d1.js +0 -2
  57. package/lib/index-ddd39b65.js +0 -5
  58. package/lib/init-project-ceecd718.js +0 -15
  59. package/lib/installer-dbc2c34a.js +0 -21
  60. package/lib/once-5205b917.js +0 -1
  61. package/lib/project-43370ed3.js +0 -29
  62. package/lib/run-macro-4f1375ca.js +0 -1
  63. package/lib/sat-solver-f9155891.js +0 -1
  64. package/lib/test-project-669dfcfb.js +0 -1
  65. package/lib/tmp-14f9d850.js +0 -9
  66. package/lib/toml-patch.es-6bd2145d.js +0 -3
  67. package/lib/vbapm-build-8ff58485.js +0 -9
  68. package/lib/vbapm-export-96798f4f.js +0 -7
  69. package/lib/vbapm-new-cd174cbb.js +0 -17
  70. package/lib/vbapm-run-2f17fb22.js +0 -10
  71. package/lib/vbapm-version-c5f3d55a.js +0 -8
  72. package/lib/workbook-xml-a61269f4.js +0 -2
@@ -0,0 +1 @@
1
+ "use strict";var t,e,r,n=require("util"),i=require("buffer"),s={exports:{}};var o,a,u,l={};var f,c,h={},d={exports:{}};exports.requireIsarray=function(){if(r)return e;r=1;var t={}.toString;return e=Array.isArray||function(e){return"[object Array]"==t.call(e)}},exports.requireNode=function(){return u?a:(u=1,a=n.deprecate)},exports.requireProcessNextickArgs=function(){return t||(t=1,"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?s.exports={nextTick:function(t,e,r,n){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var i,s,o=arguments.length;switch(o){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick(function(){t.call(null,e)});case 3:return process.nextTick(function(){t.call(null,e,r)});case 4:return process.nextTick(function(){t.call(null,e,r,n)});default:for(i=new Array(o-1),s=0;s<i.length;)i[s++]=arguments[s];return process.nextTick(function(){t.apply(null,i)})}}}:s.exports=process),s.exports},exports.requireString_decoder=function(){if(c)return h;c=1;var t=(f||(f=1,function(t,e){var r=i,n=r.Buffer;function s(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(s(r,e),e.Buffer=o),s(n,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}(d,d.exports)),d.exports).Buffer,e=t.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(r){var n;switch(this.encoding=function(r){var n=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(r);if("string"!=typeof n&&(t.isEncoding===e||!e(r)))throw new Error("Unknown encoding: "+r);return n||r}(r),this.encoding){case"utf16le":this.text=o,this.end=a,n=4;break;case"utf8":this.fillLast=s,n=4;break;case"base64":this.text=u,this.end=l,n=3;break;default:return this.write=p,void(this.end=g)}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}function n(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function o(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function a(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function u(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function p(t){return t.toString(this.encoding)}function g(t){return t&&t.length?this.write(t):""}return h.StringDecoder=r,r.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},r.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},r.prototype.text=function(t,e){var r=function(t,e,r){var i=e.length-1;if(i<r)return 0;var s=n(e[i]);if(s>=0)return s>0&&(t.lastNeed=s-1),s;if(--i<r||-2===s)return 0;if(s=n(e[i]),s>=0)return s>0&&(t.lastNeed=s-2),s;if(--i<r||-2===s)return 0;if(s=n(e[i]),s>=0)return s>0&&(2===s?s=0:t.lastNeed=s-3),s;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},r.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length},h},exports.requireUtil=function(){if(o)return l;function t(t){return Object.prototype.toString.call(t)}return o=1,l.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},l.isBoolean=function(t){return"boolean"==typeof t},l.isNull=function(t){return null===t},l.isNullOrUndefined=function(t){return null==t},l.isNumber=function(t){return"number"==typeof t},l.isString=function(t){return"string"==typeof t},l.isSymbol=function(t){return"symbol"==typeof t},l.isUndefined=function(t){return void 0===t},l.isRegExp=function(e){return"[object RegExp]"===t(e)},l.isObject=function(t){return"object"==typeof t&&null!==t},l.isDate=function(e){return"[object Date]"===t(e)},l.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},l.isFunction=function(t){return"function"==typeof t},l.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},l.isBuffer=Buffer.isBuffer,l};
@@ -0,0 +1 @@
1
+ "use strict";var r=require("./installer-C0iBwEpK.js"),t=require("./run-macro-Ck_8Iku3.js");exports.testProject=async function(s){const{target:e,args:a}=s,n=r.env.isWindows?"CON":"/dev/stdout";await t.runMacro({target:e,macro:"Tests.Run",args:[n,...a]})};
@@ -0,0 +1,8 @@
1
+ "use strict";var t=require("fs"),n=require("os"),r=require("path"),e=require("crypto");function i(t,n){return n.forEach(function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if("default"!==r&&!(r in t)){var e=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,e.get?e:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(t)}var o,c={exports:{}};
2
+ /*!
3
+ * Tmp
4
+ *
5
+ * Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
6
+ *
7
+ * MIT Licensed
8
+ */var u=i({__proto__:null},[(o||(o=1,function(i){const o=t,c=n,u=r,s=e,f={fs:o.constants,os:c.constants},a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",p=/XXXXXX/,l=(f.O_CREAT||f.fs.O_CREAT)|(f.O_EXCL||f.fs.O_EXCL)|(f.O_RDWR||f.fs.O_RDWR),d="win32"===c.platform(),m=f.EBADF||f.os.errno.EBADF,h=f.ENOENT||f.os.errno.ENOENT,y=[],x=o.rmdirSync.bind(o);let E=!1;function b(t,n){return o.rm(t,{recursive:!0},n)}function w(t){return o.rmSync(t,{recursive:!0})}function O(t,n){const r=A(t,n),e=r[0],i=r[1];!function(t,n){!function(t,n){o.realpath(t&&t.tmpdir||c.tmpdir(),n)}(t,function(r,e){if(r)return n(r);t.tmpdir=e;try{_(t)}catch(r){return n(r)}X("dir",t.dir,e,function(r,i){if(r)return n(r);t.dir=g(i)?"":i,X("template",t.template,e,function(r,e){if(r)return n(r);t.template=e,n(null,t)})})})}(e,function(t,n){if(t)return i(t);let r=n.tries;!function t(){try{const e=$(n);o.stat(e,function(n){if(!n)return r-- >0?t():i(new Error("Could not get a unique tmp filename, max tries reached "+e));i(null,e)})}catch(t){i(t)}}()})}function v(t){const n=function(t){const n=t.tmpdir=T(t);_(t);const r=R("dir",t.dir,n);return t.dir=g(r)?"":r,t.template=R("template",t.template,n),t}(A(t)[0]);let r=n.tries;do{const t=$(n);try{o.statSync(t)}catch(n){return t}}while(r-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function D(t,n){const r=function(t){if(t&&!q(t))return n(t);n()};0<=t[0]?o.close(t[0],function(){o.unlink(t[1],r)}):o.unlink(t[1],r)}function j(t){let n=null;try{0<=t[0]&&o.closeSync(t[0])}catch(t){if(!B(t,-m,"EBADF")&&!q(t))throw t}finally{try{o.unlinkSync(t[1])}catch(t){q(t)||(n=t)}}if(null!==n)throw n}function S(t,n,r,e){const i=k(j,[n,t],e),o=k(D,[n,t],e,i);return r.keep||y.unshift(i),e?i:o}function C(t,n,r){const e=n.unsafeCleanup?b:o.rmdir.bind(o),i=k(n.unsafeCleanup?w:x,t,r),c=k(e,t,r,i);return n.keep||y.unshift(i),r?i:c}function k(t,n,r,e){let i=!1;return function o(c){if(!i){const u=e||o,s=y.indexOf(u);return s>=0&&y.splice(s,1),i=!0,r||t===x||t===w?t(n):t(n,c||function(){})}}}function N(t){let n=[],r=null;try{r=s.randomBytes(t)}catch(n){r=s.pseudoRandomBytes(t)}for(let e=0;e<t;e++)n.push(a[r[e]%62]);return n.join("")}function g(t){return void 0===t}function A(t,n){if("function"==typeof t)return[{},t];if(g(t))return[{},n];const r={};for(const n of Object.getOwnPropertyNames(t))r[n]=t[n];return[r,n]}function $(t){const n=t.tmpdir;if(!g(t.name))return u.join(n,t.dir,t.name);if(!g(t.template))return u.join(n,t.dir,t.template).replace(p,N(6));const r=[t.prefix?t.prefix:"tmp","-",process.pid,"-",N(12),t.postfix?"-"+t.postfix:""].join("");return u.join(n,t.dir,r)}function _(t){if(!g(t.name)){const n=t.name;if(u.isAbsolute(n))throw new Error(`name option must not contain an absolute path, found "${n}".`);const r=u.basename(n);if(".."===r||"."===r||r!==n)throw new Error(`name option must not contain a path, found "${n}".`)}if(!g(t.template)&&!t.template.match(p))throw new Error(`Invalid template, found "${t.template}".`);if(!g(t.tries)&&isNaN(t.tries)||t.tries<0)throw new Error(`Invalid tries, found "${t.tries}".`);t.tries=g(t.name)?t.tries||3:1,t.keep=!!t.keep,t.detachDescriptor=!!t.detachDescriptor,t.discardDescriptor=!!t.discardDescriptor,t.unsafeCleanup=!!t.unsafeCleanup,t.prefix=g(t.prefix)?"":t.prefix,t.postfix=g(t.postfix)?"":t.postfix}function X(t,n,r,e){if(g(n))return e(null);!function(t,n,r){const e=u.isAbsolute(t)?t:u.join(n,t);o.stat(e,function(t){t?o.realpath(u.dirname(e),function(t,n){if(t)return r(t);r(null,u.join(n,u.basename(e)))}):o.realpath(e,r)})}(n,r,function(n,i){if(n)return e(n);const o=u.relative(r,i);if(!i.startsWith(r))return e(new Error(`${t} option must be relative to "${r}", found "${o}".`));e(null,o)})}function R(t,n,r){if(g(n))return;const e=function(t,n){const r=u.isAbsolute(t)?t:u.join(n,t);try{return o.statSync(r),o.realpathSync(r)}catch(t){const n=o.realpathSync(u.dirname(r));return u.join(n,u.basename(r))}}(n,r),i=u.relative(r,e);if(!e.startsWith(r))throw new Error(`${t} option must be relative to "${r}", found "${i}".`);return i}function q(t){return B(t,-h,"ENOENT")}function B(t,n,r){return d?t.code===r:t.code===r&&t.errno===n}function T(t){return o.realpathSync(t&&t.tmpdir||c.tmpdir())}process.addListener("exit",function(){if(E)for(;y.length;)try{y[0]()}catch(t){}}),Object.defineProperty(i.exports,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return T()}}),i.exports.dir=function(t,n){const r=A(t,n),e=r[0],i=r[1];O(e,function(t,n){if(t)return i(t);o.mkdir(n,e.mode||448,function(t){if(t)return i(t);i(null,n,C(n,e,!1))})})},i.exports.dirSync=function(t){const n=A(t)[0],r=v(n);return o.mkdirSync(r,n.mode||448),{name:r,removeCallback:C(r,n,!0)}},i.exports.file=function(t,n){const r=A(t,n),e=r[0],i=r[1];O(e,function(t,n){if(t)return i(t);o.open(n,l,e.mode||384,function(t,r){if(t)return i(t);if(e.discardDescriptor)return o.close(r,function(t){return i(t,n,void 0,S(n,-1,e,!1))});{const t=e.discardDescriptor||e.detachDescriptor;i(null,n,r,S(n,t?-1:r,e,!1))}})})},i.exports.fileSync=function(t){const n=A(t)[0],r=n.discardDescriptor||n.detachDescriptor,e=v(n);let i=o.openSync(e,l,n.mode||384);return n.discardDescriptor&&(o.closeSync(i),i=void 0),{name:e,fd:i,removeCallback:S(e,r?-1:i,n,!0)}},i.exports.tmpName=O,i.exports.tmpNameSync=v,i.exports.setGracefulCleanup=function(){E=!0}}(c)),c.exports)]);exports.tmp=u;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ //! @decimalturn/toml-patch v1.0.5 - https://github.com/DecimalTurn/toml-patch - @license: MIT
3
+ var e,t;function n(t){return t.type===e.Document}function o(t){return t.type===e.Table}function r(t){return t.type===e.TableArray}function l(t){return t.type===e.KeyValue}function a(t){return t.type===e.String}function i(t){return t.type===e.DateTime}function s(t){return t.type===e.InlineArray}function c(t){return t.type===e.InlineItem}function u(t){return t.type===e.InlineTable}function f(t){return t.type===e.Comment}function m(e){return n(e)||o(e)||r(e)||u(e)||s(e)}function d(t){return function(t){return t.type===e.TableKey}(t)||function(t){return t.type===e.TableArrayKey}(t)||c(t)}function h(e){return{lines:e.end.line-e.start.line+1,columns:e.end.column-e.start.column}}function p(e,t){const n=Array.isArray(e)?e:w(e);if(0===n.length)return{line:1,column:t};let o=0,r=n.length-1;for(;o<r;){const e=o+r>>>1;n[e]<t?o=e+1:r=e}n[o]<t&&o++;const l=o+1;return{line:l,column:t-(n[l-2]+1||0)}}function w(e){const t=[];for(let n=0;n<e.length;n++){const o=e.charCodeAt(n);10===o?t.push(n):13===o&&(10===e.charCodeAt(n+1)?(t.push(n+1),n++):t.push(n))}return t.push(e.length),t}function y(e){return{line:e.line,column:e.column}}function g(e){return{start:y(e.start),end:y(e.end)}}!function(e){e.Document="Document",e.Table="Table",e.TableKey="TableKey",e.TableArray="TableArray",e.TableArrayKey="TableArrayKey",e.KeyValue="KeyValue",e.Key="Key",e.String="String",e.Integer="Integer",e.Float="Float",e.Boolean="Boolean",e.DateTime="DateTime",e.InlineArray="InlineArray",e.InlineItem="InlineItem",e.InlineTable="InlineTable",e.Comment="Comment"}(e||(e={}));class v extends Error{constructor(e,t,n){let o=`Error parsing TOML (${t.line}, ${t.column+1}):\n`;if(e){const n=function(e,t){const n=w(e),o=void 0!==n[t.line-2]?n[t.line-2]+1:0,r=n[t.line-1]||e.length;return e.substring(o,r)}(e,t),r=`${function(e,t=" "){return t.repeat(e)}(t.column)}^`;n&&(o+=`${n}\n${r}\n`)}o+=n,super(o),this.line=t.line,this.column=t.column}}!function(e){e.Bracket="Bracket",e.Curly="Curly",e.Equal="Equal",e.Comma="Comma",e.Dot="Dot",e.Comment="Comment",e.Literal="Literal"}(t||(t={}));const b='"',$="'",T=" ",k=/[\w,\d,",',+,\-,_]/,S=10,I=13,E=127;function*A(e){const n=e.length;let o=0;const r=[],l=(e,t)=>({start:p(r,e),end:p(r,t)});for(;o<n;){const c=e.charCodeAt(o);if((c<=31||c===E)&&9!==c&&c!==I&&c!==S)throw new v(e,p(r,o),`Control char 0x${c.toString(16).toUpperCase().padStart(2,"0")} not allowed`);if(c===I&&(o+1>=n||e.charCodeAt(o+1)!==S))throw new v(e,p(r,o),"Standalone CR; must be CRLF or LF");if(32===c||9===c||c===I);else if(c===S)r.push(o);else if(91===c||93===c)yield{type:t.Bracket,raw:e[o],loc:l(o,o+1)};else if(123===c||125===c)yield{type:t.Curly,raw:e[o],loc:l(o,o+1)};else if(61===c)yield{type:t.Equal,raw:"=",loc:l(o,o+1)};else if(44===c)yield{type:t.Comma,raw:",",loc:l(o,o+1)};else if(46===c)yield{type:t.Dot,raw:".",loc:l(o,o+1)};else if(35===c)yield a();else{const t=C(e,o,$)||C(e,o,b);t?yield i(t):yield s()}o++}function a(){const a=o;for(;o+1<n;){const t=e.charCodeAt(o+1);if(t===S||t===I)break;o++;const n=e.charCodeAt(o);if((n<=31||n===E)&&9!==n)throw new v(e,p(r,o),`Control char 0x${n.toString(16).toUpperCase().padStart(2,"0")} not allowed`)}return{type:t.Comment,raw:e.slice(a,o+1),loc:l(a,o+1)}}function i(a){const i=o,s=a+a+a;for(o+=3;o<n;){if(C(e,o,a)){let t=3;for(;e[o+t]===a;)t++;if(t>=6)throw new v(e,p(r,o),`Invalid multiline string: ${t} consecutive ${a} characters`);if(3===t){o+=2;break}o+=t-3,o+=2;break}const t=e.charCodeAt(o);if(t===I&&(o+1>=n||e.charCodeAt(o+1)!==S))throw new v(e,p(r,o),"Standalone CR in multiline string; must be CRLF or LF");if((t<=31||t===E)&&9!==t&&t!==S&&t!==I){const n=a===b?"multiline basic strings":"multiline literal strings",l=`0x${t.toString(16).toUpperCase().padStart(2,"0")}`;let i="";0===t?i="Null":t===E&&(i="DEL");const s=i?`${i} (${l}) not allowed in ${n}`:`Control char ${l} not allowed in ${n}`;throw new v(e,p(r,o),s)}t===S&&r.push(o),o++}if(o>=n){if(a===b){let t=0,l=n-1;for(;l>=0&&"\\"===e[l];)t++,l--;if(t>0&&t%2!=0)throw new v(e,p(r,o),`Unterminated multiline ${s} (possible escape issue)`)}throw new v(e,p(r,o),`Unterminated multiline ${s}`)}return{type:t.Literal,raw:e.slice(i,o+1),loc:l(i,o+1)}}function s(){const a=e[o];if(!k.test(a))throw new v(e,p(r,o),`Unexpected char "${a}"`);const i=o;let s=a===b,c=a===$;for(;o<n&&!(o+1>=n);){const t=e.charCodeAt(o+1);if(!(s||c||32!==t&&9!==t&&t!==S&&t!==I&&44!==t&&46!==t&&93!==t&&125!==t&&61!==t&&35!==t))break;if(o++,s||c){const t=e.charCodeAt(o);if((t<=31||t===E)&&9!==t){const n=s?"basic strings":"literal strings",l=`0x${t.toString(16).toUpperCase().padStart(2,"0")}`;let a="";t===S?a="Newline":t===I?a="Carriage return":0===t?a="Null":t===E&&(a="DEL");const i=a?`${a} (${l}) not allowed in ${n}`:`Control char ${l} not allowed in ${n}`;throw new v(e,p(r,o),i)}}const l=e[o];if(l===b&&(s=!s),l!==$||s||(c=!c),o+1>=n)break;if(s&&"\\"===l){const t=e[o+1];t!==b&&"\\"!==t||o++}}if(s||c)throw new v(e,p(r,i),`Expected close of string with ${s?b:$}`);return{type:t.Literal,raw:e.slice(i,o+1),loc:l(i,o+1)}}}function C(e,t,n){if(!n)return!1;if(e[t]!==n||e[t+1]!==n||e[t+2]!==n)return!1;if(n===$)return n;let o=0,r=t-1;for(;r>=0&&"\\"===e[r];)o++,r--;return(0===o||!(o%2!=0))&&n}const x=new Int8Array(128);x.fill(-1);for(let e=0;e<10;e++)x[48+e]=e;for(let e=0;e<6;e++)x[65+e]=10+e,x[97+e]=10+e;function _(e){const t=e.charCodeAt(0);return t<128&&-1!==x[t]}function O(e,t){return x[e.charCodeAt(t)]<<12|x[e.charCodeAt(t+1)]<<8|x[e.charCodeAt(t+2)]<<4|x[e.charCodeAt(t+3)]}function D(e){return e.startsWith("'''")?L(e.slice(3,e.length-3)):e.startsWith($)?e.slice(1,e.length-1):e.startsWith('"""')?F(L(e.slice(3,e.length-3)),!0):e.startsWith(b)?F(e.slice(1,e.length-1),!1):e}function F(e,t){const n=e.length;if(!t&&-1===e.indexOf("\\"))return e;const o=[];let r=0;for(let l=0;l<n;l++){if("\\"!==e[l])continue;if(l>r&&o.push(e.slice(r,l)),l++,l>=n)throw new Error("Trailing backslash");const a=e[l];switch(a){case"b":o.push("\b");break;case"t":o.push("\t");break;case"n":o.push("\n");break;case"f":o.push("\f");break;case"r":o.push("\r");break;case'"':o.push('"');break;case"\\":o.push("\\");break;case"e":o.push("");break;case"u":{if(l+4>n||!_(e[l+1])||!_(e[l+2])||!_(e[l+3])||!_(e[l+4]))throw new Error(`Invalid Unicode escape: \\u${e.slice(l+1,l+5)}`);const t=O(e,l+1);if(t>=55296&&t<=57343)throw new Error(`Invalid \\u${e.slice(l+1,l+5)}: surrogates not allowed`);o.push(String.fromCharCode(t)),l+=4;break}case"U":{if(l+8>n)throw new Error(`Invalid Unicode escape: \\U${e.slice(l+1,l+9)}`);for(let t=1;t<=8;t++)if(!_(e[l+t]))throw new Error(`Invalid Unicode escape: \\U${e.slice(l+1,l+9)}`);const t=parseInt(e.slice(l+1,l+9),16);o.push(String.fromCodePoint(t)),l+=8;break}case"x":{if(l+2>n||!_(e[l+1])||!_(e[l+2]))throw new Error(`Invalid hex escape: \\x${e.slice(l+1,l+3)}`);const t=x[e.charCodeAt(l+1)]<<4|x[e.charCodeAt(l+2)];o.push(String.fromCharCode(t)),l+=2;break}default:if(t&&("\n"===a||"\r"===a||" "===a||"\t"===a)){let t="\n"===a||"\r"===a,o=l;for(;o<n&&(" "===e[o]||"\t"===e[o]||"\n"===e[o]||"\r"===e[o]);)"\n"!==e[o]&&"\r"!==e[o]||(t=!0),o++;if(!t)throw new Error(`Invalid escape sequence: \\${a}`);l=o-1;break}throw new Error(`Invalid escape sequence: \\${a}`)}r=l+1}return 0===r?e:(r<n&&o.push(e.slice(r)),o.join(""))}function L(e){return 10===e.charCodeAt(0)?e.slice(1):13===e.charCodeAt(0)&&10===e.charCodeAt(1)?e.slice(2):e}class K{constructor(e){this.iterator=e,this.index=-1,this.value=void 0,this.done=!1,this.peeked=null}next(){var e;if(this.done)return M();const t=this.peeked||this.iterator.next();return this.index+=1,this.value=t.value,this.done=null!==(e=t.done)&&void 0!==e&&e,this.peeked=null,t}peek(){return this.done?M():(this.peeked||(this.peeked=this.iterator.next()),this.peeked)}[Symbol.iterator](){return this}}const U=Object.freeze({value:void 0,done:!0});function M(){return U}function N(e){return{year:String(e.getUTCFullYear()),month:String(e.getUTCMonth()+1).padStart(2,"0"),day:String(e.getUTCDate()).padStart(2,"0"),hours:String(e.getUTCHours()).padStart(2,"0"),minutes:String(e.getUTCMinutes()).padStart(2,"0"),seconds:String(e.getUTCSeconds()).padStart(2,"0"),ms:e.getUTCMilliseconds()}}function j(e,t,n=/\.(\d+)\s*$/){if(t&&t.includes(".")){const o=t.match(n),r=o?o[1].length:3;return"."+String(e).padStart(3,"0").slice(0,r)}return e>0?"."+String(e).padStart(3,"0").replace(/0+$/,""):""}function W(e){if("Z"===e)return 0;const t="+"===e[0]?1:-1,[n,o]=e.slice(1).split(":");return t*(60*parseInt(n)+parseInt(o))}class B{static createDateWithOriginalFormat(e,t){if(B.IS_DATE_ONLY.test(t)){if(0!==e.getUTCHours()||0!==e.getUTCMinutes()||0!==e.getUTCSeconds()||0!==e.getUTCMilliseconds()){if(e instanceof z)return e;let t=e.toISOString().replace("Z","");return t=t.replace(/\.000$/,""),new q(t,!1)}const t=e.toISOString().split("T")[0];return new Z(t)}if(B.IS_TIME_ONLY.test(t)){if(e instanceof V)return e;{const n=N(e),o=j(n.ms,t);return new V(`${n.hours}:${n.minutes}:${n.seconds}${o}`,t)}}if(B.IS_LOCAL_DATETIME_T.test(t)){const n=N(e),o=j(n.ms,t);return new q(`${n.year}-${n.month}-${n.day}T${n.hours}:${n.minutes}:${n.seconds}${o}`,!1,t)}if(B.IS_LOCAL_DATETIME_SPACE.test(t)){const n=N(e),o=j(n.ms,t);return new q(`${n.year}-${n.month}-${n.day} ${n.hours}:${n.minutes}:${n.seconds}${o}`,!0,t)}if(B.IS_OFFSET_DATETIME_T.test(t)||B.IS_OFFSET_DATETIME_SPACE.test(t)){const n=t.match(/([+-]\d{2}:\d{2}|[Zz])$/),o=n?"z"===n[1]?"Z":n[1]:"Z",r=B.IS_OFFSET_DATETIME_SPACE.test(t),l=N(new Date(e.getTime()+6e4*W(o))),a=r?" ":"T",i=j(l.ms,t,/\.(\d+)(?:[Zz]|[+-]\d{2}:\d{2})\s*$/),s=`${l.year}-${l.month}-${l.day}${a}${l.hours}:${l.minutes}:${l.seconds}${i}${o}`;return new z(s,r)}return e}}B.IS_DATE_ONLY=/^\d{4}-\d{2}-\d{2}$/,B.IS_TIME_ONLY=/^\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?$/,B.IS_LOCAL_DATETIME_T=/^\d{4}-\d{2}-\d{2}[Tt]\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?$/,B.IS_LOCAL_DATETIME_SPACE=/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}(?::\d{2})?(?:\.\d+)?$/,B.IS_OFFSET_DATETIME_T=/^\d{4}-\d{2}-\d{2}[Tt]\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?(?:[Zz]|[+-]\d{2}:\d{2})$/,B.IS_OFFSET_DATETIME_SPACE=/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}(?::\d{2})?(?:\.\d+)?(?:[Zz]|[+-]\d{2}:\d{2})$/,B.IS_FULL_DATE=/(\d{4})-(\d+)-(\d+)/,B.IS_FULL_TIME=/(\d+):(\d+)(?::(\d+))?/;class Z extends Date{constructor(e){super(e)}toISOString(){const e=N(this);return`${e.year}-${e.month}-${e.day}`}}class V extends Date{constructor(e,t){let n=e;/:\d{2}:\d{2}/.test(e)||(n=e+":00"),super(`0000-01-01T${n}Z`),this.originalFormat=t}toISOString(){const e=N(this);return`${e.hours}:${e.minutes}:${e.seconds}${j(e.ms,this.originalFormat)}`}}class q extends Date{constructor(e,t=!1,n){let o=e;/\d{2}:\d{2}:\d{2}/.test(e)||(o=e.replace(/(\d{2}:\d{2})([\s\-+TZ]|$)/,"$1:00$2")),super(o.replace(" ","T")+"Z"),this.useSpaceSeparator=!1,this.useSpaceSeparator=t,this.originalFormat=n||e}toISOString(){const e=N(this),t=this.useSpaceSeparator?" ":"T";return`${e.year}-${e.month}-${e.day}${t}${e.hours}:${e.minutes}:${e.seconds}${j(e.ms,this.originalFormat)}`}}class z extends Date{constructor(e,t=!1){let n=e;/\d{2}:\d{2}:\d{2}/.test(e)||(n=e.replace(/(\d{2}:\d{2})([\s\-+TZ]|$)/,"$1:00$2")),super(n.replace(" ","T")),this.useSpaceSeparator=!1,this.useSpaceSeparator=t,this.originalFormat=e;const o=e.match(/([+-]\d{2}:\d{2}|[Zz])$/);o&&(this.originalOffset="z"===o[1]?"Z":o[1])}toISOString(){if(this.originalOffset){const e=N(new Date(this.getTime()+6e4*W(this.originalOffset))),t=this.useSpaceSeparator?" ":"T",n=j(e.ms,this.originalFormat,/\.(\d+)(?:[Zz]|[+-]\d{2}:\d{2})\s*$/);return`${e.year}-${e.month}-${e.day}${t}${e.hours}:${e.minutes}:${e.seconds}${n}${this.originalOffset}`}const e=super.toISOString();return this.useSpaceSeparator?e.replace("T"," "):e}}const R=B,P="true",H=/e/i,Y=/_/g,J=/^[+-]?inf$/,G=/^[+-]?nan$/,Q=/^[+-]?0x/i;function X(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||95===e||45===e}const ee=/^[+-]?0o/i,te=/^[+-]?0b/i;function ne(e,t,n){for(let o=0;o<e.length;o++)if(!X(e.charCodeAt(o)))throw new v(t,{line:n.line,column:n.column+o},`Invalid bare key char '${e[o]}'`)}function oe(e,t,n){if(e.startsWith('"""')||e.startsWith("'''"))throw new v(t,n,"Multiline strings cannot be keys")}function re(e,t,n){try{return D(e)}catch(e){throw new v(t,n,e.message)}}function le(e,t,n,o=!0){if(e.endsWith("_"))throw new v(t,n,"Underscore must be between digits");if(o?/^[+-]?_/.test(e):e.startsWith("_"))throw new v(t,n,"Underscore must be between digits");if(/__/.test(e))throw new v(t,n,"Consecutive underscores not allowed")}function ae(e,t,n,o){const r=e.replace(Y,"");if(/^[+-]?0\d/.test(r)&&!Q.test(e)&&!ee.test(e)&&!te.test(e))throw new v(t,n,`Leading zeros are not allowed in ${o}`)}function ie(e,t,n,o){if(/_[eE]/.test(e))throw new v(n,o,"Underscore before exponent is not allowed");if(/[eE][+-]?_/.test(e))throw new v(n,o,"Underscore at start of exponent is not allowed");if(/[eE][+-]?$/.test(e))throw new v(n,o,`Invalid float "${t}": incomplete exponent`);if(/[eE][+-]?.*\./.test(e))throw new v(n,o,`Invalid float "${t}": decimal point not allowed in exponent`)}function se(e,t,n,o,r,l){if(2!==e.length)throw new v(r,l,`"${o}": hour must be 2 digits`);if(2!==t.length)throw new v(r,l,`"${o}": minute must be 2 digits`);if(n&&2!==n.length)throw new v(r,l,`"${o}": second must be 2 digits`)}function ce(e,t,n,o,r,l){if(void 0!==e){const t=parseInt(e,10);if(t<0||t>23)throw new v(r,l,`"${o}": hour must be 00-23`)}if(void 0!==t){const e=parseInt(t,10);if(e<0||e>59)throw new v(r,l,`"${o}": minute must be 00-59`)}if(void 0!==n){const e=parseInt(n,10);if(e<0||e>60)throw new v(r,l,`"${o}": second must be 00-60`)}}function ue(e,t,n,o,r,l,a){const i=o[0]+o[1].toUpperCase();if(new RegExp("^[+\\-]?"+i.replace(/([[\]])/g,"\\$1")).test(e))throw new v(t,n,`${l} prefix must be lowercase "${o}"`);if(new RegExp("^[+\\-]?"+o+"_","i").test(e))throw new v(t,n,"Underscore must be between digits");const s=new RegExp("^[+\\-]?"+o,"i"),c=e.replace(s,"");if(!c||"_"===c||c.startsWith("_"))throw new v(t,n,`Incomplete ${l.toLowerCase()} number`);const u=c.replace(/_/g,"");if(!r.test(u))throw new v(t,n,null!=a?a:`Invalid ${l.toLowerCase()} digits`);if(/^[+-]/.test(e))throw new v(t,n,`${l} numbers cannot have a sign prefix`)}function*fe(e){const t=new K(A(e));for(;!t.next().done;){const n=ve(t,e);for(const e of n)yield e}}function me(t){return{type:e.Comment,loc:t.value.loc,raw:t.value.raw}}function de(n,o){const r=n.peek().done||n.peek().value.type!==t.Bracket?e.Table:e.TableArray,l=r===e.Table;if(l&&"["!==n.value.raw)throw new v(o,n.value.loc.start,`Expected table opening "[", found ${n.value.raw}`);if(!l){const e=n.peek();if(e.done)throw new v(o,n.value.loc.start,'Expected "[[" for Array of Tables, found end of input');if("["!==n.value.raw||"["!==e.value.raw)throw new v(o,n.value.loc.start,`Expected "[[", found ${n.value.raw+e.value.raw}`);const t=n.value,r=e.value;if(t.loc.end.line!==r.loc.start.line||t.loc.end.column!==r.loc.start.column)throw new v(o,t.loc.start,'"[[" brackets must be adjacent (no whitespace)')}const a=l?{type:e.TableKey,loc:n.value.loc}:{type:e.TableArrayKey,loc:n.value.loc};if(n.next(),r===e.TableArray&&n.next(),n.done)throw new v(o,a.loc.start,"Expected table key, reached end of file");if(n.value.type===t.Bracket&&"]"===n.value.raw)throw new v(o,n.value.loc.start,r===e.TableArray?"Array of Tables header [[]] requires a table name":"Table header [] requires a table name");const i=n.value.raw;let s;for(oe(i,o,n.value.loc.start),i.startsWith('"')||i.startsWith("'")||ne(i,o,n.value.loc.start),s=[re(n.value.raw,o,n.value.loc.start)],a.item={type:e.Key,loc:n.value.loc,raw:n.value.raw,value:s};!n.peek().done&&n.peek().value.type===t.Dot;){n.next();const e=n.value;n.next();const t=n.value.raw;t.startsWith('"')||t.startsWith("'")||ne(t,o,n.value.loc.start);const r=" ".repeat(e.loc.start.column-a.item.loc.end.column),l=" ".repeat(n.value.loc.start.column-e.loc.end.column);a.item.loc.end=n.value.loc.end,a.item.raw+=`${r}.${l}${n.value.raw}`;try{a.item.value.push(D(n.value.raw))}catch(e){const t=e;throw new v(o,n.value.loc.start,t.message)}}if(n.next(),!n.done){const e=a.loc.start.line;if(n.value.loc.start.line!==e)throw new v(o,n.value.loc.start,l?"Table header must be single-line":"Array of Tables header must be single-line")}if(l&&(n.done||"]"!==n.value.raw))throw new v(o,n.done?a.item.loc.end:n.value.loc.start,`Expected table closing "]", found ${n.done?"end of file":n.value.raw}`);if(!l&&(n.done||n.peek().done||"]"!==n.value.raw||"]"!==n.peek().value.raw))throw new v(o,n.done||n.peek().done?a.item.loc.end:n.value.loc.start,`Expected "]]" closing, found ${n.done||n.peek().done?"end of file":n.value.raw+n.peek().value.raw}`);if(!l){const e=n.value,t=n.peek().value;if(e.loc.end.line!==t.loc.start.line||e.loc.end.column!==t.loc.start.column)throw new v(o,e.loc.start,'"]]" brackets must be adjacent (no whitespace)')}if(l||n.next(),a.loc.end=n.value.loc.end,!n.peek().done){const e=n.peek().value;if(e.loc.start.line===a.loc.end.line&&e.type!==t.Comment)throw new v(o,e.loc.start,`Extra content after ${l?"table":"Array of Tables"} header`)}let c=[];for(;!n.peek().done&&n.peek().value.type!==t.Bracket;){n.next();const e=ve(n,o);for(let t=0;t<e.length;t++)c.push(e[t])}return{type:l?e.Table:e.TableArray,loc:{start:y(a.loc.start),end:c.length?y(c[c.length-1].loc.end):y(a.loc.end)},key:a,items:c}}function he(t,n){const o=re(t.value.raw,n,t.value.loc.start);return{type:e.String,loc:t.value.loc,raw:t.value.raw,value:o}}function pe(t){return{type:e.Boolean,loc:t.value.loc,value:t.value.raw===P}}function we(n,o){let r,l=n.value.loc,a=n.value.raw;if(!n.peek().done&&n.peek().value.type===t.Literal&&R.IS_FULL_DATE.test(a)&&R.IS_FULL_TIME.test(n.peek().value.raw)){const e=l.start;n.next(),l={start:e,end:n.value.loc.end},a+=` ${n.value.raw}`}if(!n.peek().done&&n.peek().value.type===t.Dot){const e=l.start;if(n.next(),n.peek().done||n.peek().value.type!==t.Literal)throw new v(o,n.value.loc.end,"Expected fractional value for DateTime");n.next(),l={start:e,end:n.value.loc.end},a+=`.${n.value.raw}`}if(function(e,t,n){if(/\.([Zz]|[+-])/.test(e))throw new v(t,n,`"${e}": fractional seconds needs digit after dot`);if(/[+-]$/.test(e))throw new v(t,n,`"${e}": offset needs HH:MM`);const o=/\d{2}:\d{2}/.test(e)?e.match(/([+-])(\d+)(:?)(\d*)$/):null;if(o){const e=o[0],r=o[2],l=o[3],a=o[4];if(":"!==l)throw new v(t,n,`Offset "${e}": missing colon separator`);if(2!==r.length)throw new v(t,n,`Offset "${e}": hour must be 2 digits`);if(!a||0===a.length)throw new v(t,n,`Offset "${e}": minute required`);if(2!==a.length)throw new v(t,n,`Offset "${e}": minute must be 2 digits`);const i=parseInt(r,10);if(i<0||i>23)throw new v(t,n,`Offset "${e}": hour must be 00-23`);const s=parseInt(a,10);if(s<0||s>59)throw new v(t,n,`Offset "${e}": minute must be 00-59`)}if(!/^\d{4}-\d{2}-\d{2}(?:[Tt ]\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?(?:[Zz]|[+-]\d{2}:\d{2})?)?$/.test(e)&&!/^\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?$/.test(e)){if(/^\d{4}-\d{2}-\d{2}T$/.test(e))throw new v(t,n,`"${e}": 'T' requires time component`);if(/^\d{4}-\d{2}-\d{2}[a-su-zA-SU-Z]/.test(e))throw new v(t,n,`Invalid date "${e}": unexpected character after date`);if(/^\d{4}-\d{2}-\d{2}\d{2}:\d{2}/.test(e))throw new v(t,n,`"${e}": missing 'T' or space separator`);throw new v(t,n,`Invalid datetime "${e}"`)}const r=e.match(/^(\d+)-/);if(r&&4!==r[1].length)throw new v(t,n,`"${e}": year must be 4 digits`);const l=e.match(/^(\d+)-(\d+)-(\d+)/);if(l){const[,,o,r]=l;if(2!==o.length)throw new v(t,n,`"${e}": month must be 2 digits`);if(2!==r.length)throw new v(t,n,`"${e}": day must be 2 digits`)}const a=e.match(/[T ](\d+):(\d+)(?::(\d+))?/);if(a){const[,o,r,l]=a;se(o,r,l,e,t,n)}const i=e.match(/^(\d+):(\d+)(?::(\d+))?/);if(i&&!l){const[,o,r,l]=i;se(o,r,l,e,t,n)}const s=e.match(/^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2}))?)?/),c=e.match(/^(\d{2}):(\d{2})(?::(\d{2}))?/);if(s){const[,o,r,l,a,i,c]=s,u=parseInt(r,10);if(u<1||u>12)throw new v(t,n,`"${e}": month must be 01-12`);const f=parseInt(l,10);if(f<1||f>31)throw new v(t,n,`"${e}": day must be 01-31`);const m=function(e,t){return 2===t?e%4==0&&e%100!=0||e%400==0?29:28:[31,28,31,30,31,30,31,31,30,31,30,31][t-1]}(parseInt(o,10),u);if(f>m)throw new v(t,n,`"${e}": day ${l} invalid for ${o}-${r}`);ce(a,i,c,e,t,n)}else if(c){const[,o,r,l]=c;ce(o,r,l,e,t,n)}}(a,o,l.start),R.IS_FULL_DATE.test(a))r=R.IS_DATE_ONLY.test(a)?new Z(a):R.IS_LOCAL_DATETIME_T.test(a)?new q(a,!1):R.IS_LOCAL_DATETIME_SPACE.test(a)?new q(a,!0):R.IS_OFFSET_DATETIME_T.test(a)?new z(a,!1):R.IS_OFFSET_DATETIME_SPACE.test(a)?new z(a,!0):new Date(a.replace(" ","T"));else if(R.IS_TIME_ONLY.test(a))r=new V(a,a);else{const[e]=(new Date).toISOString().split("T");r=new Date(`${e}T${a}`)}return{type:e.DateTime,loc:l,raw:a,value:r}}function ye(n,o){let r,l=n.value.loc,a=n.value.raw;if(J.test(a))r=a.startsWith("-")?-1/0:1/0;else if(G.test(a))r=NaN;else if(n.peek().done||n.peek().value.type!==t.Dot){if(le(a,o,l.start),ie(a,a,o,l.start),!n.peek().done&&n.peek().value.type===t.Dot)throw new v(o,n.peek().value.loc.start,`Float "${a}.": dot after exponent`);ae(a,o,l.start,"the integer part of a float"),r=Number(a.replace(Y,""))}else{const e=l.start;{if(H.test(a)&&!Q.test(a))throw new v(o,l.start,`Float "${a}": dot after exponent`);const e=a;ae(e,o,l.start,"the integer part of a float");const t=e.replace(/^[+-]/,"");if(""===t||"_"===t)throw new v(o,l.start,"Float: digit required before dot");le(e,o,l.start)}if(n.next(),n.peek().done||n.peek().value.type!==t.Literal)throw new v(o,n.value.loc.end,"Expected fraction value for Float");n.next(),a+=`.${n.value.raw}`,l={start:e,end:n.value.loc.end};{const e=n.value.raw;if(!/^\d/.test(e))throw new v(o,n.value.loc.start,`Float: fraction must start with digit, found "${e}"`);le(e,o,n.value.loc.start,!1),ie(e,a,o,n.value.loc.start)}r=Number(a.replace(Y,""))}if(Number.isNaN(r)&&!G.test(a))throw new v(o,l.start,`Invalid float "${a}"`);return{type:e.Float,loc:l,raw:a,value:r}}function ge(t,n){const o=t.value.raw,r=t.value.loc;if(/^\d{1,}-\d{1,}/.test(o)||/^\d{1,}:\d{1,}/.test(o)||/^\d{6}-\d{2}$/.test(o))throw new v(n,r.start,`Invalid integer "${o}"`);if("-0"===o||"+0"===o)return{type:e.Integer,loc:r,raw:o,value:0};if(/^[+-]{2,}/.test(o))throw new v(n,r.start,"Double sign is not allowed in integers");ae(o,n,r.start,"decimal integers"),le(o,n,r.start);let l=10;Q.test(o)?(l=16,ue(o,n,r.start,"0x",/^[0-9a-fA-F]+$/,"Hexadecimal")):ee.test(o)?(l=8,ue(o,n,r.start,"0o",/^[0-7]+$/,"Octal","Invalid octal digits (must be 0-7)")):te.test(o)&&(l=2,ue(o,n,r.start,"0b",/^[01]+$/,"Binary","Invalid binary digits (must be 0 or 1)"));const a=parseInt(o.replace(Y,"").replace(ee,"").replace(te,""),l);if(Number.isNaN(a))throw new v(n,r.start,`Invalid integer "${o}"`);return{type:e.Integer,loc:r,raw:o,value:a}}function ve(n,o){if(n.value.type===t.Comment)return[me(n)];if(n.value.type===t.Bracket)return[de(n,o)];if(n.value.type===t.Literal)return function(n,o){const r=n.value.raw;if(r.endsWith(":"))throw new v(o,{line:n.value.loc.start.line,column:n.value.loc.start.column+[...r].length-1},"Use '=' to separate keys and values, not ':'");let l;oe(r,o,n.value.loc.start),r.startsWith('"')||r.startsWith("'")||ne(r,o,n.value.loc.start),l=[re(n.value.raw,o,n.value.loc.start)];const a={type:e.Key,loc:n.value.loc,raw:n.value.raw,value:l};for(;!n.peek().done&&n.peek().value.type===t.Dot;){n.next(),n.next();const e=n.value.raw;oe(e,o,n.value.loc.start),e.startsWith('"')||e.startsWith("'")||ne(e,o,n.value.loc.start),a.loc.end=n.value.loc.end,a.raw+=`.${n.value.raw}`,a.value.push(re(n.value.raw,o,n.value.loc.start))}if(n.next(),!n.done&&n.value.loc.start.line!==a.loc.end.line)throw new v(o,n.value.loc.start,'"=" must be on same line as key');if(n.done||n.value.type!==t.Equal){if(!n.done&&":"===n.value.raw)throw new v(o,n.value.loc.start,"Use '=' to separate keys and values, not ':'");throw new v(o,n.done?a.loc.end:n.value.loc.start,'Expected "=" for key-value')}const i=n.value.loc.start.column,s=n.value.loc.start.line;if(n.next(),n.done)throw new v(o,a.loc.start,"Expected value, reached EOF");if(n.value.loc.start.line!==s)throw new v(o,n.value.loc.start,"Value must be on same line as '='");if(n.done)throw new v(o,a.loc.start,"Expected value for key-value");const c=be(n,o),u=c[0];if(!n.peek().done){const r=n.peek().value;if(r.type===t.Dot&&r.loc.start.line===u.loc.end.line&&(u.type===e.Float||u.type===e.Integer))throw new v(o,r.loc.start,"Invalid number: multiple decimal points not allowed");if((r.type===t.Literal||r.type===t.Bracket)&&r.loc.start.line===u.loc.end.line)throw new v(o,r.loc.start,"Key/value pairs must be separated by a newline")}return c[0]={type:e.KeyValue,key:a,value:u,loc:{start:y(a.loc.start),end:y(u.loc.end)},equals:i},c}(n,o);throw n.value.type===t.Equal?new v(o,n.value.loc.start,"Missing key before '='"):new v(o,n.value.loc.start,`Unexpected token "${n.value.type}"`)}function be(n,o){if(n.value.type===t.Literal){const e=n.value.raw;return e[0]===b||e[0]===$?[he(n,o)]:e===P||"false"===e?[pe(n)]:/^\d/.test(e)&&(/^\d{1,}-\d{1,}/.test(e)||/^\d{1,}:\d{1,}/.test(e))?[we(n,o)]:!n.peek().done&&n.peek().value.type===t.Dot||J.test(e)||G.test(e)||H.test(e)&&!Q.test(e)?[ye(n,o)]:[ge(n,o)]}if(n.value.type===t.Curly){const[r,l]=function(n,o){if("{"!==n.value.raw)throw new v(o,n.value.loc.start,'Expected "{" for inline table');const r={type:e.InlineTable,loc:n.value.loc,items:[]},l=[];for(n.next();!n.done&&(n.value.type!==t.Curly||"}"!==n.value.raw);){if(n.value.type===t.Comment){l.push(me(n)),n.next();continue}if(n.value.type===t.Comma){const e=r.items[r.items.length-1];if(!e)throw new v(o,n.value.loc.start,"Leading comma in inline table");if(e.comma)throw new v(o,n.value.loc.start,"Consecutive commas in inline table");e.comma=!0,e.loc.end=n.value.loc.start,n.next();continue}const a=r.items[r.items.length-1];if(a&&!a.comma)throw new v(o,n.value.loc.start,"Missing comma between inline table items");const i=ve(n,o),s=i[0];if(s.type===e.KeyValue){r.items.push({type:e.InlineItem,loc:g(s.loc),item:s,comma:!1});for(let e=1;e<i.length;e++)l.push(i[e])}n.next()}if(n.done||n.value.type!==t.Curly||"}"!==n.value.raw)throw new v(o,n.done?r.loc.start:n.value.loc.start,'Expected "}"');return r.loc.end=n.value.loc.end,[r,l]}(n,o);return[r,...l]}if(n.value.type===t.Bracket){const[r,l]=function(n,o){if("["!==n.value.raw)throw new v(o,n.value.loc.start,'Expected "[" for inline array');const r={type:e.InlineArray,loc:n.value.loc,items:[]},l=[];for(n.next();!n.done&&(n.value.type!==t.Bracket||"]"!==n.value.raw);){if(n.value.type===t.Comma){const e=r.items[r.items.length-1];if(!e)throw new v(o,n.value.loc.start,"Leading comma in array");if(e.comma)throw new v(o,n.value.loc.start,"Consecutive commas in array");e.comma=!0,e.loc.end=n.value.loc.start}else if(n.value.type===t.Comment)l.push(me(n));else{const t=r.items[r.items.length-1];if(t&&!t.comma)throw new v(o,n.value.loc.start,"Missing comma between array elements");const a=be(n,o),i=a[0];r.items.push({type:e.InlineItem,loc:g(i.loc),item:i,comma:!1});for(let e=1;e<a.length;e++)l.push(a[e])}n.next()}if(n.done||n.value.type!==t.Bracket||"]"!==n.value.raw)throw new v(o,n.done?r.loc.start:n.value.loc.start,'Expected "]"');return r.loc.end=n.value.loc.end,[r,l]}(n,o);return[r,...l]}throw n.value.type===t.Dot?new v(o,n.value.loc.start,"Number cannot start with a dot"):new v(o,n.value.loc.start,"Unrecognized token type")}function $e(e){return e[e.length-1]}function Te(){return Object.create(null)}function ke(e){return"number"==typeof e&&e%1==0&&isFinite(e)&&!Object.is(e,-0)}function Se(e){return"[object Date]"===Object.prototype.toString.call(e)}function Ie(e){return e&&"object"==typeof e&&!Se(e)&&!Array.isArray(e)}function Ee(e){return null!=e&&"function"==typeof e[Symbol.iterator]}function Ae(e,t){return t in e}function Ce(e){return Ie(e)?`{${Object.keys(e).sort().map(t=>`${JSON.stringify(t)}:${Ce(e[t])}`).join(",")}}`:Array.isArray(e)?`[${e.map(Ce).join(",")}]`:JSON.stringify(e)}function xe(e,t){const n=e.length,o=t.length;e.length=n+o;for(let r=0;r<o;r++)e[n+r]=t[r]}function _e(e){return e.startsWith('"""')||e.startsWith("'''")}const Oe=new WeakSet,De=new WeakMap,Fe=e=>(De.has(e)||De.set(e,new WeakMap),De.get(e)),Le=new WeakMap,Ke=e=>(Le.has(e)||Le.set(e,new WeakMap),Le.get(e));function Ue(e,t,n,o){if(m(t)){const e=t.items.indexOf(n);if(e<0)throw new Error("Item not found in parent for replace");t.items.splice(e,1,o)}else if(l(t)&&u(t.value)&&!u(n)){const e=t.value.items.indexOf(n);if(e<0)throw new Error("Item not found in parent for replace");t.value.items.splice(e,1,o)}else if(d(t))t.item=o;else{if(!l(t))throw new Error(`Unsupported parent type "${t.type}" for replace`);t.key===n?t.key=o:t.value=o}Ve(o,{lines:n.loc.start.line-o.loc.start.line,columns:n.loc.start.column-o.loc.start.column});const r=h(n.loc),a=h(o.loc);qe({lines:a.lines-r.lines,columns:a.columns-r.columns},Ke(e),o,n),Oe.add(e)}function Me(e,t,a,i,d){if(!m(t))throw new Error(`Unsupported parent type "${t.type}" for insert`);let p,w;i=null!=i&&"number"==typeof i?i:t.items.length,s(t)||u(t)?({shift:p,offset:w}=function(e,t,n){if(!c(t))throw new Error(`Incompatible child type "${t.type}"`);const o=null!=n?e.items[n-1]:$e(e.items),r=null==n||n===e.items.length;e.items.splice(n,0,t);const l=!!o,a=!r;l&&(o.comma=!0),a&&(t.comma=!0);const i=s(e)&&function(e){return!!e.items.length&&h(e.loc).lines>e.items.length}(e);return Ne(e,t,n,{useNewLine:i,hasCommaHandling:!0,isLastElement:r,hasSeparatingCommaBefore:l,hasSeparatingCommaAfter:a,hasTrailingComma:r&&!0===t.comma})}(t,a,i)):d&&n(t)?({shift:p,offset:w}=function(e,t,n){const o=Ne(e,t,n,{useNewLine:!1,hasCommaHandling:!1});return e.items.splice(n,0,t),o}(t,a,i)):({shift:p,offset:w}=function(e,t,a){if(!(l(i=t)||o(i)||r(i)||f(i)))throw new Error(`Incompatible child type "${t.type}"`);var i;const s=e.items[a-1],c=n(e)&&!e.items.length;e.items.splice(a,0,t);const u=s?{line:s.loc.end.line,column:f(s)?e.loc.start.column:s.loc.start.column}:y(e.loc.start),m=o(t)||r(t);let d=0;c||(d=m?2:1),u.line+=d;const p={lines:u.line-t.loc.start.line,columns:u.column-t.loc.start.column},w=h(t.loc);return{shift:p,offset:{lines:w.lines+(d-1),columns:w.columns}}}(t,a,i)),Ve(a,p);const g=t.items[i-1],v=g&&Ke(e).get(g);v&&(w.lines+=v.lines,w.columns+=v.columns,Ke(e).delete(g)),Ke(e).set(a,w),Oe.add(e)}function Ne(e,t,n,o={}){const{useNewLine:r=!1,skipCommaSpace:l=2,skipBracketSpace:a=1,hasCommaHandling:i=!1,isLastElement:s=!1,hasSeparatingCommaBefore:c=!1,hasSeparatingCommaAfter:u=!1,hasTrailingComma:m=!1}=o,d=n>0?e.items[n-1]:void 0,p=d?{line:d.loc.end.line,column:r?f(d)?e.loc.start.column:d.loc.start.column:d.loc.end.column}:y(e.loc.start);let w=0;if(r)w=1;else{const e=c||!i&&!!d;e&&i?p.column+=l:(e||i&&!d)&&(p.column+=a)}p.line+=w;const g={lines:p.line-t.loc.start.line,columns:p.column-t.loc.start.column},v=h(t.loc);if(!i)return{shift:g,offset:{lines:v.lines+(w-1),columns:v.columns}};let b=0;return c&&m&&!u&&s&&(b=-1),{shift:g,offset:{lines:v.lines+(w-1),columns:v.columns+(c||u?l:0)+(m?1+b:0)}}}function je(e,t,n){if(!m(t))throw new Error(`Unsupported parent type "${t.type}" for remove`);let l=t.items.indexOf(n);if(l<0){if(l=t.items.findIndex(e=>d(e)&&e.item===n),l<0)throw new Error("Node not found in parent for removal");n=t.items[l]}const a=t.items[l-1];let i=t.items[l+1];t.items.splice(l,1);let s=h(n.loc);i&&f(i)&&i.loc.start.line===n.loc.end.line&&(s=h({start:n.loc.start,end:i.loc.end}),i=t.items[l+1],t.items.splice(l,1));const u=a&&c(a)||i&&c(i),p=a&&a.loc.end.line===n.loc.start.line,w=i&&i.loc.start.line===n.loc.end.line,y=u&&(p||w),g={lines:-(s.lines-(y?1:0)),columns:y?-s.columns:0};if(void 0===a&&void 0===i&&(g.lines=0,g.columns=0),u&&p&&(g.columns-=2),u&&!a&&i&&(g.columns-=2),u&&a&&!i){const e=n.comma;a.comma=!!e}let v,b;a?(v=a,b=Ke(e)):(o(t)||r(t))&&"key"in t?(v=t.key,b=Ke(e)):(v=t,b=Fe(e));const $=Ke(e),T=b.get(v);T&&(g.lines+=T.lines,g.columns+=T.columns);const k=$.get(n);k&&(g.lines+=k.lines,g.columns+=k.columns),b.set(v,g),Oe.add(e)}function We(e,t,n=!0){if(!n)return;if(!t.items.length)return;qe({lines:0,columns:1},Fe(e),t);const o=$e(t.items);qe({lines:0,columns:1},Ke(e),o),Oe.add(e)}function Be(e,t,n=!1){if(!n)return;if(!t.items.length)return;const o=$e(t.items);o.comma=!0,qe({lines:0,columns:1},Ke(e),o),Oe.add(e)}function Ze(t){if(!Oe.has(t))return;const n=Fe(t),o=Ke(t);let r=0;const l={};function a(e){let t=e.loc.start.line,n=e.loc.start.column;if("key"in e){const o=e.key.loc.end;(o.line>t||o.line===t&&o.column>n)&&(t=o.line,n=o.column)}for(let o=0;o<e.items.length;o++){const r=e.items[o].loc.end;(r.line>t||r.line===t&&r.column>n)&&(t=r.line,n=r.column)}e.loc.end={line:t,column:n}}function i(e){e.loc.start.line+=r;const t=l[e.loc.start.line]||0;e.loc.start.column+=t;const o=n.get(e);o&&(r+=o.lines,l[e.loc.start.line]=(l[e.loc.start.line]||0)+o.columns)}function s(e){e.loc.end.line+=r;const t=l[e.loc.end.line]||0;e.loc.end.column+=t;const n=o.get(e);n&&(r+=n.lines,l[e.loc.end.line]=(l[e.loc.end.line]||0)+n.columns)}!function t(n){switch(n.type){case e.Document:{const e=n;i(e);for(let n=0;n<e.items.length;n++)t(e.items[n]);s(e),a(e);break}case e.Table:{const e=n;i(e),t(e.key);for(let n=0;n<e.items.length;n++)t(e.items[n]);s(e),a(e);break}case e.TableArray:{const e=n;i(e),t(e.key);for(let n=0;n<e.items.length;n++)t(e.items[n]);s(e),a(e);break}case e.TableKey:{const e=n;i(e),t(e.item),s(e);break}case e.TableArrayKey:{const e=n;i(e),t(e.item),s(e);break}case e.KeyValue:{const e=n,a=e.loc.start.line+r,c=o.get(e.key);e.equals+=(l[a]||0)+(c?c.columns:0),i(e),t(e.key),t(e.value),s(e);break}case e.InlineArray:{const e=n;i(e);for(let n=0;n<e.items.length;n++)t(e.items[n]);s(e);break}case e.InlineTable:{const e=n;i(e);for(let n=0;n<e.items.length;n++)t(e.items[n]);s(e);break}case e.InlineItem:{const e=n;i(e),t(e.item),s(e);break}case e.Key:case e.String:case e.Integer:case e.Float:case e.Boolean:case e.DateTime:case e.Comment:i(n),s(n);break;default:throw new Error(`Unrecognized node type "${n.type}"`)}}(t),Oe.delete(t),De.delete(t),Le.delete(t)}function Ve(t,n,o={}){const{lines:r,columns:l}=n;if(0===r&&0===l)return t;const{first_line_only:a=!1}=o,i=t.loc.start.line,s=t.type;if(s===e.Key||s===e.String||s===e.Integer||s===e.Float||s===e.Boolean||s===e.DateTime||s===e.Comment)return a&&t.loc.start.line!==i||(t.loc.start.column+=l,t.loc.end.column+=l),t.loc.start.line+=r,t.loc.end.line+=r,t;if(s===e.KeyValue){const n=t,o=n.value.type;if(o===e.String||o===e.Integer||o===e.Float||o===e.Boolean||o===e.DateTime){a&&n.loc.start.line!==i||(n.loc.start.column+=l,n.loc.end.column+=l),n.loc.start.line+=r,n.loc.end.line+=r,n.equals+=l;const e=n.key;a&&e.loc.start.line!==i||(e.loc.start.column+=l,e.loc.end.column+=l),e.loc.start.line+=r,e.loc.end.line+=r;const o=n.value;return a&&o.loc.start.line!==i||(o.loc.start.column+=l,o.loc.end.column+=l),o.loc.start.line+=r,o.loc.end.line+=r,t}}const c=e=>{a&&e.loc.start.line!==i||(e.loc.start.column+=l,e.loc.end.column+=l),e.loc.start.line+=r,e.loc.end.line+=r};return function(t,n){function o(e,t){for(const n of e)r(n,t)}function r(t,l){const a=n[t.type];switch(a&&"function"==typeof a&&a(t,l),a&&a.enter&&a.enter(t,l),t.type){case e.Document:o(t.items,t);break;case e.Table:r(t.key,t),o(t.items,t);break;case e.TableKey:r(t.item,t);break;case e.TableArray:r(t.key,t),o(t.items,t);break;case e.TableArrayKey:r(t.item,t);break;case e.KeyValue:r(t.key,t),r(t.value,t);break;case e.InlineArray:o(t.items,t);break;case e.InlineItem:r(t.item,t);break;case e.InlineTable:o(t.items,t);break;case e.Key:case e.String:case e.Integer:case e.Float:case e.Boolean:case e.DateTime:case e.Comment:break;default:throw new Error(`Unrecognized node type "${t.type}"`)}a&&a.exit&&a.exit(t,l)}Ee(t)?o(t,null):r(t,null)}(t,{[e.Table]:c,[e.TableKey]:c,[e.TableArray]:c,[e.TableArrayKey]:c,[e.KeyValue](e){c(e),e.equals+=l},[e.Key]:c,[e.String]:c,[e.Integer]:c,[e.Float]:c,[e.Boolean]:c,[e.DateTime]:c,[e.InlineArray]:c,[e.InlineItem]:c,[e.InlineTable]:c,[e.Comment]:c}),t}function qe(e,t,n,o){const r=t.get(o||n);r&&(e.lines+=r.lines,e.columns+=r.columns),t.set(n,e)}function ze(){return{type:e.Document,loc:{start:{line:1,column:0},end:{line:1,column:0}},items:[]}}function Re(t){const n=function(t){const n=Je(t);return{type:e.TableKey,loc:{start:{line:1,column:0},end:{line:1,column:n.length+2}},item:{type:e.Key,loc:{start:{line:1,column:1},end:{line:1,column:n.length+1}},value:t,raw:n}}}(t);return{type:e.Table,loc:g(n.loc),key:n,items:[]}}function Pe(t){const n=function(t){const n=Je(t);return{type:e.TableArrayKey,loc:{start:{line:1,column:0},end:{line:1,column:n.length+4}},item:{type:e.Key,loc:{start:{line:1,column:2},end:{line:1,column:n.length+2}},value:t,raw:n}}}(t);return{type:e.TableArray,loc:g(n.loc),key:n,items:[]}}function He(t,n){const o=function(t){const n=Je(t);return{type:e.Key,loc:{start:{line:1,column:0},end:{line:1,column:n.length}},raw:n,value:t}}(t),{column:r}=o.loc.end,l=r+1;return Ve(n,{lines:0,columns:r+3-n.loc.start.column},{first_line_only:!0}),{type:e.KeyValue,loc:{start:y(o.loc.start),end:y(n.loc.end)},key:o,equals:l,value:n}}const Ye=/^[\w-]+$/;function Je(e){return e.map(e=>Ye.test(e)?e:JSON.stringify(e)).join(".")}function Ge(t,n){let o,r;if(n&&_e(n)){let e=n.startsWith("'''");e&&t.includes("'''")&&(e=!1);const r=e?"'''":'"""',l=n.includes("\r\n")?"\r\n":"\n",a=n.startsWith(`${r}${l}`)||(n.startsWith("'''\n")||n.startsWith("'''\r\n"))&&!e;let i;i=e?t:t.replace(/\\/g,"\\\\").replace(/\x08/g,"\\b").replace(/\f/g,"\\f").replace(/\t/g,"\\t").replace(/[\x00-\x07\x0B\x0E-\x1F\x7F]/g,e=>"\\u"+e.charCodeAt(0).toString(16).padStart(4,"0").toUpperCase()).replace(/"""/g,'""\\"'),o=a?`${r}${l}${i}${r}`:`${r}${i}${r}`}else o=JSON.stringify(t);if(o.includes("\r\n")||o.includes("\n")&&!o.includes("\r\n")){const e=o.includes("\r\n")?"\r\n":"\n",t=(o.match(new RegExp("\r\n"===e?"\\r\\n":"\\n","g"))||[]).length;r=t>0?{line:1+t,column:3}:{line:1,column:o.length}}else r={line:1,column:o.length};return{type:e.String,loc:{start:{line:1,column:0},end:r},raw:o,value:t}}function Qe(t){return{type:e.InlineItem,loc:g(t.loc),item:t,comma:!1}}const Xe=!1,et=!0,tt=!1,nt=!1;function ot(e,t){if(!e||"object"!=typeof e)return null;if(("InlineArray"===e.type||"InlineTable"===e.type)&&e.loc){const n=function(e,t){var n;if(!e||!e.start||!e.end)return null;const o=t.split(/\r?\n/),r=e.start.line-1,l=e.end.line-1,a=e.start.column,i=e.end.column;let s="";if(r===l)s=(null===(n=o[r])||void 0===n?void 0:n.substring(a,i+1))||"";else{o[r]&&(s+=o[r].substring(a));for(let e=r+1;e<l;e++)s+="\n"+(o[e]||"");o[l]&&(s+="\n"+o[l].substring(0,i+1))}const c=s.match(/^\[(\s*)/),u=s.match(/^\{(\s*)/);return c?c[1].length>0:u?u[1].length>0:null}(e.loc,t);if(null!==n)return n}if(e.items&&Array.isArray(e.items))for(const n of e.items){const e=ot(n,t);if(null!==e)return e;if(n.item){const e=ot(n.item,t);if(null!==e)return e}}for(const n of["value","key","item"])if(e[n]){const o=ot(e[n],t);if(null!==o)return o}return null}function rt(e){if(!e||"object"!=typeof e)return null;if("InlineArray"===e.type&&e.items&&Array.isArray(e.items))return lt(e.items);if("InlineTable"===e.type&&e.items&&Array.isArray(e.items))return lt(e.items);if("KeyValue"===e.type&&e.value)return rt(e.value);if(e.items&&Array.isArray(e.items))for(const t of e.items){const e=rt(t);if(null!==e)return e}return null}function lt(e){if(0===e.length)return null;const t=e[e.length-1];return!(!t||"object"!=typeof t||!("comma"in t))&&!0===t.comma}function at(e,t){var n,o,r,l,a,i;if(e){if(e instanceof it)return e;{const s=function(e){if(!e||"object"!=typeof e)return{};const t=e=>"boolean"==typeof e?null:"expected boolean, got "+typeof e,n={newLine:e=>"string"==typeof e?null:"expected string, got "+typeof e,trailingNewline:e=>"boolean"==typeof e||"number"==typeof e?null:"expected boolean or number, got "+typeof e,trailingComma:t,bracketSpacing:t,inlineTableStart:e=>null==e||"number"==typeof e&&Number.isInteger(e)&&e>=0?null:"expected non-negative integer or undefined, got "+typeof e,truncateZeroTimeInDates:t,useTabsForIndentation:t},o={},r=[],l=[];for(const t in e){const a=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0;if(a){const n=e[t],r=a(n);r?l.push(`${t} (${r})`):o[t]=n}else Object.prototype.hasOwnProperty.call(e,t)&&r.push(t)}if(r.length>0&&console.warn(`toml-patch: Ignoring unsupported format properties: ${r.join(", ")}. Supported properties are: ${Object.keys(n).join(", ")}`),l.length>0)throw new TypeError(`Invalid types for format properties: ${l.join(", ")}`);return o}(e);return new it(null!==(n=s.newLine)&&void 0!==n?n:t.newLine,null!==(o=s.trailingNewline)&&void 0!==o?o:t.trailingNewline,null!==(r=s.trailingComma)&&void 0!==r?r:t.trailingComma,null!==(l=s.bracketSpacing)&&void 0!==l?l:t.bracketSpacing,void 0!==s.inlineTableStart?s.inlineTableStart:t.inlineTableStart,null!==(a=s.truncateZeroTimeInDates)&&void 0!==a?a:t.truncateZeroTimeInDates,null!==(i=s.useTabsForIndentation)&&void 0!==i?i:t.useTabsForIndentation)}}return t}class it{constructor(e,t,n,o,r,l,a){this.newLine=null!=e?e:"\n",this.trailingNewline=null!=t?t:1,this.trailingComma=null!=n?n:Xe,this.bracketSpacing=null!=o?o:et,this.inlineTableStart=null!=r?r:1,this.truncateZeroTimeInDates=null!=l?l:tt,this.useTabsForIndentation=null!=a?a:nt}static default(){return new it("\n",1,Xe,et,1,tt,nt)}static autoDetectFormat(e){const t=it.default();t.newLine=function(e){const t=e.indexOf("\n");return t>0&&"\r"===e.substring(t-1,t)?"\r\n":"\n"}(e),t.trailingNewline=function(e,t){let n=0,o=e.length;for(;o>=t.length&&e.substring(o-t.length,o)===t;)n++,o-=t.length;return n}(e,t.newLine);try{const n=fe(e),o=Array.from(n);t.trailingComma=function(e){const t=Array.from(e);for(const e of t){const t=rt(e);if(null!==t)return t}return Xe}(o),t.bracketSpacing=function(e,t){const n=Array.from(t);for(const t of n){const n=ot(t,e);if(null!==n)return n}return et}(e,o)}catch(e){t.trailingComma=Xe,t.bracketSpacing=et}return t.useTabsForIndentation=function(e){const t=e.split(/\r?\n/);let n=0,o=0;for(const e of t)if(0!==e.length&&("\t"===e[0]?n++:" "===e[0]&&o++,n+o>=5))break;return n>o}(e),t.inlineTableStart=1,t.truncateZeroTimeInDates=tt,t}}function st(e){return!!s(e)&&(0!==e.items.length&&!0===e.items[e.items.length-1].comma)}function ct(e){return!!u(e)&&(0!==e.items.length&&!0===e.items[e.items.length-1].comma)}function ut(e){const t=Re(e.key.value);for(const n of e.value.items)Me(t,t,n.item);return Ze(t),t}function ft(e){if(e.items.length>0){const t=e.items[e.items.length-1];e.loc.end.line=t.loc.end.line,e.loc.end.column=t.loc.end.column}else e.loc.end.line=e.key.loc.end.line,e.loc.end.column=e.key.loc.end.column}function mt(e){return Math.max(0,e.length-1)}function dt(e,t,n){var o;for(let r=e.items.length-1;r>=0;r--){const a=e.items[r];if(l(a)&&u(a.value)){const r=[...e.key.item.value,...a.key.value];if(mt(r)<(null!==(o=n.inlineTableStart)&&void 0!==o?o:1)){const o=Re(r);for(const e of a.value.items)Me(o,o,e.item);je(e,e,a),ft(e),t.push(o),dt(o,t,n)}}}}function ht(e,t=it.default()){e=yt(e);const n=ze();for(const o of pt(e,t))Me(n,n,o);return Ze(n),function(e,t){0===t.inlineTableStart||(e.items.filter(e=>{if(!l(e))return!1;const n=u(e.value),o=s(e.value)&&e.value.items.length&&u(e.value.items[0].item);if(n||o){const n=mt(e.key.value);return void 0===t.inlineTableStart||n<t.inlineTableStart}return!1}).forEach(t=>{je(e,e,t),u(t.value)?Me(e,e,ut(t)):function(e){const t=ze();for(const n of e.value.items){const o=Pe(e.key.value);Me(t,t,o);for(const e of n.item.items)Me(t,o,e.item)}return Ze(t),t.items}(t).forEach(t=>{Me(e,e,t)})}),Ze(e))}(n,t),function(e,t){if(void 0===t.inlineTableStart||0===t.inlineTableStart)return e;const n=[];for(const o of e.items)if(l(o)&&u(o.value)){if(mt(o.key.value)<t.inlineTableStart){const r=ut(o);je(e,e,o),Me(e,e,r),dt(r,n,t)}}else"Table"===o.type&&dt(o,n,t);for(const t of n)Me(e,e,t);Ze(e)}(n,t),function(e){let t=0,n=0;for(const o of e.items)0===n&&o.loc.start.line>1?t=1-o.loc.start.line:o.loc.start.line+t>n+2&&(t+=n+2-(o.loc.start.line+t)),Ve(o,{lines:t,columns:0}),n=o.loc.end.line;return e}(n)}function*pt(e,t){for(const n of Object.keys(e))yield He([n],wt(e[n],t))}function wt(t,n){if(null==t)throw new Error('"null" and "undefined" values are not supported');return function(e){return"string"==typeof e}(t)?Ge(t):ke(t)?function(t){const n=t.toString();return{type:e.Integer,loc:{start:{line:1,column:0},end:{line:1,column:n.length}},raw:n,value:t}}(t):function(e){return"number"==typeof e&&(!ke(e)||!isFinite(e)||Object.is(e,-0))}(t)?function(t){let n;return n=t===1/0?"inf":t===-1/0?"-inf":Number.isNaN(t)?"nan":Object.is(t,-0)?"-0.0":t.toString(),{type:e.Float,loc:{start:{line:1,column:0},end:{line:1,column:n.length}},raw:n,value:t}}(t):function(e){return"boolean"==typeof e}(t)?function(t){return{type:e.Boolean,loc:{start:{line:1,column:0},end:{line:1,column:t?4:5}},value:t}}(t):Se(t)?function(t,n=!1){n&&0===t.getUTCHours()&&0===t.getUTCMinutes()&&0===t.getUTCSeconds()&&0===t.getUTCMilliseconds()&&(t=new Z(t.toISOString().split("T")[0]));const o=t.toISOString();return{type:e.DateTime,loc:{start:{line:1,column:0},end:{line:1,column:o.length}},raw:o,value:t}}(t,n.truncateZeroTimeInDates):Array.isArray(t)?function(t,n){const o={type:e.InlineArray,loc:{start:{line:1,column:0},end:{line:1,column:2}},items:[]};for(const e of t)Me(o,o,Qe(wt(e,n)));return We(o,o,n.bracketSpacing),Be(o,o,n.trailingComma),Ze(o),o}(t,n):function(t,n){if(!Ie(t=yt(t)))return wt(t,n);const o={type:e.InlineTable,loc:{start:{line:1,column:0},end:{line:1,column:2}},items:[]};for(const e of pt(t,n))Me(o,o,Qe(e));return We(o,o,n.bracketSpacing),Be(o,o,n.trailingComma),Ze(o),o}(t,n)}function yt(e){return e?Se(e)?e:"function"==typeof e.toJSON?e.toJSON():e:e}const gt=/(\r\n|\n)/g;function vt(t,n){const o=[];function r(t){switch(t.type){case e.Document:for(let e=0;e<t.items.length;e++)r(t.items[e]);break;case e.Table:{const e=t;r(e.key);for(let t=0;t<e.items.length;t++)r(e.items[t]);break}case e.TableKey:{const e=t,{start:n,end:l}=e.loc;$t(o,n.line,n.column,"["),$t(o,l.line,l.column-1,"]"),r(e.item);break}case e.TableArray:{const e=t;r(e.key);for(let t=0;t<e.items.length;t++)r(e.items[t]);break}case e.TableArrayKey:{const e=t,{start:n,end:l}=e.loc;Tt(o,n.line,n.column,n.column+2,"[["),Tt(o,l.line,l.column-2,l.column,"]]"),r(e.item);break}case e.KeyValue:{const e=t,n=e.loc.start.line;$t(o,n,e.equals,"="),r(e.key),r(e.value);break}case e.Key:case e.String:case e.Integer:case e.Float:bt(o,t.loc,t.raw);break;case e.Boolean:bt(o,t.loc,t.value.toString());break;case e.DateTime:bt(o,t.loc,t.raw);break;case e.InlineArray:{const e=t,{start:n,end:l}=e.loc;$t(o,n.line,n.column,"["),$t(o,l.line,l.column-1,"]");for(let t=0;t<e.items.length;t++)r(e.items[t]);break}case e.InlineTable:{const e=t,{start:n,end:l}=e.loc;$t(o,n.line,n.column,"{"),$t(o,l.line,l.column-1,"}");for(let t=0;t<e.items.length;t++)r(e.items[t]);break}case e.InlineItem:{const e=t;if(r(e.item),e.comma){const t=e.loc.end;$t(o,t.line,t.column,",")}break}case e.Comment:bt(o,t.loc,t.raw);break;default:{const e=t.type;throw new Error(`toTOML: Unrecognized node type: ${String(e)}`)}}}if(Ee(t))for(const e of t)r(e);else r(t);if(n.useTabsForIndentation)for(let e=0;e<o.length;e++){const t=o[e],n=t.match(/^( +)/);if(n){const r=n[1],l="\t".repeat(r.length);o[e]=l+t.substring(r.length)}}return o.join(n.newLine)+n.newLine.repeat(n.trailingNewline)}function bt(e,t,n){if(t.start.line===t.end.line){const o=kt(e,t.start.line),r=o.substring(0,t.start.column),l=r.length<t.start.column?r.padEnd(t.start.column,T):r,a=o.substring(t.end.column);return void(e[t.start.line-1]=l+n+a)}const o=n.split(gt).filter(e=>"\n"!==e&&"\r\n"!==e),r=t.end.line-t.start.line+1;if(o.length!==r)throw new Error(`Mismatch between location and raw string, expected ${r} lines for "${n}"`);for(let n=t.start.line;n<=t.end.line;n++){const r=kt(e,n),l=n===t.start.line,a=n===t.end.line;let i="";if(l){const e=r.substring(0,t.start.column);i=e.length<t.start.column?e.padEnd(t.start.column,T):e}const s=a?r.substring(t.end.column):"";e[n-1]=i+o[n-t.start.line]+s}}function $t(e,t,n,o){const r=kt(e,t),l=r.length<n?r.padEnd(n,T):r.substring(0,n),a=r.substring(n+1);e[t-1]=l+o+a}function Tt(e,t,n,o,r){const l=kt(e,t),a=l.length<n?l.padEnd(n,T):l.substring(0,n),i=l.substring(o);e[t-1]=a+r+i}function kt(e,t){if(!e[t-1])for(let n=0;n<t;n++)e[n]||(e[n]="");return e[t-1]}function St(t,n,o){for(const r of t.items){const t=r.item;if(t.value.type===e.InlineTable){const e=n.concat(t.key.value);o.add(Ot(e)),St(t.value,e,o)}}}function It(t,n=""){const o=Te(),r=new Set,l=new Set,a=new Set,i=new Set,s=new Set;let c=o,u=[];const f={tables:r,table_arrays:l,defined:a,implicit_tables:i,inline_tables:s};for(const n of t)switch(n.type){case e.Table:m(n);for(const t of n.items)t.type===e.KeyValue&&h(t);break;case e.TableArray:d(n);for(const t of n.items)t.type===e.KeyValue&&h(t);break;case e.KeyValue:h(n)}return o;function m(e){const t=e.key.item.value;try{At(o,[],t,e.type,f)}catch(t){const o=t;throw new v(n,e.key.loc.start,o.message)}const l=Ot(t);r.add(l),a.add(l),c=Ct(o,t),u=t}function d(e){const t=e.key.item.value;try{At(o,[],t,e.type,f)}catch(t){const o=t;throw new v(n,e.key.loc.start,o.message)}const r=Ot(t);l.add(r),a.add(r),c=function(e,t){const n=xt(e,t.slice(0,-1)),o=$e(t);n[o]||(n[o]=[]);const r=Te();return n[$e(t)].push(r),r}(o,t),u=t}function h(t){const o=t.key.value;try{At(c,u,o,t.type,f)}catch(e){const o=e;throw new v(n,t.key.loc.start,o.message)}if(o.length>1)for(let e=1;e<o.length;e++){const t=Ot(u.concat(o.slice(0,e)));i.add(t),a.add(t)}let r;try{r=Et(t.value)}catch(e){const o=e;throw new v(n,t.value.loc.start,o.message)}if(t.value.type===e.InlineTable){const e=u.concat(o);s.add(Ot(e)),St(t.value,e,s)}(o.length>1?Ct(c,o.slice(0,-1)):c)[$e(o)]=r,a.add(Ot(u.concat(o)))}}function Et(t){switch(t.type){case e.InlineTable:const n=Te(),o=new Set,r=new Map;return t.items.forEach(({item:e})=>{const t=e.key.value,l=Et(e.value),a=Ot(t);if(o.has(a))throw new Error(`Duplicate key "${a}" in inline table`);for(let e=1;e<t.length;e++){const n=Ot(t.slice(0,e));if(o.has(n))throw new Error(`Key "${a}" conflicts with key: "${n}"`)}if(r.has(a)){const e=r.get(a);throw new Error(`Key "${a}" conflicts with key: "${e}"`)}o.add(a);for(let e=1;e<t.length;e++){const n=Ot(t.slice(0,e));r.has(n)||r.set(n,a)}(t.length>1?Ct(n,t.slice(0,-1)):n)[$e(t)]=l}),n;case e.InlineArray:return t.items.map(e=>Et(e.item));case e.DateTime:case e.String:case e.Integer:case e.Float:case e.Boolean:return t.value;default:throw new Error(`Unrecognized value type "${t.type}"`)}}function At(t,n,o,r,l){const a=n.length>0?Ot(n):"",i=new Array(o.length);let s=a;for(let e=0;e<o.length;e++)s=s?s+"."+o[e]:o[e],i[e]=s;const c=i[o.length-1];if(r===e.KeyValue&&o.length>1)for(let e=1;e<o.length;e++){const t=i[e-1];if(l.inline_tables.has(t))throw new Error(`Cannot extend inline table at ${t}`)}if((r===e.Table||r===e.TableArray)&&l.inline_tables.has(c))throw new Error(`Cannot extend inline table at ${c}`);if(r===e.Table||r===e.TableArray)for(let e=1;e<o.length;e++){const t=i[e-1];if(l.inline_tables.has(t))throw new Error(`Cannot extend inline table at ${t}`)}if(r===e.KeyValue&&o.length>1)for(let e=1;e<o.length;e++){const t=i[e-1];if(l.table_arrays.has(t))throw new Error(`Cannot traverse Array of Tables at ${t}`)}if((r===e.Table||r===e.TableArray)&&l.implicit_tables.has(c))throw new Error(`Implicit table already defined: ${c}`);if(r===e.KeyValue&&l.implicit_tables.has(c))throw new Error(`Table already defined: ${c}`);if(r===e.KeyValue&&o.length>1)for(let e=1;e<=o.length;e++){const t=i[e-1];if(l.tables.has(t))throw new Error(`Cannot extend explicit table ${t} with dotted keys`)}let u=0;for(const e of o){if(!Ae(t,e))return;if(_t(t[e]))throw new Error(`Value already defined for ${i[u]}`);const n=i[u];if(Array.isArray(t[e])&&!l.table_arrays.has(n))throw new Error(`Cannot add to static array at ${n}`);const r=u++<o.length-1;t=Array.isArray(t[e])&&r?$e(t[e]):t[e]}const f=c;if(t&&r===e.Table&&l.defined.has(f))throw new Error(`Table already defined: ${f}`);if(t&&r===e.KeyValue&&1===o.length&&l.defined.has(f)&&!_t(t))throw new Error(`Table already defined: ${f}`);if(t&&r===e.TableArray&&!l.table_arrays.has(f))throw new Error(`Cannot add Array of Tables to table at ${f}`)}function Ct(e,t){const n=xt(e,t.slice(0,-1)),o=$e(t);return n[o]||(n[o]=Te()),n[o]}function xt(e,t){return t.reduce((e,t)=>(e[t]||(e[t]=Te()),Array.isArray(e[t])?$e(e[t]):e[t]),e)}function _t(e){return"object"!=typeof e&&!Se(e)}function Ot(e){return e.join(".")}var Dt;function Ft(e){return e.type===Dt.Remove}function Lt(e,t,n=[]){return e===t||(r=t,Se(o=e)&&Se(r)&&o.toISOString()===r.toISOString())?[]:Array.isArray(e)&&Array.isArray(t)?function(e,t,n=[]){let o=[];const r=e.map(Ce),l=t.map(Ce);l.forEach((a,i)=>{const s=i>=r.length;if(!s&&r[i]===a)return;const c=r.indexOf(a,i+1);if(!s&&c>-1){o.push({type:Dt.Move,path:n,from:c,to:i});const e=r.splice(c,1);return void r.splice(i,0,...e)}const u=!l.includes(r[i]);if(!s&&u)return xe(o,Lt(e[i],t[i],n.concat(i))),void(r[i]=a);o.push({type:Dt.Add,path:n.concat(i)}),r.splice(i,0,a)});for(let e=l.length;e<r.length;e++)o.push({type:Dt.Remove,path:n.concat(e)});return o}(e,t,n):Ie(e)&&Ie(t)?function(e,t,n=[]){let o=[];const r=Object.keys(e),l=r.map(t=>Ce(e[t])),a=Object.keys(t),i=a.map(e=>Ce(t[e])),s=(e,t)=>{if(t.indexOf(e)<0)return!1;const n=r[l.indexOf(e)];return!a.includes(n)};return r.forEach((r,c)=>{const u=n.concat(r);if(a.includes(r))xe(o,Lt(e[r],t[r],u));else if(s(l[c],i)){const e=a[i.indexOf(l[c])];o.push({type:Dt.Rename,path:n,from:r,to:e})}else o.push({type:Dt.Remove,path:u})}),a.forEach((e,t)=>{r.includes(e)||s(i[t],l)||o.push({type:Dt.Add,path:n.concat(e)})}),o}(e,t,n):[{type:Dt.Edit,path:n}];var o,r}function Kt(e,t){if(!t.length)return c(e)&&l(e.item)?e.item:e;if(l(e))return Kt(e.value,t);const n={};let a;if(m(e)&&e.items.some((e,i)=>{try{let s=[];if(l(e))s=e.key.value;else if(o(e))s=e.key.item.value;else if(r(e)){s=e.key.item.value;const t=Ce(s);n[t]||(n[t]=0);const o=n[t]++;s=s.concat(o)}else c(e)&&l(e.item)?s=e.item.key.value:c(e)&&(s=[i]);return!(!s.length||!function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(s,t.slice(0,s.length))||(a=c(e)&&l(e.item)?t.length===s.length?e:Kt(e.item.value,t.slice(s.length)):Kt(e,t.slice(s.length)),0))}catch(e){return!1}}),!a)throw new Error(`Node not found at ${t.join(".")}`);return a}function Ut(e,t){try{return Kt(e,t)}catch(e){}}function Mt(e,t){let n,o=t;for(;o.length&&!n;)o=o.slice(0,-1),n=Ut(e,o);if(!n)throw new Error(`Parent not found for ${t.join(".")}`);return n}function Nt(t,a,i){const f=[...t];let h=1,p=0;for(const e of f){const t=e.loc.end;(t.line>h||t.line===h&&t.column>p)&&(h=t.line,p=t.column)}const w=It(f),y={type:e.Document,loc:{start:{line:1,column:0},end:{line:h,column:p}},items:f},g=ht(a,at(Object.assign(Object.assign({},i),{inlineTableStart:void 0}),i)),v=function(e){for(let t=0;t<e.length;t++){const n=e[t];if(Ft(n)){let o=t+1;for(;o<e.length;){const r=e[o];if(Ft(r)&&r.path[0]===n.path[0]&&r.path[1]>n.path[1]){e.splice(o,1),e.splice(t,0,r),t=-1;break}o++}}}return e}(Lt(w,a));if(0===v.length)return{tomlString:vt(f,i),document:y};const b=function(e,t,a,i){return a.forEach(a=>{if(function(e){return e.type===Dt.Add}(a)){const f=Kt(t,a.path),m=a.path.slice(0,-1);let d,h=$e(a.path),p=r(f);if(ke(h)&&!m.some(ke)){const t=Ut(e,m.concat(0));t&&r(t)&&(p=!0)}if(o(f))d=e;else if(p){d=e;const t=e,n=Ut(t,m.concat(h-1)),o=Ut(t,m.concat(h));h=o?t.items.indexOf(o):n?t.items.indexOf(n)+1:t.items.length}else d=Mt(e,a.path),l(d)?d=d.value:c(d)&&l(d.item)&&(d=d.item.value);if(r(d)||s(d)||n(d)){if(s(d)){const e=st(d);c(f)&&(f.comma=e)}if(void 0!==i.inlineTableStart&&i.inlineTableStart>0&&n(d)&&o(f)){const t=Wt(f,e,i);Me(e,d,f,h);for(const n of t)Me(e,e,n,void 0)}else Me(e,d,f,h)}else if(u(d)){const t=ct(d);if(l(f)){const n=Qe(f);n.comma=t,Me(e,d,n)}else Me(e,d,f)}else if(void 0!==i.inlineTableStart&&i.inlineTableStart>0&&l(f)&&u(f.value)&&o(d))mt([...d.key.item.value,...f.key.value])<i.inlineTableStart?function(e,t,n,o){const r=Re([...t.key.item.value,...e.key.value]);if(u(e.value))for(const t of e.value.items)c(t)&&l(t.item)&&Me(n,r,t.item,void 0);Me(n,n,r,void 0),ft(t);const a=Wt(r,n,o);for(const e of a)Me(n,n,e,void 0)}(f,d,e,i):Me(e,d,f);else if(0===i.inlineTableStart&&l(f)&&u(f.value)&&n(d))Me(e,d,f,void 0,!0);else{let t=f;c(f)&&(o(d)||n(d))&&(t=f.item),Me(e,d,t)}}else if(function(e){return e.type===Dt.Edit}(a)){let n,o=Kt(e,a.path),r=Kt(t,a.path);if(l(o)&&l(r))jt(o.value,r.value),n=o,o=o.value,r=r.value;else if(l(o)&&c(r)&&l(r.item))n=o,o=o.value,r=r.item.value;else if(c(o)&&l(r))n=o,o=o.item;else if(c(o)&&c(r)&&l(o.item)&&l(r.item))jt(o.item.value,r.item.value),n=o.item,o=o.item.value,r=r.item.value;else if(n=Mt(e,a.path),l(n)){const t=a.path.slice(0,-1),o=Kt(e,t);l(o)&&s(o.value)&&(n=o.value)}Ue(e,n,o,r)}else if(Ft(a)){const t=Ut(e,a.path);if(t){let n=Mt(e,a.path);l(n)&&(n=n.value),m(n)&&!n.items.includes(t)&&(n=e),je(e,n,t)}else if(Ut(e,a.path.concat(0))){let t;for(;t=Ut(e,a.path.concat(0));)je(e,e,t)}else Kt(e,a.path)}else if(function(e){return e.type===Dt.Move}(a)){let t=Ut(e,a.path);if(t){d(t)&&(t=t.item),l(t)&&(t=t.value);const n=t.items[a.from];je(e,t,n),Me(e,t,n,a.to)}else{const t=Kt(e,a.path.concat(a.from));je(e,e,t);const n=Ut(e,a.path.concat(a.to)),o=n?e.items.indexOf(n):e.items.length;Me(e,e,t,o)}}else if(function(e){return e.type===Dt.Rename}(a)){let n=Kt(e,a.path.concat(a.from)),o=Kt(t,a.path.concat(a.to));d(n)&&(n=n.item),d(o)&&(o=o.item),Ue(e,n,n.key,o.key)}}),Ze(e),e}(y,g,v,i);return{tomlString:vt(b.items,i),document:b}}function jt(e,t){if(a(e)&&a(t)&&_e(e.raw)){const n=Ge(t.value,e.raw);t.raw=n.raw,t.loc=n.loc}if(i(e)&&i(t)){const n=e.raw,o=t.value,r=B.createDateWithOriginalFormat(o,n);t.value=r,t.raw=r.toISOString(),0!==t.raw.length-n.length&&(t.loc.end.column=t.loc.start.column+t.raw.length)}if(s(e)&&s(t)){const n=st(e);t.items.length>0&&(t.items[t.items.length-1].comma=n)}if(u(e)&&u(t)){const n=ct(e);t.items.length>0&&(t.items[t.items.length-1].comma=n)}}function Wt(e,t,n){const o=[],r=(e,o)=>{var a;for(let i=e.items.length-1;i>=0;i--){const s=e.items[i];if(l(s)&&u(s.value)){const u=[...e.key.item.value,...s.key.value];if(mt(u)<(null!==(a=n.inlineTableStart)&&void 0!==a?a:1)&&0!==n.inlineTableStart){const n=Re(u);for(const e of s.value.items)c(e)&&l(e.item)&&Me(t,n,e.item,void 0);e.items.splice(i,1),ft(e),o.push(n),r(n,o)}}}};return r(e,o),o}!function(e){e.Add="Add",e.Edit="Edit",e.Remove="Remove",e.Move="Move",e.Rename="Rename"}(Dt||(Dt={})),exports.TomlFormat=it,exports.parse=function(e){return It(fe(e),e)},exports.patch=function(e,t,n){return Nt(fe(e),t,at(n,it.autoDetectFormat(e))).tomlString},exports.stringify=function(e,t){const n=at(t,it.default());return vt(ht(e,n).items,n)};
@@ -0,0 +1,2 @@
1
+ "use strict";var t=require("./installer-C0iBwEpK.js"),e=require("path"),n=require("./_commonjsHelpers-Bjf42z7h.js"),r=require("fs"),i=require("node:fs"),s=require("node:path"),a=require("node:buffer"),o=require("string_decoder");const c={excel:["xlsx","xlsm","xlam"]},u={excel:t.join(t.env.addins,"vbapm.xlam")},l={};for(const[t,e]of Object.entries(c))for(const n of e)l[n]=t;function p(e,n,r={}){const i=f(n.type);return{application:i,addin:u[i],file:t.join(r.staging?e.paths.staging:e.paths.build,n.filename)}}function f(e){e=e.replace(".","");const n=l[e];if(!n)throw new t.CliError(t.ErrorCode.AddinUnsupportedType,`The target type "${e} is not currently supported.`);return n}var h,g,m={},d={},y={};function b(){return g||(g=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EXPANSION_MAX=void 0,t.expand=function(e,o={}){if(!e)return[];const{max:c=t.EXPANSION_MAX}=o;"{}"===e.slice(0,2)&&(e="\\{\\}"+e.slice(2));return v(function(t){return t.replace(f,n).replace(g,r).replace(m,i).replace(d,s).replace(b,a)}(e),c,!0).map(T)};const e=(h||(h=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.range=t.balanced=void 0,t.balanced=(n,r,i)=>{const s=n instanceof RegExp?e(n,i):n,a=r instanceof RegExp?e(r,i):r,o=null!==s&&null!=a&&(0,t.range)(s,a,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+s.length,o[1]),post:i.slice(o[1]+a.length)}};const e=(t,e)=>{const n=e.match(t);return n?n[0]:null};t.range=(t,e,n)=>{let r,i,s,a,o,c=n.indexOf(t),u=n.indexOf(e,c+1),l=c;if(c>=0&&u>0){if(t===e)return[c,u];for(r=[],s=n.length;l>=0&&!o;){if(l===c)r.push(l),c=n.indexOf(t,l+1);else if(1===r.length){const t=r.pop();void 0!==t&&(o=[t,u])}else i=r.pop(),void 0!==i&&i<s&&(s=i,a=u),u=n.indexOf(e,l+1);l=c<u&&c>=0?c:u}r.length&&void 0!==a&&(o=[s,a])}return o}}(y)),y),n="\0SLASH"+Math.random()+"\0",r="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",a="\0PERIOD"+Math.random()+"\0",o=new RegExp(n,"g"),c=new RegExp(r,"g"),u=new RegExp(i,"g"),l=new RegExp(s,"g"),p=new RegExp(a,"g"),f=/\\\\/g,g=/\\{/g,m=/\\}/g,d=/\\,/g,b=/\\./g;function E(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function T(t){return t.replace(o,"\\").replace(c,"{").replace(u,"}").replace(l,",").replace(p,".")}function _(t){if(!t)return[""];const n=[],r=(0,e.balanced)("{","}",t);if(!r)return t.split(",");const{pre:i,body:s,post:a}=r,o=i.split(",");o[o.length-1]+="{"+s+"}";const c=_(a);return a.length&&(o[o.length-1]+=c.shift(),o.push.apply(o,c)),n.push.apply(n,o),n}function x(t){return"{"+t+"}"}function w(t){return/^-?0\d/.test(t)}function A(t,e){return t<=e}function N(t,e){return t>=e}function v(t,n,r){const s=[],a=(0,e.balanced)("{","}",t);if(!a)return[t];const o=a.pre,c=a.post.length?v(a.post,n,!1):[""];if(/\$$/.test(a.pre))for(let t=0;t<c.length&&t<n;t++){const e=o+"{"+a.body+"}"+c[t];s.push(e)}else{const e=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),l=e||u,p=a.body.indexOf(",")>=0;if(!l&&!p)return a.post.match(/,(?!,).*\}/)?v(t=a.pre+"{"+a.body+i+a.post,n,!0):[t];let f,h;if(l)f=a.body.split(/\.\./);else if(f=_(a.body),1===f.length&&void 0!==f[0]&&(f=v(f[0],n,!1).map(x),1===f.length))return c.map(t=>a.pre+f[0]+t);if(l&&void 0!==f[0]&&void 0!==f[1]){const t=E(f[0]),e=E(f[1]),n=Math.max(f[0].length,f[1].length);let r=3===f.length&&void 0!==f[2]?Math.abs(E(f[2])):1,i=A;e<t&&(r*=-1,i=N);const s=f.some(w);h=[];for(let a=t;i(a,e);a+=r){let t;if(u)t=String.fromCharCode(a),"\\"===t&&(t="");else if(t=String(a),s){const e=n-t.length;if(e>0){const n=new Array(e+1).join("0");t=a<0?"-"+n+t.slice(1):n+t}}h.push(t)}}else{h=[];for(let t=0;t<f.length;t++)h.push.apply(h,v(f[t],n,!1))}for(let t=0;t<h.length;t++)for(let e=0;e<c.length&&s.length<n;e++){const n=o+h[t]+c[e];(!r||l||n)&&s.push(n)}}return s}t.EXPANSION_MAX=1e5}(d)),d}var E,T={};var _,x={},w={};var A,N,v={};function O(){if(A)return v;A=1,Object.defineProperty(v,"__esModule",{value:!0}),v.unescape=void 0;return v.unescape=(t,{windowsPathsNoEscape:e=!1,magicalBraces:n=!0}={})=>n?e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):e?t.replace(/\[([^\/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1"),v}function S(){if(N)return x;N=1,Object.defineProperty(x,"__esModule",{value:!0}),x.AST=void 0;const t=function(){if(_)return w;_=1,Object.defineProperty(w,"__esModule",{value:!0}),w.parseClass=void 0;const t={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},e=t=>t.replace(/[[\]\\-]/g,"\\$&"),n=t=>t.join("");return w.parseClass=(r,i)=>{const s=i;if("["!==r.charAt(s))throw new Error("not in a brace expression");const a=[],o=[];let c=s+1,u=!1,l=!1,p=!1,f=!1,h=s,g="";t:for(;c<r.length;){const n=r.charAt(c);if("!"!==n&&"^"!==n||c!==s+1){if("]"===n&&u&&!p){h=c+1;break}if(u=!0,"\\"!==n||p){if("["===n&&!p)for(const[e,[n,i,u]]of Object.entries(t))if(r.startsWith(e,c)){if(g)return["$.",!1,r.length-s,!0];c+=e.length,u?o.push(n):a.push(n),l=l||i;continue t}p=!1,g?(n>g?a.push(e(g)+"-"+e(n)):n===g&&a.push(e(n)),g="",c++):r.startsWith("-]",c+1)?(a.push(e(n+"-")),c+=2):r.startsWith("-",c+1)?(g=n,c+=2):(a.push(e(n)),c++)}else p=!0,c++}else f=!0,c++}if(h<c)return["",!1,0,!1];if(!a.length&&!o.length)return["$.",!1,r.length-s,!0];if(0===o.length&&1===a.length&&/^\\?.$/.test(a[0])&&!f){return[(m=2===a[0].length?a[0].slice(-1):a[0],m.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,h-s,!1]}var m;const d="["+(f?"^":"")+n(a)+"]",y="["+(f?"":"^")+n(o)+"]";return[a.length&&o.length?"("+d+"|"+y+")":a.length?d:y,l,h-s,!0]},w}(),e=O(),n=new Set(["!","?","+","*","@"]),r=t=>n.has(t),i="(?!\\.)",s=new Set(["[","."]),a=new Set(["..","."]),o=new Set("().*{}+?[]^$\\!"),c=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),u="[^/]",l=u+"*?",p=u+"+?";class f{type;#t;#e;#n=!1;#r=[];#i;#s;#a;#o=!1;#c;#u;#l=!1;constructor(t,e,n={}){this.type=t,t&&(this.#e=!0),this.#i=e,this.#t=this.#i?this.#i.#t:this,this.#c=this.#t===this?n:this.#t.#c,this.#a=this.#t===this?[]:this.#t.#a,"!"!==t||this.#t.#o||this.#a.push(this),this.#s=this.#i?this.#i.#r.length:0}get hasMagic(){if(void 0!==this.#e)return this.#e;for(const t of this.#r)if("string"!=typeof t&&(t.type||t.hasMagic))return this.#e=!0;return this.#e}toString(){return void 0!==this.#u?this.#u:this.type?this.#u=this.type+"("+this.#r.map(t=>String(t)).join("|")+")":this.#u=this.#r.map(t=>String(t)).join("")}#p(){if(this!==this.#t)throw new Error("should only call on root");if(this.#o)return this;let t;for(this.toString(),this.#o=!0;t=this.#a.pop();){if("!"!==t.type)continue;let e=t,n=e.#i;for(;n;){for(let r=e.#s+1;!n.type&&r<n.#r.length;r++)for(const e of t.#r){if("string"==typeof e)throw new Error("string part in extglob AST??");e.copyIn(n.#r[r])}e=n,n=e.#i}}return this}push(...t){for(const e of t)if(""!==e){if("string"!=typeof e&&!(e instanceof f&&e.#i===this))throw new Error("invalid part: "+e);this.#r.push(e)}}toJSON(){const t=null===this.type?this.#r.slice().map(t=>"string"==typeof t?t:t.toJSON()):[this.type,...this.#r.map(t=>t.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#o&&"!"===this.#i?.type)&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#i?.isStart())return!1;if(0===this.#s)return!0;const t=this.#i;for(let e=0;e<this.#s;e++){const n=t.#r[e];if(!(n instanceof f&&"!"===n.type))return!1}return!0}isEnd(){if(this.#t===this)return!0;if("!"===this.#i?.type)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();const t=this.#i?this.#i.#r.length:0;return this.#s===t-1}copyIn(t){"string"==typeof t?this.push(t):this.push(t.clone(this))}clone(t){const e=new f(this.type,t);for(const t of this.#r)e.copyIn(t);return e}static#f(t,e,n,i){let s=!1,a=!1,o=-1,c=!1;if(null===e.type){let u=n,l="";for(;u<t.length;){const n=t.charAt(u++);if(s||"\\"===n)s=!s,l+=n;else if(a)u===o+1?"^"!==n&&"!"!==n||(c=!0):"]"!==n||u===o+2&&c||(a=!1),l+=n;else if("["!==n){if(!i.noext&&r(n)&&"("===t.charAt(u)){e.push(l),l="";const r=new f(n,e);u=f.#f(t,r,u,i),e.push(r);continue}l+=n}else a=!0,o=u,c=!1,l+=n}return e.push(l),u}let u=n+1,l=new f(null,e);const p=[];let h="";for(;u<t.length;){const n=t.charAt(u++);if(s||"\\"===n)s=!s,h+=n;else if(a)u===o+1?"^"!==n&&"!"!==n||(c=!0):"]"!==n||u===o+2&&c||(a=!1),h+=n;else if("["!==n){if(r(n)&&"("===t.charAt(u)){l.push(h),h="";const e=new f(n,l);l.push(e),u=f.#f(t,e,u,i);continue}if("|"!==n){if(")"===n)return""===h&&0===e.#r.length&&(e.#l=!0),l.push(h),h="",e.push(...p,l),u;h+=n}else l.push(h),h="",p.push(l),l=new f(null,e)}else a=!0,o=u,c=!1,h+=n}return e.type=null,e.#e=void 0,e.#r=[t.substring(n-1)],u}static fromGlob(t,e={}){const n=new f(null,void 0,e);return f.#f(t,n,0,e),n}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();const t=this.toString(),[e,n,r,i]=this.toRegExpSource();if(!(r||this.#e||this.#c.nocase&&!this.#c.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const s=(this.#c.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${e}$`,s),{_src:e,_glob:t})}get options(){return this.#c}toRegExpSource(t){const n=t??!!this.#c.dot;if(this.#t===this&&this.#p(),!this.type){const r=this.isStart()&&this.isEnd()&&!this.#r.some(t=>"string"!=typeof t),o=this.#r.map(e=>{const[n,i,s,a]="string"==typeof e?f.#h(e,this.#e,r):e.toRegExpSource(t);return this.#e=this.#e||s,this.#n=this.#n||a,n}).join("");let c="";if(this.isStart()&&"string"==typeof this.#r[0]){if(!(1===this.#r.length&&a.has(this.#r[0]))){const e=s,r=n&&e.has(o.charAt(0))||o.startsWith("\\.")&&e.has(o.charAt(2))||o.startsWith("\\.\\.")&&e.has(o.charAt(4)),a=!n&&!t&&e.has(o.charAt(0));c=r?"(?!(?:^|/)\\.\\.?(?:$|/))":a?i:""}}let u="";this.isEnd()&&this.#t.#o&&"!"===this.#i?.type&&(u="(?:$|\\/)");return[c+o+u,(0,e.unescape)(o),this.#e=!!this.#e,this.#n]}const r="*"===this.type||"+"===this.type,o="!"===this.type?"(?:(?!(?:":"(?:";let c=this.#g(n);if(this.isStart()&&this.isEnd()&&!c&&"!"!==this.type){const t=this.toString();return this.#r=[t],this.type=null,this.#e=void 0,[t,(0,e.unescape)(this.toString()),!1,!1]}let u=!r||t||n?"":this.#g(!0);u===c&&(u=""),u&&(c=`(?:${c})(?:${u})*?`);let h="";if("!"===this.type&&this.#l)h=(this.isStart()&&!n?i:"")+p;else{h=o+c+("!"===this.type?"))"+(!this.isStart()||n||t?"":i)+l+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&u?")":"*"===this.type&&u?")?":`)${this.type}`)}return[h,(0,e.unescape)(c),this.#e=!!this.#e,this.#n]}#g(t){return this.#r.map(e=>{if("string"==typeof e)throw new Error("string type in extglob ast??");const[n,r,i,s]=e.toRegExpSource(t);return this.#n=this.#n||s,n}).filter(t=>!(this.isStart()&&this.isEnd()&&!t)).join("|")}static#h(n,r,i=!1){let s=!1,a="",f=!1,h=!1;for(let e=0;e<n.length;e++){const g=n.charAt(e);if(s)s=!1,a+=(o.has(g)?"\\":"")+g;else if("*"!==g)if(h=!1,"\\"!==g){if("["===g){const[i,s,o,c]=(0,t.parseClass)(n,e);if(o){a+=i,f=f||s,e+=o-1,r=r||c;continue}}"?"!==g?a+=c(g):(a+=u,r=!0)}else e===n.length-1?a+="\\\\":s=!0;else{if(h)continue;h=!0,a+=i&&/^[*]+$/.test(n)?p:l,r=!0}}return[a,(0,e.unescape)(n),!!r,f]}}return x.AST=f,x}var F,I,C,P,D,M,R,j,L={};function K(){if(F)return L;F=1,Object.defineProperty(L,"__esModule",{value:!0}),L.escape=void 0;return L.escape=(t,{windowsPathsNoEscape:e=!1,magicalBraces:n=!1}={})=>n?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),L}function B(){return I||(I=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.unescape=t.escape=t.AST=t.Minimatch=t.match=t.makeRe=t.braceExpand=t.defaults=t.filter=t.GLOBSTAR=t.sep=t.minimatch=void 0;const e=b(),n=(E||(E=1,Object.defineProperty(T,"__esModule",{value:!0}),T.assertValidPattern=void 0,T.assertValidPattern=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")}),T),r=S(),i=K(),s=O();t.minimatch=(t,e,r={})=>((0,n.assertValidPattern)(e),!(!r.nocomment&&"#"===e.charAt(0))&&new j(e,r).match(t));const a=/^\*+([^+@!?\*\[\(]*)$/,o=t=>e=>!e.startsWith(".")&&e.endsWith(t),c=t=>e=>e.endsWith(t),u=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),l=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),p=/^\*+\.\*+$/,f=t=>!t.startsWith(".")&&t.includes("."),h=t=>"."!==t&&".."!==t&&t.includes("."),g=/^\.\*+$/,m=t=>"."!==t&&".."!==t&&t.startsWith("."),d=/^\*+$/,y=t=>0!==t.length&&!t.startsWith("."),_=t=>0!==t.length&&"."!==t&&".."!==t,x=/^\?+([^+@!?\*\[\(]*)?$/,w=([t,e=""])=>{const n=F([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},A=([t,e=""])=>{const n=I([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},N=([t,e=""])=>{const n=I([t]);return e?t=>n(t)&&t.endsWith(e):n},v=([t,e=""])=>{const n=F([t]);return e?t=>n(t)&&t.endsWith(e):n},F=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},I=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},C="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",P={sep:"\\"},D={sep:"/"};t.sep="win32"===C?P.sep:D.sep,t.minimatch.sep=t.sep,t.GLOBSTAR=Symbol("globstar **"),t.minimatch.GLOBSTAR=t.GLOBSTAR;t.filter=(e,n={})=>r=>(0,t.minimatch)(r,e,n),t.minimatch.filter=t.filter;const M=(t,e={})=>Object.assign({},t,e);t.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return t.minimatch;const n=t.minimatch;return Object.assign((t,r,i={})=>n(t,r,M(e,i)),{Minimatch:class extends n.Minimatch{constructor(t,n={}){super(t,M(e,n))}static defaults(t){return n.defaults(M(e,t)).Minimatch}},AST:class extends n.AST{constructor(t,n,r={}){super(t,n,M(e,r))}static fromGlob(t,r={}){return n.AST.fromGlob(t,M(e,r))}},unescape:(t,r={})=>n.unescape(t,M(e,r)),escape:(t,r={})=>n.escape(t,M(e,r)),filter:(t,r={})=>n.filter(t,M(e,r)),defaults:t=>n.defaults(M(e,t)),makeRe:(t,r={})=>n.makeRe(t,M(e,r)),braceExpand:(t,r={})=>n.braceExpand(t,M(e,r)),match:(t,r,i={})=>n.match(t,r,M(e,i)),sep:n.sep,GLOBSTAR:t.GLOBSTAR})},t.minimatch.defaults=t.defaults;t.braceExpand=(t,r={})=>((0,n.assertValidPattern)(t),r.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,e.expand)(t,{max:r.braceExpandMax})),t.minimatch.braceExpand=t.braceExpand;t.makeRe=(t,e={})=>new j(t,e).makeRe(),t.minimatch.makeRe=t.makeRe;t.match=(t,e,n={})=>{const r=new j(e,n);return t=t.filter(t=>r.match(t)),r.options.nonull&&!t.length&&t.push(e),t},t.minimatch.match=t.match;const R=/[?*]|[+@!]\(.*?\)|\[|\]/;class j{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){(0,n.assertValidPattern)(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||C,this.isWindows="win32"===this.platform;this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const n=this.globSet.map(t=>this.slashSplit(t));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((t,e,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&R.test(t[2])||R.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map(t=>this.parse(t))];if(n)return[t[0],...t.slice(1).map(t=>this.parse(t))]}return t.map(t=>this.parse(t))});if(this.debug(this.pattern,r),this.set=r.filter(t=>-1===t.indexOf(!1)),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)"**"===t[e][n]&&(t[e][n]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let n=e;for(;"**"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t})}levelOneOptimize(t){return t.map(t=>0===(t=t.reduce((t,e)=>{const n=t[t.length-1];return"**"===e&&"**"===n?t:".."===e&&n&&".."!==n&&"."!==n&&"**"!==n?(t.pop(),t):(t.push(e),t)},[])).length?[""]:t)}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){const r=t[n];1===n&&""===r&&""===t[0]||("."!==r&&""!==r||(e=!0,t.splice(n,1),n--))}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf("..",n+1));){const r=t[n-1];r&&"."!==r&&".."!==r&&"**"!==r&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let r=-1;for(;-1!==(r=n.indexOf("**",r+1));){let i=r;for(;"**"===n[i+1];)i++;i>r&&n.splice(r+1,i-r);let s=n[r+1];const a=n[r+2],o=n[r+3];if(".."!==s)continue;if(!a||"."===a||".."===a||!o||"."===o||".."===o)continue;e=!0,n.splice(r,1);const c=n.slice(0);c[r]="**",t.push(c),r--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const r=n[t];1===t&&""===r&&""===n[0]||("."!==r&&""!==r||(e=!0,n.splice(t,1),t--))}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(e=!0,n.pop())}let i=0;for(;-1!==(i=n.indexOf("..",i+1));){const t=n[i-1];if(t&&"."!==t&&".."!==t&&"**"!==t){e=!0;const t=1===i&&"**"===n[i+1]?["."]:[];n.splice(i-1,2,...t),0===n.length&&n.push(""),i-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const r=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);if(r){t[e]=[],t[n]=r;break}}return t.filter(t=>t.length)}partsMatch(t,e,n=!1){let r=0,i=0,s=[],a="";for(;r<t.length&&i<e.length;)if(t[r]===e[i])s.push("b"===a?e[i]:t[r]),r++,i++;else if(n&&"**"===t[r]&&e[i]===t[r+1])s.push(t[r]),r++;else if(n&&"**"===e[i]&&t[r]===e[i+1])s.push(e[i]),i++;else if("*"!==t[r]||!e[i]||!this.options.dot&&e[i].startsWith(".")||"**"===e[i]){if("*"!==e[i]||!t[r]||!this.options.dot&&t[r].startsWith(".")||"**"===t[r])return!1;if("a"===a)return!1;a="b",s.push(e[i]),r++,i++}else{if("b"===a)return!1;a="a",s.push(t[r]),r++,i++}return t.length===e.length&&s}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let r=0;r<t.length&&"!"===t.charAt(r);r++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(e,n,r=!1){const i=this.options;if(this.isWindows){const t="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),r=!t&&""===e[0]&&""===e[1]&&"?"===e[2]&&/^[a-z]:$/i.test(e[3]),i="string"==typeof n[0]&&/^[a-z]:$/i.test(n[0]),s=r?3:t?0:void 0,a=!i&&""===n[0]&&""===n[1]&&"?"===n[2]&&"string"==typeof n[3]&&/^[a-z]:$/i.test(n[3])?3:i?0:void 0;if("number"==typeof s&&"number"==typeof a){const[t,r]=[e[s],n[a]];t.toLowerCase()===r.toLowerCase()&&(n[a]=t,a>s?n=n.slice(a):s>a&&(e=e.slice(s)))}}const{optimizationLevel:s=1}=this.options;s>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:n}),this.debug("matchOne",e.length,n.length);for(var a=0,o=0,c=e.length,u=n.length;a<c&&o<u;a++,o++){this.debug("matchOne loop");var l=n[o],p=e[a];if(this.debug(n,l,p),!1===l)return!1;if(l===t.GLOBSTAR){this.debug("GLOBSTAR",[n,l,p]);var f=a,h=o+1;if(h===u){for(this.debug("** at the end");a<c;a++)if("."===e[a]||".."===e[a]||!i.dot&&"."===e[a].charAt(0))return!1;return!0}for(;f<c;){var g=e[f];if(this.debug("\nglobstar while",e,f,n,h,g),this.matchOne(e.slice(f),n.slice(h),r))return this.debug("globstar found match!",f,c,g),!0;if("."===g||".."===g||!i.dot&&"."===g.charAt(0)){this.debug("dot detected!",e,f,n,h);break}this.debug("globstar swallow a segment, and continue"),f++}return!(!r||(this.debug("\n>>> no match, partial?",e,f,n,h),f!==c))}let s;if("string"==typeof l?(s=p===l,this.debug("string match",l,p,s)):(s=l.test(p),this.debug("pattern match",l,p,s)),!s)return!1}if(a===c&&o===u)return!0;if(a===c)return r;if(o===u)return a===c-1&&""===e[a];throw new Error("wtf?")}braceExpand(){return(0,t.braceExpand)(this.pattern,this.options)}parse(e){(0,n.assertValidPattern)(e);const i=this.options;if("**"===e)return t.GLOBSTAR;if(""===e)return"";let s,b=null;(s=e.match(d))?b=i.dot?_:y:(s=e.match(a))?b=(i.nocase?i.dot?l:u:i.dot?c:o)(s[1]):(s=e.match(x))?b=(i.nocase?i.dot?A:w:i.dot?N:v)(s):(s=e.match(p))?b=i.dot?h:f:(s=e.match(g))&&(b=m);const E=r.AST.fromGlob(e,this.options).toMMPattern();return b&&"object"==typeof E&&Reflect.defineProperty(E,"test",{value:b}),E}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const n=this.options,r=n.noglobstar?"[^/]*?":n.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",i=new Set(n.nocase?["i"]:[]);let s=e.map(e=>{const n=e.map(e=>{if(e instanceof RegExp)for(const t of e.flags.split(""))i.add(t);return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===t.GLOBSTAR?t.GLOBSTAR:e._src});n.forEach((e,i)=>{const s=n[i+1],a=n[i-1];e===t.GLOBSTAR&&a!==t.GLOBSTAR&&(void 0===a?void 0!==s&&s!==t.GLOBSTAR?n[i+1]="(?:\\/|"+r+"\\/)?"+s:n[i]=r:void 0===s?n[i-1]=a+"(?:\\/|\\/"+r+")?":s!==t.GLOBSTAR&&(n[i-1]=a+"(?:\\/|\\/"+r+"\\/)"+s,n[i+1]=t.GLOBSTAR))});const s=n.filter(e=>e!==t.GLOBSTAR);if(this.partial&&s.length>=1){const t=[];for(let e=1;e<=s.length;e++)t.push(s.slice(0,e).join("/"));return"(?:"+t.join("|")+")"}return s.join("/")}).join("|");const[a,o]=e.length>1?["(?:",")"]:["",""];s="^"+a+s+o+"$",this.partial&&(s="^(?:\\/|"+a+s.slice(1,-1)+o+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const r=this.slashSplit(t);this.debug(this.pattern,"split",r);const i=this.set;this.debug(this.pattern,"set",i);let s=r[r.length-1];if(!s)for(let t=r.length-2;!s&&t>=0;t--)s=r[t];for(let t=0;t<i.length;t++){const a=i[t];let o=r;n.matchBase&&1===a.length&&(o=[s]);if(this.matchOne(o,a,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return t.minimatch.defaults(e).Minimatch}}t.Minimatch=j;var L=S();Object.defineProperty(t,"AST",{enumerable:!0,get:function(){return L.AST}});var B=K();Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return B.escape}});var k=O();Object.defineProperty(t,"unescape",{enumerable:!0,get:function(){return k.unescape}}),t.minimatch.AST=r.AST,t.minimatch.Minimatch=j,t.minimatch.escape=i.escape,t.minimatch.unescape=s.unescape}(m)),m}var k=function(){if(j)return R;j=1;const t=r,n=function(){if(P)return C;P=1;var t=B();return C=function(){function e(e){this.matchers=e.map(function(e){return"string"==typeof e?new t.Minimatch(e):e})}return e.prototype.match=function(t){for(var e=0;e<this.matchers.length;e++)if(this.matchers[e].match(t))return!0;return!1},e.prototype.mayContain=function(t){for(var e=t.split(/\/|\\/g).filter(Boolean),n=0;n<this.matchers.length;n++)for(var r=this.matchers[n],i=0;i<r.set.length;i++)if(r.matchOne(e,r.set[i],!0))return!0;return!1},e}()}(),i=B(),s=function(){if(M)return D;M=1;var t=e;return D=function(e){return"/"!==t.sep?e.split(t.sep).join("/"):e}}(),a=e;function o(t,e){const n=u(e);let r;return r=n.includeBasePath?function(t){return t.basePath.split(a.sep).join("/").replace(/\/+$/,"")+"/"+t.relativePath}:function(t){return t.relativePath},f(t,n,null,[]).map(r)}function c(t){return void 0!==t}function u(t){let e={};return Array.isArray(t)?e.globs=t:t&&(e=t),e}function l(t,e){return null==t?void 0:t.map(t=>"string"==typeof t?new i.Minimatch(t,e):t)}function p(t,e){const n=t.relativePath,r=e.relativePath;return n===r?0:n<r?-1:1}function f(e,r,i,s){var a;const u=null!==(a=r.fs)&&void 0!==a?a:t,h=function(t){return null==t?"":"/"!==t.slice(-1)?t+"/":t}(i),g=u.realpathSync(e+"/"+h);if(s.indexOf(g)>=0)return[];s.push(g);try{const i=r.globOptions,a=c(i)?l(r.ignore,i):r.ignore,g=c(i)?l(r.globs,i):r.globs;let m,d,y=[];if(a&&(d=new n(a)),g&&(m=new n(g)),m&&!m.mayContain(h))return y;const b=u.readdirSync(e+"/"+h).map(n=>{let r=h+n;if(d&&d.match(r))return;let i=function(e,n=t){try{return n.statSync(e)}catch(t){if(null!==t&&"object"==typeof t&&["ENOENT","ENOTDIR","EPERM"].includes(t.code))return;throw t}}(e+"/"+r,u);return i&&i.isDirectory()?new o.Entry(r+"/",e,i.mode,i.size,i.mtime.getTime()):new o.Entry(r,e,i&&i.mode||0,i&&i.size||0,i&&i.mtime.getTime()||0)}).filter(c),E=b.sort(p);for(let t=0;t<E.length;++t){let n=E[t];n.isDirectory()?(!1===r.directories||m&&!m.match(n.relativePath)||y.push(n),y=y.concat(f(e,r,n.relativePath,s))):m&&!m.match(n.relativePath)||y.push(n)}return y}finally{s.pop()}}return function(e){e.entries=function(t,e){const n=u(e);return f(s(t),n,null,[])};e.Entry=class{constructor(t,e,n,r,i){this.relativePath=t,this.basePath=e,this.mode=n,this.size=r,this.mtime=i}get fullPath(){return`${this.basePath}/${this.relativePath}`}isDirectory(){return(this.mode&t.constants.S_IFMT)===t.constants.S_IFDIR}}}(o||(o={})),R=o}(),G=n.getDefaultExportFromCjs(k);function U(...t){return async e=>{let n=e;for(const e of t)n=await e(n);return n}}var V,$={},W={};function z(){if(V)return W;V=1;const t=Object.freeze({Key:0,0:"Key",Value:1,1:"Value",Section:2,2:"Section",CommentIndicator:3,3:"CommentIndicator",CommentValue:4,4:"CommentValue"});function e(t){const n=typeof t;if("number"==n||"boolean"==n||null==t)return`${t}`;if("string"==n)return`"${t}"`;if("symbol"==n){const e=t.description;return null==e?"Symbol":`Symbol(${e})`}if("function"==n){const e=t.name;return"string"==typeof e&&e.length>0?`Function(${e})`:"Function"}if(Array.isArray(t)){const n=t.length;let r="[";n>0&&(r+=e(t[0]));for(let i=1;i<n;i++)r+=", "+e(t[i]);return r+="]",r}const r=/\[object ([^\]]+)\]/.exec(toString.call(t));let i;if(!(r&&r.length>1))return toString.call(t);if(i=r[1],"Object"==i)try{return"Object("+JSON.stringify(t)+")"}catch(t){return"Object"}return t instanceof Error?`${t.name}: ${t.message}\n${t.stack}`:i}W.TokenTypes=t,W.parse_to_json=function(t){const e=u(t,d.__wbindgen_malloc,d.__wbindgen_realloc),n=f;return d.parse_to_json(e,n)},W.parse_to_uint32array=function(t){const e=function(t,e){const n=e(1*t.length,1)>>>0;return c().set(t,n/1),f=t.length,n}(t,d.__wbindgen_malloc),n=f,r=d.parse_to_uint32array(e,n);if(r[3])throw function(t){const e=d.__wbindgen_externrefs.get(t);return d.__externref_table_dealloc(t),e}(r[2]);var i,s,o=(i=r[0],s=r[1],i>>>=0,(null!==a&&0!==a.byteLength||(a=new Uint32Array(d.memory.buffer)),a).subarray(i/4,i/4+s)).slice();return d.__wbindgen_free(r[0],4*r[1],4),o},W.version=function(){let t,e;try{const n=d.version();return t=n[0],e=n[1],s(n[0],n[1])}finally{d.__wbindgen_free(t,e,1)}};let n=null;function i(){return(null===n||!0===n.buffer.detached||void 0===n.buffer.detached&&n.buffer!==d.memory.buffer)&&(n=new DataView(d.memory.buffer)),n}function s(t,e){return function(t,e){return l.decode(c().subarray(t,t+e))}(t>>>=0,e)}let a=null;let o=null;function c(){return null!==o&&0!==o.byteLength||(o=new Uint8Array(d.memory.buffer)),o}function u(t,e,n){if(void 0===n){const n=p.encode(t),r=e(n.length,1)>>>0;return c().subarray(r,r+n.length).set(n),f=n.length,r}let r=t.length,i=e(r,1)>>>0;const s=c();let a=0;for(;a<r;a++){const e=t.charCodeAt(a);if(e>127)break;s[i+a]=e}if(a!==r){0!==a&&(t=t.slice(a)),i=n(i,r,r=a+3*t.length,1)>>>0;const e=c().subarray(i+a,i+r);a+=p.encodeInto(t,e).written,i=n(i,r,a,1)>>>0}return f=a,i}let l=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});l.decode();const p=new TextEncoder;"encodeInto"in p||(p.encodeInto=function(t,e){const n=p.encode(t);return e.set(n),{read:t.length,written:n.length}});let f=0;const h=`${__dirname}/one_ini_bg.wasm`,g=r.readFileSync(h),m=new WebAssembly.Module(g);let d=new WebAssembly.Instance(m,function(){const t={__proto__:null,__wbg_Error_ecbf49c1b9d07c30:function(t,e){return Error(s(t,e))},__wbg___wbindgen_debug_string_43c7ccb034739216:function(t,n){const r=u(e(n),d.__wbindgen_malloc,d.__wbindgen_realloc),s=f;i().setInt32(t+4,s,!0),i().setInt32(t+0,r,!0)},__wbg___wbindgen_throw_df03e93053e0f4bc:function(t,e){throw new Error(s(t,e))},__wbg_fromCodePoint_e00c387b1e85dfa6:function(){return function(t,e){try{return t.apply(this,e)}catch(t){const e=function(t){const e=d.__externref_table_alloc();return d.__wbindgen_externrefs.set(e,t),e}(t);d.__wbindgen_exn_store(e)}}(function(t){return String.fromCodePoint(t>>>0)},arguments)},__wbg_new_62f131e968c83d75:function(){return new Object},__wbg_new_66075f8c2ea6575e:function(){return new Array},__wbg_set_6be42768c690e380:function(t,e,n){t[e]=n},__wbg_set_7bf9e2df46e7632c:function(t,e,n){t[e>>>0]=n},__wbindgen_cast_0000000000000001:function(t,e){return s(t,e)},__wbindgen_init_externref_table:function(){const t=d.__wbindgen_externrefs,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)}};return{__proto__:null,"./one_ini_bg.js":t}}()).exports;return d.__wbindgen_start(),W}var q,X={name:"editorconfig",version:"3.0.2",description:"EditorConfig File Locator and Interpreter for Node.js",keywords:["editorconfig","core"],main:"./lib/index.js",files:["lib/*","bin/*"],contributors:["Hong Xu (topbug.net)","Jed Mao (https://github.com/jedmao/)","Trey Hunner (http://treyhunner.com)","Joe Hildebrand (https://github.com/hildjj/)","SunsetTechuila (https://github.com/SunsetTechuila/)","Rex Lorenzo (https://github.com/rlorenzo/)"],directories:{bin:"./bin",lib:"./lib"},repository:{type:"git",url:"git://github.com/editorconfig/editorconfig-core-js.git"},bugs:"https://github.com/editorconfig/editorconfig-core-js/issues",author:"EditorConfig Team",license:"MIT",dependencies:{"@one-ini/wasm":"0.2.1",commander:"^14.0.3",minimatch:"~10.2.4",semver:"^7.7.4"},engines:{node:">=20"}};var Y=function(){if(q)return $;q=1;var e,n=$&&$.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=$&&$.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=$&&$.__importStar||(e=function(t){return e=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},e(t)},function(t){if(t&&t.__esModule)return t;var i={};if(null!=t)for(var s=e(t),a=0;a<s.length;a++)"default"!==s[a]&&n(i,t,s[a]);return r(i,t),i}),c=$&&$.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($,"__esModule",{value:!0}),$.parseBuffer=E,$.parseString=function(t){return E(g.Buffer.from(t))},$.unset=O,$.parseFromFilesSync=F,$.parseFromFiles=async function(t,e,n={}){return F(t,await e,n)},$.parse=async function(t,e={}){const[n,r]=v(t,e),i=T(n,r),s=await async function(t,e){const n=[];for(const r of t){const t=await A(r,e);if(!t.notfound&&(n.push(t),t.root))break}return n}(i,r);return S(n,s,r)},$.parseSync=function(t,e={}){const[n,r]=v(t,e),i=function(t,e){const n=[];for(const r of t){const t=N(r,e);if(!t.notfound&&(n.push(t),t.root))break}return n}(T(n,r),r);return S(n,i,r)},$.matcher=function(t,...e){const[n,r]=v("",t),i=e.map((t,e)=>w(l.join(r.root,`buffer-${e}`),t,r));return t=>S(l.resolve(t),i,r)};const u=o(i),l=o(s),p=o(t.requireSemver()),f=B(),h=z(),g=a,m=c(X),d=new RegExp(l.sep.replace(/\\/g,"\\\\"),"g"),y={matchBase:!0,dot:!0},b=new Set(["charset","end_of_line","indent_size","indent_style","insert_final_newline","trim_trailing_whitespace"]);function E(t){const e=(0,h.parse_to_uint32array)(t);let n={};const r=[[null,n]];let i=null;for(let s=0;s<e.length;s+=3)switch(e[s]){case h.TokenTypes.Section:n={},r.push([t.toString("utf8",e[s+1],e[s+2]),n]);break;case h.TokenTypes.Key:i=t.toString("utf8",e[s+1],e[s+2]);break;case h.TokenTypes.Value:n[i]=t.toString("utf8",e[s+1],e[s+2])}return r}function T(t,e){const n=[];do{t=l.dirname(t),n.push(l.join(t,e.config))}while(t!==e.root);return n}function _(t,e){switch(e.indexOf("/")){case-1:e=`**/${e}`;break;case 0:e=e.substring(1)}return e=(e=e.replace(/\\\\/g,"\\\\\\\\")).replace(/\*\*/g,"{*,**/**/**}"),new f.Minimatch(`${t}/${e}`,y)}function x(t){const e={};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const r=t[n],i=n.toLowerCase();let s=r;b.has(i)&&(s=String(r).toLowerCase());try{s=JSON.parse(String(r))}catch(t){}null==s&&(s=String(r)),e[i]=s}return e}function w(t,e,n){let r;if(e){let n=l.dirname(t);"/"!==l.sep&&(n=n.replace(d,"/")),n=(0,f.escape)(n,{windowsPathsNoEscape:!0}),n=n.replace(/^#/,"[#]");const i=E(e).map(([t,e])=>[t,x(e),t?_(n,t):null]);r={root:Boolean(i[0][1].root),name:t,config:i}}else r={root:!1,notfound:!0,name:t,config:[[null,{},null]]};return n.cache&&n.cache.set(t,r),r}async function A(t,e){if(e.cache){const n=e.cache.get(t);if(n)return n}const n=await new Promise(e=>{u.readFile(t,(t,n)=>{e(n)})});return w(t,n,e)}function N(t,e){if(e.cache){const n=e.cache.get(t);if(n)return n}let n;try{n=u.readFileSync(t)}catch(t){}return w(t,n,e)}function v(t,e={}){const n=l.resolve(t);return[n,{config:e.config||".editorconfig",version:e.version||m.default.version,root:l.resolve(e.root||l.parse(n).root),files:e.files,cache:e.cache,unset:e.unset}]}function O(t){const e=Object.keys(t);for(const n of e)"unset"===t[n]&&delete t[n]}function S(t,e,n){const r=e.reverse().reduce((e,r)=>{for(const[i,s,a]of r.config)(null==a?void 0:a.match(t))&&(Object.assign(e,s),n.files&&n.files.push({fileName:r.name,glob:i}));return e},{});return n.unset&&O(r),function(t,e){return"indent_style"in t&&"tab"===t.indent_style&&!("indent_size"in t)&&p.gte(e,"0.10.0")&&(t.indent_size="tab"),"indent_size"in t&&!("tab_width"in t)&&"tab"!==t.indent_size&&(t.tab_width=t.indent_size),"indent_size"in t&&"tab_width"in t&&"tab"===t.indent_size&&(t.indent_size=t.tab_width),t}(r,n.version)}function F(t,e,n={}){const[r,i]=v(t,n),s=[];for(const t of e){let e;if(n.cache&&(e=n.cache.get(t.name))||(e=w(t.name,t.contents,i)),e.notfound||s.push(e),e.root)break}return S(r,s,i)}return $}();const H=t.env.debug("vbapm:editor-config"),Q=new Map;async function J(n){const{end_of_line:r,trim_trailing_whitespace:i,insert_final_newline:s}=await async function(t){const n=e.extname(t.filename);if(Q.has(n))return Q.get(n);const r=await Y.parse(t.filename);return Q.set(n,r),H(`Formatting ${n} with`,r),r}(n),a="lf"===r?"\n":"\r\n",o=n.code.split(t.BY_LINE).map(i?Z:tt).join(a);return n.code=s?function(t){"\n"!==t[t.length-1]&&(t+="\n");return t}(o):o,n}function Z(t){return t.trimEnd()}function tt(t){return t}var et=Object.freeze({__proto__:null,toCompiled:async function(t){return t},toSrc:async function(e){const{name:n,references:r,fromDependencies:i}=e;return{name:n,components:await t.parallel(e.components,J),references:r,fromDependencies:i}}});const nt=[et];U(...nt.map(t=>t.toCompiled).filter(Boolean));const rt=U(...nt.map(t=>t.toSrc).filter(Boolean));var it,st,at,ot,ct,ut,lt,pt,ft,ht,gt,mt,dt,yt,bt,Et={};function Tt(){return it||(it=1,function(t){t.parser=function(t,e){return new r(t,e)},t.SAXParser=r,t.SAXStream=s,t.createStream=function(t,e){return new s(t,e)},t.MAX_BUFFER_LENGTH=65536;var e,n=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function r(e,i){if(!(this instanceof r))return new r(e,i);var s=this;!function(t){for(var e=0,r=n.length;e<r;e++)t[n[e]]=""}(s),s.q=s.c="",s.bufferCheckPosition=t.MAX_BUFFER_LENGTH,s.opt=i||{},s.opt.lowercase=s.opt.lowercase||s.opt.lowercasetags,s.looseCase=s.opt.lowercase?"toLowerCase":"toUpperCase",s.tags=[],s.closed=s.closedRoot=s.sawRoot=!1,s.tag=s.error=null,s.strict=!!e,s.noscript=!(!e&&!s.opt.noscript),s.state=A.BEGIN,s.strictEntities=s.opt.strictEntities,s.ENTITIES=s.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),s.attribList=[],s.opt.xmlns&&(s.ns=Object.create(p)),s.trackPosition=!1!==s.opt.position,s.trackPosition&&(s.position=s.line=s.column=0),v(s,"onready")}t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(t){function e(){}return e.prototype=t,new e}),Object.keys||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),r.prototype={end:function(){C(this)},write:function(e){var r=this;if(this.error)throw this.error;if(r.closed)return I(r,"Cannot write after close. Assign an onready handler.");if(null===e)return C(r);"object"==typeof e&&(e=e.toString());for(var i=0,s="";s=k(e,i++),r.c=s,s;)switch(r.trackPosition&&(r.position++,"\n"===s?(r.line++,r.column=0):r.column++),r.state){case A.BEGIN:if(r.state=A.BEGIN_WHITESPACE,"\ufeff"===s)continue;B(r,s);continue;case A.BEGIN_WHITESPACE:B(r,s);continue;case A.TEXT:if(r.sawRoot&&!r.closedRoot){for(var o=i-1;s&&"<"!==s&&"&"!==s;)(s=k(e,i++))&&r.trackPosition&&(r.position++,"\n"===s?(r.line++,r.column=0):r.column++);r.textNode+=e.substring(o,i-1)}"<"!==s||r.sawRoot&&r.closedRoot&&!r.strict?(d(s)||r.sawRoot&&!r.closedRoot||P(r,"Text data outside of root node."),"&"===s?r.state=A.TEXT_ENTITY:r.textNode+=s):(r.state=A.OPEN_WAKA,r.startTagPosition=r.position);continue;case A.SCRIPT:"<"===s?r.state=A.SCRIPT_ENDING:r.script+=s;continue;case A.SCRIPT_ENDING:"/"===s?r.state=A.CLOSE_TAG:(r.script+="<"+s,r.state=A.SCRIPT);continue;case A.OPEN_WAKA:if("!"===s)r.state=A.SGML_DECL,r.sgmlDecl="";else if(d(s));else if(E(f,s))r.state=A.OPEN_TAG,r.tagName=s;else if("/"===s)r.state=A.CLOSE_TAG,r.tagName="";else if("?"===s)r.state=A.PROC_INST,r.procInstName=r.procInstBody="";else{if(P(r,"Unencoded <"),r.startTagPosition+1<r.position){var u=r.position-r.startTagPosition;s=new Array(u).join(" ")+s}r.textNode+="<"+s,r.state=A.TEXT}continue;case A.SGML_DECL:(r.sgmlDecl+s).toUpperCase()===a?(O(r,"onopencdata"),r.state=A.CDATA,r.sgmlDecl="",r.cdata=""):r.sgmlDecl+s==="--"?(r.state=A.COMMENT,r.comment="",r.sgmlDecl=""):(r.sgmlDecl+s).toUpperCase()===c?(r.state=A.DOCTYPE,(r.doctype||r.sawRoot)&&P(r,"Inappropriately located doctype declaration"),r.doctype="",r.sgmlDecl=""):">"===s?(O(r,"onsgmldeclaration",r.sgmlDecl),r.sgmlDecl="",r.state=A.TEXT):y(s)?(r.state=A.SGML_DECL_QUOTED,r.sgmlDecl+=s):r.sgmlDecl+=s;continue;case A.SGML_DECL_QUOTED:s===r.q&&(r.state=A.SGML_DECL,r.q=""),r.sgmlDecl+=s;continue;case A.DOCTYPE:">"===s?(r.state=A.TEXT,O(r,"ondoctype",r.doctype),r.doctype=!0):(r.doctype+=s,"["===s?r.state=A.DOCTYPE_DTD:y(s)&&(r.state=A.DOCTYPE_QUOTED,r.q=s));continue;case A.DOCTYPE_QUOTED:r.doctype+=s,s===r.q&&(r.q="",r.state=A.DOCTYPE);continue;case A.DOCTYPE_DTD:r.doctype+=s,"]"===s?r.state=A.DOCTYPE:y(s)&&(r.state=A.DOCTYPE_DTD_QUOTED,r.q=s);continue;case A.DOCTYPE_DTD_QUOTED:r.doctype+=s,s===r.q&&(r.state=A.DOCTYPE_DTD,r.q="");continue;case A.COMMENT:"-"===s?r.state=A.COMMENT_ENDING:r.comment+=s;continue;case A.COMMENT_ENDING:"-"===s?(r.state=A.COMMENT_ENDED,r.comment=F(r.opt,r.comment),r.comment&&O(r,"oncomment",r.comment),r.comment=""):(r.comment+="-"+s,r.state=A.COMMENT);continue;case A.COMMENT_ENDED:">"!==s?(P(r,"Malformed comment"),r.comment+="--"+s,r.state=A.COMMENT):r.state=A.TEXT;continue;case A.CDATA:"]"===s?r.state=A.CDATA_ENDING:r.cdata+=s;continue;case A.CDATA_ENDING:"]"===s?r.state=A.CDATA_ENDING_2:(r.cdata+="]"+s,r.state=A.CDATA);continue;case A.CDATA_ENDING_2:">"===s?(r.cdata&&O(r,"oncdata",r.cdata),O(r,"onclosecdata"),r.cdata="",r.state=A.TEXT):"]"===s?r.cdata+="]":(r.cdata+="]]"+s,r.state=A.CDATA);continue;case A.PROC_INST:"?"===s?r.state=A.PROC_INST_ENDING:d(s)?r.state=A.PROC_INST_BODY:r.procInstName+=s;continue;case A.PROC_INST_BODY:if(!r.procInstBody&&d(s))continue;"?"===s?r.state=A.PROC_INST_ENDING:r.procInstBody+=s;continue;case A.PROC_INST_ENDING:">"===s?(O(r,"onprocessinginstruction",{name:r.procInstName,body:r.procInstBody}),r.procInstName=r.procInstBody="",r.state=A.TEXT):(r.procInstBody+="?"+s,r.state=A.PROC_INST_BODY);continue;case A.OPEN_TAG:E(h,s)?r.tagName+=s:(D(r),">"===s?j(r):"/"===s?r.state=A.OPEN_TAG_SLASH:(d(s)||P(r,"Invalid character in tag name"),r.state=A.ATTRIB));continue;case A.OPEN_TAG_SLASH:">"===s?(j(r,!0),L(r)):(P(r,"Forward-slash in opening tag not followed by >"),r.state=A.ATTRIB);continue;case A.ATTRIB:if(d(s))continue;">"===s?j(r):"/"===s?r.state=A.OPEN_TAG_SLASH:E(f,s)?(r.attribName=s,r.attribValue="",r.state=A.ATTRIB_NAME):P(r,"Invalid attribute name");continue;case A.ATTRIB_NAME:"="===s?r.state=A.ATTRIB_VALUE:">"===s?(P(r,"Attribute without value"),r.attribValue=r.attribName,R(r),j(r)):d(s)?r.state=A.ATTRIB_NAME_SAW_WHITE:E(h,s)?r.attribName+=s:P(r,"Invalid attribute name");continue;case A.ATTRIB_NAME_SAW_WHITE:if("="===s)r.state=A.ATTRIB_VALUE;else{if(d(s))continue;P(r,"Attribute without value"),r.tag.attributes[r.attribName]="",r.attribValue="",O(r,"onattribute",{name:r.attribName,value:""}),r.attribName="",">"===s?j(r):E(f,s)?(r.attribName=s,r.state=A.ATTRIB_NAME):(P(r,"Invalid attribute name"),r.state=A.ATTRIB)}continue;case A.ATTRIB_VALUE:if(d(s))continue;y(s)?(r.q=s,r.state=A.ATTRIB_VALUE_QUOTED):(P(r,"Unquoted attribute value"),r.state=A.ATTRIB_VALUE_UNQUOTED,r.attribValue=s);continue;case A.ATTRIB_VALUE_QUOTED:if(s!==r.q){"&"===s?r.state=A.ATTRIB_VALUE_ENTITY_Q:r.attribValue+=s;continue}R(r),r.q="",r.state=A.ATTRIB_VALUE_CLOSED;continue;case A.ATTRIB_VALUE_CLOSED:d(s)?r.state=A.ATTRIB:">"===s?j(r):"/"===s?r.state=A.OPEN_TAG_SLASH:E(f,s)?(P(r,"No whitespace between attributes"),r.attribName=s,r.attribValue="",r.state=A.ATTRIB_NAME):P(r,"Invalid attribute name");continue;case A.ATTRIB_VALUE_UNQUOTED:if(!b(s)){"&"===s?r.state=A.ATTRIB_VALUE_ENTITY_U:r.attribValue+=s;continue}R(r),">"===s?j(r):r.state=A.ATTRIB;continue;case A.CLOSE_TAG:if(r.tagName)">"===s?L(r):E(h,s)?r.tagName+=s:r.script?(r.script+="</"+r.tagName,r.tagName="",r.state=A.SCRIPT):(d(s)||P(r,"Invalid tagname in closing tag"),r.state=A.CLOSE_TAG_SAW_WHITE);else{if(d(s))continue;T(f,s)?r.script?(r.script+="</"+s,r.state=A.SCRIPT):P(r,"Invalid tagname in closing tag."):r.tagName=s}continue;case A.CLOSE_TAG_SAW_WHITE:if(d(s))continue;">"===s?L(r):P(r,"Invalid characters in closing tag");continue;case A.TEXT_ENTITY:case A.ATTRIB_VALUE_ENTITY_Q:case A.ATTRIB_VALUE_ENTITY_U:var l,p;switch(r.state){case A.TEXT_ENTITY:l=A.TEXT,p="textNode";break;case A.ATTRIB_VALUE_ENTITY_Q:l=A.ATTRIB_VALUE_QUOTED,p="attribValue";break;case A.ATTRIB_VALUE_ENTITY_U:l=A.ATTRIB_VALUE_UNQUOTED,p="attribValue"}";"===s?(r[p]+=K(r),r.entity="",r.state=l):E(r.entity.length?m:g,s)?r.entity+=s:(P(r,"Invalid character in entity name"),r[p]+="&"+r.entity+s,r.entity="",r.state=l);continue;default:throw new Error(r,"Unknown state: "+r.state)}return r.position>=r.bufferCheckPosition&&function(e){for(var r=Math.max(t.MAX_BUFFER_LENGTH,10),i=0,s=0,a=n.length;s<a;s++){var o=e[n[s]].length;if(o>r)switch(n[s]){case"textNode":S(e);break;case"cdata":O(e,"oncdata",e.cdata),e.cdata="";break;case"script":O(e,"onscript",e.script),e.script="";break;default:I(e,"Max buffer length exceeded: "+n[s])}i=Math.max(i,o)}var c=t.MAX_BUFFER_LENGTH-i;e.bufferCheckPosition=c+e.position}(r),r}
2
+ /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;S(t=this),""!==t.cdata&&(O(t,"oncdata",t.cdata),t.cdata=""),""!==t.script&&(O(t,"onscript",t.script),t.script="")}};try{e=require("stream").Stream}catch(t){e=function(){}}var i=t.EVENTS.filter(function(t){return"error"!==t&&"end"!==t});function s(t,n){if(!(this instanceof s))return new s(t,n);e.apply(this),this._parser=new r(t,n),this.writable=!0,this.readable=!0;var a=this;this._parser.onend=function(){a.emit("end")},this._parser.onerror=function(t){a.emit("error",t),a._parser.error=null},this._decoder=null,i.forEach(function(t){Object.defineProperty(a,"on"+t,{get:function(){return a._parser["on"+t]},set:function(e){if(!e)return a.removeAllListeners(t),a._parser["on"+t]=e,e;a.on(t,e)},enumerable:!0,configurable:!1})})}s.prototype=Object.create(e.prototype,{constructor:{value:s}}),s.prototype.write=function(t){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(t)){if(!this._decoder){var e=o.StringDecoder;this._decoder=new e("utf8")}t=this._decoder.write(t)}return this._parser.write(t.toString()),this.emit("data",t),!0},s.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},s.prototype.on=function(t,n){var r=this;return r._parser["on"+t]||-1===i.indexOf(t)||(r._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),r.emit.apply(r,e)}),e.prototype.on.call(r,t,n)};var a="[CDATA[",c="DOCTYPE",u="http://www.w3.org/XML/1998/namespace",l="http://www.w3.org/2000/xmlns/",p={xml:u,xmlns:l},f=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,h=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,g=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,m=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function d(t){return" "===t||"\n"===t||"\r"===t||"\t"===t}function y(t){return'"'===t||"'"===t}function b(t){return">"===t||d(t)}function E(t,e){return t.test(e)}function T(t,e){return!E(t,e)}var _,x,w,A=0;for(var N in t.STATE={BEGIN:A++,BEGIN_WHITESPACE:A++,TEXT:A++,TEXT_ENTITY:A++,OPEN_WAKA:A++,SGML_DECL:A++,SGML_DECL_QUOTED:A++,DOCTYPE:A++,DOCTYPE_QUOTED:A++,DOCTYPE_DTD:A++,DOCTYPE_DTD_QUOTED:A++,COMMENT_STARTING:A++,COMMENT:A++,COMMENT_ENDING:A++,COMMENT_ENDED:A++,CDATA:A++,CDATA_ENDING:A++,CDATA_ENDING_2:A++,PROC_INST:A++,PROC_INST_BODY:A++,PROC_INST_ENDING:A++,OPEN_TAG:A++,OPEN_TAG_SLASH:A++,ATTRIB:A++,ATTRIB_NAME:A++,ATTRIB_NAME_SAW_WHITE:A++,ATTRIB_VALUE:A++,ATTRIB_VALUE_QUOTED:A++,ATTRIB_VALUE_CLOSED:A++,ATTRIB_VALUE_UNQUOTED:A++,ATTRIB_VALUE_ENTITY_Q:A++,ATTRIB_VALUE_ENTITY_U:A++,CLOSE_TAG:A++,CLOSE_TAG_SAW_WHITE:A++,SCRIPT:A++,SCRIPT_ENDING:A++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(e){var n=t.ENTITIES[e],r="number"==typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=r}),t.STATE)t.STATE[t.STATE[N]]=N;function v(t,e,n){t[e]&&t[e](n)}function O(t,e,n){t.textNode&&S(t),v(t,e,n)}function S(t){t.textNode=F(t.opt,t.textNode),t.textNode&&v(t,"ontext",t.textNode),t.textNode=""}function F(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function I(t,e){return S(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,v(t,"onerror",e),t}function C(t){return t.sawRoot&&!t.closedRoot&&P(t,"Unclosed root tag"),t.state!==A.BEGIN&&t.state!==A.BEGIN_WHITESPACE&&t.state!==A.TEXT&&I(t,"Unexpected end"),S(t),t.c="",t.closed=!0,v(t,"onend"),r.call(t,t.strict,t.opt),t}function P(t,e){if("object"!=typeof t||!(t instanceof r))throw new Error("bad call to strictFail");t.strict&&I(t,e)}function D(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,n=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(n.ns=e.ns),t.attribList.length=0,O(t,"onopentagstart",n)}function M(t,e){var n=t.indexOf(":")<0?["",t]:t.split(":"),r=n[0],i=n[1];return e&&"xmlns"===t&&(r="xmlns",i=""),{prefix:r,local:i}}function R(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))t.attribName=t.attribValue="";else{if(t.opt.xmlns){var e=M(t.attribName,!0),n=e.prefix,r=e.local;if("xmlns"===n)if("xml"===r&&t.attribValue!==u)P(t,"xml: prefix must be bound to "+u+"\nActual: "+t.attribValue);else if("xmlns"===r&&t.attribValue!==l)P(t,"xmlns: prefix must be bound to "+l+"\nActual: "+t.attribValue);else{var i=t.tag,s=t.tags[t.tags.length-1]||t;i.ns===s.ns&&(i.ns=Object.create(s.ns)),i.ns[r]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,O(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}}function j(t,e){if(t.opt.xmlns){var n=t.tag,r=M(t.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(P(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),n.uri=r.prefix);var i=t.tags[t.tags.length-1]||t;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach(function(e){O(t,"onopennamespace",{prefix:e,uri:n.ns[e]})});for(var s=0,a=t.attribList.length;s<a;s++){var o=t.attribList[s],c=o[0],u=o[1],l=M(c,!0),p=l.prefix,f=l.local,h=""===p?"":n.ns[p]||"",g={name:c,value:u,prefix:p,local:f,uri:h};p&&"xmlns"!==p&&!h&&(P(t,"Unbound namespace prefix: "+JSON.stringify(p)),g.uri=p),t.tag.attributes[c]=g,O(t,"onattribute",g)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),O(t,"onopentag",t.tag),e||(t.noscript||"script"!==t.tagName.toLowerCase()?t.state=A.TEXT:t.state=A.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function L(t){if(!t.tagName)return P(t,"Weird empty close tag."),t.textNode+="</>",void(t.state=A.TEXT);if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",t.tagName="",void(t.state=A.SCRIPT);O(t,"onscript",t.script),t.script=""}var e=t.tags.length,n=t.tagName;t.strict||(n=n[t.looseCase]());for(var r=n;e--&&t.tags[e].name!==r;)P(t,"Unexpected close tag");if(e<0)return P(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",void(t.state=A.TEXT);t.tagName=n;for(var i=t.tags.length;i-- >e;){var s=t.tag=t.tags.pop();t.tagName=t.tag.name,O(t,"onclosetag",t.tagName);var a={};for(var o in s.ns)a[o]=s.ns[o];var c=t.tags[t.tags.length-1]||t;t.opt.xmlns&&s.ns!==c.ns&&Object.keys(s.ns).forEach(function(e){var n=s.ns[e];O(t,"onclosenamespace",{prefix:e,uri:n})})}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=A.TEXT}function K(t){var e,n=t.entity,r=n.toLowerCase(),i="";return t.ENTITIES[n]?t.ENTITIES[n]:t.ENTITIES[r]?t.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),i=(e=parseInt(n,16)).toString(16)):(n=n.slice(1),i=(e=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),isNaN(e)||i.toLowerCase()!==n?(P(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function B(t,e){"<"===e?(t.state=A.OPEN_WAKA,t.startTagPosition=t.position):d(e)||(P(t,"Non-whitespace before first tag."),t.textNode=e,t.state=A.TEXT)}function k(t,e){var n="";return e<t.length&&(n=t.charAt(e)),n}A=t.STATE,String.fromCodePoint||(_=String.fromCharCode,x=Math.floor,w=function(){var t,e,n=[],r=-1,i=arguments.length;if(!i)return"";for(var s="";++r<i;){var a=Number(arguments[r]);if(!isFinite(a)||a<0||a>1114111||x(a)!==a)throw RangeError("Invalid code point: "+a);a<=65535?n.push(a):(t=55296+((a-=65536)>>10),e=a%1024+56320,n.push(t,e)),(r+1===i||n.length>16384)&&(s+=_.apply(null,n),n.length=0)}return s},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:w,configurable:!0,writable:!0}):String.fromCodePoint=w)}(Et)),Et}function _t(){return at?st:(at=1,st={isArray:function(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}})}function xt(){if(ct)return ot;ct=1;var t=_t().isArray;return ot={copyOptions:function(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n},ensureFlagExists:function(t,e){t in e&&"boolean"==typeof e[t]||(e[t]=!1)},ensureSpacesExists:function(t){(!("spaces"in t)||"number"!=typeof t.spaces&&"string"!=typeof t.spaces)&&(t.spaces=0)},ensureAlwaysArrayExists:function(e){"alwaysArray"in e&&("boolean"==typeof e.alwaysArray||t(e.alwaysArray))||(e.alwaysArray=!1)},ensureKeyExists:function(t,e){t+"Key"in e&&"string"==typeof e[t+"Key"]||(e[t+"Key"]=e.compact?"_"+t:t)},checkFnExists:function(t,e){return t+"Fn"in e}}}function wt(){if(lt)return ut;lt=1;var t,e,n=Tt(),r=xt(),i=_t().isArray;function s(t){var e=Number(t);if(!isNaN(e))return e;var n=t.toLowerCase();return"true"===n||"false"!==n&&t}function a(n,r){var s;if(t.compact){if(!e[t[n+"Key"]]&&(i(t.alwaysArray)?-1!==t.alwaysArray.indexOf(t[n+"Key"]):t.alwaysArray)&&(e[t[n+"Key"]]=[]),e[t[n+"Key"]]&&!i(e[t[n+"Key"]])&&(e[t[n+"Key"]]=[e[t[n+"Key"]]]),n+"Fn"in t&&"string"==typeof r&&(r=t[n+"Fn"](r,e)),"instruction"===n&&("instructionFn"in t||"instructionNameFn"in t))for(s in r)if(r.hasOwnProperty(s))if("instructionFn"in t)r[s]=t.instructionFn(r[s],s,e);else{var a=r[s];delete r[s],r[t.instructionNameFn(s,a,e)]=a}i(e[t[n+"Key"]])?e[t[n+"Key"]].push(r):e[t[n+"Key"]]=r}else{e[t.elementsKey]||(e[t.elementsKey]=[]);var o={};if(o[t.typeKey]=n,"instruction"===n){for(s in r)if(r.hasOwnProperty(s))break;o[t.nameKey]="instructionNameFn"in t?t.instructionNameFn(s,r,e):s,t.instructionHasAttributes?(o[t.attributesKey]=r[s][t.attributesKey],"instructionFn"in t&&(o[t.attributesKey]=t.instructionFn(o[t.attributesKey],s,e))):("instructionFn"in t&&(r[s]=t.instructionFn(r[s],s,e)),o[t.instructionKey]=r[s])}else n+"Fn"in t&&(r=t[n+"Fn"](r,e)),o[t[n+"Key"]]=r;t.addParent&&(o[t.parentKey]=e),e[t.elementsKey].push(o)}}function o(n){var r;if("attributesFn"in t&&n&&(n=t.attributesFn(n,e)),(t.trim||"attributeValueFn"in t||"attributeNameFn"in t||t.nativeTypeAttributes)&&n)for(r in n)if(n.hasOwnProperty(r)&&(t.trim&&(n[r]=n[r].trim()),t.nativeTypeAttributes&&(n[r]=s(n[r])),"attributeValueFn"in t&&(n[r]=t.attributeValueFn(n[r],r,e)),"attributeNameFn"in t)){var i=n[r];delete n[r],n[t.attributeNameFn(r,n[r],e)]=i}return n}function c(n){var r={};if(n.body&&("xml"===n.name.toLowerCase()||t.instructionHasAttributes)){for(var i,s=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;null!==(i=s.exec(n.body));)r[i[1]]=i[2]||i[3]||i[4];r=o(r)}if("xml"===n.name.toLowerCase()){if(t.ignoreDeclaration)return;e[t.declarationKey]={},Object.keys(r).length&&(e[t.declarationKey][t.attributesKey]=r),t.addParent&&(e[t.declarationKey][t.parentKey]=e)}else{if(t.ignoreInstruction)return;t.trim&&(n.body=n.body.trim());var c={};t.instructionHasAttributes&&Object.keys(r).length?(c[n.name]={},c[n.name][t.attributesKey]=r):c[n.name]=n.body,a("instruction",c)}}function u(n,r){var s;if("object"==typeof n&&(r=n.attributes,n=n.name),r=o(r),"elementNameFn"in t&&(n=t.elementNameFn(n,e)),t.compact){var a;if(s={},!t.ignoreAttributes&&r&&Object.keys(r).length)for(a in s[t.attributesKey]={},r)r.hasOwnProperty(a)&&(s[t.attributesKey][a]=r[a]);!(n in e)&&(i(t.alwaysArray)?-1!==t.alwaysArray.indexOf(n):t.alwaysArray)&&(e[n]=[]),e[n]&&!i(e[n])&&(e[n]=[e[n]]),i(e[n])?e[n].push(s):e[n]=s}else e[t.elementsKey]||(e[t.elementsKey]=[]),(s={})[t.typeKey]="element",s[t.nameKey]=n,!t.ignoreAttributes&&r&&Object.keys(r).length&&(s[t.attributesKey]=r),t.alwaysChildren&&(s[t.elementsKey]=[]),e[t.elementsKey].push(s);s[t.parentKey]=e,e=s}function l(e){t.ignoreText||(e.trim()||t.captureSpacesBetweenElements)&&(t.trim&&(e=e.trim()),t.nativeType&&(e=s(e)),t.sanitize&&(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")),a("text",e))}function p(e){t.ignoreComment||(t.trim&&(e=e.trim()),a("comment",e))}function f(n){var r=e[t.parentKey];t.addParent||delete e[t.parentKey],e=r}function h(e){t.ignoreCdata||(t.trim&&(e=e.trim()),a("cdata",e))}function g(e){t.ignoreDoctype||(e=e.replace(/^ /,""),t.trim&&(e=e.trim()),a("doctype",e))}function m(t){t.note=t}return ut=function(i,s){var a=n.parser(!0,{}),o={};if(e=o,t=function(e){return t=r.copyOptions(e),r.ensureFlagExists("ignoreDeclaration",t),r.ensureFlagExists("ignoreInstruction",t),r.ensureFlagExists("ignoreAttributes",t),r.ensureFlagExists("ignoreText",t),r.ensureFlagExists("ignoreComment",t),r.ensureFlagExists("ignoreCdata",t),r.ensureFlagExists("ignoreDoctype",t),r.ensureFlagExists("compact",t),r.ensureFlagExists("alwaysChildren",t),r.ensureFlagExists("addParent",t),r.ensureFlagExists("trim",t),r.ensureFlagExists("nativeType",t),r.ensureFlagExists("nativeTypeAttributes",t),r.ensureFlagExists("sanitize",t),r.ensureFlagExists("instructionHasAttributes",t),r.ensureFlagExists("captureSpacesBetweenElements",t),r.ensureAlwaysArrayExists(t),r.ensureKeyExists("declaration",t),r.ensureKeyExists("instruction",t),r.ensureKeyExists("attributes",t),r.ensureKeyExists("text",t),r.ensureKeyExists("comment",t),r.ensureKeyExists("cdata",t),r.ensureKeyExists("doctype",t),r.ensureKeyExists("type",t),r.ensureKeyExists("name",t),r.ensureKeyExists("elements",t),r.ensureKeyExists("parent",t),r.checkFnExists("doctype",t),r.checkFnExists("instruction",t),r.checkFnExists("cdata",t),r.checkFnExists("comment",t),r.checkFnExists("text",t),r.checkFnExists("instructionName",t),r.checkFnExists("elementName",t),r.checkFnExists("attributeName",t),r.checkFnExists("attributeValue",t),r.checkFnExists("attributes",t),t}(s),a.opt={strictEntities:!0},a.onopentag=u,a.ontext=l,a.oncomment=p,a.onclosetag=f,a.onerror=m,a.oncdata=h,a.ondoctype=g,a.onprocessinginstruction=c,a.write(i).close(),o[t.elementsKey]){var d=o[t.elementsKey];delete o[t.elementsKey],o[t.elementsKey]=d,delete o.text}return o}}function At(){if(ft)return pt;ft=1;var t=xt(),e=wt();return pt=function(n,r){var i,s,a;return i=function(e){var n=t.copyOptions(e);return t.ensureSpacesExists(n),n}(r),s=e(n,i),a="compact"in i&&i.compact?"_parent":"parent",("addParent"in i&&i.addParent?JSON.stringify(s,function(t,e){return t===a?"_":e},i.spaces):JSON.stringify(s,null,i.spaces)).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}}function Nt(){if(gt)return ht;gt=1;var t,e,n=xt(),r=_t().isArray;function i(t,e,n){return(!n&&t.spaces?"\n":"")+Array(e+1).join(t.spaces)}function s(n,r,s){if(r.ignoreAttributes)return"";"attributesFn"in r&&(n=r.attributesFn(n,e,t));var a,o,c,u,l=[];for(a in n)n.hasOwnProperty(a)&&null!==n[a]&&void 0!==n[a]&&(u=r.noQuotesForNativeAttributes&&"string"!=typeof n[a]?"":'"',o=(o=""+n[a]).replace(/"/g,"&quot;"),c="attributeNameFn"in r?r.attributeNameFn(a,o,e,t):a,l.push(r.spaces&&r.indentAttributes?i(r,s+1,!1):" "),l.push(c+"="+u+("attributeValueFn"in r?r.attributeValueFn(o,a,e,t):o)+u));return n&&Object.keys(n).length&&r.spaces&&r.indentAttributes&&l.push(i(r,s,!1)),l.join("")}function a(n,r,i){return t=n,e="xml",r.ignoreDeclaration?"":"<?xml"+s(n[r.attributesKey],r,i)+"?>"}function o(n,r,i){if(r.ignoreInstruction)return"";var a;for(a in n)if(n.hasOwnProperty(a))break;var o="instructionNameFn"in r?r.instructionNameFn(a,n[a],e,t):a;if("object"==typeof n[a])return t=n,e=o,"<?"+o+s(n[a][r.attributesKey],r,i)+"?>";var c=n[a]?n[a]:"";return"instructionFn"in r&&(c=r.instructionFn(c,a,e,t)),"<?"+o+(c?" "+c:"")+"?>"}function c(n,r){return r.ignoreComment?"":"\x3c!--"+("commentFn"in r?r.commentFn(n,e,t):n)+"--\x3e"}function u(n,r){return r.ignoreCdata?"":"<![CDATA["+("cdataFn"in r?r.cdataFn(n,e,t):n.replace("]]>","]]]]><![CDATA[>"))+"]]>"}function l(n,r){return r.ignoreDoctype?"":"<!DOCTYPE "+("doctypeFn"in r?r.doctypeFn(n,e,t):n)+">"}function p(n,r){return r.ignoreText?"":(n=(n=(n=""+n).replace(/&amp;/g,"&")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"textFn"in r?r.textFn(n,e,t):n)}function f(n,r,a,h){return n.reduce(function(n,g){var m=i(r,a,h&&!n);switch(g.type){case"element":return n+m+function(n,r,i){t=n,e=n.name;var a=[],o="elementNameFn"in r?r.elementNameFn(n.name,n):n.name;a.push("<"+o),n[r.attributesKey]&&a.push(s(n[r.attributesKey],r,i));var c=n[r.elementsKey]&&n[r.elementsKey].length||n[r.attributesKey]&&"preserve"===n[r.attributesKey]["xml:space"];return c||(c="fullTagEmptyElementFn"in r?r.fullTagEmptyElementFn(n.name,n):r.fullTagEmptyElement),c?(a.push(">"),n[r.elementsKey]&&n[r.elementsKey].length&&(a.push(f(n[r.elementsKey],r,i+1)),t=n,e=n.name),a.push(r.spaces&&function(t,e){var n;if(t.elements&&t.elements.length)for(n=0;n<t.elements.length;++n)switch(t.elements[n][e.typeKey]){case"text":if(e.indentText)return!0;break;case"cdata":if(e.indentCdata)return!0;break;case"instruction":if(e.indentInstruction)return!0;break;default:return!0}return!1}(n,r)?"\n"+Array(i+1).join(r.spaces):""),a.push("</"+o+">")):a.push("/>"),a.join("")}(g,r,a);case"comment":return n+m+c(g[r.commentKey],r);case"doctype":return n+m+l(g[r.doctypeKey],r);case"cdata":return n+(r.indentCdata?m:"")+u(g[r.cdataKey],r);case"text":return n+(r.indentText?m:"")+p(g[r.textKey],r);case"instruction":var d={};return d[g[r.nameKey]]=g[r.attributesKey]?g:g[r.instructionKey],n+(r.indentInstruction?m:"")+o(d,r,a)}},"")}function h(t,e,n){var r;for(r in t)if(t.hasOwnProperty(r))switch(r){case e.parentKey:case e.attributesKey:break;case e.textKey:if(e.indentText||n)return!0;break;case e.cdataKey:if(e.indentCdata||n)return!0;break;case e.instructionKey:if(e.indentInstruction||n)return!0;break;case e.doctypeKey:case e.commentKey:default:return!0}return!1}function g(n,r,a,o,c){t=n,e=r;var u="elementNameFn"in a?a.elementNameFn(r,n):r;if(null==n||""===n)return"fullTagEmptyElementFn"in a&&a.fullTagEmptyElementFn(r,n)||a.fullTagEmptyElement?"<"+u+"></"+u+">":"<"+u+"/>";var l=[];if(r){if(l.push("<"+u),"object"!=typeof n)return l.push(">"+p(n,a)+"</"+u+">"),l.join("");n[a.attributesKey]&&l.push(s(n[a.attributesKey],a,o));var f=h(n,a,!0)||n[a.attributesKey]&&"preserve"===n[a.attributesKey]["xml:space"];if(f||(f="fullTagEmptyElementFn"in a?a.fullTagEmptyElementFn(r,n):a.fullTagEmptyElement),!f)return l.push("/>"),l.join("");l.push(">")}return l.push(m(n,a,o+1,!1)),t=n,e=r,r&&l.push((c?i(a,o,!1):"")+"</"+u+">"),l.join("")}function m(t,e,n,s){var f,m,d,y=[];for(m in t)if(t.hasOwnProperty(m))for(d=r(t[m])?t[m]:[t[m]],f=0;f<d.length;++f){switch(m){case e.declarationKey:y.push(a(d[f],e,n));break;case e.instructionKey:y.push((e.indentInstruction?i(e,n,s):"")+o(d[f],e,n));break;case e.attributesKey:case e.parentKey:break;case e.textKey:y.push((e.indentText?i(e,n,s):"")+p(d[f],e));break;case e.cdataKey:y.push((e.indentCdata?i(e,n,s):"")+u(d[f],e));break;case e.doctypeKey:y.push(i(e,n,s)+l(d[f],e));break;case e.commentKey:y.push(i(e,n,s)+c(d[f],e));break;default:y.push(i(e,n,s)+g(d[f],m,e,n,h(d[f],e)))}s=s&&!y.length}return y.join("")}return ht=function(r,i){i=function(t){var e=n.copyOptions(t);return n.ensureFlagExists("ignoreDeclaration",e),n.ensureFlagExists("ignoreInstruction",e),n.ensureFlagExists("ignoreAttributes",e),n.ensureFlagExists("ignoreText",e),n.ensureFlagExists("ignoreComment",e),n.ensureFlagExists("ignoreCdata",e),n.ensureFlagExists("ignoreDoctype",e),n.ensureFlagExists("compact",e),n.ensureFlagExists("indentText",e),n.ensureFlagExists("indentCdata",e),n.ensureFlagExists("indentAttributes",e),n.ensureFlagExists("indentInstruction",e),n.ensureFlagExists("fullTagEmptyElement",e),n.ensureFlagExists("noQuotesForNativeAttributes",e),n.ensureSpacesExists(e),"number"==typeof e.spaces&&(e.spaces=Array(e.spaces+1).join(" ")),n.ensureKeyExists("declaration",e),n.ensureKeyExists("instruction",e),n.ensureKeyExists("attributes",e),n.ensureKeyExists("text",e),n.ensureKeyExists("comment",e),n.ensureKeyExists("cdata",e),n.ensureKeyExists("doctype",e),n.ensureKeyExists("type",e),n.ensureKeyExists("name",e),n.ensureKeyExists("elements",e),n.checkFnExists("doctype",e),n.checkFnExists("instruction",e),n.checkFnExists("cdata",e),n.checkFnExists("comment",e),n.checkFnExists("text",e),n.checkFnExists("instructionName",e),n.checkFnExists("elementName",e),n.checkFnExists("attributeName",e),n.checkFnExists("attributeValue",e),n.checkFnExists("attributes",e),n.checkFnExists("fullTagEmptyElement",e),e}(i);var s=[];return t=r,e="_root_",i.compact?s.push(m(r,i,0,!0)):(r[i.declarationKey]&&s.push(a(r[i.declarationKey],i,0)),r[i.elementsKey]&&r[i.elementsKey].length&&s.push(f(r[i.elementsKey],i,0,!s.length))),s.join("")}}function vt(){if(dt)return mt;dt=1;var t=Nt();return mt=function(e,n){e instanceof Buffer&&(e=e.toString());var r=null;if("string"==typeof e)try{r=JSON.parse(e)}catch(t){throw new Error("The JSON structure is invalid")}else r=e;return t(r,n)}}var Ot=function(){if(bt)return yt;bt=1;var t=wt(),e=At(),n=Nt(),r=vt();return yt={xml2js:t,xml2json:e,js2xml:n,json2xml:r}}();function St(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),Ot.xml2js(t,{compact:!1})}function Ft(t,e){return Ot.js2xml(t,e)}function It(t,e){return function(t,e){return t&&t.find(e)}(t,t=>t.name===e)}const Ct=t.env.debug("vbapm:target.transforms.core-xml"),Pt=/docProps[\/,\\]core\.xml/i;function Dt(t,...e){t=t.slice();for(const n of e){const e=t.indexOf(n);t.splice(e,1)}return t}const Mt=t.env.debug("vbapm:target.transforms.workbook-xml"),Rt=/xl[\/,\\]workbook\.xml/i;const jt=/vba.*\.bin/i;const Lt=function(...t){return(e,n,r)=>t.reduce((t,i)=>t?i(e,n,r):t,!0)}(function(t){return!jt.test(t.path)}),Kt=function(...t){return(e,n,r)=>t.reduce((t,e)=>e(t,n,r),e)}(function(t){if(!Pt.test(t.path))return t;const e=St(t.data.toString("utf8")),n=It(e.elements,"cp:coreProperties");if(n){const t=It(n.elements,"cp:lastModifiedBy"),e=It(n.elements,"dc:creator");t&&e&&(t.elements[0].text=e.elements[0].text);const r=It(n.elements,"dcterms:modified"),i=It(n.elements,"dcterms:created");r&&i&&(r.elements[0].text=i.elements[0].text)}else Ct("Warning: cp:coreProperties not found, unable to transform core.xml");return t.data=Buffer.from(Ft(e)),t},function(t){if(!Rt.test(t.path))return t;const e=St(t.data.toString("utf8")),n=It(e.elements,"workbook");if(n){const t=It(n.elements,"mc:AlternateContent"),e=It(t&&t.elements,"mc:Choice"),r=It(e&&e.elements,"x15ac:absPath");r&&(r.attributes.url="");const i=It(n.elements,"bookViews");i&&(n.elements=Dt(n.elements,i));const s=It(n.elements,"fileVersion");s&&(n.elements=Dt(n.elements,s));const a=It(n.elements,"calcPr");a&&(a.attributes.calcId="0")}else Mt("Warning: workbook not found, unable to transform workbook.xml");return t.data=Buffer.from(Ft(e)),t});exports.addins=u,exports.createDocument=async function(n,r,i={}){const{application:s,addin:a,file:o}=p(n,r,i),c=!t.env.isWindows&&!i.staging;let u=c?t.join(n.paths.staging,r.filename):o;return await t.mkdirsExports.ensureDir(e.dirname(u)),await t.run(s,i.addin||a,"Build.CreateDocument",[JSON.stringify({path:u})]),c&&(await t.mkdirsExports.ensureDir(e.dirname(o)),await t.copyExports.copy(u,o)),o},exports.exportTo=async function(n,r,i,s={}){let{application:a,addin:o,file:c}=p(n,r);if(!t.env.isWindows){const n=t.join(i,"staged",r.filename);await t.pathExistsExports.pathExists(n)||(await t.mkdirsExports.ensureDir(e.dirname(n)),await t.copyExports.copy(c,n)),c=n}await t.run(a,s.addin||o,"Build.ExportTo",[JSON.stringify({file:c,staging:i})])},exports.extensionToApplication=f,exports.filterTarget=Lt,exports.importGraph=async function(e,n,r,i,s={}){const{application:a,addin:o}=p(e,n),{name:c,components:u,references:l}=r;await t.run(a,s.addin||o,"Build.ImportGraph",[JSON.stringify({file:i,name:c,src:u,references:l})])},exports.mapTarget=Kt,exports.requireCommonjs=B,exports.toSrc=rt,exports.walk=G;
@@ -0,0 +1,16 @@
1
+ "use strict";var e=require("./installer-C0iBwEpK.js"),r=require("./add-source-_Z4tr2ea.js");require("child_process"),require("util"),require("assert"),require("path"),require("fs"),require("./_commonjsHelpers-Bjf42z7h.js"),require("crypto"),require("events"),require("os"),require("constants"),require("stream"),require("http"),require("url"),require("punycode"),require("https"),require("zlib"),require("./index-CB6KQLC7.js");const s=e.dedent`
2
+ Create and register a new source file in vbaproject.toml
3
+
4
+ Usage: vbapm add <name> [options]
5
+
6
+ Options:
7
+ <name> Source name or file path (optionally with .bas or .cls extension)
8
+ --type=TYPE Source type (module or class)
9
+ --dev Add to [dev-src] instead of [src]
10
+
11
+ Examples:
12
+ vbapm add ./src/subfolder/Module1.bas
13
+ vbapm add Module1
14
+ vbapm add JsonParser --type class
15
+ vbapm add TestHelpers --dev
16
+ `;exports.default=async function(e){if(e.help)return void console.log(s);const[t]=e._,a=e.type,i=!!e.dev,o=await r.addSource({name:t,type:a,dev:i});o.isNew?console.log(`Created ${o.path}`):console.log(`Registered existing file ${o.path}`)};
@@ -0,0 +1,9 @@
1
+ "use strict";var e=require("./installer-C0iBwEpK.js"),r=require("node:process"),t=require("node:path"),o=require("node:url"),n=require("node:child_process"),i=require("node:fs/promises"),a=require("node:util"),s=require("node:os"),c=require("node:fs"),l=require("node:buffer"),u=require("./_commonjsHelpers-Bjf42z7h.js"),m=require("./build-project-CIZanDh1.js");require("child_process"),require("util"),require("assert"),require("path"),require("fs"),require("crypto"),require("events"),require("os"),require("constants"),require("stream"),require("http"),require("url"),require("punycode"),require("https"),require("zlib"),require("./project-DFh-2QTw.js"),require("./index-CB6KQLC7.js"),require("querystring"),require("./build-target-B03OPzeI.js"),require("./transform-target-DJmqMjY0.js"),require("string_decoder"),require("./load-from-project-wNJg8fme.js"),require("./get-target-Ba_ZoGUl.js");var d="undefined"!=typeof document?document.currentScript:null;let p,f;function g(){return void 0===p&&(p=function(){try{return c.statSync("/.dockerenv"),!0}catch{return!1}}()||function(){try{return c.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}()),p}function w(){return void 0===f&&(f=(()=>{try{return c.statSync("/run/.containerenv"),!0}catch{return!1}})()||g()),f}const h=()=>{if("linux"!==r.platform)return!1;if(s.release().toLowerCase().includes("microsoft"))return!w();try{if(c.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!w()}catch{}return!(!c.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")&&!c.existsSync("/run/WSL"))&&!w()};var v=r.env.__IS_WSL_TEST__?h:h();const y=a.promisify(n.execFile),x=()=>`${r.env.SYSTEMROOT||r.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`,b=async(e,r={})=>{const{powerShellPath:t,...o}=r,n=b.encodeCommand(e);return y(t??x(),[...b.argumentsPrefix,n],{encoding:"utf8",...o})};b.argumentsPrefix=["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"],b.encodeCommand=e=>l.Buffer.from(e,"utf16le").toString("base64"),b.escapeArgument=e=>`'${String(e).replaceAll("'","''")}'`;const S=a.promisify(n.execFile),P=(()=>{const e="/mnt/";let r;return async function(){if(r)return r;const t="/etc/wsl.conf";let o=!1;try{await i.access(t,i.constants.F_OK),o=!0}catch{}if(!o)return e;const n=function(e){for(const r of e.split("\n")){if(/^\s*#/.test(r))continue;const e=/^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(r);if(e)return e.groups.mountPoint.trim().replaceAll(/^["']|["']$/g,"")}}(await i.readFile(t,{encoding:"utf8"}));return void 0===n?e:(r=n,r=r.endsWith("/")?r:`${r}/`,r)}})(),E=v?async()=>`${await P()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:x;let q;function C(e,r,t){const o=t=>Object.defineProperty(e,r,{value:t,enumerable:!0,writable:!0});return Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get(){const e=t();return o(e),e},set(e){o(e)}}),e}const B=a.promisify(n.execFile);const A=a.promisify(n.execFile);async function F(e){return async function(e,{humanReadableOutput:t=!0,signal:o}={}){if("darwin"!==r.platform)throw new Error("macOS only");const n=t?[]:["-ss"],i={};o&&(i.signal=o);const{stdout:a}=await A("osascript",["-e",e,n],i);return a.trim()}(`tell application "Finder" to set app_path to application file id "${e}" as string\ntell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}const T=a.promisify(n.execFile),L={MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},MSEdgeBHTML:{name:"Edge Beta",id:"com.microsoft.edge.beta"},MSEdgeDHTML:{name:"Edge Dev",id:"com.microsoft.edge.dev"},AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},ChromeBHTML:{name:"Chrome Beta",id:"com.google.chrome.beta"},ChromeDHTML:{name:"Chrome Dev",id:"com.google.chrome.dev"},ChromiumHTM:{name:"Chromium",id:"org.chromium.Chromium"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveDHTML:{name:"Brave Dev",id:"com.brave.Browser.dev"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},OperaStable:{name:"Opera",id:"com.operasoftware.Opera"},VivaldiHTM:{name:"Vivaldi",id:"com.vivaldi.Vivaldi"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"}},_=new Map(Object.entries(L));class O extends Error{}const j=a.promisify(n.execFile);async function M(){if("darwin"===r.platform){const e=await async function(){if("darwin"!==r.platform)throw new Error("macOS only");const{stdout:e}=await B("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]),t=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(e),o=t?.groups.id??"com.apple.Safari";return"com.apple.safari"===o?"com.apple.Safari":o}();return{name:await F(e),id:e}}if("linux"===r.platform){const{stdout:e}=await j("xdg-mime",["query","default","x-scheme-handler/http"]),r=e.trim();return{name:r.replace(/.desktop$/,"").replace("-"," ").toLowerCase().replaceAll(/(?:^|\s|-)\S/g,e=>e.toUpperCase()),id:r}}if("win32"===r.platform)return async function(e=T){const{stdout:r}=await e("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),t=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(r);if(!t)throw new O(`Cannot find Windows browser in stdout: ${JSON.stringify(r)}`);const{id:o}=t.groups,n=o.lastIndexOf("."),i=o.lastIndexOf("-"),a=-1===n?void 0:o.slice(0,n),s=-1===i?void 0:o.slice(0,i);return L[o]??L[a]??L[s]??{name:o,id:o}}();throw new Error("Only macOS, Linux, and Windows are supported")}const H=Boolean(r.env.SSH_CONNECTION||r.env.SSH_CLIENT||r.env.SSH_TTY),I=Symbol("fallbackAttempt"),U=("undefined"==typeof document?require("url").pathToFileURL(__filename).href:d&&"SCRIPT"===d.tagName.toUpperCase()&&d.src||new URL("vbapm-build-BKtQ6OeP.js",document.baseURI).href)?t.dirname(o.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:d&&"SCRIPT"===d.tagName.toUpperCase()&&d.src||new URL("vbapm-build-BKtQ6OeP.js",document.baseURI).href)):"",R=t.join(U,"xdg-open"),{platform:$,arch:N}=r,W=async(e,r)=>{if(0===e.length)return;const t=[];for(const o of e)try{return await r(o)}catch(e){t.push(e)}throw new AggregateError(t,"Failed to open in all supported apps")},k=async e=>{const t=!0===(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e})[I];if(delete e[I],Array.isArray(e.app))return W(e.app,r=>k({...e,app:r,[I]:!0}));let o,{name:a,arguments:s=[]}=e.app??{};if(s=[...s],Array.isArray(a))return W(a,r=>k({...e,app:{name:r,arguments:s},[I]:!0}));if("browser"===a||"browserPrivate"===a){const r={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","com.brave.browser":"brave","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","com.microsoft.edgemac":"edge","microsoft-edge.desktop":"edge","com.apple.safari":"safari"},t={chrome:"--incognito",brave:"--incognito",firefox:"--private-window",edge:"--inPrivate"};let o;if(v){const e=await(async()=>{const e=await E(),r=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,{stdout:t}=await b(r,{powerShellPath:e});return t.trim()})();o=_.get(e)??{}}else o=await M();if(o.id in r){const n=r[o.id.toLowerCase()];if("browserPrivate"===a){if("safari"===n)throw new Error("Safari doesn't support opening in private mode via command line");s.push(t[n])}return k({...e,app:{name:Y[n],arguments:s}})}throw new Error(`${o.name} is not supported as a default browser`)}const c=[],l={};let u=!1;if(!v||w()||H||a||(u=await(async()=>(q??=(async()=>{try{const e=await E();return await i.access(e,i.constants.X_OK),!0}catch{return!1}})(),q))()),"darwin"===$)o="open",e.wait&&c.push("--wait-apps"),e.background&&c.push("--background"),e.newInstance&&c.push("--new"),a&&c.push("-a",a);else if("win32"===$||u){o=await E(),c.push(...b.argumentsPrefix),v||(l.windowsVerbatimArguments=!0),v&&e.target&&(e.target=await(async e=>{if(/^[a-z]+:\/\//i.test(e))return e;try{const{stdout:r}=await S("wslpath",["-aw",e],{encoding:"utf8"});return r.trim()}catch{return e}})(e.target));const r=["$ProgressPreference = 'SilentlyContinue';","Start"];e.wait&&r.push("-Wait"),a?(r.push(b.escapeArgument(a)),e.target&&s.push(e.target)):e.target&&r.push(b.escapeArgument(e.target)),s.length>0&&(s=s.map(e=>b.escapeArgument(e)),r.push("-ArgumentList",s.join(","))),e.target=b.encodeCommand(r.join(" ")),e.wait||(l.stdio="ignore")}else{if(a)o=a;else{const e=!U||"/"===U;let t=!1;try{await i.access(R,i.constants.X_OK),t=!0}catch{}o=r.versions.electron??("android"===$||e||!t)?"xdg-open":R}s.length>0&&c.push(...s),e.wait||(l.stdio="ignore",l.detached=!0)}"darwin"===$&&s.length>0&&c.push("--args",...s),e.target&&c.push(e.target);const m=n.spawn(o,c,l);return e.wait?new Promise((r,t)=>{m.once("error",t),m.once("close",o=>{e.allowNonzeroExitCode||0===o?r(m):t(new Error(`Exited with code ${o}`))})}):t?new Promise((e,r)=>{m.once("error",r),m.once("spawn",()=>{m.once("close",t=>{m.off("error",r),0===t?(m.unref(),e(m)):r(new Error(`Exited with code ${t}`))})})}):(m.unref(),new Promise((e,r)=>{m.once("error",r),m.once("spawn",()=>{m.off("error",r),e(m)})}))};function z(e){if("string"==typeof e||Array.isArray(e))return e;const{[N]:r}=e;if(!r)throw new Error(`${N} is not supported`);return r}function D({[$]:e},{wsl:r}={}){if(r&&v)return z(r);if(!e)throw new Error(`${$} is not supported`);return z(e)}const Y={browser:"browser",browserPrivate:"browserPrivate"};var G,K;C(Y,"chrome",()=>D({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium","chromium-browser"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}})),C(Y,"brave",()=>D({darwin:"brave browser",win32:"brave",linux:["brave-browser","brave"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",x64:["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe","/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]}})),C(Y,"firefox",()=>D({darwin:"firefox",win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"})),C(Y,"edge",()=>D({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"})),C(Y,"safari",()=>D({darwin:"Safari"}));var V=function(){if(K)return G;K=1;var e=["h","min","s","ms","μs","ns"],r=["hour","minute","second","millisecond","microsecond","nanosecond"],t=[3600,60,1,1e6,1e3,1];return G=function(o,n){var i,a,s,c,l,u,m,d,p;if(i=!1,a=!1,n&&(i=n.verbose||!1,a=n.precise||!1),!Array.isArray(o)||2!==o.length)return"";if("number"!=typeof o[0]||"number"!=typeof o[1])return"";for(o[1]<0&&(p=o[0]+o[1]/1e9,o[0]=parseInt(p),o[1]=1e9*parseFloat((p%1).toPrecision(9))),d="",s=0;s<6&&(c=o[s<3?0:1],3!==s&&0!==s&&(c%=t[s-1]),2===s&&(c+=o[1]/1e9),!((l=c/t[s])>=1)||(i&&(l=Math.floor(l)),a?m=l.toString():(u=l>=10?0:2,m=l.toFixed(u)),m.indexOf(".")>-1&&"0"===m[m.length-1]&&(m=m.replace(/\.?0+$/,"")),d&&(d+=" "),d+=m,i?(d+=" "+r[s],"1"!==m&&(d+="s")):d+=" "+e[s],i));s++);return d}}(),X=u.getDefaultExportFromCjs(V);const J=e.dedent`
2
+ Build project from manifest (after backing up any existing built targets).
3
+
4
+ Usage: vbapm build [options]
5
+
6
+ Options:
7
+ --target=TYPE Build target of type TYPE
8
+ --release Exclude dev-* items from build
9
+ --open Open built target`;exports.default=async function(e){if(e.help)return void console.log(J);const r=process.hrtime(),t=e.target,o=e.addin,n=!!e.release,i=await m.buildProject({target:t,addin:o,release:n});if(console.log(`Done. ${X(process.hrtime(r))}`),e.open){console.log(`Opening built target: ${i}`);try{await((e,r)=>{if("string"!=typeof e)throw new TypeError("Expected a `target`");return k({...r,target:e})})(i,{wait:!0})}catch(e){throw console.error(`Failed to open built target: ${(null==e?void 0:e.message)||e}`),e}}};
@@ -0,0 +1,7 @@
1
+ "use strict";var e=require("./installer-C0iBwEpK.js"),r=require("./export-project-DdTYRyAw.js");require("child_process"),require("util"),require("assert"),require("path"),require("fs"),require("./_commonjsHelpers-Bjf42z7h.js"),require("crypto"),require("events"),require("os"),require("constants"),require("stream"),require("http"),require("url"),require("punycode"),require("https"),require("zlib"),require("./transform-target-DJmqMjY0.js"),require("node:fs"),require("node:path"),require("node:buffer"),require("string_decoder"),require("./project-DFh-2QTw.js"),require("./index-CB6KQLC7.js"),require("querystring"),require("./export-target-CEupP86g.js"),require("./load-from-project-wNJg8fme.js");const t=e.dedent`
2
+ Export built project, including src, references, and target.
3
+
4
+ Usage: vbapm export
5
+
6
+ Options:
7
+ --target=TYPE Export target of type TYPE`;exports.default=async function(e){if(e.help)return void console.log(t);const i=e.target,u=e.completed,o=e.addin;await r.exportProject({target:i,completed:u,addin:o})};
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("./installer-dbc2c34a.js"),r=require("./init-project-ceecd718.js");require("child_process"),require("util"),require("assert"),require("path"),require("fs"),require("./_commonjsHelpers-553b27b3.js"),require("crypto"),require("events"),require("os"),require("constants"),require("stream"),require("worker_threads"),require("http"),require("url"),require("punycode"),require("https"),require("zlib"),require("./project-43370ed3.js"),require("querystring"),require("./workbook-xml-a61269f4.js"),require("string_decoder"),require("./build-target-dbcc69c7.js"),require("./load-from-project-acf7400a.js"),require("./export-target-5d28d188.js");const t=e.dedent`
1
+ "use strict";var e=require("./installer-C0iBwEpK.js"),r=require("./init-project-BY-a8CIk.js");require("child_process"),require("util"),require("assert"),require("path"),require("fs"),require("./_commonjsHelpers-Bjf42z7h.js"),require("crypto"),require("events"),require("os"),require("constants"),require("stream"),require("http"),require("url"),require("punycode"),require("https"),require("zlib"),require("./index-CB6KQLC7.js"),require("./project-DFh-2QTw.js"),require("querystring"),require("./transform-target-DJmqMjY0.js"),require("node:fs"),require("node:path"),require("node:buffer"),require("string_decoder"),require("./build-target-B03OPzeI.js"),require("./load-from-project-wNJg8fme.js"),require("./export-target-CEupP86g.js");const t=e.dedent`
2
2
  Initialize a new project in the current directory
3
3
 
4
4
  Usage: vbapm init [options]
@@ -13,4 +13,4 @@
13
13
  Examples:
14
14
  vbapm init --target xlsm
15
15
  vbapm init --name calculations --package
16
- `;exports.default=async function(e){if(e.help)return void console.log(t);const i=e.target,a=e.from,o=e.name,s=!!e.package,n=!("git"in e)||e.git;await r.initProject({target:i,from:a,name:o,pkg:s,git:n})};
16
+ `;exports.default=async function(e){if(e.help)return void console.log(t);const i=e.target,a=e.from,o=e.name,n=!!e.package,s=!("git"in e)||e.git;await r.initProject({target:i,from:a,name:o,pkg:n,git:s})};
@@ -0,0 +1,17 @@
1
+ "use strict";var e=require("./installer-C0iBwEpK.js"),r=require("./create-project-CTAlegO8.js");require("child_process"),require("util"),require("assert"),require("path"),require("fs"),require("./_commonjsHelpers-Bjf42z7h.js"),require("crypto"),require("events"),require("os"),require("constants"),require("stream"),require("http"),require("url"),require("punycode"),require("https"),require("zlib"),require("./init-project-BY-a8CIk.js"),require("./index-CB6KQLC7.js"),require("./project-DFh-2QTw.js"),require("querystring"),require("./transform-target-DJmqMjY0.js"),require("node:fs"),require("node:path"),require("node:buffer"),require("string_decoder"),require("./build-target-B03OPzeI.js"),require("./load-from-project-wNJg8fme.js"),require("./export-target-CEupP86g.js");const t=e.dedent`
2
+ Create a new project / package in a new directory
3
+
4
+ Usage: vbapm new <name> [options]
5
+
6
+ Options:
7
+ <name> Project/package name (optionally, with extension)
8
+ --target=TYPE Add target of type TYPE to project (e.g. xlsm)
9
+ --from=PATH Create target and src from workbook/document
10
+ --package Create as package
11
+ --no-git Skip initializing git repository
12
+
13
+ Examples:
14
+ vbapm new analysis.xlsm
15
+ vbapm new analysis --target xlsm
16
+ vbapm new calculations --package
17
+ `;exports.default=async function(e){if(e.help)return void console.log(t);const[i]=e._,a=e.target,o=e.from,s=!!e.package,n=!("git"in e)||e.git;await r.createProject({name:i,target:a,from:o,pkg:s,git:n})};
@@ -0,0 +1,10 @@
1
+ "use strict";var e=require("./installer-C0iBwEpK.js"),r=require("./run-macro-Ck_8Iku3.js");require("child_process"),require("util"),require("assert"),require("path"),require("fs"),require("./_commonjsHelpers-Bjf42z7h.js"),require("crypto"),require("events"),require("os"),require("constants"),require("stream"),require("http"),require("url"),require("punycode"),require("https"),require("zlib"),require("./transform-target-DJmqMjY0.js"),require("node:fs"),require("node:path"),require("node:buffer"),require("string_decoder"),require("./project-DFh-2QTw.js"),require("./index-CB6KQLC7.js"),require("querystring"),require("./get-target-Ba_ZoGUl.js");const i=e.dedent`
2
+ Run macro in given workbook or add-in.
3
+
4
+ Usage: vbapm run <macro> [<arg>...] [options]
5
+
6
+ Options:
7
+ <macro> Public macro to run in given file (e.g. Tests.RunTests)
8
+ <arg> Arguments to pass to macro (optional)
9
+ --target=TYPE Run in pre-built target of type TYPE
10
+ --file=PATH Full path to workbook or name of add-in`;exports.default=async function(e){if(e.help)return void console.log(i);const[t,...o]=e._,u=e.target;let s=e.file;await r.runMacro({target:u,file:s,macro:t,args:o})};
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("./installer-dbc2c34a.js"),r=require("./test-project-669dfcfb.js");require("child_process"),require("util"),require("assert"),require("path"),require("fs"),require("./_commonjsHelpers-553b27b3.js"),require("crypto"),require("events"),require("os"),require("constants"),require("stream"),require("worker_threads"),require("http"),require("url"),require("punycode"),require("https"),require("zlib"),require("./run-macro-4f1375ca.js"),require("./workbook-xml-a61269f4.js"),require("string_decoder"),require("./project-43370ed3.js"),require("querystring"),require("./get-target-e760a439.js");const t=e.dedent`
1
+ "use strict";var e=require("./installer-C0iBwEpK.js"),r=require("./test-project-CM-XUOdH.js");require("child_process"),require("util"),require("assert"),require("path"),require("fs"),require("./_commonjsHelpers-Bjf42z7h.js"),require("crypto"),require("events"),require("os"),require("constants"),require("stream"),require("http"),require("url"),require("punycode"),require("https"),require("zlib"),require("./run-macro-Ck_8Iku3.js"),require("./transform-target-DJmqMjY0.js"),require("node:fs"),require("node:path"),require("node:buffer"),require("string_decoder"),require("./project-DFh-2QTw.js"),require("./index-CB6KQLC7.js"),require("querystring"),require("./get-target-Ba_ZoGUl.js");const t=e.dedent`
2
2
  Run tests for built target.
3
3
 
4
4
  Usage: vbapm test [options]
@@ -0,0 +1,8 @@
1
+ "use strict";var e=require("./installer-C0iBwEpK.js"),r=require("./index-CB6KQLC7.js"),i=require("./project-DFh-2QTw.js");require("child_process"),require("util"),require("assert"),require("path"),require("fs"),require("./_commonjsHelpers-Bjf42z7h.js"),require("crypto"),require("events"),require("os"),require("constants"),require("stream"),require("http"),require("url"),require("punycode"),require("https"),require("zlib"),require("querystring");const t=["patch","minor","major","prepatch","preminor","premajor","prerelease"];async function s(s,n={}){const o=await i.loadProject(),a=o.manifest.version,p=(c=s,t.includes(c));var c;let u;try{u=p?e.semverExports.inc(a,s,void 0,n.preid):e.semverExports.valid(s)}catch(e){}if(!u)throw new e.CliError(e.ErrorCode.InvalidVersion,`Invalid version increment "${s}"`);return o.manifest.version=u,await r.writeManifest(o.manifest,o.paths.dir),u}const n=e.dedent`
2
+ Increment this project's version.
3
+
4
+ Usage: vbapm version [<increment>] [options]
5
+
6
+ Options:
7
+ <increment> VERSION | patch | minor | major | prepatch | preminor | premajor
8
+ --preid=TYPE Use TYPE for prerelease (e.g. "beta")`;exports.default=async function(e){if(e.help)return void console.log(n);const r=e._[0]||"patch",i=e.preid,t=await s(r,{preid:i});console.log(t)};