md2x 0.7.4 → 0.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/README.md +61 -23
  2. package/dist/chunks/chunk-Q6QMPHEY.js +1552 -0
  3. package/dist/chunks/chunk-UZ7TETMS.js +415 -0
  4. package/dist/chunks/docx-exporter-GL6CNCQD.js +1 -0
  5. package/dist/chunks/mcp-server-4TPUOZXJ.js +49 -0
  6. package/dist/core-worker.js +1764 -0
  7. package/dist/index.js +1 -1
  8. package/dist/md2x.js +8 -5
  9. package/dist/renderer/core-worker-browser.js +1775 -0
  10. package/dist/renderer/live-runtime-canvas.js +1 -1
  11. package/dist/renderer/live-runtime-dot.js +1 -1
  12. package/dist/renderer/live-runtime-html.js +1 -1
  13. package/dist/renderer/live-runtime-infographic.js +1 -1
  14. package/dist/renderer/live-runtime-md2x.js +4 -4
  15. package/dist/renderer/live-runtime-mermaid.js +1 -1
  16. package/dist/renderer/live-runtime-svg.js +1 -1
  17. package/dist/renderer/live-runtime-vega.js +1 -1
  18. package/dist/types/node/src/host/browser-renderer.d.ts +1 -175
  19. package/dist/types/node/src/host/core.d.ts +59 -0
  20. package/dist/types/node/src/host/index.d.ts +4 -49
  21. package/dist/types/node/src/host/node-exporter.d.ts +1 -90
  22. package/dist/types/node/src/host/node-platform.d.ts +1 -23
  23. package/dist/types/node/src/host/templates-data.d.ts +5 -0
  24. package/dist/types/node/src/host/themes-data.d.ts +2385 -0
  25. package/dist/types/node/src/host/types.d.ts +251 -0
  26. package/dist/types/node/src/index.d.ts +2 -3
  27. package/package.json +13 -3
  28. package/dist/chunks/chunk-2LPNL4GA.js +0 -1
  29. package/dist/chunks/chunk-3P5X57NT.js +0 -262
  30. package/dist/chunks/chunk-3VL755NO.js +0 -1
  31. package/dist/chunks/chunk-5DPTQTJJ.js +0 -1
  32. package/dist/chunks/chunk-AK6TXLWO.js +0 -1
  33. package/dist/chunks/chunk-CN4F5HOV.js +0 -5
  34. package/dist/chunks/chunk-CVKZIRZW.js +0 -5
  35. package/dist/chunks/chunk-DFROP2PD.js +0 -11
  36. package/dist/chunks/chunk-DJGIYXVP.js +0 -3
  37. package/dist/chunks/chunk-EFKQH5UR.js +0 -108
  38. package/dist/chunks/chunk-FXZD57XY.js +0 -532
  39. package/dist/chunks/chunk-IENSDROB.js +0 -1
  40. package/dist/chunks/chunk-LLCWR7UA.js +0 -1
  41. package/dist/chunks/chunk-MHCTK6WW.js +0 -1
  42. package/dist/chunks/chunk-NM6J3ND7.js +0 -1
  43. package/dist/chunks/chunk-PARPCLXM.js +0 -1
  44. package/dist/chunks/chunk-PUOHPY5L.js +0 -16
  45. package/dist/chunks/chunk-R65AQGTF.js +0 -1
  46. package/dist/chunks/chunk-R6G2575A.js +0 -3
  47. package/dist/chunks/chunk-TRGQPVRY.js +0 -2
  48. package/dist/chunks/chunk-URO5RPHJ.js +0 -9
  49. package/dist/chunks/chunk-YFL3W3OS.js +0 -1
  50. package/dist/chunks/chunk-Z4LVGK7Y.js +0 -1
  51. package/dist/chunks/docx-exporter-ZZ76JXFU.js +0 -1
  52. package/dist/chunks/rehype-highlight-Y4Q4RX67.js +0 -1
  53. package/dist/chunks/rehype-katex-FXTCTSUE.js +0 -1
  54. package/dist/chunks/rehype-stringify-4CQSSRDL.js +0 -1
  55. package/dist/chunks/remark-gfm-BUZ4SLP3.js +0 -1
  56. package/dist/chunks/remark-math-HEZQAPFK.js +0 -1
  57. package/dist/chunks/remark-parse-QC7TSXTK.js +0 -1
  58. package/dist/chunks/remark-rehype-C2LX643P.js +0 -1
  59. package/dist/chunks/remark-super-sub-EP2AQS54.js +0 -1
  60. package/dist/chunks/theme-manager-AZBU2SLL.js +0 -1
  61. package/dist/chunks/theme-to-css-GLV3WYDU.js +0 -85
  62. package/dist/chunks/unified-PU53JLVJ.js +0 -1
  63. package/dist/chunks/unist-util-visit-SBSD62C6.js +0 -1
  64. package/dist/templates/html/example.html +0 -35
  65. package/dist/templates/svelte/example.svelte +0 -18
  66. package/dist/templates/vue/PrinterComponent.vue +0 -875
  67. package/dist/templates/vue/example.vue +0 -17
  68. package/dist/templates/vue/mapLibre.vue +0 -371
  69. package/dist/themes/code-themes/business-contrast.json +0 -31
  70. package/dist/themes/code-themes/colorful.json +0 -32
  71. package/dist/themes/code-themes/cool-modern.json +0 -31
  72. package/dist/themes/code-themes/high-contrast.json +0 -31
  73. package/dist/themes/code-themes/light-clean.json +0 -31
  74. package/dist/themes/code-themes/warm-book.json +0 -31
  75. package/dist/themes/color-schemes/candy.json +0 -34
  76. package/dist/themes/color-schemes/cool.json +0 -34
  77. package/dist/themes/color-schemes/coral.json +0 -34
  78. package/dist/themes/color-schemes/dino.json +0 -34
  79. package/dist/themes/color-schemes/forest.json +0 -34
  80. package/dist/themes/color-schemes/garden.json +0 -34
  81. package/dist/themes/color-schemes/neutral.json +0 -34
  82. package/dist/themes/color-schemes/ocean.json +0 -34
  83. package/dist/themes/color-schemes/rainbow.json +0 -43
  84. package/dist/themes/color-schemes/sakura.json +0 -34
  85. package/dist/themes/color-schemes/sepia.json +0 -34
  86. package/dist/themes/color-schemes/space.json +0 -34
  87. package/dist/themes/color-schemes/starry.json +0 -34
  88. package/dist/themes/color-schemes/sunset.json +0 -34
  89. package/dist/themes/color-schemes/warm.json +0 -34
  90. package/dist/themes/font-config.json +0 -184
  91. package/dist/themes/layout-schemes/academic.json +0 -40
  92. package/dist/themes/layout-schemes/book.json +0 -40
  93. package/dist/themes/layout-schemes/document.json +0 -40
  94. package/dist/themes/layout-schemes/magazine.json +0 -40
  95. package/dist/themes/layout-schemes/student.json +0 -40
  96. package/dist/themes/layout-schemes/technical.json +0 -40
  97. package/dist/themes/presets/academic.json +0 -24
  98. package/dist/themes/presets/business.json +0 -22
  99. package/dist/themes/presets/candy.json +0 -23
  100. package/dist/themes/presets/century.json +0 -22
  101. package/dist/themes/presets/coral.json +0 -22
  102. package/dist/themes/presets/default.json +0 -22
  103. package/dist/themes/presets/dinosaur.json +0 -23
  104. package/dist/themes/presets/elegant.json +0 -22
  105. package/dist/themes/presets/forest.json +0 -22
  106. package/dist/themes/presets/garamond.json +0 -22
  107. package/dist/themes/presets/garden.json +0 -23
  108. package/dist/themes/presets/handwritten.json +0 -23
  109. package/dist/themes/presets/heiti.json +0 -22
  110. package/dist/themes/presets/magazine.json +0 -24
  111. package/dist/themes/presets/manuscript.json +0 -22
  112. package/dist/themes/presets/minimal.json +0 -22
  113. package/dist/themes/presets/mixed.json +0 -24
  114. package/dist/themes/presets/newspaper.json +0 -24
  115. package/dist/themes/presets/ocean.json +0 -22
  116. package/dist/themes/presets/palatino.json +0 -22
  117. package/dist/themes/presets/rainbow.json +0 -23
  118. package/dist/themes/presets/space.json +0 -23
  119. package/dist/themes/presets/starry.json +0 -23
  120. package/dist/themes/presets/sunset.json +0 -22
  121. package/dist/themes/presets/swiss.json +0 -22
  122. package/dist/themes/presets/technical.json +0 -22
  123. package/dist/themes/presets/typewriter.json +0 -23
  124. package/dist/themes/presets/verdana.json +0 -22
  125. package/dist/themes/presets/water.json +0 -22
  126. package/dist/themes/registry.json +0 -270
  127. package/dist/themes/table-styles/academic.json +0 -30
  128. package/dist/themes/table-styles/borderless.json +0 -26
  129. package/dist/themes/table-styles/compact.json +0 -24
  130. package/dist/themes/table-styles/grid.json +0 -22
  131. package/dist/themes/table-styles/high-contrast.json +0 -22
  132. package/dist/themes/table-styles/minimal-gray.json +0 -26
  133. package/dist/themes/table-styles/modern-tech.json +0 -34
  134. package/dist/themes/table-styles/professional.json +0 -34
  135. package/dist/themes/table-styles/zebra.json +0 -22
  136. package/dist/types/src/utils/theme-to-css.d.ts +0 -171
