legal-markdown-js 2.13.0 → 2.14.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.
- package/dist/core/processors/reference-processor.d.ts.map +1 -1
- package/dist/core/processors/reference-processor.js +10 -0
- package/dist/core/processors/reference-processor.js.map +1 -1
- package/dist/core/utils/reserved-fields-filter.d.ts +1 -1
- package/dist/core/utils/reserved-fields-filter.d.ts.map +1 -1
- package/dist/core/utils/reserved-fields-filter.js +3 -0
- package/dist/core/utils/reserved-fields-filter.js.map +1 -1
- package/dist/legal-markdown.umd.min.js +1 -1
- package/dist/legal-markdown.umd.min.js.map +1 -1
- package/dist/web/legal-markdown.umd.min.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reference-processor.d.ts","sourceRoot":"","sources":["../../../src/core/processors/reference-processor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAWH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"reference-processor.d.ts","sourceRoot":"","sources":["../../../src/core/processors/reference-processor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAWH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAkB7F"}
|
|
@@ -71,6 +71,16 @@ exports.processCrossReferences = processCrossReferences;
|
|
|
71
71
|
function processCrossReferences(content, metadata) {
|
|
72
72
|
// First, extract all cross-reference definitions from headers
|
|
73
73
|
const crossReferences = extractCrossReferences(content, metadata);
|
|
74
|
+
// Store cross-references metadata in protected field
|
|
75
|
+
metadata['_cross_references'] = crossReferences.map(ref => ({
|
|
76
|
+
key: ref.key,
|
|
77
|
+
sectionNumber: ref.sectionNumber,
|
|
78
|
+
sectionText: ref.sectionText,
|
|
79
|
+
}));
|
|
80
|
+
// Ensure the field is always set, even if no cross-references exist
|
|
81
|
+
if (crossReferences.length === 0) {
|
|
82
|
+
metadata['_cross_references'] = [];
|
|
83
|
+
}
|
|
74
84
|
// Then replace all cross-reference usage with section numbers or metadata
|
|
75
85
|
return replaceCrossReferences(content, crossReferences, metadata);
|
|
76
86
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reference-processor.js","sourceRoot":"","sources":["../../../src/core/processors/reference-processor.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;;AAoCH,
|
|
1
|
+
{"version":3,"file":"reference-processor.js","sourceRoot":"","sources":["../../../src/core/processors/reference-processor.ts"],"names":[],"mappings":"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"}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
* These fields control system behavior, document structure, and security settings.
|
|
34
34
|
* They should only be defined in the main document's frontmatter.
|
|
35
35
|
*/
|
|
36
|
-
export declare const RESERVED_FIELDS: readonly ["level-one", "level-two", "level-three", "level-four", "level-five", "level-six", "level-indent", "no-reset", "no-indent", "meta-yaml-output", "meta-json-output", "meta-output-path", "meta-include-original", "date-format", "dateFormat", "timezone", "tz", "locale", "lang", "force_commands", "force-commands", "forceCommands", "commands", "import-tracing", "import-tracing-format", "disable-frontmatter-merge", "pipeline-config", "pipeline-steps", "processing-options", "enable-field-tracking", "field-tracking-mode"];
|
|
36
|
+
export declare const RESERVED_FIELDS: readonly ["level-one", "level-two", "level-three", "level-four", "level-five", "level-six", "level-indent", "no-reset", "no-indent", "meta-yaml-output", "meta-json-output", "meta-output-path", "meta-include-original", "date-format", "dateFormat", "timezone", "tz", "locale", "lang", "force_commands", "force-commands", "forceCommands", "commands", "import-tracing", "import-tracing-format", "disable-frontmatter-merge", "pipeline-config", "pipeline-steps", "processing-options", "enable-field-tracking", "field-tracking-mode", "_cross_references"];
|
|
37
37
|
/**
|
|
38
38
|
* Type for reserved field names
|
|
39
39
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reserved-fields-filter.d.ts","sourceRoot":"","sources":["../../../src/core/utils/reserved-fields-filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"reserved-fields-filter.d.ts","sourceRoot":"","sources":["../../../src/core/utils/reserved-fields-filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,eAAe,qiBAgDlB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,mDAAmD;IACnD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,OAAO,GAAE,aAAkB,GAC1B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAqBrB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,IAAI,CAAC,aAAa,EAAE,oBAAoB,GAAG,YAAY,CAAM,GACrE,OAAO,CAeT;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CA0BtE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,OAAO,GAAE,aAAkB,GAC1B;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;CACjB,CA2BA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,aAAkB,IACnD,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,yBACtC"}
|
|
@@ -80,6 +80,8 @@ exports.RESERVED_FIELDS = [
|
|
|
80
80
|
// Field tracking configuration
|
|
81
81
|
'enable-field-tracking',
|
|
82
82
|
'field-tracking-mode',
|
|
83
|
+
// Cross-references metadata (internal)
|
|
84
|
+
'_cross_references',
|
|
83
85
|
];
|
|
84
86
|
/**
|
|
85
87
|
* Filters reserved fields from imported metadata
|
|
@@ -199,6 +201,7 @@ function getReservedFieldsByCategory() {
|
|
|
199
201
|
'processing-options',
|
|
200
202
|
'enable-field-tracking',
|
|
201
203
|
'field-tracking-mode',
|
|
204
|
+
'_cross_references',
|
|
202
205
|
],
|
|
203
206
|
};
|
|
204
207
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reserved-fields-filter.js","sourceRoot":"","sources":["../../../src/core/utils/reserved-fields-filter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;;;
|
|
1
|
+
{"version":3,"file":"reserved-fields-filter.js","sourceRoot":"","sources":["../../../src/core/utils/reserved-fields-filter.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("pandoc-wasm"),require("child_process")):"function"==typeof define&&define.amd?define("LegalMarkdown",["pandoc-wasm","child_process"],t):"object"==typeof exports?exports.LegalMarkdown=t(require("pandoc-wasm"),require("child_process")):e.LegalMarkdown=t(e["pandoc-wasm"],e.child_process)}(this,(e,t)=>(()=>{"use strict";var n={61:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_HELPER_NAMES=t.allHelpers=t.extensionHelpers=void 0,i(n(884),t),i(n(492),t),i(n(116),t);const o=n(884),a=n(492),s=n(116);t.extensionHelpers={addYears:o.addYears,addMonths:o.addMonths,addDays:o.addDays,formatDate:o.formatDate,DateFormats:o.DateFormats,formatInteger:a.formatInteger,formatPercent:a.formatPercent,formatCurrency:a.formatCurrency,formatEuro:a.formatEuro,formatDollar:a.formatDollar,formatPound:a.formatPound,numberToWords:a.numberToWords,round:a.round,capitalize:s.capitalize,capitalizeWords:s.capitalizeWords,upper:s.upper,lower:s.lower,titleCase:s.titleCase,kebabCase:s.kebabCase,snakeCase:s.snakeCase,camelCase:s.camelCase,pascalCase:s.pascalCase,truncate:s.truncate,clean:s.clean,pluralize:s.pluralize,padStart:s.padStart,padEnd:s.padEnd,contains:s.contains,replaceAll:s.replaceAll,initials:s.initials},t.allHelpers={...t.extensionHelpers},t.EXTENSION_HELPER_NAMES=["addYears","addMonths","addDays","formatDate","formatInteger","formatPercent","formatCurrency","formatEuro","formatDollar","formatPound","numberToWords","round","capitalize","capitalizeWords","upper","lower","titleCase","kebabCase","snakeCase","camelCase","pascalCase","truncate","clean","pluralize","padStart","padEnd","contains","replaceAll","initials"]},64:(e,t)=>{function n(e,t,n,a,s=0){if(e<1||e>6)return`l${e}. ${t}`;const l=function(e,t){let n;switch(e){case 1:n=t.levelOne;break;case 2:n=t.levelTwo;break;case 3:n=t.levelThree;break;case 4:n=t.levelFour;break;case 5:n=t.levelFive;break;case 6:n=t.levelSix;break;default:n="%n."}if("string"!=typeof n)switch(e){case 1:return"Article %n.";case 2:return"Section %n.";case 3:return"(%n)";case 4:return"(%n%c)";case 5:return"(%n%c%r)";case 6:return"Annex %r -";default:return"%n."}return n}(e,a);if("string"!=typeof l)return`l${e}. ${t}`;let c=l;const u=l.includes("%r.%n")||l.includes("%R.%n"),p=l.includes("%c.%n"),d=a.levelOne?.includes("%c")&&a.levelTwo?.includes("%c.%n");if(c=c.replace(/%0(\d+)n/g,(t,r)=>n[e-1].toString().padStart(parseInt(r),"0")),c=c.replace(/%0(\d+)s/g,(e,t)=>n[0].toString().padStart(parseInt(t),"0")),c=c.replace(/%0(\d+)t/g,(e,t)=>n[1].toString().padStart(parseInt(t),"0")),c=c.replace(/%0(\d+)f/g,(e,t)=>n[2].toString().padStart(parseInt(t),"0")),c=c.replace(/%0(\d+)i/g,(e,t)=>n[3].toString().padStart(parseInt(t),"0")),4===e)!c.includes("%n%c")||c.includes(".%s")||c.includes(".%t")||c.includes(".%f")||(c=c.replace(/%n/g,n[2].toString()),c=c.replace(/%c/g,r(n[3])));else if(5===e&&(c.includes("%c%r")||c.includes("%n%c%r"))){c=c.replace(/%n/g,n[2].toString()),c=c.replace(/%c/g,r(n[3]));const e=!0;c=c.replace(/%r/g,i(n[4],e))}const f="string"==typeof a.levelThree&&a.levelThree.includes("%n.%s.%t")||"string"==typeof a.levelFour&&a.levelFour.includes("%n.%s.%t.%f")||"string"==typeof a.levelFive&&a.levelFive.includes("%n.%s.%t.%f.%i"),g=(c.includes(".%s.%t")||c.includes(".%t.%f")||c.includes(".%f.%i")||c.includes(".%s")&&f)&&!c.includes("%r.")&&!c.includes("%R.")&&!c.includes("%c.");c=g?c.replace(/%n/g,n[0].toString()):c.replace(/%n/g,n[e-1].toString()),c=g?c.replace(/%s/g,n[1].toString()):c.replace(/%s/g,n[0].toString()),c=c.replace(/%t/g,n[2].toString()),c=c.replace(/%f/g,n[3].toString()),c=c.replace(/%i/g,n[4].toString()),p&&e>1||d&&e>1?c=c.replace(/%c/g,r(n[0])):(e<=3||e>=4&&c.includes("%c"))&&(c=c.replace(/%c/g,r(n[e-1]))),u&&e>1?c=c.replace(/%r/g,i(n[0],!0)):(e<=3||e>=4&&c.includes("%r"))&&(c=c.replace(/%r/g,i(n[e-1],!0))),l.includes("%R.%n")&&e>1?c=c.replace(/%R/g,i(n[0],!1)):(e<=3||e>=4&&c.includes("%R"))&&(c=c.replace(/%R/g,i(n[e-1],!1)));const h=a.noIndent?"":" ".repeat(Math.floor((e-1)*(a.levelIndent||1.5)*2));return a.enableFieldTrackingInMarkdown?`${h}<span class="${["legal-header",`legal-header-level-${e}`,o(e)].join(" ")}" data-level="${e}" data-number="${n[e-1]}">${c} ${t}</span>`:`${h}${c} ${t}`}function r(e){if(e<=0)return"";let t="",n=e;for(;n>0;){const e=(n-1)%26;t=String.fromCharCode(97+e)+t,n=Math.floor((n-1)/26)}return t}function i(e,t=!1){if(e<=0)return"";const n=[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}];let r="",i=e;for(const{value:e,numeral:t}of n)for(;i>=e;)r+=t,i-=e;return t?r.toLowerCase():r}function o(e){switch(e){case 1:return"legal-article";case 2:return"legal-section";case 3:return"legal-subsection";case 4:return"legal-sub-subsection";case 5:return"legal-paragraph";case 6:return"legal-annex";default:return"legal-header-unknown"}}Object.defineProperty(t,"__esModule",{value:!0}),t.processHeaders=function(e,t,r={}){const i=function(e,t={}){return{levelOne:e["level-one"]||"Article %n.",levelTwo:e["level-two"]||"Section %n.",levelThree:e["level-three"]||"(%n)",levelFour:e["level-four"]||"(%n%c)",levelFive:e["level-five"]||"(%n%c%r)",levelSix:e["level-six"]||"Annex %r -",levelIndent:parseFloat(e["level-indent"]||"1.5"),noReset:t.noReset||e["no-reset"]||!1,noIndent:t.noIndent||e["no-indent"]||!1,enableFieldTrackingInMarkdown:t.enableFieldTrackingInMarkdown||!1}}(t,r),o=/^(l+)\.\s+(.*?)$/gm,a=/^l(\d+)\.\s+(.*?)$/gm,s=[0,0,0,0,0,0],l=[];let c;const u=e.slice();for(o.lastIndex=0;null!==(c=o.exec(u));)l.push({match:c[0],level:c[1].length,text:c[2],index:c.index});for(a.lastIndex=0;null!==(c=a.exec(u));)l.push({match:c[0],level:parseInt(c[1],10),text:c[2],index:c.index});l.sort((e,t)=>e.index-t.index);let p=e,d=0,f=0;for(const e of l){const t=e.level;if(5===t)5===f?s[4]++:s[4]=1;else{for(let e=f;e<t-1;e++)0===s[e]&&(s[e]=1);if(s[t-1]++,!i.noReset)for(let e=t;e<s.length;e++)s[e]=0}const r=n(t,e.text,[...s],i,f),o=e.index+d,a=o+e.match.length;p=p.substring(0,o)+r+p.substring(a),d+=r.length-e.match.length,f=t}return p}},70:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.processCrossReferences=function(e,t){const n=function(e,t){const n=[],r=e.split("\n"),i={level1:0,level2:0,level3:0},o={level1:t["level-one"]||"Article %n.",level2:t["level-two"]||"Section %n.",level3:t["level-three"]||"(%n)"};for(const e of r){const t=e.trim().match(/^(l{1,3})\.\s+(.+?)\s+\|(\w+)\|$/);if(t){const[,e,r,a]=t,s=e.length;let l,c;1===s?(i.level1++,i.level2=0,i.level3=0):2===s?(i.level2++,i.level3=0):3===s&&i.level3++,1===s?(l=o.level1.replace(/%n/g,i.level1.toString()),c=`${l} ${r}`):2===s?(l=o.level2.replace(/%n/g,i.level2.toString()),c=`${l} ${r}`):(l=o.level3.replace(/%n/g,i.level3.toString()),c=`${l} ${r}`),n.push({key:a,sectionNumber:l.trim(),sectionText:c.trim()})}}return n}(e,t);return function(e,t,n){const r=new Map;for(const e of t)r.set(e.key,e.sectionNumber);const i=e.split("\n").map(e=>e.trim().match(/^(l{1,3})\.\s+(.+?)\s+\|(\w+)\|$/)?e:e.replace(/\|([^|]+)\|/g,(e,t)=>{const i=t.trim(),o=r.get(i);if(o)return o;const a=function(e,t){const n=t.split(".");let r=e;for(const e of n){if(null==r)return;r=r[e]}return r}(n,i);return void 0!==a?function(e,t,n){if(void 0===e)return"";if(null===e)return"null";if(e instanceof Date)return e.toISOString().split("T")[0];if("number"==typeof e&&t.includes("amount")){const t=n.payment_currency||"USD";return new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e)}return String(e)}(a,i,n):e}));return i.join("\n")}(e,n,t)}},83:(e,t,n)=>{var r=n(433);function i(e,t,n,r,i){var o="",a="",s=Math.floor(i/2)-1;return r-t>s&&(t=r-s+(o=" ... ").length),n-r>s&&(n=r+s-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:r-t+o.length}}function o(e,t){return r.repeat(" ",t-e.length)+e}e.exports=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n,a=/\r?\n|\r|\0/g,s=[0],l=[],c=-1;n=a.exec(e.buffer);)l.push(n.index),s.push(n.index+n[0].length),e.position<=n.index&&c<0&&(c=s.length-2);c<0&&(c=s.length-1);var u,p,d="",f=Math.min(e.line+t.linesAfter,l.length).toString().length,g=t.maxLength-(t.indent+f+3);for(u=1;u<=t.linesBefore&&!(c-u<0);u++)p=i(e.buffer,s[c-u],l[c-u],e.position-(s[c]-s[c-u]),g),d=r.repeat(" ",t.indent)+o((e.line-u+1).toString(),f)+" | "+p.str+"\n"+d;for(p=i(e.buffer,s[c],l[c],e.position,g),d+=r.repeat(" ",t.indent)+o((e.line+1).toString(),f)+" | "+p.str+"\n",d+=r.repeat("-",t.indent+f+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(c+u>=l.length);u++)p=i(e.buffer,s[c+u],l[c+u],e.position-(s[c]-s[c+u]),g),d+=r.repeat(" ",t.indent)+o((e.line+u+1).toString(),f)+" | "+p.str+"\n";return d.replace(/\n$/,"")}},116:(e,t)=>{function n(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}function r(e){return e?e.split(/[\s-_]+/).map((e,t)=>0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(""):""}Object.defineProperty(t,"__esModule",{value:!0}),t.capitalize=n,t.capitalizeWords=function(e){return e?e.split(" ").map(e=>n(e)).join(" "):""},t.upper=function(e){return e?e.toUpperCase():""},t.lower=function(e){return e?e.toLowerCase():""},t.titleCase=function(e){if(!e)return"";const t=new Set(["a","an","and","as","at","but","by","for","if","in","nor","of","on","or","so","the","to","up","yet"]);return e.split(" ").map((r,i)=>{const o=r.toLowerCase();return 0===i||i===e.split(" ").length-1?n(r):t.has(o)?o:n(r)}).join(" ")},t.kebabCase=function(e){return e?e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase():""},t.snakeCase=function(e){return e?e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase():""},t.camelCase=r,t.pascalCase=function(e){if(!e)return"";const t=r(e);return t.charAt(0).toUpperCase()+t.slice(1)},t.truncate=function(e,t,n="..."){return e?e.length<=t?e:e.slice(0,t-n.length)+n:""},t.clean=function(e){return e?e.replace(/\s+/g," ").trim():""},t.pluralize=function(e,t,n){if(1===t)return e;if(n)return n;const r=[[/s$/i,"s"],[/([^aeiou])y$/i,"$1ies"],[/(x|z|s|sh|ch)$/i,"$1es"],[/$/i,"s"]];for(const[t,n]of r)if(t.test(e))return e.replace(t,n);return e+"s"},t.padStart=function(e,t,n=" "){return e?e.padStart(t,n):n.repeat(t)},t.padEnd=function(e,t,n=" "){return e?e.padEnd(t,n):n.repeat(t)},t.contains=function(e,t,n=!1){return!(!e||!t)&&(n?e.includes(t):e.toLowerCase().includes(t.toLowerCase()))},t.replaceAll=function(e,t,n){return e?e.split(t).join(n):""},t.initials=function(e){return e?e.split(" ").map(e=>e.charAt(0).toUpperCase()).join(""):""}},119:(e,t,n)=>{var r=n(231),i=n(388);function o(e,t){var n=[];return e[t].forEach(function(e){var t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}function a(e){return this.extend(e)}a.prototype.extend=function(e){var t=[],n=[];if(e instanceof i)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach(function(e){if(!(e instanceof i))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(e){if(!(e instanceof i))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(a.prototype);return s.implicit=(this.implicit||[]).concat(t),s.explicit=(this.explicit||[]).concat(n),s.compiledImplicit=o(s,"implicit"),s.compiledExplicit=o(s,"explicit"),s.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function r(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(r);return n}(s.compiledImplicit,s.compiledExplicit),s},e.exports=a},127:(e,t,n)=>{var r=n(388),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==i.exec(e)||null!==o.exec(e))},construct:function(e){var t,n,r,a,s,l,c,u,p=0,d=null;if(null===(t=i.exec(e))&&(t=o.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,r,a));if(s=+t[4],l=+t[5],c=+t[6],t[7]){for(p=t[7].slice(0,3);p.length<3;)p+="0";p=+p}return t[9]&&(d=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(d=-d)),u=new Date(Date.UTC(n,r,a,s,l,c,p)),d&&u.setTime(u.getTime()-d),u},instanceOf:Date,represent:function(e){return e.toISOString()}})},148:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LegalMarkdown=void 0,t.processLegalMarkdown=d;const r=n(176),i=n(64),o=n(576),a=n(70),s=n(294);let l,c;try{const e=n(480);l=e.convertRstToLegalMarkdownSync}catch(e){l=e=>e}try{const e=n(811);c=e.convertLatexToLegalMarkdownSync}catch(e){c=e=>e}const u=n(260),p=n(628);function d(e,t={}){t.debug?(p.logger.setDebugEnabled(!0),p.logger.debug("Debug mode enabled for Legal Markdown processing",{options:t})):p.logger.setDebugEnabled(!1),u.fieldTracker.clear();let n=l(e);n=c(n);const{content:d,metadata:f}=(0,r.parseYamlFrontMatter)(n,t.throwOnYamlError);if(p.logger.debug("YAML front matter parsed",{metadata:f,yamlVariables:Object.keys(f||{}).length}),t.yamlOnly)return p.logger.debug("YAML-only processing mode: returning content without variable substitution"),{content:d,metadata:f};let g=d;p.logger.debug("Starting content processing",{contentLength:g.length}),t.noClauses?p.logger.debug("Skipping optional clauses processing"):(p.logger.debug("Processing optional clauses"),g=(0,o.processOptionalClauses)(g,f)),t.noReferences?p.logger.debug("Skipping cross references processing"):(p.logger.debug("Processing cross references"),g=(0,a.processCrossReferences)(g,f)),t.noMixins?p.logger.debug("Skipping mixins processing"):(p.logger.debug("Processing mixins and template variables"),g=(0,s.processMixins)(g,f,t)),t.noHeaders?p.logger.debug("Skipping headers processing"):(p.logger.debug("Processing headers and numbering"),g=(0,i.processHeaders)(g,f,{noReset:t.noReset,noIndent:t.noIndent,enableFieldTrackingInMarkdown:t.enableFieldTrackingInMarkdown})),t.enableFieldTracking&&(p.logger.debug("Applying field tracking to content"),g=u.fieldTracker.applyFieldTracking(g));const h=t.enableFieldTracking?u.fieldTracker.generateReport():void 0;return p.logger.debug("Legal Markdown processing completed",{outputLength:g.length,fieldsTracked:h?.total||0,yamlVariables:Object.keys(f||{}).length}),{content:g,metadata:f,fieldReport:h}}t.LegalMarkdown={processLegalMarkdown:d},"undefined"!=typeof window&&(window.LegalMarkdown=t.LegalMarkdown)},162:t=>{t.exports=e},176:function(e,t,n){var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),a=0;a<n.length;a++)"default"!==n[a]&&i(t,e,n[a]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.parseYamlFrontMatter=function(e,t=!1){const n={content:e,metadata:{}};if(!e.startsWith("---"))return n;const r=e.indexOf("---",3);if(-1===r)return n;let i=e.substring(3,r).trim();const o=e.substring(r+3).trim();i=function(e){return e.replace(/@today(?:\[([^\]]+)\])?/g,(e,t)=>{const n=t||"YYYY-MM-DD",r=function(e,t){try{switch(t.toLowerCase()){case"iso":case"yyyy-mm-dd":default:return e.toISOString().split("T")[0];case"long":return e.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});case"medium":return e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});case"short":return e.toLocaleDateString("en-US",{year:"2-digit",month:"short",day:"numeric"})}}catch(t){return e.toISOString().split("T")[0]}}(new Date,n);return`"${r}"`})}(i);try{const e=s.load(i);return e&&"object"==typeof e?{content:o,metadata:e}:{content:o,metadata:{}}}catch(e){if(t)throw new Error(`Invalid YAML Front Matter: ${e instanceof Error?e.message:"Unknown error"}`);return n}},t.serializeToYaml=function(e){try{return s.dump(e)}catch(e){return console.error("Error serializing metadata to YAML:",e),""}},t.extractMetadataOutputConfig=function(e){return{yamlOutput:e["meta-yaml-output"],jsonOutput:e["meta-json-output"],outputPath:e["meta-output-path"],includeOriginal:e["meta-include-original"]}};const s=a(n(210))},184:(e,t,n)=>{e.exports=n(759).extend({implicit:[n(198),n(199),n(466),n(461)]})},198:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})},199:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},210:(e,t,n)=>{var r=n(243),i=n(781);function o(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}e.exports.Type=n(388),e.exports.Schema=n(119),e.exports.FAILSAFE_SCHEMA=n(759),e.exports.JSON_SCHEMA=n(184),e.exports.CORE_SCHEMA=n(769),e.exports.DEFAULT_SCHEMA=n(489),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=i.dump,e.exports.YAMLException=n(231),e.exports.types={binary:n(342),float:n(461),map:n(369),null:n(198),pairs:n(942),set:n(663),timestamp:n(127),bool:n(199),int:n(466),merge:n(851),omap:n(946),seq:n(636),str:n(212)},e.exports.safeLoad=o("safeLoad","load"),e.exports.safeLoadAll=o("safeLoadAll","loadAll"),e.exports.safeDump=o("safeDump","dump")},212:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},231:e=>{function t(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),r+" "+n):r}function n(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(e){return this.name+": "+t(this,e)},e.exports=n},243:(e,t,n)=>{var r=n(433),i=n(231),o=n(83),a=n(489),s=Object.prototype.hasOwnProperty,l=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=/[\x85\u2028\u2029]/,u=/[,\[\]\{\}]/,p=/^(?:!|!!|![a-z\-]+!)$/i,d=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function f(e){return Object.prototype.toString.call(e)}function g(e){return 10===e||13===e}function h(e){return 9===e||32===e}function m(e){return 9===e||32===e||10===e||13===e}function v(e){return 44===e||91===e||93===e||123===e||125===e}function b(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function y(e){return 120===e?2:117===e?4:85===e?8:0}function w(e){return 48<=e&&e<=57?e-48:-1}function x(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function k(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var A=new Array(256),M=new Array(256),S=0;S<256;S++)A[S]=x(S)?1:0,M[S]=x(S);function $(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||a,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function C(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=o(n),new i(t,n)}function O(e,t){throw C(e,t)}function F(e,t){e.onWarning&&e.onWarning.call(null,C(e,t))}var I={YAML:function(e,t,n){var r,i,o;null!==e.version&&O(e,"duplication of %YAML directive"),1!==n.length&&O(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&O(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&O(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&F(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&O(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],p.test(r)||O(e,"ill-formed tag handle (first argument) of the TAG directive"),s.call(e.tagMap,r)&&O(e,'there is a previously declared suffix for "'+r+'" tag handle'),d.test(i)||O(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(t){O(e,"tag prefix is malformed: "+i)}e.tagMap[r]=i}};function L(e,t,n,r){var i,o,a,s;if(t<n){if(s=e.input.slice(t,n),r)for(i=0,o=s.length;i<o;i+=1)9===(a=s.charCodeAt(i))||32<=a&&a<=1114111||O(e,"expected valid JSON character");else l.test(s)&&O(e,"the stream contains non-printable characters");e.result+=s}}function T(e,t,n,i){var o,a,l,c;for(r.isObject(n)||O(e,"cannot merge mappings; the provided source object is unacceptable"),l=0,c=(o=Object.keys(n)).length;l<c;l+=1)a=o[l],s.call(t,a)||(t[a]=n[a],i[a]=!0)}function j(e,t,n,r,i,o,a,l,c){var u,p;if(Array.isArray(i))for(u=0,p=(i=Array.prototype.slice.call(i)).length;u<p;u+=1)Array.isArray(i[u])&&O(e,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===f(i[u])&&(i[u]="[object Object]");if("object"==typeof i&&"[object Object]"===f(i)&&(i="[object Object]"),i=String(i),null===t&&(t={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(o))for(u=0,p=o.length;u<p;u+=1)T(e,t,o[u],n);else T(e,t,o,n);else e.json||s.call(n,i)||!s.call(t,i)||(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=c||e.position,O(e,"duplicated mapping key")),"__proto__"===i?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[i]=o,delete n[i];return t}function _(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):O(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function P(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);0!==i;){for(;h(i);)9===i&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&35===i)do{i=e.input.charCodeAt(++e.position)}while(10!==i&&13!==i&&0!==i);if(!g(i))break;for(_(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position)}return-1!==n&&0!==r&&e.lineIndent<n&&F(e,"deficient indentation"),r}function E(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!m(t)))}function N(e,t){1===t?e.result+=" ":t>1&&(e.result+=r.repeat("\n",t-1))}function D(e,t){var n,r,i=e.tag,o=e.anchor,a=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),r=e.input.charCodeAt(e.position);0!==r&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,O(e,"tab characters must not be used in indentation")),45===r)&&m(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,P(e,!0,-1)&&e.lineIndent<=t)a.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,R(e,t,3,!1,!0),a.push(e.result),P(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)O(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=i,e.anchor=o,e.kind="sequence",e.result=a,!0)}function Y(e){var t,n,r,i,o=!1,a=!1;if(33!==(i=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&O(e,"duplication of a tag property"),60===(i=e.input.charCodeAt(++e.position))?(o=!0,i=e.input.charCodeAt(++e.position)):33===i?(a=!0,n="!!",i=e.input.charCodeAt(++e.position)):n="!",t=e.position,o){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&62!==i);e.position<e.length?(r=e.input.slice(t,e.position),i=e.input.charCodeAt(++e.position)):O(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!m(i);)33===i&&(a?O(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),p.test(n)||O(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),i=e.input.charCodeAt(++e.position);r=e.input.slice(t,e.position),u.test(r)&&O(e,"tag suffix cannot contain flow indicator characters")}r&&!d.test(r)&&O(e,"tag name cannot contain such characters: "+r);try{r=decodeURIComponent(r)}catch(t){O(e,"tag name is malformed: "+r)}return o?e.tag=r:s.call(e.tagMap,n)?e.tag=e.tagMap[n]+r:"!"===n?e.tag="!"+r:"!!"===n?e.tag="tag:yaml.org,2002:"+r:O(e,'undeclared tag handle "'+n+'"'),!0}function W(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&O(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!m(n)&&!v(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&O(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function R(e,t,n,i,o){var a,l,c,u,p,d,f,x,S,$=1,C=!1,F=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=l=c=4===n||3===n,i&&P(e,!0,-1)&&(C=!0,e.lineIndent>t?$=1:e.lineIndent===t?$=0:e.lineIndent<t&&($=-1)),1===$)for(;Y(e)||W(e);)P(e,!0,-1)?(C=!0,c=a,e.lineIndent>t?$=1:e.lineIndent===t?$=0:e.lineIndent<t&&($=-1)):c=!1;if(c&&(c=C||o),1!==$&&4!==n||(x=1===n||2===n?t:t+1,S=e.position-e.lineStart,1===$?c&&(D(e,S)||function(e,t,n){var r,i,o,a,s,l,c,u=e.tag,p=e.anchor,d={},f=Object.create(null),g=null,v=null,b=null,y=!1,w=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=d),c=e.input.charCodeAt(e.position);0!==c;){if(y||-1===e.firstTabInLine||(e.position=e.firstTabInLine,O(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),o=e.line,63!==c&&58!==c||!m(r)){if(a=e.line,s=e.lineStart,l=e.position,!R(e,n,2,!1,!0))break;if(e.line===o){for(c=e.input.charCodeAt(e.position);h(c);)c=e.input.charCodeAt(++e.position);if(58===c)m(c=e.input.charCodeAt(++e.position))||O(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(j(e,d,f,g,v,null,a,s,l),g=v=b=null),w=!0,y=!1,i=!1,g=e.tag,v=e.result;else{if(!w)return e.tag=u,e.anchor=p,!0;O(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!w)return e.tag=u,e.anchor=p,!0;O(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(j(e,d,f,g,v,null,a,s,l),g=v=b=null),w=!0,y=!0,i=!0):y?(y=!1,i=!0):O(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=r;if((e.line===o||e.lineIndent>t)&&(y&&(a=e.line,s=e.lineStart,l=e.position),R(e,t,4,!0,i)&&(y?v=e.result:b=e.result),y||(j(e,d,f,g,v,b,a,s,l),g=v=b=null),P(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==c)O(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&j(e,d,f,g,v,null,a,s,l),w&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=d),w}(e,S,x))||function(e,t){var n,r,i,o,a,s,l,c,u,p,d,f,g=!0,h=e.tag,v=e.anchor,b=Object.create(null);if(91===(f=e.input.charCodeAt(e.position)))a=93,c=!1,o=[];else{if(123!==f)return!1;a=125,c=!0,o={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),f=e.input.charCodeAt(++e.position);0!==f;){if(P(e,!0,t),(f=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=h,e.anchor=v,e.kind=c?"mapping":"sequence",e.result=o,!0;g?44===f&&O(e,"expected the node content, but found ','"):O(e,"missed comma between flow collection entries"),d=null,s=l=!1,63===f&&m(e.input.charCodeAt(e.position+1))&&(s=l=!0,e.position++,P(e,!0,t)),n=e.line,r=e.lineStart,i=e.position,R(e,t,1,!1,!0),p=e.tag,u=e.result,P(e,!0,t),f=e.input.charCodeAt(e.position),!l&&e.line!==n||58!==f||(s=!0,f=e.input.charCodeAt(++e.position),P(e,!0,t),R(e,t,1,!1,!0),d=e.result),c?j(e,o,b,p,u,d,n,r,i):s?o.push(j(e,null,b,p,u,d,n,r,i)):o.push(u),P(e,!0,t),44===(f=e.input.charCodeAt(e.position))?(g=!0,f=e.input.charCodeAt(++e.position)):g=!1}O(e,"unexpected end of the stream within a flow collection")}(e,x)?F=!0:(l&&function(e,t){var n,i,o,a,s=1,l=!1,c=!1,u=t,p=0,d=!1;if(124===(a=e.input.charCodeAt(e.position)))i=!1;else{if(62!==a)return!1;i=!0}for(e.kind="scalar",e.result="";0!==a;)if(43===(a=e.input.charCodeAt(++e.position))||45===a)1===s?s=43===a?3:2:O(e,"repeat of a chomping mode identifier");else{if(!((o=w(a))>=0))break;0===o?O(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?O(e,"repeat of an indentation width identifier"):(u=t+o-1,c=!0)}if(h(a)){do{a=e.input.charCodeAt(++e.position)}while(h(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!g(a)&&0!==a)}for(;0!==a;){for(_(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!c||e.lineIndent<u)&&32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>u&&(u=e.lineIndent),g(a))p++;else{if(e.lineIndent<u){3===s?e.result+=r.repeat("\n",l?1+p:p):1===s&&l&&(e.result+="\n");break}for(i?h(a)?(d=!0,e.result+=r.repeat("\n",l?1+p:p)):d?(d=!1,e.result+=r.repeat("\n",p+1)):0===p?l&&(e.result+=" "):e.result+=r.repeat("\n",p):e.result+=r.repeat("\n",l?1+p:p),l=!0,c=!0,p=0,n=e.position;!g(a)&&0!==a;)a=e.input.charCodeAt(++e.position);L(e,n,e.position,!1)}}return!0}(e,x)||function(e,t){var n,r,i;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(L(e,r,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;r=e.position,e.position++,i=e.position}else g(n)?(L(e,r,i,!0),N(e,P(e,!1,t)),r=i=e.position):e.position===e.lineStart&&E(e)?O(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);O(e,"unexpected end of the stream within a single quoted scalar")}(e,x)||function(e,t){var n,r,i,o,a,s;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return L(e,n,e.position,!0),e.position++,!0;if(92===s){if(L(e,n,e.position,!0),g(s=e.input.charCodeAt(++e.position)))P(e,!1,t);else if(s<256&&A[s])e.result+=M[s],e.position++;else if((a=y(s))>0){for(i=a,o=0;i>0;i--)(a=b(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:O(e,"expected hexadecimal character");e.result+=k(o),e.position++}else O(e,"unknown escape sequence");n=r=e.position}else g(s)?(L(e,n,r,!0),N(e,P(e,!1,t)),n=r=e.position):e.position===e.lineStart&&E(e)?O(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}O(e,"unexpected end of the stream within a double quoted scalar")}(e,x)?F=!0:function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!m(r)&&!v(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&O(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),s.call(e.anchorMap,n)||O(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],P(e,!0,-1),!0}(e)?(F=!0,null===e.tag&&null===e.anchor||O(e,"alias node should not have any properties")):function(e,t,n){var r,i,o,a,s,l,c,u,p=e.kind,d=e.result;if(m(u=e.input.charCodeAt(e.position))||v(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(m(r=e.input.charCodeAt(e.position+1))||n&&v(r)))return!1;for(e.kind="scalar",e.result="",i=o=e.position,a=!1;0!==u;){if(58===u){if(m(r=e.input.charCodeAt(e.position+1))||n&&v(r))break}else if(35===u){if(m(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&E(e)||n&&v(u))break;if(g(u)){if(s=e.line,l=e.lineStart,c=e.lineIndent,P(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=l,e.lineIndent=c;break}}a&&(L(e,i,o,!1),N(e,e.line-s),i=o=e.position,a=!1),h(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return L(e,i,o,!1),!!e.result||(e.kind=p,e.result=d,!1)}(e,x,1===n)&&(F=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===$&&(F=c&&D(e,S))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&O(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,p=e.implicitTypes.length;u<p;u+=1)if((f=e.implicitTypes[u]).resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(s.call(e.typeMap[e.kind||"fallback"],e.tag))f=e.typeMap[e.kind||"fallback"][e.tag];else for(f=null,u=0,p=(d=e.typeMap.multi[e.kind||"fallback"]).length;u<p;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){f=d[u];break}f||O(e,"unknown tag !<"+e.tag+">"),null!==e.result&&f.kind!==e.kind&&O(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):O(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||F}function U(e){var t,n,r,i,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(P(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(a=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!m(i);)i=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&O(e,"directive name must not be less than one character in length");0!==i;){for(;h(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!g(i));break}if(g(i))break;for(t=e.position;0!==i&&!m(i);)i=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==i&&_(e),s.call(I,n)?I[n](e,n,r):F(e,'unknown document directive "'+n+'"')}P(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,P(e,!0,-1)):a&&O(e,"directives end mark is expected"),R(e,e.lineIndent-1,4,!1,!0),P(e,!0,-1),e.checkLineBreaks&&c.test(e.input.slice(o,e.position))&&F(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&E(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,P(e,!0,-1)):e.position<e.length-1&&O(e,"end of the stream or a document separator is expected")}function q(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new $(e,t),r=e.indexOf("\0");for(-1!==r&&(n.position=r,O(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)U(n);return n.documents}e.exports.loadAll=function(e,t,n){null!==t&&"object"==typeof t&&void 0===n&&(n=t,t=null);var r=q(e,n);if("function"!=typeof t)return r;for(var i=0,o=r.length;i<o;i+=1)t(r[i])},e.exports.load=function(e,t){var n=q(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new i("expected a single document in the stream, but found more")}}},260:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fieldTracker=t.FieldTracker=t.FieldStatus=void 0;const r=n(628),i=n(370);Object.defineProperty(t,"FieldStatus",{enumerable:!0,get:function(){return i.FieldStatus}});class o{constructor(){this.fields=new Map,this.processedContent=""}trackField(e,t){const{value:n,originalValue:o,hasLogic:a=!1,mixinUsed:s}=t;let l;l=a||s&&["conditional","helper","loop"].includes(s)?i.FieldStatus.LOGIC:null==n||""===n?i.FieldStatus.EMPTY:i.FieldStatus.FILLED;const c={name:e,status:l,value:n,originalValue:o,hasLogic:a,mixinUsed:s};this.fields.set(e,c),r.logger.debug("Field tracked",{fieldName:e,status:l,hasLogic:a})}applyFieldTracking(e){let t=e;return this.fields.forEach((e,n)=>{const r=this.getFieldCssClass(e.status),i=new RegExp(`\\{\\{\\s*${n}\\s*\\}\\}`,"g");if(void 0!==e.value&&null!==e.value&&""!==e.value){const i=new RegExp(`(?<!<span[^>]*>)${this.escapeRegex(String(e.value))}(?!</span>)`,"g");t=t.replace(i,e=>`<span class="${r}" data-field="${n}">${e}</span>`)}else t=t.replace(i,e=>`<span class="${r}" data-field="${n}">[${n}]</span>`)}),this.processedContent=t,t}getFieldCssClass(e){switch(e){case i.FieldStatus.FILLED:return"imported-value";case i.FieldStatus.EMPTY:return"missing-value";case i.FieldStatus.LOGIC:return"highlight";default:return""}}escapeRegex(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}getFields(){return new Map(this.fields)}getFieldsByStatus(e){return Array.from(this.fields.values()).filter(t=>t.status===e)}generateReport(){const e=Array.from(this.fields.values());return{total:e.length,filled:e.filter(e=>e.status===i.FieldStatus.FILLED).length,empty:e.filter(e=>e.status===i.FieldStatus.EMPTY).length,logic:e.filter(e=>e.status===i.FieldStatus.LOGIC).length,fields:e}}clear(){this.fields.clear(),this.processedContent=""}}t.FieldTracker=o,t.fieldTracker=new o},294:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.processMixins=function(e,t,n={}){if(n.noMixins)return e;const s=/\{\{([^}]+)\}\}/g;function l(e,t){return"."===t?e?.["."]:t.split(".").reduce((e,t)=>{const n=t.match(/^(\w+)\[(\d+)\]$/);if(n){const[,t,r]=n;return e?.[t]?.[parseInt(r,10)]}return e?.[t]},e)}function c(e,t){try{const n=e.match(/^(\w+)\((.*)\)$/);if(!n)return;const[,r,o]=n,a=i.extensionHelpers[r];if(!a||"function"!=typeof a)return;const s=function(e,t){if(!e.trim())return[];const n=[];let r="",i=!1,o="",a=0;for(let s=0;s<e.length;s++){const l=e[s];i||'"'!==l&&"'"!==l?i&&l===o?(i=!1,o="",r+=l):i||"("!==l?i||")"!==l?i||","!==l||0!==a?r+=l:(n.push(u(r.trim(),t)),r=""):(a--,r+=l):(a++,r+=l):(i=!0,o=l,r+=l)}return r.trim()&&n.push(u(r.trim(),t)),n}(o,t);return a(...s)}catch(t){return void console.warn(`Error evaluating helper expression: ${e}`,t)}}function u(e,t){if(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))return e.slice(1,-1);if(/^-?\d+(\.\d+)?$/.test(e))return parseFloat(e);if("true"===e)return!0;if("false"===e)return!1;if("null"===e)return null;if("undefined"!==e){if("@today"===e)return new Date;if(e.includes("(")&&e.includes(")")){const n=c(e,t);if(void 0!==n)return n}return l(t,e)}}return function e(i,o=0){return o>10?i:i.replace(s,(i,u)=>{const p=u.trim();if(p.includes("(")&&p.includes(")")){const e=c(p,t);return void 0!==e?(r.fieldTracker.trackField(p,{value:e,hasLogic:!0,mixinUsed:"helper"}),n.enableFieldTrackingInMarkdown?`<span class="highlight"><span class="imported-value" data-field="${a(p)}">${String(e)}</span></span>`:String(e)):n.enableFieldTrackingInMarkdown?`<span class="highlight"><span class="missing-value" data-field="${a(p)}">[[${p}]]</span></span>`:`{{${p}}}`}if(p.includes("?")){const i=p.indexOf("?"),s=p.indexOf(":",i);if(-1!==s){const c=p.substring(0,i).trim(),u=p.substring(i+1,s).trim(),d=p.substring(s+1).trim(),f=l(t,c),g=f?u:d;if(r.fieldTracker.trackField(c,{value:f,hasLogic:!0,mixinUsed:"conditional"}),g){const t=e(g,o+1);return n.enableFieldTrackingInMarkdown?`<span class="highlight"><span class="imported-value" data-field="${a(p)}">${t}</span></span>`:t}}return n.enableFieldTrackingInMarkdown?`<span class="highlight"><span class="missing-value" data-field="${a(p)}">[[${p}]]</span></span>`:`{{${p}}}`}const d=l(t,p);if(null==d)return r.fieldTracker.trackField(p,{value:void 0,hasLogic:!1}),n.enableFieldTrackingInMarkdown?`<span class="missing-value" data-field="${a(p)}">[[${p}]]</span>`:`{{${p}}}`;r.fieldTracker.trackField(p,{value:d,hasLogic:!1});const f=String(d);if(s.test(f)){const t=e(f,o+1);return n.enableFieldTrackingInMarkdown?`<span class="imported-value" data-field="${a(p)}">${t}</span>`:t}return n.enableFieldTrackingInMarkdown?`<span class="imported-value" data-field="${a(p)}">${f}</span>`:f})}((0,o.processTemplateLoops)(e,t,void 0,n.enableFieldTrackingInMarkdown||!1))};const r=n(260),i=n(61),o=n(519);function a(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}},342:(e,t,n)=>{var r=n(388),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,o=e.length,a=i;for(n=0;n<o;n++)if(!((t=a.indexOf(e.charAt(n)))>64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,r=e.replace(/[\r\n=]/g,""),o=r.length,a=i,s=0,l=[];for(t=0;t<o;t++)t%4==0&&t&&(l.push(s>>16&255),l.push(s>>8&255),l.push(255&s)),s=s<<6|a.indexOf(r.charAt(t));return 0==(n=o%4*6)?(l.push(s>>16&255),l.push(s>>8&255),l.push(255&s)):18===n?(l.push(s>>10&255),l.push(s>>2&255)):12===n&&l.push(s>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,r="",o=0,a=e.length,s=i;for(t=0;t<a;t++)t%3==0&&t&&(r+=s[o>>18&63],r+=s[o>>12&63],r+=s[o>>6&63],r+=s[63&o]),o=(o<<8)+e[t];return 0==(n=a%3)?(r+=s[o>>18&63],r+=s[o>>12&63],r+=s[o>>6&63],r+=s[63&o]):2===n?(r+=s[o>>10&63],r+=s[o>>4&63],r+=s[o<<2&63],r+=s[64]):1===n&&(r+=s[o>>2&63],r+=s[o<<4&63],r+=s[64],r+=s[64]),r}})},369:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},370:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CoreFieldState=t.FieldStatus=void 0,function(e){e.FILLED="filled",e.EMPTY="empty",e.LOGIC="logic"}(n||(t.FieldStatus=n={})),t.CoreFieldState=class{constructor(){this._fields=new Map}get fields(){return this._fields}trackField(e,t){const{value:r,originalValue:i,hasLogic:o=!1,mixinUsed:a}=t;let s;s=o||a?n.LOGIC:null==r||""===r?n.EMPTY:n.FILLED;const l={name:e,status:s,value:r,originalValue:i,hasLogic:o,mixinUsed:a};this._fields.set(e,l)}getFields(){return new Map(this._fields)}getFieldsByStatus(e){return Array.from(this._fields.values()).filter(t=>t.status===e)}clear(){this._fields.clear()}generateReport(){const e=Array.from(this._fields.values());return{total:e.length,filled:e.filter(e=>e.status===n.FILLED).length,empty:e.filter(e=>e.status===n.EMPTY).length,logic:e.filter(e=>e.status===n.LOGIC).length,fields:e}}}},388:(e,t,n)=>{var r=n(231),i=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach(function(t){if(-1===i.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach(function(e){n[e].forEach(function(t){a[String(t)]=e})}),a),-1===o.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},433:e=>{function t(e){return null==e}e.exports.isNothing=t,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:t(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n<t;n+=1)r+=e;return r},e.exports.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},e.exports.extend=function(e,t){var n,r,i,o;if(t)for(n=0,r=(o=Object.keys(t)).length;n<r;n+=1)e[i=o[n]]=t[i];return e}},461:(e,t,n)=>{var r=n(433),i=n(388),o=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),a=/^[-+]?[0-9]+e/;e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},466:(e,t,n)=>{var r=n(433),i=n(388);function o(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function a(e){return 48<=e&&e<=55}function s(e){return 48<=e&&e<=57}e.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n=e.length,r=0,i=!1;if(!n)return!1;if("-"!==(t=e[r])&&"+"!==t||(t=e[++r]),"0"===t){if(r+1===n)return!0;if("b"===(t=e[++r])){for(r++;r<n;r++)if("_"!==(t=e[r])){if("0"!==t&&"1"!==t)return!1;i=!0}return i&&"_"!==t}if("x"===t){for(r++;r<n;r++)if("_"!==(t=e[r])){if(!o(e.charCodeAt(r)))return!1;i=!0}return i&&"_"!==t}if("o"===t){for(r++;r<n;r++)if("_"!==(t=e[r])){if(!a(e.charCodeAt(r)))return!1;i=!0}return i&&"_"!==t}}if("_"===t)return!1;for(;r<n;r++)if("_"!==(t=e[r])){if(!s(e.charCodeAt(r)))return!1;i=!0}return!(!i||"_"===t)},construct:function(e){var t,n=e,r=1;if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(t=n[0])&&"+"!==t||("-"===t&&(r=-1),t=(n=n.slice(1))[0]),"0"===n)return 0;if("0"===t){if("b"===n[1])return r*parseInt(n.slice(2),2);if("x"===n[1])return r*parseInt(n.slice(2),16);if("o"===n[1])return r*parseInt(n.slice(2),8)}return r*parseInt(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!r.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},480:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRestructuredText=a,t.parseRestructuredTextSync=s,t.isRestructuredText=l,t.convertRstToLegalMarkdown=async function(e){return l(e)?await a(e):e},t.convertRstToLegalMarkdownSync=function(e){return l(e)?s(e):e};const r=n(516),i=n(794),o=n(890);async function a(e){try{const t=await i.PandocFactory.createForContent(e);return t?(await t.convert(e,"rst","markdown")).replace(/\n{3,}/g,"\n\n").trim():o.FallbackParsers.convertRstBasic(e)}catch(t){return console.error("Error parsing RST:",t),o.FallbackParsers.convertRstBasic(e)}}function s(e){return o.FallbackParsers.convertRstBasic(e)}function l(e){return r.ContentDetector.needsRstParser(e)}},489:(e,t,n)=>{e.exports=n(769).extend({implicit:[n(127),n(851)],explicit:[n(342),n(946),n(942),n(663)]})},492:(e,t)=>{function n(e,t="EUR",n=2){const r="string"==typeof e?parseFloat(e):e;if(isNaN(r))return String(e);const i=r.toFixed(n).replace(/\B(?=(\d{3})+(?!\d))/g,","),o={EUR:"€",USD:"$",GBP:"£"}[t]||t;return"EUR"===t?`${i} ${o}`:`${o}${i}`}Object.defineProperty(t,"__esModule",{value:!0}),t.formatInteger=function(e,t=","){const n="string"==typeof e?parseFloat(e):e;return isNaN(n)?String(e):Math.floor(n).toString().replace(/\B(?=(\d{3})+(?!\d))/g,t)},t.formatPercent=function(e,t=2,n=!0){const r="string"==typeof e?parseFloat(e):e;if(isNaN(r))return String(e);const i=(100*r).toFixed(t);return n?`${i}%`:i},t.formatCurrency=n,t.formatEuro=function(e,t=2){return n(e,"EUR",t)},t.formatDollar=function(e,t=2){return n(e,"USD",t)},t.formatPound=function(e,t=2){return n(e,"GBP",t)},t.numberToWords=function e(t){const n="string"==typeof t?parseFloat(t):t;if(isNaN(n))return String(t);if(0===n)return"zero";const r=["","one","two","three","four","five","six","seven","eight","nine"],i=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"],o=["ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],a=e=>e>=1e6?a(Math.floor(e/1e6))+" million "+s(e%1e6):s(e),s=e=>e>=1e3?l(Math.floor(e/1e3))+" thousand "+l(e%1e3):l(e),l=e=>{let t="";if(e>99&&(t+=r[Math.floor(e/100)]+" hundred ",e%=100),e>19)t+=i[Math.floor(e/10)]+" ",e%=10;else if(e>9)return t+=o[e-10]+" ",t.trim();return e>0&&(t+=r[e]+" "),t.trim()};if(n<0)return"negative "+e(Math.abs(n));const c=Math.floor(n),u=Math.round(100*(n-c));let p=a(c);return u>0&&(p+=" and "+l(u)+" cents"),p.trim()},t.formatNumber=function(e,t=2,n=".",r=","){const i="string"==typeof e?parseFloat(e):e;if(isNaN(i))return String(e);const o=i.toFixed(t).split(".");return o[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,r),o.join(n)},t.round=function(e,t=0){const n="string"==typeof e?parseFloat(e):e;if(isNaN(n))return 0;const r=Math.pow(10,t);return Math.round(n*r)/r}},509:function(e,t,n){var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),a=0;a<n.length;a++)"default"!==n[a]&&i(t,e,n[a]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.PandocLoader=void 0;const s=n(516);class l{static async loadIfNeeded(e){if(!s.ContentDetector.needsPandoc(e))return!1;if("undefined"==typeof window)return!0;if(this.pandocWasm)return!0;if(this.loadingPromise)try{return await this.loadingPromise,null!==this.pandocWasm}catch(e){return!1}this.loadingPromise=this.loadPandocWasm();try{return this.pandocWasm=await this.loadingPromise,!0}catch(e){return console.warn("Failed to load pandoc-wasm:",e),!1}finally{this.loadingPromise=null}}static getPandocWasm(){return this.pandocWasm}static async loadPandocWasm(){try{const e=await Promise.resolve().then(()=>a(n(162)));return"function"==typeof e.init?await e.init():"function"==typeof e.default?await e.default():"object"==typeof e.default&&e.default.convert?e.default:e}catch(e){throw new Error(`Failed to load pandoc-wasm: ${e.message}`)}}static reset(){this.pandocWasm=null,this.loadingPromise=null}}t.PandocLoader=l,l.pandocWasm=null,l.loadingPromise=null},516:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ContentDetector=void 0,t.ContentDetector=class{static needsRstParser(e){return!e.startsWith("---")&&([/^\.\.[ \t]+\w+::/m,/`[^<]+[ \t]*<[^>]+>`_/,/^\.\.[ \t]+(note|warning|important)::/m,/::[ \t]*$/m].filter(t=>t.test(e)).length>=1||(!!/^.+\n[=~^"'`#*+<>-]{4,}[ \t]*$/m.test(e)||[/^\.\.[ \t]+\w+::/m,/^[=~^"'`#*+<>-]{4,}[ \t]*$/m,/`[^`]+`__?/,/`[^<]+[ \t]*<[^>]+>`_/,/::[ \t]*$/m,/^\.\.[ \t]+(note|warning|important)::/m,/^\*[ \t]+\S/m,/^\d+\.[ \t]+\S/m].filter(t=>t.test(e)).length>=2))}static needsLatexParser(e){return!e.startsWith("---")&&([/\\documentclass\{/,/\\begin\{document\}/,/\\section\*?\{/,/\\subsection\*?\{/,/\\usepackage\{/,/\\textbf\{/,/\\textit\{/,/\\emph\{/,/\\item\b/,/\\cite\{/,/\\ref\{/,/\\label\{/].filter(t=>t.test(e)).length>=1||[/\\documentclass\{/,/\\begin\{document\}/,/\\section\*?\{/,/\\subsection\*?\{/,/\\begin\{[^}]+\}/,/\\[a-zA-Z]+\{[^}]*\}/,/\\textbf\{/,/\\textit\{/,/\\emph\{/,/\\usepackage\{/,/\\href\{[^}]*\}\{[^}]*\}/,/\\item\b/,/\\cite\{/,/\\ref\{/,/\\label\{/].filter(t=>t.test(e)).length>=2)}static needsPandoc(e){return this.needsRstParser(e)||this.needsLatexParser(e)}}},519:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.processTemplateLoops=a;const r=n(260),i=n(61);function o(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function a(e,t,n,r=!0){const i=function(e){const t=[],n=/\{\{#([\w.]+)\}\}([\s\S]*?)\{\{\/\1\}\}/g;let r;for(;null!==(r=n.exec(e));){const[e,n,i]=r;t.push({variable:n,content:i,start:r.index,end:r.index+e.length,fullMatch:e})}return t}(e);if(0===i.length)return e;let o=e;for(let e=i.length-1;e>=0;e--){const a=i[e],l=s(a,t,n,r);o=o.slice(0,a.start)+l+o.slice(a.end)}return o}function s(e,t,n,i=!0){const{variable:o,content:s}=e,c=function(e,t,n){const r=p(t,e);if(void 0!==r)return r;if(n&&n.item){const t=p(n.item,e);if(void 0!==t)return t}let i=n;for(;i&&i.parent;)if(i=i.parent,i.item){const t=p(i.item,e);if(void 0!==t)return t}}(o,t,n);return r.fieldTracker.trackField(o,{value:c,hasLogic:!0,mixinUsed:"loop"}),Array.isArray(c)?function(e,t,n,r,i,o=!0){const s=[];for(let c=0;c<n.length;c++){const u=n[c],p={variable:e,item:u,index:c,total:n.length,parent:i},f=l(r,u,p);let g=t;g=a(g,f,p,o),g=d(g,f,p,o),g=h(g),s.push(g)}return s.join("\n")}(o,s,c,t,n,i):c?function(e,t,n,r,i,o=!0){const s={...r,[e]:n};let l=a(t,s,i,o);return l=d(l,s,i,o),l}(o,s,c,t,n,i):""}function l(e,t,n){const r={...e};return t&&"object"==typeof t&&!Array.isArray(t)&&Object.assign(r,t),r["."]=t,r["@index"]=n.index,r["@total"]=n.total,r["@first"]=0===n.index,r["@last"]=n.index===n.total-1,r}function c(e,t){try{const n=e.match(/^(\w+)\((.*)\)$/);if(!n)return;const[,r,o]=n,a=i.extensionHelpers[r];if(!a||"function"!=typeof a)return;const s=o?function(e,t){const n=[];let r="",i=0,o=!1,a="";for(let s=0;s<e.length;s++){const l=e[s];'"'!==l&&"'"!==l||o?l===a&&o?(o=!1,a="",r+=l):"("!==l||o?")"!==l||o?","!==l||0!==i||o?r+=l:(n.push(u(r.trim(),t)),r=""):(i--,r+=l):(i++,r+=l):(o=!0,a=l,r+=l)}return r.trim()&&n.push(u(r.trim(),t)),n}(o,t):[];return a(...s)}catch(t){return void console.error(`Error evaluating helper expression: ${e}`,t)}}function u(e,t){if(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))return e.slice(1,-1);if("true"===e)return!0;if("false"===e)return!1;if(/^\d+$/.test(e))return parseInt(e,10);if(/^\d+\.\d+$/.test(e))return parseFloat(e);if("@today"===e)return new Date;if(e.includes("(")&&e.includes(")")){const n=c(e,t);if(void 0!==n)return n}return p(t,e)}function p(e,t){const n=t.split(".");let r=e;for(const e of n){if(!r||"object"!=typeof r||!(e in r))return;r=r[e]}return r}function d(e,t,n,i=!0){return e.replace(/\{\{([^}]+)\}\}/g,(e,n)=>{const a=n.trim();if(a.includes("?")&&a.includes(":")){const e=function(e,t,n=!0){const r=f(e,"?"),i=f(e,":",r);if(-1===r||-1===i)return e;const a=e.substring(0,r).trim(),s=e.substring(r+1,i).trim(),l=e.substring(i+1).trim(),c=g(a,t)?s:l;if(c.startsWith('"')&&c.endsWith('"')||c.startsWith("'")&&c.endsWith("'")){const t=c.slice(1,-1);return n?`<span class="imported-value" data-field="${o(e)}">${t}</span>`:t}const u=function(e,t){if(e.includes("+"))return e.split("+").map(e=>{const n=e.trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))return n.slice(1,-1);const r=g(n,t);return void 0!==r?String(r):n}).join("");const n=g(e,t);return void 0!==n?String(n):e}(c,t);return n?`<span class="imported-value" data-field="${o(e)}">${u}</span>`:u}(a,t,i);return i?`<span class="highlight">${e}</span>`:e}if(a.includes("(")&&a.includes(")")){const e=c(a,t);if(void 0!==e)return r.fieldTracker.trackField(a,{value:e,hasLogic:!0,mixinUsed:"helper"}),i?`<span class="highlight"><span class="imported-value" data-field="${o(a)}">${String(e)}</span></span>`:String(e)}const s=g(a,t);return null==s?i?`<span class="missing-value" data-field="${o(a)}">[[${a}]]</span>`:`{{${a}}}`:i?`<span class="imported-value" data-field="${o(a)}">${String(s)}</span>`:String(s)})}function f(e,t,n=0){let r=!1,i="";for(let o=n;o<e.length;o++){const n=e[o];if(r||'"'!==n&&"'"!==n){if(r&&n===i)r=!1,i="";else if(!r&&n===t)return o}else r=!0,i=n}return-1}function g(e,t,n){if("."===e)return t["."];const r=e.split(".");let i=t;for(const e of r){if(!i||"object"!=typeof i||!Object.prototype.hasOwnProperty.call(i,e))return;i=i[e]}return i}function h(e){const t=e.trim();return t.startsWith("- ")?`<li>${t.substring(2).trim()}</li>`:e}},576:(e,t)=>{function n(e,t){if(!e.trim())return!0;if(!(e.includes("=")||e.includes("!")||e.includes("AND")||e.includes("OR"))){const n=r(t,e.trim());return Boolean(n)}try{if(e.includes(" AND "))return e.split(" AND ").map(e=>e.trim()).every(e=>n(e,t));if(e.includes(" OR "))return e.split(" OR ").map(e=>e.trim()).some(e=>n(e,t));if(e.includes("=")){const n=e.includes("!="),i=e.split(n?"!=":"=").map(e=>e.trim());if(2!==i.length)return!1;const[o,a]=i,s=r(t,o);let l=a;return a.startsWith('"')&&a.endsWith('"')?l=a.slice(1,-1):"true"===a?l=!0:"false"===a?l=!1:isNaN(Number(a))||(l=Number(a)),n?s!==l:s===l}return!1}catch(e){return console.error("Error evaluating condition:",e),!1}}function r(e,t){const n=t.split(".");let r=e;for(const e of n){if(null==r)return;r=r[e]}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.processOptionalClauses=function(e,t){return e.replace(/\[([^[\]]*(?:\[[^\]]*\][^[\]]*)*?)\]\{([^{}]*?)\}/g,(e,r,i)=>n(i,t)?r:"")}},628:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.logger=void 0;let n=!1,r={}.env&&{}.env.LOG_LEVEL||"error";t.logger={setDebugEnabled:e=>{n=e},setLogLevel:e=>{r=e},debug:(e,t)=>{n&&console.debug(`[DEBUG] ${e}`,t||"")},info:(e,t)=>{"none"!==r&&"warn"!==r&&"error"!==r&&console.info(`[INFO] ${e}`,t||"")},warn:(e,t)=>{"none"!==r&&"error"!==r&&console.warn(`[WARN] ${e}`,t||"")},error:(e,t)=>{"none"!==r&&console.error(`[ERROR] ${e}`,t||"")}}},636:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},660:e=>{e.exports=t},663:(e,t,n)=>{var r=n(388),i=Object.prototype.hasOwnProperty;e.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(i.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})},759:(e,t,n)=>{var r=n(119);e.exports=new r({explicit:[n(212),n(636),n(369)]})},769:(e,t,n)=>{e.exports=n(184)},781:(e,t,n)=>{var r=n(433),i=n(231),o=n(489),a=Object.prototype.toString,s=Object.prototype.hasOwnProperty,l=65279,c={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},u=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],p=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function d(e){var t,n,o;if(t=e.toString(16).toUpperCase(),e<=255)n="x",o=2;else if(e<=65535)n="u",o=4;else{if(!(e<=4294967295))throw new i("code point within a string may not be greater than 0xFFFFFFFF");n="U",o=8}return"\\"+n+r.repeat("0",o-t.length)+t}function f(e){this.schema=e.schema||o,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=r.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,r,i,o,a,l,c;if(null===t)return{};for(n={},i=0,o=(r=Object.keys(t)).length;i<o;i+=1)a=r[i],l=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(c=e.compiledTypeMap.fallback[a])&&s.call(c.styleAliases,l)&&(l=c.styleAliases[l]),n[a]=l;return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function g(e,t){for(var n,i=r.repeat(" ",t),o=0,a=-1,s="",l=e.length;o<l;)-1===(a=e.indexOf("\n",o))?(n=e.slice(o),o=l):(n=e.slice(o,a+1),o=a+1),n.length&&"\n"!==n&&(s+=i),s+=n;return s}function h(e,t){return"\n"+r.repeat(" ",e.indent*t)}function m(e){return 32===e||9===e}function v(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==l||65536<=e&&e<=1114111}function b(e){return v(e)&&e!==l&&13!==e&&10!==e}function y(e,t,n){var r=b(e),i=r&&!m(e);return(n?r:r&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!i)||b(t)&&!m(t)&&35===e||58===t&&i}function w(e,t){var n,r=e.charCodeAt(t);return r>=55296&&r<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1))>=56320&&n<=57343?1024*(r-55296)+n-56320+65536:r}function x(e){return/^\n* /.test(e)}function k(e,t,n,r,o){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==u.indexOf(t)||p.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,n),s=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),f=r||e.flowLevel>-1&&n>=e.flowLevel;switch(function(e,t,n,r,i,o,a,s){var c,u,p=0,d=null,f=!1,g=!1,h=-1!==r,b=-1,k=v(u=w(e,0))&&u!==l&&!m(u)&&45!==u&&63!==u&&58!==u&&44!==u&&91!==u&&93!==u&&123!==u&&125!==u&&35!==u&&38!==u&&42!==u&&33!==u&&124!==u&&61!==u&&62!==u&&39!==u&&34!==u&&37!==u&&64!==u&&96!==u&&function(e){return!m(e)&&58!==e}(w(e,e.length-1));if(t||a)for(c=0;c<e.length;p>=65536?c+=2:c++){if(!v(p=w(e,c)))return 5;k=k&&y(p,d,s),d=p}else{for(c=0;c<e.length;p>=65536?c+=2:c++){if(10===(p=w(e,c)))f=!0,h&&(g=g||c-b-1>r&&" "!==e[b+1],b=c);else if(!v(p))return 5;k=k&&y(p,d,s),d=p}g=g||h&&c-b-1>r&&" "!==e[b+1]}return f||g?n>9&&x(e)?5:a?2===o?5:2:g?4:3:!k||a||i(e)?2===o?5:2:1}(t,f,e.indent,s,function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}(e,t)},e.quotingType,e.forceQuotes&&!r,o)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+A(t,e.indent)+M(g(t,a));case 4:return">"+A(t,e.indent)+M(g(function(e,t){for(var n,r,i,o=/(\n+)([^\n]*)/g,a=(i=-1!==(i=e.indexOf("\n"))?i:e.length,o.lastIndex=i,S(e.slice(0,i),t)),s="\n"===e[0]||" "===e[0];r=o.exec(e);){var l=r[1],c=r[2];n=" "===c[0],a+=l+(s||n||""===c?"":"\n")+S(c,t),s=n}return a}(t,s),a));case 5:return'"'+function(e){for(var t,n="",r=0,i=0;i<e.length;r>=65536?i+=2:i++)r=w(e,i),!(t=c[r])&&v(r)?(n+=e[i],r>=65536&&(n+=e[i+1])):n+=t||d(r);return n}(t)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function A(e,t){var n=x(e)?String(t):"",r="\n"===e[e.length-1];return n+(!r||"\n"!==e[e.length-2]&&"\n"!==e?r?"":"-":"+")+"\n"}function M(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function S(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,o=0,a=0,s=0,l="";n=i.exec(e);)(s=n.index)-o>t&&(r=a>o?a:s,l+="\n"+e.slice(o,r),o=r+1),a=s;return l+="\n",e.length-o>t&&a>o?l+=e.slice(o,a)+"\n"+e.slice(a+1):l+=e.slice(o),l.slice(1)}function $(e,t,n,r){var i,o,a,s="",l=e.tag;for(i=0,o=n.length;i<o;i+=1)a=n[i],e.replacer&&(a=e.replacer.call(n,String(i),a)),(O(e,t+1,a,!0,!0,!1,!0)||void 0===a&&O(e,t+1,null,!0,!0,!1,!0))&&(r&&""===s||(s+=h(e,t)),e.dump&&10===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=l,e.dump=s||"[]"}function C(e,t,n){var r,o,l,c,u,p;for(l=0,c=(o=n?e.explicitTypes:e.implicitTypes).length;l<c;l+=1)if(((u=o[l]).instanceOf||u.predicate)&&(!u.instanceOf||"object"==typeof t&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){if(n?u.multi&&u.representName?e.tag=u.representName(t):e.tag=u.tag:e.tag="?",u.represent){if(p=e.styleMap[u.tag]||u.defaultStyle,"[object Function]"===a.call(u.represent))r=u.represent(t,p);else{if(!s.call(u.represent,p))throw new i("!<"+u.tag+'> tag resolver accepts not "'+p+'" style');r=u.represent[p](t,p)}e.dump=r}return!0}return!1}function O(e,t,n,r,o,s,l){e.tag=null,e.dump=n,C(e,n,!1)||C(e,n,!0);var c,u=a.call(e.dump),p=r;r&&(r=e.flowLevel<0||e.flowLevel>t);var d,f,g="[object Object]"===u||"[object Array]"===u;if(g&&(f=-1!==(d=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(o=!1),f&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(g&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),"[object Object]"===u)r&&0!==Object.keys(e.dump).length?(function(e,t,n,r){var o,a,s,l,c,u,p="",d=e.tag,f=Object.keys(n);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(o=0,a=f.length;o<a;o+=1)u="",r&&""===p||(u+=h(e,t)),l=n[s=f[o]],e.replacer&&(l=e.replacer.call(n,s,l)),O(e,t+1,s,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,c&&(u+=h(e,t)),O(e,t+1,l,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump));e.tag=d,e.dump=p||"{}"}(e,t,e.dump,o),f&&(e.dump="&ref_"+d+e.dump)):(function(e,t,n){var r,i,o,a,s,l="",c=e.tag,u=Object.keys(n);for(r=0,i=u.length;r<i;r+=1)s="",""!==l&&(s+=", "),e.condenseFlow&&(s+='"'),a=n[o=u[r]],e.replacer&&(a=e.replacer.call(n,o,a)),O(e,t,o,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),O(e,t,a,!1,!1)&&(l+=s+=e.dump));e.tag=c,e.dump="{"+l+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if("[object Array]"===u)r&&0!==e.dump.length?(e.noArrayIndent&&!l&&t>0?$(e,t-1,e.dump,o):$(e,t,e.dump,o),f&&(e.dump="&ref_"+d+e.dump)):(function(e,t,n){var r,i,o,a="",s=e.tag;for(r=0,i=n.length;r<i;r+=1)o=n[r],e.replacer&&(o=e.replacer.call(n,String(r),o)),(O(e,t,o,!1,!1)||void 0===o&&O(e,t,null,!1,!1))&&(""!==a&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=s,e.dump="["+a+"]"}(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else{if("[object String]"!==u){if("[object Undefined]"===u)return!1;if(e.skipInvalid)return!1;throw new i("unacceptable kind of an object to dump "+u)}"?"!==e.tag&&k(e,e.dump,t,s,p)}null!==e.tag&&"?"!==e.tag&&(c=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),c="!"===e.tag[0]?"!"+c:"tag:yaml.org,2002:"===c.slice(0,18)?"!!"+c.slice(18):"!<"+c+">",e.dump=c+" "+e.dump)}return!0}function F(e,t){var n,r,i=[],o=[];for(I(e,i,o),n=0,r=o.length;n<r;n+=1)t.duplicates.push(i[o[n]]);t.usedDuplicates=new Array(r)}function I(e,t,n){var r,i,o;if(null!==e&&"object"==typeof e)if(-1!==(i=t.indexOf(e)))-1===n.indexOf(i)&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;i<o;i+=1)I(e[i],t,n);else for(i=0,o=(r=Object.keys(e)).length;i<o;i+=1)I(e[r[i]],t,n)}e.exports.dump=function(e,t){var n=new f(t=t||{});n.noRefs||F(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),O(n,0,r,!0,!0)?n.dump+"\n":""}},794:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PandocFactory=void 0;const r=n(509),i=n(989),o=n(902);t.PandocFactory=class{static async create(e={}){if("undefined"==typeof window)return new i.PandocNative(e);{const t=r.PandocLoader.getPandocWasm();if(t)return new o.PandocWasm(t,e);if(await r.PandocLoader.loadIfNeeded("# dummy content to trigger loading")){const t=r.PandocLoader.getPandocWasm();if(t)return new o.PandocWasm(t,e)}return null}}static async createForContent(e,t={}){return await r.PandocLoader.loadIfNeeded(e)?this.create(t):null}static async isAvailable(){try{return null!==await this.create()}catch(e){return!1}}static getEnvironmentInfo(){const e="undefined"==typeof window?"node":"browser",t=r.PandocLoader.getPandocWasm();return{environment:e,pandocWasmLoaded:null!==t,pandocWasmInstance:t}}}},811:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseLatex=a,t.parseLatexSync=s,t.isLatex=l,t.convertLatexToLegalMarkdown=async function(e){return l(e)?await a(e):e},t.convertLatexToLegalMarkdownSync=function(e){return l(e)?s(e):e};const r=n(516),i=n(794),o=n(890);async function a(e){try{const t=await i.PandocFactory.createForContent(e);return t?(await t.convert(e,"latex","markdown")).replace(/\n{3,}/g,"\n\n").trim():o.FallbackParsers.convertLatexBasic(e)}catch(t){return console.error("Error parsing LaTeX:",t),o.FallbackParsers.convertLatexBasic(e)}}function s(e){return o.FallbackParsers.convertLatexBasic(e)}function l(e){return r.ContentDetector.needsLatexParser(e)}},851:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},884:(e,t)=>{function n(e){const t=["th","st","nd","rd"],n=e%100;return n>=11&&n<=13?e+t[0]:e+(t[n%10]||t[0])}Object.defineProperty(t,"__esModule",{value:!0}),t.DateFormats=void 0,t.addYears=function(e,t){if(!e)throw new Error("Date is required for addYears");const n=new Date(e);if(isNaN(n.getTime()))throw new Error(`Invalid date: ${e}`);return n.setFullYear(n.getFullYear()+t),n},t.addDays=function(e,t){if(!e)throw new Error("Date is required for addDays");const n=new Date(e);if(isNaN(n.getTime()))throw new Error(`Invalid date: ${e}`);return n.setDate(n.getDate()+t),n},t.addMonths=function(e,t){if(!e)throw new Error("Date is required for addMonths");const n=new Date(e);if(isNaN(n.getTime()))throw new Error(`Invalid date: ${e}`);return n.setMonth(n.getMonth()+t),n},t.formatDate=function(e,t="YYYY-MM-DD"){const r="string"==typeof e?new Date(e):e;if(isNaN(r.getTime()))throw new Error(`Invalid date: ${e}`);const i=r.getFullYear(),o=r.getMonth(),a=r.getDate(),s=r.getDay(),l={YYYY:String(i),YY:String(i).slice(-2),MMMM:["January","February","March","April","May","June","July","August","September","October","November","December"][o],MMMMES:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"][o],MMM:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][o],MM:String(o+1).padStart(2,"0"),M:String(o+1),DD:String(a).padStart(2,"0"),D:String(a),Do:n(a),dddd:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][s],ddd:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][s]};let c=t;const u=Object.keys(l).sort((e,t)=>t.length-e.length);for(const e of u){const t=l[e],n=e.length<=2?new RegExp(`\\b${e}\\b`,"g"):new RegExp(e,"g");c=c.replace(n,t)}return c},t.DateFormats={LEGAL:"Do day of MMMM, YYYY",FORMAL:"dddd, MMMM Do, YYYY",SPANISH:"D de MMMMES de YYYY",US:"MM/DD/YYYY",EU:"DD/MM/YYYY",ISO:"YYYY-MM-DD",LONG:"MMMM D, YYYY",SHORT:"MMM D, YYYY",YEAR:"YYYY",MONTH_YEAR:"MMMM YYYY"}},890:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackParsers=void 0,t.FallbackParsers=class{static convertRstBasic(e){console.warn("Using basic RST parser - some features may not work correctly");let t=e;return t=t.replace(/^(.+)\n([=]{3,})\s*$/gm,"# $1"),t=t.replace(/^(.+)\n([-]{3,})\s*$/gm,"## $1"),t=t.replace(/^(.+)\n([~]{3,})\s*$/gm,"### $1"),t=t.replace(/^(.+)\n([\^]{3,})\s*$/gm,"#### $1"),t=t.replace(/^(.+)\n(["]{3,})\s*$/gm,"##### $1"),t=t.replace(/^(.+)\n([']{3,})\s*$/gm,"###### $1"),t=t.replace(/^([=]{3,})\n(.+)\n([=]{3,})\s*$/gm,"# $2"),t=t.replace(/^([-]{3,})\n(.+)\n([-]{3,})\s*$/gm,"## $2"),t=t.replace(/\*\*([^*]+)\*\*/g,"**$1**"),t=t.replace(/\*([^*]+)\*/g,"*$1*"),t=t.replace(/:emphasis:`([^`]+)`/g,"*$1*"),t=t.replace(/:strong:`([^`]+)`/g,"**$1**"),t=t.replace(/:literal:`([^`]+)`/g,"`$1`"),t=t.replace(/``([^`]+)``/g,"`$1`"),t=t.replace(/`([^<]+?)\s*<([^>]+?)>`_/g,"[$1]($2)"),t=t.replace(/`([^`]+)`_/g,"[$1][$1]"),t=t.replace(/^(\s*)\* (.+)/gm,"$1- $2"),t=t.replace(/^(\s*)(\d+)\. (.+)/gm,"$1$2. $3"),t=t.replace(/^(\s*)(\d+)\) (.+)/gm,"$1$2. $3"),t=t.replace(/^(.+)::\s*$/gm,(e,t)=>t+"\n\n```"),t=t.replace(/^::\s*$/gm,"```"),(t.match(/```/g)||[]).length%2==1&&(t+="\n```"),t=t.replace(/^([^\n]+)\n(\s{4,})(.+)/gm,(e,t,n,r)=>t.includes("```")||r.includes("```")?e:`**${t}**\n${n}${r}`),t=t.replace(/^\.\.[ \t]+note::[ \t]*(.*)$/gm,"> **Note:** $1"),t=t.replace(/^\.\.[ \t]+warning::[ \t]*(.*)$/gm,"> **Warning:** $1"),t=t.replace(/^\.\.[ \t]+important::[ \t]*(.*)$/gm,"> **Important:** $1"),t=t.replace(/^\.\.[ \t]+(\w+)::[ \t]*(.*)$/gm,"\x3c!-- $1: $2 --\x3e"),t=t.replace(/(?<!\]\()https?:\/\/[^\s<>)]+(?!\))/g,"<$&>"),t=t.replace(/\n{3,}/g,"\n\n"),t.trim()}static convertLatexBasic(e){console.warn("Using basic LaTeX parser - some features may not work correctly");let t=e;const n=t.match(/\\title\{([^}]+)\}/),r=t.match(/\\author\{([^}]+)\}/),i=t.match(/\\date\{([^}]+)\}/);let o="";(n||r||i)&&(o="---\n",n&&(o+=`title: "${n[1]}"\n`),r&&(o+=`author: "${r[1]}"\n`),i&&(o+=`date: "${i[1]}"\n`),o+="---\n\n"),t=t.replace(/\\documentclass\{[^}]*\}/g,""),t=t.replace(/\\usepackage\{[^}]*\}/g,""),t=t.replace(/\\title\{[^}]*\}/g,""),t=t.replace(/\\author\{[^}]*\}/g,""),t=t.replace(/\\date\{[^}]*\}/g,""),t=t.replace(/\\maketitle/g,""),t=t.replace(/\\begin\{document\}/g,""),t=t.replace(/\\end\{document\}/g,""),t=t.replace(/\\section\*?\{([^}]+)\}/g,"# $1"),t=t.replace(/\\subsection\*?\{([^}]+)\}/g,"## $1"),t=t.replace(/\\subsubsection\*?\{([^}]+)\}/g,"### $1"),t=t.replace(/\\paragraph\*?\{([^}]+)\}/g,"#### $1"),t=t.replace(/\\subparagraph\*?\{([^}]+)\}/g,"##### $1"),t=t.replace(/\\textbf\{([^}]+)\}/g,"**$1**"),t=t.replace(/\\textit\{([^}]+)\}/g,"*$1*"),t=t.replace(/\\emph\{([^}]+)\}/g,"*$1*"),t=t.replace(/\\texttt\{([^}]+)\}/g,"`$1`"),t=t.replace(/\\underline\{([^}]+)\}/g,"__$1__"),t=t.replace(/\\verb\|([^|]+)\|/g,"`$1`"),t=t.replace(/\\href\{([^}]+)\}\{([^}]+)\}/g,"[$2]($1)"),t=t.replace(/\\url\{([^}]+)\}/g,"<$1>"),t=t.replace(/\\cite\{([^}]+)\}/g,"[$1]"),t=t.replace(/\\ref\{([^}]+)\}/g,"[$1]"),t=t.replace(/\\label\{([^}]+)\}/g,'<a name="$1"></a>'),t=t.replace(/\\begin\{enumerate\}([\s\S]*?)\\end\{enumerate\}/g,(e,t)=>{let n=1;return t.replace(/\\item\s+/g,()=>n+++". ")}),t=t.replace(/\\begin\{itemize\}([\s\S]*?)\\end\{itemize\}/g,(e,t)=>t.replace(/\\item\s+/g,"- ")),t=t.replace(/\\begin\{description\}([\s\S]*?)\\end\{description\}/g,(e,t)=>t.replace(/\\item\[([^\]]+)\]\s*([^\n\r]*)/g,"**$1**\n $2")),t=t.replace(/\\begin\{itemize\}/g,""),t=t.replace(/\\end\{itemize\}/g,""),t=t.replace(/\\begin\{enumerate\}/g,""),t=t.replace(/\\end\{enumerate\}/g,""),t=t.replace(/\\begin\{description\}/g,""),t=t.replace(/\\end\{description\}/g,""),t=t.replace(/\\item\s+/g,"- ");let a=1;const s=[];return t=t.replace(/\\footnote\{([^}]+)\}/g,(e,t)=>(s.push(`[^${a}]: ${t}`),`[^${a++}]`)),t=t.replace(/\\begin\{quote\}([\s\S]*?)\\end\{quote\}/g,(e,t)=>t.trim().split("\n").map(e=>e.trim()?`> ${e}`:">").join("\n")),t=t.replace(/``([^']+)''/g,'"$1"'),t=t.replace(/\\`([^']+)'/g,"'$1'"),t=t.replace(/\\begin\{verbatim\}/g,"```\n"),t=t.replace(/\\end\{verbatim\}/g,"\n```"),t=t.replace(/\\begin\{lstlisting\}(\[language=([^\]]+)\])?/g,"```$2\n"),t=t.replace(/\\end\{lstlisting\}/g,"\n```"),t=t.replace(/\\begin\{minted\}\{([^}]+)\}/g,"```$1\n"),t=t.replace(/\\end\{minted\}/g,"\n```"),t=t.replace(/\\tableofcontents/g,""),t=t.replace(/\\newpage/g,""),t=t.replace(/\\clearpage/g,""),t=t.replace(/\\bigskip/g,""),t=t.replace(/\\\\/g," "),t=t.replace(/^%.*$/gm,""),t=t.replace(/([^\\])%.*$/gm,"$1"),t=t.replace(/\\[a-zA-Z]+(\[[^\]]*\])?(\{[^}]*\})?/g,""),t=t.replace(/\n{3,}/g,"\n\n"),t=t.replace(/\s{2,}/g," "),s.length>0&&(t+="\n\n"+s.join("\n")),(o+t).trim()}}},902:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PandocWasm=void 0,t.PandocWasm=class{constructor(e,t={}){this.pandocWasm=e,this.options={timeout:1e4,verbose:!1,...t}}async convert(e,t,n){if(!this.pandocWasm)throw new Error("Pandoc WASM not initialized");try{this.options.verbose&&console.log(`Converting ${t} to ${n} using pandoc-wasm`);const r=new Promise((e,t)=>{setTimeout(()=>{t(new Error(`Pandoc WASM conversion timed out after ${this.options.timeout}ms`))},this.options.timeout)});let i;if("function"==typeof this.pandocWasm.convert)i=Promise.resolve(this.pandocWasm.convert(e,t,n));else if("function"==typeof this.pandocWasm.pandoc)i=Promise.resolve(this.pandocWasm.pandoc(e,{from:t,to:n}));else{if("function"!=typeof this.pandocWasm.run)throw new Error("Unsupported pandoc-wasm API");{const r=["-f",t,"-t",n,"--wrap=none"];this.options.args&&r.push(...this.options.args),i=Promise.resolve(this.pandocWasm.run(r,e))}}return await Promise.race([i,r])}catch(e){throw new Error(`Pandoc WASM conversion failed: ${e.message}`)}}}},942:(e,t,n)=>{var r=n(388),i=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,o,a,s=e;for(a=new Array(s.length),t=0,n=s.length;t<n;t+=1){if(r=s[t],"[object Object]"!==i.call(r))return!1;if(1!==(o=Object.keys(r)).length)return!1;a[t]=[o[0],r[o[0]]]}return!0},construct:function(e){if(null===e)return[];var t,n,r,i,o,a=e;for(o=new Array(a.length),t=0,n=a.length;t<n;t+=1)r=a[t],i=Object.keys(r),o[t]=[i[0],r[i[0]]];return o}})},946:(e,t,n)=>{var r=n(388),i=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,a,s,l=[],c=e;for(t=0,n=c.length;t<n;t+=1){if(r=c[t],s=!1,"[object Object]"!==o.call(r))return!1;for(a in r)if(i.call(r,a)){if(s)return!1;s=!0}if(!s)return!1;if(-1!==l.indexOf(a))return!1;l.push(a)}return!0},construct:function(e){return null!==e?e:[]}})},989:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PandocNative=void 0;const r=n(660);t.PandocNative=class{constructor(e={}){this.options={timeout:1e4,verbose:!1,...e}}async convert(e,t,n){return new Promise((i,o)=>{const a=["-f",t,"-t",n,"--wrap=none"];this.options.args&&a.push(...this.options.args),this.options.verbose&&console.log(`Running pandoc with args: ${a.join(" ")}`);const s=(0,r.spawn)("pandoc",a);let l="",c="";const u=setTimeout(()=>{s.kill(),o(new Error(`Pandoc conversion timed out after ${this.options.timeout}ms`))},this.options.timeout);s.stdout.on("data",e=>{l+=e.toString()}),s.stderr.on("data",e=>{c+=e.toString()}),s.on("close",e=>{clearTimeout(u),0===e?i(l):o(new Error(`Pandoc failed with code ${e}: ${c}`))}),s.on("error",e=>{clearTimeout(u),o(new Error(`Failed to start pandoc: ${e.message}`))}),s.stdin.write(e),s.stdin.end()})}}}},r={};return function e(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={exports:{}};return n[t].call(o.exports,o,o.exports,e),o.exports}(148)})());
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("pandoc-wasm"),require("child_process")):"function"==typeof define&&define.amd?define("LegalMarkdown",["pandoc-wasm","child_process"],t):"object"==typeof exports?exports.LegalMarkdown=t(require("pandoc-wasm"),require("child_process")):e.LegalMarkdown=t(e["pandoc-wasm"],e.child_process)}(this,(e,t)=>(()=>{"use strict";var n={61:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_HELPER_NAMES=t.allHelpers=t.extensionHelpers=void 0,i(n(884),t),i(n(492),t),i(n(116),t);const o=n(884),a=n(492),s=n(116);t.extensionHelpers={addYears:o.addYears,addMonths:o.addMonths,addDays:o.addDays,formatDate:o.formatDate,DateFormats:o.DateFormats,formatInteger:a.formatInteger,formatPercent:a.formatPercent,formatCurrency:a.formatCurrency,formatEuro:a.formatEuro,formatDollar:a.formatDollar,formatPound:a.formatPound,numberToWords:a.numberToWords,round:a.round,capitalize:s.capitalize,capitalizeWords:s.capitalizeWords,upper:s.upper,lower:s.lower,titleCase:s.titleCase,kebabCase:s.kebabCase,snakeCase:s.snakeCase,camelCase:s.camelCase,pascalCase:s.pascalCase,truncate:s.truncate,clean:s.clean,pluralize:s.pluralize,padStart:s.padStart,padEnd:s.padEnd,contains:s.contains,replaceAll:s.replaceAll,initials:s.initials},t.allHelpers={...t.extensionHelpers},t.EXTENSION_HELPER_NAMES=["addYears","addMonths","addDays","formatDate","formatInteger","formatPercent","formatCurrency","formatEuro","formatDollar","formatPound","numberToWords","round","capitalize","capitalizeWords","upper","lower","titleCase","kebabCase","snakeCase","camelCase","pascalCase","truncate","clean","pluralize","padStart","padEnd","contains","replaceAll","initials"]},64:(e,t)=>{function n(e,t,n,a,s=0){if(e<1||e>6)return`l${e}. ${t}`;const l=function(e,t){let n;switch(e){case 1:n=t.levelOne;break;case 2:n=t.levelTwo;break;case 3:n=t.levelThree;break;case 4:n=t.levelFour;break;case 5:n=t.levelFive;break;case 6:n=t.levelSix;break;default:n="%n."}if("string"!=typeof n)switch(e){case 1:return"Article %n.";case 2:return"Section %n.";case 3:return"(%n)";case 4:return"(%n%c)";case 5:return"(%n%c%r)";case 6:return"Annex %r -";default:return"%n."}return n}(e,a);if("string"!=typeof l)return`l${e}. ${t}`;let c=l;const u=l.includes("%r.%n")||l.includes("%R.%n"),p=l.includes("%c.%n"),d=a.levelOne?.includes("%c")&&a.levelTwo?.includes("%c.%n");if(c=c.replace(/%0(\d+)n/g,(t,r)=>n[e-1].toString().padStart(parseInt(r),"0")),c=c.replace(/%0(\d+)s/g,(e,t)=>n[0].toString().padStart(parseInt(t),"0")),c=c.replace(/%0(\d+)t/g,(e,t)=>n[1].toString().padStart(parseInt(t),"0")),c=c.replace(/%0(\d+)f/g,(e,t)=>n[2].toString().padStart(parseInt(t),"0")),c=c.replace(/%0(\d+)i/g,(e,t)=>n[3].toString().padStart(parseInt(t),"0")),4===e)!c.includes("%n%c")||c.includes(".%s")||c.includes(".%t")||c.includes(".%f")||(c=c.replace(/%n/g,n[2].toString()),c=c.replace(/%c/g,r(n[3])));else if(5===e&&(c.includes("%c%r")||c.includes("%n%c%r"))){c=c.replace(/%n/g,n[2].toString()),c=c.replace(/%c/g,r(n[3]));const e=!0;c=c.replace(/%r/g,i(n[4],e))}const f="string"==typeof a.levelThree&&a.levelThree.includes("%n.%s.%t")||"string"==typeof a.levelFour&&a.levelFour.includes("%n.%s.%t.%f")||"string"==typeof a.levelFive&&a.levelFive.includes("%n.%s.%t.%f.%i"),g=(c.includes(".%s.%t")||c.includes(".%t.%f")||c.includes(".%f.%i")||c.includes(".%s")&&f)&&!c.includes("%r.")&&!c.includes("%R.")&&!c.includes("%c.");c=g?c.replace(/%n/g,n[0].toString()):c.replace(/%n/g,n[e-1].toString()),c=g?c.replace(/%s/g,n[1].toString()):c.replace(/%s/g,n[0].toString()),c=c.replace(/%t/g,n[2].toString()),c=c.replace(/%f/g,n[3].toString()),c=c.replace(/%i/g,n[4].toString()),p&&e>1||d&&e>1?c=c.replace(/%c/g,r(n[0])):(e<=3||e>=4&&c.includes("%c"))&&(c=c.replace(/%c/g,r(n[e-1]))),u&&e>1?c=c.replace(/%r/g,i(n[0],!0)):(e<=3||e>=4&&c.includes("%r"))&&(c=c.replace(/%r/g,i(n[e-1],!0))),l.includes("%R.%n")&&e>1?c=c.replace(/%R/g,i(n[0],!1)):(e<=3||e>=4&&c.includes("%R"))&&(c=c.replace(/%R/g,i(n[e-1],!1)));const h=a.noIndent?"":" ".repeat(Math.floor((e-1)*(a.levelIndent||1.5)*2));return a.enableFieldTrackingInMarkdown?`${h}<span class="${["legal-header",`legal-header-level-${e}`,o(e)].join(" ")}" data-level="${e}" data-number="${n[e-1]}">${c} ${t}</span>`:`${h}${c} ${t}`}function r(e){if(e<=0)return"";let t="",n=e;for(;n>0;){const e=(n-1)%26;t=String.fromCharCode(97+e)+t,n=Math.floor((n-1)/26)}return t}function i(e,t=!1){if(e<=0)return"";const n=[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}];let r="",i=e;for(const{value:e,numeral:t}of n)for(;i>=e;)r+=t,i-=e;return t?r.toLowerCase():r}function o(e){switch(e){case 1:return"legal-article";case 2:return"legal-section";case 3:return"legal-subsection";case 4:return"legal-sub-subsection";case 5:return"legal-paragraph";case 6:return"legal-annex";default:return"legal-header-unknown"}}Object.defineProperty(t,"__esModule",{value:!0}),t.processHeaders=function(e,t,r={}){const i=function(e,t={}){return{levelOne:e["level-one"]||"Article %n.",levelTwo:e["level-two"]||"Section %n.",levelThree:e["level-three"]||"(%n)",levelFour:e["level-four"]||"(%n%c)",levelFive:e["level-five"]||"(%n%c%r)",levelSix:e["level-six"]||"Annex %r -",levelIndent:parseFloat(e["level-indent"]||"1.5"),noReset:t.noReset||e["no-reset"]||!1,noIndent:t.noIndent||e["no-indent"]||!1,enableFieldTrackingInMarkdown:t.enableFieldTrackingInMarkdown||!1}}(t,r),o=/^(l+)\.\s+(.*?)$/gm,a=/^l(\d+)\.\s+(.*?)$/gm,s=[0,0,0,0,0,0],l=[];let c;const u=e.slice();for(o.lastIndex=0;null!==(c=o.exec(u));)l.push({match:c[0],level:c[1].length,text:c[2],index:c.index});for(a.lastIndex=0;null!==(c=a.exec(u));)l.push({match:c[0],level:parseInt(c[1],10),text:c[2],index:c.index});l.sort((e,t)=>e.index-t.index);let p=e,d=0,f=0;for(const e of l){const t=e.level;if(5===t)5===f?s[4]++:s[4]=1;else{for(let e=f;e<t-1;e++)0===s[e]&&(s[e]=1);if(s[t-1]++,!i.noReset)for(let e=t;e<s.length;e++)s[e]=0}const r=n(t,e.text,[...s],i,f),o=e.index+d,a=o+e.match.length;p=p.substring(0,o)+r+p.substring(a),d+=r.length-e.match.length,f=t}return p}},70:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.processCrossReferences=function(e,t){const n=function(e,t){const n=[],r=e.split("\n"),i={level1:0,level2:0,level3:0},o={level1:t["level-one"]||"Article %n.",level2:t["level-two"]||"Section %n.",level3:t["level-three"]||"(%n)"};for(const e of r){const t=e.trim().match(/^(l{1,3})\.\s+(.+?)\s+\|(\w+)\|$/);if(t){const[,e,r,a]=t,s=e.length;let l,c;1===s?(i.level1++,i.level2=0,i.level3=0):2===s?(i.level2++,i.level3=0):3===s&&i.level3++,1===s?(l=o.level1.replace(/%n/g,i.level1.toString()),c=`${l} ${r}`):2===s?(l=o.level2.replace(/%n/g,i.level2.toString()),c=`${l} ${r}`):(l=o.level3.replace(/%n/g,i.level3.toString()),c=`${l} ${r}`),n.push({key:a,sectionNumber:l.trim(),sectionText:c.trim()})}}return n}(e,t);return t._cross_references=n.map(e=>({key:e.key,sectionNumber:e.sectionNumber,sectionText:e.sectionText})),0===n.length&&(t._cross_references=[]),function(e,t,n){const r=new Map;for(const e of t)r.set(e.key,e.sectionNumber);const i=e.split("\n").map(e=>e.trim().match(/^(l{1,3})\.\s+(.+?)\s+\|(\w+)\|$/)?e:e.replace(/\|([^|]+)\|/g,(e,t)=>{const i=t.trim(),o=r.get(i);if(o)return o;const a=function(e,t){const n=t.split(".");let r=e;for(const e of n){if(null==r)return;r=r[e]}return r}(n,i);return void 0!==a?function(e,t,n){if(void 0===e)return"";if(null===e)return"null";if(e instanceof Date)return e.toISOString().split("T")[0];if("number"==typeof e&&t.includes("amount")){const t=n.payment_currency||"USD";return new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e)}return String(e)}(a,i,n):e}));return i.join("\n")}(e,n,t)}},83:(e,t,n)=>{var r=n(433);function i(e,t,n,r,i){var o="",a="",s=Math.floor(i/2)-1;return r-t>s&&(t=r-s+(o=" ... ").length),n-r>s&&(n=r+s-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:r-t+o.length}}function o(e,t){return r.repeat(" ",t-e.length)+e}e.exports=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n,a=/\r?\n|\r|\0/g,s=[0],l=[],c=-1;n=a.exec(e.buffer);)l.push(n.index),s.push(n.index+n[0].length),e.position<=n.index&&c<0&&(c=s.length-2);c<0&&(c=s.length-1);var u,p,d="",f=Math.min(e.line+t.linesAfter,l.length).toString().length,g=t.maxLength-(t.indent+f+3);for(u=1;u<=t.linesBefore&&!(c-u<0);u++)p=i(e.buffer,s[c-u],l[c-u],e.position-(s[c]-s[c-u]),g),d=r.repeat(" ",t.indent)+o((e.line-u+1).toString(),f)+" | "+p.str+"\n"+d;for(p=i(e.buffer,s[c],l[c],e.position,g),d+=r.repeat(" ",t.indent)+o((e.line+1).toString(),f)+" | "+p.str+"\n",d+=r.repeat("-",t.indent+f+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(c+u>=l.length);u++)p=i(e.buffer,s[c+u],l[c+u],e.position-(s[c]-s[c+u]),g),d+=r.repeat(" ",t.indent)+o((e.line+u+1).toString(),f)+" | "+p.str+"\n";return d.replace(/\n$/,"")}},116:(e,t)=>{function n(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}function r(e){return e?e.split(/[\s-_]+/).map((e,t)=>0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(""):""}Object.defineProperty(t,"__esModule",{value:!0}),t.capitalize=n,t.capitalizeWords=function(e){return e?e.split(" ").map(e=>n(e)).join(" "):""},t.upper=function(e){return e?e.toUpperCase():""},t.lower=function(e){return e?e.toLowerCase():""},t.titleCase=function(e){if(!e)return"";const t=new Set(["a","an","and","as","at","but","by","for","if","in","nor","of","on","or","so","the","to","up","yet"]);return e.split(" ").map((r,i)=>{const o=r.toLowerCase();return 0===i||i===e.split(" ").length-1?n(r):t.has(o)?o:n(r)}).join(" ")},t.kebabCase=function(e){return e?e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase():""},t.snakeCase=function(e){return e?e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase():""},t.camelCase=r,t.pascalCase=function(e){if(!e)return"";const t=r(e);return t.charAt(0).toUpperCase()+t.slice(1)},t.truncate=function(e,t,n="..."){return e?e.length<=t?e:e.slice(0,t-n.length)+n:""},t.clean=function(e){return e?e.replace(/\s+/g," ").trim():""},t.pluralize=function(e,t,n){if(1===t)return e;if(n)return n;const r=[[/s$/i,"s"],[/([^aeiou])y$/i,"$1ies"],[/(x|z|s|sh|ch)$/i,"$1es"],[/$/i,"s"]];for(const[t,n]of r)if(t.test(e))return e.replace(t,n);return e+"s"},t.padStart=function(e,t,n=" "){return e?e.padStart(t,n):n.repeat(t)},t.padEnd=function(e,t,n=" "){return e?e.padEnd(t,n):n.repeat(t)},t.contains=function(e,t,n=!1){return!(!e||!t)&&(n?e.includes(t):e.toLowerCase().includes(t.toLowerCase()))},t.replaceAll=function(e,t,n){return e?e.split(t).join(n):""},t.initials=function(e){return e?e.split(" ").map(e=>e.charAt(0).toUpperCase()).join(""):""}},119:(e,t,n)=>{var r=n(231),i=n(388);function o(e,t){var n=[];return e[t].forEach(function(e){var t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}function a(e){return this.extend(e)}a.prototype.extend=function(e){var t=[],n=[];if(e instanceof i)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach(function(e){if(!(e instanceof i))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(e){if(!(e instanceof i))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(a.prototype);return s.implicit=(this.implicit||[]).concat(t),s.explicit=(this.explicit||[]).concat(n),s.compiledImplicit=o(s,"implicit"),s.compiledExplicit=o(s,"explicit"),s.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function r(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(r);return n}(s.compiledImplicit,s.compiledExplicit),s},e.exports=a},127:(e,t,n)=>{var r=n(388),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==i.exec(e)||null!==o.exec(e))},construct:function(e){var t,n,r,a,s,l,c,u,p=0,d=null;if(null===(t=i.exec(e))&&(t=o.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,r,a));if(s=+t[4],l=+t[5],c=+t[6],t[7]){for(p=t[7].slice(0,3);p.length<3;)p+="0";p=+p}return t[9]&&(d=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(d=-d)),u=new Date(Date.UTC(n,r,a,s,l,c,p)),d&&u.setTime(u.getTime()-d),u},instanceOf:Date,represent:function(e){return e.toISOString()}})},148:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LegalMarkdown=void 0,t.processLegalMarkdown=d;const r=n(176),i=n(64),o=n(576),a=n(70),s=n(294);let l,c;try{const e=n(480);l=e.convertRstToLegalMarkdownSync}catch(e){l=e=>e}try{const e=n(811);c=e.convertLatexToLegalMarkdownSync}catch(e){c=e=>e}const u=n(260),p=n(628);function d(e,t={}){t.debug?(p.logger.setDebugEnabled(!0),p.logger.debug("Debug mode enabled for Legal Markdown processing",{options:t})):p.logger.setDebugEnabled(!1),u.fieldTracker.clear();let n=l(e);n=c(n);const{content:d,metadata:f}=(0,r.parseYamlFrontMatter)(n,t.throwOnYamlError);if(p.logger.debug("YAML front matter parsed",{metadata:f,yamlVariables:Object.keys(f||{}).length}),t.yamlOnly)return p.logger.debug("YAML-only processing mode: returning content without variable substitution"),{content:d,metadata:f};let g=d;p.logger.debug("Starting content processing",{contentLength:g.length}),t.noClauses?p.logger.debug("Skipping optional clauses processing"):(p.logger.debug("Processing optional clauses"),g=(0,o.processOptionalClauses)(g,f)),t.noReferences?p.logger.debug("Skipping cross references processing"):(p.logger.debug("Processing cross references"),g=(0,a.processCrossReferences)(g,f)),t.noMixins?p.logger.debug("Skipping mixins processing"):(p.logger.debug("Processing mixins and template variables"),g=(0,s.processMixins)(g,f,t)),t.noHeaders?p.logger.debug("Skipping headers processing"):(p.logger.debug("Processing headers and numbering"),g=(0,i.processHeaders)(g,f,{noReset:t.noReset,noIndent:t.noIndent,enableFieldTrackingInMarkdown:t.enableFieldTrackingInMarkdown})),t.enableFieldTracking&&(p.logger.debug("Applying field tracking to content"),g=u.fieldTracker.applyFieldTracking(g));const h=t.enableFieldTracking?u.fieldTracker.generateReport():void 0;return p.logger.debug("Legal Markdown processing completed",{outputLength:g.length,fieldsTracked:h?.total||0,yamlVariables:Object.keys(f||{}).length}),{content:g,metadata:f,fieldReport:h}}t.LegalMarkdown={processLegalMarkdown:d},"undefined"!=typeof window&&(window.LegalMarkdown=t.LegalMarkdown)},162:t=>{t.exports=e},176:function(e,t,n){var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),a=0;a<n.length;a++)"default"!==n[a]&&i(t,e,n[a]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.parseYamlFrontMatter=function(e,t=!1){const n={content:e,metadata:{}};if(!e.startsWith("---"))return n;const r=e.indexOf("---",3);if(-1===r)return n;let i=e.substring(3,r).trim();const o=e.substring(r+3).trim();i=function(e){return e.replace(/@today(?:\[([^\]]+)\])?/g,(e,t)=>{const n=t||"YYYY-MM-DD",r=function(e,t){try{switch(t.toLowerCase()){case"iso":case"yyyy-mm-dd":default:return e.toISOString().split("T")[0];case"long":return e.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});case"medium":return e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});case"short":return e.toLocaleDateString("en-US",{year:"2-digit",month:"short",day:"numeric"})}}catch(t){return e.toISOString().split("T")[0]}}(new Date,n);return`"${r}"`})}(i);try{const e=s.load(i);return e&&"object"==typeof e?{content:o,metadata:e}:{content:o,metadata:{}}}catch(e){if(t)throw new Error(`Invalid YAML Front Matter: ${e instanceof Error?e.message:"Unknown error"}`);return n}},t.serializeToYaml=function(e){try{return s.dump(e)}catch(e){return console.error("Error serializing metadata to YAML:",e),""}},t.extractMetadataOutputConfig=function(e){return{yamlOutput:e["meta-yaml-output"],jsonOutput:e["meta-json-output"],outputPath:e["meta-output-path"],includeOriginal:e["meta-include-original"]}};const s=a(n(210))},184:(e,t,n)=>{e.exports=n(759).extend({implicit:[n(198),n(199),n(466),n(461)]})},198:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})},199:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},210:(e,t,n)=>{var r=n(243),i=n(781);function o(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}e.exports.Type=n(388),e.exports.Schema=n(119),e.exports.FAILSAFE_SCHEMA=n(759),e.exports.JSON_SCHEMA=n(184),e.exports.CORE_SCHEMA=n(769),e.exports.DEFAULT_SCHEMA=n(489),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=i.dump,e.exports.YAMLException=n(231),e.exports.types={binary:n(342),float:n(461),map:n(369),null:n(198),pairs:n(942),set:n(663),timestamp:n(127),bool:n(199),int:n(466),merge:n(851),omap:n(946),seq:n(636),str:n(212)},e.exports.safeLoad=o("safeLoad","load"),e.exports.safeLoadAll=o("safeLoadAll","loadAll"),e.exports.safeDump=o("safeDump","dump")},212:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},231:e=>{function t(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),r+" "+n):r}function n(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(e){return this.name+": "+t(this,e)},e.exports=n},243:(e,t,n)=>{var r=n(433),i=n(231),o=n(83),a=n(489),s=Object.prototype.hasOwnProperty,l=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=/[\x85\u2028\u2029]/,u=/[,\[\]\{\}]/,p=/^(?:!|!!|![a-z\-]+!)$/i,d=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function f(e){return Object.prototype.toString.call(e)}function g(e){return 10===e||13===e}function h(e){return 9===e||32===e}function m(e){return 9===e||32===e||10===e||13===e}function v(e){return 44===e||91===e||93===e||123===e||125===e}function b(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function y(e){return 120===e?2:117===e?4:85===e?8:0}function w(e){return 48<=e&&e<=57?e-48:-1}function x(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function k(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var A=new Array(256),M=new Array(256),S=0;S<256;S++)A[S]=x(S)?1:0,M[S]=x(S);function $(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||a,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function C(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=o(n),new i(t,n)}function O(e,t){throw C(e,t)}function F(e,t){e.onWarning&&e.onWarning.call(null,C(e,t))}var I={YAML:function(e,t,n){var r,i,o;null!==e.version&&O(e,"duplication of %YAML directive"),1!==n.length&&O(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&O(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&O(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&F(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&O(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],p.test(r)||O(e,"ill-formed tag handle (first argument) of the TAG directive"),s.call(e.tagMap,r)&&O(e,'there is a previously declared suffix for "'+r+'" tag handle'),d.test(i)||O(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(t){O(e,"tag prefix is malformed: "+i)}e.tagMap[r]=i}};function L(e,t,n,r){var i,o,a,s;if(t<n){if(s=e.input.slice(t,n),r)for(i=0,o=s.length;i<o;i+=1)9===(a=s.charCodeAt(i))||32<=a&&a<=1114111||O(e,"expected valid JSON character");else l.test(s)&&O(e,"the stream contains non-printable characters");e.result+=s}}function T(e,t,n,i){var o,a,l,c;for(r.isObject(n)||O(e,"cannot merge mappings; the provided source object is unacceptable"),l=0,c=(o=Object.keys(n)).length;l<c;l+=1)a=o[l],s.call(t,a)||(t[a]=n[a],i[a]=!0)}function j(e,t,n,r,i,o,a,l,c){var u,p;if(Array.isArray(i))for(u=0,p=(i=Array.prototype.slice.call(i)).length;u<p;u+=1)Array.isArray(i[u])&&O(e,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===f(i[u])&&(i[u]="[object Object]");if("object"==typeof i&&"[object Object]"===f(i)&&(i="[object Object]"),i=String(i),null===t&&(t={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(o))for(u=0,p=o.length;u<p;u+=1)T(e,t,o[u],n);else T(e,t,o,n);else e.json||s.call(n,i)||!s.call(t,i)||(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=c||e.position,O(e,"duplicated mapping key")),"__proto__"===i?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[i]=o,delete n[i];return t}function _(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):O(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function P(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);0!==i;){for(;h(i);)9===i&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&35===i)do{i=e.input.charCodeAt(++e.position)}while(10!==i&&13!==i&&0!==i);if(!g(i))break;for(_(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position)}return-1!==n&&0!==r&&e.lineIndent<n&&F(e,"deficient indentation"),r}function E(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!m(t)))}function N(e,t){1===t?e.result+=" ":t>1&&(e.result+=r.repeat("\n",t-1))}function D(e,t){var n,r,i=e.tag,o=e.anchor,a=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),r=e.input.charCodeAt(e.position);0!==r&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,O(e,"tab characters must not be used in indentation")),45===r)&&m(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,P(e,!0,-1)&&e.lineIndent<=t)a.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,R(e,t,3,!1,!0),a.push(e.result),P(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)O(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=i,e.anchor=o,e.kind="sequence",e.result=a,!0)}function Y(e){var t,n,r,i,o=!1,a=!1;if(33!==(i=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&O(e,"duplication of a tag property"),60===(i=e.input.charCodeAt(++e.position))?(o=!0,i=e.input.charCodeAt(++e.position)):33===i?(a=!0,n="!!",i=e.input.charCodeAt(++e.position)):n="!",t=e.position,o){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&62!==i);e.position<e.length?(r=e.input.slice(t,e.position),i=e.input.charCodeAt(++e.position)):O(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!m(i);)33===i&&(a?O(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),p.test(n)||O(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),i=e.input.charCodeAt(++e.position);r=e.input.slice(t,e.position),u.test(r)&&O(e,"tag suffix cannot contain flow indicator characters")}r&&!d.test(r)&&O(e,"tag name cannot contain such characters: "+r);try{r=decodeURIComponent(r)}catch(t){O(e,"tag name is malformed: "+r)}return o?e.tag=r:s.call(e.tagMap,n)?e.tag=e.tagMap[n]+r:"!"===n?e.tag="!"+r:"!!"===n?e.tag="tag:yaml.org,2002:"+r:O(e,'undeclared tag handle "'+n+'"'),!0}function W(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&O(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!m(n)&&!v(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&O(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function R(e,t,n,i,o){var a,l,c,u,p,d,f,x,S,$=1,C=!1,F=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=l=c=4===n||3===n,i&&P(e,!0,-1)&&(C=!0,e.lineIndent>t?$=1:e.lineIndent===t?$=0:e.lineIndent<t&&($=-1)),1===$)for(;Y(e)||W(e);)P(e,!0,-1)?(C=!0,c=a,e.lineIndent>t?$=1:e.lineIndent===t?$=0:e.lineIndent<t&&($=-1)):c=!1;if(c&&(c=C||o),1!==$&&4!==n||(x=1===n||2===n?t:t+1,S=e.position-e.lineStart,1===$?c&&(D(e,S)||function(e,t,n){var r,i,o,a,s,l,c,u=e.tag,p=e.anchor,d={},f=Object.create(null),g=null,v=null,b=null,y=!1,w=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=d),c=e.input.charCodeAt(e.position);0!==c;){if(y||-1===e.firstTabInLine||(e.position=e.firstTabInLine,O(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),o=e.line,63!==c&&58!==c||!m(r)){if(a=e.line,s=e.lineStart,l=e.position,!R(e,n,2,!1,!0))break;if(e.line===o){for(c=e.input.charCodeAt(e.position);h(c);)c=e.input.charCodeAt(++e.position);if(58===c)m(c=e.input.charCodeAt(++e.position))||O(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(j(e,d,f,g,v,null,a,s,l),g=v=b=null),w=!0,y=!1,i=!1,g=e.tag,v=e.result;else{if(!w)return e.tag=u,e.anchor=p,!0;O(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!w)return e.tag=u,e.anchor=p,!0;O(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(j(e,d,f,g,v,null,a,s,l),g=v=b=null),w=!0,y=!0,i=!0):y?(y=!1,i=!0):O(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=r;if((e.line===o||e.lineIndent>t)&&(y&&(a=e.line,s=e.lineStart,l=e.position),R(e,t,4,!0,i)&&(y?v=e.result:b=e.result),y||(j(e,d,f,g,v,b,a,s,l),g=v=b=null),P(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==c)O(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&j(e,d,f,g,v,null,a,s,l),w&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=d),w}(e,S,x))||function(e,t){var n,r,i,o,a,s,l,c,u,p,d,f,g=!0,h=e.tag,v=e.anchor,b=Object.create(null);if(91===(f=e.input.charCodeAt(e.position)))a=93,c=!1,o=[];else{if(123!==f)return!1;a=125,c=!0,o={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),f=e.input.charCodeAt(++e.position);0!==f;){if(P(e,!0,t),(f=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=h,e.anchor=v,e.kind=c?"mapping":"sequence",e.result=o,!0;g?44===f&&O(e,"expected the node content, but found ','"):O(e,"missed comma between flow collection entries"),d=null,s=l=!1,63===f&&m(e.input.charCodeAt(e.position+1))&&(s=l=!0,e.position++,P(e,!0,t)),n=e.line,r=e.lineStart,i=e.position,R(e,t,1,!1,!0),p=e.tag,u=e.result,P(e,!0,t),f=e.input.charCodeAt(e.position),!l&&e.line!==n||58!==f||(s=!0,f=e.input.charCodeAt(++e.position),P(e,!0,t),R(e,t,1,!1,!0),d=e.result),c?j(e,o,b,p,u,d,n,r,i):s?o.push(j(e,null,b,p,u,d,n,r,i)):o.push(u),P(e,!0,t),44===(f=e.input.charCodeAt(e.position))?(g=!0,f=e.input.charCodeAt(++e.position)):g=!1}O(e,"unexpected end of the stream within a flow collection")}(e,x)?F=!0:(l&&function(e,t){var n,i,o,a,s=1,l=!1,c=!1,u=t,p=0,d=!1;if(124===(a=e.input.charCodeAt(e.position)))i=!1;else{if(62!==a)return!1;i=!0}for(e.kind="scalar",e.result="";0!==a;)if(43===(a=e.input.charCodeAt(++e.position))||45===a)1===s?s=43===a?3:2:O(e,"repeat of a chomping mode identifier");else{if(!((o=w(a))>=0))break;0===o?O(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?O(e,"repeat of an indentation width identifier"):(u=t+o-1,c=!0)}if(h(a)){do{a=e.input.charCodeAt(++e.position)}while(h(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!g(a)&&0!==a)}for(;0!==a;){for(_(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!c||e.lineIndent<u)&&32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>u&&(u=e.lineIndent),g(a))p++;else{if(e.lineIndent<u){3===s?e.result+=r.repeat("\n",l?1+p:p):1===s&&l&&(e.result+="\n");break}for(i?h(a)?(d=!0,e.result+=r.repeat("\n",l?1+p:p)):d?(d=!1,e.result+=r.repeat("\n",p+1)):0===p?l&&(e.result+=" "):e.result+=r.repeat("\n",p):e.result+=r.repeat("\n",l?1+p:p),l=!0,c=!0,p=0,n=e.position;!g(a)&&0!==a;)a=e.input.charCodeAt(++e.position);L(e,n,e.position,!1)}}return!0}(e,x)||function(e,t){var n,r,i;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(L(e,r,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;r=e.position,e.position++,i=e.position}else g(n)?(L(e,r,i,!0),N(e,P(e,!1,t)),r=i=e.position):e.position===e.lineStart&&E(e)?O(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);O(e,"unexpected end of the stream within a single quoted scalar")}(e,x)||function(e,t){var n,r,i,o,a,s;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return L(e,n,e.position,!0),e.position++,!0;if(92===s){if(L(e,n,e.position,!0),g(s=e.input.charCodeAt(++e.position)))P(e,!1,t);else if(s<256&&A[s])e.result+=M[s],e.position++;else if((a=y(s))>0){for(i=a,o=0;i>0;i--)(a=b(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:O(e,"expected hexadecimal character");e.result+=k(o),e.position++}else O(e,"unknown escape sequence");n=r=e.position}else g(s)?(L(e,n,r,!0),N(e,P(e,!1,t)),n=r=e.position):e.position===e.lineStart&&E(e)?O(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}O(e,"unexpected end of the stream within a double quoted scalar")}(e,x)?F=!0:function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!m(r)&&!v(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&O(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),s.call(e.anchorMap,n)||O(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],P(e,!0,-1),!0}(e)?(F=!0,null===e.tag&&null===e.anchor||O(e,"alias node should not have any properties")):function(e,t,n){var r,i,o,a,s,l,c,u,p=e.kind,d=e.result;if(m(u=e.input.charCodeAt(e.position))||v(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(m(r=e.input.charCodeAt(e.position+1))||n&&v(r)))return!1;for(e.kind="scalar",e.result="",i=o=e.position,a=!1;0!==u;){if(58===u){if(m(r=e.input.charCodeAt(e.position+1))||n&&v(r))break}else if(35===u){if(m(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&E(e)||n&&v(u))break;if(g(u)){if(s=e.line,l=e.lineStart,c=e.lineIndent,P(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=l,e.lineIndent=c;break}}a&&(L(e,i,o,!1),N(e,e.line-s),i=o=e.position,a=!1),h(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return L(e,i,o,!1),!!e.result||(e.kind=p,e.result=d,!1)}(e,x,1===n)&&(F=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===$&&(F=c&&D(e,S))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&O(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,p=e.implicitTypes.length;u<p;u+=1)if((f=e.implicitTypes[u]).resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(s.call(e.typeMap[e.kind||"fallback"],e.tag))f=e.typeMap[e.kind||"fallback"][e.tag];else for(f=null,u=0,p=(d=e.typeMap.multi[e.kind||"fallback"]).length;u<p;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){f=d[u];break}f||O(e,"unknown tag !<"+e.tag+">"),null!==e.result&&f.kind!==e.kind&&O(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):O(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||F}function U(e){var t,n,r,i,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(P(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(a=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!m(i);)i=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&O(e,"directive name must not be less than one character in length");0!==i;){for(;h(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!g(i));break}if(g(i))break;for(t=e.position;0!==i&&!m(i);)i=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==i&&_(e),s.call(I,n)?I[n](e,n,r):F(e,'unknown document directive "'+n+'"')}P(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,P(e,!0,-1)):a&&O(e,"directives end mark is expected"),R(e,e.lineIndent-1,4,!1,!0),P(e,!0,-1),e.checkLineBreaks&&c.test(e.input.slice(o,e.position))&&F(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&E(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,P(e,!0,-1)):e.position<e.length-1&&O(e,"end of the stream or a document separator is expected")}function q(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new $(e,t),r=e.indexOf("\0");for(-1!==r&&(n.position=r,O(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)U(n);return n.documents}e.exports.loadAll=function(e,t,n){null!==t&&"object"==typeof t&&void 0===n&&(n=t,t=null);var r=q(e,n);if("function"!=typeof t)return r;for(var i=0,o=r.length;i<o;i+=1)t(r[i])},e.exports.load=function(e,t){var n=q(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new i("expected a single document in the stream, but found more")}}},260:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fieldTracker=t.FieldTracker=t.FieldStatus=void 0;const r=n(628),i=n(370);Object.defineProperty(t,"FieldStatus",{enumerable:!0,get:function(){return i.FieldStatus}});class o{constructor(){this.fields=new Map,this.processedContent=""}trackField(e,t){const{value:n,originalValue:o,hasLogic:a=!1,mixinUsed:s}=t;let l;l=a||s&&["conditional","helper","loop"].includes(s)?i.FieldStatus.LOGIC:null==n||""===n?i.FieldStatus.EMPTY:i.FieldStatus.FILLED;const c={name:e,status:l,value:n,originalValue:o,hasLogic:a,mixinUsed:s};this.fields.set(e,c),r.logger.debug("Field tracked",{fieldName:e,status:l,hasLogic:a})}applyFieldTracking(e){let t=e;return this.fields.forEach((e,n)=>{const r=this.getFieldCssClass(e.status),i=new RegExp(`\\{\\{\\s*${n}\\s*\\}\\}`,"g");if(void 0!==e.value&&null!==e.value&&""!==e.value){const i=new RegExp(`(?<!<span[^>]*>)${this.escapeRegex(String(e.value))}(?!</span>)`,"g");t=t.replace(i,e=>`<span class="${r}" data-field="${n}">${e}</span>`)}else t=t.replace(i,e=>`<span class="${r}" data-field="${n}">[${n}]</span>`)}),this.processedContent=t,t}getFieldCssClass(e){switch(e){case i.FieldStatus.FILLED:return"imported-value";case i.FieldStatus.EMPTY:return"missing-value";case i.FieldStatus.LOGIC:return"highlight";default:return""}}escapeRegex(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}getFields(){return new Map(this.fields)}getFieldsByStatus(e){return Array.from(this.fields.values()).filter(t=>t.status===e)}generateReport(){const e=Array.from(this.fields.values());return{total:e.length,filled:e.filter(e=>e.status===i.FieldStatus.FILLED).length,empty:e.filter(e=>e.status===i.FieldStatus.EMPTY).length,logic:e.filter(e=>e.status===i.FieldStatus.LOGIC).length,fields:e}}clear(){this.fields.clear(),this.processedContent=""}}t.FieldTracker=o,t.fieldTracker=new o},294:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.processMixins=function(e,t,n={}){if(n.noMixins)return e;const s=/\{\{([^}]+)\}\}/g;function l(e,t){return"."===t?e?.["."]:t.split(".").reduce((e,t)=>{const n=t.match(/^(\w+)\[(\d+)\]$/);if(n){const[,t,r]=n;return e?.[t]?.[parseInt(r,10)]}return e?.[t]},e)}function c(e,t){try{const n=e.match(/^(\w+)\((.*)\)$/);if(!n)return;const[,r,o]=n,a=i.extensionHelpers[r];if(!a||"function"!=typeof a)return;const s=function(e,t){if(!e.trim())return[];const n=[];let r="",i=!1,o="",a=0;for(let s=0;s<e.length;s++){const l=e[s];i||'"'!==l&&"'"!==l?i&&l===o?(i=!1,o="",r+=l):i||"("!==l?i||")"!==l?i||","!==l||0!==a?r+=l:(n.push(u(r.trim(),t)),r=""):(a--,r+=l):(a++,r+=l):(i=!0,o=l,r+=l)}return r.trim()&&n.push(u(r.trim(),t)),n}(o,t);return a(...s)}catch(t){return void console.warn(`Error evaluating helper expression: ${e}`,t)}}function u(e,t){if(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))return e.slice(1,-1);if(/^-?\d+(\.\d+)?$/.test(e))return parseFloat(e);if("true"===e)return!0;if("false"===e)return!1;if("null"===e)return null;if("undefined"!==e){if("@today"===e)return new Date;if(e.includes("(")&&e.includes(")")){const n=c(e,t);if(void 0!==n)return n}return l(t,e)}}return function e(i,o=0){return o>10?i:i.replace(s,(i,u)=>{const p=u.trim();if(p.includes("(")&&p.includes(")")){const e=c(p,t);return void 0!==e?(r.fieldTracker.trackField(p,{value:e,hasLogic:!0,mixinUsed:"helper"}),n.enableFieldTrackingInMarkdown?`<span class="highlight"><span class="imported-value" data-field="${a(p)}">${String(e)}</span></span>`:String(e)):n.enableFieldTrackingInMarkdown?`<span class="highlight"><span class="missing-value" data-field="${a(p)}">[[${p}]]</span></span>`:`{{${p}}}`}if(p.includes("?")){const i=p.indexOf("?"),s=p.indexOf(":",i);if(-1!==s){const c=p.substring(0,i).trim(),u=p.substring(i+1,s).trim(),d=p.substring(s+1).trim(),f=l(t,c),g=f?u:d;if(r.fieldTracker.trackField(c,{value:f,hasLogic:!0,mixinUsed:"conditional"}),g){const t=e(g,o+1);return n.enableFieldTrackingInMarkdown?`<span class="highlight"><span class="imported-value" data-field="${a(p)}">${t}</span></span>`:t}}return n.enableFieldTrackingInMarkdown?`<span class="highlight"><span class="missing-value" data-field="${a(p)}">[[${p}]]</span></span>`:`{{${p}}}`}const d=l(t,p);if(null==d)return r.fieldTracker.trackField(p,{value:void 0,hasLogic:!1}),n.enableFieldTrackingInMarkdown?`<span class="missing-value" data-field="${a(p)}">[[${p}]]</span>`:`{{${p}}}`;r.fieldTracker.trackField(p,{value:d,hasLogic:!1});const f=String(d);if(s.test(f)){const t=e(f,o+1);return n.enableFieldTrackingInMarkdown?`<span class="imported-value" data-field="${a(p)}">${t}</span>`:t}return n.enableFieldTrackingInMarkdown?`<span class="imported-value" data-field="${a(p)}">${f}</span>`:f})}((0,o.processTemplateLoops)(e,t,void 0,n.enableFieldTrackingInMarkdown||!1))};const r=n(260),i=n(61),o=n(519);function a(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}},342:(e,t,n)=>{var r=n(388),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,o=e.length,a=i;for(n=0;n<o;n++)if(!((t=a.indexOf(e.charAt(n)))>64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,r=e.replace(/[\r\n=]/g,""),o=r.length,a=i,s=0,l=[];for(t=0;t<o;t++)t%4==0&&t&&(l.push(s>>16&255),l.push(s>>8&255),l.push(255&s)),s=s<<6|a.indexOf(r.charAt(t));return 0==(n=o%4*6)?(l.push(s>>16&255),l.push(s>>8&255),l.push(255&s)):18===n?(l.push(s>>10&255),l.push(s>>2&255)):12===n&&l.push(s>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,r="",o=0,a=e.length,s=i;for(t=0;t<a;t++)t%3==0&&t&&(r+=s[o>>18&63],r+=s[o>>12&63],r+=s[o>>6&63],r+=s[63&o]),o=(o<<8)+e[t];return 0==(n=a%3)?(r+=s[o>>18&63],r+=s[o>>12&63],r+=s[o>>6&63],r+=s[63&o]):2===n?(r+=s[o>>10&63],r+=s[o>>4&63],r+=s[o<<2&63],r+=s[64]):1===n&&(r+=s[o>>2&63],r+=s[o<<4&63],r+=s[64],r+=s[64]),r}})},369:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},370:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CoreFieldState=t.FieldStatus=void 0,function(e){e.FILLED="filled",e.EMPTY="empty",e.LOGIC="logic"}(n||(t.FieldStatus=n={})),t.CoreFieldState=class{constructor(){this._fields=new Map}get fields(){return this._fields}trackField(e,t){const{value:r,originalValue:i,hasLogic:o=!1,mixinUsed:a}=t;let s;s=o||a?n.LOGIC:null==r||""===r?n.EMPTY:n.FILLED;const l={name:e,status:s,value:r,originalValue:i,hasLogic:o,mixinUsed:a};this._fields.set(e,l)}getFields(){return new Map(this._fields)}getFieldsByStatus(e){return Array.from(this._fields.values()).filter(t=>t.status===e)}clear(){this._fields.clear()}generateReport(){const e=Array.from(this._fields.values());return{total:e.length,filled:e.filter(e=>e.status===n.FILLED).length,empty:e.filter(e=>e.status===n.EMPTY).length,logic:e.filter(e=>e.status===n.LOGIC).length,fields:e}}}},388:(e,t,n)=>{var r=n(231),i=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach(function(t){if(-1===i.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach(function(e){n[e].forEach(function(t){a[String(t)]=e})}),a),-1===o.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},433:e=>{function t(e){return null==e}e.exports.isNothing=t,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:t(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n<t;n+=1)r+=e;return r},e.exports.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},e.exports.extend=function(e,t){var n,r,i,o;if(t)for(n=0,r=(o=Object.keys(t)).length;n<r;n+=1)e[i=o[n]]=t[i];return e}},461:(e,t,n)=>{var r=n(433),i=n(388),o=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),a=/^[-+]?[0-9]+e/;e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},466:(e,t,n)=>{var r=n(433),i=n(388);function o(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function a(e){return 48<=e&&e<=55}function s(e){return 48<=e&&e<=57}e.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n=e.length,r=0,i=!1;if(!n)return!1;if("-"!==(t=e[r])&&"+"!==t||(t=e[++r]),"0"===t){if(r+1===n)return!0;if("b"===(t=e[++r])){for(r++;r<n;r++)if("_"!==(t=e[r])){if("0"!==t&&"1"!==t)return!1;i=!0}return i&&"_"!==t}if("x"===t){for(r++;r<n;r++)if("_"!==(t=e[r])){if(!o(e.charCodeAt(r)))return!1;i=!0}return i&&"_"!==t}if("o"===t){for(r++;r<n;r++)if("_"!==(t=e[r])){if(!a(e.charCodeAt(r)))return!1;i=!0}return i&&"_"!==t}}if("_"===t)return!1;for(;r<n;r++)if("_"!==(t=e[r])){if(!s(e.charCodeAt(r)))return!1;i=!0}return!(!i||"_"===t)},construct:function(e){var t,n=e,r=1;if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(t=n[0])&&"+"!==t||("-"===t&&(r=-1),t=(n=n.slice(1))[0]),"0"===n)return 0;if("0"===t){if("b"===n[1])return r*parseInt(n.slice(2),2);if("x"===n[1])return r*parseInt(n.slice(2),16);if("o"===n[1])return r*parseInt(n.slice(2),8)}return r*parseInt(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!r.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},480:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRestructuredText=a,t.parseRestructuredTextSync=s,t.isRestructuredText=l,t.convertRstToLegalMarkdown=async function(e){return l(e)?await a(e):e},t.convertRstToLegalMarkdownSync=function(e){return l(e)?s(e):e};const r=n(516),i=n(794),o=n(890);async function a(e){try{const t=await i.PandocFactory.createForContent(e);return t?(await t.convert(e,"rst","markdown")).replace(/\n{3,}/g,"\n\n").trim():o.FallbackParsers.convertRstBasic(e)}catch(t){return console.error("Error parsing RST:",t),o.FallbackParsers.convertRstBasic(e)}}function s(e){return o.FallbackParsers.convertRstBasic(e)}function l(e){return r.ContentDetector.needsRstParser(e)}},489:(e,t,n)=>{e.exports=n(769).extend({implicit:[n(127),n(851)],explicit:[n(342),n(946),n(942),n(663)]})},492:(e,t)=>{function n(e,t="EUR",n=2){const r="string"==typeof e?parseFloat(e):e;if(isNaN(r))return String(e);const i=r.toFixed(n).replace(/\B(?=(\d{3})+(?!\d))/g,","),o={EUR:"€",USD:"$",GBP:"£"}[t]||t;return"EUR"===t?`${i} ${o}`:`${o}${i}`}Object.defineProperty(t,"__esModule",{value:!0}),t.formatInteger=function(e,t=","){const n="string"==typeof e?parseFloat(e):e;return isNaN(n)?String(e):Math.floor(n).toString().replace(/\B(?=(\d{3})+(?!\d))/g,t)},t.formatPercent=function(e,t=2,n=!0){const r="string"==typeof e?parseFloat(e):e;if(isNaN(r))return String(e);const i=(100*r).toFixed(t);return n?`${i}%`:i},t.formatCurrency=n,t.formatEuro=function(e,t=2){return n(e,"EUR",t)},t.formatDollar=function(e,t=2){return n(e,"USD",t)},t.formatPound=function(e,t=2){return n(e,"GBP",t)},t.numberToWords=function e(t){const n="string"==typeof t?parseFloat(t):t;if(isNaN(n))return String(t);if(0===n)return"zero";const r=["","one","two","three","four","five","six","seven","eight","nine"],i=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"],o=["ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],a=e=>e>=1e6?a(Math.floor(e/1e6))+" million "+s(e%1e6):s(e),s=e=>e>=1e3?l(Math.floor(e/1e3))+" thousand "+l(e%1e3):l(e),l=e=>{let t="";if(e>99&&(t+=r[Math.floor(e/100)]+" hundred ",e%=100),e>19)t+=i[Math.floor(e/10)]+" ",e%=10;else if(e>9)return t+=o[e-10]+" ",t.trim();return e>0&&(t+=r[e]+" "),t.trim()};if(n<0)return"negative "+e(Math.abs(n));const c=Math.floor(n),u=Math.round(100*(n-c));let p=a(c);return u>0&&(p+=" and "+l(u)+" cents"),p.trim()},t.formatNumber=function(e,t=2,n=".",r=","){const i="string"==typeof e?parseFloat(e):e;if(isNaN(i))return String(e);const o=i.toFixed(t).split(".");return o[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,r),o.join(n)},t.round=function(e,t=0){const n="string"==typeof e?parseFloat(e):e;if(isNaN(n))return 0;const r=Math.pow(10,t);return Math.round(n*r)/r}},509:function(e,t,n){var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),a=0;a<n.length;a++)"default"!==n[a]&&i(t,e,n[a]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.PandocLoader=void 0;const s=n(516);class l{static async loadIfNeeded(e){if(!s.ContentDetector.needsPandoc(e))return!1;if("undefined"==typeof window)return!0;if(this.pandocWasm)return!0;if(this.loadingPromise)try{return await this.loadingPromise,null!==this.pandocWasm}catch(e){return!1}this.loadingPromise=this.loadPandocWasm();try{return this.pandocWasm=await this.loadingPromise,!0}catch(e){return console.warn("Failed to load pandoc-wasm:",e),!1}finally{this.loadingPromise=null}}static getPandocWasm(){return this.pandocWasm}static async loadPandocWasm(){try{const e=await Promise.resolve().then(()=>a(n(162)));return"function"==typeof e.init?await e.init():"function"==typeof e.default?await e.default():"object"==typeof e.default&&e.default.convert?e.default:e}catch(e){throw new Error(`Failed to load pandoc-wasm: ${e.message}`)}}static reset(){this.pandocWasm=null,this.loadingPromise=null}}t.PandocLoader=l,l.pandocWasm=null,l.loadingPromise=null},516:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ContentDetector=void 0,t.ContentDetector=class{static needsRstParser(e){return!e.startsWith("---")&&([/^\.\.[ \t]+\w+::/m,/`[^<]+[ \t]*<[^>]+>`_/,/^\.\.[ \t]+(note|warning|important)::/m,/::[ \t]*$/m].filter(t=>t.test(e)).length>=1||(!!/^.+\n[=~^"'`#*+<>-]{4,}[ \t]*$/m.test(e)||[/^\.\.[ \t]+\w+::/m,/^[=~^"'`#*+<>-]{4,}[ \t]*$/m,/`[^`]+`__?/,/`[^<]+[ \t]*<[^>]+>`_/,/::[ \t]*$/m,/^\.\.[ \t]+(note|warning|important)::/m,/^\*[ \t]+\S/m,/^\d+\.[ \t]+\S/m].filter(t=>t.test(e)).length>=2))}static needsLatexParser(e){return!e.startsWith("---")&&([/\\documentclass\{/,/\\begin\{document\}/,/\\section\*?\{/,/\\subsection\*?\{/,/\\usepackage\{/,/\\textbf\{/,/\\textit\{/,/\\emph\{/,/\\item\b/,/\\cite\{/,/\\ref\{/,/\\label\{/].filter(t=>t.test(e)).length>=1||[/\\documentclass\{/,/\\begin\{document\}/,/\\section\*?\{/,/\\subsection\*?\{/,/\\begin\{[^}]+\}/,/\\[a-zA-Z]+\{[^}]*\}/,/\\textbf\{/,/\\textit\{/,/\\emph\{/,/\\usepackage\{/,/\\href\{[^}]*\}\{[^}]*\}/,/\\item\b/,/\\cite\{/,/\\ref\{/,/\\label\{/].filter(t=>t.test(e)).length>=2)}static needsPandoc(e){return this.needsRstParser(e)||this.needsLatexParser(e)}}},519:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.processTemplateLoops=a;const r=n(260),i=n(61);function o(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function a(e,t,n,r=!0){const i=function(e){const t=[],n=/\{\{#([\w.]+)\}\}([\s\S]*?)\{\{\/\1\}\}/g;let r;for(;null!==(r=n.exec(e));){const[e,n,i]=r;t.push({variable:n,content:i,start:r.index,end:r.index+e.length,fullMatch:e})}return t}(e);if(0===i.length)return e;let o=e;for(let e=i.length-1;e>=0;e--){const a=i[e],l=s(a,t,n,r);o=o.slice(0,a.start)+l+o.slice(a.end)}return o}function s(e,t,n,i=!0){const{variable:o,content:s}=e,c=function(e,t,n){const r=p(t,e);if(void 0!==r)return r;if(n&&n.item){const t=p(n.item,e);if(void 0!==t)return t}let i=n;for(;i&&i.parent;)if(i=i.parent,i.item){const t=p(i.item,e);if(void 0!==t)return t}}(o,t,n);return r.fieldTracker.trackField(o,{value:c,hasLogic:!0,mixinUsed:"loop"}),Array.isArray(c)?function(e,t,n,r,i,o=!0){const s=[];for(let c=0;c<n.length;c++){const u=n[c],p={variable:e,item:u,index:c,total:n.length,parent:i},f=l(r,u,p);let g=t;g=a(g,f,p,o),g=d(g,f,p,o),g=h(g),s.push(g)}return s.join("\n")}(o,s,c,t,n,i):c?function(e,t,n,r,i,o=!0){const s={...r,[e]:n};let l=a(t,s,i,o);return l=d(l,s,i,o),l}(o,s,c,t,n,i):""}function l(e,t,n){const r={...e};return t&&"object"==typeof t&&!Array.isArray(t)&&Object.assign(r,t),r["."]=t,r["@index"]=n.index,r["@total"]=n.total,r["@first"]=0===n.index,r["@last"]=n.index===n.total-1,r}function c(e,t){try{const n=e.match(/^(\w+)\((.*)\)$/);if(!n)return;const[,r,o]=n,a=i.extensionHelpers[r];if(!a||"function"!=typeof a)return;const s=o?function(e,t){const n=[];let r="",i=0,o=!1,a="";for(let s=0;s<e.length;s++){const l=e[s];'"'!==l&&"'"!==l||o?l===a&&o?(o=!1,a="",r+=l):"("!==l||o?")"!==l||o?","!==l||0!==i||o?r+=l:(n.push(u(r.trim(),t)),r=""):(i--,r+=l):(i++,r+=l):(o=!0,a=l,r+=l)}return r.trim()&&n.push(u(r.trim(),t)),n}(o,t):[];return a(...s)}catch(t){return void console.error(`Error evaluating helper expression: ${e}`,t)}}function u(e,t){if(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))return e.slice(1,-1);if("true"===e)return!0;if("false"===e)return!1;if(/^\d+$/.test(e))return parseInt(e,10);if(/^\d+\.\d+$/.test(e))return parseFloat(e);if("@today"===e)return new Date;if(e.includes("(")&&e.includes(")")){const n=c(e,t);if(void 0!==n)return n}return p(t,e)}function p(e,t){const n=t.split(".");let r=e;for(const e of n){if(!r||"object"!=typeof r||!(e in r))return;r=r[e]}return r}function d(e,t,n,i=!0){return e.replace(/\{\{([^}]+)\}\}/g,(e,n)=>{const a=n.trim();if(a.includes("?")&&a.includes(":")){const e=function(e,t,n=!0){const r=f(e,"?"),i=f(e,":",r);if(-1===r||-1===i)return e;const a=e.substring(0,r).trim(),s=e.substring(r+1,i).trim(),l=e.substring(i+1).trim(),c=g(a,t)?s:l;if(c.startsWith('"')&&c.endsWith('"')||c.startsWith("'")&&c.endsWith("'")){const t=c.slice(1,-1);return n?`<span class="imported-value" data-field="${o(e)}">${t}</span>`:t}const u=function(e,t){if(e.includes("+"))return e.split("+").map(e=>{const n=e.trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))return n.slice(1,-1);const r=g(n,t);return void 0!==r?String(r):n}).join("");const n=g(e,t);return void 0!==n?String(n):e}(c,t);return n?`<span class="imported-value" data-field="${o(e)}">${u}</span>`:u}(a,t,i);return i?`<span class="highlight">${e}</span>`:e}if(a.includes("(")&&a.includes(")")){const e=c(a,t);if(void 0!==e)return r.fieldTracker.trackField(a,{value:e,hasLogic:!0,mixinUsed:"helper"}),i?`<span class="highlight"><span class="imported-value" data-field="${o(a)}">${String(e)}</span></span>`:String(e)}const s=g(a,t);return null==s?i?`<span class="missing-value" data-field="${o(a)}">[[${a}]]</span>`:`{{${a}}}`:i?`<span class="imported-value" data-field="${o(a)}">${String(s)}</span>`:String(s)})}function f(e,t,n=0){let r=!1,i="";for(let o=n;o<e.length;o++){const n=e[o];if(r||'"'!==n&&"'"!==n){if(r&&n===i)r=!1,i="";else if(!r&&n===t)return o}else r=!0,i=n}return-1}function g(e,t,n){if("."===e)return t["."];const r=e.split(".");let i=t;for(const e of r){if(!i||"object"!=typeof i||!Object.prototype.hasOwnProperty.call(i,e))return;i=i[e]}return i}function h(e){const t=e.trim();return t.startsWith("- ")?`<li>${t.substring(2).trim()}</li>`:e}},576:(e,t)=>{function n(e,t){if(!e.trim())return!0;if(!(e.includes("=")||e.includes("!")||e.includes("AND")||e.includes("OR"))){const n=r(t,e.trim());return Boolean(n)}try{if(e.includes(" AND "))return e.split(" AND ").map(e=>e.trim()).every(e=>n(e,t));if(e.includes(" OR "))return e.split(" OR ").map(e=>e.trim()).some(e=>n(e,t));if(e.includes("=")){const n=e.includes("!="),i=e.split(n?"!=":"=").map(e=>e.trim());if(2!==i.length)return!1;const[o,a]=i,s=r(t,o);let l=a;return a.startsWith('"')&&a.endsWith('"')?l=a.slice(1,-1):"true"===a?l=!0:"false"===a?l=!1:isNaN(Number(a))||(l=Number(a)),n?s!==l:s===l}return!1}catch(e){return console.error("Error evaluating condition:",e),!1}}function r(e,t){const n=t.split(".");let r=e;for(const e of n){if(null==r)return;r=r[e]}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.processOptionalClauses=function(e,t){return e.replace(/\[([^[\]]*(?:\[[^\]]*\][^[\]]*)*?)\]\{([^{}]*?)\}/g,(e,r,i)=>n(i,t)?r:"")}},628:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.logger=void 0;let n=!1,r={}.env&&{}.env.LOG_LEVEL||"error";t.logger={setDebugEnabled:e=>{n=e},setLogLevel:e=>{r=e},debug:(e,t)=>{n&&console.debug(`[DEBUG] ${e}`,t||"")},info:(e,t)=>{"none"!==r&&"warn"!==r&&"error"!==r&&console.info(`[INFO] ${e}`,t||"")},warn:(e,t)=>{"none"!==r&&"error"!==r&&console.warn(`[WARN] ${e}`,t||"")},error:(e,t)=>{"none"!==r&&console.error(`[ERROR] ${e}`,t||"")}}},636:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},660:e=>{e.exports=t},663:(e,t,n)=>{var r=n(388),i=Object.prototype.hasOwnProperty;e.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(i.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})},759:(e,t,n)=>{var r=n(119);e.exports=new r({explicit:[n(212),n(636),n(369)]})},769:(e,t,n)=>{e.exports=n(184)},781:(e,t,n)=>{var r=n(433),i=n(231),o=n(489),a=Object.prototype.toString,s=Object.prototype.hasOwnProperty,l=65279,c={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},u=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],p=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function d(e){var t,n,o;if(t=e.toString(16).toUpperCase(),e<=255)n="x",o=2;else if(e<=65535)n="u",o=4;else{if(!(e<=4294967295))throw new i("code point within a string may not be greater than 0xFFFFFFFF");n="U",o=8}return"\\"+n+r.repeat("0",o-t.length)+t}function f(e){this.schema=e.schema||o,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=r.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,r,i,o,a,l,c;if(null===t)return{};for(n={},i=0,o=(r=Object.keys(t)).length;i<o;i+=1)a=r[i],l=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(c=e.compiledTypeMap.fallback[a])&&s.call(c.styleAliases,l)&&(l=c.styleAliases[l]),n[a]=l;return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function g(e,t){for(var n,i=r.repeat(" ",t),o=0,a=-1,s="",l=e.length;o<l;)-1===(a=e.indexOf("\n",o))?(n=e.slice(o),o=l):(n=e.slice(o,a+1),o=a+1),n.length&&"\n"!==n&&(s+=i),s+=n;return s}function h(e,t){return"\n"+r.repeat(" ",e.indent*t)}function m(e){return 32===e||9===e}function v(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==l||65536<=e&&e<=1114111}function b(e){return v(e)&&e!==l&&13!==e&&10!==e}function y(e,t,n){var r=b(e),i=r&&!m(e);return(n?r:r&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!i)||b(t)&&!m(t)&&35===e||58===t&&i}function w(e,t){var n,r=e.charCodeAt(t);return r>=55296&&r<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1))>=56320&&n<=57343?1024*(r-55296)+n-56320+65536:r}function x(e){return/^\n* /.test(e)}function k(e,t,n,r,o){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==u.indexOf(t)||p.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,n),s=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),f=r||e.flowLevel>-1&&n>=e.flowLevel;switch(function(e,t,n,r,i,o,a,s){var c,u,p=0,d=null,f=!1,g=!1,h=-1!==r,b=-1,k=v(u=w(e,0))&&u!==l&&!m(u)&&45!==u&&63!==u&&58!==u&&44!==u&&91!==u&&93!==u&&123!==u&&125!==u&&35!==u&&38!==u&&42!==u&&33!==u&&124!==u&&61!==u&&62!==u&&39!==u&&34!==u&&37!==u&&64!==u&&96!==u&&function(e){return!m(e)&&58!==e}(w(e,e.length-1));if(t||a)for(c=0;c<e.length;p>=65536?c+=2:c++){if(!v(p=w(e,c)))return 5;k=k&&y(p,d,s),d=p}else{for(c=0;c<e.length;p>=65536?c+=2:c++){if(10===(p=w(e,c)))f=!0,h&&(g=g||c-b-1>r&&" "!==e[b+1],b=c);else if(!v(p))return 5;k=k&&y(p,d,s),d=p}g=g||h&&c-b-1>r&&" "!==e[b+1]}return f||g?n>9&&x(e)?5:a?2===o?5:2:g?4:3:!k||a||i(e)?2===o?5:2:1}(t,f,e.indent,s,function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}(e,t)},e.quotingType,e.forceQuotes&&!r,o)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+A(t,e.indent)+M(g(t,a));case 4:return">"+A(t,e.indent)+M(g(function(e,t){for(var n,r,i,o=/(\n+)([^\n]*)/g,a=(i=-1!==(i=e.indexOf("\n"))?i:e.length,o.lastIndex=i,S(e.slice(0,i),t)),s="\n"===e[0]||" "===e[0];r=o.exec(e);){var l=r[1],c=r[2];n=" "===c[0],a+=l+(s||n||""===c?"":"\n")+S(c,t),s=n}return a}(t,s),a));case 5:return'"'+function(e){for(var t,n="",r=0,i=0;i<e.length;r>=65536?i+=2:i++)r=w(e,i),!(t=c[r])&&v(r)?(n+=e[i],r>=65536&&(n+=e[i+1])):n+=t||d(r);return n}(t)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function A(e,t){var n=x(e)?String(t):"",r="\n"===e[e.length-1];return n+(!r||"\n"!==e[e.length-2]&&"\n"!==e?r?"":"-":"+")+"\n"}function M(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function S(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,o=0,a=0,s=0,l="";n=i.exec(e);)(s=n.index)-o>t&&(r=a>o?a:s,l+="\n"+e.slice(o,r),o=r+1),a=s;return l+="\n",e.length-o>t&&a>o?l+=e.slice(o,a)+"\n"+e.slice(a+1):l+=e.slice(o),l.slice(1)}function $(e,t,n,r){var i,o,a,s="",l=e.tag;for(i=0,o=n.length;i<o;i+=1)a=n[i],e.replacer&&(a=e.replacer.call(n,String(i),a)),(O(e,t+1,a,!0,!0,!1,!0)||void 0===a&&O(e,t+1,null,!0,!0,!1,!0))&&(r&&""===s||(s+=h(e,t)),e.dump&&10===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=l,e.dump=s||"[]"}function C(e,t,n){var r,o,l,c,u,p;for(l=0,c=(o=n?e.explicitTypes:e.implicitTypes).length;l<c;l+=1)if(((u=o[l]).instanceOf||u.predicate)&&(!u.instanceOf||"object"==typeof t&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){if(n?u.multi&&u.representName?e.tag=u.representName(t):e.tag=u.tag:e.tag="?",u.represent){if(p=e.styleMap[u.tag]||u.defaultStyle,"[object Function]"===a.call(u.represent))r=u.represent(t,p);else{if(!s.call(u.represent,p))throw new i("!<"+u.tag+'> tag resolver accepts not "'+p+'" style');r=u.represent[p](t,p)}e.dump=r}return!0}return!1}function O(e,t,n,r,o,s,l){e.tag=null,e.dump=n,C(e,n,!1)||C(e,n,!0);var c,u=a.call(e.dump),p=r;r&&(r=e.flowLevel<0||e.flowLevel>t);var d,f,g="[object Object]"===u||"[object Array]"===u;if(g&&(f=-1!==(d=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(o=!1),f&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(g&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),"[object Object]"===u)r&&0!==Object.keys(e.dump).length?(function(e,t,n,r){var o,a,s,l,c,u,p="",d=e.tag,f=Object.keys(n);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(o=0,a=f.length;o<a;o+=1)u="",r&&""===p||(u+=h(e,t)),l=n[s=f[o]],e.replacer&&(l=e.replacer.call(n,s,l)),O(e,t+1,s,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,c&&(u+=h(e,t)),O(e,t+1,l,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump));e.tag=d,e.dump=p||"{}"}(e,t,e.dump,o),f&&(e.dump="&ref_"+d+e.dump)):(function(e,t,n){var r,i,o,a,s,l="",c=e.tag,u=Object.keys(n);for(r=0,i=u.length;r<i;r+=1)s="",""!==l&&(s+=", "),e.condenseFlow&&(s+='"'),a=n[o=u[r]],e.replacer&&(a=e.replacer.call(n,o,a)),O(e,t,o,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),O(e,t,a,!1,!1)&&(l+=s+=e.dump));e.tag=c,e.dump="{"+l+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if("[object Array]"===u)r&&0!==e.dump.length?(e.noArrayIndent&&!l&&t>0?$(e,t-1,e.dump,o):$(e,t,e.dump,o),f&&(e.dump="&ref_"+d+e.dump)):(function(e,t,n){var r,i,o,a="",s=e.tag;for(r=0,i=n.length;r<i;r+=1)o=n[r],e.replacer&&(o=e.replacer.call(n,String(r),o)),(O(e,t,o,!1,!1)||void 0===o&&O(e,t,null,!1,!1))&&(""!==a&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=s,e.dump="["+a+"]"}(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else{if("[object String]"!==u){if("[object Undefined]"===u)return!1;if(e.skipInvalid)return!1;throw new i("unacceptable kind of an object to dump "+u)}"?"!==e.tag&&k(e,e.dump,t,s,p)}null!==e.tag&&"?"!==e.tag&&(c=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),c="!"===e.tag[0]?"!"+c:"tag:yaml.org,2002:"===c.slice(0,18)?"!!"+c.slice(18):"!<"+c+">",e.dump=c+" "+e.dump)}return!0}function F(e,t){var n,r,i=[],o=[];for(I(e,i,o),n=0,r=o.length;n<r;n+=1)t.duplicates.push(i[o[n]]);t.usedDuplicates=new Array(r)}function I(e,t,n){var r,i,o;if(null!==e&&"object"==typeof e)if(-1!==(i=t.indexOf(e)))-1===n.indexOf(i)&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;i<o;i+=1)I(e[i],t,n);else for(i=0,o=(r=Object.keys(e)).length;i<o;i+=1)I(e[r[i]],t,n)}e.exports.dump=function(e,t){var n=new f(t=t||{});n.noRefs||F(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),O(n,0,r,!0,!0)?n.dump+"\n":""}},794:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PandocFactory=void 0;const r=n(509),i=n(989),o=n(902);t.PandocFactory=class{static async create(e={}){if("undefined"==typeof window)return new i.PandocNative(e);{const t=r.PandocLoader.getPandocWasm();if(t)return new o.PandocWasm(t,e);if(await r.PandocLoader.loadIfNeeded("# dummy content to trigger loading")){const t=r.PandocLoader.getPandocWasm();if(t)return new o.PandocWasm(t,e)}return null}}static async createForContent(e,t={}){return await r.PandocLoader.loadIfNeeded(e)?this.create(t):null}static async isAvailable(){try{return null!==await this.create()}catch(e){return!1}}static getEnvironmentInfo(){const e="undefined"==typeof window?"node":"browser",t=r.PandocLoader.getPandocWasm();return{environment:e,pandocWasmLoaded:null!==t,pandocWasmInstance:t}}}},811:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseLatex=a,t.parseLatexSync=s,t.isLatex=l,t.convertLatexToLegalMarkdown=async function(e){return l(e)?await a(e):e},t.convertLatexToLegalMarkdownSync=function(e){return l(e)?s(e):e};const r=n(516),i=n(794),o=n(890);async function a(e){try{const t=await i.PandocFactory.createForContent(e);return t?(await t.convert(e,"latex","markdown")).replace(/\n{3,}/g,"\n\n").trim():o.FallbackParsers.convertLatexBasic(e)}catch(t){return console.error("Error parsing LaTeX:",t),o.FallbackParsers.convertLatexBasic(e)}}function s(e){return o.FallbackParsers.convertLatexBasic(e)}function l(e){return r.ContentDetector.needsLatexParser(e)}},851:(e,t,n)=>{var r=n(388);e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},884:(e,t)=>{function n(e){const t=["th","st","nd","rd"],n=e%100;return n>=11&&n<=13?e+t[0]:e+(t[n%10]||t[0])}Object.defineProperty(t,"__esModule",{value:!0}),t.DateFormats=void 0,t.addYears=function(e,t){if(!e)throw new Error("Date is required for addYears");const n=new Date(e);if(isNaN(n.getTime()))throw new Error(`Invalid date: ${e}`);return n.setFullYear(n.getFullYear()+t),n},t.addDays=function(e,t){if(!e)throw new Error("Date is required for addDays");const n=new Date(e);if(isNaN(n.getTime()))throw new Error(`Invalid date: ${e}`);return n.setDate(n.getDate()+t),n},t.addMonths=function(e,t){if(!e)throw new Error("Date is required for addMonths");const n=new Date(e);if(isNaN(n.getTime()))throw new Error(`Invalid date: ${e}`);return n.setMonth(n.getMonth()+t),n},t.formatDate=function(e,t="YYYY-MM-DD"){const r="string"==typeof e?new Date(e):e;if(isNaN(r.getTime()))throw new Error(`Invalid date: ${e}`);const i=r.getFullYear(),o=r.getMonth(),a=r.getDate(),s=r.getDay(),l={YYYY:String(i),YY:String(i).slice(-2),MMMM:["January","February","March","April","May","June","July","August","September","October","November","December"][o],MMMMES:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"][o],MMM:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][o],MM:String(o+1).padStart(2,"0"),M:String(o+1),DD:String(a).padStart(2,"0"),D:String(a),Do:n(a),dddd:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][s],ddd:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][s]};let c=t;const u=Object.keys(l).sort((e,t)=>t.length-e.length);for(const e of u){const t=l[e],n=e.length<=2?new RegExp(`\\b${e}\\b`,"g"):new RegExp(e,"g");c=c.replace(n,t)}return c},t.DateFormats={LEGAL:"Do day of MMMM, YYYY",FORMAL:"dddd, MMMM Do, YYYY",SPANISH:"D de MMMMES de YYYY",US:"MM/DD/YYYY",EU:"DD/MM/YYYY",ISO:"YYYY-MM-DD",LONG:"MMMM D, YYYY",SHORT:"MMM D, YYYY",YEAR:"YYYY",MONTH_YEAR:"MMMM YYYY"}},890:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackParsers=void 0,t.FallbackParsers=class{static convertRstBasic(e){console.warn("Using basic RST parser - some features may not work correctly");let t=e;return t=t.replace(/^(.+)\n([=]{3,})\s*$/gm,"# $1"),t=t.replace(/^(.+)\n([-]{3,})\s*$/gm,"## $1"),t=t.replace(/^(.+)\n([~]{3,})\s*$/gm,"### $1"),t=t.replace(/^(.+)\n([\^]{3,})\s*$/gm,"#### $1"),t=t.replace(/^(.+)\n(["]{3,})\s*$/gm,"##### $1"),t=t.replace(/^(.+)\n([']{3,})\s*$/gm,"###### $1"),t=t.replace(/^([=]{3,})\n(.+)\n([=]{3,})\s*$/gm,"# $2"),t=t.replace(/^([-]{3,})\n(.+)\n([-]{3,})\s*$/gm,"## $2"),t=t.replace(/\*\*([^*]+)\*\*/g,"**$1**"),t=t.replace(/\*([^*]+)\*/g,"*$1*"),t=t.replace(/:emphasis:`([^`]+)`/g,"*$1*"),t=t.replace(/:strong:`([^`]+)`/g,"**$1**"),t=t.replace(/:literal:`([^`]+)`/g,"`$1`"),t=t.replace(/``([^`]+)``/g,"`$1`"),t=t.replace(/`([^<]+?)\s*<([^>]+?)>`_/g,"[$1]($2)"),t=t.replace(/`([^`]+)`_/g,"[$1][$1]"),t=t.replace(/^(\s*)\* (.+)/gm,"$1- $2"),t=t.replace(/^(\s*)(\d+)\. (.+)/gm,"$1$2. $3"),t=t.replace(/^(\s*)(\d+)\) (.+)/gm,"$1$2. $3"),t=t.replace(/^(.+)::\s*$/gm,(e,t)=>t+"\n\n```"),t=t.replace(/^::\s*$/gm,"```"),(t.match(/```/g)||[]).length%2==1&&(t+="\n```"),t=t.replace(/^([^\n]+)\n(\s{4,})(.+)/gm,(e,t,n,r)=>t.includes("```")||r.includes("```")?e:`**${t}**\n${n}${r}`),t=t.replace(/^\.\.[ \t]+note::[ \t]*(.*)$/gm,"> **Note:** $1"),t=t.replace(/^\.\.[ \t]+warning::[ \t]*(.*)$/gm,"> **Warning:** $1"),t=t.replace(/^\.\.[ \t]+important::[ \t]*(.*)$/gm,"> **Important:** $1"),t=t.replace(/^\.\.[ \t]+(\w+)::[ \t]*(.*)$/gm,"\x3c!-- $1: $2 --\x3e"),t=t.replace(/(?<!\]\()https?:\/\/[^\s<>)]+(?!\))/g,"<$&>"),t=t.replace(/\n{3,}/g,"\n\n"),t.trim()}static convertLatexBasic(e){console.warn("Using basic LaTeX parser - some features may not work correctly");let t=e;const n=t.match(/\\title\{([^}]+)\}/),r=t.match(/\\author\{([^}]+)\}/),i=t.match(/\\date\{([^}]+)\}/);let o="";(n||r||i)&&(o="---\n",n&&(o+=`title: "${n[1]}"\n`),r&&(o+=`author: "${r[1]}"\n`),i&&(o+=`date: "${i[1]}"\n`),o+="---\n\n"),t=t.replace(/\\documentclass\{[^}]*\}/g,""),t=t.replace(/\\usepackage\{[^}]*\}/g,""),t=t.replace(/\\title\{[^}]*\}/g,""),t=t.replace(/\\author\{[^}]*\}/g,""),t=t.replace(/\\date\{[^}]*\}/g,""),t=t.replace(/\\maketitle/g,""),t=t.replace(/\\begin\{document\}/g,""),t=t.replace(/\\end\{document\}/g,""),t=t.replace(/\\section\*?\{([^}]+)\}/g,"# $1"),t=t.replace(/\\subsection\*?\{([^}]+)\}/g,"## $1"),t=t.replace(/\\subsubsection\*?\{([^}]+)\}/g,"### $1"),t=t.replace(/\\paragraph\*?\{([^}]+)\}/g,"#### $1"),t=t.replace(/\\subparagraph\*?\{([^}]+)\}/g,"##### $1"),t=t.replace(/\\textbf\{([^}]+)\}/g,"**$1**"),t=t.replace(/\\textit\{([^}]+)\}/g,"*$1*"),t=t.replace(/\\emph\{([^}]+)\}/g,"*$1*"),t=t.replace(/\\texttt\{([^}]+)\}/g,"`$1`"),t=t.replace(/\\underline\{([^}]+)\}/g,"__$1__"),t=t.replace(/\\verb\|([^|]+)\|/g,"`$1`"),t=t.replace(/\\href\{([^}]+)\}\{([^}]+)\}/g,"[$2]($1)"),t=t.replace(/\\url\{([^}]+)\}/g,"<$1>"),t=t.replace(/\\cite\{([^}]+)\}/g,"[$1]"),t=t.replace(/\\ref\{([^}]+)\}/g,"[$1]"),t=t.replace(/\\label\{([^}]+)\}/g,'<a name="$1"></a>'),t=t.replace(/\\begin\{enumerate\}([\s\S]*?)\\end\{enumerate\}/g,(e,t)=>{let n=1;return t.replace(/\\item\s+/g,()=>n+++". ")}),t=t.replace(/\\begin\{itemize\}([\s\S]*?)\\end\{itemize\}/g,(e,t)=>t.replace(/\\item\s+/g,"- ")),t=t.replace(/\\begin\{description\}([\s\S]*?)\\end\{description\}/g,(e,t)=>t.replace(/\\item\[([^\]]+)\]\s*([^\n\r]*)/g,"**$1**\n $2")),t=t.replace(/\\begin\{itemize\}/g,""),t=t.replace(/\\end\{itemize\}/g,""),t=t.replace(/\\begin\{enumerate\}/g,""),t=t.replace(/\\end\{enumerate\}/g,""),t=t.replace(/\\begin\{description\}/g,""),t=t.replace(/\\end\{description\}/g,""),t=t.replace(/\\item\s+/g,"- ");let a=1;const s=[];return t=t.replace(/\\footnote\{([^}]+)\}/g,(e,t)=>(s.push(`[^${a}]: ${t}`),`[^${a++}]`)),t=t.replace(/\\begin\{quote\}([\s\S]*?)\\end\{quote\}/g,(e,t)=>t.trim().split("\n").map(e=>e.trim()?`> ${e}`:">").join("\n")),t=t.replace(/``([^']+)''/g,'"$1"'),t=t.replace(/\\`([^']+)'/g,"'$1'"),t=t.replace(/\\begin\{verbatim\}/g,"```\n"),t=t.replace(/\\end\{verbatim\}/g,"\n```"),t=t.replace(/\\begin\{lstlisting\}(\[language=([^\]]+)\])?/g,"```$2\n"),t=t.replace(/\\end\{lstlisting\}/g,"\n```"),t=t.replace(/\\begin\{minted\}\{([^}]+)\}/g,"```$1\n"),t=t.replace(/\\end\{minted\}/g,"\n```"),t=t.replace(/\\tableofcontents/g,""),t=t.replace(/\\newpage/g,""),t=t.replace(/\\clearpage/g,""),t=t.replace(/\\bigskip/g,""),t=t.replace(/\\\\/g," "),t=t.replace(/^%.*$/gm,""),t=t.replace(/([^\\])%.*$/gm,"$1"),t=t.replace(/\\[a-zA-Z]+(\[[^\]]*\])?(\{[^}]*\})?/g,""),t=t.replace(/\n{3,}/g,"\n\n"),t=t.replace(/\s{2,}/g," "),s.length>0&&(t+="\n\n"+s.join("\n")),(o+t).trim()}}},902:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PandocWasm=void 0,t.PandocWasm=class{constructor(e,t={}){this.pandocWasm=e,this.options={timeout:1e4,verbose:!1,...t}}async convert(e,t,n){if(!this.pandocWasm)throw new Error("Pandoc WASM not initialized");try{this.options.verbose&&console.log(`Converting ${t} to ${n} using pandoc-wasm`);const r=new Promise((e,t)=>{setTimeout(()=>{t(new Error(`Pandoc WASM conversion timed out after ${this.options.timeout}ms`))},this.options.timeout)});let i;if("function"==typeof this.pandocWasm.convert)i=Promise.resolve(this.pandocWasm.convert(e,t,n));else if("function"==typeof this.pandocWasm.pandoc)i=Promise.resolve(this.pandocWasm.pandoc(e,{from:t,to:n}));else{if("function"!=typeof this.pandocWasm.run)throw new Error("Unsupported pandoc-wasm API");{const r=["-f",t,"-t",n,"--wrap=none"];this.options.args&&r.push(...this.options.args),i=Promise.resolve(this.pandocWasm.run(r,e))}}return await Promise.race([i,r])}catch(e){throw new Error(`Pandoc WASM conversion failed: ${e.message}`)}}}},942:(e,t,n)=>{var r=n(388),i=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,o,a,s=e;for(a=new Array(s.length),t=0,n=s.length;t<n;t+=1){if(r=s[t],"[object Object]"!==i.call(r))return!1;if(1!==(o=Object.keys(r)).length)return!1;a[t]=[o[0],r[o[0]]]}return!0},construct:function(e){if(null===e)return[];var t,n,r,i,o,a=e;for(o=new Array(a.length),t=0,n=a.length;t<n;t+=1)r=a[t],i=Object.keys(r),o[t]=[i[0],r[i[0]]];return o}})},946:(e,t,n)=>{var r=n(388),i=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,a,s,l=[],c=e;for(t=0,n=c.length;t<n;t+=1){if(r=c[t],s=!1,"[object Object]"!==o.call(r))return!1;for(a in r)if(i.call(r,a)){if(s)return!1;s=!0}if(!s)return!1;if(-1!==l.indexOf(a))return!1;l.push(a)}return!0},construct:function(e){return null!==e?e:[]}})},989:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PandocNative=void 0;const r=n(660);t.PandocNative=class{constructor(e={}){this.options={timeout:1e4,verbose:!1,...e}}async convert(e,t,n){return new Promise((i,o)=>{const a=["-f",t,"-t",n,"--wrap=none"];this.options.args&&a.push(...this.options.args),this.options.verbose&&console.log(`Running pandoc with args: ${a.join(" ")}`);const s=(0,r.spawn)("pandoc",a);let l="",c="";const u=setTimeout(()=>{s.kill(),o(new Error(`Pandoc conversion timed out after ${this.options.timeout}ms`))},this.options.timeout);s.stdout.on("data",e=>{l+=e.toString()}),s.stderr.on("data",e=>{c+=e.toString()}),s.on("close",e=>{clearTimeout(u),0===e?i(l):o(new Error(`Pandoc failed with code ${e}: ${c}`))}),s.on("error",e=>{clearTimeout(u),o(new Error(`Failed to start pandoc: ${e.message}`))}),s.stdin.write(e),s.stdin.end()})}}}},r={};return function e(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={exports:{}};return n[t].call(o.exports,o,o.exports,e),o.exports}(148)})());
|
|
2
2
|
//# sourceMappingURL=legal-markdown.umd.min.js.map
|