orbitchat 2.2.8 → 2.2.10

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 (64) hide show
  1. package/bin/orbitchat.js +45 -36
  2. package/dist/assets/_basePickBy-0t-1TdXj-DH4J1m8V.js +1 -0
  3. package/dist/assets/_baseUniq-DZ7Bpu3I-Co9egLVD.js +1 -0
  4. package/dist/assets/{api-L84wIOvt.js → api-0NuHuopb.js} +1 -1
  5. package/dist/assets/arc-CsV8WDj2-C9VadXC6.js +1 -0
  6. package/dist/assets/{architectureDiagram-VXUJARFQ-BuSDV2Do-_okKpoAJ.js → architectureDiagram-VXUJARFQ-5Jt_APG9-BoVNR4UV.js} +3 -3
  7. package/dist/assets/{blockDiagram-VD42YOAC-jQHtez-j-rtzBv-vF.js → blockDiagram-VD42YOAC-DTiW7a-n-CSp1ALjf.js} +4 -4
  8. package/dist/assets/{c4Diagram-YG6GDRKO-_5giM-EA-DjRoFacG.js → c4Diagram-YG6GDRKO-DfrzrMnC-CkCuHyrT.js} +4 -4
  9. package/dist/assets/channel-C1GZ9yWj-DYugq-sa.js +1 -0
  10. package/dist/assets/{chunk-4BX2VUAB-BeuiUsbc-DN2rdYji.js → chunk-4BX2VUAB-DP6WsS5b-DmFzjHyq.js} +1 -1
  11. package/dist/assets/chunk-55IACEB6-DcZAWW2t-DPyoMeFz.js +1 -0
  12. package/dist/assets/{chunk-B4BG7PRW-CnUkcto7-DHe7ngzh.js → chunk-B4BG7PRW-BVaRFjbY-BdpIBFL7.js} +3 -3
  13. package/dist/assets/{chunk-DI55MBZ5-CSd59tsh-DFg8M9sN.js → chunk-DI55MBZ5-NwybRWU6-D93ibRgN.js} +4 -4
  14. package/dist/assets/{chunk-FMBD7UC4-C6VImbBX-ip_5_GPo.js → chunk-FMBD7UC4-D0AjqgJd-BqUKvjQH.js} +1 -1
  15. package/dist/assets/{chunk-QN33PNHL-DrWWTLTH-tpIkWiz1.js → chunk-QN33PNHL-cmS1bOzt-B1tGHIDu.js} +1 -1
  16. package/dist/assets/{chunk-QZHKN3VN-C6_I39By-ZQp0I6tE.js → chunk-QZHKN3VN-DehtyeGo-BsFo-AuY.js} +1 -1
  17. package/dist/assets/chunk-TZMSLE5B-BILiPuwH-DOft2nRu.js +1 -0
  18. package/dist/assets/classDiagram-2ON5EDUG-_7dtGwsA-C3Nhy3w6.js +1 -0
  19. package/dist/assets/classDiagram-v2-WZHVMYZB-_7dtGwsA-C3Nhy3w6.js +1 -0
  20. package/dist/assets/clone-D8_vOzkg-D9aZREI4.js +1 -0
  21. package/dist/assets/{cose-bilkent-S5V4N54A-DcyCVH6S-zMMT3oqX.js → cose-bilkent-S5V4N54A-CDJ5hD7Q-BcxkEWNp.js} +1 -1
  22. package/dist/assets/{dagre-6UL2VRFP-B799wmhr-DuXOlM7I.js → dagre-6UL2VRFP-D6cOp6Da-xpk1mIcg.js} +2 -2
  23. package/dist/assets/{diagram-PSM6KHXK-Dxp2wzKk-CmF_yeQm.js → diagram-PSM6KHXK-C0ItMhu6-BHHxSZE4.js} +1 -1
  24. package/dist/assets/diagram-QEK2KX5R-CEsgotfL-F-1j8qO7.js +43 -0
  25. package/dist/assets/{diagram-S2PKOQOG-tSpHqt0k-Dhi7ufxY.js → diagram-S2PKOQOG-B6d1S6_G-Zzv-O9xk.js} +1 -1
  26. package/dist/assets/{erDiagram-Q2GNP2WA-DF6ylQ7o-CjIoFnUJ.js → erDiagram-Q2GNP2WA-B-w3sS7V-2nanwMJ6.js} +4 -4
  27. package/dist/assets/{flowDiagram-NV44I4VS-BQUYJeB--D2fTwlvO.js → flowDiagram-NV44I4VS-DssRq_2c-BffMgd28.js} +7 -7
  28. package/dist/assets/ganttDiagram-JELNMOA3-IIlGW_kJ-Dxu3SgAH.js +267 -0
  29. package/dist/assets/gitGraphDiagram-NY62KEGX-D9Tl4KHH--tnJGvul.js +65 -0
  30. package/dist/assets/{graph-aRt77rZZ-Dq9dkNsk.js → graph-BZqzM_VI-BBLTPB3S.js} +1 -1
  31. package/dist/assets/{index-p0knuDQ9.js → index-DodYl3VC.js} +194 -166
  32. package/dist/assets/index-V1hWOL-o.css +1 -0
  33. package/dist/assets/{index-rW5EEHFR-Cm6Gxbor.js → index-rkYlv_42-Bg0V1tPP.js} +1 -1
  34. package/dist/assets/{infoDiagram-ER5ION4S-ozjqEnsq-D0PwL9B_.js → infoDiagram-WHAUD3N6-CjmJiQNf-YInQHfWX.js} +1 -1
  35. package/dist/assets/{journeyDiagram-XKPGCS4Q-C6JuEafR-BSuib8Wf.js → journeyDiagram-XKPGCS4Q-D6S72Oe9-iYQx9Mof.js} +3 -3
  36. package/dist/assets/{kanban-definition-3W4ZIXB7-Ci4U3NR--Bxb6Yi8G.js → kanban-definition-3W4ZIXB7--JZpAUKg-C2LOftDm.js} +6 -6
  37. package/dist/assets/{layout-BKjRgLFe-WihuzEZg.js → layout-DHdXRoe5-CY2O2SIL.js} +1 -1
  38. package/dist/assets/{mindmap-definition-VGOIOE7T-DveejCtl-DXLxEnp4.js → mindmap-definition-VGOIOE7T-I33kejqp-b66KO8Rt.js} +3 -3
  39. package/dist/assets/{pieDiagram-ADFJNKIX-DAbSGtae-BruonBFZ.js → pieDiagram-ADFJNKIX-69ywrIzx-ceXn0a9Q.js} +3 -3
  40. package/dist/assets/{quadrantDiagram-AYHSOK5B-DnnzUQMW-DzWXEz5-.js → quadrantDiagram-AYHSOK5B-CySBol3o-CltGpVzM.js} +4 -4
  41. package/dist/assets/{requirementDiagram-UZGBJVZJ-BB9jagBx-q21wBQ9N.js → requirementDiagram-UZGBJVZJ-BL-LwQUQ-DM_SSY8F.js} +4 -4
  42. package/dist/assets/{sankeyDiagram-TZEHDZUN-BttZx2-h-Cr53tHP7.js → sankeyDiagram-TZEHDZUN-D3rAZVzY-BAAQukCD.js} +1 -1
  43. package/dist/assets/{sequenceDiagram-WL72ISMW-DA6yVs26-B4W8xwkp.js → sequenceDiagram-WL72ISMW-BfBBVBjh-C993xDQ0.js} +1 -1
  44. package/dist/assets/{stateDiagram-FKZM4ZOC-BD8xEcbc-BWOiPxZu.js → stateDiagram-FKZM4ZOC-CioTL1ci-eXs9ZVMI.js} +1 -1
  45. package/dist/assets/stateDiagram-v2-4FDKWEC3-CNXUSYFj-C88PWSf5.js +1 -0
  46. package/dist/assets/{timeline-definition-IT6M3QCI-XN-D5T3b-l0nKzR1k.js → timeline-definition-IT6M3QCI-DJ1oTa68-Cp1nvAUx.js} +4 -4
  47. package/dist/assets/{treemap-KMMF4GRG-C4GHjB3F-_nPgBK22.js → treemap-KMMF4GRG-BLuW6hva-CvNDnceM.js} +1 -1
  48. package/dist/assets/{xychartDiagram-PRI3JC2R-BL53__6J-XcAq-Lxf.js → xychartDiagram-PRI3JC2R-BahWB4u4-B6_eZy6F.js} +5 -5
  49. package/dist/index.html +2 -2
  50. package/package.json +2 -2
  51. package/dist/assets/_basePickBy-1MakYQmz-ydNwd1l_.js +0 -1
  52. package/dist/assets/_baseUniq-Cd4llU-Q-Cdw60MU4.js +0 -1
  53. package/dist/assets/arc-b8oyw-lz-1LLYREoj.js +0 -1
  54. package/dist/assets/channel-BLPbvVT2-CnJJPuZ5.js +0 -1
  55. package/dist/assets/chunk-55IACEB6-C4OH5_NF-DrgL4Tv-.js +0 -1
  56. package/dist/assets/chunk-TZMSLE5B-DGddLgNl-CifiGjd6.js +0 -1
  57. package/dist/assets/classDiagram-2ON5EDUG-BngjTxOv-2Y-76rXt.js +0 -1
  58. package/dist/assets/classDiagram-v2-WZHVMYZB-BngjTxOv-2Y-76rXt.js +0 -1
  59. package/dist/assets/clone-DH1Kq5Y6-DxQT_fR1.js +0 -1
  60. package/dist/assets/diagram-QEK2KX5R-Km_liL9n-DiDvLC9k.js +0 -43
  61. package/dist/assets/ganttDiagram-LVOFAZNH-BidPm1xz-D_x48jVE.js +0 -267
  62. package/dist/assets/gitGraphDiagram-NY62KEGX-zbMOFVrv-DTVFadEr.js +0 -65
  63. package/dist/assets/index-42QQgFVq.css +0 -1
  64. package/dist/assets/stateDiagram-v2-4FDKWEC3-DINzAoyF-DshiRv7Q.js +0 -1