@@ -0,0 +1,1552 @@
1
+ import{b as pr,d as Kn,e as Xn,f as Jn,g as Qn,h as Zn,i as et,l as nt,m as tt,n as rt,o as it,p as ot}from"./chunk-UZ7TETMS.js";var _e={};pr(_e,{code_themes_business_contrast:()=>zr,code_themes_colorful:()=>$r,code_themes_cool_modern:()=>Ur,code_themes_high_contrast:()=>qr,code_themes_light_clean:()=>Gr,code_themes_warm_book:()=>Vr,color_schemes_candy:()=>Wr,color_schemes_cool:()=>Yr,color_schemes_coral:()=>Kr,color_schemes_dino:()=>Xr,color_schemes_forest:()=>Jr,color_schemes_garden:()=>Qr,color_schemes_neutral:()=>Zr,color_schemes_ocean:()=>ei,color_schemes_rainbow:()=>ni,color_schemes_sakura:()=>ti,color_schemes_sepia:()=>ri,color_schemes_space:()=>ii,color_schemes_starry:()=>oi,color_schemes_sunset:()=>ai,color_schemes_warm:()=>li,fontConfig:()=>_n,layout_schemes_academic:()=>si,layout_schemes_book:()=>ci,layout_schemes_document:()=>di,layout_schemes_magazine:()=>pi,layout_schemes_student:()=>fi,layout_schemes_technical:()=>mi,presets_academic:()=>fr,presets_business:()=>mr,presets_candy:()=>ur,presets_century:()=>hr,presets_coral:()=>gr,presets_default:()=>yr,presets_dinosaur:()=>br,presets_elegant:()=>wr,presets_forest:()=>xr,presets_garamond:()=>vr,presets_garden:()=>Sr,presets_handwritten:()=>kr,presets_heiti:()=>_r,presets_magazine:()=>Tr,presets_manuscript:()=>Ar,presets_minimal:()=>Fr,presets_mixed:()=>Cr,presets_newspaper:()=>Mr,presets_ocean:()=>Br,presets_palatino:()=>Pr,presets_rainbow:()=>Er,presets_space:()=>Rr,presets_starry:()=>Lr,presets_sunset:()=>Ir,presets_swiss:()=>Or,presets_technical:()=>Nr,presets_typewriter:()=>jr,presets_verdana:()=>Hr,presets_water:()=>Dr,registry:()=>ki,table_styles_academic:()=>ui,table_styles_borderless:()=>hi,table_styles_compact:()=>gi,table_styles_grid:()=>yi,table_styles_high_contrast:()=>bi,table_styles_minimal_gray:()=>wi,table_styles_modern_tech:()=>xi,table_styles_professional:()=>vi,table_styles_zebra:()=>Si});var fr={id:"academic",name:"\u5B66\u672F\u8BBA\u6587",name_en:"Academic",description:"\u5B8B\u4F53\u6B63\u6587\u914D\u9ED1\u4F53\u6807\u9898\uFF0C\u4E2D\u6587\u5B66\u672F\u89C4\u8303",description_en:"Song body with Hei headings, Chinese academic standard",author:"Markdown Viewer Extension",version:"1.0.0",fontScheme:{body:{fontFamily:"SimSun"},headings:{fontFamily:"SimHei"},code:{fontFamily:"Monaco"}},layoutScheme:"academic",colorScheme:"neutral",tableStyle:"academic",codeTheme:"light-clean"},mr={id:"business",name:"\u5546\u52A1\u62A5\u544A",name_en:"Business",description:"Calibri \u5B57\u4F53\uFF0C\u73B0\u4EE3\u5546\u52A1\u98CE\u683C\uFF0C\u5C42\u6B21\u6E05\u6670",description_en:"Calibri font with modern business style and clear hierarchy",author:"Markdown Viewer Extension",version:"1.0.0",fontScheme:{body:{fontFamily:"Arial"},headings:{},code:{fontFamily:"Monaco"}},layoutScheme:"document",colorScheme:"neutral",tableStyle:"professional",codeTheme:"business-contrast"},ur={id:"candy",name:"\u7CD6\u679C\u751C\u5FC3",name_en:"Candy",description:"\u7CD6\u679C\u751C\u5FC3\uFF0C\u751C\u7F8E\u53EF\u7231\u98CE\u683C",description_en:"Sweet and adorable candy style",author:"Theme System",version:"1.0.0",fontScheme:{body:{fontFamily:"Trebuchet MS"},headings:{},code:{fontFamily:"Consolas"}},layoutScheme:"student",colorScheme:"candy",tableStyle:"zebra",codeTheme:"colorful",diagramStyle:"handDrawn"},hr={id:"century",name:"\u6F14\u793A\u6587\u7A3F",name_en:"Presentation",description:"Trebuchet MS \u5B57\u4F53\uFF0C\u7B80\u6D01\u7684\u6F14\u793A\u98CE\u683C\uFF0C\u6807\u9898\u7A81\u51FA",description_en:"Trebuchet MS font with clean presentation style, prominent headings",author:"Markdown Viewer Extension",version:"1.0.0",fontScheme:{body:{fontFamily:"Century Gothic"},headings:{},code:{fontFamily:"Monaco"}},layoutScheme:"magazine",colorScheme:"cool",tableStyle:"minimal-gray",codeTheme:"cool-modern"},gr={id:"coral",name:"\u73CA\u745A\u6D3B\u529B",name_en:"Coral Vibrant",description:"\u6E29\u6696\u6A59\u7C89\u8272\u7CFB\uFF0C\u53CB\u597D\u4EB2\u548C\u7684\u6D3B\u529B\u98CE\u683C",description_en:"Warm coral-pink for friendly and vibrant style",author:"Theme System",version:"1.0.0",fontScheme:{body:{fontFamily:"Verdana"},headings:{},code:{fontFamily:"Consolas"}},layoutScheme:"book",colorScheme:"coral",tableStyle:"minimal-gray",codeTheme:"colorful"},yr={id:"default",name:"\u6807\u51C6\u6587\u6863",name_en:"Standard",description:"Times New Roman \u5B57\u4F53\uFF0C\u9002\u5408\u6B63\u5F0F\u6587\u6863\u548C\u8BBA\u6587",description_en:"Times New Roman font for formal documents and papers",author:"Markdown Viewer Extension",version:"1.0.0",fontScheme:{body:{fontFamily:"Times New Roman"},headings:{},code:{fontFamily:"Monaco"}},layoutScheme:"document",colorScheme:"neutral",tableStyle:"grid",codeTheme:"light-clean"},br={id:"dinosaur",name:"\u6050\u9F99\u63A2\u9669",name_en:"Dinosaur",description:"\u7EFF\u6A59\u63A2\u9669\uFF0C\u6D3B\u529B\u6050\u9F99\u98CE\u683C",description_en:"Green-orange adventurous dinosaur style",author:"Theme System",version:"1.0.0",fontScheme:{body:{fontFamily:"Arial"},headings:{},code:{fontFamily:"Consolas"}},layoutScheme:"student",colorScheme:"dino",tableStyle:"grid",codeTheme:"colorful",diagramStyle:"handDrawn"},wr={id:"elegant",name:"\u4F18\u96C5\u6587\u827A",name_en:"Elegant Literary",description:"Georgia \u5B57\u4F53\uFF0C\u4F18\u96C5\u7684\u6587\u5B66\u98CE\u683C",description_en:"Georgia font with elegant literary style",author:"Markdown Viewer Extension",version:"1.0.0",fontScheme:{body:{fontFamily:"Georgia"},headings:{},code:{fontFamily:"Monaco"}},layoutScheme:"book",colorScheme:"sakura",tableStyle:"borderless",codeTheme:"colorful"},xr={id:"forest",name:"\u68EE\u6797\u81EA\u7136",name_en:"Forest Natural",description:"\u7EFF\u8272\u7CFB\uFF0C\u81EA\u7136\u73AF\u4FDD\u7684\u68EE\u6797\u98CE\u683C",description_en:"Green for natural and eco-friendly forest style",author:"Theme System",version:"1.0.0",fontScheme:{body:{fontFamily:"Verdana"},headings:{},code:{fontFamily:"Consolas"}},layoutScheme:"book",colorScheme:"forest",tableStyle:"minimal-gray",codeTheme:"light-clean"},vr={id:"garamond",name:"\u957F\u6587\u9605\u8BFB",name_en:"Long Reading",description:"Georgia \u5B57\u4F53\uFF0C\u8212\u9002\u7684\u957F\u6587\u9605\u8BFB\u4F53\u9A8C",description_en:"Georgia font for comfortable long-form reading",author:"Markdown Viewer Extension",version:"1.0.0",fontScheme:{body:{fontFamily:"Garamond"},headings:{},code:{fontFamily:"Monaco"}},layoutScheme:"book",colorScheme:"warm",tableStyle:"borderless",codeTheme:"warm-book"},Sr={id:"garden",name:"\u82B1\u56ED\u6E05\u65B0",name_en:"Garden",description:"\u7C89\u7EFF\u6E05\u65B0\uFF0C\u53EF\u7231\u82B1\u56ED\u98CE\u683C",description_en:"Pink-green fresh garden style",author:"Theme System",version:"1.0.0",fontScheme:{body:{fontFamily:"Verdana"},headings:{},code:{fontFamily:"Consolas"}},layoutScheme:"student",colorScheme:"garden",tableStyle:"minimal-gray",codeTheme:"light-clean",diagramStyle:"handDrawn"},kr={id:"handwritten",name:"\u624B\u5199\u98CE\u683C",name_en:"Handwritten",description:"\u624B\u5199\u4F53\u6807\u9898\uFF0C\u4E2A\u4EBA\u5316\u611F\u89C9\uFF0C\u9002\u5408\u65E5\u8BB0\u548C\u968F\u7B14",description_en:"Handwriting style titles for personal notes and journals",author:"Markdown Viewer Extension",version:"2.0.0",fontScheme:{body:{fontFamily:"Comic Sans MS"},headings:{},code:{fontFamily:"Consolas"}},layoutScheme:"book",colorScheme:"warm",tableStyle:"borderless",codeTheme:"warm-book",diagramStyle:"handDrawn"},_r={id:"heiti",name:"\u73B0\u4EE3\u9ED1\u4F53",name_en:"Hei Style",description:"\u9ED1\u4F53\u5B57\u4F53\uFF0C\u73B0\u4EE3\u7B80\u7EA6\u98CE\u683C",description_en:"Hei font with modern minimal style",author:"Markdown Viewer Extension",version:"1.0.0",fontScheme:{body:{fontFamily:"SimHei"},headings:{},code:{fontFamily:"Monaco"}},layoutScheme:"document",colorScheme:"neutral",tableStyle:"grid",codeTheme:"light-clean"},Tr={id:"magazine",name:"\u6742\u5FD7\u6392\u7248",name_en:"Magazine",description:"\u5927\u6807\u9898\u5DEE\u5F02\uFF0C\u89C6\u89C9\u51B2\u51FB\uFF0C\u9002\u5408\u521B\u610F\u5185\u5BB9\u5C55\u793A",description_en:"Large title contrast with visual impact for creative content",author:"Markdown Viewer Extension",version:"2.0.0",fontScheme:{body:{fontFamily:"Georgia"},headings:{fontFamily:"Helvetica Neue"},code:{fontFamily:"Monaco"}},layoutScheme:"magazine",colorScheme:"cool",tableStyle:"minimal-gray",codeTheme:"cool-modern"},Ar={id:"manuscript",name:"\u624B\u7A3F\u98CE\u683C",name_en:"Manuscript",description:"\u5B66\u672F\u624B\u7A3F\u611F\uFF0C\u9002\u5408\u8BBA\u6587\u8349\u7A3F\u548C\u7814\u7A76\u7B14\u8BB0",description_en:"Academic manuscript style for paper drafts and research notes",author:"Markdown Viewer Extension",version:"2.0.0",fontScheme:{body:{fontFamily:"Palatino Linotype"},headings:{},code:{fontFamily:"Consolas"}},layoutScheme:"academic",colorScheme:"sepia",tableStyle:"borderless",codeTheme:"warm-book"},Fr={id:"minimal",name:"\u6781\u7B80\u4E3B\u4E49",name_en:"Minimal",description:"\u7CFB\u7EDF\u5B57\u4F53\uFF0C\u6700\u7B80\u6D01\u7684\u6392\u7248\u98CE\u683C\uFF0C\u4E13\u6CE8\u5185\u5BB9\u672C\u8EAB",description_en:"System font with minimal styling, focus on content itself",author:"Markdown Viewer Extension",version:"1.0.0",fontScheme:{body:{fontFamily:"Arial"},headings:{},code:{fontFamily:"Monaco"}},layoutScheme:"document",colorScheme:"neutral",tableStyle:"borderless",codeTheme:"light-clean"},Cr={id:"mixed",name:"\u4E2D\u82F1\u6DF7\u6392",name_en:"Mixed Languages",description:"\u5B8B\u4F53\u6B63\u6587\u914D Georgia \u6807\u9898\uFF0C\u4E2D\u82F1\u6587\u6DF7\u6392\u4F18\u5316",description_en:"Song body with Georgia headings for mixed content",author:"Markdown Viewer Extension",version:"1.0.0",fontScheme:{body:{fontFamily:"SimSun"},headings:{fontFamily:"Georgia"},code:{fontFamily:"Monaco"}},layoutScheme:"book",colorScheme:"warm",tableStyle:"grid",codeTheme:"warm-book"},Mr={id:"newspaper",name:"\u62A5\u7EB8\u98CE\u683C",name_en:"Newspaper",description:"\u4F20\u7EDF\u65B0\u95FB\u6392\u7248\u98CE\u683C\uFF0C\u6B63\u5F0F\u4E25\u8083",description_en:"Traditional newspaper typography, formal and serious",author:"Markdown Viewer Extension",version:"2.0.0",fontScheme:{body:{fontFamily:"Times New Roman"},headings:{fontFamily:"Georgia"},code:{fontFamily:"Consolas"}},layoutScheme:"magazine",colorScheme:"sepia",tableStyle:"grid",codeTheme:"warm-book"},Br={id:"ocean",name:"\u6D77\u6D0B\u6E05\u65B0",name_en:"Ocean Fresh",description:"\u84DD\u7EFF\u8272\u7CFB\uFF0C\u6E05\u723D\u81EA\u7136\u7684\u6D77\u6D0B\u98CE\u683C",description_en:"Blue-green for fresh and natural ocean style",author:"Theme System",version:"1.0.0",fontScheme:{body:{fontFamily:"Trebuchet MS"},headings:{},code:{fontFamily:"Consolas"}},layoutScheme:"document",colorScheme:"ocean",tableStyle:"minimal-gray",codeTheme:"cool-modern"},Pr={id:"palatino",name:"\u4E66\u7C4D\u51FA\u7248",name_en:"Book Publishing",description:"Palatino \u5B57\u4F53\uFF0C\u4F18\u96C5\u7684\u4E66\u7C4D\u51FA\u7248\u98CE\u683C",description_en:"Palatino font with elegant book publishing style",author:"Markdown Viewer Extension",version:"1.0.0",fontScheme:{body:{fontFamily:"Palatino"},headings:{},code:{fontFamily:"Monaco"}},layoutScheme:"book",colorScheme:"sepia",tableStyle:"minimal-gray",codeTheme:"warm-book"},Er={id:"rainbow",name:"\u5F69\u8679\u7F24\u7EB7",name_en:"Rainbow",description:"\u591A\u5F69\u6807\u9898\uFF0C\u6D3B\u6CFC\u7AE5\u8DA3\u7684\u5F69\u8679\u98CE\u683C",description_en:"Multi-colored headings for vibrant rainbow style",author:"Theme System",version:"1.0.0",fontScheme:{body:{fontFamily:"Arial"},headings:{},code:{fontFamily:"Consolas"}},layoutScheme:"student",colorScheme:"rainbow",tableStyle:"zebra",codeTheme:"colorful",diagramStyle:"handDrawn"},Rr={id:"space",name:"\u592A\u7A7A\u63A2\u7D22",name_en:"Space",description:"\u84DD\u6A59\u79D1\u5E7B\uFF0C\u592A\u7A7A\u63A2\u7D22\u98CE\u683C",description_en:"Blue-orange sci-fi space exploration style",author:"Theme System",version:"1.0.0",fontScheme:{body:{fontFamily:"Arial"},headings:{},code:{fontFamily:"Consolas"}},layoutScheme:"student",colorScheme:"space",tableStyle:"modern-tech",codeTheme:"cool-modern",diagramStyle:"handDrawn"},Lr={id:"starry",name:"\u661F\u7A7A\u68A6\u5E7B",name_en:"Starry",description:"\u84DD\u7D2B\u68A6\u5E7B\uFF0C\u7AE5\u8DA3\u661F\u7A7A\u98CE\u683C",description_en:"Blue-purple dreamy starry style",author:"Theme System",version:"1.0.0",fontScheme:{body:{fontFamily:"Century Gothic"},headings:{},code:{fontFamily:"Consolas"}},layoutScheme:"student",colorScheme:"starry",tableStyle:"minimal-gray",codeTheme:"cool-modern",diagramStyle:"handDrawn"},Ir={id:"sunset",name:"\u65E5\u843D\u6696\u9633",name_en:"Sunset Warm",description:"\u6A59\u9EC4\u8272\u7CFB\uFF0C\u6E29\u6696\u8212\u9002\u7684\u65E5\u843D\u98CE\u683C",description_en:"Orange-yellow for warm and cozy sunset style",author:"Theme System",version:"1.0.0",fontScheme:{body:{fontFamily:"Georgia"},headings:{},code:{fontFamily:"Consolas"}},layoutScheme:"book",colorScheme:"sunset",tableStyle:"minimal-gray",codeTheme:"warm-book"},Or={id:"swiss",name:"\u745E\u58EB\u6781\u7B80",name_en:"Swiss Minimal",description:"Helvetica \u98CE\u683C\uFF0C\u7F51\u683C\u7CFB\u7EDF\uFF0C\u6781\u81F4\u7B80\u6D01",description_en:"Helvetica style with grid system, ultimate simplicity",author:"Theme System",version:"1.0.0",fontScheme:{body:{fontFamily:"Helvetica Neue"},headings:{},code:{fontFamily:"Monaco"}},layoutScheme:"document",colorScheme:"neutral",tableStyle:"borderless",codeTheme:"light-clean"},Nr={id:"technical",name:"\u6280\u672F\u6587\u6863",name_en:"Technical",description:"\u4E13\u4E3A\u6280\u672F\u6587\u6863\u8BBE\u8BA1\uFF0C\u6E05\u6670\u7B80\u6D01\u7684\u6781\u7B80\u98CE\u683C",description_en:"Designed for technical documentation with clean minimalist style",author:"Markdown Viewer Extension",version:"1.0.0",fontScheme:{body:{fontFamily:"Arial"},headings:{},code:{fontFamily:"Monaco"}},layoutScheme:"technical",colorScheme:"cool",tableStyle:"modern-tech",codeTheme:"cool-modern"},jr={id:"typewriter",name:"\u590D\u53E4\u6253\u5B57",name_en:"Typewriter",description:"Courier New \u5B57\u4F53\uFF0C\u590D\u53E4\u6253\u5B57\u673A\u98CE\u683C",description_en:"Courier New font with retro typewriter style",author:"Markdown Viewer Extension",version:"1.0.0",fontScheme:{body:{fontFamily:"Courier New"},headings:{},code:{fontFamily:"Courier New"}},layoutScheme:"book",colorScheme:"sepia",tableStyle:"borderless",codeTheme:"warm-book",diagramStyle:"handDrawn"},Hr={id:"verdana",name:"\u7F51\u9875\u663E\u793A",name_en:"Web Display",description:"Verdana \u5B57\u4F53\uFF0C\u5C4F\u5E55\u663E\u793A\u6E05\u6670\u9510\u5229",description_en:"Verdana font with clear and sharp screen display",author:"Markdown Viewer Extension",version:"1.0.0",fontScheme:{body:{fontFamily:"Verdana"},headings:{},code:{fontFamily:"Monaco"}},layoutScheme:"document",colorScheme:"cool",tableStyle:"grid",codeTheme:"cool-modern"},Dr={id:"water",name:"\u6C34\u58A8\u8BD7\u610F",name_en:"Ink Poetry",description:"\u4EFF\u5B8B\u5B57\u4F53\uFF0C\u4E2D\u56FD\u4F20\u7EDF\u6C34\u58A8\u7F8E\u5B66",description_en:"FangSong font with traditional Chinese ink aesthetics",author:"Markdown Viewer Extension",version:"1.0.0",fontScheme:{body:{fontFamily:"FangSong"},headings:{},code:{fontFamily:"Courier New"}},layoutScheme:"book",colorScheme:"sepia",tableStyle:"borderless",codeTheme:"warm-book"},zr={id:"business-contrast",name:"\u5546\u52A1\u5BF9\u6BD4",description:"\u9AD8\u5BF9\u6BD4\u5EA6\u914D\u8272\uFF0C\u9002\u5408\u6F14\u793A\u548C\u5546\u52A1",description_en:"Business contrast colors for presentation",foreground:"#000000",colors:{keyword:"#0000ff",built_in:"#0000ff",literal:"#a31515",number:"#a31515",string:"#a31515",title:"#a31515",attr:"#ff0000",comment:"#008000",meta:"#2b91af",params:"#000000",symbol:"#00b0e8",type:"#a31515",addition:"#a31515",deletion:"#2b91af",quote:"#008000",regexp:"#a31515",selector_tag:"#0000ff",selector_id:"#000000",selector_class:"#000000",variable:"#008000",property:"#000000"}},$r={id:"colorful",name:"\u591A\u5F69\u6D3B\u529B",description:"\u591A\u5F69\u914D\u8272\u65B9\u6848\uFF0C\u6D3B\u529B\u53CB\u597D",description_en:"Colorful scheme, vibrant and friendly",foreground:"#383a42",colors:{keyword:"#a626a4",built_in:"#c18401",literal:"#0184bb",number:"#986801",operator:"#383a42",string:"#50a14f",title:"#4078f2",attr:"#986801",comment:"#a0a1a7",meta:"#4078f2",params:"#383a42",symbol:"#e45649",type:"#c18401",addition:"#50a14f",deletion:"#e45649",quote:"#a0a1a7",regexp:"#50a14f",selector_tag:"#e45649",selector_id:"#4078f2",selector_class:"#c18401",variable:"#e45649",property:"#4078f2"}},Ur={id:"cool-modern",name:"\u51B7\u8272\u73B0\u4EE3",description:"\u73B0\u4EE3\u51B7\u8272\u8C03\u914D\u8272\uFF0C\u4E13\u4E1A\u7B80\u6D01",description_en:"Modern cool-toned colors, professional and clean",foreground:"#263238",colors:{keyword:"#0277bd",built_in:"#00838f",literal:"#00897b",number:"#f57c00",string:"#00897b",title:"#1976d2",attr:"#00838f",comment:"#90a4ae",meta:"#5e35b1",params:"#263238",symbol:"#d32f2f",type:"#00838f",addition:"#388e3c",deletion:"#d32f2f",quote:"#90a4ae",regexp:"#00897b",selector_tag:"#0277bd",selector_id:"#1976d2",selector_class:"#00838f",variable:"#5e35b1",property:"#1976d2"}},qr={id:"business-contrast",name:"\u5546\u52A1\u5BF9\u6BD4",description:"\u9AD8\u5BF9\u6BD4\u5EA6\u914D\u8272\uFF0C\u9002\u5408\u6F14\u793A\u548C\u5546\u52A1",description_en:"Business contrast colors for presentation",foreground:"#000000",colors:{keyword:"#0000ff",built_in:"#0000ff",literal:"#a31515",number:"#a31515",string:"#a31515",title:"#a31515",attr:"#ff0000",comment:"#008000",meta:"#2b91af",params:"#000000",symbol:"#00b0e8",type:"#a31515",addition:"#a31515",deletion:"#2b91af",quote:"#008000",regexp:"#a31515",selector_tag:"#0000ff",selector_id:"#000000",selector_class:"#000000",variable:"#008000",property:"#000000"}},Gr={id:"light-clean",name:"\u6E05\u723D\u4EAE\u8272",description:"\u6E05\u723D\u7684\u6D45\u8272\u914D\u8272\u65B9\u6848\uFF0C\u9002\u5408\u65E5\u5E38\u4F7F\u7528",description_en:"Clean light color scheme for daily use",foreground:"#24292e",colors:{keyword:"#d73a49",built_in:"#e36209",literal:"#005cc5",number:"#005cc5",string:"#032f62",title:"#6f42c1",attr:"#005cc5",comment:"#6a737d",meta:"#005cc5",params:"#24292e",symbol:"#e36209",type:"#d73a49",addition:"#22863a",deletion:"#b31d28",quote:"#22863a",regexp:"#032f62",selector_tag:"#22863a",selector_id:"#005cc5",selector_class:"#005cc5",variable:"#e36209",property:"#005cc5"}},Vr={id:"warm-book",name:"\u6E29\u6696\u4E66\u5377",description:"\u6E29\u6696\u7684\u4E66\u7C4D\u98CE\u683C\u914D\u8272\uFF0C\u9002\u5408\u957F\u6587\u9605\u8BFB",description_en:"Warm book-style colors for long reading",foreground:"#657b83",colors:{keyword:"#859900",built_in:"#b58900",literal:"#2aa198",number:"#2aa198",string:"#2aa198",title:"#268bd2",attr:"#b58900",comment:"#93a1a1",meta:"#859900",params:"#657b83",symbol:"#cb4b16",type:"#b58900",addition:"#859900",deletion:"#dc322f",quote:"#93a1a1",regexp:"#dc322f",selector_tag:"#268bd2",selector_id:"#268bd2",selector_class:"#268bd2",variable:"#268bd2",property:"#268bd2"}},Wr={id:"candy",name:"\u7CD6\u679C\u751C\u5FC3",name_en:"Candy",description:"\u7C89\u6A59\u8272\u7CFB\uFF0C\u751C\u7F8E\u53EF\u7231\u7684\u7CD6\u679C\u98CE\u683C",description_en:"Pink-orange scheme for sweet and adorable candy styles",text:{primary:"#881337",secondary:"#9f1239",muted:"#be123c"},accent:{link:"#e11d48",linkHover:"#be123c"},background:{code:"#fff1f2"},blockquote:{border:"#fda4af"},table:{border:"#fda4af",headerBackground:"#fecdd3",headerText:"#881337",zebraEven:"#fff1f2",zebraOdd:"#fff7ed"}},Yr={id:"cool",name:"\u51B7\u8272\u8C03",name_en:"Cool",description:"\u6E05\u723D\u7684\u84DD\u8272\u7CFB\uFF0C\u9002\u5408\u6280\u672F\u548C\u79D1\u6280\u98CE\u683C",description_en:"Cool blue scheme for technical and modern styles",text:{primary:"#0f172a",secondary:"#334155",muted:"#64748b"},accent:{link:"#0077b6",linkHover:"#005f92"},background:{code:"#f0f9ff"},blockquote:{border:"#7dd3fc"},table:{border:"#7dd3fc",headerBackground:"#e0f2fe",headerText:"#0c4a6e",zebraEven:"#f0f9ff",zebraOdd:"#ffffff"}},Kr={id:"coral",name:"\u73CA\u745A\u6D3B\u529B",name_en:"Coral",description:"\u6E29\u6696\u6A59\u7C89\u8272\u7CFB\uFF0C\u53CB\u597D\u4EB2\u548C\u7684\u6D3B\u529B\u98CE\u683C",description_en:"Warm coral-pink scheme for friendly and vibrant styles",text:{primary:"#450a0a",secondary:"#7f1d1d",muted:"#b91c1c"},accent:{link:"#dc2626",linkHover:"#b91c1c"},background:{code:"#fef2f2"},blockquote:{border:"#fca5a5"},table:{border:"#fca5a5",headerBackground:"#fecaca",headerText:"#450a0a",zebraEven:"#fff5f5",zebraOdd:"#fffbeb"}},Xr={id:"dino",name:"\u6050\u9F99\u63A2\u9669",name_en:"Dinosaur",description:"\u7EFF\u6A59\u8272\u7CFB\uFF0C\u6D3B\u529B\u63A2\u7D22\u7684\u6050\u9F99\u98CE\u683C",description_en:"Green-orange scheme for adventurous dinosaur styles",text:{primary:"#365314",secondary:"#3f6212",muted:"#65a30d"},accent:{link:"#4d7c0f",linkHover:"#3f6212"},background:{code:"#f7fee7"},blockquote:{border:"#a3e635"},table:{border:"#a3e635",headerBackground:"#bef264",headerText:"#365314",zebraEven:"#f7fee7",zebraOdd:"#fff7ed"}},Jr={id:"forest",name:"\u68EE\u6797\u81EA\u7136",name_en:"Forest",description:"\u7EFF\u8272\u7CFB\uFF0C\u81EA\u7136\u73AF\u4FDD\u7684\u68EE\u6797\u98CE\u683C",description_en:"Green scheme for natural and eco-friendly forest styles",text:{primary:"#14532d",secondary:"#166534",muted:"#4d7c0f"},accent:{link:"#15803d",linkHover:"#166534"},background:{code:"#f0fdf4"},blockquote:{border:"#4ade80"},table:{border:"#4ade80",headerBackground:"#bbf7d0",headerText:"#14532d",zebraEven:"#f0fdf4",zebraOdd:"#fefce8"}},Qr={id:"garden",name:"\u82B1\u56ED\u6E05\u65B0",name_en:"Garden",description:"\u7C89\u7EFF\u8272\u7CFB\uFF0C\u6E05\u65B0\u53EF\u7231\u7684\u82B1\u56ED\u98CE\u683C",description_en:"Pink-green scheme for fresh and lovely garden styles",text:{primary:"#701a75",secondary:"#86198f",muted:"#a21caf"},accent:{link:"#047857",linkHover:"#065f46"},background:{code:"#fdf2f8"},blockquote:{border:"#4ade80"},table:{border:"#4ade80",headerBackground:"#dcfce7",headerText:"#166534",zebraEven:"#f0fdf4",zebraOdd:"#fefce8"}},Zr={id:"neutral",name:"\u4E2D\u6027\u8272",name_en:"Neutral",description:"\u7ECF\u5178\u9ED1\u767D\u7070\u914D\u8272\uFF0C\u9002\u5408\u5927\u591A\u6570\u6587\u6863",description_en:"Classic black/white/gray scheme for most documents",text:{primary:"#171717",secondary:"#404040",muted:"#737373"},accent:{link:"#0369a1",linkHover:"#0c4a6e"},background:{code:"#f5f5f5"},blockquote:{border:"#a3a3a3"},table:{border:"#a3a3a3",headerBackground:"#e5e5e5",headerText:"#171717",zebraEven:"#fafafa",zebraOdd:"#ffffff"}},ei={id:"ocean",name:"\u6D77\u6D0B\u6E05\u65B0",name_en:"Ocean",description:"\u84DD\u7EFF\u8272\u7CFB\uFF0C\u6E05\u723D\u81EA\u7136\u7684\u6D77\u6D0B\u98CE\u683C",description_en:"Blue-green scheme for fresh and natural ocean styles",text:{primary:"#164e63",secondary:"#155e75",muted:"#0e7490"},accent:{link:"#0e7490",linkHover:"#155e75"},background:{code:"#ecfeff"},blockquote:{border:"#22d3ee"},table:{border:"#22d3ee",headerBackground:"#a5f3fc",headerText:"#164e63",zebraEven:"#ecfeff",zebraOdd:"#f0fdfa"}},ni={id:"rainbow",name:"\u5F69\u8679\u591A\u5F69",name_en:"Rainbow",description:"\u5404\u7EA7\u6807\u9898\u4E0D\u540C\u989C\u8272\uFF0C\u6D3B\u6CFC\u7AE5\u8DA3\u7684\u591A\u5F69\u98CE\u683C",description_en:"Multi-colored headings for vibrant and playful styles",text:{primary:"#1e1b4b",secondary:"#3730a3",muted:"#6366f1"},accent:{link:"#7c3aed",linkHover:"#6d28d9"},background:{code:"#eef2ff"},blockquote:{border:"#a5b4fc"},table:{border:"#a5b4fc",headerBackground:"#e0e7ff",headerText:"#1e1b4b",zebraEven:"#faf5ff",zebraOdd:"#ffffff"},headings:{h1:"#ef4444",h2:"#f97316",h3:"#eab308",h4:"#22c55e",h5:"#3b82f6",h6:"#8b5cf6"}},ti={id:"sakura",name:"\u6A31\u82B1\u7C89",name_en:"Sakura",description:"\u67D4\u548C\u7684\u7C89\u8272\u7CFB\uFF0C\u9002\u5408\u6E29\u67D4\u4F18\u96C5\u7684\u98CE\u683C",description_en:"Soft pink scheme for gentle and elegant styles",text:{primary:"#831843",secondary:"#9d174d",muted:"#be185d"},accent:{link:"#db2777",linkHover:"#be185d"},background:{code:"#fdf2f8"},blockquote:{border:"#f9a8d4"},table:{border:"#f9a8d4",headerBackground:"#fce7f3",headerText:"#831843",zebraEven:"#fdf2f8",zebraOdd:"#fffbfc"}},ri={id:"sepia",name:"\u590D\u53E4\u68D5",name_en:"Sepia",description:"\u6000\u65E7\u7684\u6CDB\u9EC4\u8272\u8C03\uFF0C\u9002\u5408\u6253\u5B57\u673A\u548C\u624B\u7A3F\u98CE\u683C",description_en:"Nostalgic sepia tones for typewriter and manuscript styles",text:{primary:"#292524",secondary:"#57534e",muted:"#78716c"},accent:{link:"#a16207",linkHover:"#854d0e"},background:{code:"#faf5ef"},blockquote:{border:"#a8a29e"},table:{border:"#a8a29e",headerBackground:"#f5f0e6",headerText:"#292524",zebraEven:"#faf5ef",zebraOdd:"#fcf9f3"}},ii={id:"space",name:"\u592A\u7A7A\u63A2\u7D22",name_en:"Space",description:"\u84DD\u6A59\u8272\u7CFB\uFF0C\u79D1\u5E7B\u597D\u5947\u7684\u592A\u7A7A\u98CE\u683C",description_en:"Blue-orange scheme for sci-fi space exploration styles",text:{primary:"#1e3a8a",secondary:"#1e40af",muted:"#3b82f6"},accent:{link:"#4f46e5",linkHover:"#4338ca"},background:{code:"#eff6ff"},blockquote:{border:"#93c5fd"},table:{border:"#93c5fd",headerBackground:"#bfdbfe",headerText:"#1e3a8a",zebraEven:"#eff6ff",zebraOdd:"#fff7ed"}},oi={id:"starry",name:"\u661F\u7A7A\u68A6\u5E7B",name_en:"Starry",description:"\u84DD\u7D2B\u8272\u7CFB\uFF0C\u68A6\u5E7B\u7AE5\u8DA3\u7684\u661F\u7A7A\u98CE\u683C",description_en:"Blue-purple scheme for dreamy starry styles",text:{primary:"#4c1d95",secondary:"#5b21b6",muted:"#7c3aed"},accent:{link:"#a21caf",linkHover:"#86198f"},background:{code:"#eef2ff"},blockquote:{border:"#a5b4fc"},table:{border:"#a5b4fc",headerBackground:"#c7d2fe",headerText:"#1e1b4b",zebraEven:"#f5f3ff",zebraOdd:"#faf5ff"}},ai={id:"sunset",name:"\u65E5\u843D\u6696\u9633",name_en:"Sunset",description:"\u6A59\u9EC4\u8272\u7CFB\uFF0C\u6E29\u6696\u8212\u9002\u7684\u65E5\u843D\u98CE\u683C",description_en:"Orange-yellow scheme for warm and cozy sunset styles",text:{primary:"#431407",secondary:"#7c2d12",muted:"#c2410c"},accent:{link:"#c2410c",linkHover:"#9a3412"},background:{code:"#fff7ed"},blockquote:{border:"#fdba74"},table:{border:"#fdba74",headerBackground:"#fed7aa",headerText:"#431407",zebraEven:"#fff7ed",zebraOdd:"#fffbeb"}},li={id:"warm",name:"\u6696\u8272\u8C03",name_en:"Warm",description:"\u6E29\u6696\u7684\u68D5\u6A59\u8272\u7CFB\uFF0C\u9002\u5408\u6587\u827A\u548C\u624B\u5199\u98CE\u683C",description_en:"Warm brown-orange scheme for literary and handwritten styles",text:{primary:"#1c1917",secondary:"#44403c",muted:"#78716c"},accent:{link:"#b45309",linkHover:"#92400e"},background:{code:"#faf5f0"},blockquote:{border:"#a8a29e"},table:{border:"#a8a29e",headerBackground:"#fef3e2",headerText:"#1c1917",zebraEven:"#fffbf5",zebraOdd:"#fffcf7"}},si={id:"academic",name:"\u5B66\u672F\u8BBA\u6587",name_en:"Academic",description:"\u5C42\u7EA7\u5E73\u7F13\u7684\u5E03\u5C40\uFF0C\u9002\u5408\u5B66\u672F\u8BBA\u6587\u548C\u6B63\u5F0F\u6587\u6863",description_en:"Gradual hierarchy layout for academic papers and formal documents",body:{fontSize:"12pt",lineHeight:1.75},headings:{h1:{fontSize:"18pt",spacingBefore:"0pt",spacingAfter:"16pt"},h2:{fontSize:"16pt",spacingBefore:"16pt",spacingAfter:"10pt"},h3:{fontSize:"14pt",spacingBefore:"14pt",spacingAfter:"8pt"},h4:{fontSize:"13pt",spacingBefore:"12pt",spacingAfter:"6pt"},h5:{fontSize:"12pt",spacingBefore:"10pt",spacingAfter:"5pt"},h6:{fontSize:"12pt",spacingBefore:"8pt",spacingAfter:"4pt"}},code:{fontSize:"10pt"},blocks:{paragraph:{spacingAfter:"10pt"},list:{spacingAfter:"13pt"},listItem:{spacingAfter:"3pt"},blockquote:{spacingBefore:"10pt",spacingAfter:"10pt",paddingVertical:"1pt",paddingHorizontal:"13pt"},codeBlock:{spacingAfter:"12pt"},table:{spacingAfter:"12pt"},horizontalRule:{spacingBefore:"20pt",spacingAfter:"20pt"}}},ci={id:"book",name:"\u4E66\u7C4D\u6392\u7248",name_en:"Book",description:"\u8212\u9002\u9605\u8BFB\u7684\u5E03\u5C40\uFF0C\u9002\u5408\u957F\u6587\u6863\u548C\u4E66\u7C4D",description_en:"Comfortable reading layout for long documents and books",body:{fontSize:"12pt",lineHeight:1.6},headings:{h1:{fontSize:"22pt",spacingBefore:"0pt",spacingAfter:"14pt"},h2:{fontSize:"18pt",spacingBefore:"18pt",spacingAfter:"10pt"},h3:{fontSize:"16pt",spacingBefore:"16pt",spacingAfter:"8pt"},h4:{fontSize:"14pt",spacingBefore:"14pt",spacingAfter:"7pt"},h5:{fontSize:"13pt",spacingBefore:"12pt",spacingAfter:"6pt"},h6:{fontSize:"12pt",spacingBefore:"10pt",spacingAfter:"5pt"}},code:{fontSize:"10pt"},blocks:{paragraph:{spacingAfter:"12pt"},list:{spacingAfter:"14pt"},listItem:{spacingAfter:"4pt"},blockquote:{spacingBefore:"12pt",spacingAfter:"12pt",paddingVertical:"2pt",paddingHorizontal:"15pt"},codeBlock:{spacingAfter:"14pt"},table:{spacingAfter:"14pt"},horizontalRule:{spacingBefore:"24pt",spacingAfter:"24pt"}}},di={id:"document",name:"\u901A\u7528\u6587\u6863",name_en:"Document",description:"\u5E73\u8861\u9002\u4E2D\u7684\u5E03\u5C40\uFF0C\u9002\u5408\u65E5\u5E38\u6587\u6863",description_en:"Balanced layout for everyday documents",body:{fontSize:"12pt",lineHeight:1.5},headings:{h1:{fontSize:"22pt",spacingBefore:"0pt",spacingAfter:"12pt",alignment:"center"},h2:{fontSize:"18pt",spacingBefore:"16pt",spacingAfter:"8pt"},h3:{fontSize:"16pt",spacingBefore:"14pt",spacingAfter:"7pt"},h4:{fontSize:"14pt",spacingBefore:"12pt",spacingAfter:"6pt"},h5:{fontSize:"13pt",spacingBefore:"10pt",spacingAfter:"5pt"},h6:{fontSize:"12pt",spacingBefore:"8pt",spacingAfter:"4pt"}},code:{fontSize:"10pt"},blocks:{paragraph:{spacingAfter:"10pt"},list:{spacingAfter:"13pt"},listItem:{spacingAfter:"3pt"},blockquote:{spacingBefore:"10pt",spacingAfter:"10pt",paddingVertical:"1pt",paddingHorizontal:"13pt"},codeBlock:{spacingAfter:"12pt"},table:{spacingAfter:"12pt"},horizontalRule:{spacingBefore:"20pt",spacingAfter:"20pt"}}},pi={id:"magazine",name:"\u6742\u5FD7\u98CE\u683C",name_en:"Magazine",description:"\u5927\u6807\u9898\u5DEE\u5F02\u7684\u5E03\u5C40\uFF0C\u9002\u5408\u6742\u5FD7\u548C\u521B\u610F\u6587\u6863",description_en:"Large heading contrast layout for magazines and creative documents",body:{fontSize:"12pt",lineHeight:1.5},headings:{h1:{fontSize:"28pt",spacingBefore:"0pt",spacingAfter:"16pt"},h2:{fontSize:"22pt",spacingBefore:"20pt",spacingAfter:"10pt"},h3:{fontSize:"18pt",spacingBefore:"16pt",spacingAfter:"8pt"},h4:{fontSize:"15pt",spacingBefore:"14pt",spacingAfter:"7pt"},h5:{fontSize:"13pt",spacingBefore:"12pt",spacingAfter:"6pt"},h6:{fontSize:"12pt",spacingBefore:"10pt",spacingAfter:"5pt"}},code:{fontSize:"10pt"},blocks:{paragraph:{spacingAfter:"10pt"},list:{spacingAfter:"13pt"},listItem:{spacingAfter:"3pt"},blockquote:{spacingBefore:"12pt",spacingAfter:"12pt",paddingVertical:"2pt",paddingHorizontal:"16pt"},codeBlock:{spacingAfter:"12pt"},table:{spacingAfter:"12pt"},horizontalRule:{spacingBefore:"20pt",spacingAfter:"20pt"}}},fi={id:"student",name:"\u5B66\u751F\u6587\u6863",name_en:"Student",description:"\u5927\u5B57\u53F7\u5927\u884C\u8DDD\uFF0C\u9002\u5408\u5B66\u751F\u4F5C\u6587\u548C\u7B14\u8BB0",description_en:"Large font and spacing for student essays and notes",body:{fontSize:"14pt",lineHeight:1.8},headings:{h1:{fontSize:"24pt",spacingBefore:"0pt",spacingAfter:"16pt"},h2:{fontSize:"20pt",spacingBefore:"20pt",spacingAfter:"12pt"},h3:{fontSize:"18pt",spacingBefore:"18pt",spacingAfter:"10pt"},h4:{fontSize:"16pt",spacingBefore:"16pt",spacingAfter:"8pt"},h5:{fontSize:"15pt",spacingBefore:"14pt",spacingAfter:"7pt"},h6:{fontSize:"14pt",spacingBefore:"12pt",spacingAfter:"6pt"}},code:{fontSize:"12pt"},blocks:{paragraph:{spacingAfter:"14pt"},list:{spacingAfter:"16pt"},listItem:{spacingAfter:"6pt"},blockquote:{spacingBefore:"14pt",spacingAfter:"14pt",paddingVertical:"4pt",paddingHorizontal:"18pt"},codeBlock:{spacingAfter:"16pt"},table:{spacingAfter:"16pt"},horizontalRule:{spacingBefore:"28pt",spacingAfter:"28pt"}}},mi={id:"technical",name:"\u6280\u672F\u6587\u6863",name_en:"Technical",description:"\u7D27\u51D1\u9AD8\u6548\u7684\u5E03\u5C40\uFF0C\u9002\u5408\u6280\u672F\u6587\u6863\u548CAPI\u6587\u6863",description_en:"Compact and efficient layout for technical and API documentation",body:{fontSize:"11pt",lineHeight:1.4},headings:{h1:{fontSize:"18pt",spacingBefore:"0pt",spacingAfter:"10pt"},h2:{fontSize:"15pt",spacingBefore:"14pt",spacingAfter:"7pt"},h3:{fontSize:"13pt",spacingBefore:"12pt",spacingAfter:"6pt"},h4:{fontSize:"12pt",spacingBefore:"10pt",spacingAfter:"5pt"},h5:{fontSize:"11pt",spacingBefore:"8pt",spacingAfter:"4pt"},h6:{fontSize:"11pt",spacingBefore:"6pt",spacingAfter:"3pt"}},code:{fontSize:"10pt"},blocks:{paragraph:{spacingAfter:"8pt"},list:{spacingAfter:"10pt"},listItem:{spacingAfter:"2pt"},blockquote:{spacingBefore:"8pt",spacingAfter:"8pt",paddingVertical:"1pt",paddingHorizontal:"12pt"},codeBlock:{spacingAfter:"10pt"},table:{spacingAfter:"10pt"},horizontalRule:{spacingBefore:"16pt",spacingAfter:"16pt"}}},ui={id:"academic",name:"\u5B66\u672F\u98CE\u683C",name_en:"Academic",description:"\u53CC\u7EBF\u8868\u5934 + \u5355\u7EBF\u5206\u9694\uFF0C\u9002\u5408\u8BBA\u6587\u548C\u5B66\u672F\u6587\u6863",description_en:"Double-line header + single-line separators, ideal for papers and academic documents",border:{headerTop:{width:"1.5pt",style:"double"},headerBottom:{width:"1.5pt",style:"single"},lastRowBottom:{width:"1.5pt",style:"single"}},header:{fontWeight:"bold"},cell:{padding:"6pt"},zebra:{enabled:!1}},hi={id:"borderless",name:"\u65E0\u8FB9\u6846",name_en:"Borderless",description:"\u4EC5\u8868\u5934\u6709\u4E0B\u8FB9\u6846",description_en:"Only header has bottom border",border:{headerBottom:{width:"2pt",style:"single"},lastRowBottom:{width:"1pt",style:"single"}},header:{fontWeight:"bold"},cell:{padding:"8pt"},zebra:{enabled:!1}},gi={id:"compact",name:"\u7D27\u51D1\u578B",name_en:"Compact",description:"\u5C0F\u95F4\u8DDD + \u7EC6\u8FB9\u6846\uFF0C\u9002\u5408\u6570\u636E\u5BC6\u96C6\u578B\u8868\u683C",description_en:"Small padding + thin borders, ideal for data-heavy tables",border:{all:{width:"0.5pt",style:"single"}},header:{fontWeight:"bold",fontSize:"10pt"},cell:{padding:"4pt",fontSize:"10pt"},zebra:{enabled:!0}},yi={id:"grid",name:"\u7F51\u683C\u6837\u5F0F",name_en:"Grid Style",description:"\u5B8C\u6574\u8FB9\u6846\uFF0C\u8868\u5934\u6D45\u7070\u80CC\u666F\uFF0C\u6591\u9A6C\u7EB9",description_en:"Full borders, light gray header, zebra stripes",border:{all:{width:"1pt",style:"single"}},header:{fontWeight:"bold"},cell:{padding:"8pt"},zebra:{enabled:!0}},bi={id:"high-contrast",name:"\u9AD8\u5BF9\u6BD4\u5EA6",name_en:"High Contrast",description:"\u9ED1\u767D\u9AD8\u5BF9\u6BD4 + \u7C97\u8FB9\u6846\uFF0C\u9002\u5408\u6253\u5370\u548C\u53EF\u8BBF\u95EE\u6027\u9700\u6C42",description_en:"Black & white high contrast with thick borders, ideal for printing and accessibility",border:{all:{width:"2pt",style:"single"}},header:{fontWeight:"bold"},cell:{padding:"8pt"},zebra:{enabled:!0}},wi={id:"minimal-gray",name:"\u6781\u7B80\u7070\u8C03",name_en:"Minimal Gray",description:"\u4EC5\u6A2A\u5411\u8FB9\u6846 + \u7070\u8272\u8C03 + \u7B80\u6D01\u7F8E\u89C2",description_en:"Horizontal borders only + gray tones + clean look",border:{headerBottom:{width:"1.5pt",style:"single"},rowBottom:{width:"1pt",style:"single"}},header:{fontWeight:"bold"},cell:{padding:"8pt"},zebra:{enabled:!1}},xi={id:"modern-tech",name:"\u73B0\u4EE3\u79D1\u6280",name_en:"Modern Tech",description:"\u84DD\u8272\u4E3B\u9898 + \u5706\u89D2\u8FB9\u6846\uFF0C\u9002\u5408\u6280\u672F\u6587\u6863\u548C\u4EA7\u54C1\u8BF4\u660E",description_en:"Blue theme with rounded borders, ideal for tech docs and product guides",border:{headerTop:{width:"2pt",style:"single"},headerBottom:{width:"2pt",style:"single"},rowBottom:{width:"1pt",style:"single"},lastRowBottom:{width:"2pt",style:"single"}},header:{fontWeight:"bold"},cell:{padding:"10pt"},zebra:{enabled:!1}},vi={id:"professional",name:"\u4E13\u4E1A\u98CE\u683C",name_en:"Professional",description:"\u7C97\u8868\u5934\u8FB9\u6846 + \u7EC6\u5206\u9694\u7EBF",description_en:"Thick header border + thin separators",border:{headerTop:{width:"2pt",style:"single"},headerBottom:{width:"2pt",style:"single"},rowBottom:{width:"1pt",style:"single"},lastRowBottom:{width:"2pt",style:"single"}},header:{fontWeight:"bold"},cell:{padding:"8pt"},zebra:{enabled:!1}},Si={id:"zebra",name:"\u6591\u9A6C\u7EB9",name_en:"Zebra",description:"\u5947\u5076\u884C\u4E0D\u540C\u80CC\u666F\u8272\uFF0C\u65E0\u8FB9\u6846",description_en:"Alternating row colors, no borders",border:{headerBottom:{width:"1pt",style:"single"}},header:{fontWeight:"bold"},cell:{padding:"8pt"},zebra:{enabled:!0}},ki={version:"2.0.0",themes:[{id:"default",file:"default.json",category:"classic",featured:!0,order:1},{id:"academic",file:"academic.json",category:"classic",featured:!0,order:2},{id:"business",file:"business.json",category:"classic",featured:!0,order:3},{id:"manuscript",file:"manuscript.json",category:"classic",featured:!1,order:4},{id:"newspaper",file:"newspaper.json",category:"classic",featured:!1,order:5},{id:"palatino",file:"palatino.json",category:"reading",featured:!0,order:6},{id:"garamond",file:"garamond.json",category:"reading",featured:!0,order:7},{id:"typewriter",file:"typewriter.json",category:"reading",featured:!0,order:8},{id:"elegant",file:"elegant.json",category:"reading",featured:!0,order:9},{id:"technical",file:"technical.json",category:"modern",featured:!0,order:10},{id:"swiss",file:"swiss.json",category:"modern",featured:!0,order:11},{id:"minimal",file:"minimal.json",category:"modern",featured:!0,order:12},{id:"magazine",file:"magazine.json",category:"creative",featured:!0,order:13},{id:"century",file:"century.json",category:"creative",featured:!0,order:14},{id:"handwritten",file:"handwritten.json",category:"creative",featured:!0,order:15},{id:"verdana",file:"verdana.json",category:"creative",featured:!0,order:16},{id:"heiti",file:"heiti.json",category:"chinese",featured:!0,order:17},{id:"mixed",file:"mixed.json",category:"chinese",featured:!1,order:18},{id:"water",file:"water.json",category:"chinese",featured:!0,order:19},{id:"rainbow",file:"rainbow.json",category:"playful",featured:!0,order:20},{id:"starry",file:"starry.json",category:"playful",featured:!0,order:21},{id:"candy",file:"candy.json",category:"playful",featured:!0,order:22},{id:"dinosaur",file:"dinosaur.json",category:"playful",featured:!0,order:23},{id:"space",file:"space.json",category:"playful",featured:!0,order:24},{id:"garden",file:"garden.json",category:"playful",featured:!0,order:25},{id:"forest",file:"forest.json",category:"nature",featured:!0,order:26},{id:"ocean",file:"ocean.json",category:"nature",featured:!0,order:27},{id:"coral",file:"coral.json",category:"nature",featured:!0,order:28},{id:"sunset",file:"sunset.json",category:"nature",featured:!0,order:29}],categories:{classic:{name:"\u7ECF\u5178\u6587\u6863",name_en:"Classic Document",description:"\u4F20\u7EDF\u6B63\u5F0F\u7684\u6587\u6863\u98CE\u683C\uFF0C\u9002\u5408\u516C\u6587\u3001\u62A5\u544A\u3001\u8BBA\u6587",description_en:"Traditional formal styles for official documents, reports, papers",order:1},reading:{name:"\u4E66\u7C4D\u9605\u8BFB",name_en:"Book & Reading",description:"\u8212\u9002\u7684\u957F\u6587\u9605\u8BFB\u4F53\u9A8C\uFF0C\u9002\u5408\u5C0F\u8BF4\u3001\u6742\u5FD7\u3001\u535A\u5BA2",description_en:"Comfortable long-form reading for novels, magazines, blogs",order:2},modern:{name:"\u73B0\u4EE3\u79D1\u6280",name_en:"Modern Tech",description:"\u7B80\u6D01\u73B0\u4EE3\u7684\u8BBE\u8BA1\u98CE\u683C\uFF0C\u9002\u5408\u6280\u672F\u6587\u6863\u3001\u4EA7\u54C1\u8BF4\u660E",description_en:"Clean modern design for technical docs and products",order:3},creative:{name:"\u521B\u610F\u8868\u8FBE",name_en:"Creative Expression",description:"\u5BCC\u6709\u4E2A\u6027\u7684\u521B\u610F\u98CE\u683C\uFF0C\u9002\u5408\u535A\u5BA2\u3001\u8BBE\u8BA1\u3001\u521B\u610F\u5199\u4F5C",description_en:"Creative styles for blogs, design, creative writing",order:4},chinese:{name:"\u4E2D\u6587\u6392\u7248",name_en:"Chinese Typography",description:"\u4E13\u4E3A\u4E2D\u6587\u4F18\u5316\u7684\u6392\u7248\u98CE\u683C",description_en:"Typography optimized for Chinese content",order:5},playful:{name:"\u7F24\u7EB7\u7AE5\u8DA3",name_en:"Colorful & Playful",description:"\u6D3B\u6CFC\u591A\u5F69\u7684\u98CE\u683C\uFF0C\u9002\u5408\u5B66\u751F\u4F5C\u4E1A\u3001\u513F\u7AE5\u5185\u5BB9",description_en:"Vibrant playful styles for students and kids",order:6},nature:{name:"\u81EA\u7136\u8272\u5F69",name_en:"Nature Colors",description:"\u53D6\u81EA\u81EA\u7136\u7684\u914D\u8272\uFF0C\u6E29\u6696\u8212\u9002\u7684\u89C6\u89C9\u4F53\u9A8C",description_en:"Nature-inspired colors for warm visual experience",order:7}},recommendations:{default:"default",academic:"academic",business:"business",technical:"technical",reading:"garamond",book:"palatino",modern:"swiss",screen:"verdana",creative:"magazine"}},_n={fonts:{"Times New Roman":{name:"Times New Roman",displayName:"Times New Roman",webFallback:"'Times New Roman', Times, Georgia, serif, SimSun, STSong",docx:{ascii:"Times New Roman",eastAsia:"SimSun"}},Arial:{name:"Arial",displayName:"Arial",webFallback:"Arial, Helvetica, 'Helvetica Neue', sans-serif, SimHei, STHeiti",docx:{ascii:"Arial",eastAsia:"SimHei"}},Georgia:{name:"Georgia",displayName:"Georgia",webFallback:"Georgia, 'Times New Roman', Times, serif, SimSun, STSong",docx:{ascii:"Georgia",eastAsia:"SimSun"}},Monaco:{name:"Monaco",displayName:"Monaco",webFallback:"Monaco, 'Courier New', monospace, FangSong, STFangsong, 'Zhuque Fangsong'",docx:{ascii:"Consolas",eastAsia:"FangSong"}},"Courier New":{name:"Courier New",displayName:"Courier New",webFallback:"'Courier New', Courier, Monaco, FangSong, STFangsong, 'Zhuque Fangsong', monospace",docx:{ascii:"Courier New",eastAsia:"FangSong"}},SimSun:{name:"SimSun",displayName:"\u5B8B\u4F53 (SimSun)",webFallback:"'Times New Roman', serif, SimSun, STSong",docx:{ascii:"Times New Roman",eastAsia:"SimSun"}},SimHei:{name:"SimHei",displayName:"\u9ED1\u4F53 (SimHei)",webFallback:"Arial, sans-serif, SimHei, STHeiti",docx:{ascii:"Arial",eastAsia:"SimHei"}},FangSong:{name:"FangSong",displayName:"\u4EFF\u5B8B (FangSong)",webFallback:"FangSong, STFangsong, 'Zhuque Fangsong', Georgia, 'Times New Roman', serif",docx:{ascii:"Georgia",eastAsia:"FangSong"}},Palatino:{name:"Palatino",displayName:"Palatino",webFallback:"Palatino, Georgia, 'Times New Roman', serif, STSong, SimSun",docx:{ascii:"Palatino Linotype",eastAsia:"SimSun"}},Verdana:{name:"Verdana",displayName:"Verdana",webFallback:"Verdana, Geneva, Tahoma, Arial, sans-serif, SimHei",docx:{ascii:"Verdana",eastAsia:"SimHei"}},Tahoma:{name:"Tahoma",displayName:"Tahoma",webFallback:"Tahoma, Verdana, Arial, sans-serif, SimHei",docx:{ascii:"Tahoma",eastAsia:"SimHei"}},"Trebuchet MS":{name:"Trebuchet MS",displayName:"Trebuchet MS",webFallback:"'Trebuchet MS', Tahoma, Arial, sans-serif, SimHei",docx:{ascii:"Trebuchet MS",eastAsia:"SimHei"}},"Comic Sans MS":{name:"Comic Sans MS",displayName:"Comic Sans MS",webFallback:"'Comic Sans MS', 'Comic Neue', 'Marker Felt', FangSong, STFangsong, 'Zhuque Fangsong'",docx:{ascii:"Comic Sans MS",eastAsia:"FangSong"}},Impact:{name:"Impact",displayName:"Impact",webFallback:"Impact, 'Arial Black', Arial, sans-serif, SimHei",docx:{ascii:"Impact",eastAsia:"SimHei"}},"Lucida Grande":{name:"Lucida Grande",displayName:"Lucida Grande",webFallback:"'Lucida Grande', Geneva, Verdana, Arial, sans-serif, STHeiti, SimHei",docx:{ascii:"Lucida Sans Unicode",eastAsia:"SimHei"}},"Palatino Linotype":{name:"Palatino Linotype",displayName:"Palatino Linotype",webFallback:"'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, 'Times New Roman', serif, SimSun, STSong",docx:{ascii:"Palatino Linotype",eastAsia:"SimSun"}},Consolas:{name:"Consolas",displayName:"Consolas",webFallback:"Consolas, Monaco, 'Courier New', monospace, FangSong, STFangsong, 'Zhuque Fangsong'",docx:{ascii:"Consolas",eastAsia:"FangSong"}},Garamond:{name:"Garamond",displayName:"Garamond",webFallback:"Garamond, 'Times New Roman', Georgia, serif, SimSun, STSong",docx:{ascii:"Garamond",eastAsia:"SimSun"}},"Helvetica Neue":{name:"Helvetica Neue",displayName:"Helvetica Neue",webFallback:"'Helvetica Neue', Helvetica, Arial, sans-serif, SimHei, STHeiti",docx:{ascii:"Arial",eastAsia:"SimHei"}},"Century Gothic":{name:"Century Gothic",displayName:"Century Gothic",webFallback:"'Century Gothic', 'Apple Gothic', Arial, sans-serif, SimHei, STHeiti",docx:{ascii:"Century Gothic",eastAsia:"SimHei"}}}};function vt(e){return typeof e>"u"||e===null}function _i(e){return typeof e=="object"&&e!==null}function Ti(e){return Array.isArray(e)?e:vt(e)?[]:[e]}function Ai(e,n){var t,i,r,a;if(n)for(a=Object.keys(n),t=0,i=a.length;t<i;t+=1)r=a[t],e[r]=n[r];return e}function Fi(e,n){var t="",i;for(i=0;i<n;i+=1)t+=e;return t}function Ci(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Mi=vt,Bi=_i,Pi=Ti,Ei=Fi,Ri=Ci,Li=Ai,H={isNothing:Mi,isObject:Bi,toArray:Pi,repeat:Ei,isNegativeZero:Ri,extend:Li};function St(e,n){var t="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(t+='in "'+e.mark.name+'" '),t+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(t+=`
2
+
3
+ `+e.mark.snippet),i+" "+t):i}function qe(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=St(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}qe.prototype=Object.create(Error.prototype);qe.prototype.constructor=qe;qe.prototype.toString=function(n){return this.name+": "+St(this,n)};var J=qe;function Tn(e,n,t,i,r){var a="",o="",l=Math.floor(r/2)-1;return i-n>l&&(a=" ... ",n=i-l+a.length),t-i>l&&(o=" ...",t=i+l-o.length),{str:a+e.slice(n,t).replace(/\t/g,"\u2192")+o,pos:i-n+a.length}}function An(e,n){return H.repeat(" ",n-e.length)+e}function Ii(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var t=/\r?\n|\r|\0/g,i=[0],r=[],a,o=-1;a=t.exec(e.buffer);)r.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var l="",s,d,c=Math.min(e.line+n.linesAfter,r.length).toString().length,p=n.maxLength-(n.indent+c+3);for(s=1;s<=n.linesBefore&&!(o-s<0);s++)d=Tn(e.buffer,i[o-s],r[o-s],e.position-(i[o]-i[o-s]),p),l=H.repeat(" ",n.indent)+An((e.line-s+1).toString(),c)+" | "+d.str+`
4
+ `+l;for(d=Tn(e.buffer,i[o],r[o],e.position,p),l+=H.repeat(" ",n.indent)+An((e.line+1).toString(),c)+" | "+d.str+`
5
+ `,l+=H.repeat("-",n.indent+c+3+d.pos)+`^
6
+ `,s=1;s<=n.linesAfter&&!(o+s>=r.length);s++)d=Tn(e.buffer,i[o+s],r[o+s],e.position-(i[o]-i[o+s]),p),l+=H.repeat(" ",n.indent)+An((e.line+s+1).toString(),c)+" | "+d.str+`
7
+ `;return l.replace(/\n$/,"")}var Oi=Ii,Ni=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ji=["scalar","sequence","mapping"];function Hi(e){var n={};return e!==null&&Object.keys(e).forEach(function(t){e[t].forEach(function(i){n[String(i)]=t})}),n}function Di(e,n){if(n=n||{},Object.keys(n).forEach(function(t){if(Ni.indexOf(t)===-1)throw new J('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(t){return t},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=Hi(n.styleAliases||null),ji.indexOf(this.kind)===-1)throw new J('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var U=Di;function at(e,n){var t=[];return e[n].forEach(function(i){var r=t.length;t.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(r=o)}),t[r]=i}),t}function zi(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,t;function i(r){r.multi?(e.multi[r.kind].push(r),e.multi.fallback.push(r)):e[r.kind][r.tag]=e.fallback[r.tag]=r}for(n=0,t=arguments.length;n<t;n+=1)arguments[n].forEach(i);return e}function Cn(e){return this.extend(e)}Cn.prototype.extend=function(n){var t=[],i=[];if(n instanceof U)i.push(n);else if(Array.isArray(n))i=i.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(t=t.concat(n.implicit)),n.explicit&&(i=i.concat(n.explicit));else throw new J("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.forEach(function(a){if(!(a instanceof U))throw new J("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new J("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new J("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof U))throw new J("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(Cn.prototype);return r.implicit=(this.implicit||[]).concat(t),r.explicit=(this.explicit||[]).concat(i),r.compiledImplicit=at(r,"implicit"),r.compiledExplicit=at(r,"explicit"),r.compiledTypeMap=zi(r.compiledImplicit,r.compiledExplicit),r};var $i=Cn,Ui=new U("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),qi=new U("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Gi=new U("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Vi=new $i({explicit:[Ui,qi,Gi]});function Wi(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function Yi(){return null}function Ki(e){return e===null}var Xi=new U("tag:yaml.org,2002:null",{kind:"scalar",resolve:Wi,construct:Yi,predicate:Ki,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Ji(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function Qi(e){return e==="true"||e==="True"||e==="TRUE"}function Zi(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var eo=new U("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ji,construct:Qi,predicate:Zi,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function no(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function to(e){return 48<=e&&e<=55}function ro(e){return 48<=e&&e<=57}function io(e){if(e===null)return!1;var n=e.length,t=0,i=!1,r;if(!n)return!1;if(r=e[t],(r==="-"||r==="+")&&(r=e[++t]),r==="0"){if(t+1===n)return!0;if(r=e[++t],r==="b"){for(t++;t<n;t++)if(r=e[t],r!=="_"){if(r!=="0"&&r!=="1")return!1;i=!0}return i&&r!=="_"}if(r==="x"){for(t++;t<n;t++)if(r=e[t],r!=="_"){if(!no(e.charCodeAt(t)))return!1;i=!0}return i&&r!=="_"}if(r==="o"){for(t++;t<n;t++)if(r=e[t],r!=="_"){if(!to(e.charCodeAt(t)))return!1;i=!0}return i&&r!=="_"}}if(r==="_")return!1;for(;t<n;t++)if(r=e[t],r!=="_"){if(!ro(e.charCodeAt(t)))return!1;i=!0}return!(!i||r==="_")}function oo(e){var n=e,t=1,i;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),i=n[0],(i==="-"||i==="+")&&(i==="-"&&(t=-1),n=n.slice(1),i=n[0]),n==="0")return 0;if(i==="0"){if(n[1]==="b")return t*parseInt(n.slice(2),2);if(n[1]==="x")return t*parseInt(n.slice(2),16);if(n[1]==="o")return t*parseInt(n.slice(2),8)}return t*parseInt(n,10)}function ao(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!H.isNegativeZero(e)}var lo=new U("tag:yaml.org,2002:int",{kind:"scalar",resolve:io,construct:oo,predicate:ao,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"]}}),so=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function co(e){return!(e===null||!so.test(e)||e[e.length-1]==="_")}function po(e){var n,t;return n=e.replace(/_/g,"").toLowerCase(),t=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:t*parseFloat(n,10)}var fo=/^[-+]?[0-9]+e/;function mo(e,n){var t;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(H.isNegativeZero(e))return"-0.0";return t=e.toString(10),fo.test(t)?t.replace("e",".e"):t}function uo(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||H.isNegativeZero(e))}var ho=new U("tag:yaml.org,2002:float",{kind:"scalar",resolve:co,construct:po,predicate:uo,represent:mo,defaultStyle:"lowercase"}),go=Vi.extend({implicit:[Xi,eo,lo,ho]}),yo=go,kt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),_t=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]))?))?$");function bo(e){return e===null?!1:kt.exec(e)!==null||_t.exec(e)!==null}function wo(e){var n,t,i,r,a,o,l,s=0,d=null,c,p,f;if(n=kt.exec(e),n===null&&(n=_t.exec(e)),n===null)throw new Error("Date resolve error");if(t=+n[1],i=+n[2]-1,r=+n[3],!n[4])return new Date(Date.UTC(t,i,r));if(a=+n[4],o=+n[5],l=+n[6],n[7]){for(s=n[7].slice(0,3);s.length<3;)s+="0";s=+s}return n[9]&&(c=+n[10],p=+(n[11]||0),d=(c*60+p)*6e4,n[9]==="-"&&(d=-d)),f=new Date(Date.UTC(t,i,r,a,o,l,s)),d&&f.setTime(f.getTime()-d),f}function xo(e){return e.toISOString()}var vo=new U("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:bo,construct:wo,instanceOf:Date,represent:xo});function So(e){return e==="<<"||e===null}var ko=new U("tag:yaml.org,2002:merge",{kind:"scalar",resolve:So}),Rn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
8
+ \r`;function _o(e){if(e===null)return!1;var n,t,i=0,r=e.length,a=Rn;for(t=0;t<r;t++)if(n=a.indexOf(e.charAt(t)),!(n>64)){if(n<0)return!1;i+=6}return i%8===0}function To(e){var n,t,i=e.replace(/[\r\n=]/g,""),r=i.length,a=Rn,o=0,l=[];for(n=0;n<r;n++)n%4===0&&n&&(l.push(o>>16&255),l.push(o>>8&255),l.push(o&255)),o=o<<6|a.indexOf(i.charAt(n));return t=r%4*6,t===0?(l.push(o>>16&255),l.push(o>>8&255),l.push(o&255)):t===18?(l.push(o>>10&255),l.push(o>>2&255)):t===12&&l.push(o>>4&255),new Uint8Array(l)}function Ao(e){var n="",t=0,i,r,a=e.length,o=Rn;for(i=0;i<a;i++)i%3===0&&i&&(n+=o[t>>18&63],n+=o[t>>12&63],n+=o[t>>6&63],n+=o[t&63]),t=(t<<8)+e[i];return r=a%3,r===0?(n+=o[t>>18&63],n+=o[t>>12&63],n+=o[t>>6&63],n+=o[t&63]):r===2?(n+=o[t>>10&63],n+=o[t>>4&63],n+=o[t<<2&63],n+=o[64]):r===1&&(n+=o[t>>2&63],n+=o[t<<4&63],n+=o[64],n+=o[64]),n}function Fo(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Co=new U("tag:yaml.org,2002:binary",{kind:"scalar",resolve:_o,construct:To,predicate:Fo,represent:Ao}),Mo=Object.prototype.hasOwnProperty,Bo=Object.prototype.toString;function Po(e){if(e===null)return!0;var n=[],t,i,r,a,o,l=e;for(t=0,i=l.length;t<i;t+=1){if(r=l[t],o=!1,Bo.call(r)!=="[object Object]")return!1;for(a in r)if(Mo.call(r,a))if(!o)o=!0;else return!1;if(!o)return!1;if(n.indexOf(a)===-1)n.push(a);else return!1}return!0}function Eo(e){return e!==null?e:[]}var Ro=new U("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Po,construct:Eo}),Lo=Object.prototype.toString;function Io(e){if(e===null)return!0;var n,t,i,r,a,o=e;for(a=new Array(o.length),n=0,t=o.length;n<t;n+=1){if(i=o[n],Lo.call(i)!=="[object Object]"||(r=Object.keys(i),r.length!==1))return!1;a[n]=[r[0],i[r[0]]]}return!0}function Oo(e){if(e===null)return[];var n,t,i,r,a,o=e;for(a=new Array(o.length),n=0,t=o.length;n<t;n+=1)i=o[n],r=Object.keys(i),a[n]=[r[0],i[r[0]]];return a}var No=new U("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Io,construct:Oo}),jo=Object.prototype.hasOwnProperty;function Ho(e){if(e===null)return!0;var n,t=e;for(n in t)if(jo.call(t,n)&&t[n]!==null)return!1;return!0}function Do(e){return e!==null?e:{}}var zo=new U("tag:yaml.org,2002:set",{kind:"mapping",resolve:Ho,construct:Do}),Tt=yo.extend({implicit:[vo,ko],explicit:[Co,Ro,No,zo]}),xe=Object.prototype.hasOwnProperty,nn=1,At=2,Ft=3,tn=4,Fn=1,$o=2,lt=3,Uo=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,qo=/[\x85\u2028\u2029]/,Go=/[,\[\]\{\}]/,Ct=/^(?:!|!!|![a-z\-]+!)$/i,Mt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function st(e){return Object.prototype.toString.call(e)}function le(e){return e===10||e===13}function Ae(e){return e===9||e===32}function Q(e){return e===9||e===32||e===10||e===13}function Pe(e){return e===44||e===91||e===93||e===123||e===125}function Vo(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function Wo(e){return e===120?2:e===117?4:e===85?8:0}function Yo(e){return 48<=e&&e<=57?e-48:-1}function ct(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
9
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function Ko(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Bt(e,n,t){n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:t}):e[n]=t}var Pt=new Array(256),Et=new Array(256);for(Te=0;Te<256;Te++)Pt[Te]=ct(Te)?1:0,Et[Te]=ct(Te);var Te;function Xo(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||Tt,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.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 Rt(e,n){var t={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return t.snippet=Oi(t),new J(n,t)}function w(e,n){throw Rt(e,n)}function rn(e,n){e.onWarning&&e.onWarning.call(null,Rt(e,n))}var dt={YAML:function(n,t,i){var r,a,o;n.version!==null&&w(n,"duplication of %YAML directive"),i.length!==1&&w(n,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),r===null&&w(n,"ill-formed argument of the YAML directive"),a=parseInt(r[1],10),o=parseInt(r[2],10),a!==1&&w(n,"unacceptable YAML version of the document"),n.version=i[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&rn(n,"unsupported YAML version of the document")},TAG:function(n,t,i){var r,a;i.length!==2&&w(n,"TAG directive accepts exactly two arguments"),r=i[0],a=i[1],Ct.test(r)||w(n,"ill-formed tag handle (first argument) of the TAG directive"),xe.call(n.tagMap,r)&&w(n,'there is a previously declared suffix for "'+r+'" tag handle'),Mt.test(a)||w(n,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{w(n,"tag prefix is malformed: "+a)}n.tagMap[r]=a}};function we(e,n,t,i){var r,a,o,l;if(n<t){if(l=e.input.slice(n,t),i)for(r=0,a=l.length;r<a;r+=1)o=l.charCodeAt(r),o===9||32<=o&&o<=1114111||w(e,"expected valid JSON character");else Uo.test(l)&&w(e,"the stream contains non-printable characters");e.result+=l}}function pt(e,n,t,i){var r,a,o,l;for(H.isObject(t)||w(e,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(t),o=0,l=r.length;o<l;o+=1)a=r[o],xe.call(n,a)||(Bt(n,a,t[a]),i[a]=!0)}function Ee(e,n,t,i,r,a,o,l,s){var d,c;if(Array.isArray(r))for(r=Array.prototype.slice.call(r),d=0,c=r.length;d<c;d+=1)Array.isArray(r[d])&&w(e,"nested arrays are not supported inside keys"),typeof r=="object"&&st(r[d])==="[object Object]"&&(r[d]="[object Object]");if(typeof r=="object"&&st(r)==="[object Object]"&&(r="[object Object]"),r=String(r),n===null&&(n={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(d=0,c=a.length;d<c;d+=1)pt(e,n,a[d],t);else pt(e,n,a,t);else!e.json&&!xe.call(t,r)&&xe.call(n,r)&&(e.line=o||e.line,e.lineStart=l||e.lineStart,e.position=s||e.position,w(e,"duplicated mapping key")),Bt(n,r,a),delete t[r];return n}function Ln(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):w(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function O(e,n,t){for(var i=0,r=e.input.charCodeAt(e.position);r!==0;){for(;Ae(r);)r===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(n&&r===35)do r=e.input.charCodeAt(++e.position);while(r!==10&&r!==13&&r!==0);if(le(r))for(Ln(e),r=e.input.charCodeAt(e.position),i++,e.lineIndent=0;r===32;)e.lineIndent++,r=e.input.charCodeAt(++e.position);else break}return t!==-1&&i!==0&&e.lineIndent<t&&rn(e,"deficient indentation"),i}function ln(e){var n=e.position,t;return t=e.input.charCodeAt(n),!!((t===45||t===46)&&t===e.input.charCodeAt(n+1)&&t===e.input.charCodeAt(n+2)&&(n+=3,t=e.input.charCodeAt(n),t===0||Q(t)))}function In(e,n){n===1?e.result+=" ":n>1&&(e.result+=H.repeat(`
10
+ `,n-1))}function Jo(e,n,t){var i,r,a,o,l,s,d,c,p=e.kind,f=e.result,u;if(u=e.input.charCodeAt(e.position),Q(u)||Pe(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(r=e.input.charCodeAt(e.position+1),Q(r)||t&&Pe(r)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,l=!1;u!==0;){if(u===58){if(r=e.input.charCodeAt(e.position+1),Q(r)||t&&Pe(r))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),Q(i))break}else{if(e.position===e.lineStart&&ln(e)||t&&Pe(u))break;if(le(u))if(s=e.line,d=e.lineStart,c=e.lineIndent,O(e,!1,-1),e.lineIndent>=n){l=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=s,e.lineStart=d,e.lineIndent=c;break}}l&&(we(e,a,o,!1),In(e,e.line-s),a=o=e.position,l=!1),Ae(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return we(e,a,o,!1),e.result?!0:(e.kind=p,e.result=f,!1)}function Qo(e,n){var t,i,r;if(t=e.input.charCodeAt(e.position),t!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=r=e.position;(t=e.input.charCodeAt(e.position))!==0;)if(t===39)if(we(e,i,e.position,!0),t=e.input.charCodeAt(++e.position),t===39)i=e.position,e.position++,r=e.position;else return!0;else le(t)?(we(e,i,r,!0),In(e,O(e,!1,n)),i=r=e.position):e.position===e.lineStart&&ln(e)?w(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);w(e,"unexpected end of the stream within a single quoted scalar")}function Zo(e,n){var t,i,r,a,o,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,t=i=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return we(e,t,e.position,!0),e.position++,!0;if(l===92){if(we(e,t,e.position,!0),l=e.input.charCodeAt(++e.position),le(l))O(e,!1,n);else if(l<256&&Pt[l])e.result+=Et[l],e.position++;else if((o=Wo(l))>0){for(r=o,a=0;r>0;r--)l=e.input.charCodeAt(++e.position),(o=Vo(l))>=0?a=(a<<4)+o:w(e,"expected hexadecimal character");e.result+=Ko(a),e.position++}else w(e,"unknown escape sequence");t=i=e.position}else le(l)?(we(e,t,i,!0),In(e,O(e,!1,n)),t=i=e.position):e.position===e.lineStart&&ln(e)?w(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}w(e,"unexpected end of the stream within a double quoted scalar")}function ea(e,n){var t=!0,i,r,a,o=e.tag,l,s=e.anchor,d,c,p,f,u,m=Object.create(null),h,g,x,y;if(y=e.input.charCodeAt(e.position),y===91)c=93,u=!1,l=[];else if(y===123)c=125,u=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),y=e.input.charCodeAt(++e.position);y!==0;){if(O(e,!0,n),y=e.input.charCodeAt(e.position),y===c)return e.position++,e.tag=o,e.anchor=s,e.kind=u?"mapping":"sequence",e.result=l,!0;t?y===44&&w(e,"expected the node content, but found ','"):w(e,"missed comma between flow collection entries"),g=h=x=null,p=f=!1,y===63&&(d=e.input.charCodeAt(e.position+1),Q(d)&&(p=f=!0,e.position++,O(e,!0,n))),i=e.line,r=e.lineStart,a=e.position,Re(e,n,nn,!1,!0),g=e.tag,h=e.result,O(e,!0,n),y=e.input.charCodeAt(e.position),(f||e.line===i)&&y===58&&(p=!0,y=e.input.charCodeAt(++e.position),O(e,!0,n),Re(e,n,nn,!1,!0),x=e.result),u?Ee(e,l,m,g,h,x,i,r,a):p?l.push(Ee(e,null,m,g,h,x,i,r,a)):l.push(h),O(e,!0,n),y=e.input.charCodeAt(e.position),y===44?(t=!0,y=e.input.charCodeAt(++e.position)):t=!1}w(e,"unexpected end of the stream within a flow collection")}function na(e,n){var t,i,r=Fn,a=!1,o=!1,l=n,s=0,d=!1,c,p;if(p=e.input.charCodeAt(e.position),p===124)i=!1;else if(p===62)i=!0;else return!1;for(e.kind="scalar",e.result="";p!==0;)if(p=e.input.charCodeAt(++e.position),p===43||p===45)Fn===r?r=p===43?lt:$o:w(e,"repeat of a chomping mode identifier");else if((c=Yo(p))>=0)c===0?w(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?w(e,"repeat of an indentation width identifier"):(l=n+c-1,o=!0);else break;if(Ae(p)){do p=e.input.charCodeAt(++e.position);while(Ae(p));if(p===35)do p=e.input.charCodeAt(++e.position);while(!le(p)&&p!==0)}for(;p!==0;){for(Ln(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!o||e.lineIndent<l)&&p===32;)e.lineIndent++,p=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>l&&(l=e.lineIndent),le(p)){s++;continue}if(e.lineIndent<l){r===lt?e.result+=H.repeat(`
11
+ `,a?1+s:s):r===Fn&&a&&(e.result+=`
12
+ `);break}for(i?Ae(p)?(d=!0,e.result+=H.repeat(`
13
+ `,a?1+s:s)):d?(d=!1,e.result+=H.repeat(`
14
+ `,s+1)):s===0?a&&(e.result+=" "):e.result+=H.repeat(`
15
+ `,s):e.result+=H.repeat(`
16
+ `,a?1+s:s),a=!0,o=!0,s=0,t=e.position;!le(p)&&p!==0;)p=e.input.charCodeAt(++e.position);we(e,t,e.position,!1)}return!0}function ft(e,n){var t,i=e.tag,r=e.anchor,a=[],o,l=!1,s;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),s=e.input.charCodeAt(e.position);s!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,w(e,"tab characters must not be used in indentation")),!(s!==45||(o=e.input.charCodeAt(e.position+1),!Q(o))));){if(l=!0,e.position++,O(e,!0,-1)&&e.lineIndent<=n){a.push(null),s=e.input.charCodeAt(e.position);continue}if(t=e.line,Re(e,n,Ft,!1,!0),a.push(e.result),O(e,!0,-1),s=e.input.charCodeAt(e.position),(e.line===t||e.lineIndent>n)&&s!==0)w(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return l?(e.tag=i,e.anchor=r,e.kind="sequence",e.result=a,!0):!1}function ta(e,n,t){var i,r,a,o,l,s,d=e.tag,c=e.anchor,p={},f=Object.create(null),u=null,m=null,h=null,g=!1,x=!1,y;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=p),y=e.input.charCodeAt(e.position);y!==0;){if(!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,w(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(y===63||y===58)&&Q(i))y===63?(g&&(Ee(e,p,f,u,m,null,o,l,s),u=m=h=null),x=!0,g=!0,r=!0):g?(g=!1,r=!0):w(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,y=i;else{if(o=e.line,l=e.lineStart,s=e.position,!Re(e,t,At,!1,!0))break;if(e.line===a){for(y=e.input.charCodeAt(e.position);Ae(y);)y=e.input.charCodeAt(++e.position);if(y===58)y=e.input.charCodeAt(++e.position),Q(y)||w(e,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(Ee(e,p,f,u,m,null,o,l,s),u=m=h=null),x=!0,g=!1,r=!1,u=e.tag,m=e.result;else if(x)w(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=d,e.anchor=c,!0}else if(x)w(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=d,e.anchor=c,!0}if((e.line===a||e.lineIndent>n)&&(g&&(o=e.line,l=e.lineStart,s=e.position),Re(e,n,tn,!0,r)&&(g?m=e.result:h=e.result),g||(Ee(e,p,f,u,m,h,o,l,s),u=m=h=null),O(e,!0,-1),y=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>n)&&y!==0)w(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return g&&Ee(e,p,f,u,m,null,o,l,s),x&&(e.tag=d,e.anchor=c,e.kind="mapping",e.result=p),x}function ra(e){var n,t=!1,i=!1,r,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&w(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(t=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,r="!!",o=e.input.charCodeAt(++e.position)):r="!",n=e.position,t){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(n,e.position),o=e.input.charCodeAt(++e.position)):w(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Q(o);)o===33&&(i?w(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(n-1,e.position+1),Ct.test(r)||w(e,"named tag handle cannot contain such characters"),i=!0,n=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(n,e.position),Go.test(a)&&w(e,"tag suffix cannot contain flow indicator characters")}a&&!Mt.test(a)&&w(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{w(e,"tag name is malformed: "+a)}return t?e.tag=a:xe.call(e.tagMap,r)?e.tag=e.tagMap[r]+a:r==="!"?e.tag="!"+a:r==="!!"?e.tag="tag:yaml.org,2002:"+a:w(e,'undeclared tag handle "'+r+'"'),!0}function ia(e){var n,t;if(t=e.input.charCodeAt(e.position),t!==38)return!1;for(e.anchor!==null&&w(e,"duplication of an anchor property"),t=e.input.charCodeAt(++e.position),n=e.position;t!==0&&!Q(t)&&!Pe(t);)t=e.input.charCodeAt(++e.position);return e.position===n&&w(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function oa(e){var n,t,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),n=e.position;i!==0&&!Q(i)&&!Pe(i);)i=e.input.charCodeAt(++e.position);return e.position===n&&w(e,"name of an alias node must contain at least one character"),t=e.input.slice(n,e.position),xe.call(e.anchorMap,t)||w(e,'unidentified alias "'+t+'"'),e.result=e.anchorMap[t],O(e,!0,-1),!0}function Re(e,n,t,i,r){var a,o,l,s=1,d=!1,c=!1,p,f,u,m,h,g;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=l=tn===t||Ft===t,i&&O(e,!0,-1)&&(d=!0,e.lineIndent>n?s=1:e.lineIndent===n?s=0:e.lineIndent<n&&(s=-1)),s===1)for(;ra(e)||ia(e);)O(e,!0,-1)?(d=!0,l=a,e.lineIndent>n?s=1:e.lineIndent===n?s=0:e.lineIndent<n&&(s=-1)):l=!1;if(l&&(l=d||r),(s===1||tn===t)&&(nn===t||At===t?h=n:h=n+1,g=e.position-e.lineStart,s===1?l&&(ft(e,g)||ta(e,g,h))||ea(e,h)?c=!0:(o&&na(e,h)||Qo(e,h)||Zo(e,h)?c=!0:oa(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&w(e,"alias node should not have any properties")):Jo(e,h,nn===t)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):s===0&&(c=l&&ft(e,g))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&w(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),p=0,f=e.implicitTypes.length;p<f;p+=1)if(m=e.implicitTypes[p],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(xe.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=null,u=e.typeMap.multi[e.kind||"fallback"],p=0,f=u.length;p<f;p+=1)if(e.tag.slice(0,u[p].tag.length)===u[p].tag){m=u[p];break}m||w(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&w(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):w(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}function aa(e){var n=e.position,t,i,r,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(O(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),t=e.position;o!==0&&!Q(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(t,e.position),r=[],i.length<1&&w(e,"directive name must not be less than one character in length");o!==0;){for(;Ae(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!le(o));break}if(le(o))break;for(t=e.position;o!==0&&!Q(o);)o=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}o!==0&&Ln(e),xe.call(dt,i)?dt[i](e,i,r):rn(e,'unknown document directive "'+i+'"')}if(O(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,O(e,!0,-1)):a&&w(e,"directives end mark is expected"),Re(e,e.lineIndent-1,tn,!1,!0),O(e,!0,-1),e.checkLineBreaks&&qo.test(e.input.slice(n,e.position))&&rn(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ln(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,O(e,!0,-1));return}if(e.position<e.length-1)w(e,"end of the stream or a document separator is expected");else return}function Lt(e,n){e=String(e),n=n||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
17
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var t=new Xo(e,n),i=e.indexOf("\0");for(i!==-1&&(t.position=i,w(t,"null byte is not allowed in input")),t.input+="\0";t.input.charCodeAt(t.position)===32;)t.lineIndent+=1,t.position+=1;for(;t.position<t.length-1;)aa(t);return t.documents}function la(e,n,t){n!==null&&typeof n=="object"&&typeof t>"u"&&(t=n,n=null);var i=Lt(e,t);if(typeof n!="function")return i;for(var r=0,a=i.length;r<a;r+=1)n(i[r])}function sa(e,n){var t=Lt(e,n);if(t.length!==0){if(t.length===1)return t[0];throw new J("expected a single document in the stream, but found more")}}var ca=la,da=sa,It={loadAll:ca,load:da},Ot=Object.prototype.toString,Nt=Object.prototype.hasOwnProperty,On=65279,pa=9,Ge=10,fa=13,ma=32,ua=33,ha=34,Mn=35,ga=37,ya=38,ba=39,wa=42,jt=44,xa=45,on=58,va=61,Sa=62,ka=63,_a=64,Ht=91,Dt=93,Ta=96,zt=123,Aa=124,$t=125,q={};q[0]="\\0";q[7]="\\a";q[8]="\\b";q[9]="\\t";q[10]="\\n";q[11]="\\v";q[12]="\\f";q[13]="\\r";q[27]="\\e";q[34]='\\"';q[92]="\\\\";q[133]="\\N";q[160]="\\_";q[8232]="\\L";q[8233]="\\P";var Fa=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Ca=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ma(e,n){var t,i,r,a,o,l,s;if(n===null)return{};for(t={},i=Object.keys(n),r=0,a=i.length;r<a;r+=1)o=i[r],l=String(n[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),s=e.compiledTypeMap.fallback[o],s&&Nt.call(s.styleAliases,l)&&(l=s.styleAliases[l]),t[o]=l;return t}function Ba(e){var n,t,i;if(n=e.toString(16).toUpperCase(),e<=255)t="x",i=2;else if(e<=65535)t="u",i=4;else if(e<=4294967295)t="U",i=8;else throw new J("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+t+H.repeat("0",i-n.length)+n}var Pa=1,Ve=2;function Ea(e){this.schema=e.schema||Tt,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=H.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Ma(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==='"'?Ve:Pa,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function mt(e,n){for(var t=H.repeat(" ",n),i=0,r=-1,a="",o,l=e.length;i<l;)r=e.indexOf(`
18
+ `,i),r===-1?(o=e.slice(i),i=l):(o=e.slice(i,r+1),i=r+1),o.length&&o!==`
19
+ `&&(a+=t),a+=o;return a}function Bn(e,n){return`
20
+ `+H.repeat(" ",e.indent*n)}function Ra(e,n){var t,i,r;for(t=0,i=e.implicitTypes.length;t<i;t+=1)if(r=e.implicitTypes[t],r.resolve(n))return!0;return!1}function an(e){return e===ma||e===pa}function We(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==On||65536<=e&&e<=1114111}function ut(e){return We(e)&&e!==On&&e!==fa&&e!==Ge}function ht(e,n,t){var i=ut(e),r=i&&!an(e);return(t?i:i&&e!==jt&&e!==Ht&&e!==Dt&&e!==zt&&e!==$t)&&e!==Mn&&!(n===on&&!r)||ut(n)&&!an(n)&&e===Mn||n===on&&r}function La(e){return We(e)&&e!==On&&!an(e)&&e!==xa&&e!==ka&&e!==on&&e!==jt&&e!==Ht&&e!==Dt&&e!==zt&&e!==$t&&e!==Mn&&e!==ya&&e!==wa&&e!==ua&&e!==Aa&&e!==va&&e!==Sa&&e!==ba&&e!==ha&&e!==ga&&e!==_a&&e!==Ta}function Ia(e){return!an(e)&&e!==on}function Ue(e,n){var t=e.charCodeAt(n),i;return t>=55296&&t<=56319&&n+1<e.length&&(i=e.charCodeAt(n+1),i>=56320&&i<=57343)?(t-55296)*1024+i-56320+65536:t}function Ut(e){var n=/^\n* /;return n.test(e)}var qt=1,Pn=2,Gt=3,Vt=4,Be=5;function Oa(e,n,t,i,r,a,o,l){var s,d=0,c=null,p=!1,f=!1,u=i!==-1,m=-1,h=La(Ue(e,0))&&Ia(Ue(e,e.length-1));if(n||o)for(s=0;s<e.length;d>=65536?s+=2:s++){if(d=Ue(e,s),!We(d))return Be;h=h&&ht(d,c,l),c=d}else{for(s=0;s<e.length;d>=65536?s+=2:s++){if(d=Ue(e,s),d===Ge)p=!0,u&&(f=f||s-m-1>i&&e[m+1]!==" ",m=s);else if(!We(d))return Be;h=h&&ht(d,c,l),c=d}f=f||u&&s-m-1>i&&e[m+1]!==" "}return!p&&!f?h&&!o&&!r(e)?qt:a===Ve?Be:Pn:t>9&&Ut(e)?Be:o?a===Ve?Be:Pn:f?Vt:Gt}function Na(e,n,t,i,r){e.dump=(function(){if(n.length===0)return e.quotingType===Ve?'""':"''";if(!e.noCompatMode&&(Fa.indexOf(n)!==-1||Ca.test(n)))return e.quotingType===Ve?'"'+n+'"':"'"+n+"'";var a=e.indent*Math.max(1,t),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),l=i||e.flowLevel>-1&&t>=e.flowLevel;function s(d){return Ra(e,d)}switch(Oa(n,l,e.indent,o,s,e.quotingType,e.forceQuotes&&!i,r)){case qt:return n;case Pn:return"'"+n.replace(/'/g,"''")+"'";case Gt:return"|"+gt(n,e.indent)+yt(mt(n,a));case Vt:return">"+gt(n,e.indent)+yt(mt(ja(n,o),a));case Be:return'"'+Ha(n)+'"';default:throw new J("impossible error: invalid scalar style")}})()}function gt(e,n){var t=Ut(e)?String(n):"",i=e[e.length-1]===`
21
+ `,r=i&&(e[e.length-2]===`
22
+ `||e===`
23
+ `),a=r?"+":i?"":"-";return t+a+`
24
+ `}function yt(e){return e[e.length-1]===`
25
+ `?e.slice(0,-1):e}function ja(e,n){for(var t=/(\n+)([^\n]*)/g,i=(function(){var d=e.indexOf(`
26
+ `);return d=d!==-1?d:e.length,t.lastIndex=d,bt(e.slice(0,d),n)})(),r=e[0]===`
27
+ `||e[0]===" ",a,o;o=t.exec(e);){var l=o[1],s=o[2];a=s[0]===" ",i+=l+(!r&&!a&&s!==""?`
28
+ `:"")+bt(s,n),r=a}return i}function bt(e,n){if(e===""||e[0]===" ")return e;for(var t=/ [^ ]/g,i,r=0,a,o=0,l=0,s="";i=t.exec(e);)l=i.index,l-r>n&&(a=o>r?o:l,s+=`
29
+ `+e.slice(r,a),r=a+1),o=l;return s+=`
30
+ `,e.length-r>n&&o>r?s+=e.slice(r,o)+`
31
+ `+e.slice(o+1):s+=e.slice(r),s.slice(1)}function Ha(e){for(var n="",t=0,i,r=0;r<e.length;t>=65536?r+=2:r++)t=Ue(e,r),i=q[t],!i&&We(t)?(n+=e[r],t>=65536&&(n+=e[r+1])):n+=i||Ba(t);return n}function Da(e,n,t){var i="",r=e.tag,a,o,l;for(a=0,o=t.length;a<o;a+=1)l=t[a],e.replacer&&(l=e.replacer.call(t,String(a),l)),(ue(e,n,l,!1,!1)||typeof l>"u"&&ue(e,n,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=r,e.dump="["+i+"]"}function wt(e,n,t,i){var r="",a=e.tag,o,l,s;for(o=0,l=t.length;o<l;o+=1)s=t[o],e.replacer&&(s=e.replacer.call(t,String(o),s)),(ue(e,n+1,s,!0,!0,!1,!0)||typeof s>"u"&&ue(e,n+1,null,!0,!0,!1,!0))&&((!i||r!=="")&&(r+=Bn(e,n)),e.dump&&Ge===e.dump.charCodeAt(0)?r+="-":r+="- ",r+=e.dump);e.tag=a,e.dump=r||"[]"}function za(e,n,t){var i="",r=e.tag,a=Object.keys(t),o,l,s,d,c;for(o=0,l=a.length;o<l;o+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),s=a[o],d=t[s],e.replacer&&(d=e.replacer.call(t,s,d)),ue(e,n,s,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ue(e,n,d,!1,!1)&&(c+=e.dump,i+=c));e.tag=r,e.dump="{"+i+"}"}function $a(e,n,t,i){var r="",a=e.tag,o=Object.keys(t),l,s,d,c,p,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new J("sortKeys must be a boolean or a function");for(l=0,s=o.length;l<s;l+=1)f="",(!i||r!=="")&&(f+=Bn(e,n)),d=o[l],c=t[d],e.replacer&&(c=e.replacer.call(t,d,c)),ue(e,n+1,d,!0,!0,!0)&&(p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,p&&(e.dump&&Ge===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,p&&(f+=Bn(e,n)),ue(e,n+1,c,!0,p)&&(e.dump&&Ge===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,r+=f));e.tag=a,e.dump=r||"{}"}function xt(e,n,t){var i,r,a,o,l,s;for(r=t?e.explicitTypes:e.implicitTypes,a=0,o=r.length;a<o;a+=1)if(l=r[a],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof n=="object"&&n instanceof l.instanceOf)&&(!l.predicate||l.predicate(n))){if(t?l.multi&&l.representName?e.tag=l.representName(n):e.tag=l.tag:e.tag="?",l.represent){if(s=e.styleMap[l.tag]||l.defaultStyle,Ot.call(l.represent)==="[object Function]")i=l.represent(n,s);else if(Nt.call(l.represent,s))i=l.represent[s](n,s);else throw new J("!<"+l.tag+'> tag resolver accepts not "'+s+'" style');e.dump=i}return!0}return!1}function ue(e,n,t,i,r,a,o){e.tag=null,e.dump=t,xt(e,t,!1)||xt(e,t,!0);var l=Ot.call(e.dump),s=i,d;i&&(i=e.flowLevel<0||e.flowLevel>n);var c=l==="[object Object]"||l==="[object Array]",p,f;if(c&&(p=e.duplicates.indexOf(t),f=p!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&n>0)&&(r=!1),f&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(c&&f&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),l==="[object Object]")i&&Object.keys(e.dump).length!==0?($a(e,n,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(za(e,n,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump));else if(l==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?wt(e,n-1,e.dump,r):wt(e,n,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(Da(e,n,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&Na(e,e.dump,n,a,s);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new J("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function Ua(e,n){var t=[],i=[],r,a;for(En(e,t,i),r=0,a=i.length;r<a;r+=1)n.duplicates.push(t[i[r]]);n.usedDuplicates=new Array(a)}function En(e,n,t){var i,r,a;if(e!==null&&typeof e=="object")if(r=n.indexOf(e),r!==-1)t.indexOf(r)===-1&&t.push(r);else if(n.push(e),Array.isArray(e))for(r=0,a=e.length;r<a;r+=1)En(e[r],n,t);else for(i=Object.keys(e),r=0,a=i.length;r<a;r+=1)En(e[i[r]],n,t)}function qa(e,n){n=n||{};var t=new Ea(n);t.noRefs||Ua(e,t);var i=e;return t.replacer&&(i=t.replacer.call({"":i},"",i)),ue(t,0,i,!0,!0)?t.dump+`
32
+ `:""}var Ga=qa,Va={dump:Ga};function Nn(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var Wt=It.load,Sl=It.loadAll,kl=Va.dump;var _l=Nn("safeLoad","load"),Tl=Nn("safeLoadAll","loadAll"),Al=Nn("safeDump","dump");var Yt={"html/example.html":`<div class="md2x-html-example">
33
+ <div class="my-component">Hello md2x! This is html template</div>
34
+ <div class="items"></div>
35
+
36
+ <script>
37
+ (() => {
38
+ const root = document.currentScript && document.currentScript.parentElement;
39
+ if (!root) return;
40
+
41
+ const data = templateData;
42
+ const items = root.querySelector('.items');
43
+ if (!items) return;
44
+
45
+ // Render a simple list: [{ title, message }, ...]
46
+ items.textContent = '';
47
+ const arr = Array.isArray(data) ? data : (data != null ? [data] : []);
48
+ for (let i = 0; i < arr.length; i++) {
49
+ const item = arr[i] || {};
50
+ const h2 = document.createElement('h2');
51
+ h2.textContent = item.title != null ? String(item.title) : '';
52
+ const p = document.createElement('p');
53
+ p.textContent = item.message != null ? String(item.message) : '';
54
+ items.appendChild(h2);
55
+ items.appendChild(p);
56
+ }
57
+ })();
58
+ </script>
59
+
60
+ <style>
61
+ .md2x-html-example .my-component {
62
+ color: red;
63
+ }
64
+ </style>
65
+ </div>
66
+
67
+ `,"svelte/example.svelte":`<script>
68
+ const data = templateData;
69
+ </script>
70
+
71
+ <div class="my-component">Hello md2x! This is svelte template</div>
72
+ {#each data as item, index}
73
+ <div>
74
+ <h2>{item.title}</h2>
75
+ <p>{item.message}</p>
76
+ </div>
77
+ {/each}
78
+
79
+ <style>
80
+ .my-component {
81
+ color: red;
82
+ }
83
+ </style>
84
+
85
+ `,"vue/PrinterComponent.vue":`<template>
86
+ <div>
87
+ <div id="modal" :class="modalClass">
88
+ <div>
89
+ <h3>Quick Tip</h3>
90
+ <p>
91
+ Press the black button to print. <br />
92
+ Red means ready, green means printing and temporarily disabled.
93
+ </p>
94
+ <button id="okay-button" @click="handleOkayClick">Okay</button>
95
+ </div>
96
+ </div>
97
+
98
+ <div class="printer">
99
+ <div>
100
+ <p>Zee Printer</p>
101
+ <button id="print-button" @click="handlePrintClick">
102
+ <div id="print-icon" :class="printIconClass">
103
+ <div><div></div></div>
104
+ <div></div>
105
+ </div>
106
+ <div id="print-indicator" :class="printIndicatorClass"></div>
107
+ </button>
108
+ </div>
109
+ <div></div>
110
+ <div>
111
+ <div id="receipts-wrapper" ref="receiptsWrapperRef">
112
+ <div id="receipt-wrapper" ref="receiptWrapperRef">
113
+ <div id="receipt-container" :class="{ print: hasPrinted }">
114
+ <div class="receipt">
115
+ <div class="receipt-header">
116
+ <div>
117
+ <p>Payment Successful</p>
118
+ <p>
119
+ <span>11 May 2024</span>
120
+ <span>08:30 PM</span>
121
+ </p>
122
+ </div>
123
+ <div></div>
124
+ </div>
125
+ <div class="receipt-body">
126
+ <div>
127
+ <div>
128
+ <p>1x Jollof Rice & Turkey</p>
129
+ <p><span>\u20A6</span>3,500.00</p>
130
+ </div>
131
+ <div>
132
+ <p>1x Zobo Drink</p>
133
+ <p><span>\u20A6</span>800.00</p>
134
+ </div>
135
+ <div>
136
+ <p>1x Small Chops Pack</p>
137
+ <p><span>\u20A6</span>2,500.00</p>
138
+ </div>
139
+ </div>
140
+ <div>
141
+ <div>
142
+ <p>Subtotal</p>
143
+ <p><span>\u20A6</span>6,800.00</p>
144
+ </div>
145
+ <div>
146
+ <p>VAT (9%)</p>
147
+ <p><span>\u20A6</span>612.00</p>
148
+ </div>
149
+ <div>
150
+ <p>Service Fee</p>
151
+ <p><span>\u20A6</span>2,500.00</p>
152
+ </div>
153
+ </div>
154
+ </div>
155
+ <div class="receipt-footer">
156
+ <div>
157
+ <p>TOTAL</p>
158
+ <p><span>\u20A6</span>7,450.00</p>
159
+ </div>
160
+ <div>
161
+ <div class="emoji">
162
+ <div>
163
+ <span>
164
+ <span><span></span></span>
165
+ <span><span></span></span>
166
+ </span>
167
+ <span><span></span></span>
168
+ </div>
169
+ </div>
170
+ <span>THANK YOU</span>
171
+ </div>
172
+ </div>
173
+ </div>
174
+ <div class="cutout">
175
+ <div><div></div></div>
176
+ </div>
177
+ </div>
178
+ </div>
179
+ </div>
180
+ </div>
181
+ </div>
182
+ </div>
183
+ </template>
184
+
185
+ <script setup>
186
+ import { ref, computed, onMounted } from 'vue'
187
+
188
+ const modalClass = ref('fade-in-animation')
189
+ const isPrinting = ref(false)
190
+ const hasPrinted = ref(false)
191
+ const indicatorState = ref('inactive')
192
+
193
+ const receiptsWrapperRef = ref(null)
194
+ const receiptWrapperRef = ref(null)
195
+
196
+ const printerSound = new Audio('./printer.mp3')
197
+ printerSound.currentTime = 0
198
+
199
+ const printIndicatorClass = computed(() => \`\${indicatorState.value}-background\`)
200
+ const printIconClass = computed(() => \`\${indicatorState.value}-icon\`)
201
+
202
+ const setPrintIndicator = (state) => {
203
+ indicatorState.value = state
204
+ }
205
+
206
+ const handleOkayClick = () => {
207
+ modalClass.value = 'fade-out-animation'
208
+ }
209
+
210
+ const handlePrintClick = () => {
211
+ if (isPrinting.value) return
212
+
213
+ isPrinting.value = true
214
+
215
+ let newReceipt = null
216
+
217
+ printerSound.play()
218
+
219
+ setPrintIndicator('active')
220
+
221
+ if (hasPrinted.value) {
222
+ newReceipt = receiptWrapperRef.value.cloneNode(true)
223
+ receiptsWrapperRef.value.appendChild(newReceipt)
224
+ } else {
225
+ hasPrinted.value = true
226
+ }
227
+
228
+ setTimeout(() => {
229
+ isPrinting.value = false
230
+ printerSound.pause()
231
+ printerSound.currentTime = 0
232
+
233
+ if (newReceipt) {
234
+ newReceipt.classList.add('fade-out')
235
+
236
+ setTimeout(() => {
237
+ newReceipt.remove()
238
+ }, 5000)
239
+ }
240
+
241
+ setPrintIndicator('inactive')
242
+ }, 6500)
243
+ }
244
+
245
+ onMounted(() => {
246
+ setPrintIndicator('inactive')
247
+ })
248
+ </script>
249
+
250
+ <style>
251
+ @import url("https://fonts.googleapis.com/css2?family=Geist+Mono:wght@100..900&family=Pacifico&display=swap");
252
+
253
+ :root {
254
+ --color-white: #fff;
255
+ --color-black: #000;
256
+ --color-red: #ff4444;
257
+ --color-brown: #f0ad22;
258
+ --color-green: #4dd278;
259
+ --color-lemon: #1bd218;
260
+ --color-gold-1: #fbe300;
261
+ --color-gold-2: #eccd00;
262
+ --color-gold-3: #b29300;
263
+ --color-gray-1: #f6f6f6;
264
+ --color-gray-2: #efefef;
265
+ --color-gray-3: #eaeaea;
266
+ --color-gray-4: #e8e8e8;
267
+ --color-gray-5: #e9e9e9;
268
+ --color-gray-6: #e6e2e3;
269
+ --color-gray-7: #d7d7d7;
270
+ --color-gray-8: #cccccc;
271
+ --color-gray-9: #c5c5c5;
272
+ --color-gray-10: #bcbcbc;
273
+ --color-gray-11: #a1a1a1;
274
+ --color-gray-12: #8d8e92;
275
+ --color-gray-13: #e1e1e14d;
276
+ --color-gray-14: #787878cc;
277
+ --color-gray-15: #666669;
278
+ --color-gray-16: #3838384d;
279
+ --color-gray-17: #0000001a;
280
+ --color-gray-18: #000000cc;
281
+ --color-gray-20: #1a1a1a;
282
+ }
283
+
284
+ * {
285
+ margin: 0;
286
+ padding: 0;
287
+ box-sizing: border-box;
288
+ }
289
+
290
+ html,
291
+ body {
292
+ height: 100%;
293
+ }
294
+
295
+ html {
296
+ font-size: max(calc(16 * min(100vw / 600, 100vh / 842)), 0rem);
297
+ }
298
+
299
+ body {
300
+ height: 100%;
301
+ display: flex;
302
+ overflow: hidden;
303
+ position: relative;
304
+ align-items: center;
305
+ justify-content: center;
306
+ background-color: var(--color-gray-5);
307
+ }
308
+
309
+ body::-webkit-scrollbar {
310
+ display: none;
311
+ }
312
+
313
+ p {
314
+ margin-bottom: 0 !important;
315
+ }
316
+
317
+ #modal {
318
+ top: 0;
319
+ left: 0;
320
+ width: 100%;
321
+ height: 100%;
322
+ z-index: 100;
323
+ padding: 20px;
324
+ display: flex;
325
+ position: fixed;
326
+ visibility: hidden;
327
+ align-items: center;
328
+ flex-direction: column;
329
+ justify-content: center;
330
+ backdrop-filter: blur(5px);
331
+ -webkit-backdrop-filter: blur(5px);
332
+ background-color: var(--color-gray-16);
333
+ }
334
+
335
+ #modal > div {
336
+ gap: 25px;
337
+ display: flex;
338
+ position: relative;
339
+ align-items: center;
340
+ border-radius: 10px;
341
+ flex-direction: column;
342
+ justify-content: center;
343
+ font-family: "Geist Mono";
344
+ }
345
+
346
+ #modal > div > h3 {
347
+ font-size: 24px;
348
+ line-height: 20px;
349
+ color: var(--color-black);
350
+ }
351
+
352
+ #modal > div > p {
353
+ font-size: 16px;
354
+ line-height: 30px;
355
+ text-align: center;
356
+ color: var(--color-black);
357
+ }
358
+
359
+ #okay-button {
360
+ border: none;
361
+ cursor: pointer;
362
+ font-size: 16px;
363
+ font-weight: 600;
364
+ margin-top: 5px;
365
+ padding: 15px 30px;
366
+ border-radius: 5px;
367
+ transition: 0.3s ease;
368
+ color: var(--color-white);
369
+ background-color: var(--color-black);
370
+ }
371
+
372
+ #okay-button:hover {
373
+ background-color: #000000cc;
374
+ }
375
+
376
+ .fade-in-animation {
377
+ animation: fade-in 1s ease 1s forwards;
378
+ }
379
+
380
+ .fade-out-animation {
381
+ animation: fade-out 1s ease forwards;
382
+ }
383
+
384
+ .printer {
385
+ display: flex;
386
+ height: 44.25rem;
387
+ width: 32.1875rem;
388
+ position: relative;
389
+ align-items: center;
390
+ flex-direction: column;
391
+ }
392
+
393
+ .printer::after {
394
+ content: "";
395
+ z-index: -2;
396
+ top: -0.625rem;
397
+ left: 0.625rem;
398
+ height: 11.25rem;
399
+ width: 33.4375rem;
400
+ position: absolute;
401
+ filter: blur(1.5rem);
402
+ border-radius: 3.75rem;
403
+ background: var(--color-gray-7);
404
+ background: linear-gradient(
405
+ 180deg,
406
+ var(--color-gray-7) 0%,
407
+ var(--color-gray-14) 70%
408
+ );
409
+ }
410
+
411
+ .printer > div:first-child {
412
+ z-index: 20;
413
+ width: 100%;
414
+ display: flex;
415
+ align-items: end;
416
+ height: 7.4375rem;
417
+ position: relative;
418
+ border-radius: 1.0625rem;
419
+ justify-content: space-between;
420
+ background: var(--color-gray-7);
421
+ padding: 0.625rem 0.7rem 0.7rem 1rem;
422
+ background-color: var(--color-gray-7);
423
+ box-shadow: 0rem 0.125rem 0.03125rem var(--color-gray-11);
424
+ background: linear-gradient(
425
+ 180deg,
426
+ var(--color-gray-7) 0%,
427
+ var(--color-gray-1) 25%,
428
+ var(--color-gray-7) 45%
429
+ );
430
+ }
431
+
432
+ .printer > div:first-child > p {
433
+ font-size: 1.25rem;
434
+ font-family: "Pacifico";
435
+ margin-bottom: -0.09375rem;
436
+ color: var(--color-gray-3);
437
+ text-shadow: -0.07rem -0.07rem 0.1875rem var(--color-gray-13),
438
+ 0.07rem 0.07rem 0.1875rem var(--color-gray-16);
439
+ }
440
+
441
+ #print-button {
442
+ outline: 0;
443
+ border: none;
444
+ display: flex;
445
+ gap: 0.125rem;
446
+ cursor: pointer;
447
+ height: 1.625rem;
448
+ overflow: hidden;
449
+ font-weight: 500;
450
+ position: relative;
451
+ align-items: center;
452
+ justify-content: center;
453
+ border-radius: 1.5625rem;
454
+ padding: 0 0.5625rem 0 0.5625rem;
455
+ border: 0.07rem solid var(--color-gray-4);
456
+ background: linear-gradient(145deg, var(--color-gray-20), var(--color-black));
457
+ box-shadow: 0.375rem 0.375rem 0.75rem var(--color-gray-9),
458
+ -0.375rem -0.375rem 0.75rem var(--color-white);
459
+ }
460
+
461
+ #print-icon {
462
+ display: flex;
463
+ height: 0.875rem;
464
+ width: 0.9375rem;
465
+ position: relative;
466
+ align-items: center;
467
+ justify-content: center;
468
+ }
469
+
470
+ #print-icon::before {
471
+ left: 50%;
472
+ z-index: 3;
473
+ content: "";
474
+ top: -0.15625rem;
475
+ width: 0.15625rem;
476
+ height: 1.3125rem;
477
+ position: absolute;
478
+ border-radius: 0.03125rem;
479
+ animation: grow 0.5s ease forwards;
480
+ transform: rotate(45deg) translateX(-50%);
481
+ }
482
+
483
+ #print-icon > div:first-child {
484
+ height: 100%;
485
+ width: 0.625rem;
486
+ position: absolute;
487
+ border-radius: 0.03125rem;
488
+ transition: background-color 0.5s ease, border 0.5s ease;
489
+ }
490
+
491
+ #print-icon > div:first-child div {
492
+ bottom: 0;
493
+ z-index: 2;
494
+ width: 100%;
495
+ display: flex;
496
+ height: 0.25rem;
497
+ position: absolute;
498
+ justify-content: center;
499
+ background-color: var(--color-black);
500
+ }
501
+
502
+ #print-icon > div:first-child div::before {
503
+ width: 70%;
504
+ z-index: 2;
505
+ content: "";
506
+ height: 0.07rem;
507
+ position: absolute;
508
+ bottom: 0.09375rem;
509
+ border-radius: 0.3125rem;
510
+ transition: background-color 0.5s ease, border 0.5s ease;
511
+ }
512
+
513
+ #print-icon > div:last-child {
514
+ width: 100%;
515
+ position: absolute;
516
+ height: 0.40625rem;
517
+ border-radius: 0.07rem;
518
+ transition: background-color 0.5s ease, border 0.5s ease;
519
+ }
520
+
521
+ #print-icon > div:last-child::after {
522
+ content: "";
523
+ top: 0.09375rem;
524
+ width: 0.1875rem;
525
+ right: 0.15625rem;
526
+ position: absolute;
527
+ height: 0.09375rem;
528
+ border-radius: 0.07rem;
529
+ background-color: var(--color-black);
530
+ }
531
+
532
+ .active-icon#print-icon::before {
533
+ display: block;
534
+ }
535
+
536
+ .active-icon#print-icon > div:first-child {
537
+ border: 0.07rem var(--color-lemon) solid;
538
+ }
539
+
540
+ .active-icon#print-icon > div:first-child div::before,
541
+ .active-icon#print-icon > div:last-child {
542
+ background-color: var(--color-lemon);
543
+ }
544
+
545
+ .active-icon#print-icon::before {
546
+ animation: grow 0.5s ease forwards;
547
+ background: linear-gradient(
548
+ 90deg,
549
+ var(--color-black) 50%,
550
+ var(--color-lemon) 50%
551
+ );
552
+ }
553
+
554
+ .inactive-icon#print-icon::before {
555
+ animation: shrink 0.5s ease forwards;
556
+ background: linear-gradient(
557
+ 90deg,
558
+ var(--color-black) 50%,
559
+ var(--color-red) 50%
560
+ );
561
+ }
562
+
563
+ .inactive-icon#print-icon > div:first-child {
564
+ border: 0.07rem var(--color-red) solid;
565
+ }
566
+
567
+ .inactive-icon#print-icon > div:first-child div::before,
568
+ .inactive-icon#print-icon > div:last-child {
569
+ background-color: var(--color-red);
570
+ }
571
+
572
+ #print-indicator {
573
+ width: 0.5rem;
574
+ height: 0.5rem;
575
+ display: block;
576
+ border-radius: 50%;
577
+ margin-left: 0.3125rem;
578
+ animation: blink 1s infinite;
579
+ transition: background-color 0.5s ease, border 0.5s ease;
580
+ }
581
+
582
+ .active-background {
583
+ background: var(--color-lemon);
584
+ }
585
+
586
+ .inactive-background {
587
+ background: var(--color-red);
588
+ }
589
+
590
+ .printer > div:nth-child(2) {
591
+ z-index: -1;
592
+ display: flex;
593
+ height: 1.5rem;
594
+ width: 32.125rem;
595
+ position: relative;
596
+ margin-top: -0.8125rem;
597
+ justify-content: center;
598
+ background-color: var(--color-gray-10);
599
+ clip-path: polygon(0 0, 100% 0, 99.6% 100%, 0.4% 100%);
600
+ }
601
+
602
+ .printer > div:last-child {
603
+ display: flex;
604
+ height: 0.75rem;
605
+ width: 31.875rem;
606
+ position: relative;
607
+ margin-top: -0.07rem;
608
+ justify-content: center;
609
+ border-radius: 0 0 0.75rem 0.75rem;
610
+ background-color: var(--color-gray-10);
611
+ }
612
+
613
+ .printer > div:last-child > div {
614
+ width: 30.125rem;
615
+ height: 0.6875rem;
616
+ position: absolute;
617
+ bottom: 0.34375rem;
618
+ background: var(--color-black);
619
+ box-shadow: 0rem 0rem 0.3125rem 0.25rem var(--color-gray-8);
620
+ border-radius: 0.375rem 0.375rem 0.625rem 0.625rem / 0.375rem 0.375rem
621
+ 0.9375rem 0.9375rem;
622
+ }
623
+
624
+ #receipt-wrapper {
625
+ width: 100%;
626
+ display: flex;
627
+ top: 0.25rem;
628
+ overflow: hidden;
629
+ position: absolute;
630
+ justify-content: center;
631
+ padding-bottom: 1.25rem;
632
+ transition: opacity 5s linear;
633
+ }
634
+
635
+ .fade-out {
636
+ opacity: 0;
637
+ }
638
+
639
+ #receipt-container {
640
+ width: 91%;
641
+ transform: translateY(-100%);
642
+ }
643
+
644
+ .print {
645
+ animation: print 6.5s linear forwards;
646
+ }
647
+
648
+ .receipt {
649
+ width: 100%;
650
+ font-size: 1rem;
651
+ font-weight: 450;
652
+ position: relative;
653
+ padding: 0.9375rem 0 0;
654
+ margin-bottom: 1.875rem;
655
+ font-family: "Geist Mono";
656
+ background-color: var(--color-white);
657
+ filter: drop-shadow(0 0.25rem 0.3125rem var(--color-gray-17));
658
+ }
659
+
660
+ .receipt-header {
661
+ display: flex;
662
+ align-items: center;
663
+ padding: 1.375rem 1.375rem;
664
+ justify-content: space-between;
665
+ border-bottom: 0.07rem solid var(--color-gray-2);
666
+ }
667
+
668
+ .receipt-header > div:first-child {
669
+ display: flex;
670
+ gap: 0.4375rem;
671
+ flex-direction: column;
672
+ }
673
+
674
+ .receipt-header > div:first-child > p:first-child {
675
+ font-weight: 530;
676
+ font-size: 1.1875rem;
677
+ letter-spacing: -0.009375rem;
678
+ }
679
+
680
+ .receipt-header > div:first-child > p:last-child {
681
+ gap: 1.125rem;
682
+ display: flex;
683
+ color: var(--color-gray-12);
684
+ }
685
+
686
+ .receipt-header > div:last-child {
687
+ width: 3.25rem;
688
+ height: 3.25rem;
689
+ border-radius: 50%;
690
+ background-color: var(--color-green);
691
+ clip-path: polygon(
692
+ 0 0,
693
+ 0 100%,
694
+ 50% 100%,
695
+ 38.38% 80.76%,
696
+ 15.3% 55.76%,
697
+ 26% 44.23%,
698
+ 38.38% 56.5%,
699
+ 71.07% 21.15%,
700
+ 82.61% 32.69%,
701
+ 38.38% 80.76%,
702
+ 50% 100%,
703
+ 3.4375rem 100%,
704
+ 100% 0
705
+ );
706
+ }
707
+
708
+ .receipt-body > div {
709
+ gap: 1.125rem;
710
+ display: flex;
711
+ flex-direction: column;
712
+ padding: 1.375rem 1.375rem;
713
+ color: var(--color-gray-15);
714
+ justify-content: space-between;
715
+ border-bottom: 0.07rem solid var(--color-gray-2);
716
+ }
717
+
718
+ .receipt-footer {
719
+ gap: 3.75rem;
720
+ display: flex;
721
+ flex-direction: column;
722
+ justify-content: space-between;
723
+ padding: 1.375rem 1.375rem 0.9375rem;
724
+ }
725
+
726
+ .receipt-body > div > div,
727
+ .receipt-footer > div {
728
+ display: flex;
729
+ align-items: center;
730
+ justify-content: space-between;
731
+ }
732
+
733
+ .receipt-body > div > div > p:last-child > span,
734
+ .receipt-footer > div > p:last-child > span {
735
+ font-weight: 400;
736
+ }
737
+
738
+ .receipt-footer > div:last-child {
739
+ margin: auto;
740
+ display: flex;
741
+ gap: 0.625rem;
742
+ align-items: center;
743
+ font-size: 1.125rem;
744
+ }
745
+
746
+ .receipt-footer > div > p:last-child {
747
+ font-weight: 600;
748
+ font-size: 1.1875rem;
749
+ }
750
+
751
+ .emoji {
752
+ width: 1.8125rem;
753
+ height: 2.03125rem;
754
+ position: relative;
755
+ }
756
+
757
+ .emoji::after {
758
+ bottom: 0;
759
+ left: 50%;
760
+ width: 80%;
761
+ content: "";
762
+ height: 0.125rem;
763
+ position: absolute;
764
+ border-radius: 50%;
765
+ filter: blur(0.01875rem);
766
+ transform: translateX(-50%);
767
+ background-color: var(--color-gray-6);
768
+ }
769
+
770
+ .emoji > div {
771
+ width: 100%;
772
+ display: block;
773
+ overflow: hidden;
774
+ height: 1.8125rem;
775
+ position: relative;
776
+ border-radius: 50%;
777
+ clip-path: circle();
778
+ background-color: var(--color-gold-2);
779
+ border: 0.07rem var(--color-gold-3) solid;
780
+ }
781
+
782
+ .emoji > div::before {
783
+ content: "";
784
+ width: 100%;
785
+ height: 100%;
786
+ bottom: 0.125rem;
787
+ position: absolute;
788
+ border-radius: 50%;
789
+ background-color: var(--color-gold-1);
790
+ }
791
+
792
+ .emoji > div > span:first-child {
793
+ top: 40%;
794
+ left: 50%;
795
+ width: 100%;
796
+ display: flex;
797
+ height: 0.25rem;
798
+ position: absolute;
799
+ padding: 0 0.1875rem;
800
+ transform: translateX(-50%);
801
+ justify-content: space-between;
802
+ }
803
+
804
+ .emoji > div > span:first-child > span {
805
+ height: 0.25rem;
806
+ width: 0.21875rem;
807
+ position: relative;
808
+ }
809
+
810
+ .emoji > div > span:first-child > span::after {
811
+ left: 50%;
812
+ content: "";
813
+ height: 0.125rem;
814
+ width: 0.21875rem;
815
+ position: absolute;
816
+ bottom: -0.1875rem;
817
+ border-radius: 50%;
818
+ filter: blur(0.03125rem);
819
+ transform: translateX(-50%);
820
+ background-color: var(--color-brown);
821
+ }
822
+
823
+ .emoji > div > span:first-child > span > span {
824
+ width: 100%;
825
+ height: 100%;
826
+ display: block;
827
+ border-radius: 50%;
828
+ border: 0.07rem var(--color-gold-3) solid;
829
+ clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0% 100%);
830
+ }
831
+
832
+ .emoji > div > span:last-child {
833
+ left: 50%;
834
+ width: 0.8125rem;
835
+ height: 0.8125rem;
836
+ bottom: 0.40625rem;
837
+ position: absolute;
838
+ transform: translateX(-50%);
839
+ }
840
+
841
+ .emoji > div > span:last-child::after {
842
+ left: 50%;
843
+ content: "";
844
+ width: 0.5rem;
845
+ top: -0.375rem;
846
+ height: 0.125rem;
847
+ position: absolute;
848
+ border-radius: 50%;
849
+ filter: blur(0.07rem);
850
+ transform: translateX(-50%);
851
+ background-color: var(--color-white);
852
+ }
853
+
854
+ .emoji > div > span:last-child > span {
855
+ left: 50%;
856
+ width: 95%;
857
+ height: 100%;
858
+ border-radius: 50%;
859
+ position: absolute;
860
+ transform: translateX(-50%);
861
+ border: 0.07rem var(--color-gold-3) solid;
862
+ clip-path: polygon(0 85%, 100% 85%, 100% 100%, 0% 100%);
863
+ }
864
+
865
+ .cutout {
866
+ position: relative;
867
+ }
868
+
869
+ .cutout > div {
870
+ width: 100%;
871
+ position: relative;
872
+ margin-top: -0.07rem;
873
+ filter: drop-shadow(0 0.75rem 0.3125rem var(--color-gray-17));
874
+ }
875
+
876
+ .cutout > div > div {
877
+ width: 100%;
878
+ height: 2.5rem;
879
+ overflow-x: hidden;
880
+ transform: translateY(-1.875rem);
881
+ background-color: var(--color-white);
882
+ mask-image: radial-gradient(
883
+ circle at 1.03125rem 2.1875rem,
884
+ transparent 0.875rem,
885
+ var(--color-black) 0.875rem
886
+ );
887
+ mask-repeat: repeat-x;
888
+ mask-position: -0.78125rem 0;
889
+ mask-size: 2.0625rem 2.1875rem;
890
+ -webkit-mask-image: radial-gradient(
891
+ circle at 1.03125rem 2.1875rem,
892
+ transparent 0.875rem,
893
+ var(--color-black) 0.875rem
894
+ );
895
+ -webkit-mask-repeat: repeat-x;
896
+ -webkit-mask-position: -0.78125rem 0;
897
+ -webkit-mask-size: 2.0625rem 2.1875rem;
898
+ }
899
+
900
+ @keyframes fade-in {
901
+ from {
902
+ opacity: 0;
903
+ visibility: hidden;
904
+ }
905
+ to {
906
+ opacity: 1;
907
+ visibility: visible;
908
+ }
909
+ }
910
+
911
+ @keyframes fade-out {
912
+ from {
913
+ opacity: 1;
914
+ visibility: visible;
915
+ }
916
+ to {
917
+ opacity: 0;
918
+ visibility: hidden;
919
+ }
920
+ }
921
+
922
+ @keyframes blink {
923
+ 0%,
924
+ 50% {
925
+ opacity: 1;
926
+ }
927
+ 51%,
928
+ 100% {
929
+ opacity: 0.4;
930
+ }
931
+ }
932
+
933
+ @keyframes print {
934
+ 0% {
935
+ transform: translateY(-100%);
936
+ }
937
+ 100% {
938
+ transform: translateY(0);
939
+ }
940
+ }
941
+
942
+ @keyframes shrink {
943
+ 0% {
944
+ clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 0);
945
+ }
946
+ 100% {
947
+ clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
948
+ }
949
+ }
950
+
951
+ @keyframes grow {
952
+ 0% {
953
+ clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
954
+ }
955
+ 100% {
956
+ clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 0);
957
+ }
958
+ }
959
+ </style>
960
+ `,"vue/example.vue":`<script setup>
961
+ const data = templateData;
962
+ </script>
963
+
964
+ <template>
965
+ <div class="my-component">Hello md2x! This is vue template</div>
966
+ <div v-for="(item, index) in data" :key="index">
967
+ <h2>{{ item.title }}</h2>
968
+ <p>{{ item.message }}</p>
969
+ </div>
970
+ </template>
971
+
972
+ <style scoped>
973
+ .my-component {
974
+ color: red;
975
+ }
976
+ </style>
977
+ `,"vue/mapLibre.vue":`<!-- TemplateConfig: {"assets":{"scripts":["https://unpkg.com/maplibre-gl@latest/dist/maplibre-gl.js","https://cdn.maptiler.com/maptiler-sdk-js/v3.10.2/maptiler-sdk.umd.min.js"],"styles":["https://unpkg.com/maplibre-gl@latest/dist/maplibre-gl.css","https://cdn.maptiler.com/maptiler-sdk-js/v3.10.2/maptiler-sdk.css"]}} -->
978
+ <script setup>
979
+ import { onMounted, onBeforeUnmount, ref } from 'vue';
980
+
981
+ /**
982
+ * @typedef {[number, number]} LngLat
983
+ *
984
+ * @typedef {object} Marker
985
+ * @property {LngLat} lngLat \u5750\u6807 [lng, lat]
986
+ * @property {string=} color \u53EF\u9009\uFF1A\u6807\u8BB0\u70B9\u989C\u8272\uFF08CSS \u989C\u8272\u5B57\u7B26\u4E32\uFF09
987
+ * @property {string=} popup \u53EF\u9009\uFF1A\u6807\u8BB0\u70B9\u5F39\u7A97\u6587\u672C
988
+ *
989
+ * @typedef {object} MapLibreTemplateData
990
+ * @property {number=} width \u5730\u56FE\u5BBD\u5EA6\uFF08px\uFF09\uFF0C\u9ED8\u8BA4 900
991
+ * @property {number=} height \u5730\u56FE\u9AD8\u5EA6\uFF08px\uFF09\uFF0C\u9ED8\u8BA4 520
992
+ *
993
+ * @property {'maplibre'|'maptiler'=} provider \u5E95\u56FE\u63D0\u4F9B\u65B9\uFF1Amaplibre\uFF08\u9ED8\u8BA4\uFF09\u6216 maptiler
994
+ * @property {string=} style \u6837\u5F0F URL\uFF08Mapbox Style Spec\uFF09\uFF1B\u4F8B\u5982 MapTiler streets style.json
995
+ *
996
+ * @property {LngLat | {lng:number,lat:number}=} center \u5730\u56FE\u4E2D\u5FC3\u70B9\uFF1B\u652F\u6301 [lng,lat] \u6216 {lng,lat}
997
+ * @property {number=} zoom \u7F29\u653E\u7EA7\u522B\uFF0C\u9ED8\u8BA4 1
998
+ * @property {number=} bearing \u65B9\u4F4D\u89D2\uFF08\u5EA6\uFF09\uFF0C\u9ED8\u8BA4 0
999
+ * @property {number=} pitch \u503E\u659C\u89D2\uFF08\u5EA6\uFF09\uFF0C\u9ED8\u8BA4 0
1000
+ * @property {boolean=} showControls \u662F\u5426\u663E\u793A\u7F29\u653E/\u65CB\u8F6C\u63A7\u4EF6\uFF0C\u9ED8\u8BA4 true
1001
+ *
1002
+ * @property {Marker[]=} markers \u53EF\u9009\uFF1A\u6807\u8BB0\u70B9\u5217\u8868
1003
+ *
1004
+ * @property {any=} cities \u53EF\u9009\uFF1A\u57CE\u5E02/\u884C\u653F\u533A GeoJSON\uFF08FeatureCollection/Feature\uFF09
1005
+ * @property {string=} citiesUrl \u53EF\u9009\uFF1AGeoJSON URL\uFF08\u672A\u63D0\u4F9B cities \u65F6\u4F1A fetch\uFF09
1006
+ * @property {string=} cityLabelField \u70B9\u7684\u6807\u7B7E\u5B57\u6BB5\u540D\uFF0C\u9ED8\u8BA4 name
1007
+ * @property {string=} cityPointColor \u70B9\u989C\u8272\uFF0C\u9ED8\u8BA4 #e11d48
1008
+ * @property {number=} cityPointRadius \u70B9\u534A\u5F84\uFF0C\u9ED8\u8BA4 6
1009
+ * @property {string=} cityFillColor \u9762\u586B\u5145\u8272\uFF08Polygon/MultiPolygon\uFF09\uFF0C\u9ED8\u8BA4 rgba(14, 165, 233, 0.15)
1010
+ * @property {string=} cityLineColor \u7EBF/\u63CF\u8FB9\u8272\uFF08LineString/Polygon\uFF09\uFF0C\u9ED8\u8BA4 rgba(2, 132, 199, 0.9)
1011
+ * @property {number=} cityLineWidth \u7EBF\u5BBD\uFF0C\u9ED8\u8BA4 1.5
1012
+ *
1013
+ * @property {string=} maptilerKey MapTiler API Key\uFF08provider=maptiler \u65F6\u4F7F\u7528\uFF09
1014
+ * @property {string=} apiKey maptilerKey \u522B\u540D\uFF08\u517C\u5BB9\u5B57\u6BB5\uFF09
1015
+ * @property {string=} maptilerStyle MapTiler \u9884\u7F6E\u6837\u5F0F\u540D\uFF08\u4F8B\u5982 STREETS\uFF09\uFF1B\u4EC5\u5728\u672A\u63D0\u4F9B style \u65F6\u4F7F\u7528
1016
+ */
1017
+
1018
+ /** @type {MapLibreTemplateData} */
1019
+ const cfg = (templateData && typeof templateData === 'object' && !Array.isArray(templateData)) ? templateData : {};
1020
+
1021
+ const num = (v, fallback) => {
1022
+ const n = (typeof v === 'number') ? v : (typeof v === 'string' ? Number(v) : NaN);
1023
+ return Number.isFinite(n) ? n : fallback;
1024
+ };
1025
+
1026
+ const width = num(cfg.width, 900);
1027
+ const height = num(cfg.height, 520);
1028
+
1029
+ const provider =
1030
+ (typeof cfg.provider === 'string' && cfg.provider.trim().toLowerCase() === 'maptiler') ? 'maptiler' : 'maplibre';
1031
+
1032
+ const styleUrl = (typeof cfg.style === 'string' && cfg.style.trim()) ? cfg.style.trim() : '';
1033
+
1034
+ const center = (() => {
1035
+ const c = cfg.center;
1036
+ if (Array.isArray(c) && c.length >= 2) {
1037
+ const lng = Number(c[0]);
1038
+ const lat = Number(c[1]);
1039
+ if (Number.isFinite(lng) && Number.isFinite(lat)) return [lng, lat];
1040
+ }
1041
+ if (c && typeof c === 'object') {
1042
+ const lng = Number(c.lng);
1043
+ const lat = Number(c.lat);
1044
+ if (Number.isFinite(lng) && Number.isFinite(lat)) return [lng, lat];
1045
+ }
1046
+ return [0, 0];
1047
+ })();
1048
+
1049
+ const zoom = num(cfg.zoom, 1);
1050
+ const bearing = num(cfg.bearing, 0);
1051
+ const pitch = num(cfg.pitch, 0);
1052
+ const showControls = cfg.showControls !== false;
1053
+
1054
+ const mapElRef = ref(null);
1055
+ const err = ref('');
1056
+
1057
+ let map = null;
1058
+
1059
+ const normalizeMarkers = () => {
1060
+ const raw = cfg.markers;
1061
+ if (!Array.isArray(raw)) return [];
1062
+ const out = [];
1063
+ for (const m of raw) {
1064
+ if (Array.isArray(m) && m.length >= 2) {
1065
+ const lng = Number(m[0]);
1066
+ const lat = Number(m[1]);
1067
+ if (Number.isFinite(lng) && Number.isFinite(lat)) {
1068
+ out.push({ lngLat: [lng, lat] });
1069
+ }
1070
+ continue;
1071
+ }
1072
+ if (!m || typeof m !== 'object') continue;
1073
+ const ll = Array.isArray(m.lngLat) ? m.lngLat : (Array.isArray(m.center) ? m.center : null);
1074
+ if (!ll || ll.length < 2) continue;
1075
+ const lng = Number(ll[0]);
1076
+ const lat = Number(ll[1]);
1077
+ if (!Number.isFinite(lng) || !Number.isFinite(lat)) continue;
1078
+ out.push({
1079
+ lngLat: [lng, lat],
1080
+ color: (typeof m.color === 'string' && m.color.trim()) ? m.color.trim() : '',
1081
+ popup: (typeof m.popup === 'string' && m.popup.trim()) ? m.popup.trim() : '',
1082
+ });
1083
+ }
1084
+ return out;
1085
+ };
1086
+
1087
+ const isPlainObject = (v) => !!v && typeof v === 'object' && !Array.isArray(v);
1088
+
1089
+ const normalizeCitiesGeoJson = (v) => {
1090
+ if (!v) return null;
1091
+ if (!isPlainObject(v)) return null;
1092
+ const t = String(v.type || '').trim();
1093
+ if (!t) return null;
1094
+ // Minimal acceptance: FeatureCollection / Feature.
1095
+ if (t !== 'FeatureCollection' && t !== 'Feature') return null;
1096
+ return v;
1097
+ };
1098
+
1099
+ const anyFilter = (...parts) => ['any', ...parts];
1100
+ const eq = (a, b) => ['==', a, b];
1101
+ const geometryType = () => ['geometry-type'];
1102
+
1103
+ const addCitiesLayers = async (maplibregl) => {
1104
+ const sourceId = 'md2x-cities';
1105
+
1106
+ let geojson = normalizeCitiesGeoJson(cfg.cities);
1107
+ const citiesUrl = (typeof cfg.citiesUrl === 'string' && cfg.citiesUrl.trim()) ? cfg.citiesUrl.trim() : '';
1108
+ if (!geojson && citiesUrl) {
1109
+ try {
1110
+ const res = await fetch(citiesUrl);
1111
+ if (res.ok) {
1112
+ const j = await res.json();
1113
+ geojson = normalizeCitiesGeoJson(j);
1114
+ }
1115
+ } catch {}
1116
+ }
1117
+ if (!geojson) return;
1118
+
1119
+ try {
1120
+ if (typeof map.getSource === 'function' && map.getSource(sourceId)) {
1121
+ try { map.removeLayer(sourceId + '-label'); } catch {}
1122
+ try { map.removeLayer(sourceId + '-point'); } catch {}
1123
+ try { map.removeLayer(sourceId + '-line'); } catch {}
1124
+ try { map.removeLayer(sourceId + '-fill'); } catch {}
1125
+ try { map.removeSource(sourceId); } catch {}
1126
+ }
1127
+ } catch {}
1128
+
1129
+ try {
1130
+ map.addSource(sourceId, { type: 'geojson', data: geojson });
1131
+ } catch (e) {
1132
+ return;
1133
+ }
1134
+
1135
+ const labelField = (typeof cfg.cityLabelField === 'string' && cfg.cityLabelField.trim()) ? cfg.cityLabelField.trim() : 'name';
1136
+ const pointColor = (typeof cfg.cityPointColor === 'string' && cfg.cityPointColor.trim()) ? cfg.cityPointColor.trim() : '#e11d48';
1137
+ const pointRadius = num(cfg.cityPointRadius, 6);
1138
+
1139
+ const fillColor = (typeof cfg.cityFillColor === 'string' && cfg.cityFillColor.trim()) ? cfg.cityFillColor.trim() : 'rgba(14, 165, 233, 0.15)';
1140
+ const lineColor = (typeof cfg.cityLineColor === 'string' && cfg.cityLineColor.trim()) ? cfg.cityLineColor.trim() : 'rgba(2, 132, 199, 0.9)';
1141
+ const lineWidth = num(cfg.cityLineWidth, 1.5);
1142
+
1143
+ const isPoint = eq(geometryType(), 'Point');
1144
+ const isPolygon = anyFilter(eq(geometryType(), 'Polygon'), eq(geometryType(), 'MultiPolygon'));
1145
+ const isLine = anyFilter(eq(geometryType(), 'LineString'), eq(geometryType(), 'MultiLineString'));
1146
+
1147
+ // Polygons (if provided): fill + outline
1148
+ try {
1149
+ map.addLayer({
1150
+ id: sourceId + '-fill',
1151
+ type: 'fill',
1152
+ source: sourceId,
1153
+ filter: isPolygon,
1154
+ paint: {
1155
+ 'fill-color': fillColor,
1156
+ },
1157
+ });
1158
+ } catch {}
1159
+ try {
1160
+ map.addLayer({
1161
+ id: sourceId + '-line',
1162
+ type: 'line',
1163
+ source: sourceId,
1164
+ filter: anyFilter(isPolygon, isLine),
1165
+ paint: {
1166
+ 'line-color': lineColor,
1167
+ 'line-width': lineWidth,
1168
+ },
1169
+ });
1170
+ } catch {}
1171
+
1172
+ // Points (cities): circle + label
1173
+ try {
1174
+ map.addLayer({
1175
+ id: sourceId + '-point',
1176
+ type: 'circle',
1177
+ source: sourceId,
1178
+ filter: isPoint,
1179
+ paint: {
1180
+ 'circle-radius': pointRadius,
1181
+ 'circle-color': pointColor,
1182
+ 'circle-stroke-width': 1,
1183
+ 'circle-stroke-color': '#ffffff',
1184
+ },
1185
+ });
1186
+ } catch {}
1187
+ try {
1188
+ map.addLayer({
1189
+ id: sourceId + '-label',
1190
+ type: 'symbol',
1191
+ source: sourceId,
1192
+ filter: isPoint,
1193
+ layout: {
1194
+ 'text-field': ['to-string', ['get', labelField]],
1195
+ 'text-size': 12,
1196
+ 'text-offset': [0, 1.25],
1197
+ 'text-anchor': 'top',
1198
+ },
1199
+ paint: {
1200
+ 'text-color': '#111827',
1201
+ 'text-halo-color': '#ffffff',
1202
+ 'text-halo-width': 1,
1203
+ },
1204
+ });
1205
+ } catch {}
1206
+ };
1207
+
1208
+ onMounted(() => {
1209
+ try {
1210
+ const maptilersdk = globalThis.maptilersdk;
1211
+ const maplibregl = globalThis.maplibregl;
1212
+
1213
+ const wantMapTiler = provider === 'maptiler';
1214
+ const hasMapTiler = !!maptilersdk && typeof maptilersdk.Map === 'function';
1215
+ const hasMapLibre = !!maplibregl && typeof maplibregl.Map === 'function';
1216
+
1217
+ const useMapTiler = wantMapTiler && hasMapTiler;
1218
+ const engine = useMapTiler ? maptilersdk : (hasMapLibre ? maplibregl : null);
1219
+
1220
+ if (!engine || typeof engine.Map !== 'function') {
1221
+ err.value = wantMapTiler
1222
+ ? 'MapTiler SDK is not available. Set allowTemplateAssets: true to load TemplateConfig assets.'
1223
+ : 'MapLibre is not available. Set allowTemplateAssets: true to load TemplateConfig assets.';
1224
+ return;
1225
+ }
1226
+ if (!mapElRef.value) {
1227
+ err.value = 'Map container not found.';
1228
+ return;
1229
+ }
1230
+
1231
+ if (useMapTiler) {
1232
+ const key =
1233
+ (typeof cfg.maptilerKey === 'string' && cfg.maptilerKey.trim())
1234
+ ? cfg.maptilerKey.trim()
1235
+ : ((typeof cfg.apiKey === 'string' && cfg.apiKey.trim()) ? cfg.apiKey.trim() : '');
1236
+ if (key) {
1237
+ try {
1238
+ if (engine.config && typeof engine.config === 'object') engine.config.apiKey = key;
1239
+ } catch {}
1240
+ }
1241
+
1242
+ const maptilerStyle =
1243
+ (typeof cfg.maptilerStyle === 'string' && cfg.maptilerStyle.trim()) ? cfg.maptilerStyle.trim() : '';
1244
+ const style =
1245
+ styleUrl ||
1246
+ (() => {
1247
+ try {
1248
+ const ms = engine.MapStyle;
1249
+ if (ms && maptilerStyle && Object.prototype.hasOwnProperty.call(ms, maptilerStyle)) return ms[maptilerStyle];
1250
+ } catch {}
1251
+ try { return engine.MapStyle ? engine.MapStyle.STREETS : ''; } catch { return ''; }
1252
+ })() ||
1253
+ 'https://demotiles.maplibre.org/style.json';
1254
+
1255
+ map = new engine.Map({
1256
+ container: mapElRef.value,
1257
+ apiKey: key || undefined,
1258
+ style,
1259
+ center,
1260
+ zoom,
1261
+ bearing,
1262
+ pitch,
1263
+ preserveDrawingBuffer: true,
1264
+ });
1265
+ } else {
1266
+ map = new engine.Map({
1267
+ container: mapElRef.value,
1268
+ style: styleUrl || 'https://demotiles.maplibre.org/style.json',
1269
+ center,
1270
+ zoom,
1271
+ bearing,
1272
+ pitch,
1273
+ preserveDrawingBuffer: true,
1274
+ });
1275
+ }
1276
+
1277
+ if (showControls && typeof engine.NavigationControl === 'function') {
1278
+ try {
1279
+ map.addControl(new engine.NavigationControl(), 'top-right');
1280
+ } catch {}
1281
+ }
1282
+
1283
+ const markers = normalizeMarkers();
1284
+ map.once('load', () => {
1285
+ for (const m of markers) {
1286
+ try {
1287
+ const mk = (m.color && typeof engine.Marker === 'function')
1288
+ ? new engine.Marker({ color: m.color })
1289
+ : new engine.Marker();
1290
+ mk.setLngLat(m.lngLat);
1291
+ if (m.popup && typeof engine.Popup === 'function') {
1292
+ mk.setPopup(new engine.Popup({ offset: 16 }).setText(m.popup));
1293
+ }
1294
+ mk.addTo(map);
1295
+ } catch {}
1296
+ }
1297
+ try { addCitiesLayers(engine); } catch {}
1298
+ try { map.resize(); } catch {}
1299
+ });
1300
+ } catch (e) {
1301
+ err.value = (e && e.message) ? e.message : String(e);
1302
+ }
1303
+ });
1304
+
1305
+ onBeforeUnmount(() => {
1306
+ try {
1307
+ if (map) map.remove();
1308
+ } catch {}
1309
+ map = null;
1310
+ });
1311
+ </script>
1312
+
1313
+ <template>
1314
+ <div class="maplibre-wrap" :style="{ width: width + 'px', height: height + 'px' }">
1315
+ <div ref="mapElRef" class="maplibre-map" />
1316
+ <div v-if="err" class="maplibre-error">{{ err }}</div>
1317
+ </div>
1318
+ </template>
1319
+
1320
+ <style scoped>
1321
+ .maplibre-wrap {
1322
+ position: relative;
1323
+ overflow: hidden;
1324
+ border: 1px solid rgba(0, 0, 0, 0.14);
1325
+ border-radius: 10px;
1326
+ background: #f6f7f8;
1327
+ }
1328
+
1329
+ .maplibre-map {
1330
+ position: absolute;
1331
+ inset: 0;
1332
+ }
1333
+
1334
+ .maplibre-error {
1335
+ position: absolute;
1336
+ inset: 0;
1337
+ display: flex;
1338
+ align-items: center;
1339
+ justify-content: center;
1340
+ padding: 16px;
1341
+ font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
1342
+ font-size: 12px;
1343
+ color: #b00020;
1344
+ text-align: center;
1345
+ background: rgba(255, 255, 255, 0.92);
1346
+ }
1347
+ </style>
1348
+ `};function jn(e){let t=String(e).match(/^---\s*[\r\n]([\s\S]*?)[\r\n](?:---|\.\.\.)\s*(?:[\r\n]([\s\S]*))?$/);if(!t)return{content:e,data:{},hasFrontMatter:!1};try{let i=Wt(t[1]),r=t[2]||"",a=Object.keys(i).length>0;return{content:r,data:i,hasFrontMatter:a}}catch{return{content:e,data:{},hasFrontMatter:!1}}}function Hn(e){let n={};if(typeof e.theme=="string"&&(n.theme=e.theme),typeof e.hrAsPageBreak=="boolean"&&(n.hrAsPageBreak=e.hrAsPageBreak),typeof e.format=="string"){let t=e.format.toLowerCase();(t==="pdf"||t==="docx"||t==="html"||t==="png"||t==="jpg"||t==="jpeg"||t==="webp")&&(n.format=t)}if(e.image&&typeof e.image=="object"){let t=e.image,i={};if(typeof t.type=="string"){let r=t.type.toLowerCase();(r==="png"||r==="jpeg"||r==="webp")&&(i.type=r),r==="jpg"&&(i.type="jpeg")}if(typeof t.quality=="number"&&Number.isFinite(t.quality)&&(i.quality=t.quality),typeof t.maxPixelWidth=="number"&&Number.isFinite(t.maxPixelWidth)&&(i.maxPixelWidth=t.maxPixelWidth),typeof t.split=="boolean"?i.split=t.split:typeof t.split=="string"&&t.split.toLowerCase()==="auto"&&(i.split="auto"),typeof t.splitMaxPixelHeight=="number"&&Number.isFinite(t.splitMaxPixelHeight)&&(i.splitMaxPixelHeight=t.splitMaxPixelHeight),typeof t.splitOverlapPx=="number"&&Number.isFinite(t.splitOverlapPx)&&(i.splitOverlapPx=t.splitOverlapPx),typeof t.fullPage=="boolean"&&(i.fullPage=t.fullPage),typeof t.selector=="string"?i.selector=t.selector:Array.isArray(t.selector)&&(i.selector=t.selector.filter(r=>typeof r=="string")),typeof t.selectorMode=="string"){let r=t.selectorMode.toLowerCase();(r==="first"||r==="each"||r==="union"||r==="stitch")&&(i.selectorMode=r)}if(typeof t.selectorPadding=="number"&&Number.isFinite(t.selectorPadding)&&(i.selectorPadding=t.selectorPadding),typeof t.selectorGap=="number"&&Number.isFinite(t.selectorGap)&&(i.selectorGap=t.selectorGap),typeof t.scrollToLoad=="boolean"&&(i.scrollToLoad=t.scrollToLoad),t.scroll&&typeof t.scroll=="object"){let r=t.scroll,a={};typeof r.stepPx=="number"&&Number.isFinite(r.stepPx)&&(a.stepPx=r.stepPx),typeof r.delayMs=="number"&&Number.isFinite(r.delayMs)&&(a.delayMs=r.delayMs),typeof r.maxSteps=="number"&&Number.isFinite(r.maxSteps)&&(a.maxSteps=r.maxSteps),typeof r.maxTimeMs=="number"&&Number.isFinite(r.maxTimeMs)&&(a.maxTimeMs=r.maxTimeMs),Object.keys(a).length>0&&(i.scroll=a)}if(typeof t.omitBackground=="boolean"&&(i.omitBackground=t.omitBackground),typeof t.fromSurface=="boolean"&&(i.fromSurface=t.fromSurface),typeof t.captureBeyondViewport=="boolean"&&(i.captureBeyondViewport=t.captureBeyondViewport),t.viewport&&typeof t.viewport=="object"){let r=t.viewport,a={};typeof r.width=="number"&&Number.isFinite(r.width)&&(a.width=r.width),typeof r.height=="number"&&Number.isFinite(r.height)&&(a.height=r.height),typeof r.deviceScaleFactor=="number"&&Number.isFinite(r.deviceScaleFactor)&&(a.deviceScaleFactor=r.deviceScaleFactor),Object.keys(a).length>0&&(i.viewport=a)}Object.keys(i).length>0&&(n.image=i)}if(typeof e.title=="string"&&(n.title=e.title),typeof e.standalone=="boolean"&&(n.standalone=e.standalone),typeof e.baseTag=="boolean"&&(n.baseTag=e.baseTag),typeof e.liveRuntime=="string"){let t=String(e.liveRuntime).toLowerCase();(t==="inline"||t==="cdn")&&(n.liveRuntime=t)}if(typeof e.liveRuntimeBaseUrl=="string"&&(n.liveRuntimeBaseUrl=String(e.liveRuntimeBaseUrl)),typeof e.diagramMode=="string"){let t=e.diagramMode.toLowerCase();(t==="img"||t==="live"||t==="none")&&(n.diagramMode=t)}if(e.cdn&&typeof e.cdn=="object"&&(n.cdn=e.cdn),e.templates&&typeof e.templates=="object"&&!Array.isArray(e.templates)){let t={};for(let[i,r]of Object.entries(e.templates))typeof i=="string"&&typeof r=="string"&&(t[i]=r);Object.keys(t).length>0&&(n.templates=t)}return e.pdf&&typeof e.pdf=="object"&&(n.pdf=e.pdf),n}function dn(e){switch(e){case"pdf":return".pdf";case"docx":return".docx";case"html":return".html";case"png":return".png";case"webp":return".webp";case"jpeg":return".jpeg";case"jpg":return".jpg";default:return".pdf"}}function pn(e){return e==="png"||e==="jpg"||e==="jpeg"||e==="webp"}function Dn(e){return e==="jpg"?"jpeg":e}function Ya(){return e=>{Jn(e,"element",n=>{if(n.tagName!=="p")return;let t=n.children||[];if(t.length===0)return;let i=0,r=-1,a=!1,o=!1;for(let l=0;l<t.length;l++){let s=t[l];s.type==="element"&&s.tagName==="img"?(i++,r=l,o=!0):o&&(s.type==="text"&&s.value.trim()||s.type==="element"&&s.tagName!=="br")&&(a=!0)}if(i===1&&!a&&r>=0){let l=t[r];l.properties=l.properties||{};let s=l.properties.className||[];l.properties.className=Array.isArray(s)?[...s,"block-image"]:[s,"block-image"]}})}}async function fn(e){let t=await Kn().use(Xn).use(Qn,{singleTilde:!1}).use(Zn).use(et).use(nt,{allowDangerousHtml:!0}).use(tt).use(rt).use(Ya).use(it,{allowDangerousHtml:!0}).process(e);return String(t)}function sn(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}async function Ka(e,n={}){let t=await fn(e),i=n.title||"Document",r=n.katexVersion||"0.16.11",a=n.themeConfig??(n.theme?Fe(n.theme):null),o=he(e,n.md2xTemplateFiles),l=n.liveDiagrams!==!1?mn(Kt(t),{...n.cdn,baseHref:n.baseHref,themeConfig:a,md2xTemplateFiles:o}):"",s=Oe(n.hrAsPageBreak??!1),d=n.theme?Ie(n.theme):"";return`<!DOCTYPE html>
1349
+ <html lang="en">
1350
+ <head>
1351
+ <meta charset="UTF-8" />
1352
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
1353
+ <title>${sn(i)}</title>
1354
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@${r}/dist/katex.min.css" crossorigin="anonymous">
1355
+ ${n.head||""} <style>
1356
+ ${s}
1357
+ ${d}
1358
+ ${n.css||""}
1359
+ </style>
1360
+ </head>
1361
+ <body>
1362
+ <div id="markdown-content" class="markdown-body">${t}</div>
1363
+ ${l}
1364
+ </body>
1365
+ </html>`}function he(e,n){let t={},i=n??{},r=(s,d)=>(String(s||"").match(new RegExp(`\\b${d}\\s*:\\s*(['"])([^\\n\\r]*?)\\1`,"i"))?.[2]??"").trim(),a=(s,d)=>{let c=String(s||"").trim().toLowerCase(),p=String(d||"").trim();return!c||!p||p.includes("/")||p.includes("\\")||p.includes("://")||p.startsWith("file://")?p:`${c}/${p}`},o=/```md2x[^\n\r]*[\r\n]([\s\S]*?)```/gi,l=[...String(e||"").matchAll(o)];for(let s of l){let d=String(s[1]??""),c=r(d,"type"),p=r(d,"template"),f=a(c,p);if(!f)continue;let u=(typeof i[f]=="string"?i[f]:void 0)??(p&&typeof i[p]=="string"?i[p]:void 0),m=Yt[f],h=typeof u=="string"?u:m;h&&(t[f]=h,p&&(t[p]=h))}return t}function Kt(e){let n=new Set,t=/\blanguage-([a-z0-9-]+)\b/gi,i;for(;i=t.exec(e);){let r=String(i[1]||"").toLowerCase();(r==="graphviz"||r==="gv")&&(r="dot"),r==="vegalite"&&(r="vega-lite"),r&&n.add(r)}return Array.from(n)}var Xa={mermaid:"live-runtime-mermaid.js",dot:"live-runtime-dot.js",vega:"live-runtime-vega.js","vega-lite":"live-runtime-vega.js",infographic:"live-runtime-infographic.js",canvas:"live-runtime-canvas.js",html:"live-runtime-html.js",svg:"live-runtime-svg.js",md2x:"live-runtime-md2x.js"};function zn(e){let n=new Set;for(let t of e){let i=Xa[String(t||"").trim().toLowerCase()];i&&n.add(i)}return Array.from(n)}function mn(e,n={}){let t=n.md2xVersion||"latest",i=n.runtimeBaseUrl||`https://cdn.jsdelivr.net/npm/md2x@${t}/dist/renderer/`,r=n.mermaidUrl||"https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js",a=zn(e),o=a.includes("live-runtime-mermaid.js"),l=new URL("live-runtime-core.js",i).href,s=Array.from(a).sort().map(c=>` <script src="${sn(new URL(c,i).href)}"></script>`).join(`
1366
+ `),d=JSON.stringify({baseHref:n.baseHref||"",themeConfig:n.themeConfig??null,md2xTemplateFiles:n.md2xTemplateFiles??{},cdn:n.cdn??{},rootSelector:"#markdown-content"}).replace(/</g,"\\u003c");return`
1367
+ <!-- md2x live diagram renderer (CDN) -->
1368
+ <script>try { window.__md2xLiveDone = false; } catch {}</script>
1369
+ ${o?` <script src="${sn(r)}"></script>
1370
+ `:""} <script src="${sn(l)}"></script>
1371
+ ${s}
1372
+ <script>
1373
+ (function () {
1374
+ const opts = ${d};
1375
+ function run() {
1376
+ const fn = window.__md2xRenderDocument;
1377
+ if (typeof fn === 'function') {
1378
+ fn(opts).catch(() => { try { window.__md2xLiveDone = true; } catch {} });
1379
+ } else {
1380
+ try { window.__md2xLiveDone = true; } catch {}
1381
+ }
1382
+ }
1383
+ if (document.readyState === 'loading') {
1384
+ document.addEventListener('DOMContentLoaded', run, { once: true });
1385
+ } else {
1386
+ run();
1387
+ }
1388
+ })();
1389
+ </script>`}function cn(e){return _n.fonts[e]?.webFallback||e}function Le(e){return`${parseFloat(e)*4/3}px`}function Xt(e){let n=`presets_${e.replace(/-/g,"_")}`;return _e[n]}function Jt(e){let n=`layout_schemes_${e.replace(/-/g,"_")}`;return _e[n]}function Ja(e){let n=`color_schemes_${e.replace(/-/g,"_")}`;return _e[n]}function Qa(e){let n=`table_styles_${e.replace(/-/g,"_")}`;return _e[n]}function Za(e){let n=`code_themes_${e.replace(/-/g,"_")}`;return _e[n]}function Fe(e){let n=Xt(e);if(!n)return{};let t=Jt(n.layoutScheme),i=n?.fontScheme?.body?.fontFamily,r=t?.body?.fontSize?parseFloat(t.body.fontSize):void 0;return{fontFamily:typeof i=="string"?cn(i):void 0,fontSize:typeof r=="number"&&Number.isFinite(r)?r:void 0,diagramStyle:n?.diagramStyle,background:n?.page?.background,foreground:n?.page?.foreground}}function Ie(e){let n=Xt(e);if(!n)throw new Error(`Theme not found: ${e}`);let t=Jt(n.layoutScheme),i=Ja(n.colorScheme),r=Qa(n.tableStyle),a=Za(n.codeTheme),o=[],l=cn(n.fontScheme.body.fontFamily),s=Le(t.body.fontSize);o.push(`#markdown-content {
1390
+ font-family: ${l};
1391
+ font-size: ${s};
1392
+ line-height: ${t.body.lineHeight};
1393
+ color: ${i.text.primary};
1394
+ }`),o.push(`#markdown-content a { color: ${i.accent.link}; }
1395
+ #markdown-content a:hover { color: ${i.accent.linkHover}; }`),o.push(`.katex { font-size: ${s}; }`);for(let g of["h1","h2","h3","h4","h5","h6"]){let x=n.fontScheme.headings[g],y=t.headings[g],W=cn(x?.fontFamily||n.fontScheme.headings.fontFamily||n.fontScheme.body.fontFamily),v=x?.fontWeight||n.fontScheme.headings.fontWeight||"bold",A=i.headings?.[g]||i.text.primary,E=[`font-family: ${W}`,`font-size: ${Le(y.fontSize)}`,`font-weight: ${v}`,`color: ${A}`];y.alignment&&y.alignment!=="left"&&E.push(`text-align: ${y.alignment}`),y.spacingBefore&&y.spacingBefore!=="0pt"&&E.push(`margin-top: ${Le(y.spacingBefore)}`),y.spacingAfter&&y.spacingAfter!=="0pt"&&E.push(`margin-bottom: ${Le(y.spacingAfter)}`),o.push(`#markdown-content ${g} { ${E.join("; ")}; }`)}o.push("#markdown-content table { border-collapse: collapse; margin: 13px auto; overflow: auto; }");let d=i.table.border,c=r.border||{};if(o.push(`#markdown-content table th, #markdown-content table td { padding: ${r.cell.padding}; }`),c.all){let g=c.all.width.replace("pt","px");o.push(`#markdown-content table th, #markdown-content table td { border: ${g} solid ${d}; }`)}else o.push("#markdown-content table th, #markdown-content table td { border: none; }"),c.headerTop&&o.push(`#markdown-content table th { border-top: ${c.headerTop.width.replace("pt","px")} solid ${d}; }`),c.headerBottom&&o.push(`#markdown-content table th { border-bottom: ${c.headerBottom.width.replace("pt","px")} solid ${d}; }`),c.rowBottom&&o.push(`#markdown-content table td { border-bottom: ${c.rowBottom.width.replace("pt","px")} solid ${d}; }`),c.lastRowBottom&&o.push(`#markdown-content table tr:last-child td { border-bottom: ${c.lastRowBottom.width.replace("pt","px")} solid ${d}; }`);o.push(`#markdown-content table th { background-color: ${i.table.headerBackground}; color: ${i.table.headerText}; font-weight: ${r.header.fontWeight||"bold"}; }`),r.zebra?.enabled&&(o.push(`#markdown-content table tr:nth-child(even) { background-color: ${i.table.zebraEven}; }`),o.push(`#markdown-content table tr:nth-child(odd) { background-color: ${i.table.zebraOdd}; }`));let p=cn(n.fontScheme.code.fontFamily),f=Le(t.code.fontSize),u=i.background.code;o.push(`#markdown-content code { font-family: ${p}; font-size: ${f}; background-color: ${u}; }`),o.push(`#markdown-content pre { background-color: ${u}; }`),o.push(`#markdown-content pre code { font-family: ${p}; font-size: ${f}; background-color: transparent; }`),o.push(`#markdown-content .hljs { background: ${u} !important; color: ${a.foreground}; }`);for(let[g,x]of Object.entries(a.colors))o.push(`#markdown-content .hljs-${g} { color: ${x}; }`);let m=t.blocks,h=g=>!g||g==="0pt"?"0":Le(g);return m.paragraph&&o.push(`#markdown-content p { margin: ${h(m.paragraph.spacingBefore)} 0 ${h(m.paragraph.spacingAfter)} 0; }`),m.list&&o.push(`#markdown-content ul, #markdown-content ol { margin: ${h(m.list.spacingBefore)} 0 ${h(m.list.spacingAfter)} 0; }`),m.listItem&&o.push(`#markdown-content li { margin: ${h(m.listItem.spacingBefore)} 0 ${h(m.listItem.spacingAfter)} 0; }`),m.blockquote&&o.push(`#markdown-content blockquote { margin: ${h(m.blockquote.spacingBefore)} 0 ${h(m.blockquote.spacingAfter)} 0; padding: ${h(m.blockquote.paddingVertical)} ${h(m.blockquote.paddingHorizontal)}; border-left-color: ${i.blockquote.border}; }`),m.codeBlock&&o.push(`#markdown-content pre { margin: ${h(m.codeBlock.spacingBefore)} 0 ${h(m.codeBlock.spacingAfter)} 0; }`),m.table&&o.push(`#markdown-content table { margin: ${h(m.table.spacingBefore)} auto ${h(m.table.spacingAfter)} auto; }`),m.horizontalRule&&o.push(`#markdown-content hr { margin: ${h(m.horizontalRule.spacingBefore)} 0 ${h(m.horizontalRule.spacingAfter)} 0; }`),o.join(`
1396
+ `)}function Oe(e=!0){return`* { box-sizing: border-box; }
1397
+ body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif; line-height: 1.6; color: #333; }
1398
+ .markdown-body, #markdown-content { max-width: 100%; padding: 20px; }
1399
+ #markdown-content > div[style*="width"] { transform-origin: top left; break-inside: avoid; page-break-inside: avoid; }
1400
+ h1, h2, h3, h4, h5, h6 { margin-top: 24px; margin-bottom: 16px; font-weight: 600; line-height: 1.25; }
1401
+ h1 { font-size: 2em; border-bottom: 1px solid #eaecef; padding-bottom: 0.3em; }
1402
+ h2 { font-size: 1.5em; border-bottom: 1px solid #eaecef; padding-bottom: 0.3em; }
1403
+ h3 { font-size: 1.25em; }
1404
+ h4 { font-size: 1em; }
1405
+ h5 { font-size: 0.875em; }
1406
+ h6 { font-size: 0.85em; color: #6a737d; }
1407
+ p { margin-top: 0; margin-bottom: 16px; }
1408
+ a { color: #0366d6; text-decoration: none; }
1409
+ a:hover { text-decoration: underline; }
1410
+ ul, ol { padding-left: 2em; margin-top: 0; margin-bottom: 16px; }
1411
+ li { margin-bottom: 4px; }
1412
+ li + li { margin-top: 4px; }
1413
+ code { padding: 0.2em 0.4em; margin: 0; font-size: 85%; background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; }
1414
+ pre { padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; font-size: 85%; line-height: 1.45; background-color: #f6f8fa; border-radius: 3px; margin-top: 0; margin-bottom: 16px; }
1415
+ pre code { padding: 0; margin: 0; font-size: 100%; background-color: transparent; border: 0; white-space: inherit; overflow-wrap: inherit; word-break: inherit; }
1416
+ blockquote { padding: 0 1em; color: #6a737d; border-left: 0.25em solid #dfe2e5; margin: 0 0 16px 0; }
1417
+ blockquote > :first-child { margin-top: 0; }
1418
+ blockquote > :last-child { margin-bottom: 0; }
1419
+ table { border-collapse: collapse; border-spacing: 0; margin-top: 0; margin-bottom: 16px; width: auto; }
1420
+ th, td { padding: 6px 13px; border: 1px solid #dfe2e5; }
1421
+ th { font-weight: 600; background-color: #f6f8fa; }
1422
+ tr:nth-child(2n) { background-color: #f6f8fa; }
1423
+ img { max-width: 100%; height: auto; box-sizing: content-box; }
1424
+ .md2x-diagram { text-align: center; break-inside: avoid; page-break-inside: avoid; }
1425
+ .md2x-diagram .md2x-diagram-inner { display: inline-block; max-width: 100%; text-align: left; }
1426
+ .md2x-diagram .md2x-diagram-mount { display: inline-block; max-width: 100%; }
1427
+ .md2x-diagram .vega-embed { display: inline-block; max-width: 100%; width: auto !important; }
1428
+ .md2x-diagram .md2x-diagram-inner svg, .md2x-diagram .md2x-diagram-inner > svg { display: block; margin-left: auto; margin-right: auto; max-width: 100%; }
1429
+ .md2x-diagram img, img.md2x-diagram { display: block; max-width: 100%; height: auto; margin-left: auto; margin-right: auto; break-inside: avoid; page-break-inside: avoid; }
1430
+ #markdown-content svg { display: block; margin-left: auto; margin-right: auto; break-inside: avoid; page-break-inside: avoid; }
1431
+ img.block-image { display: block; margin: 16px 0; }
1432
+ .task-list-item { list-style-type: none; }
1433
+ .task-list-item input { margin: 0 0.2em 0.25em -1.6em; vertical-align: middle; }
1434
+ .katex { font-size: 1.1em; }
1435
+ .katex-display { margin: 1em 0; overflow-x: auto; overflow-y: hidden; }
1436
+ .hljs { display: block; overflow-x: auto; color: #24292e; background: #f6f8fa; }
1437
+ .hljs-comment, .hljs-quote { color: #6a737d; font-style: italic; }
1438
+ .hljs-keyword, .hljs-selector-tag, .hljs-subst { color: #d73a49; }
1439
+ .hljs-number, .hljs-literal, .hljs-variable, .hljs-template-variable, .hljs-tag .hljs-attr { color: #005cc5; }
1440
+ .hljs-string, .hljs-doctag { color: #032f62; }
1441
+ .hljs-title, .hljs-section, .hljs-selector-id { color: #6f42c1; font-weight: bold; }
1442
+ .hljs-type, .hljs-class .hljs-title { color: #6f42c1; }
1443
+ .hljs-tag, .hljs-name, .hljs-attribute { color: #22863a; }
1444
+ .hljs-regexp, .hljs-link { color: #032f62; }
1445
+ .hljs-symbol, .hljs-bullet { color: #e36209; }
1446
+ .hljs-built_in, .hljs-builtin-name { color: #005cc5; }
1447
+ .hljs-meta { color: #6a737d; font-weight: bold; }
1448
+ .hljs-deletion { color: #b31d28; background-color: #ffeef0; }
1449
+ .hljs-addition { color: #22863a; background-color: #f0fff4; }
1450
+ .hljs-emphasis { font-style: italic; }
1451
+ .hljs-strong { font-weight: bold; }
1452
+ ${e?"hr { height: 0; padding: 0; margin: 0; background-color: transparent; border: 0; page-break-after: always; break-after: page; visibility: hidden; }":"hr { height: 0.25em; padding: 0; margin: 24px 0; background-color: #e1e4e8; border: 0; }"}`}import*as Ce from"fs";import*as $ from"path";import{createRequire as ll}from"module";import{fileURLToPath as sl,pathToFileURL as He}from"url";import*as X from"fs";import*as Zt from"os";import*as G from"path";import{fileURLToPath as el,pathToFileURL as un}from"url";function nl(){return globalThis.__md2x_module_dir__?globalThis.__md2x_module_dir__:G.dirname(el(import.meta.url))}var $n=null;function Qt(e){if(typeof e=="string"){let n=e.trim();return n||null}if(Array.isArray(e)){let n=e.filter(t=>typeof t=="string").map(t=>t.trim()).filter(Boolean);return n.length?n.join(", "):null}return null}function tl(){let e=nl();return G.join(e,"renderer","puppeteer-render.html")}function rl(e){switch(e){case"Letter":return{widthIn:8.5,heightIn:11};case"Legal":return{widthIn:8.5,heightIn:14};case"A3":return{widthIn:11.69,heightIn:16.54};case"A5":return{widthIn:5.83,heightIn:8.27};case"A4":default:return{widthIn:8.27,heightIn:11.69}}}function il(e){switch(e){case"A3":return{top:"25mm",bottom:"25mm",left:"20mm",right:"20mm"};case"A5":return{top:"15mm",bottom:"15mm",left:"12mm",right:"12mm"};case"Legal":return{top:"25mm",bottom:"25mm",left:"20mm",right:"20mm"};case"Letter":case"A4":default:return{top:"20mm",bottom:"20mm",left:"15mm",right:"15mm"}}}function hn(e){if(typeof e=="number")return e/96;let n=String(e??"").trim();if(!n)return null;let t=n.match(/^(-?\d+(?:\.\d+)?)(px|in|mm|cm)$/i);if(!t)return null;let i=parseFloat(t[1]);if(!Number.isFinite(i))return null;let r=t[2].toLowerCase();return r==="in"?i:r==="cm"?i/2.54:r==="mm"?i/25.4:r==="px"?i/96:null}async function Ne(){try{$n=await import("puppeteer")}catch{return console.warn("Puppeteer dependency not found. Diagrams/HTML/SVG will be skipped."),console.warn("If you are using the published CLI, run via `npx md2x ...` (it installs Puppeteer automatically)."),console.warn("If you are running from this repo, install CLI deps first: `npm -C node i` (or `pnpm -C node i`)."),null}let e=null,n=null,t=null,i=[],r=s=>{i.push(s),i.length>60&&i.shift()},a=()=>{let s=[G.join(process.cwd(),".md2x-"),G.join(Zt.tmpdir(),"md2x-")];for(let d of s)try{return X.mkdirSync(G.dirname(d),{recursive:!0}),X.mkdtempSync(d)}catch{}throw new Error("Unable to create a writable temp directory for Chromium runtime files")},o=async s=>{if(!n||!s)return;let d=un(s+G.sep).href;await n.evaluate(c=>{let p=window;if(typeof p.__md2xSetBaseHref=="function"){p.__md2xSetBaseHref(c);return}let f=document.querySelector("base");f||(f=document.createElement("base"),document.head.appendChild(f)),f.href=c},d)};return{async initialize(){if(!$n)return;let s=tl();if(!X.existsSync(s))throw new Error(`Missing renderer assets: ${s}
1453
+ Run \`npm run node\` to build the CLI (it generates node/dist/renderer/*).`);t=a();let d=G.join(t,"chrome-profile");X.mkdirSync(d,{recursive:!0}),e=await $n.launch({headless:!0,userDataDir:d,env:{...process.env,HOME:t,XDG_CACHE_HOME:G.join(t,"xdg-cache"),XDG_CONFIG_HOME:G.join(t,"xdg-config"),XDG_DATA_HOME:G.join(t,"xdg-data")},args:["--no-sandbox","--disable-setuid-sandbox","--disable-web-security","--allow-file-access-from-files","--disable-crashpad","--no-crashpad",`--crash-dumps-dir=${G.join(t,"crashpad")}`,`--user-data-dir=${d}`,"--disable-breakpad","--disable-crash-reporter","--disable-features=Crashpad","--no-first-run","--no-default-browser-check"]}),n=await e.newPage(),n.on("console",c=>{r(`[console.${c.type()}] ${c.text()}`)}),n.on("pageerror",c=>{let p=c instanceof Error?c.message:String(c);r(`[pageerror] ${p}`)}),n.on("requestfailed",c=>{let p=c.failure();r(`[requestfailed] ${c.url()} ${p?.errorText??""}`.trim())}),await n.setViewport({width:2e3,height:2e3}),await n.goto(un(s).href,{waitUntil:"domcontentloaded"});try{await n.waitForFunction(()=>window.__md2xRenderReady===!0,{timeout:3e4})}catch(c){let p=`Renderer page did not become ready within 30s.
1454
+ Common causes:
1455
+ - \`puppeteer-render.html\` has a <base> that breaks relative script loading
1456
+ - missing/broken \`node/dist/renderer/puppeteer-runtime-core.js\`
1457
+ - browser console error during initialization
1458
+ `,f=i.length?`
1459
+ Last browser logs:
1460
+ ${i.join(`
1461
+ `)}
1462
+ `:"",u=c instanceof Error?c.message:String(c);throw new Error(`${p}
1463
+ Original error: ${u}${f}`)}},async render(s,d,c,p){if(!n)return null;try{if(await o(c),s==="md2x"){let u=v=>{let E=v?.fontSize??12,Y=14/16*(E/12)*4;return Math.max(1,Math.min(4,Y))};try{let v=u(p??null),A=n.viewport();(!A||A.deviceScaleFactor!==v)&&await n.setViewport({width:A?.width??2e3,height:A?.height??2e3,deviceScaleFactor:v})}catch{}let m=await n.evaluate(async(v,A)=>{let Y=window.__md2xRenderToDom;if(typeof Y!="function")throw new Error("__md2xRenderToDom is not available on page");return await Y(v,A)},d,p??null);try{await n.waitForSelector(`#${m}`,{timeout:3e4})}catch{}try{await n.waitForNetworkIdle?.({idleTime:500,timeout:15e3})}catch{}let h=await n.$(`#${m}`);if(!h)throw new Error(`md2x screenshot element not found: #${m}`);let g=await h.boundingBox(),x=await n.evaluate(()=>window.devicePixelRatio||1).catch(()=>1),y=await h.screenshot({type:"png",omitBackground:!0,captureBeyondViewport:!0});try{await n.evaluate(v=>{let A=window;typeof A.__md2xCleanupDom=="function"&&A.__md2xCleanupDom(v)},m)}catch{}return{base64:(Buffer.isBuffer(y)?y:Buffer.from(y)).toString("base64"),width:Math.max(1,Math.round((g?.width??1)*(typeof x=="number"&&Number.isFinite(x)?x:1))),height:Math.max(1,Math.round((g?.height??1)*(typeof x=="number"&&Number.isFinite(x)?x:1))),format:"png"}}return await n.evaluate(async(u,m,h)=>{let x=window.__md2xRender;if(typeof x!="function")throw new Error("Renderer function not available on page");return await x(u,m,h)},s,d,p??null)}catch(f){let u=f instanceof Error?f.message:String(f);return console.warn(`Failed to render ${s}: ${u}`),null}},async exportToPdf(s,d,c={},p){if(!n)throw new Error("Browser not initialized");let f=await e.newPage(),u=null;try{let h=`<!DOCTYPE html>
1464
+ <html>
1465
+ <head>
1466
+ <meta charset="UTF-8">
1467
+ <title>${c.title||"Document"}</title>
1468
+ <style>${d}</style>
1469
+ </head>
1470
+ <body>
1471
+ <div id="markdown-content">${s}</div>
1472
+ </body>
1473
+ </html>`;p?(u=G.join(p,`__md2x_temp_${Date.now()}.html`),X.writeFileSync(u,h,"utf-8"),await f.goto(un(u).href,{waitUntil:"networkidle0"})):await f.setContent(h,{waitUntil:"networkidle0"});try{await f.evaluate(()=>typeof window.__md2xLiveDone<"u")&&await f.waitForFunction(()=>window.__md2xLiveDone===!0,{timeout:6e4})}catch{}try{await f.evaluate(async()=>{let b=document.fonts?.ready;b&&typeof b.then=="function"&&await b;let S=Array.from(document.images||[]);await Promise.all(S.map(k=>k.complete?null:new Promise(R=>{k.addEventListener("load",()=>R(),{once:!0}),k.addEventListener("error",()=>R(),{once:!0})})))})}catch{}let g=c.format||"A4",x=c.landscape||!1,y=c.scale||1,{widthIn:W,heightIn:v}=rl(g),A=x?W:v,E=il(g),Y=hn(c.margin?.top??E.top)??hn(E.top),Qe=hn(c.margin?.bottom??E.bottom)??hn(E.bottom),Sn=(A-Y-Qe)*96/y;await f.evaluate(b=>{let S=document.getElementById("markdown-content");if(!S)return;let k=window.getComputedStyle(S),R=parseFloat(k.paddingTop||"0")||0,_=parseFloat(k.paddingBottom||"0")||0,F=Math.max(0,b-R-_);S.querySelectorAll(".md2x-diagram img.md2x-diagram, img.md2x-diagram").forEach(M=>{let L=M,B=L.getBoundingClientRect().height||L.naturalHeight||0;B&&(B<=F+.5||(L.style.maxHeight=`${F}px`,L.style.height="auto",L.style.width="auto",L.style.maxWidth="100%",L.style.objectFit="contain"))})},Sn),await f.evaluate(()=>{let b=document.getElementById("markdown-content");if(!b)return;let S=b.clientWidth;if(!S)return;b.querySelectorAll(':scope > div[style*="width"]').forEach(R=>{let _=R,F=_.style.width?.match(/^(\d+(?:\.\d+)?)px$/);if(!F)return;let P=parseFloat(F[1]);if(!Number.isFinite(P)||P<=0)return;let M=Math.min(1,S/P);M>=.999||(_.style.transformOrigin="top left",_.style.transform=`scale(${M})`)})});let ge={printBackground:c.printBackground!==!1,scale:c.scale||1,displayHeaderFooter:c.displayHeaderFooter||!1,headerTemplate:c.headerTemplate||"",footerTemplate:c.footerTemplate||"",margin:{top:c.margin?.top??E.top,bottom:c.margin?.bottom??E.bottom,left:c.margin?.left??E.left,right:c.margin?.right??E.right}};c.width&&c.height?(ge.width=c.width,ge.height=c.height):(ge.format=c.format||"A4",ge.landscape=c.landscape||!1);let qn=await f.pdf(ge);return Buffer.from(qn)}finally{if(await f.close(),u)try{X.unlinkSync(u)}catch{}}},async exportToImage(s,d,c={},p){let f=await this.exportToImageParts(s,d,{...c,split:!1},p);if(f.length!==1)throw new Error("exportToImage() received multiple image parts. Use exportToImageParts() instead.");return f[0]},async exportToImageParts(s,d,c={},p){if(!n)throw new Error("Browser not initialized");let f=await e.newPage(),u=null;try{let m=c.viewport??{};await f.setViewport({width:Math.max(320,Math.floor(m.width??1200)),height:Math.max(240,Math.floor(m.height??800)),deviceScaleFactor:Math.max(.25,m.deviceScaleFactor??1)});let h=`<!DOCTYPE html>
1474
+ <html>
1475
+ <head>
1476
+ <meta charset="UTF-8">
1477
+ <style>${d}</style>
1478
+ </head>
1479
+ <body>
1480
+ <div id="markdown-content">${s}</div>
1481
+ </body>
1482
+ </html>`;p?(u=G.join(p,`__md2x_temp_${Date.now()}.html`),X.writeFileSync(u,h,"utf-8"),await f.goto(un(u).href,{waitUntil:"networkidle0"})):await f.setContent(h,{waitUntil:"networkidle0"});try{await f.evaluate(async()=>{let b=document.fonts?.ready;b&&typeof b.then=="function"&&await b;let S=Array.from(document.images||[]);await Promise.all(S.map(k=>k.complete?null:new Promise(R=>{k.addEventListener("load",()=>R(),{once:!0}),k.addEventListener("error",()=>R(),{once:!0})})))})}catch{}if(typeof c.scrollToLoad=="boolean"?c.scrollToLoad:!c.selector&&c.fullPage!==!1){let b=c.scroll??{},S=typeof b.delayMs=="number"&&Number.isFinite(b.delayMs)?Math.max(0,b.delayMs):250,k=typeof b.maxSteps=="number"&&Number.isFinite(b.maxSteps)?Math.max(1,Math.floor(b.maxSteps)):40,R=typeof b.maxTimeMs=="number"&&Number.isFinite(b.maxTimeMs)?Math.max(100,Math.floor(b.maxTimeMs)):1e4,_=typeof b.stepPx=="number"&&Number.isFinite(b.stepPx)?Math.max(1,b.stepPx):0;try{await f.evaluate(async F=>{let P=D=>new Promise(N=>setTimeout(N,D)),M=document.scrollingElement||document.documentElement,L=Date.now(),ce=()=>F.stepPx>0?F.stepPx:Math.max(1,Math.floor(window.innerHeight*.85)),B=-1,K=0;for(let D=0;D<F.maxSteps;D++){let N=ce();M.scrollTop=Math.min(M.scrollTop+N,M.scrollHeight),await P(F.delayMs);let Z=M.scrollTop;if(Z===B?K++:K=0,B=Z,Z+window.innerHeight>=M.scrollHeight-2||K>=2||Date.now()-L>F.maxTimeMs)break}M.scrollTop=0,await P(Math.min(250,F.delayMs))},{delayMs:S,maxSteps:k,maxTimeMs:R,stepPx:_}),await f.evaluate(async()=>{let F=Array.from(document.images||[]);await Promise.all(F.map(P=>P.complete?null:new Promise(M=>{P.addEventListener("load",()=>M(),{once:!0}),P.addEventListener("error",()=>M(),{once:!0})})))})}catch{}try{await f.waitForNetworkIdle?.({idleTime:500,timeout:5e3})}catch{}}try{await f.evaluate(()=>typeof window.__md2xLiveDone<"u")&&(await f.waitForFunction(()=>window.__md2xLiveDone===!0,{timeout:6e4}),await f.waitForNetworkIdle?.({idleTime:500,timeout:1e4}).catch(()=>{}))}catch{}let x=typeof c.maxPixelWidth=="number"&&Number.isFinite(c.maxPixelWidth)?c.maxPixelWidth:2e3;if(x>0)try{let b=await f.evaluate(S=>{if(S){let R=Array.from(document.querySelectorAll(S));if(!R.length)return 0;let _=1/0,F=-1/0;for(let M of R){let L=M.getBoundingClientRect();_=Math.min(_,L.left),F=Math.max(F,L.right)}let P=F-_;return Number.isFinite(P)?P:0}let k=document.documentElement;return Math.max(k.scrollWidth,k.clientWidth)||0},Qt(c.selector));if(b>0){let S=f.viewport(),k=S?.deviceScaleFactor??1,R=Math.min(k,x/b),_=Math.max(.25,R);Math.abs(_-k)>=.01&&await f.setViewport({width:S?.width??Math.max(320,Math.floor(m.width??1200)),height:S?.height??Math.max(240,Math.floor(m.height??800)),deviceScaleFactor:_})}}catch{}let y=c.type??"png",W=c.fullPage!==!1,v={type:y};if((y==="jpeg"||y==="webp")&&typeof c.quality=="number"){let b=Math.max(0,Math.min(100,Math.round(c.quality)));v.quality=b}typeof c.fromSurface=="boolean"&&(v.fromSurface=c.fromSurface);let A=async b=>{let S=await f.screenshot(b);return Buffer.isBuffer(S)?S:Buffer.from(S)},E=async()=>{try{return await f.evaluate(()=>{let b=document.documentElement,S=document.body;return{width:Math.max(b.scrollWidth,S?.scrollWidth??0,b.clientWidth),height:Math.max(b.scrollHeight,S?.scrollHeight??0,b.clientHeight),dpr:window.devicePixelRatio||1}})}catch{return{width:0,height:0,dpr:1}}};if(c.selector){let b=Qt(c.selector);if(!b)throw new Error("image.selector is empty");await f.waitForSelector(b,{timeout:3e4});let S=await f.$$(b);if(!S.length)throw new Error(`Element not found for selector: ${b}`);let k=c.selectorMode??"stitch",R=k==="first"?[S[0]]:S,_=typeof c.selectorPadding=="number"&&Number.isFinite(c.selectorPadding)?Math.max(0,c.selectorPadding):0;if(k==="stitch"){let T=typeof c.selectorGap=="number"&&Number.isFinite(c.selectorGap)?Math.max(0,Math.floor(c.selectorGap)):0,C="#__md2x_selector_stitch__",ee=async()=>{try{await f.evaluate(()=>{let I="__md2xSelectorStitchState",re=window[I];if(!re)return;let ie=Array.isArray(re.moves)?re.moves:[];for(let oe of ie)try{let be=oe&&oe.el,pe=oe&&oe.ph;if(!be||!pe)continue;let fe=pe.parentNode;if(!fe)continue;fe.insertBefore(be,pe),pe.remove?.()}catch{}try{re.container?.remove?.()}catch{}try{delete window[I]}catch{}})}catch{}};await ee();try{await f.evaluate((me,Ze)=>{let en="__md2xSelectorStitchState",$e=window[en];if($e&&$e.container)try{$e.container.remove()}catch{}let cr=document.getElementById("markdown-content")||document.body,ae=document.createElement("div");ae.id="__md2x_selector_stitch__",ae.style.display="flex",ae.style.flexDirection="column",ae.style.alignItems="stretch",ae.style.gap=String(Ze)+"px",ae.style.maxWidth="100%",ae.style.boxSizing="border-box",cr.appendChild(ae);let dr=Array.from(document.querySelectorAll(me)).filter(Me=>{let Se=Me.parentElement;for(;Se;){try{if(Se.matches(me))return!1}catch{}Se=Se.parentElement}return!0}),Wn=[];for(let Me of dr){let Se=Me.parentNode;if(!Se)continue;let Yn=document.createComment("md2x-stitch");Se.insertBefore(Yn,Me);let ke=document.createElement("div");ke.style.display="flex",ke.style.justifyContent="center",ke.style.alignItems="flex-start",ke.style.width="100%",ke.style.boxSizing="border-box",ke.appendChild(Me),ae.appendChild(ke),Wn.push({el:Me,ph:Yn})}window[en]={container:ae,moves:Wn}},b,T),await f.waitForSelector(C,{timeout:5e3});let I=await f.$(C);if(!I)throw new Error(`Unable to create stitch container for selector: ${b}`);try{await f.evaluate(()=>new Promise(me=>requestAnimationFrame(()=>me())))}catch{}let re=await f.evaluate(()=>{let me=document.documentElement,Ze=document.body,en=Math.max(me.scrollWidth,Ze?.scrollWidth??0,me.clientWidth),$e=Math.max(me.scrollHeight,Ze?.scrollHeight??0,me.clientHeight);return{width:en,height:$e}}),ie=await I.boundingBox();if(!ie)throw new Error(`Unable to determine bounding box for selector: ${b}`);let oe=Math.max(0,ie.x-_),be=Math.max(0,ie.y-_),pe=Math.min(re.width-oe,ie.width+_*2),fe=Math.min(re.height-be,ie.height+_*2);if(!(pe>0)||!(fe>0))throw new Error(`Unable to determine bounding box for selector: ${b}`);let sr={...v,clip:{x:oe,y:be,width:pe,height:fe},captureBeyondViewport:typeof c.captureBeyondViewport=="boolean"?c.captureBeyondViewport:!0,omitBackground:c.omitBackground??!1};return[await A(sr)]}finally{await ee()}}let F=await f.evaluate(()=>{let T=document.documentElement,C=document.body,ee=Math.max(T.scrollWidth,C?.scrollWidth??0,T.clientWidth),I=Math.max(T.scrollHeight,C?.scrollHeight??0,T.clientHeight);return{width:ee,height:I}}),P=async()=>{let T=[],C=0;for(let ee of R){try{await ee.evaluate(fe=>{fe.scrollIntoView({block:"start",inline:"nearest"})})}catch{}let I=await ee.boundingBox();if(!I)continue;let re=Math.max(0,I.x-_),ie=Math.max(0,I.y-_),oe=Math.min(F.width-re,I.width+_*2),be=Math.min(F.height-ie,I.height+_*2);if(!(oe>0)||!(be>0))continue;let pe={...v,clip:{x:re,y:ie,width:oe,height:be},captureBeyondViewport:typeof c.captureBeyondViewport=="boolean"?c.captureBeyondViewport:!0,omitBackground:c.omitBackground??!1};C>0&&await new Promise(fe=>setTimeout(fe,40)),T.push(await A(pe)),C++}return T};if(k==="each"){let T=await P();if(!T.length)throw new Error(`Unable to determine bounding box for selector: ${b}`);return T}let M=1/0,L=1/0,ce=-1/0,B=-1/0,K=[];for(let T of R){let C=await T.boundingBox();C&&(M=Math.min(M,C.x),L=Math.min(L,C.y),ce=Math.max(ce,C.x+C.width),B=Math.max(B,C.y+C.height),K.push(Math.round(C.y+C.height)))}if(!Number.isFinite(M)||!Number.isFinite(L)||!Number.isFinite(ce)||!Number.isFinite(B))throw new Error(`Unable to determine bounding box for selector: ${b}`);let D=Math.max(0,M-_),N=Math.max(0,L-_),Z=Math.min(F.width,ce+_),j=Math.min(F.height,B+_),de=Math.max(1,Z-D),ne=Math.max(1,j-N),ye=c.split??"auto",De=Math.max(.25,await f.evaluate(()=>window.devicePixelRatio||1).catch(()=>1)),tr=Math.ceil(ne*De);if(!(ye===!0||ye==="auto"&&tr>3e4)){let T={...v,clip:{x:D,y:N,width:de,height:ne},captureBeyondViewport:typeof c.captureBeyondViewport=="boolean"?c.captureBeyondViewport:!0,omitBackground:c.omitBackground??!1};return[await A(T)]}let rr=typeof c.splitMaxPixelHeight=="number"&&Number.isFinite(c.splitMaxPixelHeight)?Math.max(500,Math.floor(c.splitMaxPixelHeight)):14e3,ir=typeof c.splitOverlapPx=="number"&&Number.isFinite(c.splitOverlapPx)?Math.max(0,Math.floor(c.splitOverlapPx)):0,Gn=Math.max(200,Math.floor(rr/De)),or=Math.min(400,Math.floor(Gn*.25)),ar=Array.from(new Set([...K,Math.round(j)])).filter(T=>Number.isFinite(T)).map(T=>Math.max(0,Math.round(T))).sort((T,C)=>T-C),lr=T=>{let C=Math.min(j,T+Gn);if(C>=j)return j;let ee=-1;for(let I of ar)if(!(I<=T+1)){if(I>C)break;I-T<or||(ee=I)}return ee>0?ee:Math.max(T+1,C)},Vn=[],ze=N,kn=0;for(;ze<j&&kn<1e4;){let T=lr(ze),C=Math.max(1,T-ze),ee={...v,clip:{x:D,y:ze,width:de,height:C},captureBeyondViewport:!0,omitBackground:c.omitBackground??!1};if(kn>0&&await new Promise(I=>setTimeout(I,40)),Vn.push(await A(ee)),T>=j)break;ze=Math.max(N,T-ir),kn++}return Vn}if(!W)return v.fullPage=!1,v.captureBeyondViewport=!1,v.omitBackground=c.omitBackground??!1,[await A(v)];let Y=await E(),Qe=Math.max(.25,Y.dpr||1),Sn=Math.ceil((Y.height||0)*Qe),ge=c.split??"auto";if(ge===!0||ge==="auto"&&Sn>3e4){let b=typeof c.splitMaxPixelHeight=="number"&&Number.isFinite(c.splitMaxPixelHeight)?Math.max(500,Math.floor(c.splitMaxPixelHeight)):14e3,S=typeof c.splitOverlapPx=="number"&&Number.isFinite(c.splitOverlapPx)?Math.max(0,Math.floor(c.splitOverlapPx)):0,k=Math.max(200,Math.floor(b/Qe)),R=Math.max(1,Y.width||(f.viewport()?.width??1200)),_=Math.max(1,Y.height||(f.viewport()?.height??800)),F=[],P=0,M=0,L=await f.evaluate(()=>{let B=document.getElementById("markdown-content"),K=document.scrollingElement||document.documentElement;K.scrollTop=0;let D=[0],N=de=>{let ye=de.getBoundingClientRect().bottom+(window.scrollY||0);Number.isFinite(ye)&&D.push(Math.round(ye))};B&&Array.from(B.children).forEach(ne=>{let ye=ne.tagName.toLowerCase();if(ye==="ul"||ye==="ol"){let De=Array.from(ne.querySelectorAll(":scope > li"));if(De.length>0){De.forEach(N);return}}N(ne)});let Z=Math.max(K.scrollHeight,document.documentElement.scrollHeight);D.push(Math.round(Z)),D.sort((de,ne)=>de-ne);let j=[];for(let de of D){let ne=Math.max(0,de);(!j.length||j[j.length-1]!==ne)&&j.push(ne)}return j}),ce=B=>{let K=Math.min(_,B+k);if(K>=_)return _;let D=Math.min(400,Math.floor(k*.25)),N=-1;for(let Z=0;Z<L.length;Z++){let j=L[Z];if(!(j<=B+1)){if(j>K)break;j-B<D||(N=j)}}return N>0?N:Math.max(B+1,K)};for(;P<_&&M<1e4;){let B=ce(P),K=Math.max(1,B-P),D={...v,clip:{x:0,y:P,width:R,height:K},captureBeyondViewport:!0,omitBackground:c.omitBackground??!1};try{await f.evaluate(N=>{let Z=document.scrollingElement||document.documentElement;Z.scrollTop=Math.max(0,N)},P)}catch{}if(M>0&&await new Promise(N=>setTimeout(N,80)),F.push(await A(D)),B>=_)break;P=Math.max(0,B-S),M++}try{await f.evaluate(()=>{let B=document.scrollingElement||document.documentElement;B.scrollTop=0})}catch{}return F}v.fullPage=!0,v.captureBeyondViewport=typeof c.captureBeyondViewport=="boolean"?c.captureBeyondViewport:!1,v.omitBackground=c.omitBackground??!1,v.captureBeyondViewport===!1&&(Y.width&&Y.width>16e3||Y.height&&Y.height>16e3)&&(v.captureBeyondViewport=!0);try{return[await A(v)]}catch(b){let S=b instanceof Error?b.message:String(b);if(v.fromSurface===!1){let k={...v};delete k.fromSurface;try{return[await A(k)]}catch{}}if(v.fullPage&&typeof v.captureBeyondViewport=="boolean"){let k={...v,captureBeyondViewport:!v.captureBeyondViewport};k.fromSurface===!1&&delete k.fromSurface;try{return[await A(k)]}catch{}}throw new Error(`Unable to capture screenshot. ${S}`)}}finally{if(await f.close(),u)try{X.unlinkSync(u)}catch{}}},async close(){if(e&&(await e.close(),e=null,n=null),t){try{X.rmSync(t,{recursive:!0,force:!0})}catch{}t=null}}}}import*as te from"fs";import*as z from"path";import{pathToFileURL as er}from"url";function ol(e){if(te.existsSync(z.join(e,"themes")))return e;let n=z.resolve(e,"../../src");if(te.existsSync(z.join(n,"themes")))return n;let t=z.resolve(process.cwd(),"src");if(te.existsSync(z.join(t,"themes")))return t;throw new Error("Unable to locate themes assets (expected themes/ directory).")}function al(e){te.mkdirSync(z.dirname(e),{recursive:!0})}var Un=class{constructor(){this.documentPath="";this.documentDir="";this.baseUrl="";this.needsUriRewrite=!1}setDocumentPath(n,t){this.documentPath=n,this.documentDir=z.dirname(n),this.baseUrl=t??er(this.documentDir+z.sep).href,this.needsUriRewrite=!1}resolvePath(n){return n.startsWith("file://")?new URL(n).pathname:z.isAbsolute(n)?n:z.resolve(this.documentDir||process.cwd(),n)}toResourceUrl(n){return er(n).href}async readFile(n,t){let i=await te.promises.readFile(n);return t?.binary?i.toString("base64"):i.toString("utf8")}async readRelativeFile(n,t){let i=this.resolvePath(n);return await this.readFile(i,t)}async fetchRemote(n){let t=await fetch(n,{signal:AbortSignal.timeout(15e3)});if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);let i=await t.arrayBuffer();return new Uint8Array(i)}};function je(e){let n=ol(e.moduleDir),t=new Map;t.set("selectedTheme",e.selectedThemeId),e.settings&&t.set("markdownViewerSettings",e.settings);let i=null,r=new Un;return r.setDocumentPath(z.join(process.cwd(),"__md2x__.md")),{platform:{platform:"node",cache:{async init(){},async calculateHash(){return""},async generateKey(){return""},async get(){return null},async set(){return!1},async clear(){return!0},async getStats(){return null}},renderer:{async init(){},setThemeConfig(){},getThemeConfig(){return null},async render(){throw new Error("RendererService not available in Node platform")}},storage:{async get(o){let l={};for(let s of o)t.has(s)&&(l[s]=t.get(s));return l},async set(o){for(let[l,s]of Object.entries(o))t.set(l,s)},async remove(o){for(let l of o)t.delete(l)}},file:{async download(o,l,s){let d=typeof o=="string"?Buffer.from(o,"base64"):Buffer.from(await o.arrayBuffer());if(s?.onProgress&&s.onProgress({uploaded:d.length,total:d.length}),e.output.kind==="buffer"){i=d;return}al(l),await te.promises.writeFile(l,d)}},resource:{async fetch(o){let l=o;if(l.startsWith("file://")){let d=new URL(l);return await te.promises.readFile(d.pathname,"utf8")}l.startsWith("./")&&(l=l.slice(2)),l.startsWith("/")&&(l=l.slice(1));let s=z.join(n,l);return await te.promises.readFile(s,"utf8")},getURL(o){return`./${o}`}},i18n:{translate(o){return o},getUILanguage(){return"en"}},message:{async send(){return null},addListener(){}},document:r},getCapturedBuffer:()=>i}}function ve(){return globalThis.__md2x_module_dir__?globalThis.__md2x_module_dir__:$.dirname(sl(import.meta.url))}function Ye(){typeof globalThis.atob!="function"&&(globalThis.atob=e=>Buffer.from(e,"base64").toString("binary")),typeof globalThis.btoa!="function"&&(globalThis.btoa=e=>Buffer.from(e,"binary").toString("base64"))}function cl(e,n,t,i,r){return e?{async render(a,o){let l=a==="md2x"&&typeof o=="string"?{code:o,templateFiles:i??{},cdn:{vue:r?.vue,vueSfcLoader:r?.vueSfcLoader,svelteCompiler:r?.svelteCompiler,svelteBase:r?.svelteBase}}:o,s=await e.render(a,l,n,t);return s||null}}:null}function Ke(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function dl(e){return e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&#x27;/g,"'").replace(/&#x2F;/g,"/").replace(/&#x3C;/gi,"<").replace(/&#x3E;/gi,">").replace(/&#x26;/gi,"&").replace(/&#60;/g,"<").replace(/&#62;/g,">").replace(/&#38;/g,"&")}async function pl(e,n,t,i,r,a,o){if(r!=="img"||!n)return e;let l=ot.filter(f=>f.nodeSelector.includes("code")).map(f=>f.language).filter(f=>f!==null),s=["graphviz","gv","vegalite"],d=[...l,...s].join("|");if(!d)return e;let c=new RegExp(`<pre><code class="(?:hljs )?language-(${d})">([\\s\\S]*?)<\\/code><\\/pre>`,"gi"),p=[...e.matchAll(c)];for(let f of p){let[u,m,h]=f,g=dl(String(h||"").replace(/<[^>]*>/g,"")),x=m.toLowerCase();(x==="graphviz"||x==="gv")&&(x="dot"),x==="vegalite"&&(x="vega-lite");try{let y=x==="md2x"?{code:g,templateFiles:a??{},cdn:{vue:o?.vue,vueSfcLoader:o?.vueSfcLoader,svelteCompiler:o?.svelteCompiler,svelteBase:o?.svelteBase}}:g,W=await n.render(x,y,t,i);if(W&&W.base64){let v=Ke(x),A=`<div class="md2x-diagram" data-md2x-diagram-kind="${v}"><img class="md2x-diagram" data-md2x-diagram-kind="${v}" src="data:image/${W.format};base64,${W.base64}" alt="${Ke(`${m} diagram`)}" style="max-width: 100%;" /></div>`;e=e.replace(u,A)}}catch(y){console.warn(`Failed to render ${m} diagram:`,y)}}return e}async function gn(e,n,t,i,r,a,o){let l=await fn(e),s=r==="img"?he(e,a):void 0;return l=await pl(l,n,t,i,r,s,o),l}var nr=new Map;function fl(e){let n=String(e||"").trim();if(!n)throw new Error("Missing live runtime filename");let t=nr.get(n);if(typeof t=="string")return t;let i=ve(),r=[$.join(i,"renderer",n),$.join(i,"..","..","dist","renderer",n),$.join(i,"..","dist","renderer",n)];for(let a of r)try{if(Ce.existsSync(a)){let o=Ce.readFileSync(a,"utf-8");return nr.set(n,o),o}}catch{}throw new Error(`Missing live renderer runtime: ${n}. Run node node/build.mjs to build node/dist assets.`)}function yn(e){let n=String(e||""),t=new Set,i=/\blanguage-([a-z0-9-]+)\b/gi,r;for(;r=i.exec(n);){let a=String(r[1]||"").toLowerCase();(a==="graphviz"||a==="gv")&&(a="dot"),a==="vegalite"&&(a="vega-lite"),a&&t.add(a)}return Array.from(t)}function ml(){try{let e=ve(),n=$.join(e,"..","package.json"),t=JSON.parse(Ce.readFileSync(n,"utf-8")),i=typeof t?.name=="string"?t.name:"md2x",r=typeof t?.version=="string"?t.version:"latest",a=encodeURIComponent(i).replace(/%2F/g,"/"),o=encodeURIComponent(r);return`https://cdn.jsdelivr.net/npm/${a}@${o}/dist/renderer/`}catch{return"https://cdn.jsdelivr.net/npm/md2x@latest/dist/renderer/"}}function bn(e,n,t,i,r,a){let o=h=>JSON.stringify(h).replace(/</g,"\\u003c"),l=t&&t.mermaid?String(t.mermaid):"https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js",s=r?.mode==="cdn"?"cdn":"inline",d=Array.isArray(a)?a:[];if(s==="cdn"){let h=r?.baseUrl||ml();return mn(d,{runtimeBaseUrl:h,mermaidUrl:l,baseHref:n,themeConfig:e,md2xTemplateFiles:i,cdn:t})}let c=zn(d),p=c.includes("live-runtime-mermaid.js"),f=o({baseHref:n||"",themeConfig:e??null,md2xTemplateFiles:i??{},cdn:t??{},rootSelector:"#markdown-content"}),u=["live-runtime-core.js",...c.sort()],m=u.map(h=>({file:h,source:fl(h)}));return`
1483
+ <!-- md2x live diagram renderer (worker mountToDom) (runtime: inline) -->
1484
+ <script>try { window.__md2xLiveDone = false; } catch {}</script>
1485
+ ${p?` <script src="${Ke(l)}"></script>
1486
+ `:""} <script>
1487
+ (function () {
1488
+ const runtimeFiles = ${o(u)};
1489
+ const runtimeSources = ${o(m)};
1490
+ for (let i = 0; i < runtimeSources.length; i++) {
1491
+ const src = runtimeSources[i] && runtimeSources[i].source ? String(runtimeSources[i].source) : '';
1492
+ if (!src) continue;
1493
+ const s = document.createElement('script');
1494
+ s.textContent = src;
1495
+ document.head.appendChild(s);
1496
+ }
1497
+ })();
1498
+ </script>
1499
+ <script>
1500
+ (function () {
1501
+ const opts = ${f};
1502
+ const start = Date.now();
1503
+
1504
+ function runWhenReady() {
1505
+ const fn = window.__md2xRenderDocument;
1506
+ if (typeof fn === 'function') {
1507
+ fn(opts).catch(() => { try { window.__md2xLiveDone = true; } catch {} });
1508
+ return;
1509
+ }
1510
+ if (Date.now() - start > 15000) {
1511
+ try { window.__md2xLiveDone = true; } catch {}
1512
+ return;
1513
+ }
1514
+ setTimeout(runWhenReady, 25);
1515
+ }
1516
+
1517
+ if (document.readyState === 'loading') {
1518
+ document.addEventListener('DOMContentLoaded', runWhenReady, { once: true });
1519
+ } else {
1520
+ runWhenReady();
1521
+ }
1522
+ })();
1523
+ </script>`}var wn=class{async exportToBuffer(n,t={}){Ye();let i=t.theme||"default",r=t.basePath??process.cwd(),a=ve(),{platform:o,getCapturedBuffer:l}=je({moduleDir:a,selectedThemeId:i,output:{kind:"buffer"},settings:{docxHrAsPageBreak:t.hrAsPageBreak??!0}}),s=globalThis.platform;globalThis.platform=o;let d=$.join(r,"__md2x__.md"),c=null;try{c=await Ne(),c&&await c.initialize();let p=Fe(i),f=he(n,t.templates),u=cl(c,r,p,f),{default:m}=await import("./docx-exporter-GL6CNCQD.js"),h=new m(u);h.setBaseUrl?.(He(d).href);let g=await h.exportToDocx(n,"__md2x__.docx",null);if(!g.success)throw new Error(g.error||"DOCX export failed");let x=l();if(!x)throw new Error("DOCX export produced no output buffer");return x}finally{try{c&&await c.close()}finally{globalThis.platform=s}}}};function xn(){let e=ve(),n=$.join(e,"vendor","katex","katex.min.css"),t=n;Ce.existsSync(n)||(t=ll(import.meta.url).resolve("katex/dist/katex.min.css"));let i=$.dirname(t),r=He($.join(i,"fonts")+$.sep).href,a=Ce.readFileSync(t,"utf-8");return a=a.replace(/url\((['"]?)(?:\.\/)?fonts\//g,`url($1${r}`),a}var vn=class{async exportToBuffer(n,t={}){Ye();let i=t.theme||"default",r=t.basePath??process.cwd(),a=ve(),{platform:o}=je({moduleDir:a,selectedThemeId:i,output:{kind:"buffer"}}),l=globalThis.platform;globalThis.platform=o;let s=null;try{if(s=await Ne(),!s)throw new Error("Failed to create browser renderer. Puppeteer is required for PDF export.");await s.initialize();let d=Fe(i),c=t.diagramMode??"img",p=await gn(n,s,r,d,c,t.templates,t.cdn);if(c==="live"){let g=He(r+$.sep).href,x=he(n,t.templates),y=yn(p);p=p+`
1524
+ `+bn(d??null,g,t.cdn,x,{mode:"inline"},y)}let f="";try{f=xn()}catch(g){console.warn("Failed to load KaTeX CSS for PDF export:",g)}let u=Oe(t.hrAsPageBreak??!0),m="";try{m=Ie(i)}catch(g){console.warn("Failed to load theme CSS, using base styles only:",g)}let h=f+`
1525
+ `+u+`
1526
+ `+m;return await s.exportToPdf(p,h,t.pdf,r)}finally{try{s&&await s.close()}finally{globalThis.platform=l}}}},Xe=class{async exportToBuffer(n,t={}){Ye();let i=t.theme||"default",r=t.basePath??process.cwd(),a=ve(),{platform:o}=je({moduleDir:a,selectedThemeId:i,output:{kind:"buffer"}}),l=globalThis.platform;globalThis.platform=o;let s=null;try{if(s=await Ne(),!s)throw new Error("Failed to create browser renderer. Puppeteer is required for image export.");await s.initialize();let d=Fe(i),c=t.diagramMode??"live",p=await gn(n,s,r,d,c,t.templates,t.cdn);if(c==="live"){let g=He(r+$.sep).href,x=he(n,t.templates),y=yn(p);p=p+`
1527
+ `+bn(d??null,g,t.cdn,x,{mode:"inline"},y)}let f="";try{f=xn()}catch(g){console.warn("Failed to load KaTeX CSS for image export:",g)}let u=Oe(t.hrAsPageBreak??!1),m="";try{m=Ie(i)}catch(g){console.warn("Failed to load theme CSS, using base styles only:",g)}let h=f+`
1528
+ `+u+`
1529
+ `+m;return await s.exportToImage(p,h,t.image,r)}finally{try{s&&await s.close()}finally{globalThis.platform=l}}}async exportToBuffers(n,t={}){Ye();let i=t.theme||"default",r=t.basePath??process.cwd(),a=ve(),{platform:o}=je({moduleDir:a,selectedThemeId:i,output:{kind:"buffer"}}),l=globalThis.platform;globalThis.platform=o;let s=null;try{if(s=await Ne(),!s)throw new Error("Failed to create browser renderer. Puppeteer is required for image export.");await s.initialize();let d=Fe(i),c=t.diagramMode??"live",p=await gn(n,s,r,d,c,t.templates,t.cdn);if(c==="live"){let g=He(r+$.sep).href,x=he(n,t.templates),y=yn(p);p=p+`
1530
+ `+bn(d??null,g,t.cdn,x,{mode:"inline"},y)}let f="";try{f=xn()}catch(g){console.warn("Failed to load KaTeX CSS for image export:",g)}let u=Oe(t.hrAsPageBreak??!1),m="";try{m=Ie(i)}catch(g){console.warn("Failed to load theme CSS, using base styles only:",g)}let h=f+`
1531
+ `+u+`
1532
+ `+m;return await s.exportToImageParts(p,h,t.image,r)}finally{try{s&&await s.close()}finally{globalThis.platform=l}}}},Je=class{async exportToString(n,t={}){Ye();let i=t.theme||"default",r=t.basePath??process.cwd(),a=ve(),o=t.diagramMode||"live",{platform:l}=je({moduleDir:a,selectedThemeId:i,output:{kind:"buffer"}}),s=globalThis.platform;globalThis.platform=l;let d=null;try{let c=Fe(i);o==="img"&&(d=await Ne(),d&&await d.initialize());let p=await gn(n,d,r,c,o,t.templates,t.cdn);if(!(t.standalone!==!1))return p;let u="";try{u=xn()}catch(E){console.warn("Failed to load KaTeX CSS for HTML export:",E)}let m=Oe(t.hrAsPageBreak??!1),h="";try{h=Ie(i)}catch(E){console.warn("Failed to load theme CSS for HTML export, using base styles only:",E)}let g=u+`
1533
+ `+m+`
1534
+ `+h,x=t.title||"Document",W=t.baseTag!==!1&&!!r?He(r+$.sep).href:"",v=W?` <base href="${Ke(W)}" />
1535
+ `:"",A=o==="live"?bn(c??null,W,t.cdn,he(n,t.templates),{mode:t.liveRuntime??"cdn",baseUrl:t.liveRuntimeBaseUrl},yn(p)):"";return`<!DOCTYPE html>
1536
+ <html lang="en">
1537
+ <head>
1538
+ <meta charset="UTF-8" />
1539
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
1540
+ ${v} <title>${Ke(x)}</title>
1541
+ <style>${g}</style>
1542
+ </head>
1543
+ <body>
1544
+ <div id="markdown-content" class="markdown-body">${p}</div>
1545
+ ${A}
1546
+ </body>
1547
+ </html>`}finally{try{d&&await d.close()}finally{globalThis.platform=s}}}async exportToBuffer(n,t={}){let i=await this.exportToString(n,t);return Buffer.from(i,"utf8")}};import*as se from"fs";import*as V from"path";async function ul(e,n={}){return new wn().exportToBuffer(e,n)}async function hl(e,n={}){return new vn().exportToBuffer(e,n)}async function Zl(e,n={}){return new Je().exportToString(e,n)}async function gl(e,n={}){return new Je().exportToBuffer(e,n)}async function es(e,n={}){return new Xe().exportToBuffer(e,n)}async function yl(e,n={}){return new Xe().exportToBuffers(e,n)}function bl(e){let n=V.extname(e).toLowerCase();return n===".pdf"?"pdf":n===".docx"?"docx":n===".html"||n===".htm"?"html":n===".png"?"png":n===".jpg"?"jpg":n===".jpeg"?"jpeg":n===".webp"?"webp":null}async function wl(e,n={},t){let i=n.skipFrontMatter?{content:e,data:{},hasFrontMatter:!1}:jn(e),r=i.hasFrontMatter?Hn(i.data):{},a=n.format??r.format??"pdf",o=n.theme??r.theme??"default",l=a==="docx"?"img":"live",s=n.diagramMode??r.diagramMode??l,d=n.hrAsPageBreak??r.hrAsPageBreak??!(a==="html"||pn(a)),c=n.basePath??process.cwd(),p=n.title??r.title??t??"Document",f=i.content,u,m;if(a==="pdf")u=await hl(f,{theme:o,basePath:c,hrAsPageBreak:d,diagramMode:s,cdn:n.cdn??r.cdn,pdf:{...n.pdf,...r.pdf,title:p},templates:{...r.templates??{},...n.templates??{}}});else if(a==="docx")u=await ul(f,{theme:o,basePath:c,hrAsPageBreak:d,templates:{...r.templates??{},...n.templates??{}}});else if(a==="html")u=await gl(f,{theme:o,basePath:c,diagramMode:s,hrAsPageBreak:d,title:p,standalone:n.standalone??r.standalone,baseTag:n.baseTag??r.baseTag,liveRuntime:n.liveRuntime??r.liveRuntime,liveRuntimeBaseUrl:n.liveRuntimeBaseUrl??r.liveRuntimeBaseUrl,cdn:n.cdn??r.cdn,templates:{...r.templates??{},...n.templates??{}}});else{let h=n.image??r.image,g=h?.type?h:{...h??{},type:Dn(a)};if(m=await yl(f,{theme:o,basePath:c,hrAsPageBreak:d,image:g,diagramMode:s,cdn:n.cdn??r.cdn,templates:{...r.templates??{},...n.templates??{}}}),!m.length)throw new Error("Image conversion produced no output");u=m[0]}return{buffer:u,format:a,buffers:m&&m.length>1?m:void 0}}async function ns(e,n,t={}){let i=V.resolve(e);if(!se.existsSync(i))throw new Error(`Input file not found: ${i}`);let r=se.readFileSync(i,"utf-8"),a=t.format;!a&&n&&(a=bl(n)??void 0);let o=V.basename(i,V.extname(i)),l=await wl(r,{...t,format:a,basePath:t.basePath??V.dirname(i),title:t.title},o),s;if(n)s=V.resolve(n);else{let c=V.dirname(i),p=V.basename(i,V.extname(i)),f=dn(l.format);s=V.join(c,`${p}${f}`)}let d=V.dirname(s);if(se.existsSync(d)||se.mkdirSync(d,{recursive:!0}),pn(l.format)&&l.buffers&&l.buffers.length>1){let c=l.buffers,p=dn(l.format),f=s.endsWith(p)?s.slice(0,-p.length):s,u=[];for(let m=0;m<c.length;m++){let h=String(m+1).padStart(3,"0"),g=`${f}.part-${h}${p}`;se.writeFileSync(g,c[m]),u.push(g)}return{buffer:c[0],buffers:c,outputPath:u[0],outputPaths:u,format:l.format}}return se.writeFileSync(s,l.buffer),{buffer:l.buffer,outputPath:s,format:l.format}}export{ki as a,jn as b,Hn as c,dn as d,pn as e,fn as f,Ka as g,wn as h,vn as i,Xe as j,Je as k,ul as l,hl as m,Zl as n,gl as o,es as p,yl as q,wl as r,ns as s};
1548
+ /*! Bundled license information:
1549
+
1550
+ js-yaml/dist/js-yaml.mjs:
1551
+ (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
1552
+ */