@@ -0,0 +1 @@
1
+ .orbit-gradient-logo{filter:brightness(0) saturate(100%);filter:drop-shadow(0 0 8px rgba(59,130,246,.5));background:linear-gradient(135deg,#3b82f6,#8b5cf6);-webkit-background-clip:text;background-clip:text;mix-blend-mode:screen}.message-list{--thread-panel-bg: #f6f7fb;--thread-panel-border: rgba(15, 23, 42, .08);--thread-panel-shadow: 0 30px 60px -38px rgba(15, 23, 42, .45);--thread-panel-heading: #1f2937;--thread-panel-button-border: rgba(15, 23, 42, .18);--thread-panel-button-text: #1f2937;--thread-panel-button-hover: rgba(15, 23, 42, .08);--thread-avatar-assistant-bg: #e7e9fb;--thread-avatar-assistant-text: #252c53;--thread-avatar-user-bg: #e6f4ef;--thread-avatar-user-text: #0f5f47}.dark .message-list{--thread-panel-bg: #1a1c24;--thread-panel-border: rgba(255, 255, 255, .12);--thread-panel-shadow: 0 35px 60px -40px rgba(0, 0, 0, .9);--thread-panel-heading: #eef1ff;--thread-panel-button-border: rgba(255, 255, 255, .2);--thread-panel-button-text: #eef1ff;--thread-panel-button-hover: rgba(255, 255, 255, .08);--thread-avatar-assistant-bg: rgba(83, 99, 164, .45);--thread-avatar-assistant-text: #e5e8ff;--thread-avatar-user-bg: rgba(16, 163, 127, .35);--thread-avatar-user-text: #d7fff3}.message-list :where(.ml-12.mt-4.rounded-xl.border){background-color:var(--thread-panel-bg)!important;border-color:var(--thread-panel-border)!important;box-shadow:var(--thread-panel-shadow)!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.message-list :where(.ml-12.mt-4.rounded-xl.border) .text-blue-900,.message-list :where(.ml-12.mt-4.rounded-xl.border) .dark\:text-\[\#c5d7ff\]{color:var(--thread-panel-heading)!important}.message-list :where(.ml-12.mt-4.rounded-xl.border) .border-blue-200\/80,.message-list :where(.ml-12.mt-4.rounded-xl.border) .dark\:border-\[\#233449\]{border-color:var(--thread-panel-button-border)!important}.message-list :where(.ml-12.mt-4.rounded-xl.border) button.inline-flex.items-center.gap-2.rounded-full.border{color:var(--thread-panel-button-text)!important;background-color:transparent;transition:background-color .2s ease,border-color .2s ease}.message-list :where(.ml-12.mt-4.rounded-xl.border) button.inline-flex.items-center.gap-2.rounded-full.border:hover{background-color:var(--thread-panel-button-hover)!important}.message-list :where(.flex.h-7.w-7.flex-shrink-0.items-center.justify-center.rounded-full.bg-blue-100){background-color:var(--thread-avatar-assistant-bg)!important;color:var(--thread-avatar-assistant-text)!important}.message-list :where(.flex.h-7.w-7.flex-shrink-0.items-center.justify-center.rounded-full.bg-emerald-100){background-color:var(--thread-avatar-user-bg)!important;color:var(--thread-avatar-user-text)!important}.message-list .message-bubble{width:100%;max-width:960px}@media (min-width: 1280px){.message-list .message-bubble{max-width:900px}}.message-list .message-markdown{width:100%;max-width:100%;min-width:0;margin-left:auto;margin-right:auto}@media (min-width: 768px){.message-list .message-markdown{max-width:840px}}@media (min-width: 1280px){.message-list .message-markdown{max-width:880px}}.thread-markdown-wrapper{width:100%;min-width:0;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.3) transparent}.thread-markdown-wrapper::-webkit-scrollbar{height:6px}.thread-markdown-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.thread-markdown-wrapper::-webkit-scrollbar-thumb{background-color:#0000004d;border-radius:3px}.dark .thread-markdown-wrapper::-webkit-scrollbar-thumb{background-color:#ffffff4d}.thread-markdown-wrapper table{display:block;overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch}.thread-markdown-wrapper .prose{max-width:100%}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol}html{font-size:1rem;line-height:1.5rem}body{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(53 55 64 / var(--tw-text-opacity, 1))}body:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(33 33 33 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(236 236 241 / var(--tw-text-opacity, 1))}body{line-height:1.75}textarea{border:none!important;outline:none!important;box-shadow:none!important;-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important}textarea:focus{border:none!important;outline:none!important;box-shadow:none!important;ring:none!important}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.prose{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.prose:is(.dark *){--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.prose p{font-weight:400;line-height:1.75rem;--tw-text-opacity: 1;color:rgb(53 55 64 / var(--tw-text-opacity, 1))}.prose p:is(.dark *){--tw-text-opacity: 1;color:rgb(236 236 241 / var(--tw-text-opacity, 1))}.prose p{font-size:15px;margin-top:.75rem;margin-bottom:.75rem}.prose p:first-child{margin-top:0}.prose p:last-child{margin-bottom:0}.prose h1,.prose h2,.prose h3,.prose h4,.prose h5,.prose h6{font-weight:600;--tw-text-opacity: 1;color:rgb(53 55 64 / var(--tw-text-opacity, 1))}.prose h1:is(.dark *),.prose h2:is(.dark *),.prose h3:is(.dark *),.prose h4:is(.dark *),.prose h5:is(.dark *),.prose h6:is(.dark *){--tw-text-opacity: 1;color:rgb(236 236 241 / var(--tw-text-opacity, 1))}.prose h1,.prose h2,.prose h3,.prose h4,.prose h5,.prose h6{margin-top:1.5rem;margin-bottom:.75rem}.prose h1{font-size:1.5rem;line-height:2rem}.prose h2{font-size:1.25rem;line-height:1.75rem}.prose h3{font-size:1.125rem;line-height:1.75rem}.prose ul,.prose ol{margin-top:1rem;margin-bottom:1rem;margin-left:1.5rem}.prose li{margin-top:.5rem;margin-bottom:.5rem;line-height:1.75rem;font-size:15px}.prose strong{font-weight:600}.prose em{font-style:italic}.prose a{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1));text-decoration-line:underline}.prose a:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.prose pre{border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(53 55 64 / var(--tw-text-opacity, 1))}.prose pre:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(32 33 35 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(236 236 241 / var(--tw-text-opacity, 1))}.prose code{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));padding:.125rem .375rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(53 55 64 / var(--tw-text-opacity, 1))}.prose code:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(32 33 35 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(236 236 241 / var(--tw-text-opacity, 1))}.prose blockquote{margin-top:1rem;margin-bottom:1rem;border-top-right-radius:.5rem;border-bottom-right-radius:.5rem;border-left-width:4px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1));padding-top:1rem;padding-bottom:1rem;padding-left:1.5rem;--tw-text-opacity: 1;color:rgb(53 55 64 / var(--tw-text-opacity, 1))}.prose blockquote:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(32 33 35 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(236 236 241 / var(--tw-text-opacity, 1))}.prose table{margin-top:1rem;margin-bottom:1rem;width:100%;border-collapse:collapse;font-size:.875rem;line-height:1.25rem;display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}.prose thead{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.prose thead:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(42 43 50 / var(--tw-bg-opacity, 1))}.prose th{border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding:.5rem 1rem;text-align:left;font-weight:600;--tw-text-opacity: 1;color:rgb(53 55 64 / var(--tw-text-opacity, 1))}.prose th:is(.dark *){--tw-border-opacity: 1;border-color:rgb(60 63 74 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(236 236 241 / var(--tw-text-opacity, 1))}.prose th{white-space:nowrap}.prose td{border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding:.5rem 1rem;--tw-text-opacity: 1;color:rgb(53 55 64 / var(--tw-text-opacity, 1))}.prose td:is(.dark *){--tw-border-opacity: 1;border-color:rgb(60 63 74 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(236 236 241 / var(--tw-text-opacity, 1))}.prose tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.prose tbody tr:nth-child(2n):is(.dark *){--tw-bg-opacity: 1;background-color:rgb(32 33 35 / var(--tw-bg-opacity, 1))}.prose tbody tr:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.prose tbody tr:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(42 43 50 / var(--tw-bg-opacity, 1))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.-right-3{right:-.75rem}.left-3{left:.75rem}.right-2{right:.5rem}.top-1\/2{top:50%}.top-3{top:.75rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.-mt-2{margin-top:-.5rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-12{margin-left:3rem}.ml-4{margin-left:1rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-full{height:100%}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.max-h-\[90vh\]{max-height:90vh}.min-h-0{min-height:0px}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[min\(18rem\,85vw\)\]{width:min(18rem,85vw)}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[150px\]{min-width:150px}.min-w-\[72px\]{min-width:72px}.max-w-3xl{max-width:48rem}.max-w-5xl{max-width:64rem}.max-w-\[150px\]{max-width:150px}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-2xl{border-bottom-right-radius:1rem;border-bottom-left-radius:1rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\[\#343541\]{--tw-border-opacity: 1;border-color:rgb(52 53 65 / var(--tw-border-opacity, 1))}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-blue-100{--tw-border-opacity: 1;border-color:rgb(219 234 254 / var(--tw-border-opacity, 1))}.border-blue-100\/80{border-color:#dbeafecc}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-200\/80{border-color:#bfdbfecc}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-emerald-100{--tw-border-opacity: 1;border-color:rgb(209 250 229 / var(--tw-border-opacity, 1))}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-gray-400{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-200\/70{border-color:#e2e8f0b3}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-white\/70{border-color:#ffffffb3}.border-white\/80{border-color:#fffc}.border-t-transparent{border-top-color:transparent}.bg-\[\#10a37f\]{--tw-bg-opacity: 1;background-color:rgb(16 163 127 / var(--tw-bg-opacity, 1))}.bg-\[\#343541\]{--tw-bg-opacity: 1;background-color:rgb(52 53 65 / var(--tw-bg-opacity, 1))}.bg-\[\#eceefc\]{--tw-bg-opacity: 1;background-color:rgb(236 238 252 / var(--tw-bg-opacity, 1))}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-600{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-50\/70{background-color:#eff6ffb3}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-100\/70{background-color:#f3f4f6b3}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/60{background-color:#fff9}.bg-white\/80{background-color:#fffc}.bg-white\/90{background-color:#ffffffe6}.bg-white\/95{background-color:#fffffff2}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-blue-100{--tw-gradient-from: #dbeafe var(--tw-gradient-from-position);--tw-gradient-to: rgb(219 234 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-emerald-100{--tw-gradient-from: #d1fae5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(209 250 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-blue-200{--tw-gradient-to: #bfdbfe var(--tw-gradient-to-position)}.to-emerald-200{--tw-gradient-to: #a7f3d0 var(--tw-gradient-to-position)}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-9{padding-left:2.25rem}.pr-1{padding-right:.25rem}.pr-10{padding-right:2.5rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-6{line-height:1.5rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-wide{letter-spacing:.025em}.text-\[\#0f172a\]{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-\[\#1c3226\]{--tw-text-opacity: 1;color:rgb(28 50 38 / var(--tw-text-opacity, 1))}.text-\[\#1d2559\]{--tw-text-opacity: 1;color:rgb(29 37 89 / var(--tw-text-opacity, 1))}.text-\[\#1f2937\]{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-\[\#353740\]{--tw-text-opacity: 1;color:rgb(53 55 64 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-blue-900\/70{color:#1e3a8ab3}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-emerald-900{--tw-text-opacity: 1;color:rgb(6 78 59 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-600::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(75 85 99 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-600::placeholder{--tw-placeholder-opacity: 1;color:rgb(75 85 99 / var(--tw-placeholder-opacity, 1))}.accent-gray-600{accent-color:#4b5563}.opacity-0{opacity:0}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_12px_30px_-18px_rgba\(15\,52\,33\,0\.25\)\]{--tw-shadow: 0 12px 30px -18px rgba(15,52,33,.25);--tw-shadow-colored: 0 12px 30px -18px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_15px_35px_-20px_rgba\(15\,23\,42\,0\.25\)\]{--tw-shadow: 0 15px 35px -20px rgba(15,23,42,.25);--tw-shadow-colored: 0 15px 35px -20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black\/5{--tw-ring-color: rgb(0 0 0 / .05)}.ring-blue-100\/60{--tw-ring-color: rgb(219 234 254 / .6)}.ring-white\/50{--tw-ring-color: rgb(255 255 255 / .5)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.katex{font-size:1em!important}.katex-display{margin:1em 0!important;text-align:center}.markdown-content .katex{overflow-x:auto;overflow-y:hidden}.markdown-content .katex-display{overflow-x:auto;overflow-y:hidden;padding:.5em 0}@media (prefers-color-scheme: dark){.katex{color:inherit!important}}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}:is(.dark *)::-webkit-scrollbar-track{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity, 1))}:is(.dark *)::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity, 1))}::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(148 163 184 / var(--tw-bg-opacity, 1))}:is(.dark *)::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.high-contrast{--tw-text-opacity: 1;--tw-bg-opacity: 1}.high-contrast .text-slate-500{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.high-contrast .text-slate-500:is(.dark *){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.high-contrast .text-slate-400{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.high-contrast .text-slate-400:is(.dark *){--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.high-contrast .bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.high-contrast .bg-slate-50:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideIn{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes shimmer{0%{background-position:-200px 0}to{background-position:200px 0}}.animate-fadeIn{animation:fadeIn .3s ease-out}.animate-slideIn{animation:slideIn .3s ease-out}.animate-shimmer{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent);background-size:200px 100%}.message-input-container:focus-within{outline:2px solid transparent;outline-offset:2px}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(156 163 175 / .7);--tw-ring-offset-width: 0px}button:focus-visible:is(.dark *),input:focus-visible:is(.dark *),textarea:focus-visible:is(.dark *){--tw-ring-color: rgb(107 114 128 / .7)}@media (max-width: 768px){.prose,body{font-size:.875rem;line-height:1.25rem}}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-emerald-400:hover{--tw-border-opacity: 1;border-color:rgb(52 211 153 / var(--tw-border-opacity, 1))}.hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.hover\:border-gray-400:hover{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.hover\:border-red-400:hover{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}.hover\:bg-\[\#0f8f6f\]:hover{--tw-bg-opacity: 1;background-color:rgb(15 143 111 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#282b32\]:hover{--tw-bg-opacity: 1;background-color:rgb(40 43 50 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#2c2f36\]:hover{--tw-bg-opacity: 1;background-color:rgb(44 47 54 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-700:hover{--tw-bg-opacity: 1;background-color:rgb(180 83 9 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-50\/30:hover{background-color:#ecfdf54d}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.hover\:bg-green-600:hover{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/70:hover{background-color:#ffffffb3}.hover\:bg-white\/80:hover{background-color:#fffc}.hover\:text-\[\#353740\]:hover{--tw-text-opacity: 1;color:rgb(53 55 64 / var(--tw-text-opacity, 1))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-gray-400:focus{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-amber-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(245 158 11 / var(--tw-ring-opacity, 1))}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.focus\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity, 1))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\:ring-offset-white:focus{--tw-ring-offset-color: #fff}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\:transform-none:disabled{transform:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:hover\:border-gray-300:hover:disabled{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.disabled\:hover\:bg-transparent:hover:disabled{background-color:transparent}.group:hover .group-hover\:opacity-100{opacity:1}.dark\:border-\[\#1a2b21\]:is(.dark *){--tw-border-opacity: 1;border-color:rgb(26 43 33 / var(--tw-border-opacity, 1))}.dark\:border-\[\#1f2a36\]:is(.dark *){--tw-border-opacity: 1;border-color:rgb(31 42 54 / var(--tw-border-opacity, 1))}.dark\:border-\[\#233449\]:is(.dark *){--tw-border-opacity: 1;border-color:rgb(35 52 73 / var(--tw-border-opacity, 1))}.dark\:border-\[\#40414f\]:is(.dark *){--tw-border-opacity: 1;border-color:rgb(64 65 79 / var(--tw-border-opacity, 1))}.dark\:border-\[\#444654\]:is(.dark *){--tw-border-opacity: 1;border-color:rgb(68 70 84 / var(--tw-border-opacity, 1))}.dark\:border-\[\#4a4b54\]:is(.dark *){--tw-border-opacity: 1;border-color:rgb(74 75 84 / var(--tw-border-opacity, 1))}.dark\:border-\[\#565869\]:is(.dark *){--tw-border-opacity: 1;border-color:rgb(86 88 105 / var(--tw-border-opacity, 1))}.dark\:border-\[\#6b6f7a\]:is(.dark *){--tw-border-opacity: 1;border-color:rgb(107 111 122 / var(--tw-border-opacity, 1))}.dark\:border-amber-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(146 64 14 / var(--tw-border-opacity, 1))}.dark\:border-blue-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))}.dark\:border-emerald-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(52 211 153 / var(--tw-border-opacity, 1))}.dark\:border-gray-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.dark\:border-green-600\/40:is(.dark *){border-color:#16a34a66}.dark\:border-red-600\/40:is(.dark *){border-color:#dc262666}.dark\:border-red-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(185 28 28 / var(--tw-border-opacity, 1))}.dark\:border-red-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity, 1))}.dark\:border-slate-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity, 1))}.dark\:border-slate-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.dark\:border-slate-700\/60:is(.dark *){border-color:#33415599}.dark\:border-white\/10:is(.dark *){border-color:#ffffff1a}.dark\:border-white\/5:is(.dark *){border-color:#ffffff0d}.dark\:bg-\[\#0f1821\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(15 24 33 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#1f1f24\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 31 36 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#1f2027\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 32 39 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#1f2a36\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 42 54 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#202123\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(32 33 35 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#212121\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(33 33 33 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#252830\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(37 40 48 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#2c2f36\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(44 47 54 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#2d2f39\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(45 47 57 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#2f313a\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(47 49 58 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#343541\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(52 53 65 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#3a3d46\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(58 61 70 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#3b4055\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(59 64 85 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#3c3f4a\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(60 63 74 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#4a4b54\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(74 75 84 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#565869\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(86 88 105 / var(--tw-bg-opacity, 1))}.dark\:bg-\[\#bfc2cd\]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(191 194 205 / var(--tw-bg-opacity, 1))}.dark\:bg-amber-900\/20:is(.dark *){background-color:#78350f33}.dark\:bg-amber-900\/30:is(.dark *){background-color:#78350f4d}.dark\:bg-blue-900\/20:is(.dark *){background-color:#1e3a8a33}.dark\:bg-blue-900\/30:is(.dark *){background-color:#1e3a8a4d}.dark\:bg-blue-900\/40:is(.dark *){background-color:#1e3a8a66}.dark\:bg-emerald-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity, 1))}.dark\:bg-emerald-900\/20:is(.dark *){background-color:#064e3b33}.dark\:bg-gray-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-green-900\/30:is(.dark *){background-color:#14532d4d}.dark\:bg-red-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.dark\:bg-red-900\/20:is(.dark *){background-color:#7f1d1d33}.dark\:bg-red-900\/30:is(.dark *){background-color:#7f1d1d4d}.dark\:bg-red-900\/40:is(.dark *){background-color:#7f1d1d66}.dark\:bg-slate-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-800\/50:is(.dark *){background-color:#1e293b80}.dark\:bg-slate-900\/40:is(.dark *){background-color:#0f172a66}.dark\:bg-slate-900\/50:is(.dark *){background-color:#0f172a80}.dark\:bg-transparent:is(.dark *){background-color:transparent}.dark\:bg-white:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.dark\:bg-white\/10:is(.dark *){background-color:#ffffff1a}.dark\:bg-white\/5:is(.dark *){background-color:#ffffff0d}.dark\:from-\[\#0f1f17\]:is(.dark *){--tw-gradient-from: #0f1f17 var(--tw-gradient-from-position);--tw-gradient-to: rgb(15 31 23 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-\[\#1f2a36\]:is(.dark *){--tw-gradient-from: #1f2a36 var(--tw-gradient-from-position);--tw-gradient-to: rgb(31 42 54 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-\[\#0b1712\]:is(.dark *){--tw-gradient-to: #0b1712 var(--tw-gradient-to-position)}.dark\:to-\[\#1a2230\]:is(.dark *){--tw-gradient-to: #1a2230 var(--tw-gradient-to-position)}.dark\:text-\[\#4a4b54\]:is(.dark *){--tw-text-opacity: 1;color:rgb(74 75 84 / var(--tw-text-opacity, 1))}.dark\:text-\[\#6b6f7a\]:is(.dark *){--tw-text-opacity: 1;color:rgb(107 111 122 / var(--tw-text-opacity, 1))}.dark\:text-\[\#9ef0d5\]:is(.dark *){--tw-text-opacity: 1;color:rgb(158 240 213 / var(--tw-text-opacity, 1))}.dark\:text-\[\#a6acc5\]:is(.dark *){--tw-text-opacity: 1;color:rgb(166 172 197 / var(--tw-text-opacity, 1))}.dark\:text-\[\#bfc2cd\]:is(.dark *){--tw-text-opacity: 1;color:rgb(191 194 205 / var(--tw-text-opacity, 1))}.dark\:text-\[\#c5d7ff\]:is(.dark *){--tw-text-opacity: 1;color:rgb(197 215 255 / var(--tw-text-opacity, 1))}.dark\:text-\[\#c7f5df\]:is(.dark *){--tw-text-opacity: 1;color:rgb(199 245 223 / var(--tw-text-opacity, 1))}.dark\:text-\[\#d1d5db\]:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\:text-\[\#d4d7e2\]:is(.dark *){--tw-text-opacity: 1;color:rgb(212 215 226 / var(--tw-text-opacity, 1))}.dark\:text-\[\#dffbea\]:is(.dark *){--tw-text-opacity: 1;color:rgb(223 251 234 / var(--tw-text-opacity, 1))}.dark\:text-\[\#e5e7f4\]:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 244 / var(--tw-text-opacity, 1))}.dark\:text-\[\#e5edff\]:is(.dark *){--tw-text-opacity: 1;color:rgb(229 237 255 / var(--tw-text-opacity, 1))}.dark\:text-\[\#ececf1\]:is(.dark *){--tw-text-opacity: 1;color:rgb(236 236 241 / var(--tw-text-opacity, 1))}.dark\:text-amber-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.dark\:text-amber-400:is(.dark *){--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.dark\:text-black:is(.dark *){--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.dark\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.dark\:text-blue-300:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-emerald-400:is(.dark *){--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.dark\:text-gray-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-green-200:is(.dark *){--tw-text-opacity: 1;color:rgb(187 247 208 / var(--tw-text-opacity, 1))}.dark\:text-red-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-slate-100:is(.dark *){--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.dark\:text-slate-300:is(.dark *){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.dark\:text-slate-500:is(.dark *){--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.dark\:text-slate-600:is(.dark *){--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.dark\:placeholder-\[\#bfc2cd\]:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(191 194 205 / var(--tw-placeholder-opacity, 1))}.dark\:placeholder-\[\#bfc2cd\]:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(191 194 205 / var(--tw-placeholder-opacity, 1))}.dark\:accent-\[\#bfc2cd\]:is(.dark *){accent-color:#bfc2cd}.dark\:shadow-lg:is(.dark *){--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:ring-\[\#1f2a36\]:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 42 54 / var(--tw-ring-opacity, 1))}.dark\:ring-white\/10:is(.dark *){--tw-ring-color: rgb(255 255 255 / .1)}.dark\:hover\:border-\[\#4a4b54\]:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(74 75 84 / var(--tw-border-opacity, 1))}.dark\:hover\:border-\[\#6b6f7a\]:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(107 111 122 / var(--tw-border-opacity, 1))}.dark\:hover\:border-gray-500:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.dark\:hover\:border-red-500\/60:hover:is(.dark *){border-color:#ef444499}.dark\:hover\:bg-\[\#2a2d35\]:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(42 45 53 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-\[\#2f323c\]:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(47 50 60 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-\[\#343541\]:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(52 53 65 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-\[\#3c3f4a\]:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(60 63 74 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-\[\#4a4b54\]:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(74 75 84 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-\[\#565869\]:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(86 88 105 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-\[\#6b6f7a\]:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(107 111 122 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-emerald-900\/10:hover:is(.dark *){background-color:#064e3b1a}.dark\:hover\:bg-gray-200:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-gray-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-red-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-red-800\/40:hover:is(.dark *){background-color:#991b1b66}.dark\:hover\:bg-red-900\/20:hover:is(.dark *){background-color:#7f1d1d33}.dark\:hover\:bg-red-900\/30:hover:is(.dark *){background-color:#7f1d1d4d}.dark\:hover\:bg-slate-800\/60:hover:is(.dark *){background-color:#1e293b99}.dark\:hover\:bg-white\/10:hover:is(.dark *){background-color:#ffffff1a}.dark\:hover\:text-blue-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.dark\:focus\:border-\[\#6b6f7a\]:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(107 111 122 / var(--tw-border-opacity, 1))}.dark\:focus\:border-\[\#8e8ea0\]:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(142 142 160 / var(--tw-border-opacity, 1))}.dark\:focus\:ring-\[\#8e8ea0\]:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(142 142 160 / var(--tw-ring-opacity, 1))}.dark\:focus\:ring-offset-gray-800:focus:is(.dark *){--tw-ring-offset-color: #1f2937}.dark\:disabled\:hover\:border-\[\#4a4b54\]:hover:disabled:is(.dark *){--tw-border-opacity: 1;border-color:rgb(74 75 84 / var(--tw-border-opacity, 1))}.dark\:disabled\:hover\:bg-transparent:hover:disabled:is(.dark *){background-color:transparent}@media (min-width: 640px){.sm\:-mt-3{margin-top:-.75rem}.sm\:ml-2{margin-left:.5rem}.sm\:w-\[220px\]{width:220px}.sm\:w-auto{width:auto}.sm\:flex-row{flex-direction:row}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-start{align-items:flex-start}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:p-4{padding:1rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-right{text-align:right}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}.sm\:opacity-0{opacity:0}.group:hover .sm\:group-hover\:opacity-100{opacity:1}}@media (min-width: 768px){.md\:flex{display:flex}.md\:inline-flex{display:inline-flex}.md\:hidden{display:none}.md\:min-h-screen{min-height:100vh}.md\:w-72{width:18rem}.md\:flex-row{flex-direction:row}}
@@ -1,4 +1,4 @@
1
- import{D as os}from"./index-p0knuDQ9.js";function cs(T,g){for(var p=0;p<g.length;p++){const o=g[p];if(typeof o!="string"&&!Array.isArray(o)){for(const r in o)if(r!=="default"&&!(r in T)){const n=Object.getOwnPropertyDescriptor(o,r);n&&Object.defineProperty(T,r,n.get?n:{enumerable:!0,get:()=>o[r]})}}}return Object.freeze(Object.defineProperty(T,Symbol.toStringTag,{value:"Module"}))}var Xe,Yr;function ls(){if(Yr)return Xe;Yr=1;var T="6.5.2";return Xe=T,Xe}var Ke,Rr;function Br(){if(Rr)return Ke;Rr=1;var T=function(p,o){var r=this;if(o||(o={}),r.qpm=o.qpm?parseInt(o.qpm,10):null,!r.qpm){var n=p.metaText?p.metaText.tempo:null;r.qpm=p.getBpm(n)}r.extraMeasuresAtBeginning=o.extraMeasuresAtBeginning?parseInt(o.extraMeasuresAtBeginning,10):0,r.beatCallback=o.beatCallback,r.eventCallback=o.eventCallback,r.lineEndCallback=o.lineEndCallback,r.lineEndAnticipation=o.lineEndAnticipation?parseInt(o.lineEndAnticipation,10):0,r.beatSubdivisions=o.beatSubdivisions?parseInt(o.beatSubdivisions,10):1,r.joggerTimer=null,r.replaceTarget=function(s){r.noteTimings=s.setTiming(r.qpm,r.extraMeasuresAtBeginning),s.noteTimings.length===0&&(r.noteTimings=s.setTiming(0,0)),r.lineEndCallback&&(r.lineEndTimings=g(s.noteTimings,r.lineEndAnticipation)),r.startTime=null,r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.currentTime=0,r.isPaused=!1,r.isRunning=!1,r.pausedPercent=null,r.justUnpaused=!1,r.newSeekPercent=0,r.lastTimestamp=0,r.noteTimings.length!==0&&(r.millisecondsPerBeat=1e3/(r.qpm/60)/r.beatSubdivisions,r.lastMoment=r.noteTimings[r.noteTimings.length-1].milliseconds,r.totalBeats=Math.round(r.lastMoment/r.millisecondsPerBeat))},r.replaceTarget(p),r.doTiming=function(s){if(r.lastTimestamp!==s&&(r.lastTimestamp=s,r.startTime||(r.startTime=s),!r.isPaused&&r.isRunning)){for(r.currentTime=s-r.startTime,r.currentTime+=16;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].milliseconds<r.currentTime;){if(r.eventCallback&&r.noteTimings[r.currentEvent].type==="event"){var l=r.startTime;r.eventCallback(r.noteTimings[r.currentEvent]),l!==r.startTime&&(r.currentTime=s-r.startTime)}r.currentEvent++}if(r.lineEndCallback&&r.lineEndTimings.length>r.currentLine&&r.lineEndTimings[r.currentLine].milliseconds<r.currentTime&&r.currentEvent<r.noteTimings.length){var d=r.noteTimings[r.currentEvent].milliseconds===r.currentTime?r.noteTimings[r.currentEvent]:r.noteTimings[r.currentEvent-1];r.lineEndCallback(r.lineEndTimings[r.currentLine],d,{line:r.currentLine,endTimings:r.lineEndTimings,currentTime:r.currentTime}),r.currentLine++}if(r.currentTime<r.lastMoment){if(requestAnimationFrame(r.doTiming),r.currentBeat*r.millisecondsPerBeat<r.currentTime){var f=r.doBeatCallback(s);f!==null&&(r.currentTime=f)}}else if(r.currentBeat<=r.totalBeats&&r.beatCallback){var u=r.doBeatCallback(s);u!==null&&(r.currentTime=u),requestAnimationFrame(r.doTiming)}if(r.currentTime>=r.lastMoment)if(r.eventCallback){var i=r.eventCallback(null);r.shouldStop(i).then(function(t){t&&r.stop()})}else r.stop()}},r.shouldStop=function(s){return new Promise(function(l){if(!s)return l(!0);if(s==="continue")return l(!1);s.then&&s.then(function(d){l(d!=="continue")})})},r.doBeatCallback=function(s){if(r.beatCallback){for(var l=r.currentEvent;l<r.noteTimings.length&&r.noteTimings[l].left===null;)l++;var d,f;if(l<r.noteTimings.length){for(d=r.noteTimings[l].milliseconds,l=Math.max(0,r.currentEvent-1);l>=0&&r.noteTimings[l].left===null;)l--;f=r.noteTimings[l]}var u={},i={};if(f){u.top=f.top,u.height=f.height;var t=Math.max(0,s-r.startTime-f.milliseconds),a=d-f.milliseconds,e=f.endX-f.left,h=a?t*e/a:0;u.left=f.left+h,r.currentEvent===0&&f.milliseconds>s-r.startTime&&(u.left=void 0),i={timestamp:s,startTime:r.startTime,ev:f,endMs:d,offMs:t,offPx:h,gapMs:a,gapPx:e}}else i={timestamp:s,startTime:r.startTime};var v=r.startTime;if(r.beatCallback(r.currentBeat/r.beatSubdivisions,r.totalBeats/r.beatSubdivisions,r.lastMoment,u,i),v!==r.startTime)return s-r.startTime;r.currentBeat++}return null};var c=60;r.animationJogger=function(){r.isRunning&&(r.doTiming(performance.now()),r.joggerTimer=setTimeout(r.animationJogger,c))},r.start=function(s,l){if(r.isRunning=!0,r.isPaused&&(r.isPaused=!1,s===void 0&&(r.justUnpaused=!0)),s)r.setProgress(s,l);else if(s===0)r.reset();else if(r.pausedPercent!==null){var d=performance.now();r.currentTime=r.lastMoment*r.pausedPercent,r.startTime=d-r.currentTime,r.pausedPercent=null,r.reportNext=!0}requestAnimationFrame(r.doTiming),r.joggerTimer=setTimeout(r.animationJogger,c)},r.pause=function(){r.isPaused=!0;var s=performance.now();r.pausedPercent=(s-r.startTime)/r.lastMoment,r.isRunning=!1,r.joggerTimer&&(clearTimeout(r.joggerTimer),r.joggerTimer=null)},r.currentMillisecond=function(){return r.currentTime},r.reset=function(){r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.startTime=null,r.pausedPercent=null},r.stop=function(){r.pause(),r.reset()},r.setProgress=function(s,l){var d;switch(l){case"seconds":r.currentTime=s*1e3,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),d=r.currentTime/r.lastMoment;break;case"beats":r.currentTime=s*r.millisecondsPerBeat*r.beatSubdivisions,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),d=r.currentTime/r.lastMoment;break;default:d=s,d<0&&(d=0),d>1&&(d=1),r.currentTime=r.lastMoment*d;break}r.isRunning||(r.pausedPercent=d);var f=performance.now();for(r.startTime=f-r.currentTime,r.currentEvent,r.currentEvent=0;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].milliseconds<r.currentTime;)r.currentEvent++;if(r.lineEndCallback)for(r.currentLine=0;r.lineEndTimings.length>r.currentLine&&r.lineEndTimings[r.currentLine].milliseconds+r.lineEndAnticipation<r.currentTime;)r.currentLine++;var u=r.currentBeat;r.currentBeat=Math.floor(r.currentTime/r.millisecondsPerBeat),r.beatCallback&&u!==r.currentBeat&&r.doBeatCallback(r.startTime+r.currentTime),r.eventCallback&&r.currentEvent>=0&&r.noteTimings[r.currentEvent].type==="event"&&r.eventCallback(r.noteTimings[r.currentEvent]),r.lineEndCallback&&r.lineEndCallback(r.lineEndTimings[r.currentLine],r.noteTimings[r.currentEvent],{line:r.currentLine,endTimings:r.lineEndTimings}),r.joggerTimer=setTimeout(r.animationJogger,c)}};function g(p,o){for(var r=[],n=null,c=0;c<p.length;c++){var s=p[c];s.type!=="end"&&s.top!==n&&(r.push({measureNumber:s.measureNumber,milliseconds:s.milliseconds-o,top:s.top,bottom:s.top+s.height}),n=s.top)}return r}return Ke=T,Ke}var Ue,Wr;function hs(){if(Wr)return Ue;Wr=1;var T=Br(),g={};return function(){var p,o;g.startAnimation=function(r,n,c){p&&(p.stop(),p=void 0),c.showCursor&&(o=r.querySelector(".abcjs-cursor"),o||(o=document.createElement("DIV"),o.className="abcjs-cursor cursor",o.style.position="absolute",r.appendChild(o),r.style.position="relative"));function s(a){for(var e=0;e<a.length;e++){var h=a[e];h.classList.contains("abcjs-bar")||(h.style.display="none")}}var l;function d(a){if(l){var e=r.querySelectorAll(l);s(e)}l=a}function f(a){var e=r.querySelectorAll(a);s(e)}function u(a){c.hideCurrentMeasure?f(a):c.hideFinishedMeasures&&d(a)}function i(a){return".abcjs-l"+a.line+".abcjs-m"+a.measureNumber}function t(a){if(a){if(a.measureStart){var e=i(a);e&&u(e)}o&&(o.style.left=a.left+"px",o.style.top=a.top+"px",o.style.width=a.width+"px",o.style.height=a.height+"px")}else p.stop(),p=void 0}p=new T(n,{qpm:c.bpm,eventCallback:t}),p.start()},g.pauseAnimation=function(r){p&&(r?p.pause():p.start())},g.stopAnimation=function(){p&&(p.stop(),p=void 0)}}(),Ue=g,Ue}var $e,Gr;function Ne(){if(Gr)return $e;Gr=1;var T={};return T.cloneArray=function(g){for(var p=[],o=0;o<g.length;o++)p.push(Object.assign({},g[o]));return p},T.cloneHashOfHash=function(g){var p={};for(var o in g)g.hasOwnProperty(o)&&(p[o]=Object.assign({},g[o]));return p},T.cloneHashOfArrayOfHash=function(g){var p={};for(var o in g)g.hasOwnProperty(o)&&(p[o]=T.cloneArray(g[o]));return p},T.strip=function(g){return g.replace(/^\s+/,"").replace(/\s+$/,"")},T.startsWith=function(g,p){return g.indexOf(p)===0},T.endsWith=function(g,p){var o=g.length-p.length;return o>=0&&g.lastIndexOf(p)===o},T.last=function(g){return g.length===0?null:g[g.length-1]},$e=T,$e}var Qe,qr;function Pr(){if(qr)return Qe;qr=1;var T=Ne(),g={};return function(){var p,o,r,n,c;g.initialize=function(y,k,w,O,z){p=y,o=k,r=w,n=O,c=z,s()};function s(){r.annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},r.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},r.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},r.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},r.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},n.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},n.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},n.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},n.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},n.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},n.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},n.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},n.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},n.formatting.annotationfont=r.annotationfont,n.formatting.gchordfont=r.gchordfont,n.formatting.historyfont=r.historyfont,n.formatting.infofont=r.infofont,n.formatting.measurefont=r.measurefont,n.formatting.partsfont=r.partsfont,n.formatting.repeatfont=r.repeatfont,n.formatting.textfont=r.textfont,n.formatting.tripletfont=r.tripletfont,n.formatting.vocalfont=r.vocalfont,n.formatting.wordsfont=r.wordsfont}var l={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},d=function(y){switch(y){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}},f=function(y,k,w,O,z){function V(){var fe=parseInt(y[0].token);return y.shift(),k?y.length===0?{face:k.face,weight:k.weight,style:k.style,decoration:k.decoration,size:fe}:y.length===1&&y[0].token==="box"&&l[z]?{face:k.face,weight:k.weight,style:k.style,decoration:k.decoration,size:fe,box:!0}:(o("Extra parameters in font definition.",w,O),{face:k.face,weight:k.weight,style:k.style,decoration:k.decoration,size:fe}):(o("Can't set just the size of the font since there is no default value.",w,O),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:fe})}if(y[0].token==="*"){if(y.shift(),y[0].type==="number")return V();o("Expected font size number after *.",w,O)}if(y[0].type==="number")return V();for(var I=[],K,Q="normal",G="normal",ee="none",te=!1,ne="face",X=!1;y.length;){var ae=y.shift(),$=ae.token.toLowerCase();switch(ne){case"face":X||$!=="utf"&&ae.type!=="number"&&$!=="bold"&&$!=="italic"&&$!=="underline"&&$!=="box"?I.length>0&&ae.token==="-"?(X=!0,I[I.length-1]=I[I.length-1]+ae.token):X?(X=!1,I[I.length-1]=I[I.length-1]+ae.token):I.push(ae.token):ae.type==="number"?(K?o("Font size specified twice in font definition.",w,O):K=ae.token,ne="modifier"):$==="bold"?Q="bold":$==="italic"?G="italic":$==="underline"?ee="underline":$==="box"?(l[z]?te=!0:o(`This font style doesn't support "box"`,w,O),ne="finished"):$==="utf"?(ae=y.shift(),ne="size"):o("Unknown parameter "+ae.token+" in font definition.",w,O);break;case"size":ae.type==="number"?K?o("Font size specified twice in font definition.",w,O):K=ae.token:o("Expected font size in font definition.",w,O),ne="modifier";break;case"modifier":$==="bold"?Q="bold":$==="italic"?G="italic":$==="underline"?ee="underline":$==="box"?(l[z]?te=!0:o(`This font style doesn't support "box"`,w,O),ne="finished"):o("Unknown parameter "+ae.token+" in font definition.",w,O);break;case"finished":o('Extra characters found after "box" in font definition.',w,O);break}}K===void 0?k?K=k.size:(o("Must specify the size of the font since there is no default value.",w,O),K=12):K=parseFloat(K),I=I.join(" "),I===""&&(k?I=k.face:(o("Must specify the name of the font since there is no default value.",w,O),I="sans-serif"));var se=d(I),ce={};return se?(ce.face=se.face,ce.weight=se.weight,ce.style=se.style,ce.decoration=se.decoration,ce.size=K,te&&(ce.box=!0),ce):(ce.face=I,ce.weight=Q,ce.style=G,ce.decoration=ee,ce.size=K,te&&(ce.box=!0),ce)},u=function(y,k,w){return k.length===0?'Directive "'+y+'" requires a font as a parameter.':(r[y]=f(k,r[y],w,0,y),r.is_in_header&&(n.formatting[y]=r[y]),null)},i=function(y,k,w){return k.length===0?'Directive "'+y+'" requires a font as a parameter.':(n.formatting[y]=f(k,n.formatting[y],w,0,y),null)},t=function(y,k){var w="";k.forEach(function(z){w+=z.token});var O=parseFloat(w);if(isNaN(O)||O===0)return'Directive "'+y+'" requires a number as a parameter.';n.formatting.scale=O},a=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],e=function(y){var k=y.split(/\s+/);if(k.length!==2&&k.length!==3)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var w=k[0],O=parseInt(k[1],10);if((isNaN(O)||O<35||O>81)&&k[1]&&(O=a.indexOf(k[1].toLowerCase())+35),isNaN(O)||O<35||O>81)return{error:'Expected drum name, received "'+k[1]+'"'};var z={sound:O};return k.length===3&&(z.noteHead=k[2]),{key:w,value:z}},h=function(y,k){var w=p.getMeasurement(k);return w.used===0||k.length!==0?{error:'Directive "'+y+'" requires a measurement as a parameter.'}:w.value},v=function(y,k){var w=p.getMeasurement(k);return w.used===0||k.length!==0?'Directive "'+y+'" requires a measurement as a parameter.':(n.formatting[y]=w.value,null)},m=function(y,k,w,O,z){if(w.length!==1||w[0].type!=="number")return'Directive "'+k+'" requires a number as a parameter.';var V=w[0].intt;return O!==void 0&&V<O?'Directive "'+k+'" requires a number greater than or equal to '+O+" as a parameter.":z!==void 0&&V>z?'Directive "'+k+'" requires a number less than or equal to '+z+" as a parameter.":(r[y]=V,null)},x=function(y,k,w){if(w.length===1&&(w[0].token==="true"||w[0].token==="false"))return r[y]=w[0].token==="true",null;var O=m(y,k,w,0,1);return O!==null?O:(r[y]=r[y]===1,null)},C=function(y,k,w,O){if(w.length!==1)return'Directive "'+k+'" requires one of [ '+O.join(", ")+" ] as a parameter.";for(var z=w[0].token,V=!1,I=0;!V&&I<O.length;I++)O[I]===z&&(V=!0);return V?(r[y]=z,null):'Directive "'+k+'" requires one of [ '+O.join(", ")+" ] as a parameter."},S=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],j=["gchord","ptstress","beatstring"],F=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc","gchordbars"],b=["program"],M=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],B=["beat"],A=["drone"],P=["portamento"],N=["expand","grace","trim"],E=["drum","chordname"],_=["bassprog","chordprog"],L=function(y,k,w){var O=y.shift().token,z=[];if(S.indexOf(O)>=0)y.length!==0&&o("Unexpected parameter in MIDI "+O,w,0);else if(j.indexOf(O)>=0)y.length!==1?o("Expected one parameter in MIDI "+O,w,0):z.push(y[0].token);else if(F.indexOf(O)>=0)y.length!==1?o("Expected one parameter in MIDI "+O,w,0):y[0].type!=="number"?o("Expected one integer parameter in MIDI "+O,w,0):z.push(y[0].intt);else if(b.indexOf(O)>=0)y.length!==1&&y.length!==2?o("Expected one or two parameters in MIDI "+O,w,0):y[0].type!=="number"||y.length===2&&y[1].type!=="number"?o("Expected integer parameter in MIDI "+O,w,0):(z.push(y[0].intt),y.length===2&&z.push(y[1].intt));else if(M.indexOf(O)>=0)y.length!==2?o("Expected two parameters in MIDI "+O,w,0):y[0].type!=="number"||y[1].type!=="number"?o("Expected two integer parameters in MIDI "+O,w,0):(z.push(y[0].intt),z.push(y[1].intt));else if(P.indexOf(O)>=0)y.length!==2?o("Expected two parameters in MIDI "+O,w,0):y[0].type!=="alpha"||y[1].type!=="number"?o("Expected one string and one integer parameters in MIDI "+O,w,0):(z.push(y[0].token),z.push(y[1].intt));else if(O==="drummap")y.length===2&&y[0].type==="alpha"&&y[1].type==="number"?(k.formatting||(k.formatting={}),k.formatting.midi||(k.formatting.midi={}),k.formatting.midi.drummap||(k.formatting.midi.drummap={}),k.formatting.midi.drummap[y[0].token]=y[1].intt,z=k.formatting.midi.drummap):y.length===3&&y[0].type==="punct"&&y[1].type==="alpha"&&y[2].type==="number"?(k.formatting||(k.formatting={}),k.formatting.midi||(k.formatting.midi={}),k.formatting.midi.drummap||(k.formatting.midi.drummap={}),k.formatting.midi.drummap[y[0].token+y[1].token]=y[2].intt,z=k.formatting.midi.drummap):o("Expected one note name and one integer parameter in MIDI "+O,w,0);else if(N.indexOf(O)>=0)y.length!==3||y[0].type!=="number"||y[1].token!=="/"||y[2].type!=="number"?o("Expected fraction parameter in MIDI "+O,w,0):(z.push(y[0].intt),z.push(y[2].intt));else if(B.indexOf(O)>=0)y.length!==4?o("Expected four parameters in MIDI "+O,w,0):y[0].type!=="number"||y[1].type!=="number"||y[2].type!=="number"||y[3].type!=="number"?o("Expected four integer parameters in MIDI "+O,w,0):(z.push(y[0].intt),z.push(y[1].intt),z.push(y[2].intt),z.push(y[3].intt));else if(A.indexOf(O)>=0)y.length!==5?o("Expected five parameters in MIDI "+O,w,0):y[0].type!=="number"||y[1].type!=="number"||y[2].type!=="number"||y[3].type!=="number"||y[4].type!=="number"?o("Expected five integer parameters in MIDI "+O,w,0):(z.push(y[0].intt),z.push(y[1].intt),z.push(y[2].intt),z.push(y[3].intt),z.push(y[4].intt));else if(b.indexOf(O)>=0)y.length!==1||y.length!==4?o("Expected one or two parameters in MIDI "+O,w,0):y[0].type!=="number"?o("Expected integer parameter in MIDI "+O,w,0):y.length===4?(y[1].token!=="octave"&&o("Expected octave parameter in MIDI "+O,w,0),y[2].token!=="="&&o("Expected octave parameter in MIDI "+O,w,0),y[3].type!=="number"&&o("Expected integer parameter for octave in MIDI "+O,w,0)):(z.push(y[0].intt),y.length===4&&z.push(y[3].intt));else if(E.indexOf(O)>=0)if(y.length<2)o("Expected string parameter and at least one integer parameter in MIDI "+O,w,0);else if(y[0].type!=="alpha")o("Expected string parameter and at least one integer parameter in MIDI "+O,w,0);else{var V=y.shift();for(z.push(V.token);y.length>0;)V=y.shift(),V.type!=="number"&&o("Expected integer parameter in MIDI "+O,w,0),z.push(V.intt)}else if(_.indexOf(O)>=0){if(y.length!==1&&y.length!==2)o("Expected one or two parameters in MIDI "+O,w,0);else if(y[0].type!=="number")o("Expected integer parameter in MIDI "+O,w,0);else if(y.length===2&&y[1].type!=="alpha")o("Expected alpha parameter in MIDI "+O,w,0);else if(z.push(y[0].intt),y.length===2){var I=y[1].token;I.indexOf("octave=")!=-1?(I=I.replace("octave=",""),I=parseInt(I),isNaN(I)?o("Expected octave value in MIDI"+O):(I<-1&&(o("Expected octave= in MIDI "+O+" to be >= -1 (recv:"+I+")"),I=-1),I>3&&(o("Expected octave= in MIDI "+O+" to be <= 3 (recv:"+I+")"),I=3),z.push(I))):o("Expected octave= in MIDI"+O)}}c.hasBeginMusic()?c.appendElement("midi",-1,-1,{cmd:O,params:z}):(k.formatting.midi===void 0&&(k.formatting.midi={}),k.formatting.midi[O]=z)};g.parseFontChangeLine=function(y){y=y.replace(/\$\$/g,"");var k=y.split("$");if(k.length>1&&r.setfont){var w=[];k[0]!==""&&w.push({text:k[0]});for(var O=1;O<k.length;O++)if(k[O][0]==="0")w.push({text:k[O].substring(1).replace(/\x03/g,"$$")});else{var z=parseInt(k[O][0],10);r.setfont[z]?w.push({font:r.setfont[z],text:k[O].substring(1).replace(/\x03/g,"$$")}):w[w.length-1].text+="$"+k[O].replace(/\x03/g,"$$")}return w}return y.replace(/\x03/g,"$$")};var D=["auto","above","below","hidden"];g.addDirective=function(y){var k=p.tokenize(y,0,y.length);if(k.length===0||k[0].type!=="alpha")return null;var w=y.substring(y.indexOf(k[0].token)+k[0].token.length);w=p.stripComment(w);var O=k.shift().token.toLowerCase(),z="",V;switch(O){case"bagpipes":n.formatting.bagpipes=!0;break;case"flatbeams":n.formatting.flatbeams=!0;break;case"jazzchords":n.formatting.jazzchords=!0;break;case"accentAbove":n.formatting.accentAbove=!0;break;case"germanAlphabet":n.formatting.germanAlphabet=!0;break;case"landscape":r.landscape=!0;break;case"papersize":r.papersize=w;break;case"graceslurs":if(k.length!==1)return"Directive graceslurs requires one parameter: 0 or 1";if(k[0].token==="0"||k[0].token==="false")n.formatting.graceSlurs=!1;else if(k[0].token==="1"||k[0].token==="true")n.formatting.graceSlurs=!0;else return"Directive graceslurs requires one parameter: 0 or 1 (received "+k[0].token+")";break;case"lineThickness":var I=H(k);if(I.value!==void 0&&(n.formatting.lineThickness=I.value),I.error)return I.error;break;case"stretchlast":var K=H(k);if(K.value!==void 0&&(n.formatting.stretchlast=K.value),K.error)return K.error;break;case"titlecaps":r.titlecaps=!0;break;case"titleleft":n.formatting.titleleft=!0;break;case"measurebox":n.formatting.measurebox=!0;break;case"vocal":return C("vocalPosition",O,k,D);case"dynamic":return C("dynamicPosition",O,k,D);case"gchord":return C("chordPosition",O,k,D);case"ornament":return C("ornamentPosition",O,k,D);case"volume":return C("volumePosition",O,k,D);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"stafftopmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return v(O,k);case"voicescale":if(k.length!==1||k[0].type!=="number")return"voicescale requires one float as a parameter";var Q=k.shift();return r.currentVoice&&(r.currentVoice.scale=Q.floatt,c.changeVoiceScale(r.currentVoice.scale)),null;case"voicecolor":if(k.length!==1)return"voicecolor requires one string as a parameter";var G=k.shift();return r.currentVoice&&(r.currentVoice.color=G.token,c.changeVoiceColor(r.currentVoice.color)),null;case"vskip":var ee=Math.round(h(O,k));return ee.error?ee.error:(c.addSpacing(ee),null);case"scale":t(O,k);break;case"sep":if(k.length===0)c.addSeparator(14,14,85,{startChar:r.iChar,endChar:r.iChar+5});else{var te=p.getMeasurement(k);if(te.used===0)return'Directive "'+O+'" requires 3 numbers: space above, space below, length of line';var ne=te.value;if(te=p.getMeasurement(k),te.used===0)return'Directive "'+O+'" requires 3 numbers: space above, space below, length of line';var X=te.value;if(te=p.getMeasurement(k),te.used===0||k.length!==0)return'Directive "'+O+'" requires 3 numbers: space above, space below, length of line';var ae=te.value;c.addSeparator(ne,X,ae,{startChar:r.iChar,endChar:r.iChar+w.length})}break;case"barsperstaff":if(z=m("barsperstaff",O,k),z!==null)return z;break;case"staffnonote":if(k.length!==1)return"Directive staffnonote requires one parameter: 0 or 1";if(k[0].token==="0")r.staffnonote=!0;else if(k[0].token==="1")r.staffnonote=!1;else return"Directive staffnonote requires one parameter: 0 or 1 (received "+k[0].token+")";break;case"printtempo":if(z=x("printTempo",O,k),z!==null)return z;break;case"partsbox":if(z=x("partsBox",O,k),z!==null)return z;r.partsfont.box=r.partsBox;break;case"freegchord":if(z=x("freegchord",O,k),z!==null)return z;break;case"measurenb":case"barnumbers":if(z=m("barNumbers",O,k),z!==null)return z;break;case"setbarnb":if(k.length!==1||k[0].type!=="number")return"Directive setbarnb requires a number as a parameter.";r.currBarNumber=c.setBarNumberImmediate(k[0].intt);break;case"keywarn":if(k.length!==1||k[0].type!=="number"||k[0].intt!==1&&k[0].intt!==0)return"Directive "+O+" requires 0 or 1 as a parameter.";r[O]=k[0].intt===1;break;case"begintext":var $="";for(V=p.nextLine();V&&V.indexOf("%%endtext")!==0;){if(T.startsWith(V,"%%")){var se=V.substring(2);se=se.trim()+`
1
+ import{f as os}from"./index-DodYl3VC.js";function cs(T,g){for(var p=0;p<g.length;p++){const o=g[p];if(typeof o!="string"&&!Array.isArray(o)){for(const r in o)if(r!=="default"&&!(r in T)){const n=Object.getOwnPropertyDescriptor(o,r);n&&Object.defineProperty(T,r,n.get?n:{enumerable:!0,get:()=>o[r]})}}}return Object.freeze(Object.defineProperty(T,Symbol.toStringTag,{value:"Module"}))}var Xe,Yr;function ls(){if(Yr)return Xe;Yr=1;var T="6.5.2";return Xe=T,Xe}var Ke,Rr;function Br(){if(Rr)return Ke;Rr=1;var T=function(p,o){var r=this;if(o||(o={}),r.qpm=o.qpm?parseInt(o.qpm,10):null,!r.qpm){var n=p.metaText?p.metaText.tempo:null;r.qpm=p.getBpm(n)}r.extraMeasuresAtBeginning=o.extraMeasuresAtBeginning?parseInt(o.extraMeasuresAtBeginning,10):0,r.beatCallback=o.beatCallback,r.eventCallback=o.eventCallback,r.lineEndCallback=o.lineEndCallback,r.lineEndAnticipation=o.lineEndAnticipation?parseInt(o.lineEndAnticipation,10):0,r.beatSubdivisions=o.beatSubdivisions?parseInt(o.beatSubdivisions,10):1,r.joggerTimer=null,r.replaceTarget=function(s){r.noteTimings=s.setTiming(r.qpm,r.extraMeasuresAtBeginning),s.noteTimings.length===0&&(r.noteTimings=s.setTiming(0,0)),r.lineEndCallback&&(r.lineEndTimings=g(s.noteTimings,r.lineEndAnticipation)),r.startTime=null,r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.currentTime=0,r.isPaused=!1,r.isRunning=!1,r.pausedPercent=null,r.justUnpaused=!1,r.newSeekPercent=0,r.lastTimestamp=0,r.noteTimings.length!==0&&(r.millisecondsPerBeat=1e3/(r.qpm/60)/r.beatSubdivisions,r.lastMoment=r.noteTimings[r.noteTimings.length-1].milliseconds,r.totalBeats=Math.round(r.lastMoment/r.millisecondsPerBeat))},r.replaceTarget(p),r.doTiming=function(s){if(r.lastTimestamp!==s&&(r.lastTimestamp=s,r.startTime||(r.startTime=s),!r.isPaused&&r.isRunning)){for(r.currentTime=s-r.startTime,r.currentTime+=16;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].milliseconds<r.currentTime;){if(r.eventCallback&&r.noteTimings[r.currentEvent].type==="event"){var l=r.startTime;r.eventCallback(r.noteTimings[r.currentEvent]),l!==r.startTime&&(r.currentTime=s-r.startTime)}r.currentEvent++}if(r.lineEndCallback&&r.lineEndTimings.length>r.currentLine&&r.lineEndTimings[r.currentLine].milliseconds<r.currentTime&&r.currentEvent<r.noteTimings.length){var d=r.noteTimings[r.currentEvent].milliseconds===r.currentTime?r.noteTimings[r.currentEvent]:r.noteTimings[r.currentEvent-1];r.lineEndCallback(r.lineEndTimings[r.currentLine],d,{line:r.currentLine,endTimings:r.lineEndTimings,currentTime:r.currentTime}),r.currentLine++}if(r.currentTime<r.lastMoment){if(requestAnimationFrame(r.doTiming),r.currentBeat*r.millisecondsPerBeat<r.currentTime){var f=r.doBeatCallback(s);f!==null&&(r.currentTime=f)}}else if(r.currentBeat<=r.totalBeats&&r.beatCallback){var u=r.doBeatCallback(s);u!==null&&(r.currentTime=u),requestAnimationFrame(r.doTiming)}if(r.currentTime>=r.lastMoment)if(r.eventCallback){var i=r.eventCallback(null);r.shouldStop(i).then(function(t){t&&r.stop()})}else r.stop()}},r.shouldStop=function(s){return new Promise(function(l){if(!s)return l(!0);if(s==="continue")return l(!1);s.then&&s.then(function(d){l(d!=="continue")})})},r.doBeatCallback=function(s){if(r.beatCallback){for(var l=r.currentEvent;l<r.noteTimings.length&&r.noteTimings[l].left===null;)l++;var d,f;if(l<r.noteTimings.length){for(d=r.noteTimings[l].milliseconds,l=Math.max(0,r.currentEvent-1);l>=0&&r.noteTimings[l].left===null;)l--;f=r.noteTimings[l]}var u={},i={};if(f){u.top=f.top,u.height=f.height;var t=Math.max(0,s-r.startTime-f.milliseconds),a=d-f.milliseconds,e=f.endX-f.left,h=a?t*e/a:0;u.left=f.left+h,r.currentEvent===0&&f.milliseconds>s-r.startTime&&(u.left=void 0),i={timestamp:s,startTime:r.startTime,ev:f,endMs:d,offMs:t,offPx:h,gapMs:a,gapPx:e}}else i={timestamp:s,startTime:r.startTime};var v=r.startTime;if(r.beatCallback(r.currentBeat/r.beatSubdivisions,r.totalBeats/r.beatSubdivisions,r.lastMoment,u,i),v!==r.startTime)return s-r.startTime;r.currentBeat++}return null};var c=60;r.animationJogger=function(){r.isRunning&&(r.doTiming(performance.now()),r.joggerTimer=setTimeout(r.animationJogger,c))},r.start=function(s,l){if(r.isRunning=!0,r.isPaused&&(r.isPaused=!1,s===void 0&&(r.justUnpaused=!0)),s)r.setProgress(s,l);else if(s===0)r.reset();else if(r.pausedPercent!==null){var d=performance.now();r.currentTime=r.lastMoment*r.pausedPercent,r.startTime=d-r.currentTime,r.pausedPercent=null,r.reportNext=!0}requestAnimationFrame(r.doTiming),r.joggerTimer=setTimeout(r.animationJogger,c)},r.pause=function(){r.isPaused=!0;var s=performance.now();r.pausedPercent=(s-r.startTime)/r.lastMoment,r.isRunning=!1,r.joggerTimer&&(clearTimeout(r.joggerTimer),r.joggerTimer=null)},r.currentMillisecond=function(){return r.currentTime},r.reset=function(){r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.startTime=null,r.pausedPercent=null},r.stop=function(){r.pause(),r.reset()},r.setProgress=function(s,l){var d;switch(l){case"seconds":r.currentTime=s*1e3,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),d=r.currentTime/r.lastMoment;break;case"beats":r.currentTime=s*r.millisecondsPerBeat*r.beatSubdivisions,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),d=r.currentTime/r.lastMoment;break;default:d=s,d<0&&(d=0),d>1&&(d=1),r.currentTime=r.lastMoment*d;break}r.isRunning||(r.pausedPercent=d);var f=performance.now();for(r.startTime=f-r.currentTime,r.currentEvent,r.currentEvent=0;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].milliseconds<r.currentTime;)r.currentEvent++;if(r.lineEndCallback)for(r.currentLine=0;r.lineEndTimings.length>r.currentLine&&r.lineEndTimings[r.currentLine].milliseconds+r.lineEndAnticipation<r.currentTime;)r.currentLine++;var u=r.currentBeat;r.currentBeat=Math.floor(r.currentTime/r.millisecondsPerBeat),r.beatCallback&&u!==r.currentBeat&&r.doBeatCallback(r.startTime+r.currentTime),r.eventCallback&&r.currentEvent>=0&&r.noteTimings[r.currentEvent].type==="event"&&r.eventCallback(r.noteTimings[r.currentEvent]),r.lineEndCallback&&r.lineEndCallback(r.lineEndTimings[r.currentLine],r.noteTimings[r.currentEvent],{line:r.currentLine,endTimings:r.lineEndTimings}),r.joggerTimer=setTimeout(r.animationJogger,c)}};function g(p,o){for(var r=[],n=null,c=0;c<p.length;c++){var s=p[c];s.type!=="end"&&s.top!==n&&(r.push({measureNumber:s.measureNumber,milliseconds:s.milliseconds-o,top:s.top,bottom:s.top+s.height}),n=s.top)}return r}return Ke=T,Ke}var Ue,Wr;function hs(){if(Wr)return Ue;Wr=1;var T=Br(),g={};return function(){var p,o;g.startAnimation=function(r,n,c){p&&(p.stop(),p=void 0),c.showCursor&&(o=r.querySelector(".abcjs-cursor"),o||(o=document.createElement("DIV"),o.className="abcjs-cursor cursor",o.style.position="absolute",r.appendChild(o),r.style.position="relative"));function s(a){for(var e=0;e<a.length;e++){var h=a[e];h.classList.contains("abcjs-bar")||(h.style.display="none")}}var l;function d(a){if(l){var e=r.querySelectorAll(l);s(e)}l=a}function f(a){var e=r.querySelectorAll(a);s(e)}function u(a){c.hideCurrentMeasure?f(a):c.hideFinishedMeasures&&d(a)}function i(a){return".abcjs-l"+a.line+".abcjs-m"+a.measureNumber}function t(a){if(a){if(a.measureStart){var e=i(a);e&&u(e)}o&&(o.style.left=a.left+"px",o.style.top=a.top+"px",o.style.width=a.width+"px",o.style.height=a.height+"px")}else p.stop(),p=void 0}p=new T(n,{qpm:c.bpm,eventCallback:t}),p.start()},g.pauseAnimation=function(r){p&&(r?p.pause():p.start())},g.stopAnimation=function(){p&&(p.stop(),p=void 0)}}(),Ue=g,Ue}var $e,Gr;function Ne(){if(Gr)return $e;Gr=1;var T={};return T.cloneArray=function(g){for(var p=[],o=0;o<g.length;o++)p.push(Object.assign({},g[o]));return p},T.cloneHashOfHash=function(g){var p={};for(var o in g)g.hasOwnProperty(o)&&(p[o]=Object.assign({},g[o]));return p},T.cloneHashOfArrayOfHash=function(g){var p={};for(var o in g)g.hasOwnProperty(o)&&(p[o]=T.cloneArray(g[o]));return p},T.strip=function(g){return g.replace(/^\s+/,"").replace(/\s+$/,"")},T.startsWith=function(g,p){return g.indexOf(p)===0},T.endsWith=function(g,p){var o=g.length-p.length;return o>=0&&g.lastIndexOf(p)===o},T.last=function(g){return g.length===0?null:g[g.length-1]},$e=T,$e}var Qe,qr;function Pr(){if(qr)return Qe;qr=1;var T=Ne(),g={};return function(){var p,o,r,n,c;g.initialize=function(y,k,w,O,z){p=y,o=k,r=w,n=O,c=z,s()};function s(){r.annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},r.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},r.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},r.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},r.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},n.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},n.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},n.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},n.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},n.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},n.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},n.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},n.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},n.formatting.annotationfont=r.annotationfont,n.formatting.gchordfont=r.gchordfont,n.formatting.historyfont=r.historyfont,n.formatting.infofont=r.infofont,n.formatting.measurefont=r.measurefont,n.formatting.partsfont=r.partsfont,n.formatting.repeatfont=r.repeatfont,n.formatting.textfont=r.textfont,n.formatting.tripletfont=r.tripletfont,n.formatting.vocalfont=r.vocalfont,n.formatting.wordsfont=r.wordsfont}var l={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},d=function(y){switch(y){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}},f=function(y,k,w,O,z){function V(){var fe=parseInt(y[0].token);return y.shift(),k?y.length===0?{face:k.face,weight:k.weight,style:k.style,decoration:k.decoration,size:fe}:y.length===1&&y[0].token==="box"&&l[z]?{face:k.face,weight:k.weight,style:k.style,decoration:k.decoration,size:fe,box:!0}:(o("Extra parameters in font definition.",w,O),{face:k.face,weight:k.weight,style:k.style,decoration:k.decoration,size:fe}):(o("Can't set just the size of the font since there is no default value.",w,O),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:fe})}if(y[0].token==="*"){if(y.shift(),y[0].type==="number")return V();o("Expected font size number after *.",w,O)}if(y[0].type==="number")return V();for(var I=[],K,Q="normal",G="normal",ee="none",te=!1,ne="face",X=!1;y.length;){var ae=y.shift(),$=ae.token.toLowerCase();switch(ne){case"face":X||$!=="utf"&&ae.type!=="number"&&$!=="bold"&&$!=="italic"&&$!=="underline"&&$!=="box"?I.length>0&&ae.token==="-"?(X=!0,I[I.length-1]=I[I.length-1]+ae.token):X?(X=!1,I[I.length-1]=I[I.length-1]+ae.token):I.push(ae.token):ae.type==="number"?(K?o("Font size specified twice in font definition.",w,O):K=ae.token,ne="modifier"):$==="bold"?Q="bold":$==="italic"?G="italic":$==="underline"?ee="underline":$==="box"?(l[z]?te=!0:o(`This font style doesn't support "box"`,w,O),ne="finished"):$==="utf"?(ae=y.shift(),ne="size"):o("Unknown parameter "+ae.token+" in font definition.",w,O);break;case"size":ae.type==="number"?K?o("Font size specified twice in font definition.",w,O):K=ae.token:o("Expected font size in font definition.",w,O),ne="modifier";break;case"modifier":$==="bold"?Q="bold":$==="italic"?G="italic":$==="underline"?ee="underline":$==="box"?(l[z]?te=!0:o(`This font style doesn't support "box"`,w,O),ne="finished"):o("Unknown parameter "+ae.token+" in font definition.",w,O);break;case"finished":o('Extra characters found after "box" in font definition.',w,O);break}}K===void 0?k?K=k.size:(o("Must specify the size of the font since there is no default value.",w,O),K=12):K=parseFloat(K),I=I.join(" "),I===""&&(k?I=k.face:(o("Must specify the name of the font since there is no default value.",w,O),I="sans-serif"));var se=d(I),ce={};return se?(ce.face=se.face,ce.weight=se.weight,ce.style=se.style,ce.decoration=se.decoration,ce.size=K,te&&(ce.box=!0),ce):(ce.face=I,ce.weight=Q,ce.style=G,ce.decoration=ee,ce.size=K,te&&(ce.box=!0),ce)},u=function(y,k,w){return k.length===0?'Directive "'+y+'" requires a font as a parameter.':(r[y]=f(k,r[y],w,0,y),r.is_in_header&&(n.formatting[y]=r[y]),null)},i=function(y,k,w){return k.length===0?'Directive "'+y+'" requires a font as a parameter.':(n.formatting[y]=f(k,n.formatting[y],w,0,y),null)},t=function(y,k){var w="";k.forEach(function(z){w+=z.token});var O=parseFloat(w);if(isNaN(O)||O===0)return'Directive "'+y+'" requires a number as a parameter.';n.formatting.scale=O},a=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],e=function(y){var k=y.split(/\s+/);if(k.length!==2&&k.length!==3)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var w=k[0],O=parseInt(k[1],10);if((isNaN(O)||O<35||O>81)&&k[1]&&(O=a.indexOf(k[1].toLowerCase())+35),isNaN(O)||O<35||O>81)return{error:'Expected drum name, received "'+k[1]+'"'};var z={sound:O};return k.length===3&&(z.noteHead=k[2]),{key:w,value:z}},h=function(y,k){var w=p.getMeasurement(k);return w.used===0||k.length!==0?{error:'Directive "'+y+'" requires a measurement as a parameter.'}:w.value},v=function(y,k){var w=p.getMeasurement(k);return w.used===0||k.length!==0?'Directive "'+y+'" requires a measurement as a parameter.':(n.formatting[y]=w.value,null)},m=function(y,k,w,O,z){if(w.length!==1||w[0].type!=="number")return'Directive "'+k+'" requires a number as a parameter.';var V=w[0].intt;return O!==void 0&&V<O?'Directive "'+k+'" requires a number greater than or equal to '+O+" as a parameter.":z!==void 0&&V>z?'Directive "'+k+'" requires a number less than or equal to '+z+" as a parameter.":(r[y]=V,null)},x=function(y,k,w){if(w.length===1&&(w[0].token==="true"||w[0].token==="false"))return r[y]=w[0].token==="true",null;var O=m(y,k,w,0,1);return O!==null?O:(r[y]=r[y]===1,null)},C=function(y,k,w,O){if(w.length!==1)return'Directive "'+k+'" requires one of [ '+O.join(", ")+" ] as a parameter.";for(var z=w[0].token,V=!1,I=0;!V&&I<O.length;I++)O[I]===z&&(V=!0);return V?(r[y]=z,null):'Directive "'+k+'" requires one of [ '+O.join(", ")+" ] as a parameter."},S=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],j=["gchord","ptstress","beatstring"],F=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc","gchordbars"],b=["program"],M=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],B=["beat"],A=["drone"],P=["portamento"],N=["expand","grace","trim"],E=["drum","chordname"],_=["bassprog","chordprog"],L=function(y,k,w){var O=y.shift().token,z=[];if(S.indexOf(O)>=0)y.length!==0&&o("Unexpected parameter in MIDI "+O,w,0);else if(j.indexOf(O)>=0)y.length!==1?o("Expected one parameter in MIDI "+O,w,0):z.push(y[0].token);else if(F.indexOf(O)>=0)y.length!==1?o("Expected one parameter in MIDI "+O,w,0):y[0].type!=="number"?o("Expected one integer parameter in MIDI "+O,w,0):z.push(y[0].intt);else if(b.indexOf(O)>=0)y.length!==1&&y.length!==2?o("Expected one or two parameters in MIDI "+O,w,0):y[0].type!=="number"||y.length===2&&y[1].type!=="number"?o("Expected integer parameter in MIDI "+O,w,0):(z.push(y[0].intt),y.length===2&&z.push(y[1].intt));else if(M.indexOf(O)>=0)y.length!==2?o("Expected two parameters in MIDI "+O,w,0):y[0].type!=="number"||y[1].type!=="number"?o("Expected two integer parameters in MIDI "+O,w,0):(z.push(y[0].intt),z.push(y[1].intt));else if(P.indexOf(O)>=0)y.length!==2?o("Expected two parameters in MIDI "+O,w,0):y[0].type!=="alpha"||y[1].type!=="number"?o("Expected one string and one integer parameters in MIDI "+O,w,0):(z.push(y[0].token),z.push(y[1].intt));else if(O==="drummap")y.length===2&&y[0].type==="alpha"&&y[1].type==="number"?(k.formatting||(k.formatting={}),k.formatting.midi||(k.formatting.midi={}),k.formatting.midi.drummap||(k.formatting.midi.drummap={}),k.formatting.midi.drummap[y[0].token]=y[1].intt,z=k.formatting.midi.drummap):y.length===3&&y[0].type==="punct"&&y[1].type==="alpha"&&y[2].type==="number"?(k.formatting||(k.formatting={}),k.formatting.midi||(k.formatting.midi={}),k.formatting.midi.drummap||(k.formatting.midi.drummap={}),k.formatting.midi.drummap[y[0].token+y[1].token]=y[2].intt,z=k.formatting.midi.drummap):o("Expected one note name and one integer parameter in MIDI "+O,w,0);else if(N.indexOf(O)>=0)y.length!==3||y[0].type!=="number"||y[1].token!=="/"||y[2].type!=="number"?o("Expected fraction parameter in MIDI "+O,w,0):(z.push(y[0].intt),z.push(y[2].intt));else if(B.indexOf(O)>=0)y.length!==4?o("Expected four parameters in MIDI "+O,w,0):y[0].type!=="number"||y[1].type!=="number"||y[2].type!=="number"||y[3].type!=="number"?o("Expected four integer parameters in MIDI "+O,w,0):(z.push(y[0].intt),z.push(y[1].intt),z.push(y[2].intt),z.push(y[3].intt));else if(A.indexOf(O)>=0)y.length!==5?o("Expected five parameters in MIDI "+O,w,0):y[0].type!=="number"||y[1].type!=="number"||y[2].type!=="number"||y[3].type!=="number"||y[4].type!=="number"?o("Expected five integer parameters in MIDI "+O,w,0):(z.push(y[0].intt),z.push(y[1].intt),z.push(y[2].intt),z.push(y[3].intt),z.push(y[4].intt));else if(b.indexOf(O)>=0)y.length!==1||y.length!==4?o("Expected one or two parameters in MIDI "+O,w,0):y[0].type!=="number"?o("Expected integer parameter in MIDI "+O,w,0):y.length===4?(y[1].token!=="octave"&&o("Expected octave parameter in MIDI "+O,w,0),y[2].token!=="="&&o("Expected octave parameter in MIDI "+O,w,0),y[3].type!=="number"&&o("Expected integer parameter for octave in MIDI "+O,w,0)):(z.push(y[0].intt),y.length===4&&z.push(y[3].intt));else if(E.indexOf(O)>=0)if(y.length<2)o("Expected string parameter and at least one integer parameter in MIDI "+O,w,0);else if(y[0].type!=="alpha")o("Expected string parameter and at least one integer parameter in MIDI "+O,w,0);else{var V=y.shift();for(z.push(V.token);y.length>0;)V=y.shift(),V.type!=="number"&&o("Expected integer parameter in MIDI "+O,w,0),z.push(V.intt)}else if(_.indexOf(O)>=0){if(y.length!==1&&y.length!==2)o("Expected one or two parameters in MIDI "+O,w,0);else if(y[0].type!=="number")o("Expected integer parameter in MIDI "+O,w,0);else if(y.length===2&&y[1].type!=="alpha")o("Expected alpha parameter in MIDI "+O,w,0);else if(z.push(y[0].intt),y.length===2){var I=y[1].token;I.indexOf("octave=")!=-1?(I=I.replace("octave=",""),I=parseInt(I),isNaN(I)?o("Expected octave value in MIDI"+O):(I<-1&&(o("Expected octave= in MIDI "+O+" to be >= -1 (recv:"+I+")"),I=-1),I>3&&(o("Expected octave= in MIDI "+O+" to be <= 3 (recv:"+I+")"),I=3),z.push(I))):o("Expected octave= in MIDI"+O)}}c.hasBeginMusic()?c.appendElement("midi",-1,-1,{cmd:O,params:z}):(k.formatting.midi===void 0&&(k.formatting.midi={}),k.formatting.midi[O]=z)};g.parseFontChangeLine=function(y){y=y.replace(/\$\$/g,"");var k=y.split("$");if(k.length>1&&r.setfont){var w=[];k[0]!==""&&w.push({text:k[0]});for(var O=1;O<k.length;O++)if(k[O][0]==="0")w.push({text:k[O].substring(1).replace(/\x03/g,"$$")});else{var z=parseInt(k[O][0],10);r.setfont[z]?w.push({font:r.setfont[z],text:k[O].substring(1).replace(/\x03/g,"$$")}):w[w.length-1].text+="$"+k[O].replace(/\x03/g,"$$")}return w}return y.replace(/\x03/g,"$$")};var D=["auto","above","below","hidden"];g.addDirective=function(y){var k=p.tokenize(y,0,y.length);if(k.length===0||k[0].type!=="alpha")return null;var w=y.substring(y.indexOf(k[0].token)+k[0].token.length);w=p.stripComment(w);var O=k.shift().token.toLowerCase(),z="",V;switch(O){case"bagpipes":n.formatting.bagpipes=!0;break;case"flatbeams":n.formatting.flatbeams=!0;break;case"jazzchords":n.formatting.jazzchords=!0;break;case"accentAbove":n.formatting.accentAbove=!0;break;case"germanAlphabet":n.formatting.germanAlphabet=!0;break;case"landscape":r.landscape=!0;break;case"papersize":r.papersize=w;break;case"graceslurs":if(k.length!==1)return"Directive graceslurs requires one parameter: 0 or 1";if(k[0].token==="0"||k[0].token==="false")n.formatting.graceSlurs=!1;else if(k[0].token==="1"||k[0].token==="true")n.formatting.graceSlurs=!0;else return"Directive graceslurs requires one parameter: 0 or 1 (received "+k[0].token+")";break;case"lineThickness":var I=H(k);if(I.value!==void 0&&(n.formatting.lineThickness=I.value),I.error)return I.error;break;case"stretchlast":var K=H(k);if(K.value!==void 0&&(n.formatting.stretchlast=K.value),K.error)return K.error;break;case"titlecaps":r.titlecaps=!0;break;case"titleleft":n.formatting.titleleft=!0;break;case"measurebox":n.formatting.measurebox=!0;break;case"vocal":return C("vocalPosition",O,k,D);case"dynamic":return C("dynamicPosition",O,k,D);case"gchord":return C("chordPosition",O,k,D);case"ornament":return C("ornamentPosition",O,k,D);case"volume":return C("volumePosition",O,k,D);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"stafftopmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return v(O,k);case"voicescale":if(k.length!==1||k[0].type!=="number")return"voicescale requires one float as a parameter";var Q=k.shift();return r.currentVoice&&(r.currentVoice.scale=Q.floatt,c.changeVoiceScale(r.currentVoice.scale)),null;case"voicecolor":if(k.length!==1)return"voicecolor requires one string as a parameter";var G=k.shift();return r.currentVoice&&(r.currentVoice.color=G.token,c.changeVoiceColor(r.currentVoice.color)),null;case"vskip":var ee=Math.round(h(O,k));return ee.error?ee.error:(c.addSpacing(ee),null);case"scale":t(O,k);break;case"sep":if(k.length===0)c.addSeparator(14,14,85,{startChar:r.iChar,endChar:r.iChar+5});else{var te=p.getMeasurement(k);if(te.used===0)return'Directive "'+O+'" requires 3 numbers: space above, space below, length of line';var ne=te.value;if(te=p.getMeasurement(k),te.used===0)return'Directive "'+O+'" requires 3 numbers: space above, space below, length of line';var X=te.value;if(te=p.getMeasurement(k),te.used===0||k.length!==0)return'Directive "'+O+'" requires 3 numbers: space above, space below, length of line';var ae=te.value;c.addSeparator(ne,X,ae,{startChar:r.iChar,endChar:r.iChar+w.length})}break;case"barsperstaff":if(z=m("barsperstaff",O,k),z!==null)return z;break;case"staffnonote":if(k.length!==1)return"Directive staffnonote requires one parameter: 0 or 1";if(k[0].token==="0")r.staffnonote=!0;else if(k[0].token==="1")r.staffnonote=!1;else return"Directive staffnonote requires one parameter: 0 or 1 (received "+k[0].token+")";break;case"printtempo":if(z=x("printTempo",O,k),z!==null)return z;break;case"partsbox":if(z=x("partsBox",O,k),z!==null)return z;r.partsfont.box=r.partsBox;break;case"freegchord":if(z=x("freegchord",O,k),z!==null)return z;break;case"measurenb":case"barnumbers":if(z=m("barNumbers",O,k),z!==null)return z;break;case"setbarnb":if(k.length!==1||k[0].type!=="number")return"Directive setbarnb requires a number as a parameter.";r.currBarNumber=c.setBarNumberImmediate(k[0].intt);break;case"keywarn":if(k.length!==1||k[0].type!=="number"||k[0].intt!==1&&k[0].intt!==0)return"Directive "+O+" requires 0 or 1 as a parameter.";r[O]=k[0].intt===1;break;case"begintext":var $="";for(V=p.nextLine();V&&V.indexOf("%%endtext")!==0;){if(T.startsWith(V,"%%")){var se=V.substring(2);se=se.trim()+`
2
2
  `,$+=se}else $+=V.trim()+`
3
3
  `;V=p.nextLine()}c.addText($,{startChar:r.iChar,endChar:r.iChar+$.length+7});break;case"continueall":r.continueall=!0;break;case"beginps":for(V=p.nextLine();V&&V.indexOf("%%endps")!==0;)p.nextLine();o("Postscript ignored",y,0);break;case"deco":w.length>0&&r.ignoredDecorations.push(w.substring(0,w.indexOf(" "))),o("Decoration redefinition ignored",y,0);break;case"text":var ce=p.translateString(w);c.addText(g.parseFontChangeLine(ce),{startChar:r.iChar,endChar:r.iChar+w.length+7});break;case"center":var fe=p.translateString(w);c.addCentered(g.parseFontChangeLine(fe));break;case"font":break;case"setfont":var le=p.tokenize(w,0,w.length);if(le.length>=4&&le[0].token==="-"&&le[1].type==="number"){var ve=parseInt(le[1].token);ve>=1&&ve<=9&&(r.setfont||(r.setfont=[]),le.shift(),le.shift(),r.setfont[ve]=f(le,r.setfont[ve],y,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return u(O,k,y);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return i(O,k,y);case"barlabelfont":case"barnumberfont":case"barnumfont":return u("measurefont",k,y);case"staves":case"score":r.score_is_present=!0;for(var ge=function(Pe,ze,Ie,Ve,Ye){(ze||r.staves.length===0)&&r.staves.push({index:r.staves.length,numVoices:0});var Se=T.last(r.staves);Ie!==void 0&&Se.bracket===void 0&&(Se.bracket=Ie),Ve!==void 0&&Se.brace===void 0&&(Se.brace=Ve),Ye&&(Se.connectBarLines="end"),r.voices[Pe]===void 0&&(r.voices[Pe]={staffNum:Se.index,index:Se.numVoices},Se.numVoices++)},ye=!1,R=!1,q=!1,Y=!1,W=!1,U=!1,J=!1,re,he=function(){if(J=!0,re){var Pe="start";re.staffNum>0&&(r.staves[re.staffNum-1].connectBarLines==="start"||r.staves[re.staffNum-1].connectBarLines==="continue")&&(Pe="continue"),r.staves[re.staffNum].connectBarLines=Pe}};k.length;){var Z=k.shift();switch(Z.token){case"(":ye?o("Can't nest parenthesis in %%score",y,Z.start):(ye=!0,Y=!0);break;case")":!ye||Y?o("Unexpected close parenthesis in %%score",y,Z.start):ye=!1;break;case"[":R?o("Can't nest brackets in %%score",y,Z.start):(R=!0,W=!0);break;case"]":!R||W?o("Unexpected close bracket in %%score",y,Z.start):(R=!1,r.staves[re.staffNum].bracket="end");break;case"{":q?o("Can't nest braces in %%score",y,Z.start):(q=!0,U=!0);break;case"}":!q||U?o("Unexpected close brace in %%score",y,Z.start):(q=!1,r.staves[re.staffNum].brace="end");break;case"|":he();break;default:for(var ie="";(Z.type==="alpha"||Z.type==="number")&&(ie+=Z.token,Z.continueId);)Z=k.shift();var be=!ye||Y,pe=W?"start":R?"continue":void 0,oe=U?"start":q?"continue":void 0;ge(ie,be,pe,oe,J),Y=!1,W=!1,U=!1,J=!1,re=r.voices[ie],O==="staves"&&he();break}}break;case"maxstaves":var me=p.getInt(w);me.digits===0?o("Expected number of staves in maxstaves"):me.value>0&&(n.formatting.maxStaves=me.value);break;case"newpage":var Ee=p.getInt(w);c.addNewPage(Ee.digits===0?-1:Ee.value);break;case"abc":var ue=w.split(" ");switch(ue[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var xe=ue.shift();c.addMetaText(O+xe,ue.join(" "),{startChar:r.iChar,endChar:r.iChar+w.length+5});break;default:return"Unknown directive: "+O+ue[0]}break;case"header":case"footer":var we=p.getMeat(w,0,w.length);we=w.substring(we.start,we.end),we[0]==='"'&&we[we.length-1]==='"'&&(we=we.substring(1,we.length-1));var de=we.split(" "),Te={};de.length===1?Te={left:"",center:de[0],right:""}:de.length===2?Te={left:de[0],center:de[1],right:""}:Te={left:de[0],center:de[1],right:de[2]},de.length>3&&o("Too many tabs in "+O+": "+de.length+" found.",w,0),c.addMetaTextObj(O,Te,{startChar:r.iChar,endChar:r.iChar+y.length});break;case"midi":var ke=p.tokenize(w,0,w.length,!0);ke.length>0&&ke[0].token==="="&&ke.shift(),ke.length===0?o("Expected midi command",w,0):L(ke,n,w);break;case"percmap":var Be=e(w);Be.error?o(Be.error,y,8):(n.formatting.percmap||(n.formatting.percmap={}),n.formatting.percmap[Be.key]=Be.value);break;case"visualtranspose":var De=p.getInt(w);De.digits===0?o("Expected number of half steps in visualTranspose"):r.globalTranspose=De.value;break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":n.formatting[O]=w;break;default:return"Unknown directive: "+O}return null},g.globalFormatting=function(y){for(var k in y)if(y.hasOwnProperty(k)){var w=""+y[k],O=p.tokenize(w,0,w.length),z;switch(k){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":case"tablabelfont":case"tabnumberfont":case"tabgracefont":u(k,O,w);break;case"scale":t(k,O);break;case"partsbox":z=x("partsBox",k,O),z!==null&&o(z),r.partsfont.box=r.partsBox;break;case"freegchord":z=x("freegchord",k,O),z!==null&&o(z);break;case"fontboxpadding":(O.length!==1||O[0].type!=="number")&&o('Directive "'+k+'" requires a number as a parameter.'),n.formatting.fontboxpadding=O[0].floatt;break;case"stafftopmargin":(O.length!==1||O[0].type!=="number")&&o('Directive "'+k+'" requires a number as a parameter.'),n.formatting.stafftopmargin=O[0].floatt;break;case"stretchlast":var V=H(O);if(V.value!==void 0&&(n.formatting.stretchlast=V.value),V.error)return V.error;break;default:o("Formatting directive unrecognized: ",k,0)}}};function H(y){if(y.length===0)return{value:1};if(y.length===1)if(y[0].type==="number"){if(y[0].floatt>=0||y[0].floatt<=1)return{value:y[0].floatt}}else{if(y[0].token==="false")return{value:0};if(y[0].token==="true")return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+y[0].token+")"}}}(),Qe=g,Qe}var Je,Xr;function us(){if(Xr)return Je;Xr=1;var T={};const g=["C,,,","D,,,","E,,,","F,,,","G,,,","A,,,","B,,,","C,,","D,,","E,,","F,,","G,,","A,,","B,,","C,","D,","E,","F,","G,","A,","B,","C","D","E","F","G","A","B","c","d","e","f","g","a","b","c'","d'","e'","f'","g'","a'","b'","c''","d''","e''","f''","g''","a''","b''","c'''","d'''","e'''","f'''","g'''","a'''","b'''"];return T.pitchIndex=function(p){return g.indexOf(p)},T.noteName=function(p){return g[p]},Je=T,Je}var Ze,Kr;function Mi(){if(Kr)return Ze;Kr=1;var T=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],g=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],p=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],o=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];function r(n,c,s,l){if(!c||c%12===0)return n;for(;c<0;)c+=12;c>11&&(c=c%12);var d=n.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!d)return n;var f=d[1],u=d[2],i=d[3],t=d[4],a=T.indexOf(f);if(a<0&&(a=g.indexOf(f)),a<0&&(a=p.indexOf(f)),a<0&&(a=o.indexOf(f)),a<0)return n;a+=c,a=a%12,s?l?n=o[a]:n=g[a]:l?n=p[a]:n=T[a];var e=u&&(u.indexOf("dim")>=0||u.indexOf("°")>=0);if(e&&n==="A#"&&(n="Bb"),e&&n==="D#"&&(n="Eb"),e&&n==="A♯"&&(n="B♭"),e&&n==="D♯"&&(n="E♭"),u&&(n+=u),i){var a=T.indexOf(i);a<0&&(a=g.indexOf(i)),a<0&&(a=p.indexOf(i)),a<0&&(a=o.indexOf(i)),n+="/",a>=0?(a+=c,a=a%12,s?l?n+=o[a]:n+=g[a]:l?n+=p[a]:n+=T[a]):n+=i}return t&&(n+=t),n}return Ze=r,Ze}var et,Ur;function Ai(){if(Ur)return et;Ur=1;var T={C:{modes:["CMaj","Amin","Am","GMix","DDor","EPhr","FLyd","BLoc"],stepsFromC:0},Db:{modes:["DbMaj","Bbmin","Bbm","AbMix","EbDor","FPhr","GbLyd","CLoc"],stepsFromC:1},D:{modes:["DMaj","Bmin","Bm","AMix","EDor","F#Phr","GLyd","C#Loc"],stepsFromC:2},Eb:{modes:["EbMaj","Cmin","Cm","BbMix","FDor","GPhr","AbLyd","DLoc"],stepsFromC:3},E:{modes:["EMaj","C#min","C#m","BMix","F#Dor","G#Phr","ALyd","D#Loc"],stepsFromC:4},F:{modes:["FMaj","Dmin","Dm","CMix","GDor","APhr","BbLyd","ELoc"],stepsFromC:5},Gb:{modes:["GbMaj","Ebmin","Ebm","DbMix","AbDor","BbPhr","CbLyd","FLoc"],stepsFromC:6},G:{modes:["GMaj","Emin","Em","DMix","ADor","BPhr","CLyd","F#Loc"],stepsFromC:7},Ab:{modes:["AbMaj","Fmin","Fm","EbMix","BbDor","CPhr","DbLyd","GLoc"],stepsFromC:8},A:{modes:["AMaj","F#min","F#m","EMix","BDor","C#Phr","DLyd","G#Loc"],stepsFromC:9},Bb:{modes:["BbMaj","Gmin","Gm","FMix","CDor","DPhr","EbLyd","ALoc"],stepsFromC:10},B:{modes:["BMaj","G#min","G#m","F#Mix","C#Dor","D#Phr","ELyd","A#Loc"],stepsFromC:11},"C#":{modes:["C#Maj","A#min","A#m","G#Mix","D#Dor","E#Phr","F#Lyd","B#Loc"],stepsFromC:1},"F#":{modes:["F#Maj","D#min","D#m","C#Mix","G#Dor","A#Phr","BLyd","E#Loc"],stepsFromC:6},Cb:{modes:["CbMaj","Abmin","Abm","GbMix","DbDor","EbPhr","FbLyd","BbLoc"],stepsFromC:11}},g=null;function p(){g={};for(var c=Object.keys(T),s=0;s<c.length;s++){var l=T[c[s]];g[c[s].toLowerCase()]=c[s];for(var d=0;d<l.modes.length;d++){var f=l.modes[d].toLowerCase();g[f]=c[s]}}}function o(c){g||p();var s=c.toLowerCase().match(/([a-g][b#]?)(maj|min|mix|dor|phr|lyd|loc|m)?/);if(!s||!s[2])return c;s=s[1]+s[2];var l=g[s];return l||c}function r(c,s){var l=T[c];if(!l||s==="")return c;var d=s.toLowerCase().match(/^(maj|min|mix|dor|phr|lyd|loc|m)/);if(!d)return c;for(var f=d[1],u=0;u<l.modes.length;u++){var i=l.modes[u],t=i.toLowerCase().indexOf(f);if(t!==-1&&t===i.length-f.length)return i.substring(0,i.length-f.length)}return c}function n(c,s){var l=T[c];if(!l)return c;for(;s<0;)s+=12;for(var d=(l.stepsFromC+s)%12,f=0;f<Object.keys(T).length;f++){var u=Object.keys(T)[f];if(T[u].stepsFromC===d)return u}return c}return et={relativeMajor:o,relativeMode:r,transposeKey:n},et}var tt,$r;function Ni(){if($r)return tt;$r=1;var{relativeMajor:T}=Ai(),g={acc:"sharp",note:"f"},p={acc:"sharp",note:"c"},o={acc:"sharp",note:"g"},r={acc:"sharp",note:"d"},n={acc:"sharp",note:"A"},c={acc:"sharp",note:"e"},s={acc:"sharp",note:"B"},l={acc:"flat",note:"B"},d={acc:"flat",note:"e"},f={acc:"flat",note:"A"},u={acc:"flat",note:"d"},i={acc:"flat",note:"G"},t={acc:"flat",note:"c"},a={acc:"flat",note:"F"},e={"C#":[g,p,o,r,n,c,s],"F#":[g,p,o,r,n,c],B:[g,p,o,r,n],E:[g,p,o,r],A:[g,p,o],D:[g,p],G:[g],C:[],F:[l],Bb:[l,d],Eb:[l,d,f],Cm:[l,d,f],Ab:[l,d,f,u],Db:[l,d,f,u,i],Gb:[l,d,f,u,i,t],Cb:[l,d,f,u,i,t,a],"A#":[l,d],"B#":[],"D#":[l,d,f],"E#":[l],"G#":[l,d,f,u],none:[]};function h(v){var m=e[T(v)];return m?JSON.parse(JSON.stringify(m)):null}return tt=h,tt}var rt,Qr;function Bi(){if(Qr)return rt;Qr=1;var T=us(),g=Mi(),p=Ni(),o={},r={C:0,"C#":1,Db:1,D:2,"D#":3,Eb:3,E:4,F:5,"F#":6,Gb:6,G:7,"G#":8,Ab:8,A:9,"A#":10,Bb:10,B:11},n=["C","Db","D","Eb","E","F","F#","G","Ab","A","Bb","B"],c=["C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"];o.keySignature=function(i,t,a,e,h){if(i.clef.type==="perc"||i.clef.type==="none")return{accidentals:p(t),root:a,acc:e};h||(h=0),i.localTransposeVerticalMovement=0,i.localTransposePreferFlats=!1;var v=p(t);if(!v)return i.key;if(i.localTranspose=(i.globalTranspose?i.globalTranspose:0)+h,!i.localTranspose)return{accidentals:v,root:a,acc:e};if(i.globalTransposeOrigKeySig=v,i.localTranspose%12===0)return i.localTransposeVerticalMovement=i.localTranspose/12*7,{accidentals:v,root:a,acc:e};var m=t[0];t[1]==="b"||t[1]==="#"?(m+=t[1],t=t.substr(2)):t=t.substr(1);var x=r[m],C=x!==void 0;C||(x=0,m="C",t="");for(var S=x+i.localTranspose;S<0;)S+=12;S>11&&(S=S%12);var j=t[0]==="m"?c[S]:n[S],F=j+t,b=p(F);(b.length===0||b[0].acc==="flat")&&(i.localTransposePreferFlats=!0);var M=F.charCodeAt(0)-m.charCodeAt(0);return i.localTranspose>0?(M<0||M===0&&(m[1]==="#"||F[1]==="b"))&&(M+=7):i.localTranspose<0&&(M>0||M===0&&(m[1]==="b"||F[1]==="#"))&&(M-=7),i.localTranspose>0?i.localTransposeVerticalMovement=M+Math.floor(i.localTranspose/12)*7:i.localTransposeVerticalMovement=M+Math.ceil(i.localTranspose/12)*7,C?{accidentals:b,root:j[0],acc:j.length>1?j[1]:""}:{accidentals:[],root:a,acc:e}},o.chordName=function(i,t){return g(t,i.localTranspose,i.localTransposePreferFlats,i.freegchord)};var s=["c","d","e","f","g","a","b"];function l(i,t,a,e,h){for(var v=s[(i+49)%7],m=0,x=0;x<e.length;x++)e[x].note.toLowerCase()===v&&(m=d[e[x].acc]);for(var C=d[a],S=C-m,j=s[(t+49)%7],F=0,b=0;b<h.accidentals.length;b++)h.accidentals[b].note.toLowerCase()===j&&(F=d[h.accidentals[b].acc]);var M=S+F;return M<-2&&(t--,M+=j==="c"||j==="f"?1:2),M>2&&(t++,M-=j==="b"||j==="e"?1:2),[t,M]}var d={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},f={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},u={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};return o.note=function(i,t){if(!(!i.localTranspose||i.clef.type==="perc")){var a=t.pitch;if(i.localTransposeVerticalMovement&&(t.pitch=t.pitch+i.localTransposeVerticalMovement,t.name)){var e=t.accidental?t.name.substring(1):t.name,h=t.accidental?t.name[0]:"",v=T.pitchIndex(e);t.name=h+T.noteName(v+i.localTransposeVerticalMovement)}if(t.accidental){var m=l(a,t.pitch,t.accidental,i.globalTransposeOrigKeySig,i.targetKey);t.pitch=m[0],t.accidental=f[m[1]],t.name&&(t.name=u[m[1]]+t.name.replace(/[_^=]/g,""))}}},rt=o,rt}var at,Jr;function Lr(){if(Jr)return at;Jr=1;var T=Pr(),g=Bi(),p={};return function(){var o,r,n,c;p.initialize=function(t,a,e,h,v){o=t,r=a,n=e,c=v},p.standardKey=function(t,a,e,h){return g.keySignature(n,t,a,e,h)};var s={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},l=function(t,a){var e=s[t],h=e?e.mid:0;return h+a};p.fixClef=function(t){var a=s[t.type];a&&(t.clefPos=a.pitch,t.type=a.clef)},p.deepCopyKey=function(t){var a={accidentals:[],root:t.root,acc:t.acc,mode:t.mode};return t.accidentals.forEach(function(e){a.accidentals.push(Object.assign({},e))}),a};var d={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};p.addPosToKey=function(t,a){var e=t.verticalPos;a.accidentals.forEach(function(h){var v=d[h.note];v=v-e,h.verticalPos=v}),a.impliedNaturals&&a.impliedNaturals.forEach(function(h){var v=d[h.note];v=v-e,h.verticalPos=v}),e<-10?(a.accidentals.forEach(function(h){h.verticalPos-=7,(h.verticalPos>=11||h.verticalPos===10&&h.acc==="flat")&&(h.verticalPos-=7),h.note==="A"&&h.acc==="sharp"&&(h.verticalPos-=7),(h.note==="G"||h.note==="F")&&h.acc==="flat"&&(h.verticalPos-=7)}),a.impliedNaturals&&a.impliedNaturals.forEach(function(h){h.verticalPos-=7,(h.verticalPos>=11||h.verticalPos===10&&h.acc==="flat")&&(h.verticalPos-=7),h.note==="A"&&h.acc==="sharp"&&(h.verticalPos-=7),(h.note==="G"||h.note==="F")&&h.acc==="flat"&&(h.verticalPos-=7)})):e<-4?(a.accidentals.forEach(function(h){h.verticalPos-=7,e===-8&&(h.note==="f"||h.note==="g")&&h.acc==="sharp"&&(h.verticalPos-=7)}),a.impliedNaturals&&a.impliedNaturals.forEach(function(h){h.verticalPos-=7,e===-8&&(h.note==="f"||h.note==="g")&&h.acc==="sharp"&&(h.verticalPos-=7)})):e>=7&&(a.accidentals.forEach(function(h){h.verticalPos+=7}),a.impliedNaturals&&a.impliedNaturals.forEach(function(h){h.verticalPos+=7}))},p.fixKey=function(t,a){var e=Object.assign({},a);return p.addPosToKey(t,e),e};var f=function(t){var a=0,e=t[a++];(e==="^"||e==="_")&&(e=t[a++]);var h=d[e];for(h===void 0&&(h=6);a<t.length;a++)if(t[a]===",")h-=7;else if(t[a]==="'")h+=7;else break;return{mid:h-6,str:t.substring(a)}},u=function(t){for(var a=0;a<t.length;a++)t[a].note==="b"?t[a].note="B":t[a].note==="a"?t[a].note="A":t[a].note==="F"?t[a].note="f":t[a].note==="E"?t[a].note="e":t[a].note==="D"?t[a].note="d":t[a].note==="C"?t[a].note="c":t[a].note==="G"&&t[a].acc==="sharp"?t[a].note="g":t[a].note==="g"&&t[a].acc==="flat"&&(t[a].note="G")};p.parseKey=function(t,a){t.length===0&&(t="none");var e=o.tokenize(t,0,t.length),h={};if(e.length===0)return r("Must pass in key signature.",t,0),h;switch(e[0].token){case"HP":T.addDirective("bagpipes"),n.key={root:"HP",accidentals:[],acc:"",mode:""},h.foundKey=!0,e.shift();break;case"Hp":T.addDirective("bagpipes"),n.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},h.foundKey=!0,e.shift();break;case"none":n.key={root:"none",accidentals:[],acc:"",mode:""},h.foundKey=!0,e.shift();break;default:var v=o.getKeyPitch(e[0].token);if(v.len>0){h.foundKey=!0;var m="",x="";e[0].token.length>1?e[0].token=e[0].token.substring(1):e.shift();var C=v.token;if(e.length>0){var S=o.getSharpFlat(e[0].token);if(S.len>0&&(e[0].token.length>1?e[0].token=e[0].token.substring(1):e.shift(),C+=S.token,m=S.token),e.length>0){var j=o.getMode(e[0].token);j.len>0&&(e.shift(),C+=j.token,x=j.token)}if(p.standardKey(C,v.token,m,0)===void 0)return r("Unsupported key signature: "+C,t,0),h}var F=p.deepCopyKey(n.key),b=!a&&n.globalTranspose?-n.globalTranspose:0,M;if(a&&(M=n.globalTransposeOrigKeySig),n.key=p.deepCopyKey(p.standardKey(C,v.token,m,b)),a&&(n.globalTransposeOrigKeySig=M),n.key.mode=x,F&&n.keywarn!==!1){for(var B,A=0;A<n.key.accidentals.length;A++)for(B=0;B<F.accidentals.length;B++)F.accidentals[B].note&&n.key.accidentals[A].note.toLowerCase()===F.accidentals[B].note.toLowerCase()&&(F.accidentals[B].note=null);for(B=0;B<F.accidentals.length;B++)F.accidentals[B].note&&(n.key.impliedNaturals||(n.key.impliedNaturals=[]),n.key.impliedNaturals.push({acc:"natural",note:F.accidentals[B].note}))}}break}if(e.length===0||(e[0].token==="exp"&&e.shift(),e.length===0)||(e[0].token==="oct"&&e.shift(),e.length===0))return h;var P=o.getKeyAccidentals2(e);if(P.warn&&r(P.warn,t,0),P.accs){h.foundKey||(h.foundKey=!0,n.key={root:"none",acc:"",mode:"",accidentals:[]}),u(P.accs);for(var N=0;N<P.accs.length;N++){for(var E=!1,_=0;_<n.key.accidentals.length&&!E;_++)n.key.accidentals[_].note===P.accs[N].note&&(E=!0,n.key.accidentals[_].acc!==P.accs[N].acc&&(n.key.accidentals[_].acc=P.accs[N].acc,n.key.explicitAccidentals||(n.key.explicitAccidentals=[]),n.key.explicitAccidentals.push(P.accs[N])));if(!E&&(n.key.explicitAccidentals||(n.key.explicitAccidentals=[]),n.key.explicitAccidentals.push(P.accs[N]),n.key.accidentals.push(P.accs[N]),n.key.impliedNaturals))for(var L=0;L<n.key.impliedNaturals.length;L++)n.key.impliedNaturals[L].note===P.accs[N].note&&n.key.impliedNaturals.splice(L,1)}}for(var D;e.length>0;)switch(e[0].token){case"m":case"middle":if(e.shift(),e.length===0)return r("Expected = after middle",t,0),h;if(D=e.shift(),D.token!=="="){r("Expected = after middle",t,D.start);break}if(e.length===0)return r("Expected parameter after middle=",t,0),h;var H=o.getPitchFromTokens(e);H.warn&&r(H.warn,t,0),H.position&&(n.clef.verticalPos=H.position-6);break;case"transpose":if(e.shift(),e.length===0)return r("Expected = after transpose",t,0),h;if(D=e.shift(),D.token!=="="){r("Expected = after transpose",t,D.start);break}if(e.length===0)return r("Expected parameter after transpose=",t,0),h;if(e[0].type!=="number"){r("Expected number after transpose",t,e[0].start);break}n.clef.transpose=e[0].intt,e.shift();break;case"stafflines":if(e.shift(),e.length===0)return r("Expected = after stafflines",t,0),h;if(D=e.shift(),D.token!=="="){r("Expected = after stafflines",t,D.start);break}if(e.length===0)return r("Expected parameter after stafflines=",t,0),h;if(e[0].type!=="number"){r("Expected number after stafflines",t,e[0].start);break}n.clef.stafflines=e[0].intt,e.shift();break;case"staffscale":if(e.shift(),e.length===0)return r("Expected = after staffscale",t,0),h;if(D=e.shift(),D.token!=="="){r("Expected = after staffscale",t,D.start);break}if(e.length===0)return r("Expected parameter after staffscale=",t,0),h;if(e[0].type!=="number"){r("Expected number after staffscale",t,e[0].start);break}n.clef.staffscale=e[0].floatt,e.shift();break;case"octave":if(e.shift(),e.length===0)return r("Expected = after octave",t,0),h;if(D=e.shift(),D.token!=="="){r("Expected = after octave",t,D.start);break}if(e.length===0)return r("Expected parameter after octave=",t,0),h;if(e[0].type!=="number"){r("Expected number after octave",t,e[0].start);break}n.octave=e[0].intt,e.shift();break;case"style":if(e.shift(),e.length===0)return r("Expected = after style",t,0),h;if(D=e.shift(),D.token!=="="){r("Expected = after style",t,D.start);break}if(e.length===0)return r("Expected parameter after style=",t,0),h;switch(e[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":n.style=e[0].token,e.shift();break;default:r("error parsing style element: "+e[0].token,t,e[0].start);break}break;case"clef":if(e.shift(),e.length===0)return r("Expected = after clef",t,0),h;if(D=e.shift(),D.token!=="="){r("Expected = after clef",t,D.start);break}if(e.length===0)return r("Expected parameter after clef=",t,0),h;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var y=e.shift();switch(y.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":y.token="alto";break;case"F":y.token="bass";break;case"G":y.token="treble";break;case"c":y.token="alto";break;case"f":y.token="bass";break;case"g":y.token="treble";break;default:r("Expected clef name. Found "+y.token,t,y.start);break}e.length>0&&e[0].type==="number"&&(y.token+=e[0].token,e.shift()),e.length>1&&(e[0].token==="-"||e[0].token==="+"||e[0].token==="^"||e[0].token==="_")&&e[1].token==="8"&&(y.token+=e[0].token+e[1].token,e.shift(),e.shift()),n.clef={type:y.token,verticalPos:l(y.token,0)},n.currentVoice&&n.currentVoice.transpose!==void 0&&(n.clef.transpose=n.currentVoice.transpose),h.foundClef=!0;break;default:r("Unknown parameter: "+e[0].token,t,e[0].start),e.shift()}return h};var i=function(t){var a=n.voices[t];if(!(n.currentVoice&&n.currentVoice.index===a.index&&n.currentVoice.staffNum===a.staffNum))return n.currentVoice=a,c.setCurrentVoice(a.staffNum,a.index,t)};p.parseVoice=function(t,a,e){var h=o.getMeat(t,a,e),v=h.start,m=h.end,x=o.getToken(t,v,m);if(x.length===0){r("Expected a voice id",t,v);return}var C=!1;n.voices[x]===void 0&&(n.voices[x]={},C=!0,n.score_is_present&&r("Can't have an unknown V: id when the %score directive is present",t,v)),v+=x.length,v+=o.eatWhiteSpace(t,v);for(var S={startStaff:C},j=function(H){var y=o.getVoiceToken(t,v,m);y.warn!==void 0?r("Expected value for "+H+" in voice: "+y.warn,t,v):y.err!==void 0?r("Expected value for "+H+" in voice: "+y.err,t,v):y.token.length===0&&t[v]!=='"'?r("Expected value for "+H+" in voice",t,v):S[H]=y.token,v+=y.len},F=function(H,y,k){var w=o.getVoiceToken(t,v,m);w.warn!==void 0?r("Expected value for "+y+" in voice: "+w.warn,t,v):w.err!==void 0?r("Expected value for "+y+" in voice: "+w.err,t,v):w.token.length===0&&t[v]!=='"'?r("Expected value for "+y+" in voice",t,v):(w.token=parseFloat(w.token),n.voices[H][y]=w.token),v+=w.len},b=function(H,y){var k=o.getVoiceToken(t,v,m);if(k.warn!==void 0)r("Expected value for "+H+" in voice: "+k.warn,t,v);else if(k.err!==void 0)r("Expected value for "+H+" in voice: "+k.err,t,v);else if(k.token.length===0&&t[v]!=='"')r("Expected value for "+H+" in voice",t,v);else return k.token;v+=k.len},M=function(H,y){var k={_B:2,_E:9,_b:-10,_e:-3},w=o.getVoiceToken(t,v,m);if(w.warn!==void 0)r("Expected one of (_B, _E, _b, _e) for "+y+" in voice: "+w.warn,t,v);else if(w.token.length===0&&t[v]!=='"')r("Expected one of (_B, _E, _b, _e) for "+y+" in voice",t,v);else{var O=k[w.token];O?n.voices[H][y]=O:r("Expected one of (_B, _E, _b, _e) for "+y+" in voice",t,v)}v+=w.len};v<m;){var B=o.getVoiceToken(t,v,m);if(v+=B.len,B.warn)r("Error parsing voice: "+B.warn,t,v);else{var A=null;switch(B.token){case"clef":case"cl":j("clef");var P=0;S.clef!==void 0&&(S.clef=S.clef.replace(/[',]/g,""),S.clef.indexOf("+16")!==-1&&(P+=14,S.clef=S.clef.replace("+16","")),S.verticalPos=l(S.clef,P));break;case"treble":case"bass":case"tenor":case"alto":case"perc":case"none":case"treble'":case"bass'":case"tenor'":case"alto'":case"none'":case"treble''":case"bass''":case"tenor''":case"alto''":case"none''":case"treble,":case"bass,":case"tenor,":case"alto,":case"none,":case"treble,,":case"bass,,":case"tenor,,":case"alto,,":case"none,,":case"treble+8":case"treble-8":case"treble^8":case"treble_8":case"treble1":case"treble2":case"treble3":case"treble4":case"treble5":case"bass+8":case"bass-8":case"bass^8":case"bass_8":case"bass+16":case"bass-16":case"bass^16":case"bass_16":case"bass1":case"bass2":case"bass3":case"bass4":case"bass5":case"tenor1":case"tenor2":case"tenor3":case"tenor4":case"tenor5":case"alto1":case"alto2":case"alto3":case"alto4":case"alto5":case"alto+8":case"alto-8":case"alto^8":case"alto_8":var N=0;S.clef=B.token.replace(/[',]/g,""),S.verticalPos=l(S.clef,N),n.voices[x].clef=B.token;break;case"staves":case"stave":case"stv":j("staves");break;case"brace":case"brc":j("brace");break;case"bracket":case"brk":j("bracket");break;case"name":case"nm":j("name");break;case"subname":case"sname":case"snm":j("subname");break;case"merge":S.startStaff=!1;break;case"stem":case"stems":A=o.getVoiceToken(t,v,m),A.warn!==void 0?r("Expected value for stems in voice: "+A.warn,t,v):A.err!==void 0?r("Expected value for stems in voice: "+A.err,t,v):A.token==="up"||A.token==="down"?n.voices[x].stem=A.token:r("Expected up or down for voice stem",t,v),v+=A.len;break;case"up":case"down":n.voices[x].stem=B.token;break;case"middle":case"m":j("verticalPos"),S.verticalPos=f(S.verticalPos).mid;break;case"gchords":case"gch":n.voices[x].suppressChords=!0,A=o.getVoiceToken(t,v,m),A.token==="0"&&(v=v+A.len);break;case"space":case"spc":j("spacing");break;case"scale":F(x,"scale");break;case"score":M(x,"scoreTranspose");break;case"transpose":F(x,"transpose");break;case"stafflines":F(x,"stafflines");break;case"staffscale":F(x,"staffscale");break;case"octave":F(x,"octave");break;case"volume":F(x,"volume");break;case"cue":var E=b("cue");E==="on"?n.voices[x].scale=.6:n.voices[x].scale=1;break;case"style":A=o.getVoiceToken(t,v,m),A.warn!==void 0?r("Expected value for style in voice: "+A.warn,t,v):A.err!==void 0?r("Expected value for style in voice: "+A.err,t,v):A.token==="normal"||A.token==="harmonic"||A.token==="rhythm"||A.token==="x"||A.token==="triangle"?n.voices[x].style=A.token:r("Expected one of [normal, harmonic, rhythm, x, triangle] for voice style",t,v),v+=A.len;break}}v+=o.eatWhiteSpace(t,v)}if((S.startStaff||n.staves.length===0)&&(n.staves.push({index:n.staves.length,meter:n.origMeter}),n.score_is_present||(n.staves[n.staves.length-1].numVoices=0)),n.voices[x].staffNum===void 0){n.voices[x].staffNum=n.staves.length-1;var _=0;for(var L in n.voices)n.voices.hasOwnProperty(L)&&n.voices[L].staffNum===n.voices[x].staffNum&&_++;n.voices[x].index=_-1}var D=n.staves[n.voices[x].staffNum];return n.score_is_present||D.numVoices++,S.clef&&(D.clef={type:S.clef,verticalPos:S.verticalPos}),S.spacing&&(D.spacing_below_offset=S.spacing),S.verticalPos&&(D.verticalPos=S.verticalPos),S.name&&(D.name?D.name.push(S.name):D.name=[S.name]),S.subname&&(D.subname?D.subname.push(S.subname):D.subname=[S.subname]),i(x)}}(),at=p,at}var nt,Zr;function ds(){if(Zr)return nt;Zr=1;var T=Ne(),g=Pr(),p=Lr(),o=function(r,n,c,s,l){this.reset=function(u,i,t,a){p.initialize(u,i,t,a,l),g.initialize(u,i,t,a,l)},this.reset(r,n,c,s),this.setTitle=function(u,i){c.hasMainTitle?l.addSubtitle(u,{startChar:c.iChar,endChar:c.iChar+i+2}):(l.addMetaText("title",u,{startChar:c.iChar,endChar:c.iChar+i+2}),c.hasMainTitle=!0)},this.setMeter=function(u){if(u=r.stripComment(u),u==="C")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"common_time"};if(u==="C|")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"cut_time"};if(u==="o")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"tempus_perfectum"};if(u==="c")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"tempus_imperfectum"};if(u==="o.")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if(u==="c.")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(u.length===0||u.toLowerCase()==="none")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),null;var i=r.tokenize(u,0,u.length);try{var t=function(){var x={value:0,num:""},C=i.shift();for(C.token==="("&&(C=i.shift());;){if(C.type!=="number")throw"Expected top number of meter";if(x.value+=parseInt(C.token),x.num+=C.token,i.length===0||i[0].token==="/")return x;if(C=i.shift(),C.token===")"){if(i.length===0||i[0].token==="/")return x;throw"Unexpected paren in meter"}if(C.token!=="."&&C.token!=="+"||(x.num+=C.token,i.length===0))throw"Expected top number of meter";C=i.shift()}return x},a=function(){var x=t();if(i.length===0)return x;var C=i.shift();if(C.token!=="/")throw"Expected slash in meter";if(C=i.shift(),C.type!=="number")throw"Expected bottom number of meter";return x.den=C.token,x.value=x.value/parseInt(x.den),x};if(i.length===0)throw"Expected meter definition in M: line";for(var e={type:"specified",value:[]},h=0;;){var v=a();h+=v.value;var m={num:v.num};if(v.den!==void 0&&(m.den=v.den),e.value.push(m),i.length===0)break}return c.havent_set_length===!0&&(c.default_length=h<.75?.0625:.125,c.havent_set_length=!1),e}catch(x){n(x,u,0)}return null},this.calcTempo=function(u){var i=.25;c.meter&&c.meter.type==="specified"?i=1/parseInt(c.meter.value[0].den):c.origMeter&&c.origMeter.type==="specified"&&(i=1/parseInt(c.origMeter.value[0].den));for(var t=0;t<u.duration;t++)u.duration[t]=i*u.duration[t];return u},this.resolveTempo=function(){c.tempo&&(this.calcTempo(c.tempo),s.metaText.tempo=c.tempo,delete c.tempo)},this.addUserDefinition=function(u,i,t){var a=u.indexOf("=",i);if(a===-1){n("Need an = in a macro definition",u,i);return}var e=T.strip(u.substring(i,a)),h=T.strip(u.substring(a+1));if(e.length!==1){n("Macro definitions can only be one character",u,i);return}var v="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~";if(v.indexOf(e)===-1){n("Macro definitions must be H-Y, h-w, or tilde",u,i);return}if(h.length===0){n("Missing macro definition",u,i);return}c.macros===void 0&&(c.macros={}),c.macros[e]=h},this.setDefaultLength=function(u,i,t){var a=u.substring(i,t).replace(/ /g,""),e=a.split("/");if(e.length===2){var h=parseInt(e[0]),v=parseInt(e[1]);v>0&&(c.default_length=h/v,c.havent_set_length=!1)}else e.length===1&&e[0]==="1"&&(c.default_length=1,c.havent_set_length=!1)};var d={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(u,i,t,a){try{var e=r.tokenize(u,i,t);if(e.length===0)throw"Missing parameter in Q: field";var h={startChar:a+i-2,endChar:a+t},v=!0,m=e.shift();if(m.type==="quote"&&(h.preString=m.token,m=e.shift(),e.length===0))return d[h.preString.toLowerCase()]&&(h.bpm=d[h.preString.toLowerCase()],h.suppressBpm=!0),{type:"immediate",tempo:h};if(m.type==="alpha"&&m.token==="C"){if(e.length===0)throw"Missing tempo after C in Q: field";if(m=e.shift(),m.type==="punct"&&m.token==="="){if(e.length===0)throw"Missing tempo after = in Q: field";if(m=e.shift(),m.type!=="number")throw"Expected number after = in Q: field";h.duration=[1],h.bpm=parseInt(m.token)}else if(m.type==="number"){if(h.duration=[parseInt(m.token)],e.length===0)throw"Missing = after duration in Q: field";if(m=e.shift(),m.type!=="punct"||m.token!=="=")throw"Expected = after duration in Q: field";if(e.length===0)throw"Missing tempo after = in Q: field";if(m=e.shift(),m.type!=="number")throw"Expected number after = in Q: field";h.bpm=parseInt(m.token)}else throw"Expected number or equal after C in Q: field"}else if(m.type==="number"){var x=parseInt(m.token);if(e.length===0||e[0].type==="quote")h.duration=[1],h.bpm=x;else{if(v=!1,m=e.shift(),m.type!=="punct"&&m.token!=="/"||(m=e.shift(),m.type!=="number"))throw"Expected fraction in Q: field";var C=parseInt(m.token);for(h.duration=[x/C];e.length>0&&e[0].token!=="="&&e[0].type!=="quote";){if(m=e.shift(),m.type!=="number"||(x=parseInt(m.token),m=e.shift(),m.type!=="punct"&&m.token!=="/")||(m=e.shift(),m.type!=="number"))throw"Expected fraction in Q: field";C=parseInt(m.token),h.duration.push(x/C)}if(m=e.shift(),m.type!=="punct"&&m.token!=="=")throw"Expected = in Q: field";if(m=e.shift(),m.type!=="number")throw"Expected tempo in Q: field";h.bpm=parseInt(m.token)}}else throw"Unknown value in Q: field";if(e.length!==0&&(m=e.shift(),m.type==="quote"&&(h.postString=m.token,m=e.shift()),e.length!==0))throw"Unexpected string at end of Q: field";return c.printTempo===!1&&(h.suppress=!0),{type:v?"delaySet":"immediate",tempo:h}}catch(S){return n(S,u,i),{type:"none"}}},this.letter_to_inline_header=function(u,i,t){var a=!1,e=r.eatWhiteSpace(u,i);if(i+=e,u.length>=i+5&&u[i]==="["&&u[i+2]===":"){var h=u.indexOf("]",i),v=c.iChar+i,m=c.iChar+h+1;switch(u.substring(i,i+3)){case"[I:":var x=g.addDirective(u.substring(i+3,h));return x&&n(x,u,i),[h-i+1+e];case"[M:":var C=this.setMeter(u.substring(i+3,h));return l.hasBeginMusic()&&C?l.appendStartingElement("meter",v,m,C):c.meter=C,[h-i+1+e];case"[K:":var S=p.parseKey(u.substring(i+3,h),!0);return S.foundClef&&l.hasBeginMusic()&&l.appendStartingElement("clef",v,m,c.clef),S.foundKey&&l.hasBeginMusic()&&l.appendStartingElement("key",v,m,p.fixKey(c.clef,c.key)),[h-i+1+e];case"[P:":var j=g.parseFontChangeLine(u.substring(i+3,h));return t||s.lines.length<=s.lineNum?c.partForNextLine={title:j,startChar:v,endChar:m}:l.appendElement("part",v,m,{title:j}),[h-i+1+e];case"[L:":return this.setDefaultLength(u,i+3,h),[h-i+1+e];case"[Q:":if(h>0){var F=this.setTempo(u,i+3,h,c.iChar);return F.type==="delaySet"?l.hasBeginMusic()?l.appendElement("tempo",v,m,this.calcTempo(F.tempo)):c.tempoForNextLine=["tempo",v,m,this.calcTempo(F.tempo)]:F.type==="immediate"&&(!t&&l.hasBeginMusic()?l.appendElement("tempo",v,m,F.tempo):c.tempoForNextLine=["tempo",v,m,F.tempo]),[h-i+1+e,u[i+1],u.substring(i+3,h)]}break;case"[V:":if(h>0)return a=p.parseVoice(u,i+3,h),[h-i+1+e,u[i+1],u.substring(i+3,h),a];break;case"[r:":return[h-i+1+e]}}return[0]},this.letter_to_body_header=function(u,i){var t=!1;if(u.length>=i+3)switch(u.substring(i,i+2)){case"I:":var a=g.addDirective(u.substring(i+2));return a&&n(a,u,i),[u.length];case"M:":var e=this.setMeter(u.substring(i+2));return l.hasBeginMusic()&&e&&l.appendStartingElement("meter",c.iChar+i,c.iChar+u.length,e),[u.length];case"K:":var h=p.parseKey(u.substring(i+2),l.hasBeginMusic());return h.foundClef&&l.hasBeginMusic()&&c.keywarn!==!1&&l.appendStartingElement("clef",c.iChar+i,c.iChar+u.length,c.clef),h.foundKey&&l.hasBeginMusic()&&c.keywarn!==!1&&l.appendStartingElement("key",c.iChar+i,c.iChar+u.length,p.fixKey(c.clef,c.key)),[u.length];case"P:":return l.hasBeginMusic()&&l.appendElement("part",c.iChar+i,c.iChar+u.length,{title:u.substring(i+2)}),[u.length];case"L:":return this.setDefaultLength(u,i+2,u.length),[u.length];case"Q:":var v=u.indexOf("",i+2);v===-1&&(v=u.length);var m=this.setTempo(u,i+2,v,c.iChar);return m.type==="delaySet"?l.appendElement("tempo",c.iChar+i,c.iChar+u.length,this.calcTempo(m.tempo)):m.type==="immediate"&&l.appendElement("tempo",c.iChar+i,c.iChar+u.length,m.tempo),[v,u[i],T.strip(u.substring(i+2))];case"V:":return t=p.parseVoice(u,i+2,u.length),[u.length,u[i],T.strip(u.substring(i+2)),t]}return[0]};var f={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(u){var i=f[u[0]],t=u.length-2,a=r.translateString(r.stripComment(u.substring(2)));if(i==="unalignedWords"||i==="notes")l.addMetaTextArray(i,g.parseFontChangeLine(a),{startChar:c.iChar,endChar:c.iChar+u.length});else if(i!==void 0)l.addMetaText(i,g.parseFontChangeLine(a),{startChar:c.iChar,endChar:c.iChar+u.length});else{var e=c.iChar,h=e+u.length;switch(u[0]){case"H":for(l.addMetaTextArray("history",g.parseFontChangeLine(a),{startChar:c.iChar,endChar:c.iChar+u.length}),u=r.peekLine();u&&u[1]!==":";)r.nextLine(),l.addMetaTextArray("history",g.parseFontChangeLine(r.translateString(r.stripComment(u))),{startChar:c.iChar,endChar:c.iChar+u.length}),u=r.peekLine();break;case"K":this.resolveTempo();var v=p.parseKey(u.substring(2),!1);!c.is_in_header&&l.hasBeginMusic()&&c.keywarn!==!1&&(v.foundClef&&l.appendStartingElement("clef",e,h,c.clef),v.foundKey&&l.appendStartingElement("key",e,h,p.fixKey(c.clef,c.key))),c.is_in_header=!1;break;case"L":this.setDefaultLength(u,2,u.length);break;case"M":c.origMeter=c.meter=this.setMeter(u.substring(2));break;case"P":c.is_in_header?l.addMetaText("partOrder",g.parseFontChangeLine(a),{startChar:c.iChar,endChar:c.iChar+u.length}):c.partForNextLine={title:a,startChar:e,endChar:h};break;case"Q":var m=this.setTempo(u,2,u.length,c.iChar);m.type==="delaySet"?c.tempo=m.tempo:m.type==="immediate"&&(s.metaText.tempo?c.tempoForNextLine=["tempo",e,h,m.tempo]:s.metaText.tempo=m.tempo);break;case"T":c.titlecaps&&(a=a.toUpperCase()),this.setTitle(g.parseFontChangeLine(r.theReverser(a)),t);break;case"U":this.addUserDefinition(u,2,u.length);break;case"V":if(p.parseVoice(u,2,u.length),!c.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":n("Ignored header",u,0);break;default:return{regular:!0}}}return{}}};return nt=o,nt}var Ce={},ea;function fs(){return ea||(ea=1,Ce.legalAccents=["trill","trillh","lowermordent","uppermordent","mordent","pralltriller","accent","fermata","invertedfermata","tenuto","0","1","2","3","4","5","+","wedge","open","thumb","snap","turn","roll","breath","shortphrase","mediumphrase","longphrase","segno","coda","D.S.","D.C.","fine","beambr1","beambr2","slide","marcato","upbow","downbow","/","//","///","////","trem1","trem2","trem3","trem4","turnx","invertedturn","invertedturnx","trill(","trill)","arpeggio","xstem","mark","umarcato","style=normal","style=harmonic","style=rhythm","style=x","style=triangle","D.C.alcoda","D.C.alfine","D.S.alcoda","D.S.alfine","editorial","courtesy"],Ce.volumeDecorations=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],Ce.dynamicDecorations=["crescendo(","crescendo)","diminuendo(","diminuendo)","glissando(","glissando)","~(","~)"],Ce.accentPseudonyms=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],Ce.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],Ce.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",Ce.durations=[.5,.75,.875,.9375,.96875,.984375,.25,.375,.4375,.46875,.484375,.4921875,.125,.1875,.21875,.234375,.2421875,.24609375,.0625,.09375,.109375,.1171875,.12109375,.123046875,.03125,.046875,.0546875,.05859375,.060546875,.0615234375,.015625,.0234375,.02734375,.029296875,.0302734375,.03076171875],Ce.pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},Ce.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},Ce.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},Ce.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}),Ce}var it,ta;function ps(){if(ta)return it;ta=1;var T=Lr(),g=Bi(),p,o,r,n,c,s,{legalAccents:l,volumeDecorations:d,dynamicDecorations:f,accentPseudonyms:u,accentDynamicPseudonyms:i,nonDecorations:t,durations:a,pitches:e,rests:h,accMap:v,tripletQ:m}=fs(),x=function(y,k,w,O,z,V){p=y,o=k,r=w,n=O,c=z,s=V,this.lineContinuation=!1},C=function(y,k,w){if(y.inTie[k]===void 0)return!1;var O=y.currentVoice?y.currentVoice.staffNum*100+y.currentVoice.index:0;return!!(y.inTie[k][O]&&(w.pitches!==void 0||w.rest.type!=="spacer"))},S={};x.prototype.parseMusic=function(y){s.resolveTempo(),r.is_in_header=!1;for(var k=0,w=r.iChar;p.isWhiteSpace(y[k])&&k<y.length;)k++;if(!(k===y.length||y[k]==="%")){var O=r.start_new_line;r.continueall===void 0?r.start_new_line=!0:r.start_new_line=!1;var z=0,V=s.letter_to_body_header(y,k);V[0]>0&&(k+=V[0],V[1]==="V"&&this.startNewLine());for(var I=0;k<y.length;){var K=k;if(y[k]==="%")break;var Q=s.letter_to_inline_header(y,k,O);if(Q[0]>0)k+=Q[0],Q[1]==="V"&&(O=!0);else{(!c.hasBeginMusic()||O&&!this.lineContinuation)&&(this.startNewLine(),O=!1);for(var G;;)if(G=p.eatWhiteSpace(y,k),G>0&&(k+=G),k>0&&y[k-1]===""&&(G=s.letter_to_body_header(y,k),G[0]>0&&(G[1]==="V"&&this.startNewLine(),k=G[0],r.start_new_line=!1)),G=P(y,k),G[0]>0&&(k+=G[0]),G=F(y,k),G[0]>0){S.chord||(S.chord=[]);var ee=p.translateString(G[1]);ee=ee.replace(/;/g,`
4
4
  `);for(var te=!1,ne=0;ne<S.chord.length;ne++)S.chord[ne].position===G[2]&&(te=!0,S.chord[ne].name+=`
@@ -1,2 +1,2 @@
1
- import{R as e,O as s,am as i,B as n,an as d}from"./index-p0knuDQ9.js";import{N as p}from"./treemap-KMMF4GRG-C4GHjB3F-_nPgBK22.js";import"./_baseUniq-Cd4llU-Q-Cdw60MU4.js";import"./_basePickBy-1MakYQmz-ydNwd1l_.js";import"./clone-DH1Kq5Y6-DxQT_fR1.js";var m={parse:e(async r=>{const a=await p("info",r);s.debug(a)},"parse")},g={version:d.version+""},v=e(()=>g.version,"getVersion"),c={getVersion:v},f=e((r,a,o)=>{s.debug(`rendering info diagram
1
+ import{R as e,O as s,am as i,B as n,an as d}from"./index-DodYl3VC.js";import{N as p}from"./treemap-KMMF4GRG-BLuW6hva-CvNDnceM.js";import"./_baseUniq-DZ7Bpu3I-Co9egLVD.js";import"./_basePickBy-0t-1TdXj-DH4J1m8V.js";import"./clone-D8_vOzkg-D9aZREI4.js";var m={parse:e(async r=>{const a=await p("info",r);s.debug(a)},"parse")},g={version:d.version+""},v=e(()=>g.version,"getVersion"),c={getVersion:v},f=e((r,a,o)=>{s.debug(`rendering info diagram
2
2
  `+r);const t=i(a);n(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),x={draw:f},N={parser:m,db:c,renderer:x};export{N as diagram};
@@ -1,6 +1,6 @@
1
- import{d as ft,y as rt,g as gt,x as mt}from"./chunk-TZMSLE5B-DGddLgNl-CifiGjd6.js";import{l as xt}from"./chunk-FMBD7UC4-C6VImbBX-ip_5_GPo.js";import{R as s,u as kt,f as _t,l as bt,s as wt,r as $t,o as vt,g as V,e as X,B as St,w as Mt}from"./index-p0knuDQ9.js";import{h as tt}from"./arc-b8oyw-lz-1LLYREoj.js";var U=function(){var t=s(function(y,i,a,u){for(a=a||{},u=y.length;u--;a[y[u]]=i);return a},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],l=[1,10],n=[1,11],c=[1,12],d=[1,13],h=[1,14],f={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(y,i,a,u,p,o,x){var k=o.length-1;switch(p){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:u.addTask(o[k-1],o[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:l,14:n,16:c,17:d,18:h},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:l,14:n,16:c,17:d,18:h},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(y,i){if(i.recoverable)this.trace(y);else{var a=new Error(y);throw a.hash=i,a}},"parseError"),parse:s(function(y){var i=this,a=[0],u=[],p=[null],o=[],x=this.table,k="",T=0,A=0,ut=2,J=1,pt=o.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(I.yy[Y]=this.yy[Y]);_.setInput(y,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var z=_.yylloc;o.push(z);var yt=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function dt(w){a.length=a.length-2*w,p.length=p.length-w,o.length=o.length-w}s(dt,"popStack");function K(){var w;return w=u.pop()||_.lex()||J,typeof w!="number"&&(w instanceof Array&&(u=w,w=u.pop()),w=i.symbols_[w]||w),w}s(K,"lex");for(var b,P,$,W,j={},D,M,H,O;;){if(P=a[a.length-1],this.defaultActions[P]?$=this.defaultActions[P]:((b===null||typeof b>"u")&&(b=K()),$=x[P]&&x[P][b]),typeof $>"u"||!$.length||!$[0]){var G="";O=[];for(D in x[P])this.terminals_[D]&&D>ut&&O.push("'"+this.terminals_[D]+"'");_.showPosition?G="Parse error on line "+(T+1)+`:
1
+ import{d as ft,y as rt,g as gt,x as mt}from"./chunk-TZMSLE5B-BILiPuwH-DOft2nRu.js";import{l as xt}from"./chunk-FMBD7UC4-D0AjqgJd-BqUKvjQH.js";import{R as s,h as kt,u as _t,i as bt,l as wt,z as $t,w as vt,g as V,d as X,B as St,F as Mt}from"./index-DodYl3VC.js";import{h as tt}from"./arc-CsV8WDj2-C9VadXC6.js";var U=function(){var t=s(function(y,i,a,u){for(a=a||{},u=y.length;u--;a[y[u]]=i);return a},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],l=[1,10],n=[1,11],c=[1,12],d=[1,13],h=[1,14],f={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(y,i,a,u,p,o,x){var k=o.length-1;switch(p){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:u.addTask(o[k-1],o[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:l,14:n,16:c,17:d,18:h},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:l,14:n,16:c,17:d,18:h},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(y,i){if(i.recoverable)this.trace(y);else{var a=new Error(y);throw a.hash=i,a}},"parseError"),parse:s(function(y){var i=this,a=[0],u=[],p=[null],o=[],x=this.table,k="",T=0,A=0,ut=2,J=1,pt=o.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(I.yy[z]=this.yy[z]);_.setInput(y,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;o.push(Y);var yt=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function dt(w){a.length=a.length-2*w,p.length=p.length-w,o.length=o.length-w}s(dt,"popStack");function K(){var w;return w=u.pop()||_.lex()||J,typeof w!="number"&&(w instanceof Array&&(u=w,w=u.pop()),w=i.symbols_[w]||w),w}s(K,"lex");for(var b,P,$,W,j={},D,M,H,O;;){if(P=a[a.length-1],this.defaultActions[P]?$=this.defaultActions[P]:((b===null||typeof b>"u")&&(b=K()),$=x[P]&&x[P][b]),typeof $>"u"||!$.length||!$[0]){var G="";O=[];for(D in x[P])this.terminals_[D]&&D>ut&&O.push("'"+this.terminals_[D]+"'");_.showPosition?G="Parse error on line "+(T+1)+`:
2
2
  `+_.showPosition()+`
3
- Expecting `+O.join(", ")+", got '"+(this.terminals_[b]||b)+"'":G="Parse error on line "+(T+1)+": Unexpected "+(b==J?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(G,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:z,expected:O})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+b);switch($[0]){case 1:a.push(b),p.push(_.yytext),o.push(_.yylloc),a.push($[1]),b=null,A=_.yyleng,k=_.yytext,T=_.yylineno,z=_.yylloc;break;case 2:if(M=this.productions_[$[1]][1],j.$=p[p.length-M],j._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},yt&&(j._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),W=this.performAction.apply(j,[k,A,T,I.yy,$[1],p,o].concat(pt)),typeof W<"u")return W;M&&(a=a.slice(0,-1*M*2),p=p.slice(0,-1*M),o=o.slice(0,-1*M)),a.push(this.productions_[$[1]][0]),p.push(j.$),o.push(j._$),H=x[a[a.length-2]][a[a.length-1]],a.push(H);break;case 3:return!0}}return!0},"parse")},m=function(){var y={EOF:1,parseError:s(function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,u=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var o=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===p.length?this.yylloc.first_column:0)+p[p.length-u.length].length-u[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
3
+ Expecting `+O.join(", ")+", got '"+(this.terminals_[b]||b)+"'":G="Parse error on line "+(T+1)+": Unexpected "+(b==J?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(G,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:O})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+b);switch($[0]){case 1:a.push(b),p.push(_.yytext),o.push(_.yylloc),a.push($[1]),b=null,A=_.yyleng,k=_.yytext,T=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[$[1]][1],j.$=p[p.length-M],j._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},yt&&(j._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),W=this.performAction.apply(j,[k,A,T,I.yy,$[1],p,o].concat(pt)),typeof W<"u")return W;M&&(a=a.slice(0,-1*M*2),p=p.slice(0,-1*M),o=o.slice(0,-1*M)),a.push(this.productions_[$[1]][0]),p.push(j.$),o.push(j._$),H=x[a[a.length-2]][a[a.length-1]],a.push(H);break;case 3:return!0}}return!0},"parse")},m=function(){var y={EOF:1,parseError:s(function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,u=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var o=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===p.length?this.yylloc.first_column:0)+p[p.length-u.length].length-u[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
5
  `+a+"^"},"showPosition"),test_match:s(function(i,a){var u,p,o;if(this.options.backtrack_lexer&&(o={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(o.yylloc.range=this.yylloc.range.slice(0))),p=i[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],u=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var x in o)this[x]=o[x];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,u,p;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),x=0;x<o.length;x++)if(u=this._input.match(this.rules[o[x]]),u&&(!a||u[0].length>a[0].length)){if(a=u,p=x,this.options.backtrack_lexer){if(i=this.test_match(u,o[x]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,o[p]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
6
  `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var i=this.next();return i||this.lex()},"lex"),begin:s(function(i){this.conditionStack.push(i)},"begin"),popState:s(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:s(function(i){this.begin(i)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(i,a,u,p){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return y}();f.lexer=m;function g(){this.yy={}}return s(g,"Parser"),g.prototype=f,f.Parser=g,new g}();U.parser=U;var Ct=U,B="",Q=[],L=[],R=[],Et=s(function(){Q.length=0,L.length=0,B="",R.length=0,Mt()},"clear"),Tt=s(function(t){B=t,Q.push(t)},"addSection"),It=s(function(){return Q},"getSections"),Pt=s(function(){let t=et();const e=100;let r=0;for(;!t&&r<e;)t=et(),r++;return L.push(...R),L},"getTasks"),At=s(function(){const t=[];return L.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),jt=s(function(t,e){const r=e.substr(1).split(":");let l=0,n=[];r.length===1?(l=Number(r[0]),n=[]):(l=Number(r[0]),n=r[1].split(","));const c=n.map(h=>h.trim()),d={section:B,type:B,people:c,task:t,score:l};R.push(d)},"addTask"),Bt=s(function(t){const e={section:B,type:B,description:t,task:t,classes:[]};L.push(e)},"addTaskOrg"),et=s(function(){const t=s(function(r){return R[r].processed},"compileTask");let e=!0;for(const[r,l]of R.entries())t(r),e=e&&l.processed;return e},"compileTasks"),Vt=s(function(){return At()},"getActors"),it={getConfig:s(()=>V().journey,"getConfig"),clear:Et,setDiagramTitle:vt,getDiagramTitle:$t,setAccTitle:wt,getAccTitle:bt,setAccDescription:_t,getAccDescription:kt,addSection:Tt,getSections:It,getTasks:Pt,addTask:jt,addTaskOrg:Bt,getActors:Vt},Lt=s(t=>`.label {
@@ -136,4 +136,4 @@ Expecting `+O.join(", ")+", got '"+(this.terminals_[b]||b)+"'":G="Parse error on
136
136
  ${t.actor5?`fill: ${t.actor5}`:""};
137
137
  }
138
138
  ${xt()}
139
- `,"getStyles"),Rt=Lt,Z=s(function(t,e){return mt(t,e)},"drawRect"),Ft=s(function(t,e){const r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),l=t.append("g");l.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),l.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function n(h){const f=tt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);h.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(n,"smile");function c(h){const f=tt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);h.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(c,"sad");function d(h){h.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(d,"ambivalent"),e.score>3?n(l):e.score<3?c(l):d(l),r},"drawFace"),ot=s(function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),lt=s(function(t,e){return gt(t,e)},"drawText"),Dt=s(function(t,e){function r(n,c,d,h,f){return n+","+c+" "+(n+d)+","+c+" "+(n+d)+","+(c+h-f)+" "+(n+d-f*1.2)+","+(c+h)+" "+n+","+(c+h)}s(r,"genPoints");const l=t.append("polygon");l.attr("points",r(e.x,e.y,50,20,7)),l.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,lt(t,e)},"drawLabel"),Ot=s(function(t,e,r){const l=t.append("g"),n=rt();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,Z(l,n),ct(r)(e.text,l,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),nt=-1,Nt=s(function(t,e,r){const l=e.x+r.width/2,n=t.append("g");nt++,n.append("line").attr("id","task"+nt).attr("x1",l).attr("y1",e.y).attr("x2",l).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Ft(n,{cx:l,cy:300+(5-e.score)*30,score:e.score});const c=rt();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=r.width,c.height=r.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,Z(n,c);let d=e.x+14;e.people.forEach(h=>{const f=e.actors[h].color,m={cx:d,cy:e.y,r:7,fill:f,stroke:"#000",title:h,pos:e.actors[h].position};ot(n,m),d+=10}),ct(r)(e.task,n,c.x,c.y,c.width,c.height,{class:"task"},r,e.colour)},"drawTask"),Yt=s(function(t,e){ft(t,e)},"drawBackgroundRect"),ct=function(){function t(n,c,d,h,f,m,g,y){const i=c.append("text").attr("x",d+f/2).attr("y",h+m/2+5).style("font-color",y).style("text-anchor","middle").text(n);l(i,g)}s(t,"byText");function e(n,c,d,h,f,m,g,y,i){const{taskFontSize:a,taskFontFamily:u}=y,p=n.split(/<br\s*\/?>/gi);for(let o=0;o<p.length;o++){const x=o*a-a*(p.length-1)/2,k=c.append("text").attr("x",d+f/2).attr("y",h).attr("fill",i).style("text-anchor","middle").style("font-size",a).style("font-family",u);k.append("tspan").attr("x",d+f/2).attr("dy",x).text(p[o]),k.attr("y",h+m/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),l(k,g)}}s(e,"byTspan");function r(n,c,d,h,f,m,g,y){const i=c.append("switch"),a=i.append("foreignObject").attr("x",d).attr("y",h).attr("width",f).attr("height",m).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");a.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,i,d,h,f,m,g,y),l(a,g)}s(r,"byFo");function l(n,c){for(const d in c)d in c&&n.attr(d,c[d])}return s(l,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),zt=s(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),F={drawRect:Z,drawCircle:ot,drawSection:Ot,drawText:lt,drawLabel:Dt,drawTask:Nt,drawBackgroundRect:Yt,initGraphics:zt},Wt=s(function(t){Object.keys(t).forEach(function(e){S[e]=t[e]})},"setConf"),C={},N=0;function ht(t){const e=V().journey,r=e.maxLabelWidth;N=0;let l=60;Object.keys(C).forEach(n=>{const c=C[n].color,d={cx:20,cy:l,r:7,fill:c,stroke:"#000",pos:C[n].position};F.drawCircle(t,d);let h=t.append("text").attr("visibility","hidden").text(n);const f=h.node().getBoundingClientRect().width;h.remove();let m=[];if(f<=r)m=[n];else{const g=n.split(" ");let y="";h=t.append("text").attr("visibility","hidden"),g.forEach(i=>{const a=y?`${y} ${i}`:i;if(h.text(a),h.node().getBoundingClientRect().width>r){if(y&&m.push(y),y=i,h.text(i),h.node().getBoundingClientRect().width>r){let u="";for(const p of i)u+=p,h.text(u+"-"),h.node().getBoundingClientRect().width>r&&(m.push(u.slice(0,-1)+"-"),u=p);y=u}}else y=a}),y&&m.push(y),h.remove()}m.forEach((g,y)=>{const i={x:40,y:l+7+y*20,fill:"#666",text:g,textMargin:e.boxTextMargin??5},a=F.drawText(t,i).node().getBoundingClientRect().width;a>N&&a>e.leftMargin-a&&(N=a)}),l+=Math.max(20,m.length*20)})}s(ht,"drawActorLegend");var S=V().journey,E=0,Gt=s(function(t,e,r,l){const n=V(),c=n.journey.titleColor,d=n.journey.titleFontSize,h=n.journey.titleFontFamily,f=n.securityLevel;let m;f==="sandbox"&&(m=X("#i"+e));const g=f==="sandbox"?X(m.nodes()[0].contentDocument.body):X("body");v.init();const y=g.select("#"+e);F.initGraphics(y);const i=l.db.getTasks(),a=l.db.getDiagramTitle(),u=l.db.getActors();for(const A in C)delete C[A];let p=0;u.forEach(A=>{C[A]={color:S.actorColours[p%S.actorColours.length],position:p},p++}),ht(y),E=S.leftMargin+N,v.insert(0,0,E,Object.keys(C).length*50),Xt(y,i,0);const o=v.getBounds();a&&y.append("text").text(a).attr("x",E).attr("font-size",d).attr("font-weight","bold").attr("y",25).attr("fill",c).attr("font-family",h);const x=o.stopy-o.starty+2*S.diagramMarginY,k=E+o.stopx+2*S.diagramMarginX;St(y,x,k,S.useMaxWidth),y.append("line").attr("x1",E).attr("y1",S.height*4).attr("x2",k-E-4).attr("y2",S.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const T=a?70:0;y.attr("viewBox",`${o.startx} -25 ${k} ${x+T}`),y.attr("preserveAspectRatio","xMinYMin meet"),y.attr("height",x+T+25)},"draw"),v={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:s(function(t,e,r,l){t[e]===void 0?t[e]=r:t[e]=l(r,t[e])},"updateVal"),updateBounds:s(function(t,e,r,l){const n=V().journey,c=this;let d=0;function h(f){return s(function(m){d++;const g=c.sequenceItems.length-d+1;c.updateVal(m,"starty",e-g*n.boxMargin,Math.min),c.updateVal(m,"stopy",l+g*n.boxMargin,Math.max),c.updateVal(v.data,"startx",t-g*n.boxMargin,Math.min),c.updateVal(v.data,"stopx",r+g*n.boxMargin,Math.max),f!=="activation"&&(c.updateVal(m,"startx",t-g*n.boxMargin,Math.min),c.updateVal(m,"stopx",r+g*n.boxMargin,Math.max),c.updateVal(v.data,"starty",e-g*n.boxMargin,Math.min),c.updateVal(v.data,"stopy",l+g*n.boxMargin,Math.max))},"updateItemBounds")}s(h,"updateFn"),this.sequenceItems.forEach(h())},"updateBounds"),insert:s(function(t,e,r,l){const n=Math.min(t,r),c=Math.max(t,r),d=Math.min(e,l),h=Math.max(e,l);this.updateVal(v.data,"startx",n,Math.min),this.updateVal(v.data,"starty",d,Math.min),this.updateVal(v.data,"stopx",c,Math.max),this.updateVal(v.data,"stopy",h,Math.max),this.updateBounds(n,d,c,h)},"insert"),bumpVerticalPos:s(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return this.data},"getBounds")},q=S.sectionFills,st=S.sectionColours,Xt=s(function(t,e,r){const l=V().journey;let n="";const c=l.height*2+l.diagramMarginY,d=r+c;let h=0,f="#CCC",m="black",g=0;for(const[y,i]of e.entries()){if(n!==i.section){f=q[h%q.length],g=h%q.length,m=st[h%st.length];let u=0;const p=i.section;for(let x=y;x<e.length&&e[x].section==p;x++)u=u+1;const o={x:y*l.taskMargin+y*l.width+E,y:50,text:i.section,fill:f,num:g,colour:m,taskCount:u};F.drawSection(t,o,l),n=i.section,h++}const a=i.people.reduce((u,p)=>(C[p]&&(u[p]=C[p]),u),{});i.x=y*l.taskMargin+y*l.width+E,i.y=d,i.width=l.diagramMarginX,i.height=l.diagramMarginY,i.colour=m,i.fill=f,i.num=g,i.actors=a,F.drawTask(t,i,l),v.insert(i.x,i.y,i.x+i.width+l.taskMargin,450)}},"drawTasks"),at={setConf:Wt,draw:Gt},Jt={parser:Ct,db:it,renderer:at,styles:Rt,init:s(t=>{at.setConf(t.journey),it.clear()},"init")};export{Jt as diagram};
139
+ `,"getStyles"),Rt=Lt,Z=s(function(t,e){return mt(t,e)},"drawRect"),Ft=s(function(t,e){const r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),l=t.append("g");l.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),l.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function n(h){const f=tt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);h.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(n,"smile");function c(h){const f=tt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);h.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(c,"sad");function d(h){h.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(d,"ambivalent"),e.score>3?n(l):e.score<3?c(l):d(l),r},"drawFace"),ot=s(function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),lt=s(function(t,e){return gt(t,e)},"drawText"),Dt=s(function(t,e){function r(n,c,d,h,f){return n+","+c+" "+(n+d)+","+c+" "+(n+d)+","+(c+h-f)+" "+(n+d-f*1.2)+","+(c+h)+" "+n+","+(c+h)}s(r,"genPoints");const l=t.append("polygon");l.attr("points",r(e.x,e.y,50,20,7)),l.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,lt(t,e)},"drawLabel"),Ot=s(function(t,e,r){const l=t.append("g"),n=rt();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,Z(l,n),ct(r)(e.text,l,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),nt=-1,Nt=s(function(t,e,r){const l=e.x+r.width/2,n=t.append("g");nt++,n.append("line").attr("id","task"+nt).attr("x1",l).attr("y1",e.y).attr("x2",l).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Ft(n,{cx:l,cy:300+(5-e.score)*30,score:e.score});const c=rt();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=r.width,c.height=r.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,Z(n,c);let d=e.x+14;e.people.forEach(h=>{const f=e.actors[h].color,m={cx:d,cy:e.y,r:7,fill:f,stroke:"#000",title:h,pos:e.actors[h].position};ot(n,m),d+=10}),ct(r)(e.task,n,c.x,c.y,c.width,c.height,{class:"task"},r,e.colour)},"drawTask"),zt=s(function(t,e){ft(t,e)},"drawBackgroundRect"),ct=function(){function t(n,c,d,h,f,m,g,y){const i=c.append("text").attr("x",d+f/2).attr("y",h+m/2+5).style("font-color",y).style("text-anchor","middle").text(n);l(i,g)}s(t,"byText");function e(n,c,d,h,f,m,g,y,i){const{taskFontSize:a,taskFontFamily:u}=y,p=n.split(/<br\s*\/?>/gi);for(let o=0;o<p.length;o++){const x=o*a-a*(p.length-1)/2,k=c.append("text").attr("x",d+f/2).attr("y",h).attr("fill",i).style("text-anchor","middle").style("font-size",a).style("font-family",u);k.append("tspan").attr("x",d+f/2).attr("dy",x).text(p[o]),k.attr("y",h+m/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),l(k,g)}}s(e,"byTspan");function r(n,c,d,h,f,m,g,y){const i=c.append("switch"),a=i.append("foreignObject").attr("x",d).attr("y",h).attr("width",f).attr("height",m).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");a.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,i,d,h,f,m,g,y),l(a,g)}s(r,"byFo");function l(n,c){for(const d in c)d in c&&n.attr(d,c[d])}return s(l,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),Yt=s(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),F={drawRect:Z,drawCircle:ot,drawSection:Ot,drawText:lt,drawLabel:Dt,drawTask:Nt,drawBackgroundRect:zt,initGraphics:Yt},Wt=s(function(t){Object.keys(t).forEach(function(e){S[e]=t[e]})},"setConf"),C={},N=0;function ht(t){const e=V().journey,r=e.maxLabelWidth;N=0;let l=60;Object.keys(C).forEach(n=>{const c=C[n].color,d={cx:20,cy:l,r:7,fill:c,stroke:"#000",pos:C[n].position};F.drawCircle(t,d);let h=t.append("text").attr("visibility","hidden").text(n);const f=h.node().getBoundingClientRect().width;h.remove();let m=[];if(f<=r)m=[n];else{const g=n.split(" ");let y="";h=t.append("text").attr("visibility","hidden"),g.forEach(i=>{const a=y?`${y} ${i}`:i;if(h.text(a),h.node().getBoundingClientRect().width>r){if(y&&m.push(y),y=i,h.text(i),h.node().getBoundingClientRect().width>r){let u="";for(const p of i)u+=p,h.text(u+"-"),h.node().getBoundingClientRect().width>r&&(m.push(u.slice(0,-1)+"-"),u=p);y=u}}else y=a}),y&&m.push(y),h.remove()}m.forEach((g,y)=>{const i={x:40,y:l+7+y*20,fill:"#666",text:g,textMargin:e.boxTextMargin??5},a=F.drawText(t,i).node().getBoundingClientRect().width;a>N&&a>e.leftMargin-a&&(N=a)}),l+=Math.max(20,m.length*20)})}s(ht,"drawActorLegend");var S=V().journey,E=0,Gt=s(function(t,e,r,l){const n=V(),c=n.journey.titleColor,d=n.journey.titleFontSize,h=n.journey.titleFontFamily,f=n.securityLevel;let m;f==="sandbox"&&(m=X("#i"+e));const g=f==="sandbox"?X(m.nodes()[0].contentDocument.body):X("body");v.init();const y=g.select("#"+e);F.initGraphics(y);const i=l.db.getTasks(),a=l.db.getDiagramTitle(),u=l.db.getActors();for(const A in C)delete C[A];let p=0;u.forEach(A=>{C[A]={color:S.actorColours[p%S.actorColours.length],position:p},p++}),ht(y),E=S.leftMargin+N,v.insert(0,0,E,Object.keys(C).length*50),Xt(y,i,0);const o=v.getBounds();a&&y.append("text").text(a).attr("x",E).attr("font-size",d).attr("font-weight","bold").attr("y",25).attr("fill",c).attr("font-family",h);const x=o.stopy-o.starty+2*S.diagramMarginY,k=E+o.stopx+2*S.diagramMarginX;St(y,x,k,S.useMaxWidth),y.append("line").attr("x1",E).attr("y1",S.height*4).attr("x2",k-E-4).attr("y2",S.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const T=a?70:0;y.attr("viewBox",`${o.startx} -25 ${k} ${x+T}`),y.attr("preserveAspectRatio","xMinYMin meet"),y.attr("height",x+T+25)},"draw"),v={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:s(function(t,e,r,l){t[e]===void 0?t[e]=r:t[e]=l(r,t[e])},"updateVal"),updateBounds:s(function(t,e,r,l){const n=V().journey,c=this;let d=0;function h(f){return s(function(m){d++;const g=c.sequenceItems.length-d+1;c.updateVal(m,"starty",e-g*n.boxMargin,Math.min),c.updateVal(m,"stopy",l+g*n.boxMargin,Math.max),c.updateVal(v.data,"startx",t-g*n.boxMargin,Math.min),c.updateVal(v.data,"stopx",r+g*n.boxMargin,Math.max),f!=="activation"&&(c.updateVal(m,"startx",t-g*n.boxMargin,Math.min),c.updateVal(m,"stopx",r+g*n.boxMargin,Math.max),c.updateVal(v.data,"starty",e-g*n.boxMargin,Math.min),c.updateVal(v.data,"stopy",l+g*n.boxMargin,Math.max))},"updateItemBounds")}s(h,"updateFn"),this.sequenceItems.forEach(h())},"updateBounds"),insert:s(function(t,e,r,l){const n=Math.min(t,r),c=Math.max(t,r),d=Math.min(e,l),h=Math.max(e,l);this.updateVal(v.data,"startx",n,Math.min),this.updateVal(v.data,"starty",d,Math.min),this.updateVal(v.data,"stopx",c,Math.max),this.updateVal(v.data,"stopy",h,Math.max),this.updateBounds(n,d,c,h)},"insert"),bumpVerticalPos:s(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return this.data},"getBounds")},q=S.sectionFills,st=S.sectionColours,Xt=s(function(t,e,r){const l=V().journey;let n="";const c=l.height*2+l.diagramMarginY,d=r+c;let h=0,f="#CCC",m="black",g=0;for(const[y,i]of e.entries()){if(n!==i.section){f=q[h%q.length],g=h%q.length,m=st[h%st.length];let u=0;const p=i.section;for(let x=y;x<e.length&&e[x].section==p;x++)u=u+1;const o={x:y*l.taskMargin+y*l.width+E,y:50,text:i.section,fill:f,num:g,colour:m,taskCount:u};F.drawSection(t,o,l),n=i.section,h++}const a=i.people.reduce((u,p)=>(C[p]&&(u[p]=C[p]),u),{});i.x=y*l.taskMargin+y*l.width+E,i.y=d,i.width=l.diagramMarginX,i.height=l.diagramMarginY,i.colour=m,i.fill=f,i.num=g,i.actors=a,F.drawTask(t,i,l),v.insert(i.x,i.y,i.x+i.width+l.taskMargin,450)}},"drawTasks"),at={setConf:Wt,draw:Gt},Jt={parser:Ct,db:it,renderer:at,styles:Rt,init:s(t=>{at.setConf(t.journey),it.clear()},"init")};export{Jt as diagram};